@@ -7,16 +7,16 @@ import {
77 validatePathParam ,
88} from '@scaleway/sdk-client'
99import {
10+ unmarshalCheckContractSignatureResponse ,
1011 marshalContractApiCheckContractSignatureRequest ,
1112 marshalContractApiCreateContractSignatureRequest ,
12- marshalProjectApiCreateProjectRequest ,
13- marshalProjectApiSetProjectQualificationRequest ,
14- marshalProjectApiUpdateProjectRequest ,
15- unmarshalCheckContractSignatureResponse ,
1613 unmarshalContractSignature ,
1714 unmarshalListContractSignaturesResponse ,
1815 unmarshalListProjectsResponse ,
1916 unmarshalProject ,
17+ marshalProjectApiCreateProjectRequest ,
18+ marshalProjectApiSetProjectQualificationRequest ,
19+ marshalProjectApiUpdateProjectRequest ,
2020 unmarshalProjectQualification ,
2121} from './marshalling.gen.js'
2222import type {
@@ -55,32 +55,31 @@ export class ContractAPI extends ParentAPI {
5555 * @param request - The request {@link ContractApiDownloadContractSignatureRequest}
5656 * @returns A Promise of Blob
5757 */
58- downloadContractSignature = (
59- request : Readonly < ContractApiDownloadContractSignatureRequest > ,
60- ) =>
61- this . client . fetch < Blob > ( {
62- method : 'GET' ,
63- path : `/account/v3/contract-signatures/${ validatePathParam ( 'contractSignatureId' , request . contractSignatureId ) } /download` ,
64- urlParams : urlParams ( [ 'dl' , 1 ] , [ 'locale' , request . locale ] ) ,
65- responseType : 'blob' ,
66- } )
58+ downloadContractSignature = ( request : Readonly < ContractApiDownloadContractSignatureRequest > ) =>
59+ this . client . fetch < Blob > (
60+ {
61+ method : 'GET' ,
62+ path : `/account/v3/contract-signatures/${ validatePathParam ( 'contractSignatureId' , request . contractSignatureId ) } /download` ,
63+ urlParams : urlParams (
64+ [ 'dl' , 1 ] ,
65+ [ 'locale' , request . locale ] ,
66+ ) ,
67+ responseType : 'blob' ,
68+ } ,
69+ )
6770
71+
6872 /**
6973 * Create a signature for your Organization for the latest version of the requested contract.
7074 *
7175 * @param request - The request {@link ContractApiCreateContractSignatureRequest}
7276 * @returns A Promise of ContractSignature
7377 */
74- createContractSignature = (
75- request : Readonly < ContractApiCreateContractSignatureRequest > ,
76- ) =>
78+ createContractSignature = ( request : Readonly < ContractApiCreateContractSignatureRequest > ) =>
7779 this . client . fetch < ContractSignature > (
7880 {
7981 body : JSON . stringify (
80- marshalContractApiCreateContractSignatureRequest (
81- request ,
82- this . client . settings ,
83- ) ,
82+ marshalContractApiCreateContractSignatureRequest ( request , this . client . settings ) ,
8483 ) ,
8584 headers : jsonContentHeaders ,
8685 method : 'POST' ,
@@ -89,15 +88,14 @@ export class ContractAPI extends ParentAPI {
8988 unmarshalContractSignature ,
9089 )
9190
91+
9292 /**
9393 * Sign a contract for your Organization.
9494 *
9595 * @param request - The request {@link ContractApiValidateContractSignatureRequest}
9696 * @returns A Promise of ContractSignature
9797 */
98- validateContractSignature = (
99- request : Readonly < ContractApiValidateContractSignatureRequest > ,
100- ) =>
98+ validateContractSignature = ( request : Readonly < ContractApiValidateContractSignatureRequest > ) =>
10199 this . client . fetch < ContractSignature > (
102100 {
103101 body : '{}' ,
@@ -108,22 +106,18 @@ export class ContractAPI extends ParentAPI {
108106 unmarshalContractSignature ,
109107 )
110108
109+
111110 /**
112111 * Check if a contract is signed for your Organization.
113112 *
114113 * @param request - The request {@link ContractApiCheckContractSignatureRequest}
115114 * @returns A Promise of CheckContractSignatureResponse
116115 */
117- checkContractSignature = (
118- request : Readonly < ContractApiCheckContractSignatureRequest > ,
119- ) =>
116+ checkContractSignature = ( request : Readonly < ContractApiCheckContractSignatureRequest > ) =>
120117 this . client . fetch < CheckContractSignatureResponse > (
121118 {
122119 body : JSON . stringify (
123- marshalContractApiCheckContractSignatureRequest (
124- request ,
125- this . client . settings ,
126- ) ,
120+ marshalContractApiCheckContractSignatureRequest ( request , this . client . settings ) ,
127121 ) ,
128122 headers : jsonContentHeaders ,
129123 method : 'POST' ,
@@ -132,44 +126,32 @@ export class ContractAPI extends ParentAPI {
132126 unmarshalCheckContractSignatureResponse ,
133127 )
134128
135- protected pageOfListContractSignatures = (
136- request : Readonly < ContractApiListContractSignaturesRequest > = { } ,
137- ) =>
129+
130+ protected pageOfListContractSignatures = ( request : Readonly < ContractApiListContractSignaturesRequest > = { } ) =>
138131 this . client . fetch < ListContractSignaturesResponse > (
139132 {
140133 method : 'GET' ,
141134 path : `/account/v3/contract-signatures` ,
142135 urlParams : urlParams (
143136 [ 'order_by' , request . orderBy ] ,
144- [
145- 'organization_id' ,
146- request . organizationId ??
147- this . client . settings . defaultOrganizationId ,
148- ] ,
137+ [ 'organization_id' , request . organizationId ?? this . client . settings . defaultOrganizationId ] ,
149138 [ 'page' , request . page ] ,
150- [
151- 'page_size' ,
152- request . pageSize ?? this . client . settings . defaultPageSize ,
153- ] ,
139+ [ 'page_size' , request . pageSize ?? this . client . settings . defaultPageSize ] ,
154140 ) ,
155141 } ,
156142 unmarshalListContractSignaturesResponse ,
157143 )
158-
144+
159145 /**
160146 * List contract signatures for an Organization.
161147 *
162148 * @param request - The request {@link ContractApiListContractSignaturesRequest}
163149 * @returns A Promise of ListContractSignaturesResponse
164150 */
165- listContractSignatures = (
166- request : Readonly < ContractApiListContractSignaturesRequest > = { } ,
167- ) =>
168- enrichForPagination (
169- 'contractSignatures' ,
170- this . pageOfListContractSignatures ,
171- request ,
172- )
151+ listContractSignatures = ( request : Readonly < ContractApiListContractSignaturesRequest > = { } ) =>
152+ enrichForPagination ( 'contractSignatures' , this . pageOfListContractSignatures , request )
153+
154+
173155}
174156
175157/**
@@ -197,32 +179,24 @@ export class ProjectAPI extends ParentAPI {
197179 unmarshalProject ,
198180 )
199181
200- protected pageOfListProjects = (
201- request : Readonly < ProjectApiListProjectsRequest > = { } ,
202- ) =>
182+
183+ protected pageOfListProjects = ( request : Readonly < ProjectApiListProjectsRequest > = { } ) =>
203184 this . client . fetch < ListProjectsResponse > (
204185 {
205186 method : 'GET' ,
206187 path : `/account/v3/projects` ,
207188 urlParams : urlParams (
208189 [ 'name' , request . name ] ,
209190 [ 'order_by' , request . orderBy ] ,
210- [
211- 'organization_id' ,
212- request . organizationId ??
213- this . client . settings . defaultOrganizationId ,
214- ] ,
191+ [ 'organization_id' , request . organizationId ?? this . client . settings . defaultOrganizationId ] ,
215192 [ 'page' , request . page ] ,
216- [
217- 'page_size' ,
218- request . pageSize ?? this . client . settings . defaultPageSize ,
219- ] ,
193+ [ 'page_size' , request . pageSize ?? this . client . settings . defaultPageSize ] ,
220194 [ 'project_ids' , request . projectIds ] ,
221195 ) ,
222196 } ,
223197 unmarshalListProjectsResponse ,
224198 )
225-
199+
226200 /**
227201 * List all Projects of an Organization. List all Projects of an Organization. The response will include the total number of Projects as well as their associated Organizations, names, and IDs. Other information includes the creation and update date of the Project.
228202 *
@@ -232,6 +206,7 @@ export class ProjectAPI extends ParentAPI {
232206 listProjects = ( request : Readonly < ProjectApiListProjectsRequest > = { } ) =>
233207 enrichForPagination ( 'projects' , this . pageOfListProjects , request )
234208
209+
235210 /**
236211 * Get an existing Project. Retrieve information about an existing Project, specified by its Project ID. Its full details, including ID, name and description, are returned in the response object.
237212 *
@@ -247,17 +222,21 @@ export class ProjectAPI extends ParentAPI {
247222 unmarshalProject ,
248223 )
249224
225+
250226 /**
251227 * Delete an existing Project. Delete an existing Project, specified by its Project ID. The Project needs to be empty (meaning there are no resources left in it) to be deleted effectively. Note that deleting a Project is permanent, and cannot be undone.
252228 *
253229 * @param request - The request {@link ProjectApiDeleteProjectRequest}
254230 */
255231 deleteProject = ( request : Readonly < ProjectApiDeleteProjectRequest > = { } ) =>
256- this . client . fetch < void > ( {
257- method : 'DELETE' ,
258- path : `/account/v3/projects/${ validatePathParam ( 'projectId' , request . projectId ?? this . client . settings . defaultProjectId ) } ` ,
259- } )
232+ this . client . fetch < void > (
233+ {
234+ method : 'DELETE' ,
235+ path : `/account/v3/projects/${ validatePathParam ( 'projectId' , request . projectId ?? this . client . settings . defaultProjectId ) } ` ,
236+ } ,
237+ )
260238
239+
261240 /**
262241 * Update Project. Update the parameters of an existing Project, specified by its Project ID. These parameters include the name and description.
263242 *
@@ -277,27 +256,26 @@ export class ProjectAPI extends ParentAPI {
277256 unmarshalProject ,
278257 )
279258
259+
280260 /**
281261 * Set project use case. Set the project use case for a new or existing Project, specified by its Project ID. You can customize the use case, sub use case, and architecture type you want to use in the Project.
282262 *
283263 * @param request - The request {@link ProjectApiSetProjectQualificationRequest}
284264 * @returns A Promise of ProjectQualification
285265 */
286- setProjectQualification = (
287- request : Readonly < ProjectApiSetProjectQualificationRequest > = { } ,
288- ) =>
266+ setProjectQualification = ( request : Readonly < ProjectApiSetProjectQualificationRequest > = { } ) =>
289267 this . client . fetch < ProjectQualification > (
290268 {
291269 body : JSON . stringify (
292- marshalProjectApiSetProjectQualificationRequest (
293- request ,
294- this . client . settings ,
295- ) ,
270+ marshalProjectApiSetProjectQualificationRequest ( request , this . client . settings ) ,
296271 ) ,
297272 headers : jsonContentHeaders ,
298273 method : 'POST' ,
299274 path : `/account/v3/projects/${ validatePathParam ( 'projectId' , request . projectId ?? this . client . settings . defaultProjectId ) } /project-qualification` ,
300275 } ,
301276 unmarshalProjectQualification ,
302277 )
278+
279+
303280}
281+
0 commit comments