@scaleway/sdk 2.5.0 → 2.7.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/api/account/v2/api.gen.js +26 -74
- package/dist/api/account/v3/api.gen.js +20 -60
- package/dist/api/applesilicon/v1alpha1/api.gen.js +16 -56
- package/dist/api/baremetal/v1/api.gen.js +36 -132
- package/dist/api/billing/v2alpha1/api.gen.js +17 -57
- package/dist/api/block/v1alpha1/api.gen.js +19 -67
- package/dist/api/block/v1alpha1/marshalling.gen.js +1 -0
- package/dist/api/cockpit/v1beta1/api.gen.js +95 -279
- package/dist/api/container/v1beta1/api.gen.js +51 -123
- package/dist/api/document_db/v1beta1/api.gen.js +18 -66
- package/dist/api/document_db/v1beta1/marshalling.gen.js +20 -1
- package/dist/api/domain/v2beta1/api.gen.js +36 -124
- package/dist/api/flexibleip/v1alpha1/api.gen.js +6 -22
- package/dist/api/function/v1beta1/api.gen.js +55 -135
- package/dist/api/iam/v1alpha1/api.gen.js +66 -226
- package/dist/api/instance/v1/api.gen.js +156 -325
- package/dist/api/instance/v1/api.utils.js +0 -126
- package/dist/api/instance/v1/marshalling.gen.js +99 -51
- package/dist/api/iot/v1/api.gen.js +24 -88
- package/dist/api/ipam/v1/api.gen.js +12 -28
- package/dist/api/ipfs/v1alpha1/api.gen.js +12 -44
- package/dist/api/jobs/v1alpha1/api.gen.js +13 -58
- package/dist/api/jobs/v1alpha1/marshalling.gen.js +2 -0
- package/dist/api/k8s/v1/api.gen.js +16 -56
- package/dist/api/k8s/v1/marshalling.gen.js +1 -0
- package/dist/api/lb/v1/api.gen.js +72 -248
- package/dist/api/marketplace/v1/api.gen.js +7 -31
- package/dist/api/marketplace/v1/marshalling.gen.js +1 -18
- package/dist/api/marketplace/v2/api.gen.js +21 -53
- package/dist/api/mnq/v1beta1/api.gen.js +76 -212
- package/dist/api/rdb/v1/api.gen.js +24 -88
- package/dist/api/rdb/v1/marshalling.gen.js +11 -1
- package/dist/api/redis/v1/api.gen.js +6 -22
- package/dist/api/registry/v1/api.gen.js +12 -44
- package/dist/api/secret/v1alpha1/api.gen.js +18 -66
- package/dist/api/serverless_sqldb/index.js +2 -0
- package/dist/api/serverless_sqldb/v1alpha1/api.gen.js +162 -0
- package/dist/api/serverless_sqldb/v1alpha1/content.gen.js +7 -0
- package/dist/api/serverless_sqldb/v1alpha1/index.gen.js +7 -0
- package/dist/api/serverless_sqldb/v1alpha1/marshalling.gen.js +77 -0
- package/dist/api/serverless_sqldb/v1alpha1/validation-rules.gen.js +60 -0
- package/dist/api/tem/v1alpha1/api.gen.js +17 -57
- package/dist/api/test/v1/api.gen.js +6 -22
- package/dist/api/vpc/v1/api.gen.js +12 -36
- package/dist/api/vpc/v2/api.gen.js +30 -86
- package/dist/api/vpcgw/v1/api.gen.js +46 -158
- package/dist/api/webhosting/v1alpha1/api.gen.js +12 -44
- package/dist/helpers/marshalling.js +8 -23
- package/dist/index.cjs +1066 -821
- package/dist/index.d.ts +2191 -1780
- package/dist/index.js +12 -10
- package/dist/internal/async/interval-retrier.js +8 -16
- package/dist/internal/interceptors/helpers.js +3 -4
- package/dist/internal/logger/console-logger.js +1 -7
- package/dist/internal/logger/index.js +1 -9
- package/dist/scw/auth.js +1 -2
- package/dist/scw/client.js +2 -10
- package/dist/scw/constants.js +1 -1
- package/dist/scw/errors/non-standard/invalid-request-mapper.js +5 -8
- package/dist/scw/errors/scw-error.js +2 -9
- package/dist/scw/errors/standard/permissions-denied-error.js +4 -7
- package/dist/scw/fetch/build-fetcher.js +1 -4
- package/dist/scw/fetch/http-dumper.js +1 -4
- package/dist/scw/fetch/http-interceptors.js +18 -31
- package/dist/scw/fetch/resource-paginator.js +3 -17
- package/package.json +2 -2
- package/dist/api/instance/v1/marshalling.utils.js +0 -63
|
@@ -19,19 +19,11 @@ const jsonContentHeaders = {
|
|
|
19
19
|
class ZonedAPI extends API$1 {
|
|
20
20
|
/** Lists the available zones of the API. */
|
|
21
21
|
static LOCALITIES = ['fr-par-1', 'fr-par-2', 'nl-ams-1', 'nl-ams-2', 'nl-ams-3', 'pl-waw-1', 'pl-waw-2', 'pl-waw-3'];
|
|
22
|
-
pageOfListLbs = (
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
return _this.client.fetch({
|
|
29
|
-
method: 'GET',
|
|
30
|
-
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? _this.client.settings.defaultZone)}/lbs`,
|
|
31
|
-
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['project_id', request.projectId])
|
|
32
|
-
}, unmarshalListLbsResponse);
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
22
|
+
pageOfListLbs = (request = {}) => this.client.fetch({
|
|
23
|
+
method: 'GET',
|
|
24
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/lbs`,
|
|
25
|
+
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId])
|
|
26
|
+
}, unmarshalListLbsResponse);
|
|
35
27
|
|
|
36
28
|
/**
|
|
37
29
|
* List Load Balancers. List all Load Balancers in the specified zone, for a
|
|
@@ -42,15 +34,7 @@ class ZonedAPI extends API$1 {
|
|
|
42
34
|
* @param request - The request {@link ZonedApiListLbsRequest}
|
|
43
35
|
* @returns A Promise of ListLbsResponse
|
|
44
36
|
*/
|
|
45
|
-
listLbs = (
|
|
46
|
-
var _this2 = this;
|
|
47
|
-
return function (request) {
|
|
48
|
-
if (request === void 0) {
|
|
49
|
-
request = {};
|
|
50
|
-
}
|
|
51
|
-
return enrichForPagination('lbs', _this2.pageOfListLbs, request);
|
|
52
|
-
};
|
|
53
|
-
})();
|
|
37
|
+
listLbs = (request = {}) => enrichForPagination('lbs', this.pageOfListLbs, request);
|
|
54
38
|
|
|
55
39
|
/**
|
|
56
40
|
* Create a Load Balancer. Create a new Load Balancer. Note that the Load
|
|
@@ -132,19 +116,11 @@ class ZonedAPI extends API$1 {
|
|
|
132
116
|
method: 'POST',
|
|
133
117
|
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam('lbId', request.lbId)}/migrate`
|
|
134
118
|
}, unmarshalLb);
|
|
135
|
-
pageOfListIPs = (
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
}
|
|
141
|
-
return _this3.client.fetch({
|
|
142
|
-
method: 'GET',
|
|
143
|
-
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? _this3.client.settings.defaultZone)}/ips`,
|
|
144
|
-
urlParams: urlParams(['ip_address', request.ipAddress], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this3.client.settings.defaultPageSize], ['project_id', request.projectId])
|
|
145
|
-
}, unmarshalListIpsResponse);
|
|
146
|
-
};
|
|
147
|
-
})();
|
|
119
|
+
pageOfListIPs = (request = {}) => this.client.fetch({
|
|
120
|
+
method: 'GET',
|
|
121
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/ips`,
|
|
122
|
+
urlParams: urlParams(['ip_address', request.ipAddress], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId])
|
|
123
|
+
}, unmarshalListIpsResponse);
|
|
148
124
|
|
|
149
125
|
/**
|
|
150
126
|
* List IP addresses. List the Load Balancer flexible IP addresses held in the
|
|
@@ -154,15 +130,7 @@ class ZonedAPI extends API$1 {
|
|
|
154
130
|
* @param request - The request {@link ZonedApiListIPsRequest}
|
|
155
131
|
* @returns A Promise of ListIpsResponse
|
|
156
132
|
*/
|
|
157
|
-
listIPs = (
|
|
158
|
-
var _this4 = this;
|
|
159
|
-
return function (request) {
|
|
160
|
-
if (request === void 0) {
|
|
161
|
-
request = {};
|
|
162
|
-
}
|
|
163
|
-
return enrichForPagination('ips', _this4.pageOfListIPs, request);
|
|
164
|
-
};
|
|
165
|
-
})();
|
|
133
|
+
listIPs = (request = {}) => enrichForPagination('ips', this.pageOfListIPs, request);
|
|
166
134
|
|
|
167
135
|
/**
|
|
168
136
|
* Create an IP address. Create a new Load Balancer flexible IP address, in
|
|
@@ -172,20 +140,12 @@ class ZonedAPI extends API$1 {
|
|
|
172
140
|
* @param request - The request {@link ZonedApiCreateIpRequest}
|
|
173
141
|
* @returns A Promise of Ip
|
|
174
142
|
*/
|
|
175
|
-
createIp = (
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
return _this5.client.fetch({
|
|
182
|
-
body: JSON.stringify(marshalZonedApiCreateIpRequest(request, _this5.client.settings)),
|
|
183
|
-
headers: jsonContentHeaders,
|
|
184
|
-
method: 'POST',
|
|
185
|
-
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? _this5.client.settings.defaultZone)}/ips`
|
|
186
|
-
}, unmarshalIp);
|
|
187
|
-
};
|
|
188
|
-
})();
|
|
143
|
+
createIp = (request = {}) => this.client.fetch({
|
|
144
|
+
body: JSON.stringify(marshalZonedApiCreateIpRequest(request, this.client.settings)),
|
|
145
|
+
headers: jsonContentHeaders,
|
|
146
|
+
method: 'POST',
|
|
147
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/ips`
|
|
148
|
+
}, unmarshalIp);
|
|
189
149
|
|
|
190
150
|
/**
|
|
191
151
|
* Get an IP address. Retrieve the full details of a Load Balancer flexible IP
|
|
@@ -434,19 +394,11 @@ class ZonedAPI extends API$1 {
|
|
|
434
394
|
method: 'DELETE',
|
|
435
395
|
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/frontends/${validatePathParam('frontendId', request.frontendId)}`
|
|
436
396
|
});
|
|
437
|
-
pageOfListRoutes = (
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
}
|
|
443
|
-
return _this6.client.fetch({
|
|
444
|
-
method: 'GET',
|
|
445
|
-
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? _this6.client.settings.defaultZone)}/routes`,
|
|
446
|
-
urlParams: urlParams(['frontend_id', request.frontendId], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? _this6.client.settings.defaultPageSize])
|
|
447
|
-
}, unmarshalListRoutesResponse);
|
|
448
|
-
};
|
|
449
|
-
})();
|
|
397
|
+
pageOfListRoutes = (request = {}) => this.client.fetch({
|
|
398
|
+
method: 'GET',
|
|
399
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/routes`,
|
|
400
|
+
urlParams: urlParams(['frontend_id', request.frontendId], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
401
|
+
}, unmarshalListRoutesResponse);
|
|
450
402
|
|
|
451
403
|
/**
|
|
452
404
|
* List all routes. List all routes for a given frontend. The response is an
|
|
@@ -457,15 +409,7 @@ class ZonedAPI extends API$1 {
|
|
|
457
409
|
* @param request - The request {@link ZonedApiListRoutesRequest}
|
|
458
410
|
* @returns A Promise of ListRoutesResponse
|
|
459
411
|
*/
|
|
460
|
-
listRoutes = (
|
|
461
|
-
var _this7 = this;
|
|
462
|
-
return function (request) {
|
|
463
|
-
if (request === void 0) {
|
|
464
|
-
request = {};
|
|
465
|
-
}
|
|
466
|
-
return enrichForPagination('routes', _this7.pageOfListRoutes, request);
|
|
467
|
-
};
|
|
468
|
-
})();
|
|
412
|
+
listRoutes = (request = {}) => enrichForPagination('routes', this.pageOfListRoutes, request);
|
|
469
413
|
|
|
470
414
|
/**
|
|
471
415
|
* Create a route. Create a new route on a given frontend. To configure a
|
|
@@ -711,19 +655,11 @@ class ZonedAPI extends API$1 {
|
|
|
711
655
|
method: 'DELETE',
|
|
712
656
|
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/certificates/${validatePathParam('certificateId', request.certificateId)}`
|
|
713
657
|
});
|
|
714
|
-
pageOfListLbTypes = (
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
}
|
|
720
|
-
return _this8.client.fetch({
|
|
721
|
-
method: 'GET',
|
|
722
|
-
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? _this8.client.settings.defaultZone)}/lb-types`,
|
|
723
|
-
urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ?? _this8.client.settings.defaultPageSize])
|
|
724
|
-
}, unmarshalListLbTypesResponse);
|
|
725
|
-
};
|
|
726
|
-
})();
|
|
658
|
+
pageOfListLbTypes = (request = {}) => this.client.fetch({
|
|
659
|
+
method: 'GET',
|
|
660
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/lb-types`,
|
|
661
|
+
urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
662
|
+
}, unmarshalListLbTypesResponse);
|
|
727
663
|
|
|
728
664
|
/**
|
|
729
665
|
* List all Load Balancer offer types. List all the different commercial Load
|
|
@@ -733,15 +669,7 @@ class ZonedAPI extends API$1 {
|
|
|
733
669
|
* @param request - The request {@link ZonedApiListLbTypesRequest}
|
|
734
670
|
* @returns A Promise of ListLbTypesResponse
|
|
735
671
|
*/
|
|
736
|
-
listLbTypes = (
|
|
737
|
-
var _this9 = this;
|
|
738
|
-
return function (request) {
|
|
739
|
-
if (request === void 0) {
|
|
740
|
-
request = {};
|
|
741
|
-
}
|
|
742
|
-
return enrichForPagination('lbTypes', _this9.pageOfListLbTypes, request);
|
|
743
|
-
};
|
|
744
|
-
})();
|
|
672
|
+
listLbTypes = (request = {}) => enrichForPagination('lbTypes', this.pageOfListLbTypes, request);
|
|
745
673
|
|
|
746
674
|
/**
|
|
747
675
|
* Create a subscriber. Create a new subscriber, either with an email
|
|
@@ -770,19 +698,11 @@ class ZonedAPI extends API$1 {
|
|
|
770
698
|
method: 'GET',
|
|
771
699
|
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/subscribers/${validatePathParam('subscriberId', request.subscriberId)}`
|
|
772
700
|
}, unmarshalSubscriber);
|
|
773
|
-
pageOfListSubscriber = (
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
}
|
|
779
|
-
return _this10.client.fetch({
|
|
780
|
-
method: 'GET',
|
|
781
|
-
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? _this10.client.settings.defaultZone)}/subscribers`,
|
|
782
|
-
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this10.client.settings.defaultPageSize], ['project_id', request.projectId])
|
|
783
|
-
}, unmarshalListSubscriberResponse);
|
|
784
|
-
};
|
|
785
|
-
})();
|
|
701
|
+
pageOfListSubscriber = (request = {}) => this.client.fetch({
|
|
702
|
+
method: 'GET',
|
|
703
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/subscribers`,
|
|
704
|
+
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId])
|
|
705
|
+
}, unmarshalListSubscriberResponse);
|
|
786
706
|
|
|
787
707
|
/**
|
|
788
708
|
* List all subscribers. List all subscribers to Load Balancer alerts. By
|
|
@@ -793,15 +713,7 @@ class ZonedAPI extends API$1 {
|
|
|
793
713
|
* @param request - The request {@link ZonedApiListSubscriberRequest}
|
|
794
714
|
* @returns A Promise of ListSubscriberResponse
|
|
795
715
|
*/
|
|
796
|
-
listSubscriber = (
|
|
797
|
-
var _this11 = this;
|
|
798
|
-
return function (request) {
|
|
799
|
-
if (request === void 0) {
|
|
800
|
-
request = {};
|
|
801
|
-
}
|
|
802
|
-
return enrichForPagination('subscribers', _this11.pageOfListSubscriber, request);
|
|
803
|
-
};
|
|
804
|
-
})();
|
|
716
|
+
listSubscriber = (request = {}) => enrichForPagination('subscribers', this.pageOfListSubscriber, request);
|
|
805
717
|
|
|
806
718
|
/**
|
|
807
719
|
* Update a subscriber. Update the parameters of a given subscriber (e.g.
|
|
@@ -910,19 +822,11 @@ class ZonedAPI extends API$1 {
|
|
|
910
822
|
class API extends API$1 {
|
|
911
823
|
/** Lists the available regions of the API. */
|
|
912
824
|
static LOCALITIES = ['fr-par', 'nl-ams', 'pl-waw'];
|
|
913
|
-
pageOfListLbs = (
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
}
|
|
919
|
-
return _this12.client.fetch({
|
|
920
|
-
method: 'GET',
|
|
921
|
-
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? _this12.client.settings.defaultRegion)}/lbs`,
|
|
922
|
-
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this12.client.settings.defaultPageSize], ['project_id', request.projectId])
|
|
923
|
-
}, unmarshalListLbsResponse);
|
|
924
|
-
};
|
|
925
|
-
})();
|
|
825
|
+
pageOfListLbs = (request = {}) => this.client.fetch({
|
|
826
|
+
method: 'GET',
|
|
827
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/lbs`,
|
|
828
|
+
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId])
|
|
829
|
+
}, unmarshalListLbsResponse);
|
|
926
830
|
|
|
927
831
|
/**
|
|
928
832
|
* List load balancers.
|
|
@@ -930,15 +834,7 @@ class API extends API$1 {
|
|
|
930
834
|
* @param request - The request {@link ListLbsRequest}
|
|
931
835
|
* @returns A Promise of ListLbsResponse
|
|
932
836
|
*/
|
|
933
|
-
listLbs = (
|
|
934
|
-
var _this13 = this;
|
|
935
|
-
return function (request) {
|
|
936
|
-
if (request === void 0) {
|
|
937
|
-
request = {};
|
|
938
|
-
}
|
|
939
|
-
return enrichForPagination('lbs', _this13.pageOfListLbs, request);
|
|
940
|
-
};
|
|
941
|
-
})();
|
|
837
|
+
listLbs = (request = {}) => enrichForPagination('lbs', this.pageOfListLbs, request);
|
|
942
838
|
|
|
943
839
|
/**
|
|
944
840
|
* Create a load balancer.
|
|
@@ -1009,19 +905,11 @@ class API extends API$1 {
|
|
|
1009
905
|
method: 'POST',
|
|
1010
906
|
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam('lbId', request.lbId)}/migrate`
|
|
1011
907
|
}, unmarshalLb);
|
|
1012
|
-
pageOfListIPs = (
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
}
|
|
1018
|
-
return _this14.client.fetch({
|
|
1019
|
-
method: 'GET',
|
|
1020
|
-
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? _this14.client.settings.defaultRegion)}/ips`,
|
|
1021
|
-
urlParams: urlParams(['ip_address', request.ipAddress], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this14.client.settings.defaultPageSize], ['project_id', request.projectId])
|
|
1022
|
-
}, unmarshalListIpsResponse);
|
|
1023
|
-
};
|
|
1024
|
-
})();
|
|
908
|
+
pageOfListIPs = (request = {}) => this.client.fetch({
|
|
909
|
+
method: 'GET',
|
|
910
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/ips`,
|
|
911
|
+
urlParams: urlParams(['ip_address', request.ipAddress], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId])
|
|
912
|
+
}, unmarshalListIpsResponse);
|
|
1025
913
|
|
|
1026
914
|
/**
|
|
1027
915
|
* List IPs.
|
|
@@ -1029,15 +917,7 @@ class API extends API$1 {
|
|
|
1029
917
|
* @param request - The request {@link ListIPsRequest}
|
|
1030
918
|
* @returns A Promise of ListIpsResponse
|
|
1031
919
|
*/
|
|
1032
|
-
listIPs = (
|
|
1033
|
-
var _this15 = this;
|
|
1034
|
-
return function (request) {
|
|
1035
|
-
if (request === void 0) {
|
|
1036
|
-
request = {};
|
|
1037
|
-
}
|
|
1038
|
-
return enrichForPagination('ips', _this15.pageOfListIPs, request);
|
|
1039
|
-
};
|
|
1040
|
-
})();
|
|
920
|
+
listIPs = (request = {}) => enrichForPagination('ips', this.pageOfListIPs, request);
|
|
1041
921
|
|
|
1042
922
|
/**
|
|
1043
923
|
* Create an IP.
|
|
@@ -1045,20 +925,12 @@ class API extends API$1 {
|
|
|
1045
925
|
* @param request - The request {@link CreateIpRequest}
|
|
1046
926
|
* @returns A Promise of Ip
|
|
1047
927
|
*/
|
|
1048
|
-
createIp = (
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
return _this16.client.fetch({
|
|
1055
|
-
body: JSON.stringify(marshalCreateIpRequest(request, _this16.client.settings)),
|
|
1056
|
-
headers: jsonContentHeaders,
|
|
1057
|
-
method: 'POST',
|
|
1058
|
-
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? _this16.client.settings.defaultRegion)}/ips`
|
|
1059
|
-
}, unmarshalIp);
|
|
1060
|
-
};
|
|
1061
|
-
})();
|
|
928
|
+
createIp = (request = {}) => this.client.fetch({
|
|
929
|
+
body: JSON.stringify(marshalCreateIpRequest(request, this.client.settings)),
|
|
930
|
+
headers: jsonContentHeaders,
|
|
931
|
+
method: 'POST',
|
|
932
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/ips`
|
|
933
|
+
}, unmarshalIp);
|
|
1062
934
|
|
|
1063
935
|
/**
|
|
1064
936
|
* Get an IP.
|
|
@@ -1265,19 +1137,11 @@ class API extends API$1 {
|
|
|
1265
1137
|
method: 'DELETE',
|
|
1266
1138
|
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/frontends/${validatePathParam('frontendId', request.frontendId)}`
|
|
1267
1139
|
});
|
|
1268
|
-
pageOfListRoutes = (
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
}
|
|
1274
|
-
return _this17.client.fetch({
|
|
1275
|
-
method: 'GET',
|
|
1276
|
-
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? _this17.client.settings.defaultRegion)}/routes`,
|
|
1277
|
-
urlParams: urlParams(['frontend_id', request.frontendId], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? _this17.client.settings.defaultPageSize])
|
|
1278
|
-
}, unmarshalListRoutesResponse);
|
|
1279
|
-
};
|
|
1280
|
-
})();
|
|
1140
|
+
pageOfListRoutes = (request = {}) => this.client.fetch({
|
|
1141
|
+
method: 'GET',
|
|
1142
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/routes`,
|
|
1143
|
+
urlParams: urlParams(['frontend_id', request.frontendId], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
1144
|
+
}, unmarshalListRoutesResponse);
|
|
1281
1145
|
|
|
1282
1146
|
/**
|
|
1283
1147
|
* List all backend redirections.
|
|
@@ -1285,15 +1149,7 @@ class API extends API$1 {
|
|
|
1285
1149
|
* @param request - The request {@link ListRoutesRequest}
|
|
1286
1150
|
* @returns A Promise of ListRoutesResponse
|
|
1287
1151
|
*/
|
|
1288
|
-
listRoutes = (
|
|
1289
|
-
var _this18 = this;
|
|
1290
|
-
return function (request) {
|
|
1291
|
-
if (request === void 0) {
|
|
1292
|
-
request = {};
|
|
1293
|
-
}
|
|
1294
|
-
return enrichForPagination('routes', _this18.pageOfListRoutes, request);
|
|
1295
|
-
};
|
|
1296
|
-
})();
|
|
1152
|
+
listRoutes = (request = {}) => enrichForPagination('routes', this.pageOfListRoutes, request);
|
|
1297
1153
|
|
|
1298
1154
|
/**
|
|
1299
1155
|
* Create a backend redirection.
|
|
@@ -1497,19 +1353,11 @@ class API extends API$1 {
|
|
|
1497
1353
|
method: 'DELETE',
|
|
1498
1354
|
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/certificates/${validatePathParam('certificateId', request.certificateId)}`
|
|
1499
1355
|
});
|
|
1500
|
-
pageOfListLbTypes = (
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
}
|
|
1506
|
-
return _this19.client.fetch({
|
|
1507
|
-
method: 'GET',
|
|
1508
|
-
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? _this19.client.settings.defaultRegion)}/lb-types`,
|
|
1509
|
-
urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ?? _this19.client.settings.defaultPageSize])
|
|
1510
|
-
}, unmarshalListLbTypesResponse);
|
|
1511
|
-
};
|
|
1512
|
-
})();
|
|
1356
|
+
pageOfListLbTypes = (request = {}) => this.client.fetch({
|
|
1357
|
+
method: 'GET',
|
|
1358
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/lb-types`,
|
|
1359
|
+
urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
1360
|
+
}, unmarshalListLbTypesResponse);
|
|
1513
1361
|
|
|
1514
1362
|
/**
|
|
1515
1363
|
* List all load balancer offer type.
|
|
@@ -1517,15 +1365,7 @@ class API extends API$1 {
|
|
|
1517
1365
|
* @param request - The request {@link ListLbTypesRequest}
|
|
1518
1366
|
* @returns A Promise of ListLbTypesResponse
|
|
1519
1367
|
*/
|
|
1520
|
-
listLbTypes = (
|
|
1521
|
-
var _this20 = this;
|
|
1522
|
-
return function (request) {
|
|
1523
|
-
if (request === void 0) {
|
|
1524
|
-
request = {};
|
|
1525
|
-
}
|
|
1526
|
-
return enrichForPagination('lbTypes', _this20.pageOfListLbTypes, request);
|
|
1527
|
-
};
|
|
1528
|
-
})();
|
|
1368
|
+
listLbTypes = (request = {}) => enrichForPagination('lbTypes', this.pageOfListLbTypes, request);
|
|
1529
1369
|
|
|
1530
1370
|
/**
|
|
1531
1371
|
* Create a subscriber, webhook or email.
|
|
@@ -1550,19 +1390,11 @@ class API extends API$1 {
|
|
|
1550
1390
|
method: 'GET',
|
|
1551
1391
|
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/subscribers/${validatePathParam('subscriberId', request.subscriberId)}`
|
|
1552
1392
|
}, unmarshalSubscriber);
|
|
1553
|
-
pageOfListSubscriber = (
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
}
|
|
1559
|
-
return _this21.client.fetch({
|
|
1560
|
-
method: 'GET',
|
|
1561
|
-
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? _this21.client.settings.defaultRegion)}/subscribers`,
|
|
1562
|
-
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this21.client.settings.defaultPageSize], ['project_id', request.projectId])
|
|
1563
|
-
}, unmarshalListSubscriberResponse);
|
|
1564
|
-
};
|
|
1565
|
-
})();
|
|
1393
|
+
pageOfListSubscriber = (request = {}) => this.client.fetch({
|
|
1394
|
+
method: 'GET',
|
|
1395
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/subscribers`,
|
|
1396
|
+
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId])
|
|
1397
|
+
}, unmarshalListSubscriberResponse);
|
|
1566
1398
|
|
|
1567
1399
|
/**
|
|
1568
1400
|
* List all subscriber.
|
|
@@ -1570,15 +1402,7 @@ class API extends API$1 {
|
|
|
1570
1402
|
* @param request - The request {@link ListSubscriberRequest}
|
|
1571
1403
|
* @returns A Promise of ListSubscriberResponse
|
|
1572
1404
|
*/
|
|
1573
|
-
listSubscriber = (
|
|
1574
|
-
var _this22 = this;
|
|
1575
|
-
return function (request) {
|
|
1576
|
-
if (request === void 0) {
|
|
1577
|
-
request = {};
|
|
1578
|
-
}
|
|
1579
|
-
return enrichForPagination('subscribers', _this22.pageOfListSubscriber, request);
|
|
1580
|
-
};
|
|
1581
|
-
})();
|
|
1405
|
+
listSubscriber = (request = {}) => enrichForPagination('subscribers', this.pageOfListSubscriber, request);
|
|
1582
1406
|
|
|
1583
1407
|
/**
|
|
1584
1408
|
* Update a subscriber.
|
|
@@ -1,25 +1,17 @@
|
|
|
1
1
|
import { API as API$1 } from '../../../scw/api.js';
|
|
2
2
|
import { urlParams, validatePathParam } from '../../../helpers/marshalling.js';
|
|
3
3
|
import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
|
|
4
|
-
import { unmarshalListImagesResponse, unmarshalGetImageResponse
|
|
4
|
+
import { unmarshalListImagesResponse, unmarshalGetImageResponse } from './marshalling.gen.js';
|
|
5
5
|
|
|
6
6
|
// This file was automatically generated. DO NOT EDIT.
|
|
7
7
|
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
8
8
|
/** Marketplace API. */
|
|
9
9
|
class API extends API$1 {
|
|
10
|
-
pageOfListImages = (
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
return _this.client.fetch({
|
|
17
|
-
method: 'GET',
|
|
18
|
-
path: `/marketplace/v1/images`,
|
|
19
|
-
urlParams: urlParams(['page', request.page], ['per_page', request.perPage ?? _this.client.settings.defaultPageSize])
|
|
20
|
-
}, unmarshalListImagesResponse);
|
|
21
|
-
};
|
|
22
|
-
})();
|
|
10
|
+
pageOfListImages = (request = {}) => this.client.fetch({
|
|
11
|
+
method: 'GET',
|
|
12
|
+
path: `/marketplace/v1/images`,
|
|
13
|
+
urlParams: urlParams(['page', request.page], ['per_page', request.perPage ?? this.client.settings.defaultPageSize])
|
|
14
|
+
}, unmarshalListImagesResponse);
|
|
23
15
|
|
|
24
16
|
/**
|
|
25
17
|
* List marketplace images.
|
|
@@ -27,15 +19,7 @@ class API extends API$1 {
|
|
|
27
19
|
* @param request - The request {@link ListImagesRequest}
|
|
28
20
|
* @returns A Promise of ListImagesResponse
|
|
29
21
|
*/
|
|
30
|
-
listImages = (
|
|
31
|
-
var _this2 = this;
|
|
32
|
-
return function (request) {
|
|
33
|
-
if (request === void 0) {
|
|
34
|
-
request = {};
|
|
35
|
-
}
|
|
36
|
-
return enrichForPagination('images', _this2.pageOfListImages, request);
|
|
37
|
-
};
|
|
38
|
-
})();
|
|
22
|
+
listImages = (request = {}) => enrichForPagination('images', this.pageOfListImages, request);
|
|
39
23
|
|
|
40
24
|
/**
|
|
41
25
|
* Get a specific marketplace image.
|
|
@@ -47,14 +31,6 @@ class API extends API$1 {
|
|
|
47
31
|
method: 'GET',
|
|
48
32
|
path: `/marketplace/v1/images/${validatePathParam('imageId', request.imageId)}`
|
|
49
33
|
}, unmarshalGetImageResponse);
|
|
50
|
-
listVersions = request => this.client.fetch({
|
|
51
|
-
method: 'GET',
|
|
52
|
-
path: `/marketplace/v1/images/${validatePathParam('imageId', request.imageId)}/versions`
|
|
53
|
-
}, unmarshalListVersionsResponse);
|
|
54
|
-
getVersion = request => this.client.fetch({
|
|
55
|
-
method: 'GET',
|
|
56
|
-
path: `/marketplace/v1/images/${validatePathParam('imageId', request.imageId)}/versions/${validatePathParam('versionId', request.versionId)}`
|
|
57
|
-
}, unmarshalGetVersionResponse);
|
|
58
34
|
}
|
|
59
35
|
|
|
60
36
|
export { API };
|
|
@@ -62,14 +62,6 @@ const unmarshalGetImageResponse = data => {
|
|
|
62
62
|
image: data.image ? unmarshalImage(data.image) : undefined
|
|
63
63
|
};
|
|
64
64
|
};
|
|
65
|
-
const unmarshalGetVersionResponse = data => {
|
|
66
|
-
if (!isJSONObject(data)) {
|
|
67
|
-
throw new TypeError(`Unmarshalling the type 'GetVersionResponse' failed as data isn't a dictionary.`);
|
|
68
|
-
}
|
|
69
|
-
return {
|
|
70
|
-
version: data.version ? unmarshalVersion(data.version) : undefined
|
|
71
|
-
};
|
|
72
|
-
};
|
|
73
65
|
const unmarshalListImagesResponse = data => {
|
|
74
66
|
if (!isJSONObject(data)) {
|
|
75
67
|
throw new TypeError(`Unmarshalling the type 'ListImagesResponse' failed as data isn't a dictionary.`);
|
|
@@ -79,14 +71,5 @@ const unmarshalListImagesResponse = data => {
|
|
|
79
71
|
totalCount: data.total_count
|
|
80
72
|
};
|
|
81
73
|
};
|
|
82
|
-
const unmarshalListVersionsResponse = data => {
|
|
83
|
-
if (!isJSONObject(data)) {
|
|
84
|
-
throw new TypeError(`Unmarshalling the type 'ListVersionsResponse' failed as data isn't a dictionary.`);
|
|
85
|
-
}
|
|
86
|
-
return {
|
|
87
|
-
totalCount: data.total_count,
|
|
88
|
-
versions: unmarshalArrayOfObject(data.versions, unmarshalVersion)
|
|
89
|
-
};
|
|
90
|
-
};
|
|
91
74
|
|
|
92
|
-
export { unmarshalGetImageResponse,
|
|
75
|
+
export { unmarshalGetImageResponse, unmarshalListImagesResponse };
|