@stackframe/stack-shared 2.5.35 → 2.5.37
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/CHANGELOG.md +15 -0
- package/dist/interface/clientInterface.d.ts +1 -0
- package/dist/interface/clientInterface.js +5 -0
- package/dist/interface/crud/current-user.d.ts +5 -5
- package/dist/interface/crud/current-user.js +2 -2
- package/dist/interface/crud/projects.d.ts +26 -12
- package/dist/interface/crud/projects.js +3 -0
- package/dist/interface/crud/team-member-profiles.d.ts +4 -4
- package/dist/interface/crud/users.d.ts +12 -8
- package/dist/interface/crud/users.js +3 -0
- package/dist/interface/webhooks.d.ts +8 -4
- package/dist/schema-fields.d.ts +3 -2
- package/dist/schema-fields.js +1 -0
- package/dist/utils/oauth.d.ts +2 -2
- package/dist/utils/oauth.js +1 -1
- package/package.json +2 -2
- package/dist/interface/crud-deprecated/api-keys.d.ts +0 -134
- package/dist/interface/crud-deprecated/api-keys.js +0 -61
- package/dist/interface/crud-deprecated/current-user.d.ts +0 -127
- package/dist/interface/crud-deprecated/current-user.js +0 -49
- package/dist/interface/crud-deprecated/email-templates.d.ts +0 -75
- package/dist/interface/crud-deprecated/email-templates.js +0 -41
- package/dist/interface/crud-deprecated/oauth.d.ts +0 -24
- package/dist/interface/crud-deprecated/oauth.js +0 -12
- package/dist/interface/crud-deprecated/projects.d.ts +0 -440
- package/dist/interface/crud-deprecated/projects.js +0 -109
- package/dist/interface/crud-deprecated/team-memberships.d.ts +0 -22
- package/dist/interface/crud-deprecated/team-memberships.js +0 -22
- package/dist/interface/crud-deprecated/team-permissions.d.ts +0 -129
- package/dist/interface/crud-deprecated/team-permissions.js +0 -83
- package/dist/interface/crud-deprecated/teams.d.ts +0 -126
- package/dist/interface/crud-deprecated/teams.js +0 -78
- package/dist/interface/crud-deprecated/users.d.ts +0 -199
- package/dist/interface/crud-deprecated/users.js +0 -75
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @stackframe/stack-shared
|
|
2
2
|
|
|
3
|
+
## 2.5.37
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- client side account deletion; new account setting style;
|
|
8
|
+
- @stackframe/stack-sc@2.5.37
|
|
9
|
+
|
|
10
|
+
## 2.5.36
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- added apple oauth
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
- @stackframe/stack-sc@2.5.36
|
|
17
|
+
|
|
3
18
|
## 2.5.35
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -155,4 +155,5 @@ export declare class StackClientInterface {
|
|
|
155
155
|
createProject(project: InternalProjectsCrud['Client']['Create'], session: InternalSession): Promise<InternalProjectsCrud['Client']['Read']>;
|
|
156
156
|
createProviderAccessToken(provider: string, scope: string, session: InternalSession): Promise<ConnectedAccountAccessTokenCrud['Client']['Read']>;
|
|
157
157
|
createTeamForCurrentUser(data: TeamsCrud['Client']['Create'], session: InternalSession): Promise<TeamsCrud['Client']['Read']>;
|
|
158
|
+
deleteCurrentUser(session: InternalSession): Promise<void>;
|
|
158
159
|
}
|
|
@@ -30,7 +30,7 @@ export declare const currentUserCrud: import("../../crud").CrudSchemaFromOptions
|
|
|
30
30
|
} | {
|
|
31
31
|
type: "oauth";
|
|
32
32
|
provider: {
|
|
33
|
-
type: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined>;
|
|
33
|
+
type: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | undefined>;
|
|
34
34
|
id: string;
|
|
35
35
|
provider_user_id: string;
|
|
36
36
|
};
|
|
@@ -38,7 +38,7 @@ export declare const currentUserCrud: import("../../crud").CrudSchemaFromOptions
|
|
|
38
38
|
connected_accounts: {
|
|
39
39
|
type: "oauth";
|
|
40
40
|
provider: {
|
|
41
|
-
type: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined>;
|
|
41
|
+
type: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | undefined>;
|
|
42
42
|
id: string;
|
|
43
43
|
provider_user_id: string;
|
|
44
44
|
};
|
|
@@ -114,7 +114,7 @@ export declare const currentUserCrud: import("../../crud").CrudSchemaFromOptions
|
|
|
114
114
|
} | {
|
|
115
115
|
type: "oauth";
|
|
116
116
|
provider: {
|
|
117
|
-
type: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined>;
|
|
117
|
+
type: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | undefined>;
|
|
118
118
|
id: string;
|
|
119
119
|
provider_user_id: string;
|
|
120
120
|
};
|
|
@@ -122,7 +122,7 @@ export declare const currentUserCrud: import("../../crud").CrudSchemaFromOptions
|
|
|
122
122
|
connected_accounts: {
|
|
123
123
|
type: "oauth";
|
|
124
124
|
provider: {
|
|
125
|
-
type: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined>;
|
|
125
|
+
type: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | undefined>;
|
|
126
126
|
id: string;
|
|
127
127
|
provider_user_id: string;
|
|
128
128
|
};
|
|
@@ -203,7 +203,7 @@ export declare const currentUserCrud: import("../../crud").CrudSchemaFromOptions
|
|
|
203
203
|
totp_secret_base64: undefined;
|
|
204
204
|
selected_team_id: undefined;
|
|
205
205
|
}, "">;
|
|
206
|
-
|
|
206
|
+
clientDeleteSchema: import("yup").MixedSchema<{} | undefined, import("yup").AnyObject, undefined, "">;
|
|
207
207
|
docs: {
|
|
208
208
|
clientRead: {
|
|
209
209
|
summary: string;
|
|
@@ -31,13 +31,13 @@ const clientReadSchema = usersCrudServerReadSchema.pick([
|
|
|
31
31
|
})).nullable().defined(); // TODO: next-release: make required
|
|
32
32
|
// TODO: next-release: make required
|
|
33
33
|
const serverReadSchema = usersCrudServerReadSchema.nullable().defined();
|
|
34
|
-
const
|
|
34
|
+
const clientDeleteSchema = usersCrudServerDeleteSchema;
|
|
35
35
|
export const currentUserCrud = createCrud({
|
|
36
36
|
clientReadSchema,
|
|
37
37
|
serverReadSchema,
|
|
38
38
|
clientUpdateSchema,
|
|
39
39
|
serverUpdateSchema,
|
|
40
|
-
|
|
40
|
+
clientDeleteSchema,
|
|
41
41
|
docs: {
|
|
42
42
|
clientRead: {
|
|
43
43
|
summary: 'Get current user',
|
|
@@ -13,17 +13,18 @@ export declare const projectsCrudAdminReadSchema: import("yup").ObjectSchema<{
|
|
|
13
13
|
credential_enabled: NonNullable<boolean | undefined>;
|
|
14
14
|
magic_link_enabled: NonNullable<boolean | undefined>;
|
|
15
15
|
client_team_creation_enabled: NonNullable<boolean | undefined>;
|
|
16
|
+
client_user_deletion_enabled: NonNullable<boolean | undefined>;
|
|
16
17
|
oauth_providers: {
|
|
17
18
|
client_id?: string | undefined;
|
|
18
19
|
client_secret?: string | undefined;
|
|
19
20
|
facebook_config_id?: string | undefined;
|
|
20
21
|
microsoft_tenant_id?: string | undefined;
|
|
21
22
|
type: NonNullable<"shared" | "standard" | undefined>;
|
|
22
|
-
id: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined>;
|
|
23
|
+
id: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | undefined>;
|
|
23
24
|
enabled: NonNullable<boolean | undefined>;
|
|
24
25
|
}[];
|
|
25
26
|
enabled_oauth_providers: {
|
|
26
|
-
id: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined>;
|
|
27
|
+
id: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | undefined>;
|
|
27
28
|
}[];
|
|
28
29
|
domains: {
|
|
29
30
|
domain: string;
|
|
@@ -60,6 +61,7 @@ export declare const projectsCrudAdminReadSchema: import("yup").ObjectSchema<{
|
|
|
60
61
|
credential_enabled: undefined;
|
|
61
62
|
magic_link_enabled: undefined;
|
|
62
63
|
client_team_creation_enabled: undefined;
|
|
64
|
+
client_user_deletion_enabled: undefined;
|
|
63
65
|
oauth_providers: undefined;
|
|
64
66
|
enabled_oauth_providers: undefined;
|
|
65
67
|
domains: undefined;
|
|
@@ -85,8 +87,9 @@ export declare const projectsCrudClientReadSchema: import("yup").ObjectSchema<{
|
|
|
85
87
|
credential_enabled: NonNullable<boolean | undefined>;
|
|
86
88
|
magic_link_enabled: NonNullable<boolean | undefined>;
|
|
87
89
|
client_team_creation_enabled: NonNullable<boolean | undefined>;
|
|
90
|
+
client_user_deletion_enabled: NonNullable<boolean | undefined>;
|
|
88
91
|
enabled_oauth_providers: {
|
|
89
|
-
id: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined>;
|
|
92
|
+
id: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | undefined>;
|
|
90
93
|
}[];
|
|
91
94
|
};
|
|
92
95
|
}, import("yup").AnyObject, {
|
|
@@ -97,6 +100,7 @@ export declare const projectsCrudClientReadSchema: import("yup").ObjectSchema<{
|
|
|
97
100
|
credential_enabled: undefined;
|
|
98
101
|
magic_link_enabled: undefined;
|
|
99
102
|
client_team_creation_enabled: undefined;
|
|
103
|
+
client_user_deletion_enabled: undefined;
|
|
100
104
|
enabled_oauth_providers: undefined;
|
|
101
105
|
};
|
|
102
106
|
}, "">;
|
|
@@ -110,13 +114,14 @@ export declare const projectsCrudAdminUpdateSchema: import("yup").ObjectSchema<{
|
|
|
110
114
|
credential_enabled?: boolean | undefined;
|
|
111
115
|
magic_link_enabled?: boolean | undefined;
|
|
112
116
|
client_team_creation_enabled?: boolean | undefined;
|
|
117
|
+
client_user_deletion_enabled?: boolean | undefined;
|
|
113
118
|
oauth_providers?: {
|
|
114
119
|
client_id?: string | undefined;
|
|
115
120
|
client_secret?: string | undefined;
|
|
116
121
|
facebook_config_id?: string | undefined;
|
|
117
122
|
microsoft_tenant_id?: string | undefined;
|
|
118
123
|
type: NonNullable<"shared" | "standard" | undefined>;
|
|
119
|
-
id: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined>;
|
|
124
|
+
id: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | undefined>;
|
|
120
125
|
enabled: NonNullable<boolean | undefined>;
|
|
121
126
|
}[] | undefined;
|
|
122
127
|
domains?: {
|
|
@@ -156,13 +161,14 @@ export declare const projectsCrudAdminCreateSchema: import("yup").ObjectSchema<{
|
|
|
156
161
|
credential_enabled?: boolean | undefined;
|
|
157
162
|
magic_link_enabled?: boolean | undefined;
|
|
158
163
|
client_team_creation_enabled?: boolean | undefined;
|
|
164
|
+
client_user_deletion_enabled?: boolean | undefined;
|
|
159
165
|
oauth_providers?: {
|
|
160
166
|
client_id?: string | undefined;
|
|
161
167
|
client_secret?: string | undefined;
|
|
162
168
|
facebook_config_id?: string | undefined;
|
|
163
169
|
microsoft_tenant_id?: string | undefined;
|
|
164
170
|
type: NonNullable<"shared" | "standard" | undefined>;
|
|
165
|
-
id: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined>;
|
|
171
|
+
id: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | undefined>;
|
|
166
172
|
enabled: NonNullable<boolean | undefined>;
|
|
167
173
|
}[] | undefined;
|
|
168
174
|
domains?: {
|
|
@@ -204,8 +210,9 @@ export declare const projectsCrud: import("../../crud").CrudSchemaFromOptions<{
|
|
|
204
210
|
credential_enabled: NonNullable<boolean | undefined>;
|
|
205
211
|
magic_link_enabled: NonNullable<boolean | undefined>;
|
|
206
212
|
client_team_creation_enabled: NonNullable<boolean | undefined>;
|
|
213
|
+
client_user_deletion_enabled: NonNullable<boolean | undefined>;
|
|
207
214
|
enabled_oauth_providers: {
|
|
208
|
-
id: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined>;
|
|
215
|
+
id: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | undefined>;
|
|
209
216
|
}[];
|
|
210
217
|
};
|
|
211
218
|
}, import("yup").AnyObject, {
|
|
@@ -216,6 +223,7 @@ export declare const projectsCrud: import("../../crud").CrudSchemaFromOptions<{
|
|
|
216
223
|
credential_enabled: undefined;
|
|
217
224
|
magic_link_enabled: undefined;
|
|
218
225
|
client_team_creation_enabled: undefined;
|
|
226
|
+
client_user_deletion_enabled: undefined;
|
|
219
227
|
enabled_oauth_providers: undefined;
|
|
220
228
|
};
|
|
221
229
|
}, "">;
|
|
@@ -233,17 +241,18 @@ export declare const projectsCrud: import("../../crud").CrudSchemaFromOptions<{
|
|
|
233
241
|
credential_enabled: NonNullable<boolean | undefined>;
|
|
234
242
|
magic_link_enabled: NonNullable<boolean | undefined>;
|
|
235
243
|
client_team_creation_enabled: NonNullable<boolean | undefined>;
|
|
244
|
+
client_user_deletion_enabled: NonNullable<boolean | undefined>;
|
|
236
245
|
oauth_providers: {
|
|
237
246
|
client_id?: string | undefined;
|
|
238
247
|
client_secret?: string | undefined;
|
|
239
248
|
facebook_config_id?: string | undefined;
|
|
240
249
|
microsoft_tenant_id?: string | undefined;
|
|
241
250
|
type: NonNullable<"shared" | "standard" | undefined>;
|
|
242
|
-
id: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined>;
|
|
251
|
+
id: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | undefined>;
|
|
243
252
|
enabled: NonNullable<boolean | undefined>;
|
|
244
253
|
}[];
|
|
245
254
|
enabled_oauth_providers: {
|
|
246
|
-
id: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined>;
|
|
255
|
+
id: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | undefined>;
|
|
247
256
|
}[];
|
|
248
257
|
domains: {
|
|
249
258
|
domain: string;
|
|
@@ -280,6 +289,7 @@ export declare const projectsCrud: import("../../crud").CrudSchemaFromOptions<{
|
|
|
280
289
|
credential_enabled: undefined;
|
|
281
290
|
magic_link_enabled: undefined;
|
|
282
291
|
client_team_creation_enabled: undefined;
|
|
292
|
+
client_user_deletion_enabled: undefined;
|
|
283
293
|
oauth_providers: undefined;
|
|
284
294
|
enabled_oauth_providers: undefined;
|
|
285
295
|
domains: undefined;
|
|
@@ -307,13 +317,14 @@ export declare const projectsCrud: import("../../crud").CrudSchemaFromOptions<{
|
|
|
307
317
|
credential_enabled?: boolean | undefined;
|
|
308
318
|
magic_link_enabled?: boolean | undefined;
|
|
309
319
|
client_team_creation_enabled?: boolean | undefined;
|
|
320
|
+
client_user_deletion_enabled?: boolean | undefined;
|
|
310
321
|
oauth_providers?: {
|
|
311
322
|
client_id?: string | undefined;
|
|
312
323
|
client_secret?: string | undefined;
|
|
313
324
|
facebook_config_id?: string | undefined;
|
|
314
325
|
microsoft_tenant_id?: string | undefined;
|
|
315
326
|
type: NonNullable<"shared" | "standard" | undefined>;
|
|
316
|
-
id: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined>;
|
|
327
|
+
id: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | undefined>;
|
|
317
328
|
enabled: NonNullable<boolean | undefined>;
|
|
318
329
|
}[] | undefined;
|
|
319
330
|
domains?: {
|
|
@@ -383,17 +394,18 @@ export declare const internalProjectsCrud: import("../../crud").CrudSchemaFromOp
|
|
|
383
394
|
credential_enabled: NonNullable<boolean | undefined>;
|
|
384
395
|
magic_link_enabled: NonNullable<boolean | undefined>;
|
|
385
396
|
client_team_creation_enabled: NonNullable<boolean | undefined>;
|
|
397
|
+
client_user_deletion_enabled: NonNullable<boolean | undefined>;
|
|
386
398
|
oauth_providers: {
|
|
387
399
|
client_id?: string | undefined;
|
|
388
400
|
client_secret?: string | undefined;
|
|
389
401
|
facebook_config_id?: string | undefined;
|
|
390
402
|
microsoft_tenant_id?: string | undefined;
|
|
391
403
|
type: NonNullable<"shared" | "standard" | undefined>;
|
|
392
|
-
id: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined>;
|
|
404
|
+
id: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | undefined>;
|
|
393
405
|
enabled: NonNullable<boolean | undefined>;
|
|
394
406
|
}[];
|
|
395
407
|
enabled_oauth_providers: {
|
|
396
|
-
id: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined>;
|
|
408
|
+
id: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | undefined>;
|
|
397
409
|
}[];
|
|
398
410
|
domains: {
|
|
399
411
|
domain: string;
|
|
@@ -430,6 +442,7 @@ export declare const internalProjectsCrud: import("../../crud").CrudSchemaFromOp
|
|
|
430
442
|
credential_enabled: undefined;
|
|
431
443
|
magic_link_enabled: undefined;
|
|
432
444
|
client_team_creation_enabled: undefined;
|
|
445
|
+
client_user_deletion_enabled: undefined;
|
|
433
446
|
oauth_providers: undefined;
|
|
434
447
|
enabled_oauth_providers: undefined;
|
|
435
448
|
domains: undefined;
|
|
@@ -457,13 +470,14 @@ export declare const internalProjectsCrud: import("../../crud").CrudSchemaFromOp
|
|
|
457
470
|
credential_enabled?: boolean | undefined;
|
|
458
471
|
magic_link_enabled?: boolean | undefined;
|
|
459
472
|
client_team_creation_enabled?: boolean | undefined;
|
|
473
|
+
client_user_deletion_enabled?: boolean | undefined;
|
|
460
474
|
oauth_providers?: {
|
|
461
475
|
client_id?: string | undefined;
|
|
462
476
|
client_secret?: string | undefined;
|
|
463
477
|
facebook_config_id?: string | undefined;
|
|
464
478
|
microsoft_tenant_id?: string | undefined;
|
|
465
479
|
type: NonNullable<"shared" | "standard" | undefined>;
|
|
466
|
-
id: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined>;
|
|
480
|
+
id: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | undefined>;
|
|
467
481
|
enabled: NonNullable<boolean | undefined>;
|
|
468
482
|
}[] | undefined;
|
|
469
483
|
domains?: {
|
|
@@ -44,6 +44,7 @@ export const projectsCrudAdminReadSchema = yupObject({
|
|
|
44
44
|
credential_enabled: schemaFields.projectCredentialEnabledSchema.required(),
|
|
45
45
|
magic_link_enabled: schemaFields.projectMagicLinkEnabledSchema.required(),
|
|
46
46
|
client_team_creation_enabled: schemaFields.projectClientTeamCreationEnabledSchema.required(),
|
|
47
|
+
client_user_deletion_enabled: schemaFields.projectClientUserDeletionEnabledSchema.required(),
|
|
47
48
|
oauth_providers: yupArray(oauthProviderSchema.required()).required(),
|
|
48
49
|
enabled_oauth_providers: yupArray(enabledOAuthProviderSchema.required()).required(),
|
|
49
50
|
domains: yupArray(domainSchema.required()).required(),
|
|
@@ -61,6 +62,7 @@ export const projectsCrudClientReadSchema = yupObject({
|
|
|
61
62
|
credential_enabled: schemaFields.projectCredentialEnabledSchema.required(),
|
|
62
63
|
magic_link_enabled: schemaFields.projectMagicLinkEnabledSchema.required(),
|
|
63
64
|
client_team_creation_enabled: schemaFields.projectClientTeamCreationEnabledSchema.required(),
|
|
65
|
+
client_user_deletion_enabled: schemaFields.projectClientUserDeletionEnabledSchema.required(),
|
|
64
66
|
enabled_oauth_providers: yupArray(enabledOAuthProviderSchema.required()).required(),
|
|
65
67
|
}).required(),
|
|
66
68
|
}).required();
|
|
@@ -73,6 +75,7 @@ export const projectsCrudAdminUpdateSchema = yupObject({
|
|
|
73
75
|
credential_enabled: schemaFields.projectCredentialEnabledSchema.optional(),
|
|
74
76
|
magic_link_enabled: schemaFields.projectMagicLinkEnabledSchema.optional(),
|
|
75
77
|
client_team_creation_enabled: schemaFields.projectClientTeamCreationEnabledSchema.optional(),
|
|
78
|
+
client_user_deletion_enabled: schemaFields.projectClientUserDeletionEnabledSchema.optional(),
|
|
76
79
|
allow_localhost: schemaFields.projectAllowLocalhostSchema.optional(),
|
|
77
80
|
email_config: emailConfigSchema.optional().default(undefined),
|
|
78
81
|
domains: yupArray(domainSchema.required()).optional().default(undefined),
|
|
@@ -56,7 +56,7 @@ export declare const teamMemberProfilesCrudServerReadSchema: import("yup").Objec
|
|
|
56
56
|
} | {
|
|
57
57
|
type: "oauth";
|
|
58
58
|
provider: {
|
|
59
|
-
type: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined>;
|
|
59
|
+
type: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | undefined>;
|
|
60
60
|
id: string;
|
|
61
61
|
provider_user_id: string;
|
|
62
62
|
};
|
|
@@ -64,7 +64,7 @@ export declare const teamMemberProfilesCrudServerReadSchema: import("yup").Objec
|
|
|
64
64
|
connected_accounts: {
|
|
65
65
|
type: "oauth";
|
|
66
66
|
provider: {
|
|
67
|
-
type: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined>;
|
|
67
|
+
type: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | undefined>;
|
|
68
68
|
id: string;
|
|
69
69
|
provider_user_id: string;
|
|
70
70
|
};
|
|
@@ -170,7 +170,7 @@ export declare const teamMemberProfilesCrud: import("../../crud").CrudSchemaFrom
|
|
|
170
170
|
} | {
|
|
171
171
|
type: "oauth";
|
|
172
172
|
provider: {
|
|
173
|
-
type: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined>;
|
|
173
|
+
type: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | undefined>;
|
|
174
174
|
id: string;
|
|
175
175
|
provider_user_id: string;
|
|
176
176
|
};
|
|
@@ -178,7 +178,7 @@ export declare const teamMemberProfilesCrud: import("../../crud").CrudSchemaFrom
|
|
|
178
178
|
connected_accounts: {
|
|
179
179
|
type: "oauth";
|
|
180
180
|
provider: {
|
|
181
|
-
type: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined>;
|
|
181
|
+
type: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | undefined>;
|
|
182
182
|
id: string;
|
|
183
183
|
provider_user_id: string;
|
|
184
184
|
};
|
|
@@ -61,7 +61,7 @@ export declare const usersCrudServerReadSchema: import("yup").ObjectSchema<{
|
|
|
61
61
|
} | {
|
|
62
62
|
type: "oauth";
|
|
63
63
|
provider: {
|
|
64
|
-
type: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined>;
|
|
64
|
+
type: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | undefined>;
|
|
65
65
|
id: string;
|
|
66
66
|
provider_user_id: string;
|
|
67
67
|
};
|
|
@@ -69,7 +69,7 @@ export declare const usersCrudServerReadSchema: import("yup").ObjectSchema<{
|
|
|
69
69
|
connected_accounts: {
|
|
70
70
|
type: "oauth";
|
|
71
71
|
provider: {
|
|
72
|
-
type: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined>;
|
|
72
|
+
type: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | undefined>;
|
|
73
73
|
id: string;
|
|
74
74
|
provider_user_id: string;
|
|
75
75
|
};
|
|
@@ -176,7 +176,7 @@ export declare const usersCrud: import("../../crud").CrudSchemaFromOptions<{
|
|
|
176
176
|
} | {
|
|
177
177
|
type: "oauth";
|
|
178
178
|
provider: {
|
|
179
|
-
type: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined>;
|
|
179
|
+
type: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | undefined>;
|
|
180
180
|
id: string;
|
|
181
181
|
provider_user_id: string;
|
|
182
182
|
};
|
|
@@ -184,7 +184,7 @@ export declare const usersCrud: import("../../crud").CrudSchemaFromOptions<{
|
|
|
184
184
|
connected_accounts: {
|
|
185
185
|
type: "oauth";
|
|
186
186
|
provider: {
|
|
187
|
-
type: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined>;
|
|
187
|
+
type: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | undefined>;
|
|
188
188
|
id: string;
|
|
189
189
|
provider_user_id: string;
|
|
190
190
|
};
|
|
@@ -346,7 +346,7 @@ export declare const userCreatedWebhookEvent: {
|
|
|
346
346
|
} | {
|
|
347
347
|
type: "oauth";
|
|
348
348
|
provider: {
|
|
349
|
-
type: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined>;
|
|
349
|
+
type: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | undefined>;
|
|
350
350
|
id: string;
|
|
351
351
|
provider_user_id: string;
|
|
352
352
|
};
|
|
@@ -354,7 +354,7 @@ export declare const userCreatedWebhookEvent: {
|
|
|
354
354
|
connected_accounts: {
|
|
355
355
|
type: "oauth";
|
|
356
356
|
provider: {
|
|
357
|
-
type: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined>;
|
|
357
|
+
type: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | undefined>;
|
|
358
358
|
id: string;
|
|
359
359
|
provider_user_id: string;
|
|
360
360
|
};
|
|
@@ -436,7 +436,7 @@ export declare const userUpdatedWebhookEvent: {
|
|
|
436
436
|
} | {
|
|
437
437
|
type: "oauth";
|
|
438
438
|
provider: {
|
|
439
|
-
type: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined>;
|
|
439
|
+
type: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | undefined>;
|
|
440
440
|
id: string;
|
|
441
441
|
provider_user_id: string;
|
|
442
442
|
};
|
|
@@ -444,7 +444,7 @@ export declare const userUpdatedWebhookEvent: {
|
|
|
444
444
|
connected_accounts: {
|
|
445
445
|
type: "oauth";
|
|
446
446
|
provider: {
|
|
447
|
-
type: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined>;
|
|
447
|
+
type: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | undefined>;
|
|
448
448
|
id: string;
|
|
449
449
|
provider_user_id: string;
|
|
450
450
|
};
|
|
@@ -491,8 +491,12 @@ export declare const userDeletedWebhookEvent: {
|
|
|
491
491
|
type: string;
|
|
492
492
|
schema: import("yup").ObjectSchema<{
|
|
493
493
|
id: string;
|
|
494
|
+
teams: {
|
|
495
|
+
id: string;
|
|
496
|
+
}[];
|
|
494
497
|
}, import("yup").AnyObject, {
|
|
495
498
|
id: undefined;
|
|
499
|
+
teams: undefined;
|
|
496
500
|
}, "">;
|
|
497
501
|
metadata: {
|
|
498
502
|
summary: string;
|
|
@@ -123,6 +123,9 @@ export const userUpdatedWebhookEvent = {
|
|
|
123
123
|
};
|
|
124
124
|
const webhookUserDeletedSchema = fieldSchema.yupObject({
|
|
125
125
|
id: fieldSchema.userIdSchema.required(),
|
|
126
|
+
teams: fieldSchema.yupArray(fieldSchema.yupObject({
|
|
127
|
+
id: fieldSchema.yupString().required(),
|
|
128
|
+
})).required(),
|
|
126
129
|
}).required();
|
|
127
130
|
export const userDeletedWebhookEvent = {
|
|
128
131
|
type: "user.deleted",
|
|
@@ -47,7 +47,7 @@ export declare const webhookEvents: readonly [{
|
|
|
47
47
|
} | {
|
|
48
48
|
type: "oauth";
|
|
49
49
|
provider: {
|
|
50
|
-
type: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined>;
|
|
50
|
+
type: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | undefined>;
|
|
51
51
|
id: string;
|
|
52
52
|
provider_user_id: string;
|
|
53
53
|
};
|
|
@@ -55,7 +55,7 @@ export declare const webhookEvents: readonly [{
|
|
|
55
55
|
connected_accounts: {
|
|
56
56
|
type: "oauth";
|
|
57
57
|
provider: {
|
|
58
|
-
type: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined>;
|
|
58
|
+
type: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | undefined>;
|
|
59
59
|
id: string;
|
|
60
60
|
provider_user_id: string;
|
|
61
61
|
};
|
|
@@ -136,7 +136,7 @@ export declare const webhookEvents: readonly [{
|
|
|
136
136
|
} | {
|
|
137
137
|
type: "oauth";
|
|
138
138
|
provider: {
|
|
139
|
-
type: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined>;
|
|
139
|
+
type: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | undefined>;
|
|
140
140
|
id: string;
|
|
141
141
|
provider_user_id: string;
|
|
142
142
|
};
|
|
@@ -144,7 +144,7 @@ export declare const webhookEvents: readonly [{
|
|
|
144
144
|
connected_accounts: {
|
|
145
145
|
type: "oauth";
|
|
146
146
|
provider: {
|
|
147
|
-
type: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined>;
|
|
147
|
+
type: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | undefined>;
|
|
148
148
|
id: string;
|
|
149
149
|
provider_user_id: string;
|
|
150
150
|
};
|
|
@@ -190,8 +190,12 @@ export declare const webhookEvents: readonly [{
|
|
|
190
190
|
type: string;
|
|
191
191
|
schema: yup.ObjectSchema<{
|
|
192
192
|
id: string;
|
|
193
|
+
teams: {
|
|
194
|
+
id: string;
|
|
195
|
+
}[];
|
|
193
196
|
}, yup.AnyObject, {
|
|
194
197
|
id: undefined;
|
|
198
|
+
teams: undefined;
|
|
195
199
|
}, "">;
|
|
196
200
|
metadata: {
|
|
197
201
|
summary: string;
|
package/dist/schema-fields.d.ts
CHANGED
|
@@ -37,9 +37,10 @@ export declare const projectAllowLocalhostSchema: yup.BooleanSchema<boolean | un
|
|
|
37
37
|
export declare const projectCreateTeamOnSignUpSchema: yup.BooleanSchema<boolean | undefined, yup.AnyObject, undefined, "">;
|
|
38
38
|
export declare const projectMagicLinkEnabledSchema: yup.BooleanSchema<boolean | undefined, yup.AnyObject, undefined, "">;
|
|
39
39
|
export declare const projectClientTeamCreationEnabledSchema: yup.BooleanSchema<boolean | undefined, yup.AnyObject, undefined, "">;
|
|
40
|
+
export declare const projectClientUserDeletionEnabledSchema: yup.BooleanSchema<boolean | undefined, yup.AnyObject, undefined, "">;
|
|
40
41
|
export declare const projectSignUpEnabledSchema: yup.BooleanSchema<boolean | undefined, yup.AnyObject, undefined, "">;
|
|
41
42
|
export declare const projectCredentialEnabledSchema: yup.BooleanSchema<boolean | undefined, yup.AnyObject, undefined, "">;
|
|
42
|
-
export declare const oauthIdSchema: yup.StringSchema<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined, yup.AnyObject, undefined, "">;
|
|
43
|
+
export declare const oauthIdSchema: yup.StringSchema<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | undefined, yup.AnyObject, undefined, "">;
|
|
43
44
|
export declare const oauthEnabledSchema: yup.BooleanSchema<boolean | undefined, yup.AnyObject, undefined, "">;
|
|
44
45
|
export declare const oauthTypeSchema: yup.StringSchema<"shared" | "standard" | undefined, yup.AnyObject, undefined, "">;
|
|
45
46
|
export declare const oauthClientIdSchema: yup.StringSchema<string | undefined, yup.AnyObject, undefined, "">;
|
|
@@ -70,7 +71,7 @@ export declare const userClientReadOnlyMetadataSchema: yup.MixedSchema<{} | null
|
|
|
70
71
|
export declare const userServerMetadataSchema: yup.MixedSchema<{} | null, yup.AnyObject, undefined, "">;
|
|
71
72
|
export declare const userOAuthProviderSchema: yup.ObjectSchema<{
|
|
72
73
|
id: string;
|
|
73
|
-
type: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined>;
|
|
74
|
+
type: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | undefined>;
|
|
74
75
|
provider_user_id: string;
|
|
75
76
|
}, yup.AnyObject, {
|
|
76
77
|
id: undefined;
|
package/dist/schema-fields.js
CHANGED
|
@@ -151,6 +151,7 @@ export const projectAllowLocalhostSchema = yupBoolean().meta({ openapiField: { d
|
|
|
151
151
|
export const projectCreateTeamOnSignUpSchema = yupBoolean().meta({ openapiField: { description: 'Whether a team should be created for each user that signs up', exampleValue: true } });
|
|
152
152
|
export const projectMagicLinkEnabledSchema = yupBoolean().meta({ openapiField: { description: 'Whether magic link authentication is enabled for this project', exampleValue: true } });
|
|
153
153
|
export const projectClientTeamCreationEnabledSchema = yupBoolean().meta({ openapiField: { description: 'Whether client users can create teams', exampleValue: true } });
|
|
154
|
+
export const projectClientUserDeletionEnabledSchema = yupBoolean().meta({ openapiField: { description: 'Whether client users can delete their own account from the client', exampleValue: true } });
|
|
154
155
|
export const projectSignUpEnabledSchema = yupBoolean().meta({ openapiField: { description: 'Whether users can sign up new accounts, or whether they are only allowed to sign in to existing accounts. Regardless of this option, the server API can always create new users with the `POST /users` endpoint.', exampleValue: true } });
|
|
155
156
|
export const projectCredentialEnabledSchema = yupBoolean().meta({ openapiField: { description: 'Whether email password authentication is enabled for this project', exampleValue: true } });
|
|
156
157
|
// Project OAuth config
|
package/dist/utils/oauth.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export declare const standardProviders: readonly ["google", "github", "microsoft", "spotify", "facebook", "discord", "gitlab", "bitbucket", "linkedin"];
|
|
1
|
+
export declare const standardProviders: readonly ["google", "github", "microsoft", "spotify", "facebook", "discord", "gitlab", "bitbucket", "linkedin", "apple"];
|
|
2
2
|
export declare const sharedProviders: readonly ["google", "github", "microsoft", "spotify"];
|
|
3
|
-
export declare const allProviders: readonly ["google", "github", "microsoft", "spotify", "facebook", "discord", "gitlab", "bitbucket", "linkedin"];
|
|
3
|
+
export declare const allProviders: readonly ["google", "github", "microsoft", "spotify", "facebook", "discord", "gitlab", "bitbucket", "linkedin", "apple"];
|
|
4
4
|
export type ProviderType = typeof allProviders[number];
|
|
5
5
|
export type StandardProviderType = typeof standardProviders[number];
|
|
6
6
|
export type SharedProviderType = typeof sharedProviders[number];
|
package/dist/utils/oauth.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const standardProviders = ["google", "github", "microsoft", "spotify", "facebook", "discord", "gitlab", "bitbucket", "linkedin"];
|
|
1
|
+
export const standardProviders = ["google", "github", "microsoft", "spotify", "facebook", "discord", "gitlab", "bitbucket", "linkedin", "apple"];
|
|
2
2
|
// No more shared providers should be added except for special cases
|
|
3
3
|
export const sharedProviders = ["google", "github", "microsoft", "spotify"];
|
|
4
4
|
export const allProviders = standardProviders;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackframe/stack-shared",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.37",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"jose": "^5.2.2",
|
|
38
38
|
"oauth4webapi": "^2.10.3",
|
|
39
39
|
"uuid": "^9.0.1",
|
|
40
|
-
"@stackframe/stack-sc": "2.5.
|
|
40
|
+
"@stackframe/stack-sc": "2.5.37"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/bcrypt": "^5.0.2",
|