@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
@@ -0,0 +1,177 @@
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
+ import { mapValues } from '../runtime';
16
+ /**
17
+ * 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.
18
+ *
19
+ * @export
20
+ * @interface CryptoDeposit
21
+ */
22
+ export interface CryptoDeposit {
23
+ /**
24
+ *
25
+ * @type {string}
26
+ * @memberof CryptoDeposit
27
+ */
28
+ depositId: string;
29
+ /**
30
+ * Lifecycle state: created, detected, confirming, settled, screening, held_screening, credited, credited_underpaid, credited_overpaid, expired, expired_received, failed, failed_screening.
31
+ *
32
+ * @type {string}
33
+ * @memberof CryptoDeposit
34
+ */
35
+ status: string;
36
+ /**
37
+ *
38
+ * @type {CryptoDepositChainEnum}
39
+ * @memberof CryptoDeposit
40
+ */
41
+ chain: CryptoDepositChainEnum;
42
+ /**
43
+ *
44
+ * @type {CryptoDepositAssetEnum}
45
+ * @memberof CryptoDeposit
46
+ */
47
+ asset: CryptoDepositAssetEnum;
48
+ /**
49
+ * The address to send funds to. Unique to this deposit.
50
+ * @type {string}
51
+ * @memberof CryptoDeposit
52
+ */
53
+ payAddress?: string;
54
+ /**
55
+ * The exact token amount to send, as a decimal string (never a number — the value must not round-trip through a float).
56
+ *
57
+ * @type {string}
58
+ * @memberof CryptoDeposit
59
+ */
60
+ payAmount?: string;
61
+ /**
62
+ * The amount requested, in USD cents. Never the settled or credited value.
63
+ * @type {number}
64
+ * @memberof CryptoDeposit
65
+ */
66
+ amountUsdCents: number;
67
+ /**
68
+ * USD cents actually credited to the balance. Absent until credited.
69
+ * @type {number}
70
+ * @memberof CryptoDeposit
71
+ */
72
+ creditedCents?: number;
73
+ /**
74
+ *
75
+ * @type {string}
76
+ * @memberof CryptoDeposit
77
+ */
78
+ txHash?: string;
79
+ /**
80
+ * RFC3339 UTC. After this, send nothing to pay_address.
81
+ * @type {Date}
82
+ * @memberof CryptoDeposit
83
+ */
84
+ expiresAt?: Date;
85
+ /**
86
+ *
87
+ * @type {Date}
88
+ * @memberof CryptoDeposit
89
+ */
90
+ createdAt: Date;
91
+ }
92
+
93
+
94
+ /**
95
+ * @export
96
+ */
97
+ export const CryptoDepositChainEnum = {
98
+ Ethereum: 'ethereum',
99
+ Base: 'base',
100
+ Arbitrum: 'arbitrum',
101
+ Polygon: 'polygon',
102
+ Solana: 'solana'
103
+ } as const;
104
+ export type CryptoDepositChainEnum = typeof CryptoDepositChainEnum[keyof typeof CryptoDepositChainEnum];
105
+
106
+ /**
107
+ * @export
108
+ */
109
+ export const CryptoDepositAssetEnum = {
110
+ Usdc: 'usdc',
111
+ Usdt: 'usdt'
112
+ } as const;
113
+ export type CryptoDepositAssetEnum = typeof CryptoDepositAssetEnum[keyof typeof CryptoDepositAssetEnum];
114
+
115
+
116
+ /**
117
+ * Check if a given object implements the CryptoDeposit interface.
118
+ */
119
+ export function instanceOfCryptoDeposit(value: object): value is CryptoDeposit {
120
+ if ((!('depositId' in (value as Record<string, any>)) && !('deposit_id' in (value as Record<string, any>))) || ((value as Record<string, any>)['depositId'] === undefined && (value as Record<string, any>)['deposit_id'] === undefined)) return false;
121
+ if (!('status' in value) || value['status'] === undefined) return false;
122
+ if (!('chain' in value) || value['chain'] === undefined) return false;
123
+ if (!('asset' in value) || value['asset'] === undefined) return false;
124
+ if ((!('amountUsdCents' in (value as Record<string, any>)) && !('amount_usd_cents' in (value as Record<string, any>))) || ((value as Record<string, any>)['amountUsdCents'] === undefined && (value as Record<string, any>)['amount_usd_cents'] === undefined)) return false;
125
+ if ((!('createdAt' in (value as Record<string, any>)) && !('created_at' in (value as Record<string, any>))) || ((value as Record<string, any>)['createdAt'] === undefined && (value as Record<string, any>)['created_at'] === undefined)) return false;
126
+ return true;
127
+ }
128
+
129
+ export function CryptoDepositFromJSON(json: any): CryptoDeposit {
130
+ return CryptoDepositFromJSONTyped(json, false);
131
+ }
132
+
133
+ export function CryptoDepositFromJSONTyped(json: any, ignoreDiscriminator: boolean): CryptoDeposit {
134
+ if (json == null) {
135
+ return json;
136
+ }
137
+ return {
138
+
139
+ 'depositId': json['deposit_id'],
140
+ 'status': json['status'],
141
+ 'chain': json['chain'],
142
+ 'asset': json['asset'],
143
+ 'payAddress': json['pay_address'] == null ? undefined : json['pay_address'],
144
+ 'payAmount': json['pay_amount'] == null ? undefined : json['pay_amount'],
145
+ 'amountUsdCents': json['amount_usd_cents'],
146
+ 'creditedCents': json['credited_cents'] == null ? undefined : json['credited_cents'],
147
+ 'txHash': json['tx_hash'] == null ? undefined : json['tx_hash'],
148
+ 'expiresAt': json['expires_at'] == null ? undefined : (new Date(json['expires_at'])),
149
+ 'createdAt': (new Date(json['created_at'])),
150
+ };
151
+ }
152
+
153
+ export function CryptoDepositToJSON(json: any): CryptoDeposit {
154
+ return CryptoDepositToJSONTyped(json, false);
155
+ }
156
+
157
+ export function CryptoDepositToJSONTyped(value?: CryptoDeposit | null, ignoreDiscriminator: boolean = false): any {
158
+ if (value == null) {
159
+ return value;
160
+ }
161
+
162
+ return {
163
+
164
+ 'deposit_id': value['depositId'],
165
+ 'status': value['status'],
166
+ 'chain': value['chain'],
167
+ 'asset': value['asset'],
168
+ 'pay_address': value['payAddress'],
169
+ 'pay_amount': value['payAmount'],
170
+ 'amount_usd_cents': value['amountUsdCents'],
171
+ 'credited_cents': value['creditedCents'],
172
+ 'tx_hash': value['txHash'],
173
+ 'expires_at': value['expiresAt'] == null ? value['expiresAt'] : value['expiresAt'].toISOString(),
174
+ 'created_at': value['createdAt'].toISOString(),
175
+ };
176
+ }
177
+
@@ -50,7 +50,7 @@ export interface InstanceConnection {
50
50
  */
51
51
  appUser?: string;
52
52
  /**
53
- * HTTP Basic Auth password for app_url and terminal_url. Same availability as app_user. Treat as a secret.
53
+ * 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.
54
54
  * @type {string}
55
55
  * @memberof InstanceConnection
56
56
  */
@@ -0,0 +1,83 @@
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
+ import { mapValues } from '../runtime';
16
+ import type { CryptoDeposit } from './CryptoDeposit';
17
+ import {
18
+ CryptoDepositFromJSON,
19
+ CryptoDepositFromJSONTyped,
20
+ CryptoDepositToJSON,
21
+ CryptoDepositToJSONTyped,
22
+ } from './CryptoDeposit';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface ListDeposits200Response
28
+ */
29
+ export interface ListDeposits200Response {
30
+ /**
31
+ *
32
+ * @type {Array<CryptoDeposit>}
33
+ * @memberof ListDeposits200Response
34
+ */
35
+ deposits: Array<CryptoDeposit>;
36
+ /**
37
+ * 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.
38
+ * @type {number}
39
+ * @memberof ListDeposits200Response
40
+ */
41
+ minDepositCents: number;
42
+ }
43
+
44
+ /**
45
+ * Check if a given object implements the ListDeposits200Response interface.
46
+ */
47
+ export function instanceOfListDeposits200Response(value: object): value is ListDeposits200Response {
48
+ if (!('deposits' in value) || value['deposits'] === undefined) return false;
49
+ if ((!('minDepositCents' in (value as Record<string, any>)) && !('min_deposit_cents' in (value as Record<string, any>))) || ((value as Record<string, any>)['minDepositCents'] === undefined && (value as Record<string, any>)['min_deposit_cents'] === undefined)) return false;
50
+ return true;
51
+ }
52
+
53
+ export function ListDeposits200ResponseFromJSON(json: any): ListDeposits200Response {
54
+ return ListDeposits200ResponseFromJSONTyped(json, false);
55
+ }
56
+
57
+ export function ListDeposits200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListDeposits200Response {
58
+ if (json == null) {
59
+ return json;
60
+ }
61
+ return {
62
+
63
+ 'deposits': ((json['deposits'] as Array<any>).map(CryptoDepositFromJSON)),
64
+ 'minDepositCents': json['min_deposit_cents'],
65
+ };
66
+ }
67
+
68
+ export function ListDeposits200ResponseToJSON(json: any): ListDeposits200Response {
69
+ return ListDeposits200ResponseToJSONTyped(json, false);
70
+ }
71
+
72
+ export function ListDeposits200ResponseToJSONTyped(value?: ListDeposits200Response | null, ignoreDiscriminator: boolean = false): any {
73
+ if (value == null) {
74
+ return value;
75
+ }
76
+
77
+ return {
78
+
79
+ 'deposits': ((value['deposits'] as Array<any>).map(CryptoDepositToJSON)),
80
+ 'min_deposit_cents': value['minDepositCents'],
81
+ };
82
+ }
83
+
@@ -14,7 +14,7 @@
14
14
 
15
15
  import { mapValues } from '../runtime';
16
16
  /**
17
- * 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.
17
+ * 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).
18
18
  * @export
19
19
  * @interface OperationResult
20
20
  */
@@ -37,12 +37,6 @@ export interface OperationResult {
37
37
  * @memberof OperationResult
38
38
  */
39
39
  appBasicAuthUser?: string;
40
- /**
41
- *
42
- * @type {string}
43
- * @memberof OperationResult
44
- */
45
- appBasicAuthPass?: string;
46
40
  }
47
41
 
48
42
  /**
@@ -65,7 +59,6 @@ export function OperationResultFromJSONTyped(json: any, ignoreDiscriminator: boo
65
59
  'appUrl': json['app_url'] == null ? undefined : json['app_url'],
66
60
  'terminalUrl': json['terminal_url'] == null ? undefined : json['terminal_url'],
67
61
  'appBasicAuthUser': json['app_basic_auth_user'] == null ? undefined : json['app_basic_auth_user'],
68
- 'appBasicAuthPass': json['app_basic_auth_pass'] == null ? undefined : json['app_basic_auth_pass'],
69
62
  };
70
63
  }
71
64
 
@@ -83,7 +76,6 @@ export function OperationResultToJSONTyped(value?: OperationResult | null, ignor
83
76
  'app_url': value['appUrl'],
84
77
  'terminal_url': value['terminalUrl'],
85
78
  'app_basic_auth_user': value['appBasicAuthUser'],
86
- 'app_basic_auth_pass': value['appBasicAuthPass'],
87
79
  };
88
80
  }
89
81
 
@@ -4,12 +4,11 @@ export * from './ChatChoice';
4
4
  export * from './ChatCompletionRequest';
5
5
  export * from './ChatCompletionResponse';
6
6
  export * from './ChatMessage';
7
- export * from './CommunityEarnings';
8
- export * from './CommunityEarningsEntry';
9
7
  export * from './CommunityMachine';
10
8
  export * from './CommunityMachineDelistResult';
11
9
  export * from './CommunityMachineRegistration';
12
10
  export * from './CommunitySupplier';
11
+ export * from './CreateCryptoDepositRequest';
13
12
  export * from './CreateFineTuningJobRequest';
14
13
  export * from './CreateFineTuningJobRequestGpuai';
15
14
  export * from './CreateFineTuningJobRequestMethod';
@@ -17,6 +16,7 @@ export * from './CreateFineTuningJobRequestMethodLora';
17
16
  export * from './CreateInstanceRequest';
18
17
  export * from './CreateSshKeyRequest';
19
18
  export * from './CreateWebhookEndpointRequest';
19
+ export * from './CryptoDeposit';
20
20
  export * from './Environments';
21
21
  export * from './FileObject';
22
22
  export * from './FineTuningJob';
@@ -38,6 +38,7 @@ export * from './Instance';
38
38
  export * from './InstanceConnection';
39
39
  export * from './InstancePage';
40
40
  export * from './ListCommunityMachines200Response';
41
+ export * from './ListDeposits200Response';
41
42
  export * from './Model';
42
43
  export * from './ModelList';
43
44
  export * from './ModelParametersInner';
@@ -60,7 +61,6 @@ export * from './Template';
60
61
  export * from './TemplateEnvInner';
61
62
  export * from './TemplateList';
62
63
  export * from './TemplatePortsInner';
63
- export * from './UpdateCommunityMachineRequest';
64
64
  export * from './UpdateInstanceRequest';
65
65
  export * from './UpdateSpendingLimitRequest';
66
66
  export * from './Usage';