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