@gpuai/sdk 0.2.5 → 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 (38) 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/esm/apis/BillingApi.d.ts +51 -0
  8. package/dist/esm/apis/BillingApi.js +144 -0
  9. package/dist/esm/apis/CommunityApi.d.ts +0 -55
  10. package/dist/esm/apis/CommunityApi.js +0 -151
  11. package/dist/esm/models/CreateCryptoDepositRequest.d.ts +64 -0
  12. package/dist/esm/models/CreateCryptoDepositRequest.js +68 -0
  13. package/dist/esm/models/CryptoDeposit.d.ts +114 -0
  14. package/dist/esm/models/CryptoDeposit.js +90 -0
  15. package/dist/esm/models/ListDeposits200Response.d.ts +39 -0
  16. package/dist/esm/models/ListDeposits200Response.js +48 -0
  17. package/dist/esm/models/index.d.ts +3 -3
  18. package/dist/esm/models/index.js +3 -3
  19. package/dist/models/CreateCryptoDepositRequest.d.ts +64 -0
  20. package/dist/models/CreateCryptoDepositRequest.js +76 -0
  21. package/dist/models/CryptoDeposit.d.ts +114 -0
  22. package/dist/models/CryptoDeposit.js +98 -0
  23. package/dist/models/ListDeposits200Response.d.ts +39 -0
  24. package/dist/models/ListDeposits200Response.js +55 -0
  25. package/dist/models/index.d.ts +3 -3
  26. package/dist/models/index.js +3 -3
  27. package/docs/BillingApi.md +220 -0
  28. package/docs/CommunityApi.md +0 -230
  29. package/docs/CreateCryptoDepositRequest.md +38 -0
  30. package/docs/CryptoDeposit.md +55 -0
  31. package/docs/ListDeposits200Response.md +36 -0
  32. package/package.json +1 -1
  33. package/src/apis/BillingApi.ts +182 -0
  34. package/src/apis/CommunityApi.ts +0 -199
  35. package/src/models/CreateCryptoDepositRequest.ts +108 -0
  36. package/src/models/CryptoDeposit.ts +177 -0
  37. package/src/models/ListDeposits200Response.ts +83 -0
  38. package/src/models/index.ts +3 -3
@@ -7,12 +7,11 @@ docs/ChatCompletionRequest.md
7
7
  docs/ChatCompletionResponse.md
8
8
  docs/ChatMessage.md
9
9
  docs/CommunityApi.md
10
- docs/CommunityEarnings.md
11
- docs/CommunityEarningsEntry.md
12
10
  docs/CommunityMachine.md
13
11
  docs/CommunityMachineDelistResult.md
14
12
  docs/CommunityMachineRegistration.md
15
13
  docs/CommunitySupplier.md
14
+ docs/CreateCryptoDepositRequest.md
16
15
  docs/CreateFineTuningJobRequest.md
17
16
  docs/CreateFineTuningJobRequestGpuai.md
18
17
  docs/CreateFineTuningJobRequestMethod.md
@@ -20,6 +19,7 @@ docs/CreateFineTuningJobRequestMethodLora.md
20
19
  docs/CreateInstanceRequest.md
21
20
  docs/CreateSshKeyRequest.md
22
21
  docs/CreateWebhookEndpointRequest.md
22
+ docs/CryptoDeposit.md
23
23
  docs/Environments.md
24
24
  docs/EnvironmentsApi.md
25
25
  docs/FileObject.md
@@ -46,6 +46,7 @@ docs/InstanceConnection.md
46
46
  docs/InstancePage.md
47
47
  docs/InstancesApi.md
48
48
  docs/ListCommunityMachines200Response.md
49
+ docs/ListDeposits200Response.md
49
50
  docs/MetaApi.md
50
51
  docs/Model.md
51
52
  docs/ModelList.md
@@ -73,7 +74,6 @@ docs/TemplateEnvInner.md
73
74
  docs/TemplateList.md
74
75
  docs/TemplatePortsInner.md
75
76
  docs/TemplatesApi.md
76
- docs/UpdateCommunityMachineRequest.md
77
77
  docs/UpdateInstanceRequest.md
78
78
  docs/UpdateSpendingLimitRequest.md
79
79
  docs/Usage.md
