@scaleway/sdk-edge-services 2.11.0 → 2.13.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.
@@ -2,577 +2,303 @@ import { PIPELINE_TRANSIENT_STATUSES, PURGE_REQUEST_TRANSIENT_STATUSES } from ".
2
2
  import { marshalAddRouteRulesRequest, marshalCheckDomainRequest, marshalCheckLbOriginRequest, marshalCheckPEMChainRequest, marshalCreateBackendStageRequest, marshalCreateCacheStageRequest, marshalCreateDNSStageRequest, marshalCreatePipelineRequest, marshalCreatePurgeRequestRequest, marshalCreateRouteStageRequest, marshalCreateTLSStageRequest, marshalCreateWafStageRequest, marshalSelectPlanRequest, marshalSetHeadStageRequest, marshalSetRouteRulesRequest, marshalUpdateBackendStageRequest, marshalUpdateCacheStageRequest, marshalUpdateDNSStageRequest, marshalUpdatePipelineRequest, marshalUpdateRouteStageRequest, marshalUpdateTLSStageRequest, marshalUpdateWafStageRequest, unmarshalAddRouteRulesResponse, unmarshalBackendStage, unmarshalCacheStage, unmarshalCheckDomainResponse, unmarshalCheckLbOriginResponse, unmarshalCheckPEMChainResponse, unmarshalDNSStage, unmarshalGetBillingResponse, unmarshalHeadStageResponse, unmarshalListBackendStagesResponse, unmarshalListCacheStagesResponse, unmarshalListDNSStagesResponse, unmarshalListHeadStagesResponse, unmarshalListPipelinesResponse, unmarshalListPipelinesWithStagesResponse, unmarshalListPlansResponse, unmarshalListPurgeRequestsResponse, unmarshalListRouteRulesResponse, unmarshalListRouteStagesResponse, unmarshalListTLSStagesResponse, unmarshalListWafStagesResponse, unmarshalPipeline, unmarshalPlan, unmarshalPurgeRequest, unmarshalRouteStage, unmarshalSetRouteRulesResponse, unmarshalTLSStage, unmarshalWafStage } from "./marshalling.gen.js";
3
3
  import { API as API$1, enrichForPagination, urlParams, validatePathParam, waitForResource } from "@scaleway/sdk-client";
4
4
  //#region src/v1beta1/api.gen.ts
5
- var jsonContentHeaders = { "Content-Type": "application/json; charset=utf-8" };
5
+ const jsonContentHeaders = { "Content-Type": "application/json; charset=utf-8" };
6
6
  /**
7
7
  * Edge Services API.
8
8
  */
