@sylphx/sdk 0.31.0 → 0.32.0
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/README.md +111 -4
- package/dist/access.d.ts +112 -17
- package/dist/access.js +101 -7
- package/dist/access.js.map +1 -1
- package/dist/ai.d.ts +1 -2
- package/dist/ai.js +2 -3
- package/dist/ai.js.map +1 -1
- package/dist/artifacts.d.ts +1 -1
- package/dist/artifacts.js +2 -2
- package/dist/assets.d.ts +447 -0
- package/dist/assets.js +266 -0
- package/dist/assets.js.map +1 -0
- package/dist/auth/client.d.ts +239 -0
- package/dist/auth/client.js +337 -0
- package/dist/auth/client.js.map +1 -0
- package/dist/auth/verify.d.ts +38 -3
- package/dist/auth/verify.js +58 -8
- package/dist/auth/verify.js.map +1 -1
- package/dist/auth.d.ts +455 -7
- package/dist/auth.js +416 -5
- package/dist/auth.js.map +1 -1
- package/dist/billing.d.ts +13 -13
- package/dist/billing.js +5 -5
- package/dist/broker.d.ts +5 -4
- package/dist/broker.js +3 -3
- package/dist/broker.js.map +1 -1
- package/dist/build.d.ts +4 -4
- package/dist/build.js +3 -3
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/config/flags.d.ts +140 -0
- package/dist/config/flags.js +462 -0
- package/dist/config/flags.js.map +1 -0
- package/dist/config.d.ts +380 -15
- package/dist/config.js +283 -5
- package/dist/config.js.map +1 -1
- package/dist/connections.d.ts +6 -6
- package/dist/connections.js +3 -3
- package/dist/data.d.ts +560 -7
- package/dist/data.js +510 -4
- package/dist/data.js.map +1 -1
- package/dist/entitlement.d.ts +10 -8
- package/dist/entitlement.js +3 -4
- package/dist/entitlement.js.map +1 -1
- package/dist/events/realtime.d.ts +69 -0
- package/dist/events/realtime.js +107 -0
- package/dist/events/realtime.js.map +1 -0
- package/dist/events/webhooks.d.ts +40 -0
- package/dist/events/webhooks.js +110 -0
- package/dist/events/webhooks.js.map +1 -0
- package/dist/events.d.ts +369 -22
- package/dist/events.js +311 -8
- package/dist/events.js.map +1 -1
- package/dist/hosting.d.ts +13 -14
- package/dist/hosting.js +3 -4
- package/dist/hosting.js.map +1 -1
- package/dist/ids.d.ts +837 -0
- package/dist/ids.js +287 -0
- package/dist/ids.js.map +1 -0
- package/dist/index.d.ts +12 -1
- package/dist/index.js +16 -2
- package/dist/index.js.map +1 -1
- package/dist/keys.d.ts +2 -2
- package/dist/keys.js +3 -3
- package/dist/localization.d.ts +663 -0
- package/dist/localization.js +491 -0
- package/dist/localization.js.map +1 -0
- package/dist/methods.js +1719 -124
- package/dist/methods.js.map +1 -1
- package/dist/money.d.ts +1406 -0
- package/dist/money.js +1090 -0
- package/dist/money.js.map +1 -0
- package/dist/network.d.ts +4 -5
- package/dist/network.js +3 -4
- package/dist/network.js.map +1 -1
- package/dist/notify.d.ts +321 -124
- package/dist/notify.js +223 -73
- package/dist/notify.js.map +1 -1
- package/dist/observability.d.ts +184 -7
- package/dist/observability.js +156 -8
- package/dist/observability.js.map +1 -1
- package/dist/release.d.ts +14 -15
- package/dist/release.js +3 -4
- package/dist/release.js.map +1 -1
- package/dist/runners.d.ts +2 -3
- package/dist/runners.js +3 -4
- package/dist/runners.js.map +1 -1
- package/dist/runtime.d.ts +5 -1
- package/dist/runtime.js +7 -3
- package/dist/runtime.js.map +1 -1
- package/dist/sandboxes.d.ts +64 -20
- package/dist/sandboxes.js +9 -4
- package/dist/sandboxes.js.map +1 -1
- package/dist/secrets.d.ts +6 -6
- package/dist/secrets.js +4 -4
- package/dist/workflows.d.ts +850 -12
- package/dist/workflows.js +672 -3
- package/dist/workflows.js.map +1 -1
- package/package.json +1 -1
package/dist/auth.d.ts
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import * as runtime from './runtime.js';
|
|
2
2
|
import './common.js';
|
|
3
3
|
import type * as common from './common.js';
|
|
4
|
+
/** The request of AcceptInvitation. */
|
|
5
|
+
export interface AcceptInvitationRequest {
|
|
6
|
+
/** The name of the invitation. */
|
|
7
|
+
name: string;
|
|
8
|
+
/** The accepting end user; its verified email must be the invited address. */
|
|
9
|
+
endUser: string;
|
|
10
|
+
}
|
|
4
11
|
/**
|
|
5
12
|
* An Auth Config is the app scope of Sylphx Auth in one environment: which
|
|
6
13
|
* sign-in methods the customer's app offers, and its MFA, passkey, lockout,
|
|
@@ -33,8 +40,8 @@ export interface AuthConfigSpec {
|
|
|
33
40
|
/** Session limits. */
|
|
34
41
|
sessionPolicy?: SessionPolicy;
|
|
35
42
|
/**
|
|
36
|
-
*
|
|
37
|
-
*
|
|
43
|
+
* The CAPTCHA verifier secret, held in Sylphx Secrets; unset disables
|
|
44
|
+
* CAPTCHA.
|
|
38
45
|
*/
|
|
39
46
|
captchaSecret?: string;
|
|
40
47
|
/** Account Portal origin and branding. */
|
|
@@ -46,6 +53,17 @@ export interface AuthConfigSpec {
|
|
|
46
53
|
mailSendingDomain?: string;
|
|
47
54
|
/** A Sylphx Data database end users are synced into; unset disables sync. */
|
|
48
55
|
userSyncDatabase?: string;
|
|
56
|
+
/**
|
|
57
|
+
* Social sign-in: one entry per provider Sylphx serves (`google`, `github`,
|
|
58
|
+
* `apple`), whether it is on, and whether end users can use it now. An
|
|
59
|
+
* update changes only the providers it lists; the others keep their state.
|
|
60
|
+
* Without any change Google is on through Sylphx's shared client, when
|
|
61
|
+
* Sylphx has one. The provider's credentials (the shared client, or your
|
|
62
|
+
* own client id and secret) are set with the instance's
|
|
63
|
+
* `sign-in-providers:put`: a client secret never passes through this
|
|
64
|
+
* resource.
|
|
65
|
+
*/
|
|
66
|
+
socialProviders?: SocialProvider[];
|
|
49
67
|
}
|
|
50
68
|
/** AuthConfigStatus is the observed state of an AuthConfig. */
|
|
51
69
|
export interface AuthConfigStatus {
|
|
@@ -72,6 +90,20 @@ export interface CreateCustomerOrganizationRequest {
|
|
|
72
90
|
/** Validate and return the result without writing anything. */
|
|
73
91
|
validateOnly?: boolean;
|
|
74
92
|
}
|
|
93
|
+
/** The request of CreateEmailDomain. */
|
|
94
|
+
export interface CreateEmailDomainRequest {
|
|
95
|
+
/** The parent to create in. */
|
|
96
|
+
parent: string;
|
|
97
|
+
/**
|
|
98
|
+
* The email domain id, the final name segment; the server assigns one when
|
|
99
|
+
* empty.
|
|
100
|
+
*/
|
|
101
|
+
emailDomainId?: string;
|
|
102
|
+
/** The email domain to create; only caller-writable fields are read. */
|
|
103
|
+
emailDomain: EmailDomain;
|
|
104
|
+
/** Validate and return the result without writing anything. */
|
|
105
|
+
validateOnly?: boolean;
|
|
106
|
+
}
|
|
75
107
|
/** The request of CreateEndUser. */
|
|
76
108
|
export interface CreateEndUserRequest {
|
|
77
109
|
/** The parent to create in. */
|
|
@@ -86,6 +118,20 @@ export interface CreateEndUserRequest {
|
|
|
86
118
|
/** Validate and return the result without writing anything. */
|
|
87
119
|
validateOnly?: boolean;
|
|
88
120
|
}
|
|
121
|
+
/** The request of CreateInvitation. */
|
|
122
|
+
export interface CreateInvitationRequest {
|
|
123
|
+
/** The parent to create in. */
|
|
124
|
+
parent: string;
|
|
125
|
+
/**
|
|
126
|
+
* The invitation id, the final name segment; the server assigns one when
|
|
127
|
+
* empty.
|
|
128
|
+
*/
|
|
129
|
+
invitationId?: string;
|
|
130
|
+
/** The invitation to create; only caller-writable fields are read. */
|
|
131
|
+
invitation: Invitation;
|
|
132
|
+
/** Validate and return the result without writing anything. */
|
|
133
|
+
validateOnly?: boolean;
|
|
134
|
+
}
|
|
89
135
|
/** The request of CreateMembership. */
|
|
90
136
|
export interface CreateMembershipRequest {
|
|
91
137
|
/** The parent to create in. */
|
|
@@ -114,6 +160,20 @@ export interface CreateOauthClientRequest {
|
|
|
114
160
|
/** Validate and return the result without writing anything. */
|
|
115
161
|
validateOnly?: boolean;
|
|
116
162
|
}
|
|
163
|
+
/** The request of CreateOrganizationRole. */
|
|
164
|
+
export interface CreateOrganizationRoleRequest {
|
|
165
|
+
/** The parent to create in. */
|
|
166
|
+
parent: string;
|
|
167
|
+
/**
|
|
168
|
+
* The organization role id, the final name segment; the server assigns one when
|
|
169
|
+
* empty.
|
|
170
|
+
*/
|
|
171
|
+
organizationRoleId?: string;
|
|
172
|
+
/** The organization role to create; only caller-writable fields are read. */
|
|
173
|
+
organizationRole: OrganizationRole;
|
|
174
|
+
/** Validate and return the result without writing anything. */
|
|
175
|
+
validateOnly?: boolean;
|
|
176
|
+
}
|
|
117
177
|
/**
|
|
118
178
|
* A Customer Organization is a B2B tenant inside a customer's app. It is never
|
|
119
179
|
* a Sylphx org and never a Resource name segment of anything but its own
|
|
@@ -148,6 +208,17 @@ export interface DeleteCustomerOrganizationRequest {
|
|
|
148
208
|
/** Also close every membership. */
|
|
149
209
|
force?: boolean;
|
|
150
210
|
}
|
|
211
|
+
/** The request of DeleteEmailDomain. */
|
|
212
|
+
export interface DeleteEmailDomainRequest {
|
|
213
|
+
/** The name of the email domain to delete. */
|
|
214
|
+
name: string;
|
|
215
|
+
/** Delete only if the current etag matches. */
|
|
216
|
+
etag?: string;
|
|
217
|
+
/** Succeed when the email domain does not exist. */
|
|
218
|
+
allowMissing?: boolean;
|
|
219
|
+
/** Validate without deleting anything. */
|
|
220
|
+
validateOnly?: boolean;
|
|
221
|
+
}
|
|
151
222
|
/** The request of DeleteEndUser. */
|
|
152
223
|
export interface DeleteEndUserRequest {
|
|
153
224
|
/** The name of the end user to delete. */
|
|
@@ -183,6 +254,41 @@ export interface DeleteOauthClientRequest {
|
|
|
183
254
|
/** Validate without deleting anything. */
|
|
184
255
|
validateOnly?: boolean;
|
|
185
256
|
}
|
|
257
|
+
/** The request of DeleteOrganizationRole. */
|
|
258
|
+
export interface DeleteOrganizationRoleRequest {
|
|
259
|
+
/** The name of the organization role to delete. */
|
|
260
|
+
name: string;
|
|
261
|
+
/** Delete only if the current etag matches. */
|
|
262
|
+
etag?: string;
|
|
263
|
+
/** Succeed when the organization role does not exist. */
|
|
264
|
+
allowMissing?: boolean;
|
|
265
|
+
/** Validate without deleting anything. */
|
|
266
|
+
validateOnly?: boolean;
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* An Email Domain is an email domain a customer organization claims. It is verified
|
|
270
|
+
* by a DNS TXT record; a verified domain appears in the organization's
|
|
271
|
+
* `verified_domains`, and one environment's organizations never verify the
|
|
272
|
+
* same domain twice.
|
|
273
|
+
*/
|
|
274
|
+
export interface EmailDomain {
|
|
275
|
+
/** `orgs/{org}/projects/{project}/envs/{env}/customer_organizations/{customer_organization}/email_domains/{email_domain}`. */
|
|
276
|
+
name?: string;
|
|
277
|
+
/** `dom_<cell><ulid>`; never reused. */
|
|
278
|
+
readonly uid?: string;
|
|
279
|
+
/** Resource metadata. */
|
|
280
|
+
meta?: common.ResourceMeta;
|
|
281
|
+
/** The domain, lowercase, for example `acme.com`. */
|
|
282
|
+
domain?: string;
|
|
283
|
+
/** The verification state. */
|
|
284
|
+
readonly state?: EmailDomainState;
|
|
285
|
+
/** The TXT record name to publish, `_sylphx-verification.<domain>`. */
|
|
286
|
+
readonly verificationRecord?: string;
|
|
287
|
+
/** The TXT record value to publish. */
|
|
288
|
+
readonly verificationValue?: string;
|
|
289
|
+
/** When the record was last found. */
|
|
290
|
+
readonly verifyTime?: string;
|
|
291
|
+
}
|
|
186
292
|
/**
|
|
187
293
|
* An End User is a user of a customer's app, never a Sylphx member or
|
|
188
294
|
* principal. `(scope, email)` is unique among live end users. Delete is
|
|
@@ -211,6 +317,16 @@ export interface EndUser {
|
|
|
211
317
|
privateMetadata?: Record<string, unknown>;
|
|
212
318
|
/** The last successful sign-in. */
|
|
213
319
|
readonly lastLoginTime?: string;
|
|
320
|
+
/**
|
|
321
|
+
* App data the end user may write with their own session (preferences a
|
|
322
|
+
* sign-up form collects); never trust it for authorization.
|
|
323
|
+
*/
|
|
324
|
+
unsafeMetadata?: Record<string, unknown>;
|
|
325
|
+
/**
|
|
326
|
+
* Until when sign-in is locked after repeated failures; unset when not
|
|
327
|
+
* locked. Unlock clears it; a suspension is `state`, not a lock.
|
|
328
|
+
*/
|
|
329
|
+
readonly lockExpireTime?: string;
|
|
214
330
|
}
|
|
215
331
|
/** The request of GetAuthConfig. */
|
|
216
332
|
export interface GetAuthConfigRequest {
|
|
@@ -222,11 +338,21 @@ export interface GetCustomerOrganizationRequest {
|
|
|
222
338
|
/** The name of the customer organization to get. */
|
|
223
339
|
name: string;
|
|
224
340
|
}
|
|
341
|
+
/** The request of GetEmailDomain. */
|
|
342
|
+
export interface GetEmailDomainRequest {
|
|
343
|
+
/** The name of the email domain to get. */
|
|
344
|
+
name: string;
|
|
345
|
+
}
|
|
225
346
|
/** The request of GetEndUser. */
|
|
226
347
|
export interface GetEndUserRequest {
|
|
227
348
|
/** The name of the end user to get. */
|
|
228
349
|
name: string;
|
|
229
350
|
}
|
|
351
|
+
/** The request of GetInvitation. */
|
|
352
|
+
export interface GetInvitationRequest {
|
|
353
|
+
/** The name of the invitation to get. */
|
|
354
|
+
name: string;
|
|
355
|
+
}
|
|
230
356
|
/** The request of GetMembership. */
|
|
231
357
|
export interface GetMembershipRequest {
|
|
232
358
|
/** The name of the membership to get. */
|
|
@@ -237,11 +363,45 @@ export interface GetOauthClientRequest {
|
|
|
237
363
|
/** The name of the OAuth client to get. */
|
|
238
364
|
name: string;
|
|
239
365
|
}
|
|
366
|
+
/** The request of GetOrganizationRole. */
|
|
367
|
+
export interface GetOrganizationRoleRequest {
|
|
368
|
+
/** The name of the organization role to get. */
|
|
369
|
+
name: string;
|
|
370
|
+
}
|
|
240
371
|
/** The request of GetSession. */
|
|
241
372
|
export interface GetSessionRequest {
|
|
242
373
|
/** The name of the session to get. */
|
|
243
374
|
name: string;
|
|
244
375
|
}
|
|
376
|
+
/**
|
|
377
|
+
* An Invitation asks one email address to join a customer organization with
|
|
378
|
+
* roles. It is single-use and expires; accepting needs an end user whose
|
|
379
|
+
* verified email is the invited address, and creates the membership.
|
|
380
|
+
*/
|
|
381
|
+
export interface Invitation {
|
|
382
|
+
/** `orgs/{org}/projects/{project}/envs/{env}/customer_organizations/{customer_organization}/invitations/{invitation}`. */
|
|
383
|
+
name?: string;
|
|
384
|
+
/** `inv_<cell><ulid>`; never reused. */
|
|
385
|
+
readonly uid?: string;
|
|
386
|
+
/** Resource metadata. */
|
|
387
|
+
meta?: common.ResourceMeta;
|
|
388
|
+
/** The invited address. */
|
|
389
|
+
email?: string;
|
|
390
|
+
/** Roles the membership gets; empty means the environment's default roles. */
|
|
391
|
+
roles?: string[];
|
|
392
|
+
/** The lifecycle state. */
|
|
393
|
+
readonly state?: InvitationState;
|
|
394
|
+
/** When it expires. */
|
|
395
|
+
readonly expireTime?: string;
|
|
396
|
+
/** When it was accepted. */
|
|
397
|
+
readonly acceptTime?: string;
|
|
398
|
+
/** The end user who accepted it. */
|
|
399
|
+
readonly endUser?: string;
|
|
400
|
+
/** The membership accepting it created. */
|
|
401
|
+
readonly membership?: string;
|
|
402
|
+
/** How long it stays open; default 7 days, at most 30. */
|
|
403
|
+
ttl?: string;
|
|
404
|
+
}
|
|
245
405
|
/** The request of ListCustomerOrganizations. */
|
|
246
406
|
export interface ListCustomerOrganizationsRequest {
|
|
247
407
|
/** The parent to list in. */
|
|
@@ -262,6 +422,26 @@ export interface ListCustomerOrganizationsResponse {
|
|
|
262
422
|
/** The token of the next page; empty on the last page. */
|
|
263
423
|
nextPageToken?: string;
|
|
264
424
|
}
|
|
425
|
+
/** The request of ListEmailDomains. */
|
|
426
|
+
export interface ListEmailDomainsRequest {
|
|
427
|
+
/** The parent to list in. */
|
|
428
|
+
parent: string;
|
|
429
|
+
/** At most this many; default 50, clamped to 1000. */
|
|
430
|
+
pageSize?: number;
|
|
431
|
+
/** `next_page_token` of the previous page. */
|
|
432
|
+
pageToken?: string;
|
|
433
|
+
/** AIP-160 filter over labels and filterable fields. */
|
|
434
|
+
filter?: string;
|
|
435
|
+
/** AIP-132 ordering over filterable fields. */
|
|
436
|
+
orderBy?: string;
|
|
437
|
+
}
|
|
438
|
+
/** The response of ListEmailDomains. */
|
|
439
|
+
export interface ListEmailDomainsResponse {
|
|
440
|
+
/** The page. */
|
|
441
|
+
emailDomains?: EmailDomain[];
|
|
442
|
+
/** The token of the next page; empty on the last page. */
|
|
443
|
+
nextPageToken?: string;
|
|
444
|
+
}
|
|
265
445
|
/** The request of ListEndUsers. */
|
|
266
446
|
export interface ListEndUsersRequest {
|
|
267
447
|
/** The parent to list in. */
|
|
@@ -282,6 +462,26 @@ export interface ListEndUsersResponse {
|
|
|
282
462
|
/** The token of the next page; empty on the last page. */
|
|
283
463
|
nextPageToken?: string;
|
|
284
464
|
}
|
|
465
|
+
/** The request of ListInvitations. */
|
|
466
|
+
export interface ListInvitationsRequest {
|
|
467
|
+
/** The parent to list in. */
|
|
468
|
+
parent: string;
|
|
469
|
+
/** At most this many; default 50, clamped to 1000. */
|
|
470
|
+
pageSize?: number;
|
|
471
|
+
/** `next_page_token` of the previous page. */
|
|
472
|
+
pageToken?: string;
|
|
473
|
+
/** AIP-160 filter over labels and filterable fields. */
|
|
474
|
+
filter?: string;
|
|
475
|
+
/** AIP-132 ordering over filterable fields. */
|
|
476
|
+
orderBy?: string;
|
|
477
|
+
}
|
|
478
|
+
/** The response of ListInvitations. */
|
|
479
|
+
export interface ListInvitationsResponse {
|
|
480
|
+
/** The page. */
|
|
481
|
+
invitations?: Invitation[];
|
|
482
|
+
/** The token of the next page; empty on the last page. */
|
|
483
|
+
nextPageToken?: string;
|
|
484
|
+
}
|
|
285
485
|
/** The request of ListMemberships. */
|
|
286
486
|
export interface ListMembershipsRequest {
|
|
287
487
|
/** The parent to list in. */
|
|
@@ -322,6 +522,26 @@ export interface ListOauthClientsResponse {
|
|
|
322
522
|
/** The token of the next page; empty on the last page. */
|
|
323
523
|
nextPageToken?: string;
|
|
324
524
|
}
|
|
525
|
+
/** The request of ListOrganizationRoles. */
|
|
526
|
+
export interface ListOrganizationRolesRequest {
|
|
527
|
+
/** The parent to list in. */
|
|
528
|
+
parent: string;
|
|
529
|
+
/** At most this many; default 50, clamped to 1000. */
|
|
530
|
+
pageSize?: number;
|
|
531
|
+
/** `next_page_token` of the previous page. */
|
|
532
|
+
pageToken?: string;
|
|
533
|
+
/** AIP-160 filter over labels and filterable fields. */
|
|
534
|
+
filter?: string;
|
|
535
|
+
/** AIP-132 ordering over filterable fields. */
|
|
536
|
+
orderBy?: string;
|
|
537
|
+
}
|
|
538
|
+
/** The response of ListOrganizationRoles. */
|
|
539
|
+
export interface ListOrganizationRolesResponse {
|
|
540
|
+
/** The page. */
|
|
541
|
+
organizationRoles?: OrganizationRole[];
|
|
542
|
+
/** The token of the next page; empty on the last page. */
|
|
543
|
+
nextPageToken?: string;
|
|
544
|
+
}
|
|
325
545
|
/** The request of ListSessions. */
|
|
326
546
|
export interface ListSessionsRequest {
|
|
327
547
|
/** The parent to list in. */
|
|
@@ -361,7 +581,7 @@ export interface Membership {
|
|
|
361
581
|
}
|
|
362
582
|
/**
|
|
363
583
|
* An OAuth Client is a relying party of the customer's authorization server:
|
|
364
|
-
* its app, API, or CLI. Tokens are signed by a
|
|
584
|
+
* its app, API, or CLI. Tokens are signed by a Sylphx Keys handle and verify
|
|
365
585
|
* offline from the published JWKS.
|
|
366
586
|
*/
|
|
367
587
|
export interface OauthClient {
|
|
@@ -413,6 +633,32 @@ export interface OauthClientStatus {
|
|
|
413
633
|
/** The last four characters of the client secret. */
|
|
414
634
|
readonly clientSecretLast4?: string;
|
|
415
635
|
}
|
|
636
|
+
/**
|
|
637
|
+
* An Organization Role is an app-defined role of the environment's customer
|
|
638
|
+
* organizations: a key that memberships and invitations name, a display name
|
|
639
|
+
* (`meta.display_name`), and the app's own permission strings. Roles are app
|
|
640
|
+
* data, not Access policy. `owner`, `admin`, and `member` are built in and
|
|
641
|
+
* need no Organization Role.
|
|
642
|
+
*/
|
|
643
|
+
export interface OrganizationRole {
|
|
644
|
+
/**
|
|
645
|
+
* `orgs/{org}/projects/{project}/envs/{env}/organization_roles/{organization_role}`;
|
|
646
|
+
* the final segment is the role key memberships name, for example
|
|
647
|
+
* `hr_manager`.
|
|
648
|
+
*/
|
|
649
|
+
name?: string;
|
|
650
|
+
/** `orl_<cell><ulid>`; never reused. */
|
|
651
|
+
readonly uid?: string;
|
|
652
|
+
/** Resource metadata. */
|
|
653
|
+
meta?: common.ResourceMeta;
|
|
654
|
+
/**
|
|
655
|
+
* The app's permission strings `<resource>:<action>`, for example
|
|
656
|
+
* `invoices:read` or `org:payroll:approve`.
|
|
657
|
+
*/
|
|
658
|
+
permissions?: string[];
|
|
659
|
+
/** Whether new members and invitations without roles get this role. */
|
|
660
|
+
autoAssign?: boolean;
|
|
661
|
+
}
|
|
416
662
|
/** Passkey requirements. */
|
|
417
663
|
export interface PasskeyPolicy {
|
|
418
664
|
/** Require a passkey for every end user. */
|
|
@@ -455,6 +701,11 @@ export interface RevokeEndUserSessionsResponse {
|
|
|
455
701
|
/** Sessions revoked. */
|
|
456
702
|
revokedCount?: number;
|
|
457
703
|
}
|
|
704
|
+
/** The request of RevokeInvitation. */
|
|
705
|
+
export interface RevokeInvitationRequest {
|
|
706
|
+
/** The name of the invitation. */
|
|
707
|
+
name: string;
|
|
708
|
+
}
|
|
458
709
|
/** The request of RevokeSession. */
|
|
459
710
|
export interface RevokeSessionRequest {
|
|
460
711
|
/** The name of the session. */
|
|
@@ -520,6 +771,24 @@ export interface SessionPolicy {
|
|
|
520
771
|
/** Bind sessions to network and agent; a mismatch demands step-up. */
|
|
521
772
|
fingerprintBinding?: boolean;
|
|
522
773
|
}
|
|
774
|
+
/** One social sign-in provider of an environment's Auth. */
|
|
775
|
+
export interface SocialProvider {
|
|
776
|
+
/** The provider: `google`, `github` or `apple`. */
|
|
777
|
+
provider?: string;
|
|
778
|
+
/**
|
|
779
|
+
* Whether the provider is offered. Turning one on needs credentials:
|
|
780
|
+
* Sylphx's shared client for that provider, or your own.
|
|
781
|
+
*/
|
|
782
|
+
enabled?: boolean;
|
|
783
|
+
/** `shared` (Sylphx's client) or `custom` (your own client). */
|
|
784
|
+
readonly credentials?: string;
|
|
785
|
+
/**
|
|
786
|
+
* Whether end users can sign in with it now: it is on and its credentials
|
|
787
|
+
* exist. The client config (`GET /v1/client/config`) lists exactly the
|
|
788
|
+
* usable providers.
|
|
789
|
+
*/
|
|
790
|
+
readonly usable?: boolean;
|
|
791
|
+
}
|
|
523
792
|
/** The request of SuspendEndUser. */
|
|
524
793
|
export interface SuspendEndUserRequest {
|
|
525
794
|
/** The name of the end user. */
|
|
@@ -529,6 +798,11 @@ export interface SuspendEndUserRequest {
|
|
|
529
798
|
/** Act only if the current etag matches. */
|
|
530
799
|
etag?: string;
|
|
531
800
|
}
|
|
801
|
+
/** The request of UnlockEndUser. */
|
|
802
|
+
export interface UnlockEndUserRequest {
|
|
803
|
+
/** The name of the end user. */
|
|
804
|
+
name: string;
|
|
805
|
+
}
|
|
532
806
|
/** The request of UpdateAuthConfig. */
|
|
533
807
|
export interface UpdateAuthConfigRequest {
|
|
534
808
|
/** The auth config to update; `name` identifies it. */
|
|
@@ -583,12 +857,30 @@ export interface UpdateOauthClientRequest {
|
|
|
583
857
|
/** Validate and return the result without writing anything. */
|
|
584
858
|
validateOnly?: boolean;
|
|
585
859
|
}
|
|
860
|
+
/** The request of UpdateOrganizationRole. */
|
|
861
|
+
export interface UpdateOrganizationRoleRequest {
|
|
862
|
+
/** The organization role to update; `name` identifies it. */
|
|
863
|
+
organizationRole: OrganizationRole;
|
|
864
|
+
/** The fields to write; unset writes every populated field. */
|
|
865
|
+
updateMask?: string;
|
|
866
|
+
/** Validate and return the result without writing anything. */
|
|
867
|
+
validateOnly?: boolean;
|
|
868
|
+
}
|
|
869
|
+
/** The request of VerifyEmailDomain. */
|
|
870
|
+
export interface VerifyEmailDomainRequest {
|
|
871
|
+
/** The name of the email domain. */
|
|
872
|
+
name: string;
|
|
873
|
+
}
|
|
586
874
|
/** A sign-in method or factor. */
|
|
587
875
|
export type AuthMethod = 'password' | 'magic_link' | 'email_otp' | 'passkey' | 'totp' | 'oidc' | 'saml' | (string & {});
|
|
876
|
+
/** The verification state of an Email Domain. */
|
|
877
|
+
export type EmailDomainState = 'pending' | 'verified' | (string & {});
|
|
588
878
|
/** The lifecycle state of an end user. */
|
|
589
879
|
export type EndUserState = 'active' | 'suspended' | (string & {});
|
|
590
880
|
/** An OAuth grant. */
|
|
591
881
|
export type GrantType = 'authorization_code' | 'refresh_token' | 'device_code' | 'client_credentials' | (string & {});
|
|
882
|
+
/** The lifecycle of an Invitation. */
|
|
883
|
+
export type InvitationState = 'pending' | 'accepted' | 'revoked' | 'expired' | (string & {});
|
|
592
884
|
/** RFC 6749 client type. */
|
|
593
885
|
export type OauthClientType = 'confidential' | 'public' | (string & {});
|
|
594
886
|
/** Why a session was revoked. */
|
|
@@ -599,10 +891,10 @@ export type SessionState = 'active' | 'revoked' | 'expired' | (string & {});
|
|
|
599
891
|
export type TokenEndpointAuthMethod = 'none' | 'client_secret_basic' | 'private_key_jwt' | (string & {});
|
|
600
892
|
/**
|
|
601
893
|
* AuthService is Sylphx Auth's management surface: sign-in for a customer's
|
|
602
|
-
* own users, their sessions, customer organizations, and OAuth clients
|
|
603
|
-
*
|
|
604
|
-
*
|
|
605
|
-
*
|
|
894
|
+
* own users, their sessions, customer organizations, and OAuth clients.
|
|
895
|
+
* Sylphx orgs, members, principals, and keys are Sylphx Access, never Auth.
|
|
896
|
+
* End-user ceremonies (sign-in, recovery, OAuth authorize and token) are
|
|
897
|
+
* protocol endpoints, not Resource methods.
|
|
606
898
|
*
|
|
607
899
|
* Namespace of Sylphx Auth on `Sylphx`.
|
|
608
900
|
*/
|
|
@@ -617,6 +909,12 @@ export declare class AuthApi {
|
|
|
617
909
|
readonly customerOrganizations: CustomerOrganizationsCollection;
|
|
618
910
|
/** The `memberships` collection. */
|
|
619
911
|
readonly memberships: MembershipsCollection;
|
|
912
|
+
/** The `organization_roles` collection. */
|
|
913
|
+
readonly organizationRoles: OrganizationRolesCollection;
|
|
914
|
+
/** The `invitations` collection. */
|
|
915
|
+
readonly invitations: InvitationsCollection;
|
|
916
|
+
/** The `email_domains` collection. */
|
|
917
|
+
readonly emailDomains: EmailDomainsCollection;
|
|
620
918
|
/** The `oauth_clients` collection. */
|
|
621
919
|
readonly oauthClients: OauthClientsCollection;
|
|
622
920
|
constructor(client: runtime.Client);
|
|
@@ -704,6 +1002,14 @@ export declare class EndUsersCollection {
|
|
|
704
1002
|
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `ETAG_MISMATCH`.
|
|
705
1003
|
*/
|
|
706
1004
|
reactivate(request: ReactivateEndUserRequest): Promise<EndUser>;
|
|
1005
|
+
/**
|
|
1006
|
+
* Clears an end user's sign-in lock (repeated failed sign-ins) now.
|
|
1007
|
+
*
|
|
1008
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/end_users/*}:unlock` · permission `auth:write` · effect `write`
|
|
1009
|
+
*
|
|
1010
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
1011
|
+
*/
|
|
1012
|
+
unlock(request: UnlockEndUserRequest): Promise<EndUser>;
|
|
707
1013
|
/**
|
|
708
1014
|
* Revokes every session of an end user.
|
|
709
1015
|
*
|
|
@@ -838,6 +1144,148 @@ export declare class MembershipsCollection {
|
|
|
838
1144
|
*/
|
|
839
1145
|
delete(request: DeleteMembershipRequest): Promise<Record<string, never>>;
|
|
840
1146
|
}
|
|
1147
|
+
/** `organization_roles` of Sylphx Auth: Resource type `auth.sylphx.com/OrganizationRole`. */
|
|
1148
|
+
export declare class OrganizationRolesCollection {
|
|
1149
|
+
private readonly client;
|
|
1150
|
+
constructor(client: runtime.Client);
|
|
1151
|
+
/**
|
|
1152
|
+
* Gets an organization role.
|
|
1153
|
+
*
|
|
1154
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/organization_roles/*}` · permission `auth:read` · effect `read`
|
|
1155
|
+
*
|
|
1156
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
1157
|
+
*/
|
|
1158
|
+
get(request: GetOrganizationRoleRequest): Promise<OrganizationRole>;
|
|
1159
|
+
/**
|
|
1160
|
+
* Lists organization roles.
|
|
1161
|
+
*
|
|
1162
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/organization_roles` · permission `auth:read` · effect `read`
|
|
1163
|
+
*
|
|
1164
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
1165
|
+
*/
|
|
1166
|
+
list(request: ListOrganizationRolesRequest): Promise<ListOrganizationRolesResponse>;
|
|
1167
|
+
/** Every item of every page of `list`. */
|
|
1168
|
+
listAll(request: ListOrganizationRolesRequest): AsyncGenerator<OrganizationRole>;
|
|
1169
|
+
/**
|
|
1170
|
+
* Creates an organization role.
|
|
1171
|
+
*
|
|
1172
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/organization_roles` · permission `auth:write` · effect `write`
|
|
1173
|
+
*
|
|
1174
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`.
|
|
1175
|
+
*/
|
|
1176
|
+
create(request: CreateOrganizationRoleRequest): Promise<OrganizationRole>;
|
|
1177
|
+
/**
|
|
1178
|
+
* Updates an organization role.
|
|
1179
|
+
*
|
|
1180
|
+
* `PATCH /v1/{organization_role.name=orgs/*\/projects/*\/envs/*\/organization_roles/*}` · permission `auth:write` · effect `write`
|
|
1181
|
+
*
|
|
1182
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
1183
|
+
*/
|
|
1184
|
+
update(request: UpdateOrganizationRoleRequest): Promise<OrganizationRole>;
|
|
1185
|
+
/**
|
|
1186
|
+
* Deletes an organization role.
|
|
1187
|
+
*
|
|
1188
|
+
* `DELETE /v1/{name=orgs/*\/projects/*\/envs/*\/organization_roles/*}` · permission `auth:write` · effect `destructive`
|
|
1189
|
+
*
|
|
1190
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
1191
|
+
*/
|
|
1192
|
+
delete(request: DeleteOrganizationRoleRequest): Promise<Record<string, never>>;
|
|
1193
|
+
}
|
|
1194
|
+
/** `invitations` of Sylphx Auth: Resource type `auth.sylphx.com/Invitation`. */
|
|
1195
|
+
export declare class InvitationsCollection {
|
|
1196
|
+
private readonly client;
|
|
1197
|
+
constructor(client: runtime.Client);
|
|
1198
|
+
/**
|
|
1199
|
+
* Gets an invitation.
|
|
1200
|
+
*
|
|
1201
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/customer_organizations/*\/invitations/*}` · permission `auth:read` · effect `read`
|
|
1202
|
+
*
|
|
1203
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
1204
|
+
*/
|
|
1205
|
+
get(request: GetInvitationRequest): Promise<Invitation>;
|
|
1206
|
+
/**
|
|
1207
|
+
* Lists invitations.
|
|
1208
|
+
*
|
|
1209
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*\/customer_organizations/*}/invitations` · permission `auth:read` · effect `read`
|
|
1210
|
+
*
|
|
1211
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
1212
|
+
*/
|
|
1213
|
+
list(request: ListInvitationsRequest): Promise<ListInvitationsResponse>;
|
|
1214
|
+
/** Every item of every page of `list`. */
|
|
1215
|
+
listAll(request: ListInvitationsRequest): AsyncGenerator<Invitation>;
|
|
1216
|
+
/**
|
|
1217
|
+
* Creates an invitation.
|
|
1218
|
+
*
|
|
1219
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*\/customer_organizations/*}/invitations` · permission `auth:write` · effect `write`
|
|
1220
|
+
*
|
|
1221
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`.
|
|
1222
|
+
*/
|
|
1223
|
+
create(request: CreateInvitationRequest): Promise<Invitation>;
|
|
1224
|
+
/**
|
|
1225
|
+
* Revokes a pending invitation.
|
|
1226
|
+
*
|
|
1227
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/customer_organizations/*\/invitations/*}:revoke` · permission `auth:write` · effect `destructive`
|
|
1228
|
+
*
|
|
1229
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
1230
|
+
*/
|
|
1231
|
+
revoke(request: RevokeInvitationRequest): Promise<Invitation>;
|
|
1232
|
+
/**
|
|
1233
|
+
* Accepts a pending invitation for an end user whose verified email is the
|
|
1234
|
+
* invited address, and creates the membership.
|
|
1235
|
+
*
|
|
1236
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/customer_organizations/*\/invitations/*}:accept` · permission `auth:write` · effect `write`
|
|
1237
|
+
*
|
|
1238
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
1239
|
+
*/
|
|
1240
|
+
accept(request: AcceptInvitationRequest): Promise<Invitation>;
|
|
1241
|
+
}
|
|
1242
|
+
/** `email_domains` of Sylphx Auth: Resource type `auth.sylphx.com/EmailDomain`. */
|
|
1243
|
+
export declare class EmailDomainsCollection {
|
|
1244
|
+
private readonly client;
|
|
1245
|
+
constructor(client: runtime.Client);
|
|
1246
|
+
/**
|
|
1247
|
+
* Gets an email domain.
|
|
1248
|
+
*
|
|
1249
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/customer_organizations/*\/email_domains/*}` · permission `auth:read` · effect `read`
|
|
1250
|
+
*
|
|
1251
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
1252
|
+
*/
|
|
1253
|
+
get(request: GetEmailDomainRequest): Promise<EmailDomain>;
|
|
1254
|
+
/**
|
|
1255
|
+
* Lists email domains.
|
|
1256
|
+
*
|
|
1257
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*\/customer_organizations/*}/email_domains` · permission `auth:read` · effect `read`
|
|
1258
|
+
*
|
|
1259
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
1260
|
+
*/
|
|
1261
|
+
list(request: ListEmailDomainsRequest): Promise<ListEmailDomainsResponse>;
|
|
1262
|
+
/** Every item of every page of `list`. */
|
|
1263
|
+
listAll(request: ListEmailDomainsRequest): AsyncGenerator<EmailDomain>;
|
|
1264
|
+
/**
|
|
1265
|
+
* Creates an email domain; the answer names the TXT record to publish.
|
|
1266
|
+
*
|
|
1267
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*\/customer_organizations/*}/email_domains` · permission `auth:write` · effect `write`
|
|
1268
|
+
*
|
|
1269
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`.
|
|
1270
|
+
*/
|
|
1271
|
+
create(request: CreateEmailDomainRequest): Promise<EmailDomain>;
|
|
1272
|
+
/**
|
|
1273
|
+
* Deletes an email domain.
|
|
1274
|
+
*
|
|
1275
|
+
* `DELETE /v1/{name=orgs/*\/projects/*\/envs/*\/customer_organizations/*\/email_domains/*}` · permission `auth:write` · effect `destructive`
|
|
1276
|
+
*
|
|
1277
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
1278
|
+
*/
|
|
1279
|
+
delete(request: DeleteEmailDomainRequest): Promise<Record<string, never>>;
|
|
1280
|
+
/**
|
|
1281
|
+
* Looks up the domain's TXT record now; found, the domain is verified.
|
|
1282
|
+
*
|
|
1283
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/customer_organizations/*\/email_domains/*}:verify` · permission `auth:write` · effect `write`
|
|
1284
|
+
*
|
|
1285
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
1286
|
+
*/
|
|
1287
|
+
verify(request: VerifyEmailDomainRequest): Promise<EmailDomain>;
|
|
1288
|
+
}
|
|
841
1289
|
/** `oauth_clients` of Sylphx Auth: Resource type `auth.sylphx.com/OauthClient`. */
|
|
842
1290
|
export declare class OauthClientsCollection {
|
|
843
1291
|
private readonly client;
|