@gpuai/sdk 0.5.4 → 0.5.6

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 (202) 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/Operation.d.ts +6 -0
  64. package/dist/esm/models/Operation.js +2 -0
  65. package/dist/esm/models/Secret.d.ts +62 -0
  66. package/dist/esm/models/Secret.js +63 -0
  67. package/dist/esm/models/SecretCreate.d.ts +44 -0
  68. package/dist/esm/models/SecretCreate.js +49 -0
  69. package/dist/esm/models/SecretImportItem.d.ts +38 -0
  70. package/dist/esm/models/SecretImportItem.js +47 -0
  71. package/dist/esm/models/SecretImportRequest.d.ts +39 -0
  72. package/dist/esm/models/SecretImportRequest.js +46 -0
  73. package/dist/esm/models/SecretImportResult.d.ts +44 -0
  74. package/dist/esm/models/SecretImportResult.js +51 -0
  75. package/dist/esm/models/SecretList.d.ts +33 -0
  76. package/dist/esm/models/SecretList.js +44 -0
  77. package/dist/esm/models/SecretPut.d.ts +38 -0
  78. package/dist/esm/models/SecretPut.js +45 -0
  79. package/dist/esm/models/index.d.ts +25 -0
  80. package/dist/esm/models/index.js +25 -0
  81. package/dist/esm/runtime.js +1 -1
  82. package/dist/models/DedicatedIPOffer.d.ts +98 -0
  83. package/dist/models/DedicatedIPOffer.js +94 -0
  84. package/dist/models/Endpoint.d.ts +147 -0
  85. package/dist/models/Endpoint.js +129 -0
  86. package/dist/models/EndpointCreate.d.ts +80 -0
  87. package/dist/models/EndpointCreate.js +70 -0
  88. package/dist/models/EndpointList.d.ts +33 -0
  89. package/dist/models/EndpointList.js +51 -0
  90. package/dist/models/EndpointMachine.d.ts +90 -0
  91. package/dist/models/EndpointMachine.js +92 -0
  92. package/dist/models/EndpointReplicaCounts.d.ts +38 -0
  93. package/dist/models/EndpointReplicaCounts.js +54 -0
  94. package/dist/models/Job.d.ts +352 -0
  95. package/dist/models/Job.js +262 -0
  96. package/dist/models/JobAttempt.d.ts +176 -0
  97. package/dist/models/JobAttempt.js +155 -0
  98. package/dist/models/JobCreate.d.ts +153 -0
  99. package/dist/models/JobCreate.js +92 -0
  100. package/dist/models/JobGpuTypes.d.ts +39 -0
  101. package/dist/models/JobGpuTypes.js +55 -0
  102. package/dist/models/JobGpuTypesDataInner.d.ts +58 -0
  103. package/dist/models/JobGpuTypesDataInner.js +66 -0
  104. package/dist/models/JobLogChunk.d.ts +50 -0
  105. package/dist/models/JobLogChunk.js +62 -0
  106. package/dist/models/JobLogs.d.ts +39 -0
  107. package/dist/models/JobLogs.js +55 -0
  108. package/dist/models/JobPage.d.ts +39 -0
  109. package/dist/models/JobPage.js +55 -0
  110. package/dist/models/JobSharingHint.d.ts +46 -0
  111. package/dist/models/JobSharingHint.js +58 -0
  112. package/dist/models/JobTelemetry.d.ts +51 -0
  113. package/dist/models/JobTelemetry.js +63 -0
  114. package/dist/models/JobTelemetryPoint.d.ts +56 -0
  115. package/dist/models/JobTelemetryPoint.js +66 -0
  116. package/dist/models/JobTrial.d.ts +79 -0
  117. package/dist/models/JobTrial.js +81 -0
  118. package/dist/models/Operation.d.ts +6 -0
  119. package/dist/models/Operation.js +2 -0
  120. package/dist/models/Secret.d.ts +62 -0
  121. package/dist/models/Secret.js +70 -0
  122. package/dist/models/SecretCreate.d.ts +44 -0
  123. package/dist/models/SecretCreate.js +56 -0
  124. package/dist/models/SecretImportItem.d.ts +38 -0
  125. package/dist/models/SecretImportItem.js +54 -0
  126. package/dist/models/SecretImportRequest.d.ts +39 -0
  127. package/dist/models/SecretImportRequest.js +53 -0
  128. package/dist/models/SecretImportResult.d.ts +44 -0
  129. package/dist/models/SecretImportResult.js +58 -0
  130. package/dist/models/SecretList.d.ts +33 -0
  131. package/dist/models/SecretList.js +51 -0
  132. package/dist/models/SecretPut.d.ts +38 -0
  133. package/dist/models/SecretPut.js +52 -0
  134. package/dist/models/index.d.ts +25 -0
  135. package/dist/models/index.js +25 -0
  136. package/dist/runtime.js +1 -1
  137. package/docs/DedicatedIPOffer.md +56 -0
  138. package/docs/Endpoint.md +68 -0
  139. package/docs/EndpointCreate.md +50 -0
  140. package/docs/EndpointList.md +34 -0
  141. package/docs/EndpointMachine.md +50 -0
  142. package/docs/EndpointReplicaCounts.md +36 -0
  143. package/docs/EndpointsApi.md +544 -0
  144. package/docs/InstancesApi.md +68 -1
  145. package/docs/Job.md +125 -0
  146. package/docs/JobAttempt.md +69 -0
  147. package/docs/JobCreate.md +66 -0
  148. package/docs/JobGpuTypes.md +36 -0
  149. package/docs/JobGpuTypesDataInner.md +42 -0
  150. package/docs/JobLogChunk.md +40 -0
  151. package/docs/JobLogs.md +36 -0
  152. package/docs/JobPage.md +36 -0
  153. package/docs/JobSharingHint.md +39 -0
  154. package/docs/JobTelemetry.md +40 -0
  155. package/docs/JobTelemetryPoint.md +42 -0
  156. package/docs/JobTrial.md +46 -0
  157. package/docs/JobsApi.md +609 -0
  158. package/docs/Operation.md +2 -0
  159. package/docs/OperationsApi.md +76 -0
  160. package/docs/Secret.md +45 -0
  161. package/docs/SecretCreate.md +38 -0
  162. package/docs/SecretImportItem.md +36 -0
  163. package/docs/SecretImportRequest.md +36 -0
  164. package/docs/SecretImportResult.md +38 -0
  165. package/docs/SecretList.md +34 -0
  166. package/docs/SecretPut.md +36 -0
  167. package/docs/SecretsApi.md +450 -0
  168. package/package.json +1 -1
  169. package/src/apis/EndpointsApi.ts +481 -0
  170. package/src/apis/InstancesApi.ts +52 -0
  171. package/src/apis/JobsApi.ts +551 -0
  172. package/src/apis/OperationsApi.ts +59 -0
  173. package/src/apis/SecretsApi.ts +413 -0
  174. package/src/apis/index.ts +3 -0
  175. package/src/models/DedicatedIPOffer.ts +165 -0
  176. package/src/models/Endpoint.ts +247 -0
  177. package/src/models/EndpointCreate.ts +132 -0
  178. package/src/models/EndpointList.ts +74 -0
  179. package/src/models/EndpointMachine.ts +151 -0
  180. package/src/models/EndpointReplicaCounts.ts +75 -0
  181. package/src/models/Job.ts +538 -0
  182. package/src/models/JobAttempt.ts +267 -0
  183. package/src/models/JobCreate.ts +221 -0
  184. package/src/models/JobGpuTypes.ts +83 -0
  185. package/src/models/JobGpuTypesDataInner.ts +104 -0
  186. package/src/models/JobLogChunk.ts +93 -0
  187. package/src/models/JobLogs.ts +83 -0
  188. package/src/models/JobPage.ts +83 -0
  189. package/src/models/JobSharingHint.ts +86 -0
  190. package/src/models/JobTelemetry.ts +101 -0
  191. package/src/models/JobTelemetryPoint.ts +102 -0
  192. package/src/models/JobTrial.ts +132 -0
  193. package/src/models/Operation.ts +8 -0
  194. package/src/models/Secret.ts +111 -0
  195. package/src/models/SecretCreate.ts +83 -0
  196. package/src/models/SecretImportItem.ts +75 -0
  197. package/src/models/SecretImportRequest.ts +82 -0
  198. package/src/models/SecretImportResult.ts +84 -0
  199. package/src/models/SecretList.ts +74 -0
  200. package/src/models/SecretPut.ts +74 -0
  201. package/src/models/index.ts +25 -0
  202. package/src/runtime.ts +1 -1
