@clerk/backend 3.0.0-snapshot.v20251208202852 → 3.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/api/endpoints/APIKeysApi.d.ts +23 -2
- package/dist/api/endpoints/APIKeysApi.d.ts.map +1 -1
- package/dist/api/endpoints/InstanceApi.d.ts +3 -3
- package/dist/api/endpoints/OrganizationApi.d.ts +2 -2
- package/dist/api/endpoints/SamlConnectionApi.d.ts +3 -3
- package/dist/api/endpoints/UserApi.d.ts +2 -2
- package/dist/api/resources/CommercePlan.d.ts +27 -27
- package/dist/api/resources/CommerceSubscriptionItem.d.ts +6 -6
- package/dist/api/resources/Feature.d.ts +11 -11
- package/dist/api/resources/JSON.d.ts +4 -4
- package/dist/api/resources/Organization.d.ts +23 -23
- package/dist/api/resources/OrganizationInvitation.d.ts +7 -7
- package/dist/api/resources/OrganizationMembership.d.ts +7 -7
- package/dist/api/resources/SamlConnection.d.ts +4 -4
- package/dist/api/resources/Session.d.ts +2 -2
- package/dist/api/resources/User.d.ts +4 -4
- package/dist/{chunk-XZ7V2XHT.mjs → chunk-4FN7VCZQ.mjs} +35 -5
- package/dist/chunk-4FN7VCZQ.mjs.map +1 -0
- package/dist/index.js +34 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/internal.js +34 -4
- package/dist/internal.js.map +1 -1
- package/dist/internal.mjs +1 -1
- package/dist/tokens/authObjects.d.ts +1 -1
- package/dist/tokens/clerkRequest.d.ts.map +1 -1
- package/dist/tokens/handshake.d.ts.map +1 -1
- package/dist/tokens/types.d.ts +7 -7
- package/dist/util/shared.d.ts +1 -1
- package/package.json +2 -2
- package/dist/chunk-XZ7V2XHT.mjs.map +0 -1
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { ClerkPaginationRequest } from '@clerk/shared/types';
|
|
2
2
|
import type { PaginatedResourceResponse } from '../../api/resources/Deserializer';
|
|
3
3
|
import type { APIKey } from '../resources/APIKey';
|
|
4
|
+
import type { DeletedObject } from '../resources/DeletedObject';
|
|
4
5
|
import { AbstractAPI } from './AbstractApi';
|
|
5
6
|
type GetAPIKeyListParams = ClerkPaginationRequest<{
|
|
6
7
|
/**
|
|
7
|
-
* The user or
|
|
8
|
+
* The user or Organization ID to query API keys by
|
|
8
9
|
*/
|
|
9
10
|
subject: string;
|
|
10
11
|
/**
|
|
@@ -20,7 +21,7 @@ type CreateAPIKeyParams = {
|
|
|
20
21
|
*/
|
|
21
22
|
name: string;
|
|
22
23
|
/**
|
|
23
|
-
* The user or
|
|
24
|
+
* The user or Organization ID to associate the API key with
|
|
24
25
|
*/
|
|
25
26
|
subject: string;
|
|
26
27
|
/**
|
|
@@ -42,9 +43,29 @@ type RevokeAPIKeyParams = {
|
|
|
42
43
|
*/
|
|
43
44
|
revocationReason?: string | null;
|
|
44
45
|
};
|
|
46
|
+
type UpdateAPIKeyParams = {
|
|
47
|
+
/**
|
|
48
|
+
* API key ID
|
|
49
|
+
*/
|
|
50
|
+
apiKeyId: string;
|
|
51
|
+
/**
|
|
52
|
+
* The user or Organization ID to associate the API key with
|
|
53
|
+
*/
|
|
54
|
+
subject: string;
|
|
55
|
+
/**
|
|
56
|
+
* API key description
|
|
57
|
+
*/
|
|
58
|
+
description?: string | null;
|
|
59
|
+
claims?: Record<string, any> | null;
|
|
60
|
+
scopes?: string[];
|
|
61
|
+
secondsUntilExpiration?: number | null;
|
|
62
|
+
};
|
|
45
63
|
export declare class APIKeysAPI extends AbstractAPI {
|
|
46
64
|
list(queryParams: GetAPIKeyListParams): Promise<PaginatedResourceResponse<APIKey[]>>;
|
|
47
65
|
create(params: CreateAPIKeyParams): Promise<APIKey>;
|
|
66
|
+
get(apiKeyId: string): Promise<APIKey>;
|
|
67
|
+
update(params: UpdateAPIKeyParams): Promise<APIKey>;
|
|
68
|
+
delete(apiKeyId: string): Promise<DeletedObject>;
|
|
48
69
|
revoke(params: RevokeAPIKeyParams): Promise<APIKey>;
|
|
49
70
|
getSecret(apiKeyId: string): Promise<{
|
|
50
71
|
secret: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"APIKeysApi.d.ts","sourceRoot":"","sources":["../../../src/api/endpoints/APIKeysApi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAElE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAGlF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,KAAK,mBAAmB,GAAG,sBAAsB,CAAC;IAChD;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC,CAAC;AAEH,KAAK,kBAAkB,GAAG;IACxB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IACpC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,sBAAsB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACxC,CAAC;AAEF,KAAK,kBAAkB,GAAG;IACxB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC,CAAC;AAEF,qBAAa,UAAW,SAAQ,WAAW;IACnC,IAAI,CAAC,WAAW,EAAE,mBAAmB;IAQrC,MAAM,CAAC,MAAM,EAAE,kBAAkB;IAQjC,MAAM,CAAC,MAAM,EAAE,kBAAkB;IAYjC,SAAS,CAAC,QAAQ,EAAE,MAAM;gBAGA,MAAM;;IAMhC,MAAM,CAAC,MAAM,EAAE,MAAM;IAQ3B;;OAEG;IACG,YAAY,CAAC,MAAM,EAAE,MAAM;CAIlC"}
|
|
1
|
+
{"version":3,"file":"APIKeysApi.d.ts","sourceRoot":"","sources":["../../../src/api/endpoints/APIKeysApi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAElE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAGlF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,KAAK,mBAAmB,GAAG,sBAAsB,CAAC;IAChD;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC,CAAC;AAEH,KAAK,kBAAkB,GAAG;IACxB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IACpC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,sBAAsB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACxC,CAAC;AAEF,KAAK,kBAAkB,GAAG;IACxB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC,CAAC;AAEF,KAAK,kBAAkB,GAAG;IACxB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IACpC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,sBAAsB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACxC,CAAC;AAEF,qBAAa,UAAW,SAAQ,WAAW;IACnC,IAAI,CAAC,WAAW,EAAE,mBAAmB;IAQrC,MAAM,CAAC,MAAM,EAAE,kBAAkB;IAQjC,GAAG,CAAC,QAAQ,EAAE,MAAM;IASpB,MAAM,CAAC,MAAM,EAAE,kBAAkB;IAYjC,MAAM,CAAC,QAAQ,EAAE,MAAM;IASvB,MAAM,CAAC,MAAM,EAAE,kBAAkB;IAYjC,SAAS,CAAC,QAAQ,EAAE,MAAM;gBAGA,MAAM;;IAMhC,MAAM,CAAC,MAAM,EAAE,MAAM;IAQ3B;;OAEG;IACG,YAAY,CAAC,MAAM,EAAE,MAAM;CAIlC"}
|
|
@@ -46,17 +46,17 @@ type UpdateOrganizationSettingsParams = {
|
|
|
46
46
|
adminDeleteEnabled?: boolean | null | undefined;
|
|
47
47
|
domainsEnabled?: boolean | null | undefined;
|
|
48
48
|
/**
|
|
49
|
-
* Specifies which [enrollment modes](https://clerk.com/docs/guides/organizations/verified-domains#enable-verified-domains) to enable for your Organization Domains.
|
|
49
|
+
* Specifies which [enrollment modes](https://clerk.com/docs/guides/organizations/add-members/verified-domains#enable-verified-domains) to enable for your Organization Domains.
|
|
50
50
|
*
|
|
51
51
|
* @remarks Supported modes are 'automatic_invitation' & 'automatic_suggestion'.
|
|
52
52
|
*/
|
|
53
53
|
domainsEnrollmentModes?: Array<string> | undefined;
|
|
54
54
|
/**
|
|
55
|
-
* Specifies what the default
|
|
55
|
+
* Specifies what the default Organization Role is for an Organization creator.
|
|
56
56
|
*/
|
|
57
57
|
creatorRoleId?: string | null | undefined;
|
|
58
58
|
/**
|
|
59
|
-
* Specifies what the default
|
|
59
|
+
* Specifies what the default Organization Role is for the Organization Domains.
|
|
60
60
|
*/
|
|
61
61
|
domainsDefaultRoleId?: string | null | undefined;
|
|
62
62
|
};
|
|
@@ -41,7 +41,7 @@ type UpdateMetadataParams = MetadataParams;
|
|
|
41
41
|
type GetOrganizationMembershipListParams = ClerkPaginationRequest<{
|
|
42
42
|
organizationId: string;
|
|
43
43
|
/**
|
|
44
|
-
* Sorts
|
|
44
|
+
* Sorts Organization memberships by phone_number, email_address, created_at, first_name, last_name or username.
|
|
45
45
|
* By prepending one of those values with + or -, we can choose to sort in ascending (ASC) or descending (DESC) order.
|
|
46
46
|
*/
|
|
47
47
|
orderBy?: WithSign<'phone_number' | 'email_address' | 'created_at' | 'first_name' | 'last_name' | 'username'>;
|
|
@@ -101,7 +101,7 @@ type GetOrganizationMembershipListParams = ClerkPaginationRequest<{
|
|
|
101
101
|
}>;
|
|
102
102
|
type GetInstanceOrganizationMembershipListParams = ClerkPaginationRequest<{
|
|
103
103
|
/**
|
|
104
|
-
* Sorts
|
|
104
|
+
* Sorts Organization memberships by phone_number, email_address, created_at, first_name, last_name or username.
|
|
105
105
|
* By prepending one of those values with + or -, we can choose to sort in ascending (ASC) or descending (DESC) order.
|
|
106
106
|
*/
|
|
107
107
|
orderBy?: WithSign<'phone_number' | 'email_address' | 'created_at' | 'first_name' | 'last_name' | 'username'>;
|
|
@@ -14,9 +14,9 @@ type SamlConnectionListParams = ClerkPaginationRequest<{
|
|
|
14
14
|
*/
|
|
15
15
|
orderBy?: WithSign<'phone_number' | 'email_address' | 'created_at' | 'first_name' | 'last_name' | 'username'>;
|
|
16
16
|
/**
|
|
17
|
-
* Returns SAML connections that have an associated
|
|
18
|
-
* For each
|
|
19
|
-
* respective
|
|
17
|
+
* Returns SAML connections that have an associated Organization ID to the given Organizations.
|
|
18
|
+
* For each Organization ID, the + and - can be prepended to the ID, which denote whether the
|
|
19
|
+
* respective Organization should be included or excluded from the result set. Accepts up to 100 Organization IDs.
|
|
20
20
|
*/
|
|
21
21
|
organizationId?: WithSign<string>[];
|
|
22
22
|
}>;
|
|
@@ -90,9 +90,9 @@ type UpdateUserParams = {
|
|
|
90
90
|
locale?: string;
|
|
91
91
|
/** If true, the user can delete themselves with the Frontend API. */
|
|
92
92
|
deleteSelfEnabled?: boolean;
|
|
93
|
-
/** If true, the user can create
|
|
93
|
+
/** If true, the user can create Organizations with the Frontend API. */
|
|
94
94
|
createOrganizationEnabled?: boolean;
|
|
95
|
-
/** The maximum number of
|
|
95
|
+
/** The maximum number of Organizations the user can create. 0 means unlimited. */
|
|
96
96
|
createOrganizationsLimit?: number;
|
|
97
97
|
} & UserMetadataParams & (UserPasswordHashingParams | object);
|
|
98
98
|
type GetOrganizationMembershipListParams = ClerkPaginationRequest<{
|
|
@@ -2,114 +2,114 @@ import type { BillingMoneyAmount } from '@clerk/shared/types';
|
|
|
2
2
|
import { Feature } from './Feature';
|
|
3
3
|
import type { BillingPlanJSON } from './JSON';
|
|
4
4
|
/**
|
|
5
|
-
* The `BillingPlan` object is similar to the [`BillingPlanResource`](/docs/reference/javascript/types/billing-plan-resource) object as it holds information about a
|
|
5
|
+
* The `BillingPlan` object is similar to the [`BillingPlanResource`](/docs/reference/javascript/types/billing-plan-resource) object as it holds information about a Plan, as well as methods for managing it. However, the `BillingPlan` object is different in that it is used in the [Backend API](https://clerk.com/docs/reference/backend-api/tag/commerce/get/commerce/plans) and is not directly accessible from the Frontend API.
|
|
6
6
|
*
|
|
7
7
|
* @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.
|
|
8
8
|
*/
|
|
9
9
|
export declare class BillingPlan {
|
|
10
10
|
/**
|
|
11
|
-
* The unique identifier for the
|
|
11
|
+
* The unique identifier for the Plan.
|
|
12
12
|
*/
|
|
13
13
|
readonly id: string;
|
|
14
14
|
/**
|
|
15
|
-
* The name of the
|
|
15
|
+
* The name of the Plan.
|
|
16
16
|
*/
|
|
17
17
|
readonly name: string;
|
|
18
18
|
/**
|
|
19
|
-
* The URL-friendly identifier of the
|
|
19
|
+
* The URL-friendly identifier of the Plan.
|
|
20
20
|
*/
|
|
21
21
|
readonly slug: string;
|
|
22
22
|
/**
|
|
23
|
-
* The description of the
|
|
23
|
+
* The description of the Plan.
|
|
24
24
|
*/
|
|
25
25
|
readonly description: string | null;
|
|
26
26
|
/**
|
|
27
|
-
* Whether the
|
|
27
|
+
* Whether the Plan is the default Plan.
|
|
28
28
|
*/
|
|
29
29
|
readonly isDefault: boolean;
|
|
30
30
|
/**
|
|
31
|
-
* Whether the
|
|
31
|
+
* Whether the Plan is recurring.
|
|
32
32
|
*/
|
|
33
33
|
readonly isRecurring: boolean;
|
|
34
34
|
/**
|
|
35
|
-
* Whether the
|
|
35
|
+
* Whether the Plan has a base fee.
|
|
36
36
|
*/
|
|
37
37
|
readonly hasBaseFee: boolean;
|
|
38
38
|
/**
|
|
39
|
-
* Whether the
|
|
39
|
+
* Whether the Plan is displayed in the `<PriceTable/>` component.
|
|
40
40
|
*/
|
|
41
41
|
readonly publiclyVisible: boolean;
|
|
42
42
|
/**
|
|
43
|
-
* The monthly fee of the
|
|
43
|
+
* The monthly fee of the Plan.
|
|
44
44
|
*/
|
|
45
45
|
readonly fee: BillingMoneyAmount;
|
|
46
46
|
/**
|
|
47
|
-
* The annual fee of the
|
|
47
|
+
* The annual fee of the Plan.
|
|
48
48
|
*/
|
|
49
49
|
readonly annualFee: BillingMoneyAmount | null;
|
|
50
50
|
/**
|
|
51
|
-
* The annual fee of the
|
|
51
|
+
* The annual fee of the Plan on a monthly basis.
|
|
52
52
|
*/
|
|
53
53
|
readonly annualMonthlyFee: BillingMoneyAmount | null;
|
|
54
54
|
/**
|
|
55
|
-
* The type of payer for the
|
|
55
|
+
* The type of payer for the Plan.
|
|
56
56
|
*/
|
|
57
57
|
readonly forPayerType: 'org' | 'user';
|
|
58
58
|
/**
|
|
59
|
-
* The features the
|
|
59
|
+
* The features the Plan offers.
|
|
60
60
|
*/
|
|
61
61
|
readonly features: Feature[];
|
|
62
62
|
constructor(
|
|
63
63
|
/**
|
|
64
|
-
* The unique identifier for the
|
|
64
|
+
* The unique identifier for the Plan.
|
|
65
65
|
*/
|
|
66
66
|
id: string,
|
|
67
67
|
/**
|
|
68
|
-
* The name of the
|
|
68
|
+
* The name of the Plan.
|
|
69
69
|
*/
|
|
70
70
|
name: string,
|
|
71
71
|
/**
|
|
72
|
-
* The URL-friendly identifier of the
|
|
72
|
+
* The URL-friendly identifier of the Plan.
|
|
73
73
|
*/
|
|
74
74
|
slug: string,
|
|
75
75
|
/**
|
|
76
|
-
* The description of the
|
|
76
|
+
* The description of the Plan.
|
|
77
77
|
*/
|
|
78
78
|
description: string | null,
|
|
79
79
|
/**
|
|
80
|
-
* Whether the
|
|
80
|
+
* Whether the Plan is the default Plan.
|
|
81
81
|
*/
|
|
82
82
|
isDefault: boolean,
|
|
83
83
|
/**
|
|
84
|
-
* Whether the
|
|
84
|
+
* Whether the Plan is recurring.
|
|
85
85
|
*/
|
|
86
86
|
isRecurring: boolean,
|
|
87
87
|
/**
|
|
88
|
-
* Whether the
|
|
88
|
+
* Whether the Plan has a base fee.
|
|
89
89
|
*/
|
|
90
90
|
hasBaseFee: boolean,
|
|
91
91
|
/**
|
|
92
|
-
* Whether the
|
|
92
|
+
* Whether the Plan is displayed in the `<PriceTable/>` component.
|
|
93
93
|
*/
|
|
94
94
|
publiclyVisible: boolean,
|
|
95
95
|
/**
|
|
96
|
-
* The monthly fee of the
|
|
96
|
+
* The monthly fee of the Plan.
|
|
97
97
|
*/
|
|
98
98
|
fee: BillingMoneyAmount,
|
|
99
99
|
/**
|
|
100
|
-
* The annual fee of the
|
|
100
|
+
* The annual fee of the Plan.
|
|
101
101
|
*/
|
|
102
102
|
annualFee: BillingMoneyAmount | null,
|
|
103
103
|
/**
|
|
104
|
-
* The annual fee of the
|
|
104
|
+
* The annual fee of the Plan on a monthly basis.
|
|
105
105
|
*/
|
|
106
106
|
annualMonthlyFee: BillingMoneyAmount | null,
|
|
107
107
|
/**
|
|
108
|
-
* The type of payer for the
|
|
108
|
+
* The type of payer for the Plan.
|
|
109
109
|
*/
|
|
110
110
|
forPayerType: 'org' | 'user',
|
|
111
111
|
/**
|
|
112
|
-
* The features the
|
|
112
|
+
* The features the Plan offers.
|
|
113
113
|
*/
|
|
114
114
|
features: Feature[]);
|
|
115
115
|
static fromJSON(data: BillingPlanJSON): BillingPlan;
|
|
@@ -16,7 +16,7 @@ export declare class BillingSubscriptionItem {
|
|
|
16
16
|
*/
|
|
17
17
|
readonly status: BillingSubscriptionItemJSON['status'];
|
|
18
18
|
/**
|
|
19
|
-
* The
|
|
19
|
+
* The Plan period for the subscription item.
|
|
20
20
|
*/
|
|
21
21
|
readonly planPeriod: 'month' | 'annual';
|
|
22
22
|
/**
|
|
@@ -41,11 +41,11 @@ export declare class BillingSubscriptionItem {
|
|
|
41
41
|
*/
|
|
42
42
|
readonly amount: BillingMoneyAmount | undefined;
|
|
43
43
|
/**
|
|
44
|
-
* The
|
|
44
|
+
* The Plan associated with this subscription item.
|
|
45
45
|
*/
|
|
46
46
|
readonly plan: BillingPlan | null;
|
|
47
47
|
/**
|
|
48
|
-
* The
|
|
48
|
+
* The Plan ID.
|
|
49
49
|
*/
|
|
50
50
|
readonly planId: string | null;
|
|
51
51
|
/**
|
|
@@ -94,7 +94,7 @@ export declare class BillingSubscriptionItem {
|
|
|
94
94
|
*/
|
|
95
95
|
status: BillingSubscriptionItemJSON['status'],
|
|
96
96
|
/**
|
|
97
|
-
* The
|
|
97
|
+
* The Plan period for the subscription item.
|
|
98
98
|
*/
|
|
99
99
|
planPeriod: 'month' | 'annual',
|
|
100
100
|
/**
|
|
@@ -119,11 +119,11 @@ export declare class BillingSubscriptionItem {
|
|
|
119
119
|
*/
|
|
120
120
|
amount: BillingMoneyAmount | undefined,
|
|
121
121
|
/**
|
|
122
|
-
* The
|
|
122
|
+
* The Plan associated with this subscription item.
|
|
123
123
|
*/
|
|
124
124
|
plan: BillingPlan | null,
|
|
125
125
|
/**
|
|
126
|
-
* The
|
|
126
|
+
* The Plan ID.
|
|
127
127
|
*/
|
|
128
128
|
planId: string | null,
|
|
129
129
|
/**
|
|
@@ -1,49 +1,49 @@
|
|
|
1
1
|
import type { FeatureJSON } from './JSON';
|
|
2
2
|
/**
|
|
3
|
-
* The `Feature` object represents a
|
|
3
|
+
* The `Feature` object represents a Feature of a Subscription Plan.
|
|
4
4
|
*
|
|
5
5
|
* @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.
|
|
6
6
|
*/
|
|
7
7
|
export declare class Feature {
|
|
8
8
|
/**
|
|
9
|
-
* The unique identifier for the
|
|
9
|
+
* The unique identifier for the Feature.
|
|
10
10
|
*/
|
|
11
11
|
readonly id: string;
|
|
12
12
|
/**
|
|
13
|
-
* The name of the
|
|
13
|
+
* The name of the Feature.
|
|
14
14
|
*/
|
|
15
15
|
readonly name: string;
|
|
16
16
|
/**
|
|
17
|
-
* The description of the
|
|
17
|
+
* The description of the Feature.
|
|
18
18
|
*/
|
|
19
19
|
readonly description: string | null;
|
|
20
20
|
/**
|
|
21
|
-
* The URL-friendly identifier of the
|
|
21
|
+
* The URL-friendly identifier of the Feature.
|
|
22
22
|
*/
|
|
23
23
|
readonly slug: string;
|
|
24
24
|
/**
|
|
25
|
-
* The URL of the
|
|
25
|
+
* The URL of the Feature's avatar image.
|
|
26
26
|
*/
|
|
27
27
|
readonly avatarUrl: string | null;
|
|
28
28
|
constructor(
|
|
29
29
|
/**
|
|
30
|
-
* The unique identifier for the
|
|
30
|
+
* The unique identifier for the Feature.
|
|
31
31
|
*/
|
|
32
32
|
id: string,
|
|
33
33
|
/**
|
|
34
|
-
* The name of the
|
|
34
|
+
* The name of the Feature.
|
|
35
35
|
*/
|
|
36
36
|
name: string,
|
|
37
37
|
/**
|
|
38
|
-
* The description of the
|
|
38
|
+
* The description of the Feature.
|
|
39
39
|
*/
|
|
40
40
|
description: string | null,
|
|
41
41
|
/**
|
|
42
|
-
* The URL-friendly identifier of the
|
|
42
|
+
* The URL-friendly identifier of the Feature.
|
|
43
43
|
*/
|
|
44
44
|
slug: string,
|
|
45
45
|
/**
|
|
46
|
-
* The URL of the
|
|
46
|
+
* The URL of the Feature's avatar image.
|
|
47
47
|
*/
|
|
48
48
|
avatarUrl: string | null);
|
|
49
49
|
static fromJSON(data: FeatureJSON): Feature;
|
|
@@ -341,19 +341,19 @@ export interface OrganizationInvitationAcceptedJSON extends OrganizationInvitati
|
|
|
341
341
|
*/
|
|
342
342
|
export interface PublicOrganizationDataJSON extends ClerkResourceJSON {
|
|
343
343
|
/**
|
|
344
|
-
* The name of the
|
|
344
|
+
* The name of the Organization.
|
|
345
345
|
*/
|
|
346
346
|
name: string;
|
|
347
347
|
/**
|
|
348
|
-
* The slug of the
|
|
348
|
+
* The slug of the Organization.
|
|
349
349
|
*/
|
|
350
350
|
slug: string;
|
|
351
351
|
/**
|
|
352
|
-
* Holds the default
|
|
352
|
+
* Holds the default Organization profile image. Compatible with Clerk's [Image Optimization](https://clerk.com/docs/guides/development/image-optimization).
|
|
353
353
|
*/
|
|
354
354
|
image_url?: string;
|
|
355
355
|
/**
|
|
356
|
-
* Whether the
|
|
356
|
+
* Whether the Organization has a profile image.
|
|
357
357
|
*/
|
|
358
358
|
has_image: boolean;
|
|
359
359
|
}
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import type { OrganizationJSON } from './JSON';
|
|
2
2
|
/**
|
|
3
|
-
* The Backend `Organization` object is similar to the [`Organization`](https://clerk.com/docs/reference/javascript/organization) object as it holds information about an
|
|
3
|
+
* The Backend `Organization` object is similar to the [`Organization`](https://clerk.com/docs/reference/javascript/organization) object as it holds information about an Organization, as well as methods for managing it. However, the Backend `Organization` object is different in that it is used in the [Backend API](https://clerk.com/docs/reference/backend-api/tag/Organizations#operation/ListOrganizations){{ target: '_blank' }} and is not directly accessible from the Frontend API.
|
|
4
4
|
*/
|
|
5
5
|
export declare class Organization {
|
|
6
6
|
/**
|
|
7
|
-
* The unique identifier for the
|
|
7
|
+
* The unique identifier for the Organization.
|
|
8
8
|
*/
|
|
9
9
|
readonly id: string;
|
|
10
10
|
/**
|
|
11
|
-
* The name of the
|
|
11
|
+
* The name of the Organization.
|
|
12
12
|
*/
|
|
13
13
|
readonly name: string;
|
|
14
14
|
/**
|
|
15
|
-
* The URL-friendly identifier of the user's active
|
|
15
|
+
* The URL-friendly identifier of the user's active Organization. If supplied, it must be unique for the instance.
|
|
16
16
|
*/
|
|
17
17
|
readonly slug: string;
|
|
18
18
|
/**
|
|
19
|
-
* Holds the
|
|
19
|
+
* Holds the Organization's logo. Compatible with Clerk's [Image Optimization](https://clerk.com/docs/guides/development/image-optimization).
|
|
20
20
|
*/
|
|
21
21
|
readonly imageUrl: string;
|
|
22
22
|
/**
|
|
23
|
-
* Whether the
|
|
23
|
+
* Whether the Organization has an image.
|
|
24
24
|
*/
|
|
25
25
|
readonly hasImage: boolean;
|
|
26
26
|
/**
|
|
27
|
-
* The date when the
|
|
27
|
+
* The date when the Organization was first created.
|
|
28
28
|
*/
|
|
29
29
|
readonly createdAt: number;
|
|
30
30
|
/**
|
|
31
|
-
* The date when the
|
|
31
|
+
* The date when the Organization was last updated.
|
|
32
32
|
*/
|
|
33
33
|
readonly updatedAt: number;
|
|
34
34
|
/**
|
|
@@ -40,50 +40,50 @@ export declare class Organization {
|
|
|
40
40
|
*/
|
|
41
41
|
readonly privateMetadata: OrganizationPrivateMetadata;
|
|
42
42
|
/**
|
|
43
|
-
* The maximum number of memberships allowed in the
|
|
43
|
+
* The maximum number of memberships allowed in the Organization.
|
|
44
44
|
*/
|
|
45
45
|
readonly maxAllowedMemberships: number;
|
|
46
46
|
/**
|
|
47
|
-
* Whether the
|
|
47
|
+
* Whether the Organization allows admins to delete users.
|
|
48
48
|
*/
|
|
49
49
|
readonly adminDeleteEnabled: boolean;
|
|
50
50
|
/**
|
|
51
|
-
* The number of members in the
|
|
51
|
+
* The number of members in the Organization.
|
|
52
52
|
*/
|
|
53
53
|
readonly membersCount?: number | undefined;
|
|
54
54
|
/**
|
|
55
|
-
* The ID of the user who created the
|
|
55
|
+
* The ID of the user who created the Organization.
|
|
56
56
|
*/
|
|
57
57
|
readonly createdBy?: string | undefined;
|
|
58
58
|
private _raw;
|
|
59
59
|
get raw(): OrganizationJSON | null;
|
|
60
60
|
constructor(
|
|
61
61
|
/**
|
|
62
|
-
* The unique identifier for the
|
|
62
|
+
* The unique identifier for the Organization.
|
|
63
63
|
*/
|
|
64
64
|
id: string,
|
|
65
65
|
/**
|
|
66
|
-
* The name of the
|
|
66
|
+
* The name of the Organization.
|
|
67
67
|
*/
|
|
68
68
|
name: string,
|
|
69
69
|
/**
|
|
70
|
-
* The URL-friendly identifier of the user's active
|
|
70
|
+
* The URL-friendly identifier of the user's active Organization. If supplied, it must be unique for the instance.
|
|
71
71
|
*/
|
|
72
72
|
slug: string,
|
|
73
73
|
/**
|
|
74
|
-
* Holds the
|
|
74
|
+
* Holds the Organization's logo. Compatible with Clerk's [Image Optimization](https://clerk.com/docs/guides/development/image-optimization).
|
|
75
75
|
*/
|
|
76
76
|
imageUrl: string,
|
|
77
77
|
/**
|
|
78
|
-
* Whether the
|
|
78
|
+
* Whether the Organization has an image.
|
|
79
79
|
*/
|
|
80
80
|
hasImage: boolean,
|
|
81
81
|
/**
|
|
82
|
-
* The date when the
|
|
82
|
+
* The date when the Organization was first created.
|
|
83
83
|
*/
|
|
84
84
|
createdAt: number,
|
|
85
85
|
/**
|
|
86
|
-
* The date when the
|
|
86
|
+
* The date when the Organization was last updated.
|
|
87
87
|
*/
|
|
88
88
|
updatedAt: number,
|
|
89
89
|
/**
|
|
@@ -95,19 +95,19 @@ export declare class Organization {
|
|
|
95
95
|
*/
|
|
96
96
|
privateMetadata: OrganizationPrivateMetadata | undefined,
|
|
97
97
|
/**
|
|
98
|
-
* The maximum number of memberships allowed in the
|
|
98
|
+
* The maximum number of memberships allowed in the Organization.
|
|
99
99
|
*/
|
|
100
100
|
maxAllowedMemberships: number,
|
|
101
101
|
/**
|
|
102
|
-
* Whether the
|
|
102
|
+
* Whether the Organization allows admins to delete users.
|
|
103
103
|
*/
|
|
104
104
|
adminDeleteEnabled: boolean,
|
|
105
105
|
/**
|
|
106
|
-
* The number of members in the
|
|
106
|
+
* The number of members in the Organization.
|
|
107
107
|
*/
|
|
108
108
|
membersCount?: number | undefined,
|
|
109
109
|
/**
|
|
110
|
-
* The ID of the user who created the
|
|
110
|
+
* The ID of the user who created the Organization.
|
|
111
111
|
*/
|
|
112
112
|
createdBy?: string | undefined);
|
|
113
113
|
static fromJSON(data: OrganizationJSON): Organization;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { OrganizationInvitationStatus, OrganizationMembershipRole } from './Enums';
|
|
2
2
|
import type { OrganizationInvitationJSON, PublicOrganizationDataJSON } from './JSON';
|
|
3
3
|
/**
|
|
4
|
-
* The Backend `OrganizationInvitation` object is similar to the [`OrganizationInvitation`](https://clerk.com/docs/reference/javascript/types/organization-invitation) object as it's the model around an
|
|
4
|
+
* The Backend `OrganizationInvitation` object is similar to the [`OrganizationInvitation`](https://clerk.com/docs/reference/javascript/types/organization-invitation) object as it's the model around an Organization invitation. However, the Backend `OrganizationInvitation` object is different in that it's used in the [Backend API](https://clerk.com/docs/reference/backend-api/tag/Organization-Invitations#operation/CreateOrganizationInvitation){{ target: '_blank' }} and is not directly accessible from the Frontend API.
|
|
5
5
|
*/
|
|
6
6
|
export declare class OrganizationInvitation {
|
|
7
7
|
/**
|
|
@@ -13,11 +13,11 @@ export declare class OrganizationInvitation {
|
|
|
13
13
|
*/
|
|
14
14
|
readonly emailAddress: string;
|
|
15
15
|
/**
|
|
16
|
-
* The
|
|
16
|
+
* The Role of the invited user.
|
|
17
17
|
*/
|
|
18
18
|
readonly role: OrganizationMembershipRole;
|
|
19
19
|
/**
|
|
20
|
-
* The name of the
|
|
20
|
+
* The name of the Role of the invited user.
|
|
21
21
|
*/
|
|
22
22
|
readonly roleName: string;
|
|
23
23
|
/**
|
|
@@ -53,7 +53,7 @@ export declare class OrganizationInvitation {
|
|
|
53
53
|
*/
|
|
54
54
|
readonly privateMetadata: OrganizationInvitationPrivateMetadata;
|
|
55
55
|
/**
|
|
56
|
-
* Public data about the
|
|
56
|
+
* Public data about the Organization that the user is invited to.
|
|
57
57
|
*/
|
|
58
58
|
readonly publicOrganizationData?: (PublicOrganizationDataJSON | null) | undefined;
|
|
59
59
|
private _raw;
|
|
@@ -68,11 +68,11 @@ export declare class OrganizationInvitation {
|
|
|
68
68
|
*/
|
|
69
69
|
emailAddress: string,
|
|
70
70
|
/**
|
|
71
|
-
* The
|
|
71
|
+
* The Role of the invited user.
|
|
72
72
|
*/
|
|
73
73
|
role: OrganizationMembershipRole,
|
|
74
74
|
/**
|
|
75
|
-
* The name of the
|
|
75
|
+
* The name of the Role of the invited user.
|
|
76
76
|
*/
|
|
77
77
|
roleName: string,
|
|
78
78
|
/**
|
|
@@ -108,7 +108,7 @@ export declare class OrganizationInvitation {
|
|
|
108
108
|
*/
|
|
109
109
|
privateMetadata?: OrganizationInvitationPrivateMetadata,
|
|
110
110
|
/**
|
|
111
|
-
* Public data about the
|
|
111
|
+
* Public data about the Organization that the user is invited to.
|
|
112
112
|
*/
|
|
113
113
|
publicOrganizationData?: (PublicOrganizationDataJSON | null) | undefined);
|
|
114
114
|
static fromJSON(data: OrganizationInvitationJSON): OrganizationInvitation;
|
|
@@ -2,7 +2,7 @@ import { Organization } from '../resources';
|
|
|
2
2
|
import type { OrganizationMembershipRole } from './Enums';
|
|
3
3
|
import type { OrganizationMembershipJSON, OrganizationMembershipPublicUserDataJSON } from './JSON';
|
|
4
4
|
/**
|
|
5
|
-
* The Backend `OrganizationMembership` object is similar to the [`OrganizationMembership`](https://clerk.com/docs/reference/javascript/types/organization-membership) object as it's the model around an
|
|
5
|
+
* The Backend `OrganizationMembership` object is similar to the [`OrganizationMembership`](https://clerk.com/docs/reference/javascript/types/organization-membership) object as it's the model around an Organization membership entity and describes the relationship between users and Organizations. However, the Backend `OrganizationMembership` object is different in that it's used in the [Backend API](https://clerk.com/docs/reference/backend-api/tag/Organization-Memberships#operation/CreateOrganizationMembership){{ target: '_blank' }} and is not directly accessible from the Frontend API.
|
|
6
6
|
*/
|
|
7
7
|
export declare class OrganizationMembership {
|
|
8
8
|
/**
|
|
@@ -10,11 +10,11 @@ export declare class OrganizationMembership {
|
|
|
10
10
|
*/
|
|
11
11
|
readonly id: string;
|
|
12
12
|
/**
|
|
13
|
-
* The
|
|
13
|
+
* The Role of the user.
|
|
14
14
|
*/
|
|
15
15
|
readonly role: OrganizationMembershipRole;
|
|
16
16
|
/**
|
|
17
|
-
* The
|
|
17
|
+
* The Permissions granted to the user in the Organization.
|
|
18
18
|
*/
|
|
19
19
|
readonly permissions: string[];
|
|
20
20
|
/**
|
|
@@ -34,7 +34,7 @@ export declare class OrganizationMembership {
|
|
|
34
34
|
*/
|
|
35
35
|
readonly updatedAt: number;
|
|
36
36
|
/**
|
|
37
|
-
* The
|
|
37
|
+
* The Organization that the user is a member of.
|
|
38
38
|
*/
|
|
39
39
|
readonly organization: Organization;
|
|
40
40
|
/**
|
|
@@ -49,11 +49,11 @@ export declare class OrganizationMembership {
|
|
|
49
49
|
*/
|
|
50
50
|
id: string,
|
|
51
51
|
/**
|
|
52
|
-
* The
|
|
52
|
+
* The Role of the user.
|
|
53
53
|
*/
|
|
54
54
|
role: OrganizationMembershipRole,
|
|
55
55
|
/**
|
|
56
|
-
* The
|
|
56
|
+
* The Permissions granted to the user in the Organization.
|
|
57
57
|
*/
|
|
58
58
|
permissions: string[],
|
|
59
59
|
/**
|
|
@@ -73,7 +73,7 @@ export declare class OrganizationMembership {
|
|
|
73
73
|
*/
|
|
74
74
|
updatedAt: number,
|
|
75
75
|
/**
|
|
76
|
-
* The
|
|
76
|
+
* The Organization that the user is a member of.
|
|
77
77
|
*/
|
|
78
78
|
organization: Organization,
|
|
79
79
|
/**
|