@squidcloud/client 1.0.249 → 1.0.250
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/dist/cjs/index.js +2 -2
- package/dist/internal-common/src/public-types/extraction.public-types.d.ts +18 -0
- package/dist/typescript-client/src/extraction-client.d.ts +6 -0
- package/dist/typescript-client/src/public-types.d.ts +1 -0
- package/dist/typescript-client/src/squid.d.ts +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface ExtractDataFromDocumentFileRequest {
|
|
2
|
+
extractImages?: boolean;
|
|
3
|
+
minImageWidth?: number;
|
|
4
|
+
minImageHeight?: number;
|
|
5
|
+
}
|
|
6
|
+
export type DocumentFileDataType = 'image';
|
|
7
|
+
export interface DocumentFileData {
|
|
8
|
+
type: DocumentFileDataType;
|
|
9
|
+
pathInBucket: string;
|
|
10
|
+
}
|
|
11
|
+
export interface DocumentPageData {
|
|
12
|
+
text: string;
|
|
13
|
+
fileDataList: DocumentFileData[];
|
|
14
|
+
}
|
|
15
|
+
export interface ExtractDataFromDocumentResponse {
|
|
16
|
+
documentPathInBucket?: string;
|
|
17
|
+
pages: DocumentPageData[];
|
|
18
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BlobAndFilename } from './types';
|
|
2
|
+
import { ExtractDataFromDocumentFileRequest, ExtractDataFromDocumentResponse } from '../../internal-common/src/public-types/extraction.public-types';
|
|
3
|
+
export declare class ExtractionClient {
|
|
4
|
+
private readonly rpcManager;
|
|
5
|
+
extractDataFromDocumentFile(file: File | BlobAndFilename, options: ExtractDataFromDocumentFileRequest): Promise<ExtractDataFromDocumentResponse>;
|
|
6
|
+
}
|
|
@@ -22,3 +22,4 @@ export * from '../../internal-common/src/public-types/serialized-query.public-ty
|
|
|
22
22
|
export * from '../../internal-common/src/public-types/socket.public-types';
|
|
23
23
|
export * from '../../internal-common/src/public-types/storage.types';
|
|
24
24
|
export * from '../../internal-common/src/public-types/typescript.public-types';
|
|
25
|
+
export * from '../../internal-common/src/public-types/extraction.public-types';
|
|
@@ -9,6 +9,7 @@ import { QueueManager } from './queue.manager';
|
|
|
9
9
|
import { SecretClient } from './secret.client';
|
|
10
10
|
import { StorageClient } from './storage-client';
|
|
11
11
|
import { TransactionId } from './types';
|
|
12
|
+
import { ExtractionClient } from './extraction-client';
|
|
12
13
|
/** The different options that can be used to initialize a Squid instance. */
|
|
13
14
|
export interface SquidOptions {
|
|
14
15
|
/**
|
|
@@ -212,6 +213,7 @@ export declare class Squid {
|
|
|
212
213
|
ai(): AiClient;
|
|
213
214
|
api(): ApiClient;
|
|
214
215
|
storage(integrationId?: IntegrationId): StorageClient;
|
|
216
|
+
extraction(): ExtractionClient;
|
|
215
217
|
get secrets(): SecretClient;
|
|
216
218
|
/**
|
|
217
219
|
* Returns a distributed lock for the given mutex. The lock can be used to synchronize access to a shared resource.
|