@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
@@ -21,14 +21,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import * as runtime from '../runtime';
24
- import { CommunityEarningsFromJSON, } from '../models/CommunityEarnings';
25
24
  import { CommunityMachineDelistResultFromJSON, } from '../models/CommunityMachineDelistResult';
26
25
  import { CommunityMachineRegistrationFromJSON, } from '../models/CommunityMachineRegistration';
27
26
  import { CommunitySupplierFromJSON, } from '../models/CommunitySupplier';
28
27
  import { ListCommunityMachines200ResponseFromJSON, } from '../models/ListCommunityMachines200Response';
29
28
  import { RegisterCommunityMachineRequestToJSON, } from '../models/RegisterCommunityMachineRequest';
30
- import { SupplierMachineViewFromJSON, } from '../models/SupplierMachineView';
31
- import { UpdateCommunityMachineRequestToJSON, } from '../models/UpdateCommunityMachineRequest';
32
29
  /**
33
30
  *
34
31
  */
@@ -128,101 +125,6 @@ export class CommunityApi extends runtime.BaseAPI {
128
125
  return yield response.value();
129
126
  });
130
127
  }
131
- /**
132
- * Creates request options for getCommunityEarnings without sending the request
133
- */
134
- getCommunityEarningsRequestOpts(requestParameters) {
135
- return __awaiter(this, void 0, void 0, function* () {
136
- const queryParameters = {};
137
- if (requestParameters['limit'] != null) {
138
- queryParameters['limit'] = requestParameters['limit'];
139
- }
140
- const headerParameters = {};
141
- if (this.configuration && this.configuration.accessToken) {
142
- const token = this.configuration.accessToken;
143
- const tokenString = yield token("bearerAuth", []);
144
- if (tokenString) {
145
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
146
- }
147
- }
148
- let urlPath = `/community/earnings`;
149
- return {
150
- path: urlPath,
151
- method: 'GET',
152
- headers: headerParameters,
153
- query: queryParameters,
154
- };
155
- });
156
- }
157
- /**
158
- * 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).
159
- * Get your Community Cloud earnings
160
- */
161
- getCommunityEarningsRaw(requestParameters, initOverrides) {
162
- return __awaiter(this, void 0, void 0, function* () {
163
- const requestOptions = yield this.getCommunityEarningsRequestOpts(requestParameters);
164
- const response = yield this.request(requestOptions, initOverrides);
165
- return new runtime.JSONApiResponse(response, (jsonValue) => CommunityEarningsFromJSON(jsonValue));
166
- });
167
- }
168
- /**
169
- * 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).
170
- * Get your Community Cloud earnings
171
- */
172
- getCommunityEarnings() {
173
- return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
174
- const response = yield this.getCommunityEarningsRaw(requestParameters, initOverrides);
175
- return yield response.value();
176
- });
177
- }
178
- /**
179
- * Creates request options for getCommunityMachine without sending the request
180
- */
181
- getCommunityMachineRequestOpts(requestParameters) {
182
- return __awaiter(this, void 0, void 0, function* () {
183
- if (requestParameters['id'] == null) {
184
- throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getCommunityMachine().');
185
- }
186
- const queryParameters = {};
187
- const headerParameters = {};
188
- if (this.configuration && this.configuration.accessToken) {
189
- const token = this.configuration.accessToken;
190
- const tokenString = yield token("bearerAuth", []);
191
- if (tokenString) {
192
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
193
- }
194
- }
195
- let urlPath = `/community/machines/{id}`;
196
- urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
197
- return {
198
- path: urlPath,
199
- method: 'GET',
200
- headers: headerParameters,
201
- query: queryParameters,
202
- };
203
- });
204
- }
205
- /**
206
- * 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).
207
- * Get one of your Community Cloud machines
208
- */
209
- getCommunityMachineRaw(requestParameters, initOverrides) {
210
- return __awaiter(this, void 0, void 0, function* () {
211
- const requestOptions = yield this.getCommunityMachineRequestOpts(requestParameters);
212
- const response = yield this.request(requestOptions, initOverrides);
213
- return new runtime.JSONApiResponse(response, (jsonValue) => SupplierMachineViewFromJSON(jsonValue));
214
- });
215
- }
216
- /**
217
- * 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).
218
- * Get one of your Community Cloud machines
219
- */
220
- getCommunityMachine(requestParameters, initOverrides) {
221
- return __awaiter(this, void 0, void 0, function* () {
222
- const response = yield this.getCommunityMachineRaw(requestParameters, initOverrides);
223
- return yield response.value();
224
- });
225
- }
226
128
  /**
227
129
  * Creates request options for getCommunitySupplierMe without sending the request
228
130
  */
