@gpuai/sdk 0.3.3 → 0.3.5
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 +10 -0
- package/README.md +9 -2
- package/dist/apis/RegistryCredentialsApi.d.ts +66 -0
- package/dist/apis/RegistryCredentialsApi.js +173 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/apis/RegistryCredentialsApi.d.ts +66 -0
- package/dist/esm/apis/RegistryCredentialsApi.js +169 -0
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/CreateInstanceRequest.d.ts +32 -1
- package/dist/esm/models/CreateInstanceRequest.js +11 -0
- package/dist/esm/models/CreateInstanceRequestPortsInner.d.ts +52 -0
- package/dist/esm/models/CreateInstanceRequestPortsInner.js +56 -0
- package/dist/esm/models/CreateRegistryCredentialRequest.d.ts +50 -0
- package/dist/esm/models/CreateRegistryCredentialRequest.js +55 -0
- package/dist/esm/models/Instance.d.ts +6 -0
- package/dist/esm/models/Instance.js +2 -0
- package/dist/esm/models/ListRegistryCredentials200Response.d.ts +33 -0
- package/dist/esm/models/ListRegistryCredentials200Response.js +42 -0
- package/dist/esm/models/RegistryCredential.d.ts +56 -0
- package/dist/esm/models/RegistryCredential.js +49 -0
- package/dist/esm/models/index.d.ts +4 -0
- package/dist/esm/models/index.js +4 -0
- package/dist/models/CreateInstanceRequest.d.ts +32 -1
- package/dist/models/CreateInstanceRequest.js +11 -0
- package/dist/models/CreateInstanceRequestPortsInner.d.ts +52 -0
- package/dist/models/CreateInstanceRequestPortsInner.js +64 -0
- package/dist/models/CreateRegistryCredentialRequest.d.ts +50 -0
- package/dist/models/CreateRegistryCredentialRequest.js +62 -0
- package/dist/models/Instance.d.ts +6 -0
- package/dist/models/Instance.js +2 -0
- package/dist/models/ListRegistryCredentials200Response.d.ts +33 -0
- package/dist/models/ListRegistryCredentials200Response.js +49 -0
- package/dist/models/RegistryCredential.d.ts +56 -0
- package/dist/models/RegistryCredential.js +56 -0
- package/dist/models/index.d.ts +4 -0
- package/dist/models/index.js +4 -0
- package/docs/CreateInstanceRequest.md +10 -0
- package/docs/CreateInstanceRequestPortsInner.md +38 -0
- package/docs/CreateRegistryCredentialRequest.md +40 -0
- package/docs/Instance.md +2 -0
- package/docs/ListRegistryCredentials200Response.md +34 -0
- package/docs/RegistryCredential.md +43 -0
- package/docs/RegistryCredentialsApi.md +220 -0
- package/package.json +1 -1
- package/src/apis/RegistryCredentialsApi.ts +206 -0
- package/src/apis/index.ts +1 -0
- package/src/models/CreateInstanceRequest.ts +49 -1
- package/src/models/CreateInstanceRequestPortsInner.ts +94 -0
- package/src/models/CreateRegistryCredentialRequest.ts +93 -0
- package/src/models/Instance.ts +8 -0
- package/src/models/ListRegistryCredentials200Response.ts +73 -0
- package/src/models/RegistryCredential.ts +97 -0
- package/src/models/index.ts +4 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -17,6 +17,8 @@ docs/CreateFineTuningJobRequestGpuai.md
|
|
|
17
17
|
docs/CreateFineTuningJobRequestMethod.md
|
|
18
18
|
docs/CreateFineTuningJobRequestMethodLora.md
|
|
19
19
|
docs/CreateInstanceRequest.md
|
|
20
|
+
docs/CreateInstanceRequestPortsInner.md
|
|
21
|
+
docs/CreateRegistryCredentialRequest.md
|
|
20
22
|
docs/CreateSshKeyRequest.md
|
|
21
23
|
docs/CreateWebhookEndpointRequest.md
|
|
22
24
|
docs/CryptoDeposit.md
|
|
@@ -47,6 +49,7 @@ docs/InstancePage.md
|
|
|
47
49
|
docs/InstancesApi.md
|
|
48
50
|
docs/ListCommunityMachines200Response.md
|
|
49
51
|
docs/ListDeposits200Response.md
|
|
52
|
+
docs/ListRegistryCredentials200Response.md
|
|
50
53
|
docs/MetaApi.md
|
|
51
54
|
docs/Model.md
|
|
52
55
|
docs/ModelList.md
|
|
@@ -63,6 +66,8 @@ docs/PricingApi.md
|
|
|
63
66
|
docs/PricingPage.md
|
|
64
67
|
docs/Problem.md
|
|
65
68
|
docs/RegisterCommunityMachineRequest.md
|
|
69
|
+
docs/RegistryCredential.md
|
|
70
|
+
docs/RegistryCredentialsApi.md
|
|
66
71
|
docs/SSHKey.md
|
|
67
72
|
docs/SSHKeyPage.md
|
|
68
73
|
docs/SpendingLimit.md
|
|
@@ -98,6 +103,7 @@ src/apis/InstancesApi.ts
|
|
|
98
103
|
src/apis/MetaApi.ts
|
|
99
104
|
src/apis/OperationsApi.ts
|
|
100
105
|
src/apis/PricingApi.ts
|
|
106
|
+
src/apis/RegistryCredentialsApi.ts
|
|
101
107
|
src/apis/SshKeysApi.ts
|
|
102
108
|
src/apis/TemplatesApi.ts
|
|
103
109
|
src/apis/UsageApi.ts
|
|
@@ -118,6 +124,8 @@ src/models/CreateFineTuningJobRequestGpuai.ts
|
|
|
118
124
|
src/models/CreateFineTuningJobRequestMethod.ts
|
|
119
125
|
src/models/CreateFineTuningJobRequestMethodLora.ts
|
|
120
126
|
src/models/CreateInstanceRequest.ts
|
|
127
|
+
src/models/CreateInstanceRequestPortsInner.ts
|
|
128
|
+
src/models/CreateRegistryCredentialRequest.ts
|
|
121
129
|
src/models/CreateSshKeyRequest.ts
|
|
122
130
|
src/models/CreateWebhookEndpointRequest.ts
|
|
123
131
|
src/models/CryptoDeposit.ts
|
|
@@ -143,6 +151,7 @@ src/models/InstanceConnection.ts
|
|
|
143
151
|
src/models/InstancePage.ts
|
|
144
152
|
src/models/ListCommunityMachines200Response.ts
|
|
145
153
|
src/models/ListDeposits200Response.ts
|
|
154
|
+
src/models/ListRegistryCredentials200Response.ts
|
|
146
155
|
src/models/Model.ts
|
|
147
156
|
src/models/ModelList.ts
|
|
148
157
|
src/models/ModelParametersInner.ts
|
|
@@ -156,6 +165,7 @@ src/models/Pricing.ts
|
|
|
156
165
|
src/models/PricingPage.ts
|
|
157
166
|
src/models/Problem.ts
|
|
158
167
|
src/models/RegisterCommunityMachineRequest.ts
|
|
168
|
+
src/models/RegistryCredential.ts
|
|
159
169
|
src/models/SSHKey.ts
|
|
160
170
|
src/models/SSHKeyPage.ts
|
|
161
171
|
src/models/SpendingLimit.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @gpuai/sdk@0.3.
|
|
1
|
+
# @gpuai/sdk@0.3.5
|
|
2
2
|
|
|
3
3
|
A TypeScript SDK client for the api.gpu.ai API.
|
|
4
4
|
|
|
@@ -91,6 +91,9 @@ All URIs are relative to *https://api.gpu.ai/v1*
|
|
|
91
91
|
*MetaApi* | [**getOpenApiSpec**](docs/MetaApi.md#getopenapispec) | **GET** /openapi.json | OpenAPI 3.1 specification
|
|
92
92
|
*OperationsApi* | [**getOperation**](docs/OperationsApi.md#getoperation) | **GET** /operations/{id} | Get an async operation status
|
|
93
93
|
*PricingApi* | [**listPricing**](docs/PricingApi.md#listpricing) | **GET** /pricing | List pricing per GPU type + region (no auth required)
|
|
94
|
+
*RegistryCredentialsApi* | [**createRegistryCredential**](docs/RegistryCredentialsApi.md#createregistrycredentialoperation) | **POST** /registry-credentials | Store a registry credential
|
|
95
|
+
*RegistryCredentialsApi* | [**deleteRegistryCredential**](docs/RegistryCredentialsApi.md#deleteregistrycredential) | **DELETE** /registry-credentials/{id} | Delete a registry credential
|
|
96
|
+
*RegistryCredentialsApi* | [**listRegistryCredentials**](docs/RegistryCredentialsApi.md#listregistrycredentials) | **GET** /registry-credentials | List registry credentials
|
|
94
97
|
*SshKeysApi* | [**createSshKey**](docs/SshKeysApi.md#createsshkeyoperation) | **POST** /ssh-keys | Create an SSH key
|
|
95
98
|
*SshKeysApi* | [**deleteSshKey**](docs/SshKeysApi.md#deletesshkey) | **DELETE** /ssh-keys/{id} | Delete an SSH key (idempotent — 404 on already-gone per D-07)
|
|
96
99
|
*SshKeysApi* | [**getSshKey**](docs/SshKeysApi.md#getsshkey) | **GET** /ssh-keys/{id} | Get an SSH key
|
|
@@ -120,6 +123,8 @@ All URIs are relative to *https://api.gpu.ai/v1*
|
|
|
120
123
|
- [CreateFineTuningJobRequestMethod](docs/CreateFineTuningJobRequestMethod.md)
|
|
121
124
|
- [CreateFineTuningJobRequestMethodLora](docs/CreateFineTuningJobRequestMethodLora.md)
|
|
122
125
|
- [CreateInstanceRequest](docs/CreateInstanceRequest.md)
|
|
126
|
+
- [CreateInstanceRequestPortsInner](docs/CreateInstanceRequestPortsInner.md)
|
|
127
|
+
- [CreateRegistryCredentialRequest](docs/CreateRegistryCredentialRequest.md)
|
|
123
128
|
- [CreateSshKeyRequest](docs/CreateSshKeyRequest.md)
|
|
124
129
|
- [CreateWebhookEndpointRequest](docs/CreateWebhookEndpointRequest.md)
|
|
125
130
|
- [CryptoDeposit](docs/CryptoDeposit.md)
|
|
@@ -145,6 +150,7 @@ All URIs are relative to *https://api.gpu.ai/v1*
|
|
|
145
150
|
- [InstancePage](docs/InstancePage.md)
|
|
146
151
|
- [ListCommunityMachines200Response](docs/ListCommunityMachines200Response.md)
|
|
147
152
|
- [ListDeposits200Response](docs/ListDeposits200Response.md)
|
|
153
|
+
- [ListRegistryCredentials200Response](docs/ListRegistryCredentials200Response.md)
|
|
148
154
|
- [Model](docs/Model.md)
|
|
149
155
|
- [ModelList](docs/ModelList.md)
|
|
150
156
|
- [ModelParametersInner](docs/ModelParametersInner.md)
|
|
@@ -158,6 +164,7 @@ All URIs are relative to *https://api.gpu.ai/v1*
|
|
|
158
164
|
- [PricingPage](docs/PricingPage.md)
|
|
159
165
|
- [Problem](docs/Problem.md)
|
|
160
166
|
- [RegisterCommunityMachineRequest](docs/RegisterCommunityMachineRequest.md)
|
|
167
|
+
- [RegistryCredential](docs/RegistryCredential.md)
|
|
161
168
|
- [SSHKey](docs/SSHKey.md)
|
|
162
169
|
- [SSHKeyPage](docs/SSHKeyPage.md)
|
|
163
170
|
- [SpendingLimit](docs/SpendingLimit.md)
|
|
@@ -196,7 +203,7 @@ and is automatically generated by the
|
|
|
196
203
|
[OpenAPI Generator](https://openapi-generator.tech) project:
|
|
197
204
|
|
|
198
205
|
- API version: `1.0.0`
|
|
199
|
-
- Package version: `0.3.
|
|
206
|
+
- Package version: `0.3.5`
|
|
200
207
|
- Generator version: `7.24.0`
|
|
201
208
|
- Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
|
|
202
209
|
|
|
@@ -0,0 +1,66 @@
|
|
|
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 * as runtime from '../runtime';
|
|
13
|
+
import { type CreateRegistryCredentialRequest } from '../models/CreateRegistryCredentialRequest';
|
|
14
|
+
import { type ListRegistryCredentials200Response } from '../models/ListRegistryCredentials200Response';
|
|
15
|
+
import { type RegistryCredential } from '../models/RegistryCredential';
|
|
16
|
+
export interface CreateRegistryCredentialOperationRequest {
|
|
17
|
+
createRegistryCredentialRequest: CreateRegistryCredentialRequest;
|
|
18
|
+
}
|
|
19
|
+
export interface DeleteRegistryCredentialRequest {
|
|
20
|
+
id: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
export declare class RegistryCredentialsApi extends runtime.BaseAPI {
|
|
26
|
+
/**
|
|
27
|
+
* Creates request options for createRegistryCredential without sending the request
|
|
28
|
+
*/
|
|
29
|
+
createRegistryCredentialRequestOpts(requestParameters: CreateRegistryCredentialOperationRequest): Promise<runtime.RequestOpts>;
|
|
30
|
+
/**
|
|
31
|
+
* Stores a private-registry login for pulling private custom images. The password crosses the wire exactly once — here — and is encrypted at rest; no read ever returns it. Reference the returned id from `registry_credential_id` on instance creation. The credential\'s registry host must obey the same rules as image references (no localhost/private addresses); username and password must not contain whitespace. Duplicate names return 409 `name_taken`.
|
|
32
|
+
* Store a registry credential
|
|
33
|
+
*/
|
|
34
|
+
createRegistryCredentialRaw(requestParameters: CreateRegistryCredentialOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RegistryCredential>>;
|
|
35
|
+
/**
|
|
36
|
+
* Stores a private-registry login for pulling private custom images. The password crosses the wire exactly once — here — and is encrypted at rest; no read ever returns it. Reference the returned id from `registry_credential_id` on instance creation. The credential\'s registry host must obey the same rules as image references (no localhost/private addresses); username and password must not contain whitespace. Duplicate names return 409 `name_taken`.
|
|
37
|
+
* Store a registry credential
|
|
38
|
+
*/
|
|
39
|
+
createRegistryCredential(requestParameters: CreateRegistryCredentialOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RegistryCredential>;
|
|
40
|
+
/**
|
|
41
|
+
* Creates request options for deleteRegistryCredential without sending the request
|
|
42
|
+
*/
|
|
43
|
+
deleteRegistryCredentialRequestOpts(requestParameters: DeleteRegistryCredentialRequest): Promise<runtime.RequestOpts>;
|
|
44
|
+
/**
|
|
45
|
+
* Delete a registry credential
|
|
46
|
+
*/
|
|
47
|
+
deleteRegistryCredentialRaw(requestParameters: DeleteRegistryCredentialRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
48
|
+
/**
|
|
49
|
+
* Delete a registry credential
|
|
50
|
+
*/
|
|
51
|
+
deleteRegistryCredential(requestParameters: DeleteRegistryCredentialRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
52
|
+
/**
|
|
53
|
+
* Creates request options for listRegistryCredentials without sending the request
|
|
54
|
+
*/
|
|
55
|
+
listRegistryCredentialsRequestOpts(): Promise<runtime.RequestOpts>;
|
|
56
|
+
/**
|
|
57
|
+
* Lists the organization\'s stored private-registry logins for custom-image launches. Passwords are never returned by any read. 503 when the feature is not enabled on this environment.
|
|
58
|
+
* List registry credentials
|
|
59
|
+
*/
|
|
60
|
+
listRegistryCredentialsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListRegistryCredentials200Response>>;
|
|
61
|
+
/**
|
|
62
|
+
* Lists the organization\'s stored private-registry logins for custom-image launches. Passwords are never returned by any read. 503 when the feature is not enabled on this environment.
|
|
63
|
+
* List registry credentials
|
|
64
|
+
*/
|
|
65
|
+
listRegistryCredentials(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListRegistryCredentials200Response>;
|
|
66
|
+
}
|
|
@@ -0,0 +1,173 @@
|
|
|
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
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
16
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
17
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
19
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
20
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
21
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.RegistryCredentialsApi = void 0;
|
|
26
|
+
const runtime = require("../runtime");
|
|
27
|
+
const CreateRegistryCredentialRequest_1 = require("../models/CreateRegistryCredentialRequest");
|
|
28
|
+
const ListRegistryCredentials200Response_1 = require("../models/ListRegistryCredentials200Response");
|
|
29
|
+
const RegistryCredential_1 = require("../models/RegistryCredential");
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
*/
|
|
33
|
+
class RegistryCredentialsApi extends runtime.BaseAPI {
|
|
34
|
+
/**
|
|
35
|
+
* Creates request options for createRegistryCredential without sending the request
|
|
36
|
+
*/
|
|
37
|
+
createRegistryCredentialRequestOpts(requestParameters) {
|
|
38
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
+
if (requestParameters['createRegistryCredentialRequest'] == null) {
|
|
40
|
+
throw new runtime.RequiredError('createRegistryCredentialRequest', 'Required parameter "createRegistryCredentialRequest" was null or undefined when calling createRegistryCredential().');
|
|
41
|
+
}
|
|
42
|
+
const queryParameters = {};
|
|
43
|
+
const headerParameters = {};
|
|
44
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
45
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
46
|
+
const token = this.configuration.accessToken;
|
|
47
|
+
const tokenString = yield token("bearerAuth", []);
|
|
48
|
+
if (tokenString) {
|
|
49
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
let urlPath = `/registry-credentials`;
|
|
53
|
+
return {
|
|
54
|
+
path: urlPath,
|
|
55
|
+
method: 'POST',
|
|
56
|
+
headers: headerParameters,
|
|
57
|
+
query: queryParameters,
|
|
58
|
+
body: (0, CreateRegistryCredentialRequest_1.CreateRegistryCredentialRequestToJSON)(requestParameters['createRegistryCredentialRequest']),
|
|
59
|
+
};
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Stores a private-registry login for pulling private custom images. The password crosses the wire exactly once — here — and is encrypted at rest; no read ever returns it. Reference the returned id from `registry_credential_id` on instance creation. The credential\'s registry host must obey the same rules as image references (no localhost/private addresses); username and password must not contain whitespace. Duplicate names return 409 `name_taken`.
|
|
64
|
+
* Store a registry credential
|
|
65
|
+
*/
|
|
66
|
+
createRegistryCredentialRaw(requestParameters, initOverrides) {
|
|
67
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
68
|
+
const requestOptions = yield this.createRegistryCredentialRequestOpts(requestParameters);
|
|
69
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
70
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, RegistryCredential_1.RegistryCredentialFromJSON)(jsonValue));
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Stores a private-registry login for pulling private custom images. The password crosses the wire exactly once — here — and is encrypted at rest; no read ever returns it. Reference the returned id from `registry_credential_id` on instance creation. The credential\'s registry host must obey the same rules as image references (no localhost/private addresses); username and password must not contain whitespace. Duplicate names return 409 `name_taken`.
|
|
75
|
+
* Store a registry credential
|
|
76
|
+
*/
|
|
77
|
+
createRegistryCredential(requestParameters, initOverrides) {
|
|
78
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
79
|
+
const response = yield this.createRegistryCredentialRaw(requestParameters, initOverrides);
|
|
80
|
+
return yield response.value();
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Creates request options for deleteRegistryCredential without sending the request
|
|
85
|
+
*/
|
|
86
|
+
deleteRegistryCredentialRequestOpts(requestParameters) {
|
|
87
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
88
|
+
if (requestParameters['id'] == null) {
|
|
89
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling deleteRegistryCredential().');
|
|
90
|
+
}
|
|
91
|
+
const queryParameters = {};
|
|
92
|
+
const headerParameters = {};
|
|
93
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
94
|
+
const token = this.configuration.accessToken;
|
|
95
|
+
const tokenString = yield token("bearerAuth", []);
|
|
96
|
+
if (tokenString) {
|
|
97
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
let urlPath = `/registry-credentials/{id}`;
|
|
101
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
102
|
+
return {
|
|
103
|
+
path: urlPath,
|
|
104
|
+
method: 'DELETE',
|
|
105
|
+
headers: headerParameters,
|
|
106
|
+
query: queryParameters,
|
|
107
|
+
};
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Delete a registry credential
|
|
112
|
+
*/
|
|
113
|
+
deleteRegistryCredentialRaw(requestParameters, initOverrides) {
|
|
114
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
115
|
+
const requestOptions = yield this.deleteRegistryCredentialRequestOpts(requestParameters);
|
|
116
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
117
|
+
return new runtime.VoidApiResponse(response);
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Delete a registry credential
|
|
122
|
+
*/
|
|
123
|
+
deleteRegistryCredential(requestParameters, initOverrides) {
|
|
124
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
125
|
+
yield this.deleteRegistryCredentialRaw(requestParameters, initOverrides);
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Creates request options for listRegistryCredentials without sending the request
|
|
130
|
+
*/
|
|
131
|
+
listRegistryCredentialsRequestOpts() {
|
|
132
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
133
|
+
const queryParameters = {};
|
|
134
|
+
const headerParameters = {};
|
|
135
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
136
|
+
const token = this.configuration.accessToken;
|
|
137
|
+
const tokenString = yield token("bearerAuth", []);
|
|
138
|
+
if (tokenString) {
|
|
139
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
let urlPath = `/registry-credentials`;
|
|
143
|
+
return {
|
|
144
|
+
path: urlPath,
|
|
145
|
+
method: 'GET',
|
|
146
|
+
headers: headerParameters,
|
|
147
|
+
query: queryParameters,
|
|
148
|
+
};
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Lists the organization\'s stored private-registry logins for custom-image launches. Passwords are never returned by any read. 503 when the feature is not enabled on this environment.
|
|
153
|
+
* List registry credentials
|
|
154
|
+
*/
|
|
155
|
+
listRegistryCredentialsRaw(initOverrides) {
|
|
156
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
157
|
+
const requestOptions = yield this.listRegistryCredentialsRequestOpts();
|
|
158
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
159
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, ListRegistryCredentials200Response_1.ListRegistryCredentials200ResponseFromJSON)(jsonValue));
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Lists the organization\'s stored private-registry logins for custom-image launches. Passwords are never returned by any read. 503 when the feature is not enabled on this environment.
|
|
164
|
+
* List registry credentials
|
|
165
|
+
*/
|
|
166
|
+
listRegistryCredentials(initOverrides) {
|
|
167
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
168
|
+
const response = yield this.listRegistryCredentialsRaw(initOverrides);
|
|
169
|
+
return yield response.value();
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
exports.RegistryCredentialsApi = RegistryCredentialsApi;
|
package/dist/apis/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export * from './InstancesApi';
|
|
|
8
8
|
export * from './MetaApi';
|
|
9
9
|
export * from './OperationsApi';
|
|
10
10
|
export * from './PricingApi';
|
|
11
|
+
export * from './RegistryCredentialsApi';
|
|
11
12
|
export * from './SshKeysApi';
|
|
12
13
|
export * from './TemplatesApi';
|
|
13
14
|
export * from './UsageApi';
|
package/dist/apis/index.js
CHANGED
|
@@ -26,6 +26,7 @@ __exportStar(require("./InstancesApi"), exports);
|
|
|
26
26
|
__exportStar(require("./MetaApi"), exports);
|
|
27
27
|
__exportStar(require("./OperationsApi"), exports);
|
|
28
28
|
__exportStar(require("./PricingApi"), exports);
|
|
29
|
+
__exportStar(require("./RegistryCredentialsApi"), exports);
|
|
29
30
|
__exportStar(require("./SshKeysApi"), exports);
|
|
30
31
|
__exportStar(require("./TemplatesApi"), exports);
|
|
31
32
|
__exportStar(require("./UsageApi"), exports);
|
|
@@ -0,0 +1,66 @@
|
|
|
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 * as runtime from '../runtime';
|
|
13
|
+
import { type CreateRegistryCredentialRequest } from '../models/CreateRegistryCredentialRequest';
|
|
14
|
+
import { type ListRegistryCredentials200Response } from '../models/ListRegistryCredentials200Response';
|
|
15
|
+
import { type RegistryCredential } from '../models/RegistryCredential';
|
|
16
|
+
export interface CreateRegistryCredentialOperationRequest {
|
|
17
|
+
createRegistryCredentialRequest: CreateRegistryCredentialRequest;
|
|
18
|
+
}
|
|
19
|
+
export interface DeleteRegistryCredentialRequest {
|
|
20
|
+
id: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
export declare class RegistryCredentialsApi extends runtime.BaseAPI {
|
|
26
|
+
/**
|
|
27
|
+
* Creates request options for createRegistryCredential without sending the request
|
|
28
|
+
*/
|
|
29
|
+
createRegistryCredentialRequestOpts(requestParameters: CreateRegistryCredentialOperationRequest): Promise<runtime.RequestOpts>;
|
|
30
|
+
/**
|
|
31
|
+
* Stores a private-registry login for pulling private custom images. The password crosses the wire exactly once — here — and is encrypted at rest; no read ever returns it. Reference the returned id from `registry_credential_id` on instance creation. The credential\'s registry host must obey the same rules as image references (no localhost/private addresses); username and password must not contain whitespace. Duplicate names return 409 `name_taken`.
|
|
32
|
+
* Store a registry credential
|
|
33
|
+
*/
|
|
34
|
+
createRegistryCredentialRaw(requestParameters: CreateRegistryCredentialOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RegistryCredential>>;
|
|
35
|
+
/**
|
|
36
|
+
* Stores a private-registry login for pulling private custom images. The password crosses the wire exactly once — here — and is encrypted at rest; no read ever returns it. Reference the returned id from `registry_credential_id` on instance creation. The credential\'s registry host must obey the same rules as image references (no localhost/private addresses); username and password must not contain whitespace. Duplicate names return 409 `name_taken`.
|
|
37
|
+
* Store a registry credential
|
|
38
|
+
*/
|
|
39
|
+
createRegistryCredential(requestParameters: CreateRegistryCredentialOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RegistryCredential>;
|
|
40
|
+
/**
|
|
41
|
+
* Creates request options for deleteRegistryCredential without sending the request
|
|
42
|
+
*/
|
|
43
|
+
deleteRegistryCredentialRequestOpts(requestParameters: DeleteRegistryCredentialRequest): Promise<runtime.RequestOpts>;
|
|
44
|
+
/**
|
|
45
|
+
* Delete a registry credential
|
|
46
|
+
*/
|
|
47
|
+
deleteRegistryCredentialRaw(requestParameters: DeleteRegistryCredentialRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
48
|
+
/**
|
|
49
|
+
* Delete a registry credential
|
|
50
|
+
*/
|
|
51
|
+
deleteRegistryCredential(requestParameters: DeleteRegistryCredentialRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
52
|
+
/**
|
|
53
|
+
* Creates request options for listRegistryCredentials without sending the request
|
|
54
|
+
*/
|
|
55
|
+
listRegistryCredentialsRequestOpts(): Promise<runtime.RequestOpts>;
|
|
56
|
+
/**
|
|
57
|
+
* Lists the organization\'s stored private-registry logins for custom-image launches. Passwords are never returned by any read. 503 when the feature is not enabled on this environment.
|
|
58
|
+
* List registry credentials
|
|
59
|
+
*/
|
|
60
|
+
listRegistryCredentialsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListRegistryCredentials200Response>>;
|
|
61
|
+
/**
|
|
62
|
+
* Lists the organization\'s stored private-registry logins for custom-image launches. Passwords are never returned by any read. 503 when the feature is not enabled on this environment.
|
|
63
|
+
* List registry credentials
|
|
64
|
+
*/
|
|
65
|
+
listRegistryCredentials(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListRegistryCredentials200Response>;
|
|
66
|
+
}
|
|
@@ -0,0 +1,169 @@
|
|
|
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
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
import * as runtime from '../runtime';
|
|
24
|
+
import { CreateRegistryCredentialRequestToJSON, } from '../models/CreateRegistryCredentialRequest';
|
|
25
|
+
import { ListRegistryCredentials200ResponseFromJSON, } from '../models/ListRegistryCredentials200Response';
|
|
26
|
+
import { RegistryCredentialFromJSON, } from '../models/RegistryCredential';
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
*/
|
|
30
|
+
export class RegistryCredentialsApi extends runtime.BaseAPI {
|
|
31
|
+
/**
|
|
32
|
+
* Creates request options for createRegistryCredential without sending the request
|
|
33
|
+
*/
|
|
34
|
+
createRegistryCredentialRequestOpts(requestParameters) {
|
|
35
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
+
if (requestParameters['createRegistryCredentialRequest'] == null) {
|
|
37
|
+
throw new runtime.RequiredError('createRegistryCredentialRequest', 'Required parameter "createRegistryCredentialRequest" was null or undefined when calling createRegistryCredential().');
|
|
38
|
+
}
|
|
39
|
+
const queryParameters = {};
|
|
40
|
+
const headerParameters = {};
|
|
41
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
42
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
43
|
+
const token = this.configuration.accessToken;
|
|
44
|
+
const tokenString = yield token("bearerAuth", []);
|
|
45
|
+
if (tokenString) {
|
|
46
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
let urlPath = `/registry-credentials`;
|
|
50
|
+
return {
|
|
51
|
+
path: urlPath,
|
|
52
|
+
method: 'POST',
|
|
53
|
+
headers: headerParameters,
|
|
54
|
+
query: queryParameters,
|
|
55
|
+
body: CreateRegistryCredentialRequestToJSON(requestParameters['createRegistryCredentialRequest']),
|
|
56
|
+
};
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Stores a private-registry login for pulling private custom images. The password crosses the wire exactly once — here — and is encrypted at rest; no read ever returns it. Reference the returned id from `registry_credential_id` on instance creation. The credential\'s registry host must obey the same rules as image references (no localhost/private addresses); username and password must not contain whitespace. Duplicate names return 409 `name_taken`.
|
|
61
|
+
* Store a registry credential
|
|
62
|
+
*/
|
|
63
|
+
createRegistryCredentialRaw(requestParameters, initOverrides) {
|
|
64
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
65
|
+
const requestOptions = yield this.createRegistryCredentialRequestOpts(requestParameters);
|
|
66
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
67
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => RegistryCredentialFromJSON(jsonValue));
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Stores a private-registry login for pulling private custom images. The password crosses the wire exactly once — here — and is encrypted at rest; no read ever returns it. Reference the returned id from `registry_credential_id` on instance creation. The credential\'s registry host must obey the same rules as image references (no localhost/private addresses); username and password must not contain whitespace. Duplicate names return 409 `name_taken`.
|
|
72
|
+
* Store a registry credential
|
|
73
|
+
*/
|
|
74
|
+
createRegistryCredential(requestParameters, initOverrides) {
|
|
75
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
76
|
+
const response = yield this.createRegistryCredentialRaw(requestParameters, initOverrides);
|
|
77
|
+
return yield response.value();
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Creates request options for deleteRegistryCredential without sending the request
|
|
82
|
+
*/
|
|
83
|
+
deleteRegistryCredentialRequestOpts(requestParameters) {
|
|
84
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
85
|
+
if (requestParameters['id'] == null) {
|
|
86
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling deleteRegistryCredential().');
|
|
87
|
+
}
|
|
88
|
+
const queryParameters = {};
|
|
89
|
+
const headerParameters = {};
|
|
90
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
91
|
+
const token = this.configuration.accessToken;
|
|
92
|
+
const tokenString = yield token("bearerAuth", []);
|
|
93
|
+
if (tokenString) {
|
|
94
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
let urlPath = `/registry-credentials/{id}`;
|
|
98
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
99
|
+
return {
|
|
100
|
+
path: urlPath,
|
|
101
|
+
method: 'DELETE',
|
|
102
|
+
headers: headerParameters,
|
|
103
|
+
query: queryParameters,
|
|
104
|
+
};
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Delete a registry credential
|
|
109
|
+
*/
|
|
110
|
+
deleteRegistryCredentialRaw(requestParameters, initOverrides) {
|
|
111
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
112
|
+
const requestOptions = yield this.deleteRegistryCredentialRequestOpts(requestParameters);
|
|
113
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
114
|
+
return new runtime.VoidApiResponse(response);
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Delete a registry credential
|
|
119
|
+
*/
|
|
120
|
+
deleteRegistryCredential(requestParameters, initOverrides) {
|
|
121
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
122
|
+
yield this.deleteRegistryCredentialRaw(requestParameters, initOverrides);
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Creates request options for listRegistryCredentials without sending the request
|
|
127
|
+
*/
|
|
128
|
+
listRegistryCredentialsRequestOpts() {
|
|
129
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
130
|
+
const queryParameters = {};
|
|
131
|
+
const headerParameters = {};
|
|
132
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
133
|
+
const token = this.configuration.accessToken;
|
|
134
|
+
const tokenString = yield token("bearerAuth", []);
|
|
135
|
+
if (tokenString) {
|
|
136
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
let urlPath = `/registry-credentials`;
|
|
140
|
+
return {
|
|
141
|
+
path: urlPath,
|
|
142
|
+
method: 'GET',
|
|
143
|
+
headers: headerParameters,
|
|
144
|
+
query: queryParameters,
|
|
145
|
+
};
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Lists the organization\'s stored private-registry logins for custom-image launches. Passwords are never returned by any read. 503 when the feature is not enabled on this environment.
|
|
150
|
+
* List registry credentials
|
|
151
|
+
*/
|
|
152
|
+
listRegistryCredentialsRaw(initOverrides) {
|
|
153
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
154
|
+
const requestOptions = yield this.listRegistryCredentialsRequestOpts();
|
|
155
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
156
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ListRegistryCredentials200ResponseFromJSON(jsonValue));
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Lists the organization\'s stored private-registry logins for custom-image launches. Passwords are never returned by any read. 503 when the feature is not enabled on this environment.
|
|
161
|
+
* List registry credentials
|
|
162
|
+
*/
|
|
163
|
+
listRegistryCredentials(initOverrides) {
|
|
164
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
165
|
+
const response = yield this.listRegistryCredentialsRaw(initOverrides);
|
|
166
|
+
return yield response.value();
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
}
|
package/dist/esm/apis/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export * from './InstancesApi';
|
|
|
8
8
|
export * from './MetaApi';
|
|
9
9
|
export * from './OperationsApi';
|
|
10
10
|
export * from './PricingApi';
|
|
11
|
+
export * from './RegistryCredentialsApi';
|
|
11
12
|
export * from './SshKeysApi';
|
|
12
13
|
export * from './TemplatesApi';
|
|
13
14
|
export * from './UsageApi';
|
package/dist/esm/apis/index.js
CHANGED
|
@@ -10,6 +10,7 @@ export * from './InstancesApi';
|
|
|
10
10
|
export * from './MetaApi';
|
|
11
11
|
export * from './OperationsApi';
|
|
12
12
|
export * from './PricingApi';
|
|
13
|
+
export * from './RegistryCredentialsApi';
|
|
13
14
|
export * from './SshKeysApi';
|
|
14
15
|
export * from './TemplatesApi';
|
|
15
16
|
export * from './UsageApi';
|