oci-aidocument 2.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/LICENSE.txt +89 -0
- package/NOTICE.txt +1 -0
- package/README.md +22 -0
- package/THIRD_PARTY_LICENSES.txt +576 -0
- package/index.d.ts +22 -0
- package/index.js +45 -0
- package/index.js.map +1 -0
- package/lib/aiservicedocument-waiter.d.ts +29 -0
- package/lib/aiservicedocument-waiter.js +45 -0
- package/lib/aiservicedocument-waiter.js.map +1 -0
- package/lib/client.d.ts +102 -0
- package/lib/client.js +341 -0
- package/lib/client.js.map +1 -0
- package/lib/model/analyze-document-result.d.ts +63 -0
- package/lib/model/analyze-document-result.js +97 -0
- package/lib/model/analyze-document-result.js.map +1 -0
- package/lib/model/bounding-polygon.d.ts +28 -0
- package/lib/model/bounding-polygon.js +61 -0
- package/lib/model/bounding-polygon.js.map +1 -0
- package/lib/model/cell.d.ts +43 -0
- package/lib/model/cell.js +57 -0
- package/lib/model/cell.js.map +1 -0
- package/lib/model/create-processor-job-details.d.ts +33 -0
- package/lib/model/create-processor-job-details.js +69 -0
- package/lib/model/create-processor-job-details.js.map +1 -0
- package/lib/model/detected-document-type.d.ts +29 -0
- package/lib/model/detected-document-type.js +29 -0
- package/lib/model/detected-document-type.js.map +1 -0
- package/lib/model/detected-language.d.ts +29 -0
- package/lib/model/detected-language.js +29 -0
- package/lib/model/detected-language.js.map +1 -0
- package/lib/model/dimensions.d.ts +42 -0
- package/lib/model/dimensions.js +39 -0
- package/lib/model/dimensions.js.map +1 -0
- package/lib/model/document-classification-feature.d.ts +28 -0
- package/lib/model/document-classification-feature.js +54 -0
- package/lib/model/document-classification-feature.js.map +1 -0
- package/lib/model/document-feature.d.ts +22 -0
- package/lib/model/document-feature.js +84 -0
- package/lib/model/document-feature.js.map +1 -0
- package/lib/model/document-field.d.ts +40 -0
- package/lib/model/document-field.js +75 -0
- package/lib/model/document-field.js.map +1 -0
- package/lib/model/document-key-value-extraction-feature.d.ts +24 -0
- package/lib/model/document-key-value-extraction-feature.js +54 -0
- package/lib/model/document-key-value-extraction-feature.js.map +1 -0
- package/lib/model/document-language-classification-feature.d.ts +28 -0
- package/lib/model/document-language-classification-feature.js +54 -0
- package/lib/model/document-language-classification-feature.js.map +1 -0
- package/lib/model/document-metadata.d.ts +29 -0
- package/lib/model/document-metadata.js +29 -0
- package/lib/model/document-metadata.js.map +1 -0
- package/lib/model/document-table-extraction-feature.d.ts +24 -0
- package/lib/model/document-table-extraction-feature.js +54 -0
- package/lib/model/document-table-extraction-feature.js.map +1 -0
- package/lib/model/document-text-extraction-feature.d.ts +28 -0
- package/lib/model/document-text-extraction-feature.js +54 -0
- package/lib/model/document-text-extraction-feature.js.map +1 -0
- package/lib/model/document-type.d.ts +36 -0
- package/lib/model/document-type.js +47 -0
- package/lib/model/document-type.js.map +1 -0
- package/lib/model/field-label.d.ts +29 -0
- package/lib/model/field-label.js +29 -0
- package/lib/model/field-label.js.map +1 -0
- package/lib/model/field-name.d.ts +35 -0
- package/lib/model/field-name.js +57 -0
- package/lib/model/field-name.js.map +1 -0
- package/lib/model/field-value.d.ts +36 -0
- package/lib/model/field-value.js +100 -0
- package/lib/model/field-value.js.map +1 -0
- package/lib/model/general-processor-config.d.ts +40 -0
- package/lib/model/general-processor-config.js +66 -0
- package/lib/model/general-processor-config.js.map +1 -0
- package/lib/model/index.d.ts +96 -0
- package/lib/model/index.js +119 -0
- package/lib/model/index.js.map +1 -0
- package/lib/model/inline-document-content.d.ts +28 -0
- package/lib/model/inline-document-content.js +52 -0
- package/lib/model/inline-document-content.js.map +1 -0
- package/lib/model/input-location.d.ts +22 -0
- package/lib/model/input-location.js +72 -0
- package/lib/model/input-location.js.map +1 -0
- package/lib/model/line.d.ts +35 -0
- package/lib/model/line.js +57 -0
- package/lib/model/line.js.map +1 -0
- package/lib/model/normalized-vertex.d.ts +32 -0
- package/lib/model/normalized-vertex.js +29 -0
- package/lib/model/normalized-vertex.js.map +1 -0
- package/lib/model/object-location.d.ts +33 -0
- package/lib/model/object-location.js +29 -0
- package/lib/model/object-location.js.map +1 -0
- package/lib/model/object-storage-locations.d.ts +28 -0
- package/lib/model/object-storage-locations.js +64 -0
- package/lib/model/object-storage-locations.js.map +1 -0
- package/lib/model/output-location.d.ts +33 -0
- package/lib/model/output-location.js +29 -0
- package/lib/model/output-location.js.map +1 -0
- package/lib/model/page.d.ts +51 -0
- package/lib/model/page.js +115 -0
- package/lib/model/page.js.map +1 -0
- package/lib/model/processing-error.d.ts +29 -0
- package/lib/model/processing-error.js +29 -0
- package/lib/model/processing-error.js.map +1 -0
- package/lib/model/processor-config.d.ts +22 -0
- package/lib/model/processor-config.js +68 -0
- package/lib/model/processor-config.js.map +1 -0
- package/lib/model/processor-job.d.ts +83 -0
- package/lib/model/processor-job.js +93 -0
- package/lib/model/processor-job.js.map +1 -0
- package/lib/model/processor-type.d.ts +27 -0
- package/lib/model/processor-type.js +38 -0
- package/lib/model/processor-type.js.map +1 -0
- package/lib/model/table-row.d.ts +26 -0
- package/lib/model/table-row.js +61 -0
- package/lib/model/table-row.js.map +1 -0
- package/lib/model/table.d.ts +47 -0
- package/lib/model/table.js +87 -0
- package/lib/model/table.js.map +1 -0
- package/lib/model/value-array.d.ts +25 -0
- package/lib/model/value-array.js +62 -0
- package/lib/model/value-array.js.map +1 -0
- package/lib/model/value-date.d.ts +28 -0
- package/lib/model/value-date.js +50 -0
- package/lib/model/value-date.js.map +1 -0
- package/lib/model/value-integer.d.ts +28 -0
- package/lib/model/value-integer.js +50 -0
- package/lib/model/value-integer.js.map +1 -0
- package/lib/model/value-number.d.ts +28 -0
- package/lib/model/value-number.js +50 -0
- package/lib/model/value-number.js.map +1 -0
- package/lib/model/value-phone-number.d.ts +28 -0
- package/lib/model/value-phone-number.js +52 -0
- package/lib/model/value-phone-number.js.map +1 -0
- package/lib/model/value-string.d.ts +28 -0
- package/lib/model/value-string.js +50 -0
- package/lib/model/value-string.js.map +1 -0
- package/lib/model/value-time.d.ts +28 -0
- package/lib/model/value-time.js +50 -0
- package/lib/model/value-time.js.map +1 -0
- package/lib/model/word.d.ts +31 -0
- package/lib/model/word.js +57 -0
- package/lib/model/word.js.map +1 -0
- package/lib/request/cancel-processor-job-request.d.ts +35 -0
- package/lib/request/cancel-processor-job-request.js +15 -0
- package/lib/request/cancel-processor-job-request.js.map +1 -0
- package/lib/request/create-processor-job-request.d.ts +36 -0
- package/lib/request/create-processor-job-request.js +15 -0
- package/lib/request/create-processor-job-request.js.map +1 -0
- package/lib/request/get-processor-job-request.d.ts +26 -0
- package/lib/request/get-processor-job-request.js +15 -0
- package/lib/request/get-processor-job-request.js.map +1 -0
- package/lib/request/index.d.ts +18 -0
- package/lib/request/index.js +15 -0
- package/lib/request/index.js.map +1 -0
- package/lib/response/cancel-processor-job-response.d.ts +20 -0
- package/lib/response/cancel-processor-job-response.js +15 -0
- package/lib/response/cancel-processor-job-response.js.map +1 -0
- package/lib/response/create-processor-job-response.d.ts +30 -0
- package/lib/response/create-processor-job-response.js +15 -0
- package/lib/response/create-processor-job-response.js.map +1 -0
- package/lib/response/get-processor-job-response.d.ts +30 -0
- package/lib/response/get-processor-job-response.js +15 -0
- package/lib/response/get-processor-job-response.js.map +1 -0
- package/lib/response/index.d.ts +18 -0
- package/lib/response/index.js +15 -0
- package/lib/response/index.js.map +1 -0
- package/package.json +29 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Document Understanding API
|
|
4
|
+
* Document AI helps customers perform various analysis on their documents. If a customer has lots of documents, they can process them in batch using asynchronous API endpoints.
|
|
5
|
+
* OpenAPI spec version: 20221109
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OracleSDKGenerator.
|
|
9
|
+
* Do not edit the class manually.
|
|
10
|
+
*
|
|
11
|
+
* Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
|
|
12
|
+
* This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
|
|
13
|
+
*/
|
|
14
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
+
exports.AIServiceDocumentWaiter = void 0;
|
|
25
|
+
const oci_common_1 = require("oci-common");
|
|
26
|
+
class AIServiceDocumentWaiter {
|
|
27
|
+
constructor(client, config) {
|
|
28
|
+
this.client = client;
|
|
29
|
+
this.config = config;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Waits forProcessorJob till it reaches any of the provided states
|
|
33
|
+
*
|
|
34
|
+
* @param request the request to send
|
|
35
|
+
* @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states
|
|
36
|
+
* @return response returns GetProcessorJobResponse
|
|
37
|
+
*/
|
|
38
|
+
forProcessorJob(request, ...targetStates) {
|
|
39
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
+
return oci_common_1.genericWaiter(this.config, () => this.client.getProcessorJob(request), response => targetStates.includes(response.processorJob.lifecycleState));
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.AIServiceDocumentWaiter = AIServiceDocumentWaiter;
|
|
45
|
+
//# sourceMappingURL=aiservicedocument-waiter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aiservicedocument-waiter.js","sourceRoot":"","sources":["../../../../lib/aidocument/lib/aiservicedocument-waiter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;;;;;;;;;;AAMH,2CAAgG;AAEhG,MAAa,uBAAuB;IAClC,YACU,MAA+B,EACtB,MAA4B;QADrC,WAAM,GAAN,MAAM,CAAyB;QACtB,WAAM,GAAN,MAAM,CAAsB;IAC5C,CAAC;IAEJ;;;;;;OAMG;IACU,eAAe,CAC1B,OAA+C,EAC/C,GAAG,YAAkD;;YAErD,OAAO,0BAAa,CAClB,IAAI,CAAC,MAAM,EACX,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,OAAO,CAAC,EAC1C,QAAQ,CAAC,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,QAAQ,CAAC,YAAY,CAAC,cAAe,CAAC,CACzE,CAAC;QACJ,CAAC;KAAA;CACF;AAvBD,0DAuBC"}
|
package/lib/client.d.ts
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Document Understanding API
|
|
3
|
+
* Document AI helps customers perform various analysis on their documents. If a customer has lots of documents, they can process them in batch using asynchronous API endpoints.
|
|
4
|
+
* OpenAPI spec version: 20221109
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* NOTE: This class is auto generated by OracleSDKGenerator.
|
|
8
|
+
* Do not edit the class manually.
|
|
9
|
+
*
|
|
10
|
+
* Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
|
|
11
|
+
* This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
|
|
12
|
+
*/
|
|
13
|
+
import common = require("oci-common");
|
|
14
|
+
import * as requests from "./request";
|
|
15
|
+
import * as responses from "./response";
|
|
16
|
+
import { AIServiceDocumentWaiter } from "./aiservicedocument-waiter";
|
|
17
|
+
export declare enum AIServiceDocumentApiKeys {
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* This service client uses {@link common.CircuitBreaker.DefaultConfiguration} for all the operations by default if no circuit breaker configuration is defined by the user.
|
|
21
|
+
*/
|
|
22
|
+
export declare class AIServiceDocumentClient {
|
|
23
|
+
protected static serviceEndpointTemplate: string;
|
|
24
|
+
protected static endpointServiceName: string;
|
|
25
|
+
protected "_endpoint": string;
|
|
26
|
+
protected "_defaultHeaders": any;
|
|
27
|
+
protected "_waiters": AIServiceDocumentWaiter;
|
|
28
|
+
protected "_clientConfiguration": common.ClientConfiguration;
|
|
29
|
+
protected _circuitBreaker: null;
|
|
30
|
+
protected _httpOptions: any;
|
|
31
|
+
targetService: string;
|
|
32
|
+
protected _httpClient: common.HttpClient;
|
|
33
|
+
constructor(params: common.AuthParams, clientConfiguration?: common.ClientConfiguration);
|
|
34
|
+
/**
|
|
35
|
+
* Get the endpoint that is being used to call (ex, https://www.example.com).
|
|
36
|
+
*/
|
|
37
|
+
get endpoint(): string;
|
|
38
|
+
/**
|
|
39
|
+
* Sets the endpoint to call (ex, https://www.example.com).
|
|
40
|
+
* @param endpoint The endpoint of the service.
|
|
41
|
+
*/
|
|
42
|
+
set endpoint(endpoint: string);
|
|
43
|
+
get logger(): import("oci-common/lib/log").Logger;
|
|
44
|
+
/**
|
|
45
|
+
* Sets the region to call (ex, Region.US_PHOENIX_1).
|
|
46
|
+
* Note, this will call {@link #endpoint(String) endpoint} after resolving the endpoint.
|
|
47
|
+
* @param region The region of the service.
|
|
48
|
+
*/
|
|
49
|
+
set region(region: common.Region);
|
|
50
|
+
/**
|
|
51
|
+
* Sets the regionId to call (ex, 'us-phoenix-1').
|
|
52
|
+
*
|
|
53
|
+
* Note, this will first try to map the region ID to a known Region and call {@link #region(Region) region}.
|
|
54
|
+
* If no known Region could be determined, it will create an endpoint assuming its in default Realm OC1
|
|
55
|
+
* and then call {@link #endpoint(String) endpoint}.
|
|
56
|
+
* @param regionId The public region ID.
|
|
57
|
+
*/
|
|
58
|
+
set regionId(regionId: string);
|
|
59
|
+
/**
|
|
60
|
+
* Creates a new AIServiceDocumentWaiter for resources for this service.
|
|
61
|
+
*
|
|
62
|
+
* @param config The waiter configuration for termination and delay strategy
|
|
63
|
+
* @return The service waiters.
|
|
64
|
+
*/
|
|
65
|
+
createWaiters(config?: common.WaiterConfiguration): AIServiceDocumentWaiter;
|
|
66
|
+
/**
|
|
67
|
+
* Gets the waiters available for resources for this service.
|
|
68
|
+
*
|
|
69
|
+
* @return The service waiters.
|
|
70
|
+
*/
|
|
71
|
+
getWaiters(): AIServiceDocumentWaiter;
|
|
72
|
+
/**
|
|
73
|
+
* Cancel a processor job.
|
|
74
|
+
*
|
|
75
|
+
* This operation does not retry by default if the user has not defined a retry configuration.
|
|
76
|
+
* @param CancelProcessorJobRequest
|
|
77
|
+
* @return CancelProcessorJobResponse
|
|
78
|
+
* @throws OciError when an error occurs
|
|
79
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.49.0/aidocument/CancelProcessorJob.ts.html |here} to see how to use CancelProcessorJob API.
|
|
80
|
+
*/
|
|
81
|
+
cancelProcessorJob(cancelProcessorJobRequest: requests.CancelProcessorJobRequest): Promise<responses.CancelProcessorJobResponse>;
|
|
82
|
+
/**
|
|
83
|
+
* Create a processor job for document analysis.
|
|
84
|
+
*
|
|
85
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
86
|
+
* @param CreateProcessorJobRequest
|
|
87
|
+
* @return CreateProcessorJobResponse
|
|
88
|
+
* @throws OciError when an error occurs
|
|
89
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.49.0/aidocument/CreateProcessorJob.ts.html |here} to see how to use CreateProcessorJob API.
|
|
90
|
+
*/
|
|
91
|
+
createProcessorJob(createProcessorJobRequest: requests.CreateProcessorJobRequest): Promise<responses.CreateProcessorJobResponse>;
|
|
92
|
+
/**
|
|
93
|
+
* Get the details of a processor job.
|
|
94
|
+
*
|
|
95
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
96
|
+
* @param GetProcessorJobRequest
|
|
97
|
+
* @return GetProcessorJobResponse
|
|
98
|
+
* @throws OciError when an error occurs
|
|
99
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.49.0/aidocument/GetProcessorJob.ts.html |here} to see how to use GetProcessorJob API.
|
|
100
|
+
*/
|
|
101
|
+
getProcessorJob(getProcessorJobRequest: requests.GetProcessorJobRequest): Promise<responses.GetProcessorJobResponse>;
|
|
102
|
+
}
|
package/lib/client.js
ADDED
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Document Understanding API
|
|
4
|
+
* Document AI helps customers perform various analysis on their documents. If a customer has lots of documents, they can process them in batch using asynchronous API endpoints.
|
|
5
|
+
* OpenAPI spec version: 20221109
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OracleSDKGenerator.
|
|
9
|
+
* Do not edit the class manually.
|
|
10
|
+
*
|
|
11
|
+
* Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
|
|
12
|
+
* This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
|
|
13
|
+
*/
|
|
14
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
15
|
+
if (k2 === undefined) k2 = k;
|
|
16
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
17
|
+
}) : (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
o[k2] = m[k];
|
|
20
|
+
}));
|
|
21
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
22
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
23
|
+
}) : function(o, v) {
|
|
24
|
+
o["default"] = v;
|
|
25
|
+
});
|
|
26
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
27
|
+
if (mod && mod.__esModule) return mod;
|
|
28
|
+
var result = {};
|
|
29
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
30
|
+
__setModuleDefault(result, mod);
|
|
31
|
+
return result;
|
|
32
|
+
};
|
|
33
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
34
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
35
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
36
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
37
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
38
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
39
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
43
|
+
exports.AIServiceDocumentClient = exports.AIServiceDocumentApiKeys = void 0;
|
|
44
|
+
const common = require("oci-common");
|
|
45
|
+
const model = __importStar(require("./model"));
|
|
46
|
+
const aiservicedocument_waiter_1 = require("./aiservicedocument-waiter");
|
|
47
|
+
const oci_common_1 = require("oci-common");
|
|
48
|
+
// ===============================================
|
|
49
|
+
// This file is autogenerated - Please do not edit
|
|
50
|
+
// ===============================================
|
|
51
|
+
var AIServiceDocumentApiKeys;
|
|
52
|
+
(function (AIServiceDocumentApiKeys) {
|
|
53
|
+
})(AIServiceDocumentApiKeys = exports.AIServiceDocumentApiKeys || (exports.AIServiceDocumentApiKeys = {}));
|
|
54
|
+
/**
|
|
55
|
+
* This service client uses {@link common.CircuitBreaker.DefaultConfiguration} for all the operations by default if no circuit breaker configuration is defined by the user.
|
|
56
|
+
*/
|
|
57
|
+
class AIServiceDocumentClient {
|
|
58
|
+
constructor(params, clientConfiguration) {
|
|
59
|
+
this["_endpoint"] = "";
|
|
60
|
+
this["_defaultHeaders"] = {};
|
|
61
|
+
this._circuitBreaker = null;
|
|
62
|
+
this._httpOptions = undefined;
|
|
63
|
+
this.targetService = "AIServiceDocument";
|
|
64
|
+
const requestSigner = params.authenticationDetailsProvider
|
|
65
|
+
? new common.DefaultRequestSigner(params.authenticationDetailsProvider)
|
|
66
|
+
: null;
|
|
67
|
+
if (clientConfiguration) {
|
|
68
|
+
this._clientConfiguration = clientConfiguration;
|
|
69
|
+
this._circuitBreaker = clientConfiguration.circuitBreaker
|
|
70
|
+
? clientConfiguration.circuitBreaker.circuit
|
|
71
|
+
: null;
|
|
72
|
+
this._httpOptions = clientConfiguration.httpOptions
|
|
73
|
+
? clientConfiguration.httpOptions
|
|
74
|
+
: undefined;
|
|
75
|
+
}
|
|
76
|
+
// if circuit breaker is not created, check if circuit breaker system is enabled to use default circuit breaker
|
|
77
|
+
const specCircuitBreakerEnabled = true;
|
|
78
|
+
if (!this._circuitBreaker &&
|
|
79
|
+
common.utils.isCircuitBreakerSystemEnabled(clientConfiguration) &&
|
|
80
|
+
(specCircuitBreakerEnabled || common.CircuitBreaker.DefaultCircuitBreakerOverriden)) {
|
|
81
|
+
this._circuitBreaker = new common.CircuitBreaker().circuit;
|
|
82
|
+
}
|
|
83
|
+
this._httpClient =
|
|
84
|
+
params.httpClient ||
|
|
85
|
+
new common.FetchHttpClient(requestSigner, this._circuitBreaker, this._httpOptions);
|
|
86
|
+
if (params.authenticationDetailsProvider &&
|
|
87
|
+
common.isRegionProvider(params.authenticationDetailsProvider)) {
|
|
88
|
+
const provider = params.authenticationDetailsProvider;
|
|
89
|
+
if (provider.getRegion()) {
|
|
90
|
+
this.region = provider.getRegion();
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Get the endpoint that is being used to call (ex, https://www.example.com).
|
|
96
|
+
*/
|
|
97
|
+
get endpoint() {
|
|
98
|
+
return this._endpoint;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Sets the endpoint to call (ex, https://www.example.com).
|
|
102
|
+
* @param endpoint The endpoint of the service.
|
|
103
|
+
*/
|
|
104
|
+
set endpoint(endpoint) {
|
|
105
|
+
this._endpoint = endpoint;
|
|
106
|
+
this._endpoint = this._endpoint + "/20221109";
|
|
107
|
+
if (this.logger)
|
|
108
|
+
this.logger.info(`AIServiceDocumentClient endpoint set to ${this._endpoint}`);
|
|
109
|
+
}
|
|
110
|
+
get logger() {
|
|
111
|
+
return common.LOG.logger;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Sets the region to call (ex, Region.US_PHOENIX_1).
|
|
115
|
+
* Note, this will call {@link #endpoint(String) endpoint} after resolving the endpoint.
|
|
116
|
+
* @param region The region of the service.
|
|
117
|
+
*/
|
|
118
|
+
set region(region) {
|
|
119
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegion(AIServiceDocumentClient.serviceEndpointTemplate, region, AIServiceDocumentClient.endpointServiceName);
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Sets the regionId to call (ex, 'us-phoenix-1').
|
|
123
|
+
*
|
|
124
|
+
* Note, this will first try to map the region ID to a known Region and call {@link #region(Region) region}.
|
|
125
|
+
* If no known Region could be determined, it will create an endpoint assuming its in default Realm OC1
|
|
126
|
+
* and then call {@link #endpoint(String) endpoint}.
|
|
127
|
+
* @param regionId The public region ID.
|
|
128
|
+
*/
|
|
129
|
+
set regionId(regionId) {
|
|
130
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(AIServiceDocumentClient.serviceEndpointTemplate, regionId, AIServiceDocumentClient.endpointServiceName);
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Creates a new AIServiceDocumentWaiter for resources for this service.
|
|
134
|
+
*
|
|
135
|
+
* @param config The waiter configuration for termination and delay strategy
|
|
136
|
+
* @return The service waiters.
|
|
137
|
+
*/
|
|
138
|
+
createWaiters(config) {
|
|
139
|
+
this._waiters = new aiservicedocument_waiter_1.AIServiceDocumentWaiter(this, config);
|
|
140
|
+
return this._waiters;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Gets the waiters available for resources for this service.
|
|
144
|
+
*
|
|
145
|
+
* @return The service waiters.
|
|
146
|
+
*/
|
|
147
|
+
getWaiters() {
|
|
148
|
+
if (this._waiters) {
|
|
149
|
+
return this._waiters;
|
|
150
|
+
}
|
|
151
|
+
throw Error("Waiters do not exist. Please create waiters.");
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Cancel a processor job.
|
|
155
|
+
*
|
|
156
|
+
* This operation does not retry by default if the user has not defined a retry configuration.
|
|
157
|
+
* @param CancelProcessorJobRequest
|
|
158
|
+
* @return CancelProcessorJobResponse
|
|
159
|
+
* @throws OciError when an error occurs
|
|
160
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.49.0/aidocument/CancelProcessorJob.ts.html |here} to see how to use CancelProcessorJob API.
|
|
161
|
+
*/
|
|
162
|
+
cancelProcessorJob(cancelProcessorJobRequest) {
|
|
163
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
164
|
+
if (this.logger)
|
|
165
|
+
this.logger.debug("Calling operation AIServiceDocumentClient#cancelProcessorJob.");
|
|
166
|
+
const operationName = "cancelProcessorJob";
|
|
167
|
+
const apiReferenceLink = "";
|
|
168
|
+
const pathParams = {
|
|
169
|
+
"{processorJobId}": cancelProcessorJobRequest.processorJobId
|
|
170
|
+
};
|
|
171
|
+
const queryParams = {};
|
|
172
|
+
let headerParams = {
|
|
173
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
174
|
+
"if-match": cancelProcessorJobRequest.ifMatch,
|
|
175
|
+
"opc-request-id": cancelProcessorJobRequest.opcRequestId
|
|
176
|
+
};
|
|
177
|
+
const specRetryConfiguration = common.NoRetryConfigurationDetails;
|
|
178
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, cancelProcessorJobRequest.retryConfiguration, specRetryConfiguration);
|
|
179
|
+
if (this.logger)
|
|
180
|
+
retrier.logger = this.logger;
|
|
181
|
+
const request = yield oci_common_1.composeRequest({
|
|
182
|
+
baseEndpoint: this._endpoint,
|
|
183
|
+
defaultHeaders: this._defaultHeaders,
|
|
184
|
+
path: "/processorJobs/{processorJobId}/actions/cancel",
|
|
185
|
+
method: "POST",
|
|
186
|
+
pathParams: pathParams,
|
|
187
|
+
headerParams: headerParams,
|
|
188
|
+
queryParams: queryParams
|
|
189
|
+
});
|
|
190
|
+
try {
|
|
191
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
192
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
193
|
+
responseObject: {},
|
|
194
|
+
responseHeaders: [
|
|
195
|
+
{
|
|
196
|
+
value: response.headers.get("opc-request-id"),
|
|
197
|
+
key: "opcRequestId",
|
|
198
|
+
dataType: "string"
|
|
199
|
+
}
|
|
200
|
+
]
|
|
201
|
+
});
|
|
202
|
+
return sdkResponse;
|
|
203
|
+
}
|
|
204
|
+
catch (err) {
|
|
205
|
+
throw err;
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Create a processor job for document analysis.
|
|
211
|
+
*
|
|
212
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
213
|
+
* @param CreateProcessorJobRequest
|
|
214
|
+
* @return CreateProcessorJobResponse
|
|
215
|
+
* @throws OciError when an error occurs
|
|
216
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.49.0/aidocument/CreateProcessorJob.ts.html |here} to see how to use CreateProcessorJob API.
|
|
217
|
+
*/
|
|
218
|
+
createProcessorJob(createProcessorJobRequest) {
|
|
219
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
220
|
+
if (this.logger)
|
|
221
|
+
this.logger.debug("Calling operation AIServiceDocumentClient#createProcessorJob.");
|
|
222
|
+
const operationName = "createProcessorJob";
|
|
223
|
+
const apiReferenceLink = "";
|
|
224
|
+
const pathParams = {};
|
|
225
|
+
const queryParams = {};
|
|
226
|
+
let headerParams = {
|
|
227
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
228
|
+
"opc-retry-token": createProcessorJobRequest.opcRetryToken,
|
|
229
|
+
"opc-request-id": createProcessorJobRequest.opcRequestId
|
|
230
|
+
};
|
|
231
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
232
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, createProcessorJobRequest.retryConfiguration, specRetryConfiguration);
|
|
233
|
+
if (this.logger)
|
|
234
|
+
retrier.logger = this.logger;
|
|
235
|
+
const request = yield oci_common_1.composeRequest({
|
|
236
|
+
baseEndpoint: this._endpoint,
|
|
237
|
+
defaultHeaders: this._defaultHeaders,
|
|
238
|
+
path: "/processorJobs",
|
|
239
|
+
method: "POST",
|
|
240
|
+
bodyContent: common.ObjectSerializer.serialize(createProcessorJobRequest.createProcessorJobDetails, "CreateProcessorJobDetails", model.CreateProcessorJobDetails.getJsonObj),
|
|
241
|
+
pathParams: pathParams,
|
|
242
|
+
headerParams: headerParams,
|
|
243
|
+
queryParams: queryParams
|
|
244
|
+
});
|
|
245
|
+
try {
|
|
246
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
247
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
248
|
+
responseObject: {},
|
|
249
|
+
body: yield response.json(),
|
|
250
|
+
bodyKey: "processorJob",
|
|
251
|
+
bodyModel: model.ProcessorJob,
|
|
252
|
+
type: "model.ProcessorJob",
|
|
253
|
+
responseHeaders: [
|
|
254
|
+
{
|
|
255
|
+
value: response.headers.get("opc-request-id"),
|
|
256
|
+
key: "opcRequestId",
|
|
257
|
+
dataType: "string"
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
value: response.headers.get("etag"),
|
|
261
|
+
key: "etag",
|
|
262
|
+
dataType: "string"
|
|
263
|
+
}
|
|
264
|
+
]
|
|
265
|
+
});
|
|
266
|
+
return sdkResponse;
|
|
267
|
+
}
|
|
268
|
+
catch (err) {
|
|
269
|
+
throw err;
|
|
270
|
+
}
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Get the details of a processor job.
|
|
275
|
+
*
|
|
276
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
277
|
+
* @param GetProcessorJobRequest
|
|
278
|
+
* @return GetProcessorJobResponse
|
|
279
|
+
* @throws OciError when an error occurs
|
|
280
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.49.0/aidocument/GetProcessorJob.ts.html |here} to see how to use GetProcessorJob API.
|
|
281
|
+
*/
|
|
282
|
+
getProcessorJob(getProcessorJobRequest) {
|
|
283
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
284
|
+
if (this.logger)
|
|
285
|
+
this.logger.debug("Calling operation AIServiceDocumentClient#getProcessorJob.");
|
|
286
|
+
const operationName = "getProcessorJob";
|
|
287
|
+
const apiReferenceLink = "";
|
|
288
|
+
const pathParams = {
|
|
289
|
+
"{processorJobId}": getProcessorJobRequest.processorJobId
|
|
290
|
+
};
|
|
291
|
+
const queryParams = {};
|
|
292
|
+
let headerParams = {
|
|
293
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
294
|
+
"opc-request-id": getProcessorJobRequest.opcRequestId
|
|
295
|
+
};
|
|
296
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
297
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getProcessorJobRequest.retryConfiguration, specRetryConfiguration);
|
|
298
|
+
if (this.logger)
|
|
299
|
+
retrier.logger = this.logger;
|
|
300
|
+
const request = yield oci_common_1.composeRequest({
|
|
301
|
+
baseEndpoint: this._endpoint,
|
|
302
|
+
defaultHeaders: this._defaultHeaders,
|
|
303
|
+
path: "/processorJobs/{processorJobId}",
|
|
304
|
+
method: "GET",
|
|
305
|
+
pathParams: pathParams,
|
|
306
|
+
headerParams: headerParams,
|
|
307
|
+
queryParams: queryParams
|
|
308
|
+
});
|
|
309
|
+
try {
|
|
310
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
311
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
312
|
+
responseObject: {},
|
|
313
|
+
body: yield response.json(),
|
|
314
|
+
bodyKey: "processorJob",
|
|
315
|
+
bodyModel: model.ProcessorJob,
|
|
316
|
+
type: "model.ProcessorJob",
|
|
317
|
+
responseHeaders: [
|
|
318
|
+
{
|
|
319
|
+
value: response.headers.get("etag"),
|
|
320
|
+
key: "etag",
|
|
321
|
+
dataType: "string"
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
value: response.headers.get("opc-request-id"),
|
|
325
|
+
key: "opcRequestId",
|
|
326
|
+
dataType: "string"
|
|
327
|
+
}
|
|
328
|
+
]
|
|
329
|
+
});
|
|
330
|
+
return sdkResponse;
|
|
331
|
+
}
|
|
332
|
+
catch (err) {
|
|
333
|
+
throw err;
|
|
334
|
+
}
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
exports.AIServiceDocumentClient = AIServiceDocumentClient;
|
|
339
|
+
AIServiceDocumentClient.serviceEndpointTemplate = "https://document.aiservice.{region}.oci.{secondLevelDomain}";
|
|
340
|
+
AIServiceDocumentClient.endpointServiceName = "";
|
|
341
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../lib/aidocument/lib/client.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,qCAAsC;AAEtC,+CAAiC;AAEjC,yEAAqE;AACrE,2CAA6E;AAE7E,kDAAkD;AAClD,kDAAkD;AAClD,kDAAkD;AAElD,IAAY,wBAA2B;AAAvC,WAAY,wBAAwB;AAAE,CAAC,EAA3B,wBAAwB,GAAxB,gCAAwB,KAAxB,gCAAwB,QAAG;AACvC;;GAEG;AACH,MAAa,uBAAuB;IAclC,YAAY,MAAyB,EAAE,mBAAgD;QAV7E,iBAAW,GAAW,EAAE,CAAC;QACzB,uBAAiB,GAAQ,EAAE,CAAC;QAG5B,oBAAe,GAAG,IAAI,CAAC;QACvB,iBAAY,GAAQ,SAAS,CAAC;QACjC,kBAAa,GAAG,mBAAmB,CAAC;QAKzC,MAAM,aAAa,GAAG,MAAM,CAAC,6BAA6B;YACxD,CAAC,CAAC,IAAI,MAAM,CAAC,oBAAoB,CAAC,MAAM,CAAC,6BAA6B,CAAC;YACvE,CAAC,CAAC,IAAI,CAAC;QACT,IAAI,mBAAmB,EAAE;YACvB,IAAI,CAAC,oBAAoB,GAAG,mBAAmB,CAAC;YAChD,IAAI,CAAC,eAAe,GAAG,mBAAmB,CAAC,cAAc;gBACvD,CAAC,CAAC,mBAAmB,CAAC,cAAe,CAAC,OAAO;gBAC7C,CAAC,CAAC,IAAI,CAAC;YACT,IAA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BACF;iBACF,CAAC,CAAC;gBAEH,OAAO,WAAW,CAAC;aACpB;YAAC,OAAO,GAAG,EAAE;gBACZ,MAAM,GAAG,CAAC;aACX;QACH,CAAC;KAAA;;AA7VH,0DA8VC;AA7VkB,+CAAuB,GACtC,6DAA6D,CAAC;AAC/C,2CAAmB,GAAG,EAAE,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Document Understanding API
|
|
3
|
+
* Document AI helps customers perform various analysis on their documents. If a customer has lots of documents, they can process them in batch using asynchronous API endpoints.
|
|
4
|
+
* OpenAPI spec version: 20221109
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* NOTE: This class is auto generated by OracleSDKGenerator.
|
|
8
|
+
* Do not edit the class manually.
|
|
9
|
+
*
|
|
10
|
+
* Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
|
|
11
|
+
* This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
|
|
12
|
+
*/
|
|
13
|
+
import * as model from "../model";
|
|
14
|
+
/**
|
|
15
|
+
* The document analysis results.
|
|
16
|
+
*/
|
|
17
|
+
export interface AnalyzeDocumentResult {
|
|
18
|
+
"documentMetadata": model.DocumentMetadata;
|
|
19
|
+
/**
|
|
20
|
+
* The array of a Page.
|
|
21
|
+
*/
|
|
22
|
+
"pages": Array<model.Page>;
|
|
23
|
+
/**
|
|
24
|
+
* An array of detected document types.
|
|
25
|
+
*/
|
|
26
|
+
"detectedDocumentTypes"?: Array<model.DetectedDocumentType>;
|
|
27
|
+
/**
|
|
28
|
+
* An array of detected languages.
|
|
29
|
+
*/
|
|
30
|
+
"detectedLanguages"?: Array<model.DetectedLanguage>;
|
|
31
|
+
/**
|
|
32
|
+
* The document classification model version.
|
|
33
|
+
*/
|
|
34
|
+
"documentClassificationModelVersion"?: string;
|
|
35
|
+
/**
|
|
36
|
+
* The document language classification model version.
|
|
37
|
+
*/
|
|
38
|
+
"languageClassificationModelVersion"?: string;
|
|
39
|
+
/**
|
|
40
|
+
* The document text extraction model version.
|
|
41
|
+
*/
|
|
42
|
+
"textExtractionModelVersion"?: string;
|
|
43
|
+
/**
|
|
44
|
+
* The document keyValue extraction model version.
|
|
45
|
+
*/
|
|
46
|
+
"keyValueExtractionModelVersion"?: string;
|
|
47
|
+
/**
|
|
48
|
+
* The document table extraction model version.
|
|
49
|
+
*/
|
|
50
|
+
"tableExtractionModelVersion"?: string;
|
|
51
|
+
/**
|
|
52
|
+
* The errors encountered during document analysis.
|
|
53
|
+
*/
|
|
54
|
+
"errors"?: Array<model.ProcessingError>;
|
|
55
|
+
/**
|
|
56
|
+
* The searchable PDF file that was generated.
|
|
57
|
+
*/
|
|
58
|
+
"searchablePdf"?: string;
|
|
59
|
+
}
|
|
60
|
+
export declare namespace AnalyzeDocumentResult {
|
|
61
|
+
function getJsonObj(obj: AnalyzeDocumentResult): object;
|
|
62
|
+
function getDeserializedJsonObj(obj: AnalyzeDocumentResult): object;
|
|
63
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Document Understanding API
|
|
4
|
+
* Document AI helps customers perform various analysis on their documents. If a customer has lots of documents, they can process them in batch using asynchronous API endpoints.
|
|
5
|
+
* OpenAPI spec version: 20221109
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OracleSDKGenerator.
|
|
9
|
+
* Do not edit the class manually.
|
|
10
|
+
*
|
|
11
|
+
* Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
|
|
12
|
+
* This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
|
|
13
|
+
*/
|
|
14
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
15
|
+
if (k2 === undefined) k2 = k;
|
|
16
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
17
|
+
}) : (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
o[k2] = m[k];
|
|
20
|
+
}));
|
|
21
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
22
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
23
|
+
}) : function(o, v) {
|
|
24
|
+
o["default"] = v;
|
|
25
|
+
});
|
|
26
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
27
|
+
if (mod && mod.__esModule) return mod;
|
|
28
|
+
var result = {};
|
|
29
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
30
|
+
__setModuleDefault(result, mod);
|
|
31
|
+
return result;
|
|
32
|
+
};
|
|
33
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
|
+
exports.AnalyzeDocumentResult = void 0;
|
|
35
|
+
const model = __importStar(require("../model"));
|
|
36
|
+
var AnalyzeDocumentResult;
|
|
37
|
+
(function (AnalyzeDocumentResult) {
|
|
38
|
+
function getJsonObj(obj) {
|
|
39
|
+
const jsonObj = Object.assign(Object.assign({}, obj), {
|
|
40
|
+
"documentMetadata": obj.documentMetadata
|
|
41
|
+
? model.DocumentMetadata.getJsonObj(obj.documentMetadata)
|
|
42
|
+
: undefined,
|
|
43
|
+
"pages": obj.pages
|
|
44
|
+
? obj.pages.map(item => {
|
|
45
|
+
return model.Page.getJsonObj(item);
|
|
46
|
+
})
|
|
47
|
+
: undefined,
|
|
48
|
+
"detectedDocumentTypes": obj.detectedDocumentTypes
|
|
49
|
+
? obj.detectedDocumentTypes.map(item => {
|
|
50
|
+
return model.DetectedDocumentType.getJsonObj(item);
|
|
51
|
+
})
|
|
52
|
+
: undefined,
|
|
53
|
+
"detectedLanguages": obj.detectedLanguages
|
|
54
|
+
? obj.detectedLanguages.map(item => {
|
|
55
|
+
return model.DetectedLanguage.getJsonObj(item);
|
|
56
|
+
})
|
|
57
|
+
: undefined,
|
|
58
|
+
"errors": obj.errors
|
|
59
|
+
? obj.errors.map(item => {
|
|
60
|
+
return model.ProcessingError.getJsonObj(item);
|
|
61
|
+
})
|
|
62
|
+
: undefined
|
|
63
|
+
});
|
|
64
|
+
return jsonObj;
|
|
65
|
+
}
|
|
66
|
+
AnalyzeDocumentResult.getJsonObj = getJsonObj;
|
|
67
|
+
function getDeserializedJsonObj(obj) {
|
|
68
|
+
const jsonObj = Object.assign(Object.assign({}, obj), {
|
|
69
|
+
"documentMetadata": obj.documentMetadata
|
|
70
|
+
? model.DocumentMetadata.getDeserializedJsonObj(obj.documentMetadata)
|
|
71
|
+
: undefined,
|
|
72
|
+
"pages": obj.pages
|
|
73
|
+
? obj.pages.map(item => {
|
|
74
|
+
return model.Page.getDeserializedJsonObj(item);
|
|
75
|
+
})
|
|
76
|
+
: undefined,
|
|
77
|
+
"detectedDocumentTypes": obj.detectedDocumentTypes
|
|
78
|
+
? obj.detectedDocumentTypes.map(item => {
|
|
79
|
+
return model.DetectedDocumentType.getDeserializedJsonObj(item);
|
|
80
|
+
})
|
|
81
|
+
: undefined,
|
|
82
|
+
"detectedLanguages": obj.detectedLanguages
|
|
83
|
+
? obj.detectedLanguages.map(item => {
|
|
84
|
+
return model.DetectedLanguage.getDeserializedJsonObj(item);
|
|
85
|
+
})
|
|
86
|
+
: undefined,
|
|
87
|
+
"errors": obj.errors
|
|
88
|
+
? obj.errors.map(item => {
|
|
89
|
+
return model.ProcessingError.getDeserializedJsonObj(item);
|
|
90
|
+
})
|
|
91
|
+
: undefined
|
|
92
|
+
});
|
|
93
|
+
return jsonObj;
|
|
94
|
+
}
|
|
95
|
+
AnalyzeDocumentResult.getDeserializedJsonObj = getDeserializedJsonObj;
|
|
96
|
+
})(AnalyzeDocumentResult = exports.AnalyzeDocumentResult || (exports.AnalyzeDocumentResult = {}));
|
|
97
|
+
//# sourceMappingURL=analyze-document-result.js.map
|