@scaleway/sdk-edge-services 2.1.1 → 2.2.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/dist/v1beta1/api.gen.js +105 -66
- package/dist/v1beta1/content.gen.js +1 -3
- package/dist/v1beta1/index.gen.d.ts +1 -1
- package/dist/v1beta1/marshalling.gen.js +70 -136
- package/package.json +1 -1
package/dist/v1beta1/api.gen.js
CHANGED
|
@@ -15,7 +15,10 @@ class API extends API$1 {
|
|
|
15
15
|
["order_by", request.orderBy],
|
|
16
16
|
["organization_id", request.organizationId],
|
|
17
17
|
["page", request.page],
|
|
18
|
-
[
|
|
18
|
+
[
|
|
19
|
+
"page_size",
|
|
20
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
21
|
+
],
|
|
19
22
|
["project_id", request.projectId]
|
|
20
23
|
)
|
|
21
24
|
},
|
|
@@ -66,7 +69,9 @@ class API extends API$1 {
|
|
|
66
69
|
* @returns A Promise of Pipeline
|
|
67
70
|
*/
|
|
68
71
|
waitForPipeline = (request, options) => waitForResource(
|
|
69
|
-
options?.stop ?? ((res) => Promise.resolve(
|
|
72
|
+
options?.stop ?? ((res) => Promise.resolve(
|
|
73
|
+
!PIPELINE_TRANSIENT_STATUSES.includes(res.status)
|
|
74
|
+
)),
|
|
70
75
|
this.getPipeline,
|
|
71
76
|
request,
|
|
72
77
|
options
|
|
@@ -80,13 +85,20 @@ class API extends API$1 {
|
|
|
80
85
|
["order_by", request.orderBy],
|
|
81
86
|
["organization_id", request.organizationId],
|
|
82
87
|
["page", request.page],
|
|
83
|
-
[
|
|
88
|
+
[
|
|
89
|
+
"page_size",
|
|
90
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
91
|
+
],
|
|
84
92
|
["project_id", request.projectId]
|
|
85
93
|
)
|
|
86
94
|
},
|
|
87
95
|
unmarshalListPipelinesWithStagesResponse
|
|
88
96
|
);
|
|
89
|
-
listPipelinesWithStages = (request = {}) => enrichForPagination(
|
|
97
|
+
listPipelinesWithStages = (request = {}) => enrichForPagination(
|
|
98
|
+
"pipelines",
|
|
99
|
+
this.pageOfListPipelinesWithStages,
|
|
100
|
+
request
|
|
101
|
+
);
|
|
90
102
|
/**
|
|
91
103
|
* 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`.
|
|
92
104
|
*
|
|
@@ -109,19 +121,20 @@ class API extends API$1 {
|
|
|
109
121
|
*
|
|
110
122
|
* @param request - The request {@link DeletePipelineRequest}
|
|
111
123
|
*/
|
|
112
|
-
deletePipeline = (request) => this.client.fetch(
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}
|
|
117
|
-
);
|
|
124
|
+
deletePipeline = (request) => this.client.fetch({
|
|
125
|
+
method: "DELETE",
|
|
126
|
+
path: `/edge-services/v1beta1/pipelines/${validatePathParam("pipelineId", request.pipelineId)}`
|
|
127
|
+
});
|
|
118
128
|
pageOfListHeadStages = (request) => this.client.fetch(
|
|
119
129
|
{
|
|
120
130
|
method: "GET",
|
|
121
131
|
path: `/edge-services/v1beta1/pipelines/${validatePathParam("pipelineId", request.pipelineId)}/head-stages`,
|
|
122
132
|
urlParams: urlParams(
|
|
123
133
|
["page", request.page],
|
|
124
|
-
[
|
|
134
|
+
[
|
|
135
|
+
"page_size",
|
|
136
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
137
|
+
]
|
|
125
138
|
)
|
|
126
139
|
},
|
|
127
140
|
unmarshalListHeadStagesResponse
|
|
@@ -152,7 +165,10 @@ class API extends API$1 {
|
|
|
152
165
|
["fqdn", request.fqdn],
|
|
153
166
|
["order_by", request.orderBy],
|
|
154
167
|
["page", request.page],
|
|
155
|
-
[
|
|
168
|
+
[
|
|
169
|
+
"page_size",
|
|
170
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
171
|
+
]
|
|
156
172
|
)
|
|
157
173
|
},
|
|
158
174
|
unmarshalListDNSStagesResponse
|
|
@@ -216,12 +232,10 @@ class API extends API$1 {
|
|
|
216
232
|
*
|
|
217
233
|
* @param request - The request {@link DeleteDNSStageRequest}
|
|
218
234
|
*/
|
|
219
|
-
deleteDNSStage = (request) => this.client.fetch(
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
}
|
|
224
|
-
);
|
|
235
|
+
deleteDNSStage = (request) => this.client.fetch({
|
|
236
|
+
method: "DELETE",
|
|
237
|
+
path: `/edge-services/v1beta1/dns-stages/${validatePathParam("dnsStageId", request.dnsStageId)}`
|
|
238
|
+
});
|
|
225
239
|
pageOfListTLSStages = (request) => this.client.fetch(
|
|
226
240
|
{
|
|
227
241
|
method: "GET",
|
|
@@ -229,7 +243,10 @@ class API extends API$1 {
|
|
|
229
243
|
urlParams: urlParams(
|
|
230
244
|
["order_by", request.orderBy],
|
|
231
245
|
["page", request.page],
|
|
232
|
-
[
|
|
246
|
+
[
|
|
247
|
+
"page_size",
|
|
248
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
249
|
+
],
|
|
233
250
|
["secret_id", request.secretId],
|
|
234
251
|
["secret_region", request.secretRegion]
|
|
235
252
|
)
|
|
@@ -295,12 +312,10 @@ class API extends API$1 {
|
|
|
295
312
|
*
|
|
296
313
|
* @param request - The request {@link DeleteTLSStageRequest}
|
|
297
314
|
*/
|
|
298
|
-
deleteTLSStage = (request) => this.client.fetch(
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
}
|
|
303
|
-
);
|
|
315
|
+
deleteTLSStage = (request) => this.client.fetch({
|
|
316
|
+
method: "DELETE",
|
|
317
|
+
path: `/edge-services/v1beta1/tls-stages/${validatePathParam("tlsStageId", request.tlsStageId)}`
|
|
318
|
+
});
|
|
304
319
|
pageOfListCacheStages = (request) => this.client.fetch(
|
|
305
320
|
{
|
|
306
321
|
method: "GET",
|
|
@@ -308,7 +323,10 @@ class API extends API$1 {
|
|
|
308
323
|
urlParams: urlParams(
|
|
309
324
|
["order_by", request.orderBy],
|
|
310
325
|
["page", request.page],
|
|
311
|
-
[
|
|
326
|
+
[
|
|
327
|
+
"page_size",
|
|
328
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
329
|
+
]
|
|
312
330
|
)
|
|
313
331
|
},
|
|
314
332
|
unmarshalListCacheStagesResponse
|
|
@@ -372,12 +390,10 @@ class API extends API$1 {
|
|
|
372
390
|
*
|
|
373
391
|
* @param request - The request {@link DeleteCacheStageRequest}
|
|
374
392
|
*/
|
|
375
|
-
deleteCacheStage = (request) => this.client.fetch(
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
}
|
|
380
|
-
);
|
|
393
|
+
deleteCacheStage = (request) => this.client.fetch({
|
|
394
|
+
method: "DELETE",
|
|
395
|
+
path: `/edge-services/v1beta1/cache-stages/${validatePathParam("cacheStageId", request.cacheStageId)}`
|
|
396
|
+
});
|
|
381
397
|
pageOfListBackendStages = (request) => this.client.fetch(
|
|
382
398
|
{
|
|
383
399
|
method: "GET",
|
|
@@ -388,7 +404,10 @@ class API extends API$1 {
|
|
|
388
404
|
["lb_id", request.lbId],
|
|
389
405
|
["order_by", request.orderBy],
|
|
390
406
|
["page", request.page],
|
|
391
|
-
[
|
|
407
|
+
[
|
|
408
|
+
"page_size",
|
|
409
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
410
|
+
]
|
|
392
411
|
)
|
|
393
412
|
},
|
|
394
413
|
unmarshalListBackendStagesResponse
|
|
@@ -452,12 +471,10 @@ class API extends API$1 {
|
|
|
452
471
|
*
|
|
453
472
|
* @param request - The request {@link DeleteBackendStageRequest}
|
|
454
473
|
*/
|
|
455
|
-
deleteBackendStage = (request) => this.client.fetch(
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
}
|
|
460
|
-
);
|
|
474
|
+
deleteBackendStage = (request) => this.client.fetch({
|
|
475
|
+
method: "DELETE",
|
|
476
|
+
path: `/edge-services/v1beta1/backend-stages/${validatePathParam("backendStageId", request.backendStageId)}`
|
|
477
|
+
});
|
|
461
478
|
searchBackendStages = (request = {}) => this.client.fetch(
|
|
462
479
|
{
|
|
463
480
|
method: "GET",
|
|
@@ -468,8 +485,14 @@ class API extends API$1 {
|
|
|
468
485
|
["lb_id", request.lbId],
|
|
469
486
|
["order_by", request.orderBy],
|
|
470
487
|
["page", request.page],
|
|
471
|
-
[
|
|
472
|
-
|
|
488
|
+
[
|
|
489
|
+
"page_size",
|
|
490
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
491
|
+
],
|
|
492
|
+
[
|
|
493
|
+
"project_id",
|
|
494
|
+
request.projectId ?? this.client.settings.defaultProjectId
|
|
495
|
+
]
|
|
473
496
|
)
|
|
474
497
|
},
|
|
475
498
|
unmarshalListBackendStagesResponse
|
|
@@ -481,7 +504,10 @@ class API extends API$1 {
|
|
|
481
504
|
urlParams: urlParams(
|
|
482
505
|
["order_by", request.orderBy],
|
|
483
506
|
["page", request.page],
|
|
484
|
-
[
|
|
507
|
+
[
|
|
508
|
+
"page_size",
|
|
509
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
510
|
+
]
|
|
485
511
|
)
|
|
486
512
|
},
|
|
487
513
|
unmarshalListWafStagesResponse
|
|
@@ -545,12 +571,10 @@ class API extends API$1 {
|
|
|
545
571
|
*
|
|
546
572
|
* @param request - The request {@link DeleteWafStageRequest}
|
|
547
573
|
*/
|
|
548
|
-
deleteWafStage = (request) => this.client.fetch(
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
}
|
|
553
|
-
);
|
|
574
|
+
deleteWafStage = (request) => this.client.fetch({
|
|
575
|
+
method: "DELETE",
|
|
576
|
+
path: `/edge-services/v1beta1/waf-stages/${validatePathParam("wafStageId", request.wafStageId)}`
|
|
577
|
+
});
|
|
554
578
|
searchWafStages = (request = {}) => this.client.fetch(
|
|
555
579
|
{
|
|
556
580
|
method: "GET",
|
|
@@ -558,8 +582,14 @@ class API extends API$1 {
|
|
|
558
582
|
urlParams: urlParams(
|
|
559
583
|
["order_by", request.orderBy],
|
|
560
584
|
["page", request.page],
|
|
561
|
-
[
|
|
562
|
-
|
|
585
|
+
[
|
|
586
|
+
"page_size",
|
|
587
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
588
|
+
],
|
|
589
|
+
[
|
|
590
|
+
"project_id",
|
|
591
|
+
request.projectId ?? this.client.settings.defaultProjectId
|
|
592
|
+
]
|
|
563
593
|
)
|
|
564
594
|
},
|
|
565
595
|
unmarshalListWafStagesResponse
|
|
@@ -571,7 +601,10 @@ class API extends API$1 {
|
|
|
571
601
|
urlParams: urlParams(
|
|
572
602
|
["order_by", request.orderBy],
|
|
573
603
|
["page", request.page],
|
|
574
|
-
[
|
|
604
|
+
[
|
|
605
|
+
"page_size",
|
|
606
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
607
|
+
]
|
|
575
608
|
)
|
|
576
609
|
},
|
|
577
610
|
unmarshalListRouteStagesResponse
|
|
@@ -635,12 +668,10 @@ class API extends API$1 {
|
|
|
635
668
|
*
|
|
636
669
|
* @param request - The request {@link DeleteRouteStageRequest}
|
|
637
670
|
*/
|
|
638
|
-
deleteRouteStage = (request) => this.client.fetch(
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
}
|
|
643
|
-
);
|
|
671
|
+
deleteRouteStage = (request) => this.client.fetch({
|
|
672
|
+
method: "DELETE",
|
|
673
|
+
path: `/edge-services/v1beta1/route-stages/${validatePathParam("routeStageId", request.routeStageId)}`
|
|
674
|
+
});
|
|
644
675
|
/**
|
|
645
676
|
* List route rules. List all route rules of an existing route stage, specified by its `route_stage_id`.
|
|
646
677
|
*
|
|
@@ -702,7 +733,10 @@ class API extends API$1 {
|
|
|
702
733
|
["order_by", request.orderBy],
|
|
703
734
|
["organization_id", request.organizationId],
|
|
704
735
|
["page", request.page],
|
|
705
|
-
[
|
|
736
|
+
[
|
|
737
|
+
"page_size",
|
|
738
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
739
|
+
],
|
|
706
740
|
["project_id", request.projectId]
|
|
707
741
|
)
|
|
708
742
|
},
|
|
@@ -738,7 +772,10 @@ class API extends API$1 {
|
|
|
738
772
|
["order_by", request.orderBy],
|
|
739
773
|
["organization_id", request.organizationId],
|
|
740
774
|
["page", request.page],
|
|
741
|
-
[
|
|
775
|
+
[
|
|
776
|
+
"page_size",
|
|
777
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
778
|
+
],
|
|
742
779
|
["pipeline_id", request.pipelineId],
|
|
743
780
|
["project_id", request.projectId]
|
|
744
781
|
)
|
|
@@ -790,7 +827,11 @@ class API extends API$1 {
|
|
|
790
827
|
* @returns A Promise of PurgeRequest
|
|
791
828
|
*/
|
|
792
829
|
waitForPurgeRequest = (request, options) => waitForResource(
|
|
793
|
-
options?.stop ?? ((res) => Promise.resolve(
|
|
830
|
+
options?.stop ?? ((res) => Promise.resolve(
|
|
831
|
+
!PURGE_REQUEST_TRANSIENT_STATUSES.includes(
|
|
832
|
+
res.status
|
|
833
|
+
)
|
|
834
|
+
)),
|
|
794
835
|
this.getPurgeRequest,
|
|
795
836
|
request,
|
|
796
837
|
options
|
|
@@ -831,12 +872,10 @@ class API extends API$1 {
|
|
|
831
872
|
},
|
|
832
873
|
unmarshalPlan
|
|
833
874
|
);
|
|
834
|
-
deleteCurrentPlan = (request = {}) => this.client.fetch(
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
}
|
|
839
|
-
);
|
|
875
|
+
deleteCurrentPlan = (request = {}) => this.client.fetch({
|
|
876
|
+
method: "DELETE",
|
|
877
|
+
path: `/edge-services/v1beta1/current-plan/${validatePathParam("projectId", request.projectId ?? this.client.settings.defaultProjectId)}`
|
|
878
|
+
});
|
|
840
879
|
/**
|
|
841
880
|
* 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.).
|
|
842
881
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { API
|
|
1
|
+
export { API } from './api.gen.js';
|
|
2
2
|
export * from './content.gen.js';
|
|
3
3
|
export * from './marshalling.gen.js';
|
|
4
4
|
export type { AddRouteRulesRequest, AddRouteRulesResponse, BackendStage, CacheStage, CheckDomainRequest, CheckDomainResponse, CheckLbOriginRequest, CheckLbOriginResponse, CheckPEMChainRequest, CheckPEMChainRequestSecretChain, CheckPEMChainResponse, CreateBackendStageRequest, CreateCacheStageRequest, CreateDNSStageRequest, CreatePipelineRequest, CreatePurgeRequestRequest, CreateRouteStageRequest, CreateTLSStageRequest, CreateWafStageRequest, DeleteBackendStageRequest, DeleteCacheStageRequest, DeleteCurrentPlanRequest, DeleteDNSStageRequest, DeletePipelineRequest, DeleteRouteStageRequest, DeleteTLSStageRequest, DeleteWafStageRequest, DNSStage, DNSStageType, GetBackendStageRequest, GetBillingRequest, GetBillingResponse, GetCacheStageRequest, GetCurrentPlanRequest, GetDNSStageRequest, GetPipelineRequest, GetPurgeRequestRequest, GetRouteStageRequest, GetTLSStageRequest, GetWafStageRequest, HeadStageResponse, HeadStageResponseHeadStage, LbOriginError, ListBackendStagesRequest, ListBackendStagesRequestOrderBy, ListBackendStagesResponse, ListCacheStagesRequest, ListCacheStagesRequestOrderBy, ListCacheStagesResponse, ListDNSStagesRequest, ListDNSStagesRequestOrderBy, ListDNSStagesResponse, ListHeadStagesRequest, ListHeadStagesResponse, ListHeadStagesResponseHeadStage, ListPipelinesRequest, ListPipelinesRequestOrderBy, ListPipelinesResponse, ListPipelinesWithStagesRequest, ListPipelinesWithStagesRequestOrderBy, ListPipelinesWithStagesResponse, ListPlansResponse, ListPurgeRequestsRequest, ListPurgeRequestsRequestOrderBy, ListPurgeRequestsResponse, ListRouteRulesRequest, ListRouteRulesResponse, ListRouteStagesRequest, ListRouteStagesRequestOrderBy, ListRouteStagesResponse, ListTLSStagesRequest, ListTLSStagesRequestOrderBy, ListTLSStagesResponse, ListWafStagesRequest, ListWafStagesRequestOrderBy, ListWafStagesResponse, Pipeline, PipelineError, PipelineErrorCode, PipelineErrorSeverity, PipelineErrorStage, PipelineErrorType, PipelineStages, PipelineStatus, Plan, PlanDetails, PlanName, PlanUsageDetails, PurgeRequest, PurgeRequestStatus, RouteRule, RouteStage, RuleHttpMatch, RuleHttpMatchMethodFilter, RuleHttpMatchPathFilter, RuleHttpMatchPathFilterPathFilterType, ScalewayLb, ScalewayLbBackendConfig, ScalewayS3BackendConfig, ScalewayServerlessContainerBackendConfig, SearchBackendStagesRequest, SearchBackendStagesRequestOrderBy, SearchRouteRulesRequest, SearchRouteRulesRequestOrderBy, SearchWafStagesRequest, SearchWafStagesRequestOrderBy, SelectPlanRequest, SetHeadStageRequest, SetHeadStageRequestAddNewHeadStage, SetHeadStageRequestRemoveHeadStage, SetHeadStageRequestSwapHeadStage, SetRouteRulesRequest, SetRouteRulesRequestRouteRule, SetRouteRulesResponse, TLSSecret, TLSSecretsConfig, TLSStage, UpdateBackendStageRequest, UpdateCacheStageRequest, UpdateDNSStageRequest, UpdatePipelineRequest, UpdateRouteStageRequest, UpdateTLSStageRequest, UpdateWafStageRequest, WafStage, WafStageMode, } from './types.gen.js';
|
|
@@ -59,7 +59,9 @@ const unmarshalBackendStage = (data) => {
|
|
|
59
59
|
pipelineId: data.pipeline_id,
|
|
60
60
|
scalewayLb: data.scaleway_lb ? unmarshalScalewayLbBackendConfig(data.scaleway_lb) : void 0,
|
|
61
61
|
scalewayS3: data.scaleway_s3 ? unmarshalScalewayS3BackendConfig(data.scaleway_s3) : void 0,
|
|
62
|
-
scalewayServerlessContainer: data.scaleway_serverless_container ? unmarshalScalewayServerlessContainerBackendConfig(
|
|
62
|
+
scalewayServerlessContainer: data.scaleway_serverless_container ? unmarshalScalewayServerlessContainerBackendConfig(
|
|
63
|
+
data.scaleway_serverless_container
|
|
64
|
+
) : void 0,
|
|
63
65
|
updatedAt: unmarshalDate(data.updated_at)
|
|
64
66
|
};
|
|
65
67
|
};
|
|
@@ -200,7 +202,10 @@ const unmarshalPipelineStages = (data) => {
|
|
|
200
202
|
);
|
|
201
203
|
}
|
|
202
204
|
return {
|
|
203
|
-
backendStages: unmarshalArrayOfObject(
|
|
205
|
+
backendStages: unmarshalArrayOfObject(
|
|
206
|
+
data.backend_stages,
|
|
207
|
+
unmarshalBackendStage
|
|
208
|
+
),
|
|
204
209
|
cacheStages: unmarshalArrayOfObject(data.cache_stages, unmarshalCacheStage),
|
|
205
210
|
dnsStages: unmarshalArrayOfObject(data.dns_stages, unmarshalDNSStage),
|
|
206
211
|
pipeline: data.pipeline ? unmarshalPipeline(data.pipeline) : void 0,
|
|
@@ -341,7 +346,10 @@ const unmarshalGetBillingResponse = (data) => {
|
|
|
341
346
|
extraWafUsage: data.extra_waf_usage,
|
|
342
347
|
pipelineNumber: data.pipeline_number,
|
|
343
348
|
planCost: data.plan_cost ? unmarshalMoney(data.plan_cost) : void 0,
|
|
344
|
-
plansUsageDetails: unmarshalMapOfObject(
|
|
349
|
+
plansUsageDetails: unmarshalMapOfObject(
|
|
350
|
+
data.plans_usage_details,
|
|
351
|
+
unmarshalPlanUsageDetails
|
|
352
|
+
),
|
|
345
353
|
totalCost: data.total_cost ? unmarshalMoney(data.total_cost) : void 0,
|
|
346
354
|
wafAddOn: data.waf_add_on ? unmarshalMoney(data.waf_add_on) : void 0
|
|
347
355
|
};
|
|
@@ -416,7 +424,10 @@ const unmarshalListHeadStagesResponse = (data) => {
|
|
|
416
424
|
);
|
|
417
425
|
}
|
|
418
426
|
return {
|
|
419
|
-
headStages: unmarshalArrayOfObject(
|
|
427
|
+
headStages: unmarshalArrayOfObject(
|
|
428
|
+
data.head_stages,
|
|
429
|
+
unmarshalListHeadStagesResponseHeadStage
|
|
430
|
+
),
|
|
420
431
|
totalCount: data.total_count
|
|
421
432
|
};
|
|
422
433
|
};
|
|
@@ -460,7 +471,10 @@ const unmarshalListPurgeRequestsResponse = (data) => {
|
|
|
460
471
|
);
|
|
461
472
|
}
|
|
462
473
|
return {
|
|
463
|
-
purgeRequests: unmarshalArrayOfObject(
|
|
474
|
+
purgeRequests: unmarshalArrayOfObject(
|
|
475
|
+
data.purge_requests,
|
|
476
|
+
unmarshalPurgeRequest
|
|
477
|
+
),
|
|
464
478
|
totalCount: data.total_count
|
|
465
479
|
};
|
|
466
480
|
};
|
|
@@ -544,23 +558,16 @@ const marshalSetRouteRulesRequestRouteRule = (request, defaults) => ({
|
|
|
544
558
|
}
|
|
545
559
|
]),
|
|
546
560
|
...resolveOneOf([
|
|
547
|
-
{
|
|
548
|
-
param: "backend_stage_id",
|
|
549
|
-
value: request.backendStageId
|
|
550
|
-
}
|
|
561
|
+
{ param: "backend_stage_id", value: request.backendStageId }
|
|
551
562
|
])
|
|
552
563
|
});
|
|
553
564
|
const marshalAddRouteRulesRequest = (request, defaults) => ({
|
|
554
|
-
route_rules: request.routeRules !== void 0 ? request.routeRules.map(
|
|
565
|
+
route_rules: request.routeRules !== void 0 ? request.routeRules.map(
|
|
566
|
+
(elt) => marshalSetRouteRulesRequestRouteRule(elt)
|
|
567
|
+
) : void 0,
|
|
555
568
|
...resolveOneOf([
|
|
556
|
-
{
|
|
557
|
-
|
|
558
|
-
value: request.afterPosition
|
|
559
|
-
},
|
|
560
|
-
{
|
|
561
|
-
param: "before_position",
|
|
562
|
-
value: request.beforePosition
|
|
563
|
-
}
|
|
569
|
+
{ param: "after_position", value: request.afterPosition },
|
|
570
|
+
{ param: "before_position", value: request.beforePosition }
|
|
564
571
|
])
|
|
565
572
|
});
|
|
566
573
|
const marshalCheckDomainRequest = (request, defaults) => ({
|
|
@@ -591,10 +598,7 @@ const marshalCheckPEMChainRequest = (request, defaults) => ({
|
|
|
591
598
|
param: "secret",
|
|
592
599
|
value: request.secret !== void 0 ? marshalCheckPEMChainRequestSecretChain(request.secret) : void 0
|
|
593
600
|
},
|
|
594
|
-
{
|
|
595
|
-
param: "raw",
|
|
596
|
-
value: request.raw
|
|
597
|
-
}
|
|
601
|
+
{ param: "raw", value: request.raw }
|
|
598
602
|
])
|
|
599
603
|
});
|
|
600
604
|
const marshalScalewayLbBackendConfig = (request, defaults) => ({
|
|
@@ -621,7 +625,9 @@ const marshalCreateBackendStageRequest = (request, defaults) => ({
|
|
|
621
625
|
},
|
|
622
626
|
{
|
|
623
627
|
param: "scaleway_serverless_container",
|
|
624
|
-
value: request.scalewayServerlessContainer !== void 0 ? marshalScalewayServerlessContainerBackendConfig(
|
|
628
|
+
value: request.scalewayServerlessContainer !== void 0 ? marshalScalewayServerlessContainerBackendConfig(
|
|
629
|
+
request.scalewayServerlessContainer
|
|
630
|
+
) : void 0
|
|
625
631
|
}
|
|
626
632
|
])
|
|
627
633
|
});
|
|
@@ -629,35 +635,17 @@ const marshalCreateCacheStageRequest = (request, defaults) => ({
|
|
|
629
635
|
fallback_ttl: request.fallbackTtl,
|
|
630
636
|
include_cookies: request.includeCookies,
|
|
631
637
|
...resolveOneOf([
|
|
632
|
-
{
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
},
|
|
636
|
-
{
|
|
637
|
-
param: "waf_stage_id",
|
|
638
|
-
value: request.wafStageId
|
|
639
|
-
},
|
|
640
|
-
{
|
|
641
|
-
param: "route_stage_id",
|
|
642
|
-
value: request.routeStageId
|
|
643
|
-
}
|
|
638
|
+
{ param: "backend_stage_id", value: request.backendStageId },
|
|
639
|
+
{ param: "waf_stage_id", value: request.wafStageId },
|
|
640
|
+
{ param: "route_stage_id", value: request.routeStageId }
|
|
644
641
|
])
|
|
645
642
|
});
|
|
646
643
|
const marshalCreateDNSStageRequest = (request, defaults) => ({
|
|
647
644
|
fqdns: request.fqdns,
|
|
648
645
|
...resolveOneOf([
|
|
649
|
-
{
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
},
|
|
653
|
-
{
|
|
654
|
-
param: "cache_stage_id",
|
|
655
|
-
value: request.cacheStageId
|
|
656
|
-
},
|
|
657
|
-
{
|
|
658
|
-
param: "backend_stage_id",
|
|
659
|
-
value: request.backendStageId
|
|
660
|
-
}
|
|
646
|
+
{ param: "tls_stage_id", value: request.tlsStageId },
|
|
647
|
+
{ param: "cache_stage_id", value: request.cacheStageId },
|
|
648
|
+
{ param: "backend_stage_id", value: request.backendStageId }
|
|
661
649
|
])
|
|
662
650
|
});
|
|
663
651
|
const marshalCreatePipelineRequest = (request, defaults) => ({
|
|
@@ -668,23 +656,12 @@ const marshalCreatePipelineRequest = (request, defaults) => ({
|
|
|
668
656
|
const marshalCreatePurgeRequestRequest = (request, defaults) => ({
|
|
669
657
|
pipeline_id: request.pipelineId,
|
|
670
658
|
...resolveOneOf([
|
|
671
|
-
{
|
|
672
|
-
|
|
673
|
-
value: request.assets
|
|
674
|
-
},
|
|
675
|
-
{
|
|
676
|
-
param: "all",
|
|
677
|
-
value: request.all
|
|
678
|
-
}
|
|
659
|
+
{ param: "assets", value: request.assets },
|
|
660
|
+
{ param: "all", value: request.all }
|
|
679
661
|
])
|
|
680
662
|
});
|
|
681
663
|
const marshalCreateRouteStageRequest = (request, defaults) => ({
|
|
682
|
-
...resolveOneOf([
|
|
683
|
-
{
|
|
684
|
-
param: "waf_stage_id",
|
|
685
|
-
value: request.wafStageId
|
|
686
|
-
}
|
|
687
|
-
])
|
|
664
|
+
...resolveOneOf([{ param: "waf_stage_id", value: request.wafStageId }])
|
|
688
665
|
});
|
|
689
666
|
const marshalTLSSecret = (request, defaults) => ({
|
|
690
667
|
region: request.region,
|
|
@@ -694,32 +671,17 @@ const marshalCreateTLSStageRequest = (request, defaults) => ({
|
|
|
694
671
|
managed_certificate: request.managedCertificate,
|
|
695
672
|
secrets: request.secrets !== void 0 ? request.secrets.map((elt) => marshalTLSSecret(elt)) : void 0,
|
|
696
673
|
...resolveOneOf([
|
|
697
|
-
{
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
}
|
|
701
|
-
{
|
|
702
|
-
param: "backend_stage_id",
|
|
703
|
-
value: request.backendStageId
|
|
704
|
-
},
|
|
705
|
-
{
|
|
706
|
-
param: "route_stage_id",
|
|
707
|
-
value: request.routeStageId
|
|
708
|
-
},
|
|
709
|
-
{
|
|
710
|
-
param: "waf_stage_id",
|
|
711
|
-
value: request.wafStageId
|
|
712
|
-
}
|
|
674
|
+
{ param: "cache_stage_id", value: request.cacheStageId },
|
|
675
|
+
{ param: "backend_stage_id", value: request.backendStageId },
|
|
676
|
+
{ param: "route_stage_id", value: request.routeStageId },
|
|
677
|
+
{ param: "waf_stage_id", value: request.wafStageId }
|
|
713
678
|
])
|
|
714
679
|
});
|
|
715
680
|
const marshalCreateWafStageRequest = (request, defaults) => ({
|
|
716
681
|
mode: request.mode,
|
|
717
682
|
paranoia_level: request.paranoiaLevel,
|
|
718
683
|
...resolveOneOf([
|
|
719
|
-
{
|
|
720
|
-
param: "backend_stage_id",
|
|
721
|
-
value: request.backendStageId
|
|
722
|
-
}
|
|
684
|
+
{ param: "backend_stage_id", value: request.backendStageId }
|
|
723
685
|
])
|
|
724
686
|
});
|
|
725
687
|
const marshalSelectPlanRequest = (request, defaults) => ({
|
|
@@ -740,20 +702,28 @@ const marshalSetHeadStageRequest = (request, defaults) => ({
|
|
|
740
702
|
...resolveOneOf([
|
|
741
703
|
{
|
|
742
704
|
param: "add_new_head_stage",
|
|
743
|
-
value: request.addNewHeadStage !== void 0 ? marshalSetHeadStageRequestAddNewHeadStage(
|
|
705
|
+
value: request.addNewHeadStage !== void 0 ? marshalSetHeadStageRequestAddNewHeadStage(
|
|
706
|
+
request.addNewHeadStage
|
|
707
|
+
) : void 0
|
|
744
708
|
},
|
|
745
709
|
{
|
|
746
710
|
param: "remove_head_stage",
|
|
747
|
-
value: request.removeHeadStage !== void 0 ? marshalSetHeadStageRequestRemoveHeadStage(
|
|
711
|
+
value: request.removeHeadStage !== void 0 ? marshalSetHeadStageRequestRemoveHeadStage(
|
|
712
|
+
request.removeHeadStage
|
|
713
|
+
) : void 0
|
|
748
714
|
},
|
|
749
715
|
{
|
|
750
716
|
param: "swap_head_stage",
|
|
751
|
-
value: request.swapHeadStage !== void 0 ? marshalSetHeadStageRequestSwapHeadStage(
|
|
717
|
+
value: request.swapHeadStage !== void 0 ? marshalSetHeadStageRequestSwapHeadStage(
|
|
718
|
+
request.swapHeadStage
|
|
719
|
+
) : void 0
|
|
752
720
|
}
|
|
753
721
|
])
|
|
754
722
|
});
|
|
755
723
|
const marshalSetRouteRulesRequest = (request, defaults) => ({
|
|
756
|
-
route_rules: request.routeRules !== void 0 ? request.routeRules.map(
|
|
724
|
+
route_rules: request.routeRules !== void 0 ? request.routeRules.map(
|
|
725
|
+
(elt) => marshalSetRouteRulesRequestRouteRule(elt)
|
|
726
|
+
) : void 0
|
|
757
727
|
});
|
|
758
728
|
const marshalUpdateBackendStageRequest = (request, defaults) => ({
|
|
759
729
|
pipeline_id: request.pipelineId,
|
|
@@ -768,7 +738,9 @@ const marshalUpdateBackendStageRequest = (request, defaults) => ({
|
|
|
768
738
|
},
|
|
769
739
|
{
|
|
770
740
|
param: "scaleway_serverless_container",
|
|
771
|
-
value: request.scalewayServerlessContainer !== void 0 ? marshalScalewayServerlessContainerBackendConfig(
|
|
741
|
+
value: request.scalewayServerlessContainer !== void 0 ? marshalScalewayServerlessContainerBackendConfig(
|
|
742
|
+
request.scalewayServerlessContainer
|
|
743
|
+
) : void 0
|
|
772
744
|
}
|
|
773
745
|
])
|
|
774
746
|
});
|
|
@@ -776,35 +748,17 @@ const marshalUpdateCacheStageRequest = (request, defaults) => ({
|
|
|
776
748
|
fallback_ttl: request.fallbackTtl,
|
|
777
749
|
include_cookies: request.includeCookies,
|
|
778
750
|
...resolveOneOf([
|
|
779
|
-
{
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
},
|
|
783
|
-
{
|
|
784
|
-
param: "waf_stage_id",
|
|
785
|
-
value: request.wafStageId
|
|
786
|
-
},
|
|
787
|
-
{
|
|
788
|
-
param: "route_stage_id",
|
|
789
|
-
value: request.routeStageId
|
|
790
|
-
}
|
|
751
|
+
{ param: "backend_stage_id", value: request.backendStageId },
|
|
752
|
+
{ param: "waf_stage_id", value: request.wafStageId },
|
|
753
|
+
{ param: "route_stage_id", value: request.routeStageId }
|
|
791
754
|
])
|
|
792
755
|
});
|
|
793
756
|
const marshalUpdateDNSStageRequest = (request, defaults) => ({
|
|
794
757
|
fqdns: request.fqdns,
|
|
795
758
|
...resolveOneOf([
|
|
796
|
-
{
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
},
|
|
800
|
-
{
|
|
801
|
-
param: "cache_stage_id",
|
|
802
|
-
value: request.cacheStageId
|
|
803
|
-
},
|
|
804
|
-
{
|
|
805
|
-
param: "backend_stage_id",
|
|
806
|
-
value: request.backendStageId
|
|
807
|
-
}
|
|
759
|
+
{ param: "tls_stage_id", value: request.tlsStageId },
|
|
760
|
+
{ param: "cache_stage_id", value: request.cacheStageId },
|
|
761
|
+
{ param: "backend_stage_id", value: request.backendStageId }
|
|
808
762
|
])
|
|
809
763
|
});
|
|
810
764
|
const marshalUpdatePipelineRequest = (request, defaults) => ({
|
|
@@ -812,12 +766,7 @@ const marshalUpdatePipelineRequest = (request, defaults) => ({
|
|
|
812
766
|
name: request.name
|
|
813
767
|
});
|
|
814
768
|
const marshalUpdateRouteStageRequest = (request, defaults) => ({
|
|
815
|
-
...resolveOneOf([
|
|
816
|
-
{
|
|
817
|
-
param: "waf_stage_id",
|
|
818
|
-
value: request.wafStageId
|
|
819
|
-
}
|
|
820
|
-
])
|
|
769
|
+
...resolveOneOf([{ param: "waf_stage_id", value: request.wafStageId }])
|
|
821
770
|
});
|
|
822
771
|
const marshalTLSSecretsConfig = (request, defaults) => ({
|
|
823
772
|
tls_secrets: request.tlsSecrets.map((elt) => marshalTLSSecret(elt))
|
|
@@ -826,32 +775,17 @@ const marshalUpdateTLSStageRequest = (request, defaults) => ({
|
|
|
826
775
|
managed_certificate: request.managedCertificate,
|
|
827
776
|
tls_secrets_config: request.tlsSecretsConfig !== void 0 ? marshalTLSSecretsConfig(request.tlsSecretsConfig) : void 0,
|
|
828
777
|
...resolveOneOf([
|
|
829
|
-
{
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
}
|
|
833
|
-
{
|
|
834
|
-
param: "backend_stage_id",
|
|
835
|
-
value: request.backendStageId
|
|
836
|
-
},
|
|
837
|
-
{
|
|
838
|
-
param: "route_stage_id",
|
|
839
|
-
value: request.routeStageId
|
|
840
|
-
},
|
|
841
|
-
{
|
|
842
|
-
param: "waf_stage_id",
|
|
843
|
-
value: request.wafStageId
|
|
844
|
-
}
|
|
778
|
+
{ param: "cache_stage_id", value: request.cacheStageId },
|
|
779
|
+
{ param: "backend_stage_id", value: request.backendStageId },
|
|
780
|
+
{ param: "route_stage_id", value: request.routeStageId },
|
|
781
|
+
{ param: "waf_stage_id", value: request.wafStageId }
|
|
845
782
|
])
|
|
846
783
|
});
|
|
847
784
|
const marshalUpdateWafStageRequest = (request, defaults) => ({
|
|
848
785
|
mode: request.mode,
|
|
849
786
|
paranoia_level: request.paranoiaLevel,
|
|
850
787
|
...resolveOneOf([
|
|
851
|
-
{
|
|
852
|
-
param: "backend_stage_id",
|
|
853
|
-
value: request.backendStageId
|
|
854
|
-
}
|
|
788
|
+
{ param: "backend_stage_id", value: request.backendStageId }
|
|
855
789
|
])
|
|
856
790
|
});
|
|
857
791
|
export {
|