@gpuai/sdk 0.1.3 → 0.2.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 +0 -6
  2. package/README.md +4 -15
  3. package/dist/apis/BillingApi.d.ts +0 -51
  4. package/dist/apis/BillingApi.js +0 -144
  5. package/dist/esm/apis/BillingApi.d.ts +0 -51
  6. package/dist/esm/apis/BillingApi.js +0 -144
  7. package/dist/esm/models/Instance.d.ts +6 -0
  8. package/dist/esm/models/Instance.js +2 -0
  9. package/dist/esm/models/index.d.ts +0 -3
  10. package/dist/esm/models/index.js +0 -3
  11. package/dist/models/Instance.d.ts +6 -0
  12. package/dist/models/Instance.js +2 -0
  13. package/dist/models/index.d.ts +0 -3
  14. package/dist/models/index.js +0 -3
  15. package/docs/BillingApi.md +0 -220
  16. package/docs/Instance.md +2 -0
  17. package/package.json +1 -1
  18. package/src/apis/BillingApi.ts +0 -182
  19. package/src/models/Instance.ts +8 -0
  20. package/src/models/index.ts +0 -3
  21. package/dist/esm/models/CreateCryptoDepositRequest.d.ts +0 -64
  22. package/dist/esm/models/CreateCryptoDepositRequest.js +0 -68
  23. package/dist/esm/models/CryptoDeposit.d.ts +0 -114
  24. package/dist/esm/models/CryptoDeposit.js +0 -90
  25. package/dist/esm/models/ListDeposits200Response.d.ts +0 -39
  26. package/dist/esm/models/ListDeposits200Response.js +0 -48
  27. package/dist/models/CreateCryptoDepositRequest.d.ts +0 -64
  28. package/dist/models/CreateCryptoDepositRequest.js +0 -76
  29. package/dist/models/CryptoDeposit.d.ts +0 -114
  30. package/dist/models/CryptoDeposit.js +0 -98
  31. package/dist/models/ListDeposits200Response.d.ts +0 -39
  32. package/dist/models/ListDeposits200Response.js +0 -55
  33. package/docs/CreateCryptoDepositRequest.md +0 -38
  34. package/docs/CryptoDeposit.md +0 -55
  35. package/docs/ListDeposits200Response.md +0 -36
  36. package/src/models/CreateCryptoDepositRequest.ts +0 -108
  37. package/src/models/CryptoDeposit.ts +0 -177
  38. package/src/models/ListDeposits200Response.ts +0 -83
@@ -10,7 +10,6 @@ export * from './CommunityMachine';
10
10
  export * from './CommunityMachineDelistResult';
11
11
  export * from './CommunityMachineRegistration';
12
12
  export * from './CommunitySupplier';
13
- export * from './CreateCryptoDepositRequest';
14
13
  export * from './CreateFineTuningJobRequest';
15
14
  export * from './CreateFineTuningJobRequestGpuai';
16
15
  export * from './CreateFineTuningJobRequestMethod';
@@ -18,7 +17,6 @@ export * from './CreateFineTuningJobRequestMethodLora';
18
17
  export * from './CreateInstanceRequest';
19
18
  export * from './CreateSshKeyRequest';
20
19
  export * from './CreateWebhookEndpointRequest';
21
- export * from './CryptoDeposit';
22
20
  export * from './Environments';
23
21
  export * from './FileObject';
24
22
  export * from './FineTuningJob';
@@ -40,7 +38,6 @@ export * from './Instance';
40
38
  export * from './InstanceConnection';
41
39
  export * from './InstancePage';
42
40
  export * from './ListCommunityMachines200Response';
43
- export * from './ListDeposits200Response';
44
41
  export * from './Model';
45
42
  export * from './ModelList';
46
43
  export * from './ModelParametersInner';
@@ -100,6 +100,12 @@ export interface Instance {
100
100
  * @memberof Instance
101
101
  */
102
102
  terminatedAt?: Date;
103
+ /**
104
+ * Last time the platform verified the SSH path to this instance end-to-end through the tunnel. Absent means the instance has not been probed yet (freshly launched, or no tunnel) — it does NOT mean unreachable. An instance whose status is still "running" while this timestamp stops advancing is one whose SSH has died even though the machine is up.
105
+ * @type {Date}
106
+ * @memberof Instance
107
+ */
108
+ lastReachableAt?: Date;
103
109
  }
