UNPKG

@slmdevs/celeraone

Version:

This is a NPM Package to use for all the CeleraOne interactions.

31 lines (30 loc) 1.25 kB
import { Response } from 'node-fetch'; /** * Endpoints for the CeleraOne API * * @enum Endpoints * @readonly */ export declare enum Endpoints { IMPORT_USER = "/cre-1.0/api/user-import", SAVE_USER_PROPERTY = "/cre-1.0/api/user/%s/store/%s/properties", DELETE_USER_PROPERTY = "/cre-1.0/api/user/%s/store/%s/properties/%s", FIND_USER = "/cre-1.0/api/find/user?field=contractor_id&value=%s", UPDATE_USER_PASSWORD = "/cre-1.0/api/user/%s/%s", UPDATE_USER_LOGIN = "/cre-1.0/api/user/%s/login", UPDATE_USER_MASTER_DATA = "/cre-1.0/api/user/%s/masterdata", PURGE_USER = "/cre-1.0/api/manage/privacy/eu/user/%s/purge", USER_SESSION = "/cre-1.0/api/auth/service/%s/session/%s", SEARCH_USER = "/cre-1.0/api/search/user", GET_USER_SINGLE_PROPERTY = "/cre-1.0/api/user/%s/store/GP/properties/%s", CHANGE_USER_LOGIN_ALIAS = "/cre-1.0/api/user/%s/login_alias" } /** * * @param { string } route The API Route thas you want to call * @param { string } method What type of method (POST/GET/PUT/...) * @param { any } [body] body The body to pass into the API request * @returns { Promise<Response> } */ declare const API: (route: string, method: string, body?: any) => Promise<Response>; export default API;