@scaleway/sdk-edge-services 2.4.0 → 2.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/v1beta1/api.gen.js
CHANGED
|
@@ -15,10 +15,7 @@ class API extends API$1 {
|
|
|
15
15
|
["order_by", request.orderBy],
|
|
16
16
|
["organization_id", request.organizationId],
|
|
17
17
|
["page", request.page],
|
|
18
|
-
[
|
|
19
|
-
"page_size",
|
|
20
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
21
|
-
],
|
|
18
|
+
["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
|
|
22
19
|
["project_id", request.projectId]
|
|
23
20
|
)
|
|
24
21
|
},
|
|
@@ -69,9 +66,7 @@ class API extends API$1 {
|
|
|
69
66
|
* @returns A Promise of Pipeline
|
|
70
67
|
*/
|
|
71
68
|
waitForPipeline = (request, options) => waitForResource(
|
|
72
|
-
options?.stop ?? ((res) => Promise.resolve(
|
|
73
|
-
!PIPELINE_TRANSIENT_STATUSES.includes(res.status)
|
|
74
|
-
)),
|
|
69
|
+
options?.stop ?? ((res) => Promise.resolve(!PIPELINE_TRANSIENT_STATUSES.includes(res.status))),
|
|
75
70
|
this.getPipeline,
|
|
76
71
|
request,
|
|
77
72
|
options
|
|
@@ -85,20 +80,13 @@ class API extends API$1 {
|
|
|
85
80
|
["order_by", request.orderBy],
|
|
86
81
|
["organization_id", request.organizationId],
|
|
87
82
|
["page", request.page],
|
|
88
|
-
[
|
|
89
|
-
"page_size",
|
|
90
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
91
|
-
],
|
|
83
|
+
["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
|
|
92
84
|
["project_id", request.projectId]
|
|
93
85
|
)
|
|
94
86
|
},
|
|
95
87
|
unmarshalListPipelinesWithStagesResponse
|
|
96
88
|
);
|
|
97
|
-
listPipelinesWithStages = (request = {}) => enrichForPagination(
|
|
98
|
-
"pipelines",
|
|
99
|
-
this.pageOfListPipelinesWithStages,
|
|
100
|
-
request
|
|
101
|
-
);
|
|
89
|
+
listPipelinesWithStages = (request = {}) => enrichForPagination("pipelines", this.pageOfListPipelinesWithStages, request);
|
|
102
90
|
/**
|
|
103
91
|
* 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`.
|
|
104
92
|
*
|
|
@@ -121,20 +109,19 @@ class API extends API$1 {
|
|
|
121
109
|
*
|
|
122
110
|
* @param request - The request {@link DeletePipelineRequest}
|
|
123
111
|
*/
|
|
124
|
-
deletePipeline = (request) => this.client.fetch(
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
112
|
+
deletePipeline = (request) => this.client.fetch(
|
|
113
|
+
{
|
|
114
|
+
method: "DELETE",
|
|
115
|
+
path: `/edge-services/v1beta1/pipelines/${validatePathParam("pipelineId", request.pipelineId)}`
|
|
116
|
+
}
|
|
117
|
+
);
|
|
128
118
|
pageOfListHeadStages = (request) => this.client.fetch(
|
|
129
119
|
{
|
|
130
120
|
method: "GET",
|
|
131
121
|
path: `/edge-services/v1beta1/pipelines/${validatePathParam("pipelineId", request.pipelineId)}/head-stages`,
|
|
132
122
|
urlParams: urlParams(
|
|
133
123
|
["page", request.page],
|
|
134
|
-
[
|
|
135
|
-
"page_size",
|
|
136
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
137
|
-
]
|
|
124
|
+
["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
|
|
138
125
|
)
|
|
139
126
|
},
|
|
140
127
|
unmarshalListHeadStagesResponse
|
|
@@ -171,10 +158,7 @@ class API extends API$1 {
|
|
|
171
158
|
["fqdn", request.fqdn],
|
|
172
159
|
["order_by", request.orderBy],
|
|
173
160
|
["page", request.page],
|
|
174
|
-
[
|
|
175
|
-
"page_size",
|
|
176
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
177
|
-
]
|
|
161
|
+
["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
|
|
178
162
|
)
|
|
179
163
|
},
|
|
180
164
|
unmarshalListDNSStagesResponse
|
|
@@ -238,10 +222,12 @@ class API extends API$1 {
|
|
|
238
222
|
*
|
|
239
223
|
* @param request - The request {@link DeleteDNSStageRequest}
|
|
240
224
|
*/
|
|
241
|
-
deleteDNSStage = (request) => this.client.fetch(
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
225
|
+
deleteDNSStage = (request) => this.client.fetch(
|
|
226
|
+
{
|
|
227
|
+
method: "DELETE",
|
|
228
|
+
path: `/edge-services/v1beta1/dns-stages/${validatePathParam("dnsStageId", request.dnsStageId)}`
|
|
229
|
+
}
|
|
230
|
+
);
|
|
245
231
|
pageOfListTLSStages = (request) => this.client.fetch(
|
|
246
232
|
{
|
|
247
233
|
method: "GET",
|
|
@@ -249,10 +235,7 @@ class API extends API$1 {
|
|
|
249
235
|
urlParams: urlParams(
|
|
250
236
|
["order_by", request.orderBy],
|
|
251
237
|
["page", request.page],
|
|
252
|
-
[
|
|
253
|
-
"page_size",
|
|
254
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
255
|
-
],
|
|
238
|
+
["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
|
|
256
239
|
["secret_id", request.secretId],
|
|
257
240
|
["secret_region", request.secretRegion]
|
|
258
241
|
)
|
|
@@ -318,10 +301,12 @@ class API extends API$1 {
|
|
|
318
301
|
*
|
|
319
302
|
* @param request - The request {@link DeleteTLSStageRequest}
|
|
320
303
|
*/
|
|
321
|
-
deleteTLSStage = (request) => this.client.fetch(
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
304
|
+
deleteTLSStage = (request) => this.client.fetch(
|
|
305
|
+
{
|
|
306
|
+
method: "DELETE",
|
|
307
|
+
path: `/edge-services/v1beta1/tls-stages/${validatePathParam("tlsStageId", request.tlsStageId)}`
|
|
308
|
+
}
|
|
309
|
+
);
|
|
325
310
|
pageOfListCacheStages = (request) => this.client.fetch(
|
|
326
311
|
{
|
|
327
312
|
method: "GET",
|
|
@@ -329,10 +314,7 @@ class API extends API$1 {
|
|
|
329
314
|
urlParams: urlParams(
|
|
330
315
|
["order_by", request.orderBy],
|
|
331
316
|
["page", request.page],
|
|
332
|
-
[
|
|
333
|
-
"page_size",
|
|
334
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
335
|
-
]
|
|
317
|
+
["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
|
|
336
318
|
)
|
|
337
319
|
},
|
|
338
320
|
unmarshalListCacheStagesResponse
|
|
@@ -396,10 +378,12 @@ class API extends API$1 {
|
|
|
396
378
|
*
|
|
397
379
|
* @param request - The request {@link DeleteCacheStageRequest}
|
|
398
380
|
*/
|
|
399
|
-
deleteCacheStage = (request) => this.client.fetch(
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
381
|
+
deleteCacheStage = (request) => this.client.fetch(
|
|
382
|
+
{
|
|
383
|
+
method: "DELETE",
|
|
384
|
+
path: `/edge-services/v1beta1/cache-stages/${validatePathParam("cacheStageId", request.cacheStageId)}`
|
|
385
|
+
}
|
|
386
|
+
);
|
|
403
387
|
pageOfListBackendStages = (request) => this.client.fetch(
|
|
404
388
|
{
|
|
405
389
|
method: "GET",
|
|
@@ -410,10 +394,7 @@ class API extends API$1 {
|
|
|
410
394
|
["lb_id", request.lbId],
|
|
411
395
|
["order_by", request.orderBy],
|
|
412
396
|
["page", request.page],
|
|
413
|
-
[
|
|
414
|
-
"page_size",
|
|
415
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
416
|
-
]
|
|
397
|
+
["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
|
|
417
398
|
)
|
|
418
399
|
},
|
|
419
400
|
unmarshalListBackendStagesResponse
|
|
@@ -477,10 +458,12 @@ class API extends API$1 {
|
|
|
477
458
|
*
|
|
478
459
|
* @param request - The request {@link DeleteBackendStageRequest}
|
|
479
460
|
*/
|
|
480
|
-
deleteBackendStage = (request) => this.client.fetch(
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
461
|
+
deleteBackendStage = (request) => this.client.fetch(
|
|
462
|
+
{
|
|
463
|
+
method: "DELETE",
|
|
464
|
+
path: `/edge-services/v1beta1/backend-stages/${validatePathParam("backendStageId", request.backendStageId)}`
|
|
465
|
+
}
|
|
466
|
+
);
|
|
484
467
|
searchBackendStages = (request = {}) => this.client.fetch(
|
|
485
468
|
{
|
|
486
469
|
method: "GET",
|
|
@@ -491,14 +474,8 @@ class API extends API$1 {
|
|
|
491
474
|
["lb_id", request.lbId],
|
|
492
475
|
["order_by", request.orderBy],
|
|
493
476
|
["page", request.page],
|
|
494
|
-
[
|
|
495
|
-
|
|
496
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
497
|
-
],
|
|
498
|
-
[
|
|
499
|
-
"project_id",
|
|
500
|
-
request.projectId ?? this.client.settings.defaultProjectId
|
|
501
|
-
]
|
|
477
|
+
["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
|
|
478
|
+
["project_id", request.projectId ?? this.client.settings.defaultProjectId]
|
|
502
479
|
)
|
|
503
480
|
},
|
|
504
481
|
unmarshalListBackendStagesResponse
|
|
@@ -510,10 +487,7 @@ class API extends API$1 {
|
|
|
510
487
|
urlParams: urlParams(
|
|
511
488
|
["order_by", request.orderBy],
|
|
512
489
|
["page", request.page],
|
|
513
|
-
[
|
|
514
|
-
"page_size",
|
|
515
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
516
|
-
]
|
|
490
|
+
["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
|
|
517
491
|
)
|
|
518
492
|
},
|
|
519
493
|
unmarshalListWafStagesResponse
|
|
@@ -577,10 +551,12 @@ class API extends API$1 {
|
|
|
577
551
|
*
|
|
578
552
|
* @param request - The request {@link DeleteWafStageRequest}
|
|
579
553
|
*/
|
|
580
|
-
deleteWafStage = (request) => this.client.fetch(
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
554
|
+
deleteWafStage = (request) => this.client.fetch(
|
|
555
|
+
{
|
|
556
|
+
method: "DELETE",
|
|
557
|
+
path: `/edge-services/v1beta1/waf-stages/${validatePathParam("wafStageId", request.wafStageId)}`
|
|
558
|
+
}
|
|
559
|
+
);
|
|
584
560
|
searchWafStages = (request = {}) => this.client.fetch(
|
|
585
561
|
{
|
|
586
562
|
method: "GET",
|
|
@@ -588,14 +564,8 @@ class API extends API$1 {
|
|
|
588
564
|
urlParams: urlParams(
|
|
589
565
|
["order_by", request.orderBy],
|
|
590
566
|
["page", request.page],
|
|
591
|
-
[
|
|
592
|
-
|
|
593
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
594
|
-
],
|
|
595
|
-
[
|
|
596
|
-
"project_id",
|
|
597
|
-
request.projectId ?? this.client.settings.defaultProjectId
|
|
598
|
-
]
|
|
567
|
+
["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
|
|
568
|
+
["project_id", request.projectId ?? this.client.settings.defaultProjectId]
|
|
599
569
|
)
|
|
600
570
|
},
|
|
601
571
|
unmarshalListWafStagesResponse
|
|
@@ -607,10 +577,7 @@ class API extends API$1 {
|
|
|
607
577
|
urlParams: urlParams(
|
|
608
578
|
["order_by", request.orderBy],
|
|
609
579
|
["page", request.page],
|
|
610
|
-
[
|
|
611
|
-
"page_size",
|
|
612
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
613
|
-
]
|
|
580
|
+
["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
|
|
614
581
|
)
|
|
615
582
|
},
|
|
616
583
|
unmarshalListRouteStagesResponse
|
|
@@ -674,10 +641,12 @@ class API extends API$1 {
|
|
|
674
641
|
*
|
|
675
642
|
* @param request - The request {@link DeleteRouteStageRequest}
|
|
676
643
|
*/
|
|
677
|
-
deleteRouteStage = (request) => this.client.fetch(
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
644
|
+
deleteRouteStage = (request) => this.client.fetch(
|
|
645
|
+
{
|
|
646
|
+
method: "DELETE",
|
|
647
|
+
path: `/edge-services/v1beta1/route-stages/${validatePathParam("routeStageId", request.routeStageId)}`
|
|
648
|
+
}
|
|
649
|
+
);
|
|
681
650
|
/**
|
|
682
651
|
* List route rules. List all route rules of an existing route stage, specified by its `route_stage_id`.
|
|
683
652
|
*
|
|
@@ -739,10 +708,7 @@ class API extends API$1 {
|
|
|
739
708
|
["order_by", request.orderBy],
|
|
740
709
|
["organization_id", request.organizationId],
|
|
741
710
|
["page", request.page],
|
|
742
|
-
[
|
|
743
|
-
"page_size",
|
|
744
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
745
|
-
],
|
|
711
|
+
["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
|
|
746
712
|
["project_id", request.projectId]
|
|
747
713
|
)
|
|
748
714
|
},
|
|
@@ -778,10 +744,7 @@ class API extends API$1 {
|
|
|
778
744
|
["order_by", request.orderBy],
|
|
779
745
|
["organization_id", request.organizationId],
|
|
780
746
|
["page", request.page],
|
|
781
|
-
[
|
|
782
|
-
"page_size",
|
|
783
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
784
|
-
],
|
|
747
|
+
["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
|
|
785
748
|
["pipeline_id", request.pipelineId],
|
|
786
749
|
["project_id", request.projectId]
|
|
787
750
|
)
|
|
@@ -833,11 +796,7 @@ class API extends API$1 {
|
|
|
833
796
|
* @returns A Promise of PurgeRequest
|
|
834
797
|
*/
|
|
835
798
|
waitForPurgeRequest = (request, options) => waitForResource(
|
|
836
|
-
options?.stop ?? ((res) => Promise.resolve(
|
|
837
|
-
!PURGE_REQUEST_TRANSIENT_STATUSES.includes(
|
|
838
|
-
res.status
|
|
839
|
-
)
|
|
840
|
-
)),
|
|
799
|
+
options?.stop ?? ((res) => Promise.resolve(!PURGE_REQUEST_TRANSIENT_STATUSES.includes(res.status))),
|
|
841
800
|
this.getPurgeRequest,
|
|
842
801
|
request,
|
|
843
802
|
options
|
|
@@ -878,10 +837,12 @@ class API extends API$1 {
|
|
|
878
837
|
},
|
|
879
838
|
unmarshalPlan
|
|
880
839
|
);
|
|
881
|
-
deleteCurrentPlan = (request = {}) => this.client.fetch(
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
840
|
+
deleteCurrentPlan = (request = {}) => this.client.fetch(
|
|
841
|
+
{
|
|
842
|
+
method: "DELETE",
|
|
843
|
+
path: `/edge-services/v1beta1/current-plan/${validatePathParam("projectId", request.projectId ?? this.client.settings.defaultProjectId)}`
|
|
844
|
+
}
|
|
845
|
+
);
|
|
885
846
|
/**
|
|
886
847
|
* 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.).
|
|
887
848
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { API } from './api.gen.js';
|
|
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, ScalewayServerlessFunctionBackendConfig, 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';
|
|
@@ -70,12 +70,8 @@ const unmarshalBackendStage = (data) => {
|
|
|
70
70
|
pipelineId: data.pipeline_id,
|
|
71
71
|
scalewayLb: data.scaleway_lb ? unmarshalScalewayLbBackendConfig(data.scaleway_lb) : void 0,
|
|
72
72
|
scalewayS3: data.scaleway_s3 ? unmarshalScalewayS3BackendConfig(data.scaleway_s3) : void 0,
|
|
73
|
-
scalewayServerlessContainer: data.scaleway_serverless_container ? unmarshalScalewayServerlessContainerBackendConfig(
|
|
74
|
-
|
|
75
|
-
) : void 0,
|
|
76
|
-
scalewayServerlessFunction: data.scaleway_serverless_function ? unmarshalScalewayServerlessFunctionBackendConfig(
|
|
77
|
-
data.scaleway_serverless_function
|
|
78
|
-
) : void 0,
|
|
73
|
+
scalewayServerlessContainer: data.scaleway_serverless_container ? unmarshalScalewayServerlessContainerBackendConfig(data.scaleway_serverless_container) : void 0,
|
|
74
|
+
scalewayServerlessFunction: data.scaleway_serverless_function ? unmarshalScalewayServerlessFunctionBackendConfig(data.scaleway_serverless_function) : void 0,
|
|
79
75
|
updatedAt: unmarshalDate(data.updated_at)
|
|
80
76
|
};
|
|
81
77
|
};
|
|
@@ -216,10 +212,7 @@ const unmarshalPipelineStages = (data) => {
|
|
|
216
212
|
);
|
|
217
213
|
}
|
|
218
214
|
return {
|
|
219
|
-
backendStages: unmarshalArrayOfObject(
|
|
220
|
-
data.backend_stages,
|
|
221
|
-
unmarshalBackendStage
|
|
222
|
-
),
|
|
215
|
+
backendStages: unmarshalArrayOfObject(data.backend_stages, unmarshalBackendStage),
|
|
223
216
|
cacheStages: unmarshalArrayOfObject(data.cache_stages, unmarshalCacheStage),
|
|
224
217
|
dnsStages: unmarshalArrayOfObject(data.dns_stages, unmarshalDNSStage),
|
|
225
218
|
pipeline: data.pipeline ? unmarshalPipeline(data.pipeline) : void 0,
|
|
@@ -327,6 +320,7 @@ const unmarshalPlanDetails = (data) => {
|
|
|
327
320
|
);
|
|
328
321
|
}
|
|
329
322
|
return {
|
|
323
|
+
backendLimit: data.backend_limit,
|
|
330
324
|
packageGb: data.package_gb,
|
|
331
325
|
pipelineLimit: data.pipeline_limit,
|
|
332
326
|
planName: data.plan_name,
|
|
@@ -360,10 +354,7 @@ const unmarshalGetBillingResponse = (data) => {
|
|
|
360
354
|
extraWafUsage: data.extra_waf_usage,
|
|
361
355
|
pipelineNumber: data.pipeline_number,
|
|
362
356
|
planCost: data.plan_cost ? unmarshalMoney(data.plan_cost) : void 0,
|
|
363
|
-
plansUsageDetails: unmarshalMapOfObject(
|
|
364
|
-
data.plans_usage_details,
|
|
365
|
-
unmarshalPlanUsageDetails
|
|
366
|
-
),
|
|
357
|
+
plansUsageDetails: unmarshalMapOfObject(data.plans_usage_details, unmarshalPlanUsageDetails),
|
|
367
358
|
totalCost: data.total_cost ? unmarshalMoney(data.total_cost) : void 0,
|
|
368
359
|
wafAddOn: data.waf_add_on ? unmarshalMoney(data.waf_add_on) : void 0
|
|
369
360
|
};
|
|
@@ -438,10 +429,7 @@ const unmarshalListHeadStagesResponse = (data) => {
|
|
|
438
429
|
);
|
|
439
430
|
}
|
|
440
431
|
return {
|
|
441
|
-
headStages: unmarshalArrayOfObject(
|
|
442
|
-
data.head_stages,
|
|
443
|
-
unmarshalListHeadStagesResponseHeadStage
|
|
444
|
-
),
|
|
432
|
+
headStages: unmarshalArrayOfObject(data.head_stages, unmarshalListHeadStagesResponseHeadStage),
|
|
445
433
|
totalCount: data.total_count
|
|
446
434
|
};
|
|
447
435
|
};
|
|
@@ -485,10 +473,7 @@ const unmarshalListPurgeRequestsResponse = (data) => {
|
|
|
485
473
|
);
|
|
486
474
|
}
|
|
487
475
|
return {
|
|
488
|
-
purgeRequests: unmarshalArrayOfObject(
|
|
489
|
-
data.purge_requests,
|
|
490
|
-
unmarshalPurgeRequest
|
|
491
|
-
),
|
|
476
|
+
purgeRequests: unmarshalArrayOfObject(data.purge_requests, unmarshalPurgeRequest),
|
|
492
477
|
totalCount: data.total_count
|
|
493
478
|
};
|
|
494
479
|
};
|
|
@@ -572,16 +557,23 @@ const marshalSetRouteRulesRequestRouteRule = (request, defaults) => ({
|
|
|
572
557
|
}
|
|
573
558
|
]),
|
|
574
559
|
...resolveOneOf([
|
|
575
|
-
{
|
|
560
|
+
{
|
|
561
|
+
param: "backend_stage_id",
|
|
562
|
+
value: request.backendStageId
|
|
563
|
+
}
|
|
576
564
|
])
|
|
577
565
|
});
|
|
578
566
|
const marshalAddRouteRulesRequest = (request, defaults) => ({
|
|
579
|
-
route_rules: request.routeRules !== void 0 ? request.routeRules.map(
|
|
580
|
-
(elt) => marshalSetRouteRulesRequestRouteRule(elt)
|
|
581
|
-
) : void 0,
|
|
567
|
+
route_rules: request.routeRules !== void 0 ? request.routeRules.map((elt) => marshalSetRouteRulesRequestRouteRule(elt)) : void 0,
|
|
582
568
|
...resolveOneOf([
|
|
583
|
-
{
|
|
584
|
-
|
|
569
|
+
{
|
|
570
|
+
param: "after_position",
|
|
571
|
+
value: request.afterPosition
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
param: "before_position",
|
|
575
|
+
value: request.beforePosition
|
|
576
|
+
}
|
|
585
577
|
])
|
|
586
578
|
});
|
|
587
579
|
const marshalCheckDomainRequest = (request, defaults) => ({
|
|
@@ -612,7 +604,10 @@ const marshalCheckPEMChainRequest = (request, defaults) => ({
|
|
|
612
604
|
param: "secret",
|
|
613
605
|
value: request.secret !== void 0 ? marshalCheckPEMChainRequestSecretChain(request.secret) : void 0
|
|
614
606
|
},
|
|
615
|
-
{
|
|
607
|
+
{
|
|
608
|
+
param: "raw",
|
|
609
|
+
value: request.raw
|
|
610
|
+
}
|
|
616
611
|
])
|
|
617
612
|
});
|
|
618
613
|
const marshalScalewayLbBackendConfig = (request, defaults) => ({
|
|
@@ -643,15 +638,11 @@ const marshalCreateBackendStageRequest = (request, defaults) => ({
|
|
|
643
638
|
},
|
|
644
639
|
{
|
|
645
640
|
param: "scaleway_serverless_container",
|
|
646
|
-
value: request.scalewayServerlessContainer !== void 0 ? marshalScalewayServerlessContainerBackendConfig(
|
|
647
|
-
request.scalewayServerlessContainer
|
|
648
|
-
) : void 0
|
|
641
|
+
value: request.scalewayServerlessContainer !== void 0 ? marshalScalewayServerlessContainerBackendConfig(request.scalewayServerlessContainer) : void 0
|
|
649
642
|
},
|
|
650
643
|
{
|
|
651
644
|
param: "scaleway_serverless_function",
|
|
652
|
-
value: request.scalewayServerlessFunction !== void 0 ? marshalScalewayServerlessFunctionBackendConfig(
|
|
653
|
-
request.scalewayServerlessFunction
|
|
654
|
-
) : void 0
|
|
645
|
+
value: request.scalewayServerlessFunction !== void 0 ? marshalScalewayServerlessFunctionBackendConfig(request.scalewayServerlessFunction) : void 0
|
|
655
646
|
}
|
|
656
647
|
])
|
|
657
648
|
});
|
|
@@ -659,17 +650,35 @@ const marshalCreateCacheStageRequest = (request, defaults) => ({
|
|
|
659
650
|
fallback_ttl: request.fallbackTtl,
|
|
660
651
|
include_cookies: request.includeCookies,
|
|
661
652
|
...resolveOneOf([
|
|
662
|
-
{
|
|
663
|
-
|
|
664
|
-
|
|
653
|
+
{
|
|
654
|
+
param: "backend_stage_id",
|
|
655
|
+
value: request.backendStageId
|
|
656
|
+
},
|
|
657
|
+
{
|
|
658
|
+
param: "waf_stage_id",
|
|
659
|
+
value: request.wafStageId
|
|
660
|
+
},
|
|
661
|
+
{
|
|
662
|
+
param: "route_stage_id",
|
|
663
|
+
value: request.routeStageId
|
|
664
|
+
}
|
|
665
665
|
])
|
|
666
666
|
});
|
|
667
667
|
const marshalCreateDNSStageRequest = (request, defaults) => ({
|
|
668
668
|
fqdns: request.fqdns,
|
|
669
669
|
...resolveOneOf([
|
|
670
|
-
{
|
|
671
|
-
|
|
672
|
-
|
|
670
|
+
{
|
|
671
|
+
param: "tls_stage_id",
|
|
672
|
+
value: request.tlsStageId
|
|
673
|
+
},
|
|
674
|
+
{
|
|
675
|
+
param: "cache_stage_id",
|
|
676
|
+
value: request.cacheStageId
|
|
677
|
+
},
|
|
678
|
+
{
|
|
679
|
+
param: "backend_stage_id",
|
|
680
|
+
value: request.backendStageId
|
|
681
|
+
}
|
|
673
682
|
])
|
|
674
683
|
});
|
|
675
684
|
const marshalCreatePipelineRequest = (request, defaults) => ({
|
|
@@ -680,12 +689,23 @@ const marshalCreatePipelineRequest = (request, defaults) => ({
|
|
|
680
689
|
const marshalCreatePurgeRequestRequest = (request, defaults) => ({
|
|
681
690
|
pipeline_id: request.pipelineId,
|
|
682
691
|
...resolveOneOf([
|
|
683
|
-
{
|
|
684
|
-
|
|
692
|
+
{
|
|
693
|
+
param: "assets",
|
|
694
|
+
value: request.assets
|
|
695
|
+
},
|
|
696
|
+
{
|
|
697
|
+
param: "all",
|
|
698
|
+
value: request.all
|
|
699
|
+
}
|
|
685
700
|
])
|
|
686
701
|
});
|
|
687
702
|
const marshalCreateRouteStageRequest = (request, defaults) => ({
|
|
688
|
-
...resolveOneOf([
|
|
703
|
+
...resolveOneOf([
|
|
704
|
+
{
|
|
705
|
+
param: "waf_stage_id",
|
|
706
|
+
value: request.wafStageId
|
|
707
|
+
}
|
|
708
|
+
])
|
|
689
709
|
});
|
|
690
710
|
const marshalTLSSecret = (request, defaults) => ({
|
|
691
711
|
region: request.region,
|
|
@@ -695,17 +715,32 @@ const marshalCreateTLSStageRequest = (request, defaults) => ({
|
|
|
695
715
|
managed_certificate: request.managedCertificate,
|
|
696
716
|
secrets: request.secrets !== void 0 ? request.secrets.map((elt) => marshalTLSSecret(elt)) : void 0,
|
|
697
717
|
...resolveOneOf([
|
|
698
|
-
{
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
718
|
+
{
|
|
719
|
+
param: "cache_stage_id",
|
|
720
|
+
value: request.cacheStageId
|
|
721
|
+
},
|
|
722
|
+
{
|
|
723
|
+
param: "backend_stage_id",
|
|
724
|
+
value: request.backendStageId
|
|
725
|
+
},
|
|
726
|
+
{
|
|
727
|
+
param: "route_stage_id",
|
|
728
|
+
value: request.routeStageId
|
|
729
|
+
},
|
|
730
|
+
{
|
|
731
|
+
param: "waf_stage_id",
|
|
732
|
+
value: request.wafStageId
|
|
733
|
+
}
|
|
702
734
|
])
|
|
703
735
|
});
|
|
704
736
|
const marshalCreateWafStageRequest = (request, defaults) => ({
|
|
705
737
|
mode: request.mode,
|
|
706
738
|
paranoia_level: request.paranoiaLevel,
|
|
707
739
|
...resolveOneOf([
|
|
708
|
-
{
|
|
740
|
+
{
|
|
741
|
+
param: "backend_stage_id",
|
|
742
|
+
value: request.backendStageId
|
|
743
|
+
}
|
|
709
744
|
])
|
|
710
745
|
});
|
|
711
746
|
const marshalSelectPlanRequest = (request, defaults) => ({
|
|
@@ -726,28 +761,20 @@ const marshalSetHeadStageRequest = (request, defaults) => ({
|
|
|
726
761
|
...resolveOneOf([
|
|
727
762
|
{
|
|
728
763
|
param: "add_new_head_stage",
|
|
729
|
-
value: request.addNewHeadStage !== void 0 ? marshalSetHeadStageRequestAddNewHeadStage(
|
|
730
|
-
request.addNewHeadStage
|
|
731
|
-
) : void 0
|
|
764
|
+
value: request.addNewHeadStage !== void 0 ? marshalSetHeadStageRequestAddNewHeadStage(request.addNewHeadStage) : void 0
|
|
732
765
|
},
|
|
733
766
|
{
|
|
734
767
|
param: "remove_head_stage",
|
|
735
|
-
value: request.removeHeadStage !== void 0 ? marshalSetHeadStageRequestRemoveHeadStage(
|
|
736
|
-
request.removeHeadStage
|
|
737
|
-
) : void 0
|
|
768
|
+
value: request.removeHeadStage !== void 0 ? marshalSetHeadStageRequestRemoveHeadStage(request.removeHeadStage) : void 0
|
|
738
769
|
},
|
|
739
770
|
{
|
|
740
771
|
param: "swap_head_stage",
|
|
741
|
-
value: request.swapHeadStage !== void 0 ? marshalSetHeadStageRequestSwapHeadStage(
|
|
742
|
-
request.swapHeadStage
|
|
743
|
-
) : void 0
|
|
772
|
+
value: request.swapHeadStage !== void 0 ? marshalSetHeadStageRequestSwapHeadStage(request.swapHeadStage) : void 0
|
|
744
773
|
}
|
|
745
774
|
])
|
|
746
775
|
});
|
|
747
776
|
const marshalSetRouteRulesRequest = (request, defaults) => ({
|
|
748
|
-
route_rules: request.routeRules !== void 0 ? request.routeRules.map(
|
|
749
|
-
(elt) => marshalSetRouteRulesRequestRouteRule(elt)
|
|
750
|
-
) : void 0
|
|
777
|
+
route_rules: request.routeRules !== void 0 ? request.routeRules.map((elt) => marshalSetRouteRulesRequestRouteRule(elt)) : void 0
|
|
751
778
|
});
|
|
752
779
|
const marshalUpdateBackendStageRequest = (request, defaults) => ({
|
|
753
780
|
pipeline_id: request.pipelineId,
|
|
@@ -762,15 +789,11 @@ const marshalUpdateBackendStageRequest = (request, defaults) => ({
|
|
|
762
789
|
},
|
|
763
790
|
{
|
|
764
791
|
param: "scaleway_serverless_container",
|
|
765
|
-
value: request.scalewayServerlessContainer !== void 0 ? marshalScalewayServerlessContainerBackendConfig(
|
|
766
|
-
request.scalewayServerlessContainer
|
|
767
|
-
) : void 0
|
|
792
|
+
value: request.scalewayServerlessContainer !== void 0 ? marshalScalewayServerlessContainerBackendConfig(request.scalewayServerlessContainer) : void 0
|
|
768
793
|
},
|
|
769
794
|
{
|
|
770
795
|
param: "scaleway_serverless_function",
|
|
771
|
-
value: request.scalewayServerlessFunction !== void 0 ? marshalScalewayServerlessFunctionBackendConfig(
|
|
772
|
-
request.scalewayServerlessFunction
|
|
773
|
-
) : void 0
|
|
796
|
+
value: request.scalewayServerlessFunction !== void 0 ? marshalScalewayServerlessFunctionBackendConfig(request.scalewayServerlessFunction) : void 0
|
|
774
797
|
}
|
|
775
798
|
])
|
|
776
799
|
});
|
|
@@ -778,17 +801,35 @@ const marshalUpdateCacheStageRequest = (request, defaults) => ({
|
|
|
778
801
|
fallback_ttl: request.fallbackTtl,
|
|
779
802
|
include_cookies: request.includeCookies,
|
|
780
803
|
...resolveOneOf([
|
|
781
|
-
{
|
|
782
|
-
|
|
783
|
-
|
|
804
|
+
{
|
|
805
|
+
param: "backend_stage_id",
|
|
806
|
+
value: request.backendStageId
|
|
807
|
+
},
|
|
808
|
+
{
|
|
809
|
+
param: "waf_stage_id",
|
|
810
|
+
value: request.wafStageId
|
|
811
|
+
},
|
|
812
|
+
{
|
|
813
|
+
param: "route_stage_id",
|
|
814
|
+
value: request.routeStageId
|
|
815
|
+
}
|
|
784
816
|
])
|
|
785
817
|
});
|
|
786
818
|
const marshalUpdateDNSStageRequest = (request, defaults) => ({
|
|
787
819
|
fqdns: request.fqdns,
|
|
788
820
|
...resolveOneOf([
|
|
789
|
-
{
|
|
790
|
-
|
|
791
|
-
|
|
821
|
+
{
|
|
822
|
+
param: "tls_stage_id",
|
|
823
|
+
value: request.tlsStageId
|
|
824
|
+
},
|
|
825
|
+
{
|
|
826
|
+
param: "cache_stage_id",
|
|
827
|
+
value: request.cacheStageId
|
|
828
|
+
},
|
|
829
|
+
{
|
|
830
|
+
param: "backend_stage_id",
|
|
831
|
+
value: request.backendStageId
|
|
832
|
+
}
|
|
792
833
|
])
|
|
793
834
|
});
|
|
794
835
|
const marshalUpdatePipelineRequest = (request, defaults) => ({
|
|
@@ -796,7 +837,12 @@ const marshalUpdatePipelineRequest = (request, defaults) => ({
|
|
|
796
837
|
name: request.name
|
|
797
838
|
});
|
|
798
839
|
const marshalUpdateRouteStageRequest = (request, defaults) => ({
|
|
799
|
-
...resolveOneOf([
|
|
840
|
+
...resolveOneOf([
|
|
841
|
+
{
|
|
842
|
+
param: "waf_stage_id",
|
|
843
|
+
value: request.wafStageId
|
|
844
|
+
}
|
|
845
|
+
])
|
|
800
846
|
});
|
|
801
847
|
const marshalTLSSecretsConfig = (request, defaults) => ({
|
|
802
848
|
tls_secrets: request.tlsSecrets.map((elt) => marshalTLSSecret(elt))
|
|
@@ -805,17 +851,32 @@ const marshalUpdateTLSStageRequest = (request, defaults) => ({
|
|
|
805
851
|
managed_certificate: request.managedCertificate,
|
|
806
852
|
tls_secrets_config: request.tlsSecretsConfig !== void 0 ? marshalTLSSecretsConfig(request.tlsSecretsConfig) : void 0,
|
|
807
853
|
...resolveOneOf([
|
|
808
|
-
{
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
854
|
+
{
|
|
855
|
+
param: "cache_stage_id",
|
|
856
|
+
value: request.cacheStageId
|
|
857
|
+
},
|
|
858
|
+
{
|
|
859
|
+
param: "backend_stage_id",
|
|
860
|
+
value: request.backendStageId
|
|
861
|
+
},
|
|
862
|
+
{
|
|
863
|
+
param: "route_stage_id",
|
|
864
|
+
value: request.routeStageId
|
|
865
|
+
},
|
|
866
|
+
{
|
|
867
|
+
param: "waf_stage_id",
|
|
868
|
+
value: request.wafStageId
|
|
869
|
+
}
|
|
812
870
|
])
|
|
813
871
|
});
|
|
814
872
|
const marshalUpdateWafStageRequest = (request, defaults) => ({
|
|
815
873
|
mode: request.mode,
|
|
816
874
|
paranoia_level: request.paranoiaLevel,
|
|
817
875
|
...resolveOneOf([
|
|
818
|
-
{
|
|
876
|
+
{
|
|
877
|
+
param: "backend_stage_id",
|
|
878
|
+
value: request.backendStageId
|
|
879
|
+
}
|
|
819
880
|
])
|
|
820
881
|
});
|
|
821
882
|
export {
|
|
@@ -453,6 +453,10 @@ export interface PlanDetails {
|
|
|
453
453
|
* Number of WAF requests included in subscription plan.
|
|
454
454
|
*/
|
|
455
455
|
wafRequests: number;
|
|
456
|
+
/**
|
|
457
|
+
* Number of backends per pipeline included in subscription plan.
|
|
458
|
+
*/
|
|
459
|
+
backendLimit: number;
|
|
456
460
|
}
|
|
457
461
|
export interface PlanUsageDetails {
|
|
458
462
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk-edge-services",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.1",
|
|
4
4
|
"description": "Scaleway SDK edge-services",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"files": [
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@scaleway/random-name": "5.1.2",
|
|
30
|
-
"@scaleway/sdk-std": "2.1.
|
|
30
|
+
"@scaleway/sdk-std": "2.1.1"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@scaleway/sdk-client": "^2.1.0"
|