@gpuai/sdk 0.2.4 → 0.3.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 (53) hide show
  1. package/.openapi-generator/FILES +6 -6
  2. package/README.md +15 -10
  3. package/dist/apis/BillingApi.d.ts +51 -0
  4. package/dist/apis/BillingApi.js +144 -0
  5. package/dist/apis/CommunityApi.d.ts +0 -55
  6. package/dist/apis/CommunityApi.js +0 -151
  7. package/dist/apis/InstancesApi.d.ts +8 -0
  8. package/dist/apis/InstancesApi.js +10 -1
  9. package/dist/esm/apis/BillingApi.d.ts +51 -0
  10. package/dist/esm/apis/BillingApi.js +144 -0
  11. package/dist/esm/apis/CommunityApi.d.ts +0 -55
  12. package/dist/esm/apis/CommunityApi.js +0 -151
  13. package/dist/esm/apis/InstancesApi.d.ts +8 -0
  14. package/dist/esm/apis/InstancesApi.js +9 -0
  15. package/dist/esm/models/CreateCryptoDepositRequest.d.ts +64 -0
  16. package/dist/esm/models/CreateCryptoDepositRequest.js +68 -0
  17. package/dist/esm/models/CryptoDeposit.d.ts +114 -0
  18. package/dist/esm/models/CryptoDeposit.js +90 -0
  19. package/dist/esm/models/InstanceConnection.d.ts +1 -1
  20. package/dist/esm/models/ListDeposits200Response.d.ts +39 -0
  21. package/dist/esm/models/ListDeposits200Response.js +48 -0
  22. package/dist/esm/models/OperationResult.d.ts +1 -7
  23. package/dist/esm/models/OperationResult.js +0 -2
  24. package/dist/esm/models/index.d.ts +3 -3
  25. package/dist/esm/models/index.js +3 -3
  26. package/dist/models/CreateCryptoDepositRequest.d.ts +64 -0
  27. package/dist/models/CreateCryptoDepositRequest.js +76 -0
  28. package/dist/models/CryptoDeposit.d.ts +114 -0
  29. package/dist/models/CryptoDeposit.js +98 -0
  30. package/dist/models/InstanceConnection.d.ts +1 -1
  31. package/dist/models/ListDeposits200Response.d.ts +39 -0
  32. package/dist/models/ListDeposits200Response.js +55 -0
  33. package/dist/models/OperationResult.d.ts +1 -7
  34. package/dist/models/OperationResult.js +0 -2
  35. package/dist/models/index.d.ts +3 -3
  36. package/dist/models/index.js +3 -3
  37. package/docs/BillingApi.md +220 -0
  38. package/docs/CommunityApi.md +0 -230
  39. package/docs/CreateCryptoDepositRequest.md +38 -0
  40. package/docs/CryptoDeposit.md +55 -0
  41. package/docs/InstancesApi.md +4 -1
  42. package/docs/ListDeposits200Response.md +36 -0
  43. package/docs/OperationResult.md +1 -3
  44. package/package.json +1 -1
  45. package/src/apis/BillingApi.ts +182 -0
  46. package/src/apis/CommunityApi.ts +0 -199
  47. package/src/apis/InstancesApi.ts +12 -0
  48. package/src/models/CreateCryptoDepositRequest.ts +108 -0
  49. package/src/models/CryptoDeposit.ts +177 -0
  50. package/src/models/InstanceConnection.ts +1 -1
  51. package/src/models/ListDeposits200Response.ts +83 -0
  52. package/src/models/OperationResult.ts +1 -9
  53. package/src/models/index.ts +3 -3
@@ -24,14 +24,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
25
  exports.CommunityApi = void 0;
26
26
  const runtime = require("../runtime");
27
- const CommunityEarnings_1 = require("../models/CommunityEarnings");
28
27
  const CommunityMachineDelistResult_1 = require("../models/CommunityMachineDelistResult");
29
28
  const CommunityMachineRegistration_1 = require("../models/CommunityMachineRegistration");
30
29
  const CommunitySupplier_1 = require("../models/CommunitySupplier");
31
30
  const ListCommunityMachines200Response_1 = require("../models/ListCommunityMachines200Response");
