@gpuai/sdk 0.5.4 → 0.5.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 (196) hide show
  1. package/.openapi-generator/FILES +56 -0
  2. package/README.md +50 -2
  3. package/dist/apis/EndpointsApi.d.ts +150 -0
  4. package/dist/apis/EndpointsApi.js +379 -0
  5. package/dist/apis/InstancesApi.d.ts +15 -0
  6. package/dist/apis/InstancesApi.js +45 -0
  7. package/dist/apis/JobsApi.d.ts +172 -0
  8. package/dist/apis/JobsApi.js +444 -0
  9. package/dist/apis/OperationsApi.d.ts +17 -0
  10. package/dist/apis/OperationsApi.js +48 -0
  11. package/dist/apis/SecretsApi.d.ts +123 -0
  12. package/dist/apis/SecretsApi.js +328 -0
  13. package/dist/apis/index.d.ts +3 -0
  14. package/dist/apis/index.js +3 -0
  15. package/dist/esm/apis/EndpointsApi.d.ts +150 -0
  16. package/dist/esm/apis/EndpointsApi.js +375 -0
  17. package/dist/esm/apis/InstancesApi.d.ts +15 -0
  18. package/dist/esm/apis/InstancesApi.js +45 -0
  19. package/dist/esm/apis/JobsApi.d.ts +172 -0
  20. package/dist/esm/apis/JobsApi.js +440 -0
  21. package/dist/esm/apis/OperationsApi.d.ts +17 -0
  22. package/dist/esm/apis/OperationsApi.js +48 -0
  23. package/dist/esm/apis/SecretsApi.d.ts +123 -0
  24. package/dist/esm/apis/SecretsApi.js +324 -0
  25. package/dist/esm/apis/index.d.ts +3 -0
  26. package/dist/esm/apis/index.js +3 -0
  27. package/dist/esm/models/DedicatedIPOffer.d.ts +98 -0
  28. package/dist/esm/models/DedicatedIPOffer.js +87 -0
  29. package/dist/esm/models/Endpoint.d.ts +147 -0
  30. package/dist/esm/models/Endpoint.js +121 -0
  31. package/dist/esm/models/EndpointCreate.d.ts +80 -0
  32. package/dist/esm/models/EndpointCreate.js +63 -0
  33. package/dist/esm/models/EndpointList.d.ts +33 -0
  34. package/dist/esm/models/EndpointList.js +44 -0
  35. package/dist/esm/models/EndpointMachine.d.ts +90 -0
  36. package/dist/esm/models/EndpointMachine.js +84 -0
  37. package/dist/esm/models/EndpointReplicaCounts.d.ts +38 -0
  38. package/dist/esm/models/EndpointReplicaCounts.js +47 -0
  39. package/dist/esm/models/Job.d.ts +352 -0
  40. package/dist/esm/models/Job.js +254 -0
  41. package/dist/esm/models/JobAttempt.d.ts +176 -0
  42. package/dist/esm/models/JobAttempt.js +147 -0
  43. package/dist/esm/models/JobCreate.d.ts +153 -0
  44. package/dist/esm/models/JobCreate.js +84 -0
  45. package/dist/esm/models/JobGpuTypes.d.ts +39 -0
  46. package/dist/esm/models/JobGpuTypes.js +48 -0
  47. package/dist/esm/models/JobGpuTypesDataInner.d.ts +58 -0
  48. package/dist/esm/models/JobGpuTypesDataInner.js +59 -0
  49. package/dist/esm/models/JobLogChunk.d.ts +50 -0
  50. package/dist/esm/models/JobLogChunk.js +55 -0
  51. package/dist/esm/models/JobLogs.d.ts +39 -0
  52. package/dist/esm/models/JobLogs.js +48 -0
  53. package/dist/esm/models/JobPage.d.ts +39 -0
  54. package/dist/esm/models/JobPage.js +48 -0
  55. package/dist/esm/models/JobSharingHint.d.ts +46 -0
  56. package/dist/esm/models/JobSharingHint.js +51 -0
  57. package/dist/esm/models/JobTelemetry.d.ts +51 -0
  58. package/dist/esm/models/JobTelemetry.js +56 -0
  59. package/dist/esm/models/JobTelemetryPoint.d.ts +56 -0
  60. package/dist/esm/models/JobTelemetryPoint.js +59 -0
  61. package/dist/esm/models/JobTrial.d.ts +79 -0
  62. package/dist/esm/models/JobTrial.js +73 -0
  63. package/dist/esm/models/Secret.d.ts +62 -0
  64. package/dist/esm/models/Secret.js +63 -0
  65. package/dist/esm/models/SecretCreate.d.ts +44 -0
  66. package/dist/esm/models/SecretCreate.js +49 -0
  67. package/dist/esm/models/SecretImportItem.d.ts +38 -0
  68. package/dist/esm/models/SecretImportItem.js +47 -0
  69. package/dist/esm/models/SecretImportRequest.d.ts +39 -0
  70. package/dist/esm/models/SecretImportRequest.js +46 -0
  71. package/dist/esm/models/SecretImportResult.d.ts +44 -0
  72. package/dist/esm/models/SecretImportResult.js +51 -0
  73. package/dist/esm/models/SecretList.d.ts +33 -0
  74. package/dist/esm/models/SecretList.js +44 -0
  75. package/dist/esm/models/SecretPut.d.ts +38 -0
  76. package/dist/esm/models/SecretPut.js +45 -0
  77. package/dist/esm/models/index.d.ts +25 -0
  78. package/dist/esm/models/index.js +25 -0
  79. package/dist/esm/runtime.js +1 -1
  80. package/dist/models/DedicatedIPOffer.d.ts +98 -0
  81. package/dist/models/DedicatedIPOffer.js +94 -0
  82. package/dist/models/Endpoint.d.ts +147 -0
  83. package/dist/models/Endpoint.js +129 -0
  84. package/dist/models/EndpointCreate.d.ts +80 -0
  85. package/dist/models/EndpointCreate.js +70 -0
  86. package/dist/models/EndpointList.d.ts +33 -0
  87. package/dist/models/EndpointList.js +51 -0
  88. package/dist/models/EndpointMachine.d.ts +90 -0
  89. package/dist/models/EndpointMachine.js +92 -0
  90. package/dist/models/EndpointReplicaCounts.d.ts +38 -0
  91. package/dist/models/EndpointReplicaCounts.js +54 -0
  92. package/dist/models/Job.d.ts +352 -0
  93. package/dist/models/Job.js +262 -0
  94. package/dist/models/JobAttempt.d.ts +176 -0
  95. package/dist/models/JobAttempt.js +155 -0
  96. package/dist/models/JobCreate.d.ts +153 -0
  97. package/dist/models/JobCreate.js +92 -0
  98. package/dist/models/JobGpuTypes.d.ts +39 -0
  99. package/dist/models/JobGpuTypes.js +55 -0
  100. package/dist/models/JobGpuTypesDataInner.d.ts +58 -0
  101. package/dist/models/JobGpuTypesDataInner.js +66 -0
  102. package/dist/models/JobLogChunk.d.ts +50 -0
  103. package/dist/models/JobLogChunk.js +62 -0
  104. package/dist/models/JobLogs.d.ts +39 -0
  105. package/dist/models/JobLogs.js +55 -0
  106. package/dist/models/JobPage.d.ts +39 -0
  107. package/dist/models/JobPage.js +55 -0
  108. package/dist/models/JobSharingHint.d.ts +46 -0
  109. package/dist/models/JobSharingHint.js +58 -0
  110. package/dist/models/JobTelemetry.d.ts +51 -0
  111. package/dist/models/JobTelemetry.js +63 -0
  112. package/dist/models/JobTelemetryPoint.d.ts +56 -0
  113. package/dist/models/JobTelemetryPoint.js +66 -0
  114. package/dist/models/JobTrial.d.ts +79 -0
  115. package/dist/models/JobTrial.js +81 -0
  116. package/dist/models/Secret.d.ts +62 -0
  117. package/dist/models/Secret.js +70 -0
  118. package/dist/models/SecretCreate.d.ts +44 -0
  119. package/dist/models/SecretCreate.js +56 -0
  120. package/dist/models/SecretImportItem.d.ts +38 -0
  121. package/dist/models/SecretImportItem.js +54 -0
  122. package/dist/models/SecretImportRequest.d.ts +39 -0
  123. package/dist/models/SecretImportRequest.js +53 -0
  124. package/dist/models/SecretImportResult.d.ts +44 -0
  125. package/dist/models/SecretImportResult.js +58 -0
  126. package/dist/models/SecretList.d.ts +33 -0
  127. package/dist/models/SecretList.js +51 -0
  128. package/dist/models/SecretPut.d.ts +38 -0
  129. package/dist/models/SecretPut.js +52 -0
  130. package/dist/models/index.d.ts +25 -0
  131. package/dist/models/index.js +25 -0
  132. package/dist/runtime.js +1 -1
  133. package/docs/DedicatedIPOffer.md +56 -0
  134. package/docs/Endpoint.md +68 -0
  135. package/docs/EndpointCreate.md +50 -0
  136. package/docs/EndpointList.md +34 -0
  137. package/docs/EndpointMachine.md +50 -0
  138. package/docs/EndpointReplicaCounts.md +36 -0
  139. package/docs/EndpointsApi.md +544 -0
  140. package/docs/InstancesApi.md +67 -0
  141. package/docs/Job.md +125 -0
  142. package/docs/JobAttempt.md +69 -0
  143. package/docs/JobCreate.md +66 -0
  144. package/docs/JobGpuTypes.md +36 -0
  145. package/docs/JobGpuTypesDataInner.md +42 -0
  146. package/docs/JobLogChunk.md +40 -0
  147. package/docs/JobLogs.md +36 -0
  148. package/docs/JobPage.md +36 -0
  149. package/docs/JobSharingHint.md +39 -0
  150. package/docs/JobTelemetry.md +40 -0
  151. package/docs/JobTelemetryPoint.md +42 -0
  152. package/docs/JobTrial.md +46 -0
  153. package/docs/JobsApi.md +609 -0
  154. package/docs/OperationsApi.md +76 -0
  155. package/docs/Secret.md +45 -0
  156. package/docs/SecretCreate.md +38 -0
  157. package/docs/SecretImportItem.md +36 -0
  158. package/docs/SecretImportRequest.md +36 -0
  159. package/docs/SecretImportResult.md +38 -0
  160. package/docs/SecretList.md +34 -0
  161. package/docs/SecretPut.md +36 -0
  162. package/docs/SecretsApi.md +450 -0
  163. package/package.json +1 -1
  164. package/src/apis/EndpointsApi.ts +481 -0
  165. package/src/apis/InstancesApi.ts +52 -0
  166. package/src/apis/JobsApi.ts +551 -0
  167. package/src/apis/OperationsApi.ts +59 -0
  168. package/src/apis/SecretsApi.ts +413 -0
  169. package/src/apis/index.ts +3 -0
  170. package/src/models/DedicatedIPOffer.ts +165 -0
  171. package/src/models/Endpoint.ts +247 -0
  172. package/src/models/EndpointCreate.ts +132 -0
  173. package/src/models/EndpointList.ts +74 -0
  174. package/src/models/EndpointMachine.ts +151 -0
  175. package/src/models/EndpointReplicaCounts.ts +75 -0
  176. package/src/models/Job.ts +538 -0
  177. package/src/models/JobAttempt.ts +267 -0
  178. package/src/models/JobCreate.ts +221 -0
  179. package/src/models/JobGpuTypes.ts +83 -0
  180. package/src/models/JobGpuTypesDataInner.ts +104 -0
  181. package/src/models/JobLogChunk.ts +93 -0
  182. package/src/models/JobLogs.ts +83 -0
  183. package/src/models/JobPage.ts +83 -0
  184. package/src/models/JobSharingHint.ts +86 -0
  185. package/src/models/JobTelemetry.ts +101 -0
  186. package/src/models/JobTelemetryPoint.ts +102 -0
  187. package/src/models/JobTrial.ts +132 -0
  188. package/src/models/Secret.ts +111 -0
  189. package/src/models/SecretCreate.ts +83 -0
  190. package/src/models/SecretImportItem.ts +75 -0
  191. package/src/models/SecretImportRequest.ts +82 -0
  192. package/src/models/SecretImportResult.ts +84 -0
  193. package/src/models/SecretList.ts +74 -0
  194. package/src/models/SecretPut.ts +74 -0
  195. package/src/models/index.ts +25 -0
  196. package/src/runtime.ts +1 -1
