Skip to content

Commit 99e18a8

Browse files
Releasing version 2.112.0
Releasing version 2.112.0
2 parents af8dae1 + e5fe7ee commit 99e18a8

File tree

120 files changed

+3367
-30
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+3367
-30
lines changed

lib/aidocument/lib/client.ts

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1277,6 +1277,79 @@ export class AIServiceDocumentClient {
12771277
}
12781278
}
12791279

1280+
/**
1281+
* Gets model capabilities
1282+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1283+
* @param GetModelTypeRequest
1284+
* @return GetModelTypeResponse
1285+
* @throws OciError when an error occurs
1286+
* @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/aidocument/GetModelType.ts.html |here} to see how to use GetModelType API.
1287+
*/
1288+
public async getModelType(
1289+
getModelTypeRequest: requests.GetModelTypeRequest
1290+
): Promise<responses.GetModelTypeResponse> {
1291+
if (this.logger) this.logger.debug("Calling operation AIServiceDocumentClient#getModelType.");
1292+
const operationName = "getModelType";
1293+
const apiReferenceLink = "";
1294+
const pathParams = {
1295+
"{modelType}": getModelTypeRequest.modelType
1296+
};
1297+
1298+
const queryParams = {
1299+
"compartmentId": getModelTypeRequest.compartmentId,
1300+
"modelSubType": getModelTypeRequest.modelSubType
1301+
};
1302+
1303+
let headerParams = {
1304+
"Content-Type": common.Constants.APPLICATION_JSON,
1305+
"opc-request-id": getModelTypeRequest.opcRequestId
1306+
};
1307+
1308+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1309+
const retrier = GenericRetrier.createPreferredRetrier(
1310+
this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined,
1311+
getModelTypeRequest.retryConfiguration,
1312+
specRetryConfiguration
1313+
);
1314+
if (this.logger) retrier.logger = this.logger;
1315+
const request = await composeRequest({
1316+
baseEndpoint: this._endpoint,
1317+
defaultHeaders: this._defaultHeaders,
1318+
path: "/modelTypes/{modelType}",
1319+
method: "GET",
1320+
pathParams: pathParams,
1321+
headerParams: headerParams,
1322+
queryParams: queryParams
1323+
});
1324+
try {
1325+
const response = await retrier.makeServiceCall(
1326+
this._httpClient,
1327+
request,
1328+
this.targetService,
1329+
operationName,
1330+
apiReferenceLink
1331+
);
1332+
const sdkResponse = composeResponse({
1333+
responseObject: <responses.GetModelTypeResponse>{},
1334+
body: await response.json(),
1335+
bodyKey: "modelTypeInfo",
1336+
bodyModel: model.ModelTypeInfo,
1337+
type: "model.ModelTypeInfo",
1338+
responseHeaders: [
1339+
{
1340+
value: response.headers.get("opc-request-id"),
1341+
key: "opcRequestId",
1342+
dataType: "string"
1343+
}
1344+
]
1345+
});
1346+
1347+
return sdkResponse;
1348+
} catch (err) {
1349+
throw err;
1350+
}
1351+
}
1352+
12801353
/**
12811354
* Get the details of a processor job.
12821355
*

lib/aidocument/lib/model/analyze-document-result.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,14 @@ export interface AnalyzeDocumentResult {
5151
* The document table extraction model version.
5252
*/
5353
"tableExtractionModelVersion"?: string;
54+
/**
55+
* The document signature extraction model version.
56+
*/
57+
"signatureExtractionModelVersion"?: string;
58+
/**
59+
* The document bar code extraction model version.
60+
*/
61+
"barCodeExtractionModelVersion"?: string;
5462
/**
5563
* The errors encountered during document analysis.
5664
*/
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
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, 2025, 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+
14+
import * as model from "../model";
15+
import common = require("oci-common");
16+
17+
/**
18+
* A single bar code.
19+
*/
20+
export interface BarCode {
21+
/**
22+
* the confidence score between 0 and 1. Note: Numbers greater than Number.MAX_SAFE_INTEGER will result in rounding issues.
23+
*/
24+
"confidence": number;
25+
/**
26+
* the bar code value.
27+
*/
28+
"value": string;
29+
/**
30+
* the encoding schema of bar code.
31+
*/
32+
"codeType"?: string;
33+
"boundingPolygon": model.BoundingPolygon;
34+
}
35+
36+
export namespace BarCode {
37+
export function getJsonObj(obj: BarCode): object {
38+
const jsonObj = {
39+
...obj,
40+
...{
41+
"boundingPolygon": obj.boundingPolygon
42+
? model.BoundingPolygon.getJsonObj(obj.boundingPolygon)
43+
: undefined
44+
}
45+
};
46+
47+
return jsonObj;
48+
}
49+
export function getDeserializedJsonObj(obj: BarCode): object {
50+
const jsonObj = {
51+
...obj,
52+
...{
53+
"boundingPolygon": obj.boundingPolygon
54+
? model.BoundingPolygon.getDeserializedJsonObj(obj.boundingPolygon)
55+
: undefined
56+
}
57+
};
58+
59+
return jsonObj;
60+
}
61+
}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
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, 2025, 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+
14+
import * as model from "../model";
15+
import common = require("oci-common");
16+
17+
/**
18+
* Capabilities supported
19+
*/
20+
export interface Capabilities {
21+
/**
22+
* Model information capabilities related to version
23+
*/
24+
"capability"?: { [key: string]: model.Capability };
25+
}
26+
27+
export namespace Capabilities {
28+
export function getJsonObj(obj: Capabilities): object {
29+
const jsonObj = {
30+
...obj,
31+
...{
32+
"capability": obj.capability
33+
? common.mapContainer(obj.capability, model.Capability.getJsonObj)
34+
: undefined
35+
}
36+
};
37+
38+
return jsonObj;
39+
}
40+
export function getDeserializedJsonObj(obj: Capabilities): object {
41+
const jsonObj = {
42+
...obj,
43+
...{
44+
"capability": obj.capability
45+
? common.mapContainer(obj.capability, model.Capability.getDeserializedJsonObj)
46+
: undefined
47+
}
48+
};
49+
50+
return jsonObj;
51+
}
52+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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, 2025, 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+
14+
import * as model from "../model";
15+
import common = require("oci-common");
16+
17+
/**
18+
* Capability supported
19+
*/
20+
export interface Capability {
21+
/**
22+
* values
23+
*/
24+
"details"?: Array<string>;
25+
}
26+
27+
export namespace Capability {
28+
export function getJsonObj(obj: Capability): object {
29+
const jsonObj = { ...obj, ...{} };
30+
31+
return jsonObj;
32+
}
33+
export function getDeserializedJsonObj(obj: Capability): object {
34+
const jsonObj = { ...obj, ...{} };
35+
36+
return jsonObj;
37+
}
38+
}

lib/aidocument/lib/model/create-model-details.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@ export interface CreateModelDetails {
3434
* The type of the Document model.
3535
*/
3636
"modelType": string;
37+
/**
38+
* Applicable to only PRE_TRAINED_KEY_VALUE_EXTRACTION, PRE_TRAINED_DOCUMENT_ELEMENTS_EXTRACTION.
39+
*/
40+
"modelSubType"?: model.KvModelSubType | model.DocumentElementsSubType;
41+
/**
42+
* Number of replicas required for this model. Note: Numbers greater than Number.MAX_SAFE_INTEGER will result in rounding issues.
43+
*/
44+
"inferenceUnits"?: number;
3745
/**
3846
* The compartment identifier.
3947
*/
@@ -46,6 +54,10 @@ export interface CreateModelDetails {
4654
* The maximum model training time in hours, expressed as a decimal fraction. Note: Numbers greater than Number.MAX_SAFE_INTEGER will result in rounding issues.
4755
*/
4856
"maxTrainingTimeInHours"?: number;
57+
/**
58+
* The document language for model training, abbreviated according to the BCP 47 syntax.
59+
*/
60+
"language"?: string;
4961
"trainingDataset"?: model.DataScienceLabelingDataset | model.ObjectStorageDataset;
5062
"testingDataset"?: model.DataScienceLabelingDataset | model.ObjectStorageDataset;
5163
"validationDataset"?: model.DataScienceLabelingDataset | model.ObjectStorageDataset;
@@ -80,6 +92,10 @@ export namespace CreateModelDetails {
8092
const jsonObj = {
8193
...obj,
8294
...{
95+
"modelSubType": obj.modelSubType
96+
? model.ModelSubType.getJsonObj(obj.modelSubType)
97+
: undefined,
98+
8399
"trainingDataset": obj.trainingDataset
84100
? model.Dataset.getJsonObj(obj.trainingDataset)
85101
: undefined,
@@ -103,6 +119,10 @@ export namespace CreateModelDetails {
103119
const jsonObj = {
104120
...obj,
105121
...{
122+
"modelSubType": obj.modelSubType
123+
? model.ModelSubType.getDeserializedJsonObj(obj.modelSubType)
124+
: undefined,
125+
106126
"trainingDataset": obj.trainingDataset
107127
? model.Dataset.getDeserializedJsonObj(obj.trainingDataset)
108128
: undefined,

lib/aidocument/lib/model/create-processor-job-details.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export interface CreateProcessorJobDetails {
2828
* The display name of the processor job.
2929
*/
3030
"displayName"?: string;
31-
"processorConfig": model.GeneralProcessorConfig;
31+
"processorConfig": model.InvoiceProcessorConfig | model.GeneralProcessorConfig;
3232
}
3333

3434
export namespace CreateProcessorJobDetails {

lib/aidocument/lib/model/detected-document-type.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ export interface DetectedDocumentType {
2222
* The document type.
2323
*/
2424
"documentType": string;
25+
/**
26+
* The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Key-Value Extraction model that was used to extract the key-value pairs.
27+
*/
28+
"documentId"?: string;
2529
/**
2630
* The confidence score between 0 and 1. Note: Numbers greater than Number.MAX_SAFE_INTEGER will result in rounding issues.
2731
*/

lib/aidocument/lib/model/document-classification-feature.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,13 @@ export interface DocumentClassificationFeature extends model.DocumentFeature {
2323
*/
2424
"maxResults"?: number;
2525
/**
26-
* The custom model ID.
26+
* Unique identifier custom model OCID that should be used for inference.
2727
*/
2828
"modelId"?: string;
29+
/**
30+
* The custom model tenancy ID when modelId represents aliasName.
31+
*/
32+
"tenancyId"?: string;
2933

3034
"featureType": string;
3135
}
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
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, 2025, 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+
14+
import * as model from "../model";
15+
import common = require("oci-common");
16+
17+
/**
18+
* Extract information from bar code
19+
*/
20+
export interface DocumentElementsExtractionFeature extends model.DocumentFeature {
21+
/**
22+
* Unique identifier custom model OCID that should be used for inference.
23+
*/
24+
"modelId"?: string;
25+
26+
"featureType": string;
27+
}
28+
29+
export namespace DocumentElementsExtractionFeature {
30+
export function getJsonObj(
31+
obj: DocumentElementsExtractionFeature,
32+
isParentJsonObj?: boolean
33+
): object {
34+
const jsonObj = {
35+
...(isParentJsonObj
36+
? obj
37+
: (model.DocumentFeature.getJsonObj(obj) as DocumentElementsExtractionFeature)),
38+
...{}
39+
};
40+
41+
return jsonObj;
42+
}
43+
export const featureType = "DOCUMENT_ELEMENTS_EXTRACTION";
44+
export function getDeserializedJsonObj(
45+
obj: DocumentElementsExtractionFeature,
46+
isParentJsonObj?: boolean
47+
): object {
48+
const jsonObj = {
49+
...(isParentJsonObj
50+
? obj
51+
: (model.DocumentFeature.getDeserializedJsonObj(obj) as DocumentElementsExtractionFeature)),
52+
...{}
53+
};
54+
55+
return jsonObj;
56+
}
57+
}

0 commit comments

Comments
 (0)