casedev 0.47.1 → 0.49.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.
- package/CHANGELOG.md +16 -0
- package/package.json +1 -1
- package/resources/agent/v1/chat/chat.d.mts +3 -2
- package/resources/agent/v1/chat/chat.d.mts.map +1 -1
- package/resources/agent/v1/chat/chat.d.ts +3 -2
- package/resources/agent/v1/chat/chat.d.ts.map +1 -1
- package/resources/agent/v1/chat/chat.js +3 -2
- package/resources/agent/v1/chat/chat.js.map +1 -1
- package/resources/agent/v1/chat/chat.mjs +3 -2
- package/resources/agent/v1/chat/chat.mjs.map +1 -1
- package/resources/agent/v1/run.d.mts +14 -1
- package/resources/agent/v1/run.d.mts.map +1 -1
- package/resources/agent/v1/run.d.ts +14 -1
- package/resources/agent/v1/run.d.ts.map +1 -1
- package/resources/ocr/index.d.mts +1 -1
- package/resources/ocr/index.d.mts.map +1 -1
- package/resources/ocr/index.d.ts +1 -1
- package/resources/ocr/index.d.ts.map +1 -1
- package/resources/ocr/index.js.map +1 -1
- package/resources/ocr/index.mjs.map +1 -1
- package/resources/ocr/ocr.d.mts +2 -2
- package/resources/ocr/ocr.d.mts.map +1 -1
- package/resources/ocr/ocr.d.ts +2 -2
- package/resources/ocr/ocr.d.ts.map +1 -1
- package/resources/ocr/ocr.js.map +1 -1
- package/resources/ocr/ocr.mjs +1 -1
- package/resources/ocr/ocr.mjs.map +1 -1
- package/resources/ocr/v1.d.mts +8 -2
- package/resources/ocr/v1.d.mts.map +1 -1
- package/resources/ocr/v1.d.ts +8 -2
- package/resources/ocr/v1.d.ts.map +1 -1
- package/resources/ocr/v1.js +2 -2
- package/resources/ocr/v1.js.map +1 -1
- package/resources/ocr/v1.mjs +2 -2
- package/resources/ocr/v1.mjs.map +1 -1
- package/resources/vault/index.d.mts +1 -1
- package/resources/vault/index.d.mts.map +1 -1
- package/resources/vault/index.d.ts +1 -1
- package/resources/vault/index.d.ts.map +1 -1
- package/resources/vault/index.js.map +1 -1
- package/resources/vault/index.mjs.map +1 -1
- package/resources/vault/objects.d.mts +77 -1
- package/resources/vault/objects.d.mts.map +1 -1
- package/resources/vault/objects.d.ts +77 -1
- package/resources/vault/objects.d.ts.map +1 -1
- package/resources/vault/objects.js +18 -0
- package/resources/vault/objects.js.map +1 -1
- package/resources/vault/objects.mjs +18 -0
- package/resources/vault/objects.mjs.map +1 -1
- package/resources/vault/vault.d.mts +2 -2
- package/resources/vault/vault.d.mts.map +1 -1
- package/resources/vault/vault.d.ts +2 -2
- package/resources/vault/vault.d.ts.map +1 -1
- package/resources/vault/vault.js.map +1 -1
- package/resources/vault/vault.mjs.map +1 -1
- package/src/resources/agent/v1/chat/chat.ts +3 -2
- package/src/resources/agent/v1/run.ts +17 -1
- package/src/resources/ocr/index.ts +1 -0
- package/src/resources/ocr/ocr.ts +9 -1
- package/src/resources/ocr/v1.ts +14 -2
- package/src/resources/vault/index.ts +2 -0
- package/src/resources/vault/objects.ts +99 -0
- package/src/resources/vault/vault.ts +4 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/src/resources/ocr/ocr.ts
CHANGED
|
@@ -2,7 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
4
|
import * as V1API from './v1';
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
V1,
|
|
7
|
+
V1DownloadParams,
|
|
8
|
+
V1ProcessParams,
|
|
9
|
+
V1ProcessResponse,
|
|
10
|
+
V1RetrieveParams,
|
|
11
|
+
V1RetrieveResponse,
|
|
12
|
+
} from './v1';
|
|
6
13
|
|
|
7
14
|
export class Ocr extends APIResource {
|
|
8
15
|
v1: V1API.V1 = new V1API.V1(this._client);
|
|
@@ -15,6 +22,7 @@ export declare namespace Ocr {
|
|
|
15
22
|
V1 as V1,
|
|
16
23
|
type V1RetrieveResponse as V1RetrieveResponse,
|
|
17
24
|
type V1ProcessResponse as V1ProcessResponse,
|
|
25
|
+
type V1RetrieveParams as V1RetrieveParams,
|
|
18
26
|
type V1DownloadParams as V1DownloadParams,
|
|
19
27
|
type V1ProcessParams as V1ProcessParams,
|
|
20
28
|
};
|
package/src/resources/ocr/v1.ts
CHANGED
|
@@ -19,8 +19,12 @@ export class V1 extends APIResource {
|
|
|
19
19
|
* const v1 = await client.ocr.v1.retrieve('id');
|
|
20
20
|
* ```
|
|
21
21
|
*/
|
|
22
|
-
retrieve(
|
|
23
|
-
|
|
22
|
+
retrieve(
|
|
23
|
+
id: string,
|
|
24
|
+
query: V1RetrieveParams | null | undefined = {},
|
|
25
|
+
options?: RequestOptions,
|
|
26
|
+
): APIPromise<V1RetrieveResponse> {
|
|
27
|
+
return this._client.get(path`/ocr/v1/${id}`, { query, ...options });
|
|
24
28
|
}
|
|
25
29
|
|
|
26
30
|
/**
|
|
@@ -142,6 +146,13 @@ export interface V1ProcessResponse {
|
|
|
142
146
|
status?: 'queued' | 'processing' | 'completed' | 'failed';
|
|
143
147
|
}
|
|
144
148
|
|
|
149
|
+
export interface V1RetrieveParams {
|
|
150
|
+
/**
|
|
151
|
+
* Include full OCR text in completed responses (default: true)
|
|
152
|
+
*/
|
|
153
|
+
include_text?: 'true' | 'false';
|
|
154
|
+
}
|
|
155
|
+
|
|
145
156
|
export interface V1DownloadParams {
|
|
146
157
|
/**
|
|
147
158
|
* OCR job ID returned from the initial OCR request
|
|
@@ -226,6 +237,7 @@ export declare namespace V1 {
|
|
|
226
237
|
export {
|
|
227
238
|
type V1RetrieveResponse as V1RetrieveResponse,
|
|
228
239
|
type V1ProcessResponse as V1ProcessResponse,
|
|
240
|
+
type V1RetrieveParams as V1RetrieveParams,
|
|
229
241
|
type V1DownloadParams as V1DownloadParams,
|
|
230
242
|
type V1ProcessParams as V1ProcessParams,
|
|
231
243
|
};
|
|
@@ -32,6 +32,7 @@ export {
|
|
|
32
32
|
type ObjectListResponse,
|
|
33
33
|
type ObjectDeleteResponse,
|
|
34
34
|
type ObjectCreatePresignedURLResponse,
|
|
35
|
+
type ObjectGetChunksResponse,
|
|
35
36
|
type ObjectGetOcrWordsResponse,
|
|
36
37
|
type ObjectGetSummarizeJobResponse,
|
|
37
38
|
type ObjectGetTextResponse,
|
|
@@ -40,6 +41,7 @@ export {
|
|
|
40
41
|
type ObjectDeleteParams,
|
|
41
42
|
type ObjectCreatePresignedURLParams,
|
|
42
43
|
type ObjectDownloadParams,
|
|
44
|
+
type ObjectGetChunksParams,
|
|
43
45
|
type ObjectGetOcrWordsParams,
|
|
44
46
|
type ObjectGetSummarizeJobParams,
|
|
45
47
|
type ObjectGetTextParams,
|
|
@@ -142,6 +142,29 @@ export class Objects extends APIResource {
|
|
|
142
142
|
});
|
|
143
143
|
}
|
|
144
144
|
|
|
145
|
+
/**
|
|
146
|
+
* Retrieves full extracted chunk text for a processed vault object. Use this after
|
|
147
|
+
* search when a truncated preview is not enough and you need the exact chunk text
|
|
148
|
+
* or adjacent chunks for surrounding context such as tables, exhibit lists, or
|
|
149
|
+
* multi-part passages.
|
|
150
|
+
*
|
|
151
|
+
* @example
|
|
152
|
+
* ```ts
|
|
153
|
+
* const response = await client.vault.objects.getChunks(
|
|
154
|
+
* 'objectId',
|
|
155
|
+
* { id: 'id' },
|
|
156
|
+
* );
|
|
157
|
+
* ```
|
|
158
|
+
*/
|
|
159
|
+
getChunks(
|
|
160
|
+
objectID: string,
|
|
161
|
+
params: ObjectGetChunksParams,
|
|
162
|
+
options?: RequestOptions,
|
|
163
|
+
): APIPromise<ObjectGetChunksResponse> {
|
|
164
|
+
const { id, ...query } = params;
|
|
165
|
+
return this._client.get(path`/vault/${id}/objects/${objectID}/chunks`, { query, ...options });
|
|
166
|
+
}
|
|
167
|
+
|
|
145
168
|
/**
|
|
146
169
|
* Retrieves word-level OCR bounding box data for a processed PDF document. Each
|
|
147
170
|
* word includes its text, normalized bounding box coordinates (0-1 range),
|
|
@@ -536,6 +559,62 @@ export namespace ObjectCreatePresignedURLResponse {
|
|
|
536
559
|
}
|
|
537
560
|
}
|
|
538
561
|
|
|
562
|
+
export interface ObjectGetChunksResponse {
|
|
563
|
+
/**
|
|
564
|
+
* Full chunk objects for the requested range
|
|
565
|
+
*/
|
|
566
|
+
chunks: Array<ObjectGetChunksResponse.Chunk>;
|
|
567
|
+
|
|
568
|
+
/**
|
|
569
|
+
* The object ID
|
|
570
|
+
*/
|
|
571
|
+
object_id: string;
|
|
572
|
+
|
|
573
|
+
/**
|
|
574
|
+
* Total number of chunks stored for the object
|
|
575
|
+
*/
|
|
576
|
+
total_chunks: number;
|
|
577
|
+
|
|
578
|
+
/**
|
|
579
|
+
* The vault ID
|
|
580
|
+
*/
|
|
581
|
+
vault_id: string;
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
export namespace ObjectGetChunksResponse {
|
|
585
|
+
export interface Chunk {
|
|
586
|
+
/**
|
|
587
|
+
* Chunk index within the document
|
|
588
|
+
*/
|
|
589
|
+
index: number;
|
|
590
|
+
|
|
591
|
+
/**
|
|
592
|
+
* Last page covered by the chunk, if page mapping is available
|
|
593
|
+
*/
|
|
594
|
+
page_end: number | null;
|
|
595
|
+
|
|
596
|
+
/**
|
|
597
|
+
* First page covered by the chunk, if page mapping is available
|
|
598
|
+
*/
|
|
599
|
+
page_start: number | null;
|
|
600
|
+
|
|
601
|
+
/**
|
|
602
|
+
* Full text for the chunk
|
|
603
|
+
*/
|
|
604
|
+
text: string;
|
|
605
|
+
|
|
606
|
+
/**
|
|
607
|
+
* Last OCR word index covered by the chunk, if available
|
|
608
|
+
*/
|
|
609
|
+
word_end_index: number | null;
|
|
610
|
+
|
|
611
|
+
/**
|
|
612
|
+
* First OCR word index covered by the chunk, if available
|
|
613
|
+
*/
|
|
614
|
+
word_start_index: number | null;
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
|
|
539
618
|
export interface ObjectGetOcrWordsResponse {
|
|
540
619
|
/**
|
|
541
620
|
* When the OCR data was extracted
|
|
@@ -767,6 +846,24 @@ export interface ObjectDownloadParams {
|
|
|
767
846
|
id: string;
|
|
768
847
|
}
|
|
769
848
|
|
|
849
|
+
export interface ObjectGetChunksParams {
|
|
850
|
+
/**
|
|
851
|
+
* Path param: The vault ID containing the document.
|
|
852
|
+
*/
|
|
853
|
+
id: string;
|
|
854
|
+
|
|
855
|
+
/**
|
|
856
|
+
* Query param: The last chunk index to return (inclusive). If omitted, only the
|
|
857
|
+
* `start` chunk is returned. Ranges are limited to 10 chunks.
|
|
858
|
+
*/
|
|
859
|
+
end?: number;
|
|
860
|
+
|
|
861
|
+
/**
|
|
862
|
+
* Query param: The first chunk index to return (0-based). Defaults to 0.
|
|
863
|
+
*/
|
|
864
|
+
start?: number;
|
|
865
|
+
}
|
|
866
|
+
|
|
770
867
|
export interface ObjectGetOcrWordsParams {
|
|
771
868
|
/**
|
|
772
869
|
* Path param: The vault ID
|
|
@@ -818,6 +915,7 @@ export declare namespace Objects {
|
|
|
818
915
|
type ObjectListResponse as ObjectListResponse,
|
|
819
916
|
type ObjectDeleteResponse as ObjectDeleteResponse,
|
|
820
917
|
type ObjectCreatePresignedURLResponse as ObjectCreatePresignedURLResponse,
|
|
918
|
+
type ObjectGetChunksResponse as ObjectGetChunksResponse,
|
|
821
919
|
type ObjectGetOcrWordsResponse as ObjectGetOcrWordsResponse,
|
|
822
920
|
type ObjectGetSummarizeJobResponse as ObjectGetSummarizeJobResponse,
|
|
823
921
|
type ObjectGetTextResponse as ObjectGetTextResponse,
|
|
@@ -826,6 +924,7 @@ export declare namespace Objects {
|
|
|
826
924
|
type ObjectDeleteParams as ObjectDeleteParams,
|
|
827
925
|
type ObjectCreatePresignedURLParams as ObjectCreatePresignedURLParams,
|
|
828
926
|
type ObjectDownloadParams as ObjectDownloadParams,
|
|
927
|
+
type ObjectGetChunksParams as ObjectGetChunksParams,
|
|
829
928
|
type ObjectGetOcrWordsParams as ObjectGetOcrWordsParams,
|
|
830
929
|
type ObjectGetSummarizeJobParams as ObjectGetSummarizeJobParams,
|
|
831
930
|
type ObjectGetTextParams as ObjectGetTextParams,
|
|
@@ -36,6 +36,8 @@ import {
|
|
|
36
36
|
ObjectDeleteParams,
|
|
37
37
|
ObjectDeleteResponse,
|
|
38
38
|
ObjectDownloadParams,
|
|
39
|
+
ObjectGetChunksParams,
|
|
40
|
+
ObjectGetChunksResponse,
|
|
39
41
|
ObjectGetOcrWordsParams,
|
|
40
42
|
ObjectGetOcrWordsResponse,
|
|
41
43
|
ObjectGetSummarizeJobParams,
|
|
@@ -996,6 +998,7 @@ export declare namespace Vault {
|
|
|
996
998
|
type ObjectListResponse as ObjectListResponse,
|
|
997
999
|
type ObjectDeleteResponse as ObjectDeleteResponse,
|
|
998
1000
|
type ObjectCreatePresignedURLResponse as ObjectCreatePresignedURLResponse,
|
|
1001
|
+
type ObjectGetChunksResponse as ObjectGetChunksResponse,
|
|
999
1002
|
type ObjectGetOcrWordsResponse as ObjectGetOcrWordsResponse,
|
|
1000
1003
|
type ObjectGetSummarizeJobResponse as ObjectGetSummarizeJobResponse,
|
|
1001
1004
|
type ObjectGetTextResponse as ObjectGetTextResponse,
|
|
@@ -1004,6 +1007,7 @@ export declare namespace Vault {
|
|
|
1004
1007
|
type ObjectDeleteParams as ObjectDeleteParams,
|
|
1005
1008
|
type ObjectCreatePresignedURLParams as ObjectCreatePresignedURLParams,
|
|
1006
1009
|
type ObjectDownloadParams as ObjectDownloadParams,
|
|
1010
|
+
type ObjectGetChunksParams as ObjectGetChunksParams,
|
|
1007
1011
|
type ObjectGetOcrWordsParams as ObjectGetOcrWordsParams,
|
|
1008
1012
|
type ObjectGetSummarizeJobParams as ObjectGetSummarizeJobParams,
|
|
1009
1013
|
type ObjectGetTextParams as ObjectGetTextParams,
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.49.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.49.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.49.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.49.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|