@scaleway/sdk-billing 2.3.1 → 2.3.2
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.
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __exportAll = (all, no_symbols) => {
|
|
3
4
|
let target = {};
|
|
@@ -8,4 +9,5 @@ var __exportAll = (all, no_symbols) => {
|
|
|
8
9
|
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
9
10
|
return target;
|
|
10
11
|
};
|
|
12
|
+
//#endregion
|
|
11
13
|
export { __exportAll };
|
package/dist/v2beta1/api.gen.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { unmarshalDiscount, unmarshalInvoice, unmarshalListConsumptionsResponse, unmarshalListDiscountsResponse, unmarshalListInvoicesResponse, unmarshalListTaxesResponse } from "./marshalling.gen.js";
|
|
2
|
-
import { API, enrichForPagination, resolveOneOf, urlParams, validatePathParam } from "@scaleway/sdk-client";
|
|
2
|
+
import { API as API$1, enrichForPagination, resolveOneOf, urlParams, validatePathParam } from "@scaleway/sdk-client";
|
|
3
|
+
//#region src/v2beta1/api.gen.ts
|
|
3
4
|
/**
|
|
4
5
|
* Billing API.
|
|
5
6
|
|
|
6
7
|
This API allows you to manage and query your Scaleway billing and consumption.
|
|
7
8
|
*/
|
|
8
|
-
var API
|
|
9
|
+
var API = class extends API$1 {
|
|
9
10
|
pageOfListConsumptions = (request = {}) => this.client.fetch({
|
|
10
11
|
method: "GET",
|
|
11
12
|
path: `/billing/v2beta1/consumptions`,
|
|
@@ -111,4 +112,5 @@ var API$1 = class extends API {
|
|
|
111
112
|
urlParams: urlParams(["code", request.code], ["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId])
|
|
112
113
|
}, unmarshalDiscount);
|
|
113
114
|
};
|
|
114
|
-
|
|
115
|
+
//#endregion
|
|
116
|
+
export { API };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { unmarshalDiscount, unmarshalInvoice, unmarshalListConsumptionsResponse, unmarshalListDiscountsResponse, unmarshalListInvoicesResponse, unmarshalListTaxesResponse } from "./marshalling.gen.js";
|
|
3
3
|
import { API } from "./api.gen.js";
|
|
4
|
+
//#region src/v2beta1/index.gen.ts
|
|
4
5
|
var index_gen_exports = /* @__PURE__ */ __exportAll({
|
|
5
6
|
API: () => API,
|
|
6
7
|
unmarshalDiscount: () => unmarshalDiscount,
|
|
@@ -10,4 +11,5 @@ var index_gen_exports = /* @__PURE__ */ __exportAll({
|
|
|
10
11
|
unmarshalListInvoicesResponse: () => unmarshalListInvoicesResponse,
|
|
11
12
|
unmarshalListTaxesResponse: () => unmarshalListTaxesResponse
|
|
12
13
|
});
|
|
13
|
-
|
|
14
|
+
//#endregion
|
|
15
|
+
export { API, index_gen_exports, unmarshalDiscount, unmarshalInvoice, unmarshalListConsumptionsResponse, unmarshalListDiscountsResponse, unmarshalListInvoicesResponse, unmarshalListTaxesResponse };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { isJSONObject, unmarshalArrayOfObject, unmarshalDate, unmarshalMoney } from "@scaleway/sdk-client";
|
|
2
|
+
//#region src/v2beta1/marshalling.gen.ts
|
|
2
3
|
var unmarshalDiscountCoupon = (data) => {
|
|
3
4
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DiscountCoupon' failed as data isn't a dictionary.`);
|
|
4
5
|
return { description: data.description };
|
|
@@ -11,7 +12,7 @@ var unmarshalDiscountFilter = (data) => {
|
|
|
11
12
|
value: data.value
|
|
12
13
|
};
|
|
13
14
|
};
|
|
14
|
-
|
|
15
|
+
var unmarshalDiscount = (data) => {
|
|
15
16
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Discount' failed as data isn't a dictionary.`);
|
|
16
17
|
return {
|
|
17
18
|
coupon: data.coupon ? unmarshalDiscountCoupon(data.coupon) : void 0,
|
|
@@ -28,7 +29,7 @@ const unmarshalDiscount = (data) => {
|
|
|
28
29
|
valueUsed: data.value_used
|
|
29
30
|
};
|
|
30
31
|
};
|
|
31
|
-
|
|
32
|
+
var unmarshalInvoice = (data) => {
|
|
32
33
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Invoice' failed as data isn't a dictionary.`);
|
|
33
34
|
return {
|
|
34
35
|
billingPeriod: unmarshalDate(data.billing_period),
|
|
@@ -64,7 +65,7 @@ var unmarshalListConsumptionsResponseConsumption = (data) => {
|
|
|
64
65
|
value: data.value ? unmarshalMoney(data.value) : void 0
|
|
65
66
|
};
|
|
66
67
|
};
|
|
67
|
-
|
|
68
|
+
var unmarshalListConsumptionsResponse = (data) => {
|
|
68
69
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListConsumptionsResponse' failed as data isn't a dictionary.`);
|
|
69
70
|
return {
|
|
70
71
|
consumptions: unmarshalArrayOfObject(data.consumptions, unmarshalListConsumptionsResponseConsumption),
|
|
@@ -73,14 +74,14 @@ const unmarshalListConsumptionsResponse = (data) => {
|
|
|
73
74
|
updatedAt: unmarshalDate(data.updated_at)
|
|
74
75
|
};
|
|
75
76
|
};
|
|
76
|
-
|
|
77
|
+
var unmarshalListDiscountsResponse = (data) => {
|
|
77
78
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListDiscountsResponse' failed as data isn't a dictionary.`);
|
|
78
79
|
return {
|
|
79
80
|
discounts: unmarshalArrayOfObject(data.discounts, unmarshalDiscount),
|
|
80
81
|
totalCount: data.total_count
|
|
81
82
|
};
|
|
82
83
|
};
|
|
83
|
-
|
|
84
|
+
var unmarshalListInvoicesResponse = (data) => {
|
|
84
85
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListInvoicesResponse' failed as data isn't a dictionary.`);
|
|
85
86
|
return {
|
|
86
87
|
invoices: unmarshalArrayOfObject(data.invoices, unmarshalInvoice),
|
|
@@ -96,7 +97,7 @@ var unmarshalListTaxesResponseTax = (data) => {
|
|
|
96
97
|
totalTaxValue: data.total_tax_value
|
|
97
98
|
};
|
|
98
99
|
};
|
|
99
|
-
|
|
100
|
+
var unmarshalListTaxesResponse = (data) => {
|
|
100
101
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListTaxesResponse' failed as data isn't a dictionary.`);
|
|
101
102
|
return {
|
|
102
103
|
taxes: unmarshalArrayOfObject(data.taxes, unmarshalListTaxesResponseTax),
|
|
@@ -104,4 +105,5 @@ const unmarshalListTaxesResponse = (data) => {
|
|
|
104
105
|
updatedAt: unmarshalDate(data.updated_at)
|
|
105
106
|
};
|
|
106
107
|
};
|
|
108
|
+
//#endregion
|
|
107
109
|
export { unmarshalDiscount, unmarshalInvoice, unmarshalListConsumptionsResponse, unmarshalListDiscountsResponse, unmarshalListInvoicesResponse, unmarshalListTaxesResponse };
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk-billing",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.2",
|
|
4
4
|
"description": "Scaleway SDK billing",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"files": [
|
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
"node": ">=20.19.6"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@scaleway/random-name": "5.1.
|
|
30
|
-
"@scaleway/sdk-std": "2.2.
|
|
29
|
+
"@scaleway/random-name": "5.1.4",
|
|
30
|
+
"@scaleway/sdk-std": "2.2.2"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"@scaleway/sdk-client": "^2.2.
|
|
33
|
+
"@scaleway/sdk-client": "^2.2.2"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@scaleway/sdk-client": "^2.2.
|
|
36
|
+
"@scaleway/sdk-client": "^2.2.2"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
39
|
"package:check": "pnpm publint",
|