@gpuai/sdk 0.3.4 → 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.
Files changed (49) hide show
  1. package/.openapi-generator/FILES +10 -0
  2. package/README.md +9 -2
  3. package/dist/apis/RegistryCredentialsApi.d.ts +66 -0
  4. package/dist/apis/RegistryCredentialsApi.js +173 -0
  5. package/dist/apis/index.d.ts +1 -0
  6. package/dist/apis/index.js +1 -0
  7. package/dist/esm/apis/RegistryCredentialsApi.d.ts +66 -0
  8. package/dist/esm/apis/RegistryCredentialsApi.js +169 -0
  9. package/dist/esm/apis/index.d.ts +1 -0
  10. package/dist/esm/apis/index.js +1 -0
  11. package/dist/esm/models/CreateInstanceRequest.d.ts +25 -0
  12. package/dist/esm/models/CreateInstanceRequest.js +9 -0
  13. package/dist/esm/models/CreateInstanceRequestPortsInner.d.ts +52 -0
  14. package/dist/esm/models/CreateInstanceRequestPortsInner.js +56 -0
  15. package/dist/esm/models/CreateRegistryCredentialRequest.d.ts +50 -0
  16. package/dist/esm/models/CreateRegistryCredentialRequest.js +55 -0
  17. package/dist/esm/models/ListRegistryCredentials200Response.d.ts +33 -0
  18. package/dist/esm/models/ListRegistryCredentials200Response.js +42 -0
  19. package/dist/esm/models/RegistryCredential.d.ts +56 -0
  20. package/dist/esm/models/RegistryCredential.js +49 -0
  21. package/dist/esm/models/index.d.ts +4 -0
  22. package/dist/esm/models/index.js +4 -0
  23. package/dist/models/CreateInstanceRequest.d.ts +25 -0
  24. package/dist/models/CreateInstanceRequest.js +9 -0
  25. package/dist/models/CreateInstanceRequestPortsInner.d.ts +52 -0
  26. package/dist/models/CreateInstanceRequestPortsInner.js +64 -0
  27. package/dist/models/CreateRegistryCredentialRequest.d.ts +50 -0
  28. package/dist/models/CreateRegistryCredentialRequest.js +62 -0
  29. package/dist/models/ListRegistryCredentials200Response.d.ts +33 -0
  30. package/dist/models/ListRegistryCredentials200Response.js +49 -0
  31. package/dist/models/RegistryCredential.d.ts +56 -0
  32. package/dist/models/RegistryCredential.js +56 -0
  33. package/dist/models/index.d.ts +4 -0
  34. package/dist/models/index.js +4 -0
  35. package/docs/CreateInstanceRequest.md +8 -0
  36. package/docs/CreateInstanceRequestPortsInner.md +38 -0
  37. package/docs/CreateRegistryCredentialRequest.md +40 -0
  38. package/docs/ListRegistryCredentials200Response.md +34 -0
  39. package/docs/RegistryCredential.md +43 -0
  40. package/docs/RegistryCredentialsApi.md +220 -0
  41. package/package.json +1 -1
  42. package/src/apis/RegistryCredentialsApi.ts +206 -0
  43. package/src/apis/index.ts +1 -0
  44. package/src/models/CreateInstanceRequest.ts +40 -0
  45. package/src/models/CreateInstanceRequestPortsInner.ts +94 -0
  46. package/src/models/CreateRegistryCredentialRequest.ts +93 -0
  47. package/src/models/ListRegistryCredentials200Response.ts +73 -0
  48. package/src/models/RegistryCredential.ts +97 -0
  49. package/src/models/index.ts +4 -0
