@gpuai/sdk 0.1.4 → 0.2.1

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 (40) 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/CreateInstanceRequest.d.ts +1 -1
  8. package/dist/esm/models/Problem.d.ts +1 -0
  9. package/dist/esm/models/Problem.js +1 -0
  10. package/dist/esm/models/index.d.ts +0 -3
  11. package/dist/esm/models/index.js +0 -3
  12. package/dist/models/CreateInstanceRequest.d.ts +1 -1
  13. package/dist/models/Problem.d.ts +1 -0
  14. package/dist/models/Problem.js +1 -0
  15. package/dist/models/index.d.ts +0 -3
  16. package/dist/models/index.js +0 -3
  17. package/docs/BillingApi.md +0 -220
  18. package/package.json +1 -1
  19. package/src/apis/BillingApi.ts +0 -182
  20. package/src/models/CreateInstanceRequest.ts +1 -1
  21. package/src/models/Problem.ts +1 -0
  22. package/src/models/index.ts +0 -3
  23. package/dist/esm/models/CreateCryptoDepositRequest.d.ts +0 -64
  24. package/dist/esm/models/CreateCryptoDepositRequest.js +0 -68
  25. package/dist/esm/models/CryptoDeposit.d.ts +0 -114
  26. package/dist/esm/models/CryptoDeposit.js +0 -90
  27. package/dist/esm/models/ListDeposits200Response.d.ts +0 -39
  28. package/dist/esm/models/ListDeposits200Response.js +0 -48
  29. package/dist/models/CreateCryptoDepositRequest.d.ts +0 -64
  30. package/dist/models/CreateCryptoDepositRequest.js +0 -76
  31. package/dist/models/CryptoDeposit.d.ts +0 -114
  32. package/dist/models/CryptoDeposit.js +0 -98
  33. package/dist/models/ListDeposits200Response.d.ts +0 -39
  34. package/dist/models/ListDeposits200Response.js +0 -55
  35. package/docs/CreateCryptoDepositRequest.md +0 -38
  36. package/docs/CryptoDeposit.md +0 -55
  37. package/docs/ListDeposits200Response.md +0 -36
  38. package/src/models/CreateCryptoDepositRequest.ts +0 -108
  39. package/src/models/CryptoDeposit.ts +0 -177
  40. package/src/models/ListDeposits200Response.ts +0 -83
