@sylphx/sdk 0.31.0 → 0.32.1

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.
Files changed (120) hide show
  1. package/README.md +131 -4
  2. package/dist/access.d.ts +146 -17
  3. package/dist/access.js +114 -8
  4. package/dist/access.js.map +1 -1
  5. package/dist/agents.d.ts +1564 -0
  6. package/dist/agents.js +1096 -0
  7. package/dist/agents.js.map +1 -0
  8. package/dist/ai.d.ts +1 -2
  9. package/dist/ai.js +2 -3
  10. package/dist/ai.js.map +1 -1
  11. package/dist/artifacts.d.ts +1 -1
  12. package/dist/artifacts.js +2 -2
  13. package/dist/assets.d.ts +447 -0
  14. package/dist/assets.js +266 -0
  15. package/dist/assets.js.map +1 -0
  16. package/dist/auth/client.d.ts +239 -0
  17. package/dist/auth/client.js +337 -0
  18. package/dist/auth/client.js.map +1 -0
  19. package/dist/auth/end-user-keys-mock.d.ts +83 -0
  20. package/dist/auth/end-user-keys-mock.js +427 -0
  21. package/dist/auth/end-user-keys-mock.js.map +1 -0
  22. package/dist/auth/end-user-keys.d.ts +219 -0
  23. package/dist/auth/end-user-keys.js +240 -0
  24. package/dist/auth/end-user-keys.js.map +1 -0
  25. package/dist/auth/verify.d.ts +38 -3
  26. package/dist/auth/verify.js +58 -8
  27. package/dist/auth/verify.js.map +1 -1
  28. package/dist/auth.d.ts +656 -9
  29. package/dist/auth.js +563 -6
  30. package/dist/auth.js.map +1 -1
  31. package/dist/billing.d.ts +99 -21
  32. package/dist/billing.js +43 -5
  33. package/dist/billing.js.map +1 -1
  34. package/dist/broker.d.ts +5 -4
  35. package/dist/broker.js +3 -3
  36. package/dist/broker.js.map +1 -1
  37. package/dist/build.d.ts +362 -29
  38. package/dist/build.js +302 -10
  39. package/dist/build.js.map +1 -1
  40. package/dist/common.d.ts +1 -1
  41. package/dist/common.js +1 -1
  42. package/dist/config/flags.d.ts +140 -0
  43. package/dist/config/flags.js +462 -0
  44. package/dist/config/flags.js.map +1 -0
  45. package/dist/config.d.ts +380 -15
  46. package/dist/config.js +283 -5
  47. package/dist/config.js.map +1 -1
  48. package/dist/connections.d.ts +6 -6
  49. package/dist/connections.js +3 -3
  50. package/dist/data.d.ts +612 -7
  51. package/dist/data.js +566 -4
  52. package/dist/data.js.map +1 -1
  53. package/dist/entitlement.d.ts +10 -8
  54. package/dist/entitlement.js +3 -4
  55. package/dist/entitlement.js.map +1 -1
  56. package/dist/events/realtime.d.ts +69 -0
  57. package/dist/events/realtime.js +107 -0
  58. package/dist/events/realtime.js.map +1 -0
  59. package/dist/events/webhooks.d.ts +40 -0
  60. package/dist/events/webhooks.js +110 -0
  61. package/dist/events/webhooks.js.map +1 -0
  62. package/dist/events.d.ts +369 -22
  63. package/dist/events.js +311 -8
  64. package/dist/events.js.map +1 -1
  65. package/dist/flags.d.ts +18 -0
  66. package/dist/flags.js +44 -0
  67. package/dist/flags.js.map +1 -0
  68. package/dist/hosting.d.ts +13 -14
  69. package/dist/hosting.js +3 -4
  70. package/dist/hosting.js.map +1 -1
  71. package/dist/ids.d.ts +987 -0
  72. package/dist/ids.js +317 -0
  73. package/dist/ids.js.map +1 -0
  74. package/dist/index.d.ts +25 -1
  75. package/dist/index.js +34 -2
  76. package/dist/index.js.map +1 -1
  77. package/dist/keys.d.ts +2 -2
  78. package/dist/keys.js +3 -3
  79. package/dist/knowledge.d.ts +1192 -0
  80. package/dist/knowledge.js +1002 -0
  81. package/dist/knowledge.js.map +1 -0
  82. package/dist/localization.d.ts +663 -0
  83. package/dist/localization.js +491 -0
  84. package/dist/localization.js.map +1 -0
  85. package/dist/methods.js +3251 -133
  86. package/dist/methods.js.map +1 -1
  87. package/dist/money.d.ts +3086 -0
  88. package/dist/money.js +2358 -0
  89. package/dist/money.js.map +1 -0
  90. package/dist/network.d.ts +4 -5
  91. package/dist/network.js +3 -4
  92. package/dist/network.js.map +1 -1
  93. package/dist/notify.d.ts +667 -125
  94. package/dist/notify.js +471 -73
  95. package/dist/notify.js.map +1 -1
  96. package/dist/observability.d.ts +322 -7
  97. package/dist/observability.js +244 -8
  98. package/dist/observability.js.map +1 -1
  99. package/dist/realtime.d.ts +404 -0
  100. package/dist/realtime.js +312 -0
  101. package/dist/realtime.js.map +1 -0
  102. package/dist/release.d.ts +14 -15
  103. package/dist/release.js +3 -4
  104. package/dist/release.js.map +1 -1
  105. package/dist/runners.d.ts +2 -3
  106. package/dist/runners.js +3 -4
  107. package/dist/runners.js.map +1 -1
  108. package/dist/runtime.d.ts +5 -1
  109. package/dist/runtime.js +7 -3
  110. package/dist/runtime.js.map +1 -1
  111. package/dist/sandboxes.d.ts +64 -20
  112. package/dist/sandboxes.js +9 -4
  113. package/dist/sandboxes.js.map +1 -1
  114. package/dist/secrets.d.ts +342 -6
  115. package/dist/secrets.js +271 -4
  116. package/dist/secrets.js.map +1 -1
  117. package/dist/workflows.d.ts +969 -15
  118. package/dist/workflows.js +815 -6
  119. package/dist/workflows.js.map +1 -1
  120. package/package.json +2 -2
