casedev 0.72.0 → 0.73.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 (99) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/package.json +1 -1
  3. package/resources/connectors/connectors.d.mts +2 -2
  4. package/resources/connectors/connectors.d.mts.map +1 -1
  5. package/resources/connectors/connectors.d.ts +2 -2
  6. package/resources/connectors/connectors.d.ts.map +1 -1
  7. package/resources/connectors/connectors.js.map +1 -1
  8. package/resources/connectors/connectors.mjs.map +1 -1
  9. package/resources/connectors/index.d.mts +1 -1
  10. package/resources/connectors/index.d.mts.map +1 -1
  11. package/resources/connectors/index.d.ts +1 -1
  12. package/resources/connectors/index.d.ts.map +1 -1
  13. package/resources/connectors/index.js.map +1 -1
  14. package/resources/connectors/index.mjs.map +1 -1
  15. package/resources/connectors/v1/connections.d.mts +343 -9
  16. package/resources/connectors/v1/connections.d.mts.map +1 -1
  17. package/resources/connectors/v1/connections.d.ts +343 -9
  18. package/resources/connectors/v1/connections.d.ts.map +1 -1
  19. package/resources/connectors/v1/connections.js +124 -1
  20. package/resources/connectors/v1/connections.js.map +1 -1
  21. package/resources/connectors/v1/connections.mjs +124 -1
  22. package/resources/connectors/v1/connections.mjs.map +1 -1
  23. package/resources/connectors/v1/index.d.mts +2 -2
  24. package/resources/connectors/v1/index.d.mts.map +1 -1
  25. package/resources/connectors/v1/index.d.ts +2 -2
  26. package/resources/connectors/v1/index.d.ts.map +1 -1
  27. package/resources/connectors/v1/index.js.map +1 -1
  28. package/resources/connectors/v1/index.mjs.map +1 -1
  29. package/resources/connectors/v1/v1.d.mts +139 -8
  30. package/resources/connectors/v1/v1.d.mts.map +1 -1
  31. package/resources/connectors/v1/v1.d.ts +139 -8
  32. package/resources/connectors/v1/v1.d.ts.map +1 -1
  33. package/resources/connectors/v1/v1.js +29 -5
  34. package/resources/connectors/v1/v1.js.map +1 -1
  35. package/resources/connectors/v1/v1.mjs +29 -5
  36. package/resources/connectors/v1/v1.mjs.map +1 -1
  37. package/resources/linc/v1/sessions.d.mts +22 -8
  38. package/resources/linc/v1/sessions.d.mts.map +1 -1
  39. package/resources/linc/v1/sessions.d.ts +22 -8
  40. package/resources/linc/v1/sessions.d.ts.map +1 -1
  41. package/resources/linc/v1/sessions.js +3 -3
  42. package/resources/linc/v1/sessions.mjs +3 -3
  43. package/resources/ocr/v1.d.mts +2 -1
  44. package/resources/ocr/v1.d.mts.map +1 -1
  45. package/resources/ocr/v1.d.ts +2 -1
  46. package/resources/ocr/v1.d.ts.map +1 -1
  47. package/resources/vault/assemblies.d.mts +293 -0
  48. package/resources/vault/assemblies.d.mts.map +1 -0
  49. package/resources/vault/assemblies.d.ts +293 -0
  50. package/resources/vault/assemblies.d.ts.map +1 -0
  51. package/resources/vault/assemblies.js +70 -0
  52. package/resources/vault/assemblies.js.map +1 -0
  53. package/resources/vault/assemblies.mjs +66 -0
  54. package/resources/vault/assemblies.mjs.map +1 -0
  55. package/resources/vault/index.d.mts +1 -0
  56. package/resources/vault/index.d.mts.map +1 -1
  57. package/resources/vault/index.d.ts +1 -0
  58. package/resources/vault/index.d.ts.map +1 -1
  59. package/resources/vault/index.js +3 -1
  60. package/resources/vault/index.js.map +1 -1
  61. package/resources/vault/index.mjs +1 -0
  62. package/resources/vault/index.mjs.map +1 -1
  63. package/resources/vault/vault.d.mts +9 -0
  64. package/resources/vault/vault.d.mts.map +1 -1
  65. package/resources/vault/vault.d.ts +9 -0
  66. package/resources/vault/vault.d.ts.map +1 -1
  67. package/resources/vault/vault.js +4 -0
  68. package/resources/vault/vault.js.map +1 -1
  69. package/resources/vault/vault.mjs +4 -0
  70. package/resources/vault/vault.mjs.map +1 -1
  71. package/resources/voice/boost-list.d.mts +5 -4
  72. package/resources/voice/boost-list.d.mts.map +1 -1
  73. package/resources/voice/boost-list.d.ts +5 -4
  74. package/resources/voice/boost-list.d.ts.map +1 -1
  75. package/resources/voice/boost-list.js +5 -4
  76. package/resources/voice/boost-list.js.map +1 -1
  77. package/resources/voice/boost-list.mjs +5 -4
  78. package/resources/voice/boost-list.mjs.map +1 -1
  79. package/resources/voice/transcription.d.mts +9 -2
  80. package/resources/voice/transcription.d.mts.map +1 -1
  81. package/resources/voice/transcription.d.ts +9 -2
  82. package/resources/voice/transcription.d.ts.map +1 -1
  83. package/src/resources/connectors/connectors.ts +2 -0
  84. package/src/resources/connectors/index.ts +1 -0
  85. package/src/resources/connectors/v1/connections.ts +534 -9
  86. package/src/resources/connectors/v1/index.ts +11 -0
  87. package/src/resources/connectors/v1/v1.ts +185 -5
  88. package/src/resources/linc/v1/sessions.ts +24 -9
  89. package/src/resources/ocr/v1.ts +2 -1
  90. package/src/resources/vault/assemblies.ts +403 -0
  91. package/src/resources/vault/index.ts +7 -0
  92. package/src/resources/vault/vault.ts +24 -0
  93. package/src/resources/voice/boost-list.ts +5 -4
  94. package/src/resources/voice/transcription.ts +10 -2
  95. package/src/version.ts +1 -1
  96. package/version.d.mts +1 -1
  97. package/version.d.ts +1 -1
  98. package/version.js +1 -1
  99. package/version.mjs +1 -1
