@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,1809 @@
1
+ // <auto-generated>
2
+ // SuperOffice Code Generator
3
+ // modelling\templates\servicestswebapi\tswebapiagents.tt
4
+ // </auto-generated>
5
+ import * as base from './WebApiBase.js';
6
+ import * as converters from './Converters.js';
7
+ import { FromBase64ToString, ToBase64 } from './Base64.js';
8
+ /**
9
+ * Person data services.
10
+ */
11
+ export class PersonAgent extends base.WebApiBase {
12
+ constructor(baseUrlOrOptions, langOrconfigOrRM, langOrResourceOrRM, cultureCode) {
13
+ const options = base.WebApiBase.FigureOutOptions(baseUrlOrOptions, langOrconfigOrRM, langOrResourceOrRM, cultureCode);
14
+ options.basePath = "v1/Agents/Person/";
15
+ super(options);
16
+ }
17
+ /**
18
+ * Set default values into a new ConsentPerson.
19
+ * NetServer calculates default values on the entity, which is required when creating/storing a new instance
20
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
21
+ * @returns A blank entity.
22
+ */
23
+ async createDefaultConsentPersonAsync(options) {
24
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
25
+ base.WebApiBase.SetPending(options);
26
+ return new Promise(async (resolve, reject) => {
27
+ try {
28
+ const response = await this._axios.post("CreateDefaultConsentPerson", null, config);
29
+ base.WebApiBase.SetCompleted(options);
30
+ const res = converters.Create_ConsentPerson_From(response.data);
31
+ resolve(res);
32
+ }
33
+ catch (err) {
34
+ base.WebApiBase.HandleError(options, config, err);
35
+ reject(err);
36
+ }
37
+ });
38
+ }
39
+ /*
40
+ * Replace the existing ConsentPerson or creates a new ConsentPerson if the id parameter is empty
41
+ * @param entity - The ConsentPerson to be saved.
42
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
43
+ * @returns New or updated ConsentPerson
44
+ */
45
+ async saveConsentPersonAsync(entity, options) {
46
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
47
+ base.WebApiBase.SetPending(options);
48
+ return new Promise(async (resolve, reject) => {
49
+ try {
50
+ const response = await this._axios.post("SaveConsentPerson", entity, config);
51
+ base.WebApiBase.SetCompleted(options);
52
+ const res = converters.Create_ConsentPerson_From(response.data);
53
+ resolve(res);
54
+ }
55
+ catch (err) {
56
+ base.WebApiBase.HandleError(options, config, err);
57
+ reject(err);
58
+ }
59
+ });
60
+ }
61
+ /*
62
+ * Deletes the ConsentPerson
63
+ * @param ConsentPersonId - The id of the ConsentPerson to be deleted.
64
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
65
+ */
66
+ async deleteConsentPersonAsync(ConsentPersonId, options) {
67
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
68
+ base.WebApiBase.SetPending(options);
69
+ return new Promise(async (resolve, reject) => {
70
+ try {
71
+ const response = await this._axios.post("DeleteConsentPerson?ConsentPersonId=" + ConsentPersonId, null, config);
72
+ base.WebApiBase.SetCompleted(options);
73
+ const res = response.data;
74
+ resolve(res);
75
+ }
76
+ catch (err) {
77
+ base.WebApiBase.HandleError(options, config, err);
78
+ reject(err);
79
+ }
80
+ });
81
+ }
82
+ /**
83
+ * Set default values into a new PersonEntity.
84
+ * NetServer calculates default values on the entity, which is required when creating/storing a new instance
85
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
86
+ * @returns A blank entity.
87
+ */
88
+ async createDefaultPersonEntityAsync(options) {
89
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
90
+ base.WebApiBase.SetPending(options);
91
+ return new Promise(async (resolve, reject) => {
92
+ try {
93
+ const response = await this._axios.post("CreateDefaultPersonEntity", null, config);
94
+ base.WebApiBase.SetCompleted(options);
95
+ const res = converters.Create_PersonEntity_From(response.data);
96
+ resolve(res);
97
+ }
98
+ catch (err) {
99
+ base.WebApiBase.HandleError(options, config, err);
100
+ reject(err);
101
+ }
102
+ });
103
+ }
104
+ /*
105
+ * Replace the existing PersonEntity or creates a new PersonEntity if the id parameter is empty
106
+ * @param entity - The PersonEntity to be saved.
107
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
108
+ * @returns New or updated PersonEntity
109
+ */
110
+ async savePersonEntityAsync(entity, options) {
111
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
112
+ base.WebApiBase.SetPending(options);
113
+ return new Promise(async (resolve, reject) => {
114
+ try {
115
+ const response = await this._axios.post("SavePersonEntity", entity, config);
116
+ base.WebApiBase.SetCompleted(options);
117
+ const res = converters.Create_PersonEntity_From(response.data);
118
+ resolve(res);
119
+ }
120
+ catch (err) {
121
+ base.WebApiBase.HandleError(options, config, err);
122
+ reject(err);
123
+ }
124
+ });
125
+ }
126
+ /*
127
+ * Deletes the PersonEntity
128
+ * @param PersonEntityId - The id of the PersonEntity to be deleted.
129
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
130
+ */
131
+ async deletePersonEntityAsync(PersonEntityId, options) {
132
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
133
+ base.WebApiBase.SetPending(options);
134
+ return new Promise(async (resolve, reject) => {
135
+ try {
136
+ const response = await this._axios.post("DeletePersonEntity?PersonEntityId=" + PersonEntityId, null, config);
137
+ base.WebApiBase.SetCompleted(options);
138
+ const res = response.data;
139
+ resolve(res);
140
+ }
141
+ catch (err) {
142
+ base.WebApiBase.HandleError(options, config, err);
143
+ reject(err);
144
+ }
145
+ });
146
+ }
147
+ /**
148
+ * Set default values into a new PersonImage.
149
+ * NetServer calculates default values on the entity, which is required when creating/storing a new instance
150
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
151
+ * @returns A blank entity.
152
+ */
153
+ async createDefaultPersonImageAsync(options) {
154
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
155
+ base.WebApiBase.SetPending(options);
156
+ return new Promise(async (resolve, reject) => {
157
+ try {
158
+ const response = await this._axios.post("CreateDefaultPersonImage", null, config);
159
+ base.WebApiBase.SetCompleted(options);
160
+ const res = converters.Create_PersonImage_From(response.data);
161
+ resolve(res);
162
+ }
163
+ catch (err) {
164
+ base.WebApiBase.HandleError(options, config, err);
165
+ reject(err);
166
+ }
167
+ });
168
+ }
169
+ /*
170
+ * Gets a ConsentPerson object.
171
+ * @param consentPersonId - The primary key.
172
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
173
+ * @returns A single ConsentPerson
174
+ */
175
+ async getConsentPersonAsync(consentPersonId, options) {
176
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
177
+ base.WebApiBase.SetPending(options);
178
+ return new Promise(async (resolve, reject) => {
179
+ try {
180
+ const response = await this._axios.post("GetConsentPerson?consentPersonId=" + consentPersonId, null, config);
181
+ base.WebApiBase.SetCompleted(options);
182
+ const res = converters.Create_ConsentPerson_From(response.data);
183
+ resolve(res);
184
+ }
185
+ catch (err) {
186
+ base.WebApiBase.HandleError(options, config, err);
187
+ reject(err);
188
+ }
189
+ });
190
+ }
191
+ /*
192
+ * Gets a Person object.
193
+ * @param personId - The primary key.
194
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
195
+ * @returns A single Person
196
+ */
197
+ async getPersonAsync(personId, options) {
198
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
199
+ base.WebApiBase.SetPending(options);
200
+ return new Promise(async (resolve, reject) => {
201
+ try {
202
+ const response = await this._axios.post("GetPerson?personId=" + personId, null, config);
203
+ base.WebApiBase.SetCompleted(options);
204
+ const res = converters.Create_Person_From(response.data);
205
+ resolve(res);
206
+ }
207
+ catch (err) {
208
+ base.WebApiBase.HandleError(options, config, err);
209
+ reject(err);
210
+ }
211
+ });
212
+ }
213
+ /*
214
+ * Gets a PersonEntity object.
215
+ * @param personEntityId - The primary key.
216
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
217
+ * @returns A single PersonEntity
218
+ */
219
+ async getPersonEntityAsync(personEntityId, options) {
220
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
221
+ base.WebApiBase.SetPending(options);
222
+ return new Promise(async (resolve, reject) => {
223
+ try {
224
+ const response = await this._axios.post("GetPersonEntity?personEntityId=" + personEntityId, null, config);
225
+ base.WebApiBase.SetCompleted(options);
226
+ const res = converters.Create_PersonEntity_From(response.data);
227
+ resolve(res);
228
+ }
229
+ catch (err) {
230
+ base.WebApiBase.HandleError(options, config, err);
231
+ reject(err);
232
+ }
233
+ });
234
+ }
235
+ async _undeleteAsync(request, options) {
236
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
237
+ base.WebApiBase.SetPending(options);
238
+ return new Promise(async (resolve, reject) => {
239
+ try {
240
+ config.baseURL = this._options.baseUrl;
241
+ const response = await this._axios.post("Undelete", request, config);
242
+ base.WebApiBase.SetCompleted(options);
243
+ const res = response.data;
244
+ resolve(res);
245
+ }
246
+ catch (err) {
247
+ base.WebApiBase.HandleError(options, config, err);
248
+ reject(err);
249
+ }
250
+ });
251
+ }
252
+ async undeleteAsync(id, webapi_options) {
253
+ let _request = null;
254
+ let _options = null;
255
+ const first = id;
256
+ if (typeof (first) === "object" && first && (typeof (first.id) != 'undefined')) {
257
+ _request = id;
258
+ _options = webapi_options;
259
+ }
260
+ else {
261
+ _request = {
262
+ id: id,
263
+ };
264
+ _options = webapi_options;
265
+ }
266
+ return this._undeleteAsync(_request, _options);
267
+ }
268
+ async _getMyPersonAsync(options) {
269
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
270
+ base.WebApiBase.SetPending(options);
271
+ return new Promise(async (resolve, reject) => {
272
+ try {
273
+ config.baseURL = this._options.baseUrl;
274
+ const response = await this._axios.post("GetMyPerson", undefined, config);
275
+ base.WebApiBase.SetCompleted(options);
276
+ const res = converters.Create_PersonEntity_From(response.data);
277
+ resolve(res);
278
+ }
279
+ catch (err) {
280
+ base.WebApiBase.HandleError(options, config, err);
281
+ reject(err);
282
+ }
283
+ });
284
+ }
285
+ /**
286
+ * Gets the person info belonging to the currently logged on user.
287
+ * @returns The PersonEntity
288
+ */
289
+ async getMyPersonAsync(webapi_options) {
290
+ return this._getMyPersonAsync(webapi_options);
291
+ }
292
+ async _getSalesRepAsync(request, options) {
293
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
294
+ base.WebApiBase.SetPending(options);
295
+ return new Promise(async (resolve, reject) => {
296
+ try {
297
+ config.baseURL = this._options.baseUrl;
298
+ const response = await this._axios.post("GetSalesRep", request, config);
299
+ base.WebApiBase.SetCompleted(options);
300
+ const res = converters.Create_PersonEntity_From(response.data);
301
+ resolve(res);
302
+ }
303
+ catch (err) {
304
+ base.WebApiBase.HandleError(options, config, err);
305
+ reject(err);
306
+ }
307
+ });
308
+ }
309
+ async getSalesRepAsync(contactName, personFirstname, personLastname, emailAddress, phoneNumber, webapi_options) {
310
+ let _request = null;
311
+ let _options = null;
312
+ const first = contactName;
313
+ if (typeof (first) === "object" && first && (typeof (first.contactName) != 'undefined' || typeof (first.personFirstname) != 'undefined' || typeof (first.personLastname) != 'undefined' || typeof (first.emailAddress) != 'undefined' || typeof (first.phoneNumber) != 'undefined')) {
314
+ _request = contactName;
315
+ _options = personFirstname;
316
+ }
317
+ else {
318
+ _request = {
319
+ contactName: contactName,
320
+ personFirstname: personFirstname,
321
+ personLastname: personLastname,
322
+ emailAddress: emailAddress,
323
+ phoneNumber: phoneNumber,
324
+ };
325
+ _options = webapi_options;
326
+ }
327
+ return this._getSalesRepAsync(_request, _options);
328
+ }
329
+ async _getPhonesAsync(request, options) {
330
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
331
+ base.WebApiBase.SetPending(options);
332
+ return new Promise(async (resolve, reject) => {
333
+ try {
334
+ config.baseURL = this._options.baseUrl;
335
+ const response = await this._axios.post("GetPhones", request, config);
336
+ base.WebApiBase.SetCompleted(options);
337
+ const res = converters.Create_EntityElementArray_From(response.data);
338
+ resolve(res);
339
+ }
340
+ catch (err) {
341
+ base.WebApiBase.HandleError(options, config, err);
342
+ reject(err);
343
+ }
344
+ });
345
+ }
346
+ async getPhonesAsync(personId, webapi_options) {
347
+ let _request = null;
348
+ let _options = null;
349
+ const first = personId;
350
+ if (typeof (first) === "object" && first && (typeof (first.personId) != 'undefined')) {
351
+ _request = personId;
352
+ _options = webapi_options;
353
+ }
354
+ else {
355
+ _request = {
356
+ personId: personId,
357
+ };
358
+ _options = webapi_options;
359
+ }
360
+ return this._getPhonesAsync(_request, _options);
361
+ }
362
+ async _changeCountryAsync(request, options) {
363
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
364
+ base.WebApiBase.SetPending(options);
365
+ return new Promise(async (resolve, reject) => {
366
+ try {
367
+ config.baseURL = this._options.baseUrl;
368
+ const response = await this._axios.post("ChangeCountry", request, config);
369
+ base.WebApiBase.SetCompleted(options);
370
+ const res = converters.Create_PersonEntity_From(response.data);
371
+ resolve(res);
372
+ }
373
+ catch (err) {
374
+ base.WebApiBase.HandleError(options, config, err);
375
+ reject(err);
376
+ }
377
+ });
378
+ }
379
+ async changeCountryAsync(personEntity, toCountryId, webapi_options) {
380
+ let _request = null;
381
+ let _options = null;
382
+ const first = personEntity;
383
+ if (typeof (first) === "object" && first && (typeof (first.personEntity) != 'undefined' || typeof (first.toCountryId) != 'undefined')) {
384
+ _request = personEntity;
385
+ _options = toCountryId;
386
+ }
387
+ else {
388
+ _request = {
389
+ personEntity: personEntity,
390
+ toCountryId: toCountryId,
391
+ };
392
+ _options = webapi_options;
393
+ }
394
+ return this._changeCountryAsync(_request, _options);
395
+ }
396
+ async _getAddressAsync(request, options) {
397
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
398
+ base.WebApiBase.SetPending(options);
399
+ return new Promise(async (resolve, reject) => {
400
+ try {
401
+ config.baseURL = this._options.baseUrl;
402
+ const response = await this._axios.post("GetAddress", request, config);
403
+ base.WebApiBase.SetCompleted(options);
404
+ const res = converters.Create_Address_From(response.data);
405
+ resolve(res);
406
+ }
407
+ catch (err) {
408
+ base.WebApiBase.HandleError(options, config, err);
409
+ reject(err);
410
+ }
411
+ });
412
+ }
413
+ async getAddressAsync(personId, webapi_options) {
414
+ let _request = null;
415
+ let _options = null;
416
+ const first = personId;
417
+ if (typeof (first) === "object" && first && (typeof (first.personId) != 'undefined')) {
418
+ _request = personId;
419
+ _options = webapi_options;
420
+ }
421
+ else {
422
+ _request = {
423
+ personId: personId,
424
+ };
425
+ _options = webapi_options;
426
+ }
427
+ return this._getAddressAsync(_request, _options);
428
+ }
429
+ async _getAddressByCountryAsync(request, options) {
430
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
431
+ base.WebApiBase.SetPending(options);
432
+ return new Promise(async (resolve, reject) => {
433
+ try {
434
+ config.baseURL = this._options.baseUrl;
435
+ const response = await this._axios.post("GetAddressByCountry", request, config);
436
+ base.WebApiBase.SetCompleted(options);
437
+ const res = converters.Create_Address_From(response.data);
438
+ resolve(res);
439
+ }
440
+ catch (err) {
441
+ base.WebApiBase.HandleError(options, config, err);
442
+ reject(err);
443
+ }
444
+ });
445
+ }
446
+ async getAddressByCountryAsync(personId, countryId, webapi_options) {
447
+ let _request = null;
448
+ let _options = null;
449
+ const first = personId;
450
+ if (typeof (first) === "object" && first && (typeof (first.personId) != 'undefined' || typeof (first.countryId) != 'undefined')) {
451
+ _request = personId;
452
+ _options = countryId;
453
+ }
454
+ else {
455
+ _request = {
456
+ personId: personId,
457
+ countryId: countryId,
458
+ };
459
+ _options = webapi_options;
460
+ }
461
+ return this._getAddressByCountryAsync(_request, _options);
462
+ }
463
+ async _getPersonImageAsync(request, options) {
464
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options) || {};
465
+ base.WebApiBase.SetPending(options);
466
+ return new Promise(async (resolve, reject) => {
467
+ try {
468
+ if (!options || options.returnBlobAs == base.ReturnBlobType.AsArrayBuffer) {
469
+ config.responseType = "arraybuffer";
470
+ config.headers = config.headers || {};
471
+ config.headers["Accept"] = "application/octet-stream";
472
+ }
473
+ config.baseURL = this._options.baseUrl;
474
+ const response = await this._axios.post("GetPersonImage", request, config);
475
+ base.WebApiBase.SetCompleted(options);
476
+ let res = null;
477
+ if (options && options.returnBlobAs != base.ReturnBlobType.AsArrayBuffer) {
478
+ res = response.data;
479
+ if (options.returnBlobAs == base.ReturnBlobType.AsString) {
480
+ res = FromBase64ToString(res);
481
+ }
482
+ }
483
+ else {
484
+ res = response.data;
485
+ }
486
+ resolve(res);
487
+ }
488
+ catch (err) {
489
+ base.WebApiBase.HandleError(options, config, err);
490
+ reject(err);
491
+ }
492
+ });
493
+ }
494
+ async getPersonImageAsync(personId, webapi_options) {
495
+ let _request = null;
496
+ let _options = null;
497
+ const first = personId;
498
+ if (typeof (first) === "object" && first && (typeof (first.personId) != 'undefined')) {
499
+ _request = personId;
500
+ _options = webapi_options;
501
+ }
502
+ else {
503
+ _request = {
504
+ personId: personId,
505
+ };
506
+ _options = webapi_options;
507
+ }
508
+ return this._getPersonImageAsync(_request, _options);
509
+ }
510
+ async _setPersonImageAsync(request, options) {
511
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
512
+ base.WebApiBase.SetPending(options);
513
+ return new Promise(async (resolve, reject) => {
514
+ try {
515
+ config.baseURL = this._options.baseUrl;
516
+ const response = await this._axios.post("SetPersonImage", request, config);
517
+ base.WebApiBase.SetCompleted(options);
518
+ const res = response.data;
519
+ resolve(res);
520
+ }
521
+ catch (err) {
522
+ base.WebApiBase.HandleError(options, config, err);
523
+ reject(err);
524
+ }
525
+ });
526
+ }
527
+ async setPersonImageAsync(personId, image, webapi_options) {
528
+ let _request = null;
529
+ let _options = null;
530
+ const first = personId;
531
+ if (typeof (first) === "object" && first && (typeof (first.personId) != 'undefined' || typeof (first.image) != 'undefined')) {
532
+ _request = personId;
533
+ _options = image;
534
+ }
535
+ else {
536
+ _request = {
537
+ personId: personId,
538
+ image: image,
539
+ };
540
+ _options = webapi_options;
541
+ }
542
+ _request.image = ToBase64(_request.image);
543
+ return this._setPersonImageAsync(_request, _options);
544
+ }
545
+ async _createDefaultByContactIdAsync(request, options) {
546
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
547
+ base.WebApiBase.SetPending(options);
548
+ return new Promise(async (resolve, reject) => {
549
+ try {
550
+ config.baseURL = this._options.baseUrl;
551
+ const response = await this._axios.post("CreateDefaultByContactId", request, config);
552
+ base.WebApiBase.SetCompleted(options);
553
+ const res = converters.Create_PersonEntity_From(response.data);
554
+ resolve(res);
555
+ }
556
+ catch (err) {
557
+ base.WebApiBase.HandleError(options, config, err);
558
+ reject(err);
559
+ }
560
+ });
561
+ }
562
+ async createDefaultByContactIdAsync(contactId, webapi_options) {
563
+ let _request = null;
564
+ let _options = null;
565
+ const first = contactId;
566
+ if (typeof (first) === "object" && first && (typeof (first.contactId) != 'undefined')) {
567
+ _request = contactId;
568
+ _options = webapi_options;
569
+ }
570
+ else {
571
+ _request = {
572
+ contactId: contactId,
573
+ };
574
+ _options = webapi_options;
575
+ }
576
+ return this._createDefaultByContactIdAsync(_request, _options);
577
+ }
578
+ async _moveAsync(request, options) {
579
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
580
+ base.WebApiBase.SetPending(options);
581
+ return new Promise(async (resolve, reject) => {
582
+ try {
583
+ config.baseURL = this._options.baseUrl;
584
+ const response = await this._axios.post("Move", request, config);
585
+ base.WebApiBase.SetCompleted(options);
586
+ const res = response.data;
587
+ resolve(res);
588
+ }
589
+ catch (err) {
590
+ base.WebApiBase.HandleError(options, config, err);
591
+ reject(err);
592
+ }
593
+ });
594
+ }
595
+ async moveAsync(personId, destinationContactId, moveAfterDate, webapi_options) {
596
+ let _request = null;
597
+ let _options = null;
598
+ const first = personId;
599
+ if (typeof (first) === "object" && first && (typeof (first.personId) != 'undefined' || typeof (first.destinationContactId) != 'undefined' || typeof (first.moveAfterDate) != 'undefined')) {
600
+ _request = personId;
601
+ _options = destinationContactId;
602
+ }
603
+ else {
604
+ _request = {
605
+ personId: personId,
606
+ destinationContactId: destinationContactId,
607
+ moveAfterDate: moveAfterDate,
608
+ };
609
+ _options = webapi_options;
610
+ }
611
+ return this._moveAsync(_request, _options);
612
+ }
613
+ async _mergeAsync(request, options) {
614
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
615
+ base.WebApiBase.SetPending(options);
616
+ return new Promise(async (resolve, reject) => {
617
+ try {
618
+ config.baseURL = this._options.baseUrl;
619
+ const response = await this._axios.post("Merge", request, config);
620
+ base.WebApiBase.SetCompleted(options);
621
+ const res = response.data;
622
+ resolve(res);
623
+ }
624
+ catch (err) {
625
+ base.WebApiBase.HandleError(options, config, err);
626
+ reject(err);
627
+ }
628
+ });
629
+ }
630
+ async mergeAsync(sourcePersonId, destinationPersonId, moveAfterDate, deleteSource, replaceEmptyFieldsOnDestination, webapi_options) {
631
+ let _request = null;
632
+ let _options = null;
633
+ const first = sourcePersonId;
634
+ if (typeof (first) === "object" && first && (typeof (first.sourcePersonId) != 'undefined' || typeof (first.destinationPersonId) != 'undefined' || typeof (first.moveAfterDate) != 'undefined' || typeof (first.deleteSource) != 'undefined' || typeof (first.replaceEmptyFieldsOnDestination) != 'undefined')) {
635
+ _request = sourcePersonId;
636
+ _options = destinationPersonId;
637
+ }
638
+ else {
639
+ _request = {
640
+ sourcePersonId: sourcePersonId,
641
+ destinationPersonId: destinationPersonId,
642
+ moveAfterDate: moveAfterDate,
643
+ deleteSource: deleteSource,
644
+ replaceEmptyFieldsOnDestination: replaceEmptyFieldsOnDestination,
645
+ };
646
+ _options = webapi_options;
647
+ }
648
+ return this._mergeAsync(_request, _options);
649
+ }
650
+ async _createDefaultFromCredentialAsync(request, options) {
651
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
652
+ base.WebApiBase.SetPending(options);
653
+ return new Promise(async (resolve, reject) => {
654
+ try {
655
+ config.baseURL = this._options.baseUrl;
656
+ const response = await this._axios.post("CreateDefaultFromCredential", request, config);
657
+ base.WebApiBase.SetCompleted(options);
658
+ const res = converters.Create_PersonEntity_From(response.data);
659
+ resolve(res);
660
+ }
661
+ catch (err) {
662
+ base.WebApiBase.HandleError(options, config, err);
663
+ reject(err);
664
+ }
665
+ });
666
+ }
667
+ async createDefaultFromCredentialAsync(contactId, credentialType, credentialValue, credentialDisplayValue, webapi_options) {
668
+ let _request = null;
669
+ let _options = null;
670
+ const first = contactId;
671
+ if (typeof (first) === "object" && first && (typeof (first.contactId) != 'undefined' || typeof (first.credentialType) != 'undefined' || typeof (first.credentialValue) != 'undefined' || typeof (first.credentialDisplayValue) != 'undefined')) {
672
+ _request = contactId;
673
+ _options = credentialType;
674
+ }
675
+ else {
676
+ _request = {
677
+ contactId: contactId,
678
+ credentialType: credentialType,
679
+ credentialValue: credentialValue,
680
+ credentialDisplayValue: credentialDisplayValue,
681
+ };
682
+ _options = webapi_options;
683
+ }
684
+ return this._createDefaultFromCredentialAsync(_request, _options);
685
+ }
686
+ async _isNumberValidAsync(request, options) {
687
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
688
+ base.WebApiBase.SetPending(options);
689
+ return new Promise(async (resolve, reject) => {
690
+ try {
691
+ config.baseURL = this._options.baseUrl;
692
+ const response = await this._axios.post("IsNumberValid", request, config);
693
+ base.WebApiBase.SetCompleted(options);
694
+ const res = response.data;
695
+ resolve(res);
696
+ }
697
+ catch (err) {
698
+ base.WebApiBase.HandleError(options, config, err);
699
+ reject(err);
700
+ }
701
+ });
702
+ }
703
+ async isNumberValidAsync(contactId, number, webapi_options) {
704
+ let _request = null;
705
+ let _options = null;
706
+ const first = contactId;
707
+ if (typeof (first) === "object" && first && (typeof (first.contactId) != 'undefined' || typeof (first.number) != 'undefined')) {
708
+ _request = contactId;
709
+ _options = number;
710
+ }
711
+ else {
712
+ _request = {
713
+ contactId: contactId,
714
+ number: number,
715
+ };
716
+ _options = webapi_options;
717
+ }
718
+ return this._isNumberValidAsync(_request, _options);
719
+ }
720
+ async _setConsentAsync(request, options) {
721
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
722
+ base.WebApiBase.SetPending(options);
723
+ return new Promise(async (resolve, reject) => {
724
+ try {
725
+ config.baseURL = this._options.baseUrl;
726
+ const response = await this._axios.post("SetConsent", request, config);
727
+ base.WebApiBase.SetCompleted(options);
728
+ const res = response.data;
729
+ resolve(res);
730
+ }
731
+ catch (err) {
732
+ base.WebApiBase.HandleError(options, config, err);
733
+ reject(err);
734
+ }
735
+ });
736
+ }
737
+ async setConsentAsync(personId, purpose, source, legalBase, comment, webapi_options) {
738
+ let _request = null;
739
+ let _options = null;
740
+ const first = personId;
741
+ if (typeof (first) === "object" && first && (typeof (first.personId) != 'undefined' || typeof (first.purpose) != 'undefined' || typeof (first.source) != 'undefined' || typeof (first.legalBase) != 'undefined' || typeof (first.comment) != 'undefined')) {
742
+ _request = personId;
743
+ _options = purpose;
744
+ }
745
+ else {
746
+ _request = {
747
+ personId: personId,
748
+ purpose: purpose,
749
+ source: source,
750
+ legalBase: legalBase,
751
+ comment: comment,
752
+ };
753
+ _options = webapi_options;
754
+ }
755
+ return this._setConsentAsync(_request, _options);
756
+ }
757
+ async _removeConsentAsync(request, options) {
758
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
759
+ base.WebApiBase.SetPending(options);
760
+ return new Promise(async (resolve, reject) => {
761
+ try {
762
+ config.baseURL = this._options.baseUrl;
763
+ const response = await this._axios.post("RemoveConsent", request, config);
764
+ base.WebApiBase.SetCompleted(options);
765
+ const res = response.data;
766
+ resolve(res);
767
+ }
768
+ catch (err) {
769
+ base.WebApiBase.HandleError(options, config, err);
770
+ reject(err);
771
+ }
772
+ });
773
+ }
774
+ async removeConsentAsync(personId, purpose, webapi_options) {
775
+ let _request = null;
776
+ let _options = null;
777
+ const first = personId;
778
+ if (typeof (first) === "object" && first && (typeof (first.personId) != 'undefined' || typeof (first.purpose) != 'undefined')) {
779
+ _request = personId;
780
+ _options = purpose;
781
+ }
782
+ else {
783
+ _request = {
784
+ personId: personId,
785
+ purpose: purpose,
786
+ };
787
+ _options = webapi_options;
788
+ }
789
+ return this._removeConsentAsync(_request, _options);
790
+ }
791
+ async _hasConsentAsync(request, options) {
792
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
793
+ base.WebApiBase.SetPending(options);
794
+ return new Promise(async (resolve, reject) => {
795
+ try {
796
+ config.baseURL = this._options.baseUrl;
797
+ const response = await this._axios.post("HasConsent", request, config);
798
+ base.WebApiBase.SetCompleted(options);
799
+ const res = response.data;
800
+ resolve(res);
801
+ }
802
+ catch (err) {
803
+ base.WebApiBase.HandleError(options, config, err);
804
+ reject(err);
805
+ }
806
+ });
807
+ }
808
+ async hasConsentAsync(personId, purpose, webapi_options) {
809
+ let _request = null;
810
+ let _options = null;
811
+ const first = personId;
812
+ if (typeof (first) === "object" && first && (typeof (first.personId) != 'undefined' || typeof (first.purpose) != 'undefined')) {
813
+ _request = personId;
814
+ _options = purpose;
815
+ }
816
+ else {
817
+ _request = {
818
+ personId: personId,
819
+ purpose: purpose,
820
+ };
821
+ _options = webapi_options;
822
+ }
823
+ return this._hasConsentAsync(_request, _options);
824
+ }
825
+ async _getConsentInfosAsync(request, options) {
826
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
827
+ base.WebApiBase.SetPending(options);
828
+ return new Promise(async (resolve, reject) => {
829
+ try {
830
+ config.baseURL = this._options.baseUrl;
831
+ const response = await this._axios.post("GetConsentInfos", request, config);
832
+ base.WebApiBase.SetCompleted(options);
833
+ const res = converters.Create_ConsentInfoArray_From(response.data);
834
+ resolve(res);
835
+ }
836
+ catch (err) {
837
+ base.WebApiBase.HandleError(options, config, err);
838
+ reject(err);
839
+ }
840
+ });
841
+ }
842
+ async getConsentInfosAsync(personId, webapi_options) {
843
+ let _request = null;
844
+ let _options = null;
845
+ const first = personId;
846
+ if (typeof (first) === "object" && first && (typeof (first.personId) != 'undefined')) {
847
+ _request = personId;
848
+ _options = webapi_options;
849
+ }
850
+ else {
851
+ _request = {
852
+ personId: personId,
853
+ };
854
+ _options = webapi_options;
855
+ }
856
+ return this._getConsentInfosAsync(_request, _options);
857
+ }
858
+ async _sendConsentConfirmationEmailAsync(request, options) {
859
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
860
+ base.WebApiBase.SetPending(options);
861
+ return new Promise(async (resolve, reject) => {
862
+ try {
863
+ config.baseURL = this._options.baseUrl;
864
+ const response = await this._axios.post("SendConsentConfirmationEmail", request, config);
865
+ base.WebApiBase.SetCompleted(options);
866
+ const res = response.data;
867
+ resolve(res);
868
+ }
869
+ catch (err) {
870
+ base.WebApiBase.HandleError(options, config, err);
871
+ reject(err);
872
+ }
873
+ });
874
+ }
875
+ async sendConsentConfirmationEmailAsync(personId, emailAddress, emailTemplateId, cultureLcidId, subject, webapi_options) {
876
+ let _request = null;
877
+ let _options = null;
878
+ const first = personId;
879
+ if (typeof (first) === "object" && first && (typeof (first.personId) != 'undefined' || typeof (first.emailAddress) != 'undefined' || typeof (first.emailTemplateId) != 'undefined' || typeof (first.cultureLcidId) != 'undefined' || typeof (first.subject) != 'undefined')) {
880
+ _request = personId;
881
+ _options = emailAddress;
882
+ }
883
+ else {
884
+ _request = {
885
+ personId: personId,
886
+ emailAddress: emailAddress,
887
+ emailTemplateId: emailTemplateId,
888
+ cultureLcidId: cultureLcidId,
889
+ subject: subject,
890
+ };
891
+ _options = webapi_options;
892
+ }
893
+ return this._sendConsentConfirmationEmailAsync(_request, _options);
894
+ }
895
+ async _resolvePersonFromInfoAsync(request, options) {
896
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
897
+ base.WebApiBase.SetPending(options);
898
+ return new Promise(async (resolve, reject) => {
899
+ try {
900
+ config.baseURL = this._options.baseUrl;
901
+ const response = await this._axios.post("ResolvePersonFromInfo", request, config);
902
+ base.WebApiBase.SetCompleted(options);
903
+ const res = converters.Create_ResolvedPerson_From(response.data);
904
+ resolve(res);
905
+ }
906
+ catch (err) {
907
+ base.WebApiBase.HandleError(options, config, err);
908
+ reject(err);
909
+ }
910
+ });
911
+ }
912
+ async resolvePersonFromInfoAsync(contactId, personName, phoneNumbers, emails, webapi_options) {
913
+ let _request = null;
914
+ let _options = null;
915
+ const first = contactId;
916
+ if (typeof (first) === "object" && first && (typeof (first.contactId) != 'undefined' || typeof (first.personName) != 'undefined' || typeof (first.phoneNumbers) != 'undefined' || typeof (first.emails) != 'undefined')) {
917
+ _request = contactId;
918
+ _options = personName;
919
+ }
920
+ else {
921
+ _request = {
922
+ contactId: contactId,
923
+ personName: personName,
924
+ phoneNumbers: phoneNumbers,
925
+ emails: emails,
926
+ };
927
+ _options = webapi_options;
928
+ }
929
+ return this._resolvePersonFromInfoAsync(_request, _options);
930
+ }
931
+ async _addEmailAddressToPersonAsync(request, options) {
932
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
933
+ base.WebApiBase.SetPending(options);
934
+ return new Promise(async (resolve, reject) => {
935
+ try {
936
+ config.baseURL = this._options.baseUrl;
937
+ const response = await this._axios.post("AddEmailAddressToPerson", request, config);
938
+ base.WebApiBase.SetCompleted(options);
939
+ const res = response.data;
940
+ resolve(res);
941
+ }
942
+ catch (err) {
943
+ base.WebApiBase.HandleError(options, config, err);
944
+ reject(err);
945
+ }
946
+ });
947
+ }
948
+ async addEmailAddressToPersonAsync(personId, emailAddress, setAsPrimaryEmail, webapi_options) {
949
+ let _request = null;
950
+ let _options = null;
951
+ const first = personId;
952
+ if (typeof (first) === "object" && first && (typeof (first.personId) != 'undefined' || typeof (first.emailAddress) != 'undefined' || typeof (first.setAsPrimaryEmail) != 'undefined')) {
953
+ _request = personId;
954
+ _options = emailAddress;
955
+ }
956
+ else {
957
+ _request = {
958
+ personId: personId,
959
+ emailAddress: emailAddress,
960
+ setAsPrimaryEmail: setAsPrimaryEmail,
961
+ };
962
+ _options = webapi_options;
963
+ }
964
+ return this._addEmailAddressToPersonAsync(_request, _options);
965
+ }
966
+ async _createTemporaryKeyAsync(request, options) {
967
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
968
+ base.WebApiBase.SetPending(options);
969
+ return new Promise(async (resolve, reject) => {
970
+ try {
971
+ config.baseURL = this._options.baseUrl;
972
+ const response = await this._axios.post("CreateTemporaryKey", request, config);
973
+ base.WebApiBase.SetCompleted(options);
974
+ const res = response.data;
975
+ resolve(res);
976
+ }
977
+ catch (err) {
978
+ base.WebApiBase.HandleError(options, config, err);
979
+ reject(err);
980
+ }
981
+ });
982
+ }
983
+ async createTemporaryKeyAsync(domain, targetId, personId, expires, webapi_options) {
984
+ let _request = null;
985
+ let _options = null;
986
+ const first = domain;
987
+ if (typeof (first) === "object" && first && (typeof (first.domain) != 'undefined' || typeof (first.targetId) != 'undefined' || typeof (first.personId) != 'undefined' || typeof (first.expires) != 'undefined')) {
988
+ _request = domain;
989
+ _options = targetId;
990
+ }
991
+ else {
992
+ _request = {
993
+ domain: domain,
994
+ targetId: targetId,
995
+ personId: personId,
996
+ expires: expires,
997
+ };
998
+ _options = webapi_options;
999
+ }
1000
+ return this._createTemporaryKeyAsync(_request, _options);
1001
+ }
1002
+ async _checkTemporaryKeyAsync(request, options) {
1003
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1004
+ base.WebApiBase.SetPending(options);
1005
+ return new Promise(async (resolve, reject) => {
1006
+ try {
1007
+ config.baseURL = this._options.baseUrl;
1008
+ const response = await this._axios.post("CheckTemporaryKey", request, config);
1009
+ base.WebApiBase.SetCompleted(options);
1010
+ const res = converters.Create_TemporaryKeyInfo_From(response.data);
1011
+ resolve(res);
1012
+ }
1013
+ catch (err) {
1014
+ base.WebApiBase.HandleError(options, config, err);
1015
+ reject(err);
1016
+ }
1017
+ });
1018
+ }
1019
+ async checkTemporaryKeyAsync(temporaryKey, webapi_options) {
1020
+ let _request = null;
1021
+ let _options = null;
1022
+ const first = temporaryKey;
1023
+ if (typeof (first) === "object" && first && (typeof (first.temporaryKey) != 'undefined')) {
1024
+ _request = temporaryKey;
1025
+ _options = webapi_options;
1026
+ }
1027
+ else {
1028
+ _request = {
1029
+ temporaryKey: temporaryKey,
1030
+ };
1031
+ _options = webapi_options;
1032
+ }
1033
+ return this._checkTemporaryKeyAsync(_request, _options);
1034
+ }
1035
+ async _deleteTemporaryKeysOfDomainAsync(request, options) {
1036
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1037
+ base.WebApiBase.SetPending(options);
1038
+ return new Promise(async (resolve, reject) => {
1039
+ try {
1040
+ config.baseURL = this._options.baseUrl;
1041
+ const response = await this._axios.post("DeleteTemporaryKeysOfDomain", request, config);
1042
+ base.WebApiBase.SetCompleted(options);
1043
+ const res = response.data;
1044
+ resolve(res);
1045
+ }
1046
+ catch (err) {
1047
+ base.WebApiBase.HandleError(options, config, err);
1048
+ reject(err);
1049
+ }
1050
+ });
1051
+ }
1052
+ async deleteTemporaryKeysOfDomainAsync(domain, personId, webapi_options) {
1053
+ let _request = null;
1054
+ let _options = null;
1055
+ const first = domain;
1056
+ if (typeof (first) === "object" && first && (typeof (first.domain) != 'undefined' || typeof (first.personId) != 'undefined')) {
1057
+ _request = domain;
1058
+ _options = personId;
1059
+ }
1060
+ else {
1061
+ _request = {
1062
+ domain: domain,
1063
+ personId: personId,
1064
+ };
1065
+ _options = webapi_options;
1066
+ }
1067
+ return this._deleteTemporaryKeysOfDomainAsync(_request, _options);
1068
+ }
1069
+ async _deleteExpiredAsync(options) {
1070
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1071
+ base.WebApiBase.SetPending(options);
1072
+ return new Promise(async (resolve, reject) => {
1073
+ try {
1074
+ config.baseURL = this._options.baseUrl;
1075
+ const response = await this._axios.post("DeleteExpired", undefined, config);
1076
+ base.WebApiBase.SetCompleted(options);
1077
+ const res = response.data;
1078
+ resolve(res);
1079
+ }
1080
+ catch (err) {
1081
+ base.WebApiBase.HandleError(options, config, err);
1082
+ reject(err);
1083
+ }
1084
+ });
1085
+ }
1086
+ /**
1087
+ * Trigger deletion of persons that has been (soft) deleted and have timed out the expiry period (the SoftDeleteRetention preference).
1088
+ * @returns
1089
+ */
1090
+ async deleteExpiredAsync(webapi_options) {
1091
+ return this._deleteExpiredAsync(webapi_options);
1092
+ }
1093
+ async _getPersonSummaryAsync(request, options) {
1094
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1095
+ base.WebApiBase.SetPending(options);
1096
+ return new Promise(async (resolve, reject) => {
1097
+ try {
1098
+ config.baseURL = this._options.baseUrl;
1099
+ const response = await this._axios.post("GetPersonSummary", request, config);
1100
+ base.WebApiBase.SetCompleted(options);
1101
+ const res = converters.Create_PersonSummary_From(response.data);
1102
+ resolve(res);
1103
+ }
1104
+ catch (err) {
1105
+ base.WebApiBase.HandleError(options, config, err);
1106
+ reject(err);
1107
+ }
1108
+ });
1109
+ }
1110
+ async getPersonSummaryAsync(personId, limit, webapi_options) {
1111
+ let _request = null;
1112
+ let _options = null;
1113
+ const first = personId;
1114
+ if (typeof (first) === "object" && first && (typeof (first.personId) != 'undefined' || typeof (first.limit) != 'undefined')) {
1115
+ _request = personId;
1116
+ _options = limit;
1117
+ }
1118
+ else {
1119
+ _request = {
1120
+ personId: personId,
1121
+ limit: limit,
1122
+ };
1123
+ _options = webapi_options;
1124
+ }
1125
+ return this._getPersonSummaryAsync(_request, _options);
1126
+ }
1127
+ async _addBounceAsync(request, options) {
1128
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1129
+ base.WebApiBase.SetPending(options);
1130
+ return new Promise(async (resolve, reject) => {
1131
+ try {
1132
+ config.baseURL = this._options.baseUrl;
1133
+ const response = await this._axios.post("AddBounce", request, config);
1134
+ base.WebApiBase.SetCompleted(options);
1135
+ const res = response.data;
1136
+ resolve(res);
1137
+ }
1138
+ catch (err) {
1139
+ base.WebApiBase.HandleError(options, config, err);
1140
+ reject(err);
1141
+ }
1142
+ });
1143
+ }
1144
+ async addBounceAsync(emailAddress, webapi_options) {
1145
+ let _request = null;
1146
+ let _options = null;
1147
+ const first = emailAddress;
1148
+ if (typeof (first) === "object" && first && (typeof (first.emailAddress) != 'undefined')) {
1149
+ _request = emailAddress;
1150
+ _options = webapi_options;
1151
+ }
1152
+ else {
1153
+ _request = {
1154
+ emailAddress: emailAddress,
1155
+ };
1156
+ _options = webapi_options;
1157
+ }
1158
+ return this._addBounceAsync(_request, _options);
1159
+ }
1160
+ async _validatePersonEntityAsync(request, options) {
1161
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1162
+ base.WebApiBase.SetPending(options);
1163
+ return new Promise(async (resolve, reject) => {
1164
+ try {
1165
+ config.baseURL = this._options.baseUrl;
1166
+ const response = await this._axios.post("ValidatePersonEntity", request, config);
1167
+ base.WebApiBase.SetCompleted(options);
1168
+ const res = converters.Create_StringDictionary_From(response.data);
1169
+ resolve(res);
1170
+ }
1171
+ catch (err) {
1172
+ base.WebApiBase.HandleError(options, config, err);
1173
+ reject(err);
1174
+ }
1175
+ });
1176
+ }
1177
+ async validatePersonEntityAsync(personEntity, webapi_options) {
1178
+ let _request = null;
1179
+ let _options = null;
1180
+ const first = personEntity;
1181
+ if (typeof (first) === "object" && first && (typeof (first.personEntity) != 'undefined')) {
1182
+ _request = personEntity;
1183
+ _options = webapi_options;
1184
+ }
1185
+ else {
1186
+ _request = {
1187
+ personEntity: personEntity,
1188
+ };
1189
+ _options = webapi_options;
1190
+ }
1191
+ return this._validatePersonEntityAsync(_request, _options);
1192
+ }
1193
+ async _addBounceWithCountAsync(request, options) {
1194
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1195
+ base.WebApiBase.SetPending(options);
1196
+ return new Promise(async (resolve, reject) => {
1197
+ try {
1198
+ config.baseURL = this._options.baseUrl;
1199
+ const response = await this._axios.post("AddBounceWithCount", request, config);
1200
+ base.WebApiBase.SetCompleted(options);
1201
+ const res = response.data;
1202
+ resolve(res);
1203
+ }
1204
+ catch (err) {
1205
+ base.WebApiBase.HandleError(options, config, err);
1206
+ reject(err);
1207
+ }
1208
+ });
1209
+ }
1210
+ async addBounceWithCountAsync(emailAddress, counts, webapi_options) {
1211
+ let _request = null;
1212
+ let _options = null;
1213
+ const first = emailAddress;
1214
+ if (typeof (first) === "object" && first && (typeof (first.emailAddress) != 'undefined' || typeof (first.counts) != 'undefined')) {
1215
+ _request = emailAddress;
1216
+ _options = counts;
1217
+ }
1218
+ else {
1219
+ _request = {
1220
+ emailAddress: emailAddress,
1221
+ counts: counts,
1222
+ };
1223
+ _options = webapi_options;
1224
+ }
1225
+ return this._addBounceWithCountAsync(_request, _options);
1226
+ }
1227
+ async _getBestSoLanguageForTemplateAsync(request, options) {
1228
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1229
+ base.WebApiBase.SetPending(options);
1230
+ return new Promise(async (resolve, reject) => {
1231
+ try {
1232
+ config.baseURL = this._options.baseUrl;
1233
+ const response = await this._axios.post("GetBestSoLanguageForTemplate", request, config);
1234
+ base.WebApiBase.SetCompleted(options);
1235
+ const res = response.data;
1236
+ resolve(res);
1237
+ }
1238
+ catch (err) {
1239
+ base.WebApiBase.HandleError(options, config, err);
1240
+ reject(err);
1241
+ }
1242
+ });
1243
+ }
1244
+ async getBestSoLanguageForTemplateAsync(personId, templateId, webapi_options) {
1245
+ let _request = null;
1246
+ let _options = null;
1247
+ const first = personId;
1248
+ if (typeof (first) === "object" && first && (typeof (first.personId) != 'undefined' || typeof (first.templateId) != 'undefined')) {
1249
+ _request = personId;
1250
+ _options = templateId;
1251
+ }
1252
+ else {
1253
+ _request = {
1254
+ personId: personId,
1255
+ templateId: templateId,
1256
+ };
1257
+ _options = webapi_options;
1258
+ }
1259
+ return this._getBestSoLanguageForTemplateAsync(_request, _options);
1260
+ }
1261
+ async _addBounceWithDetailsAsync(request, options) {
1262
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1263
+ base.WebApiBase.SetPending(options);
1264
+ return new Promise(async (resolve, reject) => {
1265
+ try {
1266
+ config.baseURL = this._options.baseUrl;
1267
+ const response = await this._axios.post("AddBounceWithDetails", request, config);
1268
+ base.WebApiBase.SetCompleted(options);
1269
+ const res = response.data;
1270
+ resolve(res);
1271
+ }
1272
+ catch (err) {
1273
+ base.WebApiBase.HandleError(options, config, err);
1274
+ reject(err);
1275
+ }
1276
+ });
1277
+ }
1278
+ async addBounceWithDetailsAsync(emailAddress, counts, code, reason, webapi_options) {
1279
+ let _request = null;
1280
+ let _options = null;
1281
+ const first = emailAddress;
1282
+ if (typeof (first) === "object" && first && (typeof (first.emailAddress) != 'undefined' || typeof (first.counts) != 'undefined' || typeof (first.code) != 'undefined' || typeof (first.reason) != 'undefined')) {
1283
+ _request = emailAddress;
1284
+ _options = counts;
1285
+ }
1286
+ else {
1287
+ _request = {
1288
+ emailAddress: emailAddress,
1289
+ counts: counts,
1290
+ code: code,
1291
+ reason: reason,
1292
+ };
1293
+ _options = webapi_options;
1294
+ }
1295
+ return this._addBounceWithDetailsAsync(_request, _options);
1296
+ }
1297
+ async _getPersonImagesAsync(request, options) {
1298
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1299
+ base.WebApiBase.SetPending(options);
1300
+ return new Promise(async (resolve, reject) => {
1301
+ try {
1302
+ config.baseURL = this._options.baseUrl;
1303
+ const response = await this._axios.post("GetPersonImages", request, config);
1304
+ base.WebApiBase.SetCompleted(options);
1305
+ const res = converters.Create_PersonImageArray_From(response.data);
1306
+ resolve(res);
1307
+ }
1308
+ catch (err) {
1309
+ base.WebApiBase.HandleError(options, config, err);
1310
+ reject(err);
1311
+ }
1312
+ });
1313
+ }
1314
+ async getPersonImagesAsync(personIds, scaledWidth, scaledHeight, webapi_options) {
1315
+ let _request = null;
1316
+ let _options = null;
1317
+ const first = personIds;
1318
+ if (typeof (first) === "object" && first && (typeof (first.personIds) != 'undefined' || typeof (first.scaledWidth) != 'undefined' || typeof (first.scaledHeight) != 'undefined')) {
1319
+ _request = personIds;
1320
+ _options = scaledWidth;
1321
+ }
1322
+ else {
1323
+ _request = {
1324
+ personIds: personIds,
1325
+ scaledWidth: scaledWidth,
1326
+ scaledHeight: scaledHeight,
1327
+ };
1328
+ _options = webapi_options;
1329
+ }
1330
+ return this._getPersonImagesAsync(_request, _options);
1331
+ }
1332
+ async _createOrUpdateUserCandidateAsync(request, options) {
1333
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1334
+ base.WebApiBase.SetPending(options);
1335
+ return new Promise(async (resolve, reject) => {
1336
+ try {
1337
+ config.baseURL = this._options.baseUrl;
1338
+ const response = await this._axios.post("CreateOrUpdateUserCandidate", request, config);
1339
+ base.WebApiBase.SetCompleted(options);
1340
+ const res = converters.Create_UserCandidate_From(response.data);
1341
+ resolve(res);
1342
+ }
1343
+ catch (err) {
1344
+ base.WebApiBase.HandleError(options, config, err);
1345
+ reject(err);
1346
+ }
1347
+ });
1348
+ }
1349
+ async createOrUpdateUserCandidateAsync(personId, username, accessAllRequests, webapi_options) {
1350
+ let _request = null;
1351
+ let _options = null;
1352
+ const first = personId;
1353
+ if (typeof (first) === "object" && first && (typeof (first.personId) != 'undefined' || typeof (first.username) != 'undefined' || typeof (first.accessAllRequests) != 'undefined')) {
1354
+ _request = personId;
1355
+ _options = username;
1356
+ }
1357
+ else {
1358
+ _request = {
1359
+ personId: personId,
1360
+ username: username,
1361
+ accessAllRequests: accessAllRequests,
1362
+ };
1363
+ _options = webapi_options;
1364
+ }
1365
+ return this._createOrUpdateUserCandidateAsync(_request, _options);
1366
+ }
1367
+ async _getUserCandidateByPersonAsync(request, options) {
1368
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1369
+ base.WebApiBase.SetPending(options);
1370
+ return new Promise(async (resolve, reject) => {
1371
+ try {
1372
+ config.baseURL = this._options.baseUrl;
1373
+ const response = await this._axios.post("GetUserCandidateByPerson", request, config);
1374
+ base.WebApiBase.SetCompleted(options);
1375
+ const res = converters.Create_UserCandidate_From(response.data);
1376
+ resolve(res);
1377
+ }
1378
+ catch (err) {
1379
+ base.WebApiBase.HandleError(options, config, err);
1380
+ reject(err);
1381
+ }
1382
+ });
1383
+ }
1384
+ async getUserCandidateByPersonAsync(personId, webapi_options) {
1385
+ let _request = null;
1386
+ let _options = null;
1387
+ const first = personId;
1388
+ if (typeof (first) === "object" && first && (typeof (first.personId) != 'undefined')) {
1389
+ _request = personId;
1390
+ _options = webapi_options;
1391
+ }
1392
+ else {
1393
+ _request = {
1394
+ personId: personId,
1395
+ };
1396
+ _options = webapi_options;
1397
+ }
1398
+ return this._getUserCandidateByPersonAsync(_request, _options);
1399
+ }
1400
+ async _getCustomerCentrePasswordReplyTemplateAsync(request, options) {
1401
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1402
+ base.WebApiBase.SetPending(options);
1403
+ return new Promise(async (resolve, reject) => {
1404
+ try {
1405
+ config.baseURL = this._options.baseUrl;
1406
+ const response = await this._axios.post("GetCustomerCentrePasswordReplyTemplate", request, config);
1407
+ base.WebApiBase.SetCompleted(options);
1408
+ const res = converters.Create_ReplyTemplateParsed_From(response.data);
1409
+ resolve(res);
1410
+ }
1411
+ catch (err) {
1412
+ base.WebApiBase.HandleError(options, config, err);
1413
+ reject(err);
1414
+ }
1415
+ });
1416
+ }
1417
+ async getCustomerCentrePasswordReplyTemplateAsync(personId, webapi_options) {
1418
+ let _request = null;
1419
+ let _options = null;
1420
+ const first = personId;
1421
+ if (typeof (first) === "object" && first && (typeof (first.personId) != 'undefined')) {
1422
+ _request = personId;
1423
+ _options = webapi_options;
1424
+ }
1425
+ else {
1426
+ _request = {
1427
+ personId: personId,
1428
+ };
1429
+ _options = webapi_options;
1430
+ }
1431
+ return this._getCustomerCentrePasswordReplyTemplateAsync(_request, _options);
1432
+ }
1433
+ async _sendEmailAsync(request, options) {
1434
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1435
+ base.WebApiBase.SetPending(options);
1436
+ return new Promise(async (resolve, reject) => {
1437
+ try {
1438
+ config.baseURL = this._options.baseUrl;
1439
+ const response = await this._axios.post("SendEmail", request, config);
1440
+ base.WebApiBase.SetCompleted(options);
1441
+ const res = response.data;
1442
+ resolve(res);
1443
+ }
1444
+ catch (err) {
1445
+ base.WebApiBase.HandleError(options, config, err);
1446
+ reject(err);
1447
+ }
1448
+ });
1449
+ }
1450
+ async sendEmailAsync(from, to, subject, plainBody, htmlBody, attachmentIds, webapi_options) {
1451
+ let _request = null;
1452
+ let _options = null;
1453
+ const first = from;
1454
+ if (typeof (first) === "object" && first && (typeof (first.from) != 'undefined' || typeof (first.to) != 'undefined' || typeof (first.subject) != 'undefined' || typeof (first.plainBody) != 'undefined' || typeof (first.htmlBody) != 'undefined' || typeof (first.attachmentIds) != 'undefined')) {
1455
+ _request = from;
1456
+ _options = to;
1457
+ }
1458
+ else {
1459
+ _request = {
1460
+ from: from,
1461
+ to: to,
1462
+ subject: subject,
1463
+ plainBody: plainBody,
1464
+ htmlBody: htmlBody,
1465
+ attachmentIds: attachmentIds,
1466
+ };
1467
+ _options = webapi_options;
1468
+ }
1469
+ return this._sendEmailAsync(_request, _options);
1470
+ }
1471
+ /*
1472
+ * Gets an array of Person objects.
1473
+ * @param personIds - The primary keys.
1474
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
1475
+ * @returns An array of Person
1476
+ */
1477
+ async getPersonListAsync(personIds, options) {
1478
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1479
+ base.WebApiBase.SetPending(options);
1480
+ return new Promise(async (resolve, reject) => {
1481
+ try {
1482
+ const response = await this._axios.post("GetPersonList", personIds, config);
1483
+ base.WebApiBase.SetCompleted(options);
1484
+ const res = converters.Create_PersonArray_From(response.data);
1485
+ resolve(res);
1486
+ }
1487
+ catch (err) {
1488
+ base.WebApiBase.HandleError(options, config, err);
1489
+ reject(err);
1490
+ }
1491
+ });
1492
+ }
1493
+ async _getPersonsFromContactAsync(request, options) {
1494
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1495
+ base.WebApiBase.SetPending(options);
1496
+ return new Promise(async (resolve, reject) => {
1497
+ try {
1498
+ config.baseURL = this._options.baseUrl;
1499
+ const response = await this._axios.post("GetPersonsFromContact", request, config);
1500
+ base.WebApiBase.SetCompleted(options);
1501
+ const res = converters.Create_PersonArray_From(response.data);
1502
+ resolve(res);
1503
+ }
1504
+ catch (err) {
1505
+ base.WebApiBase.HandleError(options, config, err);
1506
+ reject(err);
1507
+ }
1508
+ });
1509
+ }
1510
+ async getPersonsFromContactAsync(contactId, webapi_options) {
1511
+ let _request = null;
1512
+ let _options = null;
1513
+ const first = contactId;
1514
+ if (typeof (first) === "object" && first && (typeof (first.contactId) != 'undefined')) {
1515
+ _request = contactId;
1516
+ _options = webapi_options;
1517
+ }
1518
+ else {
1519
+ _request = {
1520
+ contactId: contactId,
1521
+ };
1522
+ _options = webapi_options;
1523
+ }
1524
+ return this._getPersonsFromContactAsync(_request, _options);
1525
+ }
1526
+ async _getPersonsFromProjectAsync(request, options) {
1527
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1528
+ base.WebApiBase.SetPending(options);
1529
+ return new Promise(async (resolve, reject) => {
1530
+ try {
1531
+ config.baseURL = this._options.baseUrl;
1532
+ const response = await this._axios.post("GetPersonsFromProject", request, config);
1533
+ base.WebApiBase.SetCompleted(options);
1534
+ const res = converters.Create_PersonArray_From(response.data);
1535
+ resolve(res);
1536
+ }
1537
+ catch (err) {
1538
+ base.WebApiBase.HandleError(options, config, err);
1539
+ reject(err);
1540
+ }
1541
+ });
1542
+ }
1543
+ async getPersonsFromProjectAsync(projectId, webapi_options) {
1544
+ let _request = null;
1545
+ let _options = null;
1546
+ const first = projectId;
1547
+ if (typeof (first) === "object" && first && (typeof (first.projectId) != 'undefined')) {
1548
+ _request = projectId;
1549
+ _options = webapi_options;
1550
+ }
1551
+ else {
1552
+ _request = {
1553
+ projectId: projectId,
1554
+ };
1555
+ _options = webapi_options;
1556
+ }
1557
+ return this._getPersonsFromProjectAsync(_request, _options);
1558
+ }
1559
+ async _getColleaguesAsync(options) {
1560
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1561
+ base.WebApiBase.SetPending(options);
1562
+ return new Promise(async (resolve, reject) => {
1563
+ try {
1564
+ config.baseURL = this._options.baseUrl;
1565
+ const response = await this._axios.post("GetColleagues", undefined, config);
1566
+ base.WebApiBase.SetCompleted(options);
1567
+ const res = converters.Create_PersonArray_From(response.data);
1568
+ resolve(res);
1569
+ }
1570
+ catch (err) {
1571
+ base.WebApiBase.HandleError(options, config, err);
1572
+ reject(err);
1573
+ }
1574
+ });
1575
+ }
1576
+ /**
1577
+ * Gets the persons working in the same company as the logged on user.
1578
+ * @returns Colleagues.
1579
+ */
1580
+ async getColleaguesAsync(webapi_options) {
1581
+ return this._getColleaguesAsync(webapi_options);
1582
+ }
1583
+ async _getColleaguesByDepartmentAsync(request, options) {
1584
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1585
+ base.WebApiBase.SetPending(options);
1586
+ return new Promise(async (resolve, reject) => {
1587
+ try {
1588
+ config.baseURL = this._options.baseUrl;
1589
+ const response = await this._axios.post("GetColleaguesByDepartment", request, config);
1590
+ base.WebApiBase.SetCompleted(options);
1591
+ const res = converters.Create_PersonArray_From(response.data);
1592
+ resolve(res);
1593
+ }
1594
+ catch (err) {
1595
+ base.WebApiBase.HandleError(options, config, err);
1596
+ reject(err);
1597
+ }
1598
+ });
1599
+ }
1600
+ async getColleaguesByDepartmentAsync(departmentId, webapi_options) {
1601
+ let _request = null;
1602
+ let _options = null;
1603
+ const first = departmentId;
1604
+ if (typeof (first) === "object" && first && (typeof (first.departmentId) != 'undefined')) {
1605
+ _request = departmentId;
1606
+ _options = webapi_options;
1607
+ }
1608
+ else {
1609
+ _request = {
1610
+ departmentId: departmentId,
1611
+ };
1612
+ _options = webapi_options;
1613
+ }
1614
+ return this._getColleaguesByDepartmentAsync(_request, _options);
1615
+ }
1616
+ async _getColleaguesBySourceAsync(request, options) {
1617
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1618
+ base.WebApiBase.SetPending(options);
1619
+ return new Promise(async (resolve, reject) => {
1620
+ try {
1621
+ config.baseURL = this._options.baseUrl;
1622
+ const response = await this._axios.post("GetColleaguesBySource", request, config);
1623
+ base.WebApiBase.SetCompleted(options);
1624
+ const res = converters.Create_PersonArray_From(response.data);
1625
+ resolve(res);
1626
+ }
1627
+ catch (err) {
1628
+ base.WebApiBase.HandleError(options, config, err);
1629
+ reject(err);
1630
+ }
1631
+ });
1632
+ }
1633
+ async getColleaguesBySourceAsync(sourceType, count, webapi_options) {
1634
+ let _request = null;
1635
+ let _options = null;
1636
+ const first = sourceType;
1637
+ if (typeof (first) === "object" && first && (typeof (first.sourceType) != 'undefined' || typeof (first.count) != 'undefined')) {
1638
+ _request = sourceType;
1639
+ _options = count;
1640
+ }
1641
+ else {
1642
+ _request = {
1643
+ sourceType: sourceType,
1644
+ count: count,
1645
+ };
1646
+ _options = webapi_options;
1647
+ }
1648
+ return this._getColleaguesBySourceAsync(_request, _options);
1649
+ }
1650
+ async _getMyOwnerAsync(options) {
1651
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1652
+ base.WebApiBase.SetPending(options);
1653
+ return new Promise(async (resolve, reject) => {
1654
+ try {
1655
+ config.baseURL = this._options.baseUrl;
1656
+ const response = await this._axios.post("GetMyOwner", undefined, config);
1657
+ base.WebApiBase.SetCompleted(options);
1658
+ const res = converters.Create_Person_From(response.data);
1659
+ resolve(res);
1660
+ }
1661
+ catch (err) {
1662
+ base.WebApiBase.HandleError(options, config, err);
1663
+ reject(err);
1664
+ }
1665
+ });
1666
+ }
1667
+ /**
1668
+ * Get the owner of the logged in person.
1669
+ * @returns Person
1670
+ */
1671
+ async getMyOwnerAsync(webapi_options) {
1672
+ return this._getMyOwnerAsync(webapi_options);
1673
+ }
1674
+ async _getOwnerOnPersonIdAsync(request, options) {
1675
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1676
+ base.WebApiBase.SetPending(options);
1677
+ return new Promise(async (resolve, reject) => {
1678
+ try {
1679
+ config.baseURL = this._options.baseUrl;
1680
+ const response = await this._axios.post("GetOwnerOnPersonId", request, config);
1681
+ base.WebApiBase.SetCompleted(options);
1682
+ const res = converters.Create_Person_From(response.data);
1683
+ resolve(res);
1684
+ }
1685
+ catch (err) {
1686
+ base.WebApiBase.HandleError(options, config, err);
1687
+ reject(err);
1688
+ }
1689
+ });
1690
+ }
1691
+ async getOwnerOnPersonIdAsync(personId, webapi_options) {
1692
+ let _request = null;
1693
+ let _options = null;
1694
+ const first = personId;
1695
+ if (typeof (first) === "object" && first && (typeof (first.personId) != 'undefined')) {
1696
+ _request = personId;
1697
+ _options = webapi_options;
1698
+ }
1699
+ else {
1700
+ _request = {
1701
+ personId: personId,
1702
+ };
1703
+ _options = webapi_options;
1704
+ }
1705
+ return this._getOwnerOnPersonIdAsync(_request, _options);
1706
+ }
1707
+ async _changePersonRankAsync(request, options) {
1708
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1709
+ base.WebApiBase.SetPending(options);
1710
+ return new Promise(async (resolve, reject) => {
1711
+ try {
1712
+ config.baseURL = this._options.baseUrl;
1713
+ const response = await this._axios.post("ChangePersonRank", request, config);
1714
+ base.WebApiBase.SetCompleted(options);
1715
+ const res = response.data;
1716
+ resolve(res);
1717
+ }
1718
+ catch (err) {
1719
+ base.WebApiBase.HandleError(options, config, err);
1720
+ reject(err);
1721
+ }
1722
+ });
1723
+ }
1724
+ async changePersonRankAsync(personId, moveUp, webapi_options) {
1725
+ let _request = null;
1726
+ let _options = null;
1727
+ const first = personId;
1728
+ if (typeof (first) === "object" && first && (typeof (first.personId) != 'undefined' || typeof (first.moveUp) != 'undefined')) {
1729
+ _request = personId;
1730
+ _options = moveUp;
1731
+ }
1732
+ else {
1733
+ _request = {
1734
+ personId: personId,
1735
+ moveUp: moveUp,
1736
+ };
1737
+ _options = webapi_options;
1738
+ }
1739
+ return this._changePersonRankAsync(_request, _options);
1740
+ }
1741
+ async _setPersonRankAsync(request, options) {
1742
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1743
+ base.WebApiBase.SetPending(options);
1744
+ return new Promise(async (resolve, reject) => {
1745
+ try {
1746
+ config.baseURL = this._options.baseUrl;
1747
+ const response = await this._axios.post("SetPersonRank", request, config);
1748
+ base.WebApiBase.SetCompleted(options);
1749
+ const res = response.data;
1750
+ resolve(res);
1751
+ }
1752
+ catch (err) {
1753
+ base.WebApiBase.HandleError(options, config, err);
1754
+ reject(err);
1755
+ }
1756
+ });
1757
+ }
1758
+ async setPersonRankAsync(personId, desiredRank, webapi_options) {
1759
+ let _request = null;
1760
+ let _options = null;
1761
+ const first = personId;
1762
+ if (typeof (first) === "object" && first && (typeof (first.personId) != 'undefined' || typeof (first.desiredRank) != 'undefined')) {
1763
+ _request = personId;
1764
+ _options = desiredRank;
1765
+ }
1766
+ else {
1767
+ _request = {
1768
+ personId: personId,
1769
+ desiredRank: desiredRank,
1770
+ };
1771
+ _options = webapi_options;
1772
+ }
1773
+ return this._setPersonRankAsync(_request, _options);
1774
+ }
1775
+ async _normalizeRanksAsync(request, options) {
1776
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1777
+ base.WebApiBase.SetPending(options);
1778
+ return new Promise(async (resolve, reject) => {
1779
+ try {
1780
+ config.baseURL = this._options.baseUrl;
1781
+ const response = await this._axios.post("NormalizeRanks", request, config);
1782
+ base.WebApiBase.SetCompleted(options);
1783
+ const res = response.data;
1784
+ resolve(res);
1785
+ }
1786
+ catch (err) {
1787
+ base.WebApiBase.HandleError(options, config, err);
1788
+ reject(err);
1789
+ }
1790
+ });
1791
+ }
1792
+ async normalizeRanksAsync(contactId, webapi_options) {
1793
+ let _request = null;
1794
+ let _options = null;
1795
+ const first = contactId;
1796
+ if (typeof (first) === "object" && first && (typeof (first.contactId) != 'undefined')) {
1797
+ _request = contactId;
1798
+ _options = webapi_options;
1799
+ }
1800
+ else {
1801
+ _request = {
1802
+ contactId: contactId,
1803
+ };
1804
+ _options = webapi_options;
1805
+ }
1806
+ return this._normalizeRanksAsync(_request, _options);
1807
+ }
1808
+ } // class v1PersonAgentController
1809
+ //# sourceMappingURL=PersonAgent.js.map