9
9
  var API = class extends API$1 {
10
- pageOfListPipelines = (request = {}) => this.client.fetch({
11
- method: "GET",
12
- path: `/edge-services/v1beta1/pipelines`,
13
- urlParams: urlParams(["has_backend_stage_lb", request.hasBackendStageLb], ["name", request.name], ["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId])
14
- }, unmarshalListPipelinesResponse);
15
- /**
16
- * List pipelines. List all pipelines, for a Scaleway Organization or Scaleway Project. By default, the pipelines returned in the list are ordered by creation date in ascending order, though this can be modified via the `order_by` field.
17
- *
18
- * @param request - The request {@link ListPipelinesRequest}
19
- * @returns A Promise of ListPipelinesResponse
20
- */
21
- listPipelines = (request = {}) => enrichForPagination("pipelines", this.pageOfListPipelines, request);
22
- /**
23
- * Create pipeline. Create a new pipeline. You must specify a `dns_stage_id` to form a stage-chain that goes all the way to the backend stage (origin), so the HTTP request will be processed according to the stages you created.
24
- *
25
- * @param request - The request {@link CreatePipelineRequest}
26
- * @returns A Promise of Pipeline
27
- */
28
- createPipeline = (request) => this.client.fetch({
29
- body: JSON.stringify(marshalCreatePipelineRequest(request, this.client.settings)),
30
- headers: jsonContentHeaders,
31
- method: "POST",
32
- path: `/edge-services/v1beta1/pipelines`
33
- }, unmarshalPipeline);
34
- /**
35
- * Get pipeline. Retrieve information about an existing pipeline, specified by its `pipeline_id`. Its full details, including errors, are returned in the response object.
36
- *
37
- * @param request - The request {@link GetPipelineRequest}
38
- * @returns A Promise of Pipeline
39
- */
40
- getPipeline = (request) => this.client.fetch({
41
- method: "GET",
42
- path: `/edge-services/v1beta1/pipelines/${validatePathParam("pipelineId", request.pipelineId)}`
43
- }, unmarshalPipeline);
44
- /**
45
- * Waits for {@link Pipeline} to be in a final state.
46
- *
47
- * @param request - The request {@link GetPipelineRequest}
48
- * @param options - The waiting options
49
- * @returns A Promise of Pipeline
50
- */
51
- waitForPipeline = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!PIPELINE_TRANSIENT_STATUSES.includes(res.status))), this.getPipeline, request, options);
52
- pageOfListPipelinesWithStages = (request = {}) => this.client.fetch({
53
- method: "GET",
54
- path: `/edge-services/v1beta1/pipelines-stages`,
55
- urlParams: urlParams(["name", request.name], ["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId])
56
- }, unmarshalListPipelinesWithStagesResponse);
57
- listPipelinesWithStages = (request = {}) => enrichForPagination("pipelines", this.pageOfListPipelinesWithStages, request);
58
- /**
59
- * Update pipeline. Update the parameters of an existing pipeline, specified by its `pipeline_id`. Parameters which can be updated include the `name`, `description` and `dns_stage_id`.
60
- *
61
- * @param request - The request {@link UpdatePipelineRequest}
62
- * @returns A Promise of Pipeline
63
- */
64
- updatePipeline = (request) => this.client.fetch({
65
- body: JSON.stringify(marshalUpdatePipelineRequest(request, this.client.settings)),
66
- headers: jsonContentHeaders,
67
- method: "PATCH",
68
- path: `/edge-services/v1beta1/pipelines/${validatePathParam("pipelineId", request.pipelineId)}`
69
- }, unmarshalPipeline);
70
- /**
71
- * Delete pipeline. Delete an existing pipeline, specified by its `pipeline_id`. Deleting a pipeline is permanent, and cannot be undone. Note that all stages linked to the pipeline are also deleted.
72
- *
73
- * @param request - The request {@link DeletePipelineRequest}
74
- */
75
- deletePipeline = (request) => this.client.fetch({
76
- method: "DELETE",
77
- path: `/edge-services/v1beta1/pipelines/${validatePathParam("pipelineId", request.pipelineId)}`
78
- });
79
- pageOfListHeadStages = (request) => this.client.fetch({
80
- method: "GET",
81
- path: `/edge-services/v1beta1/pipelines/${validatePathParam("pipelineId", request.pipelineId)}/head-stages`,
82
- urlParams: urlParams(["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
83
- }, unmarshalListHeadStagesResponse);
84
- /**
85
- * List Head stage for your pipeline.. List Head stage for your pipeline.
86
- *
87
- * @param request - The request {@link ListHeadStagesRequest}
88
- * @returns A Promise of ListHeadStagesResponse
89
- */
90
- listHeadStages = (request) => enrichForPagination("headStages", this.pageOfListHeadStages, request);
91
- /**
92
- * Configure a entry point to your pipeline. You must specify a `head stage` to form a stage-chain that goes all the way to the backend stage (origin), so the HTTP request will be processed according to the stages you created.. You must specify either a `add_new_head_stage` (to add a new head stage), `remove_head_stage` (to remove a head stage) or `swap_head_stage` (to replace a head stage).
93
- *
94
- * @param request - The request {@link SetHeadStageRequest}
95
- * @returns A Promise of HeadStageResponse
96
- */
97
- setHeadStage = (request) => this.client.fetch({
98
- body: JSON.stringify(marshalSetHeadStageRequest(request, this.client.settings)),
99
- headers: jsonContentHeaders,
100
- method: "POST",
101
- path: `/edge-services/v1beta1/pipelines/${validatePathParam("pipelineId", request.pipelineId)}/set-head-stage`
102
- }, unmarshalHeadStageResponse);
103
- pageOfListDNSStages = (request) => this.client.fetch({
104
- method: "GET",
105
- path: `/edge-services/v1beta1/pipelines/${validatePathParam("pipelineId", request.pipelineId)}/dns-stages`,
106
- urlParams: urlParams(["fqdn", request.fqdn], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
107
- }, unmarshalListDNSStagesResponse);
108
- /**
109
- * List DNS stages. List all DNS stages, for a Scaleway Organization or Scaleway Project. By default, the DNS stages returned in the list are ordered by creation date in ascending order, though this can be modified via the `order_by` field.
110
- *
111
- * @param request - The request {@link ListDNSStagesRequest}
112
- * @returns A Promise of ListDNSStagesResponse
113
- */
114
- listDNSStages = (request) => enrichForPagination("stages", this.pageOfListDNSStages, request);
115
- /**
116
- * Create DNS stage. Create a new DNS stage. You must specify the `fqdns` field to customize the domain endpoint, using a domain you already own.
117
- *
118
- * @param request - The request {@link CreateDNSStageRequest}
119
- * @returns A Promise of DNSStage
120
- */
121
- createDNSStage = (request) => this.client.fetch({
122
- body: JSON.stringify(marshalCreateDNSStageRequest(request, this.client.settings)),
123
- headers: jsonContentHeaders,
124
- method: "POST",
125
- path: `/edge-services/v1beta1/pipelines/${validatePathParam("pipelineId", request.pipelineId)}/dns-stages`
126
- }, unmarshalDNSStage);
127
- /**
128
- * Get DNS stage. Retrieve information about an existing DNS stage, specified by its `dns_stage_id`. Its full details, including FQDNs, are returned in the response object.
129
- *
130
- * @param request - The request {@link GetDNSStageRequest}
131
- * @returns A Promise of DNSStage
132
- */
133
- getDNSStage = (request) => this.client.fetch({
134
- method: "GET",
135
- path: `/edge-services/v1beta1/dns-stages/${validatePathParam("dnsStageId", request.dnsStageId)}`
136
- }, unmarshalDNSStage);
137
- /**
138
- * Update DNS stage. Update the parameters of an existing DNS stage, specified by its `dns_stage_id`.
139
- *
140
- * @param request - The request {@link UpdateDNSStageRequest}
141
- * @returns A Promise of DNSStage
142
- */
143
- updateDNSStage = (request) => this.client.fetch({
144
- body: JSON.stringify(marshalUpdateDNSStageRequest(request, this.client.settings)),
145
- headers: jsonContentHeaders,
146
- method: "PATCH",
147
- path: `/edge-services/v1beta1/dns-stages/${validatePathParam("dnsStageId", request.dnsStageId)}`
148
- }, unmarshalDNSStage);
149
- /**
150
- * Delete DNS stage. Delete an existing DNS stage, specified by its `dns_stage_id`. Deleting a DNS stage is permanent, and cannot be undone.
151
- *
152
- * @param request - The request {@link DeleteDNSStageRequest}
153
- */
154
- deleteDNSStage = (request) => this.client.fetch({
155
- method: "DELETE",
156
- path: `/edge-services/v1beta1/dns-stages/${validatePathParam("dnsStageId", request.dnsStageId)}`
157
- });
158
- pageOfListTLSStages = (request) => this.client.fetch({
159
- method: "GET",
160
- path: `/edge-services/v1beta1/pipelines/${validatePathParam("pipelineId", request.pipelineId)}/tls-stages`,
161
- urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["secret_id", request.secretId], ["secret_region", request.secretRegion])
162
- }, unmarshalListTLSStagesResponse);
163
- /**
164
- * List TLS stages. List all TLS stages, for a Scaleway Organization or Scaleway Project. By default, the TLS stages returned in the list are ordered by creation date in ascending order, though this can be modified via the `order_by` field.
165
- *
166
- * @param request - The request {@link ListTLSStagesRequest}
167
- * @returns A Promise of ListTLSStagesResponse
168
- */
169
- listTLSStages = (request) => enrichForPagination("stages", this.pageOfListTLSStages, request);
170
- /**
171
- * Create TLS stage. Create a new TLS stage. You must specify either the `secrets` or `managed_certificate` fields to customize the SSL/TLS certificate of your endpoint. Choose `secrets` if you are using a pre-existing certificate held in Scaleway Secret Manager, or `managed_certificate` to let Scaleway generate and manage a Let's Encrypt certificate for your customized endpoint.
172
- *
173
- * @param request - The request {@link CreateTLSStageRequest}
174
- * @returns A Promise of TLSStage
175
- */
176
- createTLSStage = (request) => this.client.fetch({
177
- body: JSON.stringify(marshalCreateTLSStageRequest(request, this.client.settings)),
178
- headers: jsonContentHeaders,
179
- method: "POST",
180
- path: `/edge-services/v1beta1/pipelines/${validatePathParam("pipelineId", request.pipelineId)}/tls-stages`
181
- }, unmarshalTLSStage);
182
- /**
183
- * Get TLS stage. Retrieve information about an existing TLS stage, specified by its `tls_stage_id`. Its full details, including secrets and certificate expiration date are returned in the response object.
184
- *
185
- * @param request - The request {@link GetTLSStageRequest}
186
- * @returns A Promise of TLSStage
187
- */
188
- getTLSStage = (request) => this.client.fetch({
189
- method: "GET",
190
- path: `/edge-services/v1beta1/tls-stages/${validatePathParam("tlsStageId", request.tlsStageId)}`
191
- }, unmarshalTLSStage);
192
- /**
193
- * Update TLS stage. Update the parameters of an existing TLS stage, specified by its `tls_stage_id`. Both `tls_secrets_config` and `managed_certificate` parameters can be updated.
194
- *
195
- * @param request - The request {@link UpdateTLSStageRequest}
196
- * @returns A Promise of TLSStage
197
- */
198
- updateTLSStage = (request) => this.client.fetch({
199
- body: JSON.stringify(marshalUpdateTLSStageRequest(request, this.client.settings)),
200
- headers: jsonContentHeaders,
201
- method: "PATCH",
202
- path: `/edge-services/v1beta1/tls-stages/${validatePathParam("tlsStageId", request.tlsStageId)}`
203
- }, unmarshalTLSStage);
204
- /**
205
- * Delete TLS stage. Delete an existing TLS stage, specified by its `tls_stage_id`. Deleting a TLS stage is permanent, and cannot be undone.
206
- *
207
- * @param request - The request {@link DeleteTLSStageRequest}
208
- */
209
- deleteTLSStage = (request) => this.client.fetch({
210
- method: "DELETE",
211
- path: `/edge-services/v1beta1/tls-stages/${validatePathParam("tlsStageId", request.tlsStageId)}`
212
- });
213
- pageOfListCacheStages = (request) => this.client.fetch({
214
- method: "GET",
215
- path: `/edge-services/v1beta1/pipelines/${validatePathParam("pipelineId", request.pipelineId)}/cache-stages`,
216
- urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
217
- }, unmarshalListCacheStagesResponse);
218
- /**
219
- * List cache stages. List all cache stages, for a Scaleway Organization or Scaleway Project. By default, the cache stages returned in the list are ordered by creation date in ascending order, though this can be modified via the `order_by` field.
220
- *
221
- * @param request - The request {@link ListCacheStagesRequest}
222
- * @returns A Promise of ListCacheStagesResponse
223
- */
224
- listCacheStages = (request) => enrichForPagination("stages", this.pageOfListCacheStages, request);
225
- /**
226
- * Create cache stage. Create a new cache stage. You must specify the `fallback_ttl` field to customize the TTL of the cache.
227
- *
228
- * @param request - The request {@link CreateCacheStageRequest}
229
- * @returns A Promise of CacheStage
230
- */
231
- createCacheStage = (request) => this.client.fetch({
232
- body: JSON.stringify(marshalCreateCacheStageRequest(request, this.client.settings)),
233
- headers: jsonContentHeaders,
234
- method: "POST",
235
- path: `/edge-services/v1beta1/pipelines/${validatePathParam("pipelineId", request.pipelineId)}/cache-stages`
236
- }, unmarshalCacheStage);
237
- /**
238
- * Get cache stage. Retrieve information about an existing cache stage, specified by its `cache_stage_id`. Its full details, including Time To Live (TTL), are returned in the response object.
239
- *
240
- * @param request - The request {@link GetCacheStageRequest}
241
- * @returns A Promise of CacheStage
242
- */
243
- getCacheStage = (request) => this.client.fetch({
244
- method: "GET",
245
- path: `/edge-services/v1beta1/cache-stages/${validatePathParam("cacheStageId", request.cacheStageId)}`
246
- }, unmarshalCacheStage);
247
- /**
248
- * Update cache stage. Update the parameters of an existing cache stage, specified by its `cache_stage_id`. Parameters which can be updated include the `fallback_ttl`, `include_cookies` and `backend_stage_id`.
249
- *
250
- * @param request - The request {@link UpdateCacheStageRequest}
251
- * @returns A Promise of CacheStage
252
- */
253
- updateCacheStage = (request) => this.client.fetch({
254
- body: JSON.stringify(marshalUpdateCacheStageRequest(request, this.client.settings)),
255
- headers: jsonContentHeaders,
256
- method: "PATCH",
257
- path: `/edge-services/v1beta1/cache-stages/${validatePathParam("cacheStageId", request.cacheStageId)}`
258
- }, unmarshalCacheStage);
259
- /**
260
- * Delete cache stage. Delete an existing cache stage, specified by its `cache_stage_id`. Deleting a cache stage is permanent, and cannot be undone.
261
- *
262
- * @param request - The request {@link DeleteCacheStageRequest}
263
- */
264
- deleteCacheStage = (request) => this.client.fetch({
265
- method: "DELETE",
266
- path: `/edge-services/v1beta1/cache-stages/${validatePathParam("cacheStageId", request.cacheStageId)}`
267
- });
268
- pageOfListBackendStages = (request) => this.client.fetch({
269
- method: "GET",
270
- path: `/edge-services/v1beta1/pipelines/${validatePathParam("pipelineId", request.pipelineId)}/backend-stages`,
271
- urlParams: urlParams(["bucket_name", request.bucketName], ["bucket_region", request.bucketRegion], ["lb_id", request.lbId], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
272
- }, unmarshalListBackendStagesResponse);
273
- /**
274
- * List backend stages. List all backend stages, for a Scaleway Organization or Scaleway Project. By default, the backend stages returned in the list are ordered by creation date in ascending order, though this can be modified via the `order_by` field.
275
- *
276
- * @param request - The request {@link ListBackendStagesRequest}
277
- * @returns A Promise of ListBackendStagesResponse
278
- */
279
- listBackendStages = (request) => enrichForPagination("stages", this.pageOfListBackendStages, request);
280
- /**
281
- * Create backend stage. Create a new backend stage. You must specify either a `scaleway_s3` (for a Scaleway Object Storage bucket) or `scaleway_lb` (for a Scaleway Load Balancer) field to configure the origin.
282
- *
283
- * @param request - The request {@link CreateBackendStageRequest}
284
- * @returns A Promise of BackendStage
285
- */
286
- createBackendStage = (request) => this.client.fetch({
287
- body: JSON.stringify(marshalCreateBackendStageRequest(request, this.client.settings)),
288
- headers: jsonContentHeaders,
289
- method: "POST",
290
- path: `/edge-services/v1beta1/pipelines/${validatePathParam("pipelineId", request.pipelineId)}/backend-stages`
291
- }, unmarshalBackendStage);
292
- /**
293
- * Get backend stage. Retrieve information about an existing backend stage, specified by its `backend_stage_id`. Its full details, including `scaleway_s3` or `scaleway_lb`, are returned in the response object.
294
- *
295
- * @param request - The request {@link GetBackendStageRequest}
296
- * @returns A Promise of BackendStage
297
- */
298
- getBackendStage = (request) => this.client.fetch({
299
- method: "GET",
300
- path: `/edge-services/v1beta1/backend-stages/${validatePathParam("backendStageId", request.backendStageId)}`
301
- }, unmarshalBackendStage);
302
- /**
303
- * Update backend stage. Update the parameters of an existing backend stage, specified by its `backend_stage_id`.
304
- *
305
- * @param request - The request {@link UpdateBackendStageRequest}
306
- * @returns A Promise of BackendStage
307
- */
308
- updateBackendStage = (request) => this.client.fetch({
309
- body: JSON.stringify(marshalUpdateBackendStageRequest(request, this.client.settings)),
310
- headers: jsonContentHeaders,
311
- method: "PATCH",
312
- path: `/edge-services/v1beta1/backend-stages/${validatePathParam("backendStageId", request.backendStageId)}`
313
- }, unmarshalBackendStage);
314
- /**
315
- * Delete backend stage. Delete an existing backend stage, specified by its `backend_stage_id`. Deleting a backend stage is permanent, and cannot be undone.
316
- *
317
- * @param request - The request {@link DeleteBackendStageRequest}
318
- */
319
- deleteBackendStage = (request) => this.client.fetch({
320
- method: "DELETE",
321
- path: `/edge-services/v1beta1/backend-stages/${validatePathParam("backendStageId", request.backendStageId)}`
322
- });
323
- searchBackendStages = (request = {}) => this.client.fetch({
324
- method: "GET",
325
- path: `/edge-services/v1beta1/search-backend-stages`,
326
- urlParams: urlParams(["bucket_name", request.bucketName], ["bucket_region", request.bucketRegion], ["lb_id", request.lbId], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId ?? this.client.settings.defaultProjectId])
327
- }, unmarshalListBackendStagesResponse);
328
- pageOfListWafStages = (request) => this.client.fetch({
329
- method: "GET",
330
- path: `/edge-services/v1beta1/pipelines/${validatePathParam("pipelineId", request.pipelineId)}/waf-stages`,
331
- urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
332
- }, unmarshalListWafStagesResponse);
333
- /**
334
- * List WAF stages. List all WAF stages, for a Scaleway Organization or Scaleway Project. By default, the WAF stages returned in the list are ordered by creation date in ascending order, though this can be modified via the `order_by` field.
335
- *
336
- * @param request - The request {@link ListWafStagesRequest}
337
- * @returns A Promise of ListWafStagesResponse
338
- */
339
- listWafStages = (request) => enrichForPagination("stages", this.pageOfListWafStages, request);
340
- /**
341
- * Create WAF stage. Create a new WAF stage. You must specify the `mode` and `paranoia_level` fields to customize the WAF.
342
- *
343
- * @param request - The request {@link CreateWafStageRequest}
344
- * @returns A Promise of WafStage
345
- */
346
- createWafStage = (request) => this.client.fetch({
347
- body: JSON.stringify(marshalCreateWafStageRequest(request, this.client.settings)),
348
- headers: jsonContentHeaders,
349
- method: "POST",
350
- path: `/edge-services/v1beta1/pipelines/${validatePathParam("pipelineId", request.pipelineId)}/waf-stages`
351
- }, unmarshalWafStage);
352
- /**
353
- * Get WAF stage. Retrieve information about an existing WAF stage, specified by its `waf_stage_id`. Its full details are returned in the response object.
354
- *
355
- * @param request - The request {@link GetWafStageRequest}
356
- * @returns A Promise of WafStage
357
- */
358
- getWafStage = (request) => this.client.fetch({
359
- method: "GET",
360
- path: `/edge-services/v1beta1/waf-stages/${validatePathParam("wafStageId", request.wafStageId)}`
361
- }, unmarshalWafStage);
362
- /**
363
- * Update WAF stage. Update the parameters of an existing WAF stage, specified by its `waf_stage_id`. Both `mode` and `paranoia_level` parameters can be updated.
364
- *
365
- * @param request - The request {@link UpdateWafStageRequest}
366
- * @returns A Promise of WafStage
367
- */
368
- updateWafStage = (request) => this.client.fetch({
369
- body: JSON.stringify(marshalUpdateWafStageRequest(request, this.client.settings)),
370
- headers: jsonContentHeaders,
371
- method: "PATCH",
372
- path: `/edge-services/v1beta1/waf-stages/${validatePathParam("wafStageId", request.wafStageId)}`
373
- }, unmarshalWafStage);
374
- /**
375
- * Delete WAF stage. Delete an existing WAF stage, specified by its `waf_stage_id`. Deleting a WAF stage is permanent, and cannot be undone.
376
- *
377
- * @param request - The request {@link DeleteWafStageRequest}
378
- */
379
- deleteWafStage = (request) => this.client.fetch({
380
- method: "DELETE",
381
- path: `/edge-services/v1beta1/waf-stages/${validatePathParam("wafStageId", request.wafStageId)}`
382
- });
383
- searchWafStages = (request = {}) => this.client.fetch({
384
- method: "GET",
385
- path: `/edge-services/v1beta1/search-waf-stages`,
386
- urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId ?? this.client.settings.defaultProjectId])
387
- }, unmarshalListWafStagesResponse);
388
- pageOfListRouteStages = (request) => this.client.fetch({
389
- method: "GET",
390
- path: `/edge-services/v1beta1/pipelines/${validatePathParam("pipelineId", request.pipelineId)}/route-stages`,
391
- urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
392
- }, unmarshalListRouteStagesResponse);
393
- /**
394
- * List route stages. List all route stages, for a given pipeline. By default, the route stages returned in the list are ordered by creation date in ascending order, though this can be modified via the `order_by` field.
395
- *
396
- * @param request - The request {@link ListRouteStagesRequest}
397
- * @returns A Promise of ListRouteStagesResponse
398
- */
399
- listRouteStages = (request) => enrichForPagination("stages", this.pageOfListRouteStages, request);
400
- /**
401
- * Create route stage. Create a new route stage. You must specify the `waf_stage_id` or `backend_stage_id` fields to customize the route.
402
- *
403
- * @param request - The request {@link CreateRouteStageRequest}
404
- * @returns A Promise of RouteStage
405
- */
406
- createRouteStage = (request) => this.client.fetch({
407
- body: JSON.stringify(marshalCreateRouteStageRequest(request, this.client.settings)),
408
- headers: jsonContentHeaders,
409
- method: "POST",
410
- path: `/edge-services/v1beta1/pipelines/${validatePathParam("pipelineId", request.pipelineId)}/route-stages`
411
- }, unmarshalRouteStage);
412
- /**
413
- * Get route stage. Retrieve information about an existing route stage, specified by its `route_stage_id`. The summary of the route stage (without route rules) is returned in the response object.
414
- *
415
- * @param request - The request {@link GetRouteStageRequest}
416
- * @returns A Promise of RouteStage
417
- */
418
- getRouteStage = (request) => this.client.fetch({
419
- method: "GET",
420
- path: `/edge-services/v1beta1/route-stages/${validatePathParam("routeStageId", request.routeStageId)}`
421
- }, unmarshalRouteStage);
422
- /**
423
- * Update route stage. Update the parameters of an existing route stage, specified by its `route_stage_id`.
424
- *
425
- * @param request - The request {@link UpdateRouteStageRequest}
426
- * @returns A Promise of RouteStage
427
- */
428
- updateRouteStage = (request) => this.client.fetch({
429
- body: JSON.stringify(marshalUpdateRouteStageRequest(request, this.client.settings)),
430
- headers: jsonContentHeaders,
431
- method: "PATCH",
432
- path: `/edge-services/v1beta1/route-stages/${validatePathParam("routeStageId", request.routeStageId)}`
433
- }, unmarshalRouteStage);
434
- /**
435
- * Delete route stage. Delete an existing route stage, specified by its `route_stage_id`. Deleting a route stage is permanent, and cannot be undone.
436
- *
437
- * @param request - The request {@link DeleteRouteStageRequest}
438
- */
439
- deleteRouteStage = (request) => this.client.fetch({
440
- method: "DELETE",
441
- path: `/edge-services/v1beta1/route-stages/${validatePathParam("routeStageId", request.routeStageId)}`
442
- });
443
- /**
444
- * List route rules. List all route rules of an existing route stage, specified by its `route_stage_id`.
445
- *
446
- * @param request - The request {@link ListRouteRulesRequest}
447
- * @returns A Promise of ListRouteRulesResponse
448
- */
449
- listRouteRules = (request) => this.client.fetch({
450
- method: "GET",
451
- path: `/edge-services/v1beta1/route-stages/${validatePathParam("routeStageId", request.routeStageId)}/route-rules`
452
- }, unmarshalListRouteRulesResponse);
453
- /**
454
- * Set route rules. Set the rules of an existing route stage, specified by its `route_stage_id`.
455
- *
456
- * @param request - The request {@link SetRouteRulesRequest}
457
- * @returns A Promise of SetRouteRulesResponse
458
- */
459
- setRouteRules = (request) => this.client.fetch({
460
- body: JSON.stringify(marshalSetRouteRulesRequest(request, this.client.settings)),
461
- headers: jsonContentHeaders,
462
- method: "PUT",
463
- path: `/edge-services/v1beta1/route-stages/${validatePathParam("routeStageId", request.routeStageId)}/route-rules`
464
- }, unmarshalSetRouteRulesResponse);
465
- /**
466
- * Add route rules. Add route rules to an existing route stage, specified by its `route_stage_id`.
467
- *
468
- * @param request - The request {@link AddRouteRulesRequest}
469
- * @returns A Promise of AddRouteRulesResponse
470
- */
471
- addRouteRules = (request) => this.client.fetch({
472
- body: JSON.stringify(marshalAddRouteRulesRequest(request, this.client.settings)),
473
- headers: jsonContentHeaders,
474
- method: "POST",
475
- path: `/edge-services/v1beta1/route-stages/${validatePathParam("routeStageId", request.routeStageId)}/route-rules`
476
- }, unmarshalAddRouteRulesResponse);
477
- /**
478
- * List route rules. List all route rules of an organization or project.
479
- *
480
- * @param request - The request {@link SearchRouteRulesRequest}
481
- * @returns A Promise of ListRouteRulesResponse
482
- */
483
- searchRouteRules = (request = {}) => this.client.fetch({
484
- method: "GET",
485
- path: `/edge-services/v1beta1/search-route-rules`,
486
- urlParams: urlParams(["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId])
487
- }, unmarshalListRouteRulesResponse);
488
- checkDomain = (request) => this.client.fetch({
489
- body: JSON.stringify(marshalCheckDomainRequest(request, this.client.settings)),
490
- headers: jsonContentHeaders,
491
- method: "POST",
492
- path: `/edge-services/v1beta1/check-domain`
493
- }, unmarshalCheckDomainResponse);
494
- checkPEMChain = (request) => this.client.fetch({
495
- body: JSON.stringify(marshalCheckPEMChainRequest(request, this.client.settings)),
496
- headers: jsonContentHeaders,
497
- method: "POST",
498
- path: `/edge-services/v1beta1/check-pem-chain`
499
- }, unmarshalCheckPEMChainResponse);
500
- pageOfListPurgeRequests = (request = {}) => this.client.fetch({
501
- method: "GET",
502
- path: `/edge-services/v1beta1/purge-requests`,
503
- urlParams: urlParams(["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["pipeline_id", request.pipelineId], ["project_id", request.projectId])
504
- }, unmarshalListPurgeRequestsResponse);
505
- /**
506
- * List purge requests. List all purge requests, for a Scaleway Organization or Scaleway Project. This enables you to retrieve a history of all previously-made purge requests. By default, the purge requests returned in the list are ordered by creation date in ascending order, though this can be modified via the `order_by` field.
507
- *
508
- * @param request - The request {@link ListPurgeRequestsRequest}
509
- * @returns A Promise of ListPurgeRequestsResponse
510
- */
511
- listPurgeRequests = (request = {}) => enrichForPagination("purgeRequests", this.pageOfListPurgeRequests, request);
512
- /**
513
- * Create purge request. Create a new purge request. You must specify either the `all` field (to purge all content) or a list of `assets` (to define the precise assets to purge).
514
- *
515
- * @param request - The request {@link CreatePurgeRequestRequest}
516
- * @returns A Promise of PurgeRequest
517
- */
518
- createPurgeRequest = (request) => this.client.fetch({
519
- body: JSON.stringify(marshalCreatePurgeRequestRequest(request, this.client.settings)),
520
- headers: jsonContentHeaders,
521
- method: "POST",
522
- path: `/edge-services/v1beta1/purge-requests`
523
- }, unmarshalPurgeRequest);
524
- /**
525
- * Get purge request. Retrieve information about a purge request, specified by its `purge_request_id`. Its full details, including `status` and `target`, are returned in the response object.
526
- *
527
- * @param request - The request {@link GetPurgeRequestRequest}
528
- * @returns A Promise of PurgeRequest
529
- */
530
- getPurgeRequest = (request) => this.client.fetch({
531
- method: "GET",
532
- path: `/edge-services/v1beta1/purge-requests/${validatePathParam("purgeRequestId", request.purgeRequestId)}`
533
- }, unmarshalPurgeRequest);
534
- /**
535
- * Waits for {@link PurgeRequest} to be in a final state.
536
- *
537
- * @param request - The request {@link GetPurgeRequestRequest}
538
- * @param options - The waiting options
539
- * @returns A Promise of PurgeRequest
540
- */
541
- waitForPurgeRequest = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!PURGE_REQUEST_TRANSIENT_STATUSES.includes(res.status))), this.getPurgeRequest, request, options);
542
- checkLbOrigin = (request = {}) => this.client.fetch({
543
- body: JSON.stringify(marshalCheckLbOriginRequest(request, this.client.settings)),
544
- headers: jsonContentHeaders,
545
- method: "POST",
546
- path: `/edge-services/v1beta1/check-lb-origin`
547
- }, unmarshalCheckLbOriginResponse);
548
- listPlans = () => this.client.fetch({
549
- method: "GET",
550
- path: `/edge-services/v1beta1/plans`
551
- }, unmarshalListPlansResponse);
552
- selectPlan = (request = {}) => this.client.fetch({
553
- body: JSON.stringify(marshalSelectPlanRequest(request, this.client.settings)),
554
- headers: jsonContentHeaders,
555
- method: "PATCH",
556
- path: `/edge-services/v1beta1/current-plan`
557
- }, unmarshalPlan);
558
- getCurrentPlan = (request = {}) => this.client.fetch({
559
- method: "GET",
560
- path: `/edge-services/v1beta1/current-plan/${validatePathParam("projectId", request.projectId ?? this.client.settings.defaultProjectId)}`
561
- }, unmarshalPlan);
562
- deleteCurrentPlan = (request = {}) => this.client.fetch({
563
- method: "DELETE",
564
- path: `/edge-services/v1beta1/current-plan/${validatePathParam("projectId", request.projectId ?? this.client.settings.defaultProjectId)}`
565
- });
566
- /**
567
- * Gives information on the currently selected Edge Services subscription plan, resource usage and associated billing information for this calendar month (including whether consumption falls within or exceeds the currently selected subscription plan.).
568
- *
569
- * @param request - The request {@link GetBillingRequest}
570
- * @returns A Promise of GetBillingResponse
571
- */
572
- getBilling = (request = {}) => this.client.fetch({
573
- method: "GET",
574
- path: `/edge-services/v1beta1/billing/${validatePathParam("projectId", request.projectId ?? this.client.settings.defaultProjectId)}`
575
- }, unmarshalGetBillingResponse);
10
+ constructor(..._args) {
11
+ super(..._args);
12
+ this.pageOfListPipelines = (request = {}) => this.client.fetch({
13
+ method: "GET",
14
+ path: `/edge-services/v1beta1/pipelines`,
15
+ urlParams: urlParams(["has_backend_stage_lb", request.hasBackendStageLb], ["name", request.name], ["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId])
16
+ }, unmarshalListPipelinesResponse);
17
+ this.listPipelines = (request = {}) => enrichForPagination("pipelines", this.pageOfListPipelines, request);
18
+ this.createPipeline = (request) => this.client.fetch({
19
+ body: JSON.stringify(marshalCreatePipelineRequest(request, this.client.settings)),
20
+ headers: jsonContentHeaders,
21
+ method: "POST",
22
+ path: `/edge-services/v1beta1/pipelines`
23
+ }, unmarshalPipeline);
24
+ this.getPipeline = (request) => this.client.fetch({
25
+ method: "GET",
26
+ path: `/edge-services/v1beta1/pipelines/${validatePathParam("pipelineId", request.pipelineId)}`
27
+ }, unmarshalPipeline);
28
+ this.waitForPipeline = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!PIPELINE_TRANSIENT_STATUSES.includes(res.status))), this.getPipeline, request, options);
29
+ this.pageOfListPipelinesWithStages = (request = {}) => this.client.fetch({
30
+ method: "GET",
31
+ path: `/edge-services/v1beta1/pipelines-stages`,
32
+ urlParams: urlParams(["name", request.name], ["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId])
33
+ }, unmarshalListPipelinesWithStagesResponse);
34
+ this.listPipelinesWithStages = (request = {}) => enrichForPagination("pipelines", this.pageOfListPipelinesWithStages, request);
35
+ this.updatePipeline = (request) => this.client.fetch({
36
+ body: JSON.stringify(marshalUpdatePipelineRequest(request, this.client.settings)),
37
+ headers: jsonContentHeaders,
38
+ method: "PATCH",
39
+ path: `/edge-services/v1beta1/pipelines/${validatePathParam("pipelineId", request.pipelineId)}`
40
+ }, unmarshalPipeline);
41
+ this.deletePipeline = (request) => this.client.fetch({
42
+ method: "DELETE",
43
+ path: `/edge-services/v1beta1/pipelines/${validatePathParam("pipelineId", request.pipelineId)}`
44
+ });
45
+ this.pageOfListHeadStages = (request) => this.client.fetch({
46
+ method: "GET",
47
+ path: `/edge-services/v1beta1/pipelines/${validatePathParam("pipelineId", request.pipelineId)}/head-stages`,
48
+ urlParams: urlParams(["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
49
+ }, unmarshalListHeadStagesResponse);
50
+ this.listHeadStages = (request) => enrichForPagination("headStages", this.pageOfListHeadStages, request);
51
+ this.setHeadStage = (request) => this.client.fetch({
52
+ body: JSON.stringify(marshalSetHeadStageRequest(request, this.client.settings)),
53
+ headers: jsonContentHeaders,
54
+ method: "POST",
55
+ path: `/edge-services/v1beta1/pipelines/${validatePathParam("pipelineId", request.pipelineId)}/set-head-stage`
56
+ }, unmarshalHeadStageResponse);
57
+ this.pageOfListDNSStages = (request) => this.client.fetch({
58
+ method: "GET",
59
+ path: `/edge-services/v1beta1/pipelines/${validatePathParam("pipelineId", request.pipelineId)}/dns-stages`,
60
+ urlParams: urlParams(["fqdn", request.fqdn], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
61
+ }, unmarshalListDNSStagesResponse);
62
+ this.listDNSStages = (request) => enrichForPagination("stages", this.pageOfListDNSStages, request);
63
+ this.createDNSStage = (request) => this.client.fetch({
64
+ body: JSON.stringify(marshalCreateDNSStageRequest(request, this.client.settings)),
65
+ headers: jsonContentHeaders,
66
+ method: "POST",
67
+ path: `/edge-services/v1beta1/pipelines/${validatePathParam("pipelineId", request.pipelineId)}/dns-stages`
68
+ }, unmarshalDNSStage);
69
+ this.getDNSStage = (request) => this.client.fetch({
70
+ method: "GET",
71
+ path: `/edge-services/v1beta1/dns-stages/${validatePathParam("dnsStageId", request.dnsStageId)}`
72
+ }, unmarshalDNSStage);
73
+ this.updateDNSStage = (request) => this.client.fetch({
74
+ body: JSON.stringify(marshalUpdateDNSStageRequest(request, this.client.settings)),
75
+ headers: jsonContentHeaders,
76
+ method: "PATCH",
77
+ path: `/edge-services/v1beta1/dns-stages/${validatePathParam("dnsStageId", request.dnsStageId)}`
78
+ }, unmarshalDNSStage);
79
+ this.deleteDNSStage = (request) => this.client.fetch({
80
+ method: "DELETE",
81
+ path: `/edge-services/v1beta1/dns-stages/${validatePathParam("dnsStageId", request.dnsStageId)}`
82
+ });
83
+ this.pageOfListTLSStages = (request) => this.client.fetch({
84
+ method: "GET",
85
+ path: `/edge-services/v1beta1/pipelines/${validatePathParam("pipelineId", request.pipelineId)}/tls-stages`,
86
+ urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["secret_id", request.secretId], ["secret_region", request.secretRegion])
87
+ }, unmarshalListTLSStagesResponse);
88
+ this.listTLSStages = (request) => enrichForPagination("stages", this.pageOfListTLSStages, request);
89
+ this.createTLSStage = (request) => this.client.fetch({
90
+ body: JSON.stringify(marshalCreateTLSStageRequest(request, this.client.settings)),
91
+ headers: jsonContentHeaders,
92
+ method: "POST",
93
+ path: `/edge-services/v1beta1/pipelines/${validatePathParam("pipelineId", request.pipelineId)}/tls-stages`
94
+ }, unmarshalTLSStage);
95
+ this.getTLSStage = (request) => this.client.fetch({
96
+ method: "GET",
97
+ path: `/edge-services/v1beta1/tls-stages/${validatePathParam("tlsStageId", request.tlsStageId)}`
98
+ }, unmarshalTLSStage);
99
+ this.updateTLSStage = (request) => this.client.fetch({
100
+ body: JSON.stringify(marshalUpdateTLSStageRequest(request, this.client.settings)),
101
+ headers: jsonContentHeaders,
102
+ method: "PATCH",
103
+ path: `/edge-services/v1beta1/tls-stages/${validatePathParam("tlsStageId", request.tlsStageId)}`
104
+ }, unmarshalTLSStage);
105
+ this.deleteTLSStage = (request) => this.client.fetch({
106
+ method: "DELETE",
107
+ path: `/edge-services/v1beta1/tls-stages/${validatePathParam("tlsStageId", request.tlsStageId)}`
108
+ });
109
+ this.pageOfListCacheStages = (request) => this.client.fetch({
110
+ method: "GET",
111
+ path: `/edge-services/v1beta1/pipelines/${validatePathParam("pipelineId", request.pipelineId)}/cache-stages`,
112
+ urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
113
+ }, unmarshalListCacheStagesResponse);
114
+ this.listCacheStages = (request) => enrichForPagination("stages", this.pageOfListCacheStages, request);
115
+ this.createCacheStage = (request) => this.client.fetch({
116
+ body: JSON.stringify(marshalCreateCacheStageRequest(request, this.client.settings)),
117
+ headers: jsonContentHeaders,
118
+ method: "POST",
119
+ path: `/edge-services/v1beta1/pipelines/${validatePathParam("pipelineId", request.pipelineId)}/cache-stages`
120
+ }, unmarshalCacheStage);
121
+ this.getCacheStage = (request) => this.client.fetch({
122
+ method: "GET",
123
+ path: `/edge-services/v1beta1/cache-stages/${validatePathParam("cacheStageId", request.cacheStageId)}`
124
+ }, unmarshalCacheStage);
125
+ this.updateCacheStage = (request) => this.client.fetch({
126
+ body: JSON.stringify(marshalUpdateCacheStageRequest(request, this.client.settings)),
127
+ headers: jsonContentHeaders,
128
+ method: "PATCH",
129
+ path: `/edge-services/v1beta1/cache-stages/${validatePathParam("cacheStageId", request.cacheStageId)}`
130
+ }, unmarshalCacheStage);
131
+ this.deleteCacheStage = (request) => this.client.fetch({
132
+ method: "DELETE",
133
+ path: `/edge-services/v1beta1/cache-stages/${validatePathParam("cacheStageId", request.cacheStageId)}`
134
+ });
135
+ this.pageOfListBackendStages = (request) => this.client.fetch({
136
+ method: "GET",
137
+ path: `/edge-services/v1beta1/pipelines/${validatePathParam("pipelineId", request.pipelineId)}/backend-stages`,
138
+ urlParams: urlParams(["bucket_name", request.bucketName], ["bucket_region", request.bucketRegion], ["lb_id", request.lbId], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
139
+ }, unmarshalListBackendStagesResponse);
140
+ this.listBackendStages = (request) => enrichForPagination("stages", this.pageOfListBackendStages, request);
141
+ this.createBackendStage = (request) => this.client.fetch({
142
+ body: JSON.stringify(marshalCreateBackendStageRequest(request, this.client.settings)),
143
+ headers: jsonContentHeaders,
144
+ method: "POST",
145
+ path: `/edge-services/v1beta1/pipelines/${validatePathParam("pipelineId", request.pipelineId)}/backend-stages`
146
+ }, unmarshalBackendStage);
147
+ this.getBackendStage = (request) => this.client.fetch({
148
+ method: "GET",
149
+ path: `/edge-services/v1beta1/backend-stages/${validatePathParam("backendStageId", request.backendStageId)}`
150
+ }, unmarshalBackendStage);
151
+ this.updateBackendStage = (request) => this.client.fetch({
152
+ body: JSON.stringify(marshalUpdateBackendStageRequest(request, this.client.settings)),
153
+ headers: jsonContentHeaders,
154
+ method: "PATCH",
155
+ path: `/edge-services/v1beta1/backend-stages/${validatePathParam("backendStageId", request.backendStageId)}`
156
+ }, unmarshalBackendStage);
157
+ this.deleteBackendStage = (request) => this.client.fetch({
158
+ method: "DELETE",
159
+ path: `/edge-services/v1beta1/backend-stages/${validatePathParam("backendStageId", request.backendStageId)}`
160
+ });
161
+ this.searchBackendStages = (request = {}) => this.client.fetch({
162
+ method: "GET",
163
+ path: `/edge-services/v1beta1/search-backend-stages`,
164
+ urlParams: urlParams(["bucket_name", request.bucketName], ["bucket_region", request.bucketRegion], ["lb_id", request.lbId], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId ?? this.client.settings.defaultProjectId])
165
+ }, unmarshalListBackendStagesResponse);
166
+ this.pageOfListWafStages = (request) => this.client.fetch({
167
+ method: "GET",
168
+ path: `/edge-services/v1beta1/pipelines/${validatePathParam("pipelineId", request.pipelineId)}/waf-stages`,
169
+ urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
170
+ }, unmarshalListWafStagesResponse);
171
+ this.listWafStages = (request) => enrichForPagination("stages", this.pageOfListWafStages, request);
172
+ this.createWafStage = (request) => this.client.fetch({
173
+ body: JSON.stringify(marshalCreateWafStageRequest(request, this.client.settings)),
174
+ headers: jsonContentHeaders,
175
+ method: "POST",
176
+ path: `/edge-services/v1beta1/pipelines/${validatePathParam("pipelineId", request.pipelineId)}/waf-stages`
177
+ }, unmarshalWafStage);
178
+ this.getWafStage = (request) => this.client.fetch({
179
+ method: "GET",
180
+ path: `/edge-services/v1beta1/waf-stages/${validatePathParam("wafStageId", request.wafStageId)}`
181
+ }, unmarshalWafStage);
182
+ this.updateWafStage = (request) => this.client.fetch({
183
+ body: JSON.stringify(marshalUpdateWafStageRequest(request, this.client.settings)),
184
+ headers: jsonContentHeaders,
185
+ method: "PATCH",
186
+ path: `/edge-services/v1beta1/waf-stages/${validatePathParam("wafStageId", request.wafStageId)}`
187
+ }, unmarshalWafStage);
188
+ this.deleteWafStage = (request) => this.client.fetch({
189
+ method: "DELETE",
190
+ path: `/edge-services/v1beta1/waf-stages/${validatePathParam("wafStageId", request.wafStageId)}`
191
+ });
192
+ this.searchWafStages = (request = {}) => this.client.fetch({
193
+ method: "GET",
194
+ path: `/edge-services/v1beta1/search-waf-stages`,
195
+ urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId ?? this.client.settings.defaultProjectId])
196
+ }, unmarshalListWafStagesResponse);
197
+ this.pageOfListRouteStages = (request) => this.client.fetch({
198
+ method: "GET",
199
+ path: `/edge-services/v1beta1/pipelines/${validatePathParam("pipelineId", request.pipelineId)}/route-stages`,
200
+ urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
201
+ }, unmarshalListRouteStagesResponse);
202
+ this.listRouteStages = (request) => enrichForPagination("stages", this.pageOfListRouteStages, request);
203
+ this.createRouteStage = (request) => this.client.fetch({
204
+ body: JSON.stringify(marshalCreateRouteStageRequest(request, this.client.settings)),
205
+ headers: jsonContentHeaders,
206
+ method: "POST",
207
+ path: `/edge-services/v1beta1/pipelines/${validatePathParam("pipelineId", request.pipelineId)}/route-stages`
208
+ }, unmarshalRouteStage);
209
+ this.getRouteStage = (request) => this.client.fetch({
210
+ method: "GET",
211
+ path: `/edge-services/v1beta1/route-stages/${validatePathParam("routeStageId", request.routeStageId)}`
212
+ }, unmarshalRouteStage);
213
+ this.updateRouteStage = (request) => this.client.fetch({
214
+ body: JSON.stringify(marshalUpdateRouteStageRequest(request, this.client.settings)),
215
+ headers: jsonContentHeaders,
216
+ method: "PATCH",
217
+ path: `/edge-services/v1beta1/route-stages/${validatePathParam("routeStageId", request.routeStageId)}`
218
+ }, unmarshalRouteStage);
219
+ this.deleteRouteStage = (request) => this.client.fetch({
220
+ method: "DELETE",
221
+ path: `/edge-services/v1beta1/route-stages/${validatePathParam("routeStageId", request.routeStageId)}`
222
+ });
223
+ this.listRouteRules = (request) => this.client.fetch({
224
+ method: "GET",
225
+ path: `/edge-services/v1beta1/route-stages/${validatePathParam("routeStageId", request.routeStageId)}/route-rules`
226
+ }, unmarshalListRouteRulesResponse);
227
+ this.setRouteRules = (request) => this.client.fetch({
228
+ body: JSON.stringify(marshalSetRouteRulesRequest(request, this.client.settings)),
229
+ headers: jsonContentHeaders,
230
+ method: "PUT",
231
+ path: `/edge-services/v1beta1/route-stages/${validatePathParam("routeStageId", request.routeStageId)}/route-rules`
232
+ }, unmarshalSetRouteRulesResponse);
233
+ this.addRouteRules = (request) => this.client.fetch({
234
+ body: JSON.stringify(marshalAddRouteRulesRequest(request, this.client.settings)),
235
+ headers: jsonContentHeaders,
236
+ method: "POST",
237
+ path: `/edge-services/v1beta1/route-stages/${validatePathParam("routeStageId", request.routeStageId)}/route-rules`
238
+ }, unmarshalAddRouteRulesResponse);
239
+ this.searchRouteRules = (request = {}) => this.client.fetch({
240
+ method: "GET",
241
+ path: `/edge-services/v1beta1/search-route-rules`,
242
+ urlParams: urlParams(["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId])
243
+ }, unmarshalListRouteRulesResponse);
244
+ this.checkDomain = (request) => this.client.fetch({
245
+ body: JSON.stringify(marshalCheckDomainRequest(request, this.client.settings)),
246
+ headers: jsonContentHeaders,
247
+ method: "POST",
248
+ path: `/edge-services/v1beta1/check-domain`
249
+ }, unmarshalCheckDomainResponse);
250
+ this.checkPEMChain = (request) => this.client.fetch({
251
+ body: JSON.stringify(marshalCheckPEMChainRequest(request, this.client.settings)),
252
+ headers: jsonContentHeaders,
253
+ method: "POST",
254
+ path: `/edge-services/v1beta1/check-pem-chain`
255
+ }, unmarshalCheckPEMChainResponse);
256
+ this.pageOfListPurgeRequests = (request = {}) => this.client.fetch({
257
+ method: "GET",
258
+ path: `/edge-services/v1beta1/purge-requests`,
259
+ urlParams: urlParams(["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["pipeline_id", request.pipelineId], ["project_id", request.projectId])
260
+ }, unmarshalListPurgeRequestsResponse);
261
+ this.listPurgeRequests = (request = {}) => enrichForPagination("purgeRequests", this.pageOfListPurgeRequests, request);
262
+ this.createPurgeRequest = (request) => this.client.fetch({
263
+ body: JSON.stringify(marshalCreatePurgeRequestRequest(request, this.client.settings)),
264
+ headers: jsonContentHeaders,
265
+ method: "POST",
266
+ path: `/edge-services/v1beta1/purge-requests`
267
+ }, unmarshalPurgeRequest);
268
+ this.getPurgeRequest = (request) => this.client.fetch({
269
+ method: "GET",
270
+ path: `/edge-services/v1beta1/purge-requests/${validatePathParam("purgeRequestId", request.purgeRequestId)}`
271
+ }, unmarshalPurgeRequest);
272
+ this.waitForPurgeRequest = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!PURGE_REQUEST_TRANSIENT_STATUSES.includes(res.status))), this.getPurgeRequest, request, options);
273
+ this.checkLbOrigin = (request = {}) => this.client.fetch({
274
+ body: JSON.stringify(marshalCheckLbOriginRequest(request, this.client.settings)),
275
+ headers: jsonContentHeaders,
276
+ method: "POST",
277
+ path: `/edge-services/v1beta1/check-lb-origin`
278
+ }, unmarshalCheckLbOriginResponse);
279
+ this.listPlans = () => this.client.fetch({
280
+ method: "GET",
281
+ path: `/edge-services/v1beta1/plans`
282
+ }, unmarshalListPlansResponse);
283
+ this.selectPlan = (request = {}) => this.client.fetch({
284
+ body: JSON.stringify(marshalSelectPlanRequest(request, this.client.settings)),
285
+ headers: jsonContentHeaders,
286
+ method: "PATCH",
287
+ path: `/edge-services/v1beta1/current-plan`
288
+ }, unmarshalPlan);
289
+ this.getCurrentPlan = (request = {}) => this.client.fetch({
290
+ method: "GET",
291
+ path: `/edge-services/v1beta1/current-plan/${validatePathParam("projectId", request.projectId ?? this.client.settings.defaultProjectId)}`
292
+ }, unmarshalPlan);
293
+ this.deleteCurrentPlan = (request = {}) => this.client.fetch({
294
+ method: "DELETE",
295
+ path: `/edge-services/v1beta1/current-plan/${validatePathParam("projectId", request.projectId ?? this.client.settings.defaultProjectId)}`
296
+ });
297
+ this.getBilling = (request = {}) => this.client.fetch({
298
+ method: "GET",
299
+ path: `/edge-services/v1beta1/billing/${validatePathParam("projectId", request.projectId ?? this.client.settings.defaultProjectId)}`
300
+ }, unmarshalGetBillingResponse);
301
+ }
576
302
  };
577
303
  //#endregion
578
304
  export { API };