11
11
*/
12
12
13
13
14
- import globalAxios , { AxiosStatic } from "axios" ;
14
+ import globalAxios , { AxiosInstance } from "axios" ;
15
15
16
16
import { BaseAPI } from "./base" ;
17
17
import {
@@ -121,8 +121,7 @@ export const OpenFgaApiAxiosParamCreator = function (configuration: Configuratio
121
121
localVarHeaderParameter [ "Content-Type" ] = "application/json" ;
122
122
123
123
setSearchParams ( localVarUrlObj , localVarQueryParameter , options . query ) ;
124
- const headersFromBaseOptions = baseOptions && baseOptions . headers ? baseOptions . headers : { } ;
125
- localVarRequestOptions . headers = { ...localVarHeaderParameter , ...headersFromBaseOptions , ...options . headers } ;
124
+ localVarRequestOptions . headers = { ...localVarHeaderParameter , ...options . headers } ;
126
125
localVarRequestOptions . data = serializeDataIfNeeded ( body , localVarRequestOptions ) ;
127
126
128
127
return {
@@ -693,7 +692,7 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
693
692
* @param {* } [options] Override http request option.
694
693
* @throws { FgaError }
695
694
*/
696
- async check ( body : CheckRequest , options ?: any ) : Promise < ( axios ?: AxiosStatic ) => PromiseResult < CheckResponse > > {
695
+ async check ( body : CheckRequest , options ?: any ) : Promise < ( axios ?: AxiosInstance ) => PromiseResult < CheckResponse > > {
697
696
const localVarAxiosArgs = await localVarAxiosParamCreator . check ( body , options ) ;
698
697
return createRequestFunction ( localVarAxiosArgs , globalAxios , configuration , credentials ) ;
699
698
} ,
@@ -704,7 +703,7 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
704
703
* @param {* } [options] Override http request option.
705
704
* @throws { FgaError }
706
705
*/
707
- async createStore ( body : CreateStoreRequest , options ?: any ) : Promise < ( axios ?: AxiosStatic ) => PromiseResult < CreateStoreResponse > > {
706
+ async createStore ( body : CreateStoreRequest , options ?: any ) : Promise < ( axios ?: AxiosInstance ) => PromiseResult < CreateStoreResponse > > {
708
707
const localVarAxiosArgs = await localVarAxiosParamCreator . createStore ( body , options ) ;
709
708
return createRequestFunction ( localVarAxiosArgs , globalAxios , configuration , credentials ) ;
710
709
} ,
@@ -714,7 +713,7 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
714
713
* @param {* } [options] Override http request option.
715
714
* @throws { FgaError }
716
715
*/
717
- async deleteStore ( options ?: any ) : Promise < ( axios ?: AxiosStatic ) => PromiseResult < void > > {
716
+ async deleteStore ( options ?: any ) : Promise < ( axios ?: AxiosInstance ) => PromiseResult < void > > {
718
717
const localVarAxiosArgs = await localVarAxiosParamCreator . deleteStore ( options ) ;
719
718
return createRequestFunction ( localVarAxiosArgs , globalAxios , configuration , credentials ) ;
720
719
} ,
@@ -725,7 +724,7 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
725
724
* @param {* } [options] Override http request option.
726
725
* @throws { FgaError }
727
726
*/
728
- async expand ( body : ExpandRequest , options ?: any ) : Promise < ( axios ?: AxiosStatic ) => PromiseResult < ExpandResponse > > {
727
+ async expand ( body : ExpandRequest , options ?: any ) : Promise < ( axios ?: AxiosInstance ) => PromiseResult < ExpandResponse > > {
729
728
const localVarAxiosArgs = await localVarAxiosParamCreator . expand ( body , options ) ;
730
729
return createRequestFunction ( localVarAxiosArgs , globalAxios , configuration , credentials ) ;
731
730
} ,
@@ -735,7 +734,7 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
735
734
* @param {* } [options] Override http request option.
736
735
* @throws { FgaError }
737
736
*/
738
- async getStore ( options ?: any ) : Promise < ( axios ?: AxiosStatic ) => PromiseResult < GetStoreResponse > > {
737
+ async getStore ( options ?: any ) : Promise < ( axios ?: AxiosInstance ) => PromiseResult < GetStoreResponse > > {
739
738
const localVarAxiosArgs = await localVarAxiosParamCreator . getStore ( options ) ;
740
739
return createRequestFunction ( localVarAxiosArgs , globalAxios , configuration , credentials ) ;
741
740
} ,
@@ -746,7 +745,7 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
746
745
* @param {* } [options] Override http request option.
747
746
* @throws { FgaError }
748
747
*/
749
- async listObjects ( body : ListObjectsRequest , options ?: any ) : Promise < ( axios ?: AxiosStatic ) => PromiseResult < ListObjectsResponse > > {
748
+ async listObjects ( body : ListObjectsRequest , options ?: any ) : Promise < ( axios ?: AxiosInstance ) => PromiseResult < ListObjectsResponse > > {
750
749
const localVarAxiosArgs = await localVarAxiosParamCreator . listObjects ( body , options ) ;
751
750
return createRequestFunction ( localVarAxiosArgs , globalAxios , configuration , credentials ) ;
752
751
} ,
@@ -758,7 +757,7 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
758
757
* @param {* } [options] Override http request option.
759
758
* @throws { FgaError }
760
759
*/
761
- async listStores ( pageSize ?: number , continuationToken ?: string , options ?: any ) : Promise < ( axios ?: AxiosStatic ) => PromiseResult < ListStoresResponse > > {
760
+ async listStores ( pageSize ?: number , continuationToken ?: string , options ?: any ) : Promise < ( axios ?: AxiosInstance ) => PromiseResult < ListStoresResponse > > {
762
761
const localVarAxiosArgs = await localVarAxiosParamCreator . listStores ( pageSize , continuationToken , options ) ;
763
762
return createRequestFunction ( localVarAxiosArgs , globalAxios , configuration , credentials ) ;
764
763
} ,
@@ -769,7 +768,7 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
769
768
* @param {* } [options] Override http request option.
770
769
* @throws { FgaError }
771
770
*/
772
- async read ( body : ReadRequest , options ?: any ) : Promise < ( axios ?: AxiosStatic ) => PromiseResult < ReadResponse > > {
771
+ async read ( body : ReadRequest , options ?: any ) : Promise < ( axios ?: AxiosInstance ) => PromiseResult < ReadResponse > > {
773
772
const localVarAxiosArgs = await localVarAxiosParamCreator . read ( body , options ) ;
774
773
return createRequestFunction ( localVarAxiosArgs , globalAxios , configuration , credentials ) ;
775
774
} ,
@@ -780,7 +779,7 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
780
779
* @param {* } [options] Override http request option.
781
780
* @throws { FgaError }
782
781
*/
783
- async readAssertions ( authorizationModelId : string , options ?: any ) : Promise < ( axios ?: AxiosStatic ) => PromiseResult < ReadAssertionsResponse > > {
782
+ async readAssertions ( authorizationModelId : string , options ?: any ) : Promise < ( axios ?: AxiosInstance ) => PromiseResult < ReadAssertionsResponse > > {
784
783
const localVarAxiosArgs = await localVarAxiosParamCreator . readAssertions ( authorizationModelId , options ) ;
785
784
return createRequestFunction ( localVarAxiosArgs , globalAxios , configuration , credentials ) ;
786
785
} ,
@@ -791,7 +790,7 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
791
790
* @param {* } [options] Override http request option.
792
791
* @throws { FgaError }
793
792
*/
794
- async readAuthorizationModel ( id : string , options ?: any ) : Promise < ( axios ?: AxiosStatic ) => PromiseResult < ReadAuthorizationModelResponse > > {
793
+ async readAuthorizationModel ( id : string , options ?: any ) : Promise < ( axios ?: AxiosInstance ) => PromiseResult < ReadAuthorizationModelResponse > > {
795
794
const localVarAxiosArgs = await localVarAxiosParamCreator . readAuthorizationModel ( id , options ) ;
796
795
return createRequestFunction ( localVarAxiosArgs , globalAxios , configuration , credentials ) ;
797
796
} ,
@@ -803,7 +802,7 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
803
802
* @param {* } [options] Override http request option.
804
803
* @throws { FgaError }
805
804
*/
806
- async readAuthorizationModels ( pageSize ?: number , continuationToken ?: string , options ?: any ) : Promise < ( axios ?: AxiosStatic ) => PromiseResult < ReadAuthorizationModelsResponse > > {
805
+ async readAuthorizationModels ( pageSize ?: number , continuationToken ?: string , options ?: any ) : Promise < ( axios ?: AxiosInstance ) => PromiseResult < ReadAuthorizationModelsResponse > > {
807
806
const localVarAxiosArgs = await localVarAxiosParamCreator . readAuthorizationModels ( pageSize , continuationToken , options ) ;
808
807
return createRequestFunction ( localVarAxiosArgs , globalAxios , configuration , credentials ) ;
809
808
} ,
@@ -816,7 +815,7 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
816
815
* @param {* } [options] Override http request option.
817
816
* @throws { FgaError }
818
817
*/
819
- async readChanges ( type ?: string , pageSize ?: number , continuationToken ?: string , options ?: any ) : Promise < ( axios ?: AxiosStatic ) => PromiseResult < ReadChangesResponse > > {
818
+ async readChanges ( type ?: string , pageSize ?: number , continuationToken ?: string , options ?: any ) : Promise < ( axios ?: AxiosInstance ) => PromiseResult < ReadChangesResponse > > {
820
819
const localVarAxiosArgs = await localVarAxiosParamCreator . readChanges ( type , pageSize , continuationToken , options ) ;
821
820
return createRequestFunction ( localVarAxiosArgs , globalAxios , configuration , credentials ) ;
822
821
} ,
@@ -827,7 +826,7 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
827
826
* @param {* } [options] Override http request option.
828
827
* @throws { FgaError }
829
828
*/
830
- async write ( body : WriteRequest , options ?: any ) : Promise < ( axios ?: AxiosStatic ) => PromiseResult < object > > {
829
+ async write ( body : WriteRequest , options ?: any ) : Promise < ( axios ?: AxiosInstance ) => PromiseResult < object > > {
831
830
const localVarAxiosArgs = await localVarAxiosParamCreator . write ( body , options ) ;
832
831
return createRequestFunction ( localVarAxiosArgs , globalAxios , configuration , credentials ) ;
833
832
} ,
@@ -839,7 +838,7 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
839
838
* @param {* } [options] Override http request option.
840
839
* @throws { FgaError }
841
840
*/
842
- async writeAssertions ( authorizationModelId : string , body : WriteAssertionsRequest , options ?: any ) : Promise < ( axios ?: AxiosStatic ) => PromiseResult < void > > {
841
+ async writeAssertions ( authorizationModelId : string , body : WriteAssertionsRequest , options ?: any ) : Promise < ( axios ?: AxiosInstance ) => PromiseResult < void > > {
843
842
const localVarAxiosArgs = await localVarAxiosParamCreator . writeAssertions ( authorizationModelId , body , options ) ;
844
843
return createRequestFunction ( localVarAxiosArgs , globalAxios , configuration , credentials ) ;
845
844
} ,
@@ -850,7 +849,7 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
850
849
* @param {* } [options] Override http request option.
851
850
* @throws { FgaError }
852
851
*/
853
- async writeAuthorizationModel ( body : WriteAuthorizationModelRequest , options ?: any ) : Promise < ( axios ?: AxiosStatic ) => PromiseResult < WriteAuthorizationModelResponse > > {
852
+ async writeAuthorizationModel ( body : WriteAuthorizationModelRequest , options ?: any ) : Promise < ( axios ?: AxiosInstance ) => PromiseResult < WriteAuthorizationModelResponse > > {
854
853
const localVarAxiosArgs = await localVarAxiosParamCreator . writeAuthorizationModel ( body , options ) ;
855
854
return createRequestFunction ( localVarAxiosArgs , globalAxios , configuration , credentials ) ;
856
855
} ,
@@ -861,7 +860,7 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
861
860
* OpenFgaApi - factory interface
862
861
* @export
863
862
*/
864
- export const OpenFgaApiFactory = function ( configuration : Configuration , credentials : Credentials , axios ?: AxiosStatic ) {
863
+ export const OpenFgaApiFactory = function ( configuration : Configuration , credentials : Credentials , axios ?: AxiosInstance ) {
865
864
const localVarFp = OpenFgaApiFp ( configuration , credentials ) ;
866
865
return {
867
866
/**
0 commit comments