@buildbase/sdk 0.0.88 → 0.0.90
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/AGENTS.md +7 -3
- package/CHANGELOG.md +515 -0
- package/README.md +120 -3
- package/dist/cli.mjs +1 -1
- package/dist/css/styles.css +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1351 -12
- package/dist/index.mjs +1 -1
- package/dist/mcp/index.cjs +1 -1
- package/dist/mcp/index.d.ts +120 -2
- package/dist/mcp/index.mjs +1 -1
- package/dist/react/chunks/SettingsDialog-BVyV5Zfm.mjs +2 -0
- package/dist/react/chunks/SettingsDialog-Ch8X6WXy.cjs +2 -0
- package/dist/react/chunks/{SubscriptionDialog-B8FTFRtp.cjs → SubscriptionDialog-CGIvMKpT.cjs} +1 -1
- package/dist/react/chunks/SubscriptionDialog-g0LwHhbe.mjs +2 -0
- package/dist/react/chunks/ar-3aqWucom.mjs +2 -0
- package/dist/react/chunks/ar-DQVB89r8.cjs +2 -0
- package/dist/react/chunks/de-DO10bhnU.cjs +2 -0
- package/dist/react/chunks/de-HXQk5D6k.mjs +2 -0
- package/dist/react/chunks/es-BZsmhBN3.mjs +2 -0
- package/dist/react/chunks/es-Cxg-qhUh.cjs +2 -0
- package/dist/react/chunks/fr-COCMy3vW.cjs +2 -0
- package/dist/react/chunks/fr-rdnNHzxy.mjs +2 -0
- package/dist/react/chunks/hi-BB0Z-Dgn.cjs +2 -0
- package/dist/react/chunks/hi-t3RH7ITu.mjs +2 -0
- package/dist/react/chunks/ja-CDyla2g0.mjs +2 -0
- package/dist/react/chunks/ja-D92JgUlk.cjs +2 -0
- package/dist/react/chunks/react-DTq7A_PT.mjs +2 -0
- package/dist/react/chunks/react-DeapSbq6.cjs +2 -0
- package/dist/react/chunks/zh-C5HABZZV.mjs +2 -0
- package/dist/react/chunks/zh-DK2yA5wB.cjs +2 -0
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.d.ts +1517 -14
- package/dist/react/index.mjs +1 -1
- package/docs/ERROR_CODES.md +218 -0
- package/docs/THEMING.md +89 -21
- package/docs/UI-CONFIG.md +23 -4
- package/docs/USER-IMPORT.md +320 -0
- package/package.json +2 -1
- package/dist/react/chunks/SettingsDialog-CKVE1PpH.mjs +0 -2
- package/dist/react/chunks/SettingsDialog-DrDmxFEj.cjs +0 -2
- package/dist/react/chunks/SubscriptionDialog-UN7o9Hqb.mjs +0 -2
- package/dist/react/chunks/ar-B2l90OZJ.cjs +0 -2
- package/dist/react/chunks/ar-DVVNZhXD.mjs +0 -2
- package/dist/react/chunks/de-BspJtvAC.mjs +0 -2
- package/dist/react/chunks/de-dURUqbl0.cjs +0 -2
- package/dist/react/chunks/es-DArjREi5.cjs +0 -2
- package/dist/react/chunks/es-vu4BmI3g.mjs +0 -2
- package/dist/react/chunks/fr-DVm5WCvZ.mjs +0 -2
- package/dist/react/chunks/fr-DhYDaYrX.cjs +0 -2
- package/dist/react/chunks/hi-C_nv_c1T.cjs +0 -2
- package/dist/react/chunks/hi-VW8xCj_K.mjs +0 -2
- package/dist/react/chunks/ja-C-b88dvw.mjs +0 -2
- package/dist/react/chunks/ja-CqtDkLHr.cjs +0 -2
- package/dist/react/chunks/react-CHivaJhA.mjs +0 -2
- package/dist/react/chunks/react-Ch_Suxxy.cjs +0 -2
- package/dist/react/chunks/zh-D1yfhUf0.mjs +0 -2
- package/dist/react/chunks/zh-D_tMpsNt.cjs +0 -2
package/dist/index.d.ts
CHANGED
|
@@ -34,7 +34,463 @@ interface IUser extends IDocument {
|
|
|
34
34
|
/** Currency code. May be omitted. */
|
|
35
35
|
currency?: string;
|
|
36
36
|
attributes?: Record<string, string | number | boolean>;
|
|
37
|
+
/**
|
|
38
|
+
* The user has a confirmed authenticator app, so sign-in asks for a second
|
|
39
|
+
* step. Read-only: it changes through the two-step sign-in calls on
|
|
40
|
+
* `WorkspaceApi`, never through `updateUserProfile`. Absent from a server
|
|
41
|
+
* that predates two-step sign-in.
|
|
42
|
+
*/
|
|
43
|
+
mfaEnabled?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* The user can change their email address with `requestEmailChange` and
|
|
46
|
+
* `confirmEmailChange`. Read-only, from the profile. Absent from a server
|
|
47
|
+
* that predates changing email, which reads as `false`.
|
|
48
|
+
*/
|
|
49
|
+
canChangeEmail?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Why `canChangeEmail` is false, when the user should be told. Absent when
|
|
52
|
+
* the change is allowed or no reason is given.
|
|
53
|
+
*/
|
|
54
|
+
changeEmailBlockedBy?: ChangeEmailBlockedBy;
|
|
55
|
+
/**
|
|
56
|
+
* The user's id in the system they were imported from (`buildbase import`),
|
|
57
|
+
* so an app can map its own rows to this account. Read-only, from the
|
|
58
|
+
* profile. Absent for anyone who was not imported.
|
|
59
|
+
*/
|
|
60
|
+
externalId?: string;
|
|
61
|
+
/**
|
|
62
|
+
* The user's phone number, as E.164 (`+14155550123`). Read-only: it changes
|
|
63
|
+
* through `addPhone`, `confirmPhone` and `removePhone` on `WorkspaceApi`,
|
|
64
|
+
* never through `updateUserProfile`. Absent until the user adds one, signs
|
|
65
|
+
* up by phone or is imported with one, and from a server that predates
|
|
66
|
+
* phone numbers.
|
|
67
|
+
*/
|
|
68
|
+
phone?: string;
|
|
69
|
+
/** The phone was proven with a code sent to it. Read-only, from the profile. */
|
|
70
|
+
phoneVerified?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* The user's username, lower case, while the app has usernames on: `''`
|
|
73
|
+
* when they have none. Changes through `setUsername` and `removeUsername` on
|
|
74
|
+
* `WorkspaceApi`. Absent from a server that predates usernames.
|
|
75
|
+
*/
|
|
76
|
+
username?: string;
|
|
77
|
+
/**
|
|
78
|
+
* Custom claims the app owner set for this user, from the console or with
|
|
79
|
+
* an API token; `{}` when there are none. Read-only to the user, who cannot
|
|
80
|
+
* change them. The same object reaches the app's backend as `claims` on the
|
|
81
|
+
* app-token request (`AppTokenRequestClaims.claims`).
|
|
82
|
+
*/
|
|
83
|
+
claims?: Record<string, unknown>;
|
|
84
|
+
/**
|
|
85
|
+
* A guest: someone who continued without an account. Their name is `Guest`
|
|
86
|
+
* and their email a placeholder ending in `@anonymous.invalid` that must
|
|
87
|
+
* never be shown. They become a real account, keeping their id and data,
|
|
88
|
+
* with `requestGuestUpgrade` and `confirmGuestUpgrade`.
|
|
89
|
+
*/
|
|
90
|
+
isAnonymous?: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* When the account deletion the user asked for runs (ISO 8601). Absent
|
|
93
|
+
* unless one is scheduled; `cancelAccountDeletion` takes it back until then.
|
|
94
|
+
*/
|
|
95
|
+
deleteAfter?: string;
|
|
96
|
+
/**
|
|
97
|
+
* When this session last proved who its person is (ISO 8601): the sign-in,
|
|
98
|
+
* or the latest re-confirmation. `null` for a session nobody signed in to
|
|
99
|
+
* (an API-key exchange), which never counts as recent.
|
|
100
|
+
*/
|
|
101
|
+
authTime?: string | null;
|
|
102
|
+
/** How this session proved it (`amr`, RFC 8176), such as `['pwd', 'mfa']`. */
|
|
103
|
+
amr?: string[];
|
|
104
|
+
/**
|
|
105
|
+
* Present while an app owner is viewing the app as this person: who, until
|
|
106
|
+
* when, and whether the session can change anything.
|
|
107
|
+
*/
|
|
108
|
+
impersonation?: IImpersonation;
|
|
109
|
+
/**
|
|
110
|
+
* The person has a password they know, so `changePassword` can work. False
|
|
111
|
+
* for an account made by social sign-up, a wallet, or a code or link sent
|
|
112
|
+
* by email or text, which holds a random password nobody knows: they set
|
|
113
|
+
* one with Forgot password? on the sign-in page. Absent from a server that
|
|
114
|
+
* predates it.
|
|
115
|
+
*/
|
|
116
|
+
passwordSet?: boolean;
|
|
117
|
+
/**
|
|
118
|
+
* The app this session signed in to offers password sign-in. Absent when
|
|
119
|
+
* the session names no app, and from a server that predates it.
|
|
120
|
+
*/
|
|
121
|
+
passwordSignIn?: boolean;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* The `code` on an error from `changePassword`: the server's `reason`, passed
|
|
125
|
+
* through unchanged.
|
|
126
|
+
*
|
|
127
|
+
* `password_not_set` (409): the account has no password the person knows,
|
|
128
|
+
* so there is none to change; the attempt does not count toward the sign-in
|
|
129
|
+
* lockout. `invalid` (400): the current password is wrong (it counts toward
|
|
130
|
+
* the lockout) or the new one was found in a data breach. `locked` (429):
|
|
131
|
+
* too many wrong passwords, so wait up to 15 minutes, or reset the password,
|
|
132
|
+
* which lifts it.
|
|
133
|
+
*/
|
|
134
|
+
type PasswordChangeErrorCode = 'password_not_set' | 'invalid' | 'locked';
|
|
135
|
+
/**
|
|
136
|
+
* An app owner signed in as this person from the console, to see what they
|
|
137
|
+
* see. Every change in a read-only session is refused with
|
|
138
|
+
* `read_only_session`, and in any such session a change to how the person
|
|
139
|
+
* signs in is refused with `impersonation_sign_in_locked`.
|
|
140
|
+
*/
|
|
141
|
+
interface IImpersonation {
|
|
142
|
+
/** The owner's name, as the console has it. */
|
|
143
|
+
actorName: string;
|
|
144
|
+
/** The session can only read. The default; full access needs the owner role. */
|
|
145
|
+
readOnly: boolean;
|
|
146
|
+
/** When the session ends (ISO 8601), at most an hour after it began. */
|
|
147
|
+
expiresAt: string;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* What a re-confirmation can be asked to include beyond signing in: `mfa`,
|
|
151
|
+
* the user's second step, for someone who has one.
|
|
152
|
+
*/
|
|
153
|
+
type ReverifyFactor = 'mfa';
|
|
154
|
+
/** Where to send the browser to confirm it is still the same person. */
|
|
155
|
+
interface IReverificationStart {
|
|
156
|
+
/** The hosted sign-in page, bound to this session. */
|
|
157
|
+
url: string;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* The `code` on an error from `startReverification`.
|
|
161
|
+
*
|
|
162
|
+
* `reverify_unavailable` (400): this session cannot be re-confirmed, because
|
|
163
|
+
* nobody signed in to it (an API-key exchange), an owner is viewing as the
|
|
164
|
+
* user, or the user is a guest. `invalid_return_url` (400): the return URL is
|
|
165
|
+
* not one of the auth client's redirect URLs.
|
|
166
|
+
*/
|
|
167
|
+
type ReverifyErrorCode = 'reverify_unavailable' | 'invalid_return_url';
|
|
168
|
+
/**
|
|
169
|
+
* Refusals any session-authenticated route may answer, beside its own.
|
|
170
|
+
*
|
|
171
|
+
* `reauth_required` (403): the change needs a recent sign-in. The error
|
|
172
|
+
* carries `maxAgeSeconds` (how recent) and, when the change also needs the
|
|
173
|
+
* user's second step, `factors`. Re-confirm with `requireReverification`;
|
|
174
|
+
* it is never a reason to sign out. `read_only_session` (403): an app owner
|
|
175
|
+
* is viewing as the user, read-only, so nothing can change.
|
|
176
|
+
* `impersonation_sign_in_locked` (403): an app owner is signed in as the
|
|
177
|
+
* user, read-only or not, and the call would change how the user signs in
|
|
178
|
+
* (email, phone, username, password, second step, passkeys, linked accounts,
|
|
179
|
+
* guest upgrade), which stays the user's. Show the server's sentence.
|
|
180
|
+
*/
|
|
181
|
+
type SessionRefusalCode = 'reauth_required' | 'read_only_session' | 'impersonation_sign_in_locked';
|
|
182
|
+
/** A deletion the user asked for. */
|
|
183
|
+
interface IAccountDeletion {
|
|
184
|
+
/**
|
|
185
|
+
* When the account is deleted (ISO 8601), unless cancelled first. `null`
|
|
186
|
+
* when the app deletes at once: the account is already gone.
|
|
187
|
+
*/
|
|
188
|
+
deleteAfter: string | null;
|
|
189
|
+
/** The account was deleted now, and this session ended with it. */
|
|
190
|
+
deleted: boolean;
|
|
191
|
+
}
|
|
192
|
+
/** A workspace that keeps the user from deleting their account, as the refusal names it. */
|
|
193
|
+
interface IOwnedWorkspace {
|
|
194
|
+
id: string;
|
|
195
|
+
name: string;
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* The `code` on an error from `requestAccountDeletion`: the server's
|
|
199
|
+
* `reason`, passed through unchanged.
|
|
200
|
+
*
|
|
201
|
+
* `owns_workspaces` (409) carries `workspaces` (`IOwnedWorkspace[]`): the
|
|
202
|
+
* workspaces the user created that have other members or a subscription.
|
|
203
|
+
* Nothing hands a workspace to someone else, so the way through is to remove
|
|
204
|
+
* the other members and cancel the subscription, or delete the workspace.
|
|
205
|
+
*/
|
|
206
|
+
type AccountDeletionErrorCode = 'reauth_required' | 'owns_workspaces' | 'read_only_session';
|
|
207
|
+
/** Whether the app has usernames on, from its public auth config. */
|
|
208
|
+
interface IUsernamePolicy {
|
|
209
|
+
/** Users can have a username and sign in with it. */
|
|
210
|
+
enabled: boolean;
|
|
211
|
+
/** Every user must have one: it can be changed, never removed. */
|
|
212
|
+
required: boolean;
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* The `code` on an error from `setUsername` and `removeUsername`.
|
|
216
|
+
*
|
|
217
|
+
* `invalid_username` (400), `username_taken` (409), `usernames_off` (400:
|
|
218
|
+
* the app has usernames off), `username_required` (409, on removing: the app
|
|
219
|
+
* requires one).
|
|
220
|
+
*/
|
|
221
|
+
type UsernameErrorCode = 'invalid_username' | 'username_taken' | 'usernames_off' | 'username_required';
|
|
222
|
+
/** What a guest gives to become a real account. */
|
|
223
|
+
interface IGuestUpgradeRequest {
|
|
224
|
+
/** The address the account will have, proven by a code sent to it. */
|
|
225
|
+
email: string;
|
|
226
|
+
/** Their name, in place of `Guest`. */
|
|
227
|
+
name?: string;
|
|
228
|
+
/** A password to sign in with, at least 8 characters. */
|
|
229
|
+
password?: string;
|
|
230
|
+
}
|
|
231
|
+
/** A code went to the address; the guest is still a guest. */
|
|
232
|
+
interface IGuestUpgradeStarted {
|
|
233
|
+
/** Seconds before another code can be sent. */
|
|
234
|
+
retryAfter: number;
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* The `code` on an error from `requestGuestUpgrade` and
|
|
238
|
+
* `confirmGuestUpgrade`: the server's `reason`, passed through unchanged.
|
|
239
|
+
*/
|
|
240
|
+
type GuestUpgradeErrorCode = 'email_unavailable' | 'not_a_guest' | 'signup_restricted' | 'waitlist_required' | 'signup_closed' | 'disposable_email' | 'breached_password' | 'cooldown' | 'recipient_limit' | 'not_sent' | 'invalid_code' | 'code_expired';
|
|
241
|
+
/** A chain a wallet signs in on. */
|
|
242
|
+
type WalletChain = 'ethereum' | 'solana';
|
|
243
|
+
/** The wallets the app takes, on `getConnectedAccounts().wallet`. */
|
|
244
|
+
interface IWalletOptions {
|
|
245
|
+
/** EIP-155 chain ids an Ethereum wallet may sign on. Empty: no Ethereum wallets. */
|
|
246
|
+
ethereumChainIds: number[];
|
|
247
|
+
/** Solana wallets are taken. */
|
|
248
|
+
solana: boolean;
|
|
249
|
+
}
|
|
250
|
+
/** What goes into the message a wallet signs to connect to the account. */
|
|
251
|
+
interface IWalletNonce {
|
|
252
|
+
/** Spent by the first message that names it; lapses after 5 minutes. */
|
|
253
|
+
nonce: string;
|
|
254
|
+
/** The host the message names on its first line. */
|
|
255
|
+
domain: string;
|
|
256
|
+
/** The page the message names as `URI`. */
|
|
257
|
+
uri: string;
|
|
258
|
+
/** When the nonce was issued (ISO 8601), the message's `Issued At`. */
|
|
259
|
+
issuedAt: string;
|
|
260
|
+
/** Ethereum only: the chain ids the app takes. */
|
|
261
|
+
chainIds?: number[];
|
|
262
|
+
}
|
|
263
|
+
/** A signed message that connects a wallet. */
|
|
264
|
+
interface IWalletLinkRequest {
|
|
265
|
+
chain: WalletChain;
|
|
266
|
+
/** The EIP-4361 message (or its Solana sibling), exactly as signed. */
|
|
267
|
+
message: string;
|
|
268
|
+
/** Hex (`0x`, 65 bytes) for Ethereum, base58 (64 bytes) for Solana. */
|
|
269
|
+
signature: string;
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* The `code` on an error from `requestWalletNonce` and `linkWallet`.
|
|
273
|
+
*
|
|
274
|
+
* `nonce_expired` is a 401 that does not end the session: the message was
|
|
275
|
+
* not signed in time, so start again.
|
|
276
|
+
*/
|
|
277
|
+
type WalletErrorCode = 'method_unavailable' | 'chain_not_allowed' | 'invalid_message' | 'invalid_signature' | 'nonce_expired' | 'link_conflict' | 'guest_account';
|
|
278
|
+
/**
|
|
279
|
+
* A social sign-in linked to the signed-in user: one row of
|
|
280
|
+
* `getConnectedAccounts().accounts`.
|
|
281
|
+
*/
|
|
282
|
+
interface IConnectedAccount {
|
|
283
|
+
/** The link's id, for `unlinkAccount`. */
|
|
284
|
+
_id: string;
|
|
285
|
+
/**
|
|
286
|
+
* The provider's catalog id: `google`, `linkedIn`, `github`, `microsoft` or
|
|
287
|
+
* `apple`, `custom:<methodId>` for an app's own OIDC provider, or
|
|
288
|
+
* `ethereum` or `solana` for a wallet.
|
|
289
|
+
*/
|
|
290
|
+
provider: string;
|
|
291
|
+
/** What to call it, from the catalog (a custom provider's own label). */
|
|
292
|
+
label: string;
|
|
293
|
+
/** An absolute URL to the provider's icon on the BuildBase server. */
|
|
294
|
+
icon?: string;
|
|
295
|
+
/** Which one it is, when the label alone does not say: a wallet's short address. */
|
|
296
|
+
detail?: string;
|
|
297
|
+
/** When it was linked. */
|
|
298
|
+
createdAt?: string;
|
|
299
|
+
/**
|
|
300
|
+
* False when removing it would leave the user no way to sign in: the
|
|
301
|
+
* server refuses with `last_sign_in_method`, so the screen says so first.
|
|
302
|
+
*/
|
|
303
|
+
canUnlink: boolean;
|
|
304
|
+
}
|
|
305
|
+
/** A social sign-in the app offers that the user has not linked yet. */
|
|
306
|
+
interface IAvailableAccountProvider {
|
|
307
|
+
/** The provider's catalog id, as on `IConnectedAccount.provider`. */
|
|
308
|
+
provider: string;
|
|
309
|
+
label: string;
|
|
310
|
+
icon?: string;
|
|
311
|
+
/** The sign-in method to pass to `linkAccount`. */
|
|
312
|
+
methodId: string;
|
|
313
|
+
}
|
|
314
|
+
/** The signed-in user's connected accounts, and what else they can connect. */
|
|
315
|
+
interface IConnectedAccounts {
|
|
316
|
+
/** The user's live social links and wallets. */
|
|
317
|
+
accounts: IConnectedAccount[];
|
|
318
|
+
/** The social methods on this app the user has not linked. */
|
|
319
|
+
available: IAvailableAccountProvider[];
|
|
320
|
+
/**
|
|
321
|
+
* The wallets the app takes, while it offers wallet sign-in: connect one
|
|
322
|
+
* with `requestWalletNonce` and `linkWallet`. Absent otherwise.
|
|
323
|
+
*/
|
|
324
|
+
wallet?: IWalletOptions;
|
|
325
|
+
/**
|
|
326
|
+
* How many ways the user can sign in: live links, passkeys, a password they
|
|
327
|
+
* set themselves while the app offers password sign-in, and a verified email
|
|
328
|
+
* while it offers magic links or email codes.
|
|
329
|
+
*/
|
|
330
|
+
signInWays: number;
|
|
331
|
+
/**
|
|
332
|
+
* This session proved who its person is in the last 10 minutes. Removing a
|
|
333
|
+
* connected account needs that; otherwise the server answers
|
|
334
|
+
* `reauth_required`.
|
|
335
|
+
*/
|
|
336
|
+
recentSignIn: boolean;
|
|
337
|
+
}
|
|
338
|
+
/** Where to send the browser to link a provider. */
|
|
339
|
+
interface IAccountLinkStart {
|
|
340
|
+
url: string;
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* The `code` on an error from `getConnectedAccounts`, `linkAccount` and
|
|
344
|
+
* `unlinkAccount`: the server's `reason`, passed through unchanged.
|
|
345
|
+
*
|
|
346
|
+
* `reauth_required` (403) is a refusal, not a dead session: the SDK does not
|
|
347
|
+
* sign the user out for it. Only a 401 does.
|
|
348
|
+
*/
|
|
349
|
+
type ConnectedAccountErrorCode = 'reauth_required' | 'last_sign_in_method' | 'already_linked' | 'method_unavailable';
|
|
350
|
+
/**
|
|
351
|
+
* Why linking failed, as the server says on the way back from the provider:
|
|
352
|
+
* the `reason` query parameter beside `error`.
|
|
353
|
+
*
|
|
354
|
+
* The provider: `provider_error` (cancelled or refused there),
|
|
355
|
+
* `provider_failed` (its answer could not be used), `no_verified_email` (the
|
|
356
|
+
* provider account has no verified address, as GitHub's can). The link:
|
|
357
|
+
* `link_conflict` (that provider account belongs to another user here),
|
|
358
|
+
* `session_ended`. A guest connecting a provider becomes that account, so
|
|
359
|
+
* its address is checked as a sign-up's: `email_unverified`,
|
|
360
|
+
* `email_unavailable`, `disposable_email`, `signup_closed`,
|
|
361
|
+
* `signup_restricted`, `waitlist_required`, and `not_a_guest` when the guest
|
|
362
|
+
* became an account in another tab meanwhile.
|
|
363
|
+
*/
|
|
364
|
+
type AccountLinkErrorReason = 'link_conflict' | 'provider_error' | 'provider_failed' | 'session_ended' | 'no_verified_email' | 'email_unverified' | 'email_unavailable' | 'disposable_email' | 'signup_closed' | 'signup_restricted' | 'waitlist_required' | 'not_a_guest';
|
|
365
|
+
/**
|
|
366
|
+
* Why the signed-in user cannot change their email address.
|
|
367
|
+
*
|
|
368
|
+
* `linked_social_account`: the account signs in with Google or another
|
|
369
|
+
* provider, which finds the account by its email address, so changing it would
|
|
370
|
+
* create a second account at the next such sign-in. Only an older server says
|
|
371
|
+
* so: social sign-in now finds the account by the provider's own ID, and a
|
|
372
|
+
* current server always answers `canChangeEmail: true`.
|
|
373
|
+
*/
|
|
374
|
+
type ChangeEmailBlockedBy = 'linked_social_account';
|
|
375
|
+
/** A code went to the new address; the email has not changed yet. */
|
|
376
|
+
interface IEmailChangeRequest {
|
|
377
|
+
/** Seconds before another code can be sent. */
|
|
378
|
+
retryAfter: number;
|
|
379
|
+
}
|
|
380
|
+
/** The email change went through. */
|
|
381
|
+
interface IEmailChangeResult {
|
|
382
|
+
/** The address the account has now, verified. */
|
|
383
|
+
email: string;
|
|
384
|
+
}
|
|
385
|
+
/**
|
|
386
|
+
* The `code` on an error from `requestEmailChange` and `confirmEmailChange`:
|
|
387
|
+
* the server's `reason`, passed through unchanged.
|
|
388
|
+
*/
|
|
389
|
+
type EmailChangeErrorCode = 'email_unavailable' | 'linked_social_account' | 'guest_account' | 'cooldown' | 'disposable_email' | 'invalid_code' | 'code_expired';
|
|
390
|
+
/** Who has to use two-step sign-in in an app, as its organization set it. */
|
|
391
|
+
type MfaEnforcement = 'off' | 'optional' | 'required';
|
|
392
|
+
/**
|
|
393
|
+
* A second-step method the app allows: an authenticator app (`totp`), or a
|
|
394
|
+
* code sent by text message to the user's verified phone (`sms`). An app never
|
|
395
|
+
* allows `sms` alone.
|
|
396
|
+
*/
|
|
397
|
+
type MfaFactorType = 'totp' | 'sms';
|
|
398
|
+
/** The signed-in user's two-step sign-in, and what the app allows. */
|
|
399
|
+
interface IMfaStatus {
|
|
400
|
+
/** An authenticator app is set up and confirmed. */
|
|
401
|
+
enabled: boolean;
|
|
402
|
+
/**
|
|
403
|
+
* `optional` lets each user choose, `required` asks everyone. `off` asks
|
|
404
|
+
* nobody for a second step and nothing new can be set up, but what a user
|
|
405
|
+
* set up before can still be removed.
|
|
406
|
+
*/
|
|
407
|
+
enforcement: MfaEnforcement;
|
|
408
|
+
allowedFactors: MfaFactorType[];
|
|
409
|
+
/** When the authenticator app was confirmed. Only while `enabled`. */
|
|
410
|
+
confirmedAt?: string;
|
|
411
|
+
/** When a code from it, or a backup code, last passed. Only while `enabled`. */
|
|
412
|
+
lastUsedAt?: string;
|
|
413
|
+
/** Unused backup codes. Only while `enabled`. */
|
|
414
|
+
backupCodesRemaining?: number;
|
|
415
|
+
/** Text messages as a second step. Absent from a server that predates them. */
|
|
416
|
+
sms?: IMfaSmsStatus;
|
|
417
|
+
}
|
|
418
|
+
/**
|
|
419
|
+
* Text messages as a second step, for the signed-in user. Weaker than an
|
|
420
|
+
* authenticator app: a phone number can be moved to someone else's SIM card.
|
|
421
|
+
*/
|
|
422
|
+
interface IMfaSmsStatus {
|
|
423
|
+
/**
|
|
424
|
+
* The user may turn it on: the app's factors include `sms`, an SMS provider
|
|
425
|
+
* is connected, and the app's plan serves phone codes.
|
|
426
|
+
*/
|
|
427
|
+
allowed: boolean;
|
|
428
|
+
/** The user has it on. */
|
|
429
|
+
enrolled: boolean;
|
|
430
|
+
/** The number codes go to, masked (`+1 ••• ••• 0123`). Only while `enrolled`. */
|
|
431
|
+
phone?: string;
|
|
432
|
+
}
|
|
433
|
+
/** How a phone code is delivered. A call that names none gets a text message. */
|
|
434
|
+
type PhoneChannel = 'sms' | 'whatsapp' | 'voice';
|
|
435
|
+
/** A code went to a phone; nothing has changed yet. */
|
|
436
|
+
interface IPhoneCodeSent {
|
|
437
|
+
/** Seconds before another code can be sent. */
|
|
438
|
+
retryAfter: number;
|
|
439
|
+
/**
|
|
440
|
+
* The number the code went to, as the server shows it (masked for the
|
|
441
|
+
* second step). Only when the server says.
|
|
442
|
+
*/
|
|
443
|
+
phone?: string;
|
|
444
|
+
}
|
|
445
|
+
/** The code was right: the number is the account's, verified. */
|
|
446
|
+
interface IPhoneConfirmed {
|
|
447
|
+
/** The number, as E.164. */
|
|
448
|
+
phone: string;
|
|
449
|
+
phoneVerified: true;
|
|
450
|
+
}
|
|
451
|
+
/** Text messages are on as a second step. */
|
|
452
|
+
interface ISmsEnrollmentResult {
|
|
453
|
+
/**
|
|
454
|
+
* Backup codes, when the server issued them with this factor. Shown once,
|
|
455
|
+
* like the authenticator app's.
|
|
456
|
+
*/
|
|
457
|
+
backupCodes?: string[];
|
|
458
|
+
}
|
|
459
|
+
/**
|
|
460
|
+
* The `code` on an error from the phone calls (`addPhone`, `confirmPhone`,
|
|
461
|
+
* `removePhone`) and the text-message factor (`startSmsEnrollment`,
|
|
462
|
+
* `confirmSmsEnrollment`, `disableSms`): the server's `reason`, passed through
|
|
463
|
+
* unchanged.
|
|
464
|
+
*
|
|
465
|
+
* `reauth_required` (403) and `code_expired` (410) are refusals, not a dead
|
|
466
|
+
* session: the SDK does not sign the user out for them. Only a 401 does.
|
|
467
|
+
* `method_unavailable` (400, from `addPhone`): the app does not send codes
|
|
468
|
+
* the way asked for, such as by text message.
|
|
469
|
+
*/
|
|
470
|
+
type PhoneErrorCode = 'invalid_phone' | 'method_unavailable' | 'phone_unavailable' | 'cooldown' | 'rate_limited' | 'number_refused' | 'sms_unavailable' | 'invalid_code' | 'code_expired' | 'reauth_required' | 'last_sign_in_method' | 'mfa_sms_enrolled' | 'phone_required' | 'factor_not_allowed';
|
|
471
|
+
/**
|
|
472
|
+
* A started authenticator-app setup. Pending until `confirmTotpEnrollment`
|
|
473
|
+
* accepts a first code; starting again replaces it.
|
|
474
|
+
*/
|
|
475
|
+
interface ITotpEnrollment {
|
|
476
|
+
/** Base32 secret, for typing into an app that cannot scan. */
|
|
477
|
+
secret: string;
|
|
478
|
+
/** The `otpauth://` URL the QR code encodes. */
|
|
479
|
+
otpauthUrl: string;
|
|
480
|
+
/** The QR code as an SVG document, rendered by the server. Show it as an image, never as markup. */
|
|
481
|
+
qrSvg: string;
|
|
482
|
+
}
|
|
483
|
+
/** Single-use backup codes. The server returns them once and keeps only hashes. */
|
|
484
|
+
interface IMfaBackupCodes {
|
|
485
|
+
backupCodes: string[];
|
|
37
486
|
}
|
|
487
|
+
/**
|
|
488
|
+
* The `code` on an error from the two-step sign-in calls: the server's
|
|
489
|
+
* `reason`, passed through unchanged.
|
|
490
|
+
*/
|
|
491
|
+
type MfaErrorCode = 'mfa-off' | 'already-enrolled' | 'not-enrolling' | 'not-enrolled' | 'invalid-code' | 'required-by-org' | 'locked'
|
|
492
|
+
/** A guest, who creates an account before setting up a second step (409). */
|
|
493
|
+
| 'guest_account';
|
|
38
494
|
/** A registered passkey (WebAuthn credential) — no key material exposed. */
|
|
39
495
|
interface IPasskeySummary {
|
|
40
496
|
id: string;
|
|
@@ -1058,6 +1514,10 @@ interface AuthUser {
|
|
|
1058
1514
|
id: string;
|
|
1059
1515
|
name: string;
|
|
1060
1516
|
org: string;
|
|
1517
|
+
/**
|
|
1518
|
+
* The user's email address. Empty for a guest (`isAnonymous`), whose
|
|
1519
|
+
* placeholder address is never shown or passed on.
|
|
1520
|
+
*/
|
|
1061
1521
|
email: string;
|
|
1062
1522
|
emailVerified: boolean;
|
|
1063
1523
|
clientId: string;
|
|
@@ -1072,10 +1532,69 @@ interface AuthUser {
|
|
|
1072
1532
|
* person twice when they sign up on one device and open the app on another.
|
|
1073
1533
|
*/
|
|
1074
1534
|
firstAuthAt?: string;
|
|
1535
|
+
/**
|
|
1536
|
+
* The user has a second step: a confirmed authenticator app, or text
|
|
1537
|
+
* message codes. From the profile at sign-in; the Security screen keeps it
|
|
1538
|
+
* current when the user turns either on or off there. `false` when the
|
|
1539
|
+
* server predates two-step sign-in.
|
|
1540
|
+
*/
|
|
1541
|
+
mfaEnabled: boolean;
|
|
1542
|
+
/**
|
|
1543
|
+
* The user can change their email address, which the Profile screen offers.
|
|
1544
|
+
* From the profile at sign-in. `false` when the server predates changing
|
|
1545
|
+
* email.
|
|
1546
|
+
*/
|
|
1547
|
+
canChangeEmail: boolean;
|
|
1548
|
+
/** Why `canChangeEmail` is false, when the user should be told. */
|
|
1549
|
+
changeEmailBlockedBy?: ChangeEmailBlockedBy;
|
|
1550
|
+
/**
|
|
1551
|
+
* The user's id in the system they were imported from (`buildbase import`),
|
|
1552
|
+
* from the profile at sign-in. Absent for anyone who was not imported.
|
|
1553
|
+
*/
|
|
1554
|
+
externalId?: string;
|
|
1555
|
+
/**
|
|
1556
|
+
* The user's phone number, as E.164 (`+14155550123`), from the profile at
|
|
1557
|
+
* sign-in. The Security screen keeps it current when the user adds, verifies
|
|
1558
|
+
* or removes it there. Absent when the user has none, and from a server that
|
|
1559
|
+
* predates phone numbers.
|
|
1560
|
+
*/
|
|
1561
|
+
phone?: string;
|
|
1562
|
+
/** The phone was proven with a code sent to it. Present only with `phone`. */
|
|
1563
|
+
phoneVerified?: boolean;
|
|
1564
|
+
/**
|
|
1565
|
+
* The user's username, lower case, while the app has usernames on and they
|
|
1566
|
+
* set one. The Profile screen keeps it current. Absent otherwise.
|
|
1567
|
+
*/
|
|
1568
|
+
username?: string;
|
|
1569
|
+
/**
|
|
1570
|
+
* Custom claims the app owner set for this user, from the profile at
|
|
1571
|
+
* sign-in: `{}` when there are none, and from a server that predates them.
|
|
1572
|
+
* Read-only to the user.
|
|
1573
|
+
*/
|
|
1574
|
+
claims: Record<string, unknown>;
|
|
1575
|
+
/**
|
|
1576
|
+
* A guest, who continued without an account: their `email` is empty, and
|
|
1577
|
+
* they become a real account with `useGuestUpgrade`. `false` for everyone
|
|
1578
|
+
* else.
|
|
1579
|
+
*/
|
|
1580
|
+
isAnonymous: boolean;
|
|
1581
|
+
/**
|
|
1582
|
+
* When the account deletion the user asked for runs (ISO 8601), while one
|
|
1583
|
+
* is scheduled. The Security screen keeps it current, and the settings
|
|
1584
|
+
* dialog shows it at the top of every screen, with Cancel deletion.
|
|
1585
|
+
*/
|
|
1586
|
+
deleteAfter?: string;
|
|
1075
1587
|
}
|
|
1076
1588
|
interface IAuthConfig {
|
|
1077
1589
|
clientId: string;
|
|
1078
1590
|
redirectUrl: string;
|
|
1591
|
+
/**
|
|
1592
|
+
* The language the hosted sign-in page opens in, one of the SDK's eight
|
|
1593
|
+
* (`SUPPORTED_LOCALES`; a regional tag such as `es-MX` is narrowed to
|
|
1594
|
+
* `es`). Defaults to the provider's `locale` when that is set; with
|
|
1595
|
+
* neither, the page goes by the person's own choice and their browser.
|
|
1596
|
+
*/
|
|
1597
|
+
locale?: string;
|
|
1079
1598
|
callbacks?: IAuthCallbacks;
|
|
1080
1599
|
}
|
|
1081
1600
|
interface IAuthCallbacks {
|
|
@@ -1268,6 +1787,16 @@ interface IBaseApiConfig {
|
|
|
1268
1787
|
/** Custom fetch implementation. */
|
|
1269
1788
|
fetch?: typeof globalThis.fetch;
|
|
1270
1789
|
}
|
|
1790
|
+
/** Per-request options that are not part of fetch's own `RequestInit`. */
|
|
1791
|
+
interface IRequestOptions {
|
|
1792
|
+
/**
|
|
1793
|
+
* Leave a 401 to the caller instead of calling `onUnauthorized`, which ends
|
|
1794
|
+
* the session. For a route that answers 401 for a refusal of its own (an
|
|
1795
|
+
* expired code) while the session is fine: the caller reads the body and
|
|
1796
|
+
* calls `notifyUnauthorized()` for any 401 that is not that refusal.
|
|
1797
|
+
*/
|
|
1798
|
+
deferUnauthorized?: boolean;
|
|
1799
|
+
}
|
|
1271
1800
|
/**
|
|
1272
1801
|
* Base class for SDK API clients.
|
|
1273
1802
|
* Provides:
|
|
@@ -1310,6 +1839,12 @@ declare abstract class BaseApi {
|
|
|
1310
1839
|
private reportError;
|
|
1311
1840
|
/** Execute fetch with timeout, retries, debug logging, and error callback. */
|
|
1312
1841
|
private executeFetch;
|
|
1842
|
+
/**
|
|
1843
|
+
* Tell the app the session is dead (`onUnauthorized`). Only for a caller
|
|
1844
|
+
* that set `deferUnauthorized` and found a 401 that is not its route's own
|
|
1845
|
+
* refusal; every other 401 already does this.
|
|
1846
|
+
*/
|
|
1847
|
+
protected notifyUnauthorized(): void;
|
|
1313
1848
|
/** Backoff sleep that ends early (with an AbortError) when the signal fires. */
|
|
1314
1849
|
private static delay;
|
|
1315
1850
|
/** Internal: execute fetch against a resolved URL with timeout, retries, debug logging, and error callback. */
|
|
@@ -1323,7 +1858,7 @@ declare abstract class BaseApi {
|
|
|
1323
1858
|
* Execute request and return raw Response (for custom parsing or error handling).
|
|
1324
1859
|
* Caller is responsible for checking response.ok and parsing body.
|
|
1325
1860
|
*/
|
|
1326
|
-
protected fetchResponse(path: string, init?: RequestInit): Promise<Response>;
|
|
1861
|
+
protected fetchResponse(path: string, init?: RequestInit, options?: IRequestOptions): Promise<Response>;
|
|
1327
1862
|
/**
|
|
1328
1863
|
* Execute request, throw a parsed error on !response.ok, and unwrap the
|
|
1329
1864
|
* `{ success, data }` envelope. Shorthand for the common
|
|
@@ -1446,6 +1981,13 @@ interface AuthRequestParams {
|
|
|
1446
1981
|
* Populated automatically from the parked invitation when there is one.
|
|
1447
1982
|
*/
|
|
1448
1983
|
invitationToken?: string;
|
|
1984
|
+
/**
|
|
1985
|
+
* The language the hosted sign-in page opens in: one of the SDK's eight
|
|
1986
|
+
* (`SUPPORTED_LOCALES`). Without it the page goes by the person's own
|
|
1987
|
+
* choice, then their browser, then the app's default. `signIn` sends the
|
|
1988
|
+
* app's `auth.locale`, else the provider's `locale`, when either is set.
|
|
1989
|
+
*/
|
|
1990
|
+
locale?: string;
|
|
1449
1991
|
}
|
|
1450
1992
|
/**
|
|
1451
1993
|
* Unwrapped payload of a successful auth request.
|
|
@@ -1469,6 +2011,20 @@ declare class AuthApi extends BaseApi {
|
|
|
1469
2011
|
* envelopes with `success: false` both throw a structured Error.
|
|
1470
2012
|
*/
|
|
1471
2013
|
requestAuth(params: AuthRequestParams): Promise<AuthRequestResponse>;
|
|
2014
|
+
/**
|
|
2015
|
+
* Whether the app has usernames on, from its public auth config
|
|
2016
|
+
* (`GET /api/v1/auth/config?org=`). Both false when it has them off, and
|
|
2017
|
+
* from a server that predates usernames.
|
|
2018
|
+
*/
|
|
2019
|
+
getUsernamePolicy(orgId: string, signal?: AbortSignal): Promise<IUsernamePolicy>;
|
|
2020
|
+
/**
|
|
2021
|
+
* Days between a person asking to delete their account and the account
|
|
2022
|
+
* going, from the app's public auth config (`security.accountDeletionGraceDays`).
|
|
2023
|
+
* 0 means at once. Read by the server's own rule: anything that is not a
|
|
2024
|
+
* number, which includes a server that predates account deletion, is the
|
|
2025
|
+
* default of 7, and the rest is held to 0 to 30.
|
|
2026
|
+
*/
|
|
2027
|
+
getAccountDeletionGraceDays(orgId: string, signal?: AbortSignal): Promise<number>;
|
|
1472
2028
|
/** Fetch user profile with the given session ID (used after OAuth redirect or from storage). */
|
|
1473
2029
|
getProfile(sessionId: string, signal?: AbortSignal): Promise<IUser>;
|
|
1474
2030
|
/**
|
|
@@ -2101,9 +2657,286 @@ declare class WorkspaceApi extends BaseApi {
|
|
|
2101
2657
|
getWorkspace(workspaceId: string, signal?: AbortSignal): Promise<IWorkspace>;
|
|
2102
2658
|
getProfile(signal?: AbortSignal): Promise<IUser>;
|
|
2103
2659
|
updateUserProfile(config: Partial<IUser>, signal?: AbortSignal): Promise<IUser>;
|
|
2660
|
+
/**
|
|
2661
|
+
* Change the signed-in user's password.
|
|
2662
|
+
*
|
|
2663
|
+
* A wrong `currentPassword` counts toward the account's sign-in lockout (10
|
|
2664
|
+
* failures in 15 minutes), after which the server answers 429 (`locked`)
|
|
2665
|
+
* until the window passes or the password is reset. A wrong one, or a new
|
|
2666
|
+
* one found in a known data breach, is 400 (`invalid`). On success every
|
|
2667
|
+
* other session for the user ends and this one stays.
|
|
2668
|
+
*
|
|
2669
|
+
* An account made by social sign-up, a wallet, or a code or link has no
|
|
2670
|
+
* password the person knows (the profile's `passwordSet` is false). The
|
|
2671
|
+
* server refuses it with 409 `password_not_set`, without counting toward
|
|
2672
|
+
* the lockout; the person sets one with Forgot password? on the sign-in
|
|
2673
|
+
* page. The error carries the server's sentence and `code`
|
|
2674
|
+
* (`PasswordChangeErrorCode`).
|
|
2675
|
+
*/
|
|
2676
|
+
changePassword(currentPassword: string, newPassword: string, signal?: AbortSignal): Promise<void>;
|
|
2677
|
+
/**
|
|
2678
|
+
* Run a call whose refusals are `{ success: false, message, reason?,
|
|
2679
|
+
* retryAfter? }`: two-step sign-in, changing email, connected accounts,
|
|
2680
|
+
* the phone, re-confirming, deleting the account, the username, a guest's
|
|
2681
|
+
* upgrade, wallets and passkeys. The error keeps the server's sentence as its message
|
|
2682
|
+
* and carries `status`, the reason as `code` (an `MfaErrorCode`, an
|
|
2683
|
+
* `EmailChangeErrorCode`, a `ConnectedAccountErrorCode`, a
|
|
2684
|
+
* `PhoneErrorCode`, a `SessionRefusalCode` and the rest), on a cooldown
|
|
2685
|
+
* `retryAfter` in seconds, on `reauth_required` `maxAgeSeconds` and the
|
|
2686
|
+
* `factors` it asks for, and on `owns_workspaces` the `workspaces`, so a
|
|
2687
|
+
* screen can act on the refusal without parsing the sentence.
|
|
2688
|
+
*
|
|
2689
|
+
* `reasons401` lists the reasons this route answers with a 401 while the
|
|
2690
|
+
* session is fine (an expired code). A 401 carrying one of them is only a
|
|
2691
|
+
* refusal; any other 401 still ends the session, as it does everywhere.
|
|
2692
|
+
*/
|
|
2693
|
+
private fetchWithReason;
|
|
2694
|
+
/** A code as typed or pasted: authenticator apps often show `123 456`. */
|
|
2695
|
+
private static compactCode;
|
|
2696
|
+
/**
|
|
2697
|
+
* Send a 6-digit code to `newEmail`. Nothing changes until
|
|
2698
|
+
* `confirmEmailChange` accepts the code. Resolves with `retryAfter`, the
|
|
2699
|
+
* seconds before another code can be sent.
|
|
2700
|
+
*
|
|
2701
|
+
* Refused with `email_unavailable` (409) for an address this app cannot
|
|
2702
|
+
* use, whether it is taken or invalid, `cooldown` (429, carrying
|
|
2703
|
+
* `retryAfter`) inside the resend window, `disposable_email` (400) when the
|
|
2704
|
+
* app blocks disposable addresses, and `guest_account` (409) for a guest,
|
|
2705
|
+
* who creates an account instead.
|
|
2706
|
+
*/
|
|
2707
|
+
requestEmailChange(newEmail: string, signal?: AbortSignal): Promise<IEmailChangeRequest>;
|
|
2708
|
+
/**
|
|
2709
|
+
* Change the email to the address the code went to. Spaces in the code are
|
|
2710
|
+
* dropped. Resolves with the new address, which is verified; the old one is
|
|
2711
|
+
* mailed a notice, and every session stays signed in.
|
|
2712
|
+
*
|
|
2713
|
+
* Refused with `invalid_code` (400), and `code_expired` (410) when no code is
|
|
2714
|
+
* pending, it lapsed, or it used its tries, so the user asks for a new one.
|
|
2715
|
+
* A 401 that names `code_expired` (from a server before the status moved to
|
|
2716
|
+
* 410) is read the same way and does not sign the user out; any other 401
|
|
2717
|
+
* on this route still means the session is over.
|
|
2718
|
+
*/
|
|
2719
|
+
confirmEmailChange(code: string, signal?: AbortSignal): Promise<IEmailChangeResult>;
|
|
2720
|
+
/**
|
|
2721
|
+
* Send a code to `phone` (E.164), the number the user wants on their
|
|
2722
|
+
* account. Nothing changes until `confirmPhone` accepts the code. Resolves
|
|
2723
|
+
* with `retryAfter`, the seconds before another code can be sent. `channel`
|
|
2724
|
+
* asks for WhatsApp or a voice call where the app offers them; without it
|
|
2725
|
+
* the code is a text message.
|
|
2726
|
+
*
|
|
2727
|
+
* Refused with `invalid_phone` (400), `method_unavailable` (400) when the
|
|
2728
|
+
* app does not send codes that way, `phone_unavailable` (409) for a number
|
|
2729
|
+
* on another account, `cooldown` (429, carrying `retryAfter`) and
|
|
2730
|
+
* `rate_limited` (429), `number_refused` (422) when the provider will not
|
|
2731
|
+
* send to it, and `sms_unavailable` (503) when codes cannot be sent.
|
|
2732
|
+
*/
|
|
2733
|
+
addPhone(phone: string, channel?: PhoneChannel, signal?: AbortSignal): Promise<IPhoneCodeSent>;
|
|
2734
|
+
/**
|
|
2735
|
+
* Make the number the code went to the account's, verified. Spaces in the
|
|
2736
|
+
* code are dropped. Resolves with the number.
|
|
2737
|
+
*
|
|
2738
|
+
* Refused with `invalid_code` (400), and `code_expired` (410) when no code
|
|
2739
|
+
* is pending, it lapsed or it used its tries, so the user asks for a new one.
|
|
2740
|
+
*/
|
|
2741
|
+
confirmPhone(code: string, signal?: AbortSignal): Promise<IPhoneConfirmed>;
|
|
2742
|
+
/**
|
|
2743
|
+
* Take the phone number off the account.
|
|
2744
|
+
*
|
|
2745
|
+
* Refused with `reauth_required` (403) when this session started more than
|
|
2746
|
+
* 10 minutes ago, so the user signs in again first; this does not sign them
|
|
2747
|
+
* out. `last_sign_in_method` (409) when it is the only way they can sign in,
|
|
2748
|
+
* and `mfa_sms_enrolled` (409) while text-message codes for two-step sign-in
|
|
2749
|
+
* go to it.
|
|
2750
|
+
*/
|
|
2751
|
+
removePhone(signal?: AbortSignal): Promise<void>;
|
|
2752
|
+
/** The signed-in user's two-step sign-in, and what the app allows. */
|
|
2753
|
+
getMfaStatus(signal?: AbortSignal): Promise<IMfaStatus>;
|
|
2754
|
+
/**
|
|
2755
|
+
* Start adding an authenticator app: a fresh secret, its `otpauth://` URL
|
|
2756
|
+
* and a QR code the server rendered as SVG. Nothing is on until
|
|
2757
|
+
* `confirmTotpEnrollment` accepts a first code, and starting again replaces
|
|
2758
|
+
* a pending setup.
|
|
2759
|
+
*
|
|
2760
|
+
* Refused with `mfa-off` (403) when the app has two-step sign-in turned off,
|
|
2761
|
+
* and `already-enrolled` (409) when an authenticator app is already set up.
|
|
2762
|
+
*/
|
|
2763
|
+
startTotpEnrollment(signal?: AbortSignal): Promise<ITotpEnrollment>;
|
|
2764
|
+
/**
|
|
2765
|
+
* Confirm the pending authenticator app with the 6-digit code it shows,
|
|
2766
|
+
* which turns two-step sign-in on. Spaces in the code are dropped. Resolves
|
|
2767
|
+
* with the backup codes, which the server returns this once and never again.
|
|
2768
|
+
*
|
|
2769
|
+
* Refused with `invalid-code` (400), and `not-enrolling` (409) when no setup
|
|
2770
|
+
* is pending, so the user starts again.
|
|
2771
|
+
*/
|
|
2772
|
+
confirmTotpEnrollment(code: string, signal?: AbortSignal): Promise<IMfaBackupCodes>;
|
|
2773
|
+
/**
|
|
2774
|
+
* Turn two-step sign-in off by removing the authenticator app. Needs a
|
|
2775
|
+
* current 6-digit code or an unused backup code; a wrong one counts toward
|
|
2776
|
+
* the account's lockout. Every device that remembered the second step
|
|
2777
|
+
* forgets it.
|
|
2778
|
+
*
|
|
2779
|
+
* Refused with `required-by-org` (403) while the app requires two-step
|
|
2780
|
+
* sign-in, `invalid-code` (400), `not-enrolled` (404), and `locked` (429)
|
|
2781
|
+
* after too many wrong codes.
|
|
2782
|
+
*/
|
|
2783
|
+
disableTotp(code: string, signal?: AbortSignal): Promise<void>;
|
|
2784
|
+
/**
|
|
2785
|
+
* Replace the backup codes. Needs a current code or an unused backup code,
|
|
2786
|
+
* with the same refusals as `disableTotp` apart from `required-by-org`. The
|
|
2787
|
+
* old codes stop working; the new ones are returned this once.
|
|
2788
|
+
*/
|
|
2789
|
+
regenerateBackupCodes(code: string, signal?: AbortSignal): Promise<IMfaBackupCodes>;
|
|
2790
|
+
/**
|
|
2791
|
+
* Send a code to the account's verified phone to turn text-message codes
|
|
2792
|
+
* on. Resolves with `retryAfter`, and the masked number when the server
|
|
2793
|
+
* says which.
|
|
2794
|
+
*
|
|
2795
|
+
* Refused with `phone_required` (409) when the account has no verified
|
|
2796
|
+
* phone, so the user adds one first; `factor_not_allowed` (403) when the app
|
|
2797
|
+
* does not allow it; and the sending refusals of `addPhone` (`cooldown`,
|
|
2798
|
+
* `rate_limited`, `number_refused`, `sms_unavailable`).
|
|
2799
|
+
*/
|
|
2800
|
+
startSmsEnrollment(signal?: AbortSignal): Promise<IPhoneCodeSent>;
|
|
2801
|
+
/**
|
|
2802
|
+
* Turn text-message codes on with the code `startSmsEnrollment` sent. Spaces
|
|
2803
|
+
* in the code are dropped. Resolves with backup codes when the server issued
|
|
2804
|
+
* them, which it returns this once.
|
|
2805
|
+
*
|
|
2806
|
+
* Refused with `invalid_code` (400) and `code_expired` (410).
|
|
2807
|
+
*/
|
|
2808
|
+
confirmSmsEnrollment(code: string, signal?: AbortSignal): Promise<ISmsEnrollmentResult>;
|
|
2809
|
+
/**
|
|
2810
|
+
* Turn text-message codes off.
|
|
2811
|
+
*
|
|
2812
|
+
* Refused with `reauth_required` (403) when this session started more than
|
|
2813
|
+
* 10 minutes ago, so the user signs in again first; this does not sign them
|
|
2814
|
+
* out.
|
|
2815
|
+
*/
|
|
2816
|
+
disableSms(signal?: AbortSignal): Promise<void>;
|
|
2104
2817
|
getPasskeys(signal?: AbortSignal): Promise<IPasskeySummary[]>;
|
|
2105
2818
|
renamePasskey(passkeyId: string, name: string, signal?: AbortSignal): Promise<void>;
|
|
2106
2819
|
deletePasskey(passkeyId: string, signal?: AbortSignal): Promise<void>;
|
|
2820
|
+
/**
|
|
2821
|
+
* The user's linked social sign-ins (`accounts`), the ones the app offers
|
|
2822
|
+
* that they have not linked (`available`), how many ways they can sign in,
|
|
2823
|
+
* and whether this session is recent enough to remove one.
|
|
2824
|
+
*/
|
|
2825
|
+
getConnectedAccounts(signal?: AbortSignal): Promise<IConnectedAccounts>;
|
|
2826
|
+
/**
|
|
2827
|
+
* Start linking a provider: resolves with the `url` to send the browser to.
|
|
2828
|
+
* The person signs in there and comes back to `redirect`, which must be on
|
|
2829
|
+
* an origin the app registered for sign-in, with `?linked=<provider>` on
|
|
2830
|
+
* success, or `?error=...&reason=...` (an `AccountLinkErrorReason`) when it
|
|
2831
|
+
* failed.
|
|
2832
|
+
*
|
|
2833
|
+
* Refused with `method_unavailable` (404) when `methodId` is not a social
|
|
2834
|
+
* sign-in on this app, `already_linked` (409) when the user already has
|
|
2835
|
+
* that provider, and 400 for a missing or unregistered `redirect`. A POST,
|
|
2836
|
+
* so it is never retried.
|
|
2837
|
+
*/
|
|
2838
|
+
linkAccount(methodId: string, redirect: string, signal?: AbortSignal): Promise<IAccountLinkStart>;
|
|
2839
|
+
/**
|
|
2840
|
+
* Remove one linked sign-in, by its `_id` from `getConnectedAccounts`.
|
|
2841
|
+
*
|
|
2842
|
+
* Refused with `reauth_required` (403) when this session started more than
|
|
2843
|
+
* 10 minutes ago, so the user signs in again first; this does not sign
|
|
2844
|
+
* them out. `last_sign_in_method` (409) when it is the only way they can
|
|
2845
|
+
* sign in (`canUnlink` is false), and 404 when the link is not theirs.
|
|
2846
|
+
*/
|
|
2847
|
+
unlinkAccount(accountId: string, signal?: AbortSignal): Promise<void>;
|
|
2848
|
+
/**
|
|
2849
|
+
* A nonce for the message that connects a wallet on `chain`, with the
|
|
2850
|
+
* domain, URI and time the message must carry (`buildWalletMessage` lays it
|
|
2851
|
+
* out). The wallet signs it and `linkWallet` sends it, within 5 minutes.
|
|
2852
|
+
*
|
|
2853
|
+
* Refused with `method_unavailable` (403) when the app offers no wallet
|
|
2854
|
+
* sign-in, and `chain_not_allowed` (400) for a kind of wallet it does not
|
|
2855
|
+
* take.
|
|
2856
|
+
*/
|
|
2857
|
+
requestWalletNonce(chain: WalletChain, signal?: AbortSignal): Promise<IWalletNonce>;
|
|
2858
|
+
/**
|
|
2859
|
+
* Connect the wallet that signed `message` (exactly as signed) with
|
|
2860
|
+
* `signature`: hex for Ethereum, base58 for Solana. Resolves with its row
|
|
2861
|
+
* in the connected accounts, the short address as `detail`; read the list
|
|
2862
|
+
* again for whether it can be removed.
|
|
2863
|
+
*
|
|
2864
|
+
* Refused with `link_conflict` (409) when the wallet is on another account,
|
|
2865
|
+
* `invalid_signature` (400), `invalid_message` (400) for a message this page
|
|
2866
|
+
* did not make, `chain_not_allowed` (400), `guest_account` (409) for a guest,
|
|
2867
|
+
* who creates an account first, and `nonce_expired` (401) when the nonce
|
|
2868
|
+
* lapsed or was spent. That 401 is a refusal, not a dead session: it does
|
|
2869
|
+
* not sign the user out, and connecting starts again.
|
|
2870
|
+
*/
|
|
2871
|
+
linkWallet(input: IWalletLinkRequest, signal?: AbortSignal): Promise<IConnectedAccount>;
|
|
2872
|
+
/**
|
|
2873
|
+
* Start re-confirming who the user is. Resolves with the hosted sign-in
|
|
2874
|
+
* page to send the browser to; signing in there as the same person brings
|
|
2875
|
+
* it back to `returnUrl` with `?reverified=1`. `factors: ['mfa']` asks for
|
|
2876
|
+
* the second step too, for someone who has one. `returnUrl` must be one of
|
|
2877
|
+
* the auth client's redirect URLs. `requireReverification` on
|
|
2878
|
+
* `useSaaSAuth()` does all of this, coming back to the page it was on.
|
|
2879
|
+
*
|
|
2880
|
+
* Refused with `reverify_unavailable` (400) for a session nobody signed in
|
|
2881
|
+
* to, one an owner holds as the user, or a guest's, and
|
|
2882
|
+
* `invalid_return_url` (400).
|
|
2883
|
+
*/
|
|
2884
|
+
startReverification(options: {
|
|
2885
|
+
returnUrl: string;
|
|
2886
|
+
factors?: ReverifyFactor[];
|
|
2887
|
+
}, signal?: AbortSignal): Promise<IReverificationStart>;
|
|
2888
|
+
/**
|
|
2889
|
+
* Ask for the account to be deleted. After the app's grace period it is,
|
|
2890
|
+
* with its personal data; until then `cancelAccountDeletion` takes it back,
|
|
2891
|
+
* and the profile carries `deleteAfter`. Every other session ends now and
|
|
2892
|
+
* this one stays. An app with no grace period deletes at once: `deleted` is
|
|
2893
|
+
* true and this session has ended too.
|
|
2894
|
+
*
|
|
2895
|
+
* Refused with `reauth_required` (403, carrying `maxAgeSeconds`) unless the
|
|
2896
|
+
* user signed in recently, and `owns_workspaces` (409, carrying
|
|
2897
|
+
* `workspaces`) while they created a workspace that has other members or a
|
|
2898
|
+
* subscription. A POST, never retried.
|
|
2899
|
+
*/
|
|
2900
|
+
requestAccountDeletion(signal?: AbortSignal): Promise<IAccountDeletion>;
|
|
2901
|
+
/**
|
|
2902
|
+
* Take back a scheduled deletion. `cancelled` is false when none was
|
|
2903
|
+
* scheduled, which is not a refusal.
|
|
2904
|
+
*/
|
|
2905
|
+
cancelAccountDeletion(signal?: AbortSignal): Promise<{
|
|
2906
|
+
cancelled: boolean;
|
|
2907
|
+
}>;
|
|
2908
|
+
/**
|
|
2909
|
+
* Set or change the username, while the app has usernames on. The server
|
|
2910
|
+
* stores it lower case; `isValidUsername` checks the same rules first.
|
|
2911
|
+
*
|
|
2912
|
+
* Refused with `invalid_username` (400), `username_taken` (409) and
|
|
2913
|
+
* `usernames_off` (400).
|
|
2914
|
+
*/
|
|
2915
|
+
setUsername(username: string, signal?: AbortSignal): Promise<{
|
|
2916
|
+
username: string;
|
|
2917
|
+
}>;
|
|
2918
|
+
/** Remove the username. Refused with `username_required` (409) while the app requires one. */
|
|
2919
|
+
removeUsername(signal?: AbortSignal): Promise<void>;
|
|
2920
|
+
/**
|
|
2921
|
+
* Check the address (and the password, when one is given) and mail a code
|
|
2922
|
+
* to it. Nothing changes until `confirmGuestUpgrade` accepts the code.
|
|
2923
|
+
* Resolves with `retryAfter`, the seconds before another code can be sent.
|
|
2924
|
+
*
|
|
2925
|
+
* Refused with `email_unavailable` (409), `not_a_guest` (409),
|
|
2926
|
+
* `signup_restricted`, `waitlist_required` or `signup_closed` (403),
|
|
2927
|
+
* `disposable_email` and `breached_password` (400), and `cooldown` (429,
|
|
2928
|
+
* carrying `retryAfter`). A POST, never retried.
|
|
2929
|
+
*/
|
|
2930
|
+
requestGuestUpgrade(input: IGuestUpgradeRequest, signal?: AbortSignal): Promise<IGuestUpgradeStarted>;
|
|
2931
|
+
/**
|
|
2932
|
+
* Become a real account with the code `requestGuestUpgrade` mailed. Spaces
|
|
2933
|
+
* in the code are dropped. Resolves with the profile: the same user id, the
|
|
2934
|
+
* address verified, `isAnonymous` false.
|
|
2935
|
+
*
|
|
2936
|
+
* Refused with `invalid_code` (400), and `code_expired` (410) when no code
|
|
2937
|
+
* is pending, it lapsed or it used its tries.
|
|
2938
|
+
*/
|
|
2939
|
+
confirmGuestUpgrade(code: string, signal?: AbortSignal): Promise<IUser>;
|
|
2107
2940
|
/**
|
|
2108
2941
|
* Get current subscription for a workspace
|
|
2109
2942
|
* Returns subscription details including plan, plan version, and group information
|
|
@@ -2542,6 +3375,7 @@ declare const BBScreen: {
|
|
|
2542
3375
|
readonly Usage: "usage";
|
|
2543
3376
|
readonly Users: "users";
|
|
2544
3377
|
readonly Profile: "profile";
|
|
3378
|
+
readonly Security: "security";
|
|
2545
3379
|
readonly General: "general";
|
|
2546
3380
|
readonly Features: "features";
|
|
2547
3381
|
readonly Notifications: "notifications";
|
|
@@ -3098,6 +3932,10 @@ interface SDKMessages {
|
|
|
3098
3932
|
connectedAgentsGranted: string;
|
|
3099
3933
|
connectedAgentsLoadFailed: string;
|
|
3100
3934
|
connectedAgentsRevokeFailed: string;
|
|
3935
|
+
connectedAgentsConfirmTitle: string;
|
|
3936
|
+
connectedAgentsConfirmBody: string;
|
|
3937
|
+
connectedAgentsCancel: string;
|
|
3938
|
+
connectedAgentsDisconnected: string;
|
|
3101
3939
|
mcpConnectAction: string;
|
|
3102
3940
|
mcpGuideTitle: string;
|
|
3103
3941
|
mcpGuideDescription: string;
|
|
@@ -3127,6 +3965,147 @@ interface SDKMessages {
|
|
|
3127
3965
|
renamePlaceholder: string;
|
|
3128
3966
|
lastUsed: string;
|
|
3129
3967
|
added: string;
|
|
3968
|
+
passwordTitle: string;
|
|
3969
|
+
passwordDescription: string;
|
|
3970
|
+
currentPassword: string;
|
|
3971
|
+
newPassword: string;
|
|
3972
|
+
passwordRequired: string;
|
|
3973
|
+
passwordMinLength: string;
|
|
3974
|
+
changePassword: string;
|
|
3975
|
+
passwordChanged: string;
|
|
3976
|
+
passwordSocialHint: string;
|
|
3977
|
+
passwordNone: string;
|
|
3978
|
+
passwordNoneHint: string;
|
|
3979
|
+
twoStepTitle: string;
|
|
3980
|
+
twoStepDescription: string;
|
|
3981
|
+
twoStepSetUp: string;
|
|
3982
|
+
twoStepRequiredSetup: string;
|
|
3983
|
+
twoStepScan: string;
|
|
3984
|
+
twoStepQrAlt: string;
|
|
3985
|
+
twoStepManualKey: string;
|
|
3986
|
+
twoStepCodeLabel: string;
|
|
3987
|
+
twoStepCodeInvalid: string;
|
|
3988
|
+
twoStepTurnOn: string;
|
|
3989
|
+
twoStepEnabled: string;
|
|
3990
|
+
twoStepBackupTitle: string;
|
|
3991
|
+
twoStepBackupDescription: string;
|
|
3992
|
+
twoStepCopy: string;
|
|
3993
|
+
twoStepCopied: string;
|
|
3994
|
+
twoStepDone: string;
|
|
3995
|
+
twoStepAppName: string;
|
|
3996
|
+
twoStepBackupLeft: string;
|
|
3997
|
+
twoStepNewCodes: string;
|
|
3998
|
+
twoStepTurnOff: string;
|
|
3999
|
+
twoStepRequiredNote: string;
|
|
4000
|
+
twoStepCurrentCodeLabel: string;
|
|
4001
|
+
twoStepCurrentCodeRequired: string;
|
|
4002
|
+
twoStepTurnOffHint: string;
|
|
4003
|
+
twoStepNewCodesHint: string;
|
|
4004
|
+
twoStepDisabled: string;
|
|
4005
|
+
twoStepCodesRegenerated: string;
|
|
4006
|
+
twoStepOffDescription: string;
|
|
4007
|
+
twoStepRemoveHint: string;
|
|
4008
|
+
twoStepRemoved: string;
|
|
4009
|
+
connectedAccountsTitle: string;
|
|
4010
|
+
connectedAccountsDescription: string;
|
|
4011
|
+
connectedAccountsEmpty: string;
|
|
4012
|
+
connectedAccountsAvailable: string;
|
|
4013
|
+
connectedAccountsConnect: string;
|
|
4014
|
+
connectedAccountsLastWay: string;
|
|
4015
|
+
connectedAccountsRemoveTitle: string;
|
|
4016
|
+
connectedAccountsRemoveDescription: string;
|
|
4017
|
+
connectedAccountsRemoved: string;
|
|
4018
|
+
connectedAccountsLinked: string;
|
|
4019
|
+
connectedAccountsLinkedGeneric: string;
|
|
4020
|
+
connectedAccountsReauth: string;
|
|
4021
|
+
connectedAccountsSignInAgain: string;
|
|
4022
|
+
connectedAccountsLinkConflict: string;
|
|
4023
|
+
connectedAccountsProviderError: string;
|
|
4024
|
+
connectedAccountsProviderFailed: string;
|
|
4025
|
+
connectedAccountsSessionEnded: string;
|
|
4026
|
+
connectedAccountsNoVerifiedEmail: string;
|
|
4027
|
+
connectedAccountsEmailUnverified: string;
|
|
4028
|
+
connectedAccountsEmailUnavailable: string;
|
|
4029
|
+
connectedAccountsDisposableEmail: string;
|
|
4030
|
+
connectedAccountsSignupClosed: string;
|
|
4031
|
+
connectedAccountsSignupRestricted: string;
|
|
4032
|
+
connectedAccountsWaitlistRequired: string;
|
|
4033
|
+
connectedAccountsNotAGuest: string;
|
|
4034
|
+
twoStepGuest: string;
|
|
4035
|
+
phoneTitle: string;
|
|
4036
|
+
phoneDescription: string;
|
|
4037
|
+
phoneEmpty: string;
|
|
4038
|
+
phoneAdd: string;
|
|
4039
|
+
phoneChange: string;
|
|
4040
|
+
phoneCountryLabel: string;
|
|
4041
|
+
phoneNumberHint: string;
|
|
4042
|
+
phoneNumberInvalid: string;
|
|
4043
|
+
phoneSendCode: string;
|
|
4044
|
+
phoneSentTo: string;
|
|
4045
|
+
phoneCodeLabel: string;
|
|
4046
|
+
phoneCodeInvalid: string;
|
|
4047
|
+
phoneResend: string;
|
|
4048
|
+
phoneResendIn: string;
|
|
4049
|
+
phoneWait: string;
|
|
4050
|
+
phoneResent: string;
|
|
4051
|
+
phoneVerify: string;
|
|
4052
|
+
phoneVerified: string;
|
|
4053
|
+
phoneNotVerified: string;
|
|
4054
|
+
phoneSaved: string;
|
|
4055
|
+
phoneRemoveTitle: string;
|
|
4056
|
+
phoneRemoveDescription: string;
|
|
4057
|
+
phoneRemoved: string;
|
|
4058
|
+
phoneReauth: string;
|
|
4059
|
+
phoneLastWay: string;
|
|
4060
|
+
phoneUsedForTwoStep: string;
|
|
4061
|
+
phoneSmsUnavailable: string;
|
|
4062
|
+
phoneCheckUnavailable: string;
|
|
4063
|
+
phoneTextUnavailable: string;
|
|
4064
|
+
twoStepSmsName: string;
|
|
4065
|
+
twoStepSmsWeaker: string;
|
|
4066
|
+
twoStepSmsTo: string;
|
|
4067
|
+
twoStepSmsNeedsPhone: string;
|
|
4068
|
+
twoStepSmsGoToPhone: string;
|
|
4069
|
+
twoStepSmsSentGeneric: string;
|
|
4070
|
+
twoStepSmsEnabled: string;
|
|
4071
|
+
twoStepSmsDisabled: string;
|
|
4072
|
+
twoStepSmsTurnOffTitle: string;
|
|
4073
|
+
twoStepSmsTurnOffDescription: string;
|
|
4074
|
+
twoStepSmsReauth: string;
|
|
4075
|
+
reauthConfirm: string;
|
|
4076
|
+
reauthConfirmed: string;
|
|
4077
|
+
/** Confirm it's you, pressed while an app owner is signed in as the person. */
|
|
4078
|
+
reauthImpersonating: string;
|
|
4079
|
+
deleteAccountTitle: string;
|
|
4080
|
+
deleteAccountDescription: string;
|
|
4081
|
+
deleteAccountWarning: string;
|
|
4082
|
+
deleteAccountWarningNow: string;
|
|
4083
|
+
deleteAccountWarningDays: string;
|
|
4084
|
+
deleteAccountTypeLabel: string;
|
|
4085
|
+
deleteAccountWord: string;
|
|
4086
|
+
deleteAccountConfirm: string;
|
|
4087
|
+
deleteAccountScheduled: string;
|
|
4088
|
+
/** The notice at the top of every settings screen while a deletion is scheduled. */
|
|
4089
|
+
deleteAccountNotice: string;
|
|
4090
|
+
deleteAccountCancel: string;
|
|
4091
|
+
deleteAccountCancelled: string;
|
|
4092
|
+
deleteAccountReauth: string;
|
|
4093
|
+
deleteAccountOwnsWorkspaces: string;
|
|
4094
|
+
impersonationReadOnly: string;
|
|
4095
|
+
impersonationFull: string;
|
|
4096
|
+
/** Under the full-access line: sign-in changes stay locked in such a session. */
|
|
4097
|
+
impersonationSignInLocked: string;
|
|
4098
|
+
impersonationExit: string;
|
|
4099
|
+
impersonationRegion: string;
|
|
4100
|
+
walletConnectEthereum: string;
|
|
4101
|
+
walletConnectSolana: string;
|
|
4102
|
+
walletNotFound: string;
|
|
4103
|
+
walletRejected: string;
|
|
4104
|
+
walletBusy: string;
|
|
4105
|
+
walletWrongNetwork: string;
|
|
4106
|
+
walletNoAccount: string;
|
|
4107
|
+
walletFailed: string;
|
|
4108
|
+
walletHint: string;
|
|
3130
4109
|
devicesTitle: string;
|
|
3131
4110
|
devicesDescription: string;
|
|
3132
4111
|
devicesEmpty: string;
|
|
@@ -3534,6 +4513,31 @@ interface SDKMessages {
|
|
|
3534
4513
|
nameMinLength: string;
|
|
3535
4514
|
save: string;
|
|
3536
4515
|
reset: string;
|
|
4516
|
+
changeEmail: string;
|
|
4517
|
+
changeEmailNewLabel: string;
|
|
4518
|
+
changeEmailNewHint: string;
|
|
4519
|
+
changeEmailInvalid: string;
|
|
4520
|
+
changeEmailSame: string;
|
|
4521
|
+
changeEmailSend: string;
|
|
4522
|
+
changeEmailSentTo: string;
|
|
4523
|
+
changeEmailCodeLabel: string;
|
|
4524
|
+
changeEmailCodeInvalid: string;
|
|
4525
|
+
changeEmailConfirm: string;
|
|
4526
|
+
changeEmailResend: string;
|
|
4527
|
+
changeEmailResendIn: string;
|
|
4528
|
+
changeEmailResent: string;
|
|
4529
|
+
changeEmailChanged: string;
|
|
4530
|
+
changeEmailBlockedSocial: string;
|
|
4531
|
+
username: string;
|
|
4532
|
+
usernameHint: string;
|
|
4533
|
+
usernameInvalid: string;
|
|
4534
|
+
usernameSave: string;
|
|
4535
|
+
usernameRemove: string;
|
|
4536
|
+
usernameSaved: string;
|
|
4537
|
+
usernameRemoved: string;
|
|
4538
|
+
usernameRequiredNote: string;
|
|
4539
|
+
/** The profile could not be read; the screen offers Retry. */
|
|
4540
|
+
loadFailed: string;
|
|
3537
4541
|
};
|
|
3538
4542
|
general: {
|
|
3539
4543
|
ownerOnly: string;
|
|
@@ -3830,6 +4834,25 @@ interface SDKMessages {
|
|
|
3830
4834
|
insufficientCredits: string;
|
|
3831
4835
|
insufficientDetail: string;
|
|
3832
4836
|
};
|
|
4837
|
+
guest: {
|
|
4838
|
+
title: string;
|
|
4839
|
+
description: string;
|
|
4840
|
+
emailLabel: string;
|
|
4841
|
+
nameLabel: string;
|
|
4842
|
+
passwordLabel: string;
|
|
4843
|
+
passwordHint: string;
|
|
4844
|
+
emailInvalid: string;
|
|
4845
|
+
passwordMinLength: string;
|
|
4846
|
+
send: string;
|
|
4847
|
+
sentTo: string;
|
|
4848
|
+
codeLabel: string;
|
|
4849
|
+
codeInvalid: string;
|
|
4850
|
+
resend: string;
|
|
4851
|
+
resendIn: string;
|
|
4852
|
+
resent: string;
|
|
4853
|
+
confirm: string;
|
|
4854
|
+
done: string;
|
|
4855
|
+
};
|
|
3833
4856
|
loading: {
|
|
3834
4857
|
restoringSession: string;
|
|
3835
4858
|
redirecting: string;
|
|
@@ -3839,6 +4862,8 @@ interface SDKMessages {
|
|
|
3839
4862
|
};
|
|
3840
4863
|
errors: {
|
|
3841
4864
|
networkError: string;
|
|
4865
|
+
/** No answer from the server: offline, or a proxy or gateway failed. */
|
|
4866
|
+
unreachable: string;
|
|
3842
4867
|
unauthorized: string;
|
|
3843
4868
|
notFound: string;
|
|
3844
4869
|
generic: string;
|
|
@@ -3866,6 +4891,60 @@ interface SDKMessages {
|
|
|
3866
4891
|
fetchExpiringCredits: string;
|
|
3867
4892
|
fetchWorkspaces: string;
|
|
3868
4893
|
};
|
|
4894
|
+
/**
|
|
4895
|
+
* Plain-language help the settings screens open from a "?" button
|
|
4896
|
+
* (`FieldHelp`): what a thing is, what it does, and what happens next.
|
|
4897
|
+
*/
|
|
4898
|
+
help: {
|
|
4899
|
+
/** The "?" button's name, `{label}` the thing it explains. */
|
|
4900
|
+
button: string;
|
|
4901
|
+
/** A help link's name, `{link}` its words. */
|
|
4902
|
+
linkNewTab: string;
|
|
4903
|
+
twoStep: string;
|
|
4904
|
+
twoStepApp: string;
|
|
4905
|
+
twoStepSms: string;
|
|
4906
|
+
twoStepLostPhone: string;
|
|
4907
|
+
/** Shown under the setup key: it is a secret. */
|
|
4908
|
+
twoStepKeyPrivate: string;
|
|
4909
|
+
backupCodesLabel: string;
|
|
4910
|
+
backupCodes: string;
|
|
4911
|
+
backupCodesKeep: string;
|
|
4912
|
+
backupCodesNew: string;
|
|
4913
|
+
passkeys: string;
|
|
4914
|
+
passkeysWhere: string;
|
|
4915
|
+
passkeysRemove: string;
|
|
4916
|
+
/** `{label}`: the "This device" badge. */
|
|
4917
|
+
devicesThis: string;
|
|
4918
|
+
/** `{label}`: the "Trusted" badge. */
|
|
4919
|
+
devicesTrusted: string;
|
|
4920
|
+
/** `{label}`: the device's Sign out button. */
|
|
4921
|
+
devicesSignOut: string;
|
|
4922
|
+
/** `{label}`: the device's Remove button. */
|
|
4923
|
+
devicesRemove: string;
|
|
4924
|
+
sessionsWhat: string;
|
|
4925
|
+
/** `{label}`: the "This one" badge. */
|
|
4926
|
+
sessionsThis: string;
|
|
4927
|
+
/** `{label}`: the session's Sign out button. */
|
|
4928
|
+
sessionsSignOut: string;
|
|
4929
|
+
sessionsEverywhere: string;
|
|
4930
|
+
connectedAccounts: string;
|
|
4931
|
+
connectedAccountsRemove: string;
|
|
4932
|
+
connectedAccountsLastWay: string;
|
|
4933
|
+
phone: string;
|
|
4934
|
+
phoneCheck: string;
|
|
4935
|
+
reauth: string;
|
|
4936
|
+
reauthHow: string;
|
|
4937
|
+
email: string;
|
|
4938
|
+
emailChange: string;
|
|
4939
|
+
password: string;
|
|
4940
|
+
passwordLeaks: string;
|
|
4941
|
+
passwordForgot: string;
|
|
4942
|
+
/** `{days}`: the app's grace period; `{cancel}`: the Cancel deletion button. */
|
|
4943
|
+
deleteAccountDays: string;
|
|
4944
|
+
deleteAccountNow: string;
|
|
4945
|
+
/** `{cancel}`: the Cancel deletion button. */
|
|
4946
|
+
deleteAccountRange: string;
|
|
4947
|
+
};
|
|
3869
4948
|
}
|
|
3870
4949
|
/**
|
|
3871
4950
|
* Generates a union of all valid dot-separated key paths from SDKMessages.
|
|
@@ -3895,6 +4974,216 @@ type Level4 = {
|
|
|
3895
4974
|
/** Union of all valid translation key paths (e.g. "settings.titles.profile") */
|
|
3896
4975
|
type TranslationKey = Level2 | Level3 | Level4;
|
|
3897
4976
|
|
|
4977
|
+
/**
|
|
4978
|
+
* Re-confirm before sensitive actions,
|
|
4979
|
+
* kept apart from React so every step is testable without a DOM.
|
|
4980
|
+
*
|
|
4981
|
+
* A change that needs a recent sign-in answers 403 `reauth_required`. The
|
|
4982
|
+
* person confirms it is still them on the hosted sign-in page, which brings
|
|
4983
|
+
* the browser back with `?reverified=1` and the same session, now recent: no
|
|
4984
|
+
* new session and no code to exchange.
|
|
4985
|
+
*
|
|
4986
|
+
* The server takes a return URL only when it is one of the auth client's
|
|
4987
|
+
* redirect URLs, matched exactly (or by a wildcard the owner registered). The
|
|
4988
|
+
* page a person is on rarely is, so this asks for the page first and, when
|
|
4989
|
+
* the server refuses it with `invalid_return_url`, comes back through the
|
|
4990
|
+
* app's registered `auth.redirectUrl` instead, with the page parked as the
|
|
4991
|
+
* auth intent: the provider continues to it after the hop, as it does after
|
|
4992
|
+
* signing in.
|
|
4993
|
+
*/
|
|
4994
|
+
|
|
4995
|
+
/** What `requireReverification` takes. */
|
|
4996
|
+
interface RequireReverificationOptions {
|
|
4997
|
+
/**
|
|
4998
|
+
* Where to come back to afterwards. Defaults to the page the person is on.
|
|
4999
|
+
* It must be on this app's origin.
|
|
5000
|
+
*/
|
|
5001
|
+
returnUrl?: string;
|
|
5002
|
+
/** Ask for the second step too (`['mfa']`), for someone who has one. */
|
|
5003
|
+
factors?: ReverifyFactor[];
|
|
5004
|
+
/**
|
|
5005
|
+
* Go ahead without leaving the page when this session proved who its
|
|
5006
|
+
* person is within this many seconds (and with `factors`, when asked).
|
|
5007
|
+
* Without it the person is always sent to confirm.
|
|
5008
|
+
*/
|
|
5009
|
+
maxAgeSeconds?: number;
|
|
5010
|
+
}
|
|
5011
|
+
/**
|
|
5012
|
+
* `recent`: the session is recent enough, so go ahead now. `redirecting`: the
|
|
5013
|
+
* browser is on its way to the hosted page and the promise's caller should
|
|
5014
|
+
* do nothing more; the page comes back to `returnUrl`.
|
|
5015
|
+
*/
|
|
5016
|
+
type ReverificationOutcome = 'recent' | 'redirecting';
|
|
5017
|
+
/** An error the server answered with `reauth_required`, as the SDK throws it. */
|
|
5018
|
+
interface ReauthRequiredError extends Error {
|
|
5019
|
+
status: 403;
|
|
5020
|
+
code: 'reauth_required';
|
|
5021
|
+
/** How recent a sign-in the change needs, in seconds. */
|
|
5022
|
+
maxAgeSeconds?: number;
|
|
5023
|
+
/** What the confirmation must include beyond signing in. */
|
|
5024
|
+
factors?: ReverifyFactor[];
|
|
5025
|
+
}
|
|
5026
|
+
/**
|
|
5027
|
+
* Whether an error from an SDK call is the server asking for a recent
|
|
5028
|
+
* sign-in. It is never a reason to sign out: re-confirm with
|
|
5029
|
+
* `requireReverification({ factors: error.factors })` and try again.
|
|
5030
|
+
*/
|
|
5031
|
+
declare function isReauthRequired(error: unknown): error is ReauthRequiredError;
|
|
5032
|
+
/**
|
|
5033
|
+
* Whether an error is the server refusing a change because an app owner is
|
|
5034
|
+
* viewing as the user, read-only. Its message says so; show it.
|
|
5035
|
+
*/
|
|
5036
|
+
declare function isReadOnlySession(error: unknown): boolean;
|
|
5037
|
+
/**
|
|
5038
|
+
* Whether an error is the server refusing a sign-in change (email, phone,
|
|
5039
|
+
* username, password, second step, passkeys, linked accounts, guest upgrade)
|
|
5040
|
+
* because an app owner is signed in as the user from the console, with full
|
|
5041
|
+
* access or read-only. Such a change would outlive the session, so it stays
|
|
5042
|
+
* the user's. Its message says so; show it. Never a reason to sign out or to
|
|
5043
|
+
* ask the user to confirm it's them.
|
|
5044
|
+
*/
|
|
5045
|
+
declare function isImpersonationSignInLocked(error: unknown): boolean;
|
|
5046
|
+
|
|
5047
|
+
/**
|
|
5048
|
+
* A typed username as the server stores it (trimmed, lower case), or null
|
|
5049
|
+
* when it is not one: the wrong length or characters, two dots in a row, or
|
|
5050
|
+
* reserved.
|
|
5051
|
+
*/
|
|
5052
|
+
declare function normaliseUsername(input: unknown): string | null;
|
|
5053
|
+
/** Whether `input` is a username the server would take, before asking it. */
|
|
5054
|
+
declare function isValidUsername(input: unknown): boolean;
|
|
5055
|
+
|
|
5056
|
+
/**
|
|
5057
|
+
* Connecting a crypto wallet to the signed-in account, dependency-free and testable without a browser: the
|
|
5058
|
+
* wallets are passed in, so a test hands over a fake.
|
|
5059
|
+
*
|
|
5060
|
+
* Injected wallets only: an EIP-1193 provider (`window.ethereum`) for
|
|
5061
|
+
* Ethereum and a Phantom-style `window.solana` for Solana. The wallet signs a
|
|
5062
|
+
* Sign-In with Ethereum message (EIP-4361), or its Solana sibling, built from
|
|
5063
|
+
* the nonce, domain, URI and time the server gave; the server checks all of
|
|
5064
|
+
* them, and the signature, before the wallet becomes a way in.
|
|
5065
|
+
*/
|
|
5066
|
+
|
|
5067
|
+
/**
|
|
5068
|
+
* EIP-55: the address with its checksum casing, or null if it is not an
|
|
5069
|
+
* address. The server checksums the address in the message itself, so this
|
|
5070
|
+
* is for the message to read as wallets expect, not for the server.
|
|
5071
|
+
*/
|
|
5072
|
+
declare function toChecksumAddress(address: unknown): string | null;
|
|
5073
|
+
/**
|
|
5074
|
+
* What the wallet is asked to agree to, as the message's statement line.
|
|
5075
|
+
* English on purpose: EIP-4361 allows only ASCII letters, digits, spaces and
|
|
5076
|
+
* a few marks there, so it cannot carry a translation.
|
|
5077
|
+
*/
|
|
5078
|
+
declare const WALLET_LINK_STATEMENT = "Connect this wallet to your account.";
|
|
5079
|
+
/** What goes into the message, besides what the nonce answer gave. */
|
|
5080
|
+
interface WalletMessageInput {
|
|
5081
|
+
chain: WalletChain;
|
|
5082
|
+
/** From the nonce answer: the host the message is for. */
|
|
5083
|
+
domain: string;
|
|
5084
|
+
/** EIP-55 for Ethereum, base58 for Solana. */
|
|
5085
|
+
address: string;
|
|
5086
|
+
/** One line, ASCII. Defaults to `WALLET_LINK_STATEMENT`. */
|
|
5087
|
+
statement?: string;
|
|
5088
|
+
/** From the nonce answer. */
|
|
5089
|
+
uri: string;
|
|
5090
|
+
/** The EIP-155 chain id for Ethereum, the cluster (`mainnet`) for Solana. */
|
|
5091
|
+
chainId: number | string;
|
|
5092
|
+
/** From the nonce answer. */
|
|
5093
|
+
nonce: string;
|
|
5094
|
+
/** From the nonce answer. */
|
|
5095
|
+
issuedAt: string;
|
|
5096
|
+
}
|
|
5097
|
+
/**
|
|
5098
|
+
* The EIP-4361 message (or its Solana sibling, which only says "Solana
|
|
5099
|
+
* account" on the first line), laid out exactly as the server reads it:
|
|
5100
|
+
*
|
|
5101
|
+
* ```
|
|
5102
|
+
* {domain} wants you to sign in with your Ethereum account:
|
|
5103
|
+
* {address}
|
|
5104
|
+
*
|
|
5105
|
+
* {statement}
|
|
5106
|
+
*
|
|
5107
|
+
* URI: {uri}
|
|
5108
|
+
* Version: 1
|
|
5109
|
+
* Chain ID: {chainId}
|
|
5110
|
+
* Nonce: {nonce}
|
|
5111
|
+
* Issued At: {issuedAt}
|
|
5112
|
+
* ```
|
|
5113
|
+
*
|
|
5114
|
+
* The statement is always there: without one the standard's two blank lines
|
|
5115
|
+
* read as an empty statement to some parsers. A line break in any field would
|
|
5116
|
+
* make it a different message, so one is refused.
|
|
5117
|
+
*/
|
|
5118
|
+
declare function buildWalletMessage(input: WalletMessageInput): string;
|
|
5119
|
+
/** An EIP-1193 provider, as wallets inject it at `window.ethereum`. */
|
|
5120
|
+
interface Eip1193Provider {
|
|
5121
|
+
request(args: {
|
|
5122
|
+
method: string;
|
|
5123
|
+
params?: unknown[] | Record<string, unknown>;
|
|
5124
|
+
}): Promise<unknown>;
|
|
5125
|
+
}
|
|
5126
|
+
/** A Solana wallet as Phantom (and wallets copying it) inject it at `window.solana`. */
|
|
5127
|
+
interface InjectedSolanaWallet {
|
|
5128
|
+
publicKey?: {
|
|
5129
|
+
toString(): string;
|
|
5130
|
+
} | null;
|
|
5131
|
+
connect(): Promise<{
|
|
5132
|
+
publicKey?: {
|
|
5133
|
+
toString(): string;
|
|
5134
|
+
} | null;
|
|
5135
|
+
} | void>;
|
|
5136
|
+
signMessage(message: Uint8Array, display?: 'utf8' | 'hex'): Promise<{
|
|
5137
|
+
signature: Uint8Array;
|
|
5138
|
+
} | Uint8Array>;
|
|
5139
|
+
}
|
|
5140
|
+
/**
|
|
5141
|
+
* Why connecting stopped on this side, before or instead of the server
|
|
5142
|
+
* answering. `no_wallet`: nothing injected for that chain. `rejected`: the
|
|
5143
|
+
* person said no in their wallet. `wallet_busy`: the wallet is already asking
|
|
5144
|
+
* them something. `wrong_network`: the wallet is on a chain the app does not
|
|
5145
|
+
* take and would not switch. `no_account`: the wallet gave no usable address.
|
|
5146
|
+
* `wallet_failed`: anything else the wallet did.
|
|
5147
|
+
*/
|
|
5148
|
+
type WalletFlowErrorCode = 'no_wallet' | 'rejected' | 'wallet_busy' | 'wrong_network' | 'no_account' | 'wallet_failed';
|
|
5149
|
+
declare class WalletFlowError extends Error {
|
|
5150
|
+
readonly code: WalletFlowErrorCode;
|
|
5151
|
+
constructor(code: WalletFlowErrorCode, message: string);
|
|
5152
|
+
}
|
|
5153
|
+
/** The calls on `WorkspaceApi` that connecting a wallet makes. */
|
|
5154
|
+
interface WalletLinkApi {
|
|
5155
|
+
requestWalletNonce(chain: WalletChain): Promise<IWalletNonce>;
|
|
5156
|
+
linkWallet(input: IWalletLinkRequest): Promise<IConnectedAccount>;
|
|
5157
|
+
}
|
|
5158
|
+
/** What connecting a wallet needs. */
|
|
5159
|
+
interface ConnectWalletOptions {
|
|
5160
|
+
api: WalletLinkApi;
|
|
5161
|
+
/** The Ethereum wallet; defaults to the one the browser injected. */
|
|
5162
|
+
ethereum?: Eip1193Provider | null;
|
|
5163
|
+
/** The Solana wallet; defaults to the one the browser injected. */
|
|
5164
|
+
solana?: InjectedSolanaWallet | null;
|
|
5165
|
+
/**
|
|
5166
|
+
* The chain ids the app takes, from `getConnectedAccounts().wallet`, for a
|
|
5167
|
+
* nonce answer that does not list them.
|
|
5168
|
+
*/
|
|
5169
|
+
ethereumChainIds?: number[];
|
|
5170
|
+
/** The message's statement line. Defaults to `WALLET_LINK_STATEMENT`. */
|
|
5171
|
+
statement?: string;
|
|
5172
|
+
}
|
|
5173
|
+
/**
|
|
5174
|
+
* Connect a wallet on `chain` to the signed-in account: ask the wallet for
|
|
5175
|
+
* its address, get a nonce, build the message from the nonce answer, have
|
|
5176
|
+
* the wallet sign it (moving an Ethereum wallet to a network the app takes
|
|
5177
|
+
* first, if it is on another), and send it. Resolves with the new row of
|
|
5178
|
+
* connected accounts.
|
|
5179
|
+
*
|
|
5180
|
+
* Throws a `WalletFlowError` when the wallet stops it (none injected, the
|
|
5181
|
+
* person said no, a network the app does not take), and the server's refusal
|
|
5182
|
+
* otherwise (`link_conflict`, `invalid_signature`, `nonce_expired` and the
|
|
5183
|
+
* rest of `WalletErrorCode`).
|
|
5184
|
+
*/
|
|
5185
|
+
declare function connectWallet(chain: WalletChain, options: ConnectWalletOptions): Promise<IConnectedAccount>;
|
|
5186
|
+
|
|
3898
5187
|
/**
|
|
3899
5188
|
* The error an invitation call throws. A plain `Error` (so every existing
|
|
3900
5189
|
* `catch (err) { err.message }` keeps working) carrying the server's fields
|
|
@@ -3989,10 +5278,17 @@ declare function clearPendingInvite(): void;
|
|
|
3989
5278
|
/**
|
|
3990
5279
|
* The platform's webhook event catalog, vendored.
|
|
3991
5280
|
*
|
|
3992
|
-
* Source:
|
|
3993
|
-
*
|
|
3994
|
-
*
|
|
3995
|
-
*
|
|
5281
|
+
* Source: the platform's system event catalog (SYSTEM_EVENTS), grouped as its
|
|
5282
|
+
* EVENT_CATEGORIES does. Copied on 2026-10-13 (118 names), then the three
|
|
5283
|
+
* import and connected-account events (user.imported, user.account_linked,
|
|
5284
|
+
* user.account_unlinked): 121 names. Then the four for phone numbers
|
|
5285
|
+
* (user.phone_added, user.phone_verified, user.phone_removed and
|
|
5286
|
+
* auth.sms_budget_exceeded): 125 names. Then the three for deleting an
|
|
5287
|
+
* account (user.deletion_scheduled, user.deletion_cancelled and
|
|
5288
|
+
* user.deleted), on 2026-10-14: 128 names. Then email.complained,
|
|
5289
|
+
* from the platform's main on 2026-10-17: 129 names.
|
|
5290
|
+
* Refresh it when the platform's catalog changes -
|
|
5291
|
+
* the server emits exactly these names in the
|
|
3996
5292
|
* `x-buildbase-event` header and the body's `event` field, and a handler that
|
|
3997
5293
|
* switches on a name not in this list never runs.
|
|
3998
5294
|
*
|
|
@@ -4002,7 +5298,8 @@ declare function clearPendingInvite(): void;
|
|
|
4002
5298
|
*/
|
|
4003
5299
|
/** Event names by domain, in the order the platform documents them. */
|
|
4004
5300
|
declare const WEBHOOK_EVENTS_BY_CATEGORY: {
|
|
4005
|
-
readonly User: readonly ["user.registered", "user.logged_in", "user.new_device_login", "user.email_verified", "user.password_changed", "user.password_reset_requested", "user.profile_updated", "user.tag_added", "user.tag_removed", "user.blocked", "user.unblocked"];
|
|
5301
|
+
readonly User: readonly ["user.registered", "user.logged_in", "user.new_device_login", "user.email_verified", "user.password_changed", "user.password_reset_requested", "user.profile_updated", "user.tag_added", "user.tag_removed", "user.blocked", "user.unblocked", "user.mfa_enrolled", "user.mfa_disabled", "user.mfa_reset_by_admin", "user.email_changed", "user.imported", "user.account_linked", "user.account_unlinked", "user.phone_added", "user.phone_verified", "user.phone_removed", "user.deletion_scheduled", "user.deletion_cancelled", "user.deleted"];
|
|
5302
|
+
readonly Auth: readonly ["auth.login_failed", "auth.signup_challenged", "auth.sms_budget_exceeded", "auth.method_deleted", "auth.domain_added", "auth.domain_verified", "auth.domain_deleted", "auth.client_self_registered"];
|
|
4006
5303
|
readonly Organization: readonly ["organization.member_invited", "organization.member_accepted", "organization.member_role_changed", "organization.member_removed", "organization.public_write_limit_reached", "organization.end_user_ceiling_reached"];
|
|
4007
5304
|
readonly Workspace: readonly ["workspace.created", "workspace.updated", "workspace.deleted", "workspace.settings_updated", "workspace.features_updated", "workspace.member_added", "workspace.member_removed", "workspace.member_role_changed", "workspace.member_invited", "workspace.invitation_accepted", "workspace.invitation_declined", "workspace.invitation_revoked", "workspace.invitation_expired"];
|
|
4008
5305
|
readonly Subscription: readonly ["subscription.created", "subscription.updated", "subscription.upgraded", "subscription.canceled", "subscription.cancel_scheduled", "subscription.resumed", "subscription.suspended", "subscription.trial_started", "subscription.trial_will_end", "subscription.trial_expired", "subscription.downgraded"];
|
|
@@ -4011,9 +5308,8 @@ declare const WEBHOOK_EVENTS_BY_CATEGORY: {
|
|
|
4011
5308
|
readonly Credit: readonly ["credit.purchased", "credit.consumed", "credit.expired", "credit.granted", "credit.revoked", "credit.low_balance"];
|
|
4012
5309
|
readonly Workflow: readonly ["workflow.created", "workflow.deleted", "workflow.published", "workflow.paused", "workflow.resumed", "workflow.instance_completed", "workflow.instance_failed"];
|
|
4013
5310
|
readonly Audience: readonly ["audience.member_created", "audience.member_updated", "audience.added_to_list", "audience.removed_from_list", "audience.attribute_changed", "audience.tag_added", "audience.tag_removed", "audience.unsubscribed", "audience.resubscribed", "audience.email_invalidated", "audience.blocked", "audience.unblocked", "audience.import_completed", "audience.list_created", "audience.list_updated", "audience.list_deleted"];
|
|
4014
|
-
readonly Email: readonly ["email.domain_added", "email.domain_verified", "email.sent", "email.opened", "email.clicked", "email.bounced", "email.unsubscribed", "email.campaign_sent"];
|
|
5311
|
+
readonly Email: readonly ["email.domain_added", "email.domain_verified", "email.sent", "email.opened", "email.clicked", "email.bounced", "email.complained", "email.unsubscribed", "email.campaign_sent"];
|
|
4015
5312
|
readonly Push: readonly ["push.campaign_sent"];
|
|
4016
|
-
readonly Auth: readonly ["auth.method_deleted", "auth.domain_added", "auth.domain_verified", "auth.domain_deleted", "auth.client_self_registered"];
|
|
4017
5313
|
readonly Token: readonly ["token.created", "token.updated", "token.revoked"];
|
|
4018
5314
|
readonly 'Group version': readonly ["group_version.published"];
|
|
4019
5315
|
readonly Form: readonly ["form.submitted"];
|
|
@@ -4030,6 +5326,40 @@ declare const WEBHOOK_EVENTS: readonly WebhookEventName[];
|
|
|
4030
5326
|
type WebhookEventName = (typeof WEBHOOK_EVENTS_BY_CATEGORY)[keyof typeof WEBHOOK_EVENTS_BY_CATEGORY][number];
|
|
4031
5327
|
/** True when `name` is an event the platform sends. Use it to narrow a parsed event's `event` field. */
|
|
4032
5328
|
declare function isWebhookEvent(name: string): name is WebhookEventName;
|
|
5329
|
+
/**
|
|
5330
|
+
* `data` of a `user.registered` delivery: someone created an account. Other
|
|
5331
|
+
* fields the platform adds are kept, so read them as unknown.
|
|
5332
|
+
*/
|
|
5333
|
+
interface UserRegisteredWebhookData {
|
|
5334
|
+
/** The new user's id. */
|
|
5335
|
+
actorId: string;
|
|
5336
|
+
email?: string;
|
|
5337
|
+
name?: string;
|
|
5338
|
+
/**
|
|
5339
|
+
* A guest became this account, keeping their id and data, rather than
|
|
5340
|
+
* someone signing up from nothing.
|
|
5341
|
+
*/
|
|
5342
|
+
fromGuest?: boolean;
|
|
5343
|
+
[field: string]: unknown;
|
|
5344
|
+
}
|
|
5345
|
+
/** Who deleted an account: the person, an admin from the console, or the idle-guest sweep. */
|
|
5346
|
+
type UserDeletedBy = 'self' | 'admin' | 'guest_expired';
|
|
5347
|
+
/**
|
|
5348
|
+
* `data` of `user.deletion_scheduled`, `user.deletion_cancelled` and
|
|
5349
|
+
* `user.deleted`. A deleted account's personal data is gone, so the old
|
|
5350
|
+
* address is never carried; match on `userId`.
|
|
5351
|
+
*/
|
|
5352
|
+
interface UserDeletionWebhookData {
|
|
5353
|
+
/** Who did it: the user, or the admin for a deletion from the console. */
|
|
5354
|
+
actorId?: string;
|
|
5355
|
+
/** The account. */
|
|
5356
|
+
userId: string;
|
|
5357
|
+
/** `user.deleted` only: who deleted it. */
|
|
5358
|
+
by?: UserDeletedBy;
|
|
5359
|
+
/** `user.deletion_scheduled` only: when the deletion runs (ISO 8601). */
|
|
5360
|
+
deleteAfter?: string;
|
|
5361
|
+
[field: string]: unknown;
|
|
5362
|
+
}
|
|
4033
5363
|
|
|
4034
5364
|
/**
|
|
4035
5365
|
* Verify that a webhook request came from BuildBase.
|
|
@@ -4772,14 +6102,23 @@ interface AppTokenRequestClaims {
|
|
|
4772
6102
|
blocked?: boolean;
|
|
4773
6103
|
blockedReason?: string;
|
|
4774
6104
|
blockedAt?: string;
|
|
4775
|
-
/**
|
|
4776
|
-
|
|
6105
|
+
/**
|
|
6106
|
+
* Which grant triggered this mint. `device_code` is a CLI or TV that signed
|
|
6107
|
+
* in with a code the person entered on another device (RFC 8628).
|
|
6108
|
+
*/
|
|
6109
|
+
grantType?: 'authorization_code' | 'refresh_token' | 'device_code';
|
|
4777
6110
|
/** Scopes granted at authorization time. */
|
|
4778
6111
|
scope?: string[];
|
|
4779
6112
|
/** RFC 8707 resource indicator(s) — bind the minted token's `aud` to these. */
|
|
4780
6113
|
resource?: string[];
|
|
4781
6114
|
/** The OAuth2 client's display title. */
|
|
4782
6115
|
clientTitle?: string;
|
|
6116
|
+
/**
|
|
6117
|
+
* Custom claims the app owner set for this user (console or API token),
|
|
6118
|
+
* `{}` when there are none. Namespaced here, so a custom claim can never
|
|
6119
|
+
* shadow a standard one. Absent from a server that predates them.
|
|
6120
|
+
*/
|
|
6121
|
+
claims?: Record<string, unknown>;
|
|
4783
6122
|
/**
|
|
4784
6123
|
* Per-user BuildBase session bound to this grant. Embed it ENCRYPTED in the
|
|
4785
6124
|
* token you mint (JWTs are signed, not encrypted) and never store it — your
|
|
@@ -5585,5 +6924,5 @@ declare function clearResolvedServerUrl(options: {
|
|
|
5585
6924
|
cache?: ResolveCacheStore;
|
|
5586
6925
|
}): Promise<void>;
|
|
5587
6926
|
|
|
5588
|
-
export { AI_BOT_USER_AGENTS, APP_PERMISSION_FALLBACK_GROUP, ApiVersion, AppBridgeError, AuthApi, AuthStatus, BBAction, BBScreen, BBStatus, BB_PARAM, BaseApi, BetaForm, BillingIntervals, BuildBase, CURRENCY_DISPLAY, CURRENCY_FLAG, CreditBucketSource, CreditBucketStatus, CreditTransactionType, DEFAULT_ROLE_PERMISSIONS, DISCOVERY_CACHE_TIMEOUT_MS, DunningState, EventEmitter, FALLBACK_WORKSPACE_ROLE, INVITATION_ERROR_CODE, InvoiceStatuses, NotificationsApi, PLAN_CURRENCY_CODES, PLAN_CURRENCY_OPTIONS, PUSH_SERVICE_WORKER_SCRIPT, Permission, PushApi, SDKEvent, SettingsApi, SubscriptionItemType, SubscriptionStatus, UPLOAD_ACCEPT, UPLOAD_MAX_BYTES, UploadsApi, UserApi, WEBHOOK_EVENTS, WEBHOOK_EVENTS_BY_CATEGORY, WorkspaceApi, actionableInvitations, appPermissionCatalogue, appTokenFailure, appTokenSuccess, bearerChallenge, buildA2AAgentCard, buildAgentCard, buildAgentSkillsIndex, buildApiCatalog, buildAuthMd, buildDiscoveryLinkHeader, buildDnsAidRecords, buildLlmsFullTxt, buildLlmsTxt, buildMcpDiscoveryManifest, buildMcpServerCard, buildProtectedResourceMetadata, buildRobotsTxt, buildSecurityTxt, buildSitemap, buildSkillMd, buildWebBotAuthDirectory, buildbaseAuth, calculateBillableSeats, calculateSeatOverageCents, calculateTotalSubscriptionCents, cleanBBParams, clearAgentReadinessCache, clearAuthIntent, clearPendingInvite, clearResolvedServerUrl, consumeAuthIntent, createBBUrl, createCheckoutRedirectUrls, createCreditPurchaseRedirectUrls, createSessionRefCrypto, BuildBase as default, eventEmitter, extractBearerToken, fetchAgentReadiness, formatCents, formatMinorAmountIntl, formatOverageRate, formatOverageRateWithLabel, formatQuotaIncludedOverage, formatQuotaWithPrice, formatUploadLimit, getAvailableBillingIntervals, getAvailableCurrenciesFromPlans, getBasePriceCents, getBillingIntervalAndCurrencyFromPriceId, getCurrencyDecimals, getCurrencyFlag, getCurrencySymbol, getDisplayCurrency, getPerSeatPriceCents, getPricingVariant, getQuotaDisplayValue, getQuotaDisplayWithVariant, getQuotaOverageCents, getQuotaUnitLabelFromName, getSeatPricing, getStripePriceIdForInterval, handleAppRevokeRequest, handleAppTokenRequest, hasPermission, invalidateCreditBalance, invalidateQuotaUsage, invalidateSubscription, inviterNameOf, isInvitationActionable, isInvitationError, isInvitationLapsed, isWebhookEvent, isZeroDecimalCurrency, minorAmountToDisplay, mintAgentToken, negotiateMarkdown, parkPendingInvite, parseWebhookEvent, pickDefaultRole, preflightUpload, provideWebMcpTools, readBBParams, readPendingInvite, resendCooldownSeconds, resolveAgentPath, resolveMaxUsers, resolvePermissions, resolveRolePermissions, resolveServerUrl, resolveWellKnown, safeRedirect, saveAuthIntent, sha256Digest, signClientJwt, sortInvitations, uploadFailureOf, uploadPolicyOf, validateInvite, validateRedirectUrl, verifyAppRevokeRequest, verifyAppTokenRequest, verifyClientJwt, verifyWebhookSignature, wantsMarkdown, workspaceIdOf, workspaceNameOf };
|
|
5589
|
-
export type { A2ACardConfig, A2ACardSkill, AgentReadinessBundle, AgentReadyConfig, AgentSkill, ApiCatalogApi, AppRevokeRequestClaims, AppScope, AppTokenRequestClaims, AppTokenResponseBody, AppTokenResult, BBActionType, BBScreenType, BBStatusType, BetaFormData, BetaFormResponse, BillingInterval, BuildBaseAuthOptions, BuildBaseConfig, BuildBaseResult, BuildBaseSession, CheckoutResult, ContentSignals, CreditActions, CreditBucketSourceType, CreditBucketStatusType, CreditTransactionTypeValue, DiscoveryCacheStore, DiscoveryDocument, DnsAidRecord, DunningStateType, EventData, EventType, FeatureActions, FormatQuotaWithPriceOptions, GetCheckoutStripeParams, HandlerResult, IAllQuotaUsageResponse, IBaseApiConfig, IBasePricing, IBetaConfig, ICheckoutSessionRequest, ICheckoutSessionResponse, ICheckoutStripeOptions, IConsumeCreditsRequest, IConsumeCreditsResponse, ICreditBalance, ICreditBucket, ICreditBucketsQuery, ICreditBucketsResponse, ICreditPackage, ICreditPackagePricingVariant, ICreditPurchaseRequest, ICreditPurchaseResponse, ICreditTransaction, ICreditTransactionsQuery, ICreditTransactionsResponse, IEventCallbacks, IExpiringCreditsResponse, IInvoice, IInvoiceListResponse, IInvoiceResponse, INotificationItem, IOsConfig, IOsState, IPlan, IPlanGroup, IPlanGroupInfo, IPlanGroupLatestVersion, IPlanGroupResponse, IPlanGroupVersion, IPlanGroupVersionWithPlans, IPlanGroupVersionsResponse, IPlanVersion, IPlanVersionSummary, IPlanVersionWithPlan, IPricingVariant, IPublicCreditPackage, IPublicCreditPackagesResponse, IPublicPlanItem, IPublicPlanItemCategory, IPublicPlanVersion, IPublicPlansResponse, IQuotaByInterval, IQuotaIntervalValue, IQuotaOveragePriceIdsByInterval, IQuotaOveragesByInterval, IQuotaUsageStatus, IQuotaUsageStatusResponse, IRecordUsageRequest, IRecordUsageResponse, ISettings, IStripePricesByInterval, ISubscription, ISubscriptionItem, ISubscriptionResponse, ISubscriptionUpdateRequest, ISubscriptionUpdateResponse, IUploadedFile, IUsageLogEntry, IUsageLogsQuery, IUsageLogsResponse, IUser, IWorkspace, IWorkspaceInvitation, IWorkspaceInvitationPreview, IWorkspaceInvitationStatus, InvitationActions, InvitationError, InvitationErrorCode, InvitationErrorFields, InviteBlockReason, InviteValidation, InvoiceActions, InvoiceStatus, InvoiceStatusType, MaxUsersConfig, McpServerCard, MintAgentTokenOptions, MyNotificationPreferences, NotificationChannelPreference, NotificationCounts, NotificationData, NotificationEvent, NotificationListParams, NotificationPage, NotificationResult, NotificationScope, OnWorkspaceChangeParams, PermissionActions, PermissionContext, PermissionKey, PlanActions, PlanVersionWithPricingVariants, QuotaDisplayValue, QuotaDisplayWithOverage, RedirectValidationOptions, Region, RegionAnswer, ResolveCacheStore, ResolveServerUrlOptions, RobotsConfig, RobotsPolicy, RolePermissionMap, ScopedActions, SessionRefCrypto, SettingsActions, SitemapUrl, SubscriptionActions, SubscriptionItemTypeValue, SubscriptionStatusType, TranslationKey, UploadFailure, UploadOptions, UploadPolicy, UploadPurpose, UsageActions, UserActions, UserCreatedEventData, UserUpdatedEventData, WebMcpTool, WebhookEventName, WorkspaceActions, WorkspaceChangedEventData, WorkspaceCreatedEventData, WorkspaceDeletedEventData, WorkspaceInvitationAcceptedEventData, WorkspaceInvitationDeclinedEventData, WorkspaceInvitationRevokedEventData, WorkspaceInvitationSentEventData, WorkspaceMemberPermissions, WorkspaceNotificationDefault, WorkspacePermissionDefinition, WorkspaceUpdatedEventData, WorkspaceUserAddedEventData, WorkspaceUserRemovedEventData, WorkspaceUserRoleChangedEventData };
|
|
6927
|
+
export { AI_BOT_USER_AGENTS, APP_PERMISSION_FALLBACK_GROUP, ApiVersion, AppBridgeError, AuthApi, AuthStatus, BBAction, BBScreen, BBStatus, BB_PARAM, BaseApi, BetaForm, BillingIntervals, BuildBase, CURRENCY_DISPLAY, CURRENCY_FLAG, CreditBucketSource, CreditBucketStatus, CreditTransactionType, DEFAULT_ROLE_PERMISSIONS, DISCOVERY_CACHE_TIMEOUT_MS, DunningState, EventEmitter, FALLBACK_WORKSPACE_ROLE, INVITATION_ERROR_CODE, InvoiceStatuses, NotificationsApi, PLAN_CURRENCY_CODES, PLAN_CURRENCY_OPTIONS, PUSH_SERVICE_WORKER_SCRIPT, Permission, PushApi, SDKEvent, SettingsApi, SubscriptionItemType, SubscriptionStatus, UPLOAD_ACCEPT, UPLOAD_MAX_BYTES, UploadsApi, UserApi, WALLET_LINK_STATEMENT, WEBHOOK_EVENTS, WEBHOOK_EVENTS_BY_CATEGORY, WalletFlowError, WorkspaceApi, actionableInvitations, appPermissionCatalogue, appTokenFailure, appTokenSuccess, bearerChallenge, buildA2AAgentCard, buildAgentCard, buildAgentSkillsIndex, buildApiCatalog, buildAuthMd, buildDiscoveryLinkHeader, buildDnsAidRecords, buildLlmsFullTxt, buildLlmsTxt, buildMcpDiscoveryManifest, buildMcpServerCard, buildProtectedResourceMetadata, buildRobotsTxt, buildSecurityTxt, buildSitemap, buildSkillMd, buildWalletMessage, buildWebBotAuthDirectory, buildbaseAuth, calculateBillableSeats, calculateSeatOverageCents, calculateTotalSubscriptionCents, cleanBBParams, clearAgentReadinessCache, clearAuthIntent, clearPendingInvite, clearResolvedServerUrl, connectWallet, consumeAuthIntent, createBBUrl, createCheckoutRedirectUrls, createCreditPurchaseRedirectUrls, createSessionRefCrypto, BuildBase as default, eventEmitter, extractBearerToken, fetchAgentReadiness, formatCents, formatMinorAmountIntl, formatOverageRate, formatOverageRateWithLabel, formatQuotaIncludedOverage, formatQuotaWithPrice, formatUploadLimit, getAvailableBillingIntervals, getAvailableCurrenciesFromPlans, getBasePriceCents, getBillingIntervalAndCurrencyFromPriceId, getCurrencyDecimals, getCurrencyFlag, getCurrencySymbol, getDisplayCurrency, getPerSeatPriceCents, getPricingVariant, getQuotaDisplayValue, getQuotaDisplayWithVariant, getQuotaOverageCents, getQuotaUnitLabelFromName, getSeatPricing, getStripePriceIdForInterval, handleAppRevokeRequest, handleAppTokenRequest, hasPermission, invalidateCreditBalance, invalidateQuotaUsage, invalidateSubscription, inviterNameOf, isImpersonationSignInLocked, isInvitationActionable, isInvitationError, isInvitationLapsed, isReadOnlySession, isReauthRequired, isValidUsername, isWebhookEvent, isZeroDecimalCurrency, minorAmountToDisplay, mintAgentToken, negotiateMarkdown, normaliseUsername, parkPendingInvite, parseWebhookEvent, pickDefaultRole, preflightUpload, provideWebMcpTools, readBBParams, readPendingInvite, resendCooldownSeconds, resolveAgentPath, resolveMaxUsers, resolvePermissions, resolveRolePermissions, resolveServerUrl, resolveWellKnown, safeRedirect, saveAuthIntent, sha256Digest, signClientJwt, sortInvitations, toChecksumAddress, uploadFailureOf, uploadPolicyOf, validateInvite, validateRedirectUrl, verifyAppRevokeRequest, verifyAppTokenRequest, verifyClientJwt, verifyWebhookSignature, wantsMarkdown, workspaceIdOf, workspaceNameOf };
|
|
6928
|
+
export type { A2ACardConfig, A2ACardSkill, AccountDeletionErrorCode, AccountLinkErrorReason, AgentReadinessBundle, AgentReadyConfig, AgentSkill, ApiCatalogApi, AppRevokeRequestClaims, AppScope, AppTokenRequestClaims, AppTokenResponseBody, AppTokenResult, BBActionType, BBScreenType, BBStatusType, BetaFormData, BetaFormResponse, BillingInterval, BuildBaseAuthOptions, BuildBaseConfig, BuildBaseResult, BuildBaseSession, ChangeEmailBlockedBy, CheckoutResult, ConnectWalletOptions, ConnectedAccountErrorCode, ContentSignals, CreditActions, CreditBucketSourceType, CreditBucketStatusType, CreditTransactionTypeValue, DiscoveryCacheStore, DiscoveryDocument, DnsAidRecord, DunningStateType, Eip1193Provider, EmailChangeErrorCode, EventData, EventType, FeatureActions, FormatQuotaWithPriceOptions, GetCheckoutStripeParams, GuestUpgradeErrorCode, HandlerResult, IAccountDeletion, IAccountLinkStart, IAllQuotaUsageResponse, IAvailableAccountProvider, IBaseApiConfig, IBasePricing, IBetaConfig, ICheckoutSessionRequest, ICheckoutSessionResponse, ICheckoutStripeOptions, IConnectedAccount, IConnectedAccounts, IConsumeCreditsRequest, IConsumeCreditsResponse, ICreditBalance, ICreditBucket, ICreditBucketsQuery, ICreditBucketsResponse, ICreditPackage, ICreditPackagePricingVariant, ICreditPurchaseRequest, ICreditPurchaseResponse, ICreditTransaction, ICreditTransactionsQuery, ICreditTransactionsResponse, IEmailChangeRequest, IEmailChangeResult, IEventCallbacks, IExpiringCreditsResponse, IGuestUpgradeRequest, IGuestUpgradeStarted, IImpersonation, IInvoice, IInvoiceListResponse, IInvoiceResponse, IMfaBackupCodes, IMfaSmsStatus, IMfaStatus, INotificationItem, IOsConfig, IOsState, IOwnedWorkspace, IPhoneCodeSent, IPhoneConfirmed, IPlan, IPlanGroup, IPlanGroupInfo, IPlanGroupLatestVersion, IPlanGroupResponse, IPlanGroupVersion, IPlanGroupVersionWithPlans, IPlanGroupVersionsResponse, IPlanVersion, IPlanVersionSummary, IPlanVersionWithPlan, IPricingVariant, IPublicCreditPackage, IPublicCreditPackagesResponse, IPublicPlanItem, IPublicPlanItemCategory, IPublicPlanVersion, IPublicPlansResponse, IQuotaByInterval, IQuotaIntervalValue, IQuotaOveragePriceIdsByInterval, IQuotaOveragesByInterval, IQuotaUsageStatus, IQuotaUsageStatusResponse, IRecordUsageRequest, IRecordUsageResponse, IRequestOptions, IReverificationStart, ISettings, ISmsEnrollmentResult, IStripePricesByInterval, ISubscription, ISubscriptionItem, ISubscriptionResponse, ISubscriptionUpdateRequest, ISubscriptionUpdateResponse, ITotpEnrollment, IUploadedFile, IUsageLogEntry, IUsageLogsQuery, IUsageLogsResponse, IUser, IUsernamePolicy, IWalletLinkRequest, IWalletNonce, IWalletOptions, IWorkspace, IWorkspaceInvitation, IWorkspaceInvitationPreview, IWorkspaceInvitationStatus, InjectedSolanaWallet, InvitationActions, InvitationError, InvitationErrorCode, InvitationErrorFields, InviteBlockReason, InviteValidation, InvoiceActions, InvoiceStatus, InvoiceStatusType, MaxUsersConfig, McpServerCard, MfaEnforcement, MfaErrorCode, MfaFactorType, MintAgentTokenOptions, MyNotificationPreferences, NotificationChannelPreference, NotificationCounts, NotificationData, NotificationEvent, NotificationListParams, NotificationPage, NotificationResult, NotificationScope, OnWorkspaceChangeParams, PasswordChangeErrorCode, PermissionActions, PermissionContext, PermissionKey, PhoneChannel, PhoneErrorCode, PlanActions, PlanVersionWithPricingVariants, QuotaDisplayValue, QuotaDisplayWithOverage, ReauthRequiredError, RedirectValidationOptions, Region, RegionAnswer, RequireReverificationOptions, ResolveCacheStore, ResolveServerUrlOptions, ReverificationOutcome, ReverifyErrorCode, ReverifyFactor, RobotsConfig, RobotsPolicy, RolePermissionMap, ScopedActions, SessionRefCrypto, SessionRefusalCode, SettingsActions, SitemapUrl, SubscriptionActions, SubscriptionItemTypeValue, SubscriptionStatusType, TranslationKey, UploadFailure, UploadOptions, UploadPolicy, UploadPurpose, UsageActions, UserActions, UserCreatedEventData, UserDeletedBy, UserDeletionWebhookData, UserRegisteredWebhookData, UserUpdatedEventData, UsernameErrorCode, WalletChain, WalletErrorCode, WalletFlowErrorCode, WalletLinkApi, WalletMessageInput, WebMcpTool, WebhookEventName, WorkspaceActions, WorkspaceChangedEventData, WorkspaceCreatedEventData, WorkspaceDeletedEventData, WorkspaceInvitationAcceptedEventData, WorkspaceInvitationDeclinedEventData, WorkspaceInvitationRevokedEventData, WorkspaceInvitationSentEventData, WorkspaceMemberPermissions, WorkspaceNotificationDefault, WorkspacePermissionDefinition, WorkspaceUpdatedEventData, WorkspaceUserAddedEventData, WorkspaceUserRemovedEventData, WorkspaceUserRoleChangedEventData };
|