11import { Configuration } from './Configuration' ;
2- import { Multipart , RequestFile , FormParamsType } from './multipart' ;
2+ import { Multipart , RequestFile , FormParamPairs } from './multipart' ;
33
44export * from './models' ;
55
@@ -36,17 +36,17 @@ import {
3636 ScanMultipartRequestWrapper ,
3737} from './models' ;
3838
39- type StringKeyWithStringValue = Record < string , string > ;
39+ type StringMap = Record < string , string > ;
4040
4141type ApiRequestOptions = {
4242 uri : string ;
4343 body ?: any ;
4444 encoding ?: BufferEncoding | null ;
45- form ?: StringKeyWithStringValue ;
46- headers ?: StringKeyWithStringValue ;
45+ form ?: StringMap ;
46+ headers ?: StringMap ;
4747 json ?: boolean ;
4848 method ?: string ;
49- qs ?: StringKeyWithStringValue ;
49+ qs ?: StringMap ;
5050} ;
5151
5252type ApiResponse = {
@@ -79,13 +79,13 @@ interface FetchResponse {
7979 arrayBuffer ( ) : Promise < ArrayBuffer > ;
8080}
8181
82- interface FetchRequestOptions {
82+ interface FetchOptions {
8383 method ?: string ;
84- headers ?: StringKeyWithStringValue ;
84+ headers ?: StringMap ;
8585 body ?: any ;
8686}
8787
88- type Fetcher = ( input : string | URL , options ?: FetchRequestOptions ) => Promise < FetchResponse > ;
88+ type Fetcher = ( input : string | URL , options ?: FetchOptions ) => Promise < FetchResponse > ;
8989
9090export class ApiClient {
9191 public requestAsync ( options : ApiRequestOptions ) : Promise < ApiResult > {
@@ -97,7 +97,7 @@ export class ApiClient {
9797
9898 const responseEncoding : BufferEncoding | null = options . encoding === null ? null : options . encoding || 'utf-8' ;
9999
100- const requestOptions : FetchRequestOptions = {
100+ const requestOptions : FetchOptions = {
101101 method : options . method || 'GET' ,
102102 headers : options . headers ,
103103 } ;
@@ -136,7 +136,7 @@ export class ApiClient {
136136
137137 private async doFetchRequest (
138138 url : URL ,
139- requestOptions : FetchRequestOptions ,
139+ requestOptions : FetchOptions ,
140140 responseEncoding : BufferEncoding | null
141141 ) : Promise < ApiResult > {
142142 const fetcher = this . getFetch ( ) ;
@@ -581,7 +581,7 @@ export class GenerateApi {
581581 const requestPath = this . _configuration . getApiBaseUrl ( ) + '/barcode/generate-multipart' ;
582582 let queryParameters : any = { } ;
583583 let headerParams : any = ( Object as any ) . assign ( { } , this . defaultHeaders ) ;
584- const formParams : FormParamsType = [ ] ;
584+ const formParams : FormParamPairs = [ ] ;
585585
586586 // verify required parameter 'request.barcodeType' is not null or undefined
587587 if ( request . barcodeType == null ) {
@@ -776,7 +776,7 @@ export class RecognizeApi {
776776 const requestPath = this . _configuration . getApiBaseUrl ( ) + '/barcode/recognize-multipart' ;
777777 let queryParameters : any = { } ;
778778 let headerParams : any = ( Object as any ) . assign ( { } , this . defaultHeaders ) ;
779- const formParams : FormParamsType = [ ] ;
779+ const formParams : FormParamPairs = [ ] ;
780780
781781 // verify required parameter 'request.barcodeType' is not null or undefined
782782 if ( request . barcodeType == null ) {
@@ -929,7 +929,7 @@ export class ScanApi {
929929 const requestPath = this . _configuration . getApiBaseUrl ( ) + '/barcode/scan-multipart' ;
930930 let queryParameters : any = { } ;
931931 let headerParams : any = ( Object as any ) . assign ( { } , this . defaultHeaders ) ;
932- const formParams : FormParamsType = [ ] ;
932+ const formParams : FormParamPairs = [ ] ;
933933
934934 // verify required parameter 'request.fileBytes' is not null or undefined
935935 if ( request . fileBytes == null ) {
0 commit comments