@squidcloud/client 1.0.249 → 1.0.251

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.
@@ -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
+ }
@@ -42,3 +42,4 @@ export * from './squid-http-client';
42
42
  export * from './squid';
43
43
  export * from './types';
44
44
  export * from './storage-client';
45
+ export * from './extraction-client';
@@ -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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squidcloud/client",
3
- "version": "1.0.249",
3
+ "version": "1.0.251",
4
4
  "description": "A typescript implementation of the Squid client",
5
5
  "main": "dist/cjs/index.js",
6
6
  "types": "dist/typescript-client/src/index.d.ts",