Skip to content

first cut at some debugging support #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ spec.json
readme-sync/f_project.sublime-workspace
*.sublime-workspace
readme-sync/f_project.sublime-workspace
node_modules/
21 changes: 17 additions & 4 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,24 @@
/// <reference types="node" />
import type { ClassificationResult, ExtractionResult, Webhook } from "./types";
export interface SensibleSDKOptions {
debug?: true;
pollingInterval?: number;
region?: "us-west-2" | "eu-west-2" | "ca-central-1";
}
export declare class SensibleSDK {
apiKey: string;
constructor(apiKey: string);
private readonly options;
static DEFAULT_WAIT_TIME: number;
static MAX_WAIT_TIME: number;
static DEFAULT_POLLING_INTERVAL: number;
static MAX_POLLING_INTERVAL: number;
private requestCount;
private readonly backend;
private readonly s3;
constructor(apiKey: string, options?: SensibleSDKOptions);
extract(params: ExtractParams): Promise<ExtractionRequest>;
classify(params: ClassificationParams): Promise<ClassificationRequest>;
waitFor(request: ClassificationRequest | ExtractionRequest): Promise<ExtractionResult | ClassificationResult>;
private extractionWaitLoop;
private classificationWaitLoop;
waitFor(request: ClassificationRequest | ExtractionRequest, timeout?: number): Promise<ClassificationResult | ExtractionResult>;
generateExcel(requests: ExtractionRequest | ExtractionRequest[]): Promise<{
url: string;
}>;
Expand Down
Loading