@scaleway/sdk 2.69.0 → 2.71.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.
Files changed (131) hide show
  1. package/dist/api/account/v3/api.gen.cjs +23 -0
  2. package/dist/api/account/v3/api.gen.d.ts +11 -1
  3. package/dist/api/account/v3/api.gen.js +24 -1
  4. package/dist/api/account/v3/index.gen.d.ts +1 -1
  5. package/dist/api/account/v3/marshalling.gen.cjs +171 -0
  6. package/dist/api/account/v3/marshalling.gen.d.ts +3 -1
  7. package/dist/api/account/v3/marshalling.gen.js +173 -2
  8. package/dist/api/account/v3/types.gen.d.ts +93 -0
  9. package/dist/api/applesilicon/v1alpha1/api.gen.cjs +3 -1
  10. package/dist/api/applesilicon/v1alpha1/api.gen.js +3 -1
  11. package/dist/api/applesilicon/v1alpha1/types.gen.d.ts +3 -2
  12. package/dist/api/baremetal/v1/api.gen.cjs +3 -1
  13. package/dist/api/baremetal/v1/api.gen.js +3 -1
  14. package/dist/api/baremetal/v1/marshalling.gen.cjs +4 -2
  15. package/dist/api/baremetal/v1/marshalling.gen.js +4 -2
  16. package/dist/api/baremetal/v1/types.gen.d.ts +65 -64
  17. package/dist/api/block/v1/api.gen.cjs +6 -2
  18. package/dist/api/block/v1/api.gen.js +6 -2
  19. package/dist/api/block/v1alpha1/api.gen.cjs +6 -2
  20. package/dist/api/block/v1alpha1/api.gen.js +6 -2
  21. package/dist/api/block/v1alpha1/marshalling.gen.cjs +0 -1
  22. package/dist/api/block/v1alpha1/marshalling.gen.d.ts +1 -2
  23. package/dist/api/block/v1alpha1/marshalling.gen.js +0 -1
  24. package/dist/api/cockpit/v1/marshalling.gen.cjs +4 -4
  25. package/dist/api/cockpit/v1/marshalling.gen.js +4 -4
  26. package/dist/api/cockpit/v1/types.gen.d.ts +3 -3
  27. package/dist/api/container/v1beta1/api.gen.cjs +18 -6
  28. package/dist/api/container/v1beta1/api.gen.js +18 -6
  29. package/dist/api/dedibox/v1/api.gen.cjs +9 -3
  30. package/dist/api/dedibox/v1/api.gen.js +9 -3
  31. package/dist/api/domain/v2beta1/api.gen.cjs +3 -1
  32. package/dist/api/domain/v2beta1/api.gen.js +3 -1
  33. package/dist/api/edge_services/v1beta1/api.gen.cjs +6 -2
  34. package/dist/api/edge_services/v1beta1/api.gen.js +6 -2
  35. package/dist/api/edge_services/v1beta1/types.gen.d.ts +1 -1
  36. package/dist/api/function/v1beta1/api.gen.cjs +18 -6
  37. package/dist/api/function/v1beta1/api.gen.js +18 -6
  38. package/dist/api/function/v1beta1/types.gen.d.ts +1 -1
  39. package/dist/api/iam/v1alpha1/api.gen.cjs +1 -0
  40. package/dist/api/iam/v1alpha1/api.gen.js +1 -0
  41. package/dist/api/iam/v1alpha1/index.gen.d.ts +1 -1
  42. package/dist/api/iam/v1alpha1/marshalling.gen.cjs +21 -14
  43. package/dist/api/iam/v1alpha1/marshalling.gen.js +21 -14
  44. package/dist/api/iam/v1alpha1/types.gen.d.ts +32 -6
  45. package/dist/api/iam/v1alpha1/validation-rules.gen.cjs +38 -12
  46. package/dist/api/iam/v1alpha1/validation-rules.gen.d.ts +36 -11
  47. package/dist/api/iam/v1alpha1/validation-rules.gen.js +38 -12
  48. package/dist/api/inference/index.gen.cjs +4 -2
  49. package/dist/api/inference/index.gen.d.ts +1 -0
  50. package/dist/api/inference/index.gen.js +4 -2
  51. package/dist/api/inference/v1/api.gen.cjs +278 -0
  52. package/dist/api/inference/v1/api.gen.d.ts +140 -0
  53. package/dist/api/inference/v1/api.gen.js +278 -0
  54. package/dist/api/inference/v1/content.gen.cjs +13 -0
  55. package/dist/api/inference/v1/content.gen.d.ts +5 -0
  56. package/dist/api/inference/v1/content.gen.js +13 -0
  57. package/dist/api/inference/v1/index.gen.cjs +9 -0
  58. package/dist/api/inference/v1/index.gen.d.ts +4 -0
  59. package/dist/api/inference/v1/index.gen.js +9 -0
  60. package/dist/api/inference/v1/marshalling.gen.cjs +260 -0
  61. package/dist/api/inference/v1/marshalling.gen.d.ts +14 -0
  62. package/dist/api/inference/v1/marshalling.gen.js +260 -0
  63. package/dist/api/inference/v1/types.gen.d.ts +397 -0
  64. package/dist/api/inference/v1/validation-rules.gen.cjs +65 -0
  65. package/dist/api/inference/v1/validation-rules.gen.d.ts +57 -0
  66. package/dist/api/inference/v1/validation-rules.gen.js +65 -0
  67. package/dist/api/inference/v1beta1/api.gen.cjs +3 -1
  68. package/dist/api/inference/v1beta1/api.gen.js +3 -1
  69. package/dist/api/instance/v1/index.gen.d.ts +1 -1
  70. package/dist/api/instance/v1/marshalling.gen.cjs +13 -1
  71. package/dist/api/instance/v1/marshalling.gen.js +13 -1
  72. package/dist/api/instance/v1/types.gen.d.ts +10 -2
  73. package/dist/api/k8s/v1/api.gen.cjs +3 -1
  74. package/dist/api/k8s/v1/api.gen.js +3 -1
  75. package/dist/api/k8s/v1/marshalling.gen.cjs +1 -0
  76. package/dist/api/k8s/v1/marshalling.gen.js +1 -0
  77. package/dist/api/k8s/v1/types.gen.d.ts +5 -0
  78. package/dist/api/lb/v1/types.gen.d.ts +3 -3
  79. package/dist/api/mongodb/v1alpha1/api.gen.cjs +6 -2
  80. package/dist/api/mongodb/v1alpha1/api.gen.js +6 -2
  81. package/dist/api/qaas/v1alpha1/api.gen.cjs +6 -2
  82. package/dist/api/qaas/v1alpha1/api.gen.js +6 -2
  83. package/dist/api/rdb/v1/api.gen.cjs +6 -2
  84. package/dist/api/rdb/v1/api.gen.js +6 -2
  85. package/dist/api/redis/v1/api.gen.cjs +3 -1
  86. package/dist/api/redis/v1/api.gen.js +3 -1
  87. package/dist/api/registry/v1/api.gen.cjs +9 -3
  88. package/dist/api/registry/v1/api.gen.js +9 -3
  89. package/dist/api/secret/v1beta1/api.gen.cjs +32 -0
  90. package/dist/api/secret/v1beta1/api.gen.d.ts +17 -1
  91. package/dist/api/secret/v1beta1/api.gen.js +32 -0
  92. package/dist/api/secret/v1beta1/index.gen.d.ts +1 -1
  93. package/dist/api/secret/v1beta1/types.gen.d.ts +17 -0
  94. package/dist/api/serverless_sqldb/v1alpha1/api.gen.cjs +3 -1
  95. package/dist/api/serverless_sqldb/v1alpha1/api.gen.js +3 -1
  96. package/dist/api/tem/v1alpha1/api.gen.cjs +93 -0
  97. package/dist/api/tem/v1alpha1/api.gen.d.ts +44 -1
  98. package/dist/api/tem/v1alpha1/api.gen.js +94 -1
  99. package/dist/api/tem/v1alpha1/index.gen.d.ts +1 -1
  100. package/dist/api/tem/v1alpha1/marshalling.gen.cjs +114 -0
  101. package/dist/api/tem/v1alpha1/marshalling.gen.d.ts +7 -1
  102. package/dist/api/tem/v1alpha1/marshalling.gen.js +114 -0
  103. package/dist/api/tem/v1alpha1/types.gen.d.ts +157 -1
  104. package/dist/api/tem/v1alpha1/validation-rules.gen.cjs +10 -0
  105. package/dist/api/tem/v1alpha1/validation-rules.gen.d.ts +9 -0
  106. package/dist/api/tem/v1alpha1/validation-rules.gen.js +10 -0
  107. package/dist/api/vpc/v2/api.gen.cjs +33 -0
  108. package/dist/api/vpc/v2/api.gen.d.ts +17 -1
  109. package/dist/api/vpc/v2/api.gen.js +34 -1
  110. package/dist/api/vpc/v2/index.gen.d.ts +1 -1
  111. package/dist/api/vpc/v2/marshalling.gen.cjs +59 -0
  112. package/dist/api/vpc/v2/marshalling.gen.d.ts +4 -1
  113. package/dist/api/vpc/v2/marshalling.gen.js +59 -0
  114. package/dist/api/vpc/v2/types.gen.d.ts +80 -0
  115. package/dist/api/vpc/v2/validation-rules.gen.cjs +18 -0
  116. package/dist/api/vpc/v2/validation-rules.gen.d.ts +17 -0
  117. package/dist/api/vpc/v2/validation-rules.gen.js +18 -0
  118. package/dist/api/vpcgw/v1/api.gen.cjs +3 -1
  119. package/dist/api/vpcgw/v1/api.gen.js +3 -1
  120. package/dist/api/vpcgw/v2/api.gen.cjs +3 -1
  121. package/dist/api/vpcgw/v2/api.gen.js +3 -1
  122. package/dist/api/webhosting/v1/api.gen.cjs +6 -2
  123. package/dist/api/webhosting/v1/api.gen.js +6 -2
  124. package/dist/api/webhosting/v1/index.gen.d.ts +1 -1
  125. package/dist/api/webhosting/v1/marshalling.gen.cjs +27 -2
  126. package/dist/api/webhosting/v1/marshalling.gen.js +27 -2
  127. package/dist/api/webhosting/v1/types.gen.d.ts +64 -15
  128. package/dist/scw/constants.cjs +1 -1
  129. package/dist/scw/constants.d.ts +2 -2
  130. package/dist/scw/constants.js +1 -1
  131. package/package.json +2 -2
