@2bad/bitrix 2.4.0 → 2.5.1
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/LICENSE +0 -0
- package/README.md +54 -49
- package/build/main/bitrix.d.ts +10 -2
- package/build/main/bitrix.integration.test.d.ts +0 -0
- package/build/main/bitrix.integration.test.js +31 -0
- package/build/main/bitrix.js +24 -10
- package/build/main/bitrix.unit.test.d.ts +1 -0
- package/build/main/bitrix.unit.test.js +44 -0
- package/build/main/client/client.unit.test.d.ts +1 -0
- package/build/main/client/client.unit.test.js +70 -0
- package/build/main/client/hooks/addAccessToken.d.ts +4 -1
- package/build/main/client/hooks/addAccessToken.js +3 -1
- package/build/main/client/hooks/addAccessToken.unit.test.d.ts +1 -0
- package/build/main/client/hooks/addAccessToken.unit.test.js +31 -0
- package/build/main/client/index.d.ts +9 -1
- package/build/main/client/index.js +17 -6
- package/build/main/client/methods/batch.d.ts +19 -0
- package/build/main/client/methods/batch.js +35 -10
- package/build/main/client/methods/batch.unit.test.d.ts +1 -0
- package/build/main/client/methods/batch.unit.test.js +494 -0
- package/build/main/client/methods/call.d.ts +7 -0
- package/build/main/client/methods/call.js +11 -4
- package/build/main/client/methods/call.unit.test.d.ts +1 -0
- package/build/main/client/methods/call.unit.test.js +183 -0
- package/build/main/client/methods/list.d.ts +12 -0
- package/build/main/client/methods/list.js +23 -7
- package/build/main/client/methods/list.unit.test.d.ts +1 -0
- package/build/main/client/methods/list.unit.test.js +277 -0
- package/build/main/commands.js +0 -1
- package/build/main/methods.d.ts +19 -0
- package/build/main/methods.js +0 -1
- package/build/main/payloads.js +0 -1
- package/build/main/services/common.d.ts +1 -0
- package/build/main/services/common.js +0 -1
- package/build/main/services/companies/entities.js +0 -1
- package/build/main/services/companies/index.integration.test.d.ts +1 -0
- package/build/main/services/companies/index.integration.test.js +19 -0
- package/build/main/services/companies/index.js +0 -1
- package/build/main/services/companies/index.unit.test.d.ts +1 -0
- package/build/main/services/companies/index.unit.test.js +72 -0
- package/build/main/services/companies/methods.js +0 -1
- package/build/main/services/contacts/entities.d.ts +2 -2
- package/build/main/services/contacts/entities.js +0 -1
- package/build/main/services/contacts/index.integration.test.d.ts +1 -0
- package/build/main/services/contacts/index.integration.test.js +19 -0
- package/build/main/services/contacts/index.js +0 -1
- package/build/main/services/contacts/index.unit.test.d.ts +1 -0
- package/build/main/services/contacts/index.unit.test.js +72 -0
- package/build/main/services/contacts/methods.js +0 -1
- package/build/main/services/currencies/entities.js +0 -1
- package/build/main/services/deals/entities.js +0 -1
- package/build/main/services/deals/index.integration.test.d.ts +1 -0
- package/build/main/services/deals/index.integration.test.js +19 -0
- package/build/main/services/deals/index.js +0 -1
- package/build/main/services/deals/index.unit.test.d.ts +1 -0
- package/build/main/services/deals/index.unit.test.js +72 -0
- package/build/main/services/deals/methods.js +0 -1
- package/build/main/services/leads/entities.js +0 -1
- package/build/main/services/leads/index.integration.test.d.ts +1 -0
- package/build/main/services/leads/index.integration.test.js +19 -0
- package/build/main/services/leads/index.js +0 -1
- package/build/main/services/leads/index.unit.test.d.ts +1 -0
- package/build/main/services/leads/index.unit.test.js +72 -0
- package/build/main/services/leads/methods.js +0 -1
- package/build/main/services/statuses/entities.js +0 -1
- package/build/main/services/statuses/index.integration.test.d.ts +1 -0
- package/build/main/services/statuses/index.integration.test.js +90 -0
- package/build/main/services/statuses/index.js +0 -1
- package/build/main/services/statuses/index.unit.test.d.ts +1 -0
- package/build/main/services/statuses/index.unit.test.js +60 -0
- package/build/main/services/statuses/methods.js +0 -1
- package/build/main/services/users/entities.js +0 -1
- package/build/main/services/users/index.d.ts +1 -1
- package/build/main/services/users/index.integration.test.d.ts +1 -0
- package/build/main/services/users/index.integration.test.js +33 -0
- package/build/main/services/users/index.js +0 -1
- package/build/main/services/users/index.unit.test.d.ts +1 -0
- package/build/main/services/users/index.unit.test.js +25 -0
- package/build/main/services/users/methods.js +0 -1
- package/build/main/utils/Diff.js +0 -1
- package/build/main/utils/ExtractValue.d.ts +5 -0
- package/build/main/utils/ExtractValue.js +0 -1
- package/build/main/utils/isArray.js +1 -1
- package/build/module/bitrix.d.ts +10 -2
- package/build/module/bitrix.integration.test.d.ts +0 -0
- package/build/module/bitrix.integration.test.js +31 -0
- package/build/module/bitrix.js +10 -2
- package/build/module/bitrix.unit.test.d.ts +1 -0
- package/build/module/bitrix.unit.test.js +16 -0
- package/build/module/client/client.unit.test.d.ts +1 -0
- package/build/module/client/client.unit.test.js +65 -0
- package/build/module/client/hooks/addAccessToken.d.ts +4 -1
- package/build/module/client/hooks/addAccessToken.js +3 -1
- package/build/module/client/hooks/addAccessToken.unit.test.d.ts +1 -0
- package/build/module/client/hooks/addAccessToken.unit.test.js +26 -0
- package/build/module/client/index.d.ts +9 -1
- package/build/module/client/index.js +14 -3
- package/build/module/client/methods/batch.d.ts +19 -0
- package/build/module/client/methods/batch.js +26 -1
- package/build/module/client/methods/batch.unit.test.d.ts +1 -0
- package/build/module/client/methods/batch.unit.test.js +466 -0
- package/build/module/client/methods/call.d.ts +7 -0
- package/build/module/client/methods/call.js +9 -3
- package/build/module/client/methods/call.unit.test.d.ts +1 -0
- package/build/module/client/methods/call.unit.test.js +155 -0
- package/build/module/client/methods/list.d.ts +12 -0
- package/build/module/client/methods/list.js +20 -6
- package/build/module/client/methods/list.unit.test.d.ts +1 -0
- package/build/module/client/methods/list.unit.test.js +252 -0
- package/build/module/commands.js +0 -1
- package/build/module/methods.d.ts +19 -0
- package/build/module/methods.js +0 -1
- package/build/module/payloads.js +0 -1
- package/build/module/services/common.d.ts +1 -0
- package/build/module/services/common.js +0 -1
- package/build/module/services/companies/entities.js +0 -1
- package/build/module/services/companies/index.integration.test.d.ts +1 -0
- package/build/module/services/companies/index.integration.test.js +14 -0
- package/build/module/services/companies/index.js +0 -1
- package/build/module/services/companies/index.unit.test.d.ts +1 -0
- package/build/module/services/companies/index.unit.test.js +67 -0
- package/build/module/services/companies/methods.js +0 -1
- package/build/module/services/contacts/entities.d.ts +2 -2
- package/build/module/services/contacts/entities.js +0 -1
- package/build/module/services/contacts/index.integration.test.d.ts +1 -0
- package/build/module/services/contacts/index.integration.test.js +14 -0
- package/build/module/services/contacts/index.js +0 -1
- package/build/module/services/contacts/index.unit.test.d.ts +1 -0
- package/build/module/services/contacts/index.unit.test.js +67 -0
- 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.integration.test.d.ts +1 -0
- package/build/module/services/deals/index.integration.test.js +14 -0
- package/build/module/services/deals/index.js +0 -1
- package/build/module/services/deals/index.unit.test.d.ts +1 -0
- package/build/module/services/deals/index.unit.test.js +67 -0
- package/build/module/services/deals/methods.js +0 -1
- package/build/module/services/leads/entities.js +0 -1
- package/build/module/services/leads/index.integration.test.d.ts +1 -0
- package/build/module/services/leads/index.integration.test.js +14 -0
- package/build/module/services/leads/index.js +0 -1
- package/build/module/services/leads/index.unit.test.d.ts +1 -0
- package/build/module/services/leads/index.unit.test.js +67 -0
- package/build/module/services/leads/methods.js +0 -1
- package/build/module/services/statuses/entities.js +0 -1
- package/build/module/services/statuses/index.integration.test.d.ts +1 -0
- package/build/module/services/statuses/index.integration.test.js +85 -0
- package/build/module/services/statuses/index.js +0 -1
- package/build/module/services/statuses/index.unit.test.d.ts +1 -0
- package/build/module/services/statuses/index.unit.test.js +55 -0
- 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 +1 -1
- package/build/module/services/users/index.integration.test.d.ts +1 -0
- package/build/module/services/users/index.integration.test.js +28 -0
- package/build/module/services/users/index.js +0 -1
- package/build/module/services/users/index.unit.test.d.ts +1 -0
- package/build/module/services/users/index.unit.test.js +20 -0
- package/build/module/services/users/methods.js +0 -1
- package/build/module/utils/Diff.js +0 -1
- package/build/module/utils/ExtractValue.d.ts +5 -0
- package/build/module/utils/ExtractValue.js +0 -1
- package/build/module/utils/isArray.js +1 -1
- package/package.json +21 -22
- package/build/main/bitrix.js.map +0 -1
- package/build/main/client/hooks/addAccessToken.js.map +0 -1
- package/build/main/client/index.js.map +0 -1
- package/build/main/client/methods/batch.js.map +0 -1
- package/build/main/client/methods/call.js.map +0 -1
- package/build/main/client/methods/list.js.map +0 -1
- package/build/main/commands.js.map +0 -1
- package/build/main/methods.js.map +0 -1
- package/build/main/payloads.js.map +0 -1
- package/build/main/services/common.js.map +0 -1
- package/build/main/services/companies/entities.js.map +0 -1
- package/build/main/services/companies/index.js.map +0 -1
- package/build/main/services/companies/methods.js.map +0 -1
- package/build/main/services/contacts/entities.js.map +0 -1
- package/build/main/services/contacts/index.js.map +0 -1
- package/build/main/services/contacts/methods.js.map +0 -1
- package/build/main/services/currencies/entities.js.map +0 -1
- package/build/main/services/deals/entities.js.map +0 -1
- package/build/main/services/deals/index.js.map +0 -1
- package/build/main/services/deals/methods.js.map +0 -1
- package/build/main/services/leads/entities.js.map +0 -1
- package/build/main/services/leads/index.js.map +0 -1
- package/build/main/services/leads/methods.js.map +0 -1
- package/build/main/services/statuses/entities.js.map +0 -1
- package/build/main/services/statuses/index.js.map +0 -1
- package/build/main/services/statuses/methods.js.map +0 -1
- package/build/main/services/users/entities.js.map +0 -1
- package/build/main/services/users/index.js.map +0 -1
- package/build/main/services/users/methods.js.map +0 -1
- package/build/main/utils/Diff.js.map +0 -1
- package/build/main/utils/ExtractValue.js.map +0 -1
- package/build/main/utils/isArray.js.map +0 -1
- package/build/module/bitrix.js.map +0 -1
- package/build/module/client/hooks/addAccessToken.js.map +0 -1
- package/build/module/client/index.js.map +0 -1
- package/build/module/client/methods/batch.js.map +0 -1
- package/build/module/client/methods/call.js.map +0 -1
- package/build/module/client/methods/list.js.map +0 -1
- package/build/module/commands.js.map +0 -1
- package/build/module/methods.js.map +0 -1
- package/build/module/payloads.js.map +0 -1
- package/build/module/services/common.js.map +0 -1
- package/build/module/services/companies/entities.js.map +0 -1
- package/build/module/services/companies/index.js.map +0 -1
- package/build/module/services/companies/methods.js.map +0 -1
- package/build/module/services/contacts/entities.js.map +0 -1
- package/build/module/services/contacts/index.js.map +0 -1
- package/build/module/services/contacts/methods.js.map +0 -1
- package/build/module/services/currencies/entities.js.map +0 -1
- package/build/module/services/deals/entities.js.map +0 -1
- package/build/module/services/deals/index.js.map +0 -1
- package/build/module/services/deals/methods.js.map +0 -1
- package/build/module/services/leads/entities.js.map +0 -1
- package/build/module/services/leads/index.js.map +0 -1
- package/build/module/services/leads/methods.js.map +0 -1
- package/build/module/services/statuses/entities.js.map +0 -1
- package/build/module/services/statuses/index.js.map +0 -1
- package/build/module/services/statuses/methods.js.map +0 -1
- package/build/module/services/users/entities.js.map +0 -1
- package/build/module/services/users/index.js.map +0 -1
- package/build/module/services/users/methods.js.map +0 -1
- package/build/module/utils/Diff.js.map +0 -1
- package/build/module/utils/ExtractValue.js.map +0 -1
- package/build/module/utils/isArray.js.map +0 -1
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import Deals from '.';
|
|
2
|
+
const mockCall = jest.fn(() => Promise.resolve());
|
|
3
|
+
const mockList = jest.fn(() => Promise.resolve());
|
|
4
|
+
const deals = Deals({ call: mockCall, list: mockList });
|
|
5
|
+
const ID = '77';
|
|
6
|
+
describe('Deals', () => {
|
|
7
|
+
beforeEach(() => {
|
|
8
|
+
mockCall.mockClear();
|
|
9
|
+
mockList.mockClear();
|
|
10
|
+
});
|
|
11
|
+
it('should expose API methods', () => {
|
|
12
|
+
expect(deals).toMatchSnapshot();
|
|
13
|
+
});
|
|
14
|
+
describe('`create`', () => {
|
|
15
|
+
it('should invoke `call`', async () => {
|
|
16
|
+
await deals.create({
|
|
17
|
+
COMMENTS: 'Some comment'
|
|
18
|
+
}, {
|
|
19
|
+
REGISTER_SONET_EVENT: 'Y'
|
|
20
|
+
});
|
|
21
|
+
expect(mockCall.mock.calls).toMatchSnapshot();
|
|
22
|
+
});
|
|
23
|
+
it('should work without optional params', async () => {
|
|
24
|
+
await deals.create({
|
|
25
|
+
COMMENTS: 'Some comment'
|
|
26
|
+
});
|
|
27
|
+
expect(mockCall.mock.calls).toMatchSnapshot();
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
describe('`get`', () => {
|
|
31
|
+
it('should invoke `call`', async () => {
|
|
32
|
+
await deals.get(ID);
|
|
33
|
+
expect(mockCall.mock.calls).toMatchSnapshot();
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
describe('`list`', () => {
|
|
37
|
+
it('should invoke `list`', async () => {
|
|
38
|
+
await deals.list({
|
|
39
|
+
start: 0,
|
|
40
|
+
order: { COMMENTS: 'ASC' },
|
|
41
|
+
filter: { '>PROBABILITY': 50 },
|
|
42
|
+
select: ['*', 'UF_*']
|
|
43
|
+
});
|
|
44
|
+
expect(mockList.mock.calls).toMatchSnapshot();
|
|
45
|
+
});
|
|
46
|
+
it('should work without optional params', async () => {
|
|
47
|
+
await deals.list();
|
|
48
|
+
expect(mockList.mock.calls).toMatchSnapshot();
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
describe('`update`', () => {
|
|
52
|
+
it('should invoke `call`', async () => {
|
|
53
|
+
await deals.update(ID, {
|
|
54
|
+
COMMENTS: 'Some comment'
|
|
55
|
+
}, {
|
|
56
|
+
REGISTER_SONET_EVENT: 'Y'
|
|
57
|
+
});
|
|
58
|
+
expect(mockCall.mock.calls).toMatchSnapshot();
|
|
59
|
+
});
|
|
60
|
+
it('should work without optional params', async () => {
|
|
61
|
+
await deals.update(ID, {
|
|
62
|
+
COMMENTS: 'Some comment'
|
|
63
|
+
});
|
|
64
|
+
expect(mockCall.mock.calls).toMatchSnapshot();
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import Bitrix from './../../bitrix';
|
|
2
|
+
const WEBHOOK_URL = process.env['WEBHOOK_URL'];
|
|
3
|
+
if (!WEBHOOK_URL) {
|
|
4
|
+
throw Error('Integration tests require environmental variable `WEBHOOK_URL` to be set');
|
|
5
|
+
}
|
|
6
|
+
const { leads } = Bitrix(WEBHOOK_URL);
|
|
7
|
+
describe('Leads', () => {
|
|
8
|
+
describe('fields', () => {
|
|
9
|
+
it('should get all fields', async () => {
|
|
10
|
+
const { result } = await leads.fields();
|
|
11
|
+
expect(result).toMatchSnapshot();
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import Leads from '.';
|
|
2
|
+
const mockCall = jest.fn(() => Promise.resolve());
|
|
3
|
+
const mockList = jest.fn(() => Promise.resolve());
|
|
4
|
+
const leads = Leads({ call: mockCall, list: mockList });
|
|
5
|
+
const ID = '77';
|
|
6
|
+
describe('Leads', () => {
|
|
7
|
+
beforeEach(() => {
|
|
8
|
+
mockCall.mockClear();
|
|
9
|
+
mockList.mockClear();
|
|
10
|
+
});
|
|
11
|
+
it('should expose API methods', () => {
|
|
12
|
+
expect(leads).toMatchSnapshot();
|
|
13
|
+
});
|
|
14
|
+
describe('`create`', () => {
|
|
15
|
+
it('should invoke `call`', async () => {
|
|
16
|
+
await leads.create({
|
|
17
|
+
COMMENTS: 'Some comment'
|
|
18
|
+
}, {
|
|
19
|
+
REGISTER_SONET_EVENT: 'Y'
|
|
20
|
+
});
|
|
21
|
+
expect(mockCall.mock.calls).toMatchSnapshot();
|
|
22
|
+
});
|
|
23
|
+
it('should work without optional params', async () => {
|
|
24
|
+
await leads.create({
|
|
25
|
+
COMMENTS: 'Some comment'
|
|
26
|
+
});
|
|
27
|
+
expect(mockCall.mock.calls).toMatchSnapshot();
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
describe('`get`', () => {
|
|
31
|
+
it('should invoke `call`', async () => {
|
|
32
|
+
await leads.get(ID);
|
|
33
|
+
expect(mockCall.mock.calls).toMatchSnapshot();
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
describe('`list`', () => {
|
|
37
|
+
it('should invoke `list`', async () => {
|
|
38
|
+
await leads.list({
|
|
39
|
+
start: 0,
|
|
40
|
+
order: { COMMENTS: 'ASC' },
|
|
41
|
+
filter: { '>PROBABILITY': 50 },
|
|
42
|
+
select: ['*', 'UF_*']
|
|
43
|
+
});
|
|
44
|
+
expect(mockList.mock.calls).toMatchSnapshot();
|
|
45
|
+
});
|
|
46
|
+
it('should work without optional params', async () => {
|
|
47
|
+
await leads.list();
|
|
48
|
+
expect(mockList.mock.calls).toMatchSnapshot();
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
describe('`update`', () => {
|
|
52
|
+
it('should invoke `call`', async () => {
|
|
53
|
+
await leads.update(ID, {
|
|
54
|
+
COMMENTS: 'Some comment'
|
|
55
|
+
}, {
|
|
56
|
+
REGISTER_SONET_EVENT: 'Y'
|
|
57
|
+
});
|
|
58
|
+
expect(mockCall.mock.calls).toMatchSnapshot();
|
|
59
|
+
});
|
|
60
|
+
it('should work without optional params', async () => {
|
|
61
|
+
await leads.update(ID, {
|
|
62
|
+
COMMENTS: 'Some comment'
|
|
63
|
+
});
|
|
64
|
+
expect(mockCall.mock.calls).toMatchSnapshot();
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import Bitrix from '../../bitrix';
|
|
2
|
+
// @ts-ignore this should be improved in a future but it works for now
|
|
3
|
+
const isSortedAsc = (arr) => arr.slice(1).every((v, i) => arr[i] <= v);
|
|
4
|
+
// @ts-ignore this should be improved in a future but it works for now
|
|
5
|
+
const isSortedDesc = (arr) => arr.slice(1).every((v, i) => arr[i] >= v);
|
|
6
|
+
const WEBHOOK_URL = process.env['WEBHOOK_URL'];
|
|
7
|
+
if (!WEBHOOK_URL) {
|
|
8
|
+
throw Error('Integration tests require environmental variable `WEBHOOK_URL` to be set');
|
|
9
|
+
}
|
|
10
|
+
const { statuses } = Bitrix(WEBHOOK_URL);
|
|
11
|
+
describe('Statuses', () => {
|
|
12
|
+
describe('fields', () => {
|
|
13
|
+
it('should get all fields', async () => {
|
|
14
|
+
const { result } = await statuses.fields();
|
|
15
|
+
expect(result).toMatchSnapshot();
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
describe('list', () => {
|
|
19
|
+
it('should get all entries without optional parameters', async () => {
|
|
20
|
+
const { result } = await statuses.list();
|
|
21
|
+
expect(result).toMatchSnapshot();
|
|
22
|
+
});
|
|
23
|
+
it('should return only entries with ENTITY_ID = STATUS sorted in ascending order', async () => {
|
|
24
|
+
const { result } = await statuses.list({
|
|
25
|
+
order: { SORT: 'ASC' },
|
|
26
|
+
filter: { ENTITY_ID: 'STATUS' }
|
|
27
|
+
});
|
|
28
|
+
expect(result.every((s) => s.ENTITY_ID === 'STATUS')).toBeTruthy();
|
|
29
|
+
expect(isSortedAsc(result.map((s) => s.SORT))).toBeTruthy();
|
|
30
|
+
expect(result).toMatchSnapshot();
|
|
31
|
+
});
|
|
32
|
+
it('should return only entries with ENTITY_ID = STATUS sorted in descending order', async () => {
|
|
33
|
+
const { result } = await statuses.list({
|
|
34
|
+
order: { SORT: 'DESC' },
|
|
35
|
+
filter: { ENTITY_ID: 'STATUS' }
|
|
36
|
+
});
|
|
37
|
+
expect(result.every((s) => s.ENTITY_ID === 'STATUS')).toBeTruthy();
|
|
38
|
+
expect(isSortedDesc(result.map((s) => s.SORT))).toBeTruthy();
|
|
39
|
+
expect(result).toMatchSnapshot();
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
describe('get', () => {
|
|
43
|
+
it('should get entry with ID = 1', async () => {
|
|
44
|
+
const { result } = await statuses.get('1');
|
|
45
|
+
expect(result).toMatchSnapshot();
|
|
46
|
+
});
|
|
47
|
+
it('should return an error in case non existent ID is requested', async () => {
|
|
48
|
+
const get = statuses.get('1001');
|
|
49
|
+
await expect(get).rejects.toThrow(Error);
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
describe('create', () => {
|
|
53
|
+
it('should create an entry', async () => {
|
|
54
|
+
const entry = {
|
|
55
|
+
ENTITY_ID: 'STATUS',
|
|
56
|
+
STATUS_ID: 'TEST',
|
|
57
|
+
NAME: 'TEST'
|
|
58
|
+
};
|
|
59
|
+
const { result: id } = await statuses.create(entry);
|
|
60
|
+
expect(id).toBeGreaterThan(0);
|
|
61
|
+
const { result: status } = await statuses.get(id);
|
|
62
|
+
expect(status).toMatchSnapshot({
|
|
63
|
+
ID: expect.any(String)
|
|
64
|
+
});
|
|
65
|
+
const { result: deleteResult } = await statuses.delete(id);
|
|
66
|
+
expect(deleteResult).toBeTruthy();
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
describe('update', () => {
|
|
70
|
+
it('should update an entry', async () => {
|
|
71
|
+
const STATUS_ID = 101;
|
|
72
|
+
const { result: status } = await statuses.get(STATUS_ID);
|
|
73
|
+
expect(status).toMatchSnapshot();
|
|
74
|
+
const { result: updateResult } = await statuses.update(STATUS_ID, {
|
|
75
|
+
...status,
|
|
76
|
+
NAME: 'CHANGED'
|
|
77
|
+
});
|
|
78
|
+
expect(updateResult).toBeTruthy();
|
|
79
|
+
const { result: updatedStatus } = await statuses.get(STATUS_ID);
|
|
80
|
+
expect(updatedStatus).toMatchSnapshot();
|
|
81
|
+
const { result: rollbackResult } = await statuses.update(STATUS_ID, status);
|
|
82
|
+
expect(rollbackResult).toBeTruthy();
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import Statuses from '.';
|
|
2
|
+
const mockCall = jest.fn(() => Promise.resolve());
|
|
3
|
+
const mockList = jest.fn(() => Promise.resolve());
|
|
4
|
+
const statuses = Statuses({ call: mockCall });
|
|
5
|
+
const ID = '77';
|
|
6
|
+
describe('Statuses', () => {
|
|
7
|
+
beforeEach(() => {
|
|
8
|
+
mockCall.mockClear();
|
|
9
|
+
mockList.mockClear();
|
|
10
|
+
});
|
|
11
|
+
it('should expose API methods', () => {
|
|
12
|
+
expect(statuses).toMatchSnapshot();
|
|
13
|
+
});
|
|
14
|
+
describe('`create`', () => {
|
|
15
|
+
it('should invoke `call`', async () => {
|
|
16
|
+
await statuses.create({
|
|
17
|
+
NAME: 'Test name'
|
|
18
|
+
});
|
|
19
|
+
expect(mockCall.mock.calls).toMatchSnapshot();
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
describe('`get`', () => {
|
|
23
|
+
it('should invoke `call`', async () => {
|
|
24
|
+
await statuses.get(ID);
|
|
25
|
+
expect(mockCall.mock.calls).toMatchSnapshot();
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
describe('`list`', () => {
|
|
29
|
+
it('should invoke `call`', async () => {
|
|
30
|
+
await statuses.list({
|
|
31
|
+
order: { NAME: 'ASC' },
|
|
32
|
+
filter: { ENTITY_ID: 'STATUS' }
|
|
33
|
+
});
|
|
34
|
+
expect(mockCall.mock.calls).toMatchSnapshot();
|
|
35
|
+
});
|
|
36
|
+
it('should work without optional params', async () => {
|
|
37
|
+
await statuses.list();
|
|
38
|
+
expect(mockCall.mock.calls).toMatchSnapshot();
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
describe('`update`', () => {
|
|
42
|
+
it('should invoke `call`', async () => {
|
|
43
|
+
await statuses.update(ID, {
|
|
44
|
+
NAME: 'Test name'
|
|
45
|
+
});
|
|
46
|
+
expect(mockCall.mock.calls).toMatchSnapshot();
|
|
47
|
+
});
|
|
48
|
+
it('should work without optional params', async () => {
|
|
49
|
+
await statuses.update(ID, {
|
|
50
|
+
NAME: 'Test name'
|
|
51
|
+
});
|
|
52
|
+
expect(mockCall.mock.calls).toMatchSnapshot();
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
});
|
|
@@ -4,6 +4,6 @@ declare type Dependencies = {
|
|
|
4
4
|
};
|
|
5
5
|
declare const _default: ({ call }: Dependencies) => {
|
|
6
6
|
fields: () => Promise<import("../../payloads").GetPayload<import("./entities").User>>;
|
|
7
|
-
get: (id?: string
|
|
7
|
+
get: (id?: string) => Promise<import("../../payloads").GetPayload<readonly import("./entities").User[]>>;
|
|
8
8
|
};
|
|
9
9
|
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import Bitrix from './../../bitrix';
|
|
2
|
+
const WEBHOOK_URL = process.env['WEBHOOK_URL'];
|
|
3
|
+
if (!WEBHOOK_URL) {
|
|
4
|
+
throw Error('Integration tests require environmental variable `WEBHOOK_URL` to be set');
|
|
5
|
+
}
|
|
6
|
+
const { users } = Bitrix(WEBHOOK_URL);
|
|
7
|
+
describe('Users', () => {
|
|
8
|
+
describe('fields', () => {
|
|
9
|
+
it('should get all fields', async () => {
|
|
10
|
+
const { result } = await users.fields();
|
|
11
|
+
expect(result).toMatchSnapshot();
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
describe('get', () => {
|
|
15
|
+
it('should get all users', async () => {
|
|
16
|
+
const { result } = await users.get();
|
|
17
|
+
expect(result).toMatchSnapshot();
|
|
18
|
+
});
|
|
19
|
+
it('should get entry with ID = 1', async () => {
|
|
20
|
+
const { result } = await users.get('1');
|
|
21
|
+
expect(result).toMatchSnapshot();
|
|
22
|
+
});
|
|
23
|
+
it('should return an error in case non existent ID is requested', async () => {
|
|
24
|
+
const { result } = await users.get('1001');
|
|
25
|
+
expect(result).toEqual([]);
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import Users from '.';
|
|
2
|
+
const mockCall = jest.fn(() => Promise.resolve());
|
|
3
|
+
const mockList = jest.fn(() => Promise.resolve());
|
|
4
|
+
const users = Users({ call: mockCall });
|
|
5
|
+
const ID = '77';
|
|
6
|
+
describe('Users', () => {
|
|
7
|
+
beforeEach(() => {
|
|
8
|
+
mockCall.mockClear();
|
|
9
|
+
mockList.mockClear();
|
|
10
|
+
});
|
|
11
|
+
it('should expose API methods', () => {
|
|
12
|
+
expect(users).toMatchSnapshot();
|
|
13
|
+
});
|
|
14
|
+
describe('`get`', () => {
|
|
15
|
+
it('should invoke `call`', async () => {
|
|
16
|
+
await users.get(ID);
|
|
17
|
+
expect(mockCall.mock.calls).toMatchSnapshot();
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
});
|
|
@@ -1 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extract value from the `MAP` following the `KEY`
|
|
3
|
+
* It works with `enum` as a `KEY` when matched against dict as `enum` values as a keys,
|
|
4
|
+
* which justifies whole existence of that helper.
|
|
5
|
+
*/
|
|
1
6
|
export declare type ExtractValue<MAP extends Record<string, unknown>, KEY extends string | number | symbol, MAPKEY extends keyof MAP = KEY extends keyof MAP ? KEY : never> = MAP[MAPKEY];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@2bad/bitrix",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.1",
|
|
4
4
|
"description": "Bitrix24 REST API client that doesn't suck",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"api",
|
|
@@ -32,20 +32,21 @@
|
|
|
32
32
|
"scripts": {
|
|
33
33
|
"build": "run-s clean && run-p build:*",
|
|
34
34
|
"build:main": "tsc --project tsconfig.main.json",
|
|
35
|
-
"build:main:watch": "run-s \"build:main -- --watch\"",
|
|
36
35
|
"build:module": "tsc --project tsconfig.json",
|
|
37
36
|
"clean": "rimraf build",
|
|
38
37
|
"lint": "eslint . --ext .ts",
|
|
39
38
|
"lint:fix": "run-s \"lint -- --fix\"",
|
|
40
39
|
"prepublishOnly": "run-s clean build",
|
|
41
|
-
"test": "jest
|
|
40
|
+
"test": "jest --coverage",
|
|
42
41
|
"test:integration": "jest integration --coverage",
|
|
43
|
-
"test:integration:watch": "jest integration --watch",
|
|
44
42
|
"test:unit": "jest unit --coverage",
|
|
45
|
-
"
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
"
|
|
43
|
+
"preversion": "run-s clean lint test:unit build"
|
|
44
|
+
},
|
|
45
|
+
"prettier": {
|
|
46
|
+
"printWidth": 100,
|
|
47
|
+
"semi": false,
|
|
48
|
+
"singleQuote": true,
|
|
49
|
+
"trailingComma": "none"
|
|
49
50
|
},
|
|
50
51
|
"jest": {
|
|
51
52
|
"collectCoverageFrom": [
|
|
@@ -65,23 +66,24 @@
|
|
|
65
66
|
]
|
|
66
67
|
},
|
|
67
68
|
"dependencies": {
|
|
68
|
-
"@types/lodash.chunk": "4.2.
|
|
69
|
-
"@types/lodash.frompairs": "4.0.
|
|
70
|
-
"@types/lodash.range": "3.2.
|
|
71
|
-
"@types/qs": "6.9.
|
|
69
|
+
"@types/lodash.chunk": "4.2.7",
|
|
70
|
+
"@types/lodash.frompairs": "4.0.7",
|
|
71
|
+
"@types/lodash.range": "3.2.7",
|
|
72
|
+
"@types/qs": "6.9.7",
|
|
72
73
|
"got": "11.8.2",
|
|
73
74
|
"lodash.chunk": "4.2.0",
|
|
74
75
|
"lodash.frompairs": "4.0.1",
|
|
75
76
|
"lodash.range": "3.2.0",
|
|
76
77
|
"p-queue": "6.6.2",
|
|
77
|
-
"qs": "6.
|
|
78
|
+
"qs": "6.11.0"
|
|
78
79
|
},
|
|
79
80
|
"devDependencies": {
|
|
81
|
+
"@2bad/tsconfig": "1.4.0",
|
|
80
82
|
"@types/jest": "26.0.23",
|
|
81
|
-
"@types/node": "
|
|
83
|
+
"@types/node": "18.11.2",
|
|
82
84
|
"@typescript-eslint/eslint-plugin": "4.22.0",
|
|
83
|
-
"codecov": "3.8.
|
|
84
|
-
"dotenv": "
|
|
85
|
+
"codecov": "3.8.2",
|
|
86
|
+
"dotenv": "16.0.3",
|
|
85
87
|
"eslint": "7.25.0",
|
|
86
88
|
"eslint-config-standard-with-typescript": "20.0.0",
|
|
87
89
|
"eslint-plugin-import": "2.22.1",
|
|
@@ -89,16 +91,13 @@
|
|
|
89
91
|
"eslint-plugin-promise": "4.2.1",
|
|
90
92
|
"eslint-plugin-standard": "4.1.0",
|
|
91
93
|
"jest": "26.6.3",
|
|
92
|
-
"nock": "13.
|
|
94
|
+
"nock": "13.2.9",
|
|
93
95
|
"npm-run-all": "4.1.5",
|
|
94
96
|
"rimraf": "3.0.2",
|
|
95
97
|
"ts-jest": "26.5.5",
|
|
96
|
-
"typescript": "4.
|
|
97
|
-
},
|
|
98
|
-
"engines": {
|
|
99
|
-
"node": ">=10"
|
|
98
|
+
"typescript": "4.8.4"
|
|
100
99
|
},
|
|
101
100
|
"volta": {
|
|
102
|
-
"node": "
|
|
101
|
+
"node": "19.0.0"
|
|
103
102
|
}
|
|
104
103
|
}
|
package/build/main/bitrix.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bitrix.js","sourceRoot":"","sources":["../../source/bitrix.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,sDAA6B;AAC7B,qEAAmD;AACnD,mEAAiD;AACjD,6DAA2C;AAC3C,6DAA2C;AAC3C,mEAAiD;AACjD,6DAA2C;AAU3C,kBAAe,CAAC,OAAe,EAAE,WAAoB,EAAE,aAA6B,EAAE,EAAE;IACtF,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,gBAAM,CAAC,OAAO,EAAE,WAAW,EAAE,aAAa,CAAC,CAAA;IAEzE,OAAO;QACL,IAAI;QACJ,KAAK;QACL,IAAI;QACJ,SAAS,EAAE,mBAAgB,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;QAC3C,QAAQ,EAAE,kBAAe,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;QACzC,KAAK,EAAE,eAAY,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;QACnC,KAAK,EAAE,eAAY,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;QACnC,QAAQ,EAAE,kBAAe,CAAC,EAAE,IAAI,EAAE,CAAC;QACnC,KAAK,EAAE,eAAY,CAAC,EAAE,IAAI,EAAE,CAAC;KAC9B,CAAA;AACH,CAAC,CAAA;AAED,4CAAyB;AACzB,6CAA0B;AAC1B,oDAAiC;AACjC,gEAA6C;AAC7C,+DAA4C;AAC5C,iEAA8C;AAC9C,4DAAyC;AACzC,4DAAyC;AACzC,+DAA4C;AAC5C,4DAAyC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"addAccessToken.js","sourceRoot":"","sources":["../../../../source/client/hooks/addAccessToken.ts"],"names":[],"mappings":";;AAKA,kBAAe,CAAC,WAAoB,EAAqB,EAAE,CAAC,CAAC,OAAO,EAAE,EAAE;IACtE,IAAI,CAAC,WAAW;QAAE,OAAM;IACxB,IAAI,CAAC,OAAO,CAAC,IAAI;QAAE,OAAM;IAEzB,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAA;IAC3C,OAAO,CAAC,IAAI,GAAG,GAAG,OAAO,CAAC,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,gBAAgB,WAAW,EAAE,CAAA;AACpF,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../source/client/index.ts"],"names":[],"mappings":";;;;;AAAA,8CAAwC;AACxC,sDAA2B;AAC3B,4EAAmD;AACnD,4DAAmC;AACnC,0DAAiC;AACjC,0DAAiC;AAEjC,MAAM,qBAAqB,GAAG,CAAC,CAAA;AAC/B,MAAM,wBAAwB,GAAG,IAAI,CAAA;AAUrC,kBAAe,CAAC,OAAe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AAM,KAAK,GAAG,MAAA,MAAM,CAAC,KAAK,mCAAI,CAAC,CAAA;QAE/B,MAAM,OAAO,GAAG,KAAK,IAAI,EAAE;YACzB,MAAM,aAAa,GAAG,wBAAgB,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,SAAS,CAAC,KAAK,EAAE,uBAAuB,CAAC,CAAA;YAC3G,MAAM,OAAO,GAAG,MAAM,KAAK,CAAC,aAAa,CAAC,CAAA;YAE1C,OAAO,0BAAkB,CAAC,OAAO,CAAC,CAAA;QACpC,CAAC,CAAA;QAED,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,MAAM,EAAE,EAAE,GAAG,MAAM,EAAE,KAAK,EAAE,CAAC,CAAA;QAE1D,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,OAAO,EAAE,CAAA;IACtD,CAAC,CAAA;IAED,OAAO,IAAI,CAAA;AACb,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"commands.js","sourceRoot":"","sources":["../../source/commands.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"methods.js","sourceRoot":"","sources":["../../source/methods.ts"],"names":[],"mappings":";;;AAWA,IAAY,MAoCX;AApCD,WAAY,MAAM;IAChB,yBAAe,CAAA;IAEf,mDAAyC,CAAA;IACzC,6CAAmC,CAAA;IACnC,mDAAyC,CAAA;IACzC,6CAAmC,CAAA;IACnC,+CAAqC,CAAA;IAErC,mDAAyC,CAAA;IACzC,6CAAmC,CAAA;IACnC,mDAAyC,CAAA;IACzC,6CAAmC,CAAA;IACnC,+CAAqC,CAAA;IAErC,6CAAmC,CAAA;IACnC,uCAA6B,CAAA;IAC7B,6CAAmC,CAAA;IACnC,uCAA6B,CAAA;IAC7B,yCAA+B,CAAA;IAE/B,6CAAmC,CAAA;IACnC,uCAA6B,CAAA;IAC7B,6CAAmC,CAAA;IACnC,uCAA6B,CAAA;IAC7B,yCAA+B,CAAA;IAE/B,iDAAuC,CAAA;IACvC,2CAAiC,CAAA;IACjC,iDAAuC,CAAA;IACvC,2CAAiC,CAAA;IACjC,6CAAmC,CAAA;IACnC,iDAAuC,CAAA;IAEvC,qCAA2B,CAAA;IAC3B,+BAAqB,CAAA;AACvB,CAAC,EApCW,MAAM,GAAN,cAAM,KAAN,cAAM,QAoCjB;AAED,MAAM,gBAAgB,GAAG;IACvB,MAAM,CAAC,gBAAgB;IACvB,MAAM,CAAC,gBAAgB;IACvB,MAAM,CAAC,aAAa;IACpB,MAAM,CAAC,aAAa;CACZ,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"payloads.js","sourceRoot":"","sources":["../../source/payloads.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../source/services/common.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"entities.js","sourceRoot":"","sources":["../../../../source/services/companies/entities.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../source/services/companies/index.ts"],"names":[],"mappings":";;AAEA,2CAAoD;AAOpD,kBAAe,CAAC,EAAE,IAAI,EAAE,IAAI,EAAgB,EAAE,EAAE,CAAC,CAAC;IAChD,MAAM,EAAE,GAAG,EAAE,CACX,IAAI,CAAC,gBAAM,CAAC,kBAAkB,EAAE,EAAE,CAAC;IAErC,MAAM,EAAE,CAAiD,MAAmB,EAAE,MAAoB,EAAE,EAAE,CACpG,IAAI,CAAC,gBAAM,CAAC,eAAe,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IAElD,GAAG,EAAE,CAAC,EAAU,EAAE,EAAE,CAClB,IAAI,CAAC,gBAAM,CAAC,eAAe,EAAE,EAAE,EAAE,EAAE,CAAC;IAEtC,IAAI,EAAE,CAAC,SAAgD,EAAE,EAAE,EAAE,CAC3D,IAAI,CAAC,gBAAM,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAEvC,MAAM,EAAE,CAAoD,EAAU,EAAE,MAAmB,EAAE,MAAoB,EAAE,EAAE,CACnH,IAAI,CAAC,gBAAM,CAAC,kBAAkB,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;CAC1D,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"methods.js","sourceRoot":"","sources":["../../../../source/services/companies/methods.ts"],"names":[],"mappings":";;AAAA,2CAAkD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"entities.js","sourceRoot":"","sources":["../../../../source/services/contacts/entities.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../source/services/contacts/index.ts"],"names":[],"mappings":";;AAEA,2CAAoD;AAOpD,kBAAe,CAAC,EAAE,IAAI,EAAE,IAAI,EAAgB,EAAE,EAAE,CAAC,CAAC;IAChD,MAAM,EAAE,GAAG,EAAE,CACX,IAAI,CAAC,gBAAM,CAAC,kBAAkB,EAAE,EAAE,CAAC;IAErC,MAAM,EAAE,CAAiD,MAAmB,EAAE,MAAoB,EAAE,EAAE,CACpG,IAAI,CAAC,gBAAM,CAAC,eAAe,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IAElD,GAAG,EAAE,CAAC,EAAU,EAAE,EAAE,CAClB,IAAI,CAAC,gBAAM,CAAC,eAAe,EAAE,EAAE,EAAE,EAAE,CAAC;IAEtC,IAAI,EAAE,CAAC,SAAgD,EAAE,EAAE,EAAE,CAC3D,IAAI,CAAC,gBAAM,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAEvC,MAAM,EAAE,CAAoD,EAAU,EAAE,MAAmB,EAAE,MAAoB,EAAE,EAAE,CACnH,IAAI,CAAC,gBAAM,CAAC,kBAAkB,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;CAC1D,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"methods.js","sourceRoot":"","sources":["../../../../source/services/contacts/methods.ts"],"names":[],"mappings":";;AAAA,2CAAkD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"entities.js","sourceRoot":"","sources":["../../../../source/services/currencies/entities.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"entities.js","sourceRoot":"","sources":["../../../../source/services/deals/entities.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../source/services/deals/index.ts"],"names":[],"mappings":";;AAEA,2CAAoD;AAOpD,kBAAe,CAAC,EAAE,IAAI,EAAE,IAAI,EAAgB,EAAE,EAAE,CAAC,CAAC;IAChD,MAAM,EAAE,GAAG,EAAE,CACX,IAAI,CAAC,gBAAM,CAAC,eAAe,EAAE,EAAE,CAAC;IAElC,MAAM,EAAE,CAA8C,MAAmB,EAAE,MAAoB,EAAE,EAAE,CACjG,IAAI,CAAC,gBAAM,CAAC,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IAE/C,GAAG,EAAE,CAAC,EAAU,EAAE,EAAE,CAClB,IAAI,CAAC,gBAAM,CAAC,YAAY,EAAE,EAAE,EAAE,EAAE,CAAC;IAEnC,IAAI,EAAE,CAAC,SAA6C,EAAE,EAAE,EAAE,CACxD,IAAI,CAAC,gBAAM,CAAC,aAAa,EAAE,MAAM,CAAC;IAEpC,MAAM,EAAE,CAAiD,EAAU,EAAE,MAAmB,EAAE,MAAoB,EAAE,EAAE,CAChH,IAAI,CAAC,gBAAM,CAAC,eAAe,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;CACvD,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"methods.js","sourceRoot":"","sources":["../../../../source/services/deals/methods.ts"],"names":[],"mappings":";;AAAA,2CAAkD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"entities.js","sourceRoot":"","sources":["../../../../source/services/leads/entities.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../source/services/leads/index.ts"],"names":[],"mappings":";;AAEA,2CAAoD;AAOpD,kBAAe,CAAC,EAAE,IAAI,EAAE,IAAI,EAAgB,EAAE,EAAE,CAAC,CAAC;IAChD,MAAM,EAAE,GAAG,EAAE,CACX,IAAI,CAAC,gBAAM,CAAC,eAAe,EAAE,EAAE,CAAC;IAElC,MAAM,EAAE,CAA8C,MAAmB,EAAE,MAAoB,EAAE,EAAE,CACjG,IAAI,CAAC,gBAAM,CAAC,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IAE/C,GAAG,EAAE,CAAC,EAAU,EAAE,EAAE,CAClB,IAAI,CAAC,gBAAM,CAAC,YAAY,EAAE,EAAE,EAAE,EAAE,CAAC;IAEnC,IAAI,EAAE,CAAC,SAA6C,EAAE,EAAE,EAAE,CACxD,IAAI,CAAC,gBAAM,CAAC,aAAa,EAAE,MAAM,CAAC;IAEpC,MAAM,EAAE,CAAiD,EAAU,EAAE,MAAmB,EAAE,MAAoB,EAAE,EAAE,CAChH,IAAI,CAAC,gBAAM,CAAC,eAAe,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;CACvD,CAAC,CAAA"}
|