@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,3053 @@
1
+ // <auto-generated>
2
+ // SuperOffice Code Generator
3
+ // modelling\templates\servicestswebapi\tswebapiagents.tt
4
+ // </auto-generated>
5
+ import * as base from './WebApiBase.js';
6
+ import * as converters from './Converters.js';
7
+ import { FromBase64ToString, ToBase64 } from './Base64.js';
8
+ /**
9
+ * Collection of all services that works with Document data. This is services for the document information, not the physical document themselves. These are handled by the BLOB service methods.
10
+ */
11
+ export class DocumentAgent extends base.WebApiBase {
12
+ constructor(baseUrlOrOptions, langOrconfigOrRM, langOrResourceOrRM, cultureCode) {
13
+ const options = base.WebApiBase.FigureOutOptions(baseUrlOrOptions, langOrconfigOrRM, langOrResourceOrRM, cultureCode);
14
+ options.basePath = "v1/Agents/Document/";
15
+ super(options);
16
+ }
17
+ /**
18
+ * Set default values into a new DocumentEntity.
19
+ * NetServer calculates default values on the entity, which is required when creating/storing a new instance
20
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
21
+ * @returns A blank entity.
22
+ */
23
+ async createDefaultDocumentEntityAsync(options) {
24
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
25
+ base.WebApiBase.SetPending(options);
26
+ return new Promise(async (resolve, reject) => {
27
+ try {
28
+ const response = await this._axios.post("CreateDefaultDocumentEntity", null, config);
29
+ base.WebApiBase.SetCompleted(options);
30
+ const res = converters.Create_DocumentEntity_From(response.data);
31
+ resolve(res);
32
+ }
33
+ catch (err) {
34
+ base.WebApiBase.HandleError(options, config, err);
35
+ reject(err);
36
+ }
37
+ });
38
+ }
39
+ /*
40
+ * Replace the existing DocumentEntity or creates a new DocumentEntity if the id parameter is empty
41
+ * @param entity - The DocumentEntity to be saved.
42
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
43
+ * @returns New or updated DocumentEntity
44
+ */
45
+ async saveDocumentEntityAsync(entity, options) {
46
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
47
+ base.WebApiBase.SetPending(options);
48
+ return new Promise(async (resolve, reject) => {
49
+ try {
50
+ const response = await this._axios.post("SaveDocumentEntity", entity, config);
51
+ base.WebApiBase.SetCompleted(options);
52
+ const res = converters.Create_DocumentEntity_From(response.data);
53
+ resolve(res);
54
+ }
55
+ catch (err) {
56
+ base.WebApiBase.HandleError(options, config, err);
57
+ reject(err);
58
+ }
59
+ });
60
+ }
61
+ /*
62
+ * Deletes the DocumentEntity
63
+ * @param DocumentEntityId - The id of the DocumentEntity to be deleted.
64
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
65
+ */
66
+ async deleteDocumentEntityAsync(DocumentEntityId, options) {
67
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
68
+ base.WebApiBase.SetPending(options);
69
+ return new Promise(async (resolve, reject) => {
70
+ try {
71
+ const response = await this._axios.post("DeleteDocumentEntity?DocumentEntityId=" + DocumentEntityId, null, config);
72
+ base.WebApiBase.SetCompleted(options);
73
+ const res = response.data;
74
+ resolve(res);
75
+ }
76
+ catch (err) {
77
+ base.WebApiBase.HandleError(options, config, err);
78
+ reject(err);
79
+ }
80
+ });
81
+ }
82
+ /**
83
+ * Set default values into a new DocumentPreview.
84
+ * NetServer calculates default values on the entity, which is required when creating/storing a new instance
85
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
86
+ * @returns A blank entity.
87
+ */
88
+ async createDefaultDocumentPreviewAsync(options) {
89
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
90
+ base.WebApiBase.SetPending(options);
91
+ return new Promise(async (resolve, reject) => {
92
+ try {
93
+ const response = await this._axios.post("CreateDefaultDocumentPreview", null, config);
94
+ base.WebApiBase.SetCompleted(options);
95
+ const res = converters.Create_DocumentPreview_From(response.data);
96
+ resolve(res);
97
+ }
98
+ catch (err) {
99
+ base.WebApiBase.HandleError(options, config, err);
100
+ reject(err);
101
+ }
102
+ });
103
+ }
104
+ /**
105
+ * Set default values into a new SuggestedDocumentEntity.
106
+ * NetServer calculates default values on the entity, which is required when creating/storing a new instance
107
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
108
+ * @returns A blank entity.
109
+ */
110
+ async createDefaultSuggestedDocumentEntityAsync(options) {
111
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
112
+ base.WebApiBase.SetPending(options);
113
+ return new Promise(async (resolve, reject) => {
114
+ try {
115
+ const response = await this._axios.post("CreateDefaultSuggestedDocumentEntity", null, config);
116
+ base.WebApiBase.SetCompleted(options);
117
+ const res = converters.Create_SuggestedDocumentEntity_From(response.data);
118
+ resolve(res);
119
+ }
120
+ catch (err) {
121
+ base.WebApiBase.HandleError(options, config, err);
122
+ reject(err);
123
+ }
124
+ });
125
+ }
126
+ /*
127
+ * Replace the existing SuggestedDocumentEntity or creates a new SuggestedDocumentEntity if the id parameter is empty
128
+ * @param entity - The SuggestedDocumentEntity to be saved.
129
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
130
+ * @returns New or updated SuggestedDocumentEntity
131
+ */
132
+ async saveSuggestedDocumentEntityAsync(entity, options) {
133
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
134
+ base.WebApiBase.SetPending(options);
135
+ return new Promise(async (resolve, reject) => {
136
+ try {
137
+ const response = await this._axios.post("SaveSuggestedDocumentEntity", entity, config);
138
+ base.WebApiBase.SetCompleted(options);
139
+ const res = converters.Create_SuggestedDocumentEntity_From(response.data);
140
+ resolve(res);
141
+ }
142
+ catch (err) {
143
+ base.WebApiBase.HandleError(options, config, err);
144
+ reject(err);
145
+ }
146
+ });
147
+ }
148
+ /**
149
+ * Set default values into a new TemplateVariablesParameters.
150
+ * NetServer calculates default values on the entity, which is required when creating/storing a new instance
151
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
152
+ * @returns A blank entity.
153
+ */
154
+ async createDefaultTemplateVariablesParametersAsync(options) {
155
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
156
+ base.WebApiBase.SetPending(options);
157
+ return new Promise(async (resolve, reject) => {
158
+ try {
159
+ const response = await this._axios.post("CreateDefaultTemplateVariablesParameters", null, config);
160
+ base.WebApiBase.SetCompleted(options);
161
+ const res = converters.Create_TemplateVariablesParameters_From(response.data);
162
+ resolve(res);
163
+ }
164
+ catch (err) {
165
+ base.WebApiBase.HandleError(options, config, err);
166
+ reject(err);
167
+ }
168
+ });
169
+ }
170
+ /*
171
+ * Gets a Document object.
172
+ * @param documentId - The primary key.
173
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
174
+ * @returns A single Document
175
+ */
176
+ async getDocumentAsync(documentId, options) {
177
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
178
+ base.WebApiBase.SetPending(options);
179
+ return new Promise(async (resolve, reject) => {
180
+ try {
181
+ const response = await this._axios.post("GetDocument?documentId=" + documentId, null, config);
182
+ base.WebApiBase.SetCompleted(options);
183
+ const res = converters.Create_Document_From(response.data);
184
+ resolve(res);
185
+ }
186
+ catch (err) {
187
+ base.WebApiBase.HandleError(options, config, err);
188
+ reject(err);
189
+ }
190
+ });
191
+ }
192
+ /*
193
+ * Gets a DocumentEntity object.
194
+ * @param documentEntityId - The primary key.
195
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
196
+ * @returns A single DocumentEntity
197
+ */
198
+ async getDocumentEntityAsync(documentEntityId, options) {
199
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
200
+ base.WebApiBase.SetPending(options);
201
+ return new Promise(async (resolve, reject) => {
202
+ try {
203
+ const response = await this._axios.post("GetDocumentEntity?documentEntityId=" + documentEntityId, null, config);
204
+ base.WebApiBase.SetCompleted(options);
205
+ const res = converters.Create_DocumentEntity_From(response.data);
206
+ resolve(res);
207
+ }
208
+ catch (err) {
209
+ base.WebApiBase.HandleError(options, config, err);
210
+ reject(err);
211
+ }
212
+ });
213
+ }
214
+ async _getDocumentStreamFromEntityAsync(request, options) {
215
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options) || {};
216
+ base.WebApiBase.SetPending(options);
217
+ return new Promise(async (resolve, reject) => {
218
+ try {
219
+ if (!options || options.returnBlobAs == base.ReturnBlobType.AsArrayBuffer) {
220
+ config.responseType = "arraybuffer";
221
+ config.headers = config.headers || {};
222
+ config.headers["Accept"] = "application/octet-stream";
223
+ }
224
+ config.baseURL = this._options.baseUrl;
225
+ const response = await this._axios.post("GetDocumentStreamFromEntity", request, config);
226
+ base.WebApiBase.SetCompleted(options);
227
+ let res = null;
228
+ if (options && options.returnBlobAs != base.ReturnBlobType.AsArrayBuffer) {
229
+ res = response.data;
230
+ if (options.returnBlobAs == base.ReturnBlobType.AsString) {
231
+ res = FromBase64ToString(res);
232
+ }
233
+ }
234
+ else {
235
+ res = response.data;
236
+ }
237
+ resolve(res);
238
+ }
239
+ catch (err) {
240
+ base.WebApiBase.HandleError(options, config, err);
241
+ reject(err);
242
+ }
243
+ });
244
+ }
245
+ async getDocumentStreamFromEntityAsync(documentEntity, webapi_options) {
246
+ let _request = null;
247
+ let _options = null;
248
+ const first = documentEntity;
249
+ if (typeof (first) === "object" && first && (typeof (first.documentEntity) != 'undefined')) {
250
+ _request = documentEntity;
251
+ _options = webapi_options;
252
+ }
253
+ else {
254
+ _request = {
255
+ documentEntity: documentEntity,
256
+ };
257
+ _options = webapi_options;
258
+ }
259
+ return this._getDocumentStreamFromEntityAsync(_request, _options);
260
+ }
261
+ async _setDocumentStreamAsync(request, options) {
262
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
263
+ base.WebApiBase.SetPending(options);
264
+ return new Promise(async (resolve, reject) => {
265
+ try {
266
+ config.baseURL = this._options.baseUrl;
267
+ const response = await this._axios.post("SetDocumentStream", request, config);
268
+ base.WebApiBase.SetCompleted(options);
269
+ const res = converters.Create_DocumentEntity_From(response.data);
270
+ resolve(res);
271
+ }
272
+ catch (err) {
273
+ base.WebApiBase.HandleError(options, config, err);
274
+ reject(err);
275
+ }
276
+ });
277
+ }
278
+ async setDocumentStreamAsync(documentEntity, stream, overwriteExistingData, webapi_options) {
279
+ let _request = null;
280
+ let _options = null;
281
+ const first = documentEntity;
282
+ if (typeof (first) === "object" && first && (typeof (first.documentEntity) != 'undefined' || typeof (first.stream) != 'undefined' || typeof (first.overwriteExistingData) != 'undefined')) {
283
+ _request = documentEntity;
284
+ _options = stream;
285
+ }
286
+ else {
287
+ _request = {
288
+ documentEntity: documentEntity,
289
+ stream: stream,
290
+ overwriteExistingData: overwriteExistingData,
291
+ };
292
+ _options = webapi_options;
293
+ }
294
+ _request.stream = ToBase64(_request.stream);
295
+ return this._setDocumentStreamAsync(_request, _options);
296
+ }
297
+ async _createDocumentStreamAsync(request, options) {
298
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options) || {};
299
+ base.WebApiBase.SetPending(options);
300
+ return new Promise(async (resolve, reject) => {
301
+ try {
302
+ if (!options || options.returnBlobAs == base.ReturnBlobType.AsArrayBuffer) {
303
+ config.responseType = "arraybuffer";
304
+ config.headers = config.headers || {};
305
+ config.headers["Accept"] = "application/octet-stream";
306
+ }
307
+ config.baseURL = this._options.baseUrl;
308
+ const response = await this._axios.post("CreateDocumentStream", request, config);
309
+ base.WebApiBase.SetCompleted(options);
310
+ let res = null;
311
+ if (options && options.returnBlobAs != base.ReturnBlobType.AsArrayBuffer) {
312
+ res = response.data;
313
+ if (options.returnBlobAs == base.ReturnBlobType.AsString) {
314
+ res = FromBase64ToString(res);
315
+ }
316
+ }
317
+ else {
318
+ res = response.data;
319
+ }
320
+ resolve(res);
321
+ }
322
+ catch (err) {
323
+ base.WebApiBase.HandleError(options, config, err);
324
+ reject(err);
325
+ }
326
+ });
327
+ }
328
+ async createDocumentStreamAsync(documentEntity, overwriteExistingData, webapi_options) {
329
+ let _request = null;
330
+ let _options = null;
331
+ const first = documentEntity;
332
+ if (typeof (first) === "object" && first && (typeof (first.documentEntity) != 'undefined' || typeof (first.overwriteExistingData) != 'undefined')) {
333
+ _request = documentEntity;
334
+ _options = overwriteExistingData;
335
+ }
336
+ else {
337
+ _request = {
338
+ documentEntity: documentEntity,
339
+ overwriteExistingData: overwriteExistingData,
340
+ };
341
+ _options = webapi_options;
342
+ }
343
+ return this._createDocumentStreamAsync(_request, _options);
344
+ }
345
+ async _getTemplateStreamAsync(request, options) {
346
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options) || {};
347
+ base.WebApiBase.SetPending(options);
348
+ return new Promise(async (resolve, reject) => {
349
+ try {
350
+ if (!options || options.returnBlobAs == base.ReturnBlobType.AsArrayBuffer) {
351
+ config.responseType = "arraybuffer";
352
+ config.headers = config.headers || {};
353
+ config.headers["Accept"] = "application/octet-stream";
354
+ }
355
+ config.baseURL = this._options.baseUrl;
356
+ const response = await this._axios.post("GetTemplateStream", request, config);
357
+ base.WebApiBase.SetCompleted(options);
358
+ let res = null;
359
+ if (options && options.returnBlobAs != base.ReturnBlobType.AsArrayBuffer) {
360
+ res = response.data;
361
+ if (options.returnBlobAs == base.ReturnBlobType.AsString) {
362
+ res = FromBase64ToString(res);
363
+ }
364
+ }
365
+ else {
366
+ res = response.data;
367
+ }
368
+ resolve(res);
369
+ }
370
+ catch (err) {
371
+ base.WebApiBase.HandleError(options, config, err);
372
+ reject(err);
373
+ }
374
+ });
375
+ }
376
+ async getTemplateStreamAsync(templateName, allowPersonal, uiCulture, webapi_options) {
377
+ let _request = null;
378
+ let _options = null;
379
+ const first = templateName;
380
+ if (typeof (first) === "object" && first && (typeof (first.templateName) != 'undefined' || typeof (first.allowPersonal) != 'undefined' || typeof (first.uiCulture) != 'undefined')) {
381
+ _request = templateName;
382
+ _options = allowPersonal;
383
+ }
384
+ else {
385
+ _request = {
386
+ templateName: templateName,
387
+ allowPersonal: allowPersonal,
388
+ uiCulture: uiCulture,
389
+ };
390
+ _options = webapi_options;
391
+ }
392
+ return this._getTemplateStreamAsync(_request, _options);
393
+ }
394
+ async _getSanitizedTemplateStreamAsync(request, options) {
395
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options) || {};
396
+ base.WebApiBase.SetPending(options);
397
+ return new Promise(async (resolve, reject) => {
398
+ try {
399
+ if (!options || options.returnBlobAs == base.ReturnBlobType.AsArrayBuffer) {
400
+ config.responseType = "arraybuffer";
401
+ config.headers = config.headers || {};
402
+ config.headers["Accept"] = "application/octet-stream";
403
+ }
404
+ config.baseURL = this._options.baseUrl;
405
+ const response = await this._axios.post("GetSanitizedTemplateStream", request, config);
406
+ base.WebApiBase.SetCompleted(options);
407
+ let res = null;
408
+ if (options && options.returnBlobAs != base.ReturnBlobType.AsArrayBuffer) {
409
+ res = response.data;
410
+ if (options.returnBlobAs == base.ReturnBlobType.AsString) {
411
+ res = FromBase64ToString(res);
412
+ }
413
+ }
414
+ else {
415
+ res = response.data;
416
+ }
417
+ resolve(res);
418
+ }
419
+ catch (err) {
420
+ base.WebApiBase.HandleError(options, config, err);
421
+ reject(err);
422
+ }
423
+ });
424
+ }
425
+ async getSanitizedTemplateStreamAsync(templateName, allowPersonal, uiCulture, webapi_options) {
426
+ let _request = null;
427
+ let _options = null;
428
+ const first = templateName;
429
+ if (typeof (first) === "object" && first && (typeof (first.templateName) != 'undefined' || typeof (first.allowPersonal) != 'undefined' || typeof (first.uiCulture) != 'undefined')) {
430
+ _request = templateName;
431
+ _options = allowPersonal;
432
+ }
433
+ else {
434
+ _request = {
435
+ templateName: templateName,
436
+ allowPersonal: allowPersonal,
437
+ uiCulture: uiCulture,
438
+ };
439
+ _options = webapi_options;
440
+ }
441
+ return this._getSanitizedTemplateStreamAsync(_request, _options);
442
+ }
443
+ async _getTemplateStreamFromIdAsync(request, options) {
444
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options) || {};
445
+ base.WebApiBase.SetPending(options);
446
+ return new Promise(async (resolve, reject) => {
447
+ try {
448
+ if (!options || options.returnBlobAs == base.ReturnBlobType.AsArrayBuffer) {
449
+ config.responseType = "arraybuffer";
450
+ config.headers = config.headers || {};
451
+ config.headers["Accept"] = "application/octet-stream";
452
+ }
453
+ config.baseURL = this._options.baseUrl;
454
+ const response = await this._axios.post("GetTemplateStreamFromId", request, config);
455
+ base.WebApiBase.SetCompleted(options);
456
+ let res = null;
457
+ if (options && options.returnBlobAs != base.ReturnBlobType.AsArrayBuffer) {
458
+ res = response.data;
459
+ if (options.returnBlobAs == base.ReturnBlobType.AsString) {
460
+ res = FromBase64ToString(res);
461
+ }
462
+ }
463
+ else {
464
+ res = response.data;
465
+ }
466
+ resolve(res);
467
+ }
468
+ catch (err) {
469
+ base.WebApiBase.HandleError(options, config, err);
470
+ reject(err);
471
+ }
472
+ });
473
+ }
474
+ async getTemplateStreamFromIdAsync(templateId, uiCulture, webapi_options) {
475
+ let _request = null;
476
+ let _options = null;
477
+ const first = templateId;
478
+ if (typeof (first) === "object" && first && (typeof (first.templateId) != 'undefined' || typeof (first.uiCulture) != 'undefined')) {
479
+ _request = templateId;
480
+ _options = uiCulture;
481
+ }
482
+ else {
483
+ _request = {
484
+ templateId: templateId,
485
+ uiCulture: uiCulture,
486
+ };
487
+ _options = webapi_options;
488
+ }
489
+ return this._getTemplateStreamFromIdAsync(_request, _options);
490
+ }
491
+ async _getSanitizedTemplateStreamFromIdAsync(request, options) {
492
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options) || {};
493
+ base.WebApiBase.SetPending(options);
494
+ return new Promise(async (resolve, reject) => {
495
+ try {
496
+ if (!options || options.returnBlobAs == base.ReturnBlobType.AsArrayBuffer) {
497
+ config.responseType = "arraybuffer";
498
+ config.headers = config.headers || {};
499
+ config.headers["Accept"] = "application/octet-stream";
500
+ }
501
+ config.baseURL = this._options.baseUrl;
502
+ const response = await this._axios.post("GetSanitizedTemplateStreamFromId", request, config);
503
+ base.WebApiBase.SetCompleted(options);
504
+ let res = null;
505
+ if (options && options.returnBlobAs != base.ReturnBlobType.AsArrayBuffer) {
506
+ res = response.data;
507
+ if (options.returnBlobAs == base.ReturnBlobType.AsString) {
508
+ res = FromBase64ToString(res);
509
+ }
510
+ }
511
+ else {
512
+ res = response.data;
513
+ }
514
+ resolve(res);
515
+ }
516
+ catch (err) {
517
+ base.WebApiBase.HandleError(options, config, err);
518
+ reject(err);
519
+ }
520
+ });
521
+ }
522
+ async getSanitizedTemplateStreamFromIdAsync(templateId, uiCulture, webapi_options) {
523
+ let _request = null;
524
+ let _options = null;
525
+ const first = templateId;
526
+ if (typeof (first) === "object" && first && (typeof (first.templateId) != 'undefined' || typeof (first.uiCulture) != 'undefined')) {
527
+ _request = templateId;
528
+ _options = uiCulture;
529
+ }
530
+ else {
531
+ _request = {
532
+ templateId: templateId,
533
+ uiCulture: uiCulture,
534
+ };
535
+ _options = webapi_options;
536
+ }
537
+ return this._getSanitizedTemplateStreamFromIdAsync(_request, _options);
538
+ }
539
+ async _getDocumentStreamAsync(request, options) {
540
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options) || {};
541
+ base.WebApiBase.SetPending(options);
542
+ return new Promise(async (resolve, reject) => {
543
+ try {
544
+ if (!options || options.returnBlobAs == base.ReturnBlobType.AsArrayBuffer) {
545
+ config.responseType = "arraybuffer";
546
+ config.headers = config.headers || {};
547
+ config.headers["Accept"] = "application/octet-stream";
548
+ }
549
+ config.baseURL = this._options.baseUrl;
550
+ const response = await this._axios.post("GetDocumentStream", request, config);
551
+ base.WebApiBase.SetCompleted(options);
552
+ let res = null;
553
+ if (options && options.returnBlobAs != base.ReturnBlobType.AsArrayBuffer) {
554
+ res = response.data;
555
+ if (options.returnBlobAs == base.ReturnBlobType.AsString) {
556
+ res = FromBase64ToString(res);
557
+ }
558
+ }
559
+ else {
560
+ res = response.data;
561
+ }
562
+ resolve(res);
563
+ }
564
+ catch (err) {
565
+ base.WebApiBase.HandleError(options, config, err);
566
+ reject(err);
567
+ }
568
+ });
569
+ }
570
+ async getDocumentStreamAsync(documentId, webapi_options) {
571
+ let _request = null;
572
+ let _options = null;
573
+ const first = documentId;
574
+ if (typeof (first) === "object" && first && (typeof (first.documentId) != 'undefined')) {
575
+ _request = documentId;
576
+ _options = webapi_options;
577
+ }
578
+ else {
579
+ _request = {
580
+ documentId: documentId,
581
+ };
582
+ _options = webapi_options;
583
+ }
584
+ return this._getDocumentStreamAsync(_request, _options);
585
+ }
586
+ async _getSanitizedDocumentStreamAsync(request, options) {
587
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options) || {};
588
+ base.WebApiBase.SetPending(options);
589
+ return new Promise(async (resolve, reject) => {
590
+ try {
591
+ if (!options || options.returnBlobAs == base.ReturnBlobType.AsArrayBuffer) {
592
+ config.responseType = "arraybuffer";
593
+ config.headers = config.headers || {};
594
+ config.headers["Accept"] = "application/octet-stream";
595
+ }
596
+ config.baseURL = this._options.baseUrl;
597
+ const response = await this._axios.post("GetSanitizedDocumentStream", request, config);
598
+ base.WebApiBase.SetCompleted(options);
599
+ let res = null;
600
+ if (options && options.returnBlobAs != base.ReturnBlobType.AsArrayBuffer) {
601
+ res = response.data;
602
+ if (options.returnBlobAs == base.ReturnBlobType.AsString) {
603
+ res = FromBase64ToString(res);
604
+ }
605
+ }
606
+ else {
607
+ res = response.data;
608
+ }
609
+ resolve(res);
610
+ }
611
+ catch (err) {
612
+ base.WebApiBase.HandleError(options, config, err);
613
+ reject(err);
614
+ }
615
+ });
616
+ }
617
+ async getSanitizedDocumentStreamAsync(documentId, webapi_options) {
618
+ let _request = null;
619
+ let _options = null;
620
+ const first = documentId;
621
+ if (typeof (first) === "object" && first && (typeof (first.documentId) != 'undefined')) {
622
+ _request = documentId;
623
+ _options = webapi_options;
624
+ }
625
+ else {
626
+ _request = {
627
+ documentId: documentId,
628
+ };
629
+ _options = webapi_options;
630
+ }
631
+ return this._getSanitizedDocumentStreamAsync(_request, _options);
632
+ }
633
+ async _getPreviewDocumentStreamAsync(request, options) {
634
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
635
+ base.WebApiBase.SetPending(options);
636
+ return new Promise(async (resolve, reject) => {
637
+ try {
638
+ config.baseURL = this._options.baseUrl;
639
+ const response = await this._axios.post("GetPreviewDocumentStream", request, config);
640
+ base.WebApiBase.SetCompleted(options);
641
+ const res = converters.Create_DocumentPreview_From(response.data);
642
+ resolve(res);
643
+ }
644
+ catch (err) {
645
+ base.WebApiBase.HandleError(options, config, err);
646
+ reject(err);
647
+ }
648
+ });
649
+ }
650
+ async getPreviewDocumentStreamAsync(documentId, webapi_options) {
651
+ let _request = null;
652
+ let _options = null;
653
+ const first = documentId;
654
+ if (typeof (first) === "object" && first && (typeof (first.documentId) != 'undefined')) {
655
+ _request = documentId;
656
+ _options = webapi_options;
657
+ }
658
+ else {
659
+ _request = {
660
+ documentId: documentId,
661
+ };
662
+ _options = webapi_options;
663
+ }
664
+ return this._getPreviewDocumentStreamAsync(_request, _options);
665
+ }
666
+ async _getUnsanitizedPreviewDocumentStreamAsync(request, options) {
667
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
668
+ base.WebApiBase.SetPending(options);
669
+ return new Promise(async (resolve, reject) => {
670
+ try {
671
+ config.baseURL = this._options.baseUrl;
672
+ const response = await this._axios.post("GetUnsanitizedPreviewDocumentStream", request, config);
673
+ base.WebApiBase.SetCompleted(options);
674
+ const res = converters.Create_DocumentPreview_From(response.data);
675
+ resolve(res);
676
+ }
677
+ catch (err) {
678
+ base.WebApiBase.HandleError(options, config, err);
679
+ reject(err);
680
+ }
681
+ });
682
+ }
683
+ async getUnsanitizedPreviewDocumentStreamAsync(documentId, webapi_options) {
684
+ let _request = null;
685
+ let _options = null;
686
+ const first = documentId;
687
+ if (typeof (first) === "object" && first && (typeof (first.documentId) != 'undefined')) {
688
+ _request = documentId;
689
+ _options = webapi_options;
690
+ }
691
+ else {
692
+ _request = {
693
+ documentId: documentId,
694
+ };
695
+ _options = webapi_options;
696
+ }
697
+ return this._getUnsanitizedPreviewDocumentStreamAsync(_request, _options);
698
+ }
699
+ async _createNewPhysicalMailMergeDocumentFromTemplateAsync(request, options) {
700
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
701
+ base.WebApiBase.SetPending(options);
702
+ return new Promise(async (resolve, reject) => {
703
+ try {
704
+ config.baseURL = this._options.baseUrl;
705
+ const response = await this._axios.post("CreateNewPhysicalMailMergeDocumentFromTemplate", request, config);
706
+ base.WebApiBase.SetCompleted(options);
707
+ const res = converters.Create_DocumentEntity_From(response.data);
708
+ resolve(res);
709
+ }
710
+ catch (err) {
711
+ base.WebApiBase.HandleError(options, config, err);
712
+ reject(err);
713
+ }
714
+ });
715
+ }
716
+ async createNewPhysicalMailMergeDocumentFromTemplateAsync(documentId, uiCulture, webapi_options) {
717
+ let _request = null;
718
+ let _options = null;
719
+ const first = documentId;
720
+ if (typeof (first) === "object" && first && (typeof (first.documentId) != 'undefined' || typeof (first.uiCulture) != 'undefined')) {
721
+ _request = documentId;
722
+ _options = uiCulture;
723
+ }
724
+ else {
725
+ _request = {
726
+ documentId: documentId,
727
+ uiCulture: uiCulture,
728
+ };
729
+ _options = webapi_options;
730
+ }
731
+ return this._createNewPhysicalMailMergeDocumentFromTemplateAsync(_request, _options);
732
+ }
733
+ async _createNewPhysicalDocumentFromTemplateWithCustomTagsAsync(request, options) {
734
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
735
+ base.WebApiBase.SetPending(options);
736
+ return new Promise(async (resolve, reject) => {
737
+ try {
738
+ config.baseURL = this._options.baseUrl;
739
+ const response = await this._axios.post("CreateNewPhysicalDocumentFromTemplateWithCustomTags", request, config);
740
+ base.WebApiBase.SetCompleted(options);
741
+ const res = converters.Create_DocumentEntity_From(response.data);
742
+ resolve(res);
743
+ }
744
+ catch (err) {
745
+ base.WebApiBase.HandleError(options, config, err);
746
+ reject(err);
747
+ }
748
+ });
749
+ }
750
+ async createNewPhysicalDocumentFromTemplateWithCustomTagsAsync(contactId, personId, appointmentId, documentId, saleId, selectionId, projectId, customTags, customValues, uiCulture, webapi_options) {
751
+ let _request = null;
752
+ let _options = null;
753
+ const first = contactId;
754
+ if (typeof (first) === "object" && first && (typeof (first.contactId) != 'undefined' || typeof (first.personId) != 'undefined' || typeof (first.appointmentId) != 'undefined' || typeof (first.documentId) != 'undefined' || typeof (first.saleId) != 'undefined' || typeof (first.selectionId) != 'undefined' || typeof (first.projectId) != 'undefined' || typeof (first.customTags) != 'undefined' || typeof (first.customValues) != 'undefined' || typeof (first.uiCulture) != 'undefined')) {
755
+ _request = contactId;
756
+ _options = personId;
757
+ }
758
+ else {
759
+ _request = {
760
+ contactId: contactId,
761
+ personId: personId,
762
+ appointmentId: appointmentId,
763
+ documentId: documentId,
764
+ saleId: saleId,
765
+ selectionId: selectionId,
766
+ projectId: projectId,
767
+ customTags: customTags,
768
+ customValues: customValues,
769
+ uiCulture: uiCulture,
770
+ };
771
+ _options = webapi_options;
772
+ }
773
+ return this._createNewPhysicalDocumentFromTemplateWithCustomTagsAsync(_request, _options);
774
+ }
775
+ async _createNewPhysicalDocumentFromTemplateWithCustomTags2Async(request, options) {
776
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
777
+ base.WebApiBase.SetPending(options);
778
+ return new Promise(async (resolve, reject) => {
779
+ try {
780
+ config.baseURL = this._options.baseUrl;
781
+ const response = await this._axios.post("CreateNewPhysicalDocumentFromTemplateWithCustomTags2", request, config);
782
+ base.WebApiBase.SetCompleted(options);
783
+ const res = converters.Create_DocumentEntity_From(response.data);
784
+ resolve(res);
785
+ }
786
+ catch (err) {
787
+ base.WebApiBase.HandleError(options, config, err);
788
+ reject(err);
789
+ }
790
+ });
791
+ }
792
+ async createNewPhysicalDocumentFromTemplateWithCustomTags2Async(contactId, personId, appointmentId, documentId, saleId, selectionId, projectId, customTags, uiCulture, webapi_options) {
793
+ let _request = null;
794
+ let _options = null;
795
+ const first = contactId;
796
+ if (typeof (first) === "object" && first && (typeof (first.contactId) != 'undefined' || typeof (first.personId) != 'undefined' || typeof (first.appointmentId) != 'undefined' || typeof (first.documentId) != 'undefined' || typeof (first.saleId) != 'undefined' || typeof (first.selectionId) != 'undefined' || typeof (first.projectId) != 'undefined' || typeof (first.customTags) != 'undefined' || typeof (first.uiCulture) != 'undefined')) {
797
+ _request = contactId;
798
+ _options = personId;
799
+ }
800
+ else {
801
+ _request = {
802
+ contactId: contactId,
803
+ personId: personId,
804
+ appointmentId: appointmentId,
805
+ documentId: documentId,
806
+ saleId: saleId,
807
+ selectionId: selectionId,
808
+ projectId: projectId,
809
+ customTags: customTags,
810
+ uiCulture: uiCulture,
811
+ };
812
+ _options = webapi_options;
813
+ }
814
+ return this._createNewPhysicalDocumentFromTemplateWithCustomTags2Async(_request, _options);
815
+ }
816
+ async _substituteTemplateVariablesAsync(request, options) {
817
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
818
+ base.WebApiBase.SetPending(options);
819
+ return new Promise(async (resolve, reject) => {
820
+ try {
821
+ config.baseURL = this._options.baseUrl;
822
+ const response = await this._axios.post("SubstituteTemplateVariables", request, config);
823
+ base.WebApiBase.SetCompleted(options);
824
+ const res = response.data;
825
+ resolve(res);
826
+ }
827
+ catch (err) {
828
+ base.WebApiBase.HandleError(options, config, err);
829
+ reject(err);
830
+ }
831
+ });
832
+ }
833
+ async substituteTemplateVariablesAsync(source, generatorEncoding, contactId, personId, appointmentId, documentId, saleId, selectionId, projectId, cultureName, webapi_options) {
834
+ let _request = null;
835
+ let _options = null;
836
+ const first = source;
837
+ if (typeof (first) === "object" && first && (typeof (first.source) != 'undefined' || typeof (first.generatorEncoding) != 'undefined' || typeof (first.contactId) != 'undefined' || typeof (first.personId) != 'undefined' || typeof (first.appointmentId) != 'undefined' || typeof (first.documentId) != 'undefined' || typeof (first.saleId) != 'undefined' || typeof (first.selectionId) != 'undefined' || typeof (first.projectId) != 'undefined' || typeof (first.cultureName) != 'undefined')) {
838
+ _request = source;
839
+ _options = generatorEncoding;
840
+ }
841
+ else {
842
+ _request = {
843
+ source: source,
844
+ generatorEncoding: generatorEncoding,
845
+ contactId: contactId,
846
+ personId: personId,
847
+ appointmentId: appointmentId,
848
+ documentId: documentId,
849
+ saleId: saleId,
850
+ selectionId: selectionId,
851
+ projectId: projectId,
852
+ cultureName: cultureName,
853
+ };
854
+ _options = webapi_options;
855
+ }
856
+ return this._substituteTemplateVariablesAsync(_request, _options);
857
+ }
858
+ async _substituteTemplateVariablesWithCustomTagsAsync(request, options) {
859
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
860
+ base.WebApiBase.SetPending(options);
861
+ return new Promise(async (resolve, reject) => {
862
+ try {
863
+ config.baseURL = this._options.baseUrl;
864
+ const response = await this._axios.post("SubstituteTemplateVariablesWithCustomTags", request, config);
865
+ base.WebApiBase.SetCompleted(options);
866
+ const res = response.data;
867
+ resolve(res);
868
+ }
869
+ catch (err) {
870
+ base.WebApiBase.HandleError(options, config, err);
871
+ reject(err);
872
+ }
873
+ });
874
+ }
875
+ async substituteTemplateVariablesWithCustomTagsAsync(source, generatorEncoding, customTags, customValues, contactId, personId, appointmentId, documentId, saleId, selectionId, projectId, cultureName, webapi_options) {
876
+ let _request = null;
877
+ let _options = null;
878
+ const first = source;
879
+ if (typeof (first) === "object" && first && (typeof (first.source) != 'undefined' || typeof (first.generatorEncoding) != 'undefined' || typeof (first.customTags) != 'undefined' || typeof (first.customValues) != 'undefined' || typeof (first.contactId) != 'undefined' || typeof (first.personId) != 'undefined' || typeof (first.appointmentId) != 'undefined' || typeof (first.documentId) != 'undefined' || typeof (first.saleId) != 'undefined' || typeof (first.selectionId) != 'undefined' || typeof (first.projectId) != 'undefined' || typeof (first.cultureName) != 'undefined')) {
880
+ _request = source;
881
+ _options = generatorEncoding;
882
+ }
883
+ else {
884
+ _request = {
885
+ source: source,
886
+ generatorEncoding: generatorEncoding,
887
+ customTags: customTags,
888
+ customValues: customValues,
889
+ contactId: contactId,
890
+ personId: personId,
891
+ appointmentId: appointmentId,
892
+ documentId: documentId,
893
+ saleId: saleId,
894
+ selectionId: selectionId,
895
+ projectId: projectId,
896
+ cultureName: cultureName,
897
+ };
898
+ _options = webapi_options;
899
+ }
900
+ return this._substituteTemplateVariablesWithCustomTagsAsync(_request, _options);
901
+ }
902
+ async _substituteTemplateVariablesWithCustomTags2Async(request, options) {
903
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
904
+ base.WebApiBase.SetPending(options);
905
+ return new Promise(async (resolve, reject) => {
906
+ try {
907
+ config.baseURL = this._options.baseUrl;
908
+ const response = await this._axios.post("SubstituteTemplateVariablesWithCustomTags2", request, config);
909
+ base.WebApiBase.SetCompleted(options);
910
+ const res = response.data;
911
+ resolve(res);
912
+ }
913
+ catch (err) {
914
+ base.WebApiBase.HandleError(options, config, err);
915
+ reject(err);
916
+ }
917
+ });
918
+ }
919
+ async substituteTemplateVariablesWithCustomTags2Async(source, generatorEncoding, customTags, contactId, personId, appointmentId, documentId, saleId, selectionId, projectId, cultureName, webapi_options) {
920
+ let _request = null;
921
+ let _options = null;
922
+ const first = source;
923
+ if (typeof (first) === "object" && first && (typeof (first.source) != 'undefined' || typeof (first.generatorEncoding) != 'undefined' || typeof (first.customTags) != 'undefined' || typeof (first.contactId) != 'undefined' || typeof (first.personId) != 'undefined' || typeof (first.appointmentId) != 'undefined' || typeof (first.documentId) != 'undefined' || typeof (first.saleId) != 'undefined' || typeof (first.selectionId) != 'undefined' || typeof (first.projectId) != 'undefined' || typeof (first.cultureName) != 'undefined')) {
924
+ _request = source;
925
+ _options = generatorEncoding;
926
+ }
927
+ else {
928
+ _request = {
929
+ source: source,
930
+ generatorEncoding: generatorEncoding,
931
+ customTags: customTags,
932
+ contactId: contactId,
933
+ personId: personId,
934
+ appointmentId: appointmentId,
935
+ documentId: documentId,
936
+ saleId: saleId,
937
+ selectionId: selectionId,
938
+ projectId: projectId,
939
+ cultureName: cultureName,
940
+ };
941
+ _options = webapi_options;
942
+ }
943
+ return this._substituteTemplateVariablesWithCustomTags2Async(_request, _options);
944
+ }
945
+ async _createTempFileAsync(request, options) {
946
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
947
+ base.WebApiBase.SetPending(options);
948
+ return new Promise(async (resolve, reject) => {
949
+ try {
950
+ config.baseURL = this._options.baseUrl;
951
+ const response = await this._axios.post("CreateTempFile", request, config);
952
+ base.WebApiBase.SetCompleted(options);
953
+ const res = response.data;
954
+ resolve(res);
955
+ }
956
+ catch (err) {
957
+ base.WebApiBase.HandleError(options, config, err);
958
+ reject(err);
959
+ }
960
+ });
961
+ }
962
+ async createTempFileAsync(filename, dataStream, webapi_options) {
963
+ let _request = null;
964
+ let _options = null;
965
+ const first = filename;
966
+ if (typeof (first) === "object" && first && (typeof (first.filename) != 'undefined' || typeof (first.dataStream) != 'undefined')) {
967
+ _request = filename;
968
+ _options = dataStream;
969
+ }
970
+ else {
971
+ _request = {
972
+ filename: filename,
973
+ dataStream: dataStream,
974
+ };
975
+ _options = webapi_options;
976
+ }
977
+ _request.dataStream = ToBase64(_request.dataStream);
978
+ return this._createTempFileAsync(_request, _options);
979
+ }
980
+ async _getTempFileAsync(request, options) {
981
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options) || {};
982
+ base.WebApiBase.SetPending(options);
983
+ return new Promise(async (resolve, reject) => {
984
+ try {
985
+ if (!options || options.returnBlobAs == base.ReturnBlobType.AsArrayBuffer) {
986
+ config.responseType = "arraybuffer";
987
+ config.headers = config.headers || {};
988
+ config.headers["Accept"] = "application/octet-stream";
989
+ }
990
+ config.baseURL = this._options.baseUrl;
991
+ const response = await this._axios.post("GetTempFile", request, config);
992
+ base.WebApiBase.SetCompleted(options);
993
+ let res = null;
994
+ if (options && options.returnBlobAs != base.ReturnBlobType.AsArrayBuffer) {
995
+ res = response.data;
996
+ if (options.returnBlobAs == base.ReturnBlobType.AsString) {
997
+ res = FromBase64ToString(res);
998
+ }
999
+ }
1000
+ else {
1001
+ res = response.data;
1002
+ }
1003
+ resolve(res);
1004
+ }
1005
+ catch (err) {
1006
+ base.WebApiBase.HandleError(options, config, err);
1007
+ reject(err);
1008
+ }
1009
+ });
1010
+ }
1011
+ async getTempFileAsync(filename, webapi_options) {
1012
+ let _request = null;
1013
+ let _options = null;
1014
+ const first = filename;
1015
+ if (typeof (first) === "object" && first && (typeof (first.filename) != 'undefined')) {
1016
+ _request = filename;
1017
+ _options = webapi_options;
1018
+ }
1019
+ else {
1020
+ _request = {
1021
+ filename: filename,
1022
+ };
1023
+ _options = webapi_options;
1024
+ }
1025
+ return this._getTempFileAsync(_request, _options);
1026
+ }
1027
+ async _deleteTempFileAsync(request, options) {
1028
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1029
+ base.WebApiBase.SetPending(options);
1030
+ return new Promise(async (resolve, reject) => {
1031
+ try {
1032
+ config.baseURL = this._options.baseUrl;
1033
+ const response = await this._axios.post("DeleteTempFile", request, config);
1034
+ base.WebApiBase.SetCompleted(options);
1035
+ const res = response.data;
1036
+ resolve(res);
1037
+ }
1038
+ catch (err) {
1039
+ base.WebApiBase.HandleError(options, config, err);
1040
+ reject(err);
1041
+ }
1042
+ });
1043
+ }
1044
+ async deleteTempFileAsync(filename, webapi_options) {
1045
+ let _request = null;
1046
+ let _options = null;
1047
+ const first = filename;
1048
+ if (typeof (first) === "object" && first && (typeof (first.filename) != 'undefined')) {
1049
+ _request = filename;
1050
+ _options = webapi_options;
1051
+ }
1052
+ else {
1053
+ _request = {
1054
+ filename: filename,
1055
+ };
1056
+ _options = webapi_options;
1057
+ }
1058
+ return this._deleteTempFileAsync(_request, _options);
1059
+ }
1060
+ async _setTemplateStreamAsync(request, options) {
1061
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1062
+ base.WebApiBase.SetPending(options);
1063
+ return new Promise(async (resolve, reject) => {
1064
+ try {
1065
+ config.baseURL = this._options.baseUrl;
1066
+ const response = await this._axios.post("SetTemplateStream", request, config);
1067
+ base.WebApiBase.SetCompleted(options);
1068
+ const res = response.data;
1069
+ resolve(res);
1070
+ }
1071
+ catch (err) {
1072
+ base.WebApiBase.HandleError(options, config, err);
1073
+ reject(err);
1074
+ }
1075
+ });
1076
+ }
1077
+ async setTemplateStreamAsync(filename, personal, stream, webapi_options) {
1078
+ let _request = null;
1079
+ let _options = null;
1080
+ const first = filename;
1081
+ if (typeof (first) === "object" && first && (typeof (first.filename) != 'undefined' || typeof (first.personal) != 'undefined' || typeof (first.stream) != 'undefined')) {
1082
+ _request = filename;
1083
+ _options = personal;
1084
+ }
1085
+ else {
1086
+ _request = {
1087
+ filename: filename,
1088
+ personal: personal,
1089
+ stream: stream,
1090
+ };
1091
+ _options = webapi_options;
1092
+ }
1093
+ _request.stream = ToBase64(_request.stream);
1094
+ return this._setTemplateStreamAsync(_request, _options);
1095
+ }
1096
+ async _createNewPhysicalDocumentFromTemplateAsync(request, options) {
1097
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1098
+ base.WebApiBase.SetPending(options);
1099
+ return new Promise(async (resolve, reject) => {
1100
+ try {
1101
+ config.baseURL = this._options.baseUrl;
1102
+ const response = await this._axios.post("CreateNewPhysicalDocumentFromTemplate", request, config);
1103
+ base.WebApiBase.SetCompleted(options);
1104
+ const res = converters.Create_DocumentEntity_From(response.data);
1105
+ resolve(res);
1106
+ }
1107
+ catch (err) {
1108
+ base.WebApiBase.HandleError(options, config, err);
1109
+ reject(err);
1110
+ }
1111
+ });
1112
+ }
1113
+ async createNewPhysicalDocumentFromTemplateAsync(contactId, personId, appointmentId, documentId, saleId, selectionId, projectId, uiCulture, webapi_options) {
1114
+ let _request = null;
1115
+ let _options = null;
1116
+ const first = contactId;
1117
+ if (typeof (first) === "object" && first && (typeof (first.contactId) != 'undefined' || typeof (first.personId) != 'undefined' || typeof (first.appointmentId) != 'undefined' || typeof (first.documentId) != 'undefined' || typeof (first.saleId) != 'undefined' || typeof (first.selectionId) != 'undefined' || typeof (first.projectId) != 'undefined' || typeof (first.uiCulture) != 'undefined')) {
1118
+ _request = contactId;
1119
+ _options = personId;
1120
+ }
1121
+ else {
1122
+ _request = {
1123
+ contactId: contactId,
1124
+ personId: personId,
1125
+ appointmentId: appointmentId,
1126
+ documentId: documentId,
1127
+ saleId: saleId,
1128
+ selectionId: selectionId,
1129
+ projectId: projectId,
1130
+ uiCulture: uiCulture,
1131
+ };
1132
+ _options = webapi_options;
1133
+ }
1134
+ return this._createNewPhysicalDocumentFromTemplateAsync(_request, _options);
1135
+ }
1136
+ async _substituteMergeDocumentTemplateVariablesAsync(request, options) {
1137
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options) || {};
1138
+ base.WebApiBase.SetPending(options);
1139
+ return new Promise(async (resolve, reject) => {
1140
+ try {
1141
+ if (!options || options.returnBlobAs == base.ReturnBlobType.AsArrayBuffer) {
1142
+ config.responseType = "arraybuffer";
1143
+ config.headers = config.headers || {};
1144
+ config.headers["Accept"] = "application/octet-stream";
1145
+ }
1146
+ config.baseURL = this._options.baseUrl;
1147
+ const response = await this._axios.post("SubstituteMergeDocumentTemplateVariables", request, config);
1148
+ base.WebApiBase.SetCompleted(options);
1149
+ let res = null;
1150
+ if (options && options.returnBlobAs != base.ReturnBlobType.AsArrayBuffer) {
1151
+ res = response.data;
1152
+ if (options.returnBlobAs == base.ReturnBlobType.AsString) {
1153
+ res = FromBase64ToString(res);
1154
+ }
1155
+ }
1156
+ else {
1157
+ res = response.data;
1158
+ }
1159
+ resolve(res);
1160
+ }
1161
+ catch (err) {
1162
+ base.WebApiBase.HandleError(options, config, err);
1163
+ reject(err);
1164
+ }
1165
+ });
1166
+ }
1167
+ async substituteMergeDocumentTemplateVariablesAsync(documentId, associateId, customTags, customValues, webapi_options) {
1168
+ let _request = null;
1169
+ let _options = null;
1170
+ const first = documentId;
1171
+ if (typeof (first) === "object" && first && (typeof (first.documentId) != 'undefined' || typeof (first.associateId) != 'undefined' || typeof (first.customTags) != 'undefined' || typeof (first.customValues) != 'undefined')) {
1172
+ _request = documentId;
1173
+ _options = associateId;
1174
+ }
1175
+ else {
1176
+ _request = {
1177
+ documentId: documentId,
1178
+ associateId: associateId,
1179
+ customTags: customTags,
1180
+ customValues: customValues,
1181
+ };
1182
+ _options = webapi_options;
1183
+ }
1184
+ return this._substituteMergeDocumentTemplateVariablesAsync(_request, _options);
1185
+ }
1186
+ async _substituteMergeDocumentTemplateVariables2Async(request, options) {
1187
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options) || {};
1188
+ base.WebApiBase.SetPending(options);
1189
+ return new Promise(async (resolve, reject) => {
1190
+ try {
1191
+ if (!options || options.returnBlobAs == base.ReturnBlobType.AsArrayBuffer) {
1192
+ config.responseType = "arraybuffer";
1193
+ config.headers = config.headers || {};
1194
+ config.headers["Accept"] = "application/octet-stream";
1195
+ }
1196
+ config.baseURL = this._options.baseUrl;
1197
+ const response = await this._axios.post("SubstituteMergeDocumentTemplateVariables2", request, config);
1198
+ base.WebApiBase.SetCompleted(options);
1199
+ let res = null;
1200
+ if (options && options.returnBlobAs != base.ReturnBlobType.AsArrayBuffer) {
1201
+ res = response.data;
1202
+ if (options.returnBlobAs == base.ReturnBlobType.AsString) {
1203
+ res = FromBase64ToString(res);
1204
+ }
1205
+ }
1206
+ else {
1207
+ res = response.data;
1208
+ }
1209
+ resolve(res);
1210
+ }
1211
+ catch (err) {
1212
+ base.WebApiBase.HandleError(options, config, err);
1213
+ reject(err);
1214
+ }
1215
+ });
1216
+ }
1217
+ async substituteMergeDocumentTemplateVariables2Async(documentId, associateId, customTags, webapi_options) {
1218
+ let _request = null;
1219
+ let _options = null;
1220
+ const first = documentId;
1221
+ if (typeof (first) === "object" && first && (typeof (first.documentId) != 'undefined' || typeof (first.associateId) != 'undefined' || typeof (first.customTags) != 'undefined')) {
1222
+ _request = documentId;
1223
+ _options = associateId;
1224
+ }
1225
+ else {
1226
+ _request = {
1227
+ documentId: documentId,
1228
+ associateId: associateId,
1229
+ customTags: customTags,
1230
+ };
1231
+ _options = webapi_options;
1232
+ }
1233
+ return this._substituteMergeDocumentTemplateVariables2Async(_request, _options);
1234
+ }
1235
+ async _substituteTemplateVariablesExAsync(request, options) {
1236
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1237
+ base.WebApiBase.SetPending(options);
1238
+ return new Promise(async (resolve, reject) => {
1239
+ try {
1240
+ config.baseURL = this._options.baseUrl;
1241
+ const response = await this._axios.post("SubstituteTemplateVariablesEx", request, config);
1242
+ base.WebApiBase.SetCompleted(options);
1243
+ const res = response.data;
1244
+ resolve(res);
1245
+ }
1246
+ catch (err) {
1247
+ base.WebApiBase.HandleError(options, config, err);
1248
+ reject(err);
1249
+ }
1250
+ });
1251
+ }
1252
+ async substituteTemplateVariablesExAsync(parameters, webapi_options) {
1253
+ let _request = null;
1254
+ let _options = null;
1255
+ const first = parameters;
1256
+ if (typeof (first) === "object" && first && (typeof (first.parameters) != 'undefined')) {
1257
+ _request = parameters;
1258
+ _options = webapi_options;
1259
+ }
1260
+ else {
1261
+ _request = {
1262
+ parameters: parameters,
1263
+ };
1264
+ _options = webapi_options;
1265
+ }
1266
+ return this._substituteTemplateVariablesExAsync(_request, _options);
1267
+ }
1268
+ async _verifyGetDocumentStreamAsync(request, options) {
1269
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1270
+ base.WebApiBase.SetPending(options);
1271
+ return new Promise(async (resolve, reject) => {
1272
+ try {
1273
+ config.baseURL = this._options.baseUrl;
1274
+ const response = await this._axios.post("VerifyGetDocumentStream", request, config);
1275
+ base.WebApiBase.SetCompleted(options);
1276
+ const res = response.data;
1277
+ resolve(res);
1278
+ }
1279
+ catch (err) {
1280
+ base.WebApiBase.HandleError(options, config, err);
1281
+ reject(err);
1282
+ }
1283
+ });
1284
+ }
1285
+ async verifyGetDocumentStreamAsync(documentId, webapi_options) {
1286
+ let _request = null;
1287
+ let _options = null;
1288
+ const first = documentId;
1289
+ if (typeof (first) === "object" && first && (typeof (first.documentId) != 'undefined')) {
1290
+ _request = documentId;
1291
+ _options = webapi_options;
1292
+ }
1293
+ else {
1294
+ _request = {
1295
+ documentId: documentId,
1296
+ };
1297
+ _options = webapi_options;
1298
+ }
1299
+ return this._verifyGetDocumentStreamAsync(_request, _options);
1300
+ }
1301
+ async _substituteMergeDocumentTemplateVariablesExAsync(request, options) {
1302
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options) || {};
1303
+ base.WebApiBase.SetPending(options);
1304
+ return new Promise(async (resolve, reject) => {
1305
+ try {
1306
+ if (!options || options.returnBlobAs == base.ReturnBlobType.AsArrayBuffer) {
1307
+ config.responseType = "arraybuffer";
1308
+ config.headers = config.headers || {};
1309
+ config.headers["Accept"] = "application/octet-stream";
1310
+ }
1311
+ config.baseURL = this._options.baseUrl;
1312
+ const response = await this._axios.post("SubstituteMergeDocumentTemplateVariablesEx", request, config);
1313
+ base.WebApiBase.SetCompleted(options);
1314
+ let res = null;
1315
+ if (options && options.returnBlobAs != base.ReturnBlobType.AsArrayBuffer) {
1316
+ res = response.data;
1317
+ if (options.returnBlobAs == base.ReturnBlobType.AsString) {
1318
+ res = FromBase64ToString(res);
1319
+ }
1320
+ }
1321
+ else {
1322
+ res = response.data;
1323
+ }
1324
+ resolve(res);
1325
+ }
1326
+ catch (err) {
1327
+ base.WebApiBase.HandleError(options, config, err);
1328
+ reject(err);
1329
+ }
1330
+ });
1331
+ }
1332
+ async substituteMergeDocumentTemplateVariablesExAsync(mergeDocumentId, contactId, personId, projectId, selectionId, appointmentId, documentId, saleId, customTags, customValues, webapi_options) {
1333
+ let _request = null;
1334
+ let _options = null;
1335
+ const first = mergeDocumentId;
1336
+ if (typeof (first) === "object" && first && (typeof (first.mergeDocumentId) != 'undefined' || typeof (first.contactId) != 'undefined' || typeof (first.personId) != 'undefined' || typeof (first.projectId) != 'undefined' || typeof (first.selectionId) != 'undefined' || typeof (first.appointmentId) != 'undefined' || typeof (first.documentId) != 'undefined' || typeof (first.saleId) != 'undefined' || typeof (first.customTags) != 'undefined' || typeof (first.customValues) != 'undefined')) {
1337
+ _request = mergeDocumentId;
1338
+ _options = contactId;
1339
+ }
1340
+ else {
1341
+ _request = {
1342
+ mergeDocumentId: mergeDocumentId,
1343
+ contactId: contactId,
1344
+ personId: personId,
1345
+ projectId: projectId,
1346
+ selectionId: selectionId,
1347
+ appointmentId: appointmentId,
1348
+ documentId: documentId,
1349
+ saleId: saleId,
1350
+ customTags: customTags,
1351
+ customValues: customValues,
1352
+ };
1353
+ _options = webapi_options;
1354
+ }
1355
+ return this._substituteMergeDocumentTemplateVariablesExAsync(_request, _options);
1356
+ }
1357
+ async _substituteMergeDocumentTemplateVariablesEx2Async(request, options) {
1358
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options) || {};
1359
+ base.WebApiBase.SetPending(options);
1360
+ return new Promise(async (resolve, reject) => {
1361
+ try {
1362
+ if (!options || options.returnBlobAs == base.ReturnBlobType.AsArrayBuffer) {
1363
+ config.responseType = "arraybuffer";
1364
+ config.headers = config.headers || {};
1365
+ config.headers["Accept"] = "application/octet-stream";
1366
+ }
1367
+ config.baseURL = this._options.baseUrl;
1368
+ const response = await this._axios.post("SubstituteMergeDocumentTemplateVariablesEx2", request, config);
1369
+ base.WebApiBase.SetCompleted(options);
1370
+ let res = null;
1371
+ if (options && options.returnBlobAs != base.ReturnBlobType.AsArrayBuffer) {
1372
+ res = response.data;
1373
+ if (options.returnBlobAs == base.ReturnBlobType.AsString) {
1374
+ res = FromBase64ToString(res);
1375
+ }
1376
+ }
1377
+ else {
1378
+ res = response.data;
1379
+ }
1380
+ resolve(res);
1381
+ }
1382
+ catch (err) {
1383
+ base.WebApiBase.HandleError(options, config, err);
1384
+ reject(err);
1385
+ }
1386
+ });
1387
+ }
1388
+ async substituteMergeDocumentTemplateVariablesEx2Async(mergeDocumentId, contactId, personId, projectId, selectionId, appointmentId, documentId, saleId, customTags, webapi_options) {
1389
+ let _request = null;
1390
+ let _options = null;
1391
+ const first = mergeDocumentId;
1392
+ if (typeof (first) === "object" && first && (typeof (first.mergeDocumentId) != 'undefined' || typeof (first.contactId) != 'undefined' || typeof (first.personId) != 'undefined' || typeof (first.projectId) != 'undefined' || typeof (first.selectionId) != 'undefined' || typeof (first.appointmentId) != 'undefined' || typeof (first.documentId) != 'undefined' || typeof (first.saleId) != 'undefined' || typeof (first.customTags) != 'undefined')) {
1393
+ _request = mergeDocumentId;
1394
+ _options = contactId;
1395
+ }
1396
+ else {
1397
+ _request = {
1398
+ mergeDocumentId: mergeDocumentId,
1399
+ contactId: contactId,
1400
+ personId: personId,
1401
+ projectId: projectId,
1402
+ selectionId: selectionId,
1403
+ appointmentId: appointmentId,
1404
+ documentId: documentId,
1405
+ saleId: saleId,
1406
+ customTags: customTags,
1407
+ };
1408
+ _options = webapi_options;
1409
+ }
1410
+ return this._substituteMergeDocumentTemplateVariablesEx2Async(_request, _options);
1411
+ }
1412
+ async _getDocumentUrlAsync(request, options) {
1413
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1414
+ base.WebApiBase.SetPending(options);
1415
+ return new Promise(async (resolve, reject) => {
1416
+ try {
1417
+ config.baseURL = this._options.baseUrl;
1418
+ const response = await this._axios.post("GetDocumentUrl", request, config);
1419
+ base.WebApiBase.SetCompleted(options);
1420
+ const res = response.data;
1421
+ resolve(res);
1422
+ }
1423
+ catch (err) {
1424
+ base.WebApiBase.HandleError(options, config, err);
1425
+ reject(err);
1426
+ }
1427
+ });
1428
+ }
1429
+ async getDocumentUrlAsync(documentId, versionId, writeableUrl, webapi_options) {
1430
+ let _request = null;
1431
+ let _options = null;
1432
+ const first = documentId;
1433
+ if (typeof (first) === "object" && first && (typeof (first.documentId) != 'undefined' || typeof (first.versionId) != 'undefined' || typeof (first.writeableUrl) != 'undefined')) {
1434
+ _request = documentId;
1435
+ _options = versionId;
1436
+ }
1437
+ else {
1438
+ _request = {
1439
+ documentId: documentId,
1440
+ versionId: versionId,
1441
+ writeableUrl: writeableUrl,
1442
+ };
1443
+ _options = webapi_options;
1444
+ }
1445
+ return this._getDocumentUrlAsync(_request, _options);
1446
+ }
1447
+ async _deletePhysicalDocumentAsync(request, options) {
1448
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1449
+ base.WebApiBase.SetPending(options);
1450
+ return new Promise(async (resolve, reject) => {
1451
+ try {
1452
+ config.baseURL = this._options.baseUrl;
1453
+ const response = await this._axios.post("DeletePhysicalDocument", request, config);
1454
+ base.WebApiBase.SetCompleted(options);
1455
+ const res = converters.Create_ReturnInfo_From(response.data);
1456
+ resolve(res);
1457
+ }
1458
+ catch (err) {
1459
+ base.WebApiBase.HandleError(options, config, err);
1460
+ reject(err);
1461
+ }
1462
+ });
1463
+ }
1464
+ async deletePhysicalDocumentAsync(documentId, allowedReturnType, webapi_options) {
1465
+ let _request = null;
1466
+ let _options = null;
1467
+ const first = documentId;
1468
+ if (typeof (first) === "object" && first && (typeof (first.documentId) != 'undefined' || typeof (first.allowedReturnType) != 'undefined')) {
1469
+ _request = documentId;
1470
+ _options = allowedReturnType;
1471
+ }
1472
+ else {
1473
+ _request = {
1474
+ documentId: documentId,
1475
+ allowedReturnType: allowedReturnType,
1476
+ };
1477
+ _options = webapi_options;
1478
+ }
1479
+ return this._deletePhysicalDocumentAsync(_request, _options);
1480
+ }
1481
+ async _renameDocumentAsync(request, options) {
1482
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1483
+ base.WebApiBase.SetPending(options);
1484
+ return new Promise(async (resolve, reject) => {
1485
+ try {
1486
+ config.baseURL = this._options.baseUrl;
1487
+ const response = await this._axios.post("RenameDocument", request, config);
1488
+ base.WebApiBase.SetCompleted(options);
1489
+ const res = response.data;
1490
+ resolve(res);
1491
+ }
1492
+ catch (err) {
1493
+ base.WebApiBase.HandleError(options, config, err);
1494
+ reject(err);
1495
+ }
1496
+ });
1497
+ }
1498
+ async renameDocumentAsync(documentId, newFilename, webapi_options) {
1499
+ let _request = null;
1500
+ let _options = null;
1501
+ const first = documentId;
1502
+ if (typeof (first) === "object" && first && (typeof (first.documentId) != 'undefined' || typeof (first.newFilename) != 'undefined')) {
1503
+ _request = documentId;
1504
+ _options = newFilename;
1505
+ }
1506
+ else {
1507
+ _request = {
1508
+ documentId: documentId,
1509
+ newFilename: newFilename,
1510
+ };
1511
+ _options = webapi_options;
1512
+ }
1513
+ return this._renameDocumentAsync(_request, _options);
1514
+ }
1515
+ async _getCheckoutStateAsync(request, options) {
1516
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1517
+ base.WebApiBase.SetPending(options);
1518
+ return new Promise(async (resolve, reject) => {
1519
+ try {
1520
+ config.baseURL = this._options.baseUrl;
1521
+ const response = await this._axios.post("GetCheckoutState", request, config);
1522
+ base.WebApiBase.SetCompleted(options);
1523
+ const res = converters.Create_CheckoutInfo_From(response.data);
1524
+ resolve(res);
1525
+ }
1526
+ catch (err) {
1527
+ base.WebApiBase.HandleError(options, config, err);
1528
+ reject(err);
1529
+ }
1530
+ });
1531
+ }
1532
+ async getCheckoutStateAsync(documentId, webapi_options) {
1533
+ let _request = null;
1534
+ let _options = null;
1535
+ const first = documentId;
1536
+ if (typeof (first) === "object" && first && (typeof (first.documentId) != 'undefined')) {
1537
+ _request = documentId;
1538
+ _options = webapi_options;
1539
+ }
1540
+ else {
1541
+ _request = {
1542
+ documentId: documentId,
1543
+ };
1544
+ _options = webapi_options;
1545
+ }
1546
+ return this._getCheckoutStateAsync(_request, _options);
1547
+ }
1548
+ async _checkoutDocumentAsync(request, options) {
1549
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1550
+ base.WebApiBase.SetPending(options);
1551
+ return new Promise(async (resolve, reject) => {
1552
+ try {
1553
+ config.baseURL = this._options.baseUrl;
1554
+ const response = await this._axios.post("CheckoutDocument", request, config);
1555
+ base.WebApiBase.SetCompleted(options);
1556
+ const res = converters.Create_ReturnInfo_From(response.data);
1557
+ resolve(res);
1558
+ }
1559
+ catch (err) {
1560
+ base.WebApiBase.HandleError(options, config, err);
1561
+ reject(err);
1562
+ }
1563
+ });
1564
+ }
1565
+ async checkoutDocumentAsync(documentId, allowedReturnTypes, webapi_options) {
1566
+ let _request = null;
1567
+ let _options = null;
1568
+ const first = documentId;
1569
+ if (typeof (first) === "object" && first && (typeof (first.documentId) != 'undefined' || typeof (first.allowedReturnTypes) != 'undefined')) {
1570
+ _request = documentId;
1571
+ _options = allowedReturnTypes;
1572
+ }
1573
+ else {
1574
+ _request = {
1575
+ documentId: documentId,
1576
+ allowedReturnTypes: allowedReturnTypes,
1577
+ };
1578
+ _options = webapi_options;
1579
+ }
1580
+ return this._checkoutDocumentAsync(_request, _options);
1581
+ }
1582
+ async _checkinDocumentAsync(request, options) {
1583
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1584
+ base.WebApiBase.SetPending(options);
1585
+ return new Promise(async (resolve, reject) => {
1586
+ try {
1587
+ config.baseURL = this._options.baseUrl;
1588
+ const response = await this._axios.post("CheckinDocument", request, config);
1589
+ base.WebApiBase.SetCompleted(options);
1590
+ const res = converters.Create_ReturnInfo_From(response.data);
1591
+ resolve(res);
1592
+ }
1593
+ catch (err) {
1594
+ base.WebApiBase.HandleError(options, config, err);
1595
+ reject(err);
1596
+ }
1597
+ });
1598
+ }
1599
+ async checkinDocumentAsync(documentId, allowedReturnTypes, versionDescription, versionExtraFields, webapi_options) {
1600
+ let _request = null;
1601
+ let _options = null;
1602
+ const first = documentId;
1603
+ if (typeof (first) === "object" && first && (typeof (first.documentId) != 'undefined' || typeof (first.allowedReturnTypes) != 'undefined' || typeof (first.versionDescription) != 'undefined' || typeof (first.versionExtraFields) != 'undefined')) {
1604
+ _request = documentId;
1605
+ _options = allowedReturnTypes;
1606
+ }
1607
+ else {
1608
+ _request = {
1609
+ documentId: documentId,
1610
+ allowedReturnTypes: allowedReturnTypes,
1611
+ versionDescription: versionDescription,
1612
+ versionExtraFields: versionExtraFields,
1613
+ };
1614
+ _options = webapi_options;
1615
+ }
1616
+ return this._checkinDocumentAsync(_request, _options);
1617
+ }
1618
+ async _undoCheckoutDocumentAsync(request, options) {
1619
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1620
+ base.WebApiBase.SetPending(options);
1621
+ return new Promise(async (resolve, reject) => {
1622
+ try {
1623
+ config.baseURL = this._options.baseUrl;
1624
+ const response = await this._axios.post("UndoCheckoutDocument", request, config);
1625
+ base.WebApiBase.SetCompleted(options);
1626
+ const res = converters.Create_ReturnInfo_From(response.data);
1627
+ resolve(res);
1628
+ }
1629
+ catch (err) {
1630
+ base.WebApiBase.HandleError(options, config, err);
1631
+ reject(err);
1632
+ }
1633
+ });
1634
+ }
1635
+ async undoCheckoutDocumentAsync(documentId, allowedReturnTypes, webapi_options) {
1636
+ let _request = null;
1637
+ let _options = null;
1638
+ const first = documentId;
1639
+ if (typeof (first) === "object" && first && (typeof (first.documentId) != 'undefined' || typeof (first.allowedReturnTypes) != 'undefined')) {
1640
+ _request = documentId;
1641
+ _options = allowedReturnTypes;
1642
+ }
1643
+ else {
1644
+ _request = {
1645
+ documentId: documentId,
1646
+ allowedReturnTypes: allowedReturnTypes,
1647
+ };
1648
+ _options = webapi_options;
1649
+ }
1650
+ return this._undoCheckoutDocumentAsync(_request, _options);
1651
+ }
1652
+ async _getVersionListAsync(request, options) {
1653
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1654
+ base.WebApiBase.SetPending(options);
1655
+ return new Promise(async (resolve, reject) => {
1656
+ try {
1657
+ config.baseURL = this._options.baseUrl;
1658
+ const response = await this._axios.post("GetVersionList", request, config);
1659
+ base.WebApiBase.SetCompleted(options);
1660
+ const res = converters.Create_VersionInfoArray_From(response.data);
1661
+ resolve(res);
1662
+ }
1663
+ catch (err) {
1664
+ base.WebApiBase.HandleError(options, config, err);
1665
+ reject(err);
1666
+ }
1667
+ });
1668
+ }
1669
+ async getVersionListAsync(documentId, webapi_options) {
1670
+ let _request = null;
1671
+ let _options = null;
1672
+ const first = documentId;
1673
+ if (typeof (first) === "object" && first && (typeof (first.documentId) != 'undefined')) {
1674
+ _request = documentId;
1675
+ _options = webapi_options;
1676
+ }
1677
+ else {
1678
+ _request = {
1679
+ documentId: documentId,
1680
+ };
1681
+ _options = webapi_options;
1682
+ }
1683
+ return this._getVersionListAsync(_request, _options);
1684
+ }
1685
+ async _getPluginListAsync(options) {
1686
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1687
+ base.WebApiBase.SetPending(options);
1688
+ return new Promise(async (resolve, reject) => {
1689
+ try {
1690
+ config.baseURL = this._options.baseUrl;
1691
+ const response = await this._axios.post("GetPluginList", undefined, config);
1692
+ base.WebApiBase.SetCompleted(options);
1693
+ const res = converters.Create_StringDictionary_From(response.data);
1694
+ resolve(res);
1695
+ }
1696
+ catch (err) {
1697
+ base.WebApiBase.HandleError(options, config, err);
1698
+ reject(err);
1699
+ }
1700
+ });
1701
+ }
1702
+ /**
1703
+ * Get a list of installed document plugins
1704
+ * @returns Dictionary mapping plugin id=plugin name
1705
+ */
1706
+ async getPluginListAsync(webapi_options) {
1707
+ return this._getPluginListAsync(webapi_options);
1708
+ }
1709
+ async _getPluginCapabilitiesAsync(request, options) {
1710
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1711
+ base.WebApiBase.SetPending(options);
1712
+ return new Promise(async (resolve, reject) => {
1713
+ try {
1714
+ config.baseURL = this._options.baseUrl;
1715
+ const response = await this._axios.post("GetPluginCapabilities", request, config);
1716
+ base.WebApiBase.SetCompleted(options);
1717
+ const res = converters.Create_StringDictionary_From(response.data);
1718
+ resolve(res);
1719
+ }
1720
+ catch (err) {
1721
+ base.WebApiBase.HandleError(options, config, err);
1722
+ reject(err);
1723
+ }
1724
+ });
1725
+ }
1726
+ async getPluginCapabilitiesAsync(pluginId, webapi_options) {
1727
+ let _request = null;
1728
+ let _options = null;
1729
+ const first = pluginId;
1730
+ if (typeof (first) === "object" && first && (typeof (first.pluginId) != 'undefined')) {
1731
+ _request = pluginId;
1732
+ _options = webapi_options;
1733
+ }
1734
+ else {
1735
+ _request = {
1736
+ pluginId: pluginId,
1737
+ };
1738
+ _options = webapi_options;
1739
+ }
1740
+ return this._getPluginCapabilitiesAsync(_request, _options);
1741
+ }
1742
+ async _getDocumentPropertiesAsync(request, options) {
1743
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1744
+ base.WebApiBase.SetPending(options);
1745
+ return new Promise(async (resolve, reject) => {
1746
+ try {
1747
+ config.baseURL = this._options.baseUrl;
1748
+ const response = await this._axios.post("GetDocumentProperties", request, config);
1749
+ base.WebApiBase.SetCompleted(options);
1750
+ const res = converters.Create_StringDictionary_From(response.data);
1751
+ resolve(res);
1752
+ }
1753
+ catch (err) {
1754
+ base.WebApiBase.HandleError(options, config, err);
1755
+ reject(err);
1756
+ }
1757
+ });
1758
+ }
1759
+ async getDocumentPropertiesAsync(documentId, requestedProperties, webapi_options) {
1760
+ let _request = null;
1761
+ let _options = null;
1762
+ const first = documentId;
1763
+ if (typeof (first) === "object" && first && (typeof (first.documentId) != 'undefined' || typeof (first.requestedProperties) != 'undefined')) {
1764
+ _request = documentId;
1765
+ _options = requestedProperties;
1766
+ }
1767
+ else {
1768
+ _request = {
1769
+ documentId: documentId,
1770
+ requestedProperties: requestedProperties,
1771
+ };
1772
+ _options = webapi_options;
1773
+ }
1774
+ return this._getDocumentPropertiesAsync(_request, _options);
1775
+ }
1776
+ async _getDocumentCommandsAsync(request, options) {
1777
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1778
+ base.WebApiBase.SetPending(options);
1779
+ return new Promise(async (resolve, reject) => {
1780
+ try {
1781
+ config.baseURL = this._options.baseUrl;
1782
+ const response = await this._axios.post("GetDocumentCommands", request, config);
1783
+ base.WebApiBase.SetCompleted(options);
1784
+ const res = converters.Create_CommandInfoArray_From(response.data);
1785
+ resolve(res);
1786
+ }
1787
+ catch (err) {
1788
+ base.WebApiBase.HandleError(options, config, err);
1789
+ reject(err);
1790
+ }
1791
+ });
1792
+ }
1793
+ async getDocumentCommandsAsync(documentId, allowedReturnTypes, webapi_options) {
1794
+ let _request = null;
1795
+ let _options = null;
1796
+ const first = documentId;
1797
+ if (typeof (first) === "object" && first && (typeof (first.documentId) != 'undefined' || typeof (first.allowedReturnTypes) != 'undefined')) {
1798
+ _request = documentId;
1799
+ _options = allowedReturnTypes;
1800
+ }
1801
+ else {
1802
+ _request = {
1803
+ documentId: documentId,
1804
+ allowedReturnTypes: allowedReturnTypes,
1805
+ };
1806
+ _options = webapi_options;
1807
+ }
1808
+ return this._getDocumentCommandsAsync(_request, _options);
1809
+ }
1810
+ async _executeDocumentCommandAsync(request, options) {
1811
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1812
+ base.WebApiBase.SetPending(options);
1813
+ return new Promise(async (resolve, reject) => {
1814
+ try {
1815
+ config.baseURL = this._options.baseUrl;
1816
+ const response = await this._axios.post("ExecuteDocumentCommand", request, config);
1817
+ base.WebApiBase.SetCompleted(options);
1818
+ const res = converters.Create_ReturnInfo_From(response.data);
1819
+ resolve(res);
1820
+ }
1821
+ catch (err) {
1822
+ base.WebApiBase.HandleError(options, config, err);
1823
+ reject(err);
1824
+ }
1825
+ });
1826
+ }
1827
+ async executeDocumentCommandAsync(documentId, versionId, allowedReturnTypes, command, additionalData, webapi_options) {
1828
+ let _request = null;
1829
+ let _options = null;
1830
+ const first = documentId;
1831
+ if (typeof (first) === "object" && first && (typeof (first.documentId) != 'undefined' || typeof (first.versionId) != 'undefined' || typeof (first.allowedReturnTypes) != 'undefined' || typeof (first.command) != 'undefined' || typeof (first.additionalData) != 'undefined')) {
1832
+ _request = documentId;
1833
+ _options = versionId;
1834
+ }
1835
+ else {
1836
+ _request = {
1837
+ documentId: documentId,
1838
+ versionId: versionId,
1839
+ allowedReturnTypes: allowedReturnTypes,
1840
+ command: command,
1841
+ additionalData: additionalData,
1842
+ };
1843
+ _options = webapi_options;
1844
+ }
1845
+ return this._executeDocumentCommandAsync(_request, _options);
1846
+ }
1847
+ async _createDefaultDocumentEntityFromSuggestionAsync(request, options) {
1848
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1849
+ base.WebApiBase.SetPending(options);
1850
+ return new Promise(async (resolve, reject) => {
1851
+ try {
1852
+ config.baseURL = this._options.baseUrl;
1853
+ const response = await this._axios.post("CreateDefaultDocumentEntityFromSuggestion", request, config);
1854
+ base.WebApiBase.SetCompleted(options);
1855
+ const res = converters.Create_DocumentEntity_From(response.data);
1856
+ resolve(res);
1857
+ }
1858
+ catch (err) {
1859
+ base.WebApiBase.HandleError(options, config, err);
1860
+ reject(err);
1861
+ }
1862
+ });
1863
+ }
1864
+ async createDefaultDocumentEntityFromSuggestionAsync(suggestedDocumentId, webapi_options) {
1865
+ let _request = null;
1866
+ let _options = null;
1867
+ const first = suggestedDocumentId;
1868
+ if (typeof (first) === "object" && first && (typeof (first.suggestedDocumentId) != 'undefined')) {
1869
+ _request = suggestedDocumentId;
1870
+ _options = webapi_options;
1871
+ }
1872
+ else {
1873
+ _request = {
1874
+ suggestedDocumentId: suggestedDocumentId,
1875
+ };
1876
+ _options = webapi_options;
1877
+ }
1878
+ return this._createDefaultDocumentEntityFromSuggestionAsync(_request, _options);
1879
+ }
1880
+ async _saveDocumentTemplateStreamAsync(request, options) {
1881
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1882
+ base.WebApiBase.SetPending(options);
1883
+ return new Promise(async (resolve, reject) => {
1884
+ try {
1885
+ config.baseURL = this._options.baseUrl;
1886
+ const response = await this._axios.post("SaveDocumentTemplateStream", request, config);
1887
+ base.WebApiBase.SetCompleted(options);
1888
+ const res = converters.Create_TemplateInfo_From(response.data);
1889
+ resolve(res);
1890
+ }
1891
+ catch (err) {
1892
+ base.WebApiBase.HandleError(options, config, err);
1893
+ reject(err);
1894
+ }
1895
+ });
1896
+ }
1897
+ async saveDocumentTemplateStreamAsync(documentTemplateId, content, languageCode, pluginId, webapi_options) {
1898
+ let _request = null;
1899
+ let _options = null;
1900
+ const first = documentTemplateId;
1901
+ if (typeof (first) === "object" && first && (typeof (first.documentTemplateId) != 'undefined' || typeof (first.content) != 'undefined' || typeof (first.languageCode) != 'undefined' || typeof (first.pluginId) != 'undefined')) {
1902
+ _request = documentTemplateId;
1903
+ _options = content;
1904
+ }
1905
+ else {
1906
+ _request = {
1907
+ documentTemplateId: documentTemplateId,
1908
+ content: content,
1909
+ languageCode: languageCode,
1910
+ pluginId: pluginId,
1911
+ };
1912
+ _options = webapi_options;
1913
+ }
1914
+ _request.content = ToBase64(_request.content);
1915
+ return this._saveDocumentTemplateStreamAsync(_request, _options);
1916
+ }
1917
+ async _setDocumentStreamFromIdAsync(request, options) {
1918
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1919
+ base.WebApiBase.SetPending(options);
1920
+ return new Promise(async (resolve, reject) => {
1921
+ try {
1922
+ config.baseURL = this._options.baseUrl;
1923
+ const response = await this._axios.post("SetDocumentStreamFromId", request, config);
1924
+ base.WebApiBase.SetCompleted(options);
1925
+ const res = converters.Create_DocumentEntity_From(response.data);
1926
+ resolve(res);
1927
+ }
1928
+ catch (err) {
1929
+ base.WebApiBase.HandleError(options, config, err);
1930
+ reject(err);
1931
+ }
1932
+ });
1933
+ }
1934
+ async setDocumentStreamFromIdAsync(documentId, stream, webapi_options) {
1935
+ let _request = null;
1936
+ let _options = null;
1937
+ const first = documentId;
1938
+ if (typeof (first) === "object" && first && (typeof (first.documentId) != 'undefined' || typeof (first.stream) != 'undefined')) {
1939
+ _request = documentId;
1940
+ _options = stream;
1941
+ }
1942
+ else {
1943
+ _request = {
1944
+ documentId: documentId,
1945
+ stream: stream,
1946
+ };
1947
+ _options = webapi_options;
1948
+ }
1949
+ _request.stream = ToBase64(_request.stream);
1950
+ return this._setDocumentStreamFromIdAsync(_request, _options);
1951
+ }
1952
+ async _savePrivacyReportAsync(request, options) {
1953
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1954
+ base.WebApiBase.SetPending(options);
1955
+ return new Promise(async (resolve, reject) => {
1956
+ try {
1957
+ config.baseURL = this._options.baseUrl;
1958
+ const response = await this._axios.post("SavePrivacyReport", request, config);
1959
+ base.WebApiBase.SetCompleted(options);
1960
+ const res = response.data;
1961
+ resolve(res);
1962
+ }
1963
+ catch (err) {
1964
+ base.WebApiBase.HandleError(options, config, err);
1965
+ reject(err);
1966
+ }
1967
+ });
1968
+ }
1969
+ async savePrivacyReportAsync(htmlReport, title, personId, webapi_options) {
1970
+ let _request = null;
1971
+ let _options = null;
1972
+ const first = htmlReport;
1973
+ if (typeof (first) === "object" && first && (typeof (first.htmlReport) != 'undefined' || typeof (first.title) != 'undefined' || typeof (first.personId) != 'undefined')) {
1974
+ _request = htmlReport;
1975
+ _options = title;
1976
+ }
1977
+ else {
1978
+ _request = {
1979
+ htmlReport: htmlReport,
1980
+ title: title,
1981
+ personId: personId,
1982
+ };
1983
+ _options = webapi_options;
1984
+ }
1985
+ return this._savePrivacyReportAsync(_request, _options);
1986
+ }
1987
+ async _validateDocumentEntityAsync(request, options) {
1988
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1989
+ base.WebApiBase.SetPending(options);
1990
+ return new Promise(async (resolve, reject) => {
1991
+ try {
1992
+ config.baseURL = this._options.baseUrl;
1993
+ const response = await this._axios.post("ValidateDocumentEntity", request, config);
1994
+ base.WebApiBase.SetCompleted(options);
1995
+ const res = converters.Create_StringDictionary_From(response.data);
1996
+ resolve(res);
1997
+ }
1998
+ catch (err) {
1999
+ base.WebApiBase.HandleError(options, config, err);
2000
+ reject(err);
2001
+ }
2002
+ });
2003
+ }
2004
+ async validateDocumentEntityAsync(documentEntity, webapi_options) {
2005
+ let _request = null;
2006
+ let _options = null;
2007
+ const first = documentEntity;
2008
+ if (typeof (first) === "object" && first && (typeof (first.documentEntity) != 'undefined')) {
2009
+ _request = documentEntity;
2010
+ _options = webapi_options;
2011
+ }
2012
+ else {
2013
+ _request = {
2014
+ documentEntity: documentEntity,
2015
+ };
2016
+ _options = webapi_options;
2017
+ }
2018
+ return this._validateDocumentEntityAsync(_request, _options);
2019
+ }
2020
+ async _getDocumentLengthAsync(request, options) {
2021
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
2022
+ base.WebApiBase.SetPending(options);
2023
+ return new Promise(async (resolve, reject) => {
2024
+ try {
2025
+ config.baseURL = this._options.baseUrl;
2026
+ const response = await this._axios.post("GetDocumentLength", request, config);
2027
+ base.WebApiBase.SetCompleted(options);
2028
+ const res = response.data;
2029
+ resolve(res);
2030
+ }
2031
+ catch (err) {
2032
+ base.WebApiBase.HandleError(options, config, err);
2033
+ reject(err);
2034
+ }
2035
+ });
2036
+ }
2037
+ async getDocumentLengthAsync(documentId, versionId, webapi_options) {
2038
+ let _request = null;
2039
+ let _options = null;
2040
+ const first = documentId;
2041
+ if (typeof (first) === "object" && first && (typeof (first.documentId) != 'undefined' || typeof (first.versionId) != 'undefined')) {
2042
+ _request = documentId;
2043
+ _options = versionId;
2044
+ }
2045
+ else {
2046
+ _request = {
2047
+ documentId: documentId,
2048
+ versionId: versionId,
2049
+ };
2050
+ _options = webapi_options;
2051
+ }
2052
+ return this._getDocumentLengthAsync(_request, _options);
2053
+ }
2054
+ async _copyDocumentToCsAttachmentAsync(request, options) {
2055
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
2056
+ base.WebApiBase.SetPending(options);
2057
+ return new Promise(async (resolve, reject) => {
2058
+ try {
2059
+ config.baseURL = this._options.baseUrl;
2060
+ const response = await this._axios.post("CopyDocumentToCsAttachment", request, config);
2061
+ base.WebApiBase.SetCompleted(options);
2062
+ const res = response.data;
2063
+ resolve(res);
2064
+ }
2065
+ catch (err) {
2066
+ base.WebApiBase.HandleError(options, config, err);
2067
+ reject(err);
2068
+ }
2069
+ });
2070
+ }
2071
+ async copyDocumentToCsAttachmentAsync(documentId, webapi_options) {
2072
+ let _request = null;
2073
+ let _options = null;
2074
+ const first = documentId;
2075
+ if (typeof (first) === "object" && first && (typeof (first.documentId) != 'undefined')) {
2076
+ _request = documentId;
2077
+ _options = webapi_options;
2078
+ }
2079
+ else {
2080
+ _request = {
2081
+ documentId: documentId,
2082
+ };
2083
+ _options = webapi_options;
2084
+ }
2085
+ return this._copyDocumentToCsAttachmentAsync(_request, _options);
2086
+ }
2087
+ /*
2088
+ * Gets an array of Document objects.
2089
+ * @param documentIds - The primary keys.
2090
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
2091
+ * @returns An array of Document
2092
+ */
2093
+ async getDocumentListAsync(documentIds, options) {
2094
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
2095
+ base.WebApiBase.SetPending(options);
2096
+ return new Promise(async (resolve, reject) => {
2097
+ try {
2098
+ const response = await this._axios.post("GetDocumentList", documentIds, config);
2099
+ base.WebApiBase.SetCompleted(options);
2100
+ const res = converters.Create_DocumentArray_From(response.data);
2101
+ resolve(res);
2102
+ }
2103
+ catch (err) {
2104
+ base.WebApiBase.HandleError(options, config, err);
2105
+ reject(err);
2106
+ }
2107
+ });
2108
+ }
2109
+ async _getAppointmentDocumentsAsync(request, options) {
2110
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
2111
+ base.WebApiBase.SetPending(options);
2112
+ return new Promise(async (resolve, reject) => {
2113
+ try {
2114
+ config.baseURL = this._options.baseUrl;
2115
+ const response = await this._axios.post("GetAppointmentDocuments", request, config);
2116
+ base.WebApiBase.SetCompleted(options);
2117
+ const res = converters.Create_DocumentArray_From(response.data);
2118
+ resolve(res);
2119
+ }
2120
+ catch (err) {
2121
+ base.WebApiBase.HandleError(options, config, err);
2122
+ reject(err);
2123
+ }
2124
+ });
2125
+ }
2126
+ async getAppointmentDocumentsAsync(appointmentId, webapi_options) {
2127
+ let _request = null;
2128
+ let _options = null;
2129
+ const first = appointmentId;
2130
+ if (typeof (first) === "object" && first && (typeof (first.appointmentId) != 'undefined')) {
2131
+ _request = appointmentId;
2132
+ _options = webapi_options;
2133
+ }
2134
+ else {
2135
+ _request = {
2136
+ appointmentId: appointmentId,
2137
+ };
2138
+ _options = webapi_options;
2139
+ }
2140
+ return this._getAppointmentDocumentsAsync(_request, _options);
2141
+ }
2142
+ async _getSaleDocumentsAsync(request, options) {
2143
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
2144
+ base.WebApiBase.SetPending(options);
2145
+ return new Promise(async (resolve, reject) => {
2146
+ try {
2147
+ config.baseURL = this._options.baseUrl;
2148
+ const response = await this._axios.post("GetSaleDocuments", request, config);
2149
+ base.WebApiBase.SetCompleted(options);
2150
+ const res = converters.Create_DocumentArray_From(response.data);
2151
+ resolve(res);
2152
+ }
2153
+ catch (err) {
2154
+ base.WebApiBase.HandleError(options, config, err);
2155
+ reject(err);
2156
+ }
2157
+ });
2158
+ }
2159
+ async getSaleDocumentsAsync(saleId, webapi_options) {
2160
+ let _request = null;
2161
+ let _options = null;
2162
+ const first = saleId;
2163
+ if (typeof (first) === "object" && first && (typeof (first.saleId) != 'undefined')) {
2164
+ _request = saleId;
2165
+ _options = webapi_options;
2166
+ }
2167
+ else {
2168
+ _request = {
2169
+ saleId: saleId,
2170
+ };
2171
+ _options = webapi_options;
2172
+ }
2173
+ return this._getSaleDocumentsAsync(_request, _options);
2174
+ }
2175
+ async _getPersonDocumentsAsync(request, options) {
2176
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
2177
+ base.WebApiBase.SetPending(options);
2178
+ return new Promise(async (resolve, reject) => {
2179
+ try {
2180
+ config.baseURL = this._options.baseUrl;
2181
+ const response = await this._axios.post("GetPersonDocuments", request, config);
2182
+ base.WebApiBase.SetCompleted(options);
2183
+ const res = converters.Create_DocumentArray_From(response.data);
2184
+ resolve(res);
2185
+ }
2186
+ catch (err) {
2187
+ base.WebApiBase.HandleError(options, config, err);
2188
+ reject(err);
2189
+ }
2190
+ });
2191
+ }
2192
+ async getPersonDocumentsAsync(personId, webapi_options) {
2193
+ let _request = null;
2194
+ let _options = null;
2195
+ const first = personId;
2196
+ if (typeof (first) === "object" && first && (typeof (first.personId) != 'undefined')) {
2197
+ _request = personId;
2198
+ _options = webapi_options;
2199
+ }
2200
+ else {
2201
+ _request = {
2202
+ personId: personId,
2203
+ };
2204
+ _options = webapi_options;
2205
+ }
2206
+ return this._getPersonDocumentsAsync(_request, _options);
2207
+ }
2208
+ async _getPublishedDocumentAsync(request, options) {
2209
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
2210
+ base.WebApiBase.SetPending(options);
2211
+ return new Promise(async (resolve, reject) => {
2212
+ try {
2213
+ config.baseURL = this._options.baseUrl;
2214
+ const response = await this._axios.post("GetPublishedDocument", request, config);
2215
+ base.WebApiBase.SetCompleted(options);
2216
+ const res = converters.Create_Document_From(response.data);
2217
+ resolve(res);
2218
+ }
2219
+ catch (err) {
2220
+ base.WebApiBase.HandleError(options, config, err);
2221
+ reject(err);
2222
+ }
2223
+ });
2224
+ }
2225
+ async getPublishedDocumentAsync(documentId, webapi_options) {
2226
+ let _request = null;
2227
+ let _options = null;
2228
+ const first = documentId;
2229
+ if (typeof (first) === "object" && first && (typeof (first.documentId) != 'undefined')) {
2230
+ _request = documentId;
2231
+ _options = webapi_options;
2232
+ }
2233
+ else {
2234
+ _request = {
2235
+ documentId: documentId,
2236
+ };
2237
+ _options = webapi_options;
2238
+ }
2239
+ return this._getPublishedDocumentAsync(_request, _options);
2240
+ }
2241
+ async _getPublishedDocumentsAsync(request, options) {
2242
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
2243
+ base.WebApiBase.SetPending(options);
2244
+ return new Promise(async (resolve, reject) => {
2245
+ try {
2246
+ config.baseURL = this._options.baseUrl;
2247
+ const response = await this._axios.post("GetPublishedDocuments", request, config);
2248
+ base.WebApiBase.SetCompleted(options);
2249
+ const res = converters.Create_DocumentArray_From(response.data);
2250
+ resolve(res);
2251
+ }
2252
+ catch (err) {
2253
+ base.WebApiBase.HandleError(options, config, err);
2254
+ reject(err);
2255
+ }
2256
+ });
2257
+ }
2258
+ async getPublishedDocumentsAsync(documentIds, webapi_options) {
2259
+ let _request = null;
2260
+ let _options = null;
2261
+ const first = documentIds;
2262
+ if (typeof (first) === "object" && first && (typeof (first.documentIds) != 'undefined')) {
2263
+ _request = documentIds;
2264
+ _options = webapi_options;
2265
+ }
2266
+ else {
2267
+ _request = {
2268
+ documentIds: documentIds,
2269
+ };
2270
+ _options = webapi_options;
2271
+ }
2272
+ return this._getPublishedDocumentsAsync(_request, _options);
2273
+ }
2274
+ async _getMyPublishedDocumentsAsync(options) {
2275
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
2276
+ base.WebApiBase.SetPending(options);
2277
+ return new Promise(async (resolve, reject) => {
2278
+ try {
2279
+ config.baseURL = this._options.baseUrl;
2280
+ const response = await this._axios.post("GetMyPublishedDocuments", undefined, config);
2281
+ base.WebApiBase.SetCompleted(options);
2282
+ const res = converters.Create_DocumentArray_From(response.data);
2283
+ resolve(res);
2284
+ }
2285
+ catch (err) {
2286
+ base.WebApiBase.HandleError(options, config, err);
2287
+ reject(err);
2288
+ }
2289
+ });
2290
+ }
2291
+ /**
2292
+ *
2293
+ * @returns Array of documents
2294
+ */
2295
+ async getMyPublishedDocumentsAsync(webapi_options) {
2296
+ return this._getMyPublishedDocumentsAsync(webapi_options);
2297
+ }
2298
+ async _getPublishedDocumentsByDateAsync(request, options) {
2299
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
2300
+ base.WebApiBase.SetPending(options);
2301
+ return new Promise(async (resolve, reject) => {
2302
+ try {
2303
+ config.baseURL = this._options.baseUrl;
2304
+ const response = await this._axios.post("GetPublishedDocumentsByDate", request, config);
2305
+ base.WebApiBase.SetCompleted(options);
2306
+ const res = converters.Create_DocumentArray_From(response.data);
2307
+ resolve(res);
2308
+ }
2309
+ catch (err) {
2310
+ base.WebApiBase.HandleError(options, config, err);
2311
+ reject(err);
2312
+ }
2313
+ });
2314
+ }
2315
+ async getPublishedDocumentsByDateAsync(personId, includeProjectDocuments, startTime, endTime, count, webapi_options) {
2316
+ let _request = null;
2317
+ let _options = null;
2318
+ const first = personId;
2319
+ if (typeof (first) === "object" && first && (typeof (first.personId) != 'undefined' || typeof (first.includeProjectDocuments) != 'undefined' || typeof (first.startTime) != 'undefined' || typeof (first.endTime) != 'undefined' || typeof (first.count) != 'undefined')) {
2320
+ _request = personId;
2321
+ _options = includeProjectDocuments;
2322
+ }
2323
+ else {
2324
+ _request = {
2325
+ personId: personId,
2326
+ includeProjectDocuments: includeProjectDocuments,
2327
+ startTime: startTime,
2328
+ endTime: endTime,
2329
+ count: count,
2330
+ };
2331
+ _options = webapi_options;
2332
+ }
2333
+ return this._getPublishedDocumentsByDateAsync(_request, _options);
2334
+ }
2335
+ async _getContactDocumentsByTemplateTypesAsync(request, options) {
2336
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
2337
+ base.WebApiBase.SetPending(options);
2338
+ return new Promise(async (resolve, reject) => {
2339
+ try {
2340
+ config.baseURL = this._options.baseUrl;
2341
+ const response = await this._axios.post("GetContactDocumentsByTemplateTypes", request, config);
2342
+ base.WebApiBase.SetCompleted(options);
2343
+ const res = converters.Create_DocumentArray_From(response.data);
2344
+ resolve(res);
2345
+ }
2346
+ catch (err) {
2347
+ base.WebApiBase.HandleError(options, config, err);
2348
+ reject(err);
2349
+ }
2350
+ });
2351
+ }
2352
+ async getContactDocumentsByTemplateTypesAsync(contactId, startTime, endTime, count, documentTemplateIds, webapi_options) {
2353
+ let _request = null;
2354
+ let _options = null;
2355
+ const first = contactId;
2356
+ if (typeof (first) === "object" && first && (typeof (first.contactId) != 'undefined' || typeof (first.startTime) != 'undefined' || typeof (first.endTime) != 'undefined' || typeof (first.count) != 'undefined' || typeof (first.documentTemplateIds) != 'undefined')) {
2357
+ _request = contactId;
2358
+ _options = startTime;
2359
+ }
2360
+ else {
2361
+ _request = {
2362
+ contactId: contactId,
2363
+ startTime: startTime,
2364
+ endTime: endTime,
2365
+ count: count,
2366
+ documentTemplateIds: documentTemplateIds,
2367
+ };
2368
+ _options = webapi_options;
2369
+ }
2370
+ return this._getContactDocumentsByTemplateTypesAsync(_request, _options);
2371
+ }
2372
+ async _getContactDocumentsByTemplateTypeAsync(request, options) {
2373
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
2374
+ base.WebApiBase.SetPending(options);
2375
+ return new Promise(async (resolve, reject) => {
2376
+ try {
2377
+ config.baseURL = this._options.baseUrl;
2378
+ const response = await this._axios.post("GetContactDocumentsByTemplateType", request, config);
2379
+ base.WebApiBase.SetCompleted(options);
2380
+ const res = converters.Create_DocumentArray_From(response.data);
2381
+ resolve(res);
2382
+ }
2383
+ catch (err) {
2384
+ base.WebApiBase.HandleError(options, config, err);
2385
+ reject(err);
2386
+ }
2387
+ });
2388
+ }
2389
+ async getContactDocumentsByTemplateTypeAsync(contactId, startTime, endTime, count, documentTemplateId, webapi_options) {
2390
+ let _request = null;
2391
+ let _options = null;
2392
+ const first = contactId;
2393
+ if (typeof (first) === "object" && first && (typeof (first.contactId) != 'undefined' || typeof (first.startTime) != 'undefined' || typeof (first.endTime) != 'undefined' || typeof (first.count) != 'undefined' || typeof (first.documentTemplateId) != 'undefined')) {
2394
+ _request = contactId;
2395
+ _options = startTime;
2396
+ }
2397
+ else {
2398
+ _request = {
2399
+ contactId: contactId,
2400
+ startTime: startTime,
2401
+ endTime: endTime,
2402
+ count: count,
2403
+ documentTemplateId: documentTemplateId,
2404
+ };
2405
+ _options = webapi_options;
2406
+ }
2407
+ return this._getContactDocumentsByTemplateTypeAsync(_request, _options);
2408
+ }
2409
+ async _getContactDocumentsByTemplateHeadingAsync(request, options) {
2410
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
2411
+ base.WebApiBase.SetPending(options);
2412
+ return new Promise(async (resolve, reject) => {
2413
+ try {
2414
+ config.baseURL = this._options.baseUrl;
2415
+ const response = await this._axios.post("GetContactDocumentsByTemplateHeading", request, config);
2416
+ base.WebApiBase.SetCompleted(options);
2417
+ const res = converters.Create_DocumentArray_From(response.data);
2418
+ resolve(res);
2419
+ }
2420
+ catch (err) {
2421
+ base.WebApiBase.HandleError(options, config, err);
2422
+ reject(err);
2423
+ }
2424
+ });
2425
+ }
2426
+ async getContactDocumentsByTemplateHeadingAsync(contactId, startTime, endTime, count, templateHeadingId, webapi_options) {
2427
+ let _request = null;
2428
+ let _options = null;
2429
+ const first = contactId;
2430
+ if (typeof (first) === "object" && first && (typeof (first.contactId) != 'undefined' || typeof (first.startTime) != 'undefined' || typeof (first.endTime) != 'undefined' || typeof (first.count) != 'undefined' || typeof (first.templateHeadingId) != 'undefined')) {
2431
+ _request = contactId;
2432
+ _options = startTime;
2433
+ }
2434
+ else {
2435
+ _request = {
2436
+ contactId: contactId,
2437
+ startTime: startTime,
2438
+ endTime: endTime,
2439
+ count: count,
2440
+ templateHeadingId: templateHeadingId,
2441
+ };
2442
+ _options = webapi_options;
2443
+ }
2444
+ return this._getContactDocumentsByTemplateHeadingAsync(_request, _options);
2445
+ }
2446
+ async _getContactDocumentsAsync(request, options) {
2447
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
2448
+ base.WebApiBase.SetPending(options);
2449
+ return new Promise(async (resolve, reject) => {
2450
+ try {
2451
+ config.baseURL = this._options.baseUrl;
2452
+ const response = await this._axios.post("GetContactDocuments", request, config);
2453
+ base.WebApiBase.SetCompleted(options);
2454
+ const res = converters.Create_DocumentArray_From(response.data);
2455
+ resolve(res);
2456
+ }
2457
+ catch (err) {
2458
+ base.WebApiBase.HandleError(options, config, err);
2459
+ reject(err);
2460
+ }
2461
+ });
2462
+ }
2463
+ async getContactDocumentsAsync(contactId, startTime, endTime, count, webapi_options) {
2464
+ let _request = null;
2465
+ let _options = null;
2466
+ const first = contactId;
2467
+ if (typeof (first) === "object" && first && (typeof (first.contactId) != 'undefined' || typeof (first.startTime) != 'undefined' || typeof (first.endTime) != 'undefined' || typeof (first.count) != 'undefined')) {
2468
+ _request = contactId;
2469
+ _options = startTime;
2470
+ }
2471
+ else {
2472
+ _request = {
2473
+ contactId: contactId,
2474
+ startTime: startTime,
2475
+ endTime: endTime,
2476
+ count: count,
2477
+ };
2478
+ _options = webapi_options;
2479
+ }
2480
+ return this._getContactDocumentsAsync(_request, _options);
2481
+ }
2482
+ async _getPublishedPersonDocumentsByDateAsync(request, options) {
2483
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
2484
+ base.WebApiBase.SetPending(options);
2485
+ return new Promise(async (resolve, reject) => {
2486
+ try {
2487
+ config.baseURL = this._options.baseUrl;
2488
+ const response = await this._axios.post("GetPublishedPersonDocumentsByDate", request, config);
2489
+ base.WebApiBase.SetCompleted(options);
2490
+ const res = converters.Create_DocumentArray_From(response.data);
2491
+ resolve(res);
2492
+ }
2493
+ catch (err) {
2494
+ base.WebApiBase.HandleError(options, config, err);
2495
+ reject(err);
2496
+ }
2497
+ });
2498
+ }
2499
+ async getPublishedPersonDocumentsByDateAsync(personId, includeProjectDocuments, startTime, endTime, count, webapi_options) {
2500
+ let _request = null;
2501
+ let _options = null;
2502
+ const first = personId;
2503
+ if (typeof (first) === "object" && first && (typeof (first.personId) != 'undefined' || typeof (first.includeProjectDocuments) != 'undefined' || typeof (first.startTime) != 'undefined' || typeof (first.endTime) != 'undefined' || typeof (first.count) != 'undefined')) {
2504
+ _request = personId;
2505
+ _options = includeProjectDocuments;
2506
+ }
2507
+ else {
2508
+ _request = {
2509
+ personId: personId,
2510
+ includeProjectDocuments: includeProjectDocuments,
2511
+ startTime: startTime,
2512
+ endTime: endTime,
2513
+ count: count,
2514
+ };
2515
+ _options = webapi_options;
2516
+ }
2517
+ return this._getPublishedPersonDocumentsByDateAsync(_request, _options);
2518
+ }
2519
+ async _getPublishedProjectDocumentsAsync(request, options) {
2520
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
2521
+ base.WebApiBase.SetPending(options);
2522
+ return new Promise(async (resolve, reject) => {
2523
+ try {
2524
+ config.baseURL = this._options.baseUrl;
2525
+ const response = await this._axios.post("GetPublishedProjectDocuments", request, config);
2526
+ base.WebApiBase.SetCompleted(options);
2527
+ const res = converters.Create_DocumentArray_From(response.data);
2528
+ resolve(res);
2529
+ }
2530
+ catch (err) {
2531
+ base.WebApiBase.HandleError(options, config, err);
2532
+ reject(err);
2533
+ }
2534
+ });
2535
+ }
2536
+ async getPublishedProjectDocumentsAsync(projectId, webapi_options) {
2537
+ let _request = null;
2538
+ let _options = null;
2539
+ const first = projectId;
2540
+ if (typeof (first) === "object" && first && (typeof (first.projectId) != 'undefined')) {
2541
+ _request = projectId;
2542
+ _options = webapi_options;
2543
+ }
2544
+ else {
2545
+ _request = {
2546
+ projectId: projectId,
2547
+ };
2548
+ _options = webapi_options;
2549
+ }
2550
+ return this._getPublishedProjectDocumentsAsync(_request, _options);
2551
+ }
2552
+ async _getProjectMemberDocumentsByTemplateTypesAsync(request, options) {
2553
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
2554
+ base.WebApiBase.SetPending(options);
2555
+ return new Promise(async (resolve, reject) => {
2556
+ try {
2557
+ config.baseURL = this._options.baseUrl;
2558
+ const response = await this._axios.post("GetProjectMemberDocumentsByTemplateTypes", request, config);
2559
+ base.WebApiBase.SetCompleted(options);
2560
+ const res = converters.Create_DocumentArray_From(response.data);
2561
+ resolve(res);
2562
+ }
2563
+ catch (err) {
2564
+ base.WebApiBase.HandleError(options, config, err);
2565
+ reject(err);
2566
+ }
2567
+ });
2568
+ }
2569
+ async getProjectMemberDocumentsByTemplateTypesAsync(personId, startTime, endTime, count, documentTemplateIds, webapi_options) {
2570
+ let _request = null;
2571
+ let _options = null;
2572
+ const first = personId;
2573
+ if (typeof (first) === "object" && first && (typeof (first.personId) != 'undefined' || typeof (first.startTime) != 'undefined' || typeof (first.endTime) != 'undefined' || typeof (first.count) != 'undefined' || typeof (first.documentTemplateIds) != 'undefined')) {
2574
+ _request = personId;
2575
+ _options = startTime;
2576
+ }
2577
+ else {
2578
+ _request = {
2579
+ personId: personId,
2580
+ startTime: startTime,
2581
+ endTime: endTime,
2582
+ count: count,
2583
+ documentTemplateIds: documentTemplateIds,
2584
+ };
2585
+ _options = webapi_options;
2586
+ }
2587
+ return this._getProjectMemberDocumentsByTemplateTypesAsync(_request, _options);
2588
+ }
2589
+ async _getProjectMemberDocumentsByTemplateTypeAsync(request, options) {
2590
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
2591
+ base.WebApiBase.SetPending(options);
2592
+ return new Promise(async (resolve, reject) => {
2593
+ try {
2594
+ config.baseURL = this._options.baseUrl;
2595
+ const response = await this._axios.post("GetProjectMemberDocumentsByTemplateType", request, config);
2596
+ base.WebApiBase.SetCompleted(options);
2597
+ const res = converters.Create_DocumentArray_From(response.data);
2598
+ resolve(res);
2599
+ }
2600
+ catch (err) {
2601
+ base.WebApiBase.HandleError(options, config, err);
2602
+ reject(err);
2603
+ }
2604
+ });
2605
+ }
2606
+ async getProjectMemberDocumentsByTemplateTypeAsync(personId, startTime, endTime, count, documentTemplateId, webapi_options) {
2607
+ let _request = null;
2608
+ let _options = null;
2609
+ const first = personId;
2610
+ if (typeof (first) === "object" && first && (typeof (first.personId) != 'undefined' || typeof (first.startTime) != 'undefined' || typeof (first.endTime) != 'undefined' || typeof (first.count) != 'undefined' || typeof (first.documentTemplateId) != 'undefined')) {
2611
+ _request = personId;
2612
+ _options = startTime;
2613
+ }
2614
+ else {
2615
+ _request = {
2616
+ personId: personId,
2617
+ startTime: startTime,
2618
+ endTime: endTime,
2619
+ count: count,
2620
+ documentTemplateId: documentTemplateId,
2621
+ };
2622
+ _options = webapi_options;
2623
+ }
2624
+ return this._getProjectMemberDocumentsByTemplateTypeAsync(_request, _options);
2625
+ }
2626
+ async _getProjectMemberDocumentsByTemplateHeadingAsync(request, options) {
2627
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
2628
+ base.WebApiBase.SetPending(options);
2629
+ return new Promise(async (resolve, reject) => {
2630
+ try {
2631
+ config.baseURL = this._options.baseUrl;
2632
+ const response = await this._axios.post("GetProjectMemberDocumentsByTemplateHeading", request, config);
2633
+ base.WebApiBase.SetCompleted(options);
2634
+ const res = converters.Create_DocumentArray_From(response.data);
2635
+ resolve(res);
2636
+ }
2637
+ catch (err) {
2638
+ base.WebApiBase.HandleError(options, config, err);
2639
+ reject(err);
2640
+ }
2641
+ });
2642
+ }
2643
+ async getProjectMemberDocumentsByTemplateHeadingAsync(personId, startTime, endTime, count, templateHeadingId, webapi_options) {
2644
+ let _request = null;
2645
+ let _options = null;
2646
+ const first = personId;
2647
+ if (typeof (first) === "object" && first && (typeof (first.personId) != 'undefined' || typeof (first.startTime) != 'undefined' || typeof (first.endTime) != 'undefined' || typeof (first.count) != 'undefined' || typeof (first.templateHeadingId) != 'undefined')) {
2648
+ _request = personId;
2649
+ _options = startTime;
2650
+ }
2651
+ else {
2652
+ _request = {
2653
+ personId: personId,
2654
+ startTime: startTime,
2655
+ endTime: endTime,
2656
+ count: count,
2657
+ templateHeadingId: templateHeadingId,
2658
+ };
2659
+ _options = webapi_options;
2660
+ }
2661
+ return this._getProjectMemberDocumentsByTemplateHeadingAsync(_request, _options);
2662
+ }
2663
+ async _getProjectMemberDocumentsAsync(request, options) {
2664
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
2665
+ base.WebApiBase.SetPending(options);
2666
+ return new Promise(async (resolve, reject) => {
2667
+ try {
2668
+ config.baseURL = this._options.baseUrl;
2669
+ const response = await this._axios.post("GetProjectMemberDocuments", request, config);
2670
+ base.WebApiBase.SetCompleted(options);
2671
+ const res = converters.Create_DocumentArray_From(response.data);
2672
+ resolve(res);
2673
+ }
2674
+ catch (err) {
2675
+ base.WebApiBase.HandleError(options, config, err);
2676
+ reject(err);
2677
+ }
2678
+ });
2679
+ }
2680
+ async getProjectMemberDocumentsAsync(personId, startTime, endTime, count, webapi_options) {
2681
+ let _request = null;
2682
+ let _options = null;
2683
+ const first = personId;
2684
+ if (typeof (first) === "object" && first && (typeof (first.personId) != 'undefined' || typeof (first.startTime) != 'undefined' || typeof (first.endTime) != 'undefined' || typeof (first.count) != 'undefined')) {
2685
+ _request = personId;
2686
+ _options = startTime;
2687
+ }
2688
+ else {
2689
+ _request = {
2690
+ personId: personId,
2691
+ startTime: startTime,
2692
+ endTime: endTime,
2693
+ count: count,
2694
+ };
2695
+ _options = webapi_options;
2696
+ }
2697
+ return this._getProjectMemberDocumentsAsync(_request, _options);
2698
+ }
2699
+ async _getProjectDocumentsByTemplateTypesAsync(request, options) {
2700
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
2701
+ base.WebApiBase.SetPending(options);
2702
+ return new Promise(async (resolve, reject) => {
2703
+ try {
2704
+ config.baseURL = this._options.baseUrl;
2705
+ const response = await this._axios.post("GetProjectDocumentsByTemplateTypes", request, config);
2706
+ base.WebApiBase.SetCompleted(options);
2707
+ const res = converters.Create_DocumentArray_From(response.data);
2708
+ resolve(res);
2709
+ }
2710
+ catch (err) {
2711
+ base.WebApiBase.HandleError(options, config, err);
2712
+ reject(err);
2713
+ }
2714
+ });
2715
+ }
2716
+ async getProjectDocumentsByTemplateTypesAsync(projectId, startTime, endTime, count, documentTemplateIds, webapi_options) {
2717
+ let _request = null;
2718
+ let _options = null;
2719
+ const first = projectId;
2720
+ if (typeof (first) === "object" && first && (typeof (first.projectId) != 'undefined' || typeof (first.startTime) != 'undefined' || typeof (first.endTime) != 'undefined' || typeof (first.count) != 'undefined' || typeof (first.documentTemplateIds) != 'undefined')) {
2721
+ _request = projectId;
2722
+ _options = startTime;
2723
+ }
2724
+ else {
2725
+ _request = {
2726
+ projectId: projectId,
2727
+ startTime: startTime,
2728
+ endTime: endTime,
2729
+ count: count,
2730
+ documentTemplateIds: documentTemplateIds,
2731
+ };
2732
+ _options = webapi_options;
2733
+ }
2734
+ return this._getProjectDocumentsByTemplateTypesAsync(_request, _options);
2735
+ }
2736
+ async _getProjectDocumentsByTemplateTypeAsync(request, options) {
2737
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
2738
+ base.WebApiBase.SetPending(options);
2739
+ return new Promise(async (resolve, reject) => {
2740
+ try {
2741
+ config.baseURL = this._options.baseUrl;
2742
+ const response = await this._axios.post("GetProjectDocumentsByTemplateType", request, config);
2743
+ base.WebApiBase.SetCompleted(options);
2744
+ const res = converters.Create_DocumentArray_From(response.data);
2745
+ resolve(res);
2746
+ }
2747
+ catch (err) {
2748
+ base.WebApiBase.HandleError(options, config, err);
2749
+ reject(err);
2750
+ }
2751
+ });
2752
+ }
2753
+ async getProjectDocumentsByTemplateTypeAsync(projectId, startTime, endTime, count, documentTemplateId, webapi_options) {
2754
+ let _request = null;
2755
+ let _options = null;
2756
+ const first = projectId;
2757
+ if (typeof (first) === "object" && first && (typeof (first.projectId) != 'undefined' || typeof (first.startTime) != 'undefined' || typeof (first.endTime) != 'undefined' || typeof (first.count) != 'undefined' || typeof (first.documentTemplateId) != 'undefined')) {
2758
+ _request = projectId;
2759
+ _options = startTime;
2760
+ }
2761
+ else {
2762
+ _request = {
2763
+ projectId: projectId,
2764
+ startTime: startTime,
2765
+ endTime: endTime,
2766
+ count: count,
2767
+ documentTemplateId: documentTemplateId,
2768
+ };
2769
+ _options = webapi_options;
2770
+ }
2771
+ return this._getProjectDocumentsByTemplateTypeAsync(_request, _options);
2772
+ }
2773
+ async _getProjectDocumentsByTemplateHeadingAsync(request, options) {
2774
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
2775
+ base.WebApiBase.SetPending(options);
2776
+ return new Promise(async (resolve, reject) => {
2777
+ try {
2778
+ config.baseURL = this._options.baseUrl;
2779
+ const response = await this._axios.post("GetProjectDocumentsByTemplateHeading", request, config);
2780
+ base.WebApiBase.SetCompleted(options);
2781
+ const res = converters.Create_DocumentArray_From(response.data);
2782
+ resolve(res);
2783
+ }
2784
+ catch (err) {
2785
+ base.WebApiBase.HandleError(options, config, err);
2786
+ reject(err);
2787
+ }
2788
+ });
2789
+ }
2790
+ async getProjectDocumentsByTemplateHeadingAsync(projectId, startTime, endTime, count, templateHeadingId, webapi_options) {
2791
+ let _request = null;
2792
+ let _options = null;
2793
+ const first = projectId;
2794
+ if (typeof (first) === "object" && first && (typeof (first.projectId) != 'undefined' || typeof (first.startTime) != 'undefined' || typeof (first.endTime) != 'undefined' || typeof (first.count) != 'undefined' || typeof (first.templateHeadingId) != 'undefined')) {
2795
+ _request = projectId;
2796
+ _options = startTime;
2797
+ }
2798
+ else {
2799
+ _request = {
2800
+ projectId: projectId,
2801
+ startTime: startTime,
2802
+ endTime: endTime,
2803
+ count: count,
2804
+ templateHeadingId: templateHeadingId,
2805
+ };
2806
+ _options = webapi_options;
2807
+ }
2808
+ return this._getProjectDocumentsByTemplateHeadingAsync(_request, _options);
2809
+ }
2810
+ async _getProjectDocumentsAsync(request, options) {
2811
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
2812
+ base.WebApiBase.SetPending(options);
2813
+ return new Promise(async (resolve, reject) => {
2814
+ try {
2815
+ config.baseURL = this._options.baseUrl;
2816
+ const response = await this._axios.post("GetProjectDocuments", request, config);
2817
+ base.WebApiBase.SetCompleted(options);
2818
+ const res = converters.Create_DocumentArray_From(response.data);
2819
+ resolve(res);
2820
+ }
2821
+ catch (err) {
2822
+ base.WebApiBase.HandleError(options, config, err);
2823
+ reject(err);
2824
+ }
2825
+ });
2826
+ }
2827
+ async getProjectDocumentsAsync(projectId, startTime, endTime, count, webapi_options) {
2828
+ let _request = null;
2829
+ let _options = null;
2830
+ const first = projectId;
2831
+ if (typeof (first) === "object" && first && (typeof (first.projectId) != 'undefined' || typeof (first.startTime) != 'undefined' || typeof (first.endTime) != 'undefined' || typeof (first.count) != 'undefined')) {
2832
+ _request = projectId;
2833
+ _options = startTime;
2834
+ }
2835
+ else {
2836
+ _request = {
2837
+ projectId: projectId,
2838
+ startTime: startTime,
2839
+ endTime: endTime,
2840
+ count: count,
2841
+ };
2842
+ _options = webapi_options;
2843
+ }
2844
+ return this._getProjectDocumentsAsync(_request, _options);
2845
+ }
2846
+ async _getPersonDocumentsByTemplateTypesAsync(request, options) {
2847
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
2848
+ base.WebApiBase.SetPending(options);
2849
+ return new Promise(async (resolve, reject) => {
2850
+ try {
2851
+ config.baseURL = this._options.baseUrl;
2852
+ const response = await this._axios.post("GetPersonDocumentsByTemplateTypes", request, config);
2853
+ base.WebApiBase.SetCompleted(options);
2854
+ const res = converters.Create_DocumentArray_From(response.data);
2855
+ resolve(res);
2856
+ }
2857
+ catch (err) {
2858
+ base.WebApiBase.HandleError(options, config, err);
2859
+ reject(err);
2860
+ }
2861
+ });
2862
+ }
2863
+ async getPersonDocumentsByTemplateTypesAsync(personId, includeProjectDocuments, startTime, endTime, count, documentTemplateIds, webapi_options) {
2864
+ let _request = null;
2865
+ let _options = null;
2866
+ const first = personId;
2867
+ if (typeof (first) === "object" && first && (typeof (first.personId) != 'undefined' || typeof (first.includeProjectDocuments) != 'undefined' || typeof (first.startTime) != 'undefined' || typeof (first.endTime) != 'undefined' || typeof (first.count) != 'undefined' || typeof (first.documentTemplateIds) != 'undefined')) {
2868
+ _request = personId;
2869
+ _options = includeProjectDocuments;
2870
+ }
2871
+ else {
2872
+ _request = {
2873
+ personId: personId,
2874
+ includeProjectDocuments: includeProjectDocuments,
2875
+ startTime: startTime,
2876
+ endTime: endTime,
2877
+ count: count,
2878
+ documentTemplateIds: documentTemplateIds,
2879
+ };
2880
+ _options = webapi_options;
2881
+ }
2882
+ return this._getPersonDocumentsByTemplateTypesAsync(_request, _options);
2883
+ }
2884
+ async _getPersonDocumentsByTemplateTypeAsync(request, options) {
2885
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
2886
+ base.WebApiBase.SetPending(options);
2887
+ return new Promise(async (resolve, reject) => {
2888
+ try {
2889
+ config.baseURL = this._options.baseUrl;
2890
+ const response = await this._axios.post("GetPersonDocumentsByTemplateType", request, config);
2891
+ base.WebApiBase.SetCompleted(options);
2892
+ const res = converters.Create_DocumentArray_From(response.data);
2893
+ resolve(res);
2894
+ }
2895
+ catch (err) {
2896
+ base.WebApiBase.HandleError(options, config, err);
2897
+ reject(err);
2898
+ }
2899
+ });
2900
+ }
2901
+ async getPersonDocumentsByTemplateTypeAsync(personId, includeProjectDocuments, startTime, endTime, count, documentTemplateId, webapi_options) {
2902
+ let _request = null;
2903
+ let _options = null;
2904
+ const first = personId;
2905
+ if (typeof (first) === "object" && first && (typeof (first.personId) != 'undefined' || typeof (first.includeProjectDocuments) != 'undefined' || typeof (first.startTime) != 'undefined' || typeof (first.endTime) != 'undefined' || typeof (first.count) != 'undefined' || typeof (first.documentTemplateId) != 'undefined')) {
2906
+ _request = personId;
2907
+ _options = includeProjectDocuments;
2908
+ }
2909
+ else {
2910
+ _request = {
2911
+ personId: personId,
2912
+ includeProjectDocuments: includeProjectDocuments,
2913
+ startTime: startTime,
2914
+ endTime: endTime,
2915
+ count: count,
2916
+ documentTemplateId: documentTemplateId,
2917
+ };
2918
+ _options = webapi_options;
2919
+ }
2920
+ return this._getPersonDocumentsByTemplateTypeAsync(_request, _options);
2921
+ }
2922
+ async _getPersonDocumentsByTemplateHeadingAsync(request, options) {
2923
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
2924
+ base.WebApiBase.SetPending(options);
2925
+ return new Promise(async (resolve, reject) => {
2926
+ try {
2927
+ config.baseURL = this._options.baseUrl;
2928
+ const response = await this._axios.post("GetPersonDocumentsByTemplateHeading", request, config);
2929
+ base.WebApiBase.SetCompleted(options);
2930
+ const res = converters.Create_DocumentArray_From(response.data);
2931
+ resolve(res);
2932
+ }
2933
+ catch (err) {
2934
+ base.WebApiBase.HandleError(options, config, err);
2935
+ reject(err);
2936
+ }
2937
+ });
2938
+ }
2939
+ async getPersonDocumentsByTemplateHeadingAsync(personId, includeProjectDocuments, startTime, endTime, count, templateHeadingId, webapi_options) {
2940
+ let _request = null;
2941
+ let _options = null;
2942
+ const first = personId;
2943
+ if (typeof (first) === "object" && first && (typeof (first.personId) != 'undefined' || typeof (first.includeProjectDocuments) != 'undefined' || typeof (first.startTime) != 'undefined' || typeof (first.endTime) != 'undefined' || typeof (first.count) != 'undefined' || typeof (first.templateHeadingId) != 'undefined')) {
2944
+ _request = personId;
2945
+ _options = includeProjectDocuments;
2946
+ }
2947
+ else {
2948
+ _request = {
2949
+ personId: personId,
2950
+ includeProjectDocuments: includeProjectDocuments,
2951
+ startTime: startTime,
2952
+ endTime: endTime,
2953
+ count: count,
2954
+ templateHeadingId: templateHeadingId,
2955
+ };
2956
+ _options = webapi_options;
2957
+ }
2958
+ return this._getPersonDocumentsByTemplateHeadingAsync(_request, _options);
2959
+ }
2960
+ async _getPersonDocumentsByDateAsync(request, options) {
2961
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
2962
+ base.WebApiBase.SetPending(options);
2963
+ return new Promise(async (resolve, reject) => {
2964
+ try {
2965
+ config.baseURL = this._options.baseUrl;
2966
+ const response = await this._axios.post("GetPersonDocumentsByDate", request, config);
2967
+ base.WebApiBase.SetCompleted(options);
2968
+ const res = converters.Create_DocumentArray_From(response.data);
2969
+ resolve(res);
2970
+ }
2971
+ catch (err) {
2972
+ base.WebApiBase.HandleError(options, config, err);
2973
+ reject(err);
2974
+ }
2975
+ });
2976
+ }
2977
+ async getPersonDocumentsByDateAsync(personId, includeProjectDocuments, startTime, endTime, count, webapi_options) {
2978
+ let _request = null;
2979
+ let _options = null;
2980
+ const first = personId;
2981
+ if (typeof (first) === "object" && first && (typeof (first.personId) != 'undefined' || typeof (first.includeProjectDocuments) != 'undefined' || typeof (first.startTime) != 'undefined' || typeof (first.endTime) != 'undefined' || typeof (first.count) != 'undefined')) {
2982
+ _request = personId;
2983
+ _options = includeProjectDocuments;
2984
+ }
2985
+ else {
2986
+ _request = {
2987
+ personId: personId,
2988
+ includeProjectDocuments: includeProjectDocuments,
2989
+ startTime: startTime,
2990
+ endTime: endTime,
2991
+ count: count,
2992
+ };
2993
+ _options = webapi_options;
2994
+ }
2995
+ return this._getPersonDocumentsByDateAsync(_request, _options);
2996
+ }
2997
+ async _getDocumentsByTemplateHeadingAsync(request, options) {
2998
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
2999
+ base.WebApiBase.SetPending(options);
3000
+ return new Promise(async (resolve, reject) => {
3001
+ try {
3002
+ config.baseURL = this._options.baseUrl;
3003
+ const response = await this._axios.post("GetDocumentsByTemplateHeading", request, config);
3004
+ base.WebApiBase.SetCompleted(options);
3005
+ const res = converters.Create_DocumentArray_From(response.data);
3006
+ resolve(res);
3007
+ }
3008
+ catch (err) {
3009
+ base.WebApiBase.HandleError(options, config, err);
3010
+ reject(err);
3011
+ }
3012
+ });
3013
+ }
3014
+ async getDocumentsByTemplateHeadingAsync(templateHeadingId, webapi_options) {
3015
+ let _request = null;
3016
+ let _options = null;
3017
+ const first = templateHeadingId;
3018
+ if (typeof (first) === "object" && first && (typeof (first.templateHeadingId) != 'undefined')) {
3019
+ _request = templateHeadingId;
3020
+ _options = webapi_options;
3021
+ }
3022
+ else {
3023
+ _request = {
3024
+ templateHeadingId: templateHeadingId,
3025
+ };
3026
+ _options = webapi_options;
3027
+ }
3028
+ return this._getDocumentsByTemplateHeadingAsync(_request, _options);
3029
+ }
3030
+ /*
3031
+ * Gets a SuggestedDocumentEntity object.
3032
+ * @param suggestedDocumentEntityId - The primary key.
3033
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
3034
+ * @returns A single SuggestedDocumentEntity
3035
+ */
3036
+ async getSuggestedDocumentEntityAsync(suggestedDocumentEntityId, options) {
3037
+ const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
3038
+ base.WebApiBase.SetPending(options);
3039
+ return new Promise(async (resolve, reject) => {
3040
+ try {
3041
+ const response = await this._axios.post("GetSuggestedDocumentEntity?suggestedDocumentEntityId=" + suggestedDocumentEntityId, null, config);
3042
+ base.WebApiBase.SetCompleted(options);
3043
+ const res = converters.Create_SuggestedDocumentEntity_From(response.data);
3044
+ resolve(res);
3045
+ }
3046
+ catch (err) {
3047
+ base.WebApiBase.HandleError(options, config, err);
3048
+ reject(err);
3049
+ }
3050
+ });
3051
+ }
3052
+ } // class v1DocumentAgentController
3053
+ //# sourceMappingURL=DocumentAgent.js.map