@@ -208,6 +208,29 @@ class ProjectAPI extends api.API {
208
208
  },
209
209
  marshalling_gen.unmarshalProject
210
210
  );
211
+ /**
212
+ * Set project use case. Set the project use case for a new or existing
213
+ * Project, specified by its Project ID. You can customize the use case, sub
214
+ * use case, and architecture type you want to use in the Project.
215
+ *
216
+ * @param request - The request
217
+ * {@link ProjectApiSetProjectQualificationRequest}
218
+ * @returns A Promise of ProjectQualification
219
+ */
220
+ setProjectQualification = (request = {}) => this.client.fetch(
221
+ {
222
+ body: JSON.stringify(
223
+ marshalling_gen.marshalProjectApiSetProjectQualificationRequest(
224
+ request,
225
+ this.client.settings
226
+ )
227
+ ),
228
+ headers: jsonContentHeaders,
229
+ method: "POST",
230
+ path: `/account/v3/projects/${marshalling.validatePathParam("projectId", request.projectId ?? this.client.settings.defaultProjectId)}/project-qualification`
231
+ },
232
+ marshalling_gen.unmarshalProjectQualification
233
+ );
211
234
  }
212
235
  exports.ContractAPI = ContractAPI;
213
236
  exports.ProjectAPI = ProjectAPI;
@@ -1,5 +1,5 @@
1
1
  import { API as ParentAPI } from '../../../bridge';
