@superoffice/webapi 10.2.9

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 (692) hide show
  1. package/LICENSE.md +15 -0
  2. package/README.md +184 -0
  3. package/__tests__/Appointment63-notz.json +1925 -0
  4. package/__tests__/Appointment63-utctz.json +1925 -0
  5. package/__tests__/Appointment63.json +1925 -0
  6. package/__tests__/AppointmentTzTest.ts +114 -0
  7. package/__tests__/AxiosNockTest.ts +28 -0
  8. package/__tests__/ContactDefault.json +699 -0
  9. package/__tests__/ContactEntity.json +273 -0
  10. package/__tests__/ContactRestTest.ts +144 -0
  11. package/__tests__/ContactTest.ts +395 -0
  12. package/__tests__/ConvertersTest.ts +97 -0
  13. package/__tests__/DocumentGetTemplateStream.json +1 -0
  14. package/__tests__/DocumentGetTemplateStreamBinary.json +1 -0
  15. package/__tests__/DocumentTest.ts +101 -0
  16. package/__tests__/Person210-notz.json +1932 -0
  17. package/__tests__/Person210-utctz.json +1932 -0
  18. package/__tests__/Person210.json +1932 -0
  19. package/__tests__/PersonImageData.nock +23 -0
  20. package/__tests__/PersonTest.ts +41 -0
  21. package/__tests__/PersonTzTest.ts +113 -0
  22. package/__tests__/RecurrenceInfo.json +55 -0
  23. package/__tests__/TableRights.json +441 -0
  24. package/__tests__/WebapiTest.ts +264 -0
  25. package/__tests__/Webhook.json +17 -0
  26. package/__tests__/WebhookTest.ts +209 -0
  27. package/dist/cjs/AIAgent.d.ts +265 -0
  28. package/dist/cjs/AIAgent.d.ts.map +1 -0
  29. package/dist/cjs/AIAgent.js +535 -0
  30. package/dist/cjs/AIAgent.js.map +1 -0
  31. package/dist/cjs/AppointmentAgent.d.ts +1539 -0
  32. package/dist/cjs/AppointmentAgent.d.ts.map +1 -0
  33. package/dist/cjs/AppointmentAgent.js +3363 -0
  34. package/dist/cjs/AppointmentAgent.js.map +1 -0
  35. package/dist/cjs/AppointmentRestApi.d.ts +46 -0
  36. package/dist/cjs/AppointmentRestApi.d.ts.map +1 -0
  37. package/dist/cjs/AppointmentRestApi.js +168 -0
  38. package/dist/cjs/AppointmentRestApi.js.map +1 -0
  39. package/dist/cjs/ArchiveAgent.d.ts +582 -0
  40. package/dist/cjs/ArchiveAgent.d.ts.map +1 -0
  41. package/dist/cjs/ArchiveAgent.js +1135 -0
  42. package/dist/cjs/ArchiveAgent.js.map +1 -0
  43. package/dist/cjs/AssociateAgent.d.ts +109 -0
  44. package/dist/cjs/AssociateAgent.d.ts.map +1 -0
  45. package/dist/cjs/AssociateAgent.js +257 -0
  46. package/dist/cjs/AssociateAgent.js.map +1 -0
  47. package/dist/cjs/AudienceAgent.d.ts +359 -0
  48. package/dist/cjs/AudienceAgent.d.ts.map +1 -0
  49. package/dist/cjs/AudienceAgent.js +888 -0
  50. package/dist/cjs/AudienceAgent.js.map +1 -0
  51. package/dist/cjs/AxiosCacheHandler.d.ts +20 -0
  52. package/dist/cjs/AxiosCacheHandler.d.ts.map +1 -0
  53. package/dist/cjs/AxiosCacheHandler.js +68 -0
  54. package/dist/cjs/AxiosCacheHandler.js.map +1 -0
  55. package/dist/cjs/BLOBAgent.d.ts +538 -0
  56. package/dist/cjs/BLOBAgent.d.ts.map +1 -0
  57. package/dist/cjs/BLOBAgent.js +1364 -0
  58. package/dist/cjs/BLOBAgent.js.map +1 -0
  59. package/dist/cjs/Base64.d.ts +4 -0
  60. package/dist/cjs/Base64.d.ts.map +1 -0
  61. package/dist/cjs/Base64.js +233 -0
  62. package/dist/cjs/Base64.js.map +1 -0
  63. package/dist/cjs/BatchAgent.d.ts +252 -0
  64. package/dist/cjs/BatchAgent.d.ts.map +1 -0
  65. package/dist/cjs/BatchAgent.js +522 -0
  66. package/dist/cjs/BatchAgent.js.map +1 -0
  67. package/dist/cjs/BulkUpdateAgent.d.ts +144 -0
  68. package/dist/cjs/BulkUpdateAgent.d.ts.map +1 -0
  69. package/dist/cjs/BulkUpdateAgent.js +288 -0
  70. package/dist/cjs/BulkUpdateAgent.js.map +1 -0
  71. package/dist/cjs/CRMScriptAgent.d.ts +330 -0
  72. package/dist/cjs/CRMScriptAgent.d.ts.map +1 -0
  73. package/dist/cjs/CRMScriptAgent.js +799 -0
  74. package/dist/cjs/CRMScriptAgent.js.map +1 -0
  75. package/dist/cjs/Carriers.d.ts +36976 -0
  76. package/dist/cjs/Carriers.d.ts.map +1 -0
  77. package/dist/cjs/Carriers.js +8 -0
  78. package/dist/cjs/Carriers.js.map +1 -0
  79. package/dist/cjs/ChatAgent.d.ts +366 -0
  80. package/dist/cjs/ChatAgent.d.ts.map +1 -0
  81. package/dist/cjs/ChatAgent.js +919 -0
  82. package/dist/cjs/ChatAgent.js.map +1 -0
  83. package/dist/cjs/ConfigurationAgent.d.ts +534 -0
  84. package/dist/cjs/ConfigurationAgent.d.ts.map +1 -0
  85. package/dist/cjs/ConfigurationAgent.js +1429 -0
  86. package/dist/cjs/ConfigurationAgent.js.map +1 -0
  87. package/dist/cjs/ContactAgent.d.ts +415 -0
  88. package/dist/cjs/ContactAgent.d.ts.map +1 -0
  89. package/dist/cjs/ContactAgent.js +1005 -0
  90. package/dist/cjs/ContactAgent.js.map +1 -0
  91. package/dist/cjs/ContactRestApi.d.ts +46 -0
  92. package/dist/cjs/ContactRestApi.d.ts.map +1 -0
  93. package/dist/cjs/ContactRestApi.js +168 -0
  94. package/dist/cjs/ContactRestApi.js.map +1 -0
  95. package/dist/cjs/Converters.d.ts +1359 -0
  96. package/dist/cjs/Converters.d.ts.map +1 -0
  97. package/dist/cjs/Converters.js +18996 -0
  98. package/dist/cjs/Converters.js.map +1 -0
  99. package/dist/cjs/CustomerServiceAgent.d.ts +447 -0
  100. package/dist/cjs/CustomerServiceAgent.d.ts.map +1 -0
  101. package/dist/cjs/CustomerServiceAgent.js +1123 -0
  102. package/dist/cjs/CustomerServiceAgent.js.map +1 -0
  103. package/dist/cjs/DashAgent.d.ts +370 -0
  104. package/dist/cjs/DashAgent.d.ts.map +1 -0
  105. package/dist/cjs/DashAgent.js +1028 -0
  106. package/dist/cjs/DashAgent.js.map +1 -0
  107. package/dist/cjs/DashboardAgent.d.ts +163 -0
  108. package/dist/cjs/DashboardAgent.d.ts.map +1 -0
  109. package/dist/cjs/DashboardAgent.js +436 -0
  110. package/dist/cjs/DashboardAgent.js.map +1 -0
  111. package/dist/cjs/DatabaseAgent.d.ts +35 -0
  112. package/dist/cjs/DatabaseAgent.d.ts.map +1 -0
  113. package/dist/cjs/DatabaseAgent.js +70 -0
  114. package/dist/cjs/DatabaseAgent.js.map +1 -0
  115. package/dist/cjs/DatabaseTableAgent.d.ts +155 -0
  116. package/dist/cjs/DatabaseTableAgent.d.ts.map +1 -0
  117. package/dist/cjs/DatabaseTableAgent.js +299 -0
  118. package/dist/cjs/DatabaseTableAgent.js.map +1 -0
  119. package/dist/cjs/Day_js.d.ts +4 -0
  120. package/dist/cjs/Day_js.d.ts.map +1 -0
  121. package/dist/cjs/Day_js.js +44 -0
  122. package/dist/cjs/Day_js.js.map +1 -0
  123. package/dist/cjs/DiagnosticsAgent.d.ts +200 -0
  124. package/dist/cjs/DiagnosticsAgent.d.ts.map +1 -0
  125. package/dist/cjs/DiagnosticsAgent.js +480 -0
  126. package/dist/cjs/DiagnosticsAgent.js.map +1 -0
  127. package/dist/cjs/DocumentAgent.d.ts +1345 -0
  128. package/dist/cjs/DocumentAgent.d.ts.map +1 -0
  129. package/dist/cjs/DocumentAgent.js +3058 -0
  130. package/dist/cjs/DocumentAgent.js.map +1 -0
  131. package/dist/cjs/DocumentMigrationAgent.d.ts +145 -0
  132. package/dist/cjs/DocumentMigrationAgent.d.ts.map +1 -0
  133. package/dist/cjs/DocumentMigrationAgent.js +297 -0
  134. package/dist/cjs/DocumentMigrationAgent.js.map +1 -0
  135. package/dist/cjs/DocumentRestApi.d.ts +46 -0
  136. package/dist/cjs/DocumentRestApi.d.ts.map +1 -0
  137. package/dist/cjs/DocumentRestApi.js +168 -0
  138. package/dist/cjs/DocumentRestApi.js.map +1 -0
  139. package/dist/cjs/EMailAgent.d.ts +1417 -0
  140. package/dist/cjs/EMailAgent.d.ts.map +1 -0
  141. package/dist/cjs/EMailAgent.js +3202 -0
  142. package/dist/cjs/EMailAgent.js.map +1 -0
  143. package/dist/cjs/Enums.d.ts +6083 -0
  144. package/dist/cjs/Enums.d.ts.map +1 -0
  145. package/dist/cjs/Enums.js +6270 -0
  146. package/dist/cjs/Enums.js.map +1 -0
  147. package/dist/cjs/ErpSyncAgent.d.ts +725 -0
  148. package/dist/cjs/ErpSyncAgent.d.ts.map +1 -0
  149. package/dist/cjs/ErpSyncAgent.js +1601 -0
  150. package/dist/cjs/ErpSyncAgent.js.map +1 -0
  151. package/dist/cjs/FavouriteAgent.d.ts +208 -0
  152. package/dist/cjs/FavouriteAgent.d.ts.map +1 -0
  153. package/dist/cjs/FavouriteAgent.js +407 -0
  154. package/dist/cjs/FavouriteAgent.js.map +1 -0
  155. package/dist/cjs/FindAgent.d.ts +688 -0
  156. package/dist/cjs/FindAgent.d.ts.map +1 -0
  157. package/dist/cjs/FindAgent.js +1337 -0
  158. package/dist/cjs/FindAgent.js.map +1 -0
  159. package/dist/cjs/ForeignSystemAgent.d.ts +478 -0
  160. package/dist/cjs/ForeignSystemAgent.d.ts.map +1 -0
  161. package/dist/cjs/ForeignSystemAgent.js +1022 -0
  162. package/dist/cjs/ForeignSystemAgent.js.map +1 -0
  163. package/dist/cjs/FreeTextAgent.d.ts +172 -0
  164. package/dist/cjs/FreeTextAgent.d.ts.map +1 -0
  165. package/dist/cjs/FreeTextAgent.js +368 -0
  166. package/dist/cjs/FreeTextAgent.js.map +1 -0
  167. package/dist/cjs/ImportAgent.d.ts +92 -0
  168. package/dist/cjs/ImportAgent.d.ts.map +1 -0
  169. package/dist/cjs/ImportAgent.js +164 -0
  170. package/dist/cjs/ImportAgent.js.map +1 -0
  171. package/dist/cjs/LicenseAgent.d.ts +298 -0
  172. package/dist/cjs/LicenseAgent.d.ts.map +1 -0
  173. package/dist/cjs/LicenseAgent.js +639 -0
  174. package/dist/cjs/LicenseAgent.js.map +1 -0
  175. package/dist/cjs/ListAgent.d.ts +2423 -0
  176. package/dist/cjs/ListAgent.d.ts.map +1 -0
  177. package/dist/cjs/ListAgent.js +7813 -0
  178. package/dist/cjs/ListAgent.js.map +1 -0
  179. package/dist/cjs/MDOAgent.d.ts +214 -0
  180. package/dist/cjs/MDOAgent.d.ts.map +1 -0
  181. package/dist/cjs/MDOAgent.js +430 -0
  182. package/dist/cjs/MDOAgent.js.map +1 -0
  183. package/dist/cjs/MarketingAgent.d.ts +170 -0
  184. package/dist/cjs/MarketingAgent.d.ts.map +1 -0
  185. package/dist/cjs/MarketingAgent.js +570 -0
  186. package/dist/cjs/MarketingAgent.js.map +1 -0
  187. package/dist/cjs/MessagingAgent.d.ts +111 -0
  188. package/dist/cjs/MessagingAgent.d.ts.map +1 -0
  189. package/dist/cjs/MessagingAgent.js +217 -0
  190. package/dist/cjs/MessagingAgent.js.map +1 -0
  191. package/dist/cjs/NavigatorAgent.d.ts +40 -0
  192. package/dist/cjs/NavigatorAgent.d.ts.map +1 -0
  193. package/dist/cjs/NavigatorAgent.js +99 -0
  194. package/dist/cjs/NavigatorAgent.js.map +1 -0
  195. package/dist/cjs/NumberAllocationAgent.d.ts +72 -0
  196. package/dist/cjs/NumberAllocationAgent.d.ts.map +1 -0
  197. package/dist/cjs/NumberAllocationAgent.js +199 -0
  198. package/dist/cjs/NumberAllocationAgent.js.map +1 -0
  199. package/dist/cjs/PersonAgent.d.ts +774 -0
  200. package/dist/cjs/PersonAgent.d.ts.map +1 -0
  201. package/dist/cjs/PersonAgent.js +1814 -0
  202. package/dist/cjs/PersonAgent.js.map +1 -0
  203. package/dist/cjs/PersonRestApi.d.ts +46 -0
  204. package/dist/cjs/PersonRestApi.d.ts.map +1 -0
  205. package/dist/cjs/PersonRestApi.js +168 -0
  206. package/dist/cjs/PersonRestApi.js.map +1 -0
  207. package/dist/cjs/PhoneListAgent.d.ts +126 -0
  208. package/dist/cjs/PhoneListAgent.d.ts.map +1 -0
  209. package/dist/cjs/PhoneListAgent.js +269 -0
  210. package/dist/cjs/PhoneListAgent.js.map +1 -0
  211. package/dist/cjs/PocketAgent.d.ts +218 -0
  212. package/dist/cjs/PocketAgent.d.ts.map +1 -0
  213. package/dist/cjs/PocketAgent.js +451 -0
  214. package/dist/cjs/PocketAgent.js.map +1 -0
  215. package/dist/cjs/PreferenceAgent.d.ts +497 -0
  216. package/dist/cjs/PreferenceAgent.d.ts.map +1 -0
  217. package/dist/cjs/PreferenceAgent.js +1194 -0
  218. package/dist/cjs/PreferenceAgent.js.map +1 -0
  219. package/dist/cjs/PreviewsAgent.d.ts +36 -0
  220. package/dist/cjs/PreviewsAgent.d.ts.map +1 -0
  221. package/dist/cjs/PreviewsAgent.js +54 -0
  222. package/dist/cjs/PreviewsAgent.js.map +1 -0
  223. package/dist/cjs/ProjectAgent.d.ts +558 -0
  224. package/dist/cjs/ProjectAgent.d.ts.map +1 -0
  225. package/dist/cjs/ProjectAgent.js +1482 -0
  226. package/dist/cjs/ProjectAgent.js.map +1 -0
  227. package/dist/cjs/ProjectRestApi.d.ts +46 -0
  228. package/dist/cjs/ProjectRestApi.d.ts.map +1 -0
  229. package/dist/cjs/ProjectRestApi.js +168 -0
  230. package/dist/cjs/ProjectRestApi.js.map +1 -0
  231. package/dist/cjs/QuoteAgent.d.ts +1415 -0
  232. package/dist/cjs/QuoteAgent.d.ts.map +1 -0
  233. package/dist/cjs/QuoteAgent.js +3224 -0
  234. package/dist/cjs/QuoteAgent.js.map +1 -0
  235. package/dist/cjs/RelationAgent.d.ts +61 -0
  236. package/dist/cjs/RelationAgent.d.ts.map +1 -0
  237. package/dist/cjs/RelationAgent.js +132 -0
  238. package/dist/cjs/RelationAgent.js.map +1 -0
  239. package/dist/cjs/ReplicationAgent.d.ts +77 -0
  240. package/dist/cjs/ReplicationAgent.d.ts.map +1 -0
  241. package/dist/cjs/ReplicationAgent.js +223 -0
  242. package/dist/cjs/ReplicationAgent.js.map +1 -0
  243. package/dist/cjs/ReportAgent.d.ts +144 -0
  244. package/dist/cjs/ReportAgent.d.ts.map +1 -0
  245. package/dist/cjs/ReportAgent.js +380 -0
  246. package/dist/cjs/ReportAgent.js.map +1 -0
  247. package/dist/cjs/ResourceAgent.d.ts +105 -0
  248. package/dist/cjs/ResourceAgent.d.ts.map +1 -0
  249. package/dist/cjs/ResourceAgent.js +196 -0
  250. package/dist/cjs/ResourceAgent.js.map +1 -0
  251. package/dist/cjs/SaintAgent.d.ts +157 -0
  252. package/dist/cjs/SaintAgent.d.ts.map +1 -0
  253. package/dist/cjs/SaintAgent.js +402 -0
  254. package/dist/cjs/SaintAgent.js.map +1 -0
  255. package/dist/cjs/SaleAgent.d.ts +477 -0
  256. package/dist/cjs/SaleAgent.d.ts.map +1 -0
  257. package/dist/cjs/SaleAgent.js +1182 -0
  258. package/dist/cjs/SaleAgent.js.map +1 -0
  259. package/dist/cjs/SaleRestApi.d.ts +46 -0
  260. package/dist/cjs/SaleRestApi.d.ts.map +1 -0
  261. package/dist/cjs/SaleRestApi.js +168 -0
  262. package/dist/cjs/SaleRestApi.js.map +1 -0
  263. package/dist/cjs/SelectionAgent.d.ts +814 -0
  264. package/dist/cjs/SelectionAgent.d.ts.map +1 -0
  265. package/dist/cjs/SelectionAgent.js +1795 -0
  266. package/dist/cjs/SelectionAgent.js.map +1 -0
  267. package/dist/cjs/SentryAgent.d.ts +113 -0
  268. package/dist/cjs/SentryAgent.d.ts.map +1 -0
  269. package/dist/cjs/SentryAgent.js +238 -0
  270. package/dist/cjs/SentryAgent.js.map +1 -0
  271. package/dist/cjs/SoApiConstants.d.ts +8 -0
  272. package/dist/cjs/SoApiConstants.d.ts.map +1 -0
  273. package/dist/cjs/SoApiConstants.js +12 -0
  274. package/dist/cjs/SoApiConstants.js.map +1 -0
  275. package/dist/cjs/TargetsAgent.d.ts +289 -0
  276. package/dist/cjs/TargetsAgent.d.ts.map +1 -0
  277. package/dist/cjs/TargetsAgent.js +728 -0
  278. package/dist/cjs/TargetsAgent.js.map +1 -0
  279. package/dist/cjs/TicketAgent.d.ts +802 -0
  280. package/dist/cjs/TicketAgent.d.ts.map +1 -0
  281. package/dist/cjs/TicketAgent.js +1865 -0
  282. package/dist/cjs/TicketAgent.js.map +1 -0
  283. package/dist/cjs/TimeZoneAgent.d.ts +139 -0
  284. package/dist/cjs/TimeZoneAgent.d.ts.map +1 -0
  285. package/dist/cjs/TimeZoneAgent.js +348 -0
  286. package/dist/cjs/TimeZoneAgent.js.map +1 -0
  287. package/dist/cjs/TooltipsAgent.d.ts +36 -0
  288. package/dist/cjs/TooltipsAgent.d.ts.map +1 -0
  289. package/dist/cjs/TooltipsAgent.js +54 -0
  290. package/dist/cjs/TooltipsAgent.js.map +1 -0
  291. package/dist/cjs/UserAgent.d.ts +1260 -0
  292. package/dist/cjs/UserAgent.d.ts.map +1 -0
  293. package/dist/cjs/UserAgent.js +2978 -0
  294. package/dist/cjs/UserAgent.js.map +1 -0
  295. package/dist/cjs/UserDefinedFieldInfoAgent.d.ts +474 -0
  296. package/dist/cjs/UserDefinedFieldInfoAgent.d.ts.map +1 -0
  297. package/dist/cjs/UserDefinedFieldInfoAgent.js +1067 -0
  298. package/dist/cjs/UserDefinedFieldInfoAgent.js.map +1 -0
  299. package/dist/cjs/ViewStateAgent.d.ts +230 -0
  300. package/dist/cjs/ViewStateAgent.d.ts.map +1 -0
  301. package/dist/cjs/ViewStateAgent.js +518 -0
  302. package/dist/cjs/ViewStateAgent.js.map +1 -0
  303. package/dist/cjs/WebApi.d.ts +427 -0
  304. package/dist/cjs/WebApi.d.ts.map +1 -0
  305. package/dist/cjs/WebApi.js +656 -0
  306. package/dist/cjs/WebApi.js.map +1 -0
  307. package/dist/cjs/WebApiBase.d.ts +152 -0
  308. package/dist/cjs/WebApiBase.d.ts.map +1 -0
  309. package/dist/cjs/WebApiBase.js +442 -0
  310. package/dist/cjs/WebApiBase.js.map +1 -0
  311. package/dist/cjs/WebhookAgent.d.ts +102 -0
  312. package/dist/cjs/WebhookAgent.d.ts.map +1 -0
  313. package/dist/cjs/WebhookAgent.js +245 -0
  314. package/dist/cjs/WebhookAgent.js.map +1 -0
  315. package/dist/cjs/WorkflowAgent.d.ts +250 -0
  316. package/dist/cjs/WorkflowAgent.d.ts.map +1 -0
  317. package/dist/cjs/WorkflowAgent.js +763 -0
  318. package/dist/cjs/WorkflowAgent.js.map +1 -0
  319. package/dist/cjs/package.json +1 -0
  320. package/dist/esm/AIAgent.d.ts +265 -0
  321. package/dist/esm/AIAgent.d.ts.map +1 -0
  322. package/dist/esm/AIAgent.js +530 -0
  323. package/dist/esm/AIAgent.js.map +1 -0
  324. package/dist/esm/AppointmentAgent.d.ts +1539 -0
  325. package/dist/esm/AppointmentAgent.d.ts.map +1 -0
  326. package/dist/esm/AppointmentAgent.js +3358 -0
  327. package/dist/esm/AppointmentAgent.js.map +1 -0
  328. package/dist/esm/AppointmentRestApi.d.ts +46 -0
  329. package/dist/esm/AppointmentRestApi.d.ts.map +1 -0
  330. package/dist/esm/AppointmentRestApi.js +163 -0
  331. package/dist/esm/AppointmentRestApi.js.map +1 -0
  332. package/dist/esm/ArchiveAgent.d.ts +582 -0
  333. package/dist/esm/ArchiveAgent.d.ts.map +1 -0
  334. package/dist/esm/ArchiveAgent.js +1130 -0
  335. package/dist/esm/ArchiveAgent.js.map +1 -0
  336. package/dist/esm/AssociateAgent.d.ts +109 -0
  337. package/dist/esm/AssociateAgent.d.ts.map +1 -0
  338. package/dist/esm/AssociateAgent.js +252 -0
  339. package/dist/esm/AssociateAgent.js.map +1 -0
  340. package/dist/esm/AudienceAgent.d.ts +359 -0
  341. package/dist/esm/AudienceAgent.d.ts.map +1 -0
  342. package/dist/esm/AudienceAgent.js +883 -0
  343. package/dist/esm/AudienceAgent.js.map +1 -0
  344. package/dist/esm/AxiosCacheHandler.d.ts +20 -0
  345. package/dist/esm/AxiosCacheHandler.d.ts.map +1 -0
  346. package/dist/esm/AxiosCacheHandler.js +64 -0
  347. package/dist/esm/AxiosCacheHandler.js.map +1 -0
  348. package/dist/esm/BLOBAgent.d.ts +538 -0
  349. package/dist/esm/BLOBAgent.d.ts.map +1 -0
  350. package/dist/esm/BLOBAgent.js +1359 -0
  351. package/dist/esm/BLOBAgent.js.map +1 -0
  352. package/dist/esm/Base64.d.ts +4 -0
  353. package/dist/esm/Base64.d.ts.map +1 -0
  354. package/dist/esm/Base64.js +228 -0
  355. package/dist/esm/Base64.js.map +1 -0
  356. package/dist/esm/BatchAgent.d.ts +252 -0
  357. package/dist/esm/BatchAgent.d.ts.map +1 -0
  358. package/dist/esm/BatchAgent.js +517 -0
  359. package/dist/esm/BatchAgent.js.map +1 -0
  360. package/dist/esm/BulkUpdateAgent.d.ts +144 -0
  361. package/dist/esm/BulkUpdateAgent.d.ts.map +1 -0
  362. package/dist/esm/BulkUpdateAgent.js +283 -0
  363. package/dist/esm/BulkUpdateAgent.js.map +1 -0
  364. package/dist/esm/CRMScriptAgent.d.ts +330 -0
  365. package/dist/esm/CRMScriptAgent.d.ts.map +1 -0
  366. package/dist/esm/CRMScriptAgent.js +794 -0
  367. package/dist/esm/CRMScriptAgent.js.map +1 -0
  368. package/dist/esm/Carriers.d.ts +36976 -0
  369. package/dist/esm/Carriers.d.ts.map +1 -0
  370. package/dist/esm/Carriers.js +6 -0
  371. package/dist/esm/Carriers.js.map +1 -0
  372. package/dist/esm/ChatAgent.d.ts +366 -0
  373. package/dist/esm/ChatAgent.d.ts.map +1 -0
  374. package/dist/esm/ChatAgent.js +914 -0
  375. package/dist/esm/ChatAgent.js.map +1 -0
  376. package/dist/esm/ConfigurationAgent.d.ts +534 -0
  377. package/dist/esm/ConfigurationAgent.d.ts.map +1 -0
  378. package/dist/esm/ConfigurationAgent.js +1424 -0
  379. package/dist/esm/ConfigurationAgent.js.map +1 -0
  380. package/dist/esm/ContactAgent.d.ts +415 -0
  381. package/dist/esm/ContactAgent.d.ts.map +1 -0
  382. package/dist/esm/ContactAgent.js +1000 -0
  383. package/dist/esm/ContactAgent.js.map +1 -0
  384. package/dist/esm/ContactRestApi.d.ts +46 -0
  385. package/dist/esm/ContactRestApi.d.ts.map +1 -0
  386. package/dist/esm/ContactRestApi.js +163 -0
  387. package/dist/esm/ContactRestApi.js.map +1 -0
  388. package/dist/esm/Converters.d.ts +1359 -0
  389. package/dist/esm/Converters.d.ts.map +1 -0
  390. package/dist/esm/Converters.js +17609 -0
  391. package/dist/esm/Converters.js.map +1 -0
  392. package/dist/esm/CustomerServiceAgent.d.ts +447 -0
  393. package/dist/esm/CustomerServiceAgent.d.ts.map +1 -0
  394. package/dist/esm/CustomerServiceAgent.js +1118 -0
  395. package/dist/esm/CustomerServiceAgent.js.map +1 -0
  396. package/dist/esm/DashAgent.d.ts +370 -0
  397. package/dist/esm/DashAgent.d.ts.map +1 -0
  398. package/dist/esm/DashAgent.js +1023 -0
  399. package/dist/esm/DashAgent.js.map +1 -0
  400. package/dist/esm/DashboardAgent.d.ts +163 -0
  401. package/dist/esm/DashboardAgent.d.ts.map +1 -0
  402. package/dist/esm/DashboardAgent.js +431 -0
  403. package/dist/esm/DashboardAgent.js.map +1 -0
  404. package/dist/esm/DatabaseAgent.d.ts +35 -0
  405. package/dist/esm/DatabaseAgent.d.ts.map +1 -0
  406. package/dist/esm/DatabaseAgent.js +65 -0
  407. package/dist/esm/DatabaseAgent.js.map +1 -0
  408. package/dist/esm/DatabaseTableAgent.d.ts +155 -0
  409. package/dist/esm/DatabaseTableAgent.d.ts.map +1 -0
  410. package/dist/esm/DatabaseTableAgent.js +294 -0
  411. package/dist/esm/DatabaseTableAgent.js.map +1 -0
  412. package/dist/esm/Day_js.d.ts +4 -0
  413. package/dist/esm/Day_js.d.ts.map +1 -0
  414. package/dist/esm/Day_js.js +38 -0
  415. package/dist/esm/Day_js.js.map +1 -0
  416. package/dist/esm/DiagnosticsAgent.d.ts +200 -0
  417. package/dist/esm/DiagnosticsAgent.d.ts.map +1 -0
  418. package/dist/esm/DiagnosticsAgent.js +475 -0
  419. package/dist/esm/DiagnosticsAgent.js.map +1 -0
  420. package/dist/esm/DocumentAgent.d.ts +1345 -0
  421. package/dist/esm/DocumentAgent.d.ts.map +1 -0
  422. package/dist/esm/DocumentAgent.js +3053 -0
  423. package/dist/esm/DocumentAgent.js.map +1 -0
  424. package/dist/esm/DocumentMigrationAgent.d.ts +145 -0
  425. package/dist/esm/DocumentMigrationAgent.d.ts.map +1 -0
  426. package/dist/esm/DocumentMigrationAgent.js +292 -0
  427. package/dist/esm/DocumentMigrationAgent.js.map +1 -0
  428. package/dist/esm/DocumentRestApi.d.ts +46 -0
  429. package/dist/esm/DocumentRestApi.d.ts.map +1 -0
  430. package/dist/esm/DocumentRestApi.js +163 -0
  431. package/dist/esm/DocumentRestApi.js.map +1 -0
  432. package/dist/esm/EMailAgent.d.ts +1417 -0
  433. package/dist/esm/EMailAgent.d.ts.map +1 -0
  434. package/dist/esm/EMailAgent.js +3197 -0
  435. package/dist/esm/EMailAgent.js.map +1 -0
  436. package/dist/esm/Enums.d.ts +6083 -0
  437. package/dist/esm/Enums.d.ts.map +1 -0
  438. package/dist/esm/Enums.js +6264 -0
  439. package/dist/esm/Enums.js.map +1 -0
  440. package/dist/esm/ErpSyncAgent.d.ts +725 -0
  441. package/dist/esm/ErpSyncAgent.d.ts.map +1 -0
  442. package/dist/esm/ErpSyncAgent.js +1596 -0
  443. package/dist/esm/ErpSyncAgent.js.map +1 -0
  444. package/dist/esm/FavouriteAgent.d.ts +208 -0
  445. package/dist/esm/FavouriteAgent.d.ts.map +1 -0
  446. package/dist/esm/FavouriteAgent.js +402 -0
  447. package/dist/esm/FavouriteAgent.js.map +1 -0
  448. package/dist/esm/FindAgent.d.ts +688 -0
  449. package/dist/esm/FindAgent.d.ts.map +1 -0
  450. package/dist/esm/FindAgent.js +1332 -0
  451. package/dist/esm/FindAgent.js.map +1 -0
  452. package/dist/esm/ForeignSystemAgent.d.ts +478 -0
  453. package/dist/esm/ForeignSystemAgent.d.ts.map +1 -0
  454. package/dist/esm/ForeignSystemAgent.js +1017 -0
  455. package/dist/esm/ForeignSystemAgent.js.map +1 -0
  456. package/dist/esm/FreeTextAgent.d.ts +172 -0
  457. package/dist/esm/FreeTextAgent.d.ts.map +1 -0
  458. package/dist/esm/FreeTextAgent.js +363 -0
  459. package/dist/esm/FreeTextAgent.js.map +1 -0
  460. package/dist/esm/ImportAgent.d.ts +92 -0
  461. package/dist/esm/ImportAgent.d.ts.map +1 -0
  462. package/dist/esm/ImportAgent.js +159 -0
  463. package/dist/esm/ImportAgent.js.map +1 -0
  464. package/dist/esm/LicenseAgent.d.ts +298 -0
  465. package/dist/esm/LicenseAgent.d.ts.map +1 -0
  466. package/dist/esm/LicenseAgent.js +634 -0
  467. package/dist/esm/LicenseAgent.js.map +1 -0
  468. package/dist/esm/ListAgent.d.ts +2423 -0
  469. package/dist/esm/ListAgent.d.ts.map +1 -0
  470. package/dist/esm/ListAgent.js +7808 -0
  471. package/dist/esm/ListAgent.js.map +1 -0
  472. package/dist/esm/MDOAgent.d.ts +214 -0
  473. package/dist/esm/MDOAgent.d.ts.map +1 -0
  474. package/dist/esm/MDOAgent.js +425 -0
  475. package/dist/esm/MDOAgent.js.map +1 -0
  476. package/dist/esm/MarketingAgent.d.ts +170 -0
  477. package/dist/esm/MarketingAgent.d.ts.map +1 -0
  478. package/dist/esm/MarketingAgent.js +565 -0
  479. package/dist/esm/MarketingAgent.js.map +1 -0
  480. package/dist/esm/MessagingAgent.d.ts +111 -0
  481. package/dist/esm/MessagingAgent.d.ts.map +1 -0
  482. package/dist/esm/MessagingAgent.js +212 -0
  483. package/dist/esm/MessagingAgent.js.map +1 -0
  484. package/dist/esm/NavigatorAgent.d.ts +40 -0
  485. package/dist/esm/NavigatorAgent.d.ts.map +1 -0
  486. package/dist/esm/NavigatorAgent.js +94 -0
  487. package/dist/esm/NavigatorAgent.js.map +1 -0
  488. package/dist/esm/NumberAllocationAgent.d.ts +72 -0
  489. package/dist/esm/NumberAllocationAgent.d.ts.map +1 -0
  490. package/dist/esm/NumberAllocationAgent.js +194 -0
  491. package/dist/esm/NumberAllocationAgent.js.map +1 -0
  492. package/dist/esm/PersonAgent.d.ts +774 -0
  493. package/dist/esm/PersonAgent.d.ts.map +1 -0
  494. package/dist/esm/PersonAgent.js +1809 -0
  495. package/dist/esm/PersonAgent.js.map +1 -0
  496. package/dist/esm/PersonRestApi.d.ts +46 -0
  497. package/dist/esm/PersonRestApi.d.ts.map +1 -0
  498. package/dist/esm/PersonRestApi.js +163 -0
  499. package/dist/esm/PersonRestApi.js.map +1 -0
  500. package/dist/esm/PhoneListAgent.d.ts +126 -0
  501. package/dist/esm/PhoneListAgent.d.ts.map +1 -0
  502. package/dist/esm/PhoneListAgent.js +264 -0
  503. package/dist/esm/PhoneListAgent.js.map +1 -0
  504. package/dist/esm/PocketAgent.d.ts +218 -0
  505. package/dist/esm/PocketAgent.d.ts.map +1 -0
  506. package/dist/esm/PocketAgent.js +446 -0
  507. package/dist/esm/PocketAgent.js.map +1 -0
  508. package/dist/esm/PreferenceAgent.d.ts +497 -0
  509. package/dist/esm/PreferenceAgent.d.ts.map +1 -0
  510. package/dist/esm/PreferenceAgent.js +1189 -0
  511. package/dist/esm/PreferenceAgent.js.map +1 -0
  512. package/dist/esm/PreviewsAgent.d.ts +36 -0
  513. package/dist/esm/PreviewsAgent.d.ts.map +1 -0
  514. package/dist/esm/PreviewsAgent.js +49 -0
  515. package/dist/esm/PreviewsAgent.js.map +1 -0
  516. package/dist/esm/ProjectAgent.d.ts +558 -0
  517. package/dist/esm/ProjectAgent.d.ts.map +1 -0
  518. package/dist/esm/ProjectAgent.js +1477 -0
  519. package/dist/esm/ProjectAgent.js.map +1 -0
  520. package/dist/esm/ProjectRestApi.d.ts +46 -0
  521. package/dist/esm/ProjectRestApi.d.ts.map +1 -0
  522. package/dist/esm/ProjectRestApi.js +163 -0
  523. package/dist/esm/ProjectRestApi.js.map +1 -0
  524. package/dist/esm/QuoteAgent.d.ts +1415 -0
  525. package/dist/esm/QuoteAgent.d.ts.map +1 -0
  526. package/dist/esm/QuoteAgent.js +3219 -0
  527. package/dist/esm/QuoteAgent.js.map +1 -0
  528. package/dist/esm/RelationAgent.d.ts +61 -0
  529. package/dist/esm/RelationAgent.d.ts.map +1 -0
  530. package/dist/esm/RelationAgent.js +127 -0
  531. package/dist/esm/RelationAgent.js.map +1 -0
  532. package/dist/esm/ReplicationAgent.d.ts +77 -0
  533. package/dist/esm/ReplicationAgent.d.ts.map +1 -0
  534. package/dist/esm/ReplicationAgent.js +218 -0
  535. package/dist/esm/ReplicationAgent.js.map +1 -0
  536. package/dist/esm/ReportAgent.d.ts +144 -0
  537. package/dist/esm/ReportAgent.d.ts.map +1 -0
  538. package/dist/esm/ReportAgent.js +375 -0
  539. package/dist/esm/ReportAgent.js.map +1 -0
  540. package/dist/esm/ResourceAgent.d.ts +105 -0
  541. package/dist/esm/ResourceAgent.d.ts.map +1 -0
  542. package/dist/esm/ResourceAgent.js +191 -0
  543. package/dist/esm/ResourceAgent.js.map +1 -0
  544. package/dist/esm/SaintAgent.d.ts +157 -0
  545. package/dist/esm/SaintAgent.d.ts.map +1 -0
  546. package/dist/esm/SaintAgent.js +397 -0
  547. package/dist/esm/SaintAgent.js.map +1 -0
  548. package/dist/esm/SaleAgent.d.ts +477 -0
  549. package/dist/esm/SaleAgent.d.ts.map +1 -0
  550. package/dist/esm/SaleAgent.js +1177 -0
  551. package/dist/esm/SaleAgent.js.map +1 -0
  552. package/dist/esm/SaleRestApi.d.ts +46 -0
  553. package/dist/esm/SaleRestApi.d.ts.map +1 -0
  554. package/dist/esm/SaleRestApi.js +163 -0
  555. package/dist/esm/SaleRestApi.js.map +1 -0
  556. package/dist/esm/SelectionAgent.d.ts +814 -0
  557. package/dist/esm/SelectionAgent.d.ts.map +1 -0
  558. package/dist/esm/SelectionAgent.js +1790 -0
  559. package/dist/esm/SelectionAgent.js.map +1 -0
  560. package/dist/esm/SentryAgent.d.ts +113 -0
  561. package/dist/esm/SentryAgent.d.ts.map +1 -0
  562. package/dist/esm/SentryAgent.js +233 -0
  563. package/dist/esm/SentryAgent.js.map +1 -0
  564. package/dist/esm/SoApiConstants.d.ts +8 -0
  565. package/dist/esm/SoApiConstants.d.ts.map +1 -0
  566. package/dist/esm/SoApiConstants.js +9 -0
  567. package/dist/esm/SoApiConstants.js.map +1 -0
  568. package/dist/esm/TargetsAgent.d.ts +289 -0
  569. package/dist/esm/TargetsAgent.d.ts.map +1 -0
  570. package/dist/esm/TargetsAgent.js +723 -0
  571. package/dist/esm/TargetsAgent.js.map +1 -0
  572. package/dist/esm/TicketAgent.d.ts +802 -0
  573. package/dist/esm/TicketAgent.d.ts.map +1 -0
  574. package/dist/esm/TicketAgent.js +1860 -0
  575. package/dist/esm/TicketAgent.js.map +1 -0
  576. package/dist/esm/TimeZoneAgent.d.ts +139 -0
  577. package/dist/esm/TimeZoneAgent.d.ts.map +1 -0
  578. package/dist/esm/TimeZoneAgent.js +343 -0
  579. package/dist/esm/TimeZoneAgent.js.map +1 -0
  580. package/dist/esm/TooltipsAgent.d.ts +36 -0
  581. package/dist/esm/TooltipsAgent.d.ts.map +1 -0
  582. package/dist/esm/TooltipsAgent.js +49 -0
  583. package/dist/esm/TooltipsAgent.js.map +1 -0
  584. package/dist/esm/UserAgent.d.ts +1260 -0
  585. package/dist/esm/UserAgent.d.ts.map +1 -0
  586. package/dist/esm/UserAgent.js +2973 -0
  587. package/dist/esm/UserAgent.js.map +1 -0
  588. package/dist/esm/UserDefinedFieldInfoAgent.d.ts +474 -0
  589. package/dist/esm/UserDefinedFieldInfoAgent.d.ts.map +1 -0
  590. package/dist/esm/UserDefinedFieldInfoAgent.js +1062 -0
  591. package/dist/esm/UserDefinedFieldInfoAgent.js.map +1 -0
  592. package/dist/esm/ViewStateAgent.d.ts +230 -0
  593. package/dist/esm/ViewStateAgent.d.ts.map +1 -0
  594. package/dist/esm/ViewStateAgent.js +513 -0
  595. package/dist/esm/ViewStateAgent.js.map +1 -0
  596. package/dist/esm/WebApi.d.ts +427 -0
  597. package/dist/esm/WebApi.d.ts.map +1 -0
  598. package/dist/esm/WebApi.js +649 -0
  599. package/dist/esm/WebApi.js.map +1 -0
  600. package/dist/esm/WebApiBase.d.ts +152 -0
  601. package/dist/esm/WebApiBase.d.ts.map +1 -0
  602. package/dist/esm/WebApiBase.js +437 -0
  603. package/dist/esm/WebApiBase.js.map +1 -0
  604. package/dist/esm/WebhookAgent.d.ts +102 -0
  605. package/dist/esm/WebhookAgent.d.ts.map +1 -0
  606. package/dist/esm/WebhookAgent.js +240 -0
  607. package/dist/esm/WebhookAgent.js.map +1 -0
  608. package/dist/esm/WorkflowAgent.d.ts +250 -0
  609. package/dist/esm/WorkflowAgent.d.ts.map +1 -0
  610. package/dist/esm/WorkflowAgent.js +758 -0
  611. package/dist/esm/WorkflowAgent.js.map +1 -0
  612. package/dist/esm/package.json +1 -0
  613. package/examples-js/hello.js +12 -0
  614. package/examples-ts/hello.ts +8 -0
  615. package/package.json +89 -0
  616. package/scripts/setVersion.js +46 -0
  617. package/src/AIAgent.ts +928 -0
  618. package/src/AppointmentAgent.ts +5573 -0
  619. package/src/AppointmentRestApi.ts +225 -0
  620. package/src/ArchiveAgent.ts +1950 -0
  621. package/src/AssociateAgent.ts +422 -0
  622. package/src/AudienceAgent.ts +1430 -0
  623. package/src/AxiosCacheHandler.ts +74 -0
  624. package/src/BLOBAgent.ts +2214 -0
  625. package/src/Base64.ts +285 -0
  626. package/src/BatchAgent.ts +910 -0
  627. package/src/BulkUpdateAgent.ts +504 -0
  628. package/src/CRMScriptAgent.ts +1276 -0
  629. package/src/Carriers.ts +49791 -0
  630. package/src/ChatAgent.ts +1422 -0
  631. package/src/ConfigurationAgent.ts +2138 -0
  632. package/src/ContactAgent.ts +1586 -0
  633. package/src/ContactRestApi.ts +235 -0
  634. package/src/Converters.ts +21633 -0
  635. package/src/CustomerServiceAgent.ts +1734 -0
  636. package/src/DashAgent.ts +1504 -0
  637. package/src/DashboardAgent.ts +658 -0
  638. package/src/DatabaseAgent.ts +120 -0
  639. package/src/DatabaseTableAgent.ts +534 -0
  640. package/src/Day_js.ts +41 -0
  641. package/src/DiagnosticsAgent.ts +744 -0
  642. package/src/DocumentAgent.ts +5018 -0
  643. package/src/DocumentMigrationAgent.ts +494 -0
  644. package/src/DocumentRestApi.ts +259 -0
  645. package/src/EMailAgent.ts +5210 -0
  646. package/src/Enums.ts +6438 -0
  647. package/src/ErpSyncAgent.ts +2658 -0
  648. package/src/FavouriteAgent.ts +720 -0
  649. package/src/FindAgent.ts +2330 -0
  650. package/src/ForeignSystemAgent.ts +1710 -0
  651. package/src/FreeTextAgent.ts +626 -0
  652. package/src/ImportAgent.ts +304 -0
  653. package/src/LicenseAgent.ts +1088 -0
  654. package/src/ListAgent.ts +10894 -0
  655. package/src/MDOAgent.ts +748 -0
  656. package/src/MarketingAgent.ts +776 -0
  657. package/src/MessagingAgent.ts +384 -0
  658. package/src/NavigatorAgent.ts +164 -0
  659. package/src/NumberAllocationAgent.ts +296 -0
  660. package/src/PersonAgent.ts +2919 -0
  661. package/src/PersonRestApi.ts +239 -0
  662. package/src/PhoneListAgent.ts +458 -0
  663. package/src/PocketAgent.ts +780 -0
  664. package/src/PreferenceAgent.ts +1900 -0
  665. package/src/PreviewsAgent.ts +116 -0
  666. package/src/ProjectAgent.ts +2275 -0
  667. package/src/ProjectRestApi.ts +239 -0
  668. package/src/QuoteAgent.ts +5294 -0
  669. package/src/RelationAgent.ts +220 -0
  670. package/src/ReplicationAgent.ts +325 -0
  671. package/src/ReportAgent.ts +575 -0
  672. package/src/ResourceAgent.ts +358 -0
  673. package/src/SaintAgent.ts +601 -0
  674. package/src/SaleAgent.ts +1862 -0
  675. package/src/SaleRestApi.ts +233 -0
  676. package/src/SelectionAgent.ts +2980 -0
  677. package/src/SentryAgent.ts +406 -0
  678. package/src/SoApiConstants.ts +8 -0
  679. package/src/TargetsAgent.ts +1104 -0
  680. package/src/TicketAgent.ts +3032 -0
  681. package/src/TimeZoneAgent.ts +528 -0
  682. package/src/TooltipsAgent.ts +116 -0
  683. package/src/UserAgent.ts +4798 -0
  684. package/src/UserDefinedFieldInfoAgent.ts +1764 -0
  685. package/src/ViewStateAgent.ts +858 -0
  686. package/src/WebApi.ts +908 -0
  687. package/src/WebApiBase.ts +562 -0
  688. package/src/WebhookAgent.ts +388 -0
  689. package/src/WorkflowAgent.ts +1054 -0
  690. package/tsconfig.esm.json +8 -0
  691. package/tsconfig.jest.json +12 -0
  692. package/tsconfig.json +35 -0
