sarvamai 1.1.2-alpha.1 → 1.1.2-alpha.3
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/BaseClient.js +2 -2
- package/dist/cjs/Client.d.ts +3 -0
- package/dist/cjs/Client.js +21 -16
- package/dist/cjs/api/resources/docDigitizationJob/client/Client.d.ts +167 -0
- package/dist/cjs/api/resources/docDigitizationJob/client/Client.js +542 -0
- package/dist/cjs/api/resources/docDigitizationJob/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/docDigitizationJob/client/index.js +17 -0
- package/dist/cjs/api/resources/docDigitizationJob/client/requests/DocDigitizationJobRequest.d.ts +11 -0
- package/dist/cjs/api/resources/docDigitizationJob/client/requests/DocDigitizationJobRequest.js +3 -0
- package/dist/cjs/api/resources/docDigitizationJob/client/requests/DocDigitizationUploadFilesRequest.d.ts +13 -0
- package/dist/cjs/api/resources/docDigitizationJob/client/requests/DocDigitizationUploadFilesRequest.js +3 -0
- package/dist/cjs/api/resources/docDigitizationJob/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/docDigitizationJob/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/docDigitizationJob/index.d.ts +1 -0
- package/dist/cjs/api/resources/docDigitizationJob/index.js +17 -0
- package/dist/cjs/api/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/index.js +3 -1
- package/dist/cjs/api/resources/textToSpeechStreaming/client/Socket.d.ts +4 -1
- package/dist/cjs/api/resources/textToSpeechStreaming/client/Socket.js +27 -11
- package/dist/cjs/api/types/DocDigitizationCreateJobResponse.d.ts +10 -0
- package/dist/cjs/api/types/DocDigitizationCreateJobResponse.js +3 -0
- package/dist/cjs/api/types/DocDigitizationDownloadFilesResponse.d.ts +16 -0
- package/dist/cjs/api/types/DocDigitizationDownloadFilesResponse.js +3 -0
- package/dist/cjs/api/types/DocDigitizationErrorCode.d.ts +9 -0
- package/dist/cjs/api/types/DocDigitizationErrorCode.js +12 -0
- package/dist/cjs/api/types/DocDigitizationErrorDetails.d.ts +9 -0
- package/dist/cjs/api/types/DocDigitizationErrorDetails.js +3 -0
- package/dist/cjs/api/types/DocDigitizationErrorMessage.d.ts +5 -0
- package/dist/cjs/api/types/DocDigitizationErrorMessage.js +3 -0
- package/dist/cjs/api/types/DocDigitizationJobDetail.d.ts +26 -0
- package/dist/cjs/api/types/DocDigitizationJobDetail.js +3 -0
- package/dist/cjs/api/types/DocDigitizationJobDetailState.d.ts +9 -0
- package/dist/cjs/api/types/DocDigitizationJobDetailState.js +12 -0
- package/dist/cjs/api/types/DocDigitizationJobParameters.d.ts +10 -0
- package/dist/cjs/api/types/DocDigitizationJobParameters.js +3 -0
- package/dist/cjs/api/types/DocDigitizationJobState.d.ts +10 -0
- package/dist/cjs/api/types/DocDigitizationJobState.js +13 -0
- package/dist/cjs/api/types/DocDigitizationJobStatusResponse.d.ts +26 -0
- package/dist/cjs/api/types/DocDigitizationJobStatusResponse.js +3 -0
- package/dist/cjs/api/types/DocDigitizationOutputFormat.d.ts +5 -0
- package/dist/cjs/api/types/DocDigitizationOutputFormat.js +8 -0
- package/dist/cjs/api/types/DocDigitizationPageError.d.ts +11 -0
- package/dist/cjs/api/types/DocDigitizationPageError.js +3 -0
- package/dist/cjs/api/types/DocDigitizationSupportedLanguage.d.ts +26 -0
- package/dist/cjs/api/types/DocDigitizationSupportedLanguage.js +29 -0
- package/dist/cjs/api/types/DocDigitizationUploadFilesResponse.d.ts +14 -0
- package/dist/cjs/api/types/DocDigitizationUploadFilesResponse.js +3 -0
- package/dist/cjs/api/types/DocDigitizationWebhookCallback.d.ts +9 -0
- package/dist/cjs/api/types/DocDigitizationWebhookCallback.js +3 -0
- package/dist/cjs/api/types/index.d.ts +15 -0
- package/dist/cjs/api/types/index.js +15 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/Client.d.mts +3 -0
- package/dist/esm/Client.mjs +5 -0
- package/dist/esm/api/resources/docDigitizationJob/client/Client.d.mts +167 -0
- package/dist/esm/api/resources/docDigitizationJob/client/Client.mjs +505 -0
- package/dist/esm/api/resources/docDigitizationJob/client/index.d.mts +1 -0
- package/dist/esm/api/resources/docDigitizationJob/client/index.mjs +1 -0
- package/dist/esm/api/resources/docDigitizationJob/client/requests/DocDigitizationJobRequest.d.mts +11 -0
- package/dist/esm/api/resources/docDigitizationJob/client/requests/DocDigitizationJobRequest.mjs +2 -0
- package/dist/esm/api/resources/docDigitizationJob/client/requests/DocDigitizationUploadFilesRequest.d.mts +13 -0
- package/dist/esm/api/resources/docDigitizationJob/client/requests/DocDigitizationUploadFilesRequest.mjs +2 -0
- package/dist/esm/api/resources/docDigitizationJob/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/docDigitizationJob/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/docDigitizationJob/index.d.mts +1 -0
- package/dist/esm/api/resources/docDigitizationJob/index.mjs +1 -0
- package/dist/esm/api/resources/index.d.mts +2 -0
- package/dist/esm/api/resources/index.mjs +2 -0
- package/dist/esm/api/resources/textToSpeechStreaming/client/Socket.d.mts +4 -1
- package/dist/esm/api/resources/textToSpeechStreaming/client/Socket.mjs +27 -11
- package/dist/esm/api/types/DocDigitizationCreateJobResponse.d.mts +10 -0
- package/dist/esm/api/types/DocDigitizationCreateJobResponse.mjs +2 -0
- package/dist/esm/api/types/DocDigitizationDownloadFilesResponse.d.mts +16 -0
- package/dist/esm/api/types/DocDigitizationDownloadFilesResponse.mjs +2 -0
- package/dist/esm/api/types/DocDigitizationErrorCode.d.mts +9 -0
- package/dist/esm/api/types/DocDigitizationErrorCode.mjs +9 -0
- package/dist/esm/api/types/DocDigitizationErrorDetails.d.mts +9 -0
- package/dist/esm/api/types/DocDigitizationErrorDetails.mjs +2 -0
- package/dist/esm/api/types/DocDigitizationErrorMessage.d.mts +5 -0
- package/dist/esm/api/types/DocDigitizationErrorMessage.mjs +2 -0
- package/dist/esm/api/types/DocDigitizationJobDetail.d.mts +26 -0
- package/dist/esm/api/types/DocDigitizationJobDetail.mjs +2 -0
- package/dist/esm/api/types/DocDigitizationJobDetailState.d.mts +9 -0
- package/dist/esm/api/types/DocDigitizationJobDetailState.mjs +9 -0
- package/dist/esm/api/types/DocDigitizationJobParameters.d.mts +10 -0
- package/dist/esm/api/types/DocDigitizationJobParameters.mjs +2 -0
- package/dist/esm/api/types/DocDigitizationJobState.d.mts +10 -0
- package/dist/esm/api/types/DocDigitizationJobState.mjs +10 -0
- package/dist/esm/api/types/DocDigitizationJobStatusResponse.d.mts +26 -0
- package/dist/esm/api/types/DocDigitizationJobStatusResponse.mjs +2 -0
- package/dist/esm/api/types/DocDigitizationOutputFormat.d.mts +5 -0
- package/dist/esm/api/types/DocDigitizationOutputFormat.mjs +5 -0
- package/dist/esm/api/types/DocDigitizationPageError.d.mts +11 -0
- package/dist/esm/api/types/DocDigitizationPageError.mjs +2 -0
- package/dist/esm/api/types/DocDigitizationSupportedLanguage.d.mts +26 -0
- package/dist/esm/api/types/DocDigitizationSupportedLanguage.mjs +26 -0
- package/dist/esm/api/types/DocDigitizationUploadFilesResponse.d.mts +14 -0
- package/dist/esm/api/types/DocDigitizationUploadFilesResponse.mjs +2 -0
- package/dist/esm/api/types/DocDigitizationWebhookCallback.d.mts +9 -0
- package/dist/esm/api/types/DocDigitizationWebhookCallback.mjs +2 -0
- package/dist/esm/api/types/index.d.mts +15 -0
- package/dist/esm/api/types/index.mjs +15 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +384 -0
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
|
|
|
43
43
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
44
44
|
"X-Fern-Language": "JavaScript",
|
|
45
45
|
"X-Fern-SDK-Name": "sarvamai",
|
|
46
|
-
"X-Fern-SDK-Version": "1.1.2-alpha.
|
|
47
|
-
"User-Agent": "sarvamai/1.1.2-alpha.
|
|
46
|
+
"X-Fern-SDK-Version": "1.1.2-alpha.3",
|
|
47
|
+
"User-Agent": "sarvamai/1.1.2-alpha.3",
|
|
48
48
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
49
49
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
50
50
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
package/dist/cjs/Client.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ChatClient } from "./api/resources/chat/client/Client.js";
|
|
2
|
+
import { DocDigitizationJobClient } from "./api/resources/docDigitizationJob/client/Client.js";
|
|
2
3
|
import { SpeechToTextClient } from "./api/resources/speechToText/client/Client.js";
|
|
3
4
|
import { SpeechToTextJobClient } from "./api/resources/speechToTextJob/client/Client.js";
|
|
4
5
|
import { SpeechToTextStreamingClient } from "./api/resources/speechToTextStreaming/client/Client.js";
|
|
@@ -23,6 +24,7 @@ export declare class SarvamAIClient {
|
|
|
23
24
|
protected _chat: ChatClient | undefined;
|
|
24
25
|
protected _speechToTextJob: SpeechToTextJobClient | undefined;
|
|
25
26
|
protected _speechToTextTranslateJob: SpeechToTextTranslateJobClient | undefined;
|
|
27
|
+
protected _docDigitizationJob: DocDigitizationJobClient | undefined;
|
|
26
28
|
protected _speechToTextStreaming: SpeechToTextStreamingClient | undefined;
|
|
27
29
|
protected _speechToTextTranslateStreaming: SpeechToTextTranslateStreamingClient | undefined;
|
|
28
30
|
protected _textToSpeechStreaming: TextToSpeechStreamingClient | undefined;
|
|
@@ -33,6 +35,7 @@ export declare class SarvamAIClient {
|
|
|
33
35
|
get chat(): ChatClient;
|
|
34
36
|
get speechToTextJob(): SpeechToTextJobClient;
|
|
35
37
|
get speechToTextTranslateJob(): SpeechToTextTranslateJobClient;
|
|
38
|
+
get docDigitizationJob(): DocDigitizationJobClient;
|
|
36
39
|
get speechToTextStreaming(): SpeechToTextStreamingClient;
|
|
37
40
|
get speechToTextTranslateStreaming(): SpeechToTextTranslateStreamingClient;
|
|
38
41
|
get textToSpeechStreaming(): TextToSpeechStreamingClient;
|
package/dist/cjs/Client.js
CHANGED
|
@@ -3,14 +3,15 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.SarvamAIClient = void 0;
|
|
5
5
|
const Client_js_1 = require("./api/resources/chat/client/Client.js");
|
|
6
|
-
const Client_js_2 = require("./api/resources/
|
|
7
|
-
const Client_js_3 = require("./api/resources/
|
|
8
|
-
const Client_js_4 = require("./api/resources/
|
|
9
|
-
const Client_js_5 = require("./api/resources/
|
|
10
|
-
const Client_js_6 = require("./api/resources/
|
|
11
|
-
const Client_js_7 = require("./api/resources/
|
|
12
|
-
const Client_js_8 = require("./api/resources/
|
|
13
|
-
const Client_js_9 = require("./api/resources/
|
|
6
|
+
const Client_js_2 = require("./api/resources/docDigitizationJob/client/Client.js");
|
|
7
|
+
const Client_js_3 = require("./api/resources/speechToText/client/Client.js");
|
|
8
|
+
const Client_js_4 = require("./api/resources/speechToTextJob/client/Client.js");
|
|
9
|
+
const Client_js_5 = require("./api/resources/speechToTextStreaming/client/Client.js");
|
|
10
|
+
const Client_js_6 = require("./api/resources/speechToTextTranslateJob/client/Client.js");
|
|
11
|
+
const Client_js_7 = require("./api/resources/speechToTextTranslateStreaming/client/Client.js");
|
|
12
|
+
const Client_js_8 = require("./api/resources/text/client/Client.js");
|
|
13
|
+
const Client_js_9 = require("./api/resources/textToSpeech/client/Client.js");
|
|
14
|
+
const Client_js_10 = require("./api/resources/textToSpeechStreaming/client/Client.js");
|
|
14
15
|
const BaseClient_js_1 = require("./BaseClient.js");
|
|
15
16
|
class SarvamAIClient {
|
|
16
17
|
constructor(options = {}) {
|
|
@@ -18,15 +19,15 @@ class SarvamAIClient {
|
|
|
18
19
|
}
|
|
19
20
|
get text() {
|
|
20
21
|
var _a;
|
|
21
|
-
return ((_a = this._text) !== null && _a !== void 0 ? _a : (this._text = new
|
|
22
|
+
return ((_a = this._text) !== null && _a !== void 0 ? _a : (this._text = new Client_js_8.TextClient(this._options)));
|
|
22
23
|
}
|
|
23
24
|
get speechToText() {
|
|
24
25
|
var _a;
|
|
25
|
-
return ((_a = this._speechToText) !== null && _a !== void 0 ? _a : (this._speechToText = new
|
|
26
|
+
return ((_a = this._speechToText) !== null && _a !== void 0 ? _a : (this._speechToText = new Client_js_3.SpeechToTextClient(this._options)));
|
|
26
27
|
}
|
|
27
28
|
get textToSpeech() {
|
|
28
29
|
var _a;
|
|
29
|
-
return ((_a = this._textToSpeech) !== null && _a !== void 0 ? _a : (this._textToSpeech = new
|
|
30
|
+
return ((_a = this._textToSpeech) !== null && _a !== void 0 ? _a : (this._textToSpeech = new Client_js_9.TextToSpeechClient(this._options)));
|
|
30
31
|
}
|
|
31
32
|
get chat() {
|
|
32
33
|
var _a;
|
|
@@ -34,23 +35,27 @@ class SarvamAIClient {
|
|
|
34
35
|
}
|
|
35
36
|
get speechToTextJob() {
|
|
36
37
|
var _a;
|
|
37
|
-
return ((_a = this._speechToTextJob) !== null && _a !== void 0 ? _a : (this._speechToTextJob = new
|
|
38
|
+
return ((_a = this._speechToTextJob) !== null && _a !== void 0 ? _a : (this._speechToTextJob = new Client_js_4.SpeechToTextJobClient(this._options)));
|
|
38
39
|
}
|
|
39
40
|
get speechToTextTranslateJob() {
|
|
40
41
|
var _a;
|
|
41
|
-
return ((_a = this._speechToTextTranslateJob) !== null && _a !== void 0 ? _a : (this._speechToTextTranslateJob = new
|
|
42
|
+
return ((_a = this._speechToTextTranslateJob) !== null && _a !== void 0 ? _a : (this._speechToTextTranslateJob = new Client_js_6.SpeechToTextTranslateJobClient(this._options)));
|
|
43
|
+
}
|
|
44
|
+
get docDigitizationJob() {
|
|
45
|
+
var _a;
|
|
46
|
+
return ((_a = this._docDigitizationJob) !== null && _a !== void 0 ? _a : (this._docDigitizationJob = new Client_js_2.DocDigitizationJobClient(this._options)));
|
|
42
47
|
}
|
|
43
48
|
get speechToTextStreaming() {
|
|
44
49
|
var _a;
|
|
45
|
-
return ((_a = this._speechToTextStreaming) !== null && _a !== void 0 ? _a : (this._speechToTextStreaming = new
|
|
50
|
+
return ((_a = this._speechToTextStreaming) !== null && _a !== void 0 ? _a : (this._speechToTextStreaming = new Client_js_5.SpeechToTextStreamingClient(this._options)));
|
|
46
51
|
}
|
|
47
52
|
get speechToTextTranslateStreaming() {
|
|
48
53
|
var _a;
|
|
49
|
-
return ((_a = this._speechToTextTranslateStreaming) !== null && _a !== void 0 ? _a : (this._speechToTextTranslateStreaming = new
|
|
54
|
+
return ((_a = this._speechToTextTranslateStreaming) !== null && _a !== void 0 ? _a : (this._speechToTextTranslateStreaming = new Client_js_7.SpeechToTextTranslateStreamingClient(this._options)));
|
|
50
55
|
}
|
|
51
56
|
get textToSpeechStreaming() {
|
|
52
57
|
var _a;
|
|
53
|
-
return ((_a = this._textToSpeechStreaming) !== null && _a !== void 0 ? _a : (this._textToSpeechStreaming = new
|
|
58
|
+
return ((_a = this._textToSpeechStreaming) !== null && _a !== void 0 ? _a : (this._textToSpeechStreaming = new Client_js_10.TextToSpeechStreamingClient(this._options)));
|
|
54
59
|
}
|
|
55
60
|
}
|
|
56
61
|
exports.SarvamAIClient = SarvamAIClient;
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
|
|
3
|
+
import * as core from "../../../../core/index.js";
|
|
4
|
+
import * as SarvamAI from "../../../index.js";
|
|
5
|
+
export declare namespace DocDigitizationJobClient {
|
|
6
|
+
interface Options extends BaseClientOptions {
|
|
7
|
+
}
|
|
8
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export declare class DocDigitizationJobClient {
|
|
12
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<DocDigitizationJobClient.Options>;
|
|
13
|
+
constructor(options?: DocDigitizationJobClient.Options);
|
|
14
|
+
/**
|
|
15
|
+
* Creates a new document digitization job.
|
|
16
|
+
*
|
|
17
|
+
* **Supported Languages:**
|
|
18
|
+
* - `hi`: Hindi
|
|
19
|
+
* - `en`: English
|
|
20
|
+
* - `bn`: Bengali
|
|
21
|
+
* - `gu`: Gujarati
|
|
22
|
+
* - `kn`: Kannada
|
|
23
|
+
* - `ml`: Malayalam
|
|
24
|
+
* - `mr`: Marathi
|
|
25
|
+
* - `or`: Odia
|
|
26
|
+
* - `pa`: Punjabi
|
|
27
|
+
* - `ta`: Tamil
|
|
28
|
+
* - `te`: Telugu
|
|
29
|
+
* - `ur`: Urdu
|
|
30
|
+
* - `as`: Assamese
|
|
31
|
+
* - `bodo`: Bodo
|
|
32
|
+
* - `doi`: Dogri
|
|
33
|
+
* - `ks`: Kashmiri
|
|
34
|
+
* - `kok`: Konkani
|
|
35
|
+
* - `mai`: Maithili
|
|
36
|
+
* - `mni`: Manipuri
|
|
37
|
+
* - `ne`: Nepali
|
|
38
|
+
* - `sa`: Sanskrit
|
|
39
|
+
* - `sat`: Santali
|
|
40
|
+
* - `sd`: Sindhi
|
|
41
|
+
*
|
|
42
|
+
* **Output Formats:**
|
|
43
|
+
* - `html`: Structured HTML with layout preservation (default)
|
|
44
|
+
* - `md`: Markdown format
|
|
45
|
+
*
|
|
46
|
+
* **Webhook Callback:**
|
|
47
|
+
* Optionally provide a callback URL to receive notification when processing completes.
|
|
48
|
+
*
|
|
49
|
+
* @param {SarvamAI.DocDigitizationJobRequest} request
|
|
50
|
+
* @param {DocDigitizationJobClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
51
|
+
*
|
|
52
|
+
* @throws {@link SarvamAI.BadRequestError}
|
|
53
|
+
* @throws {@link SarvamAI.ForbiddenError}
|
|
54
|
+
* @throws {@link SarvamAI.TooManyRequestsError}
|
|
55
|
+
* @throws {@link SarvamAI.InternalServerError}
|
|
56
|
+
* @throws {@link SarvamAI.ServiceUnavailableError}
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* await client.docDigitizationJob.initialise()
|
|
60
|
+
*/
|
|
61
|
+
initialise(request?: SarvamAI.DocDigitizationJobRequest, requestOptions?: DocDigitizationJobClient.RequestOptions): core.HttpResponsePromise<SarvamAI.DocDigitizationCreateJobResponse>;
|
|
62
|
+
private __initialise;
|
|
63
|
+
/**
|
|
64
|
+
* Returns presigned URLs for uploading input files.
|
|
65
|
+
*
|
|
66
|
+
* **File Constraints:**
|
|
67
|
+
* - Exactly one file required (PDF or ZIP)
|
|
68
|
+
* - PDF files: `.pdf` extension
|
|
69
|
+
* - ZIP files: `.zip` extension
|
|
70
|
+
*
|
|
71
|
+
* @param {SarvamAI.DocDigitizationUploadFilesRequest} request
|
|
72
|
+
* @param {DocDigitizationJobClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
73
|
+
*
|
|
74
|
+
* @throws {@link SarvamAI.BadRequestError}
|
|
75
|
+
* @throws {@link SarvamAI.ForbiddenError}
|
|
76
|
+
* @throws {@link SarvamAI.TooManyRequestsError}
|
|
77
|
+
* @throws {@link SarvamAI.InternalServerError}
|
|
78
|
+
* @throws {@link SarvamAI.ServiceUnavailableError}
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* await client.docDigitizationJob.getUploadLinks({
|
|
82
|
+
* job_id: "job_id",
|
|
83
|
+
* files: ["files"]
|
|
84
|
+
* })
|
|
85
|
+
*/
|
|
86
|
+
getUploadLinks(request: SarvamAI.DocDigitizationUploadFilesRequest, requestOptions?: DocDigitizationJobClient.RequestOptions): core.HttpResponsePromise<SarvamAI.DocDigitizationUploadFilesResponse>;
|
|
87
|
+
private __getUploadLinks;
|
|
88
|
+
/**
|
|
89
|
+
* Validates the uploaded file and starts processing.
|
|
90
|
+
*
|
|
91
|
+
* **Validation Checks:**
|
|
92
|
+
* - File must be uploaded before starting
|
|
93
|
+
* - File size must not exceed 200 MB
|
|
94
|
+
* - PDF must be parseable by the PDF parser
|
|
95
|
+
* - ZIP must contain only JPEG/PNG images
|
|
96
|
+
* - ZIP must be flat (no nested folders beyond one level)
|
|
97
|
+
* - ZIP must contain at least one valid image
|
|
98
|
+
* - Page/image count must not exceed 500
|
|
99
|
+
* - User must have sufficient credits
|
|
100
|
+
*
|
|
101
|
+
* **Processing:**
|
|
102
|
+
* Job runs asynchronously. Poll the status endpoint or use webhook callback for completion notification.
|
|
103
|
+
*
|
|
104
|
+
* @param {string} job_id - The unique identifier of the job
|
|
105
|
+
* @param {DocDigitizationJobClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
106
|
+
*
|
|
107
|
+
* @throws {@link SarvamAI.BadRequestError}
|
|
108
|
+
* @throws {@link SarvamAI.ForbiddenError}
|
|
109
|
+
* @throws {@link SarvamAI.TooManyRequestsError}
|
|
110
|
+
* @throws {@link SarvamAI.InternalServerError}
|
|
111
|
+
* @throws {@link SarvamAI.ServiceUnavailableError}
|
|
112
|
+
*
|
|
113
|
+
* @example
|
|
114
|
+
* await client.docDigitizationJob.start("job_id")
|
|
115
|
+
*/
|
|
116
|
+
start(job_id: string, requestOptions?: DocDigitizationJobClient.RequestOptions): core.HttpResponsePromise<SarvamAI.DocDigitizationJobStatusResponse>;
|
|
117
|
+
private __start;
|
|
118
|
+
/**
|
|
119
|
+
* Returns the current status of a job with page-level metrics.
|
|
120
|
+
*
|
|
121
|
+
* **Job States:**
|
|
122
|
+
* - `Accepted`: Job created, awaiting file upload
|
|
123
|
+
* - `Pending`: File uploaded, waiting to start
|
|
124
|
+
* - `Running`: Processing in progress
|
|
125
|
+
* - `Completed`: All pages processed successfully
|
|
126
|
+
* - `PartiallyCompleted`: Some pages succeeded, some failed
|
|
127
|
+
* - `Failed`: All pages failed or job-level error
|
|
128
|
+
*
|
|
129
|
+
* **Page Metrics:**
|
|
130
|
+
* Response includes detailed progress: total pages, pages processed, succeeded, failed, and per-page errors.
|
|
131
|
+
*
|
|
132
|
+
* @param {string} job_id - The unique identifier of the job
|
|
133
|
+
* @param {DocDigitizationJobClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
134
|
+
*
|
|
135
|
+
* @throws {@link SarvamAI.BadRequestError}
|
|
136
|
+
* @throws {@link SarvamAI.ForbiddenError}
|
|
137
|
+
* @throws {@link SarvamAI.TooManyRequestsError}
|
|
138
|
+
* @throws {@link SarvamAI.InternalServerError}
|
|
139
|
+
* @throws {@link SarvamAI.ServiceUnavailableError}
|
|
140
|
+
*
|
|
141
|
+
* @example
|
|
142
|
+
* await client.docDigitizationJob.getStatus("job_id")
|
|
143
|
+
*/
|
|
144
|
+
getStatus(job_id: string, requestOptions?: DocDigitizationJobClient.RequestOptions): core.HttpResponsePromise<SarvamAI.DocDigitizationJobStatusResponse>;
|
|
145
|
+
private __getStatus;
|
|
146
|
+
/**
|
|
147
|
+
* Returns presigned URLs for downloading output files.
|
|
148
|
+
*
|
|
149
|
+
* **Prerequisites:**
|
|
150
|
+
* - Job must be in `Completed` or `PartiallyCompleted` state
|
|
151
|
+
* - Failed jobs have no output available
|
|
152
|
+
*
|
|
153
|
+
* @param {string} job_id - The unique identifier of the job
|
|
154
|
+
* @param {DocDigitizationJobClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
155
|
+
*
|
|
156
|
+
* @throws {@link SarvamAI.BadRequestError}
|
|
157
|
+
* @throws {@link SarvamAI.ForbiddenError}
|
|
158
|
+
* @throws {@link SarvamAI.TooManyRequestsError}
|
|
159
|
+
* @throws {@link SarvamAI.InternalServerError}
|
|
160
|
+
* @throws {@link SarvamAI.ServiceUnavailableError}
|
|
161
|
+
*
|
|
162
|
+
* @example
|
|
163
|
+
* await client.docDigitizationJob.getDownloadLinks("job_id")
|
|
164
|
+
*/
|
|
165
|
+
getDownloadLinks(job_id: string, requestOptions?: DocDigitizationJobClient.RequestOptions): core.HttpResponsePromise<SarvamAI.DocDigitizationDownloadFilesResponse>;
|
|
166
|
+
private __getDownloadLinks;
|
|
167
|
+
}
|