2
- import type { CheckContractSignatureResponse, ContractApiCheckContractSignatureRequest, ContractApiCreateContractSignatureRequest, ContractApiDownloadContractSignatureRequest, ContractApiListContractSignaturesRequest, ContractApiValidateContractSignatureRequest, ContractSignature, ListContractSignaturesResponse, ListProjectsResponse, Project, ProjectApiCreateProjectRequest, ProjectApiDeleteProjectRequest, ProjectApiGetProjectRequest, ProjectApiListProjectsRequest, ProjectApiUpdateProjectRequest } from './types.gen';
2
+ import type { CheckContractSignatureResponse, ContractApiCheckContractSignatureRequest, ContractApiCreateContractSignatureRequest, ContractApiDownloadContractSignatureRequest, ContractApiListContractSignaturesRequest, ContractApiValidateContractSignatureRequest, ContractSignature, ListContractSignaturesResponse, ListProjectsResponse, Project, ProjectApiCreateProjectRequest, ProjectApiDeleteProjectRequest, ProjectApiGetProjectRequest, ProjectApiListProjectsRequest, ProjectApiSetProjectQualificationRequest, ProjectApiUpdateProjectRequest, ProjectQualification } from './types.gen';
3
3
  /**
4
4
  * Contract API.
5
5
  *
@@ -106,4 +106,14 @@ export declare class ProjectAPI extends ParentAPI {
106
106
  * @returns A Promise of Project
107
107
  */
108
108
  updateProject: (request?: Readonly<ProjectApiUpdateProjectRequest>) => Promise<Project>;
109
+ /**
110
+ * Set project use case. Set the project use case for a new or existing
111
+ * Project, specified by its Project ID. You can customize the use case, sub
112
+ * use case, and architecture type you want to use in the Project.
113
+ *
114
+ * @param request - The request
115
+ * {@link ProjectApiSetProjectQualificationRequest}
116
+ * @returns A Promise of ProjectQualification
117
+ */
118
+ setProjectQualification: (request?: Readonly<ProjectApiSetProjectQualificationRequest>) => Promise<ProjectQualification>;
109
119
  }
@@ -2,7 +2,7 @@ import { API as API$1 } from "../../../scw/api.js";
2
2
  import { validatePathParam, urlParams } from "../../../helpers/marshalling.js";
3
3
  import "../../../vendor/base64/index.js";
4
4
  import { enrichForPagination } from "../../../scw/fetch/resource-paginator.js";
5
- import { marshalContractApiCreateContractSignatureRequest, unmarshalContractSignature, marshalContractApiCheckContractSignatureRequest, unmarshalCheckContractSignatureResponse, unmarshalListContractSignaturesResponse, marshalProjectApiCreateProjectRequest, unmarshalProject, unmarshalListProjectsResponse, marshalProjectApiUpdateProjectRequest } from "./marshalling.gen.js";
5
+ import { marshalContractApiCreateContractSignatureRequest, unmarshalContractSignature, marshalContractApiCheckContractSignatureRequest, unmarshalCheckContractSignatureResponse, unmarshalListContractSignaturesResponse, marshalProjectApiCreateProjectRequest, unmarshalProject, unmarshalListProjectsResponse, marshalProjectApiUpdateProjectRequest, marshalProjectApiSetProjectQualificationRequest, unmarshalProjectQualification } from "./marshalling.gen.js";
6
6
  const jsonContentHeaders = {
7
7
  "Content-Type": "application/json; charset=utf-8"
8
8
  };
@@ -206,6 +206,29 @@ class ProjectAPI extends API$1 {
206
206
  },
207
207
  unmarshalProject
208
208
  );
209
+ /**
210
+ * Set project use case. Set the project use case for a new or existing
211
+ * Project, specified by its Project ID. You can customize the use case, sub
212
+ * use case, and architecture type you want to use in the Project.
213
+ *
214
+ * @param request - The request
215
+ * {@link ProjectApiSetProjectQualificationRequest}
216
+ * @returns A Promise of ProjectQualification
217
+ */
218
+ setProjectQualification = (request = {}) => this.client.fetch(
219
+ {
220
+ body: JSON.stringify(
221
+ marshalProjectApiSetProjectQualificationRequest(
222
+ request,
223
+ this.client.settings
224
+ )
225
+ ),
226
+ headers: jsonContentHeaders,
227
+ method: "POST",
228
+ path: `/account/v3/projects/${validatePathParam("projectId", request.projectId ?? this.client.settings.defaultProjectId)}/project-qualification`
229
+ },
230
+ unmarshalProjectQualification
231
+ );
209
232
  }
210
233
  export {
211
234
  ContractAPI,
@@ -1,3 +1,3 @@
1
1
  export { ContractAPI, ProjectAPI } from './api.gen.js';
2
- export type { CheckContractSignatureResponse, Contract, ContractApiCheckContractSignatureRequest, ContractApiCreateContractSignatureRequest, ContractApiDownloadContractSignatureRequest, ContractApiListContractSignaturesRequest, ContractApiValidateContractSignatureRequest, ContractSignature, ContractType, ListContractSignaturesRequestOrderBy, ListContractSignaturesResponse, ListProjectsRequestOrderBy, ListProjectsResponse, Project, ProjectApiCreateProjectRequest, ProjectApiDeleteProjectRequest, ProjectApiGetProjectRequest, ProjectApiListProjectsRequest, ProjectApiUpdateProjectRequest, } from './types.gen';
2
+ export type { CheckContractSignatureResponse, Contract, ContractApiCheckContractSignatureRequest, ContractApiCreateContractSignatureRequest, ContractApiDownloadContractSignatureRequest, ContractApiListContractSignaturesRequest, ContractApiValidateContractSignatureRequest, ContractSignature, ContractType, ListContractSignaturesRequestOrderBy, ListContractSignaturesResponse, ListProjectsRequestOrderBy, ListProjectsResponse, Project, ProjectApiCreateProjectRequest, ProjectApiDeleteProjectRequest, ProjectApiGetProjectRequest, ProjectApiListProjectsRequest, ProjectApiSetProjectQualificationRequest, ProjectApiUpdateProjectRequest, ProjectQualification, Qualification, QualificationAiMachine, QualificationArchitectureType, QualificationArchiveData, QualificationContainer, QualificationDeploySoftware, QualificationHostApplication, QualificationHostApplicationSubUseCase, QualificationHostWebsite, QualificationHostWebsiteSubUseCase, QualificationOtherUseCase, QualificationSetScalewayEnvironment, QualificationShareData, } from './types.gen';
3
3
  export * as ValidationRules from './validation-rules.gen.js';
@@ -85,6 +85,114 @@ const unmarshalListProjectsResponse = (data) => {
85
85
  totalCount: data.total_count
86
86
  };
87
87
  };
