@scaleway/sdk 2.46.0 → 2.47.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 (174) hide show
  1. package/dist/api/baremetal/v1/api.gen.cjs +3 -1
  2. package/dist/api/baremetal/v1/api.gen.js +3 -1
  3. package/dist/api/edge_services/v1alpha1/api.gen.cjs +599 -0
  4. package/dist/api/edge_services/v1alpha1/api.gen.js +599 -0
  5. package/dist/api/edge_services/v1alpha1/content.gen.cjs +8 -0
  6. package/dist/api/edge_services/v1alpha1/content.gen.js +8 -0
  7. package/dist/api/edge_services/v1alpha1/index.gen.cjs +7 -0
  8. package/dist/api/edge_services/v1alpha1/index.gen.js +7 -0
  9. package/dist/api/edge_services/v1alpha1/marshalling.gen.cjs +434 -0
  10. package/dist/api/edge_services/v1alpha1/marshalling.gen.js +434 -0
  11. package/dist/api/iam/v1alpha1/marshalling.gen.cjs +1 -0
  12. package/dist/api/iam/v1alpha1/marshalling.gen.js +1 -0
  13. package/dist/api/iam/v1alpha1/types.gen.d.ts +2 -0
  14. package/dist/api/index.d.ts +65 -35
  15. package/dist/api/inference/v1beta1/api.gen.cjs +306 -0
  16. package/dist/api/inference/v1beta1/api.gen.js +306 -0
  17. package/dist/api/inference/v1beta1/content.gen.cjs +8 -0
  18. package/dist/api/inference/v1beta1/content.gen.js +8 -0
  19. package/dist/api/inference/v1beta1/index.gen.cjs +8 -0
  20. package/dist/api/inference/v1beta1/index.gen.js +8 -0
  21. package/dist/api/inference/v1beta1/marshalling.gen.cjs +273 -0
  22. package/dist/api/inference/v1beta1/marshalling.gen.js +273 -0
  23. package/dist/api/inference/v1beta1/validation-rules.gen.cjs +56 -0
  24. package/dist/api/inference/v1beta1/validation-rules.gen.js +56 -0
  25. package/dist/api/k8s/v1/validation-rules.gen.cjs +65 -0
  26. package/dist/api/k8s/v1/validation-rules.gen.d.ts +62 -0
  27. package/dist/api/k8s/v1/validation-rules.gen.js +66 -1
  28. package/dist/api/mnq/index.gen.cjs +4 -0
  29. package/dist/api/mnq/index.gen.js +4 -0
  30. package/dist/api/qaas/v1alpha1/api.gen.cjs +527 -0
  31. package/dist/api/qaas/v1alpha1/api.gen.js +527 -0
  32. package/dist/api/qaas/v1alpha1/content.gen.cjs +19 -0
  33. package/dist/api/qaas/v1alpha1/content.gen.js +19 -0
  34. package/dist/api/qaas/v1alpha1/index.gen.cjs +10 -0
  35. package/dist/api/qaas/v1alpha1/index.gen.js +10 -0
  36. package/dist/api/qaas/v1alpha1/marshalling.gen.cjs +320 -0
  37. package/dist/api/qaas/v1alpha1/marshalling.gen.js +320 -0
  38. package/dist/api/qaas/v1alpha1/validation-rules.gen.cjs +14 -0
  39. package/dist/api/qaas/v1alpha1/validation-rules.gen.js +14 -0
  40. package/dist/api/tem/index.gen.cjs +4 -0
  41. package/dist/api/tem/index.gen.js +4 -0
  42. package/dist/api/tem/v1alpha1/api.gen.cjs +32 -0
  43. package/dist/api/tem/v1alpha1/api.gen.d.ts +17 -1
  44. package/dist/api/tem/v1alpha1/api.gen.js +33 -1
  45. package/dist/api/tem/v1alpha1/index.gen.d.ts +1 -1
  46. package/dist/api/tem/v1alpha1/marshalling.gen.cjs +36 -0
  47. package/dist/api/tem/v1alpha1/marshalling.gen.d.ts +3 -1
  48. package/dist/api/tem/v1alpha1/marshalling.gen.js +36 -0
  49. package/dist/api/tem/v1alpha1/types.gen.d.ts +51 -0
  50. package/dist/api/tem/v1alpha1/validation-rules.gen.cjs +11 -0
  51. package/dist/api/tem/v1alpha1/validation-rules.gen.d.ts +10 -0
  52. package/dist/api/tem/v1alpha1/validation-rules.gen.js +11 -0
  53. package/dist/api/webhosting/index.gen.cjs +6 -0
  54. package/dist/api/webhosting/index.gen.js +6 -0
  55. package/dist/api/webhosting/v1/api.gen.cjs +620 -0
  56. package/dist/api/webhosting/v1/api.gen.js +620 -0
  57. package/dist/api/webhosting/v1/content.gen.cjs +14 -0
  58. package/dist/api/webhosting/v1/content.gen.js +14 -0
  59. package/dist/api/webhosting/v1/index.gen.cjs +15 -0
  60. package/dist/api/webhosting/v1/index.gen.js +15 -0
  61. package/dist/api/webhosting/v1/marshalling.gen.cjs +391 -0
  62. package/dist/api/webhosting/v1/marshalling.gen.js +391 -0
  63. package/dist/api/webhosting/v1/types.gen.d.ts +5 -0
  64. package/dist/api/webhosting/v1/validation-rules.gen.cjs +82 -0
  65. package/dist/api/webhosting/v1/validation-rules.gen.js +82 -0
  66. package/dist/index.cjs +92 -70
  67. package/dist/index.js +92 -70
  68. package/dist/scw/constants.cjs +1 -1
  69. package/dist/scw/constants.d.ts +2 -2
  70. package/dist/scw/constants.js +1 -1
  71. package/package.json +2 -2
  72. package/dist/api/account/index.d.ts +0 -2
  73. package/dist/api/applesilicon/index.d.ts +0 -1
  74. package/dist/api/baremetal/index.d.ts +0 -1
  75. package/dist/api/billing/index.d.ts +0 -2
  76. package/dist/api/block/index.d.ts +0 -1
  77. package/dist/api/cockpit/index.d.ts +0 -2
  78. package/dist/api/container/index.d.ts +0 -1
  79. package/dist/api/dedibox/index.d.ts +0 -1
  80. package/dist/api/document_db/index.d.ts +0 -1
  81. package/dist/api/domain/index.d.ts +0 -1
  82. package/dist/api/edge_services/index.d.ts +0 -1
  83. package/dist/api/flexibleip/index.d.ts +0 -1
  84. package/dist/api/function/index.d.ts +0 -1
  85. package/dist/api/iam/index.d.ts +0 -1
  86. package/dist/api/instance/index.d.ts +0 -1
  87. package/dist/api/iot/index.d.ts +0 -1
  88. package/dist/api/ipam/index.d.ts +0 -1
  89. package/dist/api/ipfs/index.d.ts +0 -1
  90. package/dist/api/jobs/index.d.ts +0 -1
  91. package/dist/api/k8s/index.d.ts +0 -1
  92. package/dist/api/key_manager/index.d.ts +0 -1
  93. package/dist/api/lb/index.d.ts +0 -1
  94. package/dist/api/llm_inference/index.d.ts +0 -1
  95. package/dist/api/marketplace/index.d.ts +0 -1
  96. package/dist/api/mnq/index.d.ts +0 -1
  97. package/dist/api/rdb/index.d.ts +0 -1
  98. package/dist/api/redis/index.d.ts +0 -1
  99. package/dist/api/registry/index.d.ts +0 -1
  100. package/dist/api/secret/index.d.ts +0 -2
  101. package/dist/api/serverless_sqldb/index.d.ts +0 -1
  102. package/dist/api/tem/index.d.ts +0 -1
  103. package/dist/api/test/index.d.ts +0 -1
  104. package/dist/api/vpc/index.d.ts +0 -2
  105. package/dist/api/vpcgw/index.d.ts +0 -1
  106. package/dist/api/webhosting/index.d.ts +0 -1
  107. /package/dist/api/account/{index.cjs → index.gen.cjs} +0 -0
  108. /package/dist/api/account/{index.js → index.gen.js} +0 -0
  109. /package/dist/api/applesilicon/{index.cjs → index.gen.cjs} +0 -0
  110. /package/dist/api/applesilicon/{index.js → index.gen.js} +0 -0
  111. /package/dist/api/baremetal/{index.cjs → index.gen.cjs} +0 -0
  112. /package/dist/api/baremetal/{index.js → index.gen.js} +0 -0
  113. /package/dist/api/billing/{index.cjs → index.gen.cjs} +0 -0
  114. /package/dist/api/billing/{index.js → index.gen.js} +0 -0
  115. /package/dist/api/block/{index.cjs → index.gen.cjs} +0 -0
  116. /package/dist/api/block/{index.js → index.gen.js} +0 -0
  117. /package/dist/api/cockpit/{index.cjs → index.gen.cjs} +0 -0
  118. /package/dist/api/cockpit/{index.js → index.gen.js} +0 -0
  119. /package/dist/api/container/{index.cjs → index.gen.cjs} +0 -0
  120. /package/dist/api/container/{index.js → index.gen.js} +0 -0
  121. /package/dist/api/dedibox/{index.cjs → index.gen.cjs} +0 -0
  122. /package/dist/api/dedibox/{index.js → index.gen.js} +0 -0
  123. /package/dist/api/document_db/{index.cjs → index.gen.cjs} +0 -0
  124. /package/dist/api/document_db/{index.js → index.gen.js} +0 -0
  125. /package/dist/api/domain/{index.cjs → index.gen.cjs} +0 -0
  126. /package/dist/api/domain/{index.js → index.gen.js} +0 -0
  127. /package/dist/api/{flexibleip/index.cjs → edge_services/index.gen.cjs} +0 -0
  128. /package/dist/api/{flexibleip/index.js → edge_services/index.gen.js} +0 -0
  129. /package/dist/api/{iam/index.cjs → flexibleip/index.gen.cjs} +0 -0
  130. /package/dist/api/{iam/index.js → flexibleip/index.gen.js} +0 -0
  131. /package/dist/api/function/{index.cjs → index.gen.cjs} +0 -0
  132. /package/dist/api/function/{index.js → index.gen.js} +0 -0
  133. /package/dist/api/{ipfs/index.cjs → iam/index.gen.cjs} +0 -0
  134. /package/dist/api/{ipfs/index.js → iam/index.gen.js} +0 -0
  135. /package/dist/api/{llm_inference/index.cjs → inference/index.gen.cjs} +0 -0
  136. /package/dist/api/{llm_inference/index.js → inference/index.gen.js} +0 -0
  137. /package/dist/api/instance/{index.cjs → index.gen.cjs} +0 -0
  138. /package/dist/api/instance/{index.js → index.gen.js} +0 -0
  139. /package/dist/api/iot/{index.cjs → index.gen.cjs} +0 -0
  140. /package/dist/api/iot/{index.js → index.gen.js} +0 -0
  141. /package/dist/api/ipam/{index.cjs → index.gen.cjs} +0 -0
  142. /package/dist/api/ipam/{index.js → index.gen.js} +0 -0
  143. /package/dist/api/{jobs/index.cjs → ipfs/index.gen.cjs} +0 -0
  144. /package/dist/api/{jobs/index.js → ipfs/index.gen.js} +0 -0
  145. /package/dist/api/{key_manager/index.cjs → jobs/index.gen.cjs} +0 -0
  146. /package/dist/api/{key_manager/index.js → jobs/index.gen.js} +0 -0
  147. /package/dist/api/k8s/{index.cjs → index.gen.cjs} +0 -0
  148. /package/dist/api/k8s/{index.js → index.gen.js} +0 -0
  149. /package/dist/api/{serverless_sqldb/index.cjs → key_manager/index.gen.cjs} +0 -0
  150. /package/dist/api/{serverless_sqldb/index.js → key_manager/index.gen.js} +0 -0
  151. /package/dist/api/lb/{index.cjs → index.gen.cjs} +0 -0
  152. /package/dist/api/lb/{index.js → index.gen.js} +0 -0
  153. /package/dist/api/{mnq/index.cjs → llm_inference/index.gen.cjs} +0 -0
  154. /package/dist/api/{mnq/index.js → llm_inference/index.gen.js} +0 -0
  155. /package/dist/api/marketplace/{index.cjs → index.gen.cjs} +0 -0
  156. /package/dist/api/marketplace/{index.js → index.gen.js} +0 -0
  157. /package/dist/api/{tem/index.cjs → qaas/index.gen.cjs} +0 -0
  158. /package/dist/api/{tem/index.js → qaas/index.gen.js} +0 -0
  159. /package/dist/api/rdb/{index.cjs → index.gen.cjs} +0 -0
  160. /package/dist/api/rdb/{index.js → index.gen.js} +0 -0
  161. /package/dist/api/redis/{index.cjs → index.gen.cjs} +0 -0
  162. /package/dist/api/redis/{index.js → index.gen.js} +0 -0
  163. /package/dist/api/registry/{index.cjs → index.gen.cjs} +0 -0
  164. /package/dist/api/registry/{index.js → index.gen.js} +0 -0
  165. /package/dist/api/secret/{index.cjs → index.gen.cjs} +0 -0
  166. /package/dist/api/secret/{index.js → index.gen.js} +0 -0
  167. /package/dist/api/{webhosting/index.cjs → serverless_sqldb/index.gen.cjs} +0 -0
  168. /package/dist/api/{webhosting/index.js → serverless_sqldb/index.gen.js} +0 -0
  169. /package/dist/api/test/{index.cjs → index.gen.cjs} +0 -0
  170. /package/dist/api/test/{index.js → index.gen.js} +0 -0
  171. /package/dist/api/vpc/{index.cjs → index.gen.cjs} +0 -0
  172. /package/dist/api/vpc/{index.js → index.gen.js} +0 -0
  173. /package/dist/api/vpcgw/{index.cjs → index.gen.cjs} +0 -0
  174. /package/dist/api/vpcgw/{index.js → index.gen.js} +0 -0
