event-app-api
Version:
Package for easy access to Event App API
181 lines (180 loc) • 8.77 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.sessionActionsDict = exports.SESSION_ACTION = exports.STREAM_TYPES = exports.ACTION_REFERENCE_TYPE = exports.ACTION_RESOURCE_NAME = exports.EXTERNAL_ACTION_RESOURCE_NAME = exports.INTERNAL_ACTION_RESOURCE_NAME = exports.ACTION_CATEGORY = exports.ACTION_NAME = exports.API_STAGE_PATH = exports.API_PROD_PATH = exports.BASE_STAGE_RESOURCE_URL = exports.BASE_PROD_RESOURCE_URL = exports.UNAUTHORIZED_STAGING_URL = exports.UNAUTHORIZED_PRODUCTION_URL = exports.STAGING_URL = exports.PRODUCTION_URL = exports.WEB_APP_PROD = exports.WEB_APP_STAGE = exports.STAGING_URL_UNAUTHORIZED = exports.PRODUCTION_URL_UNAUTHORIZED = exports.BASE_API_URL = void 0;
exports.BASE_API_URL = "BASE_API_URL";
exports.PRODUCTION_URL_UNAUTHORIZED = "https://api.hubs101.com";
exports.STAGING_URL_UNAUTHORIZED = "https://stag-api.hubs101.com";
exports.WEB_APP_STAGE = "https://staging.hubs101.com";
exports.WEB_APP_PROD = "https://app.hubs101.com";
exports.PRODUCTION_URL = `${exports.PRODUCTION_URL_UNAUTHORIZED}/api/v1`;
exports.STAGING_URL = `${exports.STAGING_URL_UNAUTHORIZED}/api/v1`;
exports.UNAUTHORIZED_PRODUCTION_URL = `${exports.PRODUCTION_URL_UNAUTHORIZED}/v1`;
exports.UNAUTHORIZED_STAGING_URL = `${exports.STAGING_URL_UNAUTHORIZED}/v1`;
exports.BASE_PROD_RESOURCE_URL = "https://media.hubs101.com/";
exports.BASE_STAGE_RESOURCE_URL = "https://staging-media.hubs101.com/";
exports.API_PROD_PATH = Object.freeze({
ACCOUNTS: `${exports.PRODUCTION_URL}/accounts`,
ATTENDEES: `${exports.PRODUCTION_URL}/attendees`,
AUTH: {
LOGIN: `${exports.PRODUCTION_URL}/auth/login`,
LOGOUT: `${exports.PRODUCTION_URL}/auth/logout`,
TOKEN_REFRESH: `${exports.PRODUCTION_URL}/auth/token-refresh`,
RESET_PASSWORD: `${exports.PRODUCTION_URL_UNAUTHORIZED}/auth/password-reset-request`,
},
CONNECTIONS: `${exports.PRODUCTION_URL}/users/connections`,
EVENTS: `${exports.PRODUCTION_URL}/events`,
PROFILE: `${exports.PRODUCTION_URL}/users/profile`,
USERS: `${exports.PRODUCTION_URL}/users`,
SESSIONS: `${exports.PRODUCTION_URL}/sessions`,
TRACKS: `${exports.PRODUCTION_URL}/tracks`,
EXHIBITIONS: `${exports.PRODUCTION_URL}/exhibitions`,
USER_EVENTS: `${exports.PRODUCTION_URL}/users/events`,
REGISTER: `${exports.PRODUCTION_URL_UNAUTHORIZED}/v1/register`,
ZOOM: {
SIGNATURE: `${exports.PRODUCTION_URL}/sdk/zoom/signature`,
},
MEETINGS_USERS_API_KEY: `${exports.PRODUCTION_URL}/users/meetings`,
LOCATION_API_KEY: `${exports.PRODUCTION_URL}/locations`,
MEETINGS_API_KEY: `${exports.PRODUCTION_URL}/meetings`,
POSTS: `${exports.PRODUCTION_URL}/posts`,
LINKEDIN_IMPORT_PROFILE: `${exports.PRODUCTION_URL}/linkedin/authorization`,
ACTIONS_EXHIBITIONS: `${exports.PRODUCTION_URL}/actions/exhibitions`,
ACTIONS_ATTENDEES: `${exports.PRODUCTION_URL}/actions/profiles`,
YOUTUBE_SDK_API: `${exports.PRODUCTION_URL}/sdk/youtube`,
DOCUMENTS: `${exports.PRODUCTION_URL}/documents`,
ACTIONS_SESSIONS: `${exports.PRODUCTION_URL}/actions/sessions`,
TERMS_URL: "https://hubs101.com/terms-of-use",
PRIVACY_URL: "https://hubs101.com/privacy-policy",
VERSIONS: `${exports.PRODUCTION_URL_UNAUTHORIZED}/versions`,
PASSWORD_ACTIVATION: `${exports.PRODUCTION_URL_UNAUTHORIZED}/v1/activation`,
VIMEO_VIEW: `${exports.PRODUCTION_URL}/sdk/vimeo/mobile`,
NOTES: `${exports.PRODUCTION_URL}/users/notes`,
MEETINGS_ARRANGE: `${exports.PRODUCTION_URL}/meetings/arrange`,
USER_NOTIFICATIONS: `${exports.PRODUCTION_URL}/users/notifications`,
NOTIFICATIONS: `${exports.PRODUCTION_URL}/notifications`,
GROUPS: `${exports.PRODUCTION_URL}/groups`,
OPTIONS: `${exports.PRODUCTION_URL}/options`,
TICKETS: `${exports.PRODUCTION_URL}/tickets`,
DISCOUNTS: `${exports.PRODUCTION_URL}/discounts`,
LOCATIONS: `${exports.PRODUCTION_URL}/locations`,
PAGES: `${exports.PRODUCTION_URL}/pages`,
PAYMENT_ACCOUNTS: `${exports.PRODUCTION_URL}/payment-account`,
ACCOUNT_TRIAL: `${exports.UNAUTHORIZED_PRODUCTION_URL}/accounts/trial`,
INVITATION: `${exports.UNAUTHORIZED_PRODUCTION_URL}/invitation`,
});
exports.API_STAGE_PATH = Object.freeze({
ACCOUNTS: `${exports.STAGING_URL}/accounts`,
ATTENDEES: `${exports.STAGING_URL}/attendees`,
AUTH: {
LOGIN: `${exports.STAGING_URL}/auth/login`,
LOGOUT: `${exports.STAGING_URL}/auth/logout`,
TOKEN_REFRESH: `${exports.STAGING_URL}/auth/token-refresh`,
RESET_PASSWORD: `${exports.STAGING_URL_UNAUTHORIZED}/auth/password-reset-request`,
},
CONNECTIONS: `${exports.STAGING_URL}/users/connections`,
EVENTS: `${exports.STAGING_URL}/events`,
PROFILE: `${exports.STAGING_URL}/users/profile`,
USERS: `${exports.STAGING_URL}/users`,
SESSIONS: `${exports.STAGING_URL}/sessions`,
TRACKS: `${exports.STAGING_URL}/tracks`,
EXHIBITIONS: `${exports.STAGING_URL}/exhibitions`,
USER_EVENTS: `${exports.STAGING_URL}/users/events`,
REGISTER: `${exports.STAGING_URL_UNAUTHORIZED}/v1/register`,
ZOOM: {
SIGNATURE: `${exports.STAGING_URL}/sdk/zoom/signature`,
},
MEETINGS_USERS_API_KEY: `${exports.STAGING_URL}/users/meetings`,
LOCATION_API_KEY: `${exports.STAGING_URL}/locations`,
MEETINGS_API_KEY: `${exports.STAGING_URL}/meetings`,
POSTS: `${exports.STAGING_URL}/posts`,
LINKEDIN_IMPORT_PROFILE: `${exports.STAGING_URL}/linkedin/authorization`,
ACTIONS_EXHIBITIONS: `${exports.STAGING_URL}/actions/exhibitions`,
ACTIONS_ATTENDEES: `${exports.STAGING_URL}/actions/profiles`,
YOUTUBE_SDK_API: `${exports.STAGING_URL}/sdk/youtube`,
DOCUMENTS: `${exports.STAGING_URL}/documents`,
ACTIONS_SESSIONS: `${exports.STAGING_URL}/actions/sessions`,
TERMS_URL: "https://hubs101.com/terms-of-use",
PRIVACY_URL: "https://hubs101.com/privacy-policy",
VERSIONS: `${exports.STAGING_URL_UNAUTHORIZED}/versions`,
PASSWORD_ACTIVATION: `${exports.STAGING_URL_UNAUTHORIZED}/v1/activation`,
JITSI_RAW: `${exports.WEB_APP_STAGE}/virtual-meeting-raw`,
VIMEO_VIEW: `${exports.STAGING_URL}/sdk/vimeo/mobile`,
NOTES: `${exports.STAGING_URL}/users/notes`,
MEETINGS_ARRANGE: `${exports.STAGING_URL}/meetings/arrange`,
USER_NOTIFICATIONS: `${exports.STAGING_URL}/users/notifications`,
NOTIFICATIONS: `${exports.STAGING_URL}/notifications`,
GROUPS: `${exports.STAGING_URL}/groups`,
OPTIONS: `${exports.STAGING_URL}/options`,
TICKETS: `${exports.STAGING_URL}/tickets`,
DISCOUNTS: `${exports.STAGING_URL}/discounts`,
LOCATIONS: `${exports.STAGING_URL}/locations`,
PAGES: `${exports.STAGING_URL}/pages`,
PAYMENT_ACCOUNTS: `${exports.STAGING_URL}/payment-account`,
ACCOUNT_TRIAL: `${exports.UNAUTHORIZED_STAGING_URL}/accounts/trial`,
INVITATION: `${exports.UNAUTHORIZED_STAGING_URL}/invitation`,
});
exports.ACTION_NAME = {
VIEW: "view",
DOWNLOAD: "download",
WATCH: "watch",
CHAT: "chat",
GROUP_CHAT: "chat",
MEET: "meet",
PIN: "pin",
UNPIN: "unpin",
CREATE: "create",
JOIN: "join",
CONTACT_PHONE: "contact_phone",
CONTACT_MOBILE: "contact_mobile",
CONTACT_EMAIL: "contact_email",
CONTACT_WEBSITE_1: "contact_website1",
CONTACT_WEBSITE_2: "contact_website2",
CONTACT_SOCIAL: "contact_social",
RESERVE: "reserve",
WATCH_RECORDED: "watch_recorded",
};
exports.ACTION_CATEGORY = {
CLICK: "click",
VIEW: "view",
SYSTEM: "system",
};
exports.INTERNAL_ACTION_RESOURCE_NAME = {
EXHIBITIONS: "exhibitions",
DOCUMENTS: "documents",
ATTENDEES: "attendees",
MEETING: "meeting",
SESSIONS: "sessions",
PROFILES: "profiles",
};
exports.EXTERNAL_ACTION_RESOURCE_NAME = {
URL: "url",
CONVERSATION: "conversation",
};
exports.ACTION_RESOURCE_NAME = Object.assign(Object.assign({}, exports.INTERNAL_ACTION_RESOURCE_NAME), exports.EXTERNAL_ACTION_RESOURCE_NAME);
exports.ACTION_REFERENCE_TYPE = {
INTERNAL: "internal",
EXTERNAL: "external",
};
exports.STREAM_TYPES = {
YOUTUBE: "youtube",
JITSI: "jitsi",
ZOOM: "zoom",
VIMEO: "vimeo",
URL: "url",
};
exports.SESSION_ACTION = {
SESSION_SAVED_SEAT: "session-saved-seat",
SESSION_WATCH_RECORDED: "watch_recorded",
};
exports.sessionActionsDict = {
[exports.SESSION_ACTION.SESSION_SAVED_SEAT]: {
action: exports.ACTION_NAME.RESERVE,
category: exports.ACTION_CATEGORY.CLICK,
resource: exports.ACTION_RESOURCE_NAME.SESSIONS,
},
[exports.SESSION_ACTION.SESSION_WATCH_RECORDED]: {
action: exports.ACTION_NAME.WATCH_RECORDED,
category: exports.ACTION_CATEGORY.VIEW,
resource: exports.ACTION_RESOURCE_NAME.SESSIONS,
},
};