@clerk/shared 4.0.0-snapshot.v20251204175016 → 4.0.0-snapshot.v20251211120550
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/runtime/alternativePhoneCode.d.mts +1 -1
- package/dist/runtime/alternativePhoneCode.d.ts +1 -1
- package/dist/runtime/apiUrlFromPublishableKey.d.mts +1 -1
- package/dist/runtime/apiUrlFromPublishableKey.d.ts +1 -1
- package/dist/runtime/authorization-errors.d.mts +1 -1
- package/dist/runtime/authorization-errors.d.ts +1 -1
- package/dist/runtime/authorization.d.mts +1 -1
- package/dist/runtime/authorization.d.ts +1 -1
- package/dist/runtime/clerkEventBus.d.mts +1 -1
- package/dist/runtime/clerkEventBus.d.ts +1 -1
- package/dist/runtime/color.d.mts +1 -1
- package/dist/runtime/color.d.ts +1 -1
- package/dist/runtime/color.d.ts.map +1 -1
- package/dist/runtime/deriveState.d.mts +1 -1
- package/dist/runtime/deriveState.d.ts +1 -1
- package/dist/runtime/{error-D6MGXq-n.mjs → error--xlRIO4Z.mjs} +42 -2
- package/dist/runtime/error--xlRIO4Z.mjs.map +1 -0
- package/dist/runtime/{error-KRW-ECGa.d.mts → error-Bar-OO4s.d.mts} +40 -3
- package/dist/runtime/error-Bar-OO4s.d.mts.map +1 -0
- package/dist/runtime/{error-C4TyorFL.js → error-CJmIhSJi.js} +47 -1
- package/dist/runtime/error-CJmIhSJi.js.map +1 -0
- package/dist/runtime/{error-CwbYlf2s.d.ts → error-Du4UdKtF.d.ts} +40 -3
- package/dist/runtime/error-Du4UdKtF.d.ts.map +1 -0
- package/dist/runtime/error.d.mts +3 -3
- package/dist/runtime/error.d.ts +3 -3
- package/dist/runtime/error.js +2 -1
- package/dist/runtime/error.mjs +2 -2
- package/dist/runtime/{index-ChHWjn_I.d.mts → index-CPEYkfCA.d.mts} +162 -136
- package/dist/runtime/{index-ChHWjn_I.d.mts.map → index-CPEYkfCA.d.mts.map} +1 -1
- package/dist/runtime/{index-046BvqQ_.d.ts → index-D42gIYCP.d.ts} +162 -136
- package/dist/runtime/{index-046BvqQ_.d.ts.map → index-D42gIYCP.d.ts.map} +1 -1
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/index.mjs.map +1 -1
- package/dist/runtime/internal/clerk-js/completeSignUpFlow.d.mts +1 -1
- package/dist/runtime/internal/clerk-js/completeSignUpFlow.d.ts +1 -1
- package/dist/runtime/internal/clerk-js/componentGuards.d.mts +1 -1
- package/dist/runtime/internal/clerk-js/componentGuards.d.ts +1 -1
- package/dist/runtime/internal/clerk-js/injectedWeb3Providers.d.mts +1 -1
- package/dist/runtime/internal/clerk-js/injectedWeb3Providers.d.ts +1 -1
- package/dist/runtime/internal/clerk-js/organization.d.mts +1 -1
- package/dist/runtime/internal/clerk-js/organization.d.ts +1 -1
- package/dist/runtime/internal/clerk-js/organization.js +1 -1
- package/dist/runtime/internal/clerk-js/organization.js.map +1 -1
- package/dist/runtime/internal/clerk-js/organization.mjs +1 -1
- package/dist/runtime/internal/clerk-js/organization.mjs.map +1 -1
- package/dist/runtime/internal/clerk-js/passkeys.d.mts +2 -2
- package/dist/runtime/internal/clerk-js/passkeys.d.ts +2 -2
- package/dist/runtime/internal/clerk-js/passkeys.js +1 -1
- package/dist/runtime/internal/clerk-js/passkeys.mjs +1 -1
- package/dist/runtime/internal/clerk-js/passwords/complexity.d.mts +1 -1
- package/dist/runtime/internal/clerk-js/passwords/complexity.d.ts +1 -1
- package/dist/runtime/internal/clerk-js/passwords/loadZxcvbn.d.mts +1 -1
- package/dist/runtime/internal/clerk-js/passwords/loadZxcvbn.d.ts +1 -1
- package/dist/runtime/internal/clerk-js/passwords/password.d.mts +1 -1
- package/dist/runtime/internal/clerk-js/passwords/password.d.ts +1 -1
- package/dist/runtime/internal/clerk-js/passwords/strength.d.mts +1 -1
- package/dist/runtime/internal/clerk-js/passwords/strength.d.ts +1 -1
- package/dist/runtime/internal/clerk-js/queryParams.d.mts +2 -2
- package/dist/runtime/internal/clerk-js/queryParams.d.ts +2 -2
- package/dist/runtime/internal/clerk-js/redirectUrls.d.mts +1 -1
- package/dist/runtime/internal/clerk-js/redirectUrls.d.ts +1 -1
- package/dist/runtime/internal/clerk-js/sessionTasks.d.mts +2 -2
- package/dist/runtime/internal/clerk-js/sessionTasks.d.ts +2 -2
- package/dist/runtime/internal/clerk-js/url.d.mts +2 -2
- package/dist/runtime/internal/clerk-js/url.d.ts +2 -2
- package/dist/runtime/internal/clerk-js/user.d.mts +1 -1
- package/dist/runtime/internal/clerk-js/user.d.ts +1 -1
- package/dist/runtime/internal/clerk-js/web3.d.mts +1 -1
- package/dist/runtime/internal/clerk-js/web3.d.ts +1 -1
- package/dist/runtime/jwtPayloadParser.d.mts +1 -1
- package/dist/runtime/jwtPayloadParser.d.ts +1 -1
- package/dist/runtime/keys.d.mts +1 -1
- package/dist/runtime/keys.d.ts +1 -1
- package/dist/runtime/loadClerkJsScript.d.mts +1 -1
- package/dist/runtime/loadClerkJsScript.d.mts.map +1 -1
- package/dist/runtime/loadClerkJsScript.d.ts +1 -1
- package/dist/runtime/loadClerkJsScript.d.ts.map +1 -1
- package/dist/runtime/loadClerkJsScript.js +50 -9
- package/dist/runtime/loadClerkJsScript.js.map +1 -1
- package/dist/runtime/loadClerkJsScript.mjs +50 -9
- package/dist/runtime/loadClerkJsScript.mjs.map +1 -1
- package/dist/runtime/{loadScript-DDWWb733.mjs → loadScript-CHWOPTAN.mjs} +1 -3
- package/dist/runtime/loadScript-CHWOPTAN.mjs.map +1 -0
- package/dist/runtime/{loadScript-B8aSacwz.js → loadScript-CW1MV2O0.js} +1 -3
- package/dist/runtime/loadScript-CW1MV2O0.js.map +1 -0
- package/dist/runtime/loadScript.js +1 -1
- package/dist/runtime/loadScript.mjs +1 -1
- package/dist/runtime/oauth.d.mts +1 -1
- package/dist/runtime/oauth.d.ts +1 -1
- package/dist/runtime/{organization-BzYWUtt4.js → organization-BOnxJJGM.js} +5 -6
- package/dist/runtime/organization-BOnxJJGM.js.map +1 -0
- package/dist/runtime/{organization-JwY1zGRo.mjs → organization-CDNOZNzF.mjs} +5 -6
- package/dist/runtime/organization-CDNOZNzF.mjs.map +1 -0
- package/dist/runtime/organization.d.mts +5 -6
- package/dist/runtime/organization.d.mts.map +1 -1
- package/dist/runtime/organization.d.ts +5 -6
- package/dist/runtime/organization.d.ts.map +1 -1
- package/dist/runtime/organization.js +1 -1
- package/dist/runtime/organization.mjs +1 -1
- package/dist/runtime/pathMatcher.d.mts +1 -1
- package/dist/runtime/pathMatcher.d.ts +1 -1
- package/dist/runtime/poller.d.ts.map +1 -1
- package/dist/runtime/react/index.d.mts +23 -23
- package/dist/runtime/react/index.d.ts +23 -23
- package/dist/runtime/react/index.js +7 -7
- package/dist/runtime/react/index.js.map +1 -1
- package/dist/runtime/react/index.mjs +7 -7
- package/dist/runtime/react/index.mjs.map +1 -1
- package/dist/runtime/router.d.mts +1 -1
- package/dist/runtime/router.d.ts +1 -1
- package/dist/runtime/saml.d.mts +1 -1
- package/dist/runtime/saml.d.ts +1 -1
- package/dist/runtime/telemetry.d.mts +1 -1
- package/dist/runtime/telemetry.d.ts +1 -1
- package/dist/runtime/types/index.d.mts +1 -1
- package/dist/runtime/types/index.d.ts +1 -1
- package/dist/runtime/ui/index.d.mts +1 -1
- package/dist/runtime/ui/index.d.ts +1 -1
- package/dist/runtime/{url-2Vs8oqh-.d.ts → url-B0fryQyT.d.ts} +2 -2
- package/dist/runtime/{url-2Vs8oqh-.d.ts.map → url-B0fryQyT.d.ts.map} +1 -1
- package/dist/runtime/{url-Btmcqq0T.d.mts → url-BXe3Tvsn.d.mts} +2 -2
- package/dist/runtime/{url-Btmcqq0T.d.mts.map → url-BXe3Tvsn.d.mts.map} +1 -1
- package/dist/runtime/{versionSelector-CgdnX7F8.js → versionSelector-BMFwS2IR.js} +3 -3
- package/dist/runtime/{versionSelector-CgdnX7F8.js.map → versionSelector-BMFwS2IR.js.map} +1 -1
- package/dist/runtime/{versionSelector-C99RARtR.mjs → versionSelector-v6LvGO6I.mjs} +3 -3
- package/dist/runtime/{versionSelector-C99RARtR.mjs.map → versionSelector-v6LvGO6I.mjs.map} +1 -1
- package/dist/runtime/versionSelector.js +1 -1
- package/dist/runtime/versionSelector.mjs +1 -1
- package/dist/runtime/web3.d.mts +1 -1
- package/dist/runtime/web3.d.ts +1 -1
- package/dist/types/index.d.mts +161 -135
- package/dist/types/index.d.mts.map +1 -1
- package/dist/types/index.d.ts +161 -135
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +11 -11
- package/dist/runtime/error-C4TyorFL.js.map +0 -1
- package/dist/runtime/error-CwbYlf2s.d.ts.map +0 -1
- package/dist/runtime/error-D6MGXq-n.mjs.map +0 -1
- package/dist/runtime/error-KRW-ECGa.d.mts.map +0 -1
- package/dist/runtime/loadScript-B8aSacwz.js.map +0 -1
- package/dist/runtime/loadScript-DDWWb733.mjs.map +0 -1
- package/dist/runtime/organization-BzYWUtt4.js.map +0 -1
- package/dist/runtime/organization-JwY1zGRo.mjs.map +0 -1
package/dist/types/index.d.mts
CHANGED
|
@@ -338,7 +338,7 @@ type ForceNull<T$1> = { [K in keyof T$1]: null };
|
|
|
338
338
|
//#region src/types/billing.d.ts
|
|
339
339
|
type WithOptionalOrgType<T$1> = T$1 & {
|
|
340
340
|
/**
|
|
341
|
-
* The
|
|
341
|
+
* The Organization ID to perform the request on.
|
|
342
342
|
*/
|
|
343
343
|
orgId?: string;
|
|
344
344
|
};
|
|
@@ -406,7 +406,7 @@ type ForPayerType = 'organization' | 'user';
|
|
|
406
406
|
*/
|
|
407
407
|
type BillingSubscriptionStatus = 'active' | 'ended' | 'upcoming' | 'past_due';
|
|
408
408
|
/**
|
|
409
|
-
* The billing period for the
|
|
409
|
+
* The billing period for the Plan.
|
|
410
410
|
*
|
|
411
411
|
* @inline
|
|
412
412
|
*/
|
|
@@ -433,107 +433,107 @@ interface BillingPayerMethods {
|
|
|
433
433
|
*/
|
|
434
434
|
type GetPlansParams = ClerkPaginationParams<{
|
|
435
435
|
/**
|
|
436
|
-
* The type of payer for the
|
|
436
|
+
* The type of payer for the Plans.
|
|
437
437
|
*/
|
|
438
438
|
for?: ForPayerType;
|
|
439
439
|
}>;
|
|
440
440
|
/**
|
|
441
|
-
* The `BillingPlanResource` type represents a
|
|
441
|
+
* The `BillingPlanResource` type represents a Subscription Plan with its details.
|
|
442
442
|
*
|
|
443
443
|
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to [pin](https://clerk.com/docs/pinning) the SDK version and the clerk-js version to avoid breaking changes.
|
|
444
444
|
*/
|
|
445
445
|
interface BillingPlanResource extends ClerkResource {
|
|
446
446
|
/**
|
|
447
|
-
* The unique identifier for the
|
|
447
|
+
* The unique identifier for the Plan.
|
|
448
448
|
*/
|
|
449
449
|
id: string;
|
|
450
450
|
/**
|
|
451
|
-
* The name of the
|
|
451
|
+
* The name of the Plan.
|
|
452
452
|
*/
|
|
453
453
|
name: string;
|
|
454
454
|
/**
|
|
455
|
-
* The monthly price of the
|
|
455
|
+
* The monthly price of the Plan.
|
|
456
456
|
*/
|
|
457
457
|
fee: BillingMoneyAmount;
|
|
458
458
|
/**
|
|
459
|
-
* The annual price of the
|
|
459
|
+
* The annual price of the Plan or `null` if the Plan is not annual.
|
|
460
460
|
*/
|
|
461
461
|
annualFee: BillingMoneyAmount | null;
|
|
462
462
|
/**
|
|
463
|
-
* The effective monthly price when billed annually or `null` if the
|
|
463
|
+
* The effective monthly price when billed annually or `null` if the Plan is not annual.
|
|
464
464
|
*/
|
|
465
465
|
annualMonthlyFee: BillingMoneyAmount | null;
|
|
466
466
|
/**
|
|
467
|
-
* A short description of what the
|
|
467
|
+
* A short description of what the Plan offers, or `null` if no description is provided.
|
|
468
468
|
*/
|
|
469
469
|
description: string | null;
|
|
470
470
|
/**
|
|
471
|
-
* Whether the
|
|
471
|
+
* Whether the Plan is the default Plan.
|
|
472
472
|
*/
|
|
473
473
|
isDefault: boolean;
|
|
474
474
|
/**
|
|
475
|
-
* Whether the
|
|
475
|
+
* Whether the Plan is recurring.
|
|
476
476
|
*/
|
|
477
477
|
isRecurring: boolean;
|
|
478
478
|
/**
|
|
479
|
-
* Whether the
|
|
479
|
+
* Whether the Plan has a base fee.
|
|
480
480
|
*/
|
|
481
481
|
hasBaseFee: boolean;
|
|
482
482
|
/**
|
|
483
|
-
* Specifies the subscriber type this
|
|
483
|
+
* Specifies the subscriber type this Plan is designed for.
|
|
484
484
|
*
|
|
485
|
-
* Each
|
|
485
|
+
* Each Plan is exclusively created for either individual users or Organizations, and cannot be used interchangeably.
|
|
486
486
|
*/
|
|
487
487
|
forPayerType: BillingPayerResourceType;
|
|
488
488
|
/**
|
|
489
|
-
* Whether the
|
|
489
|
+
* Whether the Plan is visible to the public.
|
|
490
490
|
*/
|
|
491
491
|
publiclyVisible: boolean;
|
|
492
492
|
/**
|
|
493
|
-
* The URL-friendly identifier of the
|
|
493
|
+
* The URL-friendly identifier of the Plan.
|
|
494
494
|
*/
|
|
495
495
|
slug: string;
|
|
496
496
|
/**
|
|
497
|
-
* The URL of the
|
|
497
|
+
* The URL of the Plan's avatar image, or `null` if not set.
|
|
498
498
|
*/
|
|
499
499
|
avatarUrl: string | null;
|
|
500
500
|
/**
|
|
501
|
-
* The
|
|
501
|
+
* The Features the Plan offers.
|
|
502
502
|
*/
|
|
503
503
|
features: FeatureResource[];
|
|
504
504
|
/**
|
|
505
|
-
* The number of days of the free trial for the
|
|
505
|
+
* The number of days of the free trial for the Plan. `null` if the Plan does not have a free trial.
|
|
506
506
|
*/
|
|
507
507
|
freeTrialDays: number | null;
|
|
508
508
|
/**
|
|
509
|
-
* Whether the
|
|
509
|
+
* Whether the Plan has a free trial.
|
|
510
510
|
*/
|
|
511
511
|
freeTrialEnabled: boolean;
|
|
512
512
|
}
|
|
513
513
|
/**
|
|
514
|
-
* The `FeatureResource` type represents a
|
|
514
|
+
* The `FeatureResource` type represents a Feature of a Plan.
|
|
515
515
|
*
|
|
516
516
|
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to [pin](https://clerk.com/docs/pinning) the SDK version and the clerk-js version to avoid breaking changes.
|
|
517
517
|
*/
|
|
518
518
|
interface FeatureResource extends ClerkResource {
|
|
519
519
|
/**
|
|
520
|
-
* The unique identifier for the
|
|
520
|
+
* The unique identifier for the Feature.
|
|
521
521
|
*/
|
|
522
522
|
id: string;
|
|
523
523
|
/**
|
|
524
|
-
* The display name of the
|
|
524
|
+
* The display name of the Feature.
|
|
525
525
|
*/
|
|
526
526
|
name: string;
|
|
527
527
|
/**
|
|
528
|
-
* A short description of what the
|
|
528
|
+
* A short description of what the Feature provides, or `null` if not provided.
|
|
529
529
|
*/
|
|
530
530
|
description: string | null;
|
|
531
531
|
/**
|
|
532
|
-
* A unique, URL-friendly identifier for the
|
|
532
|
+
* A unique, URL-friendly identifier for the Feature.
|
|
533
533
|
*/
|
|
534
534
|
slug: string;
|
|
535
535
|
/**
|
|
536
|
-
* The URL of the
|
|
536
|
+
* The URL of the Feature's avatar image, or `null` if not set.
|
|
537
537
|
*/
|
|
538
538
|
avatarUrl: string | null;
|
|
539
539
|
}
|
|
@@ -640,7 +640,7 @@ interface BillingPaymentMethodResource extends ClerkResource {
|
|
|
640
640
|
/**
|
|
641
641
|
* A function that removes this payment method from the account. Accepts the following parameters:
|
|
642
642
|
* <ul>
|
|
643
|
-
* <li>`orgId?` (`string`): The ID of the
|
|
643
|
+
* <li>`orgId?` (`string`): The ID of the Organization to remove the payment method from.</li>
|
|
644
644
|
* </ul>
|
|
645
645
|
*
|
|
646
646
|
* @param params - The parameters for the remove operation.
|
|
@@ -650,7 +650,7 @@ interface BillingPaymentMethodResource extends ClerkResource {
|
|
|
650
650
|
/**
|
|
651
651
|
* A function that sets this payment method as the default for the account. Accepts the following parameters:
|
|
652
652
|
* <ul>
|
|
653
|
-
* <li>`orgId?` (`string`): The ID of the
|
|
653
|
+
* <li>`orgId?` (`string`): The ID of the Organization to set as the default.</li>
|
|
654
654
|
* </ul>
|
|
655
655
|
*
|
|
656
656
|
* @param params - The parameters for the make default operation.
|
|
@@ -688,7 +688,7 @@ type BillingPaymentChargeType = 'checkout' | 'recurring';
|
|
|
688
688
|
*/
|
|
689
689
|
type BillingPaymentStatus = 'pending' | 'paid' | 'failed';
|
|
690
690
|
/**
|
|
691
|
-
* The `BillingPaymentResource` type represents a payment attempt for a user or
|
|
691
|
+
* The `BillingPaymentResource` type represents a payment attempt for a user or Organization.
|
|
692
692
|
*
|
|
693
693
|
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to [pin](https://clerk.com/docs/pinning) the SDK version and the clerk-js version to avoid breaking changes.
|
|
694
694
|
*/
|
|
@@ -745,7 +745,7 @@ type GetStatementsParams = WithOptionalOrgType<ClerkPaginationParams>;
|
|
|
745
745
|
*/
|
|
746
746
|
type BillingStatementStatus = 'open' | 'closed';
|
|
747
747
|
/**
|
|
748
|
-
* The `BillingStatementResource` type represents a billing statement for a user or
|
|
748
|
+
* The `BillingStatementResource` type represents a billing statement for a user or Organization.
|
|
749
749
|
*
|
|
750
750
|
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to [pin](https://clerk.com/docs/pinning) the SDK version and the clerk-js version to avoid breaking changes.
|
|
751
751
|
*/
|
|
@@ -807,7 +807,7 @@ interface BillingSubscriptionItemResource extends ClerkResource {
|
|
|
807
807
|
*/
|
|
808
808
|
id: string;
|
|
809
809
|
/**
|
|
810
|
-
* The
|
|
810
|
+
* The Plan associated with the subscription item.
|
|
811
811
|
*/
|
|
812
812
|
plan: BillingPlanResource;
|
|
813
813
|
/**
|
|
@@ -854,7 +854,7 @@ interface BillingSubscriptionItemResource extends ClerkResource {
|
|
|
854
854
|
/**
|
|
855
855
|
* A function to cancel the subscription item. Accepts the following parameters:
|
|
856
856
|
* <ul>
|
|
857
|
-
* <li>`orgId?` (`string`): The ID of the
|
|
857
|
+
* <li>`orgId?` (`string`): The ID of the Organization to cancel the subscription item from.</li>
|
|
858
858
|
* </ul>
|
|
859
859
|
*
|
|
860
860
|
* @param params - The parameters for the cancel operation.
|
|
@@ -948,7 +948,7 @@ interface BillingMoneyAmount {
|
|
|
948
948
|
*/
|
|
949
949
|
interface BillingCheckoutTotals {
|
|
950
950
|
/**
|
|
951
|
-
* The price of the items or
|
|
951
|
+
* The price of the items or Plan before taxes, credits, or discounts are applied.
|
|
952
952
|
*/
|
|
953
953
|
subtotal: BillingMoneyAmount;
|
|
954
954
|
/**
|
|
@@ -983,7 +983,7 @@ interface BillingCheckoutTotals {
|
|
|
983
983
|
*/
|
|
984
984
|
interface BillingStatementTotals {
|
|
985
985
|
/**
|
|
986
|
-
* The price of the items or
|
|
986
|
+
* The price of the items or Plan before taxes, credits, or discounts are applied.
|
|
987
987
|
*/
|
|
988
988
|
subtotal: BillingMoneyAmount;
|
|
989
989
|
/**
|
|
@@ -1002,11 +1002,11 @@ interface BillingStatementTotals {
|
|
|
1002
1002
|
*/
|
|
1003
1003
|
type CreateCheckoutParams = WithOptionalOrgType<{
|
|
1004
1004
|
/**
|
|
1005
|
-
* The unique identifier for the
|
|
1005
|
+
* The unique identifier for the Plan.
|
|
1006
1006
|
*/
|
|
1007
1007
|
planId: string;
|
|
1008
1008
|
/**
|
|
1009
|
-
* The billing period for the
|
|
1009
|
+
* The billing period for the Plan.
|
|
1010
1010
|
*/
|
|
1011
1011
|
planPeriod: BillingSubscriptionPlanPeriod;
|
|
1012
1012
|
}>;
|
|
@@ -1065,15 +1065,15 @@ interface BillingCheckoutResource extends ClerkResource {
|
|
|
1065
1065
|
*/
|
|
1066
1066
|
paymentMethod?: BillingPaymentMethodResource;
|
|
1067
1067
|
/**
|
|
1068
|
-
* The
|
|
1068
|
+
* The Subscription Plan details for the checkout.
|
|
1069
1069
|
*/
|
|
1070
1070
|
plan: BillingPlanResource;
|
|
1071
1071
|
/**
|
|
1072
|
-
* The billing period for the
|
|
1072
|
+
* The billing period for the Plan.
|
|
1073
1073
|
*/
|
|
1074
1074
|
planPeriod: BillingSubscriptionPlanPeriod;
|
|
1075
1075
|
/**
|
|
1076
|
-
* The start date of the
|
|
1076
|
+
* The start date of the Plan period, represented as a Unix timestamp.
|
|
1077
1077
|
*/
|
|
1078
1078
|
planPeriodStart?: number;
|
|
1079
1079
|
/**
|
|
@@ -1089,7 +1089,7 @@ interface BillingCheckoutResource extends ClerkResource {
|
|
|
1089
1089
|
*/
|
|
1090
1090
|
confirm: (params: ConfirmCheckoutParams) => Promise<BillingCheckoutResource>;
|
|
1091
1091
|
/**
|
|
1092
|
-
* Whether the
|
|
1092
|
+
* Whether the Plan change will take effect immediately after checkout.
|
|
1093
1093
|
*/
|
|
1094
1094
|
isImmediatePlanChange: boolean;
|
|
1095
1095
|
/**
|
|
@@ -1144,11 +1144,11 @@ interface BillingPayerResource extends ClerkResource {
|
|
|
1144
1144
|
*/
|
|
1145
1145
|
lastName?: string | null;
|
|
1146
1146
|
/**
|
|
1147
|
-
* The unique identifier for the
|
|
1147
|
+
* The unique identifier for the Organization that the payer belongs to.
|
|
1148
1148
|
*/
|
|
1149
1149
|
organizationId: string | null;
|
|
1150
1150
|
/**
|
|
1151
|
-
* The name of the
|
|
1151
|
+
* The name of the Organization that the payer belongs to.
|
|
1152
1152
|
*/
|
|
1153
1153
|
organizationName?: string | null;
|
|
1154
1154
|
}
|
|
@@ -2867,7 +2867,7 @@ declare global {
|
|
|
2867
2867
|
/**
|
|
2868
2868
|
* If you want to provide custom types for the organizationInvitation.publicMetadata
|
|
2869
2869
|
* object, simply redeclare this rule in the global namespace.
|
|
2870
|
-
* Every
|
|
2870
|
+
* Every OrganizationInvitation object will use the provided type.
|
|
2871
2871
|
*/
|
|
2872
2872
|
interface OrganizationInvitationPublicMetadata {
|
|
2873
2873
|
[k: string]: unknown;
|
|
@@ -2877,7 +2877,7 @@ declare global {
|
|
|
2877
2877
|
}
|
|
2878
2878
|
}
|
|
2879
2879
|
/**
|
|
2880
|
-
* The `OrganizationInvitation` object is the model around an
|
|
2880
|
+
* The `OrganizationInvitation` object is the model around an Organization invitation.
|
|
2881
2881
|
*
|
|
2882
2882
|
* @interface
|
|
2883
2883
|
*/
|
|
@@ -3011,15 +3011,15 @@ interface ClerkJWTClaims {
|
|
|
3011
3011
|
*/
|
|
3012
3012
|
act?: ActClaim;
|
|
3013
3013
|
/**
|
|
3014
|
-
* Active
|
|
3014
|
+
* Active Organization ID.
|
|
3015
3015
|
*/
|
|
3016
3016
|
org_id?: string;
|
|
3017
3017
|
/**
|
|
3018
|
-
* Active
|
|
3018
|
+
* Active Organization Slug.
|
|
3019
3019
|
*/
|
|
3020
3020
|
org_slug?: string;
|
|
3021
3021
|
/**
|
|
3022
|
-
* Active
|
|
3022
|
+
* Active Organization Role.
|
|
3023
3023
|
*/
|
|
3024
3024
|
org_role?: OrganizationCustomRoleKey;
|
|
3025
3025
|
/**
|
|
@@ -3393,19 +3393,19 @@ type WithReverification<T$1> = T$1 & {
|
|
|
3393
3393
|
};
|
|
3394
3394
|
type CheckAuthorizationParamsWithCustomPermissions = WithReverification<{
|
|
3395
3395
|
/**
|
|
3396
|
-
* The [
|
|
3396
|
+
* The [Role](https://clerk.com/docs/guides/organizations/control-access/roles-and-permissions) to check for.
|
|
3397
3397
|
*/
|
|
3398
3398
|
role: OrganizationCustomRoleKey;
|
|
3399
3399
|
/**
|
|
3400
|
-
* The [
|
|
3400
|
+
* The [Permission](https://clerk.com/docs/guides/organizations/control-access/roles-and-permissions) to check for.
|
|
3401
3401
|
*/
|
|
3402
3402
|
permission?: never;
|
|
3403
3403
|
/**
|
|
3404
|
-
* The [
|
|
3404
|
+
* The [Feature](https://clerk.com/docs/guides/billing/overview) to check for.
|
|
3405
3405
|
*/
|
|
3406
3406
|
feature?: never;
|
|
3407
3407
|
/**
|
|
3408
|
-
* The [
|
|
3408
|
+
* The [Plan](https://clerk.com/docs/guides/billing/overview) to check for.
|
|
3409
3409
|
*/
|
|
3410
3410
|
plan?: never;
|
|
3411
3411
|
} | {
|
|
@@ -3432,19 +3432,19 @@ type CheckAuthorizationParamsWithCustomPermissions = WithReverification<{
|
|
|
3432
3432
|
type CheckAuthorization = CheckAuthorizationFn<CheckAuthorizationParams>;
|
|
3433
3433
|
type CheckAuthorizationParams = WithReverification<{
|
|
3434
3434
|
/**
|
|
3435
|
-
* The [
|
|
3435
|
+
* The [Role](https://clerk.com/docs/guides/organizations/control-access/roles-and-permissions) to check for.
|
|
3436
3436
|
*/
|
|
3437
3437
|
role: OrganizationCustomRoleKey;
|
|
3438
3438
|
/**
|
|
3439
|
-
* The [
|
|
3439
|
+
* The [Permission](https://clerk.com/docs/guides/organizations/control-access/roles-and-permissions) to check for.
|
|
3440
3440
|
*/
|
|
3441
3441
|
permission?: never;
|
|
3442
3442
|
/**
|
|
3443
|
-
* The [
|
|
3443
|
+
* The [Feature](https://clerk.com/docs/guides/billing/overview) to check for.
|
|
3444
3444
|
*/
|
|
3445
3445
|
feature?: never;
|
|
3446
3446
|
/**
|
|
3447
|
-
* The [
|
|
3447
|
+
* The [Plan](https://clerk.com/docs/guides/billing/overview) to check for.
|
|
3448
3448
|
*/
|
|
3449
3449
|
plan?: never;
|
|
3450
3450
|
} | {
|
|
@@ -3470,7 +3470,7 @@ type CheckAuthorizationParams = WithReverification<{
|
|
|
3470
3470
|
}>;
|
|
3471
3471
|
/**
|
|
3472
3472
|
* Type guard for server-side authorization checks using session claims.
|
|
3473
|
-
* System
|
|
3473
|
+
* System Permissions are not allowed since they are not included
|
|
3474
3474
|
* in session claims and cannot be verified on the server side.
|
|
3475
3475
|
*/
|
|
3476
3476
|
type CheckAuthorizationFromSessionClaims = <P extends OrganizationCustomPermissionKey>(isAuthorizedParams: CheckAuthorizationParamsFromSessionClaims<P>) => boolean;
|
|
@@ -3479,19 +3479,19 @@ type CheckAuthorizationFromSessionClaims = <P extends OrganizationCustomPermissi
|
|
|
3479
3479
|
*/
|
|
3480
3480
|
type CheckAuthorizationParamsFromSessionClaims<P$1 extends OrganizationCustomPermissionKey> = WithReverification<{
|
|
3481
3481
|
/**
|
|
3482
|
-
* The [
|
|
3482
|
+
* The [Role](https://clerk.com/docs/guides/organizations/control-access/roles-and-permissions) to check for.
|
|
3483
3483
|
*/
|
|
3484
3484
|
role: OrganizationCustomRoleKey;
|
|
3485
3485
|
/**
|
|
3486
|
-
* The [
|
|
3486
|
+
* The [Permission](https://clerk.com/docs/guides/organizations/control-access/roles-and-permissions) to check for.
|
|
3487
3487
|
*/
|
|
3488
3488
|
permission?: never;
|
|
3489
3489
|
/**
|
|
3490
|
-
* The [
|
|
3490
|
+
* The [Feature](https://clerk.com/docs/guides/billing/overview) to check for.
|
|
3491
3491
|
*/
|
|
3492
3492
|
feature?: never;
|
|
3493
3493
|
/**
|
|
3494
|
-
* The [
|
|
3494
|
+
* The [Plan](https://clerk.com/docs/guides/billing/overview) to check for.
|
|
3495
3495
|
*/
|
|
3496
3496
|
plan?: never;
|
|
3497
3497
|
} | {
|
|
@@ -3698,7 +3698,7 @@ declare global {
|
|
|
3698
3698
|
/**
|
|
3699
3699
|
* If you want to provide custom types for the organization.publicMetadata object,
|
|
3700
3700
|
* simply redeclare this rule in the global namespace.
|
|
3701
|
-
* Every
|
|
3701
|
+
* Every Organization object will use the provided type.
|
|
3702
3702
|
*/
|
|
3703
3703
|
interface OrganizationPublicMetadata {
|
|
3704
3704
|
[k: string]: unknown;
|
|
@@ -3706,16 +3706,16 @@ declare global {
|
|
|
3706
3706
|
/**
|
|
3707
3707
|
* If you want to provide custom types for the organization.privateMetadata object,
|
|
3708
3708
|
* simply redeclare this rule in the global namespace.
|
|
3709
|
-
* Every
|
|
3709
|
+
* Every Organization object will use the provided type.
|
|
3710
3710
|
*/
|
|
3711
3711
|
interface OrganizationPrivateMetadata {
|
|
3712
3712
|
[k: string]: unknown;
|
|
3713
3713
|
}
|
|
3714
3714
|
}
|
|
3715
3715
|
/**
|
|
3716
|
-
* The `Organization` object holds information about an
|
|
3716
|
+
* The `Organization` object holds information about an Organization, as well as methods for managing it.
|
|
3717
3717
|
*
|
|
3718
|
-
* To use these methods, you must have the **Organizations** feature [enabled in your app's settings in the Clerk Dashboard](https://clerk.com/docs/guides/organizations/
|
|
3718
|
+
* To use these methods, you must have the **Organizations** feature [enabled in your app's settings in the Clerk Dashboard](https://clerk.com/docs/guides/organizations/configure#enable-organizations).
|
|
3719
3719
|
*
|
|
3720
3720
|
* @interface
|
|
3721
3721
|
*/
|
|
@@ -3808,7 +3808,7 @@ declare global {
|
|
|
3808
3808
|
/**
|
|
3809
3809
|
* If you want to provide custom types for the organizationMembership.publicMetadata
|
|
3810
3810
|
* object, simply redeclare this rule in the global namespace.
|
|
3811
|
-
* Every
|
|
3811
|
+
* Every OrganizationMembership object will use the provided type.
|
|
3812
3812
|
*/
|
|
3813
3813
|
interface OrganizationMembershipPublicMetadata {
|
|
3814
3814
|
[k: string]: unknown;
|
|
@@ -3816,7 +3816,7 @@ declare global {
|
|
|
3816
3816
|
/**
|
|
3817
3817
|
* If you want to provide custom types for the organizationMembership.publicMetadata
|
|
3818
3818
|
* object, simply redeclare this rule in the global namespace.
|
|
3819
|
-
* Every
|
|
3819
|
+
* Every OrganizationMembership object will use the provided type.
|
|
3820
3820
|
*/
|
|
3821
3821
|
interface OrganizationMembershipPrivateMetadata {
|
|
3822
3822
|
[k: string]: unknown;
|
|
@@ -3846,9 +3846,9 @@ interface OrganizationMembershipResource extends ClerkResource {
|
|
|
3846
3846
|
}
|
|
3847
3847
|
type OrganizationCustomPermissionKey = ClerkAuthorization extends Placeholder ? ClerkAuthorization['permission'] extends string ? ClerkAuthorization['permission'] : Base['permission'] : Base['permission'];
|
|
3848
3848
|
/**
|
|
3849
|
-
* `OrganizationCustomRoleKey` is a type that represents the user's
|
|
3849
|
+
* `OrganizationCustomRoleKey` is a type that represents the user's Role in an Organization. It will be string unless the developer has provided their own types through [`ClerkAuthorization`](https://clerk.com/docs/guides/development/override-clerk-types-interfaces#example-custom-roles-and-permissions).
|
|
3850
3850
|
*
|
|
3851
|
-
* Clerk provides the [default
|
|
3851
|
+
* Clerk provides the [default Roles](https://clerk.com/docs/guides/organizations/control-access/roles-and-permissions#default-roles) `org:admin` and `org:member`. However, you can create [Custom Roles](https://clerk.com/docs/guides/organizations/control-access/roles-and-permissions#custom-roles) as well.
|
|
3852
3852
|
*
|
|
3853
3853
|
* @interface
|
|
3854
3854
|
*/
|
|
@@ -3856,8 +3856,8 @@ type OrganizationCustomRoleKey = ClerkAuthorization extends Placeholder ? ClerkA
|
|
|
3856
3856
|
type OrganizationSystemPermissionPrefix = 'org:sys_';
|
|
3857
3857
|
type OrganizationSystemPermissionKey = `${OrganizationSystemPermissionPrefix}domains:manage` | `${OrganizationSystemPermissionPrefix}profile:manage` | `${OrganizationSystemPermissionPrefix}profile:delete` | `${OrganizationSystemPermissionPrefix}memberships:read` | `${OrganizationSystemPermissionPrefix}memberships:manage` | `${OrganizationSystemPermissionPrefix}domains:read`;
|
|
3858
3858
|
/**
|
|
3859
|
-
* OrganizationPermissionKey is a combination of
|
|
3860
|
-
* System
|
|
3859
|
+
* OrganizationPermissionKey is a combination of System and Custom Permissions.
|
|
3860
|
+
* System Permissions are only accessible from FAPI and client-side operations/utils
|
|
3861
3861
|
*/
|
|
3862
3862
|
type OrganizationPermissionKey = ClerkAuthorization extends Placeholder ? ClerkAuthorization['permission'] extends string ? ClerkAuthorization['permission'] | OrganizationSystemPermissionKey : Autocomplete<OrganizationSystemPermissionKey> : Autocomplete<OrganizationSystemPermissionKey>;
|
|
3863
3863
|
type UpdateOrganizationMembershipParams = {
|
|
@@ -3953,19 +3953,19 @@ type VersionedJwtPayload = {
|
|
|
3953
3953
|
v?: undefined;
|
|
3954
3954
|
/**
|
|
3955
3955
|
*
|
|
3956
|
-
* Active
|
|
3956
|
+
* Active Organization Permissions.
|
|
3957
3957
|
*/
|
|
3958
3958
|
org_permissions?: OrganizationCustomPermissionKey[];
|
|
3959
3959
|
/**
|
|
3960
|
-
* Active
|
|
3960
|
+
* Active Organization ID.
|
|
3961
3961
|
*/
|
|
3962
3962
|
org_id?: string;
|
|
3963
3963
|
/**
|
|
3964
|
-
* Active
|
|
3964
|
+
* Active Organization slug.
|
|
3965
3965
|
*/
|
|
3966
3966
|
org_slug?: string;
|
|
3967
3967
|
/**
|
|
3968
|
-
* Active
|
|
3968
|
+
* Active Organization Role.
|
|
3969
3969
|
*/
|
|
3970
3970
|
org_role?: OrganizationCustomRoleKey;
|
|
3971
3971
|
} | {
|
|
@@ -3984,25 +3984,25 @@ type VersionedJwtPayload = {
|
|
|
3984
3984
|
*/
|
|
3985
3985
|
pla?: string;
|
|
3986
3986
|
/**
|
|
3987
|
-
* Active
|
|
3987
|
+
* Active Organization information.
|
|
3988
3988
|
*
|
|
3989
3989
|
* @experimental This structure is subject to change.
|
|
3990
3990
|
*/
|
|
3991
3991
|
o?: {
|
|
3992
3992
|
/**
|
|
3993
|
-
* Active
|
|
3993
|
+
* Active Organization ID.
|
|
3994
3994
|
*/
|
|
3995
3995
|
id: string;
|
|
3996
3996
|
/**
|
|
3997
|
-
* Active
|
|
3997
|
+
* Active Organization slug.
|
|
3998
3998
|
*/
|
|
3999
3999
|
slg?: string;
|
|
4000
4000
|
/**
|
|
4001
|
-
* Active
|
|
4001
|
+
* Active Organization role.
|
|
4002
4002
|
*/
|
|
4003
4003
|
rol?: OrganizationCustomRoleKey;
|
|
4004
4004
|
/**
|
|
4005
|
-
* Active
|
|
4005
|
+
* Active Organization permissions.
|
|
4006
4006
|
*/
|
|
4007
4007
|
per?: string;
|
|
4008
4008
|
/**
|
|
@@ -5473,7 +5473,7 @@ type __internal_LocalizationResource = {
|
|
|
5473
5473
|
locale: string;
|
|
5474
5474
|
maintenanceMode: LocalizationValue;
|
|
5475
5475
|
/**
|
|
5476
|
-
* Add
|
|
5476
|
+
* Add Role keys and their localized values, e.g. `roles: { 'org:teacher': 'Teacher'}`.
|
|
5477
5477
|
*
|
|
5478
5478
|
* @experimental
|
|
5479
5479
|
*/
|
|
@@ -6697,6 +6697,7 @@ type __internal_LocalizationResource = {
|
|
|
6697
6697
|
};
|
|
6698
6698
|
taskResetPassword: {
|
|
6699
6699
|
title: LocalizationValue;
|
|
6700
|
+
subtitle: LocalizationValue;
|
|
6700
6701
|
signOut: {
|
|
6701
6702
|
actionLink: LocalizationValue;
|
|
6702
6703
|
actionText: LocalizationValue<'identifier'>;
|
|
@@ -6706,6 +6707,8 @@ type __internal_LocalizationResource = {
|
|
|
6706
6707
|
};
|
|
6707
6708
|
type WithParamName<T$1> = T$1 & Partial<Record<`${keyof T$1 & string}__${CamelToSnake<Exclude<FieldId, 'role'>>}`, LocalizationValue>>;
|
|
6708
6709
|
type UnstableErrors = WithParamName<{
|
|
6710
|
+
avatar_file_type_invalid: LocalizationValue;
|
|
6711
|
+
avatar_file_size_exceeded: LocalizationValue;
|
|
6709
6712
|
external_account_not_found: LocalizationValue;
|
|
6710
6713
|
identification_deletion_failed: LocalizationValue;
|
|
6711
6714
|
phone_number_exists: LocalizationValue;
|
|
@@ -6720,6 +6723,7 @@ type UnstableErrors = WithParamName<{
|
|
|
6720
6723
|
web3_missing_identifier: LocalizationValue;
|
|
6721
6724
|
form_password_pwned: LocalizationValue;
|
|
6722
6725
|
form_password_pwned__sign_in: LocalizationValue;
|
|
6726
|
+
form_new_password_matches_current: LocalizationValue;
|
|
6723
6727
|
/** @deprecated Use `form_password_compromised__sign_in` instead */
|
|
6724
6728
|
form_password_untrusted__sign_in: LocalizationValue;
|
|
6725
6729
|
form_password_compromised__sign_in: LocalizationValue;
|
|
@@ -7496,14 +7500,14 @@ interface Clerk {
|
|
|
7496
7500
|
*/
|
|
7497
7501
|
unmountUserProfile: (targetNode: HTMLDivElement) => void;
|
|
7498
7502
|
/**
|
|
7499
|
-
* Mount an
|
|
7503
|
+
* Mount an Organization profile component at the target element.
|
|
7500
7504
|
*
|
|
7501
7505
|
* @param targetNode - Target to mount the OrganizationProfile component.
|
|
7502
7506
|
* @param props - Configuration parameters.
|
|
7503
7507
|
*/
|
|
7504
7508
|
mountOrganizationProfile: (targetNode: HTMLDivElement, props?: OrganizationProfileProps) => void;
|
|
7505
7509
|
/**
|
|
7506
|
-
* Unmount the
|
|
7510
|
+
* Unmount the Organization profile component from the target node.
|
|
7507
7511
|
*
|
|
7508
7512
|
* @param targetNode - Target node to unmount the OrganizationProfile component from.
|
|
7509
7513
|
*/
|
|
@@ -7522,20 +7526,20 @@ interface Clerk {
|
|
|
7522
7526
|
*/
|
|
7523
7527
|
unmountCreateOrganization: (targetNode: HTMLDivElement) => void;
|
|
7524
7528
|
/**
|
|
7525
|
-
* Mount an
|
|
7529
|
+
* Mount an Organization switcher component at the target element.
|
|
7526
7530
|
*
|
|
7527
7531
|
* @param targetNode - Target to mount the OrganizationSwitcher component.
|
|
7528
7532
|
* @param props - Configuration parameters.
|
|
7529
7533
|
*/
|
|
7530
7534
|
mountOrganizationSwitcher: (targetNode: HTMLDivElement, props?: OrganizationSwitcherProps) => void;
|
|
7531
7535
|
/**
|
|
7532
|
-
* Unmount the
|
|
7536
|
+
* Unmount the Organization switcher component from the target node.*
|
|
7533
7537
|
*
|
|
7534
7538
|
* @param targetNode - Target node to unmount the OrganizationSwitcher component from.
|
|
7535
7539
|
*/
|
|
7536
7540
|
unmountOrganizationSwitcher: (targetNode: HTMLDivElement) => void;
|
|
7537
7541
|
/**
|
|
7538
|
-
* Prefetches the data displayed by an
|
|
7542
|
+
* Prefetches the data displayed by an Organization switcher.
|
|
7539
7543
|
* It can be used when `mountOrganizationSwitcher({ asStandalone: true})`, to avoid unwanted loading states.
|
|
7540
7544
|
*
|
|
7541
7545
|
* @experimental This experimental API is subject to change.
|
|
@@ -7544,14 +7548,14 @@ interface Clerk {
|
|
|
7544
7548
|
*/
|
|
7545
7549
|
__experimental_prefetchOrganizationSwitcher: () => void;
|
|
7546
7550
|
/**
|
|
7547
|
-
* Mount an
|
|
7551
|
+
* Mount an Organization list component at the target element.
|
|
7548
7552
|
*
|
|
7549
7553
|
* @param targetNode - Target to mount the OrganizationList component.
|
|
7550
7554
|
* @param props - Configuration parameters.
|
|
7551
7555
|
*/
|
|
7552
7556
|
mountOrganizationList: (targetNode: HTMLDivElement, props?: OrganizationListProps) => void;
|
|
7553
7557
|
/**
|
|
7554
|
-
* Unmount the
|
|
7558
|
+
* Unmount the Organization list component from the target node.*
|
|
7555
7559
|
*
|
|
7556
7560
|
* @param targetNode - Target node to unmount the OrganizationList component from.
|
|
7557
7561
|
*/
|
|
@@ -7632,6 +7636,20 @@ interface Clerk {
|
|
|
7632
7636
|
* @param targetNode - Target node to unmount the TaskChooseOrganization component from.
|
|
7633
7637
|
*/
|
|
7634
7638
|
unmountTaskChooseOrganization: (targetNode: HTMLDivElement) => void;
|
|
7639
|
+
/**
|
|
7640
|
+
* Mounts a TaskResetPassword component at the target element.
|
|
7641
|
+
*
|
|
7642
|
+
* @param targetNode - Target node to mount the TaskResetPassword component.
|
|
7643
|
+
* @param props - configuration parameters.
|
|
7644
|
+
*/
|
|
7645
|
+
mountTaskResetPassword: (targetNode: HTMLDivElement, props?: TaskResetPasswordProps) => void;
|
|
7646
|
+
/**
|
|
7647
|
+
* Unmount a TaskResetPassword component from the target element.
|
|
7648
|
+
* If there is no component mounted at the target node, results in a noop.
|
|
7649
|
+
*
|
|
7650
|
+
* @param targetNode - Target node to unmount the TaskResetPassword component from.
|
|
7651
|
+
*/
|
|
7652
|
+
unmountTaskResetPassword: (targetNode: HTMLDivElement) => void;
|
|
7635
7653
|
/**
|
|
7636
7654
|
* @internal
|
|
7637
7655
|
* Loads Stripe libraries for commerce functionality
|
|
@@ -7674,7 +7692,7 @@ interface Clerk {
|
|
|
7674
7692
|
*/
|
|
7675
7693
|
__internal_addNavigationListener: (callback: () => void) => UnsubscribeCallback;
|
|
7676
7694
|
/**
|
|
7677
|
-
* Set the active session and
|
|
7695
|
+
* Set the active session and Organization explicitly.
|
|
7678
7696
|
*
|
|
7679
7697
|
* If the session param is `null`, the active session is deleted.
|
|
7680
7698
|
* In a similar fashion, if the organization param is `null`, the current organization is removed as active.
|
|
@@ -7844,11 +7862,11 @@ interface Clerk {
|
|
|
7844
7862
|
*/
|
|
7845
7863
|
authenticateWithGoogleOneTap: (params: AuthenticateWithGoogleOneTapParams) => Promise<SignInResource | SignUpResource>;
|
|
7846
7864
|
/**
|
|
7847
|
-
* Creates an
|
|
7865
|
+
* Creates an Organization, adding the current user as admin.
|
|
7848
7866
|
*/
|
|
7849
7867
|
createOrganization: (params: CreateOrganizationParams) => Promise<OrganizationResource>;
|
|
7850
7868
|
/**
|
|
7851
|
-
* Retrieves a single
|
|
7869
|
+
* Retrieves a single Organization by ID.
|
|
7852
7870
|
*/
|
|
7853
7871
|
getOrganization: (organizationId: string) => Promise<OrganizationResource>;
|
|
7854
7872
|
/**
|
|
@@ -7877,6 +7895,13 @@ interface Clerk {
|
|
|
7877
7895
|
* initiated outside of the Clerk class.
|
|
7878
7896
|
*/
|
|
7879
7897
|
__internal_setActiveInProgress: boolean;
|
|
7898
|
+
/**
|
|
7899
|
+
* Retrieves the session token from the browser cookie.
|
|
7900
|
+
* This is useful as a fallback when the in-memory lastActiveToken is not available.
|
|
7901
|
+
*
|
|
7902
|
+
* @internal
|
|
7903
|
+
*/
|
|
7904
|
+
__internal_getSessionCookie?: () => string | undefined;
|
|
7880
7905
|
/**
|
|
7881
7906
|
* API Keys Object
|
|
7882
7907
|
*
|
|
@@ -7965,7 +7990,7 @@ type ClerkOptions = ClerkOptionsNavigation & SignInForceRedirectUrl & SignInFall
|
|
|
7965
7990
|
*/
|
|
7966
7991
|
appearance?: any;
|
|
7967
7992
|
/**
|
|
7968
|
-
* Optional object to localize your components. Will only affect [Clerk Components](https://clerk.com/docs/reference/components/overview) and not [Account Portal](https://clerk.com/docs/guides/
|
|
7993
|
+
* Optional object to localize your components. Will only affect [Clerk Components](https://clerk.com/docs/reference/components/overview) and not [Account Portal](https://clerk.com/docs/guides/account-portal/overview) pages.
|
|
7969
7994
|
*/
|
|
7970
7995
|
localization?: LocalizationResource;
|
|
7971
7996
|
polling?: boolean;
|
|
@@ -7978,7 +8003,7 @@ type ClerkOptions = ClerkOptionsNavigation & SignInForceRedirectUrl & SignInFall
|
|
|
7978
8003
|
*/
|
|
7979
8004
|
standardBrowser?: boolean;
|
|
7980
8005
|
/**
|
|
7981
|
-
* Optional support email for display in authentication screens. Will only affect [Clerk Components](https://clerk.com/docs/reference/components/overview) and not [Account Portal](https://clerk.com/docs/guides/
|
|
8006
|
+
* Optional support email for display in authentication screens. Will only affect [Clerk Components](https://clerk.com/docs/reference/components/overview) and not [Account Portal](https://clerk.com/docs/guides/account-portal/overview) pages.
|
|
7982
8007
|
*/
|
|
7983
8008
|
supportEmail?: string;
|
|
7984
8009
|
/**
|
|
@@ -8026,7 +8051,7 @@ type ClerkOptions = ClerkOptionsNavigation & SignInForceRedirectUrl & SignInFall
|
|
|
8026
8051
|
*/
|
|
8027
8052
|
sdkMetadata?: SDKMetadata;
|
|
8028
8053
|
/**
|
|
8029
|
-
* The full URL or path to the waitlist page. If `undefined`, will redirect to the [Account Portal waitlist page](https://clerk.com/docs/guides/
|
|
8054
|
+
* The full URL or path to the waitlist page. If `undefined`, will redirect to the [Account Portal waitlist page](https://clerk.com/docs/guides/account-portal/overview#waitlist).
|
|
8030
8055
|
*/
|
|
8031
8056
|
waitlistUrl?: string;
|
|
8032
8057
|
/**
|
|
@@ -8169,7 +8194,7 @@ type SetActiveParams = {
|
|
|
8169
8194
|
*/
|
|
8170
8195
|
session?: SignedInSessionResource | string | null;
|
|
8171
8196
|
/**
|
|
8172
|
-
* The
|
|
8197
|
+
* The Organization resource or Organization ID/slug (string version) to be set as active in the current session. If `null`, the currently Active Organization is removed as active.
|
|
8173
8198
|
*/
|
|
8174
8199
|
organization?: OrganizationResource | string | null;
|
|
8175
8200
|
/**
|
|
@@ -8177,7 +8202,7 @@ type SetActiveParams = {
|
|
|
8177
8202
|
*/
|
|
8178
8203
|
redirectUrl?: string;
|
|
8179
8204
|
/**
|
|
8180
|
-
* A custom navigation function to be called just before the session and/or
|
|
8205
|
+
* A custom navigation function to be called just before the session and/or Organization is set.
|
|
8181
8206
|
*
|
|
8182
8207
|
* When provided, it takes precedence over the `redirectUrl` parameter for navigation.
|
|
8183
8208
|
*
|
|
@@ -8438,7 +8463,7 @@ type UserProfileProps = RoutingOptions & {
|
|
|
8438
8463
|
type UserProfileModalProps = WithoutRouting<UserProfileProps>;
|
|
8439
8464
|
type OrganizationProfileProps = RoutingOptions & {
|
|
8440
8465
|
/**
|
|
8441
|
-
* Full URL or path to navigate to after the user leaves the currently
|
|
8466
|
+
* Full URL or path to navigate to after the user leaves the currently Active Organization.
|
|
8442
8467
|
*
|
|
8443
8468
|
* @default undefined
|
|
8444
8469
|
*/
|
|
@@ -8451,7 +8476,7 @@ type OrganizationProfileProps = RoutingOptions & {
|
|
|
8451
8476
|
appearance?: ClerkAppearanceTheme;
|
|
8452
8477
|
customPages?: CustomPage[];
|
|
8453
8478
|
/**
|
|
8454
|
-
* Specify on which page the
|
|
8479
|
+
* Specify on which page the Organization profile modal will open.
|
|
8455
8480
|
*
|
|
8456
8481
|
* @example __experimental_startPath: '/organization-members'
|
|
8457
8482
|
*
|
|
@@ -8476,13 +8501,13 @@ type OrganizationProfileProps = RoutingOptions & {
|
|
|
8476
8501
|
type OrganizationProfileModalProps = WithoutRouting<OrganizationProfileProps>;
|
|
8477
8502
|
type CreateOrganizationProps = RoutingOptions & {
|
|
8478
8503
|
/**
|
|
8479
|
-
* Full URL or path to navigate to after creating a new
|
|
8504
|
+
* Full URL or path to navigate to after creating a new Organization.
|
|
8480
8505
|
*
|
|
8481
8506
|
* @default undefined
|
|
8482
8507
|
*/
|
|
8483
8508
|
afterCreateOrganizationUrl?: ((organization: OrganizationResource) => string) | LooseExtractedParams<PrimitiveKeys<OrganizationResource>>;
|
|
8484
8509
|
/**
|
|
8485
|
-
* Hides the screen for sending invitations after an
|
|
8510
|
+
* Hides the screen for sending invitations after an Organization is created.
|
|
8486
8511
|
*
|
|
8487
8512
|
* @default undefined When left undefined Clerk will automatically hide the screen if
|
|
8488
8513
|
* the number of max allowed members is equal to 1
|
|
@@ -8580,10 +8605,10 @@ type OrganizationSwitcherProps = CreateOrganizationMode & OrganizationProfileMod
|
|
|
8580
8605
|
*/
|
|
8581
8606
|
__experimental_asStandalone?: boolean | ((opened: boolean) => void);
|
|
8582
8607
|
/**
|
|
8583
|
-
* By default, users can switch between
|
|
8608
|
+
* By default, users can switch between Organization and their personal account.
|
|
8584
8609
|
* This option controls whether OrganizationSwitcher will include the user's personal account
|
|
8585
|
-
* in the
|
|
8586
|
-
* and users will only be able to switch between
|
|
8610
|
+
* in the Organization list. Setting this to `false` will hide the personal account entry,
|
|
8611
|
+
* and users will only be able to switch between Organizations.
|
|
8587
8612
|
*
|
|
8588
8613
|
* @default true
|
|
8589
8614
|
*/
|
|
@@ -8595,7 +8620,7 @@ type OrganizationSwitcherProps = CreateOrganizationMode & OrganizationProfileMod
|
|
|
8595
8620
|
*/
|
|
8596
8621
|
afterCreateOrganizationUrl?: ((organization: OrganizationResource) => string) | LooseExtractedParams<PrimitiveKeys<OrganizationResource>>;
|
|
8597
8622
|
/**
|
|
8598
|
-
* Full URL or path to navigate to after a successful
|
|
8623
|
+
* Full URL or path to navigate to after a successful Organization selection.
|
|
8599
8624
|
* Accepts a function that returns URL or path
|
|
8600
8625
|
*
|
|
8601
8626
|
* @default undefined`
|
|
@@ -8609,13 +8634,13 @@ type OrganizationSwitcherProps = CreateOrganizationMode & OrganizationProfileMod
|
|
|
8609
8634
|
*/
|
|
8610
8635
|
afterSelectPersonalUrl?: ((user: UserResource) => string) | LooseExtractedParams<PrimitiveKeys<UserResource>>;
|
|
8611
8636
|
/**
|
|
8612
|
-
* Full URL or path to navigate to after the user leaves the currently
|
|
8637
|
+
* Full URL or path to navigate to after the user leaves the currently Active Organization.
|
|
8613
8638
|
*
|
|
8614
8639
|
* @default undefined
|
|
8615
8640
|
*/
|
|
8616
8641
|
afterLeaveOrganizationUrl?: string;
|
|
8617
8642
|
/**
|
|
8618
|
-
* Hides the screen for sending invitations after an
|
|
8643
|
+
* Hides the screen for sending invitations after an Organization is created.
|
|
8619
8644
|
*
|
|
8620
8645
|
* @default undefined When left undefined Clerk will automatically hide the screen if
|
|
8621
8646
|
* the number of max allowed members is equal to 1
|
|
@@ -8631,13 +8656,13 @@ type OrganizationSwitcherProps = CreateOrganizationMode & OrganizationProfileMod
|
|
|
8631
8656
|
};
|
|
8632
8657
|
type OrganizationListProps = {
|
|
8633
8658
|
/**
|
|
8634
|
-
* Full URL or path to navigate to after creating a new
|
|
8659
|
+
* Full URL or path to navigate to after creating a new Organization.
|
|
8635
8660
|
*
|
|
8636
8661
|
* @default undefined
|
|
8637
8662
|
*/
|
|
8638
8663
|
afterCreateOrganizationUrl?: ((organization: OrganizationResource) => string) | LooseExtractedParams<PrimitiveKeys<OrganizationResource>>;
|
|
8639
8664
|
/**
|
|
8640
|
-
* Full URL or path to navigate to after a successful
|
|
8665
|
+
* Full URL or path to navigate to after a successful Organization selection.
|
|
8641
8666
|
* Accepts a function that returns URL or path
|
|
8642
8667
|
*
|
|
8643
8668
|
* @default undefined`
|
|
@@ -8650,17 +8675,17 @@ type OrganizationListProps = {
|
|
|
8650
8675
|
*/
|
|
8651
8676
|
appearance?: ClerkAppearanceTheme;
|
|
8652
8677
|
/**
|
|
8653
|
-
* Hides the screen for sending invitations after an
|
|
8678
|
+
* Hides the screen for sending invitations after an Organization is created.
|
|
8654
8679
|
*
|
|
8655
8680
|
* @default undefined When left undefined Clerk will automatically hide the screen if
|
|
8656
8681
|
* the number of max allowed members is equal to 1
|
|
8657
8682
|
*/
|
|
8658
8683
|
skipInvitationScreen?: boolean;
|
|
8659
8684
|
/**
|
|
8660
|
-
* By default, users can switch between
|
|
8685
|
+
* By default, users can switch between Organization and their personal account.
|
|
8661
8686
|
* This option controls whether OrganizationList will include the user's personal account
|
|
8662
|
-
* in the
|
|
8663
|
-
* and users will only be able to switch between
|
|
8687
|
+
* in the Organization list. Setting this to `false` will hide the personal account entry,
|
|
8688
|
+
* and users will only be able to switch between Organizations.
|
|
8664
8689
|
*
|
|
8665
8690
|
* @default true
|
|
8666
8691
|
*/
|
|
@@ -8698,7 +8723,7 @@ type PricingTableDefaultProps = {
|
|
|
8698
8723
|
*/
|
|
8699
8724
|
ctaPosition?: 'top' | 'bottom';
|
|
8700
8725
|
/**
|
|
8701
|
-
* Whether to collapse
|
|
8726
|
+
* Whether to collapse Features on the pricing table.
|
|
8702
8727
|
*
|
|
8703
8728
|
* @default false
|
|
8704
8729
|
*/
|
|
@@ -8713,7 +8738,7 @@ type PricingTableDefaultProps = {
|
|
|
8713
8738
|
type PricingTableBaseProps = {
|
|
8714
8739
|
/**
|
|
8715
8740
|
* The subscriber type to display plans for.
|
|
8716
|
-
* If `organization`, show
|
|
8741
|
+
* If `organization`, show Plans for the Active Organization; otherwise for the user.
|
|
8717
8742
|
*
|
|
8718
8743
|
* @default 'user'
|
|
8719
8744
|
*/
|
|
@@ -8810,7 +8835,7 @@ type __internal_PlanDetailsProps = ({
|
|
|
8810
8835
|
plan?: never;
|
|
8811
8836
|
} | {
|
|
8812
8837
|
/**
|
|
8813
|
-
* The
|
|
8838
|
+
* The Plan object will be used as initial data until the Plan is fetched from the server.
|
|
8814
8839
|
*/
|
|
8815
8840
|
plan: BillingPlanResource;
|
|
8816
8841
|
planId?: never;
|
|
@@ -8828,7 +8853,7 @@ type __experimental_PlanDetailsButtonProps = ({
|
|
|
8828
8853
|
plan?: never;
|
|
8829
8854
|
} | {
|
|
8830
8855
|
/**
|
|
8831
|
-
* The
|
|
8856
|
+
* The Plan object will be used as initial data until the Plan is fetched from the server.
|
|
8832
8857
|
*/
|
|
8833
8858
|
plan: BillingPlanResource;
|
|
8834
8859
|
planId?: never;
|
|
@@ -8846,7 +8871,7 @@ type __experimental_PlanDetailsButtonProps = ({
|
|
|
8846
8871
|
type __internal_SubscriptionDetailsProps = {
|
|
8847
8872
|
/**
|
|
8848
8873
|
* The subscriber type to display the subscription details for.
|
|
8849
|
-
* If `organization` is provided, the subscription details will be displayed for the
|
|
8874
|
+
* If `organization` is provided, the subscription details will be displayed for the Active Organization.
|
|
8850
8875
|
*
|
|
8851
8876
|
* @default 'user'
|
|
8852
8877
|
*/
|
|
@@ -8862,7 +8887,7 @@ type __internal_SubscriptionDetailsProps = {
|
|
|
8862
8887
|
type __experimental_SubscriptionDetailsButtonProps = {
|
|
8863
8888
|
/**
|
|
8864
8889
|
* The subscriber type to display the subscription details for.
|
|
8865
|
-
* If `organization` is provided, the subscription details will be displayed for the
|
|
8890
|
+
* If `organization` is provided, the subscription details will be displayed for the Active Organization.
|
|
8866
8891
|
*
|
|
8867
8892
|
* @default 'user'
|
|
8868
8893
|
*/
|
|
@@ -8967,11 +8992,11 @@ type CreateBulkOrganizationInvitationParams = {
|
|
|
8967
8992
|
*/
|
|
8968
8993
|
interface CreateOrganizationParams {
|
|
8969
8994
|
/**
|
|
8970
|
-
* The name of the
|
|
8995
|
+
* The name of the Organization.
|
|
8971
8996
|
*/
|
|
8972
8997
|
name: string;
|
|
8973
8998
|
/**
|
|
8974
|
-
* The slug of the
|
|
8999
|
+
* The slug of the Organization.
|
|
8975
9000
|
*/
|
|
8976
9001
|
slug?: string;
|
|
8977
9002
|
}
|
|
@@ -9163,19 +9188,19 @@ type SharedSignedInAuthObjectProperties = {
|
|
|
9163
9188
|
*/
|
|
9164
9189
|
userId: string;
|
|
9165
9190
|
/**
|
|
9166
|
-
* The ID of the user's
|
|
9191
|
+
* The ID of the user's Active Organization.
|
|
9167
9192
|
*/
|
|
9168
9193
|
orgId: string | undefined;
|
|
9169
9194
|
/**
|
|
9170
|
-
* The current user's
|
|
9195
|
+
* The current user's Role in their Active Organization.
|
|
9171
9196
|
*/
|
|
9172
9197
|
orgRole: OrganizationCustomRoleKey | undefined;
|
|
9173
9198
|
/**
|
|
9174
|
-
* The URL-friendly identifier of the user's
|
|
9199
|
+
* The URL-friendly identifier of the user's Active Organization.
|
|
9175
9200
|
*/
|
|
9176
9201
|
orgSlug: string | undefined;
|
|
9177
9202
|
/**
|
|
9178
|
-
* The current user's
|
|
9203
|
+
* The current user's Organization Permissions.
|
|
9179
9204
|
*/
|
|
9180
9205
|
orgPermissions: OrganizationCustomPermissionKey[] | undefined;
|
|
9181
9206
|
/**
|
|
@@ -9212,6 +9237,7 @@ interface EnvironmentResource extends ClerkResource {
|
|
|
9212
9237
|
maintenanceMode: boolean;
|
|
9213
9238
|
clientDebugMode: boolean;
|
|
9214
9239
|
__internal_toSnapshot: () => EnvironmentJSONSnapshot;
|
|
9240
|
+
__internal_enableEnvironmentSetting: (params: EnableEnvironmentSettingParams) => Promise<void>;
|
|
9215
9241
|
}
|
|
9216
9242
|
//#endregion
|
|
9217
9243
|
//#region src/types/hooks.d.ts
|
|
@@ -9252,19 +9278,19 @@ type UseAuthReturn = {
|
|
|
9252
9278
|
*/
|
|
9253
9279
|
actor: undefined;
|
|
9254
9280
|
/**
|
|
9255
|
-
* The ID of the user's active
|
|
9281
|
+
* The ID of the user's active Organization.
|
|
9256
9282
|
*/
|
|
9257
9283
|
orgId: undefined;
|
|
9258
9284
|
/**
|
|
9259
|
-
* The current user's
|
|
9285
|
+
* The current user's Role in their active Organization.
|
|
9260
9286
|
*/
|
|
9261
9287
|
orgRole: undefined;
|
|
9262
9288
|
/**
|
|
9263
|
-
* The URL-friendly identifier of the user's
|
|
9289
|
+
* The URL-friendly identifier of the user's Active Organization.
|
|
9264
9290
|
*/
|
|
9265
9291
|
orgSlug: undefined;
|
|
9266
9292
|
/**
|
|
9267
|
-
* A function that checks if the user has specific
|
|
9293
|
+
* A function that checks if the user has specific Permissions or Roles. See the [reference doc](https://clerk.com/docs/reference/backend/types/auth-object#has).
|
|
9268
9294
|
*/
|
|
9269
9295
|
has: CheckAuthorizationSignedOut;
|
|
9270
9296
|
/**
|
|
@@ -9395,7 +9421,7 @@ type UseSessionListReturn = {
|
|
|
9395
9421
|
*/
|
|
9396
9422
|
sessions: undefined;
|
|
9397
9423
|
/**
|
|
9398
|
-
* A function that sets the active session and/or
|
|
9424
|
+
* A function that sets the active session and/or Organization. See the [reference doc](https://clerk.com/docs/reference/javascript/clerk#set-active).
|
|
9399
9425
|
*/
|
|
9400
9426
|
setActive: undefined;
|
|
9401
9427
|
} | {
|
|
@@ -9439,24 +9465,24 @@ type PublishableKey = {
|
|
|
9439
9465
|
/**
|
|
9440
9466
|
* Props for the `<Protect />` component, which restricts access to its children based on authentication and authorization.
|
|
9441
9467
|
*
|
|
9442
|
-
* Use `ProtectProps` to specify the required
|
|
9468
|
+
* Use `ProtectProps` to specify the required Role, Permission, Feature, or Plan for access.
|
|
9443
9469
|
*
|
|
9444
9470
|
* @example
|
|
9445
9471
|
* ```tsx
|
|
9446
|
-
* // Require a specific
|
|
9472
|
+
* // Require a specific Permission
|
|
9447
9473
|
* <Protect permission="a_permission_key" />
|
|
9448
9474
|
*
|
|
9449
|
-
* // Require a specific
|
|
9475
|
+
* // Require a specific Role
|
|
9450
9476
|
* <Protect role="a_role_key" />
|
|
9451
9477
|
*
|
|
9452
9478
|
* // Use a custom condition callback
|
|
9453
9479
|
* <Protect condition={(has) => has({ permission: "a_permission_key" })} />
|
|
9454
9480
|
*
|
|
9455
|
-
* // Require a specific
|
|
9481
|
+
* // Require a specific Feature
|
|
9456
9482
|
* <Protect feature="a_feature_key" />
|
|
9457
9483
|
*
|
|
9458
|
-
* // Require a specific
|
|
9459
|
-
* <Protect plan=a_plan_key" />
|
|
9484
|
+
* // Require a specific Plan
|
|
9485
|
+
* <Protect plan="a_plan_key" />
|
|
9460
9486
|
* ```
|
|
9461
9487
|
*/
|
|
9462
9488
|
type ProtectProps = {
|