@2bad/bitrix 2.3.1 → 2.5.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.
Files changed (268) hide show
  1. package/README.md +53 -45
  2. package/build/main/bitrix.d.ts +25 -16
  3. package/build/main/bitrix.integration.test.js +0 -1
  4. package/build/main/bitrix.js +40 -13
  5. package/build/main/bitrix.unit.test.js +24 -9
  6. package/build/main/client/client.unit.test.js +13 -10
  7. package/build/main/client/hooks/addAccessToken.d.ts +5 -2
  8. package/build/main/client/hooks/addAccessToken.js +3 -1
  9. package/build/main/client/hooks/addAccessToken.unit.test.js +13 -12
  10. package/build/main/client/index.d.ts +10 -1
  11. package/build/main/client/index.js +23 -11
  12. package/build/main/client/methods/batch.d.ts +24 -5
  13. package/build/main/client/methods/batch.js +49 -17
  14. package/build/main/client/methods/batch.unit.test.js +103 -45
  15. package/build/main/client/methods/call.d.ts +11 -4
  16. package/build/main/client/methods/call.js +16 -6
  17. package/build/main/client/methods/call.unit.test.js +36 -21
  18. package/build/main/client/methods/list.d.ts +15 -3
  19. package/build/main/client/methods/list.js +36 -14
  20. package/build/main/client/methods/list.unit.test.js +42 -27
  21. package/build/main/commands.d.ts +2 -2
  22. package/build/main/commands.js +0 -1
  23. package/build/main/methods.d.ts +27 -8
  24. package/build/main/methods.js +1 -1
  25. package/build/main/payloads.d.ts +8 -8
  26. package/build/main/payloads.js +0 -1
  27. package/build/main/services/common.d.ts +5 -4
  28. package/build/main/services/common.js +0 -1
  29. package/build/main/services/companies/entities.d.ts +7 -6
  30. package/build/main/services/companies/entities.js +0 -1
  31. package/build/main/services/companies/index.d.ts +7 -6
  32. package/build/main/services/companies/index.integration.test.js +2 -3
  33. package/build/main/services/companies/index.js +0 -1
  34. package/build/main/services/companies/index.unit.test.js +1 -2
  35. package/build/main/services/companies/methods.d.ts +4 -4
  36. package/build/main/services/companies/methods.js +0 -1
  37. package/build/main/services/contacts/entities.d.ts +4 -3
  38. package/build/main/services/contacts/entities.js +0 -1
  39. package/build/main/services/contacts/index.d.ts +7 -6
  40. package/build/main/services/contacts/index.integration.test.js +2 -3
  41. package/build/main/services/contacts/index.js +0 -1
  42. package/build/main/services/contacts/index.unit.test.js +1 -2
  43. package/build/main/services/contacts/methods.d.ts +4 -4
  44. package/build/main/services/contacts/methods.js +0 -1
  45. package/build/main/services/currencies/entities.d.ts +2 -2
  46. package/build/main/services/currencies/entities.js +0 -1
  47. package/build/main/services/deals/entities.d.ts +2 -2
  48. package/build/main/services/deals/entities.js +0 -1
  49. package/build/main/services/deals/index.d.ts +7 -6
  50. package/build/main/services/deals/index.integration.test.js +2 -3
  51. package/build/main/services/deals/index.js +0 -1
  52. package/build/main/services/deals/index.unit.test.js +1 -2
  53. package/build/main/services/deals/methods.d.ts +4 -4
  54. package/build/main/services/deals/methods.js +0 -1
  55. package/build/main/services/leads/entities.d.ts +2 -2
  56. package/build/main/services/leads/entities.js +0 -1
  57. package/build/main/services/leads/index.d.ts +7 -6
  58. package/build/main/services/leads/index.integration.test.js +2 -3
  59. package/build/main/services/leads/index.js +0 -1
  60. package/build/main/services/leads/index.unit.test.js +1 -2
  61. package/build/main/services/leads/methods.d.ts +4 -4
  62. package/build/main/services/leads/methods.js +0 -1
  63. package/build/main/services/statuses/entities.d.ts +5 -4
  64. package/build/main/services/statuses/entities.js +0 -1
  65. package/build/main/services/statuses/index.d.ts +7 -11
  66. package/build/main/services/statuses/index.integration.test.js +8 -4
  67. package/build/main/services/statuses/index.js +0 -1
  68. package/build/main/services/statuses/index.unit.test.js +1 -2
  69. package/build/main/services/statuses/methods.d.ts +6 -6
  70. package/build/main/services/statuses/methods.js +0 -1
  71. package/build/main/services/users/entities.d.ts +4 -3
  72. package/build/main/services/users/entities.js +0 -1
  73. package/build/main/services/users/index.d.ts +3 -3
  74. package/build/main/services/users/index.integration.test.js +2 -3
  75. package/build/main/services/users/index.js +0 -1
  76. package/build/main/services/users/index.unit.test.js +1 -2
  77. package/build/main/services/users/methods.d.ts +4 -4
  78. package/build/main/services/users/methods.js +0 -1
  79. package/build/main/utils/Diff.js +0 -1
  80. package/build/main/utils/ExtractValue.d.ts +6 -1
  81. package/build/main/utils/ExtractValue.js +0 -1
  82. package/build/main/utils/isArray.d.ts +1 -1
  83. package/build/main/utils/isArray.js +1 -1
  84. package/build/module/bitrix.d.ts +25 -16
  85. package/build/module/bitrix.integration.test.js +0 -1
  86. package/build/module/bitrix.js +19 -3
  87. package/build/module/bitrix.unit.test.js +0 -1
  88. package/build/module/client/client.unit.test.js +9 -6
  89. package/build/module/client/hooks/addAccessToken.d.ts +5 -2
  90. package/build/module/client/hooks/addAccessToken.js +3 -1
  91. package/build/module/client/hooks/addAccessToken.unit.test.js +9 -8
  92. package/build/module/client/index.d.ts +10 -1
  93. package/build/module/client/index.js +19 -7
  94. package/build/module/client/methods/batch.d.ts +24 -5
  95. package/build/module/client/methods/batch.js +28 -3
  96. package/build/module/client/methods/batch.unit.test.js +61 -19
  97. package/build/module/client/methods/call.d.ts +11 -4
  98. package/build/module/client/methods/call.js +10 -3
  99. package/build/module/client/methods/call.unit.test.js +1 -2
  100. package/build/module/client/methods/list.d.ts +15 -3
  101. package/build/module/client/methods/list.js +21 -5
  102. package/build/module/client/methods/list.unit.test.js +0 -1
  103. package/build/module/commands.d.ts +2 -2
  104. package/build/module/commands.js +1 -1
  105. package/build/module/methods.d.ts +27 -8
  106. package/build/module/methods.js +0 -1
  107. package/build/module/payloads.d.ts +8 -8
  108. package/build/module/payloads.js +1 -1
  109. package/build/module/services/common.d.ts +5 -4
  110. package/build/module/services/common.js +1 -1
  111. package/build/module/services/companies/entities.d.ts +7 -6
  112. package/build/module/services/companies/entities.js +1 -1
  113. package/build/module/services/companies/index.d.ts +7 -6
  114. package/build/module/services/companies/index.integration.test.js +1 -2
  115. package/build/module/services/companies/index.js +0 -1
  116. package/build/module/services/companies/index.unit.test.js +0 -1
  117. package/build/module/services/companies/methods.d.ts +4 -4
  118. package/build/module/services/companies/methods.js +0 -1
  119. package/build/module/services/contacts/entities.d.ts +4 -3
  120. package/build/module/services/contacts/entities.js +1 -1
  121. package/build/module/services/contacts/index.d.ts +7 -6
  122. package/build/module/services/contacts/index.integration.test.js +1 -2
  123. package/build/module/services/contacts/index.js +0 -1
  124. package/build/module/services/contacts/index.unit.test.js +0 -1
  125. package/build/module/services/contacts/methods.d.ts +4 -4
  126. package/build/module/services/contacts/methods.js +0 -1
  127. package/build/module/services/currencies/entities.d.ts +2 -2
  128. package/build/module/services/currencies/entities.js +1 -1
  129. package/build/module/services/deals/entities.d.ts +2 -2
  130. package/build/module/services/deals/entities.js +1 -1
  131. package/build/module/services/deals/index.d.ts +7 -6
  132. package/build/module/services/deals/index.integration.test.js +1 -2
  133. package/build/module/services/deals/index.js +0 -1
  134. package/build/module/services/deals/index.unit.test.js +0 -1
  135. package/build/module/services/deals/methods.d.ts +4 -4
  136. package/build/module/services/deals/methods.js +0 -1
  137. package/build/module/services/leads/entities.d.ts +2 -2
  138. package/build/module/services/leads/entities.js +1 -1
  139. package/build/module/services/leads/index.d.ts +7 -6
  140. package/build/module/services/leads/index.integration.test.js +1 -2
  141. package/build/module/services/leads/index.js +0 -1
  142. package/build/module/services/leads/index.unit.test.js +0 -1
  143. package/build/module/services/leads/methods.d.ts +4 -4
  144. package/build/module/services/leads/methods.js +0 -1
  145. package/build/module/services/statuses/entities.d.ts +5 -4
  146. package/build/module/services/statuses/entities.js +1 -1
  147. package/build/module/services/statuses/index.d.ts +7 -11
  148. package/build/module/services/statuses/index.integration.test.js +7 -3
  149. package/build/module/services/statuses/index.js +0 -1
  150. package/build/module/services/statuses/index.unit.test.js +0 -1
  151. package/build/module/services/statuses/methods.d.ts +6 -6
  152. package/build/module/services/statuses/methods.js +0 -1
  153. package/build/module/services/users/entities.d.ts +4 -3
  154. package/build/module/services/users/entities.js +1 -1
  155. package/build/module/services/users/index.d.ts +3 -3
  156. package/build/module/services/users/index.integration.test.js +1 -2
  157. package/build/module/services/users/index.js +0 -1
  158. package/build/module/services/users/index.unit.test.js +0 -1
  159. package/build/module/services/users/methods.d.ts +4 -4
  160. package/build/module/services/users/methods.js +0 -1
  161. package/build/module/utils/Diff.js +1 -1
  162. package/build/module/utils/ExtractValue.d.ts +6 -1
  163. package/build/module/utils/ExtractValue.js +1 -1
  164. package/build/module/utils/isArray.d.ts +1 -1
  165. package/build/module/utils/isArray.js +1 -1
  166. package/package.json +64 -60
  167. package/build/main/bitrix.integration.test.js.map +0 -1
  168. package/build/main/bitrix.js.map +0 -1
  169. package/build/main/bitrix.unit.test.js.map +0 -1
  170. package/build/main/client/client.unit.test.js.map +0 -1
  171. package/build/main/client/hooks/addAccessToken.js.map +0 -1
  172. package/build/main/client/hooks/addAccessToken.unit.test.js.map +0 -1
  173. package/build/main/client/index.js.map +0 -1
  174. package/build/main/client/methods/batch.js.map +0 -1
  175. package/build/main/client/methods/batch.unit.test.js.map +0 -1
  176. package/build/main/client/methods/call.js.map +0 -1
  177. package/build/main/client/methods/call.unit.test.js.map +0 -1
  178. package/build/main/client/methods/list.js.map +0 -1
  179. package/build/main/client/methods/list.unit.test.js.map +0 -1
  180. package/build/main/commands.js.map +0 -1
  181. package/build/main/methods.js.map +0 -1
  182. package/build/main/payloads.js.map +0 -1
  183. package/build/main/services/common.js.map +0 -1
  184. package/build/main/services/companies/entities.js.map +0 -1
  185. package/build/main/services/companies/index.integration.test.js.map +0 -1
  186. package/build/main/services/companies/index.js.map +0 -1
  187. package/build/main/services/companies/index.unit.test.js.map +0 -1
  188. package/build/main/services/companies/methods.js.map +0 -1
  189. package/build/main/services/contacts/entities.js.map +0 -1
  190. package/build/main/services/contacts/index.integration.test.js.map +0 -1
  191. package/build/main/services/contacts/index.js.map +0 -1
  192. package/build/main/services/contacts/index.unit.test.js.map +0 -1
  193. package/build/main/services/contacts/methods.js.map +0 -1
  194. package/build/main/services/currencies/entities.js.map +0 -1
  195. package/build/main/services/deals/entities.js.map +0 -1
  196. package/build/main/services/deals/index.integration.test.js.map +0 -1
  197. package/build/main/services/deals/index.js.map +0 -1
  198. package/build/main/services/deals/index.unit.test.js.map +0 -1
  199. package/build/main/services/deals/methods.js.map +0 -1
  200. package/build/main/services/leads/entities.js.map +0 -1
  201. package/build/main/services/leads/index.integration.test.js.map +0 -1
  202. package/build/main/services/leads/index.js.map +0 -1
  203. package/build/main/services/leads/index.unit.test.js.map +0 -1
  204. package/build/main/services/leads/methods.js.map +0 -1
  205. package/build/main/services/statuses/entities.js.map +0 -1
  206. package/build/main/services/statuses/index.integration.test.js.map +0 -1
  207. package/build/main/services/statuses/index.js.map +0 -1
  208. package/build/main/services/statuses/index.unit.test.js.map +0 -1
  209. package/build/main/services/statuses/methods.js.map +0 -1
  210. package/build/main/services/users/entities.js.map +0 -1
  211. package/build/main/services/users/index.integration.test.js.map +0 -1
  212. package/build/main/services/users/index.js.map +0 -1
  213. package/build/main/services/users/index.unit.test.js.map +0 -1
  214. package/build/main/services/users/methods.js.map +0 -1
  215. package/build/main/utils/Diff.js.map +0 -1
  216. package/build/main/utils/ExtractValue.js.map +0 -1
  217. package/build/main/utils/isArray.js.map +0 -1
  218. package/build/module/bitrix.integration.test.js.map +0 -1
  219. package/build/module/bitrix.js.map +0 -1
  220. package/build/module/bitrix.unit.test.js.map +0 -1
  221. package/build/module/client/client.unit.test.js.map +0 -1
  222. package/build/module/client/hooks/addAccessToken.js.map +0 -1
  223. package/build/module/client/hooks/addAccessToken.unit.test.js.map +0 -1
  224. package/build/module/client/index.js.map +0 -1
  225. package/build/module/client/methods/batch.js.map +0 -1
  226. package/build/module/client/methods/batch.unit.test.js.map +0 -1
  227. package/build/module/client/methods/call.js.map +0 -1
  228. package/build/module/client/methods/call.unit.test.js.map +0 -1
  229. package/build/module/client/methods/list.js.map +0 -1
  230. package/build/module/client/methods/list.unit.test.js.map +0 -1
  231. package/build/module/commands.js.map +0 -1
  232. package/build/module/methods.js.map +0 -1
  233. package/build/module/payloads.js.map +0 -1
  234. package/build/module/services/common.js.map +0 -1
  235. package/build/module/services/companies/entities.js.map +0 -1
  236. package/build/module/services/companies/index.integration.test.js.map +0 -1
  237. package/build/module/services/companies/index.js.map +0 -1
  238. package/build/module/services/companies/index.unit.test.js.map +0 -1
  239. package/build/module/services/companies/methods.js.map +0 -1
  240. package/build/module/services/contacts/entities.js.map +0 -1
  241. package/build/module/services/contacts/index.integration.test.js.map +0 -1
  242. package/build/module/services/contacts/index.js.map +0 -1
  243. package/build/module/services/contacts/index.unit.test.js.map +0 -1
  244. package/build/module/services/contacts/methods.js.map +0 -1
  245. package/build/module/services/currencies/entities.js.map +0 -1
  246. package/build/module/services/deals/entities.js.map +0 -1
  247. package/build/module/services/deals/index.integration.test.js.map +0 -1
  248. package/build/module/services/deals/index.js.map +0 -1
  249. package/build/module/services/deals/index.unit.test.js.map +0 -1
  250. package/build/module/services/deals/methods.js.map +0 -1
  251. package/build/module/services/leads/entities.js.map +0 -1
  252. package/build/module/services/leads/index.integration.test.js.map +0 -1
  253. package/build/module/services/leads/index.js.map +0 -1
  254. package/build/module/services/leads/index.unit.test.js.map +0 -1
  255. package/build/module/services/leads/methods.js.map +0 -1
  256. package/build/module/services/statuses/entities.js.map +0 -1
  257. package/build/module/services/statuses/index.integration.test.js.map +0 -1
  258. package/build/module/services/statuses/index.js.map +0 -1
  259. package/build/module/services/statuses/index.unit.test.js.map +0 -1
  260. package/build/module/services/statuses/methods.js.map +0 -1
  261. package/build/module/services/users/entities.js.map +0 -1
  262. package/build/module/services/users/index.integration.test.js.map +0 -1
  263. package/build/module/services/users/index.js.map +0 -1
  264. package/build/module/services/users/index.unit.test.js.map +0 -1
  265. package/build/module/services/users/methods.js.map +0 -1
  266. package/build/module/utils/Diff.js.map +0 -1
  267. package/build/module/utils/ExtractValue.js.map +0 -1
  268. package/build/module/utils/isArray.js.map +0 -1
