@scaleway/sdk 1.13.0 → 1.15.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 +77 -60
- package/dist/api/applesilicon/v1alpha1/api.gen.js +175 -173
- package/dist/api/baremetal/v1/api.gen.js +434 -378
- package/dist/api/baremetal/v1/api.utils.js +19 -22
- package/dist/api/billing/v2alpha1/api.gen.js +21 -17
- package/dist/api/cockpit/v1beta1/api.gen.js +308 -232
- package/dist/api/container/v1beta1/api.gen.js +384 -337
- package/dist/api/domain/v2beta1/api.gen.js +754 -668
- package/dist/api/flexibleip/v1alpha1/api.gen.js +164 -151
- package/dist/api/function/v1beta1/api.gen.js +467 -407
- package/dist/api/iam/v1alpha1/api.gen.js +641 -557
- package/dist/api/instance/v1/api.gen.js +802 -677
- package/dist/api/instance/v1/api.utils.js +337 -325
- package/dist/api/instance/v1/marshalling.gen.js +2 -1
- package/dist/api/iot/v1/api.gen.js +508 -452
- package/dist/api/ipfs/index.js +2 -0
- package/dist/api/ipfs/v1alpha1/api.gen.js +197 -0
- package/dist/api/ipfs/v1alpha1/content.gen.js +7 -0
- package/dist/api/ipfs/v1alpha1/index.gen.js +5 -0
- package/dist/api/ipfs/v1alpha1/marshalling.gen.js +125 -0
- package/dist/api/k8s/v1/api.gen.js +403 -342
- package/dist/api/k8s/v1/api.utils.js +7 -10
- package/dist/api/k8s/v1/marshalling.gen.js +19 -1
- package/dist/api/k8s/v1/validation-rules.gen.js +10 -1
- package/dist/api/lb/v1/api.gen.js +1501 -1363
- package/dist/api/lb/v1/api.utils.js +71 -75
- package/dist/api/lb/v1/marshalling.gen.js +6 -0
- package/dist/api/marketplace/v1/api.gen.js +35 -32
- package/dist/api/marketplace/v2/api.gen.js +117 -102
- package/dist/api/mnq/v1alpha1/api.gen.js +154 -137
- package/dist/api/rdb/v1/api.gen.js +897 -819
- package/dist/api/redis/v1/api.gen.js +358 -333
- package/dist/api/registry/v1/api.gen.js +211 -189
- package/dist/api/secret/v1alpha1/api.gen.js +265 -245
- package/dist/api/secret/v1alpha1/marshalling.gen.js +1 -0
- package/dist/api/tem/v1alpha1/api.gen.js +183 -156
- package/dist/api/tem/v1alpha1/marshalling.gen.js +32 -1
- package/dist/api/test/v1/api.gen.js +116 -104
- package/dist/api/vpc/v1/api.gen.js +74 -65
- package/dist/api/vpc/v2/api.gen.js +200 -178
- package/dist/api/vpc/v2/marshalling.gen.js +2 -0
- package/dist/api/vpcgw/v1/api.gen.js +575 -501
- package/dist/api/webhosting/v1alpha1/api.gen.js +127 -117
- package/dist/index.cjs +738 -343
- package/dist/index.d.ts +2067 -1592
- package/dist/index.js +28 -26
- package/dist/internal/logger/console-logger.js +4 -5
- package/dist/scw/constants.js +1 -1
- package/dist/scw/errors/scw-error.js +0 -1
- package/package.json +2 -2
|
@@ -3,28 +3,25 @@ import { API } from './api.gen.js';
|
|
|
3
3
|
import { SERVER_INSTALL_TRANSIENT_STATUSES } from './content.gen.js';
|
|
4
4
|
|
|
5
5
|
class BaremetalV1UtilsAPI extends API {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
};
|
|
26
|
-
}, createExponentialBackoffStrategy(options?.minDelay ?? 1, options?.maxDelay ?? 30), options?.timeout);
|
|
27
|
-
}
|
|
6
|
+
/**
|
|
7
|
+
* Waits for {@link ServerInstall} to be in a final state.
|
|
8
|
+
*
|
|
9
|
+
* @param request - The request {@link GetServerRequest}
|
|
10
|
+
* @param options - The waiting options
|
|
11
|
+
* @returns A Promise of ServerInstall
|
|
12
|
+
*/
|
|
13
|
+
waitForServerInstall = (request, options) => tryAtIntervals(async () => {
|
|
14
|
+
const value = await this.getServer(request).then(server => {
|
|
15
|
+
if (!server.install) {
|
|
16
|
+
throw new Error(`Server creation has not begun for server ${request.serverId}`);
|
|
17
|
+
}
|
|
18
|
+
return server.install;
|
|
19
|
+
});
|
|
20
|
+
return {
|
|
21
|
+
done: !SERVER_INSTALL_TRANSIENT_STATUSES.includes(value.status),
|
|
22
|
+
value
|
|
23
|
+
};
|
|
24
|
+
}, createExponentialBackoffStrategy(options?.minDelay ?? 1, options?.maxDelay ?? 30), options?.timeout);
|
|
28
25
|
}
|
|
29
26
|
|
|
30
27
|
export { BaremetalV1UtilsAPI };
|
|
@@ -11,11 +11,9 @@ import { unmarshalGetConsumptionResponse, unmarshalListInvoicesResponse } from '
|
|
|
11
11
|
* This API allows you to query your consumption. Billing API.
|
|
12
12
|
*/
|
|
13
13
|
class API extends API$1 {
|
|
14
|
-
|
|
15
|
-
var _this;
|
|
16
|
-
|
|
17
|
-
_this = this;
|
|
18
|
-
this.getConsumption = function (request) {
|
|
14
|
+
getConsumption = (() => {
|
|
15
|
+
var _this = this;
|
|
16
|
+
return function (request) {
|
|
19
17
|
if (request === void 0) {
|
|
20
18
|
request = {};
|
|
21
19
|
}
|
|
@@ -25,29 +23,35 @@ class API extends API$1 {
|
|
|
25
23
|
urlParams: urlParams(['organization_id', request.organizationId ?? _this.client.settings.defaultOrganizationId])
|
|
26
24
|
}, unmarshalGetConsumptionResponse);
|
|
27
25
|
};
|
|
28
|
-
|
|
26
|
+
})();
|
|
27
|
+
pageOfListInvoices = (() => {
|
|
28
|
+
var _this2 = this;
|
|
29
|
+
return function (request) {
|
|
29
30
|
if (request === void 0) {
|
|
30
31
|
request = {};
|
|
31
32
|
}
|
|
32
|
-
return
|
|
33
|
+
return _this2.client.fetch({
|
|
33
34
|
method: 'GET',
|
|
34
35
|
path: `/billing/v2alpha1/invoices`,
|
|
35
|
-
urlParams: urlParams(['invoice_type', request.invoiceType ?? 'unknown_type'], ['order_by', request.orderBy ?? 'invoice_number_desc'], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ??
|
|
36
|
+
urlParams: urlParams(['invoice_type', request.invoiceType ?? 'unknown_type'], ['order_by', request.orderBy ?? 'invoice_number_desc'], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this2.client.settings.defaultPageSize], ['started_after', request.startedAfter], ['started_before', request.startedBefore])
|
|
36
37
|
}, unmarshalListInvoicesResponse);
|
|
37
38
|
};
|
|
38
|
-
|
|
39
|
+
})();
|
|
40
|
+
listInvoices = (() => {
|
|
41
|
+
var _this3 = this;
|
|
42
|
+
return function (request) {
|
|
39
43
|
if (request === void 0) {
|
|
40
44
|
request = {};
|
|
41
45
|
}
|
|
42
|
-
return enrichForPagination('invoices',
|
|
46
|
+
return enrichForPagination('invoices', _this3.pageOfListInvoices, request);
|
|
43
47
|
};
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
48
|
+
})();
|
|
49
|
+
downloadInvoice = request => this.client.fetch({
|
|
50
|
+
method: 'GET',
|
|
51
|
+
path: `/billing/v2alpha1/invoices/${validatePathParam('invoiceId', request.invoiceId)}/download`,
|
|
52
|
+
urlParams: urlParams(['dl', 1], ['file_type', request.fileType ?? 'pdf']),
|
|
53
|
+
responseType: 'blob'
|
|
54
|
+
});
|
|
51
55
|
}
|
|
52
56
|
|
|
53
57
|
export { API };
|