32
31
  const RegisterCommunityMachineRequest_1 = require("../models/RegisterCommunityMachineRequest");
33
- const SupplierMachineView_1 = require("../models/SupplierMachineView");
34
- const UpdateCommunityMachineRequest_1 = require("../models/UpdateCommunityMachineRequest");
35
32
  /**
36
33
  *
37
34
  */
@@ -131,101 +128,6 @@ class CommunityApi extends runtime.BaseAPI {
131
128
  return yield response.value();
132
129
  });
133
130
  }
134
- /**
135
- * Creates request options for getCommunityEarnings without sending the request
136
- */
137
- getCommunityEarningsRequestOpts(requestParameters) {
138
- return __awaiter(this, void 0, void 0, function* () {
139
- const queryParameters = {};
140
- if (requestParameters['limit'] != null) {
141
- queryParameters['limit'] = requestParameters['limit'];
142
- }
143
- const headerParameters = {};
144
- if (this.configuration && this.configuration.accessToken) {
145
- const token = this.configuration.accessToken;
146
- const tokenString = yield token("bearerAuth", []);
147
- if (tokenString) {
148
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
149
- }
150
- }
151
- let urlPath = `/community/earnings`;
152
- return {
153
- path: urlPath,
154
- method: 'GET',
155
- headers: headerParameters,
156
- query: queryParameters,
157
- };
158
- });
159
- }
160
- /**
161
- * Returns the caller org\'s supplier earnings — lifetime accrued and unpaid totals in cents plus recent ledger entries, newest first. An optional `limit` caps the ledger rows (server-clamped). Requires the `community` scope (read).
162
- * Get your Community Cloud earnings
163
- */
164
- getCommunityEarningsRaw(requestParameters, initOverrides) {
165
- return __awaiter(this, void 0, void 0, function* () {
166
- const requestOptions = yield this.getCommunityEarningsRequestOpts(requestParameters);
167
- const response = yield this.request(requestOptions, initOverrides);
168
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, CommunityEarnings_1.CommunityEarningsFromJSON)(jsonValue));
169
- });
170
- }
171
- /**
172
- * Returns the caller org\'s supplier earnings — lifetime accrued and unpaid totals in cents plus recent ledger entries, newest first. An optional `limit` caps the ledger rows (server-clamped). Requires the `community` scope (read).
173
- * Get your Community Cloud earnings
174
- */
175
- getCommunityEarnings() {
176
- return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
177
- const response = yield this.getCommunityEarningsRaw(requestParameters, initOverrides);
178
- return yield response.value();
179
- });
180
- }
181
- /**
182
- * Creates request options for getCommunityMachine without sending the request
183
- */
184
- getCommunityMachineRequestOpts(requestParameters) {
185
- return __awaiter(this, void 0, void 0, function* () {
186
- if (requestParameters['id'] == null) {
187
- throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getCommunityMachine().');
188
- }
189
- const queryParameters = {};
190
- const headerParameters = {};
191
- if (this.configuration && this.configuration.accessToken) {
192
- const token = this.configuration.accessToken;
193
- const tokenString = yield token("bearerAuth", []);
194
- if (tokenString) {
195
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
196
- }
197
- }
198
- let urlPath = `/community/machines/{id}`;
199
- urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
200
- return {
201
- path: urlPath,
202
- method: 'GET',
203
- headers: headerParameters,
204
- query: queryParameters,
205
- };
206
- });
207
- }
208
- /**
209
- * Returns one machine the caller\'s org owns, as a supplier-facing view (`occupied`/`online` projections — the renting customer\'s instance id is never exposed). A missing or cross-org machine returns 404 with an indistinguishable body. Requires the `community` scope (read).
210
- * Get one of your Community Cloud machines
211
- */
212
- getCommunityMachineRaw(requestParameters, initOverrides) {
213
- return __awaiter(this, void 0, void 0, function* () {
214
- const requestOptions = yield this.getCommunityMachineRequestOpts(requestParameters);
215
- const response = yield this.request(requestOptions, initOverrides);
216
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, SupplierMachineView_1.SupplierMachineViewFromJSON)(jsonValue));
217
- });
218
- }
219
- /**
220
- * Returns one machine the caller\'s org owns, as a supplier-facing view (`occupied`/`online` projections — the renting customer\'s instance id is never exposed). A missing or cross-org machine returns 404 with an indistinguishable body. Requires the `community` scope (read).
221
- * Get one of your Community Cloud machines
222
- */
223
- getCommunityMachine(requestParameters, initOverrides) {
224
- return __awaiter(this, void 0, void 0, function* () {
225
- const response = yield this.getCommunityMachineRaw(requestParameters, initOverrides);
226
- return yield response.value();
227
- });
228
- }
229
131
  /**
230
132
  * Creates request options for getCommunitySupplierMe without sending the request
231
133
  */