104
110
  /**
105
111
  * @export
@@ -83,6 +83,7 @@ function InstanceFromJSONTyped(json, ignoreDiscriminator) {
83
83
  'createdAt': (new Date(json['created_at'])),
84
84
  'readyAt': json['ready_at'] == null ? undefined : (new Date(json['ready_at'])),
85
85
  'terminatedAt': json['terminated_at'] == null ? undefined : (new Date(json['terminated_at'])),
86
+ 'lastReachableAt': json['last_reachable_at'] == null ? undefined : (new Date(json['last_reachable_at'])),
86
87
  };
87
88
  }
88
89
  function InstanceToJSON(json) {
@@ -107,5 +108,6 @@ function InstanceToJSONTyped(value, ignoreDiscriminator = false) {
107
108
  'created_at': value['createdAt'].toISOString(),
108
109
  'ready_at': value['readyAt'] == null ? value['readyAt'] : value['readyAt'].toISOString(),
109
110
  'terminated_at': value['terminatedAt'] == null ? value['terminatedAt'] : value['terminatedAt'].toISOString(),
111
+ 'last_reachable_at': value['lastReachableAt'] == null ? value['lastReachableAt'] : value['lastReachableAt'].toISOString(),
110
112
  };
111
113
  }
@@ -8,7 +8,6 @@ export * from './CommunityMachine';
8
8
  export * from './CommunityMachineDelistResult';
9
9
  export * from './CommunityMachineRegistration';
10
10
  export * from './CommunitySupplier';
11
- export * from './CreateCryptoDepositRequest';
12
11
  export * from './CreateFineTuningJobRequest';
13
12
  export * from './CreateFineTuningJobRequestGpuai';
14
13
  export * from './CreateFineTuningJobRequestMethod';
@@ -16,7 +15,6 @@ export * from './CreateFineTuningJobRequestMethodLora';
16
15
  export * from './CreateInstanceRequest';
17
16
  export * from './CreateSshKeyRequest';
18
17
  export * from './CreateWebhookEndpointRequest';
19
- export * from './CryptoDeposit';
20
18
  export * from './Environments';
21
19
  export * from './FileObject';
22
20
  export * from './FineTuningJob';
@@ -38,7 +36,6 @@ export * from './Instance';
38
36
  export * from './InstanceConnection';
39
37
  export * from './InstancePage';
40
38
  export * from './ListCommunityMachines200Response';
41
- export * from './ListDeposits200Response';
42
39
  export * from './Model';
43
40
  export * from './ModelList';
44
41
  export * from './ModelParametersInner';
@@ -26,7 +26,6 @@ __exportStar(require("./CommunityMachine"), exports);
26
26
  __exportStar(require("./CommunityMachineDelistResult"), exports);
27
27
  __exportStar(require("./CommunityMachineRegistration"), exports);
28
28
  __exportStar(require("./CommunitySupplier"), exports);
29
- __exportStar(require("./CreateCryptoDepositRequest"), exports);
30
29
  __exportStar(require("./CreateFineTuningJobRequest"), exports);
31
30
  __exportStar(require("./CreateFineTuningJobRequestGpuai"), exports);
32
31
  __exportStar(require("./CreateFineTuningJobRequestMethod"), exports);
@@ -34,7 +33,6 @@ __exportStar(require("./CreateFineTuningJobRequestMethodLora"), exports);
34
33
  __exportStar(require("./CreateInstanceRequest"), exports);
35
34
  __exportStar(require("./CreateSshKeyRequest"), exports);
36
35
  __exportStar(require("./CreateWebhookEndpointRequest"), exports);
37
- __exportStar(require("./CryptoDeposit"), exports);
38
36
  __exportStar(require("./Environments"), exports);
39
37
  __exportStar(require("./FileObject"), exports);
40
38
  __exportStar(require("./FineTuningJob"), exports);
@@ -56,7 +54,6 @@ __exportStar(require("./Instance"), exports);
56
54
  __exportStar(require("./InstanceConnection"), exports);
57
55
  __exportStar(require("./InstancePage"), exports);
58
56
  __exportStar(require("./ListCommunityMachines200Response"), exports);
59
- __exportStar(require("./ListDeposits200Response"), exports);
60
57
  __exportStar(require("./Model"), exports);
61
58
  __exportStar(require("./ModelList"), exports);
62
59
  __exportStar(require("./ModelParametersInner"), exports);
@@ -4,165 +4,11 @@ All URIs are relative to *https://api.gpu.ai/v1*
4
4
 
5
5
  | Method | HTTP request | Description |
6
6
  |------------- | ------------- | -------------|
7
- | [**createCryptoDeposit**](BillingApi.md#createcryptodepositoperation) | **POST** /billing/deposits/crypto | Create a stablecoin deposit |
8
- | [**getDeposit**](BillingApi.md#getdeposit) | **GET** /billing/deposits/{id} | Get one stablecoin deposit |
9
7
  | [**getSpendingLimit**](BillingApi.md#getspendinglimit) | **GET** /billing/spending-limit | Get the org spending limit |
10
- | [**listDeposits**](BillingApi.md#listdeposits) | **GET** /billing/deposits | List stablecoin deposits |
11
8
  | [**updateSpendingLimit**](BillingApi.md#updatespendinglimitoperation) | **PUT** /billing/spending-limit | Set the org spending limit |
12
9
 
13
10
 
14
11
 
15
- ## createCryptoDeposit
16
-
17
- > CryptoDeposit createCryptoDeposit(createCryptoDepositRequest)
18
-
19
- Create a stablecoin deposit
20
-
21
- 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.
22
-
23
- ### Example
24
-
25
- ```ts
26
- import {
27
- Configuration,
28
- BillingApi,
29
- } from '@gpuai/sdk';
30
- import type { CreateCryptoDepositOperationRequest } from '@gpuai/sdk';
31
-
32
- async function example() {
33
- console.log("🚀 Testing @gpuai/sdk SDK...");
34
- const config = new Configuration({
35
- // Configure HTTP bearer authorization: bearerAuth
36
- accessToken: "YOUR BEARER TOKEN",
37
- });
38
- const api = new BillingApi(config);
39
-
40
- const body = {
41
- // CreateCryptoDepositRequest
42
- createCryptoDepositRequest: ...,
43
- } satisfies CreateCryptoDepositOperationRequest;
44
-
45
- try {
46
- const data = await api.createCryptoDeposit(body);
47
- console.log(data);
48
- } catch (error) {
49
- console.error(error);
50
- }
51
- }
52
-
53
- // Run the test
54
- example().catch(console.error);
55
- ```
56
-
57
- ### Parameters
58
-
59
-
60
- | Name | Type | Description | Notes |
61
- |------------- | ------------- | ------------- | -------------|
62
- | **createCryptoDepositRequest** | [CreateCryptoDepositRequest](CreateCryptoDepositRequest.md) | | |
63
-
64
- ### Return type
65
-
66
- [**CryptoDeposit**](CryptoDeposit.md)
67
-
68
- ### Authorization
69
-
70
- [bearerAuth](../README.md#bearerAuth)
71
-
72
- ### HTTP request headers
73
-
74
- - **Content-Type**: `application/json`
75
- - **Accept**: `application/json`, `application/problem+json`
76
-
77
-
78
- ### HTTP response details
79
- | Status code | Description | Response headers |
80
- |-------------|-------------|------------------|
81
- | **201** | Created | - |
82
- | **400** | `validation-error` — `amount_cents` is below the configured minimum. `unsupported-chain-asset` — the chain/asset pair is not available. `invalid-request` — malformed JSON body. | - |
83
- | **403** | `org-frozen` — the organization cannot add funds; contact support. | - |
84
- | **404** | Error response (RFC 7807) | - |
85
- | **429** | Rate limit exceeded (RFC 7807). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
86
- | **503** | &#x60;payment-source-unavailable&#x60; — deposits are temporarily unavailable; retry shortly. | - |
87
- | **0** | Error response (RFC 7807) | - |
88
-
89
- [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
90
-
91
-
92
- ## getDeposit
93
-
94
- > CryptoDeposit getDeposit(id)
95
-
96
- Get one stablecoin deposit
97
-
98
- Returns a single deposit belonging to the caller\&#39;s organization. Requires the &#x60;billing:read&#x60; scope. A deposit belonging to another organization returns the same &#x60;404 deposit-not-found&#x60; 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.
99
-
100
- ### Example
101
-
102
- ```ts
103
- import {
104
- Configuration,
105
- BillingApi,
106
- } from '@gpuai/sdk';
107
- import type { GetDepositRequest } from '@gpuai/sdk';
108
-
109
- async function example() {
110
- console.log("🚀 Testing @gpuai/sdk SDK...");
111
- const config = new Configuration({
112
- // Configure HTTP bearer authorization: bearerAuth
113
- accessToken: "YOUR BEARER TOKEN",
114
- });
115
- const api = new BillingApi(config);
116
-
117
- const body = {
118
- // string | The deposit id.
119
- id: id_example,
120
- } satisfies GetDepositRequest;
121
-
122
- try {
123
- const data = await api.getDeposit(body);
124
- console.log(data);
125
- } catch (error) {
126
- console.error(error);
127
- }
128
- }
129
-
130
- // Run the test
131
- example().catch(console.error);
132
- ```
133
-
134
- ### Parameters
135
-
136
-
137
- | Name | Type | Description | Notes |
138
- |------------- | ------------- | ------------- | -------------|
139
- | **id** | `string` | The deposit id. | [Defaults to `undefined`] |
140
-
141
- ### Return type
142
-
143
- [**CryptoDeposit**](CryptoDeposit.md)
144
-
145
- ### Authorization
146
-
147
- [bearerAuth](../README.md#bearerAuth)
148
-
149
- ### HTTP request headers
150
-
151
- - **Content-Type**: Not defined
152
- - **Accept**: `application/json`, `application/problem+json`
153
-
154
-
155
- ### HTTP response details
156
- | Status code | Description | Response headers |
157
- |-------------|-------------|------------------|
158
- | **200** | OK | - |
159
- | **404** | &#x60;deposit-not-found&#x60; — no such deposit, or it belongs to another organization. &#x60;not-found&#x60; — the feature is not enabled. | - |
160
- | **429** | Rate limit exceeded (RFC 7807). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
161
- | **0** | Error response (RFC 7807) | - |
162
-
163
- [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
164
-
165
-
166
12
  ## getSpendingLimit
167
13
 
168
14
  > SpendingLimit getSpendingLimit()
@@ -229,72 +75,6 @@ This endpoint does not need any parameter.
229
75
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
230
76
 
231
77
 
232
- ## listDeposits
233
-
234
- > ListDeposits200Response listDeposits()
235
-
236
- List stablecoin deposits
237
-
238
- Returns the organization\&#39;s stablecoin deposits, newest first, capped at 50. Requires the &#x60;billing:read&#x60; 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.
239
-
240
- ### Example
241
-
242
- ```ts
243
- import {
244
- Configuration,
245
- BillingApi,
246
- } from '@gpuai/sdk';
247
- import type { ListDepositsRequest } from '@gpuai/sdk';
248
-
249
- async function example() {
250
- console.log("🚀 Testing @gpuai/sdk SDK...");
251
- const config = new Configuration({
252
- // Configure HTTP bearer authorization: bearerAuth
253
- accessToken: "YOUR BEARER TOKEN",
254
- });
255
- const api = new BillingApi(config);
256
-
257
- try {
258
- const data = await api.listDeposits();
259
- console.log(data);
260
- } catch (error) {
261
- console.error(error);
262
- }
263
- }
264
-
265
- // Run the test
266
- example().catch(console.error);
267
- ```
268
-
269
- ### Parameters
270
-
271
- This endpoint does not need any parameter.
272
-
273
- ### Return type
274
-
275
- [**ListDeposits200Response**](ListDeposits200Response.md)
276
-
277
- ### Authorization
278
-
279
- [bearerAuth](../README.md#bearerAuth)
280
-
281
- ### HTTP request headers
282
-
283
- - **Content-Type**: Not defined
284
- - **Accept**: `application/json`, `application/problem+json`
285
-
286
-
287
- ### HTTP response details
288
- | Status code | Description | Response headers |
289
- |-------------|-------------|------------------|
290
- | **200** | OK | - |
291
- | **404** | Error response (RFC 7807) | - |
292
- | **429** | Rate limit exceeded (RFC 7807). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
293
- | **0** | Error response (RFC 7807) | - |
294
-
295
- [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
296
-
297
-
298
78
  ## updateSpendingLimit
299
79
 
300
80
  > SpendingLimit updateSpendingLimit(updateSpendingLimitRequest)
package/docs/Instance.md CHANGED
@@ -20,6 +20,7 @@ Name | Type
20
20
  `createdAt` | Date
21
21
  `readyAt` | Date
22
22
  `terminatedAt` | Date
23
+ `lastReachableAt` | Date
23
24
 
24
25
  ## Example
25
26
 
@@ -42,6 +43,7 @@ const example = {
42
43
  "createdAt": null,
43
44
  "readyAt": null,
44
45
  "terminatedAt": null,
46
+ "lastReachableAt": null,
45
47
  } satisfies Instance
46
48
 
47
49
  console.log(example)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gpuai/sdk",
3
- "version": "0.1.3",
3
+ "version": "0.2.0",
4
4
  "description": "TypeScript SDK for the GPU.ai Public Developer API",
5
5
  "author": "GPU.ai Support <support@gpu.ai>",
6
6
  "repository": {
@@ -13,21 +13,6 @@
13
13
  */
