@scaleway/sdk-edge-services 2.3.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.
|
@@ -57,6 +57,12 @@ export declare class API extends ParentAPI {
|
|
|
57
57
|
*/
|
|
58
58
|
deletePipeline: (request: Readonly<DeletePipelineRequest>) => Promise<void>;
|
|
59
59
|
protected pageOfListHeadStages: (request: Readonly<ListHeadStagesRequest>) => Promise<ListHeadStagesResponse>;
|
|
60
|
+
/**
|
|
61
|
+
* List Head stage for your pipeline.. List Head stage for your pipeline.
|
|
62
|
+
*
|
|
63
|
+
* @param request - The request {@link ListHeadStagesRequest}
|
|
64
|
+
* @returns A Promise of ListHeadStagesResponse
|
|
65
|
+
*/
|
|
60
66
|
listHeadStages: (request: Readonly<ListHeadStagesRequest>) => Promise<ListHeadStagesResponse> & {
|
|
61
67
|
all: () => Promise<import("./types.gen.js").ListHeadStagesResponseHeadStage[]>;
|
|
62
68
|
[Symbol.asyncIterator]: () => AsyncGenerator<import("./types.gen.js").ListHeadStagesResponseHeadStage[], void, void>;
|
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,24 +109,29 @@ 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
|
|
141
128
|
);
|
|
129
|
+
/**
|
|
130
|
+
* List Head stage for your pipeline.. List Head stage for your pipeline.
|
|
131
|
+
*
|
|
132
|
+
* @param request - The request {@link ListHeadStagesRequest}
|
|
133
|
+
* @returns A Promise of ListHeadStagesResponse
|
|
134
|
+
*/
|
|
142
135
|
listHeadStages = (request) => enrichForPagination("headStages", this.pageOfListHeadStages, request);
|
|
143
136
|
/**
|
|
144
137
|
* 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).
|
|
@@ -165,10 +158,7 @@ class API extends API$1 {
|
|
|
165
158
|
["fqdn", request.fqdn],
|
|
166
159
|
["order_by", request.orderBy],
|
|
167
160
|
["page", request.page],
|
|
168
|
-
[
|
|
169
|
-
"page_size",
|
|
170
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
171
|
-
]
|
|
161
|
+
["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
|
|
172
162
|
)
|
|
173
163
|
},
|
|
174
164
|
unmarshalListDNSStagesResponse
|
|
@@ -232,10 +222,12 @@ class API extends API$1 {
|
|
|
232
222
|
*
|
|
233
223
|
* @param request - The request {@link DeleteDNSStageRequest}
|
|
234
224
|
*/
|
|
235
|
-
deleteDNSStage = (request) => this.client.fetch(
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
225
|
+
deleteDNSStage = (request) => this.client.fetch(
|
|
226
|
+
{
|
|
227
|
+
method: "DELETE",
|
|
228
|
+
path: `/edge-services/v1beta1/dns-stages/${validatePathParam("dnsStageId", request.dnsStageId)}`
|
|
229
|
+
}
|
|
230
|
+
);
|
|
239
231
|
pageOfListTLSStages = (request) => this.client.fetch(
|
|
240
232
|
{
|
|
241
233
|
method: "GET",
|
|
@@ -243,10 +235,7 @@ class API extends API$1 {
|
|
|
243
235
|
urlParams: urlParams(
|
|
244
236
|
["order_by", request.orderBy],
|
|
245
237
|
["page", request.page],
|
|
246
|
-
[
|
|
247
|
-
"page_size",
|
|
248
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
249
|
-
],
|
|
238
|
+
["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
|
|
250
239
|
["secret_id", request.secretId],
|
|
251
240
|
["secret_region", request.secretRegion]
|
|
252
241
|
)
|
|
@@ -312,10 +301,12 @@ class API extends API$1 {
|
|
|
312
301
|
*
|
|
313
302
|
* @param request - The request {@link DeleteTLSStageRequest}
|
|
314
303
|
*/
|
|
315
|
-
deleteTLSStage = (request) => this.client.fetch(
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
304
|
+
deleteTLSStage = (request) => this.client.fetch(
|
|
305
|
+
{
|
|
306
|
+
method: "DELETE",
|
|
307
|
+
path: `/edge-services/v1beta1/tls-stages/${validatePathParam("tlsStageId", request.tlsStageId)}`
|
|
308
|
+
}
|
|
309
|
+
);
|
|
319
310
|
pageOfListCacheStages = (request) => this.client.fetch(
|
|
320
311
|
{
|
|
321
312
|
method: "GET",
|
|
@@ -323,10 +314,7 @@ class API extends API$1 {
|
|
|
323
314
|
urlParams: urlParams(
|
|
324
315
|
["order_by", request.orderBy],
|
|
325
316
|
["page", request.page],
|
|
326
|
-
[
|
|
327
|
-
"page_size",
|
|
328
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
329
|
-
]
|
|
317
|
+
["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
|
|
330
318
|
)
|
|
331
319
|
},
|
|
332
320
|
unmarshalListCacheStagesResponse
|
|
@@ -390,10 +378,12 @@ class API extends API$1 {
|
|
|
390
378
|
*
|
|
391
379
|
* @param request - The request {@link DeleteCacheStageRequest}
|
|
392
380
|
*/
|
|
393
|
-
deleteCacheStage = (request) => this.client.fetch(
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
381
|
+
deleteCacheStage = (request) => this.client.fetch(
|
|
382
|
+
{
|
|
383
|
+
method: "DELETE",
|
|
384
|
+
path: `/edge-services/v1beta1/cache-stages/${validatePathParam("cacheStageId", request.cacheStageId)}`
|
|
385
|
+
}
|
|
386
|
+
);
|
|
397
387
|
pageOfListBackendStages = (request) => this.client.fetch(
|
|
398
388
|
{
|
|
399
389
|
method: "GET",
|
|
@@ -404,10 +394,7 @@ class API extends API$1 {
|
|
|
404
394
|
["lb_id", request.lbId],
|
|
405
395
|
["order_by", request.orderBy],
|
|
406
396
|
["page", request.page],
|
|
407
|
-
[
|
|
408
|
-
"page_size",
|
|
409
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
410
|
-
]
|
|
397
|
+
["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
|
|
411
398
|
)
|
|
412
399
|
},
|
|
413
400
|
unmarshalListBackendStagesResponse
|
|
@@ -471,10 +458,12 @@ class API extends API$1 {
|
|
|
471
458
|
*
|
|
472
459
|
* @param request - The request {@link DeleteBackendStageRequest}
|
|
473
460
|
*/
|
|
474
|
-
deleteBackendStage = (request) => this.client.fetch(
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
461
|
+
deleteBackendStage = (request) => this.client.fetch(
|
|
462
|
+
{
|
|
463
|
+
method: "DELETE",
|
|
464
|
+
path: `/edge-services/v1beta1/backend-stages/${validatePathParam("backendStageId", request.backendStageId)}`
|
|
465
|
+
}
|
|
466
|
+
);
|
|
478
467
|
searchBackendStages = (request = {}) => this.client.fetch(
|
|
479
468
|
{
|
|
480
469
|
method: "GET",
|
|
@@ -485,14 +474,8 @@ class API extends API$1 {
|
|
|
485
474
|
["lb_id", request.lbId],
|
|
486
475
|
["order_by", request.orderBy],
|
|
487
476
|
["page", request.page],
|
|
488
|
-
[
|
|
489
|
-
|
|
490
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
491
|
-
],
|
|
492
|
-
[
|
|
493
|
-
"project_id",
|
|
494
|
-
request.projectId ?? this.client.settings.defaultProjectId
|
|
495
|
-
]
|
|
477
|
+
["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
|
|
478
|
+
["project_id", request.projectId ?? this.client.settings.defaultProjectId]
|
|
496
479
|
)
|
|
497
480
|
},
|
|
498
481
|
unmarshalListBackendStagesResponse
|
|
@@ -504,10 +487,7 @@ class API extends API$1 {
|
|
|
504
487
|
urlParams: urlParams(
|
|
505
488
|
["order_by", request.orderBy],
|
|
506
489
|
["page", request.page],
|
|
507
|
-
[
|
|
508
|
-
"page_size",
|
|
509
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
510
|
-
]
|
|
490
|
+
["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
|
|
511
491
|
)
|
|
512
492
|
},
|
|
513
493
|
unmarshalListWafStagesResponse
|
|
@@ -571,10 +551,12 @@ class API extends API$1 {
|
|
|
571
551
|
*
|
|
572
552
|
* @param request - The request {@link DeleteWafStageRequest}
|
|
573
553
|
*/
|
|
574
|
-
deleteWafStage = (request) => this.client.fetch(
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
554
|
+
deleteWafStage = (request) => this.client.fetch(
|
|
555
|
+
{
|
|
556
|
+
method: "DELETE",
|
|
557
|
+
path: `/edge-services/v1beta1/waf-stages/${validatePathParam("wafStageId", request.wafStageId)}`
|
|
558
|
+
}
|
|
559
|
+
);
|
|
578
560
|
searchWafStages = (request = {}) => this.client.fetch(
|
|
579
561
|
{
|
|
580
562
|
method: "GET",
|
|
@@ -582,14 +564,8 @@ class API extends API$1 {
|
|
|
582
564
|
urlParams: urlParams(
|
|
583
565
|
["order_by", request.orderBy],
|
|
584
566
|
["page", request.page],
|
|
585
|
-
[
|
|
586
|
-
|
|
587
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
588
|
-
],
|
|
589
|
-
[
|
|
590
|
-
"project_id",
|
|
591
|
-
request.projectId ?? this.client.settings.defaultProjectId
|
|
592
|
-
]
|
|
567
|
+
["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
|
|
568
|
+
["project_id", request.projectId ?? this.client.settings.defaultProjectId]
|
|
593
569
|
)
|
|
594
570
|
},
|
|
595
571
|
unmarshalListWafStagesResponse
|
|
@@ -601,10 +577,7 @@ class API extends API$1 {
|
|
|
601
577
|
urlParams: urlParams(
|
|
602
578
|
["order_by", request.orderBy],
|
|
603
579
|
["page", request.page],
|
|
604
|
-
[
|
|
605
|
-
"page_size",
|
|
606
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
607
|
-
]
|
|
580
|
+
["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
|
|
608
581
|
)
|
|
609
582
|
},
|
|
610
583
|
unmarshalListRouteStagesResponse
|
|
@@ -668,10 +641,12 @@ class API extends API$1 {
|
|
|
668
641
|
*
|
|
669
642
|
* @param request - The request {@link DeleteRouteStageRequest}
|
|
670
643
|
*/
|
|
671
|
-
deleteRouteStage = (request) => this.client.fetch(
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
644
|
+
deleteRouteStage = (request) => this.client.fetch(
|
|
645
|
+
{
|
|
646
|
+
method: "DELETE",
|
|
647
|
+
path: `/edge-services/v1beta1/route-stages/${validatePathParam("routeStageId", request.routeStageId)}`
|
|
648
|
+
}
|
|
649
|
+
);
|
|
675
650
|
/**
|
|
676
651
|
* List route rules. List all route rules of an existing route stage, specified by its `route_stage_id`.
|
|
677
652
|
*
|
|
@@ -733,10 +708,7 @@ class API extends API$1 {
|
|
|
733
708
|
["order_by", request.orderBy],
|
|
734
709
|
["organization_id", request.organizationId],
|
|
735
710
|
["page", request.page],
|
|
736
|
-
[
|
|
737
|
-
"page_size",
|
|
738
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
739
|
-
],
|
|
711
|
+
["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
|
|
740
712
|
["project_id", request.projectId]
|
|
741
713
|
)
|
|
742
714
|
},
|
|
@@ -772,10 +744,7 @@ class API extends API$1 {
|
|
|
772
744
|
["order_by", request.orderBy],
|
|
773
745
|
["organization_id", request.organizationId],
|
|
774
746
|
["page", request.page],
|
|
775
|
-
[
|
|
776
|
-
"page_size",
|
|
777
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
778
|
-
],
|
|
747
|
+
["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
|
|
779
748
|
["pipeline_id", request.pipelineId],
|
|
780
749
|
["project_id", request.projectId]
|
|
781
750
|
)
|
|
@@ -827,11 +796,7 @@ class API extends API$1 {
|
|
|
827
796
|
* @returns A Promise of PurgeRequest
|
|
828
797
|
*/
|
|
829
798
|
waitForPurgeRequest = (request, options) => waitForResource(
|
|
830
|
-
options?.stop ?? ((res) => Promise.resolve(
|
|
831
|
-
!PURGE_REQUEST_TRANSIENT_STATUSES.includes(
|
|
832
|
-
res.status
|
|
833
|
-
)
|
|
834
|
-
)),
|
|
799
|
+
options?.stop ?? ((res) => Promise.resolve(!PURGE_REQUEST_TRANSIENT_STATUSES.includes(res.status))),
|
|
835
800
|
this.getPurgeRequest,
|
|
836
801
|
request,
|
|
837
802
|
options
|
|
@@ -872,10 +837,12 @@ class API extends API$1 {
|
|
|
872
837
|
},
|
|
873
838
|
unmarshalPlan
|
|
874
839
|
);
|
|
875
|
-
deleteCurrentPlan = (request = {}) => this.client.fetch(
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
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
|
+
);
|
|
879
846
|
/**
|
|
880
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.).
|
|
881
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
|
/**
|
|
@@ -1348,10 +1352,6 @@ export type UpdateBackendStageRequest = {
|
|
|
1348
1352
|
* One-of ('backendConfig'): at most one of 'scalewayS3', 'scalewayLb', 'scalewayServerlessContainer', 'scalewayServerlessFunction' could be set.
|
|
1349
1353
|
*/
|
|
1350
1354
|
scalewayLb?: ScalewayLbBackendConfig;
|
|
1351
|
-
/**
|
|
1352
|
-
* Pipeline ID the Backend stage belongs to.
|
|
1353
|
-
*/
|
|
1354
|
-
pipelineId: string;
|
|
1355
1355
|
/**
|
|
1356
1356
|
*
|
|
1357
1357
|
* One-of ('backendConfig'): at most one of 'scalewayS3', 'scalewayLb', 'scalewayServerlessContainer', 'scalewayServerlessFunction' could be set.
|
|
@@ -1362,6 +1362,10 @@ export type UpdateBackendStageRequest = {
|
|
|
1362
1362
|
* One-of ('backendConfig'): at most one of 'scalewayS3', 'scalewayLb', 'scalewayServerlessContainer', 'scalewayServerlessFunction' could be set.
|
|
1363
1363
|
*/
|
|
1364
1364
|
scalewayServerlessFunction?: ScalewayServerlessFunctionBackendConfig;
|
|
1365
|
+
/**
|
|
1366
|
+
* Pipeline ID the Backend stage belongs to.
|
|
1367
|
+
*/
|
|
1368
|
+
pipelineId: string;
|
|
1365
1369
|
};
|
|
1366
1370
|
export type UpdateCacheStageRequest = {
|
|
1367
1371
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk-edge-services",
|
|
3
|
-
"version": "2.
|
|
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"
|