@@ -408,57 +310,4 @@ export class CommunityApi extends runtime.BaseAPI {
408
310
  return yield response.value();
409
311
  });
410
312
  }
411
- /**
412
- * Creates request options for updateCommunityMachine without sending the request
413
- */
414
- updateCommunityMachineRequestOpts(requestParameters) {
415
- return __awaiter(this, void 0, void 0, function* () {
416
- if (requestParameters['id'] == null) {
417
- throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling updateCommunityMachine().');
418
- }
419
- if (requestParameters['updateCommunityMachineRequest'] == null) {
420
- throw new runtime.RequiredError('updateCommunityMachineRequest', 'Required parameter "updateCommunityMachineRequest" was null or undefined when calling updateCommunityMachine().');
421
- }
422
- const queryParameters = {};
423
- const headerParameters = {};
424
- headerParameters['Content-Type'] = 'application/json';
425
- if (this.configuration && this.configuration.accessToken) {
426
- const token = this.configuration.accessToken;
427
- const tokenString = yield token("bearerAuth", []);
428
- if (tokenString) {
429
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
430
- }
431
- }
432
- let urlPath = `/community/machines/{id}`;
433
- urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
434
- return {
435
- path: urlPath,
436
- method: 'PATCH',
437
- headers: headerParameters,
438
- query: queryParameters,
439
- body: UpdateCommunityMachineRequestToJSON(requestParameters['updateCommunityMachineRequest']),
440
- };
441
- });
442
- }
443
- /**
444
- * 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`).
445
- * Update a Community Cloud machine\'s price
446
- */
447
- updateCommunityMachineRaw(requestParameters, initOverrides) {
448
- return __awaiter(this, void 0, void 0, function* () {
449
- const requestOptions = yield this.updateCommunityMachineRequestOpts(requestParameters);
450
- const response = yield this.request(requestOptions, initOverrides);
451
- return new runtime.JSONApiResponse(response, (jsonValue) => SupplierMachineViewFromJSON(jsonValue));
452
- });
453
- }
454
- /**
455
- * 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`).
456
- * Update a Community Cloud machine\'s price
457
- */
458
- updateCommunityMachine(requestParameters, initOverrides) {
459
- return __awaiter(this, void 0, void 0, function* () {
460
- const response = yield this.updateCommunityMachineRaw(requestParameters, initOverrides);
461
- return yield response.value();
462
- });
463
- }
464
313
  }
@@ -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
  */
@@ -140,6 +140,9 @@ export class InstancesApi extends runtime.BaseAPI {
140
140
  throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getInstance().');
141
141
  }
142
142
  const queryParameters = {};
143
+ if (requestParameters['include'] != null) {
144
+ queryParameters['include'] = requestParameters['include'];
145
+ }
143
146
  const headerParameters = {};
144
147
  if (this.configuration && this.configuration.accessToken) {
145
148
  const token = this.configuration.accessToken;
@@ -285,6 +288,12 @@ export class InstancesApi extends runtime.BaseAPI {
285
288
  });
286
289
  }
287
290
  }
291
+ /**
292
+ * @export
293
+ */
294
+ export const GetInstanceIncludeEnum = {
295
+ Credentials: 'credentials'
296
+ };
288
297
  /**
289
298
  * @export
290
299
  */
