UNPKG

@ordino.ai/cli

Version:
35 lines (30 loc) 998 B
import { Environment } from "./service-factory"; interface ApiEndpoints { authentication: string; projects: string; teams: string; users: string; } const STAGING_ENDPOINTS: ApiEndpoints = { authentication: "https://staging.dev-portal.ordino.ai/api-keys/authentication", projects: "https://staging.dev-portal.ordino.ai/projects", teams: "https://staging.dev-portal.ordino.ai/teams", users: "https://staging.dev-portal.ordino.ai/users", }; const PRODUCTION_ENDPOINTS: ApiEndpoints = { authentication: "https://dev-portal.ordino.ai/api-keys/authentication", projects: "https://dev-portal.ordino.ai/projects", teams: "https://dev-portal.ordino.ai/teams", users: "https://dev-portal.ordino.ai/users", }; export const getApiEndpoints = (environment: Environment): ApiEndpoints => { switch (environment) { case "staging": return STAGING_ENDPOINTS; case "production": return PRODUCTION_ENDPOINTS; default: return PRODUCTION_ENDPOINTS; } };