@@ -411,58 +313,5 @@ class CommunityApi extends runtime.BaseAPI {
411
313
  return yield response.value();
412
314
  });
413
315
  }
414
- /**
415
- * Creates request options for updateCommunityMachine without sending the request
416
- */
417
- updateCommunityMachineRequestOpts(requestParameters) {
418
- return __awaiter(this, void 0, void 0, function* () {
419
- if (requestParameters['id'] == null) {
420
- throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling updateCommunityMachine().');
421
- }
422
- if (requestParameters['updateCommunityMachineRequest'] == null) {
423
- throw new runtime.RequiredError('updateCommunityMachineRequest', 'Required parameter "updateCommunityMachineRequest" was null or undefined when calling updateCommunityMachine().');
424
- }
425
- const queryParameters = {};
426
- const headerParameters = {};
427
- headerParameters['Content-Type'] = 'application/json';
428
- if (this.configuration && this.configuration.accessToken) {
429
- const token = this.configuration.accessToken;
430
- const tokenString = yield token("bearerAuth", []);
431
- if (tokenString) {
432
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
433
- }
434
- }
435
- let urlPath = `/community/machines/{id}`;
436
- urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
437
- return {
438
- path: urlPath,
439
- method: 'PATCH',
440
- headers: headerParameters,
441
- query: queryParameters,
442
- body: (0, UpdateCommunityMachineRequest_1.UpdateCommunityMachineRequestToJSON)(requestParameters['updateCommunityMachineRequest']),
443
- };
444
- });
445
- }
446
- /**
447
- * Sets the machine\'s hourly price. `price_per_hour` is the WHOLE-MACHINE rate (never per-GPU). Prices below the platform floor are rejected with a `price-below-floor` problem carrying the concrete `floor_per_hour` extension member. A price change never affects an in-flight rental (its rate was snapshotted at provision); the catalog reprices on the next poll. Requires the `community` scope (or `full_access`).
448
- * Update a Community Cloud machine\'s price
449
- */
450
- updateCommunityMachineRaw(requestParameters, initOverrides) {
451
- return __awaiter(this, void 0, void 0, function* () {
452
- const requestOptions = yield this.updateCommunityMachineRequestOpts(requestParameters);
453
- const response = yield this.request(requestOptions, initOverrides);
454
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, SupplierMachineView_1.SupplierMachineViewFromJSON)(jsonValue));
455
- });
456
- }
457
- /**
458
- * Sets the machine\'s hourly price. `price_per_hour` is the WHOLE-MACHINE rate (never per-GPU). Prices below the platform floor are rejected with a `price-below-floor` problem carrying the concrete `floor_per_hour` extension member. A price change never affects an in-flight rental (its rate was snapshotted at provision); the catalog reprices on the next poll. Requires the `community` scope (or `full_access`).
459
- * Update a Community Cloud machine\'s price
460
- */
461
- updateCommunityMachine(requestParameters, initOverrides) {
462
- return __awaiter(this, void 0, void 0, function* () {
463
- const response = yield this.updateCommunityMachineRaw(requestParameters, initOverrides);
464
- return yield response.value();
465
- });
466
- }
467
316
  }
468
317
  exports.CommunityApi = CommunityApi;
@@ -25,6 +25,7 @@ export interface DeleteInstanceRequest {
25
25
  }
26
26
  export interface GetInstanceRequest {
27
27
  id: string;
28
+ include?: GetInstanceIncludeEnum;
28
29
  }