@@ -108,12 +108,11 @@ src/models/ChatChoice.ts
108
108
  src/models/ChatCompletionRequest.ts
109
109
  src/models/ChatCompletionResponse.ts
110
110
  src/models/ChatMessage.ts
111
- src/models/CommunityEarnings.ts
112
- src/models/CommunityEarningsEntry.ts
113
111
  src/models/CommunityMachine.ts
114
112
  src/models/CommunityMachineDelistResult.ts
115
113
  src/models/CommunityMachineRegistration.ts
116
114
  src/models/CommunitySupplier.ts
115
+ src/models/CreateCryptoDepositRequest.ts
117
116
  src/models/CreateFineTuningJobRequest.ts
118
117
  src/models/CreateFineTuningJobRequestGpuai.ts
119
118
  src/models/CreateFineTuningJobRequestMethod.ts
@@ -121,6 +120,7 @@ src/models/CreateFineTuningJobRequestMethodLora.ts
121
120
  src/models/CreateInstanceRequest.ts
122
121
  src/models/CreateSshKeyRequest.ts
123
122
  src/models/CreateWebhookEndpointRequest.ts
123
+ src/models/CryptoDeposit.ts
124
124
  src/models/Environments.ts
125
125
  src/models/FileObject.ts
126
126
  src/models/FineTuningJob.ts
@@ -142,6 +142,7 @@ src/models/Instance.ts
142
142
  src/models/InstanceConnection.ts
143
143
  src/models/InstancePage.ts
144
144
  src/models/ListCommunityMachines200Response.ts
145
+ src/models/ListDeposits200Response.ts
145
146
  src/models/Model.ts
146
147
  src/models/ModelList.ts
147
148
  src/models/ModelParametersInner.ts
@@ -164,7 +165,6 @@ src/models/Template.ts
164
165
  src/models/TemplateEnvInner.ts
165
166
  src/models/TemplateList.ts
166
167
  src/models/TemplatePortsInner.ts
167
- src/models/UpdateCommunityMachineRequest.ts
168
168
  src/models/UpdateInstanceRequest.ts
169
169
  src/models/UpdateSpendingLimitRequest.ts
170
170
  src/models/Usage.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @gpuai/sdk@0.2.5
1
+ # @gpuai/sdk@0.3.0
2
2
 
3
3
  A TypeScript SDK client for the api.gpu.ai API.
4
4
 
@@ -18,7 +18,7 @@ import {
18
18
  Configuration,
19
19
  BillingApi,
20
20
  } from '@gpuai/sdk';
21
- import type { GetSpendingLimitRequest } from '@gpuai/sdk';
21
+ import type { CreateCryptoDepositOperationRequest } from '@gpuai/sdk';
22
22
 
23
23
  async function example() {
24
24
  console.log("🚀 Testing @gpuai/sdk SDK...");
@@ -28,8 +28,13 @@ async function example() {
28
28
  });
29
29
  const api = new BillingApi(config);
30
30
 
