@@ -24,7 +24,6 @@ import {
24
24
CallResult ,
25
25
PromiseResult
26
26
} from "./common" ;
27
- import { attributeNames } from "./telemetry" ;
28
27
import { Configuration } from "./configuration" ;
29
28
import { Credentials } from "./credentials" ;
30
29
import { assertParamExists } from "./validation" ;
@@ -110,6 +109,7 @@ import {
110
109
WriteRequestDeletes ,
111
110
WriteRequestWrites ,
112
111
} from "./apiModel" ;
112
+ import { TelemetryAttribute , TelemetryAttributes } from "./telemetry/attributes" ;
113
113
114
114
115
115
/**
@@ -759,10 +759,10 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
759
759
async check ( storeId : string , body : CheckRequest , options ?: any ) : Promise < ( axios ?: AxiosInstance ) => PromiseResult < CheckResponse > > {
760
760
const localVarAxiosArgs = localVarAxiosParamCreator . check ( storeId , body , options ) ;
761
761
return createRequestFunction ( localVarAxiosArgs , globalAxios , configuration , credentials , {
762
- [ attributeNames . requestMethod ] : "check " ,
763
- [ attributeNames . requestStoreId ] : storeId ,
764
- [ attributeNames . requestModelId ] : body . authorization_model_id ,
765
- [ attributeNames . user ] : body . tuple_key . user
762
+ [ TelemetryAttribute . FgaClientRequestMethod ] : "Check " ,
763
+ [ TelemetryAttribute . FgaClientRequestStoreId ] : storeId ?? "" ,
764
+ [ TelemetryAttribute . FgaClientRequestModelId ] : body . authorization_model_id ?? "" ,
765
+ [ TelemetryAttribute . FgaClientUser ] : body . tuple_key . user
766
766
} ) ;
767
767
} ,
768
768
/**
@@ -775,7 +775,7 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
775
775
async createStore ( body : CreateStoreRequest , options ?: any ) : Promise < ( axios ?: AxiosInstance ) => PromiseResult < CreateStoreResponse > > {
776
776
const localVarAxiosArgs = localVarAxiosParamCreator . createStore ( body , options ) ;
777
777
return createRequestFunction ( localVarAxiosArgs , globalAxios , configuration , credentials , {
778
- [ attributeNames . requestMethod ] : "createStore " ,
778
+ [ TelemetryAttribute . FgaClientRequestMethod ] : "CreateStore " ,
779
779
} ) ;
780
780
} ,
781
781
/**
@@ -788,8 +788,8 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
788
788
async deleteStore ( storeId : string , options ?: any ) : Promise < ( axios ?: AxiosInstance ) => PromiseResult < void > > {
789
789
const localVarAxiosArgs = localVarAxiosParamCreator . deleteStore ( storeId , options ) ;
790
790
return createRequestFunction ( localVarAxiosArgs , globalAxios , configuration , credentials , {
791
- [ attributeNames . requestMethod ] : "deleteStore " ,
792
- [ attributeNames . requestStoreId ] : storeId ,
791
+ [ TelemetryAttribute . FgaClientRequestMethod ] : "DeleteStore " ,
792
+ [ TelemetryAttribute . FgaClientRequestStoreId ] : storeId ,
793
793
} ) ;
794
794
} ,
795
795
/**
@@ -803,9 +803,9 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
803
803
async expand ( storeId : string , body : ExpandRequest , options ?: any ) : Promise < ( axios ?: AxiosInstance ) => PromiseResult < ExpandResponse > > {
804
804
const localVarAxiosArgs = localVarAxiosParamCreator . expand ( storeId , body , options ) ;
805
805
return createRequestFunction ( localVarAxiosArgs , globalAxios , configuration , credentials , {
806
- [ attributeNames . requestMethod ] : "expand " ,
807
- [ attributeNames . requestModelId ] : body . authorization_model_id ,
808
- [ attributeNames . requestStoreId ] : storeId ,
806
+ [ TelemetryAttribute . FgaClientRequestMethod ] : "Expand " ,
807
+ [ TelemetryAttribute . FgaClientRequestModelId ] : body . authorization_model_id ?? "" ,
808
+ [ TelemetryAttribute . FgaClientRequestStoreId ] : storeId ?? "" ,
809
809
} ) ;
810
810
} ,
811
811
/**
@@ -818,8 +818,8 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
818
818
async getStore ( storeId : string , options ?: any ) : Promise < ( axios ?: AxiosInstance ) => PromiseResult < GetStoreResponse > > {
819
819
const localVarAxiosArgs = localVarAxiosParamCreator . getStore ( storeId , options ) ;
820
820
return createRequestFunction ( localVarAxiosArgs , globalAxios , configuration , credentials , {
821
- [ attributeNames . requestMethod ] : "getStore " ,
822
- [ attributeNames . requestStoreId ] : storeId ,
821
+ [ TelemetryAttribute . FgaClientRequestMethod ] : "GetStore " ,
822
+ [ TelemetryAttribute . FgaClientRequestStoreId ] : storeId ,
823
823
} ) ;
824
824
} ,
825
825
/**
@@ -833,14 +833,14 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
833
833
async listObjects ( storeId : string , body : ListObjectsRequest , options ?: any ) : Promise < ( axios ?: AxiosInstance ) => PromiseResult < ListObjectsResponse > > {
834
834
const localVarAxiosArgs = localVarAxiosParamCreator . listObjects ( storeId , body , options ) ;
835
835
return createRequestFunction ( localVarAxiosArgs , globalAxios , configuration , credentials , {
836
- [ attributeNames . requestMethod ] : "listObjects " ,
837
- [ attributeNames . requestStoreId ] : storeId ,
838
- [ attributeNames . requestModelId ] : body . authorization_model_id ,
839
- [ attributeNames . user ] : body . user
836
+ [ TelemetryAttribute . FgaClientRequestMethod ] : "ListObjects " ,
837
+ [ TelemetryAttribute . FgaClientRequestStoreId ] : storeId ?? "" ,
838
+ [ TelemetryAttribute . FgaClientRequestModelId ] : body . authorization_model_id ?? "" ,
839
+ [ TelemetryAttribute . FgaClientUser ] : body . user
840
840
} ) ;
841
841
} ,
842
842
/**
843
- * Returns a paginated list of OpenFGA stores and a continuation token to get additional stores. The continuation token will be empty if there are no more stores.
843
+ * Returns a paginated list of OpenFGA stores and a continuation token to get additional stores. The continuation token will be empty if there are no more stores.
844
844
* @summary List all stores
845
845
* @param {number } [pageSize]
846
846
* @param {string } [continuationToken]
@@ -850,7 +850,7 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
850
850
async listStores ( pageSize ?: number , continuationToken ?: string , options ?: any ) : Promise < ( axios ?: AxiosInstance ) => PromiseResult < ListStoresResponse > > {
851
851
const localVarAxiosArgs = localVarAxiosParamCreator . listStores ( pageSize , continuationToken , options ) ;
852
852
return createRequestFunction ( localVarAxiosArgs , globalAxios , configuration , credentials , {
853
- [ attributeNames . requestMethod ] : "listStores " ,
853
+ [ TelemetryAttribute . FgaClientRequestMethod ] : "ListStores " ,
854
854
} ) ;
855
855
} ,
856
856
/**
@@ -864,9 +864,9 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
864
864
async listUsers ( storeId : string , body : ListUsersRequest , options ?: any ) : Promise < ( axios ?: AxiosInstance ) => PromiseResult < ListUsersResponse > > {
865
865
const localVarAxiosArgs = localVarAxiosParamCreator . listUsers ( storeId , body , options ) ;
866
866
return createRequestFunction ( localVarAxiosArgs , globalAxios , configuration , credentials , {
867
- [ attributeNames . requestMethod ] : "listUsers " ,
868
- [ attributeNames . requestStoreId ] : storeId ,
869
- [ attributeNames . requestModelId ] : body . authorization_model_id ,
867
+ [ TelemetryAttribute . FgaClientRequestMethod ] : "ListUsers " ,
868
+ [ TelemetryAttribute . FgaClientRequestStoreId ] : storeId ?? "" ,
869
+ [ TelemetryAttribute . FgaClientRequestModelId ] : body . authorization_model_id ?? "" ,
870
870
} ) ;
871
871
} ,
872
872
/**
@@ -880,12 +880,12 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
880
880
async read ( storeId : string , body : ReadRequest , options ?: any ) : Promise < ( axios ?: AxiosInstance ) => PromiseResult < ReadResponse > > {
881
881
const localVarAxiosArgs = localVarAxiosParamCreator . read ( storeId , body , options ) ;
882
882
return createRequestFunction ( localVarAxiosArgs , globalAxios , configuration , credentials , {
883
- [ attributeNames . requestMethod ] : "read " ,
884
- [ attributeNames . requestStoreId ] : storeId ,
883
+ [ TelemetryAttribute . FgaClientRequestMethod ] : "Read " ,
884
+ [ TelemetryAttribute . FgaClientRequestStoreId ] : storeId ,
885
885
} ) ;
886
886
} ,
887
887
/**
888
- * The ReadAssertions API will return, for a given authorization model id, all the assertions stored for it. An assertion is an object that contains a tuple key, and the expectation of whether a call to the Check API of that tuple key will return true or false.
888
+ * The ReadAssertions API will return, for a given authorization model id, all the assertions stored for it. An assertion is an object that contains a tuple key, and the expectation of whether a call to the Check API of that tuple key will return true or false.
889
889
* @summary Read assertions for an authorization model ID
890
890
* @param {string } storeId
891
891
* @param {string } authorizationModelId
@@ -895,9 +895,9 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
895
895
async readAssertions ( storeId : string , authorizationModelId : string , options ?: any ) : Promise < ( axios ?: AxiosInstance ) => PromiseResult < ReadAssertionsResponse > > {
896
896
const localVarAxiosArgs = localVarAxiosParamCreator . readAssertions ( storeId , authorizationModelId , options ) ;
897
897
return createRequestFunction ( localVarAxiosArgs , globalAxios , configuration , credentials , {
898
- [ attributeNames . requestMethod ] : "readAssertions " ,
899
- [ attributeNames . requestStoreId ] : storeId ,
900
- [ attributeNames . requestModelId ] : authorizationModelId ,
898
+ [ TelemetryAttribute . FgaClientRequestMethod ] : "ReadAssertions " ,
899
+ [ TelemetryAttribute . FgaClientRequestStoreId ] : storeId ,
900
+ [ TelemetryAttribute . FgaClientRequestModelId ] : authorizationModelId ,
901
901
} ) ;
902
902
} ,
903
903
/**
@@ -911,8 +911,8 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
911
911
async readAuthorizationModel ( storeId : string , id : string , options ?: any ) : Promise < ( axios ?: AxiosInstance ) => PromiseResult < ReadAuthorizationModelResponse > > {
912
912
const localVarAxiosArgs = localVarAxiosParamCreator . readAuthorizationModel ( storeId , id , options ) ;
913
913
return createRequestFunction ( localVarAxiosArgs , globalAxios , configuration , credentials , {
914
- [ attributeNames . requestMethod ] : "readAuthorizationModel " ,
915
- [ attributeNames . requestStoreId ] : storeId ,
914
+ [ TelemetryAttribute . FgaClientRequestMethod ] : "ReadAuthorizationModel " ,
915
+ [ TelemetryAttribute . FgaClientRequestStoreId ] : storeId ,
916
916
} ) ;
917
917
} ,
918
918
/**
@@ -927,8 +927,8 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
927
927
async readAuthorizationModels ( storeId : string , pageSize ?: number , continuationToken ?: string , options ?: any ) : Promise < ( axios ?: AxiosInstance ) => PromiseResult < ReadAuthorizationModelsResponse > > {
928
928
const localVarAxiosArgs = localVarAxiosParamCreator . readAuthorizationModels ( storeId , pageSize , continuationToken , options ) ;
929
929
return createRequestFunction ( localVarAxiosArgs , globalAxios , configuration , credentials , {
930
- [ attributeNames . requestMethod ] : "readAuthorizationModels " ,
931
- [ attributeNames . requestStoreId ] : storeId ,
930
+ [ TelemetryAttribute . FgaClientRequestMethod ] : "ReadAuthorizationModels " ,
931
+ [ TelemetryAttribute . FgaClientRequestStoreId ] : storeId ,
932
932
} ) ;
933
933
} ,
934
934
/**
@@ -944,8 +944,8 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
944
944
async readChanges ( storeId : string , type ?: string , pageSize ?: number , continuationToken ?: string , options ?: any ) : Promise < ( axios ?: AxiosInstance ) => PromiseResult < ReadChangesResponse > > {
945
945
const localVarAxiosArgs = localVarAxiosParamCreator . readChanges ( storeId , type , pageSize , continuationToken , options ) ;
946
946
return createRequestFunction ( localVarAxiosArgs , globalAxios , configuration , credentials , {
947
- [ attributeNames . requestMethod ] : "readChanges " ,
948
- [ attributeNames . requestStoreId ] : storeId ,
947
+ [ TelemetryAttribute . FgaClientRequestMethod ] : "ReadChanges " ,
948
+ [ TelemetryAttribute . FgaClientRequestStoreId ] : storeId ,
949
949
} ) ;
950
950
} ,
951
951
/**
@@ -959,9 +959,9 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
959
959
async write ( storeId : string , body : WriteRequest , options ?: any ) : Promise < ( axios ?: AxiosInstance ) => PromiseResult < object > > {
960
960
const localVarAxiosArgs = localVarAxiosParamCreator . write ( storeId , body , options ) ;
961
961
return createRequestFunction ( localVarAxiosArgs , globalAxios , configuration , credentials , {
962
- [ attributeNames . requestMethod ] : "write " ,
963
- [ attributeNames . requestStoreId ] : storeId ,
964
- [ attributeNames . requestModelId ] : body . authorization_model_id ,
962
+ [ TelemetryAttribute . FgaClientRequestMethod ] : "Write " ,
963
+ [ TelemetryAttribute . FgaClientRequestStoreId ] : storeId ?? "" ,
964
+ [ TelemetryAttribute . FgaClientRequestModelId ] : body . authorization_model_id ?? "" ,
965
965
} ) ;
966
966
} ,
967
967
/**
@@ -976,9 +976,9 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
976
976
async writeAssertions ( storeId : string , authorizationModelId : string , body : WriteAssertionsRequest , options ?: any ) : Promise < ( axios ?: AxiosInstance ) => PromiseResult < void > > {
977
977
const localVarAxiosArgs = localVarAxiosParamCreator . writeAssertions ( storeId , authorizationModelId , body , options ) ;
978
978
return createRequestFunction ( localVarAxiosArgs , globalAxios , configuration , credentials , {
979
- [ attributeNames . requestMethod ] : "writeAssertions " ,
980
- [ attributeNames . requestStoreId ] : storeId ,
981
- [ attributeNames . requestModelId ] : authorizationModelId ,
979
+ [ TelemetryAttribute . FgaClientRequestMethod ] : "WriteAssertions " ,
980
+ [ TelemetryAttribute . FgaClientRequestStoreId ] : storeId ,
981
+ [ TelemetryAttribute . FgaClientRequestModelId ] : authorizationModelId ,
982
982
} ) ;
983
983
} ,
984
984
/**
@@ -992,8 +992,8 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
992
992
async writeAuthorizationModel ( storeId : string , body : WriteAuthorizationModelRequest , options ?: any ) : Promise < ( axios ?: AxiosInstance ) => PromiseResult < WriteAuthorizationModelResponse > > {
993
993
const localVarAxiosArgs = localVarAxiosParamCreator . writeAuthorizationModel ( storeId , body , options ) ;
994
994
return createRequestFunction ( localVarAxiosArgs , globalAxios , configuration , credentials , {
995
- [ attributeNames . requestMethod ] : "writeAuthorizationModel " ,
996
- [ attributeNames . requestStoreId ] : storeId ,
995
+ [ TelemetryAttribute . FgaClientRequestMethod ] : "WriteAuthorizationModel " ,
996
+ [ TelemetryAttribute . FgaClientRequestStoreId ] : storeId ,
997
997
} ) ;
998
998
} ,
999
999
} ;
0 commit comments