@stackframe/stack 2.7.21 → 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 +10 -0
- package/dist/admin-app-impl-CTQhv9tV.d.ts +395 -0
- package/dist/admin-app-impl-DpyRKp1e.d.mts +395 -0
- package/dist/components/selected-team-switcher.d.mts +18 -6
- package/dist/components/selected-team-switcher.d.ts +18 -6
- package/dist/components/team-icon.d.mts +18 -6
- package/dist/components/team-icon.d.ts +18 -6
- package/dist/components-page/stack-handler.d.mts +18 -6
- package/dist/components-page/stack-handler.d.ts +18 -6
- 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 +291 -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 -1109
- 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 +142 -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 +527 -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/connected-accounts/index.js.map +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/project-configs/index.js.map +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/generated/quetzal-translations.d.mts +2 -2
- package/dist/generated/quetzal-translations.d.ts +2 -2
- package/dist/{lib/stack-app.d.mts → index-C7D6Vt7X.d.mts} +138 -354
- package/dist/{lib/stack-app.d.ts → index-DQk7XJpU.d.ts} +138 -354
- package/dist/index.d.mts +17 -5
- package/dist/index.d.ts +17 -5
- package/dist/lib/hooks.d.mts +17 -5
- package/dist/lib/hooks.d.ts +17 -5
- 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 +316 -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} +74 -1152
- package/dist/lib/stack-app/apps/implementations/client-app-impl.js.map +1 -0
- package/dist/lib/stack-app/apps/implementations/common.d.mts +45 -0
- package/dist/lib/stack-app/apps/implementations/common.d.ts +45 -0
- package/dist/lib/stack-app/apps/implementations/common.js +187 -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 +552 -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 +63 -0
- package/dist/lib/stack-app/common.d.ts +63 -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 +13 -0
- package/dist/lib/stack-app/connected-accounts/index.d.ts +13 -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/providers/stack-provider-client.d.mts +17 -5
- package/dist/providers/stack-provider-client.d.ts +17 -5
- package/dist/providers/stack-provider.d.mts +18 -6
- package/dist/providers/stack-provider.d.ts +18 -6
- package/package.json +4 -4
- package/dist/esm/lib/stack-app.js.map +0 -1
- package/dist/lib/stack-app.js.map +0 -1
|
@@ -1,111 +1,22 @@
|
|
|
1
1
|
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
2
|
import { CurrentUserCrud } from '@stackframe/stack-shared/dist/interface/crud/current-user';
|
|
3
|
+
import { Result } from '@stackframe/stack-shared/dist/utils/results';
|
|
4
|
+
import { AsyncStoreProperty, GetUserOptions, EmailConfig, HandlerUrls, OAuthScopesOnSignIn, TokenStoreInit, RedirectMethod, stackAppInternalsSymbol, RedirectToOptions } from './lib/stack-app/common.js';
|
|
5
|
+
import { ProductionModeError } from '@stackframe/stack-shared/dist/helpers/production-mode';
|
|
6
|
+
import { ProjectsCrud, InternalProjectsCrud } from '@stackframe/stack-shared/dist/interface/crud/projects';
|
|
5
7
|
import { EmailTemplateType } from '@stackframe/stack-shared/dist/interface/crud/email-templates';
|
|
6
|
-
import { TeamPermissionDefinitionsCrud } from '@stackframe/stack-shared/dist/interface/crud/team-permissions';
|
|
7
8
|
import { InternalSession } from '@stackframe/stack-shared/dist/sessions';
|
|
9
|
+
import { ApiKey, ApiKeyCreateOptions, ApiKeyFirstView } from './lib/stack-app/api-keys/index.js';
|
|
10
|
+
import { AdminEmailTemplate, AdminEmailTemplateUpdateOptions } from './lib/stack-app/email-templates/index.js';
|
|
11
|
+
import { TeamPermission, AdminTeamPermission, AdminTeamPermissionDefinition, AdminTeamPermissionDefinitionCreateOptions, AdminTeamPermissionDefinitionUpdateOptions } from './lib/stack-app/permissions/index.js';
|
|
12
|
+
import { TeamsCrud } from '@stackframe/stack-shared/dist/interface/crud/teams';
|
|
8
13
|
import { ReadonlyJson } from '@stackframe/stack-shared/dist/utils/json';
|
|
14
|
+
import { UsersCrud } from '@stackframe/stack-shared/dist/interface/crud/users';
|
|
9
15
|
import { ProviderType } from '@stackframe/stack-shared/dist/utils/oauth';
|
|
10
|
-
import {
|
|
16
|
+
import { OAuthConnection } from './lib/stack-app/connected-accounts/index.js';
|
|
17
|
+
import { ContactChannel, ContactChannelCreateOptions, ServerContactChannel, ServerContactChannelCreateOptions } from './lib/stack-app/contact-channels/index.js';
|
|
18
|
+
import { ProjectConfig, AdminProjectConfig, AdminProjectConfigUpdateOptions } from './lib/stack-app/project-configs/index.js';
|
|
11
19
|
|
|
12
|
-
type RequestLike = {
|
|
13
|
-
headers: {
|
|
14
|
-
get: (name: string) => string | null;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
type RedirectMethod = "window" | "nextjs" | "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;
|
|
@@ -302,11 +213,12 @@ type UserExtra = {
|
|
|
302
213
|
type InternalUserExtra = {
|
|
303
214
|
createProject(newProject: AdminProjectUpdateOptions & {
|
|
304
215
|
displayName: string;
|
|
305
|
-
}): Promise<
|
|
216
|
+
}): Promise<AdminOwnedProject>;
|
|
306
217
|
} & AsyncStoreProperty<"ownedProjects", [], AdminOwnedProject[], true>;
|
|
307
218
|
type User = BaseUser;
|
|
308
219
|
type CurrentUser = BaseUser & Auth & UserExtra;
|
|
309
220
|
type CurrentInternalUser = CurrentUser & InternalUserExtra;
|
|
221
|
+
type ProjectCurrentUser<ProjectId> = ProjectId extends "internal" ? CurrentInternalUser : CurrentUser;
|
|
310
222
|
type UserUpdateOptions = {
|
|
311
223
|
displayName?: string;
|
|
312
224
|
clientMetadata?: ReadonlyJson;
|
|
@@ -316,6 +228,7 @@ type UserUpdateOptions = {
|
|
|
316
228
|
otpAuthEnabled?: boolean;
|
|
317
229
|
passkeyAuthEnabled?: boolean;
|
|
318
230
|
};
|
|
231
|
+
declare function userUpdateOptionsToCrud(options: UserUpdateOptions): CurrentUserCrud["Client"]["Update"];
|
|
319
232
|
type ServerBaseUser = {
|
|
320
233
|
setPrimaryEmail(email: string | null, options?: {
|
|
321
234
|
verified?: boolean | undefined;
|
|
@@ -349,6 +262,7 @@ type ServerBaseUser = {
|
|
|
349
262
|
type ServerUser = ServerBaseUser & BaseUser & UserExtra;
|
|
350
263
|
type CurrentServerUser = Auth & ServerUser;
|
|
351
264
|
type CurrentInternalServerUser = CurrentServerUser & InternalUserExtra;
|
|
265
|
+
type ProjectCurrentServerUser<ProjectId> = ProjectId extends "internal" ? CurrentInternalServerUser : CurrentServerUser;
|
|
352
266
|
type ServerUserUpdateOptions = {
|
|
353
267
|
primaryEmail?: string | null;
|
|
354
268
|
primaryEmailVerified?: boolean;
|
|
@@ -357,6 +271,7 @@ type ServerUserUpdateOptions = {
|
|
|
357
271
|
serverMetadata?: ReadonlyJson;
|
|
358
272
|
password?: string;
|
|
359
273
|
} & UserUpdateOptions;
|
|
274
|
+
declare function serverUserUpdateOptionsToCrud(options: ServerUserUpdateOptions): CurrentUserCrud["Server"]["Update"];
|
|
360
275
|
type ServerUserCreateOptions = {
|
|
361
276
|
primaryEmail?: string | null;
|
|
362
277
|
primaryEmailAuthEnabled?: boolean;
|
|
@@ -368,147 +283,8 @@ type ServerUserCreateOptions = {
|
|
|
368
283
|
clientReadOnlyMetadata?: any;
|
|
369
284
|
serverMetadata?: any;
|
|
370
285
|
};
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
readonly displayName: string;
|
|
374
|
-
readonly config: ProjectConfig;
|
|
375
|
-
};
|
|
376
|
-
type AdminProject = {
|
|
377
|
-
readonly id: string;
|
|
378
|
-
readonly displayName: string;
|
|
379
|
-
readonly description: string | null;
|
|
380
|
-
readonly createdAt: Date;
|
|
381
|
-
readonly userCount: number;
|
|
382
|
-
readonly isProductionMode: boolean;
|
|
383
|
-
readonly config: AdminProjectConfig;
|
|
384
|
-
update(this: AdminProject, update: AdminProjectUpdateOptions): Promise<void>;
|
|
385
|
-
delete(this: AdminProject): Promise<void>;
|
|
386
|
-
getProductionModeErrors(this: AdminProject): Promise<ProductionModeError[]>;
|
|
387
|
-
useProductionModeErrors(this: AdminProject): ProductionModeError[];
|
|
388
|
-
} & Project;
|
|
389
|
-
type AdminOwnedProject = {
|
|
390
|
-
readonly app: StackAdminApp<false>;
|
|
391
|
-
} & AdminProject;
|
|
392
|
-
type AdminProjectUpdateOptions = {
|
|
393
|
-
displayName?: string;
|
|
394
|
-
description?: string;
|
|
395
|
-
isProductionMode?: boolean;
|
|
396
|
-
config?: AdminProjectConfigUpdateOptions;
|
|
397
|
-
};
|
|
398
|
-
type AdminProjectCreateOptions = Omit<AdminProjectUpdateOptions, 'displayName'> & {
|
|
399
|
-
displayName: string;
|
|
400
|
-
};
|
|
401
|
-
type ProjectConfig = {
|
|
402
|
-
readonly signUpEnabled: boolean;
|
|
403
|
-
readonly credentialEnabled: boolean;
|
|
404
|
-
readonly magicLinkEnabled: boolean;
|
|
405
|
-
readonly passkeyEnabled: boolean;
|
|
406
|
-
readonly clientTeamCreationEnabled: boolean;
|
|
407
|
-
readonly clientUserDeletionEnabled: boolean;
|
|
408
|
-
readonly oauthProviders: OAuthProviderConfig[];
|
|
409
|
-
};
|
|
410
|
-
type OAuthProviderConfig = {
|
|
411
|
-
readonly id: string;
|
|
412
|
-
};
|
|
413
|
-
type AdminProjectConfig = {
|
|
414
|
-
readonly id: string;
|
|
415
|
-
readonly signUpEnabled: boolean;
|
|
416
|
-
readonly credentialEnabled: boolean;
|
|
417
|
-
readonly magicLinkEnabled: boolean;
|
|
418
|
-
readonly passkeyEnabled: boolean;
|
|
419
|
-
readonly clientTeamCreationEnabled: boolean;
|
|
420
|
-
readonly clientUserDeletionEnabled: boolean;
|
|
421
|
-
readonly allowLocalhost: boolean;
|
|
422
|
-
readonly oauthProviders: AdminOAuthProviderConfig[];
|
|
423
|
-
readonly emailConfig?: AdminEmailConfig;
|
|
424
|
-
readonly domains: AdminDomainConfig[];
|
|
425
|
-
readonly createTeamOnSignUp: boolean;
|
|
426
|
-
readonly teamCreatorDefaultPermissions: AdminTeamPermission[];
|
|
427
|
-
readonly teamMemberDefaultPermissions: AdminTeamPermission[];
|
|
428
|
-
};
|
|
429
|
-
type AdminEmailConfig = ({
|
|
430
|
-
type: "standard";
|
|
431
|
-
senderName: string;
|
|
432
|
-
senderEmail: string;
|
|
433
|
-
host: string;
|
|
434
|
-
port: number;
|
|
435
|
-
username: string;
|
|
436
|
-
password: string;
|
|
437
|
-
} | {
|
|
438
|
-
type: "shared";
|
|
439
|
-
});
|
|
440
|
-
type AdminDomainConfig = {
|
|
441
|
-
domain: string;
|
|
442
|
-
handlerPath: string;
|
|
443
|
-
};
|
|
444
|
-
type AdminOAuthProviderConfig = {
|
|
445
|
-
id: string;
|
|
446
|
-
enabled: boolean;
|
|
447
|
-
} & ({
|
|
448
|
-
type: 'shared';
|
|
449
|
-
} | {
|
|
450
|
-
type: 'standard';
|
|
451
|
-
clientId: string;
|
|
452
|
-
clientSecret: string;
|
|
453
|
-
facebookConfigId?: string;
|
|
454
|
-
microsoftTenantId?: string;
|
|
455
|
-
}) & OAuthProviderConfig;
|
|
456
|
-
type AdminProjectConfigUpdateOptions = {
|
|
457
|
-
domains?: {
|
|
458
|
-
domain: string;
|
|
459
|
-
handlerPath: string;
|
|
460
|
-
}[];
|
|
461
|
-
oauthProviders?: AdminOAuthProviderConfig[];
|
|
462
|
-
signUpEnabled?: boolean;
|
|
463
|
-
credentialEnabled?: boolean;
|
|
464
|
-
magicLinkEnabled?: boolean;
|
|
465
|
-
passkeyEnabled?: boolean;
|
|
466
|
-
clientTeamCreationEnabled?: boolean;
|
|
467
|
-
clientUserDeletionEnabled?: boolean;
|
|
468
|
-
allowLocalhost?: boolean;
|
|
469
|
-
createTeamOnSignUp?: boolean;
|
|
470
|
-
emailConfig?: AdminEmailConfig;
|
|
471
|
-
teamCreatorDefaultPermissions?: {
|
|
472
|
-
id: string;
|
|
473
|
-
}[];
|
|
474
|
-
teamMemberDefaultPermissions?: {
|
|
475
|
-
id: string;
|
|
476
|
-
}[];
|
|
477
|
-
};
|
|
478
|
-
type ApiKeyBase = {
|
|
479
|
-
id: string;
|
|
480
|
-
description: string;
|
|
481
|
-
expiresAt: Date;
|
|
482
|
-
manuallyRevokedAt: Date | null;
|
|
483
|
-
createdAt: Date;
|
|
484
|
-
isValid(): boolean;
|
|
485
|
-
whyInvalid(): "expired" | "manually-revoked" | null;
|
|
486
|
-
revoke(): Promise<void>;
|
|
487
|
-
};
|
|
488
|
-
type ApiKeyBaseCrudRead = Pick<ApiKeysCrud["Admin"]["Read"], "id" | "created_at_millis" | "description" | "expires_at_millis" | "manually_revoked_at_millis">;
|
|
489
|
-
type ApiKeyFirstView = {
|
|
490
|
-
publishableClientKey?: string;
|
|
491
|
-
secretServerKey?: string;
|
|
492
|
-
superSecretAdminKey?: string;
|
|
493
|
-
} & ApiKeyBase;
|
|
494
|
-
type ApiKey = {
|
|
495
|
-
publishableClientKey: null | {
|
|
496
|
-
lastFour: string;
|
|
497
|
-
};
|
|
498
|
-
secretServerKey: null | {
|
|
499
|
-
lastFour: string;
|
|
500
|
-
};
|
|
501
|
-
superSecretAdminKey: null | {
|
|
502
|
-
lastFour: string;
|
|
503
|
-
};
|
|
504
|
-
} & ApiKeyBase;
|
|
505
|
-
type ApiKeyCreateOptions = {
|
|
506
|
-
description: string;
|
|
507
|
-
expiresAt: Date;
|
|
508
|
-
hasPublishableClientKey: boolean;
|
|
509
|
-
hasSecretServerKey: boolean;
|
|
510
|
-
hasSuperSecretAdminKey: boolean;
|
|
511
|
-
};
|
|
286
|
+
declare function serverUserCreateOptionsToCrud(options: ServerUserCreateOptions): UsersCrud["Server"]["Create"];
|
|
287
|
+
|
|
512
288
|
type TeamMemberProfile = {
|
|
513
289
|
displayName: string | null;
|
|
514
290
|
profileImageUrl: string | null;
|
|
@@ -552,10 +328,12 @@ type TeamUpdateOptions = {
|
|
|
552
328
|
profileImageUrl?: string | null;
|
|
553
329
|
clientMetadata?: ReadonlyJson;
|
|
554
330
|
};
|
|
331
|
+
declare function teamUpdateOptionsToCrud(options: TeamUpdateOptions): TeamsCrud["Client"]["Update"];
|
|
555
332
|
type TeamCreateOptions = {
|
|
556
333
|
displayName: string;
|
|
557
334
|
profileImageUrl?: string;
|
|
558
335
|
};
|
|
336
|
+
declare function teamCreateOptionsToCrud(options: TeamCreateOptions, creatorUserId: string): TeamsCrud["Client"]["Create"];
|
|
559
337
|
type ServerTeamMemberProfile = TeamMemberProfile;
|
|
560
338
|
type ServerTeamUser = ServerUser & {
|
|
561
339
|
teamProfile: ServerTeamMemberProfile;
|
|
@@ -584,44 +362,132 @@ type ServerListUsersOptions = {
|
|
|
584
362
|
type ServerTeamCreateOptions = TeamCreateOptions & {
|
|
585
363
|
creatorUserId?: string;
|
|
586
364
|
};
|
|
365
|
+
declare function serverTeamCreateOptionsToCrud(options: ServerTeamCreateOptions): TeamsCrud["Server"]["Create"];
|
|
587
366
|
type ServerTeamUpdateOptions = TeamUpdateOptions & {
|
|
588
367
|
clientReadOnlyMetadata?: ReadonlyJson;
|
|
589
368
|
serverMetadata?: ReadonlyJson;
|
|
590
369
|
};
|
|
591
|
-
|
|
592
|
-
|
|
370
|
+
declare function serverTeamUpdateOptionsToCrud(options: ServerTeamUpdateOptions): TeamsCrud["Server"]["Update"];
|
|
371
|
+
|
|
372
|
+
type StackServerAppConstructorOptions<HasTokenStore extends boolean, ProjectId extends string> = StackClientAppConstructorOptions<HasTokenStore, ProjectId> & {
|
|
373
|
+
secretServerKey?: string;
|
|
593
374
|
};
|
|
594
|
-
type
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
description?: string;
|
|
598
|
-
containedPermissionIds: string[];
|
|
375
|
+
type StackServerAppConstructor = {
|
|
376
|
+
new <TokenStoreType extends string, HasTokenStore extends (TokenStoreType extends {} ? true : boolean), ProjectId extends string>(options: StackServerAppConstructorOptions<HasTokenStore, ProjectId>): StackServerApp<HasTokenStore, ProjectId>;
|
|
377
|
+
new (options: StackServerAppConstructorOptions<boolean, string>): StackServerApp<boolean, string>;
|
|
599
378
|
};
|
|
600
|
-
type
|
|
601
|
-
|
|
379
|
+
type StackServerApp<HasTokenStore extends boolean = boolean, ProjectId extends string = string> = ({
|
|
380
|
+
createTeam(data: ServerTeamCreateOptions): Promise<ServerTeam>;
|
|
381
|
+
/**
|
|
382
|
+
* @deprecated use `getUser()` instead
|
|
383
|
+
*/
|
|
384
|
+
getServerUser(): Promise<ProjectCurrentServerUser<ProjectId> | null>;
|
|
385
|
+
createUser(options: ServerUserCreateOptions): Promise<ServerUser>;
|
|
386
|
+
useUser(options: GetUserOptions<HasTokenStore> & {
|
|
387
|
+
or: 'redirect';
|
|
388
|
+
}): ProjectCurrentServerUser<ProjectId>;
|
|
389
|
+
useUser(options: GetUserOptions<HasTokenStore> & {
|
|
390
|
+
or: 'throw';
|
|
391
|
+
}): ProjectCurrentServerUser<ProjectId>;
|
|
392
|
+
useUser(options?: GetUserOptions<HasTokenStore>): ProjectCurrentServerUser<ProjectId> | null;
|
|
393
|
+
getUser(options: GetUserOptions<HasTokenStore> & {
|
|
394
|
+
or: 'redirect';
|
|
395
|
+
}): Promise<ProjectCurrentServerUser<ProjectId>>;
|
|
396
|
+
getUser(options: GetUserOptions<HasTokenStore> & {
|
|
397
|
+
or: 'throw';
|
|
398
|
+
}): Promise<ProjectCurrentServerUser<ProjectId>>;
|
|
399
|
+
getUser(options?: GetUserOptions<HasTokenStore>): Promise<ProjectCurrentServerUser<ProjectId> | null>;
|
|
400
|
+
useUsers(options?: ServerListUsersOptions): ServerUser[] & {
|
|
401
|
+
nextCursor: string | null;
|
|
402
|
+
};
|
|
403
|
+
listUsers(options?: ServerListUsersOptions): Promise<ServerUser[] & {
|
|
404
|
+
nextCursor: string | null;
|
|
405
|
+
}>;
|
|
406
|
+
} & 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>);
|
|
407
|
+
declare const StackServerApp: StackServerAppConstructor;
|
|
408
|
+
|
|
409
|
+
type StackAdminAppConstructorOptions<HasTokenStore extends boolean, ProjectId extends string> = ((StackServerAppConstructorOptions<HasTokenStore, ProjectId> & {
|
|
410
|
+
superSecretAdminKey?: string;
|
|
411
|
+
}) | (Omit<StackServerAppConstructorOptions<HasTokenStore, ProjectId>, "publishableClientKey" | "secretServerKey"> & {
|
|
412
|
+
projectOwnerSession: InternalSession;
|
|
413
|
+
}));
|
|
414
|
+
type StackAdminAppConstructor = {
|
|
415
|
+
new <HasTokenStore extends boolean, ProjectId extends string>(options: StackAdminAppConstructorOptions<HasTokenStore, ProjectId>): StackAdminApp<HasTokenStore, ProjectId>;
|
|
416
|
+
new (options: StackAdminAppConstructorOptions<boolean, string>): StackAdminApp<boolean, string>;
|
|
417
|
+
};
|
|
418
|
+
type StackAdminApp<HasTokenStore extends boolean = boolean, ProjectId extends string = string> = (AsyncStoreProperty<"project", [], AdminProject, false> & AsyncStoreProperty<"apiKeys", [], ApiKey[], true> & AsyncStoreProperty<"teamPermissionDefinitions", [], AdminTeamPermissionDefinition[], true> & {
|
|
419
|
+
useEmailTemplates(): AdminEmailTemplate[];
|
|
420
|
+
listEmailTemplates(): Promise<AdminEmailTemplate[]>;
|
|
421
|
+
updateEmailTemplate(type: EmailTemplateType, data: AdminEmailTemplateUpdateOptions): Promise<void>;
|
|
422
|
+
resetEmailTemplate(type: EmailTemplateType): Promise<void>;
|
|
423
|
+
createApiKey(options: ApiKeyCreateOptions): Promise<ApiKeyFirstView>;
|
|
424
|
+
createTeamPermissionDefinition(data: AdminTeamPermissionDefinitionCreateOptions): Promise<AdminTeamPermission>;
|
|
425
|
+
updateTeamPermissionDefinition(permissionId: string, data: AdminTeamPermissionDefinitionUpdateOptions): Promise<void>;
|
|
426
|
+
deleteTeamPermissionDefinition(permissionId: string): Promise<void>;
|
|
427
|
+
useSvixToken(): string;
|
|
428
|
+
sendTestEmail(options: {
|
|
429
|
+
recipientEmail: string;
|
|
430
|
+
emailConfig: EmailConfig;
|
|
431
|
+
}): Promise<Result<undefined, {
|
|
432
|
+
errorMessage: string;
|
|
433
|
+
}>>;
|
|
434
|
+
} & StackServerApp<HasTokenStore, ProjectId>);
|
|
435
|
+
declare const StackAdminApp: StackAdminAppConstructor;
|
|
436
|
+
|
|
437
|
+
type Project = {
|
|
438
|
+
readonly id: string;
|
|
439
|
+
readonly displayName: string;
|
|
440
|
+
readonly config: ProjectConfig;
|
|
441
|
+
};
|
|
442
|
+
type AdminProject = {
|
|
443
|
+
readonly id: string;
|
|
444
|
+
readonly displayName: string;
|
|
445
|
+
readonly description: string | null;
|
|
446
|
+
readonly createdAt: Date;
|
|
447
|
+
readonly userCount: number;
|
|
448
|
+
readonly isProductionMode: boolean;
|
|
449
|
+
readonly config: AdminProjectConfig;
|
|
450
|
+
update(this: AdminProject, update: AdminProjectUpdateOptions): Promise<void>;
|
|
451
|
+
delete(this: AdminProject): Promise<void>;
|
|
452
|
+
getProductionModeErrors(this: AdminProject): Promise<ProductionModeError[]>;
|
|
453
|
+
useProductionModeErrors(this: AdminProject): ProductionModeError[];
|
|
454
|
+
} & Project;
|
|
455
|
+
type AdminOwnedProject = {
|
|
456
|
+
readonly app: StackAdminApp<false>;
|
|
457
|
+
} & AdminProject;
|
|
458
|
+
type AdminProjectUpdateOptions = {
|
|
459
|
+
displayName?: string;
|
|
602
460
|
description?: string;
|
|
603
|
-
|
|
461
|
+
isProductionMode?: boolean;
|
|
462
|
+
config?: AdminProjectConfigUpdateOptions;
|
|
604
463
|
};
|
|
605
|
-
declare function
|
|
606
|
-
type
|
|
607
|
-
|
|
608
|
-
type Connection = {
|
|
609
|
-
id: string;
|
|
464
|
+
declare function adminProjectUpdateOptionsToCrud(options: AdminProjectUpdateOptions): ProjectsCrud["Admin"]["Update"];
|
|
465
|
+
type AdminProjectCreateOptions = Omit<AdminProjectUpdateOptions, 'displayName'> & {
|
|
466
|
+
displayName: string;
|
|
610
467
|
};
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
468
|
+
declare function adminProjectCreateOptionsToCrud(options: AdminProjectCreateOptions): InternalProjectsCrud["Server"]["Create"];
|
|
469
|
+
|
|
470
|
+
type StackClientAppConstructorOptions<HasTokenStore extends boolean, ProjectId extends string> = {
|
|
471
|
+
baseUrl?: string | {
|
|
472
|
+
browser: string;
|
|
473
|
+
server: string;
|
|
617
474
|
};
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
475
|
+
projectId?: ProjectId;
|
|
476
|
+
publishableClientKey?: string;
|
|
477
|
+
urls?: Partial<HandlerUrls>;
|
|
478
|
+
oauthScopesOnSignIn?: Partial<OAuthScopesOnSignIn>;
|
|
479
|
+
tokenStore: TokenStoreInit<HasTokenStore>;
|
|
480
|
+
redirectMethod?: RedirectMethod;
|
|
481
|
+
/**
|
|
482
|
+
* By default, the Stack app will automatically prefetch some data from Stack's server when this app is first
|
|
483
|
+
* constructed. This improves the performance of your app, but will create network requests that are unnecessary if
|
|
484
|
+
* the app is never used or disposed of immediately. To disable this behavior, set this option to true.
|
|
485
|
+
*/
|
|
486
|
+
noAutomaticPrefetch?: boolean;
|
|
487
|
+
};
|
|
488
|
+
type StackClientAppJson<HasTokenStore extends boolean, ProjectId extends string> = StackClientAppConstructorOptions<HasTokenStore, ProjectId> & {
|
|
489
|
+
uniqueIdentifier: string;
|
|
490
|
+
};
|
|
625
491
|
type StackClientAppConstructor = {
|
|
626
492
|
new <TokenStoreType extends string, HasTokenStore extends (TokenStoreType extends {} ? true : boolean), ProjectId extends string>(options: StackClientAppConstructorOptions<HasTokenStore, ProjectId>): StackClientApp<HasTokenStore, ProjectId>;
|
|
627
493
|
new (options: StackClientAppConstructorOptions<boolean, string>): StackClientApp<boolean, string>;
|
|
@@ -690,87 +556,5 @@ type StackClientApp<HasTokenStore extends boolean = boolean, ProjectId extends s
|
|
|
690
556
|
[K in `redirectTo${Capitalize<keyof Omit<HandlerUrls, 'handler' | 'oauthCallback'>>}`]: (options?: RedirectToOptions) => Promise<void>;
|
|
691
557
|
});
|
|
692
558
|
declare const StackClientApp: StackClientAppConstructor;
|
|
693
|
-
type StackServerAppConstructor = {
|
|
694
|
-
new <TokenStoreType extends string, HasTokenStore extends (TokenStoreType extends {} ? true : boolean), ProjectId extends string>(options: StackServerAppConstructorOptions<HasTokenStore, ProjectId>): StackServerApp<HasTokenStore, ProjectId>;
|
|
695
|
-
new (options: StackServerAppConstructorOptions<boolean, string>): StackServerApp<boolean, string>;
|
|
696
|
-
};
|
|
697
|
-
type StackServerApp<HasTokenStore extends boolean = boolean, ProjectId extends string = string> = ({
|
|
698
|
-
createTeam(data: ServerTeamCreateOptions): Promise<ServerTeam>;
|
|
699
|
-
/**
|
|
700
|
-
* @deprecated use `getUser()` instead
|
|
701
|
-
*/
|
|
702
|
-
getServerUser(): Promise<ProjectCurrentServerUser<ProjectId> | null>;
|
|
703
|
-
createUser(options: ServerUserCreateOptions): Promise<ServerUser>;
|
|
704
|
-
useUser(options: GetUserOptions<HasTokenStore> & {
|
|
705
|
-
or: 'redirect';
|
|
706
|
-
}): ProjectCurrentServerUser<ProjectId>;
|
|
707
|
-
useUser(options: GetUserOptions<HasTokenStore> & {
|
|
708
|
-
or: 'throw';
|
|
709
|
-
}): ProjectCurrentServerUser<ProjectId>;
|
|
710
|
-
useUser(options?: GetUserOptions<HasTokenStore>): ProjectCurrentServerUser<ProjectId> | null;
|
|
711
|
-
getUser(options: GetUserOptions<HasTokenStore> & {
|
|
712
|
-
or: 'redirect';
|
|
713
|
-
}): Promise<ProjectCurrentServerUser<ProjectId>>;
|
|
714
|
-
getUser(options: GetUserOptions<HasTokenStore> & {
|
|
715
|
-
or: 'throw';
|
|
716
|
-
}): Promise<ProjectCurrentServerUser<ProjectId>>;
|
|
717
|
-
getUser(options?: GetUserOptions<HasTokenStore>): Promise<ProjectCurrentServerUser<ProjectId> | null>;
|
|
718
|
-
useUsers(options?: ServerListUsersOptions): ServerUser[] & {
|
|
719
|
-
nextCursor: string | null;
|
|
720
|
-
};
|
|
721
|
-
listUsers(options?: ServerListUsersOptions): Promise<ServerUser[] & {
|
|
722
|
-
nextCursor: string | null;
|
|
723
|
-
}>;
|
|
724
|
-
} & 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>);
|
|
725
|
-
declare const StackServerApp: StackServerAppConstructor;
|
|
726
|
-
type StackAdminAppConstructor = {
|
|
727
|
-
new <HasTokenStore extends boolean, ProjectId extends string>(options: StackAdminAppConstructorOptions<HasTokenStore, ProjectId>): StackAdminApp<HasTokenStore, ProjectId>;
|
|
728
|
-
new (options: StackAdminAppConstructorOptions<boolean, string>): StackAdminApp<boolean, string>;
|
|
729
|
-
};
|
|
730
|
-
type StackAdminApp<HasTokenStore extends boolean = boolean, ProjectId extends string = string> = (AsyncStoreProperty<"project", [], AdminProject, false> & AsyncStoreProperty<"apiKeys", [], ApiKey[], true> & AsyncStoreProperty<"teamPermissionDefinitions", [], AdminTeamPermissionDefinition[], true> & {
|
|
731
|
-
useEmailTemplates(): AdminEmailTemplate[];
|
|
732
|
-
listEmailTemplates(): Promise<AdminEmailTemplate[]>;
|
|
733
|
-
updateEmailTemplate(type: EmailTemplateType, data: AdminEmailTemplateUpdateOptions): Promise<void>;
|
|
734
|
-
resetEmailTemplate(type: EmailTemplateType): Promise<void>;
|
|
735
|
-
createApiKey(options: ApiKeyCreateOptions): Promise<ApiKeyFirstView>;
|
|
736
|
-
createTeamPermissionDefinition(data: AdminTeamPermissionDefinitionCreateOptions): Promise<AdminTeamPermission>;
|
|
737
|
-
updateTeamPermissionDefinition(permissionId: string, data: AdminTeamPermissionDefinitionUpdateOptions): Promise<void>;
|
|
738
|
-
deleteTeamPermissionDefinition(permissionId: string): Promise<void>;
|
|
739
|
-
useSvixToken(): string;
|
|
740
|
-
sendTestEmail(options: {
|
|
741
|
-
recipientEmail: string;
|
|
742
|
-
emailConfig: EmailConfig;
|
|
743
|
-
}): Promise<Result<undefined, {
|
|
744
|
-
errorMessage: string;
|
|
745
|
-
}>>;
|
|
746
|
-
} & StackServerApp<HasTokenStore, ProjectId>);
|
|
747
|
-
declare const StackAdminApp: StackAdminAppConstructor;
|
|
748
|
-
type AdminEmailTemplate = {
|
|
749
|
-
type: EmailTemplateType;
|
|
750
|
-
subject: string;
|
|
751
|
-
content: any;
|
|
752
|
-
isDefault: boolean;
|
|
753
|
-
};
|
|
754
|
-
type AdminEmailTemplateUpdateOptions = {
|
|
755
|
-
subject?: string;
|
|
756
|
-
content?: any;
|
|
757
|
-
};
|
|
758
|
-
type RedirectToOptions = {
|
|
759
|
-
replace?: boolean;
|
|
760
|
-
noRedirectBack?: boolean;
|
|
761
|
-
};
|
|
762
|
-
type AsyncStoreProperty<Name extends string, Args extends any[], Value, IsMultiple extends boolean> = {
|
|
763
|
-
[key in `${IsMultiple extends true ? "list" : "get"}${Capitalize<Name>}`]: (...args: Args) => Promise<Value>;
|
|
764
|
-
} & {
|
|
765
|
-
[key in `use${Capitalize<Name>}`]: (...args: Args) => Value;
|
|
766
|
-
};
|
|
767
|
-
type EmailConfig = {
|
|
768
|
-
host: string;
|
|
769
|
-
port: number;
|
|
770
|
-
username: string;
|
|
771
|
-
password: string;
|
|
772
|
-
senderEmail: string;
|
|
773
|
-
senderName: string;
|
|
774
|
-
};
|
|
775
559
|
|
|
776
|
-
export { type
|
|
560
|
+
export { adminProjectUpdateOptionsToCrud as $, type AdminOwnedProject as A, type CurrentUser as B, type CurrentInternalServerUser as C, type ServerUser as D, type EditableTeamMemberProfile as E, type Session as F, type BaseUser as G, type UserExtra as H, type InternalUserExtra as I, type ProjectCurrentUser as J, type UserUpdateOptions as K, type ProjectCurrentServerUser as L, type ServerUserCreateOptions as M, userUpdateOptionsToCrud as N, type ServerBaseUser as O, type Project as P, type ServerUserUpdateOptions as Q, serverUserUpdateOptionsToCrud as R, StackAdminApp as S, type Team as T, type User as U, serverUserCreateOptionsToCrud as V, type TeamMemberProfileUpdateOptions as W, teamUpdateOptionsToCrud as X, teamCreateOptionsToCrud as Y, serverTeamCreateOptionsToCrud as Z, serverTeamUpdateOptionsToCrud as _, StackClientApp as a, adminProjectCreateOptionsToCrud as a0, StackServerApp as b, type StackAdminAppConstructor as c, type StackAdminAppConstructorOptions as d, type StackClientAppConstructor as e, type StackClientAppConstructorOptions as f, type StackClientAppJson as g, type StackServerAppConstructor as h, type StackServerAppConstructorOptions as i, type AdminProject as j, type AdminProjectCreateOptions as k, type AdminProjectUpdateOptions as l, type ServerListUsersOptions as m, type ServerTeam as n, type ServerTeamCreateOptions as o, type ServerTeamMemberProfile as p, type ServerTeamUpdateOptions as q, type ServerTeamUser as r, type TeamCreateOptions as s, type TeamInvitation as t, type TeamMemberProfile as u, type TeamUpdateOptions as v, type TeamUser as w, type Auth as x, type CurrentInternalUser as y, type CurrentServerUser as z };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { A as AdminOwnedProject, j as AdminProject, k as AdminProjectCreateOptions, l as AdminProjectUpdateOptions, x as Auth, C as CurrentInternalServerUser, y as CurrentInternalUser, z as CurrentServerUser, B as CurrentUser, E as EditableTeamMemberProfile, P as Project, m as ServerListUsersOptions, n as ServerTeam, o as ServerTeamCreateOptions, p as ServerTeamMemberProfile, q as ServerTeamUpdateOptions, r as ServerTeamUser, D as ServerUser, F as Session, S as StackAdminApp, c as StackAdminAppConstructor, d as StackAdminAppConstructorOptions, a as StackClientApp, e as StackClientAppConstructor, f as StackClientAppConstructorOptions, g as StackClientAppJson, b as StackServerApp, h as StackServerAppConstructor, i as StackServerAppConstructorOptions, T as Team, s as TeamCreateOptions, t as TeamInvitation, u as TeamMemberProfile, v as TeamUpdateOptions, w as TeamUser, U as User } from './index-C7D6Vt7X.mjs';
|
|
2
|
+
export { AdminDomainConfig, AdminEmailConfig, AdminOAuthProviderConfig, AdminProjectConfig, AdminProjectConfigUpdateOptions, OAuthProviderConfig, ProjectConfig } from './lib/stack-app/project-configs/index.mjs';
|
|
3
|
+
export { ApiKey, ApiKeyBase, ApiKeyBaseCrudRead, ApiKeyCreateOptions, ApiKeyFirstView } from './lib/stack-app/api-keys/index.mjs';
|
|
4
|
+
export { GetUserOptions, HandlerUrls, OAuthScopesOnSignIn, stackAppInternalsSymbol } from './lib/stack-app/common.mjs';
|
|
5
|
+
export { Connection, OAuthConnection } from './lib/stack-app/connected-accounts/index.mjs';
|
|
6
|
+
export { ContactChannel } from './lib/stack-app/contact-channels/index.mjs';
|
|
7
|
+
export { AdminTeamPermission, AdminTeamPermissionDefinition, AdminTeamPermissionDefinitionCreateOptions, AdminTeamPermissionDefinitionUpdateOptions, TeamPermission } from './lib/stack-app/permissions/index.mjs';
|
|
2
8
|
export { default as StackHandler } from './components-page/stack-handler.mjs';
|
|
3
9
|
export { useStackApp, useUser } from './lib/hooks.mjs';
|
|
4
10
|
export { default as StackProvider } from './providers/stack-provider.mjs';
|
|
@@ -20,15 +26,21 @@ export { OAuthButtonGroup } from './components/oauth-button-group.mjs';
|
|
|
20
26
|
export { SelectedTeamSwitcher } from './components/selected-team-switcher.mjs';
|
|
21
27
|
export { UserButton } from './components/user-button.mjs';
|
|
22
28
|
import '@stackframe/stack-shared';
|
|
23
|
-
import '@stackframe/stack-shared/dist/helpers/production-mode';
|
|
24
|
-
import '@stackframe/stack-shared/dist/interface/crud/api-keys';
|
|
25
29
|
import '@stackframe/stack-shared/dist/interface/crud/current-user';
|
|
30
|
+
import '@stackframe/stack-shared/dist/utils/results';
|
|
31
|
+
import '@stackframe/stack-shared/dist/helpers/production-mode';
|
|
32
|
+
import '@stackframe/stack-shared/dist/interface/crud/projects';
|
|
26
33
|
import '@stackframe/stack-shared/dist/interface/crud/email-templates';
|
|
27
|
-
import '@stackframe/stack-shared/dist/interface/crud/team-permissions';
|
|
28
34
|
import '@stackframe/stack-shared/dist/sessions';
|
|
35
|
+
import './lib/stack-app/email-templates/index.mjs';
|
|
36
|
+
import '@stackframe/stack-shared/dist/interface/crud/teams';
|
|
29
37
|
import '@stackframe/stack-shared/dist/utils/json';
|
|
38
|
+
import '@stackframe/stack-shared/dist/interface/crud/users';
|
|
30
39
|
import '@stackframe/stack-shared/dist/utils/oauth';
|
|
31
|
-
import '@stackframe/stack-shared/dist/
|
|
40
|
+
import '@stackframe/stack-shared/dist/interface/adminInterface';
|
|
41
|
+
import '@stackframe/stack-shared/dist/interface/crud/api-keys';
|
|
42
|
+
import '@stackframe/stack-shared/dist/interface/crud/contact-channels';
|
|
43
|
+
import '@stackframe/stack-shared/dist/interface/crud/team-permissions';
|
|
32
44
|
import './components-page/error-page.mjs';
|
|
33
45
|
import 'react/jsx-runtime';
|
|
34
46
|
import './components-page/magic-link-callback.mjs';
|