casedev 0.53.0 → 0.54.0

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 (52) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/package.json +1 -1
  3. package/resources/compute/v1/index.d.mts +2 -0
  4. package/resources/compute/v1/index.d.mts.map +1 -1
  5. package/resources/compute/v1/index.d.ts +2 -0
  6. package/resources/compute/v1/index.d.ts.map +1 -1
  7. package/resources/compute/v1/index.js +5 -1
  8. package/resources/compute/v1/index.js.map +1 -1
  9. package/resources/compute/v1/index.mjs +2 -0
  10. package/resources/compute/v1/index.mjs.map +1 -1
  11. package/resources/compute/v1/instance-types.d.mts +73 -0
  12. package/resources/compute/v1/instance-types.d.mts.map +1 -0
  13. package/resources/compute/v1/instance-types.d.ts +73 -0
  14. package/resources/compute/v1/instance-types.d.ts.map +1 -0
  15. package/resources/compute/v1/instance-types.js +27 -0
  16. package/resources/compute/v1/instance-types.js.map +1 -0
  17. package/resources/compute/v1/instance-types.mjs +23 -0
  18. package/resources/compute/v1/instance-types.mjs.map +1 -0
  19. package/resources/compute/v1/instances.d.mts +160 -0
  20. package/resources/compute/v1/instances.d.mts.map +1 -0
  21. package/resources/compute/v1/instances.d.ts +160 -0
  22. package/resources/compute/v1/instances.d.ts.map +1 -0
  23. package/resources/compute/v1/instances.js +77 -0
  24. package/resources/compute/v1/instances.js.map +1 -0
  25. package/resources/compute/v1/instances.mjs +73 -0
  26. package/resources/compute/v1/instances.mjs.map +1 -0
  27. package/resources/compute/v1/v1.d.mts +19 -0
  28. package/resources/compute/v1/v1.d.mts.map +1 -1
  29. package/resources/compute/v1/v1.d.ts +19 -0
  30. package/resources/compute/v1/v1.d.ts.map +1 -1
  31. package/resources/compute/v1/v1.js +25 -0
  32. package/resources/compute/v1/v1.js.map +1 -1
  33. package/resources/compute/v1/v1.mjs +25 -0
  34. package/resources/compute/v1/v1.mjs.map +1 -1
  35. package/resources/vault/vault.d.mts +6 -5
  36. package/resources/vault/vault.d.mts.map +1 -1
  37. package/resources/vault/vault.d.ts +6 -5
  38. package/resources/vault/vault.d.ts.map +1 -1
  39. package/resources/vault/vault.js +6 -5
  40. package/resources/vault/vault.js.map +1 -1
  41. package/resources/vault/vault.mjs +6 -5
  42. package/resources/vault/vault.mjs.map +1 -1
  43. package/src/resources/compute/v1/index.ts +9 -0
  44. package/src/resources/compute/v1/instance-types.ts +89 -0
  45. package/src/resources/compute/v1/instances.ts +240 -0
  46. package/src/resources/compute/v1/v1.ts +44 -0
  47. package/src/resources/vault/vault.ts +6 -5
  48. package/src/version.ts +1 -1
  49. package/version.d.mts +1 -1
  50. package/version.d.ts +1 -1
  51. package/version.js +1 -1
  52. package/version.mjs +1 -1
@@ -9,6 +9,15 @@ export {
9
9
  type EnvironmentSetDefaultResponse,
10
10
  type EnvironmentCreateParams,
11
11
  } from './environments';
