@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,858 @@
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/ViewStateAgent.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
+ * User interface view state, history, currentXXX values
28
+ */
29
+ export interface IViewStateAgent {
30
+ getLiveUiConfigAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.LiveUiConfig >;
31
+ getHistoryAsync(historyId: number) : Promise< carriers.History >;
32
+ getCurrentAsync(request: carriers.ViewState_GetCurrentRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History >;
33
+ getCurrentAsync(historyName: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History >;
34
+ saveCurrentAsync(request: carriers.ViewState_SaveCurrentRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History >;
35
+ saveCurrentAsync(current: carriers.History, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History >;
36
+ getNextCurrentAsync(request: carriers.ViewState_GetNextCurrentRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History >;
37
+ getNextCurrentAsync(historyName: string, id: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History >;
38
+ getPreviousCurrentAsync(request: carriers.ViewState_GetPreviousCurrentRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History >;
39
+ getPreviousCurrentAsync(historyName: string, id: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History >;
40
+ deleteHistoryAsync(request: carriers.ViewState_DeleteHistoryRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
41
+ deleteHistoryAsync(historyName: string, id: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
42
+ getHistoriesAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History[] >;
43
+ getHistoriesByNameAsync(request: carriers.ViewState_GetHistoriesByNameRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History[] >;
44
+ getHistoriesByNameAsync(historyName: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History[] >;
45
+ getHistoriesByNamesAsync(request: carriers.ViewState_GetHistoriesByNamesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History[] >;
46
+ getHistoriesByNamesAsync(historyNames: string[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History[] >;
47
+ saveHistoriesAsync(request: carriers.ViewState_SaveHistoriesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History[] >;
48
+ saveHistoriesAsync(historyName: string, history: carriers.History[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History[] >;
49
+ getHistoryLengthPrefValueAsync(webapi_options?:base.WebApiRequestOptions) : Promise< number >;
50
+ setHistoryLengthPrefValueAsync(request: carriers.ViewState_SetHistoryLengthPrefValueRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
51
+ setHistoryLengthPrefValueAsync(length: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
52
+ saveCurrentsAsync(request: carriers.ViewState_SaveCurrentsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History[] >;
53
+ saveCurrentsAsync(currents: carriers.History[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History[] >;
54
+ getHistoriesByNamesAndIdsAsync(request: carriers.ViewState_GetHistoriesByNamesAndIdsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History[] >;
55
+ getHistoriesByNamesAndIdsAsync(requests: carriers.HistoryRequest[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History[] >;
56
+ publishAndRetrieveUiEventsAsync(request: carriers.ViewState_PublishAndRetrieveUiEventsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UiEvent[] >;
57
+ publishAndRetrieveUiEventsAsync(latestKnownEventId: number, publishEvents: carriers.UiEvent[], metrics: carriers.MetricPair[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UiEvent[] >;
58
+ } // interface IViewStateAgent
59
+
60
+
61
+
62
+
63
+ /**
64
+ * User interface view state, history, currentXXX values
65
+ */
66
+ export class ViewStateAgent extends base.WebApiBase implements IViewStateAgent {
67
+ constructor(baseUrl?: string, languageCode?:string, cultureCode?: string);
68
+ constructor(baseUrl?: string, resourceParsing?: base.ResourceParsing);
69
+ constructor(baseUrl: string, resourceManager:any);
70
+ constructor(baseUrl: string, config:AxiosRequestConfig, resourceManager:any);
71
+ constructor(baseUrl: string, config:AxiosRequestConfig, resourceParsing?: base.ResourceParsing);
72
+ constructor(baseUrl: string, config:AxiosRequestConfig, languageCode?:string, cultureCode?: string);
73
+ constructor(options: base.WebApiOptions);
74
+
75
+ constructor(baseUrlOrOptions: string|base.WebApiOptions|undefined,
76
+ langOrconfigOrRM?: string|base.ResourceParsing|AxiosRequestConfig|any,
77
+ langOrResourceOrRM?:string|base.ResourceParsing|any,
78
+ cultureCode?: string,
79
+ ) {
80
+ const options = base.WebApiBase.FigureOutOptions(baseUrlOrOptions, langOrconfigOrRM, langOrResourceOrRM, cultureCode);
81
+ options.basePath = "v1/Agents/ViewState/";
82
+ super(options);
83
+ }
84
+
85
+
86
+
87
+ private async _getLiveUiConfigAsync( options?:base.WebApiRequestOptions) : Promise< carriers.LiveUiConfig > {
88
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
89
+ base.WebApiBase.SetPending(options);
90
+ return new Promise< carriers.LiveUiConfig >(async (resolve, reject) => {
91
+ try {
92
+ config.baseURL = this._options.baseUrl;
93
+ const response = await this._axios.post("GetLiveUiConfig", undefined , config);
94
+ base.WebApiBase.SetCompleted(options);
95
+ const res : carriers.LiveUiConfig = converters.Create_LiveUiConfig_From( response.data );
96
+ resolve(res);
97
+ }
98
+ catch( err ) {
99
+ base.WebApiBase.HandleError(options, config, err);
100
+ reject(err);
101
+ }
102
+ });
103
+ }
104
+
105
+
106
+ /**
107
+ * Gets live UI configuration
108
+ * @returns Live UI configuration containing the parameters needed for live UI functionality
109
+ */
110
+ public async getLiveUiConfigAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.LiveUiConfig >
111
+ {
112
+ return this._getLiveUiConfigAsync(webapi_options);
113
+ }
114
+
115
+ /*
116
+ * Gets a History object.
117
+ * @param historyId - The primary key.
118
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
119
+ * @returns A single History
120
+ */
121
+ public async getHistoryAsync(historyId: number, options?:base.WebApiRequestOptions) : Promise< carriers.History > {
122
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
123
+ base.WebApiBase.SetPending(options);
124
+ return new Promise< carriers.History >(async (resolve, reject) => {
125
+ try {
126
+ const response = await this._axios.post("GetHistory?historyId=" + historyId, null, config);
127
+ base.WebApiBase.SetCompleted(options);
128
+ const res = converters.Create_History_From( response.data );
129
+ resolve(res);
130
+ }
131
+ catch( err ) {
132
+ base.WebApiBase.HandleError(options, config, err);
133
+ reject(err);
134
+ }
135
+ });
136
+ }
137
+
138
+
139
+ private async _getCurrentAsync(request: carriers.ViewState_GetCurrentRequest, options?:base.WebApiRequestOptions) : Promise< carriers.History > {
140
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
141
+ base.WebApiBase.SetPending(options);
142
+ return new Promise< carriers.History >(async (resolve, reject) => {
143
+ try {
144
+ config.baseURL = this._options.baseUrl;
145
+ const response = await this._axios.post("GetCurrent", request , config);
146
+ base.WebApiBase.SetCompleted(options);
147
+ const res : carriers.History = converters.Create_History_From( response.data );
148
+ resolve(res);
149
+ }
150
+ catch( err ) {
151
+ base.WebApiBase.HandleError(options, config, err);
152
+ reject(err);
153
+ }
154
+ });
155
+ }
156
+
157
+
158
+
159
+ /**
160
+ * Get the current (most recent) value of the history list. This is the item with rank = 1. If no item exists a default value is returned. This is usually the first item in the table representing the history list.
161
+ * @param request - HistoryName
162
+ * @returns The current (most recent) history item
163
+ */
164
+ public async getCurrentAsync(request: carriers.ViewState_GetCurrentRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History >;
165
+
166
+ /**
167
+ * Get the current (most recent) value of the history list. This is the item with rank = 1. If no item exists a default value is returned. This is usually the first item in the table representing the history list.
168
+ * @param historyName - Name of the history list, e.g. contact, project
169
+ * @returns The current (most recent) history item
170
+ */
171
+ public async getCurrentAsync(historyName: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History >;
172
+
173
+ public async getCurrentAsync(historyName:string|carriers.ViewState_GetCurrentRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History > {
174
+ let _request : carriers.ViewState_GetCurrentRequest = null;
175
+ let _options : base.WebApiRequestOptions = null;
176
+ const first : any = historyName;
177
+ if( typeof( first ) === "object" && first && ( typeof(first.historyName)!='undefined' ) )
178
+ {
179
+ _request = historyName as carriers.ViewState_GetCurrentRequest;
180
+ _options = webapi_options as base.WebApiRequestOptions;
181
+ }
182
+ else
183
+ {
184
+ _request = {
185
+ historyName: historyName as string,
186
+ };
187
+ _options = webapi_options;
188
+ }
189
+ return this._getCurrentAsync( _request, _options );
190
+ }
191
+
192
+
193
+ private async _saveCurrentAsync(request: carriers.ViewState_SaveCurrentRequest, options?:base.WebApiRequestOptions) : Promise< carriers.History > {
194
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
195
+ base.WebApiBase.SetPending(options);
196
+ return new Promise< carriers.History >(async (resolve, reject) => {
197
+ try {
198
+ config.baseURL = this._options.baseUrl;
199
+ const response = await this._axios.post("SaveCurrent", request , config);
200
+ base.WebApiBase.SetCompleted(options);
201
+ const res : carriers.History = converters.Create_History_From( response.data );
202
+ resolve(res);
203
+ }
204
+ catch( err ) {
205
+ base.WebApiBase.HandleError(options, config, err);
206
+ reject(err);
207
+ }
208
+ });
209
+ }
210
+
211
+
212
+
213
+ /**
214
+ * Saving the current history item. This history item is saved with Rank = 1, and all the remaining elements rank values are shifted one down. The list is maintained with the max lenght of the History list length preference.
215
+ * @param request - Current
216
+ * @returns The current (most recent) history item
217
+ */
218
+ public async saveCurrentAsync(request: carriers.ViewState_SaveCurrentRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History >;
219
+
220
+ /**
221
+ * Saving the current history item. This history item is saved with Rank = 1, and all the remaining elements rank values are shifted one down. The list is maintained with the max lenght of the History list length preference.
222
+ * @param current - The new current history element.
223
+ * @returns The current (most recent) history item
224
+ */
225
+ public async saveCurrentAsync(current: carriers.History, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History >;
226
+
227
+ public async saveCurrentAsync(current:carriers.History|carriers.ViewState_SaveCurrentRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History > {
228
+ let _request : carriers.ViewState_SaveCurrentRequest = null;
229
+ let _options : base.WebApiRequestOptions = null;
230
+ const first : any = current;
231
+ if( typeof( first ) === "object" && first && ( typeof(first.current)!='undefined' ) )
232
+ {
233
+ _request = current as carriers.ViewState_SaveCurrentRequest;
234
+ _options = webapi_options as base.WebApiRequestOptions;
235
+ }
236
+ else
237
+ {
238
+ _request = {
239
+ current: current as carriers.History,
240
+ };
241
+ _options = webapi_options;
242
+ }
243
+ return this._saveCurrentAsync( _request, _options );
244
+ }
245
+
246
+
247
+ private async _getNextCurrentAsync(request: carriers.ViewState_GetNextCurrentRequest, options?:base.WebApiRequestOptions) : Promise< carriers.History > {
248
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
249
+ base.WebApiBase.SetPending(options);
250
+ return new Promise< carriers.History >(async (resolve, reject) => {
251
+ try {
252
+ config.baseURL = this._options.baseUrl;
253
+ const response = await this._axios.post("GetNextCurrent", request , config);
254
+ base.WebApiBase.SetCompleted(options);
255
+ const res : carriers.History = converters.Create_History_From( response.data );
256
+ resolve(res);
257
+ }
258
+ catch( err ) {
259
+ base.WebApiBase.HandleError(options, config, err);
260
+ reject(err);
261
+ }
262
+ });
263
+ }
264
+
265
+
266
+
267
+ /**
268
+ * Returns the next current item. If no item exists a default value is returned. This is usually the first item in the table representing the history list.
269
+ * @param request - HistoryName, Id
270
+ * @returns The current value.
271
+ */
272
+ public async getNextCurrentAsync(request: carriers.ViewState_GetNextCurrentRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History >;
273
+
274
+ /**
275
+ * Returns the next current item. If no item exists a default value is returned. This is usually the first item in the table representing the history list.
276
+ * @param historyName - Name of the history list, e.g. contact, project
277
+ * @param id - Id of the history element, e.g. Contact id
278
+ * @returns The current value.
279
+ */
280
+ public async getNextCurrentAsync(historyName: string, id: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History >;
281
+
282
+ public async getNextCurrentAsync(historyName:string|carriers.ViewState_GetNextCurrentRequest, id?:number|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History > {
283
+ let _request : carriers.ViewState_GetNextCurrentRequest = null;
284
+ let _options : base.WebApiRequestOptions = null;
285
+ const first : any = historyName;
286
+ if( typeof( first ) === "object" && first && ( typeof(first.historyName)!='undefined' || typeof(first.id)!='undefined' ) )
287
+ {
288
+ _request = historyName as carriers.ViewState_GetNextCurrentRequest;
289
+ _options = id as base.WebApiRequestOptions;
290
+ }
291
+ else
292
+ {
293
+ _request = {
294
+ historyName: historyName as string,
295
+ id: id as number,
296
+ };
297
+ _options = webapi_options;
298
+ }
299
+ return this._getNextCurrentAsync( _request, _options );
300
+ }
301
+
302
+
303
+ private async _getPreviousCurrentAsync(request: carriers.ViewState_GetPreviousCurrentRequest, options?:base.WebApiRequestOptions) : Promise< carriers.History > {
304
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
305
+ base.WebApiBase.SetPending(options);
306
+ return new Promise< carriers.History >(async (resolve, reject) => {
307
+ try {
308
+ config.baseURL = this._options.baseUrl;
309
+ const response = await this._axios.post("GetPreviousCurrent", request , config);
310
+ base.WebApiBase.SetCompleted(options);
311
+ const res : carriers.History = converters.Create_History_From( response.data );
312
+ resolve(res);
313
+ }
314
+ catch( err ) {
315
+ base.WebApiBase.HandleError(options, config, err);
316
+ reject(err);
317
+ }
318
+ });
319
+ }
320
+
321
+
322
+
323
+ /**
324
+ * Returns the previous current item. If no item exists a default value is returned. This is usually the first item in the table representing the history list.
325
+ * @param request - HistoryName, Id
326
+ * @returns The current value.
327
+ */
328
+ public async getPreviousCurrentAsync(request: carriers.ViewState_GetPreviousCurrentRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History >;
329
+
330
+ /**
331
+ * Returns the previous current item. If no item exists a default value is returned. This is usually the first item in the table representing the history list.
332
+ * @param historyName - Name of the history list, e.g. contact, project
333
+ * @param id - Id of the history element, e.g. Contact id
334
+ * @returns The current value.
335
+ */
336
+ public async getPreviousCurrentAsync(historyName: string, id: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History >;
337
+
338
+ public async getPreviousCurrentAsync(historyName:string|carriers.ViewState_GetPreviousCurrentRequest, id?:number|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History > {
339
+ let _request : carriers.ViewState_GetPreviousCurrentRequest = null;
340
+ let _options : base.WebApiRequestOptions = null;
341
+ const first : any = historyName;
342
+ if( typeof( first ) === "object" && first && ( typeof(first.historyName)!='undefined' || typeof(first.id)!='undefined' ) )
343
+ {
344
+ _request = historyName as carriers.ViewState_GetPreviousCurrentRequest;
345
+ _options = id as base.WebApiRequestOptions;
346
+ }
347
+ else
348
+ {
349
+ _request = {
350
+ historyName: historyName as string,
351
+ id: id as number,
352
+ };
353
+ _options = webapi_options;
354
+ }
355
+ return this._getPreviousCurrentAsync( _request, _options );
356
+ }
357
+
358
+
359
+ private async _deleteHistoryAsync(request: carriers.ViewState_DeleteHistoryRequest, options?:base.WebApiRequestOptions) : Promise< void > {
360
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
361
+ base.WebApiBase.SetPending(options);
362
+ return new Promise< void >(async (resolve, reject) => {
363
+ try {
364
+ config.baseURL = this._options.baseUrl;
365
+ const response = await this._axios.post("DeleteHistory", request , config);
366
+ base.WebApiBase.SetCompleted(options);
367
+ const res = response.data;
368
+ resolve(res);
369
+ }
370
+ catch( err ) {
371
+ base.WebApiBase.HandleError(options, config, err);
372
+ reject(err);
373
+ }
374
+ });
375
+ }
376
+
377
+
378
+
379
+ /**
380
+ * Deletes the history element
381
+ * @param request - HistoryName, Id
382
+ * @returns
383
+ */
384
+ public async deleteHistoryAsync(request: carriers.ViewState_DeleteHistoryRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
385
+
386
+ /**
387
+ * Deletes the history element
388
+ * @param historyName - Name of the history list, e.g. contact, project
389
+ * @param id - Id of the history element, e.g. Contact id
390
+ * @returns
391
+ */
392
+ public async deleteHistoryAsync(historyName: string, id: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
393
+
394
+ public async deleteHistoryAsync(historyName:string|carriers.ViewState_DeleteHistoryRequest, id?:number|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
395
+ let _request : carriers.ViewState_DeleteHistoryRequest = null;
396
+ let _options : base.WebApiRequestOptions = null;
397
+ const first : any = historyName;
398
+ if( typeof( first ) === "object" && first && ( typeof(first.historyName)!='undefined' || typeof(first.id)!='undefined' ) )
399
+ {
400
+ _request = historyName as carriers.ViewState_DeleteHistoryRequest;
401
+ _options = id as base.WebApiRequestOptions;
402
+ }
403
+ else
404
+ {
405
+ _request = {
406
+ historyName: historyName as string,
407
+ id: id as number,
408
+ };
409
+ _options = webapi_options;
410
+ }
411
+ return this._deleteHistoryAsync( _request, _options );
412
+ }
413
+
414
+
415
+ private async _getHistoriesAsync( options?:base.WebApiRequestOptions) : Promise< carriers.History[] > {
416
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
417
+ base.WebApiBase.SetPending(options);
418
+ return new Promise< carriers.History[] >(async (resolve, reject) => {
419
+ try {
420
+ config.baseURL = this._options.baseUrl;
421
+ const response = await this._axios.post("GetHistories", undefined , config);
422
+ base.WebApiBase.SetCompleted(options);
423
+ const res : carriers.History[] = converters.Create_HistoryArray_From( response.data );
424
+ resolve(res);
425
+ }
426
+ catch( err ) {
427
+ base.WebApiBase.HandleError(options, config, err);
428
+ reject(err);
429
+ }
430
+ });
431
+ }
432
+
433
+
434
+ /**
435
+ * Returns all history items that belong to the currently logged in user
436
+ * @returns Array of History items
437
+ */
438
+ public async getHistoriesAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History[] >
439
+ {
440
+ return this._getHistoriesAsync(webapi_options);
441
+ }
442
+
443
+
444
+ private async _getHistoriesByNameAsync(request: carriers.ViewState_GetHistoriesByNameRequest, options?:base.WebApiRequestOptions) : Promise< carriers.History[] > {
445
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
446
+ base.WebApiBase.SetPending(options);
447
+ return new Promise< carriers.History[] >(async (resolve, reject) => {
448
+ try {
449
+ config.baseURL = this._options.baseUrl;
450
+ const response = await this._axios.post("GetHistoriesByName", request , config);
451
+ base.WebApiBase.SetCompleted(options);
452
+ const res : carriers.History[] = converters.Create_HistoryArray_From( response.data );
453
+ resolve(res);
454
+ }
455
+ catch( err ) {
456
+ base.WebApiBase.HandleError(options, config, err);
457
+ reject(err);
458
+ }
459
+ });
460
+ }
461
+
462
+
463
+
464
+ /**
465
+ * Returns the named history list that belong to the currently logged in user
466
+ * @param request - HistoryName
467
+ * @returns Array of History items
468
+ */
469
+ public async getHistoriesByNameAsync(request: carriers.ViewState_GetHistoriesByNameRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History[] >;
470
+
471
+ /**
472
+ * Returns the named history list that belong to the currently logged in user
473
+ * @param historyName - Name of the history list
474
+ * @returns Array of History items
475
+ */
476
+ public async getHistoriesByNameAsync(historyName: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History[] >;
477
+
478
+ public async getHistoriesByNameAsync(historyName:string|carriers.ViewState_GetHistoriesByNameRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History[] > {
479
+ let _request : carriers.ViewState_GetHistoriesByNameRequest = null;
480
+ let _options : base.WebApiRequestOptions = null;
481
+ const first : any = historyName;
482
+ if( typeof( first ) === "object" && first && ( typeof(first.historyName)!='undefined' ) )
483
+ {
484
+ _request = historyName as carriers.ViewState_GetHistoriesByNameRequest;
485
+ _options = webapi_options as base.WebApiRequestOptions;
486
+ }
487
+ else
488
+ {
489
+ _request = {
490
+ historyName: historyName as string,
491
+ };
492
+ _options = webapi_options;
493
+ }
494
+ return this._getHistoriesByNameAsync( _request, _options );
495
+ }
496
+
497
+
498
+ private async _getHistoriesByNamesAsync(request: carriers.ViewState_GetHistoriesByNamesRequest, options?:base.WebApiRequestOptions) : Promise< carriers.History[] > {
499
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
500
+ base.WebApiBase.SetPending(options);
501
+ return new Promise< carriers.History[] >(async (resolve, reject) => {
502
+ try {
503
+ config.baseURL = this._options.baseUrl;
504
+ const response = await this._axios.post("GetHistoriesByNames", request , config);
505
+ base.WebApiBase.SetCompleted(options);
506
+ const res : carriers.History[] = converters.Create_HistoryArray_From( response.data );
507
+ resolve(res);
508
+ }
509
+ catch( err ) {
510
+ base.WebApiBase.HandleError(options, config, err);
511
+ reject(err);
512
+ }
513
+ });
514
+ }
515
+
516
+
517
+
518
+ /**
519
+ * Returns the named history lists that belong to the currently logged in user
520
+ * @param request - HistoryNames
521
+ * @returns Array of History items
522
+ */
523
+ public async getHistoriesByNamesAsync(request: carriers.ViewState_GetHistoriesByNamesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History[] >;
524
+
525
+ /**
526
+ * Returns the named history lists that belong to the currently logged in user
527
+ * @param historyNames - String array of list names
528
+ * @returns Array of History items
529
+ */
530
+ public async getHistoriesByNamesAsync(historyNames: string[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History[] >;
531
+
532
+ public async getHistoriesByNamesAsync(historyNames:string[]|carriers.ViewState_GetHistoriesByNamesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History[] > {
533
+ let _request : carriers.ViewState_GetHistoriesByNamesRequest = null;
534
+ let _options : base.WebApiRequestOptions = null;
535
+ const first : any = historyNames;
536
+ if( typeof( first ) === "object" && first && ( typeof(first.historyNames)!='undefined' ) )
537
+ {
538
+ _request = historyNames as carriers.ViewState_GetHistoriesByNamesRequest;
539
+ _options = webapi_options as base.WebApiRequestOptions;
540
+ }
541
+ else
542
+ {
543
+ _request = {
544
+ historyNames: historyNames as string[],
545
+ };
546
+ _options = webapi_options;
547
+ }
548
+ return this._getHistoriesByNamesAsync( _request, _options );
549
+ }
550
+
551
+
552
+ private async _saveHistoriesAsync(request: carriers.ViewState_SaveHistoriesRequest, options?:base.WebApiRequestOptions) : Promise< carriers.History[] > {
553
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
554
+ base.WebApiBase.SetPending(options);
555
+ return new Promise< carriers.History[] >(async (resolve, reject) => {
556
+ try {
557
+ config.baseURL = this._options.baseUrl;
558
+ const response = await this._axios.post("SaveHistories", request , config);
559
+ base.WebApiBase.SetCompleted(options);
560
+ const res : carriers.History[] = converters.Create_HistoryArray_From( response.data );
561
+ resolve(res);
562
+ }
563
+ catch( err ) {
564
+ base.WebApiBase.HandleError(options, config, err);
565
+ reject(err);
566
+ }
567
+ });
568
+ }
569
+
570
+
571
+
572
+ /**
573
+ * Replaces the existing history-list for the currently logged in user. All elements must belong to the same history list. If not they are ignored.
574
+ * @param request - HistoryName, History
575
+ * @returns Array of the saved History items
576
+ */
577
+ public async saveHistoriesAsync(request: carriers.ViewState_SaveHistoriesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History[] >;
578
+
579
+ /**
580
+ * Replaces the existing history-list for the currently logged in user. All elements must belong to the same history list. If not they are ignored.
581
+ * @param historyName -
582
+ * @param history - Array of new history items to save.
583
+ * @returns Array of the saved History items
584
+ */
585
+ public async saveHistoriesAsync(historyName: string, history: carriers.History[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History[] >;
586
+
587
+ public async saveHistoriesAsync(historyName:string|carriers.ViewState_SaveHistoriesRequest, history?:carriers.History[]|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History[] > {
588
+ let _request : carriers.ViewState_SaveHistoriesRequest = null;
589
+ let _options : base.WebApiRequestOptions = null;
590
+ const first : any = historyName;
591
+ if( typeof( first ) === "object" && first && ( typeof(first.historyName)!='undefined' || typeof(first.history)!='undefined' ) )
592
+ {
593
+ _request = historyName as carriers.ViewState_SaveHistoriesRequest;
594
+ _options = history as base.WebApiRequestOptions;
595
+ }
596
+ else
597
+ {
598
+ _request = {
599
+ historyName: historyName as string,
600
+ history: history as carriers.History[],
601
+ };
602
+ _options = webapi_options;
603
+ }
604
+ return this._saveHistoriesAsync( _request, _options );
605
+ }
606
+
607
+
608
+ private async _getHistoryLengthPrefValueAsync( options?:base.WebApiRequestOptions) : Promise< number > {
609
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
610
+ base.WebApiBase.SetPending(options);
611
+ return new Promise< number >(async (resolve, reject) => {
612
+ try {
613
+ config.baseURL = this._options.baseUrl;
614
+ const response = await this._axios.post("GetHistoryLengthPrefValue", undefined , config);
615
+ base.WebApiBase.SetCompleted(options);
616
+ const res : number = response.data as number;
617
+ resolve(res);
618
+ }
619
+ catch( err ) {
620
+ base.WebApiBase.HandleError(options, config, err);
621
+ reject(err);
622
+ }
623
+ });
624
+ }
625
+
626
+
627
+ /**
628
+ * Get the logged on user&apos;s preferred history list length. Will return the system preference if no user preferences are available.
629
+ * @returns The history list lenght
630
+ */
631
+ public async getHistoryLengthPrefValueAsync(webapi_options?:base.WebApiRequestOptions) : Promise< number >
632
+ {
633
+ return this._getHistoryLengthPrefValueAsync(webapi_options);
634
+ }
635
+
636
+
637
+ private async _setHistoryLengthPrefValueAsync(request: carriers.ViewState_SetHistoryLengthPrefValueRequest, options?:base.WebApiRequestOptions) : Promise< void > {
638
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
639
+ base.WebApiBase.SetPending(options);
640
+ return new Promise< void >(async (resolve, reject) => {
641
+ try {
642
+ config.baseURL = this._options.baseUrl;
643
+ const response = await this._axios.post("SetHistoryLengthPrefValue", request , config);
644
+ base.WebApiBase.SetCompleted(options);
645
+ const res = response.data;
646
+ resolve(res);
647
+ }
648
+ catch( err ) {
649
+ base.WebApiBase.HandleError(options, config, err);
650
+ reject(err);
651
+ }
652
+ });
653
+ }
654
+
655
+
656
+
657
+ /**
658
+ * Set the logged on user&apos;s preferred history list length.
659
+ * @param request - Length
660
+ * @returns
661
+ */
662
+ public async setHistoryLengthPrefValueAsync(request: carriers.ViewState_SetHistoryLengthPrefValueRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
663
+
664
+ /**
665
+ * Set the logged on user&apos;s preferred history list length.
666
+ * @param length - The new history list lenght
667
+ * @returns
668
+ */
669
+ public async setHistoryLengthPrefValueAsync(length: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
670
+
671
+ public async setHistoryLengthPrefValueAsync(length:number|carriers.ViewState_SetHistoryLengthPrefValueRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
672
+ let _request : carriers.ViewState_SetHistoryLengthPrefValueRequest = null;
673
+ let _options : base.WebApiRequestOptions = null;
674
+ const first : any = length;
675
+ if( typeof( first ) === "object" && first && ( typeof(first.length)!='undefined' ) )
676
+ {
677
+ _request = length as carriers.ViewState_SetHistoryLengthPrefValueRequest;
678
+ _options = webapi_options as base.WebApiRequestOptions;
679
+ }
680
+ else
681
+ {
682
+ _request = {
683
+ length: length as number,
684
+ };
685
+ _options = webapi_options;
686
+ }
687
+ return this._setHistoryLengthPrefValueAsync( _request, _options );
688
+ }
689
+
690
+
691
+ private async _saveCurrentsAsync(request: carriers.ViewState_SaveCurrentsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.History[] > {
692
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
693
+ base.WebApiBase.SetPending(options);
694
+ return new Promise< carriers.History[] >(async (resolve, reject) => {
695
+ try {
696
+ config.baseURL = this._options.baseUrl;
697
+ const response = await this._axios.post("SaveCurrents", request , config);
698
+ base.WebApiBase.SetCompleted(options);
699
+ const res : carriers.History[] = converters.Create_HistoryArray_From( response.data );
700
+ resolve(res);
701
+ }
702
+ catch( err ) {
703
+ base.WebApiBase.HandleError(options, config, err);
704
+ reject(err);
705
+ }
706
+ });
707
+ }
708
+
709
+
710
+
711
+ /**
712
+ * Saves the history elements as the current value for their respective lists. If more than one item is submitted for the same list, they are added sequently, meaning that the last one is the most current.
713
+ * @param request - Currents
714
+ * @returns Array of the saved History items
715
+ */
716
+ public async saveCurrentsAsync(request: carriers.ViewState_SaveCurrentsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History[] >;
717
+
718
+ /**
719
+ * Saves the history elements as the current value for their respective lists. If more than one item is submitted for the same list, they are added sequently, meaning that the last one is the most current.
720
+ * @param currents - Array of new history items to save.
721
+ * @returns Array of the saved History items
722
+ */
723
+ public async saveCurrentsAsync(currents: carriers.History[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History[] >;
724
+
725
+ public async saveCurrentsAsync(currents:carriers.History[]|carriers.ViewState_SaveCurrentsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History[] > {
726
+ let _request : carriers.ViewState_SaveCurrentsRequest = null;
727
+ let _options : base.WebApiRequestOptions = null;
728
+ const first : any = currents;
729
+ if( typeof( first ) === "object" && first && ( typeof(first.currents)!='undefined' ) )
730
+ {
731
+ _request = currents as carriers.ViewState_SaveCurrentsRequest;
732
+ _options = webapi_options as base.WebApiRequestOptions;
733
+ }
734
+ else
735
+ {
736
+ _request = {
737
+ currents: currents as carriers.History[],
738
+ };
739
+ _options = webapi_options;
740
+ }
741
+ return this._saveCurrentsAsync( _request, _options );
742
+ }
743
+
744
+
745
+ private async _getHistoriesByNamesAndIdsAsync(request: carriers.ViewState_GetHistoriesByNamesAndIdsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.History[] > {
746
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
747
+ base.WebApiBase.SetPending(options);
748
+ return new Promise< carriers.History[] >(async (resolve, reject) => {
749
+ try {
750
+ config.baseURL = this._options.baseUrl;
751
+ const response = await this._axios.post("GetHistoriesByNamesAndIds", request , config);
752
+ base.WebApiBase.SetCompleted(options);
753
+ const res : carriers.History[] = converters.Create_HistoryArray_From( response.data );
754
+ resolve(res);
755
+ }
756
+ catch( err ) {
757
+ base.WebApiBase.HandleError(options, config, err);
758
+ reject(err);
759
+ }
760
+ });
761
+ }
762
+
763
+
764
+
765
+ /**
766
+ * Returns history data for the named entities and the given ids - which may not directly correspond to the current history records in the database.&lt;para/&gt;Use this method if you know exactly which items you need, regardless of whether they are in the current history or not.&lt;para/&gt;The history in the database is not changed or even looked at by this method.
767
+ * @param request - Requests
768
+ * @returns On history item for each history name/id pair specified, in exactly the same order as specified.<para/>If a specified item cannot be found in the database, its Id will be 0 and its name will be blank in the return array.
769
+ */
770
+ public async getHistoriesByNamesAndIdsAsync(request: carriers.ViewState_GetHistoriesByNamesAndIdsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History[] >;
771
+
772
+ /**
773
+ * Returns history data for the named entities and the given ids - which may not directly correspond to the current history records in the database.&lt;para/&gt;Use this method if you know exactly which items you need, regardless of whether they are in the current history or not.&lt;para/&gt;The history in the database is not changed or even looked at by this method.
774
+ * @param requests - Array of request objects that define what entities we are requesting history information for
775
+ * @returns On history item for each history name/id pair specified, in exactly the same order as specified.<para/>If a specified item cannot be found in the database, its Id will be 0 and its name will be blank in the return array.
776
+ */
777
+ public async getHistoriesByNamesAndIdsAsync(requests: carriers.HistoryRequest[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History[] >;
778
+
779
+ public async getHistoriesByNamesAndIdsAsync(requests:carriers.HistoryRequest[]|carriers.ViewState_GetHistoriesByNamesAndIdsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History[] > {
780
+ let _request : carriers.ViewState_GetHistoriesByNamesAndIdsRequest = null;
781
+ let _options : base.WebApiRequestOptions = null;
782
+ const first : any = requests;
783
+ if( typeof( first ) === "object" && first && ( typeof(first.requests)!='undefined' ) )
784
+ {
785
+ _request = requests as carriers.ViewState_GetHistoriesByNamesAndIdsRequest;
786
+ _options = webapi_options as base.WebApiRequestOptions;
787
+ }
788
+ else
789
+ {
790
+ _request = {
791
+ requests: requests as carriers.HistoryRequest[],
792
+ };
793
+ _options = webapi_options;
794
+ }
795
+ return this._getHistoriesByNamesAndIdsAsync( _request, _options );
796
+ }
797
+
798
+
799
+ private async _publishAndRetrieveUiEventsAsync(request: carriers.ViewState_PublishAndRetrieveUiEventsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.UiEvent[] > {
800
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
801
+ base.WebApiBase.SetPending(options);
802
+ return new Promise< carriers.UiEvent[] >(async (resolve, reject) => {
803
+ try {
804
+ config.baseURL = this._options.baseUrl;
805
+ const response = await this._axios.post("PublishAndRetrieveUiEvents", request , config);
806
+ base.WebApiBase.SetCompleted(options);
807
+ const res : carriers.UiEvent[] = converters.Create_UiEventArray_From( response.data );
808
+ resolve(res);
809
+ }
810
+ catch( err ) {
811
+ base.WebApiBase.HandleError(options, config, err);
812
+ reject(err);
813
+ }
814
+ });
815
+ }
816
+
817
+
818
+
819
+ /**
820
+ * Publish zero or more events, and return any new events since the given event id. The initial implementation is in-memory only; applies solely to the front-end web server; and anything older than 20 minutes is discarded
821
+ * @param request - LatestKnownEventId, PublishEvents, Metrics
822
+ * @returns Array of events since the given event ID; within the time span kept by the event mechanism. Event/primarykey combinations are not guaranteed to be unique, and events in the PublishEvents parameter are echoed back to the client
823
+ */
824
+ public async publishAndRetrieveUiEventsAsync(request: carriers.ViewState_PublishAndRetrieveUiEventsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UiEvent[] >;
825
+
826
+ /**
827
+ * Publish zero or more events, and return any new events since the given event id. The initial implementation is in-memory only; applies solely to the front-end web server; and anything older than 20 minutes is discarded
828
+ * @param latestKnownEventId - The last event ID that this client knows about. The return value will be any events occurring /after/ that point, numbered by the server. Clients need to keep track themselves of this number between calls
829
+ * @param publishEvents - Array of events to publish. This can be empty if the client only wants to retrieve information
830
+ * @param metrics - Optional statistical and performance metrics collected by the frontend. Can be null or empty. Metrics are sum-accumulated and reported once a minute; please do not report the same logical event twice
831
+ * @returns Array of events since the given event ID; within the time span kept by the event mechanism. Event/primarykey combinations are not guaranteed to be unique, and events in the PublishEvents parameter are echoed back to the client
832
+ */
833
+ public async publishAndRetrieveUiEventsAsync(latestKnownEventId: number, publishEvents: carriers.UiEvent[], metrics: carriers.MetricPair[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UiEvent[] >;
834
+
835
+ public async publishAndRetrieveUiEventsAsync(latestKnownEventId:number|carriers.ViewState_PublishAndRetrieveUiEventsRequest, publishEvents?:carriers.UiEvent[]|base.WebApiRequestOptions, metrics?:carriers.MetricPair[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UiEvent[] > {
836
+ let _request : carriers.ViewState_PublishAndRetrieveUiEventsRequest = null;
837
+ let _options : base.WebApiRequestOptions = null;
838
+ const first : any = latestKnownEventId;
839
+ if( typeof( first ) === "object" && first && ( typeof(first.latestKnownEventId)!='undefined' || typeof(first.publishEvents)!='undefined' || typeof(first.metrics)!='undefined' ) )
840
+ {
841
+ _request = latestKnownEventId as carriers.ViewState_PublishAndRetrieveUiEventsRequest;
842
+ _options = publishEvents as base.WebApiRequestOptions;
843
+ }
844
+ else
845
+ {
846
+ _request = {
847
+ latestKnownEventId: latestKnownEventId as number,
848
+ publishEvents: publishEvents as carriers.UiEvent[],
849
+ metrics: metrics as carriers.MetricPair[],
850
+ };
851
+ _options = webapi_options;
852
+ }
853
+ return this._publishAndRetrieveUiEventsAsync( _request, _options );
854
+ }
855
+
856
+ } // class v1ViewStateAgentController
857
+
858
+