@@ -5,12 +5,22 @@ import * as ConnectionsAPI from './connections';
5
5
  import {
6
6
  ConnectionBrowseParams,
7
7
  ConnectionBrowseResponse,
8
+ ConnectionCreateFolderParams,
9
+ ConnectionCreateMicrosoftAdminApprovalParams,
10
+ ConnectionCreateMicrosoftAdminApprovalResponse,
8
11
  ConnectionCreateParams,
9
12
  ConnectionCreateResponse,
10
13
  ConnectionDeleteParams,
14
+ ConnectionListContentsParams,
15
+ ConnectionListContentsResponse,
11
16
  ConnectionListParams,
12
17
  ConnectionListResponse,
18
+ ConnectionResolveLinkParams,
19
+ ConnectionResolveLinkResponse,
13
20
  ConnectionRetrieveParams,
21
+ ConnectionRetrieveResponse,
22
+ ConnectionSearchParams,
23
+ ConnectionSearchResponse,
14
24
  ConnectionUpdateAllParams,
15
25
  Connections,
16
26
  } from './connections';
@@ -46,13 +56,38 @@ export class V1 extends APIResource {
46
56
  connections: ConnectionsAPI.Connections = new ConnectionsAPI.Connections(this._client);
47
57
  links: LinksAPI.Links = new LinksAPI.Links(this._client);
48
58
 
59
+ /**
60
+ * Copy one provider file, named by an open_ref from browse, into a Vault
61
+ * (vault_id) or to a presigned S3 PUT URL (upload_url). Runs synchronously; files
62
+ * over 100 MB return 413 and belong in a transfer. A repeat for an unchanged
63
+ * provider version returns the first copy with 200. Vault copies are stored as
64
+ * uploaded: call POST /vault/{id}/ingest/{objectId} to index them. Fetched copies
65
+ * are never exported by a link.
66
+ */
67
+ fetch(params: V1FetchParams, options?: RequestOptions): APIPromise<void> {
68
+ const { 'x-case-connector-subject': xCaseConnectorSubject, ...body } = params;
69
+ return this._client.post('/connectors/v1/fetch', {
70
+ body,
71
+ ...options,
72
+ headers: buildHeaders([
73
+ {
74
+ Accept: '*/*',
75
+ ...(xCaseConnectorSubject != null ?
76
+ { 'x-case-connector-subject': xCaseConnectorSubject }
77
+ : undefined),
78
+ },
79
+ options?.headers,
80
+ ]),
81
+ });
82
+ }
83
+
49
84
  /**
50
85
  * Standing promise: backfill now, then stay current (the sync sweeper re-runs
51
86
  * synced links on a schedule). Direction both creates paired import/export links
52
87
  * and defaults export to a CaseMark Output subfolder. Same body as /transfer minus
53
- * run_mode. Upserts links by (connection_id, direction, remote, vault_id);
54
- * existing once-links are upgraded in place with their ledger and cursor
55
- * preserved. Downgrade or pause via PATCH /links/{id}.
88
+ * run_mode. Upserts links by (connection_id, direction, remote, vault_id,
89
+ * selection); existing once-links are upgraded in place with their ledger and
90
+ * cursor preserved. Downgrade or pause via PATCH /links/{id}.
56
91
  */
57
92
  syncLink(params: V1SyncLinkParams, options?: RequestOptions): APIPromise<V1SyncLinkResponse> {
58
93
  const { 'x-case-connector-subject': xCaseConnectorSubject, ...body } = params;
@@ -74,8 +109,8 @@ export class V1 extends APIResource {
74
109
  * One-shot import (provider folder → vault), export (vault → provider folder), or
75
110
  * both. Direction both creates paired import/export links and defaults export to a
76
111
  * CaseMark Output subfolder. Upserts links by (connection_id, direction, remote,
77
- * vault_id): first call backfills, later calls move only new/changed files via the
78
- * ledger. Poll GET /links/{id} → active_run for progress.
112
+ * vault_id, selection): first call backfills, later calls move only new/changed
113
+ * files via the ledger. Poll GET /links/{id} → active_run for progress.
79
114
  */
80
115
  transfer(params: V1TransferParams, options?: RequestOptions): APIPromise<V1TransferResponse> {
81
116
  const { 'x-case-connector-subject': xCaseConnectorSubject, ...body } = params;
@@ -137,6 +172,10 @@ export interface TransferRun {
137
172
  }
138
173
 
139
174
  export interface V1SyncLinkResponse {
175
+ /**
176
+ * Links created or re-triggered. Each echoes selection ({object_ids?, folder?},
177
+ * null for the whole vault).
178
+ */
140
179
  links?: Array<unknown>;
141
180
 
142
181
  /**
@@ -151,6 +190,10 @@ export interface V1SyncLinkResponse {
151
190
  }
152
191
 
153
192
  export interface V1TransferResponse {
193
+ /**
194
+ * Links created or re-triggered. Each echoes selection ({object_ids?, folder?},
195
+ * null for the whole vault).
196
+ */
154
197
  links?: Array<unknown>;
155
198
 
156
199
  /**
@@ -164,6 +207,30 @@ export interface V1TransferResponse {
164
207
  runs?: Array<TransferLinkRun>;
165
208
  }
166
209
 
210
+ export interface V1FetchParams {
211
+ /**
212
+ * Body param: From a browse item, exactly as received
213
+ */
214
+ open_ref: string;
215
+
216
+ /**
217
+ * Body param: Presigned HTTPS S3 PUT URL. Content-Type must not be a signed
218
+ * header. Exactly one destination.
219
+ */
220
+ upload_url?: string;
221
+
222
+ /**
223
+ * Body param: Destination Vault. Exactly one destination.
224
+ */
225
+ vault_id?: string;
226
+
227
+ /**
228
+ * Header param: Trusted server-to-server application-user assertion. Must match
229
+ * the subject the open_ref was minted for.
230
+ */
231
+ 'x-case-connector-subject'?: string;
232
+ }
233
+
167
234
  export interface V1SyncLinkParams {
168
235
  /**
169
236
  * Body param
@@ -201,6 +268,19 @@ export interface V1SyncLinkParams {
201
268
  */
202
269
  policy?: V1SyncLinkParams.Policy;
203
270
 
271
+ /**
272
+ * Body param: Export only part of the vault (direction export only; 400
273
+ * selection_requires_export otherwise). Provide object_ids, folder, or both (their
274
+ * intersection). The selection is part of link identity: each distinct selection
275
+ * to the same destination is its own link, and repeating a selection re-runs that
276
+ * link. Exported objects still exclude files still processing and
277
+ * connector-imported or fetched copies. Destination paths: with folder, paths are
278
+ * relative to that folder, so its contents land directly in remote; with
279
+ * object_ids only, each object keeps its full vault path. Omit to export the whole
280
+ * vault.
281
+ */
282
+ selection?: V1SyncLinkParams.Selection;
283
+
204
284
  /**
205
285
  * Header param: Trusted server-to-server application-user assertion. Derive it
206
286
  * from the authenticated application session, never browser input. Omit only for
@@ -237,6 +317,13 @@ export namespace V1SyncLinkParams {
237
317
  }
238
318
 
239
319
  export interface Policy {
320
+ /**
321
+ * Export handling of a destination file with the same name that this export does
322
+ * not own. version keeps both: the export is written as name (CaseMark).ext, then
323
+ * name (CaseMark 2).ext, name (CaseMark 3).ext, using the first number the folder
324
+ * does not use (up to 100). overwrite replaces the existing file; skip leaves it.
325
+ * Any other value returns 400.
326
+ */
240
327
  collisions?: 'version' | 'overwrite' | 'skip';
241
328
 
242
329
  deletes?: 'mirror' | 'preserve';
@@ -246,6 +333,12 @@ export namespace V1SyncLinkParams {
246
333
 
247
334
  export namespace Policy {
248
335
  export interface Filters {
336
+ /**
337
+ * File extensions (e.g. ".exe") to import even though the engine skips Windows
338
+ * executables, libraries, installers and disc metadata by default.
339
+ */
340
+ allow_extensions?: Array<string>;
341
+
249
342
  /**
250
343
  * Skip these stable document ids before download, including future versions.
251
344
  */
@@ -261,6 +354,31 @@ export namespace V1SyncLinkParams {
261
354
  max_size_bytes?: number;
262
355
  }
263
356
  }
357
+
358
+ /**
359
+ * Export only part of the vault (direction export only; 400
360
+ * selection_requires_export otherwise). Provide object_ids, folder, or both (their
361
+ * intersection). The selection is part of link identity: each distinct selection
362
+ * to the same destination is its own link, and repeating a selection re-runs that
363
+ * link. Exported objects still exclude files still processing and
364
+ * connector-imported or fetched copies. Destination paths: with folder, paths are
365
+ * relative to that folder, so its contents land directly in remote; with
366
+ * object_ids only, each object keeps its full vault path. Omit to export the whole
367
+ * vault.
368
+ */
369
+ export interface Selection {
370
+ /**
371
+ * Vault folder path such as /Reports/Final; includes every subfolder. The vault
372
+ * root is not a selection.
373
+ */
374
+ folder?: string;
375
+
376
+ /**
377
+ * Vault object ids from vault_id. Unknown ids return 400
378
+ * selection_objects_not_found with data.error.count.
379
+ */
380
+ object_ids?: Array<string>;
381
+ }
264
382
  }
265
383
 
266
384
  export interface V1TransferParams {
@@ -305,6 +423,19 @@ export interface V1TransferParams {
305
423
  */
306
424
  run_mode?: 'auto' | 'full_reconcile';
307
425
 
426
+ /**
427
+ * Body param: Export only part of the vault (direction export only; 400
428
+ * selection_requires_export otherwise). Provide object_ids, folder, or both (their
429
+ * intersection). The selection is part of link identity: each distinct selection
430
+ * to the same destination is its own link, and repeating a selection re-runs that
431
+ * link. Exported objects still exclude files still processing and
432
+ * connector-imported or fetched copies. Destination paths: with folder, paths are
433
+ * relative to that folder, so its contents land directly in remote; with
434
+ * object_ids only, each object keeps its full vault path. Omit to export the whole
435
+ * vault.
436
+ */
437
+ selection?: V1TransferParams.Selection;
438
+
308
439
  /**
309
440
  * Header param: Trusted server-to-server application-user assertion. Derive it
310
441
  * from the authenticated application session, never browser input. Omit only for
@@ -341,6 +472,13 @@ export namespace V1TransferParams {
341
472
  }
342
473
 
343
474
  export interface Policy {
475
+ /**
476
+ * Export handling of a destination file with the same name that this export does
477
+ * not own. version keeps both: the export is written as name (CaseMark).ext, then
478
+ * name (CaseMark 2).ext, name (CaseMark 3).ext, using the first number the folder
479
+ * does not use (up to 100). overwrite replaces the existing file; skip leaves it.
480
+ * Any other value returns 400.
481
+ */
344
482
  collisions?: 'version' | 'overwrite' | 'skip';
345
483
 
346
484
  deletes?: 'mirror' | 'preserve';
@@ -350,6 +488,12 @@ export namespace V1TransferParams {
350
488
 
351
489
  export namespace Policy {
352
490
  export interface Filters {
491
+ /**
492
+ * File extensions (e.g. ".exe") to import even though the engine skips Windows
493
+ * executables, libraries, installers and disc metadata by default.
494
+ */
495
+ allow_extensions?: Array<string>;
496
+
353
497
  /**
354
498
  * Skip these stable document ids before download, including future versions.
355
499
  */
@@ -365,6 +509,31 @@ export namespace V1TransferParams {
365
509
  max_size_bytes?: number;
366
510
  }
367
511
  }
512
+
513
+ /**
514
+ * Export only part of the vault (direction export only; 400
515
+ * selection_requires_export otherwise). Provide object_ids, folder, or both (their
516
+ * intersection). The selection is part of link identity: each distinct selection
517
+ * to the same destination is its own link, and repeating a selection re-runs that
518
+ * link. Exported objects still exclude files still processing and
519
+ * connector-imported or fetched copies. Destination paths: with folder, paths are
520
+ * relative to that folder, so its contents land directly in remote; with
521
+ * object_ids only, each object keeps its full vault path. Omit to export the whole
522
+ * vault.
523
+ */
524
+ export interface Selection {
525
+ /**
526
+ * Vault folder path such as /Reports/Final; includes every subfolder. The vault
527
+ * root is not a selection.
528
+ */
529
+ folder?: string;
530
+
531
+ /**
532
+ * Vault object ids from vault_id. Unknown ids return 400
533
+ * selection_objects_not_found with data.error.count.
534
+ */
535
+ object_ids?: Array<string>;
536
+ }
368
537
  }
369
538
 
370
539
  V1.Applications = Applications;
@@ -380,6 +549,7 @@ export declare namespace V1 {
380
549
  type TransferRun as TransferRun,
381
550
  type V1SyncLinkResponse as V1SyncLinkResponse,
382
551
  type V1TransferResponse as V1TransferResponse,
552
+ type V1FetchParams as V1FetchParams,
383
553
  type V1SyncLinkParams as V1SyncLinkParams,
384
554
  type V1TransferParams as V1TransferParams,
385
555
  };
@@ -396,13 +566,23 @@ export declare namespace V1 {
396
566
  export {
397
567
  Connections as Connections,
398
568
  type ConnectionCreateResponse as ConnectionCreateResponse,
569
+ type ConnectionRetrieveResponse as ConnectionRetrieveResponse,
399
570
  type ConnectionListResponse as ConnectionListResponse,
400
571
  type ConnectionBrowseResponse as ConnectionBrowseResponse,
572
+ type ConnectionCreateMicrosoftAdminApprovalResponse as ConnectionCreateMicrosoftAdminApprovalResponse,
573
+ type ConnectionListContentsResponse as ConnectionListContentsResponse,
574
+ type ConnectionResolveLinkResponse as ConnectionResolveLinkResponse,
575
+ type ConnectionSearchResponse as ConnectionSearchResponse,
401
576
  type ConnectionCreateParams as ConnectionCreateParams,
402
577
  type ConnectionRetrieveParams as ConnectionRetrieveParams,
403
578
  type ConnectionListParams as ConnectionListParams,
404
579
  type ConnectionDeleteParams as ConnectionDeleteParams,
405
580
  type ConnectionBrowseParams as ConnectionBrowseParams,
581
+ type ConnectionCreateFolderParams as ConnectionCreateFolderParams,
582
+ type ConnectionCreateMicrosoftAdminApprovalParams as ConnectionCreateMicrosoftAdminApprovalParams,
583
+ type ConnectionListContentsParams as ConnectionListContentsParams,
584
+ type ConnectionResolveLinkParams as ConnectionResolveLinkParams,
585
+ type ConnectionSearchParams as ConnectionSearchParams,
406
586
  type ConnectionUpdateAllParams as ConnectionUpdateAllParams,
407
587
  };
408
588
 
@@ -11,9 +11,9 @@ import { path } from '../../../internal/utils/path';
11
11
  */
12
12
  export class Sessions extends APIResource {
13
13
  /**
14
- * Creates a Daytona-backed native Linc session with scoped Case.dev credentials.
15
- * This endpoint starts the sandbox actor only; messages and event replay use
16
- * separate endpoints.
14
+ * Creates a native Linc session in a sandboxed runtime with scoped Case.dev
15
+ * credentials. This endpoint starts the sandbox actor only; messages and event
16
+ * replay use separate endpoints.
17
17
  */
18
18
  create(params: SessionCreateParams | null | undefined = {}, options?: RequestOptions): APIPromise<void> {
19
19
  const {
@@ -192,12 +192,6 @@ export interface SessionCreateParams {
192
192
  */
193
193
  includeDocumentTemplates?: boolean | null;
194
194
 
195
- /**
196
- * Body param: Privileged C3-only hidden app instructions to append to the sandbox
197
- * AGENTS.md.
198
- */
199
- instructions?: string | null;
200
-
201
195
  /**
202
196
  * Body param
203
197
  */
@@ -211,6 +205,27 @@ export interface SessionCreateParams {
211
205
  */
212
206
  modelFallbacks?: Array<string>;
213
207
 
208
+ /**
209
+ * Body param: indefinite keeps the runtime and its saved state until the session
210
+ * (or, in workspace mode, its last conversation) is deleted, so a chat can resume
211
+ * after any idle gap. The default in workspace mode; standalone chats opt in with
212
+ * it, one-off runs leave it unset. Raises an existing workspace to indefinite.
213
+ * Mutually exclusive with runtimeRetentionDays.
214
+ */
215
+ runtimeRetention?: 'indefinite';
216
+
217
+ /**
218
+ * Body param: Days the runtime and its saved state are kept after the last
219
+ * activity. Defaults to 1 for standalone sessions; workspace-mode conversations
220
+ * (workspaceKey) and the C3 system key default to indefinite (see
221
+ * runtimeRetention). Once they are deleted, commands to the session answer 410
222
+ * linc_runtime_expired; its events stay readable. A workspace keeps the value it
223
+ * was created with; a larger value on a later conversation raises it. Applies to
224
+ * Vercel Sandbox runtimes; accepted and stored on Daytona, where it has no effect.
225
+ * Mutually exclusive with runtimeRetention.
226
+ */
227
+ runtimeRetentionDays?: number;
228
+
214
229
  /**
215
230
  * Body param: Optional caller-provided scoped Case.dev API key for the runtime.
216
231
  */
@@ -230,7 +230,8 @@ export interface V1DownloadParams {
230
230
 
231
231
  export interface V1ProcessParams {
232
232
  /**
233
- * URL or S3 path to the document to process
233
+ * HTTP(S) URL of the document to process, or the s3:// path of a vault object in
234
+ * your organization
234
235
  */
235
236
  document_url: string;
236
237