@gpuai/sdk 0.1.4 → 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.
- package/.openapi-generator/FILES +0 -6
- package/README.md +4 -15
- package/dist/apis/BillingApi.d.ts +0 -51
- package/dist/apis/BillingApi.js +0 -144
- package/dist/esm/apis/BillingApi.d.ts +0 -51
- package/dist/esm/apis/BillingApi.js +0 -144
- package/dist/esm/models/index.d.ts +0 -3
- package/dist/esm/models/index.js +0 -3
- package/dist/models/index.d.ts +0 -3
- package/dist/models/index.js +0 -3
- package/docs/BillingApi.md +0 -220
- package/package.json +1 -1
- package/src/apis/BillingApi.ts +0 -182
- package/src/models/index.ts +0 -3
- package/dist/esm/models/CreateCryptoDepositRequest.d.ts +0 -64
- package/dist/esm/models/CreateCryptoDepositRequest.js +0 -68
- package/dist/esm/models/CryptoDeposit.d.ts +0 -114
- package/dist/esm/models/CryptoDeposit.js +0 -90
- package/dist/esm/models/ListDeposits200Response.d.ts +0 -39
- package/dist/esm/models/ListDeposits200Response.js +0 -48
- package/dist/models/CreateCryptoDepositRequest.d.ts +0 -64
- package/dist/models/CreateCryptoDepositRequest.js +0 -76
- package/dist/models/CryptoDeposit.d.ts +0 -114
- package/dist/models/CryptoDeposit.js +0 -98
- package/dist/models/ListDeposits200Response.d.ts +0 -39
- package/dist/models/ListDeposits200Response.js +0 -55
- package/docs/CreateCryptoDepositRequest.md +0 -38
- package/docs/CryptoDeposit.md +0 -55
- package/docs/ListDeposits200Response.md +0 -36
- package/src/models/CreateCryptoDepositRequest.ts +0 -108
- package/src/models/CryptoDeposit.ts +0 -177
- package/src/models/ListDeposits200Response.ts +0 -83
package/.openapi-generator/FILES
CHANGED
|
@@ -13,7 +13,6 @@ docs/CommunityMachine.md
|
|
|
13
13
|
docs/CommunityMachineDelistResult.md
|
|
14
14
|
docs/CommunityMachineRegistration.md
|
|
15
15
|
docs/CommunitySupplier.md
|
|
16
|
-
docs/CreateCryptoDepositRequest.md
|
|
17
16
|
docs/CreateFineTuningJobRequest.md
|
|
18
17
|
docs/CreateFineTuningJobRequestGpuai.md
|
|
19
18
|
docs/CreateFineTuningJobRequestMethod.md
|
|
@@ -21,7 +20,6 @@ docs/CreateFineTuningJobRequestMethodLora.md
|
|
|
21
20
|
docs/CreateInstanceRequest.md
|
|
22
21
|
docs/CreateSshKeyRequest.md
|
|
23
22
|
docs/CreateWebhookEndpointRequest.md
|
|
24
|
-
docs/CryptoDeposit.md
|
|
25
23
|
docs/Environments.md
|
|
26
24
|
docs/EnvironmentsApi.md
|
|
27
25
|
docs/FileObject.md
|
|
@@ -48,7 +46,6 @@ docs/InstanceConnection.md
|
|
|
48
46
|
docs/InstancePage.md
|
|
49
47
|
docs/InstancesApi.md
|
|
50
48
|
docs/ListCommunityMachines200Response.md
|
|
51
|
-
docs/ListDeposits200Response.md
|
|
52
49
|
docs/MetaApi.md
|
|
53
50
|
docs/Model.md
|
|
54
51
|
docs/ModelList.md
|
|
@@ -117,7 +114,6 @@ src/models/CommunityMachine.ts
|
|
|
117
114
|
src/models/CommunityMachineDelistResult.ts
|
|
118
115
|
src/models/CommunityMachineRegistration.ts
|
|
119
116
|
src/models/CommunitySupplier.ts
|
|
120
|
-
src/models/CreateCryptoDepositRequest.ts
|
|
121
117
|
src/models/CreateFineTuningJobRequest.ts
|
|
122
118
|
src/models/CreateFineTuningJobRequestGpuai.ts
|
|
123
119
|
src/models/CreateFineTuningJobRequestMethod.ts
|
|
@@ -125,7 +121,6 @@ src/models/CreateFineTuningJobRequestMethodLora.ts
|
|
|
125
121
|
src/models/CreateInstanceRequest.ts
|
|
126
122
|
src/models/CreateSshKeyRequest.ts
|
|
127
123
|
src/models/CreateWebhookEndpointRequest.ts
|
|
128
|
-
src/models/CryptoDeposit.ts
|
|
129
124
|
src/models/Environments.ts
|
|
130
125
|
src/models/FileObject.ts
|
|
131
126
|
src/models/FineTuningJob.ts
|
|
@@ -147,7 +142,6 @@ src/models/Instance.ts
|
|
|
147
142
|
src/models/InstanceConnection.ts
|
|
148
143
|
src/models/InstancePage.ts
|
|
149
144
|
src/models/ListCommunityMachines200Response.ts
|
|
150
|
-
src/models/ListDeposits200Response.ts
|
|
151
145
|
src/models/Model.ts
|
|
152
146
|
src/models/ModelList.ts
|
|
153
147
|
src/models/ModelParametersInner.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @gpuai/sdk@0.
|
|
1
|
+
# @gpuai/sdk@0.2.0
|
|
2
2
|
|
|
3
3
|
A TypeScript SDK client for the api.gpu.ai API.
|
|
4
4
|
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
Configuration,
|
|
19
19
|
BillingApi,
|
|
20
20
|
} from '@gpuai/sdk';
|
|
21
|
-
import type {
|
|
21
|
+
import type { GetSpendingLimitRequest } from '@gpuai/sdk';
|
|
22
22
|
|
|
23
23
|
async function example() {
|
|
24
24
|
console.log("🚀 Testing @gpuai/sdk SDK...");
|
|
@@ -28,13 +28,8 @@ async function example() {
|
|
|
28
28
|
});
|
|
29
29
|
const api = new BillingApi(config);
|
|
30
30
|
|
|
31
|
-
const body = {
|
|
32
|
-
// CreateCryptoDepositRequest
|
|
33
|
-
createCryptoDepositRequest: ...,
|
|
34
|
-
} satisfies CreateCryptoDepositOperationRequest;
|
|
35
|
-
|
|
36
31
|
try {
|
|
37
|
-
const data = await api.
|
|
32
|
+
const data = await api.getSpendingLimit();
|
|
38
33
|
console.log(data);
|
|
39
34
|
} catch (error) {
|
|
40
35
|
console.error(error);
|
|
@@ -54,10 +49,7 @@ All URIs are relative to *https://api.gpu.ai/v1*
|
|
|
54
49
|
|
|
55
50
|
| Class | Method | HTTP request | Description
|
|
56
51
|
| ----- | ------ | ------------ | -------------
|
|
57
|
-
*BillingApi* | [**createCryptoDeposit**](docs/BillingApi.md#createcryptodepositoperation) | **POST** /billing/deposits/crypto | Create a stablecoin deposit
|
|
58
|
-
*BillingApi* | [**getDeposit**](docs/BillingApi.md#getdeposit) | **GET** /billing/deposits/{id} | Get one stablecoin deposit
|
|
59
52
|
*BillingApi* | [**getSpendingLimit**](docs/BillingApi.md#getspendinglimit) | **GET** /billing/spending-limit | Get the org spending limit
|
|
60
|
-
*BillingApi* | [**listDeposits**](docs/BillingApi.md#listdeposits) | **GET** /billing/deposits | List stablecoin deposits
|
|
61
53
|
*BillingApi* | [**updateSpendingLimit**](docs/BillingApi.md#updatespendinglimitoperation) | **PUT** /billing/spending-limit | Set the org spending limit
|
|
62
54
|
*CommunityApi* | [**delistCommunityMachine**](docs/CommunityApi.md#delistcommunitymachine) | **POST** /community/machines/{id}/delist | Delist a Community Cloud machine
|
|
63
55
|
*CommunityApi* | [**enableCommunitySupplier**](docs/CommunityApi.md#enablecommunitysupplier) | **POST** /community/suppliers | Enable the Community Cloud supplier role
|
|
@@ -119,7 +111,6 @@ All URIs are relative to *https://api.gpu.ai/v1*
|
|
|
119
111
|
- [CommunityMachineDelistResult](docs/CommunityMachineDelistResult.md)
|
|
120
112
|
- [CommunityMachineRegistration](docs/CommunityMachineRegistration.md)
|
|
121
113
|
- [CommunitySupplier](docs/CommunitySupplier.md)
|
|
122
|
-
- [CreateCryptoDepositRequest](docs/CreateCryptoDepositRequest.md)
|
|
123
114
|
- [CreateFineTuningJobRequest](docs/CreateFineTuningJobRequest.md)
|
|
124
115
|
- [CreateFineTuningJobRequestGpuai](docs/CreateFineTuningJobRequestGpuai.md)
|
|
125
116
|
- [CreateFineTuningJobRequestMethod](docs/CreateFineTuningJobRequestMethod.md)
|
|
@@ -127,7 +118,6 @@ All URIs are relative to *https://api.gpu.ai/v1*
|
|
|
127
118
|
- [CreateInstanceRequest](docs/CreateInstanceRequest.md)
|
|
128
119
|
- [CreateSshKeyRequest](docs/CreateSshKeyRequest.md)
|
|
129
120
|
- [CreateWebhookEndpointRequest](docs/CreateWebhookEndpointRequest.md)
|
|
130
|
-
- [CryptoDeposit](docs/CryptoDeposit.md)
|
|
131
121
|
- [Environments](docs/Environments.md)
|
|
132
122
|
- [FileObject](docs/FileObject.md)
|
|
133
123
|
- [FineTuningJob](docs/FineTuningJob.md)
|
|
@@ -149,7 +139,6 @@ All URIs are relative to *https://api.gpu.ai/v1*
|
|
|
149
139
|
- [InstanceConnection](docs/InstanceConnection.md)
|
|
150
140
|
- [InstancePage](docs/InstancePage.md)
|
|
151
141
|
- [ListCommunityMachines200Response](docs/ListCommunityMachines200Response.md)
|
|
152
|
-
- [ListDeposits200Response](docs/ListDeposits200Response.md)
|
|
153
142
|
- [Model](docs/Model.md)
|
|
154
143
|
- [ModelList](docs/ModelList.md)
|
|
155
144
|
- [ModelParametersInner](docs/ModelParametersInner.md)
|
|
@@ -202,7 +191,7 @@ and is automatically generated by the
|
|
|
202
191
|
[OpenAPI Generator](https://openapi-generator.tech) project:
|
|
203
192
|
|
|
204
193
|
- API version: `1.0.0`
|
|
205
|
-
- Package version: `0.
|
|
194
|
+
- Package version: `0.2.0`
|
|
206
195
|
- Generator version: `7.24.0`
|
|
207
196
|
- Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
|
|
208
197
|
|
|
@@ -10,17 +10,8 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import { type CreateCryptoDepositRequest } from '../models/CreateCryptoDepositRequest';
|
|
14
|
-
import { type CryptoDeposit } from '../models/CryptoDeposit';
|
|
15
|
-
import { type ListDeposits200Response } from '../models/ListDeposits200Response';
|
|
16
13
|
import { type SpendingLimit } from '../models/SpendingLimit';
|
|
17
14
|
import { type UpdateSpendingLimitRequest } from '../models/UpdateSpendingLimitRequest';
|
|
18
|
-
export interface CreateCryptoDepositOperationRequest {
|
|
19
|
-
createCryptoDepositRequest: CreateCryptoDepositRequest;
|
|
20
|
-
}
|
|
21
|
-
export interface GetDepositRequest {
|
|
22
|
-
id: string;
|
|
23
|
-
}
|
|
24
15
|
export interface UpdateSpendingLimitOperationRequest {
|
|
25
16
|
updateSpendingLimitRequest: UpdateSpendingLimitRequest;
|
|
26
17
|
}
|
|
@@ -28,34 +19,6 @@ export interface UpdateSpendingLimitOperationRequest {
|
|
|
28
19
|
*
|
|
29
20
|
*/
|
|
30
21
|
export declare class BillingApi extends runtime.BaseAPI {
|
|
31
|
-
/**
|
|
32
|
-
* Creates request options for createCryptoDeposit without sending the request
|
|
33
|
-
*/
|
|
34
|
-
createCryptoDepositRequestOpts(requestParameters: CreateCryptoDepositOperationRequest): Promise<runtime.RequestOpts>;
|
|
35
|
-
/**
|
|
36
|
-
* 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.
|
|
37
|
-
* Create a stablecoin deposit
|
|
38
|
-
*/
|
|
39
|
-
createCryptoDepositRaw(requestParameters: CreateCryptoDepositOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CryptoDeposit>>;
|
|
40
|
-
/**
|
|
41
|
-
* 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.
|
|
42
|
-
* Create a stablecoin deposit
|
|
43
|
-
*/
|
|
44
|
-
createCryptoDeposit(requestParameters: CreateCryptoDepositOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CryptoDeposit>;
|
|
45
|
-
/**
|
|
46
|
-
* Creates request options for getDeposit without sending the request
|
|
47
|
-
*/
|
|
48
|
-
getDepositRequestOpts(requestParameters: GetDepositRequest): Promise<runtime.RequestOpts>;
|
|
49
|
-
/**
|
|
50
|
-
* 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.
|
|
51
|
-
* Get one stablecoin deposit
|
|
52
|
-
*/
|
|
53
|
-
getDepositRaw(requestParameters: GetDepositRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CryptoDeposit>>;
|
|
54
|
-
/**
|
|
55
|
-
* 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.
|
|
56
|
-
* Get one stablecoin deposit
|
|
57
|
-
*/
|
|
58
|
-
getDeposit(requestParameters: GetDepositRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CryptoDeposit>;
|
|
59
22
|
/**
|
|
60
23
|
* Creates request options for getSpendingLimit without sending the request
|
|
61
24
|
*/
|
|
@@ -70,20 +33,6 @@ export declare class BillingApi extends runtime.BaseAPI {
|
|
|
70
33
|
* Get the org spending limit
|
|
71
34
|
*/
|
|
72
35
|
getSpendingLimit(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SpendingLimit>;
|
|
73
|
-
/**
|
|
74
|
-
* Creates request options for listDeposits without sending the request
|
|
75
|
-
*/
|
|
76
|
-
listDepositsRequestOpts(): Promise<runtime.RequestOpts>;
|
|
77
|
-
/**
|
|
78
|
-
* 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.
|
|
79
|
-
* List stablecoin deposits
|
|
80
|
-
*/
|
|
81
|
-
listDepositsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListDeposits200Response>>;
|
|
82
|
-
/**
|
|
83
|
-
* 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.
|
|
84
|
-
* List stablecoin deposits
|
|
85
|
-
*/
|
|
86
|
-
listDeposits(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListDeposits200Response>;
|
|
87
36
|
/**
|
|
88
37
|
* Creates request options for updateSpendingLimit without sending the request
|
|
89
38
|
*/
|
package/dist/apis/BillingApi.js
CHANGED
|
@@ -24,112 +24,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
25
|
exports.BillingApi = void 0;
|
|
26
26
|
const runtime = require("../runtime");
|
|
27
|
-
const CreateCryptoDepositRequest_1 = require("../models/CreateCryptoDepositRequest");
|
|
28
|
-
const CryptoDeposit_1 = require("../models/CryptoDeposit");
|
|
29
|
-
const ListDeposits200Response_1 = require("../models/ListDeposits200Response");
|
|
30
27
|
const SpendingLimit_1 = require("../models/SpendingLimit");
|
|
31
28
|
const UpdateSpendingLimitRequest_1 = require("../models/UpdateSpendingLimitRequest");
|
|
32
29
|
/**
|
|
33
30
|
*
|
|
34
31
|
*/
|
|
35
32
|
class BillingApi extends runtime.BaseAPI {
|
|
36
|
-
/**
|
|
37
|
-
* Creates request options for createCryptoDeposit without sending the request
|
|
38
|
-
*/
|
|
39
|
-
createCryptoDepositRequestOpts(requestParameters) {
|
|
40
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
-
if (requestParameters['createCryptoDepositRequest'] == null) {
|
|
42
|
-
throw new runtime.RequiredError('createCryptoDepositRequest', 'Required parameter "createCryptoDepositRequest" was null or undefined when calling createCryptoDeposit().');
|
|
43
|
-
}
|
|
44
|
-
const queryParameters = {};
|
|
45
|
-
const headerParameters = {};
|
|
46
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
47
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
48
|
-
const token = this.configuration.accessToken;
|
|
49
|
-
const tokenString = yield token("bearerAuth", []);
|
|
50
|
-
if (tokenString) {
|
|
51
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
let urlPath = `/billing/deposits/crypto`;
|
|
55
|
-
return {
|
|
56
|
-
path: urlPath,
|
|
57
|
-
method: 'POST',
|
|
58
|
-
headers: headerParameters,
|
|
59
|
-
query: queryParameters,
|
|
60
|
-
body: (0, CreateCryptoDepositRequest_1.CreateCryptoDepositRequestToJSON)(requestParameters['createCryptoDepositRequest']),
|
|
61
|
-
};
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* 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.
|
|
66
|
-
* Create a stablecoin deposit
|
|
67
|
-
*/
|
|
68
|
-
createCryptoDepositRaw(requestParameters, initOverrides) {
|
|
69
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
-
const requestOptions = yield this.createCryptoDepositRequestOpts(requestParameters);
|
|
71
|
-
const response = yield this.request(requestOptions, initOverrides);
|
|
72
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, CryptoDeposit_1.CryptoDepositFromJSON)(jsonValue));
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* 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.
|
|
77
|
-
* Create a stablecoin deposit
|
|
78
|
-
*/
|
|
79
|
-
createCryptoDeposit(requestParameters, initOverrides) {
|
|
80
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
81
|
-
const response = yield this.createCryptoDepositRaw(requestParameters, initOverrides);
|
|
82
|
-
return yield response.value();
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Creates request options for getDeposit without sending the request
|
|
87
|
-
*/
|
|
88
|
-
getDepositRequestOpts(requestParameters) {
|
|
89
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
90
|
-
if (requestParameters['id'] == null) {
|
|
91
|
-
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getDeposit().');
|
|
92
|
-
}
|
|
93
|
-
const queryParameters = {};
|
|
94
|
-
const headerParameters = {};
|
|
95
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
96
|
-
const token = this.configuration.accessToken;
|
|
97
|
-
const tokenString = yield token("bearerAuth", []);
|
|
98
|
-
if (tokenString) {
|
|
99
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
let urlPath = `/billing/deposits/{id}`;
|
|
103
|
-
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
104
|
-
return {
|
|
105
|
-
path: urlPath,
|
|
106
|
-
method: 'GET',
|
|
107
|
-
headers: headerParameters,
|
|
108
|
-
query: queryParameters,
|
|
109
|
-
};
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* 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.
|
|
114
|
-
* Get one stablecoin deposit
|
|
115
|
-
*/
|
|
116
|
-
getDepositRaw(requestParameters, initOverrides) {
|
|
117
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
118
|
-
const requestOptions = yield this.getDepositRequestOpts(requestParameters);
|
|
119
|
-
const response = yield this.request(requestOptions, initOverrides);
|
|
120
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, CryptoDeposit_1.CryptoDepositFromJSON)(jsonValue));
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* 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.
|
|
125
|
-
* Get one stablecoin deposit
|
|
126
|
-
*/
|
|
127
|
-
getDeposit(requestParameters, initOverrides) {
|
|
128
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
129
|
-
const response = yield this.getDepositRaw(requestParameters, initOverrides);
|
|
130
|
-
return yield response.value();
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
33
|
/**
|
|
134
34
|
* Creates request options for getSpendingLimit without sending the request
|
|
135
35
|
*/
|
|
@@ -174,50 +74,6 @@ class BillingApi extends runtime.BaseAPI {
|
|
|
174
74
|
return yield response.value();
|
|
175
75
|
});
|
|
176
76
|
}
|
|
177
|
-
/**
|
|
178
|
-
* Creates request options for listDeposits without sending the request
|
|
179
|
-
*/
|
|
180
|
-
listDepositsRequestOpts() {
|
|
181
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
182
|
-
const queryParameters = {};
|
|
183
|
-
const headerParameters = {};
|
|
184
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
185
|
-
const token = this.configuration.accessToken;
|
|
186
|
-
const tokenString = yield token("bearerAuth", []);
|
|
187
|
-
if (tokenString) {
|
|
188
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
let urlPath = `/billing/deposits`;
|
|
192
|
-
return {
|
|
193
|
-
path: urlPath,
|
|
194
|
-
method: 'GET',
|
|
195
|
-
headers: headerParameters,
|
|
196
|
-
query: queryParameters,
|
|
197
|
-
};
|
|
198
|
-
});
|
|
199
|
-
}
|
|
200
|
-
/**
|
|
201
|
-
* 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.
|
|
202
|
-
* List stablecoin deposits
|
|
203
|
-
*/
|
|
204
|
-
listDepositsRaw(initOverrides) {
|
|
205
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
206
|
-
const requestOptions = yield this.listDepositsRequestOpts();
|
|
207
|
-
const response = yield this.request(requestOptions, initOverrides);
|
|
208
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, ListDeposits200Response_1.ListDeposits200ResponseFromJSON)(jsonValue));
|
|
209
|
-
});
|
|
210
|
-
}
|
|
211
|
-
/**
|
|
212
|
-
* 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.
|
|
213
|
-
* List stablecoin deposits
|
|
214
|
-
*/
|
|
215
|
-
listDeposits(initOverrides) {
|
|
216
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
217
|
-
const response = yield this.listDepositsRaw(initOverrides);
|
|
218
|
-
return yield response.value();
|
|
219
|
-
});
|
|
220
|
-
}
|
|
221
77
|
/**
|
|
222
78
|
* Creates request options for updateSpendingLimit without sending the request
|
|
223
79
|
*/
|
|
@@ -10,17 +10,8 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import { type CreateCryptoDepositRequest } from '../models/CreateCryptoDepositRequest';
|
|
14
|
-
import { type CryptoDeposit } from '../models/CryptoDeposit';
|
|
15
|
-
import { type ListDeposits200Response } from '../models/ListDeposits200Response';
|
|
16
13
|
import { type SpendingLimit } from '../models/SpendingLimit';
|
|
17
14
|
import { type UpdateSpendingLimitRequest } from '../models/UpdateSpendingLimitRequest';
|
|
18
|
-
export interface CreateCryptoDepositOperationRequest {
|
|
19
|
-
createCryptoDepositRequest: CreateCryptoDepositRequest;
|
|
20
|
-
}
|
|
21
|
-
export interface GetDepositRequest {
|
|
22
|
-
id: string;
|
|
23
|
-
}
|
|
24
15
|
export interface UpdateSpendingLimitOperationRequest {
|
|
25
16
|
updateSpendingLimitRequest: UpdateSpendingLimitRequest;
|
|
26
17
|
}
|
|
@@ -28,34 +19,6 @@ export interface UpdateSpendingLimitOperationRequest {
|
|
|
28
19
|
*
|
|
29
20
|
*/
|
|
30
21
|
export declare class BillingApi extends runtime.BaseAPI {
|
|
31
|
-
/**
|
|
32
|
-
* Creates request options for createCryptoDeposit without sending the request
|
|
33
|
-
*/
|
|
34
|
-
createCryptoDepositRequestOpts(requestParameters: CreateCryptoDepositOperationRequest): Promise<runtime.RequestOpts>;
|
|
35
|
-
/**
|
|
36
|
-
* 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.
|
|
37
|
-
* Create a stablecoin deposit
|
|
38
|
-
*/
|
|
39
|
-
createCryptoDepositRaw(requestParameters: CreateCryptoDepositOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CryptoDeposit>>;
|
|
40
|
-
/**
|
|
41
|
-
* 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.
|
|
42
|
-
* Create a stablecoin deposit
|
|
43
|
-
*/
|
|
44
|
-
createCryptoDeposit(requestParameters: CreateCryptoDepositOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CryptoDeposit>;
|
|
45
|
-
/**
|
|
46
|
-
* Creates request options for getDeposit without sending the request
|
|
47
|
-
*/
|
|
48
|
-
getDepositRequestOpts(requestParameters: GetDepositRequest): Promise<runtime.RequestOpts>;
|
|
49
|
-
/**
|
|
50
|
-
* 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.
|
|
51
|
-
* Get one stablecoin deposit
|
|
52
|
-
*/
|
|
53
|
-
getDepositRaw(requestParameters: GetDepositRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CryptoDeposit>>;
|
|
54
|
-
/**
|
|
55
|
-
* 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.
|
|
56
|
-
* Get one stablecoin deposit
|
|
57
|
-
*/
|
|
58
|
-
getDeposit(requestParameters: GetDepositRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CryptoDeposit>;
|
|
59
22
|
/**
|
|
60
23
|
* Creates request options for getSpendingLimit without sending the request
|
|
61
24
|
*/
|
|
@@ -70,20 +33,6 @@ export declare class BillingApi extends runtime.BaseAPI {
|
|
|
70
33
|
* Get the org spending limit
|
|
71
34
|
*/
|
|
72
35
|
getSpendingLimit(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SpendingLimit>;
|
|
73
|
-
/**
|
|
74
|
-
* Creates request options for listDeposits without sending the request
|
|
75
|
-
*/
|
|
76
|
-
listDepositsRequestOpts(): Promise<runtime.RequestOpts>;
|
|
77
|
-
/**
|
|
78
|
-
* 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.
|
|
79
|
-
* List stablecoin deposits
|
|
80
|
-
*/
|
|
81
|
-
listDepositsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListDeposits200Response>>;
|
|
82
|
-
/**
|
|
83
|
-
* 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.
|
|
84
|
-
* List stablecoin deposits
|
|
85
|
-
*/
|
|
86
|
-
listDeposits(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListDeposits200Response>;
|
|
87
36
|
/**
|
|
88
37
|
* Creates request options for updateSpendingLimit without sending the request
|
|
89
38
|
*/
|
|
@@ -21,112 +21,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime';
|
|
24
|
-
import { CreateCryptoDepositRequestToJSON, } from '../models/CreateCryptoDepositRequest';
|
|
25
|
-
import { CryptoDepositFromJSON, } from '../models/CryptoDeposit';
|
|
26
|
-
import { ListDeposits200ResponseFromJSON, } from '../models/ListDeposits200Response';
|
|
27
24
|
import { SpendingLimitFromJSON, } from '../models/SpendingLimit';
|
|
28
25
|
import { UpdateSpendingLimitRequestToJSON, } from '../models/UpdateSpendingLimitRequest';
|
|
29
26
|
/**
|
|
30
27
|
*
|
|
31
28
|
*/
|
|
32
29
|
export class BillingApi extends runtime.BaseAPI {
|
|
33
|
-
/**
|
|
34
|
-
* Creates request options for createCryptoDeposit without sending the request
|
|
35
|
-
*/
|
|
36
|
-
createCryptoDepositRequestOpts(requestParameters) {
|
|
37
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
-
if (requestParameters['createCryptoDepositRequest'] == null) {
|
|
39
|
-
throw new runtime.RequiredError('createCryptoDepositRequest', 'Required parameter "createCryptoDepositRequest" was null or undefined when calling createCryptoDeposit().');
|
|
40
|
-
}
|
|
41
|
-
const queryParameters = {};
|
|
42
|
-
const headerParameters = {};
|
|
43
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
44
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
45
|
-
const token = this.configuration.accessToken;
|
|
46
|
-
const tokenString = yield token("bearerAuth", []);
|
|
47
|
-
if (tokenString) {
|
|
48
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
let urlPath = `/billing/deposits/crypto`;
|
|
52
|
-
return {
|
|
53
|
-
path: urlPath,
|
|
54
|
-
method: 'POST',
|
|
55
|
-
headers: headerParameters,
|
|
56
|
-
query: queryParameters,
|
|
57
|
-
body: CreateCryptoDepositRequestToJSON(requestParameters['createCryptoDepositRequest']),
|
|
58
|
-
};
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* 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.
|
|
63
|
-
* Create a stablecoin deposit
|
|
64
|
-
*/
|
|
65
|
-
createCryptoDepositRaw(requestParameters, initOverrides) {
|
|
66
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
67
|
-
const requestOptions = yield this.createCryptoDepositRequestOpts(requestParameters);
|
|
68
|
-
const response = yield this.request(requestOptions, initOverrides);
|
|
69
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => CryptoDepositFromJSON(jsonValue));
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* 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.
|
|
74
|
-
* Create a stablecoin deposit
|
|
75
|
-
*/
|
|
76
|
-
createCryptoDeposit(requestParameters, initOverrides) {
|
|
77
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
78
|
-
const response = yield this.createCryptoDepositRaw(requestParameters, initOverrides);
|
|
79
|
-
return yield response.value();
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Creates request options for getDeposit without sending the request
|
|
84
|
-
*/
|
|
85
|
-
getDepositRequestOpts(requestParameters) {
|
|
86
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
87
|
-
if (requestParameters['id'] == null) {
|
|
88
|
-
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getDeposit().');
|
|
89
|
-
}
|
|
90
|
-
const queryParameters = {};
|
|
91
|
-
const headerParameters = {};
|
|
92
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
93
|
-
const token = this.configuration.accessToken;
|
|
94
|
-
const tokenString = yield token("bearerAuth", []);
|
|
95
|
-
if (tokenString) {
|
|
96
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
let urlPath = `/billing/deposits/{id}`;
|
|
100
|
-
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
101
|
-
return {
|
|
102
|
-
path: urlPath,
|
|
103
|
-
method: 'GET',
|
|
104
|
-
headers: headerParameters,
|
|
105
|
-
query: queryParameters,
|
|
106
|
-
};
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
/**
|
|
110
|
-
* 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.
|
|
111
|
-
* Get one stablecoin deposit
|
|
112
|
-
*/
|
|
113
|
-
getDepositRaw(requestParameters, initOverrides) {
|
|
114
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
115
|
-
const requestOptions = yield this.getDepositRequestOpts(requestParameters);
|
|
116
|
-
const response = yield this.request(requestOptions, initOverrides);
|
|
117
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => CryptoDepositFromJSON(jsonValue));
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* 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.
|
|
122
|
-
* Get one stablecoin deposit
|
|
123
|
-
*/
|
|
124
|
-
getDeposit(requestParameters, initOverrides) {
|
|
125
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
126
|
-
const response = yield this.getDepositRaw(requestParameters, initOverrides);
|
|
127
|
-
return yield response.value();
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
30
|
/**
|
|
131
31
|
* Creates request options for getSpendingLimit without sending the request
|
|
132
32
|
*/
|
|
@@ -171,50 +71,6 @@ export class BillingApi extends runtime.BaseAPI {
|
|
|
171
71
|
return yield response.value();
|
|
172
72
|
});
|
|
173
73
|
}
|
|
174
|
-
/**
|
|
175
|
-
* Creates request options for listDeposits without sending the request
|
|
176
|
-
*/
|
|
177
|
-
listDepositsRequestOpts() {
|
|
178
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
179
|
-
const queryParameters = {};
|
|
180
|
-
const headerParameters = {};
|
|
181
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
182
|
-
const token = this.configuration.accessToken;
|
|
183
|
-
const tokenString = yield token("bearerAuth", []);
|
|
184
|
-
if (tokenString) {
|
|
185
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
let urlPath = `/billing/deposits`;
|
|
189
|
-
return {
|
|
190
|
-
path: urlPath,
|
|
191
|
-
method: 'GET',
|
|
192
|
-
headers: headerParameters,
|
|
193
|
-
query: queryParameters,
|
|
194
|
-
};
|
|
195
|
-
});
|
|
196
|
-
}
|
|
197
|
-
/**
|
|
198
|
-
* 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.
|
|
199
|
-
* List stablecoin deposits
|
|
200
|
-
*/
|
|
201
|
-
listDepositsRaw(initOverrides) {
|
|
202
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
203
|
-
const requestOptions = yield this.listDepositsRequestOpts();
|
|
204
|
-
const response = yield this.request(requestOptions, initOverrides);
|
|
205
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => ListDeposits200ResponseFromJSON(jsonValue));
|
|
206
|
-
});
|
|
207
|
-
}
|
|
208
|
-
/**
|
|
209
|
-
* 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.
|
|
210
|
-
* List stablecoin deposits
|
|
211
|
-
*/
|
|
212
|
-
listDeposits(initOverrides) {
|
|
213
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
214
|
-
const response = yield this.listDepositsRaw(initOverrides);
|
|
215
|
-
return yield response.value();
|
|
216
|
-
});
|
|
217
|
-
}
|
|
218
74
|
/**
|
|
219
75
|
* Creates request options for updateSpendingLimit without sending the request
|
|
220
76
|
*/
|
|
@@ -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';
|
package/dist/esm/models/index.js
CHANGED
|
@@ -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';
|