@clerk/shared 4.0.0-snapshot.v20251208202852 → 4.0.0-snapshot.v20251215203425
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/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/deriveState.d.mts +1 -1
- package/dist/runtime/deriveState.d.ts +1 -1
- package/dist/runtime/{error-CWA4ukvl.d.mts → error-Btp0PBNP.d.mts} +2 -2
- package/dist/runtime/{error-CWA4ukvl.d.mts.map → error-Btp0PBNP.d.mts.map} +1 -1
- package/dist/runtime/{error-DSsmf214.d.ts → error-FQfTKcEF.d.ts} +2 -2
- package/dist/runtime/{error-DSsmf214.d.ts.map → error-FQfTKcEF.d.ts.map} +1 -1
- package/dist/runtime/error.d.mts +2 -2
- package/dist/runtime/error.d.ts +2 -2
- package/dist/runtime/globs.d.mts.map +1 -1
- package/dist/runtime/globs.d.ts.map +1 -1
- package/dist/runtime/{index-CBjE4nAT.d.mts → index-6lIp5q8s.d.mts} +195 -143
- package/dist/runtime/index-6lIp5q8s.d.mts.map +1 -0
- package/dist/runtime/{index-eJWs3zJx.d.ts → index-TCL_gZUn.d.ts} +195 -143
- package/dist/runtime/index-TCL_gZUn.d.ts.map +1 -0
- 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/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.ts +1 -1
- package/dist/runtime/loadClerkJsScript.js +2 -2
- package/dist/runtime/loadClerkJsScript.js.map +1 -1
- package/dist/runtime/loadClerkJsScript.mjs +2 -2
- package/dist/runtime/loadClerkJsScript.mjs.map +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/react/index.d.mts +66 -24
- package/dist/runtime/react/index.d.mts.map +1 -1
- package/dist/runtime/react/index.d.ts +66 -24
- package/dist/runtime/react/index.d.ts.map +1 -1
- package/dist/runtime/react/index.js +91 -6
- package/dist/runtime/react/index.js.map +1 -1
- package/dist/runtime/react/index.mjs +90 -7
- package/dist/runtime/react/index.mjs.map +1 -1
- package/dist/runtime/router.d.mts +1 -1
- package/dist/runtime/router.d.mts.map +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-CeALciQG.d.ts → url-8kDLvJOc.d.ts} +2 -2
- package/dist/runtime/{url-CeALciQG.d.ts.map → url-8kDLvJOc.d.ts.map} +1 -1
- package/dist/runtime/{url-BQX5m-Ax.d.mts → url-CixoZcz6.d.mts} +2 -2
- package/dist/runtime/{url-BQX5m-Ax.d.mts.map → url-CixoZcz6.d.mts.map} +1 -1
- package/dist/runtime/{versionSelector-BCQasG48.mjs → versionSelector-CxJwijym.mjs} +3 -3
- package/dist/runtime/{versionSelector-BCQasG48.mjs.map → versionSelector-CxJwijym.mjs.map} +1 -1
- package/dist/runtime/{versionSelector-CwoA_vh7.js → versionSelector-Dk9qBo_s.js} +3 -3
- package/dist/runtime/{versionSelector-CwoA_vh7.js.map → versionSelector-Dk9qBo_s.js.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 +194 -142
- package/dist/types/index.d.mts.map +1 -1
- package/dist/types/index.d.ts +194 -142
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/runtime/index-CBjE4nAT.d.mts.map +0 -1
- package/dist/runtime/index-eJWs3zJx.d.ts.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.ts
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
|
}
|
|
@@ -2114,7 +2114,7 @@ type Web3WalletIdentifier = 'web3_wallet';
|
|
|
2114
2114
|
type EmailAddressOrPhoneNumberIdentifier = 'email_address_or_phone_number';
|
|
2115
2115
|
//#endregion
|
|
2116
2116
|
//#region src/types/signInCommon.d.ts
|
|
2117
|
-
type SignInStatus = 'needs_identifier' | 'needs_first_factor' | 'needs_second_factor' | 'needs_new_password' | 'complete';
|
|
2117
|
+
type SignInStatus = 'needs_identifier' | 'needs_first_factor' | 'needs_second_factor' | 'needs_client_trust' | 'needs_new_password' | 'complete';
|
|
2118
2118
|
type SignInIdentifier = UsernameIdentifier | EmailAddressIdentifier | PhoneNumberIdentifier | Web3WalletIdentifier;
|
|
2119
2119
|
type SignInFirstFactor = EmailCodeFactor | EmailLinkFactor | PhoneCodeFactor | PasswordFactor | PasskeyFactor | ResetPasswordPhoneCodeFactor | ResetPasswordEmailCodeFactor | Web3SignatureFactor | OauthFactor | EnterpriseSSOFactor;
|
|
2120
2120
|
type SignInSecondFactor = PhoneCodeFactor | TOTPFactor | BackupCodeFactor | EmailCodeFactor | EmailLinkFactor;
|
|
@@ -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
|
*/
|
|
@@ -6707,6 +6707,8 @@ type __internal_LocalizationResource = {
|
|
|
6707
6707
|
};
|
|
6708
6708
|
type WithParamName<T$1> = T$1 & Partial<Record<`${keyof T$1 & string}__${CamelToSnake<Exclude<FieldId, 'role'>>}`, LocalizationValue>>;
|
|
6709
6709
|
type UnstableErrors = WithParamName<{
|
|
6710
|
+
avatar_file_type_invalid: LocalizationValue;
|
|
6711
|
+
avatar_file_size_exceeded: LocalizationValue;
|
|
6710
6712
|
external_account_not_found: LocalizationValue;
|
|
6711
6713
|
identification_deletion_failed: LocalizationValue;
|
|
6712
6714
|
phone_number_exists: LocalizationValue;
|
|
@@ -6733,10 +6735,12 @@ type UnstableErrors = WithParamName<{
|
|
|
6733
6735
|
form_param_type_invalid: LocalizationValue;
|
|
6734
6736
|
form_param_type_invalid__phone_number: LocalizationValue;
|
|
6735
6737
|
form_param_type_invalid__email_address: LocalizationValue;
|
|
6738
|
+
form_email_address_blocked: LocalizationValue;
|
|
6736
6739
|
form_password_length_too_short: LocalizationValue;
|
|
6737
6740
|
form_param_nil: LocalizationValue;
|
|
6738
6741
|
form_code_incorrect: LocalizationValue;
|
|
6739
6742
|
form_password_incorrect: LocalizationValue;
|
|
6743
|
+
form_password_or_identifier_incorrect: LocalizationValue;
|
|
6740
6744
|
form_password_validation_failed: LocalizationValue;
|
|
6741
6745
|
not_allowed_access: LocalizationValue;
|
|
6742
6746
|
form_identifier_exists: LocalizationValue;
|
|
@@ -7498,14 +7502,14 @@ interface Clerk {
|
|
|
7498
7502
|
*/
|
|
7499
7503
|
unmountUserProfile: (targetNode: HTMLDivElement) => void;
|
|
7500
7504
|
/**
|
|
7501
|
-
* Mount an
|
|
7505
|
+
* Mount an Organization profile component at the target element.
|
|
7502
7506
|
*
|
|
7503
7507
|
* @param targetNode - Target to mount the OrganizationProfile component.
|
|
7504
7508
|
* @param props - Configuration parameters.
|
|
7505
7509
|
*/
|
|
7506
7510
|
mountOrganizationProfile: (targetNode: HTMLDivElement, props?: OrganizationProfileProps) => void;
|
|
7507
7511
|
/**
|
|
7508
|
-
* Unmount the
|
|
7512
|
+
* Unmount the Organization profile component from the target node.
|
|
7509
7513
|
*
|
|
7510
7514
|
* @param targetNode - Target node to unmount the OrganizationProfile component from.
|
|
7511
7515
|
*/
|
|
@@ -7524,20 +7528,20 @@ interface Clerk {
|
|
|
7524
7528
|
*/
|
|
7525
7529
|
unmountCreateOrganization: (targetNode: HTMLDivElement) => void;
|
|
7526
7530
|
/**
|
|
7527
|
-
* Mount an
|
|
7531
|
+
* Mount an Organization switcher component at the target element.
|
|
7528
7532
|
*
|
|
7529
7533
|
* @param targetNode - Target to mount the OrganizationSwitcher component.
|
|
7530
7534
|
* @param props - Configuration parameters.
|
|
7531
7535
|
*/
|
|
7532
7536
|
mountOrganizationSwitcher: (targetNode: HTMLDivElement, props?: OrganizationSwitcherProps) => void;
|
|
7533
7537
|
/**
|
|
7534
|
-
* Unmount the
|
|
7538
|
+
* Unmount the Organization switcher component from the target node.*
|
|
7535
7539
|
*
|
|
7536
7540
|
* @param targetNode - Target node to unmount the OrganizationSwitcher component from.
|
|
7537
7541
|
*/
|
|
7538
7542
|
unmountOrganizationSwitcher: (targetNode: HTMLDivElement) => void;
|
|
7539
7543
|
/**
|
|
7540
|
-
* Prefetches the data displayed by an
|
|
7544
|
+
* Prefetches the data displayed by an Organization switcher.
|
|
7541
7545
|
* It can be used when `mountOrganizationSwitcher({ asStandalone: true})`, to avoid unwanted loading states.
|
|
7542
7546
|
*
|
|
7543
7547
|
* @experimental This experimental API is subject to change.
|
|
@@ -7546,14 +7550,14 @@ interface Clerk {
|
|
|
7546
7550
|
*/
|
|
7547
7551
|
__experimental_prefetchOrganizationSwitcher: () => void;
|
|
7548
7552
|
/**
|
|
7549
|
-
* Mount an
|
|
7553
|
+
* Mount an Organization list component at the target element.
|
|
7550
7554
|
*
|
|
7551
7555
|
* @param targetNode - Target to mount the OrganizationList component.
|
|
7552
7556
|
* @param props - Configuration parameters.
|
|
7553
7557
|
*/
|
|
7554
7558
|
mountOrganizationList: (targetNode: HTMLDivElement, props?: OrganizationListProps) => void;
|
|
7555
7559
|
/**
|
|
7556
|
-
* Unmount the
|
|
7560
|
+
* Unmount the Organization list component from the target node.*
|
|
7557
7561
|
*
|
|
7558
7562
|
* @param targetNode - Target node to unmount the OrganizationList component from.
|
|
7559
7563
|
*/
|
|
@@ -7690,7 +7694,7 @@ interface Clerk {
|
|
|
7690
7694
|
*/
|
|
7691
7695
|
__internal_addNavigationListener: (callback: () => void) => UnsubscribeCallback;
|
|
7692
7696
|
/**
|
|
7693
|
-
* Set the active session and
|
|
7697
|
+
* Set the active session and Organization explicitly.
|
|
7694
7698
|
*
|
|
7695
7699
|
* If the session param is `null`, the active session is deleted.
|
|
7696
7700
|
* In a similar fashion, if the organization param is `null`, the current organization is removed as active.
|
|
@@ -7860,11 +7864,11 @@ interface Clerk {
|
|
|
7860
7864
|
*/
|
|
7861
7865
|
authenticateWithGoogleOneTap: (params: AuthenticateWithGoogleOneTapParams) => Promise<SignInResource | SignUpResource>;
|
|
7862
7866
|
/**
|
|
7863
|
-
* Creates an
|
|
7867
|
+
* Creates an Organization, adding the current user as admin.
|
|
7864
7868
|
*/
|
|
7865
7869
|
createOrganization: (params: CreateOrganizationParams) => Promise<OrganizationResource>;
|
|
7866
7870
|
/**
|
|
7867
|
-
* Retrieves a single
|
|
7871
|
+
* Retrieves a single Organization by ID.
|
|
7868
7872
|
*/
|
|
7869
7873
|
getOrganization: (organizationId: string) => Promise<OrganizationResource>;
|
|
7870
7874
|
/**
|
|
@@ -7981,7 +7985,7 @@ type ClerkOptions = ClerkOptionsNavigation & SignInForceRedirectUrl & SignInFall
|
|
|
7981
7985
|
*/
|
|
7982
7986
|
appearance?: any;
|
|
7983
7987
|
/**
|
|
7984
|
-
* 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/
|
|
7988
|
+
* 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.
|
|
7985
7989
|
*/
|
|
7986
7990
|
localization?: LocalizationResource;
|
|
7987
7991
|
polling?: boolean;
|
|
@@ -7994,7 +7998,7 @@ type ClerkOptions = ClerkOptionsNavigation & SignInForceRedirectUrl & SignInFall
|
|
|
7994
7998
|
*/
|
|
7995
7999
|
standardBrowser?: boolean;
|
|
7996
8000
|
/**
|
|
7997
|
-
* 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/
|
|
8001
|
+
* 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.
|
|
7998
8002
|
*/
|
|
7999
8003
|
supportEmail?: string;
|
|
8000
8004
|
/**
|
|
@@ -8042,7 +8046,7 @@ type ClerkOptions = ClerkOptionsNavigation & SignInForceRedirectUrl & SignInFall
|
|
|
8042
8046
|
*/
|
|
8043
8047
|
sdkMetadata?: SDKMetadata;
|
|
8044
8048
|
/**
|
|
8045
|
-
* The full URL or path to the waitlist page. If `undefined`, will redirect to the [Account Portal waitlist page](https://clerk.com/docs/guides/
|
|
8049
|
+
* 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).
|
|
8046
8050
|
*/
|
|
8047
8051
|
waitlistUrl?: string;
|
|
8048
8052
|
/**
|
|
@@ -8185,7 +8189,7 @@ type SetActiveParams = {
|
|
|
8185
8189
|
*/
|
|
8186
8190
|
session?: SignedInSessionResource | string | null;
|
|
8187
8191
|
/**
|
|
8188
|
-
* The
|
|
8192
|
+
* 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.
|
|
8189
8193
|
*/
|
|
8190
8194
|
organization?: OrganizationResource | string | null;
|
|
8191
8195
|
/**
|
|
@@ -8193,7 +8197,7 @@ type SetActiveParams = {
|
|
|
8193
8197
|
*/
|
|
8194
8198
|
redirectUrl?: string;
|
|
8195
8199
|
/**
|
|
8196
|
-
* A custom navigation function to be called just before the session and/or
|
|
8200
|
+
* A custom navigation function to be called just before the session and/or Organization is set.
|
|
8197
8201
|
*
|
|
8198
8202
|
* When provided, it takes precedence over the `redirectUrl` parameter for navigation.
|
|
8199
8203
|
*
|
|
@@ -8299,8 +8303,21 @@ interface TransferableOption {
|
|
|
8299
8303
|
*/
|
|
8300
8304
|
transferable?: boolean;
|
|
8301
8305
|
}
|
|
8302
|
-
type SignInModalProps = WithoutRouting<SignInProps
|
|
8306
|
+
type SignInModalProps = WithoutRouting<SignInProps> & {
|
|
8307
|
+
/**
|
|
8308
|
+
* Function that returns the container element where portals should be rendered.
|
|
8309
|
+
* This allows Clerk components to render inside external dialogs/popovers
|
|
8310
|
+
* (e.g., Radix Dialog, React Aria Components) instead of document.body.
|
|
8311
|
+
*/
|
|
8312
|
+
getContainer?: () => HTMLElement | null;
|
|
8313
|
+
};
|
|
8303
8314
|
type __internal_UserVerificationProps = RoutingOptions & {
|
|
8315
|
+
/**
|
|
8316
|
+
* Function that returns the container element where portals should be rendered.
|
|
8317
|
+
* This allows Clerk components to render inside external dialogs/popovers
|
|
8318
|
+
* (e.g., Radix Dialog, React Aria Components) instead of document.body.
|
|
8319
|
+
*/
|
|
8320
|
+
getContainer?: () => HTMLElement | null;
|
|
8304
8321
|
/**
|
|
8305
8322
|
* Non-awaitable callback for when verification is completed successfully
|
|
8306
8323
|
*/
|
|
@@ -8418,7 +8435,14 @@ type SignUpProps = RoutingOptions & {
|
|
|
8418
8435
|
*/
|
|
8419
8436
|
oidcPrompt?: string;
|
|
8420
8437
|
} & SignInFallbackRedirectUrl & SignInForceRedirectUrl & AfterSignOutUrl;
|
|
8421
|
-
type SignUpModalProps = WithoutRouting<SignUpProps
|
|
8438
|
+
type SignUpModalProps = WithoutRouting<SignUpProps> & {
|
|
8439
|
+
/**
|
|
8440
|
+
* Function that returns the container element where portals should be rendered.
|
|
8441
|
+
* This allows Clerk components to render inside external dialogs/popovers
|
|
8442
|
+
* (e.g., Radix Dialog, React Aria Components) instead of document.body.
|
|
8443
|
+
*/
|
|
8444
|
+
getContainer?: () => HTMLElement | null;
|
|
8445
|
+
};
|
|
8422
8446
|
type UserProfileProps = RoutingOptions & {
|
|
8423
8447
|
/**
|
|
8424
8448
|
* Customisation options to fully match the Clerk components to your own brand.
|
|
@@ -8451,10 +8475,17 @@ type UserProfileProps = RoutingOptions & {
|
|
|
8451
8475
|
hide?: boolean;
|
|
8452
8476
|
};
|
|
8453
8477
|
};
|
|
8454
|
-
type UserProfileModalProps = WithoutRouting<UserProfileProps
|
|
8478
|
+
type UserProfileModalProps = WithoutRouting<UserProfileProps> & {
|
|
8479
|
+
/**
|
|
8480
|
+
* Function that returns the container element where portals should be rendered.
|
|
8481
|
+
* This allows Clerk components to render inside external dialogs/popovers
|
|
8482
|
+
* (e.g., Radix Dialog, React Aria Components) instead of document.body.
|
|
8483
|
+
*/
|
|
8484
|
+
getContainer?: () => HTMLElement | null;
|
|
8485
|
+
};
|
|
8455
8486
|
type OrganizationProfileProps = RoutingOptions & {
|
|
8456
8487
|
/**
|
|
8457
|
-
* Full URL or path to navigate to after the user leaves the currently
|
|
8488
|
+
* Full URL or path to navigate to after the user leaves the currently Active Organization.
|
|
8458
8489
|
*
|
|
8459
8490
|
* @default undefined
|
|
8460
8491
|
*/
|
|
@@ -8467,7 +8498,7 @@ type OrganizationProfileProps = RoutingOptions & {
|
|
|
8467
8498
|
appearance?: ClerkAppearanceTheme;
|
|
8468
8499
|
customPages?: CustomPage[];
|
|
8469
8500
|
/**
|
|
8470
|
-
* Specify on which page the
|
|
8501
|
+
* Specify on which page the Organization profile modal will open.
|
|
8471
8502
|
*
|
|
8472
8503
|
* @example __experimental_startPath: '/organization-members'
|
|
8473
8504
|
*
|
|
@@ -8489,16 +8520,23 @@ type OrganizationProfileProps = RoutingOptions & {
|
|
|
8489
8520
|
hide?: boolean;
|
|
8490
8521
|
};
|
|
8491
8522
|
};
|
|
8492
|
-
type OrganizationProfileModalProps = WithoutRouting<OrganizationProfileProps
|
|
8523
|
+
type OrganizationProfileModalProps = WithoutRouting<OrganizationProfileProps> & {
|
|
8524
|
+
/**
|
|
8525
|
+
* Function that returns the container element where portals should be rendered.
|
|
8526
|
+
* This allows Clerk components to render inside external dialogs/popovers
|
|
8527
|
+
* (e.g., Radix Dialog, React Aria Components) instead of document.body.
|
|
8528
|
+
*/
|
|
8529
|
+
getContainer?: () => HTMLElement | null;
|
|
8530
|
+
};
|
|
8493
8531
|
type CreateOrganizationProps = RoutingOptions & {
|
|
8494
8532
|
/**
|
|
8495
|
-
* Full URL or path to navigate to after creating a new
|
|
8533
|
+
* Full URL or path to navigate to after creating a new Organization.
|
|
8496
8534
|
*
|
|
8497
8535
|
* @default undefined
|
|
8498
8536
|
*/
|
|
8499
8537
|
afterCreateOrganizationUrl?: ((organization: OrganizationResource) => string) | LooseExtractedParams<PrimitiveKeys<OrganizationResource>>;
|
|
8500
8538
|
/**
|
|
8501
|
-
* Hides the screen for sending invitations after an
|
|
8539
|
+
* Hides the screen for sending invitations after an Organization is created.
|
|
8502
8540
|
*
|
|
8503
8541
|
* @default undefined When left undefined Clerk will automatically hide the screen if
|
|
8504
8542
|
* the number of max allowed members is equal to 1
|
|
@@ -8511,7 +8549,14 @@ type CreateOrganizationProps = RoutingOptions & {
|
|
|
8511
8549
|
*/
|
|
8512
8550
|
appearance?: ClerkAppearanceTheme;
|
|
8513
8551
|
};
|
|
8514
|
-
type CreateOrganizationModalProps = WithoutRouting<CreateOrganizationProps
|
|
8552
|
+
type CreateOrganizationModalProps = WithoutRouting<CreateOrganizationProps> & {
|
|
8553
|
+
/**
|
|
8554
|
+
* Function that returns the container element where portals should be rendered.
|
|
8555
|
+
* This allows Clerk components to render inside external dialogs/popovers
|
|
8556
|
+
* (e.g., Radix Dialog, React Aria Components) instead of document.body.
|
|
8557
|
+
*/
|
|
8558
|
+
getContainer?: () => HTMLElement | null;
|
|
8559
|
+
};
|
|
8515
8560
|
type UserProfileMode = 'modal' | 'navigation';
|
|
8516
8561
|
type UserButtonProfileMode = {
|
|
8517
8562
|
userProfileUrl?: never;
|
|
@@ -8596,10 +8641,10 @@ type OrganizationSwitcherProps = CreateOrganizationMode & OrganizationProfileMod
|
|
|
8596
8641
|
*/
|
|
8597
8642
|
__experimental_asStandalone?: boolean | ((opened: boolean) => void);
|
|
8598
8643
|
/**
|
|
8599
|
-
* By default, users can switch between
|
|
8644
|
+
* By default, users can switch between Organization and their personal account.
|
|
8600
8645
|
* This option controls whether OrganizationSwitcher will include the user's personal account
|
|
8601
|
-
* in the
|
|
8602
|
-
* and users will only be able to switch between
|
|
8646
|
+
* in the Organization list. Setting this to `false` will hide the personal account entry,
|
|
8647
|
+
* and users will only be able to switch between Organizations.
|
|
8603
8648
|
*
|
|
8604
8649
|
* @default true
|
|
8605
8650
|
*/
|
|
@@ -8611,7 +8656,7 @@ type OrganizationSwitcherProps = CreateOrganizationMode & OrganizationProfileMod
|
|
|
8611
8656
|
*/
|
|
8612
8657
|
afterCreateOrganizationUrl?: ((organization: OrganizationResource) => string) | LooseExtractedParams<PrimitiveKeys<OrganizationResource>>;
|
|
8613
8658
|
/**
|
|
8614
|
-
* Full URL or path to navigate to after a successful
|
|
8659
|
+
* Full URL or path to navigate to after a successful Organization selection.
|
|
8615
8660
|
* Accepts a function that returns URL or path
|
|
8616
8661
|
*
|
|
8617
8662
|
* @default undefined`
|
|
@@ -8625,13 +8670,13 @@ type OrganizationSwitcherProps = CreateOrganizationMode & OrganizationProfileMod
|
|
|
8625
8670
|
*/
|
|
8626
8671
|
afterSelectPersonalUrl?: ((user: UserResource) => string) | LooseExtractedParams<PrimitiveKeys<UserResource>>;
|
|
8627
8672
|
/**
|
|
8628
|
-
* Full URL or path to navigate to after the user leaves the currently
|
|
8673
|
+
* Full URL or path to navigate to after the user leaves the currently Active Organization.
|
|
8629
8674
|
*
|
|
8630
8675
|
* @default undefined
|
|
8631
8676
|
*/
|
|
8632
8677
|
afterLeaveOrganizationUrl?: string;
|
|
8633
8678
|
/**
|
|
8634
|
-
* Hides the screen for sending invitations after an
|
|
8679
|
+
* Hides the screen for sending invitations after an Organization is created.
|
|
8635
8680
|
*
|
|
8636
8681
|
* @default undefined When left undefined Clerk will automatically hide the screen if
|
|
8637
8682
|
* the number of max allowed members is equal to 1
|
|
@@ -8647,13 +8692,13 @@ type OrganizationSwitcherProps = CreateOrganizationMode & OrganizationProfileMod
|
|
|
8647
8692
|
};
|
|
8648
8693
|
type OrganizationListProps = {
|
|
8649
8694
|
/**
|
|
8650
|
-
* Full URL or path to navigate to after creating a new
|
|
8695
|
+
* Full URL or path to navigate to after creating a new Organization.
|
|
8651
8696
|
*
|
|
8652
8697
|
* @default undefined
|
|
8653
8698
|
*/
|
|
8654
8699
|
afterCreateOrganizationUrl?: ((organization: OrganizationResource) => string) | LooseExtractedParams<PrimitiveKeys<OrganizationResource>>;
|
|
8655
8700
|
/**
|
|
8656
|
-
* Full URL or path to navigate to after a successful
|
|
8701
|
+
* Full URL or path to navigate to after a successful Organization selection.
|
|
8657
8702
|
* Accepts a function that returns URL or path
|
|
8658
8703
|
*
|
|
8659
8704
|
* @default undefined`
|
|
@@ -8666,17 +8711,17 @@ type OrganizationListProps = {
|
|
|
8666
8711
|
*/
|
|
8667
8712
|
appearance?: ClerkAppearanceTheme;
|
|
8668
8713
|
/**
|
|
8669
|
-
* Hides the screen for sending invitations after an
|
|
8714
|
+
* Hides the screen for sending invitations after an Organization is created.
|
|
8670
8715
|
*
|
|
8671
8716
|
* @default undefined When left undefined Clerk will automatically hide the screen if
|
|
8672
8717
|
* the number of max allowed members is equal to 1
|
|
8673
8718
|
*/
|
|
8674
8719
|
skipInvitationScreen?: boolean;
|
|
8675
8720
|
/**
|
|
8676
|
-
* By default, users can switch between
|
|
8721
|
+
* By default, users can switch between Organization and their personal account.
|
|
8677
8722
|
* This option controls whether OrganizationList will include the user's personal account
|
|
8678
|
-
* in the
|
|
8679
|
-
* and users will only be able to switch between
|
|
8723
|
+
* in the Organization list. Setting this to `false` will hide the personal account entry,
|
|
8724
|
+
* and users will only be able to switch between Organizations.
|
|
8680
8725
|
*
|
|
8681
8726
|
* @default true
|
|
8682
8727
|
*/
|
|
@@ -8705,7 +8750,14 @@ type WaitlistProps = {
|
|
|
8705
8750
|
*/
|
|
8706
8751
|
signInUrl?: string;
|
|
8707
8752
|
};
|
|
8708
|
-
type WaitlistModalProps = WaitlistProps
|
|
8753
|
+
type WaitlistModalProps = WaitlistProps & {
|
|
8754
|
+
/**
|
|
8755
|
+
* Function that returns the container element where portals should be rendered.
|
|
8756
|
+
* This allows Clerk components to render inside external dialogs/popovers
|
|
8757
|
+
* (e.g., Radix Dialog, React Aria Components) instead of document.body.
|
|
8758
|
+
*/
|
|
8759
|
+
getContainer?: () => HTMLElement | null;
|
|
8760
|
+
};
|
|
8709
8761
|
type PricingTableDefaultProps = {
|
|
8710
8762
|
/**
|
|
8711
8763
|
* The position of the CTA button.
|
|
@@ -8714,7 +8766,7 @@ type PricingTableDefaultProps = {
|
|
|
8714
8766
|
*/
|
|
8715
8767
|
ctaPosition?: 'top' | 'bottom';
|
|
8716
8768
|
/**
|
|
8717
|
-
* Whether to collapse
|
|
8769
|
+
* Whether to collapse Features on the pricing table.
|
|
8718
8770
|
*
|
|
8719
8771
|
* @default false
|
|
8720
8772
|
*/
|
|
@@ -8729,7 +8781,7 @@ type PricingTableDefaultProps = {
|
|
|
8729
8781
|
type PricingTableBaseProps = {
|
|
8730
8782
|
/**
|
|
8731
8783
|
* The subscriber type to display plans for.
|
|
8732
|
-
* If `organization`, show
|
|
8784
|
+
* If `organization`, show Plans for the Active Organization; otherwise for the user.
|
|
8733
8785
|
*
|
|
8734
8786
|
* @default 'user'
|
|
8735
8787
|
*/
|
|
@@ -8826,7 +8878,7 @@ type __internal_PlanDetailsProps = ({
|
|
|
8826
8878
|
plan?: never;
|
|
8827
8879
|
} | {
|
|
8828
8880
|
/**
|
|
8829
|
-
* The
|
|
8881
|
+
* The Plan object will be used as initial data until the Plan is fetched from the server.
|
|
8830
8882
|
*/
|
|
8831
8883
|
plan: BillingPlanResource;
|
|
8832
8884
|
planId?: never;
|
|
@@ -8844,7 +8896,7 @@ type __experimental_PlanDetailsButtonProps = ({
|
|
|
8844
8896
|
plan?: never;
|
|
8845
8897
|
} | {
|
|
8846
8898
|
/**
|
|
8847
|
-
* The
|
|
8899
|
+
* The Plan object will be used as initial data until the Plan is fetched from the server.
|
|
8848
8900
|
*/
|
|
8849
8901
|
plan: BillingPlanResource;
|
|
8850
8902
|
planId?: never;
|
|
@@ -8862,7 +8914,7 @@ type __experimental_PlanDetailsButtonProps = ({
|
|
|
8862
8914
|
type __internal_SubscriptionDetailsProps = {
|
|
8863
8915
|
/**
|
|
8864
8916
|
* The subscriber type to display the subscription details for.
|
|
8865
|
-
* If `organization` is provided, the subscription details will be displayed for the
|
|
8917
|
+
* If `organization` is provided, the subscription details will be displayed for the Active Organization.
|
|
8866
8918
|
*
|
|
8867
8919
|
* @default 'user'
|
|
8868
8920
|
*/
|
|
@@ -8878,7 +8930,7 @@ type __internal_SubscriptionDetailsProps = {
|
|
|
8878
8930
|
type __experimental_SubscriptionDetailsButtonProps = {
|
|
8879
8931
|
/**
|
|
8880
8932
|
* The subscriber type to display the subscription details for.
|
|
8881
|
-
* If `organization` is provided, the subscription details will be displayed for the
|
|
8933
|
+
* If `organization` is provided, the subscription details will be displayed for the Active Organization.
|
|
8882
8934
|
*
|
|
8883
8935
|
* @default 'user'
|
|
8884
8936
|
*/
|
|
@@ -8983,11 +9035,11 @@ type CreateBulkOrganizationInvitationParams = {
|
|
|
8983
9035
|
*/
|
|
8984
9036
|
interface CreateOrganizationParams {
|
|
8985
9037
|
/**
|
|
8986
|
-
* The name of the
|
|
9038
|
+
* The name of the Organization.
|
|
8987
9039
|
*/
|
|
8988
9040
|
name: string;
|
|
8989
9041
|
/**
|
|
8990
|
-
* The slug of the
|
|
9042
|
+
* The slug of the Organization.
|
|
8991
9043
|
*/
|
|
8992
9044
|
slug?: string;
|
|
8993
9045
|
}
|
|
@@ -9179,19 +9231,19 @@ type SharedSignedInAuthObjectProperties = {
|
|
|
9179
9231
|
*/
|
|
9180
9232
|
userId: string;
|
|
9181
9233
|
/**
|
|
9182
|
-
* The ID of the user's
|
|
9234
|
+
* The ID of the user's Active Organization.
|
|
9183
9235
|
*/
|
|
9184
9236
|
orgId: string | undefined;
|
|
9185
9237
|
/**
|
|
9186
|
-
* The current user's
|
|
9238
|
+
* The current user's Role in their Active Organization.
|
|
9187
9239
|
*/
|
|
9188
9240
|
orgRole: OrganizationCustomRoleKey | undefined;
|
|
9189
9241
|
/**
|
|
9190
|
-
* The URL-friendly identifier of the user's
|
|
9242
|
+
* The URL-friendly identifier of the user's Active Organization.
|
|
9191
9243
|
*/
|
|
9192
9244
|
orgSlug: string | undefined;
|
|
9193
9245
|
/**
|
|
9194
|
-
* The current user's
|
|
9246
|
+
* The current user's Organization Permissions.
|
|
9195
9247
|
*/
|
|
9196
9248
|
orgPermissions: OrganizationCustomPermissionKey[] | undefined;
|
|
9197
9249
|
/**
|
|
@@ -9269,19 +9321,19 @@ type UseAuthReturn = {
|
|
|
9269
9321
|
*/
|
|
9270
9322
|
actor: undefined;
|
|
9271
9323
|
/**
|
|
9272
|
-
* The ID of the user's active
|
|
9324
|
+
* The ID of the user's active Organization.
|
|
9273
9325
|
*/
|
|
9274
9326
|
orgId: undefined;
|
|
9275
9327
|
/**
|
|
9276
|
-
* The current user's
|
|
9328
|
+
* The current user's Role in their active Organization.
|
|
9277
9329
|
*/
|
|
9278
9330
|
orgRole: undefined;
|
|
9279
9331
|
/**
|
|
9280
|
-
* The URL-friendly identifier of the user's
|
|
9332
|
+
* The URL-friendly identifier of the user's Active Organization.
|
|
9281
9333
|
*/
|
|
9282
9334
|
orgSlug: undefined;
|
|
9283
9335
|
/**
|
|
9284
|
-
* A function that checks if the user has specific
|
|
9336
|
+
* 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).
|
|
9285
9337
|
*/
|
|
9286
9338
|
has: CheckAuthorizationSignedOut;
|
|
9287
9339
|
/**
|
|
@@ -9412,7 +9464,7 @@ type UseSessionListReturn = {
|
|
|
9412
9464
|
*/
|
|
9413
9465
|
sessions: undefined;
|
|
9414
9466
|
/**
|
|
9415
|
-
* A function that sets the active session and/or
|
|
9467
|
+
* A function that sets the active session and/or Organization. See the [reference doc](https://clerk.com/docs/reference/javascript/clerk#set-active).
|
|
9416
9468
|
*/
|
|
9417
9469
|
setActive: undefined;
|
|
9418
9470
|
} | {
|
|
@@ -9456,24 +9508,24 @@ type PublishableKey = {
|
|
|
9456
9508
|
/**
|
|
9457
9509
|
* Props for the `<Protect />` component, which restricts access to its children based on authentication and authorization.
|
|
9458
9510
|
*
|
|
9459
|
-
* Use `ProtectProps` to specify the required
|
|
9511
|
+
* Use `ProtectProps` to specify the required Role, Permission, Feature, or Plan for access.
|
|
9460
9512
|
*
|
|
9461
9513
|
* @example
|
|
9462
9514
|
* ```tsx
|
|
9463
|
-
* // Require a specific
|
|
9515
|
+
* // Require a specific Permission
|
|
9464
9516
|
* <Protect permission="a_permission_key" />
|
|
9465
9517
|
*
|
|
9466
|
-
* // Require a specific
|
|
9518
|
+
* // Require a specific Role
|
|
9467
9519
|
* <Protect role="a_role_key" />
|
|
9468
9520
|
*
|
|
9469
9521
|
* // Use a custom condition callback
|
|
9470
9522
|
* <Protect condition={(has) => has({ permission: "a_permission_key" })} />
|
|
9471
9523
|
*
|
|
9472
|
-
* // Require a specific
|
|
9524
|
+
* // Require a specific Feature
|
|
9473
9525
|
* <Protect feature="a_feature_key" />
|
|
9474
9526
|
*
|
|
9475
|
-
* // Require a specific
|
|
9476
|
-
* <Protect plan=a_plan_key" />
|
|
9527
|
+
* // Require a specific Plan
|
|
9528
|
+
* <Protect plan="a_plan_key" />
|
|
9477
9529
|
* ```
|
|
9478
9530
|
*/
|
|
9479
9531
|
type ProtectProps = {
|