Skip to content

Commit d05efb9

Browse files
committed
Commit: ffa149d3
1 parent 6830986 commit d05efb9

File tree

7 files changed

+281
-7
lines changed

7 files changed

+281
-7
lines changed

src/.openapi-generator/FILES

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
api/healthcheck-api.ts
22
api/process-api.ts
3+
api/resources-api.ts
34
api/transaction-api.ts
45
base.ts
56
common.ts
@@ -34,6 +35,8 @@ models/container-list.ts
3435
models/critical.ts
3536
models/cross-source-value-comparison.ts
3637
models/data-module.ts
38+
models/database-document-list.ts
39+
models/database-document.ts
3740
models/details-optical.ts
3841
models/details-rfid.ts
3942
models/device-info-documents-database.ts

src/api/resources-api.ts

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
/* tslint:disable */
2+
/* eslint-disable */
3+
/**
4+
* NOTE: This file is auto generated by OpenAPI Generator.
5+
* Do not edit the file manually.
6+
*/
7+
8+
9+
import type { Configuration } from '../configuration';
10+
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
11+
import globalAxios from 'axios';
12+
// Some imports not used depending on template conditions
13+
// @ts-ignore
14+
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
15+
// @ts-ignore
16+
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
17+
// @ts-ignore
18+
import type { DatabaseDocumentList } from '../models';
19+
/**
20+
* ResourcesApi - axios parameter creator
21+
* @export
22+
*/
23+
export const ResourcesApiAxiosParamCreator = function (configuration?: Configuration) {
24+
return {
25+
/**
26+
*
27+
* @summary Returns the list of documents stored in the database that the Web Service API is running with.
28+
* @param {*} [options] Override http request option.
29+
* @throws {RequiredError}
30+
*/
31+
doclist: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
32+
const localVarPath = `/api/doclist`;
33+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
34+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
35+
let baseOptions;
36+
if (configuration) {
37+
baseOptions = configuration.baseOptions;
38+
}
39+
40+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
41+
const localVarHeaderParameter = {} as any;
42+
const localVarQueryParameter = {} as any;
43+
44+
45+
46+
setSearchParams(localVarUrlObj, localVarQueryParameter);
47+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
48+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
49+
50+
return {
51+
url: toPathString(localVarUrlObj),
52+
options: localVarRequestOptions,
53+
};
54+
},
55+
}
56+
};
57+
58+
/**
59+
* ResourcesApi - functional programming interface
60+
* @export
61+
*/
62+
export const ResourcesApiFp = function(configuration?: Configuration) {
63+
const localVarAxiosParamCreator = ResourcesApiAxiosParamCreator(configuration)
64+
return {
65+
/**
66+
*
67+
* @summary Returns the list of documents stored in the database that the Web Service API is running with.
68+
* @param {*} [options] Override http request option.
69+
* @throws {RequiredError}
70+
*/
71+
async doclist(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DatabaseDocumentList>> {
72+
const localVarAxiosArgs = await localVarAxiosParamCreator.doclist(options);
73+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
74+
const localVarOperationServerBasePath = operationServerMap['ResourcesApi.doclist']?.[localVarOperationServerIndex]?.url;
75+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
76+
},
77+
}
78+
};
79+
80+
/**
81+
* ResourcesApi - factory interface
82+
* @export
83+
*/
84+
export const ResourcesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
85+
const localVarFp = ResourcesApiFp(configuration)
86+
return {
87+
/**
88+
*
89+
* @summary Returns the list of documents stored in the database that the Web Service API is running with.
90+
* @param {*} [options] Override http request option.
91+
* @throws {RequiredError}
92+
*/
93+
doclist(options?: RawAxiosRequestConfig): AxiosPromise<DatabaseDocumentList> {
94+
return localVarFp.doclist(options).then((request) => request(axios, basePath));
95+
},
96+
};
97+
};
98+
99+
/**
100+
* ResourcesApi - object-oriented interface
101+
* @export
102+
* @class ResourcesApi
103+
* @extends {BaseAPI}
104+
*/
105+
export class ResourcesApi extends BaseAPI {
106+
/**
107+
*
108+
* @summary Returns the list of documents stored in the database that the Web Service API is running with.
109+
* @param {*} [options] Override http request option.
110+
* @throws {RequiredError}
111+
* @memberof ResourcesApi
112+
*/
113+
public doclist(options?: RawAxiosRequestConfig) {
114+
return ResourcesApiFp(this.configuration).doclist(options).then((request) => request(this.axios, this.basePath));
115+
}
116+
}
117+

