@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
package/src/UserAgent.ts
ADDED
|
@@ -0,0 +1,4798 @@
|
|
|
1
|
+
// <auto-generated>
|
|
2
|
+
// SuperOffice Code Generator
|
|
3
|
+
// modelling\templates\servicestswebapi\tswebapiagents.tt
|
|
4
|
+
// </auto-generated>
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
/* tslint:disable */
|
|
8
|
+
//----------------------------------------------------------------------------
|
|
9
|
+
// G E N E R A T E D F I L E ! D O N O T E D I T !
|
|
10
|
+
//----------------------------------------------------------------------------
|
|
11
|
+
//
|
|
12
|
+
// File: WebApi/UserAgent.ts
|
|
13
|
+
//
|
|
14
|
+
//----------------------------------------------------------------------------
|
|
15
|
+
// Copyright (C) SuperOffice AS
|
|
16
|
+
//----------------------------------------------------------------------------
|
|
17
|
+
|
|
18
|
+
import { AxiosRequestConfig } from 'axios';
|
|
19
|
+
import { Duration } from 'dayjs/plugin/duration';
|
|
20
|
+
import * as enums from './Enums.js';
|
|
21
|
+
import * as base from './WebApiBase.js';
|
|
22
|
+
import * as carriers from './Carriers.js';
|
|
23
|
+
import * as converters from './Converters.js';
|
|
24
|
+
import { FromBase64ToString, ToBase64 } from './Base64.js';
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* User administration
|
|
28
|
+
*
|
|
29
|
+
* **Online Restricted:** This agent is not available in Online by default. User management is not allowed for partner apps.
|
|
30
|
+
*/
|
|
31
|
+
export interface IUserAgent {
|
|
32
|
+
createDefaultRoleEntityAsync(): Promise< carriers.RoleEntity >;
|
|
33
|
+
saveRoleEntityAsync(entity: carriers.RoleEntity) : Promise< carriers.RoleEntity >;
|
|
34
|
+
createDefaultServiceAuthAsync(): Promise< carriers.ServiceAuth >;
|
|
35
|
+
saveServiceAuthAsync(entity: carriers.ServiceAuth) : Promise< carriers.ServiceAuth >;
|
|
36
|
+
deleteServiceAuthAsync(ServiceAuthId: number) : Promise<void>;
|
|
37
|
+
createDefaultUntrustedCredentialsAsync(): Promise< carriers.UntrustedCredentials >;
|
|
38
|
+
createDefaultUserAsync(): Promise< carriers.User >;
|
|
39
|
+
saveUserAsync(entity: carriers.User) : Promise< carriers.User >;
|
|
40
|
+
deleteUserAsync(UserId: number) : Promise<void>;
|
|
41
|
+
getAccessGatewayInfoAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.AccessGatewayInfo >;
|
|
42
|
+
getOrRegisterAccessGatewayInfoAsync(request: carriers.User_GetOrRegisterAccessGatewayInfoRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.AccessGatewayInfo >;
|
|
43
|
+
getOrRegisterAccessGatewayInfoAsync(redirectUri: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.AccessGatewayInfo >;
|
|
44
|
+
registerWithAccessGatewayAsync(request: carriers.User_RegisterWithAccessGatewayRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.AccessGatewayInfo >;
|
|
45
|
+
registerWithAccessGatewayAsync(redirectUri: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.AccessGatewayInfo >;
|
|
46
|
+
checkAccessGatewayRegistrationAsync(webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
47
|
+
saveCredentialAsync(request: carriers.User_SaveCredentialRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
48
|
+
saveCredentialAsync(userId: number, credential: carriers.Credential, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
49
|
+
deleteCredentialAsync(request: carriers.User_DeleteCredentialRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
50
|
+
deleteCredentialAsync(userId: number, credentialType: string, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
51
|
+
findCredentialsGroupsAsync(request: carriers.User_FindCredentialsGroupsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CredentialsGroup[] >;
|
|
52
|
+
findCredentialsGroupsAsync(type: string, searchString: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CredentialsGroup[] >;
|
|
53
|
+
findCredentialUsersAsync(request: carriers.User_FindCredentialUsersRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CredentialsGroupUsers >;
|
|
54
|
+
findCredentialUsersAsync(type: string, searchString: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CredentialsGroupUsers >;
|
|
55
|
+
getCredentialUsersInGroupAsync(request: carriers.User_GetCredentialUsersInGroupRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CredentialsGroupUsers >;
|
|
56
|
+
getCredentialUsersInGroupAsync(type: string, groupName: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CredentialsGroupUsers >;
|
|
57
|
+
getRoleAsync(roleId: number) : Promise< carriers.Role >;
|
|
58
|
+
getRoleEntityAsync(roleEntityId: number) : Promise< carriers.RoleEntity >;
|
|
59
|
+
deleteRoleAsync(request: carriers.User_DeleteRoleRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
60
|
+
deleteRoleAsync(roleIdToDelete: number, replacingRoleId: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
61
|
+
getAllRolesAsync(request: carriers.User_GetAllRolesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SelectableMDOListItem[] >;
|
|
62
|
+
getAllRolesAsync(roleType: enums.RoleType, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SelectableMDOListItem[] >;
|
|
63
|
+
getAllFunctionalRightsAsync(request: carriers.User_GetAllFunctionalRightsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SelectableMDOListItem[] >;
|
|
64
|
+
getAllFunctionalRightsAsync(roleType: enums.RoleType, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SelectableMDOListItem[] >;
|
|
65
|
+
getFunctionalRightsAsync(request: carriers.User_GetFunctionalRightsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SelectableMDOListItem[] >;
|
|
66
|
+
getFunctionalRightsAsync(roleId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SelectableMDOListItem[] >;
|
|
67
|
+
setFunctionalRightsAsync(request: carriers.User_SetFunctionalRightsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
68
|
+
setFunctionalRightsAsync(roleId: number, functionalRightIds: number[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
69
|
+
setDataRightAsync(request: carriers.User_SetDataRightRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
70
|
+
setDataRightAsync(roleId: number, tableName: string, relationToOwner: enums.RoleRelationToOwner, dataRightValue: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
71
|
+
getDataRightAsync(request: carriers.User_GetDataRightRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
72
|
+
getDataRightAsync(roleId: number, tableName: string, relationToOwner: enums.RoleRelationToOwner, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
73
|
+
getDataRightsAsync(request: carriers.User_GetDataRightsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.StringDictionary >;
|
|
74
|
+
getDataRightsAsync(roleId: number, tableName: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.StringDictionary >;
|
|
75
|
+
createDefaultRoleEntityFromTypeAsync(request: carriers.User_CreateDefaultRoleEntityFromTypeRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.RoleEntity >;
|
|
76
|
+
createDefaultRoleEntityFromTypeAsync(type: enums.RoleType, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.RoleEntity >;
|
|
77
|
+
findRolesWithFunctionalRightAsync(request: carriers.User_FindRolesWithFunctionalRightRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.MDOListItem[] >;
|
|
78
|
+
findRolesWithFunctionalRightAsync(functionalRightName: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.MDOListItem[] >;
|
|
79
|
+
findRolesWithFunctionalRightsAsync(request: carriers.User_FindRolesWithFunctionalRightsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number[] >;
|
|
80
|
+
findRolesWithFunctionalRightsAsync(functionalRightNames: string[], webapi_options?:base.WebApiRequestOptions) : Promise< number[] >;
|
|
81
|
+
findRolesWithoutFunctionalRightsAsync(request: carriers.User_FindRolesWithoutFunctionalRightsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number[] >;
|
|
82
|
+
findRolesWithoutFunctionalRightsAsync(functionalRightNames: string[], webapi_options?:base.WebApiRequestOptions) : Promise< number[] >;
|
|
83
|
+
getServiceAuthAsync(serviceAuthId: number) : Promise< carriers.ServiceAuth >;
|
|
84
|
+
saveExternalTokensAsync(request: carriers.User_SaveExternalTokensRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
85
|
+
saveExternalTokensAsync(tokenManagementInfo: carriers.TokenManagementInfo, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
86
|
+
decryptAndSaveExternalTokensAsync(request: carriers.User_DecryptAndSaveExternalTokensRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
87
|
+
decryptAndSaveExternalTokensAsync(tokenManagementInfo: carriers.TokenManagementInfo, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
88
|
+
getExternalTokensAsync(request: carriers.User_GetExternalTokensRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TokenManagementInfo >;
|
|
89
|
+
getExternalTokensAsync(key: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TokenManagementInfo >;
|
|
90
|
+
getUserAsync(userId: number) : Promise< carriers.User >;
|
|
91
|
+
getUserFromNameAsync(request: carriers.User_GetUserFromNameRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.User >;
|
|
92
|
+
getUserFromNameAsync(userName: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.User >;
|
|
93
|
+
saveUserFromNameAsync(request: carriers.User_SaveUserFromNameRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.User >;
|
|
94
|
+
saveUserFromNameAsync(userName: string, user: carriers.User, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.User >;
|
|
95
|
+
deleteUserFromNameAsync(request: carriers.User_DeleteUserFromNameRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
96
|
+
deleteUserFromNameAsync(userName: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
97
|
+
getCredentialTypesAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CredentialType[] >;
|
|
98
|
+
getCredentialTypesForUserTypeAsync(request: carriers.User_GetCredentialTypesForUserTypeRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CredentialType[] >;
|
|
99
|
+
getCredentialTypesForUserTypeAsync(userType: enums.UserType, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CredentialType[] >;
|
|
100
|
+
saveUntrustedCredentialsAsync(request: carriers.User_SaveUntrustedCredentialsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
101
|
+
saveUntrustedCredentialsAsync(type: string, credentials: carriers.UntrustedCredentials, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
102
|
+
getUntrustedCredentialsAsync(request: carriers.User_GetUntrustedCredentialsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UntrustedCredentials[] >;
|
|
103
|
+
getUntrustedCredentialsAsync(type: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UntrustedCredentials[] >;
|
|
104
|
+
getUntrustedCredentialsForAssociateAsync(request: carriers.User_GetUntrustedCredentialsForAssociateRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UntrustedCredentials[] >;
|
|
105
|
+
getUntrustedCredentialsForAssociateAsync(associateId: number, type: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UntrustedCredentials[] >;
|
|
106
|
+
saveUntrustedCredentialsForAssociateAsync(request: carriers.User_SaveUntrustedCredentialsForAssociateRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
107
|
+
saveUntrustedCredentialsForAssociateAsync(associateId: number, type: string, credentials: carriers.UntrustedCredentials, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
108
|
+
removeUntrustedCredentialsAsync(request: carriers.User_RemoveUntrustedCredentialsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
109
|
+
removeUntrustedCredentialsAsync(type: string, publicValue: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
110
|
+
removeUntrustedCredentialsForAssociateAsync(request: carriers.User_RemoveUntrustedCredentialsForAssociateRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
111
|
+
removeUntrustedCredentialsForAssociateAsync(associateId: number, type: string, publicValue: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
112
|
+
createExternalUserAsync(request: carriers.User_CreateExternalUserRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
|
|
113
|
+
createExternalUserAsync(personId: number, userName: string, password: string, roleId: number, isActive: boolean, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
|
|
114
|
+
deleteExternalUserAsync(request: carriers.User_DeleteExternalUserRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
115
|
+
deleteExternalUserAsync(associateId: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
116
|
+
setExternalUserInfoAsync(request: carriers.User_SetExternalUserInfoRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
117
|
+
setExternalUserInfoAsync(associateId: number, userName: string, password: string, isActive: boolean, roleId: number, externalUserInfoModification: enums.ExternalUserInfoModification, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
118
|
+
generateNewPasswordForExternalUserAsync(request: carriers.User_GenerateNewPasswordForExternalUserRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
119
|
+
generateNewPasswordForExternalUserAsync(associateName: string, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
120
|
+
canChangePasswordAsync(request: carriers.User_CanChangePasswordRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
121
|
+
canChangePasswordAsync(associateId: number, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
122
|
+
getSupportedChangePasswordTypesAsync(request: carriers.User_GetSupportedChangePasswordTypesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< enums.ChangePasswordType[] >;
|
|
123
|
+
getSupportedChangePasswordTypesAsync(associateId: number, webapi_options?:base.WebApiRequestOptions) : Promise< enums.ChangePasswordType[] >;
|
|
124
|
+
changePasswordAsync(request: carriers.User_ChangePasswordRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
125
|
+
changePasswordAsync(associateId: number, oldPassword: string, newPassword: string, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
126
|
+
sendChangePasswordEMailAsync(request: carriers.User_SendChangePasswordEMailRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.OperationResult >;
|
|
127
|
+
sendChangePasswordEMailAsync(associateId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.OperationResult >;
|
|
128
|
+
getUserFromPersonIdAsync(request: carriers.User_GetUserFromPersonIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.User[] >;
|
|
129
|
+
getUserFromPersonIdAsync(personId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.User[] >;
|
|
130
|
+
createDefaultUserFromUserTypeAndPersonIdAsync(request: carriers.User_CreateDefaultUserFromUserTypeAndPersonIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.User >;
|
|
131
|
+
createDefaultUserFromUserTypeAndPersonIdAsync(userType: enums.UserType, personId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.User >;
|
|
132
|
+
createDefaultUserFromUserTypeAsync(request: carriers.User_CreateDefaultUserFromUserTypeRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.User >;
|
|
133
|
+
createDefaultUserFromUserTypeAsync(userType: enums.UserType, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.User >;
|
|
134
|
+
getUserFromEjUserIdAsync(request: carriers.User_GetUserFromEjUserIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.User[] >;
|
|
135
|
+
getUserFromEjUserIdAsync(ejUserId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.User[] >;
|
|
136
|
+
setPasswordFromNameAsync(request: carriers.User_SetPasswordFromNameRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
137
|
+
setPasswordFromNameAsync(associateName: string, password: string, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
138
|
+
setPasswordAsync(request: carriers.User_SetPasswordRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
139
|
+
setPasswordAsync(associateId: number, password: string, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
140
|
+
changeOwnPasswordAsync(request: carriers.User_ChangeOwnPasswordRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
141
|
+
changeOwnPasswordAsync(oldPassword: string, newPassword: string, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
142
|
+
changePasswordFromNameAsync(request: carriers.User_ChangePasswordFromNameRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
143
|
+
changePasswordFromNameAsync(associateName: string, oldPassword: string, newPassword: string, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
144
|
+
isUserNameValidAsync(request: carriers.User_IsUserNameValidRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
145
|
+
isUserNameValidAsync(associateId: number, type: enums.UserType, personId: number, userName: string, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
146
|
+
isPasswordValidAsync(request: carriers.User_IsPasswordValidRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
147
|
+
isPasswordValidAsync(associateId: number, type: enums.UserType, personId: number, password: string, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
148
|
+
setGeneratedPasswordAsync(request: carriers.User_SetGeneratedPasswordRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
149
|
+
setGeneratedPasswordAsync(associateId: number, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
150
|
+
setGeneratedPasswordFromNameAsync(request: carriers.User_SetGeneratedPasswordFromNameRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
151
|
+
setGeneratedPasswordFromNameAsync(associateName: string, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
152
|
+
isPasswordValidWithReasonAsync(request: carriers.User_IsPasswordValidWithReasonRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UserValidationResult >;
|
|
153
|
+
isPasswordValidWithReasonAsync(associateId: number, type: enums.UserType, personId: number, password: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UserValidationResult >;
|
|
154
|
+
isUserNameValidWithReasonAsync(request: carriers.User_IsUserNameValidWithReasonRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UserValidationResult >;
|
|
155
|
+
isUserNameValidWithReasonAsync(associateId: number, type: enums.UserType, personId: number, userName: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UserValidationResult >;
|
|
156
|
+
changeUserTypeAsync(request: carriers.User_ChangeUserTypeRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.User >;
|
|
157
|
+
changeUserTypeAsync(user: carriers.User, userType: enums.UserType, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.User >;
|
|
158
|
+
createDefaultUserFromUserTypeAndCredentialAsync(request: carriers.User_CreateDefaultUserFromUserTypeAndCredentialRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.User >;
|
|
159
|
+
createDefaultUserFromUserTypeAndCredentialAsync(userType: enums.UserType, contactId: number, credentialType: string, credentialValue: string, credentialDisplayValue: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.User >;
|
|
160
|
+
getValidUserNameAsync(request: carriers.User_GetValidUserNameRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
161
|
+
getValidUserNameAsync(associateId: number, type: enums.UserType, personId: number, userName: string, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
162
|
+
removeLicensesAsync(request: carriers.User_RemoveLicensesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
163
|
+
removeLicensesAsync(associateId: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
164
|
+
makeRetiredAsync(request: carriers.User_MakeRetiredRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
165
|
+
makeRetiredAsync(associateId: number, retired: boolean, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
166
|
+
addOwnerContactAsync(request: carriers.User_AddOwnerContactRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
167
|
+
addOwnerContactAsync(contactId: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
168
|
+
removeOwnerContactAsync(request: carriers.User_RemoveOwnerContactRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
169
|
+
removeOwnerContactAsync(contactId: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
170
|
+
resolveUserFromInfoAsync(request: carriers.User_ResolveUserFromInfoRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ResolvedUser >;
|
|
171
|
+
resolveUserFromInfoAsync(contactId: number, personName: string, phoneNumbers: string[], emails: string[], userType: enums.UserType, credential: carriers.Credential, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ResolvedUser >;
|
|
172
|
+
getAccessTokenAsync(request: carriers.User_GetAccessTokenRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
173
|
+
getAccessTokenAsync(appToken: string, includeCsSession: boolean, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
174
|
+
getValidUserNameForNewUserAsync(request: carriers.User_GetValidUserNameForNewUserRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
175
|
+
getValidUserNameForNewUserAsync(user: carriers.User, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
176
|
+
getDefaultAssociateUserNameAsync(request: carriers.User_GetDefaultAssociateUserNameRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
177
|
+
getDefaultAssociateUserNameAsync(user: carriers.User, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
178
|
+
isNickNameUniqueAsync(request: carriers.User_IsNickNameUniqueRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
179
|
+
isNickNameUniqueAsync(associateId: number, nickName: string, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
180
|
+
validateUserAsync(request: carriers.User_ValidateUserRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.StringDictionary >;
|
|
181
|
+
validateUserAsync(user: carriers.User, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.StringDictionary >;
|
|
182
|
+
getUserPresenceStatusAsync(request: carriers.User_GetUserPresenceStatusRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UserPresenceStatus >;
|
|
183
|
+
getUserPresenceStatusAsync(associateId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UserPresenceStatus >;
|
|
184
|
+
setUserPresenceStatusAsync(request: carriers.User_SetUserPresenceStatusRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UserPresenceStatus >;
|
|
185
|
+
setUserPresenceStatusAsync(associateId: number, userPresenceStatus: carriers.UserPresenceStatus, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UserPresenceStatus >;
|
|
186
|
+
getUserGroupAsync(userGroupId: number) : Promise< carriers.UserGroup >;
|
|
187
|
+
saveUserGroupAsync(request: carriers.User_SaveUserGroupRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UserGroup >;
|
|
188
|
+
saveUserGroupAsync(userGroup: carriers.UserGroup, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UserGroup >;
|
|
189
|
+
getAllUserGroupsAsync(request: carriers.User_GetAllUserGroupsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UserGroup[] >;
|
|
190
|
+
getAllUserGroupsAsync(includeDeleted: boolean, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UserGroup[] >;
|
|
191
|
+
createUserGroupAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UserGroup >;
|
|
192
|
+
deleteUserGroupAsync(request: carriers.User_DeleteUserGroupRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
193
|
+
deleteUserGroupAsync(userGroupToDelete: number, userGroupToMoveTo: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
194
|
+
getUserGroupListAsync(userGroupIds: number[]) : Promise< carriers.UserGroup[] >;
|
|
195
|
+
getUserInfoAsync(userInfoId: number) : Promise< carriers.UserInfo >;
|
|
196
|
+
getUserInfoListAsync(userInfoIds: number[]) : Promise< carriers.UserInfo[] >;
|
|
197
|
+
} // interface IUserAgent
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* User administration
|
|
204
|
+
*/
|
|
205
|
+
export class UserAgent extends base.WebApiBase implements IUserAgent {
|
|
206
|
+
constructor(baseUrl?: string, languageCode?:string, cultureCode?: string);
|
|
207
|
+
constructor(baseUrl?: string, resourceParsing?: base.ResourceParsing);
|
|
208
|
+
constructor(baseUrl: string, resourceManager:any);
|
|
209
|
+
constructor(baseUrl: string, config:AxiosRequestConfig, resourceManager:any);
|
|
210
|
+
constructor(baseUrl: string, config:AxiosRequestConfig, resourceParsing?: base.ResourceParsing);
|
|
211
|
+
constructor(baseUrl: string, config:AxiosRequestConfig, languageCode?:string, cultureCode?: string);
|
|
212
|
+
constructor(options: base.WebApiOptions);
|
|
213
|
+
|
|
214
|
+
constructor(baseUrlOrOptions: string|base.WebApiOptions|undefined,
|
|
215
|
+
langOrconfigOrRM?: string|base.ResourceParsing|AxiosRequestConfig|any,
|
|
216
|
+
langOrResourceOrRM?:string|base.ResourceParsing|any,
|
|
217
|
+
cultureCode?: string,
|
|
218
|
+
) {
|
|
219
|
+
const options = base.WebApiBase.FigureOutOptions(baseUrlOrOptions, langOrconfigOrRM, langOrResourceOrRM, cultureCode);
|
|
220
|
+
options.basePath = "v1/Agents/User/";
|
|
221
|
+
super(options);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Set default values into a new RoleEntity.
|
|
228
|
+
* NetServer calculates default values on the entity, which is required when creating/storing a new instance
|
|
229
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
230
|
+
* @returns A blank entity.
|
|
231
|
+
*/
|
|
232
|
+
public async createDefaultRoleEntityAsync(options?:base.WebApiRequestOptions) : Promise< carriers.RoleEntity > {
|
|
233
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
234
|
+
base.WebApiBase.SetPending(options);
|
|
235
|
+
return new Promise< carriers.RoleEntity >(async (resolve, reject) => {
|
|
236
|
+
try {
|
|
237
|
+
const response = await this._axios.post("CreateDefaultRoleEntity", null, config);
|
|
238
|
+
base.WebApiBase.SetCompleted(options);
|
|
239
|
+
const res : carriers.RoleEntity = converters.Create_RoleEntity_From( response.data );
|
|
240
|
+
resolve(res);
|
|
241
|
+
}
|
|
242
|
+
catch( err ) {
|
|
243
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
244
|
+
reject(err);
|
|
245
|
+
}
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
/*
|
|
249
|
+
* Replace the existing RoleEntity or creates a new RoleEntity if the id parameter is empty
|
|
250
|
+
* @param entity - The RoleEntity to be saved.
|
|
251
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
252
|
+
* @returns New or updated RoleEntity
|
|
253
|
+
*/
|
|
254
|
+
public async saveRoleEntityAsync(entity: carriers.RoleEntity, options?:base.WebApiRequestOptions) : Promise< carriers.RoleEntity > {
|
|
255
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
256
|
+
base.WebApiBase.SetPending(options);
|
|
257
|
+
return new Promise< carriers.RoleEntity >(async (resolve, reject) => {
|
|
258
|
+
try {
|
|
259
|
+
const response = await this._axios.post("SaveRoleEntity", entity, config);
|
|
260
|
+
base.WebApiBase.SetCompleted(options);
|
|
261
|
+
const res : carriers.RoleEntity = converters.Create_RoleEntity_From( response.data );
|
|
262
|
+
resolve(res);
|
|
263
|
+
}
|
|
264
|
+
catch( err ) {
|
|
265
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
266
|
+
reject(err);
|
|
267
|
+
}
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* Set default values into a new ServiceAuth.
|
|
273
|
+
* NetServer calculates default values on the entity, which is required when creating/storing a new instance
|
|
274
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
275
|
+
* @returns A blank entity.
|
|
276
|
+
*/
|
|
277
|
+
public async createDefaultServiceAuthAsync(options?:base.WebApiRequestOptions) : Promise< carriers.ServiceAuth > {
|
|
278
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
279
|
+
base.WebApiBase.SetPending(options);
|
|
280
|
+
return new Promise< carriers.ServiceAuth >(async (resolve, reject) => {
|
|
281
|
+
try {
|
|
282
|
+
const response = await this._axios.post("CreateDefaultServiceAuth", null, config);
|
|
283
|
+
base.WebApiBase.SetCompleted(options);
|
|
284
|
+
const res : carriers.ServiceAuth = converters.Create_ServiceAuth_From( response.data );
|
|
285
|
+
resolve(res);
|
|
286
|
+
}
|
|
287
|
+
catch( err ) {
|
|
288
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
289
|
+
reject(err);
|
|
290
|
+
}
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
/*
|
|
294
|
+
* Replace the existing ServiceAuth or creates a new ServiceAuth if the id parameter is empty
|
|
295
|
+
* @param entity - The ServiceAuth to be saved.
|
|
296
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
297
|
+
* @returns New or updated ServiceAuth
|
|
298
|
+
*/
|
|
299
|
+
public async saveServiceAuthAsync(entity: carriers.ServiceAuth, options?:base.WebApiRequestOptions) : Promise< carriers.ServiceAuth > {
|
|
300
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
301
|
+
base.WebApiBase.SetPending(options);
|
|
302
|
+
return new Promise< carriers.ServiceAuth >(async (resolve, reject) => {
|
|
303
|
+
try {
|
|
304
|
+
const response = await this._axios.post("SaveServiceAuth", entity, config);
|
|
305
|
+
base.WebApiBase.SetCompleted(options);
|
|
306
|
+
const res : carriers.ServiceAuth = converters.Create_ServiceAuth_From( response.data );
|
|
307
|
+
resolve(res);
|
|
308
|
+
}
|
|
309
|
+
catch( err ) {
|
|
310
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
311
|
+
reject(err);
|
|
312
|
+
}
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
/*
|
|
317
|
+
* Deletes the ServiceAuth
|
|
318
|
+
* @param ServiceAuthId - The id of the ServiceAuth to be deleted.
|
|
319
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
320
|
+
*/
|
|
321
|
+
public async deleteServiceAuthAsync(ServiceAuthId: number, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
322
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
323
|
+
base.WebApiBase.SetPending(options);
|
|
324
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
325
|
+
try {
|
|
326
|
+
const response = await this._axios.post("DeleteServiceAuth?ServiceAuthId=" + ServiceAuthId, null, config );
|
|
327
|
+
base.WebApiBase.SetCompleted(options);
|
|
328
|
+
const res = response.data;
|
|
329
|
+
resolve(res);
|
|
330
|
+
}
|
|
331
|
+
catch( err ) {
|
|
332
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
333
|
+
reject(err);
|
|
334
|
+
}
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* Set default values into a new UntrustedCredentials.
|
|
340
|
+
* NetServer calculates default values on the entity, which is required when creating/storing a new instance
|
|
341
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
342
|
+
* @returns A blank entity.
|
|
343
|
+
*/
|
|
344
|
+
public async createDefaultUntrustedCredentialsAsync(options?:base.WebApiRequestOptions) : Promise< carriers.UntrustedCredentials > {
|
|
345
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
346
|
+
base.WebApiBase.SetPending(options);
|
|
347
|
+
return new Promise< carriers.UntrustedCredentials >(async (resolve, reject) => {
|
|
348
|
+
try {
|
|
349
|
+
const response = await this._axios.post("CreateDefaultUntrustedCredentials", null, config);
|
|
350
|
+
base.WebApiBase.SetCompleted(options);
|
|
351
|
+
const res : carriers.UntrustedCredentials = converters.Create_UntrustedCredentials_From( response.data );
|
|
352
|
+
resolve(res);
|
|
353
|
+
}
|
|
354
|
+
catch( err ) {
|
|
355
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
356
|
+
reject(err);
|
|
357
|
+
}
|
|
358
|
+
});
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* Set default values into a new User.
|
|
363
|
+
* NetServer calculates default values on the entity, which is required when creating/storing a new instance
|
|
364
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
365
|
+
* @returns A blank entity.
|
|
366
|
+
*/
|
|
367
|
+
public async createDefaultUserAsync(options?:base.WebApiRequestOptions) : Promise< carriers.User > {
|
|
368
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
369
|
+
base.WebApiBase.SetPending(options);
|
|
370
|
+
return new Promise< carriers.User >(async (resolve, reject) => {
|
|
371
|
+
try {
|
|
372
|
+
const response = await this._axios.post("CreateDefaultUser", null, config);
|
|
373
|
+
base.WebApiBase.SetCompleted(options);
|
|
374
|
+
const res : carriers.User = converters.Create_User_From( response.data );
|
|
375
|
+
resolve(res);
|
|
376
|
+
}
|
|
377
|
+
catch( err ) {
|
|
378
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
379
|
+
reject(err);
|
|
380
|
+
}
|
|
381
|
+
});
|
|
382
|
+
}
|
|
383
|
+
/*
|
|
384
|
+
* Replace the existing User or creates a new User if the id parameter is empty
|
|
385
|
+
* @param entity - The User to be saved.
|
|
386
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
387
|
+
* @returns New or updated User
|
|
388
|
+
*/
|
|
389
|
+
public async saveUserAsync(entity: carriers.User, options?:base.WebApiRequestOptions) : Promise< carriers.User > {
|
|
390
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
391
|
+
base.WebApiBase.SetPending(options);
|
|
392
|
+
return new Promise< carriers.User >(async (resolve, reject) => {
|
|
393
|
+
try {
|
|
394
|
+
const response = await this._axios.post("SaveUser", entity, config);
|
|
395
|
+
base.WebApiBase.SetCompleted(options);
|
|
396
|
+
const res : carriers.User = converters.Create_User_From( response.data );
|
|
397
|
+
resolve(res);
|
|
398
|
+
}
|
|
399
|
+
catch( err ) {
|
|
400
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
401
|
+
reject(err);
|
|
402
|
+
}
|
|
403
|
+
});
|
|
404
|
+
}
|
|
405
|
+
/*
|
|
406
|
+
* Get registered custom commands for User
|
|
407
|
+
* @param request - The User entity to get commands for.
|
|
408
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
409
|
+
* @returns Custom commands for the requested User.
|
|
410
|
+
*/
|
|
411
|
+
public async getUserCommandsAsync(request: carriers.GetUserCommandsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.CustomCommand[] > {
|
|
412
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
413
|
+
base.WebApiBase.SetPending(options);
|
|
414
|
+
return new Promise< carriers.CustomCommand[] >(async (resolve, reject) => {
|
|
415
|
+
try {
|
|
416
|
+
const response = await this._axios.post("GetUserCommands", request, config);
|
|
417
|
+
base.WebApiBase.SetCompleted(options);
|
|
418
|
+
const res : carriers.CustomCommand[] = converters.Create_CustomCommandArray_From( response.data );
|
|
419
|
+
resolve(res);
|
|
420
|
+
}
|
|
421
|
+
catch( err ) {
|
|
422
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
423
|
+
reject(err);
|
|
424
|
+
}
|
|
425
|
+
});
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
/*
|
|
429
|
+
* Executes the custom command for User
|
|
430
|
+
* @param request - The name of the command to execute. The User to execute commands on.
|
|
431
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
432
|
+
* @returns Result of the executed command: Success + Message + CommandActionResult
|
|
433
|
+
*/
|
|
434
|
+
public async ExecuteUserCommandAsync(request: carriers.ExecuteUserCommandRequest, options?:base.WebApiRequestOptions ) : Promise< carriers.CommandResult > {
|
|
435
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
436
|
+
base.WebApiBase.SetPending(options);
|
|
437
|
+
return new Promise< carriers.CommandResult >(async (resolve, reject) => {
|
|
438
|
+
try {
|
|
439
|
+
const response = await this._axios.post("ExecuteUserCommand", request, config);
|
|
440
|
+
base.WebApiBase.SetCompleted(options);
|
|
441
|
+
const res : carriers.CommandResult = converters.Create_CommandResult_From( response.data );
|
|
442
|
+
resolve(res);
|
|
443
|
+
}
|
|
444
|
+
catch( err ) {
|
|
445
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
446
|
+
reject(err);
|
|
447
|
+
}
|
|
448
|
+
});
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
/*
|
|
452
|
+
* Deletes the User
|
|
453
|
+
* @param UserId - The id of the User to be deleted.
|
|
454
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
455
|
+
*/
|
|
456
|
+
public async deleteUserAsync(UserId: number, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
457
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
458
|
+
base.WebApiBase.SetPending(options);
|
|
459
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
460
|
+
try {
|
|
461
|
+
const response = await this._axios.post("DeleteUser?UserId=" + UserId, null, config );
|
|
462
|
+
base.WebApiBase.SetCompleted(options);
|
|
463
|
+
const res = response.data;
|
|
464
|
+
resolve(res);
|
|
465
|
+
}
|
|
466
|
+
catch( err ) {
|
|
467
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
468
|
+
reject(err);
|
|
469
|
+
}
|
|
470
|
+
});
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
private async _getAccessGatewayInfoAsync( options?:base.WebApiRequestOptions) : Promise< carriers.AccessGatewayInfo > {
|
|
474
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
475
|
+
base.WebApiBase.SetPending(options);
|
|
476
|
+
return new Promise< carriers.AccessGatewayInfo >(async (resolve, reject) => {
|
|
477
|
+
try {
|
|
478
|
+
config.baseURL = this._options.baseUrl;
|
|
479
|
+
const response = await this._axios.post("GetAccessGatewayInfo", undefined , config);
|
|
480
|
+
base.WebApiBase.SetCompleted(options);
|
|
481
|
+
const res : carriers.AccessGatewayInfo = converters.Create_AccessGatewayInfo_From( response.data );
|
|
482
|
+
resolve(res);
|
|
483
|
+
}
|
|
484
|
+
catch( err ) {
|
|
485
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
486
|
+
reject(err);
|
|
487
|
+
}
|
|
488
|
+
});
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
|
|
492
|
+
/**
|
|
493
|
+
* Returns accessgateway registration info
|
|
494
|
+
* @returns
|
|
495
|
+
*/
|
|
496
|
+
public async getAccessGatewayInfoAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.AccessGatewayInfo >
|
|
497
|
+
{
|
|
498
|
+
return this._getAccessGatewayInfoAsync(webapi_options);
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
|
|
502
|
+
private async _getOrRegisterAccessGatewayInfoAsync(request: carriers.User_GetOrRegisterAccessGatewayInfoRequest, options?:base.WebApiRequestOptions) : Promise< carriers.AccessGatewayInfo > {
|
|
503
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
504
|
+
base.WebApiBase.SetPending(options);
|
|
505
|
+
return new Promise< carriers.AccessGatewayInfo >(async (resolve, reject) => {
|
|
506
|
+
try {
|
|
507
|
+
config.baseURL = this._options.baseUrl;
|
|
508
|
+
const response = await this._axios.post("GetOrRegisterAccessGatewayInfo", request , config);
|
|
509
|
+
base.WebApiBase.SetCompleted(options);
|
|
510
|
+
const res : carriers.AccessGatewayInfo = converters.Create_AccessGatewayInfo_From( response.data );
|
|
511
|
+
resolve(res);
|
|
512
|
+
}
|
|
513
|
+
catch( err ) {
|
|
514
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
515
|
+
reject(err);
|
|
516
|
+
}
|
|
517
|
+
});
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
|
|
521
|
+
|
|
522
|
+
/**
|
|
523
|
+
* Returns accessgateway registration info and registers a new or adds the url if necessary
|
|
524
|
+
* @param request - RedirectUri
|
|
525
|
+
* @returns
|
|
526
|
+
*/
|
|
527
|
+
public async getOrRegisterAccessGatewayInfoAsync(request: carriers.User_GetOrRegisterAccessGatewayInfoRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.AccessGatewayInfo >;
|
|
528
|
+
|
|
529
|
+
/**
|
|
530
|
+
* Returns accessgateway registration info and registers a new or adds the url if necessary
|
|
531
|
+
* @param redirectUri - This is the registered redirect_uri for AccessGateway OIDC.
|
|
532
|
+
* @returns
|
|
533
|
+
*/
|
|
534
|
+
public async getOrRegisterAccessGatewayInfoAsync(redirectUri: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.AccessGatewayInfo >;
|
|
535
|
+
|
|
536
|
+
public async getOrRegisterAccessGatewayInfoAsync(redirectUri:string|carriers.User_GetOrRegisterAccessGatewayInfoRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.AccessGatewayInfo > {
|
|
537
|
+
let _request : carriers.User_GetOrRegisterAccessGatewayInfoRequest = null;
|
|
538
|
+
let _options : base.WebApiRequestOptions = null;
|
|
539
|
+
const first : any = redirectUri;
|
|
540
|
+
if( typeof( first ) === "object" && first && ( typeof(first.redirectUri)!='undefined' ) )
|
|
541
|
+
{
|
|
542
|
+
_request = redirectUri as carriers.User_GetOrRegisterAccessGatewayInfoRequest;
|
|
543
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
544
|
+
}
|
|
545
|
+
else
|
|
546
|
+
{
|
|
547
|
+
_request = {
|
|
548
|
+
redirectUri: redirectUri as string,
|
|
549
|
+
};
|
|
550
|
+
_options = webapi_options;
|
|
551
|
+
}
|
|
552
|
+
return this._getOrRegisterAccessGatewayInfoAsync( _request, _options );
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
|
|
556
|
+
private async _registerWithAccessGatewayAsync(request: carriers.User_RegisterWithAccessGatewayRequest, options?:base.WebApiRequestOptions) : Promise< carriers.AccessGatewayInfo > {
|
|
557
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
558
|
+
base.WebApiBase.SetPending(options);
|
|
559
|
+
return new Promise< carriers.AccessGatewayInfo >(async (resolve, reject) => {
|
|
560
|
+
try {
|
|
561
|
+
config.baseURL = this._options.baseUrl;
|
|
562
|
+
const response = await this._axios.post("RegisterWithAccessGateway", request , config);
|
|
563
|
+
base.WebApiBase.SetCompleted(options);
|
|
564
|
+
const res : carriers.AccessGatewayInfo = converters.Create_AccessGatewayInfo_From( response.data );
|
|
565
|
+
resolve(res);
|
|
566
|
+
}
|
|
567
|
+
catch( err ) {
|
|
568
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
569
|
+
reject(err);
|
|
570
|
+
}
|
|
571
|
+
});
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
|
|
575
|
+
|
|
576
|
+
/**
|
|
577
|
+
* Registers with access gateway if not already done, otherwise will attempt to update
|
|
578
|
+
* @param request - RedirectUri
|
|
579
|
+
* @returns
|
|
580
|
+
*/
|
|
581
|
+
public async registerWithAccessGatewayAsync(request: carriers.User_RegisterWithAccessGatewayRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.AccessGatewayInfo >;
|
|
582
|
+
|
|
583
|
+
/**
|
|
584
|
+
* Registers with access gateway if not already done, otherwise will attempt to update
|
|
585
|
+
* @param redirectUri - This is the registered redirect_uri for AccessGateway OIDC.
|
|
586
|
+
* @returns
|
|
587
|
+
*/
|
|
588
|
+
public async registerWithAccessGatewayAsync(redirectUri: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.AccessGatewayInfo >;
|
|
589
|
+
|
|
590
|
+
public async registerWithAccessGatewayAsync(redirectUri:string|carriers.User_RegisterWithAccessGatewayRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.AccessGatewayInfo > {
|
|
591
|
+
let _request : carriers.User_RegisterWithAccessGatewayRequest = null;
|
|
592
|
+
let _options : base.WebApiRequestOptions = null;
|
|
593
|
+
const first : any = redirectUri;
|
|
594
|
+
if( typeof( first ) === "object" && first && ( typeof(first.redirectUri)!='undefined' ) )
|
|
595
|
+
{
|
|
596
|
+
_request = redirectUri as carriers.User_RegisterWithAccessGatewayRequest;
|
|
597
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
598
|
+
}
|
|
599
|
+
else
|
|
600
|
+
{
|
|
601
|
+
_request = {
|
|
602
|
+
redirectUri: redirectUri as string,
|
|
603
|
+
};
|
|
604
|
+
_options = webapi_options;
|
|
605
|
+
}
|
|
606
|
+
return this._registerWithAccessGatewayAsync( _request, _options );
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
|
|
610
|
+
private async _checkAccessGatewayRegistrationAsync( options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
611
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
612
|
+
base.WebApiBase.SetPending(options);
|
|
613
|
+
return new Promise< boolean >(async (resolve, reject) => {
|
|
614
|
+
try {
|
|
615
|
+
config.baseURL = this._options.baseUrl;
|
|
616
|
+
const response = await this._axios.post("CheckAccessGatewayRegistration", undefined , config);
|
|
617
|
+
base.WebApiBase.SetCompleted(options);
|
|
618
|
+
const res : boolean = response.data as boolean;
|
|
619
|
+
resolve(res);
|
|
620
|
+
}
|
|
621
|
+
catch( err ) {
|
|
622
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
623
|
+
reject(err);
|
|
624
|
+
}
|
|
625
|
+
});
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
|
|
629
|
+
/**
|
|
630
|
+
* Checks if AccessGatewayRegistration is valid
|
|
631
|
+
* @returns True if the registration is usable
|
|
632
|
+
*/
|
|
633
|
+
public async checkAccessGatewayRegistrationAsync(webapi_options?:base.WebApiRequestOptions) : Promise< boolean >
|
|
634
|
+
{
|
|
635
|
+
return this._checkAccessGatewayRegistrationAsync(webapi_options);
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
|
|
639
|
+
private async _saveCredentialAsync(request: carriers.User_SaveCredentialRequest, options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
640
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
641
|
+
base.WebApiBase.SetPending(options);
|
|
642
|
+
return new Promise< boolean >(async (resolve, reject) => {
|
|
643
|
+
try {
|
|
644
|
+
config.baseURL = this._options.baseUrl;
|
|
645
|
+
const response = await this._axios.post("SaveCredential", request , config);
|
|
646
|
+
base.WebApiBase.SetCompleted(options);
|
|
647
|
+
const res : boolean = response.data as boolean;
|
|
648
|
+
resolve(res);
|
|
649
|
+
}
|
|
650
|
+
catch( err ) {
|
|
651
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
652
|
+
reject(err);
|
|
653
|
+
}
|
|
654
|
+
});
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
|
|
658
|
+
|
|
659
|
+
/**
|
|
660
|
+
* Save (adds/replaces) current credential of the same type for the user.
|
|
661
|
+
* @param request - UserId, Credential
|
|
662
|
+
* @returns True if the credential was successfully saved.
|
|
663
|
+
*/
|
|
664
|
+
public async saveCredentialAsync(request: carriers.User_SaveCredentialRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
665
|
+
|
|
666
|
+
/**
|
|
667
|
+
* Save (adds/replaces) current credential of the same type for the user.
|
|
668
|
+
* @param userId - Primary key of the user (i.e. associate)
|
|
669
|
+
* @param credential - Credentials supported for authentication
|
|
670
|
+
* @returns True if the credential was successfully saved.
|
|
671
|
+
*/
|
|
672
|
+
public async saveCredentialAsync(userId: number, credential: carriers.Credential, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
673
|
+
|
|
674
|
+
public async saveCredentialAsync(userId:number|carriers.User_SaveCredentialRequest, credential?:carriers.Credential|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
675
|
+
let _request : carriers.User_SaveCredentialRequest = null;
|
|
676
|
+
let _options : base.WebApiRequestOptions = null;
|
|
677
|
+
const first : any = userId;
|
|
678
|
+
if( typeof( first ) === "object" && first && ( typeof(first.userId)!='undefined' || typeof(first.credential)!='undefined' ) )
|
|
679
|
+
{
|
|
680
|
+
_request = userId as carriers.User_SaveCredentialRequest;
|
|
681
|
+
_options = credential as base.WebApiRequestOptions;
|
|
682
|
+
}
|
|
683
|
+
else
|
|
684
|
+
{
|
|
685
|
+
_request = {
|
|
686
|
+
userId: userId as number,
|
|
687
|
+
credential: credential as carriers.Credential,
|
|
688
|
+
};
|
|
689
|
+
_options = webapi_options;
|
|
690
|
+
}
|
|
691
|
+
return this._saveCredentialAsync( _request, _options );
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
|
|
695
|
+
private async _deleteCredentialAsync(request: carriers.User_DeleteCredentialRequest, options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
696
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
697
|
+
base.WebApiBase.SetPending(options);
|
|
698
|
+
return new Promise< boolean >(async (resolve, reject) => {
|
|
699
|
+
try {
|
|
700
|
+
config.baseURL = this._options.baseUrl;
|
|
701
|
+
const response = await this._axios.post("DeleteCredential", request , config);
|
|
702
|
+
base.WebApiBase.SetCompleted(options);
|
|
703
|
+
const res : boolean = response.data as boolean;
|
|
704
|
+
resolve(res);
|
|
705
|
+
}
|
|
706
|
+
catch( err ) {
|
|
707
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
708
|
+
reject(err);
|
|
709
|
+
}
|
|
710
|
+
});
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
|
|
714
|
+
|
|
715
|
+
/**
|
|
716
|
+
* Remove credential of a specific type for a user
|
|
717
|
+
* @param request - UserId, CredentialType
|
|
718
|
+
* @returns True if credential was sucessfully removed.
|
|
719
|
+
*/
|
|
720
|
+
public async deleteCredentialAsync(request: carriers.User_DeleteCredentialRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
721
|
+
|
|
722
|
+
/**
|
|
723
|
+
* Remove credential of a specific type for a user
|
|
724
|
+
* @param userId - Primary key of the user (i.e. associate)
|
|
725
|
+
* @param credentialType - Type of credentials, corresponding to name of plugin and type in the credentials table
|
|
726
|
+
* @returns True if credential was sucessfully removed.
|
|
727
|
+
*/
|
|
728
|
+
public async deleteCredentialAsync(userId: number, credentialType: string, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
729
|
+
|
|
730
|
+
public async deleteCredentialAsync(userId:number|carriers.User_DeleteCredentialRequest, credentialType?:string|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
731
|
+
let _request : carriers.User_DeleteCredentialRequest = null;
|
|
732
|
+
let _options : base.WebApiRequestOptions = null;
|
|
733
|
+
const first : any = userId;
|
|
734
|
+
if( typeof( first ) === "object" && first && ( typeof(first.userId)!='undefined' || typeof(first.credentialType)!='undefined' ) )
|
|
735
|
+
{
|
|
736
|
+
_request = userId as carriers.User_DeleteCredentialRequest;
|
|
737
|
+
_options = credentialType as base.WebApiRequestOptions;
|
|
738
|
+
}
|
|
739
|
+
else
|
|
740
|
+
{
|
|
741
|
+
_request = {
|
|
742
|
+
userId: userId as number,
|
|
743
|
+
credentialType: credentialType as string,
|
|
744
|
+
};
|
|
745
|
+
_options = webapi_options;
|
|
746
|
+
}
|
|
747
|
+
return this._deleteCredentialAsync( _request, _options );
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
|
|
751
|
+
private async _findCredentialsGroupsAsync(request: carriers.User_FindCredentialsGroupsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.CredentialsGroup[] > {
|
|
752
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
753
|
+
base.WebApiBase.SetPending(options);
|
|
754
|
+
return new Promise< carriers.CredentialsGroup[] >(async (resolve, reject) => {
|
|
755
|
+
try {
|
|
756
|
+
config.baseURL = this._options.baseUrl;
|
|
757
|
+
const response = await this._axios.post("FindCredentialsGroups", request , config);
|
|
758
|
+
base.WebApiBase.SetCompleted(options);
|
|
759
|
+
const res : carriers.CredentialsGroup[] = converters.Create_CredentialsGroupArray_From( response.data );
|
|
760
|
+
resolve(res);
|
|
761
|
+
}
|
|
762
|
+
catch( err ) {
|
|
763
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
764
|
+
reject(err);
|
|
765
|
+
}
|
|
766
|
+
});
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
|
|
770
|
+
|
|
771
|
+
/**
|
|
772
|
+
* Get user groups holding users filtered by the searchString. This method is only relevant if the CredentialType control is of type link. There will allways be at least one groups even if the underlying provider does not support groups.
|
|
773
|
+
* @param request - Type, SearchString
|
|
774
|
+
* @returns
|
|
775
|
+
*/
|
|
776
|
+
public async findCredentialsGroupsAsync(request: carriers.User_FindCredentialsGroupsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CredentialsGroup[] >;
|
|
777
|
+
|
|
778
|
+
/**
|
|
779
|
+
* Get user groups holding users filtered by the searchString. This method is only relevant if the CredentialType control is of type link. There will allways be at least one groups even if the underlying provider does not support groups.
|
|
780
|
+
* @param type - Type of credentials, corresponding to name of plugin and type in the credentials table.
|
|
781
|
+
* @param searchString - Partly name of domain group.
|
|
782
|
+
* @returns
|
|
783
|
+
*/
|
|
784
|
+
public async findCredentialsGroupsAsync(type: string, searchString: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CredentialsGroup[] >;
|
|
785
|
+
|
|
786
|
+
public async findCredentialsGroupsAsync(type:string|carriers.User_FindCredentialsGroupsRequest, searchString?:string|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CredentialsGroup[] > {
|
|
787
|
+
let _request : carriers.User_FindCredentialsGroupsRequest = null;
|
|
788
|
+
let _options : base.WebApiRequestOptions = null;
|
|
789
|
+
const first : any = type;
|
|
790
|
+
if( typeof( first ) === "object" && first && ( typeof(first.type)!='undefined' || typeof(first.searchString)!='undefined' ) )
|
|
791
|
+
{
|
|
792
|
+
_request = type as carriers.User_FindCredentialsGroupsRequest;
|
|
793
|
+
_options = searchString as base.WebApiRequestOptions;
|
|
794
|
+
}
|
|
795
|
+
else
|
|
796
|
+
{
|
|
797
|
+
_request = {
|
|
798
|
+
type: type as string,
|
|
799
|
+
searchString: searchString as string,
|
|
800
|
+
};
|
|
801
|
+
_options = webapi_options;
|
|
802
|
+
}
|
|
803
|
+
return this._findCredentialsGroupsAsync( _request, _options );
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
|
|
807
|
+
private async _findCredentialUsersAsync(request: carriers.User_FindCredentialUsersRequest, options?:base.WebApiRequestOptions) : Promise< carriers.CredentialsGroupUsers > {
|
|
808
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
809
|
+
base.WebApiBase.SetPending(options);
|
|
810
|
+
return new Promise< carriers.CredentialsGroupUsers >(async (resolve, reject) => {
|
|
811
|
+
try {
|
|
812
|
+
config.baseURL = this._options.baseUrl;
|
|
813
|
+
const response = await this._axios.post("FindCredentialUsers", request , config);
|
|
814
|
+
base.WebApiBase.SetCompleted(options);
|
|
815
|
+
const res : carriers.CredentialsGroupUsers = converters.Create_CredentialsGroupUsers_From( response.data );
|
|
816
|
+
resolve(res);
|
|
817
|
+
}
|
|
818
|
+
catch( err ) {
|
|
819
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
820
|
+
reject(err);
|
|
821
|
+
}
|
|
822
|
+
});
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
|
|
826
|
+
|
|
827
|
+
/**
|
|
828
|
+
* Find users matching the partial name.
|
|
829
|
+
* @param request - Type, SearchString
|
|
830
|
+
* @returns
|
|
831
|
+
*/
|
|
832
|
+
public async findCredentialUsersAsync(request: carriers.User_FindCredentialUsersRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CredentialsGroupUsers >;
|
|
833
|
+
|
|
834
|
+
/**
|
|
835
|
+
* Find users matching the partial name.
|
|
836
|
+
* @param type - Type of credentials, corresponding to name of plugin and type in the credentials table.
|
|
837
|
+
* @param searchString - Partly name of the user group
|
|
838
|
+
* @returns
|
|
839
|
+
*/
|
|
840
|
+
public async findCredentialUsersAsync(type: string, searchString: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CredentialsGroupUsers >;
|
|
841
|
+
|
|
842
|
+
public async findCredentialUsersAsync(type:string|carriers.User_FindCredentialUsersRequest, searchString?:string|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CredentialsGroupUsers > {
|
|
843
|
+
let _request : carriers.User_FindCredentialUsersRequest = null;
|
|
844
|
+
let _options : base.WebApiRequestOptions = null;
|
|
845
|
+
const first : any = type;
|
|
846
|
+
if( typeof( first ) === "object" && first && ( typeof(first.type)!='undefined' || typeof(first.searchString)!='undefined' ) )
|
|
847
|
+
{
|
|
848
|
+
_request = type as carriers.User_FindCredentialUsersRequest;
|
|
849
|
+
_options = searchString as base.WebApiRequestOptions;
|
|
850
|
+
}
|
|
851
|
+
else
|
|
852
|
+
{
|
|
853
|
+
_request = {
|
|
854
|
+
type: type as string,
|
|
855
|
+
searchString: searchString as string,
|
|
856
|
+
};
|
|
857
|
+
_options = webapi_options;
|
|
858
|
+
}
|
|
859
|
+
return this._findCredentialUsersAsync( _request, _options );
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
|
|
863
|
+
private async _getCredentialUsersInGroupAsync(request: carriers.User_GetCredentialUsersInGroupRequest, options?:base.WebApiRequestOptions) : Promise< carriers.CredentialsGroupUsers > {
|
|
864
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
865
|
+
base.WebApiBase.SetPending(options);
|
|
866
|
+
return new Promise< carriers.CredentialsGroupUsers >(async (resolve, reject) => {
|
|
867
|
+
try {
|
|
868
|
+
config.baseURL = this._options.baseUrl;
|
|
869
|
+
const response = await this._axios.post("GetCredentialUsersInGroup", request , config);
|
|
870
|
+
base.WebApiBase.SetCompleted(options);
|
|
871
|
+
const res : carriers.CredentialsGroupUsers = converters.Create_CredentialsGroupUsers_From( response.data );
|
|
872
|
+
resolve(res);
|
|
873
|
+
}
|
|
874
|
+
catch( err ) {
|
|
875
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
876
|
+
reject(err);
|
|
877
|
+
}
|
|
878
|
+
});
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
|
|
882
|
+
|
|
883
|
+
/**
|
|
884
|
+
* Get credential users within a user group
|
|
885
|
+
* @param request - Type, GroupName
|
|
886
|
+
* @returns
|
|
887
|
+
*/
|
|
888
|
+
public async getCredentialUsersInGroupAsync(request: carriers.User_GetCredentialUsersInGroupRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CredentialsGroupUsers >;
|
|
889
|
+
|
|
890
|
+
/**
|
|
891
|
+
* Get credential users within a user group
|
|
892
|
+
* @param type - Type of credentials, corresponding to name of plugin and type in the credentials table.
|
|
893
|
+
* @param groupName - Name of user group needed to discover the users.
|
|
894
|
+
* @returns
|
|
895
|
+
*/
|
|
896
|
+
public async getCredentialUsersInGroupAsync(type: string, groupName: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CredentialsGroupUsers >;
|
|
897
|
+
|
|
898
|
+
public async getCredentialUsersInGroupAsync(type:string|carriers.User_GetCredentialUsersInGroupRequest, groupName?:string|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CredentialsGroupUsers > {
|
|
899
|
+
let _request : carriers.User_GetCredentialUsersInGroupRequest = null;
|
|
900
|
+
let _options : base.WebApiRequestOptions = null;
|
|
901
|
+
const first : any = type;
|
|
902
|
+
if( typeof( first ) === "object" && first && ( typeof(first.type)!='undefined' || typeof(first.groupName)!='undefined' ) )
|
|
903
|
+
{
|
|
904
|
+
_request = type as carriers.User_GetCredentialUsersInGroupRequest;
|
|
905
|
+
_options = groupName as base.WebApiRequestOptions;
|
|
906
|
+
}
|
|
907
|
+
else
|
|
908
|
+
{
|
|
909
|
+
_request = {
|
|
910
|
+
type: type as string,
|
|
911
|
+
groupName: groupName as string,
|
|
912
|
+
};
|
|
913
|
+
_options = webapi_options;
|
|
914
|
+
}
|
|
915
|
+
return this._getCredentialUsersInGroupAsync( _request, _options );
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
/*
|
|
919
|
+
* Gets a Role object.
|
|
920
|
+
* @param roleId - The primary key.
|
|
921
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
922
|
+
* @returns A single Role
|
|
923
|
+
*/
|
|
924
|
+
public async getRoleAsync(roleId: number, options?:base.WebApiRequestOptions) : Promise< carriers.Role > {
|
|
925
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
926
|
+
base.WebApiBase.SetPending(options);
|
|
927
|
+
return new Promise< carriers.Role >(async (resolve, reject) => {
|
|
928
|
+
try {
|
|
929
|
+
const response = await this._axios.post("GetRole?roleId=" + roleId, null, config);
|
|
930
|
+
base.WebApiBase.SetCompleted(options);
|
|
931
|
+
const res = converters.Create_Role_From( response.data );
|
|
932
|
+
resolve(res);
|
|
933
|
+
}
|
|
934
|
+
catch( err ) {
|
|
935
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
936
|
+
reject(err);
|
|
937
|
+
}
|
|
938
|
+
});
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
/*
|
|
942
|
+
* Gets a RoleEntity object.
|
|
943
|
+
* @param roleEntityId - The primary key.
|
|
944
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
945
|
+
* @returns A single RoleEntity
|
|
946
|
+
*/
|
|
947
|
+
public async getRoleEntityAsync(roleEntityId: number, options?:base.WebApiRequestOptions) : Promise< carriers.RoleEntity > {
|
|
948
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
949
|
+
base.WebApiBase.SetPending(options);
|
|
950
|
+
return new Promise< carriers.RoleEntity >(async (resolve, reject) => {
|
|
951
|
+
try {
|
|
952
|
+
const response = await this._axios.post("GetRoleEntity?roleEntityId=" + roleEntityId, null, config);
|
|
953
|
+
base.WebApiBase.SetCompleted(options);
|
|
954
|
+
const res = converters.Create_RoleEntity_From( response.data );
|
|
955
|
+
resolve(res);
|
|
956
|
+
}
|
|
957
|
+
catch( err ) {
|
|
958
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
959
|
+
reject(err);
|
|
960
|
+
}
|
|
961
|
+
});
|
|
962
|
+
}
|
|
963
|
+
|
|
964
|
+
|
|
965
|
+
private async _deleteRoleAsync(request: carriers.User_DeleteRoleRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
966
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
967
|
+
base.WebApiBase.SetPending(options);
|
|
968
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
969
|
+
try {
|
|
970
|
+
config.baseURL = this._options.baseUrl;
|
|
971
|
+
const response = await this._axios.post("DeleteRole", request , config);
|
|
972
|
+
base.WebApiBase.SetCompleted(options);
|
|
973
|
+
const res = response.data;
|
|
974
|
+
resolve(res);
|
|
975
|
+
}
|
|
976
|
+
catch( err ) {
|
|
977
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
978
|
+
reject(err);
|
|
979
|
+
}
|
|
980
|
+
});
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
|
|
984
|
+
|
|
985
|
+
/**
|
|
986
|
+
* Delete the specified role and move all users associated with the role to the replacingRoleId
|
|
987
|
+
* @param request - RoleIdToDelete, ReplacingRoleId
|
|
988
|
+
* @returns
|
|
989
|
+
*/
|
|
990
|
+
public async deleteRoleAsync(request: carriers.User_DeleteRoleRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
991
|
+
|
|
992
|
+
/**
|
|
993
|
+
* Delete the specified role and move all users associated with the role to the replacingRoleId
|
|
994
|
+
* @param roleIdToDelete - The roleId to delete
|
|
995
|
+
* @param replacingRoleId - The roleId which all associated users will be moved to.
|
|
996
|
+
* @returns
|
|
997
|
+
*/
|
|
998
|
+
public async deleteRoleAsync(roleIdToDelete: number, replacingRoleId: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
999
|
+
|
|
1000
|
+
public async deleteRoleAsync(roleIdToDelete:number|carriers.User_DeleteRoleRequest, replacingRoleId?:number|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
1001
|
+
let _request : carriers.User_DeleteRoleRequest = null;
|
|
1002
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1003
|
+
const first : any = roleIdToDelete;
|
|
1004
|
+
if( typeof( first ) === "object" && first && ( typeof(first.roleIdToDelete)!='undefined' || typeof(first.replacingRoleId)!='undefined' ) )
|
|
1005
|
+
{
|
|
1006
|
+
_request = roleIdToDelete as carriers.User_DeleteRoleRequest;
|
|
1007
|
+
_options = replacingRoleId as base.WebApiRequestOptions;
|
|
1008
|
+
}
|
|
1009
|
+
else
|
|
1010
|
+
{
|
|
1011
|
+
_request = {
|
|
1012
|
+
roleIdToDelete: roleIdToDelete as number,
|
|
1013
|
+
replacingRoleId: replacingRoleId as number,
|
|
1014
|
+
};
|
|
1015
|
+
_options = webapi_options;
|
|
1016
|
+
}
|
|
1017
|
+
return this._deleteRoleAsync( _request, _options );
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
|
|
1021
|
+
private async _getAllRolesAsync(request: carriers.User_GetAllRolesRequest, options?:base.WebApiRequestOptions) : Promise< carriers.SelectableMDOListItem[] > {
|
|
1022
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1023
|
+
base.WebApiBase.SetPending(options);
|
|
1024
|
+
return new Promise< carriers.SelectableMDOListItem[] >(async (resolve, reject) => {
|
|
1025
|
+
try {
|
|
1026
|
+
config.baseURL = this._options.baseUrl;
|
|
1027
|
+
const response = await this._axios.post("GetAllRoles", request , config);
|
|
1028
|
+
base.WebApiBase.SetCompleted(options);
|
|
1029
|
+
const res : carriers.SelectableMDOListItem[] = converters.Create_SelectableMDOListItemArray_From( response.data );
|
|
1030
|
+
resolve(res);
|
|
1031
|
+
}
|
|
1032
|
+
catch( err ) {
|
|
1033
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1034
|
+
reject(err);
|
|
1035
|
+
}
|
|
1036
|
+
});
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1039
|
+
|
|
1040
|
+
|
|
1041
|
+
/**
|
|
1042
|
+
* Get a list of all roles for the given type of role. MDO List name = 'Roles', extra='0' (roleType)
|
|
1043
|
+
* @param request - RoleType
|
|
1044
|
+
* @returns FunctionRight items with name and description. Code name for function right is in the extra-info property.
|
|
1045
|
+
*/
|
|
1046
|
+
public async getAllRolesAsync(request: carriers.User_GetAllRolesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SelectableMDOListItem[] >;
|
|
1047
|
+
|
|
1048
|
+
/**
|
|
1049
|
+
* Get a list of all roles for the given type of role. MDO List name = 'Roles', extra='0' (roleType)
|
|
1050
|
+
* @param roleType - Type of role (Employee/External/Anonymous/System)
|
|
1051
|
+
* @returns FunctionRight items with name and description. Code name for function right is in the extra-info property.
|
|
1052
|
+
*/
|
|
1053
|
+
public async getAllRolesAsync(roleType: enums.RoleType, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SelectableMDOListItem[] >;
|
|
1054
|
+
|
|
1055
|
+
public async getAllRolesAsync(roleType:enums.RoleType|carriers.User_GetAllRolesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SelectableMDOListItem[] > {
|
|
1056
|
+
let _request : carriers.User_GetAllRolesRequest = null;
|
|
1057
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1058
|
+
const first : any = roleType;
|
|
1059
|
+
if( typeof( first ) === "object" && first && ( typeof(first.roleType)!='undefined' ) )
|
|
1060
|
+
{
|
|
1061
|
+
_request = roleType as carriers.User_GetAllRolesRequest;
|
|
1062
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
1063
|
+
}
|
|
1064
|
+
else
|
|
1065
|
+
{
|
|
1066
|
+
_request = {
|
|
1067
|
+
roleType: roleType as enums.RoleType,
|
|
1068
|
+
};
|
|
1069
|
+
_options = webapi_options;
|
|
1070
|
+
}
|
|
1071
|
+
return this._getAllRolesAsync( _request, _options );
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
|
|
1075
|
+
private async _getAllFunctionalRightsAsync(request: carriers.User_GetAllFunctionalRightsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.SelectableMDOListItem[] > {
|
|
1076
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1077
|
+
base.WebApiBase.SetPending(options);
|
|
1078
|
+
return new Promise< carriers.SelectableMDOListItem[] >(async (resolve, reject) => {
|
|
1079
|
+
try {
|
|
1080
|
+
config.baseURL = this._options.baseUrl;
|
|
1081
|
+
const response = await this._axios.post("GetAllFunctionalRights", request , config);
|
|
1082
|
+
base.WebApiBase.SetCompleted(options);
|
|
1083
|
+
const res : carriers.SelectableMDOListItem[] = converters.Create_SelectableMDOListItemArray_From( response.data );
|
|
1084
|
+
resolve(res);
|
|
1085
|
+
}
|
|
1086
|
+
catch( err ) {
|
|
1087
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1088
|
+
reject(err);
|
|
1089
|
+
}
|
|
1090
|
+
});
|
|
1091
|
+
}
|
|
1092
|
+
|
|
1093
|
+
|
|
1094
|
+
|
|
1095
|
+
/**
|
|
1096
|
+
* Get a list of all functional rights for the given type of role. MDO List name = 'FunctionRights', extra='roleType=0'
|
|
1097
|
+
* @param request - RoleType
|
|
1098
|
+
* @returns FunctionRight items with name and description. Code name for function right is in the extra-info property.
|
|
1099
|
+
*/
|
|
1100
|
+
public async getAllFunctionalRightsAsync(request: carriers.User_GetAllFunctionalRightsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SelectableMDOListItem[] >;
|
|
1101
|
+
|
|
1102
|
+
/**
|
|
1103
|
+
* Get a list of all functional rights for the given type of role. MDO List name = 'FunctionRights', extra='roleType=0'
|
|
1104
|
+
* @param roleType - Type of role (Employee/External/Anonymous/System)
|
|
1105
|
+
* @returns FunctionRight items with name and description. Code name for function right is in the extra-info property.
|
|
1106
|
+
*/
|
|
1107
|
+
public async getAllFunctionalRightsAsync(roleType: enums.RoleType, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SelectableMDOListItem[] >;
|
|
1108
|
+
|
|
1109
|
+
public async getAllFunctionalRightsAsync(roleType:enums.RoleType|carriers.User_GetAllFunctionalRightsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SelectableMDOListItem[] > {
|
|
1110
|
+
let _request : carriers.User_GetAllFunctionalRightsRequest = null;
|
|
1111
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1112
|
+
const first : any = roleType;
|
|
1113
|
+
if( typeof( first ) === "object" && first && ( typeof(first.roleType)!='undefined' ) )
|
|
1114
|
+
{
|
|
1115
|
+
_request = roleType as carriers.User_GetAllFunctionalRightsRequest;
|
|
1116
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
1117
|
+
}
|
|
1118
|
+
else
|
|
1119
|
+
{
|
|
1120
|
+
_request = {
|
|
1121
|
+
roleType: roleType as enums.RoleType,
|
|
1122
|
+
};
|
|
1123
|
+
_options = webapi_options;
|
|
1124
|
+
}
|
|
1125
|
+
return this._getAllFunctionalRightsAsync( _request, _options );
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
|
|
1129
|
+
private async _getFunctionalRightsAsync(request: carriers.User_GetFunctionalRightsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.SelectableMDOListItem[] > {
|
|
1130
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1131
|
+
base.WebApiBase.SetPending(options);
|
|
1132
|
+
return new Promise< carriers.SelectableMDOListItem[] >(async (resolve, reject) => {
|
|
1133
|
+
try {
|
|
1134
|
+
config.baseURL = this._options.baseUrl;
|
|
1135
|
+
const response = await this._axios.post("GetFunctionalRights", request , config);
|
|
1136
|
+
base.WebApiBase.SetCompleted(options);
|
|
1137
|
+
const res : carriers.SelectableMDOListItem[] = converters.Create_SelectableMDOListItemArray_From( response.data );
|
|
1138
|
+
resolve(res);
|
|
1139
|
+
}
|
|
1140
|
+
catch( err ) {
|
|
1141
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1142
|
+
reject(err);
|
|
1143
|
+
}
|
|
1144
|
+
});
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1147
|
+
|
|
1148
|
+
|
|
1149
|
+
/**
|
|
1150
|
+
* Get all functional rights for the given role. Functional rights not set on the role are not included. MDO List name = 'FunctionRights', extra='role=123'
|
|
1151
|
+
* @param request - RoleId
|
|
1152
|
+
* @returns FunctionRight items with name and description. Code name for function right is in the extra-info property.
|
|
1153
|
+
*/
|
|
1154
|
+
public async getFunctionalRightsAsync(request: carriers.User_GetFunctionalRightsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SelectableMDOListItem[] >;
|
|
1155
|
+
|
|
1156
|
+
/**
|
|
1157
|
+
* Get all functional rights for the given role. Functional rights not set on the role are not included. MDO List name = 'FunctionRights', extra='role=123'
|
|
1158
|
+
* @param roleId - The role id to get the functional rights for.
|
|
1159
|
+
* @returns FunctionRight items with name and description. Code name for function right is in the extra-info property.
|
|
1160
|
+
*/
|
|
1161
|
+
public async getFunctionalRightsAsync(roleId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SelectableMDOListItem[] >;
|
|
1162
|
+
|
|
1163
|
+
public async getFunctionalRightsAsync(roleId:number|carriers.User_GetFunctionalRightsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SelectableMDOListItem[] > {
|
|
1164
|
+
let _request : carriers.User_GetFunctionalRightsRequest = null;
|
|
1165
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1166
|
+
const first : any = roleId;
|
|
1167
|
+
if( typeof( first ) === "object" && first && ( typeof(first.roleId)!='undefined' ) )
|
|
1168
|
+
{
|
|
1169
|
+
_request = roleId as carriers.User_GetFunctionalRightsRequest;
|
|
1170
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
1171
|
+
}
|
|
1172
|
+
else
|
|
1173
|
+
{
|
|
1174
|
+
_request = {
|
|
1175
|
+
roleId: roleId as number,
|
|
1176
|
+
};
|
|
1177
|
+
_options = webapi_options;
|
|
1178
|
+
}
|
|
1179
|
+
return this._getFunctionalRightsAsync( _request, _options );
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1182
|
+
|
|
1183
|
+
private async _setFunctionalRightsAsync(request: carriers.User_SetFunctionalRightsRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
1184
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1185
|
+
base.WebApiBase.SetPending(options);
|
|
1186
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
1187
|
+
try {
|
|
1188
|
+
config.baseURL = this._options.baseUrl;
|
|
1189
|
+
const response = await this._axios.post("SetFunctionalRights", request , config);
|
|
1190
|
+
base.WebApiBase.SetCompleted(options);
|
|
1191
|
+
const res = response.data;
|
|
1192
|
+
resolve(res);
|
|
1193
|
+
}
|
|
1194
|
+
catch( err ) {
|
|
1195
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1196
|
+
reject(err);
|
|
1197
|
+
}
|
|
1198
|
+
});
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
|
|
1202
|
+
|
|
1203
|
+
/**
|
|
1204
|
+
* Set all functional rights for the given role. Functional rights not specified here will be removed from the role.
|
|
1205
|
+
* @param request - RoleId, FunctionalRightIds
|
|
1206
|
+
* @returns
|
|
1207
|
+
*/
|
|
1208
|
+
public async setFunctionalRightsAsync(request: carriers.User_SetFunctionalRightsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
1209
|
+
|
|
1210
|
+
/**
|
|
1211
|
+
* Set all functional rights for the given role. Functional rights not specified here will be removed from the role.
|
|
1212
|
+
* @param roleId - The role id to set the functional rights for
|
|
1213
|
+
* @param functionalRightIds - An array of functional rights ids to set for this role. Rights not included here are removed from the role.
|
|
1214
|
+
* @returns
|
|
1215
|
+
*/
|
|
1216
|
+
public async setFunctionalRightsAsync(roleId: number, functionalRightIds: number[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
1217
|
+
|
|
1218
|
+
public async setFunctionalRightsAsync(roleId:number|carriers.User_SetFunctionalRightsRequest, functionalRightIds?:number[]|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
1219
|
+
let _request : carriers.User_SetFunctionalRightsRequest = null;
|
|
1220
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1221
|
+
const first : any = roleId;
|
|
1222
|
+
if( typeof( first ) === "object" && first && ( typeof(first.roleId)!='undefined' || typeof(first.functionalRightIds)!='undefined' ) )
|
|
1223
|
+
{
|
|
1224
|
+
_request = roleId as carriers.User_SetFunctionalRightsRequest;
|
|
1225
|
+
_options = functionalRightIds as base.WebApiRequestOptions;
|
|
1226
|
+
}
|
|
1227
|
+
else
|
|
1228
|
+
{
|
|
1229
|
+
_request = {
|
|
1230
|
+
roleId: roleId as number,
|
|
1231
|
+
functionalRightIds: functionalRightIds as number[],
|
|
1232
|
+
};
|
|
1233
|
+
_options = webapi_options;
|
|
1234
|
+
}
|
|
1235
|
+
return this._setFunctionalRightsAsync( _request, _options );
|
|
1236
|
+
}
|
|
1237
|
+
|
|
1238
|
+
|
|
1239
|
+
private async _setDataRightAsync(request: carriers.User_SetDataRightRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
1240
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1241
|
+
base.WebApiBase.SetPending(options);
|
|
1242
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
1243
|
+
try {
|
|
1244
|
+
config.baseURL = this._options.baseUrl;
|
|
1245
|
+
const response = await this._axios.post("SetDataRight", request , config);
|
|
1246
|
+
base.WebApiBase.SetCompleted(options);
|
|
1247
|
+
const res = response.data;
|
|
1248
|
+
resolve(res);
|
|
1249
|
+
}
|
|
1250
|
+
catch( err ) {
|
|
1251
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1252
|
+
reject(err);
|
|
1253
|
+
}
|
|
1254
|
+
});
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1257
|
+
|
|
1258
|
+
|
|
1259
|
+
/**
|
|
1260
|
+
* Set one specific data right at the given position. An exception will be thrown if non existing position is specified.
|
|
1261
|
+
* @param request - RoleId, TableName, RelationToOwner, DataRightValue
|
|
1262
|
+
* @returns
|
|
1263
|
+
*/
|
|
1264
|
+
public async setDataRightAsync(request: carriers.User_SetDataRightRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
1265
|
+
|
|
1266
|
+
/**
|
|
1267
|
+
* Set one specific data right at the given position. An exception will be thrown if non existing position is specified.
|
|
1268
|
+
* @param roleId - The role id to set the data right for
|
|
1269
|
+
* @param tableName - The name of the entity/table
|
|
1270
|
+
* @param relationToOwner - The id of the relation to owner
|
|
1271
|
+
* @param dataRightValue - The data right value to set at the specified position (CRUD)
|
|
1272
|
+
* @returns
|
|
1273
|
+
*/
|
|
1274
|
+
public async setDataRightAsync(roleId: number, tableName: string, relationToOwner: enums.RoleRelationToOwner, dataRightValue: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
1275
|
+
|
|
1276
|
+
public async setDataRightAsync(roleId:number|carriers.User_SetDataRightRequest, tableName?:string|base.WebApiRequestOptions, relationToOwner?:enums.RoleRelationToOwner, dataRightValue?:string, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
1277
|
+
let _request : carriers.User_SetDataRightRequest = null;
|
|
1278
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1279
|
+
const first : any = roleId;
|
|
1280
|
+
if( typeof( first ) === "object" && first && ( typeof(first.roleId)!='undefined' || typeof(first.tableName)!='undefined' || typeof(first.relationToOwner)!='undefined' || typeof(first.dataRightValue)!='undefined' ) )
|
|
1281
|
+
{
|
|
1282
|
+
_request = roleId as carriers.User_SetDataRightRequest;
|
|
1283
|
+
_options = tableName as base.WebApiRequestOptions;
|
|
1284
|
+
}
|
|
1285
|
+
else
|
|
1286
|
+
{
|
|
1287
|
+
_request = {
|
|
1288
|
+
roleId: roleId as number,
|
|
1289
|
+
tableName: tableName as string,
|
|
1290
|
+
relationToOwner: relationToOwner as enums.RoleRelationToOwner,
|
|
1291
|
+
dataRightValue: dataRightValue as string,
|
|
1292
|
+
};
|
|
1293
|
+
_options = webapi_options;
|
|
1294
|
+
}
|
|
1295
|
+
return this._setDataRightAsync( _request, _options );
|
|
1296
|
+
}
|
|
1297
|
+
|
|
1298
|
+
|
|
1299
|
+
private async _getDataRightAsync(request: carriers.User_GetDataRightRequest, options?:base.WebApiRequestOptions) : Promise< string > {
|
|
1300
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1301
|
+
base.WebApiBase.SetPending(options);
|
|
1302
|
+
return new Promise< string >(async (resolve, reject) => {
|
|
1303
|
+
try {
|
|
1304
|
+
config.baseURL = this._options.baseUrl;
|
|
1305
|
+
const response = await this._axios.post("GetDataRight", request , config);
|
|
1306
|
+
base.WebApiBase.SetCompleted(options);
|
|
1307
|
+
const res : string = response.data as string;
|
|
1308
|
+
resolve(res);
|
|
1309
|
+
}
|
|
1310
|
+
catch( err ) {
|
|
1311
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1312
|
+
reject(err);
|
|
1313
|
+
}
|
|
1314
|
+
});
|
|
1315
|
+
}
|
|
1316
|
+
|
|
1317
|
+
|
|
1318
|
+
|
|
1319
|
+
/**
|
|
1320
|
+
* Read one specific data right at the given position. An exception will be thrown if non existing position is specified.
|
|
1321
|
+
* @param request - RoleId, TableName, RelationToOwner
|
|
1322
|
+
* @returns The data right value at the specified position (C, CR, CRU, or CRUD)
|
|
1323
|
+
*/
|
|
1324
|
+
public async getDataRightAsync(request: carriers.User_GetDataRightRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
1325
|
+
|
|
1326
|
+
/**
|
|
1327
|
+
* Read one specific data right at the given position. An exception will be thrown if non existing position is specified.
|
|
1328
|
+
* @param roleId - The role id to set the data right for
|
|
1329
|
+
* @param tableName - The name of the entity/table
|
|
1330
|
+
* @param relationToOwner - The id of the relation to owner
|
|
1331
|
+
* @returns The data right value at the specified position (C, CR, CRU, or CRUD)
|
|
1332
|
+
*/
|
|
1333
|
+
public async getDataRightAsync(roleId: number, tableName: string, relationToOwner: enums.RoleRelationToOwner, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
1334
|
+
|
|
1335
|
+
public async getDataRightAsync(roleId:number|carriers.User_GetDataRightRequest, tableName?:string|base.WebApiRequestOptions, relationToOwner?:enums.RoleRelationToOwner, webapi_options?:base.WebApiRequestOptions) : Promise< string > {
|
|
1336
|
+
let _request : carriers.User_GetDataRightRequest = null;
|
|
1337
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1338
|
+
const first : any = roleId;
|
|
1339
|
+
if( typeof( first ) === "object" && first && ( typeof(first.roleId)!='undefined' || typeof(first.tableName)!='undefined' || typeof(first.relationToOwner)!='undefined' ) )
|
|
1340
|
+
{
|
|
1341
|
+
_request = roleId as carriers.User_GetDataRightRequest;
|
|
1342
|
+
_options = tableName as base.WebApiRequestOptions;
|
|
1343
|
+
}
|
|
1344
|
+
else
|
|
1345
|
+
{
|
|
1346
|
+
_request = {
|
|
1347
|
+
roleId: roleId as number,
|
|
1348
|
+
tableName: tableName as string,
|
|
1349
|
+
relationToOwner: relationToOwner as enums.RoleRelationToOwner,
|
|
1350
|
+
};
|
|
1351
|
+
_options = webapi_options;
|
|
1352
|
+
}
|
|
1353
|
+
return this._getDataRightAsync( _request, _options );
|
|
1354
|
+
}
|
|
1355
|
+
|
|
1356
|
+
|
|
1357
|
+
private async _getDataRightsAsync(request: carriers.User_GetDataRightsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.StringDictionary > {
|
|
1358
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1359
|
+
base.WebApiBase.SetPending(options);
|
|
1360
|
+
return new Promise< carriers.StringDictionary >(async (resolve, reject) => {
|
|
1361
|
+
try {
|
|
1362
|
+
config.baseURL = this._options.baseUrl;
|
|
1363
|
+
const response = await this._axios.post("GetDataRights", request , config);
|
|
1364
|
+
base.WebApiBase.SetCompleted(options);
|
|
1365
|
+
const res : carriers.StringDictionary = converters.Create_StringDictionary_From( response.data );
|
|
1366
|
+
resolve(res);
|
|
1367
|
+
}
|
|
1368
|
+
catch( err ) {
|
|
1369
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1370
|
+
reject(err);
|
|
1371
|
+
}
|
|
1372
|
+
});
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1375
|
+
|
|
1376
|
+
|
|
1377
|
+
/**
|
|
1378
|
+
* Read specific a set of data rights at the given row in the rights matrix. An exception will be thrown if non existing position is specified.
|
|
1379
|
+
* @param request - RoleId, TableName
|
|
1380
|
+
* @returns The data right values for all the defined relationships (C, CR, CRU, or CRUD)
|
|
1381
|
+
*/
|
|
1382
|
+
public async getDataRightsAsync(request: carriers.User_GetDataRightsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.StringDictionary >;
|
|
1383
|
+
|
|
1384
|
+
/**
|
|
1385
|
+
* Read specific a set of data rights at the given row in the rights matrix. An exception will be thrown if non existing position is specified.
|
|
1386
|
+
* @param roleId - The role id to set the data right for
|
|
1387
|
+
* @param tableName - The name of the entity/table
|
|
1388
|
+
* @returns The data right values for all the defined relationships (C, CR, CRU, or CRUD)
|
|
1389
|
+
*/
|
|
1390
|
+
public async getDataRightsAsync(roleId: number, tableName: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.StringDictionary >;
|
|
1391
|
+
|
|
1392
|
+
public async getDataRightsAsync(roleId:number|carriers.User_GetDataRightsRequest, tableName?:string|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.StringDictionary > {
|
|
1393
|
+
let _request : carriers.User_GetDataRightsRequest = null;
|
|
1394
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1395
|
+
const first : any = roleId;
|
|
1396
|
+
if( typeof( first ) === "object" && first && ( typeof(first.roleId)!='undefined' || typeof(first.tableName)!='undefined' ) )
|
|
1397
|
+
{
|
|
1398
|
+
_request = roleId as carriers.User_GetDataRightsRequest;
|
|
1399
|
+
_options = tableName as base.WebApiRequestOptions;
|
|
1400
|
+
}
|
|
1401
|
+
else
|
|
1402
|
+
{
|
|
1403
|
+
_request = {
|
|
1404
|
+
roleId: roleId as number,
|
|
1405
|
+
tableName: tableName as string,
|
|
1406
|
+
};
|
|
1407
|
+
_options = webapi_options;
|
|
1408
|
+
}
|
|
1409
|
+
return this._getDataRightsAsync( _request, _options );
|
|
1410
|
+
}
|
|
1411
|
+
|
|
1412
|
+
|
|
1413
|
+
private async _createDefaultRoleEntityFromTypeAsync(request: carriers.User_CreateDefaultRoleEntityFromTypeRequest, options?:base.WebApiRequestOptions) : Promise< carriers.RoleEntity > {
|
|
1414
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1415
|
+
base.WebApiBase.SetPending(options);
|
|
1416
|
+
return new Promise< carriers.RoleEntity >(async (resolve, reject) => {
|
|
1417
|
+
try {
|
|
1418
|
+
config.baseURL = this._options.baseUrl;
|
|
1419
|
+
const response = await this._axios.post("CreateDefaultRoleEntityFromType", request , config);
|
|
1420
|
+
base.WebApiBase.SetCompleted(options);
|
|
1421
|
+
const res : carriers.RoleEntity = converters.Create_RoleEntity_From( response.data );
|
|
1422
|
+
resolve(res);
|
|
1423
|
+
}
|
|
1424
|
+
catch( err ) {
|
|
1425
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1426
|
+
reject(err);
|
|
1427
|
+
}
|
|
1428
|
+
});
|
|
1429
|
+
}
|
|
1430
|
+
|
|
1431
|
+
|
|
1432
|
+
|
|
1433
|
+
/**
|
|
1434
|
+
* Create a new role entity of the specified role type. The role type cannot be changed after the entity is created.
|
|
1435
|
+
* @param request - Type
|
|
1436
|
+
* @returns A blank role.
|
|
1437
|
+
*/
|
|
1438
|
+
public async createDefaultRoleEntityFromTypeAsync(request: carriers.User_CreateDefaultRoleEntityFromTypeRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.RoleEntity >;
|
|
1439
|
+
|
|
1440
|
+
/**
|
|
1441
|
+
* Create a new role entity of the specified role type. The role type cannot be changed after the entity is created.
|
|
1442
|
+
* @param type - Type of role (Employee/External/Anonymous/System)
|
|
1443
|
+
* @returns A blank role.
|
|
1444
|
+
*/
|
|
1445
|
+
public async createDefaultRoleEntityFromTypeAsync(type: enums.RoleType, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.RoleEntity >;
|
|
1446
|
+
|
|
1447
|
+
public async createDefaultRoleEntityFromTypeAsync(type:enums.RoleType|carriers.User_CreateDefaultRoleEntityFromTypeRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.RoleEntity > {
|
|
1448
|
+
let _request : carriers.User_CreateDefaultRoleEntityFromTypeRequest = null;
|
|
1449
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1450
|
+
const first : any = type;
|
|
1451
|
+
if( typeof( first ) === "object" && first && ( typeof(first.type)!='undefined' ) )
|
|
1452
|
+
{
|
|
1453
|
+
_request = type as carriers.User_CreateDefaultRoleEntityFromTypeRequest;
|
|
1454
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
1455
|
+
}
|
|
1456
|
+
else
|
|
1457
|
+
{
|
|
1458
|
+
_request = {
|
|
1459
|
+
type: type as enums.RoleType,
|
|
1460
|
+
};
|
|
1461
|
+
_options = webapi_options;
|
|
1462
|
+
}
|
|
1463
|
+
return this._createDefaultRoleEntityFromTypeAsync( _request, _options );
|
|
1464
|
+
}
|
|
1465
|
+
|
|
1466
|
+
|
|
1467
|
+
private async _findRolesWithFunctionalRightAsync(request: carriers.User_FindRolesWithFunctionalRightRequest, options?:base.WebApiRequestOptions) : Promise< carriers.MDOListItem[] > {
|
|
1468
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1469
|
+
base.WebApiBase.SetPending(options);
|
|
1470
|
+
return new Promise< carriers.MDOListItem[] >(async (resolve, reject) => {
|
|
1471
|
+
try {
|
|
1472
|
+
config.baseURL = this._options.baseUrl;
|
|
1473
|
+
const response = await this._axios.post("FindRolesWithFunctionalRight", request , config);
|
|
1474
|
+
base.WebApiBase.SetCompleted(options);
|
|
1475
|
+
const res : carriers.MDOListItem[] = converters.Create_MDOListItemArray_From( response.data );
|
|
1476
|
+
resolve(res);
|
|
1477
|
+
}
|
|
1478
|
+
catch( err ) {
|
|
1479
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1480
|
+
reject(err);
|
|
1481
|
+
}
|
|
1482
|
+
});
|
|
1483
|
+
}
|
|
1484
|
+
|
|
1485
|
+
|
|
1486
|
+
|
|
1487
|
+
/**
|
|
1488
|
+
* Find all roles with a given functional right. The roles matched must contain the specified functional right.
|
|
1489
|
+
* @param request - FunctionalRightName
|
|
1490
|
+
* @returns Roles that contains the given functional right
|
|
1491
|
+
*/
|
|
1492
|
+
public async findRolesWithFunctionalRightAsync(request: carriers.User_FindRolesWithFunctionalRightRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.MDOListItem[] >;
|
|
1493
|
+
|
|
1494
|
+
/**
|
|
1495
|
+
* Find all roles with a given functional right. The roles matched must contain the specified functional right.
|
|
1496
|
+
* @param functionalRightName - Functional right name to search for
|
|
1497
|
+
* @returns Roles that contains the given functional right
|
|
1498
|
+
*/
|
|
1499
|
+
public async findRolesWithFunctionalRightAsync(functionalRightName: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.MDOListItem[] >;
|
|
1500
|
+
|
|
1501
|
+
public async findRolesWithFunctionalRightAsync(functionalRightName:string|carriers.User_FindRolesWithFunctionalRightRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.MDOListItem[] > {
|
|
1502
|
+
let _request : carriers.User_FindRolesWithFunctionalRightRequest = null;
|
|
1503
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1504
|
+
const first : any = functionalRightName;
|
|
1505
|
+
if( typeof( first ) === "object" && first && ( typeof(first.functionalRightName)!='undefined' ) )
|
|
1506
|
+
{
|
|
1507
|
+
_request = functionalRightName as carriers.User_FindRolesWithFunctionalRightRequest;
|
|
1508
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
1509
|
+
}
|
|
1510
|
+
else
|
|
1511
|
+
{
|
|
1512
|
+
_request = {
|
|
1513
|
+
functionalRightName: functionalRightName as string,
|
|
1514
|
+
};
|
|
1515
|
+
_options = webapi_options;
|
|
1516
|
+
}
|
|
1517
|
+
return this._findRolesWithFunctionalRightAsync( _request, _options );
|
|
1518
|
+
}
|
|
1519
|
+
|
|
1520
|
+
|
|
1521
|
+
private async _findRolesWithFunctionalRightsAsync(request: carriers.User_FindRolesWithFunctionalRightsRequest, options?:base.WebApiRequestOptions) : Promise< number[] > {
|
|
1522
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1523
|
+
base.WebApiBase.SetPending(options);
|
|
1524
|
+
return new Promise< number[] >(async (resolve, reject) => {
|
|
1525
|
+
try {
|
|
1526
|
+
config.baseURL = this._options.baseUrl;
|
|
1527
|
+
const response = await this._axios.post("FindRolesWithFunctionalRights", request , config);
|
|
1528
|
+
base.WebApiBase.SetCompleted(options);
|
|
1529
|
+
const res : number[] = response.data as number[];
|
|
1530
|
+
resolve(res);
|
|
1531
|
+
}
|
|
1532
|
+
catch( err ) {
|
|
1533
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1534
|
+
reject(err);
|
|
1535
|
+
}
|
|
1536
|
+
});
|
|
1537
|
+
}
|
|
1538
|
+
|
|
1539
|
+
|
|
1540
|
+
|
|
1541
|
+
/**
|
|
1542
|
+
* Find all roles with a given set of functional rights. The roles matched must contain one or more of the specified functional rights.
|
|
1543
|
+
* @param request - FunctionalRightNames
|
|
1544
|
+
* @returns Role ids that contains your functional rights
|
|
1545
|
+
*/
|
|
1546
|
+
public async findRolesWithFunctionalRightsAsync(request: carriers.User_FindRolesWithFunctionalRightsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number[] >;
|
|
1547
|
+
|
|
1548
|
+
/**
|
|
1549
|
+
* Find all roles with a given set of functional rights. The roles matched must contain one or more of the specified functional rights.
|
|
1550
|
+
* @param functionalRightNames - An array of functional rights names to search for
|
|
1551
|
+
* @returns Role ids that contains your functional rights
|
|
1552
|
+
*/
|
|
1553
|
+
public async findRolesWithFunctionalRightsAsync(functionalRightNames: string[], webapi_options?:base.WebApiRequestOptions) : Promise< number[] >;
|
|
1554
|
+
|
|
1555
|
+
public async findRolesWithFunctionalRightsAsync(functionalRightNames:string[]|carriers.User_FindRolesWithFunctionalRightsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number[] > {
|
|
1556
|
+
let _request : carriers.User_FindRolesWithFunctionalRightsRequest = null;
|
|
1557
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1558
|
+
const first : any = functionalRightNames;
|
|
1559
|
+
if( typeof( first ) === "object" && first && ( typeof(first.functionalRightNames)!='undefined' ) )
|
|
1560
|
+
{
|
|
1561
|
+
_request = functionalRightNames as carriers.User_FindRolesWithFunctionalRightsRequest;
|
|
1562
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
1563
|
+
}
|
|
1564
|
+
else
|
|
1565
|
+
{
|
|
1566
|
+
_request = {
|
|
1567
|
+
functionalRightNames: functionalRightNames as string[],
|
|
1568
|
+
};
|
|
1569
|
+
_options = webapi_options;
|
|
1570
|
+
}
|
|
1571
|
+
return this._findRolesWithFunctionalRightsAsync( _request, _options );
|
|
1572
|
+
}
|
|
1573
|
+
|
|
1574
|
+
|
|
1575
|
+
private async _findRolesWithoutFunctionalRightsAsync(request: carriers.User_FindRolesWithoutFunctionalRightsRequest, options?:base.WebApiRequestOptions) : Promise< number[] > {
|
|
1576
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1577
|
+
base.WebApiBase.SetPending(options);
|
|
1578
|
+
return new Promise< number[] >(async (resolve, reject) => {
|
|
1579
|
+
try {
|
|
1580
|
+
config.baseURL = this._options.baseUrl;
|
|
1581
|
+
const response = await this._axios.post("FindRolesWithoutFunctionalRights", request , config);
|
|
1582
|
+
base.WebApiBase.SetCompleted(options);
|
|
1583
|
+
const res : number[] = response.data as number[];
|
|
1584
|
+
resolve(res);
|
|
1585
|
+
}
|
|
1586
|
+
catch( err ) {
|
|
1587
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1588
|
+
reject(err);
|
|
1589
|
+
}
|
|
1590
|
+
});
|
|
1591
|
+
}
|
|
1592
|
+
|
|
1593
|
+
|
|
1594
|
+
|
|
1595
|
+
/**
|
|
1596
|
+
* Find all roles without a given set of functional rights. The roles matched must not contain any of the specified functional rights.
|
|
1597
|
+
* @param request - FunctionalRightNames
|
|
1598
|
+
* @returns Role ids that without your functional rights
|
|
1599
|
+
*/
|
|
1600
|
+
public async findRolesWithoutFunctionalRightsAsync(request: carriers.User_FindRolesWithoutFunctionalRightsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number[] >;
|
|
1601
|
+
|
|
1602
|
+
/**
|
|
1603
|
+
* Find all roles without a given set of functional rights. The roles matched must not contain any of the specified functional rights.
|
|
1604
|
+
* @param functionalRightNames - An array of functional rights names to search for
|
|
1605
|
+
* @returns Role ids that without your functional rights
|
|
1606
|
+
*/
|
|
1607
|
+
public async findRolesWithoutFunctionalRightsAsync(functionalRightNames: string[], webapi_options?:base.WebApiRequestOptions) : Promise< number[] >;
|
|
1608
|
+
|
|
1609
|
+
public async findRolesWithoutFunctionalRightsAsync(functionalRightNames:string[]|carriers.User_FindRolesWithoutFunctionalRightsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number[] > {
|
|
1610
|
+
let _request : carriers.User_FindRolesWithoutFunctionalRightsRequest = null;
|
|
1611
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1612
|
+
const first : any = functionalRightNames;
|
|
1613
|
+
if( typeof( first ) === "object" && first && ( typeof(first.functionalRightNames)!='undefined' ) )
|
|
1614
|
+
{
|
|
1615
|
+
_request = functionalRightNames as carriers.User_FindRolesWithoutFunctionalRightsRequest;
|
|
1616
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
1617
|
+
}
|
|
1618
|
+
else
|
|
1619
|
+
{
|
|
1620
|
+
_request = {
|
|
1621
|
+
functionalRightNames: functionalRightNames as string[],
|
|
1622
|
+
};
|
|
1623
|
+
_options = webapi_options;
|
|
1624
|
+
}
|
|
1625
|
+
return this._findRolesWithoutFunctionalRightsAsync( _request, _options );
|
|
1626
|
+
}
|
|
1627
|
+
|
|
1628
|
+
/*
|
|
1629
|
+
* Gets a ServiceAuth object.
|
|
1630
|
+
* @param serviceAuthId - The primary key.
|
|
1631
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
1632
|
+
* @returns A single ServiceAuth
|
|
1633
|
+
*/
|
|
1634
|
+
public async getServiceAuthAsync(serviceAuthId: number, options?:base.WebApiRequestOptions) : Promise< carriers.ServiceAuth > {
|
|
1635
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1636
|
+
base.WebApiBase.SetPending(options);
|
|
1637
|
+
return new Promise< carriers.ServiceAuth >(async (resolve, reject) => {
|
|
1638
|
+
try {
|
|
1639
|
+
const response = await this._axios.post("GetServiceAuth?serviceAuthId=" + serviceAuthId, null, config);
|
|
1640
|
+
base.WebApiBase.SetCompleted(options);
|
|
1641
|
+
const res = converters.Create_ServiceAuth_From( response.data );
|
|
1642
|
+
resolve(res);
|
|
1643
|
+
}
|
|
1644
|
+
catch( err ) {
|
|
1645
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1646
|
+
reject(err);
|
|
1647
|
+
}
|
|
1648
|
+
});
|
|
1649
|
+
}
|
|
1650
|
+
|
|
1651
|
+
|
|
1652
|
+
private async _saveExternalTokensAsync(request: carriers.User_SaveExternalTokensRequest, options?:base.WebApiRequestOptions) : Promise< string > {
|
|
1653
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1654
|
+
base.WebApiBase.SetPending(options);
|
|
1655
|
+
return new Promise< string >(async (resolve, reject) => {
|
|
1656
|
+
try {
|
|
1657
|
+
config.baseURL = this._options.baseUrl;
|
|
1658
|
+
const response = await this._axios.post("SaveExternalTokens", request , config);
|
|
1659
|
+
base.WebApiBase.SetCompleted(options);
|
|
1660
|
+
const res : string = response.data as string;
|
|
1661
|
+
resolve(res);
|
|
1662
|
+
}
|
|
1663
|
+
catch( err ) {
|
|
1664
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1665
|
+
reject(err);
|
|
1666
|
+
}
|
|
1667
|
+
});
|
|
1668
|
+
}
|
|
1669
|
+
|
|
1670
|
+
|
|
1671
|
+
|
|
1672
|
+
/**
|
|
1673
|
+
* Saves the external tokens to the DB and returns a key that can be used to retrieve them
|
|
1674
|
+
* @param request - TokenManagementInfo
|
|
1675
|
+
* @returns Key that can be used to retrieve the tokens
|
|
1676
|
+
*/
|
|
1677
|
+
public async saveExternalTokensAsync(request: carriers.User_SaveExternalTokensRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
1678
|
+
|
|
1679
|
+
/**
|
|
1680
|
+
* Saves the external tokens to the DB and returns a key that can be used to retrieve them
|
|
1681
|
+
* @param tokenManagementInfo - Token information.
|
|
1682
|
+
* @returns Key that can be used to retrieve the tokens
|
|
1683
|
+
*/
|
|
1684
|
+
public async saveExternalTokensAsync(tokenManagementInfo: carriers.TokenManagementInfo, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
1685
|
+
|
|
1686
|
+
public async saveExternalTokensAsync(tokenManagementInfo:carriers.TokenManagementInfo|carriers.User_SaveExternalTokensRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string > {
|
|
1687
|
+
let _request : carriers.User_SaveExternalTokensRequest = null;
|
|
1688
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1689
|
+
const first : any = tokenManagementInfo;
|
|
1690
|
+
if( typeof( first ) === "object" && first && ( typeof(first.tokenManagementInfo)!='undefined' ) )
|
|
1691
|
+
{
|
|
1692
|
+
_request = tokenManagementInfo as carriers.User_SaveExternalTokensRequest;
|
|
1693
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
1694
|
+
}
|
|
1695
|
+
else
|
|
1696
|
+
{
|
|
1697
|
+
_request = {
|
|
1698
|
+
tokenManagementInfo: tokenManagementInfo as carriers.TokenManagementInfo,
|
|
1699
|
+
};
|
|
1700
|
+
_options = webapi_options;
|
|
1701
|
+
}
|
|
1702
|
+
return this._saveExternalTokensAsync( _request, _options );
|
|
1703
|
+
}
|
|
1704
|
+
|
|
1705
|
+
|
|
1706
|
+
private async _decryptAndSaveExternalTokensAsync(request: carriers.User_DecryptAndSaveExternalTokensRequest, options?:base.WebApiRequestOptions) : Promise< string > {
|
|
1707
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1708
|
+
base.WebApiBase.SetPending(options);
|
|
1709
|
+
return new Promise< string >(async (resolve, reject) => {
|
|
1710
|
+
try {
|
|
1711
|
+
config.baseURL = this._options.baseUrl;
|
|
1712
|
+
const response = await this._axios.post("DecryptAndSaveExternalTokens", request , config);
|
|
1713
|
+
base.WebApiBase.SetCompleted(options);
|
|
1714
|
+
const res : string = response.data as string;
|
|
1715
|
+
resolve(res);
|
|
1716
|
+
}
|
|
1717
|
+
catch( err ) {
|
|
1718
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1719
|
+
reject(err);
|
|
1720
|
+
}
|
|
1721
|
+
});
|
|
1722
|
+
}
|
|
1723
|
+
|
|
1724
|
+
|
|
1725
|
+
|
|
1726
|
+
/**
|
|
1727
|
+
* First asks AccessGateway to decrypt the tokens, then saves the external tokens to the DB and returns a key that can be used to retrieve them
|
|
1728
|
+
* @param request - TokenManagementInfo
|
|
1729
|
+
* @returns Key that can be used to retrieve the tokens
|
|
1730
|
+
*/
|
|
1731
|
+
public async decryptAndSaveExternalTokensAsync(request: carriers.User_DecryptAndSaveExternalTokensRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
1732
|
+
|
|
1733
|
+
/**
|
|
1734
|
+
* First asks AccessGateway to decrypt the tokens, then saves the external tokens to the DB and returns a key that can be used to retrieve them
|
|
1735
|
+
* @param tokenManagementInfo - Token information.
|
|
1736
|
+
* @returns Key that can be used to retrieve the tokens
|
|
1737
|
+
*/
|
|
1738
|
+
public async decryptAndSaveExternalTokensAsync(tokenManagementInfo: carriers.TokenManagementInfo, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
1739
|
+
|
|
1740
|
+
public async decryptAndSaveExternalTokensAsync(tokenManagementInfo:carriers.TokenManagementInfo|carriers.User_DecryptAndSaveExternalTokensRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string > {
|
|
1741
|
+
let _request : carriers.User_DecryptAndSaveExternalTokensRequest = null;
|
|
1742
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1743
|
+
const first : any = tokenManagementInfo;
|
|
1744
|
+
if( typeof( first ) === "object" && first && ( typeof(first.tokenManagementInfo)!='undefined' ) )
|
|
1745
|
+
{
|
|
1746
|
+
_request = tokenManagementInfo as carriers.User_DecryptAndSaveExternalTokensRequest;
|
|
1747
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
1748
|
+
}
|
|
1749
|
+
else
|
|
1750
|
+
{
|
|
1751
|
+
_request = {
|
|
1752
|
+
tokenManagementInfo: tokenManagementInfo as carriers.TokenManagementInfo,
|
|
1753
|
+
};
|
|
1754
|
+
_options = webapi_options;
|
|
1755
|
+
}
|
|
1756
|
+
return this._decryptAndSaveExternalTokensAsync( _request, _options );
|
|
1757
|
+
}
|
|
1758
|
+
|
|
1759
|
+
|
|
1760
|
+
private async _getExternalTokensAsync(request: carriers.User_GetExternalTokensRequest, options?:base.WebApiRequestOptions) : Promise< carriers.TokenManagementInfo > {
|
|
1761
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1762
|
+
base.WebApiBase.SetPending(options);
|
|
1763
|
+
return new Promise< carriers.TokenManagementInfo >(async (resolve, reject) => {
|
|
1764
|
+
try {
|
|
1765
|
+
config.baseURL = this._options.baseUrl;
|
|
1766
|
+
const response = await this._axios.post("GetExternalTokens", request , config);
|
|
1767
|
+
base.WebApiBase.SetCompleted(options);
|
|
1768
|
+
const res : carriers.TokenManagementInfo = converters.Create_TokenManagementInfo_From( response.data );
|
|
1769
|
+
resolve(res);
|
|
1770
|
+
}
|
|
1771
|
+
catch( err ) {
|
|
1772
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1773
|
+
reject(err);
|
|
1774
|
+
}
|
|
1775
|
+
});
|
|
1776
|
+
}
|
|
1777
|
+
|
|
1778
|
+
|
|
1779
|
+
|
|
1780
|
+
/**
|
|
1781
|
+
* Retrieve the tokens from the DB based on the given key
|
|
1782
|
+
* @param request - Key
|
|
1783
|
+
* @returns Key to retrieve tokens
|
|
1784
|
+
*/
|
|
1785
|
+
public async getExternalTokensAsync(request: carriers.User_GetExternalTokensRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TokenManagementInfo >;
|
|
1786
|
+
|
|
1787
|
+
/**
|
|
1788
|
+
* Retrieve the tokens from the DB based on the given key
|
|
1789
|
+
* @param key - Token retrievel key
|
|
1790
|
+
* @returns Key to retrieve tokens
|
|
1791
|
+
*/
|
|
1792
|
+
public async getExternalTokensAsync(key: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TokenManagementInfo >;
|
|
1793
|
+
|
|
1794
|
+
public async getExternalTokensAsync(key:string|carriers.User_GetExternalTokensRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TokenManagementInfo > {
|
|
1795
|
+
let _request : carriers.User_GetExternalTokensRequest = null;
|
|
1796
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1797
|
+
const first : any = key;
|
|
1798
|
+
if( typeof( first ) === "object" && first && ( typeof(first.key)!='undefined' ) )
|
|
1799
|
+
{
|
|
1800
|
+
_request = key as carriers.User_GetExternalTokensRequest;
|
|
1801
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
1802
|
+
}
|
|
1803
|
+
else
|
|
1804
|
+
{
|
|
1805
|
+
_request = {
|
|
1806
|
+
key: key as string,
|
|
1807
|
+
};
|
|
1808
|
+
_options = webapi_options;
|
|
1809
|
+
}
|
|
1810
|
+
return this._getExternalTokensAsync( _request, _options );
|
|
1811
|
+
}
|
|
1812
|
+
|
|
1813
|
+
/*
|
|
1814
|
+
* Gets a User object.
|
|
1815
|
+
* @param userId - The primary key.
|
|
1816
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
1817
|
+
* @returns A single User
|
|
1818
|
+
*/
|
|
1819
|
+
public async getUserAsync(userId: number, options?:base.WebApiRequestOptions) : Promise< carriers.User > {
|
|
1820
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1821
|
+
base.WebApiBase.SetPending(options);
|
|
1822
|
+
return new Promise< carriers.User >(async (resolve, reject) => {
|
|
1823
|
+
try {
|
|
1824
|
+
const response = await this._axios.post("GetUser?userId=" + userId, null, config);
|
|
1825
|
+
base.WebApiBase.SetCompleted(options);
|
|
1826
|
+
const res = converters.Create_User_From( response.data );
|
|
1827
|
+
resolve(res);
|
|
1828
|
+
}
|
|
1829
|
+
catch( err ) {
|
|
1830
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1831
|
+
reject(err);
|
|
1832
|
+
}
|
|
1833
|
+
});
|
|
1834
|
+
}
|
|
1835
|
+
|
|
1836
|
+
|
|
1837
|
+
private async _getUserFromNameAsync(request: carriers.User_GetUserFromNameRequest, options?:base.WebApiRequestOptions) : Promise< carriers.User > {
|
|
1838
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1839
|
+
base.WebApiBase.SetPending(options);
|
|
1840
|
+
return new Promise< carriers.User >(async (resolve, reject) => {
|
|
1841
|
+
try {
|
|
1842
|
+
config.baseURL = this._options.baseUrl;
|
|
1843
|
+
const response = await this._axios.post("GetUserFromName", request , config);
|
|
1844
|
+
base.WebApiBase.SetCompleted(options);
|
|
1845
|
+
const res : carriers.User = converters.Create_User_From( response.data );
|
|
1846
|
+
resolve(res);
|
|
1847
|
+
}
|
|
1848
|
+
catch( err ) {
|
|
1849
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1850
|
+
reject(err);
|
|
1851
|
+
}
|
|
1852
|
+
});
|
|
1853
|
+
}
|
|
1854
|
+
|
|
1855
|
+
|
|
1856
|
+
|
|
1857
|
+
/**
|
|
1858
|
+
* Get a user, with lookup based on user name.
|
|
1859
|
+
* @param request - UserName
|
|
1860
|
+
* @returns User retrieved by name
|
|
1861
|
+
*/
|
|
1862
|
+
public async getUserFromNameAsync(request: carriers.User_GetUserFromNameRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.User >;
|
|
1863
|
+
|
|
1864
|
+
/**
|
|
1865
|
+
* Get a user, with lookup based on user name.
|
|
1866
|
+
* @param userName - User name of the user to get.
|
|
1867
|
+
* @returns User retrieved by name
|
|
1868
|
+
*/
|
|
1869
|
+
public async getUserFromNameAsync(userName: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.User >;
|
|
1870
|
+
|
|
1871
|
+
public async getUserFromNameAsync(userName:string|carriers.User_GetUserFromNameRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.User > {
|
|
1872
|
+
let _request : carriers.User_GetUserFromNameRequest = null;
|
|
1873
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1874
|
+
const first : any = userName;
|
|
1875
|
+
if( typeof( first ) === "object" && first && ( typeof(first.userName)!='undefined' ) )
|
|
1876
|
+
{
|
|
1877
|
+
_request = userName as carriers.User_GetUserFromNameRequest;
|
|
1878
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
1879
|
+
}
|
|
1880
|
+
else
|
|
1881
|
+
{
|
|
1882
|
+
_request = {
|
|
1883
|
+
userName: userName as string,
|
|
1884
|
+
};
|
|
1885
|
+
_options = webapi_options;
|
|
1886
|
+
}
|
|
1887
|
+
return this._getUserFromNameAsync( _request, _options );
|
|
1888
|
+
}
|
|
1889
|
+
|
|
1890
|
+
|
|
1891
|
+
private async _saveUserFromNameAsync(request: carriers.User_SaveUserFromNameRequest, options?:base.WebApiRequestOptions) : Promise< carriers.User > {
|
|
1892
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1893
|
+
base.WebApiBase.SetPending(options);
|
|
1894
|
+
return new Promise< carriers.User >(async (resolve, reject) => {
|
|
1895
|
+
try {
|
|
1896
|
+
config.baseURL = this._options.baseUrl;
|
|
1897
|
+
const response = await this._axios.post("SaveUserFromName", request , config);
|
|
1898
|
+
base.WebApiBase.SetCompleted(options);
|
|
1899
|
+
const res : carriers.User = converters.Create_User_From( response.data );
|
|
1900
|
+
resolve(res);
|
|
1901
|
+
}
|
|
1902
|
+
catch( err ) {
|
|
1903
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1904
|
+
reject(err);
|
|
1905
|
+
}
|
|
1906
|
+
});
|
|
1907
|
+
}
|
|
1908
|
+
|
|
1909
|
+
|
|
1910
|
+
|
|
1911
|
+
/**
|
|
1912
|
+
* Save a user, with lookup based on the user name.
|
|
1913
|
+
* @param request - UserName, User
|
|
1914
|
+
* @returns User retrieved by name
|
|
1915
|
+
*/
|
|
1916
|
+
public async saveUserFromNameAsync(request: carriers.User_SaveUserFromNameRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.User >;
|
|
1917
|
+
|
|
1918
|
+
/**
|
|
1919
|
+
* Save a user, with lookup based on the user name.
|
|
1920
|
+
* @param userName - User name of the user to get.
|
|
1921
|
+
* @param user - User object to save.
|
|
1922
|
+
* @returns User retrieved by name
|
|
1923
|
+
*/
|
|
1924
|
+
public async saveUserFromNameAsync(userName: string, user: carriers.User, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.User >;
|
|
1925
|
+
|
|
1926
|
+
public async saveUserFromNameAsync(userName:string|carriers.User_SaveUserFromNameRequest, user?:carriers.User|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.User > {
|
|
1927
|
+
let _request : carriers.User_SaveUserFromNameRequest = null;
|
|
1928
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1929
|
+
const first : any = userName;
|
|
1930
|
+
if( typeof( first ) === "object" && first && ( typeof(first.userName)!='undefined' || typeof(first.user)!='undefined' ) )
|
|
1931
|
+
{
|
|
1932
|
+
_request = userName as carriers.User_SaveUserFromNameRequest;
|
|
1933
|
+
_options = user as base.WebApiRequestOptions;
|
|
1934
|
+
}
|
|
1935
|
+
else
|
|
1936
|
+
{
|
|
1937
|
+
_request = {
|
|
1938
|
+
userName: userName as string,
|
|
1939
|
+
user: user as carriers.User,
|
|
1940
|
+
};
|
|
1941
|
+
_options = webapi_options;
|
|
1942
|
+
}
|
|
1943
|
+
return this._saveUserFromNameAsync( _request, _options );
|
|
1944
|
+
}
|
|
1945
|
+
|
|
1946
|
+
|
|
1947
|
+
private async _deleteUserFromNameAsync(request: carriers.User_DeleteUserFromNameRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
1948
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1949
|
+
base.WebApiBase.SetPending(options);
|
|
1950
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
1951
|
+
try {
|
|
1952
|
+
config.baseURL = this._options.baseUrl;
|
|
1953
|
+
const response = await this._axios.post("DeleteUserFromName", request , config);
|
|
1954
|
+
base.WebApiBase.SetCompleted(options);
|
|
1955
|
+
const res = response.data;
|
|
1956
|
+
resolve(res);
|
|
1957
|
+
}
|
|
1958
|
+
catch( err ) {
|
|
1959
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1960
|
+
reject(err);
|
|
1961
|
+
}
|
|
1962
|
+
});
|
|
1963
|
+
}
|
|
1964
|
+
|
|
1965
|
+
|
|
1966
|
+
|
|
1967
|
+
/**
|
|
1968
|
+
* Delete a user, with lookup based on the user name.
|
|
1969
|
+
* @param request - UserName
|
|
1970
|
+
* @returns This method has no return value
|
|
1971
|
+
*/
|
|
1972
|
+
public async deleteUserFromNameAsync(request: carriers.User_DeleteUserFromNameRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
1973
|
+
|
|
1974
|
+
/**
|
|
1975
|
+
* Delete a user, with lookup based on the user name.
|
|
1976
|
+
* @param userName - User name of the user to delete.
|
|
1977
|
+
* @returns This method has no return value
|
|
1978
|
+
*/
|
|
1979
|
+
public async deleteUserFromNameAsync(userName: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
1980
|
+
|
|
1981
|
+
public async deleteUserFromNameAsync(userName:string|carriers.User_DeleteUserFromNameRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
1982
|
+
let _request : carriers.User_DeleteUserFromNameRequest = null;
|
|
1983
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1984
|
+
const first : any = userName;
|
|
1985
|
+
if( typeof( first ) === "object" && first && ( typeof(first.userName)!='undefined' ) )
|
|
1986
|
+
{
|
|
1987
|
+
_request = userName as carriers.User_DeleteUserFromNameRequest;
|
|
1988
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
1989
|
+
}
|
|
1990
|
+
else
|
|
1991
|
+
{
|
|
1992
|
+
_request = {
|
|
1993
|
+
userName: userName as string,
|
|
1994
|
+
};
|
|
1995
|
+
_options = webapi_options;
|
|
1996
|
+
}
|
|
1997
|
+
return this._deleteUserFromNameAsync( _request, _options );
|
|
1998
|
+
}
|
|
1999
|
+
|
|
2000
|
+
|
|
2001
|
+
private async _getCredentialTypesAsync( options?:base.WebApiRequestOptions) : Promise< carriers.CredentialType[] > {
|
|
2002
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2003
|
+
base.WebApiBase.SetPending(options);
|
|
2004
|
+
return new Promise< carriers.CredentialType[] >(async (resolve, reject) => {
|
|
2005
|
+
try {
|
|
2006
|
+
config.baseURL = this._options.baseUrl;
|
|
2007
|
+
const response = await this._axios.post("GetCredentialTypes", undefined , config);
|
|
2008
|
+
base.WebApiBase.SetCompleted(options);
|
|
2009
|
+
const res : carriers.CredentialType[] = converters.Create_CredentialTypeArray_From( response.data );
|
|
2010
|
+
resolve(res);
|
|
2011
|
+
}
|
|
2012
|
+
catch( err ) {
|
|
2013
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2014
|
+
reject(err);
|
|
2015
|
+
}
|
|
2016
|
+
});
|
|
2017
|
+
}
|
|
2018
|
+
|
|
2019
|
+
|
|
2020
|
+
/**
|
|
2021
|
+
* Get available credential types that can be used for authentication
|
|
2022
|
+
* @returns Credential types that can be used for authentication
|
|
2023
|
+
*/
|
|
2024
|
+
public async getCredentialTypesAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CredentialType[] >
|
|
2025
|
+
{
|
|
2026
|
+
return this._getCredentialTypesAsync(webapi_options);
|
|
2027
|
+
}
|
|
2028
|
+
|
|
2029
|
+
|
|
2030
|
+
private async _getCredentialTypesForUserTypeAsync(request: carriers.User_GetCredentialTypesForUserTypeRequest, options?:base.WebApiRequestOptions) : Promise< carriers.CredentialType[] > {
|
|
2031
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2032
|
+
base.WebApiBase.SetPending(options);
|
|
2033
|
+
return new Promise< carriers.CredentialType[] >(async (resolve, reject) => {
|
|
2034
|
+
try {
|
|
2035
|
+
config.baseURL = this._options.baseUrl;
|
|
2036
|
+
const response = await this._axios.post("GetCredentialTypesForUserType", request , config);
|
|
2037
|
+
base.WebApiBase.SetCompleted(options);
|
|
2038
|
+
const res : carriers.CredentialType[] = converters.Create_CredentialTypeArray_From( response.data );
|
|
2039
|
+
resolve(res);
|
|
2040
|
+
}
|
|
2041
|
+
catch( err ) {
|
|
2042
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2043
|
+
reject(err);
|
|
2044
|
+
}
|
|
2045
|
+
});
|
|
2046
|
+
}
|
|
2047
|
+
|
|
2048
|
+
|
|
2049
|
+
|
|
2050
|
+
/**
|
|
2051
|
+
* Get available credential types that can be used for the specified user type.
|
|
2052
|
+
* @param request - UserType
|
|
2053
|
+
* @returns Credential types that can be used for authentication
|
|
2054
|
+
*/
|
|
2055
|
+
public async getCredentialTypesForUserTypeAsync(request: carriers.User_GetCredentialTypesForUserTypeRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CredentialType[] >;
|
|
2056
|
+
|
|
2057
|
+
/**
|
|
2058
|
+
* Get available credential types that can be used for the specified user type.
|
|
2059
|
+
* @param userType - The user type to retrieve credential types for
|
|
2060
|
+
* @returns Credential types that can be used for authentication
|
|
2061
|
+
*/
|
|
2062
|
+
public async getCredentialTypesForUserTypeAsync(userType: enums.UserType, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CredentialType[] >;
|
|
2063
|
+
|
|
2064
|
+
public async getCredentialTypesForUserTypeAsync(userType:enums.UserType|carriers.User_GetCredentialTypesForUserTypeRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CredentialType[] > {
|
|
2065
|
+
let _request : carriers.User_GetCredentialTypesForUserTypeRequest = null;
|
|
2066
|
+
let _options : base.WebApiRequestOptions = null;
|
|
2067
|
+
const first : any = userType;
|
|
2068
|
+
if( typeof( first ) === "object" && first && ( typeof(first.userType)!='undefined' ) )
|
|
2069
|
+
{
|
|
2070
|
+
_request = userType as carriers.User_GetCredentialTypesForUserTypeRequest;
|
|
2071
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
2072
|
+
}
|
|
2073
|
+
else
|
|
2074
|
+
{
|
|
2075
|
+
_request = {
|
|
2076
|
+
userType: userType as enums.UserType,
|
|
2077
|
+
};
|
|
2078
|
+
_options = webapi_options;
|
|
2079
|
+
}
|
|
2080
|
+
return this._getCredentialTypesForUserTypeAsync( _request, _options );
|
|
2081
|
+
}
|
|
2082
|
+
|
|
2083
|
+
|
|
2084
|
+
private async _saveUntrustedCredentialsAsync(request: carriers.User_SaveUntrustedCredentialsRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
2085
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2086
|
+
base.WebApiBase.SetPending(options);
|
|
2087
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
2088
|
+
try {
|
|
2089
|
+
config.baseURL = this._options.baseUrl;
|
|
2090
|
+
const response = await this._axios.post("SaveUntrustedCredentials", request , config);
|
|
2091
|
+
base.WebApiBase.SetCompleted(options);
|
|
2092
|
+
const res = response.data;
|
|
2093
|
+
resolve(res);
|
|
2094
|
+
}
|
|
2095
|
+
catch( err ) {
|
|
2096
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2097
|
+
reject(err);
|
|
2098
|
+
}
|
|
2099
|
+
});
|
|
2100
|
+
}
|
|
2101
|
+
|
|
2102
|
+
|
|
2103
|
+
|
|
2104
|
+
/**
|
|
2105
|
+
* Save credentials for authenticated user.
|
|
2106
|
+
* @param request - Type, Credentials
|
|
2107
|
+
* @returns
|
|
2108
|
+
*/
|
|
2109
|
+
public async saveUntrustedCredentialsAsync(request: carriers.User_SaveUntrustedCredentialsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
2110
|
+
|
|
2111
|
+
/**
|
|
2112
|
+
* Save credentials for authenticated user.
|
|
2113
|
+
* @param type - Type of credential(Ex: "imap", "smtp")
|
|
2114
|
+
* @param credentials - Credentials to save.
|
|
2115
|
+
* @returns
|
|
2116
|
+
*/
|
|
2117
|
+
public async saveUntrustedCredentialsAsync(type: string, credentials: carriers.UntrustedCredentials, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
2118
|
+
|
|
2119
|
+
public async saveUntrustedCredentialsAsync(type:string|carriers.User_SaveUntrustedCredentialsRequest, credentials?:carriers.UntrustedCredentials|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
2120
|
+
let _request : carriers.User_SaveUntrustedCredentialsRequest = null;
|
|
2121
|
+
let _options : base.WebApiRequestOptions = null;
|
|
2122
|
+
const first : any = type;
|
|
2123
|
+
if( typeof( first ) === "object" && first && ( typeof(first.type)!='undefined' || typeof(first.credentials)!='undefined' ) )
|
|
2124
|
+
{
|
|
2125
|
+
_request = type as carriers.User_SaveUntrustedCredentialsRequest;
|
|
2126
|
+
_options = credentials as base.WebApiRequestOptions;
|
|
2127
|
+
}
|
|
2128
|
+
else
|
|
2129
|
+
{
|
|
2130
|
+
_request = {
|
|
2131
|
+
type: type as string,
|
|
2132
|
+
credentials: credentials as carriers.UntrustedCredentials,
|
|
2133
|
+
};
|
|
2134
|
+
_options = webapi_options;
|
|
2135
|
+
}
|
|
2136
|
+
return this._saveUntrustedCredentialsAsync( _request, _options );
|
|
2137
|
+
}
|
|
2138
|
+
|
|
2139
|
+
|
|
2140
|
+
private async _getUntrustedCredentialsAsync(request: carriers.User_GetUntrustedCredentialsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.UntrustedCredentials[] > {
|
|
2141
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2142
|
+
base.WebApiBase.SetPending(options);
|
|
2143
|
+
return new Promise< carriers.UntrustedCredentials[] >(async (resolve, reject) => {
|
|
2144
|
+
try {
|
|
2145
|
+
config.baseURL = this._options.baseUrl;
|
|
2146
|
+
const response = await this._axios.post("GetUntrustedCredentials", request , config);
|
|
2147
|
+
base.WebApiBase.SetCompleted(options);
|
|
2148
|
+
const res : carriers.UntrustedCredentials[] = converters.Create_UntrustedCredentialsArray_From( response.data );
|
|
2149
|
+
resolve(res);
|
|
2150
|
+
}
|
|
2151
|
+
catch( err ) {
|
|
2152
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2153
|
+
reject(err);
|
|
2154
|
+
}
|
|
2155
|
+
});
|
|
2156
|
+
}
|
|
2157
|
+
|
|
2158
|
+
|
|
2159
|
+
|
|
2160
|
+
/**
|
|
2161
|
+
* Get a set of credentials of a specified type for authenticated user.
|
|
2162
|
+
* @param request - Type
|
|
2163
|
+
* @returns Array of credentials of the specified type.
|
|
2164
|
+
*/
|
|
2165
|
+
public async getUntrustedCredentialsAsync(request: carriers.User_GetUntrustedCredentialsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UntrustedCredentials[] >;
|
|
2166
|
+
|
|
2167
|
+
/**
|
|
2168
|
+
* Get a set of credentials of a specified type for authenticated user.
|
|
2169
|
+
* @param type - Type of credential(Ex: "imap", "smtp").
|
|
2170
|
+
* @returns Array of credentials of the specified type.
|
|
2171
|
+
*/
|
|
2172
|
+
public async getUntrustedCredentialsAsync(type: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UntrustedCredentials[] >;
|
|
2173
|
+
|
|
2174
|
+
public async getUntrustedCredentialsAsync(type:string|carriers.User_GetUntrustedCredentialsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UntrustedCredentials[] > {
|
|
2175
|
+
let _request : carriers.User_GetUntrustedCredentialsRequest = null;
|
|
2176
|
+
let _options : base.WebApiRequestOptions = null;
|
|
2177
|
+
const first : any = type;
|
|
2178
|
+
if( typeof( first ) === "object" && first && ( typeof(first.type)!='undefined' ) )
|
|
2179
|
+
{
|
|
2180
|
+
_request = type as carriers.User_GetUntrustedCredentialsRequest;
|
|
2181
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
2182
|
+
}
|
|
2183
|
+
else
|
|
2184
|
+
{
|
|
2185
|
+
_request = {
|
|
2186
|
+
type: type as string,
|
|
2187
|
+
};
|
|
2188
|
+
_options = webapi_options;
|
|
2189
|
+
}
|
|
2190
|
+
return this._getUntrustedCredentialsAsync( _request, _options );
|
|
2191
|
+
}
|
|
2192
|
+
|
|
2193
|
+
|
|
2194
|
+
private async _getUntrustedCredentialsForAssociateAsync(request: carriers.User_GetUntrustedCredentialsForAssociateRequest, options?:base.WebApiRequestOptions) : Promise< carriers.UntrustedCredentials[] > {
|
|
2195
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2196
|
+
base.WebApiBase.SetPending(options);
|
|
2197
|
+
return new Promise< carriers.UntrustedCredentials[] >(async (resolve, reject) => {
|
|
2198
|
+
try {
|
|
2199
|
+
config.baseURL = this._options.baseUrl;
|
|
2200
|
+
const response = await this._axios.post("GetUntrustedCredentialsForAssociate", request , config);
|
|
2201
|
+
base.WebApiBase.SetCompleted(options);
|
|
2202
|
+
const res : carriers.UntrustedCredentials[] = converters.Create_UntrustedCredentialsArray_From( response.data );
|
|
2203
|
+
resolve(res);
|
|
2204
|
+
}
|
|
2205
|
+
catch( err ) {
|
|
2206
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2207
|
+
reject(err);
|
|
2208
|
+
}
|
|
2209
|
+
});
|
|
2210
|
+
}
|
|
2211
|
+
|
|
2212
|
+
|
|
2213
|
+
|
|
2214
|
+
/**
|
|
2215
|
+
* Get a set of credentials of a specified type for a specified user. SecretValue is only populated for authenticated user, and system users.
|
|
2216
|
+
* @param request - AssociateId, Type
|
|
2217
|
+
* @returns Array of credentials of the specified type.
|
|
2218
|
+
*/
|
|
2219
|
+
public async getUntrustedCredentialsForAssociateAsync(request: carriers.User_GetUntrustedCredentialsForAssociateRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UntrustedCredentials[] >;
|
|
2220
|
+
|
|
2221
|
+
/**
|
|
2222
|
+
* Get a set of credentials of a specified type for a specified user. SecretValue is only populated for authenticated user, and system users.
|
|
2223
|
+
* @param associateId - Id of user to retrieve credentials for.
|
|
2224
|
+
* @param type - Type of credential(Ex: "imap", "smtp").
|
|
2225
|
+
* @returns Array of credentials of the specified type.
|
|
2226
|
+
*/
|
|
2227
|
+
public async getUntrustedCredentialsForAssociateAsync(associateId: number, type: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UntrustedCredentials[] >;
|
|
2228
|
+
|
|
2229
|
+
public async getUntrustedCredentialsForAssociateAsync(associateId:number|carriers.User_GetUntrustedCredentialsForAssociateRequest, type?:string|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UntrustedCredentials[] > {
|
|
2230
|
+
let _request : carriers.User_GetUntrustedCredentialsForAssociateRequest = null;
|
|
2231
|
+
let _options : base.WebApiRequestOptions = null;
|
|
2232
|
+
const first : any = associateId;
|
|
2233
|
+
if( typeof( first ) === "object" && first && ( typeof(first.associateId)!='undefined' || typeof(first.type)!='undefined' ) )
|
|
2234
|
+
{
|
|
2235
|
+
_request = associateId as carriers.User_GetUntrustedCredentialsForAssociateRequest;
|
|
2236
|
+
_options = type as base.WebApiRequestOptions;
|
|
2237
|
+
}
|
|
2238
|
+
else
|
|
2239
|
+
{
|
|
2240
|
+
_request = {
|
|
2241
|
+
associateId: associateId as number,
|
|
2242
|
+
type: type as string,
|
|
2243
|
+
};
|
|
2244
|
+
_options = webapi_options;
|
|
2245
|
+
}
|
|
2246
|
+
return this._getUntrustedCredentialsForAssociateAsync( _request, _options );
|
|
2247
|
+
}
|
|
2248
|
+
|
|
2249
|
+
|
|
2250
|
+
private async _saveUntrustedCredentialsForAssociateAsync(request: carriers.User_SaveUntrustedCredentialsForAssociateRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
2251
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2252
|
+
base.WebApiBase.SetPending(options);
|
|
2253
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
2254
|
+
try {
|
|
2255
|
+
config.baseURL = this._options.baseUrl;
|
|
2256
|
+
const response = await this._axios.post("SaveUntrustedCredentialsForAssociate", request , config);
|
|
2257
|
+
base.WebApiBase.SetCompleted(options);
|
|
2258
|
+
const res = response.data;
|
|
2259
|
+
resolve(res);
|
|
2260
|
+
}
|
|
2261
|
+
catch( err ) {
|
|
2262
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2263
|
+
reject(err);
|
|
2264
|
+
}
|
|
2265
|
+
});
|
|
2266
|
+
}
|
|
2267
|
+
|
|
2268
|
+
|
|
2269
|
+
|
|
2270
|
+
/**
|
|
2271
|
+
* Save credentials for a specified user.
|
|
2272
|
+
* @param request - AssociateId, Type, Credentials
|
|
2273
|
+
* @returns
|
|
2274
|
+
*/
|
|
2275
|
+
public async saveUntrustedCredentialsForAssociateAsync(request: carriers.User_SaveUntrustedCredentialsForAssociateRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
2276
|
+
|
|
2277
|
+
/**
|
|
2278
|
+
* Save credentials for a specified user.
|
|
2279
|
+
* @param associateId - Id of user to save credentials for.
|
|
2280
|
+
* @param type - Type of credential(Ex: "imap", "smtp")
|
|
2281
|
+
* @param credentials - Credentials to save.
|
|
2282
|
+
* @returns
|
|
2283
|
+
*/
|
|
2284
|
+
public async saveUntrustedCredentialsForAssociateAsync(associateId: number, type: string, credentials: carriers.UntrustedCredentials, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
2285
|
+
|
|
2286
|
+
public async saveUntrustedCredentialsForAssociateAsync(associateId:number|carriers.User_SaveUntrustedCredentialsForAssociateRequest, type?:string|base.WebApiRequestOptions, credentials?:carriers.UntrustedCredentials, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
2287
|
+
let _request : carriers.User_SaveUntrustedCredentialsForAssociateRequest = null;
|
|
2288
|
+
let _options : base.WebApiRequestOptions = null;
|
|
2289
|
+
const first : any = associateId;
|
|
2290
|
+
if( typeof( first ) === "object" && first && ( typeof(first.associateId)!='undefined' || typeof(first.type)!='undefined' || typeof(first.credentials)!='undefined' ) )
|
|
2291
|
+
{
|
|
2292
|
+
_request = associateId as carriers.User_SaveUntrustedCredentialsForAssociateRequest;
|
|
2293
|
+
_options = type as base.WebApiRequestOptions;
|
|
2294
|
+
}
|
|
2295
|
+
else
|
|
2296
|
+
{
|
|
2297
|
+
_request = {
|
|
2298
|
+
associateId: associateId as number,
|
|
2299
|
+
type: type as string,
|
|
2300
|
+
credentials: credentials as carriers.UntrustedCredentials,
|
|
2301
|
+
};
|
|
2302
|
+
_options = webapi_options;
|
|
2303
|
+
}
|
|
2304
|
+
return this._saveUntrustedCredentialsForAssociateAsync( _request, _options );
|
|
2305
|
+
}
|
|
2306
|
+
|
|
2307
|
+
|
|
2308
|
+
private async _removeUntrustedCredentialsAsync(request: carriers.User_RemoveUntrustedCredentialsRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
2309
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2310
|
+
base.WebApiBase.SetPending(options);
|
|
2311
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
2312
|
+
try {
|
|
2313
|
+
config.baseURL = this._options.baseUrl;
|
|
2314
|
+
const response = await this._axios.post("RemoveUntrustedCredentials", request , config);
|
|
2315
|
+
base.WebApiBase.SetCompleted(options);
|
|
2316
|
+
const res = response.data;
|
|
2317
|
+
resolve(res);
|
|
2318
|
+
}
|
|
2319
|
+
catch( err ) {
|
|
2320
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2321
|
+
reject(err);
|
|
2322
|
+
}
|
|
2323
|
+
});
|
|
2324
|
+
}
|
|
2325
|
+
|
|
2326
|
+
|
|
2327
|
+
|
|
2328
|
+
/**
|
|
2329
|
+
* Remove a credentials entry for authenticated user.
|
|
2330
|
+
* @param request - Type, PublicValue
|
|
2331
|
+
* @returns
|
|
2332
|
+
*/
|
|
2333
|
+
public async removeUntrustedCredentialsAsync(request: carriers.User_RemoveUntrustedCredentialsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
2334
|
+
|
|
2335
|
+
/**
|
|
2336
|
+
* Remove a credentials entry for authenticated user.
|
|
2337
|
+
* @param type - Type of credential(Ex: "imap", "smtp")
|
|
2338
|
+
* @param publicValue - PublicValue field of credentials to remove.
|
|
2339
|
+
* @returns
|
|
2340
|
+
*/
|
|
2341
|
+
public async removeUntrustedCredentialsAsync(type: string, publicValue: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
2342
|
+
|
|
2343
|
+
public async removeUntrustedCredentialsAsync(type:string|carriers.User_RemoveUntrustedCredentialsRequest, publicValue?:string|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
2344
|
+
let _request : carriers.User_RemoveUntrustedCredentialsRequest = null;
|
|
2345
|
+
let _options : base.WebApiRequestOptions = null;
|
|
2346
|
+
const first : any = type;
|
|
2347
|
+
if( typeof( first ) === "object" && first && ( typeof(first.type)!='undefined' || typeof(first.publicValue)!='undefined' ) )
|
|
2348
|
+
{
|
|
2349
|
+
_request = type as carriers.User_RemoveUntrustedCredentialsRequest;
|
|
2350
|
+
_options = publicValue as base.WebApiRequestOptions;
|
|
2351
|
+
}
|
|
2352
|
+
else
|
|
2353
|
+
{
|
|
2354
|
+
_request = {
|
|
2355
|
+
type: type as string,
|
|
2356
|
+
publicValue: publicValue as string,
|
|
2357
|
+
};
|
|
2358
|
+
_options = webapi_options;
|
|
2359
|
+
}
|
|
2360
|
+
return this._removeUntrustedCredentialsAsync( _request, _options );
|
|
2361
|
+
}
|
|
2362
|
+
|
|
2363
|
+
|
|
2364
|
+
private async _removeUntrustedCredentialsForAssociateAsync(request: carriers.User_RemoveUntrustedCredentialsForAssociateRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
2365
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2366
|
+
base.WebApiBase.SetPending(options);
|
|
2367
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
2368
|
+
try {
|
|
2369
|
+
config.baseURL = this._options.baseUrl;
|
|
2370
|
+
const response = await this._axios.post("RemoveUntrustedCredentialsForAssociate", request , config);
|
|
2371
|
+
base.WebApiBase.SetCompleted(options);
|
|
2372
|
+
const res = response.data;
|
|
2373
|
+
resolve(res);
|
|
2374
|
+
}
|
|
2375
|
+
catch( err ) {
|
|
2376
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2377
|
+
reject(err);
|
|
2378
|
+
}
|
|
2379
|
+
});
|
|
2380
|
+
}
|
|
2381
|
+
|
|
2382
|
+
|
|
2383
|
+
|
|
2384
|
+
/**
|
|
2385
|
+
* Remove a credentials entry for a specified user.
|
|
2386
|
+
* @param request - AssociateId, Type, PublicValue
|
|
2387
|
+
* @returns
|
|
2388
|
+
*/
|
|
2389
|
+
public async removeUntrustedCredentialsForAssociateAsync(request: carriers.User_RemoveUntrustedCredentialsForAssociateRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
2390
|
+
|
|
2391
|
+
/**
|
|
2392
|
+
* Remove a credentials entry for a specified user.
|
|
2393
|
+
* @param associateId - Id of user to remove credentials for.
|
|
2394
|
+
* @param type - Type of credential(Ex: "imap", "smtp")
|
|
2395
|
+
* @param publicValue - PublicValue field of credentials to remove.
|
|
2396
|
+
* @returns
|
|
2397
|
+
*/
|
|
2398
|
+
public async removeUntrustedCredentialsForAssociateAsync(associateId: number, type: string, publicValue: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
2399
|
+
|
|
2400
|
+
public async removeUntrustedCredentialsForAssociateAsync(associateId:number|carriers.User_RemoveUntrustedCredentialsForAssociateRequest, type?:string|base.WebApiRequestOptions, publicValue?:string, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
2401
|
+
let _request : carriers.User_RemoveUntrustedCredentialsForAssociateRequest = null;
|
|
2402
|
+
let _options : base.WebApiRequestOptions = null;
|
|
2403
|
+
const first : any = associateId;
|
|
2404
|
+
if( typeof( first ) === "object" && first && ( typeof(first.associateId)!='undefined' || typeof(first.type)!='undefined' || typeof(first.publicValue)!='undefined' ) )
|
|
2405
|
+
{
|
|
2406
|
+
_request = associateId as carriers.User_RemoveUntrustedCredentialsForAssociateRequest;
|
|
2407
|
+
_options = type as base.WebApiRequestOptions;
|
|
2408
|
+
}
|
|
2409
|
+
else
|
|
2410
|
+
{
|
|
2411
|
+
_request = {
|
|
2412
|
+
associateId: associateId as number,
|
|
2413
|
+
type: type as string,
|
|
2414
|
+
publicValue: publicValue as string,
|
|
2415
|
+
};
|
|
2416
|
+
_options = webapi_options;
|
|
2417
|
+
}
|
|
2418
|
+
return this._removeUntrustedCredentialsForAssociateAsync( _request, _options );
|
|
2419
|
+
}
|
|
2420
|
+
|
|
2421
|
+
|
|
2422
|
+
private async _createExternalUserAsync(request: carriers.User_CreateExternalUserRequest, options?:base.WebApiRequestOptions) : Promise< number > {
|
|
2423
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2424
|
+
base.WebApiBase.SetPending(options);
|
|
2425
|
+
return new Promise< number >(async (resolve, reject) => {
|
|
2426
|
+
try {
|
|
2427
|
+
config.baseURL = this._options.baseUrl;
|
|
2428
|
+
const response = await this._axios.post("CreateExternalUser", request , config);
|
|
2429
|
+
base.WebApiBase.SetCompleted(options);
|
|
2430
|
+
const res : number = response.data as number;
|
|
2431
|
+
resolve(res);
|
|
2432
|
+
}
|
|
2433
|
+
catch( err ) {
|
|
2434
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2435
|
+
reject(err);
|
|
2436
|
+
}
|
|
2437
|
+
});
|
|
2438
|
+
}
|
|
2439
|
+
|
|
2440
|
+
|
|
2441
|
+
|
|
2442
|
+
/**
|
|
2443
|
+
* Creates an associate of type external user.
|
|
2444
|
+
* @param request - PersonId, UserName, Password, RoleId, IsActive
|
|
2445
|
+
* @returns Returns the created associateId.
|
|
2446
|
+
*/
|
|
2447
|
+
public async createExternalUserAsync(request: carriers.User_CreateExternalUserRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
|
|
2448
|
+
|
|
2449
|
+
/**
|
|
2450
|
+
* Creates an associate of type external user.
|
|
2451
|
+
* @param personId - The personId to create an external user for.
|
|
2452
|
+
* @param userName - Login username.
|
|
2453
|
+
* @param password - Login password.
|
|
2454
|
+
* @param roleId - Id of role for the external user. The role must be a role of type external users.
|
|
2455
|
+
* @param isActive - Set isActive to true to enable the external user to log in.
|
|
2456
|
+
* @returns Returns the created associateId.
|
|
2457
|
+
*/
|
|
2458
|
+
public async createExternalUserAsync(personId: number, userName: string, password: string, roleId: number, isActive: boolean, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
|
|
2459
|
+
|
|
2460
|
+
public async createExternalUserAsync(personId:number|carriers.User_CreateExternalUserRequest, userName?:string|base.WebApiRequestOptions, password?:string, roleId?:number, isActive?:boolean, webapi_options?:base.WebApiRequestOptions) : Promise< number > {
|
|
2461
|
+
let _request : carriers.User_CreateExternalUserRequest = null;
|
|
2462
|
+
let _options : base.WebApiRequestOptions = null;
|
|
2463
|
+
const first : any = personId;
|
|
2464
|
+
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' ) )
|
|
2465
|
+
{
|
|
2466
|
+
_request = personId as carriers.User_CreateExternalUserRequest;
|
|
2467
|
+
_options = userName as base.WebApiRequestOptions;
|
|
2468
|
+
}
|
|
2469
|
+
else
|
|
2470
|
+
{
|
|
2471
|
+
_request = {
|
|
2472
|
+
personId: personId as number,
|
|
2473
|
+
userName: userName as string,
|
|
2474
|
+
password: password as string,
|
|
2475
|
+
roleId: roleId as number,
|
|
2476
|
+
isActive: isActive as boolean,
|
|
2477
|
+
};
|
|
2478
|
+
_options = webapi_options;
|
|
2479
|
+
}
|
|
2480
|
+
return this._createExternalUserAsync( _request, _options );
|
|
2481
|
+
}
|
|
2482
|
+
|
|
2483
|
+
|
|
2484
|
+
private async _deleteExternalUserAsync(request: carriers.User_DeleteExternalUserRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
2485
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2486
|
+
base.WebApiBase.SetPending(options);
|
|
2487
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
2488
|
+
try {
|
|
2489
|
+
config.baseURL = this._options.baseUrl;
|
|
2490
|
+
const response = await this._axios.post("DeleteExternalUser", request , config);
|
|
2491
|
+
base.WebApiBase.SetCompleted(options);
|
|
2492
|
+
const res = response.data;
|
|
2493
|
+
resolve(res);
|
|
2494
|
+
}
|
|
2495
|
+
catch( err ) {
|
|
2496
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2497
|
+
reject(err);
|
|
2498
|
+
}
|
|
2499
|
+
});
|
|
2500
|
+
}
|
|
2501
|
+
|
|
2502
|
+
|
|
2503
|
+
|
|
2504
|
+
/**
|
|
2505
|
+
* Deletes an associate of type external user.
|
|
2506
|
+
* @param request - AssociateId
|
|
2507
|
+
* @returns
|
|
2508
|
+
*/
|
|
2509
|
+
public async deleteExternalUserAsync(request: carriers.User_DeleteExternalUserRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
2510
|
+
|
|
2511
|
+
/**
|
|
2512
|
+
* Deletes an associate of type external user.
|
|
2513
|
+
* @param associateId - The associateId to delete the associate entry for.
|
|
2514
|
+
* @returns
|
|
2515
|
+
*/
|
|
2516
|
+
public async deleteExternalUserAsync(associateId: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
2517
|
+
|
|
2518
|
+
public async deleteExternalUserAsync(associateId:number|carriers.User_DeleteExternalUserRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
2519
|
+
let _request : carriers.User_DeleteExternalUserRequest = null;
|
|
2520
|
+
let _options : base.WebApiRequestOptions = null;
|
|
2521
|
+
const first : any = associateId;
|
|
2522
|
+
if( typeof( first ) === "object" && first && ( typeof(first.associateId)!='undefined' ) )
|
|
2523
|
+
{
|
|
2524
|
+
_request = associateId as carriers.User_DeleteExternalUserRequest;
|
|
2525
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
2526
|
+
}
|
|
2527
|
+
else
|
|
2528
|
+
{
|
|
2529
|
+
_request = {
|
|
2530
|
+
associateId: associateId as number,
|
|
2531
|
+
};
|
|
2532
|
+
_options = webapi_options;
|
|
2533
|
+
}
|
|
2534
|
+
return this._deleteExternalUserAsync( _request, _options );
|
|
2535
|
+
}
|
|
2536
|
+
|
|
2537
|
+
|
|
2538
|
+
private async _setExternalUserInfoAsync(request: carriers.User_SetExternalUserInfoRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
2539
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2540
|
+
base.WebApiBase.SetPending(options);
|
|
2541
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
2542
|
+
try {
|
|
2543
|
+
config.baseURL = this._options.baseUrl;
|
|
2544
|
+
const response = await this._axios.post("SetExternalUserInfo", request , config);
|
|
2545
|
+
base.WebApiBase.SetCompleted(options);
|
|
2546
|
+
const res = response.data;
|
|
2547
|
+
resolve(res);
|
|
2548
|
+
}
|
|
2549
|
+
catch( err ) {
|
|
2550
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2551
|
+
reject(err);
|
|
2552
|
+
}
|
|
2553
|
+
});
|
|
2554
|
+
}
|
|
2555
|
+
|
|
2556
|
+
|
|
2557
|
+
|
|
2558
|
+
/**
|
|
2559
|
+
* Modifies an external user. Changes external users information according to the flags set in externalUserInfoModification.
|
|
2560
|
+
* @param request - AssociateId, UserName, Password, IsActive, RoleId, ExternalUserInfoModification
|
|
2561
|
+
* @returns
|
|
2562
|
+
*/
|
|
2563
|
+
public async setExternalUserInfoAsync(request: carriers.User_SetExternalUserInfoRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
2564
|
+
|
|
2565
|
+
/**
|
|
2566
|
+
* Modifies an external user. Changes external users information according to the flags set in externalUserInfoModification.
|
|
2567
|
+
* @param associateId - The associateId to alter.
|
|
2568
|
+
* @param userName - Login username.
|
|
2569
|
+
* @param password - Login password.
|
|
2570
|
+
* @param isActive - Set isActive to true to enable the external user to log in.
|
|
2571
|
+
* @param roleId - Id of role for the external user. The role must be a role of type external users.
|
|
2572
|
+
* @param externalUserInfoModification - externalUserInfoModification is a flag describing what to change. <see cref="SuperOffice.CRM.Services.Util.ExternalUserInfoModification"/>.
|
|
2573
|
+
* @returns
|
|
2574
|
+
*/
|
|
2575
|
+
public async setExternalUserInfoAsync(associateId: number, userName: string, password: string, isActive: boolean, roleId: number, externalUserInfoModification: enums.ExternalUserInfoModification, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
2576
|
+
|
|
2577
|
+
public async setExternalUserInfoAsync(associateId:number|carriers.User_SetExternalUserInfoRequest, userName?:string|base.WebApiRequestOptions, password?:string, isActive?:boolean, roleId?:number, externalUserInfoModification?:enums.ExternalUserInfoModification, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
2578
|
+
let _request : carriers.User_SetExternalUserInfoRequest = null;
|
|
2579
|
+
let _options : base.WebApiRequestOptions = null;
|
|
2580
|
+
const first : any = associateId;
|
|
2581
|
+
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' ) )
|
|
2582
|
+
{
|
|
2583
|
+
_request = associateId as carriers.User_SetExternalUserInfoRequest;
|
|
2584
|
+
_options = userName as base.WebApiRequestOptions;
|
|
2585
|
+
}
|
|
2586
|
+
else
|
|
2587
|
+
{
|
|
2588
|
+
_request = {
|
|
2589
|
+
associateId: associateId as number,
|
|
2590
|
+
userName: userName as string,
|
|
2591
|
+
password: password as string,
|
|
2592
|
+
isActive: isActive as boolean,
|
|
2593
|
+
roleId: roleId as number,
|
|
2594
|
+
externalUserInfoModification: externalUserInfoModification as enums.ExternalUserInfoModification,
|
|
2595
|
+
};
|
|
2596
|
+
_options = webapi_options;
|
|
2597
|
+
}
|
|
2598
|
+
return this._setExternalUserInfoAsync( _request, _options );
|
|
2599
|
+
}
|
|
2600
|
+
|
|
2601
|
+
|
|
2602
|
+
private async _generateNewPasswordForExternalUserAsync(request: carriers.User_GenerateNewPasswordForExternalUserRequest, options?:base.WebApiRequestOptions) : Promise< string > {
|
|
2603
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2604
|
+
base.WebApiBase.SetPending(options);
|
|
2605
|
+
return new Promise< string >(async (resolve, reject) => {
|
|
2606
|
+
try {
|
|
2607
|
+
config.baseURL = this._options.baseUrl;
|
|
2608
|
+
const response = await this._axios.post("GenerateNewPasswordForExternalUser", request , config);
|
|
2609
|
+
base.WebApiBase.SetCompleted(options);
|
|
2610
|
+
const res : string = response.data as string;
|
|
2611
|
+
resolve(res);
|
|
2612
|
+
}
|
|
2613
|
+
catch( err ) {
|
|
2614
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2615
|
+
reject(err);
|
|
2616
|
+
}
|
|
2617
|
+
});
|
|
2618
|
+
}
|
|
2619
|
+
|
|
2620
|
+
|
|
2621
|
+
|
|
2622
|
+
/**
|
|
2623
|
+
* Generates a new password for an external user.
|
|
2624
|
+
* @param request - AssociateName
|
|
2625
|
+
* @returns Returns the generated password.
|
|
2626
|
+
*/
|
|
2627
|
+
public async generateNewPasswordForExternalUserAsync(request: carriers.User_GenerateNewPasswordForExternalUserRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
2628
|
+
|
|
2629
|
+
/**
|
|
2630
|
+
* Generates a new password for an external user.
|
|
2631
|
+
* @param associateName - The name of the associate to change the password for.
|
|
2632
|
+
* @returns Returns the generated password.
|
|
2633
|
+
*/
|
|
2634
|
+
public async generateNewPasswordForExternalUserAsync(associateName: string, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
2635
|
+
|
|
2636
|
+
public async generateNewPasswordForExternalUserAsync(associateName:string|carriers.User_GenerateNewPasswordForExternalUserRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string > {
|
|
2637
|
+
let _request : carriers.User_GenerateNewPasswordForExternalUserRequest = null;
|
|
2638
|
+
let _options : base.WebApiRequestOptions = null;
|
|
2639
|
+
const first : any = associateName;
|
|
2640
|
+
if( typeof( first ) === "object" && first && ( typeof(first.associateName)!='undefined' ) )
|
|
2641
|
+
{
|
|
2642
|
+
_request = associateName as carriers.User_GenerateNewPasswordForExternalUserRequest;
|
|
2643
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
2644
|
+
}
|
|
2645
|
+
else
|
|
2646
|
+
{
|
|
2647
|
+
_request = {
|
|
2648
|
+
associateName: associateName as string,
|
|
2649
|
+
};
|
|
2650
|
+
_options = webapi_options;
|
|
2651
|
+
}
|
|
2652
|
+
return this._generateNewPasswordForExternalUserAsync( _request, _options );
|
|
2653
|
+
}
|
|
2654
|
+
|
|
2655
|
+
|
|
2656
|
+
private async _canChangePasswordAsync(request: carriers.User_CanChangePasswordRequest, options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
2657
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2658
|
+
base.WebApiBase.SetPending(options);
|
|
2659
|
+
return new Promise< boolean >(async (resolve, reject) => {
|
|
2660
|
+
try {
|
|
2661
|
+
config.baseURL = this._options.baseUrl;
|
|
2662
|
+
const response = await this._axios.post("CanChangePassword", request , config);
|
|
2663
|
+
base.WebApiBase.SetCompleted(options);
|
|
2664
|
+
const res : boolean = response.data as boolean;
|
|
2665
|
+
resolve(res);
|
|
2666
|
+
}
|
|
2667
|
+
catch( err ) {
|
|
2668
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2669
|
+
reject(err);
|
|
2670
|
+
}
|
|
2671
|
+
});
|
|
2672
|
+
}
|
|
2673
|
+
|
|
2674
|
+
|
|
2675
|
+
|
|
2676
|
+
/**
|
|
2677
|
+
* Check if the current assoicate can change the password for an associate
|
|
2678
|
+
* @param request - AssociateId
|
|
2679
|
+
* @returns True if the associate can change the password
|
|
2680
|
+
*/
|
|
2681
|
+
public async canChangePasswordAsync(request: carriers.User_CanChangePasswordRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
2682
|
+
|
|
2683
|
+
/**
|
|
2684
|
+
* Check if the current assoicate can change the password for an associate
|
|
2685
|
+
* @param associateId - AssociateId of the user to check if password can be changed
|
|
2686
|
+
* @returns True if the associate can change the password
|
|
2687
|
+
*/
|
|
2688
|
+
public async canChangePasswordAsync(associateId: number, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
2689
|
+
|
|
2690
|
+
public async canChangePasswordAsync(associateId:number|carriers.User_CanChangePasswordRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
2691
|
+
let _request : carriers.User_CanChangePasswordRequest = null;
|
|
2692
|
+
let _options : base.WebApiRequestOptions = null;
|
|
2693
|
+
const first : any = associateId;
|
|
2694
|
+
if( typeof( first ) === "object" && first && ( typeof(first.associateId)!='undefined' ) )
|
|
2695
|
+
{
|
|
2696
|
+
_request = associateId as carriers.User_CanChangePasswordRequest;
|
|
2697
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
2698
|
+
}
|
|
2699
|
+
else
|
|
2700
|
+
{
|
|
2701
|
+
_request = {
|
|
2702
|
+
associateId: associateId as number,
|
|
2703
|
+
};
|
|
2704
|
+
_options = webapi_options;
|
|
2705
|
+
}
|
|
2706
|
+
return this._canChangePasswordAsync( _request, _options );
|
|
2707
|
+
}
|
|
2708
|
+
|
|
2709
|
+
|
|
2710
|
+
private async _getSupportedChangePasswordTypesAsync(request: carriers.User_GetSupportedChangePasswordTypesRequest, options?:base.WebApiRequestOptions) : Promise< enums.ChangePasswordType[] > {
|
|
2711
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2712
|
+
base.WebApiBase.SetPending(options);
|
|
2713
|
+
return new Promise< enums.ChangePasswordType[] >(async (resolve, reject) => {
|
|
2714
|
+
try {
|
|
2715
|
+
config.baseURL = this._options.baseUrl;
|
|
2716
|
+
const response = await this._axios.post("GetSupportedChangePasswordTypes", request , config);
|
|
2717
|
+
base.WebApiBase.SetCompleted(options);
|
|
2718
|
+
const res : enums.ChangePasswordType[] = response.data as enums.ChangePasswordType[];
|
|
2719
|
+
resolve(res);
|
|
2720
|
+
}
|
|
2721
|
+
catch( err ) {
|
|
2722
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2723
|
+
reject(err);
|
|
2724
|
+
}
|
|
2725
|
+
});
|
|
2726
|
+
}
|
|
2727
|
+
|
|
2728
|
+
|
|
2729
|
+
|
|
2730
|
+
/**
|
|
2731
|
+
* Get the different methods the user can use to change password
|
|
2732
|
+
* @param request - AssociateId
|
|
2733
|
+
* @returns List of types - empty if the user cannot change password in any way
|
|
2734
|
+
*/
|
|
2735
|
+
public async getSupportedChangePasswordTypesAsync(request: carriers.User_GetSupportedChangePasswordTypesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< enums.ChangePasswordType[] >;
|
|
2736
|
+
|
|
2737
|
+
/**
|
|
2738
|
+
* Get the different methods the user can use to change password
|
|
2739
|
+
* @param associateId - AssociateId of the user to check if password can be changed
|
|
2740
|
+
* @returns List of types - empty if the user cannot change password in any way
|
|
2741
|
+
*/
|
|
2742
|
+
public async getSupportedChangePasswordTypesAsync(associateId: number, webapi_options?:base.WebApiRequestOptions) : Promise< enums.ChangePasswordType[] >;
|
|
2743
|
+
|
|
2744
|
+
public async getSupportedChangePasswordTypesAsync(associateId:number|carriers.User_GetSupportedChangePasswordTypesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< enums.ChangePasswordType[] > {
|
|
2745
|
+
let _request : carriers.User_GetSupportedChangePasswordTypesRequest = null;
|
|
2746
|
+
let _options : base.WebApiRequestOptions = null;
|
|
2747
|
+
const first : any = associateId;
|
|
2748
|
+
if( typeof( first ) === "object" && first && ( typeof(first.associateId)!='undefined' ) )
|
|
2749
|
+
{
|
|
2750
|
+
_request = associateId as carriers.User_GetSupportedChangePasswordTypesRequest;
|
|
2751
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
2752
|
+
}
|
|
2753
|
+
else
|
|
2754
|
+
{
|
|
2755
|
+
_request = {
|
|
2756
|
+
associateId: associateId as number,
|
|
2757
|
+
};
|
|
2758
|
+
_options = webapi_options;
|
|
2759
|
+
}
|
|
2760
|
+
return this._getSupportedChangePasswordTypesAsync( _request, _options );
|
|
2761
|
+
}
|
|
2762
|
+
|
|
2763
|
+
|
|
2764
|
+
private async _changePasswordAsync(request: carriers.User_ChangePasswordRequest, options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
2765
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2766
|
+
base.WebApiBase.SetPending(options);
|
|
2767
|
+
return new Promise< boolean >(async (resolve, reject) => {
|
|
2768
|
+
try {
|
|
2769
|
+
config.baseURL = this._options.baseUrl;
|
|
2770
|
+
const response = await this._axios.post("ChangePassword", request , config);
|
|
2771
|
+
base.WebApiBase.SetCompleted(options);
|
|
2772
|
+
const res : boolean = response.data as boolean;
|
|
2773
|
+
resolve(res);
|
|
2774
|
+
}
|
|
2775
|
+
catch( err ) {
|
|
2776
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2777
|
+
reject(err);
|
|
2778
|
+
}
|
|
2779
|
+
});
|
|
2780
|
+
}
|
|
2781
|
+
|
|
2782
|
+
|
|
2783
|
+
|
|
2784
|
+
/**
|
|
2785
|
+
* Change password for a user.
|
|
2786
|
+
* @param request - AssociateId, OldPassword, NewPassword
|
|
2787
|
+
* @returns True if the password was successfully changed.
|
|
2788
|
+
*/
|
|
2789
|
+
public async changePasswordAsync(request: carriers.User_ChangePasswordRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
2790
|
+
|
|
2791
|
+
/**
|
|
2792
|
+
* Change password for a user.
|
|
2793
|
+
* @param associateId - AssociateId of the user to change password for.
|
|
2794
|
+
* @param oldPassword - The current password of the user. Administrators can leave this blank to force a new password upon a user.
|
|
2795
|
+
* @param newPassword - The new password for the user
|
|
2796
|
+
* @returns True if the password was successfully changed.
|
|
2797
|
+
*/
|
|
2798
|
+
public async changePasswordAsync(associateId: number, oldPassword: string, newPassword: string, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
2799
|
+
|
|
2800
|
+
public async changePasswordAsync(associateId:number|carriers.User_ChangePasswordRequest, oldPassword?:string|base.WebApiRequestOptions, newPassword?:string, webapi_options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
2801
|
+
let _request : carriers.User_ChangePasswordRequest = null;
|
|
2802
|
+
let _options : base.WebApiRequestOptions = null;
|
|
2803
|
+
const first : any = associateId;
|
|
2804
|
+
if( typeof( first ) === "object" && first && ( typeof(first.associateId)!='undefined' || typeof(first.oldPassword)!='undefined' || typeof(first.newPassword)!='undefined' ) )
|
|
2805
|
+
{
|
|
2806
|
+
_request = associateId as carriers.User_ChangePasswordRequest;
|
|
2807
|
+
_options = oldPassword as base.WebApiRequestOptions;
|
|
2808
|
+
}
|
|
2809
|
+
else
|
|
2810
|
+
{
|
|
2811
|
+
_request = {
|
|
2812
|
+
associateId: associateId as number,
|
|
2813
|
+
oldPassword: oldPassword as string,
|
|
2814
|
+
newPassword: newPassword as string,
|
|
2815
|
+
};
|
|
2816
|
+
_options = webapi_options;
|
|
2817
|
+
}
|
|
2818
|
+
return this._changePasswordAsync( _request, _options );
|
|
2819
|
+
}
|
|
2820
|
+
|
|
2821
|
+
|
|
2822
|
+
private async _sendChangePasswordEMailAsync(request: carriers.User_SendChangePasswordEMailRequest, options?:base.WebApiRequestOptions) : Promise< carriers.OperationResult > {
|
|
2823
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2824
|
+
base.WebApiBase.SetPending(options);
|
|
2825
|
+
return new Promise< carriers.OperationResult >(async (resolve, reject) => {
|
|
2826
|
+
try {
|
|
2827
|
+
config.baseURL = this._options.baseUrl;
|
|
2828
|
+
const response = await this._axios.post("SendChangePasswordEMail", request , config);
|
|
2829
|
+
base.WebApiBase.SetCompleted(options);
|
|
2830
|
+
const res : carriers.OperationResult = converters.Create_OperationResult_From( response.data );
|
|
2831
|
+
resolve(res);
|
|
2832
|
+
}
|
|
2833
|
+
catch( err ) {
|
|
2834
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2835
|
+
reject(err);
|
|
2836
|
+
}
|
|
2837
|
+
});
|
|
2838
|
+
}
|
|
2839
|
+
|
|
2840
|
+
|
|
2841
|
+
|
|
2842
|
+
/**
|
|
2843
|
+
* Send a change password email to this users registered address.
|
|
2844
|
+
* @param request - AssociateId
|
|
2845
|
+
* @returns Result - with result flag and optional error reason.
|
|
2846
|
+
*/
|
|
2847
|
+
public async sendChangePasswordEMailAsync(request: carriers.User_SendChangePasswordEMailRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.OperationResult >;
|
|
2848
|
+
|
|
2849
|
+
/**
|
|
2850
|
+
* Send a change password email to this users registered address.
|
|
2851
|
+
* @param associateId - AssociateId of the user to change password for.
|
|
2852
|
+
* @returns Result - with result flag and optional error reason.
|
|
2853
|
+
*/
|
|
2854
|
+
public async sendChangePasswordEMailAsync(associateId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.OperationResult >;
|
|
2855
|
+
|
|
2856
|
+
public async sendChangePasswordEMailAsync(associateId:number|carriers.User_SendChangePasswordEMailRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.OperationResult > {
|
|
2857
|
+
let _request : carriers.User_SendChangePasswordEMailRequest = null;
|
|
2858
|
+
let _options : base.WebApiRequestOptions = null;
|
|
2859
|
+
const first : any = associateId;
|
|
2860
|
+
if( typeof( first ) === "object" && first && ( typeof(first.associateId)!='undefined' ) )
|
|
2861
|
+
{
|
|
2862
|
+
_request = associateId as carriers.User_SendChangePasswordEMailRequest;
|
|
2863
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
2864
|
+
}
|
|
2865
|
+
else
|
|
2866
|
+
{
|
|
2867
|
+
_request = {
|
|
2868
|
+
associateId: associateId as number,
|
|
2869
|
+
};
|
|
2870
|
+
_options = webapi_options;
|
|
2871
|
+
}
|
|
2872
|
+
return this._sendChangePasswordEMailAsync( _request, _options );
|
|
2873
|
+
}
|
|
2874
|
+
|
|
2875
|
+
|
|
2876
|
+
private async _getUserFromPersonIdAsync(request: carriers.User_GetUserFromPersonIdRequest, options?:base.WebApiRequestOptions) : Promise< carriers.User[] > {
|
|
2877
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2878
|
+
base.WebApiBase.SetPending(options);
|
|
2879
|
+
return new Promise< carriers.User[] >(async (resolve, reject) => {
|
|
2880
|
+
try {
|
|
2881
|
+
config.baseURL = this._options.baseUrl;
|
|
2882
|
+
const response = await this._axios.post("GetUserFromPersonId", request , config);
|
|
2883
|
+
base.WebApiBase.SetCompleted(options);
|
|
2884
|
+
const res : carriers.User[] = converters.Create_UserArray_From( response.data );
|
|
2885
|
+
resolve(res);
|
|
2886
|
+
}
|
|
2887
|
+
catch( err ) {
|
|
2888
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2889
|
+
reject(err);
|
|
2890
|
+
}
|
|
2891
|
+
});
|
|
2892
|
+
}
|
|
2893
|
+
|
|
2894
|
+
|
|
2895
|
+
|
|
2896
|
+
/**
|
|
2897
|
+
* Returns the user associated with the supplied person id
|
|
2898
|
+
* @param request - PersonId
|
|
2899
|
+
* @returns
|
|
2900
|
+
*/
|
|
2901
|
+
public async getUserFromPersonIdAsync(request: carriers.User_GetUserFromPersonIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.User[] >;
|
|
2902
|
+
|
|
2903
|
+
/**
|
|
2904
|
+
* Returns the user associated with the supplied person id
|
|
2905
|
+
* @param personId -
|
|
2906
|
+
* @returns
|
|
2907
|
+
*/
|
|
2908
|
+
public async getUserFromPersonIdAsync(personId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.User[] >;
|
|
2909
|
+
|
|
2910
|
+
public async getUserFromPersonIdAsync(personId:number|carriers.User_GetUserFromPersonIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.User[] > {
|
|
2911
|
+
let _request : carriers.User_GetUserFromPersonIdRequest = null;
|
|
2912
|
+
let _options : base.WebApiRequestOptions = null;
|
|
2913
|
+
const first : any = personId;
|
|
2914
|
+
if( typeof( first ) === "object" && first && ( typeof(first.personId)!='undefined' ) )
|
|
2915
|
+
{
|
|
2916
|
+
_request = personId as carriers.User_GetUserFromPersonIdRequest;
|
|
2917
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
2918
|
+
}
|
|
2919
|
+
else
|
|
2920
|
+
{
|
|
2921
|
+
_request = {
|
|
2922
|
+
personId: personId as number,
|
|
2923
|
+
};
|
|
2924
|
+
_options = webapi_options;
|
|
2925
|
+
}
|
|
2926
|
+
return this._getUserFromPersonIdAsync( _request, _options );
|
|
2927
|
+
}
|
|
2928
|
+
|
|
2929
|
+
|
|
2930
|
+
private async _createDefaultUserFromUserTypeAndPersonIdAsync(request: carriers.User_CreateDefaultUserFromUserTypeAndPersonIdRequest, options?:base.WebApiRequestOptions) : Promise< carriers.User > {
|
|
2931
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2932
|
+
base.WebApiBase.SetPending(options);
|
|
2933
|
+
return new Promise< carriers.User >(async (resolve, reject) => {
|
|
2934
|
+
try {
|
|
2935
|
+
config.baseURL = this._options.baseUrl;
|
|
2936
|
+
const response = await this._axios.post("CreateDefaultUserFromUserTypeAndPersonId", request , config);
|
|
2937
|
+
base.WebApiBase.SetCompleted(options);
|
|
2938
|
+
const res : carriers.User = converters.Create_User_From( response.data );
|
|
2939
|
+
resolve(res);
|
|
2940
|
+
}
|
|
2941
|
+
catch( err ) {
|
|
2942
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2943
|
+
reject(err);
|
|
2944
|
+
}
|
|
2945
|
+
});
|
|
2946
|
+
}
|
|
2947
|
+
|
|
2948
|
+
|
|
2949
|
+
|
|
2950
|
+
/**
|
|
2951
|
+
* Create default User providing the associate type and person id. System and Anonymous users can be created without an exsisting person and permits person id to be 0.
|
|
2952
|
+
* @param request - UserType, PersonId
|
|
2953
|
+
* @returns New user object with defalt values set.
|
|
2954
|
+
*/
|
|
2955
|
+
public async createDefaultUserFromUserTypeAndPersonIdAsync(request: carriers.User_CreateDefaultUserFromUserTypeAndPersonIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.User >;
|
|
2956
|
+
|
|
2957
|
+
/**
|
|
2958
|
+
* Create default User providing the associate type and person id. System and Anonymous users can be created without an exsisting person and permits person id to be 0.
|
|
2959
|
+
* @param userType - Type of associate for the user
|
|
2960
|
+
* @param personId - Primary key of the person to become a user.
|
|
2961
|
+
* @returns New user object with defalt values set.
|
|
2962
|
+
*/
|
|
2963
|
+
public async createDefaultUserFromUserTypeAndPersonIdAsync(userType: enums.UserType, personId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.User >;
|
|
2964
|
+
|
|
2965
|
+
public async createDefaultUserFromUserTypeAndPersonIdAsync(userType:enums.UserType|carriers.User_CreateDefaultUserFromUserTypeAndPersonIdRequest, personId?:number|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.User > {
|
|
2966
|
+
let _request : carriers.User_CreateDefaultUserFromUserTypeAndPersonIdRequest = null;
|
|
2967
|
+
let _options : base.WebApiRequestOptions = null;
|
|
2968
|
+
const first : any = userType;
|
|
2969
|
+
if( typeof( first ) === "object" && first && ( typeof(first.userType)!='undefined' || typeof(first.personId)!='undefined' ) )
|
|
2970
|
+
{
|
|
2971
|
+
_request = userType as carriers.User_CreateDefaultUserFromUserTypeAndPersonIdRequest;
|
|
2972
|
+
_options = personId as base.WebApiRequestOptions;
|
|
2973
|
+
}
|
|
2974
|
+
else
|
|
2975
|
+
{
|
|
2976
|
+
_request = {
|
|
2977
|
+
userType: userType as enums.UserType,
|
|
2978
|
+
personId: personId as number,
|
|
2979
|
+
};
|
|
2980
|
+
_options = webapi_options;
|
|
2981
|
+
}
|
|
2982
|
+
return this._createDefaultUserFromUserTypeAndPersonIdAsync( _request, _options );
|
|
2983
|
+
}
|
|
2984
|
+
|
|
2985
|
+
|
|
2986
|
+
private async _createDefaultUserFromUserTypeAsync(request: carriers.User_CreateDefaultUserFromUserTypeRequest, options?:base.WebApiRequestOptions) : Promise< carriers.User > {
|
|
2987
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2988
|
+
base.WebApiBase.SetPending(options);
|
|
2989
|
+
return new Promise< carriers.User >(async (resolve, reject) => {
|
|
2990
|
+
try {
|
|
2991
|
+
config.baseURL = this._options.baseUrl;
|
|
2992
|
+
const response = await this._axios.post("CreateDefaultUserFromUserType", request , config);
|
|
2993
|
+
base.WebApiBase.SetCompleted(options);
|
|
2994
|
+
const res : carriers.User = converters.Create_User_From( response.data );
|
|
2995
|
+
resolve(res);
|
|
2996
|
+
}
|
|
2997
|
+
catch( err ) {
|
|
2998
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2999
|
+
reject(err);
|
|
3000
|
+
}
|
|
3001
|
+
});
|
|
3002
|
+
}
|
|
3003
|
+
|
|
3004
|
+
|
|
3005
|
+
|
|
3006
|
+
/**
|
|
3007
|
+
* Create default User providing the user type. Only System and Anonymous users can be created without an exsisting person. Use CreateDefaultUserFromUserTypeAndPersonId to create internal (i.e. Employee) or external users.
|
|
3008
|
+
* @param request - UserType
|
|
3009
|
+
* @returns New user object with defalt values set.
|
|
3010
|
+
*/
|
|
3011
|
+
public async createDefaultUserFromUserTypeAsync(request: carriers.User_CreateDefaultUserFromUserTypeRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.User >;
|
|
3012
|
+
|
|
3013
|
+
/**
|
|
3014
|
+
* Create default User providing the user type. Only System and Anonymous users can be created without an exsisting person. Use CreateDefaultUserFromUserTypeAndPersonId to create internal (i.e. Employee) or external users.
|
|
3015
|
+
* @param userType - Type of associate for the user. This can only be System or Anonymous. Use CreateDefaultUserFromUserTypeAndPersonId to create internal (i.e. Employee) or external users.
|
|
3016
|
+
* @returns New user object with defalt values set.
|
|
3017
|
+
*/
|
|
3018
|
+
public async createDefaultUserFromUserTypeAsync(userType: enums.UserType, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.User >;
|
|
3019
|
+
|
|
3020
|
+
public async createDefaultUserFromUserTypeAsync(userType:enums.UserType|carriers.User_CreateDefaultUserFromUserTypeRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.User > {
|
|
3021
|
+
let _request : carriers.User_CreateDefaultUserFromUserTypeRequest = null;
|
|
3022
|
+
let _options : base.WebApiRequestOptions = null;
|
|
3023
|
+
const first : any = userType;
|
|
3024
|
+
if( typeof( first ) === "object" && first && ( typeof(first.userType)!='undefined' ) )
|
|
3025
|
+
{
|
|
3026
|
+
_request = userType as carriers.User_CreateDefaultUserFromUserTypeRequest;
|
|
3027
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
3028
|
+
}
|
|
3029
|
+
else
|
|
3030
|
+
{
|
|
3031
|
+
_request = {
|
|
3032
|
+
userType: userType as enums.UserType,
|
|
3033
|
+
};
|
|
3034
|
+
_options = webapi_options;
|
|
3035
|
+
}
|
|
3036
|
+
return this._createDefaultUserFromUserTypeAsync( _request, _options );
|
|
3037
|
+
}
|
|
3038
|
+
|
|
3039
|
+
|
|
3040
|
+
private async _getUserFromEjUserIdAsync(request: carriers.User_GetUserFromEjUserIdRequest, options?:base.WebApiRequestOptions) : Promise< carriers.User[] > {
|
|
3041
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
3042
|
+
base.WebApiBase.SetPending(options);
|
|
3043
|
+
return new Promise< carriers.User[] >(async (resolve, reject) => {
|
|
3044
|
+
try {
|
|
3045
|
+
config.baseURL = this._options.baseUrl;
|
|
3046
|
+
const response = await this._axios.post("GetUserFromEjUserId", request , config);
|
|
3047
|
+
base.WebApiBase.SetCompleted(options);
|
|
3048
|
+
const res : carriers.User[] = converters.Create_UserArray_From( response.data );
|
|
3049
|
+
resolve(res);
|
|
3050
|
+
}
|
|
3051
|
+
catch( err ) {
|
|
3052
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
3053
|
+
reject(err);
|
|
3054
|
+
}
|
|
3055
|
+
});
|
|
3056
|
+
}
|
|
3057
|
+
|
|
3058
|
+
|
|
3059
|
+
|
|
3060
|
+
/**
|
|
3061
|
+
* Get user from ejUserId - used for eJournal Legacy Support.
|
|
3062
|
+
* @param request - EjUserId
|
|
3063
|
+
* @returns
|
|
3064
|
+
*/
|
|
3065
|
+
public async getUserFromEjUserIdAsync(request: carriers.User_GetUserFromEjUserIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.User[] >;
|
|
3066
|
+
|
|
3067
|
+
/**
|
|
3068
|
+
* Get user from ejUserId - used for eJournal Legacy Support.
|
|
3069
|
+
* @param ejUserId - ejUserId -
|
|
3070
|
+
* @returns
|
|
3071
|
+
*/
|
|
3072
|
+
public async getUserFromEjUserIdAsync(ejUserId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.User[] >;
|
|
3073
|
+
|
|
3074
|
+
public async getUserFromEjUserIdAsync(ejUserId:number|carriers.User_GetUserFromEjUserIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.User[] > {
|
|
3075
|
+
let _request : carriers.User_GetUserFromEjUserIdRequest = null;
|
|
3076
|
+
let _options : base.WebApiRequestOptions = null;
|
|
3077
|
+
const first : any = ejUserId;
|
|
3078
|
+
if( typeof( first ) === "object" && first && ( typeof(first.ejUserId)!='undefined' ) )
|
|
3079
|
+
{
|
|
3080
|
+
_request = ejUserId as carriers.User_GetUserFromEjUserIdRequest;
|
|
3081
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
3082
|
+
}
|
|
3083
|
+
else
|
|
3084
|
+
{
|
|
3085
|
+
_request = {
|
|
3086
|
+
ejUserId: ejUserId as number,
|
|
3087
|
+
};
|
|
3088
|
+
_options = webapi_options;
|
|
3089
|
+
}
|
|
3090
|
+
return this._getUserFromEjUserIdAsync( _request, _options );
|
|
3091
|
+
}
|
|
3092
|
+
|
|
3093
|
+
|
|
3094
|
+
private async _setPasswordFromNameAsync(request: carriers.User_SetPasswordFromNameRequest, options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
3095
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
3096
|
+
base.WebApiBase.SetPending(options);
|
|
3097
|
+
return new Promise< boolean >(async (resolve, reject) => {
|
|
3098
|
+
try {
|
|
3099
|
+
config.baseURL = this._options.baseUrl;
|
|
3100
|
+
const response = await this._axios.post("SetPasswordFromName", request , config);
|
|
3101
|
+
base.WebApiBase.SetCompleted(options);
|
|
3102
|
+
const res : boolean = response.data as boolean;
|
|
3103
|
+
resolve(res);
|
|
3104
|
+
}
|
|
3105
|
+
catch( err ) {
|
|
3106
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
3107
|
+
reject(err);
|
|
3108
|
+
}
|
|
3109
|
+
});
|
|
3110
|
+
}
|
|
3111
|
+
|
|
3112
|
+
|
|
3113
|
+
|
|
3114
|
+
/**
|
|
3115
|
+
* Change password for a user.
|
|
3116
|
+
* @param request - AssociateName, Password
|
|
3117
|
+
* @returns Succeeded?
|
|
3118
|
+
*/
|
|
3119
|
+
public async setPasswordFromNameAsync(request: carriers.User_SetPasswordFromNameRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
3120
|
+
|
|
3121
|
+
/**
|
|
3122
|
+
* Change password for a user.
|
|
3123
|
+
* @param associateName - Username to set password for
|
|
3124
|
+
* @param password - New password
|
|
3125
|
+
* @returns Succeeded?
|
|
3126
|
+
*/
|
|
3127
|
+
public async setPasswordFromNameAsync(associateName: string, password: string, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
3128
|
+
|
|
3129
|
+
public async setPasswordFromNameAsync(associateName:string|carriers.User_SetPasswordFromNameRequest, password?:string|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
3130
|
+
let _request : carriers.User_SetPasswordFromNameRequest = null;
|
|
3131
|
+
let _options : base.WebApiRequestOptions = null;
|
|
3132
|
+
const first : any = associateName;
|
|
3133
|
+
if( typeof( first ) === "object" && first && ( typeof(first.associateName)!='undefined' || typeof(first.password)!='undefined' ) )
|
|
3134
|
+
{
|
|
3135
|
+
_request = associateName as carriers.User_SetPasswordFromNameRequest;
|
|
3136
|
+
_options = password as base.WebApiRequestOptions;
|
|
3137
|
+
}
|
|
3138
|
+
else
|
|
3139
|
+
{
|
|
3140
|
+
_request = {
|
|
3141
|
+
associateName: associateName as string,
|
|
3142
|
+
password: password as string,
|
|
3143
|
+
};
|
|
3144
|
+
_options = webapi_options;
|
|
3145
|
+
}
|
|
3146
|
+
return this._setPasswordFromNameAsync( _request, _options );
|
|
3147
|
+
}
|
|
3148
|
+
|
|
3149
|
+
|
|
3150
|
+
private async _setPasswordAsync(request: carriers.User_SetPasswordRequest, options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
3151
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
3152
|
+
base.WebApiBase.SetPending(options);
|
|
3153
|
+
return new Promise< boolean >(async (resolve, reject) => {
|
|
3154
|
+
try {
|
|
3155
|
+
config.baseURL = this._options.baseUrl;
|
|
3156
|
+
const response = await this._axios.post("SetPassword", request , config);
|
|
3157
|
+
base.WebApiBase.SetCompleted(options);
|
|
3158
|
+
const res : boolean = response.data as boolean;
|
|
3159
|
+
resolve(res);
|
|
3160
|
+
}
|
|
3161
|
+
catch( err ) {
|
|
3162
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
3163
|
+
reject(err);
|
|
3164
|
+
}
|
|
3165
|
+
});
|
|
3166
|
+
}
|
|
3167
|
+
|
|
3168
|
+
|
|
3169
|
+
|
|
3170
|
+
/**
|
|
3171
|
+
* Change password for a user.
|
|
3172
|
+
* @param request - AssociateId, Password
|
|
3173
|
+
* @returns Succeeded?
|
|
3174
|
+
*/
|
|
3175
|
+
public async setPasswordAsync(request: carriers.User_SetPasswordRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
3176
|
+
|
|
3177
|
+
/**
|
|
3178
|
+
* Change password for a user.
|
|
3179
|
+
* @param associateId - Id of User to set password for
|
|
3180
|
+
* @param password - New password
|
|
3181
|
+
* @returns Succeeded?
|
|
3182
|
+
*/
|
|
3183
|
+
public async setPasswordAsync(associateId: number, password: string, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
3184
|
+
|
|
3185
|
+
public async setPasswordAsync(associateId:number|carriers.User_SetPasswordRequest, password?:string|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
3186
|
+
let _request : carriers.User_SetPasswordRequest = null;
|
|
3187
|
+
let _options : base.WebApiRequestOptions = null;
|
|
3188
|
+
const first : any = associateId;
|
|
3189
|
+
if( typeof( first ) === "object" && first && ( typeof(first.associateId)!='undefined' || typeof(first.password)!='undefined' ) )
|
|
3190
|
+
{
|
|
3191
|
+
_request = associateId as carriers.User_SetPasswordRequest;
|
|
3192
|
+
_options = password as base.WebApiRequestOptions;
|
|
3193
|
+
}
|
|
3194
|
+
else
|
|
3195
|
+
{
|
|
3196
|
+
_request = {
|
|
3197
|
+
associateId: associateId as number,
|
|
3198
|
+
password: password as string,
|
|
3199
|
+
};
|
|
3200
|
+
_options = webapi_options;
|
|
3201
|
+
}
|
|
3202
|
+
return this._setPasswordAsync( _request, _options );
|
|
3203
|
+
}
|
|
3204
|
+
|
|
3205
|
+
|
|
3206
|
+
private async _changeOwnPasswordAsync(request: carriers.User_ChangeOwnPasswordRequest, options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
3207
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
3208
|
+
base.WebApiBase.SetPending(options);
|
|
3209
|
+
return new Promise< boolean >(async (resolve, reject) => {
|
|
3210
|
+
try {
|
|
3211
|
+
config.baseURL = this._options.baseUrl;
|
|
3212
|
+
const response = await this._axios.post("ChangeOwnPassword", request , config);
|
|
3213
|
+
base.WebApiBase.SetCompleted(options);
|
|
3214
|
+
const res : boolean = response.data as boolean;
|
|
3215
|
+
resolve(res);
|
|
3216
|
+
}
|
|
3217
|
+
catch( err ) {
|
|
3218
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
3219
|
+
reject(err);
|
|
3220
|
+
}
|
|
3221
|
+
});
|
|
3222
|
+
}
|
|
3223
|
+
|
|
3224
|
+
|
|
3225
|
+
|
|
3226
|
+
/**
|
|
3227
|
+
* Change password for a user.
|
|
3228
|
+
* @param request - OldPassword, NewPassword
|
|
3229
|
+
* @returns True if the password was successfully changed.
|
|
3230
|
+
*/
|
|
3231
|
+
public async changeOwnPasswordAsync(request: carriers.User_ChangeOwnPasswordRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
3232
|
+
|
|
3233
|
+
/**
|
|
3234
|
+
* Change password for a user.
|
|
3235
|
+
* @param oldPassword - The current password of the user. Administrators can leave this blank to force a new password upon a user.
|
|
3236
|
+
* @param newPassword - The new password for the user
|
|
3237
|
+
* @returns True if the password was successfully changed.
|
|
3238
|
+
*/
|
|
3239
|
+
public async changeOwnPasswordAsync(oldPassword: string, newPassword: string, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
3240
|
+
|
|
3241
|
+
public async changeOwnPasswordAsync(oldPassword:string|carriers.User_ChangeOwnPasswordRequest, newPassword?:string|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
3242
|
+
let _request : carriers.User_ChangeOwnPasswordRequest = null;
|
|
3243
|
+
let _options : base.WebApiRequestOptions = null;
|
|
3244
|
+
const first : any = oldPassword;
|
|
3245
|
+
if( typeof( first ) === "object" && first && ( typeof(first.oldPassword)!='undefined' || typeof(first.newPassword)!='undefined' ) )
|
|
3246
|
+
{
|
|
3247
|
+
_request = oldPassword as carriers.User_ChangeOwnPasswordRequest;
|
|
3248
|
+
_options = newPassword as base.WebApiRequestOptions;
|
|
3249
|
+
}
|
|
3250
|
+
else
|
|
3251
|
+
{
|
|
3252
|
+
_request = {
|
|
3253
|
+
oldPassword: oldPassword as string,
|
|
3254
|
+
newPassword: newPassword as string,
|
|
3255
|
+
};
|
|
3256
|
+
_options = webapi_options;
|
|
3257
|
+
}
|
|
3258
|
+
return this._changeOwnPasswordAsync( _request, _options );
|
|
3259
|
+
}
|
|
3260
|
+
|
|
3261
|
+
|
|
3262
|
+
private async _changePasswordFromNameAsync(request: carriers.User_ChangePasswordFromNameRequest, options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
3263
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
3264
|
+
base.WebApiBase.SetPending(options);
|
|
3265
|
+
return new Promise< boolean >(async (resolve, reject) => {
|
|
3266
|
+
try {
|
|
3267
|
+
config.baseURL = this._options.baseUrl;
|
|
3268
|
+
const response = await this._axios.post("ChangePasswordFromName", request , config);
|
|
3269
|
+
base.WebApiBase.SetCompleted(options);
|
|
3270
|
+
const res : boolean = response.data as boolean;
|
|
3271
|
+
resolve(res);
|
|
3272
|
+
}
|
|
3273
|
+
catch( err ) {
|
|
3274
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
3275
|
+
reject(err);
|
|
3276
|
+
}
|
|
3277
|
+
});
|
|
3278
|
+
}
|
|
3279
|
+
|
|
3280
|
+
|
|
3281
|
+
|
|
3282
|
+
/**
|
|
3283
|
+
* Change password for a user.
|
|
3284
|
+
* @param request - AssociateName, OldPassword, NewPassword
|
|
3285
|
+
* @returns True if the password was successfully changed.
|
|
3286
|
+
*/
|
|
3287
|
+
public async changePasswordFromNameAsync(request: carriers.User_ChangePasswordFromNameRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
3288
|
+
|
|
3289
|
+
/**
|
|
3290
|
+
* Change password for a user.
|
|
3291
|
+
* @param associateName - Username of the user to change password for.
|
|
3292
|
+
* @param oldPassword - The current password of the user. Administrators can leave this blank to force a new password upon a user.
|
|
3293
|
+
* @param newPassword - The new password for the user
|
|
3294
|
+
* @returns True if the password was successfully changed.
|
|
3295
|
+
*/
|
|
3296
|
+
public async changePasswordFromNameAsync(associateName: string, oldPassword: string, newPassword: string, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
3297
|
+
|
|
3298
|
+
public async changePasswordFromNameAsync(associateName:string|carriers.User_ChangePasswordFromNameRequest, oldPassword?:string|base.WebApiRequestOptions, newPassword?:string, webapi_options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
3299
|
+
let _request : carriers.User_ChangePasswordFromNameRequest = null;
|
|
3300
|
+
let _options : base.WebApiRequestOptions = null;
|
|
3301
|
+
const first : any = associateName;
|
|
3302
|
+
if( typeof( first ) === "object" && first && ( typeof(first.associateName)!='undefined' || typeof(first.oldPassword)!='undefined' || typeof(first.newPassword)!='undefined' ) )
|
|
3303
|
+
{
|
|
3304
|
+
_request = associateName as carriers.User_ChangePasswordFromNameRequest;
|
|
3305
|
+
_options = oldPassword as base.WebApiRequestOptions;
|
|
3306
|
+
}
|
|
3307
|
+
else
|
|
3308
|
+
{
|
|
3309
|
+
_request = {
|
|
3310
|
+
associateName: associateName as string,
|
|
3311
|
+
oldPassword: oldPassword as string,
|
|
3312
|
+
newPassword: newPassword as string,
|
|
3313
|
+
};
|
|
3314
|
+
_options = webapi_options;
|
|
3315
|
+
}
|
|
3316
|
+
return this._changePasswordFromNameAsync( _request, _options );
|
|
3317
|
+
}
|
|
3318
|
+
|
|
3319
|
+
|
|
3320
|
+
private async _isUserNameValidAsync(request: carriers.User_IsUserNameValidRequest, options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
3321
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
3322
|
+
base.WebApiBase.SetPending(options);
|
|
3323
|
+
return new Promise< boolean >(async (resolve, reject) => {
|
|
3324
|
+
try {
|
|
3325
|
+
config.baseURL = this._options.baseUrl;
|
|
3326
|
+
const response = await this._axios.post("IsUserNameValid", request , config);
|
|
3327
|
+
base.WebApiBase.SetCompleted(options);
|
|
3328
|
+
const res : boolean = response.data as boolean;
|
|
3329
|
+
resolve(res);
|
|
3330
|
+
}
|
|
3331
|
+
catch( err ) {
|
|
3332
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
3333
|
+
reject(err);
|
|
3334
|
+
}
|
|
3335
|
+
});
|
|
3336
|
+
}
|
|
3337
|
+
|
|
3338
|
+
|
|
3339
|
+
|
|
3340
|
+
/**
|
|
3341
|
+
*
|
|
3342
|
+
* @param request - AssociateId, Type, PersonId, UserName
|
|
3343
|
+
* @returns
|
|
3344
|
+
*/
|
|
3345
|
+
public async isUserNameValidAsync(request: carriers.User_IsUserNameValidRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
3346
|
+
|
|
3347
|
+
/**
|
|
3348
|
+
*
|
|
3349
|
+
* @param associateId -
|
|
3350
|
+
* @param type -
|
|
3351
|
+
* @param personId -
|
|
3352
|
+
* @param userName -
|
|
3353
|
+
* @returns
|
|
3354
|
+
*/
|
|
3355
|
+
public async isUserNameValidAsync(associateId: number, type: enums.UserType, personId: number, userName: string, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
3356
|
+
|
|
3357
|
+
public async isUserNameValidAsync(associateId:number|carriers.User_IsUserNameValidRequest, type?:enums.UserType|base.WebApiRequestOptions, personId?:number, userName?:string, webapi_options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
3358
|
+
let _request : carriers.User_IsUserNameValidRequest = null;
|
|
3359
|
+
let _options : base.WebApiRequestOptions = null;
|
|
3360
|
+
const first : any = associateId;
|
|
3361
|
+
if( typeof( first ) === "object" && first && ( typeof(first.associateId)!='undefined' || typeof(first.type)!='undefined' || typeof(first.personId)!='undefined' || typeof(first.userName)!='undefined' ) )
|
|
3362
|
+
{
|
|
3363
|
+
_request = associateId as carriers.User_IsUserNameValidRequest;
|
|
3364
|
+
_options = type as base.WebApiRequestOptions;
|
|
3365
|
+
}
|
|
3366
|
+
else
|
|
3367
|
+
{
|
|
3368
|
+
_request = {
|
|
3369
|
+
associateId: associateId as number,
|
|
3370
|
+
type: type as enums.UserType,
|
|
3371
|
+
personId: personId as number,
|
|
3372
|
+
userName: userName as string,
|
|
3373
|
+
};
|
|
3374
|
+
_options = webapi_options;
|
|
3375
|
+
}
|
|
3376
|
+
return this._isUserNameValidAsync( _request, _options );
|
|
3377
|
+
}
|
|
3378
|
+
|
|
3379
|
+
|
|
3380
|
+
private async _isPasswordValidAsync(request: carriers.User_IsPasswordValidRequest, options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
3381
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
3382
|
+
base.WebApiBase.SetPending(options);
|
|
3383
|
+
return new Promise< boolean >(async (resolve, reject) => {
|
|
3384
|
+
try {
|
|
3385
|
+
config.baseURL = this._options.baseUrl;
|
|
3386
|
+
const response = await this._axios.post("IsPasswordValid", request , config);
|
|
3387
|
+
base.WebApiBase.SetCompleted(options);
|
|
3388
|
+
const res : boolean = response.data as boolean;
|
|
3389
|
+
resolve(res);
|
|
3390
|
+
}
|
|
3391
|
+
catch( err ) {
|
|
3392
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
3393
|
+
reject(err);
|
|
3394
|
+
}
|
|
3395
|
+
});
|
|
3396
|
+
}
|
|
3397
|
+
|
|
3398
|
+
|
|
3399
|
+
|
|
3400
|
+
/**
|
|
3401
|
+
*
|
|
3402
|
+
* @param request - AssociateId, Type, PersonId, Password
|
|
3403
|
+
* @returns
|
|
3404
|
+
*/
|
|
3405
|
+
public async isPasswordValidAsync(request: carriers.User_IsPasswordValidRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
3406
|
+
|
|
3407
|
+
/**
|
|
3408
|
+
*
|
|
3409
|
+
* @param associateId -
|
|
3410
|
+
* @param type -
|
|
3411
|
+
* @param personId -
|
|
3412
|
+
* @param password -
|
|
3413
|
+
* @returns
|
|
3414
|
+
*/
|
|
3415
|
+
public async isPasswordValidAsync(associateId: number, type: enums.UserType, personId: number, password: string, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
3416
|
+
|
|
3417
|
+
public async isPasswordValidAsync(associateId:number|carriers.User_IsPasswordValidRequest, type?:enums.UserType|base.WebApiRequestOptions, personId?:number, password?:string, webapi_options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
3418
|
+
let _request : carriers.User_IsPasswordValidRequest = null;
|
|
3419
|
+
let _options : base.WebApiRequestOptions = null;
|
|
3420
|
+
const first : any = associateId;
|
|
3421
|
+
if( typeof( first ) === "object" && first && ( typeof(first.associateId)!='undefined' || typeof(first.type)!='undefined' || typeof(first.personId)!='undefined' || typeof(first.password)!='undefined' ) )
|
|
3422
|
+
{
|
|
3423
|
+
_request = associateId as carriers.User_IsPasswordValidRequest;
|
|
3424
|
+
_options = type as base.WebApiRequestOptions;
|
|
3425
|
+
}
|
|
3426
|
+
else
|
|
3427
|
+
{
|
|
3428
|
+
_request = {
|
|
3429
|
+
associateId: associateId as number,
|
|
3430
|
+
type: type as enums.UserType,
|
|
3431
|
+
personId: personId as number,
|
|
3432
|
+
password: password as string,
|
|
3433
|
+
};
|
|
3434
|
+
_options = webapi_options;
|
|
3435
|
+
}
|
|
3436
|
+
return this._isPasswordValidAsync( _request, _options );
|
|
3437
|
+
}
|
|
3438
|
+
|
|
3439
|
+
|
|
3440
|
+
private async _setGeneratedPasswordAsync(request: carriers.User_SetGeneratedPasswordRequest, options?:base.WebApiRequestOptions) : Promise< string > {
|
|
3441
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
3442
|
+
base.WebApiBase.SetPending(options);
|
|
3443
|
+
return new Promise< string >(async (resolve, reject) => {
|
|
3444
|
+
try {
|
|
3445
|
+
config.baseURL = this._options.baseUrl;
|
|
3446
|
+
const response = await this._axios.post("SetGeneratedPassword", request , config);
|
|
3447
|
+
base.WebApiBase.SetCompleted(options);
|
|
3448
|
+
const res : string = response.data as string;
|
|
3449
|
+
resolve(res);
|
|
3450
|
+
}
|
|
3451
|
+
catch( err ) {
|
|
3452
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
3453
|
+
reject(err);
|
|
3454
|
+
}
|
|
3455
|
+
});
|
|
3456
|
+
}
|
|
3457
|
+
|
|
3458
|
+
|
|
3459
|
+
|
|
3460
|
+
/**
|
|
3461
|
+
*
|
|
3462
|
+
* @param request - AssociateId
|
|
3463
|
+
* @returns
|
|
3464
|
+
*/
|
|
3465
|
+
public async setGeneratedPasswordAsync(request: carriers.User_SetGeneratedPasswordRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
3466
|
+
|
|
3467
|
+
/**
|
|
3468
|
+
*
|
|
3469
|
+
* @param associateId -
|
|
3470
|
+
* @returns
|
|
3471
|
+
*/
|
|
3472
|
+
public async setGeneratedPasswordAsync(associateId: number, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
3473
|
+
|
|
3474
|
+
public async setGeneratedPasswordAsync(associateId:number|carriers.User_SetGeneratedPasswordRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string > {
|
|
3475
|
+
let _request : carriers.User_SetGeneratedPasswordRequest = null;
|
|
3476
|
+
let _options : base.WebApiRequestOptions = null;
|
|
3477
|
+
const first : any = associateId;
|
|
3478
|
+
if( typeof( first ) === "object" && first && ( typeof(first.associateId)!='undefined' ) )
|
|
3479
|
+
{
|
|
3480
|
+
_request = associateId as carriers.User_SetGeneratedPasswordRequest;
|
|
3481
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
3482
|
+
}
|
|
3483
|
+
else
|
|
3484
|
+
{
|
|
3485
|
+
_request = {
|
|
3486
|
+
associateId: associateId as number,
|
|
3487
|
+
};
|
|
3488
|
+
_options = webapi_options;
|
|
3489
|
+
}
|
|
3490
|
+
return this._setGeneratedPasswordAsync( _request, _options );
|
|
3491
|
+
}
|
|
3492
|
+
|
|
3493
|
+
|
|
3494
|
+
private async _setGeneratedPasswordFromNameAsync(request: carriers.User_SetGeneratedPasswordFromNameRequest, options?:base.WebApiRequestOptions) : Promise< string > {
|
|
3495
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
3496
|
+
base.WebApiBase.SetPending(options);
|
|
3497
|
+
return new Promise< string >(async (resolve, reject) => {
|
|
3498
|
+
try {
|
|
3499
|
+
config.baseURL = this._options.baseUrl;
|
|
3500
|
+
const response = await this._axios.post("SetGeneratedPasswordFromName", request , config);
|
|
3501
|
+
base.WebApiBase.SetCompleted(options);
|
|
3502
|
+
const res : string = response.data as string;
|
|
3503
|
+
resolve(res);
|
|
3504
|
+
}
|
|
3505
|
+
catch( err ) {
|
|
3506
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
3507
|
+
reject(err);
|
|
3508
|
+
}
|
|
3509
|
+
});
|
|
3510
|
+
}
|
|
3511
|
+
|
|
3512
|
+
|
|
3513
|
+
|
|
3514
|
+
/**
|
|
3515
|
+
*
|
|
3516
|
+
* @param request - AssociateName
|
|
3517
|
+
* @returns
|
|
3518
|
+
*/
|
|
3519
|
+
public async setGeneratedPasswordFromNameAsync(request: carriers.User_SetGeneratedPasswordFromNameRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
3520
|
+
|
|
3521
|
+
/**
|
|
3522
|
+
*
|
|
3523
|
+
* @param associateName -
|
|
3524
|
+
* @returns
|
|
3525
|
+
*/
|
|
3526
|
+
public async setGeneratedPasswordFromNameAsync(associateName: string, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
3527
|
+
|
|
3528
|
+
public async setGeneratedPasswordFromNameAsync(associateName:string|carriers.User_SetGeneratedPasswordFromNameRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string > {
|
|
3529
|
+
let _request : carriers.User_SetGeneratedPasswordFromNameRequest = null;
|
|
3530
|
+
let _options : base.WebApiRequestOptions = null;
|
|
3531
|
+
const first : any = associateName;
|
|
3532
|
+
if( typeof( first ) === "object" && first && ( typeof(first.associateName)!='undefined' ) )
|
|
3533
|
+
{
|
|
3534
|
+
_request = associateName as carriers.User_SetGeneratedPasswordFromNameRequest;
|
|
3535
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
3536
|
+
}
|
|
3537
|
+
else
|
|
3538
|
+
{
|
|
3539
|
+
_request = {
|
|
3540
|
+
associateName: associateName as string,
|
|
3541
|
+
};
|
|
3542
|
+
_options = webapi_options;
|
|
3543
|
+
}
|
|
3544
|
+
return this._setGeneratedPasswordFromNameAsync( _request, _options );
|
|
3545
|
+
}
|
|
3546
|
+
|
|
3547
|
+
|
|
3548
|
+
private async _isPasswordValidWithReasonAsync(request: carriers.User_IsPasswordValidWithReasonRequest, options?:base.WebApiRequestOptions) : Promise< carriers.UserValidationResult > {
|
|
3549
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
3550
|
+
base.WebApiBase.SetPending(options);
|
|
3551
|
+
return new Promise< carriers.UserValidationResult >(async (resolve, reject) => {
|
|
3552
|
+
try {
|
|
3553
|
+
config.baseURL = this._options.baseUrl;
|
|
3554
|
+
const response = await this._axios.post("IsPasswordValidWithReason", request , config);
|
|
3555
|
+
base.WebApiBase.SetCompleted(options);
|
|
3556
|
+
const res : carriers.UserValidationResult = converters.Create_UserValidationResult_From( response.data );
|
|
3557
|
+
resolve(res);
|
|
3558
|
+
}
|
|
3559
|
+
catch( err ) {
|
|
3560
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
3561
|
+
reject(err);
|
|
3562
|
+
}
|
|
3563
|
+
});
|
|
3564
|
+
}
|
|
3565
|
+
|
|
3566
|
+
|
|
3567
|
+
|
|
3568
|
+
/**
|
|
3569
|
+
*
|
|
3570
|
+
* @param request - AssociateId, Type, PersonId, Password
|
|
3571
|
+
* @returns
|
|
3572
|
+
*/
|
|
3573
|
+
public async isPasswordValidWithReasonAsync(request: carriers.User_IsPasswordValidWithReasonRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UserValidationResult >;
|
|
3574
|
+
|
|
3575
|
+
/**
|
|
3576
|
+
*
|
|
3577
|
+
* @param associateId -
|
|
3578
|
+
* @param type -
|
|
3579
|
+
* @param personId -
|
|
3580
|
+
* @param password -
|
|
3581
|
+
* @returns
|
|
3582
|
+
*/
|
|
3583
|
+
public async isPasswordValidWithReasonAsync(associateId: number, type: enums.UserType, personId: number, password: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UserValidationResult >;
|
|
3584
|
+
|
|
3585
|
+
public async isPasswordValidWithReasonAsync(associateId:number|carriers.User_IsPasswordValidWithReasonRequest, type?:enums.UserType|base.WebApiRequestOptions, personId?:number, password?:string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UserValidationResult > {
|
|
3586
|
+
let _request : carriers.User_IsPasswordValidWithReasonRequest = null;
|
|
3587
|
+
let _options : base.WebApiRequestOptions = null;
|
|
3588
|
+
const first : any = associateId;
|
|
3589
|
+
if( typeof( first ) === "object" && first && ( typeof(first.associateId)!='undefined' || typeof(first.type)!='undefined' || typeof(first.personId)!='undefined' || typeof(first.password)!='undefined' ) )
|
|
3590
|
+
{
|
|
3591
|
+
_request = associateId as carriers.User_IsPasswordValidWithReasonRequest;
|
|
3592
|
+
_options = type as base.WebApiRequestOptions;
|
|
3593
|
+
}
|
|
3594
|
+
else
|
|
3595
|
+
{
|
|
3596
|
+
_request = {
|
|
3597
|
+
associateId: associateId as number,
|
|
3598
|
+
type: type as enums.UserType,
|
|
3599
|
+
personId: personId as number,
|
|
3600
|
+
password: password as string,
|
|
3601
|
+
};
|
|
3602
|
+
_options = webapi_options;
|
|
3603
|
+
}
|
|
3604
|
+
return this._isPasswordValidWithReasonAsync( _request, _options );
|
|
3605
|
+
}
|
|
3606
|
+
|
|
3607
|
+
|
|
3608
|
+
private async _isUserNameValidWithReasonAsync(request: carriers.User_IsUserNameValidWithReasonRequest, options?:base.WebApiRequestOptions) : Promise< carriers.UserValidationResult > {
|
|
3609
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
3610
|
+
base.WebApiBase.SetPending(options);
|
|
3611
|
+
return new Promise< carriers.UserValidationResult >(async (resolve, reject) => {
|
|
3612
|
+
try {
|
|
3613
|
+
config.baseURL = this._options.baseUrl;
|
|
3614
|
+
const response = await this._axios.post("IsUserNameValidWithReason", request , config);
|
|
3615
|
+
base.WebApiBase.SetCompleted(options);
|
|
3616
|
+
const res : carriers.UserValidationResult = converters.Create_UserValidationResult_From( response.data );
|
|
3617
|
+
resolve(res);
|
|
3618
|
+
}
|
|
3619
|
+
catch( err ) {
|
|
3620
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
3621
|
+
reject(err);
|
|
3622
|
+
}
|
|
3623
|
+
});
|
|
3624
|
+
}
|
|
3625
|
+
|
|
3626
|
+
|
|
3627
|
+
|
|
3628
|
+
/**
|
|
3629
|
+
*
|
|
3630
|
+
* @param request - AssociateId, Type, PersonId, UserName
|
|
3631
|
+
* @returns
|
|
3632
|
+
*/
|
|
3633
|
+
public async isUserNameValidWithReasonAsync(request: carriers.User_IsUserNameValidWithReasonRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UserValidationResult >;
|
|
3634
|
+
|
|
3635
|
+
/**
|
|
3636
|
+
*
|
|
3637
|
+
* @param associateId -
|
|
3638
|
+
* @param type -
|
|
3639
|
+
* @param personId -
|
|
3640
|
+
* @param userName -
|
|
3641
|
+
* @returns
|
|
3642
|
+
*/
|
|
3643
|
+
public async isUserNameValidWithReasonAsync(associateId: number, type: enums.UserType, personId: number, userName: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UserValidationResult >;
|
|
3644
|
+
|
|
3645
|
+
public async isUserNameValidWithReasonAsync(associateId:number|carriers.User_IsUserNameValidWithReasonRequest, type?:enums.UserType|base.WebApiRequestOptions, personId?:number, userName?:string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UserValidationResult > {
|
|
3646
|
+
let _request : carriers.User_IsUserNameValidWithReasonRequest = null;
|
|
3647
|
+
let _options : base.WebApiRequestOptions = null;
|
|
3648
|
+
const first : any = associateId;
|
|
3649
|
+
if( typeof( first ) === "object" && first && ( typeof(first.associateId)!='undefined' || typeof(first.type)!='undefined' || typeof(first.personId)!='undefined' || typeof(first.userName)!='undefined' ) )
|
|
3650
|
+
{
|
|
3651
|
+
_request = associateId as carriers.User_IsUserNameValidWithReasonRequest;
|
|
3652
|
+
_options = type as base.WebApiRequestOptions;
|
|
3653
|
+
}
|
|
3654
|
+
else
|
|
3655
|
+
{
|
|
3656
|
+
_request = {
|
|
3657
|
+
associateId: associateId as number,
|
|
3658
|
+
type: type as enums.UserType,
|
|
3659
|
+
personId: personId as number,
|
|
3660
|
+
userName: userName as string,
|
|
3661
|
+
};
|
|
3662
|
+
_options = webapi_options;
|
|
3663
|
+
}
|
|
3664
|
+
return this._isUserNameValidWithReasonAsync( _request, _options );
|
|
3665
|
+
}
|
|
3666
|
+
|
|
3667
|
+
|
|
3668
|
+
private async _changeUserTypeAsync(request: carriers.User_ChangeUserTypeRequest, options?:base.WebApiRequestOptions) : Promise< carriers.User > {
|
|
3669
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
3670
|
+
base.WebApiBase.SetPending(options);
|
|
3671
|
+
return new Promise< carriers.User >(async (resolve, reject) => {
|
|
3672
|
+
try {
|
|
3673
|
+
config.baseURL = this._options.baseUrl;
|
|
3674
|
+
const response = await this._axios.post("ChangeUserType", request , config);
|
|
3675
|
+
base.WebApiBase.SetCompleted(options);
|
|
3676
|
+
const res : carriers.User = converters.Create_User_From( response.data );
|
|
3677
|
+
resolve(res);
|
|
3678
|
+
}
|
|
3679
|
+
catch( err ) {
|
|
3680
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
3681
|
+
reject(err);
|
|
3682
|
+
}
|
|
3683
|
+
});
|
|
3684
|
+
}
|
|
3685
|
+
|
|
3686
|
+
|
|
3687
|
+
|
|
3688
|
+
/**
|
|
3689
|
+
* Get a user from the user name.
|
|
3690
|
+
* @param request - User, UserType
|
|
3691
|
+
* @returns User retrieved by name
|
|
3692
|
+
*/
|
|
3693
|
+
public async changeUserTypeAsync(request: carriers.User_ChangeUserTypeRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.User >;
|
|
3694
|
+
|
|
3695
|
+
/**
|
|
3696
|
+
* Get a user from the user name.
|
|
3697
|
+
* @param user - User name of the user to get.
|
|
3698
|
+
* @param userType -
|
|
3699
|
+
* @returns User retrieved by name
|
|
3700
|
+
*/
|
|
3701
|
+
public async changeUserTypeAsync(user: carriers.User, userType: enums.UserType, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.User >;
|
|
3702
|
+
|
|
3703
|
+
public async changeUserTypeAsync(user:carriers.User|carriers.User_ChangeUserTypeRequest, userType?:enums.UserType|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.User > {
|
|
3704
|
+
let _request : carriers.User_ChangeUserTypeRequest = null;
|
|
3705
|
+
let _options : base.WebApiRequestOptions = null;
|
|
3706
|
+
const first : any = user;
|
|
3707
|
+
if( typeof( first ) === "object" && first && ( typeof(first.user)!='undefined' || typeof(first.userType)!='undefined' ) )
|
|
3708
|
+
{
|
|
3709
|
+
_request = user as carriers.User_ChangeUserTypeRequest;
|
|
3710
|
+
_options = userType as base.WebApiRequestOptions;
|
|
3711
|
+
}
|
|
3712
|
+
else
|
|
3713
|
+
{
|
|
3714
|
+
_request = {
|
|
3715
|
+
user: user as carriers.User,
|
|
3716
|
+
userType: userType as enums.UserType,
|
|
3717
|
+
};
|
|
3718
|
+
_options = webapi_options;
|
|
3719
|
+
}
|
|
3720
|
+
return this._changeUserTypeAsync( _request, _options );
|
|
3721
|
+
}
|
|
3722
|
+
|
|
3723
|
+
|
|
3724
|
+
private async _createDefaultUserFromUserTypeAndCredentialAsync(request: carriers.User_CreateDefaultUserFromUserTypeAndCredentialRequest, options?:base.WebApiRequestOptions) : Promise< carriers.User > {
|
|
3725
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
3726
|
+
base.WebApiBase.SetPending(options);
|
|
3727
|
+
return new Promise< carriers.User >(async (resolve, reject) => {
|
|
3728
|
+
try {
|
|
3729
|
+
config.baseURL = this._options.baseUrl;
|
|
3730
|
+
const response = await this._axios.post("CreateDefaultUserFromUserTypeAndCredential", request , config);
|
|
3731
|
+
base.WebApiBase.SetCompleted(options);
|
|
3732
|
+
const res : carriers.User = converters.Create_User_From( response.data );
|
|
3733
|
+
resolve(res);
|
|
3734
|
+
}
|
|
3735
|
+
catch( err ) {
|
|
3736
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
3737
|
+
reject(err);
|
|
3738
|
+
}
|
|
3739
|
+
});
|
|
3740
|
+
}
|
|
3741
|
+
|
|
3742
|
+
|
|
3743
|
+
|
|
3744
|
+
/**
|
|
3745
|
+
* Creates a PersonEntity with default values based on the contactId and credentials.
|
|
3746
|
+
* @param request - UserType, ContactId, CredentialType, CredentialValue, CredentialDisplayValue
|
|
3747
|
+
* @returns
|
|
3748
|
+
*/
|
|
3749
|
+
public async createDefaultUserFromUserTypeAndCredentialAsync(request: carriers.User_CreateDefaultUserFromUserTypeAndCredentialRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.User >;
|
|
3750
|
+
|
|
3751
|
+
/**
|
|
3752
|
+
* Creates a PersonEntity with default values based on the contactId and credentials.
|
|
3753
|
+
* @param userType - Type of associate for the user
|
|
3754
|
+
* @param contactId - Contact id of the person
|
|
3755
|
+
* @param credentialType - Type of credentials, corresponding to name of plugin and type in the credentials table.
|
|
3756
|
+
* @param credentialValue - This is the actuall value of the credentials. This will typically be the password or teh users SID in active directory
|
|
3757
|
+
* @param credentialDisplayValue - The value displayed to the user. this will typically be the users login name in active directory.
|
|
3758
|
+
* @returns
|
|
3759
|
+
*/
|
|
3760
|
+
public async createDefaultUserFromUserTypeAndCredentialAsync(userType: enums.UserType, contactId: number, credentialType: string, credentialValue: string, credentialDisplayValue: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.User >;
|
|
3761
|
+
|
|
3762
|
+
public async createDefaultUserFromUserTypeAndCredentialAsync(userType:enums.UserType|carriers.User_CreateDefaultUserFromUserTypeAndCredentialRequest, contactId?:number|base.WebApiRequestOptions, credentialType?:string, credentialValue?:string, credentialDisplayValue?:string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.User > {
|
|
3763
|
+
let _request : carriers.User_CreateDefaultUserFromUserTypeAndCredentialRequest = null;
|
|
3764
|
+
let _options : base.WebApiRequestOptions = null;
|
|
3765
|
+
const first : any = userType;
|
|
3766
|
+
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' ) )
|
|
3767
|
+
{
|
|
3768
|
+
_request = userType as carriers.User_CreateDefaultUserFromUserTypeAndCredentialRequest;
|
|
3769
|
+
_options = contactId as base.WebApiRequestOptions;
|
|
3770
|
+
}
|
|
3771
|
+
else
|
|
3772
|
+
{
|
|
3773
|
+
_request = {
|
|
3774
|
+
userType: userType as enums.UserType,
|
|
3775
|
+
contactId: contactId as number,
|
|
3776
|
+
credentialType: credentialType as string,
|
|
3777
|
+
credentialValue: credentialValue as string,
|
|
3778
|
+
credentialDisplayValue: credentialDisplayValue as string,
|
|
3779
|
+
};
|
|
3780
|
+
_options = webapi_options;
|
|
3781
|
+
}
|
|
3782
|
+
return this._createDefaultUserFromUserTypeAndCredentialAsync( _request, _options );
|
|
3783
|
+
}
|
|
3784
|
+
|
|
3785
|
+
|
|
3786
|
+
private async _getValidUserNameAsync(request: carriers.User_GetValidUserNameRequest, options?:base.WebApiRequestOptions) : Promise< string > {
|
|
3787
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
3788
|
+
base.WebApiBase.SetPending(options);
|
|
3789
|
+
return new Promise< string >(async (resolve, reject) => {
|
|
3790
|
+
try {
|
|
3791
|
+
config.baseURL = this._options.baseUrl;
|
|
3792
|
+
const response = await this._axios.post("GetValidUserName", request , config);
|
|
3793
|
+
base.WebApiBase.SetCompleted(options);
|
|
3794
|
+
const res : string = response.data as string;
|
|
3795
|
+
resolve(res);
|
|
3796
|
+
}
|
|
3797
|
+
catch( err ) {
|
|
3798
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
3799
|
+
reject(err);
|
|
3800
|
+
}
|
|
3801
|
+
});
|
|
3802
|
+
}
|
|
3803
|
+
|
|
3804
|
+
|
|
3805
|
+
|
|
3806
|
+
/**
|
|
3807
|
+
*
|
|
3808
|
+
* @param request - AssociateId, Type, PersonId, UserName
|
|
3809
|
+
* @returns
|
|
3810
|
+
*/
|
|
3811
|
+
public async getValidUserNameAsync(request: carriers.User_GetValidUserNameRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
3812
|
+
|
|
3813
|
+
/**
|
|
3814
|
+
*
|
|
3815
|
+
* @param associateId -
|
|
3816
|
+
* @param type -
|
|
3817
|
+
* @param personId -
|
|
3818
|
+
* @param userName -
|
|
3819
|
+
* @returns
|
|
3820
|
+
*/
|
|
3821
|
+
public async getValidUserNameAsync(associateId: number, type: enums.UserType, personId: number, userName: string, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
3822
|
+
|
|
3823
|
+
public async getValidUserNameAsync(associateId:number|carriers.User_GetValidUserNameRequest, type?:enums.UserType|base.WebApiRequestOptions, personId?:number, userName?:string, webapi_options?:base.WebApiRequestOptions) : Promise< string > {
|
|
3824
|
+
let _request : carriers.User_GetValidUserNameRequest = null;
|
|
3825
|
+
let _options : base.WebApiRequestOptions = null;
|
|
3826
|
+
const first : any = associateId;
|
|
3827
|
+
if( typeof( first ) === "object" && first && ( typeof(first.associateId)!='undefined' || typeof(first.type)!='undefined' || typeof(first.personId)!='undefined' || typeof(first.userName)!='undefined' ) )
|
|
3828
|
+
{
|
|
3829
|
+
_request = associateId as carriers.User_GetValidUserNameRequest;
|
|
3830
|
+
_options = type as base.WebApiRequestOptions;
|
|
3831
|
+
}
|
|
3832
|
+
else
|
|
3833
|
+
{
|
|
3834
|
+
_request = {
|
|
3835
|
+
associateId: associateId as number,
|
|
3836
|
+
type: type as enums.UserType,
|
|
3837
|
+
personId: personId as number,
|
|
3838
|
+
userName: userName as string,
|
|
3839
|
+
};
|
|
3840
|
+
_options = webapi_options;
|
|
3841
|
+
}
|
|
3842
|
+
return this._getValidUserNameAsync( _request, _options );
|
|
3843
|
+
}
|
|
3844
|
+
|
|
3845
|
+
|
|
3846
|
+
private async _removeLicensesAsync(request: carriers.User_RemoveLicensesRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
3847
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
3848
|
+
base.WebApiBase.SetPending(options);
|
|
3849
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
3850
|
+
try {
|
|
3851
|
+
config.baseURL = this._options.baseUrl;
|
|
3852
|
+
const response = await this._axios.post("RemoveLicenses", request , config);
|
|
3853
|
+
base.WebApiBase.SetCompleted(options);
|
|
3854
|
+
const res = response.data;
|
|
3855
|
+
resolve(res);
|
|
3856
|
+
}
|
|
3857
|
+
catch( err ) {
|
|
3858
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
3859
|
+
reject(err);
|
|
3860
|
+
}
|
|
3861
|
+
});
|
|
3862
|
+
}
|
|
3863
|
+
|
|
3864
|
+
|
|
3865
|
+
|
|
3866
|
+
/**
|
|
3867
|
+
* Remove all user licenses.
|
|
3868
|
+
* @param request - AssociateId
|
|
3869
|
+
* @returns
|
|
3870
|
+
*/
|
|
3871
|
+
public async removeLicensesAsync(request: carriers.User_RemoveLicensesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
3872
|
+
|
|
3873
|
+
/**
|
|
3874
|
+
* Remove all user licenses.
|
|
3875
|
+
* @param associateId -
|
|
3876
|
+
* @returns
|
|
3877
|
+
*/
|
|
3878
|
+
public async removeLicensesAsync(associateId: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
3879
|
+
|
|
3880
|
+
public async removeLicensesAsync(associateId:number|carriers.User_RemoveLicensesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
3881
|
+
let _request : carriers.User_RemoveLicensesRequest = null;
|
|
3882
|
+
let _options : base.WebApiRequestOptions = null;
|
|
3883
|
+
const first : any = associateId;
|
|
3884
|
+
if( typeof( first ) === "object" && first && ( typeof(first.associateId)!='undefined' ) )
|
|
3885
|
+
{
|
|
3886
|
+
_request = associateId as carriers.User_RemoveLicensesRequest;
|
|
3887
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
3888
|
+
}
|
|
3889
|
+
else
|
|
3890
|
+
{
|
|
3891
|
+
_request = {
|
|
3892
|
+
associateId: associateId as number,
|
|
3893
|
+
};
|
|
3894
|
+
_options = webapi_options;
|
|
3895
|
+
}
|
|
3896
|
+
return this._removeLicensesAsync( _request, _options );
|
|
3897
|
+
}
|
|
3898
|
+
|
|
3899
|
+
|
|
3900
|
+
private async _makeRetiredAsync(request: carriers.User_MakeRetiredRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
3901
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
3902
|
+
base.WebApiBase.SetPending(options);
|
|
3903
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
3904
|
+
try {
|
|
3905
|
+
config.baseURL = this._options.baseUrl;
|
|
3906
|
+
const response = await this._axios.post("MakeRetired", request , config);
|
|
3907
|
+
base.WebApiBase.SetCompleted(options);
|
|
3908
|
+
const res = response.data;
|
|
3909
|
+
resolve(res);
|
|
3910
|
+
}
|
|
3911
|
+
catch( err ) {
|
|
3912
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
3913
|
+
reject(err);
|
|
3914
|
+
}
|
|
3915
|
+
});
|
|
3916
|
+
}
|
|
3917
|
+
|
|
3918
|
+
|
|
3919
|
+
|
|
3920
|
+
/**
|
|
3921
|
+
* Retiring a user means to remove all licenses, setting person.retired=1 and associate.deleted=1. Unretiering a user means setting person.retired=0 and associate.deleted=0
|
|
3922
|
+
* @param request - AssociateId, Retired
|
|
3923
|
+
* @returns
|
|
3924
|
+
*/
|
|
3925
|
+
public async makeRetiredAsync(request: carriers.User_MakeRetiredRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
3926
|
+
|
|
3927
|
+
/**
|
|
3928
|
+
* Retiring a user means to remove all licenses, setting person.retired=1 and associate.deleted=1. Unretiering a user means setting person.retired=0 and associate.deleted=0
|
|
3929
|
+
* @param associateId -
|
|
3930
|
+
* @param retired -
|
|
3931
|
+
* @returns
|
|
3932
|
+
*/
|
|
3933
|
+
public async makeRetiredAsync(associateId: number, retired: boolean, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
3934
|
+
|
|
3935
|
+
public async makeRetiredAsync(associateId:number|carriers.User_MakeRetiredRequest, retired?:boolean|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
3936
|
+
let _request : carriers.User_MakeRetiredRequest = null;
|
|
3937
|
+
let _options : base.WebApiRequestOptions = null;
|
|
3938
|
+
const first : any = associateId;
|
|
3939
|
+
if( typeof( first ) === "object" && first && ( typeof(first.associateId)!='undefined' || typeof(first.retired)!='undefined' ) )
|
|
3940
|
+
{
|
|
3941
|
+
_request = associateId as carriers.User_MakeRetiredRequest;
|
|
3942
|
+
_options = retired as base.WebApiRequestOptions;
|
|
3943
|
+
}
|
|
3944
|
+
else
|
|
3945
|
+
{
|
|
3946
|
+
_request = {
|
|
3947
|
+
associateId: associateId as number,
|
|
3948
|
+
retired: retired as boolean,
|
|
3949
|
+
};
|
|
3950
|
+
_options = webapi_options;
|
|
3951
|
+
}
|
|
3952
|
+
return this._makeRetiredAsync( _request, _options );
|
|
3953
|
+
}
|
|
3954
|
+
|
|
3955
|
+
|
|
3956
|
+
private async _addOwnerContactAsync(request: carriers.User_AddOwnerContactRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
3957
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
3958
|
+
base.WebApiBase.SetPending(options);
|
|
3959
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
3960
|
+
try {
|
|
3961
|
+
config.baseURL = this._options.baseUrl;
|
|
3962
|
+
const response = await this._axios.post("AddOwnerContact", request , config);
|
|
3963
|
+
base.WebApiBase.SetCompleted(options);
|
|
3964
|
+
const res = response.data;
|
|
3965
|
+
resolve(res);
|
|
3966
|
+
}
|
|
3967
|
+
catch( err ) {
|
|
3968
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
3969
|
+
reject(err);
|
|
3970
|
+
}
|
|
3971
|
+
});
|
|
3972
|
+
}
|
|
3973
|
+
|
|
3974
|
+
|
|
3975
|
+
|
|
3976
|
+
/**
|
|
3977
|
+
*
|
|
3978
|
+
* @param request - ContactId
|
|
3979
|
+
* @returns
|
|
3980
|
+
*/
|
|
3981
|
+
public async addOwnerContactAsync(request: carriers.User_AddOwnerContactRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
3982
|
+
|
|
3983
|
+
/**
|
|
3984
|
+
*
|
|
3985
|
+
* @param contactId - Id of the contact to add as a owner contact
|
|
3986
|
+
* @returns
|
|
3987
|
+
*/
|
|
3988
|
+
public async addOwnerContactAsync(contactId: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
3989
|
+
|
|
3990
|
+
public async addOwnerContactAsync(contactId:number|carriers.User_AddOwnerContactRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
3991
|
+
let _request : carriers.User_AddOwnerContactRequest = null;
|
|
3992
|
+
let _options : base.WebApiRequestOptions = null;
|
|
3993
|
+
const first : any = contactId;
|
|
3994
|
+
if( typeof( first ) === "object" && first && ( typeof(first.contactId)!='undefined' ) )
|
|
3995
|
+
{
|
|
3996
|
+
_request = contactId as carriers.User_AddOwnerContactRequest;
|
|
3997
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
3998
|
+
}
|
|
3999
|
+
else
|
|
4000
|
+
{
|
|
4001
|
+
_request = {
|
|
4002
|
+
contactId: contactId as number,
|
|
4003
|
+
};
|
|
4004
|
+
_options = webapi_options;
|
|
4005
|
+
}
|
|
4006
|
+
return this._addOwnerContactAsync( _request, _options );
|
|
4007
|
+
}
|
|
4008
|
+
|
|
4009
|
+
|
|
4010
|
+
private async _removeOwnerContactAsync(request: carriers.User_RemoveOwnerContactRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
4011
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
4012
|
+
base.WebApiBase.SetPending(options);
|
|
4013
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
4014
|
+
try {
|
|
4015
|
+
config.baseURL = this._options.baseUrl;
|
|
4016
|
+
const response = await this._axios.post("RemoveOwnerContact", request , config);
|
|
4017
|
+
base.WebApiBase.SetCompleted(options);
|
|
4018
|
+
const res = response.data;
|
|
4019
|
+
resolve(res);
|
|
4020
|
+
}
|
|
4021
|
+
catch( err ) {
|
|
4022
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
4023
|
+
reject(err);
|
|
4024
|
+
}
|
|
4025
|
+
});
|
|
4026
|
+
}
|
|
4027
|
+
|
|
4028
|
+
|
|
4029
|
+
|
|
4030
|
+
/**
|
|
4031
|
+
* Remove a contact from the ownercontactlink table
|
|
4032
|
+
* @param request - ContactId
|
|
4033
|
+
* @returns
|
|
4034
|
+
*/
|
|
4035
|
+
public async removeOwnerContactAsync(request: carriers.User_RemoveOwnerContactRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
4036
|
+
|
|
4037
|
+
/**
|
|
4038
|
+
* Remove a contact from the ownercontactlink table
|
|
4039
|
+
* @param contactId - The id of the contact to remove
|
|
4040
|
+
* @returns
|
|
4041
|
+
*/
|
|
4042
|
+
public async removeOwnerContactAsync(contactId: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
4043
|
+
|
|
4044
|
+
public async removeOwnerContactAsync(contactId:number|carriers.User_RemoveOwnerContactRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
4045
|
+
let _request : carriers.User_RemoveOwnerContactRequest = null;
|
|
4046
|
+
let _options : base.WebApiRequestOptions = null;
|
|
4047
|
+
const first : any = contactId;
|
|
4048
|
+
if( typeof( first ) === "object" && first && ( typeof(first.contactId)!='undefined' ) )
|
|
4049
|
+
{
|
|
4050
|
+
_request = contactId as carriers.User_RemoveOwnerContactRequest;
|
|
4051
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
4052
|
+
}
|
|
4053
|
+
else
|
|
4054
|
+
{
|
|
4055
|
+
_request = {
|
|
4056
|
+
contactId: contactId as number,
|
|
4057
|
+
};
|
|
4058
|
+
_options = webapi_options;
|
|
4059
|
+
}
|
|
4060
|
+
return this._removeOwnerContactAsync( _request, _options );
|
|
4061
|
+
}
|
|
4062
|
+
|
|
4063
|
+
|
|
4064
|
+
private async _resolveUserFromInfoAsync(request: carriers.User_ResolveUserFromInfoRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ResolvedUser > {
|
|
4065
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
4066
|
+
base.WebApiBase.SetPending(options);
|
|
4067
|
+
return new Promise< carriers.ResolvedUser >(async (resolve, reject) => {
|
|
4068
|
+
try {
|
|
4069
|
+
config.baseURL = this._options.baseUrl;
|
|
4070
|
+
const response = await this._axios.post("ResolveUserFromInfo", request , config);
|
|
4071
|
+
base.WebApiBase.SetCompleted(options);
|
|
4072
|
+
const res : carriers.ResolvedUser = converters.Create_ResolvedUser_From( response.data );
|
|
4073
|
+
resolve(res);
|
|
4074
|
+
}
|
|
4075
|
+
catch( err ) {
|
|
4076
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
4077
|
+
reject(err);
|
|
4078
|
+
}
|
|
4079
|
+
});
|
|
4080
|
+
}
|
|
4081
|
+
|
|
4082
|
+
|
|
4083
|
+
|
|
4084
|
+
/**
|
|
4085
|
+
* Get a user from the provided information. If the user or associated person does not exist, it will be created on demand.
|
|
4086
|
+
* @param request - ContactId, PersonName, PhoneNumbers, Emails, UserType, Credential
|
|
4087
|
+
* @returns The results of the resolve-operation.
|
|
4088
|
+
*/
|
|
4089
|
+
public async resolveUserFromInfoAsync(request: carriers.User_ResolveUserFromInfoRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ResolvedUser >;
|
|
4090
|
+
|
|
4091
|
+
/**
|
|
4092
|
+
* Get a user from the provided information. If the user or associated person does not exist, it will be created on demand.
|
|
4093
|
+
* @param contactId - The contact Id of the contact which the person belongs to. Cannot be 0.
|
|
4094
|
+
* @param personName - The full name of the person to be resolved. Optional.
|
|
4095
|
+
* @param phoneNumbers - Phone numbers registered on the person. Optional.
|
|
4096
|
+
* @param emails - Email-addresses registered on the person. Optional.
|
|
4097
|
+
* @param userType - The type of user to look up or create.
|
|
4098
|
+
* @param credential - The credentials to be used for the user. Required.
|
|
4099
|
+
* @returns The results of the resolve-operation.
|
|
4100
|
+
*/
|
|
4101
|
+
public async resolveUserFromInfoAsync(contactId: number, personName: string, phoneNumbers: string[], emails: string[], userType: enums.UserType, credential: carriers.Credential, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ResolvedUser >;
|
|
4102
|
+
|
|
4103
|
+
public async resolveUserFromInfoAsync(contactId:number|carriers.User_ResolveUserFromInfoRequest, personName?:string|base.WebApiRequestOptions, phoneNumbers?:string[], emails?:string[], userType?:enums.UserType, credential?:carriers.Credential, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ResolvedUser > {
|
|
4104
|
+
let _request : carriers.User_ResolveUserFromInfoRequest = null;
|
|
4105
|
+
let _options : base.WebApiRequestOptions = null;
|
|
4106
|
+
const first : any = contactId;
|
|
4107
|
+
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' ) )
|
|
4108
|
+
{
|
|
4109
|
+
_request = contactId as carriers.User_ResolveUserFromInfoRequest;
|
|
4110
|
+
_options = personName as base.WebApiRequestOptions;
|
|
4111
|
+
}
|
|
4112
|
+
else
|
|
4113
|
+
{
|
|
4114
|
+
_request = {
|
|
4115
|
+
contactId: contactId as number,
|
|
4116
|
+
personName: personName as string,
|
|
4117
|
+
phoneNumbers: phoneNumbers as string[],
|
|
4118
|
+
emails: emails as string[],
|
|
4119
|
+
userType: userType as enums.UserType,
|
|
4120
|
+
credential: credential as carriers.Credential,
|
|
4121
|
+
};
|
|
4122
|
+
_options = webapi_options;
|
|
4123
|
+
}
|
|
4124
|
+
return this._resolveUserFromInfoAsync( _request, _options );
|
|
4125
|
+
}
|
|
4126
|
+
|
|
4127
|
+
|
|
4128
|
+
private async _getAccessTokenAsync(request: carriers.User_GetAccessTokenRequest, options?:base.WebApiRequestOptions) : Promise< string > {
|
|
4129
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
4130
|
+
base.WebApiBase.SetPending(options);
|
|
4131
|
+
return new Promise< string >(async (resolve, reject) => {
|
|
4132
|
+
try {
|
|
4133
|
+
config.baseURL = this._options.baseUrl;
|
|
4134
|
+
const response = await this._axios.post("GetAccessToken", request , config);
|
|
4135
|
+
base.WebApiBase.SetCompleted(options);
|
|
4136
|
+
const res : string = response.data as string;
|
|
4137
|
+
resolve(res);
|
|
4138
|
+
}
|
|
4139
|
+
catch( err ) {
|
|
4140
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
4141
|
+
reject(err);
|
|
4142
|
+
}
|
|
4143
|
+
});
|
|
4144
|
+
}
|
|
4145
|
+
|
|
4146
|
+
|
|
4147
|
+
|
|
4148
|
+
/**
|
|
4149
|
+
* Get an access token based on the current user's session.
|
|
4150
|
+
* @param request - AppToken, IncludeCsSession
|
|
4151
|
+
* @returns An access token. "8A:xyz123=="
|
|
4152
|
+
*/
|
|
4153
|
+
public async getAccessTokenAsync(request: carriers.User_GetAccessTokenRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
4154
|
+
|
|
4155
|
+
/**
|
|
4156
|
+
* Get an access token based on the current user's session.
|
|
4157
|
+
* @param appToken - Application token to get access on behalf of. Optional.
|
|
4158
|
+
* @param includeCsSession - Initialize CS session for this access token?.
|
|
4159
|
+
* @returns An access token. "8A:xyz123=="
|
|
4160
|
+
*/
|
|
4161
|
+
public async getAccessTokenAsync(appToken: string, includeCsSession: boolean, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
4162
|
+
|
|
4163
|
+
public async getAccessTokenAsync(appToken:string|carriers.User_GetAccessTokenRequest, includeCsSession?:boolean|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< string > {
|
|
4164
|
+
let _request : carriers.User_GetAccessTokenRequest = null;
|
|
4165
|
+
let _options : base.WebApiRequestOptions = null;
|
|
4166
|
+
const first : any = appToken;
|
|
4167
|
+
if( typeof( first ) === "object" && first && ( typeof(first.appToken)!='undefined' || typeof(first.includeCsSession)!='undefined' ) )
|
|
4168
|
+
{
|
|
4169
|
+
_request = appToken as carriers.User_GetAccessTokenRequest;
|
|
4170
|
+
_options = includeCsSession as base.WebApiRequestOptions;
|
|
4171
|
+
}
|
|
4172
|
+
else
|
|
4173
|
+
{
|
|
4174
|
+
_request = {
|
|
4175
|
+
appToken: appToken as string,
|
|
4176
|
+
includeCsSession: includeCsSession as boolean,
|
|
4177
|
+
};
|
|
4178
|
+
_options = webapi_options;
|
|
4179
|
+
}
|
|
4180
|
+
return this._getAccessTokenAsync( _request, _options );
|
|
4181
|
+
}
|
|
4182
|
+
|
|
4183
|
+
|
|
4184
|
+
private async _getValidUserNameForNewUserAsync(request: carriers.User_GetValidUserNameForNewUserRequest, options?:base.WebApiRequestOptions) : Promise< string > {
|
|
4185
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
4186
|
+
base.WebApiBase.SetPending(options);
|
|
4187
|
+
return new Promise< string >(async (resolve, reject) => {
|
|
4188
|
+
try {
|
|
4189
|
+
config.baseURL = this._options.baseUrl;
|
|
4190
|
+
const response = await this._axios.post("GetValidUserNameForNewUser", request , config);
|
|
4191
|
+
base.WebApiBase.SetCompleted(options);
|
|
4192
|
+
const res : string = response.data as string;
|
|
4193
|
+
resolve(res);
|
|
4194
|
+
}
|
|
4195
|
+
catch( err ) {
|
|
4196
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
4197
|
+
reject(err);
|
|
4198
|
+
}
|
|
4199
|
+
});
|
|
4200
|
+
}
|
|
4201
|
+
|
|
4202
|
+
|
|
4203
|
+
|
|
4204
|
+
/**
|
|
4205
|
+
* Generates a valid username for an unsaved user
|
|
4206
|
+
* @param request - User
|
|
4207
|
+
* @returns
|
|
4208
|
+
*/
|
|
4209
|
+
public async getValidUserNameForNewUserAsync(request: carriers.User_GetValidUserNameForNewUserRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
4210
|
+
|
|
4211
|
+
/**
|
|
4212
|
+
* Generates a valid username for an unsaved user
|
|
4213
|
+
* @param user -
|
|
4214
|
+
* @returns
|
|
4215
|
+
*/
|
|
4216
|
+
public async getValidUserNameForNewUserAsync(user: carriers.User, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
4217
|
+
|
|
4218
|
+
public async getValidUserNameForNewUserAsync(user:carriers.User|carriers.User_GetValidUserNameForNewUserRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string > {
|
|
4219
|
+
let _request : carriers.User_GetValidUserNameForNewUserRequest = null;
|
|
4220
|
+
let _options : base.WebApiRequestOptions = null;
|
|
4221
|
+
const first : any = user;
|
|
4222
|
+
if( typeof( first ) === "object" && first && ( typeof(first.user)!='undefined' ) )
|
|
4223
|
+
{
|
|
4224
|
+
_request = user as carriers.User_GetValidUserNameForNewUserRequest;
|
|
4225
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
4226
|
+
}
|
|
4227
|
+
else
|
|
4228
|
+
{
|
|
4229
|
+
_request = {
|
|
4230
|
+
user: user as carriers.User,
|
|
4231
|
+
};
|
|
4232
|
+
_options = webapi_options;
|
|
4233
|
+
}
|
|
4234
|
+
return this._getValidUserNameForNewUserAsync( _request, _options );
|
|
4235
|
+
}
|
|
4236
|
+
|
|
4237
|
+
|
|
4238
|
+
private async _getDefaultAssociateUserNameAsync(request: carriers.User_GetDefaultAssociateUserNameRequest, options?:base.WebApiRequestOptions) : Promise< string > {
|
|
4239
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
4240
|
+
base.WebApiBase.SetPending(options);
|
|
4241
|
+
return new Promise< string >(async (resolve, reject) => {
|
|
4242
|
+
try {
|
|
4243
|
+
config.baseURL = this._options.baseUrl;
|
|
4244
|
+
const response = await this._axios.post("GetDefaultAssociateUserName", request , config);
|
|
4245
|
+
base.WebApiBase.SetCompleted(options);
|
|
4246
|
+
const res : string = response.data as string;
|
|
4247
|
+
resolve(res);
|
|
4248
|
+
}
|
|
4249
|
+
catch( err ) {
|
|
4250
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
4251
|
+
reject(err);
|
|
4252
|
+
}
|
|
4253
|
+
});
|
|
4254
|
+
}
|
|
4255
|
+
|
|
4256
|
+
|
|
4257
|
+
|
|
4258
|
+
/**
|
|
4259
|
+
* Get the default username for a person
|
|
4260
|
+
* @param request - User
|
|
4261
|
+
* @returns
|
|
4262
|
+
*/
|
|
4263
|
+
public async getDefaultAssociateUserNameAsync(request: carriers.User_GetDefaultAssociateUserNameRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
4264
|
+
|
|
4265
|
+
/**
|
|
4266
|
+
* Get the default username for a person
|
|
4267
|
+
* @param user -
|
|
4268
|
+
* @returns
|
|
4269
|
+
*/
|
|
4270
|
+
public async getDefaultAssociateUserNameAsync(user: carriers.User, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
4271
|
+
|
|
4272
|
+
public async getDefaultAssociateUserNameAsync(user:carriers.User|carriers.User_GetDefaultAssociateUserNameRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string > {
|
|
4273
|
+
let _request : carriers.User_GetDefaultAssociateUserNameRequest = null;
|
|
4274
|
+
let _options : base.WebApiRequestOptions = null;
|
|
4275
|
+
const first : any = user;
|
|
4276
|
+
if( typeof( first ) === "object" && first && ( typeof(first.user)!='undefined' ) )
|
|
4277
|
+
{
|
|
4278
|
+
_request = user as carriers.User_GetDefaultAssociateUserNameRequest;
|
|
4279
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
4280
|
+
}
|
|
4281
|
+
else
|
|
4282
|
+
{
|
|
4283
|
+
_request = {
|
|
4284
|
+
user: user as carriers.User,
|
|
4285
|
+
};
|
|
4286
|
+
_options = webapi_options;
|
|
4287
|
+
}
|
|
4288
|
+
return this._getDefaultAssociateUserNameAsync( _request, _options );
|
|
4289
|
+
}
|
|
4290
|
+
|
|
4291
|
+
|
|
4292
|
+
private async _isNickNameUniqueAsync(request: carriers.User_IsNickNameUniqueRequest, options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
4293
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
4294
|
+
base.WebApiBase.SetPending(options);
|
|
4295
|
+
return new Promise< boolean >(async (resolve, reject) => {
|
|
4296
|
+
try {
|
|
4297
|
+
config.baseURL = this._options.baseUrl;
|
|
4298
|
+
const response = await this._axios.post("IsNickNameUnique", request , config);
|
|
4299
|
+
base.WebApiBase.SetCompleted(options);
|
|
4300
|
+
const res : boolean = response.data as boolean;
|
|
4301
|
+
resolve(res);
|
|
4302
|
+
}
|
|
4303
|
+
catch( err ) {
|
|
4304
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
4305
|
+
reject(err);
|
|
4306
|
+
}
|
|
4307
|
+
});
|
|
4308
|
+
}
|
|
4309
|
+
|
|
4310
|
+
|
|
4311
|
+
|
|
4312
|
+
/**
|
|
4313
|
+
*
|
|
4314
|
+
* @param request - AssociateId, NickName
|
|
4315
|
+
* @returns
|
|
4316
|
+
*/
|
|
4317
|
+
public async isNickNameUniqueAsync(request: carriers.User_IsNickNameUniqueRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
4318
|
+
|
|
4319
|
+
/**
|
|
4320
|
+
*
|
|
4321
|
+
* @param associateId -
|
|
4322
|
+
* @param nickName -
|
|
4323
|
+
* @returns
|
|
4324
|
+
*/
|
|
4325
|
+
public async isNickNameUniqueAsync(associateId: number, nickName: string, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
4326
|
+
|
|
4327
|
+
public async isNickNameUniqueAsync(associateId:number|carriers.User_IsNickNameUniqueRequest, nickName?:string|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
4328
|
+
let _request : carriers.User_IsNickNameUniqueRequest = null;
|
|
4329
|
+
let _options : base.WebApiRequestOptions = null;
|
|
4330
|
+
const first : any = associateId;
|
|
4331
|
+
if( typeof( first ) === "object" && first && ( typeof(first.associateId)!='undefined' || typeof(first.nickName)!='undefined' ) )
|
|
4332
|
+
{
|
|
4333
|
+
_request = associateId as carriers.User_IsNickNameUniqueRequest;
|
|
4334
|
+
_options = nickName as base.WebApiRequestOptions;
|
|
4335
|
+
}
|
|
4336
|
+
else
|
|
4337
|
+
{
|
|
4338
|
+
_request = {
|
|
4339
|
+
associateId: associateId as number,
|
|
4340
|
+
nickName: nickName as string,
|
|
4341
|
+
};
|
|
4342
|
+
_options = webapi_options;
|
|
4343
|
+
}
|
|
4344
|
+
return this._isNickNameUniqueAsync( _request, _options );
|
|
4345
|
+
}
|
|
4346
|
+
|
|
4347
|
+
|
|
4348
|
+
private async _validateUserAsync(request: carriers.User_ValidateUserRequest, options?:base.WebApiRequestOptions) : Promise< carriers.StringDictionary > {
|
|
4349
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
4350
|
+
base.WebApiBase.SetPending(options);
|
|
4351
|
+
return new Promise< carriers.StringDictionary >(async (resolve, reject) => {
|
|
4352
|
+
try {
|
|
4353
|
+
config.baseURL = this._options.baseUrl;
|
|
4354
|
+
const response = await this._axios.post("ValidateUser", request , config);
|
|
4355
|
+
base.WebApiBase.SetCompleted(options);
|
|
4356
|
+
const res : carriers.StringDictionary = converters.Create_StringDictionary_From( response.data );
|
|
4357
|
+
resolve(res);
|
|
4358
|
+
}
|
|
4359
|
+
catch( err ) {
|
|
4360
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
4361
|
+
reject(err);
|
|
4362
|
+
}
|
|
4363
|
+
});
|
|
4364
|
+
}
|
|
4365
|
+
|
|
4366
|
+
|
|
4367
|
+
|
|
4368
|
+
/**
|
|
4369
|
+
* Check that entity is ready for saving, return error messages by field.
|
|
4370
|
+
* @param request - User
|
|
4371
|
+
* @returns Error messages tagged by field.
|
|
4372
|
+
*/
|
|
4373
|
+
public async validateUserAsync(request: carriers.User_ValidateUserRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.StringDictionary >;
|
|
4374
|
+
|
|
4375
|
+
/**
|
|
4376
|
+
* Check that entity is ready for saving, return error messages by field.
|
|
4377
|
+
* @param user - Entity to be checked for errors.
|
|
4378
|
+
* @returns Error messages tagged by field.
|
|
4379
|
+
*/
|
|
4380
|
+
public async validateUserAsync(user: carriers.User, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.StringDictionary >;
|
|
4381
|
+
|
|
4382
|
+
public async validateUserAsync(user:carriers.User|carriers.User_ValidateUserRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.StringDictionary > {
|
|
4383
|
+
let _request : carriers.User_ValidateUserRequest = null;
|
|
4384
|
+
let _options : base.WebApiRequestOptions = null;
|
|
4385
|
+
const first : any = user;
|
|
4386
|
+
if( typeof( first ) === "object" && first && ( typeof(first.user)!='undefined' ) )
|
|
4387
|
+
{
|
|
4388
|
+
_request = user as carriers.User_ValidateUserRequest;
|
|
4389
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
4390
|
+
}
|
|
4391
|
+
else
|
|
4392
|
+
{
|
|
4393
|
+
_request = {
|
|
4394
|
+
user: user as carriers.User,
|
|
4395
|
+
};
|
|
4396
|
+
_options = webapi_options;
|
|
4397
|
+
}
|
|
4398
|
+
return this._validateUserAsync( _request, _options );
|
|
4399
|
+
}
|
|
4400
|
+
|
|
4401
|
+
|
|
4402
|
+
private async _getUserPresenceStatusAsync(request: carriers.User_GetUserPresenceStatusRequest, options?:base.WebApiRequestOptions) : Promise< carriers.UserPresenceStatus > {
|
|
4403
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
4404
|
+
base.WebApiBase.SetPending(options);
|
|
4405
|
+
return new Promise< carriers.UserPresenceStatus >(async (resolve, reject) => {
|
|
4406
|
+
try {
|
|
4407
|
+
config.baseURL = this._options.baseUrl;
|
|
4408
|
+
const response = await this._axios.post("GetUserPresenceStatus", request , config);
|
|
4409
|
+
base.WebApiBase.SetCompleted(options);
|
|
4410
|
+
const res : carriers.UserPresenceStatus = converters.Create_UserPresenceStatus_From( response.data );
|
|
4411
|
+
resolve(res);
|
|
4412
|
+
}
|
|
4413
|
+
catch( err ) {
|
|
4414
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
4415
|
+
reject(err);
|
|
4416
|
+
}
|
|
4417
|
+
});
|
|
4418
|
+
}
|
|
4419
|
+
|
|
4420
|
+
|
|
4421
|
+
|
|
4422
|
+
/**
|
|
4423
|
+
* Get user presence status
|
|
4424
|
+
* @param request - AssociateId
|
|
4425
|
+
* @returns User presence status
|
|
4426
|
+
*/
|
|
4427
|
+
public async getUserPresenceStatusAsync(request: carriers.User_GetUserPresenceStatusRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UserPresenceStatus >;
|
|
4428
|
+
|
|
4429
|
+
/**
|
|
4430
|
+
* Get user presence status
|
|
4431
|
+
* @param associateId - AssociateId of user to retrieve status for.
|
|
4432
|
+
* @returns User presence status
|
|
4433
|
+
*/
|
|
4434
|
+
public async getUserPresenceStatusAsync(associateId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UserPresenceStatus >;
|
|
4435
|
+
|
|
4436
|
+
public async getUserPresenceStatusAsync(associateId:number|carriers.User_GetUserPresenceStatusRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UserPresenceStatus > {
|
|
4437
|
+
let _request : carriers.User_GetUserPresenceStatusRequest = null;
|
|
4438
|
+
let _options : base.WebApiRequestOptions = null;
|
|
4439
|
+
const first : any = associateId;
|
|
4440
|
+
if( typeof( first ) === "object" && first && ( typeof(first.associateId)!='undefined' ) )
|
|
4441
|
+
{
|
|
4442
|
+
_request = associateId as carriers.User_GetUserPresenceStatusRequest;
|
|
4443
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
4444
|
+
}
|
|
4445
|
+
else
|
|
4446
|
+
{
|
|
4447
|
+
_request = {
|
|
4448
|
+
associateId: associateId as number,
|
|
4449
|
+
};
|
|
4450
|
+
_options = webapi_options;
|
|
4451
|
+
}
|
|
4452
|
+
return this._getUserPresenceStatusAsync( _request, _options );
|
|
4453
|
+
}
|
|
4454
|
+
|
|
4455
|
+
|
|
4456
|
+
private async _setUserPresenceStatusAsync(request: carriers.User_SetUserPresenceStatusRequest, options?:base.WebApiRequestOptions) : Promise< carriers.UserPresenceStatus > {
|
|
4457
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
4458
|
+
base.WebApiBase.SetPending(options);
|
|
4459
|
+
return new Promise< carriers.UserPresenceStatus >(async (resolve, reject) => {
|
|
4460
|
+
try {
|
|
4461
|
+
config.baseURL = this._options.baseUrl;
|
|
4462
|
+
const response = await this._axios.post("SetUserPresenceStatus", request , config);
|
|
4463
|
+
base.WebApiBase.SetCompleted(options);
|
|
4464
|
+
const res : carriers.UserPresenceStatus = converters.Create_UserPresenceStatus_From( response.data );
|
|
4465
|
+
resolve(res);
|
|
4466
|
+
}
|
|
4467
|
+
catch( err ) {
|
|
4468
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
4469
|
+
reject(err);
|
|
4470
|
+
}
|
|
4471
|
+
});
|
|
4472
|
+
}
|
|
4473
|
+
|
|
4474
|
+
|
|
4475
|
+
|
|
4476
|
+
/**
|
|
4477
|
+
* Set user presence status
|
|
4478
|
+
* @param request - AssociateId, UserPresenceStatus
|
|
4479
|
+
* @returns User presence status
|
|
4480
|
+
*/
|
|
4481
|
+
public async setUserPresenceStatusAsync(request: carriers.User_SetUserPresenceStatusRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UserPresenceStatus >;
|
|
4482
|
+
|
|
4483
|
+
/**
|
|
4484
|
+
* Set user presence status
|
|
4485
|
+
* @param associateId - AssociateId of user to set status for.
|
|
4486
|
+
* @param userPresenceStatus - User presence status to set
|
|
4487
|
+
* @returns User presence status
|
|
4488
|
+
*/
|
|
4489
|
+
public async setUserPresenceStatusAsync(associateId: number, userPresenceStatus: carriers.UserPresenceStatus, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UserPresenceStatus >;
|
|
4490
|
+
|
|
4491
|
+
public async setUserPresenceStatusAsync(associateId:number|carriers.User_SetUserPresenceStatusRequest, userPresenceStatus?:carriers.UserPresenceStatus|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UserPresenceStatus > {
|
|
4492
|
+
let _request : carriers.User_SetUserPresenceStatusRequest = null;
|
|
4493
|
+
let _options : base.WebApiRequestOptions = null;
|
|
4494
|
+
const first : any = associateId;
|
|
4495
|
+
if( typeof( first ) === "object" && first && ( typeof(first.associateId)!='undefined' || typeof(first.userPresenceStatus)!='undefined' ) )
|
|
4496
|
+
{
|
|
4497
|
+
_request = associateId as carriers.User_SetUserPresenceStatusRequest;
|
|
4498
|
+
_options = userPresenceStatus as base.WebApiRequestOptions;
|
|
4499
|
+
}
|
|
4500
|
+
else
|
|
4501
|
+
{
|
|
4502
|
+
_request = {
|
|
4503
|
+
associateId: associateId as number,
|
|
4504
|
+
userPresenceStatus: userPresenceStatus as carriers.UserPresenceStatus,
|
|
4505
|
+
};
|
|
4506
|
+
_options = webapi_options;
|
|
4507
|
+
}
|
|
4508
|
+
return this._setUserPresenceStatusAsync( _request, _options );
|
|
4509
|
+
}
|
|
4510
|
+
|
|
4511
|
+
/*
|
|
4512
|
+
* Gets a UserGroup object.
|
|
4513
|
+
* @param userGroupId - The primary key.
|
|
4514
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
4515
|
+
* @returns A single UserGroup
|
|
4516
|
+
*/
|
|
4517
|
+
public async getUserGroupAsync(userGroupId: number, options?:base.WebApiRequestOptions) : Promise< carriers.UserGroup > {
|
|
4518
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
4519
|
+
base.WebApiBase.SetPending(options);
|
|
4520
|
+
return new Promise< carriers.UserGroup >(async (resolve, reject) => {
|
|
4521
|
+
try {
|
|
4522
|
+
const response = await this._axios.post("GetUserGroup?userGroupId=" + userGroupId, null, config);
|
|
4523
|
+
base.WebApiBase.SetCompleted(options);
|
|
4524
|
+
const res = converters.Create_UserGroup_From( response.data );
|
|
4525
|
+
resolve(res);
|
|
4526
|
+
}
|
|
4527
|
+
catch( err ) {
|
|
4528
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
4529
|
+
reject(err);
|
|
4530
|
+
}
|
|
4531
|
+
});
|
|
4532
|
+
}
|
|
4533
|
+
|
|
4534
|
+
|
|
4535
|
+
private async _saveUserGroupAsync(request: carriers.User_SaveUserGroupRequest, options?:base.WebApiRequestOptions) : Promise< carriers.UserGroup > {
|
|
4536
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
4537
|
+
base.WebApiBase.SetPending(options);
|
|
4538
|
+
return new Promise< carriers.UserGroup >(async (resolve, reject) => {
|
|
4539
|
+
try {
|
|
4540
|
+
config.baseURL = this._options.baseUrl;
|
|
4541
|
+
const response = await this._axios.post("SaveUserGroup", request , config);
|
|
4542
|
+
base.WebApiBase.SetCompleted(options);
|
|
4543
|
+
const res : carriers.UserGroup = converters.Create_UserGroup_From( response.data );
|
|
4544
|
+
resolve(res);
|
|
4545
|
+
}
|
|
4546
|
+
catch( err ) {
|
|
4547
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
4548
|
+
reject(err);
|
|
4549
|
+
}
|
|
4550
|
+
});
|
|
4551
|
+
}
|
|
4552
|
+
|
|
4553
|
+
|
|
4554
|
+
|
|
4555
|
+
/**
|
|
4556
|
+
* Save a user group. Set UserGroup.Deleted to mark a user group as deleted and invisible in the user interface.
|
|
4557
|
+
* @param request - UserGroup
|
|
4558
|
+
* @returns UserGroup as saved to the database
|
|
4559
|
+
*/
|
|
4560
|
+
public async saveUserGroupAsync(request: carriers.User_SaveUserGroupRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UserGroup >;
|
|
4561
|
+
|
|
4562
|
+
/**
|
|
4563
|
+
* Save a user group. Set UserGroup.Deleted to mark a user group as deleted and invisible in the user interface.
|
|
4564
|
+
* @param userGroup - UserGroup to save
|
|
4565
|
+
* @returns UserGroup as saved to the database
|
|
4566
|
+
*/
|
|
4567
|
+
public async saveUserGroupAsync(userGroup: carriers.UserGroup, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UserGroup >;
|
|
4568
|
+
|
|
4569
|
+
public async saveUserGroupAsync(userGroup:carriers.UserGroup|carriers.User_SaveUserGroupRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UserGroup > {
|
|
4570
|
+
let _request : carriers.User_SaveUserGroupRequest = null;
|
|
4571
|
+
let _options : base.WebApiRequestOptions = null;
|
|
4572
|
+
const first : any = userGroup;
|
|
4573
|
+
if( typeof( first ) === "object" && first && ( typeof(first.userGroup)!='undefined' ) )
|
|
4574
|
+
{
|
|
4575
|
+
_request = userGroup as carriers.User_SaveUserGroupRequest;
|
|
4576
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
4577
|
+
}
|
|
4578
|
+
else
|
|
4579
|
+
{
|
|
4580
|
+
_request = {
|
|
4581
|
+
userGroup: userGroup as carriers.UserGroup,
|
|
4582
|
+
};
|
|
4583
|
+
_options = webapi_options;
|
|
4584
|
+
}
|
|
4585
|
+
return this._saveUserGroupAsync( _request, _options );
|
|
4586
|
+
}
|
|
4587
|
+
|
|
4588
|
+
|
|
4589
|
+
private async _getAllUserGroupsAsync(request: carriers.User_GetAllUserGroupsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.UserGroup[] > {
|
|
4590
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
4591
|
+
base.WebApiBase.SetPending(options);
|
|
4592
|
+
return new Promise< carriers.UserGroup[] >(async (resolve, reject) => {
|
|
4593
|
+
try {
|
|
4594
|
+
config.baseURL = this._options.baseUrl;
|
|
4595
|
+
const response = await this._axios.post("GetAllUserGroups", request , config);
|
|
4596
|
+
base.WebApiBase.SetCompleted(options);
|
|
4597
|
+
const res : carriers.UserGroup[] = converters.Create_UserGroupArray_From( response.data );
|
|
4598
|
+
resolve(res);
|
|
4599
|
+
}
|
|
4600
|
+
catch( err ) {
|
|
4601
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
4602
|
+
reject(err);
|
|
4603
|
+
}
|
|
4604
|
+
});
|
|
4605
|
+
}
|
|
4606
|
+
|
|
4607
|
+
|
|
4608
|
+
|
|
4609
|
+
/**
|
|
4610
|
+
* Get all user groups
|
|
4611
|
+
* @param request - IncludeDeleted
|
|
4612
|
+
* @returns All user groups
|
|
4613
|
+
*/
|
|
4614
|
+
public async getAllUserGroupsAsync(request: carriers.User_GetAllUserGroupsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UserGroup[] >;
|
|
4615
|
+
|
|
4616
|
+
/**
|
|
4617
|
+
* Get all user groups
|
|
4618
|
+
* @param includeDeleted - Include user groups with Deleted set to true
|
|
4619
|
+
* @returns All user groups
|
|
4620
|
+
*/
|
|
4621
|
+
public async getAllUserGroupsAsync(includeDeleted: boolean, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UserGroup[] >;
|
|
4622
|
+
|
|
4623
|
+
public async getAllUserGroupsAsync(includeDeleted:boolean|carriers.User_GetAllUserGroupsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UserGroup[] > {
|
|
4624
|
+
let _request : carriers.User_GetAllUserGroupsRequest = null;
|
|
4625
|
+
let _options : base.WebApiRequestOptions = null;
|
|
4626
|
+
const first : any = includeDeleted;
|
|
4627
|
+
if( typeof( first ) === "object" && first && ( typeof(first.includeDeleted)!='undefined' ) )
|
|
4628
|
+
{
|
|
4629
|
+
_request = includeDeleted as carriers.User_GetAllUserGroupsRequest;
|
|
4630
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
4631
|
+
}
|
|
4632
|
+
else
|
|
4633
|
+
{
|
|
4634
|
+
_request = {
|
|
4635
|
+
includeDeleted: includeDeleted as boolean,
|
|
4636
|
+
};
|
|
4637
|
+
_options = webapi_options;
|
|
4638
|
+
}
|
|
4639
|
+
return this._getAllUserGroupsAsync( _request, _options );
|
|
4640
|
+
}
|
|
4641
|
+
|
|
4642
|
+
|
|
4643
|
+
private async _createUserGroupAsync( options?:base.WebApiRequestOptions) : Promise< carriers.UserGroup > {
|
|
4644
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
4645
|
+
base.WebApiBase.SetPending(options);
|
|
4646
|
+
return new Promise< carriers.UserGroup >(async (resolve, reject) => {
|
|
4647
|
+
try {
|
|
4648
|
+
config.baseURL = this._options.baseUrl;
|
|
4649
|
+
const response = await this._axios.post("CreateUserGroup", undefined , config);
|
|
4650
|
+
base.WebApiBase.SetCompleted(options);
|
|
4651
|
+
const res : carriers.UserGroup = converters.Create_UserGroup_From( response.data );
|
|
4652
|
+
resolve(res);
|
|
4653
|
+
}
|
|
4654
|
+
catch( err ) {
|
|
4655
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
4656
|
+
reject(err);
|
|
4657
|
+
}
|
|
4658
|
+
});
|
|
4659
|
+
}
|
|
4660
|
+
|
|
4661
|
+
|
|
4662
|
+
/**
|
|
4663
|
+
* Create UserGroup (Rank is assigned to the highest rank)
|
|
4664
|
+
* @returns
|
|
4665
|
+
*/
|
|
4666
|
+
public async createUserGroupAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UserGroup >
|
|
4667
|
+
{
|
|
4668
|
+
return this._createUserGroupAsync(webapi_options);
|
|
4669
|
+
}
|
|
4670
|
+
|
|
4671
|
+
|
|
4672
|
+
private async _deleteUserGroupAsync(request: carriers.User_DeleteUserGroupRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
4673
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
4674
|
+
base.WebApiBase.SetPending(options);
|
|
4675
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
4676
|
+
try {
|
|
4677
|
+
config.baseURL = this._options.baseUrl;
|
|
4678
|
+
const response = await this._axios.post("DeleteUserGroup", request , config);
|
|
4679
|
+
base.WebApiBase.SetCompleted(options);
|
|
4680
|
+
const res = response.data;
|
|
4681
|
+
resolve(res);
|
|
4682
|
+
}
|
|
4683
|
+
catch( err ) {
|
|
4684
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
4685
|
+
reject(err);
|
|
4686
|
+
}
|
|
4687
|
+
});
|
|
4688
|
+
}
|
|
4689
|
+
|
|
4690
|
+
|
|
4691
|
+
|
|
4692
|
+
/**
|
|
4693
|
+
* Delete a usergroup and move its members to another usergroup
|
|
4694
|
+
* @param request - UserGroupToDelete, UserGroupToMoveTo
|
|
4695
|
+
* @returns
|
|
4696
|
+
*/
|
|
4697
|
+
public async deleteUserGroupAsync(request: carriers.User_DeleteUserGroupRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
4698
|
+
|
|
4699
|
+
/**
|
|
4700
|
+
* Delete a usergroup and move its members to another usergroup
|
|
4701
|
+
* @param userGroupToDelete - The id of the userGroup to delete
|
|
4702
|
+
* @param userGroupToMoveTo - The id of the userGroup to move the members to
|
|
4703
|
+
* @returns
|
|
4704
|
+
*/
|
|
4705
|
+
public async deleteUserGroupAsync(userGroupToDelete: number, userGroupToMoveTo: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
4706
|
+
|
|
4707
|
+
public async deleteUserGroupAsync(userGroupToDelete:number|carriers.User_DeleteUserGroupRequest, userGroupToMoveTo?:number|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
4708
|
+
let _request : carriers.User_DeleteUserGroupRequest = null;
|
|
4709
|
+
let _options : base.WebApiRequestOptions = null;
|
|
4710
|
+
const first : any = userGroupToDelete;
|
|
4711
|
+
if( typeof( first ) === "object" && first && ( typeof(first.userGroupToDelete)!='undefined' || typeof(first.userGroupToMoveTo)!='undefined' ) )
|
|
4712
|
+
{
|
|
4713
|
+
_request = userGroupToDelete as carriers.User_DeleteUserGroupRequest;
|
|
4714
|
+
_options = userGroupToMoveTo as base.WebApiRequestOptions;
|
|
4715
|
+
}
|
|
4716
|
+
else
|
|
4717
|
+
{
|
|
4718
|
+
_request = {
|
|
4719
|
+
userGroupToDelete: userGroupToDelete as number,
|
|
4720
|
+
userGroupToMoveTo: userGroupToMoveTo as number,
|
|
4721
|
+
};
|
|
4722
|
+
_options = webapi_options;
|
|
4723
|
+
}
|
|
4724
|
+
return this._deleteUserGroupAsync( _request, _options );
|
|
4725
|
+
}
|
|
4726
|
+
|
|
4727
|
+
/*
|
|
4728
|
+
* Gets an array of UserGroup objects.
|
|
4729
|
+
* @param userGroupIds - The primary keys.
|
|
4730
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
4731
|
+
* @returns An array of UserGroup
|
|
4732
|
+
*/
|
|
4733
|
+
public async getUserGroupListAsync(userGroupIds: number[], options?:base.WebApiRequestOptions) : Promise< carriers.UserGroup[] > {
|
|
4734
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
4735
|
+
base.WebApiBase.SetPending(options);
|
|
4736
|
+
return new Promise< carriers.UserGroup[] >(async (resolve, reject) => {
|
|
4737
|
+
try {
|
|
4738
|
+
const response = await this._axios.post("GetUserGroupList", userGroupIds, config);
|
|
4739
|
+
base.WebApiBase.SetCompleted(options);
|
|
4740
|
+
const res = converters.Create_UserGroupArray_From( response.data );
|
|
4741
|
+
resolve(res);
|
|
4742
|
+
}
|
|
4743
|
+
catch( err ) {
|
|
4744
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
4745
|
+
reject(err);
|
|
4746
|
+
}
|
|
4747
|
+
});
|
|
4748
|
+
}
|
|
4749
|
+
|
|
4750
|
+
/*
|
|
4751
|
+
* Gets a UserInfo object.
|
|
4752
|
+
* @param userInfoId - The primary key.
|
|
4753
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
4754
|
+
* @returns A single UserInfo
|
|
4755
|
+
*/
|
|
4756
|
+
public async getUserInfoAsync(userInfoId: number, options?:base.WebApiRequestOptions) : Promise< carriers.UserInfo > {
|
|
4757
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
4758
|
+
base.WebApiBase.SetPending(options);
|
|
4759
|
+
return new Promise< carriers.UserInfo >(async (resolve, reject) => {
|
|
4760
|
+
try {
|
|
4761
|
+
const response = await this._axios.post("GetUserInfo?userInfoId=" + userInfoId, null, config);
|
|
4762
|
+
base.WebApiBase.SetCompleted(options);
|
|
4763
|
+
const res = converters.Create_UserInfo_From( response.data );
|
|
4764
|
+
resolve(res);
|
|
4765
|
+
}
|
|
4766
|
+
catch( err ) {
|
|
4767
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
4768
|
+
reject(err);
|
|
4769
|
+
}
|
|
4770
|
+
});
|
|
4771
|
+
}
|
|
4772
|
+
|
|
4773
|
+
/*
|
|
4774
|
+
* Gets an array of UserInfo objects.
|
|
4775
|
+
* @param userInfoIds - The primary keys.
|
|
4776
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
4777
|
+
* @returns An array of UserInfo
|
|
4778
|
+
*/
|
|
4779
|
+
public async getUserInfoListAsync(userInfoIds: number[], options?:base.WebApiRequestOptions) : Promise< carriers.UserInfo[] > {
|
|
4780
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
4781
|
+
base.WebApiBase.SetPending(options);
|
|
4782
|
+
return new Promise< carriers.UserInfo[] >(async (resolve, reject) => {
|
|
4783
|
+
try {
|
|
4784
|
+
const response = await this._axios.post("GetUserInfoList", userInfoIds, config);
|
|
4785
|
+
base.WebApiBase.SetCompleted(options);
|
|
4786
|
+
const res = converters.Create_UserInfoArray_From( response.data );
|
|
4787
|
+
resolve(res);
|
|
4788
|
+
}
|
|
4789
|
+
catch( err ) {
|
|
4790
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
4791
|
+
reject(err);
|
|
4792
|
+
}
|
|
4793
|
+
});
|
|
4794
|
+
}
|
|
4795
|
+
|
|
4796
|
+
} // class v1UserAgentController
|
|
4797
|
+
|
|
4798
|
+
|