@clerk/backend 3.9.0 → 3.9.1-canary.v20260630202316
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 +62 -37
- package/dist/api/endpoints/APIKeysApi.d.ts.map +1 -1
- package/dist/api/endpoints/AgentTaskApi.d.ts +20 -27
- package/dist/api/endpoints/AgentTaskApi.d.ts.map +1 -1
- package/dist/api/endpoints/AllowlistIdentifierApi.d.ts +18 -2
- package/dist/api/endpoints/AllowlistIdentifierApi.d.ts.map +1 -1
- package/dist/api/endpoints/BillingApi.d.ts +27 -9
- package/dist/api/endpoints/BillingApi.d.ts.map +1 -1
- package/dist/api/endpoints/ClientApi.d.ts +19 -0
- package/dist/api/endpoints/ClientApi.d.ts.map +1 -1
- package/dist/api/endpoints/DomainApi.d.ts +31 -21
- package/dist/api/endpoints/DomainApi.d.ts.map +1 -1
- package/dist/api/endpoints/EmailAddressApi.d.ts +30 -3
- package/dist/api/endpoints/EmailAddressApi.d.ts.map +1 -1
- package/dist/api/endpoints/EnterpriseConnectionApi.d.ts +75 -4
- package/dist/api/endpoints/EnterpriseConnectionApi.d.ts.map +1 -1
- package/dist/api/endpoints/InstanceApi.d.ts +46 -41
- package/dist/api/endpoints/InstanceApi.d.ts.map +1 -1
- package/dist/api/endpoints/InvitationApi.d.ts +42 -13
- package/dist/api/endpoints/InvitationApi.d.ts.map +1 -1
- package/dist/api/endpoints/M2MTokenApi.d.ts +48 -49
- package/dist/api/endpoints/M2MTokenApi.d.ts.map +1 -1
- package/dist/api/endpoints/MachineApi.d.ts +58 -42
- package/dist/api/endpoints/MachineApi.d.ts.map +1 -1
- package/dist/api/endpoints/OAuthApplicationsApi.d.ts +49 -28
- package/dist/api/endpoints/OAuthApplicationsApi.d.ts.map +1 -1
- package/dist/api/endpoints/OrganizationApi.d.ts +247 -68
- package/dist/api/endpoints/OrganizationApi.d.ts.map +1 -1
- package/dist/api/endpoints/PhoneNumberApi.d.ts +32 -3
- package/dist/api/endpoints/PhoneNumberApi.d.ts.map +1 -1
- package/dist/api/endpoints/RedirectUrlApi.d.ts +21 -2
- package/dist/api/endpoints/RedirectUrlApi.d.ts.map +1 -1
- package/dist/api/endpoints/SessionApi.d.ts +47 -12
- package/dist/api/endpoints/SessionApi.d.ts.map +1 -1
- package/dist/api/endpoints/SignInTokenApi.d.ts +14 -2
- package/dist/api/endpoints/SignInTokenApi.d.ts.map +1 -1
- package/dist/api/endpoints/TestingTokenApi.d.ts +5 -0
- package/dist/api/endpoints/TestingTokenApi.d.ts.map +1 -1
- package/dist/api/endpoints/UserApi.d.ts +371 -61
- package/dist/api/endpoints/UserApi.d.ts.map +1 -1
- package/dist/api/endpoints/WaitlistEntryApi.d.ts +31 -24
- package/dist/api/endpoints/WaitlistEntryApi.d.ts.map +1 -1
- package/dist/api/endpoints/index.d.ts +2 -1
- package/dist/api/endpoints/index.d.ts.map +1 -1
- package/dist/api/resources/APIKey.d.ts +32 -96
- package/dist/api/resources/APIKey.d.ts.map +1 -1
- package/dist/api/resources/AgentTask.d.ts +11 -32
- package/dist/api/resources/AgentTask.d.ts.map +1 -1
- package/dist/api/resources/AllowlistIdentifier.d.ts +15 -39
- package/dist/api/resources/AllowlistIdentifier.d.ts.map +1 -1
- package/dist/api/resources/Client.d.ts +19 -55
- package/dist/api/resources/Client.d.ts.map +1 -1
- package/dist/api/resources/CommercePlan.d.ts +33 -97
- package/dist/api/resources/CommercePlan.d.ts.map +1 -1
- package/dist/api/resources/CommerceSubscription.d.ts +25 -61
- package/dist/api/resources/CommerceSubscription.d.ts.map +1 -1
- package/dist/api/resources/CommerceSubscriptionItem.d.ts +39 -115
- package/dist/api/resources/CommerceSubscriptionItem.d.ts.map +1 -1
- package/dist/api/resources/DeletedObject.d.ts +16 -1
- package/dist/api/resources/DeletedObject.d.ts.map +1 -1
- package/dist/api/resources/Domain.d.ts +26 -1
- package/dist/api/resources/Domain.d.ts.map +1 -1
- package/dist/api/resources/EmailAddress.d.ts +8 -24
- package/dist/api/resources/EmailAddress.d.ts.map +1 -1
- package/dist/api/resources/EnterpriseAccount.d.ts +26 -78
- package/dist/api/resources/EnterpriseAccount.d.ts.map +1 -1
- package/dist/api/resources/EnterpriseConnection.d.ts +34 -86
- package/dist/api/resources/EnterpriseConnection.d.ts.map +1 -1
- package/dist/api/resources/Enums.d.ts +9 -15
- package/dist/api/resources/Enums.d.ts.map +1 -1
- package/dist/api/resources/ExternalAccount.d.ts +30 -92
- package/dist/api/resources/ExternalAccount.d.ts.map +1 -1
- package/dist/api/resources/Feature.d.ts +10 -30
- package/dist/api/resources/Feature.d.ts.map +1 -1
- package/dist/api/resources/IdentificationLink.d.ts +5 -13
- package/dist/api/resources/IdentificationLink.d.ts.map +1 -1
- package/dist/api/resources/Instance.d.ts +11 -1
- package/dist/api/resources/Instance.d.ts.map +1 -1
- package/dist/api/resources/InstanceRestrictions.d.ts +17 -1
- package/dist/api/resources/InstanceRestrictions.d.ts.map +1 -1
- package/dist/api/resources/Invitation.d.ts +16 -48
- package/dist/api/resources/Invitation.d.ts.map +1 -1
- package/dist/api/resources/JSON.d.ts +5 -15
- package/dist/api/resources/JSON.d.ts.map +1 -1
- package/dist/api/resources/M2MToken.d.ts +35 -2
- package/dist/api/resources/M2MToken.d.ts.map +1 -1
- package/dist/api/resources/Machine.d.ts +25 -1
- package/dist/api/resources/Machine.d.ts.map +1 -1
- package/dist/api/resources/MachineScope.d.ts +13 -1
- package/dist/api/resources/MachineScope.d.ts.map +1 -1
- package/dist/api/resources/MachineSecretKey.d.ts +0 -3
- package/dist/api/resources/MachineSecretKey.d.ts.map +1 -1
- package/dist/api/resources/OAuthApplication.d.ts +40 -120
- package/dist/api/resources/OAuthApplication.d.ts.map +1 -1
- package/dist/api/resources/OauthAccessToken.d.ts +18 -56
- package/dist/api/resources/OauthAccessToken.d.ts.map +1 -1
- package/dist/api/resources/Organization.d.ts +26 -78
- package/dist/api/resources/Organization.d.ts.map +1 -1
- package/dist/api/resources/OrganizationDomain.d.ts +48 -1
- package/dist/api/resources/OrganizationDomain.d.ts.map +1 -1
- package/dist/api/resources/OrganizationInvitation.d.ts +26 -78
- package/dist/api/resources/OrganizationInvitation.d.ts.map +1 -1
- package/dist/api/resources/OrganizationMembership.d.ts +18 -54
- package/dist/api/resources/OrganizationMembership.d.ts.map +1 -1
- package/dist/api/resources/OrganizationSettings.d.ts +48 -1
- package/dist/api/resources/OrganizationSettings.d.ts.map +1 -1
- package/dist/api/resources/Permission.d.ts +12 -36
- package/dist/api/resources/Permission.d.ts.map +1 -1
- package/dist/api/resources/PhoneNumber.d.ts +12 -36
- package/dist/api/resources/PhoneNumber.d.ts.map +1 -1
- package/dist/api/resources/RedirectUrl.d.ts +6 -18
- package/dist/api/resources/RedirectUrl.d.ts.map +1 -1
- package/dist/api/resources/Role.d.ts +17 -49
- package/dist/api/resources/Role.d.ts.map +1 -1
- package/dist/api/resources/RoleSet.d.ts +17 -49
- package/dist/api/resources/RoleSet.d.ts.map +1 -1
- package/dist/api/resources/SamlConnection.d.ts +43 -127
- package/dist/api/resources/SamlConnection.d.ts.map +1 -1
- package/dist/api/resources/Session.d.ts +41 -121
- package/dist/api/resources/Session.d.ts.map +1 -1
- package/dist/api/resources/SignInTokens.d.ts +25 -1
- package/dist/api/resources/SignInTokens.d.ts.map +1 -1
- package/dist/api/resources/TestingToken.d.ts +8 -1
- package/dist/api/resources/TestingToken.d.ts.map +1 -1
- package/dist/api/resources/User.d.ts +66 -198
- package/dist/api/resources/User.d.ts.map +1 -1
- package/dist/api/resources/Verification.d.ts +26 -37
- package/dist/api/resources/Verification.d.ts.map +1 -1
- package/dist/api/resources/WaitlistEntry.d.ts +15 -43
- package/dist/api/resources/WaitlistEntry.d.ts.map +1 -1
- package/dist/api/resources/Web3Wallet.d.ts +6 -18
- package/dist/api/resources/Web3Wallet.d.ts.map +1 -1
- package/dist/api/resources/index.d.ts +1 -1
- package/dist/api/resources/index.d.ts.map +1 -1
- package/dist/{chunk-VJDTWTY2.mjs → chunk-Z4DAU5NO.mjs} +627 -40
- package/dist/chunk-Z4DAU5NO.mjs.map +1 -0
- package/dist/index.js +626 -39
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/internal.js +626 -39
- package/dist/internal.js.map +1 -1
- package/dist/internal.mjs +1 -1
- package/package.json +2 -2
- package/dist/chunk-VJDTWTY2.mjs.map +0 -1
|
@@ -3,74 +3,99 @@ import type { PaginatedResourceResponse } from '../../api/resources/Deserializer
|
|
|
3
3
|
import type { APIKey } from '../resources/APIKey';
|
|
4
4
|
import type { DeletedObject } from '../resources/DeletedObject';
|
|
5
5
|
import { AbstractAPI } from './AbstractApi';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
*/
|
|
6
|
+
/** @generateWithEmptyComment */
|
|
7
|
+
export type GetAPIKeyListParams = ClerkPaginationRequest<{
|
|
8
|
+
/** The user or Organization ID to query API keys by. */
|
|
10
9
|
subject: string;
|
|
11
|
-
/**
|
|
12
|
-
* Whether to include invalid API keys.
|
|
13
|
-
*
|
|
14
|
-
* @default false
|
|
15
|
-
*/
|
|
10
|
+
/** Whether to include invalid API keys (revoked or expired). Defaults to `false`. */
|
|
16
11
|
includeInvalid?: boolean;
|
|
17
12
|
}>;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
*/
|
|
13
|
+
/** @generateWithEmptyComment */
|
|
14
|
+
export type CreateAPIKeyParams = {
|
|
15
|
+
/** A descriptive name for the API key (e.g., "Production API Key", "Development Key"). */
|
|
22
16
|
name: string;
|
|
23
|
-
/**
|
|
24
|
-
* The user or Organization ID to associate the API key with
|
|
25
|
-
*/
|
|
17
|
+
/** The user or Organization ID to associate the API key with. */
|
|
26
18
|
subject: string;
|
|
27
|
-
/**
|
|
28
|
-
* API key description
|
|
29
|
-
*/
|
|
19
|
+
/** The description of the API key. */
|
|
30
20
|
description?: string | null;
|
|
21
|
+
/** Custom claims to store additional information about the API key. */
|
|
31
22
|
claims?: Record<string, any> | null;
|
|
23
|
+
/** Scopes to limit the API key's access to specific resources. */
|
|
32
24
|
scopes?: string[];
|
|
25
|
+
/** The user ID of the user who created the API key. */
|
|
33
26
|
createdBy?: string | null;
|
|
27
|
+
/** The number of seconds until the API key expires. Defaults to `null` (never expires). */
|
|
34
28
|
secondsUntilExpiration?: number | null;
|
|
35
29
|
};
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
*/
|
|
30
|
+
/** @generateWithEmptyComment */
|
|
31
|
+
export type RevokeAPIKeyParams = {
|
|
32
|
+
/** The ID of the API key to revoke. */
|
|
40
33
|
apiKeyId: string;
|
|
41
|
-
/**
|
|
42
|
-
* Reason for revocation
|
|
43
|
-
*/
|
|
34
|
+
/** The reason for revoking the API key. Useful for your records. */
|
|
44
35
|
revocationReason?: string | null;
|
|
45
36
|
};
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
*/
|
|
37
|
+
/** @generateWithEmptyComment */
|
|
38
|
+
export type UpdateAPIKeyParams = {
|
|
39
|
+
/** The ID of the API key to update. */
|
|
50
40
|
apiKeyId: string;
|
|
51
|
-
/**
|
|
52
|
-
* The user or Organization ID to associate the API key with
|
|
53
|
-
*/
|
|
41
|
+
/** The user or Organization ID to associate the API key with. */
|
|
54
42
|
subject: string;
|
|
55
|
-
/**
|
|
56
|
-
* API key description
|
|
57
|
-
*/
|
|
43
|
+
/** The description of the API key. */
|
|
58
44
|
description?: string | null;
|
|
45
|
+
/** Custom claims to store additional information about the API key. */
|
|
59
46
|
claims?: Record<string, any> | null;
|
|
47
|
+
/** Scopes to limit the API key's access to specific resources. */
|
|
60
48
|
scopes?: string[];
|
|
49
|
+
/** The number of seconds until the API key expires. Defaults to `null` (never expires). */
|
|
61
50
|
secondsUntilExpiration?: number | null;
|
|
62
51
|
};
|
|
52
|
+
/** @generateWithEmptyComment */
|
|
63
53
|
export declare class APIKeysAPI extends AbstractAPI {
|
|
54
|
+
/**
|
|
55
|
+
* Gets a list of API keys for the given user or Organization. By default, the list is returned in descending order by creation date (newest first).
|
|
56
|
+
* @returns A [`PaginatedResourceResponse`](https://clerk.com/docs/reference/backend/types/paginated-resource-response) object with a `data` property containing an array of [`APIKey`](https://clerk.com/docs/reference/backend/types/backend-api-key) objects and a `totalCount` property containing the total number of API keys for the user or Organization.
|
|
57
|
+
*/
|
|
64
58
|
list(queryParams: GetAPIKeyListParams): Promise<PaginatedResourceResponse<APIKey[]>>;
|
|
59
|
+
/**
|
|
60
|
+
* Creates a new API key for the given user or Organization.
|
|
61
|
+
* @returns The created [`APIKey`](https://clerk.com/docs/reference/backend/types/backend-api-key) object.
|
|
62
|
+
*/
|
|
65
63
|
create(params: CreateAPIKeyParams): Promise<APIKey>;
|
|
64
|
+
/**
|
|
65
|
+
* Gets the given [`APIKey`](https://clerk.com/docs/reference/backend/types/backend-api-key) object.
|
|
66
|
+
* @param apiKeyId - The ID of the API key to get.
|
|
67
|
+
*/
|
|
66
68
|
get(apiKeyId: string): Promise<APIKey>;
|
|
69
|
+
/**
|
|
70
|
+
* Updates the given API key.
|
|
71
|
+
* @returns The updated [`APIKey`](https://clerk.com/docs/reference/backend/types/backend-api-key) object.
|
|
72
|
+
*/
|
|
67
73
|
update(params: UpdateAPIKeyParams): Promise<APIKey>;
|
|
74
|
+
/**
|
|
75
|
+
* Deletes the given API key.
|
|
76
|
+
* @param apiKeyId - The ID of the API key to delete.
|
|
77
|
+
* @returns The [`DeletedObject`](https://clerk.com/docs/reference/backend/types/deleted-object) object.
|
|
78
|
+
*/
|
|
68
79
|
delete(apiKeyId: string): Promise<DeletedObject>;
|
|
80
|
+
/**
|
|
81
|
+
* Revokes the given API key. This will immediately invalidate the API key and prevent it from being used to authenticate any future requests.
|
|
82
|
+
* @returns The revoked [`APIKey`](https://clerk.com/docs/reference/backend/types/backend-api-key) object.
|
|
83
|
+
*/
|
|
69
84
|
revoke(params: RevokeAPIKeyParams): Promise<APIKey>;
|
|
85
|
+
/**
|
|
86
|
+
* Gets the secret of the given API key.
|
|
87
|
+
* @param apiKeyId - The ID of the API key to get the secret of.
|
|
88
|
+
*/
|
|
70
89
|
getSecret(apiKeyId: string): Promise<{
|
|
71
90
|
secret: string;
|
|
72
91
|
}>;
|
|
92
|
+
/**
|
|
93
|
+
* Verifies the given API key.
|
|
94
|
+
* - If the API key is valid, the method returns the API key object with its properties.
|
|
95
|
+
* - If the API key is invalid, revoked, or expired, the method will throw an error.
|
|
96
|
+
* @param secret - The secret of the API key to verify.
|
|
97
|
+
* @returns The verified [`APIKey`](https://clerk.com/docs/reference/backend/types/backend-api-key) object.
|
|
98
|
+
*/
|
|
73
99
|
verify(secret: string): Promise<APIKey>;
|
|
74
100
|
}
|
|
75
|
-
export {};
|
|
76
101
|
//# sourceMappingURL=APIKeysApi.d.ts.map
|
|
@@ -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;AAElF,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,
|
|
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;AAElF,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,gCAAgC;AAChC,MAAM,MAAM,mBAAmB,GAAG,sBAAsB,CAAC;IACvD,wDAAwD;IACxD,OAAO,EAAE,MAAM,CAAC;IAChB,qFAAqF;IACrF,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC,CAAC;AAEH,gCAAgC;AAChC,MAAM,MAAM,kBAAkB,GAAG;IAC/B,0FAA0F;IAC1F,IAAI,EAAE,MAAM,CAAC;IACb,iEAAiE;IACjE,OAAO,EAAE,MAAM,CAAC;IAChB,sCAAsC;IACtC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,uEAAuE;IACvE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IACpC,kEAAkE;IAClE,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,2FAA2F;IAC3F,sBAAsB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACxC,CAAC;AAEF,gCAAgC;AAChC,MAAM,MAAM,kBAAkB,GAAG;IAC/B,uCAAuC;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,oEAAoE;IACpE,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC,CAAC;AAEF,gCAAgC;AAChC,MAAM,MAAM,kBAAkB,GAAG;IAC/B,uCAAuC;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,iEAAiE;IACjE,OAAO,EAAE,MAAM,CAAC;IAChB,sCAAsC;IACtC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,uEAAuE;IACvE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IACpC,kEAAkE;IAClE,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,2FAA2F;IAC3F,sBAAsB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACxC,CAAC;AAEF,gCAAgC;AAChC,qBAAa,UAAW,SAAQ,WAAW;IACzC;;;OAGG;IACG,IAAI,CAAC,WAAW,EAAE,mBAAmB;IAQ3C;;;OAGG;IACG,MAAM,CAAC,MAAM,EAAE,kBAAkB;IAQvC;;;OAGG;IACG,GAAG,CAAC,QAAQ,EAAE,MAAM;IAS1B;;;OAGG;IACG,MAAM,CAAC,MAAM,EAAE,kBAAkB;IAYvC;;;;OAIG;IACG,MAAM,CAAC,QAAQ,EAAE,MAAM;IAS7B;;;OAGG;IACG,MAAM,CAAC,MAAM,EAAE,kBAAkB;IAYvC;;;OAGG;IACG,SAAS,CAAC,QAAQ,EAAE,MAAM;gBAGA,MAAM;;IAMtC;;;;;;OAMG;IACG,MAAM,CAAC,MAAM,EAAE,MAAM;CAO5B"}
|
|
@@ -1,47 +1,40 @@
|
|
|
1
1
|
import type { AgentTask } from '../resources/AgentTask';
|
|
2
2
|
import { AbstractAPI } from './AbstractApi';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
*/
|
|
3
|
+
/** @generateWithEmptyComment */
|
|
4
|
+
export type CreateAgentTaskParams = {
|
|
5
|
+
/** The user to create an Agent Task for. Provide either a `userId` or an `identifier` (e.g. an email address, phone number, or username). */
|
|
7
6
|
onBehalfOf: {
|
|
8
|
-
/**
|
|
9
|
-
* The identifier of the user to create an agent task for.
|
|
10
|
-
*/
|
|
7
|
+
/** The identifier of the user to create an Agent Task for. */
|
|
11
8
|
identifier: string;
|
|
12
9
|
userId?: never;
|
|
13
10
|
} | {
|
|
14
|
-
/**
|
|
15
|
-
* The ID of the user to create an agent task for.
|
|
16
|
-
*/
|
|
11
|
+
/** The ID of the user to create an Agent Task for. */
|
|
17
12
|
userId: string;
|
|
18
13
|
identifier?: never;
|
|
19
14
|
};
|
|
20
|
-
/**
|
|
21
|
-
* The permissions the agent task will have.
|
|
22
|
-
*/
|
|
15
|
+
/** The permissions the Agent Task will have. Currently, `'*'` is the only supported value, which grants all permissions. */
|
|
23
16
|
permissions: string;
|
|
24
|
-
/**
|
|
25
|
-
* The name of the agent to create an agent task for.
|
|
26
|
-
*/
|
|
17
|
+
/** The name of the agent creating the task. Used to derive a stable `agent_id` for the Agent Task. */
|
|
27
18
|
agentName: string;
|
|
28
|
-
/**
|
|
29
|
-
* The description of the agent task to create.
|
|
30
|
-
*/
|
|
19
|
+
/** The description of the Agent Task to create. */
|
|
31
20
|
taskDescription: string;
|
|
32
|
-
/**
|
|
33
|
-
* The URL to redirect to after the agent task is consumed.
|
|
34
|
-
*/
|
|
21
|
+
/** The URL the user lands on after the Agent Task is accepted. In production instances, must be a valid absolute URL with an `https` scheme. In development instances, `http` is also permitted. The URL's domain must belong to one of the instance's associated domains (primary or satellite); otherwise, the redirect will be rejected when the task ticket is consumed. */
|
|
35
22
|
redirectUrl: string;
|
|
36
|
-
/**
|
|
37
|
-
* The maximum duration that the session which will be created by the generated agent task should last.
|
|
38
|
-
* By default, the duration is 30 minutes.
|
|
39
|
-
*/
|
|
23
|
+
/** The maximum duration that the session created by the Agent Task should last. By default, the duration is `1800` (30 minutes). */
|
|
40
24
|
sessionMaxDurationInSeconds?: number;
|
|
41
25
|
};
|
|
26
|
+
/** @generateWithEmptyComment */
|
|
42
27
|
export declare class AgentTaskAPI extends AbstractAPI {
|
|
28
|
+
/**
|
|
29
|
+
* Creates an Agent Task that generates a URL which, when visited, creates a session for the specified user. This is useful for automated testing or agent-driven flows where full authentication isn't practical.
|
|
30
|
+
* @returns The created [`AgentTask`](https://clerk.com/docs/reference/backend/types/backend-agent-task) object.
|
|
31
|
+
*/
|
|
43
32
|
create(params: CreateAgentTaskParams): Promise<AgentTask>;
|
|
33
|
+
/**
|
|
34
|
+
* Revokes the given Agent Task.
|
|
35
|
+
* @param agentTaskId - The ID of the Agent Task to revoke.
|
|
36
|
+
* @returns The revoked [`AgentTask`](https://clerk.com/docs/reference/backend/types/backend-agent-task) object.
|
|
37
|
+
*/
|
|
44
38
|
revoke(agentTaskId: string): Promise<Omit<AgentTask, "url">>;
|
|
45
39
|
}
|
|
46
|
-
export {};
|
|
47
40
|
//# sourceMappingURL=AgentTaskApi.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentTaskApi.d.ts","sourceRoot":"","sources":["../../../src/api/endpoints/AgentTaskApi.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,
|
|
1
|
+
{"version":3,"file":"AgentTaskApi.d.ts","sourceRoot":"","sources":["../../../src/api/endpoints/AgentTaskApi.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,gCAAgC;AAChC,MAAM,MAAM,qBAAqB,GAAG;IAClC,6IAA6I;IAC7I,UAAU,EACN;QACE,8DAA8D;QAC9D,UAAU,EAAE,MAAM,CAAC;QACnB,MAAM,CAAC,EAAE,KAAK,CAAC;KAChB,GACD;QACE,sDAAsD;QACtD,MAAM,EAAE,MAAM,CAAC;QACf,UAAU,CAAC,EAAE,KAAK,CAAC;KACpB,CAAC;IACN,4HAA4H;IAC5H,WAAW,EAAE,MAAM,CAAC;IACpB,sGAAsG;IACtG,SAAS,EAAE,MAAM,CAAC;IAClB,mDAAmD;IACnD,eAAe,EAAE,MAAM,CAAC;IACxB,gXAAgX;IAChX,WAAW,EAAE,MAAM,CAAC;IACpB,oIAAoI;IACpI,2BAA2B,CAAC,EAAE,MAAM,CAAC;CACtC,CAAC;AAIF,gCAAgC;AAChC,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;OAGG;IACU,MAAM,CAAC,MAAM,EAAE,qBAAqB;IAWjD;;;;OAIG;IACU,MAAM,CAAC,WAAW,EAAE,MAAM;CAOxC"}
|
|
@@ -3,14 +3,30 @@ import type { AllowlistIdentifier } from '../resources/AllowlistIdentifier';
|
|
|
3
3
|
import type { DeletedObject } from '../resources/DeletedObject';
|
|
4
4
|
import type { PaginatedResourceResponse } from '../resources/Deserializer';
|
|
5
5
|
import { AbstractAPI } from './AbstractApi';
|
|
6
|
-
|
|
6
|
+
/** @generateWithEmptyComment */
|
|
7
|
+
export type AllowlistIdentifierCreateParams = {
|
|
8
|
+
/** The identifier to add to the allowlist. Can be an email address, a domain in wildcard email format (e.g. `*@example.com`), a phone number in international E.164 format (e.g. `+15555555555`), or a Web3 wallet address. */
|
|
7
9
|
identifier: string;
|
|
10
|
+
/** Whether to notify the user that their identifier has been added to the allowlist. Notifies the user if the `identifier` is an email address or phone number. */
|
|
8
11
|
notify: boolean;
|
|
9
12
|
};
|
|
13
|
+
/** @generateWithEmptyComment */
|
|
10
14
|
export declare class AllowlistIdentifierAPI extends AbstractAPI {
|
|
15
|
+
/**
|
|
16
|
+
* Gets the list of allowlist identifiers for the instance. By default, the list is returned in descending order by creation date (newest first).
|
|
17
|
+
* @returns A [`PaginatedResourceResponse`](https://clerk.com/docs/reference/backend/types/paginated-resource-response) object with a `data` property containing an array of [`AllowlistIdentifier`](https://clerk.com/docs/reference/backend/types/backend-allowlist-identifier) objects and a `totalCount` property containing the total number of allowlist identifiers for the instance.
|
|
18
|
+
*/
|
|
11
19
|
getAllowlistIdentifierList(params?: ClerkPaginationRequest): Promise<PaginatedResourceResponse<AllowlistIdentifier[]>>;
|
|
20
|
+
/**
|
|
21
|
+
* Creates a new allowlist identifier.
|
|
22
|
+
* @returns The created [`AllowlistIdentifier`](https://clerk.com/docs/reference/backend/types/backend-allowlist-identifier) object.
|
|
23
|
+
*/
|
|
12
24
|
createAllowlistIdentifier(params: AllowlistIdentifierCreateParams): Promise<AllowlistIdentifier>;
|
|
25
|
+
/**
|
|
26
|
+
* Deletes an allowlist identifier.
|
|
27
|
+
* @param allowlistIdentifierId - The ID of the allowlist identifier to delete.
|
|
28
|
+
* @returns The [`DeletedObject`](https://clerk.com/docs/reference/backend/types/deleted-object) object.
|
|
29
|
+
*/
|
|
13
30
|
deleteAllowlistIdentifier(allowlistIdentifierId: string): Promise<DeletedObject>;
|
|
14
31
|
}
|
|
15
|
-
export {};
|
|
16
32
|
//# sourceMappingURL=AllowlistIdentifierApi.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AllowlistIdentifierApi.d.ts","sourceRoot":"","sources":["../../../src/api/endpoints/AllowlistIdentifierApi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAGlE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,
|
|
1
|
+
{"version":3,"file":"AllowlistIdentifierApi.d.ts","sourceRoot":"","sources":["../../../src/api/endpoints/AllowlistIdentifierApi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAGlE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,gCAAgC;AAChC,MAAM,MAAM,+BAA+B,GAAG;IAC5C,+NAA+N;IAC/N,UAAU,EAAE,MAAM,CAAC;IACnB,mKAAmK;IACnK,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,gCAAgC;AAChC,qBAAa,sBAAuB,SAAQ,WAAW;IACrD;;;OAGG;IACU,0BAA0B,CAAC,MAAM,GAAE,sBAA2B;IAQ3E;;;OAGG;IACU,yBAAyB,CAAC,MAAM,EAAE,+BAA+B;IAQ9E;;;;OAIG;IACU,yBAAyB,CAAC,qBAAqB,EAAE,MAAM;CAOrE"}
|
|
@@ -4,44 +4,62 @@ import type { BillingSubscription } from '../resources/CommerceSubscription';
|
|
|
4
4
|
import type { BillingSubscriptionItem } from '../resources/CommerceSubscriptionItem';
|
|
5
5
|
import type { PaginatedResourceResponse } from '../resources/Deserializer';
|
|
6
6
|
import { AbstractAPI } from './AbstractApi';
|
|
7
|
-
|
|
7
|
+
/** @generateWithEmptyComment */
|
|
8
|
+
export type GetPlanListParams = ClerkPaginationRequest<{
|
|
9
|
+
/**
|
|
10
|
+
* Filters plans by the type of payer.
|
|
11
|
+
*/
|
|
8
12
|
payerType: 'org' | 'user';
|
|
9
13
|
}>;
|
|
10
|
-
|
|
14
|
+
/** @inline */
|
|
15
|
+
export type CancelSubscriptionItemParams = {
|
|
11
16
|
/**
|
|
12
|
-
*
|
|
13
|
-
* @default undefined
|
|
17
|
+
* Whether the Subscription Item should be canceled immediately. If `false`, the Subscription Item will be canceled at the end of the current billing period.
|
|
14
18
|
*/
|
|
15
19
|
endNow?: boolean;
|
|
16
20
|
};
|
|
17
|
-
|
|
21
|
+
/** @inline */
|
|
22
|
+
export type ExtendSubscriptionItemFreeTrialParams = {
|
|
18
23
|
/**
|
|
19
|
-
*
|
|
20
|
-
* Must be in the future and not more than 365 days from the current trial end.
|
|
24
|
+
* The date to extend the free trial to. Must be in the future and not more than 365 days from the current trial end date.
|
|
21
25
|
*/
|
|
22
26
|
extendTo: Date;
|
|
23
27
|
};
|
|
28
|
+
/** @generateWithEmptyComment */
|
|
24
29
|
export declare class BillingAPI extends AbstractAPI {
|
|
25
30
|
/**
|
|
31
|
+
* Gets the list of Billing Plans for the instance. By default, the list is returned in descending order by creation date (newest first).
|
|
32
|
+
* @returns A [`PaginatedResourceResponse`](https://clerk.com/docs/reference/backend/types/paginated-resource-response) object with a `data` property containing an array of [`BillingPlan`](https://clerk.com/docs/reference/backend/types/billing-plan) objects and a `totalCount` property containing the total number of Billing Plans for the instance.
|
|
26
33
|
* @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.
|
|
27
34
|
*/
|
|
28
|
-
getPlanList(params?:
|
|
35
|
+
getPlanList(params?: GetPlanListParams): Promise<PaginatedResourceResponse<BillingPlan[]>>;
|
|
29
36
|
/**
|
|
37
|
+
* Cancels the given Subscription Item.
|
|
38
|
+
* @param subscriptionItemId - The ID of the Subscription Item to cancel.
|
|
39
|
+
* @param params - The parameters for the request.
|
|
40
|
+
* @returns The cancelled [`BillingSubscriptionItem`](https://clerk.com/docs/reference/backend/types/billing-subscription-item) object.
|
|
30
41
|
* @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.
|
|
31
42
|
*/
|
|
32
43
|
cancelSubscriptionItem(subscriptionItemId: string, params?: CancelSubscriptionItemParams): Promise<BillingSubscriptionItem>;
|
|
33
44
|
/**
|
|
45
|
+
* Extends the free trial for the given Subscription Item.
|
|
46
|
+
* @param subscriptionItemId - The ID of the Subscription Item to extend the free trial for.
|
|
47
|
+
* @param params - The parameters for the request.
|
|
48
|
+
* @returns The updated [`BillingSubscriptionItem`](https://clerk.com/docs/reference/backend/types/billing-subscription-item) object.
|
|
34
49
|
* @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.
|
|
35
50
|
*/
|
|
36
51
|
extendSubscriptionItemFreeTrial(subscriptionItemId: string, params: ExtendSubscriptionItemFreeTrialParams): Promise<BillingSubscriptionItem>;
|
|
37
52
|
/**
|
|
53
|
+
* Gets the [`BillingSubscription`](https://clerk.com/docs/reference/backend/types/billing-subscription) for the given Organization.
|
|
54
|
+
* @param organizationId - The ID of the Organization to get the Billing Subscription for.
|
|
38
55
|
* @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.
|
|
39
56
|
*/
|
|
40
57
|
getOrganizationBillingSubscription(organizationId: string): Promise<BillingSubscription>;
|
|
41
58
|
/**
|
|
59
|
+
* Gets the [`BillingSubscription`](https://clerk.com/docs/reference/backend/types/billing-subscription) for the given User.
|
|
60
|
+
* @param userId - The ID of the User to get the Billing Subscription for.
|
|
42
61
|
* @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.
|
|
43
62
|
*/
|
|
44
63
|
getUserBillingSubscription(userId: string): Promise<BillingSubscription>;
|
|
45
64
|
}
|
|
46
|
-
export {};
|
|
47
65
|
//# sourceMappingURL=BillingApi.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BillingApi.d.ts","sourceRoot":"","sources":["../../../src/api/endpoints/BillingApi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAGlE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AACrF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAM5C,
|
|
1
|
+
{"version":3,"file":"BillingApi.d.ts","sourceRoot":"","sources":["../../../src/api/endpoints/BillingApi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAGlE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AACrF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAM5C,gCAAgC;AAChC,MAAM,MAAM,iBAAiB,GAAG,sBAAsB,CAAC;IACrD;;OAEG;IACH,SAAS,EAAE,KAAK,GAAG,MAAM,CAAC;CAC3B,CAAC,CAAC;AAEH,cAAc;AACd,MAAM,MAAM,4BAA4B,GAAG;IACzC;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,cAAc;AACd,MAAM,MAAM,qCAAqC,GAAG;IAClD;;OAEG;IACH,QAAQ,EAAE,IAAI,CAAC;CAChB,CAAC;AAEF,gCAAgC;AAChC,qBAAa,UAAW,SAAQ,WAAW;IACzC;;;;OAIG;IACU,WAAW,CAAC,MAAM,CAAC,EAAE,iBAAiB;IAQnD;;;;;;OAMG;IACU,sBAAsB,CAAC,kBAAkB,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,4BAA4B;IASrG;;;;;;OAMG;IACU,+BAA+B,CAC1C,kBAAkB,EAAE,MAAM,EAC1B,MAAM,EAAE,qCAAqC;IAU/C;;;;OAIG;IACU,kCAAkC,CAAC,cAAc,EAAE,MAAM;IAQtE;;;;OAIG;IACU,0BAA0B,CAAC,MAAM,EAAE,MAAM;CAOvD"}
|
|
@@ -6,10 +6,29 @@ import { AbstractAPI } from './AbstractApi';
|
|
|
6
6
|
type GetHandshakePayloadParams = {
|
|
7
7
|
nonce: string;
|
|
8
8
|
};
|
|
9
|
+
/** @generateWithEmptyComment */
|
|
9
10
|
export declare class ClientAPI extends AbstractAPI {
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated This method is deprecated and will be removed in a future version.
|
|
13
|
+
*/
|
|
10
14
|
getClientList(params?: ClerkPaginationRequest): Promise<PaginatedResourceResponse<Client[]>>;
|
|
15
|
+
/**
|
|
16
|
+
* Gets the given [`Client`](https://clerk.com/docs/reference/backend/types/backend-client).
|
|
17
|
+
* @param clientId - The ID of the client to get.
|
|
18
|
+
*/
|
|
11
19
|
getClient(clientId: string): Promise<Client>;
|
|
20
|
+
/**
|
|
21
|
+
* Verifies the client in the given token.
|
|
22
|
+
* @param token - The token to verify.
|
|
23
|
+
* @returns The verified [`Client`](https://clerk.com/docs/reference/backend/types/backend-client).
|
|
24
|
+
*/
|
|
12
25
|
verifyClient(token: string): Promise<Client>;
|
|
26
|
+
/**
|
|
27
|
+
* Retrieves the handshake payload for a given nonce. Used internally by Clerk's SDKs to resolve
|
|
28
|
+
* session cookies during the handshake flow.
|
|
29
|
+
*
|
|
30
|
+
* @internal
|
|
31
|
+
*/
|
|
13
32
|
getHandshakePayload(queryParams: GetHandshakePayloadParams): Promise<HandshakePayload>;
|
|
14
33
|
}
|
|
15
34
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClientApi.d.ts","sourceRoot":"","sources":["../../../src/api/endpoints/ClientApi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAGlE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,KAAK,yBAAyB,GAAG;IAC/B,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,qBAAa,SAAU,SAAQ,WAAW;
|
|
1
|
+
{"version":3,"file":"ClientApi.d.ts","sourceRoot":"","sources":["../../../src/api/endpoints/ClientApi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAGlE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,KAAK,yBAAyB,GAAG;IAC/B,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,gCAAgC;AAChC,qBAAa,SAAU,SAAQ,WAAW;IACxC;;OAEG;IACU,aAAa,CAAC,MAAM,GAAE,sBAA2B;IAQ9D;;;OAGG;IACU,SAAS,CAAC,QAAQ,EAAE,MAAM;IAQvC;;;;OAIG;IACI,YAAY,CAAC,KAAK,EAAE,MAAM;IAQjC;;;;;OAKG;IACU,mBAAmB,CAAC,WAAW,EAAE,yBAAyB;CAOxE"}
|
|
@@ -2,45 +2,55 @@ import type { DeletedObject } from '../resources/DeletedObject';
|
|
|
2
2
|
import type { PaginatedResourceResponse } from '../resources/Deserializer';
|
|
3
3
|
import type { Domain } from '../resources/Domain';
|
|
4
4
|
import { AbstractAPI } from './AbstractApi';
|
|
5
|
-
|
|
5
|
+
/** @generateWithEmptyComment */
|
|
6
|
+
export type AddDomainParams = {
|
|
6
7
|
/**
|
|
7
|
-
* The new domain name. For development instances, can contain the port,
|
|
8
|
+
* The new domain name. For development instances, can contain the port, e.g. `myhostname:3000`. For production instances, must be a valid FQDN, e.g. `mysite.com`. Cannot contain protocol scheme.
|
|
8
9
|
*/
|
|
9
10
|
name: string;
|
|
10
|
-
/**
|
|
11
|
-
* Marks the new domain as satellite. Only true is accepted at the moment.
|
|
12
|
-
*/
|
|
11
|
+
/** Whether the new domain is a satellite domain. Only `true` is accepted at the moment. */
|
|
13
12
|
is_satellite: boolean;
|
|
14
|
-
/**
|
|
15
|
-
* The full URL of the proxy which will forward requests to the Clerk Frontend API for this domain. Applicable only to production instances.
|
|
16
|
-
*/
|
|
13
|
+
/** The proxy URL for the domain. Applicable only to production instances. */
|
|
17
14
|
proxy_url?: string | null;
|
|
18
15
|
};
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
*/
|
|
16
|
+
/** @generateWithEmptyComment */
|
|
17
|
+
export type UpdateDomainParams = Partial<Pick<AddDomainParams, 'name' | 'proxy_url'>> & {
|
|
18
|
+
/** The ID of the domain that will be updated. */
|
|
23
19
|
domainId: string;
|
|
24
|
-
/**
|
|
25
|
-
* Whether this is a domain for a secondary app, meaning that any subdomain provided is significant
|
|
26
|
-
* and will be stored as part of the domain. This is useful for supporting multiple apps
|
|
27
|
-
* (one primary and multiple secondaries) on the same root domain (eTLD+1).
|
|
28
|
-
*/
|
|
20
|
+
/** Whether this is a domain for a secondary app, meaning that any subdomain provided is significant and will be stored as part of the domain. This is useful for supporting multiple apps (one primary and multiple secondaries) on the same root domain (eTLD+1). */
|
|
29
21
|
is_secondary?: boolean | null;
|
|
30
22
|
};
|
|
23
|
+
/** @generateWithEmptyComment */
|
|
31
24
|
export declare class DomainAPI extends AbstractAPI {
|
|
25
|
+
/**
|
|
26
|
+
* Gets the list of domains for the instance. By default, the list is returned in descending order by creation date (newest first).
|
|
27
|
+
* @returns A [`PaginatedResourceResponse`](https://clerk.com/docs/reference/backend/types/paginated-resource-response) object with a `data` property containing an array of [`Domain`](https://clerk.com/docs/reference/backend/types/domain) objects and a `totalCount` property containing the total number of domains for the instance.
|
|
28
|
+
*/
|
|
32
29
|
list(): Promise<PaginatedResourceResponse<Domain[]>>;
|
|
30
|
+
/**
|
|
31
|
+
* Adds a new domain to the instance. Useful in the case of multi-domain instances, allows adding [satellite domains](https://clerk.com/docs/guides/dashboard/dns-domains/satellite-domains) to an instance.
|
|
32
|
+
* @returns The created [`Domain`](https://clerk.com/docs/reference/backend/types/domain) object.
|
|
33
|
+
*/
|
|
33
34
|
add(params: AddDomainParams): Promise<Domain>;
|
|
35
|
+
/**
|
|
36
|
+
* Updates a domain for the instance. Both primary and satellite domains can be updated. If you choose to use Clerk via proxy, use this endpoint to specify the `proxy_url`. Whenever you decide you'd rather switch to DNS setup for Clerk, simply set `proxy_url` to `null` for the domain.
|
|
37
|
+
*
|
|
38
|
+
* When you update a production instance's primary domain name, you have to make sure that you've completed all the necessary setup steps for DNS and emails to work. Expect downtime otherwise. Updating a primary domain's name will also update the instance's home origin, affecting the default application paths.
|
|
39
|
+
* @returns The updated [`Domain`](https://clerk.com/docs/reference/backend/types/domain) object.
|
|
40
|
+
*/
|
|
34
41
|
update(params: UpdateDomainParams): Promise<Domain>;
|
|
35
42
|
/**
|
|
36
|
-
* Deletes a satellite domain for the instance.
|
|
37
|
-
*
|
|
43
|
+
* Deletes a satellite domain for the instance. It is currently not possible to delete the instance's primary domain.
|
|
44
|
+
* @param satelliteDomainId - The ID of the satellite domain to delete.
|
|
45
|
+
* @returns The [`DeletedObject`](https://clerk.com/docs/reference/backend/types/deleted-object).
|
|
38
46
|
*/
|
|
39
47
|
delete(satelliteDomainId: string): Promise<DeletedObject>;
|
|
40
48
|
/**
|
|
41
|
-
*
|
|
49
|
+
* Deletes a satellite domain for the instance.
|
|
50
|
+
* @param satelliteDomainId - The ID of the satellite domain to delete.
|
|
51
|
+
* @returns The [`DeletedObject`](https://clerk.com/docs/reference/backend/types/deleted-object).
|
|
52
|
+
* @deprecated Use `delete()` instead.
|
|
42
53
|
*/
|
|
43
54
|
deleteDomain(satelliteDomainId: string): Promise<DeletedObject>;
|
|
44
55
|
}
|
|
45
|
-
export {};
|
|
46
56
|
//# sourceMappingURL=DomainApi.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DomainApi.d.ts","sourceRoot":"","sources":["../../../src/api/endpoints/DomainApi.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,
|
|
1
|
+
{"version":3,"file":"DomainApi.d.ts","sourceRoot":"","sources":["../../../src/api/endpoints/DomainApi.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,gCAAgC;AAChC,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,2FAA2F;IAC3F,YAAY,EAAE,OAAO,CAAC;IACtB,6EAA6E;IAC7E,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B,CAAC;AAEF,gCAAgC;AAChC,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,WAAW,CAAC,CAAC,GAAG;IACtF,iDAAiD;IACjD,QAAQ,EAAE,MAAM,CAAC;IACjB,sQAAsQ;IACtQ,YAAY,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;CAC/B,CAAC;AAEF,gCAAgC;AAChC,qBAAa,SAAU,SAAQ,WAAW;IACxC;;;OAGG;IACU,IAAI;IAOjB;;;OAGG;IACU,GAAG,CAAC,MAAM,EAAE,eAAe;IAQxC;;;;;OAKG;IACU,MAAM,CAAC,MAAM,EAAE,kBAAkB;IAY9C;;;;OAIG;IACU,MAAM,CAAC,iBAAiB,EAAE,MAAM;IAI7C;;;;;OAKG;IACU,YAAY,CAAC,iBAAiB,EAAE,MAAM;CAOpD"}
|
|
@@ -1,20 +1,47 @@
|
|
|
1
1
|
import type { DeletedObject, EmailAddress } from '../resources';
|
|
2
2
|
import { AbstractAPI } from './AbstractApi';
|
|
3
|
-
|
|
3
|
+
/** @generateWithEmptyComment */
|
|
4
|
+
export type CreateEmailAddressParams = {
|
|
5
|
+
/** The ID of the user to create the email address for. */
|
|
4
6
|
userId: string;
|
|
7
|
+
/** The email address to create. */
|
|
5
8
|
emailAddress: string;
|
|
9
|
+
/** Whether the email address should be verified. Defaults to `false`. */
|
|
6
10
|
verified?: boolean;
|
|
11
|
+
/** Whether the email address should be the primary email address. Defaults to `false`, unless it is the first email address added to the user. */
|
|
7
12
|
primary?: boolean;
|
|
8
13
|
};
|
|
9
|
-
|
|
14
|
+
/** @inline */
|
|
15
|
+
export type UpdateEmailAddressParams = {
|
|
16
|
+
/** Whether the email address should be verified. Defaults to `false`. */
|
|
10
17
|
verified?: boolean;
|
|
18
|
+
/** Whether the email address should be the primary email address. Defaults to `false`, unless it is the first email address added to the user. */
|
|
11
19
|
primary?: boolean;
|
|
12
20
|
};
|
|
21
|
+
/** @generateWithEmptyComment */
|
|
13
22
|
export declare class EmailAddressAPI extends AbstractAPI {
|
|
23
|
+
/**
|
|
24
|
+
* Gets the given [`EmailAddress`](https://clerk.com/docs/reference/backend/types/backend-email-address).
|
|
25
|
+
* @param emailAddressId - The ID of the email address to get.
|
|
26
|
+
*/
|
|
14
27
|
getEmailAddress(emailAddressId: string): Promise<EmailAddress>;
|
|
28
|
+
/**
|
|
29
|
+
* Creates a new email address for the given user.
|
|
30
|
+
* @returns The created [`EmailAddress`](https://clerk.com/docs/reference/backend/types/backend-email-address) object.
|
|
31
|
+
*/
|
|
15
32
|
createEmailAddress(params: CreateEmailAddressParams): Promise<EmailAddress>;
|
|
33
|
+
/**
|
|
34
|
+
* Updates the given email address.
|
|
35
|
+
* @param emailAddressId - The ID of the email address to update.
|
|
36
|
+
* @param params - The parameters to update the email address.
|
|
37
|
+
* @returns The updated [`EmailAddress`](https://clerk.com/docs/reference/backend/types/backend-email-address) object.
|
|
38
|
+
*/
|
|
16
39
|
updateEmailAddress(emailAddressId: string, params?: UpdateEmailAddressParams): Promise<EmailAddress>;
|
|
40
|
+
/**
|
|
41
|
+
* Deletes the given email address.
|
|
42
|
+
* @param emailAddressId - The ID of the email address to delete.
|
|
43
|
+
* @returns The [`DeletedObject`](https://clerk.com/docs/reference/backend/types/deleted-object) object.
|
|
44
|
+
*/
|
|
17
45
|
deleteEmailAddress(emailAddressId: string): Promise<DeletedObject>;
|
|
18
46
|
}
|
|
19
|
-
export {};
|
|
20
47
|
//# sourceMappingURL=EmailAddressApi.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmailAddressApi.d.ts","sourceRoot":"","sources":["../../../src/api/endpoints/EmailAddressApi.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,
|
|
1
|
+
{"version":3,"file":"EmailAddressApi.d.ts","sourceRoot":"","sources":["../../../src/api/endpoints/EmailAddressApi.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,gCAAgC;AAChC,MAAM,MAAM,wBAAwB,GAAG;IACrC,0DAA0D;IAC1D,MAAM,EAAE,MAAM,CAAC;IACf,mCAAmC;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,yEAAyE;IACzE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kJAAkJ;IAClJ,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,cAAc;AACd,MAAM,MAAM,wBAAwB,GAAG;IACrC,yEAAyE;IACzE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kJAAkJ;IAClJ,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,gCAAgC;AAChC,qBAAa,eAAgB,SAAQ,WAAW;IAC9C;;;OAGG;IACU,eAAe,CAAC,cAAc,EAAE,MAAM;IASnD;;;OAGG;IACU,kBAAkB,CAAC,MAAM,EAAE,wBAAwB;IAQhE;;;;;OAKG;IACU,kBAAkB,CAAC,cAAc,EAAE,MAAM,EAAE,MAAM,GAAE,wBAA6B;IAU7F;;;;OAIG;IACU,kBAAkB,CAAC,cAAc,EAAE,MAAM;CAQvD"}
|