@@ -0,0 +1,220 @@
1
+ # RegistryCredentialsApi
2
+
3
+ All URIs are relative to *https://api.gpu.ai/v1*
4
+
5
+ | Method | HTTP request | Description |
6
+ |------------- | ------------- | -------------|
7
+ | [**createRegistryCredential**](RegistryCredentialsApi.md#createregistrycredentialoperation) | **POST** /registry-credentials | Store a registry credential |
8
+ | [**deleteRegistryCredential**](RegistryCredentialsApi.md#deleteregistrycredential) | **DELETE** /registry-credentials/{id} | Delete a registry credential |
9
+ | [**listRegistryCredentials**](RegistryCredentialsApi.md#listregistrycredentials) | **GET** /registry-credentials | List registry credentials |
10
+
11
+
12
+
13
+ ## createRegistryCredential
14
+
15
+ > RegistryCredential createRegistryCredential(createRegistryCredentialRequest)
16
+
17
+ Store a registry credential
18
+
19
+ 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`.
20
+
21
+ ### Example
22
+
23
+ ```ts
24
+ import {
25
+ Configuration,
26
+ RegistryCredentialsApi,
27
+ } from '@gpuai/sdk';
28
+ import type { CreateRegistryCredentialOperationRequest } from '@gpuai/sdk';
29
+
30
+ async function example() {
31
+ console.log("🚀 Testing @gpuai/sdk SDK...");
32
+ const config = new Configuration({
33
+ // Configure HTTP bearer authorization: bearerAuth
34
+ accessToken: "YOUR BEARER TOKEN",
35
+ });
36
+ const api = new RegistryCredentialsApi(config);
37
+
38
+ const body = {
39
+ // CreateRegistryCredentialRequest
40
+ createRegistryCredentialRequest: ...,
41
+ } satisfies CreateRegistryCredentialOperationRequest;
42
+
43
+ try {
44
+ const data = await api.createRegistryCredential(body);
45
+ console.log(data);
46
+ } catch (error) {
47
+ console.error(error);
48
+ }
49
+ }
50
+
51
+ // Run the test
52
+ example().catch(console.error);
53
+ ```
54
+
55
+ ### Parameters
56
+
57
+
58
+ | Name | Type | Description | Notes |
59
+ |------------- | ------------- | ------------- | -------------|
60
+ | **createRegistryCredentialRequest** | [CreateRegistryCredentialRequest](CreateRegistryCredentialRequest.md) | | |
61
+
62
+ ### Return type
63
+
64
+ [**RegistryCredential**](RegistryCredential.md)
65
+
66
+ ### Authorization
67
+
68
+ [bearerAuth](../README.md#bearerAuth)
69
+
70
+ ### HTTP request headers
71
+
72
+ - **Content-Type**: `application/json`
73
+ - **Accept**: `application/json`, `application/problem+json`
74
+
75
+
76
+ ### HTTP response details
77
+ | Status code | Description | Response headers |
78
+ |-------------|-------------|------------------|
79
+ | **201** | Credential stored (metadata only; no password) | - |
80
+ | **429** | Rate limit exceeded (RFC 7807). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
81
+ | **0** | Error response (RFC 7807) | - |
82
+
83
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
84
+
85
+
86
+ ## deleteRegistryCredential
87
+
88
+ > deleteRegistryCredential(id)
89
+
90
+ Delete a registry credential
91
+
92
+ ### Example
93
+
94
+ ```ts
95
+ import {
96
+ Configuration,
97
+ RegistryCredentialsApi,
98
+ } from '@gpuai/sdk';
99
+ import type { DeleteRegistryCredentialRequest } from '@gpuai/sdk';
100
+
101
+ async function example() {
102
+ console.log("🚀 Testing @gpuai/sdk SDK...");
103
+ const config = new Configuration({
104
+ // Configure HTTP bearer authorization: bearerAuth
105
+ accessToken: "YOUR BEARER TOKEN",
106
+ });
107
+ const api = new RegistryCredentialsApi(config);
108
+
109
+ const body = {
110
+ // string
111
+ id: id_example,
112
+ } satisfies DeleteRegistryCredentialRequest;
113
+
114
+ try {
115
+ const data = await api.deleteRegistryCredential(body);
116
+ console.log(data);
117
+ } catch (error) {
118
+ console.error(error);
119
+ }
120
+ }
121
+
122
+ // Run the test
123
+ example().catch(console.error);
124
+ ```
125
+
126
+ ### Parameters
127
+
128
+
129
+ | Name | Type | Description | Notes |
130
+ |------------- | ------------- | ------------- | -------------|
131
+ | **id** | `string` | | [Defaults to `undefined`] |
132
+
133
+ ### Return type
134
+
135
+ `void` (Empty response body)
136
+
137
+ ### Authorization
138
+
139
+ [bearerAuth](../README.md#bearerAuth)
140
+
141
+ ### HTTP request headers
142
+
143
+ - **Content-Type**: Not defined
144
+ - **Accept**: `application/problem+json`
145
+
146
+
147
+ ### HTTP response details
148
+ | Status code | Description | Response headers |
149
+ |-------------|-------------|------------------|
150
+ | **204** | Deleted | - |
151
+ | **429** | Rate limit exceeded (RFC 7807). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
152
+ | **0** | Error response (RFC 7807) | - |
153
+
154
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
155
+
156
+
157
+ ## listRegistryCredentials
158
+
159
+ > ListRegistryCredentials200Response listRegistryCredentials()
160
+
161
+ List registry credentials
162
+
163
+ Lists the organization\&#39;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
+
165
+ ### Example
166
+
167
+ ```ts
168
+ import {
169
+ Configuration,
170
+ RegistryCredentialsApi,
171
+ } from '@gpuai/sdk';
172
+ import type { ListRegistryCredentialsRequest } from '@gpuai/sdk';
173
+
174
+ async function example() {
175
+ console.log("🚀 Testing @gpuai/sdk SDK...");
176
+ const config = new Configuration({
177
+ // Configure HTTP bearer authorization: bearerAuth
178
+ accessToken: "YOUR BEARER TOKEN",
179
+ });
180
+ const api = new RegistryCredentialsApi(config);
181
+
182
+ try {
183
+ const data = await api.listRegistryCredentials();
184
+ console.log(data);
185
+ } catch (error) {
186
+ console.error(error);
187
+ }
188
+ }
189
+
190
+ // Run the test
191
+ example().catch(console.error);
192
+ ```
193
+
194
+ ### Parameters
195
+
196
+ This endpoint does not need any parameter.
197
+
198
+ ### Return type
199
+
200
+ [**ListRegistryCredentials200Response**](ListRegistryCredentials200Response.md)
201
+
202
+ ### Authorization
203
+
204
+ [bearerAuth](../README.md#bearerAuth)
205
+
206
+ ### HTTP request headers
207
+
208
+ - **Content-Type**: Not defined
209
+ - **Accept**: `application/json`, `application/problem+json`
210
+
211
+
212
+ ### HTTP response details
213
+ | Status code | Description | Response headers |
214
+ |-------------|-------------|------------------|
215
+ | **200** | Credential list | - |
216
+ | **429** | Rate limit exceeded (RFC 7807). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
217
+ | **0** | Error response (RFC 7807) | - |
218
+
219
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
220
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gpuai/sdk",
3
- "version": "0.3.4",
3
+ "version": "0.3.5",
4
4
  "description": "TypeScript SDK for the GPU.ai Public Developer API",
5
5
  "author": "GPU.ai Support <support@gpu.ai>",
6
6
  "repository": {
@@ -0,0 +1,206 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * GPU.ai Public Developer API
5
+ * Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@gpu.ai
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import * as runtime from '../runtime';
16
+ import {
17
+ type CreateRegistryCredentialRequest,
18
+ CreateRegistryCredentialRequestFromJSON,
19
+ CreateRegistryCredentialRequestToJSON,
20
+ } from '../models/CreateRegistryCredentialRequest';
21
+ import {
22
+ type ListRegistryCredentials200Response,
23
+ ListRegistryCredentials200ResponseFromJSON,
24
+ ListRegistryCredentials200ResponseToJSON,
25
+ } from '../models/ListRegistryCredentials200Response';
26
+ import {
27
+ type Problem,
28
+ ProblemFromJSON,
29
+ ProblemToJSON,
30
+ } from '../models/Problem';
31
+ import {
32
+ type RegistryCredential,
33
+ RegistryCredentialFromJSON,
34
+ RegistryCredentialToJSON,
35
+ } from '../models/RegistryCredential';
36
+
37
+ export interface CreateRegistryCredentialOperationRequest {
38
+ createRegistryCredentialRequest: CreateRegistryCredentialRequest;
39
+ }
40
+
41
+ export interface DeleteRegistryCredentialRequest {
42
+ id: string;
43
+ }
44
+
45
+ /**
46
+ *
47
+ */
48
+ export class RegistryCredentialsApi extends runtime.BaseAPI {
49
+
50
+ /**
51
+ * Creates request options for createRegistryCredential without sending the request
52
+ */
53
+ async createRegistryCredentialRequestOpts(requestParameters: CreateRegistryCredentialOperationRequest): Promise<runtime.RequestOpts> {
54
+ if (requestParameters['createRegistryCredentialRequest'] == null) {
55
+ throw new runtime.RequiredError(
56
+ 'createRegistryCredentialRequest',
57
+ 'Required parameter "createRegistryCredentialRequest" was null or undefined when calling createRegistryCredential().'
58
+ );
59
+ }
60
+
61
+ const queryParameters: any = {};
62
+
63
+ const headerParameters: runtime.HTTPHeaders = {};
64
+
65
+ headerParameters['Content-Type'] = 'application/json';
66
+
67
+ if (this.configuration && this.configuration.accessToken) {
68
+ const token = this.configuration.accessToken;
69
+ const tokenString = await token("bearerAuth", []);
70
+
71
+ if (tokenString) {
72
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
73
+ }
74
+ }
75
+
76
+ let urlPath = `/registry-credentials`;
77
+
78
+ return {
79
+ path: urlPath,
80
+ method: 'POST',
81
+ headers: headerParameters,
82
+ query: queryParameters,
83
+ body: CreateRegistryCredentialRequestToJSON(requestParameters['createRegistryCredentialRequest']),
84
+ };
85
+ }
86
+
87
+ /**
88
+ * 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`.
89
+ * Store a registry credential
90
+ */
91
+ async createRegistryCredentialRaw(requestParameters: CreateRegistryCredentialOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RegistryCredential>> {
92
+ const requestOptions = await this.createRegistryCredentialRequestOpts(requestParameters);
93
+ const response = await this.request(requestOptions, initOverrides);
94
+
95
+ return new runtime.JSONApiResponse(response, (jsonValue) => RegistryCredentialFromJSON(jsonValue));
96
+ }
97
+
98
+ /**
99
+ * 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`.
100
+ * Store a registry credential
101
+ */
102
+ async createRegistryCredential(requestParameters: CreateRegistryCredentialOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RegistryCredential> {
103
+ const response = await this.createRegistryCredentialRaw(requestParameters, initOverrides);
104
+ return await response.value();
105
+ }
106
+
107
+ /**
108
+ * Creates request options for deleteRegistryCredential without sending the request
109
+ */
110
+ async deleteRegistryCredentialRequestOpts(requestParameters: DeleteRegistryCredentialRequest): Promise<runtime.RequestOpts> {
111
+ if (requestParameters['id'] == null) {
112
+ throw new runtime.RequiredError(
113
+ 'id',
114
+ 'Required parameter "id" was null or undefined when calling deleteRegistryCredential().'
115
+ );
116
+ }
117
+
118
+ const queryParameters: any = {};
119
+
120
+ const headerParameters: runtime.HTTPHeaders = {};
121
+
122
+ if (this.configuration && this.configuration.accessToken) {
123
+ const token = this.configuration.accessToken;
124
+ const tokenString = await token("bearerAuth", []);
125
+
126
+ if (tokenString) {
127
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
128
+ }
129
+ }
130
+
131
+ let urlPath = `/registry-credentials/{id}`;
132
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
133
+
134
+ return {
135
+ path: urlPath,
136
+ method: 'DELETE',
137
+ headers: headerParameters,
138
+ query: queryParameters,
139
+ };
140
+ }
141
+
142
+ /**
143
+ * Delete a registry credential
144
+ */
145
+ async deleteRegistryCredentialRaw(requestParameters: DeleteRegistryCredentialRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
146
+ const requestOptions = await this.deleteRegistryCredentialRequestOpts(requestParameters);
147
+ const response = await this.request(requestOptions, initOverrides);
148
+
149
+ return new runtime.VoidApiResponse(response);
150
+ }
151
+
152
+ /**
153
+ * Delete a registry credential
154
+ */
155
+ async deleteRegistryCredential(requestParameters: DeleteRegistryCredentialRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
156
+ await this.deleteRegistryCredentialRaw(requestParameters, initOverrides);
157
+ }
158
+
159
+ /**
160
+ * Creates request options for listRegistryCredentials without sending the request
161
+ */
162
+ async listRegistryCredentialsRequestOpts(): Promise<runtime.RequestOpts> {
163
+ const queryParameters: any = {};
164
+
165
+ const headerParameters: runtime.HTTPHeaders = {};
166
+
167
+ if (this.configuration && this.configuration.accessToken) {
168
+ const token = this.configuration.accessToken;
169
+ const tokenString = await token("bearerAuth", []);
170
+
171
+ if (tokenString) {
172
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
173
+ }
174
+ }
175
+
176
+ let urlPath = `/registry-credentials`;
177
+
178
+ return {
179
+ path: urlPath,
180
+ method: 'GET',
181
+ headers: headerParameters,
182
+ query: queryParameters,
183
+ };
184
+ }
185
+
186
+ /**
187
+ * 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.
188
+ * List registry credentials
189
+ */
190
+ async listRegistryCredentialsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListRegistryCredentials200Response>> {
191
+ const requestOptions = await this.listRegistryCredentialsRequestOpts();
192
+ const response = await this.request(requestOptions, initOverrides);
193
+
194
+ return new runtime.JSONApiResponse(response, (jsonValue) => ListRegistryCredentials200ResponseFromJSON(jsonValue));
195
+ }
196
+
197
+ /**
198
+ * 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.
199
+ * List registry credentials
200
+ */
201
+ async listRegistryCredentials(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListRegistryCredentials200Response> {
202
+ const response = await this.listRegistryCredentialsRaw(initOverrides);
203
+ return await response.value();
204
+ }
205
+
206
+ }
package/src/apis/index.ts 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';
@@ -13,6 +13,14 @@
13
13
  */
14
14
 
15
15
  import { mapValues } from '../runtime';
16
+ import type { CreateInstanceRequestPortsInner } from './CreateInstanceRequestPortsInner';
17
+ import {
18
+ CreateInstanceRequestPortsInnerFromJSON,
19
+ CreateInstanceRequestPortsInnerFromJSONTyped,
20
+ CreateInstanceRequestPortsInnerToJSON,
21
+ CreateInstanceRequestPortsInnerToJSONTyped,
22
+ } from './CreateInstanceRequestPortsInner';
23
+
16
24
  /**
17
25
  *
18
26
  * @export
@@ -103,6 +111,30 @@ export interface CreateInstanceRequest {
103
111
  * @memberof CreateInstanceRequest
104
112
  */
105
113
  image?: string;
114
+ /**
115
+ * Stored registry-credential id (POST /v1/registry-credentials) for pulling a PRIVATE `image`. The credential's registry must match the image's registry (422 otherwise); wrong logins fail the pre-flight with 422 `image_unavailable` before anything is provisioned. Requires `image`.
116
+ * @type {string}
117
+ * @memberof CreateInstanceRequest
118
+ */
119
+ registryCredentialId?: string;
120
+ /**
121
+ * Override the image's ENTRYPOINT (docker semantics — also drops the image CMD unless `cmd` is given). Omit to use the image's own. At most 32 arguments / 4KB. Requires `image`.
122
+ * @type {Array<string>}
123
+ * @memberof CreateInstanceRequest
124
+ */
125
+ entrypoint?: Array<string>;
126
+ /**
127
+ * Override the image's CMD. Omit to use the image's own (or none, when `entrypoint` is overridden). Requires `image`.
128
+ * @type {Array<string>}
129
+ * @memberof CreateInstanceRequest
130
+ */
131
+ cmd?: Array<string>;
132
+ /**
133
+ * Container ports to expose on a custom-image launch (at most 10; port 22 is reserved). At most one entry may be `primary` — it must be http and is served at the instance's app URL (`https://<id>.apps.gpu.ai`) behind the per-instance basic-auth login. Requires `image`.
134
+ * @type {Array<CreateInstanceRequestPortsInner>}
135
+ * @memberof CreateInstanceRequest
136
+ */
137
+ ports?: Array<CreateInstanceRequestPortsInner>;
106
138
  }
107
139
 
108
140
 
@@ -150,6 +182,10 @@ export function CreateInstanceRequestFromJSONTyped(json: any, ignoreDiscriminato
150
182
  'diskGb': json['disk_gb'] == null ? undefined : json['disk_gb'],
151
183
  'env': json['env'] == null ? undefined : json['env'],
152
184
  'image': json['image'] == null ? undefined : json['image'],
185
+ 'registryCredentialId': json['registry_credential_id'] == null ? undefined : json['registry_credential_id'],
186
+ 'entrypoint': json['entrypoint'] == null ? undefined : json['entrypoint'],
187
+ 'cmd': json['cmd'] == null ? undefined : json['cmd'],
188
+ 'ports': json['ports'] == null ? undefined : ((json['ports'] as Array<any>).map(CreateInstanceRequestPortsInnerFromJSON)),
153
189
  };
154
190
  }
155
191
 
@@ -178,6 +214,10 @@ export function CreateInstanceRequestToJSONTyped(value?: CreateInstanceRequest |
178
214
  'disk_gb': value['diskGb'],
179
215
  'env': value['env'],
180
216
  'image': value['image'],
217
+ 'registry_credential_id': value['registryCredentialId'],
218
+ 'entrypoint': value['entrypoint'],
219
+ 'cmd': value['cmd'],
220
+ 'ports': value['ports'] == null ? undefined : ((value['ports'] as Array<any>).map(CreateInstanceRequestPortsInnerToJSON)),
181
221
  };
182
222
  }
183
223
 
@@ -0,0 +1,94 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * GPU.ai Public Developer API
5
+ * Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@gpu.ai
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface CreateInstanceRequestPortsInner
20
+ */
21
+ export interface CreateInstanceRequestPortsInner {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof CreateInstanceRequestPortsInner
26
+ */
27
+ port: number;
28
+ /**
29
+ *
30
+ * @type {CreateInstanceRequestPortsInnerProtocolEnum}
31
+ * @memberof CreateInstanceRequestPortsInner
32
+ */
33
+ protocol: CreateInstanceRequestPortsInnerProtocolEnum;
34
+ /**
35
+ *
36
+ * @type {boolean}
37
+ * @memberof CreateInstanceRequestPortsInner
38
+ */
39
+ primary?: boolean;
40
+ }
41
+
42
+
43
+ /**
44
+ * @export
45
+ */
46
+ export const CreateInstanceRequestPortsInnerProtocolEnum = {
47
+ Http: 'http',
48
+ Tcp: 'tcp'
49
+ } as const;
50
+ export type CreateInstanceRequestPortsInnerProtocolEnum = typeof CreateInstanceRequestPortsInnerProtocolEnum[keyof typeof CreateInstanceRequestPortsInnerProtocolEnum];
51
+
52
+
53
+ /**
54
+ * Check if a given object implements the CreateInstanceRequestPortsInner interface.
55
+ */
56
+ export function instanceOfCreateInstanceRequestPortsInner(value: object): value is CreateInstanceRequestPortsInner {
57
+ if (!('port' in value) || value['port'] === undefined) return false;
58
+ if (!('protocol' in value) || value['protocol'] === undefined) return false;
59
+ return true;
60
+ }
61
+
62
+ export function CreateInstanceRequestPortsInnerFromJSON(json: any): CreateInstanceRequestPortsInner {
63
+ return CreateInstanceRequestPortsInnerFromJSONTyped(json, false);
64
+ }
65
+
66
+ export function CreateInstanceRequestPortsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateInstanceRequestPortsInner {
67
+ if (json == null) {
68
+ return json;
69
+ }
70
+ return {
71
+
72
+ 'port': json['port'],
73
+ 'protocol': json['protocol'],
74
+ 'primary': json['primary'] == null ? undefined : json['primary'],
75
+ };
76
+ }
77
+
78
+ export function CreateInstanceRequestPortsInnerToJSON(json: any): CreateInstanceRequestPortsInner {
79
+ return CreateInstanceRequestPortsInnerToJSONTyped(json, false);
80
+ }
81
+
82
+ export function CreateInstanceRequestPortsInnerToJSONTyped(value?: CreateInstanceRequestPortsInner | null, ignoreDiscriminator: boolean = false): any {
83
+ if (value == null) {
84
+ return value;
85
+ }
86
+
87
+ return {
88
+
89
+ 'port': value['port'],
90
+ 'protocol': value['protocol'],
91
+ 'primary': value['primary'],
92
+ };
93
+ }
94
+
@@ -0,0 +1,93 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * GPU.ai Public Developer API
5
+ * Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@gpu.ai
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface CreateRegistryCredentialRequest
20
+ */
21
+ export interface CreateRegistryCredentialRequest {
22
+ /**
23
+ * Org-unique handle (at most 64 characters).
24
+ * @type {string}
25
+ * @memberof CreateRegistryCredentialRequest
26
+ */
27
+ name: string;
28
+ /**
29
+ * Registry host the login belongs to.
30
+ * @type {string}
31
+ * @memberof CreateRegistryCredentialRequest
32
+ */
33
+ registry: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof CreateRegistryCredentialRequest
38
+ */
39
+ username: string;
40
+ /**
41
+ * Registry password or access token. Write-only.
42
+ * @type {string}
43
+ * @memberof CreateRegistryCredentialRequest
44
+ */
45
+ password: string;
46
+ }
47
+
48
+ /**
49
+ * Check if a given object implements the CreateRegistryCredentialRequest interface.
50
+ */
51
+ export function instanceOfCreateRegistryCredentialRequest(value: object): value is CreateRegistryCredentialRequest {
52
+ if (!('name' in value) || value['name'] === undefined) return false;
53
+ if (!('registry' in value) || value['registry'] === undefined) return false;
54
+ if (!('username' in value) || value['username'] === undefined) return false;
55
+ if (!('password' in value) || value['password'] === undefined) return false;
56
+ return true;
57
+ }
58
+
59
+ export function CreateRegistryCredentialRequestFromJSON(json: any): CreateRegistryCredentialRequest {
60
+ return CreateRegistryCredentialRequestFromJSONTyped(json, false);
61
+ }
62
+
63
+ export function CreateRegistryCredentialRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateRegistryCredentialRequest {
64
+ if (json == null) {
65
+ return json;
66
+ }
67
+ return {
68
+
69
+ 'name': json['name'],
70
+ 'registry': json['registry'],
71
+ 'username': json['username'],
72
+ 'password': json['password'],
73
+ };
74
+ }
75
+
76
+ export function CreateRegistryCredentialRequestToJSON(json: any): CreateRegistryCredentialRequest {
77
+ return CreateRegistryCredentialRequestToJSONTyped(json, false);
78
+ }
79
+
80
+ export function CreateRegistryCredentialRequestToJSONTyped(value?: CreateRegistryCredentialRequest | null, ignoreDiscriminator: boolean = false): any {
81
+ if (value == null) {
82
+ return value;
83
+ }
84
+
85
+ return {
86
+
87
+ 'name': value['name'],
88
+ 'registry': value['registry'],
89
+ 'username': value['username'],
90
+ 'password': value['password'],
91
+ };
92
+ }
93
+