88
+ const unmarshalQualificationAiMachine = (data) => {
89
+ if (!json.isJSONObject(data)) {
90
+ throw new TypeError(
91
+ `Unmarshalling the type 'QualificationAiMachine' failed as data isn't a dictionary.`
92
+ );
93
+ }
94
+ return {};
95
+ };
96
+ const unmarshalQualificationArchiveData = (data) => {
97
+ if (!json.isJSONObject(data)) {
98
+ throw new TypeError(
99
+ `Unmarshalling the type 'QualificationArchiveData' failed as data isn't a dictionary.`
100
+ );
101
+ }
102
+ return {};
103
+ };
104
+ const unmarshalQualificationContainer = (data) => {
105
+ if (!json.isJSONObject(data)) {
106
+ throw new TypeError(
107
+ `Unmarshalling the type 'QualificationContainer' failed as data isn't a dictionary.`
108
+ );
109
+ }
110
+ return {};
111
+ };
112
+ const unmarshalQualificationDeploySoftware = (data) => {
113
+ if (!json.isJSONObject(data)) {
114
+ throw new TypeError(
115
+ `Unmarshalling the type 'QualificationDeploySoftware' failed as data isn't a dictionary.`
116
+ );
117
+ }
118
+ return {};
119
+ };
120
+ const unmarshalQualificationHostApplication = (data) => {
121
+ if (!json.isJSONObject(data)) {
122
+ throw new TypeError(
123
+ `Unmarshalling the type 'QualificationHostApplication' failed as data isn't a dictionary.`
124
+ );
125
+ }
126
+ return {
127
+ subUseCase: data.sub_use_case
128
+ };
129
+ };
130
+ const unmarshalQualificationHostWebsite = (data) => {
131
+ if (!json.isJSONObject(data)) {
132
+ throw new TypeError(
133
+ `Unmarshalling the type 'QualificationHostWebsite' failed as data isn't a dictionary.`
134
+ );
135
+ }
136
+ return {
137
+ subUseCase: data.sub_use_case
138
+ };
139
+ };
140
+ const unmarshalQualificationOtherUseCase = (data) => {
141
+ if (!json.isJSONObject(data)) {
142
+ throw new TypeError(
143
+ `Unmarshalling the type 'QualificationOtherUseCase' failed as data isn't a dictionary.`
144
+ );
145
+ }
146
+ return {};
147
+ };
148
+ const unmarshalQualificationSetScalewayEnvironment = (data) => {
149
+ if (!json.isJSONObject(data)) {
150
+ throw new TypeError(
151
+ `Unmarshalling the type 'QualificationSetScalewayEnvironment' failed as data isn't a dictionary.`
152
+ );
153
+ }
154
+ return {};
155
+ };
156
+ const unmarshalQualificationShareData = (data) => {
157
+ if (!json.isJSONObject(data)) {
158
+ throw new TypeError(
159
+ `Unmarshalling the type 'QualificationShareData' failed as data isn't a dictionary.`
160
+ );
161
+ }
162
+ return {};
163
+ };
164
+ const unmarshalQualification = (data) => {
165
+ if (!json.isJSONObject(data)) {
166
+ throw new TypeError(
167
+ `Unmarshalling the type 'Qualification' failed as data isn't a dictionary.`
168
+ );
169
+ }
170
+ return {
171
+ aiMachine: data.ai_machine ? unmarshalQualificationAiMachine(data.ai_machine) : void 0,
172
+ architectureType: data.architecture_type,
173
+ archiveData: data.archive_data ? unmarshalQualificationArchiveData(data.archive_data) : void 0,
174
+ container: data.container ? unmarshalQualificationContainer(data.container) : void 0,
175
+ deploySoftware: data.deploy_software ? unmarshalQualificationDeploySoftware(data.deploy_software) : void 0,
176
+ hostApplication: data.host_application ? unmarshalQualificationHostApplication(data.host_application) : void 0,
177
+ hostWebsite: data.host_website ? unmarshalQualificationHostWebsite(data.host_website) : void 0,
178
+ otherUseCase: data.other_use_case ? unmarshalQualificationOtherUseCase(data.other_use_case) : void 0,
179
+ setScalewayEnvironment: data.set_scaleway_environment ? unmarshalQualificationSetScalewayEnvironment(
180
+ data.set_scaleway_environment
181
+ ) : void 0,
182
+ shareData: data.share_data ? unmarshalQualificationShareData(data.share_data) : void 0
183
+ };
184
+ };
185
+ const unmarshalProjectQualification = (data) => {
186
+ if (!json.isJSONObject(data)) {
187
+ throw new TypeError(
188
+ `Unmarshalling the type 'ProjectQualification' failed as data isn't a dictionary.`
189
+ );
190
+ }
191
+ return {
192
+ projectId: data.project_id,
193
+ qualification: data.qualification ? unmarshalQualification(data.qualification) : void 0
194
+ };
195
+ };
88
196
  const marshalContractApiCheckContractSignatureRequest = (request, defaults) => ({
89
197
  contract_name: request.contractName,
90
198
  contract_type: request.contractType,
@@ -101,6 +209,67 @@ const marshalProjectApiCreateProjectRequest = (request, defaults) => ({
101
209
  name: request.name || randomName("proj"),
102
210
  organization_id: request.organizationId ?? defaults.defaultOrganizationId
103
211
  });
212
+ const marshalQualificationAiMachine = (request, defaults) => ({});
213
+ const marshalQualificationArchiveData = (request, defaults) => ({});
214
+ const marshalQualificationContainer = (request, defaults) => ({});
215
+ const marshalQualificationDeploySoftware = (request, defaults) => ({});
216
+ const marshalQualificationHostApplication = (request, defaults) => ({
217
+ sub_use_case: request.subUseCase
218
+ });
219
+ const marshalQualificationHostWebsite = (request, defaults) => ({
220
+ sub_use_case: request.subUseCase
221
+ });
222
+ const marshalQualificationOtherUseCase = (request, defaults) => ({});
223
+ const marshalQualificationSetScalewayEnvironment = (request, defaults) => ({});
224
+ const marshalQualificationShareData = (request, defaults) => ({});
225
+ const marshalQualification = (request, defaults) => ({
226
+ architecture_type: request.architectureType,
227
+ ...marshalling.resolveOneOf([
228
+ {
229
+ param: "host_website",
230
+ value: request.hostWebsite !== void 0 ? marshalQualificationHostWebsite(request.hostWebsite) : void 0
231
+ },
232
+ {
233
+ param: "host_application",
234
+ value: request.hostApplication !== void 0 ? marshalQualificationHostApplication(
235
+ request.hostApplication
236
+ ) : void 0
237
+ },
238
+ {
239
+ param: "deploy_software",
240
+ value: request.deploySoftware !== void 0 ? marshalQualificationDeploySoftware(request.deploySoftware) : void 0
241
+ },
242
+ {
243
+ param: "set_scaleway_environment",
244
+ value: request.setScalewayEnvironment !== void 0 ? marshalQualificationSetScalewayEnvironment(
245
+ request.setScalewayEnvironment
246
+ ) : void 0
247
+ },
248
+ {
249
+ param: "ai_machine",
250
+ value: request.aiMachine !== void 0 ? marshalQualificationAiMachine(request.aiMachine) : void 0
251
+ },
252
+ {
253
+ param: "container",
254
+ value: request.container !== void 0 ? marshalQualificationContainer(request.container) : void 0
255
+ },
256
+ {
257
+ param: "archive_data",
258
+ value: request.archiveData !== void 0 ? marshalQualificationArchiveData(request.archiveData) : void 0
259
+ },
260
+ {
261
+ param: "share_data",
262
+ value: request.shareData !== void 0 ? marshalQualificationShareData(request.shareData) : void 0
263
+ },
264
+ {
265
+ param: "other_use_case",
266
+ value: request.otherUseCase !== void 0 ? marshalQualificationOtherUseCase(request.otherUseCase) : void 0
267
+ }
268
+ ])
269
+ });
270
+ const marshalProjectApiSetProjectQualificationRequest = (request, defaults) => ({
271
+ qualification: request.qualification !== void 0 ? marshalQualification(request.qualification) : void 0
272
+ });
104
273
  const marshalProjectApiUpdateProjectRequest = (request, defaults) => ({
105
274
  description: request.description,
106
275
  name: request.name
@@ -108,9 +277,11 @@ const marshalProjectApiUpdateProjectRequest = (request, defaults) => ({
108
277
  exports.marshalContractApiCheckContractSignatureRequest = marshalContractApiCheckContractSignatureRequest;
109
278
  exports.marshalContractApiCreateContractSignatureRequest = marshalContractApiCreateContractSignatureRequest;
110
279
  exports.marshalProjectApiCreateProjectRequest = marshalProjectApiCreateProjectRequest;
280
+ exports.marshalProjectApiSetProjectQualificationRequest = marshalProjectApiSetProjectQualificationRequest;
111
281
  exports.marshalProjectApiUpdateProjectRequest = marshalProjectApiUpdateProjectRequest;
112
282
  exports.unmarshalCheckContractSignatureResponse = unmarshalCheckContractSignatureResponse;
113
283
  exports.unmarshalContractSignature = unmarshalContractSignature;
114
284
  exports.unmarshalListContractSignaturesResponse = unmarshalListContractSignaturesResponse;
115
285
  exports.unmarshalListProjectsResponse = unmarshalListProjectsResponse;
116
286
  exports.unmarshalProject = unmarshalProject;
287
+ exports.unmarshalProjectQualification = unmarshalProjectQualification;
@@ -1,11 +1,13 @@
1
1
  import type { DefaultValues } from '../../../bridge';
2
- import type { CheckContractSignatureResponse, ContractApiCheckContractSignatureRequest, ContractApiCreateContractSignatureRequest, ContractSignature, ListContractSignaturesResponse, ListProjectsResponse, Project, ProjectApiCreateProjectRequest, ProjectApiUpdateProjectRequest } from './types.gen';
2
+ import type { CheckContractSignatureResponse, ContractApiCheckContractSignatureRequest, ContractApiCreateContractSignatureRequest, ContractSignature, ListContractSignaturesResponse, ListProjectsResponse, Project, ProjectApiCreateProjectRequest, ProjectApiSetProjectQualificationRequest, ProjectApiUpdateProjectRequest, ProjectQualification } from './types.gen';
3
3
  export declare const unmarshalContractSignature: (data: unknown) => ContractSignature;
4
4
  export declare const unmarshalProject: (data: unknown) => Project;
5
5
  export declare const unmarshalCheckContractSignatureResponse: (data: unknown) => CheckContractSignatureResponse;
6
6
  export declare const unmarshalListContractSignaturesResponse: (data: unknown) => ListContractSignaturesResponse;
7
7
  export declare const unmarshalListProjectsResponse: (data: unknown) => ListProjectsResponse;
8
+ export declare const unmarshalProjectQualification: (data: unknown) => ProjectQualification;
8
9
  export declare const marshalContractApiCheckContractSignatureRequest: (request: ContractApiCheckContractSignatureRequest, defaults: DefaultValues) => Record<string, unknown>;
9
10
  export declare const marshalContractApiCreateContractSignatureRequest: (request: ContractApiCreateContractSignatureRequest, defaults: DefaultValues) => Record<string, unknown>;
10
11
  export declare const marshalProjectApiCreateProjectRequest: (request: ProjectApiCreateProjectRequest, defaults: DefaultValues) => Record<string, unknown>;
12
+ export declare const marshalProjectApiSetProjectQualificationRequest: (request: ProjectApiSetProjectQualificationRequest, defaults: DefaultValues) => Record<string, unknown>;
11
13
  export declare const marshalProjectApiUpdateProjectRequest: (request: ProjectApiUpdateProjectRequest, defaults: DefaultValues) => Record<string, unknown>;
@@ -1,6 +1,6 @@
1
1
  import randomName from "@scaleway/random-name";
2
2
  import { isJSONObject } from "../../../helpers/json.js";
3
- import { unmarshalDate, unmarshalArrayOfObject } from "../../../helpers/marshalling.js";
3
+ import { unmarshalDate, unmarshalArrayOfObject, resolveOneOf } from "../../../helpers/marshalling.js";
4
4
  import "../../../vendor/base64/index.js";
5
5
  const unmarshalContract = (data) => {
6
6
  if (!isJSONObject(data)) {
@@ -83,6 +83,114 @@ const unmarshalListProjectsResponse = (data) => {
83
83
  totalCount: data.total_count
84
84
  };
85
85
  };
86
+ const unmarshalQualificationAiMachine = (data) => {
87
+ if (!isJSONObject(data)) {
88
+ throw new TypeError(
89
+ `Unmarshalling the type 'QualificationAiMachine' failed as data isn't a dictionary.`
90
+ );
91
+ }
92
+ return {};
93
+ };
94
+ const unmarshalQualificationArchiveData = (data) => {
95
+ if (!isJSONObject(data)) {
96
+ throw new TypeError(
97
+ `Unmarshalling the type 'QualificationArchiveData' failed as data isn't a dictionary.`
98
+ );
99
+ }
100
+ return {};
101
+ };
102
+ const unmarshalQualificationContainer = (data) => {
103
+ if (!isJSONObject(data)) {
104
+ throw new TypeError(
105
+ `Unmarshalling the type 'QualificationContainer' failed as data isn't a dictionary.`
106
+ );
107
+ }
108
+ return {};
109
+ };
110
+ const unmarshalQualificationDeploySoftware = (data) => {
111
+ if (!isJSONObject(data)) {
112
+ throw new TypeError(
113
+ `Unmarshalling the type 'QualificationDeploySoftware' failed as data isn't a dictionary.`
114
+ );
115
+ }
116
+ return {};
117
+ };
118
+ const unmarshalQualificationHostApplication = (data) => {
119
+ if (!isJSONObject(data)) {
120
+ throw new TypeError(
121
+ `Unmarshalling the type 'QualificationHostApplication' failed as data isn't a dictionary.`
122
+ );
123
+ }
124
+ return {
125
+ subUseCase: data.sub_use_case
126
+ };
127
+ };
128
+ const unmarshalQualificationHostWebsite = (data) => {
129
+ if (!isJSONObject(data)) {
130
+ throw new TypeError(
131
+ `Unmarshalling the type 'QualificationHostWebsite' failed as data isn't a dictionary.`
132
+ );
133
+ }
134
+ return {
135
+ subUseCase: data.sub_use_case
136
+ };
137
+ };
138
+ const unmarshalQualificationOtherUseCase = (data) => {
139
+ if (!isJSONObject(data)) {
140
+ throw new TypeError(
141
+ `Unmarshalling the type 'QualificationOtherUseCase' failed as data isn't a dictionary.`
142
+ );
143
+ }
144
+ return {};
145
+ };
146
+ const unmarshalQualificationSetScalewayEnvironment = (data) => {
147
+ if (!isJSONObject(data)) {
148
+ throw new TypeError(
149
+ `Unmarshalling the type 'QualificationSetScalewayEnvironment' failed as data isn't a dictionary.`
150
+ );
151
+ }
152
+ return {};
153
+ };
154
+ const unmarshalQualificationShareData = (data) => {
155
+ if (!isJSONObject(data)) {
156
+ throw new TypeError(
157
+ `Unmarshalling the type 'QualificationShareData' failed as data isn't a dictionary.`
158
+ );
159
+ }
160
+ return {};
161
+ };
162
+ const unmarshalQualification = (data) => {
163
+ if (!isJSONObject(data)) {
164
+ throw new TypeError(
165
+ `Unmarshalling the type 'Qualification' failed as data isn't a dictionary.`
166
+ );
167
+ }
168
+ return {
169
+ aiMachine: data.ai_machine ? unmarshalQualificationAiMachine(data.ai_machine) : void 0,
170
+ architectureType: data.architecture_type,
171
+ archiveData: data.archive_data ? unmarshalQualificationArchiveData(data.archive_data) : void 0,
172
+ container: data.container ? unmarshalQualificationContainer(data.container) : void 0,
173
+ deploySoftware: data.deploy_software ? unmarshalQualificationDeploySoftware(data.deploy_software) : void 0,
174
+ hostApplication: data.host_application ? unmarshalQualificationHostApplication(data.host_application) : void 0,
175
+ hostWebsite: data.host_website ? unmarshalQualificationHostWebsite(data.host_website) : void 0,
176
+ otherUseCase: data.other_use_case ? unmarshalQualificationOtherUseCase(data.other_use_case) : void 0,
177
+ setScalewayEnvironment: data.set_scaleway_environment ? unmarshalQualificationSetScalewayEnvironment(
178
+ data.set_scaleway_environment
179
+ ) : void 0,
180
+ shareData: data.share_data ? unmarshalQualificationShareData(data.share_data) : void 0
181
+ };
182
+ };
183
+ const unmarshalProjectQualification = (data) => {
184
+ if (!isJSONObject(data)) {
185
+ throw new TypeError(
186
+ `Unmarshalling the type 'ProjectQualification' failed as data isn't a dictionary.`
187
+ );
188
+ }
189
+ return {
190
+ projectId: data.project_id,
191
+ qualification: data.qualification ? unmarshalQualification(data.qualification) : void 0
192
+ };
193
+ };
86
194
  const marshalContractApiCheckContractSignatureRequest = (request, defaults) => ({
87
195
  contract_name: request.contractName,
88
196
  contract_type: request.contractType,
@@ -99,6 +207,67 @@ const marshalProjectApiCreateProjectRequest = (request, defaults) => ({
99
207
  name: request.name || randomName("proj"),
100
208
  organization_id: request.organizationId ?? defaults.defaultOrganizationId
101
209
  });
210
+ const marshalQualificationAiMachine = (request, defaults) => ({});
211
+ const marshalQualificationArchiveData = (request, defaults) => ({});
212
+ const marshalQualificationContainer = (request, defaults) => ({});
213
+ const marshalQualificationDeploySoftware = (request, defaults) => ({});
214
+ const marshalQualificationHostApplication = (request, defaults) => ({
215
+ sub_use_case: request.subUseCase
216
+ });
217
+ const marshalQualificationHostWebsite = (request, defaults) => ({
218
+ sub_use_case: request.subUseCase
219
+ });
220
+ const marshalQualificationOtherUseCase = (request, defaults) => ({});
221
+ const marshalQualificationSetScalewayEnvironment = (request, defaults) => ({});
222
+ const marshalQualificationShareData = (request, defaults) => ({});
223
+ const marshalQualification = (request, defaults) => ({
224
+ architecture_type: request.architectureType,
225
+ ...resolveOneOf([
226
+ {
227
+ param: "host_website",
228
+ value: request.hostWebsite !== void 0 ? marshalQualificationHostWebsite(request.hostWebsite) : void 0
229
+ },
230
+ {
231
+ param: "host_application",
232
+ value: request.hostApplication !== void 0 ? marshalQualificationHostApplication(
233
+ request.hostApplication
234
+ ) : void 0
235
+ },
236
+ {
237
+ param: "deploy_software",
238
+ value: request.deploySoftware !== void 0 ? marshalQualificationDeploySoftware(request.deploySoftware) : void 0
239
+ },
240
+ {
241
+ param: "set_scaleway_environment",
242
+ value: request.setScalewayEnvironment !== void 0 ? marshalQualificationSetScalewayEnvironment(
243
+ request.setScalewayEnvironment
244
+ ) : void 0
245
+ },
246
+ {
247
+ param: "ai_machine",
248
+ value: request.aiMachine !== void 0 ? marshalQualificationAiMachine(request.aiMachine) : void 0
249
+ },
250
+ {
251
+ param: "container",
252
+ value: request.container !== void 0 ? marshalQualificationContainer(request.container) : void 0
253
+ },
254
+ {
255
+ param: "archive_data",
256
+ value: request.archiveData !== void 0 ? marshalQualificationArchiveData(request.archiveData) : void 0
257
+ },
258
+ {
259
+ param: "share_data",
260
+ value: request.shareData !== void 0 ? marshalQualificationShareData(request.shareData) : void 0
261
+ },
262
+ {
263
+ param: "other_use_case",
264
+ value: request.otherUseCase !== void 0 ? marshalQualificationOtherUseCase(request.otherUseCase) : void 0
265
+ }
266
+ ])
267
+ });
268
+ const marshalProjectApiSetProjectQualificationRequest = (request, defaults) => ({
269
+ qualification: request.qualification !== void 0 ? marshalQualification(request.qualification) : void 0
270
+ });
102
271
  const marshalProjectApiUpdateProjectRequest = (request, defaults) => ({
103
272
  description: request.description,
104
273
  name: request.name
@@ -107,10 +276,12 @@ export {
107
276
  marshalContractApiCheckContractSignatureRequest,
108
277
  marshalContractApiCreateContractSignatureRequest,
109
278
  marshalProjectApiCreateProjectRequest,
279
+ marshalProjectApiSetProjectQualificationRequest,
110
280
  marshalProjectApiUpdateProjectRequest,
111
281
  unmarshalCheckContractSignatureResponse,
112
282
  unmarshalContractSignature,
113
283
  unmarshalListContractSignaturesResponse,
114
284
  unmarshalListProjectsResponse,
115
- unmarshalProject
285
+ unmarshalProject,
286
+ unmarshalProjectQualification
116
287
  };
@@ -2,6 +2,9 @@ import type { LanguageCode as StdLanguageCode } from '../../std/types.gen';
2
2
  export type ContractType = 'unknown_type' | 'global' | 'k8s' | 'instance' | 'container' | 'baremetal';
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
+ export type QualificationArchitectureType = 'unknown_architecture_type' | 'object_storage' | 'web_hosting' | 'instance' | 'elastic' | 'kubernetes' | 'serverless' | 'dedicated_server' | 'other_architecture_type';
6
+ export type QualificationHostApplicationSubUseCase = 'unknown_sub_use_case' | 'saas_app' | 'government_app';
7
+ export type QualificationHostWebsiteSubUseCase = 'unknown_sub_use_case' | 'information_website' | 'ecommerce_website' | 'high_website' | 'other_sub_use_case';
5
8
  export interface Contract {
6
9
  /** ID of the contract. */
7
10
  id: string;
@@ -16,6 +19,26 @@ export interface Contract {
16
19
  /** The last modification date of the contract. */
17
20
  updatedAt?: Date;
18
21
  }
22
+ export interface QualificationAiMachine {
23
+ }
24
+ export interface QualificationArchiveData {
25
+ }
26
+ export interface QualificationContainer {
27
+ }
28
+ export interface QualificationDeploySoftware {
29
+ }
30
+ export interface QualificationHostApplication {
31
+ subUseCase: QualificationHostApplicationSubUseCase;
32
+ }
33
+ export interface QualificationHostWebsite {
34
+ subUseCase: QualificationHostWebsiteSubUseCase;
35
+ }
36
+ export interface QualificationOtherUseCase {
37
+ }
38
+ export interface QualificationSetScalewayEnvironment {
39
+ }
40
+ export interface QualificationShareData {
41
+ }
19
42
  export interface ContractSignature {
20
43
  /** ID of the contract signature. */
21
44
  id: string;
@@ -44,6 +67,64 @@ export interface Project {
44
67
  /** Description of the Project. */
45
68
  description: string;
46
69
  }
70
+ export interface Qualification {
71
+ /** Architecture type of the qualification. */
72
+ architectureType: QualificationArchitectureType;
73
+ /**
74
+ * One-of ('useCase'): at most one of 'hostWebsite', 'hostApplication',
75
+ * 'deploySoftware', 'setScalewayEnvironment', 'aiMachine', 'container',
76
+ * 'archiveData', 'shareData', 'otherUseCase' could be set.
77
+ */
78
+ hostWebsite?: QualificationHostWebsite;
79
+ /**
80
+ * One-of ('useCase'): at most one of 'hostWebsite', 'hostApplication',
81
+ * 'deploySoftware', 'setScalewayEnvironment', 'aiMachine', 'container',
82
+ * 'archiveData', 'shareData', 'otherUseCase' could be set.
83
+ */
84
+ hostApplication?: QualificationHostApplication;
85
+ /**
86
+ * One-of ('useCase'): at most one of 'hostWebsite', 'hostApplication',
87
+ * 'deploySoftware', 'setScalewayEnvironment', 'aiMachine', 'container',
88
+ * 'archiveData', 'shareData', 'otherUseCase' could be set.
89
+ */
90
+ deploySoftware?: QualificationDeploySoftware;
91
+ /**
92
+ * One-of ('useCase'): at most one of 'hostWebsite', 'hostApplication',
93
+ * 'deploySoftware', 'setScalewayEnvironment', 'aiMachine', 'container',
94
+ * 'archiveData', 'shareData', 'otherUseCase' could be set.
95
+ */
96
+ setScalewayEnvironment?: QualificationSetScalewayEnvironment;
97
+ /**
98
+ * One-of ('useCase'): at most one of 'hostWebsite', 'hostApplication',
99
+ * 'deploySoftware', 'setScalewayEnvironment', 'aiMachine', 'container',
100
+ * 'archiveData', 'shareData', 'otherUseCase' could be set.
101
+ */
102
+ aiMachine?: QualificationAiMachine;
103
+ /**
104
+ * One-of ('useCase'): at most one of 'hostWebsite', 'hostApplication',
105
+ * 'deploySoftware', 'setScalewayEnvironment', 'aiMachine', 'container',
106
+ * 'archiveData', 'shareData', 'otherUseCase' could be set.
107
+ */
108
+ container?: QualificationContainer;
109
+ /**
110
+ * One-of ('useCase'): at most one of 'hostWebsite', 'hostApplication',
111
+ * 'deploySoftware', 'setScalewayEnvironment', 'aiMachine', 'container',
112
+ * 'archiveData', 'shareData', 'otherUseCase' could be set.
113
+ */
114
+ archiveData?: QualificationArchiveData;
115
+ /**
116
+ * One-of ('useCase'): at most one of 'hostWebsite', 'hostApplication',
117
+ * 'deploySoftware', 'setScalewayEnvironment', 'aiMachine', 'container',
118
+ * 'archiveData', 'shareData', 'otherUseCase' could be set.
119
+ */
120
+ shareData?: QualificationShareData;
121
+ /**
122
+ * One-of ('useCase'): at most one of 'hostWebsite', 'hostApplication',
123
+ * 'deploySoftware', 'setScalewayEnvironment', 'aiMachine', 'container',
124
+ * 'archiveData', 'shareData', 'otherUseCase' could be set.
125
+ */
126
+ otherUseCase?: QualificationOtherUseCase;
127
+ }
47
128
  export interface CheckContractSignatureResponse {
48
129
  /** Whether a signature has been requested for this contract. */
49
130
  created: boolean;
@@ -133,6 +214,12 @@ export type ProjectApiListProjectsRequest = {
133
214
  */
134
215
  projectIds?: string[];
135
216
  };
217
+ export type ProjectApiSetProjectQualificationRequest = {
218
+ /** Project ID. */
219
+ projectId?: string;
220
+ /** Use case chosen for the Project. */
221
+ qualification?: Qualification;
222
+ };
136
223
  export type ProjectApiUpdateProjectRequest = {
137
224
  /** Project ID of the Project. */
138
225
  projectId?: string;
@@ -141,3 +228,9 @@ export type ProjectApiUpdateProjectRequest = {
141
228
  /** Description of the Project. */
142
229
  description?: string;
143
230
  };
231
+ export interface ProjectQualification {
232
+ /** Project ID. */
233
+ projectId: string;
234
+ /** Qualification of the Project. */
235
+ qualification?: Qualification;
236
+ }
@@ -148,7 +148,9 @@ class API extends api.API {
148
148
  * @returns A Promise of Server
149
149
  */
150
150
  waitForServer = (request, options) => intervalRetrier.waitForResource(
151
- options?.stop ?? ((res) => Promise.resolve(!content_gen.SERVER_TRANSIENT_STATUSES.includes(res.status))),
151
+ options?.stop ?? ((res) => Promise.resolve(
152
+ !content_gen.SERVER_TRANSIENT_STATUSES.includes(res.status)
153
+ )),
152
154
  this.getServer,
153
155
  request,
154
156
  options
@@ -146,7 +146,9 @@ class API extends API$1 {
146
146
  * @returns A Promise of Server
147
147
  */
148
148
  waitForServer = (request, options) => waitForResource(
149
- options?.stop ?? ((res) => Promise.resolve(!SERVER_TRANSIENT_STATUSES.includes(res.status))),
149
+ options?.stop ?? ((res) => Promise.resolve(
150
+ !SERVER_TRANSIENT_STATUSES.includes(res.status)
151
+ )),
150
152
  this.getServer,
151
153
  request,
152
154
  options
@@ -190,8 +190,9 @@ export type CreateServerRequest = {
190
190
  enableVpc: boolean;
191
191
  /**
192
192
  * Activate commitment for this server. If not specified, there is a 24h
193
- * commitment due to Apple licensing. It can be updated with the Update Server
194
- * request. Available commitment depends on server type.
193
+ * commitment due to Apple licensing (commitment_type `duration_24h`). It can
194
+ * be updated with the Update Server request. Available commitment depends on
195
+ * server type.
195
196
  */
196
197
  commitmentType?: CommitmentType;
197
198
  };