@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
|
@@ -0,0 +1,52 @@
|
|
|
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
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface CreateInstanceRequestPortsInner
|
|
16
|
+
*/
|
|
17
|
+
export interface CreateInstanceRequestPortsInner {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof CreateInstanceRequestPortsInner
|
|
22
|
+
*/
|
|
23
|
+
port: number;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {CreateInstanceRequestPortsInnerProtocolEnum}
|
|
27
|
+
* @memberof CreateInstanceRequestPortsInner
|
|
28
|
+
*/
|
|
29
|
+
protocol: CreateInstanceRequestPortsInnerProtocolEnum;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {boolean}
|
|
33
|
+
* @memberof CreateInstanceRequestPortsInner
|
|
34
|
+
*/
|
|
35
|
+
primary?: boolean;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* @export
|
|
39
|
+
*/
|
|
40
|
+
export declare const CreateInstanceRequestPortsInnerProtocolEnum: {
|
|
41
|
+
readonly Http: "http";
|
|
42
|
+
readonly Tcp: "tcp";
|
|
43
|
+
};
|
|
44
|
+
export type CreateInstanceRequestPortsInnerProtocolEnum = typeof CreateInstanceRequestPortsInnerProtocolEnum[keyof typeof CreateInstanceRequestPortsInnerProtocolEnum];
|
|
45
|
+
/**
|
|
46
|
+
* Check if a given object implements the CreateInstanceRequestPortsInner interface.
|
|
47
|
+
*/
|
|
48
|
+
export declare function instanceOfCreateInstanceRequestPortsInner(value: object): value is CreateInstanceRequestPortsInner;
|
|
49
|
+
export declare function CreateInstanceRequestPortsInnerFromJSON(json: any): CreateInstanceRequestPortsInner;
|
|
50
|
+
export declare function CreateInstanceRequestPortsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateInstanceRequestPortsInner;
|
|
51
|
+
export declare function CreateInstanceRequestPortsInnerToJSON(json: any): CreateInstanceRequestPortsInner;
|
|
52
|
+
export declare function CreateInstanceRequestPortsInnerToJSONTyped(value?: CreateInstanceRequestPortsInner | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,64 @@
|
|
|
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.CreateInstanceRequestPortsInnerProtocolEnum = void 0;
|
|
17
|
+
exports.instanceOfCreateInstanceRequestPortsInner = instanceOfCreateInstanceRequestPortsInner;
|
|
18
|
+
exports.CreateInstanceRequestPortsInnerFromJSON = CreateInstanceRequestPortsInnerFromJSON;
|
|
19
|
+
exports.CreateInstanceRequestPortsInnerFromJSONTyped = CreateInstanceRequestPortsInnerFromJSONTyped;
|
|
20
|
+
exports.CreateInstanceRequestPortsInnerToJSON = CreateInstanceRequestPortsInnerToJSON;
|
|
21
|
+
exports.CreateInstanceRequestPortsInnerToJSONTyped = CreateInstanceRequestPortsInnerToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
exports.CreateInstanceRequestPortsInnerProtocolEnum = {
|
|
26
|
+
Http: 'http',
|
|
27
|
+
Tcp: 'tcp'
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Check if a given object implements the CreateInstanceRequestPortsInner interface.
|
|
31
|
+
*/
|
|
32
|
+
function instanceOfCreateInstanceRequestPortsInner(value) {
|
|
33
|
+
if (!('port' in value) || value['port'] === undefined)
|
|
34
|
+
return false;
|
|
35
|
+
if (!('protocol' in value) || value['protocol'] === undefined)
|
|
36
|
+
return false;
|
|
37
|
+
return true;
|
|
38
|
+
}
|
|
39
|
+
function CreateInstanceRequestPortsInnerFromJSON(json) {
|
|
40
|
+
return CreateInstanceRequestPortsInnerFromJSONTyped(json, false);
|
|
41
|
+
}
|
|
42
|
+
function CreateInstanceRequestPortsInnerFromJSONTyped(json, ignoreDiscriminator) {
|
|
43
|
+
if (json == null) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
'port': json['port'],
|
|
48
|
+
'protocol': json['protocol'],
|
|
49
|
+
'primary': json['primary'] == null ? undefined : json['primary'],
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
function CreateInstanceRequestPortsInnerToJSON(json) {
|
|
53
|
+
return CreateInstanceRequestPortsInnerToJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
function CreateInstanceRequestPortsInnerToJSONTyped(value, ignoreDiscriminator = false) {
|
|
56
|
+
if (value == null) {
|
|
57
|
+
return value;
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
'port': value['port'],
|
|
61
|
+
'protocol': value['protocol'],
|
|
62
|
+
'primary': value['primary'],
|
|
63
|
+
};
|
|
64
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
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
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface CreateRegistryCredentialRequest
|
|
16
|
+
*/
|
|
17
|
+
export interface CreateRegistryCredentialRequest {
|
|
18
|
+
/**
|
|
19
|
+
* Org-unique handle (at most 64 characters).
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof CreateRegistryCredentialRequest
|
|
22
|
+
*/
|
|
23
|
+
name: string;
|
|
24
|
+
/**
|
|
25
|
+
* Registry host the login belongs to.
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof CreateRegistryCredentialRequest
|
|
28
|
+
*/
|
|
29
|
+
registry: string;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof CreateRegistryCredentialRequest
|
|
34
|
+
*/
|
|
35
|
+
username: string;
|
|
36
|
+
/**
|
|
37
|
+
* Registry password or access token. Write-only.
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof CreateRegistryCredentialRequest
|
|
40
|
+
*/
|
|
41
|
+
password: string;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Check if a given object implements the CreateRegistryCredentialRequest interface.
|
|
45
|
+
*/
|
|
46
|
+
export declare function instanceOfCreateRegistryCredentialRequest(value: object): value is CreateRegistryCredentialRequest;
|
|
47
|
+
export declare function CreateRegistryCredentialRequestFromJSON(json: any): CreateRegistryCredentialRequest;
|
|
48
|
+
export declare function CreateRegistryCredentialRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateRegistryCredentialRequest;
|
|
49
|
+
export declare function CreateRegistryCredentialRequestToJSON(json: any): CreateRegistryCredentialRequest;
|
|
50
|
+
export declare function CreateRegistryCredentialRequestToJSONTyped(value?: CreateRegistryCredentialRequest | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,62 @@
|
|
|
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.instanceOfCreateRegistryCredentialRequest = instanceOfCreateRegistryCredentialRequest;
|
|
17
|
+
exports.CreateRegistryCredentialRequestFromJSON = CreateRegistryCredentialRequestFromJSON;
|
|
18
|
+
exports.CreateRegistryCredentialRequestFromJSONTyped = CreateRegistryCredentialRequestFromJSONTyped;
|
|
19
|
+
exports.CreateRegistryCredentialRequestToJSON = CreateRegistryCredentialRequestToJSON;
|
|
20
|
+
exports.CreateRegistryCredentialRequestToJSONTyped = CreateRegistryCredentialRequestToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the CreateRegistryCredentialRequest interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfCreateRegistryCredentialRequest(value) {
|
|
25
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('registry' in value) || value['registry'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('username' in value) || value['username'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if (!('password' in value) || value['password'] === undefined)
|
|
32
|
+
return false;
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
function CreateRegistryCredentialRequestFromJSON(json) {
|
|
36
|
+
return CreateRegistryCredentialRequestFromJSONTyped(json, false);
|
|
37
|
+
}
|
|
38
|
+
function CreateRegistryCredentialRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
39
|
+
if (json == null) {
|
|
40
|
+
return json;
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
'name': json['name'],
|
|
44
|
+
'registry': json['registry'],
|
|
45
|
+
'username': json['username'],
|
|
46
|
+
'password': json['password'],
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
function CreateRegistryCredentialRequestToJSON(json) {
|
|
50
|
+
return CreateRegistryCredentialRequestToJSONTyped(json, false);
|
|
51
|
+
}
|
|
52
|
+
function CreateRegistryCredentialRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
53
|
+
if (value == null) {
|
|
54
|
+
return value;
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
'name': value['name'],
|
|
58
|
+
'registry': value['registry'],
|
|
59
|
+
'username': value['username'],
|
|
60
|
+
'password': value['password'],
|
|
61
|
+
};
|
|
62
|
+
}
|
|
@@ -76,6 +76,12 @@ export interface Instance {
|
|
|
76
76
|
* @memberof Instance
|
|
77
77
|
*/
|
|
78
78
|
diskGb?: number;
|
|
79
|
+
/**
|
|
80
|
+
* The customer-supplied container image this instance was launched from, digest-pinned at verification time (e.g. `ghcr.io/acme/trainer:v1@sha256:…`). Present only on custom-image launches; template and certified launches never expose their images here.
|
|
81
|
+
* @type {string}
|
|
82
|
+
* @memberof Instance
|
|
83
|
+
*/
|
|
84
|
+
image?: string;
|
|
79
85
|
/**
|
|
80
86
|
* Why the instance is in the error state, e.g. "provisioning stalled: the instance started but never became reachable". Present only on errored instances.
|
|
81
87
|
* @type {string}
|
package/dist/models/Instance.js
CHANGED
|
@@ -80,6 +80,7 @@ function InstanceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
80
80
|
'pricePerHour': json['price_per_hour'],
|
|
81
81
|
'connection': json['connection'] == null ? undefined : (0, InstanceConnection_1.InstanceConnectionFromJSON)(json['connection']),
|
|
82
82
|
'diskGb': json['disk_gb'] == null ? undefined : json['disk_gb'],
|
|
83
|
+
'image': json['image'] == null ? undefined : json['image'],
|
|
83
84
|
'statusReason': json['status_reason'] == null ? undefined : json['status_reason'],
|
|
84
85
|
'createdAt': (new Date(json['created_at'])),
|
|
85
86
|
'readyAt': json['ready_at'] == null ? undefined : (new Date(json['ready_at'])),
|
|
@@ -106,6 +107,7 @@ function InstanceToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
106
107
|
'price_per_hour': value['pricePerHour'],
|
|
107
108
|
'connection': (0, InstanceConnection_1.InstanceConnectionToJSON)(value['connection']),
|
|
108
109
|
'disk_gb': value['diskGb'],
|
|
110
|
+
'image': value['image'],
|
|
109
111
|
'status_reason': value['statusReason'],
|
|
110
112
|
'created_at': value['createdAt'].toISOString(),
|
|
111
113
|
'ready_at': value['readyAt'] == null ? value['readyAt'] : value['readyAt'].toISOString(),
|
|
@@ -0,0 +1,33 @@
|
|
|
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 { RegistryCredential } from './RegistryCredential';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface ListRegistryCredentials200Response
|
|
17
|
+
*/
|
|
18
|
+
export interface ListRegistryCredentials200Response {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {Array<RegistryCredential>}
|
|
22
|
+
* @memberof ListRegistryCredentials200Response
|
|
23
|
+
*/
|
|
24
|
+
data?: Array<RegistryCredential>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Check if a given object implements the ListRegistryCredentials200Response interface.
|
|
28
|
+
*/
|
|
29
|
+
export declare function instanceOfListRegistryCredentials200Response(value: object): value is ListRegistryCredentials200Response;
|
|
30
|
+
export declare function ListRegistryCredentials200ResponseFromJSON(json: any): ListRegistryCredentials200Response;
|
|
31
|
+
export declare function ListRegistryCredentials200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListRegistryCredentials200Response;
|
|
32
|
+
export declare function ListRegistryCredentials200ResponseToJSON(json: any): ListRegistryCredentials200Response;
|
|
33
|
+
export declare function ListRegistryCredentials200ResponseToJSONTyped(value?: ListRegistryCredentials200Response | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,49 @@
|
|
|
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.instanceOfListRegistryCredentials200Response = instanceOfListRegistryCredentials200Response;
|
|
17
|
+
exports.ListRegistryCredentials200ResponseFromJSON = ListRegistryCredentials200ResponseFromJSON;
|
|
18
|
+
exports.ListRegistryCredentials200ResponseFromJSONTyped = ListRegistryCredentials200ResponseFromJSONTyped;
|
|
19
|
+
exports.ListRegistryCredentials200ResponseToJSON = ListRegistryCredentials200ResponseToJSON;
|
|
20
|
+
exports.ListRegistryCredentials200ResponseToJSONTyped = ListRegistryCredentials200ResponseToJSONTyped;
|
|
21
|
+
const RegistryCredential_1 = require("./RegistryCredential");
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the ListRegistryCredentials200Response interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfListRegistryCredentials200Response(value) {
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
function ListRegistryCredentials200ResponseFromJSON(json) {
|
|
29
|
+
return ListRegistryCredentials200ResponseFromJSONTyped(json, false);
|
|
30
|
+
}
|
|
31
|
+
function ListRegistryCredentials200ResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
32
|
+
if (json == null) {
|
|
33
|
+
return json;
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
'data': json['data'] == null ? undefined : (json['data'].map(RegistryCredential_1.RegistryCredentialFromJSON)),
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function ListRegistryCredentials200ResponseToJSON(json) {
|
|
40
|
+
return ListRegistryCredentials200ResponseToJSONTyped(json, false);
|
|
41
|
+
}
|
|
42
|
+
function ListRegistryCredentials200ResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
43
|
+
if (value == null) {
|
|
44
|
+
return value;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
'data': value['data'] == null ? undefined : (value['data'].map(RegistryCredential_1.RegistryCredentialToJSON)),
|
|
48
|
+
};
|
|
49
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
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
|
+
/**
|
|
13
|
+
* A stored private-registry login (metadata only — the password is write-only and encrypted at rest).
|
|
14
|
+
* @export
|
|
15
|
+
* @interface RegistryCredential
|
|
16
|
+
*/
|
|
17
|
+
export interface RegistryCredential {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof RegistryCredential
|
|
22
|
+
*/
|
|
23
|
+
id?: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof RegistryCredential
|
|
28
|
+
*/
|
|
29
|
+
name?: string;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof RegistryCredential
|
|
34
|
+
*/
|
|
35
|
+
registry?: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof RegistryCredential
|
|
40
|
+
*/
|
|
41
|
+
username?: string;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {Date}
|
|
45
|
+
* @memberof RegistryCredential
|
|
46
|
+
*/
|
|
47
|
+
createdAt?: Date;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Check if a given object implements the RegistryCredential interface.
|
|
51
|
+
*/
|
|
52
|
+
export declare function instanceOfRegistryCredential(value: object): value is RegistryCredential;
|
|
53
|
+
export declare function RegistryCredentialFromJSON(json: any): RegistryCredential;
|
|
54
|
+
export declare function RegistryCredentialFromJSONTyped(json: any, ignoreDiscriminator: boolean): RegistryCredential;
|
|
55
|
+
export declare function RegistryCredentialToJSON(json: any): RegistryCredential;
|
|
56
|
+
export declare function RegistryCredentialToJSONTyped(value?: RegistryCredential | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,56 @@
|
|
|
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.instanceOfRegistryCredential = instanceOfRegistryCredential;
|
|
17
|
+
exports.RegistryCredentialFromJSON = RegistryCredentialFromJSON;
|
|
18
|
+
exports.RegistryCredentialFromJSONTyped = RegistryCredentialFromJSONTyped;
|
|
19
|
+
exports.RegistryCredentialToJSON = RegistryCredentialToJSON;
|
|
20
|
+
exports.RegistryCredentialToJSONTyped = RegistryCredentialToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the RegistryCredential interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfRegistryCredential(value) {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
function RegistryCredentialFromJSON(json) {
|
|
28
|
+
return RegistryCredentialFromJSONTyped(json, false);
|
|
29
|
+
}
|
|
30
|
+
function RegistryCredentialFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if (json == null) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
36
|
+
'name': json['name'] == null ? undefined : json['name'],
|
|
37
|
+
'registry': json['registry'] == null ? undefined : json['registry'],
|
|
38
|
+
'username': json['username'] == null ? undefined : json['username'],
|
|
39
|
+
'createdAt': json['created_at'] == null ? undefined : (new Date(json['created_at'])),
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
function RegistryCredentialToJSON(json) {
|
|
43
|
+
return RegistryCredentialToJSONTyped(json, false);
|
|
44
|
+
}
|
|
45
|
+
function RegistryCredentialToJSONTyped(value, ignoreDiscriminator = false) {
|
|
46
|
+
if (value == null) {
|
|
47
|
+
return value;
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
'id': value['id'],
|
|
51
|
+
'name': value['name'],
|
|
52
|
+
'registry': value['registry'],
|
|
53
|
+
'username': value['username'],
|
|
54
|
+
'created_at': value['createdAt'] == null ? value['createdAt'] : value['createdAt'].toISOString(),
|
|
55
|
+
};
|
|
56
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -12,6 +12,8 @@ export * from './CreateFineTuningJobRequestGpuai';
|
|
|
12
12
|
export * from './CreateFineTuningJobRequestMethod';
|
|
13
13
|
export * from './CreateFineTuningJobRequestMethodLora';
|
|
14
14
|
export * from './CreateInstanceRequest';
|
|
15
|
+
export * from './CreateInstanceRequestPortsInner';
|
|
16
|
+
export * from './CreateRegistryCredentialRequest';
|
|
15
17
|
export * from './CreateSshKeyRequest';
|
|
16
18
|
export * from './CreateWebhookEndpointRequest';
|
|
17
19
|
export * from './CryptoDeposit';
|
|
@@ -37,6 +39,7 @@ export * from './InstanceConnection';
|
|
|
37
39
|
export * from './InstancePage';
|
|
38
40
|
export * from './ListCommunityMachines200Response';
|
|
39
41
|
export * from './ListDeposits200Response';
|
|
42
|
+
export * from './ListRegistryCredentials200Response';
|
|
40
43
|
export * from './Model';
|
|
41
44
|
export * from './ModelList';
|
|
42
45
|
export * from './ModelParametersInner';
|
|
@@ -50,6 +53,7 @@ export * from './Pricing';
|
|
|
50
53
|
export * from './PricingPage';
|
|
51
54
|
export * from './Problem';
|
|
52
55
|
export * from './RegisterCommunityMachineRequest';
|
|
56
|
+
export * from './RegistryCredential';
|
|
53
57
|
export * from './SSHKey';
|
|
54
58
|
export * from './SSHKeyPage';
|
|
55
59
|
export * from './SpendingLimit';
|
package/dist/models/index.js
CHANGED
|
@@ -30,6 +30,8 @@ __exportStar(require("./CreateFineTuningJobRequestGpuai"), exports);
|
|
|
30
30
|
__exportStar(require("./CreateFineTuningJobRequestMethod"), exports);
|
|
31
31
|
__exportStar(require("./CreateFineTuningJobRequestMethodLora"), exports);
|
|
32
32
|
__exportStar(require("./CreateInstanceRequest"), exports);
|
|
33
|
+
__exportStar(require("./CreateInstanceRequestPortsInner"), exports);
|
|
34
|
+
__exportStar(require("./CreateRegistryCredentialRequest"), exports);
|
|
33
35
|
__exportStar(require("./CreateSshKeyRequest"), exports);
|
|
34
36
|
__exportStar(require("./CreateWebhookEndpointRequest"), exports);
|
|
35
37
|
__exportStar(require("./CryptoDeposit"), exports);
|
|
@@ -55,6 +57,7 @@ __exportStar(require("./InstanceConnection"), exports);
|
|
|
55
57
|
__exportStar(require("./InstancePage"), exports);
|
|
56
58
|
__exportStar(require("./ListCommunityMachines200Response"), exports);
|
|
57
59
|
__exportStar(require("./ListDeposits200Response"), exports);
|
|
60
|
+
__exportStar(require("./ListRegistryCredentials200Response"), exports);
|
|
58
61
|
__exportStar(require("./Model"), exports);
|
|
59
62
|
__exportStar(require("./ModelList"), exports);
|
|
60
63
|
__exportStar(require("./ModelParametersInner"), exports);
|
|
@@ -68,6 +71,7 @@ __exportStar(require("./Pricing"), exports);
|
|
|
68
71
|
__exportStar(require("./PricingPage"), exports);
|
|
69
72
|
__exportStar(require("./Problem"), exports);
|
|
70
73
|
__exportStar(require("./RegisterCommunityMachineRequest"), exports);
|
|
74
|
+
__exportStar(require("./RegistryCredential"), exports);
|
|
71
75
|
__exportStar(require("./SSHKey"), exports);
|
|
72
76
|
__exportStar(require("./SSHKeyPage"), exports);
|
|
73
77
|
__exportStar(require("./SpendingLimit"), exports);
|
|
@@ -19,6 +19,11 @@ Name | Type
|
|
|
19
19
|
`offeringId` | string
|
|
20
20
|
`diskGb` | number
|
|
21
21
|
`env` | { [key: string]: string; }
|
|
22
|
+
`image` | string
|
|
23
|
+
`registryCredentialId` | string
|
|
24
|
+
`entrypoint` | Array<string>
|
|
25
|
+
`cmd` | Array<string>
|
|
26
|
+
`ports` | [Array<CreateInstanceRequestPortsInner>](CreateInstanceRequestPortsInner.md)
|
|
22
27
|
|
|
23
28
|
## Example
|
|
24
29
|
|
|
@@ -40,6 +45,11 @@ const example = {
|
|
|
40
45
|
"offeringId": null,
|
|
41
46
|
"diskGb": 200,
|
|
42
47
|
"env": null,
|
|
48
|
+
"image": ghcr.io/acme/trainer:v1,
|
|
49
|
+
"registryCredentialId": null,
|
|
50
|
+
"entrypoint": null,
|
|
51
|
+
"cmd": null,
|
|
52
|
+
"ports": null,
|
|
43
53
|
} satisfies CreateInstanceRequest
|
|
44
54
|
|
|
45
55
|
console.log(example)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
|
|
2
|
+
# CreateInstanceRequestPortsInner
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`port` | number
|
|
10
|
+
`protocol` | string
|
|
11
|
+
`primary` | boolean
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { CreateInstanceRequestPortsInner } from '@gpuai/sdk'
|
|
17
|
+
|
|
18
|
+
// TODO: Update the object below with actual values
|
|
19
|
+
const example = {
|
|
20
|
+
"port": null,
|
|
21
|
+
"protocol": null,
|
|
22
|
+
"primary": null,
|
|
23
|
+
} satisfies CreateInstanceRequestPortsInner
|
|
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 CreateInstanceRequestPortsInner
|
|
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
|
+
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
|
|
2
|
+
# CreateRegistryCredentialRequest
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`name` | string
|
|
10
|
+
`registry` | string
|
|
11
|
+
`username` | string
|
|
12
|
+
`password` | string
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import type { CreateRegistryCredentialRequest } from '@gpuai/sdk'
|
|
18
|
+
|
|
19
|
+
// TODO: Update the object below with actual values
|
|
20
|
+
const example = {
|
|
21
|
+
"name": ghcr-acme,
|
|
22
|
+
"registry": ghcr.io,
|
|
23
|
+
"username": null,
|
|
24
|
+
"password": null,
|
|
25
|
+
} satisfies CreateRegistryCredentialRequest
|
|
26
|
+
|
|
27
|
+
console.log(example)
|
|
28
|
+
|
|
29
|
+
// Convert the instance to a JSON string
|
|
30
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
31
|
+
console.log(exampleJSON)
|
|
32
|
+
|
|
33
|
+
// Parse the JSON string back to an object
|
|
34
|
+
const exampleParsed = JSON.parse(exampleJSON) as CreateRegistryCredentialRequest
|
|
35
|
+
console.log(exampleParsed)
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
39
|
+
|
|
40
|
+
|
package/docs/Instance.md
CHANGED
|
@@ -16,6 +16,7 @@ Name | Type
|
|
|
16
16
|
`pricePerHour` | number
|
|
17
17
|
`connection` | [InstanceConnection](InstanceConnection.md)
|
|
18
18
|
`diskGb` | number
|
|
19
|
+
`image` | string
|
|
19
20
|
`statusReason` | string
|
|
20
21
|
`createdAt` | Date
|
|
21
22
|
`readyAt` | Date
|
|
@@ -40,6 +41,7 @@ const example = {
|
|
|
40
41
|
"pricePerHour": null,
|
|
41
42
|
"connection": null,
|
|
42
43
|
"diskGb": null,
|
|
44
|
+
"image": null,
|
|
43
45
|
"statusReason": null,
|
|
44
46
|
"createdAt": null,
|
|
45
47
|
"readyAt": null,
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
# ListRegistryCredentials200Response
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`data` | [Array<RegistryCredential>](RegistryCredential.md)
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { ListRegistryCredentials200Response } from '@gpuai/sdk'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
"data": null,
|
|
19
|
+
} satisfies ListRegistryCredentials200Response
|
|
20
|
+
|
|
21
|
+
console.log(example)
|
|
22
|
+
|
|
23
|
+
// Convert the instance to a JSON string
|
|
24
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
25
|
+
console.log(exampleJSON)
|
|
26
|
+
|
|
27
|
+
// Parse the JSON string back to an object
|
|
28
|
+
const exampleParsed = JSON.parse(exampleJSON) as ListRegistryCredentials200Response
|
|
29
|
+
console.log(exampleParsed)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
33
|
+
|
|
34
|
+
|