@scaleway/sdk 2.34.0 → 2.36.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/baremetal/v1/api.gen.d.ts +1 -1
- package/dist/api/block/v1alpha1/api.gen.d.ts +1 -1
- package/dist/api/cockpit/v1/api.gen.cjs +26 -0
- package/dist/api/cockpit/v1/api.gen.d.ts +12 -1
- package/dist/api/cockpit/v1/api.gen.js +27 -1
- package/dist/api/cockpit/v1/index.gen.d.ts +1 -1
- package/dist/api/cockpit/v1/marshalling.gen.cjs +26 -0
- package/dist/api/cockpit/v1/marshalling.gen.d.ts +2 -1
- package/dist/api/cockpit/v1/marshalling.gen.js +26 -0
- package/dist/api/cockpit/v1/types.gen.d.ts +34 -0
- package/dist/api/cockpit/v1/validation-rules.gen.cjs +10 -0
- package/dist/api/cockpit/v1/validation-rules.gen.d.ts +9 -0
- package/dist/api/cockpit/v1/validation-rules.gen.js +10 -0
- package/dist/api/container/v1beta1/index.gen.d.ts +1 -1
- package/dist/api/container/v1beta1/marshalling.gen.cjs +3 -0
- package/dist/api/container/v1beta1/marshalling.gen.js +3 -0
- package/dist/api/container/v1beta1/types.gen.d.ts +7 -0
- package/dist/api/function/v1beta1/index.gen.d.ts +1 -1
- package/dist/api/function/v1beta1/marshalling.gen.cjs +3 -0
- package/dist/api/function/v1beta1/marshalling.gen.js +3 -0
- package/dist/api/function/v1beta1/types.gen.d.ts +8 -1
- package/dist/api/inference/v1beta1/api.gen.d.ts +151 -0
- package/dist/api/inference/v1beta1/content.gen.d.ts +3 -0
- package/dist/api/inference/v1beta1/index.gen.d.ts +4 -0
- package/dist/api/inference/v1beta1/marshalling.gen.d.ts +18 -0
- package/dist/api/inference/v1beta1/types.gen.d.ts +435 -0
- package/dist/api/inference/v1beta1/validation-rules.gen.d.ts +50 -0
- package/dist/api/instance/v1/api.utils.cjs +1 -2
- package/dist/api/instance/v1/api.utils.js +1 -2
- package/dist/api/secret/v1beta1/api.gen.cjs +25 -0
- package/dist/api/secret/v1beta1/api.gen.d.ts +12 -1
- package/dist/api/secret/v1beta1/api.gen.js +26 -1
- package/dist/api/secret/v1beta1/index.gen.d.ts +1 -1
- package/dist/api/secret/v1beta1/marshalling.gen.cjs +12 -0
- package/dist/api/secret/v1beta1/marshalling.gen.d.ts +2 -1
- package/dist/api/secret/v1beta1/marshalling.gen.js +12 -0
- package/dist/api/secret/v1beta1/types.gen.d.ts +17 -0
- package/dist/api/tem/v1alpha1/marshalling.gen.cjs +1 -1
- package/dist/api/tem/v1alpha1/marshalling.gen.js +1 -1
- package/dist/api/tem/v1alpha1/types.gen.d.ts +1 -1
- package/dist/api/tem/v1alpha1/validation-rules.gen.cjs +64 -0
- package/dist/api/tem/v1alpha1/validation-rules.gen.d.ts +57 -0
- package/dist/api/tem/v1alpha1/validation-rules.gen.js +64 -0
- package/dist/helpers/marshalling.cjs +2 -4
- package/dist/helpers/marshalling.js +2 -4
- package/dist/internal/async/interval-retrier.cjs +2 -4
- package/dist/internal/async/interval-retrier.js +2 -4
- package/dist/scw/auth.cjs +2 -4
- package/dist/scw/auth.js +2 -4
- package/dist/scw/constants.cjs +1 -1
- package/dist/scw/constants.d.ts +2 -2
- package/dist/scw/constants.js +1 -1
- package/dist/scw/errors/standard/invalid-arguments-error.cjs +1 -2
- package/dist/scw/errors/standard/invalid-arguments-error.js +1 -2
- package/dist/scw/errors/standard/out-of-stock-error.cjs +1 -2
- package/dist/scw/errors/standard/out-of-stock-error.js +1 -2
- package/dist/scw/errors/standard/permissions-denied-error.cjs +1 -2
- package/dist/scw/errors/standard/permissions-denied-error.js +1 -2
- package/dist/scw/errors/standard/quotas-exceeded-error.cjs +1 -2
- package/dist/scw/errors/standard/quotas-exceeded-error.js +1 -2
- package/dist/scw/errors/standard/too-many-requests-error.cjs +1 -2
- package/dist/scw/errors/standard/too-many-requests-error.js +1 -2
- package/dist/scw/fetch/resource-paginator.cjs +1 -2
- package/dist/scw/fetch/resource-paginator.js +1 -2
- package/dist/scw/fetch/response-parser.cjs +2 -4
- package/dist/scw/fetch/response-parser.js +2 -4
- package/package.json +2 -2
|
@@ -12,8 +12,7 @@ function* pages(key, fetcher, request, firstPage) {
|
|
|
12
12
|
page += 1;
|
|
13
13
|
}
|
|
14
14
|
const { length } = firstPage[key];
|
|
15
|
-
if (!length)
|
|
16
|
-
return;
|
|
15
|
+
if (!length) return;
|
|
17
16
|
const { totalCount } = firstPage;
|
|
18
17
|
while (page <= Math.floor((totalCount + length - 1) / length)) {
|
|
19
18
|
yield fetcher({ ...request, page }).then(getList);
|
|
@@ -10,8 +10,7 @@ function* pages(key, fetcher, request, firstPage) {
|
|
|
10
10
|
page += 1;
|
|
11
11
|
}
|
|
12
12
|
const { length } = firstPage[key];
|
|
13
|
-
if (!length)
|
|
14
|
-
return;
|
|
13
|
+
if (!length) return;
|
|
15
14
|
const { totalCount } = firstPage;
|
|
16
15
|
while (page <= Math.floor((totalCount + length - 1) / length)) {
|
|
17
16
|
yield fetcher({ ...request, page }).then(getList);
|
|
@@ -25,8 +25,7 @@ const responseParser = (unmarshaller, responseType) => async (response) => {
|
|
|
25
25
|
throw new TypeError("Invalid response object");
|
|
26
26
|
}
|
|
27
27
|
if (response.ok) {
|
|
28
|
-
if (response.status === 204)
|
|
29
|
-
return unmarshaller(void 0);
|
|
28
|
+
if (response.status === 204) return unmarshaller(void 0);
|
|
30
29
|
const contentType = response.headers.get("Content-Type");
|
|
31
30
|
try {
|
|
32
31
|
if (responseType === "json" && contentType === "application/json") {
|
|
@@ -46,8 +45,7 @@ const responseParser = (unmarshaller, responseType) => async (response) => {
|
|
|
46
45
|
}
|
|
47
46
|
}
|
|
48
47
|
const error = await response.clone().json().catch(() => response.text());
|
|
49
|
-
if (json.isJSONObject(error))
|
|
50
|
-
throw errorParser.parseScalewayError(response.status, error);
|
|
48
|
+
if (json.isJSONObject(error)) throw errorParser.parseScalewayError(response.status, error);
|
|
51
49
|
throw new scwError.ScalewayError(
|
|
52
50
|
response.status,
|
|
53
51
|
typeof error === "string" ? error : "cannot read error response body"
|
|
@@ -23,8 +23,7 @@ const responseParser = (unmarshaller, responseType) => async (response) => {
|
|
|
23
23
|
throw new TypeError("Invalid response object");
|
|
24
24
|
}
|
|
25
25
|
if (response.ok) {
|
|
26
|
-
if (response.status === 204)
|
|
27
|
-
return unmarshaller(void 0);
|
|
26
|
+
if (response.status === 204) return unmarshaller(void 0);
|
|
28
27
|
const contentType = response.headers.get("Content-Type");
|
|
29
28
|
try {
|
|
30
29
|
if (responseType === "json" && contentType === "application/json") {
|
|
@@ -44,8 +43,7 @@ const responseParser = (unmarshaller, responseType) => async (response) => {
|
|
|
44
43
|
}
|
|
45
44
|
}
|
|
46
45
|
const error = await response.clone().json().catch(() => response.text());
|
|
47
|
-
if (isJSONObject(error))
|
|
48
|
-
throw parseScalewayError(response.status, error);
|
|
46
|
+
if (isJSONObject(error)) throw parseScalewayError(response.status, error);
|
|
49
47
|
throw new ScalewayError(
|
|
50
48
|
response.status,
|
|
51
49
|
typeof error === "string" ? error : "cannot read error response body"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.36.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Scaleway SDK.",
|
|
6
6
|
"keywords": [
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"bundledDependencies": [
|
|
40
40
|
"@scaleway/random-name"
|
|
41
41
|
],
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "a911ac4c87debbc8605ce5f33dca19b1ad39c589"
|
|
43
43
|
}
|