src/api/transaction-api.ts

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,11 @@ export const TransactionApiAxiosParamCreator = function (configuration?: Configu
178178
* @summary Reprocess
179179
* @param {string} transactionId Transaction id
180180
* @param {TransactionProcessRequest} transactionProcessRequest
181+
* @param {boolean} [useCache] Get processed values from storage in case transaction has already processed.
181182
* @param {*} [options] Override http request option.
182183
* @throws {RequiredError}
183184
*/
184-
apiV2TransactionTransactionIdProcessPost: async (transactionId: string, transactionProcessRequest: TransactionProcessRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
185+
apiV2TransactionTransactionIdProcessPost: async (transactionId: string, transactionProcessRequest: TransactionProcessRequest, useCache?: boolean, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
185186
// verify required parameter 'transactionId' is not null or undefined
186187
assertParamExists('apiV2TransactionTransactionIdProcessPost', 'transactionId', transactionId)
187188
// verify required parameter 'transactionProcessRequest' is not null or undefined
@@ -199,6 +200,10 @@ export const TransactionApiAxiosParamCreator = function (configuration?: Configu
199200
const localVarHeaderParameter = {} as any;
200201
const localVarQueryParameter = {} as any;
201202

203+
if (useCache !== undefined) {
204+
localVarQueryParameter['useCache'] = useCache;
205+
}
206+
202207

203208

204209
localVarHeaderParameter['Content-Type'] = 'application/json';
@@ -320,11 +325,12 @@ export const TransactionApiFp = function(configuration?: Configuration) {
320325
* @summary Reprocess
321326
* @param {string} transactionId Transaction id
322327
* @param {TransactionProcessRequest} transactionProcessRequest
328+
* @param {boolean} [useCache] Get processed values from storage in case transaction has already processed.
323329
* @param {*} [options] Override http request option.
324330
* @throws {RequiredError}
325331
*/
326-
async apiV2TransactionTransactionIdProcessPost(transactionId: string, transactionProcessRequest: TransactionProcessRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TransactionProcessResult>> {
327-
const localVarAxiosArgs = await localVarAxiosParamCreator.apiV2TransactionTransactionIdProcessPost(transactionId, transactionProcessRequest, options);
332+
async apiV2TransactionTransactionIdProcessPost(transactionId: string, transactionProcessRequest: TransactionProcessRequest, useCache?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TransactionProcessResult>> {
333+
const localVarAxiosArgs = await localVarAxiosParamCreator.apiV2TransactionTransactionIdProcessPost(transactionId, transactionProcessRequest, useCache, options);
328334
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
329335
const localVarOperationServerBasePath = operationServerMap['TransactionApi.apiV2TransactionTransactionIdProcessPost']?.[localVarOperationServerIndex]?.url;
330336
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
@@ -399,11 +405,12 @@ export const TransactionApiFactory = function (configuration?: Configuration, ba
399405
* @summary Reprocess
400406
* @param {string} transactionId Transaction id
401407
* @param {TransactionProcessRequest} transactionProcessRequest
408+
* @param {boolean} [useCache] Get processed values from storage in case transaction has already processed.
402409
* @param {*} [options] Override http request option.
403410
* @throws {RequiredError}
404411
*/
405-
apiV2TransactionTransactionIdProcessPost(transactionId: string, transactionProcessRequest: TransactionProcessRequest, options?: RawAxiosRequestConfig): AxiosPromise<TransactionProcessResult> {
406-
return localVarFp.apiV2TransactionTransactionIdProcessPost(transactionId, transactionProcessRequest, options).then((request) => request(axios, basePath));
412+
apiV2TransactionTransactionIdProcessPost(transactionId: string, transactionProcessRequest: TransactionProcessRequest, useCache?: boolean, options?: RawAxiosRequestConfig): AxiosPromise<TransactionProcessResult> {
413+
return localVarFp.apiV2TransactionTransactionIdProcessPost(transactionId, transactionProcessRequest, useCache, options).then((request) => request(axios, basePath));
407414
},
408415
/**
409416
*
@@ -480,12 +487,13 @@ export class TransactionApi extends BaseAPI {
480487
* @summary Reprocess
481488
* @param {string} transactionId Transaction id
482489
* @param {TransactionProcessRequest} transactionProcessRequest
490+
* @param {boolean} [useCache] Get processed values from storage in case transaction has already processed.
483491
* @param {*} [options] Override http request option.
484492
* @throws {RequiredError}
485493
* @memberof TransactionApi
486494
*/
487-
public apiV2TransactionTransactionIdProcessPost(transactionId: string, transactionProcessRequest: TransactionProcessRequest, options?: RawAxiosRequestConfig) {
488-
return TransactionApiFp(this.configuration).apiV2TransactionTransactionIdProcessPost(transactionId, transactionProcessRequest, options).then((request) => request(this.axios, this.basePath));
495+
public apiV2TransactionTransactionIdProcessPost(transactionId: string, transactionProcessRequest: TransactionProcessRequest, useCache?: boolean, options?: RawAxiosRequestConfig) {
496+
return TransactionApiFp(this.configuration).apiV2TransactionTransactionIdProcessPost(transactionId, transactionProcessRequest, useCache, options).then((request) => request(this.axios, this.basePath));
489497
}
490498

491499
/**
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/* tslint:disable */
2+
/* eslint-disable */
3+
/**
4+
* NOTE: This file is auto generated by OpenAPI Generator.
5+
* Do not edit the file manually.
6+
*/
7+
8+
9+
// May contain unused imports in some cases
10+
// @ts-ignore
11+
import type { DatabaseDocument } from './database-document';
12+
13+
/**
14+
*
15+
* @export
16+
* @interface DatabaseDocumentList
17+
*/
18+
export interface DatabaseDocumentList {
19+
/**
20+
* The list of documents stored in the database.
21+
* @type {Array<DatabaseDocument>}
22+
* @memberof DatabaseDocumentList
23+
*/
24+
'items': Array<DatabaseDocument>;
25+
}
26+

src/models/database-document.ts

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
/* tslint:disable */
2+
/* eslint-disable */
3+
/**
4+
* NOTE: This file is auto generated by OpenAPI Generator.
5+
* Do not edit the file manually.
6+
*/
7+
8+
9+
// May contain unused imports in some cases
10+
// @ts-ignore
11+
import type { DocumentType } from './document-type';
12+
13+
/**
14+
*
15+
* @export
16+
* @interface DatabaseDocument
17+
*/
18+
export interface DatabaseDocument {
19+
/**
20+
* Whether the document has a barcode.
21+
* @type {boolean}
22+
* @memberof DatabaseDocument
23+
*/
24+
'barcode_fields': boolean;
25+
/**
26+
* Country name.
27+
* @type {string}
28+
* @memberof DatabaseDocument
29+
*/
30+
'country': string;
31+
/**
32+
* Date when the document description was created in the database.
33+
* @type {string}
34+
* @memberof DatabaseDocument
35+
*/
36+
'createad': string;
37+
/**
38+
*
39+
* @type {DocumentType}
40+
* @memberof DatabaseDocument
41+
*/
42+
'doc_type': DocumentType;
43+
/**
44+
* Document name.
45+
* @type {string}
46+
* @memberof DatabaseDocument
47+
*/
48+
'document': string;
49+
/**
50+
* The presence of graphic fields in the document.
51+
* @type {boolean}
52+
* @memberof DatabaseDocument
53+
*/
54+
'graphic_fields': boolean;
55+
/**
56+
* Document code.
57+
* @type {number}
58+
* @memberof DatabaseDocument
59+
*/
60+
'id': number;
61+
/**
62+
* The document has an MRZ.
63+
* @type {boolean}
64+
* @memberof DatabaseDocument
65+
*/
66+
'mrz': boolean;
67+
/**
68+
* Country region.
69+
* @type {string}
70+
* @memberof DatabaseDocument
71+
*/
72+
'region'?: string;
73+
/**
74+
* The document has an RFID chip.
75+
* @type {boolean}
76+
* @memberof DatabaseDocument
77+
*/
78+
'rfid_chip': boolean;
79+
/**
80+
* The presence of text fields in the document.
81+
* @type {boolean}
82+
* @memberof DatabaseDocument
83+
*/
84+
'text_fields': boolean;
85+
/**
86+
* Date when the document description was updated in the database.
87+
* @type {string}
88+
* @memberof DatabaseDocument
89+
*/
90+
'updated': string;
91+
/**
92+
* The year when the document was issued.
93+
* @type {string}
94+
* @memberof DatabaseDocument
95+
*/
96+
'year'?: string;
97+
/**
98+
* Guardian country.
99+
* @type {string}
100+
* @memberof DatabaseDocument
101+
*/
102+
'sovereignty'?: string;
103+
/**
104+
* Whether the document is no longer in circulation.
105+
* @type {boolean}
106+
* @memberof DatabaseDocument
107+
*/
108+
'deprecated'?: boolean;
109+
}
110+
111+
112+

src/models/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ export * from './container-list-list-inner';
2828
export * from './critical';
2929
export * from './cross-source-value-comparison';
3030
export * from './data-module';
31+
export * from './database-document';
32+
export * from './database-document-list';
3133
export * from './details-optical';
3234
export * from './details-rfid';
3335
export * from './device-info';

src/models/process-params.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,12 @@ export interface ProcessParams {
457457
* @memberof ProcessParams
458458
*/
459459
'strictSecurityChecks'?: boolean;
460+
/**
461+
* Allows transliteration to be turned on or off; by default, it is enabled.
462+
* @type {boolean}
463+
* @memberof ProcessParams
464+
*/
465+
'returnTransliteratedFields'?: boolean;
460466
}
461467

462468

0 commit comments

Comments
 (0)