@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.
Files changed (101) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +30 -73
  3. package/dist/access.d.ts +659 -0
  4. package/dist/access.js +638 -0
  5. package/dist/access.js.map +1 -0
  6. package/dist/ai.d.ts +176 -0
  7. package/dist/ai.js +112 -0
  8. package/dist/ai.js.map +1 -0
  9. package/dist/artifacts.d.ts +165 -0
  10. package/dist/artifacts.js +129 -0
  11. package/dist/artifacts.js.map +1 -0
  12. package/dist/auth.d.ts +896 -0
  13. package/dist/auth.js +828 -0
  14. package/dist/auth.js.map +1 -0
  15. package/dist/billing.d.ts +758 -0
  16. package/dist/billing.js +553 -0
  17. package/dist/billing.js.map +1 -0
  18. package/dist/broker.d.ts +226 -0
  19. package/dist/broker.js +187 -0
  20. package/dist/broker.js.map +1 -0
  21. package/dist/build.d.ts +313 -0
  22. package/dist/build.js +271 -0
  23. package/dist/build.js.map +1 -0
  24. package/dist/common.d.ts +162 -0
  25. package/dist/common.js +41 -0
  26. package/dist/common.js.map +1 -0
  27. package/dist/config.d.ts +198 -0
  28. package/dist/config.js +168 -0
  29. package/dist/config.js.map +1 -0
  30. package/dist/connections.d.ts +354 -0
  31. package/dist/connections.js +313 -0
  32. package/dist/connections.js.map +1 -0
  33. package/dist/data.d.ts +858 -0
  34. package/dist/data.js +814 -0
  35. package/dist/data.js.map +1 -0
  36. package/dist/entitlement.d.ts +172 -0
  37. package/dist/entitlement.js +116 -0
  38. package/dist/entitlement.js.map +1 -0
  39. package/dist/events.d.ts +1324 -0
  40. package/dist/events.js +1227 -0
  41. package/dist/events.js.map +1 -0
  42. package/dist/hosting.d.ts +709 -0
  43. package/dist/hosting.js +611 -0
  44. package/dist/hosting.js.map +1 -0
  45. package/dist/index.d.ts +79 -11493
  46. package/dist/index.js +113 -0
  47. package/dist/index.js.map +1 -0
  48. package/dist/keys.d.ts +438 -0
  49. package/dist/keys.js +406 -0
  50. package/dist/keys.js.map +1 -0
  51. package/dist/methods.d.ts +2 -0
  52. package/dist/methods.js +3995 -0
  53. package/dist/methods.js.map +1 -0
  54. package/dist/network.d.ts +733 -0
  55. package/dist/network.js +711 -0
  56. package/dist/network.js.map +1 -0
  57. package/dist/notify.d.ts +1359 -0
  58. package/dist/notify.js +1282 -0
  59. package/dist/notify.js.map +1 -0
  60. package/dist/observability.d.ts +509 -0
  61. package/dist/observability.js +437 -0
  62. package/dist/observability.js.map +1 -0
  63. package/dist/release.d.ts +303 -0
  64. package/dist/release.js +214 -0
  65. package/dist/release.js.map +1 -0
  66. package/dist/runners.d.ts +262 -0
  67. package/dist/runners.js +238 -0
  68. package/dist/runners.js.map +1 -0
  69. package/dist/runtime.d.ts +88 -0
  70. package/dist/runtime.js +226 -0
  71. package/dist/runtime.js.map +1 -0
  72. package/dist/sandboxes.d.ts +1705 -0
  73. package/dist/sandboxes.js +1226 -0
  74. package/dist/sandboxes.js.map +1 -0
  75. package/dist/secrets.d.ts +508 -0
  76. package/dist/secrets.js +474 -0
  77. package/dist/secrets.js.map +1 -0
  78. package/dist/workflows.d.ts +678 -0
  79. package/dist/workflows.js +595 -0
  80. package/dist/workflows.js.map +1 -0
  81. package/package.json +33 -106
  82. package/dist/health/index.d.ts +0 -1394
  83. package/dist/health/index.mjs +0 -1394
  84. package/dist/health/index.mjs.map +0 -1
  85. package/dist/index.mjs +0 -10386
  86. package/dist/index.mjs.map +0 -1
  87. package/dist/nextjs/index.d.ts +0 -724
  88. package/dist/nextjs/index.mjs +0 -3329
  89. package/dist/nextjs/index.mjs.map +0 -1
  90. package/dist/react/index.d.ts +0 -14168
  91. package/dist/react/index.mjs +0 -37002
  92. package/dist/react/index.mjs.map +0 -1
  93. package/dist/server/index.d.ts +0 -2017
  94. package/dist/server/index.mjs +0 -3446
  95. package/dist/server/index.mjs.map +0 -1
  96. package/dist/tasks.d.ts +0 -1463
  97. package/dist/tasks.mjs +0 -1907
  98. package/dist/tasks.mjs.map +0 -1
  99. package/dist/web-analytics.d.ts +0 -90
  100. package/dist/web-analytics.mjs +0 -225
  101. package/dist/web-analytics.mjs.map +0 -1
