@stackframe/stack-shared 2.8.63 → 2.8.65
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/config/schema-fuzzer.test.js +14 -1
- package/dist/config/schema-fuzzer.test.js.map +1 -1
- package/dist/config/schema.d.mts +103 -0
- package/dist/config/schema.d.ts +103 -0
- package/dist/config/schema.js +41 -17
- package/dist/config/schema.js.map +1 -1
- package/dist/esm/config/schema-fuzzer.test.js +14 -1
- package/dist/esm/config/schema-fuzzer.test.js.map +1 -1
- package/dist/esm/config/schema.js +41 -17
- package/dist/esm/config/schema.js.map +1 -1
- package/dist/esm/interface/admin-interface.js +2 -1
- package/dist/esm/interface/admin-interface.js.map +1 -1
- package/dist/esm/interface/client-interface.js.map +1 -1
- package/dist/esm/interface/crud/current-user.js +3 -1
- package/dist/esm/interface/crud/current-user.js.map +1 -1
- package/dist/esm/interface/crud/sign-up-rules.js +1 -0
- package/dist/esm/interface/crud/sign-up-rules.js.map +1 -0
- package/dist/esm/interface/crud/users.js +40 -4
- package/dist/esm/interface/crud/users.js.map +1 -1
- package/dist/esm/known-errors.js +14 -1
- package/dist/esm/known-errors.js.map +1 -1
- package/dist/esm/schema-fields.js +1 -1
- package/dist/esm/schema-fields.js.map +1 -1
- package/dist/esm/utils/types.js.map +1 -1
- package/dist/interface/admin-interface.d.mts +1 -1
- package/dist/interface/admin-interface.d.ts +1 -1
- package/dist/interface/admin-interface.js +2 -1
- package/dist/interface/admin-interface.js.map +1 -1
- package/dist/interface/client-interface.js.map +1 -1
- package/dist/interface/crud/analytics.d.mts +1 -0
- package/dist/interface/crud/analytics.d.ts +1 -0
- package/dist/interface/crud/analytics.js.map +1 -1
- package/dist/interface/crud/current-user.d.mts +22 -2
- package/dist/interface/crud/current-user.d.ts +22 -2
- package/dist/interface/crud/current-user.js +3 -1
- package/dist/interface/crud/current-user.js.map +1 -1
- package/dist/interface/crud/sign-up-rules.d.mts +13 -0
- package/dist/interface/crud/sign-up-rules.d.ts +13 -0
- package/dist/interface/crud/sign-up-rules.js +19 -0
- package/dist/interface/crud/sign-up-rules.js.map +1 -0
- package/dist/interface/crud/team-member-profiles.d.mts +14 -2
- package/dist/interface/crud/team-member-profiles.d.ts +14 -2
- package/dist/interface/crud/users.d.mts +52 -4
- package/dist/interface/crud/users.d.ts +52 -4
- package/dist/interface/crud/users.js +40 -4
- package/dist/interface/crud/users.js.map +1 -1
- package/dist/interface/webhooks.d.mts +14 -2
- package/dist/interface/webhooks.d.ts +14 -2
- package/dist/known-errors.d.mts +4 -1
- package/dist/known-errors.d.ts +4 -1
- package/dist/known-errors.js +14 -1
- package/dist/known-errors.js.map +1 -1
- package/dist/schema-fields.d.mts +2 -2
- package/dist/schema-fields.d.ts +2 -2
- package/dist/schema-fields.js +1 -1
- package/dist/schema-fields.js.map +1 -1
- package/dist/sessions.d.mts +1 -1
- package/dist/sessions.d.ts +1 -1
- package/dist/utils/types.d.mts +2 -2
- package/dist/utils/types.d.ts +2 -2
- package/dist/utils/types.js.map +1 -1
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@ declare const currentUserCrud: CrudSchemaFromOptions<{
|
|
|
9
9
|
is_anonymous: boolean;
|
|
10
10
|
is_restricted: boolean;
|
|
11
11
|
restricted_reason: {
|
|
12
|
-
type: "anonymous" | "email_not_verified";
|
|
12
|
+
type: "anonymous" | "email_not_verified" | "restricted_by_administrator";
|
|
13
13
|
} | null;
|
|
14
14
|
id: string;
|
|
15
15
|
display_name: string | null;
|
|
@@ -20,6 +20,8 @@ declare const currentUserCrud: CrudSchemaFromOptions<{
|
|
|
20
20
|
primary_email_verified: boolean;
|
|
21
21
|
passkey_auth_enabled: boolean;
|
|
22
22
|
otp_auth_enabled: boolean;
|
|
23
|
+
restricted_by_admin: boolean;
|
|
24
|
+
restricted_by_admin_reason: string | null;
|
|
23
25
|
signed_up_at_millis: number;
|
|
24
26
|
has_password: boolean;
|
|
25
27
|
oauth_providers: {
|
|
@@ -65,6 +67,9 @@ declare const currentUserCrud: CrudSchemaFromOptions<{
|
|
|
65
67
|
restricted_reason: {
|
|
66
68
|
type: undefined;
|
|
67
69
|
};
|
|
70
|
+
restricted_by_admin: undefined;
|
|
71
|
+
restricted_by_admin_reason: undefined;
|
|
72
|
+
restricted_by_admin_private_details: undefined;
|
|
68
73
|
oauth_providers: undefined;
|
|
69
74
|
auth_with_email: undefined;
|
|
70
75
|
requires_totp_mfa: undefined;
|
|
@@ -97,8 +102,11 @@ declare const currentUserCrud: CrudSchemaFromOptions<{
|
|
|
97
102
|
is_anonymous: boolean;
|
|
98
103
|
is_restricted: boolean;
|
|
99
104
|
restricted_reason: {
|
|
100
|
-
type: "anonymous" | "email_not_verified";
|
|
105
|
+
type: "anonymous" | "email_not_verified" | "restricted_by_administrator";
|
|
101
106
|
} | null;
|
|
107
|
+
restricted_by_admin: boolean;
|
|
108
|
+
restricted_by_admin_reason: string | null;
|
|
109
|
+
restricted_by_admin_private_details: string | null;
|
|
102
110
|
oauth_providers: {
|
|
103
111
|
email?: string | null | undefined;
|
|
104
112
|
id: string;
|
|
@@ -136,6 +144,9 @@ declare const currentUserCrud: CrudSchemaFromOptions<{
|
|
|
136
144
|
restricted_reason: {
|
|
137
145
|
type: undefined;
|
|
138
146
|
};
|
|
147
|
+
restricted_by_admin: undefined;
|
|
148
|
+
restricted_by_admin_reason: undefined;
|
|
149
|
+
restricted_by_admin_private_details: undefined;
|
|
139
150
|
oauth_providers: undefined;
|
|
140
151
|
auth_with_email: undefined;
|
|
141
152
|
requires_totp_mfa: undefined;
|
|
@@ -165,6 +176,9 @@ declare const currentUserCrud: CrudSchemaFromOptions<{
|
|
|
165
176
|
totp_secret_base64: undefined;
|
|
166
177
|
selected_team_id: undefined;
|
|
167
178
|
is_anonymous: undefined;
|
|
179
|
+
restricted_by_admin: undefined;
|
|
180
|
+
restricted_by_admin_reason: undefined;
|
|
181
|
+
restricted_by_admin_private_details: undefined;
|
|
168
182
|
}, "">;
|
|
169
183
|
serverUpdateSchema: yup.ObjectSchema<{
|
|
170
184
|
display_name: string | null | undefined;
|
|
@@ -182,6 +196,9 @@ declare const currentUserCrud: CrudSchemaFromOptions<{
|
|
|
182
196
|
totp_secret_base64: string | null | undefined;
|
|
183
197
|
selected_team_id: string | null | undefined;
|
|
184
198
|
is_anonymous: boolean | undefined;
|
|
199
|
+
restricted_by_admin: boolean | undefined;
|
|
200
|
+
restricted_by_admin_reason: string | null | undefined;
|
|
201
|
+
restricted_by_admin_private_details: string | null | undefined;
|
|
185
202
|
}, yup.AnyObject, {
|
|
186
203
|
display_name: undefined;
|
|
187
204
|
profile_image_url: undefined;
|
|
@@ -198,6 +215,9 @@ declare const currentUserCrud: CrudSchemaFromOptions<{
|
|
|
198
215
|
totp_secret_base64: undefined;
|
|
199
216
|
selected_team_id: undefined;
|
|
200
217
|
is_anonymous: undefined;
|
|
218
|
+
restricted_by_admin: undefined;
|
|
219
|
+
restricted_by_admin_reason: undefined;
|
|
220
|
+
restricted_by_admin_private_details: undefined;
|
|
201
221
|
}, "">;
|
|
202
222
|
clientDeleteSchema: yup.MixedSchema<{} | undefined, yup.AnyObject, undefined, "">;
|
|
203
223
|
docs: {
|
|
@@ -9,7 +9,7 @@ declare const currentUserCrud: CrudSchemaFromOptions<{
|
|
|
9
9
|
is_anonymous: boolean;
|
|
10
10
|
is_restricted: boolean;
|
|
11
11
|
restricted_reason: {
|
|
12
|
-
type: "anonymous" | "email_not_verified";
|
|
12
|
+
type: "anonymous" | "email_not_verified" | "restricted_by_administrator";
|
|
13
13
|
} | null;
|
|
14
14
|
id: string;
|
|
15
15
|
display_name: string | null;
|
|
@@ -20,6 +20,8 @@ declare const currentUserCrud: CrudSchemaFromOptions<{
|
|
|
20
20
|
primary_email_verified: boolean;
|
|
21
21
|
passkey_auth_enabled: boolean;
|
|
22
22
|
otp_auth_enabled: boolean;
|
|
23
|
+
restricted_by_admin: boolean;
|
|
24
|
+
restricted_by_admin_reason: string | null;
|
|
23
25
|
signed_up_at_millis: number;
|
|
24
26
|
has_password: boolean;
|
|
25
27
|
oauth_providers: {
|
|
@@ -65,6 +67,9 @@ declare const currentUserCrud: CrudSchemaFromOptions<{
|
|
|
65
67
|
restricted_reason: {
|
|
66
68
|
type: undefined;
|
|
67
69
|
};
|
|
70
|
+
restricted_by_admin: undefined;
|
|
71
|
+
restricted_by_admin_reason: undefined;
|
|
72
|
+
restricted_by_admin_private_details: undefined;
|
|
68
73
|
oauth_providers: undefined;
|
|
69
74
|
auth_with_email: undefined;
|
|
70
75
|
requires_totp_mfa: undefined;
|
|
@@ -97,8 +102,11 @@ declare const currentUserCrud: CrudSchemaFromOptions<{
|
|
|
97
102
|
is_anonymous: boolean;
|
|
98
103
|
is_restricted: boolean;
|
|
99
104
|
restricted_reason: {
|
|
100
|
-
type: "anonymous" | "email_not_verified";
|
|
105
|
+
type: "anonymous" | "email_not_verified" | "restricted_by_administrator";
|
|
101
106
|
} | null;
|
|
107
|
+
restricted_by_admin: boolean;
|
|
108
|
+
restricted_by_admin_reason: string | null;
|
|
109
|
+
restricted_by_admin_private_details: string | null;
|
|
102
110
|
oauth_providers: {
|
|
103
111
|
email?: string | null | undefined;
|
|
104
112
|
id: string;
|
|
@@ -136,6 +144,9 @@ declare const currentUserCrud: CrudSchemaFromOptions<{
|
|
|
136
144
|
restricted_reason: {
|
|
137
145
|
type: undefined;
|
|
138
146
|
};
|
|
147
|
+
restricted_by_admin: undefined;
|
|
148
|
+
restricted_by_admin_reason: undefined;
|
|
149
|
+
restricted_by_admin_private_details: undefined;
|
|
139
150
|
oauth_providers: undefined;
|
|
140
151
|
auth_with_email: undefined;
|
|
141
152
|
requires_totp_mfa: undefined;
|
|
@@ -165,6 +176,9 @@ declare const currentUserCrud: CrudSchemaFromOptions<{
|
|
|
165
176
|
totp_secret_base64: undefined;
|
|
166
177
|
selected_team_id: undefined;
|
|
167
178
|
is_anonymous: undefined;
|
|
179
|
+
restricted_by_admin: undefined;
|
|
180
|
+
restricted_by_admin_reason: undefined;
|
|
181
|
+
restricted_by_admin_private_details: undefined;
|
|
168
182
|
}, "">;
|
|
169
183
|
serverUpdateSchema: yup.ObjectSchema<{
|
|
170
184
|
display_name: string | null | undefined;
|
|
@@ -182,6 +196,9 @@ declare const currentUserCrud: CrudSchemaFromOptions<{
|
|
|
182
196
|
totp_secret_base64: string | null | undefined;
|
|
183
197
|
selected_team_id: string | null | undefined;
|
|
184
198
|
is_anonymous: boolean | undefined;
|
|
199
|
+
restricted_by_admin: boolean | undefined;
|
|
200
|
+
restricted_by_admin_reason: string | null | undefined;
|
|
201
|
+
restricted_by_admin_private_details: string | null | undefined;
|
|
185
202
|
}, yup.AnyObject, {
|
|
186
203
|
display_name: undefined;
|
|
187
204
|
profile_image_url: undefined;
|
|
@@ -198,6 +215,9 @@ declare const currentUserCrud: CrudSchemaFromOptions<{
|
|
|
198
215
|
totp_secret_base64: undefined;
|
|
199
216
|
selected_team_id: undefined;
|
|
200
217
|
is_anonymous: undefined;
|
|
218
|
+
restricted_by_admin: undefined;
|
|
219
|
+
restricted_by_admin_reason: undefined;
|
|
220
|
+
restricted_by_admin_private_details: undefined;
|
|
201
221
|
}, "">;
|
|
202
222
|
clientDeleteSchema: yup.MixedSchema<{} | undefined, yup.AnyObject, undefined, "">;
|
|
203
223
|
docs: {
|
|
@@ -56,7 +56,9 @@ var clientReadSchema = import_users.usersCrudServerReadSchema.pick([
|
|
|
56
56
|
"passkey_auth_enabled",
|
|
57
57
|
"is_anonymous",
|
|
58
58
|
"is_restricted",
|
|
59
|
-
"restricted_reason"
|
|
59
|
+
"restricted_reason",
|
|
60
|
+
"restricted_by_admin",
|
|
61
|
+
"restricted_by_admin_reason"
|
|
60
62
|
]).concat((0, import_schema_fields.yupObject)({
|
|
61
63
|
selected_team: import_teams.teamsCrudClientReadSchema.nullable().defined()
|
|
62
64
|
})).defined();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/interface/crud/current-user.ts"],"sourcesContent":["import { CrudTypeOf, createCrud } from \"../../crud\";\nimport { yupObject } from \"../../schema-fields\";\nimport { teamsCrudClientReadSchema } from \"./teams\";\nimport { usersCrudServerDeleteSchema, usersCrudServerReadSchema, usersCrudServerUpdateSchema } from \"./users\";\n\nconst clientUpdateSchema = usersCrudServerUpdateSchema.pick([\n \"display_name\",\n \"profile_image_url\",\n \"client_metadata\",\n \"selected_team_id\",\n \"totp_secret_base64\",\n \"otp_auth_enabled\",\n \"passkey_auth_enabled\",\n \"primary_email\",\n]).defined();\n\nconst serverUpdateSchema = usersCrudServerUpdateSchema;\n\nconst clientReadSchema = usersCrudServerReadSchema.pick([\n \"id\",\n \"primary_email\",\n \"primary_email_verified\",\n \"display_name\",\n \"client_metadata\",\n \"client_read_only_metadata\",\n \"profile_image_url\",\n \"signed_up_at_millis\",\n \"has_password\",\n \"auth_with_email\",\n \"oauth_providers\",\n \"selected_team_id\",\n \"requires_totp_mfa\",\n \"otp_auth_enabled\",\n \"passkey_auth_enabled\",\n \"is_anonymous\",\n \"is_restricted\",\n \"restricted_reason\",\n]).concat(yupObject({\n selected_team: teamsCrudClientReadSchema.nullable().defined(),\n})).defined();\n\nconst serverReadSchema = usersCrudServerReadSchema.defined();\n\nconst clientDeleteSchema = usersCrudServerDeleteSchema;\n\nexport const currentUserCrud = createCrud({\n clientReadSchema,\n serverReadSchema,\n clientUpdateSchema,\n serverUpdateSchema,\n clientDeleteSchema,\n docs: {\n clientRead: {\n summary: 'Get current user',\n description: 'Gets the currently authenticated user.',\n tags: ['Users'],\n },\n clientUpdate: {\n summary: 'Update current user',\n description: 'Updates the currently authenticated user. Only the values provided will be updated.',\n tags: ['Users'],\n },\n clientDelete: {\n summary: 'Delete current user',\n description: 'Deletes the currently authenticated user. Use this with caution.',\n tags: ['Users'],\n },\n },\n});\nexport type CurrentUserCrud = CrudTypeOf<typeof currentUserCrud>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAuC;AACvC,2BAA0B;AAC1B,mBAA0C;AAC1C,mBAAoG;AAEpG,IAAM,qBAAqB,yCAA4B,KAAK;AAAA,EAC1D;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC,EAAE,QAAQ;AAEX,IAAM,qBAAqB;AAE3B,IAAM,mBAAmB,uCAA0B,KAAK;AAAA,EACtD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC,EAAE,WAAO,gCAAU;AAAA,EAClB,eAAe,uCAA0B,SAAS,EAAE,QAAQ;AAC9D,CAAC,CAAC,EAAE,QAAQ;AAEZ,IAAM,mBAAmB,uCAA0B,QAAQ;AAE3D,IAAM,qBAAqB;AAEpB,IAAM,sBAAkB,wBAAW;AAAA,EACxC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,MAAM;AAAA,IACJ,YAAY;AAAA,MACV,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,IACA,cAAc;AAAA,MACZ,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,IACA,cAAc;AAAA,MACZ,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,EACF;AACF,CAAC;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../src/interface/crud/current-user.ts"],"sourcesContent":["import { CrudTypeOf, createCrud } from \"../../crud\";\nimport { yupObject } from \"../../schema-fields\";\nimport { teamsCrudClientReadSchema } from \"./teams\";\nimport { usersCrudServerDeleteSchema, usersCrudServerReadSchema, usersCrudServerUpdateSchema } from \"./users\";\n\nconst clientUpdateSchema = usersCrudServerUpdateSchema.pick([\n \"display_name\",\n \"profile_image_url\",\n \"client_metadata\",\n \"selected_team_id\",\n \"totp_secret_base64\",\n \"otp_auth_enabled\",\n \"passkey_auth_enabled\",\n \"primary_email\",\n]).defined();\n\nconst serverUpdateSchema = usersCrudServerUpdateSchema;\n\nconst clientReadSchema = usersCrudServerReadSchema.pick([\n \"id\",\n \"primary_email\",\n \"primary_email_verified\",\n \"display_name\",\n \"client_metadata\",\n \"client_read_only_metadata\",\n \"profile_image_url\",\n \"signed_up_at_millis\",\n \"has_password\",\n \"auth_with_email\",\n \"oauth_providers\",\n \"selected_team_id\",\n \"requires_totp_mfa\",\n \"otp_auth_enabled\",\n \"passkey_auth_enabled\",\n \"is_anonymous\",\n \"is_restricted\",\n \"restricted_reason\",\n \"restricted_by_admin\",\n \"restricted_by_admin_reason\",\n]).concat(yupObject({\n selected_team: teamsCrudClientReadSchema.nullable().defined(),\n})).defined();\n\nconst serverReadSchema = usersCrudServerReadSchema.defined();\n\nconst clientDeleteSchema = usersCrudServerDeleteSchema;\n\nexport const currentUserCrud = createCrud({\n clientReadSchema,\n serverReadSchema,\n clientUpdateSchema,\n serverUpdateSchema,\n clientDeleteSchema,\n docs: {\n clientRead: {\n summary: 'Get current user',\n description: 'Gets the currently authenticated user.',\n tags: ['Users'],\n },\n clientUpdate: {\n summary: 'Update current user',\n description: 'Updates the currently authenticated user. Only the values provided will be updated.',\n tags: ['Users'],\n },\n clientDelete: {\n summary: 'Delete current user',\n description: 'Deletes the currently authenticated user. Use this with caution.',\n tags: ['Users'],\n },\n },\n});\nexport type CurrentUserCrud = CrudTypeOf<typeof currentUserCrud>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAuC;AACvC,2BAA0B;AAC1B,mBAA0C;AAC1C,mBAAoG;AAEpG,IAAM,qBAAqB,yCAA4B,KAAK;AAAA,EAC1D;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC,EAAE,QAAQ;AAEX,IAAM,qBAAqB;AAE3B,IAAM,mBAAmB,uCAA0B,KAAK;AAAA,EACtD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC,EAAE,WAAO,gCAAU;AAAA,EAClB,eAAe,uCAA0B,SAAS,EAAE,QAAQ;AAC9D,CAAC,CAAC,EAAE,QAAQ;AAEZ,IAAM,mBAAmB,uCAA0B,QAAQ;AAE3D,IAAM,qBAAqB;AAEpB,IAAM,sBAAkB,wBAAW;AAAA,EACxC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,MAAM;AAAA,IACJ,YAAY;AAAA,MACV,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,IACA,cAAc;AAAA,MACZ,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,IACA,cAAc;AAAA,MACZ,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,EACF;AACF,CAAC;","names":[]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type SignUpRuleAction = {
|
|
2
|
+
type: 'allow' | 'reject' | 'restrict' | 'log';
|
|
3
|
+
message?: string;
|
|
4
|
+
};
|
|
5
|
+
type SignUpRule = {
|
|
6
|
+
enabled: boolean;
|
|
7
|
+
displayName: string | undefined;
|
|
8
|
+
priority: number;
|
|
9
|
+
condition: string | undefined;
|
|
10
|
+
action: SignUpRuleAction;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export type { SignUpRule, SignUpRuleAction };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type SignUpRuleAction = {
|
|
2
|
+
type: 'allow' | 'reject' | 'restrict' | 'log';
|
|
3
|
+
message?: string;
|
|
4
|
+
};
|
|
5
|
+
type SignUpRule = {
|
|
6
|
+
enabled: boolean;
|
|
7
|
+
displayName: string | undefined;
|
|
8
|
+
priority: number;
|
|
9
|
+
condition: string | undefined;
|
|
10
|
+
action: SignUpRuleAction;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export type { SignUpRule, SignUpRuleAction };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
|
|
16
|
+
// src/interface/crud/sign-up-rules.ts
|
|
17
|
+
var sign_up_rules_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(sign_up_rules_exports);
|
|
19
|
+
//# sourceMappingURL=sign-up-rules.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/interface/crud/sign-up-rules.ts"],"sourcesContent":["export type SignUpRuleAction = {\n type: 'allow' | 'reject' | 'restrict' | 'log',\n message?: string,\n};\n\nexport type SignUpRule = {\n enabled: boolean,\n displayName: string | undefined,\n priority: number,\n condition: string | undefined,\n action: SignUpRuleAction,\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -25,7 +25,7 @@ declare const teamMemberProfilesCrudServerReadSchema: yup.ObjectSchema<{
|
|
|
25
25
|
is_anonymous: boolean;
|
|
26
26
|
is_restricted: boolean;
|
|
27
27
|
restricted_reason: {
|
|
28
|
-
type: "anonymous" | "email_not_verified";
|
|
28
|
+
type: "anonymous" | "email_not_verified" | "restricted_by_administrator";
|
|
29
29
|
} | null;
|
|
30
30
|
id: string;
|
|
31
31
|
display_name: string | null;
|
|
@@ -38,6 +38,9 @@ declare const teamMemberProfilesCrudServerReadSchema: yup.ObjectSchema<{
|
|
|
38
38
|
primary_email_auth_enabled: boolean;
|
|
39
39
|
passkey_auth_enabled: boolean;
|
|
40
40
|
otp_auth_enabled: boolean;
|
|
41
|
+
restricted_by_admin: boolean;
|
|
42
|
+
restricted_by_admin_reason: string | null;
|
|
43
|
+
restricted_by_admin_private_details: string | null;
|
|
41
44
|
selected_team: {
|
|
42
45
|
client_metadata?: {} | null | undefined;
|
|
43
46
|
client_read_only_metadata?: {} | null | undefined;
|
|
@@ -93,6 +96,9 @@ declare const teamMemberProfilesCrudServerReadSchema: yup.ObjectSchema<{
|
|
|
93
96
|
restricted_reason: {
|
|
94
97
|
type: undefined;
|
|
95
98
|
};
|
|
99
|
+
restricted_by_admin: undefined;
|
|
100
|
+
restricted_by_admin_reason: undefined;
|
|
101
|
+
restricted_by_admin_private_details: undefined;
|
|
96
102
|
oauth_providers: undefined;
|
|
97
103
|
auth_with_email: undefined;
|
|
98
104
|
requires_totp_mfa: undefined;
|
|
@@ -128,7 +134,7 @@ declare const teamMemberProfilesCrud: CrudSchemaFromOptions<{
|
|
|
128
134
|
is_anonymous: boolean;
|
|
129
135
|
is_restricted: boolean;
|
|
130
136
|
restricted_reason: {
|
|
131
|
-
type: "anonymous" | "email_not_verified";
|
|
137
|
+
type: "anonymous" | "email_not_verified" | "restricted_by_administrator";
|
|
132
138
|
} | null;
|
|
133
139
|
id: string;
|
|
134
140
|
display_name: string | null;
|
|
@@ -141,6 +147,9 @@ declare const teamMemberProfilesCrud: CrudSchemaFromOptions<{
|
|
|
141
147
|
primary_email_auth_enabled: boolean;
|
|
142
148
|
passkey_auth_enabled: boolean;
|
|
143
149
|
otp_auth_enabled: boolean;
|
|
150
|
+
restricted_by_admin: boolean;
|
|
151
|
+
restricted_by_admin_reason: string | null;
|
|
152
|
+
restricted_by_admin_private_details: string | null;
|
|
144
153
|
selected_team: {
|
|
145
154
|
client_metadata?: {} | null | undefined;
|
|
146
155
|
client_read_only_metadata?: {} | null | undefined;
|
|
@@ -196,6 +205,9 @@ declare const teamMemberProfilesCrud: CrudSchemaFromOptions<{
|
|
|
196
205
|
restricted_reason: {
|
|
197
206
|
type: undefined;
|
|
198
207
|
};
|
|
208
|
+
restricted_by_admin: undefined;
|
|
209
|
+
restricted_by_admin_reason: undefined;
|
|
210
|
+
restricted_by_admin_private_details: undefined;
|
|
199
211
|
oauth_providers: undefined;
|
|
200
212
|
auth_with_email: undefined;
|
|
201
213
|
requires_totp_mfa: undefined;
|
|
@@ -25,7 +25,7 @@ declare const teamMemberProfilesCrudServerReadSchema: yup.ObjectSchema<{
|
|
|
25
25
|
is_anonymous: boolean;
|
|
26
26
|
is_restricted: boolean;
|
|
27
27
|
restricted_reason: {
|
|
28
|
-
type: "anonymous" | "email_not_verified";
|
|
28
|
+
type: "anonymous" | "email_not_verified" | "restricted_by_administrator";
|
|
29
29
|
} | null;
|
|
30
30
|
id: string;
|
|
31
31
|
display_name: string | null;
|
|
@@ -38,6 +38,9 @@ declare const teamMemberProfilesCrudServerReadSchema: yup.ObjectSchema<{
|
|
|
38
38
|
primary_email_auth_enabled: boolean;
|
|
39
39
|
passkey_auth_enabled: boolean;
|
|
40
40
|
otp_auth_enabled: boolean;
|
|
41
|
+
restricted_by_admin: boolean;
|
|
42
|
+
restricted_by_admin_reason: string | null;
|
|
43
|
+
restricted_by_admin_private_details: string | null;
|
|
41
44
|
selected_team: {
|
|
42
45
|
client_metadata?: {} | null | undefined;
|
|
43
46
|
client_read_only_metadata?: {} | null | undefined;
|
|
@@ -93,6 +96,9 @@ declare const teamMemberProfilesCrudServerReadSchema: yup.ObjectSchema<{
|
|
|
93
96
|
restricted_reason: {
|
|
94
97
|
type: undefined;
|
|
95
98
|
};
|
|
99
|
+
restricted_by_admin: undefined;
|
|
100
|
+
restricted_by_admin_reason: undefined;
|
|
101
|
+
restricted_by_admin_private_details: undefined;
|
|
96
102
|
oauth_providers: undefined;
|
|
97
103
|
auth_with_email: undefined;
|
|
98
104
|
requires_totp_mfa: undefined;
|
|
@@ -128,7 +134,7 @@ declare const teamMemberProfilesCrud: CrudSchemaFromOptions<{
|
|
|
128
134
|
is_anonymous: boolean;
|
|
129
135
|
is_restricted: boolean;
|
|
130
136
|
restricted_reason: {
|
|
131
|
-
type: "anonymous" | "email_not_verified";
|
|
137
|
+
type: "anonymous" | "email_not_verified" | "restricted_by_administrator";
|
|
132
138
|
} | null;
|
|
133
139
|
id: string;
|
|
134
140
|
display_name: string | null;
|
|
@@ -141,6 +147,9 @@ declare const teamMemberProfilesCrud: CrudSchemaFromOptions<{
|
|
|
141
147
|
primary_email_auth_enabled: boolean;
|
|
142
148
|
passkey_auth_enabled: boolean;
|
|
143
149
|
otp_auth_enabled: boolean;
|
|
150
|
+
restricted_by_admin: boolean;
|
|
151
|
+
restricted_by_admin_reason: string | null;
|
|
152
|
+
restricted_by_admin_private_details: string | null;
|
|
144
153
|
selected_team: {
|
|
145
154
|
client_metadata?: {} | null | undefined;
|
|
146
155
|
client_read_only_metadata?: {} | null | undefined;
|
|
@@ -196,6 +205,9 @@ declare const teamMemberProfilesCrud: CrudSchemaFromOptions<{
|
|
|
196
205
|
restricted_reason: {
|
|
197
206
|
type: undefined;
|
|
198
207
|
};
|
|
208
|
+
restricted_by_admin: undefined;
|
|
209
|
+
restricted_by_admin_reason: undefined;
|
|
210
|
+
restricted_by_admin_private_details: undefined;
|
|
199
211
|
oauth_providers: undefined;
|
|
200
212
|
auth_with_email: undefined;
|
|
201
213
|
requires_totp_mfa: undefined;
|
|
@@ -19,6 +19,9 @@ declare const usersCrudServerUpdateSchema: yup.ObjectSchema<{
|
|
|
19
19
|
totp_secret_base64: string | null | undefined;
|
|
20
20
|
selected_team_id: string | null | undefined;
|
|
21
21
|
is_anonymous: boolean | undefined;
|
|
22
|
+
restricted_by_admin: boolean | undefined;
|
|
23
|
+
restricted_by_admin_reason: string | null | undefined;
|
|
24
|
+
restricted_by_admin_private_details: string | null | undefined;
|
|
22
25
|
}, yup.AnyObject, {
|
|
23
26
|
display_name: undefined;
|
|
24
27
|
profile_image_url: undefined;
|
|
@@ -35,6 +38,9 @@ declare const usersCrudServerUpdateSchema: yup.ObjectSchema<{
|
|
|
35
38
|
totp_secret_base64: undefined;
|
|
36
39
|
selected_team_id: undefined;
|
|
37
40
|
is_anonymous: undefined;
|
|
41
|
+
restricted_by_admin: undefined;
|
|
42
|
+
restricted_by_admin_reason: undefined;
|
|
43
|
+
restricted_by_admin_private_details: undefined;
|
|
38
44
|
}, "">;
|
|
39
45
|
declare const usersCrudServerReadSchema: yup.ObjectSchema<{
|
|
40
46
|
id: string;
|
|
@@ -64,8 +70,11 @@ declare const usersCrudServerReadSchema: yup.ObjectSchema<{
|
|
|
64
70
|
is_anonymous: boolean;
|
|
65
71
|
is_restricted: boolean;
|
|
66
72
|
restricted_reason: {
|
|
67
|
-
type: "anonymous" | "email_not_verified";
|
|
73
|
+
type: "anonymous" | "email_not_verified" | "restricted_by_administrator";
|
|
68
74
|
} | null;
|
|
75
|
+
restricted_by_admin: boolean;
|
|
76
|
+
restricted_by_admin_reason: string | null;
|
|
77
|
+
restricted_by_admin_private_details: string | null;
|
|
69
78
|
oauth_providers: {
|
|
70
79
|
email?: string | null | undefined;
|
|
71
80
|
id: string;
|
|
@@ -103,6 +112,9 @@ declare const usersCrudServerReadSchema: yup.ObjectSchema<{
|
|
|
103
112
|
restricted_reason: {
|
|
104
113
|
type: undefined;
|
|
105
114
|
};
|
|
115
|
+
restricted_by_admin: undefined;
|
|
116
|
+
restricted_by_admin_reason: undefined;
|
|
117
|
+
restricted_by_admin_private_details: undefined;
|
|
106
118
|
oauth_providers: undefined;
|
|
107
119
|
auth_with_email: undefined;
|
|
108
120
|
requires_totp_mfa: undefined;
|
|
@@ -122,6 +134,9 @@ declare const usersCrudServerCreateSchema: yup.ObjectSchema<{
|
|
|
122
134
|
password_hash: string | undefined;
|
|
123
135
|
otp_auth_enabled: boolean | undefined;
|
|
124
136
|
totp_secret_base64: string | null | undefined;
|
|
137
|
+
restricted_by_admin: boolean | undefined;
|
|
138
|
+
restricted_by_admin_reason: string | null | undefined;
|
|
139
|
+
restricted_by_admin_private_details: string | null | undefined;
|
|
125
140
|
} & {
|
|
126
141
|
oauth_providers: {
|
|
127
142
|
email: string | null;
|
|
@@ -145,6 +160,9 @@ declare const usersCrudServerCreateSchema: yup.ObjectSchema<{
|
|
|
145
160
|
totp_secret_base64: undefined;
|
|
146
161
|
selected_team_id: undefined;
|
|
147
162
|
is_anonymous: undefined;
|
|
163
|
+
restricted_by_admin: undefined;
|
|
164
|
+
restricted_by_admin_reason: undefined;
|
|
165
|
+
restricted_by_admin_private_details: undefined;
|
|
148
166
|
oauth_providers: undefined;
|
|
149
167
|
}, "">;
|
|
150
168
|
declare const usersCrudServerDeleteSchema: yup.MixedSchema<{} | undefined, yup.AnyObject, undefined, "">;
|
|
@@ -177,8 +195,11 @@ declare const usersCrud: CrudSchemaFromOptions<{
|
|
|
177
195
|
is_anonymous: boolean;
|
|
178
196
|
is_restricted: boolean;
|
|
179
197
|
restricted_reason: {
|
|
180
|
-
type: "anonymous" | "email_not_verified";
|
|
198
|
+
type: "anonymous" | "email_not_verified" | "restricted_by_administrator";
|
|
181
199
|
} | null;
|
|
200
|
+
restricted_by_admin: boolean;
|
|
201
|
+
restricted_by_admin_reason: string | null;
|
|
202
|
+
restricted_by_admin_private_details: string | null;
|
|
182
203
|
oauth_providers: {
|
|
183
204
|
email?: string | null | undefined;
|
|
184
205
|
id: string;
|
|
@@ -216,6 +237,9 @@ declare const usersCrud: CrudSchemaFromOptions<{
|
|
|
216
237
|
restricted_reason: {
|
|
217
238
|
type: undefined;
|
|
218
239
|
};
|
|
240
|
+
restricted_by_admin: undefined;
|
|
241
|
+
restricted_by_admin_reason: undefined;
|
|
242
|
+
restricted_by_admin_private_details: undefined;
|
|
219
243
|
oauth_providers: undefined;
|
|
220
244
|
auth_with_email: undefined;
|
|
221
245
|
requires_totp_mfa: undefined;
|
|
@@ -236,6 +260,9 @@ declare const usersCrud: CrudSchemaFromOptions<{
|
|
|
236
260
|
totp_secret_base64: string | null | undefined;
|
|
237
261
|
selected_team_id: string | null | undefined;
|
|
238
262
|
is_anonymous: boolean | undefined;
|
|
263
|
+
restricted_by_admin: boolean | undefined;
|
|
264
|
+
restricted_by_admin_reason: string | null | undefined;
|
|
265
|
+
restricted_by_admin_private_details: string | null | undefined;
|
|
239
266
|
}, yup.AnyObject, {
|
|
240
267
|
display_name: undefined;
|
|
241
268
|
profile_image_url: undefined;
|
|
@@ -252,6 +279,9 @@ declare const usersCrud: CrudSchemaFromOptions<{
|
|
|
252
279
|
totp_secret_base64: undefined;
|
|
253
280
|
selected_team_id: undefined;
|
|
254
281
|
is_anonymous: undefined;
|
|
282
|
+
restricted_by_admin: undefined;
|
|
283
|
+
restricted_by_admin_reason: undefined;
|
|
284
|
+
restricted_by_admin_private_details: undefined;
|
|
255
285
|
}, "">;
|
|
256
286
|
serverCreateSchema: yup.ObjectSchema<{
|
|
257
287
|
is_anonymous: boolean | undefined;
|
|
@@ -268,6 +298,9 @@ declare const usersCrud: CrudSchemaFromOptions<{
|
|
|
268
298
|
password_hash: string | undefined;
|
|
269
299
|
otp_auth_enabled: boolean | undefined;
|
|
270
300
|
totp_secret_base64: string | null | undefined;
|
|
301
|
+
restricted_by_admin: boolean | undefined;
|
|
302
|
+
restricted_by_admin_reason: string | null | undefined;
|
|
303
|
+
restricted_by_admin_private_details: string | null | undefined;
|
|
271
304
|
} & {
|
|
272
305
|
oauth_providers: {
|
|
273
306
|
email: string | null;
|
|
@@ -291,6 +324,9 @@ declare const usersCrud: CrudSchemaFromOptions<{
|
|
|
291
324
|
totp_secret_base64: undefined;
|
|
292
325
|
selected_team_id: undefined;
|
|
293
326
|
is_anonymous: undefined;
|
|
327
|
+
restricted_by_admin: undefined;
|
|
328
|
+
restricted_by_admin_reason: undefined;
|
|
329
|
+
restricted_by_admin_private_details: undefined;
|
|
294
330
|
oauth_providers: undefined;
|
|
295
331
|
}, "">;
|
|
296
332
|
serverDeleteSchema: yup.MixedSchema<{} | undefined, yup.AnyObject, undefined, "">;
|
|
@@ -353,8 +389,11 @@ declare const userCreatedWebhookEvent: {
|
|
|
353
389
|
is_anonymous: boolean;
|
|
354
390
|
is_restricted: boolean;
|
|
355
391
|
restricted_reason: {
|
|
356
|
-
type: "anonymous" | "email_not_verified";
|
|
392
|
+
type: "anonymous" | "email_not_verified" | "restricted_by_administrator";
|
|
357
393
|
} | null;
|
|
394
|
+
restricted_by_admin: boolean;
|
|
395
|
+
restricted_by_admin_reason: string | null;
|
|
396
|
+
restricted_by_admin_private_details: string | null;
|
|
358
397
|
oauth_providers: {
|
|
359
398
|
email?: string | null | undefined;
|
|
360
399
|
id: string;
|
|
@@ -392,6 +431,9 @@ declare const userCreatedWebhookEvent: {
|
|
|
392
431
|
restricted_reason: {
|
|
393
432
|
type: undefined;
|
|
394
433
|
};
|
|
434
|
+
restricted_by_admin: undefined;
|
|
435
|
+
restricted_by_admin_reason: undefined;
|
|
436
|
+
restricted_by_admin_private_details: undefined;
|
|
395
437
|
oauth_providers: undefined;
|
|
396
438
|
auth_with_email: undefined;
|
|
397
439
|
requires_totp_mfa: undefined;
|
|
@@ -432,8 +474,11 @@ declare const userUpdatedWebhookEvent: {
|
|
|
432
474
|
is_anonymous: boolean;
|
|
433
475
|
is_restricted: boolean;
|
|
434
476
|
restricted_reason: {
|
|
435
|
-
type: "anonymous" | "email_not_verified";
|
|
477
|
+
type: "anonymous" | "email_not_verified" | "restricted_by_administrator";
|
|
436
478
|
} | null;
|
|
479
|
+
restricted_by_admin: boolean;
|
|
480
|
+
restricted_by_admin_reason: string | null;
|
|
481
|
+
restricted_by_admin_private_details: string | null;
|
|
437
482
|
oauth_providers: {
|
|
438
483
|
email?: string | null | undefined;
|
|
439
484
|
id: string;
|
|
@@ -471,6 +516,9 @@ declare const userUpdatedWebhookEvent: {
|
|
|
471
516
|
restricted_reason: {
|
|
472
517
|
type: undefined;
|
|
473
518
|
};
|
|
519
|
+
restricted_by_admin: undefined;
|
|
520
|
+
restricted_by_admin_reason: undefined;
|
|
521
|
+
restricted_by_admin_private_details: undefined;
|
|
474
522
|
oauth_providers: undefined;
|
|
475
523
|
auth_with_email: undefined;
|
|
476
524
|
requires_totp_mfa: undefined;
|