@2bad/bitrix
Version:
Bitrix24 REST API client that doesn't suck
9 lines (8 loc) • 432 B
JavaScript
import { Method } from '../../methods';
export default ({ call, list }) => ({
fields: () => call(Method.CRM_COMPANY_FIELDS, {}),
create: (fields, params) => call(Method.CRM_COMPANY_ADD, { fields, params }),
get: (id) => call(Method.CRM_COMPANY_GET, { id }),
list: (params = {}) => list(Method.CRM_COMPANY_LIST, params),
update: (id, fields, params) => call(Method.CRM_COMPANY_UPDATE, { id, fields, params })
});