Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/smooth-ends-agree.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@clerk/clerk-js': patch
'@clerk/backend': patch
'@clerk/types': patch
---

Remove deprecated `samlAccounts` property from `User` object in favor of `enterpriseAccounts`
16 changes: 0 additions & 16 deletions packages/backend/src/api/resources/JSON.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ export const ObjectType = {
PhoneNumber: 'phone_number',
ProxyCheck: 'proxy_check',
RedirectUrl: 'redirect_url',
SamlAccount: 'saml_account',
SamlConnection: 'saml_connection',
Session: 'session',
SignInAttempt: 'sign_in_attempt',
Expand Down Expand Up @@ -236,20 +235,6 @@ export interface JwtTemplateJSON extends ClerkResourceJSON {
updated_at: number;
}

export interface SamlAccountJSON extends ClerkResourceJSON {
object: typeof ObjectType.SamlAccount;
provider: string;
provider_user_id: string | null;
active: boolean;
email_address: string;
first_name: string;
last_name: string;
verification: VerificationJSON | null;
saml_connection: SamlAccountConnectionJSON | null;
last_authenticated_at: number | null;
enterprise_connection_id: string | null;
}

export interface IdentificationLinkJSON extends ClerkResourceJSON {
type: string;
}
Expand Down Expand Up @@ -590,7 +575,6 @@ export interface UserJSON extends ClerkResourceJSON {
web3_wallets: Web3WalletJSON[];
organization_memberships: OrganizationMembershipJSON[] | null;
external_accounts: ExternalAccountJSON[];
saml_accounts: SamlAccountJSON[];
password_last_updated_at: number | null;
public_metadata: UserPublicMetadata;
private_metadata: UserPrivateMetadata;
Expand Down
71 changes: 0 additions & 71 deletions packages/backend/src/api/resources/SamlAccount.ts

This file was deleted.

8 changes: 1 addition & 7 deletions packages/backend/src/api/resources/User.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { EmailAddress } from './EmailAddress';
import { ExternalAccount } from './ExternalAccount';
import type { ExternalAccountJSON, SamlAccountJSON, UserJSON } from './JSON';
import type { ExternalAccountJSON, UserJSON } from './JSON';
import { PhoneNumber } from './PhoneNumber';
import { SamlAccount } from './SamlAccount';
import { Web3Wallet } from './Web3Wallet';

/**
Expand Down Expand Up @@ -120,10 +119,6 @@ export class User {
* An array of all the `ExternalAccount` objects associated with the user via OAuth. **Note**: This includes both verified & unverified external accounts.
*/
readonly externalAccounts: ExternalAccount[] = [],
/**
* An array of all the `SamlAccount` objects associated with the user via SAML.
*/
readonly samlAccounts: SamlAccount[] = [],
/**
* Date when the user was last active.
*/
Expand Down Expand Up @@ -179,7 +174,6 @@ export class User {
(data.phone_numbers || []).map(x => PhoneNumber.fromJSON(x)),
(data.web3_wallets || []).map(x => Web3Wallet.fromJSON(x)),
(data.external_accounts || []).map((x: ExternalAccountJSON) => ExternalAccount.fromJSON(x)),
(data.saml_accounts || []).map((x: SamlAccountJSON) => SamlAccount.fromJSON(x)),
data.last_active_at,
data.create_organization_enabled,
data.create_organizations_limit,
Expand Down
15 changes: 7 additions & 8 deletions packages/backend/src/api/resources/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,23 @@ export type {

export type { SignUpStatus } from '@clerk/types';

export * from './CommercePlan';
export * from './CommerceSubscription';
export * from './CommerceSubscriptionItem';
export * from './ExternalAccount';
export * from './Feature';
export * from './IdentificationLink';
export * from './IdPOAuthAccessToken';
export * from './Instance';
export * from './InstanceRestrictions';
export * from './InstanceSettings';
export * from './Invitation';
export * from './JSON';
export * from './JwtTemplate';
export * from './M2MToken';
export * from './Machine';
export * from './MachineScope';
export * from './MachineSecretKey';
export * from './M2MToken';
export * from './JwtTemplate';
export * from './OauthAccessToken';
export * from './OAuthApplication';
export * from './Organization';
Expand All @@ -45,7 +49,6 @@ export * from './OrganizationSettings';
export * from './PhoneNumber';
export * from './ProxyCheck';
export * from './RedirectUrl';
export * from './SamlAccount';
export * from './SamlConnection';
export * from './Session';
export * from './SignInTokens';
Expand All @@ -57,17 +60,13 @@ export * from './User';
export * from './Verification';
export * from './WaitlistEntry';
export * from './Web3Wallet';
export * from './CommercePlan';
export * from './CommerceSubscription';
export * from './CommerceSubscriptionItem';
export * from './Feature';

export type {
EmailWebhookEvent,
OrganizationWebhookEvent,
OrganizationDomainWebhookEvent,
OrganizationInvitationWebhookEvent,
OrganizationMembershipWebhookEvent,
OrganizationWebhookEvent,
PermissionWebhookEvent,
RoleWebhookEvent,
SessionWebhookEvent,
Expand Down
132 changes: 0 additions & 132 deletions packages/clerk-js/src/core/resources/SamlAccount.ts

This file was deleted.

7 changes: 0 additions & 7 deletions packages/clerk-js/src/core/resources/User.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import type {
PasskeyResource,
PhoneNumberResource,
RemoveUserPasswordParams,
SamlAccountResource,
SetProfileImageParams,
TOTPJSON,
TOTPResource,
Expand Down Expand Up @@ -49,7 +48,6 @@ import {
OrganizationSuggestion,
Passkey,
PhoneNumber,
SamlAccount,
SessionWithActivities,
TOTP,
UserOrganizationInvitation,
Expand All @@ -69,8 +67,6 @@ export class User extends BaseResource implements UserResource {
enterpriseAccounts: EnterpriseAccountResource[] = [];
passkeys: PasskeyResource[] = [];

samlAccounts: SamlAccountResource[] = [];

organizationMemberships: OrganizationMembershipResource[] = [];
passwordEnabled = false;
firstName: string | null = null;
Expand Down Expand Up @@ -365,8 +361,6 @@ export class User extends BaseResource implements UserResource {

this.organizationMemberships = (data.organization_memberships || []).map(om => new OrganizationMembership(om));

this.samlAccounts = (data.saml_accounts || []).map(sa => new SamlAccount(sa, this.path() + '/saml_accounts'));

this.enterpriseAccounts = (data.enterprise_accounts || []).map(
ea => new EnterpriseAccount(ea, this.path() + '/enterprise_accounts'),
);
Expand Down Expand Up @@ -413,7 +407,6 @@ export class User extends BaseResource implements UserResource {
external_accounts: this.externalAccounts.map(ea => ea.__internal_toSnapshot()),
passkeys: this.passkeys.map(passkey => passkey.__internal_toSnapshot()),
organization_memberships: this.organizationMemberships.map(om => om.__internal_toSnapshot()),
saml_accounts: this.samlAccounts.map(sa => sa.__internal_toSnapshot()),
enterprise_accounts: this.enterpriseAccounts.map(ea => ea.__internal_toSnapshot()),
totp_enabled: this.totpEnabled,
backup_code_enabled: this.backupCodeEnabled,
Expand Down
2 changes: 0 additions & 2 deletions packages/clerk-js/src/core/resources/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ export * from './ExternalAccount';
export * from './IdentificationLink';
export * from './Image';
export * from './PhoneNumber';
export * from './SamlAccount';
export * from './Session';
export * from './SessionWithActivities';
export * from './SignIn';
Expand All @@ -18,4 +17,3 @@ export * from './User';
export * from './Verification';
export * from './Waitlist';
export * from './Web3Wallet';

Loading