event-app-api
Version:
Package for easy access to Event App API
97 lines (96 loc) • 2.52 kB
TypeScript
export type RegisterParams = {
email: string;
first_name: string;
last_name: string;
job_title: string;
company_name: string;
address_country: string;
avatar?: string;
picture?: string;
company_industry?: string;
address_state?: string;
contact_phone?: string;
contact_mobile?: string;
};
export type FetchAuthenticationParams = {
email: string;
password: string;
};
export type ResetPasswordBody = {
email: string;
method: string;
};
export type LoginResponse = {
token: string;
expires: string;
};
export type PathType = {
VERSIONS: string;
ACCOUNTS: string;
ATTENDEES: string;
AUTH: {
LOGIN: string;
LOGOUT: string;
TOKEN_REFRESH: string;
RESET_PASSWORD: string;
};
CONNECTIONS: string;
EVENTS: string;
PROFILE: string;
USERS: string;
SESSIONS: string;
TRACKS: string;
EXHIBITIONS: string;
USER_EVENTS: string;
REGISTER: string;
ZOOM: {
SECRET: string;
};
MEETINGS_USERS_API_KEY: string;
LOCATION_API_KEY: string;
MEETINGS_API_KEY: string;
MEETINGS_ARRANGE: string;
POSTS: string;
LINKEDIN_IMPORT_PROFILE: string;
ACTIONS_EXHIBITIONS: string;
ACTIONS_ATTENDEES: string;
YOUTUBE_SDK_API: string;
DOCUMENTS: string;
TERMS_URL: string;
PRIVACY_URL: string;
PASSWORD_ACTIVATION: string;
ACTIONS_SESSIONS: string;
JITSI_RAW: string;
VIMEO_VIEW: string;
NOTES: string;
USER_NOTIFICATIONS: string;
NOTIFICATIONS: string;
GROUPS: string;
OPTIONS: string;
TICKETS: string;
DISCOUNTS: string;
LOCATIONS: string;
PAGES: string;
PAYMENT_ACCOUNTS: string;
ACCOUNT_TRIAL: string;
INVITATION: string;
};
export type SendResetPasswordBody = {
password: string;
access: string;
expire: string;
};
export type EventAPIContextType = {
login: (params: FetchAuthenticationParams) => Promise<void>;
logout: () => Promise<void>;
register: () => Promise<void>;
handleRegistrationDetails: (params: RegisterParams) => void;
resetPassword: (baseUrl: string, body: ResetPasswordBody) => Promise<Response>;
init: () => Promise<void>;
getBasePath: () => PathType;
getBaseResourcePath: () => string;
setStage: (isStage: boolean) => void;
sendNewPassword: (uuid: string, body: SendResetPasswordBody) => Promise<boolean>;
runConfirmation: (part2: string) => Promise<boolean>;
isAuthenticated: boolean;
};