@@ -0,0 +1,711 @@
1
+ // @generated by sylphx-gen 0.1.0 from contracts@cdf6473b36ca648759a7f4b1fc21554541d52a947477e6e9d1d7a6a9a79bdaa0. Do not edit.
2
+ // `sylphx.network.v1`.
3
+ import * as runtime from './runtime.js';
4
+ import './common.js';
5
+ runtime.registerSchemas({
6
+ 'sylphx.network.v1.Certificate': [
7
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
8
+ ['spec', 'spec', 'sylphx.network.v1.CertificateSpec'],
9
+ ['status', 'status', 'sylphx.network.v1.CertificateStatus'],
10
+ ],
11
+ 'sylphx.network.v1.CertificateSpec': [
12
+ ['dnsNames', 'dns_names'],
13
+ ],
14
+ 'sylphx.network.v1.CertificateStatus': [
15
+ ['observedGeneration', 'observed_generation'],
16
+ ['conditions', 'conditions', 'sylphx.common.v1.Condition'],
17
+ ['expireTime', 'expire_time'],
18
+ ['renewTime', 'renew_time'],
19
+ ['renewalWindowStartTime', 'renewal_window_start_time'],
20
+ ['renewalWindowEndTime', 'renewal_window_end_time'],
21
+ ],
22
+ 'sylphx.network.v1.CreateDomainRequest': [
23
+ ['domain', 'domain', 'sylphx.network.v1.Domain'],
24
+ ['domainId', 'domain_id'],
25
+ ['validateOnly', 'validate_only'],
26
+ ],
27
+ 'sylphx.network.v1.CreateEgressIdentityRequest': [
28
+ ['egressIdentity', 'egress_identity', 'sylphx.network.v1.EgressIdentity'],
29
+ ['egressIdentityId', 'egress_identity_id'],
30
+ ['validateOnly', 'validate_only'],
31
+ ],
32
+ 'sylphx.network.v1.CreatePrivateLinkRequest': [
33
+ ['privateLink', 'private_link', 'sylphx.network.v1.PrivateLink'],
34
+ ['privateLinkId', 'private_link_id'],
35
+ ['validateOnly', 'validate_only'],
36
+ ],
37
+ 'sylphx.network.v1.CreateRouteRequest': [
38
+ ['route', 'route', 'sylphx.network.v1.Route'],
39
+ ['routeId', 'route_id'],
40
+ ['validateOnly', 'validate_only'],
41
+ ],
42
+ 'sylphx.network.v1.DeleteDomainRequest': [
43
+ ['allowMissing', 'allow_missing'],
44
+ ['validateOnly', 'validate_only'],
45
+ ],
46
+ 'sylphx.network.v1.DeleteEgressIdentityRequest': [
47
+ ['allowMissing', 'allow_missing'],
48
+ ['validateOnly', 'validate_only'],
49
+ ],
50
+ 'sylphx.network.v1.DeletePrivateLinkRequest': [
51
+ ['allowMissing', 'allow_missing'],
52
+ ['validateOnly', 'validate_only'],
53
+ ],
54
+ 'sylphx.network.v1.DeleteRouteRequest': [
55
+ ['allowMissing', 'allow_missing'],
56
+ ['validateOnly', 'validate_only'],
57
+ ],
58
+ 'sylphx.network.v1.Domain': [
59
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
60
+ ['spec', 'spec', 'sylphx.network.v1.DomainSpec'],
61
+ ['status', 'status', 'sylphx.network.v1.DomainStatus'],
62
+ ],
63
+ 'sylphx.network.v1.DomainSpec': [
64
+ ['domainName', 'domain_name'],
65
+ ['verificationMethod', 'verification_method'],
66
+ ],
67
+ 'sylphx.network.v1.DomainStatus': [
68
+ ['observedGeneration', 'observed_generation'],
69
+ ['conditions', 'conditions', 'sylphx.common.v1.Condition'],
70
+ ['verifyTime', 'verify_time'],
71
+ ['verification', 'verification', 'sylphx.network.v1.DomainVerification'],
72
+ ],
73
+ 'sylphx.network.v1.DomainVerification': [
74
+ ['recordName', 'record_name'],
75
+ ['recordType', 'record_type'],
76
+ ['recordValue', 'record_value'],
77
+ ],
78
+ 'sylphx.network.v1.EgressIdentity': [
79
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
80
+ ['spec', 'spec', 'sylphx.network.v1.EgressIdentitySpec'],
81
+ ['status', 'status', 'sylphx.network.v1.EgressIdentityStatus'],
82
+ ],
83
+ 'sylphx.network.v1.EgressIdentitySpec': [],
84
+ 'sylphx.network.v1.EgressIdentityStatus': [
85
+ ['observedGeneration', 'observed_generation'],
86
+ ['conditions', 'conditions', 'sylphx.common.v1.Condition'],
87
+ ],
88
+ 'sylphx.network.v1.GetCertificateRequest': [],
89
+ 'sylphx.network.v1.GetDomainRequest': [],
90
+ 'sylphx.network.v1.GetEgressIdentityRequest': [],
91
+ 'sylphx.network.v1.GetPrivateLinkRequest': [],
92
+ 'sylphx.network.v1.GetRouteRequest': [],
93
+ 'sylphx.network.v1.ListCertificatesRequest': [
94
+ ['pageSize', 'page_size'],
95
+ ['pageToken', 'page_token'],
96
+ ['orderBy', 'order_by'],
97
+ ],
98
+ 'sylphx.network.v1.ListCertificatesResponse': [
99
+ ['certificates', 'certificates', 'sylphx.network.v1.Certificate'],
100
+ ['nextPageToken', 'next_page_token'],
101
+ ],
102
+ 'sylphx.network.v1.ListDomainsRequest': [
103
+ ['pageSize', 'page_size'],
104
+ ['pageToken', 'page_token'],
105
+ ['orderBy', 'order_by'],
106
+ ],
107
+ 'sylphx.network.v1.ListDomainsResponse': [
108
+ ['domains', 'domains', 'sylphx.network.v1.Domain'],
109
+ ['nextPageToken', 'next_page_token'],
110
+ ],
111
+ 'sylphx.network.v1.ListEgressIdentitiesRequest': [
112
+ ['pageSize', 'page_size'],
113
+ ['pageToken', 'page_token'],
114
+ ['orderBy', 'order_by'],
115
+ ],
116
+ 'sylphx.network.v1.ListEgressIdentitiesResponse': [
117
+ ['egressIdentities', 'egress_identities', 'sylphx.network.v1.EgressIdentity'],
118
+ ['nextPageToken', 'next_page_token'],
119
+ ],
120
+ 'sylphx.network.v1.ListPrivateLinksRequest': [
121
+ ['pageSize', 'page_size'],
122
+ ['pageToken', 'page_token'],
123
+ ['orderBy', 'order_by'],
124
+ ],
125
+ 'sylphx.network.v1.ListPrivateLinksResponse': [
126
+ ['privateLinks', 'private_links', 'sylphx.network.v1.PrivateLink'],
127
+ ['nextPageToken', 'next_page_token'],
128
+ ],
129
+ 'sylphx.network.v1.ListRoutesRequest': [
130
+ ['pageSize', 'page_size'],
131
+ ['pageToken', 'page_token'],
132
+ ['orderBy', 'order_by'],
133
+ ],
134
+ 'sylphx.network.v1.ListRoutesResponse': [
135
+ ['routes', 'routes', 'sylphx.network.v1.Route'],
136
+ ['nextPageToken', 'next_page_token'],
137
+ ],
138
+ 'sylphx.network.v1.PrivateLink': [
139
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
140
+ ['spec', 'spec', 'sylphx.network.v1.PrivateLinkSpec'],
141
+ ['status', 'status', 'sylphx.network.v1.PrivateLinkStatus'],
142
+ ],
143
+ 'sylphx.network.v1.PrivateLinkSpec': [
144
+ ['allowedConsumers', 'allowed_consumers'],
145
+ ],
146
+ 'sylphx.network.v1.PrivateLinkStatus': [
147
+ ['observedGeneration', 'observed_generation'],
148
+ ['conditions', 'conditions', 'sylphx.common.v1.Condition'],
149
+ ['endpointService', 'endpoint_service'],
150
+ ],
151
+ 'sylphx.network.v1.Route': [
152
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
153
+ ['spec', 'spec', 'sylphx.network.v1.RouteSpec'],
154
+ ['status', 'status', 'sylphx.network.v1.RouteStatus'],
155
+ ],
156
+ 'sylphx.network.v1.RouteEdge': [
157
+ ['hostnameState', 'hostname_state'],
158
+ ['tlsState', 'tls_state'],
159
+ ],
160
+ 'sylphx.network.v1.RouteRedirect': [
161
+ ['targetUri', 'target_uri'],
162
+ ['statusCode', 'status_code'],
163
+ ],
164
+ 'sylphx.network.v1.RouteSpec': [
165
+ ['pathPrefix', 'path_prefix'],
166
+ ['redirect', 'redirect', 'sylphx.network.v1.RouteRedirect'],
167
+ ],
168
+ 'sylphx.network.v1.RouteStatus': [
169
+ ['observedGeneration', 'observed_generation'],
170
+ ['conditions', 'conditions', 'sylphx.common.v1.Condition'],
171
+ ['edge', 'edge', 'sylphx.network.v1.RouteEdge'],
172
+ ],
173
+ 'sylphx.network.v1.UpdateDomainRequest': [
174
+ ['domain', 'domain', 'sylphx.network.v1.Domain'],
175
+ ['updateMask', 'update_mask'],
176
+ ['allowMissing', 'allow_missing'],
177
+ ['validateOnly', 'validate_only'],
178
+ ],
179
+ 'sylphx.network.v1.UpdateEgressIdentityRequest': [
180
+ ['egressIdentity', 'egress_identity', 'sylphx.network.v1.EgressIdentity'],
181
+ ['updateMask', 'update_mask'],
182
+ ['allowMissing', 'allow_missing'],
183
+ ['validateOnly', 'validate_only'],
184
+ ],
185
+ 'sylphx.network.v1.UpdatePrivateLinkRequest': [
186
+ ['privateLink', 'private_link', 'sylphx.network.v1.PrivateLink'],
187
+ ['updateMask', 'update_mask'],
188
+ ['allowMissing', 'allow_missing'],
189
+ ['validateOnly', 'validate_only'],
190
+ ],
191
+ 'sylphx.network.v1.UpdateRouteRequest': [
192
+ ['route', 'route', 'sylphx.network.v1.Route'],
193
+ ['updateMask', 'update_mask'],
194
+ ['allowMissing', 'allow_missing'],
195
+ ['validateOnly', 'validate_only'],
196
+ ],
197
+ 'sylphx.network.v1.VerifyDomainRequest': [],
198
+ });
199
+ /**
200
+ * NetworkService is Sylphx Network: verified domains, exact routes served by
201
+ * each Cell's edge from its snapshot, certificates Sylphx terminates, declared
202
+ * egress addresses, and private links (docs/specs/one-platform/network-front-
203
+ * door.md §6).
204
+ *
205
+ * Namespace of Sylphx Network on `Sylphx`.
206
+ */
207
+ export class NetworkApi {
208
+ /** The `domains` collection. */
209
+ domains;
210
+ /** The `certificates` collection. */
211
+ certificates;
212
+ /** The `routes` collection. */
213
+ routes;
214
+ /** The `egress_identities` collection. */
215
+ egressIdentities;
216
+ /** The `private_links` collection. */
217
+ privateLinks;
218
+ constructor(client) {
219
+ this.domains = new DomainsCollection(client);
220
+ this.certificates = new CertificatesCollection(client);
221
+ this.routes = new RoutesCollection(client);
222
+ this.egressIdentities = new EgressIdentitiesCollection(client);
223
+ this.privateLinks = new PrivateLinksCollection(client);
224
+ }
225
+ }
226
+ /** `domains` of Sylphx Network: Resource type `network.sylphx.com/Domain`. */
227
+ export class DomainsCollection {
228
+ client;
229
+ constructor(client) {
230
+ this.client = client;
231
+ }
232
+ /**
233
+ * Gets a domain.
234
+ *
235
+ * `GET /v1/{name=orgs/*\/projects/*\/domains/*}` · permission `network:read` · effect `read`
236
+ *
237
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
238
+ */
239
+ async get(request) {
240
+ return this.client.call({
241
+ method: 'GET',
242
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/domains/*', 'name')}`,
243
+ responseType: 'sylphx.network.v1.Domain',
244
+ mutation: false,
245
+ });
246
+ }
247
+ /**
248
+ * Lists domains in a project.
249
+ *
250
+ * `GET /v1/{parent=orgs/*\/projects/*}/domains` · permission `network:read` · effect `read`
251
+ *
252
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
253
+ */
254
+ async list(request) {
255
+ return this.client.call({
256
+ method: 'GET',
257
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*', 'parent')}/domains`,
258
+ query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter, order_by: request.orderBy },
259
+ responseType: 'sylphx.network.v1.ListDomainsResponse',
260
+ mutation: false,
261
+ });
262
+ }
263
+ /** Every item of every page of `list`. */
264
+ async *listAll(request) {
265
+ let next = request;
266
+ for (;;) {
267
+ const page = await this.list(next);
268
+ yield* page.domains ?? [];
269
+ if (page.nextPageToken === undefined || page.nextPageToken === '')
270
+ return;
271
+ next = { ...request, pageToken: page.nextPageToken };
272
+ }
273
+ }
274
+ /**
275
+ * Creates a domain. The Operation is done when the controller settles it.
276
+ *
277
+ * `POST /v1/{parent=orgs/*\/projects/*}/domains` · permission `network:write` · effect `write`
278
+ *
279
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`, `SPEND_LIMIT_REACHED`.
280
+ */
281
+ async create(request) {
282
+ const operation = await this.client.call({
283
+ method: 'POST',
284
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*', 'parent')}/domains`,
285
+ query: { domain_id: request.domainId, validate_only: request.validateOnly },
286
+ body: request.domain ?? {},
287
+ bodyType: 'sylphx.network.v1.Domain',
288
+ responseType: 'sylphx.common.v1.Operation',
289
+ mutation: true,
290
+ });
291
+ return new runtime.Operation(this.client, operation, 'sylphx.network.v1.Domain');
292
+ }
293
+ /**
294
+ * Updates a domain.
295
+ *
296
+ * `PATCH /v1/{domain.name=orgs/*\/projects/*\/domains/*}` · permission `network:write` · effect `write`
297
+ *
298
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
299
+ */
300
+ async update(request) {
301
+ const operation = await this.client.call({
302
+ method: 'PATCH',
303
+ path: `/v1/${runtime.pathParam(request.domain?.name, 'orgs/*/projects/*/domains/*', 'domain.name')}`,
304
+ query: { update_mask: request.updateMask, allow_missing: request.allowMissing, validate_only: request.validateOnly },
305
+ body: request.domain ?? {},
306
+ bodyType: 'sylphx.network.v1.Domain',
307
+ responseType: 'sylphx.common.v1.Operation',
308
+ mutation: true,
309
+ });
310
+ return new runtime.Operation(this.client, operation, 'sylphx.network.v1.Domain');
311
+ }
312
+ /**
313
+ * Deletes a domain.
314
+ *
315
+ * `DELETE /v1/{name=orgs/*\/projects/*\/domains/*}` · permission `network:write` · effect `destructive`
316
+ *
317
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `ETAG_MISMATCH`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
318
+ */
319
+ async delete(request) {
320
+ const operation = await this.client.call({
321
+ method: 'DELETE',
322
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/domains/*', 'name')}`,
323
+ query: { etag: request.etag, allow_missing: request.allowMissing, validate_only: request.validateOnly },
324
+ responseType: 'sylphx.common.v1.Operation',
325
+ mutation: true,
326
+ });
327
+ return new runtime.Operation(this.client, operation, undefined);
328
+ }
329
+ /**
330
+ * Checks the verification record now instead of at the next sweep.
331
+ *
332
+ * `POST /v1/{name=orgs/*\/projects/*\/domains/*}:verify` · permission `network:write` · effect `write`
333
+ *
334
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
335
+ */
336
+ async verify(request) {
337
+ const operation = await this.client.call({
338
+ method: 'POST',
339
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/domains/*', 'name')}:verify`,
340
+ body: runtime.omit(request, ['name']),
341
+ bodyType: 'sylphx.network.v1.VerifyDomainRequest',
342
+ responseType: 'sylphx.common.v1.Operation',
343
+ mutation: true,
344
+ });
345
+ return new runtime.Operation(this.client, operation, 'sylphx.network.v1.Domain');
346
+ }
347
+ }
348
+ /** `certificates` of Sylphx Network: Resource type `network.sylphx.com/Certificate`. */
349
+ export class CertificatesCollection {
350
+ client;
351
+ constructor(client) {
352
+ this.client = client;
353
+ }
354
+ /**
355
+ * Gets a certificate.
356
+ *
357
+ * `GET /v1/{name=orgs/*\/projects/*\/certificates/*}` · permission `network:read` · effect `read`
358
+ *
359
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
360
+ */
361
+ async get(request) {
362
+ return this.client.call({
363
+ method: 'GET',
364
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/certificates/*', 'name')}`,
365
+ responseType: 'sylphx.network.v1.Certificate',
366
+ mutation: false,
367
+ });
368
+ }
369
+ /**
370
+ * Lists certificates in a project.
371
+ *
372
+ * `GET /v1/{parent=orgs/*\/projects/*}/certificates` · permission `network:read` · effect `read`
373
+ *
374
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
375
+ */
376
+ async list(request) {
377
+ return this.client.call({
378
+ method: 'GET',
379
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*', 'parent')}/certificates`,
380
+ query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter, order_by: request.orderBy },
381
+ responseType: 'sylphx.network.v1.ListCertificatesResponse',
382
+ mutation: false,
383
+ });
384
+ }
385
+ /** Every item of every page of `list`. */
386
+ async *listAll(request) {
387
+ let next = request;
388
+ for (;;) {
389
+ const page = await this.list(next);
390
+ yield* page.certificates ?? [];
391
+ if (page.nextPageToken === undefined || page.nextPageToken === '')
392
+ return;
393
+ next = { ...request, pageToken: page.nextPageToken };
394
+ }
395
+ }
396
+ }
397
+ /** `routes` of Sylphx Network: Resource type `network.sylphx.com/Route`. */
398
+ export class RoutesCollection {
399
+ client;
400
+ constructor(client) {
401
+ this.client = client;
402
+ }
403
+ /**
404
+ * Gets a route.
405
+ *
406
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/routes/*}` · permission `network:read` · effect `read`
407
+ *
408
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
409
+ */
410
+ async get(request) {
411
+ return this.client.call({
412
+ method: 'GET',
413
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/routes/*', 'name')}`,
414
+ responseType: 'sylphx.network.v1.Route',
415
+ mutation: false,
416
+ });
417
+ }
418
+ /**
419
+ * Lists routes in a environment.
420
+ *
421
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/routes` · permission `network:read` · effect `read`
422
+ *
423
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
424
+ */
425
+ async list(request) {
426
+ return this.client.call({
427
+ method: 'GET',
428
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/routes`,
429
+ query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter, order_by: request.orderBy },
430
+ responseType: 'sylphx.network.v1.ListRoutesResponse',
431
+ mutation: false,
432
+ });
433
+ }
434
+ /** Every item of every page of `list`. */
435
+ async *listAll(request) {
436
+ let next = request;
437
+ for (;;) {
438
+ const page = await this.list(next);
439
+ yield* page.routes ?? [];
440
+ if (page.nextPageToken === undefined || page.nextPageToken === '')
441
+ return;
442
+ next = { ...request, pageToken: page.nextPageToken };
443
+ }
444
+ }
445
+ /**
446
+ * Creates a route. The Operation is done when the controller settles it.
447
+ *
448
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/routes` · permission `network:write` · effect `write`
449
+ *
450
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`, `SPEND_LIMIT_REACHED`.
451
+ */
452
+ async create(request) {
453
+ const operation = await this.client.call({
454
+ method: 'POST',
455
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/routes`,
456
+ query: { route_id: request.routeId, validate_only: request.validateOnly },
457
+ body: request.route ?? {},
458
+ bodyType: 'sylphx.network.v1.Route',
459
+ responseType: 'sylphx.common.v1.Operation',
460
+ mutation: true,
461
+ });
462
+ return new runtime.Operation(this.client, operation, 'sylphx.network.v1.Route');
463
+ }
464
+ /**
465
+ * Updates a route.
466
+ *
467
+ * `PATCH /v1/{route.name=orgs/*\/projects/*\/envs/*\/routes/*}` · permission `network:write` · effect `write`
468
+ *
469
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
470
+ */
471
+ async update(request) {
472
+ const operation = await this.client.call({
473
+ method: 'PATCH',
474
+ path: `/v1/${runtime.pathParam(request.route?.name, 'orgs/*/projects/*/envs/*/routes/*', 'route.name')}`,
475
+ query: { update_mask: request.updateMask, allow_missing: request.allowMissing, validate_only: request.validateOnly },
476
+ body: request.route ?? {},
477
+ bodyType: 'sylphx.network.v1.Route',
478
+ responseType: 'sylphx.common.v1.Operation',
479
+ mutation: true,
480
+ });
481
+ return new runtime.Operation(this.client, operation, 'sylphx.network.v1.Route');
482
+ }
483
+ /**
484
+ * Deletes a route.
485
+ *
486
+ * `DELETE /v1/{name=orgs/*\/projects/*\/envs/*\/routes/*}` · permission `network:write` · effect `destructive`
487
+ *
488
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `ETAG_MISMATCH`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
489
+ */
490
+ async delete(request) {
491
+ const operation = await this.client.call({
492
+ method: 'DELETE',
493
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/routes/*', 'name')}`,
494
+ query: { etag: request.etag, allow_missing: request.allowMissing, validate_only: request.validateOnly },
495
+ responseType: 'sylphx.common.v1.Operation',
496
+ mutation: true,
497
+ });
498
+ return new runtime.Operation(this.client, operation, undefined);
499
+ }
500
+ }
501
+ /** `egress_identities` of Sylphx Network: Resource type `network.sylphx.com/EgressIdentity`. */
502
+ export class EgressIdentitiesCollection {
503
+ client;
504
+ constructor(client) {
505
+ this.client = client;
506
+ }
507
+ /**
508
+ * Gets an egress identity.
509
+ *
510
+ * `GET /v1/{name=orgs/*\/projects/*\/egress_identities/*}` · permission `network:read` · effect `read`
511
+ *
512
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
513
+ */
514
+ async get(request) {
515
+ return this.client.call({
516
+ method: 'GET',
517
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/egress_identities/*', 'name')}`,
518
+ responseType: 'sylphx.network.v1.EgressIdentity',
519
+ mutation: false,
520
+ });
521
+ }
522
+ /**
523
+ * Lists egress identitys in a project.
524
+ *
525
+ * `GET /v1/{parent=orgs/*\/projects/*}/egress_identities` · permission `network:read` · effect `read`
526
+ *
527
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
528
+ */
529
+ async list(request) {
530
+ return this.client.call({
531
+ method: 'GET',
532
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*', 'parent')}/egress_identities`,
533
+ query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter, order_by: request.orderBy },
534
+ responseType: 'sylphx.network.v1.ListEgressIdentitiesResponse',
535
+ mutation: false,
536
+ });
537
+ }
538
+ /** Every item of every page of `list`. */
539
+ async *listAll(request) {
540
+ let next = request;
541
+ for (;;) {
542
+ const page = await this.list(next);
543
+ yield* page.egressIdentities ?? [];
544
+ if (page.nextPageToken === undefined || page.nextPageToken === '')
545
+ return;
546
+ next = { ...request, pageToken: page.nextPageToken };
547
+ }
548
+ }
549
+ /**
550
+ * Creates an egress identity. The Operation is done when the controller
551
+ * settles it.
552
+ *
553
+ * `POST /v1/{parent=orgs/*\/projects/*}/egress_identities` · permission `network:write` · effect `write`
554
+ *
555
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`, `SPEND_LIMIT_REACHED`.
556
+ */
557
+ async create(request) {
558
+ const operation = await this.client.call({
559
+ method: 'POST',
560
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*', 'parent')}/egress_identities`,
561
+ query: { egress_identity_id: request.egressIdentityId, validate_only: request.validateOnly },
562
+ body: request.egressIdentity ?? {},
563
+ bodyType: 'sylphx.network.v1.EgressIdentity',
564
+ responseType: 'sylphx.common.v1.Operation',
565
+ mutation: true,
566
+ });
567
+ return new runtime.Operation(this.client, operation, 'sylphx.network.v1.EgressIdentity');
568
+ }
569
+ /**
570
+ * Updates an egress identity.
571
+ *
572
+ * `PATCH /v1/{egress_identity.name=orgs/*\/projects/*\/egress_identities/*}` · permission `network:write` · effect `write`
573
+ *
574
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
575
+ */
576
+ async update(request) {
577
+ const operation = await this.client.call({
578
+ method: 'PATCH',
579
+ path: `/v1/${runtime.pathParam(request.egressIdentity?.name, 'orgs/*/projects/*/egress_identities/*', 'egress_identity.name')}`,
580
+ query: { update_mask: request.updateMask, allow_missing: request.allowMissing, validate_only: request.validateOnly },
581
+ body: request.egressIdentity ?? {},
582
+ bodyType: 'sylphx.network.v1.EgressIdentity',
583
+ responseType: 'sylphx.common.v1.Operation',
584
+ mutation: true,
585
+ });
586
+ return new runtime.Operation(this.client, operation, 'sylphx.network.v1.EgressIdentity');
587
+ }
588
+ /**
589
+ * Deletes an egress identity.
590
+ *
591
+ * `DELETE /v1/{name=orgs/*\/projects/*\/egress_identities/*}` · permission `network:write` · effect `destructive`
592
+ *
593
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `ETAG_MISMATCH`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
594
+ */
595
+ async delete(request) {
596
+ const operation = await this.client.call({
597
+ method: 'DELETE',
598
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/egress_identities/*', 'name')}`,
599
+ query: { etag: request.etag, allow_missing: request.allowMissing, validate_only: request.validateOnly },
600
+ responseType: 'sylphx.common.v1.Operation',
601
+ mutation: true,
602
+ });
603
+ return new runtime.Operation(this.client, operation, undefined);
604
+ }
605
+ }
606
+ /** `private_links` of Sylphx Network: Resource type `network.sylphx.com/PrivateLink`. */
607
+ export class PrivateLinksCollection {
608
+ client;
609
+ constructor(client) {
610
+ this.client = client;
611
+ }
612
+ /**
613
+ * Gets a private link.
614
+ *
615
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/private_links/*}` · permission `network:read` · effect `read`
616
+ *
617
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
618
+ */
619
+ async get(request) {
620
+ return this.client.call({
621
+ method: 'GET',
622
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/private_links/*', 'name')}`,
623
+ responseType: 'sylphx.network.v1.PrivateLink',
624
+ mutation: false,
625
+ });
626
+ }
627
+ /**
628
+ * Lists private links in a environment.
629
+ *
630
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/private_links` · permission `network:read` · effect `read`
631
+ *
632
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
633
+ */
634
+ async list(request) {
635
+ return this.client.call({
636
+ method: 'GET',
637
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/private_links`,
638
+ query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter, order_by: request.orderBy },
639
+ responseType: 'sylphx.network.v1.ListPrivateLinksResponse',
640
+ mutation: false,
641
+ });
642
+ }
643
+ /** Every item of every page of `list`. */
644
+ async *listAll(request) {
645
+ let next = request;
646
+ for (;;) {
647
+ const page = await this.list(next);
648
+ yield* page.privateLinks ?? [];
649
+ if (page.nextPageToken === undefined || page.nextPageToken === '')
650
+ return;
651
+ next = { ...request, pageToken: page.nextPageToken };
652
+ }
653
+ }
654
+ /**
655
+ * Creates a private link. The Operation is done when the controller settles
656
+ * it.
657
+ *
658
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/private_links` · permission `network:write` · effect `write`
659
+ *
660
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`, `SPEND_LIMIT_REACHED`.
661
+ */
662
+ async create(request) {
663
+ const operation = await this.client.call({
664
+ method: 'POST',
665
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/private_links`,
666
+ query: { private_link_id: request.privateLinkId, validate_only: request.validateOnly },
667
+ body: request.privateLink ?? {},
668
+ bodyType: 'sylphx.network.v1.PrivateLink',
669
+ responseType: 'sylphx.common.v1.Operation',
670
+ mutation: true,
671
+ });
672
+ return new runtime.Operation(this.client, operation, 'sylphx.network.v1.PrivateLink');
673
+ }
674
+ /**
675
+ * Updates a private link.
676
+ *
677
+ * `PATCH /v1/{private_link.name=orgs/*\/projects/*\/envs/*\/private_links/*}` · permission `network:write` · effect `write`
678
+ *
679
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
680
+ */
681
+ async update(request) {
682
+ const operation = await this.client.call({
683
+ method: 'PATCH',
684
+ path: `/v1/${runtime.pathParam(request.privateLink?.name, 'orgs/*/projects/*/envs/*/private_links/*', 'private_link.name')}`,
685
+ query: { update_mask: request.updateMask, allow_missing: request.allowMissing, validate_only: request.validateOnly },
686
+ body: request.privateLink ?? {},
687
+ bodyType: 'sylphx.network.v1.PrivateLink',
688
+ responseType: 'sylphx.common.v1.Operation',
689
+ mutation: true,
690
+ });
691
+ return new runtime.Operation(this.client, operation, 'sylphx.network.v1.PrivateLink');
692
+ }
693
+ /**
694
+ * Deletes a private link.
695
+ *
696
+ * `DELETE /v1/{name=orgs/*\/projects/*\/envs/*\/private_links/*}` · permission `network:write` · effect `destructive`
697
+ *
698
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `ETAG_MISMATCH`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
699
+ */
700
+ async delete(request) {
701
+ const operation = await this.client.call({
702
+ method: 'DELETE',
703
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/private_links/*', 'name')}`,
704
+ query: { etag: request.etag, allow_missing: request.allowMissing, validate_only: request.validateOnly },
705
+ responseType: 'sylphx.common.v1.Operation',
706
+ mutation: true,
707
+ });
708
+ return new runtime.Operation(this.client, operation, undefined);
709
+ }
710
+ }
711
+ //# sourceMappingURL=network.js.map