@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,1276 @@
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/CRMScriptAgent.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
+ * Manage and execute CRMScript functions.
28
+ *
29
+ * **Online Restricted:** This agent is not available in Online by default. Access must be requested specifically when app is registered.
30
+ */
31
+ export interface ICRMScriptAgent {
32
+ createDefaultCRMScriptEntityAsync(): Promise< carriers.CRMScriptEntity >;
33
+ saveCRMScriptEntityAsync(entity: carriers.CRMScriptEntity) : Promise< carriers.CRMScriptEntity >;
34
+ deleteCRMScriptEntityAsync(CRMScriptEntityId: number) : Promise<void>;
35
+ createDefaultTriggerScriptEntityAsync(): Promise< carriers.TriggerScriptEntity >;
36
+ saveTriggerScriptEntityAsync(entity: carriers.TriggerScriptEntity) : Promise< carriers.TriggerScriptEntity >;
37
+ deleteTriggerScriptEntityAsync(TriggerScriptEntityId: number) : Promise<void>;
38
+ getCRMScriptByUniqueIdentifierAsync(request: carriers.CRMScript_GetCRMScriptByUniqueIdentifierRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Script >;
39
+ getCRMScriptByUniqueIdentifierAsync(uniqueIdentifier: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Script >;
40
+ saveCRMScriptByUniqueIdentifierAsync(request: carriers.CRMScript_SaveCRMScriptByUniqueIdentifierRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Script >;
41
+ saveCRMScriptByUniqueIdentifierAsync(uniqueIdentifier: string, crmscript: carriers.Script, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Script >;
42
+ deleteCRMScriptByUniqueIdentifierAsync(request: carriers.CRMScript_DeleteCRMScriptByUniqueIdentifierRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
43
+ deleteCRMScriptByUniqueIdentifierAsync(uniqueIdentifier: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
44
+ getCRMScriptEntityAsync(cRMScriptEntityId: number) : Promise< carriers.CRMScriptEntity >;
45
+ executeScriptAsync(request: carriers.CRMScript_ExecuteScriptRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
46
+ executeScriptAsync(crmScriptId: number, parameters: carriers.StringDictionary, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
47
+ executeScriptByIncludeIdAsync(request: carriers.CRMScript_ExecuteScriptByIncludeIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
48
+ executeScriptByIncludeIdAsync(crmScriptIncludeId: string, parameters: carriers.StringDictionary, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
49
+ executeScriptByUniqueIdAsync(request: carriers.CRMScript_ExecuteScriptByUniqueIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
50
+ executeScriptByUniqueIdAsync(crmScriptUniqueId: string, parameters: carriers.StringDictionary, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
51
+ executeScriptAsEventAsync(request: carriers.CRMScript_ExecuteScriptAsEventRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.EventData >;
52
+ executeScriptAsEventAsync(crmScriptId: number, eventData: carriers.EventData, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.EventData >;
53
+ executeScriptAsEventByUniqueIdAsync(request: carriers.CRMScript_ExecuteScriptAsEventByUniqueIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.EventData >;
54
+ executeScriptAsEventByUniqueIdAsync(crmScriptUniqueId: string, eventData: carriers.EventData, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.EventData >;
55
+ validateScriptAsync(request: carriers.CRMScript_ValidateScriptRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptResult >;
56
+ validateScriptAsync(crmScriptId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptResult >;
57
+ validateScriptByIncludeIdAsync(request: carriers.CRMScript_ValidateScriptByIncludeIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptResult >;
58
+ validateScriptByIncludeIdAsync(crmScriptIncludeId: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptResult >;
59
+ validateScriptByUniqueIdAsync(request: carriers.CRMScript_ValidateScriptByUniqueIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptResult >;
60
+ validateScriptByUniqueIdAsync(crmScriptUniqueId: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptResult >;
61
+ executeScriptByStringAsync(request: carriers.CRMScript_ExecuteScriptByStringRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptRunResult >;
62
+ executeScriptByStringAsync(script: string, parameters: carriers.StringDictionary, eventData: carriers.EventData, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptRunResult >;
63
+ validateScriptByStringAsync(request: carriers.CRMScript_ValidateScriptByStringRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptResult >;
64
+ validateScriptByStringAsync(script: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptResult >;
65
+ getTriggerScriptEntityAsync(triggerScriptEntityId: number) : Promise< carriers.TriggerScriptEntity >;
66
+ getTriggerScriptByUniqueIdAsync(request: carriers.CRMScript_GetTriggerScriptByUniqueIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TriggerScriptEntity >;
67
+ getTriggerScriptByUniqueIdAsync(triggerScriptUniqueId: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TriggerScriptEntity >;
68
+ saveTriggerScriptByUniqueIdAsync(request: carriers.CRMScript_SaveTriggerScriptByUniqueIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TriggerScriptEntity >;
69
+ saveTriggerScriptByUniqueIdAsync(triggerScriptUniqueId: string, entity: carriers.TriggerScriptEntity, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TriggerScriptEntity >;
70
+ deleteTriggerScriptByUniqueIdAsync(request: carriers.CRMScript_DeleteTriggerScriptByUniqueIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
71
+ deleteTriggerScriptByUniqueIdAsync(triggerScriptUniqueId: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
72
+ validateTriggerScriptAsync(request: carriers.CRMScript_ValidateTriggerScriptRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptResult >;
73
+ validateTriggerScriptAsync(triggerScriptId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptResult >;
74
+ validateTriggerScriptByUniqueIdAsync(request: carriers.CRMScript_ValidateTriggerScriptByUniqueIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptResult >;
75
+ validateTriggerScriptByUniqueIdAsync(triggerScriptUniqueId: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptResult >;
76
+ } // interface ICRMScriptAgent
77
+
78
+
79
+
80
+
81
+ /**
82
+ * Manage and execute CRMScript functions.
83
+ */
84
+ export class CRMScriptAgent extends base.WebApiBase implements ICRMScriptAgent {
85
+ constructor(baseUrl?: string, languageCode?:string, cultureCode?: string);
86
+ constructor(baseUrl?: string, resourceParsing?: base.ResourceParsing);
87
+ constructor(baseUrl: string, resourceManager:any);
88
+ constructor(baseUrl: string, config:AxiosRequestConfig, resourceManager:any);
89
+ constructor(baseUrl: string, config:AxiosRequestConfig, resourceParsing?: base.ResourceParsing);
90
+ constructor(baseUrl: string, config:AxiosRequestConfig, languageCode?:string, cultureCode?: string);
91
+ constructor(options: base.WebApiOptions);
92
+
93
+ constructor(baseUrlOrOptions: string|base.WebApiOptions|undefined,
94
+ langOrconfigOrRM?: string|base.ResourceParsing|AxiosRequestConfig|any,
95
+ langOrResourceOrRM?:string|base.ResourceParsing|any,
96
+ cultureCode?: string,
97
+ ) {
98
+ const options = base.WebApiBase.FigureOutOptions(baseUrlOrOptions, langOrconfigOrRM, langOrResourceOrRM, cultureCode);
99
+ options.basePath = "v1/Agents/CRMScript/";
100
+ super(options);
101
+ }
102
+
103
+
104
+
105
+ /**
106
+ * Set default values into a new CRMScriptEntity.
107
+ * NetServer calculates default values on the entity, which is required when creating/storing a new instance
108
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
109
+ * @returns A blank entity.
110
+ */
111
+ public async createDefaultCRMScriptEntityAsync(options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptEntity > {
112
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
113
+ base.WebApiBase.SetPending(options);
114
+ return new Promise< carriers.CRMScriptEntity >(async (resolve, reject) => {
115
+ try {
116
+ const response = await this._axios.post("CreateDefaultCRMScriptEntity", null, config);
117
+ base.WebApiBase.SetCompleted(options);
118
+ const res : carriers.CRMScriptEntity = converters.Create_CRMScriptEntity_From( response.data );
119
+ resolve(res);
120
+ }
121
+ catch( err ) {
122
+ base.WebApiBase.HandleError(options, config, err);
123
+ reject(err);
124
+ }
125
+ });
126
+ }
127
+ /*
128
+ * Replace the existing CRMScriptEntity or creates a new CRMScriptEntity if the id parameter is empty
129
+ * @param entity - The CRMScriptEntity to be saved.
130
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
131
+ * @returns New or updated CRMScriptEntity
132
+ */
133
+ public async saveCRMScriptEntityAsync(entity: carriers.CRMScriptEntity, options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptEntity > {
134
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
135
+ base.WebApiBase.SetPending(options);
136
+ return new Promise< carriers.CRMScriptEntity >(async (resolve, reject) => {
137
+ try {
138
+ const response = await this._axios.post("SaveCRMScriptEntity", entity, config);
139
+ base.WebApiBase.SetCompleted(options);
140
+ const res : carriers.CRMScriptEntity = converters.Create_CRMScriptEntity_From( response.data );
141
+ resolve(res);
142
+ }
143
+ catch( err ) {
144
+ base.WebApiBase.HandleError(options, config, err);
145
+ reject(err);
146
+ }
147
+ });
148
+ }
149
+
150
+ /*
151
+ * Deletes the CRMScriptEntity
152
+ * @param CRMScriptEntityId - The id of the CRMScriptEntity to be deleted.
153
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
154
+ */
155
+ public async deleteCRMScriptEntityAsync(CRMScriptEntityId: number, options?:base.WebApiRequestOptions) : Promise< void > {
156
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
157
+ base.WebApiBase.SetPending(options);
158
+ return new Promise< void >(async (resolve, reject) => {
159
+ try {
160
+ const response = await this._axios.post("DeleteCRMScriptEntity?CRMScriptEntityId=" + CRMScriptEntityId, null, config );
161
+ base.WebApiBase.SetCompleted(options);
162
+ const res = response.data;
163
+ resolve(res);
164
+ }
165
+ catch( err ) {
166
+ base.WebApiBase.HandleError(options, config, err);
167
+ reject(err);
168
+ }
169
+ });
170
+ }
171
+
172
+ /**
173
+ * Set default values into a new TriggerScriptEntity.
174
+ * NetServer calculates default values on the entity, which is required when creating/storing a new instance
175
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
176
+ * @returns A blank entity.
177
+ */
178
+ public async createDefaultTriggerScriptEntityAsync(options?:base.WebApiRequestOptions) : Promise< carriers.TriggerScriptEntity > {
179
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
180
+ base.WebApiBase.SetPending(options);
181
+ return new Promise< carriers.TriggerScriptEntity >(async (resolve, reject) => {
182
+ try {
183
+ const response = await this._axios.post("CreateDefaultTriggerScriptEntity", null, config);
184
+ base.WebApiBase.SetCompleted(options);
185
+ const res : carriers.TriggerScriptEntity = converters.Create_TriggerScriptEntity_From( response.data );
186
+ resolve(res);
187
+ }
188
+ catch( err ) {
189
+ base.WebApiBase.HandleError(options, config, err);
190
+ reject(err);
191
+ }
192
+ });
193
+ }
194
+ /*
195
+ * Replace the existing TriggerScriptEntity or creates a new TriggerScriptEntity if the id parameter is empty
196
+ * @param entity - The TriggerScriptEntity to be saved.
197
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
198
+ * @returns New or updated TriggerScriptEntity
199
+ */
200
+ public async saveTriggerScriptEntityAsync(entity: carriers.TriggerScriptEntity, options?:base.WebApiRequestOptions) : Promise< carriers.TriggerScriptEntity > {
201
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
202
+ base.WebApiBase.SetPending(options);
203
+ return new Promise< carriers.TriggerScriptEntity >(async (resolve, reject) => {
204
+ try {
205
+ const response = await this._axios.post("SaveTriggerScriptEntity", entity, config);
206
+ base.WebApiBase.SetCompleted(options);
207
+ const res : carriers.TriggerScriptEntity = converters.Create_TriggerScriptEntity_From( response.data );
208
+ resolve(res);
209
+ }
210
+ catch( err ) {
211
+ base.WebApiBase.HandleError(options, config, err);
212
+ reject(err);
213
+ }
214
+ });
215
+ }
216
+
217
+ /*
218
+ * Deletes the TriggerScriptEntity
219
+ * @param TriggerScriptEntityId - The id of the TriggerScriptEntity to be deleted.
220
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
221
+ */
222
+ public async deleteTriggerScriptEntityAsync(TriggerScriptEntityId: number, options?:base.WebApiRequestOptions) : Promise< void > {
223
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
224
+ base.WebApiBase.SetPending(options);
225
+ return new Promise< void >(async (resolve, reject) => {
226
+ try {
227
+ const response = await this._axios.post("DeleteTriggerScriptEntity?TriggerScriptEntityId=" + TriggerScriptEntityId, null, config );
228
+ base.WebApiBase.SetCompleted(options);
229
+ const res = response.data;
230
+ resolve(res);
231
+ }
232
+ catch( err ) {
233
+ base.WebApiBase.HandleError(options, config, err);
234
+ reject(err);
235
+ }
236
+ });
237
+ }
238
+
239
+ private async _getCRMScriptByUniqueIdentifierAsync(request: carriers.CRMScript_GetCRMScriptByUniqueIdentifierRequest, options?:base.WebApiRequestOptions) : Promise< carriers.Script > {
240
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
241
+ base.WebApiBase.SetPending(options);
242
+ return new Promise< carriers.Script >(async (resolve, reject) => {
243
+ try {
244
+ config.baseURL = this._options.baseUrl;
245
+ const response = await this._axios.post("GetCRMScriptByUniqueIdentifier", request , config);
246
+ base.WebApiBase.SetCompleted(options);
247
+ const res : carriers.Script = converters.Create_Script_From( response.data );
248
+ resolve(res);
249
+ }
250
+ catch( err ) {
251
+ base.WebApiBase.HandleError(options, config, err);
252
+ reject(err);
253
+ }
254
+ });
255
+ }
256
+
257
+
258
+
259
+ /**
260
+ * Get information about a script from a unique identifier
261
+ * @param request - UniqueIdentifier
262
+ * @returns Information about CRMScript
263
+ */
264
+ public async getCRMScriptByUniqueIdentifierAsync(request: carriers.CRMScript_GetCRMScriptByUniqueIdentifierRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Script >;
265
+
266
+ /**
267
+ * Get information about a script from a unique identifier
268
+ * @param uniqueIdentifier - Global unique reference to script (independent of installation)
269
+ * @returns Information about CRMScript
270
+ */
271
+ public async getCRMScriptByUniqueIdentifierAsync(uniqueIdentifier: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Script >;
272
+
273
+ public async getCRMScriptByUniqueIdentifierAsync(uniqueIdentifier:string|carriers.CRMScript_GetCRMScriptByUniqueIdentifierRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Script > {
274
+ let _request : carriers.CRMScript_GetCRMScriptByUniqueIdentifierRequest = null;
275
+ let _options : base.WebApiRequestOptions = null;
276
+ const first : any = uniqueIdentifier;
277
+ if( typeof( first ) === "object" && first && ( typeof(first.uniqueIdentifier)!='undefined' ) )
278
+ {
279
+ _request = uniqueIdentifier as carriers.CRMScript_GetCRMScriptByUniqueIdentifierRequest;
280
+ _options = webapi_options as base.WebApiRequestOptions;
281
+ }
282
+ else
283
+ {
284
+ _request = {
285
+ uniqueIdentifier: uniqueIdentifier as string,
286
+ };
287
+ _options = webapi_options;
288
+ }
289
+ return this._getCRMScriptByUniqueIdentifierAsync( _request, _options );
290
+ }
291
+
292
+
293
+ private async _saveCRMScriptByUniqueIdentifierAsync(request: carriers.CRMScript_SaveCRMScriptByUniqueIdentifierRequest, options?:base.WebApiRequestOptions) : Promise< carriers.Script > {
294
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
295
+ base.WebApiBase.SetPending(options);
296
+ return new Promise< carriers.Script >(async (resolve, reject) => {
297
+ try {
298
+ config.baseURL = this._options.baseUrl;
299
+ const response = await this._axios.post("SaveCRMScriptByUniqueIdentifier", request , config);
300
+ base.WebApiBase.SetCompleted(options);
301
+ const res : carriers.Script = converters.Create_Script_From( response.data );
302
+ resolve(res);
303
+ }
304
+ catch( err ) {
305
+ base.WebApiBase.HandleError(options, config, err);
306
+ reject(err);
307
+ }
308
+ });
309
+ }
310
+
311
+
312
+
313
+ /**
314
+ * Create or Update the CRMScript information
315
+ * @param request - UniqueIdentifier, Crmscript
316
+ * @returns Information about the CRMScript as saved in the database
317
+ */
318
+ public async saveCRMScriptByUniqueIdentifierAsync(request: carriers.CRMScript_SaveCRMScriptByUniqueIdentifierRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Script >;
319
+
320
+ /**
321
+ * Create or Update the CRMScript information
322
+ * @param uniqueIdentifier - Global unique reference to script (independent of installation)
323
+ * @param crmscript - Information about the CRMScript
324
+ * @returns Information about the CRMScript as saved in the database
325
+ */
326
+ public async saveCRMScriptByUniqueIdentifierAsync(uniqueIdentifier: string, crmscript: carriers.Script, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Script >;
327
+
328
+ public async saveCRMScriptByUniqueIdentifierAsync(uniqueIdentifier:string|carriers.CRMScript_SaveCRMScriptByUniqueIdentifierRequest, crmscript?:carriers.Script|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Script > {
329
+ let _request : carriers.CRMScript_SaveCRMScriptByUniqueIdentifierRequest = null;
330
+ let _options : base.WebApiRequestOptions = null;
331
+ const first : any = uniqueIdentifier;
332
+ if( typeof( first ) === "object" && first && ( typeof(first.uniqueIdentifier)!='undefined' || typeof(first.crmscript)!='undefined' ) )
333
+ {
334
+ _request = uniqueIdentifier as carriers.CRMScript_SaveCRMScriptByUniqueIdentifierRequest;
335
+ _options = crmscript as base.WebApiRequestOptions;
336
+ }
337
+ else
338
+ {
339
+ _request = {
340
+ uniqueIdentifier: uniqueIdentifier as string,
341
+ crmscript: crmscript as carriers.Script,
342
+ };
343
+ _options = webapi_options;
344
+ }
345
+ return this._saveCRMScriptByUniqueIdentifierAsync( _request, _options );
346
+ }
347
+
348
+
349
+ private async _deleteCRMScriptByUniqueIdentifierAsync(request: carriers.CRMScript_DeleteCRMScriptByUniqueIdentifierRequest, options?:base.WebApiRequestOptions) : Promise< void > {
350
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
351
+ base.WebApiBase.SetPending(options);
352
+ return new Promise< void >(async (resolve, reject) => {
353
+ try {
354
+ config.baseURL = this._options.baseUrl;
355
+ const response = await this._axios.post("DeleteCRMScriptByUniqueIdentifier", request , config);
356
+ base.WebApiBase.SetCompleted(options);
357
+ const res = response.data;
358
+ resolve(res);
359
+ }
360
+ catch( err ) {
361
+ base.WebApiBase.HandleError(options, config, err);
362
+ reject(err);
363
+ }
364
+ });
365
+ }
366
+
367
+
368
+
369
+ /**
370
+ * Delete the CRMScript
371
+ * @param request - UniqueIdentifier
372
+ * @returns This method has no return value
373
+ */
374
+ public async deleteCRMScriptByUniqueIdentifierAsync(request: carriers.CRMScript_DeleteCRMScriptByUniqueIdentifierRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
375
+
376
+ /**
377
+ * Delete the CRMScript
378
+ * @param uniqueIdentifier - Global unique reference to script (independent of installation)
379
+ * @returns This method has no return value
380
+ */
381
+ public async deleteCRMScriptByUniqueIdentifierAsync(uniqueIdentifier: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
382
+
383
+ public async deleteCRMScriptByUniqueIdentifierAsync(uniqueIdentifier:string|carriers.CRMScript_DeleteCRMScriptByUniqueIdentifierRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
384
+ let _request : carriers.CRMScript_DeleteCRMScriptByUniqueIdentifierRequest = null;
385
+ let _options : base.WebApiRequestOptions = null;
386
+ const first : any = uniqueIdentifier;
387
+ if( typeof( first ) === "object" && first && ( typeof(first.uniqueIdentifier)!='undefined' ) )
388
+ {
389
+ _request = uniqueIdentifier as carriers.CRMScript_DeleteCRMScriptByUniqueIdentifierRequest;
390
+ _options = webapi_options as base.WebApiRequestOptions;
391
+ }
392
+ else
393
+ {
394
+ _request = {
395
+ uniqueIdentifier: uniqueIdentifier as string,
396
+ };
397
+ _options = webapi_options;
398
+ }
399
+ return this._deleteCRMScriptByUniqueIdentifierAsync( _request, _options );
400
+ }
401
+
402
+ /*
403
+ * Gets a CRMScriptEntity object.
404
+ * @param cRMScriptEntityId - The primary key.
405
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
406
+ * @returns A single CRMScriptEntity
407
+ */
408
+ public async getCRMScriptEntityAsync(cRMScriptEntityId: number, options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptEntity > {
409
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
410
+ base.WebApiBase.SetPending(options);
411
+ return new Promise< carriers.CRMScriptEntity >(async (resolve, reject) => {
412
+ try {
413
+ const response = await this._axios.post("GetCRMScriptEntity?cRMScriptEntityId=" + cRMScriptEntityId, null, config);
414
+ base.WebApiBase.SetCompleted(options);
415
+ const res = converters.Create_CRMScriptEntity_From( response.data );
416
+ resolve(res);
417
+ }
418
+ catch( err ) {
419
+ base.WebApiBase.HandleError(options, config, err);
420
+ reject(err);
421
+ }
422
+ });
423
+ }
424
+
425
+
426
+ private async _executeScriptAsync(request: carriers.CRMScript_ExecuteScriptRequest, options?:base.WebApiRequestOptions) : Promise< string > {
427
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
428
+ base.WebApiBase.SetPending(options);
429
+ return new Promise< string >(async (resolve, reject) => {
430
+ try {
431
+ config.baseURL = this._options.baseUrl;
432
+ const response = await this._axios.post("ExecuteScript", request , config);
433
+ base.WebApiBase.SetCompleted(options);
434
+ const res : string = response.data as string;
435
+ resolve(res);
436
+ }
437
+ catch( err ) {
438
+ base.WebApiBase.HandleError(options, config, err);
439
+ reject(err);
440
+ }
441
+ });
442
+ }
443
+
444
+
445
+
446
+ /**
447
+ * Execute a CRMScript with parameters, returning printed output value.
448
+ * @param request - CRMScriptId, Parameters
449
+ * @returns The output produced by the CRMScript
450
+ */
451
+ public async executeScriptAsync(request: carriers.CRMScript_ExecuteScriptRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
452
+
453
+ /**
454
+ * Execute a CRMScript with parameters, returning printed output value.
455
+ * @param crmScriptId - The id of the CRMScript to execute
456
+ * @param parameters - Parameters passed as variables to the CRMScript
457
+ * @returns The output produced by the CRMScript
458
+ */
459
+ public async executeScriptAsync(crmScriptId: number, parameters: carriers.StringDictionary, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
460
+
461
+ public async executeScriptAsync(crmScriptId:number|carriers.CRMScript_ExecuteScriptRequest, parameters?:carriers.StringDictionary|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< string > {
462
+ let _request : carriers.CRMScript_ExecuteScriptRequest = null;
463
+ let _options : base.WebApiRequestOptions = null;
464
+ const first : any = crmScriptId;
465
+ if( typeof( first ) === "object" && first && ( typeof(first.crmScriptId)!='undefined' || typeof(first.parameters)!='undefined' ) )
466
+ {
467
+ _request = crmScriptId as carriers.CRMScript_ExecuteScriptRequest;
468
+ _options = parameters as base.WebApiRequestOptions;
469
+ }
470
+ else
471
+ {
472
+ _request = {
473
+ crmScriptId: crmScriptId as number,
474
+ parameters: parameters as carriers.StringDictionary,
475
+ };
476
+ _options = webapi_options;
477
+ }
478
+ return this._executeScriptAsync( _request, _options );
479
+ }
480
+
481
+
482
+ private async _executeScriptByIncludeIdAsync(request: carriers.CRMScript_ExecuteScriptByIncludeIdRequest, options?:base.WebApiRequestOptions) : Promise< string > {
483
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
484
+ base.WebApiBase.SetPending(options);
485
+ return new Promise< string >(async (resolve, reject) => {
486
+ try {
487
+ config.baseURL = this._options.baseUrl;
488
+ const response = await this._axios.post("ExecuteScriptByIncludeId", request , config);
489
+ base.WebApiBase.SetCompleted(options);
490
+ const res : string = response.data as string;
491
+ resolve(res);
492
+ }
493
+ catch( err ) {
494
+ base.WebApiBase.HandleError(options, config, err);
495
+ reject(err);
496
+ }
497
+ });
498
+ }
499
+
500
+
501
+
502
+ /**
503
+ * Execute a CRMScript with parameters, returning printed output value.
504
+ * @param request - CRMScriptIncludeId, Parameters
505
+ * @returns The output produced by the CRMScript
506
+ */
507
+ public async executeScriptByIncludeIdAsync(request: carriers.CRMScript_ExecuteScriptByIncludeIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
508
+
509
+ /**
510
+ * Execute a CRMScript with parameters, returning printed output value.
511
+ * @param crmScriptIncludeId - The include id of the CRMScript to validate
512
+ * @param parameters - Parameters passed as variables to the CRMScript
513
+ * @returns The output produced by the CRMScript
514
+ */
515
+ public async executeScriptByIncludeIdAsync(crmScriptIncludeId: string, parameters: carriers.StringDictionary, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
516
+
517
+ public async executeScriptByIncludeIdAsync(crmScriptIncludeId:string|carriers.CRMScript_ExecuteScriptByIncludeIdRequest, parameters?:carriers.StringDictionary|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< string > {
518
+ let _request : carriers.CRMScript_ExecuteScriptByIncludeIdRequest = null;
519
+ let _options : base.WebApiRequestOptions = null;
520
+ const first : any = crmScriptIncludeId;
521
+ if( typeof( first ) === "object" && first && ( typeof(first.crmScriptIncludeId)!='undefined' || typeof(first.parameters)!='undefined' ) )
522
+ {
523
+ _request = crmScriptIncludeId as carriers.CRMScript_ExecuteScriptByIncludeIdRequest;
524
+ _options = parameters as base.WebApiRequestOptions;
525
+ }
526
+ else
527
+ {
528
+ _request = {
529
+ crmScriptIncludeId: crmScriptIncludeId as string,
530
+ parameters: parameters as carriers.StringDictionary,
531
+ };
532
+ _options = webapi_options;
533
+ }
534
+ return this._executeScriptByIncludeIdAsync( _request, _options );
535
+ }
536
+
537
+
538
+ private async _executeScriptByUniqueIdAsync(request: carriers.CRMScript_ExecuteScriptByUniqueIdRequest, options?:base.WebApiRequestOptions) : Promise< string > {
539
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
540
+ base.WebApiBase.SetPending(options);
541
+ return new Promise< string >(async (resolve, reject) => {
542
+ try {
543
+ config.baseURL = this._options.baseUrl;
544
+ const response = await this._axios.post("ExecuteScriptByUniqueId", request , config);
545
+ base.WebApiBase.SetCompleted(options);
546
+ const res : string = response.data as string;
547
+ resolve(res);
548
+ }
549
+ catch( err ) {
550
+ base.WebApiBase.HandleError(options, config, err);
551
+ reject(err);
552
+ }
553
+ });
554
+ }
555
+
556
+
557
+
558
+ /**
559
+ * Execute a CRMScript with parameters, returning printed output value.
560
+ * @param request - CRMScriptUniqueId, Parameters
561
+ * @returns The output produced by the CRMScript
562
+ */
563
+ public async executeScriptByUniqueIdAsync(request: carriers.CRMScript_ExecuteScriptByUniqueIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
564
+
565
+ /**
566
+ * Execute a CRMScript with parameters, returning printed output value.
567
+ * @param crmScriptUniqueId - The unique id of the CRMScript to validate
568
+ * @param parameters - Parameters passed as variables to the CRMScript
569
+ * @returns The output produced by the CRMScript
570
+ */
571
+ public async executeScriptByUniqueIdAsync(crmScriptUniqueId: string, parameters: carriers.StringDictionary, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
572
+
573
+ public async executeScriptByUniqueIdAsync(crmScriptUniqueId:string|carriers.CRMScript_ExecuteScriptByUniqueIdRequest, parameters?:carriers.StringDictionary|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< string > {
574
+ let _request : carriers.CRMScript_ExecuteScriptByUniqueIdRequest = null;
575
+ let _options : base.WebApiRequestOptions = null;
576
+ const first : any = crmScriptUniqueId;
577
+ if( typeof( first ) === "object" && first && ( typeof(first.crmScriptUniqueId)!='undefined' || typeof(first.parameters)!='undefined' ) )
578
+ {
579
+ _request = crmScriptUniqueId as carriers.CRMScript_ExecuteScriptByUniqueIdRequest;
580
+ _options = parameters as base.WebApiRequestOptions;
581
+ }
582
+ else
583
+ {
584
+ _request = {
585
+ crmScriptUniqueId: crmScriptUniqueId as string,
586
+ parameters: parameters as carriers.StringDictionary,
587
+ };
588
+ _options = webapi_options;
589
+ }
590
+ return this._executeScriptByUniqueIdAsync( _request, _options );
591
+ }
592
+
593
+
594
+ private async _executeScriptAsEventAsync(request: carriers.CRMScript_ExecuteScriptAsEventRequest, options?:base.WebApiRequestOptions) : Promise< carriers.EventData > {
595
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
596
+ base.WebApiBase.SetPending(options);
597
+ return new Promise< carriers.EventData >(async (resolve, reject) => {
598
+ try {
599
+ config.baseURL = this._options.baseUrl;
600
+ const response = await this._axios.post("ExecuteScriptAsEvent", request , config);
601
+ base.WebApiBase.SetCompleted(options);
602
+ const res : carriers.EventData = converters.Create_EventData_From( response.data );
603
+ resolve(res);
604
+ }
605
+ catch( err ) {
606
+ base.WebApiBase.HandleError(options, config, err);
607
+ reject(err);
608
+ }
609
+ });
610
+ }
611
+
612
+
613
+
614
+ /**
615
+ * Execute a CRMScript with event data as input. Returns event data with output variable values.
616
+ * @param request - CRMScriptId, EventData
617
+ * @returns The EventData instance after script execution with output values
618
+ */
619
+ public async executeScriptAsEventAsync(request: carriers.CRMScript_ExecuteScriptAsEventRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.EventData >;
620
+
621
+ /**
622
+ * Execute a CRMScript with event data as input. Returns event data with output variable values.
623
+ * @param crmScriptId - The id of the CRMScript to execute
624
+ * @param eventData - The EventData instance sent to the crmscript with input values
625
+ * @returns The EventData instance after script execution with output values
626
+ */
627
+ public async executeScriptAsEventAsync(crmScriptId: number, eventData: carriers.EventData, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.EventData >;
628
+
629
+ public async executeScriptAsEventAsync(crmScriptId:number|carriers.CRMScript_ExecuteScriptAsEventRequest, eventData?:carriers.EventData|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.EventData > {
630
+ let _request : carriers.CRMScript_ExecuteScriptAsEventRequest = null;
631
+ let _options : base.WebApiRequestOptions = null;
632
+ const first : any = crmScriptId;
633
+ if( typeof( first ) === "object" && first && ( typeof(first.crmScriptId)!='undefined' || typeof(first.eventData)!='undefined' ) )
634
+ {
635
+ _request = crmScriptId as carriers.CRMScript_ExecuteScriptAsEventRequest;
636
+ _options = eventData as base.WebApiRequestOptions;
637
+ }
638
+ else
639
+ {
640
+ _request = {
641
+ crmScriptId: crmScriptId as number,
642
+ eventData: eventData as carriers.EventData,
643
+ };
644
+ _options = webapi_options;
645
+ }
646
+ return this._executeScriptAsEventAsync( _request, _options );
647
+ }
648
+
649
+
650
+ private async _executeScriptAsEventByUniqueIdAsync(request: carriers.CRMScript_ExecuteScriptAsEventByUniqueIdRequest, options?:base.WebApiRequestOptions) : Promise< carriers.EventData > {
651
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
652
+ base.WebApiBase.SetPending(options);
653
+ return new Promise< carriers.EventData >(async (resolve, reject) => {
654
+ try {
655
+ config.baseURL = this._options.baseUrl;
656
+ const response = await this._axios.post("ExecuteScriptAsEventByUniqueId", request , config);
657
+ base.WebApiBase.SetCompleted(options);
658
+ const res : carriers.EventData = converters.Create_EventData_From( response.data );
659
+ resolve(res);
660
+ }
661
+ catch( err ) {
662
+ base.WebApiBase.HandleError(options, config, err);
663
+ reject(err);
664
+ }
665
+ });
666
+ }
667
+
668
+
669
+
670
+ /**
671
+ * Execute a CRMScript with event data as input. Returns event data with output variable values.
672
+ * @param request - CRMScriptUniqueId, EventData
673
+ * @returns The EventData instance after script execution with output values
674
+ */
675
+ public async executeScriptAsEventByUniqueIdAsync(request: carriers.CRMScript_ExecuteScriptAsEventByUniqueIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.EventData >;
676
+
677
+ /**
678
+ * Execute a CRMScript with event data as input. Returns event data with output variable values.
679
+ * @param crmScriptUniqueId - The unique id of the CRMScript to execute
680
+ * @param eventData - The EventData instance sent to the crmscript with input values
681
+ * @returns The EventData instance after script execution with output values
682
+ */
683
+ public async executeScriptAsEventByUniqueIdAsync(crmScriptUniqueId: string, eventData: carriers.EventData, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.EventData >;
684
+
685
+ public async executeScriptAsEventByUniqueIdAsync(crmScriptUniqueId:string|carriers.CRMScript_ExecuteScriptAsEventByUniqueIdRequest, eventData?:carriers.EventData|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.EventData > {
686
+ let _request : carriers.CRMScript_ExecuteScriptAsEventByUniqueIdRequest = null;
687
+ let _options : base.WebApiRequestOptions = null;
688
+ const first : any = crmScriptUniqueId;
689
+ if( typeof( first ) === "object" && first && ( typeof(first.crmScriptUniqueId)!='undefined' || typeof(first.eventData)!='undefined' ) )
690
+ {
691
+ _request = crmScriptUniqueId as carriers.CRMScript_ExecuteScriptAsEventByUniqueIdRequest;
692
+ _options = eventData as base.WebApiRequestOptions;
693
+ }
694
+ else
695
+ {
696
+ _request = {
697
+ crmScriptUniqueId: crmScriptUniqueId as string,
698
+ eventData: eventData as carriers.EventData,
699
+ };
700
+ _options = webapi_options;
701
+ }
702
+ return this._executeScriptAsEventByUniqueIdAsync( _request, _options );
703
+ }
704
+
705
+
706
+ private async _validateScriptAsync(request: carriers.CRMScript_ValidateScriptRequest, options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptResult > {
707
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
708
+ base.WebApiBase.SetPending(options);
709
+ return new Promise< carriers.CRMScriptResult >(async (resolve, reject) => {
710
+ try {
711
+ config.baseURL = this._options.baseUrl;
712
+ const response = await this._axios.post("ValidateScript", request , config);
713
+ base.WebApiBase.SetCompleted(options);
714
+ const res : carriers.CRMScriptResult = converters.Create_CRMScriptResult_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
+ /**
727
+ * Validate a CRMScript. This will check that the syntax is correct
728
+ * @param request - CRMScriptId
729
+ * @returns True if the syntax is correct
730
+ */
731
+ public async validateScriptAsync(request: carriers.CRMScript_ValidateScriptRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptResult >;
732
+
733
+ /**
734
+ * Validate a CRMScript. This will check that the syntax is correct
735
+ * @param crmScriptId - The id of the CRMScript to execute
736
+ * @returns True if the syntax is correct
737
+ */
738
+ public async validateScriptAsync(crmScriptId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptResult >;
739
+
740
+ public async validateScriptAsync(crmScriptId:number|carriers.CRMScript_ValidateScriptRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptResult > {
741
+ let _request : carriers.CRMScript_ValidateScriptRequest = null;
742
+ let _options : base.WebApiRequestOptions = null;
743
+ const first : any = crmScriptId;
744
+ if( typeof( first ) === "object" && first && ( typeof(first.crmScriptId)!='undefined' ) )
745
+ {
746
+ _request = crmScriptId as carriers.CRMScript_ValidateScriptRequest;
747
+ _options = webapi_options as base.WebApiRequestOptions;
748
+ }
749
+ else
750
+ {
751
+ _request = {
752
+ crmScriptId: crmScriptId as number,
753
+ };
754
+ _options = webapi_options;
755
+ }
756
+ return this._validateScriptAsync( _request, _options );
757
+ }
758
+
759
+
760
+ private async _validateScriptByIncludeIdAsync(request: carriers.CRMScript_ValidateScriptByIncludeIdRequest, options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptResult > {
761
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
762
+ base.WebApiBase.SetPending(options);
763
+ return new Promise< carriers.CRMScriptResult >(async (resolve, reject) => {
764
+ try {
765
+ config.baseURL = this._options.baseUrl;
766
+ const response = await this._axios.post("ValidateScriptByIncludeId", request , config);
767
+ base.WebApiBase.SetCompleted(options);
768
+ const res : carriers.CRMScriptResult = converters.Create_CRMScriptResult_From( response.data );
769
+ resolve(res);
770
+ }
771
+ catch( err ) {
772
+ base.WebApiBase.HandleError(options, config, err);
773
+ reject(err);
774
+ }
775
+ });
776
+ }
777
+
778
+
779
+
780
+ /**
781
+ * Validate a CRMScript. This will check that the syntax is correct
782
+ * @param request - CRMScriptIncludeId
783
+ * @returns True if the syntax is correct
784
+ */
785
+ public async validateScriptByIncludeIdAsync(request: carriers.CRMScript_ValidateScriptByIncludeIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptResult >;
786
+
787
+ /**
788
+ * Validate a CRMScript. This will check that the syntax is correct
789
+ * @param crmScriptIncludeId - The include id of the CRMScript to validate
790
+ * @returns True if the syntax is correct
791
+ */
792
+ public async validateScriptByIncludeIdAsync(crmScriptIncludeId: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptResult >;
793
+
794
+ public async validateScriptByIncludeIdAsync(crmScriptIncludeId:string|carriers.CRMScript_ValidateScriptByIncludeIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptResult > {
795
+ let _request : carriers.CRMScript_ValidateScriptByIncludeIdRequest = null;
796
+ let _options : base.WebApiRequestOptions = null;
797
+ const first : any = crmScriptIncludeId;
798
+ if( typeof( first ) === "object" && first && ( typeof(first.crmScriptIncludeId)!='undefined' ) )
799
+ {
800
+ _request = crmScriptIncludeId as carriers.CRMScript_ValidateScriptByIncludeIdRequest;
801
+ _options = webapi_options as base.WebApiRequestOptions;
802
+ }
803
+ else
804
+ {
805
+ _request = {
806
+ crmScriptIncludeId: crmScriptIncludeId as string,
807
+ };
808
+ _options = webapi_options;
809
+ }
810
+ return this._validateScriptByIncludeIdAsync( _request, _options );
811
+ }
812
+
813
+
814
+ private async _validateScriptByUniqueIdAsync(request: carriers.CRMScript_ValidateScriptByUniqueIdRequest, options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptResult > {
815
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
816
+ base.WebApiBase.SetPending(options);
817
+ return new Promise< carriers.CRMScriptResult >(async (resolve, reject) => {
818
+ try {
819
+ config.baseURL = this._options.baseUrl;
820
+ const response = await this._axios.post("ValidateScriptByUniqueId", request , config);
821
+ base.WebApiBase.SetCompleted(options);
822
+ const res : carriers.CRMScriptResult = converters.Create_CRMScriptResult_From( response.data );
823
+ resolve(res);
824
+ }
825
+ catch( err ) {
826
+ base.WebApiBase.HandleError(options, config, err);
827
+ reject(err);
828
+ }
829
+ });
830
+ }
831
+
832
+
833
+
834
+ /**
835
+ * Validate a CRMScript. This will check that the syntax is correct
836
+ * @param request - CRMScriptUniqueId
837
+ * @returns True if the syntax is correct
838
+ */
839
+ public async validateScriptByUniqueIdAsync(request: carriers.CRMScript_ValidateScriptByUniqueIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptResult >;
840
+
841
+ /**
842
+ * Validate a CRMScript. This will check that the syntax is correct
843
+ * @param crmScriptUniqueId - The unique id of the CRMScript to validate
844
+ * @returns True if the syntax is correct
845
+ */
846
+ public async validateScriptByUniqueIdAsync(crmScriptUniqueId: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptResult >;
847
+
848
+ public async validateScriptByUniqueIdAsync(crmScriptUniqueId:string|carriers.CRMScript_ValidateScriptByUniqueIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptResult > {
849
+ let _request : carriers.CRMScript_ValidateScriptByUniqueIdRequest = null;
850
+ let _options : base.WebApiRequestOptions = null;
851
+ const first : any = crmScriptUniqueId;
852
+ if( typeof( first ) === "object" && first && ( typeof(first.crmScriptUniqueId)!='undefined' ) )
853
+ {
854
+ _request = crmScriptUniqueId as carriers.CRMScript_ValidateScriptByUniqueIdRequest;
855
+ _options = webapi_options as base.WebApiRequestOptions;
856
+ }
857
+ else
858
+ {
859
+ _request = {
860
+ crmScriptUniqueId: crmScriptUniqueId as string,
861
+ };
862
+ _options = webapi_options;
863
+ }
864
+ return this._validateScriptByUniqueIdAsync( _request, _options );
865
+ }
866
+
867
+
868
+ private async _executeScriptByStringAsync(request: carriers.CRMScript_ExecuteScriptByStringRequest, options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptRunResult > {
869
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
870
+ base.WebApiBase.SetPending(options);
871
+ return new Promise< carriers.CRMScriptRunResult >(async (resolve, reject) => {
872
+ try {
873
+ config.baseURL = this._options.baseUrl;
874
+ const response = await this._axios.post("ExecuteScriptByString", request , config);
875
+ base.WebApiBase.SetCompleted(options);
876
+ const res : carriers.CRMScriptRunResult = converters.Create_CRMScriptRunResult_From( response.data );
877
+ resolve(res);
878
+ }
879
+ catch( err ) {
880
+ base.WebApiBase.HandleError(options, config, err);
881
+ reject(err);
882
+ }
883
+ });
884
+ }
885
+
886
+
887
+
888
+ /**
889
+ * Execute a CRMScript 2 (JavaScript), returning the printed output value.
890
+ * @param request - Script, Parameters, EventData
891
+ * @returns The output produced by the CRMScript
892
+ */
893
+ public async executeScriptByStringAsync(request: carriers.CRMScript_ExecuteScriptByStringRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptRunResult >;
894
+
895
+ /**
896
+ * Execute a CRMScript 2 (JavaScript), returning the printed output value.
897
+ * @param script - The script to execute
898
+ * @param parameters - Parameters passed as variables to the CRMScript
899
+ * @param eventData - The EventData instance sent to the crmscript with input values
900
+ * @returns The output produced by the CRMScript
901
+ */
902
+ public async executeScriptByStringAsync(script: string, parameters: carriers.StringDictionary, eventData: carriers.EventData, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptRunResult >;
903
+
904
+ public async executeScriptByStringAsync(script:string|carriers.CRMScript_ExecuteScriptByStringRequest, parameters?:carriers.StringDictionary|base.WebApiRequestOptions, eventData?:carriers.EventData, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptRunResult > {
905
+ let _request : carriers.CRMScript_ExecuteScriptByStringRequest = null;
906
+ let _options : base.WebApiRequestOptions = null;
907
+ const first : any = script;
908
+ if( typeof( first ) === "object" && first && ( typeof(first.script)!='undefined' || typeof(first.parameters)!='undefined' || typeof(first.eventData)!='undefined' ) )
909
+ {
910
+ _request = script as carriers.CRMScript_ExecuteScriptByStringRequest;
911
+ _options = parameters as base.WebApiRequestOptions;
912
+ }
913
+ else
914
+ {
915
+ _request = {
916
+ script: script as string,
917
+ parameters: parameters as carriers.StringDictionary,
918
+ eventData: eventData as carriers.EventData,
919
+ };
920
+ _options = webapi_options;
921
+ }
922
+ return this._executeScriptByStringAsync( _request, _options );
923
+ }
924
+
925
+
926
+ private async _validateScriptByStringAsync(request: carriers.CRMScript_ValidateScriptByStringRequest, options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptResult > {
927
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
928
+ base.WebApiBase.SetPending(options);
929
+ return new Promise< carriers.CRMScriptResult >(async (resolve, reject) => {
930
+ try {
931
+ config.baseURL = this._options.baseUrl;
932
+ const response = await this._axios.post("ValidateScriptByString", request , config);
933
+ base.WebApiBase.SetCompleted(options);
934
+ const res : carriers.CRMScriptResult = converters.Create_CRMScriptResult_From( response.data );
935
+ resolve(res);
936
+ }
937
+ catch( err ) {
938
+ base.WebApiBase.HandleError(options, config, err);
939
+ reject(err);
940
+ }
941
+ });
942
+ }
943
+
944
+
945
+
946
+ /**
947
+ * Validate a CRMScript 2 (JavaScript). This will check that the syntax is correct
948
+ * @param request - Script
949
+ * @returns The result of the syntax check
950
+ */
951
+ public async validateScriptByStringAsync(request: carriers.CRMScript_ValidateScriptByStringRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptResult >;
952
+
953
+ /**
954
+ * Validate a CRMScript 2 (JavaScript). This will check that the syntax is correct
955
+ * @param script - The script to validate
956
+ * @returns The result of the syntax check
957
+ */
958
+ public async validateScriptByStringAsync(script: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptResult >;
959
+
960
+ public async validateScriptByStringAsync(script:string|carriers.CRMScript_ValidateScriptByStringRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptResult > {
961
+ let _request : carriers.CRMScript_ValidateScriptByStringRequest = null;
962
+ let _options : base.WebApiRequestOptions = null;
963
+ const first : any = script;
964
+ if( typeof( first ) === "object" && first && ( typeof(first.script)!='undefined' ) )
965
+ {
966
+ _request = script as carriers.CRMScript_ValidateScriptByStringRequest;
967
+ _options = webapi_options as base.WebApiRequestOptions;
968
+ }
969
+ else
970
+ {
971
+ _request = {
972
+ script: script as string,
973
+ };
974
+ _options = webapi_options;
975
+ }
976
+ return this._validateScriptByStringAsync( _request, _options );
977
+ }
978
+
979
+ /*
980
+ * Gets a TriggerScriptEntity object.
981
+ * @param triggerScriptEntityId - The primary key.
982
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
983
+ * @returns A single TriggerScriptEntity
984
+ */
985
+ public async getTriggerScriptEntityAsync(triggerScriptEntityId: number, options?:base.WebApiRequestOptions) : Promise< carriers.TriggerScriptEntity > {
986
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
987
+ base.WebApiBase.SetPending(options);
988
+ return new Promise< carriers.TriggerScriptEntity >(async (resolve, reject) => {
989
+ try {
990
+ const response = await this._axios.post("GetTriggerScriptEntity?triggerScriptEntityId=" + triggerScriptEntityId, null, config);
991
+ base.WebApiBase.SetCompleted(options);
992
+ const res = converters.Create_TriggerScriptEntity_From( response.data );
993
+ resolve(res);
994
+ }
995
+ catch( err ) {
996
+ base.WebApiBase.HandleError(options, config, err);
997
+ reject(err);
998
+ }
999
+ });
1000
+ }
1001
+
1002
+
1003
+ private async _getTriggerScriptByUniqueIdAsync(request: carriers.CRMScript_GetTriggerScriptByUniqueIdRequest, options?:base.WebApiRequestOptions) : Promise< carriers.TriggerScriptEntity > {
1004
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1005
+ base.WebApiBase.SetPending(options);
1006
+ return new Promise< carriers.TriggerScriptEntity >(async (resolve, reject) => {
1007
+ try {
1008
+ config.baseURL = this._options.baseUrl;
1009
+ const response = await this._axios.post("GetTriggerScriptByUniqueId", request , config);
1010
+ base.WebApiBase.SetCompleted(options);
1011
+ const res : carriers.TriggerScriptEntity = converters.Create_TriggerScriptEntity_From( response.data );
1012
+ resolve(res);
1013
+ }
1014
+ catch( err ) {
1015
+ base.WebApiBase.HandleError(options, config, err);
1016
+ reject(err);
1017
+ }
1018
+ });
1019
+ }
1020
+
1021
+
1022
+
1023
+ /**
1024
+ * Get a trigger CRMScript.
1025
+ * @param request - TriggerScriptUniqueId
1026
+ * @returns Trigger script details and source code.
1027
+ */
1028
+ public async getTriggerScriptByUniqueIdAsync(request: carriers.CRMScript_GetTriggerScriptByUniqueIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TriggerScriptEntity >;
1029
+
1030
+ /**
1031
+ * Get a trigger CRMScript.
1032
+ * @param triggerScriptUniqueId - The unique id of the CRMScript to validate
1033
+ * @returns Trigger script details and source code.
1034
+ */
1035
+ public async getTriggerScriptByUniqueIdAsync(triggerScriptUniqueId: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TriggerScriptEntity >;
1036
+
1037
+ public async getTriggerScriptByUniqueIdAsync(triggerScriptUniqueId:string|carriers.CRMScript_GetTriggerScriptByUniqueIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TriggerScriptEntity > {
1038
+ let _request : carriers.CRMScript_GetTriggerScriptByUniqueIdRequest = null;
1039
+ let _options : base.WebApiRequestOptions = null;
1040
+ const first : any = triggerScriptUniqueId;
1041
+ if( typeof( first ) === "object" && first && ( typeof(first.triggerScriptUniqueId)!='undefined' ) )
1042
+ {
1043
+ _request = triggerScriptUniqueId as carriers.CRMScript_GetTriggerScriptByUniqueIdRequest;
1044
+ _options = webapi_options as base.WebApiRequestOptions;
1045
+ }
1046
+ else
1047
+ {
1048
+ _request = {
1049
+ triggerScriptUniqueId: triggerScriptUniqueId as string,
1050
+ };
1051
+ _options = webapi_options;
1052
+ }
1053
+ return this._getTriggerScriptByUniqueIdAsync( _request, _options );
1054
+ }
1055
+
1056
+
1057
+ private async _saveTriggerScriptByUniqueIdAsync(request: carriers.CRMScript_SaveTriggerScriptByUniqueIdRequest, options?:base.WebApiRequestOptions) : Promise< carriers.TriggerScriptEntity > {
1058
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1059
+ base.WebApiBase.SetPending(options);
1060
+ return new Promise< carriers.TriggerScriptEntity >(async (resolve, reject) => {
1061
+ try {
1062
+ config.baseURL = this._options.baseUrl;
1063
+ const response = await this._axios.post("SaveTriggerScriptByUniqueId", request , config);
1064
+ base.WebApiBase.SetCompleted(options);
1065
+ const res : carriers.TriggerScriptEntity = converters.Create_TriggerScriptEntity_From( response.data );
1066
+ resolve(res);
1067
+ }
1068
+ catch( err ) {
1069
+ base.WebApiBase.HandleError(options, config, err);
1070
+ reject(err);
1071
+ }
1072
+ });
1073
+ }
1074
+
1075
+
1076
+
1077
+ /**
1078
+ * Validate a CRMScript. This will check that the syntax is correct
1079
+ * @param request - TriggerScriptUniqueId, Entity
1080
+ * @returns Trigger script details and source code.
1081
+ */
1082
+ public async saveTriggerScriptByUniqueIdAsync(request: carriers.CRMScript_SaveTriggerScriptByUniqueIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TriggerScriptEntity >;
1083
+
1084
+ /**
1085
+ * Validate a CRMScript. This will check that the syntax is correct
1086
+ * @param triggerScriptUniqueId - The unique id of the CRMScript to validate
1087
+ * @param entity - Trigger script details and source code
1088
+ * @returns Trigger script details and source code.
1089
+ */
1090
+ public async saveTriggerScriptByUniqueIdAsync(triggerScriptUniqueId: string, entity: carriers.TriggerScriptEntity, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TriggerScriptEntity >;
1091
+
1092
+ public async saveTriggerScriptByUniqueIdAsync(triggerScriptUniqueId:string|carriers.CRMScript_SaveTriggerScriptByUniqueIdRequest, entity?:carriers.TriggerScriptEntity|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TriggerScriptEntity > {
1093
+ let _request : carriers.CRMScript_SaveTriggerScriptByUniqueIdRequest = null;
1094
+ let _options : base.WebApiRequestOptions = null;
1095
+ const first : any = triggerScriptUniqueId;
1096
+ if( typeof( first ) === "object" && first && ( typeof(first.triggerScriptUniqueId)!='undefined' || typeof(first.entity)!='undefined' ) )
1097
+ {
1098
+ _request = triggerScriptUniqueId as carriers.CRMScript_SaveTriggerScriptByUniqueIdRequest;
1099
+ _options = entity as base.WebApiRequestOptions;
1100
+ }
1101
+ else
1102
+ {
1103
+ _request = {
1104
+ triggerScriptUniqueId: triggerScriptUniqueId as string,
1105
+ entity: entity as carriers.TriggerScriptEntity,
1106
+ };
1107
+ _options = webapi_options;
1108
+ }
1109
+ return this._saveTriggerScriptByUniqueIdAsync( _request, _options );
1110
+ }
1111
+
1112
+
1113
+ private async _deleteTriggerScriptByUniqueIdAsync(request: carriers.CRMScript_DeleteTriggerScriptByUniqueIdRequest, options?:base.WebApiRequestOptions) : Promise< void > {
1114
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1115
+ base.WebApiBase.SetPending(options);
1116
+ return new Promise< void >(async (resolve, reject) => {
1117
+ try {
1118
+ config.baseURL = this._options.baseUrl;
1119
+ const response = await this._axios.post("DeleteTriggerScriptByUniqueId", request , config);
1120
+ base.WebApiBase.SetCompleted(options);
1121
+ const res = response.data;
1122
+ resolve(res);
1123
+ }
1124
+ catch( err ) {
1125
+ base.WebApiBase.HandleError(options, config, err);
1126
+ reject(err);
1127
+ }
1128
+ });
1129
+ }
1130
+
1131
+
1132
+
1133
+ /**
1134
+ * Delete a trigger CRMScript.
1135
+ * @param request - TriggerScriptUniqueId
1136
+ * @returns This method has no return value
1137
+ */
1138
+ public async deleteTriggerScriptByUniqueIdAsync(request: carriers.CRMScript_DeleteTriggerScriptByUniqueIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
1139
+
1140
+ /**
1141
+ * Delete a trigger CRMScript.
1142
+ * @param triggerScriptUniqueId - The unique id of the CRMScript to validate
1143
+ * @returns This method has no return value
1144
+ */
1145
+ public async deleteTriggerScriptByUniqueIdAsync(triggerScriptUniqueId: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
1146
+
1147
+ public async deleteTriggerScriptByUniqueIdAsync(triggerScriptUniqueId:string|carriers.CRMScript_DeleteTriggerScriptByUniqueIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
1148
+ let _request : carriers.CRMScript_DeleteTriggerScriptByUniqueIdRequest = null;
1149
+ let _options : base.WebApiRequestOptions = null;
1150
+ const first : any = triggerScriptUniqueId;
1151
+ if( typeof( first ) === "object" && first && ( typeof(first.triggerScriptUniqueId)!='undefined' ) )
1152
+ {
1153
+ _request = triggerScriptUniqueId as carriers.CRMScript_DeleteTriggerScriptByUniqueIdRequest;
1154
+ _options = webapi_options as base.WebApiRequestOptions;
1155
+ }
1156
+ else
1157
+ {
1158
+ _request = {
1159
+ triggerScriptUniqueId: triggerScriptUniqueId as string,
1160
+ };
1161
+ _options = webapi_options;
1162
+ }
1163
+ return this._deleteTriggerScriptByUniqueIdAsync( _request, _options );
1164
+ }
1165
+
1166
+
1167
+ private async _validateTriggerScriptAsync(request: carriers.CRMScript_ValidateTriggerScriptRequest, options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptResult > {
1168
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1169
+ base.WebApiBase.SetPending(options);
1170
+ return new Promise< carriers.CRMScriptResult >(async (resolve, reject) => {
1171
+ try {
1172
+ config.baseURL = this._options.baseUrl;
1173
+ const response = await this._axios.post("ValidateTriggerScript", request , config);
1174
+ base.WebApiBase.SetCompleted(options);
1175
+ const res : carriers.CRMScriptResult = converters.Create_CRMScriptResult_From( response.data );
1176
+ resolve(res);
1177
+ }
1178
+ catch( err ) {
1179
+ base.WebApiBase.HandleError(options, config, err);
1180
+ reject(err);
1181
+ }
1182
+ });
1183
+ }
1184
+
1185
+
1186
+
1187
+ /**
1188
+ * Validate a Trigger CRMScript. This will check that the syntax is correct, but not execute the script.
1189
+ * @param request - TriggerScriptId
1190
+ * @returns True if the syntax is correct
1191
+ */
1192
+ public async validateTriggerScriptAsync(request: carriers.CRMScript_ValidateTriggerScriptRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptResult >;
1193
+
1194
+ /**
1195
+ * Validate a Trigger CRMScript. This will check that the syntax is correct, but not execute the script.
1196
+ * @param triggerScriptId - The id of the CRMScript Trigger to validate
1197
+ * @returns True if the syntax is correct
1198
+ */
1199
+ public async validateTriggerScriptAsync(triggerScriptId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptResult >;
1200
+
1201
+ public async validateTriggerScriptAsync(triggerScriptId:number|carriers.CRMScript_ValidateTriggerScriptRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptResult > {
1202
+ let _request : carriers.CRMScript_ValidateTriggerScriptRequest = null;
1203
+ let _options : base.WebApiRequestOptions = null;
1204
+ const first : any = triggerScriptId;
1205
+ if( typeof( first ) === "object" && first && ( typeof(first.triggerScriptId)!='undefined' ) )
1206
+ {
1207
+ _request = triggerScriptId as carriers.CRMScript_ValidateTriggerScriptRequest;
1208
+ _options = webapi_options as base.WebApiRequestOptions;
1209
+ }
1210
+ else
1211
+ {
1212
+ _request = {
1213
+ triggerScriptId: triggerScriptId as number,
1214
+ };
1215
+ _options = webapi_options;
1216
+ }
1217
+ return this._validateTriggerScriptAsync( _request, _options );
1218
+ }
1219
+
1220
+
1221
+ private async _validateTriggerScriptByUniqueIdAsync(request: carriers.CRMScript_ValidateTriggerScriptByUniqueIdRequest, options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptResult > {
1222
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1223
+ base.WebApiBase.SetPending(options);
1224
+ return new Promise< carriers.CRMScriptResult >(async (resolve, reject) => {
1225
+ try {
1226
+ config.baseURL = this._options.baseUrl;
1227
+ const response = await this._axios.post("ValidateTriggerScriptByUniqueId", request , config);
1228
+ base.WebApiBase.SetCompleted(options);
1229
+ const res : carriers.CRMScriptResult = converters.Create_CRMScriptResult_From( response.data );
1230
+ resolve(res);
1231
+ }
1232
+ catch( err ) {
1233
+ base.WebApiBase.HandleError(options, config, err);
1234
+ reject(err);
1235
+ }
1236
+ });
1237
+ }
1238
+
1239
+
1240
+
1241
+ /**
1242
+ * Validate a Trigger CRMScript. This will check that the syntax is correct, but not execute the script.
1243
+ * @param request - TriggerScriptUniqueId
1244
+ * @returns True if the syntax is correct
1245
+ */
1246
+ public async validateTriggerScriptByUniqueIdAsync(request: carriers.CRMScript_ValidateTriggerScriptByUniqueIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptResult >;
1247
+
1248
+ /**
1249
+ * Validate a Trigger CRMScript. This will check that the syntax is correct, but not execute the script.
1250
+ * @param triggerScriptUniqueId - The unique id of the CRMScript to validate
1251
+ * @returns True if the syntax is correct
1252
+ */
1253
+ public async validateTriggerScriptByUniqueIdAsync(triggerScriptUniqueId: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptResult >;
1254
+
1255
+ public async validateTriggerScriptByUniqueIdAsync(triggerScriptUniqueId:string|carriers.CRMScript_ValidateTriggerScriptByUniqueIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptResult > {
1256
+ let _request : carriers.CRMScript_ValidateTriggerScriptByUniqueIdRequest = null;
1257
+ let _options : base.WebApiRequestOptions = null;
1258
+ const first : any = triggerScriptUniqueId;
1259
+ if( typeof( first ) === "object" && first && ( typeof(first.triggerScriptUniqueId)!='undefined' ) )
1260
+ {
1261
+ _request = triggerScriptUniqueId as carriers.CRMScript_ValidateTriggerScriptByUniqueIdRequest;
1262
+ _options = webapi_options as base.WebApiRequestOptions;
1263
+ }
1264
+ else
1265
+ {
1266
+ _request = {
1267
+ triggerScriptUniqueId: triggerScriptUniqueId as string,
1268
+ };
1269
+ _options = webapi_options;
1270
+ }
1271
+ return this._validateTriggerScriptByUniqueIdAsync( _request, _options );
1272
+ }
1273
+
1274
+ } // class v1CRMScriptAgentController
1275
+
1276
+