@clerk/types 4.54.0-snapshot.v20250414153812 → 4.54.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -469,6 +469,10 @@ type OrganizationDomainVerificationStatus = 'unverified' | 'verified';
469
469
  * @inline
470
470
  */
471
471
  type OrganizationEnrollmentMode = 'manual_invitation' | 'automatic_invitation' | 'automatic_suggestion';
472
+ /**
473
+ * The `OrganizationDomain` object is the model around an organization domain.
474
+ * @interface
475
+ */
472
476
  interface OrganizationDomainResource extends ClerkResource {
473
477
  id: string;
474
478
  name: string;
@@ -508,6 +512,10 @@ declare global {
508
512
  [k: string]: unknown;
509
513
  }
510
514
  }
515
+ /**
516
+ * The `OrganizationInvitation` object is the model around an organization invitation.
517
+ * @interface
518
+ */
511
519
  interface OrganizationInvitationResource extends ClerkResource {
512
520
  id: string;
513
521
  emailAddress: string;
@@ -997,6 +1005,10 @@ interface ImageResource extends ClerkResource {
997
1005
  * @inline
998
1006
  */
999
1007
  type OrganizationSuggestionStatus = 'pending' | 'accepted';
1008
+ /**
1009
+ * An interface representing an organization suggestion.
1010
+ * @interface
1011
+ */
1000
1012
  interface OrganizationSuggestionResource extends ClerkResource {
1001
1013
  id: string;
1002
1014
  publicOrganizationData: {
@@ -1090,6 +1102,10 @@ declare global {
1090
1102
  [k: string]: unknown;
1091
1103
  }
1092
1104
  }
1105
+ /**
1106
+ * The `OrganizationInvitation` object is the model around an organization invitation.
1107
+ * @interface
1108
+ */
1093
1109
  interface UserOrganizationInvitationResource extends ClerkResource {
1094
1110
  id: string;
1095
1111
  emailAddress: string;
@@ -1510,6 +1526,10 @@ type SessionVerifyAttemptFirstFactorParams = EmailCodeAttempt | PhoneCodeAttempt
1510
1526
  type SessionVerifyPrepareSecondFactorParams = PhoneCodeSecondFactorConfig;
1511
1527
  type SessionVerifyAttemptSecondFactorParams = PhoneCodeAttempt | TOTPAttempt | BackupCodeAttempt;
1512
1528
 
1529
+ /**
1530
+ * The `OrganizationMembershipRequest` object is the model that describes the request of a user to join an organization.
1531
+ * @interface
1532
+ */
1513
1533
  interface OrganizationMembershipRequestResource extends ClerkResource {
1514
1534
  id: string;
1515
1535
  organizationId: string;
@@ -1559,6 +1579,13 @@ declare global {
1559
1579
  [k: string]: unknown;
1560
1580
  }
1561
1581
  }
1582
+ /**
1583
+ * The `Organization` object holds information about an organization, as well as methods for managing it.
1584
+ *
1585
+ * To use these methods, you must have the **Organizations** feature [enabled in your app's settings in the Clerk Dashboard](https://clerk.com/docs/organizations/overview#enable-organizations-in-your-application).
1586
+ *
1587
+ * @interface
1588
+ */
1562
1589
  interface OrganizationResource extends ClerkResource {
1563
1590
  id: string;
1564
1591
  name: string;
@@ -1661,6 +1688,10 @@ declare global {
1661
1688
  [k: string]: unknown;
1662
1689
  }
1663
1690
  }
1691
+ /**
1692
+ * The `OrganizationMembership` object is the model around an organization membership entity and describes the relationship between users and organizations.
1693
+ * @interface
1694
+ */
1664
1695
  interface OrganizationMembershipResource extends ClerkResource {
1665
1696
  id: string;
1666
1697
  organization: OrganizationResource;
@@ -1672,6 +1703,9 @@ interface OrganizationMembershipResource extends ClerkResource {
1672
1703
  updatedAt: Date;
1673
1704
  destroy: () => Promise<OrganizationMembershipResource>;
1674
1705
  update: (updateParams: UpdateOrganizationMembershipParams) => Promise<OrganizationMembershipResource>;
1706
+ /**
1707
+ * @internal
1708
+ */
1675
1709
  __internal_toSnapshot: () => OrganizationMembershipJSONSnapshot;
1676
1710
  }
1677
1711
  type OrganizationCustomPermissionKey = ClerkAuthorization extends Placeholder ? ClerkAuthorization['permission'] extends string ? ClerkAuthorization['permission'] : Base['permission'] : Base['permission'];
@@ -3016,12 +3050,16 @@ interface __experimental_CommerceCheckoutJSON extends ClerkResourceJSON {
3016
3050
  }
3017
3051
 
3018
3052
  interface __experimental_CommerceSettingsJSON extends ClerkResourceJSON {
3019
- enabled: boolean;
3020
- stripe_publishable_key: string;
3053
+ billing: {
3054
+ enabled: boolean;
3055
+ stripe_publishable_key: string;
3056
+ };
3021
3057
  }
3022
3058
  interface __experimental_CommerceSettingsResource extends ClerkResource {
3023
- enabled: boolean;
3024
- stripePublishableKey: string;
3059
+ billing: {
3060
+ enabled: boolean;
3061
+ stripePublishableKey: string;
3062
+ };
3025
3063
  __internal_toSnapshot: () => __experimental_CommerceSettingsJSONSnapshot;
3026
3064
  }
3027
3065
 
@@ -3861,7 +3899,6 @@ interface ClientResource extends ClerkResource {
3861
3899
  signIn: SignInResource;
3862
3900
  isNew: () => boolean;
3863
3901
  create: () => Promise<ClientResource>;
3864
- sendCaptchaToken: (params: unknown) => Promise<ClientResource>;
3865
3902
  destroy: () => Promise<void>;
3866
3903
  removeSessions: () => Promise<ClientResource>;
3867
3904
  clearCache: () => void;
@@ -3874,6 +3911,7 @@ interface ClientResource extends ClerkResource {
3874
3911
  cookieExpiresAt: Date | null;
3875
3912
  createdAt: Date | null;
3876
3913
  updatedAt: Date | null;
3914
+ __internal_sendCaptchaToken: (params: unknown) => Promise<ClientResource>;
3877
3915
  __internal_toSnapshot: () => ClientJSONSnapshot;
3878
3916
  /**
3879
3917
  * @deprecated Use `signedInSessions` instead
@@ -5515,11 +5553,11 @@ type ClerkOptionsNavigation = {
5515
5553
  };
5516
5554
  type ClerkOptions = PendingSessionOptions & ClerkOptionsNavigation & SignInForceRedirectUrl & SignInFallbackRedirectUrl & SignUpForceRedirectUrl & SignUpFallbackRedirectUrl & LegacyRedirectProps & AfterSignOutUrl & AfterMultiSessionSingleSignOutUrl & {
5517
5555
  /**
5518
- * Optional object to style your components. Will only affect [Clerk Components](https://clerk.com/docs/components/overview) and not [Account Portal](https://clerk.com/docs/customization/account-portal/overview) pages.
5556
+ * Optional object to style your components. Will only affect [Clerk Components](https://clerk.com/docs/components/overview) and not [Account Portal](https://clerk.com/docs/account-portal/overview) pages.
5519
5557
  */
5520
5558
  appearance?: Appearance;
5521
5559
  /**
5522
- * Optional object to localize your components. Will only affect [Clerk Components](https://clerk.com/docs/components/overview) and not [Account Portal](https://clerk.com/docs/customization/account-portal/overview) pages.
5560
+ * Optional object to localize your components. Will only affect [Clerk Components](https://clerk.com/docs/components/overview) and not [Account Portal](https://clerk.com/docs/account-portal/overview) pages.
5523
5561
  */
5524
5562
  localization?: LocalizationResource;
5525
5563
  polling?: boolean;
@@ -5532,7 +5570,7 @@ type ClerkOptions = PendingSessionOptions & ClerkOptionsNavigation & SignInForce
5532
5570
  */
5533
5571
  standardBrowser?: boolean;
5534
5572
  /**
5535
- * Optional support email for display in authentication screens. Will only affect [Clerk Components](https://clerk.com/docs/components/overview) and not [Account Portal](https://clerk.com/docs/customization/account-portal/overview) pages.
5573
+ * Optional support email for display in authentication screens. Will only affect [Clerk Components](https://clerk.com/docs/components/overview) and not [Account Portal](https://clerk.com/docs/account-portal/overview) pages.
5536
5574
  */
5537
5575
  supportEmail?: string;
5538
5576
  /**
@@ -6228,7 +6266,6 @@ type CreateBulkOrganizationInvitationParams = {
6228
6266
  role: OrganizationCustomRoleKey;
6229
6267
  };
6230
6268
  /**
6231
- * Parameters for the `createOrganization()` method.
6232
6269
  * @interface
6233
6270
  */
6234
6271
  interface CreateOrganizationParams {
@@ -6314,11 +6351,7 @@ type CheckAuthorizationWithoutOrgOrUser = (params: Parameters<CheckAuthorization
6314
6351
  /**
6315
6352
  * @inline
6316
6353
  */
6317
- type UseAuthReturn =
6318
- /**
6319
- * During initialization
6320
- */
6321
- {
6354
+ type UseAuthReturn = {
6322
6355
  /**
6323
6356
  * A boolean that indicates whether Clerk has completed initialization. Initially `false`, becomes `true` once Clerk loads.
6324
6357
  */
@@ -6367,11 +6400,7 @@ type UseAuthReturn =
6367
6400
  * A function that retrieves the current user's session token or a custom JWT template. Returns a promise that resolves to the token. See the [reference doc](https://clerk.com/docs/references/javascript/session#get-token).
6368
6401
  */
6369
6402
  getToken: GetToken;
6370
- }
6371
- /**
6372
- * When signed out
6373
- */
6374
- | {
6403
+ } | {
6375
6404
  isLoaded: true;
6376
6405
  isSignedIn: false;
6377
6406
  userId: null;
@@ -6384,11 +6413,7 @@ type UseAuthReturn =
6384
6413
  has: CheckAuthorizationWithoutOrgOrUser;
6385
6414
  signOut: SignOut;
6386
6415
  getToken: GetToken;
6387
- }
6388
- /**
6389
- * When signed in (no active organization)
6390
- */
6391
- | {
6416
+ } | {
6392
6417
  isLoaded: true;
6393
6418
  isSignedIn: true;
6394
6419
  userId: string;
@@ -6401,11 +6426,7 @@ type UseAuthReturn =
6401
6426
  has: CheckAuthorizationWithCustomPermissions;
6402
6427
  signOut: SignOut;
6403
6428
  getToken: GetToken;
6404
- }
6405
- /**
6406
- * When signed in (with active organization)
6407
- */
6408
- | {
6429
+ } | {
6409
6430
  isLoaded: true;
6410
6431
  isSignedIn: true;
6411
6432
  userId: string;
package/dist/index.d.ts CHANGED
@@ -469,6 +469,10 @@ type OrganizationDomainVerificationStatus = 'unverified' | 'verified';
469
469
  * @inline
470
470
  */
471
471
  type OrganizationEnrollmentMode = 'manual_invitation' | 'automatic_invitation' | 'automatic_suggestion';
472
+ /**
473
+ * The `OrganizationDomain` object is the model around an organization domain.
474
+ * @interface
475
+ */
472
476
  interface OrganizationDomainResource extends ClerkResource {
473
477
  id: string;
474
478
  name: string;
@@ -508,6 +512,10 @@ declare global {
508
512
  [k: string]: unknown;
509
513
  }
510
514
  }
515
+ /**
516
+ * The `OrganizationInvitation` object is the model around an organization invitation.
517
+ * @interface
518
+ */
511
519
  interface OrganizationInvitationResource extends ClerkResource {
512
520
  id: string;
513
521
  emailAddress: string;
@@ -997,6 +1005,10 @@ interface ImageResource extends ClerkResource {
997
1005
  * @inline
998
1006
  */
999
1007
  type OrganizationSuggestionStatus = 'pending' | 'accepted';
1008
+ /**
1009
+ * An interface representing an organization suggestion.
1010
+ * @interface
1011
+ */
1000
1012
  interface OrganizationSuggestionResource extends ClerkResource {
1001
1013
  id: string;
1002
1014
  publicOrganizationData: {
@@ -1090,6 +1102,10 @@ declare global {
1090
1102
  [k: string]: unknown;
1091
1103
  }
1092
1104
  }
1105
+ /**
1106
+ * The `OrganizationInvitation` object is the model around an organization invitation.
1107
+ * @interface
1108
+ */
1093
1109
  interface UserOrganizationInvitationResource extends ClerkResource {
1094
1110
  id: string;
1095
1111
  emailAddress: string;
@@ -1510,6 +1526,10 @@ type SessionVerifyAttemptFirstFactorParams = EmailCodeAttempt | PhoneCodeAttempt
1510
1526
  type SessionVerifyPrepareSecondFactorParams = PhoneCodeSecondFactorConfig;
1511
1527
  type SessionVerifyAttemptSecondFactorParams = PhoneCodeAttempt | TOTPAttempt | BackupCodeAttempt;
1512
1528
 
1529
+ /**
1530
+ * The `OrganizationMembershipRequest` object is the model that describes the request of a user to join an organization.
1531
+ * @interface
1532
+ */
1513
1533
  interface OrganizationMembershipRequestResource extends ClerkResource {
1514
1534
  id: string;
1515
1535
  organizationId: string;
@@ -1559,6 +1579,13 @@ declare global {
1559
1579
  [k: string]: unknown;
1560
1580
  }
1561
1581
  }
1582
+ /**
1583
+ * The `Organization` object holds information about an organization, as well as methods for managing it.
1584
+ *
1585
+ * To use these methods, you must have the **Organizations** feature [enabled in your app's settings in the Clerk Dashboard](https://clerk.com/docs/organizations/overview#enable-organizations-in-your-application).
1586
+ *
1587
+ * @interface
1588
+ */
1562
1589
  interface OrganizationResource extends ClerkResource {
1563
1590
  id: string;
1564
1591
  name: string;
@@ -1661,6 +1688,10 @@ declare global {
1661
1688
  [k: string]: unknown;
1662
1689
  }
1663
1690
  }
1691
+ /**
1692
+ * The `OrganizationMembership` object is the model around an organization membership entity and describes the relationship between users and organizations.
1693
+ * @interface
1694
+ */
1664
1695
  interface OrganizationMembershipResource extends ClerkResource {
1665
1696
  id: string;
1666
1697
  organization: OrganizationResource;
@@ -1672,6 +1703,9 @@ interface OrganizationMembershipResource extends ClerkResource {
1672
1703
  updatedAt: Date;
1673
1704
  destroy: () => Promise<OrganizationMembershipResource>;
1674
1705
  update: (updateParams: UpdateOrganizationMembershipParams) => Promise<OrganizationMembershipResource>;
1706
+ /**
1707
+ * @internal
1708
+ */
1675
1709
  __internal_toSnapshot: () => OrganizationMembershipJSONSnapshot;
1676
1710
  }
1677
1711
  type OrganizationCustomPermissionKey = ClerkAuthorization extends Placeholder ? ClerkAuthorization['permission'] extends string ? ClerkAuthorization['permission'] : Base['permission'] : Base['permission'];
@@ -3016,12 +3050,16 @@ interface __experimental_CommerceCheckoutJSON extends ClerkResourceJSON {
3016
3050
  }
3017
3051
 
3018
3052
  interface __experimental_CommerceSettingsJSON extends ClerkResourceJSON {
3019
- enabled: boolean;
3020
- stripe_publishable_key: string;
3053
+ billing: {
3054
+ enabled: boolean;
3055
+ stripe_publishable_key: string;
3056
+ };
3021
3057
  }
3022
3058
  interface __experimental_CommerceSettingsResource extends ClerkResource {
3023
- enabled: boolean;
3024
- stripePublishableKey: string;
3059
+ billing: {
3060
+ enabled: boolean;
3061
+ stripePublishableKey: string;
3062
+ };
3025
3063
  __internal_toSnapshot: () => __experimental_CommerceSettingsJSONSnapshot;
3026
3064
  }
3027
3065
 
@@ -3861,7 +3899,6 @@ interface ClientResource extends ClerkResource {
3861
3899
  signIn: SignInResource;
3862
3900
  isNew: () => boolean;
3863
3901
  create: () => Promise<ClientResource>;
3864
- sendCaptchaToken: (params: unknown) => Promise<ClientResource>;
3865
3902
  destroy: () => Promise<void>;
3866
3903
  removeSessions: () => Promise<ClientResource>;
3867
3904
  clearCache: () => void;
@@ -3874,6 +3911,7 @@ interface ClientResource extends ClerkResource {
3874
3911
  cookieExpiresAt: Date | null;
3875
3912
  createdAt: Date | null;
3876
3913
  updatedAt: Date | null;
3914
+ __internal_sendCaptchaToken: (params: unknown) => Promise<ClientResource>;
3877
3915
  __internal_toSnapshot: () => ClientJSONSnapshot;
3878
3916
  /**
3879
3917
  * @deprecated Use `signedInSessions` instead
@@ -5515,11 +5553,11 @@ type ClerkOptionsNavigation = {
5515
5553
  };
5516
5554
  type ClerkOptions = PendingSessionOptions & ClerkOptionsNavigation & SignInForceRedirectUrl & SignInFallbackRedirectUrl & SignUpForceRedirectUrl & SignUpFallbackRedirectUrl & LegacyRedirectProps & AfterSignOutUrl & AfterMultiSessionSingleSignOutUrl & {
5517
5555
  /**
5518
- * Optional object to style your components. Will only affect [Clerk Components](https://clerk.com/docs/components/overview) and not [Account Portal](https://clerk.com/docs/customization/account-portal/overview) pages.
5556
+ * Optional object to style your components. Will only affect [Clerk Components](https://clerk.com/docs/components/overview) and not [Account Portal](https://clerk.com/docs/account-portal/overview) pages.
5519
5557
  */
5520
5558
  appearance?: Appearance;
5521
5559
  /**
5522
- * Optional object to localize your components. Will only affect [Clerk Components](https://clerk.com/docs/components/overview) and not [Account Portal](https://clerk.com/docs/customization/account-portal/overview) pages.
5560
+ * Optional object to localize your components. Will only affect [Clerk Components](https://clerk.com/docs/components/overview) and not [Account Portal](https://clerk.com/docs/account-portal/overview) pages.
5523
5561
  */
5524
5562
  localization?: LocalizationResource;
5525
5563
  polling?: boolean;
@@ -5532,7 +5570,7 @@ type ClerkOptions = PendingSessionOptions & ClerkOptionsNavigation & SignInForce
5532
5570
  */
5533
5571
  standardBrowser?: boolean;
5534
5572
  /**
5535
- * Optional support email for display in authentication screens. Will only affect [Clerk Components](https://clerk.com/docs/components/overview) and not [Account Portal](https://clerk.com/docs/customization/account-portal/overview) pages.
5573
+ * Optional support email for display in authentication screens. Will only affect [Clerk Components](https://clerk.com/docs/components/overview) and not [Account Portal](https://clerk.com/docs/account-portal/overview) pages.
5536
5574
  */
5537
5575
  supportEmail?: string;
5538
5576
  /**
@@ -6228,7 +6266,6 @@ type CreateBulkOrganizationInvitationParams = {
6228
6266
  role: OrganizationCustomRoleKey;
6229
6267
  };
6230
6268
  /**
6231
- * Parameters for the `createOrganization()` method.
6232
6269
  * @interface
6233
6270
  */
6234
6271
  interface CreateOrganizationParams {
@@ -6314,11 +6351,7 @@ type CheckAuthorizationWithoutOrgOrUser = (params: Parameters<CheckAuthorization
6314
6351
  /**
6315
6352
  * @inline
6316
6353
  */
6317
- type UseAuthReturn =
6318
- /**
6319
- * During initialization
6320
- */
6321
- {
6354
+ type UseAuthReturn = {
6322
6355
  /**
6323
6356
  * A boolean that indicates whether Clerk has completed initialization. Initially `false`, becomes `true` once Clerk loads.
6324
6357
  */
@@ -6367,11 +6400,7 @@ type UseAuthReturn =
6367
6400
  * A function that retrieves the current user's session token or a custom JWT template. Returns a promise that resolves to the token. See the [reference doc](https://clerk.com/docs/references/javascript/session#get-token).
6368
6401
  */
6369
6402
  getToken: GetToken;
6370
- }
6371
- /**
6372
- * When signed out
6373
- */
6374
- | {
6403
+ } | {
6375
6404
  isLoaded: true;
6376
6405
  isSignedIn: false;
6377
6406
  userId: null;
@@ -6384,11 +6413,7 @@ type UseAuthReturn =
6384
6413
  has: CheckAuthorizationWithoutOrgOrUser;
6385
6414
  signOut: SignOut;
6386
6415
  getToken: GetToken;
6387
- }
6388
- /**
6389
- * When signed in (no active organization)
6390
- */
6391
- | {
6416
+ } | {
6392
6417
  isLoaded: true;
6393
6418
  isSignedIn: true;
6394
6419
  userId: string;
@@ -6401,11 +6426,7 @@ type UseAuthReturn =
6401
6426
  has: CheckAuthorizationWithCustomPermissions;
6402
6427
  signOut: SignOut;
6403
6428
  getToken: GetToken;
6404
- }
6405
- /**
6406
- * When signed in (with active organization)
6407
- */
6408
- | {
6429
+ } | {
6409
6430
  isLoaded: true;
6410
6431
  isSignedIn: true;
6411
6432
  userId: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clerk/types",
3
- "version": "4.54.0-snapshot.v20250414153812",
3
+ "version": "4.54.0",
4
4
  "description": "Typings for Clerk libraries.",
5
5
  "keywords": [
6
6
  "clerk",