@@ -0,0 +1,64 @@
1
+ /**
2
+ * GPU.ai Public Developer API
3
+ * Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ * Contact: support@gpu.ai
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface CreateCryptoDepositRequest
16
+ */
17
+ export interface CreateCryptoDepositRequest {
18
+ /**
19
+ * Amount to deposit in USD cents. Must be at least the configured minimum (500 = $5.00 by default).
20
+ *
21
+ * @type {number}
22
+ * @memberof CreateCryptoDepositRequest
23
+ */
24
+ amountCents: number;
25
+ /**
26
+ *
27
+ * @type {CreateCryptoDepositRequestChainEnum}
28
+ * @memberof CreateCryptoDepositRequest
29
+ */
30
+ chain: CreateCryptoDepositRequestChainEnum;
31
+ /**
32
+ *
33
+ * @type {CreateCryptoDepositRequestAssetEnum}
34
+ * @memberof CreateCryptoDepositRequest
35
+ */
36
+ asset: CreateCryptoDepositRequestAssetEnum;
37
+ }
38
+ /**
39
+ * @export
40
+ */
41
+ export declare const CreateCryptoDepositRequestChainEnum: {
42
+ readonly Ethereum: "ethereum";
43
+ readonly Base: "base";
44
+ readonly Arbitrum: "arbitrum";
45
+ readonly Polygon: "polygon";
46
+ readonly Solana: "solana";
47
+ };
48
+ export type CreateCryptoDepositRequestChainEnum = typeof CreateCryptoDepositRequestChainEnum[keyof typeof CreateCryptoDepositRequestChainEnum];
49
+ /**
50
+ * @export
51
+ */
52
+ export declare const CreateCryptoDepositRequestAssetEnum: {
53
+ readonly Usdc: "usdc";
54
+ readonly Usdt: "usdt";
55
+ };
56
+ export type CreateCryptoDepositRequestAssetEnum = typeof CreateCryptoDepositRequestAssetEnum[keyof typeof CreateCryptoDepositRequestAssetEnum];
57
+ /**
58
+ * Check if a given object implements the CreateCryptoDepositRequest interface.
59
+ */
60
+ export declare function instanceOfCreateCryptoDepositRequest(value: object): value is CreateCryptoDepositRequest;
61
+ export declare function CreateCryptoDepositRequestFromJSON(json: any): CreateCryptoDepositRequest;
62
+ export declare function CreateCryptoDepositRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateCryptoDepositRequest;
63
+ export declare function CreateCryptoDepositRequestToJSON(json: any): CreateCryptoDepositRequest;
64
+ export declare function CreateCryptoDepositRequestToJSONTyped(value?: CreateCryptoDepositRequest | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,68 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * GPU.ai Public Developer API
5
+ * Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@gpu.ai
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ /**
15
+ * @export
16
+ */
17
+ export const CreateCryptoDepositRequestChainEnum = {
18
+ Ethereum: 'ethereum',
19
+ Base: 'base',
20
+ Arbitrum: 'arbitrum',
21
+ Polygon: 'polygon',
22
+ Solana: 'solana'
23
+ };
24
+ /**
25
+ * @export
26
+ */
27
+ export const CreateCryptoDepositRequestAssetEnum = {
28
+ Usdc: 'usdc',
29
+ Usdt: 'usdt'
30
+ };
31
+ /**
32
+ * Check if a given object implements the CreateCryptoDepositRequest interface.
33
+ */
34
+ export function instanceOfCreateCryptoDepositRequest(value) {
35
+ if ((!('amountCents' in value) && !('amount_cents' in value)) || (value['amountCents'] === undefined && value['amount_cents'] === undefined))
36
+ return false;
37
+ if (!('chain' in value) || value['chain'] === undefined)
38
+ return false;
39
+ if (!('asset' in value) || value['asset'] === undefined)
40
+ return false;
41
+ return true;
42
+ }
43
+ export function CreateCryptoDepositRequestFromJSON(json) {
44
+ return CreateCryptoDepositRequestFromJSONTyped(json, false);
45
+ }
46
+ export function CreateCryptoDepositRequestFromJSONTyped(json, ignoreDiscriminator) {
47
+ if (json == null) {
48
+ return json;
49
+ }
50
+ return {
51
+ 'amountCents': json['amount_cents'],
52
+ 'chain': json['chain'],
53
+ 'asset': json['asset'],
54
+ };
55
+ }
56
+ export function CreateCryptoDepositRequestToJSON(json) {
57
+ return CreateCryptoDepositRequestToJSONTyped(json, false);
58
+ }
59
+ export function CreateCryptoDepositRequestToJSONTyped(value, ignoreDiscriminator = false) {
60
+ if (value == null) {
61
+ return value;
62
+ }
63
+ return {
64
+ 'amount_cents': value['amountCents'],
65
+ 'chain': value['chain'],
66
+ 'asset': value['asset'],
67
+ };
68
+ }
@@ -0,0 +1,114 @@
1
+ /**
2
+ * GPU.ai Public Developer API
3
+ * Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ * Contact: support@gpu.ai
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * A stablecoin deposit. Mirrors the Go DTO field for field. Like that struct, this schema deliberately has NO payment-processor property — the processor is an implementation detail and is structurally absent from the customer contract, not merely filtered out.
14
+ *
15
+ * @export
16
+ * @interface CryptoDeposit
17
+ */
18
+ export interface CryptoDeposit {
19
+ /**
20
+ *
21
+ * @type {string}
22
+ * @memberof CryptoDeposit
23
+ */
24
+ depositId: string;
25
+ /**
26
+ * Lifecycle state: created, detected, confirming, settled, screening, held_screening, credited, credited_underpaid, credited_overpaid, expired, expired_received, failed, failed_screening.
27
+ *
28
+ * @type {string}
29
+ * @memberof CryptoDeposit
30
+ */
31
+ status: string;
32
+ /**
33
+ *
34
+ * @type {CryptoDepositChainEnum}
35
+ * @memberof CryptoDeposit
36
+ */
37
+ chain: CryptoDepositChainEnum;
38
+ /**
39
+ *
40
+ * @type {CryptoDepositAssetEnum}
41
+ * @memberof CryptoDeposit
42
+ */
43
+ asset: CryptoDepositAssetEnum;
44
+ /**
45
+ * The address to send funds to. Unique to this deposit.
46
+ * @type {string}
47
+ * @memberof CryptoDeposit
48
+ */
49
+ payAddress?: string;
50
+ /**
51
+ * The exact token amount to send, as a decimal string (never a number — the value must not round-trip through a float).
52
+ *
53
+ * @type {string}
54
+ * @memberof CryptoDeposit
55
+ */
56
+ payAmount?: string;
57
+ /**
58
+ * The amount requested, in USD cents. Never the settled or credited value.
59
+ * @type {number}
60
+ * @memberof CryptoDeposit
61
+ */
62
+ amountUsdCents: number;
63
+ /**
64
+ * USD cents actually credited to the balance. Absent until credited.
65
+ * @type {number}
66
+ * @memberof CryptoDeposit
67
+ */
68
+ creditedCents?: number;
69
+ /**
70
+ *
71
+ * @type {string}
72
+ * @memberof CryptoDeposit
73
+ */
74
+ txHash?: string;
75
+ /**
76
+ * RFC3339 UTC. After this, send nothing to pay_address.
77
+ * @type {Date}
78
+ * @memberof CryptoDeposit
79
+ */
80
+ expiresAt?: Date;
81
+ /**
82
+ *
83
+ * @type {Date}
84
+ * @memberof CryptoDeposit
85
+ */
86
+ createdAt: Date;
87
+ }
88
+ /**
89
+ * @export
90
+ */
91
+ export declare const CryptoDepositChainEnum: {
92
+ readonly Ethereum: "ethereum";
93
+ readonly Base: "base";
94
+ readonly Arbitrum: "arbitrum";
95
+ readonly Polygon: "polygon";
96
+ readonly Solana: "solana";
97
+ };
98
+ export type CryptoDepositChainEnum = typeof CryptoDepositChainEnum[keyof typeof CryptoDepositChainEnum];
99
+ /**
100
+ * @export
101
+ */
102
+ export declare const CryptoDepositAssetEnum: {
103
+ readonly Usdc: "usdc";
104
+ readonly Usdt: "usdt";
105
+ };
106
+ export type CryptoDepositAssetEnum = typeof CryptoDepositAssetEnum[keyof typeof CryptoDepositAssetEnum];
107
+ /**
108
+ * Check if a given object implements the CryptoDeposit interface.
109
+ */
110
+ export declare function instanceOfCryptoDeposit(value: object): value is CryptoDeposit;
111
+ export declare function CryptoDepositFromJSON(json: any): CryptoDeposit;
112
+ export declare function CryptoDepositFromJSONTyped(json: any, ignoreDiscriminator: boolean): CryptoDeposit;
113
+ export declare function CryptoDepositToJSON(json: any): CryptoDeposit;
114
+ export declare function CryptoDepositToJSONTyped(value?: CryptoDeposit | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,90 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * GPU.ai Public Developer API
5
+ * Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@gpu.ai
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ /**
15
+ * @export
16
+ */
17
+ export const CryptoDepositChainEnum = {
18
+ Ethereum: 'ethereum',
19
+ Base: 'base',
20
+ Arbitrum: 'arbitrum',
21
+ Polygon: 'polygon',
22
+ Solana: 'solana'
23
+ };
24
+ /**
25
+ * @export
26
+ */
27
+ export const CryptoDepositAssetEnum = {
28
+ Usdc: 'usdc',
29
+ Usdt: 'usdt'
30
+ };
31
+ /**
32
+ * Check if a given object implements the CryptoDeposit interface.
33
+ */
34
+ export function instanceOfCryptoDeposit(value) {
35
+ if ((!('depositId' in value) && !('deposit_id' in value)) || (value['depositId'] === undefined && value['deposit_id'] === undefined))
36
+ return false;
37
+ if (!('status' in value) || value['status'] === undefined)
38
+ return false;
39
+ if (!('chain' in value) || value['chain'] === undefined)
40
+ return false;
41
+ if (!('asset' in value) || value['asset'] === undefined)
42
+ return false;
43
+ if ((!('amountUsdCents' in value) && !('amount_usd_cents' in value)) || (value['amountUsdCents'] === undefined && value['amount_usd_cents'] === undefined))
44
+ return false;
45
+ if ((!('createdAt' in value) && !('created_at' in value)) || (value['createdAt'] === undefined && value['created_at'] === undefined))
46
+ return false;
47
+ return true;
48
+ }
49
+ export function CryptoDepositFromJSON(json) {
50
+ return CryptoDepositFromJSONTyped(json, false);
51
+ }
52
+ export function CryptoDepositFromJSONTyped(json, ignoreDiscriminator) {
53
+ if (json == null) {
54
+ return json;
55
+ }
56
+ return {
57
+ 'depositId': json['deposit_id'],
58
+ 'status': json['status'],
59
+ 'chain': json['chain'],
60
+ 'asset': json['asset'],
61
+ 'payAddress': json['pay_address'] == null ? undefined : json['pay_address'],
62
+ 'payAmount': json['pay_amount'] == null ? undefined : json['pay_amount'],
63
+ 'amountUsdCents': json['amount_usd_cents'],
64
+ 'creditedCents': json['credited_cents'] == null ? undefined : json['credited_cents'],
65
+ 'txHash': json['tx_hash'] == null ? undefined : json['tx_hash'],
66
+ 'expiresAt': json['expires_at'] == null ? undefined : (new Date(json['expires_at'])),
67
+ 'createdAt': (new Date(json['created_at'])),
68
+ };
69
+ }
70
+ export function CryptoDepositToJSON(json) {
71
+ return CryptoDepositToJSONTyped(json, false);
72
+ }
73
+ export function CryptoDepositToJSONTyped(value, ignoreDiscriminator = false) {
74
+ if (value == null) {
75
+ return value;
76
+ }
77
+ return {
78
+ 'deposit_id': value['depositId'],
79
+ 'status': value['status'],
80
+ 'chain': value['chain'],
81
+ 'asset': value['asset'],
82
+ 'pay_address': value['payAddress'],
83
+ 'pay_amount': value['payAmount'],
84
+ 'amount_usd_cents': value['amountUsdCents'],
85
+ 'credited_cents': value['creditedCents'],
86
+ 'tx_hash': value['txHash'],
87
+ 'expires_at': value['expiresAt'] == null ? value['expiresAt'] : value['expiresAt'].toISOString(),
88
+ 'created_at': value['createdAt'].toISOString(),
89
+ };
90
+ }
@@ -46,7 +46,7 @@ export interface InstanceConnection {
46
46
  */
47
47
  appUser?: string;
48
48
  /**
49
- * HTTP Basic Auth password for app_url and terminal_url. Same availability as app_user. Treat as a secret.
49
+ * HTTP Basic Auth password for app_url and terminal_url. Treat as a secret. OMITTED by default from all reads — returned only on GET /instances/{id}?include=credentials (same persistence availability as app_user); the list endpoint and operation results never include it.
50
50
  * @type {string}
51
51
  * @memberof InstanceConnection
52
52
  */
@@ -0,0 +1,39 @@
1
+ /**
2
+ * GPU.ai Public Developer API
3
+ * Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ * Contact: support@gpu.ai
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { CryptoDeposit } from './CryptoDeposit';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface ListDeposits200Response
17
+ */
18
+ export interface ListDeposits200Response {
19
+ /**
20
+ *
21
+ * @type {Array<CryptoDeposit>}
22
+ * @memberof ListDeposits200Response
23
+ */
24
+ deposits: Array<CryptoDeposit>;
25
+ /**
26
+ * The effective minimum deposit in USD cents (admin override, else the deployment's configured floor). Validate amounts against this live value rather than hardcoding the default.
27
+ * @type {number}
28
+ * @memberof ListDeposits200Response
29
+ */
30
+ minDepositCents: number;
31
+ }
32
+ /**
33
+ * Check if a given object implements the ListDeposits200Response interface.
34
+ */
35
+ export declare function instanceOfListDeposits200Response(value: object): value is ListDeposits200Response;
36
+ export declare function ListDeposits200ResponseFromJSON(json: any): ListDeposits200Response;
37
+ export declare function ListDeposits200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListDeposits200Response;
38
+ export declare function ListDeposits200ResponseToJSON(json: any): ListDeposits200Response;
39
+ export declare function ListDeposits200ResponseToJSONTyped(value?: ListDeposits200Response | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,48 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * GPU.ai Public Developer API
5
+ * Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@gpu.ai
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ import { CryptoDepositFromJSON, CryptoDepositToJSON, } from './CryptoDeposit';
15
+ /**
16
+ * Check if a given object implements the ListDeposits200Response interface.
17
+ */
18
+ export function instanceOfListDeposits200Response(value) {
19
+ if (!('deposits' in value) || value['deposits'] === undefined)
20
+ return false;
21
+ if ((!('minDepositCents' in value) && !('min_deposit_cents' in value)) || (value['minDepositCents'] === undefined && value['min_deposit_cents'] === undefined))
22
+ return false;
23
+ return true;
24
+ }
25
+ export function ListDeposits200ResponseFromJSON(json) {
26
+ return ListDeposits200ResponseFromJSONTyped(json, false);
27
+ }
28
+ export function ListDeposits200ResponseFromJSONTyped(json, ignoreDiscriminator) {
29
+ if (json == null) {
30
+ return json;
31
+ }
32
+ return {
33
+ 'deposits': (json['deposits'].map(CryptoDepositFromJSON)),
34
+ 'minDepositCents': json['min_deposit_cents'],
35
+ };
36
+ }
37
+ export function ListDeposits200ResponseToJSON(json) {
38
+ return ListDeposits200ResponseToJSONTyped(json, false);
39
+ }
40
+ export function ListDeposits200ResponseToJSONTyped(value, ignoreDiscriminator = false) {
41
+ if (value == null) {
42
+ return value;
43
+ }
44
+ return {
45
+ 'deposits': (value['deposits'].map(CryptoDepositToJSON)),
46
+ 'min_deposit_cents': value['minDepositCents'],
47
+ };
48
+ }
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  /**
13
- * Terminal-success payload. Carries the per-instance web-access credential — app_url for template deploys, terminal_url for instances provisioned with the browser web console, and the shared basic-auth login for both. The credential is also re-readable via connection.app_user/app_password on the org-scoped instance reads.
13
+ * Terminal-success payload. Carries the per-instance web-access coordinates — app_url for template deploys, terminal_url for instances provisioned with the browser web console, and the basic-auth username shared by both. The basic-auth PASSWORD is never included here retrieve it via GET /instances/{id}?include=credentials (connection.app_password).
14
14
  * @export
15
15
  * @interface OperationResult
16
16
  */
@@ -33,12 +33,6 @@ export interface OperationResult {
33
33
  * @memberof OperationResult
34
34
  */
35
35
  appBasicAuthUser?: string;
36
- /**
37
- *
38
- * @type {string}
39
- * @memberof OperationResult
40
- */
41
- appBasicAuthPass?: string;
42
36
  }
43
37
  /**
44
38
  * Check if a given object implements the OperationResult interface.