@sylphx/sdk 0.27.0 → 0.30.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/LICENSE +21 -0
- package/README.md +30 -73
- package/dist/access.d.ts +659 -0
- package/dist/access.js +638 -0
- package/dist/access.js.map +1 -0
- package/dist/ai.d.ts +176 -0
- package/dist/ai.js +112 -0
- package/dist/ai.js.map +1 -0
- package/dist/artifacts.d.ts +165 -0
- package/dist/artifacts.js +129 -0
- package/dist/artifacts.js.map +1 -0
- package/dist/auth.d.ts +896 -0
- package/dist/auth.js +828 -0
- package/dist/auth.js.map +1 -0
- package/dist/billing.d.ts +758 -0
- package/dist/billing.js +553 -0
- package/dist/billing.js.map +1 -0
- package/dist/broker.d.ts +226 -0
- package/dist/broker.js +187 -0
- package/dist/broker.js.map +1 -0
- package/dist/build.d.ts +313 -0
- package/dist/build.js +271 -0
- package/dist/build.js.map +1 -0
- package/dist/common.d.ts +162 -0
- package/dist/common.js +41 -0
- package/dist/common.js.map +1 -0
- package/dist/config.d.ts +198 -0
- package/dist/config.js +168 -0
- package/dist/config.js.map +1 -0
- package/dist/connections.d.ts +354 -0
- package/dist/connections.js +313 -0
- package/dist/connections.js.map +1 -0
- package/dist/data.d.ts +858 -0
- package/dist/data.js +814 -0
- package/dist/data.js.map +1 -0
- package/dist/entitlement.d.ts +172 -0
- package/dist/entitlement.js +116 -0
- package/dist/entitlement.js.map +1 -0
- package/dist/events.d.ts +1324 -0
- package/dist/events.js +1227 -0
- package/dist/events.js.map +1 -0
- package/dist/hosting.d.ts +709 -0
- package/dist/hosting.js +611 -0
- package/dist/hosting.js.map +1 -0
- package/dist/index.d.ts +79 -11493
- package/dist/index.js +113 -0
- package/dist/index.js.map +1 -0
- package/dist/keys.d.ts +438 -0
- package/dist/keys.js +406 -0
- package/dist/keys.js.map +1 -0
- package/dist/methods.d.ts +2 -0
- package/dist/methods.js +3995 -0
- package/dist/methods.js.map +1 -0
- package/dist/network.d.ts +733 -0
- package/dist/network.js +711 -0
- package/dist/network.js.map +1 -0
- package/dist/notify.d.ts +1359 -0
- package/dist/notify.js +1282 -0
- package/dist/notify.js.map +1 -0
- package/dist/observability.d.ts +509 -0
- package/dist/observability.js +437 -0
- package/dist/observability.js.map +1 -0
- package/dist/release.d.ts +303 -0
- package/dist/release.js +214 -0
- package/dist/release.js.map +1 -0
- package/dist/runners.d.ts +262 -0
- package/dist/runners.js +238 -0
- package/dist/runners.js.map +1 -0
- package/dist/runtime.d.ts +88 -0
- package/dist/runtime.js +226 -0
- package/dist/runtime.js.map +1 -0
- package/dist/sandboxes.d.ts +1705 -0
- package/dist/sandboxes.js +1226 -0
- package/dist/sandboxes.js.map +1 -0
- package/dist/secrets.d.ts +508 -0
- package/dist/secrets.js +474 -0
- package/dist/secrets.js.map +1 -0
- package/dist/workflows.d.ts +678 -0
- package/dist/workflows.js +595 -0
- package/dist/workflows.js.map +1 -0
- package/package.json +33 -106
- package/dist/health/index.d.ts +0 -1394
- package/dist/health/index.mjs +0 -1394
- package/dist/health/index.mjs.map +0 -1
- package/dist/index.mjs +0 -10386
- package/dist/index.mjs.map +0 -1
- package/dist/nextjs/index.d.ts +0 -724
- package/dist/nextjs/index.mjs +0 -3329
- package/dist/nextjs/index.mjs.map +0 -1
- package/dist/react/index.d.ts +0 -14168
- package/dist/react/index.mjs +0 -37002
- package/dist/react/index.mjs.map +0 -1
- package/dist/server/index.d.ts +0 -2017
- package/dist/server/index.mjs +0 -3446
- package/dist/server/index.mjs.map +0 -1
- package/dist/tasks.d.ts +0 -1463
- package/dist/tasks.mjs +0 -1907
- package/dist/tasks.mjs.map +0 -1
- package/dist/web-analytics.d.ts +0 -90
- package/dist/web-analytics.mjs +0 -225
- package/dist/web-analytics.mjs.map +0 -1
package/dist/auth.js
ADDED
|
@@ -0,0 +1,828 @@
|
|
|
1
|
+
// @generated by sylphx-gen 0.1.0 from contracts@cdf6473b36ca648759a7f4b1fc21554541d52a947477e6e9d1d7a6a9a79bdaa0. Do not edit.
|
|
2
|
+
// `sylphx.auth.v1`.
|
|
3
|
+
import * as runtime from './runtime.js';
|
|
4
|
+
import './common.js';
|
|
5
|
+
runtime.registerSchemas({
|
|
6
|
+
'sylphx.auth.v1.AuthConfig': [
|
|
7
|
+
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
8
|
+
['spec', 'spec', 'sylphx.auth.v1.AuthConfigSpec'],
|
|
9
|
+
['status', 'status', 'sylphx.auth.v1.AuthConfigStatus'],
|
|
10
|
+
],
|
|
11
|
+
'sylphx.auth.v1.AuthConfigSpec': [
|
|
12
|
+
['authMethods', 'auth_methods'],
|
|
13
|
+
['mfaRequired', 'mfa_required'],
|
|
14
|
+
['passkeyPolicy', 'passkey_policy', 'sylphx.auth.v1.PasskeyPolicy'],
|
|
15
|
+
['lockoutEnabled', 'lockout_enabled'],
|
|
16
|
+
['sessionPolicy', 'session_policy', 'sylphx.auth.v1.SessionPolicy'],
|
|
17
|
+
['captchaSecret', 'captcha_secret'],
|
|
18
|
+
['portal', 'portal', 'sylphx.auth.v1.PortalConfig'],
|
|
19
|
+
['mailSendingDomain', 'mail_sending_domain'],
|
|
20
|
+
['userSyncDatabase', 'user_sync_database'],
|
|
21
|
+
],
|
|
22
|
+
'sylphx.auth.v1.AuthConfigStatus': [
|
|
23
|
+
['observedGeneration', 'observed_generation'],
|
|
24
|
+
['conditions', 'conditions', 'sylphx.common.v1.Condition'],
|
|
25
|
+
['portalOrigin', 'portal_origin'],
|
|
26
|
+
['issuerUri', 'issuer_uri'],
|
|
27
|
+
],
|
|
28
|
+
'sylphx.auth.v1.CreateCustomerOrganizationRequest': [
|
|
29
|
+
['customerOrganizationId', 'customer_organization_id'],
|
|
30
|
+
['customerOrganization', 'customer_organization', 'sylphx.auth.v1.CustomerOrganization'],
|
|
31
|
+
['validateOnly', 'validate_only'],
|
|
32
|
+
],
|
|
33
|
+
'sylphx.auth.v1.CreateEndUserRequest': [
|
|
34
|
+
['endUserId', 'end_user_id'],
|
|
35
|
+
['endUser', 'end_user', 'sylphx.auth.v1.EndUser'],
|
|
36
|
+
['validateOnly', 'validate_only'],
|
|
37
|
+
],
|
|
38
|
+
'sylphx.auth.v1.CreateMembershipRequest': [
|
|
39
|
+
['membershipId', 'membership_id'],
|
|
40
|
+
['membership', 'membership', 'sylphx.auth.v1.Membership'],
|
|
41
|
+
['validateOnly', 'validate_only'],
|
|
42
|
+
],
|
|
43
|
+
'sylphx.auth.v1.CreateOauthClientRequest': [
|
|
44
|
+
['oauthClientId', 'oauth_client_id'],
|
|
45
|
+
['oauthClient', 'oauth_client', 'sylphx.auth.v1.OauthClient'],
|
|
46
|
+
['validateOnly', 'validate_only'],
|
|
47
|
+
],
|
|
48
|
+
'sylphx.auth.v1.CustomerOrganization': [
|
|
49
|
+
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
50
|
+
['verifiedDomains', 'verified_domains'],
|
|
51
|
+
['publicMetadata', 'public_metadata', undefined, 'json'],
|
|
52
|
+
['memberCount', 'member_count'],
|
|
53
|
+
],
|
|
54
|
+
'sylphx.auth.v1.DeleteCustomerOrganizationRequest': [
|
|
55
|
+
['allowMissing', 'allow_missing'],
|
|
56
|
+
['validateOnly', 'validate_only'],
|
|
57
|
+
],
|
|
58
|
+
'sylphx.auth.v1.DeleteEndUserRequest': [
|
|
59
|
+
['allowMissing', 'allow_missing'],
|
|
60
|
+
['validateOnly', 'validate_only'],
|
|
61
|
+
],
|
|
62
|
+
'sylphx.auth.v1.DeleteMembershipRequest': [
|
|
63
|
+
['allowMissing', 'allow_missing'],
|
|
64
|
+
['validateOnly', 'validate_only'],
|
|
65
|
+
],
|
|
66
|
+
'sylphx.auth.v1.DeleteOauthClientRequest': [
|
|
67
|
+
['allowMissing', 'allow_missing'],
|
|
68
|
+
['validateOnly', 'validate_only'],
|
|
69
|
+
],
|
|
70
|
+
'sylphx.auth.v1.EndUser': [
|
|
71
|
+
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
72
|
+
['emailVerifyTime', 'email_verify_time'],
|
|
73
|
+
['publicMetadata', 'public_metadata', undefined, 'json'],
|
|
74
|
+
['privateMetadata', 'private_metadata', undefined, 'json'],
|
|
75
|
+
['lastLoginTime', 'last_login_time'],
|
|
76
|
+
],
|
|
77
|
+
'sylphx.auth.v1.GetAuthConfigRequest': [],
|
|
78
|
+
'sylphx.auth.v1.GetCustomerOrganizationRequest': [],
|
|
79
|
+
'sylphx.auth.v1.GetEndUserRequest': [],
|
|
80
|
+
'sylphx.auth.v1.GetMembershipRequest': [],
|
|
81
|
+
'sylphx.auth.v1.GetOauthClientRequest': [],
|
|
82
|
+
'sylphx.auth.v1.GetSessionRequest': [],
|
|
83
|
+
'sylphx.auth.v1.ListCustomerOrganizationsRequest': [
|
|
84
|
+
['pageSize', 'page_size'],
|
|
85
|
+
['pageToken', 'page_token'],
|
|
86
|
+
['orderBy', 'order_by'],
|
|
87
|
+
],
|
|
88
|
+
'sylphx.auth.v1.ListCustomerOrganizationsResponse': [
|
|
89
|
+
['customerOrganizations', 'customer_organizations', 'sylphx.auth.v1.CustomerOrganization'],
|
|
90
|
+
['nextPageToken', 'next_page_token'],
|
|
91
|
+
],
|
|
92
|
+
'sylphx.auth.v1.ListEndUsersRequest': [
|
|
93
|
+
['pageSize', 'page_size'],
|
|
94
|
+
['pageToken', 'page_token'],
|
|
95
|
+
['orderBy', 'order_by'],
|
|
96
|
+
],
|
|
97
|
+
'sylphx.auth.v1.ListEndUsersResponse': [
|
|
98
|
+
['endUsers', 'end_users', 'sylphx.auth.v1.EndUser'],
|
|
99
|
+
['nextPageToken', 'next_page_token'],
|
|
100
|
+
],
|
|
101
|
+
'sylphx.auth.v1.ListMembershipsRequest': [
|
|
102
|
+
['pageSize', 'page_size'],
|
|
103
|
+
['pageToken', 'page_token'],
|
|
104
|
+
['orderBy', 'order_by'],
|
|
105
|
+
],
|
|
106
|
+
'sylphx.auth.v1.ListMembershipsResponse': [
|
|
107
|
+
['memberships', 'memberships', 'sylphx.auth.v1.Membership'],
|
|
108
|
+
['nextPageToken', 'next_page_token'],
|
|
109
|
+
],
|
|
110
|
+
'sylphx.auth.v1.ListOauthClientsRequest': [
|
|
111
|
+
['pageSize', 'page_size'],
|
|
112
|
+
['pageToken', 'page_token'],
|
|
113
|
+
['orderBy', 'order_by'],
|
|
114
|
+
],
|
|
115
|
+
'sylphx.auth.v1.ListOauthClientsResponse': [
|
|
116
|
+
['oauthClients', 'oauth_clients', 'sylphx.auth.v1.OauthClient'],
|
|
117
|
+
['nextPageToken', 'next_page_token'],
|
|
118
|
+
],
|
|
119
|
+
'sylphx.auth.v1.ListSessionsRequest': [
|
|
120
|
+
['pageSize', 'page_size'],
|
|
121
|
+
['pageToken', 'page_token'],
|
|
122
|
+
['orderBy', 'order_by'],
|
|
123
|
+
],
|
|
124
|
+
'sylphx.auth.v1.ListSessionsResponse': [
|
|
125
|
+
['sessions', 'sessions', 'sylphx.auth.v1.Session'],
|
|
126
|
+
['nextPageToken', 'next_page_token'],
|
|
127
|
+
],
|
|
128
|
+
'sylphx.auth.v1.Membership': [
|
|
129
|
+
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
130
|
+
['endUser', 'end_user'],
|
|
131
|
+
],
|
|
132
|
+
'sylphx.auth.v1.OauthClient': [
|
|
133
|
+
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
134
|
+
['spec', 'spec', 'sylphx.auth.v1.OauthClientSpec'],
|
|
135
|
+
['status', 'status', 'sylphx.auth.v1.OauthClientStatus'],
|
|
136
|
+
],
|
|
137
|
+
'sylphx.auth.v1.OauthClientSpec': [
|
|
138
|
+
['clientType', 'client_type'],
|
|
139
|
+
['tokenEndpointAuthMethod', 'token_endpoint_auth_method'],
|
|
140
|
+
['redirectUris', 'redirect_uris'],
|
|
141
|
+
['grantTypes', 'grant_types'],
|
|
142
|
+
['jwksUri', 'jwks_uri'],
|
|
143
|
+
['dpopRequired', 'dpop_required'],
|
|
144
|
+
['accessTokenTtl', 'access_token_ttl'],
|
|
145
|
+
['refreshTokenTtl', 'refresh_token_ttl'],
|
|
146
|
+
],
|
|
147
|
+
'sylphx.auth.v1.OauthClientStatus': [
|
|
148
|
+
['observedGeneration', 'observed_generation'],
|
|
149
|
+
['conditions', 'conditions', 'sylphx.common.v1.Condition'],
|
|
150
|
+
['clientId', 'client_id'],
|
|
151
|
+
['clientSecret', 'client_secret'],
|
|
152
|
+
['clientSecretLast4', 'client_secret_last4'],
|
|
153
|
+
],
|
|
154
|
+
'sylphx.auth.v1.PasskeyPolicy': [
|
|
155
|
+
['deviceBound', 'device_bound'],
|
|
156
|
+
['aaguidAllowlist', 'aaguid_allowlist'],
|
|
157
|
+
],
|
|
158
|
+
'sylphx.auth.v1.PortalConfig': [
|
|
159
|
+
['customDomain', 'custom_domain'],
|
|
160
|
+
['productTitle', 'product_title'],
|
|
161
|
+
['logoUri', 'logo_uri'],
|
|
162
|
+
['primaryColor', 'primary_color'],
|
|
163
|
+
['sylphxBranding', 'sylphx_branding'],
|
|
164
|
+
],
|
|
165
|
+
'sylphx.auth.v1.ReactivateEndUserRequest': [],
|
|
166
|
+
'sylphx.auth.v1.RevokeEndUserSessionsRequest': [],
|
|
167
|
+
'sylphx.auth.v1.RevokeEndUserSessionsResponse': [
|
|
168
|
+
['revokedCount', 'revoked_count'],
|
|
169
|
+
],
|
|
170
|
+
'sylphx.auth.v1.RevokeSessionRequest': [],
|
|
171
|
+
'sylphx.auth.v1.RollOauthClientSecretRequest': [
|
|
172
|
+
['gracePeriod', 'grace_period'],
|
|
173
|
+
['validateOnly', 'validate_only'],
|
|
174
|
+
],
|
|
175
|
+
'sylphx.auth.v1.Session': [
|
|
176
|
+
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
177
|
+
['activeOrganization', 'active_organization'],
|
|
178
|
+
['oauthClient', 'oauth_client'],
|
|
179
|
+
['ipAddress', 'ip_address'],
|
|
180
|
+
['userAgent', 'user_agent'],
|
|
181
|
+
['lastActiveTime', 'last_active_time'],
|
|
182
|
+
['expireTime', 'expire_time'],
|
|
183
|
+
['revokeTime', 'revoke_time'],
|
|
184
|
+
['revokeReason', 'revoke_reason'],
|
|
185
|
+
],
|
|
186
|
+
'sylphx.auth.v1.SessionPolicy': [
|
|
187
|
+
['maxConcurrentSessions', 'max_concurrent_sessions'],
|
|
188
|
+
['idleTimeout', 'idle_timeout'],
|
|
189
|
+
['absoluteTimeout', 'absolute_timeout'],
|
|
190
|
+
['fingerprintBinding', 'fingerprint_binding'],
|
|
191
|
+
],
|
|
192
|
+
'sylphx.auth.v1.SuspendEndUserRequest': [],
|
|
193
|
+
'sylphx.auth.v1.UpdateAuthConfigRequest': [
|
|
194
|
+
['authConfig', 'auth_config', 'sylphx.auth.v1.AuthConfig'],
|
|
195
|
+
['updateMask', 'update_mask'],
|
|
196
|
+
['allowMissing', 'allow_missing'],
|
|
197
|
+
['validateOnly', 'validate_only'],
|
|
198
|
+
],
|
|
199
|
+
'sylphx.auth.v1.UpdateCustomerOrganizationRequest': [
|
|
200
|
+
['customerOrganization', 'customer_organization', 'sylphx.auth.v1.CustomerOrganization'],
|
|
201
|
+
['updateMask', 'update_mask'],
|
|
202
|
+
['allowMissing', 'allow_missing'],
|
|
203
|
+
['validateOnly', 'validate_only'],
|
|
204
|
+
],
|
|
205
|
+
'sylphx.auth.v1.UpdateEndUserRequest': [
|
|
206
|
+
['endUser', 'end_user', 'sylphx.auth.v1.EndUser'],
|
|
207
|
+
['updateMask', 'update_mask'],
|
|
208
|
+
['validateOnly', 'validate_only'],
|
|
209
|
+
],
|
|
210
|
+
'sylphx.auth.v1.UpdateMembershipRequest': [
|
|
211
|
+
['membership', 'membership', 'sylphx.auth.v1.Membership'],
|
|
212
|
+
['updateMask', 'update_mask'],
|
|
213
|
+
['validateOnly', 'validate_only'],
|
|
214
|
+
],
|
|
215
|
+
'sylphx.auth.v1.UpdateOauthClientRequest': [
|
|
216
|
+
['oauthClient', 'oauth_client', 'sylphx.auth.v1.OauthClient'],
|
|
217
|
+
['updateMask', 'update_mask'],
|
|
218
|
+
['allowMissing', 'allow_missing'],
|
|
219
|
+
['validateOnly', 'validate_only'],
|
|
220
|
+
],
|
|
221
|
+
});
|
|
222
|
+
/**
|
|
223
|
+
* 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.
|
|
228
|
+
*
|
|
229
|
+
* Namespace of Sylphx Auth on `Sylphx`.
|
|
230
|
+
*/
|
|
231
|
+
export class AuthApi {
|
|
232
|
+
/** The `auth_configs` collection. */
|
|
233
|
+
authConfigs;
|
|
234
|
+
/** The `end_users` collection. */
|
|
235
|
+
endUsers;
|
|
236
|
+
/** The `sessions` collection. */
|
|
237
|
+
sessions;
|
|
238
|
+
/** The `customer_organizations` collection. */
|
|
239
|
+
customerOrganizations;
|
|
240
|
+
/** The `memberships` collection. */
|
|
241
|
+
memberships;
|
|
242
|
+
/** The `oauth_clients` collection. */
|
|
243
|
+
oauthClients;
|
|
244
|
+
constructor(client) {
|
|
245
|
+
this.authConfigs = new AuthConfigsCollection(client);
|
|
246
|
+
this.endUsers = new EndUsersCollection(client);
|
|
247
|
+
this.sessions = new SessionsCollection(client);
|
|
248
|
+
this.customerOrganizations = new CustomerOrganizationsCollection(client);
|
|
249
|
+
this.memberships = new MembershipsCollection(client);
|
|
250
|
+
this.oauthClients = new OauthClientsCollection(client);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
/** `auth_configs` of Sylphx Auth: Resource type `auth.sylphx.com/AuthConfig`. */
|
|
254
|
+
export class AuthConfigsCollection {
|
|
255
|
+
client;
|
|
256
|
+
constructor(client) {
|
|
257
|
+
this.client = client;
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* Gets an auth config.
|
|
261
|
+
*
|
|
262
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/auth_configs/*}` · permission `auth:read` · effect `read`
|
|
263
|
+
*
|
|
264
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
265
|
+
*/
|
|
266
|
+
async get(request) {
|
|
267
|
+
return this.client.call({
|
|
268
|
+
method: 'GET',
|
|
269
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/auth_configs/*', 'name')}`,
|
|
270
|
+
responseType: 'sylphx.auth.v1.AuthConfig',
|
|
271
|
+
mutation: false,
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Updates an auth config.
|
|
276
|
+
*
|
|
277
|
+
* `PATCH /v1/{auth_config.name=orgs/*\/projects/*\/envs/*\/auth_configs/*}` · permission `auth:write` · effect `write`
|
|
278
|
+
*
|
|
279
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
280
|
+
*/
|
|
281
|
+
async update(request) {
|
|
282
|
+
return this.client.call({
|
|
283
|
+
method: 'PATCH',
|
|
284
|
+
path: `/v1/${runtime.pathParam(request.authConfig?.name, 'orgs/*/projects/*/envs/*/auth_configs/*', 'auth_config.name')}`,
|
|
285
|
+
query: { update_mask: request.updateMask, allow_missing: request.allowMissing, validate_only: request.validateOnly },
|
|
286
|
+
body: request.authConfig ?? {},
|
|
287
|
+
bodyType: 'sylphx.auth.v1.AuthConfig',
|
|
288
|
+
responseType: 'sylphx.auth.v1.AuthConfig',
|
|
289
|
+
mutation: true,
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
/** `end_users` of Sylphx Auth: Resource type `auth.sylphx.com/EndUser`. */
|
|
294
|
+
export class EndUsersCollection {
|
|
295
|
+
client;
|
|
296
|
+
constructor(client) {
|
|
297
|
+
this.client = client;
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* Gets an end user.
|
|
301
|
+
*
|
|
302
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/end_users/*}` · permission `auth:read` · effect `read`
|
|
303
|
+
*
|
|
304
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
305
|
+
*/
|
|
306
|
+
async get(request) {
|
|
307
|
+
return this.client.call({
|
|
308
|
+
method: 'GET',
|
|
309
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/end_users/*', 'name')}`,
|
|
310
|
+
responseType: 'sylphx.auth.v1.EndUser',
|
|
311
|
+
mutation: false,
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
315
|
+
* Lists end users.
|
|
316
|
+
*
|
|
317
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/end_users` · permission `auth:read` · effect `read`
|
|
318
|
+
*
|
|
319
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
320
|
+
*/
|
|
321
|
+
async list(request) {
|
|
322
|
+
return this.client.call({
|
|
323
|
+
method: 'GET',
|
|
324
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/end_users`,
|
|
325
|
+
query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter, order_by: request.orderBy },
|
|
326
|
+
responseType: 'sylphx.auth.v1.ListEndUsersResponse',
|
|
327
|
+
mutation: false,
|
|
328
|
+
});
|
|
329
|
+
}
|
|
330
|
+
/** Every item of every page of `list`. */
|
|
331
|
+
async *listAll(request) {
|
|
332
|
+
let next = request;
|
|
333
|
+
for (;;) {
|
|
334
|
+
const page = await this.list(next);
|
|
335
|
+
yield* page.endUsers ?? [];
|
|
336
|
+
if (page.nextPageToken === undefined || page.nextPageToken === '')
|
|
337
|
+
return;
|
|
338
|
+
next = { ...request, pageToken: page.nextPageToken };
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* Creates an end user.
|
|
343
|
+
*
|
|
344
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/end_users` · permission `auth:write` · effect `write`
|
|
345
|
+
*
|
|
346
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`.
|
|
347
|
+
*/
|
|
348
|
+
async create(request) {
|
|
349
|
+
return this.client.call({
|
|
350
|
+
method: 'POST',
|
|
351
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/end_users`,
|
|
352
|
+
query: { end_user_id: request.endUserId, validate_only: request.validateOnly },
|
|
353
|
+
body: request.endUser ?? {},
|
|
354
|
+
bodyType: 'sylphx.auth.v1.EndUser',
|
|
355
|
+
responseType: 'sylphx.auth.v1.EndUser',
|
|
356
|
+
mutation: true,
|
|
357
|
+
});
|
|
358
|
+
}
|
|
359
|
+
/**
|
|
360
|
+
* Updates an end user.
|
|
361
|
+
*
|
|
362
|
+
* `PATCH /v1/{end_user.name=orgs/*\/projects/*\/envs/*\/end_users/*}` · permission `auth:write` · effect `write`
|
|
363
|
+
*
|
|
364
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
365
|
+
*/
|
|
366
|
+
async update(request) {
|
|
367
|
+
return this.client.call({
|
|
368
|
+
method: 'PATCH',
|
|
369
|
+
path: `/v1/${runtime.pathParam(request.endUser?.name, 'orgs/*/projects/*/envs/*/end_users/*', 'end_user.name')}`,
|
|
370
|
+
query: { update_mask: request.updateMask, validate_only: request.validateOnly },
|
|
371
|
+
body: request.endUser ?? {},
|
|
372
|
+
bodyType: 'sylphx.auth.v1.EndUser',
|
|
373
|
+
responseType: 'sylphx.auth.v1.EndUser',
|
|
374
|
+
mutation: true,
|
|
375
|
+
});
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* Deletes an end user.
|
|
379
|
+
*
|
|
380
|
+
* `DELETE /v1/{name=orgs/*\/projects/*\/envs/*\/end_users/*}` · permission `auth:write` · effect `destructive`
|
|
381
|
+
*
|
|
382
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
383
|
+
*/
|
|
384
|
+
async delete(request) {
|
|
385
|
+
return this.client.call({
|
|
386
|
+
method: 'DELETE',
|
|
387
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/end_users/*', 'name')}`,
|
|
388
|
+
query: { etag: request.etag, allow_missing: request.allowMissing, validate_only: request.validateOnly, force: request.force },
|
|
389
|
+
mutation: true,
|
|
390
|
+
});
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* Suspends an end user: sessions are revoked and sign-in is refused.
|
|
394
|
+
*
|
|
395
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/end_users/*}:suspend` · permission `auth:write` · effect `destructive`
|
|
396
|
+
*
|
|
397
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `ETAG_MISMATCH`.
|
|
398
|
+
*/
|
|
399
|
+
async suspend(request) {
|
|
400
|
+
return this.client.call({
|
|
401
|
+
method: 'POST',
|
|
402
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/end_users/*', 'name')}:suspend`,
|
|
403
|
+
body: runtime.omit(request, ['name']),
|
|
404
|
+
bodyType: 'sylphx.auth.v1.SuspendEndUserRequest',
|
|
405
|
+
responseType: 'sylphx.auth.v1.EndUser',
|
|
406
|
+
mutation: true,
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
/**
|
|
410
|
+
* Reactivates a suspended end user.
|
|
411
|
+
*
|
|
412
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/end_users/*}:reactivate` · permission `auth:write` · effect `write`
|
|
413
|
+
*
|
|
414
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `ETAG_MISMATCH`.
|
|
415
|
+
*/
|
|
416
|
+
async reactivate(request) {
|
|
417
|
+
return this.client.call({
|
|
418
|
+
method: 'POST',
|
|
419
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/end_users/*', 'name')}:reactivate`,
|
|
420
|
+
body: runtime.omit(request, ['name']),
|
|
421
|
+
bodyType: 'sylphx.auth.v1.ReactivateEndUserRequest',
|
|
422
|
+
responseType: 'sylphx.auth.v1.EndUser',
|
|
423
|
+
mutation: true,
|
|
424
|
+
});
|
|
425
|
+
}
|
|
426
|
+
/**
|
|
427
|
+
* Revokes every session of an end user.
|
|
428
|
+
*
|
|
429
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/end_users/*}:revokeSessions` · permission `auth:write` · effect `destructive`
|
|
430
|
+
*
|
|
431
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
432
|
+
*/
|
|
433
|
+
async revokeSessions(request) {
|
|
434
|
+
return this.client.call({
|
|
435
|
+
method: 'POST',
|
|
436
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/end_users/*', 'name')}:revokeSessions`,
|
|
437
|
+
body: runtime.omit(request, ['name']),
|
|
438
|
+
bodyType: 'sylphx.auth.v1.RevokeEndUserSessionsRequest',
|
|
439
|
+
responseType: 'sylphx.auth.v1.RevokeEndUserSessionsResponse',
|
|
440
|
+
mutation: true,
|
|
441
|
+
});
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
/** `sessions` of Sylphx Auth: Resource type `auth.sylphx.com/Session`. */
|
|
445
|
+
export class SessionsCollection {
|
|
446
|
+
client;
|
|
447
|
+
constructor(client) {
|
|
448
|
+
this.client = client;
|
|
449
|
+
}
|
|
450
|
+
/**
|
|
451
|
+
* Gets a session.
|
|
452
|
+
*
|
|
453
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/end_users/*\/sessions/*}` · permission `auth:read` · effect `read`
|
|
454
|
+
*
|
|
455
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
456
|
+
*/
|
|
457
|
+
async get(request) {
|
|
458
|
+
return this.client.call({
|
|
459
|
+
method: 'GET',
|
|
460
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/end_users/*/sessions/*', 'name')}`,
|
|
461
|
+
responseType: 'sylphx.auth.v1.Session',
|
|
462
|
+
mutation: false,
|
|
463
|
+
});
|
|
464
|
+
}
|
|
465
|
+
/**
|
|
466
|
+
* Lists sessions.
|
|
467
|
+
*
|
|
468
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*\/end_users/*}/sessions` · permission `auth:read` · effect `read`
|
|
469
|
+
*
|
|
470
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
471
|
+
*/
|
|
472
|
+
async list(request) {
|
|
473
|
+
return this.client.call({
|
|
474
|
+
method: 'GET',
|
|
475
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*/end_users/*', 'parent')}/sessions`,
|
|
476
|
+
query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter, order_by: request.orderBy },
|
|
477
|
+
responseType: 'sylphx.auth.v1.ListSessionsResponse',
|
|
478
|
+
mutation: false,
|
|
479
|
+
});
|
|
480
|
+
}
|
|
481
|
+
/** Every item of every page of `list`. */
|
|
482
|
+
async *listAll(request) {
|
|
483
|
+
let next = request;
|
|
484
|
+
for (;;) {
|
|
485
|
+
const page = await this.list(next);
|
|
486
|
+
yield* page.sessions ?? [];
|
|
487
|
+
if (page.nextPageToken === undefined || page.nextPageToken === '')
|
|
488
|
+
return;
|
|
489
|
+
next = { ...request, pageToken: page.nextPageToken };
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
/**
|
|
493
|
+
* Revokes a session.
|
|
494
|
+
*
|
|
495
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/end_users/*\/sessions/*}:revoke` · permission `auth:write` · effect `destructive`
|
|
496
|
+
*
|
|
497
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
498
|
+
*/
|
|
499
|
+
async revoke(request) {
|
|
500
|
+
return this.client.call({
|
|
501
|
+
method: 'POST',
|
|
502
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/end_users/*/sessions/*', 'name')}:revoke`,
|
|
503
|
+
body: runtime.omit(request, ['name']),
|
|
504
|
+
bodyType: 'sylphx.auth.v1.RevokeSessionRequest',
|
|
505
|
+
responseType: 'sylphx.auth.v1.Session',
|
|
506
|
+
mutation: true,
|
|
507
|
+
});
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
/** `customer_organizations` of Sylphx Auth: Resource type `auth.sylphx.com/CustomerOrganization`. */
|
|
511
|
+
export class CustomerOrganizationsCollection {
|
|
512
|
+
client;
|
|
513
|
+
constructor(client) {
|
|
514
|
+
this.client = client;
|
|
515
|
+
}
|
|
516
|
+
/**
|
|
517
|
+
* Gets a customer organization.
|
|
518
|
+
*
|
|
519
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/customer_organizations/*}` · permission `auth:read` · effect `read`
|
|
520
|
+
*
|
|
521
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
522
|
+
*/
|
|
523
|
+
async get(request) {
|
|
524
|
+
return this.client.call({
|
|
525
|
+
method: 'GET',
|
|
526
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/customer_organizations/*', 'name')}`,
|
|
527
|
+
responseType: 'sylphx.auth.v1.CustomerOrganization',
|
|
528
|
+
mutation: false,
|
|
529
|
+
});
|
|
530
|
+
}
|
|
531
|
+
/**
|
|
532
|
+
* Lists customer organizations.
|
|
533
|
+
*
|
|
534
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/customer_organizations` · permission `auth:read` · effect `read`
|
|
535
|
+
*
|
|
536
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
537
|
+
*/
|
|
538
|
+
async list(request) {
|
|
539
|
+
return this.client.call({
|
|
540
|
+
method: 'GET',
|
|
541
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/customer_organizations`,
|
|
542
|
+
query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter, order_by: request.orderBy },
|
|
543
|
+
responseType: 'sylphx.auth.v1.ListCustomerOrganizationsResponse',
|
|
544
|
+
mutation: false,
|
|
545
|
+
});
|
|
546
|
+
}
|
|
547
|
+
/** Every item of every page of `list`. */
|
|
548
|
+
async *listAll(request) {
|
|
549
|
+
let next = request;
|
|
550
|
+
for (;;) {
|
|
551
|
+
const page = await this.list(next);
|
|
552
|
+
yield* page.customerOrganizations ?? [];
|
|
553
|
+
if (page.nextPageToken === undefined || page.nextPageToken === '')
|
|
554
|
+
return;
|
|
555
|
+
next = { ...request, pageToken: page.nextPageToken };
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
/**
|
|
559
|
+
* Creates a customer organization.
|
|
560
|
+
*
|
|
561
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/customer_organizations` · permission `auth:write` · effect `write`
|
|
562
|
+
*
|
|
563
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`.
|
|
564
|
+
*/
|
|
565
|
+
async create(request) {
|
|
566
|
+
return this.client.call({
|
|
567
|
+
method: 'POST',
|
|
568
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/customer_organizations`,
|
|
569
|
+
query: { customer_organization_id: request.customerOrganizationId, validate_only: request.validateOnly },
|
|
570
|
+
body: request.customerOrganization ?? {},
|
|
571
|
+
bodyType: 'sylphx.auth.v1.CustomerOrganization',
|
|
572
|
+
responseType: 'sylphx.auth.v1.CustomerOrganization',
|
|
573
|
+
mutation: true,
|
|
574
|
+
});
|
|
575
|
+
}
|
|
576
|
+
/**
|
|
577
|
+
* Updates a customer organization.
|
|
578
|
+
*
|
|
579
|
+
* `PATCH /v1/{customer_organization.name=orgs/*\/projects/*\/envs/*\/customer_organizations/*}` · permission `auth:write` · effect `write`
|
|
580
|
+
*
|
|
581
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
582
|
+
*/
|
|
583
|
+
async update(request) {
|
|
584
|
+
return this.client.call({
|
|
585
|
+
method: 'PATCH',
|
|
586
|
+
path: `/v1/${runtime.pathParam(request.customerOrganization?.name, 'orgs/*/projects/*/envs/*/customer_organizations/*', 'customer_organization.name')}`,
|
|
587
|
+
query: { update_mask: request.updateMask, allow_missing: request.allowMissing, validate_only: request.validateOnly },
|
|
588
|
+
body: request.customerOrganization ?? {},
|
|
589
|
+
bodyType: 'sylphx.auth.v1.CustomerOrganization',
|
|
590
|
+
responseType: 'sylphx.auth.v1.CustomerOrganization',
|
|
591
|
+
mutation: true,
|
|
592
|
+
});
|
|
593
|
+
}
|
|
594
|
+
/**
|
|
595
|
+
* Deletes a customer organization.
|
|
596
|
+
*
|
|
597
|
+
* `DELETE /v1/{name=orgs/*\/projects/*\/envs/*\/customer_organizations/*}` · permission `auth:write` · effect `destructive`
|
|
598
|
+
*
|
|
599
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
600
|
+
*/
|
|
601
|
+
async delete(request) {
|
|
602
|
+
return this.client.call({
|
|
603
|
+
method: 'DELETE',
|
|
604
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/customer_organizations/*', 'name')}`,
|
|
605
|
+
query: { etag: request.etag, allow_missing: request.allowMissing, validate_only: request.validateOnly, force: request.force },
|
|
606
|
+
mutation: true,
|
|
607
|
+
});
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
/** `memberships` of Sylphx Auth: Resource type `auth.sylphx.com/Membership`. */
|
|
611
|
+
export class MembershipsCollection {
|
|
612
|
+
client;
|
|
613
|
+
constructor(client) {
|
|
614
|
+
this.client = client;
|
|
615
|
+
}
|
|
616
|
+
/**
|
|
617
|
+
* Gets a membership.
|
|
618
|
+
*
|
|
619
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/customer_organizations/*\/memberships/*}` · permission `auth:read` · effect `read`
|
|
620
|
+
*
|
|
621
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
622
|
+
*/
|
|
623
|
+
async get(request) {
|
|
624
|
+
return this.client.call({
|
|
625
|
+
method: 'GET',
|
|
626
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/customer_organizations/*/memberships/*', 'name')}`,
|
|
627
|
+
responseType: 'sylphx.auth.v1.Membership',
|
|
628
|
+
mutation: false,
|
|
629
|
+
});
|
|
630
|
+
}
|
|
631
|
+
/**
|
|
632
|
+
* Lists memberships.
|
|
633
|
+
*
|
|
634
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*\/customer_organizations/*}/memberships` · permission `auth:read` · effect `read`
|
|
635
|
+
*
|
|
636
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
637
|
+
*/
|
|
638
|
+
async list(request) {
|
|
639
|
+
return this.client.call({
|
|
640
|
+
method: 'GET',
|
|
641
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*/customer_organizations/*', 'parent')}/memberships`,
|
|
642
|
+
query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter, order_by: request.orderBy },
|
|
643
|
+
responseType: 'sylphx.auth.v1.ListMembershipsResponse',
|
|
644
|
+
mutation: false,
|
|
645
|
+
});
|
|
646
|
+
}
|
|
647
|
+
/** Every item of every page of `list`. */
|
|
648
|
+
async *listAll(request) {
|
|
649
|
+
let next = request;
|
|
650
|
+
for (;;) {
|
|
651
|
+
const page = await this.list(next);
|
|
652
|
+
yield* page.memberships ?? [];
|
|
653
|
+
if (page.nextPageToken === undefined || page.nextPageToken === '')
|
|
654
|
+
return;
|
|
655
|
+
next = { ...request, pageToken: page.nextPageToken };
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
/**
|
|
659
|
+
* Creates a membership.
|
|
660
|
+
*
|
|
661
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*\/customer_organizations/*}/memberships` · permission `auth:write` · effect `write`
|
|
662
|
+
*
|
|
663
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`.
|
|
664
|
+
*/
|
|
665
|
+
async create(request) {
|
|
666
|
+
return this.client.call({
|
|
667
|
+
method: 'POST',
|
|
668
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*/customer_organizations/*', 'parent')}/memberships`,
|
|
669
|
+
query: { membership_id: request.membershipId, validate_only: request.validateOnly },
|
|
670
|
+
body: request.membership ?? {},
|
|
671
|
+
bodyType: 'sylphx.auth.v1.Membership',
|
|
672
|
+
responseType: 'sylphx.auth.v1.Membership',
|
|
673
|
+
mutation: true,
|
|
674
|
+
});
|
|
675
|
+
}
|
|
676
|
+
/**
|
|
677
|
+
* Updates a membership.
|
|
678
|
+
*
|
|
679
|
+
* `PATCH /v1/{membership.name=orgs/*\/projects/*\/envs/*\/customer_organizations/*\/memberships/*}` · permission `auth:write` · effect `write`
|
|
680
|
+
*
|
|
681
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
682
|
+
*/
|
|
683
|
+
async update(request) {
|
|
684
|
+
return this.client.call({
|
|
685
|
+
method: 'PATCH',
|
|
686
|
+
path: `/v1/${runtime.pathParam(request.membership?.name, 'orgs/*/projects/*/envs/*/customer_organizations/*/memberships/*', 'membership.name')}`,
|
|
687
|
+
query: { update_mask: request.updateMask, validate_only: request.validateOnly },
|
|
688
|
+
body: request.membership ?? {},
|
|
689
|
+
bodyType: 'sylphx.auth.v1.Membership',
|
|
690
|
+
responseType: 'sylphx.auth.v1.Membership',
|
|
691
|
+
mutation: true,
|
|
692
|
+
});
|
|
693
|
+
}
|
|
694
|
+
/**
|
|
695
|
+
* Deletes a membership.
|
|
696
|
+
*
|
|
697
|
+
* `DELETE /v1/{name=orgs/*\/projects/*\/envs/*\/customer_organizations/*\/memberships/*}` · permission `auth:write` · effect `destructive`
|
|
698
|
+
*
|
|
699
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
700
|
+
*/
|
|
701
|
+
async delete(request) {
|
|
702
|
+
return this.client.call({
|
|
703
|
+
method: 'DELETE',
|
|
704
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/customer_organizations/*/memberships/*', 'name')}`,
|
|
705
|
+
query: { etag: request.etag, allow_missing: request.allowMissing, validate_only: request.validateOnly },
|
|
706
|
+
mutation: true,
|
|
707
|
+
});
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
/** `oauth_clients` of Sylphx Auth: Resource type `auth.sylphx.com/OauthClient`. */
|
|
711
|
+
export class OauthClientsCollection {
|
|
712
|
+
client;
|
|
713
|
+
constructor(client) {
|
|
714
|
+
this.client = client;
|
|
715
|
+
}
|
|
716
|
+
/**
|
|
717
|
+
* Gets an OAuth client.
|
|
718
|
+
*
|
|
719
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/oauth_clients/*}` · permission `auth:read` · effect `read`
|
|
720
|
+
*
|
|
721
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
722
|
+
*/
|
|
723
|
+
async get(request) {
|
|
724
|
+
return this.client.call({
|
|
725
|
+
method: 'GET',
|
|
726
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/oauth_clients/*', 'name')}`,
|
|
727
|
+
responseType: 'sylphx.auth.v1.OauthClient',
|
|
728
|
+
mutation: false,
|
|
729
|
+
});
|
|
730
|
+
}
|
|
731
|
+
/**
|
|
732
|
+
* Lists OAuth clients.
|
|
733
|
+
*
|
|
734
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/oauth_clients` · permission `auth:read` · effect `read`
|
|
735
|
+
*
|
|
736
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
737
|
+
*/
|
|
738
|
+
async list(request) {
|
|
739
|
+
return this.client.call({
|
|
740
|
+
method: 'GET',
|
|
741
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/oauth_clients`,
|
|
742
|
+
query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter, order_by: request.orderBy },
|
|
743
|
+
responseType: 'sylphx.auth.v1.ListOauthClientsResponse',
|
|
744
|
+
mutation: false,
|
|
745
|
+
});
|
|
746
|
+
}
|
|
747
|
+
/** Every item of every page of `list`. */
|
|
748
|
+
async *listAll(request) {
|
|
749
|
+
let next = request;
|
|
750
|
+
for (;;) {
|
|
751
|
+
const page = await this.list(next);
|
|
752
|
+
yield* page.oauthClients ?? [];
|
|
753
|
+
if (page.nextPageToken === undefined || page.nextPageToken === '')
|
|
754
|
+
return;
|
|
755
|
+
next = { ...request, pageToken: page.nextPageToken };
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
/**
|
|
759
|
+
* Creates an OAuth client.
|
|
760
|
+
*
|
|
761
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/oauth_clients` · permission `auth:write` · effect `write`
|
|
762
|
+
*
|
|
763
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`.
|
|
764
|
+
*/
|
|
765
|
+
async create(request) {
|
|
766
|
+
return this.client.call({
|
|
767
|
+
method: 'POST',
|
|
768
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/oauth_clients`,
|
|
769
|
+
query: { oauth_client_id: request.oauthClientId, validate_only: request.validateOnly },
|
|
770
|
+
body: request.oauthClient ?? {},
|
|
771
|
+
bodyType: 'sylphx.auth.v1.OauthClient',
|
|
772
|
+
responseType: 'sylphx.auth.v1.OauthClient',
|
|
773
|
+
mutation: true,
|
|
774
|
+
});
|
|
775
|
+
}
|
|
776
|
+
/**
|
|
777
|
+
* Updates an OAuth client.
|
|
778
|
+
*
|
|
779
|
+
* `PATCH /v1/{oauth_client.name=orgs/*\/projects/*\/envs/*\/oauth_clients/*}` · permission `auth:write` · effect `write`
|
|
780
|
+
*
|
|
781
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
782
|
+
*/
|
|
783
|
+
async update(request) {
|
|
784
|
+
return this.client.call({
|
|
785
|
+
method: 'PATCH',
|
|
786
|
+
path: `/v1/${runtime.pathParam(request.oauthClient?.name, 'orgs/*/projects/*/envs/*/oauth_clients/*', 'oauth_client.name')}`,
|
|
787
|
+
query: { update_mask: request.updateMask, allow_missing: request.allowMissing, validate_only: request.validateOnly },
|
|
788
|
+
body: request.oauthClient ?? {},
|
|
789
|
+
bodyType: 'sylphx.auth.v1.OauthClient',
|
|
790
|
+
responseType: 'sylphx.auth.v1.OauthClient',
|
|
791
|
+
mutation: true,
|
|
792
|
+
});
|
|
793
|
+
}
|
|
794
|
+
/**
|
|
795
|
+
* Deletes an OAuth client.
|
|
796
|
+
*
|
|
797
|
+
* `DELETE /v1/{name=orgs/*\/projects/*\/envs/*\/oauth_clients/*}` · permission `auth:write` · effect `destructive`
|
|
798
|
+
*
|
|
799
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
800
|
+
*/
|
|
801
|
+
async delete(request) {
|
|
802
|
+
return this.client.call({
|
|
803
|
+
method: 'DELETE',
|
|
804
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/oauth_clients/*', 'name')}`,
|
|
805
|
+
query: { etag: request.etag, allow_missing: request.allowMissing, validate_only: request.validateOnly },
|
|
806
|
+
mutation: true,
|
|
807
|
+
});
|
|
808
|
+
}
|
|
809
|
+
/**
|
|
810
|
+
* Issues a new client secret, returned once; the old one verifies until
|
|
811
|
+
* `grace_period` ends.
|
|
812
|
+
*
|
|
813
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/oauth_clients/*}:rollSecret` · permission `auth:write` · effect `write`
|
|
814
|
+
*
|
|
815
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `ETAG_MISMATCH`.
|
|
816
|
+
*/
|
|
817
|
+
async rollSecret(request) {
|
|
818
|
+
return this.client.call({
|
|
819
|
+
method: 'POST',
|
|
820
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/oauth_clients/*', 'name')}:rollSecret`,
|
|
821
|
+
body: runtime.omit(request, ['name']),
|
|
822
|
+
bodyType: 'sylphx.auth.v1.RollOauthClientSecretRequest',
|
|
823
|
+
responseType: 'sylphx.auth.v1.OauthClient',
|
|
824
|
+
mutation: true,
|
|
825
|
+
});
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
//# sourceMappingURL=auth.js.map
|