@scaleway/sdk-environmental-footprint 2.6.0 → 2.7.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.
|
@@ -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/v1alpha1/api.gen.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { marshalUserApiDownloadImpactReportRequest, unmarshalImpactDataResponse, unmarshalImpactReportAvailability } from "./marshalling.gen.js";
|
|
2
2
|
import { API, urlParams } from "@scaleway/sdk-client";
|
|
3
|
+
//#region src/v1alpha1/api.gen.ts
|
|
3
4
|
var jsonContentHeaders = { "Content-Type": "application/json; charset=utf-8" };
|
|
4
5
|
/**
|
|
5
6
|
* Environmental Footprint API.
|
|
@@ -44,4 +45,5 @@ var UserAPI = class extends API {
|
|
|
44
45
|
urlParams: urlParams(["end_date", request.endDate], ["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId], ["product_categories", request.productCategories], ["project_ids", request.projectIds], ["regions", request.regions], ["service_categories", request.serviceCategories], ["start_date", request.startDate], ["zones", request.zones])
|
|
45
46
|
}, unmarshalImpactDataResponse);
|
|
46
47
|
};
|
|
48
|
+
//#endregion
|
|
47
49
|
export { UserAPI };
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { marshalUserApiDownloadImpactReportRequest, unmarshalImpactDataResponse, unmarshalImpactReportAvailability } from "./marshalling.gen.js";
|
|
3
3
|
import { UserAPI } from "./api.gen.js";
|
|
4
|
+
//#region src/v1alpha1/index.gen.ts
|
|
4
5
|
var index_gen_exports = /* @__PURE__ */ __exportAll({
|
|
5
6
|
UserAPI: () => UserAPI,
|
|
6
7
|
marshalUserApiDownloadImpactReportRequest: () => marshalUserApiDownloadImpactReportRequest,
|
|
7
8
|
unmarshalImpactDataResponse: () => unmarshalImpactDataResponse,
|
|
8
9
|
unmarshalImpactReportAvailability: () => unmarshalImpactReportAvailability
|
|
9
10
|
});
|
|
10
|
-
|
|
11
|
+
//#endregion
|
|
12
|
+
export { UserAPI, index_gen_exports, marshalUserApiDownloadImpactReportRequest, unmarshalImpactDataResponse, unmarshalImpactReportAvailability };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { isJSONObject, unmarshalArrayOfObject, unmarshalDate } from "@scaleway/sdk-client";
|
|
2
|
+
//#region src/v1alpha1/marshalling.gen.ts
|
|
2
3
|
var unmarshalImpact = (data) => {
|
|
3
4
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Impact' failed as data isn't a dictionary.`);
|
|
4
5
|
return {
|
|
@@ -39,7 +40,7 @@ var unmarshalProjectImpact = (data) => {
|
|
|
39
40
|
totalProjectImpact: data.total_project_impact ? unmarshalImpact(data.total_project_impact) : void 0
|
|
40
41
|
};
|
|
41
42
|
};
|
|
42
|
-
|
|
43
|
+
var unmarshalImpactDataResponse = (data) => {
|
|
43
44
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ImpactDataResponse' failed as data isn't a dictionary.`);
|
|
44
45
|
return {
|
|
45
46
|
endDate: unmarshalDate(data.end_date),
|
|
@@ -48,16 +49,17 @@ const unmarshalImpactDataResponse = (data) => {
|
|
|
48
49
|
totalImpact: data.total_impact ? unmarshalImpact(data.total_impact) : void 0
|
|
49
50
|
};
|
|
50
51
|
};
|
|
51
|
-
|
|
52
|
+
var unmarshalImpactReportAvailability = (data) => {
|
|
52
53
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ImpactReportAvailability' failed as data isn't a dictionary.`);
|
|
53
54
|
return {
|
|
54
55
|
monthSummaryReports: unmarshalArrayOfObject(data.month_summary_reports, unmarshalDate),
|
|
55
56
|
yearlySummaryReports: unmarshalArrayOfObject(data.yearly_summary_reports, unmarshalDate)
|
|
56
57
|
};
|
|
57
58
|
};
|
|
58
|
-
|
|
59
|
+
var marshalUserApiDownloadImpactReportRequest = (request, defaults) => ({
|
|
59
60
|
date: request.date,
|
|
60
61
|
organization_id: request.organizationId ?? defaults.defaultOrganizationId,
|
|
61
62
|
type: request.type
|
|
62
63
|
});
|
|
64
|
+
//#endregion
|
|
63
65
|
export { marshalUserApiDownloadImpactReportRequest, unmarshalImpactDataResponse, unmarshalImpactReportAvailability };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Region as ScwRegion, Zone as ScwZone } from '@scaleway/sdk-client';
|
|
2
|
-
export type ProductCategory = 'unknown_product_category' | 'apple_silicon' | 'block_storage' | 'dedibox' | 'elastic_metal' | 'instances' | 'object_storage' | 'load_balancer' | 'kubernetes';
|
|
2
|
+
export type ProductCategory = 'unknown_product_category' | 'apple_silicon' | 'block_storage' | 'dedibox' | 'elastic_metal' | 'instances' | 'object_storage' | 'load_balancer' | 'kubernetes' | 'managed_relational_databases' | 'managed_mongodb' | 'managed_redis';
|
|
3
3
|
export type ReportType = 'unknown_report_type' | 'monthly' | 'yearly';
|
|
4
|
-
export type ServiceCategory = 'unknown_service_category' | 'baremetal' | 'compute' | 'storage' | 'network' | 'containers';
|
|
4
|
+
export type ServiceCategory = 'unknown_service_category' | 'baremetal' | 'compute' | 'storage' | 'network' | 'containers' | 'databases';
|
|
5
5
|
export interface Impact {
|
|
6
6
|
/**
|
|
7
7
|
* The estimated carbon emissions in kilograms of CO₂ equivalent (kgCO₂e).
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk-environmental-footprint",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0",
|
|
4
4
|
"description": "Scaleway SDK environmental-footprint",
|
|
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",
|