@stackframe/js 2.7.20 → 2.7.22
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 +20 -0
- package/dist/admin-app-impl-Co__PI-r.d.ts +357 -0
- package/dist/admin-app-impl-s-tPjfRz.d.mts +357 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/lib/auth.js.map +1 -1
- package/dist/esm/lib/cookie.js +5 -8
- package/dist/esm/lib/cookie.js.map +1 -1
- package/dist/esm/lib/stack-app/api-keys/index.js +14 -0
- package/dist/esm/lib/stack-app/api-keys/index.js.map +1 -0
- package/dist/esm/lib/stack-app/apps/implementations/admin-app-impl.js +257 -0
- package/dist/esm/lib/stack-app/apps/implementations/admin-app-impl.js.map +1 -0
- package/dist/esm/lib/{stack-app.js → stack-app/apps/implementations/client-app-impl.js} +36 -952
- package/dist/esm/lib/stack-app/apps/implementations/client-app-impl.js.map +1 -0
- package/dist/esm/lib/stack-app/apps/implementations/common.js +107 -0
- package/dist/esm/lib/stack-app/apps/implementations/common.js.map +1 -0
- package/dist/esm/lib/stack-app/apps/implementations/index.js +24 -0
- package/dist/esm/lib/stack-app/apps/implementations/index.js.map +1 -0
- package/dist/esm/lib/stack-app/apps/implementations/server-app-impl.js +430 -0
- package/dist/esm/lib/stack-app/apps/implementations/server-app-impl.js.map +1 -0
- package/dist/esm/lib/stack-app/apps/index.js +16 -0
- package/dist/esm/lib/stack-app/apps/index.js.map +1 -0
- package/dist/esm/lib/stack-app/apps/interfaces/admin-app.js +7 -0
- package/dist/esm/lib/stack-app/apps/interfaces/admin-app.js.map +1 -0
- package/dist/esm/lib/stack-app/apps/interfaces/client-app.js +7 -0
- package/dist/esm/lib/stack-app/apps/interfaces/client-app.js.map +1 -0
- package/dist/esm/lib/stack-app/apps/interfaces/server-app.js +7 -0
- package/dist/esm/lib/stack-app/apps/interfaces/server-app.js.map +1 -0
- package/dist/esm/lib/stack-app/common.js +6 -0
- package/dist/esm/lib/stack-app/common.js.map +1 -0
- package/dist/esm/lib/stack-app/connected-accounts/index.js +1 -0
- package/dist/esm/lib/stack-app/contact-channels/index.js +39 -0
- package/dist/esm/lib/stack-app/contact-channels/index.js.map +1 -0
- package/dist/esm/lib/stack-app/email-templates/index.js +11 -0
- package/dist/esm/lib/stack-app/email-templates/index.js.map +1 -0
- package/dist/esm/lib/stack-app/index.js +16 -0
- package/dist/esm/lib/stack-app/index.js.map +1 -0
- package/dist/esm/lib/stack-app/permissions/index.js +20 -0
- package/dist/esm/lib/stack-app/permissions/index.js.map +1 -0
- package/dist/esm/lib/stack-app/project-configs/index.js +1 -0
- package/dist/esm/lib/stack-app/projects/index.js +57 -0
- package/dist/esm/lib/stack-app/projects/index.js.map +1 -0
- package/dist/esm/lib/stack-app/teams/index.js +38 -0
- package/dist/esm/lib/stack-app/teams/index.js.map +1 -0
- package/dist/esm/lib/stack-app/users/index.js +47 -0
- package/dist/esm/lib/stack-app/users/index.js.map +1 -0
- package/dist/esm/utils/url.js +4 -13
- package/dist/esm/utils/url.js.map +1 -1
- package/dist/{lib/stack-app.d.mts → index-COYzPcGI.d.mts} +128 -338
- package/dist/{lib/stack-app.d.ts → index-CueS5Qbi.d.ts} +128 -338
- package/dist/index.d.mts +17 -5
- package/dist/index.d.ts +17 -5
- package/dist/index.js.map +1 -1
- package/dist/lib/auth.js.map +1 -1
- package/dist/lib/cookie.d.mts +2 -2
- package/dist/lib/cookie.d.ts +2 -2
- package/dist/lib/cookie.js +6 -9
- package/dist/lib/cookie.js.map +1 -1
- package/dist/lib/stack-app/api-keys/index.d.mts +40 -0
- package/dist/lib/stack-app/api-keys/index.d.ts +40 -0
- package/dist/lib/stack-app/api-keys/index.js +39 -0
- package/dist/lib/stack-app/api-keys/index.js.map +1 -0
- package/dist/lib/stack-app/apps/implementations/admin-app-impl.d.mts +30 -0
- package/dist/lib/stack-app/apps/implementations/admin-app-impl.d.ts +30 -0
- package/dist/lib/stack-app/apps/implementations/admin-app-impl.js +282 -0
- package/dist/lib/stack-app/apps/implementations/admin-app-impl.js.map +1 -0
- package/dist/lib/stack-app/apps/implementations/client-app-impl.d.mts +30 -0
- package/dist/lib/stack-app/apps/implementations/client-app-impl.d.ts +30 -0
- package/dist/lib/{stack-app.js → stack-app/apps/implementations/client-app-impl.js} +63 -984
- package/dist/lib/stack-app/apps/implementations/client-app-impl.js.map +1 -0
- package/dist/lib/stack-app/apps/implementations/common.d.mts +44 -0
- package/dist/lib/stack-app/apps/implementations/common.d.ts +44 -0
- package/dist/lib/stack-app/apps/implementations/common.js +141 -0
- package/dist/lib/stack-app/apps/implementations/common.js.map +1 -0
- package/dist/lib/stack-app/apps/implementations/index.d.mts +36 -0
- package/dist/lib/stack-app/apps/implementations/index.d.ts +36 -0
- package/dist/lib/stack-app/apps/implementations/index.js +51 -0
- package/dist/lib/stack-app/apps/implementations/index.js.map +1 -0
- package/dist/lib/stack-app/apps/implementations/server-app-impl.d.mts +30 -0
- package/dist/lib/stack-app/apps/implementations/server-app-impl.d.ts +30 -0
- package/dist/lib/stack-app/apps/implementations/server-app-impl.js +455 -0
- package/dist/lib/stack-app/apps/implementations/server-app-impl.js.map +1 -0
- package/dist/lib/stack-app/apps/index.d.mts +23 -0
- package/dist/lib/stack-app/apps/index.d.ts +23 -0
- package/dist/lib/stack-app/apps/index.js +37 -0
- package/dist/lib/stack-app/apps/index.js.map +1 -0
- package/dist/lib/stack-app/apps/interfaces/admin-app.d.mts +23 -0
- package/dist/lib/stack-app/apps/interfaces/admin-app.d.ts +23 -0
- package/dist/lib/stack-app/apps/interfaces/admin-app.js +32 -0
- package/dist/lib/stack-app/apps/interfaces/admin-app.js.map +1 -0
- package/dist/lib/stack-app/apps/interfaces/client-app.d.mts +23 -0
- package/dist/lib/stack-app/apps/interfaces/client-app.d.ts +23 -0
- package/dist/lib/stack-app/apps/interfaces/client-app.js +32 -0
- package/dist/lib/stack-app/apps/interfaces/client-app.js.map +1 -0
- package/dist/lib/stack-app/apps/interfaces/server-app.d.mts +23 -0
- package/dist/lib/stack-app/apps/interfaces/server-app.d.ts +23 -0
- package/dist/lib/stack-app/apps/interfaces/server-app.js +32 -0
- package/dist/lib/stack-app/apps/interfaces/server-app.js.map +1 -0
- package/dist/lib/stack-app/common.d.mts +61 -0
- package/dist/lib/stack-app/common.d.ts +61 -0
- package/dist/lib/stack-app/common.js +31 -0
- package/dist/lib/stack-app/common.js.map +1 -0
- package/dist/lib/stack-app/connected-accounts/index.d.mts +10 -0
- package/dist/lib/stack-app/connected-accounts/index.d.ts +10 -0
- package/dist/lib/stack-app/connected-accounts/index.js +19 -0
- package/dist/lib/stack-app/connected-accounts/index.js.map +1 -0
- package/dist/lib/stack-app/contact-channels/index.d.mts +38 -0
- package/dist/lib/stack-app/contact-channels/index.d.ts +38 -0
- package/dist/lib/stack-app/contact-channels/index.js +67 -0
- package/dist/lib/stack-app/contact-channels/index.js.map +1 -0
- package/dist/lib/stack-app/email-templates/index.d.mts +15 -0
- package/dist/lib/stack-app/email-templates/index.d.ts +15 -0
- package/dist/lib/stack-app/email-templates/index.js +36 -0
- package/dist/lib/stack-app/email-templates/index.js.map +1 -0
- package/dist/lib/stack-app/index.d.mts +23 -0
- package/dist/lib/stack-app/index.d.ts +23 -0
- package/dist/lib/stack-app/index.js +38 -0
- package/dist/lib/stack-app/index.js.map +1 -0
- package/dist/lib/stack-app/permissions/index.d.mts +21 -0
- package/dist/lib/stack-app/permissions/index.d.ts +21 -0
- package/dist/lib/stack-app/permissions/index.js +46 -0
- package/dist/lib/stack-app/permissions/index.js.map +1 -0
- package/dist/lib/stack-app/project-configs/index.d.mts +82 -0
- package/dist/lib/stack-app/project-configs/index.d.ts +82 -0
- package/dist/lib/stack-app/project-configs/index.js +19 -0
- package/dist/lib/stack-app/project-configs/index.js.map +1 -0
- package/dist/lib/stack-app/projects/index.d.mts +23 -0
- package/dist/lib/stack-app/projects/index.d.ts +23 -0
- package/dist/lib/stack-app/projects/index.js +83 -0
- package/dist/lib/stack-app/projects/index.js.map +1 -0
- package/dist/lib/stack-app/teams/index.d.mts +23 -0
- package/dist/lib/stack-app/teams/index.d.ts +23 -0
- package/dist/lib/stack-app/teams/index.js +66 -0
- package/dist/lib/stack-app/teams/index.js.map +1 -0
- package/dist/lib/stack-app/users/index.d.mts +23 -0
- package/dist/lib/stack-app/users/index.d.ts +23 -0
- package/dist/lib/stack-app/users/index.js +74 -0
- package/dist/lib/stack-app/users/index.js.map +1 -0
- package/dist/utils/url.d.mts +1 -2
- package/dist/utils/url.d.ts +1 -2
- package/dist/utils/url.js +4 -14
- package/dist/utils/url.js.map +1 -1
- package/package.json +2 -2
- package/dist/esm/generated/global-css.js +0 -6
- package/dist/esm/generated/global-css.js.map +0 -1
- package/dist/esm/generated/quetzal-translations.js +0 -2397
- package/dist/esm/generated/quetzal-translations.js.map +0 -1
- package/dist/esm/global.d.js +0 -1
- package/dist/esm/lib/stack-app.js.map +0 -1
- package/dist/generated/global-css.d.mts +0 -3
- package/dist/generated/global-css.d.ts +0 -3
- package/dist/generated/global-css.js +0 -31
- package/dist/generated/global-css.js.map +0 -1
- package/dist/generated/quetzal-translations.d.mts +0 -4
- package/dist/generated/quetzal-translations.d.ts +0 -4
- package/dist/generated/quetzal-translations.js +0 -2423
- package/dist/generated/quetzal-translations.js.map +0 -1
- package/dist/global.d.d.mts +0 -2
- package/dist/global.d.d.ts +0 -2
- package/dist/global.d.js +0 -2
- package/dist/lib/stack-app.js.map +0 -1
- /package/dist/esm/{global.d.js.map → lib/stack-app/connected-accounts/index.js.map} +0 -0
- /package/dist/{global.d.js.map → esm/lib/stack-app/project-configs/index.js.map} +0 -0
|
@@ -1,111 +1,22 @@
|
|
|
1
|
+
import { ProjectConfig, AdminProjectConfig, AdminProjectConfigUpdateOptions } from './lib/stack-app/project-configs/index.mjs';
|
|
2
|
+
import { ApiKey, ApiKeyCreateOptions, ApiKeyFirstView } from './lib/stack-app/api-keys/index.mjs';
|
|
3
|
+
import { AsyncStoreProperty, GetUserOptions, EmailConfig, HandlerUrls, OAuthScopesOnSignIn, TokenStoreInit, RedirectMethod, stackAppInternalsSymbol, RedirectToOptions } from './lib/stack-app/common.mjs';
|
|
4
|
+
import { OAuthConnection } from './lib/stack-app/connected-accounts/index.mjs';
|
|
5
|
+
import { ContactChannel, ContactChannelCreateOptions, ServerContactChannel, ServerContactChannelCreateOptions } from './lib/stack-app/contact-channels/index.mjs';
|
|
6
|
+
import { TeamPermission, AdminTeamPermission, AdminTeamPermissionDefinition, AdminTeamPermissionDefinitionCreateOptions, AdminTeamPermissionDefinitionUpdateOptions } from './lib/stack-app/permissions/index.mjs';
|
|
1
7
|
import { KnownErrors } from '@stackframe/stack-shared';
|
|
2
|
-
import { ProductionModeError } from '@stackframe/stack-shared/dist/helpers/production-mode';
|
|
3
|
-
import { ApiKeysCrud } from '@stackframe/stack-shared/dist/interface/crud/api-keys';
|
|
4
8
|
import { CurrentUserCrud } from '@stackframe/stack-shared/dist/interface/crud/current-user';
|
|
9
|
+
import { Result } from '@stackframe/stack-shared/dist/utils/results';
|
|
10
|
+
import { ProductionModeError } from '@stackframe/stack-shared/dist/helpers/production-mode';
|
|
11
|
+
import { ProjectsCrud, InternalProjectsCrud } from '@stackframe/stack-shared/dist/interface/crud/projects';
|
|
5
12
|
import { EmailTemplateType } from '@stackframe/stack-shared/dist/interface/crud/email-templates';
|
|
6
|
-
import { TeamPermissionDefinitionsCrud } from '@stackframe/stack-shared/dist/interface/crud/team-permissions';
|
|
7
13
|
import { InternalSession } from '@stackframe/stack-shared/dist/sessions';
|
|
14
|
+
import { AdminEmailTemplate, AdminEmailTemplateUpdateOptions } from './lib/stack-app/email-templates/index.mjs';
|
|
15
|
+
import { TeamsCrud } from '@stackframe/stack-shared/dist/interface/crud/teams';
|
|
8
16
|
import { ReadonlyJson } from '@stackframe/stack-shared/dist/utils/json';
|
|
17
|
+
import { UsersCrud } from '@stackframe/stack-shared/dist/interface/crud/users';
|
|
9
18
|
import { ProviderType } from '@stackframe/stack-shared/dist/utils/oauth';
|
|
10
|
-
import { Result } from '@stackframe/stack-shared/dist/utils/results';
|
|
11
19
|
|
|
12
|
-
type RequestLike = {
|
|
13
|
-
headers: {
|
|
14
|
-
get: (name: string) => string | null;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
type RedirectMethod = "window" | "none" | {
|
|
18
|
-
useNavigate: () => (to: string) => void;
|
|
19
|
-
navigate?: (to: string) => void;
|
|
20
|
-
};
|
|
21
|
-
type TokenStoreInit<HasTokenStore extends boolean = boolean> = HasTokenStore extends true ? ("cookie" | "nextjs-cookie" | "memory" | RequestLike | {
|
|
22
|
-
accessToken: string;
|
|
23
|
-
refreshToken: string;
|
|
24
|
-
}) : HasTokenStore extends false ? null : TokenStoreInit<true> | TokenStoreInit<false>;
|
|
25
|
-
type HandlerUrls = {
|
|
26
|
-
handler: string;
|
|
27
|
-
signIn: string;
|
|
28
|
-
signUp: string;
|
|
29
|
-
afterSignIn: string;
|
|
30
|
-
afterSignUp: string;
|
|
31
|
-
signOut: string;
|
|
32
|
-
afterSignOut: string;
|
|
33
|
-
emailVerification: string;
|
|
34
|
-
passwordReset: string;
|
|
35
|
-
forgotPassword: string;
|
|
36
|
-
home: string;
|
|
37
|
-
oauthCallback: string;
|
|
38
|
-
magicLinkCallback: string;
|
|
39
|
-
accountSettings: string;
|
|
40
|
-
teamInvitation: string;
|
|
41
|
-
error: string;
|
|
42
|
-
};
|
|
43
|
-
type OAuthScopesOnSignIn = {
|
|
44
|
-
[key in ProviderType]: string[];
|
|
45
|
-
};
|
|
46
|
-
type ProjectCurrentUser<ProjectId> = ProjectId extends "internal" ? CurrentInternalUser : CurrentUser;
|
|
47
|
-
type ProjectCurrentServerUser<ProjectId> = ProjectId extends "internal" ? CurrentInternalServerUser : CurrentServerUser;
|
|
48
|
-
type StackClientAppConstructorOptions<HasTokenStore extends boolean, ProjectId extends string> = {
|
|
49
|
-
baseUrl?: string | {
|
|
50
|
-
browser: string;
|
|
51
|
-
server: string;
|
|
52
|
-
};
|
|
53
|
-
projectId?: ProjectId;
|
|
54
|
-
publishableClientKey?: string;
|
|
55
|
-
urls?: Partial<HandlerUrls>;
|
|
56
|
-
oauthScopesOnSignIn?: Partial<OAuthScopesOnSignIn>;
|
|
57
|
-
tokenStore: TokenStoreInit<HasTokenStore>;
|
|
58
|
-
redirectMethod?: RedirectMethod;
|
|
59
|
-
/**
|
|
60
|
-
* By default, the Stack app will automatically prefetch some data from Stack's server when this app is first
|
|
61
|
-
* constructed. This improves the performance of your app, but will create network requests that are unnecessary if
|
|
62
|
-
* the app is never used or disposed of immediately. To disable this behavior, set this option to true.
|
|
63
|
-
*/
|
|
64
|
-
noAutomaticPrefetch?: boolean;
|
|
65
|
-
};
|
|
66
|
-
type StackServerAppConstructorOptions<HasTokenStore extends boolean, ProjectId extends string> = StackClientAppConstructorOptions<HasTokenStore, ProjectId> & {
|
|
67
|
-
secretServerKey?: string;
|
|
68
|
-
};
|
|
69
|
-
type StackAdminAppConstructorOptions<HasTokenStore extends boolean, ProjectId extends string> = ((StackServerAppConstructorOptions<HasTokenStore, ProjectId> & {
|
|
70
|
-
superSecretAdminKey?: string;
|
|
71
|
-
}) | (Omit<StackServerAppConstructorOptions<HasTokenStore, ProjectId>, "publishableClientKey" | "secretServerKey"> & {
|
|
72
|
-
projectOwnerSession: InternalSession;
|
|
73
|
-
}));
|
|
74
|
-
type StackClientAppJson<HasTokenStore extends boolean, ProjectId extends string> = StackClientAppConstructorOptions<HasTokenStore, ProjectId> & {
|
|
75
|
-
uniqueIdentifier: string;
|
|
76
|
-
};
|
|
77
|
-
/** @internal */
|
|
78
|
-
declare const stackAppInternalsSymbol: unique symbol;
|
|
79
|
-
type ContactChannel = {
|
|
80
|
-
id: string;
|
|
81
|
-
value: string;
|
|
82
|
-
type: 'email';
|
|
83
|
-
isPrimary: boolean;
|
|
84
|
-
isVerified: boolean;
|
|
85
|
-
usedForAuth: boolean;
|
|
86
|
-
sendVerificationEmail(): Promise<void>;
|
|
87
|
-
update(data: ContactChannelUpdateOptions): Promise<void>;
|
|
88
|
-
delete(): Promise<void>;
|
|
89
|
-
};
|
|
90
|
-
type ContactChannelCreateOptions = {
|
|
91
|
-
value: string;
|
|
92
|
-
type: 'email';
|
|
93
|
-
usedForAuth: boolean;
|
|
94
|
-
};
|
|
95
|
-
type ContactChannelUpdateOptions = {
|
|
96
|
-
usedForAuth?: boolean;
|
|
97
|
-
value?: string;
|
|
98
|
-
isPrimary?: boolean;
|
|
99
|
-
};
|
|
100
|
-
type ServerContactChannel = ContactChannel & {
|
|
101
|
-
update(data: ServerContactChannelUpdateOptions): Promise<void>;
|
|
102
|
-
};
|
|
103
|
-
type ServerContactChannelUpdateOptions = ContactChannelUpdateOptions & {
|
|
104
|
-
isVerified?: boolean;
|
|
105
|
-
};
|
|
106
|
-
type ServerContactChannelCreateOptions = ContactChannelCreateOptions & {
|
|
107
|
-
isVerified?: boolean;
|
|
108
|
-
};
|
|
109
20
|
type Session = {
|
|
110
21
|
getTokens(): Promise<{
|
|
111
22
|
accessToken: string | null;
|
|
@@ -292,11 +203,12 @@ type UserExtra = {
|
|
|
292
203
|
type InternalUserExtra = {
|
|
293
204
|
createProject(newProject: AdminProjectUpdateOptions & {
|
|
294
205
|
displayName: string;
|
|
295
|
-
}): Promise<
|
|
206
|
+
}): Promise<AdminOwnedProject>;
|
|
296
207
|
} & AsyncStoreProperty<"ownedProjects", [], AdminOwnedProject[], true>;
|
|
297
208
|
type User = BaseUser;
|
|
298
209
|
type CurrentUser = BaseUser & Auth & UserExtra;
|
|
299
210
|
type CurrentInternalUser = CurrentUser & InternalUserExtra;
|
|
211
|
+
type ProjectCurrentUser<ProjectId> = ProjectId extends "internal" ? CurrentInternalUser : CurrentUser;
|
|
300
212
|
type UserUpdateOptions = {
|
|
301
213
|
displayName?: string;
|
|
302
214
|
clientMetadata?: ReadonlyJson;
|
|
@@ -306,6 +218,7 @@ type UserUpdateOptions = {
|
|
|
306
218
|
otpAuthEnabled?: boolean;
|
|
307
219
|
passkeyAuthEnabled?: boolean;
|
|
308
220
|
};
|
|
221
|
+
declare function userUpdateOptionsToCrud(options: UserUpdateOptions): CurrentUserCrud["Client"]["Update"];
|
|
309
222
|
type ServerBaseUser = {
|
|
310
223
|
setPrimaryEmail(email: string | null, options?: {
|
|
311
224
|
verified?: boolean | undefined;
|
|
@@ -338,6 +251,7 @@ type ServerBaseUser = {
|
|
|
338
251
|
type ServerUser = ServerBaseUser & BaseUser & UserExtra;
|
|
339
252
|
type CurrentServerUser = Auth & ServerUser;
|
|
340
253
|
type CurrentInternalServerUser = CurrentServerUser & InternalUserExtra;
|
|
254
|
+
type ProjectCurrentServerUser<ProjectId> = ProjectId extends "internal" ? CurrentInternalServerUser : CurrentServerUser;
|
|
341
255
|
type ServerUserUpdateOptions = {
|
|
342
256
|
primaryEmail?: string | null;
|
|
343
257
|
primaryEmailVerified?: boolean;
|
|
@@ -346,6 +260,7 @@ type ServerUserUpdateOptions = {
|
|
|
346
260
|
serverMetadata?: ReadonlyJson;
|
|
347
261
|
password?: string;
|
|
348
262
|
} & UserUpdateOptions;
|
|
263
|
+
declare function serverUserUpdateOptionsToCrud(options: ServerUserUpdateOptions): CurrentUserCrud["Server"]["Update"];
|
|
349
264
|
type ServerUserCreateOptions = {
|
|
350
265
|
primaryEmail?: string | null;
|
|
351
266
|
primaryEmailAuthEnabled?: boolean;
|
|
@@ -357,147 +272,8 @@ type ServerUserCreateOptions = {
|
|
|
357
272
|
clientReadOnlyMetadata?: any;
|
|
358
273
|
serverMetadata?: any;
|
|
359
274
|
};
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
readonly displayName: string;
|
|
363
|
-
readonly config: ProjectConfig;
|
|
364
|
-
};
|
|
365
|
-
type AdminProject = {
|
|
366
|
-
readonly id: string;
|
|
367
|
-
readonly displayName: string;
|
|
368
|
-
readonly description: string | null;
|
|
369
|
-
readonly createdAt: Date;
|
|
370
|
-
readonly userCount: number;
|
|
371
|
-
readonly isProductionMode: boolean;
|
|
372
|
-
readonly config: AdminProjectConfig;
|
|
373
|
-
update(this: AdminProject, update: AdminProjectUpdateOptions): Promise<void>;
|
|
374
|
-
delete(this: AdminProject): Promise<void>;
|
|
375
|
-
getProductionModeErrors(this: AdminProject): Promise<ProductionModeError[]>;
|
|
376
|
-
useProductionModeErrors(this: AdminProject): ProductionModeError[];
|
|
377
|
-
} & Project;
|
|
378
|
-
type AdminOwnedProject = {
|
|
379
|
-
readonly app: StackAdminApp<false>;
|
|
380
|
-
} & AdminProject;
|
|
381
|
-
type AdminProjectUpdateOptions = {
|
|
382
|
-
displayName?: string;
|
|
383
|
-
description?: string;
|
|
384
|
-
isProductionMode?: boolean;
|
|
385
|
-
config?: AdminProjectConfigUpdateOptions;
|
|
386
|
-
};
|
|
387
|
-
type AdminProjectCreateOptions = Omit<AdminProjectUpdateOptions, 'displayName'> & {
|
|
388
|
-
displayName: string;
|
|
389
|
-
};
|
|
390
|
-
type ProjectConfig = {
|
|
391
|
-
readonly signUpEnabled: boolean;
|
|
392
|
-
readonly credentialEnabled: boolean;
|
|
393
|
-
readonly magicLinkEnabled: boolean;
|
|
394
|
-
readonly passkeyEnabled: boolean;
|
|
395
|
-
readonly clientTeamCreationEnabled: boolean;
|
|
396
|
-
readonly clientUserDeletionEnabled: boolean;
|
|
397
|
-
readonly oauthProviders: OAuthProviderConfig[];
|
|
398
|
-
};
|
|
399
|
-
type OAuthProviderConfig = {
|
|
400
|
-
readonly id: string;
|
|
401
|
-
};
|
|
402
|
-
type AdminProjectConfig = {
|
|
403
|
-
readonly id: string;
|
|
404
|
-
readonly signUpEnabled: boolean;
|
|
405
|
-
readonly credentialEnabled: boolean;
|
|
406
|
-
readonly magicLinkEnabled: boolean;
|
|
407
|
-
readonly passkeyEnabled: boolean;
|
|
408
|
-
readonly clientTeamCreationEnabled: boolean;
|
|
409
|
-
readonly clientUserDeletionEnabled: boolean;
|
|
410
|
-
readonly allowLocalhost: boolean;
|
|
411
|
-
readonly oauthProviders: AdminOAuthProviderConfig[];
|
|
412
|
-
readonly emailConfig?: AdminEmailConfig;
|
|
413
|
-
readonly domains: AdminDomainConfig[];
|
|
414
|
-
readonly createTeamOnSignUp: boolean;
|
|
415
|
-
readonly teamCreatorDefaultPermissions: AdminTeamPermission[];
|
|
416
|
-
readonly teamMemberDefaultPermissions: AdminTeamPermission[];
|
|
417
|
-
};
|
|
418
|
-
type AdminEmailConfig = ({
|
|
419
|
-
type: "standard";
|
|
420
|
-
senderName: string;
|
|
421
|
-
senderEmail: string;
|
|
422
|
-
host: string;
|
|
423
|
-
port: number;
|
|
424
|
-
username: string;
|
|
425
|
-
password: string;
|
|
426
|
-
} | {
|
|
427
|
-
type: "shared";
|
|
428
|
-
});
|
|
429
|
-
type AdminDomainConfig = {
|
|
430
|
-
domain: string;
|
|
431
|
-
handlerPath: string;
|
|
432
|
-
};
|
|
433
|
-
type AdminOAuthProviderConfig = {
|
|
434
|
-
id: string;
|
|
435
|
-
enabled: boolean;
|
|
436
|
-
} & ({
|
|
437
|
-
type: 'shared';
|
|
438
|
-
} | {
|
|
439
|
-
type: 'standard';
|
|
440
|
-
clientId: string;
|
|
441
|
-
clientSecret: string;
|
|
442
|
-
facebookConfigId?: string;
|
|
443
|
-
microsoftTenantId?: string;
|
|
444
|
-
}) & OAuthProviderConfig;
|
|
445
|
-
type AdminProjectConfigUpdateOptions = {
|
|
446
|
-
domains?: {
|
|
447
|
-
domain: string;
|
|
448
|
-
handlerPath: string;
|
|
449
|
-
}[];
|
|
450
|
-
oauthProviders?: AdminOAuthProviderConfig[];
|
|
451
|
-
signUpEnabled?: boolean;
|
|
452
|
-
credentialEnabled?: boolean;
|
|
453
|
-
magicLinkEnabled?: boolean;
|
|
454
|
-
passkeyEnabled?: boolean;
|
|
455
|
-
clientTeamCreationEnabled?: boolean;
|
|
456
|
-
clientUserDeletionEnabled?: boolean;
|
|
457
|
-
allowLocalhost?: boolean;
|
|
458
|
-
createTeamOnSignUp?: boolean;
|
|
459
|
-
emailConfig?: AdminEmailConfig;
|
|
460
|
-
teamCreatorDefaultPermissions?: {
|
|
461
|
-
id: string;
|
|
462
|
-
}[];
|
|
463
|
-
teamMemberDefaultPermissions?: {
|
|
464
|
-
id: string;
|
|
465
|
-
}[];
|
|
466
|
-
};
|
|
467
|
-
type ApiKeyBase = {
|
|
468
|
-
id: string;
|
|
469
|
-
description: string;
|
|
470
|
-
expiresAt: Date;
|
|
471
|
-
manuallyRevokedAt: Date | null;
|
|
472
|
-
createdAt: Date;
|
|
473
|
-
isValid(): boolean;
|
|
474
|
-
whyInvalid(): "expired" | "manually-revoked" | null;
|
|
475
|
-
revoke(): Promise<void>;
|
|
476
|
-
};
|
|
477
|
-
type ApiKeyBaseCrudRead = Pick<ApiKeysCrud["Admin"]["Read"], "id" | "created_at_millis" | "description" | "expires_at_millis" | "manually_revoked_at_millis">;
|
|
478
|
-
type ApiKeyFirstView = {
|
|
479
|
-
publishableClientKey?: string;
|
|
480
|
-
secretServerKey?: string;
|
|
481
|
-
superSecretAdminKey?: string;
|
|
482
|
-
} & ApiKeyBase;
|
|
483
|
-
type ApiKey = {
|
|
484
|
-
publishableClientKey: null | {
|
|
485
|
-
lastFour: string;
|
|
486
|
-
};
|
|
487
|
-
secretServerKey: null | {
|
|
488
|
-
lastFour: string;
|
|
489
|
-
};
|
|
490
|
-
superSecretAdminKey: null | {
|
|
491
|
-
lastFour: string;
|
|
492
|
-
};
|
|
493
|
-
} & ApiKeyBase;
|
|
494
|
-
type ApiKeyCreateOptions = {
|
|
495
|
-
description: string;
|
|
496
|
-
expiresAt: Date;
|
|
497
|
-
hasPublishableClientKey: boolean;
|
|
498
|
-
hasSecretServerKey: boolean;
|
|
499
|
-
hasSuperSecretAdminKey: boolean;
|
|
500
|
-
};
|
|
275
|
+
declare function serverUserCreateOptionsToCrud(options: ServerUserCreateOptions): UsersCrud["Server"]["Create"];
|
|
276
|
+
|
|
501
277
|
type TeamMemberProfile = {
|
|
502
278
|
displayName: string | null;
|
|
503
279
|
profileImageUrl: string | null;
|
|
@@ -539,10 +315,12 @@ type TeamUpdateOptions = {
|
|
|
539
315
|
profileImageUrl?: string | null;
|
|
540
316
|
clientMetadata?: ReadonlyJson;
|
|
541
317
|
};
|
|
318
|
+
declare function teamUpdateOptionsToCrud(options: TeamUpdateOptions): TeamsCrud["Client"]["Update"];
|
|
542
319
|
type TeamCreateOptions = {
|
|
543
320
|
displayName: string;
|
|
544
321
|
profileImageUrl?: string;
|
|
545
322
|
};
|
|
323
|
+
declare function teamCreateOptionsToCrud(options: TeamCreateOptions, creatorUserId: string): TeamsCrud["Client"]["Create"];
|
|
546
324
|
type ServerTeamMemberProfile = TeamMemberProfile;
|
|
547
325
|
type ServerTeamUser = ServerUser & {
|
|
548
326
|
teamProfile: ServerTeamMemberProfile;
|
|
@@ -570,41 +348,120 @@ type ServerListUsersOptions = {
|
|
|
570
348
|
type ServerTeamCreateOptions = TeamCreateOptions & {
|
|
571
349
|
creatorUserId?: string;
|
|
572
350
|
};
|
|
351
|
+
declare function serverTeamCreateOptionsToCrud(options: ServerTeamCreateOptions): TeamsCrud["Server"]["Create"];
|
|
573
352
|
type ServerTeamUpdateOptions = TeamUpdateOptions & {
|
|
574
353
|
clientReadOnlyMetadata?: ReadonlyJson;
|
|
575
354
|
serverMetadata?: ReadonlyJson;
|
|
576
355
|
};
|
|
577
|
-
|
|
578
|
-
|
|
356
|
+
declare function serverTeamUpdateOptionsToCrud(options: ServerTeamUpdateOptions): TeamsCrud["Server"]["Update"];
|
|
357
|
+
|
|
358
|
+
type StackServerAppConstructorOptions<HasTokenStore extends boolean, ProjectId extends string> = StackClientAppConstructorOptions<HasTokenStore, ProjectId> & {
|
|
359
|
+
secretServerKey?: string;
|
|
579
360
|
};
|
|
580
|
-
type
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
description?: string;
|
|
584
|
-
containedPermissionIds: string[];
|
|
361
|
+
type StackServerAppConstructor = {
|
|
362
|
+
new <TokenStoreType extends string, HasTokenStore extends (TokenStoreType extends {} ? true : boolean), ProjectId extends string>(options: StackServerAppConstructorOptions<HasTokenStore, ProjectId>): StackServerApp<HasTokenStore, ProjectId>;
|
|
363
|
+
new (options: StackServerAppConstructorOptions<boolean, string>): StackServerApp<boolean, string>;
|
|
585
364
|
};
|
|
586
|
-
type
|
|
587
|
-
|
|
365
|
+
type StackServerApp<HasTokenStore extends boolean = boolean, ProjectId extends string = string> = ({
|
|
366
|
+
createTeam(data: ServerTeamCreateOptions): Promise<ServerTeam>;
|
|
367
|
+
/**
|
|
368
|
+
* @deprecated use `getUser()` instead
|
|
369
|
+
*/
|
|
370
|
+
getServerUser(): Promise<ProjectCurrentServerUser<ProjectId> | null>;
|
|
371
|
+
createUser(options: ServerUserCreateOptions): Promise<ServerUser>;
|
|
372
|
+
getUser(options: GetUserOptions<HasTokenStore> & {
|
|
373
|
+
or: 'redirect';
|
|
374
|
+
}): Promise<ProjectCurrentServerUser<ProjectId>>;
|
|
375
|
+
getUser(options: GetUserOptions<HasTokenStore> & {
|
|
376
|
+
or: 'throw';
|
|
377
|
+
}): Promise<ProjectCurrentServerUser<ProjectId>>;
|
|
378
|
+
getUser(options?: GetUserOptions<HasTokenStore>): Promise<ProjectCurrentServerUser<ProjectId> | null>;
|
|
379
|
+
listUsers(options?: ServerListUsersOptions): Promise<ServerUser[] & {
|
|
380
|
+
nextCursor: string | null;
|
|
381
|
+
}>;
|
|
382
|
+
} & AsyncStoreProperty<"user", [id: string], ServerUser | null, false> & Omit<AsyncStoreProperty<"users", [], ServerUser[], true>, "listUsers" | "useUsers"> & AsyncStoreProperty<"team", [id: string], ServerTeam | null, false> & AsyncStoreProperty<"teams", [], ServerTeam[], true> & StackClientApp<HasTokenStore, ProjectId>);
|
|
383
|
+
declare const StackServerApp: StackServerAppConstructor;
|
|
384
|
+
|
|
385
|
+
type StackAdminAppConstructorOptions<HasTokenStore extends boolean, ProjectId extends string> = ((StackServerAppConstructorOptions<HasTokenStore, ProjectId> & {
|
|
386
|
+
superSecretAdminKey?: string;
|
|
387
|
+
}) | (Omit<StackServerAppConstructorOptions<HasTokenStore, ProjectId>, "publishableClientKey" | "secretServerKey"> & {
|
|
388
|
+
projectOwnerSession: InternalSession;
|
|
389
|
+
}));
|
|
390
|
+
type StackAdminAppConstructor = {
|
|
391
|
+
new <HasTokenStore extends boolean, ProjectId extends string>(options: StackAdminAppConstructorOptions<HasTokenStore, ProjectId>): StackAdminApp<HasTokenStore, ProjectId>;
|
|
392
|
+
new (options: StackAdminAppConstructorOptions<boolean, string>): StackAdminApp<boolean, string>;
|
|
393
|
+
};
|
|
394
|
+
type StackAdminApp<HasTokenStore extends boolean = boolean, ProjectId extends string = string> = (AsyncStoreProperty<"project", [], AdminProject, false> & AsyncStoreProperty<"apiKeys", [], ApiKey[], true> & AsyncStoreProperty<"teamPermissionDefinitions", [], AdminTeamPermissionDefinition[], true> & {
|
|
395
|
+
listEmailTemplates(): Promise<AdminEmailTemplate[]>;
|
|
396
|
+
updateEmailTemplate(type: EmailTemplateType, data: AdminEmailTemplateUpdateOptions): Promise<void>;
|
|
397
|
+
resetEmailTemplate(type: EmailTemplateType): Promise<void>;
|
|
398
|
+
createApiKey(options: ApiKeyCreateOptions): Promise<ApiKeyFirstView>;
|
|
399
|
+
createTeamPermissionDefinition(data: AdminTeamPermissionDefinitionCreateOptions): Promise<AdminTeamPermission>;
|
|
400
|
+
updateTeamPermissionDefinition(permissionId: string, data: AdminTeamPermissionDefinitionUpdateOptions): Promise<void>;
|
|
401
|
+
deleteTeamPermissionDefinition(permissionId: string): Promise<void>;
|
|
402
|
+
sendTestEmail(options: {
|
|
403
|
+
recipientEmail: string;
|
|
404
|
+
emailConfig: EmailConfig;
|
|
405
|
+
}): Promise<Result<undefined, {
|
|
406
|
+
errorMessage: string;
|
|
407
|
+
}>>;
|
|
408
|
+
} & StackServerApp<HasTokenStore, ProjectId>);
|
|
409
|
+
declare const StackAdminApp: StackAdminAppConstructor;
|
|
410
|
+
|
|
411
|
+
type Project = {
|
|
412
|
+
readonly id: string;
|
|
413
|
+
readonly displayName: string;
|
|
414
|
+
readonly config: ProjectConfig;
|
|
415
|
+
};
|
|
416
|
+
type AdminProject = {
|
|
417
|
+
readonly id: string;
|
|
418
|
+
readonly displayName: string;
|
|
419
|
+
readonly description: string | null;
|
|
420
|
+
readonly createdAt: Date;
|
|
421
|
+
readonly userCount: number;
|
|
422
|
+
readonly isProductionMode: boolean;
|
|
423
|
+
readonly config: AdminProjectConfig;
|
|
424
|
+
update(this: AdminProject, update: AdminProjectUpdateOptions): Promise<void>;
|
|
425
|
+
delete(this: AdminProject): Promise<void>;
|
|
426
|
+
getProductionModeErrors(this: AdminProject): Promise<ProductionModeError[]>;
|
|
427
|
+
useProductionModeErrors(this: AdminProject): ProductionModeError[];
|
|
428
|
+
} & Project;
|
|
429
|
+
type AdminOwnedProject = {
|
|
430
|
+
readonly app: StackAdminApp<false>;
|
|
431
|
+
} & AdminProject;
|
|
432
|
+
type AdminProjectUpdateOptions = {
|
|
433
|
+
displayName?: string;
|
|
588
434
|
description?: string;
|
|
589
|
-
|
|
435
|
+
isProductionMode?: boolean;
|
|
436
|
+
config?: AdminProjectConfigUpdateOptions;
|
|
590
437
|
};
|
|
591
|
-
declare function
|
|
592
|
-
type
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
438
|
+
declare function adminProjectUpdateOptionsToCrud(options: AdminProjectUpdateOptions): ProjectsCrud["Admin"]["Update"];
|
|
439
|
+
type AdminProjectCreateOptions = Omit<AdminProjectUpdateOptions, 'displayName'> & {
|
|
440
|
+
displayName: string;
|
|
441
|
+
};
|
|
442
|
+
declare function adminProjectCreateOptionsToCrud(options: AdminProjectCreateOptions): InternalProjectsCrud["Server"]["Create"];
|
|
443
|
+
|
|
444
|
+
type StackClientAppConstructorOptions<HasTokenStore extends boolean, ProjectId extends string> = {
|
|
445
|
+
baseUrl?: string | {
|
|
446
|
+
browser: string;
|
|
447
|
+
server: string;
|
|
448
|
+
};
|
|
449
|
+
projectId?: ProjectId;
|
|
450
|
+
publishableClientKey?: string;
|
|
451
|
+
urls?: Partial<HandlerUrls>;
|
|
452
|
+
oauthScopesOnSignIn?: Partial<OAuthScopesOnSignIn>;
|
|
453
|
+
tokenStore: TokenStoreInit<HasTokenStore>;
|
|
454
|
+
redirectMethod?: RedirectMethod;
|
|
455
|
+
/**
|
|
456
|
+
* By default, the Stack app will automatically prefetch some data from Stack's server when this app is first
|
|
457
|
+
* constructed. This improves the performance of your app, but will create network requests that are unnecessary if
|
|
458
|
+
* the app is never used or disposed of immediately. To disable this behavior, set this option to true.
|
|
459
|
+
*/
|
|
460
|
+
noAutomaticPrefetch?: boolean;
|
|
461
|
+
};
|
|
462
|
+
type StackClientAppJson<HasTokenStore extends boolean, ProjectId extends string> = StackClientAppConstructorOptions<HasTokenStore, ProjectId> & {
|
|
463
|
+
uniqueIdentifier: string;
|
|
596
464
|
};
|
|
597
|
-
type OAuthConnection = {
|
|
598
|
-
getAccessToken(): Promise<{
|
|
599
|
-
accessToken: string;
|
|
600
|
-
}>;
|
|
601
|
-
} & Connection;
|
|
602
|
-
type GetUserOptions<HasTokenStore> = {
|
|
603
|
-
or?: 'redirect' | 'throw' | 'return-null';
|
|
604
|
-
tokenStore?: TokenStoreInit;
|
|
605
|
-
} & (HasTokenStore extends false ? {
|
|
606
|
-
tokenStore: TokenStoreInit;
|
|
607
|
-
} : {});
|
|
608
465
|
type StackClientAppConstructor = {
|
|
609
466
|
new <TokenStoreType extends string, HasTokenStore extends (TokenStoreType extends {} ? true : boolean), ProjectId extends string>(options: StackClientAppConstructorOptions<HasTokenStore, ProjectId>): StackClientApp<HasTokenStore, ProjectId>;
|
|
610
467
|
new (options: StackClientAppConstructorOptions<boolean, string>): StackClientApp<boolean, string>;
|
|
@@ -625,6 +482,7 @@ type StackClientApp<HasTokenStore extends boolean = boolean, ProjectId extends s
|
|
|
625
482
|
email: string;
|
|
626
483
|
password: string;
|
|
627
484
|
noRedirect?: boolean;
|
|
485
|
+
verificationCallbackUrl?: string;
|
|
628
486
|
}): Promise<Result<undefined, KnownErrors["UserEmailAlreadyExists"] | KnownErrors["PasswordRequirementsNotMet"]>>;
|
|
629
487
|
signInWithPasskey(): Promise<Result<undefined, KnownErrors["PasskeyAuthenticationFailed"] | KnownErrors["InvalidTotpCode"] | KnownErrors["PasskeyWebAuthnError"]>>;
|
|
630
488
|
callOAuthCallback(): Promise<boolean>;
|
|
@@ -664,73 +522,5 @@ type StackClientApp<HasTokenStore extends boolean = boolean, ProjectId extends s
|
|
|
664
522
|
[K in `redirectTo${Capitalize<keyof Omit<HandlerUrls, 'handler' | 'oauthCallback'>>}`]: (options?: RedirectToOptions) => Promise<void>;
|
|
665
523
|
});
|
|
666
524
|
declare const StackClientApp: StackClientAppConstructor;
|
|
667
|
-
type StackServerAppConstructor = {
|
|
668
|
-
new <TokenStoreType extends string, HasTokenStore extends (TokenStoreType extends {} ? true : boolean), ProjectId extends string>(options: StackServerAppConstructorOptions<HasTokenStore, ProjectId>): StackServerApp<HasTokenStore, ProjectId>;
|
|
669
|
-
new (options: StackServerAppConstructorOptions<boolean, string>): StackServerApp<boolean, string>;
|
|
670
|
-
};
|
|
671
|
-
type StackServerApp<HasTokenStore extends boolean = boolean, ProjectId extends string = string> = ({
|
|
672
|
-
createTeam(data: ServerTeamCreateOptions): Promise<ServerTeam>;
|
|
673
|
-
/**
|
|
674
|
-
* @deprecated use `getUser()` instead
|
|
675
|
-
*/
|
|
676
|
-
getServerUser(): Promise<ProjectCurrentServerUser<ProjectId> | null>;
|
|
677
|
-
createUser(options: ServerUserCreateOptions): Promise<ServerUser>;
|
|
678
|
-
getUser(options: GetUserOptions<HasTokenStore> & {
|
|
679
|
-
or: 'redirect';
|
|
680
|
-
}): Promise<ProjectCurrentServerUser<ProjectId>>;
|
|
681
|
-
getUser(options: GetUserOptions<HasTokenStore> & {
|
|
682
|
-
or: 'throw';
|
|
683
|
-
}): Promise<ProjectCurrentServerUser<ProjectId>>;
|
|
684
|
-
getUser(options?: GetUserOptions<HasTokenStore>): Promise<ProjectCurrentServerUser<ProjectId> | null>;
|
|
685
|
-
listUsers(options?: ServerListUsersOptions): Promise<ServerUser[] & {
|
|
686
|
-
nextCursor: string | null;
|
|
687
|
-
}>;
|
|
688
|
-
} & AsyncStoreProperty<"user", [id: string], ServerUser | null, false> & Omit<AsyncStoreProperty<"users", [], ServerUser[], true>, "listUsers" | "useUsers"> & AsyncStoreProperty<"team", [id: string], ServerTeam | null, false> & AsyncStoreProperty<"teams", [], ServerTeam[], true> & StackClientApp<HasTokenStore, ProjectId>);
|
|
689
|
-
declare const StackServerApp: StackServerAppConstructor;
|
|
690
|
-
type StackAdminAppConstructor = {
|
|
691
|
-
new <HasTokenStore extends boolean, ProjectId extends string>(options: StackAdminAppConstructorOptions<HasTokenStore, ProjectId>): StackAdminApp<HasTokenStore, ProjectId>;
|
|
692
|
-
new (options: StackAdminAppConstructorOptions<boolean, string>): StackAdminApp<boolean, string>;
|
|
693
|
-
};
|
|
694
|
-
type StackAdminApp<HasTokenStore extends boolean = boolean, ProjectId extends string = string> = (AsyncStoreProperty<"project", [], AdminProject, false> & AsyncStoreProperty<"apiKeys", [], ApiKey[], true> & AsyncStoreProperty<"teamPermissionDefinitions", [], AdminTeamPermissionDefinition[], true> & {
|
|
695
|
-
listEmailTemplates(): Promise<AdminEmailTemplate[]>;
|
|
696
|
-
updateEmailTemplate(type: EmailTemplateType, data: AdminEmailTemplateUpdateOptions): Promise<void>;
|
|
697
|
-
resetEmailTemplate(type: EmailTemplateType): Promise<void>;
|
|
698
|
-
createApiKey(options: ApiKeyCreateOptions): Promise<ApiKeyFirstView>;
|
|
699
|
-
createTeamPermissionDefinition(data: AdminTeamPermissionDefinitionCreateOptions): Promise<AdminTeamPermission>;
|
|
700
|
-
updateTeamPermissionDefinition(permissionId: string, data: AdminTeamPermissionDefinitionUpdateOptions): Promise<void>;
|
|
701
|
-
deleteTeamPermissionDefinition(permissionId: string): Promise<void>;
|
|
702
|
-
sendTestEmail(options: {
|
|
703
|
-
recipientEmail: string;
|
|
704
|
-
emailConfig: EmailConfig;
|
|
705
|
-
}): Promise<Result<undefined, {
|
|
706
|
-
errorMessage: string;
|
|
707
|
-
}>>;
|
|
708
|
-
} & StackServerApp<HasTokenStore, ProjectId>);
|
|
709
|
-
declare const StackAdminApp: StackAdminAppConstructor;
|
|
710
|
-
type AdminEmailTemplate = {
|
|
711
|
-
type: EmailTemplateType;
|
|
712
|
-
subject: string;
|
|
713
|
-
content: any;
|
|
714
|
-
isDefault: boolean;
|
|
715
|
-
};
|
|
716
|
-
type AdminEmailTemplateUpdateOptions = {
|
|
717
|
-
subject?: string;
|
|
718
|
-
content?: any;
|
|
719
|
-
};
|
|
720
|
-
type RedirectToOptions = {
|
|
721
|
-
replace?: boolean;
|
|
722
|
-
noRedirectBack?: boolean;
|
|
723
|
-
};
|
|
724
|
-
type AsyncStoreProperty<Name extends string, Args extends any[], Value, IsMultiple extends boolean> = {
|
|
725
|
-
[key in `${IsMultiple extends true ? "list" : "get"}${Capitalize<Name>}`]: (...args: Args) => Promise<Value>;
|
|
726
|
-
};
|
|
727
|
-
type EmailConfig = {
|
|
728
|
-
host: string;
|
|
729
|
-
port: number;
|
|
730
|
-
username: string;
|
|
731
|
-
password: string;
|
|
732
|
-
senderEmail: string;
|
|
733
|
-
senderName: string;
|
|
734
|
-
};
|
|
735
525
|
|
|
736
|
-
export { type
|
|
526
|
+
export { adminProjectCreateOptionsToCrud as $, type Auth as A, type BaseUser as B, type CurrentUser as C, serverUserUpdateOptionsToCrud as D, type EditableTeamMemberProfile as E, serverUserCreateOptionsToCrud as F, type TeamMemberProfile as G, type TeamMemberProfileUpdateOptions as H, type InternalUserExtra as I, type TeamUpdateOptions as J, teamUpdateOptionsToCrud as K, type TeamCreateOptions as L, teamCreateOptionsToCrud as M, type ServerTeamMemberProfile as N, serverTeamCreateOptionsToCrud as O, type Project as P, type ServerTeamUpdateOptions as Q, serverTeamUpdateOptionsToCrud as R, type StackClientAppConstructorOptions as S, type TeamUser as T, type UserExtra as U, StackServerApp as V, type StackServerAppConstructor as W, StackAdminApp as X, type StackAdminAppConstructor as Y, adminProjectUpdateOptionsToCrud as Z, type AdminProjectCreateOptions as _, StackClientApp as a, type StackClientAppConstructor as a0, type TeamInvitation as b, type Team as c, type ProjectCurrentUser as d, type UserUpdateOptions as e, type AdminOwnedProject as f, type AdminProjectUpdateOptions as g, type StackClientAppJson as h, type StackServerAppConstructorOptions as i, type ServerUser as j, type ServerTeamUser as k, type ProjectCurrentServerUser as l, type ServerTeam as m, type ServerUserCreateOptions as n, type ServerListUsersOptions as o, type ServerTeamCreateOptions as p, type StackAdminAppConstructorOptions as q, type AdminProject as r, type Session as s, type User as t, type CurrentInternalUser as u, userUpdateOptionsToCrud as v, type ServerBaseUser as w, type CurrentServerUser as x, type CurrentInternalServerUser as y, type ServerUserUpdateOptions as z };
|