@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
@@ -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
+
@@ -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
+
@@ -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';