14
14
 
15
15
  import * as runtime from '../runtime';
16
- import {
17
- type CreateCryptoDepositRequest,
18
- CreateCryptoDepositRequestFromJSON,
19
- CreateCryptoDepositRequestToJSON,
20
- } from '../models/CreateCryptoDepositRequest';
21
- import {
22
- type CryptoDeposit,
23
- CryptoDepositFromJSON,
24
- CryptoDepositToJSON,
25
- } from '../models/CryptoDeposit';
26
- import {
27
- type ListDeposits200Response,
28
- ListDeposits200ResponseFromJSON,
29
- ListDeposits200ResponseToJSON,
30
- } from '../models/ListDeposits200Response';
31
16
  import {
32
17
  type Problem,
33
18
  ProblemFromJSON,
@@ -44,14 +29,6 @@ import {
44
29
  UpdateSpendingLimitRequestToJSON,
45
30
  } from '../models/UpdateSpendingLimitRequest';
46
31
 
47
- export interface CreateCryptoDepositOperationRequest {
48
- createCryptoDepositRequest: CreateCryptoDepositRequest;
49
- }
50
-
51
- export interface GetDepositRequest {
52
- id: string;
53
- }
54
-
55
32
  export interface UpdateSpendingLimitOperationRequest {
56
33
  updateSpendingLimitRequest: UpdateSpendingLimitRequest;
57
34
  }
@@ -61,118 +38,6 @@ export interface UpdateSpendingLimitOperationRequest {
61
38
  */
62
39
  export class BillingApi extends runtime.BaseAPI {
63
40
 
64
- /**
65
- * Creates request options for createCryptoDeposit without sending the request
66
- */
67
- async createCryptoDepositRequestOpts(requestParameters: CreateCryptoDepositOperationRequest): Promise<runtime.RequestOpts> {
68
- if (requestParameters['createCryptoDepositRequest'] == null) {
69
- throw new runtime.RequiredError(
70
- 'createCryptoDepositRequest',
71
- 'Required parameter "createCryptoDepositRequest" was null or undefined when calling createCryptoDeposit().'
72
- );
73
- }
74
-
75
- const queryParameters: any = {};
76
-
77
- const headerParameters: runtime.HTTPHeaders = {};
78
-
79
- headerParameters['Content-Type'] = 'application/json';
80
-
81
- if (this.configuration && this.configuration.accessToken) {
82
- const token = this.configuration.accessToken;
83
- const tokenString = await token("bearerAuth", []);
84
-
85
- if (tokenString) {
86
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
87
- }
88
- }
89
-
90
- let urlPath = `/billing/deposits/crypto`;
91
-
92
- return {
93
- path: urlPath,
94
- method: 'POST',
95
- headers: headerParameters,
96
- query: queryParameters,
97
- body: CreateCryptoDepositRequestToJSON(requestParameters['createCryptoDepositRequest']),
98
- };
99
- }
100
-
101
- /**
102
- * 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.
103
- * Create a stablecoin deposit
104
- */
105
- async createCryptoDepositRaw(requestParameters: CreateCryptoDepositOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CryptoDeposit>> {
106
- const requestOptions = await this.createCryptoDepositRequestOpts(requestParameters);
107
- const response = await this.request(requestOptions, initOverrides);
108
-
109
- return new runtime.JSONApiResponse(response, (jsonValue) => CryptoDepositFromJSON(jsonValue));
110
- }
111
-
112
- /**
113
- * 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.
114
- * Create a stablecoin deposit
115
- */
116
- async createCryptoDeposit(requestParameters: CreateCryptoDepositOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CryptoDeposit> {
117
- const response = await this.createCryptoDepositRaw(requestParameters, initOverrides);
118
- return await response.value();
119
- }
120
-
121
- /**
122
- * Creates request options for getDeposit without sending the request
123
- */
124
- async getDepositRequestOpts(requestParameters: GetDepositRequest): Promise<runtime.RequestOpts> {
125
- if (requestParameters['id'] == null) {
126
- throw new runtime.RequiredError(
127
- 'id',
128
- 'Required parameter "id" was null or undefined when calling getDeposit().'
129
- );
130
- }
131
-
132
- const queryParameters: any = {};
133
-
134
- const headerParameters: runtime.HTTPHeaders = {};
135
-
136
- if (this.configuration && this.configuration.accessToken) {
137
- const token = this.configuration.accessToken;
138
- const tokenString = await token("bearerAuth", []);
139
-
140
- if (tokenString) {
141
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
142
- }
143
- }
144
-
145
- let urlPath = `/billing/deposits/{id}`;
146
- urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
147
-
148
- return {
149
- path: urlPath,
150
- method: 'GET',
151
- headers: headerParameters,
152
- query: queryParameters,
153
- };
154
- }
155
-
156
- /**
157
- * 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.
158
- * Get one stablecoin deposit
159
- */
160
- async getDepositRaw(requestParameters: GetDepositRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CryptoDeposit>> {
161
- const requestOptions = await this.getDepositRequestOpts(requestParameters);
162
- const response = await this.request(requestOptions, initOverrides);
163
-
164
- return new runtime.JSONApiResponse(response, (jsonValue) => CryptoDepositFromJSON(jsonValue));
165
- }
166
-
167
- /**
168
- * 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.
169
- * Get one stablecoin deposit
170
- */
171
- async getDeposit(requestParameters: GetDepositRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CryptoDeposit> {
172
- const response = await this.getDepositRaw(requestParameters, initOverrides);
173
- return await response.value();
174
- }
175
-
176
41
  /**
177
42
  * Creates request options for getSpendingLimit without sending the request
178
43
  */
@@ -220,53 +85,6 @@ export class BillingApi extends runtime.BaseAPI {
220
85
  return await response.value();
221
86
  }
222
87
 
223
- /**
224
- * Creates request options for listDeposits without sending the request
225
- */
226
- async listDepositsRequestOpts(): Promise<runtime.RequestOpts> {
227
- const queryParameters: any = {};
228
-
229
- const headerParameters: runtime.HTTPHeaders = {};
230
-
231
- if (this.configuration && this.configuration.accessToken) {
232
- const token = this.configuration.accessToken;
233
- const tokenString = await token("bearerAuth", []);
234
-
235
- if (tokenString) {
236
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
237
- }
238
- }
239
-
240
- let urlPath = `/billing/deposits`;
241
-
242
- return {
243
- path: urlPath,
244
- method: 'GET',
245
- headers: headerParameters,
246
- query: queryParameters,
247
- };
248
- }
249
-
250
- /**
251
- * 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.
252
- * List stablecoin deposits
253
- */
254
- async listDepositsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListDeposits200Response>> {
255
- const requestOptions = await this.listDepositsRequestOpts();
256
- const response = await this.request(requestOptions, initOverrides);
257
-
258
- return new runtime.JSONApiResponse(response, (jsonValue) => ListDeposits200ResponseFromJSON(jsonValue));
259
- }
260
-
261
- /**
262
- * 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.
263
- * List stablecoin deposits
264
- */
265
- async listDeposits(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListDeposits200Response> {
266
- const response = await this.listDepositsRaw(initOverrides);
267
- return await response.value();
268
- }
269
-
270
88
  /**
271
89
  * Creates request options for updateSpendingLimit without sending the request
272
90
  */
@@ -111,6 +111,12 @@ export interface Instance {
111
111
  * @memberof Instance
112
112
  */
113
113
  terminatedAt?: Date;
114
+ /**
115
+ * Last time the platform verified the SSH path to this instance end-to-end through the tunnel. Absent means the instance has not been probed yet (freshly launched, or no tunnel) — it does NOT mean unreachable. An instance whose status is still "running" while this timestamp stops advancing is one whose SSH has died even though the machine is up.
116
+ * @type {Date}
117
+ * @memberof Instance
118
+ */
119
+ lastReachableAt?: Date;
114
120
  }
115
121
 
116
122
 
@@ -177,6 +183,7 @@ export function InstanceFromJSONTyped(json: any, ignoreDiscriminator: boolean):
177
183
  'createdAt': (new Date(json['created_at'])),
178
184
  'readyAt': json['ready_at'] == null ? undefined : (new Date(json['ready_at'])),
179
185
  'terminatedAt': json['terminated_at'] == null ? undefined : (new Date(json['terminated_at'])),
186
+ 'lastReachableAt': json['last_reachable_at'] == null ? undefined : (new Date(json['last_reachable_at'])),
180
187
  };
181
188
  }
182
189
 
@@ -205,6 +212,7 @@ export function InstanceToJSONTyped(value?: Instance | null, ignoreDiscriminator
205
212
  'created_at': value['createdAt'].toISOString(),
206
213
  'ready_at': value['readyAt'] == null ? value['readyAt'] : value['readyAt'].toISOString(),
207
214
  'terminated_at': value['terminatedAt'] == null ? value['terminatedAt'] : value['terminatedAt'].toISOString(),
215
+ 'last_reachable_at': value['lastReachableAt'] == null ? value['lastReachableAt'] : value['lastReachableAt'].toISOString(),
208
216
  };
209
217
  }
210
218
 
@@ -10,7 +10,6 @@ export * from './CommunityMachine';
10
10
  export * from './CommunityMachineDelistResult';
11
11
  export * from './CommunityMachineRegistration';
12
12
  export * from './CommunitySupplier';
13
- export * from './CreateCryptoDepositRequest';
14
13
  export * from './CreateFineTuningJobRequest';
15
14
  export * from './CreateFineTuningJobRequestGpuai';
16
15
  export * from './CreateFineTuningJobRequestMethod';
@@ -18,7 +17,6 @@ export * from './CreateFineTuningJobRequestMethodLora';
18
17
  export * from './CreateInstanceRequest';
19
18
  export * from './CreateSshKeyRequest';
20
19
  export * from './CreateWebhookEndpointRequest';
21
- export * from './CryptoDeposit';
22
20
  export * from './Environments';
23
21
  export * from './FileObject';
24
22
  export * from './FineTuningJob';
@@ -40,7 +38,6 @@ export * from './Instance';
40
38
  export * from './InstanceConnection';
41
39
  export * from './InstancePage';
42
40
  export * from './ListCommunityMachines200Response';
43
- export * from './ListDeposits200Response';
44
41
  export * from './Model';
45
42
  export * from './ModelList';
46
43
  export * from './ModelParametersInner';