@@ -0,0 +1,450 @@
1
+ # SecretsApi
2
+
3
+ All URIs are relative to *https://api.gpu.ai/v1*
4
+
5
+ | Method | HTTP request | Description |
6
+ |------------- | ------------- | -------------|
7
+ | [**createSecret**](SecretsApi.md#createsecret) | **POST** /secrets | Create a secret |
8
+ | [**deleteSecret**](SecretsApi.md#deletesecret) | **DELETE** /secrets/{name} | Delete a secret |
9
+ | [**getSecret**](SecretsApi.md#getsecret) | **GET** /secrets/{name} | Get a secret\'s metadata |
10
+ | [**importSecrets**](SecretsApi.md#importsecrets) | **POST** /secrets/import | Import secrets |
11
+ | [**listSecrets**](SecretsApi.md#listsecrets) | **GET** /secrets | List secrets |
12
+ | [**putSecret**](SecretsApi.md#putsecret) | **PUT** /secrets/{name} | Create or replace a secret |
13
+
14
+
15
+
16
+ ## createSecret
17
+
18
+ > Secret createSecret(secretCreate)
19
+
20
+ Create a secret
21
+
22
+ 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.
23
+
24
+ ### Example
25
+
26
+ ```ts
27
+ import {
28
+ Configuration,
29
+ SecretsApi,
30
+ } from '@gpuai/sdk';
31
+ import type { CreateSecretRequest } from '@gpuai/sdk';
32
+
33
+ async function example() {
34
+ console.log("🚀 Testing @gpuai/sdk SDK...");
35
+ const config = new Configuration({
36
+ // Configure HTTP bearer authorization: bearerAuth
37
+ accessToken: "YOUR BEARER TOKEN",
38
+ });
39
+ const api = new SecretsApi(config);
40
+
41
+ const body = {
42
+ // SecretCreate
43
+ secretCreate: ...,
44
+ } satisfies CreateSecretRequest;
45
+
46
+ try {
47
+ const data = await api.createSecret(body);
48
+ console.log(data);
49
+ } catch (error) {
50
+ console.error(error);
51
+ }
52
+ }
53
+
54
+ // Run the test
55
+ example().catch(console.error);
56
+ ```
57
+
58
+ ### Parameters
59
+
60
+
61
+ | Name | Type | Description | Notes |
62
+ |------------- | ------------- | ------------- | -------------|
63
+ | **secretCreate** | [SecretCreate](SecretCreate.md) | | |
64
+
65
+ ### Return type
66
+
67
+ [**Secret**](Secret.md)
68
+
69
+ ### Authorization
70
+
71
+ [bearerAuth](../README.md#bearerAuth)
72
+
73
+ ### HTTP request headers
74
+
75
+ - **Content-Type**: `application/json`
76
+ - **Accept**: `application/json`, `application/problem+json`
77
+
78
+
79
+ ### HTTP response details
80
+ | Status code | Description | Response headers |
81
+ |-------------|-------------|------------------|
82
+ | **201** | Created (metadata only; no value). | - |
83
+ | **429** | Rate limit exceeded (RFC 7807). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
84
+ | **0** | Error response (RFC 7807) | - |
85
+
86
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
87
+
88
+
89
+ ## deleteSecret
90
+
91
+ > deleteSecret(name)
92
+
93
+ Delete a secret
94
+
95
+ 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 &#x60;instances:write&#x60; scope.
96
+
97
+ ### Example
98
+
99
+ ```ts
100
+ import {
101
+ Configuration,
102
+ SecretsApi,
103
+ } from '@gpuai/sdk';
104
+ import type { DeleteSecretRequest } from '@gpuai/sdk';
105
+
106
+ async function example() {
107
+ console.log("🚀 Testing @gpuai/sdk SDK...");
108
+ const config = new Configuration({
109
+ // Configure HTTP bearer authorization: bearerAuth
110
+ accessToken: "YOUR BEARER TOKEN",
111
+ });
112
+ const api = new SecretsApi(config);
113
+
114
+ const body = {
115
+ // string | The secret\'s name.
116
+ name: name_example,
117
+ } satisfies DeleteSecretRequest;
118
+
119
+ try {
120
+ const data = await api.deleteSecret(body);
121
+ console.log(data);
122
+ } catch (error) {
123
+ console.error(error);
124
+ }
125
+ }
126
+
127
+ // Run the test
128
+ example().catch(console.error);
129
+ ```
130
+
131
+ ### Parameters
132
+
133
+
134
+ | Name | Type | Description | Notes |
135
+ |------------- | ------------- | ------------- | -------------|
136
+ | **name** | `string` | The secret\&#39;s name. | [Defaults to `undefined`] |
137
+
138
+ ### Return type
139
+
140
+ `void` (Empty response body)
141
+
142
+ ### Authorization
143
+
144
+ [bearerAuth](../README.md#bearerAuth)
145
+
146
+ ### HTTP request headers
147
+
148
+ - **Content-Type**: Not defined
149
+ - **Accept**: `application/problem+json`
150
+
151
+
152
+ ### HTTP response details
153
+ | Status code | Description | Response headers |
154
+ |-------------|-------------|------------------|
155
+ | **204** | Deleted. | - |
156
+ | **404** | Error response (RFC 7807) | - |
157
+ | **429** | Rate limit exceeded (RFC 7807). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
158
+ | **0** | Error response (RFC 7807) | - |
159
+
160
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
161
+
162
+
163
+ ## getSecret
164
+
165
+ > Secret getSecret(name)
166
+
167
+ Get a secret\&#39;s metadata
168
+
169
+ Returns one secret\&#39;s metadata. The value is never returned. Requires the &#x60;instances:read&#x60; scope. 404 &#x60;not_found&#x60; when the organization has no secret with this name.
170
+
171
+ ### Example
172
+
173
+ ```ts
174
+ import {
175
+ Configuration,
176
+ SecretsApi,
177
+ } from '@gpuai/sdk';
178
+ import type { GetSecretRequest } from '@gpuai/sdk';
179
+
180
+ async function example() {
181
+ console.log("🚀 Testing @gpuai/sdk SDK...");
182
+ const config = new Configuration({
183
+ // Configure HTTP bearer authorization: bearerAuth
184
+ accessToken: "YOUR BEARER TOKEN",
185
+ });
186
+ const api = new SecretsApi(config);
187
+
188
+ const body = {
189
+ // string | The secret\'s name.
190
+ name: name_example,
191
+ } satisfies GetSecretRequest;
192
+
193
+ try {
194
+ const data = await api.getSecret(body);
195
+ console.log(data);
196
+ } catch (error) {
197
+ console.error(error);
198
+ }
199
+ }
200
+
201
+ // Run the test
202
+ example().catch(console.error);
203
+ ```
204
+
205
+ ### Parameters
206
+
207
+
208
+ | Name | Type | Description | Notes |
209
+ |------------- | ------------- | ------------- | -------------|
210
+ | **name** | `string` | The secret\&#39;s name. | [Defaults to `undefined`] |
211
+
212
+ ### Return type
213
+
214
+ [**Secret**](Secret.md)
215
+
216
+ ### Authorization
217
+
218
+ [bearerAuth](../README.md#bearerAuth)
219
+
220
+ ### HTTP request headers
221
+
222
+ - **Content-Type**: Not defined
223
+ - **Accept**: `application/json`, `application/problem+json`
224
+
225
+
226
+ ### HTTP response details
227
+ | Status code | Description | Response headers |
228
+ |-------------|-------------|------------------|
229
+ | **200** | The secret (no value). | - |
230
+ | **404** | Error response (RFC 7807) | - |
231
+ | **429** | Rate limit exceeded (RFC 7807). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
232
+ | **0** | Error response (RFC 7807) | - |
233
+
234
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
235
+
236
+
237
+ ## importSecrets
238
+
239
+ > SecretImportResult importSecrets(secretImportRequest)
240
+
241
+ Import secrets
242
+
243
+ Creates or updates many secrets at once, for example the output of &#x60;infisical export&#x60; or a .env file parsed by the client (the &#x60;gpu secrets import&#x60; command parses dotenv and Infisical JSON locally and sends this request). Every item is validated before any is written. With &#x60;overwrite&#x60; false, existing secrets are left untouched and listed under &#x60;skipped&#x60;. At most 200 items. Requires the &#x60;instances:write&#x60; scope.
244
+
245
+ ### Example
246
+
247
+ ```ts
248
+ import {
249
+ Configuration,
250
+ SecretsApi,
251
+ } from '@gpuai/sdk';
252
+ import type { ImportSecretsRequest } from '@gpuai/sdk';
253
+
254
+ async function example() {
255
+ console.log("🚀 Testing @gpuai/sdk SDK...");
256
+ const config = new Configuration({
257
+ // Configure HTTP bearer authorization: bearerAuth
258
+ accessToken: "YOUR BEARER TOKEN",
259
+ });
260
+ const api = new SecretsApi(config);
261
+
262
+ const body = {
263
+ // SecretImportRequest
264
+ secretImportRequest: ...,
265
+ } satisfies ImportSecretsRequest;
266
+
267
+ try {
268
+ const data = await api.importSecrets(body);
269
+ console.log(data);
270
+ } catch (error) {
271
+ console.error(error);
272
+ }
273
+ }
274
+
275
+ // Run the test
276
+ example().catch(console.error);
277
+ ```
278
+
279
+ ### Parameters
280
+
281
+
282
+ | Name | Type | Description | Notes |
283
+ |------------- | ------------- | ------------- | -------------|
284
+ | **secretImportRequest** | [SecretImportRequest](SecretImportRequest.md) | | |
285
+
286
+ ### Return type
287
+
288
+ [**SecretImportResult**](SecretImportResult.md)
289
+
290
+ ### Authorization
291
+
292
+ [bearerAuth](../README.md#bearerAuth)
293
+
294
+ ### HTTP request headers
295
+
296
+ - **Content-Type**: `application/json`
297
+ - **Accept**: `application/json`, `application/problem+json`
298
+
299
+
300
+ ### HTTP response details
301
+ | Status code | Description | Response headers |
302
+ |-------------|-------------|------------------|
303
+ | **200** | What the import did, by name. | - |
304
+ | **429** | Rate limit exceeded (RFC 7807). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
305
+ | **0** | Error response (RFC 7807) | - |
306
+
307
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
308
+
309
+
310
+ ## listSecrets
311
+
312
+ > SecretList listSecrets()
313
+
314
+ List secrets
315
+
316
+ Lists the organization\&#39;s secrets by name with their metadata. Values are never returned by any read. Requires the &#x60;instances:read&#x60; scope. Returns 503 &#x60;secrets_unavailable&#x60; when secrets are switched on but no encryption key is configured, and 404 when the feature is off.
317
+
318
+ ### Example
319
+
320
+ ```ts
321
+ import {
322
+ Configuration,
323
+ SecretsApi,
324
+ } from '@gpuai/sdk';
325
+ import type { ListSecretsRequest } from '@gpuai/sdk';
326
+
327
+ async function example() {
328
+ console.log("🚀 Testing @gpuai/sdk SDK...");
329
+ const config = new Configuration({
330
+ // Configure HTTP bearer authorization: bearerAuth
331
+ accessToken: "YOUR BEARER TOKEN",
332
+ });
333
+ const api = new SecretsApi(config);
334
+
335
+ try {
336
+ const data = await api.listSecrets();
337
+ console.log(data);
338
+ } catch (error) {
339
+ console.error(error);
340
+ }
341
+ }
342
+
343
+ // Run the test
344
+ example().catch(console.error);
345
+ ```
346
+
347
+ ### Parameters
348
+
349
+ This endpoint does not need any parameter.
350
+
351
+ ### Return type
352
+
353
+ [**SecretList**](SecretList.md)
354
+
355
+ ### Authorization
356
+
357
+ [bearerAuth](../README.md#bearerAuth)
358
+
359
+ ### HTTP request headers
360
+
361
+ - **Content-Type**: Not defined
362
+ - **Accept**: `application/json`, `application/problem+json`
363
+
364
+
365
+ ### HTTP response details
366
+ | Status code | Description | Response headers |
367
+ |-------------|-------------|------------------|
368
+ | **200** | The organization\&#39;s secrets (no values). | - |
369
+ | **429** | Rate limit exceeded (RFC 7807). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
370
+ | **0** | Error response (RFC 7807) | - |
371
+
372
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
373
+
374
+
375
+ ## putSecret
376
+
377
+ > Secret putSecret(name, secretPut)
378
+
379
+ Create or replace a secret
380
+
381
+ Sets the secret\&#39;s value, creating the secret when it does not exist (201) or replacing the value and bumping its version when it does (200). Omit &#x60;description&#x60; 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 &#x60;instances:write&#x60; scope.
382
+
383
+ ### Example
384
+
385
+ ```ts
386
+ import {
387
+ Configuration,
388
+ SecretsApi,
389
+ } from '@gpuai/sdk';
390
+ import type { PutSecretRequest } from '@gpuai/sdk';
391
+
392
+ async function example() {
393
+ console.log("🚀 Testing @gpuai/sdk SDK...");
394
+ const config = new Configuration({
395
+ // Configure HTTP bearer authorization: bearerAuth
396
+ accessToken: "YOUR BEARER TOKEN",
397
+ });
398
+ const api = new SecretsApi(config);
399
+
400
+ const body = {
401
+ // string | The secret\'s name.
402
+ name: name_example,
403
+ // SecretPut
404
+ secretPut: ...,
405
+ } satisfies PutSecretRequest;
406
+
407
+ try {
408
+ const data = await api.putSecret(body);
409
+ console.log(data);
410
+ } catch (error) {
411
+ console.error(error);
412
+ }
413
+ }
414
+
415
+ // Run the test
416
+ example().catch(console.error);
417
+ ```
418
+
419
+ ### Parameters
420
+
421
+
422
+ | Name | Type | Description | Notes |
423
+ |------------- | ------------- | ------------- | -------------|
424
+ | **name** | `string` | The secret\&#39;s name. | [Defaults to `undefined`] |
425
+ | **secretPut** | [SecretPut](SecretPut.md) | | |
426
+
427
+ ### Return type
428
+
429
+ [**Secret**](Secret.md)
430
+
431
+ ### Authorization
432
+
433
+ [bearerAuth](../README.md#bearerAuth)
434
+
435
+ ### HTTP request headers
436
+
437
+ - **Content-Type**: `application/json`
438
+ - **Accept**: `application/json`, `application/problem+json`
439
+
440
+
441
+ ### HTTP response details
442
+ | Status code | Description | Response headers |
443
+ |-------------|-------------|------------------|
444
+ | **200** | Value replaced (metadata only). | - |
445
+ | **201** | Created (metadata only). | - |
446
+ | **429** | Rate limit exceeded (RFC 7807). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
447
+ | **0** | Error response (RFC 7807) | - |
448
+
449
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
450
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gpuai/sdk",
3
- "version": "0.5.4",
3
+ "version": "0.5.6",
4
4
  "description": "TypeScript SDK for the GPU.ai Public Developer API",
5
5
  "author": "GPU.ai Support <support@gpu.ai>",
6
6
  "repository": {