@gpuai/sdk 0.2.4 → 0.2.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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @gpuai/sdk@0.2.4
1
+ # @gpuai/sdk@0.2.5
2
2
 
3
3
  A TypeScript SDK client for the api.gpu.ai API.
4
4
 
@@ -191,7 +191,7 @@ and is automatically generated by the
191
191
  [OpenAPI Generator](https://openapi-generator.tech) project:
192
192
 
193
193
  - API version: `1.0.0`
194
- - Package version: `0.2.4`
194
+ - Package version: `0.2.5`
195
195
  - Generator version: `7.24.0`
196
196
  - Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
197
197
 
@@ -25,6 +25,7 @@ export interface DeleteInstanceRequest {
25
25
  }
26
26
  export interface GetInstanceRequest {
27
27
  id: string;
28
+ include?: GetInstanceIncludeEnum;
28
29
  }
29
30
  export interface ListInstancesRequest {
30
31
  cursor?: string;
@@ -105,6 +106,13 @@ export declare class InstancesApi extends runtime.BaseAPI {
105
106
  */
106
107
  updateInstance(requestParameters: UpdateInstanceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Instance>;
107
108
  }
109
+ /**
110
+ * @export
111
+ */
112
+ export declare const GetInstanceIncludeEnum: {
113
+ readonly Credentials: "credentials";
114
+ };
115
+ export type GetInstanceIncludeEnum = typeof GetInstanceIncludeEnum[keyof typeof GetInstanceIncludeEnum];
108
116
  /**
109
117
  * @export
110
118
  */
@@ -22,7 +22,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
22
22
  });
23
23
  };
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.ListInstancesStatusEnum = exports.InstancesApi = void 0;
25
+ exports.ListInstancesStatusEnum = exports.GetInstanceIncludeEnum = exports.InstancesApi = void 0;
26
26
  const runtime = require("../runtime");
27
27
  const CreateInstanceRequest_1 = require("../models/CreateInstanceRequest");
28
28
  const Instance_1 = require("../models/Instance");
@@ -143,6 +143,9 @@ class InstancesApi extends runtime.BaseAPI {
143
143
  throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getInstance().');
144
144
  }
145
145
  const queryParameters = {};
146
+ if (requestParameters['include'] != null) {
147
+ queryParameters['include'] = requestParameters['include'];
148
+ }
146
149
  const headerParameters = {};
147
150
  if (this.configuration && this.configuration.accessToken) {
148
151
  const token = this.configuration.accessToken;
@@ -289,6 +292,12 @@ class InstancesApi extends runtime.BaseAPI {
289
292
  }
290
293
  }
291
294
  exports.InstancesApi = InstancesApi;
295
+ /**
296
+ * @export
297
+ */
298
+ exports.GetInstanceIncludeEnum = {
299
+ Credentials: 'credentials'
300
+ };
292
301
  /**
293
302
  * @export
294
303
  */
@@ -25,6 +25,7 @@ export interface DeleteInstanceRequest {
25
25
  }
26
26
  export interface GetInstanceRequest {
27
27
  id: string;
28
+ include?: GetInstanceIncludeEnum;
28
29
  }
29
30
  export interface ListInstancesRequest {
30
31
  cursor?: string;
@@ -105,6 +106,13 @@ export declare class InstancesApi extends runtime.BaseAPI {
105
106
  */
106
107
  updateInstance(requestParameters: UpdateInstanceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Instance>;
107
108
  }
109
+ /**
110
+ * @export
111
+ */
112
+ export declare const GetInstanceIncludeEnum: {
113
+ readonly Credentials: "credentials";
114
+ };
115
+ export type GetInstanceIncludeEnum = typeof GetInstanceIncludeEnum[keyof typeof GetInstanceIncludeEnum];
108
116
  /**
109
117
  * @export
110
118
  */
@@ -140,6 +140,9 @@ export class InstancesApi extends runtime.BaseAPI {
140
140
  throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getInstance().');
141
141
  }
142
142
  const queryParameters = {};
143
+ if (requestParameters['include'] != null) {
144
+ queryParameters['include'] = requestParameters['include'];
145
+ }
143
146
  const headerParameters = {};
144
147
  if (this.configuration && this.configuration.accessToken) {
145
148
  const token = this.configuration.accessToken;
@@ -285,6 +288,12 @@ export class InstancesApi extends runtime.BaseAPI {
285
288
  });
286
289
  }
287
290
  }
