Skip to content
Merged
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
4 changes: 2 additions & 2 deletions generator-templates/licenseInfo.mustache
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
* NOTE: This class is auto generated by OpenAPI Generator.
* Do not edit the class manually.
* NOTE: This file is auto generated by OpenAPI Generator.
* Do not edit the file manually.
*/
14 changes: 9 additions & 5 deletions src/ext/document-reader.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { HealthcheckApi } from '../api/healthcheck-api';
import { ProcessApi } from '../api/process-api';
import { TransactionApi } from '../api/transaction-api';
import { Response } from './process-response';
import { ProcessResult } from './process-result';
import { Configuration, ConfigurationParameters } from '../configuration';
import globalAxios, { AxiosInstance, AxiosResponse } from 'axios';
import { BASE_PATH } from '../base';
Expand Down Expand Up @@ -60,7 +60,7 @@ export class DocumentReaderApi {
request: ProcessRequestExt | ProcessRequestBase,
xRequestID?: string,
options?: any,
): Promise<Response> {
): Promise<ProcessResult> {
let baseRequest;

if (instanceOfProcessRequest(request)) {
Expand All @@ -84,7 +84,7 @@ export class DocumentReaderApi {
}

const axiosResult = await this.processApi.apiProcess(baseRequest, xRequestID, options);
return new Response(axiosResult.data);
return new ProcessResult(axiosResult.data);
}

public setLicense(license: ArrayBuffer | Base64String) {
Expand Down Expand Up @@ -123,13 +123,17 @@ export class DocumentReaderApi {
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getReprocessTransactionResult(transactionId: string, withImages?: boolean, options?: any): Promise<Response> {
async getReprocessTransactionResult(
transactionId: string,
withImages?: boolean,
options?: any,
): Promise<ProcessResult> {
const axiosResult = await this.transactionApi.apiV2TransactionTransactionIdResultsGet(
transactionId,
withImages,
options,
);
return new Response(axiosResult.data);
return new ProcessResult(axiosResult.data);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/ext/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export * from './document-reader';
export * from './process-request-ext';
export * from './process-request-image-wrapper';
export * from './process-response';
export * from './process-result';
export * from './text-ext';
export * from './images-ext';
export * from './text-field-ext';
Expand Down
7 changes: 6 additions & 1 deletion src/ext/process-response.ts → src/ext/process-result.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import * as converter from 'base64-arraybuffer';
import { Authenticity } from './authenticity';
import * as pako from 'pako';

export class Response {
export class ProcessResult {
// other future modules:
// - authenticity
// - document
Expand Down Expand Up @@ -193,3 +193,8 @@ export class LowLvlResponse implements ProcessResponse {
return this.ContainerList.List.filter((container) => container.result_type === type);
}
}

/**
* @deprecated use `ProcessResult` instead.
*/
export { ProcessResult as Response };
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export * from './ext/index';
export * from './ext';
export * from './configuration';
export * from './models';