@scaleway/sdk-billing 2.21.0 → 2.23.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/marshalling.gen.js +11 -11
- package/dist/v2/types.gen.d.ts +34 -34
- package/dist/v2beta1/api.gen.d.ts +23 -1
- package/dist/v2beta1/api.gen.js +15 -1
- package/dist/v2beta1/constants.gen.d.ts +3 -1
- package/dist/v2beta1/constants.gen.js +11 -1
- package/dist/v2beta1/index.gen.d.ts +5 -5
- package/dist/v2beta1/index.gen.js +6 -3
- package/dist/v2beta1/marshalling.gen.d.ts +3 -1
- package/dist/v2beta1/marshalling.gen.js +73 -27
- package/dist/v2beta1/metadata.gen.d.ts +26 -0
- package/dist/v2beta1/metadata.gen.js +28 -0
- package/dist/v2beta1/types.gen.d.ts +212 -71
- package/package.json +4 -4
|
@@ -4,44 +4,44 @@ import { isJSONObject, resolveOneOf, unmarshalArrayOfObject, unmarshalDate, unma
|
|
|
4
4
|
const unmarshalBudgetAlertNotification = (data) => {
|
|
5
5
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'BudgetAlertNotification' failed as data isn't a dictionary.`);
|
|
6
6
|
return {
|
|
7
|
-
createdAt: unmarshalDate(data.created_at),
|
|
7
|
+
createdAt: unmarshalDate(data.created_at) ?? null,
|
|
8
8
|
id: data.id,
|
|
9
9
|
recipients: data.recipients,
|
|
10
10
|
type: data.type,
|
|
11
|
-
updatedAt: unmarshalDate(data.updated_at)
|
|
11
|
+
updatedAt: unmarshalDate(data.updated_at) ?? null
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
14
|
const unmarshalBudgetAlert = (data) => {
|
|
15
15
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'BudgetAlert' failed as data isn't a dictionary.`);
|
|
16
16
|
return {
|
|
17
|
-
createdAt: unmarshalDate(data.created_at),
|
|
17
|
+
createdAt: unmarshalDate(data.created_at) ?? null,
|
|
18
18
|
id: data.id,
|
|
19
19
|
notifications: unmarshalArrayOfObject(data.notifications, unmarshalBudgetAlertNotification),
|
|
20
20
|
threshold: data.threshold,
|
|
21
|
-
updatedAt: unmarshalDate(data.updated_at)
|
|
21
|
+
updatedAt: unmarshalDate(data.updated_at) ?? null
|
|
22
22
|
};
|
|
23
23
|
};
|
|
24
24
|
const unmarshalBudget = (data) => {
|
|
25
25
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Budget' failed as data isn't a dictionary.`);
|
|
26
26
|
return {
|
|
27
27
|
alerts: unmarshalArrayOfObject(data.alerts, unmarshalBudgetAlert),
|
|
28
|
-
consumptionLimit: data.consumption_limit ? unmarshalMoney(data.consumption_limit) :
|
|
29
|
-
createdAt: unmarshalDate(data.created_at),
|
|
28
|
+
consumptionLimit: data.consumption_limit ? unmarshalMoney(data.consumption_limit) : null,
|
|
29
|
+
createdAt: unmarshalDate(data.created_at) ?? null,
|
|
30
30
|
enabled: data.enabled,
|
|
31
31
|
id: data.id,
|
|
32
32
|
organizationId: data.organization_id,
|
|
33
|
-
updatedAt: unmarshalDate(data.updated_at)
|
|
33
|
+
updatedAt: unmarshalDate(data.updated_at) ?? null
|
|
34
34
|
};
|
|
35
35
|
};
|
|
36
36
|
const unmarshalElectronicAddress = (data) => {
|
|
37
37
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ElectronicAddress' failed as data isn't a dictionary.`);
|
|
38
38
|
return {
|
|
39
|
-
createdAt: unmarshalDate(data.created_at),
|
|
39
|
+
createdAt: unmarshalDate(data.created_at) ?? null,
|
|
40
40
|
id: data.id,
|
|
41
41
|
organizationId: data.organization_id,
|
|
42
|
-
startsAt: unmarshalDate(data.starts_at),
|
|
43
|
-
stopsAt: unmarshalDate(data.stops_at),
|
|
44
|
-
updatedAt: unmarshalDate(data.updated_at),
|
|
42
|
+
startsAt: unmarshalDate(data.starts_at) ?? null,
|
|
43
|
+
stopsAt: unmarshalDate(data.stops_at) ?? null,
|
|
44
|
+
updatedAt: unmarshalDate(data.updated_at) ?? null,
|
|
45
45
|
value: data.value
|
|
46
46
|
};
|
|
47
47
|
};
|
package/dist/v2/types.gen.d.ts
CHANGED
|
@@ -10,11 +10,11 @@ export interface BudgetAlertNotification {
|
|
|
10
10
|
/**
|
|
11
11
|
* The creation date of the alert notification.
|
|
12
12
|
*/
|
|
13
|
-
createdAt?: Date;
|
|
13
|
+
createdAt?: Date | null;
|
|
14
14
|
/**
|
|
15
15
|
* The last modification date of the alert notification.
|
|
16
16
|
*/
|
|
17
|
-
updatedAt?: Date;
|
|
17
|
+
updatedAt?: Date | null;
|
|
18
18
|
/**
|
|
19
19
|
* Kind of notification.
|
|
20
20
|
*/
|
|
@@ -32,11 +32,11 @@ export interface BudgetAlert {
|
|
|
32
32
|
/**
|
|
33
33
|
* The creation date of the alert.
|
|
34
34
|
*/
|
|
35
|
-
createdAt?: Date;
|
|
35
|
+
createdAt?: Date | null;
|
|
36
36
|
/**
|
|
37
37
|
* The last modification date of the alert.
|
|
38
38
|
*/
|
|
39
|
-
updatedAt?: Date;
|
|
39
|
+
updatedAt?: Date | null;
|
|
40
40
|
/**
|
|
41
41
|
* Percentage threshold of the budget's limit for which the alert is triggered.
|
|
42
42
|
*/
|
|
@@ -54,11 +54,11 @@ export interface Budget {
|
|
|
54
54
|
/**
|
|
55
55
|
* The creation date of the budget.
|
|
56
56
|
*/
|
|
57
|
-
createdAt?: Date;
|
|
57
|
+
createdAt?: Date | null;
|
|
58
58
|
/**
|
|
59
59
|
* The last modification date of the budget.
|
|
60
60
|
*/
|
|
61
|
-
updatedAt?: Date;
|
|
61
|
+
updatedAt?: Date | null;
|
|
62
62
|
/**
|
|
63
63
|
* The organization ID of the budget.
|
|
64
64
|
*/
|
|
@@ -70,7 +70,7 @@ export interface Budget {
|
|
|
70
70
|
/**
|
|
71
71
|
* Cost limit for this budget expressed in the embedded currency code.
|
|
72
72
|
*/
|
|
73
|
-
consumptionLimit?: Money;
|
|
73
|
+
consumptionLimit?: Money | null;
|
|
74
74
|
/**
|
|
75
75
|
* Alerts defined for this budget.
|
|
76
76
|
*/
|
|
@@ -84,19 +84,19 @@ export interface ElectronicAddress {
|
|
|
84
84
|
/**
|
|
85
85
|
* The start date of the electronic address.
|
|
86
86
|
*/
|
|
87
|
-
startsAt?: Date;
|
|
87
|
+
startsAt?: Date | null;
|
|
88
88
|
/**
|
|
89
89
|
* The stop date of the electronic address.
|
|
90
90
|
*/
|
|
91
|
-
stopsAt?: Date;
|
|
91
|
+
stopsAt?: Date | null;
|
|
92
92
|
/**
|
|
93
93
|
* The creation date of the electronic address.
|
|
94
94
|
*/
|
|
95
|
-
createdAt?: Date;
|
|
95
|
+
createdAt?: Date | null;
|
|
96
96
|
/**
|
|
97
97
|
* The last modification date of the electronic address.
|
|
98
98
|
*/
|
|
99
|
-
updatedAt?: Date;
|
|
99
|
+
updatedAt?: Date | null;
|
|
100
100
|
/**
|
|
101
101
|
* The organization ID of the electronic address.
|
|
102
102
|
*/
|
|
@@ -116,19 +116,19 @@ export type CreateBudgetAlertNotificationRequest = {
|
|
|
116
116
|
*
|
|
117
117
|
* One-of ('recipientType'): at most one of 'smsPhoneNumbers', 'emailAddresses', 'webhookUrls' could be set.
|
|
118
118
|
*/
|
|
119
|
-
smsPhoneNumbers?: string[];
|
|
119
|
+
smsPhoneNumbers?: string[] | null;
|
|
120
120
|
/**
|
|
121
121
|
* List of email addresses to receive email notifications.
|
|
122
122
|
*
|
|
123
123
|
* One-of ('recipientType'): at most one of 'smsPhoneNumbers', 'emailAddresses', 'webhookUrls' could be set.
|
|
124
124
|
*/
|
|
125
|
-
emailAddresses?: string[];
|
|
125
|
+
emailAddresses?: string[] | null;
|
|
126
126
|
/**
|
|
127
127
|
* List of webhook url to receive webhook notifications.
|
|
128
128
|
*
|
|
129
129
|
* One-of ('recipientType'): at most one of 'smsPhoneNumbers', 'emailAddresses', 'webhookUrls' could be set.
|
|
130
130
|
*/
|
|
131
|
-
webhookUrls?: string[];
|
|
131
|
+
webhookUrls?: string[] | null;
|
|
132
132
|
};
|
|
133
133
|
export type CreateBudgetAlertRequest = {
|
|
134
134
|
/**
|
|
@@ -144,7 +144,7 @@ export type CreateBudgetRequest = {
|
|
|
144
144
|
/**
|
|
145
145
|
* The Organization ID of the budget.
|
|
146
146
|
*/
|
|
147
|
-
organizationId?: string;
|
|
147
|
+
organizationId?: string | null;
|
|
148
148
|
/**
|
|
149
149
|
* Cost limit for the budget expressed in the invoiced currency (no cents allowed).
|
|
150
150
|
*/
|
|
@@ -176,7 +176,7 @@ export type ElectronicBillingApiCreateElectronicAddressRequest = {
|
|
|
176
176
|
/**
|
|
177
177
|
* The Organization ID to set electronic address.
|
|
178
178
|
*/
|
|
179
|
-
organizationId?: string;
|
|
179
|
+
organizationId?: string | null;
|
|
180
180
|
/**
|
|
181
181
|
* Electronic address to set.
|
|
182
182
|
*/
|
|
@@ -184,11 +184,11 @@ export type ElectronicBillingApiCreateElectronicAddressRequest = {
|
|
|
184
184
|
/**
|
|
185
185
|
* When electronic address should be active.
|
|
186
186
|
*/
|
|
187
|
-
startsAt?: Date;
|
|
187
|
+
startsAt?: Date | null;
|
|
188
188
|
/**
|
|
189
189
|
* When electronic address should stop being active.
|
|
190
190
|
*/
|
|
191
|
-
stopsAt?: Date;
|
|
191
|
+
stopsAt?: Date | null;
|
|
192
192
|
};
|
|
193
193
|
export type ElectronicBillingApiDeleteElectronicAddressRequest = {
|
|
194
194
|
/**
|
|
@@ -206,27 +206,27 @@ export type ElectronicBillingApiListElectronicAddressesRequest = {
|
|
|
206
206
|
/**
|
|
207
207
|
* Page number to return, from the paginated results.
|
|
208
208
|
*/
|
|
209
|
-
page?: number;
|
|
209
|
+
page?: number | null;
|
|
210
210
|
/**
|
|
211
211
|
* Number of Electronic Address to return per page.
|
|
212
212
|
*/
|
|
213
|
-
pageSize?: number;
|
|
213
|
+
pageSize?: number | null;
|
|
214
214
|
/**
|
|
215
215
|
* Sort order of Electronic address in the response.
|
|
216
216
|
*/
|
|
217
|
-
orderBy?: ListElectronicAddressesRequestOrderBy;
|
|
217
|
+
orderBy?: ListElectronicAddressesRequestOrderBy | null;
|
|
218
218
|
/**
|
|
219
219
|
* The Organization ID to set electronic address.
|
|
220
220
|
*/
|
|
221
|
-
organizationId?: string;
|
|
221
|
+
organizationId?: string | null;
|
|
222
222
|
/**
|
|
223
223
|
* Filter services where electronic address start_date is greater or equal to starts_after.
|
|
224
224
|
*/
|
|
225
|
-
startsAfter?: Date;
|
|
225
|
+
startsAfter?: Date | null;
|
|
226
226
|
/**
|
|
227
227
|
* Filter services where electronic address stop_date is before stops_before.
|
|
228
228
|
*/
|
|
229
|
-
stopsBefore?: Date;
|
|
229
|
+
stopsBefore?: Date | null;
|
|
230
230
|
};
|
|
231
231
|
export type ElectronicBillingApiUpdateElectronicAddressRequest = {
|
|
232
232
|
/**
|
|
@@ -236,11 +236,11 @@ export type ElectronicBillingApiUpdateElectronicAddressRequest = {
|
|
|
236
236
|
/**
|
|
237
237
|
* Electronic address to set.
|
|
238
238
|
*/
|
|
239
|
-
value?: string;
|
|
239
|
+
value?: string | null;
|
|
240
240
|
/**
|
|
241
241
|
* When electronic address should stop being active.
|
|
242
242
|
*/
|
|
243
|
-
stopsAt?: Date;
|
|
243
|
+
stopsAt?: Date | null;
|
|
244
244
|
};
|
|
245
245
|
export type GetBudgetRequest = {
|
|
246
246
|
/**
|
|
@@ -252,15 +252,15 @@ export type ListBudgetsRequest = {
|
|
|
252
252
|
/**
|
|
253
253
|
* Filter by organization ID.
|
|
254
254
|
*/
|
|
255
|
-
organizationId?: string;
|
|
255
|
+
organizationId?: string | null;
|
|
256
256
|
/**
|
|
257
257
|
* Page number.
|
|
258
258
|
*/
|
|
259
|
-
page?: number;
|
|
259
|
+
page?: number | null;
|
|
260
260
|
/**
|
|
261
261
|
* Positive integer to select the number of items to return.
|
|
262
262
|
*/
|
|
263
|
-
pageSize?: number;
|
|
263
|
+
pageSize?: number | null;
|
|
264
264
|
};
|
|
265
265
|
export interface ListBudgetsResponse {
|
|
266
266
|
/**
|
|
@@ -292,19 +292,19 @@ export type UpdateBudgetAlertNotificationRequest = {
|
|
|
292
292
|
*
|
|
293
293
|
* One-of ('recipientType'): at most one of 'smsPhoneNumbers', 'emailAddresses', 'webhookUrls' could be set.
|
|
294
294
|
*/
|
|
295
|
-
smsPhoneNumbers?: string[];
|
|
295
|
+
smsPhoneNumbers?: string[] | null;
|
|
296
296
|
/**
|
|
297
297
|
* List of email addresses to receive email notifications.
|
|
298
298
|
*
|
|
299
299
|
* One-of ('recipientType'): at most one of 'smsPhoneNumbers', 'emailAddresses', 'webhookUrls' could be set.
|
|
300
300
|
*/
|
|
301
|
-
emailAddresses?: string[];
|
|
301
|
+
emailAddresses?: string[] | null;
|
|
302
302
|
/**
|
|
303
303
|
* List of webhook url to receive webhook notifications.
|
|
304
304
|
*
|
|
305
305
|
* One-of ('recipientType'): at most one of 'smsPhoneNumbers', 'emailAddresses', 'webhookUrls' could be set.
|
|
306
306
|
*/
|
|
307
|
-
webhookUrls?: string[];
|
|
307
|
+
webhookUrls?: string[] | null;
|
|
308
308
|
};
|
|
309
309
|
export type UpdateBudgetAlertRequest = {
|
|
310
310
|
/**
|
|
@@ -324,10 +324,10 @@ export type UpdateBudgetRequest = {
|
|
|
324
324
|
/**
|
|
325
325
|
* Cost limit for the budget expressed in the invoiced currency (no cents allowed).
|
|
326
326
|
*/
|
|
327
|
-
consumptionLimit?: number;
|
|
327
|
+
consumptionLimit?: number | null;
|
|
328
328
|
/**
|
|
329
329
|
* Whether the budget will be enabled or not.
|
|
330
330
|
*/
|
|
331
|
-
enabled?: boolean;
|
|
331
|
+
enabled?: boolean | null;
|
|
332
332
|
};
|
|
333
333
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Discount, DownloadInvoiceRequest, ExportInvoicesRequest, FinOpsApiListChargesRequest, GetInvoiceRequest, Invoice, ListChargesResponse, ListConsumptionsRequest, ListConsumptionsResponse, ListConsumptionsResponseConsumption, ListDiscountsRequest, ListDiscountsResponse, ListInvoicesRequest, ListInvoicesResponse, ListTaxesRequest, ListTaxesResponse, ListTaxesResponseTax, RedeemCouponRequest } from "./types.gen.js";
|
|
1
|
+
import { Discount, DiscountLine, DownloadInvoiceRequest, ExportInvoicesRequest, FinOpsApiListChargesRequest, GetInvoiceRequest, Invoice, InvoiceLine, ListChargesResponse, ListConsumptionsRequest, ListConsumptionsResponse, ListConsumptionsResponseConsumption, ListDiscountLinesRequest, ListDiscountLinesResponse, ListDiscountsRequest, ListDiscountsResponse, ListInvoiceLinesRequest, ListInvoiceLinesResponse, ListInvoicesRequest, ListInvoicesResponse, ListTaxesRequest, ListTaxesResponse, ListTaxesResponseTax, RedeemCouponRequest } from "./types.gen.js";
|
|
2
2
|
import { API, RequestOptions } from "@scaleway/sdk-client";
|
|
3
3
|
//#region src/v2beta1/api.gen.d.ts
|
|
4
4
|
/**
|
|
@@ -82,6 +82,28 @@ declare class API$1 extends API {
|
|
|
82
82
|
* @returns A Promise of Discount
|
|
83
83
|
*/
|
|
84
84
|
redeemCoupon: (request: Readonly<RedeemCouponRequest>, options?: RequestOptions) => Promise<Discount>;
|
|
85
|
+
protected pageOfListInvoiceLines: (request: Readonly<ListInvoiceLinesRequest>, options?: RequestOptions) => Promise<ListInvoiceLinesResponse>;
|
|
86
|
+
/**
|
|
87
|
+
* List invoice lines. List all lines of a given invoice, specified by its ID.
|
|
88
|
+
*
|
|
89
|
+
* @param request - The request {@link ListInvoiceLinesRequest}
|
|
90
|
+
* @returns A Promise of ListInvoiceLinesResponse
|
|
91
|
+
*/
|
|
92
|
+
listInvoiceLines: (request: Readonly<ListInvoiceLinesRequest>, options?: RequestOptions) => Promise<ListInvoiceLinesResponse> & {
|
|
93
|
+
all: () => Promise<InvoiceLine[]>;
|
|
94
|
+
[Symbol.asyncIterator]: () => AsyncGenerator<InvoiceLine[], void, void>;
|
|
95
|
+
};
|
|
96
|
+
protected pageOfListDiscountLines: (request: Readonly<ListDiscountLinesRequest>, options?: RequestOptions) => Promise<ListDiscountLinesResponse>;
|
|
97
|
+
/**
|
|
98
|
+
* List discount lines. List all discount lines of a given invoice, specified by its ID.
|
|
99
|
+
*
|
|
100
|
+
* @param request - The request {@link ListDiscountLinesRequest}
|
|
101
|
+
* @returns A Promise of ListDiscountLinesResponse
|
|
102
|
+
*/
|
|
103
|
+
listDiscountLines: (request: Readonly<ListDiscountLinesRequest>, options?: RequestOptions) => Promise<ListDiscountLinesResponse> & {
|
|
104
|
+
all: () => Promise<DiscountLine[]>;
|
|
105
|
+
[Symbol.asyncIterator]: () => AsyncGenerator<DiscountLine[], void, void>;
|
|
106
|
+
};
|
|
85
107
|
}
|
|
86
108
|
/**
|
|
87
109
|
* Billing FinOps API.
|
package/dist/v2beta1/api.gen.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { unmarshalDiscount, unmarshalInvoice, unmarshalListChargesResponse, unmarshalListConsumptionsResponse, unmarshalListDiscountsResponse, unmarshalListInvoicesResponse, unmarshalListTaxesResponse } from "./marshalling.gen.js";
|
|
1
|
+
import { unmarshalDiscount, unmarshalInvoice, unmarshalListChargesResponse, unmarshalListConsumptionsResponse, unmarshalListDiscountLinesResponse, unmarshalListDiscountsResponse, unmarshalListInvoiceLinesResponse, unmarshalListInvoicesResponse, unmarshalListTaxesResponse } from "./marshalling.gen.js";
|
|
2
2
|
import { API, enrichForPagination, resolveOneOf, urlParams, validatePathParam } from "@scaleway/sdk-client";
|
|
3
3
|
|
|
4
4
|
//#region src/v2beta1/api.gen.ts
|
|
@@ -71,6 +71,20 @@ var API$1 = class extends API {
|
|
|
71
71
|
urlParams: urlParams(["code", request.code], ["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId]),
|
|
72
72
|
signal: options?.signal
|
|
73
73
|
}, unmarshalDiscount);
|
|
74
|
+
this.pageOfListInvoiceLines = (request, options) => this.client.fetch({
|
|
75
|
+
method: "GET",
|
|
76
|
+
path: `/billing/v2beta1/invoices/${validatePathParam("invoiceId", request.invoiceId)}/lines`,
|
|
77
|
+
urlParams: urlParams(["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize]),
|
|
78
|
+
signal: options?.signal
|
|
79
|
+
}, unmarshalListInvoiceLinesResponse);
|
|
80
|
+
this.listInvoiceLines = (request, options) => enrichForPagination("invoiceLines", this.pageOfListInvoiceLines, request, options);
|
|
81
|
+
this.pageOfListDiscountLines = (request, options) => this.client.fetch({
|
|
82
|
+
method: "GET",
|
|
83
|
+
path: `/billing/v2beta1/invoices/${validatePathParam("invoiceId", request.invoiceId)}/discount-lines`,
|
|
84
|
+
urlParams: urlParams(["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize]),
|
|
85
|
+
signal: options?.signal
|
|
86
|
+
}, unmarshalListDiscountLinesResponse);
|
|
87
|
+
this.listDiscountLines = (request, options) => enrichForPagination("discountLines", this.pageOfListDiscountLines, request, options);
|
|
74
88
|
}
|
|
75
89
|
};
|
|
76
90
|
/**
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { DiscountDiscountMode, DiscountFilterType, DownloadInvoiceRequestFileType, ExportInvoicesRequestFileType, ExportInvoicesRequestOrderBy, InvoiceType, ListChargesRequestOrderBy, ListConsumptionsRequestOrderBy, ListDiscountsRequestOrderBy, ListInvoicesRequestOrderBy, ListTaxesRequestOrderBy } from "./types.gen.js";
|
|
1
|
+
import { DiscountDiscountMode, DiscountFilterType, DiscountLineOrigin, DownloadInvoiceRequestFileType, ExportInvoicesRequestFileType, ExportInvoicesRequestOrderBy, InvoiceType, ListChargesRequestOrderBy, ListConsumptionsRequestOrderBy, ListDiscountsRequestOrderBy, ListInvoicesRequestOrderBy, ListTaxesRequestOrderBy } from "./types.gen.js";
|
|
2
2
|
//#region src/v2beta1/constants.gen.d.ts
|
|
3
3
|
/** Lists all values of the enum {@link DiscountDiscountMode}. */
|
|
4
4
|
export declare const DISCOUNT_DISCOUNT_MODES: DiscountDiscountMode[];
|
|
5
5
|
/** Lists all values of the enum {@link DiscountFilterType}. */
|
|
6
6
|
export declare const DISCOUNT_FILTER_TYPES: DiscountFilterType[];
|
|
7
|
+
/** Lists all values of the enum {@link DiscountLineOrigin}. */
|
|
8
|
+
export declare const DISCOUNT_LINE_ORIGINS: DiscountLineOrigin[];
|
|
7
9
|
/** Lists all values of the enum {@link DownloadInvoiceRequestFileType}. */
|
|
8
10
|
export declare const DOWNLOAD_INVOICE_REQUEST_FILE_TYPES: DownloadInvoiceRequestFileType[];
|
|
9
11
|
/** Lists all values of the enum {@link ExportInvoicesRequestFileType}. */
|
|
@@ -16,6 +16,16 @@ const DISCOUNT_FILTER_TYPES = [
|
|
|
16
16
|
"region",
|
|
17
17
|
"zone"
|
|
18
18
|
];
|
|
19
|
+
/** Lists all values of the enum {@link DiscountLineOrigin}. */
|
|
20
|
+
const DISCOUNT_LINE_ORIGINS = [
|
|
21
|
+
"unknown_origin",
|
|
22
|
+
"discount",
|
|
23
|
+
"contractual_commitment_range",
|
|
24
|
+
"savings_plan_activation",
|
|
25
|
+
"credit_note_rebate",
|
|
26
|
+
"reserved_resource_activation",
|
|
27
|
+
"offer_included"
|
|
28
|
+
];
|
|
19
29
|
/** Lists all values of the enum {@link DownloadInvoiceRequestFileType}. */
|
|
20
30
|
const DOWNLOAD_INVOICE_REQUEST_FILE_TYPES = ["pdf"];
|
|
21
31
|
/** Lists all values of the enum {@link ExportInvoicesRequestFileType}. */
|
|
@@ -88,4 +98,4 @@ const LIST_TAXES_REQUEST_ORDER_BIES = [
|
|
|
88
98
|
];
|
|
89
99
|
|
|
90
100
|
//#endregion
|
|
91
|
-
export { DISCOUNT_DISCOUNT_MODES, DISCOUNT_FILTER_TYPES, DOWNLOAD_INVOICE_REQUEST_FILE_TYPES, EXPORT_INVOICES_REQUEST_FILE_TYPES, EXPORT_INVOICES_REQUEST_ORDER_BIES, INVOICE_TYPES, LIST_CHARGES_REQUEST_ORDER_BIES, LIST_CONSUMPTIONS_REQUEST_ORDER_BIES, LIST_DISCOUNTS_REQUEST_ORDER_BIES, LIST_INVOICES_REQUEST_ORDER_BIES, LIST_TAXES_REQUEST_ORDER_BIES };
|
|
101
|
+
export { DISCOUNT_DISCOUNT_MODES, DISCOUNT_FILTER_TYPES, DISCOUNT_LINE_ORIGINS, DOWNLOAD_INVOICE_REQUEST_FILE_TYPES, EXPORT_INVOICES_REQUEST_FILE_TYPES, EXPORT_INVOICES_REQUEST_ORDER_BIES, INVOICE_TYPES, LIST_CHARGES_REQUEST_ORDER_BIES, LIST_CONSUMPTIONS_REQUEST_ORDER_BIES, LIST_DISCOUNTS_REQUEST_ORDER_BIES, LIST_INVOICES_REQUEST_ORDER_BIES, LIST_TAXES_REQUEST_ORDER_BIES };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Charge, Discount, DiscountCoupon, DiscountDiscountMode, DiscountFilter, DiscountFilterType, DownloadInvoiceRequest, DownloadInvoiceRequestFileType, ExportInvoicesRequest, ExportInvoicesRequestFileType, ExportInvoicesRequestOrderBy, FinOpsApiListChargesRequest, GetInvoiceRequest, Invoice, InvoiceType, ListChargesRequestOrderBy, ListChargesResponse, ListConsumptionsRequest, ListConsumptionsRequestOrderBy, ListConsumptionsResponse, ListConsumptionsResponseConsumption, ListDiscountsRequest, ListDiscountsRequestOrderBy, ListDiscountsResponse, ListInvoicesRequest, ListInvoicesRequestOrderBy, ListInvoicesResponse, ListTaxesRequest, ListTaxesRequestOrderBy, ListTaxesResponse, ListTaxesResponseTax, RedeemCouponRequest } from "./types.gen.js";
|
|
1
|
+
import { Charge, Discount, DiscountCoupon, DiscountDiscountMode, DiscountFilter, DiscountFilterType, DiscountLine, DiscountLineOrigin, DownloadInvoiceRequest, DownloadInvoiceRequestFileType, ExportInvoicesRequest, ExportInvoicesRequestFileType, ExportInvoicesRequestOrderBy, FinOpsApiListChargesRequest, GetInvoiceRequest, Invoice, InvoiceLine, InvoiceType, ListChargesRequestOrderBy, ListChargesResponse, ListConsumptionsRequest, ListConsumptionsRequestOrderBy, ListConsumptionsResponse, ListConsumptionsResponseConsumption, ListDiscountLinesRequest, ListDiscountLinesResponse, ListDiscountsRequest, ListDiscountsRequestOrderBy, ListDiscountsResponse, ListInvoiceLinesRequest, ListInvoiceLinesResponse, ListInvoicesRequest, ListInvoicesRequestOrderBy, ListInvoicesResponse, ListTaxesRequest, ListTaxesRequestOrderBy, ListTaxesResponse, ListTaxesResponseTax, RedeemCouponRequest } from "./types.gen.js";
|
|
2
2
|
import { API, FinOpsAPI } from "./api.gen.js";
|
|
3
|
-
import { DISCOUNT_DISCOUNT_MODES, DISCOUNT_FILTER_TYPES, DOWNLOAD_INVOICE_REQUEST_FILE_TYPES, EXPORT_INVOICES_REQUEST_FILE_TYPES, EXPORT_INVOICES_REQUEST_ORDER_BIES, INVOICE_TYPES, LIST_CHARGES_REQUEST_ORDER_BIES, LIST_CONSUMPTIONS_REQUEST_ORDER_BIES, LIST_DISCOUNTS_REQUEST_ORDER_BIES, LIST_INVOICES_REQUEST_ORDER_BIES, LIST_TAXES_REQUEST_ORDER_BIES } from "./constants.gen.js";
|
|
4
|
-
import { unmarshalDiscount, unmarshalInvoice, unmarshalListChargesResponse, unmarshalListConsumptionsResponse, unmarshalListDiscountsResponse, unmarshalListInvoicesResponse, unmarshalListTaxesResponse } from "./marshalling.gen.js";
|
|
3
|
+
import { DISCOUNT_DISCOUNT_MODES, DISCOUNT_FILTER_TYPES, DISCOUNT_LINE_ORIGINS, DOWNLOAD_INVOICE_REQUEST_FILE_TYPES, EXPORT_INVOICES_REQUEST_FILE_TYPES, EXPORT_INVOICES_REQUEST_ORDER_BIES, INVOICE_TYPES, LIST_CHARGES_REQUEST_ORDER_BIES, LIST_CONSUMPTIONS_REQUEST_ORDER_BIES, LIST_DISCOUNTS_REQUEST_ORDER_BIES, LIST_INVOICES_REQUEST_ORDER_BIES, LIST_TAXES_REQUEST_ORDER_BIES } from "./constants.gen.js";
|
|
4
|
+
import { unmarshalDiscount, unmarshalInvoice, unmarshalListChargesResponse, unmarshalListConsumptionsResponse, unmarshalListDiscountLinesResponse, unmarshalListDiscountsResponse, unmarshalListInvoiceLinesResponse, unmarshalListInvoicesResponse, unmarshalListTaxesResponse } from "./marshalling.gen.js";
|
|
5
5
|
import { validation_rules_gen_d_exports } from "./validation-rules.gen.js";
|
|
6
6
|
declare namespace index_gen_d_exports {
|
|
7
|
-
export { API, Charge, DISCOUNT_DISCOUNT_MODES, DISCOUNT_FILTER_TYPES, DOWNLOAD_INVOICE_REQUEST_FILE_TYPES, Discount, DiscountCoupon, DiscountDiscountMode, DiscountFilter, DiscountFilterType, DownloadInvoiceRequest, DownloadInvoiceRequestFileType, EXPORT_INVOICES_REQUEST_FILE_TYPES, EXPORT_INVOICES_REQUEST_ORDER_BIES, ExportInvoicesRequest, ExportInvoicesRequestFileType, ExportInvoicesRequestOrderBy, FinOpsAPI, FinOpsApiListChargesRequest, GetInvoiceRequest, INVOICE_TYPES, Invoice, InvoiceType, LIST_CHARGES_REQUEST_ORDER_BIES, LIST_CONSUMPTIONS_REQUEST_ORDER_BIES, LIST_DISCOUNTS_REQUEST_ORDER_BIES, LIST_INVOICES_REQUEST_ORDER_BIES, LIST_TAXES_REQUEST_ORDER_BIES, ListChargesRequestOrderBy, ListChargesResponse, ListConsumptionsRequest, ListConsumptionsRequestOrderBy, ListConsumptionsResponse, ListConsumptionsResponseConsumption, ListDiscountsRequest, ListDiscountsRequestOrderBy, ListDiscountsResponse, ListInvoicesRequest, ListInvoicesRequestOrderBy, ListInvoicesResponse, ListTaxesRequest, ListTaxesRequestOrderBy, ListTaxesResponse, ListTaxesResponseTax, RedeemCouponRequest, validation_rules_gen_d_exports as ValidationRules, unmarshalDiscount, unmarshalInvoice, unmarshalListChargesResponse, unmarshalListConsumptionsResponse, unmarshalListDiscountsResponse, unmarshalListInvoicesResponse, unmarshalListTaxesResponse };
|
|
7
|
+
export { API, Charge, DISCOUNT_DISCOUNT_MODES, DISCOUNT_FILTER_TYPES, DISCOUNT_LINE_ORIGINS, DOWNLOAD_INVOICE_REQUEST_FILE_TYPES, Discount, DiscountCoupon, DiscountDiscountMode, DiscountFilter, DiscountFilterType, DiscountLine, DiscountLineOrigin, DownloadInvoiceRequest, DownloadInvoiceRequestFileType, EXPORT_INVOICES_REQUEST_FILE_TYPES, EXPORT_INVOICES_REQUEST_ORDER_BIES, ExportInvoicesRequest, ExportInvoicesRequestFileType, ExportInvoicesRequestOrderBy, FinOpsAPI, FinOpsApiListChargesRequest, GetInvoiceRequest, INVOICE_TYPES, Invoice, InvoiceLine, InvoiceType, LIST_CHARGES_REQUEST_ORDER_BIES, LIST_CONSUMPTIONS_REQUEST_ORDER_BIES, LIST_DISCOUNTS_REQUEST_ORDER_BIES, LIST_INVOICES_REQUEST_ORDER_BIES, LIST_TAXES_REQUEST_ORDER_BIES, ListChargesRequestOrderBy, ListChargesResponse, ListConsumptionsRequest, ListConsumptionsRequestOrderBy, ListConsumptionsResponse, ListConsumptionsResponseConsumption, ListDiscountLinesRequest, ListDiscountLinesResponse, ListDiscountsRequest, ListDiscountsRequestOrderBy, ListDiscountsResponse, ListInvoiceLinesRequest, ListInvoiceLinesResponse, ListInvoicesRequest, ListInvoicesRequestOrderBy, ListInvoicesResponse, ListTaxesRequest, ListTaxesRequestOrderBy, ListTaxesResponse, ListTaxesResponseTax, RedeemCouponRequest, validation_rules_gen_d_exports as ValidationRules, unmarshalDiscount, unmarshalInvoice, unmarshalListChargesResponse, unmarshalListConsumptionsResponse, unmarshalListDiscountLinesResponse, unmarshalListDiscountsResponse, unmarshalListInvoiceLinesResponse, unmarshalListInvoicesResponse, unmarshalListTaxesResponse };
|
|
8
8
|
}
|
|
9
9
|
//#endregion
|
|
10
|
-
export { API, type Charge, DISCOUNT_DISCOUNT_MODES, DISCOUNT_FILTER_TYPES, DOWNLOAD_INVOICE_REQUEST_FILE_TYPES, type Discount, type DiscountCoupon, type DiscountDiscountMode, type DiscountFilter, type DiscountFilterType, type DownloadInvoiceRequest, type DownloadInvoiceRequestFileType, EXPORT_INVOICES_REQUEST_FILE_TYPES, EXPORT_INVOICES_REQUEST_ORDER_BIES, type ExportInvoicesRequest, type ExportInvoicesRequestFileType, type ExportInvoicesRequestOrderBy, FinOpsAPI, type FinOpsApiListChargesRequest, type GetInvoiceRequest, INVOICE_TYPES, type Invoice, type InvoiceType, LIST_CHARGES_REQUEST_ORDER_BIES, LIST_CONSUMPTIONS_REQUEST_ORDER_BIES, LIST_DISCOUNTS_REQUEST_ORDER_BIES, LIST_INVOICES_REQUEST_ORDER_BIES, LIST_TAXES_REQUEST_ORDER_BIES, type ListChargesRequestOrderBy, type ListChargesResponse, type ListConsumptionsRequest, type ListConsumptionsRequestOrderBy, type ListConsumptionsResponse, type ListConsumptionsResponseConsumption, type ListDiscountsRequest, type ListDiscountsRequestOrderBy, type ListDiscountsResponse, type ListInvoicesRequest, type ListInvoicesRequestOrderBy, type ListInvoicesResponse, type ListTaxesRequest, type ListTaxesRequestOrderBy, type ListTaxesResponse, type ListTaxesResponseTax, type RedeemCouponRequest, validation_rules_gen_d_exports as ValidationRules, index_gen_d_exports, unmarshalDiscount, unmarshalInvoice, unmarshalListChargesResponse, unmarshalListConsumptionsResponse, unmarshalListDiscountsResponse, unmarshalListInvoicesResponse, unmarshalListTaxesResponse };
|
|
10
|
+
export { API, type Charge, DISCOUNT_DISCOUNT_MODES, DISCOUNT_FILTER_TYPES, DISCOUNT_LINE_ORIGINS, DOWNLOAD_INVOICE_REQUEST_FILE_TYPES, type Discount, type DiscountCoupon, type DiscountDiscountMode, type DiscountFilter, type DiscountFilterType, type DiscountLine, type DiscountLineOrigin, type DownloadInvoiceRequest, type DownloadInvoiceRequestFileType, EXPORT_INVOICES_REQUEST_FILE_TYPES, EXPORT_INVOICES_REQUEST_ORDER_BIES, type ExportInvoicesRequest, type ExportInvoicesRequestFileType, type ExportInvoicesRequestOrderBy, FinOpsAPI, type FinOpsApiListChargesRequest, type GetInvoiceRequest, INVOICE_TYPES, type Invoice, type InvoiceLine, type InvoiceType, LIST_CHARGES_REQUEST_ORDER_BIES, LIST_CONSUMPTIONS_REQUEST_ORDER_BIES, LIST_DISCOUNTS_REQUEST_ORDER_BIES, LIST_INVOICES_REQUEST_ORDER_BIES, LIST_TAXES_REQUEST_ORDER_BIES, type ListChargesRequestOrderBy, type ListChargesResponse, type ListConsumptionsRequest, type ListConsumptionsRequestOrderBy, type ListConsumptionsResponse, type ListConsumptionsResponseConsumption, type ListDiscountLinesRequest, type ListDiscountLinesResponse, type ListDiscountsRequest, type ListDiscountsRequestOrderBy, type ListDiscountsResponse, type ListInvoiceLinesRequest, type ListInvoiceLinesResponse, type ListInvoicesRequest, type ListInvoicesRequestOrderBy, type ListInvoicesResponse, type ListTaxesRequest, type ListTaxesRequestOrderBy, type ListTaxesResponse, type ListTaxesResponseTax, type RedeemCouponRequest, validation_rules_gen_d_exports as ValidationRules, index_gen_d_exports, unmarshalDiscount, unmarshalInvoice, unmarshalListChargesResponse, unmarshalListConsumptionsResponse, unmarshalListDiscountLinesResponse, unmarshalListDiscountsResponse, unmarshalListInvoiceLinesResponse, unmarshalListInvoicesResponse, unmarshalListTaxesResponse };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { unmarshalDiscount, unmarshalInvoice, unmarshalListChargesResponse, unmarshalListConsumptionsResponse, unmarshalListDiscountsResponse, unmarshalListInvoicesResponse, unmarshalListTaxesResponse } from "./marshalling.gen.js";
|
|
2
|
+
import { unmarshalDiscount, unmarshalInvoice, unmarshalListChargesResponse, unmarshalListConsumptionsResponse, unmarshalListDiscountLinesResponse, unmarshalListDiscountsResponse, unmarshalListInvoiceLinesResponse, unmarshalListInvoicesResponse, unmarshalListTaxesResponse } from "./marshalling.gen.js";
|
|
3
3
|
import { API, FinOpsAPI } from "./api.gen.js";
|
|
4
|
-
import { DISCOUNT_DISCOUNT_MODES, DISCOUNT_FILTER_TYPES, DOWNLOAD_INVOICE_REQUEST_FILE_TYPES, EXPORT_INVOICES_REQUEST_FILE_TYPES, EXPORT_INVOICES_REQUEST_ORDER_BIES, INVOICE_TYPES, LIST_CHARGES_REQUEST_ORDER_BIES, LIST_CONSUMPTIONS_REQUEST_ORDER_BIES, LIST_DISCOUNTS_REQUEST_ORDER_BIES, LIST_INVOICES_REQUEST_ORDER_BIES, LIST_TAXES_REQUEST_ORDER_BIES } from "./constants.gen.js";
|
|
4
|
+
import { DISCOUNT_DISCOUNT_MODES, DISCOUNT_FILTER_TYPES, DISCOUNT_LINE_ORIGINS, DOWNLOAD_INVOICE_REQUEST_FILE_TYPES, EXPORT_INVOICES_REQUEST_FILE_TYPES, EXPORT_INVOICES_REQUEST_ORDER_BIES, INVOICE_TYPES, LIST_CHARGES_REQUEST_ORDER_BIES, LIST_CONSUMPTIONS_REQUEST_ORDER_BIES, LIST_DISCOUNTS_REQUEST_ORDER_BIES, LIST_INVOICES_REQUEST_ORDER_BIES, LIST_TAXES_REQUEST_ORDER_BIES } from "./constants.gen.js";
|
|
5
5
|
import { validation_rules_gen_exports } from "./validation-rules.gen.js";
|
|
6
6
|
|
|
7
7
|
//#region src/v2beta1/index.gen.ts
|
|
@@ -9,6 +9,7 @@ var index_gen_exports = /* @__PURE__ */ __exportAll({
|
|
|
9
9
|
API: () => API,
|
|
10
10
|
DISCOUNT_DISCOUNT_MODES: () => DISCOUNT_DISCOUNT_MODES,
|
|
11
11
|
DISCOUNT_FILTER_TYPES: () => DISCOUNT_FILTER_TYPES,
|
|
12
|
+
DISCOUNT_LINE_ORIGINS: () => DISCOUNT_LINE_ORIGINS,
|
|
12
13
|
DOWNLOAD_INVOICE_REQUEST_FILE_TYPES: () => DOWNLOAD_INVOICE_REQUEST_FILE_TYPES,
|
|
13
14
|
EXPORT_INVOICES_REQUEST_FILE_TYPES: () => EXPORT_INVOICES_REQUEST_FILE_TYPES,
|
|
14
15
|
EXPORT_INVOICES_REQUEST_ORDER_BIES: () => EXPORT_INVOICES_REQUEST_ORDER_BIES,
|
|
@@ -24,10 +25,12 @@ var index_gen_exports = /* @__PURE__ */ __exportAll({
|
|
|
24
25
|
unmarshalInvoice: () => unmarshalInvoice,
|
|
25
26
|
unmarshalListChargesResponse: () => unmarshalListChargesResponse,
|
|
26
27
|
unmarshalListConsumptionsResponse: () => unmarshalListConsumptionsResponse,
|
|
28
|
+
unmarshalListDiscountLinesResponse: () => unmarshalListDiscountLinesResponse,
|
|
27
29
|
unmarshalListDiscountsResponse: () => unmarshalListDiscountsResponse,
|
|
30
|
+
unmarshalListInvoiceLinesResponse: () => unmarshalListInvoiceLinesResponse,
|
|
28
31
|
unmarshalListInvoicesResponse: () => unmarshalListInvoicesResponse,
|
|
29
32
|
unmarshalListTaxesResponse: () => unmarshalListTaxesResponse
|
|
30
33
|
});
|
|
31
34
|
|
|
32
35
|
//#endregion
|
|
33
|
-
export { API, DISCOUNT_DISCOUNT_MODES, DISCOUNT_FILTER_TYPES, DOWNLOAD_INVOICE_REQUEST_FILE_TYPES, EXPORT_INVOICES_REQUEST_FILE_TYPES, EXPORT_INVOICES_REQUEST_ORDER_BIES, FinOpsAPI, INVOICE_TYPES, LIST_CHARGES_REQUEST_ORDER_BIES, LIST_CONSUMPTIONS_REQUEST_ORDER_BIES, LIST_DISCOUNTS_REQUEST_ORDER_BIES, LIST_INVOICES_REQUEST_ORDER_BIES, LIST_TAXES_REQUEST_ORDER_BIES, validation_rules_gen_exports as ValidationRules, index_gen_exports, unmarshalDiscount, unmarshalInvoice, unmarshalListChargesResponse, unmarshalListConsumptionsResponse, unmarshalListDiscountsResponse, unmarshalListInvoicesResponse, unmarshalListTaxesResponse };
|
|
36
|
+
export { API, DISCOUNT_DISCOUNT_MODES, DISCOUNT_FILTER_TYPES, DISCOUNT_LINE_ORIGINS, DOWNLOAD_INVOICE_REQUEST_FILE_TYPES, EXPORT_INVOICES_REQUEST_FILE_TYPES, EXPORT_INVOICES_REQUEST_ORDER_BIES, FinOpsAPI, INVOICE_TYPES, LIST_CHARGES_REQUEST_ORDER_BIES, LIST_CONSUMPTIONS_REQUEST_ORDER_BIES, LIST_DISCOUNTS_REQUEST_ORDER_BIES, LIST_INVOICES_REQUEST_ORDER_BIES, LIST_TAXES_REQUEST_ORDER_BIES, validation_rules_gen_exports as ValidationRules, index_gen_exports, unmarshalDiscount, unmarshalInvoice, unmarshalListChargesResponse, unmarshalListConsumptionsResponse, unmarshalListDiscountLinesResponse, unmarshalListDiscountsResponse, unmarshalListInvoiceLinesResponse, unmarshalListInvoicesResponse, unmarshalListTaxesResponse };
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { Discount, Invoice, ListChargesResponse, ListConsumptionsResponse, ListDiscountsResponse, ListInvoicesResponse, ListTaxesResponse } from "./types.gen.js";
|
|
1
|
+
import { Discount, Invoice, ListChargesResponse, ListConsumptionsResponse, ListDiscountLinesResponse, ListDiscountsResponse, ListInvoiceLinesResponse, ListInvoicesResponse, ListTaxesResponse } from "./types.gen.js";
|
|
2
2
|
//#region src/v2beta1/marshalling.gen.d.ts
|
|
3
3
|
export declare const unmarshalDiscount: (data: unknown) => Discount;
|
|
4
4
|
export declare const unmarshalInvoice: (data: unknown) => Invoice;
|
|
5
5
|
export declare const unmarshalListChargesResponse: (data: unknown) => ListChargesResponse;
|
|
6
6
|
export declare const unmarshalListConsumptionsResponse: (data: unknown) => ListConsumptionsResponse;
|
|
7
|
+
export declare const unmarshalListDiscountLinesResponse: (data: unknown) => ListDiscountLinesResponse;
|
|
7
8
|
export declare const unmarshalListDiscountsResponse: (data: unknown) => ListDiscountsResponse;
|
|
9
|
+
export declare const unmarshalListInvoiceLinesResponse: (data: unknown) => ListInvoiceLinesResponse;
|
|
8
10
|
export declare const unmarshalListInvoicesResponse: (data: unknown) => ListInvoicesResponse;
|
|
9
11
|
export declare const unmarshalListTaxesResponse: (data: unknown) => ListTaxesResponse;
|
|
10
12
|
//#endregion
|
|
@@ -3,7 +3,7 @@ import { isJSONObject, unmarshalArrayOfObject, unmarshalDate, unmarshalMoney } f
|
|
|
3
3
|
//#region src/v2beta1/marshalling.gen.ts
|
|
4
4
|
const unmarshalDiscountCoupon = (data) => {
|
|
5
5
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DiscountCoupon' failed as data isn't a dictionary.`);
|
|
6
|
-
return { description: data.description };
|
|
6
|
+
return { description: data.description ?? null };
|
|
7
7
|
};
|
|
8
8
|
const unmarshalDiscountFilter = (data) => {
|
|
9
9
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DiscountFilter' failed as data isn't a dictionary.`);
|
|
@@ -16,15 +16,15 @@ const unmarshalDiscountFilter = (data) => {
|
|
|
16
16
|
const unmarshalDiscount = (data) => {
|
|
17
17
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Discount' failed as data isn't a dictionary.`);
|
|
18
18
|
return {
|
|
19
|
-
coupon: data.coupon ? unmarshalDiscountCoupon(data.coupon) :
|
|
20
|
-
creationDate: unmarshalDate(data.creation_date),
|
|
19
|
+
coupon: data.coupon ? unmarshalDiscountCoupon(data.coupon) : null,
|
|
20
|
+
creationDate: unmarshalDate(data.creation_date) ?? null,
|
|
21
21
|
description: data.description,
|
|
22
22
|
filters: unmarshalArrayOfObject(data.filters, unmarshalDiscountFilter),
|
|
23
23
|
id: data.id,
|
|
24
24
|
mode: data.mode,
|
|
25
25
|
organizationId: data.organization_id,
|
|
26
|
-
startDate: unmarshalDate(data.start_date),
|
|
27
|
-
stopDate: unmarshalDate(data.stop_date),
|
|
26
|
+
startDate: unmarshalDate(data.start_date) ?? null,
|
|
27
|
+
stopDate: unmarshalDate(data.stop_date) ?? null,
|
|
28
28
|
value: data.value,
|
|
29
29
|
valueRemaining: data.value_remaining,
|
|
30
30
|
valueUsed: data.value_used
|
|
@@ -33,47 +33,47 @@ const unmarshalDiscount = (data) => {
|
|
|
33
33
|
const unmarshalInvoice = (data) => {
|
|
34
34
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Invoice' failed as data isn't a dictionary.`);
|
|
35
35
|
return {
|
|
36
|
-
billingPeriod: unmarshalDate(data.billing_period),
|
|
37
|
-
dueDate: unmarshalDate(data.due_date),
|
|
36
|
+
billingPeriod: unmarshalDate(data.billing_period) ?? null,
|
|
37
|
+
dueDate: unmarshalDate(data.due_date) ?? null,
|
|
38
38
|
id: data.id,
|
|
39
|
-
issuedDate: unmarshalDate(data.issued_date),
|
|
39
|
+
issuedDate: unmarshalDate(data.issued_date) ?? null,
|
|
40
40
|
number: data.number,
|
|
41
41
|
organizationId: data.organization_id,
|
|
42
42
|
organizationName: data.organization_name,
|
|
43
43
|
sellerName: data.seller_name,
|
|
44
|
-
startDate: unmarshalDate(data.start_date),
|
|
44
|
+
startDate: unmarshalDate(data.start_date) ?? null,
|
|
45
45
|
state: data.state,
|
|
46
|
-
stopDate: unmarshalDate(data.stop_date),
|
|
47
|
-
totalDiscount: data.total_discount ? unmarshalMoney(data.total_discount) :
|
|
48
|
-
totalTax: data.total_tax ? unmarshalMoney(data.total_tax) :
|
|
49
|
-
totalTaxed: data.total_taxed ? unmarshalMoney(data.total_taxed) :
|
|
50
|
-
totalUndiscount: data.total_undiscount ? unmarshalMoney(data.total_undiscount) :
|
|
51
|
-
totalUntaxed: data.total_untaxed ? unmarshalMoney(data.total_untaxed) :
|
|
46
|
+
stopDate: unmarshalDate(data.stop_date) ?? null,
|
|
47
|
+
totalDiscount: data.total_discount ? unmarshalMoney(data.total_discount) : null,
|
|
48
|
+
totalTax: data.total_tax ? unmarshalMoney(data.total_tax) : null,
|
|
49
|
+
totalTaxed: data.total_taxed ? unmarshalMoney(data.total_taxed) : null,
|
|
50
|
+
totalUndiscount: data.total_undiscount ? unmarshalMoney(data.total_undiscount) : null,
|
|
51
|
+
totalUntaxed: data.total_untaxed ? unmarshalMoney(data.total_untaxed) : null,
|
|
52
52
|
type: data.type
|
|
53
53
|
};
|
|
54
54
|
};
|
|
55
55
|
const unmarshalCharge = (data) => {
|
|
56
56
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Charge' failed as data isn't a dictionary.`);
|
|
57
57
|
return {
|
|
58
|
-
endDate: unmarshalDate(data.end_date),
|
|
58
|
+
endDate: unmarshalDate(data.end_date) ?? null,
|
|
59
59
|
invoiceId: data.invoice_id,
|
|
60
60
|
organizationId: data.organization_id,
|
|
61
61
|
organizationName: data.organization_name,
|
|
62
|
-
price: data.price ? unmarshalMoney(data.price) :
|
|
62
|
+
price: data.price ? unmarshalMoney(data.price) : null,
|
|
63
63
|
projectId: data.project_id,
|
|
64
64
|
projectName: data.project_name,
|
|
65
65
|
resourceId: data.resource_id,
|
|
66
|
-
resourceName: data.resource_name,
|
|
66
|
+
resourceName: data.resource_name ?? null,
|
|
67
67
|
sku: data.sku,
|
|
68
|
-
startDate: unmarshalDate(data.start_date),
|
|
69
|
-
updatedAt: unmarshalDate(data.updated_at)
|
|
68
|
+
startDate: unmarshalDate(data.start_date) ?? null,
|
|
69
|
+
updatedAt: unmarshalDate(data.updated_at) ?? null
|
|
70
70
|
};
|
|
71
71
|
};
|
|
72
72
|
const unmarshalListChargesResponse = (data) => {
|
|
73
73
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListChargesResponse' failed as data isn't a dictionary.`);
|
|
74
74
|
return {
|
|
75
75
|
charges: unmarshalArrayOfObject(data.charges, unmarshalCharge),
|
|
76
|
-
nextPageToken: data.next_page_token
|
|
76
|
+
nextPageToken: data.next_page_token ?? null
|
|
77
77
|
};
|
|
78
78
|
};
|
|
79
79
|
const unmarshalListConsumptionsResponseConsumption = (data) => {
|
|
@@ -89,7 +89,7 @@ const unmarshalListConsumptionsResponseConsumption = (data) => {
|
|
|
89
89
|
resourceName: data.resource_name,
|
|
90
90
|
sku: data.sku,
|
|
91
91
|
unit: data.unit,
|
|
92
|
-
value: data.value ? unmarshalMoney(data.value) :
|
|
92
|
+
value: data.value ? unmarshalMoney(data.value) : null
|
|
93
93
|
};
|
|
94
94
|
};
|
|
95
95
|
const unmarshalListConsumptionsResponse = (data) => {
|
|
@@ -98,7 +98,23 @@ const unmarshalListConsumptionsResponse = (data) => {
|
|
|
98
98
|
consumptions: unmarshalArrayOfObject(data.consumptions, unmarshalListConsumptionsResponseConsumption),
|
|
99
99
|
totalCount: data.total_count,
|
|
100
100
|
totalDiscountUntaxedValue: data.total_discount_untaxed_value,
|
|
101
|
-
updatedAt: unmarshalDate(data.updated_at)
|
|
101
|
+
updatedAt: unmarshalDate(data.updated_at) ?? null
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
const unmarshalDiscountLine = (data) => {
|
|
105
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DiscountLine' failed as data isn't a dictionary.`);
|
|
106
|
+
return {
|
|
107
|
+
id: data.id,
|
|
108
|
+
invoiceLineId: data.invoice_line_id,
|
|
109
|
+
origin: data.origin,
|
|
110
|
+
value: data.value ? unmarshalMoney(data.value) : null
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
const unmarshalListDiscountLinesResponse = (data) => {
|
|
114
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListDiscountLinesResponse' failed as data isn't a dictionary.`);
|
|
115
|
+
return {
|
|
116
|
+
discountLines: unmarshalArrayOfObject(data.discount_lines, unmarshalDiscountLine),
|
|
117
|
+
totalCount: data.total_count
|
|
102
118
|
};
|
|
103
119
|
};
|
|
104
120
|
const unmarshalListDiscountsResponse = (data) => {
|
|
@@ -108,6 +124,36 @@ const unmarshalListDiscountsResponse = (data) => {
|
|
|
108
124
|
totalCount: data.total_count
|
|
109
125
|
};
|
|
110
126
|
};
|
|
127
|
+
const unmarshalInvoiceLine = (data) => {
|
|
128
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'InvoiceLine' failed as data isn't a dictionary.`);
|
|
129
|
+
return {
|
|
130
|
+
billedQuantity: data.billed_quantity,
|
|
131
|
+
categoryName: data.category_name,
|
|
132
|
+
id: data.id,
|
|
133
|
+
invoiceId: data.invoice_id,
|
|
134
|
+
organizationId: data.organization_id,
|
|
135
|
+
organizationName: data.organization_name,
|
|
136
|
+
productName: data.product_name,
|
|
137
|
+
projectId: data.project_id,
|
|
138
|
+
projectName: data.project_name,
|
|
139
|
+
resourceCount: data.resource_count,
|
|
140
|
+
resourceName: data.resource_name,
|
|
141
|
+
sku: data.sku,
|
|
142
|
+
startDate: unmarshalDate(data.start_date) ?? null,
|
|
143
|
+
stopDate: unmarshalDate(data.stop_date) ?? null,
|
|
144
|
+
unit: data.unit,
|
|
145
|
+
unitPrice: data.unit_price ? unmarshalMoney(data.unit_price) : null,
|
|
146
|
+
unitQuantity: data.unit_quantity,
|
|
147
|
+
untaxedValue: data.untaxed_value ? unmarshalMoney(data.untaxed_value) : null
|
|
148
|
+
};
|
|
149
|
+
};
|
|
150
|
+
const unmarshalListInvoiceLinesResponse = (data) => {
|
|
151
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListInvoiceLinesResponse' failed as data isn't a dictionary.`);
|
|
152
|
+
return {
|
|
153
|
+
invoiceLines: unmarshalArrayOfObject(data.invoice_lines, unmarshalInvoiceLine),
|
|
154
|
+
totalCount: data.total_count
|
|
155
|
+
};
|
|
156
|
+
};
|
|
111
157
|
const unmarshalListInvoicesResponse = (data) => {
|
|
112
158
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListInvoicesResponse' failed as data isn't a dictionary.`);
|
|
113
159
|
return {
|
|
@@ -120,8 +166,8 @@ const unmarshalListTaxesResponseTax = (data) => {
|
|
|
120
166
|
return {
|
|
121
167
|
currency: data.currency,
|
|
122
168
|
description: data.description,
|
|
123
|
-
rate: data.rate,
|
|
124
|
-
totalTaxValue: data.total_tax_value
|
|
169
|
+
rate: data.rate ?? null,
|
|
170
|
+
totalTaxValue: data.total_tax_value ?? null
|
|
125
171
|
};
|
|
126
172
|
};
|
|
127
173
|
const unmarshalListTaxesResponse = (data) => {
|
|
@@ -129,9 +175,9 @@ const unmarshalListTaxesResponse = (data) => {
|
|
|
129
175
|
return {
|
|
130
176
|
taxes: unmarshalArrayOfObject(data.taxes, unmarshalListTaxesResponseTax),
|
|
131
177
|
totalCount: data.total_count,
|
|
132
|
-
updatedAt: unmarshalDate(data.updated_at)
|
|
178
|
+
updatedAt: unmarshalDate(data.updated_at) ?? null
|
|
133
179
|
};
|
|
134
180
|
};
|
|
135
181
|
|
|
136
182
|
//#endregion
|
|
137
|
-
export { unmarshalDiscount, unmarshalInvoice, unmarshalListChargesResponse, unmarshalListConsumptionsResponse, unmarshalListDiscountsResponse, unmarshalListInvoicesResponse, unmarshalListTaxesResponse };
|
|
183
|
+
export { unmarshalDiscount, unmarshalInvoice, unmarshalListChargesResponse, unmarshalListConsumptionsResponse, unmarshalListDiscountLinesResponse, unmarshalListDiscountsResponse, unmarshalListInvoiceLinesResponse, unmarshalListInvoicesResponse, unmarshalListTaxesResponse };
|
|
@@ -67,6 +67,32 @@ export declare const queriesMetadata: {
|
|
|
67
67
|
readonly listItemTypeNamespace: '@scaleway/sdk-billing/v2beta1';
|
|
68
68
|
readonly isPrivate: false;
|
|
69
69
|
readonly description: '"';
|
|
70
|
+
}, {
|
|
71
|
+
readonly methodName: 'listInvoiceLines';
|
|
72
|
+
readonly protoName: 'ListInvoiceLines';
|
|
73
|
+
readonly paramsType: 'ListInvoiceLinesRequest';
|
|
74
|
+
readonly returnType: 'ListInvoiceLinesResponse';
|
|
75
|
+
readonly returnTypeNamespace: '@scaleway/sdk-billing/v2beta1';
|
|
76
|
+
readonly isList: true;
|
|
77
|
+
readonly paginationType: 'offset';
|
|
78
|
+
readonly pageParamKey: 'page';
|
|
79
|
+
readonly listItemType: 'InvoiceLine';
|
|
80
|
+
readonly listItemTypeNamespace: '@scaleway/sdk-billing/v2beta1';
|
|
81
|
+
readonly isPrivate: false;
|
|
82
|
+
readonly description: '"';
|
|
83
|
+
}, {
|
|
84
|
+
readonly methodName: 'listDiscountLines';
|
|
85
|
+
readonly protoName: 'ListDiscountLines';
|
|
86
|
+
readonly paramsType: 'ListDiscountLinesRequest';
|
|
87
|
+
readonly returnType: 'ListDiscountLinesResponse';
|
|
88
|
+
readonly returnTypeNamespace: '@scaleway/sdk-billing/v2beta1';
|
|
89
|
+
readonly isList: true;
|
|
90
|
+
readonly paginationType: 'offset';
|
|
91
|
+
readonly pageParamKey: 'page';
|
|
92
|
+
readonly listItemType: 'DiscountLine';
|
|
93
|
+
readonly listItemTypeNamespace: '@scaleway/sdk-billing/v2beta1';
|
|
94
|
+
readonly isPrivate: false;
|
|
95
|
+
readonly description: '"';
|
|
70
96
|
}];
|
|
71
97
|
}, {
|
|
72
98
|
readonly apiClass: 'FinOpsAPI';
|
|
@@ -72,6 +72,34 @@ const queriesMetadata = {
|
|
|
72
72
|
listItemTypeNamespace: "@scaleway/sdk-billing/v2beta1",
|
|
73
73
|
isPrivate: false,
|
|
74
74
|
description: "\""
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
methodName: "listInvoiceLines",
|
|
78
|
+
protoName: "ListInvoiceLines",
|
|
79
|
+
paramsType: "ListInvoiceLinesRequest",
|
|
80
|
+
returnType: "ListInvoiceLinesResponse",
|
|
81
|
+
returnTypeNamespace: "@scaleway/sdk-billing/v2beta1",
|
|
82
|
+
isList: true,
|
|
83
|
+
paginationType: "offset",
|
|
84
|
+
pageParamKey: "page",
|
|
85
|
+
listItemType: "InvoiceLine",
|
|
86
|
+
listItemTypeNamespace: "@scaleway/sdk-billing/v2beta1",
|
|
87
|
+
isPrivate: false,
|
|
88
|
+
description: "\""
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
methodName: "listDiscountLines",
|
|
92
|
+
protoName: "ListDiscountLines",
|
|
93
|
+
paramsType: "ListDiscountLinesRequest",
|
|
94
|
+
returnType: "ListDiscountLinesResponse",
|
|
95
|
+
returnTypeNamespace: "@scaleway/sdk-billing/v2beta1",
|
|
96
|
+
isList: true,
|
|
97
|
+
paginationType: "offset",
|
|
98
|
+
pageParamKey: "page",
|
|
99
|
+
listItemType: "DiscountLine",
|
|
100
|
+
listItemTypeNamespace: "@scaleway/sdk-billing/v2beta1",
|
|
101
|
+
isPrivate: false,
|
|
102
|
+
description: "\""
|
|
75
103
|
}
|
|
76
104
|
]
|
|
77
105
|
}, {
|
|
@@ -2,6 +2,7 @@ import { Money } from "@scaleway/sdk-client";
|
|
|
2
2
|
//#region src/v2beta1/types.gen.d.ts
|
|
3
3
|
export type DiscountDiscountMode = 'unknown_discount_mode' | 'discount_mode_rate' | 'discount_mode_value' | 'discount_mode_splittable';
|
|
4
4
|
export type DiscountFilterType = 'unknown_type' | 'category_name' | 'product_name' | 'product_range' | 'resource_name' | 'region' | 'zone';
|
|
5
|
+
export type DiscountLineOrigin = 'unknown_origin' | 'discount' | 'contractual_commitment_range' | 'savings_plan_activation' | 'credit_note_rebate' | 'reserved_resource_activation' | 'offer_included';
|
|
5
6
|
export type DownloadInvoiceRequestFileType = 'pdf';
|
|
6
7
|
export type ExportInvoicesRequestFileType = 'csv';
|
|
7
8
|
export type ExportInvoicesRequestOrderBy = 'invoice_number_desc' | 'invoice_number_asc' | 'start_date_desc' | 'start_date_asc' | 'issued_date_desc' | 'issued_date_asc' | 'due_date_desc' | 'due_date_asc' | 'total_untaxed_desc' | 'total_untaxed_asc' | 'total_taxed_desc' | 'total_taxed_asc' | 'invoice_type_desc' | 'invoice_type_asc';
|
|
@@ -15,7 +16,7 @@ export interface DiscountCoupon {
|
|
|
15
16
|
/**
|
|
16
17
|
* The description of the coupon.
|
|
17
18
|
*/
|
|
18
|
-
description?: string;
|
|
19
|
+
description?: string | null;
|
|
19
20
|
}
|
|
20
21
|
export interface DiscountFilter {
|
|
21
22
|
/**
|
|
@@ -63,29 +64,29 @@ export interface Charge {
|
|
|
63
64
|
/**
|
|
64
65
|
* Optional display name assigned to the resource that incurs the charge.
|
|
65
66
|
*/
|
|
66
|
-
resourceName?: string;
|
|
67
|
+
resourceName?: string | null;
|
|
67
68
|
/**
|
|
68
69
|
* Price of the charge.
|
|
69
70
|
*/
|
|
70
|
-
price?: Money;
|
|
71
|
+
price?: Money | null;
|
|
71
72
|
/**
|
|
72
73
|
* Start date of the charge.
|
|
73
74
|
*/
|
|
74
|
-
startDate?: Date;
|
|
75
|
+
startDate?: Date | null;
|
|
75
76
|
/**
|
|
76
77
|
* End date of the charge, included.
|
|
77
78
|
*/
|
|
78
|
-
endDate?: Date;
|
|
79
|
+
endDate?: Date | null;
|
|
79
80
|
/**
|
|
80
81
|
* Date the charge was last updated.
|
|
81
82
|
*/
|
|
82
|
-
updatedAt?: Date;
|
|
83
|
+
updatedAt?: Date | null;
|
|
83
84
|
}
|
|
84
85
|
export interface ListConsumptionsResponseConsumption {
|
|
85
86
|
/**
|
|
86
87
|
* Monetary value of the consumption.
|
|
87
88
|
*/
|
|
88
|
-
value?: Money;
|
|
89
|
+
value?: Money | null;
|
|
89
90
|
/**
|
|
90
91
|
* The product name. For example, "VPC Public Gateway S", "VPC Public Gateway M" for the VPC product.
|
|
91
92
|
*/
|
|
@@ -127,6 +128,24 @@ export interface ListConsumptionsResponseConsumption {
|
|
|
127
128
|
*/
|
|
128
129
|
organizationName: string;
|
|
129
130
|
}
|
|
131
|
+
export interface DiscountLine {
|
|
132
|
+
/**
|
|
133
|
+
* Discount line ID.
|
|
134
|
+
*/
|
|
135
|
+
id: string;
|
|
136
|
+
/**
|
|
137
|
+
* ID of the invoice line the discount applies to.
|
|
138
|
+
*/
|
|
139
|
+
invoiceLineId: string;
|
|
140
|
+
/**
|
|
141
|
+
* The origin of the discount line.
|
|
142
|
+
*/
|
|
143
|
+
origin: DiscountLineOrigin;
|
|
144
|
+
/**
|
|
145
|
+
* The value of the discount.
|
|
146
|
+
*/
|
|
147
|
+
value?: Money | null;
|
|
148
|
+
}
|
|
130
149
|
export interface Discount {
|
|
131
150
|
/**
|
|
132
151
|
* The ID of the discount.
|
|
@@ -135,7 +154,7 @@ export interface Discount {
|
|
|
135
154
|
/**
|
|
136
155
|
* The creation date of the discount.
|
|
137
156
|
*/
|
|
138
|
-
creationDate?: Date;
|
|
157
|
+
creationDate?: Date | null;
|
|
139
158
|
/**
|
|
140
159
|
* The Organization ID of the discount.
|
|
141
160
|
*/
|
|
@@ -163,20 +182,94 @@ export interface Discount {
|
|
|
163
182
|
/**
|
|
164
183
|
* The start date of the discount.
|
|
165
184
|
*/
|
|
166
|
-
startDate?: Date;
|
|
185
|
+
startDate?: Date | null;
|
|
167
186
|
/**
|
|
168
187
|
* The stop date of the discount.
|
|
169
188
|
*/
|
|
170
|
-
stopDate?: Date;
|
|
189
|
+
stopDate?: Date | null;
|
|
171
190
|
/**
|
|
172
191
|
* The description of the coupon.
|
|
173
192
|
*/
|
|
174
|
-
coupon?: DiscountCoupon;
|
|
193
|
+
coupon?: DiscountCoupon | null;
|
|
175
194
|
/**
|
|
176
195
|
* List of the discount scopes.
|
|
177
196
|
*/
|
|
178
197
|
filters: DiscountFilter[];
|
|
179
198
|
}
|
|
199
|
+
export interface InvoiceLine {
|
|
200
|
+
/**
|
|
201
|
+
* Invoice line ID.
|
|
202
|
+
*/
|
|
203
|
+
id: string;
|
|
204
|
+
/**
|
|
205
|
+
* ID of the invoice the line belongs to.
|
|
206
|
+
*/
|
|
207
|
+
invoiceId: string;
|
|
208
|
+
/**
|
|
209
|
+
* Organization ID of the consumer for this line.
|
|
210
|
+
*/
|
|
211
|
+
organizationId: string;
|
|
212
|
+
/**
|
|
213
|
+
* Organization name of the consumer for this line.
|
|
214
|
+
*/
|
|
215
|
+
organizationName: string;
|
|
216
|
+
/**
|
|
217
|
+
* Project ID of the line.
|
|
218
|
+
*/
|
|
219
|
+
projectId: string;
|
|
220
|
+
/**
|
|
221
|
+
* Project name of the line.
|
|
222
|
+
*/
|
|
223
|
+
projectName: string;
|
|
224
|
+
/**
|
|
225
|
+
* Unique identifier of the product.
|
|
226
|
+
*/
|
|
227
|
+
sku: string;
|
|
228
|
+
/**
|
|
229
|
+
* Name of consumption category.
|
|
230
|
+
*/
|
|
231
|
+
categoryName: string;
|
|
232
|
+
/**
|
|
233
|
+
* The product name.
|
|
234
|
+
*/
|
|
235
|
+
productName: string;
|
|
236
|
+
/**
|
|
237
|
+
* Identifies the reference based on the category.
|
|
238
|
+
*/
|
|
239
|
+
resourceName: string;
|
|
240
|
+
/**
|
|
241
|
+
* Start date of the line.
|
|
242
|
+
*/
|
|
243
|
+
startDate?: Date | null;
|
|
244
|
+
/**
|
|
245
|
+
* Stop date of the line.
|
|
246
|
+
*/
|
|
247
|
+
stopDate?: Date | null;
|
|
248
|
+
/**
|
|
249
|
+
* Unit price of the reference.
|
|
250
|
+
*/
|
|
251
|
+
unitPrice?: Money | null;
|
|
252
|
+
/**
|
|
253
|
+
* Untaxed value of the line.
|
|
254
|
+
*/
|
|
255
|
+
untaxedValue?: Money | null;
|
|
256
|
+
/**
|
|
257
|
+
* Unit of consumed quantity.
|
|
258
|
+
*/
|
|
259
|
+
unit: string;
|
|
260
|
+
/**
|
|
261
|
+
* Quantity per unit.
|
|
262
|
+
*/
|
|
263
|
+
unitQuantity: string;
|
|
264
|
+
/**
|
|
265
|
+
* Billed quantity.
|
|
266
|
+
*/
|
|
267
|
+
billedQuantity: string;
|
|
268
|
+
/**
|
|
269
|
+
* Number of unique resources billed on this line.
|
|
270
|
+
*/
|
|
271
|
+
resourceCount: number;
|
|
272
|
+
}
|
|
180
273
|
export interface Invoice {
|
|
181
274
|
/**
|
|
182
275
|
* Invoice ID.
|
|
@@ -187,40 +280,40 @@ export interface Invoice {
|
|
|
187
280
|
/**
|
|
188
281
|
* Start date of the billing period.
|
|
189
282
|
*/
|
|
190
|
-
startDate?: Date;
|
|
191
|
-
stopDate?: Date;
|
|
283
|
+
startDate?: Date | null;
|
|
284
|
+
stopDate?: Date | null;
|
|
192
285
|
/**
|
|
193
286
|
* The billing period of the invoice in the YYYY-MM format.
|
|
194
287
|
*/
|
|
195
|
-
billingPeriod?: Date;
|
|
288
|
+
billingPeriod?: Date | null;
|
|
196
289
|
/**
|
|
197
290
|
* Date when the invoice was sent to the customer.
|
|
198
291
|
*/
|
|
199
|
-
issuedDate?: Date;
|
|
292
|
+
issuedDate?: Date | null;
|
|
200
293
|
/**
|
|
201
294
|
* Payment time limit, set according to the Organization's payment conditions.
|
|
202
295
|
*/
|
|
203
|
-
dueDate?: Date;
|
|
296
|
+
dueDate?: Date | null;
|
|
204
297
|
/**
|
|
205
298
|
* Total amount, untaxed.
|
|
206
299
|
*/
|
|
207
|
-
totalUntaxed?: Money;
|
|
300
|
+
totalUntaxed?: Money | null;
|
|
208
301
|
/**
|
|
209
302
|
* Total amount, taxed.
|
|
210
303
|
*/
|
|
211
|
-
totalTaxed?: Money;
|
|
304
|
+
totalTaxed?: Money | null;
|
|
212
305
|
/**
|
|
213
306
|
* The total tax amount of the invoice.
|
|
214
307
|
*/
|
|
215
|
-
totalTax?: Money;
|
|
308
|
+
totalTax?: Money | null;
|
|
216
309
|
/**
|
|
217
310
|
* The total discount amount of the invoice.
|
|
218
311
|
*/
|
|
219
|
-
totalDiscount?: Money;
|
|
312
|
+
totalDiscount?: Money | null;
|
|
220
313
|
/**
|
|
221
314
|
* The total amount of the invoice before applying the discount.
|
|
222
315
|
*/
|
|
223
|
-
totalUndiscount?: Money;
|
|
316
|
+
totalUndiscount?: Money | null;
|
|
224
317
|
/**
|
|
225
318
|
* Type of invoice, either periodic or purchase.
|
|
226
319
|
*/
|
|
@@ -250,11 +343,11 @@ export interface ListTaxesResponseTax {
|
|
|
250
343
|
/**
|
|
251
344
|
* Applied tax rate (0.2 means a VAT of 20%).
|
|
252
345
|
*/
|
|
253
|
-
rate?: number;
|
|
346
|
+
rate?: number | null;
|
|
254
347
|
/**
|
|
255
348
|
* The total tax value of the consumption.
|
|
256
349
|
*/
|
|
257
|
-
totalTaxValue?: number;
|
|
350
|
+
totalTaxValue?: number | null;
|
|
258
351
|
}
|
|
259
352
|
export type DownloadInvoiceRequest = {
|
|
260
353
|
/**
|
|
@@ -264,91 +357,91 @@ export type DownloadInvoiceRequest = {
|
|
|
264
357
|
/**
|
|
265
358
|
* File type. PDF by default.
|
|
266
359
|
*/
|
|
267
|
-
fileType?: DownloadInvoiceRequestFileType;
|
|
360
|
+
fileType?: DownloadInvoiceRequestFileType | null;
|
|
268
361
|
};
|
|
269
362
|
export type ExportInvoicesRequest = {
|
|
270
363
|
/**
|
|
271
364
|
* Organization ID. If specified, only invoices from this Organization will be returned.
|
|
272
365
|
*/
|
|
273
|
-
organizationId?: string;
|
|
366
|
+
organizationId?: string | null;
|
|
274
367
|
/**
|
|
275
368
|
* Return only invoice with start date greater than billing_period_start.
|
|
276
369
|
*/
|
|
277
|
-
billingPeriodStartAfter?: Date;
|
|
370
|
+
billingPeriodStartAfter?: Date | null;
|
|
278
371
|
/**
|
|
279
372
|
* Return only invoice with start date less than billing_period_start.
|
|
280
373
|
*/
|
|
281
|
-
billingPeriodStartBefore?: Date;
|
|
374
|
+
billingPeriodStartBefore?: Date | null;
|
|
282
375
|
/**
|
|
283
376
|
* Invoice type. It can either be `periodic`, `purchase` or `credit_note`.
|
|
284
377
|
*/
|
|
285
|
-
invoiceType?: InvoiceType;
|
|
378
|
+
invoiceType?: InvoiceType | null;
|
|
286
379
|
/**
|
|
287
380
|
* Page number.
|
|
288
381
|
*/
|
|
289
|
-
page?: number;
|
|
382
|
+
page?: number | null;
|
|
290
383
|
/**
|
|
291
384
|
* Positive integer lower or equal to 100 to select the number of items to return.
|
|
292
385
|
*/
|
|
293
|
-
pageSize?: number;
|
|
386
|
+
pageSize?: number | null;
|
|
294
387
|
/**
|
|
295
388
|
* How invoices are ordered in the response.
|
|
296
389
|
*/
|
|
297
|
-
orderBy?: ExportInvoicesRequestOrderBy;
|
|
390
|
+
orderBy?: ExportInvoicesRequestOrderBy | null;
|
|
298
391
|
/**
|
|
299
392
|
* File format for exporting the invoice list.
|
|
300
393
|
*/
|
|
301
|
-
fileType?: ExportInvoicesRequestFileType;
|
|
394
|
+
fileType?: ExportInvoicesRequestFileType | null;
|
|
302
395
|
};
|
|
303
396
|
export type FinOpsApiListChargesRequest = {
|
|
304
397
|
/**
|
|
305
398
|
* Sort order of charges in the response.
|
|
306
399
|
*/
|
|
307
|
-
orderBy?: ListChargesRequestOrderBy;
|
|
400
|
+
orderBy?: ListChargesRequestOrderBy | null;
|
|
308
401
|
/**
|
|
309
402
|
* Token returned by previous call to list next paginated charges, omitted for first page.
|
|
310
403
|
*/
|
|
311
|
-
pageToken?: string;
|
|
404
|
+
pageToken?: string | null;
|
|
312
405
|
/**
|
|
313
406
|
* Number of charges to return per page.
|
|
314
407
|
*/
|
|
315
|
-
pageSize?: number;
|
|
408
|
+
pageSize?: number | null;
|
|
316
409
|
/**
|
|
317
410
|
* Minimum start date of charges to filter for, defaults to the start of the billing period.
|
|
318
411
|
*/
|
|
319
|
-
startDateAfter?: Date;
|
|
412
|
+
startDateAfter?: Date | null;
|
|
320
413
|
/**
|
|
321
414
|
* Maximum end date of charges to filter for, defaults to the end of the billing period.
|
|
322
415
|
*/
|
|
323
|
-
endDateBefore?: Date;
|
|
416
|
+
endDateBefore?: Date | null;
|
|
324
417
|
/**
|
|
325
418
|
* Invoice IDs to filter for, only charges from these invoices will be returned.
|
|
326
419
|
*/
|
|
327
|
-
invoiceIds?: string[];
|
|
420
|
+
invoiceIds?: string[] | null;
|
|
328
421
|
/**
|
|
329
422
|
* Organization ID to filter for, only charges for this organization will be returned.
|
|
330
423
|
*/
|
|
331
|
-
organizationId?: string;
|
|
424
|
+
organizationId?: string | null;
|
|
332
425
|
/**
|
|
333
426
|
* Project IDs to filter for, only charges for these projects will be returned.
|
|
334
427
|
*/
|
|
335
|
-
projectIds?: string[];
|
|
428
|
+
projectIds?: string[] | null;
|
|
336
429
|
/**
|
|
337
430
|
* Resource IDs to filter for, only charges for these resources will be returned.
|
|
338
431
|
*/
|
|
339
|
-
resourceIds?: string[];
|
|
432
|
+
resourceIds?: string[] | null;
|
|
340
433
|
/**
|
|
341
434
|
* Resource display names to filter for, only charges for these resources will be returned.
|
|
342
435
|
*/
|
|
343
|
-
resourceNames?: string[];
|
|
436
|
+
resourceNames?: string[] | null;
|
|
344
437
|
/**
|
|
345
438
|
* SKU IDs to filter for, only charges for these SKUs will be returned.
|
|
346
439
|
*/
|
|
347
|
-
skus?: string[];
|
|
440
|
+
skus?: string[] | null;
|
|
348
441
|
/**
|
|
349
442
|
* Clamp charges to the requested time range.
|
|
350
443
|
*/
|
|
351
|
-
clampToTimeRange?: boolean;
|
|
444
|
+
clampToTimeRange?: boolean | null;
|
|
352
445
|
};
|
|
353
446
|
export type GetInvoiceRequest = {
|
|
354
447
|
/**
|
|
@@ -364,41 +457,41 @@ export interface ListChargesResponse {
|
|
|
364
457
|
/**
|
|
365
458
|
* Page token to use with following call to keep listing charges if there are more.
|
|
366
459
|
*/
|
|
367
|
-
nextPageToken?: string;
|
|
460
|
+
nextPageToken?: string | null;
|
|
368
461
|
}
|
|
369
462
|
export type ListConsumptionsRequest = {
|
|
370
463
|
/**
|
|
371
464
|
* Order consumptions list in the response by their update date.
|
|
372
465
|
*/
|
|
373
|
-
orderBy?: ListConsumptionsRequestOrderBy;
|
|
466
|
+
orderBy?: ListConsumptionsRequestOrderBy | null;
|
|
374
467
|
/**
|
|
375
468
|
* Positive integer to choose the page to return.
|
|
376
469
|
*/
|
|
377
|
-
page?: number;
|
|
470
|
+
page?: number | null;
|
|
378
471
|
/**
|
|
379
472
|
* Positive integer lower or equal to 100 to select the number of items to return.
|
|
380
473
|
*/
|
|
381
|
-
pageSize?: number;
|
|
474
|
+
pageSize?: number | null;
|
|
382
475
|
/**
|
|
383
476
|
* Filter by Organization ID.
|
|
384
477
|
*
|
|
385
478
|
* One-of ('projectIdentifier'): at most one of 'organizationId', 'projectId' could be set.
|
|
386
479
|
*/
|
|
387
|
-
organizationId?: string;
|
|
480
|
+
organizationId?: string | null;
|
|
388
481
|
/**
|
|
389
482
|
* Filter by Project ID.
|
|
390
483
|
*
|
|
391
484
|
* One-of ('projectIdentifier'): at most one of 'organizationId', 'projectId' could be set.
|
|
392
485
|
*/
|
|
393
|
-
projectId?: string;
|
|
486
|
+
projectId?: string | null;
|
|
394
487
|
/**
|
|
395
488
|
* Filter by name of a Category as they are shown in the invoice (Compute, Network, Observability).
|
|
396
489
|
*/
|
|
397
|
-
categoryName?: string;
|
|
490
|
+
categoryName?: string | null;
|
|
398
491
|
/**
|
|
399
492
|
* Filter by the billing period in the YYYY-MM format. If it is empty the current billing period will be used as default.
|
|
400
493
|
*/
|
|
401
|
-
billingPeriod?: string;
|
|
494
|
+
billingPeriod?: string | null;
|
|
402
495
|
};
|
|
403
496
|
export interface ListConsumptionsResponse {
|
|
404
497
|
/**
|
|
@@ -416,25 +509,49 @@ export interface ListConsumptionsResponse {
|
|
|
416
509
|
/**
|
|
417
510
|
* Last consumption update date.
|
|
418
511
|
*/
|
|
419
|
-
updatedAt?: Date;
|
|
512
|
+
updatedAt?: Date | null;
|
|
513
|
+
}
|
|
514
|
+
export type ListDiscountLinesRequest = {
|
|
515
|
+
/**
|
|
516
|
+
* Invoice ID.
|
|
517
|
+
*/
|
|
518
|
+
invoiceId: string;
|
|
519
|
+
/**
|
|
520
|
+
* Positive integer to choose the page to return.
|
|
521
|
+
*/
|
|
522
|
+
page?: number | null;
|
|
523
|
+
/**
|
|
524
|
+
* Positive integer lower or equal to 1000 to select the number of items to return.
|
|
525
|
+
*/
|
|
526
|
+
pageSize?: number | null;
|
|
527
|
+
};
|
|
528
|
+
export interface ListDiscountLinesResponse {
|
|
529
|
+
/**
|
|
530
|
+
* Total number of discount lines.
|
|
531
|
+
*/
|
|
532
|
+
totalCount: number;
|
|
533
|
+
/**
|
|
534
|
+
* Paginated returned discount lines.
|
|
535
|
+
*/
|
|
536
|
+
discountLines: DiscountLine[];
|
|
420
537
|
}
|
|
421
538
|
export type ListDiscountsRequest = {
|
|
422
539
|
/**
|
|
423
540
|
* Order discounts in the response by their description.
|
|
424
541
|
*/
|
|
425
|
-
orderBy?: ListDiscountsRequestOrderBy;
|
|
542
|
+
orderBy?: ListDiscountsRequestOrderBy | null;
|
|
426
543
|
/**
|
|
427
544
|
* Positive integer to choose the page to return.
|
|
428
545
|
*/
|
|
429
|
-
page?: number;
|
|
546
|
+
page?: number | null;
|
|
430
547
|
/**
|
|
431
548
|
* Positive integer lower or equal to 100 to select the number of items to return.
|
|
432
549
|
*/
|
|
433
|
-
pageSize?: number;
|
|
550
|
+
pageSize?: number | null;
|
|
434
551
|
/**
|
|
435
552
|
* ID of the organization.
|
|
436
553
|
*/
|
|
437
|
-
organizationId?: string;
|
|
554
|
+
organizationId?: string | null;
|
|
438
555
|
};
|
|
439
556
|
export interface ListDiscountsResponse {
|
|
440
557
|
/**
|
|
@@ -446,35 +563,59 @@ export interface ListDiscountsResponse {
|
|
|
446
563
|
*/
|
|
447
564
|
discounts: Discount[];
|
|
448
565
|
}
|
|
566
|
+
export type ListInvoiceLinesRequest = {
|
|
567
|
+
/**
|
|
568
|
+
* Invoice ID.
|
|
569
|
+
*/
|
|
570
|
+
invoiceId: string;
|
|
571
|
+
/**
|
|
572
|
+
* Positive integer to choose the page to return.
|
|
573
|
+
*/
|
|
574
|
+
page?: number | null;
|
|
575
|
+
/**
|
|
576
|
+
* Positive integer lower or equal to 1000 to select the number of items to return.
|
|
577
|
+
*/
|
|
578
|
+
pageSize?: number | null;
|
|
579
|
+
};
|
|
580
|
+
export interface ListInvoiceLinesResponse {
|
|
581
|
+
/**
|
|
582
|
+
* Total number of invoice lines.
|
|
583
|
+
*/
|
|
584
|
+
totalCount: number;
|
|
585
|
+
/**
|
|
586
|
+
* Paginated returned invoice lines.
|
|
587
|
+
*/
|
|
588
|
+
invoiceLines: InvoiceLine[];
|
|
589
|
+
}
|
|
449
590
|
export type ListInvoicesRequest = {
|
|
450
591
|
/**
|
|
451
592
|
* Organization ID. If specified, only invoices from this Organization will be returned.
|
|
452
593
|
*/
|
|
453
|
-
organizationId?: string;
|
|
594
|
+
organizationId?: string | null;
|
|
454
595
|
/**
|
|
455
596
|
* Return only invoice with start date greater than billing_period_start.
|
|
456
597
|
*/
|
|
457
|
-
billingPeriodStartAfter?: Date;
|
|
598
|
+
billingPeriodStartAfter?: Date | null;
|
|
458
599
|
/**
|
|
459
600
|
* Return only invoice with start date less than billing_period_start.
|
|
460
601
|
*/
|
|
461
|
-
billingPeriodStartBefore?: Date;
|
|
602
|
+
billingPeriodStartBefore?: Date | null;
|
|
462
603
|
/**
|
|
463
604
|
* Invoice type. It can either be `periodic`, `purchase` or `credit_note`.
|
|
464
605
|
*/
|
|
465
|
-
invoiceType?: InvoiceType;
|
|
606
|
+
invoiceType?: InvoiceType | null;
|
|
466
607
|
/**
|
|
467
608
|
* Page number.
|
|
468
609
|
*/
|
|
469
|
-
page?: number;
|
|
610
|
+
page?: number | null;
|
|
470
611
|
/**
|
|
471
612
|
* Positive integer lower or equal to 100 to select the number of items to return.
|
|
472
613
|
*/
|
|
473
|
-
pageSize?: number;
|
|
614
|
+
pageSize?: number | null;
|
|
474
615
|
/**
|
|
475
616
|
* How invoices are ordered in the response.
|
|
476
617
|
*/
|
|
477
|
-
orderBy?: ListInvoicesRequestOrderBy;
|
|
618
|
+
orderBy?: ListInvoicesRequestOrderBy | null;
|
|
478
619
|
};
|
|
479
620
|
export interface ListInvoicesResponse {
|
|
480
621
|
/**
|
|
@@ -490,23 +631,23 @@ export type ListTaxesRequest = {
|
|
|
490
631
|
/**
|
|
491
632
|
* Order consumed taxes list in the response by their update date.
|
|
492
633
|
*/
|
|
493
|
-
orderBy?: ListTaxesRequestOrderBy;
|
|
634
|
+
orderBy?: ListTaxesRequestOrderBy | null;
|
|
494
635
|
/**
|
|
495
636
|
* Page number.
|
|
496
637
|
*/
|
|
497
|
-
page?: number;
|
|
638
|
+
page?: number | null;
|
|
498
639
|
/**
|
|
499
640
|
* Positive integer lower or equal to 100 to select the number of items to return.
|
|
500
641
|
*/
|
|
501
|
-
pageSize?: number;
|
|
642
|
+
pageSize?: number | null;
|
|
502
643
|
/**
|
|
503
644
|
* Filter by Organization ID.
|
|
504
645
|
*/
|
|
505
|
-
organizationId?: string;
|
|
646
|
+
organizationId?: string | null;
|
|
506
647
|
/**
|
|
507
648
|
* Filter by the billing period in the YYYY-MM format. If it is empty the current billing period will be used as default.
|
|
508
649
|
*/
|
|
509
|
-
billingPeriod?: string;
|
|
650
|
+
billingPeriod?: string | null;
|
|
510
651
|
};
|
|
511
652
|
export interface ListTaxesResponse {
|
|
512
653
|
/**
|
|
@@ -520,13 +661,13 @@ export interface ListTaxesResponse {
|
|
|
520
661
|
/**
|
|
521
662
|
* Last consumption update date.
|
|
522
663
|
*/
|
|
523
|
-
updatedAt?: Date;
|
|
664
|
+
updatedAt?: Date | null;
|
|
524
665
|
}
|
|
525
666
|
export type RedeemCouponRequest = {
|
|
526
667
|
/**
|
|
527
668
|
* The Organization ID of the discount.
|
|
528
669
|
*/
|
|
529
|
-
organizationId?: string;
|
|
670
|
+
organizationId?: string | null;
|
|
530
671
|
/**
|
|
531
672
|
* The code of the coupon to redeem.
|
|
532
673
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk-billing",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.23.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.6"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@repo/configs": "^0.1.1",
|
|
40
|
-
"@scaleway/sdk-client": "^2.
|
|
40
|
+
"@scaleway/sdk-client": "^2.17.0"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"@scaleway/sdk-client": "^2.
|
|
43
|
+
"@scaleway/sdk-client": "^2.17.0"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
46
|
"package:check": "pnpm publint",
|