@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,1601 @@
|
|
|
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.ErpSyncAgent = 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
|
+
/**
|
|
12
|
+
* Services for the ERP Integration Services feature
|
|
13
|
+
*/
|
|
14
|
+
class ErpSyncAgent extends base.WebApiBase {
|
|
15
|
+
constructor(baseUrlOrOptions, langOrconfigOrRM, langOrResourceOrRM, cultureCode) {
|
|
16
|
+
const options = base.WebApiBase.FigureOutOptions(baseUrlOrOptions, langOrconfigOrRM, langOrResourceOrRM, cultureCode);
|
|
17
|
+
options.basePath = "v1/Agents/ErpSync/";
|
|
18
|
+
super(options);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Set default values into a new ErpSyncConnectorEntity.
|
|
22
|
+
* NetServer calculates default values on the entity, which is required when creating/storing a new instance
|
|
23
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
24
|
+
* @returns A blank entity.
|
|
25
|
+
*/
|
|
26
|
+
async createDefaultErpSyncConnectorEntityAsync(options) {
|
|
27
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
28
|
+
base.WebApiBase.SetPending(options);
|
|
29
|
+
return new Promise(async (resolve, reject) => {
|
|
30
|
+
try {
|
|
31
|
+
const response = await this._axios.post("CreateDefaultErpSyncConnectorEntity", null, config);
|
|
32
|
+
base.WebApiBase.SetCompleted(options);
|
|
33
|
+
const res = converters.Create_ErpSyncConnectorEntity_From(response.data);
|
|
34
|
+
resolve(res);
|
|
35
|
+
}
|
|
36
|
+
catch (err) {
|
|
37
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
38
|
+
reject(err);
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
/*
|
|
43
|
+
* Replace the existing ErpSyncConnectorEntity or creates a new ErpSyncConnectorEntity if the id parameter is empty
|
|
44
|
+
* @param entity - The ErpSyncConnectorEntity to be saved.
|
|
45
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
46
|
+
* @returns New or updated ErpSyncConnectorEntity
|
|
47
|
+
*/
|
|
48
|
+
async saveErpSyncConnectorEntityAsync(entity, options) {
|
|
49
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
50
|
+
base.WebApiBase.SetPending(options);
|
|
51
|
+
return new Promise(async (resolve, reject) => {
|
|
52
|
+
try {
|
|
53
|
+
const response = await this._axios.post("SaveErpSyncConnectorEntity", entity, config);
|
|
54
|
+
base.WebApiBase.SetCompleted(options);
|
|
55
|
+
const res = converters.Create_ErpSyncConnectorEntity_From(response.data);
|
|
56
|
+
resolve(res);
|
|
57
|
+
}
|
|
58
|
+
catch (err) {
|
|
59
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
60
|
+
reject(err);
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
/*
|
|
65
|
+
* Deletes the ErpSyncConnectorEntity
|
|
66
|
+
* @param ErpSyncConnectorEntityId - The id of the ErpSyncConnectorEntity to be deleted.
|
|
67
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
68
|
+
*/
|
|
69
|
+
async deleteErpSyncConnectorEntityAsync(ErpSyncConnectorEntityId, options) {
|
|
70
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
71
|
+
base.WebApiBase.SetPending(options);
|
|
72
|
+
return new Promise(async (resolve, reject) => {
|
|
73
|
+
try {
|
|
74
|
+
const response = await this._axios.post("DeleteErpSyncConnectorEntity?ErpSyncConnectorEntityId=" + ErpSyncConnectorEntityId, null, config);
|
|
75
|
+
base.WebApiBase.SetCompleted(options);
|
|
76
|
+
const res = response.data;
|
|
77
|
+
resolve(res);
|
|
78
|
+
}
|
|
79
|
+
catch (err) {
|
|
80
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
81
|
+
reject(err);
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
async _getConnectionAsync(request, options) {
|
|
86
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
87
|
+
base.WebApiBase.SetPending(options);
|
|
88
|
+
return new Promise(async (resolve, reject) => {
|
|
89
|
+
try {
|
|
90
|
+
config.baseURL = this._options.baseUrl;
|
|
91
|
+
const response = await this._axios.post("GetConnection", request, config);
|
|
92
|
+
base.WebApiBase.SetCompleted(options);
|
|
93
|
+
const res = converters.Create_ErpConnection_From(response.data);
|
|
94
|
+
resolve(res);
|
|
95
|
+
}
|
|
96
|
+
catch (err) {
|
|
97
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
98
|
+
reject(err);
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
async getConnectionAsync(erpConnectionId, webapi_options) {
|
|
103
|
+
let _request = null;
|
|
104
|
+
let _options = null;
|
|
105
|
+
const first = erpConnectionId;
|
|
106
|
+
if (typeof (first) === "object" && first && (typeof (first.erpConnectionId) != 'undefined')) {
|
|
107
|
+
_request = erpConnectionId;
|
|
108
|
+
_options = webapi_options;
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
_request = {
|
|
112
|
+
erpConnectionId: erpConnectionId,
|
|
113
|
+
};
|
|
114
|
+
_options = webapi_options;
|
|
115
|
+
}
|
|
116
|
+
return this._getConnectionAsync(_request, _options);
|
|
117
|
+
}
|
|
118
|
+
async _saveConnectionAsync(request, options) {
|
|
119
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
120
|
+
base.WebApiBase.SetPending(options);
|
|
121
|
+
return new Promise(async (resolve, reject) => {
|
|
122
|
+
try {
|
|
123
|
+
config.baseURL = this._options.baseUrl;
|
|
124
|
+
const response = await this._axios.post("SaveConnection", request, config);
|
|
125
|
+
base.WebApiBase.SetCompleted(options);
|
|
126
|
+
const res = converters.Create_ErpConnection_From(response.data);
|
|
127
|
+
resolve(res);
|
|
128
|
+
}
|
|
129
|
+
catch (err) {
|
|
130
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
131
|
+
reject(err);
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
async saveConnectionAsync(connection, webapi_options) {
|
|
136
|
+
let _request = null;
|
|
137
|
+
let _options = null;
|
|
138
|
+
const first = connection;
|
|
139
|
+
if (typeof (first) === "object" && first && (typeof (first.connection) != 'undefined')) {
|
|
140
|
+
_request = connection;
|
|
141
|
+
_options = webapi_options;
|
|
142
|
+
}
|
|
143
|
+
else {
|
|
144
|
+
_request = {
|
|
145
|
+
connection: connection,
|
|
146
|
+
};
|
|
147
|
+
_options = webapi_options;
|
|
148
|
+
}
|
|
149
|
+
return this._saveConnectionAsync(_request, _options);
|
|
150
|
+
}
|
|
151
|
+
async _deleteConnectionAsync(request, options) {
|
|
152
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
153
|
+
base.WebApiBase.SetPending(options);
|
|
154
|
+
return new Promise(async (resolve, reject) => {
|
|
155
|
+
try {
|
|
156
|
+
config.baseURL = this._options.baseUrl;
|
|
157
|
+
const response = await this._axios.post("DeleteConnection", request, config);
|
|
158
|
+
base.WebApiBase.SetCompleted(options);
|
|
159
|
+
const res = response.data;
|
|
160
|
+
resolve(res);
|
|
161
|
+
}
|
|
162
|
+
catch (err) {
|
|
163
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
164
|
+
reject(err);
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
async deleteConnectionAsync(erpConnectionId, webapi_options) {
|
|
169
|
+
let _request = null;
|
|
170
|
+
let _options = null;
|
|
171
|
+
const first = erpConnectionId;
|
|
172
|
+
if (typeof (first) === "object" && first && (typeof (first.erpConnectionId) != 'undefined')) {
|
|
173
|
+
_request = erpConnectionId;
|
|
174
|
+
_options = webapi_options;
|
|
175
|
+
}
|
|
176
|
+
else {
|
|
177
|
+
_request = {
|
|
178
|
+
erpConnectionId: erpConnectionId,
|
|
179
|
+
};
|
|
180
|
+
_options = webapi_options;
|
|
181
|
+
}
|
|
182
|
+
return this._deleteConnectionAsync(_request, _options);
|
|
183
|
+
}
|
|
184
|
+
async _getConfigurationFieldsAsync(request, options) {
|
|
185
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
186
|
+
base.WebApiBase.SetPending(options);
|
|
187
|
+
return new Promise(async (resolve, reject) => {
|
|
188
|
+
try {
|
|
189
|
+
config.baseURL = this._options.baseUrl;
|
|
190
|
+
const response = await this._axios.post("GetConfigurationFields", request, config);
|
|
191
|
+
base.WebApiBase.SetCompleted(options);
|
|
192
|
+
const res = converters.Create_FieldMetadataArray_From(response.data);
|
|
193
|
+
resolve(res);
|
|
194
|
+
}
|
|
195
|
+
catch (err) {
|
|
196
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
197
|
+
reject(err);
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
async getConfigurationFieldsAsync(erpConnectorId, webapi_options) {
|
|
202
|
+
let _request = null;
|
|
203
|
+
let _options = null;
|
|
204
|
+
const first = erpConnectorId;
|
|
205
|
+
if (typeof (first) === "object" && first && (typeof (first.erpConnectorId) != 'undefined')) {
|
|
206
|
+
_request = erpConnectorId;
|
|
207
|
+
_options = webapi_options;
|
|
208
|
+
}
|
|
209
|
+
else {
|
|
210
|
+
_request = {
|
|
211
|
+
erpConnectorId: erpConnectorId,
|
|
212
|
+
};
|
|
213
|
+
_options = webapi_options;
|
|
214
|
+
}
|
|
215
|
+
return this._getConfigurationFieldsAsync(_request, _options);
|
|
216
|
+
}
|
|
217
|
+
async _getErpConnectionConfigFieldsAsync(request, options) {
|
|
218
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
219
|
+
base.WebApiBase.SetPending(options);
|
|
220
|
+
return new Promise(async (resolve, reject) => {
|
|
221
|
+
try {
|
|
222
|
+
config.baseURL = this._options.baseUrl;
|
|
223
|
+
const response = await this._axios.post("GetErpConnectionConfigFields", request, config);
|
|
224
|
+
base.WebApiBase.SetCompleted(options);
|
|
225
|
+
const res = converters.Create_StringDictionary_From(response.data);
|
|
226
|
+
resolve(res);
|
|
227
|
+
}
|
|
228
|
+
catch (err) {
|
|
229
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
230
|
+
reject(err);
|
|
231
|
+
}
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
async getErpConnectionConfigFieldsAsync(erpConnectionId, webapi_options) {
|
|
235
|
+
let _request = null;
|
|
236
|
+
let _options = null;
|
|
237
|
+
const first = erpConnectionId;
|
|
238
|
+
if (typeof (first) === "object" && first && (typeof (first.erpConnectionId) != 'undefined')) {
|
|
239
|
+
_request = erpConnectionId;
|
|
240
|
+
_options = webapi_options;
|
|
241
|
+
}
|
|
242
|
+
else {
|
|
243
|
+
_request = {
|
|
244
|
+
erpConnectionId: erpConnectionId,
|
|
245
|
+
};
|
|
246
|
+
_options = webapi_options;
|
|
247
|
+
}
|
|
248
|
+
return this._getErpConnectionConfigFieldsAsync(_request, _options);
|
|
249
|
+
}
|
|
250
|
+
async _toggleErpConnectionActiveAsync(request, options) {
|
|
251
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
252
|
+
base.WebApiBase.SetPending(options);
|
|
253
|
+
return new Promise(async (resolve, reject) => {
|
|
254
|
+
try {
|
|
255
|
+
config.baseURL = this._options.baseUrl;
|
|
256
|
+
const response = await this._axios.post("ToggleErpConnectionActive", request, config);
|
|
257
|
+
base.WebApiBase.SetCompleted(options);
|
|
258
|
+
const res = response.data;
|
|
259
|
+
resolve(res);
|
|
260
|
+
}
|
|
261
|
+
catch (err) {
|
|
262
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
263
|
+
reject(err);
|
|
264
|
+
}
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
async toggleErpConnectionActiveAsync(erpConnectionId, webapi_options) {
|
|
268
|
+
let _request = null;
|
|
269
|
+
let _options = null;
|
|
270
|
+
const first = erpConnectionId;
|
|
271
|
+
if (typeof (first) === "object" && first && (typeof (first.erpConnectionId) != 'undefined')) {
|
|
272
|
+
_request = erpConnectionId;
|
|
273
|
+
_options = webapi_options;
|
|
274
|
+
}
|
|
275
|
+
else {
|
|
276
|
+
_request = {
|
|
277
|
+
erpConnectionId: erpConnectionId,
|
|
278
|
+
};
|
|
279
|
+
_options = webapi_options;
|
|
280
|
+
}
|
|
281
|
+
return this._toggleErpConnectionActiveAsync(_request, _options);
|
|
282
|
+
}
|
|
283
|
+
async _testConnectionByIdAsync(request, options) {
|
|
284
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
285
|
+
base.WebApiBase.SetPending(options);
|
|
286
|
+
return new Promise(async (resolve, reject) => {
|
|
287
|
+
try {
|
|
288
|
+
config.baseURL = this._options.baseUrl;
|
|
289
|
+
const response = await this._axios.post("TestConnectionById", request, config);
|
|
290
|
+
base.WebApiBase.SetCompleted(options);
|
|
291
|
+
const res = response.data;
|
|
292
|
+
resolve(res);
|
|
293
|
+
}
|
|
294
|
+
catch (err) {
|
|
295
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
296
|
+
reject(err);
|
|
297
|
+
}
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
async testConnectionByIdAsync(erpConnectionId, webapi_options) {
|
|
301
|
+
let _request = null;
|
|
302
|
+
let _options = null;
|
|
303
|
+
const first = erpConnectionId;
|
|
304
|
+
if (typeof (first) === "object" && first && (typeof (first.erpConnectionId) != 'undefined')) {
|
|
305
|
+
_request = erpConnectionId;
|
|
306
|
+
_options = webapi_options;
|
|
307
|
+
}
|
|
308
|
+
else {
|
|
309
|
+
_request = {
|
|
310
|
+
erpConnectionId: erpConnectionId,
|
|
311
|
+
};
|
|
312
|
+
_options = webapi_options;
|
|
313
|
+
}
|
|
314
|
+
return this._testConnectionByIdAsync(_request, _options);
|
|
315
|
+
}
|
|
316
|
+
async _testConnectionByConfigAsync(request, options) {
|
|
317
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
318
|
+
base.WebApiBase.SetPending(options);
|
|
319
|
+
return new Promise(async (resolve, reject) => {
|
|
320
|
+
try {
|
|
321
|
+
config.baseURL = this._options.baseUrl;
|
|
322
|
+
const response = await this._axios.post("TestConnectionByConfig", request, config);
|
|
323
|
+
base.WebApiBase.SetCompleted(options);
|
|
324
|
+
const res = response.data;
|
|
325
|
+
resolve(res);
|
|
326
|
+
}
|
|
327
|
+
catch (err) {
|
|
328
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
329
|
+
reject(err);
|
|
330
|
+
}
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
async testConnectionByConfigAsync(erpConnectionId, configFields, webapi_options) {
|
|
334
|
+
let _request = null;
|
|
335
|
+
let _options = null;
|
|
336
|
+
const first = erpConnectionId;
|
|
337
|
+
if (typeof (first) === "object" && first && (typeof (first.erpConnectionId) != 'undefined' || typeof (first.configFields) != 'undefined')) {
|
|
338
|
+
_request = erpConnectionId;
|
|
339
|
+
_options = configFields;
|
|
340
|
+
}
|
|
341
|
+
else {
|
|
342
|
+
_request = {
|
|
343
|
+
erpConnectionId: erpConnectionId,
|
|
344
|
+
configFields: configFields,
|
|
345
|
+
};
|
|
346
|
+
_options = webapi_options;
|
|
347
|
+
}
|
|
348
|
+
return this._testConnectionByConfigAsync(_request, _options);
|
|
349
|
+
}
|
|
350
|
+
async _saveErpConnectionSyncPrioritiesAsync(request, options) {
|
|
351
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
352
|
+
base.WebApiBase.SetPending(options);
|
|
353
|
+
return new Promise(async (resolve, reject) => {
|
|
354
|
+
try {
|
|
355
|
+
config.baseURL = this._options.baseUrl;
|
|
356
|
+
const response = await this._axios.post("SaveErpConnectionSyncPriorities", request, config);
|
|
357
|
+
base.WebApiBase.SetCompleted(options);
|
|
358
|
+
const res = response.data;
|
|
359
|
+
resolve(res);
|
|
360
|
+
}
|
|
361
|
+
catch (err) {
|
|
362
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
363
|
+
reject(err);
|
|
364
|
+
}
|
|
365
|
+
});
|
|
366
|
+
}
|
|
367
|
+
async saveErpConnectionSyncPrioritiesAsync(erpConnectionIds, webapi_options) {
|
|
368
|
+
let _request = null;
|
|
369
|
+
let _options = null;
|
|
370
|
+
const first = erpConnectionIds;
|
|
371
|
+
if (typeof (first) === "object" && first && (typeof (first.erpConnectionIds) != 'undefined')) {
|
|
372
|
+
_request = erpConnectionIds;
|
|
373
|
+
_options = webapi_options;
|
|
374
|
+
}
|
|
375
|
+
else {
|
|
376
|
+
_request = {
|
|
377
|
+
erpConnectionIds: erpConnectionIds,
|
|
378
|
+
};
|
|
379
|
+
_options = webapi_options;
|
|
380
|
+
}
|
|
381
|
+
return this._saveErpConnectionSyncPrioritiesAsync(_request, _options);
|
|
382
|
+
}
|
|
383
|
+
async _moveErpFieldItemAsync(request, options) {
|
|
384
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
385
|
+
base.WebApiBase.SetPending(options);
|
|
386
|
+
return new Promise(async (resolve, reject) => {
|
|
387
|
+
try {
|
|
388
|
+
config.baseURL = this._options.baseUrl;
|
|
389
|
+
const response = await this._axios.post("MoveErpFieldItem", request, config);
|
|
390
|
+
base.WebApiBase.SetCompleted(options);
|
|
391
|
+
const res = response.data;
|
|
392
|
+
resolve(res);
|
|
393
|
+
}
|
|
394
|
+
catch (err) {
|
|
395
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
396
|
+
reject(err);
|
|
397
|
+
}
|
|
398
|
+
});
|
|
399
|
+
}
|
|
400
|
+
async moveErpFieldItemAsync(erpFieldId, direction, erpConnectionId, erpActorType, webapi_options) {
|
|
401
|
+
let _request = null;
|
|
402
|
+
let _options = null;
|
|
403
|
+
const first = erpFieldId;
|
|
404
|
+
if (typeof (first) === "object" && first && (typeof (first.erpFieldId) != 'undefined' || typeof (first.direction) != 'undefined' || typeof (first.erpConnectionId) != 'undefined' || typeof (first.erpActorType) != 'undefined')) {
|
|
405
|
+
_request = erpFieldId;
|
|
406
|
+
_options = direction;
|
|
407
|
+
}
|
|
408
|
+
else {
|
|
409
|
+
_request = {
|
|
410
|
+
erpFieldId: erpFieldId,
|
|
411
|
+
direction: direction,
|
|
412
|
+
erpConnectionId: erpConnectionId,
|
|
413
|
+
erpActorType: erpActorType,
|
|
414
|
+
};
|
|
415
|
+
_options = webapi_options;
|
|
416
|
+
}
|
|
417
|
+
return this._moveErpFieldItemAsync(_request, _options);
|
|
418
|
+
}
|
|
419
|
+
async _supportsAdvancedSearchAsync(request, options) {
|
|
420
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
421
|
+
base.WebApiBase.SetPending(options);
|
|
422
|
+
return new Promise(async (resolve, reject) => {
|
|
423
|
+
try {
|
|
424
|
+
config.baseURL = this._options.baseUrl;
|
|
425
|
+
const response = await this._axios.post("SupportsAdvancedSearch", request, config);
|
|
426
|
+
base.WebApiBase.SetCompleted(options);
|
|
427
|
+
const res = response.data;
|
|
428
|
+
resolve(res);
|
|
429
|
+
}
|
|
430
|
+
catch (err) {
|
|
431
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
432
|
+
reject(err);
|
|
433
|
+
}
|
|
434
|
+
});
|
|
435
|
+
}
|
|
436
|
+
async supportsAdvancedSearchAsync(erpConnectionId, erpActorType, webapi_options) {
|
|
437
|
+
let _request = null;
|
|
438
|
+
let _options = null;
|
|
439
|
+
const first = erpConnectionId;
|
|
440
|
+
if (typeof (first) === "object" && first && (typeof (first.erpConnectionId) != 'undefined' || typeof (first.erpActorType) != 'undefined')) {
|
|
441
|
+
_request = erpConnectionId;
|
|
442
|
+
_options = erpActorType;
|
|
443
|
+
}
|
|
444
|
+
else {
|
|
445
|
+
_request = {
|
|
446
|
+
erpConnectionId: erpConnectionId,
|
|
447
|
+
erpActorType: erpActorType,
|
|
448
|
+
};
|
|
449
|
+
_options = webapi_options;
|
|
450
|
+
}
|
|
451
|
+
return this._supportsAdvancedSearchAsync(_request, _options);
|
|
452
|
+
}
|
|
453
|
+
async _getAllConnectorsAsync(options) {
|
|
454
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
455
|
+
base.WebApiBase.SetPending(options);
|
|
456
|
+
return new Promise(async (resolve, reject) => {
|
|
457
|
+
try {
|
|
458
|
+
config.baseURL = this._options.baseUrl;
|
|
459
|
+
const response = await this._axios.post("GetAllConnectors", undefined, config);
|
|
460
|
+
base.WebApiBase.SetCompleted(options);
|
|
461
|
+
const res = converters.Create_ListItemArray_From(response.data);
|
|
462
|
+
resolve(res);
|
|
463
|
+
}
|
|
464
|
+
catch (err) {
|
|
465
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
466
|
+
reject(err);
|
|
467
|
+
}
|
|
468
|
+
});
|
|
469
|
+
}
|
|
470
|
+
/**
|
|
471
|
+
* Returns all ERP Sync connectors. Uses the `ErpConnector` archive.
|
|
472
|
+
* @returns The connector id, name, url
|
|
473
|
+
*/
|
|
474
|
+
async getAllConnectorsAsync(webapi_options) {
|
|
475
|
+
return this._getAllConnectorsAsync(webapi_options);
|
|
476
|
+
}
|
|
477
|
+
async _getAllConnectionsAsync(request, options) {
|
|
478
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
479
|
+
base.WebApiBase.SetPending(options);
|
|
480
|
+
return new Promise(async (resolve, reject) => {
|
|
481
|
+
try {
|
|
482
|
+
config.baseURL = this._options.baseUrl;
|
|
483
|
+
const response = await this._axios.post("GetAllConnections", request, config);
|
|
484
|
+
base.WebApiBase.SetCompleted(options);
|
|
485
|
+
const res = converters.Create_ErpConnectionArray_From(response.data);
|
|
486
|
+
resolve(res);
|
|
487
|
+
}
|
|
488
|
+
catch (err) {
|
|
489
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
490
|
+
reject(err);
|
|
491
|
+
}
|
|
492
|
+
});
|
|
493
|
+
}
|
|
494
|
+
async getAllConnectionsAsync(includeDeleted, webapi_options) {
|
|
495
|
+
let _request = null;
|
|
496
|
+
let _options = null;
|
|
497
|
+
const first = includeDeleted;
|
|
498
|
+
if (typeof (first) === "object" && first && (typeof (first.includeDeleted) != 'undefined')) {
|
|
499
|
+
_request = includeDeleted;
|
|
500
|
+
_options = webapi_options;
|
|
501
|
+
}
|
|
502
|
+
else {
|
|
503
|
+
_request = {
|
|
504
|
+
includeDeleted: includeDeleted,
|
|
505
|
+
};
|
|
506
|
+
_options = webapi_options;
|
|
507
|
+
}
|
|
508
|
+
return this._getAllConnectionsAsync(_request, _options);
|
|
509
|
+
}
|
|
510
|
+
async _getConnectionsAndDisplayFieldsAsync(request, options) {
|
|
511
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
512
|
+
base.WebApiBase.SetPending(options);
|
|
513
|
+
return new Promise(async (resolve, reject) => {
|
|
514
|
+
try {
|
|
515
|
+
config.baseURL = this._options.baseUrl;
|
|
516
|
+
const response = await this._axios.post("GetConnectionsAndDisplayFields", request, config);
|
|
517
|
+
base.WebApiBase.SetCompleted(options);
|
|
518
|
+
const res = converters.Create_ErpConnectionDataArray_From(response.data);
|
|
519
|
+
resolve(res);
|
|
520
|
+
}
|
|
521
|
+
catch (err) {
|
|
522
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
523
|
+
reject(err);
|
|
524
|
+
}
|
|
525
|
+
});
|
|
526
|
+
}
|
|
527
|
+
async getConnectionsAndDisplayFieldsAsync(crmActorType, entityId, webapi_options) {
|
|
528
|
+
let _request = null;
|
|
529
|
+
let _options = null;
|
|
530
|
+
const first = crmActorType;
|
|
531
|
+
if (typeof (first) === "object" && first && (typeof (first.crmActorType) != 'undefined' || typeof (first.entityId) != 'undefined')) {
|
|
532
|
+
_request = crmActorType;
|
|
533
|
+
_options = entityId;
|
|
534
|
+
}
|
|
535
|
+
else {
|
|
536
|
+
_request = {
|
|
537
|
+
crmActorType: crmActorType,
|
|
538
|
+
entityId: entityId,
|
|
539
|
+
};
|
|
540
|
+
_options = webapi_options;
|
|
541
|
+
}
|
|
542
|
+
return this._getConnectionsAndDisplayFieldsAsync(_request, _options);
|
|
543
|
+
}
|
|
544
|
+
async _getErpFieldValuesAsync(request, options) {
|
|
545
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
546
|
+
base.WebApiBase.SetPending(options);
|
|
547
|
+
return new Promise(async (resolve, reject) => {
|
|
548
|
+
try {
|
|
549
|
+
config.baseURL = this._options.baseUrl;
|
|
550
|
+
const response = await this._axios.post("GetErpFieldValues", request, config);
|
|
551
|
+
base.WebApiBase.SetCompleted(options);
|
|
552
|
+
const res = response.data;
|
|
553
|
+
resolve(res);
|
|
554
|
+
}
|
|
555
|
+
catch (err) {
|
|
556
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
557
|
+
reject(err);
|
|
558
|
+
}
|
|
559
|
+
});
|
|
560
|
+
}
|
|
561
|
+
async getErpFieldValuesAsync(erpConnectionId, crmActorType, entityId, fieldKeys, webapi_options) {
|
|
562
|
+
let _request = null;
|
|
563
|
+
let _options = null;
|
|
564
|
+
const first = erpConnectionId;
|
|
565
|
+
if (typeof (first) === "object" && first && (typeof (first.erpConnectionId) != 'undefined' || typeof (first.crmActorType) != 'undefined' || typeof (first.entityId) != 'undefined' || typeof (first.fieldKeys) != 'undefined')) {
|
|
566
|
+
_request = erpConnectionId;
|
|
567
|
+
_options = crmActorType;
|
|
568
|
+
}
|
|
569
|
+
else {
|
|
570
|
+
_request = {
|
|
571
|
+
erpConnectionId: erpConnectionId,
|
|
572
|
+
crmActorType: crmActorType,
|
|
573
|
+
entityId: entityId,
|
|
574
|
+
fieldKeys: fieldKeys,
|
|
575
|
+
};
|
|
576
|
+
_options = webapi_options;
|
|
577
|
+
}
|
|
578
|
+
return this._getErpFieldValuesAsync(_request, _options);
|
|
579
|
+
}
|
|
580
|
+
async _getFieldsForNewErpActorAsync(request, options) {
|
|
581
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
582
|
+
base.WebApiBase.SetPending(options);
|
|
583
|
+
return new Promise(async (resolve, reject) => {
|
|
584
|
+
try {
|
|
585
|
+
config.baseURL = this._options.baseUrl;
|
|
586
|
+
const response = await this._axios.post("GetFieldsForNewErpActor", request, config);
|
|
587
|
+
base.WebApiBase.SetCompleted(options);
|
|
588
|
+
const res = converters.Create_FieldMetadataArray_From(response.data);
|
|
589
|
+
resolve(res);
|
|
590
|
+
}
|
|
591
|
+
catch (err) {
|
|
592
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
593
|
+
reject(err);
|
|
594
|
+
}
|
|
595
|
+
});
|
|
596
|
+
}
|
|
597
|
+
async getFieldsForNewErpActorAsync(erpConnectionId, erpActorType, webapi_options) {
|
|
598
|
+
let _request = null;
|
|
599
|
+
let _options = null;
|
|
600
|
+
const first = erpConnectionId;
|
|
601
|
+
if (typeof (first) === "object" && first && (typeof (first.erpConnectionId) != 'undefined' || typeof (first.erpActorType) != 'undefined')) {
|
|
602
|
+
_request = erpConnectionId;
|
|
603
|
+
_options = erpActorType;
|
|
604
|
+
}
|
|
605
|
+
else {
|
|
606
|
+
_request = {
|
|
607
|
+
erpConnectionId: erpConnectionId,
|
|
608
|
+
erpActorType: erpActorType,
|
|
609
|
+
};
|
|
610
|
+
_options = webapi_options;
|
|
611
|
+
}
|
|
612
|
+
return this._getFieldsForNewErpActorAsync(_request, _options);
|
|
613
|
+
}
|
|
614
|
+
async _getConnectionListMappingsAsync(request, options) {
|
|
615
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
616
|
+
base.WebApiBase.SetPending(options);
|
|
617
|
+
return new Promise(async (resolve, reject) => {
|
|
618
|
+
try {
|
|
619
|
+
config.baseURL = this._options.baseUrl;
|
|
620
|
+
const response = await this._axios.post("GetConnectionListMappings", request, config);
|
|
621
|
+
base.WebApiBase.SetCompleted(options);
|
|
622
|
+
const res = converters.Create_ErpConnectionListMappingContainer_From(response.data);
|
|
623
|
+
resolve(res);
|
|
624
|
+
}
|
|
625
|
+
catch (err) {
|
|
626
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
627
|
+
reject(err);
|
|
628
|
+
}
|
|
629
|
+
});
|
|
630
|
+
}
|
|
631
|
+
async getConnectionListMappingsAsync(erpConnectionId, webapi_options) {
|
|
632
|
+
let _request = null;
|
|
633
|
+
let _options = null;
|
|
634
|
+
const first = erpConnectionId;
|
|
635
|
+
if (typeof (first) === "object" && first && (typeof (first.erpConnectionId) != 'undefined')) {
|
|
636
|
+
_request = erpConnectionId;
|
|
637
|
+
_options = webapi_options;
|
|
638
|
+
}
|
|
639
|
+
else {
|
|
640
|
+
_request = {
|
|
641
|
+
erpConnectionId: erpConnectionId,
|
|
642
|
+
};
|
|
643
|
+
_options = webapi_options;
|
|
644
|
+
}
|
|
645
|
+
return this._getConnectionListMappingsAsync(_request, _options);
|
|
646
|
+
}
|
|
647
|
+
async _saveConnectionListMappingsAsync(request, options) {
|
|
648
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
649
|
+
base.WebApiBase.SetPending(options);
|
|
650
|
+
return new Promise(async (resolve, reject) => {
|
|
651
|
+
try {
|
|
652
|
+
config.baseURL = this._options.baseUrl;
|
|
653
|
+
const response = await this._axios.post("SaveConnectionListMappings", request, config);
|
|
654
|
+
base.WebApiBase.SetCompleted(options);
|
|
655
|
+
const res = converters.Create_ErpConnectionListMappingContainer_From(response.data);
|
|
656
|
+
resolve(res);
|
|
657
|
+
}
|
|
658
|
+
catch (err) {
|
|
659
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
660
|
+
reject(err);
|
|
661
|
+
}
|
|
662
|
+
});
|
|
663
|
+
}
|
|
664
|
+
async saveConnectionListMappingsAsync(listMapping, webapi_options) {
|
|
665
|
+
let _request = null;
|
|
666
|
+
let _options = null;
|
|
667
|
+
const first = listMapping;
|
|
668
|
+
if (typeof (first) === "object" && first && (typeof (first.listMapping) != 'undefined')) {
|
|
669
|
+
_request = listMapping;
|
|
670
|
+
_options = webapi_options;
|
|
671
|
+
}
|
|
672
|
+
else {
|
|
673
|
+
_request = {
|
|
674
|
+
listMapping: listMapping,
|
|
675
|
+
};
|
|
676
|
+
_options = webapi_options;
|
|
677
|
+
}
|
|
678
|
+
return this._saveConnectionListMappingsAsync(_request, _options);
|
|
679
|
+
}
|
|
680
|
+
async _connectActorAsync(request, options) {
|
|
681
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
682
|
+
base.WebApiBase.SetPending(options);
|
|
683
|
+
return new Promise(async (resolve, reject) => {
|
|
684
|
+
try {
|
|
685
|
+
config.baseURL = this._options.baseUrl;
|
|
686
|
+
const response = await this._axios.post("ConnectActor", request, config);
|
|
687
|
+
base.WebApiBase.SetCompleted(options);
|
|
688
|
+
const res = response.data;
|
|
689
|
+
resolve(res);
|
|
690
|
+
}
|
|
691
|
+
catch (err) {
|
|
692
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
693
|
+
reject(err);
|
|
694
|
+
}
|
|
695
|
+
});
|
|
696
|
+
}
|
|
697
|
+
async connectActorAsync(erpConnectionId, crmRecordId, crmActorType, erpKey, erpActorType, fieldValues, webapi_options) {
|
|
698
|
+
let _request = null;
|
|
699
|
+
let _options = null;
|
|
700
|
+
const first = erpConnectionId;
|
|
701
|
+
if (typeof (first) === "object" && first && (typeof (first.erpConnectionId) != 'undefined' || typeof (first.crmRecordId) != 'undefined' || typeof (first.crmActorType) != 'undefined' || typeof (first.erpKey) != 'undefined' || typeof (first.erpActorType) != 'undefined' || typeof (first.fieldValues) != 'undefined')) {
|
|
702
|
+
_request = erpConnectionId;
|
|
703
|
+
_options = crmRecordId;
|
|
704
|
+
}
|
|
705
|
+
else {
|
|
706
|
+
_request = {
|
|
707
|
+
erpConnectionId: erpConnectionId,
|
|
708
|
+
crmRecordId: crmRecordId,
|
|
709
|
+
crmActorType: crmActorType,
|
|
710
|
+
erpKey: erpKey,
|
|
711
|
+
erpActorType: erpActorType,
|
|
712
|
+
fieldValues: fieldValues,
|
|
713
|
+
};
|
|
714
|
+
_options = webapi_options;
|
|
715
|
+
}
|
|
716
|
+
return this._connectActorAsync(_request, _options);
|
|
717
|
+
}
|
|
718
|
+
async _tryConnectActorAsync(request, options) {
|
|
719
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
720
|
+
base.WebApiBase.SetPending(options);
|
|
721
|
+
return new Promise(async (resolve, reject) => {
|
|
722
|
+
try {
|
|
723
|
+
config.baseURL = this._options.baseUrl;
|
|
724
|
+
const response = await this._axios.post("TryConnectActor", request, config);
|
|
725
|
+
base.WebApiBase.SetCompleted(options);
|
|
726
|
+
const res = response.data;
|
|
727
|
+
resolve(res);
|
|
728
|
+
}
|
|
729
|
+
catch (err) {
|
|
730
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
731
|
+
reject(err);
|
|
732
|
+
}
|
|
733
|
+
});
|
|
734
|
+
}
|
|
735
|
+
async tryConnectActorAsync(erpConnectionId, crmRecordId, crmActorType, erpKey, erpActorType, fieldValues, webapi_options) {
|
|
736
|
+
let _request = null;
|
|
737
|
+
let _options = null;
|
|
738
|
+
const first = erpConnectionId;
|
|
739
|
+
if (typeof (first) === "object" && first && (typeof (first.erpConnectionId) != 'undefined' || typeof (first.crmRecordId) != 'undefined' || typeof (first.crmActorType) != 'undefined' || typeof (first.erpKey) != 'undefined' || typeof (first.erpActorType) != 'undefined' || typeof (first.fieldValues) != 'undefined')) {
|
|
740
|
+
_request = erpConnectionId;
|
|
741
|
+
_options = crmRecordId;
|
|
742
|
+
}
|
|
743
|
+
else {
|
|
744
|
+
_request = {
|
|
745
|
+
erpConnectionId: erpConnectionId,
|
|
746
|
+
crmRecordId: crmRecordId,
|
|
747
|
+
crmActorType: crmActorType,
|
|
748
|
+
erpKey: erpKey,
|
|
749
|
+
erpActorType: erpActorType,
|
|
750
|
+
fieldValues: fieldValues,
|
|
751
|
+
};
|
|
752
|
+
_options = webapi_options;
|
|
753
|
+
}
|
|
754
|
+
return this._tryConnectActorAsync(_request, _options);
|
|
755
|
+
}
|
|
756
|
+
async _getFieldValuesFromCrmAsync(request, options) {
|
|
757
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
758
|
+
base.WebApiBase.SetPending(options);
|
|
759
|
+
return new Promise(async (resolve, reject) => {
|
|
760
|
+
try {
|
|
761
|
+
config.baseURL = this._options.baseUrl;
|
|
762
|
+
const response = await this._axios.post("GetFieldValuesFromCrm", request, config);
|
|
763
|
+
base.WebApiBase.SetCompleted(options);
|
|
764
|
+
const res = converters.Create_ErpSyncFieldValueArray_From(response.data);
|
|
765
|
+
resolve(res);
|
|
766
|
+
}
|
|
767
|
+
catch (err) {
|
|
768
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
769
|
+
reject(err);
|
|
770
|
+
}
|
|
771
|
+
});
|
|
772
|
+
}
|
|
773
|
+
async getFieldValuesFromCrmAsync(recordId, actorTypeCrm, webapi_options) {
|
|
774
|
+
let _request = null;
|
|
775
|
+
let _options = null;
|
|
776
|
+
const first = recordId;
|
|
777
|
+
if (typeof (first) === "object" && first && (typeof (first.recordId) != 'undefined' || typeof (first.actorTypeCrm) != 'undefined')) {
|
|
778
|
+
_request = recordId;
|
|
779
|
+
_options = actorTypeCrm;
|
|
780
|
+
}
|
|
781
|
+
else {
|
|
782
|
+
_request = {
|
|
783
|
+
recordId: recordId,
|
|
784
|
+
actorTypeCrm: actorTypeCrm,
|
|
785
|
+
};
|
|
786
|
+
_options = webapi_options;
|
|
787
|
+
}
|
|
788
|
+
return this._getFieldValuesFromCrmAsync(_request, _options);
|
|
789
|
+
}
|
|
790
|
+
async _getFieldValuesFromErpAsync(request, options) {
|
|
791
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
792
|
+
base.WebApiBase.SetPending(options);
|
|
793
|
+
return new Promise(async (resolve, reject) => {
|
|
794
|
+
try {
|
|
795
|
+
config.baseURL = this._options.baseUrl;
|
|
796
|
+
const response = await this._axios.post("GetFieldValuesFromErp", request, config);
|
|
797
|
+
base.WebApiBase.SetCompleted(options);
|
|
798
|
+
const res = converters.Create_ErpSyncFieldValueArray_From(response.data);
|
|
799
|
+
resolve(res);
|
|
800
|
+
}
|
|
801
|
+
catch (err) {
|
|
802
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
803
|
+
reject(err);
|
|
804
|
+
}
|
|
805
|
+
});
|
|
806
|
+
}
|
|
807
|
+
async getFieldValuesFromErpAsync(erpConnectionId, actorTypeErp, erpKey, webapi_options) {
|
|
808
|
+
let _request = null;
|
|
809
|
+
let _options = null;
|
|
810
|
+
const first = erpConnectionId;
|
|
811
|
+
if (typeof (first) === "object" && first && (typeof (first.erpConnectionId) != 'undefined' || typeof (first.actorTypeErp) != 'undefined' || typeof (first.erpKey) != 'undefined')) {
|
|
812
|
+
_request = erpConnectionId;
|
|
813
|
+
_options = actorTypeErp;
|
|
814
|
+
}
|
|
815
|
+
else {
|
|
816
|
+
_request = {
|
|
817
|
+
erpConnectionId: erpConnectionId,
|
|
818
|
+
actorTypeErp: actorTypeErp,
|
|
819
|
+
erpKey: erpKey,
|
|
820
|
+
};
|
|
821
|
+
_options = webapi_options;
|
|
822
|
+
}
|
|
823
|
+
return this._getFieldValuesFromErpAsync(_request, _options);
|
|
824
|
+
}
|
|
825
|
+
async _getActorTypeMappingAsync(request, options) {
|
|
826
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
827
|
+
base.WebApiBase.SetPending(options);
|
|
828
|
+
return new Promise(async (resolve, reject) => {
|
|
829
|
+
try {
|
|
830
|
+
config.baseURL = this._options.baseUrl;
|
|
831
|
+
const response = await this._axios.post("GetActorTypeMapping", request, config);
|
|
832
|
+
base.WebApiBase.SetCompleted(options);
|
|
833
|
+
const res = converters.Create_ErpSyncActorTypeMapping_From(response.data);
|
|
834
|
+
resolve(res);
|
|
835
|
+
}
|
|
836
|
+
catch (err) {
|
|
837
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
838
|
+
reject(err);
|
|
839
|
+
}
|
|
840
|
+
});
|
|
841
|
+
}
|
|
842
|
+
async getActorTypeMappingAsync(erpConnectionId, actorType, webapi_options) {
|
|
843
|
+
let _request = null;
|
|
844
|
+
let _options = null;
|
|
845
|
+
const first = erpConnectionId;
|
|
846
|
+
if (typeof (first) === "object" && first && (typeof (first.erpConnectionId) != 'undefined' || typeof (first.actorType) != 'undefined')) {
|
|
847
|
+
_request = erpConnectionId;
|
|
848
|
+
_options = actorType;
|
|
849
|
+
}
|
|
850
|
+
else {
|
|
851
|
+
_request = {
|
|
852
|
+
erpConnectionId: erpConnectionId,
|
|
853
|
+
actorType: actorType,
|
|
854
|
+
};
|
|
855
|
+
_options = webapi_options;
|
|
856
|
+
}
|
|
857
|
+
return this._getActorTypeMappingAsync(_request, _options);
|
|
858
|
+
}
|
|
859
|
+
async _createActorLinkAsync(request, options) {
|
|
860
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
861
|
+
base.WebApiBase.SetPending(options);
|
|
862
|
+
return new Promise(async (resolve, reject) => {
|
|
863
|
+
try {
|
|
864
|
+
config.baseURL = this._options.baseUrl;
|
|
865
|
+
const response = await this._axios.post("CreateActorLink", request, config);
|
|
866
|
+
base.WebApiBase.SetCompleted(options);
|
|
867
|
+
const res = response.data;
|
|
868
|
+
resolve(res);
|
|
869
|
+
}
|
|
870
|
+
catch (err) {
|
|
871
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
872
|
+
reject(err);
|
|
873
|
+
}
|
|
874
|
+
});
|
|
875
|
+
}
|
|
876
|
+
async createActorLinkAsync(erpConnectionId, crmRecordId, crmActorType, erpKey, erpActorType, webapi_options) {
|
|
877
|
+
let _request = null;
|
|
878
|
+
let _options = null;
|
|
879
|
+
const first = erpConnectionId;
|
|
880
|
+
if (typeof (first) === "object" && first && (typeof (first.erpConnectionId) != 'undefined' || typeof (first.crmRecordId) != 'undefined' || typeof (first.crmActorType) != 'undefined' || typeof (first.erpKey) != 'undefined' || typeof (first.erpActorType) != 'undefined')) {
|
|
881
|
+
_request = erpConnectionId;
|
|
882
|
+
_options = crmRecordId;
|
|
883
|
+
}
|
|
884
|
+
else {
|
|
885
|
+
_request = {
|
|
886
|
+
erpConnectionId: erpConnectionId,
|
|
887
|
+
crmRecordId: crmRecordId,
|
|
888
|
+
crmActorType: crmActorType,
|
|
889
|
+
erpKey: erpKey,
|
|
890
|
+
erpActorType: erpActorType,
|
|
891
|
+
};
|
|
892
|
+
_options = webapi_options;
|
|
893
|
+
}
|
|
894
|
+
return this._createActorLinkAsync(_request, _options);
|
|
895
|
+
}
|
|
896
|
+
async _breakActorLinkAsync(request, options) {
|
|
897
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
898
|
+
base.WebApiBase.SetPending(options);
|
|
899
|
+
return new Promise(async (resolve, reject) => {
|
|
900
|
+
try {
|
|
901
|
+
config.baseURL = this._options.baseUrl;
|
|
902
|
+
const response = await this._axios.post("BreakActorLink", request, config);
|
|
903
|
+
base.WebApiBase.SetCompleted(options);
|
|
904
|
+
const res = response.data;
|
|
905
|
+
resolve(res);
|
|
906
|
+
}
|
|
907
|
+
catch (err) {
|
|
908
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
909
|
+
reject(err);
|
|
910
|
+
}
|
|
911
|
+
});
|
|
912
|
+
}
|
|
913
|
+
async breakActorLinkAsync(erpConnectionId, crmRecordId, crmActorType, webapi_options) {
|
|
914
|
+
let _request = null;
|
|
915
|
+
let _options = null;
|
|
916
|
+
const first = erpConnectionId;
|
|
917
|
+
if (typeof (first) === "object" && first && (typeof (first.erpConnectionId) != 'undefined' || typeof (first.crmRecordId) != 'undefined' || typeof (first.crmActorType) != 'undefined')) {
|
|
918
|
+
_request = erpConnectionId;
|
|
919
|
+
_options = crmRecordId;
|
|
920
|
+
}
|
|
921
|
+
else {
|
|
922
|
+
_request = {
|
|
923
|
+
erpConnectionId: erpConnectionId,
|
|
924
|
+
crmRecordId: crmRecordId,
|
|
925
|
+
crmActorType: crmActorType,
|
|
926
|
+
};
|
|
927
|
+
_options = webapi_options;
|
|
928
|
+
}
|
|
929
|
+
return this._breakActorLinkAsync(_request, _options);
|
|
930
|
+
}
|
|
931
|
+
async _createErpActorFromCrmAsync(request, options) {
|
|
932
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
933
|
+
base.WebApiBase.SetPending(options);
|
|
934
|
+
return new Promise(async (resolve, reject) => {
|
|
935
|
+
try {
|
|
936
|
+
config.baseURL = this._options.baseUrl;
|
|
937
|
+
const response = await this._axios.post("CreateErpActorFromCrm", request, config);
|
|
938
|
+
base.WebApiBase.SetCompleted(options);
|
|
939
|
+
const res = response.data;
|
|
940
|
+
resolve(res);
|
|
941
|
+
}
|
|
942
|
+
catch (err) {
|
|
943
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
944
|
+
reject(err);
|
|
945
|
+
}
|
|
946
|
+
});
|
|
947
|
+
}
|
|
948
|
+
async createErpActorFromCrmAsync(connectionId, crmEntityId, erpActorType, crmActorType, erpFieldKeyValues, webapi_options) {
|
|
949
|
+
let _request = null;
|
|
950
|
+
let _options = null;
|
|
951
|
+
const first = connectionId;
|
|
952
|
+
if (typeof (first) === "object" && first && (typeof (first.connectionId) != 'undefined' || typeof (first.crmEntityId) != 'undefined' || typeof (first.erpActorType) != 'undefined' || typeof (first.crmActorType) != 'undefined' || typeof (first.erpFieldKeyValues) != 'undefined')) {
|
|
953
|
+
_request = connectionId;
|
|
954
|
+
_options = crmEntityId;
|
|
955
|
+
}
|
|
956
|
+
else {
|
|
957
|
+
_request = {
|
|
958
|
+
connectionId: connectionId,
|
|
959
|
+
crmEntityId: crmEntityId,
|
|
960
|
+
erpActorType: erpActorType,
|
|
961
|
+
crmActorType: crmActorType,
|
|
962
|
+
erpFieldKeyValues: erpFieldKeyValues,
|
|
963
|
+
};
|
|
964
|
+
_options = webapi_options;
|
|
965
|
+
}
|
|
966
|
+
return this._createErpActorFromCrmAsync(_request, _options);
|
|
967
|
+
}
|
|
968
|
+
async _saveActorTypeMappingAsync(request, options) {
|
|
969
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
970
|
+
base.WebApiBase.SetPending(options);
|
|
971
|
+
return new Promise(async (resolve, reject) => {
|
|
972
|
+
try {
|
|
973
|
+
config.baseURL = this._options.baseUrl;
|
|
974
|
+
const response = await this._axios.post("SaveActorTypeMapping", request, config);
|
|
975
|
+
base.WebApiBase.SetCompleted(options);
|
|
976
|
+
const res = converters.Create_ErpSyncActorTypeMapping_From(response.data);
|
|
977
|
+
resolve(res);
|
|
978
|
+
}
|
|
979
|
+
catch (err) {
|
|
980
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
981
|
+
reject(err);
|
|
982
|
+
}
|
|
983
|
+
});
|
|
984
|
+
}
|
|
985
|
+
async saveActorTypeMappingAsync(mapping, webapi_options) {
|
|
986
|
+
let _request = null;
|
|
987
|
+
let _options = null;
|
|
988
|
+
const first = mapping;
|
|
989
|
+
if (typeof (first) === "object" && first && (typeof (first.mapping) != 'undefined')) {
|
|
990
|
+
_request = mapping;
|
|
991
|
+
_options = webapi_options;
|
|
992
|
+
}
|
|
993
|
+
else {
|
|
994
|
+
_request = {
|
|
995
|
+
mapping: mapping,
|
|
996
|
+
};
|
|
997
|
+
_options = webapi_options;
|
|
998
|
+
}
|
|
999
|
+
return this._saveActorTypeMappingAsync(_request, _options);
|
|
1000
|
+
}
|
|
1001
|
+
async _validateArchiveColumnConfigAsync(request, options) {
|
|
1002
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1003
|
+
base.WebApiBase.SetPending(options);
|
|
1004
|
+
return new Promise(async (resolve, reject) => {
|
|
1005
|
+
try {
|
|
1006
|
+
config.baseURL = this._options.baseUrl;
|
|
1007
|
+
const response = await this._axios.post("ValidateArchiveColumnConfig", request, config);
|
|
1008
|
+
base.WebApiBase.SetCompleted(options);
|
|
1009
|
+
const res = response.data;
|
|
1010
|
+
resolve(res);
|
|
1011
|
+
}
|
|
1012
|
+
catch (err) {
|
|
1013
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1014
|
+
reject(err);
|
|
1015
|
+
}
|
|
1016
|
+
});
|
|
1017
|
+
}
|
|
1018
|
+
async validateArchiveColumnConfigAsync(listOwner, erpConnectionId, webapi_options) {
|
|
1019
|
+
let _request = null;
|
|
1020
|
+
let _options = null;
|
|
1021
|
+
const first = listOwner;
|
|
1022
|
+
if (typeof (first) === "object" && first && (typeof (first.listOwner) != 'undefined' || typeof (first.erpConnectionId) != 'undefined')) {
|
|
1023
|
+
_request = listOwner;
|
|
1024
|
+
_options = erpConnectionId;
|
|
1025
|
+
}
|
|
1026
|
+
else {
|
|
1027
|
+
_request = {
|
|
1028
|
+
listOwner: listOwner,
|
|
1029
|
+
erpConnectionId: erpConnectionId,
|
|
1030
|
+
};
|
|
1031
|
+
_options = webapi_options;
|
|
1032
|
+
}
|
|
1033
|
+
return this._validateArchiveColumnConfigAsync(_request, _options);
|
|
1034
|
+
}
|
|
1035
|
+
async _updateConnectionFieldsAsync(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
|
+
config.baseURL = this._options.baseUrl;
|
|
1041
|
+
const response = await this._axios.post("UpdateConnectionFields", request, config);
|
|
1042
|
+
base.WebApiBase.SetCompleted(options);
|
|
1043
|
+
const res = response.data;
|
|
1044
|
+
resolve(res);
|
|
1045
|
+
}
|
|
1046
|
+
catch (err) {
|
|
1047
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1048
|
+
reject(err);
|
|
1049
|
+
}
|
|
1050
|
+
});
|
|
1051
|
+
}
|
|
1052
|
+
async updateConnectionFieldsAsync(erpConnectionId, webapi_options) {
|
|
1053
|
+
let _request = null;
|
|
1054
|
+
let _options = null;
|
|
1055
|
+
const first = erpConnectionId;
|
|
1056
|
+
if (typeof (first) === "object" && first && (typeof (first.erpConnectionId) != 'undefined')) {
|
|
1057
|
+
_request = erpConnectionId;
|
|
1058
|
+
_options = webapi_options;
|
|
1059
|
+
}
|
|
1060
|
+
else {
|
|
1061
|
+
_request = {
|
|
1062
|
+
erpConnectionId: erpConnectionId,
|
|
1063
|
+
};
|
|
1064
|
+
_options = webapi_options;
|
|
1065
|
+
}
|
|
1066
|
+
return this._updateConnectionFieldsAsync(_request, _options);
|
|
1067
|
+
}
|
|
1068
|
+
async _getCrmActorTypeAsync(request, options) {
|
|
1069
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1070
|
+
base.WebApiBase.SetPending(options);
|
|
1071
|
+
return new Promise(async (resolve, reject) => {
|
|
1072
|
+
try {
|
|
1073
|
+
config.baseURL = this._options.baseUrl;
|
|
1074
|
+
const response = await this._axios.post("GetCrmActorType", request, config);
|
|
1075
|
+
base.WebApiBase.SetCompleted(options);
|
|
1076
|
+
const res = response.data;
|
|
1077
|
+
resolve(res);
|
|
1078
|
+
}
|
|
1079
|
+
catch (err) {
|
|
1080
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1081
|
+
reject(err);
|
|
1082
|
+
}
|
|
1083
|
+
});
|
|
1084
|
+
}
|
|
1085
|
+
async getCrmActorTypeAsync(erpConnectionId, erpActorType, webapi_options) {
|
|
1086
|
+
let _request = null;
|
|
1087
|
+
let _options = null;
|
|
1088
|
+
const first = erpConnectionId;
|
|
1089
|
+
if (typeof (first) === "object" && first && (typeof (first.erpConnectionId) != 'undefined' || typeof (first.erpActorType) != 'undefined')) {
|
|
1090
|
+
_request = erpConnectionId;
|
|
1091
|
+
_options = erpActorType;
|
|
1092
|
+
}
|
|
1093
|
+
else {
|
|
1094
|
+
_request = {
|
|
1095
|
+
erpConnectionId: erpConnectionId,
|
|
1096
|
+
erpActorType: erpActorType,
|
|
1097
|
+
};
|
|
1098
|
+
_options = webapi_options;
|
|
1099
|
+
}
|
|
1100
|
+
return this._getCrmActorTypeAsync(_request, _options);
|
|
1101
|
+
}
|
|
1102
|
+
async _getErpSyncConnectionSummaryAsync(request, options) {
|
|
1103
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1104
|
+
base.WebApiBase.SetPending(options);
|
|
1105
|
+
return new Promise(async (resolve, reject) => {
|
|
1106
|
+
try {
|
|
1107
|
+
config.baseURL = this._options.baseUrl;
|
|
1108
|
+
const response = await this._axios.post("GetErpSyncConnectionSummary", request, config);
|
|
1109
|
+
base.WebApiBase.SetCompleted(options);
|
|
1110
|
+
const res = converters.Create_ErpSyncConnectionSummary_From(response.data);
|
|
1111
|
+
resolve(res);
|
|
1112
|
+
}
|
|
1113
|
+
catch (err) {
|
|
1114
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1115
|
+
reject(err);
|
|
1116
|
+
}
|
|
1117
|
+
});
|
|
1118
|
+
}
|
|
1119
|
+
async getErpSyncConnectionSummaryAsync(erpSyncConnectionId, webapi_options) {
|
|
1120
|
+
let _request = null;
|
|
1121
|
+
let _options = null;
|
|
1122
|
+
const first = erpSyncConnectionId;
|
|
1123
|
+
if (typeof (first) === "object" && first && (typeof (first.erpSyncConnectionId) != 'undefined')) {
|
|
1124
|
+
_request = erpSyncConnectionId;
|
|
1125
|
+
_options = webapi_options;
|
|
1126
|
+
}
|
|
1127
|
+
else {
|
|
1128
|
+
_request = {
|
|
1129
|
+
erpSyncConnectionId: erpSyncConnectionId,
|
|
1130
|
+
};
|
|
1131
|
+
_options = webapi_options;
|
|
1132
|
+
}
|
|
1133
|
+
return this._getErpSyncConnectionSummaryAsync(_request, _options);
|
|
1134
|
+
}
|
|
1135
|
+
/*
|
|
1136
|
+
* Gets a ErpSyncConnectorEntity object.
|
|
1137
|
+
* @param erpSyncConnectorEntityId - The primary key.
|
|
1138
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
1139
|
+
* @returns A single ErpSyncConnectorEntity
|
|
1140
|
+
*/
|
|
1141
|
+
async getErpSyncConnectorEntityAsync(erpSyncConnectorEntityId, options) {
|
|
1142
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1143
|
+
base.WebApiBase.SetPending(options);
|
|
1144
|
+
return new Promise(async (resolve, reject) => {
|
|
1145
|
+
try {
|
|
1146
|
+
const response = await this._axios.post("GetErpSyncConnectorEntity?erpSyncConnectorEntityId=" + erpSyncConnectorEntityId, null, config);
|
|
1147
|
+
base.WebApiBase.SetCompleted(options);
|
|
1148
|
+
const res = converters.Create_ErpSyncConnectorEntity_From(response.data);
|
|
1149
|
+
resolve(res);
|
|
1150
|
+
}
|
|
1151
|
+
catch (err) {
|
|
1152
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1153
|
+
reject(err);
|
|
1154
|
+
}
|
|
1155
|
+
});
|
|
1156
|
+
}
|
|
1157
|
+
async _canDeleteErpSyncConnectorEntityAsync(request, options) {
|
|
1158
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1159
|
+
base.WebApiBase.SetPending(options);
|
|
1160
|
+
return new Promise(async (resolve, reject) => {
|
|
1161
|
+
try {
|
|
1162
|
+
config.baseURL = this._options.baseUrl;
|
|
1163
|
+
const response = await this._axios.post("CanDeleteErpSyncConnectorEntity", request, config);
|
|
1164
|
+
base.WebApiBase.SetCompleted(options);
|
|
1165
|
+
const res = response.data;
|
|
1166
|
+
resolve(res);
|
|
1167
|
+
}
|
|
1168
|
+
catch (err) {
|
|
1169
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1170
|
+
reject(err);
|
|
1171
|
+
}
|
|
1172
|
+
});
|
|
1173
|
+
}
|
|
1174
|
+
async canDeleteErpSyncConnectorEntityAsync(erpSyncConnectorId, webapi_options) {
|
|
1175
|
+
let _request = null;
|
|
1176
|
+
let _options = null;
|
|
1177
|
+
const first = erpSyncConnectorId;
|
|
1178
|
+
if (typeof (first) === "object" && first && (typeof (first.erpSyncConnectorId) != 'undefined')) {
|
|
1179
|
+
_request = erpSyncConnectorId;
|
|
1180
|
+
_options = webapi_options;
|
|
1181
|
+
}
|
|
1182
|
+
else {
|
|
1183
|
+
_request = {
|
|
1184
|
+
erpSyncConnectorId: erpSyncConnectorId,
|
|
1185
|
+
};
|
|
1186
|
+
_options = webapi_options;
|
|
1187
|
+
}
|
|
1188
|
+
return this._canDeleteErpSyncConnectorEntityAsync(_request, _options);
|
|
1189
|
+
}
|
|
1190
|
+
async _testConnectorUrlAsync(request, options) {
|
|
1191
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1192
|
+
base.WebApiBase.SetPending(options);
|
|
1193
|
+
return new Promise(async (resolve, reject) => {
|
|
1194
|
+
try {
|
|
1195
|
+
config.baseURL = this._options.baseUrl;
|
|
1196
|
+
const response = await this._axios.post("TestConnectorUrl", request, config);
|
|
1197
|
+
base.WebApiBase.SetCompleted(options);
|
|
1198
|
+
const res = response.data;
|
|
1199
|
+
resolve(res);
|
|
1200
|
+
}
|
|
1201
|
+
catch (err) {
|
|
1202
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1203
|
+
reject(err);
|
|
1204
|
+
}
|
|
1205
|
+
});
|
|
1206
|
+
}
|
|
1207
|
+
async testConnectorUrlAsync(url, webapi_options) {
|
|
1208
|
+
let _request = null;
|
|
1209
|
+
let _options = null;
|
|
1210
|
+
const first = url;
|
|
1211
|
+
if (typeof (first) === "object" && first && (typeof (first.url) != 'undefined')) {
|
|
1212
|
+
_request = url;
|
|
1213
|
+
_options = webapi_options;
|
|
1214
|
+
}
|
|
1215
|
+
else {
|
|
1216
|
+
_request = {
|
|
1217
|
+
url: url,
|
|
1218
|
+
};
|
|
1219
|
+
_options = webapi_options;
|
|
1220
|
+
}
|
|
1221
|
+
return this._testConnectorUrlAsync(_request, _options);
|
|
1222
|
+
}
|
|
1223
|
+
async _saveDefaultValueInfoAsync(request, options) {
|
|
1224
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1225
|
+
base.WebApiBase.SetPending(options);
|
|
1226
|
+
return new Promise(async (resolve, reject) => {
|
|
1227
|
+
try {
|
|
1228
|
+
config.baseURL = this._options.baseUrl;
|
|
1229
|
+
const response = await this._axios.post("SaveDefaultValueInfo", request, config);
|
|
1230
|
+
base.WebApiBase.SetCompleted(options);
|
|
1231
|
+
const res = converters.Create_ErpSyncDefaultValue_From(response.data);
|
|
1232
|
+
resolve(res);
|
|
1233
|
+
}
|
|
1234
|
+
catch (err) {
|
|
1235
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1236
|
+
reject(err);
|
|
1237
|
+
}
|
|
1238
|
+
});
|
|
1239
|
+
}
|
|
1240
|
+
async saveDefaultValueInfoAsync(erpSyncDefaultValue, webapi_options) {
|
|
1241
|
+
let _request = null;
|
|
1242
|
+
let _options = null;
|
|
1243
|
+
const first = erpSyncDefaultValue;
|
|
1244
|
+
if (typeof (first) === "object" && first && (typeof (first.erpSyncDefaultValue) != 'undefined')) {
|
|
1245
|
+
_request = erpSyncDefaultValue;
|
|
1246
|
+
_options = webapi_options;
|
|
1247
|
+
}
|
|
1248
|
+
else {
|
|
1249
|
+
_request = {
|
|
1250
|
+
erpSyncDefaultValue: erpSyncDefaultValue,
|
|
1251
|
+
};
|
|
1252
|
+
_options = webapi_options;
|
|
1253
|
+
}
|
|
1254
|
+
return this._saveDefaultValueInfoAsync(_request, _options);
|
|
1255
|
+
}
|
|
1256
|
+
async _getDefaultValueInfoAsync(request, options) {
|
|
1257
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1258
|
+
base.WebApiBase.SetPending(options);
|
|
1259
|
+
return new Promise(async (resolve, reject) => {
|
|
1260
|
+
try {
|
|
1261
|
+
config.baseURL = this._options.baseUrl;
|
|
1262
|
+
const response = await this._axios.post("GetDefaultValueInfo", request, config);
|
|
1263
|
+
base.WebApiBase.SetCompleted(options);
|
|
1264
|
+
const res = converters.Create_ErpSyncDefaultValue_From(response.data);
|
|
1265
|
+
resolve(res);
|
|
1266
|
+
}
|
|
1267
|
+
catch (err) {
|
|
1268
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1269
|
+
reject(err);
|
|
1270
|
+
}
|
|
1271
|
+
});
|
|
1272
|
+
}
|
|
1273
|
+
async getDefaultValueInfoAsync(erpFieldId, webapi_options) {
|
|
1274
|
+
let _request = null;
|
|
1275
|
+
let _options = null;
|
|
1276
|
+
const first = erpFieldId;
|
|
1277
|
+
if (typeof (first) === "object" && first && (typeof (first.erpFieldId) != 'undefined')) {
|
|
1278
|
+
_request = erpFieldId;
|
|
1279
|
+
_options = webapi_options;
|
|
1280
|
+
}
|
|
1281
|
+
else {
|
|
1282
|
+
_request = {
|
|
1283
|
+
erpFieldId: erpFieldId,
|
|
1284
|
+
};
|
|
1285
|
+
_options = webapi_options;
|
|
1286
|
+
}
|
|
1287
|
+
return this._getDefaultValueInfoAsync(_request, _options);
|
|
1288
|
+
}
|
|
1289
|
+
async _syncAllAsync(options) {
|
|
1290
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1291
|
+
base.WebApiBase.SetPending(options);
|
|
1292
|
+
return new Promise(async (resolve, reject) => {
|
|
1293
|
+
try {
|
|
1294
|
+
config.baseURL = this._options.baseUrl;
|
|
1295
|
+
const response = await this._axios.post("SyncAll", undefined, config);
|
|
1296
|
+
base.WebApiBase.SetCompleted(options);
|
|
1297
|
+
const res = converters.Create_PluginResponse_From(response.data);
|
|
1298
|
+
resolve(res);
|
|
1299
|
+
}
|
|
1300
|
+
catch (err) {
|
|
1301
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1302
|
+
reject(err);
|
|
1303
|
+
}
|
|
1304
|
+
});
|
|
1305
|
+
}
|
|
1306
|
+
/**
|
|
1307
|
+
* Sync all active connections
|
|
1308
|
+
* @returns The response
|
|
1309
|
+
*/
|
|
1310
|
+
async syncAllAsync(webapi_options) {
|
|
1311
|
+
return this._syncAllAsync(webapi_options);
|
|
1312
|
+
}
|
|
1313
|
+
async _forceSyncAllAsync(options) {
|
|
1314
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1315
|
+
base.WebApiBase.SetPending(options);
|
|
1316
|
+
return new Promise(async (resolve, reject) => {
|
|
1317
|
+
try {
|
|
1318
|
+
config.baseURL = this._options.baseUrl;
|
|
1319
|
+
const response = await this._axios.post("ForceSyncAll", undefined, config);
|
|
1320
|
+
base.WebApiBase.SetCompleted(options);
|
|
1321
|
+
const res = converters.Create_PluginResponse_From(response.data);
|
|
1322
|
+
resolve(res);
|
|
1323
|
+
}
|
|
1324
|
+
catch (err) {
|
|
1325
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1326
|
+
reject(err);
|
|
1327
|
+
}
|
|
1328
|
+
});
|
|
1329
|
+
}
|
|
1330
|
+
/**
|
|
1331
|
+
* Sync all active connections even when automatic sync is off
|
|
1332
|
+
* @returns The response
|
|
1333
|
+
*/
|
|
1334
|
+
async forceSyncAllAsync(webapi_options) {
|
|
1335
|
+
return this._forceSyncAllAsync(webapi_options);
|
|
1336
|
+
}
|
|
1337
|
+
async _forceResyncAsync(request, options) {
|
|
1338
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1339
|
+
base.WebApiBase.SetPending(options);
|
|
1340
|
+
return new Promise(async (resolve, reject) => {
|
|
1341
|
+
try {
|
|
1342
|
+
config.baseURL = this._options.baseUrl;
|
|
1343
|
+
const response = await this._axios.post("ForceResync", request, config);
|
|
1344
|
+
base.WebApiBase.SetCompleted(options);
|
|
1345
|
+
const res = converters.Create_PluginResponse_From(response.data);
|
|
1346
|
+
resolve(res);
|
|
1347
|
+
}
|
|
1348
|
+
catch (err) {
|
|
1349
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1350
|
+
reject(err);
|
|
1351
|
+
}
|
|
1352
|
+
});
|
|
1353
|
+
}
|
|
1354
|
+
async forceResyncAsync(erpConnectionId, internalKeyIds, webapi_options) {
|
|
1355
|
+
let _request = null;
|
|
1356
|
+
let _options = null;
|
|
1357
|
+
const first = erpConnectionId;
|
|
1358
|
+
if (typeof (first) === "object" && first && (typeof (first.erpConnectionId) != 'undefined' || typeof (first.internalKeyIds) != 'undefined')) {
|
|
1359
|
+
_request = erpConnectionId;
|
|
1360
|
+
_options = internalKeyIds;
|
|
1361
|
+
}
|
|
1362
|
+
else {
|
|
1363
|
+
_request = {
|
|
1364
|
+
erpConnectionId: erpConnectionId,
|
|
1365
|
+
internalKeyIds: internalKeyIds,
|
|
1366
|
+
};
|
|
1367
|
+
_options = webapi_options;
|
|
1368
|
+
}
|
|
1369
|
+
return this._forceResyncAsync(_request, _options);
|
|
1370
|
+
}
|
|
1371
|
+
async _forceResyncNoBlankValuesAsync(request, options) {
|
|
1372
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1373
|
+
base.WebApiBase.SetPending(options);
|
|
1374
|
+
return new Promise(async (resolve, reject) => {
|
|
1375
|
+
try {
|
|
1376
|
+
config.baseURL = this._options.baseUrl;
|
|
1377
|
+
const response = await this._axios.post("ForceResyncNoBlankValues", request, config);
|
|
1378
|
+
base.WebApiBase.SetCompleted(options);
|
|
1379
|
+
const res = converters.Create_PluginResponse_From(response.data);
|
|
1380
|
+
resolve(res);
|
|
1381
|
+
}
|
|
1382
|
+
catch (err) {
|
|
1383
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1384
|
+
reject(err);
|
|
1385
|
+
}
|
|
1386
|
+
});
|
|
1387
|
+
}
|
|
1388
|
+
async forceResyncNoBlankValuesAsync(erpConnectionId, internalKeyIds, webapi_options) {
|
|
1389
|
+
let _request = null;
|
|
1390
|
+
let _options = null;
|
|
1391
|
+
const first = erpConnectionId;
|
|
1392
|
+
if (typeof (first) === "object" && first && (typeof (first.erpConnectionId) != 'undefined' || typeof (first.internalKeyIds) != 'undefined')) {
|
|
1393
|
+
_request = erpConnectionId;
|
|
1394
|
+
_options = internalKeyIds;
|
|
1395
|
+
}
|
|
1396
|
+
else {
|
|
1397
|
+
_request = {
|
|
1398
|
+
erpConnectionId: erpConnectionId,
|
|
1399
|
+
internalKeyIds: internalKeyIds,
|
|
1400
|
+
};
|
|
1401
|
+
_options = webapi_options;
|
|
1402
|
+
}
|
|
1403
|
+
return this._forceResyncNoBlankValuesAsync(_request, _options);
|
|
1404
|
+
}
|
|
1405
|
+
async _forceResyncBatchTaskAsync(request, options) {
|
|
1406
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1407
|
+
base.WebApiBase.SetPending(options);
|
|
1408
|
+
return new Promise(async (resolve, reject) => {
|
|
1409
|
+
try {
|
|
1410
|
+
config.baseURL = this._options.baseUrl;
|
|
1411
|
+
const response = await this._axios.post("ForceResyncBatchTask", request, config);
|
|
1412
|
+
base.WebApiBase.SetCompleted(options);
|
|
1413
|
+
const res = response.data;
|
|
1414
|
+
resolve(res);
|
|
1415
|
+
}
|
|
1416
|
+
catch (err) {
|
|
1417
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1418
|
+
reject(err);
|
|
1419
|
+
}
|
|
1420
|
+
});
|
|
1421
|
+
}
|
|
1422
|
+
async forceResyncBatchTaskAsync(erpConnectionId, internalKeyIds, webapi_options) {
|
|
1423
|
+
let _request = null;
|
|
1424
|
+
let _options = null;
|
|
1425
|
+
const first = erpConnectionId;
|
|
1426
|
+
if (typeof (first) === "object" && first && (typeof (first.erpConnectionId) != 'undefined' || typeof (first.internalKeyIds) != 'undefined')) {
|
|
1427
|
+
_request = erpConnectionId;
|
|
1428
|
+
_options = internalKeyIds;
|
|
1429
|
+
}
|
|
1430
|
+
else {
|
|
1431
|
+
_request = {
|
|
1432
|
+
erpConnectionId: erpConnectionId,
|
|
1433
|
+
internalKeyIds: internalKeyIds,
|
|
1434
|
+
};
|
|
1435
|
+
_options = webapi_options;
|
|
1436
|
+
}
|
|
1437
|
+
return this._forceResyncBatchTaskAsync(_request, _options);
|
|
1438
|
+
}
|
|
1439
|
+
async _forceResyncExternalAsync(request, options) {
|
|
1440
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1441
|
+
base.WebApiBase.SetPending(options);
|
|
1442
|
+
return new Promise(async (resolve, reject) => {
|
|
1443
|
+
try {
|
|
1444
|
+
config.baseURL = this._options.baseUrl;
|
|
1445
|
+
const response = await this._axios.post("ForceResyncExternal", request, config);
|
|
1446
|
+
base.WebApiBase.SetCompleted(options);
|
|
1447
|
+
const res = converters.Create_PluginResponse_From(response.data);
|
|
1448
|
+
resolve(res);
|
|
1449
|
+
}
|
|
1450
|
+
catch (err) {
|
|
1451
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1452
|
+
reject(err);
|
|
1453
|
+
}
|
|
1454
|
+
});
|
|
1455
|
+
}
|
|
1456
|
+
async forceResyncExternalAsync(erpConnectionId, erpActorType, externalKeys, webapi_options) {
|
|
1457
|
+
let _request = null;
|
|
1458
|
+
let _options = null;
|
|
1459
|
+
const first = erpConnectionId;
|
|
1460
|
+
if (typeof (first) === "object" && first && (typeof (first.erpConnectionId) != 'undefined' || typeof (first.erpActorType) != 'undefined' || typeof (first.externalKeys) != 'undefined')) {
|
|
1461
|
+
_request = erpConnectionId;
|
|
1462
|
+
_options = erpActorType;
|
|
1463
|
+
}
|
|
1464
|
+
else {
|
|
1465
|
+
_request = {
|
|
1466
|
+
erpConnectionId: erpConnectionId,
|
|
1467
|
+
erpActorType: erpActorType,
|
|
1468
|
+
externalKeys: externalKeys,
|
|
1469
|
+
};
|
|
1470
|
+
_options = webapi_options;
|
|
1471
|
+
}
|
|
1472
|
+
return this._forceResyncExternalAsync(_request, _options);
|
|
1473
|
+
}
|
|
1474
|
+
async _forceResyncExternalNoBlankValuesAsync(request, options) {
|
|
1475
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1476
|
+
base.WebApiBase.SetPending(options);
|
|
1477
|
+
return new Promise(async (resolve, reject) => {
|
|
1478
|
+
try {
|
|
1479
|
+
config.baseURL = this._options.baseUrl;
|
|
1480
|
+
const response = await this._axios.post("ForceResyncExternalNoBlankValues", request, config);
|
|
1481
|
+
base.WebApiBase.SetCompleted(options);
|
|
1482
|
+
const res = converters.Create_PluginResponse_From(response.data);
|
|
1483
|
+
resolve(res);
|
|
1484
|
+
}
|
|
1485
|
+
catch (err) {
|
|
1486
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1487
|
+
reject(err);
|
|
1488
|
+
}
|
|
1489
|
+
});
|
|
1490
|
+
}
|
|
1491
|
+
async forceResyncExternalNoBlankValuesAsync(erpConnectionId, erpActorType, externalKeys, webapi_options) {
|
|
1492
|
+
let _request = null;
|
|
1493
|
+
let _options = null;
|
|
1494
|
+
const first = erpConnectionId;
|
|
1495
|
+
if (typeof (first) === "object" && first && (typeof (first.erpConnectionId) != 'undefined' || typeof (first.erpActorType) != 'undefined' || typeof (first.externalKeys) != 'undefined')) {
|
|
1496
|
+
_request = erpConnectionId;
|
|
1497
|
+
_options = erpActorType;
|
|
1498
|
+
}
|
|
1499
|
+
else {
|
|
1500
|
+
_request = {
|
|
1501
|
+
erpConnectionId: erpConnectionId,
|
|
1502
|
+
erpActorType: erpActorType,
|
|
1503
|
+
externalKeys: externalKeys,
|
|
1504
|
+
};
|
|
1505
|
+
_options = webapi_options;
|
|
1506
|
+
}
|
|
1507
|
+
return this._forceResyncExternalNoBlankValuesAsync(_request, _options);
|
|
1508
|
+
}
|
|
1509
|
+
async _getEngineStatusAsync(options) {
|
|
1510
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1511
|
+
base.WebApiBase.SetPending(options);
|
|
1512
|
+
return new Promise(async (resolve, reject) => {
|
|
1513
|
+
try {
|
|
1514
|
+
config.baseURL = this._options.baseUrl;
|
|
1515
|
+
const response = await this._axios.post("GetEngineStatus", undefined, config);
|
|
1516
|
+
base.WebApiBase.SetCompleted(options);
|
|
1517
|
+
const res = converters.Create_ErpSyncEngineStatus_From(response.data);
|
|
1518
|
+
resolve(res);
|
|
1519
|
+
}
|
|
1520
|
+
catch (err) {
|
|
1521
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1522
|
+
reject(err);
|
|
1523
|
+
}
|
|
1524
|
+
});
|
|
1525
|
+
}
|
|
1526
|
+
/**
|
|
1527
|
+
* Get the current status of the Sync engine
|
|
1528
|
+
* @returns The current status of the engine
|
|
1529
|
+
*/
|
|
1530
|
+
async getEngineStatusAsync(webapi_options) {
|
|
1531
|
+
return this._getEngineStatusAsync(webapi_options);
|
|
1532
|
+
}
|
|
1533
|
+
async _changeEngineStatusAsync(request, options) {
|
|
1534
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1535
|
+
base.WebApiBase.SetPending(options);
|
|
1536
|
+
return new Promise(async (resolve, reject) => {
|
|
1537
|
+
try {
|
|
1538
|
+
config.baseURL = this._options.baseUrl;
|
|
1539
|
+
const response = await this._axios.post("ChangeEngineStatus", request, config);
|
|
1540
|
+
base.WebApiBase.SetCompleted(options);
|
|
1541
|
+
const res = converters.Create_ErpSyncEngineStatus_From(response.data);
|
|
1542
|
+
resolve(res);
|
|
1543
|
+
}
|
|
1544
|
+
catch (err) {
|
|
1545
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1546
|
+
reject(err);
|
|
1547
|
+
}
|
|
1548
|
+
});
|
|
1549
|
+
}
|
|
1550
|
+
async changeEngineStatusAsync(run, webapi_options) {
|
|
1551
|
+
let _request = null;
|
|
1552
|
+
let _options = null;
|
|
1553
|
+
const first = run;
|
|
1554
|
+
if (typeof (first) === "object" && first && (typeof (first.run) != 'undefined')) {
|
|
1555
|
+
_request = run;
|
|
1556
|
+
_options = webapi_options;
|
|
1557
|
+
}
|
|
1558
|
+
else {
|
|
1559
|
+
_request = {
|
|
1560
|
+
run: run,
|
|
1561
|
+
};
|
|
1562
|
+
_options = webapi_options;
|
|
1563
|
+
}
|
|
1564
|
+
return this._changeEngineStatusAsync(_request, _options);
|
|
1565
|
+
}
|
|
1566
|
+
async _changeEngineIntervalAsync(request, options) {
|
|
1567
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1568
|
+
base.WebApiBase.SetPending(options);
|
|
1569
|
+
return new Promise(async (resolve, reject) => {
|
|
1570
|
+
try {
|
|
1571
|
+
config.baseURL = this._options.baseUrl;
|
|
1572
|
+
const response = await this._axios.post("ChangeEngineInterval", request, config);
|
|
1573
|
+
base.WebApiBase.SetCompleted(options);
|
|
1574
|
+
const res = response.data;
|
|
1575
|
+
resolve(res);
|
|
1576
|
+
}
|
|
1577
|
+
catch (err) {
|
|
1578
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1579
|
+
reject(err);
|
|
1580
|
+
}
|
|
1581
|
+
});
|
|
1582
|
+
}
|
|
1583
|
+
async changeEngineIntervalAsync(interval, webapi_options) {
|
|
1584
|
+
let _request = null;
|
|
1585
|
+
let _options = null;
|
|
1586
|
+
const first = interval;
|
|
1587
|
+
if (typeof (first) === "object" && first && (typeof (first.interval) != 'undefined')) {
|
|
1588
|
+
_request = interval;
|
|
1589
|
+
_options = webapi_options;
|
|
1590
|
+
}
|
|
1591
|
+
else {
|
|
1592
|
+
_request = {
|
|
1593
|
+
interval: interval,
|
|
1594
|
+
};
|
|
1595
|
+
_options = webapi_options;
|
|
1596
|
+
}
|
|
1597
|
+
return this._changeEngineIntervalAsync(_request, _options);
|
|
1598
|
+
}
|
|
1599
|
+
} // class v1ErpSyncAgentController
|
|
1600
|
+
exports.ErpSyncAgent = ErpSyncAgent;
|
|
1601
|
+
//# sourceMappingURL=ErpSyncAgent.js.map
|