31
+ const body = {
32
+ // CreateCryptoDepositRequest
33
+ createCryptoDepositRequest: ...,
34
+ } satisfies CreateCryptoDepositOperationRequest;
35
+
31
36
  try {
32
- const data = await api.getSpendingLimit();
37
+ const data = await api.createCryptoDeposit(body);
33
38
  console.log(data);
34
39
  } catch (error) {
35
40
  console.error(error);
@@ -49,17 +54,17 @@ All URIs are relative to *https://api.gpu.ai/v1*
49
54
 
50
55
  | Class | Method | HTTP request | Description
51
56
  | ----- | ------ | ------------ | -------------
57
+ *BillingApi* | [**createCryptoDeposit**](docs/BillingApi.md#createcryptodepositoperation) | **POST** /billing/deposits/crypto | Create a stablecoin deposit
58
+ *BillingApi* | [**getDeposit**](docs/BillingApi.md#getdeposit) | **GET** /billing/deposits/{id} | Get one stablecoin deposit
52
59
  *BillingApi* | [**getSpendingLimit**](docs/BillingApi.md#getspendinglimit) | **GET** /billing/spending-limit | Get the org spending limit
60
+ *BillingApi* | [**listDeposits**](docs/BillingApi.md#listdeposits) | **GET** /billing/deposits | List stablecoin deposits
53
61
  *BillingApi* | [**updateSpendingLimit**](docs/BillingApi.md#updatespendinglimitoperation) | **PUT** /billing/spending-limit | Set the org spending limit
54
62
  *CommunityApi* | [**delistCommunityMachine**](docs/CommunityApi.md#delistcommunitymachine) | **POST** /community/machines/{id}/delist | Delist a Community Cloud machine
55
63
  *CommunityApi* | [**enableCommunitySupplier**](docs/CommunityApi.md#enablecommunitysupplier) | **POST** /community/suppliers | Enable the Community Cloud supplier role
56
- *CommunityApi* | [**getCommunityEarnings**](docs/CommunityApi.md#getcommunityearnings) | **GET** /community/earnings | Get your Community Cloud earnings
57
- *CommunityApi* | [**getCommunityMachine**](docs/CommunityApi.md#getcommunitymachine) | **GET** /community/machines/{id} | Get one of your Community Cloud machines
58
64
  *CommunityApi* | [**getCommunitySupplierMe**](docs/CommunityApi.md#getcommunitysupplierme) | **GET** /community/suppliers/me | Get the caller\'s Community Cloud supplier
59
65
  *CommunityApi* | [**listCommunityMachines**](docs/CommunityApi.md#listcommunitymachines) | **GET** /community/machines | List your Community Cloud machines
60
66
  *CommunityApi* | [**reclaimCommunityMachine**](docs/CommunityApi.md#reclaimcommunitymachine) | **POST** /community/machines/{id}/reclaim | Reclaim a spot-tier Community Cloud machine
61
67
  *CommunityApi* | [**registerCommunityMachine**](docs/CommunityApi.md#registercommunitymachineoperation) | **POST** /community/machines | Register a Community Cloud machine
62
- *CommunityApi* | [**updateCommunityMachine**](docs/CommunityApi.md#updatecommunitymachineoperation) | **PATCH** /community/machines/{id} | Update a Community Cloud machine\'s price
63
68
  *EnvironmentsApi* | [**getEnvironments**](docs/EnvironmentsApi.md#getenvironments) | **GET** /environments | List launch environments (no auth required)
64
69
  *FineTuningApi* | [**cancelFineTuningJob**](docs/FineTuningApi.md#cancelfinetuningjob) | **POST** /fine_tuning/jobs/{id}/cancel | Cancel a fine-tuning job (OpenAI-compatible)
65
70
  *FineTuningApi* | [**createFile**](docs/FineTuningApi.md#createfile) | **POST** /files | Upload a fine-tuning dataset file (OpenAI-compatible)
@@ -105,12 +110,11 @@ All URIs are relative to *https://api.gpu.ai/v1*
105
110
  - [ChatCompletionRequest](docs/ChatCompletionRequest.md)
106
111
  - [ChatCompletionResponse](docs/ChatCompletionResponse.md)
107
112
  - [ChatMessage](docs/ChatMessage.md)
108
- - [CommunityEarnings](docs/CommunityEarnings.md)
109
- - [CommunityEarningsEntry](docs/CommunityEarningsEntry.md)
110
113
  - [CommunityMachine](docs/CommunityMachine.md)
111
114
  - [CommunityMachineDelistResult](docs/CommunityMachineDelistResult.md)
112
115
  - [CommunityMachineRegistration](docs/CommunityMachineRegistration.md)
113
116
  - [CommunitySupplier](docs/CommunitySupplier.md)
117
+ - [CreateCryptoDepositRequest](docs/CreateCryptoDepositRequest.md)
114
118
  - [CreateFineTuningJobRequest](docs/CreateFineTuningJobRequest.md)
115
119
  - [CreateFineTuningJobRequestGpuai](docs/CreateFineTuningJobRequestGpuai.md)
116
120
  - [CreateFineTuningJobRequestMethod](docs/CreateFineTuningJobRequestMethod.md)
@@ -118,6 +122,7 @@ All URIs are relative to *https://api.gpu.ai/v1*
118
122
  - [CreateInstanceRequest](docs/CreateInstanceRequest.md)
119
123
  - [CreateSshKeyRequest](docs/CreateSshKeyRequest.md)
120
124
  - [CreateWebhookEndpointRequest](docs/CreateWebhookEndpointRequest.md)
125
+ - [CryptoDeposit](docs/CryptoDeposit.md)
121
126
  - [Environments](docs/Environments.md)
122
127
  - [FileObject](docs/FileObject.md)
123
128
  - [FineTuningJob](docs/FineTuningJob.md)
@@ -139,6 +144,7 @@ All URIs are relative to *https://api.gpu.ai/v1*
139
144
  - [InstanceConnection](docs/InstanceConnection.md)
140
145
  - [InstancePage](docs/InstancePage.md)
141
146
  - [ListCommunityMachines200Response](docs/ListCommunityMachines200Response.md)
147
+ - [ListDeposits200Response](docs/ListDeposits200Response.md)
142
148
  - [Model](docs/Model.md)
143
149
  - [ModelList](docs/ModelList.md)
144
150
  - [ModelParametersInner](docs/ModelParametersInner.md)
@@ -161,7 +167,6 @@ All URIs are relative to *https://api.gpu.ai/v1*
161
167
  - [TemplateEnvInner](docs/TemplateEnvInner.md)
162
168
  - [TemplateList](docs/TemplateList.md)
163
169
  - [TemplatePortsInner](docs/TemplatePortsInner.md)
164
- - [UpdateCommunityMachineRequest](docs/UpdateCommunityMachineRequest.md)
165
170
  - [UpdateInstanceRequest](docs/UpdateInstanceRequest.md)
166
171
  - [UpdateSpendingLimitRequest](docs/UpdateSpendingLimitRequest.md)
167
172
  - [Usage](docs/Usage.md)
@@ -191,7 +196,7 @@ and is automatically generated by the
191
196
  [OpenAPI Generator](https://openapi-generator.tech) project:
192
197
 
193
198
  - API version: `1.0.0`
194
- - Package version: `0.2.5`
199
+ - Package version: `0.3.0`
195
200
  - Generator version: `7.24.0`
196
201
  - Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
197
202
 
@@ -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
  */
@@ -24,12 +24,112 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
25
  exports.BillingApi = void 0;
26
26
  const runtime = require("../runtime");
27
+ const CreateCryptoDepositRequest_1 = require("../models/CreateCryptoDepositRequest");
28
+ const CryptoDeposit_1 = require("../models/CryptoDeposit");
29
+ const ListDeposits200Response_1 = require("../models/ListDeposits200Response");
27
30
  const SpendingLimit_1 = require("../models/SpendingLimit");
28
31
  const UpdateSpendingLimitRequest_1 = require("../models/UpdateSpendingLimitRequest");
29
32
  /**
30
33
  *
31
34
  */
32
35
  class BillingApi extends runtime.BaseAPI {
36
+ /**
37
+ * Creates request options for createCryptoDeposit without sending the request
38
+ */
39
+ createCryptoDepositRequestOpts(requestParameters) {
40
+ return __awaiter(this, void 0, void 0, function* () {
41
+ if (requestParameters['createCryptoDepositRequest'] == null) {
42
+ throw new runtime.RequiredError('createCryptoDepositRequest', 'Required parameter "createCryptoDepositRequest" was null or undefined when calling createCryptoDeposit().');
43
+ }
44
+ const queryParameters = {};
45
+ const headerParameters = {};
46
+ headerParameters['Content-Type'] = 'application/json';
47
+ if (this.configuration && this.configuration.accessToken) {
48
+ const token = this.configuration.accessToken;
49
+ const tokenString = yield token("bearerAuth", []);
50
+ if (tokenString) {
51
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
52
+ }
53
+ }
54
+ let urlPath = `/billing/deposits/crypto`;
55
+ return {
56
+ path: urlPath,
57
+ method: 'POST',
58
+ headers: headerParameters,
59
+ query: queryParameters,
60
+ body: (0, CreateCryptoDepositRequest_1.CreateCryptoDepositRequestToJSON)(requestParameters['createCryptoDepositRequest']),
61
+ };
62
+ });
63
+ }
64
+ /**
65
+ * 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.
66
+ * Create a stablecoin deposit
67
+ */
68
+ createCryptoDepositRaw(requestParameters, initOverrides) {
69
+ return __awaiter(this, void 0, void 0, function* () {
70
+ const requestOptions = yield this.createCryptoDepositRequestOpts(requestParameters);
71
+ const response = yield this.request(requestOptions, initOverrides);
72
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, CryptoDeposit_1.CryptoDepositFromJSON)(jsonValue));
73
+ });
74
+ }
75
+ /**
76
+ * 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.
77
+ * Create a stablecoin deposit
78
+ */
79
+ createCryptoDeposit(requestParameters, initOverrides) {
80
+ return __awaiter(this, void 0, void 0, function* () {
81
+ const response = yield this.createCryptoDepositRaw(requestParameters, initOverrides);
82
+ return yield response.value();
83
+ });
84
+ }
85
+ /**
86
+ * Creates request options for getDeposit without sending the request
87
+ */
88
+ getDepositRequestOpts(requestParameters) {
89
+ return __awaiter(this, void 0, void 0, function* () {
90
+ if (requestParameters['id'] == null) {
91
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getDeposit().');
92
+ }
93
+ const queryParameters = {};
94
+ const headerParameters = {};
95
+ if (this.configuration && this.configuration.accessToken) {
96
+ const token = this.configuration.accessToken;
97
+ const tokenString = yield token("bearerAuth", []);
98
+ if (tokenString) {
99
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
100
+ }
101
+ }
102
+ let urlPath = `/billing/deposits/{id}`;
103
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
104
+ return {
105
+ path: urlPath,
106
+ method: 'GET',
107
+ headers: headerParameters,
108
+ query: queryParameters,
109
+ };
110
+ });
111
+ }
112
+ /**
113
+ * 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.
114
+ * Get one stablecoin deposit
115
+ */
116
+ getDepositRaw(requestParameters, initOverrides) {
117
+ return __awaiter(this, void 0, void 0, function* () {
118
+ const requestOptions = yield this.getDepositRequestOpts(requestParameters);
119
+ const response = yield this.request(requestOptions, initOverrides);
120
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, CryptoDeposit_1.CryptoDepositFromJSON)(jsonValue));
121
+ });
122
+ }
123
+ /**
124
+ * 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.
125
+ * Get one stablecoin deposit
126
+ */
127
+ getDeposit(requestParameters, initOverrides) {
128
+ return __awaiter(this, void 0, void 0, function* () {
129
+ const response = yield this.getDepositRaw(requestParameters, initOverrides);
130
+ return yield response.value();
131
+ });
132
+ }
33
133
  /**
34
134
  * Creates request options for getSpendingLimit without sending the request
35
135
  */
@@ -74,6 +174,50 @@ class BillingApi extends runtime.BaseAPI {
74
174
  return yield response.value();
75
175
  });
76
176
  }
177
+ /**
178
+ * Creates request options for listDeposits without sending the request
179
+ */
180
+ listDepositsRequestOpts() {
181
+ return __awaiter(this, void 0, void 0, function* () {
182
+ const queryParameters = {};
183
+ const headerParameters = {};
184
+ if (this.configuration && this.configuration.accessToken) {
185
+ const token = this.configuration.accessToken;
186
+ const tokenString = yield token("bearerAuth", []);
187
+ if (tokenString) {
188
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
189
+ }
190
+ }
191
+ let urlPath = `/billing/deposits`;
192
+ return {
193
+ path: urlPath,
194
+ method: 'GET',
195
+ headers: headerParameters,
196
+ query: queryParameters,
197
+ };
198
+ });
199
+ }
200
+ /**
201
+ * 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.
202
+ * List stablecoin deposits
203
+ */
204
+ listDepositsRaw(initOverrides) {
205
+ return __awaiter(this, void 0, void 0, function* () {
206
+ const requestOptions = yield this.listDepositsRequestOpts();
207
+ const response = yield this.request(requestOptions, initOverrides);
208
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, ListDeposits200Response_1.ListDeposits200ResponseFromJSON)(jsonValue));
209
+ });
210
+ }
211
+ /**
212
+ * 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.
213
+ * List stablecoin deposits
214
+ */
215
+ listDeposits(initOverrides) {
216
+ return __awaiter(this, void 0, void 0, function* () {
217
+ const response = yield this.listDepositsRaw(initOverrides);
218
+ return yield response.value();
219
+ });
220
+ }
77
221
  /**
78
222
  * Creates request options for updateSpendingLimit without sending the request
79
223
  */
@@ -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
  }