UNPKG

@geniucode/common-utils

Version:

Common utils

36 lines (35 loc) 2.44 kB
declare const enum EHttpHeadersContext { PROJECT_NAME = "http:project-name", AUTH_ACTION = "http:auth-action", AUTH_EXPIRE = "http:auth-expire", AUTH_TOKEN = "http:auth-token", USER_TYPE = "http:user-type", API_KEY = "http:api-key", CURRENT_MEMBER = "http:current-member" } interface IHttpHeadersContextData { projectName: string; authAction?: string; authExpire?: string; authToken?: string; userType?: string; apiKey?: string; } declare const setContextDataOfHttpByObject: (data: IHttpHeadersContextData) => void; declare const setContextDataOfHttp: (projectName?: string | undefined, authAction?: string | undefined, authExpire?: string | undefined, authToken?: string | undefined, userType?: string | undefined, apiKey?: string | undefined) => void; declare const getContextDataOfHttp: () => IHttpHeadersContextData; declare const setContextDataOfHttpProjectName: (projectName?: string | undefined) => any; declare const getContextDataOfHttpProjectName: () => string; declare const setContextDataOfHttpAuthAction: (authAction?: string | undefined) => any; declare const getContextDataOfHttpAuthAction: () => string; declare const setContextDataOfHttpAuthExpire: (authExpire?: string | undefined) => any; declare const getContextDataOfHttpAuthExpire: () => string; declare const setContextDataOfHttpAuthToken: (authToken?: string | undefined) => any; declare const getContextDataOfHttpAuthToken: () => string; declare const setContextDataOfHttpUserType: (userType?: string | undefined) => any; declare const getContextDataOfHttpUserType: () => string; declare const setContextDataOfHttpApiKey: (apiKey?: string | undefined) => any; declare const getContextDataOfHttpApiKey: () => string; declare const setContextDataOfCurrentMember: (payload: any) => any; declare const getContextDataOfCurrentMember: () => string; export { IHttpHeadersContextData, EHttpHeadersContext, setContextDataOfHttpByObject, setContextDataOfHttp, getContextDataOfHttp, setContextDataOfHttpProjectName, getContextDataOfHttpProjectName, setContextDataOfHttpAuthAction, getContextDataOfHttpAuthAction, setContextDataOfHttpAuthExpire, getContextDataOfHttpAuthExpire, setContextDataOfHttpAuthToken, getContextDataOfHttpAuthToken, setContextDataOfHttpUserType, getContextDataOfHttpUserType, setContextDataOfHttpApiKey, getContextDataOfHttpApiKey, setContextDataOfCurrentMember, getContextDataOfCurrentMember, };