@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,1734 @@
1
+ // <auto-generated>
2
+ // SuperOffice Code Generator
3
+ // modelling\templates\servicestswebapi\tswebapiagents.tt
4
+ // </auto-generated>
5
+
6
+
7
+ /* tslint:disable */
8
+ //----------------------------------------------------------------------------
9
+ // G E N E R A T E D F I L E ! D O N O T E D I T !
10
+ //----------------------------------------------------------------------------
11
+ //
12
+ // File: WebApi/CustomerServiceAgent.ts
13
+ //
14
+ //----------------------------------------------------------------------------
15
+ // Copyright (C) SuperOffice AS
16
+ //----------------------------------------------------------------------------
17
+
18
+ import { AxiosRequestConfig } from 'axios';
19
+ import { Duration } from 'dayjs/plugin/duration';
20
+ import * as enums from './Enums.js';
21
+ import * as base from './WebApiBase.js';
22
+ import * as carriers from './Carriers.js';
23
+ import * as converters from './Converters.js';
24
+ import { FromBase64ToString, ToBase64 } from './Base64.js';
25
+
26
+ /**
27
+ * Agent used for Customer Service methods
28
+ */
29
+ export interface ICustomerServiceAgent {
30
+ createDefaultCustomerCenterConfigAsync(): Promise< carriers.CustomerCenterConfig >;
31
+ saveCustomerCenterConfigAsync(entity: carriers.CustomerCenterConfig) : Promise< carriers.CustomerCenterConfig >;
32
+ deleteCustomerCenterConfigAsync(CustomerCenterConfigId: number) : Promise<void>;
33
+ createDefaultMailboxEntityAsync(): Promise< carriers.MailboxEntity >;
34
+ saveMailboxEntityAsync(entity: carriers.MailboxEntity) : Promise< carriers.MailboxEntity >;
35
+ createDefaultSmsConfigAsync(): Promise< carriers.SmsConfig >;
36
+ saveSmsConfigAsync(entity: carriers.SmsConfig) : Promise< carriers.SmsConfig >;
37
+ updateFeatureTogglesAsync(request: carriers.CustomerService_UpdateFeatureTogglesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
38
+ updateFeatureTogglesAsync(featureToggles: carriers.CsFeatureToggle[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
39
+ eventHandlerExistsAsync(request: carriers.CustomerService_EventHandlerExistsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
40
+ eventHandlerExistsAsync(eventHandlerType: enums.EventHandlerType, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
41
+ createSessionAsync(request: carriers.CustomerService_CreateSessionRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CsSessionKey >;
42
+ createSessionAsync(remoteIp: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CsSessionKey >;
43
+ removeSessionAsync(request: carriers.CustomerService_RemoveSessionRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
44
+ removeSessionAsync(loginId: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
45
+ sessionIsValidAsync(request: carriers.CustomerService_SessionIsValidRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
46
+ sessionIsValidAsync(csSessionKey: string, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
47
+ hasChatNotifyAsync(webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
48
+ checkSymmetricEncryptionAsync(request: carriers.CustomerService_CheckSymmetricEncryptionRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
49
+ checkSymmetricEncryptionAsync(encryptedString: string, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
50
+ reportSessionActiveAsync(request: carriers.CustomerService_ReportSessionActiveRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
51
+ reportSessionActiveAsync(sessionKey: string, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
52
+ getCustomerCenterConfigAsync(customerCenterConfigId: number) : Promise< carriers.CustomerCenterConfig >;
53
+ getAllCustomerCenterConfigsAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CustomerCenterConfig[] >;
54
+ saveAllCustomerCenterConfigsAsync(request: carriers.CustomerService_SaveAllCustomerCenterConfigsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
55
+ saveAllCustomerCenterConfigsAsync(custConfigs: carriers.CustomerCenterConfig[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
56
+ checkIfCustomizedTemplatesAsync(webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
57
+ getProgramUrlAsync(request: carriers.CustomerService_GetProgramUrlRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
58
+ getProgramUrlAsync(programName: string, external: boolean, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
59
+ getFaqForCustomerAsync(request: carriers.CustomerService_GetFaqForCustomerRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
60
+ getFaqForCustomerAsync(faqEntryId: number, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
61
+ getCustomerServiceStartupAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CustomerServiceStartup >;
62
+ executeEventHandlersAsync(request: carriers.CustomerService_ExecuteEventHandlersRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.EventData >;
63
+ executeEventHandlersAsync(eventData: carriers.EventData, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.EventData >;
64
+ getMailboxesAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Mailbox[] >;
65
+ getMailboxEntityAsync(mailboxEntityId: number) : Promise< carriers.MailboxEntity >;
66
+ getPreviewFaqEntryAsync(request: carriers.CustomerService_GetPreviewFaqEntryRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PreviewFaqEntry >;
67
+ getPreviewFaqEntryAsync(kbEntryId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PreviewFaqEntry >;
68
+ getPreviewQuickReplyAsync(request: carriers.CustomerService_GetPreviewQuickReplyRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PreviewQuickReply >;
69
+ getPreviewQuickReplyAsync(quickReplyId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PreviewQuickReply >;
70
+ getPreviewReplyTemplateAsync(request: carriers.CustomerService_GetPreviewReplyTemplateRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PreviewReplyTemplate >;
71
+ getPreviewReplyTemplateAsync(replyTemplateId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PreviewReplyTemplate >;
72
+ getParsedTemplateAsync(request: carriers.CustomerService_GetParsedTemplateRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ReplyTemplateParsed >;
73
+ getParsedTemplateAsync(replyTemplateId: number, languageId: number, personId: number, ticketId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ReplyTemplateParsed >;
74
+ getUnparsedTemplateAsync(request: carriers.CustomerService_GetUnparsedTemplateRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ReplyTemplateParsed >;
75
+ getUnparsedTemplateAsync(replyTemplateId: number, languageId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ReplyTemplateParsed >;
76
+ getSmsConfigAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SmsConfig >;
77
+ testSmtpServerAsync(request: carriers.CustomerService_TestSmtpServerRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SmtpTestResult >;
78
+ testSmtpServerAsync(smtpUri: string, from: string, useStoredPassword: boolean, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SmtpTestResult >;
79
+ getStatisticsAsync(request: carriers.CustomerService_GetStatisticsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.StatisticsDataSet[] >;
80
+ getStatisticsAsync(functions: enums.StatusScreenPanelType[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.StatisticsDataSet[] >;
81
+ getSystemTemplateSettingsAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SystemTemplateSettings >;
82
+ saveSystemTemplateSettingsAsync(request: carriers.CustomerService_SaveSystemTemplateSettingsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SystemTemplateSettings >;
83
+ saveSystemTemplateSettingsAsync(systemTemplateSettings: carriers.SystemTemplateSettings, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SystemTemplateSettings >;
84
+ createTicketFromMailDataAsync(request: carriers.CustomerService_CreateTicketFromMailDataRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketInfo >;
85
+ createTicketFromMailDataAsync(mailboxId: number, data: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketInfo >;
86
+ addMessageFromMailDataAsync(request: carriers.CustomerService_AddMessageFromMailDataRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketInfo >;
87
+ addMessageFromMailDataAsync(ticketId: number, data: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketInfo >;
88
+ findTicketsByTitleOrIdAsync(request: carriers.CustomerService_FindTicketsByTitleOrIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketInfo[] >;
89
+ findTicketsByTitleOrIdAsync(titleOrId: string, maxRows: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketInfo[] >;
90
+ } // interface ICustomerServiceAgent
91
+
92
+
93
+
94
+
95
+ /**
96
+ * Agent used for Customer Service methods
97
+ */
98
+ export class CustomerServiceAgent extends base.WebApiBase implements ICustomerServiceAgent {
99
+ constructor(baseUrl?: string, languageCode?:string, cultureCode?: string);
100
+ constructor(baseUrl?: string, resourceParsing?: base.ResourceParsing);
101
+ constructor(baseUrl: string, resourceManager:any);
102
+ constructor(baseUrl: string, config:AxiosRequestConfig, resourceManager:any);
103
+ constructor(baseUrl: string, config:AxiosRequestConfig, resourceParsing?: base.ResourceParsing);
104
+ constructor(baseUrl: string, config:AxiosRequestConfig, languageCode?:string, cultureCode?: string);
105
+ constructor(options: base.WebApiOptions);
106
+
107
+ constructor(baseUrlOrOptions: string|base.WebApiOptions|undefined,
108
+ langOrconfigOrRM?: string|base.ResourceParsing|AxiosRequestConfig|any,
109
+ langOrResourceOrRM?:string|base.ResourceParsing|any,
110
+ cultureCode?: string,
111
+ ) {
112
+ const options = base.WebApiBase.FigureOutOptions(baseUrlOrOptions, langOrconfigOrRM, langOrResourceOrRM, cultureCode);
113
+ options.basePath = "v1/Agents/CustomerService/";
114
+ super(options);
115
+ }
116
+
117
+
118
+
119
+ /**
120
+ * Set default values into a new CustomerCenterConfig.
121
+ * NetServer calculates default values on the entity, which is required when creating/storing a new instance
122
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
123
+ * @returns A blank entity.
124
+ */
125
+ public async createDefaultCustomerCenterConfigAsync(options?:base.WebApiRequestOptions) : Promise< carriers.CustomerCenterConfig > {
126
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
127
+ base.WebApiBase.SetPending(options);
128
+ return new Promise< carriers.CustomerCenterConfig >(async (resolve, reject) => {
129
+ try {
130
+ const response = await this._axios.post("CreateDefaultCustomerCenterConfig", null, config);
131
+ base.WebApiBase.SetCompleted(options);
132
+ const res : carriers.CustomerCenterConfig = converters.Create_CustomerCenterConfig_From( response.data );
133
+ resolve(res);
134
+ }
135
+ catch( err ) {
136
+ base.WebApiBase.HandleError(options, config, err);
137
+ reject(err);
138
+ }
139
+ });
140
+ }
141
+ /*
142
+ * Replace the existing CustomerCenterConfig or creates a new CustomerCenterConfig if the id parameter is empty
143
+ * @param entity - The CustomerCenterConfig to be saved.
144
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
145
+ * @returns New or updated CustomerCenterConfig
146
+ */
147
+ public async saveCustomerCenterConfigAsync(entity: carriers.CustomerCenterConfig, options?:base.WebApiRequestOptions) : Promise< carriers.CustomerCenterConfig > {
148
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
149
+ base.WebApiBase.SetPending(options);
150
+ return new Promise< carriers.CustomerCenterConfig >(async (resolve, reject) => {
151
+ try {
152
+ const response = await this._axios.post("SaveCustomerCenterConfig", entity, config);
153
+ base.WebApiBase.SetCompleted(options);
154
+ const res : carriers.CustomerCenterConfig = converters.Create_CustomerCenterConfig_From( response.data );
155
+ resolve(res);
156
+ }
157
+ catch( err ) {
158
+ base.WebApiBase.HandleError(options, config, err);
159
+ reject(err);
160
+ }
161
+ });
162
+ }
163
+
164
+ /*
165
+ * Deletes the CustomerCenterConfig
166
+ * @param CustomerCenterConfigId - The id of the CustomerCenterConfig to be deleted.
167
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
168
+ */
169
+ public async deleteCustomerCenterConfigAsync(CustomerCenterConfigId: number, options?:base.WebApiRequestOptions) : Promise< void > {
170
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
171
+ base.WebApiBase.SetPending(options);
172
+ return new Promise< void >(async (resolve, reject) => {
173
+ try {
174
+ const response = await this._axios.post("DeleteCustomerCenterConfig?CustomerCenterConfigId=" + CustomerCenterConfigId, null, config );
175
+ base.WebApiBase.SetCompleted(options);
176
+ const res = response.data;
177
+ resolve(res);
178
+ }
179
+ catch( err ) {
180
+ base.WebApiBase.HandleError(options, config, err);
181
+ reject(err);
182
+ }
183
+ });
184
+ }
185
+
186
+ /**
187
+ * Set default values into a new MailboxEntity.
188
+ * NetServer calculates default values on the entity, which is required when creating/storing a new instance
189
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
190
+ * @returns A blank entity.
191
+ */
192
+ public async createDefaultMailboxEntityAsync(options?:base.WebApiRequestOptions) : Promise< carriers.MailboxEntity > {
193
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
194
+ base.WebApiBase.SetPending(options);
195
+ return new Promise< carriers.MailboxEntity >(async (resolve, reject) => {
196
+ try {
197
+ const response = await this._axios.post("CreateDefaultMailboxEntity", null, config);
198
+ base.WebApiBase.SetCompleted(options);
199
+ const res : carriers.MailboxEntity = converters.Create_MailboxEntity_From( response.data );
200
+ resolve(res);
201
+ }
202
+ catch( err ) {
203
+ base.WebApiBase.HandleError(options, config, err);
204
+ reject(err);
205
+ }
206
+ });
207
+ }
208
+ /*
209
+ * Replace the existing MailboxEntity or creates a new MailboxEntity if the id parameter is empty
210
+ * @param entity - The MailboxEntity to be saved.
211
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
212
+ * @returns New or updated MailboxEntity
213
+ */
214
+ public async saveMailboxEntityAsync(entity: carriers.MailboxEntity, options?:base.WebApiRequestOptions) : Promise< carriers.MailboxEntity > {
215
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
216
+ base.WebApiBase.SetPending(options);
217
+ return new Promise< carriers.MailboxEntity >(async (resolve, reject) => {
218
+ try {
219
+ const response = await this._axios.post("SaveMailboxEntity", entity, config);
220
+ base.WebApiBase.SetCompleted(options);
221
+ const res : carriers.MailboxEntity = converters.Create_MailboxEntity_From( response.data );
222
+ resolve(res);
223
+ }
224
+ catch( err ) {
225
+ base.WebApiBase.HandleError(options, config, err);
226
+ reject(err);
227
+ }
228
+ });
229
+ }
230
+
231
+ /**
232
+ * Set default values into a new SmsConfig.
233
+ * NetServer calculates default values on the entity, which is required when creating/storing a new instance
234
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
235
+ * @returns A blank entity.
236
+ */
237
+ public async createDefaultSmsConfigAsync(options?:base.WebApiRequestOptions) : Promise< carriers.SmsConfig > {
238
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
239
+ base.WebApiBase.SetPending(options);
240
+ return new Promise< carriers.SmsConfig >(async (resolve, reject) => {
241
+ try {
242
+ const response = await this._axios.post("CreateDefaultSmsConfig", null, config);
243
+ base.WebApiBase.SetCompleted(options);
244
+ const res : carriers.SmsConfig = converters.Create_SmsConfig_From( response.data );
245
+ resolve(res);
246
+ }
247
+ catch( err ) {
248
+ base.WebApiBase.HandleError(options, config, err);
249
+ reject(err);
250
+ }
251
+ });
252
+ }
253
+ /*
254
+ * Replace the existing SmsConfig or creates a new SmsConfig if the id parameter is empty
255
+ * @param entity - The SmsConfig to be saved.
256
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
257
+ * @returns New or updated SmsConfig
258
+ */
259
+ public async saveSmsConfigAsync(entity: carriers.SmsConfig, options?:base.WebApiRequestOptions) : Promise< carriers.SmsConfig > {
260
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
261
+ base.WebApiBase.SetPending(options);
262
+ return new Promise< carriers.SmsConfig >(async (resolve, reject) => {
263
+ try {
264
+ const response = await this._axios.post("SaveSmsConfig", entity, config);
265
+ base.WebApiBase.SetCompleted(options);
266
+ const res : carriers.SmsConfig = converters.Create_SmsConfig_From( response.data );
267
+ resolve(res);
268
+ }
269
+ catch( err ) {
270
+ base.WebApiBase.HandleError(options, config, err);
271
+ reject(err);
272
+ }
273
+ });
274
+ }
275
+
276
+ private async _updateFeatureTogglesAsync(request: carriers.CustomerService_UpdateFeatureTogglesRequest, options?:base.WebApiRequestOptions) : Promise< void > {
277
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
278
+ base.WebApiBase.SetPending(options);
279
+ return new Promise< void >(async (resolve, reject) => {
280
+ try {
281
+ config.baseURL = this._options.baseUrl;
282
+ const response = await this._axios.post("UpdateFeatureToggles", request , config);
283
+ base.WebApiBase.SetCompleted(options);
284
+ const res = response.data;
285
+ resolve(res);
286
+ }
287
+ catch( err ) {
288
+ base.WebApiBase.HandleError(options, config, err);
289
+ reject(err);
290
+ }
291
+ });
292
+ }
293
+
294
+
295
+
296
+ /**
297
+ * Update the cached FeatureToggles for CS
298
+ * @param request - FeatureToggles
299
+ * @returns
300
+ */
301
+ public async updateFeatureTogglesAsync(request: carriers.CustomerService_UpdateFeatureTogglesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
302
+
303
+ /**
304
+ * Update the cached FeatureToggles for CS
305
+ * @param featureToggles - Feature toggle name / state
306
+ * @returns
307
+ */
308
+ public async updateFeatureTogglesAsync(featureToggles: carriers.CsFeatureToggle[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
309
+
310
+ public async updateFeatureTogglesAsync(featureToggles:carriers.CsFeatureToggle[]|carriers.CustomerService_UpdateFeatureTogglesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
311
+ let _request : carriers.CustomerService_UpdateFeatureTogglesRequest = null;
312
+ let _options : base.WebApiRequestOptions = null;
313
+ const first : any = featureToggles;
314
+ if( typeof( first ) === "object" && first && ( typeof(first.featureToggles)!='undefined' ) )
315
+ {
316
+ _request = featureToggles as carriers.CustomerService_UpdateFeatureTogglesRequest;
317
+ _options = webapi_options as base.WebApiRequestOptions;
318
+ }
319
+ else
320
+ {
321
+ _request = {
322
+ featureToggles: featureToggles as carriers.CsFeatureToggle[],
323
+ };
324
+ _options = webapi_options;
325
+ }
326
+ return this._updateFeatureTogglesAsync( _request, _options );
327
+ }
328
+
329
+
330
+ private async _eventHandlerExistsAsync(request: carriers.CustomerService_EventHandlerExistsRequest, options?:base.WebApiRequestOptions) : Promise< boolean > {
331
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
332
+ base.WebApiBase.SetPending(options);
333
+ return new Promise< boolean >(async (resolve, reject) => {
334
+ try {
335
+ config.baseURL = this._options.baseUrl;
336
+ const response = await this._axios.post("EventHandlerExists", request , config);
337
+ base.WebApiBase.SetCompleted(options);
338
+ const res : boolean = response.data as boolean;
339
+ resolve(res);
340
+ }
341
+ catch( err ) {
342
+ base.WebApiBase.HandleError(options, config, err);
343
+ reject(err);
344
+ }
345
+ });
346
+ }
347
+
348
+
349
+
350
+ /**
351
+ * Check if an eventhandler exists for a given enum
352
+ * @param request - EventHandlerType
353
+ * @returns True if it exists
354
+ */
355
+ public async eventHandlerExistsAsync(request: carriers.CustomerService_EventHandlerExistsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
356
+
357
+ /**
358
+ * Check if an eventhandler exists for a given enum
359
+ * @param eventHandlerType - The EventHandlerType we are checking
360
+ * @returns True if it exists
361
+ */
362
+ public async eventHandlerExistsAsync(eventHandlerType: enums.EventHandlerType, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
363
+
364
+ public async eventHandlerExistsAsync(eventHandlerType:enums.EventHandlerType|carriers.CustomerService_EventHandlerExistsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean > {
365
+ let _request : carriers.CustomerService_EventHandlerExistsRequest = null;
366
+ let _options : base.WebApiRequestOptions = null;
367
+ const first : any = eventHandlerType;
368
+ if( typeof( first ) === "object" && first && ( typeof(first.eventHandlerType)!='undefined' ) )
369
+ {
370
+ _request = eventHandlerType as carriers.CustomerService_EventHandlerExistsRequest;
371
+ _options = webapi_options as base.WebApiRequestOptions;
372
+ }
373
+ else
374
+ {
375
+ _request = {
376
+ eventHandlerType: eventHandlerType as enums.EventHandlerType,
377
+ };
378
+ _options = webapi_options;
379
+ }
380
+ return this._eventHandlerExistsAsync( _request, _options );
381
+ }
382
+
383
+
384
+ private async _createSessionAsync(request: carriers.CustomerService_CreateSessionRequest, options?:base.WebApiRequestOptions) : Promise< carriers.CsSessionKey > {
385
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
386
+ base.WebApiBase.SetPending(options);
387
+ return new Promise< carriers.CsSessionKey >(async (resolve, reject) => {
388
+ try {
389
+ config.baseURL = this._options.baseUrl;
390
+ const response = await this._axios.post("CreateSession", request , config);
391
+ base.WebApiBase.SetCompleted(options);
392
+ const res : carriers.CsSessionKey = converters.Create_CsSessionKey_From( response.data );
393
+ resolve(res);
394
+ }
395
+ catch( err ) {
396
+ base.WebApiBase.HandleError(options, config, err);
397
+ reject(err);
398
+ }
399
+ });
400
+ }
401
+
402
+
403
+
404
+ /**
405
+ * Creates a login session for a CS user
406
+ * @param request - RemoteIp
407
+ * @returns The session key information
408
+ */
409
+ public async createSessionAsync(request: carriers.CustomerService_CreateSessionRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CsSessionKey >;
410
+
411
+ /**
412
+ * Creates a login session for a CS user
413
+ * @param remoteIp - The ip of the client creating the session
414
+ * @returns The session key information
415
+ */
416
+ public async createSessionAsync(remoteIp: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CsSessionKey >;
417
+
418
+ public async createSessionAsync(remoteIp:string|carriers.CustomerService_CreateSessionRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CsSessionKey > {
419
+ let _request : carriers.CustomerService_CreateSessionRequest = null;
420
+ let _options : base.WebApiRequestOptions = null;
421
+ const first : any = remoteIp;
422
+ if( typeof( first ) === "object" && first && ( typeof(first.remoteIp)!='undefined' ) )
423
+ {
424
+ _request = remoteIp as carriers.CustomerService_CreateSessionRequest;
425
+ _options = webapi_options as base.WebApiRequestOptions;
426
+ }
427
+ else
428
+ {
429
+ _request = {
430
+ remoteIp: remoteIp as string,
431
+ };
432
+ _options = webapi_options;
433
+ }
434
+ return this._createSessionAsync( _request, _options );
435
+ }
436
+
437
+
438
+ private async _removeSessionAsync(request: carriers.CustomerService_RemoveSessionRequest, options?:base.WebApiRequestOptions) : Promise< void > {
439
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
440
+ base.WebApiBase.SetPending(options);
441
+ return new Promise< void >(async (resolve, reject) => {
442
+ try {
443
+ config.baseURL = this._options.baseUrl;
444
+ const response = await this._axios.post("RemoveSession", request , config);
445
+ base.WebApiBase.SetCompleted(options);
446
+ const res = response.data;
447
+ resolve(res);
448
+ }
449
+ catch( err ) {
450
+ base.WebApiBase.HandleError(options, config, err);
451
+ reject(err);
452
+ }
453
+ });
454
+ }
455
+
456
+
457
+
458
+ /**
459
+ * Remove a login session for a CS user
460
+ * @param request - LoginId
461
+ * @returns
462
+ */
463
+ public async removeSessionAsync(request: carriers.CustomerService_RemoveSessionRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
464
+
465
+ /**
466
+ * Remove a login session for a CS user
467
+ * @param loginId - The login id to remove
468
+ * @returns
469
+ */
470
+ public async removeSessionAsync(loginId: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
471
+
472
+ public async removeSessionAsync(loginId:number|carriers.CustomerService_RemoveSessionRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
473
+ let _request : carriers.CustomerService_RemoveSessionRequest = null;
474
+ let _options : base.WebApiRequestOptions = null;
475
+ const first : any = loginId;
476
+ if( typeof( first ) === "object" && first && ( typeof(first.loginId)!='undefined' ) )
477
+ {
478
+ _request = loginId as carriers.CustomerService_RemoveSessionRequest;
479
+ _options = webapi_options as base.WebApiRequestOptions;
480
+ }
481
+ else
482
+ {
483
+ _request = {
484
+ loginId: loginId as number,
485
+ };
486
+ _options = webapi_options;
487
+ }
488
+ return this._removeSessionAsync( _request, _options );
489
+ }
490
+
491
+
492
+ private async _sessionIsValidAsync(request: carriers.CustomerService_SessionIsValidRequest, options?:base.WebApiRequestOptions) : Promise< boolean > {
493
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
494
+ base.WebApiBase.SetPending(options);
495
+ return new Promise< boolean >(async (resolve, reject) => {
496
+ try {
497
+ config.baseURL = this._options.baseUrl;
498
+ const response = await this._axios.post("SessionIsValid", request , config);
499
+ base.WebApiBase.SetCompleted(options);
500
+ const res : boolean = response.data as boolean;
501
+ resolve(res);
502
+ }
503
+ catch( err ) {
504
+ base.WebApiBase.HandleError(options, config, err);
505
+ reject(err);
506
+ }
507
+ });
508
+ }
509
+
510
+
511
+
512
+ /**
513
+ * Check if a CS session is valid
514
+ * @param request - CsSessionKey
515
+ * @returns True if there is a valid CS session based on the session key
516
+ */
517
+ public async sessionIsValidAsync(request: carriers.CustomerService_SessionIsValidRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
518
+
519
+ /**
520
+ * Check if a CS session is valid
521
+ * @param csSessionKey - The CS session key to check
522
+ * @returns True if there is a valid CS session based on the session key
523
+ */
524
+ public async sessionIsValidAsync(csSessionKey: string, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
525
+
526
+ public async sessionIsValidAsync(csSessionKey:string|carriers.CustomerService_SessionIsValidRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean > {
527
+ let _request : carriers.CustomerService_SessionIsValidRequest = null;
528
+ let _options : base.WebApiRequestOptions = null;
529
+ const first : any = csSessionKey;
530
+ if( typeof( first ) === "object" && first && ( typeof(first.csSessionKey)!='undefined' ) )
531
+ {
532
+ _request = csSessionKey as carriers.CustomerService_SessionIsValidRequest;
533
+ _options = webapi_options as base.WebApiRequestOptions;
534
+ }
535
+ else
536
+ {
537
+ _request = {
538
+ csSessionKey: csSessionKey as string,
539
+ };
540
+ _options = webapi_options;
541
+ }
542
+ return this._sessionIsValidAsync( _request, _options );
543
+ }
544
+
545
+
546
+ private async _hasChatNotifyAsync( options?:base.WebApiRequestOptions) : Promise< boolean > {
547
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
548
+ base.WebApiBase.SetPending(options);
549
+ return new Promise< boolean >(async (resolve, reject) => {
550
+ try {
551
+ config.baseURL = this._options.baseUrl;
552
+ const response = await this._axios.post("HasChatNotify", undefined , config);
553
+ base.WebApiBase.SetCompleted(options);
554
+ const res : boolean = response.data as boolean;
555
+ resolve(res);
556
+ }
557
+ catch( err ) {
558
+ base.WebApiBase.HandleError(options, config, err);
559
+ reject(err);
560
+ }
561
+ });
562
+ }
563
+
564
+
565
+ /**
566
+ * Check if user has any chat notification
567
+ * @returns True if the user has at least one notification setting on
568
+ */
569
+ public async hasChatNotifyAsync(webapi_options?:base.WebApiRequestOptions) : Promise< boolean >
570
+ {
571
+ return this._hasChatNotifyAsync(webapi_options);
572
+ }
573
+
574
+
575
+ private async _checkSymmetricEncryptionAsync(request: carriers.CustomerService_CheckSymmetricEncryptionRequest, options?:base.WebApiRequestOptions) : Promise< string > {
576
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
577
+ base.WebApiBase.SetPending(options);
578
+ return new Promise< string >(async (resolve, reject) => {
579
+ try {
580
+ config.baseURL = this._options.baseUrl;
581
+ const response = await this._axios.post("CheckSymmetricEncryption", request , config);
582
+ base.WebApiBase.SetCompleted(options);
583
+ const res : string = response.data as string;
584
+ resolve(res);
585
+ }
586
+ catch( err ) {
587
+ base.WebApiBase.HandleError(options, config, err);
588
+ reject(err);
589
+ }
590
+ });
591
+ }
592
+
593
+
594
+
595
+ /**
596
+ * Do a test to check that we are using the same encryption keys
597
+ * @param request - EncryptedString
598
+ * @returns Encrypted version of the string done by NetServer
599
+ */
600
+ public async checkSymmetricEncryptionAsync(request: carriers.CustomerService_CheckSymmetricEncryptionRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
601
+
602
+ /**
603
+ * Do a test to check that we are using the same encryption keys
604
+ * @param encryptedString - An encrypted version of the string
605
+ * @returns Encrypted version of the string done by NetServer
606
+ */
607
+ public async checkSymmetricEncryptionAsync(encryptedString: string, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
608
+
609
+ public async checkSymmetricEncryptionAsync(encryptedString:string|carriers.CustomerService_CheckSymmetricEncryptionRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string > {
610
+ let _request : carriers.CustomerService_CheckSymmetricEncryptionRequest = null;
611
+ let _options : base.WebApiRequestOptions = null;
612
+ const first : any = encryptedString;
613
+ if( typeof( first ) === "object" && first && ( typeof(first.encryptedString)!='undefined' ) )
614
+ {
615
+ _request = encryptedString as carriers.CustomerService_CheckSymmetricEncryptionRequest;
616
+ _options = webapi_options as base.WebApiRequestOptions;
617
+ }
618
+ else
619
+ {
620
+ _request = {
621
+ encryptedString: encryptedString as string,
622
+ };
623
+ _options = webapi_options;
624
+ }
625
+ return this._checkSymmetricEncryptionAsync( _request, _options );
626
+ }
627
+
628
+
629
+ private async _reportSessionActiveAsync(request: carriers.CustomerService_ReportSessionActiveRequest, options?:base.WebApiRequestOptions) : Promise< number > {
630
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
631
+ base.WebApiBase.SetPending(options);
632
+ return new Promise< number >(async (resolve, reject) => {
633
+ try {
634
+ config.baseURL = this._options.baseUrl;
635
+ const response = await this._axios.post("ReportSessionActive", request , config);
636
+ base.WebApiBase.SetCompleted(options);
637
+ const res : number = response.data as number;
638
+ resolve(res);
639
+ }
640
+ catch( err ) {
641
+ base.WebApiBase.HandleError(options, config, err);
642
+ reject(err);
643
+ }
644
+ });
645
+ }
646
+
647
+
648
+
649
+ /**
650
+ * Report a session as being &apos;active&apos;; will update the corresponding row in login table, but not more than once per minute/session
651
+ * @param request - SessionKey
652
+ * @returns The ID of the login table row, or 0 if not found
653
+ */
654
+ public async reportSessionActiveAsync(request: carriers.CustomerService_ReportSessionActiveRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
655
+
656
+ /**
657
+ * Report a session as being &apos;active&apos;; will update the corresponding row in login table, but not more than once per minute/session
658
+ * @param sessionKey - CS session key, matching the 'login' table
659
+ * @returns The ID of the login table row, or 0 if not found
660
+ */
661
+ public async reportSessionActiveAsync(sessionKey: string, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
662
+
663
+ public async reportSessionActiveAsync(sessionKey:string|carriers.CustomerService_ReportSessionActiveRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number > {
664
+ let _request : carriers.CustomerService_ReportSessionActiveRequest = null;
665
+ let _options : base.WebApiRequestOptions = null;
666
+ const first : any = sessionKey;
667
+ if( typeof( first ) === "object" && first && ( typeof(first.sessionKey)!='undefined' ) )
668
+ {
669
+ _request = sessionKey as carriers.CustomerService_ReportSessionActiveRequest;
670
+ _options = webapi_options as base.WebApiRequestOptions;
671
+ }
672
+ else
673
+ {
674
+ _request = {
675
+ sessionKey: sessionKey as string,
676
+ };
677
+ _options = webapi_options;
678
+ }
679
+ return this._reportSessionActiveAsync( _request, _options );
680
+ }
681
+
682
+ /*
683
+ * Gets a CustomerCenterConfig object.
684
+ * @param customerCenterConfigId - The primary key.
685
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
686
+ * @returns A single CustomerCenterConfig
687
+ */
688
+ public async getCustomerCenterConfigAsync(customerCenterConfigId: number, options?:base.WebApiRequestOptions) : Promise< carriers.CustomerCenterConfig > {
689
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
690
+ base.WebApiBase.SetPending(options);
691
+ return new Promise< carriers.CustomerCenterConfig >(async (resolve, reject) => {
692
+ try {
693
+ const response = await this._axios.post("GetCustomerCenterConfig?customerCenterConfigId=" + customerCenterConfigId, null, config);
694
+ base.WebApiBase.SetCompleted(options);
695
+ const res = converters.Create_CustomerCenterConfig_From( response.data );
696
+ resolve(res);
697
+ }
698
+ catch( err ) {
699
+ base.WebApiBase.HandleError(options, config, err);
700
+ reject(err);
701
+ }
702
+ });
703
+ }
704
+
705
+
706
+ private async _getAllCustomerCenterConfigsAsync( options?:base.WebApiRequestOptions) : Promise< carriers.CustomerCenterConfig[] > {
707
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
708
+ base.WebApiBase.SetPending(options);
709
+ return new Promise< carriers.CustomerCenterConfig[] >(async (resolve, reject) => {
710
+ try {
711
+ config.baseURL = this._options.baseUrl;
712
+ const response = await this._axios.post("GetAllCustomerCenterConfigs", undefined , config);
713
+ base.WebApiBase.SetCompleted(options);
714
+ const res : carriers.CustomerCenterConfig[] = converters.Create_CustomerCenterConfigArray_From( response.data );
715
+ resolve(res);
716
+ }
717
+ catch( err ) {
718
+ base.WebApiBase.HandleError(options, config, err);
719
+ reject(err);
720
+ }
721
+ });
722
+ }
723
+
724
+
725
+ /**
726
+ * Get all rows from cust_config as an array of CustomerCenterConfig entities
727
+ * @returns An array of CustomerCenterConfig entities
728
+ */
729
+ public async getAllCustomerCenterConfigsAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CustomerCenterConfig[] >
730
+ {
731
+ return this._getAllCustomerCenterConfigsAsync(webapi_options);
732
+ }
733
+
734
+
735
+ private async _saveAllCustomerCenterConfigsAsync(request: carriers.CustomerService_SaveAllCustomerCenterConfigsRequest, options?:base.WebApiRequestOptions) : Promise< void > {
736
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
737
+ base.WebApiBase.SetPending(options);
738
+ return new Promise< void >(async (resolve, reject) => {
739
+ try {
740
+ config.baseURL = this._options.baseUrl;
741
+ const response = await this._axios.post("SaveAllCustomerCenterConfigs", request , config);
742
+ base.WebApiBase.SetCompleted(options);
743
+ const res = response.data;
744
+ resolve(res);
745
+ }
746
+ catch( err ) {
747
+ base.WebApiBase.HandleError(options, config, err);
748
+ reject(err);
749
+ }
750
+ });
751
+ }
752
+
753
+
754
+
755
+ /**
756
+ * Save an array of CustomerCenterConfig entities to the database
757
+ * @param request - CustConfigs
758
+ * @returns void
759
+ */
760
+ public async saveAllCustomerCenterConfigsAsync(request: carriers.CustomerService_SaveAllCustomerCenterConfigsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
761
+
762
+ /**
763
+ * Save an array of CustomerCenterConfig entities to the database
764
+ * @param custConfigs - The CustomerCenterConfig entities to be saved. If the id does not exists, a new one will be created. Unknown ids will be skipped
765
+ * @returns void
766
+ */
767
+ public async saveAllCustomerCenterConfigsAsync(custConfigs: carriers.CustomerCenterConfig[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
768
+
769
+ public async saveAllCustomerCenterConfigsAsync(custConfigs:carriers.CustomerCenterConfig[]|carriers.CustomerService_SaveAllCustomerCenterConfigsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
770
+ let _request : carriers.CustomerService_SaveAllCustomerCenterConfigsRequest = null;
771
+ let _options : base.WebApiRequestOptions = null;
772
+ const first : any = custConfigs;
773
+ if( typeof( first ) === "object" && first && ( typeof(first.custConfigs)!='undefined' ) )
774
+ {
775
+ _request = custConfigs as carriers.CustomerService_SaveAllCustomerCenterConfigsRequest;
776
+ _options = webapi_options as base.WebApiRequestOptions;
777
+ }
778
+ else
779
+ {
780
+ _request = {
781
+ custConfigs: custConfigs as carriers.CustomerCenterConfig[],
782
+ };
783
+ _options = webapi_options;
784
+ }
785
+ return this._saveAllCustomerCenterConfigsAsync( _request, _options );
786
+ }
787
+
788
+
789
+ private async _checkIfCustomizedTemplatesAsync( options?:base.WebApiRequestOptions) : Promise< boolean > {
790
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
791
+ base.WebApiBase.SetPending(options);
792
+ return new Promise< boolean >(async (resolve, reject) => {
793
+ try {
794
+ config.baseURL = this._options.baseUrl;
795
+ const response = await this._axios.post("CheckIfCustomizedTemplates", undefined , config);
796
+ base.WebApiBase.SetCompleted(options);
797
+ const res : boolean = response.data as boolean;
798
+ resolve(res);
799
+ }
800
+ catch( err ) {
801
+ base.WebApiBase.HandleError(options, config, err);
802
+ reject(err);
803
+ }
804
+ });
805
+ }
806
+
807
+
808
+ /**
809
+ * Checks whether the core html templates are customized
810
+ * @returns True if the templates are customized
811
+ */
812
+ public async checkIfCustomizedTemplatesAsync(webapi_options?:base.WebApiRequestOptions) : Promise< boolean >
813
+ {
814
+ return this._checkIfCustomizedTemplatesAsync(webapi_options);
815
+ }
816
+
817
+
818
+ private async _getProgramUrlAsync(request: carriers.CustomerService_GetProgramUrlRequest, options?:base.WebApiRequestOptions) : Promise< string > {
819
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
820
+ base.WebApiBase.SetPending(options);
821
+ return new Promise< string >(async (resolve, reject) => {
822
+ try {
823
+ config.baseURL = this._options.baseUrl;
824
+ const response = await this._axios.post("GetProgramUrl", request , config);
825
+ base.WebApiBase.SetCompleted(options);
826
+ const res : string = response.data as string;
827
+ resolve(res);
828
+ }
829
+ catch( err ) {
830
+ base.WebApiBase.HandleError(options, config, err);
831
+ reject(err);
832
+ }
833
+ });
834
+ }
835
+
836
+
837
+
838
+ /**
839
+ * This method will convert a module name into a Service URL.
840
+ * @param request - ProgramName, External
841
+ * @returns Returns a valid Service URL composed of the give parameters.
842
+ */
843
+ public async getProgramUrlAsync(request: carriers.CustomerService_GetProgramUrlRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
844
+
845
+ /**
846
+ * This method will convert a module name into a Service URL.
847
+ * @param programName - In this parameter you must specify which CS program you want to create an URL for. Valid examples are "ticket", "rms", "spm" etc.
848
+ * @param external - If set to true, this will generate URLs that are accesible from the outside (for example Internet)
849
+ * @returns Returns a valid Service URL composed of the give parameters.
850
+ */
851
+ public async getProgramUrlAsync(programName: string, external: boolean, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
852
+
853
+ public async getProgramUrlAsync(programName:string|carriers.CustomerService_GetProgramUrlRequest, external?:boolean|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< string > {
854
+ let _request : carriers.CustomerService_GetProgramUrlRequest = null;
855
+ let _options : base.WebApiRequestOptions = null;
856
+ const first : any = programName;
857
+ if( typeof( first ) === "object" && first && ( typeof(first.programName)!='undefined' || typeof(first.external)!='undefined' ) )
858
+ {
859
+ _request = programName as carriers.CustomerService_GetProgramUrlRequest;
860
+ _options = external as base.WebApiRequestOptions;
861
+ }
862
+ else
863
+ {
864
+ _request = {
865
+ programName: programName as string,
866
+ external: external as boolean,
867
+ };
868
+ _options = webapi_options;
869
+ }
870
+ return this._getProgramUrlAsync( _request, _options );
871
+ }
872
+
873
+
874
+ private async _getFaqForCustomerAsync(request: carriers.CustomerService_GetFaqForCustomerRequest, options?:base.WebApiRequestOptions) : Promise< string > {
875
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
876
+ base.WebApiBase.SetPending(options);
877
+ return new Promise< string >(async (resolve, reject) => {
878
+ try {
879
+ config.baseURL = this._options.baseUrl;
880
+ const response = await this._axios.post("GetFaqForCustomer", request , config);
881
+ base.WebApiBase.SetCompleted(options);
882
+ const res : string = response.data as string;
883
+ resolve(res);
884
+ }
885
+ catch( err ) {
886
+ base.WebApiBase.HandleError(options, config, err);
887
+ reject(err);
888
+ }
889
+ });
890
+ }
891
+
892
+
893
+
894
+ /**
895
+ * Get a FAQ entry, ment to be displayed for a customer. This can either be a link to the FAQ entry on Custom Center, or it can be the answer and question. This is dependent on Registry setting with reg_id=157
896
+ * @param request - FaqEntryId
897
+ * @returns The FAQ to show to the customer. Either a clickable link or the question/answer itself.
898
+ */
899
+ public async getFaqForCustomerAsync(request: carriers.CustomerService_GetFaqForCustomerRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
900
+
901
+ /**
902
+ * Get a FAQ entry, ment to be displayed for a customer. This can either be a link to the FAQ entry on Custom Center, or it can be the answer and question. This is dependent on Registry setting with reg_id=157
903
+ * @param faqEntryId - The id of the FAQ entry to get. Only FAQ entries with access level public (both for unauthenticated and autenticated customer) will be returned
904
+ * @returns The FAQ to show to the customer. Either a clickable link or the question/answer itself.
905
+ */
906
+ public async getFaqForCustomerAsync(faqEntryId: number, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
907
+
908
+ public async getFaqForCustomerAsync(faqEntryId:number|carriers.CustomerService_GetFaqForCustomerRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string > {
909
+ let _request : carriers.CustomerService_GetFaqForCustomerRequest = null;
910
+ let _options : base.WebApiRequestOptions = null;
911
+ const first : any = faqEntryId;
912
+ if( typeof( first ) === "object" && first && ( typeof(first.faqEntryId)!='undefined' ) )
913
+ {
914
+ _request = faqEntryId as carriers.CustomerService_GetFaqForCustomerRequest;
915
+ _options = webapi_options as base.WebApiRequestOptions;
916
+ }
917
+ else
918
+ {
919
+ _request = {
920
+ faqEntryId: faqEntryId as number,
921
+ };
922
+ _options = webapi_options;
923
+ }
924
+ return this._getFaqForCustomerAsync( _request, _options );
925
+ }
926
+
927
+
928
+ private async _getCustomerServiceStartupAsync( options?:base.WebApiRequestOptions) : Promise< carriers.CustomerServiceStartup > {
929
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
930
+ base.WebApiBase.SetPending(options);
931
+ return new Promise< carriers.CustomerServiceStartup >(async (resolve, reject) => {
932
+ try {
933
+ config.baseURL = this._options.baseUrl;
934
+ const response = await this._axios.post("GetCustomerServiceStartup", undefined , config);
935
+ base.WebApiBase.SetCompleted(options);
936
+ const res : carriers.CustomerServiceStartup = converters.Create_CustomerServiceStartup_From( response.data );
937
+ resolve(res);
938
+ }
939
+ catch( err ) {
940
+ base.WebApiBase.HandleError(options, config, err);
941
+ reject(err);
942
+ }
943
+ });
944
+ }
945
+
946
+
947
+ /**
948
+ * Get the carrier with data that Service needs when starting up
949
+ * @returns The carrier containing the startup data
950
+ */
951
+ public async getCustomerServiceStartupAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CustomerServiceStartup >
952
+ {
953
+ return this._getCustomerServiceStartupAsync(webapi_options);
954
+ }
955
+
956
+
957
+ private async _executeEventHandlersAsync(request: carriers.CustomerService_ExecuteEventHandlersRequest, options?:base.WebApiRequestOptions) : Promise< carriers.EventData > {
958
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
959
+ base.WebApiBase.SetPending(options);
960
+ return new Promise< carriers.EventData >(async (resolve, reject) => {
961
+ try {
962
+ config.baseURL = this._options.baseUrl;
963
+ const response = await this._axios.post("ExecuteEventHandlers", request , config);
964
+ base.WebApiBase.SetCompleted(options);
965
+ const res : carriers.EventData = converters.Create_EventData_From( response.data );
966
+ resolve(res);
967
+ }
968
+ catch( err ) {
969
+ base.WebApiBase.HandleError(options, config, err);
970
+ reject(err);
971
+ }
972
+ });
973
+ }
974
+
975
+
976
+
977
+ /**
978
+ * This method will execute event handlers in CRMScript for a given event.
979
+ * @param request - EventData
980
+ * @returns The EventData instance after event handler execution
981
+ */
982
+ public async executeEventHandlersAsync(request: carriers.CustomerService_ExecuteEventHandlersRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.EventData >;
983
+
984
+ /**
985
+ * This method will execute event handlers in CRMScript for a given event.
986
+ * @param eventData - The EventData instance sent to the event handler
987
+ * @returns The EventData instance after event handler execution
988
+ */
989
+ public async executeEventHandlersAsync(eventData: carriers.EventData, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.EventData >;
990
+
991
+ public async executeEventHandlersAsync(eventData:carriers.EventData|carriers.CustomerService_ExecuteEventHandlersRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.EventData > {
992
+ let _request : carriers.CustomerService_ExecuteEventHandlersRequest = null;
993
+ let _options : base.WebApiRequestOptions = null;
994
+ const first : any = eventData;
995
+ if( typeof( first ) === "object" && first && ( typeof(first.eventData)!='undefined' ) )
996
+ {
997
+ _request = eventData as carriers.CustomerService_ExecuteEventHandlersRequest;
998
+ _options = webapi_options as base.WebApiRequestOptions;
999
+ }
1000
+ else
1001
+ {
1002
+ _request = {
1003
+ eventData: eventData as carriers.EventData,
1004
+ };
1005
+ _options = webapi_options;
1006
+ }
1007
+ return this._executeEventHandlersAsync( _request, _options );
1008
+ }
1009
+
1010
+
1011
+ private async _getMailboxesAsync( options?:base.WebApiRequestOptions) : Promise< carriers.Mailbox[] > {
1012
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1013
+ base.WebApiBase.SetPending(options);
1014
+ return new Promise< carriers.Mailbox[] >(async (resolve, reject) => {
1015
+ try {
1016
+ config.baseURL = this._options.baseUrl;
1017
+ const response = await this._axios.post("GetMailboxes", undefined , config);
1018
+ base.WebApiBase.SetCompleted(options);
1019
+ const res : carriers.Mailbox[] = converters.Create_MailboxArray_From( response.data );
1020
+ resolve(res);
1021
+ }
1022
+ catch( err ) {
1023
+ base.WebApiBase.HandleError(options, config, err);
1024
+ reject(err);
1025
+ }
1026
+ });
1027
+ }
1028
+
1029
+
1030
+ /**
1031
+ * This method will get all registered mailboxes in Service
1032
+ * @returns An array of Mailbox objects
1033
+ */
1034
+ public async getMailboxesAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Mailbox[] >
1035
+ {
1036
+ return this._getMailboxesAsync(webapi_options);
1037
+ }
1038
+
1039
+ /*
1040
+ * Gets a MailboxEntity object.
1041
+ * @param mailboxEntityId - The primary key.
1042
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
1043
+ * @returns A single MailboxEntity
1044
+ */
1045
+ public async getMailboxEntityAsync(mailboxEntityId: number, options?:base.WebApiRequestOptions) : Promise< carriers.MailboxEntity > {
1046
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1047
+ base.WebApiBase.SetPending(options);
1048
+ return new Promise< carriers.MailboxEntity >(async (resolve, reject) => {
1049
+ try {
1050
+ const response = await this._axios.post("GetMailboxEntity?mailboxEntityId=" + mailboxEntityId, null, config);
1051
+ base.WebApiBase.SetCompleted(options);
1052
+ const res = converters.Create_MailboxEntity_From( response.data );
1053
+ resolve(res);
1054
+ }
1055
+ catch( err ) {
1056
+ base.WebApiBase.HandleError(options, config, err);
1057
+ reject(err);
1058
+ }
1059
+ });
1060
+ }
1061
+
1062
+
1063
+ private async _getPreviewFaqEntryAsync(request: carriers.CustomerService_GetPreviewFaqEntryRequest, options?:base.WebApiRequestOptions) : Promise< carriers.PreviewFaqEntry > {
1064
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1065
+ base.WebApiBase.SetPending(options);
1066
+ return new Promise< carriers.PreviewFaqEntry >(async (resolve, reject) => {
1067
+ try {
1068
+ config.baseURL = this._options.baseUrl;
1069
+ const response = await this._axios.post("GetPreviewFaqEntry", request , config);
1070
+ base.WebApiBase.SetCompleted(options);
1071
+ const res : carriers.PreviewFaqEntry = converters.Create_PreviewFaqEntry_From( response.data );
1072
+ resolve(res);
1073
+ }
1074
+ catch( err ) {
1075
+ base.WebApiBase.HandleError(options, config, err);
1076
+ reject(err);
1077
+ }
1078
+ });
1079
+ }
1080
+
1081
+
1082
+
1083
+ /**
1084
+ * Get a faq entry from its faq entry id
1085
+ * @param request - KbEntryId
1086
+ * @returns FAQ entry suitable for preview
1087
+ */
1088
+ public async getPreviewFaqEntryAsync(request: carriers.CustomerService_GetPreviewFaqEntryRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PreviewFaqEntry >;
1089
+
1090
+ /**
1091
+ * Get a faq entry from its faq entry id
1092
+ * @param kbEntryId - FAQ entry ID
1093
+ * @returns FAQ entry suitable for preview
1094
+ */
1095
+ public async getPreviewFaqEntryAsync(kbEntryId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PreviewFaqEntry >;
1096
+
1097
+ public async getPreviewFaqEntryAsync(kbEntryId:number|carriers.CustomerService_GetPreviewFaqEntryRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PreviewFaqEntry > {
1098
+ let _request : carriers.CustomerService_GetPreviewFaqEntryRequest = null;
1099
+ let _options : base.WebApiRequestOptions = null;
1100
+ const first : any = kbEntryId;
1101
+ if( typeof( first ) === "object" && first && ( typeof(first.kbEntryId)!='undefined' ) )
1102
+ {
1103
+ _request = kbEntryId as carriers.CustomerService_GetPreviewFaqEntryRequest;
1104
+ _options = webapi_options as base.WebApiRequestOptions;
1105
+ }
1106
+ else
1107
+ {
1108
+ _request = {
1109
+ kbEntryId: kbEntryId as number,
1110
+ };
1111
+ _options = webapi_options;
1112
+ }
1113
+ return this._getPreviewFaqEntryAsync( _request, _options );
1114
+ }
1115
+
1116
+
1117
+ private async _getPreviewQuickReplyAsync(request: carriers.CustomerService_GetPreviewQuickReplyRequest, options?:base.WebApiRequestOptions) : Promise< carriers.PreviewQuickReply > {
1118
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1119
+ base.WebApiBase.SetPending(options);
1120
+ return new Promise< carriers.PreviewQuickReply >(async (resolve, reject) => {
1121
+ try {
1122
+ config.baseURL = this._options.baseUrl;
1123
+ const response = await this._axios.post("GetPreviewQuickReply", request , config);
1124
+ base.WebApiBase.SetCompleted(options);
1125
+ const res : carriers.PreviewQuickReply = converters.Create_PreviewQuickReply_From( response.data );
1126
+ resolve(res);
1127
+ }
1128
+ catch( err ) {
1129
+ base.WebApiBase.HandleError(options, config, err);
1130
+ reject(err);
1131
+ }
1132
+ });
1133
+ }
1134
+
1135
+
1136
+
1137
+ /**
1138
+ * Get a quick reply from its quick reply id
1139
+ * @param request - QuickReplyId
1140
+ * @returns Quick reply suitable for preview
1141
+ */
1142
+ public async getPreviewQuickReplyAsync(request: carriers.CustomerService_GetPreviewQuickReplyRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PreviewQuickReply >;
1143
+
1144
+ /**
1145
+ * Get a quick reply from its quick reply id
1146
+ * @param quickReplyId - Quick reply ID
1147
+ * @returns Quick reply suitable for preview
1148
+ */
1149
+ public async getPreviewQuickReplyAsync(quickReplyId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PreviewQuickReply >;
1150
+
1151
+ public async getPreviewQuickReplyAsync(quickReplyId:number|carriers.CustomerService_GetPreviewQuickReplyRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PreviewQuickReply > {
1152
+ let _request : carriers.CustomerService_GetPreviewQuickReplyRequest = null;
1153
+ let _options : base.WebApiRequestOptions = null;
1154
+ const first : any = quickReplyId;
1155
+ if( typeof( first ) === "object" && first && ( typeof(first.quickReplyId)!='undefined' ) )
1156
+ {
1157
+ _request = quickReplyId as carriers.CustomerService_GetPreviewQuickReplyRequest;
1158
+ _options = webapi_options as base.WebApiRequestOptions;
1159
+ }
1160
+ else
1161
+ {
1162
+ _request = {
1163
+ quickReplyId: quickReplyId as number,
1164
+ };
1165
+ _options = webapi_options;
1166
+ }
1167
+ return this._getPreviewQuickReplyAsync( _request, _options );
1168
+ }
1169
+
1170
+
1171
+ private async _getPreviewReplyTemplateAsync(request: carriers.CustomerService_GetPreviewReplyTemplateRequest, options?:base.WebApiRequestOptions) : Promise< carriers.PreviewReplyTemplate > {
1172
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1173
+ base.WebApiBase.SetPending(options);
1174
+ return new Promise< carriers.PreviewReplyTemplate >(async (resolve, reject) => {
1175
+ try {
1176
+ config.baseURL = this._options.baseUrl;
1177
+ const response = await this._axios.post("GetPreviewReplyTemplate", request , config);
1178
+ base.WebApiBase.SetCompleted(options);
1179
+ const res : carriers.PreviewReplyTemplate = converters.Create_PreviewReplyTemplate_From( response.data );
1180
+ resolve(res);
1181
+ }
1182
+ catch( err ) {
1183
+ base.WebApiBase.HandleError(options, config, err);
1184
+ reject(err);
1185
+ }
1186
+ });
1187
+ }
1188
+
1189
+
1190
+
1191
+ /**
1192
+ * Get a reply template from its reply template id
1193
+ * @param request - ReplyTemplateId
1194
+ * @returns Reply template suitable for preview
1195
+ */
1196
+ public async getPreviewReplyTemplateAsync(request: carriers.CustomerService_GetPreviewReplyTemplateRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PreviewReplyTemplate >;
1197
+
1198
+ /**
1199
+ * Get a reply template from its reply template id
1200
+ * @param replyTemplateId - Reply template ID
1201
+ * @returns Reply template suitable for preview
1202
+ */
1203
+ public async getPreviewReplyTemplateAsync(replyTemplateId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PreviewReplyTemplate >;
1204
+
1205
+ public async getPreviewReplyTemplateAsync(replyTemplateId:number|carriers.CustomerService_GetPreviewReplyTemplateRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PreviewReplyTemplate > {
1206
+ let _request : carriers.CustomerService_GetPreviewReplyTemplateRequest = null;
1207
+ let _options : base.WebApiRequestOptions = null;
1208
+ const first : any = replyTemplateId;
1209
+ if( typeof( first ) === "object" && first && ( typeof(first.replyTemplateId)!='undefined' ) )
1210
+ {
1211
+ _request = replyTemplateId as carriers.CustomerService_GetPreviewReplyTemplateRequest;
1212
+ _options = webapi_options as base.WebApiRequestOptions;
1213
+ }
1214
+ else
1215
+ {
1216
+ _request = {
1217
+ replyTemplateId: replyTemplateId as number,
1218
+ };
1219
+ _options = webapi_options;
1220
+ }
1221
+ return this._getPreviewReplyTemplateAsync( _request, _options );
1222
+ }
1223
+
1224
+
1225
+ private async _getParsedTemplateAsync(request: carriers.CustomerService_GetParsedTemplateRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ReplyTemplateParsed > {
1226
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1227
+ base.WebApiBase.SetPending(options);
1228
+ return new Promise< carriers.ReplyTemplateParsed >(async (resolve, reject) => {
1229
+ try {
1230
+ config.baseURL = this._options.baseUrl;
1231
+ const response = await this._axios.post("GetParsedTemplate", request , config);
1232
+ base.WebApiBase.SetCompleted(options);
1233
+ const res : carriers.ReplyTemplateParsed = converters.Create_ReplyTemplateParsed_From( response.data );
1234
+ resolve(res);
1235
+ }
1236
+ catch( err ) {
1237
+ base.WebApiBase.HandleError(options, config, err);
1238
+ reject(err);
1239
+ }
1240
+ });
1241
+ }
1242
+
1243
+
1244
+
1245
+ /**
1246
+ * Get a specific langauge version of the reply template, and run this trough the parser
1247
+ * @param request - ReplyTemplateId, LanguageId, PersonId, TicketId
1248
+ * @returns The parsed reply template
1249
+ */
1250
+ public async getParsedTemplateAsync(request: carriers.CustomerService_GetParsedTemplateRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ReplyTemplateParsed >;
1251
+
1252
+ /**
1253
+ * Get a specific langauge version of the reply template, and run this trough the parser
1254
+ * @param replyTemplateId - The id of the reply template
1255
+ * @param languageId - The language id (prefered language). If 0 is given, the language of the person will be used
1256
+ * @param personId - The id of the person that will be populated into the parser
1257
+ * @param ticketId - The id of the ticket that will be populated into the parser
1258
+ * @returns The parsed reply template
1259
+ */
1260
+ public async getParsedTemplateAsync(replyTemplateId: number, languageId: number, personId: number, ticketId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ReplyTemplateParsed >;
1261
+
1262
+ public async getParsedTemplateAsync(replyTemplateId:number|carriers.CustomerService_GetParsedTemplateRequest, languageId?:number|base.WebApiRequestOptions, personId?:number, ticketId?:number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ReplyTemplateParsed > {
1263
+ let _request : carriers.CustomerService_GetParsedTemplateRequest = null;
1264
+ let _options : base.WebApiRequestOptions = null;
1265
+ const first : any = replyTemplateId;
1266
+ if( typeof( first ) === "object" && first && ( typeof(first.replyTemplateId)!='undefined' || typeof(first.languageId)!='undefined' || typeof(first.personId)!='undefined' || typeof(first.ticketId)!='undefined' ) )
1267
+ {
1268
+ _request = replyTemplateId as carriers.CustomerService_GetParsedTemplateRequest;
1269
+ _options = languageId as base.WebApiRequestOptions;
1270
+ }
1271
+ else
1272
+ {
1273
+ _request = {
1274
+ replyTemplateId: replyTemplateId as number,
1275
+ languageId: languageId as number,
1276
+ personId: personId as number,
1277
+ ticketId: ticketId as number,
1278
+ };
1279
+ _options = webapi_options;
1280
+ }
1281
+ return this._getParsedTemplateAsync( _request, _options );
1282
+ }
1283
+
1284
+
1285
+ private async _getUnparsedTemplateAsync(request: carriers.CustomerService_GetUnparsedTemplateRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ReplyTemplateParsed > {
1286
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1287
+ base.WebApiBase.SetPending(options);
1288
+ return new Promise< carriers.ReplyTemplateParsed >(async (resolve, reject) => {
1289
+ try {
1290
+ config.baseURL = this._options.baseUrl;
1291
+ const response = await this._axios.post("GetUnparsedTemplate", request , config);
1292
+ base.WebApiBase.SetCompleted(options);
1293
+ const res : carriers.ReplyTemplateParsed = converters.Create_ReplyTemplateParsed_From( response.data );
1294
+ resolve(res);
1295
+ }
1296
+ catch( err ) {
1297
+ base.WebApiBase.HandleError(options, config, err);
1298
+ reject(err);
1299
+ }
1300
+ });
1301
+ }
1302
+
1303
+
1304
+
1305
+ /**
1306
+ * Get a specific langauge version of the reply template. No parsing is performed.
1307
+ * @param request - ReplyTemplateId, LanguageId
1308
+ * @returns The unparsed reply template, but using the same return data structure
1309
+ */
1310
+ public async getUnparsedTemplateAsync(request: carriers.CustomerService_GetUnparsedTemplateRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ReplyTemplateParsed >;
1311
+
1312
+ /**
1313
+ * Get a specific langauge version of the reply template. No parsing is performed.
1314
+ * @param replyTemplateId - The id of the reply template
1315
+ * @param languageId - The language id (prefered language). If 0 is given, the language of the person will be used
1316
+ * @returns The unparsed reply template, but using the same return data structure
1317
+ */
1318
+ public async getUnparsedTemplateAsync(replyTemplateId: number, languageId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ReplyTemplateParsed >;
1319
+
1320
+ public async getUnparsedTemplateAsync(replyTemplateId:number|carriers.CustomerService_GetUnparsedTemplateRequest, languageId?:number|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ReplyTemplateParsed > {
1321
+ let _request : carriers.CustomerService_GetUnparsedTemplateRequest = null;
1322
+ let _options : base.WebApiRequestOptions = null;
1323
+ const first : any = replyTemplateId;
1324
+ if( typeof( first ) === "object" && first && ( typeof(first.replyTemplateId)!='undefined' || typeof(first.languageId)!='undefined' ) )
1325
+ {
1326
+ _request = replyTemplateId as carriers.CustomerService_GetUnparsedTemplateRequest;
1327
+ _options = languageId as base.WebApiRequestOptions;
1328
+ }
1329
+ else
1330
+ {
1331
+ _request = {
1332
+ replyTemplateId: replyTemplateId as number,
1333
+ languageId: languageId as number,
1334
+ };
1335
+ _options = webapi_options;
1336
+ }
1337
+ return this._getUnparsedTemplateAsync( _request, _options );
1338
+ }
1339
+
1340
+
1341
+ private async _getSmsConfigAsync( options?:base.WebApiRequestOptions) : Promise< carriers.SmsConfig > {
1342
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1343
+ base.WebApiBase.SetPending(options);
1344
+ return new Promise< carriers.SmsConfig >(async (resolve, reject) => {
1345
+ try {
1346
+ config.baseURL = this._options.baseUrl;
1347
+ const response = await this._axios.post("GetSmsConfig", undefined , config);
1348
+ base.WebApiBase.SetCompleted(options);
1349
+ const res : carriers.SmsConfig = converters.Create_SmsConfig_From( response.data );
1350
+ resolve(res);
1351
+ }
1352
+ catch( err ) {
1353
+ base.WebApiBase.HandleError(options, config, err);
1354
+ reject(err);
1355
+ }
1356
+ });
1357
+ }
1358
+
1359
+
1360
+ /**
1361
+ * Get the SmsConfig settings for Customer Service sms providers.
1362
+ * @returns Current SMS configuration.
1363
+ */
1364
+ public async getSmsConfigAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SmsConfig >
1365
+ {
1366
+ return this._getSmsConfigAsync(webapi_options);
1367
+ }
1368
+
1369
+
1370
+ private async _testSmtpServerAsync(request: carriers.CustomerService_TestSmtpServerRequest, options?:base.WebApiRequestOptions) : Promise< carriers.SmtpTestResult > {
1371
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1372
+ base.WebApiBase.SetPending(options);
1373
+ return new Promise< carriers.SmtpTestResult >(async (resolve, reject) => {
1374
+ try {
1375
+ config.baseURL = this._options.baseUrl;
1376
+ const response = await this._axios.post("TestSmtpServer", request , config);
1377
+ base.WebApiBase.SetCompleted(options);
1378
+ const res : carriers.SmtpTestResult = converters.Create_SmtpTestResult_From( response.data );
1379
+ resolve(res);
1380
+ }
1381
+ catch( err ) {
1382
+ base.WebApiBase.HandleError(options, config, err);
1383
+ reject(err);
1384
+ }
1385
+ });
1386
+ }
1387
+
1388
+
1389
+
1390
+ /**
1391
+ * This method will do a test of a SMTP account, by sending an email to a special @superoffice.com account
1392
+ * @param request - SmtpUri, From, UseStoredPassword
1393
+ * @returns Contains the result of the test
1394
+ */
1395
+ public async testSmtpServerAsync(request: carriers.CustomerService_TestSmtpServerRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SmtpTestResult >;
1396
+
1397
+ /**
1398
+ * This method will do a test of a SMTP account, by sending an email to a special @superoffice.com account
1399
+ * @param smtpUri - An URI containing information to connect to the SMTP server, eg. smtps://myuser:mypassword@smtp.myserver.com:465. Note that username and password must be url encoded
1400
+ * @param from - The from-address used in the test
1401
+ * @param useStoredPassword - Use database persisted password
1402
+ * @returns Contains the result of the test
1403
+ */
1404
+ public async testSmtpServerAsync(smtpUri: string, from: string, useStoredPassword: boolean, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SmtpTestResult >;
1405
+
1406
+ public async testSmtpServerAsync(smtpUri:string|carriers.CustomerService_TestSmtpServerRequest, from?:string|base.WebApiRequestOptions, useStoredPassword?:boolean, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SmtpTestResult > {
1407
+ let _request : carriers.CustomerService_TestSmtpServerRequest = null;
1408
+ let _options : base.WebApiRequestOptions = null;
1409
+ const first : any = smtpUri;
1410
+ if( typeof( first ) === "object" && first && ( typeof(first.smtpUri)!='undefined' || typeof(first.from)!='undefined' || typeof(first.useStoredPassword)!='undefined' ) )
1411
+ {
1412
+ _request = smtpUri as carriers.CustomerService_TestSmtpServerRequest;
1413
+ _options = from as base.WebApiRequestOptions;
1414
+ }
1415
+ else
1416
+ {
1417
+ _request = {
1418
+ smtpUri: smtpUri as string,
1419
+ from: from as string,
1420
+ useStoredPassword: useStoredPassword as boolean,
1421
+ };
1422
+ _options = webapi_options;
1423
+ }
1424
+ return this._testSmtpServerAsync( _request, _options );
1425
+ }
1426
+
1427
+
1428
+ private async _getStatisticsAsync(request: carriers.CustomerService_GetStatisticsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.StatisticsDataSet[] > {
1429
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1430
+ base.WebApiBase.SetPending(options);
1431
+ return new Promise< carriers.StatisticsDataSet[] >(async (resolve, reject) => {
1432
+ try {
1433
+ config.baseURL = this._options.baseUrl;
1434
+ const response = await this._axios.post("GetStatistics", request , config);
1435
+ base.WebApiBase.SetCompleted(options);
1436
+ const res : carriers.StatisticsDataSet[] = converters.Create_StatisticsDataSetArray_From( response.data );
1437
+ resolve(res);
1438
+ }
1439
+ catch( err ) {
1440
+ base.WebApiBase.HandleError(options, config, err);
1441
+ reject(err);
1442
+ }
1443
+ });
1444
+ }
1445
+
1446
+
1447
+
1448
+ /**
1449
+ * Returns the calculated results for the required statistics for the Customer Service Status Page
1450
+ * @param request - Functions
1451
+ * @returns Array of StatisticsDataSet
1452
+ */
1453
+ public async getStatisticsAsync(request: carriers.CustomerService_GetStatisticsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.StatisticsDataSet[] >;
1454
+
1455
+ /**
1456
+ * Returns the calculated results for the required statistics for the Customer Service Status Page
1457
+ * @param functions - List of functions to calculate and return
1458
+ * @returns Array of StatisticsDataSet
1459
+ */
1460
+ public async getStatisticsAsync(functions: enums.StatusScreenPanelType[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.StatisticsDataSet[] >;
1461
+
1462
+ public async getStatisticsAsync(functions:enums.StatusScreenPanelType[]|carriers.CustomerService_GetStatisticsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.StatisticsDataSet[] > {
1463
+ let _request : carriers.CustomerService_GetStatisticsRequest = null;
1464
+ let _options : base.WebApiRequestOptions = null;
1465
+ const first : any = functions;
1466
+ if( typeof( first ) === "object" && first && ( typeof(first.functions)!='undefined' ) )
1467
+ {
1468
+ _request = functions as carriers.CustomerService_GetStatisticsRequest;
1469
+ _options = webapi_options as base.WebApiRequestOptions;
1470
+ }
1471
+ else
1472
+ {
1473
+ _request = {
1474
+ functions: functions as enums.StatusScreenPanelType[],
1475
+ };
1476
+ _options = webapi_options;
1477
+ }
1478
+ return this._getStatisticsAsync( _request, _options );
1479
+ }
1480
+
1481
+
1482
+ private async _getSystemTemplateSettingsAsync( options?:base.WebApiRequestOptions) : Promise< carriers.SystemTemplateSettings > {
1483
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1484
+ base.WebApiBase.SetPending(options);
1485
+ return new Promise< carriers.SystemTemplateSettings >(async (resolve, reject) => {
1486
+ try {
1487
+ config.baseURL = this._options.baseUrl;
1488
+ const response = await this._axios.post("GetSystemTemplateSettings", undefined , config);
1489
+ base.WebApiBase.SetCompleted(options);
1490
+ const res : carriers.SystemTemplateSettings = converters.Create_SystemTemplateSettings_From( response.data );
1491
+ resolve(res);
1492
+ }
1493
+ catch( err ) {
1494
+ base.WebApiBase.HandleError(options, config, err);
1495
+ reject(err);
1496
+ }
1497
+ });
1498
+ }
1499
+
1500
+
1501
+ /**
1502
+ * Returns system template settings
1503
+ * @returns System template settings item
1504
+ */
1505
+ public async getSystemTemplateSettingsAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SystemTemplateSettings >
1506
+ {
1507
+ return this._getSystemTemplateSettingsAsync(webapi_options);
1508
+ }
1509
+
1510
+
1511
+ private async _saveSystemTemplateSettingsAsync(request: carriers.CustomerService_SaveSystemTemplateSettingsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.SystemTemplateSettings > {
1512
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1513
+ base.WebApiBase.SetPending(options);
1514
+ return new Promise< carriers.SystemTemplateSettings >(async (resolve, reject) => {
1515
+ try {
1516
+ config.baseURL = this._options.baseUrl;
1517
+ const response = await this._axios.post("SaveSystemTemplateSettings", request , config);
1518
+ base.WebApiBase.SetCompleted(options);
1519
+ const res : carriers.SystemTemplateSettings = converters.Create_SystemTemplateSettings_From( response.data );
1520
+ resolve(res);
1521
+ }
1522
+ catch( err ) {
1523
+ base.WebApiBase.HandleError(options, config, err);
1524
+ reject(err);
1525
+ }
1526
+ });
1527
+ }
1528
+
1529
+
1530
+
1531
+ /**
1532
+ * Saves and validates updated system templates. Throws exception if validation fails
1533
+ * @param request - SystemTemplateSettings
1534
+ * @returns Updated system template settings
1535
+ */
1536
+ public async saveSystemTemplateSettingsAsync(request: carriers.CustomerService_SaveSystemTemplateSettingsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SystemTemplateSettings >;
1537
+
1538
+ /**
1539
+ * Saves and validates updated system templates. Throws exception if validation fails
1540
+ * @param systemTemplateSettings - System template settings item with updated values
1541
+ * @returns Updated system template settings
1542
+ */
1543
+ public async saveSystemTemplateSettingsAsync(systemTemplateSettings: carriers.SystemTemplateSettings, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SystemTemplateSettings >;
1544
+
1545
+ public async saveSystemTemplateSettingsAsync(systemTemplateSettings:carriers.SystemTemplateSettings|carriers.CustomerService_SaveSystemTemplateSettingsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SystemTemplateSettings > {
1546
+ let _request : carriers.CustomerService_SaveSystemTemplateSettingsRequest = null;
1547
+ let _options : base.WebApiRequestOptions = null;
1548
+ const first : any = systemTemplateSettings;
1549
+ if( typeof( first ) === "object" && first && ( typeof(first.systemTemplateSettings)!='undefined' ) )
1550
+ {
1551
+ _request = systemTemplateSettings as carriers.CustomerService_SaveSystemTemplateSettingsRequest;
1552
+ _options = webapi_options as base.WebApiRequestOptions;
1553
+ }
1554
+ else
1555
+ {
1556
+ _request = {
1557
+ systemTemplateSettings: systemTemplateSettings as carriers.SystemTemplateSettings,
1558
+ };
1559
+ _options = webapi_options;
1560
+ }
1561
+ return this._saveSystemTemplateSettingsAsync( _request, _options );
1562
+ }
1563
+
1564
+
1565
+ private async _createTicketFromMailDataAsync(request: carriers.CustomerService_CreateTicketFromMailDataRequest, options?:base.WebApiRequestOptions) : Promise< carriers.TicketInfo > {
1566
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1567
+ base.WebApiBase.SetPending(options);
1568
+ return new Promise< carriers.TicketInfo >(async (resolve, reject) => {
1569
+ try {
1570
+ config.baseURL = this._options.baseUrl;
1571
+ const response = await this._axios.post("CreateTicketFromMailData", request , config);
1572
+ base.WebApiBase.SetCompleted(options);
1573
+ const res : carriers.TicketInfo = converters.Create_TicketInfo_From( response.data );
1574
+ resolve(res);
1575
+ }
1576
+ catch( err ) {
1577
+ base.WebApiBase.HandleError(options, config, err);
1578
+ reject(err);
1579
+ }
1580
+ });
1581
+ }
1582
+
1583
+
1584
+
1585
+ /**
1586
+ * This method create a new ticket in the same way as importMail would import an email. It accepts RFC822 formatted data
1587
+ * @param request - MailboxId, Data
1588
+ * @returns An object containing some meta data for the created ticket
1589
+ */
1590
+ public async createTicketFromMailDataAsync(request: carriers.CustomerService_CreateTicketFromMailDataRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketInfo >;
1591
+
1592
+ /**
1593
+ * This method create a new ticket in the same way as importMail would import an email. It accepts RFC822 formatted data
1594
+ * @param mailboxId - The id of the Service mailbox
1595
+ * @param data - RFC822 formatted data to import as a ticket
1596
+ * @returns An object containing some meta data for the created ticket
1597
+ */
1598
+ public async createTicketFromMailDataAsync(mailboxId: number, data: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketInfo >;
1599
+
1600
+ public async createTicketFromMailDataAsync(mailboxId:number|carriers.CustomerService_CreateTicketFromMailDataRequest, data?:string|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketInfo > {
1601
+ let _request : carriers.CustomerService_CreateTicketFromMailDataRequest = null;
1602
+ let _options : base.WebApiRequestOptions = null;
1603
+ const first : any = mailboxId;
1604
+ if( typeof( first ) === "object" && first && ( typeof(first.mailboxId)!='undefined' || typeof(first.data)!='undefined' ) )
1605
+ {
1606
+ _request = mailboxId as carriers.CustomerService_CreateTicketFromMailDataRequest;
1607
+ _options = data as base.WebApiRequestOptions;
1608
+ }
1609
+ else
1610
+ {
1611
+ _request = {
1612
+ mailboxId: mailboxId as number,
1613
+ data: data as string,
1614
+ };
1615
+ _options = webapi_options;
1616
+ }
1617
+ return this._createTicketFromMailDataAsync( _request, _options );
1618
+ }
1619
+
1620
+
1621
+ private async _addMessageFromMailDataAsync(request: carriers.CustomerService_AddMessageFromMailDataRequest, options?:base.WebApiRequestOptions) : Promise< carriers.TicketInfo > {
1622
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1623
+ base.WebApiBase.SetPending(options);
1624
+ return new Promise< carriers.TicketInfo >(async (resolve, reject) => {
1625
+ try {
1626
+ config.baseURL = this._options.baseUrl;
1627
+ const response = await this._axios.post("AddMessageFromMailData", request , config);
1628
+ base.WebApiBase.SetCompleted(options);
1629
+ const res : carriers.TicketInfo = converters.Create_TicketInfo_From( response.data );
1630
+ resolve(res);
1631
+ }
1632
+ catch( err ) {
1633
+ base.WebApiBase.HandleError(options, config, err);
1634
+ reject(err);
1635
+ }
1636
+ });
1637
+ }
1638
+
1639
+
1640
+
1641
+ /**
1642
+ * This method will add a message to an existing request in the sam way as importMail would do it from an email. It accepts RFC822 formatted data
1643
+ * @param request - TicketId, Data
1644
+ * @returns An object containing some meta data for the ticket
1645
+ */
1646
+ public async addMessageFromMailDataAsync(request: carriers.CustomerService_AddMessageFromMailDataRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketInfo >;
1647
+
1648
+ /**
1649
+ * This method will add a message to an existing request in the sam way as importMail would do it from an email. It accepts RFC822 formatted data
1650
+ * @param ticketId - The id of the ticket to add a message
1651
+ * @param data - RFC822 formatted data to import as a message
1652
+ * @returns An object containing some meta data for the ticket
1653
+ */
1654
+ public async addMessageFromMailDataAsync(ticketId: number, data: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketInfo >;
1655
+
1656
+ public async addMessageFromMailDataAsync(ticketId:number|carriers.CustomerService_AddMessageFromMailDataRequest, data?:string|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketInfo > {
1657
+ let _request : carriers.CustomerService_AddMessageFromMailDataRequest = null;
1658
+ let _options : base.WebApiRequestOptions = null;
1659
+ const first : any = ticketId;
1660
+ if( typeof( first ) === "object" && first && ( typeof(first.ticketId)!='undefined' || typeof(first.data)!='undefined' ) )
1661
+ {
1662
+ _request = ticketId as carriers.CustomerService_AddMessageFromMailDataRequest;
1663
+ _options = data as base.WebApiRequestOptions;
1664
+ }
1665
+ else
1666
+ {
1667
+ _request = {
1668
+ ticketId: ticketId as number,
1669
+ data: data as string,
1670
+ };
1671
+ _options = webapi_options;
1672
+ }
1673
+ return this._addMessageFromMailDataAsync( _request, _options );
1674
+ }
1675
+
1676
+
1677
+ private async _findTicketsByTitleOrIdAsync(request: carriers.CustomerService_FindTicketsByTitleOrIdRequest, options?:base.WebApiRequestOptions) : Promise< carriers.TicketInfo[] > {
1678
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1679
+ base.WebApiBase.SetPending(options);
1680
+ return new Promise< carriers.TicketInfo[] >(async (resolve, reject) => {
1681
+ try {
1682
+ config.baseURL = this._options.baseUrl;
1683
+ const response = await this._axios.post("FindTicketsByTitleOrId", request , config);
1684
+ base.WebApiBase.SetCompleted(options);
1685
+ const res : carriers.TicketInfo[] = converters.Create_TicketInfoArray_From( response.data );
1686
+ resolve(res);
1687
+ }
1688
+ catch( err ) {
1689
+ base.WebApiBase.HandleError(options, config, err);
1690
+ reject(err);
1691
+ }
1692
+ });
1693
+ }
1694
+
1695
+
1696
+
1697
+ /**
1698
+ * This method wil search for tickets matching title or id
1699
+ * @param request - TitleOrId, MaxRows
1700
+ * @returns An array of objects containing some meta data for matching tickets
1701
+ */
1702
+ public async findTicketsByTitleOrIdAsync(request: carriers.CustomerService_FindTicketsByTitleOrIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketInfo[] >;
1703
+
1704
+ /**
1705
+ * This method wil search for tickets matching title or id
1706
+ * @param titleOrId - The search string. If this is a number, it will also search for a matching ticket id
1707
+ * @param maxRows - The maximum number of rows to be returned
1708
+ * @returns An array of objects containing some meta data for matching tickets
1709
+ */
1710
+ public async findTicketsByTitleOrIdAsync(titleOrId: string, maxRows: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketInfo[] >;
1711
+
1712
+ public async findTicketsByTitleOrIdAsync(titleOrId:string|carriers.CustomerService_FindTicketsByTitleOrIdRequest, maxRows?:number|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketInfo[] > {
1713
+ let _request : carriers.CustomerService_FindTicketsByTitleOrIdRequest = null;
1714
+ let _options : base.WebApiRequestOptions = null;
1715
+ const first : any = titleOrId;
1716
+ if( typeof( first ) === "object" && first && ( typeof(first.titleOrId)!='undefined' || typeof(first.maxRows)!='undefined' ) )
1717
+ {
1718
+ _request = titleOrId as carriers.CustomerService_FindTicketsByTitleOrIdRequest;
1719
+ _options = maxRows as base.WebApiRequestOptions;
1720
+ }
1721
+ else
1722
+ {
1723
+ _request = {
1724
+ titleOrId: titleOrId as string,
1725
+ maxRows: maxRows as number,
1726
+ };
1727
+ _options = webapi_options;
1728
+ }
1729
+ return this._findTicketsByTitleOrIdAsync( _request, _options );
1730
+ }
1731
+
1732
+ } // class v1CustomerServiceAgentController
1733
+
1734
+