@@ -0,0 +1,324 @@
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 { SecretFromJSON, } from '../models/Secret';
25
+ import { SecretCreateToJSON, } from '../models/SecretCreate';
26
+ import { SecretImportRequestToJSON, } from '../models/SecretImportRequest';
27
+ import { SecretImportResultFromJSON, } from '../models/SecretImportResult';
28
+ import { SecretListFromJSON, } from '../models/SecretList';
29
+ import { SecretPutToJSON, } from '../models/SecretPut';
30
+ /**
31
+ *
32
+ */
33
+ export class SecretsApi extends runtime.BaseAPI {
34
+ /**
35
+ * Creates request options for createSecret without sending the request
36
+ */
37
+ createSecretRequestOpts(requestParameters) {
38
+ return __awaiter(this, void 0, void 0, function* () {
39
+ if (requestParameters['secretCreate'] == null) {
40
+ throw new runtime.RequiredError('secretCreate', 'Required parameter "secretCreate" was null or undefined when calling createSecret().');
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 = `/secrets`;
53
+ return {
54
+ path: urlPath,
55
+ method: 'POST',
56
+ headers: headerParameters,
57
+ query: queryParameters,
58
+ body: SecretCreateToJSON(requestParameters['secretCreate']),
59
+ };
60
+ });
61
+ }
62
+ /**
63
+ * Stores a new secret. The value crosses the wire on create, update and import only, is envelope encrypted at rest, and is never returned. The name is the environment variable the value is delivered as: a letter or underscore, then letters, digits and underscores, 128 characters at most; names starting with GPUAI_ and names the machine itself needs (PATH, HOME, LD_PRELOAD and similar) are refused. Values are at most 32 KB. Returns 409 `name_taken` when the name exists (use PUT to replace a value) and 422 `validation_failed` for a bad name or value. Every create, update, delete and use is recorded in the organization\'s audit log, without the value. Requires the `instances:write` scope.
64
+ * Create a secret
65
+ */
66
+ createSecretRaw(requestParameters, initOverrides) {
67
+ return __awaiter(this, void 0, void 0, function* () {
68
+ const requestOptions = yield this.createSecretRequestOpts(requestParameters);
69
+ const response = yield this.request(requestOptions, initOverrides);
70
+ return new runtime.JSONApiResponse(response, (jsonValue) => SecretFromJSON(jsonValue));
71
+ });
72
+ }
73
+ /**
74
+ * Stores a new secret. The value crosses the wire on create, update and import only, is envelope encrypted at rest, and is never returned. The name is the environment variable the value is delivered as: a letter or underscore, then letters, digits and underscores, 128 characters at most; names starting with GPUAI_ and names the machine itself needs (PATH, HOME, LD_PRELOAD and similar) are refused. Values are at most 32 KB. Returns 409 `name_taken` when the name exists (use PUT to replace a value) and 422 `validation_failed` for a bad name or value. Every create, update, delete and use is recorded in the organization\'s audit log, without the value. Requires the `instances:write` scope.
75
+ * Create a secret
76
+ */
77
+ createSecret(requestParameters, initOverrides) {
78
+ return __awaiter(this, void 0, void 0, function* () {
79
+ const response = yield this.createSecretRaw(requestParameters, initOverrides);
80
+ return yield response.value();
81
+ });
82
+ }
83
+ /**
84
+ * Creates request options for deleteSecret without sending the request
85
+ */
86
+ deleteSecretRequestOpts(requestParameters) {
87
+ return __awaiter(this, void 0, void 0, function* () {
88
+ if (requestParameters['name'] == null) {
89
+ throw new runtime.RequiredError('name', 'Required parameter "name" was null or undefined when calling deleteSecret().');
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 = `/secrets/{name}`;
101
+ urlPath = urlPath.replace('{name}', encodeURIComponent(String(requestParameters['name'])));
102
+ return {
103
+ path: urlPath,
104
+ method: 'DELETE',
105
+ headers: headerParameters,
106
+ query: queryParameters,
107
+ };
108
+ });
109
+ }
110
+ /**
111
+ * Deletes the secret. Machines already running keep the value they were given; nothing started later can receive it, and a function version or job that still names it fails its next run. Requires the `instances:write` scope.
112
+ * Delete a secret
113
+ */
114
+ deleteSecretRaw(requestParameters, initOverrides) {
115
+ return __awaiter(this, void 0, void 0, function* () {
116
+ const requestOptions = yield this.deleteSecretRequestOpts(requestParameters);
117
+ const response = yield this.request(requestOptions, initOverrides);
118
+ return new runtime.VoidApiResponse(response);
119
+ });
120
+ }
121
+ /**
122
+ * Deletes the secret. Machines already running keep the value they were given; nothing started later can receive it, and a function version or job that still names it fails its next run. Requires the `instances:write` scope.
123
+ * Delete a secret
124
+ */
125
+ deleteSecret(requestParameters, initOverrides) {
126
+ return __awaiter(this, void 0, void 0, function* () {
127
+ yield this.deleteSecretRaw(requestParameters, initOverrides);
128
+ });
129
+ }
130
+ /**
131
+ * Creates request options for getSecret without sending the request
132
+ */
133
+ getSecretRequestOpts(requestParameters) {
134
+ return __awaiter(this, void 0, void 0, function* () {
135
+ if (requestParameters['name'] == null) {
136
+ throw new runtime.RequiredError('name', 'Required parameter "name" was null or undefined when calling getSecret().');
137
+ }
138
+ const queryParameters = {};
139
+ const headerParameters = {};
140
+ if (this.configuration && this.configuration.accessToken) {
141
+ const token = this.configuration.accessToken;
142
+ const tokenString = yield token("bearerAuth", []);
143
+ if (tokenString) {
144
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
145
+ }
146
+ }
147
+ let urlPath = `/secrets/{name}`;
148
+ urlPath = urlPath.replace('{name}', encodeURIComponent(String(requestParameters['name'])));
149
+ return {
150
+ path: urlPath,
151
+ method: 'GET',
152
+ headers: headerParameters,
153
+ query: queryParameters,
154
+ };
155
+ });
156
+ }
157
+ /**
158
+ * Returns one secret\'s metadata. The value is never returned. Requires the `instances:read` scope. 404 `not_found` when the organization has no secret with this name.
159
+ * Get a secret\'s metadata
160
+ */
161
+ getSecretRaw(requestParameters, initOverrides) {
162
+ return __awaiter(this, void 0, void 0, function* () {
163
+ const requestOptions = yield this.getSecretRequestOpts(requestParameters);
164
+ const response = yield this.request(requestOptions, initOverrides);
165
+ return new runtime.JSONApiResponse(response, (jsonValue) => SecretFromJSON(jsonValue));
166
+ });
167
+ }
168
+ /**
169
+ * Returns one secret\'s metadata. The value is never returned. Requires the `instances:read` scope. 404 `not_found` when the organization has no secret with this name.
170
+ * Get a secret\'s metadata
171
+ */
172
+ getSecret(requestParameters, initOverrides) {
173
+ return __awaiter(this, void 0, void 0, function* () {
174
+ const response = yield this.getSecretRaw(requestParameters, initOverrides);
175
+ return yield response.value();
176
+ });
177
+ }
178
+ /**
179
+ * Creates request options for importSecrets without sending the request
180
+ */
181
+ importSecretsRequestOpts(requestParameters) {
182
+ return __awaiter(this, void 0, void 0, function* () {
183
+ if (requestParameters['secretImportRequest'] == null) {
184
+ throw new runtime.RequiredError('secretImportRequest', 'Required parameter "secretImportRequest" was null or undefined when calling importSecrets().');
185
+ }
186
+ const queryParameters = {};
187
+ const headerParameters = {};
188
+ headerParameters['Content-Type'] = 'application/json';
189
+ if (this.configuration && this.configuration.accessToken) {
190
+ const token = this.configuration.accessToken;
191
+ const tokenString = yield token("bearerAuth", []);
192
+ if (tokenString) {
193
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
194
+ }
195
+ }
196
+ let urlPath = `/secrets/import`;
197
+ return {
198
+ path: urlPath,
199
+ method: 'POST',
200
+ headers: headerParameters,
201
+ query: queryParameters,
202
+ body: SecretImportRequestToJSON(requestParameters['secretImportRequest']),
203
+ };
204
+ });
205
+ }
206
+ /**
207
+ * Creates or updates many secrets at once, for example the output of `infisical export` or a .env file parsed by the client (the `gpu secrets import` command parses dotenv and Infisical JSON locally and sends this request). Every item is validated before any is written. With `overwrite` false, existing secrets are left untouched and listed under `skipped`. At most 200 items. Requires the `instances:write` scope.
208
+ * Import secrets
209
+ */
210
+ importSecretsRaw(requestParameters, initOverrides) {
211
+ return __awaiter(this, void 0, void 0, function* () {
212
+ const requestOptions = yield this.importSecretsRequestOpts(requestParameters);
213
+ const response = yield this.request(requestOptions, initOverrides);
214
+ return new runtime.JSONApiResponse(response, (jsonValue) => SecretImportResultFromJSON(jsonValue));
215
+ });
216
+ }
217
+ /**
218
+ * Creates or updates many secrets at once, for example the output of `infisical export` or a .env file parsed by the client (the `gpu secrets import` command parses dotenv and Infisical JSON locally and sends this request). Every item is validated before any is written. With `overwrite` false, existing secrets are left untouched and listed under `skipped`. At most 200 items. Requires the `instances:write` scope.
219
+ * Import secrets
220
+ */
221
+ importSecrets(requestParameters, initOverrides) {
222
+ return __awaiter(this, void 0, void 0, function* () {
223
+ const response = yield this.importSecretsRaw(requestParameters, initOverrides);
224
+ return yield response.value();
225
+ });
226
+ }
227
+ /**
228
+ * Creates request options for listSecrets without sending the request
229
+ */
230
+ listSecretsRequestOpts() {
231
+ return __awaiter(this, void 0, void 0, function* () {
232
+ const queryParameters = {};
233
+ const headerParameters = {};
234
+ if (this.configuration && this.configuration.accessToken) {
235
+ const token = this.configuration.accessToken;
236
+ const tokenString = yield token("bearerAuth", []);
237
+ if (tokenString) {
238
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
239
+ }
240
+ }
241
+ let urlPath = `/secrets`;
242
+ return {
243
+ path: urlPath,
244
+ method: 'GET',
245
+ headers: headerParameters,
246
+ query: queryParameters,
247
+ };
248
+ });
249
+ }
250
+ /**
251
+ * Lists the organization\'s secrets by name with their metadata. Values are never returned by any read. Requires the `instances:read` scope. Returns 503 `secrets_unavailable` when secrets are switched on but no encryption key is configured, and 404 when the feature is off.
252
+ * List secrets
253
+ */
254
+ listSecretsRaw(initOverrides) {
255
+ return __awaiter(this, void 0, void 0, function* () {
256
+ const requestOptions = yield this.listSecretsRequestOpts();
257
+ const response = yield this.request(requestOptions, initOverrides);
258
+ return new runtime.JSONApiResponse(response, (jsonValue) => SecretListFromJSON(jsonValue));
259
+ });
260
+ }
261
+ /**
262
+ * Lists the organization\'s secrets by name with their metadata. Values are never returned by any read. Requires the `instances:read` scope. Returns 503 `secrets_unavailable` when secrets are switched on but no encryption key is configured, and 404 when the feature is off.
263
+ * List secrets
264
+ */
265
+ listSecrets(initOverrides) {
266
+ return __awaiter(this, void 0, void 0, function* () {
267
+ const response = yield this.listSecretsRaw(initOverrides);
268
+ return yield response.value();
269
+ });
270
+ }
271
+ /**
272
+ * Creates request options for putSecret without sending the request
273
+ */
274
+ putSecretRequestOpts(requestParameters) {
275
+ return __awaiter(this, void 0, void 0, function* () {
276
+ if (requestParameters['name'] == null) {
277
+ throw new runtime.RequiredError('name', 'Required parameter "name" was null or undefined when calling putSecret().');
278
+ }
279
+ if (requestParameters['secretPut'] == null) {
280
+ throw new runtime.RequiredError('secretPut', 'Required parameter "secretPut" was null or undefined when calling putSecret().');
281
+ }
282
+ const queryParameters = {};
283
+ const headerParameters = {};
284
+ headerParameters['Content-Type'] = 'application/json';
285
+ if (this.configuration && this.configuration.accessToken) {
286
+ const token = this.configuration.accessToken;
287
+ const tokenString = yield token("bearerAuth", []);
288
+ if (tokenString) {
289
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
290
+ }
291
+ }
292
+ let urlPath = `/secrets/{name}`;
293
+ urlPath = urlPath.replace('{name}', encodeURIComponent(String(requestParameters['name'])));
294
+ return {
295
+ path: urlPath,
296
+ method: 'PUT',
297
+ headers: headerParameters,
298
+ query: queryParameters,
299
+ body: SecretPutToJSON(requestParameters['secretPut']),
300
+ };
301
+ });
302
+ }
303
+ /**
304
+ * Sets the secret\'s value, creating the secret when it does not exist (201) or replacing the value and bumping its version when it does (200). Omit `description` to keep the current one. Machines already running keep the value they were given; launches and calls from now on get the new one. Requires the `instances:write` scope.
305
+ * Create or replace a secret
306
+ */
307
+ putSecretRaw(requestParameters, initOverrides) {
308
+ return __awaiter(this, void 0, void 0, function* () {
309
+ const requestOptions = yield this.putSecretRequestOpts(requestParameters);
310
+ const response = yield this.request(requestOptions, initOverrides);
311
+ return new runtime.JSONApiResponse(response, (jsonValue) => SecretFromJSON(jsonValue));
312
+ });
313
+ }
314
+ /**
315
+ * Sets the secret\'s value, creating the secret when it does not exist (201) or replacing the value and bumping its version when it does (200). Omit `description` to keep the current one. Machines already running keep the value they were given; launches and calls from now on get the new one. Requires the `instances:write` scope.
316
+ * Create or replace a secret
317
+ */
318
+ putSecret(requestParameters, initOverrides) {
319
+ return __awaiter(this, void 0, void 0, function* () {
320
+ const response = yield this.putSecretRaw(requestParameters, initOverrides);
321
+ return yield response.value();
322
+ });
323
+ }
324
+ }
@@ -1,17 +1,20 @@
1
1
  export * from './AutolaunchApi';
2
2
  export * from './BillingApi';
3
3
  export * from './CommunityApi';
4
+ export * from './EndpointsApi';
4
5
  export * from './EnvironmentsApi';
5
6
  export * from './FineTuningApi';
6
7
  export * from './FunctionsApi';
7
8
  export * from './GpuTypesApi';
8
9
  export * from './InferenceApi';
9
10
  export * from './InstancesApi';
11
+ export * from './JobsApi';
10
12
  export * from './MarketApi';
11
13
  export * from './MetaApi';
12
14
  export * from './OperationsApi';
13
15
  export * from './PricingApi';
14
16
  export * from './RegistryCredentialsApi';
17
+ export * from './SecretsApi';
15
18
  export * from './SshKeysApi';
16
19
  export * from './TemplatesApi';
17
20
  export * from './UsageApi';
@@ -3,17 +3,20 @@
3
3
  export * from './AutolaunchApi';
4
4
  export * from './BillingApi';
5
5
  export * from './CommunityApi';
6
+ export * from './EndpointsApi';
6
7
  export * from './EnvironmentsApi';
7
8
  export * from './FineTuningApi';
8
9
  export * from './FunctionsApi';
9
10
  export * from './GpuTypesApi';
10
11
  export * from './InferenceApi';
11
12
  export * from './InstancesApi';
13
+ export * from './JobsApi';
12
14
  export * from './MarketApi';
13
15
  export * from './MetaApi';
14
16
  export * from './OperationsApi';
15
17
  export * from './PricingApi';
16
18
  export * from './RegistryCredentialsApi';
19
+ export * from './SecretsApi';
17
20
  export * from './SshKeysApi';
18
21
  export * from './TemplatesApi';
19
22
  export * from './UsageApi';
@@ -0,0 +1,98 @@
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 DedicatedIPOffer
16
+ */
17
+ export interface DedicatedIPOffer {
18
+ /**
19
+ *
20
+ * @type {boolean}
21
+ * @memberof DedicatedIPOffer
22
+ */
23
+ enabled: boolean;
24
+ /**
25
+ * Ports and port ranges a launch may forward, e.g. `80,443,1024-65535`.
26
+ * @type {string}
27
+ * @memberof DedicatedIPOffer
28
+ */
29
+ allowedPorts: string;
30
+ /**
31
+ * Ports forwarded when the request names none.
32
+ * @type {Array<number>}
33
+ * @memberof DedicatedIPOffer
34
+ */
35
+ defaultPorts: Array<number>;
36
+ /**
37
+ * Most ports one address may forward.
38
+ * @type {number}
39
+ * @memberof DedicatedIPOffer
40
+ */
41
+ maxPorts: number;
42
+ /**
43
+ * USD per hour while attached, from the instance becoming running until release.
44
+ * @type {number}
45
+ * @memberof DedicatedIPOffer
46
+ */
47
+ hourlyFee: number;
48
+ /**
49
+ * USD per GB through the address, inbound and outbound.
50
+ * @type {number}
51
+ * @memberof DedicatedIPOffer
52
+ */
53
+ transferPricePerGb: number;
54
+ /**
55
+ * GB of transfer per attachment that is not charged.
56
+ * @type {number}
57
+ * @memberof DedicatedIPOffer
58
+ */
59
+ transferIncludedGb: number;
60
+ /**
61
+ * GB per attachment after which forwarding is suspended.
62
+ * @type {number}
63
+ * @memberof DedicatedIPOffer
64
+ */
65
+ transferCapGb: number;
66
+ /**
67
+ * Most dedicated IPs the organization may hold at once.
68
+ * @type {number}
69
+ * @memberof DedicatedIPOffer
70
+ */
71
+ orgLimit: number;
72
+ /**
73
+ * Dedicated IPs the organization holds now.
74
+ * @type {number}
75
+ * @memberof DedicatedIPOffer
76
+ */
77
+ orgInUse: number;
78
+ /**
79
+ * Addresses free for a new launch right now.
80
+ * @type {number}
81
+ * @memberof DedicatedIPOffer
82
+ */
83
+ available: number;
84
+ /**
85
+ * The acceptable use policy for dedicated IPs.
86
+ * @type {string}
87
+ * @memberof DedicatedIPOffer
88
+ */
89
+ acceptableUse: string;
90
+ }
91
+ /**
92
+ * Check if a given object implements the DedicatedIPOffer interface.
93
+ */
94
+ export declare function instanceOfDedicatedIPOffer(value: object): value is DedicatedIPOffer;
95
+ export declare function DedicatedIPOfferFromJSON(json: any): DedicatedIPOffer;
96
+ export declare function DedicatedIPOfferFromJSONTyped(json: any, ignoreDiscriminator: boolean): DedicatedIPOffer;
97
+ export declare function DedicatedIPOfferToJSON(json: any): DedicatedIPOffer;
98
+ export declare function DedicatedIPOfferToJSONTyped(value?: DedicatedIPOffer | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,87 @@
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
+ * Check if a given object implements the DedicatedIPOffer interface.
16
+ */
17
+ export function instanceOfDedicatedIPOffer(value) {
18
+ if (!('enabled' in value) || value['enabled'] === undefined)
19
+ return false;
20
+ if ((!('allowedPorts' in value) && !('allowed_ports' in value)) || (value['allowedPorts'] === undefined && value['allowed_ports'] === undefined))
21
+ return false;
22
+ if ((!('defaultPorts' in value) && !('default_ports' in value)) || (value['defaultPorts'] === undefined && value['default_ports'] === undefined))
23
+ return false;
24
+ if ((!('maxPorts' in value) && !('max_ports' in value)) || (value['maxPorts'] === undefined && value['max_ports'] === undefined))
25
+ return false;
26
+ if ((!('hourlyFee' in value) && !('hourly_fee' in value)) || (value['hourlyFee'] === undefined && value['hourly_fee'] === undefined))
27
+ return false;
28
+ if ((!('transferPricePerGb' in value) && !('transfer_price_per_gb' in value)) || (value['transferPricePerGb'] === undefined && value['transfer_price_per_gb'] === undefined))
29
+ return false;
30
+ if ((!('transferIncludedGb' in value) && !('transfer_included_gb' in value)) || (value['transferIncludedGb'] === undefined && value['transfer_included_gb'] === undefined))
31
+ return false;
32
+ if ((!('transferCapGb' in value) && !('transfer_cap_gb' in value)) || (value['transferCapGb'] === undefined && value['transfer_cap_gb'] === undefined))
33
+ return false;
34
+ if ((!('orgLimit' in value) && !('org_limit' in value)) || (value['orgLimit'] === undefined && value['org_limit'] === undefined))
35
+ return false;
36
+ if ((!('orgInUse' in value) && !('org_in_use' in value)) || (value['orgInUse'] === undefined && value['org_in_use'] === undefined))
37
+ return false;
38
+ if (!('available' in value) || value['available'] === undefined)
39
+ return false;
40
+ if ((!('acceptableUse' in value) && !('acceptable_use' in value)) || (value['acceptableUse'] === undefined && value['acceptable_use'] === undefined))
41
+ return false;
42
+ return true;
43
+ }
44
+ export function DedicatedIPOfferFromJSON(json) {
45
+ return DedicatedIPOfferFromJSONTyped(json, false);
46
+ }
47
+ export function DedicatedIPOfferFromJSONTyped(json, ignoreDiscriminator) {
48
+ if (json == null) {
49
+ return json;
50
+ }
51
+ return {
52
+ 'enabled': json['enabled'],
53
+ 'allowedPorts': json['allowed_ports'],
54
+ 'defaultPorts': json['default_ports'],
55
+ 'maxPorts': json['max_ports'],
56
+ 'hourlyFee': json['hourly_fee'],
57
+ 'transferPricePerGb': json['transfer_price_per_gb'],
58
+ 'transferIncludedGb': json['transfer_included_gb'],
59
+ 'transferCapGb': json['transfer_cap_gb'],
60
+ 'orgLimit': json['org_limit'],
61
+ 'orgInUse': json['org_in_use'],
62
+ 'available': json['available'],
63
+ 'acceptableUse': json['acceptable_use'],
64
+ };
65
+ }
66
+ export function DedicatedIPOfferToJSON(json) {
67
+ return DedicatedIPOfferToJSONTyped(json, false);
68
+ }
69
+ export function DedicatedIPOfferToJSONTyped(value, ignoreDiscriminator = false) {
70
+ if (value == null) {
71
+ return value;
72
+ }
73
+ return {
74
+ 'enabled': value['enabled'],
75
+ 'allowed_ports': value['allowedPorts'],
76
+ 'default_ports': value['defaultPorts'],
77
+ 'max_ports': value['maxPorts'],
78
+ 'hourly_fee': value['hourlyFee'],
79
+ 'transfer_price_per_gb': value['transferPricePerGb'],
80
+ 'transfer_included_gb': value['transferIncludedGb'],
81
+ 'transfer_cap_gb': value['transferCapGb'],
82
+ 'org_limit': value['orgLimit'],
83
+ 'org_in_use': value['orgInUse'],
84
+ 'available': value['available'],
85
+ 'acceptable_use': value['acceptableUse'],
86
+ };
87
+ }