291
+ /**
292
+ * @export
293
+ */
294
+ export const GetInstanceIncludeEnum = {
295
+ Credentials: 'credentials'
296
+ };
288
297
  /**
289
298
  * @export
290
299
  */
@@ -46,7 +46,7 @@ export interface InstanceConnection {
46
46
  */
47
47
  appUser?: string;
48
48
  /**
49
- * HTTP Basic Auth password for app_url and terminal_url. Same availability as app_user. Treat as a secret.
49
+ * HTTP Basic Auth password for app_url and terminal_url. Treat as a secret. OMITTED by default from all reads — returned only on GET /instances/{id}?include=credentials (same persistence availability as app_user); the list endpoint and operation results never include it.
50
50
  * @type {string}
51
51
  * @memberof InstanceConnection
52
52
  */
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  /**
13
- * Terminal-success payload. Carries the per-instance web-access credential — app_url for template deploys, terminal_url for instances provisioned with the browser web console, and the shared basic-auth login for both. The credential is also re-readable via connection.app_user/app_password on the org-scoped instance reads.
13
+ * Terminal-success payload. Carries the per-instance web-access coordinates — app_url for template deploys, terminal_url for instances provisioned with the browser web console, and the basic-auth username shared by both. The basic-auth PASSWORD is never included here retrieve it via GET /instances/{id}?include=credentials (connection.app_password).
14
14
  * @export
15
15
  * @interface OperationResult
16
16
  */
@@ -33,12 +33,6 @@ export interface OperationResult {
33
33
  * @memberof OperationResult
34
34
  */
35
35
  appBasicAuthUser?: string;
36
- /**
37
- *
38
- * @type {string}
39
- * @memberof OperationResult
40
- */
41
- appBasicAuthPass?: string;
42
36
  }
43
37
  /**
44
38
  * Check if a given object implements the OperationResult interface.
@@ -28,7 +28,6 @@ export function OperationResultFromJSONTyped(json, ignoreDiscriminator) {
28
28
  'appUrl': json['app_url'] == null ? undefined : json['app_url'],
29
29
  'terminalUrl': json['terminal_url'] == null ? undefined : json['terminal_url'],
30
30
  'appBasicAuthUser': json['app_basic_auth_user'] == null ? undefined : json['app_basic_auth_user'],
31
- 'appBasicAuthPass': json['app_basic_auth_pass'] == null ? undefined : json['app_basic_auth_pass'],
32
31
  };
33
32
  }
34
33
  export function OperationResultToJSON(json) {
@@ -42,6 +41,5 @@ export function OperationResultToJSONTyped(value, ignoreDiscriminator = false) {
42
41
  'app_url': value['appUrl'],
43
42
  'terminal_url': value['terminalUrl'],
44
43
  'app_basic_auth_user': value['appBasicAuthUser'],
45
- 'app_basic_auth_pass': value['appBasicAuthPass'],
46
44
  };
47
45
  }
@@ -46,7 +46,7 @@ export interface InstanceConnection {
46
46
  */
47
47
  appUser?: string;
48
48
  /**
49
- * HTTP Basic Auth password for app_url and terminal_url. Same availability as app_user. Treat as a secret.
49
+ * HTTP Basic Auth password for app_url and terminal_url. Treat as a secret. OMITTED by default from all reads — returned only on GET /instances/{id}?include=credentials (same persistence availability as app_user); the list endpoint and operation results never include it.
50
50
  * @type {string}
51
51
  * @memberof InstanceConnection
52
52
  */
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  /**
13
- * Terminal-success payload. Carries the per-instance web-access credential — app_url for template deploys, terminal_url for instances provisioned with the browser web console, and the shared basic-auth login for both. The credential is also re-readable via connection.app_user/app_password on the org-scoped instance reads.
13
+ * Terminal-success payload. Carries the per-instance web-access coordinates — app_url for template deploys, terminal_url for instances provisioned with the browser web console, and the basic-auth username shared by both. The basic-auth PASSWORD is never included here retrieve it via GET /instances/{id}?include=credentials (connection.app_password).
14
14
  * @export
15
15
  * @interface OperationResult
16
16
  */
@@ -33,12 +33,6 @@ export interface OperationResult {
33
33
  * @memberof OperationResult
34
34
  */
35
35
  appBasicAuthUser?: string;
36
- /**
37
- *
38
- * @type {string}
39
- * @memberof OperationResult
40
- */
41
- appBasicAuthPass?: string;
42
36
  }
43
37
  /**
44
38
  * Check if a given object implements the OperationResult interface.
@@ -35,7 +35,6 @@ function OperationResultFromJSONTyped(json, ignoreDiscriminator) {
35
35
  'appUrl': json['app_url'] == null ? undefined : json['app_url'],
36
36
  'terminalUrl': json['terminal_url'] == null ? undefined : json['terminal_url'],
37
37
  'appBasicAuthUser': json['app_basic_auth_user'] == null ? undefined : json['app_basic_auth_user'],
38
- 'appBasicAuthPass': json['app_basic_auth_pass'] == null ? undefined : json['app_basic_auth_pass'],
39
38
  };
40
39
  }
41
40
  function OperationResultToJSON(json) {
@@ -49,6 +48,5 @@ function OperationResultToJSONTyped(value, ignoreDiscriminator = false) {
49
48
  'app_url': value['appUrl'],
50
49
  'terminal_url': value['terminalUrl'],
51
50
  'app_basic_auth_user': value['appBasicAuthUser'],
52
- 'app_basic_auth_pass': value['appBasicAuthPass'],
53
51
  };
54
52
  }
@@ -166,7 +166,7 @@ example().catch(console.error);
166
166
 
167
167
  ## getInstance
168
168
 
169
- > Instance getInstance(id)
169
+ > Instance getInstance(id, include)
170
170
 
171
171
  Get an instance
172
172
 
@@ -190,6 +190,8 @@ async function example() {
190
190
  const body = {
191
191
  // string
192
192
  id: id_example,
193
+ // 'credentials' | Opt-in expansion. `credentials` restores connection.app_password on this single-instance read — the only surface that returns the web-console basic-auth password. Omitted by default so bare reads can be logged without leaking the secret. Any other value is a 400 validation_failed. The list endpoint and operation reads never return the password, with or without this parameter. (optional)
194
+ include: include_example,
193
195
  } satisfies GetInstanceRequest;
194
196
 
195
197
  try {
@@ -210,6 +212,7 @@ example().catch(console.error);
210
212
  | Name | Type | Description | Notes |
211
213
  |------------- | ------------- | ------------- | -------------|
212
214
  | **id** | `string` | | [Defaults to `undefined`] |
215
+ | **include** | `credentials` | Opt-in expansion. &#x60;credentials&#x60; restores connection.app_password on this single-instance read — the only surface that returns the web-console basic-auth password. Omitted by default so bare reads can be logged without leaking the secret. Any other value is a 400 validation_failed. The list endpoint and operation reads never return the password, with or without this parameter. | [Optional] [Defaults to `undefined`] [Enum: credentials] |
213
216
 
214
217
  ### Return type
215
218
 
@@ -1,7 +1,7 @@
1
1
 
2
2
  # OperationResult
3
3
 
4
- Terminal-success payload. Carries the per-instance web-access credential — app_url for template deploys, terminal_url for instances provisioned with the browser web console, and the shared basic-auth login for both. The credential is also re-readable via connection.app_user/app_password on the org-scoped instance reads.
4
+ Terminal-success payload. Carries the per-instance web-access coordinates — app_url for template deploys, terminal_url for instances provisioned with the browser web console, and the basic-auth username shared by both. The basic-auth PASSWORD is never included here retrieve it via GET /instances/{id}?include=credentials (connection.app_password).
5
5
 
6
6
  ## Properties
7
7
 
@@ -10,7 +10,6 @@ Name | Type
10
10
  `appUrl` | string
11
11
  `terminalUrl` | string
12
12
  `appBasicAuthUser` | string
13
- `appBasicAuthPass` | string
14
13
 
15
14
  ## Example
16
15
 
@@ -22,7 +21,6 @@ const example = {
22
21
  "appUrl": null,
23
22
  "terminalUrl": null,
24
23
  "appBasicAuthUser": null,
25
- "appBasicAuthPass": null,
26
24
  } satisfies OperationResult
27
25
 
28
26
  console.log(example)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gpuai/sdk",
3
- "version": "0.2.4",
3
+ "version": "0.2.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": {
@@ -56,6 +56,7 @@ export interface DeleteInstanceRequest {
56
56
 
57
57
  export interface GetInstanceRequest {
58
58
  id: string;
59
+ include?: GetInstanceIncludeEnum;
59
60
  }
60
61
 
61
62
  export interface ListInstancesRequest {
@@ -206,6 +207,10 @@ export class InstancesApi extends runtime.BaseAPI {
206
207
 
207
208
  const queryParameters: any = {};
208
209
 
210
+ if (requestParameters['include'] != null) {
211
+ queryParameters['include'] = requestParameters['include'];
212
+ }
213
+
209
214
  const headerParameters: runtime.HTTPHeaders = {};
210
215
 
211
216
  if (this.configuration && this.configuration.accessToken) {
@@ -374,6 +379,13 @@ export class InstancesApi extends runtime.BaseAPI {
374
379
 
375
380
  }
376
381
 
382
+ /**
383
+ * @export
384
+ */
385
+ export const GetInstanceIncludeEnum = {
386
+ Credentials: 'credentials'
387
+ } as const;
388
+ export type GetInstanceIncludeEnum = typeof GetInstanceIncludeEnum[keyof typeof GetInstanceIncludeEnum];
377
389
  /**
378
390
  * @export
379
391
  */
@@ -50,7 +50,7 @@ export interface InstanceConnection {
50
50
  */
51
51
  appUser?: string;
52
52
  /**
53
- * HTTP Basic Auth password for app_url and terminal_url. Same availability as app_user. Treat as a secret.
53
+ * HTTP Basic Auth password for app_url and terminal_url. Treat as a secret. OMITTED by default from all reads — returned only on GET /instances/{id}?include=credentials (same persistence availability as app_user); the list endpoint and operation results never include it.
54
54
  * @type {string}
55
55
  * @memberof InstanceConnection
56
56
  */
@@ -14,7 +14,7 @@
14
14
 
15
15
  import { mapValues } from '../runtime';
16
16
  /**
17
- * Terminal-success payload. Carries the per-instance web-access credential — app_url for template deploys, terminal_url for instances provisioned with the browser web console, and the shared basic-auth login for both. The credential is also re-readable via connection.app_user/app_password on the org-scoped instance reads.
17
+ * Terminal-success payload. Carries the per-instance web-access coordinates — app_url for template deploys, terminal_url for instances provisioned with the browser web console, and the basic-auth username shared by both. The basic-auth PASSWORD is never included here retrieve it via GET /instances/{id}?include=credentials (connection.app_password).
18
18
  * @export
19
19
  * @interface OperationResult
20
20
  */
@@ -37,12 +37,6 @@ export interface OperationResult {
37
37
  * @memberof OperationResult
38
38
  */
39
39
  appBasicAuthUser?: string;
40
- /**
41
- *
42
- * @type {string}
43
- * @memberof OperationResult
44
- */
45
- appBasicAuthPass?: string;
46
40
  }
47
41
 
48
42
  /**
@@ -65,7 +59,6 @@ export function OperationResultFromJSONTyped(json: any, ignoreDiscriminator: boo
65
59
  'appUrl': json['app_url'] == null ? undefined : json['app_url'],
66
60
  'terminalUrl': json['terminal_url'] == null ? undefined : json['terminal_url'],
67
61
  'appBasicAuthUser': json['app_basic_auth_user'] == null ? undefined : json['app_basic_auth_user'],
68
- 'appBasicAuthPass': json['app_basic_auth_pass'] == null ? undefined : json['app_basic_auth_pass'],
69
62
  };
70
63
  }
71
64
 
@@ -83,7 +76,6 @@ export function OperationResultToJSONTyped(value?: OperationResult | null, ignor
83
76
  'app_url': value['appUrl'],
84
77
  'terminal_url': value['terminalUrl'],
85
78
  'app_basic_auth_user': value['appBasicAuthUser'],
86
- 'app_basic_auth_pass': value['appBasicAuthPass'],
87
79
  };
88
80
  }
89
81