@@ -1,22 +1,38 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
5
18
  var __importStar = (this && this.__importStar) || function (mod) {
6
19
  if (mod && mod.__esModule) return mod;
7
20
  var result = {};
8
- if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
9
- result["default"] = mod;
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
10
23
  return result;
11
24
  };
25
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
12
28
  Object.defineProperty(exports, "__esModule", { value: true });
13
29
  const got_1 = __importDefault(require("got"));
14
30
  const nock_1 = __importDefault(require("nock"));
15
31
  const methods_1 = require("../../methods");
16
32
  const call_1 = __importStar(require("./call"));
17
33
  const TEST_URI = 'https://test.com/rest';
18
- const call = call_1.default({
19
- get: got_1.default.extend({ baseUrl: TEST_URI, json: true }).get
34
+ const call = (0, call_1.default)({
35
+ get: got_1.default.extend({ prefixUrl: TEST_URI, responseType: 'json' }).get
20
36
  });
21
37
  const RESPONSE_200 = 200;
22
38
  describe('Client `handlePayload` method', () => {
@@ -25,7 +41,7 @@ describe('Client `handlePayload` method', () => {
25
41
  result: 'done',
26
42
  time: { start: 1, finish: 1, duration: 1, processing: 1, date_start: 'date', date_finish: 'date' }
27
43
  };
28
- expect(call_1.handlePayload(payload)).toBe(payload);
44
+ expect((0, call_1.handlePayload)(payload)).toBe(payload);
29
45
  });
30
46
  it('should return `ListPayload`', () => {
31
47
  const payload = {
@@ -35,7 +51,7 @@ describe('Client `handlePayload` method', () => {
35
51
  time: { start: 1, finish: 1, duration: 1, processing: 1, date_start: 'date', date_finish: 'date' },
36
52
  total: 1
37
53
  };
38
- expect(call_1.handlePayload(payload)).toBe(payload);
54
+ expect((0, call_1.handlePayload)(payload)).toBe(payload);
39
55
  });
40
56
  it('should throw when getting error in `ListPayload`', () => {
41
57
  const payload = {
@@ -45,7 +61,7 @@ describe('Client `handlePayload` method', () => {
45
61
  time: { start: 1, finish: 1, duration: 1, processing: 1, date_start: 'date', date_finish: 'date' },
46
62
  total: 1
47
63
  };
48
- expect(() => call_1.handlePayload(payload)).toThrowErrorMatchingSnapshot();
64
+ expect(() => (0, call_1.handlePayload)(payload)).toThrowErrorMatchingSnapshot();
49
65
  });
50
66
  it('should return `BatchPayload` with numbered commands', () => {
51
67
  const payload = {
@@ -58,7 +74,7 @@ describe('Client `handlePayload` method', () => {
58
74
  },
59
75
  time: { start: 1, finish: 1, duration: 1, processing: 1, date_start: 'date', date_finish: 'date' }
60
76
  };
61
- expect(call_1.handlePayload(payload)).toBe(payload);
77
+ expect((0, call_1.handlePayload)(payload)).toBe(payload);
62
78
  });
63
79
  it('should return `BatchPayload` with result from array of commands', () => {
64
80
  const payload = {
@@ -71,7 +87,7 @@ describe('Client `handlePayload` method', () => {
71
87
  },
72
88
  time: { start: 1, finish: 1, duration: 1, processing: 1, date_start: 'date', date_finish: 'date' }
73
89
  };
74
- expect(call_1.handlePayload(payload)).toBe(payload);
90
+ expect((0, call_1.handlePayload)(payload)).toBe(payload);
75
91
  });
76
92
  it('should throw when getting errors in `BatchPayload` with result from named commands', () => {
77
93
  const payload = {
@@ -84,7 +100,7 @@ describe('Client `handlePayload` method', () => {
84
100
  },
85
101
  time: { start: 1, finish: 1, duration: 1, processing: 1, date_start: 'date', date_finish: 'date' }
86
102
  };
87
- expect(() => call_1.handlePayload(payload)).toThrowErrorMatchingSnapshot();
103
+ expect(() => (0, call_1.handlePayload)(payload)).toThrowErrorMatchingSnapshot();
88
104
  });
89
105
  it('should throw when getting errors in `BatchPayload` with result from array of commands', () => {
90
106
  const payload = {
@@ -97,13 +113,13 @@ describe('Client `handlePayload` method', () => {
97
113
  },
98
114
  time: { start: 1, finish: 1, duration: 1, processing: 1, date_start: 'date', date_finish: 'date' }
99
115
  };
100
- expect(() => call_1.handlePayload(payload)).toThrowErrorMatchingSnapshot();
116
+ expect(() => (0, call_1.handlePayload)(payload)).toThrowErrorMatchingSnapshot();
101
117
  });
102
118
  });
103
119
  describe('Client `call` method', () => {
104
120
  it('should form a proper request', async () => {
105
121
  const params = { id: '1' };
106
- const scope = nock_1.default(TEST_URI)
122
+ const scope = (0, nock_1.default)(TEST_URI)
107
123
  .get(`/${methods_1.Method.CRM_DEAL_GET}`)
108
124
  .query(params)
109
125
  .reply(RESPONSE_200);
@@ -117,7 +133,7 @@ describe('Client `call` method', () => {
117
133
  select: ['ID', 'TITLE'],
118
134
  start: 50
119
135
  };
120
- const scope = nock_1.default(TEST_URI)
136
+ const scope = (0, nock_1.default)(TEST_URI)
121
137
  .get(`/${methods_1.Method.CRM_DEAL_LIST}`)
122
138
  .query(params)
123
139
  .reply(RESPONSE_200);
@@ -127,7 +143,7 @@ describe('Client `call` method', () => {
127
143
  it('should return body as payload', async () => {
128
144
  const params = { id: '1' };
129
145
  const payload = { test: 'value' };
130
- nock_1.default(TEST_URI)
146
+ (0, nock_1.default)(TEST_URI)
131
147
  .get(`/${methods_1.Method.CRM_DEAL_GET}`)
132
148
  .query(params)
133
149
  .reply(RESPONSE_200, payload);
@@ -135,14 +151,14 @@ describe('Client `call` method', () => {
135
151
  });
136
152
  it('should return body as payload with list methods', async () => {
137
153
  const payload = { result: ['done'] };
138
- nock_1.default(TEST_URI)
154
+ (0, nock_1.default)(TEST_URI)
139
155
  .get(`/${methods_1.Method.CRM_DEAL_LIST}`)
140
156
  .reply(RESPONSE_200, payload);
141
157
  expect(await call(methods_1.Method.CRM_DEAL_LIST, {})).toEqual(payload);
142
158
  });
143
159
  it('should throw when getting errors in payload', () => {
144
160
  const payload = { result: ['done'], error: 'Expected error for `getList`' };
145
- nock_1.default(TEST_URI)
161
+ (0, nock_1.default)(TEST_URI)
146
162
  .get(`/${methods_1.Method.CRM_DEAL_LIST}`)
147
163
  .reply(RESPONSE_200, payload);
148
164
  return expect(call(methods_1.Method.CRM_DEAL_LIST, {})).rejects.toMatchSnapshot();
@@ -158,11 +174,10 @@ describe('Client `call` method', () => {
158
174
  },
159
175
  time: { start: 1, finish: 1, duration: 1, processing: 1, date_start: 'date', date_finish: 'date' }
160
176
  };
161
- nock_1.default(TEST_URI)
177
+ (0, nock_1.default)(TEST_URI)
162
178
  .get(`/${methods_1.Method.BATCH}`)
163
179
  .reply(RESPONSE_200, payload);
164
180
  return expect(call(methods_1.Method.BATCH, {})).rejects.toMatchSnapshot();
165
181
  });
166
182
  it.todo('should cast payload to the <P>');
167
183
  });
168
- //# sourceMappingURL=call.unit.test.js.map
@@ -3,16 +3,28 @@ import { ListableMethod, MethodParams, MethodPayloadType } from '../../methods';
3
3
  import { BatchPayload, ListPayload } from '../../payloads';
4
4
  import { Batch } from './batch';
5
5
  import { Call } from './call';
6
+ /**
7
+ * Generates required amount of commands to process specified amount of entries
8
+ */
6
9
  export declare const fillWithCommands: <C extends Command>({ method, params }: C, start: number, toProcess: number, entriesPerCommand: number) => readonly {
7
10
  readonly method: C["method"];
8
11
  readonly params?: C["params"] | undefined;
9
12
  }[];
10
- export declare const highest: (input: readonly (number | undefined)[] | Record<string, number | undefined>) => number | undefined;
13
+ /**
14
+ * Get the highest value from object or an array if there's any
15
+ */
16
+ export declare const highest: (input: ReadonlyArray<number | undefined> | Record<string, number | undefined>) => number | undefined;
17
+ /**
18
+ * Converts batch payload to a list payload
19
+ */
11
20
  export declare const batchToListPayload: <P>(payload: BatchPayload<Record<string, P> | readonly P[]>) => ListPayload<P>;
12
- interface Dependencies {
21
+ declare type Dependencies = {
13
22
  readonly call: Call;
14
23
  readonly batch: Batch;
15
- }
24
+ };
16
25
  export declare type List = <M extends ListableMethod>(method: M, params: MethodParams<M>) => Promise<ListPayload<MethodPayloadType<M>>>;
26
+ /**
27
+ * Gets all entries by dispatching required amount of requests. Will fill figure out payload type based on the Method.
28
+ */
17
29
  declare const _default: ({ call, batch }: Dependencies) => List;
18
30
  export default _default;
@@ -3,42 +3,64 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.batchToListPayload = exports.highest = exports.fillWithCommands = void 0;
6
7
  const lodash_range_1 = __importDefault(require("lodash.range"));
7
8
  const MAX_ENTRIES_PER_COMMAND = 50;
8
- exports.fillWithCommands = ({ method, params }, start, toProcess, entriesPerCommand) => {
9
+ /**
10
+ * Generates required amount of commands to process specified amount of entries
11
+ */
12
+ const fillWithCommands = ({ method, params }, start, toProcess, entriesPerCommand) => {
9
13
  const requiresCommands = Math.ceil((toProcess - start) / entriesPerCommand);
10
- return lodash_range_1.default(0, requiresCommands)
11
- .map((i) => ({ method, params: Object.assign(Object.assign({}, params), { start: start + (entriesPerCommand * i) }) }));
14
+ return (0, lodash_range_1.default)(0, requiresCommands)
15
+ .map((i) => ({ method, params: { ...params, start: start + (entriesPerCommand * i) } }));
12
16
  };
13
- exports.highest = (input) => Object.values(input).reduce((a, b) => a !== undefined && b !== undefined
17
+ exports.fillWithCommands = fillWithCommands;
18
+ /**
19
+ * Get the highest value from object or an array if there's any
20
+ */
21
+ const highest = (input) => Object.values(input).reduce((a, b) => a !== undefined && b !== undefined
14
22
  ? a > b ? a : b
15
23
  : a !== undefined && b === undefined
16
24
  ? a
17
25
  : a === undefined && b !== undefined
18
26
  ? b
19
27
  : undefined, undefined);
20
- exports.batchToListPayload = (payload) => {
28
+ exports.highest = highest;
29
+ /**
30
+ * Converts batch payload to a list payload
31
+ */
32
+ const batchToListPayload = (payload) => {
33
+ var _a;
34
+ // eslint-disable-next-line @typescript-eslint/naming-convention
21
35
  const { result: { result, result_total, result_error, result_next }, time } = payload;
22
- const flattenResult = Object.entries(result).reduce((flatten, [_key, r]) => !r ? flatten : [...flatten, ...r], []);
36
+ const flattenResult = Object.entries(result).reduce(
37
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
38
+ // @ts-expect-error ignore this for now
39
+ (flatten, [_key, r]) => !r ? flatten : [...flatten, ...r], []);
23
40
  return {
24
41
  error: Object.values(result_error).join('\n'),
25
- next: exports.highest(result_next),
42
+ next: (0, exports.highest)(result_next),
26
43
  result: flattenResult,
44
+ // @todo Not accurate, we do not care
27
45
  time,
28
- total: exports.highest(result_total) || 0
46
+ total: (_a = (0, exports.highest)(result_total)) !== null && _a !== void 0 ? _a : 0
29
47
  };
30
48
  };
49
+ exports.batchToListPayload = batchToListPayload;
50
+ /**
51
+ * Gets all entries by dispatching required amount of requests. Will fill figure out payload type based on the Method.
52
+ */
31
53
  exports.default = ({ call, batch }) => {
32
54
  const list = async (method, params) => {
33
- const start = params.start || 0;
55
+ var _a;
56
+ const start = (_a = params.start) !== null && _a !== void 0 ? _a : 0;
34
57
  const listAll = async () => {
35
- const batchCommands = exports.fillWithCommands({ method, params }, start, firstCall.total, MAX_ENTRIES_PER_COMMAND);
58
+ const batchCommands = (0, exports.fillWithCommands)({ method, params }, start, firstCall.total, MAX_ENTRIES_PER_COMMAND);
36
59
  const payload = await batch(batchCommands);
37
- return exports.batchToListPayload(payload);
60
+ return (0, exports.batchToListPayload)(payload);
38
61
  };
39
- const firstCall = await call(method, Object.assign(Object.assign({}, params), { start }));
40
- return !firstCall.next ? firstCall : listAll();
62
+ const firstCall = await call(method, { ...params, start });
63
+ return !firstCall.next ? firstCall : await listAll();
41
64
  };
42
65
  return list;
43
66
  };
44
- //# sourceMappingURL=list.js.map
@@ -1,9 +1,25 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
2
18
  var __importStar = (this && this.__importStar) || function (mod) {
3
19
  if (mod && mod.__esModule) return mod;
4
20
  var result = {};
5
- if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
6
- result["default"] = mod;
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
7
23
  return result;
8
24
  };
9
25
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -15,14 +31,14 @@ describe('Client `fillWithCommands` method', () => {
15
31
  const start = 0;
16
32
  const toProcess = 7;
17
33
  const entriesPerCommand = 2;
18
- expect(list_1.fillWithCommands(command, start, toProcess, entriesPerCommand)).toMatchSnapshot();
34
+ expect((0, list_1.fillWithCommands)(command, start, toProcess, entriesPerCommand)).toMatchSnapshot();
19
35
  });
20
36
  it('should properly take into account start', () => {
21
37
  const command = { method: methods_1.Method.CRM_DEAL_LIST, params: { select: ['*'] } };
22
38
  const start = 2;
23
39
  const toProcess = 7;
24
40
  const entriesPerCommand = 2;
25
- expect(list_1.fillWithCommands(command, start, toProcess, entriesPerCommand)).toMatchSnapshot();
41
+ expect((0, list_1.fillWithCommands)(command, start, toProcess, entriesPerCommand)).toMatchSnapshot();
26
42
  });
27
43
  it('should override `params.start`', () => {
28
44
  const wrongStart = 99;
@@ -30,26 +46,26 @@ describe('Client `fillWithCommands` method', () => {
30
46
  const start = 0;
31
47
  const toProcess = 2;
32
48
  const entriesPerCommand = 1;
33
- const commands = list_1.fillWithCommands(command, start, toProcess, entriesPerCommand);
49
+ const commands = (0, list_1.fillWithCommands)(command, start, toProcess, entriesPerCommand);
34
50
  expect(Object.values(commands).map((c) => c.params)).toMatchSnapshot();
35
51
  });
36
52
  });
37
53
  describe('Client `highest` method', () => {
38
54
  it('should get highest value from object', () => {
39
- expect(list_1.highest({ a: undefined })).toBe(undefined);
40
- expect(list_1.highest({ a: undefined, b: undefined })).toBe(undefined);
41
- expect(list_1.highest({ a: 1, b: undefined })).toBe(1);
42
- expect(list_1.highest({ a: undefined, b: 1 })).toBe(1);
43
- expect(list_1.highest({ a: 1, b: 2 })).toBe(2);
44
- expect(list_1.highest({ a: 2, b: 1 })).toBe(2);
55
+ expect((0, list_1.highest)({ a: undefined })).toBe(undefined);
56
+ expect((0, list_1.highest)({ a: undefined, b: undefined })).toBe(undefined);
57
+ expect((0, list_1.highest)({ a: 1, b: undefined })).toBe(1);
58
+ expect((0, list_1.highest)({ a: undefined, b: 1 })).toBe(1);
59
+ expect((0, list_1.highest)({ a: 1, b: 2 })).toBe(2);
60
+ expect((0, list_1.highest)({ a: 2, b: 1 })).toBe(2);
45
61
  });
46
62
  it('should get highest value from array', () => {
47
- expect(list_1.highest([undefined])).toBe(undefined);
48
- expect(list_1.highest([undefined, undefined])).toBe(undefined);
49
- expect(list_1.highest([1, undefined])).toBe(1);
50
- expect(list_1.highest([undefined, 1])).toBe(1);
51
- expect(list_1.highest([1, 2])).toBe(2);
52
- expect(list_1.highest([2, 1])).toBe(2);
63
+ expect((0, list_1.highest)([undefined])).toBe(undefined);
64
+ expect((0, list_1.highest)([undefined, undefined])).toBe(undefined);
65
+ expect((0, list_1.highest)([1, undefined])).toBe(1);
66
+ expect((0, list_1.highest)([undefined, 1])).toBe(1);
67
+ expect((0, list_1.highest)([1, 2])).toBe(2);
68
+ expect((0, list_1.highest)([2, 1])).toBe(2);
53
69
  });
54
70
  });
55
71
  describe('Client `batchToListPayload` method', () => {
@@ -91,7 +107,7 @@ describe('Client `batchToListPayload` method', () => {
91
107
  date_finish: '2019-08-30T23:28:11+03:00'
92
108
  }
93
109
  };
94
- expect(list_1.batchToListPayload(payload)).toMatchSnapshot();
110
+ expect((0, list_1.batchToListPayload)(payload)).toMatchSnapshot();
95
111
  });
96
112
  it('should convert batch with payload of arrays to a list payload', () => {
97
113
  const payload = {
@@ -128,7 +144,7 @@ describe('Client `batchToListPayload` method', () => {
128
144
  date_finish: '2019-08-30T23:28:11+03:00'
129
145
  }
130
146
  };
131
- expect(list_1.batchToListPayload(payload)).toMatchSnapshot();
147
+ expect((0, list_1.batchToListPayload)(payload)).toMatchSnapshot();
132
148
  });
133
149
  it('should handle undefined in `result`', () => {
134
150
  const payload = {
@@ -162,14 +178,14 @@ describe('Client `batchToListPayload` method', () => {
162
178
  date_finish: '2019-08-30T23:28:11+03:00'
163
179
  }
164
180
  };
165
- expect(list_1.batchToListPayload(payload)).toMatchSnapshot();
181
+ expect((0, list_1.batchToListPayload)(payload)).toMatchSnapshot();
166
182
  });
167
183
  });
168
184
  describe('Client `list` method', () => {
169
185
  it('should make one request when entries can be fetched in one go', async () => {
170
186
  const callMock = jest.fn(() => Promise.resolve({ next: false }));
171
187
  const batchMock = jest.fn(() => Promise.resolve({}));
172
- const list = list_1.default({ call: callMock, batch: batchMock });
188
+ const list = (0, list_1.default)({ call: callMock, batch: batchMock });
173
189
  await list(methods_1.Method.CRM_DEAL_LIST, {});
174
190
  expect(callMock.mock.calls).toMatchSnapshot();
175
191
  expect(batchMock).not.toBeCalled();
@@ -186,7 +202,7 @@ describe('Client `list` method', () => {
186
202
  },
187
203
  time: {}
188
204
  }));
189
- const list = list_1.default({ call: callMock, batch: batchMock });
205
+ const list = (0, list_1.default)({ call: callMock, batch: batchMock });
190
206
  await list(methods_1.Method.CRM_DEAL_LIST, {});
191
207
  expect(callMock.mock.calls).toMatchSnapshot();
192
208
  expect(batchMock.mock.calls).toMatchSnapshot();
@@ -195,7 +211,7 @@ describe('Client `list` method', () => {
195
211
  const mockPayload = { next: false, result: 'test' };
196
212
  const callMock = jest.fn(() => Promise.resolve(mockPayload));
197
213
  const batchMock = jest.fn(() => Promise.resolve({}));
198
- const list = list_1.default({ call: callMock, batch: batchMock });
214
+ const list = (0, list_1.default)({ call: callMock, batch: batchMock });
199
215
  const payload = await list(methods_1.Method.CRM_DEAL_LIST, {});
200
216
  expect(payload).toEqual(mockPayload);
201
217
  });
@@ -218,7 +234,7 @@ describe('Client `list` method', () => {
218
234
  };
219
235
  const callMock = jest.fn(() => Promise.resolve({ next: 2 }));
220
236
  const batchMock = jest.fn(() => Promise.resolve(mockPayload));
221
- const list = list_1.default({ call: callMock, batch: batchMock });
237
+ const list = (0, list_1.default)({ call: callMock, batch: batchMock });
222
238
  const payload = await list(methods_1.Method.CRM_DEAL_LIST, {});
223
239
  expect(payload).toMatchSnapshot();
224
240
  });
@@ -234,7 +250,7 @@ describe('Client `list` method', () => {
234
250
  },
235
251
  time: {}
236
252
  }));
237
- const list = list_1.default({ call: callMock, batch: batchMock });
253
+ const list = (0, list_1.default)({ call: callMock, batch: batchMock });
238
254
  await list(methods_1.Method.CRM_DEAL_LIST, {});
239
255
  expect(callMock.mock.calls[0]).toMatchSnapshot();
240
256
  expect(batchMock.mock.calls[0]).toMatchSnapshot();
@@ -251,7 +267,7 @@ describe('Client `list` method', () => {
251
267
  },
252
268
  time: {}
253
269
  }));
254
- const list = list_1.default({ call: callMock, batch: batchMock });
270
+ const list = (0, list_1.default)({ call: callMock, batch: batchMock });
255
271
  await list(methods_1.Method.CRM_DEAL_LIST, { start: 27 });
256
272
  expect(callMock.mock.calls).toMatchSnapshot();
257
273
  expect(batchMock.mock.calls).toMatchSnapshot();
@@ -259,4 +275,3 @@ describe('Client `list` method', () => {
259
275
  it.todo('should cast first request payload to the <P>');
260
276
  it.todo('should cast payload results to the <P>');
261
277
  });
262
- //# sourceMappingURL=list.unit.test.js.map
@@ -1,8 +1,8 @@
1
1
  import { Method } from './methods';
2
- export interface Command {
2
+ export declare type Command = {
3
3
  readonly method: Method;
4
4
  readonly params?: Record<string, any>;
5
- }
5
+ };
6
6
  export declare type Commands = {
7
7
  readonly [key: string]: Command;
8
8
  } | {
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=commands.js.map
@@ -42,14 +42,14 @@ export declare enum Method {
42
42
  declare const LISTABLE_METHODS: readonly [Method.CRM_COMPANY_LIST, Method.CRM_CONTACT_LIST, Method.CRM_DEAL_LIST, Method.CRM_LEAD_LIST];
43
43
  export declare type ListableMethod = typeof LISTABLE_METHODS[number];
44
44
  export declare type GettableMethod = Diff<Method, ListableMethod>;
45
- interface MethodsMap {
45
+ declare type MethodsMap = {
46
46
  readonly [key: string]: {
47
47
  readonly type: unknown;
48
48
  readonly payload: unknown;
49
- readonly params: Record<string, any>;
49
+ readonly params: Record<string, unknown>;
50
50
  };
51
- }
52
- export interface ListParams {
51
+ };
52
+ export declare type ListParams = {
53
53
  readonly start?: number;
54
54
  readonly order?: {
55
55
  readonly [key: string]: string;
@@ -57,17 +57,36 @@ export interface ListParams {
57
57
  readonly filter?: {
58
58
  readonly [key: string]: string | number;
59
59
  };
60
- readonly select?: ReadonlyArray<string>;
61
- }
62
- export interface Methods extends MethodsMap, CompaniesMethods, ContactsMethods, DealsMethods, LeadsMethods, StatusesMethods, UsersMethods {
60
+ readonly select?: readonly string[];
61
+ };
62
+ /**
63
+ * A mega map of all supported Bitrix methods to their parameters. Used to resolve
64
+ * low-level client method required params and payload types.
65
+ * - `type` — a type that method associated with
66
+ * - `payload` — a payload that method returns
67
+ * - `params` — params that method accepts
68
+ */
69
+ export declare type Methods = MethodsMap & CompaniesMethods & ContactsMethods & DealsMethods & LeadsMethods & StatusesMethods & UsersMethods & {
63
70
  readonly [Method.BATCH]: {
64
71
  readonly type: unknown;
65
72
  readonly payload: BatchPayload<unknown>;
66
73
  readonly params: Commands;
67
74
  };
68
- }
75
+ };
76
+ /**
77
+ * Retrieve specified method data
78
+ */
69
79
  export declare type MethodData<M extends Method> = ExtractValue<Methods, M>;
80
+ /**
81
+ * Retrieve associated with specified method type
82
+ */
70
83
  export declare type MethodPayloadType<M extends Method> = MethodData<M>['type'];
84
+ /**
85
+ * Retrieve specified method payload type
86
+ */
71
87
  export declare type MethodPayload<M extends Method> = MethodData<M>['payload'];
88
+ /**
89
+ * Retrieve specified method params
90
+ */
72
91
  export declare type MethodParams<M extends Method> = MethodData<M>['params'];
73
92
  export {};
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Method = void 0;
3
4
  var Method;
4
5
  (function (Method) {
5
6
  Method["BATCH"] = "batch";
@@ -38,4 +39,3 @@ const LISTABLE_METHODS = [
38
39
  Method.CRM_DEAL_LIST,
39
40
  Method.CRM_LEAD_LIST
40
41
  ];
41
- //# sourceMappingURL=methods.js.map
@@ -1,23 +1,23 @@
1
- export interface PayloadTime {
1
+ export declare type PayloadTime = {
2
2
  readonly start: number;
3
3
  readonly finish: number;
4
4
  readonly duration: number;
5
5
  readonly processing: number;
6
6
  readonly date_start: string;
7
7
  readonly date_finish: string;
8
- }
9
- export interface GetPayload<P> {
8
+ };
9
+ export declare type GetPayload<P> = {
10
10
  readonly result: P;
11
11
  readonly time: PayloadTime;
12
- }
13
- export interface ListPayload<P> {
12
+ };
13
+ export declare type ListPayload<P> = {
14
14
  readonly result: readonly P[];
15
15
  readonly error?: string;
16
16
  readonly total: number;
17
17
  readonly next?: number;
18
18
  readonly time: PayloadTime;
19
- }
20
- export interface BatchPayload<C> {
19
+ };
20
+ export declare type BatchPayload<C> = {
21
21
  readonly result: {
22
22
  readonly result: {
23
23
  readonly [P in keyof C]?: C[P];
@@ -36,5 +36,5 @@ export interface BatchPayload<C> {
36
36
  } | readonly PayloadTime[];
37
37
  };
38
38
  readonly time: PayloadTime;
39
- }
39
+ };
40
40
  export declare type Payload<P> = GetPayload<P> | ListPayload<P> | BatchPayload<P>;
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=payloads.js.map
@@ -2,7 +2,7 @@ export declare type NumberString = string;
2
2
  export declare type ISODate = string;
3
3
  export declare type BoolString = 'Y' | 'N';
4
4
  export declare type GenderString = 'M' | 'F' | '';
5
- export interface Fields {
5
+ export declare type Fields = {
6
6
  readonly [key: string]: {
7
7
  readonly type: string;
8
8
  readonly isRequired: boolean;
@@ -12,10 +12,11 @@ export interface Fields {
12
12
  readonly isDynamic: boolean;
13
13
  readonly title: string;
14
14
  };
15
- }
16
- export interface MultiField {
15
+ };
16
+ export declare type MultiField = {
17
17
  readonly ID: NumberString;
18
18
  readonly VALUE_TYPE: string;
19
19
  readonly VALUE: string;
20
20
  readonly TYPE_ID: string;
21
- }
21
+ };
22
+ export declare type MultiFieldArray = ReadonlyArray<Pick<MultiField, 'VALUE' | 'VALUE_TYPE'>>;
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=common.js.map
@@ -1,5 +1,6 @@
1
1
  import { BoolString, ISODate, MultiField, NumberString } from '../common';
2
- export interface Company {
2
+ export declare type Company = {
3
+ readonly [key: string]: string | boolean | null | readonly MultiField[];
3
4
  readonly ID: NumberString;
4
5
  readonly COMPANY_TYPE: string | null;
5
6
  readonly TITLE: string | null;
@@ -8,10 +9,10 @@ export interface Company {
8
9
  readonly HAS_PHONE: BoolString;
9
10
  readonly HAS_EMAIL: BoolString;
10
11
  readonly HAS_IMOL: BoolString;
11
- readonly PHONE: ReadonlyArray<MultiField>;
12
- readonly EMAIL: ReadonlyArray<MultiField>;
13
- readonly WEB: ReadonlyArray<MultiField>;
14
- readonly IM: ReadonlyArray<MultiField>;
12
+ readonly PHONE: readonly MultiField[];
13
+ readonly EMAIL: readonly MultiField[];
14
+ readonly WEB: readonly MultiField[];
15
+ readonly IM: readonly MultiField[];
15
16
  readonly ASSIGNED_BY_ID: NumberString;
16
17
  readonly CREATED_BY_ID: NumberString;
17
18
  readonly MODIFY_BY_ID: NumberString;
@@ -50,4 +51,4 @@ export interface Company {
50
51
  readonly UTM_CAMPAIGN: string | null;
51
52
  readonly UTM_CONTENT: string | null;
52
53
  readonly UTM_TERM: string | null;
53
- }
54
+ };
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=entities.js.map