@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,794 @@
1
+ // <auto-generated>
2
+ // SuperOffice Code Generator
3
+ // modelling\templates\servicestswebapi\tswebapiagents.tt
4
+ // </auto-generated>
5
+ import * as base from './WebApiBase.js';
6
+ import * as converters from './Converters.js';
7
+ /**
8
+ * Manage and execute CRMScript functions.
9
+ */
10
+ export class CRMScriptAgent extends base.WebApiBase {
11
+ constructor(baseUrlOrOptions, langOrconfigOrRM, langOrResourceOrRM, cultureCode) {
12
+ const options = base.WebApiBase.FigureOutOptions(baseUrlOrOptions, langOrconfigOrRM, langOrResourceOrRM, cultureCode);
13
+ options.basePath = "v1/Agents/CRMScript/";
14
+ super(options);
15
+ }
16
+ /**
17
+ * Set default values into a new CRMScriptEntity.
18
+ * NetServer calculates default values on the entity, which is required when creating/storing a new instance
19
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
20
+ * @returns A blank entity.
21
+ */
22
+ async createDefaultCRMScriptEntityAsync(options) {
23
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
24
+ base.WebApiBase.SetPending(options);
25
+ return new Promise(async (resolve, reject) => {
26
+ try {
27
+ const response = await this._axios.post("CreateDefaultCRMScriptEntity", null, config);
28
+ base.WebApiBase.SetCompleted(options);
29
+ const res = converters.Create_CRMScriptEntity_From(response.data);
30
+ resolve(res);
31
+ }
32
+ catch (err) {
33
+ base.WebApiBase.HandleError(options, config, err);
34
+ reject(err);
35
+ }
36
+ });
37
+ }
38
+ /*
39
+ * Replace the existing CRMScriptEntity or creates a new CRMScriptEntity if the id parameter is empty
40
+ * @param entity - The CRMScriptEntity to be saved.
41
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
42
+ * @returns New or updated CRMScriptEntity
43
+ */
44
+ async saveCRMScriptEntityAsync(entity, options) {
45
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
46
+ base.WebApiBase.SetPending(options);
47
+ return new Promise(async (resolve, reject) => {
48
+ try {
49
+ const response = await this._axios.post("SaveCRMScriptEntity", entity, config);
50
+ base.WebApiBase.SetCompleted(options);
51
+ const res = converters.Create_CRMScriptEntity_From(response.data);
52
+ resolve(res);
53
+ }
54
+ catch (err) {
55
+ base.WebApiBase.HandleError(options, config, err);
56
+ reject(err);
57
+ }
58
+ });
59
+ }
60
+ /*
61
+ * Deletes the CRMScriptEntity
62
+ * @param CRMScriptEntityId - The id of the CRMScriptEntity to be deleted.
63
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
64
+ */
65
+ async deleteCRMScriptEntityAsync(CRMScriptEntityId, options) {
66
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
67
+ base.WebApiBase.SetPending(options);
68
+ return new Promise(async (resolve, reject) => {
69
+ try {
70
+ const response = await this._axios.post("DeleteCRMScriptEntity?CRMScriptEntityId=" + CRMScriptEntityId, null, config);
71
+ base.WebApiBase.SetCompleted(options);
72
+ const res = response.data;
73
+ resolve(res);
74
+ }
75
+ catch (err) {
76
+ base.WebApiBase.HandleError(options, config, err);
77
+ reject(err);
78
+ }
79
+ });
80
+ }
81
+ /**
82
+ * Set default values into a new TriggerScriptEntity.
83
+ * NetServer calculates default values on the entity, which is required when creating/storing a new instance
84
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
85
+ * @returns A blank entity.
86
+ */
87
+ async createDefaultTriggerScriptEntityAsync(options) {
88
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
89
+ base.WebApiBase.SetPending(options);
90
+ return new Promise(async (resolve, reject) => {
91
+ try {
92
+ const response = await this._axios.post("CreateDefaultTriggerScriptEntity", null, config);
93
+ base.WebApiBase.SetCompleted(options);
94
+ const res = converters.Create_TriggerScriptEntity_From(response.data);
95
+ resolve(res);
96
+ }
97
+ catch (err) {
98
+ base.WebApiBase.HandleError(options, config, err);
99
+ reject(err);
100
+ }
101
+ });
102
+ }
103
+ /*
104
+ * Replace the existing TriggerScriptEntity or creates a new TriggerScriptEntity if the id parameter is empty
105
+ * @param entity - The TriggerScriptEntity to be saved.
106
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
107
+ * @returns New or updated TriggerScriptEntity
108
+ */
109
+ async saveTriggerScriptEntityAsync(entity, options) {
110
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
111
+ base.WebApiBase.SetPending(options);
112
+ return new Promise(async (resolve, reject) => {
113
+ try {
114
+ const response = await this._axios.post("SaveTriggerScriptEntity", entity, config);
115
+ base.WebApiBase.SetCompleted(options);
116
+ const res = converters.Create_TriggerScriptEntity_From(response.data);
117
+ resolve(res);
118
+ }
119
+ catch (err) {
120
+ base.WebApiBase.HandleError(options, config, err);
121
+ reject(err);
122
+ }
123
+ });
124
+ }
125
+ /*
126
+ * Deletes the TriggerScriptEntity
127
+ * @param TriggerScriptEntityId - The id of the TriggerScriptEntity to be deleted.
128
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
129
+ */
130
+ async deleteTriggerScriptEntityAsync(TriggerScriptEntityId, options) {
131
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
132
+ base.WebApiBase.SetPending(options);
133
+ return new Promise(async (resolve, reject) => {
134
+ try {
135
+ const response = await this._axios.post("DeleteTriggerScriptEntity?TriggerScriptEntityId=" + TriggerScriptEntityId, null, config);
136
+ base.WebApiBase.SetCompleted(options);
137
+ const res = response.data;
138
+ resolve(res);
139
+ }
140
+ catch (err) {
141
+ base.WebApiBase.HandleError(options, config, err);
142
+ reject(err);
143
+ }
144
+ });
145
+ }
146
+ async _getCRMScriptByUniqueIdentifierAsync(request, options) {
147
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
148
+ base.WebApiBase.SetPending(options);
149
+ return new Promise(async (resolve, reject) => {
150
+ try {
151
+ config.baseURL = this._options.baseUrl;
152
+ const response = await this._axios.post("GetCRMScriptByUniqueIdentifier", request, config);
153
+ base.WebApiBase.SetCompleted(options);
154
+ const res = converters.Create_Script_From(response.data);
155
+ resolve(res);
156
+ }
157
+ catch (err) {
158
+ base.WebApiBase.HandleError(options, config, err);
159
+ reject(err);
160
+ }
161
+ });
162
+ }
163
+ async getCRMScriptByUniqueIdentifierAsync(uniqueIdentifier, webapi_options) {
164
+ let _request = null;
165
+ let _options = null;
166
+ const first = uniqueIdentifier;
167
+ if (typeof (first) === "object" && first && (typeof (first.uniqueIdentifier) != 'undefined')) {
168
+ _request = uniqueIdentifier;
169
+ _options = webapi_options;
170
+ }
171
+ else {
172
+ _request = {
173
+ uniqueIdentifier: uniqueIdentifier,
174
+ };
175
+ _options = webapi_options;
176
+ }
177
+ return this._getCRMScriptByUniqueIdentifierAsync(_request, _options);
178
+ }
179
+ async _saveCRMScriptByUniqueIdentifierAsync(request, options) {
180
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
181
+ base.WebApiBase.SetPending(options);
182
+ return new Promise(async (resolve, reject) => {
183
+ try {
184
+ config.baseURL = this._options.baseUrl;
185
+ const response = await this._axios.post("SaveCRMScriptByUniqueIdentifier", request, config);
186
+ base.WebApiBase.SetCompleted(options);
187
+ const res = converters.Create_Script_From(response.data);
188
+ resolve(res);
189
+ }
190
+ catch (err) {
191
+ base.WebApiBase.HandleError(options, config, err);
192
+ reject(err);
193
+ }
194
+ });
195
+ }
196
+ async saveCRMScriptByUniqueIdentifierAsync(uniqueIdentifier, crmscript, webapi_options) {
197
+ let _request = null;
198
+ let _options = null;
199
+ const first = uniqueIdentifier;
200
+ if (typeof (first) === "object" && first && (typeof (first.uniqueIdentifier) != 'undefined' || typeof (first.crmscript) != 'undefined')) {
201
+ _request = uniqueIdentifier;
202
+ _options = crmscript;
203
+ }
204
+ else {
205
+ _request = {
206
+ uniqueIdentifier: uniqueIdentifier,
207
+ crmscript: crmscript,
208
+ };
209
+ _options = webapi_options;
210
+ }
211
+ return this._saveCRMScriptByUniqueIdentifierAsync(_request, _options);
212
+ }
213
+ async _deleteCRMScriptByUniqueIdentifierAsync(request, options) {
214
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
215
+ base.WebApiBase.SetPending(options);
216
+ return new Promise(async (resolve, reject) => {
217
+ try {
218
+ config.baseURL = this._options.baseUrl;
219
+ const response = await this._axios.post("DeleteCRMScriptByUniqueIdentifier", request, config);
220
+ base.WebApiBase.SetCompleted(options);
221
+ const res = response.data;
222
+ resolve(res);
223
+ }
224
+ catch (err) {
225
+ base.WebApiBase.HandleError(options, config, err);
226
+ reject(err);
227
+ }
228
+ });
229
+ }
230
+ async deleteCRMScriptByUniqueIdentifierAsync(uniqueIdentifier, webapi_options) {
231
+ let _request = null;
232
+ let _options = null;
233
+ const first = uniqueIdentifier;
234
+ if (typeof (first) === "object" && first && (typeof (first.uniqueIdentifier) != 'undefined')) {
235
+ _request = uniqueIdentifier;
236
+ _options = webapi_options;
237
+ }
238
+ else {
239
+ _request = {
240
+ uniqueIdentifier: uniqueIdentifier,
241
+ };
242
+ _options = webapi_options;
243
+ }
244
+ return this._deleteCRMScriptByUniqueIdentifierAsync(_request, _options);
245
+ }
246
+ /*
247
+ * Gets a CRMScriptEntity object.
248
+ * @param cRMScriptEntityId - The primary key.
249
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
250
+ * @returns A single CRMScriptEntity
251
+ */
252
+ async getCRMScriptEntityAsync(cRMScriptEntityId, options) {
253
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
254
+ base.WebApiBase.SetPending(options);
255
+ return new Promise(async (resolve, reject) => {
256
+ try {
257
+ const response = await this._axios.post("GetCRMScriptEntity?cRMScriptEntityId=" + cRMScriptEntityId, null, config);
258
+ base.WebApiBase.SetCompleted(options);
259
+ const res = converters.Create_CRMScriptEntity_From(response.data);
260
+ resolve(res);
261
+ }
262
+ catch (err) {
263
+ base.WebApiBase.HandleError(options, config, err);
264
+ reject(err);
265
+ }
266
+ });
267
+ }
268
+ async _executeScriptAsync(request, options) {
269
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
270
+ base.WebApiBase.SetPending(options);
271
+ return new Promise(async (resolve, reject) => {
272
+ try {
273
+ config.baseURL = this._options.baseUrl;
274
+ const response = await this._axios.post("ExecuteScript", request, config);
275
+ base.WebApiBase.SetCompleted(options);
276
+ const res = response.data;
277
+ resolve(res);
278
+ }
279
+ catch (err) {
280
+ base.WebApiBase.HandleError(options, config, err);
281
+ reject(err);
282
+ }
283
+ });
284
+ }
285
+ async executeScriptAsync(crmScriptId, parameters, webapi_options) {
286
+ let _request = null;
287
+ let _options = null;
288
+ const first = crmScriptId;
289
+ if (typeof (first) === "object" && first && (typeof (first.crmScriptId) != 'undefined' || typeof (first.parameters) != 'undefined')) {
290
+ _request = crmScriptId;
291
+ _options = parameters;
292
+ }
293
+ else {
294
+ _request = {
295
+ crmScriptId: crmScriptId,
296
+ parameters: parameters,
297
+ };
298
+ _options = webapi_options;
299
+ }
300
+ return this._executeScriptAsync(_request, _options);
301
+ }
302
+ async _executeScriptByIncludeIdAsync(request, options) {
303
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
304
+ base.WebApiBase.SetPending(options);
305
+ return new Promise(async (resolve, reject) => {
306
+ try {
307
+ config.baseURL = this._options.baseUrl;
308
+ const response = await this._axios.post("ExecuteScriptByIncludeId", request, config);
309
+ base.WebApiBase.SetCompleted(options);
310
+ const res = response.data;
311
+ resolve(res);
312
+ }
313
+ catch (err) {
314
+ base.WebApiBase.HandleError(options, config, err);
315
+ reject(err);
316
+ }
317
+ });
318
+ }
319
+ async executeScriptByIncludeIdAsync(crmScriptIncludeId, parameters, webapi_options) {
320
+ let _request = null;
321
+ let _options = null;
322
+ const first = crmScriptIncludeId;
323
+ if (typeof (first) === "object" && first && (typeof (first.crmScriptIncludeId) != 'undefined' || typeof (first.parameters) != 'undefined')) {
324
+ _request = crmScriptIncludeId;
325
+ _options = parameters;
326
+ }
327
+ else {
328
+ _request = {
329
+ crmScriptIncludeId: crmScriptIncludeId,
330
+ parameters: parameters,
331
+ };
332
+ _options = webapi_options;
333
+ }
334
+ return this._executeScriptByIncludeIdAsync(_request, _options);
335
+ }
336
+ async _executeScriptByUniqueIdAsync(request, options) {
337
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
338
+ base.WebApiBase.SetPending(options);
339
+ return new Promise(async (resolve, reject) => {
340
+ try {
341
+ config.baseURL = this._options.baseUrl;
342
+ const response = await this._axios.post("ExecuteScriptByUniqueId", request, config);
343
+ base.WebApiBase.SetCompleted(options);
344
+ const res = response.data;
345
+ resolve(res);
346
+ }
347
+ catch (err) {
348
+ base.WebApiBase.HandleError(options, config, err);
349
+ reject(err);
350
+ }
351
+ });
352
+ }
353
+ async executeScriptByUniqueIdAsync(crmScriptUniqueId, parameters, webapi_options) {
354
+ let _request = null;
355
+ let _options = null;
356
+ const first = crmScriptUniqueId;
357
+ if (typeof (first) === "object" && first && (typeof (first.crmScriptUniqueId) != 'undefined' || typeof (first.parameters) != 'undefined')) {
358
+ _request = crmScriptUniqueId;
359
+ _options = parameters;
360
+ }
361
+ else {
362
+ _request = {
363
+ crmScriptUniqueId: crmScriptUniqueId,
364
+ parameters: parameters,
365
+ };
366
+ _options = webapi_options;
367
+ }
368
+ return this._executeScriptByUniqueIdAsync(_request, _options);
369
+ }
370
+ async _executeScriptAsEventAsync(request, options) {
371
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
372
+ base.WebApiBase.SetPending(options);
373
+ return new Promise(async (resolve, reject) => {
374
+ try {
375
+ config.baseURL = this._options.baseUrl;
376
+ const response = await this._axios.post("ExecuteScriptAsEvent", request, config);
377
+ base.WebApiBase.SetCompleted(options);
378
+ const res = converters.Create_EventData_From(response.data);
379
+ resolve(res);
380
+ }
381
+ catch (err) {
382
+ base.WebApiBase.HandleError(options, config, err);
383
+ reject(err);
384
+ }
385
+ });
386
+ }
387
+ async executeScriptAsEventAsync(crmScriptId, eventData, webapi_options) {
388
+ let _request = null;
389
+ let _options = null;
390
+ const first = crmScriptId;
391
+ if (typeof (first) === "object" && first && (typeof (first.crmScriptId) != 'undefined' || typeof (first.eventData) != 'undefined')) {
392
+ _request = crmScriptId;
393
+ _options = eventData;
394
+ }
395
+ else {
396
+ _request = {
397
+ crmScriptId: crmScriptId,
398
+ eventData: eventData,
399
+ };
400
+ _options = webapi_options;
401
+ }
402
+ return this._executeScriptAsEventAsync(_request, _options);
403
+ }
404
+ async _executeScriptAsEventByUniqueIdAsync(request, options) {
405
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
406
+ base.WebApiBase.SetPending(options);
407
+ return new Promise(async (resolve, reject) => {
408
+ try {
409
+ config.baseURL = this._options.baseUrl;
410
+ const response = await this._axios.post("ExecuteScriptAsEventByUniqueId", request, config);
411
+ base.WebApiBase.SetCompleted(options);
412
+ const res = converters.Create_EventData_From(response.data);
413
+ resolve(res);
414
+ }
415
+ catch (err) {
416
+ base.WebApiBase.HandleError(options, config, err);
417
+ reject(err);
418
+ }
419
+ });
420
+ }
421
+ async executeScriptAsEventByUniqueIdAsync(crmScriptUniqueId, eventData, webapi_options) {
422
+ let _request = null;
423
+ let _options = null;
424
+ const first = crmScriptUniqueId;
425
+ if (typeof (first) === "object" && first && (typeof (first.crmScriptUniqueId) != 'undefined' || typeof (first.eventData) != 'undefined')) {
426
+ _request = crmScriptUniqueId;
427
+ _options = eventData;
428
+ }
429
+ else {
430
+ _request = {
431
+ crmScriptUniqueId: crmScriptUniqueId,
432
+ eventData: eventData,
433
+ };
434
+ _options = webapi_options;
435
+ }
436
+ return this._executeScriptAsEventByUniqueIdAsync(_request, _options);
437
+ }
438
+ async _validateScriptAsync(request, options) {
439
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
440
+ base.WebApiBase.SetPending(options);
441
+ return new Promise(async (resolve, reject) => {
442
+ try {
443
+ config.baseURL = this._options.baseUrl;
444
+ const response = await this._axios.post("ValidateScript", request, config);
445
+ base.WebApiBase.SetCompleted(options);
446
+ const res = converters.Create_CRMScriptResult_From(response.data);
447
+ resolve(res);
448
+ }
449
+ catch (err) {
450
+ base.WebApiBase.HandleError(options, config, err);
451
+ reject(err);
452
+ }
453
+ });
454
+ }
455
+ async validateScriptAsync(crmScriptId, webapi_options) {
456
+ let _request = null;
457
+ let _options = null;
458
+ const first = crmScriptId;
459
+ if (typeof (first) === "object" && first && (typeof (first.crmScriptId) != 'undefined')) {
460
+ _request = crmScriptId;
461
+ _options = webapi_options;
462
+ }
463
+ else {
464
+ _request = {
465
+ crmScriptId: crmScriptId,
466
+ };
467
+ _options = webapi_options;
468
+ }
469
+ return this._validateScriptAsync(_request, _options);
470
+ }
471
+ async _validateScriptByIncludeIdAsync(request, options) {
472
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
473
+ base.WebApiBase.SetPending(options);
474
+ return new Promise(async (resolve, reject) => {
475
+ try {
476
+ config.baseURL = this._options.baseUrl;
477
+ const response = await this._axios.post("ValidateScriptByIncludeId", request, config);
478
+ base.WebApiBase.SetCompleted(options);
479
+ const res = converters.Create_CRMScriptResult_From(response.data);
480
+ resolve(res);
481
+ }
482
+ catch (err) {
483
+ base.WebApiBase.HandleError(options, config, err);
484
+ reject(err);
485
+ }
486
+ });
487
+ }
488
+ async validateScriptByIncludeIdAsync(crmScriptIncludeId, webapi_options) {
489
+ let _request = null;
490
+ let _options = null;
491
+ const first = crmScriptIncludeId;
492
+ if (typeof (first) === "object" && first && (typeof (first.crmScriptIncludeId) != 'undefined')) {
493
+ _request = crmScriptIncludeId;
494
+ _options = webapi_options;
495
+ }
496
+ else {
497
+ _request = {
498
+ crmScriptIncludeId: crmScriptIncludeId,
499
+ };
500
+ _options = webapi_options;
501
+ }
502
+ return this._validateScriptByIncludeIdAsync(_request, _options);
503
+ }
504
+ async _validateScriptByUniqueIdAsync(request, options) {
505
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
506
+ base.WebApiBase.SetPending(options);
507
+ return new Promise(async (resolve, reject) => {
508
+ try {
509
+ config.baseURL = this._options.baseUrl;
510
+ const response = await this._axios.post("ValidateScriptByUniqueId", request, config);
511
+ base.WebApiBase.SetCompleted(options);
512
+ const res = converters.Create_CRMScriptResult_From(response.data);
513
+ resolve(res);
514
+ }
515
+ catch (err) {
516
+ base.WebApiBase.HandleError(options, config, err);
517
+ reject(err);
518
+ }
519
+ });
520
+ }
521
+ async validateScriptByUniqueIdAsync(crmScriptUniqueId, webapi_options) {
522
+ let _request = null;
523
+ let _options = null;
524
+ const first = crmScriptUniqueId;
525
+ if (typeof (first) === "object" && first && (typeof (first.crmScriptUniqueId) != 'undefined')) {
526
+ _request = crmScriptUniqueId;
527
+ _options = webapi_options;
528
+ }
529
+ else {
530
+ _request = {
531
+ crmScriptUniqueId: crmScriptUniqueId,
532
+ };
533
+ _options = webapi_options;
534
+ }
535
+ return this._validateScriptByUniqueIdAsync(_request, _options);
536
+ }
537
+ async _executeScriptByStringAsync(request, options) {
538
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
539
+ base.WebApiBase.SetPending(options);
540
+ return new Promise(async (resolve, reject) => {
541
+ try {
542
+ config.baseURL = this._options.baseUrl;
543
+ const response = await this._axios.post("ExecuteScriptByString", request, config);
544
+ base.WebApiBase.SetCompleted(options);
545
+ const res = converters.Create_CRMScriptRunResult_From(response.data);
546
+ resolve(res);
547
+ }
548
+ catch (err) {
549
+ base.WebApiBase.HandleError(options, config, err);
550
+ reject(err);
551
+ }
552
+ });
553
+ }
554
+ async executeScriptByStringAsync(script, parameters, eventData, webapi_options) {
555
+ let _request = null;
556
+ let _options = null;
557
+ const first = script;
558
+ if (typeof (first) === "object" && first && (typeof (first.script) != 'undefined' || typeof (first.parameters) != 'undefined' || typeof (first.eventData) != 'undefined')) {
559
+ _request = script;
560
+ _options = parameters;
561
+ }
562
+ else {
563
+ _request = {
564
+ script: script,
565
+ parameters: parameters,
566
+ eventData: eventData,
567
+ };
568
+ _options = webapi_options;
569
+ }
570
+ return this._executeScriptByStringAsync(_request, _options);
571
+ }
572
+ async _validateScriptByStringAsync(request, options) {
573
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
574
+ base.WebApiBase.SetPending(options);
575
+ return new Promise(async (resolve, reject) => {
576
+ try {
577
+ config.baseURL = this._options.baseUrl;
578
+ const response = await this._axios.post("ValidateScriptByString", request, config);
579
+ base.WebApiBase.SetCompleted(options);
580
+ const res = converters.Create_CRMScriptResult_From(response.data);
581
+ resolve(res);
582
+ }
583
+ catch (err) {
584
+ base.WebApiBase.HandleError(options, config, err);
585
+ reject(err);
586
+ }
587
+ });
588
+ }
589
+ async validateScriptByStringAsync(script, webapi_options) {
590
+ let _request = null;
591
+ let _options = null;
592
+ const first = script;
593
+ if (typeof (first) === "object" && first && (typeof (first.script) != 'undefined')) {
594
+ _request = script;
595
+ _options = webapi_options;
596
+ }
597
+ else {
598
+ _request = {
599
+ script: script,
600
+ };
601
+ _options = webapi_options;
602
+ }
603
+ return this._validateScriptByStringAsync(_request, _options);
604
+ }
605
+ /*
606
+ * Gets a TriggerScriptEntity object.
607
+ * @param triggerScriptEntityId - The primary key.
608
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
609
+ * @returns A single TriggerScriptEntity
610
+ */
611
+ async getTriggerScriptEntityAsync(triggerScriptEntityId, options) {
612
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
613
+ base.WebApiBase.SetPending(options);
614
+ return new Promise(async (resolve, reject) => {
615
+ try {
616
+ const response = await this._axios.post("GetTriggerScriptEntity?triggerScriptEntityId=" + triggerScriptEntityId, null, config);
617
+ base.WebApiBase.SetCompleted(options);
618
+ const res = converters.Create_TriggerScriptEntity_From(response.data);
619
+ resolve(res);
620
+ }
621
+ catch (err) {
622
+ base.WebApiBase.HandleError(options, config, err);
623
+ reject(err);
624
+ }
625
+ });
626
+ }
627
+ async _getTriggerScriptByUniqueIdAsync(request, options) {
628
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
629
+ base.WebApiBase.SetPending(options);
630
+ return new Promise(async (resolve, reject) => {
631
+ try {
632
+ config.baseURL = this._options.baseUrl;
633
+ const response = await this._axios.post("GetTriggerScriptByUniqueId", request, config);
634
+ base.WebApiBase.SetCompleted(options);
635
+ const res = converters.Create_TriggerScriptEntity_From(response.data);
636
+ resolve(res);
637
+ }
638
+ catch (err) {
639
+ base.WebApiBase.HandleError(options, config, err);
640
+ reject(err);
641
+ }
642
+ });
643
+ }
644
+ async getTriggerScriptByUniqueIdAsync(triggerScriptUniqueId, webapi_options) {
645
+ let _request = null;
646
+ let _options = null;
647
+ const first = triggerScriptUniqueId;
648
+ if (typeof (first) === "object" && first && (typeof (first.triggerScriptUniqueId) != 'undefined')) {
649
+ _request = triggerScriptUniqueId;
650
+ _options = webapi_options;
651
+ }
652
+ else {
653
+ _request = {
654
+ triggerScriptUniqueId: triggerScriptUniqueId,
655
+ };
656
+ _options = webapi_options;
657
+ }
658
+ return this._getTriggerScriptByUniqueIdAsync(_request, _options);
659
+ }
660
+ async _saveTriggerScriptByUniqueIdAsync(request, options) {
661
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
662
+ base.WebApiBase.SetPending(options);
663
+ return new Promise(async (resolve, reject) => {
664
+ try {
665
+ config.baseURL = this._options.baseUrl;
666
+ const response = await this._axios.post("SaveTriggerScriptByUniqueId", request, config);
667
+ base.WebApiBase.SetCompleted(options);
668
+ const res = converters.Create_TriggerScriptEntity_From(response.data);
669
+ resolve(res);
670
+ }
671
+ catch (err) {
672
+ base.WebApiBase.HandleError(options, config, err);
673
+ reject(err);
674
+ }
675
+ });
676
+ }
677
+ async saveTriggerScriptByUniqueIdAsync(triggerScriptUniqueId, entity, webapi_options) {
678
+ let _request = null;
679
+ let _options = null;
680
+ const first = triggerScriptUniqueId;
681
+ if (typeof (first) === "object" && first && (typeof (first.triggerScriptUniqueId) != 'undefined' || typeof (first.entity) != 'undefined')) {
682
+ _request = triggerScriptUniqueId;
683
+ _options = entity;
684
+ }
685
+ else {
686
+ _request = {
687
+ triggerScriptUniqueId: triggerScriptUniqueId,
688
+ entity: entity,
689
+ };
690
+ _options = webapi_options;
691
+ }
692
+ return this._saveTriggerScriptByUniqueIdAsync(_request, _options);
693
+ }
694
+ async _deleteTriggerScriptByUniqueIdAsync(request, options) {
695
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
696
+ base.WebApiBase.SetPending(options);
697
+ return new Promise(async (resolve, reject) => {
698
+ try {
699
+ config.baseURL = this._options.baseUrl;
700
+ const response = await this._axios.post("DeleteTriggerScriptByUniqueId", request, config);
701
+ base.WebApiBase.SetCompleted(options);
702
+ const res = response.data;
703
+ resolve(res);
704
+ }
705
+ catch (err) {
706
+ base.WebApiBase.HandleError(options, config, err);
707
+ reject(err);
708
+ }
709
+ });
710
+ }
711
+ async deleteTriggerScriptByUniqueIdAsync(triggerScriptUniqueId, webapi_options) {
712
+ let _request = null;
713
+ let _options = null;
714
+ const first = triggerScriptUniqueId;
715
+ if (typeof (first) === "object" && first && (typeof (first.triggerScriptUniqueId) != 'undefined')) {
716
+ _request = triggerScriptUniqueId;
717
+ _options = webapi_options;
718
+ }
719
+ else {
720
+ _request = {
721
+ triggerScriptUniqueId: triggerScriptUniqueId,
722
+ };
723
+ _options = webapi_options;
724
+ }
725
+ return this._deleteTriggerScriptByUniqueIdAsync(_request, _options);
726
+ }
727
+ async _validateTriggerScriptAsync(request, options) {
728
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
729
+ base.WebApiBase.SetPending(options);
730
+ return new Promise(async (resolve, reject) => {
731
+ try {
732
+ config.baseURL = this._options.baseUrl;
733
+ const response = await this._axios.post("ValidateTriggerScript", request, config);
734
+ base.WebApiBase.SetCompleted(options);
735
+ const res = converters.Create_CRMScriptResult_From(response.data);
736
+ resolve(res);
737
+ }
738
+ catch (err) {
739
+ base.WebApiBase.HandleError(options, config, err);
740
+ reject(err);
741
+ }
742
+ });
743
+ }
744
+ async validateTriggerScriptAsync(triggerScriptId, webapi_options) {
745
+ let _request = null;
746
+ let _options = null;
747
+ const first = triggerScriptId;
748
+ if (typeof (first) === "object" && first && (typeof (first.triggerScriptId) != 'undefined')) {
749
+ _request = triggerScriptId;
750
+ _options = webapi_options;
751
+ }
752
+ else {
753
+ _request = {
754
+ triggerScriptId: triggerScriptId,
755
+ };
756
+ _options = webapi_options;
757
+ }
758
+ return this._validateTriggerScriptAsync(_request, _options);
759
+ }
760
+ async _validateTriggerScriptByUniqueIdAsync(request, options) {
761
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
762
+ base.WebApiBase.SetPending(options);
763
+ return new Promise(async (resolve, reject) => {
764
+ try {
765
+ config.baseURL = this._options.baseUrl;
766
+ const response = await this._axios.post("ValidateTriggerScriptByUniqueId", request, config);
767
+ base.WebApiBase.SetCompleted(options);
768
+ const res = 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
+ async validateTriggerScriptByUniqueIdAsync(triggerScriptUniqueId, webapi_options) {
778
+ let _request = null;
779
+ let _options = null;
780
+ const first = triggerScriptUniqueId;
781
+ if (typeof (first) === "object" && first && (typeof (first.triggerScriptUniqueId) != 'undefined')) {
782
+ _request = triggerScriptUniqueId;
783
+ _options = webapi_options;
784
+ }
785
+ else {
786
+ _request = {
787
+ triggerScriptUniqueId: triggerScriptUniqueId,
788
+ };
789
+ _options = webapi_options;
790
+ }
791
+ return this._validateTriggerScriptByUniqueIdAsync(_request, _options);
792
+ }
793
+ } // class v1CRMScriptAgentController
794
+ //# sourceMappingURL=CRMScriptAgent.js.map