29
30
  export interface ListInstancesRequest {
30
31
  cursor?: string;
@@ -105,6 +106,13 @@ export declare class InstancesApi extends runtime.BaseAPI {
105
106
  */
106
107
  updateInstance(requestParameters: UpdateInstanceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Instance>;
107
108
  }
109
+ /**
110
+ * @export
111
+ */
112
+ export declare const GetInstanceIncludeEnum: {
113
+ readonly Credentials: "credentials";
114
+ };
115
+ export type GetInstanceIncludeEnum = typeof GetInstanceIncludeEnum[keyof typeof GetInstanceIncludeEnum];
108
116
  /**
109
117
  * @export
110
118
  */
@@ -22,7 +22,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
22
22
  });
23
23
  };
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.ListInstancesStatusEnum = exports.InstancesApi = void 0;
25
+ exports.ListInstancesStatusEnum = exports.GetInstanceIncludeEnum = exports.InstancesApi = void 0;
26
26
  const runtime = require("../runtime");
27
27
  const CreateInstanceRequest_1 = require("../models/CreateInstanceRequest");
28
28
  const Instance_1 = require("../models/Instance");
@@ -143,6 +143,9 @@ class InstancesApi extends runtime.BaseAPI {
143
143
  throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getInstance().');
144
144
  }
145
145
  const queryParameters = {};
146
+ if (requestParameters['include'] != null) {
147
+ queryParameters['include'] = requestParameters['include'];
148
+ }
146
149
  const headerParameters = {};
147
150
  if (this.configuration && this.configuration.accessToken) {
148
151
  const token = this.configuration.accessToken;
@@ -289,6 +292,12 @@ class InstancesApi extends runtime.BaseAPI {
289
292
  }
290
293
  }
291
294
  exports.InstancesApi = InstancesApi;
295
+ /**
296
+ * @export
297
+ */
298
+ exports.GetInstanceIncludeEnum = {
299
+ Credentials: 'credentials'
300
+ };
292
301
  /**
293
302
  * @export
294
303
  */
@@ -10,8 +10,17 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
+ import { type CreateCryptoDepositRequest } from '../models/CreateCryptoDepositRequest';
14
+ import { type CryptoDeposit } from '../models/CryptoDeposit';
15
+ import { type ListDeposits200Response } from '../models/ListDeposits200Response';
13
16
  import { type SpendingLimit } from '../models/SpendingLimit';
14
17
  import { type UpdateSpendingLimitRequest } from '../models/UpdateSpendingLimitRequest';
18
+ export interface CreateCryptoDepositOperationRequest {
19
+ createCryptoDepositRequest: CreateCryptoDepositRequest;
20
+ }
21
+ export interface GetDepositRequest {
22
+ id: string;
23
+ }
15
24
  export interface UpdateSpendingLimitOperationRequest {
16
25
  updateSpendingLimitRequest: UpdateSpendingLimitRequest;
17
26
  }
