@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,2214 @@
1
+ // <auto-generated>
2
+ // SuperOffice Code Generator
3
+ // modelling\templates\servicestswebapi\tswebapiagents.tt
4
+ // </auto-generated>
5
+
6
+
7
+ /* tslint:disable */
8
+ //----------------------------------------------------------------------------
9
+ // G E N E R A T E D F I L E ! D O N O T E D I T !
10
+ //----------------------------------------------------------------------------
11
+ //
12
+ // File: WebApi/BLOBAgent.ts
13
+ //
14
+ //----------------------------------------------------------------------------
15
+ // Copyright (C) SuperOffice AS
16
+ //----------------------------------------------------------------------------
17
+
18
+ import { AxiosRequestConfig } from 'axios';
19
+ import { Duration } from 'dayjs/plugin/duration';
20
+ import * as enums from './Enums.js';
21
+ import * as base from './WebApiBase.js';
22
+ import * as carriers from './Carriers.js';
23
+ import * as converters from './Converters.js';
24
+ import { FromBase64ToString, ToBase64 } from './Base64.js';
25
+
26
+ /**
27
+ * Collection of all services that works with binary objects (BLOBS), e.g. Images and documents.
28
+ */
29
+ export interface IBLOBAgent {
30
+ createDefaultBlobEntityAsync(): Promise< carriers.BlobEntity >;
31
+ saveBlobEntityAsync(entity: carriers.BlobEntity) : Promise< carriers.BlobEntity >;
32
+ deleteBlobEntityAsync(BlobEntityId: number) : Promise<void>;
33
+ getBlobEntityAsync(blobEntityId: number) : Promise< carriers.BlobEntity >;
34
+ setBlobStreamAsync(request: carriers.BLOB_SetBlobStreamRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
35
+ setBlobStreamAsync(blobEntityId: number, stream: ArrayBuffer|string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
36
+ getBlobStreamAsync(request: carriers.BLOB_GetBlobStreamRequest, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
37
+ getBlobStreamAsync(blobEntityId: number, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
38
+ getProjectImageAsync(request: carriers.BLOB_GetProjectImageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
39
+ getProjectImageAsync(projectId: number, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
40
+ getPersonImageAsync(request: carriers.BLOB_GetPersonImageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
41
+ getPersonImageAsync(personId: number, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
42
+ setProjectImageAsync(request: carriers.BLOB_SetProjectImageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
43
+ setProjectImageAsync(projectId: number, image: ArrayBuffer|string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
44
+ setPersonImageAsync(request: carriers.BLOB_SetPersonImageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
45
+ setPersonImageAsync(personId: number, image: ArrayBuffer|string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
46
+ changeProjectImageAsync(request: carriers.BLOB_ChangeProjectImageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
47
+ changeProjectImageAsync(projectId: number, blobId: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
48
+ saveProjectImageAsync(request: carriers.BLOB_SaveProjectImageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
49
+ saveProjectImageAsync(description: string, image: ArrayBuffer|string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
50
+ getBlobEntityOnProjectAsync(request: carriers.BLOB_GetBlobEntityOnProjectRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.BlobEntity >;
51
+ getBlobEntityOnProjectAsync(projectId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.BlobEntity >;
52
+ getBlobEntityOnPersonAsync(request: carriers.BLOB_GetBlobEntityOnPersonRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.BlobEntity >;
53
+ getBlobEntityOnPersonAsync(personId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.BlobEntity >;
54
+ getBlobEntityOnCountryAsync(request: carriers.BLOB_GetBlobEntityOnCountryRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.BlobEntity >;
55
+ getBlobEntityOnCountryAsync(countryId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.BlobEntity >;
56
+ getBlobEntityOnProductAsync(request: carriers.BLOB_GetBlobEntityOnProductRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.BlobEntity >;
57
+ getBlobEntityOnProductAsync(productId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.BlobEntity >;
58
+ changePersonImageAsync(request: carriers.BLOB_ChangePersonImageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
59
+ changePersonImageAsync(personId: number, blobId: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
60
+ saveImageStreamAsync(request: carriers.BLOB_SaveImageStreamRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
61
+ saveImageStreamAsync(type: enums.BlobLinkType, image: ArrayBuffer|string, description: string, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
62
+ getProductImageAsync(request: carriers.BLOB_GetProductImageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
63
+ getProductImageAsync(productId: number, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
64
+ setProductImageAsync(request: carriers.BLOB_SetProductImageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
65
+ setProductImageAsync(productId: number, image: ArrayBuffer|string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
66
+ getProductThumbnailAsync(request: carriers.BLOB_GetProductThumbnailRequest, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
67
+ getProductThumbnailAsync(productId: number, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
68
+ setProductThumbnailAsync(request: carriers.BLOB_SetProductThumbnailRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
69
+ setProductThumbnailAsync(productId: number, image: ArrayBuffer|string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
70
+ changeProductImageAsync(request: carriers.BLOB_ChangeProductImageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
71
+ changeProductImageAsync(productId: number, blobId: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
72
+ getQuoteLineImageAsync(request: carriers.BLOB_GetQuoteLineImageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
73
+ getQuoteLineImageAsync(quoteLineId: number, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
74
+ getAppDataAsync(request: carriers.BLOB_GetAppDataRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
75
+ getAppDataAsync(key: string, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
76
+ setAppDataAsync(request: carriers.BLOB_SetAppDataRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
77
+ setAppDataAsync(key: string, data: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
78
+ getPersonImageWithSizeAsync(request: carriers.BLOB_GetPersonImageWithSizeRequest, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
79
+ getPersonImageWithSizeAsync(personId: number, width: number, height: number, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
80
+ getProjectImageWithSizeAsync(request: carriers.BLOB_GetProjectImageWithSizeRequest, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
81
+ getProjectImageWithSizeAsync(projectId: number, width: number, height: number, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
82
+ getChatImageWithSizeAsync(request: carriers.BLOB_GetChatImageWithSizeRequest, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
83
+ getChatImageWithSizeAsync(chatTopicId: number, width: number, height: number, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
84
+ getContactImageAsync(request: carriers.BLOB_GetContactImageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
85
+ getContactImageAsync(contactId: number, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
86
+ setContactImageAsync(request: carriers.BLOB_SetContactImageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
87
+ setContactImageAsync(contactId: number, image: ArrayBuffer|string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
88
+ changeContactImageAsync(request: carriers.BLOB_ChangeContactImageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
89
+ changeContactImageAsync(contactId: number, blobId: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
90
+ getBlobEntityOnContactAsync(request: carriers.BLOB_GetBlobEntityOnContactRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.BlobEntity >;
91
+ getBlobEntityOnContactAsync(contactId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.BlobEntity >;
92
+ getContactImageWithSizeAsync(request: carriers.BLOB_GetContactImageWithSizeRequest, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
93
+ getContactImageWithSizeAsync(contactId: number, width: number, height: number, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
94
+ getOutputFromBatchAsync(request: carriers.BLOB_GetOutputFromBatchRequest, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
95
+ getOutputFromBatchAsync(batchTaskId: number, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
96
+ cleanupBatchTaskAsync(request: carriers.BLOB_CleanupBatchTaskRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
97
+ cleanupBatchTaskAsync(batchTaskId: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
98
+ } // interface IBLOBAgent
99
+
100
+
101
+
102
+
103
+ /**
104
+ * Collection of all services that works with binary objects (BLOBS), e.g. Images and documents.
105
+ */
106
+ export class BLOBAgent extends base.WebApiBase implements IBLOBAgent {
107
+ constructor(baseUrl?: string, languageCode?:string, cultureCode?: string);
108
+ constructor(baseUrl?: string, resourceParsing?: base.ResourceParsing);
109
+ constructor(baseUrl: string, resourceManager:any);
110
+ constructor(baseUrl: string, config:AxiosRequestConfig, resourceManager:any);
111
+ constructor(baseUrl: string, config:AxiosRequestConfig, resourceParsing?: base.ResourceParsing);
112
+ constructor(baseUrl: string, config:AxiosRequestConfig, languageCode?:string, cultureCode?: string);
113
+ constructor(options: base.WebApiOptions);
114
+
115
+ constructor(baseUrlOrOptions: string|base.WebApiOptions|undefined,
116
+ langOrconfigOrRM?: string|base.ResourceParsing|AxiosRequestConfig|any,
117
+ langOrResourceOrRM?:string|base.ResourceParsing|any,
118
+ cultureCode?: string,
119
+ ) {
120
+ const options = base.WebApiBase.FigureOutOptions(baseUrlOrOptions, langOrconfigOrRM, langOrResourceOrRM, cultureCode);
121
+ options.basePath = "v1/Agents/BLOB/";
122
+ super(options);
123
+ }
124
+
125
+
126
+
127
+ /**
128
+ * Set default values into a new BlobEntity.
129
+ * NetServer calculates default values on the entity, which is required when creating/storing a new instance
130
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
131
+ * @returns A blank entity.
132
+ */
133
+ public async createDefaultBlobEntityAsync(options?:base.WebApiRequestOptions) : Promise< carriers.BlobEntity > {
134
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
135
+ base.WebApiBase.SetPending(options);
136
+ return new Promise< carriers.BlobEntity >(async (resolve, reject) => {
137
+ try {
138
+ const response = await this._axios.post("CreateDefaultBlobEntity", null, config);
139
+ base.WebApiBase.SetCompleted(options);
140
+ const res : carriers.BlobEntity = converters.Create_BlobEntity_From( response.data );
141
+ resolve(res);
142
+ }
143
+ catch( err ) {
144
+ base.WebApiBase.HandleError(options, config, err);
145
+ reject(err);
146
+ }
147
+ });
148
+ }
149
+ /*
150
+ * Replace the existing BlobEntity or creates a new BlobEntity if the id parameter is empty
151
+ * @param entity - The BlobEntity to be saved.
152
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
153
+ * @returns New or updated BlobEntity
154
+ */
155
+ public async saveBlobEntityAsync(entity: carriers.BlobEntity, options?:base.WebApiRequestOptions) : Promise< carriers.BlobEntity > {
156
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
157
+ base.WebApiBase.SetPending(options);
158
+ return new Promise< carriers.BlobEntity >(async (resolve, reject) => {
159
+ try {
160
+ const response = await this._axios.post("SaveBlobEntity", entity, config);
161
+ base.WebApiBase.SetCompleted(options);
162
+ const res : carriers.BlobEntity = converters.Create_BlobEntity_From( response.data );
163
+ resolve(res);
164
+ }
165
+ catch( err ) {
166
+ base.WebApiBase.HandleError(options, config, err);
167
+ reject(err);
168
+ }
169
+ });
170
+ }
171
+
172
+ /*
173
+ * Deletes the BlobEntity
174
+ * @param BlobEntityId - The id of the BlobEntity to be deleted.
175
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
176
+ */
177
+ public async deleteBlobEntityAsync(BlobEntityId: number, options?:base.WebApiRequestOptions) : Promise< void > {
178
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
179
+ base.WebApiBase.SetPending(options);
180
+ return new Promise< void >(async (resolve, reject) => {
181
+ try {
182
+ const response = await this._axios.post("DeleteBlobEntity?BlobEntityId=" + BlobEntityId, null, config );
183
+ base.WebApiBase.SetCompleted(options);
184
+ const res = response.data;
185
+ resolve(res);
186
+ }
187
+ catch( err ) {
188
+ base.WebApiBase.HandleError(options, config, err);
189
+ reject(err);
190
+ }
191
+ });
192
+ }
193
+ /*
194
+ * Gets a BlobEntity object.
195
+ * @param blobEntityId - The primary key.
196
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
197
+ * @returns A single BlobEntity
198
+ */
199
+ public async getBlobEntityAsync(blobEntityId: number, options?:base.WebApiRequestOptions) : Promise< carriers.BlobEntity > {
200
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
201
+ base.WebApiBase.SetPending(options);
202
+ return new Promise< carriers.BlobEntity >(async (resolve, reject) => {
203
+ try {
204
+ const response = await this._axios.post("GetBlobEntity?blobEntityId=" + blobEntityId, null, config);
205
+ base.WebApiBase.SetCompleted(options);
206
+ const res = converters.Create_BlobEntity_From( response.data );
207
+ resolve(res);
208
+ }
209
+ catch( err ) {
210
+ base.WebApiBase.HandleError(options, config, err);
211
+ reject(err);
212
+ }
213
+ });
214
+ }
215
+
216
+
217
+ private async _setBlobStreamAsync(request: carriers.BLOB_SetBlobStreamRequest, options?:base.WebApiRequestOptions) : Promise< void > {
218
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
219
+ base.WebApiBase.SetPending(options);
220
+ return new Promise< void >(async (resolve, reject) => {
221
+ try {
222
+ config.baseURL = this._options.baseUrl;
223
+ const response = await this._axios.post("SetBlobStream", request , config);
224
+ base.WebApiBase.SetCompleted(options);
225
+ const res = response.data;
226
+ resolve(res);
227
+ }
228
+ catch( err ) {
229
+ base.WebApiBase.HandleError(options, config, err);
230
+ reject(err);
231
+ }
232
+ });
233
+ }
234
+
235
+
236
+
237
+ /**
238
+ * Store a binary object from it&apos;s stream
239
+ * @param request - BlobEntityId, Stream
240
+ * @returns
241
+ */
242
+ public async setBlobStreamAsync(request: carriers.BLOB_SetBlobStreamRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
243
+
244
+ /**
245
+ * Store a binary object from it&apos;s stream
246
+ * @param blobEntityId - Id of the BLOB entity object that the binary data should be stored to.
247
+ * @param stream - The binary object as a Stream
248
+ * @returns
249
+ */
250
+ public async setBlobStreamAsync(blobEntityId: number, stream: ArrayBuffer|string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
251
+
252
+ public async setBlobStreamAsync(blobEntityId:number|carriers.BLOB_SetBlobStreamRequest, stream?:ArrayBuffer|string|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
253
+ let _request : carriers.BLOB_SetBlobStreamRequest = null;
254
+ let _options : base.WebApiRequestOptions = null;
255
+ const first : any = blobEntityId;
256
+ if( typeof( first ) === "object" && first && ( typeof(first.blobEntityId)!='undefined' || typeof(first.stream)!='undefined' ) )
257
+ {
258
+ _request = blobEntityId as carriers.BLOB_SetBlobStreamRequest;
259
+ _options = stream as base.WebApiRequestOptions;
260
+ }
261
+ else
262
+ {
263
+ _request = {
264
+ blobEntityId: blobEntityId as number,
265
+ stream: stream as ArrayBuffer|string,
266
+ };
267
+ _options = webapi_options;
268
+ }
269
+ _request.stream = ToBase64(_request.stream);
270
+ return this._setBlobStreamAsync( _request, _options );
271
+ }
272
+
273
+
274
+ private async _getBlobStreamAsync(request: carriers.BLOB_GetBlobStreamRequest, options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string > {
275
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options) || {};
276
+ base.WebApiBase.SetPending(options);
277
+ return new Promise< ArrayBuffer|string >(async (resolve, reject) => {
278
+ try {
279
+ if( ! options || options.returnBlobAs == base.ReturnBlobType.AsArrayBuffer ) {
280
+ config.responseType = "arraybuffer";
281
+ config.headers = config.headers || {};
282
+ config.headers["Accept"] = "application/octet-stream";
283
+ }
284
+ config.baseURL = this._options.baseUrl;
285
+ const response = await this._axios.post("GetBlobStream", request , config);
286
+ base.WebApiBase.SetCompleted(options);
287
+ let res : ArrayBuffer | string = null;
288
+ if( options && options.returnBlobAs != base.ReturnBlobType.AsArrayBuffer )
289
+ {
290
+ res = response.data as string;
291
+ if( options.returnBlobAs == base.ReturnBlobType.AsString )
292
+ {
293
+ res = FromBase64ToString(res);
294
+ }
295
+ }
296
+ else
297
+ {
298
+ res = response.data as ArrayBuffer;
299
+ }
300
+
301
+ resolve(res);
302
+ }
303
+ catch( err ) {
304
+ base.WebApiBase.HandleError(options, config, err);
305
+ reject(err);
306
+ }
307
+ });
308
+ }
309
+
310
+
311
+
312
+ /**
313
+ * Get the binary object as a stream
314
+ * @param request - BlobEntityId
315
+ * @returns The binary object as a Stream
316
+ */
317
+ public async getBlobStreamAsync(request: carriers.BLOB_GetBlobStreamRequest, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
318
+
319
+ /**
320
+ * Get the binary object as a stream
321
+ * @param blobEntityId - The ID of the BLOB entity object that refers to the binary data
322
+ * @returns The binary object as a Stream
323
+ */
324
+ public async getBlobStreamAsync(blobEntityId: number, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
325
+
326
+ public async getBlobStreamAsync(blobEntityId:number|carriers.BLOB_GetBlobStreamRequest, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string > {
327
+ let _request : carriers.BLOB_GetBlobStreamRequest = null;
328
+ let _options : base.WebApiRequestOptions = null;
329
+ const first : any = blobEntityId;
330
+ if( typeof( first ) === "object" && first && ( typeof(first.blobEntityId)!='undefined' ) )
331
+ {
332
+ _request = blobEntityId as carriers.BLOB_GetBlobStreamRequest;
333
+ _options = webapi_options as base.WebApiRequestOptions;
334
+ }
335
+ else
336
+ {
337
+ _request = {
338
+ blobEntityId: blobEntityId as number,
339
+ };
340
+ _options = webapi_options;
341
+ }
342
+ return this._getBlobStreamAsync( _request, _options );
343
+ }
344
+
345
+
346
+ private async _getProjectImageAsync(request: carriers.BLOB_GetProjectImageRequest, options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string > {
347
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options) || {};
348
+ base.WebApiBase.SetPending(options);
349
+ return new Promise< ArrayBuffer|string >(async (resolve, reject) => {
350
+ try {
351
+ if( ! options || options.returnBlobAs == base.ReturnBlobType.AsArrayBuffer ) {
352
+ config.responseType = "arraybuffer";
353
+ config.headers = config.headers || {};
354
+ config.headers["Accept"] = "application/octet-stream";
355
+ }
356
+ config.baseURL = this._options.baseUrl;
357
+ const response = await this._axios.post("GetProjectImage", request , config);
358
+ base.WebApiBase.SetCompleted(options);
359
+ let res : ArrayBuffer | string = null;
360
+ if( options && options.returnBlobAs != base.ReturnBlobType.AsArrayBuffer )
361
+ {
362
+ res = response.data as string;
363
+ if( options.returnBlobAs == base.ReturnBlobType.AsString )
364
+ {
365
+ res = FromBase64ToString(res);
366
+ }
367
+ }
368
+ else
369
+ {
370
+ res = response.data as ArrayBuffer;
371
+ }
372
+
373
+ resolve(res);
374
+ }
375
+ catch( err ) {
376
+ base.WebApiBase.HandleError(options, config, err);
377
+ reject(err);
378
+ }
379
+ });
380
+ }
381
+
382
+
383
+
384
+ /**
385
+ * Returns the project image that is displayed in the CRM application.
386
+ * @param request - ProjectId
387
+ * @returns The image as a System.Drawing.Image. (If the the image is returned over webservices, the stream is returned as a Base64 encoded string.)
388
+ */
389
+ public async getProjectImageAsync(request: carriers.BLOB_GetProjectImageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
390
+
391
+ /**
392
+ * Returns the project image that is displayed in the CRM application.
393
+ * @param projectId - The project id of the project the image belongs to.
394
+ * @returns The image as a System.Drawing.Image. (If the the image is returned over webservices, the stream is returned as a Base64 encoded string.)
395
+ */
396
+ public async getProjectImageAsync(projectId: number, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
397
+
398
+ public async getProjectImageAsync(projectId:number|carriers.BLOB_GetProjectImageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string > {
399
+ let _request : carriers.BLOB_GetProjectImageRequest = null;
400
+ let _options : base.WebApiRequestOptions = null;
401
+ const first : any = projectId;
402
+ if( typeof( first ) === "object" && first && ( typeof(first.projectId)!='undefined' ) )
403
+ {
404
+ _request = projectId as carriers.BLOB_GetProjectImageRequest;
405
+ _options = webapi_options as base.WebApiRequestOptions;
406
+ }
407
+ else
408
+ {
409
+ _request = {
410
+ projectId: projectId as number,
411
+ };
412
+ _options = webapi_options;
413
+ }
414
+ return this._getProjectImageAsync( _request, _options );
415
+ }
416
+
417
+
418
+ private async _getPersonImageAsync(request: carriers.BLOB_GetPersonImageRequest, options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string > {
419
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options) || {};
420
+ base.WebApiBase.SetPending(options);
421
+ return new Promise< ArrayBuffer|string >(async (resolve, reject) => {
422
+ try {
423
+ if( ! options || options.returnBlobAs == base.ReturnBlobType.AsArrayBuffer ) {
424
+ config.responseType = "arraybuffer";
425
+ config.headers = config.headers || {};
426
+ config.headers["Accept"] = "application/octet-stream";
427
+ }
428
+ config.baseURL = this._options.baseUrl;
429
+ const response = await this._axios.post("GetPersonImage", request , config);
430
+ base.WebApiBase.SetCompleted(options);
431
+ let res : ArrayBuffer | string = null;
432
+ if( options && options.returnBlobAs != base.ReturnBlobType.AsArrayBuffer )
433
+ {
434
+ res = response.data as string;
435
+ if( options.returnBlobAs == base.ReturnBlobType.AsString )
436
+ {
437
+ res = FromBase64ToString(res);
438
+ }
439
+ }
440
+ else
441
+ {
442
+ res = response.data as ArrayBuffer;
443
+ }
444
+
445
+ resolve(res);
446
+ }
447
+ catch( err ) {
448
+ base.WebApiBase.HandleError(options, config, err);
449
+ reject(err);
450
+ }
451
+ });
452
+ }
453
+
454
+
455
+
456
+ /**
457
+ * Returns the person image that is displayed in the CRM application.
458
+ * @param request - PersonId
459
+ * @returns The image as a System.Drawing.Image. (If the the image is returned over webservices, the stream is returned as a Base64 encoded string.)
460
+ */
461
+ public async getPersonImageAsync(request: carriers.BLOB_GetPersonImageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
462
+
463
+ /**
464
+ * Returns the person image that is displayed in the CRM application.
465
+ * @param personId - The person id of the person the image belongs to.
466
+ * @returns The image as a System.Drawing.Image. (If the the image is returned over webservices, the stream is returned as a Base64 encoded string.)
467
+ */
468
+ public async getPersonImageAsync(personId: number, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
469
+
470
+ public async getPersonImageAsync(personId:number|carriers.BLOB_GetPersonImageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string > {
471
+ let _request : carriers.BLOB_GetPersonImageRequest = null;
472
+ let _options : base.WebApiRequestOptions = null;
473
+ const first : any = personId;
474
+ if( typeof( first ) === "object" && first && ( typeof(first.personId)!='undefined' ) )
475
+ {
476
+ _request = personId as carriers.BLOB_GetPersonImageRequest;
477
+ _options = webapi_options as base.WebApiRequestOptions;
478
+ }
479
+ else
480
+ {
481
+ _request = {
482
+ personId: personId as number,
483
+ };
484
+ _options = webapi_options;
485
+ }
486
+ return this._getPersonImageAsync( _request, _options );
487
+ }
488
+
489
+
490
+ private async _setProjectImageAsync(request: carriers.BLOB_SetProjectImageRequest, options?:base.WebApiRequestOptions) : Promise< void > {
491
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
492
+ base.WebApiBase.SetPending(options);
493
+ return new Promise< void >(async (resolve, reject) => {
494
+ try {
495
+ config.baseURL = this._options.baseUrl;
496
+ const response = await this._axios.post("SetProjectImage", request , config);
497
+ base.WebApiBase.SetCompleted(options);
498
+ const res = response.data;
499
+ resolve(res);
500
+ }
501
+ catch( err ) {
502
+ base.WebApiBase.HandleError(options, config, err);
503
+ reject(err);
504
+ }
505
+ });
506
+ }
507
+
508
+
509
+
510
+ /**
511
+ * Stores the project image that is displayed in the CRM application.
512
+ * @param request - ProjectId, Image
513
+ * @returns
514
+ */
515
+ public async setProjectImageAsync(request: carriers.BLOB_SetProjectImageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
516
+
517
+ /**
518
+ * Stores the project image that is displayed in the CRM application.
519
+ * @param projectId - The project id of the project the image belongs to.
520
+ * @param image - The image that is stored on the project (System.Drawing.Image)
521
+ * @returns
522
+ */
523
+ public async setProjectImageAsync(projectId: number, image: ArrayBuffer|string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
524
+
525
+ public async setProjectImageAsync(projectId:number|carriers.BLOB_SetProjectImageRequest, image?:ArrayBuffer|string|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
526
+ let _request : carriers.BLOB_SetProjectImageRequest = null;
527
+ let _options : base.WebApiRequestOptions = null;
528
+ const first : any = projectId;
529
+ if( typeof( first ) === "object" && first && ( typeof(first.projectId)!='undefined' || typeof(first.image)!='undefined' ) )
530
+ {
531
+ _request = projectId as carriers.BLOB_SetProjectImageRequest;
532
+ _options = image as base.WebApiRequestOptions;
533
+ }
534
+ else
535
+ {
536
+ _request = {
537
+ projectId: projectId as number,
538
+ image: image as ArrayBuffer|string,
539
+ };
540
+ _options = webapi_options;
541
+ }
542
+ _request.image = ToBase64(_request.image);
543
+ return this._setProjectImageAsync( _request, _options );
544
+ }
545
+
546
+
547
+ private async _setPersonImageAsync(request: carriers.BLOB_SetPersonImageRequest, options?:base.WebApiRequestOptions) : Promise< void > {
548
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
549
+ base.WebApiBase.SetPending(options);
550
+ return new Promise< void >(async (resolve, reject) => {
551
+ try {
552
+ config.baseURL = this._options.baseUrl;
553
+ const response = await this._axios.post("SetPersonImage", request , config);
554
+ base.WebApiBase.SetCompleted(options);
555
+ const res = response.data;
556
+ resolve(res);
557
+ }
558
+ catch( err ) {
559
+ base.WebApiBase.HandleError(options, config, err);
560
+ reject(err);
561
+ }
562
+ });
563
+ }
564
+
565
+
566
+
567
+ /**
568
+ * Stores the person image that is displayed in the CRM application.
569
+ * @param request - PersonId, Image
570
+ * @returns
571
+ */
572
+ public async setPersonImageAsync(request: carriers.BLOB_SetPersonImageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
573
+
574
+ /**
575
+ * Stores the person image that is displayed in the CRM application.
576
+ * @param personId - The person id of the person the image belongs to.
577
+ * @param image - The image that is stored on the person (System.Drawing.Image)
578
+ * @returns
579
+ */
580
+ public async setPersonImageAsync(personId: number, image: ArrayBuffer|string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
581
+
582
+ public async setPersonImageAsync(personId:number|carriers.BLOB_SetPersonImageRequest, image?:ArrayBuffer|string|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
583
+ let _request : carriers.BLOB_SetPersonImageRequest = null;
584
+ let _options : base.WebApiRequestOptions = null;
585
+ const first : any = personId;
586
+ if( typeof( first ) === "object" && first && ( typeof(first.personId)!='undefined' || typeof(first.image)!='undefined' ) )
587
+ {
588
+ _request = personId as carriers.BLOB_SetPersonImageRequest;
589
+ _options = image as base.WebApiRequestOptions;
590
+ }
591
+ else
592
+ {
593
+ _request = {
594
+ personId: personId as number,
595
+ image: image as ArrayBuffer|string,
596
+ };
597
+ _options = webapi_options;
598
+ }
599
+ _request.image = ToBase64(_request.image);
600
+ return this._setPersonImageAsync( _request, _options );
601
+ }
602
+
603
+
604
+ private async _changeProjectImageAsync(request: carriers.BLOB_ChangeProjectImageRequest, options?:base.WebApiRequestOptions) : Promise< void > {
605
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
606
+ base.WebApiBase.SetPending(options);
607
+ return new Promise< void >(async (resolve, reject) => {
608
+ try {
609
+ config.baseURL = this._options.baseUrl;
610
+ const response = await this._axios.post("ChangeProjectImage", request , config);
611
+ base.WebApiBase.SetCompleted(options);
612
+ const res = response.data;
613
+ resolve(res);
614
+ }
615
+ catch( err ) {
616
+ base.WebApiBase.HandleError(options, config, err);
617
+ reject(err);
618
+ }
619
+ });
620
+ }
621
+
622
+
623
+
624
+ /**
625
+ * Changes the project image link. If the Binary object id is 0, any image link is removed from the project.
626
+ * @param request - ProjectId, BlobId
627
+ * @returns
628
+ */
629
+ public async changeProjectImageAsync(request: carriers.BLOB_ChangeProjectImageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
630
+
631
+ /**
632
+ * Changes the project image link. If the Binary object id is 0, any image link is removed from the project.
633
+ * @param projectId - The project the image is linked to
634
+ * @param blobId - The Binary object id. If the Binary object id is 0, any image link is removed from the project.
635
+ * @returns
636
+ */
637
+ public async changeProjectImageAsync(projectId: number, blobId: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
638
+
639
+ public async changeProjectImageAsync(projectId:number|carriers.BLOB_ChangeProjectImageRequest, blobId?:number|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
640
+ let _request : carriers.BLOB_ChangeProjectImageRequest = null;
641
+ let _options : base.WebApiRequestOptions = null;
642
+ const first : any = projectId;
643
+ if( typeof( first ) === "object" && first && ( typeof(first.projectId)!='undefined' || typeof(first.blobId)!='undefined' ) )
644
+ {
645
+ _request = projectId as carriers.BLOB_ChangeProjectImageRequest;
646
+ _options = blobId as base.WebApiRequestOptions;
647
+ }
648
+ else
649
+ {
650
+ _request = {
651
+ projectId: projectId as number,
652
+ blobId: blobId as number,
653
+ };
654
+ _options = webapi_options;
655
+ }
656
+ return this._changeProjectImageAsync( _request, _options );
657
+ }
658
+
659
+
660
+ private async _saveProjectImageAsync(request: carriers.BLOB_SaveProjectImageRequest, options?:base.WebApiRequestOptions) : Promise< void > {
661
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
662
+ base.WebApiBase.SetPending(options);
663
+ return new Promise< void >(async (resolve, reject) => {
664
+ try {
665
+ config.baseURL = this._options.baseUrl;
666
+ const response = await this._axios.post("SaveProjectImage", request , config);
667
+ base.WebApiBase.SetCompleted(options);
668
+ const res = response.data;
669
+ resolve(res);
670
+ }
671
+ catch( err ) {
672
+ base.WebApiBase.HandleError(options, config, err);
673
+ reject(err);
674
+ }
675
+ });
676
+ }
677
+
678
+
679
+
680
+ /**
681
+ * Saves a project image that is displayed in the CRM application&apos;s project image selection dialog to the database.
682
+ * @param request - Description, Image
683
+ * @returns
684
+ */
685
+ public async saveProjectImageAsync(request: carriers.BLOB_SaveProjectImageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
686
+
687
+ /**
688
+ * Saves a project image that is displayed in the CRM application&apos;s project image selection dialog to the database.
689
+ * @param description - Image description. Should be image name (e.g. winter.jpg) for project images
690
+ * @param image - The project image (System.Drawing.Image)
691
+ * @returns
692
+ */
693
+ public async saveProjectImageAsync(description: string, image: ArrayBuffer|string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
694
+
695
+ public async saveProjectImageAsync(description:string|carriers.BLOB_SaveProjectImageRequest, image?:ArrayBuffer|string|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
696
+ let _request : carriers.BLOB_SaveProjectImageRequest = null;
697
+ let _options : base.WebApiRequestOptions = null;
698
+ const first : any = description;
699
+ if( typeof( first ) === "object" && first && ( typeof(first.description)!='undefined' || typeof(first.image)!='undefined' ) )
700
+ {
701
+ _request = description as carriers.BLOB_SaveProjectImageRequest;
702
+ _options = image as base.WebApiRequestOptions;
703
+ }
704
+ else
705
+ {
706
+ _request = {
707
+ description: description as string,
708
+ image: image as ArrayBuffer|string,
709
+ };
710
+ _options = webapi_options;
711
+ }
712
+ _request.image = ToBase64(_request.image);
713
+ return this._saveProjectImageAsync( _request, _options );
714
+ }
715
+
716
+
717
+ private async _getBlobEntityOnProjectAsync(request: carriers.BLOB_GetBlobEntityOnProjectRequest, options?:base.WebApiRequestOptions) : Promise< carriers.BlobEntity > {
718
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
719
+ base.WebApiBase.SetPending(options);
720
+ return new Promise< carriers.BlobEntity >(async (resolve, reject) => {
721
+ try {
722
+ config.baseURL = this._options.baseUrl;
723
+ const response = await this._axios.post("GetBlobEntityOnProject", request , config);
724
+ base.WebApiBase.SetCompleted(options);
725
+ const res : carriers.BlobEntity = converters.Create_BlobEntity_From( response.data );
726
+ resolve(res);
727
+ }
728
+ catch( err ) {
729
+ base.WebApiBase.HandleError(options, config, err);
730
+ reject(err);
731
+ }
732
+ });
733
+ }
734
+
735
+
736
+
737
+ /**
738
+ * Gets the blob entity that represents the project image binary object.
739
+ * @param request - ProjectId
740
+ * @returns BlobEntity object
741
+ */
742
+ public async getBlobEntityOnProjectAsync(request: carriers.BLOB_GetBlobEntityOnProjectRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.BlobEntity >;
743
+
744
+ /**
745
+ * Gets the blob entity that represents the project image binary object.
746
+ * @param projectId - The project id
747
+ * @returns BlobEntity object
748
+ */
749
+ public async getBlobEntityOnProjectAsync(projectId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.BlobEntity >;
750
+
751
+ public async getBlobEntityOnProjectAsync(projectId:number|carriers.BLOB_GetBlobEntityOnProjectRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.BlobEntity > {
752
+ let _request : carriers.BLOB_GetBlobEntityOnProjectRequest = null;
753
+ let _options : base.WebApiRequestOptions = null;
754
+ const first : any = projectId;
755
+ if( typeof( first ) === "object" && first && ( typeof(first.projectId)!='undefined' ) )
756
+ {
757
+ _request = projectId as carriers.BLOB_GetBlobEntityOnProjectRequest;
758
+ _options = webapi_options as base.WebApiRequestOptions;
759
+ }
760
+ else
761
+ {
762
+ _request = {
763
+ projectId: projectId as number,
764
+ };
765
+ _options = webapi_options;
766
+ }
767
+ return this._getBlobEntityOnProjectAsync( _request, _options );
768
+ }
769
+
770
+
771
+ private async _getBlobEntityOnPersonAsync(request: carriers.BLOB_GetBlobEntityOnPersonRequest, options?:base.WebApiRequestOptions) : Promise< carriers.BlobEntity > {
772
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
773
+ base.WebApiBase.SetPending(options);
774
+ return new Promise< carriers.BlobEntity >(async (resolve, reject) => {
775
+ try {
776
+ config.baseURL = this._options.baseUrl;
777
+ const response = await this._axios.post("GetBlobEntityOnPerson", request , config);
778
+ base.WebApiBase.SetCompleted(options);
779
+ const res : carriers.BlobEntity = converters.Create_BlobEntity_From( response.data );
780
+ resolve(res);
781
+ }
782
+ catch( err ) {
783
+ base.WebApiBase.HandleError(options, config, err);
784
+ reject(err);
785
+ }
786
+ });
787
+ }
788
+
789
+
790
+
791
+ /**
792
+ * Gets the blob entity that represents the person image binary object.
793
+ * @param request - PersonId
794
+ * @returns BlobEntity object
795
+ */
796
+ public async getBlobEntityOnPersonAsync(request: carriers.BLOB_GetBlobEntityOnPersonRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.BlobEntity >;
797
+
798
+ /**
799
+ * Gets the blob entity that represents the person image binary object.
800
+ * @param personId - The person id
801
+ * @returns BlobEntity object
802
+ */
803
+ public async getBlobEntityOnPersonAsync(personId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.BlobEntity >;
804
+
805
+ public async getBlobEntityOnPersonAsync(personId:number|carriers.BLOB_GetBlobEntityOnPersonRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.BlobEntity > {
806
+ let _request : carriers.BLOB_GetBlobEntityOnPersonRequest = null;
807
+ let _options : base.WebApiRequestOptions = null;
808
+ const first : any = personId;
809
+ if( typeof( first ) === "object" && first && ( typeof(first.personId)!='undefined' ) )
810
+ {
811
+ _request = personId as carriers.BLOB_GetBlobEntityOnPersonRequest;
812
+ _options = webapi_options as base.WebApiRequestOptions;
813
+ }
814
+ else
815
+ {
816
+ _request = {
817
+ personId: personId as number,
818
+ };
819
+ _options = webapi_options;
820
+ }
821
+ return this._getBlobEntityOnPersonAsync( _request, _options );
822
+ }
823
+
824
+
825
+ private async _getBlobEntityOnCountryAsync(request: carriers.BLOB_GetBlobEntityOnCountryRequest, options?:base.WebApiRequestOptions) : Promise< carriers.BlobEntity > {
826
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
827
+ base.WebApiBase.SetPending(options);
828
+ return new Promise< carriers.BlobEntity >(async (resolve, reject) => {
829
+ try {
830
+ config.baseURL = this._options.baseUrl;
831
+ const response = await this._axios.post("GetBlobEntityOnCountry", request , config);
832
+ base.WebApiBase.SetCompleted(options);
833
+ const res : carriers.BlobEntity = converters.Create_BlobEntity_From( response.data );
834
+ resolve(res);
835
+ }
836
+ catch( err ) {
837
+ base.WebApiBase.HandleError(options, config, err);
838
+ reject(err);
839
+ }
840
+ });
841
+ }
842
+
843
+
844
+
845
+ /**
846
+ * Gets the blob entity that represents the country flag binary object.
847
+ * @param request - CountryId
848
+ * @returns BlobEntity object
849
+ */
850
+ public async getBlobEntityOnCountryAsync(request: carriers.BLOB_GetBlobEntityOnCountryRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.BlobEntity >;
851
+
852
+ /**
853
+ * Gets the blob entity that represents the country flag binary object.
854
+ * @param countryId - The country id
855
+ * @returns BlobEntity object
856
+ */
857
+ public async getBlobEntityOnCountryAsync(countryId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.BlobEntity >;
858
+
859
+ public async getBlobEntityOnCountryAsync(countryId:number|carriers.BLOB_GetBlobEntityOnCountryRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.BlobEntity > {
860
+ let _request : carriers.BLOB_GetBlobEntityOnCountryRequest = null;
861
+ let _options : base.WebApiRequestOptions = null;
862
+ const first : any = countryId;
863
+ if( typeof( first ) === "object" && first && ( typeof(first.countryId)!='undefined' ) )
864
+ {
865
+ _request = countryId as carriers.BLOB_GetBlobEntityOnCountryRequest;
866
+ _options = webapi_options as base.WebApiRequestOptions;
867
+ }
868
+ else
869
+ {
870
+ _request = {
871
+ countryId: countryId as number,
872
+ };
873
+ _options = webapi_options;
874
+ }
875
+ return this._getBlobEntityOnCountryAsync( _request, _options );
876
+ }
877
+
878
+
879
+ private async _getBlobEntityOnProductAsync(request: carriers.BLOB_GetBlobEntityOnProductRequest, options?:base.WebApiRequestOptions) : Promise< carriers.BlobEntity > {
880
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
881
+ base.WebApiBase.SetPending(options);
882
+ return new Promise< carriers.BlobEntity >(async (resolve, reject) => {
883
+ try {
884
+ config.baseURL = this._options.baseUrl;
885
+ const response = await this._axios.post("GetBlobEntityOnProduct", request , config);
886
+ base.WebApiBase.SetCompleted(options);
887
+ const res : carriers.BlobEntity = converters.Create_BlobEntity_From( response.data );
888
+ resolve(res);
889
+ }
890
+ catch( err ) {
891
+ base.WebApiBase.HandleError(options, config, err);
892
+ reject(err);
893
+ }
894
+ });
895
+ }
896
+
897
+
898
+
899
+ /**
900
+ * Gets the blob entity that represents the product image binary object.
901
+ * @param request - ProductId
902
+ * @returns BlobEntity object
903
+ */
904
+ public async getBlobEntityOnProductAsync(request: carriers.BLOB_GetBlobEntityOnProductRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.BlobEntity >;
905
+
906
+ /**
907
+ * Gets the blob entity that represents the product image binary object.
908
+ * @param productId - The product id
909
+ * @returns BlobEntity object
910
+ */
911
+ public async getBlobEntityOnProductAsync(productId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.BlobEntity >;
912
+
913
+ public async getBlobEntityOnProductAsync(productId:number|carriers.BLOB_GetBlobEntityOnProductRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.BlobEntity > {
914
+ let _request : carriers.BLOB_GetBlobEntityOnProductRequest = null;
915
+ let _options : base.WebApiRequestOptions = null;
916
+ const first : any = productId;
917
+ if( typeof( first ) === "object" && first && ( typeof(first.productId)!='undefined' ) )
918
+ {
919
+ _request = productId as carriers.BLOB_GetBlobEntityOnProductRequest;
920
+ _options = webapi_options as base.WebApiRequestOptions;
921
+ }
922
+ else
923
+ {
924
+ _request = {
925
+ productId: productId as number,
926
+ };
927
+ _options = webapi_options;
928
+ }
929
+ return this._getBlobEntityOnProductAsync( _request, _options );
930
+ }
931
+
932
+
933
+ private async _changePersonImageAsync(request: carriers.BLOB_ChangePersonImageRequest, options?:base.WebApiRequestOptions) : Promise< void > {
934
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
935
+ base.WebApiBase.SetPending(options);
936
+ return new Promise< void >(async (resolve, reject) => {
937
+ try {
938
+ config.baseURL = this._options.baseUrl;
939
+ const response = await this._axios.post("ChangePersonImage", request , config);
940
+ base.WebApiBase.SetCompleted(options);
941
+ const res = response.data;
942
+ resolve(res);
943
+ }
944
+ catch( err ) {
945
+ base.WebApiBase.HandleError(options, config, err);
946
+ reject(err);
947
+ }
948
+ });
949
+ }
950
+
951
+
952
+
953
+ /**
954
+ *
955
+ * @param request - PersonId, BlobId
956
+ * @returns
957
+ */
958
+ public async changePersonImageAsync(request: carriers.BLOB_ChangePersonImageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
959
+
960
+ /**
961
+ *
962
+ * @param personId - The person the image is linked to
963
+ * @param blobId - The Binary object id. If the Binary object id is 0, any image link is removed from the person.
964
+ * @returns
965
+ */
966
+ public async changePersonImageAsync(personId: number, blobId: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
967
+
968
+ public async changePersonImageAsync(personId:number|carriers.BLOB_ChangePersonImageRequest, blobId?:number|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
969
+ let _request : carriers.BLOB_ChangePersonImageRequest = null;
970
+ let _options : base.WebApiRequestOptions = null;
971
+ const first : any = personId;
972
+ if( typeof( first ) === "object" && first && ( typeof(first.personId)!='undefined' || typeof(first.blobId)!='undefined' ) )
973
+ {
974
+ _request = personId as carriers.BLOB_ChangePersonImageRequest;
975
+ _options = blobId as base.WebApiRequestOptions;
976
+ }
977
+ else
978
+ {
979
+ _request = {
980
+ personId: personId as number,
981
+ blobId: blobId as number,
982
+ };
983
+ _options = webapi_options;
984
+ }
985
+ return this._changePersonImageAsync( _request, _options );
986
+ }
987
+
988
+
989
+ private async _saveImageStreamAsync(request: carriers.BLOB_SaveImageStreamRequest, options?:base.WebApiRequestOptions) : Promise< number > {
990
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
991
+ base.WebApiBase.SetPending(options);
992
+ return new Promise< number >(async (resolve, reject) => {
993
+ try {
994
+ config.baseURL = this._options.baseUrl;
995
+ const response = await this._axios.post("SaveImageStream", request , config);
996
+ base.WebApiBase.SetCompleted(options);
997
+ const res : number = response.data as number;
998
+ resolve(res);
999
+ }
1000
+ catch( err ) {
1001
+ base.WebApiBase.HandleError(options, config, err);
1002
+ reject(err);
1003
+ }
1004
+ });
1005
+ }
1006
+
1007
+
1008
+
1009
+ /**
1010
+ * Stores an image in the database without linking it to a project or a person. It is possible to ChangePersonImage or ChangeProjectImage to attach image later.
1011
+ * @param request - Type, Image, Description
1012
+ * @returns The blob id
1013
+ */
1014
+ public async saveImageStreamAsync(request: carriers.BLOB_SaveImageStreamRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
1015
+
1016
+ /**
1017
+ * Stores an image in the database without linking it to a project or a person. It is possible to ChangePersonImage or ChangeProjectImage to attach image later.
1018
+ * @param type - The type of the image.
1019
+ * @param image - Image to store
1020
+ * @param description - Image description
1021
+ * @returns The blob id
1022
+ */
1023
+ public async saveImageStreamAsync(type: enums.BlobLinkType, image: ArrayBuffer|string, description: string, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
1024
+
1025
+ public async saveImageStreamAsync(type:enums.BlobLinkType|carriers.BLOB_SaveImageStreamRequest, image?:ArrayBuffer|string|base.WebApiRequestOptions, description?:string, webapi_options?:base.WebApiRequestOptions) : Promise< number > {
1026
+ let _request : carriers.BLOB_SaveImageStreamRequest = null;
1027
+ let _options : base.WebApiRequestOptions = null;
1028
+ const first : any = type;
1029
+ if( typeof( first ) === "object" && first && ( typeof(first.type)!='undefined' || typeof(first.image)!='undefined' || typeof(first.description)!='undefined' ) )
1030
+ {
1031
+ _request = type as carriers.BLOB_SaveImageStreamRequest;
1032
+ _options = image as base.WebApiRequestOptions;
1033
+ }
1034
+ else
1035
+ {
1036
+ _request = {
1037
+ type: type as enums.BlobLinkType,
1038
+ image: image as ArrayBuffer|string,
1039
+ description: description as string,
1040
+ };
1041
+ _options = webapi_options;
1042
+ }
1043
+ _request.image = ToBase64(_request.image);
1044
+ return this._saveImageStreamAsync( _request, _options );
1045
+ }
1046
+
1047
+
1048
+ private async _getProductImageAsync(request: carriers.BLOB_GetProductImageRequest, options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string > {
1049
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options) || {};
1050
+ base.WebApiBase.SetPending(options);
1051
+ return new Promise< ArrayBuffer|string >(async (resolve, reject) => {
1052
+ try {
1053
+ if( ! options || options.returnBlobAs == base.ReturnBlobType.AsArrayBuffer ) {
1054
+ config.responseType = "arraybuffer";
1055
+ config.headers = config.headers || {};
1056
+ config.headers["Accept"] = "application/octet-stream";
1057
+ }
1058
+ config.baseURL = this._options.baseUrl;
1059
+ const response = await this._axios.post("GetProductImage", request , config);
1060
+ base.WebApiBase.SetCompleted(options);
1061
+ let res : ArrayBuffer | string = null;
1062
+ if( options && options.returnBlobAs != base.ReturnBlobType.AsArrayBuffer )
1063
+ {
1064
+ res = response.data as string;
1065
+ if( options.returnBlobAs == base.ReturnBlobType.AsString )
1066
+ {
1067
+ res = FromBase64ToString(res);
1068
+ }
1069
+ }
1070
+ else
1071
+ {
1072
+ res = response.data as ArrayBuffer;
1073
+ }
1074
+
1075
+ resolve(res);
1076
+ }
1077
+ catch( err ) {
1078
+ base.WebApiBase.HandleError(options, config, err);
1079
+ reject(err);
1080
+ }
1081
+ });
1082
+ }
1083
+
1084
+
1085
+
1086
+ /**
1087
+ * Returns the product image (rank=1) that is displayed in the CRM application.
1088
+ * @param request - ProductId
1089
+ * @returns The image as a System.Drawing.Image. (If the the image is returned over webservices, the stream is returned as a Base64 encoded string.)
1090
+ */
1091
+ public async getProductImageAsync(request: carriers.BLOB_GetProductImageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
1092
+
1093
+ /**
1094
+ * Returns the product image (rank=1) that is displayed in the CRM application.
1095
+ * @param productId - The product id of the product the image belongs to.
1096
+ * @returns The image as a System.Drawing.Image. (If the the image is returned over webservices, the stream is returned as a Base64 encoded string.)
1097
+ */
1098
+ public async getProductImageAsync(productId: number, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
1099
+
1100
+ public async getProductImageAsync(productId:number|carriers.BLOB_GetProductImageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string > {
1101
+ let _request : carriers.BLOB_GetProductImageRequest = null;
1102
+ let _options : base.WebApiRequestOptions = null;
1103
+ const first : any = productId;
1104
+ if( typeof( first ) === "object" && first && ( typeof(first.productId)!='undefined' ) )
1105
+ {
1106
+ _request = productId as carriers.BLOB_GetProductImageRequest;
1107
+ _options = webapi_options as base.WebApiRequestOptions;
1108
+ }
1109
+ else
1110
+ {
1111
+ _request = {
1112
+ productId: productId as number,
1113
+ };
1114
+ _options = webapi_options;
1115
+ }
1116
+ return this._getProductImageAsync( _request, _options );
1117
+ }
1118
+
1119
+
1120
+ private async _setProductImageAsync(request: carriers.BLOB_SetProductImageRequest, options?:base.WebApiRequestOptions) : Promise< void > {
1121
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1122
+ base.WebApiBase.SetPending(options);
1123
+ return new Promise< void >(async (resolve, reject) => {
1124
+ try {
1125
+ config.baseURL = this._options.baseUrl;
1126
+ const response = await this._axios.post("SetProductImage", request , config);
1127
+ base.WebApiBase.SetCompleted(options);
1128
+ const res = response.data;
1129
+ resolve(res);
1130
+ }
1131
+ catch( err ) {
1132
+ base.WebApiBase.HandleError(options, config, err);
1133
+ reject(err);
1134
+ }
1135
+ });
1136
+ }
1137
+
1138
+
1139
+
1140
+ /**
1141
+ * Stores the product image that is displayed in the CRM application. The image is scaled down to max 1000x1000. This method operates only the main (rank=1) image; future extensions may support multiple images. A thumbnail of size 75x75 is also automatically set.
1142
+ * @param request - ProductId, Image
1143
+ * @returns
1144
+ */
1145
+ public async setProductImageAsync(request: carriers.BLOB_SetProductImageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
1146
+
1147
+ /**
1148
+ * Stores the product image that is displayed in the CRM application. The image is scaled down to max 1000x1000. This method operates only the main (rank=1) image; future extensions may support multiple images. A thumbnail of size 75x75 is also automatically set.
1149
+ * @param productId - The product id of the product the image belongs to.
1150
+ * @param image - The image that is stored on the product (System.Drawing.Image), scaled down to no more than 1000x1000
1151
+ * @returns
1152
+ */
1153
+ public async setProductImageAsync(productId: number, image: ArrayBuffer|string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
1154
+
1155
+ public async setProductImageAsync(productId:number|carriers.BLOB_SetProductImageRequest, image?:ArrayBuffer|string|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
1156
+ let _request : carriers.BLOB_SetProductImageRequest = null;
1157
+ let _options : base.WebApiRequestOptions = null;
1158
+ const first : any = productId;
1159
+ if( typeof( first ) === "object" && first && ( typeof(first.productId)!='undefined' || typeof(first.image)!='undefined' ) )
1160
+ {
1161
+ _request = productId as carriers.BLOB_SetProductImageRequest;
1162
+ _options = image as base.WebApiRequestOptions;
1163
+ }
1164
+ else
1165
+ {
1166
+ _request = {
1167
+ productId: productId as number,
1168
+ image: image as ArrayBuffer|string,
1169
+ };
1170
+ _options = webapi_options;
1171
+ }
1172
+ _request.image = ToBase64(_request.image);
1173
+ return this._setProductImageAsync( _request, _options );
1174
+ }
1175
+
1176
+
1177
+ private async _getProductThumbnailAsync(request: carriers.BLOB_GetProductThumbnailRequest, options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string > {
1178
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options) || {};
1179
+ base.WebApiBase.SetPending(options);
1180
+ return new Promise< ArrayBuffer|string >(async (resolve, reject) => {
1181
+ try {
1182
+ if( ! options || options.returnBlobAs == base.ReturnBlobType.AsArrayBuffer ) {
1183
+ config.responseType = "arraybuffer";
1184
+ config.headers = config.headers || {};
1185
+ config.headers["Accept"] = "application/octet-stream";
1186
+ }
1187
+ config.baseURL = this._options.baseUrl;
1188
+ const response = await this._axios.post("GetProductThumbnail", request , config);
1189
+ base.WebApiBase.SetCompleted(options);
1190
+ let res : ArrayBuffer | string = null;
1191
+ if( options && options.returnBlobAs != base.ReturnBlobType.AsArrayBuffer )
1192
+ {
1193
+ res = response.data as string;
1194
+ if( options.returnBlobAs == base.ReturnBlobType.AsString )
1195
+ {
1196
+ res = FromBase64ToString(res);
1197
+ }
1198
+ }
1199
+ else
1200
+ {
1201
+ res = response.data as ArrayBuffer;
1202
+ }
1203
+
1204
+ resolve(res);
1205
+ }
1206
+ catch( err ) {
1207
+ base.WebApiBase.HandleError(options, config, err);
1208
+ reject(err);
1209
+ }
1210
+ });
1211
+ }
1212
+
1213
+
1214
+
1215
+ /**
1216
+ * Returns the product thumbnail that is displayed in the CRM application.
1217
+ * @param request - ProductId
1218
+ * @returns The thumbnail as a System.Drawing.Image. (If the the image is returned over webservices, the stream is returned as a Base64 encoded string.)
1219
+ */
1220
+ public async getProductThumbnailAsync(request: carriers.BLOB_GetProductThumbnailRequest, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
1221
+
1222
+ /**
1223
+ * Returns the product thumbnail that is displayed in the CRM application.
1224
+ * @param productId - The product id of the product the thumbnail belongs to.
1225
+ * @returns The thumbnail as a System.Drawing.Image. (If the the image is returned over webservices, the stream is returned as a Base64 encoded string.)
1226
+ */
1227
+ public async getProductThumbnailAsync(productId: number, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
1228
+
1229
+ public async getProductThumbnailAsync(productId:number|carriers.BLOB_GetProductThumbnailRequest, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string > {
1230
+ let _request : carriers.BLOB_GetProductThumbnailRequest = null;
1231
+ let _options : base.WebApiRequestOptions = null;
1232
+ const first : any = productId;
1233
+ if( typeof( first ) === "object" && first && ( typeof(first.productId)!='undefined' ) )
1234
+ {
1235
+ _request = productId as carriers.BLOB_GetProductThumbnailRequest;
1236
+ _options = webapi_options as base.WebApiRequestOptions;
1237
+ }
1238
+ else
1239
+ {
1240
+ _request = {
1241
+ productId: productId as number,
1242
+ };
1243
+ _options = webapi_options;
1244
+ }
1245
+ return this._getProductThumbnailAsync( _request, _options );
1246
+ }
1247
+
1248
+
1249
+ private async _setProductThumbnailAsync(request: carriers.BLOB_SetProductThumbnailRequest, options?:base.WebApiRequestOptions) : Promise< void > {
1250
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1251
+ base.WebApiBase.SetPending(options);
1252
+ return new Promise< void >(async (resolve, reject) => {
1253
+ try {
1254
+ config.baseURL = this._options.baseUrl;
1255
+ const response = await this._axios.post("SetProductThumbnail", request , config);
1256
+ base.WebApiBase.SetCompleted(options);
1257
+ const res = response.data;
1258
+ resolve(res);
1259
+ }
1260
+ catch( err ) {
1261
+ base.WebApiBase.HandleError(options, config, err);
1262
+ reject(err);
1263
+ }
1264
+ });
1265
+ }
1266
+
1267
+
1268
+
1269
+ /**
1270
+ * Stores the product thumbnail that is displayed in the CRM application. The image is scaled down to max 200x200 pixels.
1271
+ * @param request - ProductId, Image
1272
+ * @returns
1273
+ */
1274
+ public async setProductThumbnailAsync(request: carriers.BLOB_SetProductThumbnailRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
1275
+
1276
+ /**
1277
+ * Stores the product thumbnail that is displayed in the CRM application. The image is scaled down to max 200x200 pixels.
1278
+ * @param productId - The product id of the product the image belongs to.
1279
+ * @param image - The image that is stored on the product (System.Drawing.Image); scaled down to no more than 200x200
1280
+ * @returns
1281
+ */
1282
+ public async setProductThumbnailAsync(productId: number, image: ArrayBuffer|string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
1283
+
1284
+ public async setProductThumbnailAsync(productId:number|carriers.BLOB_SetProductThumbnailRequest, image?:ArrayBuffer|string|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
1285
+ let _request : carriers.BLOB_SetProductThumbnailRequest = null;
1286
+ let _options : base.WebApiRequestOptions = null;
1287
+ const first : any = productId;
1288
+ if( typeof( first ) === "object" && first && ( typeof(first.productId)!='undefined' || typeof(first.image)!='undefined' ) )
1289
+ {
1290
+ _request = productId as carriers.BLOB_SetProductThumbnailRequest;
1291
+ _options = image as base.WebApiRequestOptions;
1292
+ }
1293
+ else
1294
+ {
1295
+ _request = {
1296
+ productId: productId as number,
1297
+ image: image as ArrayBuffer|string,
1298
+ };
1299
+ _options = webapi_options;
1300
+ }
1301
+ _request.image = ToBase64(_request.image);
1302
+ return this._setProductThumbnailAsync( _request, _options );
1303
+ }
1304
+
1305
+
1306
+ private async _changeProductImageAsync(request: carriers.BLOB_ChangeProductImageRequest, options?:base.WebApiRequestOptions) : Promise< void > {
1307
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1308
+ base.WebApiBase.SetPending(options);
1309
+ return new Promise< void >(async (resolve, reject) => {
1310
+ try {
1311
+ config.baseURL = this._options.baseUrl;
1312
+ const response = await this._axios.post("ChangeProductImage", request , config);
1313
+ base.WebApiBase.SetCompleted(options);
1314
+ const res = response.data;
1315
+ resolve(res);
1316
+ }
1317
+ catch( err ) {
1318
+ base.WebApiBase.HandleError(options, config, err);
1319
+ reject(err);
1320
+ }
1321
+ });
1322
+ }
1323
+
1324
+
1325
+
1326
+ /**
1327
+ *
1328
+ * @param request - ProductId, BlobId
1329
+ * @returns
1330
+ */
1331
+ public async changeProductImageAsync(request: carriers.BLOB_ChangeProductImageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
1332
+
1333
+ /**
1334
+ *
1335
+ * @param productId - The product the image is linked to
1336
+ * @param blobId - The Binary object id. If the Binary object id is 0, any image link is removed from the product.
1337
+ * @returns
1338
+ */
1339
+ public async changeProductImageAsync(productId: number, blobId: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
1340
+
1341
+ public async changeProductImageAsync(productId:number|carriers.BLOB_ChangeProductImageRequest, blobId?:number|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
1342
+ let _request : carriers.BLOB_ChangeProductImageRequest = null;
1343
+ let _options : base.WebApiRequestOptions = null;
1344
+ const first : any = productId;
1345
+ if( typeof( first ) === "object" && first && ( typeof(first.productId)!='undefined' || typeof(first.blobId)!='undefined' ) )
1346
+ {
1347
+ _request = productId as carriers.BLOB_ChangeProductImageRequest;
1348
+ _options = blobId as base.WebApiRequestOptions;
1349
+ }
1350
+ else
1351
+ {
1352
+ _request = {
1353
+ productId: productId as number,
1354
+ blobId: blobId as number,
1355
+ };
1356
+ _options = webapi_options;
1357
+ }
1358
+ return this._changeProductImageAsync( _request, _options );
1359
+ }
1360
+
1361
+
1362
+ private async _getQuoteLineImageAsync(request: carriers.BLOB_GetQuoteLineImageRequest, options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string > {
1363
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options) || {};
1364
+ base.WebApiBase.SetPending(options);
1365
+ return new Promise< ArrayBuffer|string >(async (resolve, reject) => {
1366
+ try {
1367
+ if( ! options || options.returnBlobAs == base.ReturnBlobType.AsArrayBuffer ) {
1368
+ config.responseType = "arraybuffer";
1369
+ config.headers = config.headers || {};
1370
+ config.headers["Accept"] = "application/octet-stream";
1371
+ }
1372
+ config.baseURL = this._options.baseUrl;
1373
+ const response = await this._axios.post("GetQuoteLineImage", request , config);
1374
+ base.WebApiBase.SetCompleted(options);
1375
+ let res : ArrayBuffer | string = null;
1376
+ if( options && options.returnBlobAs != base.ReturnBlobType.AsArrayBuffer )
1377
+ {
1378
+ res = response.data as string;
1379
+ if( options.returnBlobAs == base.ReturnBlobType.AsString )
1380
+ {
1381
+ res = FromBase64ToString(res);
1382
+ }
1383
+ }
1384
+ else
1385
+ {
1386
+ res = response.data as ArrayBuffer;
1387
+ }
1388
+
1389
+ resolve(res);
1390
+ }
1391
+ catch( err ) {
1392
+ base.WebApiBase.HandleError(options, config, err);
1393
+ reject(err);
1394
+ }
1395
+ });
1396
+ }
1397
+
1398
+
1399
+
1400
+ /**
1401
+ * Returns the quoteline image (rank=1) that is displayed in the CRM application.
1402
+ * @param request - QuoteLineId
1403
+ * @returns The image as a System.Drawing.Image. (If the the image is returned over webservices, the stream is returned as a Base64 encoded string.)
1404
+ */
1405
+ public async getQuoteLineImageAsync(request: carriers.BLOB_GetQuoteLineImageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
1406
+
1407
+ /**
1408
+ * Returns the quoteline image (rank=1) that is displayed in the CRM application.
1409
+ * @param quoteLineId - The product id of the quoteline the image belongs to.
1410
+ * @returns The image as a System.Drawing.Image. (If the the image is returned over webservices, the stream is returned as a Base64 encoded string.)
1411
+ */
1412
+ public async getQuoteLineImageAsync(quoteLineId: number, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
1413
+
1414
+ public async getQuoteLineImageAsync(quoteLineId:number|carriers.BLOB_GetQuoteLineImageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string > {
1415
+ let _request : carriers.BLOB_GetQuoteLineImageRequest = null;
1416
+ let _options : base.WebApiRequestOptions = null;
1417
+ const first : any = quoteLineId;
1418
+ if( typeof( first ) === "object" && first && ( typeof(first.quoteLineId)!='undefined' ) )
1419
+ {
1420
+ _request = quoteLineId as carriers.BLOB_GetQuoteLineImageRequest;
1421
+ _options = webapi_options as base.WebApiRequestOptions;
1422
+ }
1423
+ else
1424
+ {
1425
+ _request = {
1426
+ quoteLineId: quoteLineId as number,
1427
+ };
1428
+ _options = webapi_options;
1429
+ }
1430
+ return this._getQuoteLineImageAsync( _request, _options );
1431
+ }
1432
+
1433
+
1434
+ private async _getAppDataAsync(request: carriers.BLOB_GetAppDataRequest, options?:base.WebApiRequestOptions) : Promise< string > {
1435
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1436
+ base.WebApiBase.SetPending(options);
1437
+ return new Promise< string >(async (resolve, reject) => {
1438
+ try {
1439
+ config.baseURL = this._options.baseUrl;
1440
+ const response = await this._axios.post("GetAppData", request , config);
1441
+ base.WebApiBase.SetCompleted(options);
1442
+ const res : string = response.data as string;
1443
+ resolve(res);
1444
+ }
1445
+ catch( err ) {
1446
+ base.WebApiBase.HandleError(options, config, err);
1447
+ reject(err);
1448
+ }
1449
+ });
1450
+ }
1451
+
1452
+
1453
+
1454
+ /**
1455
+ * Get a CLOB (limited to a reasonable size by the mechanics of Web Services) according to a string key; ALSO limits to the current ApplicationToken if any
1456
+ * @param request - Key
1457
+ * @returns The applications value, suggested to be a JSON, XML or other readable structure
1458
+ */
1459
+ public async getAppDataAsync(request: carriers.BLOB_GetAppDataRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
1460
+
1461
+ /**
1462
+ * Get a CLOB (limited to a reasonable size by the mechanics of Web Services) according to a string key; ALSO limits to the current ApplicationToken if any
1463
+ * @param key - The key string, less than 200 characters. Must be unique within each application.
1464
+ * @returns The applications value, suggested to be a JSON, XML or other readable structure
1465
+ */
1466
+ public async getAppDataAsync(key: string, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
1467
+
1468
+ public async getAppDataAsync(key:string|carriers.BLOB_GetAppDataRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string > {
1469
+ let _request : carriers.BLOB_GetAppDataRequest = null;
1470
+ let _options : base.WebApiRequestOptions = null;
1471
+ const first : any = key;
1472
+ if( typeof( first ) === "object" && first && ( typeof(first.key)!='undefined' ) )
1473
+ {
1474
+ _request = key as carriers.BLOB_GetAppDataRequest;
1475
+ _options = webapi_options as base.WebApiRequestOptions;
1476
+ }
1477
+ else
1478
+ {
1479
+ _request = {
1480
+ key: key as string,
1481
+ };
1482
+ _options = webapi_options;
1483
+ }
1484
+ return this._getAppDataAsync( _request, _options );
1485
+ }
1486
+
1487
+
1488
+ private async _setAppDataAsync(request: carriers.BLOB_SetAppDataRequest, options?:base.WebApiRequestOptions) : Promise< void > {
1489
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1490
+ base.WebApiBase.SetPending(options);
1491
+ return new Promise< void >(async (resolve, reject) => {
1492
+ try {
1493
+ config.baseURL = this._options.baseUrl;
1494
+ const response = await this._axios.post("SetAppData", request , config);
1495
+ base.WebApiBase.SetCompleted(options);
1496
+ const res = response.data;
1497
+ resolve(res);
1498
+ }
1499
+ catch( err ) {
1500
+ base.WebApiBase.HandleError(options, config, err);
1501
+ reject(err);
1502
+ }
1503
+ });
1504
+ }
1505
+
1506
+
1507
+
1508
+ /**
1509
+ * Get a CLOB (limited to a reasonable size by the mechanics of Web Services) according to a string key; ALSO limits to the current ApplicationToken if any. Existing data, if any, will be overwritten. Overwrite with a blank value to delete.
1510
+ * @param request - Key, Data
1511
+ * @returns This method has no return value
1512
+ */
1513
+ public async setAppDataAsync(request: carriers.BLOB_SetAppDataRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
1514
+
1515
+ /**
1516
+ * Get a CLOB (limited to a reasonable size by the mechanics of Web Services) according to a string key; ALSO limits to the current ApplicationToken if any. Existing data, if any, will be overwritten. Overwrite with a blank value to delete.
1517
+ * @param key - The key string, less than 200 characters. Must be unique within each application.
1518
+ * @param data - The applications value, suggested to be a JSON, XML or other readable structure
1519
+ * @returns This method has no return value
1520
+ */
1521
+ public async setAppDataAsync(key: string, data: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
1522
+
1523
+ public async setAppDataAsync(key:string|carriers.BLOB_SetAppDataRequest, data?:string|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
1524
+ let _request : carriers.BLOB_SetAppDataRequest = null;
1525
+ let _options : base.WebApiRequestOptions = null;
1526
+ const first : any = key;
1527
+ if( typeof( first ) === "object" && first && ( typeof(first.key)!='undefined' || typeof(first.data)!='undefined' ) )
1528
+ {
1529
+ _request = key as carriers.BLOB_SetAppDataRequest;
1530
+ _options = data as base.WebApiRequestOptions;
1531
+ }
1532
+ else
1533
+ {
1534
+ _request = {
1535
+ key: key as string,
1536
+ data: data as string,
1537
+ };
1538
+ _options = webapi_options;
1539
+ }
1540
+ return this._setAppDataAsync( _request, _options );
1541
+ }
1542
+
1543
+
1544
+ private async _getPersonImageWithSizeAsync(request: carriers.BLOB_GetPersonImageWithSizeRequest, options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string > {
1545
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options) || {};
1546
+ base.WebApiBase.SetPending(options);
1547
+ return new Promise< ArrayBuffer|string >(async (resolve, reject) => {
1548
+ try {
1549
+ if( ! options || options.returnBlobAs == base.ReturnBlobType.AsArrayBuffer ) {
1550
+ config.responseType = "arraybuffer";
1551
+ config.headers = config.headers || {};
1552
+ config.headers["Accept"] = "application/octet-stream";
1553
+ }
1554
+ config.baseURL = this._options.baseUrl;
1555
+ const response = await this._axios.post("GetPersonImageWithSize", request , config);
1556
+ base.WebApiBase.SetCompleted(options);
1557
+ let res : ArrayBuffer | string = null;
1558
+ if( options && options.returnBlobAs != base.ReturnBlobType.AsArrayBuffer )
1559
+ {
1560
+ res = response.data as string;
1561
+ if( options.returnBlobAs == base.ReturnBlobType.AsString )
1562
+ {
1563
+ res = FromBase64ToString(res);
1564
+ }
1565
+ }
1566
+ else
1567
+ {
1568
+ res = response.data as ArrayBuffer;
1569
+ }
1570
+
1571
+ resolve(res);
1572
+ }
1573
+ catch( err ) {
1574
+ base.WebApiBase.HandleError(options, config, err);
1575
+ reject(err);
1576
+ }
1577
+ });
1578
+ }
1579
+
1580
+
1581
+
1582
+ /**
1583
+ * Returns the person image that is displayed in the CRM application with a specified maximum size.
1584
+ * @param request - PersonId, Width, Height
1585
+ * @returns The image as a System.Drawing.Image. (If the the image is returned over webservices, the stream is returned as a jpeg/base64 encoded string.)
1586
+ */
1587
+ public async getPersonImageWithSizeAsync(request: carriers.BLOB_GetPersonImageWithSizeRequest, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
1588
+
1589
+ /**
1590
+ * Returns the person image that is displayed in the CRM application with a specified maximum size.
1591
+ * @param personId - The person id of the person the image belongs to.
1592
+ * @param width - The maximum with of the returned image. Specify <= 0 to preserve aspect ratio of existing image
1593
+ * @param height - The maximum height of the returned image. Specify <= 0 to preserve aspect ratio of existing image
1594
+ * @returns The image as a System.Drawing.Image. (If the the image is returned over webservices, the stream is returned as a jpeg/base64 encoded string.)
1595
+ */
1596
+ public async getPersonImageWithSizeAsync(personId: number, width: number, height: number, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
1597
+
1598
+ public async getPersonImageWithSizeAsync(personId:number|carriers.BLOB_GetPersonImageWithSizeRequest, width?:number|base.WebApiRequestOptions, height?:number, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string > {
1599
+ let _request : carriers.BLOB_GetPersonImageWithSizeRequest = null;
1600
+ let _options : base.WebApiRequestOptions = null;
1601
+ const first : any = personId;
1602
+ if( typeof( first ) === "object" && first && ( typeof(first.personId)!='undefined' || typeof(first.width)!='undefined' || typeof(first.height)!='undefined' ) )
1603
+ {
1604
+ _request = personId as carriers.BLOB_GetPersonImageWithSizeRequest;
1605
+ _options = width as base.WebApiRequestOptions;
1606
+ }
1607
+ else
1608
+ {
1609
+ _request = {
1610
+ personId: personId as number,
1611
+ width: width as number,
1612
+ height: height as number,
1613
+ };
1614
+ _options = webapi_options;
1615
+ }
1616
+ return this._getPersonImageWithSizeAsync( _request, _options );
1617
+ }
1618
+
1619
+
1620
+ private async _getProjectImageWithSizeAsync(request: carriers.BLOB_GetProjectImageWithSizeRequest, options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string > {
1621
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options) || {};
1622
+ base.WebApiBase.SetPending(options);
1623
+ return new Promise< ArrayBuffer|string >(async (resolve, reject) => {
1624
+ try {
1625
+ if( ! options || options.returnBlobAs == base.ReturnBlobType.AsArrayBuffer ) {
1626
+ config.responseType = "arraybuffer";
1627
+ config.headers = config.headers || {};
1628
+ config.headers["Accept"] = "application/octet-stream";
1629
+ }
1630
+ config.baseURL = this._options.baseUrl;
1631
+ const response = await this._axios.post("GetProjectImageWithSize", request , config);
1632
+ base.WebApiBase.SetCompleted(options);
1633
+ let res : ArrayBuffer | string = null;
1634
+ if( options && options.returnBlobAs != base.ReturnBlobType.AsArrayBuffer )
1635
+ {
1636
+ res = response.data as string;
1637
+ if( options.returnBlobAs == base.ReturnBlobType.AsString )
1638
+ {
1639
+ res = FromBase64ToString(res);
1640
+ }
1641
+ }
1642
+ else
1643
+ {
1644
+ res = response.data as ArrayBuffer;
1645
+ }
1646
+
1647
+ resolve(res);
1648
+ }
1649
+ catch( err ) {
1650
+ base.WebApiBase.HandleError(options, config, err);
1651
+ reject(err);
1652
+ }
1653
+ });
1654
+ }
1655
+
1656
+
1657
+
1658
+ /**
1659
+ * Returns the project image that is displayed in the CRM application with a specified maximum size.
1660
+ * @param request - ProjectId, Width, Height
1661
+ * @returns The image as a System.Drawing.Image. (If the the image is returned over webservices, the stream is returned as a jpeg/base64 encoded string.)
1662
+ */
1663
+ public async getProjectImageWithSizeAsync(request: carriers.BLOB_GetProjectImageWithSizeRequest, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
1664
+
1665
+ /**
1666
+ * Returns the project image that is displayed in the CRM application with a specified maximum size.
1667
+ * @param projectId - The project id of the project the image belongs to.
1668
+ * @param width - The maximum with of the returned image. Specify <= 0 to preserve aspect ratio of existing image
1669
+ * @param height - The maximum height of the returned image. Specify <= 0 to preserve aspect ratio of existing image
1670
+ * @returns The image as a System.Drawing.Image. (If the the image is returned over webservices, the stream is returned as a jpeg/base64 encoded string.)
1671
+ */
1672
+ public async getProjectImageWithSizeAsync(projectId: number, width: number, height: number, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
1673
+
1674
+ public async getProjectImageWithSizeAsync(projectId:number|carriers.BLOB_GetProjectImageWithSizeRequest, width?:number|base.WebApiRequestOptions, height?:number, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string > {
1675
+ let _request : carriers.BLOB_GetProjectImageWithSizeRequest = null;
1676
+ let _options : base.WebApiRequestOptions = null;
1677
+ const first : any = projectId;
1678
+ if( typeof( first ) === "object" && first && ( typeof(first.projectId)!='undefined' || typeof(first.width)!='undefined' || typeof(first.height)!='undefined' ) )
1679
+ {
1680
+ _request = projectId as carriers.BLOB_GetProjectImageWithSizeRequest;
1681
+ _options = width as base.WebApiRequestOptions;
1682
+ }
1683
+ else
1684
+ {
1685
+ _request = {
1686
+ projectId: projectId as number,
1687
+ width: width as number,
1688
+ height: height as number,
1689
+ };
1690
+ _options = webapi_options;
1691
+ }
1692
+ return this._getProjectImageWithSizeAsync( _request, _options );
1693
+ }
1694
+
1695
+
1696
+ private async _getChatImageWithSizeAsync(request: carriers.BLOB_GetChatImageWithSizeRequest, options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string > {
1697
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options) || {};
1698
+ base.WebApiBase.SetPending(options);
1699
+ return new Promise< ArrayBuffer|string >(async (resolve, reject) => {
1700
+ try {
1701
+ if( ! options || options.returnBlobAs == base.ReturnBlobType.AsArrayBuffer ) {
1702
+ config.responseType = "arraybuffer";
1703
+ config.headers = config.headers || {};
1704
+ config.headers["Accept"] = "application/octet-stream";
1705
+ }
1706
+ config.baseURL = this._options.baseUrl;
1707
+ const response = await this._axios.post("GetChatImageWithSize", request , config);
1708
+ base.WebApiBase.SetCompleted(options);
1709
+ let res : ArrayBuffer | string = null;
1710
+ if( options && options.returnBlobAs != base.ReturnBlobType.AsArrayBuffer )
1711
+ {
1712
+ res = response.data as string;
1713
+ if( options.returnBlobAs == base.ReturnBlobType.AsString )
1714
+ {
1715
+ res = FromBase64ToString(res);
1716
+ }
1717
+ }
1718
+ else
1719
+ {
1720
+ res = response.data as ArrayBuffer;
1721
+ }
1722
+
1723
+ resolve(res);
1724
+ }
1725
+ catch( err ) {
1726
+ base.WebApiBase.HandleError(options, config, err);
1727
+ reject(err);
1728
+ }
1729
+ });
1730
+ }
1731
+
1732
+
1733
+
1734
+ /**
1735
+ * Returns the chat image that is displayed in chat with a specified maximum size.
1736
+ * @param request - ChatTopicId, Width, Height
1737
+ * @returns The image as a System.Drawing.Image. (If the the image is returned over webservices, the stream is returned as a jpeg/base64 encoded string.)
1738
+ */
1739
+ public async getChatImageWithSizeAsync(request: carriers.BLOB_GetChatImageWithSizeRequest, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
1740
+
1741
+ /**
1742
+ * Returns the chat image that is displayed in chat with a specified maximum size.
1743
+ * @param chatTopicId - The project id of the project the image belongs to.
1744
+ * @param width - The maximum with of the returned image. Specify <= 0 to preserve aspect ratio of existing image
1745
+ * @param height - The maximum height of the returned image. Specify <= 0 to preserve aspect ratio of existing image
1746
+ * @returns The image as a System.Drawing.Image. (If the the image is returned over webservices, the stream is returned as a jpeg/base64 encoded string.)
1747
+ */
1748
+ public async getChatImageWithSizeAsync(chatTopicId: number, width: number, height: number, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
1749
+
1750
+ public async getChatImageWithSizeAsync(chatTopicId:number|carriers.BLOB_GetChatImageWithSizeRequest, width?:number|base.WebApiRequestOptions, height?:number, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string > {
1751
+ let _request : carriers.BLOB_GetChatImageWithSizeRequest = null;
1752
+ let _options : base.WebApiRequestOptions = null;
1753
+ const first : any = chatTopicId;
1754
+ if( typeof( first ) === "object" && first && ( typeof(first.chatTopicId)!='undefined' || typeof(first.width)!='undefined' || typeof(first.height)!='undefined' ) )
1755
+ {
1756
+ _request = chatTopicId as carriers.BLOB_GetChatImageWithSizeRequest;
1757
+ _options = width as base.WebApiRequestOptions;
1758
+ }
1759
+ else
1760
+ {
1761
+ _request = {
1762
+ chatTopicId: chatTopicId as number,
1763
+ width: width as number,
1764
+ height: height as number,
1765
+ };
1766
+ _options = webapi_options;
1767
+ }
1768
+ return this._getChatImageWithSizeAsync( _request, _options );
1769
+ }
1770
+
1771
+
1772
+ private async _getContactImageAsync(request: carriers.BLOB_GetContactImageRequest, options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string > {
1773
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options) || {};
1774
+ base.WebApiBase.SetPending(options);
1775
+ return new Promise< ArrayBuffer|string >(async (resolve, reject) => {
1776
+ try {
1777
+ if( ! options || options.returnBlobAs == base.ReturnBlobType.AsArrayBuffer ) {
1778
+ config.responseType = "arraybuffer";
1779
+ config.headers = config.headers || {};
1780
+ config.headers["Accept"] = "application/octet-stream";
1781
+ }
1782
+ config.baseURL = this._options.baseUrl;
1783
+ const response = await this._axios.post("GetContactImage", request , config);
1784
+ base.WebApiBase.SetCompleted(options);
1785
+ let res : ArrayBuffer | string = null;
1786
+ if( options && options.returnBlobAs != base.ReturnBlobType.AsArrayBuffer )
1787
+ {
1788
+ res = response.data as string;
1789
+ if( options.returnBlobAs == base.ReturnBlobType.AsString )
1790
+ {
1791
+ res = FromBase64ToString(res);
1792
+ }
1793
+ }
1794
+ else
1795
+ {
1796
+ res = response.data as ArrayBuffer;
1797
+ }
1798
+
1799
+ resolve(res);
1800
+ }
1801
+ catch( err ) {
1802
+ base.WebApiBase.HandleError(options, config, err);
1803
+ reject(err);
1804
+ }
1805
+ });
1806
+ }
1807
+
1808
+
1809
+
1810
+ /**
1811
+ * Returns the contact image that is displayed in the CRM application.
1812
+ * @param request - ContactId
1813
+ * @returns The image as a System.Drawing.Image. (If the the image is returned over webservices, the stream is returned as a Base64 encoded string.)
1814
+ */
1815
+ public async getContactImageAsync(request: carriers.BLOB_GetContactImageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
1816
+
1817
+ /**
1818
+ * Returns the contact image that is displayed in the CRM application.
1819
+ * @param contactId - The contact id of the contact the image belongs to.
1820
+ * @returns The image as a System.Drawing.Image. (If the the image is returned over webservices, the stream is returned as a Base64 encoded string.)
1821
+ */
1822
+ public async getContactImageAsync(contactId: number, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
1823
+
1824
+ public async getContactImageAsync(contactId:number|carriers.BLOB_GetContactImageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string > {
1825
+ let _request : carriers.BLOB_GetContactImageRequest = null;
1826
+ let _options : base.WebApiRequestOptions = null;
1827
+ const first : any = contactId;
1828
+ if( typeof( first ) === "object" && first && ( typeof(first.contactId)!='undefined' ) )
1829
+ {
1830
+ _request = contactId as carriers.BLOB_GetContactImageRequest;
1831
+ _options = webapi_options as base.WebApiRequestOptions;
1832
+ }
1833
+ else
1834
+ {
1835
+ _request = {
1836
+ contactId: contactId as number,
1837
+ };
1838
+ _options = webapi_options;
1839
+ }
1840
+ return this._getContactImageAsync( _request, _options );
1841
+ }
1842
+
1843
+
1844
+ private async _setContactImageAsync(request: carriers.BLOB_SetContactImageRequest, options?:base.WebApiRequestOptions) : Promise< void > {
1845
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1846
+ base.WebApiBase.SetPending(options);
1847
+ return new Promise< void >(async (resolve, reject) => {
1848
+ try {
1849
+ config.baseURL = this._options.baseUrl;
1850
+ const response = await this._axios.post("SetContactImage", request , config);
1851
+ base.WebApiBase.SetCompleted(options);
1852
+ const res = response.data;
1853
+ resolve(res);
1854
+ }
1855
+ catch( err ) {
1856
+ base.WebApiBase.HandleError(options, config, err);
1857
+ reject(err);
1858
+ }
1859
+ });
1860
+ }
1861
+
1862
+
1863
+
1864
+ /**
1865
+ * Stores the contact image that is displayed in the CRM application.
1866
+ * @param request - ContactId, Image
1867
+ * @returns
1868
+ */
1869
+ public async setContactImageAsync(request: carriers.BLOB_SetContactImageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
1870
+
1871
+ /**
1872
+ * Stores the contact image that is displayed in the CRM application.
1873
+ * @param contactId - The contact id of the contact the image belongs to.
1874
+ * @param image - The image that is stored on the contact (System.Drawing.Image)
1875
+ * @returns
1876
+ */
1877
+ public async setContactImageAsync(contactId: number, image: ArrayBuffer|string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
1878
+
1879
+ public async setContactImageAsync(contactId:number|carriers.BLOB_SetContactImageRequest, image?:ArrayBuffer|string|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
1880
+ let _request : carriers.BLOB_SetContactImageRequest = null;
1881
+ let _options : base.WebApiRequestOptions = null;
1882
+ const first : any = contactId;
1883
+ if( typeof( first ) === "object" && first && ( typeof(first.contactId)!='undefined' || typeof(first.image)!='undefined' ) )
1884
+ {
1885
+ _request = contactId as carriers.BLOB_SetContactImageRequest;
1886
+ _options = image as base.WebApiRequestOptions;
1887
+ }
1888
+ else
1889
+ {
1890
+ _request = {
1891
+ contactId: contactId as number,
1892
+ image: image as ArrayBuffer|string,
1893
+ };
1894
+ _options = webapi_options;
1895
+ }
1896
+ _request.image = ToBase64(_request.image);
1897
+ return this._setContactImageAsync( _request, _options );
1898
+ }
1899
+
1900
+
1901
+ private async _changeContactImageAsync(request: carriers.BLOB_ChangeContactImageRequest, options?:base.WebApiRequestOptions) : Promise< void > {
1902
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1903
+ base.WebApiBase.SetPending(options);
1904
+ return new Promise< void >(async (resolve, reject) => {
1905
+ try {
1906
+ config.baseURL = this._options.baseUrl;
1907
+ const response = await this._axios.post("ChangeContactImage", request , config);
1908
+ base.WebApiBase.SetCompleted(options);
1909
+ const res = response.data;
1910
+ resolve(res);
1911
+ }
1912
+ catch( err ) {
1913
+ base.WebApiBase.HandleError(options, config, err);
1914
+ reject(err);
1915
+ }
1916
+ });
1917
+ }
1918
+
1919
+
1920
+
1921
+ /**
1922
+ * Changes the contact image link. If the Binary object id is 0, any image link is removed from the contact.
1923
+ * @param request - ContactId, BlobId
1924
+ * @returns
1925
+ */
1926
+ public async changeContactImageAsync(request: carriers.BLOB_ChangeContactImageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
1927
+
1928
+ /**
1929
+ * Changes the contact image link. If the Binary object id is 0, any image link is removed from the contact.
1930
+ * @param contactId - The Contact the image is linked to
1931
+ * @param blobId - The Binary object id. If the Binary object id is 0, any image link is removed from the Contact.
1932
+ * @returns
1933
+ */
1934
+ public async changeContactImageAsync(contactId: number, blobId: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
1935
+
1936
+ public async changeContactImageAsync(contactId:number|carriers.BLOB_ChangeContactImageRequest, blobId?:number|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
1937
+ let _request : carriers.BLOB_ChangeContactImageRequest = null;
1938
+ let _options : base.WebApiRequestOptions = null;
1939
+ const first : any = contactId;
1940
+ if( typeof( first ) === "object" && first && ( typeof(first.contactId)!='undefined' || typeof(first.blobId)!='undefined' ) )
1941
+ {
1942
+ _request = contactId as carriers.BLOB_ChangeContactImageRequest;
1943
+ _options = blobId as base.WebApiRequestOptions;
1944
+ }
1945
+ else
1946
+ {
1947
+ _request = {
1948
+ contactId: contactId as number,
1949
+ blobId: blobId as number,
1950
+ };
1951
+ _options = webapi_options;
1952
+ }
1953
+ return this._changeContactImageAsync( _request, _options );
1954
+ }
1955
+
1956
+
1957
+ private async _getBlobEntityOnContactAsync(request: carriers.BLOB_GetBlobEntityOnContactRequest, options?:base.WebApiRequestOptions) : Promise< carriers.BlobEntity > {
1958
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1959
+ base.WebApiBase.SetPending(options);
1960
+ return new Promise< carriers.BlobEntity >(async (resolve, reject) => {
1961
+ try {
1962
+ config.baseURL = this._options.baseUrl;
1963
+ const response = await this._axios.post("GetBlobEntityOnContact", request , config);
1964
+ base.WebApiBase.SetCompleted(options);
1965
+ const res : carriers.BlobEntity = converters.Create_BlobEntity_From( response.data );
1966
+ resolve(res);
1967
+ }
1968
+ catch( err ) {
1969
+ base.WebApiBase.HandleError(options, config, err);
1970
+ reject(err);
1971
+ }
1972
+ });
1973
+ }
1974
+
1975
+
1976
+
1977
+ /**
1978
+ * Gets the blob entity that represents the contact image binary object.
1979
+ * @param request - ContactId
1980
+ * @returns BlobEntity object
1981
+ */
1982
+ public async getBlobEntityOnContactAsync(request: carriers.BLOB_GetBlobEntityOnContactRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.BlobEntity >;
1983
+
1984
+ /**
1985
+ * Gets the blob entity that represents the contact image binary object.
1986
+ * @param contactId - The Contact id
1987
+ * @returns BlobEntity object
1988
+ */
1989
+ public async getBlobEntityOnContactAsync(contactId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.BlobEntity >;
1990
+
1991
+ public async getBlobEntityOnContactAsync(contactId:number|carriers.BLOB_GetBlobEntityOnContactRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.BlobEntity > {
1992
+ let _request : carriers.BLOB_GetBlobEntityOnContactRequest = null;
1993
+ let _options : base.WebApiRequestOptions = null;
1994
+ const first : any = contactId;
1995
+ if( typeof( first ) === "object" && first && ( typeof(first.contactId)!='undefined' ) )
1996
+ {
1997
+ _request = contactId as carriers.BLOB_GetBlobEntityOnContactRequest;
1998
+ _options = webapi_options as base.WebApiRequestOptions;
1999
+ }
2000
+ else
2001
+ {
2002
+ _request = {
2003
+ contactId: contactId as number,
2004
+ };
2005
+ _options = webapi_options;
2006
+ }
2007
+ return this._getBlobEntityOnContactAsync( _request, _options );
2008
+ }
2009
+
2010
+
2011
+ private async _getContactImageWithSizeAsync(request: carriers.BLOB_GetContactImageWithSizeRequest, options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string > {
2012
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options) || {};
2013
+ base.WebApiBase.SetPending(options);
2014
+ return new Promise< ArrayBuffer|string >(async (resolve, reject) => {
2015
+ try {
2016
+ if( ! options || options.returnBlobAs == base.ReturnBlobType.AsArrayBuffer ) {
2017
+ config.responseType = "arraybuffer";
2018
+ config.headers = config.headers || {};
2019
+ config.headers["Accept"] = "application/octet-stream";
2020
+ }
2021
+ config.baseURL = this._options.baseUrl;
2022
+ const response = await this._axios.post("GetContactImageWithSize", request , config);
2023
+ base.WebApiBase.SetCompleted(options);
2024
+ let res : ArrayBuffer | string = null;
2025
+ if( options && options.returnBlobAs != base.ReturnBlobType.AsArrayBuffer )
2026
+ {
2027
+ res = response.data as string;
2028
+ if( options.returnBlobAs == base.ReturnBlobType.AsString )
2029
+ {
2030
+ res = FromBase64ToString(res);
2031
+ }
2032
+ }
2033
+ else
2034
+ {
2035
+ res = response.data as ArrayBuffer;
2036
+ }
2037
+
2038
+ resolve(res);
2039
+ }
2040
+ catch( err ) {
2041
+ base.WebApiBase.HandleError(options, config, err);
2042
+ reject(err);
2043
+ }
2044
+ });
2045
+ }
2046
+
2047
+
2048
+
2049
+ /**
2050
+ * Returns the contact image that is displayed in the CRM application with a specified maximum size.
2051
+ * @param request - ContactId, Width, Height
2052
+ * @returns The image as a System.Drawing.Image. (If the the image is returned over webservices, the stream is returned as a jpeg/base64 encoded string.)
2053
+ */
2054
+ public async getContactImageWithSizeAsync(request: carriers.BLOB_GetContactImageWithSizeRequest, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
2055
+
2056
+ /**
2057
+ * Returns the contact image that is displayed in the CRM application with a specified maximum size.
2058
+ * @param contactId - The contact id of the Contact the image belongs to.
2059
+ * @param width - The maximum with of the returned image. Specify <= 0 to preserve aspect ratio of existing image
2060
+ * @param height - The maximum height of the returned image. Specify <= 0 to preserve aspect ratio of existing image
2061
+ * @returns The image as a System.Drawing.Image. (If the the image is returned over webservices, the stream is returned as a jpeg/base64 encoded string.)
2062
+ */
2063
+ public async getContactImageWithSizeAsync(contactId: number, width: number, height: number, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
2064
+
2065
+ public async getContactImageWithSizeAsync(contactId:number|carriers.BLOB_GetContactImageWithSizeRequest, width?:number|base.WebApiRequestOptions, height?:number, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string > {
2066
+ let _request : carriers.BLOB_GetContactImageWithSizeRequest = null;
2067
+ let _options : base.WebApiRequestOptions = null;
2068
+ const first : any = contactId;
2069
+ if( typeof( first ) === "object" && first && ( typeof(first.contactId)!='undefined' || typeof(first.width)!='undefined' || typeof(first.height)!='undefined' ) )
2070
+ {
2071
+ _request = contactId as carriers.BLOB_GetContactImageWithSizeRequest;
2072
+ _options = width as base.WebApiRequestOptions;
2073
+ }
2074
+ else
2075
+ {
2076
+ _request = {
2077
+ contactId: contactId as number,
2078
+ width: width as number,
2079
+ height: height as number,
2080
+ };
2081
+ _options = webapi_options;
2082
+ }
2083
+ return this._getContactImageWithSizeAsync( _request, _options );
2084
+ }
2085
+
2086
+
2087
+ private async _getOutputFromBatchAsync(request: carriers.BLOB_GetOutputFromBatchRequest, options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string > {
2088
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options) || {};
2089
+ base.WebApiBase.SetPending(options);
2090
+ return new Promise< ArrayBuffer|string >(async (resolve, reject) => {
2091
+ try {
2092
+ if( ! options || options.returnBlobAs == base.ReturnBlobType.AsArrayBuffer ) {
2093
+ config.responseType = "arraybuffer";
2094
+ config.headers = config.headers || {};
2095
+ config.headers["Accept"] = "application/octet-stream";
2096
+ }
2097
+ config.baseURL = this._options.baseUrl;
2098
+ const response = await this._axios.post("GetOutputFromBatch", request , config);
2099
+ base.WebApiBase.SetCompleted(options);
2100
+ let res : ArrayBuffer | string = null;
2101
+ if( options && options.returnBlobAs != base.ReturnBlobType.AsArrayBuffer )
2102
+ {
2103
+ res = response.data as string;
2104
+ if( options.returnBlobAs == base.ReturnBlobType.AsString )
2105
+ {
2106
+ res = FromBase64ToString(res);
2107
+ }
2108
+ }
2109
+ else
2110
+ {
2111
+ res = response.data as ArrayBuffer;
2112
+ }
2113
+
2114
+ resolve(res);
2115
+ }
2116
+ catch( err ) {
2117
+ base.WebApiBase.HandleError(options, config, err);
2118
+ reject(err);
2119
+ }
2120
+ });
2121
+ }
2122
+
2123
+
2124
+
2125
+ /**
2126
+ * Get the output of a batchtask as a stream
2127
+ * @param request - BatchTaskId
2128
+ * @returns The binary object as a Stream
2129
+ */
2130
+ public async getOutputFromBatchAsync(request: carriers.BLOB_GetOutputFromBatchRequest, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
2131
+
2132
+ /**
2133
+ * Get the output of a batchtask as a stream
2134
+ * @param batchTaskId - The ID of the batchtask that created the output data
2135
+ * @returns The binary object as a Stream
2136
+ */
2137
+ public async getOutputFromBatchAsync(batchTaskId: number, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
2138
+
2139
+ public async getOutputFromBatchAsync(batchTaskId:number|carriers.BLOB_GetOutputFromBatchRequest, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string > {
2140
+ let _request : carriers.BLOB_GetOutputFromBatchRequest = null;
2141
+ let _options : base.WebApiRequestOptions = null;
2142
+ const first : any = batchTaskId;
2143
+ if( typeof( first ) === "object" && first && ( typeof(first.batchTaskId)!='undefined' ) )
2144
+ {
2145
+ _request = batchTaskId as carriers.BLOB_GetOutputFromBatchRequest;
2146
+ _options = webapi_options as base.WebApiRequestOptions;
2147
+ }
2148
+ else
2149
+ {
2150
+ _request = {
2151
+ batchTaskId: batchTaskId as number,
2152
+ };
2153
+ _options = webapi_options;
2154
+ }
2155
+ return this._getOutputFromBatchAsync( _request, _options );
2156
+ }
2157
+
2158
+
2159
+ private async _cleanupBatchTaskAsync(request: carriers.BLOB_CleanupBatchTaskRequest, options?:base.WebApiRequestOptions) : Promise< void > {
2160
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
2161
+ base.WebApiBase.SetPending(options);
2162
+ return new Promise< void >(async (resolve, reject) => {
2163
+ try {
2164
+ config.baseURL = this._options.baseUrl;
2165
+ const response = await this._axios.post("CleanupBatchTask", request , config);
2166
+ base.WebApiBase.SetCompleted(options);
2167
+ const res = response.data;
2168
+ resolve(res);
2169
+ }
2170
+ catch( err ) {
2171
+ base.WebApiBase.HandleError(options, config, err);
2172
+ reject(err);
2173
+ }
2174
+ });
2175
+ }
2176
+
2177
+
2178
+
2179
+ /**
2180
+ * Removes the binary objects linked to the batch task, the links themselves and the batch task.
2181
+ * @param request - BatchTaskId
2182
+ * @returns
2183
+ */
2184
+ public async cleanupBatchTaskAsync(request: carriers.BLOB_CleanupBatchTaskRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
2185
+
2186
+ /**
2187
+ * Removes the binary objects linked to the batch task, the links themselves and the batch task.
2188
+ * @param batchTaskId - The ID of the batchtask that created the output data
2189
+ * @returns
2190
+ */
2191
+ public async cleanupBatchTaskAsync(batchTaskId: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
2192
+
2193
+ public async cleanupBatchTaskAsync(batchTaskId:number|carriers.BLOB_CleanupBatchTaskRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
2194
+ let _request : carriers.BLOB_CleanupBatchTaskRequest = null;
2195
+ let _options : base.WebApiRequestOptions = null;
2196
+ const first : any = batchTaskId;
2197
+ if( typeof( first ) === "object" && first && ( typeof(first.batchTaskId)!='undefined' ) )
2198
+ {
2199
+ _request = batchTaskId as carriers.BLOB_CleanupBatchTaskRequest;
2200
+ _options = webapi_options as base.WebApiRequestOptions;
2201
+ }
2202
+ else
2203
+ {
2204
+ _request = {
2205
+ batchTaskId: batchTaskId as number,
2206
+ };
2207
+ _options = webapi_options;
2208
+ }
2209
+ return this._cleanupBatchTaskAsync( _request, _options );
2210
+ }
2211
+
2212
+ } // class v1BLOBAgentController
2213
+
2214
+