forked from Yara724/api
urls dynamic integration
This commit is contained in:
@@ -1,5 +1,21 @@
|
||||
export type FanavaranClientKey = "parsian" | "tejaratno" | "moallem";
|
||||
|
||||
const FANAVARAN_API_ROOTS: Record<FanavaranClientKey, string> = {
|
||||
parsian: "https://apimanager.iraneit.com/BimeApiManager/api",
|
||||
tejaratno: "https://apimanager.iraneit.com/BimeApiManager/api",
|
||||
moallem: "https://api.inssw.ir/BimeApiManager/api",
|
||||
};
|
||||
|
||||
export function getFanavaranApiRoot(clientKey: FanavaranClientKey): string {
|
||||
return FANAVARAN_API_ROOTS[clientKey];
|
||||
}
|
||||
|
||||
export function getFanavaranLookupBaseUrl(
|
||||
clientKey: FanavaranClientKey,
|
||||
): string {
|
||||
return `${getFanavaranApiRoot(clientKey)}/BimeApi/v2.0`;
|
||||
}
|
||||
|
||||
export const FANAVARAN_CLIENT_KEYS: readonly FanavaranClientKey[] = [
|
||||
"parsian",
|
||||
"tejaratno",
|
||||
|
||||
Reference in New Issue
Block a user