@@ -19,6 +28,34 @@ export interface UpdateSpendingLimitOperationRequest {
19
28
  *
20
29
  */
21
30
  export declare class BillingApi extends runtime.BaseAPI {
31
+ /**
32
+ * Creates request options for createCryptoDeposit without sending the request
33
+ */
34
+ createCryptoDepositRequestOpts(requestParameters: CreateCryptoDepositOperationRequest): Promise<runtime.RequestOpts>;
35
+ /**
36
+ * Creates a deposit intent and returns the payment address and the exact token amount to send. Requires the `billing:write` scope; any member of the organization may add funds. Send the exact `pay_amount` of `asset` on `chain` and no other network — funds sent on a different network are not detected automatically. Returns 404 when stablecoin deposits are not enabled for this deployment.
37
+ * Create a stablecoin deposit
38
+ */
39
+ createCryptoDepositRaw(requestParameters: CreateCryptoDepositOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CryptoDeposit>>;
40
+ /**
41
+ * Creates a deposit intent and returns the payment address and the exact token amount to send. Requires the `billing:write` scope; any member of the organization may add funds. Send the exact `pay_amount` of `asset` on `chain` and no other network — funds sent on a different network are not detected automatically. Returns 404 when stablecoin deposits are not enabled for this deployment.
42
+ * Create a stablecoin deposit
43
+ */
44
+ createCryptoDeposit(requestParameters: CreateCryptoDepositOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CryptoDeposit>;
45
+ /**
46
+ * Creates request options for getDeposit without sending the request
47
+ */
48
+ getDepositRequestOpts(requestParameters: GetDepositRequest): Promise<runtime.RequestOpts>;
49
+ /**
50
+ * Returns a single deposit belonging to the caller\'s organization. Requires the `billing:read` scope. A deposit belonging to another organization returns the same `404 deposit-not-found` as one that does not exist — deliberately, so this endpoint cannot be used to test whether a deposit id is real. Also 404 when stablecoin deposits are not enabled for this deployment.
51
+ * Get one stablecoin deposit
52
+ */
53
+ getDepositRaw(requestParameters: GetDepositRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CryptoDeposit>>;
54
+ /**
55
+ * Returns a single deposit belonging to the caller\'s organization. Requires the `billing:read` scope. A deposit belonging to another organization returns the same `404 deposit-not-found` as one that does not exist — deliberately, so this endpoint cannot be used to test whether a deposit id is real. Also 404 when stablecoin deposits are not enabled for this deployment.
56
+ * Get one stablecoin deposit
57
+ */
58
+ getDeposit(requestParameters: GetDepositRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CryptoDeposit>;
22
59
  /**
23
60
  * Creates request options for getSpendingLimit without sending the request
24
61
  */
@@ -33,6 +70,20 @@ export declare class BillingApi extends runtime.BaseAPI {
33
70
  * Get the org spending limit
34
71
  */
35
72
  getSpendingLimit(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SpendingLimit>;
73
+ /**
74
+ * Creates request options for listDeposits without sending the request
75
+ */
76
+ listDepositsRequestOpts(): Promise<runtime.RequestOpts>;
77
+ /**
78
+ * Returns the organization\'s stablecoin deposits, newest first, capped at 50. Requires the `billing:read` scope. The organization is taken from the authenticated API key, never from a parameter. Returns 404 when stablecoin deposits are not enabled for this deployment.
79
+ * List stablecoin deposits
80
+ */
81
+ listDepositsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListDeposits200Response>>;
82
+ /**
83
+ * Returns the organization\'s stablecoin deposits, newest first, capped at 50. Requires the `billing:read` scope. The organization is taken from the authenticated API key, never from a parameter. Returns 404 when stablecoin deposits are not enabled for this deployment.
84
+ * List stablecoin deposits
85
+ */
86
+ listDeposits(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListDeposits200Response>;
36
87
  /**
37
88
  * Creates request options for updateSpendingLimit without sending the request
38
89
  */
@@ -21,12 +21,112 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import * as runtime from '../runtime';
24
+ import { CreateCryptoDepositRequestToJSON, } from '../models/CreateCryptoDepositRequest';
25
+ import { CryptoDepositFromJSON, } from '../models/CryptoDeposit';
26
+ import { ListDeposits200ResponseFromJSON, } from '../models/ListDeposits200Response';
24
27
  import { SpendingLimitFromJSON, } from '../models/SpendingLimit';
25
28
  import { UpdateSpendingLimitRequestToJSON, } from '../models/UpdateSpendingLimitRequest';
26
29
  /**
27
30
  *
28
31
  */
29
32
  export class BillingApi extends runtime.BaseAPI {
33
+ /**
34
+ * Creates request options for createCryptoDeposit without sending the request
35
+ */
36
+ createCryptoDepositRequestOpts(requestParameters) {
37
+ return __awaiter(this, void 0, void 0, function* () {
38
+ if (requestParameters['createCryptoDepositRequest'] == null) {
39
+ throw new runtime.RequiredError('createCryptoDepositRequest', 'Required parameter "createCryptoDepositRequest" was null or undefined when calling createCryptoDeposit().');
40
+ }
41
+ const queryParameters = {};
42
+ const headerParameters = {};
43
+ headerParameters['Content-Type'] = 'application/json';
44
+ if (this.configuration && this.configuration.accessToken) {
45
+ const token = this.configuration.accessToken;
46
+ const tokenString = yield token("bearerAuth", []);
47
+ if (tokenString) {
48
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
49
+ }
50
+ }
51
+ let urlPath = `/billing/deposits/crypto`;
52
+ return {
53
+ path: urlPath,
54
+ method: 'POST',
55
+ headers: headerParameters,
56
+ query: queryParameters,
57
+ body: CreateCryptoDepositRequestToJSON(requestParameters['createCryptoDepositRequest']),
58
+ };
59
+ });
60
+ }
61
+ /**
62
+ * Creates a deposit intent and returns the payment address and the exact token amount to send. Requires the `billing:write` scope; any member of the organization may add funds. Send the exact `pay_amount` of `asset` on `chain` and no other network — funds sent on a different network are not detected automatically. Returns 404 when stablecoin deposits are not enabled for this deployment.
63
+ * Create a stablecoin deposit
64
+ */
65
+ createCryptoDepositRaw(requestParameters, initOverrides) {
66
+ return __awaiter(this, void 0, void 0, function* () {
67
+ const requestOptions = yield this.createCryptoDepositRequestOpts(requestParameters);
68
+ const response = yield this.request(requestOptions, initOverrides);
69
+ return new runtime.JSONApiResponse(response, (jsonValue) => CryptoDepositFromJSON(jsonValue));
70
+ });
71
+ }
72
+ /**
73
+ * Creates a deposit intent and returns the payment address and the exact token amount to send. Requires the `billing:write` scope; any member of the organization may add funds. Send the exact `pay_amount` of `asset` on `chain` and no other network — funds sent on a different network are not detected automatically. Returns 404 when stablecoin deposits are not enabled for this deployment.
74
+ * Create a stablecoin deposit
75
+ */
76
+ createCryptoDeposit(requestParameters, initOverrides) {
77
+ return __awaiter(this, void 0, void 0, function* () {
78
+ const response = yield this.createCryptoDepositRaw(requestParameters, initOverrides);
79
+ return yield response.value();
80
+ });
81
+ }
82
+ /**
83
+ * Creates request options for getDeposit without sending the request
84
+ */
85
+ getDepositRequestOpts(requestParameters) {
86
+ return __awaiter(this, void 0, void 0, function* () {
87
+ if (requestParameters['id'] == null) {
88
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getDeposit().');
89
+ }
90
+ const queryParameters = {};
91
+ const headerParameters = {};
92
+ if (this.configuration && this.configuration.accessToken) {
93
+ const token = this.configuration.accessToken;
94
+ const tokenString = yield token("bearerAuth", []);
95
+ if (tokenString) {
96
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
97
+ }
98
+ }
99
+ let urlPath = `/billing/deposits/{id}`;
100
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
101
+ return {
102
+ path: urlPath,
103
+ method: 'GET',
104
+ headers: headerParameters,
105
+ query: queryParameters,
106
+ };
107
+ });
108
+ }
109
+ /**
110
+ * Returns a single deposit belonging to the caller\'s organization. Requires the `billing:read` scope. A deposit belonging to another organization returns the same `404 deposit-not-found` as one that does not exist — deliberately, so this endpoint cannot be used to test whether a deposit id is real. Also 404 when stablecoin deposits are not enabled for this deployment.
111
+ * Get one stablecoin deposit
112
+ */
113
+ getDepositRaw(requestParameters, initOverrides) {
114
+ return __awaiter(this, void 0, void 0, function* () {
115
+ const requestOptions = yield this.getDepositRequestOpts(requestParameters);
116
+ const response = yield this.request(requestOptions, initOverrides);
117
+ return new runtime.JSONApiResponse(response, (jsonValue) => CryptoDepositFromJSON(jsonValue));
118
+ });
119
+ }
120
+ /**
121
+ * Returns a single deposit belonging to the caller\'s organization. Requires the `billing:read` scope. A deposit belonging to another organization returns the same `404 deposit-not-found` as one that does not exist — deliberately, so this endpoint cannot be used to test whether a deposit id is real. Also 404 when stablecoin deposits are not enabled for this deployment.
122
+ * Get one stablecoin deposit
123
+ */
124
+ getDeposit(requestParameters, initOverrides) {
125
+ return __awaiter(this, void 0, void 0, function* () {
126
+ const response = yield this.getDepositRaw(requestParameters, initOverrides);
127
+ return yield response.value();
128
+ });
129
+ }
30
130
  /**
31
131
  * Creates request options for getSpendingLimit without sending the request
32
132
  */
@@ -71,6 +171,50 @@ export class BillingApi extends runtime.BaseAPI {
71
171
  return yield response.value();
72
172
  });
73
173
  }
174
+ /**
175
+ * Creates request options for listDeposits without sending the request
176
+ */
177
+ listDepositsRequestOpts() {
178
+ return __awaiter(this, void 0, void 0, function* () {
179
+ const queryParameters = {};
180
+ const headerParameters = {};
181
+ if (this.configuration && this.configuration.accessToken) {
182
+ const token = this.configuration.accessToken;
183
+ const tokenString = yield token("bearerAuth", []);
184
+ if (tokenString) {
185
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
186
+ }
187
+ }
188
+ let urlPath = `/billing/deposits`;
189
+ return {
190
+ path: urlPath,
191
+ method: 'GET',
192
+ headers: headerParameters,
193
+ query: queryParameters,
194
+ };
195
+ });
196
+ }
197
+ /**
198
+ * Returns the organization\'s stablecoin deposits, newest first, capped at 50. Requires the `billing:read` scope. The organization is taken from the authenticated API key, never from a parameter. Returns 404 when stablecoin deposits are not enabled for this deployment.
199
+ * List stablecoin deposits
200
+ */
201
+ listDepositsRaw(initOverrides) {
202
+ return __awaiter(this, void 0, void 0, function* () {
203
+ const requestOptions = yield this.listDepositsRequestOpts();
204
+ const response = yield this.request(requestOptions, initOverrides);
205
+ return new runtime.JSONApiResponse(response, (jsonValue) => ListDeposits200ResponseFromJSON(jsonValue));
206
+ });
207
+ }
208
+ /**
209
+ * Returns the organization\'s stablecoin deposits, newest first, capped at 50. Requires the `billing:read` scope. The organization is taken from the authenticated API key, never from a parameter. Returns 404 when stablecoin deposits are not enabled for this deployment.
210
+ * List stablecoin deposits
211
+ */
212
+ listDeposits(initOverrides) {
213
+ return __awaiter(this, void 0, void 0, function* () {
214
+ const response = yield this.listDepositsRaw(initOverrides);
215
+ return yield response.value();
216
+ });
217
+ }
74
218
  /**
75
219
  * Creates request options for updateSpendingLimit without sending the request
76
220
  */
@@ -10,26 +10,17 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import { type CommunityEarnings } from '../models/CommunityEarnings';
14
13
  import { type CommunityMachineDelistResult } from '../models/CommunityMachineDelistResult';
15
14
  import { type CommunityMachineRegistration } from '../models/CommunityMachineRegistration';
16
15
  import { type CommunitySupplier } from '../models/CommunitySupplier';
17
16
  import { type ListCommunityMachines200Response } from '../models/ListCommunityMachines200Response';
18
17
  import { type RegisterCommunityMachineRequest } from '../models/RegisterCommunityMachineRequest';
19
- import { type SupplierMachineView } from '../models/SupplierMachineView';
20
- import { type UpdateCommunityMachineRequest } from '../models/UpdateCommunityMachineRequest';
21
18
  export interface DelistCommunityMachineRequest {
22
19
  id: string;
23
20
  }
24
21
  export interface EnableCommunitySupplierRequest {
25
22
  idempotencyKey?: string;
26
23
  }
27
- export interface GetCommunityEarningsRequest {
28
- limit?: number;
29
- }
30
- export interface GetCommunityMachineRequest {
31
- id: string;
32
- }
33
24
  export interface ReclaimCommunityMachineRequest {
34
25
  id: string;
35
26
  }
@@ -37,10 +28,6 @@ export interface RegisterCommunityMachineOperationRequest {
37
28
  idempotencyKey?: string;
38
29
  registerCommunityMachineRequest?: RegisterCommunityMachineRequest;
39
30
  }
40
- export interface UpdateCommunityMachineOperationRequest {
41
- id: string;
42
- updateCommunityMachineRequest: UpdateCommunityMachineRequest;
43
- }
44
31
  /**
45
32
  *
46
33
  */
@@ -73,34 +60,6 @@ export declare class CommunityApi extends runtime.BaseAPI {
73
60
  * Enable the Community Cloud supplier role
74
61
  */
75
62
  enableCommunitySupplier(requestParameters?: EnableCommunitySupplierRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CommunitySupplier>;
76
- /**
77
- * Creates request options for getCommunityEarnings without sending the request
78
- */
79
- getCommunityEarningsRequestOpts(requestParameters: GetCommunityEarningsRequest): Promise<runtime.RequestOpts>;
80
- /**
81
- * Returns the caller org\'s supplier earnings — lifetime accrued and unpaid totals in cents plus recent ledger entries, newest first. An optional `limit` caps the ledger rows (server-clamped). Requires the `community` scope (read).
82
- * Get your Community Cloud earnings
83
- */
84
- getCommunityEarningsRaw(requestParameters: GetCommunityEarningsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CommunityEarnings>>;
85
- /**
86
- * Returns the caller org\'s supplier earnings — lifetime accrued and unpaid totals in cents plus recent ledger entries, newest first. An optional `limit` caps the ledger rows (server-clamped). Requires the `community` scope (read).
87
- * Get your Community Cloud earnings
88
- */
89
- getCommunityEarnings(requestParameters?: GetCommunityEarningsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CommunityEarnings>;
90
- /**
91
- * Creates request options for getCommunityMachine without sending the request
92
- */
93
- getCommunityMachineRequestOpts(requestParameters: GetCommunityMachineRequest): Promise<runtime.RequestOpts>;
94
- /**
95
- * Returns one machine the caller\'s org owns, as a supplier-facing view (`occupied`/`online` projections — the renting customer\'s instance id is never exposed). A missing or cross-org machine returns 404 with an indistinguishable body. Requires the `community` scope (read).
96
- * Get one of your Community Cloud machines
97
- */
98
- getCommunityMachineRaw(requestParameters: GetCommunityMachineRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SupplierMachineView>>;
99
- /**
100
- * Returns one machine the caller\'s org owns, as a supplier-facing view (`occupied`/`online` projections — the renting customer\'s instance id is never exposed). A missing or cross-org machine returns 404 with an indistinguishable body. Requires the `community` scope (read).
101
- * Get one of your Community Cloud machines
102
- */
103
- getCommunityMachine(requestParameters: GetCommunityMachineRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SupplierMachineView>;
104
63
  /**
105
64
  * Creates request options for getCommunitySupplierMe without sending the request
106
65
  */
@@ -157,18 +116,4 @@ export declare class CommunityApi extends runtime.BaseAPI {
157
116
  * Register a Community Cloud machine
158
117
  */
159
118
  registerCommunityMachine(requestParameters?: RegisterCommunityMachineOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CommunityMachineRegistration>;
160
- /**
161
- * Creates request options for updateCommunityMachine without sending the request
162
- */
163
- updateCommunityMachineRequestOpts(requestParameters: UpdateCommunityMachineOperationRequest): Promise<runtime.RequestOpts>;
164
- /**
165
- * Sets the machine\'s hourly price. `price_per_hour` is the WHOLE-MACHINE rate (never per-GPU). Prices below the platform floor are rejected with a `price-below-floor` problem carrying the concrete `floor_per_hour` extension member. A price change never affects an in-flight rental (its rate was snapshotted at provision); the catalog reprices on the next poll. Requires the `community` scope (or `full_access`).
166
- * Update a Community Cloud machine\'s price
167
- */
168
- updateCommunityMachineRaw(requestParameters: UpdateCommunityMachineOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SupplierMachineView>>;
169
- /**
170
- * Sets the machine\'s hourly price. `price_per_hour` is the WHOLE-MACHINE rate (never per-GPU). Prices below the platform floor are rejected with a `price-below-floor` problem carrying the concrete `floor_per_hour` extension member. A price change never affects an in-flight rental (its rate was snapshotted at provision); the catalog reprices on the next poll. Requires the `community` scope (or `full_access`).
171
- * Update a Community Cloud machine\'s price
172
- */
173
- updateCommunityMachine(requestParameters: UpdateCommunityMachineOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SupplierMachineView>;
174
119
  }