You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/backend/src/api/endpoints/InstanceApi.ts
+45-40Lines changed: 45 additions & 40 deletions
Original file line number
Diff line number
Diff line change
@@ -6,81 +6,75 @@ import { AbstractAPI } from './AbstractApi';
6
6
7
7
constbasePath='/instance';
8
8
9
-
typeUpdateParams={
10
-
/**
11
-
* Toggles test mode for this instance, allowing the use of test email addresses and phone numbers.
12
-
*
13
-
* @remarks Defaults to true for development instances.
14
-
*/
9
+
/** @generateWithEmptyComment */
10
+
exporttypeUpdateParams={
11
+
/** Toggles [test mode](https://clerk.com/docs/guides/development/testing/test-emails-and-phones#set-up-test-mode) for this instance, allowing the use of test email addresses and phone numbers. Defaults to `true` for development instances. */
15
12
testMode?: boolean|null|undefined;
16
-
/**
17
-
* Whether the instance should be using the HIBP service to check passwords for breaches
18
-
*/
13
+
/** Whether the instance should be using the Have I Been Pwned (HIBP) service to check passwords for breaches. */
19
14
hibp?: boolean|null|undefined;
20
-
/**
21
-
* The "enhanced_email_deliverability" feature will send emails from "verifications@clerk.dev" instead of your domain.
22
-
*
23
-
* @remarks This can be helpful if you do not have a high domain reputation.
24
-
*/
15
+
/** Whether the instance should send emails from "verifications@clerk.dev" instead of your domain. This can be helpful if you do not have a high domain reputation. */
* For browser-like stacks such as browser extensions, Electron, or Capacitor.js the instance allowed origins need to be updated with the request origin value.
31
-
*
32
-
* @remarks For Chrome extensions popup, background, or service worker pages the origin is chrome-extension://extension_uiid. For Electron apps the default origin is http://localhost:3000. For Capacitor, the origin is capacitor://localhost.
33
-
*/
23
+
/** For browser-like stacks such as browser extensions, Electron, or Capacitor.js, the instance allowed origins need to be updated with the request origin value. For Chrome extensions popup, background, or service worker pages the origin is `chrome-extension://extension_uiid`. For Electron apps the default origin is `http://localhost:3000`. For Capacitor.js, the origin is `capacitor://localhost`. */
34
24
allowedOrigins?: Array<string>|undefined;
35
-
/**
36
-
* Whether the instance should use URL-based session syncing in development mode (i.e. without third-party cookies).
37
-
*/
25
+
/** Whether the instance should use URL-based session syncing in development mode (i.e. without third-party cookies). */
38
26
urlBasedSessionSyncing?: boolean|null|undefined;
39
-
/**
40
-
* Overrides the sign-in strategy that is preferred when a password is required.
41
-
*
42
-
* @remarks Accepts `'password'` or `'otp'`. Pass an empty string to clear the override. Passing `null` or `undefined` leaves the current value unchanged. The value is only consulted when a password is required, and is dormant otherwise.
43
-
*/
27
+
/** Overrides the sign-in strategy that is preferred when a password is required. The value is only consulted when a password is required, and is dormant otherwise. Pass an empty string to clear the override. Passing `null` or `undefined` leaves the current value unchanged. */
/** Whether the instance should have [**Allowlist**](https://clerk.com/docs/guides/secure/restricting-access#allowlist) enabled. */
48
34
allowlist?: boolean|null|undefined;
35
+
/** Whether the instance should have [**Blocklist**](https://clerk.com/docs/guides/secure/restricting-access#blocklist) enabled. */
49
36
blocklist?: boolean|null|undefined;
37
+
/** Whether the instance should have [**Block email subaddresses**](https://clerk.com/docs/guides/secure/restricting-access#block-email-subaddresses) enabled. */
50
38
blockEmailSubaddresses?: boolean|null|undefined;
39
+
/** Whether the instance should have [**Block sign-ups that use disposable email domains**](https://clerk.com/docs/guides/secure/restricting-access#block-sign-ups-that-use-disposable-email-addresses) enabled. */
/** Whether the instance should [ignore dots for Gmail addresses](https://clerk.com/docs/guides/secure/restricting-access#block-email-subaddresses). */
/** Whether the instance should enable [Organizations](https://clerk.com/docs/guides/organizations/overview). */
56
48
enabled?: boolean|null|undefined;
49
+
/** The maximum number of [memberships allowed](https://clerk.com/docs/guides/organizations/configure#membership-limits) per Organization. */
57
50
maxAllowedMemberships?: number|null|undefined;
51
+
/** Whether [Organization admins](https://clerk.com/docs/guides/organizations/control-access/roles-and-permissions#default-roles) are allowed to delete Organizations. */
58
52
adminDeleteEnabled?: boolean|null|undefined;
53
+
/** Whether [Verified Domains](https://clerk.com/docs/guides/organizations/add-members/verified-domains) are enabled for Organizations. */
59
54
domainsEnabled?: boolean|null|undefined;
60
-
/**
61
-
* Specifies which [enrollment modes](https://clerk.com/docs/guides/organizations/add-members/verified-domains#enable-verified-domains) to enable for your Organization Domains.
62
-
*
63
-
* @remarks Supported modes are 'automatic_invitation' & 'automatic_suggestion'.
64
-
*/
55
+
/** Specifies which [enrollment modes](https://clerk.com/docs/guides/organizations/add-members/verified-domains#enable-verified-domains) to enable for your Organization's [Verified Domains](https://clerk.com/docs/guides/organizations/add-members/verified-domains). Supported modes are `'automatic_invitation'` & `'automatic_suggestion'`. */
65
56
domainsEnrollmentModes?: Array<string>|undefined;
66
-
/**
67
-
* Specifies what the default Organization Role is for an Organization creator.
68
-
*/
57
+
/** Specifies what the default Organization [Role](https://clerk.com/docs/guides/organizations/control-access/roles-and-permissions) is for an Organization creator. */
69
58
creatorRoleId?: string|null|undefined;
70
-
/**
71
-
* Specifies what the default Organization Role is for the Organization Domains.
72
-
*/
59
+
/** Specifies what the default Organization [Role](https://clerk.com/docs/guides/organizations/control-access/roles-and-permissions) is for the Organization's [Verified Domains](https://clerk.com/docs/guides/organizations/add-members/verified-domains). */
73
60
domainsDefaultRoleId?: string|null|undefined;
74
61
};
75
62
63
+
/** @generateWithEmptyComment */
76
64
exportclassInstanceAPIextendsAbstractAPI{
65
+
/**
66
+
* Gets the current [`Instance`](https://clerk.com/docs/reference/backend/types/backend-instance).
67
+
*/
77
68
publicasyncget(){
78
69
returnthis.request<Instance>({
79
70
method: 'GET',
80
71
path: basePath,
81
72
});
82
73
}
83
74
75
+
/**
76
+
* Updates the current instance.
77
+
*/
84
78
publicasyncupdate(params: UpdateParams){
85
79
returnthis.request<void>({
86
80
method: 'PATCH',
@@ -89,6 +83,10 @@ export class InstanceAPI extends AbstractAPI {
89
83
});
90
84
}
91
85
86
+
/**
87
+
* Updates the [restriction](https://clerk.com/docs/guides/secure/restricting-access) settings for the current instance.
88
+
* @returns The updated [`InstanceRestrictions`](https://clerk.com/docs/reference/backend/types/backend-instance-restrictions).
Copy file name to clipboardExpand all lines: packages/backend/src/api/resources/Instance.ts
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,13 @@
1
1
importtype{InstanceJSON}from'./JSON';
2
2
3
+
/** @generateWithEmptyComment */
3
4
exportclassInstance{
4
5
constructor(
6
+
/** The unique identifier for the instance. */
5
7
readonlyid: string,
8
+
/** The type of instance environment, either `'production'` or `'development'`. */
6
9
readonlyenvironmentType: string,
10
+
/** For browser-like stacks such as browser extensions, Electron, or Capacitor.js, the instance allowed origins need to be updated with the request origin value. For Chrome extensions popup, background, or service worker pages the origin is `chrome-extension://extension_uiid`. For Electron apps the default origin is `http://localhost:3000`. For Capacitor.js, the origin is `capacitor://localhost`. */
Copy file name to clipboardExpand all lines: packages/backend/src/api/resources/InstanceRestrictions.ts
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,17 @@
1
1
importtype{InstanceRestrictionsJSON}from'./JSON';
2
2
3
+
/** The `InstanceRestrictions` object represents the [restrictions](https://clerk.com/docs/guides/secure/restricting-access) settings for the current instance. */
3
4
exportclassInstanceRestrictions{
4
5
constructor(
6
+
/** Whether the instance has [**Allowlist**](https://clerk.com/docs/guides/secure/restricting-access#allowlist) enabled. */
5
7
readonlyallowlist: boolean,
8
+
/** Whether the instance has [**Blocklist**](https://clerk.com/docs/guides/secure/restricting-access#blocklist) enabled. */
6
9
readonlyblocklist: boolean,
10
+
/** Whether the instance has [**Block email subaddresses**](https://clerk.com/docs/guides/secure/restricting-access#block-email-subaddresses) enabled. */
7
11
readonlyblockEmailSubaddresses: boolean,
12
+
/** Whether the instance has [**Block sign-ups that use disposable email domains**](https://clerk.com/docs/guides/secure/restricting-access#block-sign-ups-that-use-disposable-email-addresses) enabled. */
8
13
readonlyblockDisposableEmailDomains: boolean,
14
+
/** Whether the instance has [**Ignore dots for Gmail addresses**](https://clerk.com/docs/guides/secure/restricting-access#block-email-subaddresses) enabled. */
Copy file name to clipboardExpand all lines: packages/backend/src/api/resources/OrganizationSettings.ts
+19Lines changed: 19 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,36 @@
1
1
importtype{DomainsEnrollmentModes}from'./Enums';
2
2
importtype{OrganizationSettingsJSON}from'./JSON';
3
3
4
+
/** The `OrganizationSettings` object represents the [Organization-related settings](https://clerk.com/docs/guides/organizations/configure) for the current instance. */
4
5
exportclassOrganizationSettings{
5
6
constructor(
7
+
/** Whether the instance has [Organizations](https://clerk.com/docs/guides/organizations/overview) enabled. */
6
8
readonlyenabled: boolean,
9
+
/** The maximum number of [memberships allowed](https://clerk.com/docs/guides/organizations/configure#membership-limits) per Organization. */
7
10
readonlymaxAllowedMemberships: number,
11
+
/** The maximum number of [Roles allowed](https://clerk.com/docs/guides/organizations/configure#role-limits) per Organization. */
8
12
readonlymaxAllowedRoles: number,
13
+
/** The maximum number of [Permissions allowed](https://clerk.com/docs/guides/organizations/configure#permission-limits) per Organization. */
9
14
readonlymaxAllowedPermissions: number,
15
+
/** The default [Role](https://clerk.com/docs/guides/organizations/control-access/roles-and-permissions) for an Organization creator. */
10
16
readonlycreatorRole: string,
17
+
/** Whether [admins](https://clerk.com/docs/guides/organizations/control-access/roles-and-permissions#default-roles) are allowed to delete Organizations. */
11
18
readonlyadminDeleteEnabled: boolean,
19
+
/** Whether the instance has [Verified Domains](https://clerk.com/docs/guides/organizations/add-members/verified-domains) enabled. */
12
20
readonlydomainsEnabled: boolean,
21
+
/** Whether the instance has [Organization slugs](https://clerk.com/docs/guides/organizations/add-members/verified-domains#organization-slugs) disabled. */
13
22
readonlyslugDisabled: boolean,
23
+
/**
24
+
* The [enrollment modes](https://clerk.com/docs/guides/organizations/add-members/verified-domains#enable-verified-domains) available for Verified Domains.
25
+
*
26
+
* <ul>
27
+
* <li>`manual_invitation`: No automatic enrollment. Users with a matching email domain are not given any [invitation](https://clerk.com/docs/guides/organizations/add-members/verified-domains#automatic-invitations) or [suggestion](https://clerk.com/docs/guides/organizations/add-members/verified-domains#automatic-suggestions); an [admin](https://clerk.com/docs/guides/organizations/control-access/roles-and-permissions#default-roles) must invite them manually.</li>
28
+
* <li>`automatic_invitation`: Users with a matching email domain automatically receive a pending [invitation](https://clerk.com/docs/reference/types/organization-invitation) (assigned the Organization's default Role) which they can accept to join.</li>
29
+
* <li>`automatic_suggestion`: Users with a matching email domain automatically receive a [suggestion](https://clerk.com/docs/guides/organizations/add-members/verified-domains#automatic-suggestions) to join, which they can request.</li>
/** The default [Role](https://clerk.com/docs/guides/organizations/control-access/roles-and-permissions) for the Organization's [Verified Domains](https://clerk.com/docs/guides/organizations/add-members/verified-domains). */
0 commit comments