@scaleway/sdk-account 2.1.1 → 2.2.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.
@@ -10,17 +10,12 @@ class ContractAPI extends API {
10
10
  * @param request - The request {@link ContractApiDownloadContractSignatureRequest}
11
11
  * @returns A Promise of Blob
12
12
  */
13
- downloadContractSignature = (request) => this.client.fetch(
14
- {
15
- method: "GET",
16
- path: `/account/v3/contract-signatures/${validatePathParam("contractSignatureId", request.contractSignatureId)}/download`,
17
- urlParams: urlParams(
18
- ["dl", 1],
19
- ["locale", request.locale]
20
- ),
21
- responseType: "blob"
22
- }
23
- );
13
+ downloadContractSignature = (request) => this.client.fetch({
14
+ method: "GET",
15
+ path: `/account/v3/contract-signatures/${validatePathParam("contractSignatureId", request.contractSignatureId)}/download`,
16
+ urlParams: urlParams(["dl", 1], ["locale", request.locale]),
17
+ responseType: "blob"
18
+ });
24
19
  /**
25
20
  * Create a signature for your Organization for the latest version of the requested contract.
26
21
  *
@@ -30,7 +25,10 @@ class ContractAPI extends API {
30
25
  createContractSignature = (request) => this.client.fetch(
31
26
  {
32
27
  body: JSON.stringify(
33
- marshalContractApiCreateContractSignatureRequest(request, this.client.settings)
28
+ marshalContractApiCreateContractSignatureRequest(
29
+ request,
30
+ this.client.settings
31
+ )
34
32
  ),
35
33
  headers: jsonContentHeaders,
36
34
  method: "POST",
@@ -62,7 +60,10 @@ class ContractAPI extends API {
62
60
  checkContractSignature = (request) => this.client.fetch(
63
61
  {
64
62
  body: JSON.stringify(
65
- marshalContractApiCheckContractSignatureRequest(request, this.client.settings)
63
+ marshalContractApiCheckContractSignatureRequest(
64
+ request,
65
+ this.client.settings
66
+ )
66
67
  ),
67
68
  headers: jsonContentHeaders,
68
69
  method: "POST",
@@ -76,9 +77,15 @@ class ContractAPI extends API {
76
77
  path: `/account/v3/contract-signatures`,
77
78
  urlParams: urlParams(
78
79
  ["order_by", request.orderBy],
79
- ["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId],
80
+ [
81
+ "organization_id",
82
+ request.organizationId ?? this.client.settings.defaultOrganizationId
83
+ ],
80
84
  ["page", request.page],
81
- ["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
85
+ [
86
+ "page_size",
87
+ request.pageSize ?? this.client.settings.defaultPageSize
88
+ ]
82
89
  )
83
90
  },
84
91
  unmarshalListContractSignaturesResponse
@@ -89,7 +96,11 @@ class ContractAPI extends API {
89
96
  * @param request - The request {@link ContractApiListContractSignaturesRequest}
90
97
  * @returns A Promise of ListContractSignaturesResponse
91
98
  */
92
- listContractSignatures = (request = {}) => enrichForPagination("contractSignatures", this.pageOfListContractSignatures, request);
99
+ listContractSignatures = (request = {}) => enrichForPagination(
100
+ "contractSignatures",
101
+ this.pageOfListContractSignatures,
102
+ request
103
+ );
93
104
  }