@@ -1,98 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * GPU.ai Public Developer API
6
- * Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
7
- *
8
- * The version of the OpenAPI document: 1.0.0
9
- * Contact: support@gpu.ai
10
- *
11
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
- * https://openapi-generator.tech
13
- * Do not edit the class manually.
14
- */
15
- Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.CryptoDepositAssetEnum = exports.CryptoDepositChainEnum = void 0;
17
- exports.instanceOfCryptoDeposit = instanceOfCryptoDeposit;
18
- exports.CryptoDepositFromJSON = CryptoDepositFromJSON;
19
- exports.CryptoDepositFromJSONTyped = CryptoDepositFromJSONTyped;
20
- exports.CryptoDepositToJSON = CryptoDepositToJSON;
21
- exports.CryptoDepositToJSONTyped = CryptoDepositToJSONTyped;
22
- /**
23
- * @export
24
- */
25
- exports.CryptoDepositChainEnum = {
26
- Ethereum: 'ethereum',
27
- Base: 'base',
28
- Arbitrum: 'arbitrum',
29
- Polygon: 'polygon',
30
- Solana: 'solana'
31
- };
32
- /**
33
- * @export
34
- */
35
- exports.CryptoDepositAssetEnum = {
36
- Usdc: 'usdc',
37
- Usdt: 'usdt'
38
- };
39
- /**
40
- * Check if a given object implements the CryptoDeposit interface.
41
- */
42
- function instanceOfCryptoDeposit(value) {
43
- if ((!('depositId' in value) && !('deposit_id' in value)) || (value['depositId'] === undefined && value['deposit_id'] === undefined))
44
- return false;
45
- if (!('status' in value) || value['status'] === undefined)
46
- return false;
47
- if (!('chain' in value) || value['chain'] === undefined)
48
- return false;
49
- if (!('asset' in value) || value['asset'] === undefined)
50
- return false;
51
- if ((!('amountUsdCents' in value) && !('amount_usd_cents' in value)) || (value['amountUsdCents'] === undefined && value['amount_usd_cents'] === undefined))
52
- return false;
53
- if ((!('createdAt' in value) && !('created_at' in value)) || (value['createdAt'] === undefined && value['created_at'] === undefined))
54
- return false;
55
- return true;
56
- }
57
- function CryptoDepositFromJSON(json) {
58
- return CryptoDepositFromJSONTyped(json, false);
59
- }
60
- function CryptoDepositFromJSONTyped(json, ignoreDiscriminator) {
61
- if (json == null) {
62
- return json;
63
- }
64
- return {
65
- 'depositId': json['deposit_id'],
66
- 'status': json['status'],
67
- 'chain': json['chain'],
68
- 'asset': json['asset'],
69
- 'payAddress': json['pay_address'] == null ? undefined : json['pay_address'],
70
- 'payAmount': json['pay_amount'] == null ? undefined : json['pay_amount'],
71
- 'amountUsdCents': json['amount_usd_cents'],
72
- 'creditedCents': json['credited_cents'] == null ? undefined : json['credited_cents'],
73
- 'txHash': json['tx_hash'] == null ? undefined : json['tx_hash'],
74
- 'expiresAt': json['expires_at'] == null ? undefined : (new Date(json['expires_at'])),
75
- 'createdAt': (new Date(json['created_at'])),
76
- };
77
- }
78
- function CryptoDepositToJSON(json) {
79
- return CryptoDepositToJSONTyped(json, false);
80
- }
81
- function CryptoDepositToJSONTyped(value, ignoreDiscriminator = false) {
82
- if (value == null) {
83
- return value;
84
- }
85
- return {
86
- 'deposit_id': value['depositId'],
87
- 'status': value['status'],
88
- 'chain': value['chain'],
89
- 'asset': value['asset'],
90
- 'pay_address': value['payAddress'],
91
- 'pay_amount': value['payAmount'],
92
- 'amount_usd_cents': value['amountUsdCents'],
93
- 'credited_cents': value['creditedCents'],
94
- 'tx_hash': value['txHash'],
95
- 'expires_at': value['expiresAt'] == null ? value['expiresAt'] : value['expiresAt'].toISOString(),
96
- 'created_at': value['createdAt'].toISOString(),
97
- };
98
- }
@@ -1,39 +0,0 @@
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;
@@ -1,55 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * GPU.ai Public Developer API
6
- * Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
7
- *
8
- * The version of the OpenAPI document: 1.0.0
9
- * Contact: support@gpu.ai
10
- *
11
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
- * https://openapi-generator.tech
13
- * Do not edit the class manually.
14
- */
15
- Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.instanceOfListDeposits200Response = instanceOfListDeposits200Response;
17
- exports.ListDeposits200ResponseFromJSON = ListDeposits200ResponseFromJSON;
18
- exports.ListDeposits200ResponseFromJSONTyped = ListDeposits200ResponseFromJSONTyped;
19
- exports.ListDeposits200ResponseToJSON = ListDeposits200ResponseToJSON;
20
- exports.ListDeposits200ResponseToJSONTyped = ListDeposits200ResponseToJSONTyped;
21
- const CryptoDeposit_1 = require("./CryptoDeposit");
22
- /**
23
- * Check if a given object implements the ListDeposits200Response interface.
24
- */
25
- function instanceOfListDeposits200Response(value) {
26
- if (!('deposits' in value) || value['deposits'] === undefined)
27
- return false;
28
- if ((!('minDepositCents' in value) && !('min_deposit_cents' in value)) || (value['minDepositCents'] === undefined && value['min_deposit_cents'] === undefined))
29
- return false;
30
- return true;
31
- }
32
- function ListDeposits200ResponseFromJSON(json) {
33
- return ListDeposits200ResponseFromJSONTyped(json, false);
34
- }
35
- function ListDeposits200ResponseFromJSONTyped(json, ignoreDiscriminator) {
36
- if (json == null) {
37
- return json;
38
- }
39
- return {
40
- 'deposits': (json['deposits'].map(CryptoDeposit_1.CryptoDepositFromJSON)),
41
- 'minDepositCents': json['min_deposit_cents'],
42
- };
43
- }
44
- function ListDeposits200ResponseToJSON(json) {
45
- return ListDeposits200ResponseToJSONTyped(json, false);
46
- }
47
- function ListDeposits200ResponseToJSONTyped(value, ignoreDiscriminator = false) {
48
- if (value == null) {
49
- return value;
50
- }
51
- return {
52
- 'deposits': (value['deposits'].map(CryptoDeposit_1.CryptoDepositToJSON)),
53
- 'min_deposit_cents': value['minDepositCents'],
54
- };
55
- }
@@ -1,38 +0,0 @@
1
-
2
- # CreateCryptoDepositRequest
3
-
4
-
5
- ## Properties
6
-
7
- Name | Type
8
- ------------ | -------------
9
- `amountCents` | number
10
- `chain` | string
11
- `asset` | string
12
-
13
- ## Example
14
-
15
- ```typescript
16
- import type { CreateCryptoDepositRequest } from '@gpuai/sdk'
17
-
18
- // TODO: Update the object below with actual values
19
- const example = {
20
- "amountCents": null,
21
- "chain": null,
22
- "asset": null,
23
- } satisfies CreateCryptoDepositRequest
24
-
25
- console.log(example)
26
-
27
- // Convert the instance to a JSON string
28
- const exampleJSON: string = JSON.stringify(example)
29
- console.log(exampleJSON)
30
-
31
- // Parse the JSON string back to an object
32
- const exampleParsed = JSON.parse(exampleJSON) as CreateCryptoDepositRequest
33
- console.log(exampleParsed)
34
- ```
35
-
36
- [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
37
-
38
-
@@ -1,55 +0,0 @@
1
-
2
- # CryptoDeposit
3
-
4
- 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.
5
-
6
- ## Properties
7
-
8
- Name | Type
9
- ------------ | -------------
10
- `depositId` | string
11
- `status` | string
12
- `chain` | string
13
- `asset` | string
14
- `payAddress` | string
15
- `payAmount` | string
16
- `amountUsdCents` | number
17
- `creditedCents` | number
18
- `txHash` | string
19
- `expiresAt` | Date
20
- `createdAt` | Date
21
-
22
- ## Example
23
-
24
- ```typescript
25
- import type { CryptoDeposit } from '@gpuai/sdk'
26
-
27
- // TODO: Update the object below with actual values
28
- const example = {
29
- "depositId": null,
30
- "status": null,
31
- "chain": null,
32
- "asset": null,
33
- "payAddress": null,
34
- "payAmount": null,
35
- "amountUsdCents": null,
36
- "creditedCents": null,
37
- "txHash": null,
38
- "expiresAt": null,
39
- "createdAt": null,
40
- } satisfies CryptoDeposit
41
-
42
- console.log(example)
43
-
44
- // Convert the instance to a JSON string
45
- const exampleJSON: string = JSON.stringify(example)
46
- console.log(exampleJSON)
47
-
48
- // Parse the JSON string back to an object
49
- const exampleParsed = JSON.parse(exampleJSON) as CryptoDeposit
50
- console.log(exampleParsed)
51
- ```
52
-
53
- [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
54
-
55
-
@@ -1,36 +0,0 @@
1
-
2
- # ListDeposits200Response
3
-
4
-
5
- ## Properties
6
-
7
- Name | Type
8
- ------------ | -------------
9
- `deposits` | [Array&lt;CryptoDeposit&gt;](CryptoDeposit.md)
10
- `minDepositCents` | number
11
-
12
- ## Example
13
-
14
- ```typescript
15
- import type { ListDeposits200Response } from '@gpuai/sdk'
16
-
17
- // TODO: Update the object below with actual values
18
- const example = {
19
- "deposits": null,
20
- "minDepositCents": 500,
21
- } satisfies ListDeposits200Response
22
-
23
- console.log(example)
24
-
25
- // Convert the instance to a JSON string
26
- const exampleJSON: string = JSON.stringify(example)
27
- console.log(exampleJSON)
28
-
29
- // Parse the JSON string back to an object
30
- const exampleParsed = JSON.parse(exampleJSON) as ListDeposits200Response
31
- console.log(exampleParsed)
32
- ```
33
-
34
- [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
35
-
36
-
@@ -1,108 +0,0 @@
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
- *
18
- * @export
19
- * @interface CreateCryptoDepositRequest
20
- */
21
- export interface CreateCryptoDepositRequest {
22
- /**
23
- * Amount to deposit in USD cents. Must be at least the configured minimum (500 = $5.00 by default).
24
- *
25
- * @type {number}
26
- * @memberof CreateCryptoDepositRequest
27
- */
28
- amountCents: number;
29
- /**
30
- *
31
- * @type {CreateCryptoDepositRequestChainEnum}
32
- * @memberof CreateCryptoDepositRequest
33
- */
34
- chain: CreateCryptoDepositRequestChainEnum;
35
- /**
36
- *
37
- * @type {CreateCryptoDepositRequestAssetEnum}
38
- * @memberof CreateCryptoDepositRequest
39
- */
40
- asset: CreateCryptoDepositRequestAssetEnum;
41
- }
42
-
43
-
44
- /**
45
- * @export
46
- */
47
- export const CreateCryptoDepositRequestChainEnum = {
48
- Ethereum: 'ethereum',
49
- Base: 'base',
50
- Arbitrum: 'arbitrum',
51
- Polygon: 'polygon',
52
- Solana: 'solana'
53
- } as const;
54
- export type CreateCryptoDepositRequestChainEnum = typeof CreateCryptoDepositRequestChainEnum[keyof typeof CreateCryptoDepositRequestChainEnum];
55
-
56
- /**
57
- * @export
58
- */
59
- export const CreateCryptoDepositRequestAssetEnum = {
60
- Usdc: 'usdc',
61
- Usdt: 'usdt'
62
- } as const;
63
- export type CreateCryptoDepositRequestAssetEnum = typeof CreateCryptoDepositRequestAssetEnum[keyof typeof CreateCryptoDepositRequestAssetEnum];
64
-
65
-
66
- /**
67
- * Check if a given object implements the CreateCryptoDepositRequest interface.
68
- */
69
- export function instanceOfCreateCryptoDepositRequest(value: object): value is CreateCryptoDepositRequest {
70
- if ((!('amountCents' in (value as Record<string, any>)) && !('amount_cents' in (value as Record<string, any>))) || ((value as Record<string, any>)['amountCents'] === undefined && (value as Record<string, any>)['amount_cents'] === undefined)) return false;
71
- if (!('chain' in value) || value['chain'] === undefined) return false;
72
- if (!('asset' in value) || value['asset'] === undefined) return false;
73
- return true;
74
- }
75
-
76
- export function CreateCryptoDepositRequestFromJSON(json: any): CreateCryptoDepositRequest {
77
- return CreateCryptoDepositRequestFromJSONTyped(json, false);
78
- }
79
-
80
- export function CreateCryptoDepositRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateCryptoDepositRequest {
81
- if (json == null) {
82
- return json;
83
- }
84
- return {
85
-
86
- 'amountCents': json['amount_cents'],
87
- 'chain': json['chain'],
88
- 'asset': json['asset'],
89
- };
90
- }
91
-
92
- export function CreateCryptoDepositRequestToJSON(json: any): CreateCryptoDepositRequest {
93
- return CreateCryptoDepositRequestToJSONTyped(json, false);
94
- }
95
-
96
- export function CreateCryptoDepositRequestToJSONTyped(value?: CreateCryptoDepositRequest | null, ignoreDiscriminator: boolean = false): any {
97
- if (value == null) {
98
- return value;
99
- }
100
-
101
- return {
102
-
103
- 'amount_cents': value['amountCents'],
104
- 'chain': value['chain'],
105
- 'asset': value['asset'],
106
- };
107
- }
108
-
@@ -1,177 +0,0 @@
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
-
@@ -1,83 +0,0 @@
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
-