@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.
- package/LICENSE.md +15 -0
- package/README.md +184 -0
- package/__tests__/Appointment63-notz.json +1925 -0
- package/__tests__/Appointment63-utctz.json +1925 -0
- package/__tests__/Appointment63.json +1925 -0
- package/__tests__/AppointmentTzTest.ts +114 -0
- package/__tests__/AxiosNockTest.ts +28 -0
- package/__tests__/ContactDefault.json +699 -0
- package/__tests__/ContactEntity.json +273 -0
- package/__tests__/ContactRestTest.ts +144 -0
- package/__tests__/ContactTest.ts +395 -0
- package/__tests__/ConvertersTest.ts +97 -0
- package/__tests__/DocumentGetTemplateStream.json +1 -0
- package/__tests__/DocumentGetTemplateStreamBinary.json +1 -0
- package/__tests__/DocumentTest.ts +101 -0
- package/__tests__/Person210-notz.json +1932 -0
- package/__tests__/Person210-utctz.json +1932 -0
- package/__tests__/Person210.json +1932 -0
- package/__tests__/PersonImageData.nock +23 -0
- package/__tests__/PersonTest.ts +41 -0
- package/__tests__/PersonTzTest.ts +113 -0
- package/__tests__/RecurrenceInfo.json +55 -0
- package/__tests__/TableRights.json +441 -0
- package/__tests__/WebapiTest.ts +264 -0
- package/__tests__/Webhook.json +17 -0
- package/__tests__/WebhookTest.ts +209 -0
- package/dist/cjs/AIAgent.d.ts +265 -0
- package/dist/cjs/AIAgent.d.ts.map +1 -0
- package/dist/cjs/AIAgent.js +535 -0
- package/dist/cjs/AIAgent.js.map +1 -0
- package/dist/cjs/AppointmentAgent.d.ts +1539 -0
- package/dist/cjs/AppointmentAgent.d.ts.map +1 -0
- package/dist/cjs/AppointmentAgent.js +3363 -0
- package/dist/cjs/AppointmentAgent.js.map +1 -0
- package/dist/cjs/AppointmentRestApi.d.ts +46 -0
- package/dist/cjs/AppointmentRestApi.d.ts.map +1 -0
- package/dist/cjs/AppointmentRestApi.js +168 -0
- package/dist/cjs/AppointmentRestApi.js.map +1 -0
- package/dist/cjs/ArchiveAgent.d.ts +582 -0
- package/dist/cjs/ArchiveAgent.d.ts.map +1 -0
- package/dist/cjs/ArchiveAgent.js +1135 -0
- package/dist/cjs/ArchiveAgent.js.map +1 -0
- package/dist/cjs/AssociateAgent.d.ts +109 -0
- package/dist/cjs/AssociateAgent.d.ts.map +1 -0
- package/dist/cjs/AssociateAgent.js +257 -0
- package/dist/cjs/AssociateAgent.js.map +1 -0
- package/dist/cjs/AudienceAgent.d.ts +359 -0
- package/dist/cjs/AudienceAgent.d.ts.map +1 -0
- package/dist/cjs/AudienceAgent.js +888 -0
- package/dist/cjs/AudienceAgent.js.map +1 -0
- package/dist/cjs/AxiosCacheHandler.d.ts +20 -0
- package/dist/cjs/AxiosCacheHandler.d.ts.map +1 -0
- package/dist/cjs/AxiosCacheHandler.js +68 -0
- package/dist/cjs/AxiosCacheHandler.js.map +1 -0
- package/dist/cjs/BLOBAgent.d.ts +538 -0
- package/dist/cjs/BLOBAgent.d.ts.map +1 -0
- package/dist/cjs/BLOBAgent.js +1364 -0
- package/dist/cjs/BLOBAgent.js.map +1 -0
- package/dist/cjs/Base64.d.ts +4 -0
- package/dist/cjs/Base64.d.ts.map +1 -0
- package/dist/cjs/Base64.js +233 -0
- package/dist/cjs/Base64.js.map +1 -0
- package/dist/cjs/BatchAgent.d.ts +252 -0
- package/dist/cjs/BatchAgent.d.ts.map +1 -0
- package/dist/cjs/BatchAgent.js +522 -0
- package/dist/cjs/BatchAgent.js.map +1 -0
- package/dist/cjs/BulkUpdateAgent.d.ts +144 -0
- package/dist/cjs/BulkUpdateAgent.d.ts.map +1 -0
- package/dist/cjs/BulkUpdateAgent.js +288 -0
- package/dist/cjs/BulkUpdateAgent.js.map +1 -0
- package/dist/cjs/CRMScriptAgent.d.ts +330 -0
- package/dist/cjs/CRMScriptAgent.d.ts.map +1 -0
- package/dist/cjs/CRMScriptAgent.js +799 -0
- package/dist/cjs/CRMScriptAgent.js.map +1 -0
- package/dist/cjs/Carriers.d.ts +36976 -0
- package/dist/cjs/Carriers.d.ts.map +1 -0
- package/dist/cjs/Carriers.js +8 -0
- package/dist/cjs/Carriers.js.map +1 -0
- package/dist/cjs/ChatAgent.d.ts +366 -0
- package/dist/cjs/ChatAgent.d.ts.map +1 -0
- package/dist/cjs/ChatAgent.js +919 -0
- package/dist/cjs/ChatAgent.js.map +1 -0
- package/dist/cjs/ConfigurationAgent.d.ts +534 -0
- package/dist/cjs/ConfigurationAgent.d.ts.map +1 -0
- package/dist/cjs/ConfigurationAgent.js +1429 -0
- package/dist/cjs/ConfigurationAgent.js.map +1 -0
- package/dist/cjs/ContactAgent.d.ts +415 -0
- package/dist/cjs/ContactAgent.d.ts.map +1 -0
- package/dist/cjs/ContactAgent.js +1005 -0
- package/dist/cjs/ContactAgent.js.map +1 -0
- package/dist/cjs/ContactRestApi.d.ts +46 -0
- package/dist/cjs/ContactRestApi.d.ts.map +1 -0
- package/dist/cjs/ContactRestApi.js +168 -0
- package/dist/cjs/ContactRestApi.js.map +1 -0
- package/dist/cjs/Converters.d.ts +1359 -0
- package/dist/cjs/Converters.d.ts.map +1 -0
- package/dist/cjs/Converters.js +18996 -0
- package/dist/cjs/Converters.js.map +1 -0
- package/dist/cjs/CustomerServiceAgent.d.ts +447 -0
- package/dist/cjs/CustomerServiceAgent.d.ts.map +1 -0
- package/dist/cjs/CustomerServiceAgent.js +1123 -0
- package/dist/cjs/CustomerServiceAgent.js.map +1 -0
- package/dist/cjs/DashAgent.d.ts +370 -0
- package/dist/cjs/DashAgent.d.ts.map +1 -0
- package/dist/cjs/DashAgent.js +1028 -0
- package/dist/cjs/DashAgent.js.map +1 -0
- package/dist/cjs/DashboardAgent.d.ts +163 -0
- package/dist/cjs/DashboardAgent.d.ts.map +1 -0
- package/dist/cjs/DashboardAgent.js +436 -0
- package/dist/cjs/DashboardAgent.js.map +1 -0
- package/dist/cjs/DatabaseAgent.d.ts +35 -0
- package/dist/cjs/DatabaseAgent.d.ts.map +1 -0
- package/dist/cjs/DatabaseAgent.js +70 -0
- package/dist/cjs/DatabaseAgent.js.map +1 -0
- package/dist/cjs/DatabaseTableAgent.d.ts +155 -0
- package/dist/cjs/DatabaseTableAgent.d.ts.map +1 -0
- package/dist/cjs/DatabaseTableAgent.js +299 -0
- package/dist/cjs/DatabaseTableAgent.js.map +1 -0
- package/dist/cjs/Day_js.d.ts +4 -0
- package/dist/cjs/Day_js.d.ts.map +1 -0
- package/dist/cjs/Day_js.js +44 -0
- package/dist/cjs/Day_js.js.map +1 -0
- package/dist/cjs/DiagnosticsAgent.d.ts +200 -0
- package/dist/cjs/DiagnosticsAgent.d.ts.map +1 -0
- package/dist/cjs/DiagnosticsAgent.js +480 -0
- package/dist/cjs/DiagnosticsAgent.js.map +1 -0
- package/dist/cjs/DocumentAgent.d.ts +1345 -0
- package/dist/cjs/DocumentAgent.d.ts.map +1 -0
- package/dist/cjs/DocumentAgent.js +3058 -0
- package/dist/cjs/DocumentAgent.js.map +1 -0
- package/dist/cjs/DocumentMigrationAgent.d.ts +145 -0
- package/dist/cjs/DocumentMigrationAgent.d.ts.map +1 -0
- package/dist/cjs/DocumentMigrationAgent.js +297 -0
- package/dist/cjs/DocumentMigrationAgent.js.map +1 -0
- package/dist/cjs/DocumentRestApi.d.ts +46 -0
- package/dist/cjs/DocumentRestApi.d.ts.map +1 -0
- package/dist/cjs/DocumentRestApi.js +168 -0
- package/dist/cjs/DocumentRestApi.js.map +1 -0
- package/dist/cjs/EMailAgent.d.ts +1417 -0
- package/dist/cjs/EMailAgent.d.ts.map +1 -0
- package/dist/cjs/EMailAgent.js +3202 -0
- package/dist/cjs/EMailAgent.js.map +1 -0
- package/dist/cjs/Enums.d.ts +6083 -0
- package/dist/cjs/Enums.d.ts.map +1 -0
- package/dist/cjs/Enums.js +6270 -0
- package/dist/cjs/Enums.js.map +1 -0
- package/dist/cjs/ErpSyncAgent.d.ts +725 -0
- package/dist/cjs/ErpSyncAgent.d.ts.map +1 -0
- package/dist/cjs/ErpSyncAgent.js +1601 -0
- package/dist/cjs/ErpSyncAgent.js.map +1 -0
- package/dist/cjs/FavouriteAgent.d.ts +208 -0
- package/dist/cjs/FavouriteAgent.d.ts.map +1 -0
- package/dist/cjs/FavouriteAgent.js +407 -0
- package/dist/cjs/FavouriteAgent.js.map +1 -0
- package/dist/cjs/FindAgent.d.ts +688 -0
- package/dist/cjs/FindAgent.d.ts.map +1 -0
- package/dist/cjs/FindAgent.js +1337 -0
- package/dist/cjs/FindAgent.js.map +1 -0
- package/dist/cjs/ForeignSystemAgent.d.ts +478 -0
- package/dist/cjs/ForeignSystemAgent.d.ts.map +1 -0
- package/dist/cjs/ForeignSystemAgent.js +1022 -0
- package/dist/cjs/ForeignSystemAgent.js.map +1 -0
- package/dist/cjs/FreeTextAgent.d.ts +172 -0
- package/dist/cjs/FreeTextAgent.d.ts.map +1 -0
- package/dist/cjs/FreeTextAgent.js +368 -0
- package/dist/cjs/FreeTextAgent.js.map +1 -0
- package/dist/cjs/ImportAgent.d.ts +92 -0
- package/dist/cjs/ImportAgent.d.ts.map +1 -0
- package/dist/cjs/ImportAgent.js +164 -0
- package/dist/cjs/ImportAgent.js.map +1 -0
- package/dist/cjs/LicenseAgent.d.ts +298 -0
- package/dist/cjs/LicenseAgent.d.ts.map +1 -0
- package/dist/cjs/LicenseAgent.js +639 -0
- package/dist/cjs/LicenseAgent.js.map +1 -0
- package/dist/cjs/ListAgent.d.ts +2423 -0
- package/dist/cjs/ListAgent.d.ts.map +1 -0
- package/dist/cjs/ListAgent.js +7813 -0
- package/dist/cjs/ListAgent.js.map +1 -0
- package/dist/cjs/MDOAgent.d.ts +214 -0
- package/dist/cjs/MDOAgent.d.ts.map +1 -0
- package/dist/cjs/MDOAgent.js +430 -0
- package/dist/cjs/MDOAgent.js.map +1 -0
- package/dist/cjs/MarketingAgent.d.ts +170 -0
- package/dist/cjs/MarketingAgent.d.ts.map +1 -0
- package/dist/cjs/MarketingAgent.js +570 -0
- package/dist/cjs/MarketingAgent.js.map +1 -0
- package/dist/cjs/MessagingAgent.d.ts +111 -0
- package/dist/cjs/MessagingAgent.d.ts.map +1 -0
- package/dist/cjs/MessagingAgent.js +217 -0
- package/dist/cjs/MessagingAgent.js.map +1 -0
- package/dist/cjs/NavigatorAgent.d.ts +40 -0
- package/dist/cjs/NavigatorAgent.d.ts.map +1 -0
- package/dist/cjs/NavigatorAgent.js +99 -0
- package/dist/cjs/NavigatorAgent.js.map +1 -0
- package/dist/cjs/NumberAllocationAgent.d.ts +72 -0
- package/dist/cjs/NumberAllocationAgent.d.ts.map +1 -0
- package/dist/cjs/NumberAllocationAgent.js +199 -0
- package/dist/cjs/NumberAllocationAgent.js.map +1 -0
- package/dist/cjs/PersonAgent.d.ts +774 -0
- package/dist/cjs/PersonAgent.d.ts.map +1 -0
- package/dist/cjs/PersonAgent.js +1814 -0
- package/dist/cjs/PersonAgent.js.map +1 -0
- package/dist/cjs/PersonRestApi.d.ts +46 -0
- package/dist/cjs/PersonRestApi.d.ts.map +1 -0
- package/dist/cjs/PersonRestApi.js +168 -0
- package/dist/cjs/PersonRestApi.js.map +1 -0
- package/dist/cjs/PhoneListAgent.d.ts +126 -0
- package/dist/cjs/PhoneListAgent.d.ts.map +1 -0
- package/dist/cjs/PhoneListAgent.js +269 -0
- package/dist/cjs/PhoneListAgent.js.map +1 -0
- package/dist/cjs/PocketAgent.d.ts +218 -0
- package/dist/cjs/PocketAgent.d.ts.map +1 -0
- package/dist/cjs/PocketAgent.js +451 -0
- package/dist/cjs/PocketAgent.js.map +1 -0
- package/dist/cjs/PreferenceAgent.d.ts +497 -0
- package/dist/cjs/PreferenceAgent.d.ts.map +1 -0
- package/dist/cjs/PreferenceAgent.js +1194 -0
- package/dist/cjs/PreferenceAgent.js.map +1 -0
- package/dist/cjs/PreviewsAgent.d.ts +36 -0
- package/dist/cjs/PreviewsAgent.d.ts.map +1 -0
- package/dist/cjs/PreviewsAgent.js +54 -0
- package/dist/cjs/PreviewsAgent.js.map +1 -0
- package/dist/cjs/ProjectAgent.d.ts +558 -0
- package/dist/cjs/ProjectAgent.d.ts.map +1 -0
- package/dist/cjs/ProjectAgent.js +1482 -0
- package/dist/cjs/ProjectAgent.js.map +1 -0
- package/dist/cjs/ProjectRestApi.d.ts +46 -0
- package/dist/cjs/ProjectRestApi.d.ts.map +1 -0
- package/dist/cjs/ProjectRestApi.js +168 -0
- package/dist/cjs/ProjectRestApi.js.map +1 -0
- package/dist/cjs/QuoteAgent.d.ts +1415 -0
- package/dist/cjs/QuoteAgent.d.ts.map +1 -0
- package/dist/cjs/QuoteAgent.js +3224 -0
- package/dist/cjs/QuoteAgent.js.map +1 -0
- package/dist/cjs/RelationAgent.d.ts +61 -0
- package/dist/cjs/RelationAgent.d.ts.map +1 -0
- package/dist/cjs/RelationAgent.js +132 -0
- package/dist/cjs/RelationAgent.js.map +1 -0
- package/dist/cjs/ReplicationAgent.d.ts +77 -0
- package/dist/cjs/ReplicationAgent.d.ts.map +1 -0
- package/dist/cjs/ReplicationAgent.js +223 -0
- package/dist/cjs/ReplicationAgent.js.map +1 -0
- package/dist/cjs/ReportAgent.d.ts +144 -0
- package/dist/cjs/ReportAgent.d.ts.map +1 -0
- package/dist/cjs/ReportAgent.js +380 -0
- package/dist/cjs/ReportAgent.js.map +1 -0
- package/dist/cjs/ResourceAgent.d.ts +105 -0
- package/dist/cjs/ResourceAgent.d.ts.map +1 -0
- package/dist/cjs/ResourceAgent.js +196 -0
- package/dist/cjs/ResourceAgent.js.map +1 -0
- package/dist/cjs/SaintAgent.d.ts +157 -0
- package/dist/cjs/SaintAgent.d.ts.map +1 -0
- package/dist/cjs/SaintAgent.js +402 -0
- package/dist/cjs/SaintAgent.js.map +1 -0
- package/dist/cjs/SaleAgent.d.ts +477 -0
- package/dist/cjs/SaleAgent.d.ts.map +1 -0
- package/dist/cjs/SaleAgent.js +1182 -0
- package/dist/cjs/SaleAgent.js.map +1 -0
- package/dist/cjs/SaleRestApi.d.ts +46 -0
- package/dist/cjs/SaleRestApi.d.ts.map +1 -0
- package/dist/cjs/SaleRestApi.js +168 -0
- package/dist/cjs/SaleRestApi.js.map +1 -0
- package/dist/cjs/SelectionAgent.d.ts +814 -0
- package/dist/cjs/SelectionAgent.d.ts.map +1 -0
- package/dist/cjs/SelectionAgent.js +1795 -0
- package/dist/cjs/SelectionAgent.js.map +1 -0
- package/dist/cjs/SentryAgent.d.ts +113 -0
- package/dist/cjs/SentryAgent.d.ts.map +1 -0
- package/dist/cjs/SentryAgent.js +238 -0
- package/dist/cjs/SentryAgent.js.map +1 -0
- package/dist/cjs/SoApiConstants.d.ts +8 -0
- package/dist/cjs/SoApiConstants.d.ts.map +1 -0
- package/dist/cjs/SoApiConstants.js +12 -0
- package/dist/cjs/SoApiConstants.js.map +1 -0
- package/dist/cjs/TargetsAgent.d.ts +289 -0
- package/dist/cjs/TargetsAgent.d.ts.map +1 -0
- package/dist/cjs/TargetsAgent.js +728 -0
- package/dist/cjs/TargetsAgent.js.map +1 -0
- package/dist/cjs/TicketAgent.d.ts +802 -0
- package/dist/cjs/TicketAgent.d.ts.map +1 -0
- package/dist/cjs/TicketAgent.js +1865 -0
- package/dist/cjs/TicketAgent.js.map +1 -0
- package/dist/cjs/TimeZoneAgent.d.ts +139 -0
- package/dist/cjs/TimeZoneAgent.d.ts.map +1 -0
- package/dist/cjs/TimeZoneAgent.js +348 -0
- package/dist/cjs/TimeZoneAgent.js.map +1 -0
- package/dist/cjs/TooltipsAgent.d.ts +36 -0
- package/dist/cjs/TooltipsAgent.d.ts.map +1 -0
- package/dist/cjs/TooltipsAgent.js +54 -0
- package/dist/cjs/TooltipsAgent.js.map +1 -0
- package/dist/cjs/UserAgent.d.ts +1260 -0
- package/dist/cjs/UserAgent.d.ts.map +1 -0
- package/dist/cjs/UserAgent.js +2978 -0
- package/dist/cjs/UserAgent.js.map +1 -0
- package/dist/cjs/UserDefinedFieldInfoAgent.d.ts +474 -0
- package/dist/cjs/UserDefinedFieldInfoAgent.d.ts.map +1 -0
- package/dist/cjs/UserDefinedFieldInfoAgent.js +1067 -0
- package/dist/cjs/UserDefinedFieldInfoAgent.js.map +1 -0
- package/dist/cjs/ViewStateAgent.d.ts +230 -0
- package/dist/cjs/ViewStateAgent.d.ts.map +1 -0
- package/dist/cjs/ViewStateAgent.js +518 -0
- package/dist/cjs/ViewStateAgent.js.map +1 -0
- package/dist/cjs/WebApi.d.ts +427 -0
- package/dist/cjs/WebApi.d.ts.map +1 -0
- package/dist/cjs/WebApi.js +656 -0
- package/dist/cjs/WebApi.js.map +1 -0
- package/dist/cjs/WebApiBase.d.ts +152 -0
- package/dist/cjs/WebApiBase.d.ts.map +1 -0
- package/dist/cjs/WebApiBase.js +442 -0
- package/dist/cjs/WebApiBase.js.map +1 -0
- package/dist/cjs/WebhookAgent.d.ts +102 -0
- package/dist/cjs/WebhookAgent.d.ts.map +1 -0
- package/dist/cjs/WebhookAgent.js +245 -0
- package/dist/cjs/WebhookAgent.js.map +1 -0
- package/dist/cjs/WorkflowAgent.d.ts +250 -0
- package/dist/cjs/WorkflowAgent.d.ts.map +1 -0
- package/dist/cjs/WorkflowAgent.js +763 -0
- package/dist/cjs/WorkflowAgent.js.map +1 -0
- package/dist/cjs/package.json +1 -0
- package/dist/esm/AIAgent.d.ts +265 -0
- package/dist/esm/AIAgent.d.ts.map +1 -0
- package/dist/esm/AIAgent.js +530 -0
- package/dist/esm/AIAgent.js.map +1 -0
- package/dist/esm/AppointmentAgent.d.ts +1539 -0
- package/dist/esm/AppointmentAgent.d.ts.map +1 -0
- package/dist/esm/AppointmentAgent.js +3358 -0
- package/dist/esm/AppointmentAgent.js.map +1 -0
- package/dist/esm/AppointmentRestApi.d.ts +46 -0
- package/dist/esm/AppointmentRestApi.d.ts.map +1 -0
- package/dist/esm/AppointmentRestApi.js +163 -0
- package/dist/esm/AppointmentRestApi.js.map +1 -0
- package/dist/esm/ArchiveAgent.d.ts +582 -0
- package/dist/esm/ArchiveAgent.d.ts.map +1 -0
- package/dist/esm/ArchiveAgent.js +1130 -0
- package/dist/esm/ArchiveAgent.js.map +1 -0
- package/dist/esm/AssociateAgent.d.ts +109 -0
- package/dist/esm/AssociateAgent.d.ts.map +1 -0
- package/dist/esm/AssociateAgent.js +252 -0
- package/dist/esm/AssociateAgent.js.map +1 -0
- package/dist/esm/AudienceAgent.d.ts +359 -0
- package/dist/esm/AudienceAgent.d.ts.map +1 -0
- package/dist/esm/AudienceAgent.js +883 -0
- package/dist/esm/AudienceAgent.js.map +1 -0
- package/dist/esm/AxiosCacheHandler.d.ts +20 -0
- package/dist/esm/AxiosCacheHandler.d.ts.map +1 -0
- package/dist/esm/AxiosCacheHandler.js +64 -0
- package/dist/esm/AxiosCacheHandler.js.map +1 -0
- package/dist/esm/BLOBAgent.d.ts +538 -0
- package/dist/esm/BLOBAgent.d.ts.map +1 -0
- package/dist/esm/BLOBAgent.js +1359 -0
- package/dist/esm/BLOBAgent.js.map +1 -0
- package/dist/esm/Base64.d.ts +4 -0
- package/dist/esm/Base64.d.ts.map +1 -0
- package/dist/esm/Base64.js +228 -0
- package/dist/esm/Base64.js.map +1 -0
- package/dist/esm/BatchAgent.d.ts +252 -0
- package/dist/esm/BatchAgent.d.ts.map +1 -0
- package/dist/esm/BatchAgent.js +517 -0
- package/dist/esm/BatchAgent.js.map +1 -0
- package/dist/esm/BulkUpdateAgent.d.ts +144 -0
- package/dist/esm/BulkUpdateAgent.d.ts.map +1 -0
- package/dist/esm/BulkUpdateAgent.js +283 -0
- package/dist/esm/BulkUpdateAgent.js.map +1 -0
- package/dist/esm/CRMScriptAgent.d.ts +330 -0
- package/dist/esm/CRMScriptAgent.d.ts.map +1 -0
- package/dist/esm/CRMScriptAgent.js +794 -0
- package/dist/esm/CRMScriptAgent.js.map +1 -0
- package/dist/esm/Carriers.d.ts +36976 -0
- package/dist/esm/Carriers.d.ts.map +1 -0
- package/dist/esm/Carriers.js +6 -0
- package/dist/esm/Carriers.js.map +1 -0
- package/dist/esm/ChatAgent.d.ts +366 -0
- package/dist/esm/ChatAgent.d.ts.map +1 -0
- package/dist/esm/ChatAgent.js +914 -0
- package/dist/esm/ChatAgent.js.map +1 -0
- package/dist/esm/ConfigurationAgent.d.ts +534 -0
- package/dist/esm/ConfigurationAgent.d.ts.map +1 -0
- package/dist/esm/ConfigurationAgent.js +1424 -0
- package/dist/esm/ConfigurationAgent.js.map +1 -0
- package/dist/esm/ContactAgent.d.ts +415 -0
- package/dist/esm/ContactAgent.d.ts.map +1 -0
- package/dist/esm/ContactAgent.js +1000 -0
- package/dist/esm/ContactAgent.js.map +1 -0
- package/dist/esm/ContactRestApi.d.ts +46 -0
- package/dist/esm/ContactRestApi.d.ts.map +1 -0
- package/dist/esm/ContactRestApi.js +163 -0
- package/dist/esm/ContactRestApi.js.map +1 -0
- package/dist/esm/Converters.d.ts +1359 -0
- package/dist/esm/Converters.d.ts.map +1 -0
- package/dist/esm/Converters.js +17609 -0
- package/dist/esm/Converters.js.map +1 -0
- package/dist/esm/CustomerServiceAgent.d.ts +447 -0
- package/dist/esm/CustomerServiceAgent.d.ts.map +1 -0
- package/dist/esm/CustomerServiceAgent.js +1118 -0
- package/dist/esm/CustomerServiceAgent.js.map +1 -0
- package/dist/esm/DashAgent.d.ts +370 -0
- package/dist/esm/DashAgent.d.ts.map +1 -0
- package/dist/esm/DashAgent.js +1023 -0
- package/dist/esm/DashAgent.js.map +1 -0
- package/dist/esm/DashboardAgent.d.ts +163 -0
- package/dist/esm/DashboardAgent.d.ts.map +1 -0
- package/dist/esm/DashboardAgent.js +431 -0
- package/dist/esm/DashboardAgent.js.map +1 -0
- package/dist/esm/DatabaseAgent.d.ts +35 -0
- package/dist/esm/DatabaseAgent.d.ts.map +1 -0
- package/dist/esm/DatabaseAgent.js +65 -0
- package/dist/esm/DatabaseAgent.js.map +1 -0
- package/dist/esm/DatabaseTableAgent.d.ts +155 -0
- package/dist/esm/DatabaseTableAgent.d.ts.map +1 -0
- package/dist/esm/DatabaseTableAgent.js +294 -0
- package/dist/esm/DatabaseTableAgent.js.map +1 -0
- package/dist/esm/Day_js.d.ts +4 -0
- package/dist/esm/Day_js.d.ts.map +1 -0
- package/dist/esm/Day_js.js +38 -0
- package/dist/esm/Day_js.js.map +1 -0
- package/dist/esm/DiagnosticsAgent.d.ts +200 -0
- package/dist/esm/DiagnosticsAgent.d.ts.map +1 -0
- package/dist/esm/DiagnosticsAgent.js +475 -0
- package/dist/esm/DiagnosticsAgent.js.map +1 -0
- package/dist/esm/DocumentAgent.d.ts +1345 -0
- package/dist/esm/DocumentAgent.d.ts.map +1 -0
- package/dist/esm/DocumentAgent.js +3053 -0
- package/dist/esm/DocumentAgent.js.map +1 -0
- package/dist/esm/DocumentMigrationAgent.d.ts +145 -0
- package/dist/esm/DocumentMigrationAgent.d.ts.map +1 -0
- package/dist/esm/DocumentMigrationAgent.js +292 -0
- package/dist/esm/DocumentMigrationAgent.js.map +1 -0
- package/dist/esm/DocumentRestApi.d.ts +46 -0
- package/dist/esm/DocumentRestApi.d.ts.map +1 -0
- package/dist/esm/DocumentRestApi.js +163 -0
- package/dist/esm/DocumentRestApi.js.map +1 -0
- package/dist/esm/EMailAgent.d.ts +1417 -0
- package/dist/esm/EMailAgent.d.ts.map +1 -0
- package/dist/esm/EMailAgent.js +3197 -0
- package/dist/esm/EMailAgent.js.map +1 -0
- package/dist/esm/Enums.d.ts +6083 -0
- package/dist/esm/Enums.d.ts.map +1 -0
- package/dist/esm/Enums.js +6264 -0
- package/dist/esm/Enums.js.map +1 -0
- package/dist/esm/ErpSyncAgent.d.ts +725 -0
- package/dist/esm/ErpSyncAgent.d.ts.map +1 -0
- package/dist/esm/ErpSyncAgent.js +1596 -0
- package/dist/esm/ErpSyncAgent.js.map +1 -0
- package/dist/esm/FavouriteAgent.d.ts +208 -0
- package/dist/esm/FavouriteAgent.d.ts.map +1 -0
- package/dist/esm/FavouriteAgent.js +402 -0
- package/dist/esm/FavouriteAgent.js.map +1 -0
- package/dist/esm/FindAgent.d.ts +688 -0
- package/dist/esm/FindAgent.d.ts.map +1 -0
- package/dist/esm/FindAgent.js +1332 -0
- package/dist/esm/FindAgent.js.map +1 -0
- package/dist/esm/ForeignSystemAgent.d.ts +478 -0
- package/dist/esm/ForeignSystemAgent.d.ts.map +1 -0
- package/dist/esm/ForeignSystemAgent.js +1017 -0
- package/dist/esm/ForeignSystemAgent.js.map +1 -0
- package/dist/esm/FreeTextAgent.d.ts +172 -0
- package/dist/esm/FreeTextAgent.d.ts.map +1 -0
- package/dist/esm/FreeTextAgent.js +363 -0
- package/dist/esm/FreeTextAgent.js.map +1 -0
- package/dist/esm/ImportAgent.d.ts +92 -0
- package/dist/esm/ImportAgent.d.ts.map +1 -0
- package/dist/esm/ImportAgent.js +159 -0
- package/dist/esm/ImportAgent.js.map +1 -0
- package/dist/esm/LicenseAgent.d.ts +298 -0
- package/dist/esm/LicenseAgent.d.ts.map +1 -0
- package/dist/esm/LicenseAgent.js +634 -0
- package/dist/esm/LicenseAgent.js.map +1 -0
- package/dist/esm/ListAgent.d.ts +2423 -0
- package/dist/esm/ListAgent.d.ts.map +1 -0
- package/dist/esm/ListAgent.js +7808 -0
- package/dist/esm/ListAgent.js.map +1 -0
- package/dist/esm/MDOAgent.d.ts +214 -0
- package/dist/esm/MDOAgent.d.ts.map +1 -0
- package/dist/esm/MDOAgent.js +425 -0
- package/dist/esm/MDOAgent.js.map +1 -0
- package/dist/esm/MarketingAgent.d.ts +170 -0
- package/dist/esm/MarketingAgent.d.ts.map +1 -0
- package/dist/esm/MarketingAgent.js +565 -0
- package/dist/esm/MarketingAgent.js.map +1 -0
- package/dist/esm/MessagingAgent.d.ts +111 -0
- package/dist/esm/MessagingAgent.d.ts.map +1 -0
- package/dist/esm/MessagingAgent.js +212 -0
- package/dist/esm/MessagingAgent.js.map +1 -0
- package/dist/esm/NavigatorAgent.d.ts +40 -0
- package/dist/esm/NavigatorAgent.d.ts.map +1 -0
- package/dist/esm/NavigatorAgent.js +94 -0
- package/dist/esm/NavigatorAgent.js.map +1 -0
- package/dist/esm/NumberAllocationAgent.d.ts +72 -0
- package/dist/esm/NumberAllocationAgent.d.ts.map +1 -0
- package/dist/esm/NumberAllocationAgent.js +194 -0
- package/dist/esm/NumberAllocationAgent.js.map +1 -0
- package/dist/esm/PersonAgent.d.ts +774 -0
- package/dist/esm/PersonAgent.d.ts.map +1 -0
- package/dist/esm/PersonAgent.js +1809 -0
- package/dist/esm/PersonAgent.js.map +1 -0
- package/dist/esm/PersonRestApi.d.ts +46 -0
- package/dist/esm/PersonRestApi.d.ts.map +1 -0
- package/dist/esm/PersonRestApi.js +163 -0
- package/dist/esm/PersonRestApi.js.map +1 -0
- package/dist/esm/PhoneListAgent.d.ts +126 -0
- package/dist/esm/PhoneListAgent.d.ts.map +1 -0
- package/dist/esm/PhoneListAgent.js +264 -0
- package/dist/esm/PhoneListAgent.js.map +1 -0
- package/dist/esm/PocketAgent.d.ts +218 -0
- package/dist/esm/PocketAgent.d.ts.map +1 -0
- package/dist/esm/PocketAgent.js +446 -0
- package/dist/esm/PocketAgent.js.map +1 -0
- package/dist/esm/PreferenceAgent.d.ts +497 -0
- package/dist/esm/PreferenceAgent.d.ts.map +1 -0
- package/dist/esm/PreferenceAgent.js +1189 -0
- package/dist/esm/PreferenceAgent.js.map +1 -0
- package/dist/esm/PreviewsAgent.d.ts +36 -0
- package/dist/esm/PreviewsAgent.d.ts.map +1 -0
- package/dist/esm/PreviewsAgent.js +49 -0
- package/dist/esm/PreviewsAgent.js.map +1 -0
- package/dist/esm/ProjectAgent.d.ts +558 -0
- package/dist/esm/ProjectAgent.d.ts.map +1 -0
- package/dist/esm/ProjectAgent.js +1477 -0
- package/dist/esm/ProjectAgent.js.map +1 -0
- package/dist/esm/ProjectRestApi.d.ts +46 -0
- package/dist/esm/ProjectRestApi.d.ts.map +1 -0
- package/dist/esm/ProjectRestApi.js +163 -0
- package/dist/esm/ProjectRestApi.js.map +1 -0
- package/dist/esm/QuoteAgent.d.ts +1415 -0
- package/dist/esm/QuoteAgent.d.ts.map +1 -0
- package/dist/esm/QuoteAgent.js +3219 -0
- package/dist/esm/QuoteAgent.js.map +1 -0
- package/dist/esm/RelationAgent.d.ts +61 -0
- package/dist/esm/RelationAgent.d.ts.map +1 -0
- package/dist/esm/RelationAgent.js +127 -0
- package/dist/esm/RelationAgent.js.map +1 -0
- package/dist/esm/ReplicationAgent.d.ts +77 -0
- package/dist/esm/ReplicationAgent.d.ts.map +1 -0
- package/dist/esm/ReplicationAgent.js +218 -0
- package/dist/esm/ReplicationAgent.js.map +1 -0
- package/dist/esm/ReportAgent.d.ts +144 -0
- package/dist/esm/ReportAgent.d.ts.map +1 -0
- package/dist/esm/ReportAgent.js +375 -0
- package/dist/esm/ReportAgent.js.map +1 -0
- package/dist/esm/ResourceAgent.d.ts +105 -0
- package/dist/esm/ResourceAgent.d.ts.map +1 -0
- package/dist/esm/ResourceAgent.js +191 -0
- package/dist/esm/ResourceAgent.js.map +1 -0
- package/dist/esm/SaintAgent.d.ts +157 -0
- package/dist/esm/SaintAgent.d.ts.map +1 -0
- package/dist/esm/SaintAgent.js +397 -0
- package/dist/esm/SaintAgent.js.map +1 -0
- package/dist/esm/SaleAgent.d.ts +477 -0
- package/dist/esm/SaleAgent.d.ts.map +1 -0
- package/dist/esm/SaleAgent.js +1177 -0
- package/dist/esm/SaleAgent.js.map +1 -0
- package/dist/esm/SaleRestApi.d.ts +46 -0
- package/dist/esm/SaleRestApi.d.ts.map +1 -0
- package/dist/esm/SaleRestApi.js +163 -0
- package/dist/esm/SaleRestApi.js.map +1 -0
- package/dist/esm/SelectionAgent.d.ts +814 -0
- package/dist/esm/SelectionAgent.d.ts.map +1 -0
- package/dist/esm/SelectionAgent.js +1790 -0
- package/dist/esm/SelectionAgent.js.map +1 -0
- package/dist/esm/SentryAgent.d.ts +113 -0
- package/dist/esm/SentryAgent.d.ts.map +1 -0
- package/dist/esm/SentryAgent.js +233 -0
- package/dist/esm/SentryAgent.js.map +1 -0
- package/dist/esm/SoApiConstants.d.ts +8 -0
- package/dist/esm/SoApiConstants.d.ts.map +1 -0
- package/dist/esm/SoApiConstants.js +9 -0
- package/dist/esm/SoApiConstants.js.map +1 -0
- package/dist/esm/TargetsAgent.d.ts +289 -0
- package/dist/esm/TargetsAgent.d.ts.map +1 -0
- package/dist/esm/TargetsAgent.js +723 -0
- package/dist/esm/TargetsAgent.js.map +1 -0
- package/dist/esm/TicketAgent.d.ts +802 -0
- package/dist/esm/TicketAgent.d.ts.map +1 -0
- package/dist/esm/TicketAgent.js +1860 -0
- package/dist/esm/TicketAgent.js.map +1 -0
- package/dist/esm/TimeZoneAgent.d.ts +139 -0
- package/dist/esm/TimeZoneAgent.d.ts.map +1 -0
- package/dist/esm/TimeZoneAgent.js +343 -0
- package/dist/esm/TimeZoneAgent.js.map +1 -0
- package/dist/esm/TooltipsAgent.d.ts +36 -0
- package/dist/esm/TooltipsAgent.d.ts.map +1 -0
- package/dist/esm/TooltipsAgent.js +49 -0
- package/dist/esm/TooltipsAgent.js.map +1 -0
- package/dist/esm/UserAgent.d.ts +1260 -0
- package/dist/esm/UserAgent.d.ts.map +1 -0
- package/dist/esm/UserAgent.js +2973 -0
- package/dist/esm/UserAgent.js.map +1 -0
- package/dist/esm/UserDefinedFieldInfoAgent.d.ts +474 -0
- package/dist/esm/UserDefinedFieldInfoAgent.d.ts.map +1 -0
- package/dist/esm/UserDefinedFieldInfoAgent.js +1062 -0
- package/dist/esm/UserDefinedFieldInfoAgent.js.map +1 -0
- package/dist/esm/ViewStateAgent.d.ts +230 -0
- package/dist/esm/ViewStateAgent.d.ts.map +1 -0
- package/dist/esm/ViewStateAgent.js +513 -0
- package/dist/esm/ViewStateAgent.js.map +1 -0
- package/dist/esm/WebApi.d.ts +427 -0
- package/dist/esm/WebApi.d.ts.map +1 -0
- package/dist/esm/WebApi.js +649 -0
- package/dist/esm/WebApi.js.map +1 -0
- package/dist/esm/WebApiBase.d.ts +152 -0
- package/dist/esm/WebApiBase.d.ts.map +1 -0
- package/dist/esm/WebApiBase.js +437 -0
- package/dist/esm/WebApiBase.js.map +1 -0
- package/dist/esm/WebhookAgent.d.ts +102 -0
- package/dist/esm/WebhookAgent.d.ts.map +1 -0
- package/dist/esm/WebhookAgent.js +240 -0
- package/dist/esm/WebhookAgent.js.map +1 -0
- package/dist/esm/WorkflowAgent.d.ts +250 -0
- package/dist/esm/WorkflowAgent.d.ts.map +1 -0
- package/dist/esm/WorkflowAgent.js +758 -0
- package/dist/esm/WorkflowAgent.js.map +1 -0
- package/dist/esm/package.json +1 -0
- package/examples-js/hello.js +12 -0
- package/examples-ts/hello.ts +8 -0
- package/package.json +89 -0
- package/scripts/setVersion.js +46 -0
- package/src/AIAgent.ts +928 -0
- package/src/AppointmentAgent.ts +5573 -0
- package/src/AppointmentRestApi.ts +225 -0
- package/src/ArchiveAgent.ts +1950 -0
- package/src/AssociateAgent.ts +422 -0
- package/src/AudienceAgent.ts +1430 -0
- package/src/AxiosCacheHandler.ts +74 -0
- package/src/BLOBAgent.ts +2214 -0
- package/src/Base64.ts +285 -0
- package/src/BatchAgent.ts +910 -0
- package/src/BulkUpdateAgent.ts +504 -0
- package/src/CRMScriptAgent.ts +1276 -0
- package/src/Carriers.ts +49791 -0
- package/src/ChatAgent.ts +1422 -0
- package/src/ConfigurationAgent.ts +2138 -0
- package/src/ContactAgent.ts +1586 -0
- package/src/ContactRestApi.ts +235 -0
- package/src/Converters.ts +21633 -0
- package/src/CustomerServiceAgent.ts +1734 -0
- package/src/DashAgent.ts +1504 -0
- package/src/DashboardAgent.ts +658 -0
- package/src/DatabaseAgent.ts +120 -0
- package/src/DatabaseTableAgent.ts +534 -0
- package/src/Day_js.ts +41 -0
- package/src/DiagnosticsAgent.ts +744 -0
- package/src/DocumentAgent.ts +5018 -0
- package/src/DocumentMigrationAgent.ts +494 -0
- package/src/DocumentRestApi.ts +259 -0
- package/src/EMailAgent.ts +5210 -0
- package/src/Enums.ts +6438 -0
- package/src/ErpSyncAgent.ts +2658 -0
- package/src/FavouriteAgent.ts +720 -0
- package/src/FindAgent.ts +2330 -0
- package/src/ForeignSystemAgent.ts +1710 -0
- package/src/FreeTextAgent.ts +626 -0
- package/src/ImportAgent.ts +304 -0
- package/src/LicenseAgent.ts +1088 -0
- package/src/ListAgent.ts +10894 -0
- package/src/MDOAgent.ts +748 -0
- package/src/MarketingAgent.ts +776 -0
- package/src/MessagingAgent.ts +384 -0
- package/src/NavigatorAgent.ts +164 -0
- package/src/NumberAllocationAgent.ts +296 -0
- package/src/PersonAgent.ts +2919 -0
- package/src/PersonRestApi.ts +239 -0
- package/src/PhoneListAgent.ts +458 -0
- package/src/PocketAgent.ts +780 -0
- package/src/PreferenceAgent.ts +1900 -0
- package/src/PreviewsAgent.ts +116 -0
- package/src/ProjectAgent.ts +2275 -0
- package/src/ProjectRestApi.ts +239 -0
- package/src/QuoteAgent.ts +5294 -0
- package/src/RelationAgent.ts +220 -0
- package/src/ReplicationAgent.ts +325 -0
- package/src/ReportAgent.ts +575 -0
- package/src/ResourceAgent.ts +358 -0
- package/src/SaintAgent.ts +601 -0
- package/src/SaleAgent.ts +1862 -0
- package/src/SaleRestApi.ts +233 -0
- package/src/SelectionAgent.ts +2980 -0
- package/src/SentryAgent.ts +406 -0
- package/src/SoApiConstants.ts +8 -0
- package/src/TargetsAgent.ts +1104 -0
- package/src/TicketAgent.ts +3032 -0
- package/src/TimeZoneAgent.ts +528 -0
- package/src/TooltipsAgent.ts +116 -0
- package/src/UserAgent.ts +4798 -0
- package/src/UserDefinedFieldInfoAgent.ts +1764 -0
- package/src/ViewStateAgent.ts +858 -0
- package/src/WebApi.ts +908 -0
- package/src/WebApiBase.ts +562 -0
- package/src/WebhookAgent.ts +388 -0
- package/src/WorkflowAgent.ts +1054 -0
- package/tsconfig.esm.json +8 -0
- package/tsconfig.jest.json +12 -0
- package/tsconfig.json +35 -0
|
@@ -0,0 +1,1364 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// <auto-generated>
|
|
3
|
+
// SuperOffice Code Generator
|
|
4
|
+
// modelling\templates\servicestswebapi\tswebapiagents.tt
|
|
5
|
+
// </auto-generated>
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.BLOBAgent = void 0;
|
|
8
|
+
const tslib_1 = require("tslib");
|
|
9
|
+
const base = tslib_1.__importStar(require("./WebApiBase.js"));
|
|
10
|
+
const converters = tslib_1.__importStar(require("./Converters.js"));
|
|
11
|
+
const Base64_js_1 = require("./Base64.js");
|
|
12
|
+
/**
|
|
13
|
+
* Collection of all services that works with binary objects (BLOBS), e.g. Images and documents.
|
|
14
|
+
*/
|
|
15
|
+
class BLOBAgent extends base.WebApiBase {
|
|
16
|
+
constructor(baseUrlOrOptions, langOrconfigOrRM, langOrResourceOrRM, cultureCode) {
|
|
17
|
+
const options = base.WebApiBase.FigureOutOptions(baseUrlOrOptions, langOrconfigOrRM, langOrResourceOrRM, cultureCode);
|
|
18
|
+
options.basePath = "v1/Agents/BLOB/";
|
|
19
|
+
super(options);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Set default values into a new BlobEntity.
|
|
23
|
+
* NetServer calculates default values on the entity, which is required when creating/storing a new instance
|
|
24
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
25
|
+
* @returns A blank entity.
|
|
26
|
+
*/
|
|
27
|
+
async createDefaultBlobEntityAsync(options) {
|
|
28
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
29
|
+
base.WebApiBase.SetPending(options);
|
|
30
|
+
return new Promise(async (resolve, reject) => {
|
|
31
|
+
try {
|
|
32
|
+
const response = await this._axios.post("CreateDefaultBlobEntity", null, config);
|
|
33
|
+
base.WebApiBase.SetCompleted(options);
|
|
34
|
+
const res = converters.Create_BlobEntity_From(response.data);
|
|
35
|
+
resolve(res);
|
|
36
|
+
}
|
|
37
|
+
catch (err) {
|
|
38
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
39
|
+
reject(err);
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
/*
|
|
44
|
+
* Replace the existing BlobEntity or creates a new BlobEntity if the id parameter is empty
|
|
45
|
+
* @param entity - The BlobEntity to be saved.
|
|
46
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
47
|
+
* @returns New or updated BlobEntity
|
|
48
|
+
*/
|
|
49
|
+
async saveBlobEntityAsync(entity, options) {
|
|
50
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
51
|
+
base.WebApiBase.SetPending(options);
|
|
52
|
+
return new Promise(async (resolve, reject) => {
|
|
53
|
+
try {
|
|
54
|
+
const response = await this._axios.post("SaveBlobEntity", entity, config);
|
|
55
|
+
base.WebApiBase.SetCompleted(options);
|
|
56
|
+
const res = converters.Create_BlobEntity_From(response.data);
|
|
57
|
+
resolve(res);
|
|
58
|
+
}
|
|
59
|
+
catch (err) {
|
|
60
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
61
|
+
reject(err);
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
/*
|
|
66
|
+
* Deletes the BlobEntity
|
|
67
|
+
* @param BlobEntityId - The id of the BlobEntity to be deleted.
|
|
68
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
69
|
+
*/
|
|
70
|
+
async deleteBlobEntityAsync(BlobEntityId, options) {
|
|
71
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
72
|
+
base.WebApiBase.SetPending(options);
|
|
73
|
+
return new Promise(async (resolve, reject) => {
|
|
74
|
+
try {
|
|
75
|
+
const response = await this._axios.post("DeleteBlobEntity?BlobEntityId=" + BlobEntityId, null, config);
|
|
76
|
+
base.WebApiBase.SetCompleted(options);
|
|
77
|
+
const res = response.data;
|
|
78
|
+
resolve(res);
|
|
79
|
+
}
|
|
80
|
+
catch (err) {
|
|
81
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
82
|
+
reject(err);
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
/*
|
|
87
|
+
* Gets a BlobEntity object.
|
|
88
|
+
* @param blobEntityId - The primary key.
|
|
89
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
90
|
+
* @returns A single BlobEntity
|
|
91
|
+
*/
|
|
92
|
+
async getBlobEntityAsync(blobEntityId, options) {
|
|
93
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
94
|
+
base.WebApiBase.SetPending(options);
|
|
95
|
+
return new Promise(async (resolve, reject) => {
|
|
96
|
+
try {
|
|
97
|
+
const response = await this._axios.post("GetBlobEntity?blobEntityId=" + blobEntityId, null, config);
|
|
98
|
+
base.WebApiBase.SetCompleted(options);
|
|
99
|
+
const res = converters.Create_BlobEntity_From(response.data);
|
|
100
|
+
resolve(res);
|
|
101
|
+
}
|
|
102
|
+
catch (err) {
|
|
103
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
104
|
+
reject(err);
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
async _setBlobStreamAsync(request, options) {
|
|
109
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
110
|
+
base.WebApiBase.SetPending(options);
|
|
111
|
+
return new Promise(async (resolve, reject) => {
|
|
112
|
+
try {
|
|
113
|
+
config.baseURL = this._options.baseUrl;
|
|
114
|
+
const response = await this._axios.post("SetBlobStream", request, config);
|
|
115
|
+
base.WebApiBase.SetCompleted(options);
|
|
116
|
+
const res = response.data;
|
|
117
|
+
resolve(res);
|
|
118
|
+
}
|
|
119
|
+
catch (err) {
|
|
120
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
121
|
+
reject(err);
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
async setBlobStreamAsync(blobEntityId, stream, webapi_options) {
|
|
126
|
+
let _request = null;
|
|
127
|
+
let _options = null;
|
|
128
|
+
const first = blobEntityId;
|
|
129
|
+
if (typeof (first) === "object" && first && (typeof (first.blobEntityId) != 'undefined' || typeof (first.stream) != 'undefined')) {
|
|
130
|
+
_request = blobEntityId;
|
|
131
|
+
_options = stream;
|
|
132
|
+
}
|
|
133
|
+
else {
|
|
134
|
+
_request = {
|
|
135
|
+
blobEntityId: blobEntityId,
|
|
136
|
+
stream: stream,
|
|
137
|
+
};
|
|
138
|
+
_options = webapi_options;
|
|
139
|
+
}
|
|
140
|
+
_request.stream = (0, Base64_js_1.ToBase64)(_request.stream);
|
|
141
|
+
return this._setBlobStreamAsync(_request, _options);
|
|
142
|
+
}
|
|
143
|
+
async _getBlobStreamAsync(request, options) {
|
|
144
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options) || {};
|
|
145
|
+
base.WebApiBase.SetPending(options);
|
|
146
|
+
return new Promise(async (resolve, reject) => {
|
|
147
|
+
try {
|
|
148
|
+
if (!options || options.returnBlobAs == base.ReturnBlobType.AsArrayBuffer) {
|
|
149
|
+
config.responseType = "arraybuffer";
|
|
150
|
+
config.headers = config.headers || {};
|
|
151
|
+
config.headers["Accept"] = "application/octet-stream";
|
|
152
|
+
}
|
|
153
|
+
config.baseURL = this._options.baseUrl;
|
|
154
|
+
const response = await this._axios.post("GetBlobStream", request, config);
|
|
155
|
+
base.WebApiBase.SetCompleted(options);
|
|
156
|
+
let res = null;
|
|
157
|
+
if (options && options.returnBlobAs != base.ReturnBlobType.AsArrayBuffer) {
|
|
158
|
+
res = response.data;
|
|
159
|
+
if (options.returnBlobAs == base.ReturnBlobType.AsString) {
|
|
160
|
+
res = (0, Base64_js_1.FromBase64ToString)(res);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
res = response.data;
|
|
165
|
+
}
|
|
166
|
+
resolve(res);
|
|
167
|
+
}
|
|
168
|
+
catch (err) {
|
|
169
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
170
|
+
reject(err);
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
async getBlobStreamAsync(blobEntityId, webapi_options) {
|
|
175
|
+
let _request = null;
|
|
176
|
+
let _options = null;
|
|
177
|
+
const first = blobEntityId;
|
|
178
|
+
if (typeof (first) === "object" && first && (typeof (first.blobEntityId) != 'undefined')) {
|
|
179
|
+
_request = blobEntityId;
|
|
180
|
+
_options = webapi_options;
|
|
181
|
+
}
|
|
182
|
+
else {
|
|
183
|
+
_request = {
|
|
184
|
+
blobEntityId: blobEntityId,
|
|
185
|
+
};
|
|
186
|
+
_options = webapi_options;
|
|
187
|
+
}
|
|
188
|
+
return this._getBlobStreamAsync(_request, _options);
|
|
189
|
+
}
|
|
190
|
+
async _getProjectImageAsync(request, options) {
|
|
191
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options) || {};
|
|
192
|
+
base.WebApiBase.SetPending(options);
|
|
193
|
+
return new Promise(async (resolve, reject) => {
|
|
194
|
+
try {
|
|
195
|
+
if (!options || options.returnBlobAs == base.ReturnBlobType.AsArrayBuffer) {
|
|
196
|
+
config.responseType = "arraybuffer";
|
|
197
|
+
config.headers = config.headers || {};
|
|
198
|
+
config.headers["Accept"] = "application/octet-stream";
|
|
199
|
+
}
|
|
200
|
+
config.baseURL = this._options.baseUrl;
|
|
201
|
+
const response = await this._axios.post("GetProjectImage", request, config);
|
|
202
|
+
base.WebApiBase.SetCompleted(options);
|
|
203
|
+
let res = null;
|
|
204
|
+
if (options && options.returnBlobAs != base.ReturnBlobType.AsArrayBuffer) {
|
|
205
|
+
res = response.data;
|
|
206
|
+
if (options.returnBlobAs == base.ReturnBlobType.AsString) {
|
|
207
|
+
res = (0, Base64_js_1.FromBase64ToString)(res);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
else {
|
|
211
|
+
res = response.data;
|
|
212
|
+
}
|
|
213
|
+
resolve(res);
|
|
214
|
+
}
|
|
215
|
+
catch (err) {
|
|
216
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
217
|
+
reject(err);
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
async getProjectImageAsync(projectId, webapi_options) {
|
|
222
|
+
let _request = null;
|
|
223
|
+
let _options = null;
|
|
224
|
+
const first = projectId;
|
|
225
|
+
if (typeof (first) === "object" && first && (typeof (first.projectId) != 'undefined')) {
|
|
226
|
+
_request = projectId;
|
|
227
|
+
_options = webapi_options;
|
|
228
|
+
}
|
|
229
|
+
else {
|
|
230
|
+
_request = {
|
|
231
|
+
projectId: projectId,
|
|
232
|
+
};
|
|
233
|
+
_options = webapi_options;
|
|
234
|
+
}
|
|
235
|
+
return this._getProjectImageAsync(_request, _options);
|
|
236
|
+
}
|
|
237
|
+
async _getPersonImageAsync(request, options) {
|
|
238
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options) || {};
|
|
239
|
+
base.WebApiBase.SetPending(options);
|
|
240
|
+
return new Promise(async (resolve, reject) => {
|
|
241
|
+
try {
|
|
242
|
+
if (!options || options.returnBlobAs == base.ReturnBlobType.AsArrayBuffer) {
|
|
243
|
+
config.responseType = "arraybuffer";
|
|
244
|
+
config.headers = config.headers || {};
|
|
245
|
+
config.headers["Accept"] = "application/octet-stream";
|
|
246
|
+
}
|
|
247
|
+
config.baseURL = this._options.baseUrl;
|
|
248
|
+
const response = await this._axios.post("GetPersonImage", request, config);
|
|
249
|
+
base.WebApiBase.SetCompleted(options);
|
|
250
|
+
let res = null;
|
|
251
|
+
if (options && options.returnBlobAs != base.ReturnBlobType.AsArrayBuffer) {
|
|
252
|
+
res = response.data;
|
|
253
|
+
if (options.returnBlobAs == base.ReturnBlobType.AsString) {
|
|
254
|
+
res = (0, Base64_js_1.FromBase64ToString)(res);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
else {
|
|
258
|
+
res = response.data;
|
|
259
|
+
}
|
|
260
|
+
resolve(res);
|
|
261
|
+
}
|
|
262
|
+
catch (err) {
|
|
263
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
264
|
+
reject(err);
|
|
265
|
+
}
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
async getPersonImageAsync(personId, webapi_options) {
|
|
269
|
+
let _request = null;
|
|
270
|
+
let _options = null;
|
|
271
|
+
const first = personId;
|
|
272
|
+
if (typeof (first) === "object" && first && (typeof (first.personId) != 'undefined')) {
|
|
273
|
+
_request = personId;
|
|
274
|
+
_options = webapi_options;
|
|
275
|
+
}
|
|
276
|
+
else {
|
|
277
|
+
_request = {
|
|
278
|
+
personId: personId,
|
|
279
|
+
};
|
|
280
|
+
_options = webapi_options;
|
|
281
|
+
}
|
|
282
|
+
return this._getPersonImageAsync(_request, _options);
|
|
283
|
+
}
|
|
284
|
+
async _setProjectImageAsync(request, options) {
|
|
285
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
286
|
+
base.WebApiBase.SetPending(options);
|
|
287
|
+
return new Promise(async (resolve, reject) => {
|
|
288
|
+
try {
|
|
289
|
+
config.baseURL = this._options.baseUrl;
|
|
290
|
+
const response = await this._axios.post("SetProjectImage", request, config);
|
|
291
|
+
base.WebApiBase.SetCompleted(options);
|
|
292
|
+
const res = response.data;
|
|
293
|
+
resolve(res);
|
|
294
|
+
}
|
|
295
|
+
catch (err) {
|
|
296
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
297
|
+
reject(err);
|
|
298
|
+
}
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
async setProjectImageAsync(projectId, image, webapi_options) {
|
|
302
|
+
let _request = null;
|
|
303
|
+
let _options = null;
|
|
304
|
+
const first = projectId;
|
|
305
|
+
if (typeof (first) === "object" && first && (typeof (first.projectId) != 'undefined' || typeof (first.image) != 'undefined')) {
|
|
306
|
+
_request = projectId;
|
|
307
|
+
_options = image;
|
|
308
|
+
}
|
|
309
|
+
else {
|
|
310
|
+
_request = {
|
|
311
|
+
projectId: projectId,
|
|
312
|
+
image: image,
|
|
313
|
+
};
|
|
314
|
+
_options = webapi_options;
|
|
315
|
+
}
|
|
316
|
+
_request.image = (0, Base64_js_1.ToBase64)(_request.image);
|
|
317
|
+
return this._setProjectImageAsync(_request, _options);
|
|
318
|
+
}
|
|
319
|
+
async _setPersonImageAsync(request, options) {
|
|
320
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
321
|
+
base.WebApiBase.SetPending(options);
|
|
322
|
+
return new Promise(async (resolve, reject) => {
|
|
323
|
+
try {
|
|
324
|
+
config.baseURL = this._options.baseUrl;
|
|
325
|
+
const response = await this._axios.post("SetPersonImage", request, config);
|
|
326
|
+
base.WebApiBase.SetCompleted(options);
|
|
327
|
+
const res = response.data;
|
|
328
|
+
resolve(res);
|
|
329
|
+
}
|
|
330
|
+
catch (err) {
|
|
331
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
332
|
+
reject(err);
|
|
333
|
+
}
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
async setPersonImageAsync(personId, image, webapi_options) {
|
|
337
|
+
let _request = null;
|
|
338
|
+
let _options = null;
|
|
339
|
+
const first = personId;
|
|
340
|
+
if (typeof (first) === "object" && first && (typeof (first.personId) != 'undefined' || typeof (first.image) != 'undefined')) {
|
|
341
|
+
_request = personId;
|
|
342
|
+
_options = image;
|
|
343
|
+
}
|
|
344
|
+
else {
|
|
345
|
+
_request = {
|
|
346
|
+
personId: personId,
|
|
347
|
+
image: image,
|
|
348
|
+
};
|
|
349
|
+
_options = webapi_options;
|
|
350
|
+
}
|
|
351
|
+
_request.image = (0, Base64_js_1.ToBase64)(_request.image);
|
|
352
|
+
return this._setPersonImageAsync(_request, _options);
|
|
353
|
+
}
|
|
354
|
+
async _changeProjectImageAsync(request, options) {
|
|
355
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
356
|
+
base.WebApiBase.SetPending(options);
|
|
357
|
+
return new Promise(async (resolve, reject) => {
|
|
358
|
+
try {
|
|
359
|
+
config.baseURL = this._options.baseUrl;
|
|
360
|
+
const response = await this._axios.post("ChangeProjectImage", request, config);
|
|
361
|
+
base.WebApiBase.SetCompleted(options);
|
|
362
|
+
const res = response.data;
|
|
363
|
+
resolve(res);
|
|
364
|
+
}
|
|
365
|
+
catch (err) {
|
|
366
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
367
|
+
reject(err);
|
|
368
|
+
}
|
|
369
|
+
});
|
|
370
|
+
}
|
|
371
|
+
async changeProjectImageAsync(projectId, blobId, webapi_options) {
|
|
372
|
+
let _request = null;
|
|
373
|
+
let _options = null;
|
|
374
|
+
const first = projectId;
|
|
375
|
+
if (typeof (first) === "object" && first && (typeof (first.projectId) != 'undefined' || typeof (first.blobId) != 'undefined')) {
|
|
376
|
+
_request = projectId;
|
|
377
|
+
_options = blobId;
|
|
378
|
+
}
|
|
379
|
+
else {
|
|
380
|
+
_request = {
|
|
381
|
+
projectId: projectId,
|
|
382
|
+
blobId: blobId,
|
|
383
|
+
};
|
|
384
|
+
_options = webapi_options;
|
|
385
|
+
}
|
|
386
|
+
return this._changeProjectImageAsync(_request, _options);
|
|
387
|
+
}
|
|
388
|
+
async _saveProjectImageAsync(request, options) {
|
|
389
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
390
|
+
base.WebApiBase.SetPending(options);
|
|
391
|
+
return new Promise(async (resolve, reject) => {
|
|
392
|
+
try {
|
|
393
|
+
config.baseURL = this._options.baseUrl;
|
|
394
|
+
const response = await this._axios.post("SaveProjectImage", request, config);
|
|
395
|
+
base.WebApiBase.SetCompleted(options);
|
|
396
|
+
const res = response.data;
|
|
397
|
+
resolve(res);
|
|
398
|
+
}
|
|
399
|
+
catch (err) {
|
|
400
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
401
|
+
reject(err);
|
|
402
|
+
}
|
|
403
|
+
});
|
|
404
|
+
}
|
|
405
|
+
async saveProjectImageAsync(description, image, webapi_options) {
|
|
406
|
+
let _request = null;
|
|
407
|
+
let _options = null;
|
|
408
|
+
const first = description;
|
|
409
|
+
if (typeof (first) === "object" && first && (typeof (first.description) != 'undefined' || typeof (first.image) != 'undefined')) {
|
|
410
|
+
_request = description;
|
|
411
|
+
_options = image;
|
|
412
|
+
}
|
|
413
|
+
else {
|
|
414
|
+
_request = {
|
|
415
|
+
description: description,
|
|
416
|
+
image: image,
|
|
417
|
+
};
|
|
418
|
+
_options = webapi_options;
|
|
419
|
+
}
|
|
420
|
+
_request.image = (0, Base64_js_1.ToBase64)(_request.image);
|
|
421
|
+
return this._saveProjectImageAsync(_request, _options);
|
|
422
|
+
}
|
|
423
|
+
async _getBlobEntityOnProjectAsync(request, options) {
|
|
424
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
425
|
+
base.WebApiBase.SetPending(options);
|
|
426
|
+
return new Promise(async (resolve, reject) => {
|
|
427
|
+
try {
|
|
428
|
+
config.baseURL = this._options.baseUrl;
|
|
429
|
+
const response = await this._axios.post("GetBlobEntityOnProject", request, config);
|
|
430
|
+
base.WebApiBase.SetCompleted(options);
|
|
431
|
+
const res = converters.Create_BlobEntity_From(response.data);
|
|
432
|
+
resolve(res);
|
|
433
|
+
}
|
|
434
|
+
catch (err) {
|
|
435
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
436
|
+
reject(err);
|
|
437
|
+
}
|
|
438
|
+
});
|
|
439
|
+
}
|
|
440
|
+
async getBlobEntityOnProjectAsync(projectId, webapi_options) {
|
|
441
|
+
let _request = null;
|
|
442
|
+
let _options = null;
|
|
443
|
+
const first = projectId;
|
|
444
|
+
if (typeof (first) === "object" && first && (typeof (first.projectId) != 'undefined')) {
|
|
445
|
+
_request = projectId;
|
|
446
|
+
_options = webapi_options;
|
|
447
|
+
}
|
|
448
|
+
else {
|
|
449
|
+
_request = {
|
|
450
|
+
projectId: projectId,
|
|
451
|
+
};
|
|
452
|
+
_options = webapi_options;
|
|
453
|
+
}
|
|
454
|
+
return this._getBlobEntityOnProjectAsync(_request, _options);
|
|
455
|
+
}
|
|
456
|
+
async _getBlobEntityOnPersonAsync(request, options) {
|
|
457
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
458
|
+
base.WebApiBase.SetPending(options);
|
|
459
|
+
return new Promise(async (resolve, reject) => {
|
|
460
|
+
try {
|
|
461
|
+
config.baseURL = this._options.baseUrl;
|
|
462
|
+
const response = await this._axios.post("GetBlobEntityOnPerson", request, config);
|
|
463
|
+
base.WebApiBase.SetCompleted(options);
|
|
464
|
+
const res = converters.Create_BlobEntity_From(response.data);
|
|
465
|
+
resolve(res);
|
|
466
|
+
}
|
|
467
|
+
catch (err) {
|
|
468
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
469
|
+
reject(err);
|
|
470
|
+
}
|
|
471
|
+
});
|
|
472
|
+
}
|
|
473
|
+
async getBlobEntityOnPersonAsync(personId, webapi_options) {
|
|
474
|
+
let _request = null;
|
|
475
|
+
let _options = null;
|
|
476
|
+
const first = personId;
|
|
477
|
+
if (typeof (first) === "object" && first && (typeof (first.personId) != 'undefined')) {
|
|
478
|
+
_request = personId;
|
|
479
|
+
_options = webapi_options;
|
|
480
|
+
}
|
|
481
|
+
else {
|
|
482
|
+
_request = {
|
|
483
|
+
personId: personId,
|
|
484
|
+
};
|
|
485
|
+
_options = webapi_options;
|
|
486
|
+
}
|
|
487
|
+
return this._getBlobEntityOnPersonAsync(_request, _options);
|
|
488
|
+
}
|
|
489
|
+
async _getBlobEntityOnCountryAsync(request, options) {
|
|
490
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
491
|
+
base.WebApiBase.SetPending(options);
|
|
492
|
+
return new Promise(async (resolve, reject) => {
|
|
493
|
+
try {
|
|
494
|
+
config.baseURL = this._options.baseUrl;
|
|
495
|
+
const response = await this._axios.post("GetBlobEntityOnCountry", request, config);
|
|
496
|
+
base.WebApiBase.SetCompleted(options);
|
|
497
|
+
const res = converters.Create_BlobEntity_From(response.data);
|
|
498
|
+
resolve(res);
|
|
499
|
+
}
|
|
500
|
+
catch (err) {
|
|
501
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
502
|
+
reject(err);
|
|
503
|
+
}
|
|
504
|
+
});
|
|
505
|
+
}
|
|
506
|
+
async getBlobEntityOnCountryAsync(countryId, webapi_options) {
|
|
507
|
+
let _request = null;
|
|
508
|
+
let _options = null;
|
|
509
|
+
const first = countryId;
|
|
510
|
+
if (typeof (first) === "object" && first && (typeof (first.countryId) != 'undefined')) {
|
|
511
|
+
_request = countryId;
|
|
512
|
+
_options = webapi_options;
|
|
513
|
+
}
|
|
514
|
+
else {
|
|
515
|
+
_request = {
|
|
516
|
+
countryId: countryId,
|
|
517
|
+
};
|
|
518
|
+
_options = webapi_options;
|
|
519
|
+
}
|
|
520
|
+
return this._getBlobEntityOnCountryAsync(_request, _options);
|
|
521
|
+
}
|
|
522
|
+
async _getBlobEntityOnProductAsync(request, options) {
|
|
523
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
524
|
+
base.WebApiBase.SetPending(options);
|
|
525
|
+
return new Promise(async (resolve, reject) => {
|
|
526
|
+
try {
|
|
527
|
+
config.baseURL = this._options.baseUrl;
|
|
528
|
+
const response = await this._axios.post("GetBlobEntityOnProduct", request, config);
|
|
529
|
+
base.WebApiBase.SetCompleted(options);
|
|
530
|
+
const res = converters.Create_BlobEntity_From(response.data);
|
|
531
|
+
resolve(res);
|
|
532
|
+
}
|
|
533
|
+
catch (err) {
|
|
534
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
535
|
+
reject(err);
|
|
536
|
+
}
|
|
537
|
+
});
|
|
538
|
+
}
|
|
539
|
+
async getBlobEntityOnProductAsync(productId, webapi_options) {
|
|
540
|
+
let _request = null;
|
|
541
|
+
let _options = null;
|
|
542
|
+
const first = productId;
|
|
543
|
+
if (typeof (first) === "object" && first && (typeof (first.productId) != 'undefined')) {
|
|
544
|
+
_request = productId;
|
|
545
|
+
_options = webapi_options;
|
|
546
|
+
}
|
|
547
|
+
else {
|
|
548
|
+
_request = {
|
|
549
|
+
productId: productId,
|
|
550
|
+
};
|
|
551
|
+
_options = webapi_options;
|
|
552
|
+
}
|
|
553
|
+
return this._getBlobEntityOnProductAsync(_request, _options);
|
|
554
|
+
}
|
|
555
|
+
async _changePersonImageAsync(request, options) {
|
|
556
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
557
|
+
base.WebApiBase.SetPending(options);
|
|
558
|
+
return new Promise(async (resolve, reject) => {
|
|
559
|
+
try {
|
|
560
|
+
config.baseURL = this._options.baseUrl;
|
|
561
|
+
const response = await this._axios.post("ChangePersonImage", request, config);
|
|
562
|
+
base.WebApiBase.SetCompleted(options);
|
|
563
|
+
const res = response.data;
|
|
564
|
+
resolve(res);
|
|
565
|
+
}
|
|
566
|
+
catch (err) {
|
|
567
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
568
|
+
reject(err);
|
|
569
|
+
}
|
|
570
|
+
});
|
|
571
|
+
}
|
|
572
|
+
async changePersonImageAsync(personId, blobId, webapi_options) {
|
|
573
|
+
let _request = null;
|
|
574
|
+
let _options = null;
|
|
575
|
+
const first = personId;
|
|
576
|
+
if (typeof (first) === "object" && first && (typeof (first.personId) != 'undefined' || typeof (first.blobId) != 'undefined')) {
|
|
577
|
+
_request = personId;
|
|
578
|
+
_options = blobId;
|
|
579
|
+
}
|
|
580
|
+
else {
|
|
581
|
+
_request = {
|
|
582
|
+
personId: personId,
|
|
583
|
+
blobId: blobId,
|
|
584
|
+
};
|
|
585
|
+
_options = webapi_options;
|
|
586
|
+
}
|
|
587
|
+
return this._changePersonImageAsync(_request, _options);
|
|
588
|
+
}
|
|
589
|
+
async _saveImageStreamAsync(request, options) {
|
|
590
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
591
|
+
base.WebApiBase.SetPending(options);
|
|
592
|
+
return new Promise(async (resolve, reject) => {
|
|
593
|
+
try {
|
|
594
|
+
config.baseURL = this._options.baseUrl;
|
|
595
|
+
const response = await this._axios.post("SaveImageStream", request, config);
|
|
596
|
+
base.WebApiBase.SetCompleted(options);
|
|
597
|
+
const res = response.data;
|
|
598
|
+
resolve(res);
|
|
599
|
+
}
|
|
600
|
+
catch (err) {
|
|
601
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
602
|
+
reject(err);
|
|
603
|
+
}
|
|
604
|
+
});
|
|
605
|
+
}
|
|
606
|
+
async saveImageStreamAsync(type, image, description, webapi_options) {
|
|
607
|
+
let _request = null;
|
|
608
|
+
let _options = null;
|
|
609
|
+
const first = type;
|
|
610
|
+
if (typeof (first) === "object" && first && (typeof (first.type) != 'undefined' || typeof (first.image) != 'undefined' || typeof (first.description) != 'undefined')) {
|
|
611
|
+
_request = type;
|
|
612
|
+
_options = image;
|
|
613
|
+
}
|
|
614
|
+
else {
|
|
615
|
+
_request = {
|
|
616
|
+
type: type,
|
|
617
|
+
image: image,
|
|
618
|
+
description: description,
|
|
619
|
+
};
|
|
620
|
+
_options = webapi_options;
|
|
621
|
+
}
|
|
622
|
+
_request.image = (0, Base64_js_1.ToBase64)(_request.image);
|
|
623
|
+
return this._saveImageStreamAsync(_request, _options);
|
|
624
|
+
}
|
|
625
|
+
async _getProductImageAsync(request, options) {
|
|
626
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options) || {};
|
|
627
|
+
base.WebApiBase.SetPending(options);
|
|
628
|
+
return new Promise(async (resolve, reject) => {
|
|
629
|
+
try {
|
|
630
|
+
if (!options || options.returnBlobAs == base.ReturnBlobType.AsArrayBuffer) {
|
|
631
|
+
config.responseType = "arraybuffer";
|
|
632
|
+
config.headers = config.headers || {};
|
|
633
|
+
config.headers["Accept"] = "application/octet-stream";
|
|
634
|
+
}
|
|
635
|
+
config.baseURL = this._options.baseUrl;
|
|
636
|
+
const response = await this._axios.post("GetProductImage", request, config);
|
|
637
|
+
base.WebApiBase.SetCompleted(options);
|
|
638
|
+
let res = null;
|
|
639
|
+
if (options && options.returnBlobAs != base.ReturnBlobType.AsArrayBuffer) {
|
|
640
|
+
res = response.data;
|
|
641
|
+
if (options.returnBlobAs == base.ReturnBlobType.AsString) {
|
|
642
|
+
res = (0, Base64_js_1.FromBase64ToString)(res);
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
else {
|
|
646
|
+
res = response.data;
|
|
647
|
+
}
|
|
648
|
+
resolve(res);
|
|
649
|
+
}
|
|
650
|
+
catch (err) {
|
|
651
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
652
|
+
reject(err);
|
|
653
|
+
}
|
|
654
|
+
});
|
|
655
|
+
}
|
|
656
|
+
async getProductImageAsync(productId, webapi_options) {
|
|
657
|
+
let _request = null;
|
|
658
|
+
let _options = null;
|
|
659
|
+
const first = productId;
|
|
660
|
+
if (typeof (first) === "object" && first && (typeof (first.productId) != 'undefined')) {
|
|
661
|
+
_request = productId;
|
|
662
|
+
_options = webapi_options;
|
|
663
|
+
}
|
|
664
|
+
else {
|
|
665
|
+
_request = {
|
|
666
|
+
productId: productId,
|
|
667
|
+
};
|
|
668
|
+
_options = webapi_options;
|
|
669
|
+
}
|
|
670
|
+
return this._getProductImageAsync(_request, _options);
|
|
671
|
+
}
|
|
672
|
+
async _setProductImageAsync(request, options) {
|
|
673
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
674
|
+
base.WebApiBase.SetPending(options);
|
|
675
|
+
return new Promise(async (resolve, reject) => {
|
|
676
|
+
try {
|
|
677
|
+
config.baseURL = this._options.baseUrl;
|
|
678
|
+
const response = await this._axios.post("SetProductImage", request, config);
|
|
679
|
+
base.WebApiBase.SetCompleted(options);
|
|
680
|
+
const res = response.data;
|
|
681
|
+
resolve(res);
|
|
682
|
+
}
|
|
683
|
+
catch (err) {
|
|
684
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
685
|
+
reject(err);
|
|
686
|
+
}
|
|
687
|
+
});
|
|
688
|
+
}
|
|
689
|
+
async setProductImageAsync(productId, image, webapi_options) {
|
|
690
|
+
let _request = null;
|
|
691
|
+
let _options = null;
|
|
692
|
+
const first = productId;
|
|
693
|
+
if (typeof (first) === "object" && first && (typeof (first.productId) != 'undefined' || typeof (first.image) != 'undefined')) {
|
|
694
|
+
_request = productId;
|
|
695
|
+
_options = image;
|
|
696
|
+
}
|
|
697
|
+
else {
|
|
698
|
+
_request = {
|
|
699
|
+
productId: productId,
|
|
700
|
+
image: image,
|
|
701
|
+
};
|
|
702
|
+
_options = webapi_options;
|
|
703
|
+
}
|
|
704
|
+
_request.image = (0, Base64_js_1.ToBase64)(_request.image);
|
|
705
|
+
return this._setProductImageAsync(_request, _options);
|
|
706
|
+
}
|
|
707
|
+
async _getProductThumbnailAsync(request, options) {
|
|
708
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options) || {};
|
|
709
|
+
base.WebApiBase.SetPending(options);
|
|
710
|
+
return new Promise(async (resolve, reject) => {
|
|
711
|
+
try {
|
|
712
|
+
if (!options || options.returnBlobAs == base.ReturnBlobType.AsArrayBuffer) {
|
|
713
|
+
config.responseType = "arraybuffer";
|
|
714
|
+
config.headers = config.headers || {};
|
|
715
|
+
config.headers["Accept"] = "application/octet-stream";
|
|
716
|
+
}
|
|
717
|
+
config.baseURL = this._options.baseUrl;
|
|
718
|
+
const response = await this._axios.post("GetProductThumbnail", request, config);
|
|
719
|
+
base.WebApiBase.SetCompleted(options);
|
|
720
|
+
let res = null;
|
|
721
|
+
if (options && options.returnBlobAs != base.ReturnBlobType.AsArrayBuffer) {
|
|
722
|
+
res = response.data;
|
|
723
|
+
if (options.returnBlobAs == base.ReturnBlobType.AsString) {
|
|
724
|
+
res = (0, Base64_js_1.FromBase64ToString)(res);
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
else {
|
|
728
|
+
res = response.data;
|
|
729
|
+
}
|
|
730
|
+
resolve(res);
|
|
731
|
+
}
|
|
732
|
+
catch (err) {
|
|
733
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
734
|
+
reject(err);
|
|
735
|
+
}
|
|
736
|
+
});
|
|
737
|
+
}
|
|
738
|
+
async getProductThumbnailAsync(productId, webapi_options) {
|
|
739
|
+
let _request = null;
|
|
740
|
+
let _options = null;
|
|
741
|
+
const first = productId;
|
|
742
|
+
if (typeof (first) === "object" && first && (typeof (first.productId) != 'undefined')) {
|
|
743
|
+
_request = productId;
|
|
744
|
+
_options = webapi_options;
|
|
745
|
+
}
|
|
746
|
+
else {
|
|
747
|
+
_request = {
|
|
748
|
+
productId: productId,
|
|
749
|
+
};
|
|
750
|
+
_options = webapi_options;
|
|
751
|
+
}
|
|
752
|
+
return this._getProductThumbnailAsync(_request, _options);
|
|
753
|
+
}
|
|
754
|
+
async _setProductThumbnailAsync(request, options) {
|
|
755
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
756
|
+
base.WebApiBase.SetPending(options);
|
|
757
|
+
return new Promise(async (resolve, reject) => {
|
|
758
|
+
try {
|
|
759
|
+
config.baseURL = this._options.baseUrl;
|
|
760
|
+
const response = await this._axios.post("SetProductThumbnail", request, config);
|
|
761
|
+
base.WebApiBase.SetCompleted(options);
|
|
762
|
+
const res = response.data;
|
|
763
|
+
resolve(res);
|
|
764
|
+
}
|
|
765
|
+
catch (err) {
|
|
766
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
767
|
+
reject(err);
|
|
768
|
+
}
|
|
769
|
+
});
|
|
770
|
+
}
|
|
771
|
+
async setProductThumbnailAsync(productId, image, webapi_options) {
|
|
772
|
+
let _request = null;
|
|
773
|
+
let _options = null;
|
|
774
|
+
const first = productId;
|
|
775
|
+
if (typeof (first) === "object" && first && (typeof (first.productId) != 'undefined' || typeof (first.image) != 'undefined')) {
|
|
776
|
+
_request = productId;
|
|
777
|
+
_options = image;
|
|
778
|
+
}
|
|
779
|
+
else {
|
|
780
|
+
_request = {
|
|
781
|
+
productId: productId,
|
|
782
|
+
image: image,
|
|
783
|
+
};
|
|
784
|
+
_options = webapi_options;
|
|
785
|
+
}
|
|
786
|
+
_request.image = (0, Base64_js_1.ToBase64)(_request.image);
|
|
787
|
+
return this._setProductThumbnailAsync(_request, _options);
|
|
788
|
+
}
|
|
789
|
+
async _changeProductImageAsync(request, options) {
|
|
790
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
791
|
+
base.WebApiBase.SetPending(options);
|
|
792
|
+
return new Promise(async (resolve, reject) => {
|
|
793
|
+
try {
|
|
794
|
+
config.baseURL = this._options.baseUrl;
|
|
795
|
+
const response = await this._axios.post("ChangeProductImage", request, config);
|
|
796
|
+
base.WebApiBase.SetCompleted(options);
|
|
797
|
+
const res = response.data;
|
|
798
|
+
resolve(res);
|
|
799
|
+
}
|
|
800
|
+
catch (err) {
|
|
801
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
802
|
+
reject(err);
|
|
803
|
+
}
|
|
804
|
+
});
|
|
805
|
+
}
|
|
806
|
+
async changeProductImageAsync(productId, blobId, webapi_options) {
|
|
807
|
+
let _request = null;
|
|
808
|
+
let _options = null;
|
|
809
|
+
const first = productId;
|
|
810
|
+
if (typeof (first) === "object" && first && (typeof (first.productId) != 'undefined' || typeof (first.blobId) != 'undefined')) {
|
|
811
|
+
_request = productId;
|
|
812
|
+
_options = blobId;
|
|
813
|
+
}
|
|
814
|
+
else {
|
|
815
|
+
_request = {
|
|
816
|
+
productId: productId,
|
|
817
|
+
blobId: blobId,
|
|
818
|
+
};
|
|
819
|
+
_options = webapi_options;
|
|
820
|
+
}
|
|
821
|
+
return this._changeProductImageAsync(_request, _options);
|
|
822
|
+
}
|
|
823
|
+
async _getQuoteLineImageAsync(request, options) {
|
|
824
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options) || {};
|
|
825
|
+
base.WebApiBase.SetPending(options);
|
|
826
|
+
return new Promise(async (resolve, reject) => {
|
|
827
|
+
try {
|
|
828
|
+
if (!options || options.returnBlobAs == base.ReturnBlobType.AsArrayBuffer) {
|
|
829
|
+
config.responseType = "arraybuffer";
|
|
830
|
+
config.headers = config.headers || {};
|
|
831
|
+
config.headers["Accept"] = "application/octet-stream";
|
|
832
|
+
}
|
|
833
|
+
config.baseURL = this._options.baseUrl;
|
|
834
|
+
const response = await this._axios.post("GetQuoteLineImage", request, config);
|
|
835
|
+
base.WebApiBase.SetCompleted(options);
|
|
836
|
+
let res = null;
|
|
837
|
+
if (options && options.returnBlobAs != base.ReturnBlobType.AsArrayBuffer) {
|
|
838
|
+
res = response.data;
|
|
839
|
+
if (options.returnBlobAs == base.ReturnBlobType.AsString) {
|
|
840
|
+
res = (0, Base64_js_1.FromBase64ToString)(res);
|
|
841
|
+
}
|
|
842
|
+
}
|
|
843
|
+
else {
|
|
844
|
+
res = response.data;
|
|
845
|
+
}
|
|
846
|
+
resolve(res);
|
|
847
|
+
}
|
|
848
|
+
catch (err) {
|
|
849
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
850
|
+
reject(err);
|
|
851
|
+
}
|
|
852
|
+
});
|
|
853
|
+
}
|
|
854
|
+
async getQuoteLineImageAsync(quoteLineId, webapi_options) {
|
|
855
|
+
let _request = null;
|
|
856
|
+
let _options = null;
|
|
857
|
+
const first = quoteLineId;
|
|
858
|
+
if (typeof (first) === "object" && first && (typeof (first.quoteLineId) != 'undefined')) {
|
|
859
|
+
_request = quoteLineId;
|
|
860
|
+
_options = webapi_options;
|
|
861
|
+
}
|
|
862
|
+
else {
|
|
863
|
+
_request = {
|
|
864
|
+
quoteLineId: quoteLineId,
|
|
865
|
+
};
|
|
866
|
+
_options = webapi_options;
|
|
867
|
+
}
|
|
868
|
+
return this._getQuoteLineImageAsync(_request, _options);
|
|
869
|
+
}
|
|
870
|
+
async _getAppDataAsync(request, options) {
|
|
871
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
872
|
+
base.WebApiBase.SetPending(options);
|
|
873
|
+
return new Promise(async (resolve, reject) => {
|
|
874
|
+
try {
|
|
875
|
+
config.baseURL = this._options.baseUrl;
|
|
876
|
+
const response = await this._axios.post("GetAppData", request, config);
|
|
877
|
+
base.WebApiBase.SetCompleted(options);
|
|
878
|
+
const res = response.data;
|
|
879
|
+
resolve(res);
|
|
880
|
+
}
|
|
881
|
+
catch (err) {
|
|
882
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
883
|
+
reject(err);
|
|
884
|
+
}
|
|
885
|
+
});
|
|
886
|
+
}
|
|
887
|
+
async getAppDataAsync(key, webapi_options) {
|
|
888
|
+
let _request = null;
|
|
889
|
+
let _options = null;
|
|
890
|
+
const first = key;
|
|
891
|
+
if (typeof (first) === "object" && first && (typeof (first.key) != 'undefined')) {
|
|
892
|
+
_request = key;
|
|
893
|
+
_options = webapi_options;
|
|
894
|
+
}
|
|
895
|
+
else {
|
|
896
|
+
_request = {
|
|
897
|
+
key: key,
|
|
898
|
+
};
|
|
899
|
+
_options = webapi_options;
|
|
900
|
+
}
|
|
901
|
+
return this._getAppDataAsync(_request, _options);
|
|
902
|
+
}
|
|
903
|
+
async _setAppDataAsync(request, options) {
|
|
904
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
905
|
+
base.WebApiBase.SetPending(options);
|
|
906
|
+
return new Promise(async (resolve, reject) => {
|
|
907
|
+
try {
|
|
908
|
+
config.baseURL = this._options.baseUrl;
|
|
909
|
+
const response = await this._axios.post("SetAppData", request, config);
|
|
910
|
+
base.WebApiBase.SetCompleted(options);
|
|
911
|
+
const res = response.data;
|
|
912
|
+
resolve(res);
|
|
913
|
+
}
|
|
914
|
+
catch (err) {
|
|
915
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
916
|
+
reject(err);
|
|
917
|
+
}
|
|
918
|
+
});
|
|
919
|
+
}
|
|
920
|
+
async setAppDataAsync(key, data, webapi_options) {
|
|
921
|
+
let _request = null;
|
|
922
|
+
let _options = null;
|
|
923
|
+
const first = key;
|
|
924
|
+
if (typeof (first) === "object" && first && (typeof (first.key) != 'undefined' || typeof (first.data) != 'undefined')) {
|
|
925
|
+
_request = key;
|
|
926
|
+
_options = data;
|
|
927
|
+
}
|
|
928
|
+
else {
|
|
929
|
+
_request = {
|
|
930
|
+
key: key,
|
|
931
|
+
data: data,
|
|
932
|
+
};
|
|
933
|
+
_options = webapi_options;
|
|
934
|
+
}
|
|
935
|
+
return this._setAppDataAsync(_request, _options);
|
|
936
|
+
}
|
|
937
|
+
async _getPersonImageWithSizeAsync(request, options) {
|
|
938
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options) || {};
|
|
939
|
+
base.WebApiBase.SetPending(options);
|
|
940
|
+
return new Promise(async (resolve, reject) => {
|
|
941
|
+
try {
|
|
942
|
+
if (!options || options.returnBlobAs == base.ReturnBlobType.AsArrayBuffer) {
|
|
943
|
+
config.responseType = "arraybuffer";
|
|
944
|
+
config.headers = config.headers || {};
|
|
945
|
+
config.headers["Accept"] = "application/octet-stream";
|
|
946
|
+
}
|
|
947
|
+
config.baseURL = this._options.baseUrl;
|
|
948
|
+
const response = await this._axios.post("GetPersonImageWithSize", request, config);
|
|
949
|
+
base.WebApiBase.SetCompleted(options);
|
|
950
|
+
let res = null;
|
|
951
|
+
if (options && options.returnBlobAs != base.ReturnBlobType.AsArrayBuffer) {
|
|
952
|
+
res = response.data;
|
|
953
|
+
if (options.returnBlobAs == base.ReturnBlobType.AsString) {
|
|
954
|
+
res = (0, Base64_js_1.FromBase64ToString)(res);
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
else {
|
|
958
|
+
res = response.data;
|
|
959
|
+
}
|
|
960
|
+
resolve(res);
|
|
961
|
+
}
|
|
962
|
+
catch (err) {
|
|
963
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
964
|
+
reject(err);
|
|
965
|
+
}
|
|
966
|
+
});
|
|
967
|
+
}
|
|
968
|
+
async getPersonImageWithSizeAsync(personId, width, height, webapi_options) {
|
|
969
|
+
let _request = null;
|
|
970
|
+
let _options = null;
|
|
971
|
+
const first = personId;
|
|
972
|
+
if (typeof (first) === "object" && first && (typeof (first.personId) != 'undefined' || typeof (first.width) != 'undefined' || typeof (first.height) != 'undefined')) {
|
|
973
|
+
_request = personId;
|
|
974
|
+
_options = width;
|
|
975
|
+
}
|
|
976
|
+
else {
|
|
977
|
+
_request = {
|
|
978
|
+
personId: personId,
|
|
979
|
+
width: width,
|
|
980
|
+
height: height,
|
|
981
|
+
};
|
|
982
|
+
_options = webapi_options;
|
|
983
|
+
}
|
|
984
|
+
return this._getPersonImageWithSizeAsync(_request, _options);
|
|
985
|
+
}
|
|
986
|
+
async _getProjectImageWithSizeAsync(request, options) {
|
|
987
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options) || {};
|
|
988
|
+
base.WebApiBase.SetPending(options);
|
|
989
|
+
return new Promise(async (resolve, reject) => {
|
|
990
|
+
try {
|
|
991
|
+
if (!options || options.returnBlobAs == base.ReturnBlobType.AsArrayBuffer) {
|
|
992
|
+
config.responseType = "arraybuffer";
|
|
993
|
+
config.headers = config.headers || {};
|
|
994
|
+
config.headers["Accept"] = "application/octet-stream";
|
|
995
|
+
}
|
|
996
|
+
config.baseURL = this._options.baseUrl;
|
|
997
|
+
const response = await this._axios.post("GetProjectImageWithSize", request, config);
|
|
998
|
+
base.WebApiBase.SetCompleted(options);
|
|
999
|
+
let res = null;
|
|
1000
|
+
if (options && options.returnBlobAs != base.ReturnBlobType.AsArrayBuffer) {
|
|
1001
|
+
res = response.data;
|
|
1002
|
+
if (options.returnBlobAs == base.ReturnBlobType.AsString) {
|
|
1003
|
+
res = (0, Base64_js_1.FromBase64ToString)(res);
|
|
1004
|
+
}
|
|
1005
|
+
}
|
|
1006
|
+
else {
|
|
1007
|
+
res = response.data;
|
|
1008
|
+
}
|
|
1009
|
+
resolve(res);
|
|
1010
|
+
}
|
|
1011
|
+
catch (err) {
|
|
1012
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1013
|
+
reject(err);
|
|
1014
|
+
}
|
|
1015
|
+
});
|
|
1016
|
+
}
|
|
1017
|
+
async getProjectImageWithSizeAsync(projectId, width, height, webapi_options) {
|
|
1018
|
+
let _request = null;
|
|
1019
|
+
let _options = null;
|
|
1020
|
+
const first = projectId;
|
|
1021
|
+
if (typeof (first) === "object" && first && (typeof (first.projectId) != 'undefined' || typeof (first.width) != 'undefined' || typeof (first.height) != 'undefined')) {
|
|
1022
|
+
_request = projectId;
|
|
1023
|
+
_options = width;
|
|
1024
|
+
}
|
|
1025
|
+
else {
|
|
1026
|
+
_request = {
|
|
1027
|
+
projectId: projectId,
|
|
1028
|
+
width: width,
|
|
1029
|
+
height: height,
|
|
1030
|
+
};
|
|
1031
|
+
_options = webapi_options;
|
|
1032
|
+
}
|
|
1033
|
+
return this._getProjectImageWithSizeAsync(_request, _options);
|
|
1034
|
+
}
|
|
1035
|
+
async _getChatImageWithSizeAsync(request, options) {
|
|
1036
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options) || {};
|
|
1037
|
+
base.WebApiBase.SetPending(options);
|
|
1038
|
+
return new Promise(async (resolve, reject) => {
|
|
1039
|
+
try {
|
|
1040
|
+
if (!options || options.returnBlobAs == base.ReturnBlobType.AsArrayBuffer) {
|
|
1041
|
+
config.responseType = "arraybuffer";
|
|
1042
|
+
config.headers = config.headers || {};
|
|
1043
|
+
config.headers["Accept"] = "application/octet-stream";
|
|
1044
|
+
}
|
|
1045
|
+
config.baseURL = this._options.baseUrl;
|
|
1046
|
+
const response = await this._axios.post("GetChatImageWithSize", request, config);
|
|
1047
|
+
base.WebApiBase.SetCompleted(options);
|
|
1048
|
+
let res = null;
|
|
1049
|
+
if (options && options.returnBlobAs != base.ReturnBlobType.AsArrayBuffer) {
|
|
1050
|
+
res = response.data;
|
|
1051
|
+
if (options.returnBlobAs == base.ReturnBlobType.AsString) {
|
|
1052
|
+
res = (0, Base64_js_1.FromBase64ToString)(res);
|
|
1053
|
+
}
|
|
1054
|
+
}
|
|
1055
|
+
else {
|
|
1056
|
+
res = response.data;
|
|
1057
|
+
}
|
|
1058
|
+
resolve(res);
|
|
1059
|
+
}
|
|
1060
|
+
catch (err) {
|
|
1061
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1062
|
+
reject(err);
|
|
1063
|
+
}
|
|
1064
|
+
});
|
|
1065
|
+
}
|
|
1066
|
+
async getChatImageWithSizeAsync(chatTopicId, width, height, webapi_options) {
|
|
1067
|
+
let _request = null;
|
|
1068
|
+
let _options = null;
|
|
1069
|
+
const first = chatTopicId;
|
|
1070
|
+
if (typeof (first) === "object" && first && (typeof (first.chatTopicId) != 'undefined' || typeof (first.width) != 'undefined' || typeof (first.height) != 'undefined')) {
|
|
1071
|
+
_request = chatTopicId;
|
|
1072
|
+
_options = width;
|
|
1073
|
+
}
|
|
1074
|
+
else {
|
|
1075
|
+
_request = {
|
|
1076
|
+
chatTopicId: chatTopicId,
|
|
1077
|
+
width: width,
|
|
1078
|
+
height: height,
|
|
1079
|
+
};
|
|
1080
|
+
_options = webapi_options;
|
|
1081
|
+
}
|
|
1082
|
+
return this._getChatImageWithSizeAsync(_request, _options);
|
|
1083
|
+
}
|
|
1084
|
+
async _getContactImageAsync(request, options) {
|
|
1085
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options) || {};
|
|
1086
|
+
base.WebApiBase.SetPending(options);
|
|
1087
|
+
return new Promise(async (resolve, reject) => {
|
|
1088
|
+
try {
|
|
1089
|
+
if (!options || options.returnBlobAs == base.ReturnBlobType.AsArrayBuffer) {
|
|
1090
|
+
config.responseType = "arraybuffer";
|
|
1091
|
+
config.headers = config.headers || {};
|
|
1092
|
+
config.headers["Accept"] = "application/octet-stream";
|
|
1093
|
+
}
|
|
1094
|
+
config.baseURL = this._options.baseUrl;
|
|
1095
|
+
const response = await this._axios.post("GetContactImage", request, config);
|
|
1096
|
+
base.WebApiBase.SetCompleted(options);
|
|
1097
|
+
let res = null;
|
|
1098
|
+
if (options && options.returnBlobAs != base.ReturnBlobType.AsArrayBuffer) {
|
|
1099
|
+
res = response.data;
|
|
1100
|
+
if (options.returnBlobAs == base.ReturnBlobType.AsString) {
|
|
1101
|
+
res = (0, Base64_js_1.FromBase64ToString)(res);
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1104
|
+
else {
|
|
1105
|
+
res = response.data;
|
|
1106
|
+
}
|
|
1107
|
+
resolve(res);
|
|
1108
|
+
}
|
|
1109
|
+
catch (err) {
|
|
1110
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1111
|
+
reject(err);
|
|
1112
|
+
}
|
|
1113
|
+
});
|
|
1114
|
+
}
|
|
1115
|
+
async getContactImageAsync(contactId, webapi_options) {
|
|
1116
|
+
let _request = null;
|
|
1117
|
+
let _options = null;
|
|
1118
|
+
const first = contactId;
|
|
1119
|
+
if (typeof (first) === "object" && first && (typeof (first.contactId) != 'undefined')) {
|
|
1120
|
+
_request = contactId;
|
|
1121
|
+
_options = webapi_options;
|
|
1122
|
+
}
|
|
1123
|
+
else {
|
|
1124
|
+
_request = {
|
|
1125
|
+
contactId: contactId,
|
|
1126
|
+
};
|
|
1127
|
+
_options = webapi_options;
|
|
1128
|
+
}
|
|
1129
|
+
return this._getContactImageAsync(_request, _options);
|
|
1130
|
+
}
|
|
1131
|
+
async _setContactImageAsync(request, options) {
|
|
1132
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1133
|
+
base.WebApiBase.SetPending(options);
|
|
1134
|
+
return new Promise(async (resolve, reject) => {
|
|
1135
|
+
try {
|
|
1136
|
+
config.baseURL = this._options.baseUrl;
|
|
1137
|
+
const response = await this._axios.post("SetContactImage", request, config);
|
|
1138
|
+
base.WebApiBase.SetCompleted(options);
|
|
1139
|
+
const res = response.data;
|
|
1140
|
+
resolve(res);
|
|
1141
|
+
}
|
|
1142
|
+
catch (err) {
|
|
1143
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1144
|
+
reject(err);
|
|
1145
|
+
}
|
|
1146
|
+
});
|
|
1147
|
+
}
|
|
1148
|
+
async setContactImageAsync(contactId, image, webapi_options) {
|
|
1149
|
+
let _request = null;
|
|
1150
|
+
let _options = null;
|
|
1151
|
+
const first = contactId;
|
|
1152
|
+
if (typeof (first) === "object" && first && (typeof (first.contactId) != 'undefined' || typeof (first.image) != 'undefined')) {
|
|
1153
|
+
_request = contactId;
|
|
1154
|
+
_options = image;
|
|
1155
|
+
}
|
|
1156
|
+
else {
|
|
1157
|
+
_request = {
|
|
1158
|
+
contactId: contactId,
|
|
1159
|
+
image: image,
|
|
1160
|
+
};
|
|
1161
|
+
_options = webapi_options;
|
|
1162
|
+
}
|
|
1163
|
+
_request.image = (0, Base64_js_1.ToBase64)(_request.image);
|
|
1164
|
+
return this._setContactImageAsync(_request, _options);
|
|
1165
|
+
}
|
|
1166
|
+
async _changeContactImageAsync(request, options) {
|
|
1167
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1168
|
+
base.WebApiBase.SetPending(options);
|
|
1169
|
+
return new Promise(async (resolve, reject) => {
|
|
1170
|
+
try {
|
|
1171
|
+
config.baseURL = this._options.baseUrl;
|
|
1172
|
+
const response = await this._axios.post("ChangeContactImage", request, config);
|
|
1173
|
+
base.WebApiBase.SetCompleted(options);
|
|
1174
|
+
const res = response.data;
|
|
1175
|
+
resolve(res);
|
|
1176
|
+
}
|
|
1177
|
+
catch (err) {
|
|
1178
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1179
|
+
reject(err);
|
|
1180
|
+
}
|
|
1181
|
+
});
|
|
1182
|
+
}
|
|
1183
|
+
async changeContactImageAsync(contactId, blobId, webapi_options) {
|
|
1184
|
+
let _request = null;
|
|
1185
|
+
let _options = null;
|
|
1186
|
+
const first = contactId;
|
|
1187
|
+
if (typeof (first) === "object" && first && (typeof (first.contactId) != 'undefined' || typeof (first.blobId) != 'undefined')) {
|
|
1188
|
+
_request = contactId;
|
|
1189
|
+
_options = blobId;
|
|
1190
|
+
}
|
|
1191
|
+
else {
|
|
1192
|
+
_request = {
|
|
1193
|
+
contactId: contactId,
|
|
1194
|
+
blobId: blobId,
|
|
1195
|
+
};
|
|
1196
|
+
_options = webapi_options;
|
|
1197
|
+
}
|
|
1198
|
+
return this._changeContactImageAsync(_request, _options);
|
|
1199
|
+
}
|
|
1200
|
+
async _getBlobEntityOnContactAsync(request, options) {
|
|
1201
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1202
|
+
base.WebApiBase.SetPending(options);
|
|
1203
|
+
return new Promise(async (resolve, reject) => {
|
|
1204
|
+
try {
|
|
1205
|
+
config.baseURL = this._options.baseUrl;
|
|
1206
|
+
const response = await this._axios.post("GetBlobEntityOnContact", request, config);
|
|
1207
|
+
base.WebApiBase.SetCompleted(options);
|
|
1208
|
+
const res = converters.Create_BlobEntity_From(response.data);
|
|
1209
|
+
resolve(res);
|
|
1210
|
+
}
|
|
1211
|
+
catch (err) {
|
|
1212
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1213
|
+
reject(err);
|
|
1214
|
+
}
|
|
1215
|
+
});
|
|
1216
|
+
}
|
|
1217
|
+
async getBlobEntityOnContactAsync(contactId, webapi_options) {
|
|
1218
|
+
let _request = null;
|
|
1219
|
+
let _options = null;
|
|
1220
|
+
const first = contactId;
|
|
1221
|
+
if (typeof (first) === "object" && first && (typeof (first.contactId) != 'undefined')) {
|
|
1222
|
+
_request = contactId;
|
|
1223
|
+
_options = webapi_options;
|
|
1224
|
+
}
|
|
1225
|
+
else {
|
|
1226
|
+
_request = {
|
|
1227
|
+
contactId: contactId,
|
|
1228
|
+
};
|
|
1229
|
+
_options = webapi_options;
|
|
1230
|
+
}
|
|
1231
|
+
return this._getBlobEntityOnContactAsync(_request, _options);
|
|
1232
|
+
}
|
|
1233
|
+
async _getContactImageWithSizeAsync(request, options) {
|
|
1234
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options) || {};
|
|
1235
|
+
base.WebApiBase.SetPending(options);
|
|
1236
|
+
return new Promise(async (resolve, reject) => {
|
|
1237
|
+
try {
|
|
1238
|
+
if (!options || options.returnBlobAs == base.ReturnBlobType.AsArrayBuffer) {
|
|
1239
|
+
config.responseType = "arraybuffer";
|
|
1240
|
+
config.headers = config.headers || {};
|
|
1241
|
+
config.headers["Accept"] = "application/octet-stream";
|
|
1242
|
+
}
|
|
1243
|
+
config.baseURL = this._options.baseUrl;
|
|
1244
|
+
const response = await this._axios.post("GetContactImageWithSize", request, config);
|
|
1245
|
+
base.WebApiBase.SetCompleted(options);
|
|
1246
|
+
let res = null;
|
|
1247
|
+
if (options && options.returnBlobAs != base.ReturnBlobType.AsArrayBuffer) {
|
|
1248
|
+
res = response.data;
|
|
1249
|
+
if (options.returnBlobAs == base.ReturnBlobType.AsString) {
|
|
1250
|
+
res = (0, Base64_js_1.FromBase64ToString)(res);
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
else {
|
|
1254
|
+
res = response.data;
|
|
1255
|
+
}
|
|
1256
|
+
resolve(res);
|
|
1257
|
+
}
|
|
1258
|
+
catch (err) {
|
|
1259
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1260
|
+
reject(err);
|
|
1261
|
+
}
|
|
1262
|
+
});
|
|
1263
|
+
}
|
|
1264
|
+
async getContactImageWithSizeAsync(contactId, width, height, webapi_options) {
|
|
1265
|
+
let _request = null;
|
|
1266
|
+
let _options = null;
|
|
1267
|
+
const first = contactId;
|
|
1268
|
+
if (typeof (first) === "object" && first && (typeof (first.contactId) != 'undefined' || typeof (first.width) != 'undefined' || typeof (first.height) != 'undefined')) {
|
|
1269
|
+
_request = contactId;
|
|
1270
|
+
_options = width;
|
|
1271
|
+
}
|
|
1272
|
+
else {
|
|
1273
|
+
_request = {
|
|
1274
|
+
contactId: contactId,
|
|
1275
|
+
width: width,
|
|
1276
|
+
height: height,
|
|
1277
|
+
};
|
|
1278
|
+
_options = webapi_options;
|
|
1279
|
+
}
|
|
1280
|
+
return this._getContactImageWithSizeAsync(_request, _options);
|
|
1281
|
+
}
|
|
1282
|
+
async _getOutputFromBatchAsync(request, options) {
|
|
1283
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options) || {};
|
|
1284
|
+
base.WebApiBase.SetPending(options);
|
|
1285
|
+
return new Promise(async (resolve, reject) => {
|
|
1286
|
+
try {
|
|
1287
|
+
if (!options || options.returnBlobAs == base.ReturnBlobType.AsArrayBuffer) {
|
|
1288
|
+
config.responseType = "arraybuffer";
|
|
1289
|
+
config.headers = config.headers || {};
|
|
1290
|
+
config.headers["Accept"] = "application/octet-stream";
|
|
1291
|
+
}
|
|
1292
|
+
config.baseURL = this._options.baseUrl;
|
|
1293
|
+
const response = await this._axios.post("GetOutputFromBatch", request, config);
|
|
1294
|
+
base.WebApiBase.SetCompleted(options);
|
|
1295
|
+
let res = null;
|
|
1296
|
+
if (options && options.returnBlobAs != base.ReturnBlobType.AsArrayBuffer) {
|
|
1297
|
+
res = response.data;
|
|
1298
|
+
if (options.returnBlobAs == base.ReturnBlobType.AsString) {
|
|
1299
|
+
res = (0, Base64_js_1.FromBase64ToString)(res);
|
|
1300
|
+
}
|
|
1301
|
+
}
|
|
1302
|
+
else {
|
|
1303
|
+
res = response.data;
|
|
1304
|
+
}
|
|
1305
|
+
resolve(res);
|
|
1306
|
+
}
|
|
1307
|
+
catch (err) {
|
|
1308
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1309
|
+
reject(err);
|
|
1310
|
+
}
|
|
1311
|
+
});
|
|
1312
|
+
}
|
|
1313
|
+
async getOutputFromBatchAsync(batchTaskId, webapi_options) {
|
|
1314
|
+
let _request = null;
|
|
1315
|
+
let _options = null;
|
|
1316
|
+
const first = batchTaskId;
|
|
1317
|
+
if (typeof (first) === "object" && first && (typeof (first.batchTaskId) != 'undefined')) {
|
|
1318
|
+
_request = batchTaskId;
|
|
1319
|
+
_options = webapi_options;
|
|
1320
|
+
}
|
|
1321
|
+
else {
|
|
1322
|
+
_request = {
|
|
1323
|
+
batchTaskId: batchTaskId,
|
|
1324
|
+
};
|
|
1325
|
+
_options = webapi_options;
|
|
1326
|
+
}
|
|
1327
|
+
return this._getOutputFromBatchAsync(_request, _options);
|
|
1328
|
+
}
|
|
1329
|
+
async _cleanupBatchTaskAsync(request, options) {
|
|
1330
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1331
|
+
base.WebApiBase.SetPending(options);
|
|
1332
|
+
return new Promise(async (resolve, reject) => {
|
|
1333
|
+
try {
|
|
1334
|
+
config.baseURL = this._options.baseUrl;
|
|
1335
|
+
const response = await this._axios.post("CleanupBatchTask", request, config);
|
|
1336
|
+
base.WebApiBase.SetCompleted(options);
|
|
1337
|
+
const res = response.data;
|
|
1338
|
+
resolve(res);
|
|
1339
|
+
}
|
|
1340
|
+
catch (err) {
|
|
1341
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1342
|
+
reject(err);
|
|
1343
|
+
}
|
|
1344
|
+
});
|
|
1345
|
+
}
|
|
1346
|
+
async cleanupBatchTaskAsync(batchTaskId, webapi_options) {
|
|
1347
|
+
let _request = null;
|
|
1348
|
+
let _options = null;
|
|
1349
|
+
const first = batchTaskId;
|
|
1350
|
+
if (typeof (first) === "object" && first && (typeof (first.batchTaskId) != 'undefined')) {
|
|
1351
|
+
_request = batchTaskId;
|
|
1352
|
+
_options = webapi_options;
|
|
1353
|
+
}
|
|
1354
|
+
else {
|
|
1355
|
+
_request = {
|
|
1356
|
+
batchTaskId: batchTaskId,
|
|
1357
|
+
};
|
|
1358
|
+
_options = webapi_options;
|
|
1359
|
+
}
|
|
1360
|
+
return this._cleanupBatchTaskAsync(_request, _options);
|
|
1361
|
+
}
|
|
1362
|
+
} // class v1BLOBAgentController
|
|
1363
|
+
exports.BLOBAgent = BLOBAgent;
|
|
1364
|
+
//# sourceMappingURL=BLOBAgent.js.map
|