@@ -0,0 +1,1586 @@
1
+ // <auto-generated>
2
+ // SuperOffice Code Generator
3
+ // modelling\templates\servicestswebapi\tswebapiagents.tt
4
+ // </auto-generated>
5
+
6
+
7
+ /* tslint:disable */
8
+ //----------------------------------------------------------------------------
9
+ // G E N E R A T E D F I L E ! D O N O T E D I T !
10
+ //----------------------------------------------------------------------------
11
+ //
12
+ // File: WebApi/ContactAgent.ts
13
+ //
14
+ //----------------------------------------------------------------------------
15
+ // Copyright (C) SuperOffice AS
16
+ //----------------------------------------------------------------------------
17
+
18
+ import { AxiosRequestConfig } from 'axios';
19
+ import { Duration } from 'dayjs/plugin/duration';
20
+ import * as enums from './Enums.js';
21
+ import * as base from './WebApiBase.js';
22
+ import * as carriers from './Carriers.js';
23
+ import * as converters from './Converters.js';
24
+ import { FromBase64ToString, ToBase64 } from './Base64.js';
25
+
26
+ /**
27
+ * Contact (company) data services.
28
+ */
29
+ export interface IContactAgent {
30
+ createDefaultContactEntityAsync(): Promise< carriers.ContactEntity >;
31
+ saveContactEntityAsync(entity: carriers.ContactEntity) : Promise< carriers.ContactEntity >;
32
+ deleteContactEntityAsync(ContactEntityId: number) : Promise<void>;
33
+ createDefaultPreviewContactAsync(): Promise< carriers.PreviewContact >;
34
+ getContactAsync(contactId: number) : Promise< carriers.Contact >;
35
+ getMyActiveContactsAsync(request: carriers.Contact_GetMyActiveContactsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ContactActivity[] >;
36
+ getMyActiveContactsAsync(activityStartTime: Date, contactCategories: number[], actionType: enums.ContactAction, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ContactActivity[] >;
37
+ getContactEntityAsync(contactEntityId: number) : Promise< carriers.ContactEntity >;
38
+ undeleteAsync(request: carriers.Contact_UndeleteRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
39
+ undeleteAsync(id: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
40
+ getPersonsAsync(request: carriers.Contact_GetPersonsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Person[] >;
41
+ getPersonsAsync(contactId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Person[] >;
42
+ getContactWithPersonsAsync(request: carriers.Contact_GetContactWithPersonsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ContactEntity >;
43
+ getContactWithPersonsAsync(contactId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ContactEntity >;
44
+ getMyContactAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ContactEntity >;
45
+ getMyBizCardAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ContactEntity >;
46
+ changeCountryAsync(request: carriers.Contact_ChangeCountryRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ContactEntity >;
47
+ changeCountryAsync(contactEntity: carriers.ContactEntity, toCountryId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ContactEntity >;
48
+ getAddressAsync(request: carriers.Contact_GetAddressRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Address >;
49
+ getAddressAsync(contactId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Address >;
50
+ getAddressByCountryAsync(request: carriers.Contact_GetAddressByCountryRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Address >;
51
+ getAddressByCountryAsync(contactId: number, countryId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Address >;
52
+ addPersonAsync(request: carriers.Contact_AddPersonRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PersonEntity >;
53
+ addPersonAsync(contactId: number, newPersonEntity: carriers.PersonEntity, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PersonEntity >;
54
+ getDuplicatesAsync(request: carriers.Contact_GetDuplicatesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DuplicateEntry[] >;
55
+ getDuplicatesAsync(name: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DuplicateEntry[] >;
56
+ createNewEntryAsync(request: carriers.Contact_CreateNewEntryRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
57
+ createNewEntryAsync(duplicate: carriers.DuplicateEntry, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
58
+ getDuplicateRulesAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DuplicateRule[] >;
59
+ setDuplicateRulesStatusAsync(request: carriers.Contact_SetDuplicateRulesStatusRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
60
+ setDuplicateRulesStatusAsync(rules: carriers.DuplicateRule[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
61
+ mergeAsync(request: carriers.Contact_MergeRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
62
+ mergeAsync(sourceContactId: number, destinationContactId: number, mergeIdenticalPersons: boolean, replaceEmptyFieldsOnDestination: boolean, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
63
+ copyAsync(request: carriers.Contact_CopyRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
64
+ copyAsync(sourceContactId: number, destinationContactName: string, destinationContactDepartment: string, copyPersons: boolean, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
65
+ getNameDepartmentDuplicatesAsync(request: carriers.Contact_GetNameDepartmentDuplicatesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DuplicateEntry[] >;
66
+ getNameDepartmentDuplicatesAsync(name: string, department: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DuplicateEntry[] >;
67
+ isNumberValidAsync(request: carriers.Contact_IsNumberValidRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
68
+ isNumberValidAsync(contactId: number, number: string, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
69
+ getQuoteVersionAddressesAsync(request: carriers.Contact_GetQuoteVersionAddressesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Address[] >;
70
+ getQuoteVersionAddressesAsync(quoteVersionId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Address[] >;
71
+ saveQuoteVersionAddressAsync(request: carriers.Contact_SaveQuoteVersionAddressRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Address >;
72
+ saveQuoteVersionAddressAsync(quoteVersionId: number, address: carriers.Address, addressType: enums.AddressType, countryId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Address >;
73
+ deleteExpiredAsync(webapi_options?:base.WebApiRequestOptions) : Promise< void >;
74
+ getContactSummaryAsync(request: carriers.Contact_GetContactSummaryRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ContactSummary >;
75
+ getContactSummaryAsync(contactId: number, limit: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ContactSummary >;
76
+ validateContactEntityAsync(request: carriers.Contact_ValidateContactEntityRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.StringDictionary >;
77
+ validateContactEntityAsync(contactEntity: carriers.ContactEntity, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.StringDictionary >;
78
+ getContactListAsync(contactIds: number[]) : Promise< carriers.Contact[] >;
79
+ getMyContactsAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Contact[] >;
80
+ getMyRecentContactsAsync(request: carriers.Contact_GetMyRecentContactsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Contact[] >;
81
+ getMyRecentContactsAsync(sourceType: enums.ContactSourceType, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Contact[] >;
82
+ getPreviewContactAsync(request: carriers.Contact_GetPreviewContactRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PreviewContact >;
83
+ getPreviewContactAsync(contactId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PreviewContact >;
84
+ } // interface IContactAgent
85
+
86
+
87
+
88
+
89
+ /**
90
+ * Contact (company) data services.
91
+ */
92
+ export class ContactAgent extends base.WebApiBase implements IContactAgent {
93
+ constructor(baseUrl?: string, languageCode?:string, cultureCode?: string);
94
+ constructor(baseUrl?: string, resourceParsing?: base.ResourceParsing);
95
+ constructor(baseUrl: string, resourceManager:any);
96
+ constructor(baseUrl: string, config:AxiosRequestConfig, resourceManager:any);
97
+ constructor(baseUrl: string, config:AxiosRequestConfig, resourceParsing?: base.ResourceParsing);
98
+ constructor(baseUrl: string, config:AxiosRequestConfig, languageCode?:string, cultureCode?: string);
99
+ constructor(options: base.WebApiOptions);
100
+
101
+ constructor(baseUrlOrOptions: string|base.WebApiOptions|undefined,
102
+ langOrconfigOrRM?: string|base.ResourceParsing|AxiosRequestConfig|any,
103
+ langOrResourceOrRM?:string|base.ResourceParsing|any,
104
+ cultureCode?: string,
105
+ ) {
106
+ const options = base.WebApiBase.FigureOutOptions(baseUrlOrOptions, langOrconfigOrRM, langOrResourceOrRM, cultureCode);
107
+ options.basePath = "v1/Agents/Contact/";
108
+ super(options);
109
+ }
110
+
111
+
112
+
113
+ /**
114
+ * Set default values into a new ContactEntity.
115
+ * NetServer calculates default values on the entity, which is required when creating/storing a new instance
116
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
117
+ * @returns A blank entity.
118
+ */
119
+ public async createDefaultContactEntityAsync(options?:base.WebApiRequestOptions) : Promise< carriers.ContactEntity > {
120
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
121
+ base.WebApiBase.SetPending(options);
122
+ return new Promise< carriers.ContactEntity >(async (resolve, reject) => {
123
+ try {
124
+ const response = await this._axios.post("CreateDefaultContactEntity", null, config);
125
+ base.WebApiBase.SetCompleted(options);
126
+ const res : carriers.ContactEntity = converters.Create_ContactEntity_From( response.data );
127
+ resolve(res);
128
+ }
129
+ catch( err ) {
130
+ base.WebApiBase.HandleError(options, config, err);
131
+ reject(err);
132
+ }
133
+ });
134
+ }
135
+ /*
136
+ * Replace the existing ContactEntity or creates a new ContactEntity if the id parameter is empty
137
+ * @param entity - The ContactEntity to be saved.
138
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
139
+ * @returns New or updated ContactEntity
140
+ */
141
+ public async saveContactEntityAsync(entity: carriers.ContactEntity, options?:base.WebApiRequestOptions) : Promise< carriers.ContactEntity > {
142
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
143
+ base.WebApiBase.SetPending(options);
144
+ return new Promise< carriers.ContactEntity >(async (resolve, reject) => {
145
+ try {
146
+ const response = await this._axios.post("SaveContactEntity", entity, config);
147
+ base.WebApiBase.SetCompleted(options);
148
+ const res : carriers.ContactEntity = converters.Create_ContactEntity_From( response.data );
149
+ resolve(res);
150
+ }
151
+ catch( err ) {
152
+ base.WebApiBase.HandleError(options, config, err);
153
+ reject(err);
154
+ }
155
+ });
156
+ }
157
+
158
+ /*
159
+ * Deletes the ContactEntity
160
+ * @param ContactEntityId - The id of the ContactEntity to be deleted.
161
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
162
+ */
163
+ public async deleteContactEntityAsync(ContactEntityId: number, options?:base.WebApiRequestOptions) : Promise< void > {
164
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
165
+ base.WebApiBase.SetPending(options);
166
+ return new Promise< void >(async (resolve, reject) => {
167
+ try {
168
+ const response = await this._axios.post("DeleteContactEntity?ContactEntityId=" + ContactEntityId, null, config );
169
+ base.WebApiBase.SetCompleted(options);
170
+ const res = response.data;
171
+ resolve(res);
172
+ }
173
+ catch( err ) {
174
+ base.WebApiBase.HandleError(options, config, err);
175
+ reject(err);
176
+ }
177
+ });
178
+ }
179
+
180
+ /**
181
+ * Set default values into a new PreviewContact.
182
+ * NetServer calculates default values on the entity, which is required when creating/storing a new instance
183
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
184
+ * @returns A blank entity.
185
+ */
186
+ public async createDefaultPreviewContactAsync(options?:base.WebApiRequestOptions) : Promise< carriers.PreviewContact > {
187
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
188
+ base.WebApiBase.SetPending(options);
189
+ return new Promise< carriers.PreviewContact >(async (resolve, reject) => {
190
+ try {
191
+ const response = await this._axios.post("CreateDefaultPreviewContact", null, config);
192
+ base.WebApiBase.SetCompleted(options);
193
+ const res : carriers.PreviewContact = converters.Create_PreviewContact_From( response.data );
194
+ resolve(res);
195
+ }
196
+ catch( err ) {
197
+ base.WebApiBase.HandleError(options, config, err);
198
+ reject(err);
199
+ }
200
+ });
201
+ }
202
+ /*
203
+ * Gets a Contact object.
204
+ * @param contactId - The primary key.
205
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
206
+ * @returns A single Contact
207
+ */
208
+ public async getContactAsync(contactId: number, options?:base.WebApiRequestOptions) : Promise< carriers.Contact > {
209
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
210
+ base.WebApiBase.SetPending(options);
211
+ return new Promise< carriers.Contact >(async (resolve, reject) => {
212
+ try {
213
+ const response = await this._axios.post("GetContact?contactId=" + contactId, null, config);
214
+ base.WebApiBase.SetCompleted(options);
215
+ const res = converters.Create_Contact_From( response.data );
216
+ resolve(res);
217
+ }
218
+ catch( err ) {
219
+ base.WebApiBase.HandleError(options, config, err);
220
+ reject(err);
221
+ }
222
+ });
223
+ }
224
+
225
+
226
+ private async _getMyActiveContactsAsync(request: carriers.Contact_GetMyActiveContactsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ContactActivity[] > {
227
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
228
+ base.WebApiBase.SetPending(options);
229
+ return new Promise< carriers.ContactActivity[] >(async (resolve, reject) => {
230
+ try {
231
+ config.baseURL = this._options.baseUrl;
232
+ const response = await this._axios.post("GetMyActiveContacts", request , config);
233
+ base.WebApiBase.SetCompleted(options);
234
+ const res : carriers.ContactActivity[] = converters.Create_ContactActivityArray_From( response.data );
235
+ resolve(res);
236
+ }
237
+ catch( err ) {
238
+ base.WebApiBase.HandleError(options, config, err);
239
+ reject(err);
240
+ }
241
+ });
242
+ }
243
+
244
+
245
+
246
+ /**
247
+ * Returns the contacts where there has been activity since activityStartTime. If activityStartTime is larger than the current date, all contacts with activity since last log-out are returned. The result set can be filtered by category and action type.
248
+ * @param request - ActivityStartTime, ContactCategories, ActionType
249
+ * @returns Array of contacts where there have been activity in the period.
250
+ */
251
+ public async getMyActiveContactsAsync(request: carriers.Contact_GetMyActiveContactsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ContactActivity[] >;
252
+
253
+ /**
254
+ * Returns the contacts where there has been activity since activityStartTime. If activityStartTime is larger than the current date, all contacts with activity since last log-out are returned. The result set can be filtered by category and action type.
255
+ * @param activityStartTime - The start time of the activities. If the start time is set to a future date; activites since the user last logged out are returned.
256
+ * @param contactCategories - Integer array of categories to filter on. If the array is empty contacts from all categories will be selected.
257
+ * @param actionType - The type of action that has occured. E.g. updates, deletes, new appointments, etc.
258
+ * @returns Array of contacts where there have been activity in the period.
259
+ */
260
+ public async getMyActiveContactsAsync(activityStartTime: Date, contactCategories: number[], actionType: enums.ContactAction, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ContactActivity[] >;
261
+
262
+ public async getMyActiveContactsAsync(activityStartTime:Date|carriers.Contact_GetMyActiveContactsRequest, contactCategories?:number[]|base.WebApiRequestOptions, actionType?:enums.ContactAction, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ContactActivity[] > {
263
+ let _request : carriers.Contact_GetMyActiveContactsRequest = null;
264
+ let _options : base.WebApiRequestOptions = null;
265
+ const first : any = activityStartTime;
266
+ if( typeof( first ) === "object" && first && ( typeof(first.activityStartTime)!='undefined' || typeof(first.contactCategories)!='undefined' || typeof(first.actionType)!='undefined' ) )
267
+ {
268
+ _request = activityStartTime as carriers.Contact_GetMyActiveContactsRequest;
269
+ _options = contactCategories as base.WebApiRequestOptions;
270
+ }
271
+ else
272
+ {
273
+ _request = {
274
+ activityStartTime: activityStartTime as Date,
275
+ contactCategories: contactCategories as number[],
276
+ actionType: actionType as enums.ContactAction,
277
+ };
278
+ _options = webapi_options;
279
+ }
280
+ return this._getMyActiveContactsAsync( _request, _options );
281
+ }
282
+
283
+ /*
284
+ * Gets a ContactEntity object.
285
+ * @param contactEntityId - The primary key.
286
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
287
+ * @returns A single ContactEntity
288
+ */
289
+ public async getContactEntityAsync(contactEntityId: number, options?:base.WebApiRequestOptions) : Promise< carriers.ContactEntity > {
290
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
291
+ base.WebApiBase.SetPending(options);
292
+ return new Promise< carriers.ContactEntity >(async (resolve, reject) => {
293
+ try {
294
+ const response = await this._axios.post("GetContactEntity?contactEntityId=" + contactEntityId, null, config);
295
+ base.WebApiBase.SetCompleted(options);
296
+ const res = converters.Create_ContactEntity_From( response.data );
297
+ resolve(res);
298
+ }
299
+ catch( err ) {
300
+ base.WebApiBase.HandleError(options, config, err);
301
+ reject(err);
302
+ }
303
+ });
304
+ }
305
+
306
+
307
+ private async _undeleteAsync(request: carriers.Contact_UndeleteRequest, options?:base.WebApiRequestOptions) : Promise< void > {
308
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
309
+ base.WebApiBase.SetPending(options);
310
+ return new Promise< void >(async (resolve, reject) => {
311
+ try {
312
+ config.baseURL = this._options.baseUrl;
313
+ const response = await this._axios.post("Undelete", request , config);
314
+ base.WebApiBase.SetCompleted(options);
315
+ const res = response.data;
316
+ resolve(res);
317
+ }
318
+ catch( err ) {
319
+ base.WebApiBase.HandleError(options, config, err);
320
+ reject(err);
321
+ }
322
+ });
323
+ }
324
+
325
+
326
+
327
+ /**
328
+ * This entity supports Soft Delete. Call this method to Undelete a previously soft-deleted record
329
+ * @param request - Id
330
+ * @returns This method has no return value
331
+ */
332
+ public async undeleteAsync(request: carriers.Contact_UndeleteRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
333
+
334
+ /**
335
+ * This entity supports Soft Delete. Call this method to Undelete a previously soft-deleted record
336
+ * @param id - The primary key of the entity to undelete
337
+ * @returns This method has no return value
338
+ */
339
+ public async undeleteAsync(id: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
340
+
341
+ public async undeleteAsync(id:number|carriers.Contact_UndeleteRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
342
+ let _request : carriers.Contact_UndeleteRequest = null;
343
+ let _options : base.WebApiRequestOptions = null;
344
+ const first : any = id;
345
+ if( typeof( first ) === "object" && first && ( typeof(first.id)!='undefined' ) )
346
+ {
347
+ _request = id as carriers.Contact_UndeleteRequest;
348
+ _options = webapi_options as base.WebApiRequestOptions;
349
+ }
350
+ else
351
+ {
352
+ _request = {
353
+ id: id as number,
354
+ };
355
+ _options = webapi_options;
356
+ }
357
+ return this._undeleteAsync( _request, _options );
358
+ }
359
+
360
+
361
+ private async _getPersonsAsync(request: carriers.Contact_GetPersonsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.Person[] > {
362
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
363
+ base.WebApiBase.SetPending(options);
364
+ return new Promise< carriers.Person[] >(async (resolve, reject) => {
365
+ try {
366
+ config.baseURL = this._options.baseUrl;
367
+ const response = await this._axios.post("GetPersons", request , config);
368
+ base.WebApiBase.SetCompleted(options);
369
+ const res : carriers.Person[] = converters.Create_PersonArray_From( response.data );
370
+ resolve(res);
371
+ }
372
+ catch( err ) {
373
+ base.WebApiBase.HandleError(options, config, err);
374
+ reject(err);
375
+ }
376
+ });
377
+ }
378
+
379
+
380
+
381
+ /**
382
+ * Returns an array of all the contact persons for the company card.
383
+ * @param request - ContactId
384
+ * @returns Array of Persons
385
+ */
386
+ public async getPersonsAsync(request: carriers.Contact_GetPersonsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Person[] >;
387
+
388
+ /**
389
+ * Returns an array of all the contact persons for the company card.
390
+ * @param contactId -
391
+ * @returns Array of Persons
392
+ */
393
+ public async getPersonsAsync(contactId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Person[] >;
394
+
395
+ public async getPersonsAsync(contactId:number|carriers.Contact_GetPersonsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Person[] > {
396
+ let _request : carriers.Contact_GetPersonsRequest = null;
397
+ let _options : base.WebApiRequestOptions = null;
398
+ const first : any = contactId;
399
+ if( typeof( first ) === "object" && first && ( typeof(first.contactId)!='undefined' ) )
400
+ {
401
+ _request = contactId as carriers.Contact_GetPersonsRequest;
402
+ _options = webapi_options as base.WebApiRequestOptions;
403
+ }
404
+ else
405
+ {
406
+ _request = {
407
+ contactId: contactId as number,
408
+ };
409
+ _options = webapi_options;
410
+ }
411
+ return this._getPersonsAsync( _request, _options );
412
+ }
413
+
414
+
415
+ private async _getContactWithPersonsAsync(request: carriers.Contact_GetContactWithPersonsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ContactEntity > {
416
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
417
+ base.WebApiBase.SetPending(options);
418
+ return new Promise< carriers.ContactEntity >(async (resolve, reject) => {
419
+ try {
420
+ config.baseURL = this._options.baseUrl;
421
+ const response = await this._axios.post("GetContactWithPersons", request , config);
422
+ base.WebApiBase.SetCompleted(options);
423
+ const res : carriers.ContactEntity = converters.Create_ContactEntity_From( response.data );
424
+ resolve(res);
425
+ }
426
+ catch( err ) {
427
+ base.WebApiBase.HandleError(options, config, err);
428
+ reject(err);
429
+ }
430
+ });
431
+ }
432
+
433
+
434
+
435
+ /**
436
+ * Returns the contact with all the contact persons belonging to the contact
437
+ * @param request - ContactId
438
+ * @returns ContactEntity with all data and persons.
439
+ */
440
+ public async getContactWithPersonsAsync(request: carriers.Contact_GetContactWithPersonsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ContactEntity >;
441
+
442
+ /**
443
+ * Returns the contact with all the contact persons belonging to the contact
444
+ * @param contactId - The id of the contact.
445
+ * @returns ContactEntity with all data and persons.
446
+ */
447
+ public async getContactWithPersonsAsync(contactId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ContactEntity >;
448
+
449
+ public async getContactWithPersonsAsync(contactId:number|carriers.Contact_GetContactWithPersonsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ContactEntity > {
450
+ let _request : carriers.Contact_GetContactWithPersonsRequest = null;
451
+ let _options : base.WebApiRequestOptions = null;
452
+ const first : any = contactId;
453
+ if( typeof( first ) === "object" && first && ( typeof(first.contactId)!='undefined' ) )
454
+ {
455
+ _request = contactId as carriers.Contact_GetContactWithPersonsRequest;
456
+ _options = webapi_options as base.WebApiRequestOptions;
457
+ }
458
+ else
459
+ {
460
+ _request = {
461
+ contactId: contactId as number,
462
+ };
463
+ _options = webapi_options;
464
+ }
465
+ return this._getContactWithPersonsAsync( _request, _options );
466
+ }
467
+
468
+
469
+ private async _getMyContactAsync( options?:base.WebApiRequestOptions) : Promise< carriers.ContactEntity > {
470
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
471
+ base.WebApiBase.SetPending(options);
472
+ return new Promise< carriers.ContactEntity >(async (resolve, reject) => {
473
+ try {
474
+ config.baseURL = this._options.baseUrl;
475
+ const response = await this._axios.post("GetMyContact", undefined , config);
476
+ base.WebApiBase.SetCompleted(options);
477
+ const res : carriers.ContactEntity = converters.Create_ContactEntity_From( response.data );
478
+ resolve(res);
479
+ }
480
+ catch( err ) {
481
+ base.WebApiBase.HandleError(options, config, err);
482
+ reject(err);
483
+ }
484
+ });
485
+ }
486
+
487
+
488
+ /**
489
+ * Gets the contact belonging to the currently logged on user.
490
+ * @returns The Contact
491
+ */
492
+ public async getMyContactAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ContactEntity >
493
+ {
494
+ return this._getMyContactAsync(webapi_options);
495
+ }
496
+
497
+
498
+ private async _getMyBizCardAsync( options?:base.WebApiRequestOptions) : Promise< carriers.ContactEntity > {
499
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
500
+ base.WebApiBase.SetPending(options);
501
+ return new Promise< carriers.ContactEntity >(async (resolve, reject) => {
502
+ try {
503
+ config.baseURL = this._options.baseUrl;
504
+ const response = await this._axios.post("GetMyBizCard", undefined , config);
505
+ base.WebApiBase.SetCompleted(options);
506
+ const res : carriers.ContactEntity = converters.Create_ContactEntity_From( response.data );
507
+ resolve(res);
508
+ }
509
+ catch( err ) {
510
+ base.WebApiBase.HandleError(options, config, err);
511
+ reject(err);
512
+ }
513
+ });
514
+ }
515
+
516
+
517
+ /**
518
+ * Returns all data needed to display the logged on person&apos;s business card. That is company, person, and company interest data.
519
+ * @returns The contact object with persons and interests
520
+ */
521
+ public async getMyBizCardAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ContactEntity >
522
+ {
523
+ return this._getMyBizCardAsync(webapi_options);
524
+ }
525
+
526
+
527
+ private async _changeCountryAsync(request: carriers.Contact_ChangeCountryRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ContactEntity > {
528
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
529
+ base.WebApiBase.SetPending(options);
530
+ return new Promise< carriers.ContactEntity >(async (resolve, reject) => {
531
+ try {
532
+ config.baseURL = this._options.baseUrl;
533
+ const response = await this._axios.post("ChangeCountry", request , config);
534
+ base.WebApiBase.SetCompleted(options);
535
+ const res : carriers.ContactEntity = converters.Create_ContactEntity_From( response.data );
536
+ resolve(res);
537
+ }
538
+ catch( err ) {
539
+ base.WebApiBase.HandleError(options, config, err);
540
+ reject(err);
541
+ }
542
+ });
543
+ }
544
+
545
+
546
+
547
+ /**
548
+ * Change country regenerates the default values and localized information such as phone number and address format
549
+ * @param request - ContactEntity, ToCountryId
550
+ * @returns
551
+ */
552
+ public async changeCountryAsync(request: carriers.Contact_ChangeCountryRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ContactEntity >;
553
+
554
+ /**
555
+ * Change country regenerates the default values and localized information such as phone number and address format
556
+ * @param contactEntity -
557
+ * @param toCountryId - The country to switch to
558
+ * @returns
559
+ */
560
+ public async changeCountryAsync(contactEntity: carriers.ContactEntity, toCountryId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ContactEntity >;
561
+
562
+ public async changeCountryAsync(contactEntity:carriers.ContactEntity|carriers.Contact_ChangeCountryRequest, toCountryId?:number|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ContactEntity > {
563
+ let _request : carriers.Contact_ChangeCountryRequest = null;
564
+ let _options : base.WebApiRequestOptions = null;
565
+ const first : any = contactEntity;
566
+ if( typeof( first ) === "object" && first && ( typeof(first.contactEntity)!='undefined' || typeof(first.toCountryId)!='undefined' ) )
567
+ {
568
+ _request = contactEntity as carriers.Contact_ChangeCountryRequest;
569
+ _options = toCountryId as base.WebApiRequestOptions;
570
+ }
571
+ else
572
+ {
573
+ _request = {
574
+ contactEntity: contactEntity as carriers.ContactEntity,
575
+ toCountryId: toCountryId as number,
576
+ };
577
+ _options = webapi_options;
578
+ }
579
+ return this._changeCountryAsync( _request, _options );
580
+ }
581
+
582
+
583
+ private async _getAddressAsync(request: carriers.Contact_GetAddressRequest, options?:base.WebApiRequestOptions) : Promise< carriers.Address > {
584
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
585
+ base.WebApiBase.SetPending(options);
586
+ return new Promise< carriers.Address >(async (resolve, reject) => {
587
+ try {
588
+ config.baseURL = this._options.baseUrl;
589
+ const response = await this._axios.post("GetAddress", request , config);
590
+ base.WebApiBase.SetCompleted(options);
591
+ const res : carriers.Address = converters.Create_Address_From( response.data );
592
+ resolve(res);
593
+ }
594
+ catch( err ) {
595
+ base.WebApiBase.HandleError(options, config, err);
596
+ reject(err);
597
+ }
598
+ });
599
+ }
600
+
601
+
602
+
603
+ /**
604
+ * Gets the contact&apos;s localized address.
605
+ * @param request - ContactId
606
+ * @returns The address as LocalizedField[][].
607
+ */
608
+ public async getAddressAsync(request: carriers.Contact_GetAddressRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Address >;
609
+
610
+ /**
611
+ * Gets the contact&apos;s localized address.
612
+ * @param contactId - The contact id
613
+ * @returns The address as LocalizedField[][].
614
+ */
615
+ public async getAddressAsync(contactId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Address >;
616
+
617
+ public async getAddressAsync(contactId:number|carriers.Contact_GetAddressRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Address > {
618
+ let _request : carriers.Contact_GetAddressRequest = null;
619
+ let _options : base.WebApiRequestOptions = null;
620
+ const first : any = contactId;
621
+ if( typeof( first ) === "object" && first && ( typeof(first.contactId)!='undefined' ) )
622
+ {
623
+ _request = contactId as carriers.Contact_GetAddressRequest;
624
+ _options = webapi_options as base.WebApiRequestOptions;
625
+ }
626
+ else
627
+ {
628
+ _request = {
629
+ contactId: contactId as number,
630
+ };
631
+ _options = webapi_options;
632
+ }
633
+ return this._getAddressAsync( _request, _options );
634
+ }
635
+
636
+
637
+ private async _getAddressByCountryAsync(request: carriers.Contact_GetAddressByCountryRequest, options?:base.WebApiRequestOptions) : Promise< carriers.Address > {
638
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
639
+ base.WebApiBase.SetPending(options);
640
+ return new Promise< carriers.Address >(async (resolve, reject) => {
641
+ try {
642
+ config.baseURL = this._options.baseUrl;
643
+ const response = await this._axios.post("GetAddressByCountry", request , config);
644
+ base.WebApiBase.SetCompleted(options);
645
+ const res : carriers.Address = converters.Create_Address_From( response.data );
646
+ resolve(res);
647
+ }
648
+ catch( err ) {
649
+ base.WebApiBase.HandleError(options, config, err);
650
+ reject(err);
651
+ }
652
+ });
653
+ }
654
+
655
+
656
+
657
+ /**
658
+ * Gets the contact&apos;s localized address.
659
+ * @param request - ContactId, CountryId
660
+ * @returns The address as LocalizedField[][].
661
+ */
662
+ public async getAddressByCountryAsync(request: carriers.Contact_GetAddressByCountryRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Address >;
663
+
664
+ /**
665
+ * Gets the contact&apos;s localized address.
666
+ * @param contactId - The contact id
667
+ * @param countryId -
668
+ * @returns The address as LocalizedField[][].
669
+ */
670
+ public async getAddressByCountryAsync(contactId: number, countryId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Address >;
671
+
672
+ public async getAddressByCountryAsync(contactId:number|carriers.Contact_GetAddressByCountryRequest, countryId?:number|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Address > {
673
+ let _request : carriers.Contact_GetAddressByCountryRequest = null;
674
+ let _options : base.WebApiRequestOptions = null;
675
+ const first : any = contactId;
676
+ if( typeof( first ) === "object" && first && ( typeof(first.contactId)!='undefined' || typeof(first.countryId)!='undefined' ) )
677
+ {
678
+ _request = contactId as carriers.Contact_GetAddressByCountryRequest;
679
+ _options = countryId as base.WebApiRequestOptions;
680
+ }
681
+ else
682
+ {
683
+ _request = {
684
+ contactId: contactId as number,
685
+ countryId: countryId as number,
686
+ };
687
+ _options = webapi_options;
688
+ }
689
+ return this._getAddressByCountryAsync( _request, _options );
690
+ }
691
+
692
+
693
+ private async _addPersonAsync(request: carriers.Contact_AddPersonRequest, options?:base.WebApiRequestOptions) : Promise< carriers.PersonEntity > {
694
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
695
+ base.WebApiBase.SetPending(options);
696
+ return new Promise< carriers.PersonEntity >(async (resolve, reject) => {
697
+ try {
698
+ config.baseURL = this._options.baseUrl;
699
+ const response = await this._axios.post("AddPerson", request , config);
700
+ base.WebApiBase.SetCompleted(options);
701
+ const res : carriers.PersonEntity = converters.Create_PersonEntity_From( response.data );
702
+ resolve(res);
703
+ }
704
+ catch( err ) {
705
+ base.WebApiBase.HandleError(options, config, err);
706
+ reject(err);
707
+ }
708
+ });
709
+ }
710
+
711
+
712
+
713
+ /**
714
+ * Add a person to the given contact
715
+ * @param request - ContactId, NewPersonEntity
716
+ * @returns Updated person object
717
+ */
718
+ public async addPersonAsync(request: carriers.Contact_AddPersonRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PersonEntity >;
719
+
720
+ /**
721
+ * Add a person to the given contact
722
+ * @param contactId - Contact to add person to
723
+ * @param newPersonEntity - Person object to add
724
+ * @returns Updated person object
725
+ */
726
+ public async addPersonAsync(contactId: number, newPersonEntity: carriers.PersonEntity, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PersonEntity >;
727
+
728
+ public async addPersonAsync(contactId:number|carriers.Contact_AddPersonRequest, newPersonEntity?:carriers.PersonEntity|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PersonEntity > {
729
+ let _request : carriers.Contact_AddPersonRequest = null;
730
+ let _options : base.WebApiRequestOptions = null;
731
+ const first : any = contactId;
732
+ if( typeof( first ) === "object" && first && ( typeof(first.contactId)!='undefined' || typeof(first.newPersonEntity)!='undefined' ) )
733
+ {
734
+ _request = contactId as carriers.Contact_AddPersonRequest;
735
+ _options = newPersonEntity as base.WebApiRequestOptions;
736
+ }
737
+ else
738
+ {
739
+ _request = {
740
+ contactId: contactId as number,
741
+ newPersonEntity: newPersonEntity as carriers.PersonEntity,
742
+ };
743
+ _options = webapi_options;
744
+ }
745
+ return this._addPersonAsync( _request, _options );
746
+ }
747
+
748
+
749
+ private async _getDuplicatesAsync(request: carriers.Contact_GetDuplicatesRequest, options?:base.WebApiRequestOptions) : Promise< carriers.DuplicateEntry[] > {
750
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
751
+ base.WebApiBase.SetPending(options);
752
+ return new Promise< carriers.DuplicateEntry[] >(async (resolve, reject) => {
753
+ try {
754
+ config.baseURL = this._options.baseUrl;
755
+ const response = await this._axios.post("GetDuplicates", request , config);
756
+ base.WebApiBase.SetCompleted(options);
757
+ const res : carriers.DuplicateEntry[] = converters.Create_DuplicateEntryArray_From( response.data );
758
+ resolve(res);
759
+ }
760
+ catch( err ) {
761
+ base.WebApiBase.HandleError(options, config, err);
762
+ reject(err);
763
+ }
764
+ });
765
+ }
766
+
767
+
768
+
769
+ /**
770
+ * Get duplicates (exact or similar in the database) based on the name
771
+ * @param request - Name
772
+ * @returns Any records matching the specified name
773
+ */
774
+ public async getDuplicatesAsync(request: carriers.Contact_GetDuplicatesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DuplicateEntry[] >;
775
+
776
+ /**
777
+ * Get duplicates (exact or similar in the database) based on the name
778
+ * @param name - Name used for lookup
779
+ * @returns Any records matching the specified name
780
+ */
781
+ public async getDuplicatesAsync(name: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DuplicateEntry[] >;
782
+
783
+ public async getDuplicatesAsync(name:string|carriers.Contact_GetDuplicatesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DuplicateEntry[] > {
784
+ let _request : carriers.Contact_GetDuplicatesRequest = null;
785
+ let _options : base.WebApiRequestOptions = null;
786
+ const first : any = name;
787
+ if( typeof( first ) === "object" && first && ( typeof(first.name)!='undefined' ) )
788
+ {
789
+ _request = name as carriers.Contact_GetDuplicatesRequest;
790
+ _options = webapi_options as base.WebApiRequestOptions;
791
+ }
792
+ else
793
+ {
794
+ _request = {
795
+ name: name as string,
796
+ };
797
+ _options = webapi_options;
798
+ }
799
+ return this._getDuplicatesAsync( _request, _options );
800
+ }
801
+
802
+
803
+ private async _createNewEntryAsync(request: carriers.Contact_CreateNewEntryRequest, options?:base.WebApiRequestOptions) : Promise< number > {
804
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
805
+ base.WebApiBase.SetPending(options);
806
+ return new Promise< number >(async (resolve, reject) => {
807
+ try {
808
+ config.baseURL = this._options.baseUrl;
809
+ const response = await this._axios.post("CreateNewEntry", request , config);
810
+ base.WebApiBase.SetCompleted(options);
811
+ const res : number = response.data as number;
812
+ resolve(res);
813
+ }
814
+ catch( err ) {
815
+ base.WebApiBase.HandleError(options, config, err);
816
+ reject(err);
817
+ }
818
+ });
819
+ }
820
+
821
+
822
+
823
+ /**
824
+ * Creates a new contact based on external duplicate
825
+ * @param request - Duplicate
826
+ * @returns The database identity of the newly created entry
827
+ */
828
+ public async createNewEntryAsync(request: carriers.Contact_CreateNewEntryRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
829
+
830
+ /**
831
+ * Creates a new contact based on external duplicate
832
+ * @param duplicate - The duplicate to create a new entry based upon
833
+ * @returns The database identity of the newly created entry
834
+ */
835
+ public async createNewEntryAsync(duplicate: carriers.DuplicateEntry, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
836
+
837
+ public async createNewEntryAsync(duplicate:carriers.DuplicateEntry|carriers.Contact_CreateNewEntryRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number > {
838
+ let _request : carriers.Contact_CreateNewEntryRequest = null;
839
+ let _options : base.WebApiRequestOptions = null;
840
+ const first : any = duplicate;
841
+ if( typeof( first ) === "object" && first && ( typeof(first.duplicate)!='undefined' ) )
842
+ {
843
+ _request = duplicate as carriers.Contact_CreateNewEntryRequest;
844
+ _options = webapi_options as base.WebApiRequestOptions;
845
+ }
846
+ else
847
+ {
848
+ _request = {
849
+ duplicate: duplicate as carriers.DuplicateEntry,
850
+ };
851
+ _options = webapi_options;
852
+ }
853
+ return this._createNewEntryAsync( _request, _options );
854
+ }
855
+
856
+
857
+ private async _getDuplicateRulesAsync( options?:base.WebApiRequestOptions) : Promise< carriers.DuplicateRule[] > {
858
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
859
+ base.WebApiBase.SetPending(options);
860
+ return new Promise< carriers.DuplicateRule[] >(async (resolve, reject) => {
861
+ try {
862
+ config.baseURL = this._options.baseUrl;
863
+ const response = await this._axios.post("GetDuplicateRules", undefined , config);
864
+ base.WebApiBase.SetCompleted(options);
865
+ const res : carriers.DuplicateRule[] = converters.Create_DuplicateRuleArray_From( response.data );
866
+ resolve(res);
867
+ }
868
+ catch( err ) {
869
+ base.WebApiBase.HandleError(options, config, err);
870
+ reject(err);
871
+ }
872
+ });
873
+ }
874
+
875
+
876
+ /**
877
+ * Retrieve all available duplicate rules for contact
878
+ * @returns All available duplicate rules
879
+ */
880
+ public async getDuplicateRulesAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DuplicateRule[] >
881
+ {
882
+ return this._getDuplicateRulesAsync(webapi_options);
883
+ }
884
+
885
+
886
+ private async _setDuplicateRulesStatusAsync(request: carriers.Contact_SetDuplicateRulesStatusRequest, options?:base.WebApiRequestOptions) : Promise< void > {
887
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
888
+ base.WebApiBase.SetPending(options);
889
+ return new Promise< void >(async (resolve, reject) => {
890
+ try {
891
+ config.baseURL = this._options.baseUrl;
892
+ const response = await this._axios.post("SetDuplicateRulesStatus", request , config);
893
+ base.WebApiBase.SetCompleted(options);
894
+ const res = response.data;
895
+ resolve(res);
896
+ }
897
+ catch( err ) {
898
+ base.WebApiBase.HandleError(options, config, err);
899
+ reject(err);
900
+ }
901
+ });
902
+ }
903
+
904
+
905
+
906
+ /**
907
+ * Set which duplicate rules should be active or not
908
+ * @param request - Rules
909
+ * @returns
910
+ */
911
+ public async setDuplicateRulesStatusAsync(request: carriers.Contact_SetDuplicateRulesStatusRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
912
+
913
+ /**
914
+ * Set which duplicate rules should be active or not
915
+ * @param rules - Duplicate rules to update active status for
916
+ * @returns
917
+ */
918
+ public async setDuplicateRulesStatusAsync(rules: carriers.DuplicateRule[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
919
+
920
+ public async setDuplicateRulesStatusAsync(rules:carriers.DuplicateRule[]|carriers.Contact_SetDuplicateRulesStatusRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
921
+ let _request : carriers.Contact_SetDuplicateRulesStatusRequest = null;
922
+ let _options : base.WebApiRequestOptions = null;
923
+ const first : any = rules;
924
+ if( typeof( first ) === "object" && first && ( typeof(first.rules)!='undefined' ) )
925
+ {
926
+ _request = rules as carriers.Contact_SetDuplicateRulesStatusRequest;
927
+ _options = webapi_options as base.WebApiRequestOptions;
928
+ }
929
+ else
930
+ {
931
+ _request = {
932
+ rules: rules as carriers.DuplicateRule[],
933
+ };
934
+ _options = webapi_options;
935
+ }
936
+ return this._setDuplicateRulesStatusAsync( _request, _options );
937
+ }
938
+
939
+
940
+ private async _mergeAsync(request: carriers.Contact_MergeRequest, options?:base.WebApiRequestOptions) : Promise< void > {
941
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
942
+ base.WebApiBase.SetPending(options);
943
+ return new Promise< void >(async (resolve, reject) => {
944
+ try {
945
+ config.baseURL = this._options.baseUrl;
946
+ const response = await this._axios.post("Merge", request , config);
947
+ base.WebApiBase.SetCompleted(options);
948
+ const res = response.data;
949
+ resolve(res);
950
+ }
951
+ catch( err ) {
952
+ base.WebApiBase.HandleError(options, config, err);
953
+ reject(err);
954
+ }
955
+ });
956
+ }
957
+
958
+
959
+
960
+ /**
961
+ * Merge two contacts. The destination contact will remain.
962
+ * @param request - SourceContactId, DestinationContactId, MergeIdenticalPersons, ReplaceEmptyFieldsOnDestination
963
+ * @returns
964
+ */
965
+ public async mergeAsync(request: carriers.Contact_MergeRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
966
+
967
+ /**
968
+ * Merge two contacts. The destination contact will remain.
969
+ * @param sourceContactId - Source contact to merge from. This contact will disappear after the merge.
970
+ * @param destinationContactId - Destination contact to merge into
971
+ * @param mergeIdenticalPersons - Persons with identical names will be merged
972
+ * @param replaceEmptyFieldsOnDestination - If true, empty fields on destination will be replaced by values from source.
973
+ * @returns
974
+ */
975
+ public async mergeAsync(sourceContactId: number, destinationContactId: number, mergeIdenticalPersons: boolean, replaceEmptyFieldsOnDestination: boolean, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
976
+
977
+ public async mergeAsync(sourceContactId:number|carriers.Contact_MergeRequest, destinationContactId?:number|base.WebApiRequestOptions, mergeIdenticalPersons?:boolean, replaceEmptyFieldsOnDestination?:boolean, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
978
+ let _request : carriers.Contact_MergeRequest = null;
979
+ let _options : base.WebApiRequestOptions = null;
980
+ const first : any = sourceContactId;
981
+ if( typeof( first ) === "object" && first && ( typeof(first.sourceContactId)!='undefined' || typeof(first.destinationContactId)!='undefined' || typeof(first.mergeIdenticalPersons)!='undefined' || typeof(first.replaceEmptyFieldsOnDestination)!='undefined' ) )
982
+ {
983
+ _request = sourceContactId as carriers.Contact_MergeRequest;
984
+ _options = destinationContactId as base.WebApiRequestOptions;
985
+ }
986
+ else
987
+ {
988
+ _request = {
989
+ sourceContactId: sourceContactId as number,
990
+ destinationContactId: destinationContactId as number,
991
+ mergeIdenticalPersons: mergeIdenticalPersons as boolean,
992
+ replaceEmptyFieldsOnDestination: replaceEmptyFieldsOnDestination as boolean,
993
+ };
994
+ _options = webapi_options;
995
+ }
996
+ return this._mergeAsync( _request, _options );
997
+ }
998
+
999
+
1000
+ private async _copyAsync(request: carriers.Contact_CopyRequest, options?:base.WebApiRequestOptions) : Promise< number > {
1001
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1002
+ base.WebApiBase.SetPending(options);
1003
+ return new Promise< number >(async (resolve, reject) => {
1004
+ try {
1005
+ config.baseURL = this._options.baseUrl;
1006
+ const response = await this._axios.post("Copy", request , config);
1007
+ base.WebApiBase.SetCompleted(options);
1008
+ const res : number = response.data as number;
1009
+ resolve(res);
1010
+ }
1011
+ catch( err ) {
1012
+ base.WebApiBase.HandleError(options, config, err);
1013
+ reject(err);
1014
+ }
1015
+ });
1016
+ }
1017
+
1018
+
1019
+
1020
+ /**
1021
+ * Copy a contact. Activities and related data will be ignored
1022
+ * @param request - SourceContactId, DestinationContactName, DestinationContactDepartment, CopyPersons
1023
+ * @returns Id of copied contact
1024
+ */
1025
+ public async copyAsync(request: carriers.Contact_CopyRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
1026
+
1027
+ /**
1028
+ * Copy a contact. Activities and related data will be ignored
1029
+ * @param sourceContactId - The id of the contact to copy
1030
+ * @param destinationContactName - The name of the destination contact
1031
+ * @param destinationContactDepartment - The department of the destination contact
1032
+ * @param copyPersons - If true, persons will be copied from source contact
1033
+ * @returns Id of copied contact
1034
+ */
1035
+ public async copyAsync(sourceContactId: number, destinationContactName: string, destinationContactDepartment: string, copyPersons: boolean, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
1036
+
1037
+ public async copyAsync(sourceContactId:number|carriers.Contact_CopyRequest, destinationContactName?:string|base.WebApiRequestOptions, destinationContactDepartment?:string, copyPersons?:boolean, webapi_options?:base.WebApiRequestOptions) : Promise< number > {
1038
+ let _request : carriers.Contact_CopyRequest = null;
1039
+ let _options : base.WebApiRequestOptions = null;
1040
+ const first : any = sourceContactId;
1041
+ if( typeof( first ) === "object" && first && ( typeof(first.sourceContactId)!='undefined' || typeof(first.destinationContactName)!='undefined' || typeof(first.destinationContactDepartment)!='undefined' || typeof(first.copyPersons)!='undefined' ) )
1042
+ {
1043
+ _request = sourceContactId as carriers.Contact_CopyRequest;
1044
+ _options = destinationContactName as base.WebApiRequestOptions;
1045
+ }
1046
+ else
1047
+ {
1048
+ _request = {
1049
+ sourceContactId: sourceContactId as number,
1050
+ destinationContactName: destinationContactName as string,
1051
+ destinationContactDepartment: destinationContactDepartment as string,
1052
+ copyPersons: copyPersons as boolean,
1053
+ };
1054
+ _options = webapi_options;
1055
+ }
1056
+ return this._copyAsync( _request, _options );
1057
+ }
1058
+
1059
+
1060
+ private async _getNameDepartmentDuplicatesAsync(request: carriers.Contact_GetNameDepartmentDuplicatesRequest, options?:base.WebApiRequestOptions) : Promise< carriers.DuplicateEntry[] > {
1061
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1062
+ base.WebApiBase.SetPending(options);
1063
+ return new Promise< carriers.DuplicateEntry[] >(async (resolve, reject) => {
1064
+ try {
1065
+ config.baseURL = this._options.baseUrl;
1066
+ const response = await this._axios.post("GetNameDepartmentDuplicates", request , config);
1067
+ base.WebApiBase.SetCompleted(options);
1068
+ const res : carriers.DuplicateEntry[] = converters.Create_DuplicateEntryArray_From( response.data );
1069
+ resolve(res);
1070
+ }
1071
+ catch( err ) {
1072
+ base.WebApiBase.HandleError(options, config, err);
1073
+ reject(err);
1074
+ }
1075
+ });
1076
+ }
1077
+
1078
+
1079
+
1080
+ /**
1081
+ * Get duplicates based on the contact name and department
1082
+ * @param request - Name, Department
1083
+ * @returns Any records matching the specified name and department
1084
+ */
1085
+ public async getNameDepartmentDuplicatesAsync(request: carriers.Contact_GetNameDepartmentDuplicatesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DuplicateEntry[] >;
1086
+
1087
+ /**
1088
+ * Get duplicates based on the contact name and department
1089
+ * @param name - Name used for lookup
1090
+ * @param department - Department used for lookup (if any)
1091
+ * @returns Any records matching the specified name and department
1092
+ */
1093
+ public async getNameDepartmentDuplicatesAsync(name: string, department: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DuplicateEntry[] >;
1094
+
1095
+ public async getNameDepartmentDuplicatesAsync(name:string|carriers.Contact_GetNameDepartmentDuplicatesRequest, department?:string|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DuplicateEntry[] > {
1096
+ let _request : carriers.Contact_GetNameDepartmentDuplicatesRequest = null;
1097
+ let _options : base.WebApiRequestOptions = null;
1098
+ const first : any = name;
1099
+ if( typeof( first ) === "object" && first && ( typeof(first.name)!='undefined' || typeof(first.department)!='undefined' ) )
1100
+ {
1101
+ _request = name as carriers.Contact_GetNameDepartmentDuplicatesRequest;
1102
+ _options = department as base.WebApiRequestOptions;
1103
+ }
1104
+ else
1105
+ {
1106
+ _request = {
1107
+ name: name as string,
1108
+ department: department as string,
1109
+ };
1110
+ _options = webapi_options;
1111
+ }
1112
+ return this._getNameDepartmentDuplicatesAsync( _request, _options );
1113
+ }
1114
+
1115
+
1116
+ private async _isNumberValidAsync(request: carriers.Contact_IsNumberValidRequest, options?:base.WebApiRequestOptions) : Promise< boolean > {
1117
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1118
+ base.WebApiBase.SetPending(options);
1119
+ return new Promise< boolean >(async (resolve, reject) => {
1120
+ try {
1121
+ config.baseURL = this._options.baseUrl;
1122
+ const response = await this._axios.post("IsNumberValid", request , config);
1123
+ base.WebApiBase.SetCompleted(options);
1124
+ const res : boolean = response.data as boolean;
1125
+ resolve(res);
1126
+ }
1127
+ catch( err ) {
1128
+ base.WebApiBase.HandleError(options, config, err);
1129
+ reject(err);
1130
+ }
1131
+ });
1132
+ }
1133
+
1134
+
1135
+
1136
+ /**
1137
+ * Checks if the number is unique or required. The setting is configured from admin under system options.
1138
+ * @param request - ContactId, Number
1139
+ * @returns True if the number satisifies the configured rules for uniqueness.
1140
+ */
1141
+ public async isNumberValidAsync(request: carriers.Contact_IsNumberValidRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
1142
+
1143
+ /**
1144
+ * Checks if the number is unique or required. The setting is configured from admin under system options.
1145
+ * @param contactId - Primary key
1146
+ * @param number - Number field value to check.
1147
+ * @returns True if the number satisifies the configured rules for uniqueness.
1148
+ */
1149
+ public async isNumberValidAsync(contactId: number, number: string, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
1150
+
1151
+ public async isNumberValidAsync(contactId:number|carriers.Contact_IsNumberValidRequest, number?:string|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< boolean > {
1152
+ let _request : carriers.Contact_IsNumberValidRequest = null;
1153
+ let _options : base.WebApiRequestOptions = null;
1154
+ const first : any = contactId;
1155
+ if( typeof( first ) === "object" && first && ( typeof(first.contactId)!='undefined' || typeof(first.number)!='undefined' ) )
1156
+ {
1157
+ _request = contactId as carriers.Contact_IsNumberValidRequest;
1158
+ _options = number as base.WebApiRequestOptions;
1159
+ }
1160
+ else
1161
+ {
1162
+ _request = {
1163
+ contactId: contactId as number,
1164
+ number: number as string,
1165
+ };
1166
+ _options = webapi_options;
1167
+ }
1168
+ return this._isNumberValidAsync( _request, _options );
1169
+ }
1170
+
1171
+
1172
+ private async _getQuoteVersionAddressesAsync(request: carriers.Contact_GetQuoteVersionAddressesRequest, options?:base.WebApiRequestOptions) : Promise< carriers.Address[] > {
1173
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1174
+ base.WebApiBase.SetPending(options);
1175
+ return new Promise< carriers.Address[] >(async (resolve, reject) => {
1176
+ try {
1177
+ config.baseURL = this._options.baseUrl;
1178
+ const response = await this._axios.post("GetQuoteVersionAddresses", request , config);
1179
+ base.WebApiBase.SetCompleted(options);
1180
+ const res : carriers.Address[] = converters.Create_AddressArray_From( response.data );
1181
+ resolve(res);
1182
+ }
1183
+ catch( err ) {
1184
+ base.WebApiBase.HandleError(options, config, err);
1185
+ reject(err);
1186
+ }
1187
+ });
1188
+ }
1189
+
1190
+
1191
+
1192
+ /**
1193
+ * Get the associated billing and invoice quote version addresses. These addresses might be address on the contact, or a custom address.
1194
+ * @param request - QuoteVersionId
1195
+ * @returns The quote version addresses. Invoice and billing address, in that order.
1196
+ */
1197
+ public async getQuoteVersionAddressesAsync(request: carriers.Contact_GetQuoteVersionAddressesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Address[] >;
1198
+
1199
+ /**
1200
+ * Get the associated billing and invoice quote version addresses. These addresses might be address on the contact, or a custom address.
1201
+ * @param quoteVersionId - The version to get the addresses for.
1202
+ * @returns The quote version addresses. Invoice and billing address, in that order.
1203
+ */
1204
+ public async getQuoteVersionAddressesAsync(quoteVersionId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Address[] >;
1205
+
1206
+ public async getQuoteVersionAddressesAsync(quoteVersionId:number|carriers.Contact_GetQuoteVersionAddressesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Address[] > {
1207
+ let _request : carriers.Contact_GetQuoteVersionAddressesRequest = null;
1208
+ let _options : base.WebApiRequestOptions = null;
1209
+ const first : any = quoteVersionId;
1210
+ if( typeof( first ) === "object" && first && ( typeof(first.quoteVersionId)!='undefined' ) )
1211
+ {
1212
+ _request = quoteVersionId as carriers.Contact_GetQuoteVersionAddressesRequest;
1213
+ _options = webapi_options as base.WebApiRequestOptions;
1214
+ }
1215
+ else
1216
+ {
1217
+ _request = {
1218
+ quoteVersionId: quoteVersionId as number,
1219
+ };
1220
+ _options = webapi_options;
1221
+ }
1222
+ return this._getQuoteVersionAddressesAsync( _request, _options );
1223
+ }
1224
+
1225
+
1226
+ private async _saveQuoteVersionAddressAsync(request: carriers.Contact_SaveQuoteVersionAddressRequest, options?:base.WebApiRequestOptions) : Promise< carriers.Address > {
1227
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1228
+ base.WebApiBase.SetPending(options);
1229
+ return new Promise< carriers.Address >(async (resolve, reject) => {
1230
+ try {
1231
+ config.baseURL = this._options.baseUrl;
1232
+ const response = await this._axios.post("SaveQuoteVersionAddress", request , config);
1233
+ base.WebApiBase.SetCompleted(options);
1234
+ const res : carriers.Address = converters.Create_Address_From( response.data );
1235
+ resolve(res);
1236
+ }
1237
+ catch( err ) {
1238
+ base.WebApiBase.HandleError(options, config, err);
1239
+ reject(err);
1240
+ }
1241
+ });
1242
+ }
1243
+
1244
+
1245
+
1246
+ /**
1247
+ * Save a custom quote version address.
1248
+ * @param request - QuoteVersionId, Address, AddressType, CountryId
1249
+ * @returns The saved addresses.
1250
+ */
1251
+ public async saveQuoteVersionAddressAsync(request: carriers.Contact_SaveQuoteVersionAddressRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Address >;
1252
+
1253
+ /**
1254
+ * Save a custom quote version address.
1255
+ * @param quoteVersionId - The version to save the address on.
1256
+ * @param address - The address to save on the quote version.
1257
+ * @param addressType - Should be either QuoteBillingAddress or QuoteShippingAddress
1258
+ * @param countryId - The country for the custom address
1259
+ * @returns The saved addresses.
1260
+ */
1261
+ public async saveQuoteVersionAddressAsync(quoteVersionId: number, address: carriers.Address, addressType: enums.AddressType, countryId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Address >;
1262
+
1263
+ public async saveQuoteVersionAddressAsync(quoteVersionId:number|carriers.Contact_SaveQuoteVersionAddressRequest, address?:carriers.Address|base.WebApiRequestOptions, addressType?:enums.AddressType, countryId?:number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Address > {
1264
+ let _request : carriers.Contact_SaveQuoteVersionAddressRequest = null;
1265
+ let _options : base.WebApiRequestOptions = null;
1266
+ const first : any = quoteVersionId;
1267
+ if( typeof( first ) === "object" && first && ( typeof(first.quoteVersionId)!='undefined' || typeof(first.address)!='undefined' || typeof(first.addressType)!='undefined' || typeof(first.countryId)!='undefined' ) )
1268
+ {
1269
+ _request = quoteVersionId as carriers.Contact_SaveQuoteVersionAddressRequest;
1270
+ _options = address as base.WebApiRequestOptions;
1271
+ }
1272
+ else
1273
+ {
1274
+ _request = {
1275
+ quoteVersionId: quoteVersionId as number,
1276
+ address: address as carriers.Address,
1277
+ addressType: addressType as enums.AddressType,
1278
+ countryId: countryId as number,
1279
+ };
1280
+ _options = webapi_options;
1281
+ }
1282
+ return this._saveQuoteVersionAddressAsync( _request, _options );
1283
+ }
1284
+
1285
+
1286
+ private async _deleteExpiredAsync( options?:base.WebApiRequestOptions) : Promise< void > {
1287
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1288
+ base.WebApiBase.SetPending(options);
1289
+ return new Promise< void >(async (resolve, reject) => {
1290
+ try {
1291
+ config.baseURL = this._options.baseUrl;
1292
+ const response = await this._axios.post("DeleteExpired", undefined , config);
1293
+ base.WebApiBase.SetCompleted(options);
1294
+ const res = response.data;
1295
+ resolve(res);
1296
+ }
1297
+ catch( err ) {
1298
+ base.WebApiBase.HandleError(options, config, err);
1299
+ reject(err);
1300
+ }
1301
+ });
1302
+ }
1303
+
1304
+
1305
+ /**
1306
+ * Trigger deletion of contacts (companies) that has been (soft) deleted and have timed out the expiry period (the SoftDeleteRetention preference).
1307
+ * @returns
1308
+ */
1309
+ public async deleteExpiredAsync(webapi_options?:base.WebApiRequestOptions) : Promise< void >
1310
+ {
1311
+ return this._deleteExpiredAsync(webapi_options);
1312
+ }
1313
+
1314
+
1315
+ private async _getContactSummaryAsync(request: carriers.Contact_GetContactSummaryRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ContactSummary > {
1316
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1317
+ base.WebApiBase.SetPending(options);
1318
+ return new Promise< carriers.ContactSummary >(async (resolve, reject) => {
1319
+ try {
1320
+ config.baseURL = this._options.baseUrl;
1321
+ const response = await this._axios.post("GetContactSummary", request , config);
1322
+ base.WebApiBase.SetCompleted(options);
1323
+ const res : carriers.ContactSummary = converters.Create_ContactSummary_From( response.data );
1324
+ resolve(res);
1325
+ }
1326
+ catch( err ) {
1327
+ base.WebApiBase.HandleError(options, config, err);
1328
+ reject(err);
1329
+ }
1330
+ });
1331
+ }
1332
+
1333
+
1334
+
1335
+ /**
1336
+ * Get summary of contact and its recent activity.
1337
+ * @param request - ContactId, Limit
1338
+ * @returns Summary of contact, with recent requests, sales, follow-ups, chats.
1339
+ */
1340
+ public async getContactSummaryAsync(request: carriers.Contact_GetContactSummaryRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ContactSummary >;
1341
+
1342
+ /**
1343
+ * Get summary of contact and its recent activity.
1344
+ * @param contactId - The contact id to summarize.
1345
+ * @param limit - Max number of items to include in summary lists.
1346
+ * @returns Summary of contact, with recent requests, sales, follow-ups, chats.
1347
+ */
1348
+ public async getContactSummaryAsync(contactId: number, limit: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ContactSummary >;
1349
+
1350
+ public async getContactSummaryAsync(contactId:number|carriers.Contact_GetContactSummaryRequest, limit?:number|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ContactSummary > {
1351
+ let _request : carriers.Contact_GetContactSummaryRequest = null;
1352
+ let _options : base.WebApiRequestOptions = null;
1353
+ const first : any = contactId;
1354
+ if( typeof( first ) === "object" && first && ( typeof(first.contactId)!='undefined' || typeof(first.limit)!='undefined' ) )
1355
+ {
1356
+ _request = contactId as carriers.Contact_GetContactSummaryRequest;
1357
+ _options = limit as base.WebApiRequestOptions;
1358
+ }
1359
+ else
1360
+ {
1361
+ _request = {
1362
+ contactId: contactId as number,
1363
+ limit: limit as number,
1364
+ };
1365
+ _options = webapi_options;
1366
+ }
1367
+ return this._getContactSummaryAsync( _request, _options );
1368
+ }
1369
+
1370
+
1371
+ private async _validateContactEntityAsync(request: carriers.Contact_ValidateContactEntityRequest, options?:base.WebApiRequestOptions) : Promise< carriers.StringDictionary > {
1372
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1373
+ base.WebApiBase.SetPending(options);
1374
+ return new Promise< carriers.StringDictionary >(async (resolve, reject) => {
1375
+ try {
1376
+ config.baseURL = this._options.baseUrl;
1377
+ const response = await this._axios.post("ValidateContactEntity", request , config);
1378
+ base.WebApiBase.SetCompleted(options);
1379
+ const res : carriers.StringDictionary = converters.Create_StringDictionary_From( response.data );
1380
+ resolve(res);
1381
+ }
1382
+ catch( err ) {
1383
+ base.WebApiBase.HandleError(options, config, err);
1384
+ reject(err);
1385
+ }
1386
+ });
1387
+ }
1388
+
1389
+
1390
+
1391
+ /**
1392
+ * Check that entity is ready for saving, return error messages by field.
1393
+ * @param request - ContactEntity
1394
+ * @returns Error messages tagged by field.
1395
+ */
1396
+ public async validateContactEntityAsync(request: carriers.Contact_ValidateContactEntityRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.StringDictionary >;
1397
+
1398
+ /**
1399
+ * Check that entity is ready for saving, return error messages by field.
1400
+ * @param contactEntity - Entity to be checked for errors.
1401
+ * @returns Error messages tagged by field.
1402
+ */
1403
+ public async validateContactEntityAsync(contactEntity: carriers.ContactEntity, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.StringDictionary >;
1404
+
1405
+ public async validateContactEntityAsync(contactEntity:carriers.ContactEntity|carriers.Contact_ValidateContactEntityRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.StringDictionary > {
1406
+ let _request : carriers.Contact_ValidateContactEntityRequest = null;
1407
+ let _options : base.WebApiRequestOptions = null;
1408
+ const first : any = contactEntity;
1409
+ if( typeof( first ) === "object" && first && ( typeof(first.contactEntity)!='undefined' ) )
1410
+ {
1411
+ _request = contactEntity as carriers.Contact_ValidateContactEntityRequest;
1412
+ _options = webapi_options as base.WebApiRequestOptions;
1413
+ }
1414
+ else
1415
+ {
1416
+ _request = {
1417
+ contactEntity: contactEntity as carriers.ContactEntity,
1418
+ };
1419
+ _options = webapi_options;
1420
+ }
1421
+ return this._validateContactEntityAsync( _request, _options );
1422
+ }
1423
+
1424
+ /*
1425
+ * Gets an array of Contact objects.
1426
+ * @param contactIds - The primary keys.
1427
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
1428
+ * @returns An array of Contact
1429
+ */
1430
+ public async getContactListAsync(contactIds: number[], options?:base.WebApiRequestOptions) : Promise< carriers.Contact[] > {
1431
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1432
+ base.WebApiBase.SetPending(options);
1433
+ return new Promise< carriers.Contact[] >(async (resolve, reject) => {
1434
+ try {
1435
+ const response = await this._axios.post("GetContactList", contactIds, config);
1436
+ base.WebApiBase.SetCompleted(options);
1437
+ const res = converters.Create_ContactArray_From( response.data );
1438
+ resolve(res);
1439
+ }
1440
+ catch( err ) {
1441
+ base.WebApiBase.HandleError(options, config, err);
1442
+ reject(err);
1443
+ }
1444
+ });
1445
+ }
1446
+
1447
+
1448
+ private async _getMyContactsAsync( options?:base.WebApiRequestOptions) : Promise< carriers.Contact[] > {
1449
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1450
+ base.WebApiBase.SetPending(options);
1451
+ return new Promise< carriers.Contact[] >(async (resolve, reject) => {
1452
+ try {
1453
+ config.baseURL = this._options.baseUrl;
1454
+ const response = await this._axios.post("GetMyContacts", undefined , config);
1455
+ base.WebApiBase.SetCompleted(options);
1456
+ const res : carriers.Contact[] = converters.Create_ContactArray_From( response.data );
1457
+ resolve(res);
1458
+ }
1459
+ catch( err ) {
1460
+ base.WebApiBase.HandleError(options, config, err);
1461
+ reject(err);
1462
+ }
1463
+ });
1464
+ }
1465
+
1466
+
1467
+ /**
1468
+ * Getting the contacts where the user currently logged in is set as contact owner.
1469
+ * @returns Array of contacts
1470
+ */
1471
+ public async getMyContactsAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Contact[] >
1472
+ {
1473
+ return this._getMyContactsAsync(webapi_options);
1474
+ }
1475
+
1476
+
1477
+ private async _getMyRecentContactsAsync(request: carriers.Contact_GetMyRecentContactsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.Contact[] > {
1478
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1479
+ base.WebApiBase.SetPending(options);
1480
+ return new Promise< carriers.Contact[] >(async (resolve, reject) => {
1481
+ try {
1482
+ config.baseURL = this._options.baseUrl;
1483
+ const response = await this._axios.post("GetMyRecentContacts", request , config);
1484
+ base.WebApiBase.SetCompleted(options);
1485
+ const res : carriers.Contact[] = converters.Create_ContactArray_From( response.data );
1486
+ resolve(res);
1487
+ }
1488
+ catch( err ) {
1489
+ base.WebApiBase.HandleError(options, config, err);
1490
+ reject(err);
1491
+ }
1492
+ });
1493
+ }
1494
+
1495
+
1496
+
1497
+ /**
1498
+ * Method that returns a set of initial contacts. This could be the contacts in a favorites selection, the history list, the diary, or from all sources. If retrieved from the diary it will get appointments for the current and the next day.
1499
+ * @param request - SourceType
1500
+ * @returns Arrayof contacts
1501
+ */
1502
+ public async getMyRecentContactsAsync(request: carriers.Contact_GetMyRecentContactsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Contact[] >;
1503
+
1504
+ /**
1505
+ * Method that returns a set of initial contacts. This could be the contacts in a favorites selection, the history list, the diary, or from all sources. If retrieved from the diary it will get appointments for the current and the next day.
1506
+ * @param sourceType - The source where the contacts are retrieved from (Favorites, History, Diary)
1507
+ * @returns Arrayof contacts
1508
+ */
1509
+ public async getMyRecentContactsAsync(sourceType: enums.ContactSourceType, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Contact[] >;
1510
+
1511
+ public async getMyRecentContactsAsync(sourceType:enums.ContactSourceType|carriers.Contact_GetMyRecentContactsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Contact[] > {
1512
+ let _request : carriers.Contact_GetMyRecentContactsRequest = null;
1513
+ let _options : base.WebApiRequestOptions = null;
1514
+ const first : any = sourceType;
1515
+ if( typeof( first ) === "object" && first && ( typeof(first.sourceType)!='undefined' ) )
1516
+ {
1517
+ _request = sourceType as carriers.Contact_GetMyRecentContactsRequest;
1518
+ _options = webapi_options as base.WebApiRequestOptions;
1519
+ }
1520
+ else
1521
+ {
1522
+ _request = {
1523
+ sourceType: sourceType as enums.ContactSourceType,
1524
+ };
1525
+ _options = webapi_options;
1526
+ }
1527
+ return this._getMyRecentContactsAsync( _request, _options );
1528
+ }
1529
+
1530
+
1531
+ private async _getPreviewContactAsync(request: carriers.Contact_GetPreviewContactRequest, options?:base.WebApiRequestOptions) : Promise< carriers.PreviewContact > {
1532
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1533
+ base.WebApiBase.SetPending(options);
1534
+ return new Promise< carriers.PreviewContact >(async (resolve, reject) => {
1535
+ try {
1536
+ config.baseURL = this._options.baseUrl;
1537
+ const response = await this._axios.post("GetPreviewContact", request , config);
1538
+ base.WebApiBase.SetCompleted(options);
1539
+ const res : carriers.PreviewContact = converters.Create_PreviewContact_From( response.data );
1540
+ resolve(res);
1541
+ }
1542
+ catch( err ) {
1543
+ base.WebApiBase.HandleError(options, config, err);
1544
+ reject(err);
1545
+ }
1546
+ });
1547
+ }
1548
+
1549
+
1550
+
1551
+ /**
1552
+ * Get a contact from its ID
1553
+ * @param request - ContactId
1554
+ * @returns Contact minimal contact suitable for preview
1555
+ */
1556
+ public async getPreviewContactAsync(request: carriers.Contact_GetPreviewContactRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PreviewContact >;
1557
+
1558
+ /**
1559
+ * Get a contact from its ID
1560
+ * @param contactId - Contact ID
1561
+ * @returns Contact minimal contact suitable for preview
1562
+ */
1563
+ public async getPreviewContactAsync(contactId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PreviewContact >;
1564
+
1565
+ public async getPreviewContactAsync(contactId:number|carriers.Contact_GetPreviewContactRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PreviewContact > {
1566
+ let _request : carriers.Contact_GetPreviewContactRequest = null;
1567
+ let _options : base.WebApiRequestOptions = null;
1568
+ const first : any = contactId;
1569
+ if( typeof( first ) === "object" && first && ( typeof(first.contactId)!='undefined' ) )
1570
+ {
1571
+ _request = contactId as carriers.Contact_GetPreviewContactRequest;
1572
+ _options = webapi_options as base.WebApiRequestOptions;
1573
+ }
1574
+ else
1575
+ {
1576
+ _request = {
1577
+ contactId: contactId as number,
1578
+ };
1579
+ _options = webapi_options;
1580
+ }
1581
+ return this._getPreviewContactAsync( _request, _options );
1582
+ }
1583
+
1584
+ } // class v1ContactAgentController
1585
+
1586
+