@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,2973 @@
|
|
|
1
|
+
// <auto-generated>
|
|
2
|
+
// SuperOffice Code Generator
|
|
3
|
+
// modelling\templates\servicestswebapi\tswebapiagents.tt
|
|
4
|
+
// </auto-generated>
|
|
5
|
+
import * as base from './WebApiBase.js';
|
|
6
|
+
import * as converters from './Converters.js';
|
|
7
|
+
/**
|
|
8
|
+
* User administration
|
|
9
|
+
*/
|
|
10
|
+
export class UserAgent extends base.WebApiBase {
|
|
11
|
+
constructor(baseUrlOrOptions, langOrconfigOrRM, langOrResourceOrRM, cultureCode) {
|
|
12
|
+
const options = base.WebApiBase.FigureOutOptions(baseUrlOrOptions, langOrconfigOrRM, langOrResourceOrRM, cultureCode);
|
|
13
|
+
options.basePath = "v1/Agents/User/";
|
|
14
|
+
super(options);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Set default values into a new RoleEntity.
|
|
18
|
+
* NetServer calculates default values on the entity, which is required when creating/storing a new instance
|
|
19
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
20
|
+
* @returns A blank entity.
|
|
21
|
+
*/
|
|
22
|
+
async createDefaultRoleEntityAsync(options) {
|
|
23
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
24
|
+
base.WebApiBase.SetPending(options);
|
|
25
|
+
return new Promise(async (resolve, reject) => {
|
|
26
|
+
try {
|
|
27
|
+
const response = await this._axios.post("CreateDefaultRoleEntity", null, config);
|
|
28
|
+
base.WebApiBase.SetCompleted(options);
|
|
29
|
+
const res = converters.Create_RoleEntity_From(response.data);
|
|
30
|
+
resolve(res);
|
|
31
|
+
}
|
|
32
|
+
catch (err) {
|
|
33
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
34
|
+
reject(err);
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
/*
|
|
39
|
+
* Replace the existing RoleEntity or creates a new RoleEntity if the id parameter is empty
|
|
40
|
+
* @param entity - The RoleEntity to be saved.
|
|
41
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
42
|
+
* @returns New or updated RoleEntity
|
|
43
|
+
*/
|
|
44
|
+
async saveRoleEntityAsync(entity, options) {
|
|
45
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
46
|
+
base.WebApiBase.SetPending(options);
|
|
47
|
+
return new Promise(async (resolve, reject) => {
|
|
48
|
+
try {
|
|
49
|
+
const response = await this._axios.post("SaveRoleEntity", entity, config);
|
|
50
|
+
base.WebApiBase.SetCompleted(options);
|
|
51
|
+
const res = converters.Create_RoleEntity_From(response.data);
|
|
52
|
+
resolve(res);
|
|
53
|
+
}
|
|
54
|
+
catch (err) {
|
|
55
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
56
|
+
reject(err);
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Set default values into a new ServiceAuth.
|
|
62
|
+
* NetServer calculates default values on the entity, which is required when creating/storing a new instance
|
|
63
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
64
|
+
* @returns A blank entity.
|
|
65
|
+
*/
|
|
66
|
+
async createDefaultServiceAuthAsync(options) {
|
|
67
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
68
|
+
base.WebApiBase.SetPending(options);
|
|
69
|
+
return new Promise(async (resolve, reject) => {
|
|
70
|
+
try {
|
|
71
|
+
const response = await this._axios.post("CreateDefaultServiceAuth", null, config);
|
|
72
|
+
base.WebApiBase.SetCompleted(options);
|
|
73
|
+
const res = converters.Create_ServiceAuth_From(response.data);
|
|
74
|
+
resolve(res);
|
|
75
|
+
}
|
|
76
|
+
catch (err) {
|
|
77
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
78
|
+
reject(err);
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
/*
|
|
83
|
+
* Replace the existing ServiceAuth or creates a new ServiceAuth if the id parameter is empty
|
|
84
|
+
* @param entity - The ServiceAuth to be saved.
|
|
85
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
86
|
+
* @returns New or updated ServiceAuth
|
|
87
|
+
*/
|
|
88
|
+
async saveServiceAuthAsync(entity, options) {
|
|
89
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
90
|
+
base.WebApiBase.SetPending(options);
|
|
91
|
+
return new Promise(async (resolve, reject) => {
|
|
92
|
+
try {
|
|
93
|
+
const response = await this._axios.post("SaveServiceAuth", entity, config);
|
|
94
|
+
base.WebApiBase.SetCompleted(options);
|
|
95
|
+
const res = converters.Create_ServiceAuth_From(response.data);
|
|
96
|
+
resolve(res);
|
|
97
|
+
}
|
|
98
|
+
catch (err) {
|
|
99
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
100
|
+
reject(err);
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
/*
|
|
105
|
+
* Deletes the ServiceAuth
|
|
106
|
+
* @param ServiceAuthId - The id of the ServiceAuth to be deleted.
|
|
107
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
108
|
+
*/
|
|
109
|
+
async deleteServiceAuthAsync(ServiceAuthId, options) {
|
|
110
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
111
|
+
base.WebApiBase.SetPending(options);
|
|
112
|
+
return new Promise(async (resolve, reject) => {
|
|
113
|
+
try {
|
|
114
|
+
const response = await this._axios.post("DeleteServiceAuth?ServiceAuthId=" + ServiceAuthId, null, config);
|
|
115
|
+
base.WebApiBase.SetCompleted(options);
|
|
116
|
+
const res = response.data;
|
|
117
|
+
resolve(res);
|
|
118
|
+
}
|
|
119
|
+
catch (err) {
|
|
120
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
121
|
+
reject(err);
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Set default values into a new UntrustedCredentials.
|
|
127
|
+
* NetServer calculates default values on the entity, which is required when creating/storing a new instance
|
|
128
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
129
|
+
* @returns A blank entity.
|
|
130
|
+
*/
|
|
131
|
+
async createDefaultUntrustedCredentialsAsync(options) {
|
|
132
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
133
|
+
base.WebApiBase.SetPending(options);
|
|
134
|
+
return new Promise(async (resolve, reject) => {
|
|
135
|
+
try {
|
|
136
|
+
const response = await this._axios.post("CreateDefaultUntrustedCredentials", null, config);
|
|
137
|
+
base.WebApiBase.SetCompleted(options);
|
|
138
|
+
const res = converters.Create_UntrustedCredentials_From(response.data);
|
|
139
|
+
resolve(res);
|
|
140
|
+
}
|
|
141
|
+
catch (err) {
|
|
142
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
143
|
+
reject(err);
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Set default values into a new User.
|
|
149
|
+
* NetServer calculates default values on the entity, which is required when creating/storing a new instance
|
|
150
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
151
|
+
* @returns A blank entity.
|
|
152
|
+
*/
|
|
153
|
+
async createDefaultUserAsync(options) {
|
|
154
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
155
|
+
base.WebApiBase.SetPending(options);
|
|
156
|
+
return new Promise(async (resolve, reject) => {
|
|
157
|
+
try {
|
|
158
|
+
const response = await this._axios.post("CreateDefaultUser", null, config);
|
|
159
|
+
base.WebApiBase.SetCompleted(options);
|
|
160
|
+
const res = converters.Create_User_From(response.data);
|
|
161
|
+
resolve(res);
|
|
162
|
+
}
|
|
163
|
+
catch (err) {
|
|
164
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
165
|
+
reject(err);
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
/*
|
|
170
|
+
* Replace the existing User or creates a new User if the id parameter is empty
|
|
171
|
+
* @param entity - The User to be saved.
|
|
172
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
173
|
+
* @returns New or updated User
|
|
174
|
+
*/
|
|
175
|
+
async saveUserAsync(entity, options) {
|
|
176
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
177
|
+
base.WebApiBase.SetPending(options);
|
|
178
|
+
return new Promise(async (resolve, reject) => {
|
|
179
|
+
try {
|
|
180
|
+
const response = await this._axios.post("SaveUser", entity, config);
|
|
181
|
+
base.WebApiBase.SetCompleted(options);
|
|
182
|
+
const res = converters.Create_User_From(response.data);
|
|
183
|
+
resolve(res);
|
|
184
|
+
}
|
|
185
|
+
catch (err) {
|
|
186
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
187
|
+
reject(err);
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
/*
|
|
192
|
+
* Get registered custom commands for User
|
|
193
|
+
* @param request - The User entity to get commands for.
|
|
194
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
195
|
+
* @returns Custom commands for the requested User.
|
|
196
|
+
*/
|
|
197
|
+
async getUserCommandsAsync(request, options) {
|
|
198
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
199
|
+
base.WebApiBase.SetPending(options);
|
|
200
|
+
return new Promise(async (resolve, reject) => {
|
|
201
|
+
try {
|
|
202
|
+
const response = await this._axios.post("GetUserCommands", request, config);
|
|
203
|
+
base.WebApiBase.SetCompleted(options);
|
|
204
|
+
const res = converters.Create_CustomCommandArray_From(response.data);
|
|
205
|
+
resolve(res);
|
|
206
|
+
}
|
|
207
|
+
catch (err) {
|
|
208
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
209
|
+
reject(err);
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
/*
|
|
214
|
+
* Executes the custom command for User
|
|
215
|
+
* @param request - The name of the command to execute. The User to execute commands on.
|
|
216
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
217
|
+
* @returns Result of the executed command: Success + Message + CommandActionResult
|
|
218
|
+
*/
|
|
219
|
+
async ExecuteUserCommandAsync(request, options) {
|
|
220
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
221
|
+
base.WebApiBase.SetPending(options);
|
|
222
|
+
return new Promise(async (resolve, reject) => {
|
|
223
|
+
try {
|
|
224
|
+
const response = await this._axios.post("ExecuteUserCommand", request, config);
|
|
225
|
+
base.WebApiBase.SetCompleted(options);
|
|
226
|
+
const res = converters.Create_CommandResult_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
|
+
* Deletes the User
|
|
237
|
+
* @param UserId - The id of the User to be deleted.
|
|
238
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
239
|
+
*/
|
|
240
|
+
async deleteUserAsync(UserId, options) {
|
|
241
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
242
|
+
base.WebApiBase.SetPending(options);
|
|
243
|
+
return new Promise(async (resolve, reject) => {
|
|
244
|
+
try {
|
|
245
|
+
const response = await this._axios.post("DeleteUser?UserId=" + UserId, null, config);
|
|
246
|
+
base.WebApiBase.SetCompleted(options);
|
|
247
|
+
const res = response.data;
|
|
248
|
+
resolve(res);
|
|
249
|
+
}
|
|
250
|
+
catch (err) {
|
|
251
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
252
|
+
reject(err);
|
|
253
|
+
}
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
async _getAccessGatewayInfoAsync(options) {
|
|
257
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
258
|
+
base.WebApiBase.SetPending(options);
|
|
259
|
+
return new Promise(async (resolve, reject) => {
|
|
260
|
+
try {
|
|
261
|
+
config.baseURL = this._options.baseUrl;
|
|
262
|
+
const response = await this._axios.post("GetAccessGatewayInfo", undefined, config);
|
|
263
|
+
base.WebApiBase.SetCompleted(options);
|
|
264
|
+
const res = converters.Create_AccessGatewayInfo_From(response.data);
|
|
265
|
+
resolve(res);
|
|
266
|
+
}
|
|
267
|
+
catch (err) {
|
|
268
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
269
|
+
reject(err);
|
|
270
|
+
}
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Returns accessgateway registration info
|
|
275
|
+
* @returns
|
|
276
|
+
*/
|
|
277
|
+
async getAccessGatewayInfoAsync(webapi_options) {
|
|
278
|
+
return this._getAccessGatewayInfoAsync(webapi_options);
|
|
279
|
+
}
|
|
280
|
+
async _getOrRegisterAccessGatewayInfoAsync(request, options) {
|
|
281
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
282
|
+
base.WebApiBase.SetPending(options);
|
|
283
|
+
return new Promise(async (resolve, reject) => {
|
|
284
|
+
try {
|
|
285
|
+
config.baseURL = this._options.baseUrl;
|
|
286
|
+
const response = await this._axios.post("GetOrRegisterAccessGatewayInfo", request, config);
|
|
287
|
+
base.WebApiBase.SetCompleted(options);
|
|
288
|
+
const res = converters.Create_AccessGatewayInfo_From(response.data);
|
|
289
|
+
resolve(res);
|
|
290
|
+
}
|
|
291
|
+
catch (err) {
|
|
292
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
293
|
+
reject(err);
|
|
294
|
+
}
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
async getOrRegisterAccessGatewayInfoAsync(redirectUri, webapi_options) {
|
|
298
|
+
let _request = null;
|
|
299
|
+
let _options = null;
|
|
300
|
+
const first = redirectUri;
|
|
301
|
+
if (typeof (first) === "object" && first && (typeof (first.redirectUri) != 'undefined')) {
|
|
302
|
+
_request = redirectUri;
|
|
303
|
+
_options = webapi_options;
|
|
304
|
+
}
|
|
305
|
+
else {
|
|
306
|
+
_request = {
|
|
307
|
+
redirectUri: redirectUri,
|
|
308
|
+
};
|
|
309
|
+
_options = webapi_options;
|
|
310
|
+
}
|
|
311
|
+
return this._getOrRegisterAccessGatewayInfoAsync(_request, _options);
|
|
312
|
+
}
|
|
313
|
+
async _registerWithAccessGatewayAsync(request, options) {
|
|
314
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
315
|
+
base.WebApiBase.SetPending(options);
|
|
316
|
+
return new Promise(async (resolve, reject) => {
|
|
317
|
+
try {
|
|
318
|
+
config.baseURL = this._options.baseUrl;
|
|
319
|
+
const response = await this._axios.post("RegisterWithAccessGateway", request, config);
|
|
320
|
+
base.WebApiBase.SetCompleted(options);
|
|
321
|
+
const res = converters.Create_AccessGatewayInfo_From(response.data);
|
|
322
|
+
resolve(res);
|
|
323
|
+
}
|
|
324
|
+
catch (err) {
|
|
325
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
326
|
+
reject(err);
|
|
327
|
+
}
|
|
328
|
+
});
|
|
329
|
+
}
|
|
330
|
+
async registerWithAccessGatewayAsync(redirectUri, webapi_options) {
|
|
331
|
+
let _request = null;
|
|
332
|
+
let _options = null;
|
|
333
|
+
const first = redirectUri;
|
|
334
|
+
if (typeof (first) === "object" && first && (typeof (first.redirectUri) != 'undefined')) {
|
|
335
|
+
_request = redirectUri;
|
|
336
|
+
_options = webapi_options;
|
|
337
|
+
}
|
|
338
|
+
else {
|
|
339
|
+
_request = {
|
|
340
|
+
redirectUri: redirectUri,
|
|
341
|
+
};
|
|
342
|
+
_options = webapi_options;
|
|
343
|
+
}
|
|
344
|
+
return this._registerWithAccessGatewayAsync(_request, _options);
|
|
345
|
+
}
|
|
346
|
+
async _checkAccessGatewayRegistrationAsync(options) {
|
|
347
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
348
|
+
base.WebApiBase.SetPending(options);
|
|
349
|
+
return new Promise(async (resolve, reject) => {
|
|
350
|
+
try {
|
|
351
|
+
config.baseURL = this._options.baseUrl;
|
|
352
|
+
const response = await this._axios.post("CheckAccessGatewayRegistration", undefined, config);
|
|
353
|
+
base.WebApiBase.SetCompleted(options);
|
|
354
|
+
const res = response.data;
|
|
355
|
+
resolve(res);
|
|
356
|
+
}
|
|
357
|
+
catch (err) {
|
|
358
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
359
|
+
reject(err);
|
|
360
|
+
}
|
|
361
|
+
});
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* Checks if AccessGatewayRegistration is valid
|
|
365
|
+
* @returns True if the registration is usable
|
|
366
|
+
*/
|
|
367
|
+
async checkAccessGatewayRegistrationAsync(webapi_options) {
|
|
368
|
+
return this._checkAccessGatewayRegistrationAsync(webapi_options);
|
|
369
|
+
}
|
|
370
|
+
async _saveCredentialAsync(request, options) {
|
|
371
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
372
|
+
base.WebApiBase.SetPending(options);
|
|
373
|
+
return new Promise(async (resolve, reject) => {
|
|
374
|
+
try {
|
|
375
|
+
config.baseURL = this._options.baseUrl;
|
|
376
|
+
const response = await this._axios.post("SaveCredential", request, config);
|
|
377
|
+
base.WebApiBase.SetCompleted(options);
|
|
378
|
+
const res = response.data;
|
|
379
|
+
resolve(res);
|
|
380
|
+
}
|
|
381
|
+
catch (err) {
|
|
382
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
383
|
+
reject(err);
|
|
384
|
+
}
|
|
385
|
+
});
|
|
386
|
+
}
|
|
387
|
+
async saveCredentialAsync(userId, credential, webapi_options) {
|
|
388
|
+
let _request = null;
|
|
389
|
+
let _options = null;
|
|
390
|
+
const first = userId;
|
|
391
|
+
if (typeof (first) === "object" && first && (typeof (first.userId) != 'undefined' || typeof (first.credential) != 'undefined')) {
|
|
392
|
+
_request = userId;
|
|
393
|
+
_options = credential;
|
|
394
|
+
}
|
|
395
|
+
else {
|
|
396
|
+
_request = {
|
|
397
|
+
userId: userId,
|
|
398
|
+
credential: credential,
|
|
399
|
+
};
|
|
400
|
+
_options = webapi_options;
|
|
401
|
+
}
|
|
402
|
+
return this._saveCredentialAsync(_request, _options);
|
|
403
|
+
}
|
|
404
|
+
async _deleteCredentialAsync(request, options) {
|
|
405
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
406
|
+
base.WebApiBase.SetPending(options);
|
|
407
|
+
return new Promise(async (resolve, reject) => {
|
|
408
|
+
try {
|
|
409
|
+
config.baseURL = this._options.baseUrl;
|
|
410
|
+
const response = await this._axios.post("DeleteCredential", request, config);
|
|
411
|
+
base.WebApiBase.SetCompleted(options);
|
|
412
|
+
const res = response.data;
|
|
413
|
+
resolve(res);
|
|
414
|
+
}
|
|
415
|
+
catch (err) {
|
|
416
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
417
|
+
reject(err);
|
|
418
|
+
}
|
|
419
|
+
});
|
|
420
|
+
}
|
|
421
|
+
async deleteCredentialAsync(userId, credentialType, webapi_options) {
|
|
422
|
+
let _request = null;
|
|
423
|
+
let _options = null;
|
|
424
|
+
const first = userId;
|
|
425
|
+
if (typeof (first) === "object" && first && (typeof (first.userId) != 'undefined' || typeof (first.credentialType) != 'undefined')) {
|
|
426
|
+
_request = userId;
|
|
427
|
+
_options = credentialType;
|
|
428
|
+
}
|
|
429
|
+
else {
|
|
430
|
+
_request = {
|
|
431
|
+
userId: userId,
|
|
432
|
+
credentialType: credentialType,
|
|
433
|
+
};
|
|
434
|
+
_options = webapi_options;
|
|
435
|
+
}
|
|
436
|
+
return this._deleteCredentialAsync(_request, _options);
|
|
437
|
+
}
|
|
438
|
+
async _findCredentialsGroupsAsync(request, options) {
|
|
439
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
440
|
+
base.WebApiBase.SetPending(options);
|
|
441
|
+
return new Promise(async (resolve, reject) => {
|
|
442
|
+
try {
|
|
443
|
+
config.baseURL = this._options.baseUrl;
|
|
444
|
+
const response = await this._axios.post("FindCredentialsGroups", request, config);
|
|
445
|
+
base.WebApiBase.SetCompleted(options);
|
|
446
|
+
const res = converters.Create_CredentialsGroupArray_From(response.data);
|
|
447
|
+
resolve(res);
|
|
448
|
+
}
|
|
449
|
+
catch (err) {
|
|
450
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
451
|
+
reject(err);
|
|
452
|
+
}
|
|
453
|
+
});
|
|
454
|
+
}
|
|
455
|
+
async findCredentialsGroupsAsync(type, searchString, webapi_options) {
|
|
456
|
+
let _request = null;
|
|
457
|
+
let _options = null;
|
|
458
|
+
const first = type;
|
|
459
|
+
if (typeof (first) === "object" && first && (typeof (first.type) != 'undefined' || typeof (first.searchString) != 'undefined')) {
|
|
460
|
+
_request = type;
|
|
461
|
+
_options = searchString;
|
|
462
|
+
}
|
|
463
|
+
else {
|
|
464
|
+
_request = {
|
|
465
|
+
type: type,
|
|
466
|
+
searchString: searchString,
|
|
467
|
+
};
|
|
468
|
+
_options = webapi_options;
|
|
469
|
+
}
|
|
470
|
+
return this._findCredentialsGroupsAsync(_request, _options);
|
|
471
|
+
}
|
|
472
|
+
async _findCredentialUsersAsync(request, options) {
|
|
473
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
474
|
+
base.WebApiBase.SetPending(options);
|
|
475
|
+
return new Promise(async (resolve, reject) => {
|
|
476
|
+
try {
|
|
477
|
+
config.baseURL = this._options.baseUrl;
|
|
478
|
+
const response = await this._axios.post("FindCredentialUsers", request, config);
|
|
479
|
+
base.WebApiBase.SetCompleted(options);
|
|
480
|
+
const res = converters.Create_CredentialsGroupUsers_From(response.data);
|
|
481
|
+
resolve(res);
|
|
482
|
+
}
|
|
483
|
+
catch (err) {
|
|
484
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
485
|
+
reject(err);
|
|
486
|
+
}
|
|
487
|
+
});
|
|
488
|
+
}
|
|
489
|
+
async findCredentialUsersAsync(type, searchString, webapi_options) {
|
|
490
|
+
let _request = null;
|
|
491
|
+
let _options = null;
|
|
492
|
+
const first = type;
|
|
493
|
+
if (typeof (first) === "object" && first && (typeof (first.type) != 'undefined' || typeof (first.searchString) != 'undefined')) {
|
|
494
|
+
_request = type;
|
|
495
|
+
_options = searchString;
|
|
496
|
+
}
|
|
497
|
+
else {
|
|
498
|
+
_request = {
|
|
499
|
+
type: type,
|
|
500
|
+
searchString: searchString,
|
|
501
|
+
};
|
|
502
|
+
_options = webapi_options;
|
|
503
|
+
}
|
|
504
|
+
return this._findCredentialUsersAsync(_request, _options);
|
|
505
|
+
}
|
|
506
|
+
async _getCredentialUsersInGroupAsync(request, options) {
|
|
507
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
508
|
+
base.WebApiBase.SetPending(options);
|
|
509
|
+
return new Promise(async (resolve, reject) => {
|
|
510
|
+
try {
|
|
511
|
+
config.baseURL = this._options.baseUrl;
|
|
512
|
+
const response = await this._axios.post("GetCredentialUsersInGroup", request, config);
|
|
513
|
+
base.WebApiBase.SetCompleted(options);
|
|
514
|
+
const res = converters.Create_CredentialsGroupUsers_From(response.data);
|
|
515
|
+
resolve(res);
|
|
516
|
+
}
|
|
517
|
+
catch (err) {
|
|
518
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
519
|
+
reject(err);
|
|
520
|
+
}
|
|
521
|
+
});
|
|
522
|
+
}
|
|
523
|
+
async getCredentialUsersInGroupAsync(type, groupName, webapi_options) {
|
|
524
|
+
let _request = null;
|
|
525
|
+
let _options = null;
|
|
526
|
+
const first = type;
|
|
527
|
+
if (typeof (first) === "object" && first && (typeof (first.type) != 'undefined' || typeof (first.groupName) != 'undefined')) {
|
|
528
|
+
_request = type;
|
|
529
|
+
_options = groupName;
|
|
530
|
+
}
|
|
531
|
+
else {
|
|
532
|
+
_request = {
|
|
533
|
+
type: type,
|
|
534
|
+
groupName: groupName,
|
|
535
|
+
};
|
|
536
|
+
_options = webapi_options;
|
|
537
|
+
}
|
|
538
|
+
return this._getCredentialUsersInGroupAsync(_request, _options);
|
|
539
|
+
}
|
|
540
|
+
/*
|
|
541
|
+
* Gets a Role object.
|
|
542
|
+
* @param roleId - The primary key.
|
|
543
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
544
|
+
* @returns A single Role
|
|
545
|
+
*/
|
|
546
|
+
async getRoleAsync(roleId, options) {
|
|
547
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
548
|
+
base.WebApiBase.SetPending(options);
|
|
549
|
+
return new Promise(async (resolve, reject) => {
|
|
550
|
+
try {
|
|
551
|
+
const response = await this._axios.post("GetRole?roleId=" + roleId, null, config);
|
|
552
|
+
base.WebApiBase.SetCompleted(options);
|
|
553
|
+
const res = converters.Create_Role_From(response.data);
|
|
554
|
+
resolve(res);
|
|
555
|
+
}
|
|
556
|
+
catch (err) {
|
|
557
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
558
|
+
reject(err);
|
|
559
|
+
}
|
|
560
|
+
});
|
|
561
|
+
}
|
|
562
|
+
/*
|
|
563
|
+
* Gets a RoleEntity object.
|
|
564
|
+
* @param roleEntityId - The primary key.
|
|
565
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
566
|
+
* @returns A single RoleEntity
|
|
567
|
+
*/
|
|
568
|
+
async getRoleEntityAsync(roleEntityId, options) {
|
|
569
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
570
|
+
base.WebApiBase.SetPending(options);
|
|
571
|
+
return new Promise(async (resolve, reject) => {
|
|
572
|
+
try {
|
|
573
|
+
const response = await this._axios.post("GetRoleEntity?roleEntityId=" + roleEntityId, null, config);
|
|
574
|
+
base.WebApiBase.SetCompleted(options);
|
|
575
|
+
const res = converters.Create_RoleEntity_From(response.data);
|
|
576
|
+
resolve(res);
|
|
577
|
+
}
|
|
578
|
+
catch (err) {
|
|
579
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
580
|
+
reject(err);
|
|
581
|
+
}
|
|
582
|
+
});
|
|
583
|
+
}
|
|
584
|
+
async _deleteRoleAsync(request, options) {
|
|
585
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
586
|
+
base.WebApiBase.SetPending(options);
|
|
587
|
+
return new Promise(async (resolve, reject) => {
|
|
588
|
+
try {
|
|
589
|
+
config.baseURL = this._options.baseUrl;
|
|
590
|
+
const response = await this._axios.post("DeleteRole", request, config);
|
|
591
|
+
base.WebApiBase.SetCompleted(options);
|
|
592
|
+
const res = response.data;
|
|
593
|
+
resolve(res);
|
|
594
|
+
}
|
|
595
|
+
catch (err) {
|
|
596
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
597
|
+
reject(err);
|
|
598
|
+
}
|
|
599
|
+
});
|
|
600
|
+
}
|
|
601
|
+
async deleteRoleAsync(roleIdToDelete, replacingRoleId, webapi_options) {
|
|
602
|
+
let _request = null;
|
|
603
|
+
let _options = null;
|
|
604
|
+
const first = roleIdToDelete;
|
|
605
|
+
if (typeof (first) === "object" && first && (typeof (first.roleIdToDelete) != 'undefined' || typeof (first.replacingRoleId) != 'undefined')) {
|
|
606
|
+
_request = roleIdToDelete;
|
|
607
|
+
_options = replacingRoleId;
|
|
608
|
+
}
|
|
609
|
+
else {
|
|
610
|
+
_request = {
|
|
611
|
+
roleIdToDelete: roleIdToDelete,
|
|
612
|
+
replacingRoleId: replacingRoleId,
|
|
613
|
+
};
|
|
614
|
+
_options = webapi_options;
|
|
615
|
+
}
|
|
616
|
+
return this._deleteRoleAsync(_request, _options);
|
|
617
|
+
}
|
|
618
|
+
async _getAllRolesAsync(request, options) {
|
|
619
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
620
|
+
base.WebApiBase.SetPending(options);
|
|
621
|
+
return new Promise(async (resolve, reject) => {
|
|
622
|
+
try {
|
|
623
|
+
config.baseURL = this._options.baseUrl;
|
|
624
|
+
const response = await this._axios.post("GetAllRoles", request, config);
|
|
625
|
+
base.WebApiBase.SetCompleted(options);
|
|
626
|
+
const res = converters.Create_SelectableMDOListItemArray_From(response.data);
|
|
627
|
+
resolve(res);
|
|
628
|
+
}
|
|
629
|
+
catch (err) {
|
|
630
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
631
|
+
reject(err);
|
|
632
|
+
}
|
|
633
|
+
});
|
|
634
|
+
}
|
|
635
|
+
async getAllRolesAsync(roleType, webapi_options) {
|
|
636
|
+
let _request = null;
|
|
637
|
+
let _options = null;
|
|
638
|
+
const first = roleType;
|
|
639
|
+
if (typeof (first) === "object" && first && (typeof (first.roleType) != 'undefined')) {
|
|
640
|
+
_request = roleType;
|
|
641
|
+
_options = webapi_options;
|
|
642
|
+
}
|
|
643
|
+
else {
|
|
644
|
+
_request = {
|
|
645
|
+
roleType: roleType,
|
|
646
|
+
};
|
|
647
|
+
_options = webapi_options;
|
|
648
|
+
}
|
|
649
|
+
return this._getAllRolesAsync(_request, _options);
|
|
650
|
+
}
|
|
651
|
+
async _getAllFunctionalRightsAsync(request, options) {
|
|
652
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
653
|
+
base.WebApiBase.SetPending(options);
|
|
654
|
+
return new Promise(async (resolve, reject) => {
|
|
655
|
+
try {
|
|
656
|
+
config.baseURL = this._options.baseUrl;
|
|
657
|
+
const response = await this._axios.post("GetAllFunctionalRights", request, config);
|
|
658
|
+
base.WebApiBase.SetCompleted(options);
|
|
659
|
+
const res = converters.Create_SelectableMDOListItemArray_From(response.data);
|
|
660
|
+
resolve(res);
|
|
661
|
+
}
|
|
662
|
+
catch (err) {
|
|
663
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
664
|
+
reject(err);
|
|
665
|
+
}
|
|
666
|
+
});
|
|
667
|
+
}
|
|
668
|
+
async getAllFunctionalRightsAsync(roleType, webapi_options) {
|
|
669
|
+
let _request = null;
|
|
670
|
+
let _options = null;
|
|
671
|
+
const first = roleType;
|
|
672
|
+
if (typeof (first) === "object" && first && (typeof (first.roleType) != 'undefined')) {
|
|
673
|
+
_request = roleType;
|
|
674
|
+
_options = webapi_options;
|
|
675
|
+
}
|
|
676
|
+
else {
|
|
677
|
+
_request = {
|
|
678
|
+
roleType: roleType,
|
|
679
|
+
};
|
|
680
|
+
_options = webapi_options;
|
|
681
|
+
}
|
|
682
|
+
return this._getAllFunctionalRightsAsync(_request, _options);
|
|
683
|
+
}
|
|
684
|
+
async _getFunctionalRightsAsync(request, options) {
|
|
685
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
686
|
+
base.WebApiBase.SetPending(options);
|
|
687
|
+
return new Promise(async (resolve, reject) => {
|
|
688
|
+
try {
|
|
689
|
+
config.baseURL = this._options.baseUrl;
|
|
690
|
+
const response = await this._axios.post("GetFunctionalRights", request, config);
|
|
691
|
+
base.WebApiBase.SetCompleted(options);
|
|
692
|
+
const res = converters.Create_SelectableMDOListItemArray_From(response.data);
|
|
693
|
+
resolve(res);
|
|
694
|
+
}
|
|
695
|
+
catch (err) {
|
|
696
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
697
|
+
reject(err);
|
|
698
|
+
}
|
|
699
|
+
});
|
|
700
|
+
}
|
|
701
|
+
async getFunctionalRightsAsync(roleId, webapi_options) {
|
|
702
|
+
let _request = null;
|
|
703
|
+
let _options = null;
|
|
704
|
+
const first = roleId;
|
|
705
|
+
if (typeof (first) === "object" && first && (typeof (first.roleId) != 'undefined')) {
|
|
706
|
+
_request = roleId;
|
|
707
|
+
_options = webapi_options;
|
|
708
|
+
}
|
|
709
|
+
else {
|
|
710
|
+
_request = {
|
|
711
|
+
roleId: roleId,
|
|
712
|
+
};
|
|
713
|
+
_options = webapi_options;
|
|
714
|
+
}
|
|
715
|
+
return this._getFunctionalRightsAsync(_request, _options);
|
|
716
|
+
}
|
|
717
|
+
async _setFunctionalRightsAsync(request, options) {
|
|
718
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
719
|
+
base.WebApiBase.SetPending(options);
|
|
720
|
+
return new Promise(async (resolve, reject) => {
|
|
721
|
+
try {
|
|
722
|
+
config.baseURL = this._options.baseUrl;
|
|
723
|
+
const response = await this._axios.post("SetFunctionalRights", request, config);
|
|
724
|
+
base.WebApiBase.SetCompleted(options);
|
|
725
|
+
const res = response.data;
|
|
726
|
+
resolve(res);
|
|
727
|
+
}
|
|
728
|
+
catch (err) {
|
|
729
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
730
|
+
reject(err);
|
|
731
|
+
}
|
|
732
|
+
});
|
|
733
|
+
}
|
|
734
|
+
async setFunctionalRightsAsync(roleId, functionalRightIds, webapi_options) {
|
|
735
|
+
let _request = null;
|
|
736
|
+
let _options = null;
|
|
737
|
+
const first = roleId;
|
|
738
|
+
if (typeof (first) === "object" && first && (typeof (first.roleId) != 'undefined' || typeof (first.functionalRightIds) != 'undefined')) {
|
|
739
|
+
_request = roleId;
|
|
740
|
+
_options = functionalRightIds;
|
|
741
|
+
}
|
|
742
|
+
else {
|
|
743
|
+
_request = {
|
|
744
|
+
roleId: roleId,
|
|
745
|
+
functionalRightIds: functionalRightIds,
|
|
746
|
+
};
|
|
747
|
+
_options = webapi_options;
|
|
748
|
+
}
|
|
749
|
+
return this._setFunctionalRightsAsync(_request, _options);
|
|
750
|
+
}
|
|
751
|
+
async _setDataRightAsync(request, options) {
|
|
752
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
753
|
+
base.WebApiBase.SetPending(options);
|
|
754
|
+
return new Promise(async (resolve, reject) => {
|
|
755
|
+
try {
|
|
756
|
+
config.baseURL = this._options.baseUrl;
|
|
757
|
+
const response = await this._axios.post("SetDataRight", request, config);
|
|
758
|
+
base.WebApiBase.SetCompleted(options);
|
|
759
|
+
const res = response.data;
|
|
760
|
+
resolve(res);
|
|
761
|
+
}
|
|
762
|
+
catch (err) {
|
|
763
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
764
|
+
reject(err);
|
|
765
|
+
}
|
|
766
|
+
});
|
|
767
|
+
}
|
|
768
|
+
async setDataRightAsync(roleId, tableName, relationToOwner, dataRightValue, webapi_options) {
|
|
769
|
+
let _request = null;
|
|
770
|
+
let _options = null;
|
|
771
|
+
const first = roleId;
|
|
772
|
+
if (typeof (first) === "object" && first && (typeof (first.roleId) != 'undefined' || typeof (first.tableName) != 'undefined' || typeof (first.relationToOwner) != 'undefined' || typeof (first.dataRightValue) != 'undefined')) {
|
|
773
|
+
_request = roleId;
|
|
774
|
+
_options = tableName;
|
|
775
|
+
}
|
|
776
|
+
else {
|
|
777
|
+
_request = {
|
|
778
|
+
roleId: roleId,
|
|
779
|
+
tableName: tableName,
|
|
780
|
+
relationToOwner: relationToOwner,
|
|
781
|
+
dataRightValue: dataRightValue,
|
|
782
|
+
};
|
|
783
|
+
_options = webapi_options;
|
|
784
|
+
}
|
|
785
|
+
return this._setDataRightAsync(_request, _options);
|
|
786
|
+
}
|
|
787
|
+
async _getDataRightAsync(request, options) {
|
|
788
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
789
|
+
base.WebApiBase.SetPending(options);
|
|
790
|
+
return new Promise(async (resolve, reject) => {
|
|
791
|
+
try {
|
|
792
|
+
config.baseURL = this._options.baseUrl;
|
|
793
|
+
const response = await this._axios.post("GetDataRight", request, config);
|
|
794
|
+
base.WebApiBase.SetCompleted(options);
|
|
795
|
+
const res = response.data;
|
|
796
|
+
resolve(res);
|
|
797
|
+
}
|
|
798
|
+
catch (err) {
|
|
799
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
800
|
+
reject(err);
|
|
801
|
+
}
|
|
802
|
+
});
|
|
803
|
+
}
|
|
804
|
+
async getDataRightAsync(roleId, tableName, relationToOwner, webapi_options) {
|
|
805
|
+
let _request = null;
|
|
806
|
+
let _options = null;
|
|
807
|
+
const first = roleId;
|
|
808
|
+
if (typeof (first) === "object" && first && (typeof (first.roleId) != 'undefined' || typeof (first.tableName) != 'undefined' || typeof (first.relationToOwner) != 'undefined')) {
|
|
809
|
+
_request = roleId;
|
|
810
|
+
_options = tableName;
|
|
811
|
+
}
|
|
812
|
+
else {
|
|
813
|
+
_request = {
|
|
814
|
+
roleId: roleId,
|
|
815
|
+
tableName: tableName,
|
|
816
|
+
relationToOwner: relationToOwner,
|
|
817
|
+
};
|
|
818
|
+
_options = webapi_options;
|
|
819
|
+
}
|
|
820
|
+
return this._getDataRightAsync(_request, _options);
|
|
821
|
+
}
|
|
822
|
+
async _getDataRightsAsync(request, options) {
|
|
823
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
824
|
+
base.WebApiBase.SetPending(options);
|
|
825
|
+
return new Promise(async (resolve, reject) => {
|
|
826
|
+
try {
|
|
827
|
+
config.baseURL = this._options.baseUrl;
|
|
828
|
+
const response = await this._axios.post("GetDataRights", request, config);
|
|
829
|
+
base.WebApiBase.SetCompleted(options);
|
|
830
|
+
const res = converters.Create_StringDictionary_From(response.data);
|
|
831
|
+
resolve(res);
|
|
832
|
+
}
|
|
833
|
+
catch (err) {
|
|
834
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
835
|
+
reject(err);
|
|
836
|
+
}
|
|
837
|
+
});
|
|
838
|
+
}
|
|
839
|
+
async getDataRightsAsync(roleId, tableName, webapi_options) {
|
|
840
|
+
let _request = null;
|
|
841
|
+
let _options = null;
|
|
842
|
+
const first = roleId;
|
|
843
|
+
if (typeof (first) === "object" && first && (typeof (first.roleId) != 'undefined' || typeof (first.tableName) != 'undefined')) {
|
|
844
|
+
_request = roleId;
|
|
845
|
+
_options = tableName;
|
|
846
|
+
}
|
|
847
|
+
else {
|
|
848
|
+
_request = {
|
|
849
|
+
roleId: roleId,
|
|
850
|
+
tableName: tableName,
|
|
851
|
+
};
|
|
852
|
+
_options = webapi_options;
|
|
853
|
+
}
|
|
854
|
+
return this._getDataRightsAsync(_request, _options);
|
|
855
|
+
}
|
|
856
|
+
async _createDefaultRoleEntityFromTypeAsync(request, options) {
|
|
857
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
858
|
+
base.WebApiBase.SetPending(options);
|
|
859
|
+
return new Promise(async (resolve, reject) => {
|
|
860
|
+
try {
|
|
861
|
+
config.baseURL = this._options.baseUrl;
|
|
862
|
+
const response = await this._axios.post("CreateDefaultRoleEntityFromType", request, config);
|
|
863
|
+
base.WebApiBase.SetCompleted(options);
|
|
864
|
+
const res = converters.Create_RoleEntity_From(response.data);
|
|
865
|
+
resolve(res);
|
|
866
|
+
}
|
|
867
|
+
catch (err) {
|
|
868
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
869
|
+
reject(err);
|
|
870
|
+
}
|
|
871
|
+
});
|
|
872
|
+
}
|
|
873
|
+
async createDefaultRoleEntityFromTypeAsync(type, webapi_options) {
|
|
874
|
+
let _request = null;
|
|
875
|
+
let _options = null;
|
|
876
|
+
const first = type;
|
|
877
|
+
if (typeof (first) === "object" && first && (typeof (first.type) != 'undefined')) {
|
|
878
|
+
_request = type;
|
|
879
|
+
_options = webapi_options;
|
|
880
|
+
}
|
|
881
|
+
else {
|
|
882
|
+
_request = {
|
|
883
|
+
type: type,
|
|
884
|
+
};
|
|
885
|
+
_options = webapi_options;
|
|
886
|
+
}
|
|
887
|
+
return this._createDefaultRoleEntityFromTypeAsync(_request, _options);
|
|
888
|
+
}
|
|
889
|
+
async _findRolesWithFunctionalRightAsync(request, options) {
|
|
890
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
891
|
+
base.WebApiBase.SetPending(options);
|
|
892
|
+
return new Promise(async (resolve, reject) => {
|
|
893
|
+
try {
|
|
894
|
+
config.baseURL = this._options.baseUrl;
|
|
895
|
+
const response = await this._axios.post("FindRolesWithFunctionalRight", request, config);
|
|
896
|
+
base.WebApiBase.SetCompleted(options);
|
|
897
|
+
const res = converters.Create_MDOListItemArray_From(response.data);
|
|
898
|
+
resolve(res);
|
|
899
|
+
}
|
|
900
|
+
catch (err) {
|
|
901
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
902
|
+
reject(err);
|
|
903
|
+
}
|
|
904
|
+
});
|
|
905
|
+
}
|
|
906
|
+
async findRolesWithFunctionalRightAsync(functionalRightName, webapi_options) {
|
|
907
|
+
let _request = null;
|
|
908
|
+
let _options = null;
|
|
909
|
+
const first = functionalRightName;
|
|
910
|
+
if (typeof (first) === "object" && first && (typeof (first.functionalRightName) != 'undefined')) {
|
|
911
|
+
_request = functionalRightName;
|
|
912
|
+
_options = webapi_options;
|
|
913
|
+
}
|
|
914
|
+
else {
|
|
915
|
+
_request = {
|
|
916
|
+
functionalRightName: functionalRightName,
|
|
917
|
+
};
|
|
918
|
+
_options = webapi_options;
|
|
919
|
+
}
|
|
920
|
+
return this._findRolesWithFunctionalRightAsync(_request, _options);
|
|
921
|
+
}
|
|
922
|
+
async _findRolesWithFunctionalRightsAsync(request, options) {
|
|
923
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
924
|
+
base.WebApiBase.SetPending(options);
|
|
925
|
+
return new Promise(async (resolve, reject) => {
|
|
926
|
+
try {
|
|
927
|
+
config.baseURL = this._options.baseUrl;
|
|
928
|
+
const response = await this._axios.post("FindRolesWithFunctionalRights", request, config);
|
|
929
|
+
base.WebApiBase.SetCompleted(options);
|
|
930
|
+
const res = response.data;
|
|
931
|
+
resolve(res);
|
|
932
|
+
}
|
|
933
|
+
catch (err) {
|
|
934
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
935
|
+
reject(err);
|
|
936
|
+
}
|
|
937
|
+
});
|
|
938
|
+
}
|
|
939
|
+
async findRolesWithFunctionalRightsAsync(functionalRightNames, webapi_options) {
|
|
940
|
+
let _request = null;
|
|
941
|
+
let _options = null;
|
|
942
|
+
const first = functionalRightNames;
|
|
943
|
+
if (typeof (first) === "object" && first && (typeof (first.functionalRightNames) != 'undefined')) {
|
|
944
|
+
_request = functionalRightNames;
|
|
945
|
+
_options = webapi_options;
|
|
946
|
+
}
|
|
947
|
+
else {
|
|
948
|
+
_request = {
|
|
949
|
+
functionalRightNames: functionalRightNames,
|
|
950
|
+
};
|
|
951
|
+
_options = webapi_options;
|
|
952
|
+
}
|
|
953
|
+
return this._findRolesWithFunctionalRightsAsync(_request, _options);
|
|
954
|
+
}
|
|
955
|
+
async _findRolesWithoutFunctionalRightsAsync(request, options) {
|
|
956
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
957
|
+
base.WebApiBase.SetPending(options);
|
|
958
|
+
return new Promise(async (resolve, reject) => {
|
|
959
|
+
try {
|
|
960
|
+
config.baseURL = this._options.baseUrl;
|
|
961
|
+
const response = await this._axios.post("FindRolesWithoutFunctionalRights", request, config);
|
|
962
|
+
base.WebApiBase.SetCompleted(options);
|
|
963
|
+
const res = response.data;
|
|
964
|
+
resolve(res);
|
|
965
|
+
}
|
|
966
|
+
catch (err) {
|
|
967
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
968
|
+
reject(err);
|
|
969
|
+
}
|
|
970
|
+
});
|
|
971
|
+
}
|
|
972
|
+
async findRolesWithoutFunctionalRightsAsync(functionalRightNames, webapi_options) {
|
|
973
|
+
let _request = null;
|
|
974
|
+
let _options = null;
|
|
975
|
+
const first = functionalRightNames;
|
|
976
|
+
if (typeof (first) === "object" && first && (typeof (first.functionalRightNames) != 'undefined')) {
|
|
977
|
+
_request = functionalRightNames;
|
|
978
|
+
_options = webapi_options;
|
|
979
|
+
}
|
|
980
|
+
else {
|
|
981
|
+
_request = {
|
|
982
|
+
functionalRightNames: functionalRightNames,
|
|
983
|
+
};
|
|
984
|
+
_options = webapi_options;
|
|
985
|
+
}
|
|
986
|
+
return this._findRolesWithoutFunctionalRightsAsync(_request, _options);
|
|
987
|
+
}
|
|
988
|
+
/*
|
|
989
|
+
* Gets a ServiceAuth object.
|
|
990
|
+
* @param serviceAuthId - The primary key.
|
|
991
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
992
|
+
* @returns A single ServiceAuth
|
|
993
|
+
*/
|
|
994
|
+
async getServiceAuthAsync(serviceAuthId, options) {
|
|
995
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
996
|
+
base.WebApiBase.SetPending(options);
|
|
997
|
+
return new Promise(async (resolve, reject) => {
|
|
998
|
+
try {
|
|
999
|
+
const response = await this._axios.post("GetServiceAuth?serviceAuthId=" + serviceAuthId, null, config);
|
|
1000
|
+
base.WebApiBase.SetCompleted(options);
|
|
1001
|
+
const res = converters.Create_ServiceAuth_From(response.data);
|
|
1002
|
+
resolve(res);
|
|
1003
|
+
}
|
|
1004
|
+
catch (err) {
|
|
1005
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1006
|
+
reject(err);
|
|
1007
|
+
}
|
|
1008
|
+
});
|
|
1009
|
+
}
|
|
1010
|
+
async _saveExternalTokensAsync(request, options) {
|
|
1011
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1012
|
+
base.WebApiBase.SetPending(options);
|
|
1013
|
+
return new Promise(async (resolve, reject) => {
|
|
1014
|
+
try {
|
|
1015
|
+
config.baseURL = this._options.baseUrl;
|
|
1016
|
+
const response = await this._axios.post("SaveExternalTokens", request, config);
|
|
1017
|
+
base.WebApiBase.SetCompleted(options);
|
|
1018
|
+
const res = response.data;
|
|
1019
|
+
resolve(res);
|
|
1020
|
+
}
|
|
1021
|
+
catch (err) {
|
|
1022
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1023
|
+
reject(err);
|
|
1024
|
+
}
|
|
1025
|
+
});
|
|
1026
|
+
}
|
|
1027
|
+
async saveExternalTokensAsync(tokenManagementInfo, webapi_options) {
|
|
1028
|
+
let _request = null;
|
|
1029
|
+
let _options = null;
|
|
1030
|
+
const first = tokenManagementInfo;
|
|
1031
|
+
if (typeof (first) === "object" && first && (typeof (first.tokenManagementInfo) != 'undefined')) {
|
|
1032
|
+
_request = tokenManagementInfo;
|
|
1033
|
+
_options = webapi_options;
|
|
1034
|
+
}
|
|
1035
|
+
else {
|
|
1036
|
+
_request = {
|
|
1037
|
+
tokenManagementInfo: tokenManagementInfo,
|
|
1038
|
+
};
|
|
1039
|
+
_options = webapi_options;
|
|
1040
|
+
}
|
|
1041
|
+
return this._saveExternalTokensAsync(_request, _options);
|
|
1042
|
+
}
|
|
1043
|
+
async _decryptAndSaveExternalTokensAsync(request, options) {
|
|
1044
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1045
|
+
base.WebApiBase.SetPending(options);
|
|
1046
|
+
return new Promise(async (resolve, reject) => {
|
|
1047
|
+
try {
|
|
1048
|
+
config.baseURL = this._options.baseUrl;
|
|
1049
|
+
const response = await this._axios.post("DecryptAndSaveExternalTokens", request, config);
|
|
1050
|
+
base.WebApiBase.SetCompleted(options);
|
|
1051
|
+
const res = response.data;
|
|
1052
|
+
resolve(res);
|
|
1053
|
+
}
|
|
1054
|
+
catch (err) {
|
|
1055
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1056
|
+
reject(err);
|
|
1057
|
+
}
|
|
1058
|
+
});
|
|
1059
|
+
}
|
|
1060
|
+
async decryptAndSaveExternalTokensAsync(tokenManagementInfo, webapi_options) {
|
|
1061
|
+
let _request = null;
|
|
1062
|
+
let _options = null;
|
|
1063
|
+
const first = tokenManagementInfo;
|
|
1064
|
+
if (typeof (first) === "object" && first && (typeof (first.tokenManagementInfo) != 'undefined')) {
|
|
1065
|
+
_request = tokenManagementInfo;
|
|
1066
|
+
_options = webapi_options;
|
|
1067
|
+
}
|
|
1068
|
+
else {
|
|
1069
|
+
_request = {
|
|
1070
|
+
tokenManagementInfo: tokenManagementInfo,
|
|
1071
|
+
};
|
|
1072
|
+
_options = webapi_options;
|
|
1073
|
+
}
|
|
1074
|
+
return this._decryptAndSaveExternalTokensAsync(_request, _options);
|
|
1075
|
+
}
|
|
1076
|
+
async _getExternalTokensAsync(request, options) {
|
|
1077
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1078
|
+
base.WebApiBase.SetPending(options);
|
|
1079
|
+
return new Promise(async (resolve, reject) => {
|
|
1080
|
+
try {
|
|
1081
|
+
config.baseURL = this._options.baseUrl;
|
|
1082
|
+
const response = await this._axios.post("GetExternalTokens", request, config);
|
|
1083
|
+
base.WebApiBase.SetCompleted(options);
|
|
1084
|
+
const res = converters.Create_TokenManagementInfo_From(response.data);
|
|
1085
|
+
resolve(res);
|
|
1086
|
+
}
|
|
1087
|
+
catch (err) {
|
|
1088
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1089
|
+
reject(err);
|
|
1090
|
+
}
|
|
1091
|
+
});
|
|
1092
|
+
}
|
|
1093
|
+
async getExternalTokensAsync(key, webapi_options) {
|
|
1094
|
+
let _request = null;
|
|
1095
|
+
let _options = null;
|
|
1096
|
+
const first = key;
|
|
1097
|
+
if (typeof (first) === "object" && first && (typeof (first.key) != 'undefined')) {
|
|
1098
|
+
_request = key;
|
|
1099
|
+
_options = webapi_options;
|
|
1100
|
+
}
|
|
1101
|
+
else {
|
|
1102
|
+
_request = {
|
|
1103
|
+
key: key,
|
|
1104
|
+
};
|
|
1105
|
+
_options = webapi_options;
|
|
1106
|
+
}
|
|
1107
|
+
return this._getExternalTokensAsync(_request, _options);
|
|
1108
|
+
}
|
|
1109
|
+
/*
|
|
1110
|
+
* Gets a User object.
|
|
1111
|
+
* @param userId - The primary key.
|
|
1112
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
1113
|
+
* @returns A single User
|
|
1114
|
+
*/
|
|
1115
|
+
async getUserAsync(userId, options) {
|
|
1116
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1117
|
+
base.WebApiBase.SetPending(options);
|
|
1118
|
+
return new Promise(async (resolve, reject) => {
|
|
1119
|
+
try {
|
|
1120
|
+
const response = await this._axios.post("GetUser?userId=" + userId, null, config);
|
|
1121
|
+
base.WebApiBase.SetCompleted(options);
|
|
1122
|
+
const res = converters.Create_User_From(response.data);
|
|
1123
|
+
resolve(res);
|
|
1124
|
+
}
|
|
1125
|
+
catch (err) {
|
|
1126
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1127
|
+
reject(err);
|
|
1128
|
+
}
|
|
1129
|
+
});
|
|
1130
|
+
}
|
|
1131
|
+
async _getUserFromNameAsync(request, options) {
|
|
1132
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1133
|
+
base.WebApiBase.SetPending(options);
|
|
1134
|
+
return new Promise(async (resolve, reject) => {
|
|
1135
|
+
try {
|
|
1136
|
+
config.baseURL = this._options.baseUrl;
|
|
1137
|
+
const response = await this._axios.post("GetUserFromName", request, config);
|
|
1138
|
+
base.WebApiBase.SetCompleted(options);
|
|
1139
|
+
const res = converters.Create_User_From(response.data);
|
|
1140
|
+
resolve(res);
|
|
1141
|
+
}
|
|
1142
|
+
catch (err) {
|
|
1143
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1144
|
+
reject(err);
|
|
1145
|
+
}
|
|
1146
|
+
});
|
|
1147
|
+
}
|
|
1148
|
+
async getUserFromNameAsync(userName, webapi_options) {
|
|
1149
|
+
let _request = null;
|
|
1150
|
+
let _options = null;
|
|
1151
|
+
const first = userName;
|
|
1152
|
+
if (typeof (first) === "object" && first && (typeof (first.userName) != 'undefined')) {
|
|
1153
|
+
_request = userName;
|
|
1154
|
+
_options = webapi_options;
|
|
1155
|
+
}
|
|
1156
|
+
else {
|
|
1157
|
+
_request = {
|
|
1158
|
+
userName: userName,
|
|
1159
|
+
};
|
|
1160
|
+
_options = webapi_options;
|
|
1161
|
+
}
|
|
1162
|
+
return this._getUserFromNameAsync(_request, _options);
|
|
1163
|
+
}
|
|
1164
|
+
async _saveUserFromNameAsync(request, options) {
|
|
1165
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1166
|
+
base.WebApiBase.SetPending(options);
|
|
1167
|
+
return new Promise(async (resolve, reject) => {
|
|
1168
|
+
try {
|
|
1169
|
+
config.baseURL = this._options.baseUrl;
|
|
1170
|
+
const response = await this._axios.post("SaveUserFromName", request, config);
|
|
1171
|
+
base.WebApiBase.SetCompleted(options);
|
|
1172
|
+
const res = converters.Create_User_From(response.data);
|
|
1173
|
+
resolve(res);
|
|
1174
|
+
}
|
|
1175
|
+
catch (err) {
|
|
1176
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1177
|
+
reject(err);
|
|
1178
|
+
}
|
|
1179
|
+
});
|
|
1180
|
+
}
|
|
1181
|
+
async saveUserFromNameAsync(userName, user, webapi_options) {
|
|
1182
|
+
let _request = null;
|
|
1183
|
+
let _options = null;
|
|
1184
|
+
const first = userName;
|
|
1185
|
+
if (typeof (first) === "object" && first && (typeof (first.userName) != 'undefined' || typeof (first.user) != 'undefined')) {
|
|
1186
|
+
_request = userName;
|
|
1187
|
+
_options = user;
|
|
1188
|
+
}
|
|
1189
|
+
else {
|
|
1190
|
+
_request = {
|
|
1191
|
+
userName: userName,
|
|
1192
|
+
user: user,
|
|
1193
|
+
};
|
|
1194
|
+
_options = webapi_options;
|
|
1195
|
+
}
|
|
1196
|
+
return this._saveUserFromNameAsync(_request, _options);
|
|
1197
|
+
}
|
|
1198
|
+
async _deleteUserFromNameAsync(request, options) {
|
|
1199
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1200
|
+
base.WebApiBase.SetPending(options);
|
|
1201
|
+
return new Promise(async (resolve, reject) => {
|
|
1202
|
+
try {
|
|
1203
|
+
config.baseURL = this._options.baseUrl;
|
|
1204
|
+
const response = await this._axios.post("DeleteUserFromName", request, config);
|
|
1205
|
+
base.WebApiBase.SetCompleted(options);
|
|
1206
|
+
const res = response.data;
|
|
1207
|
+
resolve(res);
|
|
1208
|
+
}
|
|
1209
|
+
catch (err) {
|
|
1210
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1211
|
+
reject(err);
|
|
1212
|
+
}
|
|
1213
|
+
});
|
|
1214
|
+
}
|
|
1215
|
+
async deleteUserFromNameAsync(userName, webapi_options) {
|
|
1216
|
+
let _request = null;
|
|
1217
|
+
let _options = null;
|
|
1218
|
+
const first = userName;
|
|
1219
|
+
if (typeof (first) === "object" && first && (typeof (first.userName) != 'undefined')) {
|
|
1220
|
+
_request = userName;
|
|
1221
|
+
_options = webapi_options;
|
|
1222
|
+
}
|
|
1223
|
+
else {
|
|
1224
|
+
_request = {
|
|
1225
|
+
userName: userName,
|
|
1226
|
+
};
|
|
1227
|
+
_options = webapi_options;
|
|
1228
|
+
}
|
|
1229
|
+
return this._deleteUserFromNameAsync(_request, _options);
|
|
1230
|
+
}
|
|
1231
|
+
async _getCredentialTypesAsync(options) {
|
|
1232
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1233
|
+
base.WebApiBase.SetPending(options);
|
|
1234
|
+
return new Promise(async (resolve, reject) => {
|
|
1235
|
+
try {
|
|
1236
|
+
config.baseURL = this._options.baseUrl;
|
|
1237
|
+
const response = await this._axios.post("GetCredentialTypes", undefined, config);
|
|
1238
|
+
base.WebApiBase.SetCompleted(options);
|
|
1239
|
+
const res = converters.Create_CredentialTypeArray_From(response.data);
|
|
1240
|
+
resolve(res);
|
|
1241
|
+
}
|
|
1242
|
+
catch (err) {
|
|
1243
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1244
|
+
reject(err);
|
|
1245
|
+
}
|
|
1246
|
+
});
|
|
1247
|
+
}
|
|
1248
|
+
/**
|
|
1249
|
+
* Get available credential types that can be used for authentication
|
|
1250
|
+
* @returns Credential types that can be used for authentication
|
|
1251
|
+
*/
|
|
1252
|
+
async getCredentialTypesAsync(webapi_options) {
|
|
1253
|
+
return this._getCredentialTypesAsync(webapi_options);
|
|
1254
|
+
}
|
|
1255
|
+
async _getCredentialTypesForUserTypeAsync(request, options) {
|
|
1256
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1257
|
+
base.WebApiBase.SetPending(options);
|
|
1258
|
+
return new Promise(async (resolve, reject) => {
|
|
1259
|
+
try {
|
|
1260
|
+
config.baseURL = this._options.baseUrl;
|
|
1261
|
+
const response = await this._axios.post("GetCredentialTypesForUserType", request, config);
|
|
1262
|
+
base.WebApiBase.SetCompleted(options);
|
|
1263
|
+
const res = converters.Create_CredentialTypeArray_From(response.data);
|
|
1264
|
+
resolve(res);
|
|
1265
|
+
}
|
|
1266
|
+
catch (err) {
|
|
1267
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1268
|
+
reject(err);
|
|
1269
|
+
}
|
|
1270
|
+
});
|
|
1271
|
+
}
|
|
1272
|
+
async getCredentialTypesForUserTypeAsync(userType, webapi_options) {
|
|
1273
|
+
let _request = null;
|
|
1274
|
+
let _options = null;
|
|
1275
|
+
const first = userType;
|
|
1276
|
+
if (typeof (first) === "object" && first && (typeof (first.userType) != 'undefined')) {
|
|
1277
|
+
_request = userType;
|
|
1278
|
+
_options = webapi_options;
|
|
1279
|
+
}
|
|
1280
|
+
else {
|
|
1281
|
+
_request = {
|
|
1282
|
+
userType: userType,
|
|
1283
|
+
};
|
|
1284
|
+
_options = webapi_options;
|
|
1285
|
+
}
|
|
1286
|
+
return this._getCredentialTypesForUserTypeAsync(_request, _options);
|
|
1287
|
+
}
|
|
1288
|
+
async _saveUntrustedCredentialsAsync(request, options) {
|
|
1289
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1290
|
+
base.WebApiBase.SetPending(options);
|
|
1291
|
+
return new Promise(async (resolve, reject) => {
|
|
1292
|
+
try {
|
|
1293
|
+
config.baseURL = this._options.baseUrl;
|
|
1294
|
+
const response = await this._axios.post("SaveUntrustedCredentials", request, config);
|
|
1295
|
+
base.WebApiBase.SetCompleted(options);
|
|
1296
|
+
const res = response.data;
|
|
1297
|
+
resolve(res);
|
|
1298
|
+
}
|
|
1299
|
+
catch (err) {
|
|
1300
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1301
|
+
reject(err);
|
|
1302
|
+
}
|
|
1303
|
+
});
|
|
1304
|
+
}
|
|
1305
|
+
async saveUntrustedCredentialsAsync(type, credentials, webapi_options) {
|
|
1306
|
+
let _request = null;
|
|
1307
|
+
let _options = null;
|
|
1308
|
+
const first = type;
|
|
1309
|
+
if (typeof (first) === "object" && first && (typeof (first.type) != 'undefined' || typeof (first.credentials) != 'undefined')) {
|
|
1310
|
+
_request = type;
|
|
1311
|
+
_options = credentials;
|
|
1312
|
+
}
|
|
1313
|
+
else {
|
|
1314
|
+
_request = {
|
|
1315
|
+
type: type,
|
|
1316
|
+
credentials: credentials,
|
|
1317
|
+
};
|
|
1318
|
+
_options = webapi_options;
|
|
1319
|
+
}
|
|
1320
|
+
return this._saveUntrustedCredentialsAsync(_request, _options);
|
|
1321
|
+
}
|
|
1322
|
+
async _getUntrustedCredentialsAsync(request, options) {
|
|
1323
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1324
|
+
base.WebApiBase.SetPending(options);
|
|
1325
|
+
return new Promise(async (resolve, reject) => {
|
|
1326
|
+
try {
|
|
1327
|
+
config.baseURL = this._options.baseUrl;
|
|
1328
|
+
const response = await this._axios.post("GetUntrustedCredentials", request, config);
|
|
1329
|
+
base.WebApiBase.SetCompleted(options);
|
|
1330
|
+
const res = converters.Create_UntrustedCredentialsArray_From(response.data);
|
|
1331
|
+
resolve(res);
|
|
1332
|
+
}
|
|
1333
|
+
catch (err) {
|
|
1334
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1335
|
+
reject(err);
|
|
1336
|
+
}
|
|
1337
|
+
});
|
|
1338
|
+
}
|
|
1339
|
+
async getUntrustedCredentialsAsync(type, webapi_options) {
|
|
1340
|
+
let _request = null;
|
|
1341
|
+
let _options = null;
|
|
1342
|
+
const first = type;
|
|
1343
|
+
if (typeof (first) === "object" && first && (typeof (first.type) != 'undefined')) {
|
|
1344
|
+
_request = type;
|
|
1345
|
+
_options = webapi_options;
|
|
1346
|
+
}
|
|
1347
|
+
else {
|
|
1348
|
+
_request = {
|
|
1349
|
+
type: type,
|
|
1350
|
+
};
|
|
1351
|
+
_options = webapi_options;
|
|
1352
|
+
}
|
|
1353
|
+
return this._getUntrustedCredentialsAsync(_request, _options);
|
|
1354
|
+
}
|
|
1355
|
+
async _getUntrustedCredentialsForAssociateAsync(request, options) {
|
|
1356
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1357
|
+
base.WebApiBase.SetPending(options);
|
|
1358
|
+
return new Promise(async (resolve, reject) => {
|
|
1359
|
+
try {
|
|
1360
|
+
config.baseURL = this._options.baseUrl;
|
|
1361
|
+
const response = await this._axios.post("GetUntrustedCredentialsForAssociate", request, config);
|
|
1362
|
+
base.WebApiBase.SetCompleted(options);
|
|
1363
|
+
const res = converters.Create_UntrustedCredentialsArray_From(response.data);
|
|
1364
|
+
resolve(res);
|
|
1365
|
+
}
|
|
1366
|
+
catch (err) {
|
|
1367
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1368
|
+
reject(err);
|
|
1369
|
+
}
|
|
1370
|
+
});
|
|
1371
|
+
}
|
|
1372
|
+
async getUntrustedCredentialsForAssociateAsync(associateId, type, webapi_options) {
|
|
1373
|
+
let _request = null;
|
|
1374
|
+
let _options = null;
|
|
1375
|
+
const first = associateId;
|
|
1376
|
+
if (typeof (first) === "object" && first && (typeof (first.associateId) != 'undefined' || typeof (first.type) != 'undefined')) {
|
|
1377
|
+
_request = associateId;
|
|
1378
|
+
_options = type;
|
|
1379
|
+
}
|
|
1380
|
+
else {
|
|
1381
|
+
_request = {
|
|
1382
|
+
associateId: associateId,
|
|
1383
|
+
type: type,
|
|
1384
|
+
};
|
|
1385
|
+
_options = webapi_options;
|
|
1386
|
+
}
|
|
1387
|
+
return this._getUntrustedCredentialsForAssociateAsync(_request, _options);
|
|
1388
|
+
}
|
|
1389
|
+
async _saveUntrustedCredentialsForAssociateAsync(request, options) {
|
|
1390
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1391
|
+
base.WebApiBase.SetPending(options);
|
|
1392
|
+
return new Promise(async (resolve, reject) => {
|
|
1393
|
+
try {
|
|
1394
|
+
config.baseURL = this._options.baseUrl;
|
|
1395
|
+
const response = await this._axios.post("SaveUntrustedCredentialsForAssociate", request, config);
|
|
1396
|
+
base.WebApiBase.SetCompleted(options);
|
|
1397
|
+
const res = response.data;
|
|
1398
|
+
resolve(res);
|
|
1399
|
+
}
|
|
1400
|
+
catch (err) {
|
|
1401
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1402
|
+
reject(err);
|
|
1403
|
+
}
|
|
1404
|
+
});
|
|
1405
|
+
}
|
|
1406
|
+
async saveUntrustedCredentialsForAssociateAsync(associateId, type, credentials, webapi_options) {
|
|
1407
|
+
let _request = null;
|
|
1408
|
+
let _options = null;
|
|
1409
|
+
const first = associateId;
|
|
1410
|
+
if (typeof (first) === "object" && first && (typeof (first.associateId) != 'undefined' || typeof (first.type) != 'undefined' || typeof (first.credentials) != 'undefined')) {
|
|
1411
|
+
_request = associateId;
|
|
1412
|
+
_options = type;
|
|
1413
|
+
}
|
|
1414
|
+
else {
|
|
1415
|
+
_request = {
|
|
1416
|
+
associateId: associateId,
|
|
1417
|
+
type: type,
|
|
1418
|
+
credentials: credentials,
|
|
1419
|
+
};
|
|
1420
|
+
_options = webapi_options;
|
|
1421
|
+
}
|
|
1422
|
+
return this._saveUntrustedCredentialsForAssociateAsync(_request, _options);
|
|
1423
|
+
}
|
|
1424
|
+
async _removeUntrustedCredentialsAsync(request, options) {
|
|
1425
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1426
|
+
base.WebApiBase.SetPending(options);
|
|
1427
|
+
return new Promise(async (resolve, reject) => {
|
|
1428
|
+
try {
|
|
1429
|
+
config.baseURL = this._options.baseUrl;
|
|
1430
|
+
const response = await this._axios.post("RemoveUntrustedCredentials", request, config);
|
|
1431
|
+
base.WebApiBase.SetCompleted(options);
|
|
1432
|
+
const res = response.data;
|
|
1433
|
+
resolve(res);
|
|
1434
|
+
}
|
|
1435
|
+
catch (err) {
|
|
1436
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1437
|
+
reject(err);
|
|
1438
|
+
}
|
|
1439
|
+
});
|
|
1440
|
+
}
|
|
1441
|
+
async removeUntrustedCredentialsAsync(type, publicValue, webapi_options) {
|
|
1442
|
+
let _request = null;
|
|
1443
|
+
let _options = null;
|
|
1444
|
+
const first = type;
|
|
1445
|
+
if (typeof (first) === "object" && first && (typeof (first.type) != 'undefined' || typeof (first.publicValue) != 'undefined')) {
|
|
1446
|
+
_request = type;
|
|
1447
|
+
_options = publicValue;
|
|
1448
|
+
}
|
|
1449
|
+
else {
|
|
1450
|
+
_request = {
|
|
1451
|
+
type: type,
|
|
1452
|
+
publicValue: publicValue,
|
|
1453
|
+
};
|
|
1454
|
+
_options = webapi_options;
|
|
1455
|
+
}
|
|
1456
|
+
return this._removeUntrustedCredentialsAsync(_request, _options);
|
|
1457
|
+
}
|
|
1458
|
+
async _removeUntrustedCredentialsForAssociateAsync(request, options) {
|
|
1459
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1460
|
+
base.WebApiBase.SetPending(options);
|
|
1461
|
+
return new Promise(async (resolve, reject) => {
|
|
1462
|
+
try {
|
|
1463
|
+
config.baseURL = this._options.baseUrl;
|
|
1464
|
+
const response = await this._axios.post("RemoveUntrustedCredentialsForAssociate", request, config);
|
|
1465
|
+
base.WebApiBase.SetCompleted(options);
|
|
1466
|
+
const res = response.data;
|
|
1467
|
+
resolve(res);
|
|
1468
|
+
}
|
|
1469
|
+
catch (err) {
|
|
1470
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1471
|
+
reject(err);
|
|
1472
|
+
}
|
|
1473
|
+
});
|
|
1474
|
+
}
|
|
1475
|
+
async removeUntrustedCredentialsForAssociateAsync(associateId, type, publicValue, webapi_options) {
|
|
1476
|
+
let _request = null;
|
|
1477
|
+
let _options = null;
|
|
1478
|
+
const first = associateId;
|
|
1479
|
+
if (typeof (first) === "object" && first && (typeof (first.associateId) != 'undefined' || typeof (first.type) != 'undefined' || typeof (first.publicValue) != 'undefined')) {
|
|
1480
|
+
_request = associateId;
|
|
1481
|
+
_options = type;
|
|
1482
|
+
}
|
|
1483
|
+
else {
|
|
1484
|
+
_request = {
|
|
1485
|
+
associateId: associateId,
|
|
1486
|
+
type: type,
|
|
1487
|
+
publicValue: publicValue,
|
|
1488
|
+
};
|
|
1489
|
+
_options = webapi_options;
|
|
1490
|
+
}
|
|
1491
|
+
return this._removeUntrustedCredentialsForAssociateAsync(_request, _options);
|
|
1492
|
+
}
|
|
1493
|
+
async _createExternalUserAsync(request, options) {
|
|
1494
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1495
|
+
base.WebApiBase.SetPending(options);
|
|
1496
|
+
return new Promise(async (resolve, reject) => {
|
|
1497
|
+
try {
|
|
1498
|
+
config.baseURL = this._options.baseUrl;
|
|
1499
|
+
const response = await this._axios.post("CreateExternalUser", request, config);
|
|
1500
|
+
base.WebApiBase.SetCompleted(options);
|
|
1501
|
+
const res = response.data;
|
|
1502
|
+
resolve(res);
|
|
1503
|
+
}
|
|
1504
|
+
catch (err) {
|
|
1505
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1506
|
+
reject(err);
|
|
1507
|
+
}
|
|
1508
|
+
});
|
|
1509
|
+
}
|
|
1510
|
+
async createExternalUserAsync(personId, userName, password, roleId, isActive, webapi_options) {
|
|
1511
|
+
let _request = null;
|
|
1512
|
+
let _options = null;
|
|
1513
|
+
const first = personId;
|
|
1514
|
+
if (typeof (first) === "object" && first && (typeof (first.personId) != 'undefined' || typeof (first.userName) != 'undefined' || typeof (first.password) != 'undefined' || typeof (first.roleId) != 'undefined' || typeof (first.isActive) != 'undefined')) {
|
|
1515
|
+
_request = personId;
|
|
1516
|
+
_options = userName;
|
|
1517
|
+
}
|
|
1518
|
+
else {
|
|
1519
|
+
_request = {
|
|
1520
|
+
personId: personId,
|
|
1521
|
+
userName: userName,
|
|
1522
|
+
password: password,
|
|
1523
|
+
roleId: roleId,
|
|
1524
|
+
isActive: isActive,
|
|
1525
|
+
};
|
|
1526
|
+
_options = webapi_options;
|
|
1527
|
+
}
|
|
1528
|
+
return this._createExternalUserAsync(_request, _options);
|
|
1529
|
+
}
|
|
1530
|
+
async _deleteExternalUserAsync(request, options) {
|
|
1531
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1532
|
+
base.WebApiBase.SetPending(options);
|
|
1533
|
+
return new Promise(async (resolve, reject) => {
|
|
1534
|
+
try {
|
|
1535
|
+
config.baseURL = this._options.baseUrl;
|
|
1536
|
+
const response = await this._axios.post("DeleteExternalUser", request, config);
|
|
1537
|
+
base.WebApiBase.SetCompleted(options);
|
|
1538
|
+
const res = response.data;
|
|
1539
|
+
resolve(res);
|
|
1540
|
+
}
|
|
1541
|
+
catch (err) {
|
|
1542
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1543
|
+
reject(err);
|
|
1544
|
+
}
|
|
1545
|
+
});
|
|
1546
|
+
}
|
|
1547
|
+
async deleteExternalUserAsync(associateId, webapi_options) {
|
|
1548
|
+
let _request = null;
|
|
1549
|
+
let _options = null;
|
|
1550
|
+
const first = associateId;
|
|
1551
|
+
if (typeof (first) === "object" && first && (typeof (first.associateId) != 'undefined')) {
|
|
1552
|
+
_request = associateId;
|
|
1553
|
+
_options = webapi_options;
|
|
1554
|
+
}
|
|
1555
|
+
else {
|
|
1556
|
+
_request = {
|
|
1557
|
+
associateId: associateId,
|
|
1558
|
+
};
|
|
1559
|
+
_options = webapi_options;
|
|
1560
|
+
}
|
|
1561
|
+
return this._deleteExternalUserAsync(_request, _options);
|
|
1562
|
+
}
|
|
1563
|
+
async _setExternalUserInfoAsync(request, options) {
|
|
1564
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1565
|
+
base.WebApiBase.SetPending(options);
|
|
1566
|
+
return new Promise(async (resolve, reject) => {
|
|
1567
|
+
try {
|
|
1568
|
+
config.baseURL = this._options.baseUrl;
|
|
1569
|
+
const response = await this._axios.post("SetExternalUserInfo", request, config);
|
|
1570
|
+
base.WebApiBase.SetCompleted(options);
|
|
1571
|
+
const res = response.data;
|
|
1572
|
+
resolve(res);
|
|
1573
|
+
}
|
|
1574
|
+
catch (err) {
|
|
1575
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1576
|
+
reject(err);
|
|
1577
|
+
}
|
|
1578
|
+
});
|
|
1579
|
+
}
|
|
1580
|
+
async setExternalUserInfoAsync(associateId, userName, password, isActive, roleId, externalUserInfoModification, webapi_options) {
|
|
1581
|
+
let _request = null;
|
|
1582
|
+
let _options = null;
|
|
1583
|
+
const first = associateId;
|
|
1584
|
+
if (typeof (first) === "object" && first && (typeof (first.associateId) != 'undefined' || typeof (first.userName) != 'undefined' || typeof (first.password) != 'undefined' || typeof (first.isActive) != 'undefined' || typeof (first.roleId) != 'undefined' || typeof (first.externalUserInfoModification) != 'undefined')) {
|
|
1585
|
+
_request = associateId;
|
|
1586
|
+
_options = userName;
|
|
1587
|
+
}
|
|
1588
|
+
else {
|
|
1589
|
+
_request = {
|
|
1590
|
+
associateId: associateId,
|
|
1591
|
+
userName: userName,
|
|
1592
|
+
password: password,
|
|
1593
|
+
isActive: isActive,
|
|
1594
|
+
roleId: roleId,
|
|
1595
|
+
externalUserInfoModification: externalUserInfoModification,
|
|
1596
|
+
};
|
|
1597
|
+
_options = webapi_options;
|
|
1598
|
+
}
|
|
1599
|
+
return this._setExternalUserInfoAsync(_request, _options);
|
|
1600
|
+
}
|
|
1601
|
+
async _generateNewPasswordForExternalUserAsync(request, options) {
|
|
1602
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1603
|
+
base.WebApiBase.SetPending(options);
|
|
1604
|
+
return new Promise(async (resolve, reject) => {
|
|
1605
|
+
try {
|
|
1606
|
+
config.baseURL = this._options.baseUrl;
|
|
1607
|
+
const response = await this._axios.post("GenerateNewPasswordForExternalUser", request, config);
|
|
1608
|
+
base.WebApiBase.SetCompleted(options);
|
|
1609
|
+
const res = response.data;
|
|
1610
|
+
resolve(res);
|
|
1611
|
+
}
|
|
1612
|
+
catch (err) {
|
|
1613
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1614
|
+
reject(err);
|
|
1615
|
+
}
|
|
1616
|
+
});
|
|
1617
|
+
}
|
|
1618
|
+
async generateNewPasswordForExternalUserAsync(associateName, webapi_options) {
|
|
1619
|
+
let _request = null;
|
|
1620
|
+
let _options = null;
|
|
1621
|
+
const first = associateName;
|
|
1622
|
+
if (typeof (first) === "object" && first && (typeof (first.associateName) != 'undefined')) {
|
|
1623
|
+
_request = associateName;
|
|
1624
|
+
_options = webapi_options;
|
|
1625
|
+
}
|
|
1626
|
+
else {
|
|
1627
|
+
_request = {
|
|
1628
|
+
associateName: associateName,
|
|
1629
|
+
};
|
|
1630
|
+
_options = webapi_options;
|
|
1631
|
+
}
|
|
1632
|
+
return this._generateNewPasswordForExternalUserAsync(_request, _options);
|
|
1633
|
+
}
|
|
1634
|
+
async _canChangePasswordAsync(request, options) {
|
|
1635
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1636
|
+
base.WebApiBase.SetPending(options);
|
|
1637
|
+
return new Promise(async (resolve, reject) => {
|
|
1638
|
+
try {
|
|
1639
|
+
config.baseURL = this._options.baseUrl;
|
|
1640
|
+
const response = await this._axios.post("CanChangePassword", request, config);
|
|
1641
|
+
base.WebApiBase.SetCompleted(options);
|
|
1642
|
+
const res = response.data;
|
|
1643
|
+
resolve(res);
|
|
1644
|
+
}
|
|
1645
|
+
catch (err) {
|
|
1646
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1647
|
+
reject(err);
|
|
1648
|
+
}
|
|
1649
|
+
});
|
|
1650
|
+
}
|
|
1651
|
+
async canChangePasswordAsync(associateId, webapi_options) {
|
|
1652
|
+
let _request = null;
|
|
1653
|
+
let _options = null;
|
|
1654
|
+
const first = associateId;
|
|
1655
|
+
if (typeof (first) === "object" && first && (typeof (first.associateId) != 'undefined')) {
|
|
1656
|
+
_request = associateId;
|
|
1657
|
+
_options = webapi_options;
|
|
1658
|
+
}
|
|
1659
|
+
else {
|
|
1660
|
+
_request = {
|
|
1661
|
+
associateId: associateId,
|
|
1662
|
+
};
|
|
1663
|
+
_options = webapi_options;
|
|
1664
|
+
}
|
|
1665
|
+
return this._canChangePasswordAsync(_request, _options);
|
|
1666
|
+
}
|
|
1667
|
+
async _getSupportedChangePasswordTypesAsync(request, options) {
|
|
1668
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1669
|
+
base.WebApiBase.SetPending(options);
|
|
1670
|
+
return new Promise(async (resolve, reject) => {
|
|
1671
|
+
try {
|
|
1672
|
+
config.baseURL = this._options.baseUrl;
|
|
1673
|
+
const response = await this._axios.post("GetSupportedChangePasswordTypes", request, config);
|
|
1674
|
+
base.WebApiBase.SetCompleted(options);
|
|
1675
|
+
const res = response.data;
|
|
1676
|
+
resolve(res);
|
|
1677
|
+
}
|
|
1678
|
+
catch (err) {
|
|
1679
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1680
|
+
reject(err);
|
|
1681
|
+
}
|
|
1682
|
+
});
|
|
1683
|
+
}
|
|
1684
|
+
async getSupportedChangePasswordTypesAsync(associateId, webapi_options) {
|
|
1685
|
+
let _request = null;
|
|
1686
|
+
let _options = null;
|
|
1687
|
+
const first = associateId;
|
|
1688
|
+
if (typeof (first) === "object" && first && (typeof (first.associateId) != 'undefined')) {
|
|
1689
|
+
_request = associateId;
|
|
1690
|
+
_options = webapi_options;
|
|
1691
|
+
}
|
|
1692
|
+
else {
|
|
1693
|
+
_request = {
|
|
1694
|
+
associateId: associateId,
|
|
1695
|
+
};
|
|
1696
|
+
_options = webapi_options;
|
|
1697
|
+
}
|
|
1698
|
+
return this._getSupportedChangePasswordTypesAsync(_request, _options);
|
|
1699
|
+
}
|
|
1700
|
+
async _changePasswordAsync(request, options) {
|
|
1701
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1702
|
+
base.WebApiBase.SetPending(options);
|
|
1703
|
+
return new Promise(async (resolve, reject) => {
|
|
1704
|
+
try {
|
|
1705
|
+
config.baseURL = this._options.baseUrl;
|
|
1706
|
+
const response = await this._axios.post("ChangePassword", request, config);
|
|
1707
|
+
base.WebApiBase.SetCompleted(options);
|
|
1708
|
+
const res = response.data;
|
|
1709
|
+
resolve(res);
|
|
1710
|
+
}
|
|
1711
|
+
catch (err) {
|
|
1712
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1713
|
+
reject(err);
|
|
1714
|
+
}
|
|
1715
|
+
});
|
|
1716
|
+
}
|
|
1717
|
+
async changePasswordAsync(associateId, oldPassword, newPassword, webapi_options) {
|
|
1718
|
+
let _request = null;
|
|
1719
|
+
let _options = null;
|
|
1720
|
+
const first = associateId;
|
|
1721
|
+
if (typeof (first) === "object" && first && (typeof (first.associateId) != 'undefined' || typeof (first.oldPassword) != 'undefined' || typeof (first.newPassword) != 'undefined')) {
|
|
1722
|
+
_request = associateId;
|
|
1723
|
+
_options = oldPassword;
|
|
1724
|
+
}
|
|
1725
|
+
else {
|
|
1726
|
+
_request = {
|
|
1727
|
+
associateId: associateId,
|
|
1728
|
+
oldPassword: oldPassword,
|
|
1729
|
+
newPassword: newPassword,
|
|
1730
|
+
};
|
|
1731
|
+
_options = webapi_options;
|
|
1732
|
+
}
|
|
1733
|
+
return this._changePasswordAsync(_request, _options);
|
|
1734
|
+
}
|
|
1735
|
+
async _sendChangePasswordEMailAsync(request, options) {
|
|
1736
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1737
|
+
base.WebApiBase.SetPending(options);
|
|
1738
|
+
return new Promise(async (resolve, reject) => {
|
|
1739
|
+
try {
|
|
1740
|
+
config.baseURL = this._options.baseUrl;
|
|
1741
|
+
const response = await this._axios.post("SendChangePasswordEMail", request, config);
|
|
1742
|
+
base.WebApiBase.SetCompleted(options);
|
|
1743
|
+
const res = converters.Create_OperationResult_From(response.data);
|
|
1744
|
+
resolve(res);
|
|
1745
|
+
}
|
|
1746
|
+
catch (err) {
|
|
1747
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1748
|
+
reject(err);
|
|
1749
|
+
}
|
|
1750
|
+
});
|
|
1751
|
+
}
|
|
1752
|
+
async sendChangePasswordEMailAsync(associateId, webapi_options) {
|
|
1753
|
+
let _request = null;
|
|
1754
|
+
let _options = null;
|
|
1755
|
+
const first = associateId;
|
|
1756
|
+
if (typeof (first) === "object" && first && (typeof (first.associateId) != 'undefined')) {
|
|
1757
|
+
_request = associateId;
|
|
1758
|
+
_options = webapi_options;
|
|
1759
|
+
}
|
|
1760
|
+
else {
|
|
1761
|
+
_request = {
|
|
1762
|
+
associateId: associateId,
|
|
1763
|
+
};
|
|
1764
|
+
_options = webapi_options;
|
|
1765
|
+
}
|
|
1766
|
+
return this._sendChangePasswordEMailAsync(_request, _options);
|
|
1767
|
+
}
|
|
1768
|
+
async _getUserFromPersonIdAsync(request, options) {
|
|
1769
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1770
|
+
base.WebApiBase.SetPending(options);
|
|
1771
|
+
return new Promise(async (resolve, reject) => {
|
|
1772
|
+
try {
|
|
1773
|
+
config.baseURL = this._options.baseUrl;
|
|
1774
|
+
const response = await this._axios.post("GetUserFromPersonId", request, config);
|
|
1775
|
+
base.WebApiBase.SetCompleted(options);
|
|
1776
|
+
const res = converters.Create_UserArray_From(response.data);
|
|
1777
|
+
resolve(res);
|
|
1778
|
+
}
|
|
1779
|
+
catch (err) {
|
|
1780
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1781
|
+
reject(err);
|
|
1782
|
+
}
|
|
1783
|
+
});
|
|
1784
|
+
}
|
|
1785
|
+
async getUserFromPersonIdAsync(personId, webapi_options) {
|
|
1786
|
+
let _request = null;
|
|
1787
|
+
let _options = null;
|
|
1788
|
+
const first = personId;
|
|
1789
|
+
if (typeof (first) === "object" && first && (typeof (first.personId) != 'undefined')) {
|
|
1790
|
+
_request = personId;
|
|
1791
|
+
_options = webapi_options;
|
|
1792
|
+
}
|
|
1793
|
+
else {
|
|
1794
|
+
_request = {
|
|
1795
|
+
personId: personId,
|
|
1796
|
+
};
|
|
1797
|
+
_options = webapi_options;
|
|
1798
|
+
}
|
|
1799
|
+
return this._getUserFromPersonIdAsync(_request, _options);
|
|
1800
|
+
}
|
|
1801
|
+
async _createDefaultUserFromUserTypeAndPersonIdAsync(request, options) {
|
|
1802
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1803
|
+
base.WebApiBase.SetPending(options);
|
|
1804
|
+
return new Promise(async (resolve, reject) => {
|
|
1805
|
+
try {
|
|
1806
|
+
config.baseURL = this._options.baseUrl;
|
|
1807
|
+
const response = await this._axios.post("CreateDefaultUserFromUserTypeAndPersonId", request, config);
|
|
1808
|
+
base.WebApiBase.SetCompleted(options);
|
|
1809
|
+
const res = converters.Create_User_From(response.data);
|
|
1810
|
+
resolve(res);
|
|
1811
|
+
}
|
|
1812
|
+
catch (err) {
|
|
1813
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1814
|
+
reject(err);
|
|
1815
|
+
}
|
|
1816
|
+
});
|
|
1817
|
+
}
|
|
1818
|
+
async createDefaultUserFromUserTypeAndPersonIdAsync(userType, personId, webapi_options) {
|
|
1819
|
+
let _request = null;
|
|
1820
|
+
let _options = null;
|
|
1821
|
+
const first = userType;
|
|
1822
|
+
if (typeof (first) === "object" && first && (typeof (first.userType) != 'undefined' || typeof (first.personId) != 'undefined')) {
|
|
1823
|
+
_request = userType;
|
|
1824
|
+
_options = personId;
|
|
1825
|
+
}
|
|
1826
|
+
else {
|
|
1827
|
+
_request = {
|
|
1828
|
+
userType: userType,
|
|
1829
|
+
personId: personId,
|
|
1830
|
+
};
|
|
1831
|
+
_options = webapi_options;
|
|
1832
|
+
}
|
|
1833
|
+
return this._createDefaultUserFromUserTypeAndPersonIdAsync(_request, _options);
|
|
1834
|
+
}
|
|
1835
|
+
async _createDefaultUserFromUserTypeAsync(request, options) {
|
|
1836
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1837
|
+
base.WebApiBase.SetPending(options);
|
|
1838
|
+
return new Promise(async (resolve, reject) => {
|
|
1839
|
+
try {
|
|
1840
|
+
config.baseURL = this._options.baseUrl;
|
|
1841
|
+
const response = await this._axios.post("CreateDefaultUserFromUserType", request, config);
|
|
1842
|
+
base.WebApiBase.SetCompleted(options);
|
|
1843
|
+
const res = converters.Create_User_From(response.data);
|
|
1844
|
+
resolve(res);
|
|
1845
|
+
}
|
|
1846
|
+
catch (err) {
|
|
1847
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1848
|
+
reject(err);
|
|
1849
|
+
}
|
|
1850
|
+
});
|
|
1851
|
+
}
|
|
1852
|
+
async createDefaultUserFromUserTypeAsync(userType, webapi_options) {
|
|
1853
|
+
let _request = null;
|
|
1854
|
+
let _options = null;
|
|
1855
|
+
const first = userType;
|
|
1856
|
+
if (typeof (first) === "object" && first && (typeof (first.userType) != 'undefined')) {
|
|
1857
|
+
_request = userType;
|
|
1858
|
+
_options = webapi_options;
|
|
1859
|
+
}
|
|
1860
|
+
else {
|
|
1861
|
+
_request = {
|
|
1862
|
+
userType: userType,
|
|
1863
|
+
};
|
|
1864
|
+
_options = webapi_options;
|
|
1865
|
+
}
|
|
1866
|
+
return this._createDefaultUserFromUserTypeAsync(_request, _options);
|
|
1867
|
+
}
|
|
1868
|
+
async _getUserFromEjUserIdAsync(request, options) {
|
|
1869
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1870
|
+
base.WebApiBase.SetPending(options);
|
|
1871
|
+
return new Promise(async (resolve, reject) => {
|
|
1872
|
+
try {
|
|
1873
|
+
config.baseURL = this._options.baseUrl;
|
|
1874
|
+
const response = await this._axios.post("GetUserFromEjUserId", request, config);
|
|
1875
|
+
base.WebApiBase.SetCompleted(options);
|
|
1876
|
+
const res = converters.Create_UserArray_From(response.data);
|
|
1877
|
+
resolve(res);
|
|
1878
|
+
}
|
|
1879
|
+
catch (err) {
|
|
1880
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1881
|
+
reject(err);
|
|
1882
|
+
}
|
|
1883
|
+
});
|
|
1884
|
+
}
|
|
1885
|
+
async getUserFromEjUserIdAsync(ejUserId, webapi_options) {
|
|
1886
|
+
let _request = null;
|
|
1887
|
+
let _options = null;
|
|
1888
|
+
const first = ejUserId;
|
|
1889
|
+
if (typeof (first) === "object" && first && (typeof (first.ejUserId) != 'undefined')) {
|
|
1890
|
+
_request = ejUserId;
|
|
1891
|
+
_options = webapi_options;
|
|
1892
|
+
}
|
|
1893
|
+
else {
|
|
1894
|
+
_request = {
|
|
1895
|
+
ejUserId: ejUserId,
|
|
1896
|
+
};
|
|
1897
|
+
_options = webapi_options;
|
|
1898
|
+
}
|
|
1899
|
+
return this._getUserFromEjUserIdAsync(_request, _options);
|
|
1900
|
+
}
|
|
1901
|
+
async _setPasswordFromNameAsync(request, options) {
|
|
1902
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1903
|
+
base.WebApiBase.SetPending(options);
|
|
1904
|
+
return new Promise(async (resolve, reject) => {
|
|
1905
|
+
try {
|
|
1906
|
+
config.baseURL = this._options.baseUrl;
|
|
1907
|
+
const response = await this._axios.post("SetPasswordFromName", request, config);
|
|
1908
|
+
base.WebApiBase.SetCompleted(options);
|
|
1909
|
+
const res = response.data;
|
|
1910
|
+
resolve(res);
|
|
1911
|
+
}
|
|
1912
|
+
catch (err) {
|
|
1913
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1914
|
+
reject(err);
|
|
1915
|
+
}
|
|
1916
|
+
});
|
|
1917
|
+
}
|
|
1918
|
+
async setPasswordFromNameAsync(associateName, password, webapi_options) {
|
|
1919
|
+
let _request = null;
|
|
1920
|
+
let _options = null;
|
|
1921
|
+
const first = associateName;
|
|
1922
|
+
if (typeof (first) === "object" && first && (typeof (first.associateName) != 'undefined' || typeof (first.password) != 'undefined')) {
|
|
1923
|
+
_request = associateName;
|
|
1924
|
+
_options = password;
|
|
1925
|
+
}
|
|
1926
|
+
else {
|
|
1927
|
+
_request = {
|
|
1928
|
+
associateName: associateName,
|
|
1929
|
+
password: password,
|
|
1930
|
+
};
|
|
1931
|
+
_options = webapi_options;
|
|
1932
|
+
}
|
|
1933
|
+
return this._setPasswordFromNameAsync(_request, _options);
|
|
1934
|
+
}
|
|
1935
|
+
async _setPasswordAsync(request, options) {
|
|
1936
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1937
|
+
base.WebApiBase.SetPending(options);
|
|
1938
|
+
return new Promise(async (resolve, reject) => {
|
|
1939
|
+
try {
|
|
1940
|
+
config.baseURL = this._options.baseUrl;
|
|
1941
|
+
const response = await this._axios.post("SetPassword", request, config);
|
|
1942
|
+
base.WebApiBase.SetCompleted(options);
|
|
1943
|
+
const res = response.data;
|
|
1944
|
+
resolve(res);
|
|
1945
|
+
}
|
|
1946
|
+
catch (err) {
|
|
1947
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1948
|
+
reject(err);
|
|
1949
|
+
}
|
|
1950
|
+
});
|
|
1951
|
+
}
|
|
1952
|
+
async setPasswordAsync(associateId, password, webapi_options) {
|
|
1953
|
+
let _request = null;
|
|
1954
|
+
let _options = null;
|
|
1955
|
+
const first = associateId;
|
|
1956
|
+
if (typeof (first) === "object" && first && (typeof (first.associateId) != 'undefined' || typeof (first.password) != 'undefined')) {
|
|
1957
|
+
_request = associateId;
|
|
1958
|
+
_options = password;
|
|
1959
|
+
}
|
|
1960
|
+
else {
|
|
1961
|
+
_request = {
|
|
1962
|
+
associateId: associateId,
|
|
1963
|
+
password: password,
|
|
1964
|
+
};
|
|
1965
|
+
_options = webapi_options;
|
|
1966
|
+
}
|
|
1967
|
+
return this._setPasswordAsync(_request, _options);
|
|
1968
|
+
}
|
|
1969
|
+
async _changeOwnPasswordAsync(request, options) {
|
|
1970
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1971
|
+
base.WebApiBase.SetPending(options);
|
|
1972
|
+
return new Promise(async (resolve, reject) => {
|
|
1973
|
+
try {
|
|
1974
|
+
config.baseURL = this._options.baseUrl;
|
|
1975
|
+
const response = await this._axios.post("ChangeOwnPassword", request, config);
|
|
1976
|
+
base.WebApiBase.SetCompleted(options);
|
|
1977
|
+
const res = response.data;
|
|
1978
|
+
resolve(res);
|
|
1979
|
+
}
|
|
1980
|
+
catch (err) {
|
|
1981
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1982
|
+
reject(err);
|
|
1983
|
+
}
|
|
1984
|
+
});
|
|
1985
|
+
}
|
|
1986
|
+
async changeOwnPasswordAsync(oldPassword, newPassword, webapi_options) {
|
|
1987
|
+
let _request = null;
|
|
1988
|
+
let _options = null;
|
|
1989
|
+
const first = oldPassword;
|
|
1990
|
+
if (typeof (first) === "object" && first && (typeof (first.oldPassword) != 'undefined' || typeof (first.newPassword) != 'undefined')) {
|
|
1991
|
+
_request = oldPassword;
|
|
1992
|
+
_options = newPassword;
|
|
1993
|
+
}
|
|
1994
|
+
else {
|
|
1995
|
+
_request = {
|
|
1996
|
+
oldPassword: oldPassword,
|
|
1997
|
+
newPassword: newPassword,
|
|
1998
|
+
};
|
|
1999
|
+
_options = webapi_options;
|
|
2000
|
+
}
|
|
2001
|
+
return this._changeOwnPasswordAsync(_request, _options);
|
|
2002
|
+
}
|
|
2003
|
+
async _changePasswordFromNameAsync(request, options) {
|
|
2004
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2005
|
+
base.WebApiBase.SetPending(options);
|
|
2006
|
+
return new Promise(async (resolve, reject) => {
|
|
2007
|
+
try {
|
|
2008
|
+
config.baseURL = this._options.baseUrl;
|
|
2009
|
+
const response = await this._axios.post("ChangePasswordFromName", request, config);
|
|
2010
|
+
base.WebApiBase.SetCompleted(options);
|
|
2011
|
+
const res = response.data;
|
|
2012
|
+
resolve(res);
|
|
2013
|
+
}
|
|
2014
|
+
catch (err) {
|
|
2015
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2016
|
+
reject(err);
|
|
2017
|
+
}
|
|
2018
|
+
});
|
|
2019
|
+
}
|
|
2020
|
+
async changePasswordFromNameAsync(associateName, oldPassword, newPassword, webapi_options) {
|
|
2021
|
+
let _request = null;
|
|
2022
|
+
let _options = null;
|
|
2023
|
+
const first = associateName;
|
|
2024
|
+
if (typeof (first) === "object" && first && (typeof (first.associateName) != 'undefined' || typeof (first.oldPassword) != 'undefined' || typeof (first.newPassword) != 'undefined')) {
|
|
2025
|
+
_request = associateName;
|
|
2026
|
+
_options = oldPassword;
|
|
2027
|
+
}
|
|
2028
|
+
else {
|
|
2029
|
+
_request = {
|
|
2030
|
+
associateName: associateName,
|
|
2031
|
+
oldPassword: oldPassword,
|
|
2032
|
+
newPassword: newPassword,
|
|
2033
|
+
};
|
|
2034
|
+
_options = webapi_options;
|
|
2035
|
+
}
|
|
2036
|
+
return this._changePasswordFromNameAsync(_request, _options);
|
|
2037
|
+
}
|
|
2038
|
+
async _isUserNameValidAsync(request, options) {
|
|
2039
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2040
|
+
base.WebApiBase.SetPending(options);
|
|
2041
|
+
return new Promise(async (resolve, reject) => {
|
|
2042
|
+
try {
|
|
2043
|
+
config.baseURL = this._options.baseUrl;
|
|
2044
|
+
const response = await this._axios.post("IsUserNameValid", request, config);
|
|
2045
|
+
base.WebApiBase.SetCompleted(options);
|
|
2046
|
+
const res = response.data;
|
|
2047
|
+
resolve(res);
|
|
2048
|
+
}
|
|
2049
|
+
catch (err) {
|
|
2050
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2051
|
+
reject(err);
|
|
2052
|
+
}
|
|
2053
|
+
});
|
|
2054
|
+
}
|
|
2055
|
+
async isUserNameValidAsync(associateId, type, personId, userName, webapi_options) {
|
|
2056
|
+
let _request = null;
|
|
2057
|
+
let _options = null;
|
|
2058
|
+
const first = associateId;
|
|
2059
|
+
if (typeof (first) === "object" && first && (typeof (first.associateId) != 'undefined' || typeof (first.type) != 'undefined' || typeof (first.personId) != 'undefined' || typeof (first.userName) != 'undefined')) {
|
|
2060
|
+
_request = associateId;
|
|
2061
|
+
_options = type;
|
|
2062
|
+
}
|
|
2063
|
+
else {
|
|
2064
|
+
_request = {
|
|
2065
|
+
associateId: associateId,
|
|
2066
|
+
type: type,
|
|
2067
|
+
personId: personId,
|
|
2068
|
+
userName: userName,
|
|
2069
|
+
};
|
|
2070
|
+
_options = webapi_options;
|
|
2071
|
+
}
|
|
2072
|
+
return this._isUserNameValidAsync(_request, _options);
|
|
2073
|
+
}
|
|
2074
|
+
async _isPasswordValidAsync(request, options) {
|
|
2075
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2076
|
+
base.WebApiBase.SetPending(options);
|
|
2077
|
+
return new Promise(async (resolve, reject) => {
|
|
2078
|
+
try {
|
|
2079
|
+
config.baseURL = this._options.baseUrl;
|
|
2080
|
+
const response = await this._axios.post("IsPasswordValid", request, config);
|
|
2081
|
+
base.WebApiBase.SetCompleted(options);
|
|
2082
|
+
const res = response.data;
|
|
2083
|
+
resolve(res);
|
|
2084
|
+
}
|
|
2085
|
+
catch (err) {
|
|
2086
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2087
|
+
reject(err);
|
|
2088
|
+
}
|
|
2089
|
+
});
|
|
2090
|
+
}
|
|
2091
|
+
async isPasswordValidAsync(associateId, type, personId, password, webapi_options) {
|
|
2092
|
+
let _request = null;
|
|
2093
|
+
let _options = null;
|
|
2094
|
+
const first = associateId;
|
|
2095
|
+
if (typeof (first) === "object" && first && (typeof (first.associateId) != 'undefined' || typeof (first.type) != 'undefined' || typeof (first.personId) != 'undefined' || typeof (first.password) != 'undefined')) {
|
|
2096
|
+
_request = associateId;
|
|
2097
|
+
_options = type;
|
|
2098
|
+
}
|
|
2099
|
+
else {
|
|
2100
|
+
_request = {
|
|
2101
|
+
associateId: associateId,
|
|
2102
|
+
type: type,
|
|
2103
|
+
personId: personId,
|
|
2104
|
+
password: password,
|
|
2105
|
+
};
|
|
2106
|
+
_options = webapi_options;
|
|
2107
|
+
}
|
|
2108
|
+
return this._isPasswordValidAsync(_request, _options);
|
|
2109
|
+
}
|
|
2110
|
+
async _setGeneratedPasswordAsync(request, options) {
|
|
2111
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2112
|
+
base.WebApiBase.SetPending(options);
|
|
2113
|
+
return new Promise(async (resolve, reject) => {
|
|
2114
|
+
try {
|
|
2115
|
+
config.baseURL = this._options.baseUrl;
|
|
2116
|
+
const response = await this._axios.post("SetGeneratedPassword", request, config);
|
|
2117
|
+
base.WebApiBase.SetCompleted(options);
|
|
2118
|
+
const res = response.data;
|
|
2119
|
+
resolve(res);
|
|
2120
|
+
}
|
|
2121
|
+
catch (err) {
|
|
2122
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2123
|
+
reject(err);
|
|
2124
|
+
}
|
|
2125
|
+
});
|
|
2126
|
+
}
|
|
2127
|
+
async setGeneratedPasswordAsync(associateId, webapi_options) {
|
|
2128
|
+
let _request = null;
|
|
2129
|
+
let _options = null;
|
|
2130
|
+
const first = associateId;
|
|
2131
|
+
if (typeof (first) === "object" && first && (typeof (first.associateId) != 'undefined')) {
|
|
2132
|
+
_request = associateId;
|
|
2133
|
+
_options = webapi_options;
|
|
2134
|
+
}
|
|
2135
|
+
else {
|
|
2136
|
+
_request = {
|
|
2137
|
+
associateId: associateId,
|
|
2138
|
+
};
|
|
2139
|
+
_options = webapi_options;
|
|
2140
|
+
}
|
|
2141
|
+
return this._setGeneratedPasswordAsync(_request, _options);
|
|
2142
|
+
}
|
|
2143
|
+
async _setGeneratedPasswordFromNameAsync(request, options) {
|
|
2144
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2145
|
+
base.WebApiBase.SetPending(options);
|
|
2146
|
+
return new Promise(async (resolve, reject) => {
|
|
2147
|
+
try {
|
|
2148
|
+
config.baseURL = this._options.baseUrl;
|
|
2149
|
+
const response = await this._axios.post("SetGeneratedPasswordFromName", request, config);
|
|
2150
|
+
base.WebApiBase.SetCompleted(options);
|
|
2151
|
+
const res = response.data;
|
|
2152
|
+
resolve(res);
|
|
2153
|
+
}
|
|
2154
|
+
catch (err) {
|
|
2155
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2156
|
+
reject(err);
|
|
2157
|
+
}
|
|
2158
|
+
});
|
|
2159
|
+
}
|
|
2160
|
+
async setGeneratedPasswordFromNameAsync(associateName, webapi_options) {
|
|
2161
|
+
let _request = null;
|
|
2162
|
+
let _options = null;
|
|
2163
|
+
const first = associateName;
|
|
2164
|
+
if (typeof (first) === "object" && first && (typeof (first.associateName) != 'undefined')) {
|
|
2165
|
+
_request = associateName;
|
|
2166
|
+
_options = webapi_options;
|
|
2167
|
+
}
|
|
2168
|
+
else {
|
|
2169
|
+
_request = {
|
|
2170
|
+
associateName: associateName,
|
|
2171
|
+
};
|
|
2172
|
+
_options = webapi_options;
|
|
2173
|
+
}
|
|
2174
|
+
return this._setGeneratedPasswordFromNameAsync(_request, _options);
|
|
2175
|
+
}
|
|
2176
|
+
async _isPasswordValidWithReasonAsync(request, options) {
|
|
2177
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2178
|
+
base.WebApiBase.SetPending(options);
|
|
2179
|
+
return new Promise(async (resolve, reject) => {
|
|
2180
|
+
try {
|
|
2181
|
+
config.baseURL = this._options.baseUrl;
|
|
2182
|
+
const response = await this._axios.post("IsPasswordValidWithReason", request, config);
|
|
2183
|
+
base.WebApiBase.SetCompleted(options);
|
|
2184
|
+
const res = converters.Create_UserValidationResult_From(response.data);
|
|
2185
|
+
resolve(res);
|
|
2186
|
+
}
|
|
2187
|
+
catch (err) {
|
|
2188
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2189
|
+
reject(err);
|
|
2190
|
+
}
|
|
2191
|
+
});
|
|
2192
|
+
}
|
|
2193
|
+
async isPasswordValidWithReasonAsync(associateId, type, personId, password, webapi_options) {
|
|
2194
|
+
let _request = null;
|
|
2195
|
+
let _options = null;
|
|
2196
|
+
const first = associateId;
|
|
2197
|
+
if (typeof (first) === "object" && first && (typeof (first.associateId) != 'undefined' || typeof (first.type) != 'undefined' || typeof (first.personId) != 'undefined' || typeof (first.password) != 'undefined')) {
|
|
2198
|
+
_request = associateId;
|
|
2199
|
+
_options = type;
|
|
2200
|
+
}
|
|
2201
|
+
else {
|
|
2202
|
+
_request = {
|
|
2203
|
+
associateId: associateId,
|
|
2204
|
+
type: type,
|
|
2205
|
+
personId: personId,
|
|
2206
|
+
password: password,
|
|
2207
|
+
};
|
|
2208
|
+
_options = webapi_options;
|
|
2209
|
+
}
|
|
2210
|
+
return this._isPasswordValidWithReasonAsync(_request, _options);
|
|
2211
|
+
}
|
|
2212
|
+
async _isUserNameValidWithReasonAsync(request, options) {
|
|
2213
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2214
|
+
base.WebApiBase.SetPending(options);
|
|
2215
|
+
return new Promise(async (resolve, reject) => {
|
|
2216
|
+
try {
|
|
2217
|
+
config.baseURL = this._options.baseUrl;
|
|
2218
|
+
const response = await this._axios.post("IsUserNameValidWithReason", request, config);
|
|
2219
|
+
base.WebApiBase.SetCompleted(options);
|
|
2220
|
+
const res = converters.Create_UserValidationResult_From(response.data);
|
|
2221
|
+
resolve(res);
|
|
2222
|
+
}
|
|
2223
|
+
catch (err) {
|
|
2224
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2225
|
+
reject(err);
|
|
2226
|
+
}
|
|
2227
|
+
});
|
|
2228
|
+
}
|
|
2229
|
+
async isUserNameValidWithReasonAsync(associateId, type, personId, userName, webapi_options) {
|
|
2230
|
+
let _request = null;
|
|
2231
|
+
let _options = null;
|
|
2232
|
+
const first = associateId;
|
|
2233
|
+
if (typeof (first) === "object" && first && (typeof (first.associateId) != 'undefined' || typeof (first.type) != 'undefined' || typeof (first.personId) != 'undefined' || typeof (first.userName) != 'undefined')) {
|
|
2234
|
+
_request = associateId;
|
|
2235
|
+
_options = type;
|
|
2236
|
+
}
|
|
2237
|
+
else {
|
|
2238
|
+
_request = {
|
|
2239
|
+
associateId: associateId,
|
|
2240
|
+
type: type,
|
|
2241
|
+
personId: personId,
|
|
2242
|
+
userName: userName,
|
|
2243
|
+
};
|
|
2244
|
+
_options = webapi_options;
|
|
2245
|
+
}
|
|
2246
|
+
return this._isUserNameValidWithReasonAsync(_request, _options);
|
|
2247
|
+
}
|
|
2248
|
+
async _changeUserTypeAsync(request, options) {
|
|
2249
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2250
|
+
base.WebApiBase.SetPending(options);
|
|
2251
|
+
return new Promise(async (resolve, reject) => {
|
|
2252
|
+
try {
|
|
2253
|
+
config.baseURL = this._options.baseUrl;
|
|
2254
|
+
const response = await this._axios.post("ChangeUserType", request, config);
|
|
2255
|
+
base.WebApiBase.SetCompleted(options);
|
|
2256
|
+
const res = converters.Create_User_From(response.data);
|
|
2257
|
+
resolve(res);
|
|
2258
|
+
}
|
|
2259
|
+
catch (err) {
|
|
2260
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2261
|
+
reject(err);
|
|
2262
|
+
}
|
|
2263
|
+
});
|
|
2264
|
+
}
|
|
2265
|
+
async changeUserTypeAsync(user, userType, webapi_options) {
|
|
2266
|
+
let _request = null;
|
|
2267
|
+
let _options = null;
|
|
2268
|
+
const first = user;
|
|
2269
|
+
if (typeof (first) === "object" && first && (typeof (first.user) != 'undefined' || typeof (first.userType) != 'undefined')) {
|
|
2270
|
+
_request = user;
|
|
2271
|
+
_options = userType;
|
|
2272
|
+
}
|
|
2273
|
+
else {
|
|
2274
|
+
_request = {
|
|
2275
|
+
user: user,
|
|
2276
|
+
userType: userType,
|
|
2277
|
+
};
|
|
2278
|
+
_options = webapi_options;
|
|
2279
|
+
}
|
|
2280
|
+
return this._changeUserTypeAsync(_request, _options);
|
|
2281
|
+
}
|
|
2282
|
+
async _createDefaultUserFromUserTypeAndCredentialAsync(request, options) {
|
|
2283
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2284
|
+
base.WebApiBase.SetPending(options);
|
|
2285
|
+
return new Promise(async (resolve, reject) => {
|
|
2286
|
+
try {
|
|
2287
|
+
config.baseURL = this._options.baseUrl;
|
|
2288
|
+
const response = await this._axios.post("CreateDefaultUserFromUserTypeAndCredential", request, config);
|
|
2289
|
+
base.WebApiBase.SetCompleted(options);
|
|
2290
|
+
const res = converters.Create_User_From(response.data);
|
|
2291
|
+
resolve(res);
|
|
2292
|
+
}
|
|
2293
|
+
catch (err) {
|
|
2294
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2295
|
+
reject(err);
|
|
2296
|
+
}
|
|
2297
|
+
});
|
|
2298
|
+
}
|
|
2299
|
+
async createDefaultUserFromUserTypeAndCredentialAsync(userType, contactId, credentialType, credentialValue, credentialDisplayValue, webapi_options) {
|
|
2300
|
+
let _request = null;
|
|
2301
|
+
let _options = null;
|
|
2302
|
+
const first = userType;
|
|
2303
|
+
if (typeof (first) === "object" && first && (typeof (first.userType) != 'undefined' || typeof (first.contactId) != 'undefined' || typeof (first.credentialType) != 'undefined' || typeof (first.credentialValue) != 'undefined' || typeof (first.credentialDisplayValue) != 'undefined')) {
|
|
2304
|
+
_request = userType;
|
|
2305
|
+
_options = contactId;
|
|
2306
|
+
}
|
|
2307
|
+
else {
|
|
2308
|
+
_request = {
|
|
2309
|
+
userType: userType,
|
|
2310
|
+
contactId: contactId,
|
|
2311
|
+
credentialType: credentialType,
|
|
2312
|
+
credentialValue: credentialValue,
|
|
2313
|
+
credentialDisplayValue: credentialDisplayValue,
|
|
2314
|
+
};
|
|
2315
|
+
_options = webapi_options;
|
|
2316
|
+
}
|
|
2317
|
+
return this._createDefaultUserFromUserTypeAndCredentialAsync(_request, _options);
|
|
2318
|
+
}
|
|
2319
|
+
async _getValidUserNameAsync(request, options) {
|
|
2320
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2321
|
+
base.WebApiBase.SetPending(options);
|
|
2322
|
+
return new Promise(async (resolve, reject) => {
|
|
2323
|
+
try {
|
|
2324
|
+
config.baseURL = this._options.baseUrl;
|
|
2325
|
+
const response = await this._axios.post("GetValidUserName", request, config);
|
|
2326
|
+
base.WebApiBase.SetCompleted(options);
|
|
2327
|
+
const res = response.data;
|
|
2328
|
+
resolve(res);
|
|
2329
|
+
}
|
|
2330
|
+
catch (err) {
|
|
2331
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2332
|
+
reject(err);
|
|
2333
|
+
}
|
|
2334
|
+
});
|
|
2335
|
+
}
|
|
2336
|
+
async getValidUserNameAsync(associateId, type, personId, userName, webapi_options) {
|
|
2337
|
+
let _request = null;
|
|
2338
|
+
let _options = null;
|
|
2339
|
+
const first = associateId;
|
|
2340
|
+
if (typeof (first) === "object" && first && (typeof (first.associateId) != 'undefined' || typeof (first.type) != 'undefined' || typeof (first.personId) != 'undefined' || typeof (first.userName) != 'undefined')) {
|
|
2341
|
+
_request = associateId;
|
|
2342
|
+
_options = type;
|
|
2343
|
+
}
|
|
2344
|
+
else {
|
|
2345
|
+
_request = {
|
|
2346
|
+
associateId: associateId,
|
|
2347
|
+
type: type,
|
|
2348
|
+
personId: personId,
|
|
2349
|
+
userName: userName,
|
|
2350
|
+
};
|
|
2351
|
+
_options = webapi_options;
|
|
2352
|
+
}
|
|
2353
|
+
return this._getValidUserNameAsync(_request, _options);
|
|
2354
|
+
}
|
|
2355
|
+
async _removeLicensesAsync(request, options) {
|
|
2356
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2357
|
+
base.WebApiBase.SetPending(options);
|
|
2358
|
+
return new Promise(async (resolve, reject) => {
|
|
2359
|
+
try {
|
|
2360
|
+
config.baseURL = this._options.baseUrl;
|
|
2361
|
+
const response = await this._axios.post("RemoveLicenses", request, config);
|
|
2362
|
+
base.WebApiBase.SetCompleted(options);
|
|
2363
|
+
const res = response.data;
|
|
2364
|
+
resolve(res);
|
|
2365
|
+
}
|
|
2366
|
+
catch (err) {
|
|
2367
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2368
|
+
reject(err);
|
|
2369
|
+
}
|
|
2370
|
+
});
|
|
2371
|
+
}
|
|
2372
|
+
async removeLicensesAsync(associateId, webapi_options) {
|
|
2373
|
+
let _request = null;
|
|
2374
|
+
let _options = null;
|
|
2375
|
+
const first = associateId;
|
|
2376
|
+
if (typeof (first) === "object" && first && (typeof (first.associateId) != 'undefined')) {
|
|
2377
|
+
_request = associateId;
|
|
2378
|
+
_options = webapi_options;
|
|
2379
|
+
}
|
|
2380
|
+
else {
|
|
2381
|
+
_request = {
|
|
2382
|
+
associateId: associateId,
|
|
2383
|
+
};
|
|
2384
|
+
_options = webapi_options;
|
|
2385
|
+
}
|
|
2386
|
+
return this._removeLicensesAsync(_request, _options);
|
|
2387
|
+
}
|
|
2388
|
+
async _makeRetiredAsync(request, options) {
|
|
2389
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2390
|
+
base.WebApiBase.SetPending(options);
|
|
2391
|
+
return new Promise(async (resolve, reject) => {
|
|
2392
|
+
try {
|
|
2393
|
+
config.baseURL = this._options.baseUrl;
|
|
2394
|
+
const response = await this._axios.post("MakeRetired", request, config);
|
|
2395
|
+
base.WebApiBase.SetCompleted(options);
|
|
2396
|
+
const res = response.data;
|
|
2397
|
+
resolve(res);
|
|
2398
|
+
}
|
|
2399
|
+
catch (err) {
|
|
2400
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2401
|
+
reject(err);
|
|
2402
|
+
}
|
|
2403
|
+
});
|
|
2404
|
+
}
|
|
2405
|
+
async makeRetiredAsync(associateId, retired, webapi_options) {
|
|
2406
|
+
let _request = null;
|
|
2407
|
+
let _options = null;
|
|
2408
|
+
const first = associateId;
|
|
2409
|
+
if (typeof (first) === "object" && first && (typeof (first.associateId) != 'undefined' || typeof (first.retired) != 'undefined')) {
|
|
2410
|
+
_request = associateId;
|
|
2411
|
+
_options = retired;
|
|
2412
|
+
}
|
|
2413
|
+
else {
|
|
2414
|
+
_request = {
|
|
2415
|
+
associateId: associateId,
|
|
2416
|
+
retired: retired,
|
|
2417
|
+
};
|
|
2418
|
+
_options = webapi_options;
|
|
2419
|
+
}
|
|
2420
|
+
return this._makeRetiredAsync(_request, _options);
|
|
2421
|
+
}
|
|
2422
|
+
async _addOwnerContactAsync(request, options) {
|
|
2423
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2424
|
+
base.WebApiBase.SetPending(options);
|
|
2425
|
+
return new Promise(async (resolve, reject) => {
|
|
2426
|
+
try {
|
|
2427
|
+
config.baseURL = this._options.baseUrl;
|
|
2428
|
+
const response = await this._axios.post("AddOwnerContact", request, config);
|
|
2429
|
+
base.WebApiBase.SetCompleted(options);
|
|
2430
|
+
const res = response.data;
|
|
2431
|
+
resolve(res);
|
|
2432
|
+
}
|
|
2433
|
+
catch (err) {
|
|
2434
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2435
|
+
reject(err);
|
|
2436
|
+
}
|
|
2437
|
+
});
|
|
2438
|
+
}
|
|
2439
|
+
async addOwnerContactAsync(contactId, webapi_options) {
|
|
2440
|
+
let _request = null;
|
|
2441
|
+
let _options = null;
|
|
2442
|
+
const first = contactId;
|
|
2443
|
+
if (typeof (first) === "object" && first && (typeof (first.contactId) != 'undefined')) {
|
|
2444
|
+
_request = contactId;
|
|
2445
|
+
_options = webapi_options;
|
|
2446
|
+
}
|
|
2447
|
+
else {
|
|
2448
|
+
_request = {
|
|
2449
|
+
contactId: contactId,
|
|
2450
|
+
};
|
|
2451
|
+
_options = webapi_options;
|
|
2452
|
+
}
|
|
2453
|
+
return this._addOwnerContactAsync(_request, _options);
|
|
2454
|
+
}
|
|
2455
|
+
async _removeOwnerContactAsync(request, options) {
|
|
2456
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2457
|
+
base.WebApiBase.SetPending(options);
|
|
2458
|
+
return new Promise(async (resolve, reject) => {
|
|
2459
|
+
try {
|
|
2460
|
+
config.baseURL = this._options.baseUrl;
|
|
2461
|
+
const response = await this._axios.post("RemoveOwnerContact", request, config);
|
|
2462
|
+
base.WebApiBase.SetCompleted(options);
|
|
2463
|
+
const res = response.data;
|
|
2464
|
+
resolve(res);
|
|
2465
|
+
}
|
|
2466
|
+
catch (err) {
|
|
2467
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2468
|
+
reject(err);
|
|
2469
|
+
}
|
|
2470
|
+
});
|
|
2471
|
+
}
|
|
2472
|
+
async removeOwnerContactAsync(contactId, webapi_options) {
|
|
2473
|
+
let _request = null;
|
|
2474
|
+
let _options = null;
|
|
2475
|
+
const first = contactId;
|
|
2476
|
+
if (typeof (first) === "object" && first && (typeof (first.contactId) != 'undefined')) {
|
|
2477
|
+
_request = contactId;
|
|
2478
|
+
_options = webapi_options;
|
|
2479
|
+
}
|
|
2480
|
+
else {
|
|
2481
|
+
_request = {
|
|
2482
|
+
contactId: contactId,
|
|
2483
|
+
};
|
|
2484
|
+
_options = webapi_options;
|
|
2485
|
+
}
|
|
2486
|
+
return this._removeOwnerContactAsync(_request, _options);
|
|
2487
|
+
}
|
|
2488
|
+
async _resolveUserFromInfoAsync(request, options) {
|
|
2489
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2490
|
+
base.WebApiBase.SetPending(options);
|
|
2491
|
+
return new Promise(async (resolve, reject) => {
|
|
2492
|
+
try {
|
|
2493
|
+
config.baseURL = this._options.baseUrl;
|
|
2494
|
+
const response = await this._axios.post("ResolveUserFromInfo", request, config);
|
|
2495
|
+
base.WebApiBase.SetCompleted(options);
|
|
2496
|
+
const res = converters.Create_ResolvedUser_From(response.data);
|
|
2497
|
+
resolve(res);
|
|
2498
|
+
}
|
|
2499
|
+
catch (err) {
|
|
2500
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2501
|
+
reject(err);
|
|
2502
|
+
}
|
|
2503
|
+
});
|
|
2504
|
+
}
|
|
2505
|
+
async resolveUserFromInfoAsync(contactId, personName, phoneNumbers, emails, userType, credential, webapi_options) {
|
|
2506
|
+
let _request = null;
|
|
2507
|
+
let _options = null;
|
|
2508
|
+
const first = contactId;
|
|
2509
|
+
if (typeof (first) === "object" && first && (typeof (first.contactId) != 'undefined' || typeof (first.personName) != 'undefined' || typeof (first.phoneNumbers) != 'undefined' || typeof (first.emails) != 'undefined' || typeof (first.userType) != 'undefined' || typeof (first.credential) != 'undefined')) {
|
|
2510
|
+
_request = contactId;
|
|
2511
|
+
_options = personName;
|
|
2512
|
+
}
|
|
2513
|
+
else {
|
|
2514
|
+
_request = {
|
|
2515
|
+
contactId: contactId,
|
|
2516
|
+
personName: personName,
|
|
2517
|
+
phoneNumbers: phoneNumbers,
|
|
2518
|
+
emails: emails,
|
|
2519
|
+
userType: userType,
|
|
2520
|
+
credential: credential,
|
|
2521
|
+
};
|
|
2522
|
+
_options = webapi_options;
|
|
2523
|
+
}
|
|
2524
|
+
return this._resolveUserFromInfoAsync(_request, _options);
|
|
2525
|
+
}
|
|
2526
|
+
async _getAccessTokenAsync(request, options) {
|
|
2527
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2528
|
+
base.WebApiBase.SetPending(options);
|
|
2529
|
+
return new Promise(async (resolve, reject) => {
|
|
2530
|
+
try {
|
|
2531
|
+
config.baseURL = this._options.baseUrl;
|
|
2532
|
+
const response = await this._axios.post("GetAccessToken", request, config);
|
|
2533
|
+
base.WebApiBase.SetCompleted(options);
|
|
2534
|
+
const res = response.data;
|
|
2535
|
+
resolve(res);
|
|
2536
|
+
}
|
|
2537
|
+
catch (err) {
|
|
2538
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2539
|
+
reject(err);
|
|
2540
|
+
}
|
|
2541
|
+
});
|
|
2542
|
+
}
|
|
2543
|
+
async getAccessTokenAsync(appToken, includeCsSession, webapi_options) {
|
|
2544
|
+
let _request = null;
|
|
2545
|
+
let _options = null;
|
|
2546
|
+
const first = appToken;
|
|
2547
|
+
if (typeof (first) === "object" && first && (typeof (first.appToken) != 'undefined' || typeof (first.includeCsSession) != 'undefined')) {
|
|
2548
|
+
_request = appToken;
|
|
2549
|
+
_options = includeCsSession;
|
|
2550
|
+
}
|
|
2551
|
+
else {
|
|
2552
|
+
_request = {
|
|
2553
|
+
appToken: appToken,
|
|
2554
|
+
includeCsSession: includeCsSession,
|
|
2555
|
+
};
|
|
2556
|
+
_options = webapi_options;
|
|
2557
|
+
}
|
|
2558
|
+
return this._getAccessTokenAsync(_request, _options);
|
|
2559
|
+
}
|
|
2560
|
+
async _getValidUserNameForNewUserAsync(request, options) {
|
|
2561
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2562
|
+
base.WebApiBase.SetPending(options);
|
|
2563
|
+
return new Promise(async (resolve, reject) => {
|
|
2564
|
+
try {
|
|
2565
|
+
config.baseURL = this._options.baseUrl;
|
|
2566
|
+
const response = await this._axios.post("GetValidUserNameForNewUser", request, config);
|
|
2567
|
+
base.WebApiBase.SetCompleted(options);
|
|
2568
|
+
const res = response.data;
|
|
2569
|
+
resolve(res);
|
|
2570
|
+
}
|
|
2571
|
+
catch (err) {
|
|
2572
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2573
|
+
reject(err);
|
|
2574
|
+
}
|
|
2575
|
+
});
|
|
2576
|
+
}
|
|
2577
|
+
async getValidUserNameForNewUserAsync(user, webapi_options) {
|
|
2578
|
+
let _request = null;
|
|
2579
|
+
let _options = null;
|
|
2580
|
+
const first = user;
|
|
2581
|
+
if (typeof (first) === "object" && first && (typeof (first.user) != 'undefined')) {
|
|
2582
|
+
_request = user;
|
|
2583
|
+
_options = webapi_options;
|
|
2584
|
+
}
|
|
2585
|
+
else {
|
|
2586
|
+
_request = {
|
|
2587
|
+
user: user,
|
|
2588
|
+
};
|
|
2589
|
+
_options = webapi_options;
|
|
2590
|
+
}
|
|
2591
|
+
return this._getValidUserNameForNewUserAsync(_request, _options);
|
|
2592
|
+
}
|
|
2593
|
+
async _getDefaultAssociateUserNameAsync(request, options) {
|
|
2594
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2595
|
+
base.WebApiBase.SetPending(options);
|
|
2596
|
+
return new Promise(async (resolve, reject) => {
|
|
2597
|
+
try {
|
|
2598
|
+
config.baseURL = this._options.baseUrl;
|
|
2599
|
+
const response = await this._axios.post("GetDefaultAssociateUserName", request, config);
|
|
2600
|
+
base.WebApiBase.SetCompleted(options);
|
|
2601
|
+
const res = response.data;
|
|
2602
|
+
resolve(res);
|
|
2603
|
+
}
|
|
2604
|
+
catch (err) {
|
|
2605
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2606
|
+
reject(err);
|
|
2607
|
+
}
|
|
2608
|
+
});
|
|
2609
|
+
}
|
|
2610
|
+
async getDefaultAssociateUserNameAsync(user, webapi_options) {
|
|
2611
|
+
let _request = null;
|
|
2612
|
+
let _options = null;
|
|
2613
|
+
const first = user;
|
|
2614
|
+
if (typeof (first) === "object" && first && (typeof (first.user) != 'undefined')) {
|
|
2615
|
+
_request = user;
|
|
2616
|
+
_options = webapi_options;
|
|
2617
|
+
}
|
|
2618
|
+
else {
|
|
2619
|
+
_request = {
|
|
2620
|
+
user: user,
|
|
2621
|
+
};
|
|
2622
|
+
_options = webapi_options;
|
|
2623
|
+
}
|
|
2624
|
+
return this._getDefaultAssociateUserNameAsync(_request, _options);
|
|
2625
|
+
}
|
|
2626
|
+
async _isNickNameUniqueAsync(request, options) {
|
|
2627
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2628
|
+
base.WebApiBase.SetPending(options);
|
|
2629
|
+
return new Promise(async (resolve, reject) => {
|
|
2630
|
+
try {
|
|
2631
|
+
config.baseURL = this._options.baseUrl;
|
|
2632
|
+
const response = await this._axios.post("IsNickNameUnique", request, config);
|
|
2633
|
+
base.WebApiBase.SetCompleted(options);
|
|
2634
|
+
const res = response.data;
|
|
2635
|
+
resolve(res);
|
|
2636
|
+
}
|
|
2637
|
+
catch (err) {
|
|
2638
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2639
|
+
reject(err);
|
|
2640
|
+
}
|
|
2641
|
+
});
|
|
2642
|
+
}
|
|
2643
|
+
async isNickNameUniqueAsync(associateId, nickName, webapi_options) {
|
|
2644
|
+
let _request = null;
|
|
2645
|
+
let _options = null;
|
|
2646
|
+
const first = associateId;
|
|
2647
|
+
if (typeof (first) === "object" && first && (typeof (first.associateId) != 'undefined' || typeof (first.nickName) != 'undefined')) {
|
|
2648
|
+
_request = associateId;
|
|
2649
|
+
_options = nickName;
|
|
2650
|
+
}
|
|
2651
|
+
else {
|
|
2652
|
+
_request = {
|
|
2653
|
+
associateId: associateId,
|
|
2654
|
+
nickName: nickName,
|
|
2655
|
+
};
|
|
2656
|
+
_options = webapi_options;
|
|
2657
|
+
}
|
|
2658
|
+
return this._isNickNameUniqueAsync(_request, _options);
|
|
2659
|
+
}
|
|
2660
|
+
async _validateUserAsync(request, options) {
|
|
2661
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2662
|
+
base.WebApiBase.SetPending(options);
|
|
2663
|
+
return new Promise(async (resolve, reject) => {
|
|
2664
|
+
try {
|
|
2665
|
+
config.baseURL = this._options.baseUrl;
|
|
2666
|
+
const response = await this._axios.post("ValidateUser", request, config);
|
|
2667
|
+
base.WebApiBase.SetCompleted(options);
|
|
2668
|
+
const res = converters.Create_StringDictionary_From(response.data);
|
|
2669
|
+
resolve(res);
|
|
2670
|
+
}
|
|
2671
|
+
catch (err) {
|
|
2672
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2673
|
+
reject(err);
|
|
2674
|
+
}
|
|
2675
|
+
});
|
|
2676
|
+
}
|
|
2677
|
+
async validateUserAsync(user, webapi_options) {
|
|
2678
|
+
let _request = null;
|
|
2679
|
+
let _options = null;
|
|
2680
|
+
const first = user;
|
|
2681
|
+
if (typeof (first) === "object" && first && (typeof (first.user) != 'undefined')) {
|
|
2682
|
+
_request = user;
|
|
2683
|
+
_options = webapi_options;
|
|
2684
|
+
}
|
|
2685
|
+
else {
|
|
2686
|
+
_request = {
|
|
2687
|
+
user: user,
|
|
2688
|
+
};
|
|
2689
|
+
_options = webapi_options;
|
|
2690
|
+
}
|
|
2691
|
+
return this._validateUserAsync(_request, _options);
|
|
2692
|
+
}
|
|
2693
|
+
async _getUserPresenceStatusAsync(request, options) {
|
|
2694
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2695
|
+
base.WebApiBase.SetPending(options);
|
|
2696
|
+
return new Promise(async (resolve, reject) => {
|
|
2697
|
+
try {
|
|
2698
|
+
config.baseURL = this._options.baseUrl;
|
|
2699
|
+
const response = await this._axios.post("GetUserPresenceStatus", request, config);
|
|
2700
|
+
base.WebApiBase.SetCompleted(options);
|
|
2701
|
+
const res = converters.Create_UserPresenceStatus_From(response.data);
|
|
2702
|
+
resolve(res);
|
|
2703
|
+
}
|
|
2704
|
+
catch (err) {
|
|
2705
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2706
|
+
reject(err);
|
|
2707
|
+
}
|
|
2708
|
+
});
|
|
2709
|
+
}
|
|
2710
|
+
async getUserPresenceStatusAsync(associateId, webapi_options) {
|
|
2711
|
+
let _request = null;
|
|
2712
|
+
let _options = null;
|
|
2713
|
+
const first = associateId;
|
|
2714
|
+
if (typeof (first) === "object" && first && (typeof (first.associateId) != 'undefined')) {
|
|
2715
|
+
_request = associateId;
|
|
2716
|
+
_options = webapi_options;
|
|
2717
|
+
}
|
|
2718
|
+
else {
|
|
2719
|
+
_request = {
|
|
2720
|
+
associateId: associateId,
|
|
2721
|
+
};
|
|
2722
|
+
_options = webapi_options;
|
|
2723
|
+
}
|
|
2724
|
+
return this._getUserPresenceStatusAsync(_request, _options);
|
|
2725
|
+
}
|
|
2726
|
+
async _setUserPresenceStatusAsync(request, options) {
|
|
2727
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2728
|
+
base.WebApiBase.SetPending(options);
|
|
2729
|
+
return new Promise(async (resolve, reject) => {
|
|
2730
|
+
try {
|
|
2731
|
+
config.baseURL = this._options.baseUrl;
|
|
2732
|
+
const response = await this._axios.post("SetUserPresenceStatus", request, config);
|
|
2733
|
+
base.WebApiBase.SetCompleted(options);
|
|
2734
|
+
const res = converters.Create_UserPresenceStatus_From(response.data);
|
|
2735
|
+
resolve(res);
|
|
2736
|
+
}
|
|
2737
|
+
catch (err) {
|
|
2738
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2739
|
+
reject(err);
|
|
2740
|
+
}
|
|
2741
|
+
});
|
|
2742
|
+
}
|
|
2743
|
+
async setUserPresenceStatusAsync(associateId, userPresenceStatus, webapi_options) {
|
|
2744
|
+
let _request = null;
|
|
2745
|
+
let _options = null;
|
|
2746
|
+
const first = associateId;
|
|
2747
|
+
if (typeof (first) === "object" && first && (typeof (first.associateId) != 'undefined' || typeof (first.userPresenceStatus) != 'undefined')) {
|
|
2748
|
+
_request = associateId;
|
|
2749
|
+
_options = userPresenceStatus;
|
|
2750
|
+
}
|
|
2751
|
+
else {
|
|
2752
|
+
_request = {
|
|
2753
|
+
associateId: associateId,
|
|
2754
|
+
userPresenceStatus: userPresenceStatus,
|
|
2755
|
+
};
|
|
2756
|
+
_options = webapi_options;
|
|
2757
|
+
}
|
|
2758
|
+
return this._setUserPresenceStatusAsync(_request, _options);
|
|
2759
|
+
}
|
|
2760
|
+
/*
|
|
2761
|
+
* Gets a UserGroup object.
|
|
2762
|
+
* @param userGroupId - The primary key.
|
|
2763
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
2764
|
+
* @returns A single UserGroup
|
|
2765
|
+
*/
|
|
2766
|
+
async getUserGroupAsync(userGroupId, options) {
|
|
2767
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2768
|
+
base.WebApiBase.SetPending(options);
|
|
2769
|
+
return new Promise(async (resolve, reject) => {
|
|
2770
|
+
try {
|
|
2771
|
+
const response = await this._axios.post("GetUserGroup?userGroupId=" + userGroupId, null, config);
|
|
2772
|
+
base.WebApiBase.SetCompleted(options);
|
|
2773
|
+
const res = converters.Create_UserGroup_From(response.data);
|
|
2774
|
+
resolve(res);
|
|
2775
|
+
}
|
|
2776
|
+
catch (err) {
|
|
2777
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2778
|
+
reject(err);
|
|
2779
|
+
}
|
|
2780
|
+
});
|
|
2781
|
+
}
|
|
2782
|
+
async _saveUserGroupAsync(request, options) {
|
|
2783
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2784
|
+
base.WebApiBase.SetPending(options);
|
|
2785
|
+
return new Promise(async (resolve, reject) => {
|
|
2786
|
+
try {
|
|
2787
|
+
config.baseURL = this._options.baseUrl;
|
|
2788
|
+
const response = await this._axios.post("SaveUserGroup", request, config);
|
|
2789
|
+
base.WebApiBase.SetCompleted(options);
|
|
2790
|
+
const res = converters.Create_UserGroup_From(response.data);
|
|
2791
|
+
resolve(res);
|
|
2792
|
+
}
|
|
2793
|
+
catch (err) {
|
|
2794
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2795
|
+
reject(err);
|
|
2796
|
+
}
|
|
2797
|
+
});
|
|
2798
|
+
}
|
|
2799
|
+
async saveUserGroupAsync(userGroup, webapi_options) {
|
|
2800
|
+
let _request = null;
|
|
2801
|
+
let _options = null;
|
|
2802
|
+
const first = userGroup;
|
|
2803
|
+
if (typeof (first) === "object" && first && (typeof (first.userGroup) != 'undefined')) {
|
|
2804
|
+
_request = userGroup;
|
|
2805
|
+
_options = webapi_options;
|
|
2806
|
+
}
|
|
2807
|
+
else {
|
|
2808
|
+
_request = {
|
|
2809
|
+
userGroup: userGroup,
|
|
2810
|
+
};
|
|
2811
|
+
_options = webapi_options;
|
|
2812
|
+
}
|
|
2813
|
+
return this._saveUserGroupAsync(_request, _options);
|
|
2814
|
+
}
|
|
2815
|
+
async _getAllUserGroupsAsync(request, options) {
|
|
2816
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2817
|
+
base.WebApiBase.SetPending(options);
|
|
2818
|
+
return new Promise(async (resolve, reject) => {
|
|
2819
|
+
try {
|
|
2820
|
+
config.baseURL = this._options.baseUrl;
|
|
2821
|
+
const response = await this._axios.post("GetAllUserGroups", request, config);
|
|
2822
|
+
base.WebApiBase.SetCompleted(options);
|
|
2823
|
+
const res = converters.Create_UserGroupArray_From(response.data);
|
|
2824
|
+
resolve(res);
|
|
2825
|
+
}
|
|
2826
|
+
catch (err) {
|
|
2827
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2828
|
+
reject(err);
|
|
2829
|
+
}
|
|
2830
|
+
});
|
|
2831
|
+
}
|
|
2832
|
+
async getAllUserGroupsAsync(includeDeleted, webapi_options) {
|
|
2833
|
+
let _request = null;
|
|
2834
|
+
let _options = null;
|
|
2835
|
+
const first = includeDeleted;
|
|
2836
|
+
if (typeof (first) === "object" && first && (typeof (first.includeDeleted) != 'undefined')) {
|
|
2837
|
+
_request = includeDeleted;
|
|
2838
|
+
_options = webapi_options;
|
|
2839
|
+
}
|
|
2840
|
+
else {
|
|
2841
|
+
_request = {
|
|
2842
|
+
includeDeleted: includeDeleted,
|
|
2843
|
+
};
|
|
2844
|
+
_options = webapi_options;
|
|
2845
|
+
}
|
|
2846
|
+
return this._getAllUserGroupsAsync(_request, _options);
|
|
2847
|
+
}
|
|
2848
|
+
async _createUserGroupAsync(options) {
|
|
2849
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2850
|
+
base.WebApiBase.SetPending(options);
|
|
2851
|
+
return new Promise(async (resolve, reject) => {
|
|
2852
|
+
try {
|
|
2853
|
+
config.baseURL = this._options.baseUrl;
|
|
2854
|
+
const response = await this._axios.post("CreateUserGroup", undefined, config);
|
|
2855
|
+
base.WebApiBase.SetCompleted(options);
|
|
2856
|
+
const res = converters.Create_UserGroup_From(response.data);
|
|
2857
|
+
resolve(res);
|
|
2858
|
+
}
|
|
2859
|
+
catch (err) {
|
|
2860
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2861
|
+
reject(err);
|
|
2862
|
+
}
|
|
2863
|
+
});
|
|
2864
|
+
}
|
|
2865
|
+
/**
|
|
2866
|
+
* Create UserGroup (Rank is assigned to the highest rank)
|
|
2867
|
+
* @returns
|
|
2868
|
+
*/
|
|
2869
|
+
async createUserGroupAsync(webapi_options) {
|
|
2870
|
+
return this._createUserGroupAsync(webapi_options);
|
|
2871
|
+
}
|
|
2872
|
+
async _deleteUserGroupAsync(request, options) {
|
|
2873
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2874
|
+
base.WebApiBase.SetPending(options);
|
|
2875
|
+
return new Promise(async (resolve, reject) => {
|
|
2876
|
+
try {
|
|
2877
|
+
config.baseURL = this._options.baseUrl;
|
|
2878
|
+
const response = await this._axios.post("DeleteUserGroup", request, config);
|
|
2879
|
+
base.WebApiBase.SetCompleted(options);
|
|
2880
|
+
const res = response.data;
|
|
2881
|
+
resolve(res);
|
|
2882
|
+
}
|
|
2883
|
+
catch (err) {
|
|
2884
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2885
|
+
reject(err);
|
|
2886
|
+
}
|
|
2887
|
+
});
|
|
2888
|
+
}
|
|
2889
|
+
async deleteUserGroupAsync(userGroupToDelete, userGroupToMoveTo, webapi_options) {
|
|
2890
|
+
let _request = null;
|
|
2891
|
+
let _options = null;
|
|
2892
|
+
const first = userGroupToDelete;
|
|
2893
|
+
if (typeof (first) === "object" && first && (typeof (first.userGroupToDelete) != 'undefined' || typeof (first.userGroupToMoveTo) != 'undefined')) {
|
|
2894
|
+
_request = userGroupToDelete;
|
|
2895
|
+
_options = userGroupToMoveTo;
|
|
2896
|
+
}
|
|
2897
|
+
else {
|
|
2898
|
+
_request = {
|
|
2899
|
+
userGroupToDelete: userGroupToDelete,
|
|
2900
|
+
userGroupToMoveTo: userGroupToMoveTo,
|
|
2901
|
+
};
|
|
2902
|
+
_options = webapi_options;
|
|
2903
|
+
}
|
|
2904
|
+
return this._deleteUserGroupAsync(_request, _options);
|
|
2905
|
+
}
|
|
2906
|
+
/*
|
|
2907
|
+
* Gets an array of UserGroup objects.
|
|
2908
|
+
* @param userGroupIds - The primary keys.
|
|
2909
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
2910
|
+
* @returns An array of UserGroup
|
|
2911
|
+
*/
|
|
2912
|
+
async getUserGroupListAsync(userGroupIds, options) {
|
|
2913
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2914
|
+
base.WebApiBase.SetPending(options);
|
|
2915
|
+
return new Promise(async (resolve, reject) => {
|
|
2916
|
+
try {
|
|
2917
|
+
const response = await this._axios.post("GetUserGroupList", userGroupIds, config);
|
|
2918
|
+
base.WebApiBase.SetCompleted(options);
|
|
2919
|
+
const res = converters.Create_UserGroupArray_From(response.data);
|
|
2920
|
+
resolve(res);
|
|
2921
|
+
}
|
|
2922
|
+
catch (err) {
|
|
2923
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2924
|
+
reject(err);
|
|
2925
|
+
}
|
|
2926
|
+
});
|
|
2927
|
+
}
|
|
2928
|
+
/*
|
|
2929
|
+
* Gets a UserInfo object.
|
|
2930
|
+
* @param userInfoId - The primary key.
|
|
2931
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
2932
|
+
* @returns A single UserInfo
|
|
2933
|
+
*/
|
|
2934
|
+
async getUserInfoAsync(userInfoId, options) {
|
|
2935
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2936
|
+
base.WebApiBase.SetPending(options);
|
|
2937
|
+
return new Promise(async (resolve, reject) => {
|
|
2938
|
+
try {
|
|
2939
|
+
const response = await this._axios.post("GetUserInfo?userInfoId=" + userInfoId, null, config);
|
|
2940
|
+
base.WebApiBase.SetCompleted(options);
|
|
2941
|
+
const res = converters.Create_UserInfo_From(response.data);
|
|
2942
|
+
resolve(res);
|
|
2943
|
+
}
|
|
2944
|
+
catch (err) {
|
|
2945
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2946
|
+
reject(err);
|
|
2947
|
+
}
|
|
2948
|
+
});
|
|
2949
|
+
}
|
|
2950
|
+
/*
|
|
2951
|
+
* Gets an array of UserInfo objects.
|
|
2952
|
+
* @param userInfoIds - The primary keys.
|
|
2953
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
2954
|
+
* @returns An array of UserInfo
|
|
2955
|
+
*/
|
|
2956
|
+
async getUserInfoListAsync(userInfoIds, options) {
|
|
2957
|
+
const config = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2958
|
+
base.WebApiBase.SetPending(options);
|
|
2959
|
+
return new Promise(async (resolve, reject) => {
|
|
2960
|
+
try {
|
|
2961
|
+
const response = await this._axios.post("GetUserInfoList", userInfoIds, config);
|
|
2962
|
+
base.WebApiBase.SetCompleted(options);
|
|
2963
|
+
const res = converters.Create_UserInfoArray_From(response.data);
|
|
2964
|
+
resolve(res);
|
|
2965
|
+
}
|
|
2966
|
+
catch (err) {
|
|
2967
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2968
|
+
reject(err);
|
|
2969
|
+
}
|
|
2970
|
+
});
|
|
2971
|
+
}
|
|
2972
|
+
} // class v1UserAgentController
|
|
2973
|
+
//# sourceMappingURL=UserAgent.js.map
|