11import  {  HealthcheckApi  }  from  '../api/healthcheck-api' ; 
22import  {  ProcessApi  }  from  '../api/process-api' ; 
33import  {  TransactionApi  }  from  '../api/transaction-api' ; 
4+ import  {  ResourcesApi  }  from  '../api/resources-api' ; 
45import  {  ProcessResult  }  from  './process-result' ; 
56import  {  Configuration ,  ConfigurationParameters  }  from  '../configuration' ; 
6- import  globalAxios ,  {  AxiosInstance ,  AxiosResponse  }  from  'axios' ; 
7+ import  globalAxios ,  {  AxiosInstance ,  AxiosResponse , RawAxiosRequestConfig  }  from  'axios' ; 
78import  {  BASE_PATH  }  from  '../base' ; 
89import  { 
910 ProcessRequestImage , 
@@ -17,6 +18,7 @@ import {
1718 ListTransactionsByTagResponse , 
1819 TransactionProcessGetResponse , 
1920 Healthcheck , 
21+  DatabaseDocumentList , 
2022}  from  '../models' ; 
2123import  {  Base64String ,  instanceOfProcessRequest ,  ProcessRequestExt  }  from  './process-request-ext' ; 
2224import  {  ProcessRequestImageWrapper  }  from  './process-request-image-wrapper' ; 
@@ -26,6 +28,7 @@ export class DocumentReaderApi {
2628 private  readonly  healthcheckApi : HealthcheckApi ; 
2729 private  readonly  processApi : ProcessApi ; 
2830 private  readonly  transactionApi : TransactionApi ; 
31+  private  readonly  resourcesApi : ResourcesApi ; 
2932
3033 private  license : string  |  undefined ; 
3134
@@ -37,29 +40,36 @@ export class DocumentReaderApi {
3740 this . healthcheckApi  =  new  HealthcheckApi ( new  Configuration ( configuration ) ,  basePath ,  axios ) ; 
3841 this . processApi  =  new  ProcessApi ( new  Configuration ( configuration ) ,  basePath ,  axios ) ; 
3942 this . transactionApi  =  new  TransactionApi ( new  Configuration ( configuration ) ,  basePath ,  axios ) ; 
43+  this . resourcesApi  =  new  ResourcesApi ( new  Configuration ( configuration ) ,  basePath ,  axios ) ; 
4044 } 
4145
42-  async  ping ( xRequestID ?: string ) : Promise < DeviceInfo >  { 
43-  const  axiosResult  =  await  this . healthcheckApi . ping ( xRequestID ) ; 
46+  async  doclist ( options ?: RawAxiosRequestConfig ) : Promise < DatabaseDocumentList >  { 
47+  const  axiosResult  =  await  this . resourcesApi . doclist ( options ) ; 
4448 return  axiosResult . data ; 
4549 } 
4650
47-  async  health ( xRequestID ?: string ) : Promise < Healthcheck >  { 
48-  const  axiosResult  =  await  this . healthcheckApi . healthz ( xRequestID ) ; 
51+  async  ping ( xRequestID ?: string ,  options ?: RawAxiosRequestConfig ) : Promise < DeviceInfo >  { 
52+  const  axiosResult  =  await  this . healthcheckApi . ping ( xRequestID ,  options ) ; 
53+  return  axiosResult . data ; 
54+  } 
55+ 56+  async  health ( xRequestID ?: string ,  options ?: RawAxiosRequestConfig ) : Promise < Healthcheck >  { 
57+  const  axiosResult  =  await  this . healthcheckApi . healthz ( xRequestID ,  options ) ; 
4958 return  axiosResult . data ; 
5059 } 
5160
5261 /** 
5362 * 
5463 * @summary  Process list of documents images and return extracted data 
5564 * @param  {ProcessRequestExt } [request] Request options such as image, results types and etc. 
65+  * @param  {string } xRequestID It allows the client and server to correlate each HTTP request. 
5666 * @param  {* } [options] Override http request option. 
5767 * @throws  {RequiredError } If some request params are missed 
5868 * */ 
5969 async  process ( 
6070 request : ProcessRequestExt  |  ProcessRequestBase , 
6171 xRequestID ?: string , 
62-  options ?: any , 
72+  options ?: RawAxiosRequestConfig , 
6373 ) : Promise < ProcessResult >  { 
6474 let  baseRequest ; 
6575
@@ -100,17 +110,20 @@ export class DocumentReaderApi {
100110 * @summary  Reprocess 
101111 * @param  {string } transactionId Transaction id 
102112 * @param  {TransactionProcessRequest } transactionProcessRequest 
113+  * @param  {boolean } useCache Get processed values from storage in case transaction has already processed. 
103114 * @param  {* } [options] Override http request option. 
104115 * @throws  {RequiredError } 
105116 */ 
106117 public  reprocessTransaction ( 
107118 transactionId : string , 
108119 transactionProcessRequest : TransactionProcessRequest , 
109-  options ?: any , 
120+  useCache ?: boolean , 
121+  options ?: RawAxiosRequestConfig , 
110122 ) : Promise < AxiosResponse < TransactionProcessResult ,  any > >  { 
111123 return  this . transactionApi . apiV2TransactionTransactionIdProcessPost ( 
112124 transactionId , 
113125 transactionProcessRequest , 
126+  useCache , 
114127 options , 
115128 ) ; 
116129 } 
@@ -126,7 +139,7 @@ export class DocumentReaderApi {
126139 async  getReprocessTransactionResult ( 
127140 transactionId : string , 
128141 withImages ?: boolean , 
129-  options ?: any , 
142+  options ?: RawAxiosRequestConfig , 
130143 ) : Promise < ProcessResult >  { 
131144 const  axiosResult  =  await  this . transactionApi . apiV2TransactionTransactionIdResultsGet ( 
132145 transactionId , 
@@ -143,7 +156,10 @@ export class DocumentReaderApi {
143156 * @param  {* } [options] Override http request option. 
144157 * @throws  {RequiredError } 
145158 */ 
146-  async  getTransactionsByTag ( tagId : string ,  options ?: any ) : Promise < AxiosResponse < ListTransactionsByTagResponse > >  { 
159+  async  getTransactionsByTag ( 
160+  tagId : string , 
161+  options ?: RawAxiosRequestConfig , 
162+  ) : Promise < AxiosResponse < ListTransactionsByTagResponse > >  { 
147163 return  this . transactionApi . apiV2TagTagIdTransactionsGet ( tagId ,  options ) ; 
148164 } 
149165
@@ -154,7 +170,10 @@ export class DocumentReaderApi {
154170 * @param  {* } [options] Override http request option. 
155171 * @throws  {RequiredError } 
156172 */ 
157-  async  deleteReprocessTransactionsByTag ( tagId : string ,  options ?: any ) : Promise < AxiosResponse < object ,  any > >  { 
173+  async  deleteReprocessTransactionsByTag ( 
174+  tagId : string , 
175+  options ?: RawAxiosRequestConfig , 
176+  ) : Promise < AxiosResponse < object ,  any > >  { 
158177 return  this . transactionApi . apiV2TagTagIdDelete ( tagId ,  options ) ; 
159178 } 
160179
@@ -169,7 +188,7 @@ export class DocumentReaderApi {
169188 async  getReprocessTransactionFile ( 
170189 transactionId : string , 
171190 name : string , 
172-  options ?: any , 
191+  options ?: RawAxiosRequestConfig , 
173192 ) : Promise < AxiosResponse < any ,  any > >  { 
174193 return  this . transactionApi . apiV2TransactionTransactionIdFileGet ( transactionId ,  name ,  options ) ; 
175194 } 
@@ -183,7 +202,7 @@ export class DocumentReaderApi {
183202 */ 
184203 async  getReprocessTransactionData ( 
185204 transactionId : string , 
186-  options ?: any , 
205+  options ?: RawAxiosRequestConfig , 
187206 ) : Promise < AxiosResponse < TransactionProcessGetResponse ,  any > >  { 
188207 return  this . transactionApi . apiV2TransactionTransactionIdGet ( transactionId ,  options ) ; 
189208 } 
0 commit comments