Skip to content

Commit

Permalink
chore(clerk-js,types): Convert Saml related types from experimental t…
Browse files Browse the repository at this point in the history
…o stable (#1876)

Saml types:
- `User.samlAccounts`
- `SamlAccount`
- `UserSettingsResource.saml`
- `UserSettingsJSON.saml`
- `SamlSettings`
- `UserResource.samlAccounts`
- `SamlAccountResource`
- `SamlStrategy`
- `UserJSON.saml_accounts`
- `SamlAccountJSON`
- `SamlConfig`
- `SamlFactor`
- `HandleSamlCallbackParams`
  • Loading branch information
dimkl committed Oct 13, 2023
1 parent 29485eb commit a11f962
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 42 deletions.
20 changes: 20 additions & 0 deletions .changeset/happy-turkeys-explode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
'@clerk/clerk-js': patch
'@clerk/types': patch
---

Mark the following SAML related types as stable:

- `User.samlAccounts`
- `SamlAccount`
- `UserSettingsResource.saml`
- `UserSettingsJSON.saml`
- `SamlSettings`
- `UserResource.samlAccounts`
- `SamlAccountResource`
- `SamlStrategy`
- `UserJSON.saml_accounts`
- `SamlAccountJSON`
- `SamlConfig`
- `SamlFactor`
- `HandleSamlCallbackParams`
3 changes: 0 additions & 3 deletions packages/clerk-js/src/core/resources/SamlAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ import type { SamlAccountJSON, SamlAccountResource, SamlIdpSlug, VerificationRes
import { BaseResource } from './Base';
import { Verification } from './Verification';

/**
* @experimental
*/
export class SamlAccount extends BaseResource implements SamlAccountResource {
id!: string;
provider: SamlIdpSlug = 'saml_custom';
Expand Down
3 changes: 0 additions & 3 deletions packages/clerk-js/src/core/resources/User.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@ export class User extends BaseResource implements UserResource {
web3Wallets: Web3WalletResource[] = [];
externalAccounts: ExternalAccountResource[] = [];

/**
* @experimental
*/
samlAccounts: SamlAccountResource[] = [];

organizationMemberships: OrganizationMembershipResource[] = [];
Expand Down
3 changes: 0 additions & 3 deletions packages/clerk-js/src/core/resources/UserSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ export class UserSettings extends BaseResource implements UserSettingsResource {
id = undefined;
social!: OAuthProviders;

/**
* @experimental
*/
saml!: SamlSettings;

attributes!: Attributes;
Expand Down
3 changes: 0 additions & 3 deletions packages/types/src/clerk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -509,9 +509,6 @@ export type HandleOAuthCallbackParams = {
verifyPhoneNumberUrl?: string | null;
};

/**
* @experimental
*/
export type HandleSamlCallbackParams = HandleOAuthCallbackParams;

export type BuildUrlWithAuthParams = {
Expand Down
6 changes: 0 additions & 6 deletions packages/types/src/factors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ export type OauthFactor = {
strategy: OAuthStrategy;
};

/**
* @experimental
*/
export type SamlFactor = {
strategy: SamlStrategy;
};
Expand Down Expand Up @@ -93,9 +90,6 @@ export type OAuthConfig = OauthFactor & {
actionCompleteRedirectUrl: string;
};

/**
* @experimental
*/
export type SamlConfig = SamlFactor & {
redirectUrl: string;
actionCompleteRedirectUrl: string;
Expand Down
6 changes: 0 additions & 6 deletions packages/types/src/json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,6 @@ export interface ExternalAccountJSON extends ClerkResourceJSON {
verification?: VerificationJSON;
}

/**
* @experimental
*/
export interface SamlAccountJSON extends ClerkResourceJSON {
object: 'saml_account';
provider: SamlIdpSlug;
Expand Down Expand Up @@ -197,9 +194,6 @@ export interface UserJSON extends ClerkResourceJSON {
web3_wallets: Web3WalletJSON[];
external_accounts: ExternalAccountJSON[];

/**
* @experimental
*/
saml_accounts: SamlAccountJSON[];

organization_memberships: OrganizationMembershipJSON[];
Expand Down
3 changes: 0 additions & 3 deletions packages/types/src/samlAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ import type { ClerkResource } from './resource';
import type { SamlIdpSlug } from './saml';
import type { VerificationResource } from './verification';

/**
* @experimental
*/
export interface SamlAccountResource extends ClerkResource {
provider: SamlIdpSlug;
providerUserId: string | null;
Expand Down
3 changes: 0 additions & 3 deletions packages/types/src/strategies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,4 @@ export type ResetPasswordEmailCodeStrategy = 'reset_password_email_code';
export type OAuthStrategy = `oauth_${OAuthProvider}`;
export type Web3Strategy = `web3_${Web3Provider}_signature`;

/**
* @experimental
*/
export type SamlStrategy = 'saml';
3 changes: 0 additions & 3 deletions packages/types/src/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,6 @@ export interface UserResource extends ClerkResource {
web3Wallets: Web3WalletResource[];
externalAccounts: ExternalAccountResource[];

/**
* @experimental
*/
samlAccounts: SamlAccountResource[];

organizationMemberships: OrganizationMembershipResource[];
Expand Down
9 changes: 0 additions & 9 deletions packages/types/src/userSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,6 @@ export type OAuthProviders = {
[provider in OAuthStrategy]: OAuthProviderSettings;
};

/**
* @experimental
*/
export type SamlSettings = {
enabled: boolean;
};
Expand All @@ -94,9 +91,6 @@ export interface UserSettingsJSON extends ClerkResourceJSON {
actions: Actions;
social: OAuthProviders;

/**
* @experimental
*/
saml: SamlSettings;

sign_in: SignInData;
Expand All @@ -108,9 +102,6 @@ export interface UserSettingsResource extends ClerkResource {
id?: undefined;
social: OAuthProviders;

/**
* @experimental
*/
saml: SamlSettings;

attributes: Attributes;
Expand Down

0 comments on commit a11f962

Please sign in to comment.