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 {
@@ -158,8 +157,7 @@ export const OpenFgaApiAxiosParamCreator = function (configuration: Configuratio
158
157
localVarHeaderParameter [ "Content-Type" ] = "application/json" ;
159
158
160
159
setSearchParams ( localVarUrlObj , localVarQueryParameter , options . query ) ;
161
- const headersFromBaseOptions = baseOptions && baseOptions . headers ? baseOptions . headers : { } ;
162
- localVarRequestOptions . headers = { ...localVarHeaderParameter , ...headersFromBaseOptions , ...options . headers } ;
160
+ localVarRequestOptions . headers = { ...localVarHeaderParameter , ...options . headers } ;
163
161
localVarRequestOptions . data = serializeDataIfNeeded ( body , localVarRequestOptions ) ;
164
162
165
163
return {
@@ -192,8 +190,7 @@ export const OpenFgaApiAxiosParamCreator = function (configuration: Configuratio
192
190
193
191
194
192
setSearchParams ( localVarUrlObj , localVarQueryParameter , options . query ) ;
195
- const headersFromBaseOptions = baseOptions && baseOptions . headers ? baseOptions . headers : { } ;
196
- localVarRequestOptions . headers = { ...localVarHeaderParameter , ...headersFromBaseOptions , ...options . headers } ;
193
+ localVarRequestOptions . headers = { ...localVarHeaderParameter , ...options . headers } ;
197
194
198
195
return {
199
196
url : toPathString ( localVarUrlObj ) ,
@@ -230,8 +227,7 @@ export const OpenFgaApiAxiosParamCreator = function (configuration: Configuratio
230
227
localVarHeaderParameter [ "Content-Type" ] = "application/json" ;
231
228
232
229
setSearchParams ( localVarUrlObj , localVarQueryParameter , options . query ) ;
233
- const headersFromBaseOptions = baseOptions && baseOptions . headers ? baseOptions . headers : { } ;
234
- localVarRequestOptions . headers = { ...localVarHeaderParameter , ...headersFromBaseOptions , ...options . headers } ;
230
+ localVarRequestOptions . headers = { ...localVarHeaderParameter , ...options . headers } ;
235
231
localVarRequestOptions . data = serializeDataIfNeeded ( body , localVarRequestOptions ) ;
236
232
237
233
return {
@@ -264,8 +260,7 @@ export const OpenFgaApiAxiosParamCreator = function (configuration: Configuratio
264
260
265
261
266
262
setSearchParams ( localVarUrlObj , localVarQueryParameter , options . query ) ;
267
- const headersFromBaseOptions = baseOptions && baseOptions . headers ? baseOptions . headers : { } ;
268
- localVarRequestOptions . headers = { ...localVarHeaderParameter , ...headersFromBaseOptions , ...options . headers } ;
263
+ localVarRequestOptions . headers = { ...localVarHeaderParameter , ...options . headers } ;
269
264
270
265
return {
271
266
url : toPathString ( localVarUrlObj ) ,
@@ -302,8 +297,7 @@ export const OpenFgaApiAxiosParamCreator = function (configuration: Configuratio
302
297
localVarHeaderParameter [ "Content-Type" ] = "application/json" ;
303
298
304
299
setSearchParams ( localVarUrlObj , localVarQueryParameter , options . query ) ;
305
- const headersFromBaseOptions = baseOptions && baseOptions . headers ? baseOptions . headers : { } ;
306
- localVarRequestOptions . headers = { ...localVarHeaderParameter , ...headersFromBaseOptions , ...options . headers } ;
300
+ localVarRequestOptions . headers = { ...localVarHeaderParameter , ...options . headers } ;
307
301
localVarRequestOptions . data = serializeDataIfNeeded ( body , localVarRequestOptions ) ;
308
302
309
303
return {
@@ -346,8 +340,7 @@ export const OpenFgaApiAxiosParamCreator = function (configuration: Configuratio
346
340
347
341
348
342
setSearchParams ( localVarUrlObj , localVarQueryParameter , options . query ) ;
349
- const headersFromBaseOptions = baseOptions && baseOptions . headers ? baseOptions . headers : { } ;
350
- localVarRequestOptions . headers = { ...localVarHeaderParameter , ...headersFromBaseOptions , ...options . headers } ;
343
+ localVarRequestOptions . headers = { ...localVarHeaderParameter , ...options . headers } ;
351
344
352
345
return {
353
346
url : toPathString ( localVarUrlObj ) ,
@@ -384,8 +377,7 @@ export const OpenFgaApiAxiosParamCreator = function (configuration: Configuratio
384
377
localVarHeaderParameter [ "Content-Type" ] = "application/json" ;
385
378
386
379
setSearchParams ( localVarUrlObj , localVarQueryParameter , options . query ) ;
387
- const headersFromBaseOptions = baseOptions && baseOptions . headers ? baseOptions . headers : { } ;
388
- localVarRequestOptions . headers = { ...localVarHeaderParameter , ...headersFromBaseOptions , ...options . headers } ;
380
+ localVarRequestOptions . headers = { ...localVarHeaderParameter , ...options . headers } ;
389
381
localVarRequestOptions . data = serializeDataIfNeeded ( body , localVarRequestOptions ) ;
390
382
391
383
return {
@@ -421,8 +413,7 @@ export const OpenFgaApiAxiosParamCreator = function (configuration: Configuratio
421
413
422
414
423
415
setSearchParams ( localVarUrlObj , localVarQueryParameter , options . query ) ;
424
- const headersFromBaseOptions = baseOptions && baseOptions . headers ? baseOptions . headers : { } ;
425
- localVarRequestOptions . headers = { ...localVarHeaderParameter , ...headersFromBaseOptions , ...options . headers } ;
416
+ localVarRequestOptions . headers = { ...localVarHeaderParameter , ...options . headers } ;
426
417
427
418
return {
428
419
url : toPathString ( localVarUrlObj ) ,
@@ -457,8 +448,7 @@ export const OpenFgaApiAxiosParamCreator = function (configuration: Configuratio
457
448
458
449
459
450
setSearchParams ( localVarUrlObj , localVarQueryParameter , options . query ) ;
460
- const headersFromBaseOptions = baseOptions && baseOptions . headers ? baseOptions . headers : { } ;
461
- localVarRequestOptions . headers = { ...localVarHeaderParameter , ...headersFromBaseOptions , ...options . headers } ;
451
+ localVarRequestOptions . headers = { ...localVarHeaderParameter , ...options . headers } ;
462
452
463
453
return {
464
454
url : toPathString ( localVarUrlObj ) ,
@@ -500,8 +490,7 @@ export const OpenFgaApiAxiosParamCreator = function (configuration: Configuratio
500
490
501
491
502
492
setSearchParams ( localVarUrlObj , localVarQueryParameter , options . query ) ;
503
- const headersFromBaseOptions = baseOptions && baseOptions . headers ? baseOptions . headers : { } ;
504
- localVarRequestOptions . headers = { ...localVarHeaderParameter , ...headersFromBaseOptions , ...options . headers } ;
493
+ localVarRequestOptions . headers = { ...localVarHeaderParameter , ...options . headers } ;
505
494
506
495
return {
507
496
url : toPathString ( localVarUrlObj ) ,
@@ -548,8 +537,7 @@ export const OpenFgaApiAxiosParamCreator = function (configuration: Configuratio
548
537
549
538
550
539
setSearchParams ( localVarUrlObj , localVarQueryParameter , options . query ) ;
551
- const headersFromBaseOptions = baseOptions && baseOptions . headers ? baseOptions . headers : { } ;
552
- localVarRequestOptions . headers = { ...localVarHeaderParameter , ...headersFromBaseOptions , ...options . headers } ;
540
+ localVarRequestOptions . headers = { ...localVarHeaderParameter , ...options . headers } ;
553
541
554
542
return {
555
543
url : toPathString ( localVarUrlObj ) ,
@@ -586,8 +574,7 @@ export const OpenFgaApiAxiosParamCreator = function (configuration: Configuratio
586
574
localVarHeaderParameter [ "Content-Type" ] = "application/json" ;
587
575
588
576
setSearchParams ( localVarUrlObj , localVarQueryParameter , options . query ) ;
589
- const headersFromBaseOptions = baseOptions && baseOptions . headers ? baseOptions . headers : { } ;
590
- localVarRequestOptions . headers = { ...localVarHeaderParameter , ...headersFromBaseOptions , ...options . headers } ;
577
+ localVarRequestOptions . headers = { ...localVarHeaderParameter , ...options . headers } ;
591
578
localVarRequestOptions . data = serializeDataIfNeeded ( body , localVarRequestOptions ) ;
592
579
593
580
return {
@@ -628,8 +615,7 @@ export const OpenFgaApiAxiosParamCreator = function (configuration: Configuratio
628
615
localVarHeaderParameter [ "Content-Type" ] = "application/json" ;
629
616
630
617
setSearchParams ( localVarUrlObj , localVarQueryParameter , options . query ) ;
631
- const headersFromBaseOptions = baseOptions && baseOptions . headers ? baseOptions . headers : { } ;
632
- localVarRequestOptions . headers = { ...localVarHeaderParameter , ...headersFromBaseOptions , ...options . headers } ;
618
+ localVarRequestOptions . headers = { ...localVarHeaderParameter , ...options . headers } ;
633
619
localVarRequestOptions . data = serializeDataIfNeeded ( body , localVarRequestOptions ) ;
634
620
635
621
return {
@@ -667,8 +653,7 @@ export const OpenFgaApiAxiosParamCreator = function (configuration: Configuratio
667
653
localVarHeaderParameter [ "Content-Type" ] = "application/json" ;
668
654
669
655
setSearchParams ( localVarUrlObj , localVarQueryParameter , options . query ) ;
670
- const headersFromBaseOptions = baseOptions && baseOptions . headers ? baseOptions . headers : { } ;
671
- localVarRequestOptions . headers = { ...localVarHeaderParameter , ...headersFromBaseOptions , ...options . headers } ;
656
+ localVarRequestOptions . headers = { ...localVarHeaderParameter , ...options . headers } ;
672
657
localVarRequestOptions . data = serializeDataIfNeeded ( body , localVarRequestOptions ) ;
673
658
674
659
return {
@@ -693,7 +678,7 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
693
678
* @param {* } [options] Override http request option.
694
679
* @throws { FgaError }
695
680
*/
696
- async check ( body : CheckRequest , options ?: any ) : Promise < ( axios ?: AxiosStatic ) => PromiseResult < CheckResponse > > {
681
+ async check ( body : CheckRequest , options ?: any ) : Promise < ( axios ?: AxiosInstance ) => PromiseResult < CheckResponse > > {
697
682
const localVarAxiosArgs = await localVarAxiosParamCreator . check ( body , options ) ;
698
683
return createRequestFunction ( localVarAxiosArgs , globalAxios , configuration , credentials ) ;
699
684
} ,
@@ -704,7 +689,7 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
704
689
* @param {* } [options] Override http request option.
705
690
* @throws { FgaError }
706
691
*/
707
- async createStore ( body : CreateStoreRequest , options ?: any ) : Promise < ( axios ?: AxiosStatic ) => PromiseResult < CreateStoreResponse > > {
692
+ async createStore ( body : CreateStoreRequest , options ?: any ) : Promise < ( axios ?: AxiosInstance ) => PromiseResult < CreateStoreResponse > > {
708
693
const localVarAxiosArgs = await localVarAxiosParamCreator . createStore ( body , options ) ;
709
694
return createRequestFunction ( localVarAxiosArgs , globalAxios , configuration , credentials ) ;
710
695
} ,
@@ -714,7 +699,7 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
714
699
* @param {* } [options] Override http request option.
715
700
* @throws { FgaError }
716
701
*/
717
- async deleteStore ( options ?: any ) : Promise < ( axios ?: AxiosStatic ) => PromiseResult < void > > {
702
+ async deleteStore ( options ?: any ) : Promise < ( axios ?: AxiosInstance ) => PromiseResult < void > > {
718
703
const localVarAxiosArgs = await localVarAxiosParamCreator . deleteStore ( options ) ;
719
704
return createRequestFunction ( localVarAxiosArgs , globalAxios , configuration , credentials ) ;
720
705
} ,
@@ -725,7 +710,7 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
725
710
* @param {* } [options] Override http request option.
726
711
* @throws { FgaError }
727
712
*/
728
- async expand ( body : ExpandRequest , options ?: any ) : Promise < ( axios ?: AxiosStatic ) => PromiseResult < ExpandResponse > > {
713
+ async expand ( body : ExpandRequest , options ?: any ) : Promise < ( axios ?: AxiosInstance ) => PromiseResult < ExpandResponse > > {
729
714
const localVarAxiosArgs = await localVarAxiosParamCreator . expand ( body , options ) ;
730
715
return createRequestFunction ( localVarAxiosArgs , globalAxios , configuration , credentials ) ;
731
716
} ,
@@ -735,7 +720,7 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
735
720
* @param {* } [options] Override http request option.
736
721
* @throws { FgaError }
737
722
*/
738
- async getStore ( options ?: any ) : Promise < ( axios ?: AxiosStatic ) => PromiseResult < GetStoreResponse > > {
723
+ async getStore ( options ?: any ) : Promise < ( axios ?: AxiosInstance ) => PromiseResult < GetStoreResponse > > {
739
724
const localVarAxiosArgs = await localVarAxiosParamCreator . getStore ( options ) ;
740
725
return createRequestFunction ( localVarAxiosArgs , globalAxios , configuration , credentials ) ;
741
726
} ,
@@ -746,7 +731,7 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
746
731
* @param {* } [options] Override http request option.
747
732
* @throws { FgaError }
748
733
*/
749
- async listObjects ( body : ListObjectsRequest , options ?: any ) : Promise < ( axios ?: AxiosStatic ) => PromiseResult < ListObjectsResponse > > {
734
+ async listObjects ( body : ListObjectsRequest , options ?: any ) : Promise < ( axios ?: AxiosInstance ) => PromiseResult < ListObjectsResponse > > {
750
735
const localVarAxiosArgs = await localVarAxiosParamCreator . listObjects ( body , options ) ;
751
736
return createRequestFunction ( localVarAxiosArgs , globalAxios , configuration , credentials ) ;
752
737
} ,
@@ -758,7 +743,7 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
758
743
* @param {* } [options] Override http request option.
759
744
* @throws { FgaError }
760
745
*/
761
- async listStores ( pageSize ?: number , continuationToken ?: string , options ?: any ) : Promise < ( axios ?: AxiosStatic ) => PromiseResult < ListStoresResponse > > {
746
+ async listStores ( pageSize ?: number , continuationToken ?: string , options ?: any ) : Promise < ( axios ?: AxiosInstance ) => PromiseResult < ListStoresResponse > > {
762
747
const localVarAxiosArgs = await localVarAxiosParamCreator . listStores ( pageSize , continuationToken , options ) ;
763
748
return createRequestFunction ( localVarAxiosArgs , globalAxios , configuration , credentials ) ;
764
749
} ,
@@ -769,7 +754,7 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
769
754
* @param {* } [options] Override http request option.
770
755
* @throws { FgaError }
771
756
*/
772
- async read ( body : ReadRequest , options ?: any ) : Promise < ( axios ?: AxiosStatic ) => PromiseResult < ReadResponse > > {
757
+ async read ( body : ReadRequest , options ?: any ) : Promise < ( axios ?: AxiosInstance ) => PromiseResult < ReadResponse > > {
773
758
const localVarAxiosArgs = await localVarAxiosParamCreator . read ( body , options ) ;
774
759
return createRequestFunction ( localVarAxiosArgs , globalAxios , configuration , credentials ) ;
775
760
} ,
@@ -780,7 +765,7 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
780
765
* @param {* } [options] Override http request option.
781
766
* @throws { FgaError }
782
767
*/
783
- async readAssertions ( authorizationModelId : string , options ?: any ) : Promise < ( axios ?: AxiosStatic ) => PromiseResult < ReadAssertionsResponse > > {
768
+ async readAssertions ( authorizationModelId : string , options ?: any ) : Promise < ( axios ?: AxiosInstance ) => PromiseResult < ReadAssertionsResponse > > {
784
769
const localVarAxiosArgs = await localVarAxiosParamCreator . readAssertions ( authorizationModelId , options ) ;
785
770
return createRequestFunction ( localVarAxiosArgs , globalAxios , configuration , credentials ) ;
786
771
} ,
@@ -791,7 +776,7 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
791
776
* @param {* } [options] Override http request option.
792
777
* @throws { FgaError }
793
778
*/
794
- async readAuthorizationModel ( id : string , options ?: any ) : Promise < ( axios ?: AxiosStatic ) => PromiseResult < ReadAuthorizationModelResponse > > {
779
+ async readAuthorizationModel ( id : string , options ?: any ) : Promise < ( axios ?: AxiosInstance ) => PromiseResult < ReadAuthorizationModelResponse > > {
795
780
const localVarAxiosArgs = await localVarAxiosParamCreator . readAuthorizationModel ( id , options ) ;
796
781
return createRequestFunction ( localVarAxiosArgs , globalAxios , configuration , credentials ) ;
797
782
} ,
@@ -803,7 +788,7 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
803
788
* @param {* } [options] Override http request option.
804
789
* @throws { FgaError }
805
790
*/
806
- async readAuthorizationModels ( pageSize ?: number , continuationToken ?: string , options ?: any ) : Promise < ( axios ?: AxiosStatic ) => PromiseResult < ReadAuthorizationModelsResponse > > {
791
+ async readAuthorizationModels ( pageSize ?: number , continuationToken ?: string , options ?: any ) : Promise < ( axios ?: AxiosInstance ) => PromiseResult < ReadAuthorizationModelsResponse > > {
807
792
const localVarAxiosArgs = await localVarAxiosParamCreator . readAuthorizationModels ( pageSize , continuationToken , options ) ;
808
793
return createRequestFunction ( localVarAxiosArgs , globalAxios , configuration , credentials ) ;
809
794
} ,
@@ -816,7 +801,7 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
816
801
* @param {* } [options] Override http request option.
817
802
* @throws { FgaError }
818
803
*/
819
- async readChanges ( type ?: string , pageSize ?: number , continuationToken ?: string , options ?: any ) : Promise < ( axios ?: AxiosStatic ) => PromiseResult < ReadChangesResponse > > {
804
+ async readChanges ( type ?: string , pageSize ?: number , continuationToken ?: string , options ?: any ) : Promise < ( axios ?: AxiosInstance ) => PromiseResult < ReadChangesResponse > > {
820
805
const localVarAxiosArgs = await localVarAxiosParamCreator . readChanges ( type , pageSize , continuationToken , options ) ;
821
806
return createRequestFunction ( localVarAxiosArgs , globalAxios , configuration , credentials ) ;
822
807
} ,
@@ -827,7 +812,7 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
827
812
* @param {* } [options] Override http request option.
828
813
* @throws { FgaError }
829
814
*/
830
- async write ( body : WriteRequest , options ?: any ) : Promise < ( axios ?: AxiosStatic ) => PromiseResult < object > > {
815
+ async write ( body : WriteRequest , options ?: any ) : Promise < ( axios ?: AxiosInstance ) => PromiseResult < object > > {
831
816
const localVarAxiosArgs = await localVarAxiosParamCreator . write ( body , options ) ;
832
817
return createRequestFunction ( localVarAxiosArgs , globalAxios , configuration , credentials ) ;
833
818
} ,
@@ -839,7 +824,7 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
839
824
* @param {* } [options] Override http request option.
840
825
* @throws { FgaError }
841
826
*/
842
- async writeAssertions ( authorizationModelId : string , body : WriteAssertionsRequest , options ?: any ) : Promise < ( axios ?: AxiosStatic ) => PromiseResult < void > > {
827
+ async writeAssertions ( authorizationModelId : string , body : WriteAssertionsRequest , options ?: any ) : Promise < ( axios ?: AxiosInstance ) => PromiseResult < void > > {
843
828
const localVarAxiosArgs = await localVarAxiosParamCreator . writeAssertions ( authorizationModelId , body , options ) ;
844
829
return createRequestFunction ( localVarAxiosArgs , globalAxios , configuration , credentials ) ;
845
830
} ,
@@ -850,7 +835,7 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
850
835
* @param {* } [options] Override http request option.
851
836
* @throws { FgaError }
852
837
*/
853
- async writeAuthorizationModel ( body : WriteAuthorizationModelRequest , options ?: any ) : Promise < ( axios ?: AxiosStatic ) => PromiseResult < WriteAuthorizationModelResponse > > {
838
+ async writeAuthorizationModel ( body : WriteAuthorizationModelRequest , options ?: any ) : Promise < ( axios ?: AxiosInstance ) => PromiseResult < WriteAuthorizationModelResponse > > {
854
839
const localVarAxiosArgs = await localVarAxiosParamCreator . writeAuthorizationModel ( body , options ) ;
855
840
return createRequestFunction ( localVarAxiosArgs , globalAxios , configuration , credentials ) ;
856
841
} ,
@@ -861,7 +846,7 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
861
846
* OpenFgaApi - factory interface
862
847
* @export
863
848
*/
864
- export const OpenFgaApiFactory = function ( configuration : Configuration , credentials : Credentials , axios ?: AxiosStatic ) {
849
+ export const OpenFgaApiFactory = function ( configuration : Configuration , credentials : Credentials , axios ?: AxiosInstance ) {
865
850
const localVarFp = OpenFgaApiFp ( configuration , credentials ) ;
866
851
return {
867
852
/**
0 commit comments