package/dist/auth.js CHANGED
@@ -1,8 +1,14 @@
1
- // @generated by sylphx-gen 0.1.0 from contracts@446ceb843d4ff88057b0db68e2e54e4aea52d8143b72d66016122995b878de20. Do not edit.
1
+ // @generated by sylphx-gen 0.1.0 from contracts@c8a7361c53e572321b0ec9fb014fd1e8279b007b62562423038e0d0e5b9d767a. Do not edit.
2
2
  // `sylphx.auth.v1`.
3
3
  import * as runtime from './runtime.js';
4
4
  import './common.js';
5
5
  runtime.registerSchemas({
6
+ 'sylphx.auth.v1.AcceptInvitationRequest': [
7
+ ['endUser', 'end_user'],
8
+ ],
9
+ 'sylphx.auth.v1.AttachEndUserExternalIdRequest': [
10
+ ['externalId', 'external_id'],
11
+ ],
6
12
  'sylphx.auth.v1.AuthConfig': [
7
13
  ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
8
14
  ['spec', 'spec', 'sylphx.auth.v1.AuthConfigSpec'],
@@ -18,6 +24,8 @@ runtime.registerSchemas({
18
24
  ['portal', 'portal', 'sylphx.auth.v1.PortalConfig'],
19
25
  ['mailSendingDomain', 'mail_sending_domain'],
20
26
  ['userSyncDatabase', 'user_sync_database'],
27
+ ['socialProviders', 'social_providers', 'sylphx.auth.v1.SocialProvider'],
28
+ ['testEmailPattern', 'test_email_pattern'],
21
29
  ],
22
30
  'sylphx.auth.v1.AuthConfigStatus': [
23
31
  ['observedGeneration', 'observed_generation'],
@@ -29,12 +37,23 @@ runtime.registerSchemas({
29
37
  ['customerOrganizationId', 'customer_organization_id'],
30
38
  ['customerOrganization', 'customer_organization', 'sylphx.auth.v1.CustomerOrganization'],
31
39
  ['validateOnly', 'validate_only'],
40
+ ['ownerEndUser', 'owner_end_user'],
41
+ ],
42
+ 'sylphx.auth.v1.CreateEmailDomainRequest': [
43
+ ['emailDomainId', 'email_domain_id'],
44
+ ['emailDomain', 'email_domain', 'sylphx.auth.v1.EmailDomain'],
45
+ ['validateOnly', 'validate_only'],
32
46
  ],
33
47
  'sylphx.auth.v1.CreateEndUserRequest': [
34
48
  ['endUserId', 'end_user_id'],
35
49
  ['endUser', 'end_user', 'sylphx.auth.v1.EndUser'],
36
50
  ['validateOnly', 'validate_only'],
37
51
  ],
52
+ 'sylphx.auth.v1.CreateInvitationRequest': [
53
+ ['invitationId', 'invitation_id'],
54
+ ['invitation', 'invitation', 'sylphx.auth.v1.Invitation'],
55
+ ['validateOnly', 'validate_only'],
56
+ ],
38
57
  'sylphx.auth.v1.CreateMembershipRequest': [
39
58
  ['membershipId', 'membership_id'],
40
59
  ['membership', 'membership', 'sylphx.auth.v1.Membership'],
@@ -45,6 +64,11 @@ runtime.registerSchemas({
45
64
  ['oauthClient', 'oauth_client', 'sylphx.auth.v1.OauthClient'],
46
65
  ['validateOnly', 'validate_only'],
47
66
  ],
67
+ 'sylphx.auth.v1.CreateOrganizationRoleRequest': [
68
+ ['organizationRoleId', 'organization_role_id'],
69
+ ['organizationRole', 'organization_role', 'sylphx.auth.v1.OrganizationRole'],
70
+ ['validateOnly', 'validate_only'],
71
+ ],
48
72
  'sylphx.auth.v1.CustomerOrganization': [
49
73
  ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
50
74
  ['verifiedDomains', 'verified_domains'],
@@ -55,6 +79,10 @@ runtime.registerSchemas({
55
79
  ['allowMissing', 'allow_missing'],
56
80
  ['validateOnly', 'validate_only'],
57
81
  ],
82
+ 'sylphx.auth.v1.DeleteEmailDomainRequest': [
83
+ ['allowMissing', 'allow_missing'],
84
+ ['validateOnly', 'validate_only'],
85
+ ],
58
86
  'sylphx.auth.v1.DeleteEndUserRequest': [
59
87
  ['allowMissing', 'allow_missing'],
60
88
  ['validateOnly', 'validate_only'],
@@ -67,19 +95,54 @@ runtime.registerSchemas({
67
95
  ['allowMissing', 'allow_missing'],
68
96
  ['validateOnly', 'validate_only'],
69
97
  ],
98
+ 'sylphx.auth.v1.DeleteOrganizationRoleRequest': [
99
+ ['allowMissing', 'allow_missing'],
100
+ ['validateOnly', 'validate_only'],
101
+ ],
102
+ 'sylphx.auth.v1.EmailDomain': [
103
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
104
+ ['verificationRecord', 'verification_record'],
105
+ ['verificationValue', 'verification_value'],
106
+ ['verifyTime', 'verify_time'],
107
+ ],
70
108
  'sylphx.auth.v1.EndUser': [
71
109
  ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
72
110
  ['emailVerifyTime', 'email_verify_time'],
73
111
  ['publicMetadata', 'public_metadata', undefined, 'json'],
74
112
  ['privateMetadata', 'private_metadata', undefined, 'json'],
75
113
  ['lastLoginTime', 'last_login_time'],
114
+ ['unsafeMetadata', 'unsafe_metadata', undefined, 'json'],
115
+ ['lockExpireTime', 'lock_expire_time'],
116
+ ['externalIds', 'external_ids', undefined, 'map'],
117
+ ['syntheticTime', 'synthetic_time'],
118
+ ],
119
+ 'sylphx.auth.v1.FindEndUserRequest': [
120
+ ['externalId', 'external_id'],
121
+ ],
122
+ 'sylphx.auth.v1.FindEndUserResponse': [
123
+ ['endUser', 'end_user', 'sylphx.auth.v1.EndUser'],
76
124
  ],
77
125
  'sylphx.auth.v1.GetAuthConfigRequest': [],
78
126
  'sylphx.auth.v1.GetCustomerOrganizationRequest': [],
127
+ 'sylphx.auth.v1.GetEmailDomainRequest': [],
79
128
  'sylphx.auth.v1.GetEndUserRequest': [],
129
+ 'sylphx.auth.v1.GetIdentityRequest': [],
130
+ 'sylphx.auth.v1.GetInvitationRequest': [],
80
131
  'sylphx.auth.v1.GetMembershipRequest': [],
81
132
  'sylphx.auth.v1.GetOauthClientRequest': [],
133
+ 'sylphx.auth.v1.GetOrganizationRoleRequest': [],
82
134
  'sylphx.auth.v1.GetSessionRequest': [],
135
+ 'sylphx.auth.v1.Identity': [
136
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
137
+ ['linkTime', 'link_time'],
138
+ ['lastUseTime', 'last_use_time'],
139
+ ],
140
+ 'sylphx.auth.v1.Invitation': [
141
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
142
+ ['expireTime', 'expire_time'],
143
+ ['acceptTime', 'accept_time'],
144
+ ['endUser', 'end_user'],
145
+ ],
83
146
  'sylphx.auth.v1.ListCustomerOrganizationsRequest': [
84
147
  ['pageSize', 'page_size'],
85
148
  ['pageToken', 'page_token'],
@@ -89,6 +152,15 @@ runtime.registerSchemas({
89
152
  ['customerOrganizations', 'customer_organizations', 'sylphx.auth.v1.CustomerOrganization'],
90
153
  ['nextPageToken', 'next_page_token'],
91
154
  ],
155
+ 'sylphx.auth.v1.ListEmailDomainsRequest': [
156
+ ['pageSize', 'page_size'],
157
+ ['pageToken', 'page_token'],
158
+ ['orderBy', 'order_by'],
159
+ ],
160
+ 'sylphx.auth.v1.ListEmailDomainsResponse': [
161
+ ['emailDomains', 'email_domains', 'sylphx.auth.v1.EmailDomain'],
162
+ ['nextPageToken', 'next_page_token'],
163
+ ],
92
164
  'sylphx.auth.v1.ListEndUsersRequest': [
93
165
  ['pageSize', 'page_size'],
94
166
  ['pageToken', 'page_token'],
@@ -98,6 +170,24 @@ runtime.registerSchemas({
98
170
  ['endUsers', 'end_users', 'sylphx.auth.v1.EndUser'],
99
171
  ['nextPageToken', 'next_page_token'],
100
172
  ],
173
+ 'sylphx.auth.v1.ListIdentitiesRequest': [
174
+ ['pageSize', 'page_size'],
175
+ ['pageToken', 'page_token'],
176
+ ['orderBy', 'order_by'],
177
+ ],
178
+ 'sylphx.auth.v1.ListIdentitiesResponse': [
179
+ ['identities', 'identities', 'sylphx.auth.v1.Identity'],
180
+ ['nextPageToken', 'next_page_token'],
181
+ ],
182
+ 'sylphx.auth.v1.ListInvitationsRequest': [
183
+ ['pageSize', 'page_size'],
184
+ ['pageToken', 'page_token'],
185
+ ['orderBy', 'order_by'],
186
+ ],
187
+ 'sylphx.auth.v1.ListInvitationsResponse': [
188
+ ['invitations', 'invitations', 'sylphx.auth.v1.Invitation'],
189
+ ['nextPageToken', 'next_page_token'],
190
+ ],
101
191
  'sylphx.auth.v1.ListMembershipsRequest': [
102
192
  ['pageSize', 'page_size'],
103
193
  ['pageToken', 'page_token'],
@@ -116,6 +206,15 @@ runtime.registerSchemas({
116
206
  ['oauthClients', 'oauth_clients', 'sylphx.auth.v1.OauthClient'],
117
207
  ['nextPageToken', 'next_page_token'],
118
208
  ],
209
+ 'sylphx.auth.v1.ListOrganizationRolesRequest': [
210
+ ['pageSize', 'page_size'],
211
+ ['pageToken', 'page_token'],
212
+ ['orderBy', 'order_by'],
213
+ ],
214
+ 'sylphx.auth.v1.ListOrganizationRolesResponse': [
215
+ ['organizationRoles', 'organization_roles', 'sylphx.auth.v1.OrganizationRole'],
216
+ ['nextPageToken', 'next_page_token'],
217
+ ],
119
218
  'sylphx.auth.v1.ListSessionsRequest': [
120
219
  ['pageSize', 'page_size'],
121
220
  ['pageToken', 'page_token'],
@@ -129,6 +228,9 @@ runtime.registerSchemas({
129
228
  ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
130
229
  ['endUser', 'end_user'],
131
230
  ],
231
+ 'sylphx.auth.v1.MoveIdentityRequest': [
232
+ ['targetEndUser', 'target_end_user'],
233
+ ],
132
234
  'sylphx.auth.v1.OauthClient': [
133
235
  ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
134
236
  ['spec', 'spec', 'sylphx.auth.v1.OauthClientSpec'],
@@ -151,6 +253,10 @@ runtime.registerSchemas({
151
253
  ['clientSecret', 'client_secret'],
152
254
  ['clientSecretLast4', 'client_secret_last4'],
153
255
  ],
256
+ 'sylphx.auth.v1.OrganizationRole': [
257
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
258
+ ['autoAssign', 'auto_assign'],
259
+ ],
154
260
  'sylphx.auth.v1.PasskeyPolicy': [
155
261
  ['deviceBound', 'device_bound'],
156
262
  ['aaguidAllowlist', 'aaguid_allowlist'],
@@ -167,6 +273,7 @@ runtime.registerSchemas({
167
273
  'sylphx.auth.v1.RevokeEndUserSessionsResponse': [
168
274
  ['revokedCount', 'revoked_count'],
169
275
  ],
276
+ 'sylphx.auth.v1.RevokeInvitationRequest': [],
170
277
  'sylphx.auth.v1.RevokeSessionRequest': [],
171
278
  'sylphx.auth.v1.RollOauthClientSecretRequest': [
172
279
  ['gracePeriod', 'grace_period'],
@@ -189,7 +296,9 @@ runtime.registerSchemas({
189
296
  ['absoluteTimeout', 'absolute_timeout'],
190
297
  ['fingerprintBinding', 'fingerprint_binding'],
191
298
  ],
299
+ 'sylphx.auth.v1.SocialProvider': [],
192
300
  'sylphx.auth.v1.SuspendEndUserRequest': [],
301
+ 'sylphx.auth.v1.UnlockEndUserRequest': [],
193
302
  'sylphx.auth.v1.UpdateAuthConfigRequest': [
194
303
  ['authConfig', 'auth_config', 'sylphx.auth.v1.AuthConfig'],
195
304
  ['updateMask', 'update_mask'],
@@ -218,13 +327,19 @@ runtime.registerSchemas({
218
327
  ['allowMissing', 'allow_missing'],
219
328
  ['validateOnly', 'validate_only'],
220
329
  ],
330
+ 'sylphx.auth.v1.UpdateOrganizationRoleRequest': [
331
+ ['organizationRole', 'organization_role', 'sylphx.auth.v1.OrganizationRole'],
332
+ ['updateMask', 'update_mask'],
333
+ ['validateOnly', 'validate_only'],
334
+ ],
335
+ 'sylphx.auth.v1.VerifyEmailDomainRequest': [],
221
336
  });
222
337
  /**
223
338
  * AuthService is Sylphx Auth's management surface: sign-in for a customer's
224
- * own users, their sessions, customer organizations, and OAuth clients
225
- * (docs/services/auth/vision.md). Sylphx orgs, members, principals, and keys
226
- * are Kernel Access, never Auth. End-user ceremonies (sign-in, recovery, OAuth
227
- * authorize and token) are protocol endpoints, not Resource methods.
339
+ * own users, their sessions, customer organizations, and OAuth clients.
340
+ * Sylphx orgs, members, principals, and keys are Sylphx Access, never Auth.
341
+ * End-user ceremonies (sign-in, recovery, OAuth authorize and token) are
342
+ * protocol endpoints, not Resource methods.
228
343
  *
229
344
  * Namespace of Sylphx Auth on `Sylphx`.
230
345
  */
@@ -235,18 +350,30 @@ export class AuthApi {
235
350
  endUsers;
236
351
  /** The `sessions` collection. */
237
352
  sessions;
353
+ /** The `identities` collection. */
354
+ identities;
238
355
  /** The `customer_organizations` collection. */
239
356
  customerOrganizations;
240
357
  /** The `memberships` collection. */
241
358
  memberships;
359
+ /** The `organization_roles` collection. */
360
+ organizationRoles;
361
+ /** The `invitations` collection. */
362
+ invitations;
363
+ /** The `email_domains` collection. */
364
+ emailDomains;
242
365
  /** The `oauth_clients` collection. */
243
366
  oauthClients;
244
367
  constructor(client) {
245
368
  this.authConfigs = new AuthConfigsCollection(client);
246
369
  this.endUsers = new EndUsersCollection(client);
247
370
  this.sessions = new SessionsCollection(client);
371
+ this.identities = new IdentitiesCollection(client);
248
372
  this.customerOrganizations = new CustomerOrganizationsCollection(client);
249
373
  this.memberships = new MembershipsCollection(client);
374
+ this.organizationRoles = new OrganizationRolesCollection(client);
375
+ this.invitations = new InvitationsCollection(client);
376
+ this.emailDomains = new EmailDomainsCollection(client);
250
377
  this.oauthClients = new OauthClientsCollection(client);
251
378
  }
252
379
  }
@@ -423,6 +550,23 @@ export class EndUsersCollection {
423
550
  mutation: true,
424
551
  });
425
552
  }
553
+ /**
554
+ * Clears an end user's sign-in lock (repeated failed sign-ins) now.
555
+ *
556
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/end_users/*}:unlock` · permission `auth:write` · effect `write`
557
+ *
558
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
559
+ */
560
+ async unlock(request) {
561
+ return this.client.call({
562
+ method: 'POST',
563
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/end_users/*', 'name')}:unlock`,
564
+ body: runtime.omit(request, ['name']),
565
+ bodyType: 'sylphx.auth.v1.UnlockEndUserRequest',
566
+ responseType: 'sylphx.auth.v1.EndUser',
567
+ mutation: true,
568
+ });
569
+ }
426
570
  /**
427
571
  * Revokes every session of an end user.
428
572
  *
@@ -440,6 +584,45 @@ export class EndUsersCollection {
440
584
  mutation: true,
441
585
  });
442
586
  }
587
+ /**
588
+ * Sets the customer's own id for an end user, once: an unset namespace is
589
+ * written, a set one is never rewritten, and a different value for a set
590
+ * namespace is refused. A namespace holds one id for the life of the user.
591
+ * Erasure removes the ids and remembers their hashes, so a value that
592
+ * belonged to an erased user is never handed to another one.
593
+ *
594
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/end_users/*}:attachExternalId` · permission `auth:write` · effect `write`
595
+ *
596
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
597
+ */
598
+ async attachExternalId(request) {
599
+ return this.client.call({
600
+ method: 'POST',
601
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/end_users/*', 'name')}:attachExternalId`,
602
+ body: runtime.omit(request, ['name']),
603
+ bodyType: 'sylphx.auth.v1.AttachEndUserExternalIdRequest',
604
+ responseType: 'sylphx.auth.v1.EndUser',
605
+ mutation: true,
606
+ });
607
+ }
608
+ /**
609
+ * Finds the one end user of one of the customer's own ids. An id that
610
+ * belongs to no live user of this environment is `RESOURCE_NOT_FOUND`,
611
+ * the same answer a value erased with its user gives.
612
+ *
613
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/end_users:find` · permission `auth:read` · effect `read`
614
+ *
615
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `RESOURCE_NOT_FOUND`.
616
+ */
617
+ async find(request) {
618
+ return this.client.call({
619
+ method: 'GET',
620
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/end_users:find`,
621
+ query: { namespace: request.namespace, external_id: request.externalId },
622
+ responseType: 'sylphx.auth.v1.FindEndUserResponse',
623
+ mutation: false,
624
+ });
625
+ }
443
626
  }
444
627
  /** `sessions` of Sylphx Auth: Resource type `auth.sylphx.com/Session`. */
445
628
  export class SessionsCollection {
@@ -507,6 +690,79 @@ export class SessionsCollection {
507
690
  });
508
691
  }
509
692
  }
693
+ /** `identities` of Sylphx Auth: Resource type `auth.sylphx.com/Identity`. */
694
+ export class IdentitiesCollection {
695
+ client;
696
+ constructor(client) {
697
+ this.client = client;
698
+ }
699
+ /**
700
+ * Gets an identity of an end user.
701
+ *
702
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/end_users/*\/identities/*}` · permission `auth:read` · effect `read`
703
+ *
704
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
705
+ */
706
+ async get(request) {
707
+ return this.client.call({
708
+ method: 'GET',
709
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/end_users/*/identities/*', 'name')}`,
710
+ responseType: 'sylphx.auth.v1.Identity',
711
+ mutation: false,
712
+ });
713
+ }
714
+ /**
715
+ * Lists the identities an end user signs in with.
716
+ *
717
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*\/end_users/*}/identities` · permission `auth:read` · effect `read`
718
+ *
719
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
720
+ */
721
+ async list(request) {
722
+ return this.client.call({
723
+ method: 'GET',
724
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*/end_users/*', 'parent')}/identities`,
725
+ query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter, order_by: request.orderBy },
726
+ responseType: 'sylphx.auth.v1.ListIdentitiesResponse',
727
+ mutation: false,
728
+ });
729
+ }
730
+ /** Every item of every page of `list`. */
731
+ async *listAll(request) {
732
+ let next = request;
733
+ for (;;) {
734
+ const page = await this.list(next);
735
+ yield* page.identities ?? [];
736
+ if (page.nextPageToken === undefined || page.nextPageToken === '')
737
+ return;
738
+ next = { ...request, pageToken: page.nextPageToken };
739
+ }
740
+ }
741
+ /**
742
+ * Moves a federated or device identity from one end user to another, to
743
+ * fix a wrongly linked player. One transaction: the identity changes owner,
744
+ * the sessions of both end users are revoked, and nothing else about
745
+ * either moves (profile, memberships, data). Refused when it would leave
746
+ * the source with no sign-in, unless the source is suspended, and when the
747
+ * target already has an identity of the same provider. The reason is
748
+ * audited with the operator, both end users and the identity's fingerprint.
749
+ * An operator action: an end user's own session cannot call it.
750
+ *
751
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/end_users/*\/identities/*}:move` · permission `auth:write` · effect `destructive`
752
+ *
753
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
754
+ */
755
+ async move(request) {
756
+ return this.client.call({
757
+ method: 'POST',
758
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/end_users/*/identities/*', 'name')}:move`,
759
+ body: runtime.omit(request, ['name']),
760
+ bodyType: 'sylphx.auth.v1.MoveIdentityRequest',
761
+ responseType: 'sylphx.auth.v1.Identity',
762
+ mutation: true,
763
+ });
764
+ }
765
+ }
510
766
  /** `customer_organizations` of Sylphx Auth: Resource type `auth.sylphx.com/CustomerOrganization`. */
511
767
  export class CustomerOrganizationsCollection {
512
768
  client;
@@ -566,7 +822,7 @@ export class CustomerOrganizationsCollection {
566
822
  return this.client.call({
567
823
  method: 'POST',
568
824
  path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/customer_organizations`,
569
- query: { customer_organization_id: request.customerOrganizationId, validate_only: request.validateOnly },
825
+ query: { customer_organization_id: request.customerOrganizationId, validate_only: request.validateOnly, owner_end_user: request.ownerEndUser },
570
826
  body: request.customerOrganization ?? {},
571
827
  bodyType: 'sylphx.auth.v1.CustomerOrganization',
572
828
  responseType: 'sylphx.auth.v1.CustomerOrganization',
@@ -707,6 +963,307 @@ export class MembershipsCollection {
707
963
  });
708
964
  }
709
965
  }
966
+ /** `organization_roles` of Sylphx Auth: Resource type `auth.sylphx.com/OrganizationRole`. */
967
+ export class OrganizationRolesCollection {
968
+ client;
969
+ constructor(client) {
970
+ this.client = client;
971
+ }
972
+ /**
973
+ * Gets an organization role.
974
+ *
975
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/organization_roles/*}` · permission `auth:read` · effect `read`
976
+ *
977
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
978
+ */
979
+ async get(request) {
980
+ return this.client.call({
981
+ method: 'GET',
982
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/organization_roles/*', 'name')}`,
983
+ responseType: 'sylphx.auth.v1.OrganizationRole',
984
+ mutation: false,
985
+ });
986
+ }
987
+ /**
988
+ * Lists organization roles.
989
+ *
990
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/organization_roles` · permission `auth:read` · effect `read`
991
+ *
992
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
993
+ */
994
+ async list(request) {
995
+ return this.client.call({
996
+ method: 'GET',
997
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/organization_roles`,
998
+ query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter, order_by: request.orderBy },
999
+ responseType: 'sylphx.auth.v1.ListOrganizationRolesResponse',
1000
+ mutation: false,
1001
+ });
1002
+ }
1003
+ /** Every item of every page of `list`. */
1004
+ async *listAll(request) {
1005
+ let next = request;
1006
+ for (;;) {
1007
+ const page = await this.list(next);
1008
+ yield* page.organizationRoles ?? [];
1009
+ if (page.nextPageToken === undefined || page.nextPageToken === '')
1010
+ return;
1011
+ next = { ...request, pageToken: page.nextPageToken };
1012
+ }
1013
+ }
1014
+ /**
1015
+ * Creates an organization role.
1016
+ *
1017
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/organization_roles` · permission `auth:write` · effect `write`
1018
+ *
1019
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`.
1020
+ */
1021
+ async create(request) {
1022
+ return this.client.call({
1023
+ method: 'POST',
1024
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/organization_roles`,
1025
+ query: { organization_role_id: request.organizationRoleId, validate_only: request.validateOnly },
1026
+ body: request.organizationRole ?? {},
1027
+ bodyType: 'sylphx.auth.v1.OrganizationRole',
1028
+ responseType: 'sylphx.auth.v1.OrganizationRole',
1029
+ mutation: true,
1030
+ });
1031
+ }
1032
+ /**
1033
+ * Updates an organization role.
1034
+ *
1035
+ * `PATCH /v1/{organization_role.name=orgs/*\/projects/*\/envs/*\/organization_roles/*}` · permission `auth:write` · effect `write`
1036
+ *
1037
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1038
+ */
1039
+ async update(request) {
1040
+ return this.client.call({
1041
+ method: 'PATCH',
1042
+ path: `/v1/${runtime.pathParam(request.organizationRole?.name, 'orgs/*/projects/*/envs/*/organization_roles/*', 'organization_role.name')}`,
1043
+ query: { update_mask: request.updateMask, validate_only: request.validateOnly },
1044
+ body: request.organizationRole ?? {},
1045
+ bodyType: 'sylphx.auth.v1.OrganizationRole',
1046
+ responseType: 'sylphx.auth.v1.OrganizationRole',
1047
+ mutation: true,
1048
+ });
1049
+ }
1050
+ /**
1051
+ * Deletes an organization role.
1052
+ *
1053
+ * `DELETE /v1/{name=orgs/*\/projects/*\/envs/*\/organization_roles/*}` · permission `auth:write` · effect `destructive`
1054
+ *
1055
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1056
+ */
1057
+ async delete(request) {
1058
+ return this.client.call({
1059
+ method: 'DELETE',
1060
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/organization_roles/*', 'name')}`,
1061
+ query: { etag: request.etag, allow_missing: request.allowMissing, validate_only: request.validateOnly },
1062
+ mutation: true,
1063
+ });
1064
+ }
1065
+ }
1066
+ /** `invitations` of Sylphx Auth: Resource type `auth.sylphx.com/Invitation`. */
1067
+ export class InvitationsCollection {
1068
+ client;
1069
+ constructor(client) {
1070
+ this.client = client;
1071
+ }
1072
+ /**
1073
+ * Gets an invitation.
1074
+ *
1075
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/customer_organizations/*\/invitations/*}` · permission `auth:read` · effect `read`
1076
+ *
1077
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
1078
+ */
1079
+ async get(request) {
1080
+ return this.client.call({
1081
+ method: 'GET',
1082
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/customer_organizations/*/invitations/*', 'name')}`,
1083
+ responseType: 'sylphx.auth.v1.Invitation',
1084
+ mutation: false,
1085
+ });
1086
+ }
1087
+ /**
1088
+ * Lists invitations.
1089
+ *
1090
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*\/customer_organizations/*}/invitations` · permission `auth:read` · effect `read`
1091
+ *
1092
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
1093
+ */
1094
+ async list(request) {
1095
+ return this.client.call({
1096
+ method: 'GET',
1097
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*/customer_organizations/*', 'parent')}/invitations`,
1098
+ query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter, order_by: request.orderBy },
1099
+ responseType: 'sylphx.auth.v1.ListInvitationsResponse',
1100
+ mutation: false,
1101
+ });
1102
+ }
1103
+ /** Every item of every page of `list`. */
1104
+ async *listAll(request) {
1105
+ let next = request;
1106
+ for (;;) {
1107
+ const page = await this.list(next);
1108
+ yield* page.invitations ?? [];
1109
+ if (page.nextPageToken === undefined || page.nextPageToken === '')
1110
+ return;
1111
+ next = { ...request, pageToken: page.nextPageToken };
1112
+ }
1113
+ }
1114
+ /**
1115
+ * Creates an invitation.
1116
+ *
1117
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*\/customer_organizations/*}/invitations` · permission `auth:write` · effect `write`
1118
+ *
1119
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`.
1120
+ */
1121
+ async create(request) {
1122
+ return this.client.call({
1123
+ method: 'POST',
1124
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*/customer_organizations/*', 'parent')}/invitations`,
1125
+ query: { invitation_id: request.invitationId, validate_only: request.validateOnly },
1126
+ body: request.invitation ?? {},
1127
+ bodyType: 'sylphx.auth.v1.Invitation',
1128
+ responseType: 'sylphx.auth.v1.Invitation',
1129
+ mutation: true,
1130
+ });
1131
+ }
1132
+ /**
1133
+ * Revokes a pending invitation.
1134
+ *
1135
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/customer_organizations/*\/invitations/*}:revoke` · permission `auth:write` · effect `destructive`
1136
+ *
1137
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1138
+ */
1139
+ async revoke(request) {
1140
+ return this.client.call({
1141
+ method: 'POST',
1142
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/customer_organizations/*/invitations/*', 'name')}:revoke`,
1143
+ body: runtime.omit(request, ['name']),
1144
+ bodyType: 'sylphx.auth.v1.RevokeInvitationRequest',
1145
+ responseType: 'sylphx.auth.v1.Invitation',
1146
+ mutation: true,
1147
+ });
1148
+ }
1149
+ /**
1150
+ * Accepts a pending invitation for an end user whose verified email is the
1151
+ * invited address, and creates the membership.
1152
+ *
1153
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/customer_organizations/*\/invitations/*}:accept` · permission `auth:write` · effect `write`
1154
+ *
1155
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1156
+ */
1157
+ async accept(request) {
1158
+ return this.client.call({
1159
+ method: 'POST',
1160
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/customer_organizations/*/invitations/*', 'name')}:accept`,
1161
+ body: runtime.omit(request, ['name']),
1162
+ bodyType: 'sylphx.auth.v1.AcceptInvitationRequest',
1163
+ responseType: 'sylphx.auth.v1.Invitation',
1164
+ mutation: true,
1165
+ });
1166
+ }
1167
+ }
1168
+ /** `email_domains` of Sylphx Auth: Resource type `auth.sylphx.com/EmailDomain`. */
1169
+ export class EmailDomainsCollection {
1170
+ client;
1171
+ constructor(client) {
1172
+ this.client = client;
1173
+ }
1174
+ /**
1175
+ * Gets an email domain.
1176
+ *
1177
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/customer_organizations/*\/email_domains/*}` · permission `auth:read` · effect `read`
1178
+ *
1179
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
1180
+ */
1181
+ async get(request) {
1182
+ return this.client.call({
1183
+ method: 'GET',
1184
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/customer_organizations/*/email_domains/*', 'name')}`,
1185
+ responseType: 'sylphx.auth.v1.EmailDomain',
1186
+ mutation: false,
1187
+ });
1188
+ }
1189
+ /**
1190
+ * Lists email domains.
1191
+ *
1192
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*\/customer_organizations/*}/email_domains` · permission `auth:read` · effect `read`
1193
+ *
1194
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
1195
+ */
1196
+ async list(request) {
1197
+ return this.client.call({
1198
+ method: 'GET',
1199
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*/customer_organizations/*', 'parent')}/email_domains`,
1200
+ query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter, order_by: request.orderBy },
1201
+ responseType: 'sylphx.auth.v1.ListEmailDomainsResponse',
1202
+ mutation: false,
1203
+ });
1204
+ }
1205
+ /** Every item of every page of `list`. */
1206
+ async *listAll(request) {
1207
+ let next = request;
1208
+ for (;;) {
1209
+ const page = await this.list(next);
1210
+ yield* page.emailDomains ?? [];
1211
+ if (page.nextPageToken === undefined || page.nextPageToken === '')
1212
+ return;
1213
+ next = { ...request, pageToken: page.nextPageToken };
1214
+ }
1215
+ }
1216
+ /**
1217
+ * Creates an email domain; the answer names the TXT record to publish.
1218
+ *
1219
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*\/customer_organizations/*}/email_domains` · 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
+ async create(request) {
1224
+ return this.client.call({
1225
+ method: 'POST',
1226
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*/customer_organizations/*', 'parent')}/email_domains`,
1227
+ query: { email_domain_id: request.emailDomainId, validate_only: request.validateOnly },
1228
+ body: request.emailDomain ?? {},
1229
+ bodyType: 'sylphx.auth.v1.EmailDomain',
1230
+ responseType: 'sylphx.auth.v1.EmailDomain',
1231
+ mutation: true,
1232
+ });
1233
+ }
1234
+ /**
1235
+ * Deletes an email domain.
1236
+ *
1237
+ * `DELETE /v1/{name=orgs/*\/projects/*\/envs/*\/customer_organizations/*\/email_domains/*}` · permission `auth:write` · effect `destructive`
1238
+ *
1239
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1240
+ */
1241
+ async delete(request) {
1242
+ return this.client.call({
1243
+ method: 'DELETE',
1244
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/customer_organizations/*/email_domains/*', 'name')}`,
1245
+ query: { etag: request.etag, allow_missing: request.allowMissing, validate_only: request.validateOnly },
1246
+ mutation: true,
1247
+ });
1248
+ }
1249
+ /**
1250
+ * Looks up the domain's TXT record now; found, the domain is verified.
1251
+ *
1252
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/customer_organizations/*\/email_domains/*}:verify` · permission `auth:write` · effect `write`
1253
+ *
1254
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1255
+ */
1256
+ async verify(request) {
1257
+ return this.client.call({
1258
+ method: 'POST',
1259
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/customer_organizations/*/email_domains/*', 'name')}:verify`,
1260
+ body: runtime.omit(request, ['name']),
1261
+ bodyType: 'sylphx.auth.v1.VerifyEmailDomainRequest',
1262
+ responseType: 'sylphx.auth.v1.EmailDomain',
1263
+ mutation: true,
1264
+ });
1265
+ }
1266
+ }
710
1267
  /** `oauth_clients` of Sylphx Auth: Resource type `auth.sylphx.com/OauthClient`. */
711
1268
  export class OauthClientsCollection {
712
1269
  client;