94
105
  class ProjectAPI extends API {
95
106
  /**
@@ -116,9 +127,15 @@ class ProjectAPI extends API {
116
127
  urlParams: urlParams(
117
128
  ["name", request.name],
118
129
  ["order_by", request.orderBy],
119
- ["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId],
130
+ [
131
+ "organization_id",
132
+ request.organizationId ?? this.client.settings.defaultOrganizationId
133
+ ],
120
134
  ["page", request.page],
121
- ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
135
+ [
136
+ "page_size",
137
+ request.pageSize ?? this.client.settings.defaultPageSize
138
+ ],
122
139
  ["project_ids", request.projectIds]
123
140
  )
124
141
  },
@@ -149,12 +166,10 @@ class ProjectAPI extends API {
149
166
  *
150
167
  * @param request - The request {@link ProjectApiDeleteProjectRequest}
151
168
  */
152
- deleteProject = (request = {}) => this.client.fetch(
153
- {
154
- method: "DELETE",
155
- path: `/account/v3/projects/${validatePathParam("projectId", request.projectId ?? this.client.settings.defaultProjectId)}`
156
- }
157
- );
169
+ deleteProject = (request = {}) => this.client.fetch({
170
+ method: "DELETE",
171
+ path: `/account/v3/projects/${validatePathParam("projectId", request.projectId ?? this.client.settings.defaultProjectId)}`
172
+ });
158
173
  /**
159
174
  * Update Project. Update the parameters of an existing Project, specified by its Project ID. These parameters include the name and description.
160
175
  *
@@ -181,7 +196,10 @@ class ProjectAPI extends API {
181
196
  setProjectQualification = (request = {}) => this.client.fetch(
182
197
  {
183
198
  body: JSON.stringify(
184
- marshalProjectApiSetProjectQualificationRequest(request, this.client.settings)
199
+ marshalProjectApiSetProjectQualificationRequest(
200
+ request,
201
+ this.client.settings
202
+ )
185
203
  ),
186
204
  headers: jsonContentHeaders,
187
205
  method: "POST",
@@ -135,7 +135,9 @@ const unmarshalQualification = (data) => {
135
135
  hostApplication: data.host_application ? unmarshalQualificationHostApplication(data.host_application) : void 0,
136
136
  hostWebsite: data.host_website ? unmarshalQualificationHostWebsite(data.host_website) : void 0,
137
137
  otherUseCase: data.other_use_case ? unmarshalQualificationOtherUseCase(data.other_use_case) : void 0,
138
- setScalewayEnvironment: data.set_scaleway_environment ? unmarshalQualificationSetScalewayEnvironment(data.set_scaleway_environment) : void 0,
138
+ setScalewayEnvironment: data.set_scaleway_environment ? unmarshalQualificationSetScalewayEnvironment(
139
+ data.set_scaleway_environment
140
+ ) : void 0,
139
141
  shareData: data.share_data ? unmarshalQualificationShareData(data.share_data) : void 0
140
142
  };
141
143
  };
@@ -173,7 +175,10 @@ const unmarshalListContractSignaturesResponse = (data) => {
173
175
  );
174
176
  }
175
177
  return {
176
- contractSignatures: unmarshalArrayOfObject(data.contract_signatures, unmarshalContractSignature),
178
+ contractSignatures: unmarshalArrayOfObject(
179
+ data.contract_signatures,
180
+ unmarshalContractSignature
181
+ ),
177
182
  totalCount: data.total_count
178
183
  };
179
184
  };
@@ -251,7 +256,9 @@ const marshalQualification = (request, defaults) => ({
251
256
  },
252
257
  {
253
258
  param: "host_application",
254
- value: request.hostApplication !== void 0 ? marshalQualificationHostApplication(request.hostApplication) : void 0
259
+ value: request.hostApplication !== void 0 ? marshalQualificationHostApplication(
260
+ request.hostApplication
261
+ ) : void 0
255
262
  },
256
263
  {
257
264
  param: "deploy_software",
@@ -259,7 +266,9 @@ const marshalQualification = (request, defaults) => ({
259
266
  },
260
267
  {
261
268
  param: "set_scaleway_environment",
262
- value: request.setScalewayEnvironment !== void 0 ? marshalQualificationSetScalewayEnvironment(request.setScalewayEnvironment) : void 0
269
+ value: request.setScalewayEnvironment !== void 0 ? marshalQualificationSetScalewayEnvironment(
270
+ request.setScalewayEnvironment
271
+ ) : void 0
263
272
  },
264
273
  {
265
274
  param: "ai_machine",
@@ -1,5 +1,5 @@
1
1
  import type { LanguageCode as StdLanguageCode } from '@scaleway/sdk-std';
2
- export type ContractType = 'unknown_type' | 'global' | 'k8s' | 'instance' | 'container' | 'baremetal' | 'network';
2
+ export type ContractType = 'unknown_type' | 'global' | 'k8s' | 'instance' | 'container' | 'baremetal' | 'network' | 'core';
3
3
  export type ListContractSignaturesRequestOrderBy = 'signed_at_asc' | 'signed_at_desc' | 'expires_at_asc' | 'expires_at_desc' | 'name_asc' | 'name_desc';
4
4
  export type ListProjectsRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'name_asc' | 'name_desc';
5
5
  export type QualificationAiMachineSubUseCase = 'unknown_sub_use_case';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk-account",
3
- "version": "2.1.1",
3
+ "version": "2.2.1",
4
4
  "description": "Scaleway SDK account",
5
5
  "license": "Apache-2.0",
6
6
  "files": [