diff --git a/coral/src/services/api.ts b/coral/src/services/api.ts index 605c45c675..aab60bb203 100644 --- a/coral/src/services/api.ts +++ b/coral/src/services/api.ts @@ -188,11 +188,10 @@ const API_PATHS = { getAclRequests: "/getAclRequests", getAclRequestsForApprover: "/getAclRequestsForApprover", getAclCommand: "/getAclCommands", - getTopicRequest: "/getTopicRequest", } satisfies { [key in keyof Omit< ApiOperations, - "getSchemaOfTopicFromSource" | "getSwitchTeams" + "getSchemaOfTopicFromSource" | "getSwitchTeams" | "getTopicRequest" >]: keyof ApiPaths; }; @@ -203,6 +202,7 @@ type GetSchemaOfTopicFromSource = (params: { schemaVersion: string; }) => keyof ApiPaths; type GetSwitchTeams = (params: { userId: string }) => keyof ApiPaths; +type GetTopicRequest = (params: { topicReqId: string }) => keyof ApiPaths; const DYNAMIC_API_PATHS = { getSchemaOfTopicFromSource: ({ @@ -213,12 +213,14 @@ const DYNAMIC_API_PATHS = { }: Parameters[0]) => `/schemas/source/${source}/kafkaEnv/${kafkaEnvId}/topic/${topicName}/schemaVersion/${schemaVersion}` as keyof ApiPaths, getSwitchTeams: ({ userId }: Parameters[0]) => - `/user/${userId}/switchTeamsList` as keyof ApiPaths, + `/user/${userId}/switchTeamsList` as keyof ApiPaths, + getTopicRequest: ({ topicReqId }: Parameters[0]) => + `/topic/request/${topicReqId}` as keyof ApiPaths, } satisfies { [key in keyof Pick< ApiOperations, - "getSchemaOfTopicFromSource" | "getSwitchTeams" - >]: GetSchemaOfTopicFromSource | GetSwitchTeams; + "getSchemaOfTopicFromSource" | "getSwitchTeams" | "getTopicRequest" + >]: GetSchemaOfTopicFromSource | GetSwitchTeams | GetTopicRequest; }; type Params = URLSearchParams;