@scaleway/sdk-billing 2.18.0 → 2.19.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/v2/api.gen.d.ts +19 -19
- package/dist/v2/api.gen.js +50 -34
- package/dist/v2/types.gen.d.ts +3 -3
- package/dist/v2beta1/api.gen.d.ts +14 -14
- package/dist/v2beta1/api.gen.js +31 -22
- package/package.json +4 -4
package/dist/v2/api.gen.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Budget, BudgetAlert, BudgetAlertNotification, CreateBudgetAlertNotificationRequest, CreateBudgetAlertRequest, CreateBudgetRequest, DeleteBudgetAlertNotificationRequest, DeleteBudgetAlertRequest, DeleteBudgetRequest, ElectronicAddress, ElectronicBillingApiCreateElectronicAddressRequest, ElectronicBillingApiDeleteElectronicAddressRequest, ElectronicBillingApiGetElectronicAddressRequest, ElectronicBillingApiListElectronicAddressesRequest, ElectronicBillingApiUpdateElectronicAddressRequest, GetBudgetRequest, ListBudgetsRequest, ListBudgetsResponse, ListElectronicAddressesResponse, UpdateBudgetAlertNotificationRequest, UpdateBudgetAlertRequest, UpdateBudgetRequest } from "./types.gen.js";
|
|
2
|
-
import { API } from "@scaleway/sdk-client";
|
|
2
|
+
import { API, RequestOptions } from "@scaleway/sdk-client";
|
|
3
3
|
//#region src/v2/api.gen.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Billing API.
|
|
@@ -7,14 +7,14 @@ import { API } from "@scaleway/sdk-client";
|
|
|
7
7
|
This API allows you to query billing related objects.
|
|
8
8
|
*/
|
|
9
9
|
declare class API$1 extends API {
|
|
10
|
-
protected pageOfListBudgets: (request?: Readonly<ListBudgetsRequest
|
|
10
|
+
protected pageOfListBudgets: (request?: Readonly<ListBudgetsRequest>, options?: RequestOptions) => Promise<ListBudgetsResponse>;
|
|
11
11
|
/**
|
|
12
12
|
* List your budgets, filtering by `organization_id`.. List your budgets, filtering by `organization_id`.
|
|
13
13
|
*
|
|
14
14
|
* @param request - The request {@link ListBudgetsRequest}
|
|
15
15
|
* @returns A Promise of ListBudgetsResponse
|
|
16
16
|
*/
|
|
17
|
-
listBudgets: (request?: Readonly<ListBudgetsRequest
|
|
17
|
+
listBudgets: (request?: Readonly<ListBudgetsRequest>, options?: RequestOptions) => Promise<ListBudgetsResponse> & {
|
|
18
18
|
all: () => Promise<Budget[]>;
|
|
19
19
|
[Symbol.asyncIterator]: () => AsyncGenerator<Budget[], void, void>;
|
|
20
20
|
};
|
|
@@ -24,67 +24,67 @@ declare class API$1 extends API {
|
|
|
24
24
|
* @param request - The request {@link GetBudgetRequest}
|
|
25
25
|
* @returns A Promise of Budget
|
|
26
26
|
*/
|
|
27
|
-
getBudget: (request: Readonly<GetBudgetRequest
|
|
27
|
+
getBudget: (request: Readonly<GetBudgetRequest>, options?: RequestOptions) => Promise<Budget>;
|
|
28
28
|
/**
|
|
29
29
|
* Create a new budget.. Create a new budget.
|
|
30
30
|
*
|
|
31
31
|
* @param request - The request {@link CreateBudgetRequest}
|
|
32
32
|
* @returns A Promise of Budget
|
|
33
33
|
*/
|
|
34
|
-
createBudget: (request: Readonly<CreateBudgetRequest
|
|
34
|
+
createBudget: (request: Readonly<CreateBudgetRequest>, options?: RequestOptions) => Promise<Budget>;
|
|
35
35
|
/**
|
|
36
36
|
* Update a budget.. Update a budget.
|
|
37
37
|
*
|
|
38
38
|
* @param request - The request {@link UpdateBudgetRequest}
|
|
39
39
|
* @returns A Promise of Budget
|
|
40
40
|
*/
|
|
41
|
-
updateBudget: (request: Readonly<UpdateBudgetRequest
|
|
41
|
+
updateBudget: (request: Readonly<UpdateBudgetRequest>, options?: RequestOptions) => Promise<Budget>;
|
|
42
42
|
/**
|
|
43
43
|
* Delete a budget.. Delete a budget.
|
|
44
44
|
*
|
|
45
45
|
* @param request - The request {@link DeleteBudgetRequest}
|
|
46
46
|
*/
|
|
47
|
-
deleteBudget: (request: Readonly<DeleteBudgetRequest
|
|
47
|
+
deleteBudget: (request: Readonly<DeleteBudgetRequest>, options?: RequestOptions) => Promise<void>;
|
|
48
48
|
/**
|
|
49
49
|
* Create a new budget alert.. Create a new budget alert.
|
|
50
50
|
*
|
|
51
51
|
* @param request - The request {@link CreateBudgetAlertRequest}
|
|
52
52
|
* @returns A Promise of BudgetAlert
|
|
53
53
|
*/
|
|
54
|
-
createBudgetAlert: (request: Readonly<CreateBudgetAlertRequest
|
|
54
|
+
createBudgetAlert: (request: Readonly<CreateBudgetAlertRequest>, options?: RequestOptions) => Promise<BudgetAlert>;
|
|
55
55
|
/**
|
|
56
56
|
* Update a budget alert.. Update a budget alert.
|
|
57
57
|
*
|
|
58
58
|
* @param request - The request {@link UpdateBudgetAlertRequest}
|
|
59
59
|
* @returns A Promise of BudgetAlert
|
|
60
60
|
*/
|
|
61
|
-
updateBudgetAlert: (request: Readonly<UpdateBudgetAlertRequest
|
|
61
|
+
updateBudgetAlert: (request: Readonly<UpdateBudgetAlertRequest>, options?: RequestOptions) => Promise<BudgetAlert>;
|
|
62
62
|
/**
|
|
63
63
|
* Delete a budget alert.. Delete a budget alert.
|
|
64
64
|
*
|
|
65
65
|
* @param request - The request {@link DeleteBudgetAlertRequest}
|
|
66
66
|
*/
|
|
67
|
-
deleteBudgetAlert: (request: Readonly<DeleteBudgetAlertRequest
|
|
67
|
+
deleteBudgetAlert: (request: Readonly<DeleteBudgetAlertRequest>, options?: RequestOptions) => Promise<void>;
|
|
68
68
|
/**
|
|
69
69
|
* Create a new budget alert notification.. Create a new budget alert notification.
|
|
70
70
|
*
|
|
71
71
|
* @param request - The request {@link CreateBudgetAlertNotificationRequest}
|
|
72
72
|
* @returns A Promise of BudgetAlertNotification
|
|
73
73
|
*/
|
|
74
|
-
createBudgetAlertNotification: (request: Readonly<CreateBudgetAlertNotificationRequest
|
|
74
|
+
createBudgetAlertNotification: (request: Readonly<CreateBudgetAlertNotificationRequest>, options?: RequestOptions) => Promise<BudgetAlertNotification>;
|
|
75
75
|
/**
|
|
76
76
|
* Update a budget alert notification.. Update a budget alert notification.
|
|
77
77
|
*
|
|
78
78
|
* @param request - The request {@link UpdateBudgetAlertNotificationRequest}
|
|
79
79
|
* @returns A Promise of BudgetAlertNotification
|
|
80
80
|
*/
|
|
81
|
-
updateBudgetAlertNotification: (request: Readonly<UpdateBudgetAlertNotificationRequest
|
|
81
|
+
updateBudgetAlertNotification: (request: Readonly<UpdateBudgetAlertNotificationRequest>, options?: RequestOptions) => Promise<BudgetAlertNotification>;
|
|
82
82
|
/**
|
|
83
83
|
* Delete a budget alert notification.. Delete a budget alert notification.
|
|
84
84
|
*
|
|
85
85
|
* @param request - The request {@link DeleteBudgetAlertNotificationRequest}
|
|
86
86
|
*/
|
|
87
|
-
deleteBudgetAlertNotification: (request: Readonly<DeleteBudgetAlertNotificationRequest
|
|
87
|
+
deleteBudgetAlertNotification: (request: Readonly<DeleteBudgetAlertNotificationRequest>, options?: RequestOptions) => Promise<void>;
|
|
88
88
|
}
|
|
89
89
|
/**
|
|
90
90
|
* Electronic Billing API.
|
|
@@ -92,14 +92,14 @@ declare class API$1 extends API {
|
|
|
92
92
|
This API allows you to query electronic billing related objects.
|
|
93
93
|
*/
|
|
94
94
|
export declare class ElectronicBillingAPI extends API {
|
|
95
|
-
protected pageOfListElectronicAddresses: (request?: Readonly<ElectronicBillingApiListElectronicAddressesRequest
|
|
95
|
+
protected pageOfListElectronicAddresses: (request?: Readonly<ElectronicBillingApiListElectronicAddressesRequest>, options?: RequestOptions) => Promise<ListElectronicAddressesResponse>;
|
|
96
96
|
/**
|
|
97
97
|
* List electronic addresses.. List electronic addresses.
|
|
98
98
|
*
|
|
99
99
|
* @param request - The request {@link ElectronicBillingApiListElectronicAddressesRequest}
|
|
100
100
|
* @returns A Promise of ListElectronicAddressesResponse
|
|
101
101
|
*/
|
|
102
|
-
listElectronicAddresses: (request?: Readonly<ElectronicBillingApiListElectronicAddressesRequest
|
|
102
|
+
listElectronicAddresses: (request?: Readonly<ElectronicBillingApiListElectronicAddressesRequest>, options?: RequestOptions) => Promise<ListElectronicAddressesResponse> & {
|
|
103
103
|
all: () => Promise<ElectronicAddress[]>;
|
|
104
104
|
[Symbol.asyncIterator]: () => AsyncGenerator<ElectronicAddress[], void, void>;
|
|
105
105
|
};
|
|
@@ -109,27 +109,27 @@ export declare class ElectronicBillingAPI extends API {
|
|
|
109
109
|
* @param request - The request {@link ElectronicBillingApiGetElectronicAddressRequest}
|
|
110
110
|
* @returns A Promise of ElectronicAddress
|
|
111
111
|
*/
|
|
112
|
-
getElectronicAddress: (request: Readonly<ElectronicBillingApiGetElectronicAddressRequest
|
|
112
|
+
getElectronicAddress: (request: Readonly<ElectronicBillingApiGetElectronicAddressRequest>, options?: RequestOptions) => Promise<ElectronicAddress>;
|
|
113
113
|
/**
|
|
114
114
|
* Create a new electronic address.. Create a new electronic address.
|
|
115
115
|
*
|
|
116
116
|
* @param request - The request {@link ElectronicBillingApiCreateElectronicAddressRequest}
|
|
117
117
|
* @returns A Promise of ElectronicAddress
|
|
118
118
|
*/
|
|
119
|
-
createElectronicAddress: (request: Readonly<ElectronicBillingApiCreateElectronicAddressRequest
|
|
119
|
+
createElectronicAddress: (request: Readonly<ElectronicBillingApiCreateElectronicAddressRequest>, options?: RequestOptions) => Promise<ElectronicAddress>;
|
|
120
120
|
/**
|
|
121
121
|
* Update an electronic address.. Update an electronic address.
|
|
122
122
|
*
|
|
123
123
|
* @param request - The request {@link ElectronicBillingApiUpdateElectronicAddressRequest}
|
|
124
124
|
* @returns A Promise of ElectronicAddress
|
|
125
125
|
*/
|
|
126
|
-
updateElectronicAddress: (request: Readonly<ElectronicBillingApiUpdateElectronicAddressRequest
|
|
126
|
+
updateElectronicAddress: (request: Readonly<ElectronicBillingApiUpdateElectronicAddressRequest>, options?: RequestOptions) => Promise<ElectronicAddress>;
|
|
127
127
|
/**
|
|
128
128
|
* Delete an electronic address.. Delete an electronic address.
|
|
129
129
|
*
|
|
130
130
|
* @param request - The request {@link ElectronicBillingApiDeleteElectronicAddressRequest}
|
|
131
131
|
*/
|
|
132
|
-
deleteElectronicAddress: (request: Readonly<ElectronicBillingApiDeleteElectronicAddressRequest
|
|
132
|
+
deleteElectronicAddress: (request: Readonly<ElectronicBillingApiDeleteElectronicAddressRequest>, options?: RequestOptions) => Promise<void>;
|
|
133
133
|
}
|
|
134
134
|
//#endregion
|
|
135
135
|
export { API$1 as API };
|
package/dist/v2/api.gen.js
CHANGED
|
@@ -11,63 +11,74 @@ This API allows you to query billing related objects.
|
|
|
11
11
|
var API$1 = class extends API {
|
|
12
12
|
constructor(..._args) {
|
|
13
13
|
super(..._args);
|
|
14
|
-
this.pageOfListBudgets = (request = {}) => this.client.fetch({
|
|
14
|
+
this.pageOfListBudgets = (request = {}, options) => this.client.fetch({
|
|
15
15
|
method: "GET",
|
|
16
16
|
path: `/billing/v2/budgets`,
|
|
17
|
-
urlParams: urlParams(["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
17
|
+
urlParams: urlParams(["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize]),
|
|
18
|
+
signal: options?.signal
|
|
18
19
|
}, unmarshalListBudgetsResponse);
|
|
19
|
-
this.listBudgets = (request = {}) => enrichForPagination("budgets", this.pageOfListBudgets, request);
|
|
20
|
-
this.getBudget = (request) => this.client.fetch({
|
|
20
|
+
this.listBudgets = (request = {}, options) => enrichForPagination("budgets", this.pageOfListBudgets, request, options);
|
|
21
|
+
this.getBudget = (request, options) => this.client.fetch({
|
|
21
22
|
method: "GET",
|
|
22
|
-
path: `/billing/v2/budgets/${validatePathParam("budgetId", request.budgetId)}
|
|
23
|
+
path: `/billing/v2/budgets/${validatePathParam("budgetId", request.budgetId)}`,
|
|
24
|
+
signal: options?.signal
|
|
23
25
|
}, unmarshalBudget);
|
|
24
|
-
this.createBudget = (request) => this.client.fetch({
|
|
26
|
+
this.createBudget = (request, options) => this.client.fetch({
|
|
25
27
|
body: JSON.stringify(marshalCreateBudgetRequest(request, this.client.settings)),
|
|
26
28
|
headers: jsonContentHeaders,
|
|
27
29
|
method: "POST",
|
|
28
|
-
path: `/billing/v2/budgets
|
|
30
|
+
path: `/billing/v2/budgets`,
|
|
31
|
+
signal: options?.signal
|
|
29
32
|
}, unmarshalBudget);
|
|
30
|
-
this.updateBudget = (request) => this.client.fetch({
|
|
33
|
+
this.updateBudget = (request, options) => this.client.fetch({
|
|
31
34
|
body: JSON.stringify(marshalUpdateBudgetRequest(request, this.client.settings)),
|
|
32
35
|
headers: jsonContentHeaders,
|
|
33
36
|
method: "PATCH",
|
|
34
|
-
path: `/billing/v2/budgets/${validatePathParam("budgetId", request.budgetId)}
|
|
37
|
+
path: `/billing/v2/budgets/${validatePathParam("budgetId", request.budgetId)}`,
|
|
38
|
+
signal: options?.signal
|
|
35
39
|
}, unmarshalBudget);
|
|
36
|
-
this.deleteBudget = (request) => this.client.fetch({
|
|
40
|
+
this.deleteBudget = (request, options) => this.client.fetch({
|
|
37
41
|
method: "DELETE",
|
|
38
|
-
path: `/billing/v2/budgets/${validatePathParam("budgetId", request.budgetId)}
|
|
42
|
+
path: `/billing/v2/budgets/${validatePathParam("budgetId", request.budgetId)}`,
|
|
43
|
+
signal: options?.signal
|
|
39
44
|
});
|
|
40
|
-
this.createBudgetAlert = (request) => this.client.fetch({
|
|
45
|
+
this.createBudgetAlert = (request, options) => this.client.fetch({
|
|
41
46
|
body: JSON.stringify(marshalCreateBudgetAlertRequest(request, this.client.settings)),
|
|
42
47
|
headers: jsonContentHeaders,
|
|
43
48
|
method: "POST",
|
|
44
|
-
path: `/billing/v2/budget-alerts
|
|
49
|
+
path: `/billing/v2/budget-alerts`,
|
|
50
|
+
signal: options?.signal
|
|
45
51
|
}, unmarshalBudgetAlert);
|
|
46
|
-
this.updateBudgetAlert = (request) => this.client.fetch({
|
|
52
|
+
this.updateBudgetAlert = (request, options) => this.client.fetch({
|
|
47
53
|
body: JSON.stringify(marshalUpdateBudgetAlertRequest(request, this.client.settings)),
|
|
48
54
|
headers: jsonContentHeaders,
|
|
49
55
|
method: "PATCH",
|
|
50
|
-
path: `/billing/v2/budget-alerts/${validatePathParam("budgetAlertId", request.budgetAlertId)}
|
|
56
|
+
path: `/billing/v2/budget-alerts/${validatePathParam("budgetAlertId", request.budgetAlertId)}`,
|
|
57
|
+
signal: options?.signal
|
|
51
58
|
}, unmarshalBudgetAlert);
|
|
52
|
-
this.deleteBudgetAlert = (request) => this.client.fetch({
|
|
59
|
+
this.deleteBudgetAlert = (request, options) => this.client.fetch({
|
|
53
60
|
method: "DELETE",
|
|
54
|
-
path: `/billing/v2/budget-alerts/${validatePathParam("budgetAlertId", request.budgetAlertId)}
|
|
61
|
+
path: `/billing/v2/budget-alerts/${validatePathParam("budgetAlertId", request.budgetAlertId)}`,
|
|
62
|
+
signal: options?.signal
|
|
55
63
|
});
|
|
56
|
-
this.createBudgetAlertNotification = (request) => this.client.fetch({
|
|
64
|
+
this.createBudgetAlertNotification = (request, options) => this.client.fetch({
|
|
57
65
|
body: JSON.stringify(marshalCreateBudgetAlertNotificationRequest(request, this.client.settings)),
|
|
58
66
|
headers: jsonContentHeaders,
|
|
59
67
|
method: "POST",
|
|
60
|
-
path: `/billing/v2/budget-alert-notifications
|
|
68
|
+
path: `/billing/v2/budget-alert-notifications`,
|
|
69
|
+
signal: options?.signal
|
|
61
70
|
}, unmarshalBudgetAlertNotification);
|
|
62
|
-
this.updateBudgetAlertNotification = (request) => this.client.fetch({
|
|
71
|
+
this.updateBudgetAlertNotification = (request, options) => this.client.fetch({
|
|
63
72
|
body: JSON.stringify(marshalUpdateBudgetAlertNotificationRequest(request, this.client.settings)),
|
|
64
73
|
headers: jsonContentHeaders,
|
|
65
74
|
method: "PATCH",
|
|
66
|
-
path: `/billing/v2/budget-alert-notifications/${validatePathParam("budgetAlertNotificationId", request.budgetAlertNotificationId)}
|
|
75
|
+
path: `/billing/v2/budget-alert-notifications/${validatePathParam("budgetAlertNotificationId", request.budgetAlertNotificationId)}`,
|
|
76
|
+
signal: options?.signal
|
|
67
77
|
}, unmarshalBudgetAlertNotification);
|
|
68
|
-
this.deleteBudgetAlertNotification = (request) => this.client.fetch({
|
|
78
|
+
this.deleteBudgetAlertNotification = (request, options) => this.client.fetch({
|
|
69
79
|
method: "DELETE",
|
|
70
|
-
path: `/billing/v2/budget-alert-notifications/${validatePathParam("budgetAlertNotificationId", request.budgetAlertNotificationId)}
|
|
80
|
+
path: `/billing/v2/budget-alert-notifications/${validatePathParam("budgetAlertNotificationId", request.budgetAlertNotificationId)}`,
|
|
81
|
+
signal: options?.signal
|
|
71
82
|
});
|
|
72
83
|
}
|
|
73
84
|
};
|
|
@@ -79,31 +90,36 @@ This API allows you to query electronic billing related objects.
|
|
|
79
90
|
var ElectronicBillingAPI = class extends API {
|
|
80
91
|
constructor(..._args2) {
|
|
81
92
|
super(..._args2);
|
|
82
|
-
this.pageOfListElectronicAddresses = (request = {}) => this.client.fetch({
|
|
93
|
+
this.pageOfListElectronicAddresses = (request = {}, options) => this.client.fetch({
|
|
83
94
|
method: "GET",
|
|
84
95
|
path: `/billing/v2/electronic-address`,
|
|
85
|
-
urlParams: urlParams(["order_by", request.orderBy], ["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["starts_after", request.startsAfter], ["stops_before", request.stopsBefore])
|
|
96
|
+
urlParams: urlParams(["order_by", request.orderBy], ["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["starts_after", request.startsAfter], ["stops_before", request.stopsBefore]),
|
|
97
|
+
signal: options?.signal
|
|
86
98
|
}, unmarshalListElectronicAddressesResponse);
|
|
87
|
-
this.listElectronicAddresses = (request = {}) => enrichForPagination("electronicAddresses", this.pageOfListElectronicAddresses, request);
|
|
88
|
-
this.getElectronicAddress = (request) => this.client.fetch({
|
|
99
|
+
this.listElectronicAddresses = (request = {}, options) => enrichForPagination("electronicAddresses", this.pageOfListElectronicAddresses, request, options);
|
|
100
|
+
this.getElectronicAddress = (request, options) => this.client.fetch({
|
|
89
101
|
method: "GET",
|
|
90
|
-
path: `/billing/v2/electronic-address/${validatePathParam("electronicAddressId", request.electronicAddressId)}
|
|
102
|
+
path: `/billing/v2/electronic-address/${validatePathParam("electronicAddressId", request.electronicAddressId)}`,
|
|
103
|
+
signal: options?.signal
|
|
91
104
|
}, unmarshalElectronicAddress);
|
|
92
|
-
this.createElectronicAddress = (request) => this.client.fetch({
|
|
105
|
+
this.createElectronicAddress = (request, options) => this.client.fetch({
|
|
93
106
|
body: JSON.stringify(marshalElectronicBillingApiCreateElectronicAddressRequest(request, this.client.settings)),
|
|
94
107
|
headers: jsonContentHeaders,
|
|
95
108
|
method: "POST",
|
|
96
|
-
path: `/billing/v2/electronic-address
|
|
109
|
+
path: `/billing/v2/electronic-address`,
|
|
110
|
+
signal: options?.signal
|
|
97
111
|
}, unmarshalElectronicAddress);
|
|
98
|
-
this.updateElectronicAddress = (request) => this.client.fetch({
|
|
112
|
+
this.updateElectronicAddress = (request, options) => this.client.fetch({
|
|
99
113
|
body: JSON.stringify(marshalElectronicBillingApiUpdateElectronicAddressRequest(request, this.client.settings)),
|
|
100
114
|
headers: jsonContentHeaders,
|
|
101
115
|
method: "PATCH",
|
|
102
|
-
path: `/billing/v2/electronic-address/${validatePathParam("electronicAddressId", request.electronicAddressId)}
|
|
116
|
+
path: `/billing/v2/electronic-address/${validatePathParam("electronicAddressId", request.electronicAddressId)}`,
|
|
117
|
+
signal: options?.signal
|
|
103
118
|
}, unmarshalElectronicAddress);
|
|
104
|
-
this.deleteElectronicAddress = (request) => this.client.fetch({
|
|
119
|
+
this.deleteElectronicAddress = (request, options) => this.client.fetch({
|
|
105
120
|
method: "DELETE",
|
|
106
|
-
path: `/billing/v2/electronic-address/${validatePathParam("electronicAddressId", request.electronicAddressId)}
|
|
121
|
+
path: `/billing/v2/electronic-address/${validatePathParam("electronicAddressId", request.electronicAddressId)}`,
|
|
122
|
+
signal: options?.signal
|
|
107
123
|
});
|
|
108
124
|
}
|
|
109
125
|
};
|
package/dist/v2/types.gen.d.ts
CHANGED
|
@@ -68,7 +68,7 @@ export interface Budget {
|
|
|
68
68
|
*/
|
|
69
69
|
enabled: boolean;
|
|
70
70
|
/**
|
|
71
|
-
* Cost limit for this budget.
|
|
71
|
+
* Cost limit for this budget expressed in the embedded currency code.
|
|
72
72
|
*/
|
|
73
73
|
consumptionLimit?: Money;
|
|
74
74
|
/**
|
|
@@ -146,7 +146,7 @@ export type CreateBudgetRequest = {
|
|
|
146
146
|
*/
|
|
147
147
|
organizationId?: string;
|
|
148
148
|
/**
|
|
149
|
-
* Cost limit for the budget.
|
|
149
|
+
* Cost limit for the budget expressed in the invoiced currency (no cents allowed).
|
|
150
150
|
*/
|
|
151
151
|
consumptionLimit: number;
|
|
152
152
|
/**
|
|
@@ -322,7 +322,7 @@ export type UpdateBudgetRequest = {
|
|
|
322
322
|
*/
|
|
323
323
|
budgetId: string;
|
|
324
324
|
/**
|
|
325
|
-
* Cost limit for the budget.
|
|
325
|
+
* Cost limit for the budget expressed in the invoiced currency (no cents allowed).
|
|
326
326
|
*/
|
|
327
327
|
consumptionLimit?: number;
|
|
328
328
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Discount, DownloadInvoiceRequest, ExportInvoicesRequest, FinOpsApiListChargesRequest, GetInvoiceRequest, Invoice, ListChargesResponse, ListConsumptionsRequest, ListConsumptionsResponse, ListConsumptionsResponseConsumption, ListDiscountsRequest, ListDiscountsResponse, ListInvoicesRequest, ListInvoicesResponse, ListTaxesRequest, ListTaxesResponse, ListTaxesResponseTax, RedeemCouponRequest } from "./types.gen.js";
|
|
2
|
-
import { API } from "@scaleway/sdk-client";
|
|
2
|
+
import { API, RequestOptions } from "@scaleway/sdk-client";
|
|
3
3
|
//#region src/v2beta1/api.gen.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Billing API.
|
|
@@ -7,36 +7,36 @@ import { API } from "@scaleway/sdk-client";
|
|
|
7
7
|
This API allows you to manage and query your Scaleway billing and consumption.
|
|
8
8
|
*/
|
|
9
9
|
declare class API$1 extends API {
|
|
10
|
-
protected pageOfListConsumptions: (request?: Readonly<ListConsumptionsRequest
|
|
10
|
+
protected pageOfListConsumptions: (request?: Readonly<ListConsumptionsRequest>, options?: RequestOptions) => Promise<ListConsumptionsResponse>;
|
|
11
11
|
/**
|
|
12
12
|
* Get monthly consumption. Consumption allows you to retrieve your past or current consumption cost, by project or category.
|
|
13
13
|
*
|
|
14
14
|
* @param request - The request {@link ListConsumptionsRequest}
|
|
15
15
|
* @returns A Promise of ListConsumptionsResponse
|
|
16
16
|
*/
|
|
17
|
-
listConsumptions: (request?: Readonly<ListConsumptionsRequest
|
|
17
|
+
listConsumptions: (request?: Readonly<ListConsumptionsRequest>, options?: RequestOptions) => Promise<ListConsumptionsResponse> & {
|
|
18
18
|
all: () => Promise<ListConsumptionsResponseConsumption[]>;
|
|
19
19
|
[Symbol.asyncIterator]: () => AsyncGenerator<ListConsumptionsResponseConsumption[], void, void>;
|
|
20
20
|
};
|
|
21
|
-
protected pageOfListTaxes: (request?: Readonly<ListTaxesRequest
|
|
21
|
+
protected pageOfListTaxes: (request?: Readonly<ListTaxesRequest>, options?: RequestOptions) => Promise<ListTaxesResponse>;
|
|
22
22
|
/**
|
|
23
23
|
* Get monthly consumption taxes. Consumption Tax allows you to retrieve your past or current tax charges, by project or category.
|
|
24
24
|
*
|
|
25
25
|
* @param request - The request {@link ListTaxesRequest}
|
|
26
26
|
* @returns A Promise of ListTaxesResponse
|
|
27
27
|
*/
|
|
28
|
-
listTaxes: (request?: Readonly<ListTaxesRequest
|
|
28
|
+
listTaxes: (request?: Readonly<ListTaxesRequest>, options?: RequestOptions) => Promise<ListTaxesResponse> & {
|
|
29
29
|
all: () => Promise<ListTaxesResponseTax[]>;
|
|
30
30
|
[Symbol.asyncIterator]: () => AsyncGenerator<ListTaxesResponseTax[], void, void>;
|
|
31
31
|
};
|
|
32
|
-
protected pageOfListInvoices: (request?: Readonly<ListInvoicesRequest
|
|
32
|
+
protected pageOfListInvoices: (request?: Readonly<ListInvoicesRequest>, options?: RequestOptions) => Promise<ListInvoicesResponse>;
|
|
33
33
|
/**
|
|
34
34
|
* List invoices. List all your invoices, filtering by `start_date` and `invoice_type`. Each invoice has its own ID.
|
|
35
35
|
*
|
|
36
36
|
* @param request - The request {@link ListInvoicesRequest}
|
|
37
37
|
* @returns A Promise of ListInvoicesResponse
|
|
38
38
|
*/
|
|
39
|
-
listInvoices: (request?: Readonly<ListInvoicesRequest
|
|
39
|
+
listInvoices: (request?: Readonly<ListInvoicesRequest>, options?: RequestOptions) => Promise<ListInvoicesResponse> & {
|
|
40
40
|
all: () => Promise<Invoice[]>;
|
|
41
41
|
[Symbol.asyncIterator]: () => AsyncGenerator<Invoice[], void, void>;
|
|
42
42
|
};
|
|
@@ -46,22 +46,22 @@ declare class API$1 extends API {
|
|
|
46
46
|
* @param request - The request {@link ExportInvoicesRequest}
|
|
47
47
|
* @returns A Promise of Blob
|
|
48
48
|
*/
|
|
49
|
-
exportInvoices: (request?: Readonly<ExportInvoicesRequest
|
|
49
|
+
exportInvoices: (request?: Readonly<ExportInvoicesRequest>, options?: RequestOptions) => Promise<Blob>;
|
|
50
50
|
/**
|
|
51
51
|
* Get an invoice. Get a specific invoice, specified by its ID.
|
|
52
52
|
*
|
|
53
53
|
* @param request - The request {@link GetInvoiceRequest}
|
|
54
54
|
* @returns A Promise of Invoice
|
|
55
55
|
*/
|
|
56
|
-
getInvoice: (request: Readonly<GetInvoiceRequest
|
|
56
|
+
getInvoice: (request: Readonly<GetInvoiceRequest>, options?: RequestOptions) => Promise<Invoice>;
|
|
57
57
|
/**
|
|
58
58
|
* Download an invoice. Download a specific invoice, specified by its ID.
|
|
59
59
|
*
|
|
60
60
|
* @param request - The request {@link DownloadInvoiceRequest}
|
|
61
61
|
* @returns A Promise of Blob
|
|
62
62
|
*/
|
|
63
|
-
downloadInvoice: (request: Readonly<DownloadInvoiceRequest
|
|
64
|
-
protected pageOfListDiscounts: (request?: Readonly<ListDiscountsRequest
|
|
63
|
+
downloadInvoice: (request: Readonly<DownloadInvoiceRequest>, options?: RequestOptions) => Promise<Blob>;
|
|
64
|
+
protected pageOfListDiscounts: (request?: Readonly<ListDiscountsRequest>, options?: RequestOptions) => Promise<ListDiscountsResponse>;
|
|
65
65
|
/**
|
|
66
66
|
* List discounts. List all discounts for your Organization and usable categories, products, offers, references, regions and zones where the discount can be applied. As a reseller:
|
|
67
67
|
- If you do not specify an `organization_id` you will list the discounts applied to your own Organization and your customers
|
|
@@ -71,7 +71,7 @@ declare class API$1 extends API {
|
|
|
71
71
|
* @param request - The request {@link ListDiscountsRequest}
|
|
72
72
|
* @returns A Promise of ListDiscountsResponse
|
|
73
73
|
*/
|
|
74
|
-
listDiscounts: (request?: Readonly<ListDiscountsRequest
|
|
74
|
+
listDiscounts: (request?: Readonly<ListDiscountsRequest>, options?: RequestOptions) => Promise<ListDiscountsResponse> & {
|
|
75
75
|
all: () => Promise<Discount[]>;
|
|
76
76
|
[Symbol.asyncIterator]: () => AsyncGenerator<Discount[], void, void>;
|
|
77
77
|
};
|
|
@@ -81,7 +81,7 @@ declare class API$1 extends API {
|
|
|
81
81
|
* @param request - The request {@link RedeemCouponRequest}
|
|
82
82
|
* @returns A Promise of Discount
|
|
83
83
|
*/
|
|
84
|
-
redeemCoupon: (request: Readonly<RedeemCouponRequest
|
|
84
|
+
redeemCoupon: (request: Readonly<RedeemCouponRequest>, options?: RequestOptions) => Promise<Discount>;
|
|
85
85
|
}
|
|
86
86
|
/**
|
|
87
87
|
* Billing FinOps API.
|
|
@@ -93,7 +93,7 @@ export declare class FinOpsAPI extends API {
|
|
|
93
93
|
* @param request - The request {@link FinOpsApiListChargesRequest}
|
|
94
94
|
* @returns A Promise of ListChargesResponse
|
|
95
95
|
*/
|
|
96
|
-
listCharges: (request?: Readonly<FinOpsApiListChargesRequest
|
|
96
|
+
listCharges: (request?: Readonly<FinOpsApiListChargesRequest>, options?: RequestOptions) => Promise<ListChargesResponse>;
|
|
97
97
|
}
|
|
98
98
|
//#endregion
|
|
99
99
|
export { API$1 as API };
|
package/dist/v2beta1/api.gen.js
CHANGED
|
@@ -10,7 +10,7 @@ This API allows you to manage and query your Scaleway billing and consumption.
|
|
|
10
10
|
var API$1 = class extends API {
|
|
11
11
|
constructor(..._args) {
|
|
12
12
|
super(..._args);
|
|
13
|
-
this.pageOfListConsumptions = (request = {}) => this.client.fetch({
|
|
13
|
+
this.pageOfListConsumptions = (request = {}, options) => this.client.fetch({
|
|
14
14
|
method: "GET",
|
|
15
15
|
path: `/billing/v2beta1/consumptions`,
|
|
16
16
|
urlParams: urlParams(["billing_period", request.billingPeriod], ["category_name", request.categoryName], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ...Object.entries(resolveOneOf([{
|
|
@@ -21,47 +21,55 @@ var API$1 = class extends API {
|
|
|
21
21
|
default: this.client.settings.defaultProjectId,
|
|
22
22
|
param: "project_id",
|
|
23
23
|
value: request.projectId
|
|
24
|
-
}])))
|
|
24
|
+
}]))),
|
|
25
|
+
signal: options?.signal
|
|
25
26
|
}, unmarshalListConsumptionsResponse);
|
|
26
|
-
this.listConsumptions = (request = {}) => enrichForPagination("consumptions", this.pageOfListConsumptions, request);
|
|
27
|
-
this.pageOfListTaxes = (request = {}) => this.client.fetch({
|
|
27
|
+
this.listConsumptions = (request = {}, options) => enrichForPagination("consumptions", this.pageOfListConsumptions, request, options);
|
|
28
|
+
this.pageOfListTaxes = (request = {}, options) => this.client.fetch({
|
|
28
29
|
method: "GET",
|
|
29
30
|
path: `/billing/v2beta1/taxes`,
|
|
30
|
-
urlParams: urlParams(["billing_period", request.billingPeriod], ["order_by", request.orderBy], ["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
31
|
+
urlParams: urlParams(["billing_period", request.billingPeriod], ["order_by", request.orderBy], ["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize]),
|
|
32
|
+
signal: options?.signal
|
|
31
33
|
}, unmarshalListTaxesResponse);
|
|
32
|
-
this.listTaxes = (request = {}) => enrichForPagination("taxes", this.pageOfListTaxes, request);
|
|
33
|
-
this.pageOfListInvoices = (request = {}) => this.client.fetch({
|
|
34
|
+
this.listTaxes = (request = {}, options) => enrichForPagination("taxes", this.pageOfListTaxes, request, options);
|
|
35
|
+
this.pageOfListInvoices = (request = {}, options) => this.client.fetch({
|
|
34
36
|
method: "GET",
|
|
35
37
|
path: `/billing/v2beta1/invoices`,
|
|
36
|
-
urlParams: urlParams(["billing_period_start_after", request.billingPeriodStartAfter], ["billing_period_start_before", request.billingPeriodStartBefore], ["invoice_type", request.invoiceType], ["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
38
|
+
urlParams: urlParams(["billing_period_start_after", request.billingPeriodStartAfter], ["billing_period_start_before", request.billingPeriodStartBefore], ["invoice_type", request.invoiceType], ["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize]),
|
|
39
|
+
signal: options?.signal
|
|
37
40
|
}, unmarshalListInvoicesResponse);
|
|
38
|
-
this.listInvoices = (request = {}) => enrichForPagination("invoices", this.pageOfListInvoices, request);
|
|
39
|
-
this.exportInvoices = (request = {}) => this.client.fetch({
|
|
41
|
+
this.listInvoices = (request = {}, options) => enrichForPagination("invoices", this.pageOfListInvoices, request, options);
|
|
42
|
+
this.exportInvoices = (request = {}, options) => this.client.fetch({
|
|
40
43
|
method: "GET",
|
|
41
44
|
path: `/billing/v2beta1/export-invoices`,
|
|
42
45
|
urlParams: urlParams(["dl", 1], ["billing_period_start_after", request.billingPeriodStartAfter], ["billing_period_start_before", request.billingPeriodStartBefore], ["file_type", request.fileType], ["invoice_type", request.invoiceType], ["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize]),
|
|
43
|
-
responseType: "blob"
|
|
46
|
+
responseType: "blob",
|
|
47
|
+
signal: options?.signal
|
|
44
48
|
});
|
|
45
|
-
this.getInvoice = (request) => this.client.fetch({
|
|
49
|
+
this.getInvoice = (request, options) => this.client.fetch({
|
|
46
50
|
method: "GET",
|
|
47
|
-
path: `/billing/v2beta1/invoices/${validatePathParam("invoiceId", request.invoiceId)}
|
|
51
|
+
path: `/billing/v2beta1/invoices/${validatePathParam("invoiceId", request.invoiceId)}`,
|
|
52
|
+
signal: options?.signal
|
|
48
53
|
}, unmarshalInvoice);
|
|
49
|
-
this.downloadInvoice = (request) => this.client.fetch({
|
|
54
|
+
this.downloadInvoice = (request, options) => this.client.fetch({
|
|
50
55
|
method: "GET",
|
|
51
56
|
path: `/billing/v2beta1/invoices/${validatePathParam("invoiceId", request.invoiceId)}/download`,
|
|
52
57
|
urlParams: urlParams(["dl", 1], ["file_type", request.fileType]),
|
|
53
|
-
responseType: "blob"
|
|
58
|
+
responseType: "blob",
|
|
59
|
+
signal: options?.signal
|
|
54
60
|
});
|
|
55
|
-
this.pageOfListDiscounts = (request = {}) => this.client.fetch({
|
|
61
|
+
this.pageOfListDiscounts = (request = {}, options) => this.client.fetch({
|
|
56
62
|
method: "GET",
|
|
57
63
|
path: `/billing/v2beta1/discounts`,
|
|
58
|
-
urlParams: urlParams(["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
64
|
+
urlParams: urlParams(["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize]),
|
|
65
|
+
signal: options?.signal
|
|
59
66
|
}, unmarshalListDiscountsResponse);
|
|
60
|
-
this.listDiscounts = (request = {}) => enrichForPagination("discounts", this.pageOfListDiscounts, request);
|
|
61
|
-
this.redeemCoupon = (request) => this.client.fetch({
|
|
67
|
+
this.listDiscounts = (request = {}, options) => enrichForPagination("discounts", this.pageOfListDiscounts, request, options);
|
|
68
|
+
this.redeemCoupon = (request, options) => this.client.fetch({
|
|
62
69
|
method: "POST",
|
|
63
70
|
path: `/billing/v2beta1/redeem-coupon`,
|
|
64
|
-
urlParams: urlParams(["code", request.code], ["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId])
|
|
71
|
+
urlParams: urlParams(["code", request.code], ["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId]),
|
|
72
|
+
signal: options?.signal
|
|
65
73
|
}, unmarshalDiscount);
|
|
66
74
|
}
|
|
67
75
|
};
|
|
@@ -71,10 +79,11 @@ var API$1 = class extends API {
|
|
|
71
79
|
var FinOpsAPI = class extends API {
|
|
72
80
|
constructor(..._args2) {
|
|
73
81
|
super(..._args2);
|
|
74
|
-
this.listCharges = (request = {}) => this.client.fetch({
|
|
82
|
+
this.listCharges = (request = {}, options) => this.client.fetch({
|
|
75
83
|
method: "GET",
|
|
76
84
|
path: `/billing/v2beta1/charges`,
|
|
77
|
-
urlParams: urlParams(["clamp_to_time_range", request.clampToTimeRange], ["end_date_before", request.endDateBefore], ["invoice_ids", request.invoiceIds], ["order_by", request.orderBy], ["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["page_token", request.pageToken], ["project_ids", request.projectIds], ["resource_ids", request.resourceIds], ["resource_names", request.resourceNames], ["skus", request.skus], ["start_date_after", request.startDateAfter])
|
|
85
|
+
urlParams: urlParams(["clamp_to_time_range", request.clampToTimeRange], ["end_date_before", request.endDateBefore], ["invoice_ids", request.invoiceIds], ["order_by", request.orderBy], ["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["page_token", request.pageToken], ["project_ids", request.projectIds], ["resource_ids", request.resourceIds], ["resource_names", request.resourceNames], ["skus", request.skus], ["start_date_after", request.startDateAfter]),
|
|
86
|
+
signal: options?.signal
|
|
78
87
|
}, unmarshalListChargesResponse);
|
|
79
88
|
}
|
|
80
89
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk-billing",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.19.0",
|
|
4
4
|
"description": "Scaleway SDK billing",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -33,14 +33,14 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@scaleway/random-name": "6.0.2",
|
|
36
|
-
"@scaleway/sdk-std": "2.9.
|
|
36
|
+
"@scaleway/sdk-std": "2.9.1"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@repo/configs": "^0.1.1",
|
|
40
|
-
"@scaleway/sdk-client": "^2.12.
|
|
40
|
+
"@scaleway/sdk-client": "^2.12.1"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"@scaleway/sdk-client": "^2.12.
|
|
43
|
+
"@scaleway/sdk-client": "^2.12.1"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
46
|
"package:check": "pnpm publint",
|