12
+ export { InstanceTypes, type InstanceTypeListResponse } from './instance-types';
13
+ export {
14
+ Instances,
15
+ type InstanceCreateResponse,
16
+ type InstanceRetrieveResponse,
17
+ type InstanceListResponse,
18
+ type InstanceDeleteResponse,
19
+ type InstanceCreateParams,
20
+ } from './instances';
12
21
  export {
13
22
  Secrets,
14
23
  type SecretCreateResponse,
@@ -0,0 +1,89 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../../core/resource';
4
+ import { APIPromise } from '../../../core/api-promise';
5
+ import { RequestOptions } from '../../../internal/request-options';
6
+
7
+ /**
8
+ * Serverless GPU and CPU infrastructure
9
+ */
10
+ export class InstanceTypes extends APIResource {
11
+ /**
12
+ * Retrieves all available GPU instance types with pricing, specifications, and
13
+ * regional availability. Includes T4, A10, A100, H100, and H200 GPUs powered by
14
+ * Lambda Labs. Perfect for AI model training, inference workloads, and legal
15
+ * document OCR processing at scale.
16
+ *
17
+ * @example
18
+ * ```ts
19
+ * const instanceTypes =
20
+ * await client.compute.v1.instanceTypes.list();
21
+ * ```
22
+ */
23
+ list(options?: RequestOptions): APIPromise<InstanceTypeListResponse> {
24
+ return this._client.get('/compute/v1/instance-types', options);
25
+ }
26
+ }
27
+
28
+ export interface InstanceTypeListResponse {
29
+ /**
30
+ * Total number of instance types
31
+ */
32
+ count: number;
33
+
34
+ instanceTypes: Array<InstanceTypeListResponse.InstanceType>;
35
+ }
36
+
37
+ export namespace InstanceTypeListResponse {
38
+ export interface InstanceType {
39
+ /**
40
+ * Instance description
41
+ */
42
+ description?: string;
43
+
44
+ /**
45
+ * GPU model and count
46
+ */
47
+ gpu?: string;
48
+
49
+ /**
50
+ * Instance type identifier
51
+ */
52
+ name?: string;
53
+
54
+ /**
55
+ * Price per hour (e.g. '$1.20')
56
+ */
57
+ pricePerHour?: string;
58
+
59
+ /**
60
+ * Available regions
61
+ */
62
+ regionsAvailable?: Array<string>;
63
+
64
+ specs?: InstanceType.Specs;
65
+ }
66
+
67
+ export namespace InstanceType {
68
+ export interface Specs {
69
+ /**
70
+ * RAM in GiB
71
+ */
72
+ memoryGib?: number;
73
+
74
+ /**
75
+ * Storage in GiB
76
+ */
77
+ storageGib?: number;
78
+
79
+ /**
80
+ * Number of vCPUs
81
+ */
82
+ vcpus?: number;
83
+ }
84
+ }
85
+ }
86
+
87
+ export declare namespace InstanceTypes {
88
+ export { type InstanceTypeListResponse as InstanceTypeListResponse };
89
+ }
@@ -0,0 +1,240 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../../core/resource';
4
+ import { APIPromise } from '../../../core/api-promise';
5
+ import { RequestOptions } from '../../../internal/request-options';
6
+ import { path } from '../../../internal/utils/path';
7
+
8
+ /**
9
+ * Serverless GPU and CPU infrastructure
10
+ */
11
+ export class Instances extends APIResource {
12
+ /**
13
+ * Launches a new GPU compute instance with automatic SSH key generation. Supports
14
+ * mounting Case.dev Vaults as filesystems and configurable auto-shutdown. Instance
15
+ * boots in ~2-5 minutes. Perfect for batch OCR processing, AI model training, and
16
+ * intensive document analysis workloads.
17
+ *
18
+ * @example
19
+ * ```ts
20
+ * const instance = await client.compute.v1.instances.create({
21
+ * instanceType: 'gpu_1x_a10',
22
+ * name: 'ocr-batch-job',
23
+ * region: 'us-west-1',
24
+ * autoShutdownMinutes: 120,
25
+ * vaultIds: ['vault_abc123'],
26
+ * });
27
+ * ```
28
+ */
29
+ create(body: InstanceCreateParams, options?: RequestOptions): APIPromise<InstanceCreateResponse> {
30
+ return this._client.post('/compute/v1/instances', { body, ...options });
31
+ }
32
+
33
+ /**
34
+ * Retrieves detailed information about a GPU instance including SSH connection
35
+ * details, vault mount scripts, real-time cost tracking, and current status. SSH
36
+ * private key included for secure access.
37
+ *
38
+ * @example
39
+ * ```ts
40
+ * const instance = await client.compute.v1.instances.retrieve(
41
+ * 'id',
42
+ * );
43
+ * ```
44
+ */
45
+ retrieve(id: string, options?: RequestOptions): APIPromise<InstanceRetrieveResponse> {
46
+ return this._client.get(path`/compute/v1/instances/${id}`, options);
47
+ }
48
+
49
+ /**
50
+ * Retrieves all GPU compute instances for your organization with real-time status
51
+ * updates from Lambda Labs. Includes pricing, runtime metrics, and auto-shutdown
52
+ * configuration. Perfect for monitoring AI workloads, document processing jobs,
53
+ * and cost tracking.
54
+ *
55
+ * @example
56
+ * ```ts
57
+ * const instances = await client.compute.v1.instances.list();
58
+ * ```
59
+ */
60
+ list(options?: RequestOptions): APIPromise<InstanceListResponse> {
61
+ return this._client.get('/compute/v1/instances', options);
62
+ }
63
+
64
+ /**
65
+ * Terminates a running GPU instance, calculates final cost, and cleans up SSH
66
+ * keys. This action is permanent and cannot be undone. All data on the instance
67
+ * will be lost.
68
+ *
69
+ * @example
70
+ * ```ts
71
+ * const instance = await client.compute.v1.instances.delete(
72
+ * 'id',
73
+ * );
74
+ * ```
75
+ */
76
+ delete(id: string, options?: RequestOptions): APIPromise<InstanceDeleteResponse> {
77
+ return this._client.delete(path`/compute/v1/instances/${id}`, options);
78
+ }
79
+ }
80
+
81
+ export interface InstanceCreateResponse {
82
+ id?: string;
83
+
84
+ autoShutdownMinutes?: number | null;
85
+
86
+ createdAt?: string;
87
+
88
+ gpu?: string;
89
+
90
+ instanceType?: string;
91
+
92
+ message?: string;
93
+
94
+ name?: string;
95
+
96
+ pricePerHour?: string;
97
+
98
+ region?: string;
99
+
100
+ specs?: unknown;
101
+
102
+ status?: string;
103
+
104
+ vaults?: Array<unknown>;
105
+ }
106
+
107
+ export interface InstanceRetrieveResponse {
108
+ id?: string;
109
+
110
+ autoShutdownMinutes?: number | null;
111
+
112
+ createdAt?: string;
113
+
114
+ currentCost?: string;
115
+
116
+ currentRuntimeSeconds?: number;
117
+
118
+ gpu?: string;
119
+
120
+ instanceType?: string;
121
+
122
+ ip?: string | null;
123
+
124
+ name?: string;
125
+
126
+ pricePerHour?: string;
127
+
128
+ region?: string;
129
+
130
+ specs?: unknown;
131
+
132
+ ssh?: InstanceRetrieveResponse.SSH | null;
133
+
134
+ startedAt?: string | null;
135
+
136
+ status?: string;
137
+
138
+ vaultMounts?: unknown | null;
139
+ }
140
+
141
+ export namespace InstanceRetrieveResponse {
142
+ export interface SSH {
143
+ command?: string;
144
+
145
+ host?: string;
146
+
147
+ instructions?: Array<unknown>;
148
+
149
+ privateKey?: string;
150
+
151
+ user?: string;
152
+ }
153
+ }
154
+
155
+ export interface InstanceListResponse {
156
+ count?: number;
157
+
158
+ instances?: Array<InstanceListResponse.Instance>;
159
+ }
160
+
161
+ export namespace InstanceListResponse {
162
+ export interface Instance {
163
+ id?: string;
164
+
165
+ autoShutdownMinutes?: number | null;
166
+
167
+ createdAt?: string;
168
+
169
+ gpu?: string;
170
+
171
+ instanceType?: string;
172
+
173
+ ip?: string | null;
174
+
175
+ name?: string;
176
+
177
+ pricePerHour?: string;
178
+
179
+ region?: string;
180
+
181
+ startedAt?: string | null;
182
+
183
+ status?: 'booting' | 'running' | 'stopping' | 'stopped' | 'terminated' | 'failed';
184
+
185
+ totalCost?: string;
186
+
187
+ totalRuntimeSeconds?: number;
188
+ }
189
+ }
190
+
191
+ export interface InstanceDeleteResponse {
192
+ id?: string;
193
+
194
+ message?: string;
195
+
196
+ name?: string;
197
+
198
+ status?: string;
199
+
200
+ totalCost?: string;
201
+
202
+ totalRuntimeSeconds?: number;
203
+ }
204
+
205
+ export interface InstanceCreateParams {
206
+ /**
207
+ * GPU type (e.g., 'gpu_1x_h100_sxm5')
208
+ */
209
+ instanceType: string;
210
+
211
+ /**
212
+ * Instance name
213
+ */
214
+ name: string;
215
+
216
+ /**
217
+ * Region (e.g., 'us-west-1')
218
+ */
219
+ region: string;
220
+
221
+ /**
222
+ * Auto-shutdown timer (null = never)
223
+ */
224
+ autoShutdownMinutes?: number | null;
225
+
226
+ /**
227
+ * Vault IDs to mount
228
+ */
229
+ vaultIds?: Array<string>;
230
+ }
231
+
232
+ export declare namespace Instances {
233
+ export {
234
+ type InstanceCreateResponse as InstanceCreateResponse,
235
+ type InstanceRetrieveResponse as InstanceRetrieveResponse,
236
+ type InstanceListResponse as InstanceListResponse,
237
+ type InstanceDeleteResponse as InstanceDeleteResponse,
238
+ type InstanceCreateParams as InstanceCreateParams,
239
+ };
240
+ }
@@ -11,6 +11,17 @@ import {
11
11
  EnvironmentSetDefaultResponse,
12
12
  Environments,
13
13
  } from './environments';
14
+ import * as InstanceTypesAPI from './instance-types';
15
+ import { InstanceTypeListResponse, InstanceTypes } from './instance-types';
16
+ import * as InstancesAPI from './instances';
17
+ import {
18
+ InstanceCreateParams,
19
+ InstanceCreateResponse,
20
+ InstanceDeleteResponse,
21
+ InstanceListResponse,
22
+ InstanceRetrieveResponse,
23
+ Instances,
24
+ } from './instances';
14
25
  import * as SecretsAPI from './secrets';
15
26
  import {
16
27
  SecretCreateParams,
@@ -26,6 +37,7 @@ import {
26
37
  Secrets,
27
38
  } from './secrets';
28
39
  import { APIPromise } from '../../../core/api-promise';
40
+ import { buildHeaders } from '../../../internal/headers';
29
41
  import { RequestOptions } from '../../../internal/request-options';
30
42
 
31
43
  /**
@@ -33,8 +45,27 @@ import { RequestOptions } from '../../../internal/request-options';
33
45
  */
34
46
  export class V1 extends APIResource {
35
47
  environments: EnvironmentsAPI.Environments = new EnvironmentsAPI.Environments(this._client);
48
+ instanceTypes: InstanceTypesAPI.InstanceTypes = new InstanceTypesAPI.InstanceTypes(this._client);
49
+ instances: InstancesAPI.Instances = new InstancesAPI.Instances(this._client);
36
50
  secrets: SecretsAPI.Secrets = new SecretsAPI.Secrets(this._client);
37
51
 
52
+ /**
53
+ * Returns current pricing for GPU instances. Prices are fetched in real-time and
54
+ * include a 20% platform fee. For detailed instance types and availability, use
55
+ * GET /compute/v1/instance-types.
56
+ *
57
+ * @example
58
+ * ```ts
59
+ * await client.compute.v1.getPricing();
60
+ * ```
61
+ */
62
+ getPricing(options?: RequestOptions): APIPromise<void> {
63
+ return this._client.get('/compute/v1/pricing', {
64
+ ...options,
65
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
66
+ });
67
+ }
68
+
38
69
  /**
39
70
  * Returns detailed compute usage statistics and billing information for your
40
71
  * organization. Includes GPU and CPU hours, total runs, costs, and breakdowns by
@@ -110,6 +141,8 @@ export interface V1GetUsageParams {
110
141
  }
111
142
 
112
143
  V1.Environments = Environments;
144
+ V1.InstanceTypes = InstanceTypes;
145
+ V1.Instances = Instances;
113
146
  V1.Secrets = Secrets;
114
147
 
115
148
  export declare namespace V1 {
@@ -125,6 +158,17 @@ export declare namespace V1 {
125
158
  type EnvironmentCreateParams as EnvironmentCreateParams,
126
159
  };
127
160
 
161
+ export { InstanceTypes as InstanceTypes, type InstanceTypeListResponse as InstanceTypeListResponse };
162
+
163
+ export {
164
+ Instances as Instances,
165
+ type InstanceCreateResponse as InstanceCreateResponse,
166
+ type InstanceRetrieveResponse as InstanceRetrieveResponse,
167
+ type InstanceListResponse as InstanceListResponse,
168
+ type InstanceDeleteResponse as InstanceDeleteResponse,
169
+ type InstanceCreateParams as InstanceCreateParams,
170
+ };
171
+
128
172
  export {
129
173
  Secrets as Secrets,
130
174
  type SecretCreateResponse as SecretCreateResponse,
@@ -176,11 +176,12 @@ export class Vault extends APIResource {
176
176
  /**
177
177
  * Triggers ingestion workflow for a vault object to extract text, generate chunks,
178
178
  * and create embeddings. For supported file types (PDF, DOCX, PPTX, TXT, RTF, XML,
179
- * ZIP, audio, video), processing happens asynchronously. ZIP archives are unpacked
180
- * recursively up to 5 levels, and each extracted file is created as an independent
181
- * vault object and ingested via the normal pipeline. For unsupported types
182
- * (images, etc.), the file is marked as completed immediately without text
183
- * extraction. GraphRAG indexing must be triggered separately via POST
179
+ * HTML, Markdown, CSV/TSV, JSON/YAML/TOML, common source code files, ZIP, audio,
180
+ * video), processing happens asynchronously. ZIP archives are unpacked recursively
181
+ * up to 5 levels, and each extracted file is created as an independent vault
182
+ * object and ingested via the normal pipeline. For unsupported types (images,
183
+ * etc.), the file is marked as completed immediately without text extraction.
184
+ * GraphRAG indexing must be triggered separately via POST
184
185
  * /vault/:id/graphrag/:objectId.
185
186
  *
186
187
  * @example
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.53.0'; // x-release-please-version
1
+ export const VERSION = '0.54.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.53.0";
1
+ export declare const VERSION = "0.54.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.53.0";
1
+ export declare const VERSION = "0.54.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.53.0'; // x-release-please-version
4
+ exports.VERSION = '0.54.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.53.0'; // x-release-please-version
1
+ export const VERSION = '0.54.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map