revbits-cip-integration
Version:
This package will integrate CIP with any product
65 lines (64 loc) • 2.74 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.API_ENDPOINTS = exports.API_CONFIG = void 0;
exports.API_CONFIG = {
API_URL: 'api/v2',
USER_AGENT: 'Shared Auth Agent',
ACCEPT: 'application/json',
CONTENT_TYPE: 'application/json',
AUTHORIZATION: (jwtToken) => `Bearer ${jwtToken}`,
DEFAULT_TIMEOUT: 10000,
DEFAULT_REJECT_UNAUTH: false,
MAX_ALLOWED_BULK_RECORDS_PER_REQUEST: 50,
};
exports.API_ENDPOINTS = {
WEB_SOCKET: { GENERATE_SOCKET_TOKEN: 'GenerateSocketToken' },
USER: {
GET_ALL: 'users/GetUsers',
GET_ONE: 'users/GetOneUser',
CREATE: 'users/CreateUser',
CREATE_BULK: 'users/CreateBulkUsers',
UPDATE: 'users/UpdateUser',
BULK_UPDATE: 'users/UpdateBulkUsers',
UPLOAD_AVATAR: 'users/UploadAvatar',
DELETE: 'users/DeleteUser',
RESTORE: 'users/RestoreUser',
CHECK_USERS_EXISTENCE_BY_USERNAMES: 'users/CheckUsersExistenceByUsernames',
CHECK_USERS_EXISTENCE_BY_IDS: 'users/CheckUsersExistenceByIds',
GET_CIP_URLS_CONFIG: '/users/SharedAuthUrlsConfig',
},
ROLE: {
GET_ALL: 'roles/GetRoles',
GET_ONE: 'roles/GetOneRole',
CREATE: 'roles/CreateRole',
CREATE_BULK: 'roles/CreateBulkRoles',
UPDATE: 'roles/UpdateRole',
BULK_UPDATE: 'roles/UpdateBulkRoles',
DELETE: 'roles/DeleteRole',
CHECK_ROLES_EXISTENCE_BY_NAMES: 'roles/CheckRolesExistencesByNames',
CHECK_ROLES_EXISTENCE_BY_IDS: 'roles/CheckRolesExistencesByIds',
},
PERMISSION: {
GET_ALL: 'permissions/GetPermissions',
GET_ONE: 'permissions/GetOnePermission',
SYNC: 'permissions/SyncPermissions',
DELETE: 'permissions/DELETE',
DELETE_PLATFORM: 'permissions/DeletePlatformPermissions',
},
NOTIFICATION: {
GET_ALL: 'notifications/GetNotifications',
GET_ONE: 'notifications/GetOneNotification',
CREATE: 'notifications/CreateNotification',
CREATE_BULK: 'notifications/CreateBulkNotifications',
UPDATE_BULK_DATA: 'notifications/UpdateBulkNotificationsData',
READ: 'notifications/ReadNotification',
DELETE: 'notifications/DeleteNotification',
GET_PLATFORMS_CONFIG: 'notifications/GetPlatfromsConfigs',
GET_USER_ACCESS_CONFIG: 'notifications/GetUserAccessConfigs',
GET_ALL_PLATFORMS_NOTIFICATIONS: 'notifications/GetAllPlatformsNotifications',
GET_ALL_PLATFORM_UNREAD_NOTIFICATIONS_COUNT: 'notifications/GetAllPlatformsUnreadNotificationCount',
},
INVENTORY: { CREATE_INVENTORY: '/inventory/create' },
SESSION: { LOGOUT: '/session/logout' },
DASHBOARD: { UPDATE: '/dashboard/update' },
};
;