@scaleway/sdk-environmental-footprint 2.6.1 → 2.7.1

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 };
@@ -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
- export { index_gen_exports };
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
- const unmarshalImpactDataResponse = (data) => {
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
- const unmarshalImpactReportAvailability = (data) => {
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
- const marshalUserApiDownloadImpactReportRequest = (request, defaults) => ({
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 };
@@ -0,0 +1,28 @@
1
+ export declare const queriesMetadata: {
2
+ readonly namespace: "environmental_footprint";
3
+ readonly version: "v1alpha1";
4
+ readonly folderName: "environmentalFootprintv1alpha1";
5
+ readonly services: readonly [{
6
+ readonly apiClass: "UserAPI";
7
+ readonly methods: readonly [{
8
+ readonly methodName: "getImpactReportAvailability";
9
+ readonly protoName: "GetImpactReportAvailability";
10
+ readonly paramsType: "UserApiGetImpactReportAvailabilityRequest";
11
+ readonly returnType: "ImpactReportAvailability";
12
+ readonly isList: false;
13
+ readonly paginationType: "none";
14
+ readonly isPrivate: false;
15
+ readonly description: "\"";
16
+ }, {
17
+ readonly methodName: "getImpactData";
18
+ readonly protoName: "GetImpactData";
19
+ readonly paramsType: "UserApiGetImpactDataRequest";
20
+ readonly returnType: "ImpactDataResponse";
21
+ readonly isList: false;
22
+ readonly paginationType: "none";
23
+ readonly isPrivate: false;
24
+ readonly description: "\"";
25
+ }];
26
+ }];
27
+ };
28
+ export type QueriesMetadata = typeof queriesMetadata;
@@ -0,0 +1,30 @@
1
+ //#region src/v1alpha1/metadata.gen.ts
2
+ var queriesMetadata = {
3
+ namespace: "environmental_footprint",
4
+ version: "v1alpha1",
5
+ folderName: "environmentalFootprintv1alpha1",
6
+ services: [{
7
+ apiClass: "UserAPI",
8
+ methods: [{
9
+ methodName: "getImpactReportAvailability",
10
+ protoName: "GetImpactReportAvailability",
11
+ paramsType: "UserApiGetImpactReportAvailabilityRequest",
12
+ returnType: "ImpactReportAvailability",
13
+ isList: false,
14
+ paginationType: "none",
15
+ isPrivate: false,
16
+ description: "\""
17
+ }, {
18
+ methodName: "getImpactData",
19
+ protoName: "GetImpactData",
20
+ paramsType: "UserApiGetImpactDataRequest",
21
+ returnType: "ImpactDataResponse",
22
+ isList: false,
23
+ paginationType: "none",
24
+ isPrivate: false,
25
+ description: "\""
26
+ }]
27
+ }]
28
+ };
29
+ //#endregion
30
+ export { queriesMetadata };
@@ -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.6.1",
3
+ "version": "2.7.1",
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.2",
30
- "@scaleway/sdk-std": "2.2.1"
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.1"
33
+ "@scaleway/sdk-client": "^2.2.2"
34
34
  },
35
35
  "devDependencies": {
36
- "@scaleway/sdk-client": "^2.2.1"
36
+ "@scaleway/sdk-client": "^2.2.2"
37
37
  },
38
38
  "scripts": {
39
39
  "package:check": "pnpm publint",