@ornncompute/cli 1.0.187 → 1.0.190

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ornncompute/cli",
3
- "version": "1.0.187",
3
+ "version": "1.0.190",
4
4
  "description": "Command-line interface for Ornn compute access workflows.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1040,6 +1040,18 @@ function listComputeDealVersions(request, id2, input = {}, signal) {
1040
1040
  signal
1041
1041
  });
1042
1042
  }
1043
+ function getComputeDealFinancials(request, id2, signal) {
1044
+ return request(`${dealPath2(id2)}/financials`, {
1045
+ method: "GET",
1046
+ signal
1047
+ });
1048
+ }
1049
+ function signOffComputeDealFinancials(request, id2, body) {
1050
+ return request(`${dealPath2(id2)}/financial-sign-off`, {
1051
+ method: "PUT",
1052
+ body
1053
+ });
1054
+ }
1043
1055
 
1044
1056
  // ../../packages/api-client/dist/commerce/compute-contract-payments.js
1045
1057
  var base7 = (id2) => `/internal/v1/gtm/compute-contracts/${encodeURIComponent(id2)}/payment-evidence`;
@@ -1230,6 +1242,7 @@ export {
1230
1242
  getCommerceOrganization,
1231
1243
  getComputeContract,
1232
1244
  getComputeContractLinePricePhases,
1245
+ getComputeDealFinancials,
1233
1246
  getComputeDealModelState,
1234
1247
  getComputeDealV2,
1235
1248
  getContractExtraction,
@@ -1325,6 +1338,7 @@ export {
1325
1338
  revokeSupplierIntakeLink,
1326
1339
  setBillingPaymentMethod,
1327
1340
  setReservationDisk,
1341
+ signOffComputeDealFinancials,
1328
1342
  stopReservation,
1329
1343
  transferReservation,
1330
1344
  updateComputeContract,
@@ -145,17 +145,15 @@ function listControllers(request, query = {}, signal) {
145
145
  params.set("kind", query.kind);
146
146
  if (query.tenant_id !== void 0)
147
147
  params.set("tenant_id", query.tenant_id);
148
+ if (query.scope !== void 0)
149
+ params.set("scope", query.scope);
148
150
  return request(`${controllersSocketPath}${params.size ? `?${params}` : ""}`, {
149
151
  method: "GET",
150
152
  ...signal ? { signal } : {}
151
153
  });
152
154
  }
153
155
  function createController(request, body, options) {
154
- return request(controllersSocketPath, {
155
- ...options,
156
- method: "POST",
157
- body
158
- });
156
+ return request(controllersSocketPath, { ...options, method: "POST", body });
159
157
  }
160
158
  function getControllerAccess(request, id, signal) {
161
159
  return request(`${controllerPath(id)}/access`, {
@@ -163,32 +161,37 @@ function getControllerAccess(request, id, signal) {
163
161
  ...signal ? { signal } : {}
164
162
  });
165
163
  }
166
- function teardownController(request, id, options) {
167
- return request(`${controllerPath(id)}/teardown`, {
164
+ function teardownController(request, id, { tenant_id, ...options } = {}) {
165
+ const query = tenant_id === void 0 ? "" : `?${new URLSearchParams({ tenant_id })}`;
166
+ return request(`${controllerPath(id)}/teardown${query}`, {
168
167
  ...options,
169
168
  method: "POST"
170
169
  });
171
170
  }
172
- function addControllerNode(request, id, nodeId, options) {
173
- return request(`${controllerPath(id)}/nodes/${encodeURIComponent(nodeId)}`, {
171
+ function controllerWorkerPath(id, resource, workerId, tenantId) {
172
+ const path6 = `${controllerPath(id)}/${resource}/${encodeURIComponent(workerId)}`;
173
+ return tenantId === void 0 ? path6 : `${path6}?${new URLSearchParams({ tenant_id: tenantId })}`;
174
+ }
175
+ function addControllerNode(request, id, nodeId, { tenant_id, ...options } = {}) {
176
+ return request(controllerWorkerPath(id, "nodes", nodeId, tenant_id), {
174
177
  ...options,
175
178
  method: "POST"
176
179
  });
177
180
  }
178
- function removeControllerNode(request, id, nodeId, options) {
179
- return request(`${controllerPath(id)}/nodes/${encodeURIComponent(nodeId)}`, {
181
+ function removeControllerNode(request, id, nodeId, { tenant_id, ...options } = {}) {
182
+ return request(controllerWorkerPath(id, "nodes", nodeId, tenant_id), {
180
183
  ...options,
181
184
  method: "DELETE"
182
185
  });
183
186
  }
184
187
  function addControllerVirtualMachine(request, id, virtualMachineId, query = {}, options) {
185
- const params = new URLSearchParams();
186
- if (query.tenant_id !== void 0)
187
- params.set("tenant_id", query.tenant_id);
188
- return request(`${controllerPath(id)}/virtual-machines/${encodeURIComponent(virtualMachineId)}${params.size ? `?${params}` : ""}`, { ...options, method: "POST" });
188
+ return request(controllerWorkerPath(id, "virtual-machines", virtualMachineId, query.tenant_id), {
189
+ ...options,
190
+ method: "POST"
191
+ });
189
192
  }
190
- function removeControllerVirtualMachine(request, id, virtualMachineId, options) {
191
- return request(`${controllerPath(id)}/virtual-machines/${encodeURIComponent(virtualMachineId)}`, {
193
+ function removeControllerVirtualMachine(request, id, virtualMachineId, { tenant_id, ...options } = {}) {
194
+ return request(controllerWorkerPath(id, "virtual-machines", virtualMachineId, tenant_id), {
192
195
  ...options,
193
196
  method: "DELETE"
194
197
  });
@@ -25,20 +25,20 @@ function controllerPath(id) {
25
25
  return `${controllersSocketPath}/${encodeURIComponent(id)}`;
26
26
  }
27
27
  function createController(request, body2, options) {
28
- return request(controllersSocketPath, {
29
- ...options,
30
- method: "POST",
31
- body: body2
32
- });
28
+ return request(controllersSocketPath, { ...options, method: "POST", body: body2 });
29
+ }
30
+ function controllerWorkerPath(id, resource, workerId, tenantId) {
31
+ const path3 = `${controllerPath(id)}/${resource}/${encodeURIComponent(workerId)}`;
32
+ return tenantId === void 0 ? path3 : `${path3}?${new URLSearchParams({ tenant_id: tenantId })}`;
33
33
  }
34
- function addControllerNode(request, id, nodeId3, options) {
35
- return request(`${controllerPath(id)}/nodes/${encodeURIComponent(nodeId3)}`, {
34
+ function addControllerNode(request, id, nodeId3, { tenant_id, ...options } = {}) {
35
+ return request(controllerWorkerPath(id, "nodes", nodeId3, tenant_id), {
36
36
  ...options,
37
37
  method: "POST"
38
38
  });
39
39
  }
40
- function removeControllerNode(request, id, nodeId3, options) {
41
- return request(`${controllerPath(id)}/nodes/${encodeURIComponent(nodeId3)}`, {
40
+ function removeControllerNode(request, id, nodeId3, { tenant_id, ...options } = {}) {
41
+ return request(controllerWorkerPath(id, "nodes", nodeId3, tenant_id), {
42
42
  ...options,
43
43
  method: "DELETE"
44
44
  });