@scaleway/sdk 2.43.0 → 2.44.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/billing/v2beta1/api.gen.d.ts +4 -28
- package/dist/api/block/v1alpha1/api.gen.cjs +1 -0
- package/dist/api/block/v1alpha1/api.gen.js +1 -0
- package/dist/api/serverless_sqldb/v1alpha1/marshalling.gen.cjs +1 -0
- package/dist/api/serverless_sqldb/v1alpha1/marshalling.gen.js +1 -0
- package/dist/api/serverless_sqldb/v1alpha1/types.gen.d.ts +3 -1
- package/dist/helpers/marshalling.d.ts +1 -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/fetch/resource-paginator.d.ts +3 -3
- package/dist/scw/fetch/response-parser.d.ts +1 -1
- package/package.json +2 -2
|
@@ -17,13 +17,7 @@ export declare class API extends ParentAPI {
|
|
|
17
17
|
*/
|
|
18
18
|
listConsumptions: (request?: Readonly<ListConsumptionsRequest>) => Promise<ListConsumptionsResponse> & {
|
|
19
19
|
all: () => Promise<import("./types.gen").ListConsumptionsResponseConsumption[]>;
|
|
20
|
-
[Symbol.asyncIterator]: () => AsyncGenerator<import("./types.gen").ListConsumptionsResponseConsumption[], void, void>;
|
|
21
|
-
* Get monthly consumption taxes. Consumption Tax allows you to retrieve your
|
|
22
|
-
* past or current tax charges, by project or category.
|
|
23
|
-
*
|
|
24
|
-
* @param request - The request {@link ListTaxesRequest}
|
|
25
|
-
* @returns A Promise of ListTaxesResponse
|
|
26
|
-
*/
|
|
20
|
+
[Symbol.asyncIterator]: () => AsyncGenerator<import("./types.gen").ListConsumptionsResponseConsumption[], void, void>;
|
|
27
21
|
};
|
|
28
22
|
protected pageOfListTaxes: (request?: Readonly<ListTaxesRequest>) => Promise<ListTaxesResponse>;
|
|
29
23
|
/**
|
|
@@ -35,13 +29,7 @@ export declare class API extends ParentAPI {
|
|
|
35
29
|
*/
|
|
36
30
|
listTaxes: (request?: Readonly<ListTaxesRequest>) => Promise<ListTaxesResponse> & {
|
|
37
31
|
all: () => Promise<import("./types.gen").ListTaxesResponseTax[]>;
|
|
38
|
-
[Symbol.asyncIterator]: () => AsyncGenerator<import("./types.gen").ListTaxesResponseTax[], void, void>;
|
|
39
|
-
* Get monthly consumption taxes. Consumption Tax allows you to retrieve your
|
|
40
|
-
* past or current tax charges, by project or category.
|
|
41
|
-
*
|
|
42
|
-
* @param request - The request {@link ListTaxesRequest}
|
|
43
|
-
* @returns A Promise of ListTaxesResponse
|
|
44
|
-
*/
|
|
32
|
+
[Symbol.asyncIterator]: () => AsyncGenerator<import("./types.gen").ListTaxesResponseTax[], void, void>;
|
|
45
33
|
};
|
|
46
34
|
protected pageOfListInvoices: (request?: Readonly<ListInvoicesRequest>) => Promise<ListInvoicesResponse>;
|
|
47
35
|
/**
|
|
@@ -53,13 +41,7 @@ export declare class API extends ParentAPI {
|
|
|
53
41
|
*/
|
|
54
42
|
listInvoices: (request?: Readonly<ListInvoicesRequest>) => Promise<ListInvoicesResponse> & {
|
|
55
43
|
all: () => Promise<Invoice[]>;
|
|
56
|
-
[Symbol.asyncIterator]: () => AsyncGenerator<Invoice[], void, void>;
|
|
57
|
-
* Get monthly consumption taxes. Consumption Tax allows you to retrieve your
|
|
58
|
-
* past or current tax charges, by project or category.
|
|
59
|
-
*
|
|
60
|
-
* @param request - The request {@link ListTaxesRequest}
|
|
61
|
-
* @returns A Promise of ListTaxesResponse
|
|
62
|
-
*/
|
|
44
|
+
[Symbol.asyncIterator]: () => AsyncGenerator<Invoice[], void, void>;
|
|
63
45
|
};
|
|
64
46
|
/**
|
|
65
47
|
* Export invoices. Export invoices in a CSV file.
|
|
@@ -93,12 +75,6 @@ export declare class API extends ParentAPI {
|
|
|
93
75
|
*/
|
|
94
76
|
listDiscounts: (request?: Readonly<ListDiscountsRequest>) => Promise<ListDiscountsResponse> & {
|
|
95
77
|
all: () => Promise<import("./types.gen").Discount[]>;
|
|
96
|
-
[Symbol.asyncIterator]: () => AsyncGenerator<import("./types.gen").Discount[], void, void>;
|
|
97
|
-
* Get monthly consumption taxes. Consumption Tax allows you to retrieve your
|
|
98
|
-
* past or current tax charges, by project or category.
|
|
99
|
-
*
|
|
100
|
-
* @param request - The request {@link ListTaxesRequest}
|
|
101
|
-
* @returns A Promise of ListTaxesResponse
|
|
102
|
-
*/
|
|
78
|
+
[Symbol.asyncIterator]: () => AsyncGenerator<import("./types.gen").Discount[], void, void>;
|
|
103
79
|
};
|
|
104
80
|
}
|
|
@@ -12,6 +12,7 @@ const unmarshalDatabaseBackup = (data) => {
|
|
|
12
12
|
return {
|
|
13
13
|
createdAt: marshalling.unmarshalDate(data.created_at),
|
|
14
14
|
databaseId: data.database_id,
|
|
15
|
+
dbSize: data.db_size,
|
|
15
16
|
downloadUrl: data.download_url,
|
|
16
17
|
downloadUrlExpiresAt: marshalling.unmarshalDate(data.download_url_expires_at),
|
|
17
18
|
expiresAt: marshalling.unmarshalDate(data.expires_at),
|
|
@@ -10,6 +10,7 @@ const unmarshalDatabaseBackup = (data) => {
|
|
|
10
10
|
return {
|
|
11
11
|
createdAt: unmarshalDate(data.created_at),
|
|
12
12
|
databaseId: data.database_id,
|
|
13
|
+
dbSize: data.db_size,
|
|
13
14
|
downloadUrl: data.download_url,
|
|
14
15
|
downloadUrlExpiresAt: unmarshalDate(data.download_url_expires_at),
|
|
15
16
|
expiresAt: unmarshalDate(data.expires_at),
|
|
@@ -21,8 +21,10 @@ export interface DatabaseBackup {
|
|
|
21
21
|
createdAt?: Date;
|
|
22
22
|
/** Expiration date. */
|
|
23
23
|
expiresAt?: Date;
|
|
24
|
-
/** Size of the database backup. */
|
|
24
|
+
/** Size (in bytes) of the database backup file. */
|
|
25
25
|
size?: number;
|
|
26
|
+
/** Size (in bytes) of the database when backup has been done. */
|
|
27
|
+
dbSize?: number;
|
|
26
28
|
/** Download URL of the exported database backup. */
|
|
27
29
|
downloadUrl?: string;
|
|
28
30
|
/** Expiration date of the download URL. */
|
|
@@ -38,10 +38,7 @@ type URLParameterValue = string | number | boolean | Date | null;
|
|
|
38
38
|
*
|
|
39
39
|
* @internal
|
|
40
40
|
*/
|
|
41
|
-
export declare const urlParams: (...paramTuples: Readonly<[
|
|
42
|
-
string,
|
|
43
|
-
URLParameterValue | URLParameterValue[] | undefined
|
|
44
|
-
]>[]) => URLSearchParams;
|
|
41
|
+
export declare const urlParams: (...paramTuples: Readonly<[string, URLParameterValue | URLParameterValue[] | undefined]>[]) => URLSearchParams;
|
|
45
42
|
/**
|
|
46
43
|
* Unmarshals data to Date object.
|
|
47
44
|
*
|
package/dist/scw/constants.cjs
CHANGED
package/dist/scw/constants.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "v2.
|
|
2
|
-
export declare const userAgent = "scaleway-sdk-js/v2.
|
|
1
|
+
export declare const version = "v2.43.0";
|
|
2
|
+
export declare const userAgent = "scaleway-sdk-js/v2.43.0";
|
package/dist/scw/constants.js
CHANGED
|
@@ -9,7 +9,7 @@ export type PaginatedFetcher<T, R extends PaginationOptions = PaginationOptions>
|
|
|
9
9
|
export type PaginatedContent<K extends string, T = unknown> = PaginatedResponse & {
|
|
10
10
|
[key in K]: T[];
|
|
11
11
|
};
|
|
12
|
-
export declare const extract: <K extends string>(key: K) => <T extends PaginatedContent<K
|
|
12
|
+
export declare const extract: <K extends string>(key: K) => <T extends PaginatedContent<K>>(result: T) => T[K];
|
|
13
13
|
/**
|
|
14
14
|
* Fetches a paginated resource.
|
|
15
15
|
*
|
|
@@ -29,7 +29,7 @@ export declare function fetchPaginated<K extends string, T extends PaginatedCont
|
|
|
29
29
|
* @param initial - The first page
|
|
30
30
|
* @returns A resources array Promise
|
|
31
31
|
*/
|
|
32
|
-
export declare const fetchAll: <K extends string, T extends PaginatedContent<K
|
|
32
|
+
export declare const fetchAll: <K extends string, T extends PaginatedContent<K>, R extends PaginationOptions>(key: K, fetcher: PaginatedFetcher<T, R>, request: R, initial?: Promise<T>) => Promise<(Awaited<T[K]> extends infer T_1 ? T_1 extends Awaited<T[K]> ? T_1 extends readonly (infer InnerArr)[] ? InnerArr : T_1 : never : never)[]>;
|
|
33
33
|
/**
|
|
34
34
|
* Enriches a listing method with helpers.
|
|
35
35
|
*
|
|
@@ -40,7 +40,7 @@ export declare const fetchAll: <K extends string, T extends PaginatedContent<K,
|
|
|
40
40
|
*
|
|
41
41
|
* @internal
|
|
42
42
|
*/
|
|
43
|
-
export declare const enrichForPagination: <K extends string, T extends PaginatedContent<K
|
|
43
|
+
export declare const enrichForPagination: <K extends string, T extends PaginatedContent<K>, R extends PaginationOptions>(key: K, fetcher: PaginatedFetcher<T, R>, request: R) => Promise<T> & {
|
|
44
44
|
all: () => Promise<(Awaited<T[K]> extends infer T_1 ? T_1 extends Awaited<T[K]> ? T_1 extends readonly (infer InnerArr)[] ? InnerArr : T_1 : never : never)[]>;
|
|
45
45
|
[Symbol.asyncIterator]: () => AsyncGenerator<T[K], void, void>;
|
|
46
46
|
};
|
|
@@ -22,4 +22,4 @@ export declare const fixLegacyTotalCount: <T>(obj: T, headers: Headers) => T;
|
|
|
22
22
|
*
|
|
23
23
|
* @internal
|
|
24
24
|
*/
|
|
25
|
-
export declare const responseParser: <T>(unmarshaller: ResponseUnmarshaller<T>, responseType:
|
|
25
|
+
export declare const responseParser: <T>(unmarshaller: ResponseUnmarshaller<T>, responseType: "json" | "text" | "blob") => (response: Response) => Promise<T>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.44.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": "cb232b2ecafc417dee225af4b9e23493ed39a6b8"
|
|
43
43
|
}
|