@@ -0,0 +1,527 @@
1
+ import { waitForResource } from "../../../internal/async/interval-retrier.js";
2
+ import { API as API$1 } from "../../../scw/api.js";
3
+ import { validatePathParam, urlParams, resolveOneOf } from "../../../helpers/marshalling.js";
4
+ import "../../../vendor/base64/index.js";
5
+ import { enrichForPagination } from "../../../scw/fetch/resource-paginator.js";
6
+ import { JOB_TRANSIENT_STATUSES, SESSION_TRANSIENT_STATUSES, PROCESS_TRANSIENT_STATUSES } from "./content.gen.js";
7
+ import { unmarshalJob, unmarshalListJobsResponse, unmarshalListJobResultsResponse, marshalCreateJobRequest, marshalUpdateJobRequest, unmarshalJobCircuit, unmarshalPlatform, unmarshalListPlatformsResponse, unmarshalSession, unmarshalListSessionsResponse, marshalCreateSessionRequest, marshalUpdateSessionRequest, unmarshalListSessionACLsResponse, marshalCreateProcessRequest, unmarshalProcess, unmarshalListProcessesResponse, marshalUpdateProcessRequest, unmarshalListProcessResultsResponse, unmarshalApplication, unmarshalListApplicationsResponse } from "./marshalling.gen.js";
8
+ const jsonContentHeaders = {
9
+ "Content-Type": "application/json; charset=utf-8"
10
+ };
11
+ class API extends API$1 {
12
+ /**
13
+ * Get job information. Retrieve information about the provided **job ID**,
14
+ * such as status, payload, and result.
15
+ *
16
+ * @param request - The request {@link GetJobRequest}
17
+ * @returns A Promise of Job
18
+ */
19
+ getJob = (request) => this.client.fetch(
20
+ {
21
+ method: "GET",
22
+ path: `/qaas/v1alpha1/jobs/${validatePathParam("jobId", request.jobId)}`
23
+ },
24
+ unmarshalJob
25
+ );
26
+ /**
27
+ * Waits for {@link Job} to be in a final state.
28
+ *
29
+ * @param request - The request {@link GetJobRequest}
30
+ * @param options - The waiting options
31
+ * @returns A Promise of Job
32
+ */
33
+ waitForJob = (request, options) => waitForResource(
34
+ options?.stop ?? ((res) => Promise.resolve(!JOB_TRANSIENT_STATUSES.includes(res.status))),
35
+ this.getJob,
36
+ request,
37
+ options
38
+ );
39
+ pageOfListJobs = (request = {}) => this.client.fetch(
40
+ {
41
+ method: "GET",
42
+ path: `/qaas/v1alpha1/jobs`,
43
+ urlParams: urlParams(
44
+ ["order_by", request.orderBy],
45
+ ["page", request.page],
46
+ [
47
+ "page_size",
48
+ request.pageSize ?? this.client.settings.defaultPageSize
49
+ ],
50
+ ["tags", request.tags],
51
+ ...Object.entries(
52
+ resolveOneOf([
53
+ { param: "session_id", value: request.sessionId },
54
+ {
55
+ default: this.client.settings.defaultProjectId,
56
+ param: "project_id",
57
+ value: request.projectId
58
+ }
59
+ ])
60
+ )
61
+ )
62
+ },
63
+ unmarshalListJobsResponse
64
+ );
65
+ /**
66
+ * List all jobs within a project or session. Retrieve information about all
67
+ * jobs within a given project or session.
68
+ *
69
+ * @param request - The request {@link ListJobsRequest}
70
+ * @returns A Promise of ListJobsResponse
71
+ */
72
+ listJobs = (request = {}) => enrichForPagination("jobs", this.pageOfListJobs, request);
73
+ pageOfListJobResults = (request) => this.client.fetch(
74
+ {
75
+ method: "GET",
76
+ path: `/qaas/v1alpha1/jobs/${validatePathParam("jobId", request.jobId)}/results`,
77
+ urlParams: urlParams(
78
+ ["order_by", request.orderBy],
79
+ ["page", request.page],
80
+ [
81
+ "page_size",
82
+ request.pageSize ?? this.client.settings.defaultPageSize
83
+ ]
84
+ )
85
+ },
86
+ unmarshalListJobResultsResponse
87
+ );
88
+ /**
89
+ * List all results of a job. Retrieve all intermediate and final results of a
90
+ * job.
91
+ *
92
+ * @param request - The request {@link ListJobResultsRequest}
93
+ * @returns A Promise of ListJobResultsResponse
94
+ */
95
+ listJobResults = (request) => enrichForPagination("jobResults", this.pageOfListJobResults, request);
96
+ /**
97
+ * Create a job. Create a job to be executed inside a session.
98
+ *
99
+ * @param request - The request {@link CreateJobRequest}
100
+ * @returns A Promise of Job
101
+ */
102
+ createJob = (request) => this.client.fetch(
103
+ {
104
+ body: JSON.stringify(
105
+ marshalCreateJobRequest(request, this.client.settings)
106
+ ),
107
+ headers: jsonContentHeaders,
108
+ method: "POST",
109
+ path: `/qaas/v1alpha1/jobs`
110
+ },
111
+ unmarshalJob
112
+ );
113
+ /**
114
+ * Update job information. Update job information about the provided **job
115
+ * ID**.
116
+ *
117
+ * @param request - The request {@link UpdateJobRequest}
118
+ * @returns A Promise of Job
119
+ */
120
+ updateJob = (request) => this.client.fetch(
121
+ {
122
+ body: JSON.stringify(
123
+ marshalUpdateJobRequest(request, this.client.settings)
124
+ ),
125
+ headers: jsonContentHeaders,
126
+ method: "PATCH",
127
+ path: `/qaas/v1alpha1/jobs/${validatePathParam("jobId", request.jobId)}`
128
+ },
129
+ unmarshalJob
130
+ );
131
+ /**
132
+ * Cancel a job. Cancel the job corresponding to the provided **job ID**.
133
+ *
134
+ * @param request - The request {@link CancelJobRequest}
135
+ * @returns A Promise of Job
136
+ */
137
+ cancelJob = (request) => this.client.fetch(
138
+ {
139
+ body: "{}",
140
+ headers: jsonContentHeaders,
141
+ method: "POST",
142
+ path: `/qaas/v1alpha1/jobs/${validatePathParam("jobId", request.jobId)}/cancel`
143
+ },
144
+ unmarshalJob
145
+ );
146
+ /**
147
+ * Delete a job. Delete the job corresponding to the provided **job ID**.
148
+ *
149
+ * @param request - The request {@link DeleteJobRequest}
150
+ */
151
+ deleteJob = (request) => this.client.fetch({
152
+ method: "DELETE",
153
+ path: `/qaas/v1alpha1/jobs/${validatePathParam("jobId", request.jobId)}`
154
+ });
155
+ /**
156
+ * Get a job circuit. Retrieve the circuit of the provided **job ID**.
157
+ *
158
+ * @param request - The request {@link GetJobCircuitRequest}
159
+ * @returns A Promise of JobCircuit
160
+ */
161
+ getJobCircuit = (request) => this.client.fetch(
162
+ {
163
+ method: "GET",
164
+ path: `/qaas/v1alpha1/jobs/${validatePathParam("jobId", request.jobId)}/circuit`
165
+ },
166
+ unmarshalJobCircuit
167
+ );
168
+ /**
169
+ * Get platform information. Retrieve information about the provided
170
+ * **platform ID**, such as provider name, technology, and type.
171
+ *
172
+ * @param request - The request {@link GetPlatformRequest}
173
+ * @returns A Promise of Platform
174
+ */
175
+ getPlatform = (request) => this.client.fetch(
176
+ {
177
+ method: "GET",
178
+ path: `/qaas/v1alpha1/platforms/${validatePathParam("platformId", request.platformId)}`
179
+ },
180
+ unmarshalPlatform
181
+ );
182
+ pageOfListPlatforms = (request = {}) => this.client.fetch(
183
+ {
184
+ method: "GET",
185
+ path: `/qaas/v1alpha1/platforms`,
186
+ urlParams: urlParams(
187
+ ["backend_name", request.backendName],
188
+ ["name", request.name],
189
+ ["order_by", request.orderBy],
190
+ ["page", request.page],
191
+ [
192
+ "page_size",
193
+ request.pageSize ?? this.client.settings.defaultPageSize
194
+ ],
195
+ ["platform_technology", request.platformTechnology],
196
+ ["platform_type", request.platformType],
197
+ ["provider_name", request.providerName]
198
+ )
199
+ },
200
+ unmarshalListPlatformsResponse
201
+ );
202
+ /**
203
+ * List all available platforms. Retrieve information about all platforms.
204
+ *
205
+ * @param request - The request {@link ListPlatformsRequest}
206
+ * @returns A Promise of ListPlatformsResponse
207
+ */
208
+ listPlatforms = (request = {}) => enrichForPagination("platforms", this.pageOfListPlatforms, request);
209
+ /**
210
+ * Get session infrormation. Retrieve information about the provided **session
211
+ * ID**, such as name, status, and number of executed jobs.
212
+ *
213
+ * @param request - The request {@link GetSessionRequest}
214
+ * @returns A Promise of Session
215
+ */
216
+ getSession = (request) => this.client.fetch(
217
+ {
218
+ method: "GET",
219
+ path: `/qaas/v1alpha1/sessions/${validatePathParam("sessionId", request.sessionId)}`
220
+ },
221
+ unmarshalSession
222
+ );
223
+ /**
224
+ * Waits for {@link Session} to be in a final state.
225
+ *
226
+ * @param request - The request {@link GetSessionRequest}
227
+ * @param options - The waiting options
228
+ * @returns A Promise of Session
229
+ */
230
+ waitForSession = (request, options) => waitForResource(
231
+ options?.stop ?? ((res) => Promise.resolve(!SESSION_TRANSIENT_STATUSES.includes(res.status))),
232
+ this.getSession,
233
+ request,
234
+ options
235
+ );
236
+ pageOfListSessions = (request = {}) => this.client.fetch(
237
+ {
238
+ method: "GET",
239
+ path: `/qaas/v1alpha1/sessions`,
240
+ urlParams: urlParams(
241
+ ["order_by", request.orderBy],
242
+ ["page", request.page],
243
+ [
244
+ "page_size",
245
+ request.pageSize ?? this.client.settings.defaultPageSize
246
+ ],
247
+ ["platform_id", request.platformId],
248
+ [
249
+ "project_id",
250
+ request.projectId ?? this.client.settings.defaultProjectId
251
+ ],
252
+ ["tags", request.tags]
253
+ )
254
+ },
255
+ unmarshalListSessionsResponse
256
+ );
257
+ /**
258
+ * List all sessions. Retrieve information about all sessions.
259
+ *
260
+ * @param request - The request {@link ListSessionsRequest}
261
+ * @returns A Promise of ListSessionsResponse
262
+ */
263
+ listSessions = (request = {}) => enrichForPagination("sessions", this.pageOfListSessions, request);
264
+ /**
265
+ * Create a session. Create a dedicated session for the specified platform.
266
+ *
267
+ * @param request - The request {@link CreateSessionRequest}
268
+ * @returns A Promise of Session
269
+ */
270
+ createSession = (request) => this.client.fetch(
271
+ {
272
+ body: JSON.stringify(
273
+ marshalCreateSessionRequest(request, this.client.settings)
274
+ ),
275
+ headers: jsonContentHeaders,
276
+ method: "POST",
277
+ path: `/qaas/v1alpha1/sessions`
278
+ },
279
+ unmarshalSession
280
+ );
281
+ /**
282
+ * Update session information. Update session information of the provided
283
+ * **session ID**.
284
+ *
285
+ * @param request - The request {@link UpdateSessionRequest}
286
+ * @returns A Promise of Session
287
+ */
288
+ updateSession = (request) => this.client.fetch(
289
+ {
290
+ body: JSON.stringify(
291
+ marshalUpdateSessionRequest(request, this.client.settings)
292
+ ),
293
+ headers: jsonContentHeaders,
294
+ method: "PATCH",
295
+ path: `/qaas/v1alpha1/sessions/${validatePathParam("sessionId", request.sessionId)}`
296
+ },
297
+ unmarshalSession
298
+ );
299
+ /**
300
+ * Terminate an existing session. Terminate a session by its unique ID and
301
+ * cancel all its attached jobs.
302
+ *
303
+ * @param request - The request {@link TerminateSessionRequest}
304
+ * @returns A Promise of Session
305
+ */
306
+ terminateSession = (request) => this.client.fetch(
307
+ {
308
+ body: "{}",
309
+ headers: jsonContentHeaders,
310
+ method: "POST",
311
+ path: `/qaas/v1alpha1/sessions/${validatePathParam("sessionId", request.sessionId)}/terminate`
312
+ },
313
+ unmarshalSession
314
+ );
315
+ /**
316
+ * Delete an existing session. Delete a session by its unique ID and delete
317
+ * all its attached jobs.
318
+ *
319
+ * @param request - The request {@link DeleteSessionRequest}
320
+ */
321
+ deleteSession = (request) => this.client.fetch({
322
+ method: "DELETE",
323
+ path: `/qaas/v1alpha1/sessions/${validatePathParam("sessionId", request.sessionId)}`
324
+ });
325
+ pageOfListSessionACLs = (request) => this.client.fetch(
326
+ {
327
+ method: "GET",
328
+ path: `/qaas/v1alpha1/sessions/${validatePathParam("sessionId", request.sessionId)}/acls`,
329
+ urlParams: urlParams(
330
+ ["order_by", request.orderBy],
331
+ ["page", request.page],
332
+ [
333
+ "page_size",
334
+ request.pageSize ?? this.client.settings.defaultPageSize
335
+ ]
336
+ )
337
+ },
338
+ unmarshalListSessionACLsResponse
339
+ );
340
+ listSessionACLs = (request) => enrichForPagination("acls", this.pageOfListSessionACLs, request);
341
+ /**
342
+ * Create a process. Create a new process for the specified application on a
343
+ * specified platform.
344
+ *
345
+ * @param request - The request {@link CreateProcessRequest}
346
+ * @returns A Promise of Process
347
+ */
348
+ createProcess = (request) => this.client.fetch(
349
+ {
350
+ body: JSON.stringify(
351
+ marshalCreateProcessRequest(request, this.client.settings)
352
+ ),
353
+ headers: jsonContentHeaders,
354
+ method: "POST",
355
+ path: `/qaas/v1alpha1/processes`
356
+ },
357
+ unmarshalProcess
358
+ );
359
+ /**
360
+ * Get process infrormation. Retrieve information about the provided **process
361
+ * ID**, such as name, status and progress.
362
+ *
363
+ * @param request - The request {@link GetProcessRequest}
364
+ * @returns A Promise of Process
365
+ */
366
+ getProcess = (request) => this.client.fetch(
367
+ {
368
+ method: "GET",
369
+ path: `/qaas/v1alpha1/processes/${validatePathParam("processId", request.processId)}`
370
+ },
371
+ unmarshalProcess
372
+ );
373
+ /**
374
+ * Waits for {@link Process} to be in a final state.
375
+ *
376
+ * @param request - The request {@link GetProcessRequest}
377
+ * @param options - The waiting options
378
+ * @returns A Promise of Process
379
+ */
380
+ waitForProcess = (request, options) => waitForResource(
381
+ options?.stop ?? ((res) => Promise.resolve(!PROCESS_TRANSIENT_STATUSES.includes(res.status))),
382
+ this.getProcess,
383
+ request,
384
+ options
385
+ );
386
+ pageOfListProcesses = (request = {}) => this.client.fetch(
387
+ {
388
+ method: "GET",
389
+ path: `/qaas/v1alpha1/processes`,
390
+ urlParams: urlParams(
391
+ ["application_id", request.applicationId],
392
+ ["order_by", request.orderBy],
393
+ ["page", request.page],
394
+ [
395
+ "page_size",
396
+ request.pageSize ?? this.client.settings.defaultPageSize
397
+ ],
398
+ [
399
+ "project_id",
400
+ request.projectId ?? this.client.settings.defaultProjectId
401
+ ],
402
+ ["tags", request.tags]
403
+ )
404
+ },
405
+ unmarshalListProcessesResponse
406
+ );
407
+ /**
408
+ * List all processes. Retrieve information about all processes.
409
+ *
410
+ * @param request - The request {@link ListProcessesRequest}
411
+ * @returns A Promise of ListProcessesResponse
412
+ */
413
+ listProcesses = (request = {}) => enrichForPagination("processes", this.pageOfListProcesses, request);
414
+ /**
415
+ * Update process information. Update process information of the provided
416
+ * **process ID**.
417
+ *
418
+ * @param request - The request {@link UpdateProcessRequest}
419
+ * @returns A Promise of Process
420
+ */
421
+ updateProcess = (request) => this.client.fetch(
422
+ {
423
+ body: JSON.stringify(
424
+ marshalUpdateProcessRequest(request, this.client.settings)
425
+ ),
426
+ headers: jsonContentHeaders,
427
+ method: "PATCH",
428
+ path: `/qaas/v1alpha1/processes/${validatePathParam("processId", request.processId)}`
429
+ },
430
+ unmarshalProcess
431
+ );
432
+ /**
433
+ * Cancel a running process. Cancel a process by its unique ID. Intermediate
434
+ * results are still available.
435
+ *
436
+ * @param request - The request {@link CancelProcessRequest}
437
+ * @returns A Promise of Process
438
+ */
439
+ cancelProcess = (request) => this.client.fetch(
440
+ {
441
+ body: "{}",
442
+ headers: jsonContentHeaders,
443
+ method: "POST",
444
+ path: `/qaas/v1alpha1/processes/${validatePathParam("processId", request.processId)}/cancel`
445
+ },
446
+ unmarshalProcess
447
+ );
448
+ /**
449
+ * Delete an existing process. Delete a process by its unique ID and delete
450
+ * all its data.
451
+ *
452
+ * @param request - The request {@link DeleteProcessRequest}
453
+ */
454
+ deleteProcess = (request) => this.client.fetch({
455
+ method: "DELETE",
456
+ path: `/qaas/v1alpha1/processes/${validatePathParam("processId", request.processId)}`
457
+ });
458
+ pageOfListProcessResults = (request) => this.client.fetch(
459
+ {
460
+ method: "GET",
461
+ path: `/qaas/v1alpha1/processes/${validatePathParam("processId", request.processId)}/results`,
462
+ urlParams: urlParams(
463
+ ["order_by", request.orderBy],
464
+ ["page", request.page],
465
+ [
466
+ "page_size",
467
+ request.pageSize ?? this.client.settings.defaultPageSize
468
+ ]
469
+ )
470
+ },
471
+ unmarshalListProcessResultsResponse
472
+ );
473
+ /**
474
+ * List all results of a process. Retrieve all intermediate and final result
475
+ * of a process.
476
+ *
477
+ * @param request - The request {@link ListProcessResultsRequest}
478
+ * @returns A Promise of ListProcessResultsResponse
479
+ */
480
+ listProcessResults = (request) => enrichForPagination(
481
+ "processResults",
482
+ this.pageOfListProcessResults,
483
+ request
484
+ );
485
+ /**
486
+ * Get application information. Retrieve information about the provided
487
+ * **applcation ID**, such as name, type and compatible platforms.
488
+ *
489
+ * @param request - The request {@link GetApplicationRequest}
490
+ * @returns A Promise of Application
491
+ */
492
+ getApplication = (request) => this.client.fetch(
493
+ {
494
+ method: "GET",
495
+ path: `/qaas/v1alpha1/applications/${validatePathParam("applicationId", request.applicationId)}`
496
+ },
497
+ unmarshalApplication
498
+ );
499
+ pageOfListApplications = (request = {}) => this.client.fetch(
500
+ {
501
+ method: "GET",
502
+ path: `/qaas/v1alpha1/applications`,
503
+ urlParams: urlParams(
504
+ ["application_type", request.applicationType],
505
+ ["name", request.name],
506
+ ["order_by", request.orderBy],
507
+ ["page", request.page],
508
+ [
509
+ "page_size",
510
+ request.pageSize ?? this.client.settings.defaultPageSize
511
+ ]
512
+ )
513
+ },
514
+ unmarshalListApplicationsResponse
515
+ );
516
+ /**
517
+ * List all available applications. Retrieve information about all
518
+ * applications.
519
+ *
520
+ * @param request - The request {@link ListApplicationsRequest}
521
+ * @returns A Promise of ListApplicationsResponse
522
+ */
523
+ listApplications = (request = {}) => enrichForPagination("applications", this.pageOfListApplications, request);
524
+ }
525
+ export {
526
+ API
527
+ };
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const JOB_TRANSIENT_STATUSES = [
4
+ "waiting",
5
+ "running",
6
+ "cancelling"
7
+ ];
8
+ const PROCESS_TRANSIENT_STATUSES = [
9
+ "starting",
10
+ "running",
11
+ "cancelling"
12
+ ];
13
+ const SESSION_TRANSIENT_STATUSES = [
14
+ "starting",
15
+ "stopping"
16
+ ];
17
+ exports.JOB_TRANSIENT_STATUSES = JOB_TRANSIENT_STATUSES;
18
+ exports.PROCESS_TRANSIENT_STATUSES = PROCESS_TRANSIENT_STATUSES;
19
+ exports.SESSION_TRANSIENT_STATUSES = SESSION_TRANSIENT_STATUSES;
@@ -0,0 +1,19 @@
1
+ const JOB_TRANSIENT_STATUSES = [
2
+ "waiting",
3
+ "running",
4
+ "cancelling"
5
+ ];
6
+ const PROCESS_TRANSIENT_STATUSES = [
7
+ "starting",
8
+ "running",
9
+ "cancelling"
10
+ ];
11
+ const SESSION_TRANSIENT_STATUSES = [
12
+ "starting",
13
+ "stopping"
14
+ ];
15
+ export {
16
+ JOB_TRANSIENT_STATUSES,
17
+ PROCESS_TRANSIENT_STATUSES,
18
+ SESSION_TRANSIENT_STATUSES
19
+ };
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const api_gen = require("./api.gen.cjs");
4
+ const content_gen = require("./content.gen.cjs");
5
+ const validationRules_gen = require("./validation-rules.gen.cjs");
6
+ exports.API = api_gen.API;
7
+ exports.JOB_TRANSIENT_STATUSES = content_gen.JOB_TRANSIENT_STATUSES;
8
+ exports.PROCESS_TRANSIENT_STATUSES = content_gen.PROCESS_TRANSIENT_STATUSES;
9
+ exports.SESSION_TRANSIENT_STATUSES = content_gen.SESSION_TRANSIENT_STATUSES;
10
+ exports.ValidationRules = validationRules_gen;
@@ -0,0 +1,10 @@
1
+ import { API } from "./api.gen.js";
2
+ import { JOB_TRANSIENT_STATUSES, PROCESS_TRANSIENT_STATUSES, SESSION_TRANSIENT_STATUSES } from "./content.gen.js";
3
+ import * as validationRules_gen from "./validation-rules.gen.js";
4
+ export {
5
+ API,
6
+ JOB_TRANSIENT_STATUSES,
7
+ PROCESS_TRANSIENT_STATUSES,
8
+ SESSION_TRANSIENT_STATUSES,
9
+ validationRules_gen as ValidationRules
10
+ };