UNPKG

@hhgtech/hhg-components

Version:
77 lines (76 loc) 3.16 kB
import { LocaleType } from "../../interfaces/types"; export declare const domainLocales: { 'vi-VN': string; 'id-ID': string; 'ms-MY': string; 'km-KH': string; 'en-PH': string; 'th-TH': string; 'my-MM': string; 'zh-TW': string; 'hi-IN': string; }; export declare const domainLocalesMarryBaby: { 'vi-VN': string; }; export declare const locale: LocaleType; export declare const getWebsiteUrlApi: (locale: string) => string; export declare const getCurrentBaseUrl: (locale: string) => string; export declare const getCurrentHref: (locale: string, basePath: string, asPath: string) => string; export declare const getApiPath: (path: string, params?: { [key: string]: string | number; }, query?: { [key: string]: string | number; }, baseUrl?: string) => string; export declare const getDiscoverApiPath: (path: string, params?: { [key: string]: string | number; }, useProOnDev?: boolean) => string; export declare const getMarryBabyApiPath: (path: string, params?: { [key: string]: string | number; }, useProOnDev?: boolean) => string; export declare const getCarePath: (path: string, params?: { [key: string]: string | number; }) => string; export declare const getPremiumApiPath: (path: string, params?: { [key: string]: string | number; }) => string; export declare const getSsoApiPath: (path: string, params?: { [key: string]: string | number; }) => string; export declare const getChatbotAiApiPath: (path: string, params?: { [key: string]: string | number; }) => string; export type ApiOptions = RequestInit & { data?: any; }; export declare const callApi: (url: string, method: string, options?: ApiOptions, skipEncodeURI?: boolean) => Promise<any>; export declare const callApiWithOptionalAuth: (urlData: { url: string; backupUrl: string; } | string, method?: string, options?: ApiOptions, reqCookie?: string) => Promise<any>; export declare const callApiWithAuth: (url: string, method: string, options?: ApiOptions, reqCookie?: string) => Promise<any>; export declare const callApiWithAdminAuth: (url: string, method: string, options?: ApiOptions, reqCookie?: string) => Promise<any>; export declare function updateQueryStringParameter(uri: string, key: string, value: string): string; export declare const getUrlToSSOWithReturnUrl: (url?: string, params?: { [k: string]: string; }) => string; export declare const getUrlToSignUp: (url?: string, params?: { [k: string]: string; }, togetherBasePath?: string) => string; export declare const slugifiedNameWithId: (name?: string, id?: number, slug?: string, _locale?: LocaleType) => string; export declare const getCareDoctorUrl: ({ name, id, locale, }: { name?: string; id?: number; locale: LocaleType; }) => string; export declare const getCareHospitalUrl: ({ name, id, slug, locale, }: { name?: string; id?: number; slug?: string; locale: LocaleType; }) => string; export declare const getCareHospitalUrlAmp: ({ slug, id, locale, }: { slug?: string; id?: number; locale: LocaleType; }) => string;