@2bad/bitrix 2.5.1 → 3.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -2
- package/build/bitrix.d.ts +65 -0
- package/build/bitrix.js +55 -0
- package/build/client/hooks/addAccessToken.js +9 -0
- package/build/{module/client → client}/index.d.ts +3 -3
- package/build/{module/client → client}/index.js +21 -16
- package/build/{module/client → client}/methods/batch.d.ts +6 -6
- package/build/client/methods/batch.js +75 -0
- package/build/{module/client → client}/methods/call.d.ts +4 -4
- package/build/{module/client → client}/methods/call.js +8 -9
- package/build/{module/client → client}/methods/list.d.ts +10 -10
- package/build/client/methods/list.js +58 -0
- package/build/{module/commands.d.ts → commands.d.ts} +3 -3
- package/build/commands.js +1 -0
- package/build/{module/methods.d.ts → methods.d.ts} +19 -19
- package/build/{module/methods.js → methods.js} +5 -5
- package/build/{main/payloads.d.ts → payloads.d.ts} +5 -5
- package/build/payloads.js +1 -0
- package/build/{main/services → services}/common.d.ts +7 -7
- package/build/services/common.js +2 -0
- package/build/{main/services → services}/companies/entities.d.ts +2 -2
- package/build/services/companies/entities.js +1 -0
- package/build/services/companies/index.d.ts +15 -0
- package/build/services/companies/index.js +17 -0
- package/build/{module/services → services}/companies/methods.d.ts +5 -5
- package/build/services/companies/methods.js +1 -0
- package/build/{module/services → services}/contacts/entities.d.ts +2 -2
- package/build/services/contacts/entities.js +1 -0
- package/build/services/contacts/index.d.ts +15 -0
- package/build/services/contacts/index.js +17 -0
- package/build/{module/services → services}/contacts/methods.d.ts +5 -5
- package/build/services/contacts/methods.js +1 -0
- package/build/{module/services → services}/currencies/entities.d.ts +2 -2
- package/build/services/currencies/entities.js +1 -0
- package/build/{module/services → services}/deals/entities.d.ts +2 -2
- package/build/services/deals/entities.js +1 -0
- package/build/services/deals/index.d.ts +15 -0
- package/build/services/deals/index.js +17 -0
- package/build/{main/services → services}/deals/methods.d.ts +5 -5
- package/build/services/deals/methods.js +1 -0
- package/build/{module/services → services}/leads/entities.d.ts +2 -2
- package/build/services/leads/entities.js +1 -0
- package/build/services/leads/index.d.ts +15 -0
- package/build/services/leads/index.js +17 -0
- package/build/{main/services → services}/leads/methods.d.ts +5 -5
- package/build/services/leads/methods.js +1 -0
- package/build/{main/services → services}/statuses/entities.d.ts +3 -3
- package/build/services/statuses/entities.js +1 -0
- package/build/services/statuses/index.d.ts +14 -0
- package/build/services/statuses/index.js +19 -0
- package/build/{main/services → services}/statuses/methods.d.ts +5 -5
- package/build/services/statuses/methods.js +1 -0
- package/build/{module/services → services}/users/entities.d.ts +2 -2
- package/build/services/users/entities.js +1 -0
- package/build/services/users/index.d.ts +9 -0
- package/build/services/users/index.js +7 -0
- package/build/{main/services → services}/users/methods.d.ts +4 -4
- package/build/services/users/methods.js +1 -0
- package/build/utils/Diff.d.ts +1 -0
- package/build/utils/Diff.js +7 -0
- package/build/{module/utils → utils}/ExtractValue.d.ts +1 -1
- package/build/{main/utils/ExtractValue.d.ts → utils/ExtractValue.js} +1 -2
- package/build/utils/isArray.d.ts +2 -0
- package/build/{module/utils → utils}/isArray.js +1 -1
- package/package.json +43 -49
- package/build/main/bitrix.d.ts +0 -114
- package/build/main/bitrix.integration.test.d.ts +0 -0
- package/build/main/bitrix.integration.test.js +0 -31
- package/build/main/bitrix.js +0 -61
- package/build/main/bitrix.unit.test.d.ts +0 -1
- package/build/main/bitrix.unit.test.js +0 -44
- package/build/main/client/client.unit.test.d.ts +0 -1
- package/build/main/client/client.unit.test.js +0 -70
- package/build/main/client/hooks/addAccessToken.js +0 -13
- package/build/main/client/hooks/addAccessToken.unit.test.d.ts +0 -1
- package/build/main/client/hooks/addAccessToken.unit.test.js +0 -31
- package/build/main/client/index.d.ts +0 -15
- package/build/main/client/index.js +0 -53
- package/build/main/client/methods/batch.d.ts +0 -40
- package/build/main/client/methods/batch.js +0 -85
- package/build/main/client/methods/batch.unit.test.d.ts +0 -1
- package/build/main/client/methods/batch.unit.test.js +0 -494
- package/build/main/client/methods/call.d.ts +0 -17
- package/build/main/client/methods/call.js +0 -36
- package/build/main/client/methods/call.unit.test.d.ts +0 -1
- package/build/main/client/methods/call.unit.test.js +0 -183
- package/build/main/client/methods/list.d.ts +0 -30
- package/build/main/client/methods/list.js +0 -66
- package/build/main/client/methods/list.unit.test.d.ts +0 -1
- package/build/main/client/methods/list.unit.test.js +0 -277
- package/build/main/commands.d.ts +0 -10
- package/build/main/commands.js +0 -2
- package/build/main/methods.d.ts +0 -92
- package/build/main/methods.js +0 -41
- package/build/main/payloads.js +0 -2
- package/build/main/services/common.js +0 -2
- package/build/main/services/companies/entities.js +0 -2
- package/build/main/services/companies/index.d.ts +0 -26
- package/build/main/services/companies/index.integration.test.d.ts +0 -1
- package/build/main/services/companies/index.integration.test.js +0 -19
- package/build/main/services/companies/index.js +0 -10
- package/build/main/services/companies/index.unit.test.d.ts +0 -1
- package/build/main/services/companies/index.unit.test.js +0 -72
- package/build/main/services/companies/methods.d.ts +0 -44
- package/build/main/services/companies/methods.js +0 -3
- package/build/main/services/contacts/entities.d.ts +0 -45
- package/build/main/services/contacts/entities.js +0 -2
- package/build/main/services/contacts/index.d.ts +0 -26
- package/build/main/services/contacts/index.integration.test.d.ts +0 -1
- package/build/main/services/contacts/index.integration.test.js +0 -19
- package/build/main/services/contacts/index.js +0 -10
- package/build/main/services/contacts/index.unit.test.d.ts +0 -1
- package/build/main/services/contacts/index.unit.test.js +0 -72
- package/build/main/services/contacts/methods.d.ts +0 -44
- package/build/main/services/contacts/methods.js +0 -3
- package/build/main/services/currencies/entities.d.ts +0 -15
- package/build/main/services/currencies/entities.js +0 -2
- package/build/main/services/deals/entities.d.ts +0 -43
- package/build/main/services/deals/entities.js +0 -2
- package/build/main/services/deals/index.d.ts +0 -26
- package/build/main/services/deals/index.integration.test.d.ts +0 -1
- package/build/main/services/deals/index.integration.test.js +0 -19
- package/build/main/services/deals/index.js +0 -10
- package/build/main/services/deals/index.unit.test.d.ts +0 -1
- package/build/main/services/deals/index.unit.test.js +0 -72
- package/build/main/services/deals/methods.js +0 -3
- package/build/main/services/leads/entities.d.ts +0 -49
- package/build/main/services/leads/entities.js +0 -2
- package/build/main/services/leads/index.d.ts +0 -26
- package/build/main/services/leads/index.integration.test.d.ts +0 -1
- package/build/main/services/leads/index.integration.test.js +0 -19
- package/build/main/services/leads/index.js +0 -10
- package/build/main/services/leads/index.unit.test.d.ts +0 -1
- package/build/main/services/leads/index.unit.test.js +0 -72
- package/build/main/services/leads/methods.js +0 -3
- package/build/main/services/statuses/entities.js +0 -2
- package/build/main/services/statuses/index.d.ts +0 -14
- package/build/main/services/statuses/index.integration.test.d.ts +0 -1
- package/build/main/services/statuses/index.integration.test.js +0 -90
- package/build/main/services/statuses/index.js +0 -11
- package/build/main/services/statuses/index.unit.test.d.ts +0 -1
- package/build/main/services/statuses/index.unit.test.js +0 -60
- package/build/main/services/statuses/methods.js +0 -3
- package/build/main/services/users/entities.d.ts +0 -40
- package/build/main/services/users/entities.js +0 -2
- package/build/main/services/users/index.d.ts +0 -9
- package/build/main/services/users/index.integration.test.d.ts +0 -1
- package/build/main/services/users/index.integration.test.js +0 -33
- package/build/main/services/users/index.js +0 -7
- package/build/main/services/users/index.unit.test.d.ts +0 -1
- package/build/main/services/users/index.unit.test.js +0 -25
- package/build/main/services/users/methods.js +0 -3
- package/build/main/utils/Diff.d.ts +0 -1
- package/build/main/utils/Diff.js +0 -2
- package/build/main/utils/ExtractValue.js +0 -2
- package/build/main/utils/isArray.d.ts +0 -2
- package/build/main/utils/isArray.js +0 -4
- package/build/module/bitrix.d.ts +0 -114
- package/build/module/bitrix.integration.test.d.ts +0 -0
- package/build/module/bitrix.integration.test.js +0 -31
- package/build/module/bitrix.js +0 -40
- package/build/module/bitrix.unit.test.d.ts +0 -1
- package/build/module/bitrix.unit.test.js +0 -16
- package/build/module/client/client.unit.test.d.ts +0 -1
- package/build/module/client/client.unit.test.js +0 -65
- package/build/module/client/hooks/addAccessToken.d.ts +0 -6
- package/build/module/client/hooks/addAccessToken.js +0 -11
- package/build/module/client/hooks/addAccessToken.unit.test.d.ts +0 -1
- package/build/module/client/hooks/addAccessToken.unit.test.js +0 -26
- package/build/module/client/methods/batch.js +0 -76
- package/build/module/client/methods/batch.unit.test.d.ts +0 -1
- package/build/module/client/methods/batch.unit.test.js +0 -466
- package/build/module/client/methods/call.unit.test.d.ts +0 -1
- package/build/module/client/methods/call.unit.test.js +0 -155
- package/build/module/client/methods/list.js +0 -55
- package/build/module/client/methods/list.unit.test.d.ts +0 -1
- package/build/module/client/methods/list.unit.test.js +0 -252
- package/build/module/commands.js +0 -1
- package/build/module/payloads.d.ts +0 -40
- package/build/module/payloads.js +0 -1
- package/build/module/services/common.d.ts +0 -22
- package/build/module/services/common.js +0 -1
- package/build/module/services/companies/entities.d.ts +0 -54
- package/build/module/services/companies/entities.js +0 -1
- package/build/module/services/companies/index.d.ts +0 -26
- package/build/module/services/companies/index.integration.test.d.ts +0 -1
- package/build/module/services/companies/index.integration.test.js +0 -14
- package/build/module/services/companies/index.js +0 -8
- package/build/module/services/companies/index.unit.test.d.ts +0 -1
- package/build/module/services/companies/index.unit.test.js +0 -67
- package/build/module/services/companies/methods.js +0 -1
- package/build/module/services/contacts/entities.js +0 -1
- package/build/module/services/contacts/index.d.ts +0 -26
- package/build/module/services/contacts/index.integration.test.d.ts +0 -1
- package/build/module/services/contacts/index.integration.test.js +0 -14
- package/build/module/services/contacts/index.js +0 -8
- package/build/module/services/contacts/index.unit.test.d.ts +0 -1
- package/build/module/services/contacts/index.unit.test.js +0 -67
- package/build/module/services/contacts/methods.js +0 -1
- package/build/module/services/currencies/entities.js +0 -1
- package/build/module/services/deals/entities.js +0 -1
- package/build/module/services/deals/index.d.ts +0 -26
- package/build/module/services/deals/index.integration.test.d.ts +0 -1
- package/build/module/services/deals/index.integration.test.js +0 -14
- package/build/module/services/deals/index.js +0 -8
- package/build/module/services/deals/index.unit.test.d.ts +0 -1
- package/build/module/services/deals/index.unit.test.js +0 -67
- package/build/module/services/deals/methods.d.ts +0 -44
- package/build/module/services/deals/methods.js +0 -1
- package/build/module/services/leads/entities.js +0 -1
- package/build/module/services/leads/index.d.ts +0 -26
- package/build/module/services/leads/index.integration.test.d.ts +0 -1
- package/build/module/services/leads/index.integration.test.js +0 -14
- package/build/module/services/leads/index.js +0 -8
- package/build/module/services/leads/index.unit.test.d.ts +0 -1
- package/build/module/services/leads/index.unit.test.js +0 -67
- package/build/module/services/leads/methods.d.ts +0 -44
- package/build/module/services/leads/methods.js +0 -1
- package/build/module/services/statuses/entities.d.ts +0 -16
- package/build/module/services/statuses/entities.js +0 -1
- package/build/module/services/statuses/index.d.ts +0 -14
- package/build/module/services/statuses/index.integration.test.d.ts +0 -1
- package/build/module/services/statuses/index.integration.test.js +0 -85
- package/build/module/services/statuses/index.js +0 -9
- package/build/module/services/statuses/index.unit.test.d.ts +0 -1
- package/build/module/services/statuses/index.unit.test.js +0 -55
- package/build/module/services/statuses/methods.d.ts +0 -51
- package/build/module/services/statuses/methods.js +0 -1
- package/build/module/services/users/entities.js +0 -1
- package/build/module/services/users/index.d.ts +0 -9
- package/build/module/services/users/index.integration.test.d.ts +0 -1
- package/build/module/services/users/index.integration.test.js +0 -28
- package/build/module/services/users/index.js +0 -5
- package/build/module/services/users/index.unit.test.d.ts +0 -1
- package/build/module/services/users/index.unit.test.js +0 -20
- package/build/module/services/users/methods.d.ts +0 -17
- package/build/module/services/users/methods.js +0 -1
- package/build/module/utils/Diff.d.ts +0 -1
- package/build/module/utils/Diff.js +0 -1
- package/build/module/utils/ExtractValue.js +0 -1
- package/build/module/utils/isArray.d.ts +0 -2
- /package/build/{main/client → client}/hooks/addAccessToken.d.ts +0 -0
package/build/main/methods.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Method = void 0;
|
|
4
|
-
var Method;
|
|
5
|
-
(function (Method) {
|
|
6
|
-
Method["BATCH"] = "batch";
|
|
7
|
-
Method["CRM_COMPANY_FIELDS"] = "crm.company.fields";
|
|
8
|
-
Method["CRM_COMPANY_ADD"] = "crm.company.add";
|
|
9
|
-
Method["CRM_COMPANY_UPDATE"] = "crm.company.update";
|
|
10
|
-
Method["CRM_COMPANY_GET"] = "crm.company.get";
|
|
11
|
-
Method["CRM_COMPANY_LIST"] = "crm.company.list";
|
|
12
|
-
Method["CRM_CONTACT_FIELDS"] = "crm.contact.fields";
|
|
13
|
-
Method["CRM_CONTACT_ADD"] = "crm.contact.add";
|
|
14
|
-
Method["CRM_CONTACT_UPDATE"] = "crm.contact.update";
|
|
15
|
-
Method["CRM_CONTACT_GET"] = "crm.contact.get";
|
|
16
|
-
Method["CRM_CONTACT_LIST"] = "crm.contact.list";
|
|
17
|
-
Method["CRM_DEAL_FIELDS"] = "crm.deal.fields";
|
|
18
|
-
Method["CRM_DEAL_ADD"] = "crm.deal.add";
|
|
19
|
-
Method["CRM_DEAL_UPDATE"] = "crm.deal.update";
|
|
20
|
-
Method["CRM_DEAL_GET"] = "crm.deal.get";
|
|
21
|
-
Method["CRM_DEAL_LIST"] = "crm.deal.list";
|
|
22
|
-
Method["CRM_LEAD_FIELDS"] = "crm.lead.fields";
|
|
23
|
-
Method["CRM_LEAD_ADD"] = "crm.lead.add";
|
|
24
|
-
Method["CRM_LEAD_UPDATE"] = "crm.lead.update";
|
|
25
|
-
Method["CRM_LEAD_GET"] = "crm.lead.get";
|
|
26
|
-
Method["CRM_LEAD_LIST"] = "crm.lead.list";
|
|
27
|
-
Method["CRM_STATUS_FIELDS"] = "crm.status.fields";
|
|
28
|
-
Method["CRM_STATUS_ADD"] = "crm.status.add";
|
|
29
|
-
Method["CRM_STATUS_DELETE"] = "crm.status.delete";
|
|
30
|
-
Method["CRM_STATUS_GET"] = "crm.status.get";
|
|
31
|
-
Method["CRM_STATUS_LIST"] = "crm.status.list";
|
|
32
|
-
Method["CRM_STATUS_UPDATE"] = "crm.status.update";
|
|
33
|
-
Method["USER_FIELDS"] = "user.fields";
|
|
34
|
-
Method["USER_GET"] = "user.get";
|
|
35
|
-
})(Method = exports.Method || (exports.Method = {}));
|
|
36
|
-
const LISTABLE_METHODS = [
|
|
37
|
-
Method.CRM_COMPANY_LIST,
|
|
38
|
-
Method.CRM_CONTACT_LIST,
|
|
39
|
-
Method.CRM_DEAL_LIST,
|
|
40
|
-
Method.CRM_LEAD_LIST
|
|
41
|
-
];
|
package/build/main/payloads.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Call } from '../../client/methods/call';
|
|
2
|
-
import { List } from '../../client/methods/list';
|
|
3
|
-
import { Method, MethodParams } from '../../methods';
|
|
4
|
-
declare type Dependencies = {
|
|
5
|
-
readonly call: Call;
|
|
6
|
-
readonly list: List;
|
|
7
|
-
};
|
|
8
|
-
declare const _default: ({ call, list }: Dependencies) => {
|
|
9
|
-
fields: () => Promise<import("../../payloads").GetPayload<import("../common").Fields>>;
|
|
10
|
-
create: <D extends {
|
|
11
|
-
readonly fields: Partial<import("./entities").Company>;
|
|
12
|
-
readonly params?: {
|
|
13
|
-
readonly REGISTER_SONET_EVENT: "Y" | "N";
|
|
14
|
-
} | undefined;
|
|
15
|
-
}>(fields: D["fields"], params?: D["params"] | undefined) => Promise<import("../../payloads").GetPayload<number>>;
|
|
16
|
-
get: (id: string) => Promise<import("../../payloads").GetPayload<import("./entities").Company>>;
|
|
17
|
-
list: (params?: MethodParams<Method.CRM_COMPANY_LIST>) => Promise<import("../../payloads").ListPayload<import("./entities").Company>>;
|
|
18
|
-
update: <D_1 extends {
|
|
19
|
-
readonly id: string;
|
|
20
|
-
readonly fields: Record<string, unknown>;
|
|
21
|
-
readonly params?: {
|
|
22
|
-
readonly REGISTER_SONET_EVENT: "Y" | "N";
|
|
23
|
-
} | undefined;
|
|
24
|
-
}>(id: string, fields: D_1["fields"], params?: D_1["params"] | undefined) => Promise<import("../../payloads").GetPayload<boolean>>;
|
|
25
|
-
};
|
|
26
|
-
export default _default;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const bitrix_1 = __importDefault(require("./../../bitrix"));
|
|
7
|
-
const WEBHOOK_URL = process.env['WEBHOOK_URL'];
|
|
8
|
-
if (!WEBHOOK_URL) {
|
|
9
|
-
throw Error('Integration tests require environmental variable `WEBHOOK_URL` to be set');
|
|
10
|
-
}
|
|
11
|
-
const { companies } = (0, bitrix_1.default)(WEBHOOK_URL);
|
|
12
|
-
describe('Companies', () => {
|
|
13
|
-
describe('fields', () => {
|
|
14
|
-
it('should get all fields', async () => {
|
|
15
|
-
const { result } = await companies.fields();
|
|
16
|
-
expect(result).toMatchSnapshot();
|
|
17
|
-
});
|
|
18
|
-
});
|
|
19
|
-
});
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const methods_1 = require("../../methods");
|
|
4
|
-
exports.default = ({ call, list }) => ({
|
|
5
|
-
fields: () => call(methods_1.Method.CRM_COMPANY_FIELDS, {}),
|
|
6
|
-
create: (fields, params) => call(methods_1.Method.CRM_COMPANY_ADD, { fields, params }),
|
|
7
|
-
get: (id) => call(methods_1.Method.CRM_COMPANY_GET, { id }),
|
|
8
|
-
list: (params = {}) => list(methods_1.Method.CRM_COMPANY_LIST, params),
|
|
9
|
-
update: (id, fields, params) => call(methods_1.Method.CRM_COMPANY_UPDATE, { id, fields, params })
|
|
10
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const _1 = __importDefault(require("."));
|
|
7
|
-
const mockCall = jest.fn(() => Promise.resolve());
|
|
8
|
-
const mockList = jest.fn(() => Promise.resolve());
|
|
9
|
-
const companies = (0, _1.default)({ call: mockCall, list: mockList });
|
|
10
|
-
const ID = '77';
|
|
11
|
-
describe('Companies', () => {
|
|
12
|
-
beforeEach(() => {
|
|
13
|
-
mockCall.mockClear();
|
|
14
|
-
mockList.mockClear();
|
|
15
|
-
});
|
|
16
|
-
it('should expose API methods', () => {
|
|
17
|
-
expect(companies).toMatchSnapshot();
|
|
18
|
-
});
|
|
19
|
-
describe('`create`', () => {
|
|
20
|
-
it('should invoke `call`', async () => {
|
|
21
|
-
await companies.create({
|
|
22
|
-
COMMENTS: 'Some comment'
|
|
23
|
-
}, {
|
|
24
|
-
REGISTER_SONET_EVENT: 'Y'
|
|
25
|
-
});
|
|
26
|
-
expect(mockCall.mock.calls).toMatchSnapshot();
|
|
27
|
-
});
|
|
28
|
-
it('should work without optional params', async () => {
|
|
29
|
-
await companies.create({
|
|
30
|
-
COMMENTS: 'Some comment'
|
|
31
|
-
});
|
|
32
|
-
expect(mockCall.mock.calls).toMatchSnapshot();
|
|
33
|
-
});
|
|
34
|
-
});
|
|
35
|
-
describe('`get`', () => {
|
|
36
|
-
it('should invoke `call`', async () => {
|
|
37
|
-
await companies.get(ID);
|
|
38
|
-
expect(mockCall.mock.calls).toMatchSnapshot();
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
describe('`list`', () => {
|
|
42
|
-
it('should invoke `list`', async () => {
|
|
43
|
-
await companies.list({
|
|
44
|
-
start: 0,
|
|
45
|
-
order: { COMMENTS: 'ASC' },
|
|
46
|
-
filter: { '>PROBABILITY': 50 },
|
|
47
|
-
select: ['*', 'UF_*']
|
|
48
|
-
});
|
|
49
|
-
expect(mockList.mock.calls).toMatchSnapshot();
|
|
50
|
-
});
|
|
51
|
-
it('should work without optional params', async () => {
|
|
52
|
-
await companies.list();
|
|
53
|
-
expect(mockList.mock.calls).toMatchSnapshot();
|
|
54
|
-
});
|
|
55
|
-
});
|
|
56
|
-
describe('`update`', () => {
|
|
57
|
-
it('should invoke `call`', async () => {
|
|
58
|
-
await companies.update(ID, {
|
|
59
|
-
COMMENTS: 'Some comment'
|
|
60
|
-
}, {
|
|
61
|
-
REGISTER_SONET_EVENT: 'Y'
|
|
62
|
-
});
|
|
63
|
-
expect(mockCall.mock.calls).toMatchSnapshot();
|
|
64
|
-
});
|
|
65
|
-
it('should work without optional params', async () => {
|
|
66
|
-
await companies.update(ID, {
|
|
67
|
-
COMMENTS: 'Some comment'
|
|
68
|
-
});
|
|
69
|
-
expect(mockCall.mock.calls).toMatchSnapshot();
|
|
70
|
-
});
|
|
71
|
-
});
|
|
72
|
-
});
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { ListParams, Method } from '../../methods';
|
|
2
|
-
import { GetPayload, ListPayload } from '../../payloads';
|
|
3
|
-
import { Fields } from '../common';
|
|
4
|
-
import { Company } from './entities';
|
|
5
|
-
export declare type CompaniesMethods = {
|
|
6
|
-
readonly [Method.CRM_COMPANY_FIELDS]: {
|
|
7
|
-
readonly type: Company;
|
|
8
|
-
readonly payload: GetPayload<Fields>;
|
|
9
|
-
readonly params?: Record<string, unknown>;
|
|
10
|
-
};
|
|
11
|
-
readonly [Method.CRM_COMPANY_ADD]: {
|
|
12
|
-
readonly type: Company;
|
|
13
|
-
readonly payload: GetPayload<number>;
|
|
14
|
-
readonly params: {
|
|
15
|
-
readonly fields: Partial<Company>;
|
|
16
|
-
readonly params?: {
|
|
17
|
-
readonly REGISTER_SONET_EVENT: 'Y' | 'N';
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
readonly [Method.CRM_COMPANY_GET]: {
|
|
22
|
-
readonly type: Company;
|
|
23
|
-
readonly payload: GetPayload<Company>;
|
|
24
|
-
readonly params: {
|
|
25
|
-
readonly id: string;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
readonly [Method.CRM_COMPANY_LIST]: {
|
|
29
|
-
readonly type: Company;
|
|
30
|
-
readonly payload: ListPayload<Company>;
|
|
31
|
-
readonly params: ListParams;
|
|
32
|
-
};
|
|
33
|
-
readonly [Method.CRM_COMPANY_UPDATE]: {
|
|
34
|
-
readonly type: Company;
|
|
35
|
-
readonly payload: GetPayload<boolean>;
|
|
36
|
-
readonly params: {
|
|
37
|
-
readonly id: string;
|
|
38
|
-
readonly fields: Record<string, unknown>;
|
|
39
|
-
readonly params?: {
|
|
40
|
-
readonly REGISTER_SONET_EVENT: 'Y' | 'N';
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { BoolString, ISODate, MultiFieldArray, NumberString } from '../common';
|
|
2
|
-
export declare type Contact = {
|
|
3
|
-
readonly [key: string]: MultiFieldArray | string | null;
|
|
4
|
-
readonly ID: NumberString;
|
|
5
|
-
readonly POST: string | null;
|
|
6
|
-
readonly COMMENTS: string | null;
|
|
7
|
-
readonly HONORIFIC: string | null;
|
|
8
|
-
readonly NAME: string | null;
|
|
9
|
-
readonly SECOND_NAME: string | null;
|
|
10
|
-
readonly LAST_NAME: string | null;
|
|
11
|
-
readonly PHOTO: string | null;
|
|
12
|
-
readonly LEAD_ID: NumberString;
|
|
13
|
-
readonly TYPE_ID: string | null;
|
|
14
|
-
readonly SOURCE_ID: NumberString;
|
|
15
|
-
readonly SOURCE_DESCRIPTION: string | null;
|
|
16
|
-
readonly COMPANY_ID: NumberString;
|
|
17
|
-
readonly BIRTHDATE: ISODate;
|
|
18
|
-
readonly EXPORT: BoolString;
|
|
19
|
-
readonly HAS_PHONE: BoolString;
|
|
20
|
-
readonly HAS_EMAIL: BoolString;
|
|
21
|
-
readonly HAS_IMOL: BoolString;
|
|
22
|
-
readonly DATE_CREATE: ISODate;
|
|
23
|
-
readonly DATE_MODIFY: ISODate;
|
|
24
|
-
readonly ASSIGNED_BY_ID: NumberString;
|
|
25
|
-
readonly CREATED_BY_ID: NumberString;
|
|
26
|
-
readonly MODIFY_BY_ID: NumberString;
|
|
27
|
-
readonly OPENED: BoolString;
|
|
28
|
-
readonly ORIGINATOR_ID: string | null;
|
|
29
|
-
readonly ORIGIN_ID: NumberString;
|
|
30
|
-
readonly ORIGIN_VERSION: string | null;
|
|
31
|
-
readonly FACE_ID: string | null;
|
|
32
|
-
readonly ADDRESS: string | null;
|
|
33
|
-
readonly ADDRESS_2: string | null;
|
|
34
|
-
readonly ADDRESS_CITY: string | null;
|
|
35
|
-
readonly ADDRESS_POSTAL_CODE: string | null;
|
|
36
|
-
readonly ADDRESS_REGION: string | null;
|
|
37
|
-
readonly ADDRESS_PROVINCE: string | null;
|
|
38
|
-
readonly ADDRESS_COUNTRY: string | null;
|
|
39
|
-
readonly ADDRESS_COUNTRY_CODE: string | null;
|
|
40
|
-
readonly UTM_SOURCE: string | null;
|
|
41
|
-
readonly UTM_MEDIUM: string | null;
|
|
42
|
-
readonly UTM_CAMPAIGN: string | null;
|
|
43
|
-
readonly UTM_CONTENT: string | null;
|
|
44
|
-
readonly UTM_TERM: string | null;
|
|
45
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Call } from '../../client/methods/call';
|
|
2
|
-
import { List } from '../../client/methods/list';
|
|
3
|
-
import { Method, MethodParams } from '../../methods';
|
|
4
|
-
declare type Dependencies = {
|
|
5
|
-
readonly call: Call;
|
|
6
|
-
readonly list: List;
|
|
7
|
-
};
|
|
8
|
-
declare const _default: ({ call, list }: Dependencies) => {
|
|
9
|
-
fields: () => Promise<import("../../payloads").GetPayload<import("../common").Fields>>;
|
|
10
|
-
create: <D extends {
|
|
11
|
-
readonly fields: Partial<import("./entities").Contact>;
|
|
12
|
-
readonly params?: {
|
|
13
|
-
readonly REGISTER_SONET_EVENT: "Y" | "N";
|
|
14
|
-
} | undefined;
|
|
15
|
-
}>(fields: D["fields"], params?: D["params"] | undefined) => Promise<import("../../payloads").GetPayload<number>>;
|
|
16
|
-
get: (id: string) => Promise<import("../../payloads").GetPayload<import("./entities").Contact>>;
|
|
17
|
-
list: (params?: MethodParams<Method.CRM_CONTACT_LIST>) => Promise<import("../../payloads").ListPayload<import("./entities").Contact>>;
|
|
18
|
-
update: <D_1 extends {
|
|
19
|
-
readonly id: string;
|
|
20
|
-
readonly fields: Record<string, unknown>;
|
|
21
|
-
readonly params?: {
|
|
22
|
-
readonly REGISTER_SONET_EVENT: "Y" | "N";
|
|
23
|
-
} | undefined;
|
|
24
|
-
}>(id: string, fields: D_1["fields"], params?: D_1["params"] | undefined) => Promise<import("../../payloads").GetPayload<boolean>>;
|
|
25
|
-
};
|
|
26
|
-
export default _default;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const bitrix_1 = __importDefault(require("./../../bitrix"));
|
|
7
|
-
const WEBHOOK_URL = process.env['WEBHOOK_URL'];
|
|
8
|
-
if (!WEBHOOK_URL) {
|
|
9
|
-
throw Error('Integration tests require environmental variable `WEBHOOK_URL` to be set');
|
|
10
|
-
}
|
|
11
|
-
const { contacts } = (0, bitrix_1.default)(WEBHOOK_URL);
|
|
12
|
-
describe('Contacts', () => {
|
|
13
|
-
describe('fields', () => {
|
|
14
|
-
it('should get all fields', async () => {
|
|
15
|
-
const { result } = await contacts.fields();
|
|
16
|
-
expect(result).toMatchSnapshot();
|
|
17
|
-
});
|
|
18
|
-
});
|
|
19
|
-
});
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const methods_1 = require("../../methods");
|
|
4
|
-
exports.default = ({ call, list }) => ({
|
|
5
|
-
fields: () => call(methods_1.Method.CRM_CONTACT_FIELDS, {}),
|
|
6
|
-
create: (fields, params) => call(methods_1.Method.CRM_CONTACT_ADD, { fields, params }),
|
|
7
|
-
get: (id) => call(methods_1.Method.CRM_CONTACT_GET, { id }),
|
|
8
|
-
list: (params = {}) => list(methods_1.Method.CRM_CONTACT_LIST, params),
|
|
9
|
-
update: (id, fields, params) => call(methods_1.Method.CRM_CONTACT_UPDATE, { id, fields, params })
|
|
10
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const _1 = __importDefault(require("."));
|
|
7
|
-
const mockCall = jest.fn(() => Promise.resolve());
|
|
8
|
-
const mockList = jest.fn(() => Promise.resolve());
|
|
9
|
-
const contacts = (0, _1.default)({ call: mockCall, list: mockList });
|
|
10
|
-
const ID = '77';
|
|
11
|
-
describe('Contacts', () => {
|
|
12
|
-
beforeEach(() => {
|
|
13
|
-
mockCall.mockClear();
|
|
14
|
-
mockList.mockClear();
|
|
15
|
-
});
|
|
16
|
-
it('should expose API methods', () => {
|
|
17
|
-
expect(contacts).toMatchSnapshot();
|
|
18
|
-
});
|
|
19
|
-
describe('`create`', () => {
|
|
20
|
-
it('should invoke `call`', async () => {
|
|
21
|
-
await contacts.create({
|
|
22
|
-
COMMENTS: 'Some comment'
|
|
23
|
-
}, {
|
|
24
|
-
REGISTER_SONET_EVENT: 'Y'
|
|
25
|
-
});
|
|
26
|
-
expect(mockCall.mock.calls).toMatchSnapshot();
|
|
27
|
-
});
|
|
28
|
-
it('should work without optional params', async () => {
|
|
29
|
-
await contacts.create({
|
|
30
|
-
COMMENTS: 'Some comment'
|
|
31
|
-
});
|
|
32
|
-
expect(mockCall.mock.calls).toMatchSnapshot();
|
|
33
|
-
});
|
|
34
|
-
});
|
|
35
|
-
describe('`get`', () => {
|
|
36
|
-
it('should invoke `call`', async () => {
|
|
37
|
-
await contacts.get(ID);
|
|
38
|
-
expect(mockCall.mock.calls).toMatchSnapshot();
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
describe('`list`', () => {
|
|
42
|
-
it('should invoke `list`', async () => {
|
|
43
|
-
await contacts.list({
|
|
44
|
-
start: 0,
|
|
45
|
-
order: { COMMENTS: 'ASC' },
|
|
46
|
-
filter: { '>PROBABILITY': 50 },
|
|
47
|
-
select: ['*', 'UF_*']
|
|
48
|
-
});
|
|
49
|
-
expect(mockList.mock.calls).toMatchSnapshot();
|
|
50
|
-
});
|
|
51
|
-
it('should work without optional params', async () => {
|
|
52
|
-
await contacts.list();
|
|
53
|
-
expect(mockList.mock.calls).toMatchSnapshot();
|
|
54
|
-
});
|
|
55
|
-
});
|
|
56
|
-
describe('`update`', () => {
|
|
57
|
-
it('should invoke `call`', async () => {
|
|
58
|
-
await contacts.update(ID, {
|
|
59
|
-
COMMENTS: 'Some comment'
|
|
60
|
-
}, {
|
|
61
|
-
REGISTER_SONET_EVENT: 'Y'
|
|
62
|
-
});
|
|
63
|
-
expect(mockCall.mock.calls).toMatchSnapshot();
|
|
64
|
-
});
|
|
65
|
-
it('should work without optional params', async () => {
|
|
66
|
-
await contacts.update(ID, {
|
|
67
|
-
COMMENTS: 'Some comment'
|
|
68
|
-
});
|
|
69
|
-
expect(mockCall.mock.calls).toMatchSnapshot();
|
|
70
|
-
});
|
|
71
|
-
});
|
|
72
|
-
});
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { ListParams, Method } from '../../methods';
|
|
2
|
-
import { GetPayload, ListPayload } from '../../payloads';
|
|
3
|
-
import { Fields } from '../common';
|
|
4
|
-
import { Contact } from './entities';
|
|
5
|
-
export declare type ContactsMethods = {
|
|
6
|
-
readonly [Method.CRM_CONTACT_FIELDS]: {
|
|
7
|
-
readonly type: Contact;
|
|
8
|
-
readonly payload: GetPayload<Fields>;
|
|
9
|
-
readonly params?: Record<string, unknown>;
|
|
10
|
-
};
|
|
11
|
-
readonly [Method.CRM_CONTACT_ADD]: {
|
|
12
|
-
readonly type: Contact;
|
|
13
|
-
readonly payload: GetPayload<number>;
|
|
14
|
-
readonly params: {
|
|
15
|
-
readonly fields: Partial<Contact>;
|
|
16
|
-
readonly params?: {
|
|
17
|
-
readonly REGISTER_SONET_EVENT: 'Y' | 'N';
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
readonly [Method.CRM_CONTACT_GET]: {
|
|
22
|
-
readonly type: Contact;
|
|
23
|
-
readonly payload: GetPayload<Contact>;
|
|
24
|
-
readonly params: {
|
|
25
|
-
readonly id: string;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
readonly [Method.CRM_CONTACT_LIST]: {
|
|
29
|
-
readonly type: Contact;
|
|
30
|
-
readonly payload: ListPayload<Contact>;
|
|
31
|
-
readonly params: ListParams;
|
|
32
|
-
};
|
|
33
|
-
readonly [Method.CRM_CONTACT_UPDATE]: {
|
|
34
|
-
readonly type: Contact;
|
|
35
|
-
readonly payload: GetPayload<boolean>;
|
|
36
|
-
readonly params: {
|
|
37
|
-
readonly id: string;
|
|
38
|
-
readonly fields: Record<string, unknown>;
|
|
39
|
-
readonly params?: {
|
|
40
|
-
readonly REGISTER_SONET_EVENT: 'Y' | 'N';
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { BoolString, ISODate, NumberString } from '../common';
|
|
2
|
-
export declare type Currency = {
|
|
3
|
-
readonly CURRENCY: string;
|
|
4
|
-
readonly AMOUNT_CNT: NumberString;
|
|
5
|
-
readonly AMOUNT: NumberString;
|
|
6
|
-
readonly SORT: NumberString;
|
|
7
|
-
readonly BASE: BoolString;
|
|
8
|
-
readonly FULL_NAME: string;
|
|
9
|
-
readonly LID: string;
|
|
10
|
-
readonly FORMAT_STRING: string;
|
|
11
|
-
readonly DEC_POINT: string;
|
|
12
|
-
readonly THOUSANDS_SEP: string;
|
|
13
|
-
readonly DECIMALS: NumberString;
|
|
14
|
-
readonly DATE_UPDATE: ISODate;
|
|
15
|
-
};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { BoolString, ISODate, NumberString } from '../common';
|
|
2
|
-
export declare type Deal = {
|
|
3
|
-
readonly [key: string]: string | null;
|
|
4
|
-
readonly ID: NumberString;
|
|
5
|
-
readonly TITLE: string;
|
|
6
|
-
readonly TYPE_ID: string;
|
|
7
|
-
readonly STAGE_ID: string;
|
|
8
|
-
readonly PROBABILITY: NumberString | null;
|
|
9
|
-
readonly CURRENCY_ID: string;
|
|
10
|
-
readonly OPPORTUNITY: NumberString;
|
|
11
|
-
readonly TAX_VALUE: NumberString;
|
|
12
|
-
readonly LEAD_ID: NumberString;
|
|
13
|
-
readonly COMPANY_ID: NumberString;
|
|
14
|
-
readonly CONTACT_ID: NumberString | null;
|
|
15
|
-
readonly QUOTE_ID: NumberString | null;
|
|
16
|
-
readonly BEGINDATE: ISODate;
|
|
17
|
-
readonly CLOSEDATE: ISODate;
|
|
18
|
-
readonly ASSIGNED_BY_ID: NumberString;
|
|
19
|
-
readonly CREATED_BY_ID: NumberString;
|
|
20
|
-
readonly MODIFY_BY_ID: NumberString;
|
|
21
|
-
readonly DATE_CREATE: ISODate;
|
|
22
|
-
readonly DATE_MODIFY: ISODate;
|
|
23
|
-
readonly OPENED: BoolString;
|
|
24
|
-
readonly CLOSED: BoolString;
|
|
25
|
-
readonly COMMENTS: string;
|
|
26
|
-
readonly ADDITIONAL_INFO: NumberString | null;
|
|
27
|
-
readonly LOCATION_ID: NumberString | null;
|
|
28
|
-
readonly CATEGORY_ID: NumberString;
|
|
29
|
-
readonly STAGE_SEMANTIC_ID: NumberString;
|
|
30
|
-
readonly IS_NEW: BoolString;
|
|
31
|
-
readonly IS_RECURRING: BoolString;
|
|
32
|
-
readonly IS_RETURN_CUSTOMER: BoolString;
|
|
33
|
-
readonly IS_REPEATED_APPROACH: BoolString;
|
|
34
|
-
readonly SOURCE_ID: NumberString | null;
|
|
35
|
-
readonly SOURCE_DESCRIPTION: string | null;
|
|
36
|
-
readonly ORIGINATOR_ID: string;
|
|
37
|
-
readonly ORIGIN_ID: NumberString;
|
|
38
|
-
readonly UTM_SOURCE: string | null;
|
|
39
|
-
readonly UTM_MEDIUM: string | null;
|
|
40
|
-
readonly UTM_CAMPAIGN: string | null;
|
|
41
|
-
readonly UTM_CONTENT: string | null;
|
|
42
|
-
readonly UTM_TERM: string | null;
|
|
43
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Call } from '../../client/methods/call';
|
|
2
|
-
import { List } from '../../client/methods/list';
|
|
3
|
-
import { Method, MethodParams } from '../../methods';
|
|
4
|
-
declare type Dependencies = {
|
|
5
|
-
readonly call: Call;
|
|
6
|
-
readonly list: List;
|
|
7
|
-
};
|
|
8
|
-
declare const _default: ({ call, list }: Dependencies) => {
|
|
9
|
-
fields: () => Promise<import("../../payloads").GetPayload<import("../common").Fields>>;
|
|
10
|
-
create: <D extends {
|
|
11
|
-
readonly fields: Partial<import("./entities").Deal>;
|
|
12
|
-
readonly params?: {
|
|
13
|
-
readonly REGISTER_SONET_EVENT: "Y" | "N";
|
|
14
|
-
} | undefined;
|
|
15
|
-
}>(fields: D["fields"], params?: D["params"] | undefined) => Promise<import("../../payloads").GetPayload<number>>;
|
|
16
|
-
get: (id: string) => Promise<import("../../payloads").GetPayload<import("./entities").Deal>>;
|
|
17
|
-
list: (params?: MethodParams<Method.CRM_DEAL_LIST>) => Promise<import("../../payloads").ListPayload<import("./entities").Deal>>;
|
|
18
|
-
update: <D_1 extends {
|
|
19
|
-
readonly id: string;
|
|
20
|
-
readonly fields: Record<string, unknown>;
|
|
21
|
-
readonly params?: {
|
|
22
|
-
readonly REGISTER_SONET_EVENT: "Y" | "N";
|
|
23
|
-
} | undefined;
|
|
24
|
-
}>(id: string, fields: D_1["fields"], params?: D_1["params"] | undefined) => Promise<import("../../payloads").GetPayload<boolean>>;
|
|
25
|
-
};
|
|
26
|
-
export default _default;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const bitrix_1 = __importDefault(require("./../../bitrix"));
|
|
7
|
-
const WEBHOOK_URL = process.env['WEBHOOK_URL'];
|
|
8
|
-
if (!WEBHOOK_URL) {
|
|
9
|
-
throw Error('Integration tests require environmental variable `WEBHOOK_URL` to be set');
|
|
10
|
-
}
|
|
11
|
-
const { deals } = (0, bitrix_1.default)(WEBHOOK_URL);
|
|
12
|
-
describe('Deals', () => {
|
|
13
|
-
describe('fields', () => {
|
|
14
|
-
it('should get all fields', async () => {
|
|
15
|
-
const { result } = await deals.fields();
|
|
16
|
-
expect(result).toMatchSnapshot();
|
|
17
|
-
});
|
|
18
|
-
});
|
|
19
|
-
});
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const methods_1 = require("../../methods");
|
|
4
|
-
exports.default = ({ call, list }) => ({
|
|
5
|
-
fields: () => call(methods_1.Method.CRM_DEAL_FIELDS, {}),
|
|
6
|
-
create: (fields, params) => call(methods_1.Method.CRM_DEAL_ADD, { fields, params }),
|
|
7
|
-
get: (id) => call(methods_1.Method.CRM_DEAL_GET, { id }),
|
|
8
|
-
list: (params = {}) => list(methods_1.Method.CRM_DEAL_LIST, params),
|
|
9
|
-
update: (id, fields, params) => call(methods_1.Method.CRM_DEAL_UPDATE, { id, fields, params })
|
|
10
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|