@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,2658 @@
|
|
|
1
|
+
// <auto-generated>
|
|
2
|
+
// SuperOffice Code Generator
|
|
3
|
+
// modelling\templates\servicestswebapi\tswebapiagents.tt
|
|
4
|
+
// </auto-generated>
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
/* tslint:disable */
|
|
8
|
+
//----------------------------------------------------------------------------
|
|
9
|
+
// G E N E R A T E D F I L E ! D O N O T E D I T !
|
|
10
|
+
//----------------------------------------------------------------------------
|
|
11
|
+
//
|
|
12
|
+
// File: WebApi/ErpSyncAgent.ts
|
|
13
|
+
//
|
|
14
|
+
//----------------------------------------------------------------------------
|
|
15
|
+
// Copyright (C) SuperOffice AS
|
|
16
|
+
//----------------------------------------------------------------------------
|
|
17
|
+
|
|
18
|
+
import { AxiosRequestConfig } from 'axios';
|
|
19
|
+
import { Duration } from 'dayjs/plugin/duration';
|
|
20
|
+
import * as enums from './Enums.js';
|
|
21
|
+
import * as base from './WebApiBase.js';
|
|
22
|
+
import * as carriers from './Carriers.js';
|
|
23
|
+
import * as converters from './Converters.js';
|
|
24
|
+
import { FromBase64ToString, ToBase64 } from './Base64.js';
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Services for the ERP Integration Services feature
|
|
28
|
+
*
|
|
29
|
+
* **Online Restricted:** This agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for ERP integration apps.
|
|
30
|
+
*/
|
|
31
|
+
export interface IErpSyncAgent {
|
|
32
|
+
createDefaultErpSyncConnectorEntityAsync(): Promise< carriers.ErpSyncConnectorEntity >;
|
|
33
|
+
saveErpSyncConnectorEntityAsync(entity: carriers.ErpSyncConnectorEntity) : Promise< carriers.ErpSyncConnectorEntity >;
|
|
34
|
+
deleteErpSyncConnectorEntityAsync(ErpSyncConnectorEntityId: number) : Promise<void>;
|
|
35
|
+
getConnectionAsync(request: carriers.ErpSync_GetConnectionRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpConnection >;
|
|
36
|
+
getConnectionAsync(erpConnectionId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpConnection >;
|
|
37
|
+
saveConnectionAsync(request: carriers.ErpSync_SaveConnectionRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpConnection >;
|
|
38
|
+
saveConnectionAsync(connection: carriers.ErpConnection, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpConnection >;
|
|
39
|
+
deleteConnectionAsync(request: carriers.ErpSync_DeleteConnectionRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
40
|
+
deleteConnectionAsync(erpConnectionId: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
41
|
+
getConfigurationFieldsAsync(request: carriers.ErpSync_GetConfigurationFieldsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FieldMetadata[] >;
|
|
42
|
+
getConfigurationFieldsAsync(erpConnectorId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FieldMetadata[] >;
|
|
43
|
+
getErpConnectionConfigFieldsAsync(request: carriers.ErpSync_GetErpConnectionConfigFieldsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.StringDictionary >;
|
|
44
|
+
getErpConnectionConfigFieldsAsync(erpConnectionId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.StringDictionary >;
|
|
45
|
+
toggleErpConnectionActiveAsync(request: carriers.ErpSync_ToggleErpConnectionActiveRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string[] >;
|
|
46
|
+
toggleErpConnectionActiveAsync(erpConnectionId: number, webapi_options?:base.WebApiRequestOptions) : Promise< string[] >;
|
|
47
|
+
testConnectionByIdAsync(request: carriers.ErpSync_TestConnectionByIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
48
|
+
testConnectionByIdAsync(erpConnectionId: number, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
49
|
+
testConnectionByConfigAsync(request: carriers.ErpSync_TestConnectionByConfigRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
50
|
+
testConnectionByConfigAsync(erpConnectionId: number, configFields: carriers.StringDictionary, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
51
|
+
saveErpConnectionSyncPrioritiesAsync(request: carriers.ErpSync_SaveErpConnectionSyncPrioritiesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
52
|
+
saveErpConnectionSyncPrioritiesAsync(erpConnectionIds: number[], webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
53
|
+
moveErpFieldItemAsync(request: carriers.ErpSync_MoveErpFieldItemRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
54
|
+
moveErpFieldItemAsync(erpFieldId: number, direction: number, erpConnectionId: number, erpActorType: enums.ErpActorType, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
55
|
+
supportsAdvancedSearchAsync(request: carriers.ErpSync_SupportsAdvancedSearchRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
56
|
+
supportsAdvancedSearchAsync(erpConnectionId: number, erpActorType: enums.ErpActorType, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
57
|
+
getAllConnectorsAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ListItem[] >;
|
|
58
|
+
getAllConnectionsAsync(request: carriers.ErpSync_GetAllConnectionsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpConnection[] >;
|
|
59
|
+
getAllConnectionsAsync(includeDeleted: boolean, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpConnection[] >;
|
|
60
|
+
getConnectionsAndDisplayFieldsAsync(request: carriers.ErpSync_GetConnectionsAndDisplayFieldsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpConnectionData[] >;
|
|
61
|
+
getConnectionsAndDisplayFieldsAsync(crmActorType: enums.CrmActorType, entityId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpConnectionData[] >;
|
|
62
|
+
getErpFieldValuesAsync(request: carriers.ErpSync_GetErpFieldValuesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string[] >;
|
|
63
|
+
getErpFieldValuesAsync(erpConnectionId: number, crmActorType: enums.CrmActorType, entityId: number, fieldKeys: string[], webapi_options?:base.WebApiRequestOptions) : Promise< string[] >;
|
|
64
|
+
getFieldsForNewErpActorAsync(request: carriers.ErpSync_GetFieldsForNewErpActorRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FieldMetadata[] >;
|
|
65
|
+
getFieldsForNewErpActorAsync(erpConnectionId: number, erpActorType: enums.ErpActorType, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FieldMetadata[] >;
|
|
66
|
+
getConnectionListMappingsAsync(request: carriers.ErpSync_GetConnectionListMappingsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpConnectionListMappingContainer >;
|
|
67
|
+
getConnectionListMappingsAsync(erpConnectionId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpConnectionListMappingContainer >;
|
|
68
|
+
saveConnectionListMappingsAsync(request: carriers.ErpSync_SaveConnectionListMappingsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpConnectionListMappingContainer >;
|
|
69
|
+
saveConnectionListMappingsAsync(listMapping: carriers.ErpConnectionListMappingContainer, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpConnectionListMappingContainer >;
|
|
70
|
+
connectActorAsync(request: carriers.ErpSync_ConnectActorRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
71
|
+
connectActorAsync(erpConnectionId: number, crmRecordId: number, crmActorType: enums.CrmActorType, erpKey: string, erpActorType: enums.ErpActorType, fieldValues: carriers.ErpSyncFieldValue[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
72
|
+
tryConnectActorAsync(request: carriers.ErpSync_TryConnectActorRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
73
|
+
tryConnectActorAsync(erpConnectionId: number, crmRecordId: number, crmActorType: enums.CrmActorType, erpKey: string, erpActorType: enums.ErpActorType, fieldValues: carriers.ErpSyncFieldValue[], webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
74
|
+
getFieldValuesFromCrmAsync(request: carriers.ErpSync_GetFieldValuesFromCrmRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncFieldValue[] >;
|
|
75
|
+
getFieldValuesFromCrmAsync(recordId: number, actorTypeCrm: enums.CrmActorType, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncFieldValue[] >;
|
|
76
|
+
getFieldValuesFromErpAsync(request: carriers.ErpSync_GetFieldValuesFromErpRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncFieldValue[] >;
|
|
77
|
+
getFieldValuesFromErpAsync(erpConnectionId: number, actorTypeErp: enums.ErpActorType, erpKey: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncFieldValue[] >;
|
|
78
|
+
getActorTypeMappingAsync(request: carriers.ErpSync_GetActorTypeMappingRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncActorTypeMapping >;
|
|
79
|
+
getActorTypeMappingAsync(erpConnectionId: number, actorType: enums.ErpActorType, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncActorTypeMapping >;
|
|
80
|
+
createActorLinkAsync(request: carriers.ErpSync_CreateActorLinkRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
81
|
+
createActorLinkAsync(erpConnectionId: number, crmRecordId: number, crmActorType: enums.CrmActorType, erpKey: string, erpActorType: enums.ErpActorType, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
82
|
+
breakActorLinkAsync(request: carriers.ErpSync_BreakActorLinkRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
83
|
+
breakActorLinkAsync(erpConnectionId: number, crmRecordId: number, crmActorType: enums.CrmActorType, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
84
|
+
createErpActorFromCrmAsync(request: carriers.ErpSync_CreateErpActorFromCrmRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
85
|
+
createErpActorFromCrmAsync(connectionId: number, crmEntityId: number, erpActorType: enums.ErpActorType, crmActorType: enums.CrmActorType, erpFieldKeyValues: carriers.StringDictionary, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
86
|
+
saveActorTypeMappingAsync(request: carriers.ErpSync_SaveActorTypeMappingRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncActorTypeMapping >;
|
|
87
|
+
saveActorTypeMappingAsync(mapping: carriers.ErpSyncActorTypeMapping, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncActorTypeMapping >;
|
|
88
|
+
validateArchiveColumnConfigAsync(request: carriers.ErpSync_ValidateArchiveColumnConfigRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
89
|
+
validateArchiveColumnConfigAsync(listOwner: string, erpConnectionId: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
90
|
+
updateConnectionFieldsAsync(request: carriers.ErpSync_UpdateConnectionFieldsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
91
|
+
updateConnectionFieldsAsync(erpConnectionId: number, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
92
|
+
getCrmActorTypeAsync(request: carriers.ErpSync_GetCrmActorTypeRequest, webapi_options?:base.WebApiRequestOptions) : Promise< enums.CrmActorType >;
|
|
93
|
+
getCrmActorTypeAsync(erpConnectionId: number, erpActorType: enums.ErpActorType, webapi_options?:base.WebApiRequestOptions) : Promise< enums.CrmActorType >;
|
|
94
|
+
getErpSyncConnectionSummaryAsync(request: carriers.ErpSync_GetErpSyncConnectionSummaryRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncConnectionSummary >;
|
|
95
|
+
getErpSyncConnectionSummaryAsync(erpSyncConnectionId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncConnectionSummary >;
|
|
96
|
+
getErpSyncConnectorEntityAsync(erpSyncConnectorEntityId: number) : Promise< carriers.ErpSyncConnectorEntity >;
|
|
97
|
+
canDeleteErpSyncConnectorEntityAsync(request: carriers.ErpSync_CanDeleteErpSyncConnectorEntityRequest, webapi_options?:base.WebApiRequestOptions) : Promise< enums.ErpSyncResponseCode >;
|
|
98
|
+
canDeleteErpSyncConnectorEntityAsync(erpSyncConnectorId: number, webapi_options?:base.WebApiRequestOptions) : Promise< enums.ErpSyncResponseCode >;
|
|
99
|
+
testConnectorUrlAsync(request: carriers.ErpSync_TestConnectorUrlRequest, webapi_options?:base.WebApiRequestOptions) : Promise< enums.ErpSyncResponseCode >;
|
|
100
|
+
testConnectorUrlAsync(url: string, webapi_options?:base.WebApiRequestOptions) : Promise< enums.ErpSyncResponseCode >;
|
|
101
|
+
saveDefaultValueInfoAsync(request: carriers.ErpSync_SaveDefaultValueInfoRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncDefaultValue >;
|
|
102
|
+
saveDefaultValueInfoAsync(erpSyncDefaultValue: carriers.ErpSyncDefaultValue, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncDefaultValue >;
|
|
103
|
+
getDefaultValueInfoAsync(request: carriers.ErpSync_GetDefaultValueInfoRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncDefaultValue >;
|
|
104
|
+
getDefaultValueInfoAsync(erpFieldId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncDefaultValue >;
|
|
105
|
+
syncAllAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PluginResponse >;
|
|
106
|
+
forceSyncAllAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PluginResponse >;
|
|
107
|
+
forceResyncAsync(request: carriers.ErpSync_ForceResyncRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PluginResponse >;
|
|
108
|
+
forceResyncAsync(erpConnectionId: number, internalKeyIds: number[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PluginResponse >;
|
|
109
|
+
forceResyncNoBlankValuesAsync(request: carriers.ErpSync_ForceResyncNoBlankValuesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PluginResponse >;
|
|
110
|
+
forceResyncNoBlankValuesAsync(erpConnectionId: number, internalKeyIds: number[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PluginResponse >;
|
|
111
|
+
forceResyncBatchTaskAsync(request: carriers.ErpSync_ForceResyncBatchTaskRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
112
|
+
forceResyncBatchTaskAsync(erpConnectionId: number, internalKeyIds: number[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
113
|
+
forceResyncExternalAsync(request: carriers.ErpSync_ForceResyncExternalRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PluginResponse >;
|
|
114
|
+
forceResyncExternalAsync(erpConnectionId: number, erpActorType: enums.ErpActorType, externalKeys: string[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PluginResponse >;
|
|
115
|
+
forceResyncExternalNoBlankValuesAsync(request: carriers.ErpSync_ForceResyncExternalNoBlankValuesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PluginResponse >;
|
|
116
|
+
forceResyncExternalNoBlankValuesAsync(erpConnectionId: number, erpActorType: enums.ErpActorType, externalKeys: string[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PluginResponse >;
|
|
117
|
+
getEngineStatusAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncEngineStatus >;
|
|
118
|
+
changeEngineStatusAsync(request: carriers.ErpSync_ChangeEngineStatusRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncEngineStatus >;
|
|
119
|
+
changeEngineStatusAsync(run: boolean, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncEngineStatus >;
|
|
120
|
+
changeEngineIntervalAsync(request: carriers.ErpSync_ChangeEngineIntervalRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
121
|
+
changeEngineIntervalAsync(interval: Duration, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
122
|
+
} // interface IErpSyncAgent
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Services for the ERP Integration Services feature
|
|
129
|
+
*/
|
|
130
|
+
export class ErpSyncAgent extends base.WebApiBase implements IErpSyncAgent {
|
|
131
|
+
constructor(baseUrl?: string, languageCode?:string, cultureCode?: string);
|
|
132
|
+
constructor(baseUrl?: string, resourceParsing?: base.ResourceParsing);
|
|
133
|
+
constructor(baseUrl: string, resourceManager:any);
|
|
134
|
+
constructor(baseUrl: string, config:AxiosRequestConfig, resourceManager:any);
|
|
135
|
+
constructor(baseUrl: string, config:AxiosRequestConfig, resourceParsing?: base.ResourceParsing);
|
|
136
|
+
constructor(baseUrl: string, config:AxiosRequestConfig, languageCode?:string, cultureCode?: string);
|
|
137
|
+
constructor(options: base.WebApiOptions);
|
|
138
|
+
|
|
139
|
+
constructor(baseUrlOrOptions: string|base.WebApiOptions|undefined,
|
|
140
|
+
langOrconfigOrRM?: string|base.ResourceParsing|AxiosRequestConfig|any,
|
|
141
|
+
langOrResourceOrRM?:string|base.ResourceParsing|any,
|
|
142
|
+
cultureCode?: string,
|
|
143
|
+
) {
|
|
144
|
+
const options = base.WebApiBase.FigureOutOptions(baseUrlOrOptions, langOrconfigOrRM, langOrResourceOrRM, cultureCode);
|
|
145
|
+
options.basePath = "v1/Agents/ErpSync/";
|
|
146
|
+
super(options);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Set default values into a new ErpSyncConnectorEntity.
|
|
153
|
+
* NetServer calculates default values on the entity, which is required when creating/storing a new instance
|
|
154
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
155
|
+
* @returns A blank entity.
|
|
156
|
+
*/
|
|
157
|
+
public async createDefaultErpSyncConnectorEntityAsync(options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncConnectorEntity > {
|
|
158
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
159
|
+
base.WebApiBase.SetPending(options);
|
|
160
|
+
return new Promise< carriers.ErpSyncConnectorEntity >(async (resolve, reject) => {
|
|
161
|
+
try {
|
|
162
|
+
const response = await this._axios.post("CreateDefaultErpSyncConnectorEntity", null, config);
|
|
163
|
+
base.WebApiBase.SetCompleted(options);
|
|
164
|
+
const res : carriers.ErpSyncConnectorEntity = converters.Create_ErpSyncConnectorEntity_From( response.data );
|
|
165
|
+
resolve(res);
|
|
166
|
+
}
|
|
167
|
+
catch( err ) {
|
|
168
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
169
|
+
reject(err);
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
/*
|
|
174
|
+
* Replace the existing ErpSyncConnectorEntity or creates a new ErpSyncConnectorEntity if the id parameter is empty
|
|
175
|
+
* @param entity - The ErpSyncConnectorEntity to be saved.
|
|
176
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
177
|
+
* @returns New or updated ErpSyncConnectorEntity
|
|
178
|
+
*/
|
|
179
|
+
public async saveErpSyncConnectorEntityAsync(entity: carriers.ErpSyncConnectorEntity, options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncConnectorEntity > {
|
|
180
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
181
|
+
base.WebApiBase.SetPending(options);
|
|
182
|
+
return new Promise< carriers.ErpSyncConnectorEntity >(async (resolve, reject) => {
|
|
183
|
+
try {
|
|
184
|
+
const response = await this._axios.post("SaveErpSyncConnectorEntity", entity, config);
|
|
185
|
+
base.WebApiBase.SetCompleted(options);
|
|
186
|
+
const res : carriers.ErpSyncConnectorEntity = converters.Create_ErpSyncConnectorEntity_From( response.data );
|
|
187
|
+
resolve(res);
|
|
188
|
+
}
|
|
189
|
+
catch( err ) {
|
|
190
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
191
|
+
reject(err);
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/*
|
|
197
|
+
* Deletes the ErpSyncConnectorEntity
|
|
198
|
+
* @param ErpSyncConnectorEntityId - The id of the ErpSyncConnectorEntity to be deleted.
|
|
199
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
200
|
+
*/
|
|
201
|
+
public async deleteErpSyncConnectorEntityAsync(ErpSyncConnectorEntityId: number, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
202
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
203
|
+
base.WebApiBase.SetPending(options);
|
|
204
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
205
|
+
try {
|
|
206
|
+
const response = await this._axios.post("DeleteErpSyncConnectorEntity?ErpSyncConnectorEntityId=" + ErpSyncConnectorEntityId, null, config );
|
|
207
|
+
base.WebApiBase.SetCompleted(options);
|
|
208
|
+
const res = response.data;
|
|
209
|
+
resolve(res);
|
|
210
|
+
}
|
|
211
|
+
catch( err ) {
|
|
212
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
213
|
+
reject(err);
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
private async _getConnectionAsync(request: carriers.ErpSync_GetConnectionRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ErpConnection > {
|
|
219
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
220
|
+
base.WebApiBase.SetPending(options);
|
|
221
|
+
return new Promise< carriers.ErpConnection >(async (resolve, reject) => {
|
|
222
|
+
try {
|
|
223
|
+
config.baseURL = this._options.baseUrl;
|
|
224
|
+
const response = await this._axios.post("GetConnection", request , config);
|
|
225
|
+
base.WebApiBase.SetCompleted(options);
|
|
226
|
+
const res : carriers.ErpConnection = converters.Create_ErpConnection_From( response.data );
|
|
227
|
+
resolve(res);
|
|
228
|
+
}
|
|
229
|
+
catch( err ) {
|
|
230
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
231
|
+
reject(err);
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Returns the specified connection.
|
|
240
|
+
* @param request - ErpConnectionId
|
|
241
|
+
* @returns The connection
|
|
242
|
+
*/
|
|
243
|
+
public async getConnectionAsync(request: carriers.ErpSync_GetConnectionRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpConnection >;
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* Returns the specified connection.
|
|
247
|
+
* @param erpConnectionId - Primary key of the connection
|
|
248
|
+
* @returns The connection
|
|
249
|
+
*/
|
|
250
|
+
public async getConnectionAsync(erpConnectionId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpConnection >;
|
|
251
|
+
|
|
252
|
+
public async getConnectionAsync(erpConnectionId:number|carriers.ErpSync_GetConnectionRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpConnection > {
|
|
253
|
+
let _request : carriers.ErpSync_GetConnectionRequest = null;
|
|
254
|
+
let _options : base.WebApiRequestOptions = null;
|
|
255
|
+
const first : any = erpConnectionId;
|
|
256
|
+
if( typeof( first ) === "object" && first && ( typeof(first.erpConnectionId)!='undefined' ) )
|
|
257
|
+
{
|
|
258
|
+
_request = erpConnectionId as carriers.ErpSync_GetConnectionRequest;
|
|
259
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
260
|
+
}
|
|
261
|
+
else
|
|
262
|
+
{
|
|
263
|
+
_request = {
|
|
264
|
+
erpConnectionId: erpConnectionId as number,
|
|
265
|
+
};
|
|
266
|
+
_options = webapi_options;
|
|
267
|
+
}
|
|
268
|
+
return this._getConnectionAsync( _request, _options );
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
private async _saveConnectionAsync(request: carriers.ErpSync_SaveConnectionRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ErpConnection > {
|
|
273
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
274
|
+
base.WebApiBase.SetPending(options);
|
|
275
|
+
return new Promise< carriers.ErpConnection >(async (resolve, reject) => {
|
|
276
|
+
try {
|
|
277
|
+
config.baseURL = this._options.baseUrl;
|
|
278
|
+
const response = await this._axios.post("SaveConnection", request , config);
|
|
279
|
+
base.WebApiBase.SetCompleted(options);
|
|
280
|
+
const res : carriers.ErpConnection = converters.Create_ErpConnection_From( response.data );
|
|
281
|
+
resolve(res);
|
|
282
|
+
}
|
|
283
|
+
catch( err ) {
|
|
284
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
285
|
+
reject(err);
|
|
286
|
+
}
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* Saves a connection to the database.
|
|
294
|
+
* @param request - Connection
|
|
295
|
+
* @returns The resulting connection.
|
|
296
|
+
*/
|
|
297
|
+
public async saveConnectionAsync(request: carriers.ErpSync_SaveConnectionRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpConnection >;
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* Saves a connection to the database.
|
|
301
|
+
* @param connection - The connection to save.
|
|
302
|
+
* @returns The resulting connection.
|
|
303
|
+
*/
|
|
304
|
+
public async saveConnectionAsync(connection: carriers.ErpConnection, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpConnection >;
|
|
305
|
+
|
|
306
|
+
public async saveConnectionAsync(connection:carriers.ErpConnection|carriers.ErpSync_SaveConnectionRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpConnection > {
|
|
307
|
+
let _request : carriers.ErpSync_SaveConnectionRequest = null;
|
|
308
|
+
let _options : base.WebApiRequestOptions = null;
|
|
309
|
+
const first : any = connection;
|
|
310
|
+
if( typeof( first ) === "object" && first && ( typeof(first.connection)!='undefined' ) )
|
|
311
|
+
{
|
|
312
|
+
_request = connection as carriers.ErpSync_SaveConnectionRequest;
|
|
313
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
314
|
+
}
|
|
315
|
+
else
|
|
316
|
+
{
|
|
317
|
+
_request = {
|
|
318
|
+
connection: connection as carriers.ErpConnection,
|
|
319
|
+
};
|
|
320
|
+
_options = webapi_options;
|
|
321
|
+
}
|
|
322
|
+
return this._saveConnectionAsync( _request, _options );
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
private async _deleteConnectionAsync(request: carriers.ErpSync_DeleteConnectionRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
327
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
328
|
+
base.WebApiBase.SetPending(options);
|
|
329
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
330
|
+
try {
|
|
331
|
+
config.baseURL = this._options.baseUrl;
|
|
332
|
+
const response = await this._axios.post("DeleteConnection", request , config);
|
|
333
|
+
base.WebApiBase.SetCompleted(options);
|
|
334
|
+
const res = response.data;
|
|
335
|
+
resolve(res);
|
|
336
|
+
}
|
|
337
|
+
catch( err ) {
|
|
338
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
339
|
+
reject(err);
|
|
340
|
+
}
|
|
341
|
+
});
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* Deletes a connection from the database.
|
|
348
|
+
* @param request - ErpConnectionId
|
|
349
|
+
* @returns A void return
|
|
350
|
+
*/
|
|
351
|
+
public async deleteConnectionAsync(request: carriers.ErpSync_DeleteConnectionRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* Deletes a connection from the database.
|
|
355
|
+
* @param erpConnectionId - Primary key of the connection
|
|
356
|
+
* @returns A void return
|
|
357
|
+
*/
|
|
358
|
+
public async deleteConnectionAsync(erpConnectionId: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
359
|
+
|
|
360
|
+
public async deleteConnectionAsync(erpConnectionId:number|carriers.ErpSync_DeleteConnectionRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
361
|
+
let _request : carriers.ErpSync_DeleteConnectionRequest = null;
|
|
362
|
+
let _options : base.WebApiRequestOptions = null;
|
|
363
|
+
const first : any = erpConnectionId;
|
|
364
|
+
if( typeof( first ) === "object" && first && ( typeof(first.erpConnectionId)!='undefined' ) )
|
|
365
|
+
{
|
|
366
|
+
_request = erpConnectionId as carriers.ErpSync_DeleteConnectionRequest;
|
|
367
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
368
|
+
}
|
|
369
|
+
else
|
|
370
|
+
{
|
|
371
|
+
_request = {
|
|
372
|
+
erpConnectionId: erpConnectionId as number,
|
|
373
|
+
};
|
|
374
|
+
_options = webapi_options;
|
|
375
|
+
}
|
|
376
|
+
return this._deleteConnectionAsync( _request, _options );
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
|
|
380
|
+
private async _getConfigurationFieldsAsync(request: carriers.ErpSync_GetConfigurationFieldsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.FieldMetadata[] > {
|
|
381
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
382
|
+
base.WebApiBase.SetPending(options);
|
|
383
|
+
return new Promise< carriers.FieldMetadata[] >(async (resolve, reject) => {
|
|
384
|
+
try {
|
|
385
|
+
config.baseURL = this._options.baseUrl;
|
|
386
|
+
const response = await this._axios.post("GetConfigurationFields", request , config);
|
|
387
|
+
base.WebApiBase.SetCompleted(options);
|
|
388
|
+
const res : carriers.FieldMetadata[] = converters.Create_FieldMetadataArray_From( response.data );
|
|
389
|
+
resolve(res);
|
|
390
|
+
}
|
|
391
|
+
catch( err ) {
|
|
392
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
393
|
+
reject(err);
|
|
394
|
+
}
|
|
395
|
+
});
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
|
|
400
|
+
/**
|
|
401
|
+
* Returns all fields needed to connect to the given connector
|
|
402
|
+
* @param request - ErpConnectorId
|
|
403
|
+
* @returns The fields
|
|
404
|
+
*/
|
|
405
|
+
public async getConfigurationFieldsAsync(request: carriers.ErpSync_GetConfigurationFieldsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FieldMetadata[] >;
|
|
406
|
+
|
|
407
|
+
/**
|
|
408
|
+
* Returns all fields needed to connect to the given connector
|
|
409
|
+
* @param erpConnectorId - The id of the erp connector
|
|
410
|
+
* @returns The fields
|
|
411
|
+
*/
|
|
412
|
+
public async getConfigurationFieldsAsync(erpConnectorId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FieldMetadata[] >;
|
|
413
|
+
|
|
414
|
+
public async getConfigurationFieldsAsync(erpConnectorId:number|carriers.ErpSync_GetConfigurationFieldsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FieldMetadata[] > {
|
|
415
|
+
let _request : carriers.ErpSync_GetConfigurationFieldsRequest = null;
|
|
416
|
+
let _options : base.WebApiRequestOptions = null;
|
|
417
|
+
const first : any = erpConnectorId;
|
|
418
|
+
if( typeof( first ) === "object" && first && ( typeof(first.erpConnectorId)!='undefined' ) )
|
|
419
|
+
{
|
|
420
|
+
_request = erpConnectorId as carriers.ErpSync_GetConfigurationFieldsRequest;
|
|
421
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
422
|
+
}
|
|
423
|
+
else
|
|
424
|
+
{
|
|
425
|
+
_request = {
|
|
426
|
+
erpConnectorId: erpConnectorId as number,
|
|
427
|
+
};
|
|
428
|
+
_options = webapi_options;
|
|
429
|
+
}
|
|
430
|
+
return this._getConfigurationFieldsAsync( _request, _options );
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
private async _getErpConnectionConfigFieldsAsync(request: carriers.ErpSync_GetErpConnectionConfigFieldsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.StringDictionary > {
|
|
435
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
436
|
+
base.WebApiBase.SetPending(options);
|
|
437
|
+
return new Promise< carriers.StringDictionary >(async (resolve, reject) => {
|
|
438
|
+
try {
|
|
439
|
+
config.baseURL = this._options.baseUrl;
|
|
440
|
+
const response = await this._axios.post("GetErpConnectionConfigFields", request , config);
|
|
441
|
+
base.WebApiBase.SetCompleted(options);
|
|
442
|
+
const res : carriers.StringDictionary = converters.Create_StringDictionary_From( response.data );
|
|
443
|
+
resolve(res);
|
|
444
|
+
}
|
|
445
|
+
catch( err ) {
|
|
446
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
447
|
+
reject(err);
|
|
448
|
+
}
|
|
449
|
+
});
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
|
|
454
|
+
/**
|
|
455
|
+
* Returns the config fields for the connection.
|
|
456
|
+
* @param request - ErpConnectionId
|
|
457
|
+
* @returns Config Fields
|
|
458
|
+
*/
|
|
459
|
+
public async getErpConnectionConfigFieldsAsync(request: carriers.ErpSync_GetErpConnectionConfigFieldsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.StringDictionary >;
|
|
460
|
+
|
|
461
|
+
/**
|
|
462
|
+
* Returns the config fields for the connection.
|
|
463
|
+
* @param erpConnectionId - Primary key of the erp connection
|
|
464
|
+
* @returns Config Fields
|
|
465
|
+
*/
|
|
466
|
+
public async getErpConnectionConfigFieldsAsync(erpConnectionId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.StringDictionary >;
|
|
467
|
+
|
|
468
|
+
public async getErpConnectionConfigFieldsAsync(erpConnectionId:number|carriers.ErpSync_GetErpConnectionConfigFieldsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.StringDictionary > {
|
|
469
|
+
let _request : carriers.ErpSync_GetErpConnectionConfigFieldsRequest = null;
|
|
470
|
+
let _options : base.WebApiRequestOptions = null;
|
|
471
|
+
const first : any = erpConnectionId;
|
|
472
|
+
if( typeof( first ) === "object" && first && ( typeof(first.erpConnectionId)!='undefined' ) )
|
|
473
|
+
{
|
|
474
|
+
_request = erpConnectionId as carriers.ErpSync_GetErpConnectionConfigFieldsRequest;
|
|
475
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
476
|
+
}
|
|
477
|
+
else
|
|
478
|
+
{
|
|
479
|
+
_request = {
|
|
480
|
+
erpConnectionId: erpConnectionId as number,
|
|
481
|
+
};
|
|
482
|
+
_options = webapi_options;
|
|
483
|
+
}
|
|
484
|
+
return this._getErpConnectionConfigFieldsAsync( _request, _options );
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
|
|
488
|
+
private async _toggleErpConnectionActiveAsync(request: carriers.ErpSync_ToggleErpConnectionActiveRequest, options?:base.WebApiRequestOptions) : Promise< string[] > {
|
|
489
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
490
|
+
base.WebApiBase.SetPending(options);
|
|
491
|
+
return new Promise< string[] >(async (resolve, reject) => {
|
|
492
|
+
try {
|
|
493
|
+
config.baseURL = this._options.baseUrl;
|
|
494
|
+
const response = await this._axios.post("ToggleErpConnectionActive", request , config);
|
|
495
|
+
base.WebApiBase.SetCompleted(options);
|
|
496
|
+
const res : string[] = response.data as string[];
|
|
497
|
+
resolve(res);
|
|
498
|
+
}
|
|
499
|
+
catch( err ) {
|
|
500
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
501
|
+
reject(err);
|
|
502
|
+
}
|
|
503
|
+
});
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
|
|
507
|
+
|
|
508
|
+
/**
|
|
509
|
+
* Toggles the Active state of the connection
|
|
510
|
+
* @param request - ErpConnectionId
|
|
511
|
+
* @returns Contains the reason for why the toggle failed. Empty if operation was successful
|
|
512
|
+
*/
|
|
513
|
+
public async toggleErpConnectionActiveAsync(request: carriers.ErpSync_ToggleErpConnectionActiveRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string[] >;
|
|
514
|
+
|
|
515
|
+
/**
|
|
516
|
+
* Toggles the Active state of the connection
|
|
517
|
+
* @param erpConnectionId - Primary key of the erp connection
|
|
518
|
+
* @returns Contains the reason for why the toggle failed. Empty if operation was successful
|
|
519
|
+
*/
|
|
520
|
+
public async toggleErpConnectionActiveAsync(erpConnectionId: number, webapi_options?:base.WebApiRequestOptions) : Promise< string[] >;
|
|
521
|
+
|
|
522
|
+
public async toggleErpConnectionActiveAsync(erpConnectionId:number|carriers.ErpSync_ToggleErpConnectionActiveRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string[] > {
|
|
523
|
+
let _request : carriers.ErpSync_ToggleErpConnectionActiveRequest = null;
|
|
524
|
+
let _options : base.WebApiRequestOptions = null;
|
|
525
|
+
const first : any = erpConnectionId;
|
|
526
|
+
if( typeof( first ) === "object" && first && ( typeof(first.erpConnectionId)!='undefined' ) )
|
|
527
|
+
{
|
|
528
|
+
_request = erpConnectionId as carriers.ErpSync_ToggleErpConnectionActiveRequest;
|
|
529
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
530
|
+
}
|
|
531
|
+
else
|
|
532
|
+
{
|
|
533
|
+
_request = {
|
|
534
|
+
erpConnectionId: erpConnectionId as number,
|
|
535
|
+
};
|
|
536
|
+
_options = webapi_options;
|
|
537
|
+
}
|
|
538
|
+
return this._toggleErpConnectionActiveAsync( _request, _options );
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
|
|
542
|
+
private async _testConnectionByIdAsync(request: carriers.ErpSync_TestConnectionByIdRequest, options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
543
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
544
|
+
base.WebApiBase.SetPending(options);
|
|
545
|
+
return new Promise< boolean >(async (resolve, reject) => {
|
|
546
|
+
try {
|
|
547
|
+
config.baseURL = this._options.baseUrl;
|
|
548
|
+
const response = await this._axios.post("TestConnectionById", request , config);
|
|
549
|
+
base.WebApiBase.SetCompleted(options);
|
|
550
|
+
const res : boolean = response.data as boolean;
|
|
551
|
+
resolve(res);
|
|
552
|
+
}
|
|
553
|
+
catch( err ) {
|
|
554
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
555
|
+
reject(err);
|
|
556
|
+
}
|
|
557
|
+
});
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
|
|
561
|
+
|
|
562
|
+
/**
|
|
563
|
+
* Tests to see if we can establish a connection with the given config fields
|
|
564
|
+
* @param request - ErpConnectionId
|
|
565
|
+
* @returns Returns true if success
|
|
566
|
+
*/
|
|
567
|
+
public async testConnectionByIdAsync(request: carriers.ErpSync_TestConnectionByIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
568
|
+
|
|
569
|
+
/**
|
|
570
|
+
* Tests to see if we can establish a connection with the given config fields
|
|
571
|
+
* @param erpConnectionId - The id of the connection
|
|
572
|
+
* @returns Returns true if success
|
|
573
|
+
*/
|
|
574
|
+
public async testConnectionByIdAsync(erpConnectionId: number, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
575
|
+
|
|
576
|
+
public async testConnectionByIdAsync(erpConnectionId:number|carriers.ErpSync_TestConnectionByIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
577
|
+
let _request : carriers.ErpSync_TestConnectionByIdRequest = null;
|
|
578
|
+
let _options : base.WebApiRequestOptions = null;
|
|
579
|
+
const first : any = erpConnectionId;
|
|
580
|
+
if( typeof( first ) === "object" && first && ( typeof(first.erpConnectionId)!='undefined' ) )
|
|
581
|
+
{
|
|
582
|
+
_request = erpConnectionId as carriers.ErpSync_TestConnectionByIdRequest;
|
|
583
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
584
|
+
}
|
|
585
|
+
else
|
|
586
|
+
{
|
|
587
|
+
_request = {
|
|
588
|
+
erpConnectionId: erpConnectionId as number,
|
|
589
|
+
};
|
|
590
|
+
_options = webapi_options;
|
|
591
|
+
}
|
|
592
|
+
return this._testConnectionByIdAsync( _request, _options );
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
|
|
596
|
+
private async _testConnectionByConfigAsync(request: carriers.ErpSync_TestConnectionByConfigRequest, options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
597
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
598
|
+
base.WebApiBase.SetPending(options);
|
|
599
|
+
return new Promise< boolean >(async (resolve, reject) => {
|
|
600
|
+
try {
|
|
601
|
+
config.baseURL = this._options.baseUrl;
|
|
602
|
+
const response = await this._axios.post("TestConnectionByConfig", request , config);
|
|
603
|
+
base.WebApiBase.SetCompleted(options);
|
|
604
|
+
const res : boolean = response.data as boolean;
|
|
605
|
+
resolve(res);
|
|
606
|
+
}
|
|
607
|
+
catch( err ) {
|
|
608
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
609
|
+
reject(err);
|
|
610
|
+
}
|
|
611
|
+
});
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
|
|
615
|
+
|
|
616
|
+
/**
|
|
617
|
+
* Tests to see if the given connection has a valid connection to its connector
|
|
618
|
+
* @param request - ErpConnectionId, ConfigFields
|
|
619
|
+
* @returns Returns true if success
|
|
620
|
+
*/
|
|
621
|
+
public async testConnectionByConfigAsync(request: carriers.ErpSync_TestConnectionByConfigRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
622
|
+
|
|
623
|
+
/**
|
|
624
|
+
* Tests to see if the given connection has a valid connection to its connector
|
|
625
|
+
* @param erpConnectionId - The id of the connector we try to connect to
|
|
626
|
+
* @param configFields - The config fields used to test connection
|
|
627
|
+
* @returns Returns true if success
|
|
628
|
+
*/
|
|
629
|
+
public async testConnectionByConfigAsync(erpConnectionId: number, configFields: carriers.StringDictionary, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
630
|
+
|
|
631
|
+
public async testConnectionByConfigAsync(erpConnectionId:number|carriers.ErpSync_TestConnectionByConfigRequest, configFields?:carriers.StringDictionary|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
632
|
+
let _request : carriers.ErpSync_TestConnectionByConfigRequest = null;
|
|
633
|
+
let _options : base.WebApiRequestOptions = null;
|
|
634
|
+
const first : any = erpConnectionId;
|
|
635
|
+
if( typeof( first ) === "object" && first && ( typeof(first.erpConnectionId)!='undefined' || typeof(first.configFields)!='undefined' ) )
|
|
636
|
+
{
|
|
637
|
+
_request = erpConnectionId as carriers.ErpSync_TestConnectionByConfigRequest;
|
|
638
|
+
_options = configFields as base.WebApiRequestOptions;
|
|
639
|
+
}
|
|
640
|
+
else
|
|
641
|
+
{
|
|
642
|
+
_request = {
|
|
643
|
+
erpConnectionId: erpConnectionId as number,
|
|
644
|
+
configFields: configFields as carriers.StringDictionary,
|
|
645
|
+
};
|
|
646
|
+
_options = webapi_options;
|
|
647
|
+
}
|
|
648
|
+
return this._testConnectionByConfigAsync( _request, _options );
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
|
|
652
|
+
private async _saveErpConnectionSyncPrioritiesAsync(request: carriers.ErpSync_SaveErpConnectionSyncPrioritiesRequest, options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
653
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
654
|
+
base.WebApiBase.SetPending(options);
|
|
655
|
+
return new Promise< boolean >(async (resolve, reject) => {
|
|
656
|
+
try {
|
|
657
|
+
config.baseURL = this._options.baseUrl;
|
|
658
|
+
const response = await this._axios.post("SaveErpConnectionSyncPriorities", request , config);
|
|
659
|
+
base.WebApiBase.SetCompleted(options);
|
|
660
|
+
const res : boolean = response.data as boolean;
|
|
661
|
+
resolve(res);
|
|
662
|
+
}
|
|
663
|
+
catch( err ) {
|
|
664
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
665
|
+
reject(err);
|
|
666
|
+
}
|
|
667
|
+
});
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
|
|
671
|
+
|
|
672
|
+
/**
|
|
673
|
+
* Takes an array of the ErpConnection ids and saves these as ordered sync priorities
|
|
674
|
+
* @param request - ErpConnectionIds
|
|
675
|
+
* @returns Returns true if new sync priorities is saved
|
|
676
|
+
*/
|
|
677
|
+
public async saveErpConnectionSyncPrioritiesAsync(request: carriers.ErpSync_SaveErpConnectionSyncPrioritiesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
678
|
+
|
|
679
|
+
/**
|
|
680
|
+
* Takes an array of the ErpConnection ids and saves these as ordered sync priorities
|
|
681
|
+
* @param erpConnectionIds - The id put in array in the same order as the priorities
|
|
682
|
+
* @returns Returns true if new sync priorities is saved
|
|
683
|
+
*/
|
|
684
|
+
public async saveErpConnectionSyncPrioritiesAsync(erpConnectionIds: number[], webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
685
|
+
|
|
686
|
+
public async saveErpConnectionSyncPrioritiesAsync(erpConnectionIds:number[]|carriers.ErpSync_SaveErpConnectionSyncPrioritiesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
687
|
+
let _request : carriers.ErpSync_SaveErpConnectionSyncPrioritiesRequest = null;
|
|
688
|
+
let _options : base.WebApiRequestOptions = null;
|
|
689
|
+
const first : any = erpConnectionIds;
|
|
690
|
+
if( typeof( first ) === "object" && first && ( typeof(first.erpConnectionIds)!='undefined' ) )
|
|
691
|
+
{
|
|
692
|
+
_request = erpConnectionIds as carriers.ErpSync_SaveErpConnectionSyncPrioritiesRequest;
|
|
693
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
694
|
+
}
|
|
695
|
+
else
|
|
696
|
+
{
|
|
697
|
+
_request = {
|
|
698
|
+
erpConnectionIds: erpConnectionIds as number[],
|
|
699
|
+
};
|
|
700
|
+
_options = webapi_options;
|
|
701
|
+
}
|
|
702
|
+
return this._saveErpConnectionSyncPrioritiesAsync( _request, _options );
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
|
|
706
|
+
private async _moveErpFieldItemAsync(request: carriers.ErpSync_MoveErpFieldItemRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
707
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
708
|
+
base.WebApiBase.SetPending(options);
|
|
709
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
710
|
+
try {
|
|
711
|
+
config.baseURL = this._options.baseUrl;
|
|
712
|
+
const response = await this._axios.post("MoveErpFieldItem", request , config);
|
|
713
|
+
base.WebApiBase.SetCompleted(options);
|
|
714
|
+
const res = response.data;
|
|
715
|
+
resolve(res);
|
|
716
|
+
}
|
|
717
|
+
catch( err ) {
|
|
718
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
719
|
+
reject(err);
|
|
720
|
+
}
|
|
721
|
+
});
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
|
|
725
|
+
|
|
726
|
+
/**
|
|
727
|
+
* Moves the rank of the erp field up or down
|
|
728
|
+
* @param request - ErpFieldId, Direction, ErpConnectionId, ErpActorType
|
|
729
|
+
* @returns
|
|
730
|
+
*/
|
|
731
|
+
public async moveErpFieldItemAsync(request: carriers.ErpSync_MoveErpFieldItemRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
732
|
+
|
|
733
|
+
/**
|
|
734
|
+
* Moves the rank of the erp field up or down
|
|
735
|
+
* @param erpFieldId - The id of the erp field to move
|
|
736
|
+
* @param direction - Positive value to increase rank, negative to decrease.
|
|
737
|
+
* @param erpConnectionId - The id of the connection
|
|
738
|
+
* @param erpActorType - The actor type for which we want to rank fields
|
|
739
|
+
* @returns
|
|
740
|
+
*/
|
|
741
|
+
public async moveErpFieldItemAsync(erpFieldId: number, direction: number, erpConnectionId: number, erpActorType: enums.ErpActorType, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
742
|
+
|
|
743
|
+
public async moveErpFieldItemAsync(erpFieldId:number|carriers.ErpSync_MoveErpFieldItemRequest, direction?:number|base.WebApiRequestOptions, erpConnectionId?:number, erpActorType?:enums.ErpActorType, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
744
|
+
let _request : carriers.ErpSync_MoveErpFieldItemRequest = null;
|
|
745
|
+
let _options : base.WebApiRequestOptions = null;
|
|
746
|
+
const first : any = erpFieldId;
|
|
747
|
+
if( typeof( first ) === "object" && first && ( typeof(first.erpFieldId)!='undefined' || typeof(first.direction)!='undefined' || typeof(first.erpConnectionId)!='undefined' || typeof(first.erpActorType)!='undefined' ) )
|
|
748
|
+
{
|
|
749
|
+
_request = erpFieldId as carriers.ErpSync_MoveErpFieldItemRequest;
|
|
750
|
+
_options = direction as base.WebApiRequestOptions;
|
|
751
|
+
}
|
|
752
|
+
else
|
|
753
|
+
{
|
|
754
|
+
_request = {
|
|
755
|
+
erpFieldId: erpFieldId as number,
|
|
756
|
+
direction: direction as number,
|
|
757
|
+
erpConnectionId: erpConnectionId as number,
|
|
758
|
+
erpActorType: erpActorType as enums.ErpActorType,
|
|
759
|
+
};
|
|
760
|
+
_options = webapi_options;
|
|
761
|
+
}
|
|
762
|
+
return this._moveErpFieldItemAsync( _request, _options );
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
|
|
766
|
+
private async _supportsAdvancedSearchAsync(request: carriers.ErpSync_SupportsAdvancedSearchRequest, options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
767
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
768
|
+
base.WebApiBase.SetPending(options);
|
|
769
|
+
return new Promise< boolean >(async (resolve, reject) => {
|
|
770
|
+
try {
|
|
771
|
+
config.baseURL = this._options.baseUrl;
|
|
772
|
+
const response = await this._axios.post("SupportsAdvancedSearch", request , config);
|
|
773
|
+
base.WebApiBase.SetCompleted(options);
|
|
774
|
+
const res : boolean = response.data as boolean;
|
|
775
|
+
resolve(res);
|
|
776
|
+
}
|
|
777
|
+
catch( err ) {
|
|
778
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
779
|
+
reject(err);
|
|
780
|
+
}
|
|
781
|
+
});
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
|
|
785
|
+
|
|
786
|
+
/**
|
|
787
|
+
* Indicates if the connection supports advanced search for the given erp actor
|
|
788
|
+
* @param request - ErpConnectionId, ErpActorType
|
|
789
|
+
* @returns True if advanced search is supported
|
|
790
|
+
*/
|
|
791
|
+
public async supportsAdvancedSearchAsync(request: carriers.ErpSync_SupportsAdvancedSearchRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
792
|
+
|
|
793
|
+
/**
|
|
794
|
+
* Indicates if the connection supports advanced search for the given erp actor
|
|
795
|
+
* @param erpConnectionId - Ths id of the connection
|
|
796
|
+
* @param erpActorType - The erp actor type to check for
|
|
797
|
+
* @returns True if advanced search is supported
|
|
798
|
+
*/
|
|
799
|
+
public async supportsAdvancedSearchAsync(erpConnectionId: number, erpActorType: enums.ErpActorType, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
800
|
+
|
|
801
|
+
public async supportsAdvancedSearchAsync(erpConnectionId:number|carriers.ErpSync_SupportsAdvancedSearchRequest, erpActorType?:enums.ErpActorType|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
802
|
+
let _request : carriers.ErpSync_SupportsAdvancedSearchRequest = null;
|
|
803
|
+
let _options : base.WebApiRequestOptions = null;
|
|
804
|
+
const first : any = erpConnectionId;
|
|
805
|
+
if( typeof( first ) === "object" && first && ( typeof(first.erpConnectionId)!='undefined' || typeof(first.erpActorType)!='undefined' ) )
|
|
806
|
+
{
|
|
807
|
+
_request = erpConnectionId as carriers.ErpSync_SupportsAdvancedSearchRequest;
|
|
808
|
+
_options = erpActorType as base.WebApiRequestOptions;
|
|
809
|
+
}
|
|
810
|
+
else
|
|
811
|
+
{
|
|
812
|
+
_request = {
|
|
813
|
+
erpConnectionId: erpConnectionId as number,
|
|
814
|
+
erpActorType: erpActorType as enums.ErpActorType,
|
|
815
|
+
};
|
|
816
|
+
_options = webapi_options;
|
|
817
|
+
}
|
|
818
|
+
return this._supportsAdvancedSearchAsync( _request, _options );
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
|
|
822
|
+
private async _getAllConnectorsAsync( options?:base.WebApiRequestOptions) : Promise< carriers.ListItem[] > {
|
|
823
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
824
|
+
base.WebApiBase.SetPending(options);
|
|
825
|
+
return new Promise< carriers.ListItem[] >(async (resolve, reject) => {
|
|
826
|
+
try {
|
|
827
|
+
config.baseURL = this._options.baseUrl;
|
|
828
|
+
const response = await this._axios.post("GetAllConnectors", undefined , config);
|
|
829
|
+
base.WebApiBase.SetCompleted(options);
|
|
830
|
+
const res : carriers.ListItem[] = converters.Create_ListItemArray_From( response.data );
|
|
831
|
+
resolve(res);
|
|
832
|
+
}
|
|
833
|
+
catch( err ) {
|
|
834
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
835
|
+
reject(err);
|
|
836
|
+
}
|
|
837
|
+
});
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
|
|
841
|
+
/**
|
|
842
|
+
* Returns all ERP Sync connectors. Uses the `ErpConnector` archive.
|
|
843
|
+
* @returns The connector id, name, url
|
|
844
|
+
*/
|
|
845
|
+
public async getAllConnectorsAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ListItem[] >
|
|
846
|
+
{
|
|
847
|
+
return this._getAllConnectorsAsync(webapi_options);
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
|
|
851
|
+
private async _getAllConnectionsAsync(request: carriers.ErpSync_GetAllConnectionsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ErpConnection[] > {
|
|
852
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
853
|
+
base.WebApiBase.SetPending(options);
|
|
854
|
+
return new Promise< carriers.ErpConnection[] >(async (resolve, reject) => {
|
|
855
|
+
try {
|
|
856
|
+
config.baseURL = this._options.baseUrl;
|
|
857
|
+
const response = await this._axios.post("GetAllConnections", request , config);
|
|
858
|
+
base.WebApiBase.SetCompleted(options);
|
|
859
|
+
const res : carriers.ErpConnection[] = converters.Create_ErpConnectionArray_From( response.data );
|
|
860
|
+
resolve(res);
|
|
861
|
+
}
|
|
862
|
+
catch( err ) {
|
|
863
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
864
|
+
reject(err);
|
|
865
|
+
}
|
|
866
|
+
});
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
|
|
870
|
+
|
|
871
|
+
/**
|
|
872
|
+
* Returns all ERP Sync connections without config field data. Uses the `ErpConnection` archive.
|
|
873
|
+
* @param request - IncludeDeleted
|
|
874
|
+
* @returns The connection id, name, description
|
|
875
|
+
*/
|
|
876
|
+
public async getAllConnectionsAsync(request: carriers.ErpSync_GetAllConnectionsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpConnection[] >;
|
|
877
|
+
|
|
878
|
+
/**
|
|
879
|
+
* Returns all ERP Sync connections without config field data. Uses the `ErpConnection` archive.
|
|
880
|
+
* @param includeDeleted - Include deleted connections in the result?
|
|
881
|
+
* @returns The connection id, name, description
|
|
882
|
+
*/
|
|
883
|
+
public async getAllConnectionsAsync(includeDeleted: boolean, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpConnection[] >;
|
|
884
|
+
|
|
885
|
+
public async getAllConnectionsAsync(includeDeleted:boolean|carriers.ErpSync_GetAllConnectionsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpConnection[] > {
|
|
886
|
+
let _request : carriers.ErpSync_GetAllConnectionsRequest = null;
|
|
887
|
+
let _options : base.WebApiRequestOptions = null;
|
|
888
|
+
const first : any = includeDeleted;
|
|
889
|
+
if( typeof( first ) === "object" && first && ( typeof(first.includeDeleted)!='undefined' ) )
|
|
890
|
+
{
|
|
891
|
+
_request = includeDeleted as carriers.ErpSync_GetAllConnectionsRequest;
|
|
892
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
893
|
+
}
|
|
894
|
+
else
|
|
895
|
+
{
|
|
896
|
+
_request = {
|
|
897
|
+
includeDeleted: includeDeleted as boolean,
|
|
898
|
+
};
|
|
899
|
+
_options = webapi_options;
|
|
900
|
+
}
|
|
901
|
+
return this._getAllConnectionsAsync( _request, _options );
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
|
|
905
|
+
private async _getConnectionsAndDisplayFieldsAsync(request: carriers.ErpSync_GetConnectionsAndDisplayFieldsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ErpConnectionData[] > {
|
|
906
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
907
|
+
base.WebApiBase.SetPending(options);
|
|
908
|
+
return new Promise< carriers.ErpConnectionData[] >(async (resolve, reject) => {
|
|
909
|
+
try {
|
|
910
|
+
config.baseURL = this._options.baseUrl;
|
|
911
|
+
const response = await this._axios.post("GetConnectionsAndDisplayFields", request , config);
|
|
912
|
+
base.WebApiBase.SetCompleted(options);
|
|
913
|
+
const res : carriers.ErpConnectionData[] = converters.Create_ErpConnectionDataArray_From( response.data );
|
|
914
|
+
resolve(res);
|
|
915
|
+
}
|
|
916
|
+
catch( err ) {
|
|
917
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
918
|
+
reject(err);
|
|
919
|
+
}
|
|
920
|
+
});
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
|
|
924
|
+
|
|
925
|
+
/**
|
|
926
|
+
* Get all connection statuses and fields for a given entity
|
|
927
|
+
* @param request - CrmActorType, EntityId
|
|
928
|
+
* @returns An array of ErpConnectionData carriers
|
|
929
|
+
*/
|
|
930
|
+
public async getConnectionsAndDisplayFieldsAsync(request: carriers.ErpSync_GetConnectionsAndDisplayFieldsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpConnectionData[] >;
|
|
931
|
+
|
|
932
|
+
/**
|
|
933
|
+
* Get all connection statuses and fields for a given entity
|
|
934
|
+
* @param crmActorType - The type of the CRM entity
|
|
935
|
+
* @param entityId - The id of the entity
|
|
936
|
+
* @returns An array of ErpConnectionData carriers
|
|
937
|
+
*/
|
|
938
|
+
public async getConnectionsAndDisplayFieldsAsync(crmActorType: enums.CrmActorType, entityId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpConnectionData[] >;
|
|
939
|
+
|
|
940
|
+
public async getConnectionsAndDisplayFieldsAsync(crmActorType:enums.CrmActorType|carriers.ErpSync_GetConnectionsAndDisplayFieldsRequest, entityId?:number|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpConnectionData[] > {
|
|
941
|
+
let _request : carriers.ErpSync_GetConnectionsAndDisplayFieldsRequest = null;
|
|
942
|
+
let _options : base.WebApiRequestOptions = null;
|
|
943
|
+
const first : any = crmActorType;
|
|
944
|
+
if( typeof( first ) === "object" && first && ( typeof(first.crmActorType)!='undefined' || typeof(first.entityId)!='undefined' ) )
|
|
945
|
+
{
|
|
946
|
+
_request = crmActorType as carriers.ErpSync_GetConnectionsAndDisplayFieldsRequest;
|
|
947
|
+
_options = entityId as base.WebApiRequestOptions;
|
|
948
|
+
}
|
|
949
|
+
else
|
|
950
|
+
{
|
|
951
|
+
_request = {
|
|
952
|
+
crmActorType: crmActorType as enums.CrmActorType,
|
|
953
|
+
entityId: entityId as number,
|
|
954
|
+
};
|
|
955
|
+
_options = webapi_options;
|
|
956
|
+
}
|
|
957
|
+
return this._getConnectionsAndDisplayFieldsAsync( _request, _options );
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
|
|
961
|
+
private async _getErpFieldValuesAsync(request: carriers.ErpSync_GetErpFieldValuesRequest, options?:base.WebApiRequestOptions) : Promise< string[] > {
|
|
962
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
963
|
+
base.WebApiBase.SetPending(options);
|
|
964
|
+
return new Promise< string[] >(async (resolve, reject) => {
|
|
965
|
+
try {
|
|
966
|
+
config.baseURL = this._options.baseUrl;
|
|
967
|
+
const response = await this._axios.post("GetErpFieldValues", request , config);
|
|
968
|
+
base.WebApiBase.SetCompleted(options);
|
|
969
|
+
const res : string[] = response.data as string[];
|
|
970
|
+
resolve(res);
|
|
971
|
+
}
|
|
972
|
+
catch( err ) {
|
|
973
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
974
|
+
reject(err);
|
|
975
|
+
}
|
|
976
|
+
});
|
|
977
|
+
}
|
|
978
|
+
|
|
979
|
+
|
|
980
|
+
|
|
981
|
+
/**
|
|
982
|
+
* Get the values for the specified fields from the ERP connection
|
|
983
|
+
* @param request - ErpConnectionId, CrmActorType, EntityId, FieldKeys
|
|
984
|
+
* @returns An array containing the values for the specified fields, in the same order
|
|
985
|
+
*/
|
|
986
|
+
public async getErpFieldValuesAsync(request: carriers.ErpSync_GetErpFieldValuesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string[] >;
|
|
987
|
+
|
|
988
|
+
/**
|
|
989
|
+
* Get the values for the specified fields from the ERP connection
|
|
990
|
+
* @param erpConnectionId - The id of the connection
|
|
991
|
+
* @param crmActorType - The type of the CRM entity
|
|
992
|
+
* @param entityId - The id of the entity
|
|
993
|
+
* @param fieldKeys - The fields for which you want to get the values
|
|
994
|
+
* @returns An array containing the values for the specified fields, in the same order
|
|
995
|
+
*/
|
|
996
|
+
public async getErpFieldValuesAsync(erpConnectionId: number, crmActorType: enums.CrmActorType, entityId: number, fieldKeys: string[], webapi_options?:base.WebApiRequestOptions) : Promise< string[] >;
|
|
997
|
+
|
|
998
|
+
public async getErpFieldValuesAsync(erpConnectionId:number|carriers.ErpSync_GetErpFieldValuesRequest, crmActorType?:enums.CrmActorType|base.WebApiRequestOptions, entityId?:number, fieldKeys?:string[], webapi_options?:base.WebApiRequestOptions) : Promise< string[] > {
|
|
999
|
+
let _request : carriers.ErpSync_GetErpFieldValuesRequest = null;
|
|
1000
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1001
|
+
const first : any = erpConnectionId;
|
|
1002
|
+
if( typeof( first ) === "object" && first && ( typeof(first.erpConnectionId)!='undefined' || typeof(first.crmActorType)!='undefined' || typeof(first.entityId)!='undefined' || typeof(first.fieldKeys)!='undefined' ) )
|
|
1003
|
+
{
|
|
1004
|
+
_request = erpConnectionId as carriers.ErpSync_GetErpFieldValuesRequest;
|
|
1005
|
+
_options = crmActorType as base.WebApiRequestOptions;
|
|
1006
|
+
}
|
|
1007
|
+
else
|
|
1008
|
+
{
|
|
1009
|
+
_request = {
|
|
1010
|
+
erpConnectionId: erpConnectionId as number,
|
|
1011
|
+
crmActorType: crmActorType as enums.CrmActorType,
|
|
1012
|
+
entityId: entityId as number,
|
|
1013
|
+
fieldKeys: fieldKeys as string[],
|
|
1014
|
+
};
|
|
1015
|
+
_options = webapi_options;
|
|
1016
|
+
}
|
|
1017
|
+
return this._getErpFieldValuesAsync( _request, _options );
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
|
|
1021
|
+
private async _getFieldsForNewErpActorAsync(request: carriers.ErpSync_GetFieldsForNewErpActorRequest, options?:base.WebApiRequestOptions) : Promise< carriers.FieldMetadata[] > {
|
|
1022
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1023
|
+
base.WebApiBase.SetPending(options);
|
|
1024
|
+
return new Promise< carriers.FieldMetadata[] >(async (resolve, reject) => {
|
|
1025
|
+
try {
|
|
1026
|
+
config.baseURL = this._options.baseUrl;
|
|
1027
|
+
const response = await this._axios.post("GetFieldsForNewErpActor", request , config);
|
|
1028
|
+
base.WebApiBase.SetCompleted(options);
|
|
1029
|
+
const res : carriers.FieldMetadata[] = converters.Create_FieldMetadataArray_From( response.data );
|
|
1030
|
+
resolve(res);
|
|
1031
|
+
}
|
|
1032
|
+
catch( err ) {
|
|
1033
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1034
|
+
reject(err);
|
|
1035
|
+
}
|
|
1036
|
+
});
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1039
|
+
|
|
1040
|
+
|
|
1041
|
+
/**
|
|
1042
|
+
* Get the fields that must be filled out when creating a new ERP actor
|
|
1043
|
+
* @param request - ErpConnectionId, ErpActorType
|
|
1044
|
+
* @returns The fields that are required for the new ERP actor
|
|
1045
|
+
*/
|
|
1046
|
+
public async getFieldsForNewErpActorAsync(request: carriers.ErpSync_GetFieldsForNewErpActorRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FieldMetadata[] >;
|
|
1047
|
+
|
|
1048
|
+
/**
|
|
1049
|
+
* Get the fields that must be filled out when creating a new ERP actor
|
|
1050
|
+
* @param erpConnectionId - The id of the connection
|
|
1051
|
+
* @param erpActorType - The type of the ERP actor to create
|
|
1052
|
+
* @returns The fields that are required for the new ERP actor
|
|
1053
|
+
*/
|
|
1054
|
+
public async getFieldsForNewErpActorAsync(erpConnectionId: number, erpActorType: enums.ErpActorType, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FieldMetadata[] >;
|
|
1055
|
+
|
|
1056
|
+
public async getFieldsForNewErpActorAsync(erpConnectionId:number|carriers.ErpSync_GetFieldsForNewErpActorRequest, erpActorType?:enums.ErpActorType|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FieldMetadata[] > {
|
|
1057
|
+
let _request : carriers.ErpSync_GetFieldsForNewErpActorRequest = null;
|
|
1058
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1059
|
+
const first : any = erpConnectionId;
|
|
1060
|
+
if( typeof( first ) === "object" && first && ( typeof(first.erpConnectionId)!='undefined' || typeof(first.erpActorType)!='undefined' ) )
|
|
1061
|
+
{
|
|
1062
|
+
_request = erpConnectionId as carriers.ErpSync_GetFieldsForNewErpActorRequest;
|
|
1063
|
+
_options = erpActorType as base.WebApiRequestOptions;
|
|
1064
|
+
}
|
|
1065
|
+
else
|
|
1066
|
+
{
|
|
1067
|
+
_request = {
|
|
1068
|
+
erpConnectionId: erpConnectionId as number,
|
|
1069
|
+
erpActorType: erpActorType as enums.ErpActorType,
|
|
1070
|
+
};
|
|
1071
|
+
_options = webapi_options;
|
|
1072
|
+
}
|
|
1073
|
+
return this._getFieldsForNewErpActorAsync( _request, _options );
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1076
|
+
|
|
1077
|
+
private async _getConnectionListMappingsAsync(request: carriers.ErpSync_GetConnectionListMappingsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ErpConnectionListMappingContainer > {
|
|
1078
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1079
|
+
base.WebApiBase.SetPending(options);
|
|
1080
|
+
return new Promise< carriers.ErpConnectionListMappingContainer >(async (resolve, reject) => {
|
|
1081
|
+
try {
|
|
1082
|
+
config.baseURL = this._options.baseUrl;
|
|
1083
|
+
const response = await this._axios.post("GetConnectionListMappings", request , config);
|
|
1084
|
+
base.WebApiBase.SetCompleted(options);
|
|
1085
|
+
const res : carriers.ErpConnectionListMappingContainer = converters.Create_ErpConnectionListMappingContainer_From( response.data );
|
|
1086
|
+
resolve(res);
|
|
1087
|
+
}
|
|
1088
|
+
catch( err ) {
|
|
1089
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1090
|
+
reject(err);
|
|
1091
|
+
}
|
|
1092
|
+
});
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
|
|
1096
|
+
|
|
1097
|
+
/**
|
|
1098
|
+
* Returns the listmappings for the specified connection.
|
|
1099
|
+
* @param request - ErpConnectionId
|
|
1100
|
+
* @returns The listmappings
|
|
1101
|
+
*/
|
|
1102
|
+
public async getConnectionListMappingsAsync(request: carriers.ErpSync_GetConnectionListMappingsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpConnectionListMappingContainer >;
|
|
1103
|
+
|
|
1104
|
+
/**
|
|
1105
|
+
* Returns the listmappings for the specified connection.
|
|
1106
|
+
* @param erpConnectionId - Primary key of the connection
|
|
1107
|
+
* @returns The listmappings
|
|
1108
|
+
*/
|
|
1109
|
+
public async getConnectionListMappingsAsync(erpConnectionId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpConnectionListMappingContainer >;
|
|
1110
|
+
|
|
1111
|
+
public async getConnectionListMappingsAsync(erpConnectionId:number|carriers.ErpSync_GetConnectionListMappingsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpConnectionListMappingContainer > {
|
|
1112
|
+
let _request : carriers.ErpSync_GetConnectionListMappingsRequest = null;
|
|
1113
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1114
|
+
const first : any = erpConnectionId;
|
|
1115
|
+
if( typeof( first ) === "object" && first && ( typeof(first.erpConnectionId)!='undefined' ) )
|
|
1116
|
+
{
|
|
1117
|
+
_request = erpConnectionId as carriers.ErpSync_GetConnectionListMappingsRequest;
|
|
1118
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
1119
|
+
}
|
|
1120
|
+
else
|
|
1121
|
+
{
|
|
1122
|
+
_request = {
|
|
1123
|
+
erpConnectionId: erpConnectionId as number,
|
|
1124
|
+
};
|
|
1125
|
+
_options = webapi_options;
|
|
1126
|
+
}
|
|
1127
|
+
return this._getConnectionListMappingsAsync( _request, _options );
|
|
1128
|
+
}
|
|
1129
|
+
|
|
1130
|
+
|
|
1131
|
+
private async _saveConnectionListMappingsAsync(request: carriers.ErpSync_SaveConnectionListMappingsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ErpConnectionListMappingContainer > {
|
|
1132
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1133
|
+
base.WebApiBase.SetPending(options);
|
|
1134
|
+
return new Promise< carriers.ErpConnectionListMappingContainer >(async (resolve, reject) => {
|
|
1135
|
+
try {
|
|
1136
|
+
config.baseURL = this._options.baseUrl;
|
|
1137
|
+
const response = await this._axios.post("SaveConnectionListMappings", request , config);
|
|
1138
|
+
base.WebApiBase.SetCompleted(options);
|
|
1139
|
+
const res : carriers.ErpConnectionListMappingContainer = converters.Create_ErpConnectionListMappingContainer_From( response.data );
|
|
1140
|
+
resolve(res);
|
|
1141
|
+
}
|
|
1142
|
+
catch( err ) {
|
|
1143
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1144
|
+
reject(err);
|
|
1145
|
+
}
|
|
1146
|
+
});
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
|
|
1150
|
+
|
|
1151
|
+
/**
|
|
1152
|
+
* Saves a connection to the database.
|
|
1153
|
+
* @param request - ListMapping
|
|
1154
|
+
* @returns The saved list mappings.
|
|
1155
|
+
*/
|
|
1156
|
+
public async saveConnectionListMappingsAsync(request: carriers.ErpSync_SaveConnectionListMappingsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpConnectionListMappingContainer >;
|
|
1157
|
+
|
|
1158
|
+
/**
|
|
1159
|
+
* Saves a connection to the database.
|
|
1160
|
+
* @param listMapping - The list item mappings to save.
|
|
1161
|
+
* @returns The saved list mappings.
|
|
1162
|
+
*/
|
|
1163
|
+
public async saveConnectionListMappingsAsync(listMapping: carriers.ErpConnectionListMappingContainer, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpConnectionListMappingContainer >;
|
|
1164
|
+
|
|
1165
|
+
public async saveConnectionListMappingsAsync(listMapping:carriers.ErpConnectionListMappingContainer|carriers.ErpSync_SaveConnectionListMappingsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpConnectionListMappingContainer > {
|
|
1166
|
+
let _request : carriers.ErpSync_SaveConnectionListMappingsRequest = null;
|
|
1167
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1168
|
+
const first : any = listMapping;
|
|
1169
|
+
if( typeof( first ) === "object" && first && ( typeof(first.listMapping)!='undefined' ) )
|
|
1170
|
+
{
|
|
1171
|
+
_request = listMapping as carriers.ErpSync_SaveConnectionListMappingsRequest;
|
|
1172
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
1173
|
+
}
|
|
1174
|
+
else
|
|
1175
|
+
{
|
|
1176
|
+
_request = {
|
|
1177
|
+
listMapping: listMapping as carriers.ErpConnectionListMappingContainer,
|
|
1178
|
+
};
|
|
1179
|
+
_options = webapi_options;
|
|
1180
|
+
}
|
|
1181
|
+
return this._saveConnectionListMappingsAsync( _request, _options );
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
|
|
1185
|
+
private async _connectActorAsync(request: carriers.ErpSync_ConnectActorRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
1186
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1187
|
+
base.WebApiBase.SetPending(options);
|
|
1188
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
1189
|
+
try {
|
|
1190
|
+
config.baseURL = this._options.baseUrl;
|
|
1191
|
+
const response = await this._axios.post("ConnectActor", request , config);
|
|
1192
|
+
base.WebApiBase.SetCompleted(options);
|
|
1193
|
+
const res = response.data;
|
|
1194
|
+
resolve(res);
|
|
1195
|
+
}
|
|
1196
|
+
catch( err ) {
|
|
1197
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1198
|
+
reject(err);
|
|
1199
|
+
}
|
|
1200
|
+
});
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1203
|
+
|
|
1204
|
+
|
|
1205
|
+
/**
|
|
1206
|
+
* Create a link between Erp and Crm and set default values
|
|
1207
|
+
* @param request - ErpConnectionId, CrmRecordId, CrmActorType, ErpKey, ErpActorType, FieldValues
|
|
1208
|
+
* @returns
|
|
1209
|
+
*/
|
|
1210
|
+
public async connectActorAsync(request: carriers.ErpSync_ConnectActorRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
1211
|
+
|
|
1212
|
+
/**
|
|
1213
|
+
* Create a link between Erp and Crm and set default values
|
|
1214
|
+
* @param erpConnectionId - ErpConnectionId
|
|
1215
|
+
* @param crmRecordId - CrmRecordId
|
|
1216
|
+
* @param crmActorType - The Crm Actor type
|
|
1217
|
+
* @param erpKey -
|
|
1218
|
+
* @param erpActorType - The Erp Actor type
|
|
1219
|
+
* @param fieldValues - The Crm Fields
|
|
1220
|
+
* @returns
|
|
1221
|
+
*/
|
|
1222
|
+
public async connectActorAsync(erpConnectionId: number, crmRecordId: number, crmActorType: enums.CrmActorType, erpKey: string, erpActorType: enums.ErpActorType, fieldValues: carriers.ErpSyncFieldValue[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
1223
|
+
|
|
1224
|
+
public async connectActorAsync(erpConnectionId:number|carriers.ErpSync_ConnectActorRequest, crmRecordId?:number|base.WebApiRequestOptions, crmActorType?:enums.CrmActorType, erpKey?:string, erpActorType?:enums.ErpActorType, fieldValues?:carriers.ErpSyncFieldValue[], webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
1225
|
+
let _request : carriers.ErpSync_ConnectActorRequest = null;
|
|
1226
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1227
|
+
const first : any = erpConnectionId;
|
|
1228
|
+
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' ) )
|
|
1229
|
+
{
|
|
1230
|
+
_request = erpConnectionId as carriers.ErpSync_ConnectActorRequest;
|
|
1231
|
+
_options = crmRecordId as base.WebApiRequestOptions;
|
|
1232
|
+
}
|
|
1233
|
+
else
|
|
1234
|
+
{
|
|
1235
|
+
_request = {
|
|
1236
|
+
erpConnectionId: erpConnectionId as number,
|
|
1237
|
+
crmRecordId: crmRecordId as number,
|
|
1238
|
+
crmActorType: crmActorType as enums.CrmActorType,
|
|
1239
|
+
erpKey: erpKey as string,
|
|
1240
|
+
erpActorType: erpActorType as enums.ErpActorType,
|
|
1241
|
+
fieldValues: fieldValues as carriers.ErpSyncFieldValue[],
|
|
1242
|
+
};
|
|
1243
|
+
_options = webapi_options;
|
|
1244
|
+
}
|
|
1245
|
+
return this._connectActorAsync( _request, _options );
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
|
|
1249
|
+
private async _tryConnectActorAsync(request: carriers.ErpSync_TryConnectActorRequest, options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
1250
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1251
|
+
base.WebApiBase.SetPending(options);
|
|
1252
|
+
return new Promise< boolean >(async (resolve, reject) => {
|
|
1253
|
+
try {
|
|
1254
|
+
config.baseURL = this._options.baseUrl;
|
|
1255
|
+
const response = await this._axios.post("TryConnectActor", request , config);
|
|
1256
|
+
base.WebApiBase.SetCompleted(options);
|
|
1257
|
+
const res : boolean = response.data as boolean;
|
|
1258
|
+
resolve(res);
|
|
1259
|
+
}
|
|
1260
|
+
catch( err ) {
|
|
1261
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1262
|
+
reject(err);
|
|
1263
|
+
}
|
|
1264
|
+
});
|
|
1265
|
+
}
|
|
1266
|
+
|
|
1267
|
+
|
|
1268
|
+
|
|
1269
|
+
/**
|
|
1270
|
+
* Create a link between Erp and Crm and set default values
|
|
1271
|
+
* @param request - ErpConnectionId, CrmRecordId, CrmActorType, ErpKey, ErpActorType, FieldValues
|
|
1272
|
+
* @returns
|
|
1273
|
+
*/
|
|
1274
|
+
public async tryConnectActorAsync(request: carriers.ErpSync_TryConnectActorRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
1275
|
+
|
|
1276
|
+
/**
|
|
1277
|
+
* Create a link between Erp and Crm and set default values
|
|
1278
|
+
* @param erpConnectionId - ErpConnectionId
|
|
1279
|
+
* @param crmRecordId - CrmRecordId
|
|
1280
|
+
* @param crmActorType - The Crm Actor type
|
|
1281
|
+
* @param erpKey -
|
|
1282
|
+
* @param erpActorType - The Erp Actor type
|
|
1283
|
+
* @param fieldValues - The Crm Fields
|
|
1284
|
+
* @returns
|
|
1285
|
+
*/
|
|
1286
|
+
public async tryConnectActorAsync(erpConnectionId: number, crmRecordId: number, crmActorType: enums.CrmActorType, erpKey: string, erpActorType: enums.ErpActorType, fieldValues: carriers.ErpSyncFieldValue[], webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
1287
|
+
|
|
1288
|
+
public async tryConnectActorAsync(erpConnectionId:number|carriers.ErpSync_TryConnectActorRequest, crmRecordId?:number|base.WebApiRequestOptions, crmActorType?:enums.CrmActorType, erpKey?:string, erpActorType?:enums.ErpActorType, fieldValues?:carriers.ErpSyncFieldValue[], webapi_options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
1289
|
+
let _request : carriers.ErpSync_TryConnectActorRequest = null;
|
|
1290
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1291
|
+
const first : any = erpConnectionId;
|
|
1292
|
+
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' ) )
|
|
1293
|
+
{
|
|
1294
|
+
_request = erpConnectionId as carriers.ErpSync_TryConnectActorRequest;
|
|
1295
|
+
_options = crmRecordId as base.WebApiRequestOptions;
|
|
1296
|
+
}
|
|
1297
|
+
else
|
|
1298
|
+
{
|
|
1299
|
+
_request = {
|
|
1300
|
+
erpConnectionId: erpConnectionId as number,
|
|
1301
|
+
crmRecordId: crmRecordId as number,
|
|
1302
|
+
crmActorType: crmActorType as enums.CrmActorType,
|
|
1303
|
+
erpKey: erpKey as string,
|
|
1304
|
+
erpActorType: erpActorType as enums.ErpActorType,
|
|
1305
|
+
fieldValues: fieldValues as carriers.ErpSyncFieldValue[],
|
|
1306
|
+
};
|
|
1307
|
+
_options = webapi_options;
|
|
1308
|
+
}
|
|
1309
|
+
return this._tryConnectActorAsync( _request, _options );
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1312
|
+
|
|
1313
|
+
private async _getFieldValuesFromCrmAsync(request: carriers.ErpSync_GetFieldValuesFromCrmRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncFieldValue[] > {
|
|
1314
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1315
|
+
base.WebApiBase.SetPending(options);
|
|
1316
|
+
return new Promise< carriers.ErpSyncFieldValue[] >(async (resolve, reject) => {
|
|
1317
|
+
try {
|
|
1318
|
+
config.baseURL = this._options.baseUrl;
|
|
1319
|
+
const response = await this._axios.post("GetFieldValuesFromCrm", request , config);
|
|
1320
|
+
base.WebApiBase.SetCompleted(options);
|
|
1321
|
+
const res : carriers.ErpSyncFieldValue[] = converters.Create_ErpSyncFieldValueArray_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
|
+
|
|
1332
|
+
|
|
1333
|
+
/**
|
|
1334
|
+
* Get Crm Field values
|
|
1335
|
+
* @param request - RecordId, ActorTypeCrm
|
|
1336
|
+
* @returns The Crm Fields
|
|
1337
|
+
*/
|
|
1338
|
+
public async getFieldValuesFromCrmAsync(request: carriers.ErpSync_GetFieldValuesFromCrmRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncFieldValue[] >;
|
|
1339
|
+
|
|
1340
|
+
/**
|
|
1341
|
+
* Get Crm Field values
|
|
1342
|
+
* @param recordId - The id of the CRM entity
|
|
1343
|
+
* @param actorTypeCrm - CRM Actor type
|
|
1344
|
+
* @returns The Crm Fields
|
|
1345
|
+
*/
|
|
1346
|
+
public async getFieldValuesFromCrmAsync(recordId: number, actorTypeCrm: enums.CrmActorType, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncFieldValue[] >;
|
|
1347
|
+
|
|
1348
|
+
public async getFieldValuesFromCrmAsync(recordId:number|carriers.ErpSync_GetFieldValuesFromCrmRequest, actorTypeCrm?:enums.CrmActorType|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncFieldValue[] > {
|
|
1349
|
+
let _request : carriers.ErpSync_GetFieldValuesFromCrmRequest = null;
|
|
1350
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1351
|
+
const first : any = recordId;
|
|
1352
|
+
if( typeof( first ) === "object" && first && ( typeof(first.recordId)!='undefined' || typeof(first.actorTypeCrm)!='undefined' ) )
|
|
1353
|
+
{
|
|
1354
|
+
_request = recordId as carriers.ErpSync_GetFieldValuesFromCrmRequest;
|
|
1355
|
+
_options = actorTypeCrm as base.WebApiRequestOptions;
|
|
1356
|
+
}
|
|
1357
|
+
else
|
|
1358
|
+
{
|
|
1359
|
+
_request = {
|
|
1360
|
+
recordId: recordId as number,
|
|
1361
|
+
actorTypeCrm: actorTypeCrm as enums.CrmActorType,
|
|
1362
|
+
};
|
|
1363
|
+
_options = webapi_options;
|
|
1364
|
+
}
|
|
1365
|
+
return this._getFieldValuesFromCrmAsync( _request, _options );
|
|
1366
|
+
}
|
|
1367
|
+
|
|
1368
|
+
|
|
1369
|
+
private async _getFieldValuesFromErpAsync(request: carriers.ErpSync_GetFieldValuesFromErpRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncFieldValue[] > {
|
|
1370
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1371
|
+
base.WebApiBase.SetPending(options);
|
|
1372
|
+
return new Promise< carriers.ErpSyncFieldValue[] >(async (resolve, reject) => {
|
|
1373
|
+
try {
|
|
1374
|
+
config.baseURL = this._options.baseUrl;
|
|
1375
|
+
const response = await this._axios.post("GetFieldValuesFromErp", request , config);
|
|
1376
|
+
base.WebApiBase.SetCompleted(options);
|
|
1377
|
+
const res : carriers.ErpSyncFieldValue[] = converters.Create_ErpSyncFieldValueArray_From( response.data );
|
|
1378
|
+
resolve(res);
|
|
1379
|
+
}
|
|
1380
|
+
catch( err ) {
|
|
1381
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1382
|
+
reject(err);
|
|
1383
|
+
}
|
|
1384
|
+
});
|
|
1385
|
+
}
|
|
1386
|
+
|
|
1387
|
+
|
|
1388
|
+
|
|
1389
|
+
/**
|
|
1390
|
+
* Get Erp Field values
|
|
1391
|
+
* @param request - ErpConnectionId, ActorTypeErp, ErpKey
|
|
1392
|
+
* @returns The Erp Fields
|
|
1393
|
+
*/
|
|
1394
|
+
public async getFieldValuesFromErpAsync(request: carriers.ErpSync_GetFieldValuesFromErpRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncFieldValue[] >;
|
|
1395
|
+
|
|
1396
|
+
/**
|
|
1397
|
+
* Get Erp Field values
|
|
1398
|
+
* @param erpConnectionId - Erp connection id
|
|
1399
|
+
* @param actorTypeErp - ERP Actor type
|
|
1400
|
+
* @param erpKey - Primary key for the erp actor
|
|
1401
|
+
* @returns The Erp Fields
|
|
1402
|
+
*/
|
|
1403
|
+
public async getFieldValuesFromErpAsync(erpConnectionId: number, actorTypeErp: enums.ErpActorType, erpKey: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncFieldValue[] >;
|
|
1404
|
+
|
|
1405
|
+
public async getFieldValuesFromErpAsync(erpConnectionId:number|carriers.ErpSync_GetFieldValuesFromErpRequest, actorTypeErp?:enums.ErpActorType|base.WebApiRequestOptions, erpKey?:string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncFieldValue[] > {
|
|
1406
|
+
let _request : carriers.ErpSync_GetFieldValuesFromErpRequest = null;
|
|
1407
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1408
|
+
const first : any = erpConnectionId;
|
|
1409
|
+
if( typeof( first ) === "object" && first && ( typeof(first.erpConnectionId)!='undefined' || typeof(first.actorTypeErp)!='undefined' || typeof(first.erpKey)!='undefined' ) )
|
|
1410
|
+
{
|
|
1411
|
+
_request = erpConnectionId as carriers.ErpSync_GetFieldValuesFromErpRequest;
|
|
1412
|
+
_options = actorTypeErp as base.WebApiRequestOptions;
|
|
1413
|
+
}
|
|
1414
|
+
else
|
|
1415
|
+
{
|
|
1416
|
+
_request = {
|
|
1417
|
+
erpConnectionId: erpConnectionId as number,
|
|
1418
|
+
actorTypeErp: actorTypeErp as enums.ErpActorType,
|
|
1419
|
+
erpKey: erpKey as string,
|
|
1420
|
+
};
|
|
1421
|
+
_options = webapi_options;
|
|
1422
|
+
}
|
|
1423
|
+
return this._getFieldValuesFromErpAsync( _request, _options );
|
|
1424
|
+
}
|
|
1425
|
+
|
|
1426
|
+
|
|
1427
|
+
private async _getActorTypeMappingAsync(request: carriers.ErpSync_GetActorTypeMappingRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncActorTypeMapping > {
|
|
1428
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1429
|
+
base.WebApiBase.SetPending(options);
|
|
1430
|
+
return new Promise< carriers.ErpSyncActorTypeMapping >(async (resolve, reject) => {
|
|
1431
|
+
try {
|
|
1432
|
+
config.baseURL = this._options.baseUrl;
|
|
1433
|
+
const response = await this._axios.post("GetActorTypeMapping", request , config);
|
|
1434
|
+
base.WebApiBase.SetCompleted(options);
|
|
1435
|
+
const res : carriers.ErpSyncActorTypeMapping = converters.Create_ErpSyncActorTypeMapping_From( response.data );
|
|
1436
|
+
resolve(res);
|
|
1437
|
+
}
|
|
1438
|
+
catch( err ) {
|
|
1439
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1440
|
+
reject(err);
|
|
1441
|
+
}
|
|
1442
|
+
});
|
|
1443
|
+
}
|
|
1444
|
+
|
|
1445
|
+
|
|
1446
|
+
|
|
1447
|
+
/**
|
|
1448
|
+
* Get the current mappings for one connection/actor; connection+actor type = unique key
|
|
1449
|
+
* @param request - ErpConnectionId, ActorType
|
|
1450
|
+
* @returns The current mapping from the database
|
|
1451
|
+
*/
|
|
1452
|
+
public async getActorTypeMappingAsync(request: carriers.ErpSync_GetActorTypeMappingRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncActorTypeMapping >;
|
|
1453
|
+
|
|
1454
|
+
/**
|
|
1455
|
+
* Get the current mappings for one connection/actor; connection+actor type = unique key
|
|
1456
|
+
* @param erpConnectionId - The ERP connection ID
|
|
1457
|
+
* @param actorType - The actor type
|
|
1458
|
+
* @returns The current mapping from the database
|
|
1459
|
+
*/
|
|
1460
|
+
public async getActorTypeMappingAsync(erpConnectionId: number, actorType: enums.ErpActorType, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncActorTypeMapping >;
|
|
1461
|
+
|
|
1462
|
+
public async getActorTypeMappingAsync(erpConnectionId:number|carriers.ErpSync_GetActorTypeMappingRequest, actorType?:enums.ErpActorType|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncActorTypeMapping > {
|
|
1463
|
+
let _request : carriers.ErpSync_GetActorTypeMappingRequest = null;
|
|
1464
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1465
|
+
const first : any = erpConnectionId;
|
|
1466
|
+
if( typeof( first ) === "object" && first && ( typeof(first.erpConnectionId)!='undefined' || typeof(first.actorType)!='undefined' ) )
|
|
1467
|
+
{
|
|
1468
|
+
_request = erpConnectionId as carriers.ErpSync_GetActorTypeMappingRequest;
|
|
1469
|
+
_options = actorType as base.WebApiRequestOptions;
|
|
1470
|
+
}
|
|
1471
|
+
else
|
|
1472
|
+
{
|
|
1473
|
+
_request = {
|
|
1474
|
+
erpConnectionId: erpConnectionId as number,
|
|
1475
|
+
actorType: actorType as enums.ErpActorType,
|
|
1476
|
+
};
|
|
1477
|
+
_options = webapi_options;
|
|
1478
|
+
}
|
|
1479
|
+
return this._getActorTypeMappingAsync( _request, _options );
|
|
1480
|
+
}
|
|
1481
|
+
|
|
1482
|
+
|
|
1483
|
+
private async _createActorLinkAsync(request: carriers.ErpSync_CreateActorLinkRequest, options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
1484
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1485
|
+
base.WebApiBase.SetPending(options);
|
|
1486
|
+
return new Promise< boolean >(async (resolve, reject) => {
|
|
1487
|
+
try {
|
|
1488
|
+
config.baseURL = this._options.baseUrl;
|
|
1489
|
+
const response = await this._axios.post("CreateActorLink", request , config);
|
|
1490
|
+
base.WebApiBase.SetCompleted(options);
|
|
1491
|
+
const res : boolean = response.data as boolean;
|
|
1492
|
+
resolve(res);
|
|
1493
|
+
}
|
|
1494
|
+
catch( err ) {
|
|
1495
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1496
|
+
reject(err);
|
|
1497
|
+
}
|
|
1498
|
+
});
|
|
1499
|
+
}
|
|
1500
|
+
|
|
1501
|
+
|
|
1502
|
+
|
|
1503
|
+
/**
|
|
1504
|
+
* Link a crm entity to an erp entity
|
|
1505
|
+
* @param request - ErpConnectionId, CrmRecordId, CrmActorType, ErpKey, ErpActorType
|
|
1506
|
+
* @returns True if success
|
|
1507
|
+
*/
|
|
1508
|
+
public async createActorLinkAsync(request: carriers.ErpSync_CreateActorLinkRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
1509
|
+
|
|
1510
|
+
/**
|
|
1511
|
+
* Link a crm entity to an erp entity
|
|
1512
|
+
* @param erpConnectionId - The ERP connection ID
|
|
1513
|
+
* @param crmRecordId - The ID of the CRM entity to connect to
|
|
1514
|
+
* @param crmActorType - Identifies the CRM actor type corresponding to this CRM entity
|
|
1515
|
+
* @param erpKey - The ERP entity identifier
|
|
1516
|
+
* @param erpActorType - The ERP actor type
|
|
1517
|
+
* @returns True if success
|
|
1518
|
+
*/
|
|
1519
|
+
public async createActorLinkAsync(erpConnectionId: number, crmRecordId: number, crmActorType: enums.CrmActorType, erpKey: string, erpActorType: enums.ErpActorType, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
1520
|
+
|
|
1521
|
+
public async createActorLinkAsync(erpConnectionId:number|carriers.ErpSync_CreateActorLinkRequest, crmRecordId?:number|base.WebApiRequestOptions, crmActorType?:enums.CrmActorType, erpKey?:string, erpActorType?:enums.ErpActorType, webapi_options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
1522
|
+
let _request : carriers.ErpSync_CreateActorLinkRequest = null;
|
|
1523
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1524
|
+
const first : any = erpConnectionId;
|
|
1525
|
+
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' ) )
|
|
1526
|
+
{
|
|
1527
|
+
_request = erpConnectionId as carriers.ErpSync_CreateActorLinkRequest;
|
|
1528
|
+
_options = crmRecordId as base.WebApiRequestOptions;
|
|
1529
|
+
}
|
|
1530
|
+
else
|
|
1531
|
+
{
|
|
1532
|
+
_request = {
|
|
1533
|
+
erpConnectionId: erpConnectionId as number,
|
|
1534
|
+
crmRecordId: crmRecordId as number,
|
|
1535
|
+
crmActorType: crmActorType as enums.CrmActorType,
|
|
1536
|
+
erpKey: erpKey as string,
|
|
1537
|
+
erpActorType: erpActorType as enums.ErpActorType,
|
|
1538
|
+
};
|
|
1539
|
+
_options = webapi_options;
|
|
1540
|
+
}
|
|
1541
|
+
return this._createActorLinkAsync( _request, _options );
|
|
1542
|
+
}
|
|
1543
|
+
|
|
1544
|
+
|
|
1545
|
+
private async _breakActorLinkAsync(request: carriers.ErpSync_BreakActorLinkRequest, options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
1546
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1547
|
+
base.WebApiBase.SetPending(options);
|
|
1548
|
+
return new Promise< boolean >(async (resolve, reject) => {
|
|
1549
|
+
try {
|
|
1550
|
+
config.baseURL = this._options.baseUrl;
|
|
1551
|
+
const response = await this._axios.post("BreakActorLink", request , config);
|
|
1552
|
+
base.WebApiBase.SetCompleted(options);
|
|
1553
|
+
const res : boolean = response.data as boolean;
|
|
1554
|
+
resolve(res);
|
|
1555
|
+
}
|
|
1556
|
+
catch( err ) {
|
|
1557
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1558
|
+
reject(err);
|
|
1559
|
+
}
|
|
1560
|
+
});
|
|
1561
|
+
}
|
|
1562
|
+
|
|
1563
|
+
|
|
1564
|
+
|
|
1565
|
+
/**
|
|
1566
|
+
* Remove the link between a CRM entity and an ERP entity
|
|
1567
|
+
* @param request - ErpConnectionId, CrmRecordId, CrmActorType
|
|
1568
|
+
* @returns True if success
|
|
1569
|
+
*/
|
|
1570
|
+
public async breakActorLinkAsync(request: carriers.ErpSync_BreakActorLinkRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
1571
|
+
|
|
1572
|
+
/**
|
|
1573
|
+
* Remove the link between a CRM entity and an ERP entity
|
|
1574
|
+
* @param erpConnectionId - The ERP connection ID
|
|
1575
|
+
* @param crmRecordId - The ID of the CRM entity to connect to
|
|
1576
|
+
* @param crmActorType - Identifies the CRM actor type corresponding to this CRM entity
|
|
1577
|
+
* @returns True if success
|
|
1578
|
+
*/
|
|
1579
|
+
public async breakActorLinkAsync(erpConnectionId: number, crmRecordId: number, crmActorType: enums.CrmActorType, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
1580
|
+
|
|
1581
|
+
public async breakActorLinkAsync(erpConnectionId:number|carriers.ErpSync_BreakActorLinkRequest, crmRecordId?:number|base.WebApiRequestOptions, crmActorType?:enums.CrmActorType, webapi_options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
1582
|
+
let _request : carriers.ErpSync_BreakActorLinkRequest = null;
|
|
1583
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1584
|
+
const first : any = erpConnectionId;
|
|
1585
|
+
if( typeof( first ) === "object" && first && ( typeof(first.erpConnectionId)!='undefined' || typeof(first.crmRecordId)!='undefined' || typeof(first.crmActorType)!='undefined' ) )
|
|
1586
|
+
{
|
|
1587
|
+
_request = erpConnectionId as carriers.ErpSync_BreakActorLinkRequest;
|
|
1588
|
+
_options = crmRecordId as base.WebApiRequestOptions;
|
|
1589
|
+
}
|
|
1590
|
+
else
|
|
1591
|
+
{
|
|
1592
|
+
_request = {
|
|
1593
|
+
erpConnectionId: erpConnectionId as number,
|
|
1594
|
+
crmRecordId: crmRecordId as number,
|
|
1595
|
+
crmActorType: crmActorType as enums.CrmActorType,
|
|
1596
|
+
};
|
|
1597
|
+
_options = webapi_options;
|
|
1598
|
+
}
|
|
1599
|
+
return this._breakActorLinkAsync( _request, _options );
|
|
1600
|
+
}
|
|
1601
|
+
|
|
1602
|
+
|
|
1603
|
+
private async _createErpActorFromCrmAsync(request: carriers.ErpSync_CreateErpActorFromCrmRequest, options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
1604
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1605
|
+
base.WebApiBase.SetPending(options);
|
|
1606
|
+
return new Promise< boolean >(async (resolve, reject) => {
|
|
1607
|
+
try {
|
|
1608
|
+
config.baseURL = this._options.baseUrl;
|
|
1609
|
+
const response = await this._axios.post("CreateErpActorFromCrm", request , config);
|
|
1610
|
+
base.WebApiBase.SetCompleted(options);
|
|
1611
|
+
const res : boolean = response.data as boolean;
|
|
1612
|
+
resolve(res);
|
|
1613
|
+
}
|
|
1614
|
+
catch( err ) {
|
|
1615
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1616
|
+
reject(err);
|
|
1617
|
+
}
|
|
1618
|
+
});
|
|
1619
|
+
}
|
|
1620
|
+
|
|
1621
|
+
|
|
1622
|
+
|
|
1623
|
+
/**
|
|
1624
|
+
* Create ErpActor from crm entity
|
|
1625
|
+
* @param request - ConnectionId, CrmEntityId, ErpActorType, CrmActorType, ErpFieldKeyValues
|
|
1626
|
+
* @returns Created ERP actor with success
|
|
1627
|
+
*/
|
|
1628
|
+
public async createErpActorFromCrmAsync(request: carriers.ErpSync_CreateErpActorFromCrmRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
1629
|
+
|
|
1630
|
+
/**
|
|
1631
|
+
* Create ErpActor from crm entity
|
|
1632
|
+
* @param connectionId - The connection ID
|
|
1633
|
+
* @param crmEntityId - The ID of the CRM entity to create an ERP actor from
|
|
1634
|
+
* @param erpActorType - The ERP actor type
|
|
1635
|
+
* @param crmActorType - The CRM actor type
|
|
1636
|
+
* @param erpFieldKeyValues - A map of matching erp field keys and values to set for the new erp entity
|
|
1637
|
+
* @returns Created ERP actor with success
|
|
1638
|
+
*/
|
|
1639
|
+
public async createErpActorFromCrmAsync(connectionId: number, crmEntityId: number, erpActorType: enums.ErpActorType, crmActorType: enums.CrmActorType, erpFieldKeyValues: carriers.StringDictionary, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
1640
|
+
|
|
1641
|
+
public async createErpActorFromCrmAsync(connectionId:number|carriers.ErpSync_CreateErpActorFromCrmRequest, crmEntityId?:number|base.WebApiRequestOptions, erpActorType?:enums.ErpActorType, crmActorType?:enums.CrmActorType, erpFieldKeyValues?:carriers.StringDictionary, webapi_options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
1642
|
+
let _request : carriers.ErpSync_CreateErpActorFromCrmRequest = null;
|
|
1643
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1644
|
+
const first : any = connectionId;
|
|
1645
|
+
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' ) )
|
|
1646
|
+
{
|
|
1647
|
+
_request = connectionId as carriers.ErpSync_CreateErpActorFromCrmRequest;
|
|
1648
|
+
_options = crmEntityId as base.WebApiRequestOptions;
|
|
1649
|
+
}
|
|
1650
|
+
else
|
|
1651
|
+
{
|
|
1652
|
+
_request = {
|
|
1653
|
+
connectionId: connectionId as number,
|
|
1654
|
+
crmEntityId: crmEntityId as number,
|
|
1655
|
+
erpActorType: erpActorType as enums.ErpActorType,
|
|
1656
|
+
crmActorType: crmActorType as enums.CrmActorType,
|
|
1657
|
+
erpFieldKeyValues: erpFieldKeyValues as carriers.StringDictionary,
|
|
1658
|
+
};
|
|
1659
|
+
_options = webapi_options;
|
|
1660
|
+
}
|
|
1661
|
+
return this._createErpActorFromCrmAsync( _request, _options );
|
|
1662
|
+
}
|
|
1663
|
+
|
|
1664
|
+
|
|
1665
|
+
private async _saveActorTypeMappingAsync(request: carriers.ErpSync_SaveActorTypeMappingRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncActorTypeMapping > {
|
|
1666
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1667
|
+
base.WebApiBase.SetPending(options);
|
|
1668
|
+
return new Promise< carriers.ErpSyncActorTypeMapping >(async (resolve, reject) => {
|
|
1669
|
+
try {
|
|
1670
|
+
config.baseURL = this._options.baseUrl;
|
|
1671
|
+
const response = await this._axios.post("SaveActorTypeMapping", request , config);
|
|
1672
|
+
base.WebApiBase.SetCompleted(options);
|
|
1673
|
+
const res : carriers.ErpSyncActorTypeMapping = converters.Create_ErpSyncActorTypeMapping_From( response.data );
|
|
1674
|
+
resolve(res);
|
|
1675
|
+
}
|
|
1676
|
+
catch( err ) {
|
|
1677
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1678
|
+
reject(err);
|
|
1679
|
+
}
|
|
1680
|
+
});
|
|
1681
|
+
}
|
|
1682
|
+
|
|
1683
|
+
|
|
1684
|
+
|
|
1685
|
+
/**
|
|
1686
|
+
* Save mappings for a connection/actor
|
|
1687
|
+
* @param request - Mapping
|
|
1688
|
+
* @returns The current mapping from the database
|
|
1689
|
+
*/
|
|
1690
|
+
public async saveActorTypeMappingAsync(request: carriers.ErpSync_SaveActorTypeMappingRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncActorTypeMapping >;
|
|
1691
|
+
|
|
1692
|
+
/**
|
|
1693
|
+
* Save mappings for a connection/actor
|
|
1694
|
+
* @param mapping - The mapping to be saved; new mapping rows will be created in the database if needed
|
|
1695
|
+
* @returns The current mapping from the database
|
|
1696
|
+
*/
|
|
1697
|
+
public async saveActorTypeMappingAsync(mapping: carriers.ErpSyncActorTypeMapping, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncActorTypeMapping >;
|
|
1698
|
+
|
|
1699
|
+
public async saveActorTypeMappingAsync(mapping:carriers.ErpSyncActorTypeMapping|carriers.ErpSync_SaveActorTypeMappingRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncActorTypeMapping > {
|
|
1700
|
+
let _request : carriers.ErpSync_SaveActorTypeMappingRequest = null;
|
|
1701
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1702
|
+
const first : any = mapping;
|
|
1703
|
+
if( typeof( first ) === "object" && first && ( typeof(first.mapping)!='undefined' ) )
|
|
1704
|
+
{
|
|
1705
|
+
_request = mapping as carriers.ErpSync_SaveActorTypeMappingRequest;
|
|
1706
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
1707
|
+
}
|
|
1708
|
+
else
|
|
1709
|
+
{
|
|
1710
|
+
_request = {
|
|
1711
|
+
mapping: mapping as carriers.ErpSyncActorTypeMapping,
|
|
1712
|
+
};
|
|
1713
|
+
_options = webapi_options;
|
|
1714
|
+
}
|
|
1715
|
+
return this._saveActorTypeMappingAsync( _request, _options );
|
|
1716
|
+
}
|
|
1717
|
+
|
|
1718
|
+
|
|
1719
|
+
private async _validateArchiveColumnConfigAsync(request: carriers.ErpSync_ValidateArchiveColumnConfigRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
1720
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1721
|
+
base.WebApiBase.SetPending(options);
|
|
1722
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
1723
|
+
try {
|
|
1724
|
+
config.baseURL = this._options.baseUrl;
|
|
1725
|
+
const response = await this._axios.post("ValidateArchiveColumnConfig", request , config);
|
|
1726
|
+
base.WebApiBase.SetCompleted(options);
|
|
1727
|
+
const res = response.data;
|
|
1728
|
+
resolve(res);
|
|
1729
|
+
}
|
|
1730
|
+
catch( err ) {
|
|
1731
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1732
|
+
reject(err);
|
|
1733
|
+
}
|
|
1734
|
+
});
|
|
1735
|
+
}
|
|
1736
|
+
|
|
1737
|
+
|
|
1738
|
+
|
|
1739
|
+
/**
|
|
1740
|
+
* Clear field info from table SUPERLISTCOLUMNSIZE if field mapping changed on given connection
|
|
1741
|
+
* @param request - ListOwner, ErpConnectionId
|
|
1742
|
+
* @returns Validated ArchiveColumnConfig
|
|
1743
|
+
*/
|
|
1744
|
+
public async validateArchiveColumnConfigAsync(request: carriers.ErpSync_ValidateArchiveColumnConfigRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
1745
|
+
|
|
1746
|
+
/**
|
|
1747
|
+
* Clear field info from table SUPERLISTCOLUMNSIZE if field mapping changed on given connection
|
|
1748
|
+
* @param listOwner - GUI name used in archive control config
|
|
1749
|
+
* @param erpConnectionId - The ERP connection ID
|
|
1750
|
+
* @returns Validated ArchiveColumnConfig
|
|
1751
|
+
*/
|
|
1752
|
+
public async validateArchiveColumnConfigAsync(listOwner: string, erpConnectionId: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
1753
|
+
|
|
1754
|
+
public async validateArchiveColumnConfigAsync(listOwner:string|carriers.ErpSync_ValidateArchiveColumnConfigRequest, erpConnectionId?:number|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
1755
|
+
let _request : carriers.ErpSync_ValidateArchiveColumnConfigRequest = null;
|
|
1756
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1757
|
+
const first : any = listOwner;
|
|
1758
|
+
if( typeof( first ) === "object" && first && ( typeof(first.listOwner)!='undefined' || typeof(first.erpConnectionId)!='undefined' ) )
|
|
1759
|
+
{
|
|
1760
|
+
_request = listOwner as carriers.ErpSync_ValidateArchiveColumnConfigRequest;
|
|
1761
|
+
_options = erpConnectionId as base.WebApiRequestOptions;
|
|
1762
|
+
}
|
|
1763
|
+
else
|
|
1764
|
+
{
|
|
1765
|
+
_request = {
|
|
1766
|
+
listOwner: listOwner as string,
|
|
1767
|
+
erpConnectionId: erpConnectionId as number,
|
|
1768
|
+
};
|
|
1769
|
+
_options = webapi_options;
|
|
1770
|
+
}
|
|
1771
|
+
return this._validateArchiveColumnConfigAsync( _request, _options );
|
|
1772
|
+
}
|
|
1773
|
+
|
|
1774
|
+
|
|
1775
|
+
private async _updateConnectionFieldsAsync(request: carriers.ErpSync_UpdateConnectionFieldsRequest, options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
1776
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1777
|
+
base.WebApiBase.SetPending(options);
|
|
1778
|
+
return new Promise< boolean >(async (resolve, reject) => {
|
|
1779
|
+
try {
|
|
1780
|
+
config.baseURL = this._options.baseUrl;
|
|
1781
|
+
const response = await this._axios.post("UpdateConnectionFields", request , config);
|
|
1782
|
+
base.WebApiBase.SetCompleted(options);
|
|
1783
|
+
const res : boolean = response.data as boolean;
|
|
1784
|
+
resolve(res);
|
|
1785
|
+
}
|
|
1786
|
+
catch( err ) {
|
|
1787
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1788
|
+
reject(err);
|
|
1789
|
+
}
|
|
1790
|
+
});
|
|
1791
|
+
}
|
|
1792
|
+
|
|
1793
|
+
|
|
1794
|
+
|
|
1795
|
+
/**
|
|
1796
|
+
* Gets all supported actor types, and all fields for each actor type, and save this state to the CRM database
|
|
1797
|
+
* @param request - ErpConnectionId
|
|
1798
|
+
* @returns Success or fail
|
|
1799
|
+
*/
|
|
1800
|
+
public async updateConnectionFieldsAsync(request: carriers.ErpSync_UpdateConnectionFieldsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
1801
|
+
|
|
1802
|
+
/**
|
|
1803
|
+
* Gets all supported actor types, and all fields for each actor type, and save this state to the CRM database
|
|
1804
|
+
* @param erpConnectionId - The ERP connection ID
|
|
1805
|
+
* @returns Success or fail
|
|
1806
|
+
*/
|
|
1807
|
+
public async updateConnectionFieldsAsync(erpConnectionId: number, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
1808
|
+
|
|
1809
|
+
public async updateConnectionFieldsAsync(erpConnectionId:number|carriers.ErpSync_UpdateConnectionFieldsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
1810
|
+
let _request : carriers.ErpSync_UpdateConnectionFieldsRequest = null;
|
|
1811
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1812
|
+
const first : any = erpConnectionId;
|
|
1813
|
+
if( typeof( first ) === "object" && first && ( typeof(first.erpConnectionId)!='undefined' ) )
|
|
1814
|
+
{
|
|
1815
|
+
_request = erpConnectionId as carriers.ErpSync_UpdateConnectionFieldsRequest;
|
|
1816
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
1817
|
+
}
|
|
1818
|
+
else
|
|
1819
|
+
{
|
|
1820
|
+
_request = {
|
|
1821
|
+
erpConnectionId: erpConnectionId as number,
|
|
1822
|
+
};
|
|
1823
|
+
_options = webapi_options;
|
|
1824
|
+
}
|
|
1825
|
+
return this._updateConnectionFieldsAsync( _request, _options );
|
|
1826
|
+
}
|
|
1827
|
+
|
|
1828
|
+
|
|
1829
|
+
private async _getCrmActorTypeAsync(request: carriers.ErpSync_GetCrmActorTypeRequest, options?:base.WebApiRequestOptions) : Promise< enums.CrmActorType > {
|
|
1830
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1831
|
+
base.WebApiBase.SetPending(options);
|
|
1832
|
+
return new Promise< enums.CrmActorType >(async (resolve, reject) => {
|
|
1833
|
+
try {
|
|
1834
|
+
config.baseURL = this._options.baseUrl;
|
|
1835
|
+
const response = await this._axios.post("GetCrmActorType", request , config);
|
|
1836
|
+
base.WebApiBase.SetCompleted(options);
|
|
1837
|
+
const res : enums.CrmActorType = response.data as enums.CrmActorType;
|
|
1838
|
+
resolve(res);
|
|
1839
|
+
}
|
|
1840
|
+
catch( err ) {
|
|
1841
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1842
|
+
reject(err);
|
|
1843
|
+
}
|
|
1844
|
+
});
|
|
1845
|
+
}
|
|
1846
|
+
|
|
1847
|
+
|
|
1848
|
+
|
|
1849
|
+
/**
|
|
1850
|
+
* Retrieves the CrmActorType that are mapped to a specific ErpActorType for this connection
|
|
1851
|
+
* @param request - ErpConnectionId, ErpActorType
|
|
1852
|
+
* @returns The CrmActorType
|
|
1853
|
+
*/
|
|
1854
|
+
public async getCrmActorTypeAsync(request: carriers.ErpSync_GetCrmActorTypeRequest, webapi_options?:base.WebApiRequestOptions) : Promise< enums.CrmActorType >;
|
|
1855
|
+
|
|
1856
|
+
/**
|
|
1857
|
+
* Retrieves the CrmActorType that are mapped to a specific ErpActorType for this connection
|
|
1858
|
+
* @param erpConnectionId - The ERP connection ID
|
|
1859
|
+
* @param erpActorType - The ERP actor type
|
|
1860
|
+
* @returns The CrmActorType
|
|
1861
|
+
*/
|
|
1862
|
+
public async getCrmActorTypeAsync(erpConnectionId: number, erpActorType: enums.ErpActorType, webapi_options?:base.WebApiRequestOptions) : Promise< enums.CrmActorType >;
|
|
1863
|
+
|
|
1864
|
+
public async getCrmActorTypeAsync(erpConnectionId:number|carriers.ErpSync_GetCrmActorTypeRequest, erpActorType?:enums.ErpActorType|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< enums.CrmActorType > {
|
|
1865
|
+
let _request : carriers.ErpSync_GetCrmActorTypeRequest = null;
|
|
1866
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1867
|
+
const first : any = erpConnectionId;
|
|
1868
|
+
if( typeof( first ) === "object" && first && ( typeof(first.erpConnectionId)!='undefined' || typeof(first.erpActorType)!='undefined' ) )
|
|
1869
|
+
{
|
|
1870
|
+
_request = erpConnectionId as carriers.ErpSync_GetCrmActorTypeRequest;
|
|
1871
|
+
_options = erpActorType as base.WebApiRequestOptions;
|
|
1872
|
+
}
|
|
1873
|
+
else
|
|
1874
|
+
{
|
|
1875
|
+
_request = {
|
|
1876
|
+
erpConnectionId: erpConnectionId as number,
|
|
1877
|
+
erpActorType: erpActorType as enums.ErpActorType,
|
|
1878
|
+
};
|
|
1879
|
+
_options = webapi_options;
|
|
1880
|
+
}
|
|
1881
|
+
return this._getCrmActorTypeAsync( _request, _options );
|
|
1882
|
+
}
|
|
1883
|
+
|
|
1884
|
+
|
|
1885
|
+
private async _getErpSyncConnectionSummaryAsync(request: carriers.ErpSync_GetErpSyncConnectionSummaryRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncConnectionSummary > {
|
|
1886
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1887
|
+
base.WebApiBase.SetPending(options);
|
|
1888
|
+
return new Promise< carriers.ErpSyncConnectionSummary >(async (resolve, reject) => {
|
|
1889
|
+
try {
|
|
1890
|
+
config.baseURL = this._options.baseUrl;
|
|
1891
|
+
const response = await this._axios.post("GetErpSyncConnectionSummary", request , config);
|
|
1892
|
+
base.WebApiBase.SetCompleted(options);
|
|
1893
|
+
const res : carriers.ErpSyncConnectionSummary = converters.Create_ErpSyncConnectionSummary_From( response.data );
|
|
1894
|
+
resolve(res);
|
|
1895
|
+
}
|
|
1896
|
+
catch( err ) {
|
|
1897
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1898
|
+
reject(err);
|
|
1899
|
+
}
|
|
1900
|
+
});
|
|
1901
|
+
}
|
|
1902
|
+
|
|
1903
|
+
|
|
1904
|
+
|
|
1905
|
+
/**
|
|
1906
|
+
* Get a summary of the current ErpSync configuration/setup
|
|
1907
|
+
* @param request - ErpSyncConnectionId
|
|
1908
|
+
* @returns Summary of connection information, and one summary element per configured actor type
|
|
1909
|
+
*/
|
|
1910
|
+
public async getErpSyncConnectionSummaryAsync(request: carriers.ErpSync_GetErpSyncConnectionSummaryRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncConnectionSummary >;
|
|
1911
|
+
|
|
1912
|
+
/**
|
|
1913
|
+
* Get a summary of the current ErpSync configuration/setup
|
|
1914
|
+
* @param erpSyncConnectionId - The ID of the ErpSync connection for which information is sought
|
|
1915
|
+
* @returns Summary of connection information, and one summary element per configured actor type
|
|
1916
|
+
*/
|
|
1917
|
+
public async getErpSyncConnectionSummaryAsync(erpSyncConnectionId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncConnectionSummary >;
|
|
1918
|
+
|
|
1919
|
+
public async getErpSyncConnectionSummaryAsync(erpSyncConnectionId:number|carriers.ErpSync_GetErpSyncConnectionSummaryRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncConnectionSummary > {
|
|
1920
|
+
let _request : carriers.ErpSync_GetErpSyncConnectionSummaryRequest = null;
|
|
1921
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1922
|
+
const first : any = erpSyncConnectionId;
|
|
1923
|
+
if( typeof( first ) === "object" && first && ( typeof(first.erpSyncConnectionId)!='undefined' ) )
|
|
1924
|
+
{
|
|
1925
|
+
_request = erpSyncConnectionId as carriers.ErpSync_GetErpSyncConnectionSummaryRequest;
|
|
1926
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
1927
|
+
}
|
|
1928
|
+
else
|
|
1929
|
+
{
|
|
1930
|
+
_request = {
|
|
1931
|
+
erpSyncConnectionId: erpSyncConnectionId as number,
|
|
1932
|
+
};
|
|
1933
|
+
_options = webapi_options;
|
|
1934
|
+
}
|
|
1935
|
+
return this._getErpSyncConnectionSummaryAsync( _request, _options );
|
|
1936
|
+
}
|
|
1937
|
+
|
|
1938
|
+
/*
|
|
1939
|
+
* Gets a ErpSyncConnectorEntity object.
|
|
1940
|
+
* @param erpSyncConnectorEntityId - The primary key.
|
|
1941
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
1942
|
+
* @returns A single ErpSyncConnectorEntity
|
|
1943
|
+
*/
|
|
1944
|
+
public async getErpSyncConnectorEntityAsync(erpSyncConnectorEntityId: number, options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncConnectorEntity > {
|
|
1945
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1946
|
+
base.WebApiBase.SetPending(options);
|
|
1947
|
+
return new Promise< carriers.ErpSyncConnectorEntity >(async (resolve, reject) => {
|
|
1948
|
+
try {
|
|
1949
|
+
const response = await this._axios.post("GetErpSyncConnectorEntity?erpSyncConnectorEntityId=" + erpSyncConnectorEntityId, null, config);
|
|
1950
|
+
base.WebApiBase.SetCompleted(options);
|
|
1951
|
+
const res = converters.Create_ErpSyncConnectorEntity_From( response.data );
|
|
1952
|
+
resolve(res);
|
|
1953
|
+
}
|
|
1954
|
+
catch( err ) {
|
|
1955
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1956
|
+
reject(err);
|
|
1957
|
+
}
|
|
1958
|
+
});
|
|
1959
|
+
}
|
|
1960
|
+
|
|
1961
|
+
|
|
1962
|
+
private async _canDeleteErpSyncConnectorEntityAsync(request: carriers.ErpSync_CanDeleteErpSyncConnectorEntityRequest, options?:base.WebApiRequestOptions) : Promise< enums.ErpSyncResponseCode > {
|
|
1963
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1964
|
+
base.WebApiBase.SetPending(options);
|
|
1965
|
+
return new Promise< enums.ErpSyncResponseCode >(async (resolve, reject) => {
|
|
1966
|
+
try {
|
|
1967
|
+
config.baseURL = this._options.baseUrl;
|
|
1968
|
+
const response = await this._axios.post("CanDeleteErpSyncConnectorEntity", request , config);
|
|
1969
|
+
base.WebApiBase.SetCompleted(options);
|
|
1970
|
+
const res : enums.ErpSyncResponseCode = response.data as enums.ErpSyncResponseCode;
|
|
1971
|
+
resolve(res);
|
|
1972
|
+
}
|
|
1973
|
+
catch( err ) {
|
|
1974
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1975
|
+
reject(err);
|
|
1976
|
+
}
|
|
1977
|
+
});
|
|
1978
|
+
}
|
|
1979
|
+
|
|
1980
|
+
|
|
1981
|
+
|
|
1982
|
+
/**
|
|
1983
|
+
* Can we delete the connector?
|
|
1984
|
+
* @param request - ErpSyncConnectorId
|
|
1985
|
+
* @returns Enum response says ok or what is wrong
|
|
1986
|
+
*/
|
|
1987
|
+
public async canDeleteErpSyncConnectorEntityAsync(request: carriers.ErpSync_CanDeleteErpSyncConnectorEntityRequest, webapi_options?:base.WebApiRequestOptions) : Promise< enums.ErpSyncResponseCode >;
|
|
1988
|
+
|
|
1989
|
+
/**
|
|
1990
|
+
* Can we delete the connector?
|
|
1991
|
+
* @param erpSyncConnectorId - The ID of the ErpSync connector to check if can be deleted
|
|
1992
|
+
* @returns Enum response says ok or what is wrong
|
|
1993
|
+
*/
|
|
1994
|
+
public async canDeleteErpSyncConnectorEntityAsync(erpSyncConnectorId: number, webapi_options?:base.WebApiRequestOptions) : Promise< enums.ErpSyncResponseCode >;
|
|
1995
|
+
|
|
1996
|
+
public async canDeleteErpSyncConnectorEntityAsync(erpSyncConnectorId:number|carriers.ErpSync_CanDeleteErpSyncConnectorEntityRequest, webapi_options?:base.WebApiRequestOptions) : Promise< enums.ErpSyncResponseCode > {
|
|
1997
|
+
let _request : carriers.ErpSync_CanDeleteErpSyncConnectorEntityRequest = null;
|
|
1998
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1999
|
+
const first : any = erpSyncConnectorId;
|
|
2000
|
+
if( typeof( first ) === "object" && first && ( typeof(first.erpSyncConnectorId)!='undefined' ) )
|
|
2001
|
+
{
|
|
2002
|
+
_request = erpSyncConnectorId as carriers.ErpSync_CanDeleteErpSyncConnectorEntityRequest;
|
|
2003
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
2004
|
+
}
|
|
2005
|
+
else
|
|
2006
|
+
{
|
|
2007
|
+
_request = {
|
|
2008
|
+
erpSyncConnectorId: erpSyncConnectorId as number,
|
|
2009
|
+
};
|
|
2010
|
+
_options = webapi_options;
|
|
2011
|
+
}
|
|
2012
|
+
return this._canDeleteErpSyncConnectorEntityAsync( _request, _options );
|
|
2013
|
+
}
|
|
2014
|
+
|
|
2015
|
+
|
|
2016
|
+
private async _testConnectorUrlAsync(request: carriers.ErpSync_TestConnectorUrlRequest, options?:base.WebApiRequestOptions) : Promise< enums.ErpSyncResponseCode > {
|
|
2017
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2018
|
+
base.WebApiBase.SetPending(options);
|
|
2019
|
+
return new Promise< enums.ErpSyncResponseCode >(async (resolve, reject) => {
|
|
2020
|
+
try {
|
|
2021
|
+
config.baseURL = this._options.baseUrl;
|
|
2022
|
+
const response = await this._axios.post("TestConnectorUrl", request , config);
|
|
2023
|
+
base.WebApiBase.SetCompleted(options);
|
|
2024
|
+
const res : enums.ErpSyncResponseCode = response.data as enums.ErpSyncResponseCode;
|
|
2025
|
+
resolve(res);
|
|
2026
|
+
}
|
|
2027
|
+
catch( err ) {
|
|
2028
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2029
|
+
reject(err);
|
|
2030
|
+
}
|
|
2031
|
+
});
|
|
2032
|
+
}
|
|
2033
|
+
|
|
2034
|
+
|
|
2035
|
+
|
|
2036
|
+
/**
|
|
2037
|
+
* Test if connector urls anwers
|
|
2038
|
+
* @param request - Url
|
|
2039
|
+
* @returns Enum response says ok or what is wrong
|
|
2040
|
+
*/
|
|
2041
|
+
public async testConnectorUrlAsync(request: carriers.ErpSync_TestConnectorUrlRequest, webapi_options?:base.WebApiRequestOptions) : Promise< enums.ErpSyncResponseCode >;
|
|
2042
|
+
|
|
2043
|
+
/**
|
|
2044
|
+
* Test if connector urls anwers
|
|
2045
|
+
* @param url - The url to test connection on
|
|
2046
|
+
* @returns Enum response says ok or what is wrong
|
|
2047
|
+
*/
|
|
2048
|
+
public async testConnectorUrlAsync(url: string, webapi_options?:base.WebApiRequestOptions) : Promise< enums.ErpSyncResponseCode >;
|
|
2049
|
+
|
|
2050
|
+
public async testConnectorUrlAsync(url:string|carriers.ErpSync_TestConnectorUrlRequest, webapi_options?:base.WebApiRequestOptions) : Promise< enums.ErpSyncResponseCode > {
|
|
2051
|
+
let _request : carriers.ErpSync_TestConnectorUrlRequest = null;
|
|
2052
|
+
let _options : base.WebApiRequestOptions = null;
|
|
2053
|
+
const first : any = url;
|
|
2054
|
+
if( typeof( first ) === "object" && first && ( typeof(first.url)!='undefined' ) )
|
|
2055
|
+
{
|
|
2056
|
+
_request = url as carriers.ErpSync_TestConnectorUrlRequest;
|
|
2057
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
2058
|
+
}
|
|
2059
|
+
else
|
|
2060
|
+
{
|
|
2061
|
+
_request = {
|
|
2062
|
+
url: url as string,
|
|
2063
|
+
};
|
|
2064
|
+
_options = webapi_options;
|
|
2065
|
+
}
|
|
2066
|
+
return this._testConnectorUrlAsync( _request, _options );
|
|
2067
|
+
}
|
|
2068
|
+
|
|
2069
|
+
|
|
2070
|
+
private async _saveDefaultValueInfoAsync(request: carriers.ErpSync_SaveDefaultValueInfoRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncDefaultValue > {
|
|
2071
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2072
|
+
base.WebApiBase.SetPending(options);
|
|
2073
|
+
return new Promise< carriers.ErpSyncDefaultValue >(async (resolve, reject) => {
|
|
2074
|
+
try {
|
|
2075
|
+
config.baseURL = this._options.baseUrl;
|
|
2076
|
+
const response = await this._axios.post("SaveDefaultValueInfo", request , config);
|
|
2077
|
+
base.WebApiBase.SetCompleted(options);
|
|
2078
|
+
const res : carriers.ErpSyncDefaultValue = converters.Create_ErpSyncDefaultValue_From( response.data );
|
|
2079
|
+
resolve(res);
|
|
2080
|
+
}
|
|
2081
|
+
catch( err ) {
|
|
2082
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2083
|
+
reject(err);
|
|
2084
|
+
}
|
|
2085
|
+
});
|
|
2086
|
+
}
|
|
2087
|
+
|
|
2088
|
+
|
|
2089
|
+
|
|
2090
|
+
/**
|
|
2091
|
+
* Save information about a default value for an ERP field
|
|
2092
|
+
* @param request - ErpSyncDefaultValue
|
|
2093
|
+
* @returns The newly saved ErpSyncDefaultValue
|
|
2094
|
+
*/
|
|
2095
|
+
public async saveDefaultValueInfoAsync(request: carriers.ErpSync_SaveDefaultValueInfoRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncDefaultValue >;
|
|
2096
|
+
|
|
2097
|
+
/**
|
|
2098
|
+
* Save information about a default value for an ERP field
|
|
2099
|
+
* @param erpSyncDefaultValue - The id of the ERPfield to save
|
|
2100
|
+
* @returns The newly saved ErpSyncDefaultValue
|
|
2101
|
+
*/
|
|
2102
|
+
public async saveDefaultValueInfoAsync(erpSyncDefaultValue: carriers.ErpSyncDefaultValue, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncDefaultValue >;
|
|
2103
|
+
|
|
2104
|
+
public async saveDefaultValueInfoAsync(erpSyncDefaultValue:carriers.ErpSyncDefaultValue|carriers.ErpSync_SaveDefaultValueInfoRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncDefaultValue > {
|
|
2105
|
+
let _request : carriers.ErpSync_SaveDefaultValueInfoRequest = null;
|
|
2106
|
+
let _options : base.WebApiRequestOptions = null;
|
|
2107
|
+
const first : any = erpSyncDefaultValue;
|
|
2108
|
+
if( typeof( first ) === "object" && first && ( typeof(first.erpSyncDefaultValue)!='undefined' ) )
|
|
2109
|
+
{
|
|
2110
|
+
_request = erpSyncDefaultValue as carriers.ErpSync_SaveDefaultValueInfoRequest;
|
|
2111
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
2112
|
+
}
|
|
2113
|
+
else
|
|
2114
|
+
{
|
|
2115
|
+
_request = {
|
|
2116
|
+
erpSyncDefaultValue: erpSyncDefaultValue as carriers.ErpSyncDefaultValue,
|
|
2117
|
+
};
|
|
2118
|
+
_options = webapi_options;
|
|
2119
|
+
}
|
|
2120
|
+
return this._saveDefaultValueInfoAsync( _request, _options );
|
|
2121
|
+
}
|
|
2122
|
+
|
|
2123
|
+
|
|
2124
|
+
private async _getDefaultValueInfoAsync(request: carriers.ErpSync_GetDefaultValueInfoRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncDefaultValue > {
|
|
2125
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2126
|
+
base.WebApiBase.SetPending(options);
|
|
2127
|
+
return new Promise< carriers.ErpSyncDefaultValue >(async (resolve, reject) => {
|
|
2128
|
+
try {
|
|
2129
|
+
config.baseURL = this._options.baseUrl;
|
|
2130
|
+
const response = await this._axios.post("GetDefaultValueInfo", request , config);
|
|
2131
|
+
base.WebApiBase.SetCompleted(options);
|
|
2132
|
+
const res : carriers.ErpSyncDefaultValue = converters.Create_ErpSyncDefaultValue_From( response.data );
|
|
2133
|
+
resolve(res);
|
|
2134
|
+
}
|
|
2135
|
+
catch( err ) {
|
|
2136
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2137
|
+
reject(err);
|
|
2138
|
+
}
|
|
2139
|
+
});
|
|
2140
|
+
}
|
|
2141
|
+
|
|
2142
|
+
|
|
2143
|
+
|
|
2144
|
+
/**
|
|
2145
|
+
* Get information about default value for an ERP field
|
|
2146
|
+
* @param request - ErpFieldId
|
|
2147
|
+
* @returns Object with information about default values
|
|
2148
|
+
*/
|
|
2149
|
+
public async getDefaultValueInfoAsync(request: carriers.ErpSync_GetDefaultValueInfoRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncDefaultValue >;
|
|
2150
|
+
|
|
2151
|
+
/**
|
|
2152
|
+
* Get information about default value for an ERP field
|
|
2153
|
+
* @param erpFieldId - The id of the ERP field
|
|
2154
|
+
* @returns Object with information about default values
|
|
2155
|
+
*/
|
|
2156
|
+
public async getDefaultValueInfoAsync(erpFieldId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncDefaultValue >;
|
|
2157
|
+
|
|
2158
|
+
public async getDefaultValueInfoAsync(erpFieldId:number|carriers.ErpSync_GetDefaultValueInfoRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncDefaultValue > {
|
|
2159
|
+
let _request : carriers.ErpSync_GetDefaultValueInfoRequest = null;
|
|
2160
|
+
let _options : base.WebApiRequestOptions = null;
|
|
2161
|
+
const first : any = erpFieldId;
|
|
2162
|
+
if( typeof( first ) === "object" && first && ( typeof(first.erpFieldId)!='undefined' ) )
|
|
2163
|
+
{
|
|
2164
|
+
_request = erpFieldId as carriers.ErpSync_GetDefaultValueInfoRequest;
|
|
2165
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
2166
|
+
}
|
|
2167
|
+
else
|
|
2168
|
+
{
|
|
2169
|
+
_request = {
|
|
2170
|
+
erpFieldId: erpFieldId as number,
|
|
2171
|
+
};
|
|
2172
|
+
_options = webapi_options;
|
|
2173
|
+
}
|
|
2174
|
+
return this._getDefaultValueInfoAsync( _request, _options );
|
|
2175
|
+
}
|
|
2176
|
+
|
|
2177
|
+
|
|
2178
|
+
private async _syncAllAsync( options?:base.WebApiRequestOptions) : Promise< carriers.PluginResponse > {
|
|
2179
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2180
|
+
base.WebApiBase.SetPending(options);
|
|
2181
|
+
return new Promise< carriers.PluginResponse >(async (resolve, reject) => {
|
|
2182
|
+
try {
|
|
2183
|
+
config.baseURL = this._options.baseUrl;
|
|
2184
|
+
const response = await this._axios.post("SyncAll", undefined , config);
|
|
2185
|
+
base.WebApiBase.SetCompleted(options);
|
|
2186
|
+
const res : carriers.PluginResponse = converters.Create_PluginResponse_From( response.data );
|
|
2187
|
+
resolve(res);
|
|
2188
|
+
}
|
|
2189
|
+
catch( err ) {
|
|
2190
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2191
|
+
reject(err);
|
|
2192
|
+
}
|
|
2193
|
+
});
|
|
2194
|
+
}
|
|
2195
|
+
|
|
2196
|
+
|
|
2197
|
+
/**
|
|
2198
|
+
* Sync all active connections
|
|
2199
|
+
* @returns The response
|
|
2200
|
+
*/
|
|
2201
|
+
public async syncAllAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PluginResponse >
|
|
2202
|
+
{
|
|
2203
|
+
return this._syncAllAsync(webapi_options);
|
|
2204
|
+
}
|
|
2205
|
+
|
|
2206
|
+
|
|
2207
|
+
private async _forceSyncAllAsync( options?:base.WebApiRequestOptions) : Promise< carriers.PluginResponse > {
|
|
2208
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2209
|
+
base.WebApiBase.SetPending(options);
|
|
2210
|
+
return new Promise< carriers.PluginResponse >(async (resolve, reject) => {
|
|
2211
|
+
try {
|
|
2212
|
+
config.baseURL = this._options.baseUrl;
|
|
2213
|
+
const response = await this._axios.post("ForceSyncAll", undefined , config);
|
|
2214
|
+
base.WebApiBase.SetCompleted(options);
|
|
2215
|
+
const res : carriers.PluginResponse = converters.Create_PluginResponse_From( response.data );
|
|
2216
|
+
resolve(res);
|
|
2217
|
+
}
|
|
2218
|
+
catch( err ) {
|
|
2219
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2220
|
+
reject(err);
|
|
2221
|
+
}
|
|
2222
|
+
});
|
|
2223
|
+
}
|
|
2224
|
+
|
|
2225
|
+
|
|
2226
|
+
/**
|
|
2227
|
+
* Sync all active connections even when automatic sync is off
|
|
2228
|
+
* @returns The response
|
|
2229
|
+
*/
|
|
2230
|
+
public async forceSyncAllAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PluginResponse >
|
|
2231
|
+
{
|
|
2232
|
+
return this._forceSyncAllAsync(webapi_options);
|
|
2233
|
+
}
|
|
2234
|
+
|
|
2235
|
+
|
|
2236
|
+
private async _forceResyncAsync(request: carriers.ErpSync_ForceResyncRequest, options?:base.WebApiRequestOptions) : Promise< carriers.PluginResponse > {
|
|
2237
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2238
|
+
base.WebApiBase.SetPending(options);
|
|
2239
|
+
return new Promise< carriers.PluginResponse >(async (resolve, reject) => {
|
|
2240
|
+
try {
|
|
2241
|
+
config.baseURL = this._options.baseUrl;
|
|
2242
|
+
const response = await this._axios.post("ForceResync", request , config);
|
|
2243
|
+
base.WebApiBase.SetCompleted(options);
|
|
2244
|
+
const res : carriers.PluginResponse = converters.Create_PluginResponse_From( response.data );
|
|
2245
|
+
resolve(res);
|
|
2246
|
+
}
|
|
2247
|
+
catch( err ) {
|
|
2248
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2249
|
+
reject(err);
|
|
2250
|
+
}
|
|
2251
|
+
});
|
|
2252
|
+
}
|
|
2253
|
+
|
|
2254
|
+
|
|
2255
|
+
|
|
2256
|
+
/**
|
|
2257
|
+
* Force resync from CRM or given Erp connection to all other connections
|
|
2258
|
+
* @param request - ErpConnectionId, InternalKeyIds
|
|
2259
|
+
* @returns The response
|
|
2260
|
+
*/
|
|
2261
|
+
public async forceResyncAsync(request: carriers.ErpSync_ForceResyncRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PluginResponse >;
|
|
2262
|
+
|
|
2263
|
+
/**
|
|
2264
|
+
* Force resync from CRM or given Erp connection to all other connections
|
|
2265
|
+
* @param erpConnectionId - If positive, resync from the given erp connection
|
|
2266
|
+
* @param internalKeyIds - The internal keys of the entities to resync, or empty to resync all
|
|
2267
|
+
* @returns The response
|
|
2268
|
+
*/
|
|
2269
|
+
public async forceResyncAsync(erpConnectionId: number, internalKeyIds: number[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PluginResponse >;
|
|
2270
|
+
|
|
2271
|
+
public async forceResyncAsync(erpConnectionId:number|carriers.ErpSync_ForceResyncRequest, internalKeyIds?:number[]|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PluginResponse > {
|
|
2272
|
+
let _request : carriers.ErpSync_ForceResyncRequest = null;
|
|
2273
|
+
let _options : base.WebApiRequestOptions = null;
|
|
2274
|
+
const first : any = erpConnectionId;
|
|
2275
|
+
if( typeof( first ) === "object" && first && ( typeof(first.erpConnectionId)!='undefined' || typeof(first.internalKeyIds)!='undefined' ) )
|
|
2276
|
+
{
|
|
2277
|
+
_request = erpConnectionId as carriers.ErpSync_ForceResyncRequest;
|
|
2278
|
+
_options = internalKeyIds as base.WebApiRequestOptions;
|
|
2279
|
+
}
|
|
2280
|
+
else
|
|
2281
|
+
{
|
|
2282
|
+
_request = {
|
|
2283
|
+
erpConnectionId: erpConnectionId as number,
|
|
2284
|
+
internalKeyIds: internalKeyIds as number[],
|
|
2285
|
+
};
|
|
2286
|
+
_options = webapi_options;
|
|
2287
|
+
}
|
|
2288
|
+
return this._forceResyncAsync( _request, _options );
|
|
2289
|
+
}
|
|
2290
|
+
|
|
2291
|
+
|
|
2292
|
+
private async _forceResyncNoBlankValuesAsync(request: carriers.ErpSync_ForceResyncNoBlankValuesRequest, options?:base.WebApiRequestOptions) : Promise< carriers.PluginResponse > {
|
|
2293
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2294
|
+
base.WebApiBase.SetPending(options);
|
|
2295
|
+
return new Promise< carriers.PluginResponse >(async (resolve, reject) => {
|
|
2296
|
+
try {
|
|
2297
|
+
config.baseURL = this._options.baseUrl;
|
|
2298
|
+
const response = await this._axios.post("ForceResyncNoBlankValues", request , config);
|
|
2299
|
+
base.WebApiBase.SetCompleted(options);
|
|
2300
|
+
const res : carriers.PluginResponse = converters.Create_PluginResponse_From( response.data );
|
|
2301
|
+
resolve(res);
|
|
2302
|
+
}
|
|
2303
|
+
catch( err ) {
|
|
2304
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2305
|
+
reject(err);
|
|
2306
|
+
}
|
|
2307
|
+
});
|
|
2308
|
+
}
|
|
2309
|
+
|
|
2310
|
+
|
|
2311
|
+
|
|
2312
|
+
/**
|
|
2313
|
+
* Force resync from CRM or given Erp connection to all other connections and tell the sync that you don't want blank values to overwrite non-blank values. Useful on import.
|
|
2314
|
+
* @param request - ErpConnectionId, InternalKeyIds
|
|
2315
|
+
* @returns The response
|
|
2316
|
+
*/
|
|
2317
|
+
public async forceResyncNoBlankValuesAsync(request: carriers.ErpSync_ForceResyncNoBlankValuesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PluginResponse >;
|
|
2318
|
+
|
|
2319
|
+
/**
|
|
2320
|
+
* Force resync from CRM or given Erp connection to all other connections and tell the sync that you don't want blank values to overwrite non-blank values. Useful on import.
|
|
2321
|
+
* @param erpConnectionId - If positive, resync from the given erp connection
|
|
2322
|
+
* @param internalKeyIds - The internal keys of the entities to resync, or empty to resync all
|
|
2323
|
+
* @returns The response
|
|
2324
|
+
*/
|
|
2325
|
+
public async forceResyncNoBlankValuesAsync(erpConnectionId: number, internalKeyIds: number[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PluginResponse >;
|
|
2326
|
+
|
|
2327
|
+
public async forceResyncNoBlankValuesAsync(erpConnectionId:number|carriers.ErpSync_ForceResyncNoBlankValuesRequest, internalKeyIds?:number[]|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PluginResponse > {
|
|
2328
|
+
let _request : carriers.ErpSync_ForceResyncNoBlankValuesRequest = null;
|
|
2329
|
+
let _options : base.WebApiRequestOptions = null;
|
|
2330
|
+
const first : any = erpConnectionId;
|
|
2331
|
+
if( typeof( first ) === "object" && first && ( typeof(first.erpConnectionId)!='undefined' || typeof(first.internalKeyIds)!='undefined' ) )
|
|
2332
|
+
{
|
|
2333
|
+
_request = erpConnectionId as carriers.ErpSync_ForceResyncNoBlankValuesRequest;
|
|
2334
|
+
_options = internalKeyIds as base.WebApiRequestOptions;
|
|
2335
|
+
}
|
|
2336
|
+
else
|
|
2337
|
+
{
|
|
2338
|
+
_request = {
|
|
2339
|
+
erpConnectionId: erpConnectionId as number,
|
|
2340
|
+
internalKeyIds: internalKeyIds as number[],
|
|
2341
|
+
};
|
|
2342
|
+
_options = webapi_options;
|
|
2343
|
+
}
|
|
2344
|
+
return this._forceResyncNoBlankValuesAsync( _request, _options );
|
|
2345
|
+
}
|
|
2346
|
+
|
|
2347
|
+
|
|
2348
|
+
private async _forceResyncBatchTaskAsync(request: carriers.ErpSync_ForceResyncBatchTaskRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
2349
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2350
|
+
base.WebApiBase.SetPending(options);
|
|
2351
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
2352
|
+
try {
|
|
2353
|
+
config.baseURL = this._options.baseUrl;
|
|
2354
|
+
const response = await this._axios.post("ForceResyncBatchTask", request , config);
|
|
2355
|
+
base.WebApiBase.SetCompleted(options);
|
|
2356
|
+
const res = response.data;
|
|
2357
|
+
resolve(res);
|
|
2358
|
+
}
|
|
2359
|
+
catch( err ) {
|
|
2360
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2361
|
+
reject(err);
|
|
2362
|
+
}
|
|
2363
|
+
});
|
|
2364
|
+
}
|
|
2365
|
+
|
|
2366
|
+
|
|
2367
|
+
|
|
2368
|
+
/**
|
|
2369
|
+
* Start batch task to force resync from CRM or given Erp connection to all other connections
|
|
2370
|
+
* @param request - ErpConnectionId, InternalKeyIds
|
|
2371
|
+
* @returns
|
|
2372
|
+
*/
|
|
2373
|
+
public async forceResyncBatchTaskAsync(request: carriers.ErpSync_ForceResyncBatchTaskRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
2374
|
+
|
|
2375
|
+
/**
|
|
2376
|
+
* Start batch task to force resync from CRM or given Erp connection to all other connections
|
|
2377
|
+
* @param erpConnectionId - If positive, resync from the given erp connection
|
|
2378
|
+
* @param internalKeyIds - The internal keys of the entities to resync, or empty to resync all
|
|
2379
|
+
* @returns
|
|
2380
|
+
*/
|
|
2381
|
+
public async forceResyncBatchTaskAsync(erpConnectionId: number, internalKeyIds: number[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
2382
|
+
|
|
2383
|
+
public async forceResyncBatchTaskAsync(erpConnectionId:number|carriers.ErpSync_ForceResyncBatchTaskRequest, internalKeyIds?:number[]|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
2384
|
+
let _request : carriers.ErpSync_ForceResyncBatchTaskRequest = null;
|
|
2385
|
+
let _options : base.WebApiRequestOptions = null;
|
|
2386
|
+
const first : any = erpConnectionId;
|
|
2387
|
+
if( typeof( first ) === "object" && first && ( typeof(first.erpConnectionId)!='undefined' || typeof(first.internalKeyIds)!='undefined' ) )
|
|
2388
|
+
{
|
|
2389
|
+
_request = erpConnectionId as carriers.ErpSync_ForceResyncBatchTaskRequest;
|
|
2390
|
+
_options = internalKeyIds as base.WebApiRequestOptions;
|
|
2391
|
+
}
|
|
2392
|
+
else
|
|
2393
|
+
{
|
|
2394
|
+
_request = {
|
|
2395
|
+
erpConnectionId: erpConnectionId as number,
|
|
2396
|
+
internalKeyIds: internalKeyIds as number[],
|
|
2397
|
+
};
|
|
2398
|
+
_options = webapi_options;
|
|
2399
|
+
}
|
|
2400
|
+
return this._forceResyncBatchTaskAsync( _request, _options );
|
|
2401
|
+
}
|
|
2402
|
+
|
|
2403
|
+
|
|
2404
|
+
private async _forceResyncExternalAsync(request: carriers.ErpSync_ForceResyncExternalRequest, options?:base.WebApiRequestOptions) : Promise< carriers.PluginResponse > {
|
|
2405
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2406
|
+
base.WebApiBase.SetPending(options);
|
|
2407
|
+
return new Promise< carriers.PluginResponse >(async (resolve, reject) => {
|
|
2408
|
+
try {
|
|
2409
|
+
config.baseURL = this._options.baseUrl;
|
|
2410
|
+
const response = await this._axios.post("ForceResyncExternal", request , config);
|
|
2411
|
+
base.WebApiBase.SetCompleted(options);
|
|
2412
|
+
const res : carriers.PluginResponse = converters.Create_PluginResponse_From( response.data );
|
|
2413
|
+
resolve(res);
|
|
2414
|
+
}
|
|
2415
|
+
catch( err ) {
|
|
2416
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2417
|
+
reject(err);
|
|
2418
|
+
}
|
|
2419
|
+
});
|
|
2420
|
+
}
|
|
2421
|
+
|
|
2422
|
+
|
|
2423
|
+
|
|
2424
|
+
/**
|
|
2425
|
+
* Force resync from CRM or given Erp connection to all other connections, using external keys
|
|
2426
|
+
* @param request - ErpConnectionId, ErpActorType, ExternalKeys
|
|
2427
|
+
* @returns The response
|
|
2428
|
+
*/
|
|
2429
|
+
public async forceResyncExternalAsync(request: carriers.ErpSync_ForceResyncExternalRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PluginResponse >;
|
|
2430
|
+
|
|
2431
|
+
/**
|
|
2432
|
+
* Force resync from CRM or given Erp connection to all other connections, using external keys
|
|
2433
|
+
* @param erpConnectionId - Resync from the given erp connection
|
|
2434
|
+
* @param erpActorType - Which actor type the external keys are associated with
|
|
2435
|
+
* @param externalKeys - The internal keys of the entities to resync, or empty to resync all
|
|
2436
|
+
* @returns The response
|
|
2437
|
+
*/
|
|
2438
|
+
public async forceResyncExternalAsync(erpConnectionId: number, erpActorType: enums.ErpActorType, externalKeys: string[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PluginResponse >;
|
|
2439
|
+
|
|
2440
|
+
public async forceResyncExternalAsync(erpConnectionId:number|carriers.ErpSync_ForceResyncExternalRequest, erpActorType?:enums.ErpActorType|base.WebApiRequestOptions, externalKeys?:string[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PluginResponse > {
|
|
2441
|
+
let _request : carriers.ErpSync_ForceResyncExternalRequest = null;
|
|
2442
|
+
let _options : base.WebApiRequestOptions = null;
|
|
2443
|
+
const first : any = erpConnectionId;
|
|
2444
|
+
if( typeof( first ) === "object" && first && ( typeof(first.erpConnectionId)!='undefined' || typeof(first.erpActorType)!='undefined' || typeof(first.externalKeys)!='undefined' ) )
|
|
2445
|
+
{
|
|
2446
|
+
_request = erpConnectionId as carriers.ErpSync_ForceResyncExternalRequest;
|
|
2447
|
+
_options = erpActorType as base.WebApiRequestOptions;
|
|
2448
|
+
}
|
|
2449
|
+
else
|
|
2450
|
+
{
|
|
2451
|
+
_request = {
|
|
2452
|
+
erpConnectionId: erpConnectionId as number,
|
|
2453
|
+
erpActorType: erpActorType as enums.ErpActorType,
|
|
2454
|
+
externalKeys: externalKeys as string[],
|
|
2455
|
+
};
|
|
2456
|
+
_options = webapi_options;
|
|
2457
|
+
}
|
|
2458
|
+
return this._forceResyncExternalAsync( _request, _options );
|
|
2459
|
+
}
|
|
2460
|
+
|
|
2461
|
+
|
|
2462
|
+
private async _forceResyncExternalNoBlankValuesAsync(request: carriers.ErpSync_ForceResyncExternalNoBlankValuesRequest, options?:base.WebApiRequestOptions) : Promise< carriers.PluginResponse > {
|
|
2463
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2464
|
+
base.WebApiBase.SetPending(options);
|
|
2465
|
+
return new Promise< carriers.PluginResponse >(async (resolve, reject) => {
|
|
2466
|
+
try {
|
|
2467
|
+
config.baseURL = this._options.baseUrl;
|
|
2468
|
+
const response = await this._axios.post("ForceResyncExternalNoBlankValues", request , config);
|
|
2469
|
+
base.WebApiBase.SetCompleted(options);
|
|
2470
|
+
const res : carriers.PluginResponse = converters.Create_PluginResponse_From( response.data );
|
|
2471
|
+
resolve(res);
|
|
2472
|
+
}
|
|
2473
|
+
catch( err ) {
|
|
2474
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2475
|
+
reject(err);
|
|
2476
|
+
}
|
|
2477
|
+
});
|
|
2478
|
+
}
|
|
2479
|
+
|
|
2480
|
+
|
|
2481
|
+
|
|
2482
|
+
/**
|
|
2483
|
+
* Force resync from CRM or given Erp connection to all other connections, using external keys, and tell the sync that you don't want blank values to overwrite non-blank values. Useful on import.
|
|
2484
|
+
* @param request - ErpConnectionId, ErpActorType, ExternalKeys
|
|
2485
|
+
* @returns The response
|
|
2486
|
+
*/
|
|
2487
|
+
public async forceResyncExternalNoBlankValuesAsync(request: carriers.ErpSync_ForceResyncExternalNoBlankValuesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PluginResponse >;
|
|
2488
|
+
|
|
2489
|
+
/**
|
|
2490
|
+
* Force resync from CRM or given Erp connection to all other connections, using external keys, and tell the sync that you don't want blank values to overwrite non-blank values. Useful on import.
|
|
2491
|
+
* @param erpConnectionId - Resync from the given erp connection
|
|
2492
|
+
* @param erpActorType - Which actor type the external keys are associated with
|
|
2493
|
+
* @param externalKeys - The internal keys of the entities to resync, or empty to resync all
|
|
2494
|
+
* @returns The response
|
|
2495
|
+
*/
|
|
2496
|
+
public async forceResyncExternalNoBlankValuesAsync(erpConnectionId: number, erpActorType: enums.ErpActorType, externalKeys: string[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PluginResponse >;
|
|
2497
|
+
|
|
2498
|
+
public async forceResyncExternalNoBlankValuesAsync(erpConnectionId:number|carriers.ErpSync_ForceResyncExternalNoBlankValuesRequest, erpActorType?:enums.ErpActorType|base.WebApiRequestOptions, externalKeys?:string[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PluginResponse > {
|
|
2499
|
+
let _request : carriers.ErpSync_ForceResyncExternalNoBlankValuesRequest = null;
|
|
2500
|
+
let _options : base.WebApiRequestOptions = null;
|
|
2501
|
+
const first : any = erpConnectionId;
|
|
2502
|
+
if( typeof( first ) === "object" && first && ( typeof(first.erpConnectionId)!='undefined' || typeof(first.erpActorType)!='undefined' || typeof(first.externalKeys)!='undefined' ) )
|
|
2503
|
+
{
|
|
2504
|
+
_request = erpConnectionId as carriers.ErpSync_ForceResyncExternalNoBlankValuesRequest;
|
|
2505
|
+
_options = erpActorType as base.WebApiRequestOptions;
|
|
2506
|
+
}
|
|
2507
|
+
else
|
|
2508
|
+
{
|
|
2509
|
+
_request = {
|
|
2510
|
+
erpConnectionId: erpConnectionId as number,
|
|
2511
|
+
erpActorType: erpActorType as enums.ErpActorType,
|
|
2512
|
+
externalKeys: externalKeys as string[],
|
|
2513
|
+
};
|
|
2514
|
+
_options = webapi_options;
|
|
2515
|
+
}
|
|
2516
|
+
return this._forceResyncExternalNoBlankValuesAsync( _request, _options );
|
|
2517
|
+
}
|
|
2518
|
+
|
|
2519
|
+
|
|
2520
|
+
private async _getEngineStatusAsync( options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncEngineStatus > {
|
|
2521
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2522
|
+
base.WebApiBase.SetPending(options);
|
|
2523
|
+
return new Promise< carriers.ErpSyncEngineStatus >(async (resolve, reject) => {
|
|
2524
|
+
try {
|
|
2525
|
+
config.baseURL = this._options.baseUrl;
|
|
2526
|
+
const response = await this._axios.post("GetEngineStatus", undefined , config);
|
|
2527
|
+
base.WebApiBase.SetCompleted(options);
|
|
2528
|
+
const res : carriers.ErpSyncEngineStatus = converters.Create_ErpSyncEngineStatus_From( response.data );
|
|
2529
|
+
resolve(res);
|
|
2530
|
+
}
|
|
2531
|
+
catch( err ) {
|
|
2532
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2533
|
+
reject(err);
|
|
2534
|
+
}
|
|
2535
|
+
});
|
|
2536
|
+
}
|
|
2537
|
+
|
|
2538
|
+
|
|
2539
|
+
/**
|
|
2540
|
+
* Get the current status of the Sync engine
|
|
2541
|
+
* @returns The current status of the engine
|
|
2542
|
+
*/
|
|
2543
|
+
public async getEngineStatusAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncEngineStatus >
|
|
2544
|
+
{
|
|
2545
|
+
return this._getEngineStatusAsync(webapi_options);
|
|
2546
|
+
}
|
|
2547
|
+
|
|
2548
|
+
|
|
2549
|
+
private async _changeEngineStatusAsync(request: carriers.ErpSync_ChangeEngineStatusRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncEngineStatus > {
|
|
2550
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2551
|
+
base.WebApiBase.SetPending(options);
|
|
2552
|
+
return new Promise< carriers.ErpSyncEngineStatus >(async (resolve, reject) => {
|
|
2553
|
+
try {
|
|
2554
|
+
config.baseURL = this._options.baseUrl;
|
|
2555
|
+
const response = await this._axios.post("ChangeEngineStatus", request , config);
|
|
2556
|
+
base.WebApiBase.SetCompleted(options);
|
|
2557
|
+
const res : carriers.ErpSyncEngineStatus = converters.Create_ErpSyncEngineStatus_From( response.data );
|
|
2558
|
+
resolve(res);
|
|
2559
|
+
}
|
|
2560
|
+
catch( err ) {
|
|
2561
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2562
|
+
reject(err);
|
|
2563
|
+
}
|
|
2564
|
+
});
|
|
2565
|
+
}
|
|
2566
|
+
|
|
2567
|
+
|
|
2568
|
+
|
|
2569
|
+
/**
|
|
2570
|
+
* Change the current running/stopped status of the Sync engine
|
|
2571
|
+
* @param request - Run
|
|
2572
|
+
* @returns The current status of the engine
|
|
2573
|
+
*/
|
|
2574
|
+
public async changeEngineStatusAsync(request: carriers.ErpSync_ChangeEngineStatusRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncEngineStatus >;
|
|
2575
|
+
|
|
2576
|
+
/**
|
|
2577
|
+
* Change the current running/stopped status of the Sync engine
|
|
2578
|
+
* @param run - If true, then start the engine; otherwise stop it (requests to the Batch system, may not be immediately reflected)
|
|
2579
|
+
* @returns The current status of the engine
|
|
2580
|
+
*/
|
|
2581
|
+
public async changeEngineStatusAsync(run: boolean, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncEngineStatus >;
|
|
2582
|
+
|
|
2583
|
+
public async changeEngineStatusAsync(run:boolean|carriers.ErpSync_ChangeEngineStatusRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ErpSyncEngineStatus > {
|
|
2584
|
+
let _request : carriers.ErpSync_ChangeEngineStatusRequest = null;
|
|
2585
|
+
let _options : base.WebApiRequestOptions = null;
|
|
2586
|
+
const first : any = run;
|
|
2587
|
+
if( typeof( first ) === "object" && first && ( typeof(first.run)!='undefined' ) )
|
|
2588
|
+
{
|
|
2589
|
+
_request = run as carriers.ErpSync_ChangeEngineStatusRequest;
|
|
2590
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
2591
|
+
}
|
|
2592
|
+
else
|
|
2593
|
+
{
|
|
2594
|
+
_request = {
|
|
2595
|
+
run: run as boolean,
|
|
2596
|
+
};
|
|
2597
|
+
_options = webapi_options;
|
|
2598
|
+
}
|
|
2599
|
+
return this._changeEngineStatusAsync( _request, _options );
|
|
2600
|
+
}
|
|
2601
|
+
|
|
2602
|
+
|
|
2603
|
+
private async _changeEngineIntervalAsync(request: carriers.ErpSync_ChangeEngineIntervalRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
2604
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2605
|
+
base.WebApiBase.SetPending(options);
|
|
2606
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
2607
|
+
try {
|
|
2608
|
+
config.baseURL = this._options.baseUrl;
|
|
2609
|
+
const response = await this._axios.post("ChangeEngineInterval", request , config);
|
|
2610
|
+
base.WebApiBase.SetCompleted(options);
|
|
2611
|
+
const res = response.data;
|
|
2612
|
+
resolve(res);
|
|
2613
|
+
}
|
|
2614
|
+
catch( err ) {
|
|
2615
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2616
|
+
reject(err);
|
|
2617
|
+
}
|
|
2618
|
+
});
|
|
2619
|
+
}
|
|
2620
|
+
|
|
2621
|
+
|
|
2622
|
+
|
|
2623
|
+
/**
|
|
2624
|
+
* Change the interval for each run of the Sync Engine
|
|
2625
|
+
* @param request - Interval
|
|
2626
|
+
* @returns
|
|
2627
|
+
*/
|
|
2628
|
+
public async changeEngineIntervalAsync(request: carriers.ErpSync_ChangeEngineIntervalRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
2629
|
+
|
|
2630
|
+
/**
|
|
2631
|
+
* Change the interval for each run of the Sync Engine
|
|
2632
|
+
* @param interval - The run interval for the engine
|
|
2633
|
+
* @returns
|
|
2634
|
+
*/
|
|
2635
|
+
public async changeEngineIntervalAsync(interval: Duration, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
2636
|
+
|
|
2637
|
+
public async changeEngineIntervalAsync(interval:Duration|carriers.ErpSync_ChangeEngineIntervalRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
2638
|
+
let _request : carriers.ErpSync_ChangeEngineIntervalRequest = null;
|
|
2639
|
+
let _options : base.WebApiRequestOptions = null;
|
|
2640
|
+
const first : any = interval;
|
|
2641
|
+
if( typeof( first ) === "object" && first && ( typeof(first.interval)!='undefined' ) )
|
|
2642
|
+
{
|
|
2643
|
+
_request = interval as carriers.ErpSync_ChangeEngineIntervalRequest;
|
|
2644
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
2645
|
+
}
|
|
2646
|
+
else
|
|
2647
|
+
{
|
|
2648
|
+
_request = {
|
|
2649
|
+
interval: interval as Duration,
|
|
2650
|
+
};
|
|
2651
|
+
_options = webapi_options;
|
|
2652
|
+
}
|
|
2653
|
+
return this._changeEngineIntervalAsync( _request, _options );
|
|
2654
|
+
}
|
|
2655
|
+
|
|
2656
|
+
} // class v1ErpSyncAgentController
|
|
2657
|
+
|
|
2658
|
+
|