@oneuptime/common 8.0.5237 → 8.0.5283
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/Models/DatabaseModels/Index.ts +4 -2
- package/Models/DatabaseModels/OnCallDutyPolicy.ts +7 -0
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.ts +7 -0
- package/Models/DatabaseModels/OnCallDutyPolicySchedule.ts +7 -0
- package/Models/DatabaseModels/OnCallDutyPolicyTimeLog.ts +7 -0
- package/Models/DatabaseModels/OnCallDutyPolicyUserOverride.ts +5 -3
- package/Models/DatabaseModels/Project.ts +4 -2
- package/Models/DatabaseModels/ProjectSmtpConfig.ts +4 -2
- package/Models/DatabaseModels/StatusPageDomain.ts +6 -4
- package/Models/DatabaseModels/User.ts +0 -46
- package/Models/DatabaseModels/{UserTwoFactorAuth.ts → UserTotpAuth.ts} +16 -16
- package/Models/DatabaseModels/UserWebAuthn.ts +244 -0
- package/Models/DatabaseModels/WorkspaceProjectAuthToken.ts +21 -0
- package/Server/API/BaseAPI.ts +4 -2
- package/Server/API/GlobalConfigAPI.ts +16 -12
- package/Server/API/MicrosoftTeamsAPI.ts +1240 -0
- package/Server/API/ProjectAPI.ts +4 -2
- package/Server/API/ResellerPlanAPI.ts +4 -2
- package/Server/API/SlackAPI.ts +54 -48
- package/Server/API/StatusPageAPI.ts +5 -3
- package/Server/API/UserOnCallLogTimelineAPI.ts +5 -3
- package/Server/API/{UserTwoFactorAuthAPI.ts → UserTotpAuthAPI.ts} +20 -20
- package/Server/API/UserWebAuthnAPI.ts +103 -0
- package/Server/EnvironmentConfig.ts +6 -0
- package/Server/Images/MicrosoftTeams/color.png +0 -0
- package/Server/Images/MicrosoftTeams/outline.png +0 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1753131488925-AddEnableCustomSubscriberEmailNotificationFooterText.ts +4 -2
- package/Server/Infrastructure/Postgres/SchemaMigrations/1759175457008-MigrationName.ts +27 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1759232954703-MigrationName.ts +25 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1759234532998-MigrationName.ts +15 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +6 -0
- package/Server/Infrastructure/Queue.ts +4 -2
- package/Server/Infrastructure/SocketIO.ts +4 -2
- package/Server/Middleware/ProjectAuthorization.ts +5 -3
- package/Server/Middleware/SlackAuthorization.ts +2 -2
- package/Server/Middleware/TelemetryIngest.ts +12 -6
- package/Server/Services/AlertStateTimelineService.ts +34 -18
- package/Server/Services/BillingInvoiceService.ts +8 -4
- package/Server/Services/BillingService.ts +13 -9
- package/Server/Services/DatabaseService.ts +42 -30
- package/Server/Services/IncidentService.ts +5 -3
- package/Server/Services/IncidentStateTimelineService.ts +34 -18
- package/Server/Services/Index.ts +4 -2
- package/Server/Services/MonitorStatusTimelineService.ts +34 -18
- package/Server/Services/OnCallDutyPolicyScheduleService.ts +4 -2
- package/Server/Services/ProjectService.ts +6 -4
- package/Server/Services/ScheduledMaintenanceStateTimelineService.ts +26 -14
- package/Server/Services/StatusPageService.ts +4 -2
- package/Server/Services/UserService.ts +21 -5
- package/Server/Services/{UserTwoFactorAuthService.ts → UserTotpAuthService.ts} +26 -7
- package/Server/Services/UserWebAuthnService.ts +419 -0
- package/Server/Services/WorkspaceNotificationRuleService.ts +257 -77
- package/Server/Services/WorkspaceProjectAuthTokenService.ts +2 -2
- package/Server/Types/AnalyticsDatabase/ModelPermission.ts +9 -5
- package/Server/Types/Database/Permissions/BasePermission.ts +4 -2
- package/Server/Types/Database/Permissions/TenantPermission.ts +5 -3
- package/Server/Types/Database/QueryHelper.ts +4 -2
- package/Server/Types/Markdown.ts +6 -4
- package/Server/Types/Workflow/ComponentCode.ts +4 -2
- package/Server/Types/Workflow/Components/Conditions/IfElse.ts +5 -3
- package/Server/Types/Workflow/Components/JavaScript.ts +5 -3
- package/Server/Types/Workflow/TriggerCode.ts +4 -2
- package/Server/Utils/AnalyticsDatabase/Statement.ts +4 -2
- package/Server/Utils/AnalyticsDatabase/StatementGenerator.ts +21 -11
- package/Server/Utils/Browser.ts +6 -4
- package/Server/Utils/CodeRepository/GitHub/GitHub.ts +4 -2
- package/Server/Utils/LocalFile.ts +14 -0
- package/Server/Utils/Monitor/MonitorResource.ts +17 -9
- package/Server/Utils/Realtime.ts +4 -2
- package/Server/Utils/StartServer.ts +1 -1
- package/Server/Utils/Telemetry.ts +15 -9
- package/Server/Utils/{TwoFactorAuth.ts → TotpAuth.ts} +2 -2
- package/Server/Utils/Workspace/MicrosoftTeams/Actions/ActionTypes.ts +75 -16
- package/Server/Utils/Workspace/MicrosoftTeams/Actions/Alert.ts +649 -0
- package/Server/Utils/Workspace/MicrosoftTeams/Actions/Auth.ts +237 -0
- package/Server/Utils/Workspace/MicrosoftTeams/Actions/Incident.ts +1321 -0
- package/Server/Utils/Workspace/MicrosoftTeams/Actions/Monitor.ts +155 -0
- package/Server/Utils/Workspace/MicrosoftTeams/Actions/OnCallDutyPolicy.ts +119 -0
- package/Server/Utils/Workspace/MicrosoftTeams/Actions/ScheduledMaintenance.ts +959 -0
- package/Server/Utils/Workspace/MicrosoftTeams/Messages/Alert.ts +16 -14
- package/Server/Utils/Workspace/MicrosoftTeams/Messages/Incident.ts +17 -14
- package/Server/Utils/Workspace/MicrosoftTeams/Messages/ScheduledMaintenance.ts +18 -13
- package/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.ts +2547 -14
- package/Server/Utils/Workspace/Slack/Actions/Alert.ts +4 -2
- package/Server/Utils/Workspace/Slack/Actions/Auth.ts +4 -2
- package/Server/Utils/Workspace/Slack/Actions/Incident.ts +14 -10
- package/Server/Utils/Workspace/Slack/Actions/Monitor.ts +4 -2
- package/Server/Utils/Workspace/Slack/Actions/OnCallDutyPolicy.ts +4 -2
- package/Server/Utils/Workspace/Slack/Actions/ScheduledMaintenance.ts +14 -10
- package/Server/Utils/Workspace/Slack/Messages/Alert.ts +9 -7
- package/Server/Utils/Workspace/Slack/Messages/Incident.ts +9 -7
- package/Server/Utils/Workspace/Slack/Messages/Monitor.ts +9 -7
- package/Server/Utils/Workspace/Slack/Messages/ScheduledMaintenance.ts +9 -7
- package/Server/Utils/Workspace/Slack/Slack.ts +6 -0
- package/Server/Utils/Workspace/Workspace.ts +13 -10
- package/Server/Utils/Workspace/WorkspaceBase.ts +9 -0
- package/Tests/Server/API/BaseAPI.test.ts +64 -52
- package/Tests/Server/Services/BillingService.test.ts +4 -4
- package/Tests/Server/Services/TeamMemberService.test.ts +20 -12
- package/Tests/Server/TestingUtils/Services/BillingServiceHelper.ts +2 -2
- package/Tests/Types/OnCallDutyPolicy/LayerUtil.test.ts +8 -4
- package/Tests/UI/Components/DictionaryOfStrings.test.tsx +4 -2
- package/Tests/UI/Components/FilePicker.test.tsx +2 -2
- package/Tests/Utils/API.test.ts +9 -8
- package/Types/BaseDatabase/DatabaseCommonInteractionPropsUtil.ts +5 -3
- package/Types/Html.ts +5 -3
- package/Types/JSONFunctions.ts +5 -5
- package/Types/Metrics/MetricsQuery.ts +6 -4
- package/Types/Monitor/MonitorType.ts +8 -6
- package/Types/OnCallDutyPolicy/Layer.ts +29 -17
- package/Types/Phone.ts +5 -3
- package/Types/Workspace/NotificationRules/BaseNotificationRule.ts +1 -0
- package/Types/Workspace/NotificationRules/CreateChannelNotificationRule.ts +5 -2
- package/Types/Workspace/WorkspaceMessagePayload.ts +1 -0
- package/Types/Workspace/WorkspaceType.ts +13 -0
- package/UI/Components/Charts/Utils/DataPoint.ts +8 -6
- package/UI/Components/Detail/Detail.tsx +4 -1
- package/UI/Components/FilePicker/FilePicker.tsx +1 -1
- package/UI/Components/Forms/Types/Field.ts +4 -2
- package/UI/Components/Image/Image.tsx +1 -1
- package/UI/Components/JSONTable/JSONTable.tsx +4 -2
- package/UI/Components/ModelTable/BaseModelTable.tsx +5 -3
- package/UI/Components/SideMenu/SideMenu.tsx +4 -2
- package/UI/Components/SideMenu/SideMenuItem.tsx +69 -45
- package/UI/Config.ts +3 -0
- package/UI/Utils/API/API.ts +5 -3
- package/UI/Utils/Countries.ts +5 -3
- package/UI/Utils/Login.ts +6 -1
- package/Utils/Base64.ts +13 -0
- package/Utils/Schema/ModelSchema.ts +4 -2
- package/build/dist/Models/DatabaseModels/Index.js +4 -2
- package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicy.js +7 -0
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicy.js.map +1 -1
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.js +7 -0
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.js.map +1 -1
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicySchedule.js +7 -0
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicySchedule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyTimeLog.js +7 -0
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyTimeLog.js.map +1 -1
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyUserOverride.js +5 -3
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyUserOverride.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Project.js +4 -2
- package/build/dist/Models/DatabaseModels/Project.js.map +1 -1
- package/build/dist/Models/DatabaseModels/ProjectSmtpConfig.js +4 -2
- package/build/dist/Models/DatabaseModels/ProjectSmtpConfig.js.map +1 -1
- package/build/dist/Models/DatabaseModels/StatusPageDomain.js +6 -4
- package/build/dist/Models/DatabaseModels/StatusPageDomain.js.map +1 -1
- package/build/dist/Models/DatabaseModels/User.js +0 -49
- package/build/dist/Models/DatabaseModels/User.js.map +1 -1
- package/build/dist/Models/DatabaseModels/{UserTwoFactorAuth.js → UserTotpAuth.js} +27 -27
- package/build/dist/Models/DatabaseModels/UserTotpAuth.js.map +1 -0
- package/build/dist/Models/DatabaseModels/UserWebAuthn.js +270 -0
- package/build/dist/Models/DatabaseModels/UserWebAuthn.js.map +1 -0
- package/build/dist/Models/DatabaseModels/WorkspaceProjectAuthToken.js.map +1 -1
- package/build/dist/Server/API/BaseAPI.js +4 -2
- package/build/dist/Server/API/BaseAPI.js.map +1 -1
- package/build/dist/Server/API/GlobalConfigAPI.js +16 -12
- package/build/dist/Server/API/GlobalConfigAPI.js.map +1 -1
- package/build/dist/Server/API/MicrosoftTeamsAPI.js +771 -0
- package/build/dist/Server/API/MicrosoftTeamsAPI.js.map +1 -0
- package/build/dist/Server/API/ProjectAPI.js +4 -2
- package/build/dist/Server/API/ProjectAPI.js.map +1 -1
- package/build/dist/Server/API/ResellerPlanAPI.js +4 -2
- package/build/dist/Server/API/ResellerPlanAPI.js.map +1 -1
- package/build/dist/Server/API/SlackAPI.js +53 -47
- package/build/dist/Server/API/SlackAPI.js.map +1 -1
- package/build/dist/Server/API/StatusPageAPI.js +5 -3
- package/build/dist/Server/API/StatusPageAPI.js.map +1 -1
- package/build/dist/Server/API/UserOnCallLogTimelineAPI.js +5 -3
- package/build/dist/Server/API/UserOnCallLogTimelineAPI.js.map +1 -1
- package/build/dist/Server/API/{UserTwoFactorAuthAPI.js → UserTotpAuthAPI.js} +16 -16
- package/build/dist/Server/API/UserTotpAuthAPI.js.map +1 -0
- package/build/dist/Server/API/UserWebAuthnAPI.js +65 -0
- package/build/dist/Server/API/UserWebAuthnAPI.js.map +1 -0
- package/build/dist/Server/EnvironmentConfig.js +3 -0
- package/build/dist/Server/EnvironmentConfig.js.map +1 -1
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1753131488925-AddEnableCustomSubscriberEmailNotificationFooterText.js +4 -2
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1753131488925-AddEnableCustomSubscriberEmailNotificationFooterText.js.map +1 -1
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1759175457008-MigrationName.js +16 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1759175457008-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1759232954703-MigrationName.js +16 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1759232954703-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1759234532998-MigrationName.js +12 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1759234532998-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +6 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Infrastructure/Queue.js +4 -2
- package/build/dist/Server/Infrastructure/Queue.js.map +1 -1
- package/build/dist/Server/Infrastructure/SocketIO.js +4 -2
- package/build/dist/Server/Infrastructure/SocketIO.js.map +1 -1
- package/build/dist/Server/Middleware/ProjectAuthorization.js +5 -3
- package/build/dist/Server/Middleware/ProjectAuthorization.js.map +1 -1
- package/build/dist/Server/Middleware/SlackAuthorization.js.map +1 -1
- package/build/dist/Server/Middleware/TelemetryIngest.js +12 -6
- package/build/dist/Server/Middleware/TelemetryIngest.js.map +1 -1
- package/build/dist/Server/Services/AlertStateTimelineService.js +34 -18
- package/build/dist/Server/Services/AlertStateTimelineService.js.map +1 -1
- package/build/dist/Server/Services/BillingInvoiceService.js +8 -4
- package/build/dist/Server/Services/BillingInvoiceService.js.map +1 -1
- package/build/dist/Server/Services/BillingService.js +13 -9
- package/build/dist/Server/Services/BillingService.js.map +1 -1
- package/build/dist/Server/Services/DatabaseService.js +40 -28
- package/build/dist/Server/Services/DatabaseService.js.map +1 -1
- package/build/dist/Server/Services/IncidentService.js +5 -3
- package/build/dist/Server/Services/IncidentService.js.map +1 -1
- package/build/dist/Server/Services/IncidentStateTimelineService.js +34 -18
- package/build/dist/Server/Services/IncidentStateTimelineService.js.map +1 -1
- package/build/dist/Server/Services/Index.js +4 -2
- package/build/dist/Server/Services/Index.js.map +1 -1
- package/build/dist/Server/Services/MonitorStatusTimelineService.js +34 -18
- package/build/dist/Server/Services/MonitorStatusTimelineService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyScheduleService.js +4 -2
- package/build/dist/Server/Services/OnCallDutyPolicyScheduleService.js.map +1 -1
- package/build/dist/Server/Services/ProjectService.js +6 -4
- package/build/dist/Server/Services/ProjectService.js.map +1 -1
- package/build/dist/Server/Services/ScheduledMaintenanceStateTimelineService.js +26 -14
- package/build/dist/Server/Services/ScheduledMaintenanceStateTimelineService.js.map +1 -1
- package/build/dist/Server/Services/StatusPageService.js +4 -2
- package/build/dist/Server/Services/StatusPageService.js.map +1 -1
- package/build/dist/Server/Services/UserService.js +16 -3
- package/build/dist/Server/Services/UserService.js.map +1 -1
- package/build/dist/Server/Services/{UserTwoFactorAuthService.js → UserTotpAuthService.js} +22 -8
- package/build/dist/Server/Services/UserTotpAuthService.js.map +1 -0
- package/build/dist/Server/Services/UserWebAuthnService.js +365 -0
- package/build/dist/Server/Services/UserWebAuthnService.js.map +1 -0
- package/build/dist/Server/Services/WorkspaceNotificationRuleService.js +142 -51
- package/build/dist/Server/Services/WorkspaceNotificationRuleService.js.map +1 -1
- package/build/dist/Server/Types/AnalyticsDatabase/ModelPermission.js +9 -5
- package/build/dist/Server/Types/AnalyticsDatabase/ModelPermission.js.map +1 -1
- package/build/dist/Server/Types/Database/Permissions/BasePermission.js +4 -2
- package/build/dist/Server/Types/Database/Permissions/BasePermission.js.map +1 -1
- package/build/dist/Server/Types/Database/Permissions/TenantPermission.js +5 -3
- package/build/dist/Server/Types/Database/Permissions/TenantPermission.js.map +1 -1
- package/build/dist/Server/Types/Database/QueryHelper.js +4 -2
- package/build/dist/Server/Types/Database/QueryHelper.js.map +1 -1
- package/build/dist/Server/Types/Markdown.js +6 -4
- package/build/dist/Server/Types/Markdown.js.map +1 -1
- package/build/dist/Server/Types/Workflow/ComponentCode.js +4 -2
- package/build/dist/Server/Types/Workflow/ComponentCode.js.map +1 -1
- package/build/dist/Server/Types/Workflow/Components/Conditions/IfElse.js +5 -3
- package/build/dist/Server/Types/Workflow/Components/Conditions/IfElse.js.map +1 -1
- package/build/dist/Server/Types/Workflow/Components/JavaScript.js +5 -3
- package/build/dist/Server/Types/Workflow/Components/JavaScript.js.map +1 -1
- package/build/dist/Server/Types/Workflow/TriggerCode.js.map +1 -1
- package/build/dist/Server/Utils/AnalyticsDatabase/Statement.js +4 -2
- package/build/dist/Server/Utils/AnalyticsDatabase/Statement.js.map +1 -1
- package/build/dist/Server/Utils/AnalyticsDatabase/StatementGenerator.js +21 -11
- package/build/dist/Server/Utils/AnalyticsDatabase/StatementGenerator.js.map +1 -1
- package/build/dist/Server/Utils/Browser.js +6 -4
- package/build/dist/Server/Utils/Browser.js.map +1 -1
- package/build/dist/Server/Utils/CodeRepository/GitHub/GitHub.js +4 -2
- package/build/dist/Server/Utils/CodeRepository/GitHub/GitHub.js.map +1 -1
- package/build/dist/Server/Utils/LocalFile.js +16 -0
- package/build/dist/Server/Utils/LocalFile.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorResource.js +17 -9
- package/build/dist/Server/Utils/Monitor/MonitorResource.js.map +1 -1
- package/build/dist/Server/Utils/Realtime.js +4 -2
- package/build/dist/Server/Utils/Realtime.js.map +1 -1
- package/build/dist/Server/Utils/StartServer.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry.js +6 -4
- package/build/dist/Server/Utils/Telemetry.js.map +1 -1
- package/build/dist/Server/Utils/{TwoFactorAuth.js → TotpAuth.js} +8 -8
- package/build/dist/Server/Utils/TotpAuth.js.map +1 -0
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/ActionTypes.js +86 -36
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/ActionTypes.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Alert.js +531 -0
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Alert.js.map +1 -0
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Auth.js +206 -0
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Auth.js.map +1 -0
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Incident.js +1102 -0
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Incident.js.map +1 -0
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Monitor.js +136 -0
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Monitor.js.map +1 -0
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/OnCallDutyPolicy.js +107 -0
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/OnCallDutyPolicy.js.map +1 -0
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/ScheduledMaintenance.js +795 -0
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/ScheduledMaintenance.js.map +1 -0
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Messages/Alert.js +16 -14
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Messages/Alert.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Messages/Incident.js +16 -14
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Messages/Incident.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Messages/ScheduledMaintenance.js +15 -13
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Messages/ScheduledMaintenance.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js +1982 -13
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/Slack/Actions/Alert.js +4 -2
- package/build/dist/Server/Utils/Workspace/Slack/Actions/Alert.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/Slack/Actions/Auth.js +4 -2
- package/build/dist/Server/Utils/Workspace/Slack/Actions/Auth.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/Slack/Actions/Incident.js +14 -10
- package/build/dist/Server/Utils/Workspace/Slack/Actions/Incident.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/Slack/Actions/Monitor.js +4 -2
- package/build/dist/Server/Utils/Workspace/Slack/Actions/Monitor.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/Slack/Actions/OnCallDutyPolicy.js +4 -2
- package/build/dist/Server/Utils/Workspace/Slack/Actions/OnCallDutyPolicy.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/Slack/Actions/ScheduledMaintenance.js +14 -10
- package/build/dist/Server/Utils/Workspace/Slack/Actions/ScheduledMaintenance.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/Slack/Messages/Alert.js +9 -7
- package/build/dist/Server/Utils/Workspace/Slack/Messages/Alert.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/Slack/Messages/Incident.js +9 -7
- package/build/dist/Server/Utils/Workspace/Slack/Messages/Incident.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/Slack/Messages/Monitor.js +9 -7
- package/build/dist/Server/Utils/Workspace/Slack/Messages/Monitor.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/Slack/Messages/ScheduledMaintenance.js +9 -7
- package/build/dist/Server/Utils/Workspace/Slack/Messages/ScheduledMaintenance.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/Slack/Slack.js +5 -0
- package/build/dist/Server/Utils/Workspace/Slack/Slack.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/Workspace.js +12 -10
- package/build/dist/Server/Utils/Workspace/Workspace.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/WorkspaceBase.js.map +1 -1
- package/build/dist/Tests/Server/API/BaseAPI.test.js +59 -47
- package/build/dist/Tests/Server/API/BaseAPI.test.js.map +1 -1
- package/build/dist/Tests/Server/Services/BillingService.test.js +4 -4
- package/build/dist/Tests/Server/Services/BillingService.test.js.map +1 -1
- package/build/dist/Tests/Server/Services/TeamMemberService.test.js +20 -12
- package/build/dist/Tests/Server/Services/TeamMemberService.test.js.map +1 -1
- package/build/dist/Tests/Server/TestingUtils/Services/BillingServiceHelper.js +2 -2
- package/build/dist/Tests/Server/TestingUtils/Services/BillingServiceHelper.js.map +1 -1
- package/build/dist/Tests/Types/OnCallDutyPolicy/LayerUtil.test.js +8 -4
- package/build/dist/Tests/Types/OnCallDutyPolicy/LayerUtil.test.js.map +1 -1
- package/build/dist/Tests/UI/Components/DictionaryOfStrings.test.js +4 -2
- package/build/dist/Tests/UI/Components/DictionaryOfStrings.test.js.map +1 -1
- package/build/dist/Tests/UI/Components/FilePicker.test.js +2 -2
- package/build/dist/Tests/UI/Components/FilePicker.test.js.map +1 -1
- package/build/dist/Tests/Utils/API.test.js +8 -7
- package/build/dist/Tests/Utils/API.test.js.map +1 -1
- package/build/dist/Types/BaseDatabase/DatabaseCommonInteractionPropsUtil.js +5 -3
- package/build/dist/Types/BaseDatabase/DatabaseCommonInteractionPropsUtil.js.map +1 -1
- package/build/dist/Types/Html.js +5 -3
- package/build/dist/Types/Html.js.map +1 -1
- package/build/dist/Types/JSONFunctions.js +5 -5
- package/build/dist/Types/JSONFunctions.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorType.js +8 -6
- package/build/dist/Types/Monitor/MonitorType.js.map +1 -1
- package/build/dist/Types/OnCallDutyPolicy/Layer.js +29 -17
- package/build/dist/Types/OnCallDutyPolicy/Layer.js.map +1 -1
- package/build/dist/Types/Phone.js +5 -3
- package/build/dist/Types/Phone.js.map +1 -1
- package/build/dist/Types/Workspace/WorkspaceType.js +9 -0
- package/build/dist/Types/Workspace/WorkspaceType.js.map +1 -1
- package/build/dist/UI/Components/Charts/Utils/DataPoint.js +8 -6
- package/build/dist/UI/Components/Charts/Utils/DataPoint.js.map +1 -1
- package/build/dist/UI/Components/Detail/Detail.js +4 -1
- package/build/dist/UI/Components/Detail/Detail.js.map +1 -1
- package/build/dist/UI/Components/FilePicker/FilePicker.js +1 -1
- package/build/dist/UI/Components/FilePicker/FilePicker.js.map +1 -1
- package/build/dist/UI/Components/Image/Image.js +1 -1
- package/build/dist/UI/Components/Image/Image.js.map +1 -1
- package/build/dist/UI/Components/JSONTable/JSONTable.js.map +1 -1
- package/build/dist/UI/Components/ModelTable/BaseModelTable.js.map +1 -1
- package/build/dist/UI/Components/SideMenu/SideMenu.js +4 -2
- package/build/dist/UI/Components/SideMenu/SideMenu.js.map +1 -1
- package/build/dist/UI/Components/SideMenu/SideMenuItem.js +62 -38
- package/build/dist/UI/Components/SideMenu/SideMenuItem.js.map +1 -1
- package/build/dist/UI/Config.js +1 -0
- package/build/dist/UI/Config.js.map +1 -1
- package/build/dist/UI/Utils/API/API.js +5 -3
- package/build/dist/UI/Utils/API/API.js.map +1 -1
- package/build/dist/UI/Utils/Countries.js.map +1 -1
- package/build/dist/UI/Utils/Login.js +6 -1
- package/build/dist/UI/Utils/Login.js.map +1 -1
- package/build/dist/Utils/Base64.js +12 -0
- package/build/dist/Utils/Base64.js.map +1 -0
- package/build/dist/Utils/Schema/ModelSchema.js +4 -2
- package/build/dist/Utils/Schema/ModelSchema.js.map +1 -1
- package/package.json +5 -1
- package/build/dist/Models/DatabaseModels/UserTwoFactorAuth.js.map +0 -1
- package/build/dist/Server/API/UserTwoFactorAuthAPI.js.map +0 -1
- package/build/dist/Server/Services/UserTwoFactorAuthService.js.map +0 -1
- package/build/dist/Server/Utils/TwoFactorAuth.js.map +0 -1
|
@@ -146,7 +146,8 @@ import ServiceCatalogDependency from "./ServiceCatalogDependency";
|
|
|
146
146
|
import ServiceCatalogMonitor from "./ServiceCatalogMonitor";
|
|
147
147
|
import ServiceCatalogTelemetryService from "./ServiceCatalogTelemetryService";
|
|
148
148
|
|
|
149
|
-
import
|
|
149
|
+
import UserTotpAuth from "./UserTotpAuth";
|
|
150
|
+
import UserWebAuthn from "./UserWebAuthn";
|
|
150
151
|
|
|
151
152
|
import TelemetryIngestionKey from "./TelemetryIngestionKey";
|
|
152
153
|
|
|
@@ -366,7 +367,8 @@ const AllModelTypes: Array<{
|
|
|
366
367
|
ProbeOwnerTeam,
|
|
367
368
|
ProbeOwnerUser,
|
|
368
369
|
|
|
369
|
-
|
|
370
|
+
UserTotpAuth,
|
|
371
|
+
UserWebAuthn,
|
|
370
372
|
|
|
371
373
|
TelemetryIngestionKey,
|
|
372
374
|
|
|
@@ -29,10 +29,17 @@ import {
|
|
|
29
29
|
ManyToOne,
|
|
30
30
|
} from "typeorm";
|
|
31
31
|
import NotificationRuleWorkspaceChannel from "../../Types/Workspace/NotificationRules/NotificationRuleWorkspaceChannel";
|
|
32
|
+
import EnableWorkflow from "../../Types/Database/EnableWorkflow";
|
|
32
33
|
|
|
33
34
|
@EnableDocumentation()
|
|
34
35
|
@AccessControlColumn("labels")
|
|
35
36
|
@TenantColumn("projectId")
|
|
37
|
+
@EnableWorkflow({
|
|
38
|
+
create: true,
|
|
39
|
+
delete: true,
|
|
40
|
+
update: true,
|
|
41
|
+
read: true,
|
|
42
|
+
})
|
|
36
43
|
@TableAccessControl({
|
|
37
44
|
create: [
|
|
38
45
|
Permission.ProjectOwner,
|
|
@@ -25,6 +25,7 @@ import Permission from "../../Types/Permission";
|
|
|
25
25
|
import UserNotificationEventType from "../../Types/UserNotification/UserNotificationEventType";
|
|
26
26
|
import { Column, Entity, Index, JoinColumn, ManyToOne } from "typeorm";
|
|
27
27
|
import Alert from "./Alert";
|
|
28
|
+
import EnableWorkflow from "../../Types/Database/EnableWorkflow";
|
|
28
29
|
|
|
29
30
|
@TableBillingAccessControl({
|
|
30
31
|
create: PlanType.Growth,
|
|
@@ -32,6 +33,12 @@ import Alert from "./Alert";
|
|
|
32
33
|
update: PlanType.Growth,
|
|
33
34
|
delete: PlanType.Growth,
|
|
34
35
|
})
|
|
36
|
+
@EnableWorkflow({
|
|
37
|
+
create: true,
|
|
38
|
+
delete: true,
|
|
39
|
+
update: true,
|
|
40
|
+
read: true,
|
|
41
|
+
})
|
|
35
42
|
@EnableDocumentation()
|
|
36
43
|
@TenantColumn("projectId")
|
|
37
44
|
@TableAccessControl({
|
|
@@ -29,6 +29,7 @@ import {
|
|
|
29
29
|
ManyToMany,
|
|
30
30
|
ManyToOne,
|
|
31
31
|
} from "typeorm";
|
|
32
|
+
import EnableWorkflow from "../../Types/Database/EnableWorkflow";
|
|
32
33
|
|
|
33
34
|
@EnableDocumentation()
|
|
34
35
|
@TableBillingAccessControl({
|
|
@@ -37,6 +38,12 @@ import {
|
|
|
37
38
|
update: PlanType.Growth,
|
|
38
39
|
delete: PlanType.Growth,
|
|
39
40
|
})
|
|
41
|
+
@EnableWorkflow({
|
|
42
|
+
create: true,
|
|
43
|
+
delete: true,
|
|
44
|
+
update: true,
|
|
45
|
+
read: true,
|
|
46
|
+
})
|
|
40
47
|
@AccessControlColumn("labels")
|
|
41
48
|
@TenantColumn("projectId")
|
|
42
49
|
@TableAccessControl({
|
|
@@ -17,6 +17,7 @@ import Permission from "../../Types/Permission";
|
|
|
17
17
|
import { Column, Entity, Index, JoinColumn, ManyToOne } from "typeorm";
|
|
18
18
|
import TableBillingAccessControl from "../../Types/Database/AccessControl/TableBillingAccessControl";
|
|
19
19
|
import { PlanType } from "../../Types/Billing/SubscriptionPlan";
|
|
20
|
+
import EnableWorkflow from "../../Types/Database/EnableWorkflow";
|
|
20
21
|
|
|
21
22
|
@EnableDocumentation()
|
|
22
23
|
@TableBillingAccessControl({
|
|
@@ -26,6 +27,12 @@ import { PlanType } from "../../Types/Billing/SubscriptionPlan";
|
|
|
26
27
|
delete: PlanType.Growth,
|
|
27
28
|
})
|
|
28
29
|
@TenantColumn("projectId")
|
|
30
|
+
@EnableWorkflow({
|
|
31
|
+
create: true,
|
|
32
|
+
delete: true,
|
|
33
|
+
update: true,
|
|
34
|
+
read: true,
|
|
35
|
+
})
|
|
29
36
|
@TableAccessControl({
|
|
30
37
|
create: [
|
|
31
38
|
Permission.ProjectOwner,
|
|
@@ -132,9 +132,11 @@ export default class OnCallDutyPolicyUserOverride extends BaseModel {
|
|
|
132
132
|
})
|
|
133
133
|
public projectId?: ObjectID = undefined;
|
|
134
134
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
135
|
+
/*
|
|
136
|
+
* If this is null then it's a global override
|
|
137
|
+
* If this is set then it's a policy specific override
|
|
138
|
+
* Policy specifc override will take precedence over global override
|
|
139
|
+
*/
|
|
138
140
|
|
|
139
141
|
@ColumnAccessControl({
|
|
140
142
|
create: [
|
|
@@ -1292,8 +1292,10 @@ export default class Project extends TenantModel {
|
|
|
1292
1292
|
})
|
|
1293
1293
|
public letCustomerSupportAccessProject?: boolean = undefined;
|
|
1294
1294
|
|
|
1295
|
-
|
|
1296
|
-
|
|
1295
|
+
/*
|
|
1296
|
+
* This is an internal field. This is used for internal analytics for example: Metabase.
|
|
1297
|
+
* Values can be between 0 and 100.
|
|
1298
|
+
*/
|
|
1297
1299
|
@ColumnAccessControl({
|
|
1298
1300
|
create: [],
|
|
1299
1301
|
read: [],
|
|
@@ -336,8 +336,10 @@ export default class ProjectSmtpConfig extends BaseModel {
|
|
|
336
336
|
})
|
|
337
337
|
public deletedByUserId?: ObjectID = undefined;
|
|
338
338
|
|
|
339
|
-
|
|
340
|
-
|
|
339
|
+
/*
|
|
340
|
+
* This is not required because some SMTP servers do not require authentication.
|
|
341
|
+
* eg: https://learn.microsoft.com/en-us/exchange/mail-flow-best-practices/how-to-set-up-a-multifunction-device-or-application-to-send-email-using-microsoft-365-or-office-365#option-2-send-mail-directly-from-your-printer-or-application-to-microsoft-365-or-office-365-direct-send
|
|
342
|
+
*/
|
|
341
343
|
@ColumnAccessControl({
|
|
342
344
|
create: [
|
|
343
345
|
Permission.ProjectOwner,
|
|
@@ -420,10 +420,12 @@ export default class StatusPageDomain extends BaseModel {
|
|
|
420
420
|
@JoinColumn({ name: "deletedByUserId" })
|
|
421
421
|
public deletedByUser?: User = undefined;
|
|
422
422
|
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
423
|
+
/*
|
|
424
|
+
* This token is used by the Worker.
|
|
425
|
+
* worker pings the status page of customers - eg: status.company.com/verify-token/:id
|
|
426
|
+
* and the end point on Status Page project returns 200.
|
|
427
|
+
* when that happens the isCnameVerified is set to True and the certificate is added to Greenlock.
|
|
428
|
+
*/
|
|
427
429
|
@ColumnAccessControl({
|
|
428
430
|
create: [
|
|
429
431
|
Permission.ProjectOwner,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import File from "./File";
|
|
2
2
|
import UserModel from "../../Models/DatabaseModels/DatabaseBaseModel/UserModel";
|
|
3
3
|
import Route from "../../Types/API/Route";
|
|
4
|
-
import URL from "../../Types/API/URL";
|
|
5
4
|
import CompanySize from "../../Types/Company/CompanySize";
|
|
6
5
|
import JobRole from "../../Types/Company/JobRole";
|
|
7
6
|
import AllowAccessIfSubscriptionIsUnpaid from "../../Types/Database/AccessControl/AllowAccessIfSubscriptionIsUnpaid";
|
|
@@ -301,51 +300,6 @@ class User extends UserModel {
|
|
|
301
300
|
})
|
|
302
301
|
public twoFactorAuthEnabled?: boolean = undefined;
|
|
303
302
|
|
|
304
|
-
@ColumnAccessControl({
|
|
305
|
-
create: [],
|
|
306
|
-
read: [],
|
|
307
|
-
|
|
308
|
-
update: [],
|
|
309
|
-
})
|
|
310
|
-
@TableColumn({ type: TableColumnType.ShortText })
|
|
311
|
-
@Column({
|
|
312
|
-
type: ColumnType.ShortText,
|
|
313
|
-
length: ColumnLength.ShortText,
|
|
314
|
-
nullable: true,
|
|
315
|
-
unique: false,
|
|
316
|
-
})
|
|
317
|
-
public twoFactorSecretCode?: string = undefined;
|
|
318
|
-
|
|
319
|
-
@ColumnAccessControl({
|
|
320
|
-
create: [],
|
|
321
|
-
read: [],
|
|
322
|
-
|
|
323
|
-
update: [],
|
|
324
|
-
})
|
|
325
|
-
@TableColumn({ type: TableColumnType.ShortURL })
|
|
326
|
-
@Column({
|
|
327
|
-
type: ColumnType.ShortURL,
|
|
328
|
-
length: ColumnLength.ShortURL,
|
|
329
|
-
nullable: true,
|
|
330
|
-
unique: false,
|
|
331
|
-
transformer: URL.getDatabaseTransformer(),
|
|
332
|
-
})
|
|
333
|
-
public twoFactorAuthUrl?: URL = undefined;
|
|
334
|
-
|
|
335
|
-
@ColumnAccessControl({
|
|
336
|
-
create: [],
|
|
337
|
-
read: [Permission.CurrentUser],
|
|
338
|
-
|
|
339
|
-
update: [],
|
|
340
|
-
})
|
|
341
|
-
@TableColumn({ type: TableColumnType.Array })
|
|
342
|
-
@Column({
|
|
343
|
-
type: ColumnType.Array,
|
|
344
|
-
nullable: true,
|
|
345
|
-
unique: false,
|
|
346
|
-
})
|
|
347
|
-
public backupCodes?: Array<string> = undefined;
|
|
348
|
-
|
|
349
303
|
@ColumnAccessControl({
|
|
350
304
|
create: [],
|
|
351
305
|
read: [],
|
|
@@ -27,19 +27,19 @@ import { Column, Entity, JoinColumn, ManyToOne } from "typeorm";
|
|
|
27
27
|
delete: [Permission.CurrentUser],
|
|
28
28
|
update: [Permission.CurrentUser],
|
|
29
29
|
})
|
|
30
|
-
@CrudApiEndpoint(new Route("/user-
|
|
30
|
+
@CrudApiEndpoint(new Route("/user-totp-auth"))
|
|
31
31
|
@Entity({
|
|
32
|
-
name: "
|
|
32
|
+
name: "UserTotpAuth",
|
|
33
33
|
})
|
|
34
34
|
@TableMetadata({
|
|
35
|
-
tableName: "
|
|
36
|
-
singularName: "
|
|
37
|
-
pluralName: "
|
|
35
|
+
tableName: "UserTotpAuth",
|
|
36
|
+
singularName: "TOTP Auth",
|
|
37
|
+
pluralName: "TOTP Auth",
|
|
38
38
|
icon: IconProp.ShieldCheck,
|
|
39
|
-
tableDescription: "
|
|
39
|
+
tableDescription: "TOTP Authentication for users",
|
|
40
40
|
})
|
|
41
41
|
@CurrentUserCanAccessRecordBy("userId")
|
|
42
|
-
class
|
|
42
|
+
class UserTotpAuth extends BaseModel {
|
|
43
43
|
@ColumnAccessControl({
|
|
44
44
|
create: [Permission.CurrentUser],
|
|
45
45
|
read: [Permission.CurrentUser],
|
|
@@ -48,8 +48,8 @@ class UserTwoFactorAuth extends BaseModel {
|
|
|
48
48
|
@TableColumn({
|
|
49
49
|
type: TableColumnType.ShortText,
|
|
50
50
|
canReadOnRelationQuery: true,
|
|
51
|
-
title: "
|
|
52
|
-
description: "Name of the
|
|
51
|
+
title: "TOTP Auth Name",
|
|
52
|
+
description: "Name of the TOTP authentication",
|
|
53
53
|
})
|
|
54
54
|
@Column({
|
|
55
55
|
type: ColumnType.ShortText,
|
|
@@ -67,8 +67,8 @@ class UserTwoFactorAuth extends BaseModel {
|
|
|
67
67
|
@TableColumn({
|
|
68
68
|
type: TableColumnType.VeryLongText,
|
|
69
69
|
canReadOnRelationQuery: false,
|
|
70
|
-
title: "
|
|
71
|
-
description: "Secret of the
|
|
70
|
+
title: "TOTP Auth Secret",
|
|
71
|
+
description: "Secret of the TOTP authentication",
|
|
72
72
|
})
|
|
73
73
|
@Column({
|
|
74
74
|
type: ColumnType.VeryLongText,
|
|
@@ -85,8 +85,8 @@ class UserTwoFactorAuth extends BaseModel {
|
|
|
85
85
|
@TableColumn({
|
|
86
86
|
type: TableColumnType.VeryLongText,
|
|
87
87
|
canReadOnRelationQuery: false,
|
|
88
|
-
title: "
|
|
89
|
-
description: "OTP URL of the
|
|
88
|
+
title: "TOTP Auth OTP URL",
|
|
89
|
+
description: "OTP URL of the TOTP authentication",
|
|
90
90
|
})
|
|
91
91
|
@Column({
|
|
92
92
|
type: ColumnType.VeryLongText,
|
|
@@ -106,7 +106,7 @@ class UserTwoFactorAuth extends BaseModel {
|
|
|
106
106
|
title: "Is Verified",
|
|
107
107
|
isDefaultValueColumn: true,
|
|
108
108
|
description:
|
|
109
|
-
"Is this
|
|
109
|
+
"Is this TOTP authentication verified and validated (has user entered the token to verify it)",
|
|
110
110
|
defaultValue: false,
|
|
111
111
|
})
|
|
112
112
|
@Column({
|
|
@@ -171,7 +171,7 @@ class UserTwoFactorAuth extends BaseModel {
|
|
|
171
171
|
manyToOneRelationColumn: "userId",
|
|
172
172
|
type: TableColumnType.Entity,
|
|
173
173
|
title: "User",
|
|
174
|
-
description: "Relation to User who owns this
|
|
174
|
+
description: "Relation to User who owns this TOTP authentication",
|
|
175
175
|
})
|
|
176
176
|
@ManyToOne(
|
|
177
177
|
() => {
|
|
@@ -207,4 +207,4 @@ class UserTwoFactorAuth extends BaseModel {
|
|
|
207
207
|
public userId?: ObjectID = undefined;
|
|
208
208
|
}
|
|
209
209
|
|
|
210
|
-
export default
|
|
210
|
+
export default UserTotpAuth;
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
import BaseModel from "./DatabaseBaseModel/DatabaseBaseModel";
|
|
2
|
+
import User from "./User";
|
|
3
|
+
import Route from "../../Types/API/Route";
|
|
4
|
+
import AllowAccessIfSubscriptionIsUnpaid from "../../Types/Database/AccessControl/AllowAccessIfSubscriptionIsUnpaid";
|
|
5
|
+
import ColumnAccessControl from "../../Types/Database/AccessControl/ColumnAccessControl";
|
|
6
|
+
import TableAccessControl from "../../Types/Database/AccessControl/TableAccessControl";
|
|
7
|
+
import ColumnLength from "../../Types/Database/ColumnLength";
|
|
8
|
+
import ColumnType from "../../Types/Database/ColumnType";
|
|
9
|
+
import CrudApiEndpoint from "../../Types/Database/CrudApiEndpoint";
|
|
10
|
+
import CurrentUserCanAccessRecordBy from "../../Types/Database/CurrentUserCanAccessRecordBy";
|
|
11
|
+
import EnableDocumentation from "../../Types/Database/EnableDocumentation";
|
|
12
|
+
import TableColumn from "../../Types/Database/TableColumn";
|
|
13
|
+
import TableColumnType from "../../Types/Database/TableColumnType";
|
|
14
|
+
import TableMetadata from "../../Types/Database/TableMetadata";
|
|
15
|
+
import IconProp from "../../Types/Icon/IconProp";
|
|
16
|
+
import ObjectID from "../../Types/ObjectID";
|
|
17
|
+
import Permission from "../../Types/Permission";
|
|
18
|
+
import { Column, Entity, JoinColumn, ManyToOne } from "typeorm";
|
|
19
|
+
|
|
20
|
+
@EnableDocumentation({
|
|
21
|
+
isMasterAdminApiDocs: true,
|
|
22
|
+
})
|
|
23
|
+
@AllowAccessIfSubscriptionIsUnpaid()
|
|
24
|
+
@TableAccessControl({
|
|
25
|
+
create: [Permission.CurrentUser],
|
|
26
|
+
read: [Permission.CurrentUser],
|
|
27
|
+
delete: [Permission.CurrentUser],
|
|
28
|
+
update: [Permission.CurrentUser],
|
|
29
|
+
})
|
|
30
|
+
@CrudApiEndpoint(new Route("/user-webauthn"))
|
|
31
|
+
@Entity({
|
|
32
|
+
name: "UserWebAuthn",
|
|
33
|
+
})
|
|
34
|
+
@TableMetadata({
|
|
35
|
+
tableName: "UserWebAuthn",
|
|
36
|
+
singularName: "WebAuthn Credential",
|
|
37
|
+
pluralName: "WebAuthn Credentials",
|
|
38
|
+
icon: IconProp.ShieldCheck,
|
|
39
|
+
tableDescription: "WebAuthn credentials for users (security keys)",
|
|
40
|
+
})
|
|
41
|
+
@CurrentUserCanAccessRecordBy("userId")
|
|
42
|
+
class UserWebAuthn extends BaseModel {
|
|
43
|
+
@ColumnAccessControl({
|
|
44
|
+
create: [Permission.CurrentUser],
|
|
45
|
+
read: [Permission.CurrentUser],
|
|
46
|
+
update: [Permission.CurrentUser],
|
|
47
|
+
})
|
|
48
|
+
@TableColumn({
|
|
49
|
+
type: TableColumnType.ShortText,
|
|
50
|
+
canReadOnRelationQuery: true,
|
|
51
|
+
title: "Credential Name",
|
|
52
|
+
description: "Name of the WebAuthn credential",
|
|
53
|
+
})
|
|
54
|
+
@Column({
|
|
55
|
+
type: ColumnType.ShortText,
|
|
56
|
+
length: ColumnLength.ShortText,
|
|
57
|
+
nullable: false,
|
|
58
|
+
unique: false,
|
|
59
|
+
})
|
|
60
|
+
public name?: string = undefined;
|
|
61
|
+
|
|
62
|
+
@ColumnAccessControl({
|
|
63
|
+
create: [Permission.CurrentUser],
|
|
64
|
+
read: [],
|
|
65
|
+
update: [],
|
|
66
|
+
})
|
|
67
|
+
@TableColumn({
|
|
68
|
+
type: TableColumnType.VeryLongText,
|
|
69
|
+
canReadOnRelationQuery: false,
|
|
70
|
+
title: "Credential ID",
|
|
71
|
+
description: "Unique identifier for the WebAuthn credential",
|
|
72
|
+
})
|
|
73
|
+
@Column({
|
|
74
|
+
type: ColumnType.VeryLongText,
|
|
75
|
+
nullable: false,
|
|
76
|
+
unique: true,
|
|
77
|
+
})
|
|
78
|
+
public credentialId?: string = undefined;
|
|
79
|
+
|
|
80
|
+
@ColumnAccessControl({
|
|
81
|
+
create: [Permission.CurrentUser],
|
|
82
|
+
read: [],
|
|
83
|
+
update: [],
|
|
84
|
+
})
|
|
85
|
+
@TableColumn({
|
|
86
|
+
type: TableColumnType.VeryLongText,
|
|
87
|
+
canReadOnRelationQuery: false,
|
|
88
|
+
title: "Public Key",
|
|
89
|
+
description: "Public key of the WebAuthn credential",
|
|
90
|
+
})
|
|
91
|
+
@Column({
|
|
92
|
+
type: ColumnType.VeryLongText,
|
|
93
|
+
nullable: false,
|
|
94
|
+
unique: false,
|
|
95
|
+
})
|
|
96
|
+
public publicKey?: string = undefined;
|
|
97
|
+
|
|
98
|
+
@ColumnAccessControl({
|
|
99
|
+
create: [Permission.CurrentUser],
|
|
100
|
+
read: [],
|
|
101
|
+
update: [],
|
|
102
|
+
})
|
|
103
|
+
@TableColumn({
|
|
104
|
+
type: TableColumnType.VeryLongText,
|
|
105
|
+
canReadOnRelationQuery: false,
|
|
106
|
+
title: "Counter",
|
|
107
|
+
description: "Counter for the WebAuthn credential",
|
|
108
|
+
})
|
|
109
|
+
@Column({
|
|
110
|
+
type: ColumnType.VeryLongText,
|
|
111
|
+
nullable: false,
|
|
112
|
+
unique: false,
|
|
113
|
+
})
|
|
114
|
+
public counter?: string = undefined;
|
|
115
|
+
|
|
116
|
+
@ColumnAccessControl({
|
|
117
|
+
create: [Permission.CurrentUser],
|
|
118
|
+
read: [],
|
|
119
|
+
update: [],
|
|
120
|
+
})
|
|
121
|
+
@TableColumn({
|
|
122
|
+
type: TableColumnType.VeryLongText,
|
|
123
|
+
canReadOnRelationQuery: false,
|
|
124
|
+
title: "Transports",
|
|
125
|
+
description: "Transports supported by the WebAuthn credential",
|
|
126
|
+
})
|
|
127
|
+
@Column({
|
|
128
|
+
type: ColumnType.VeryLongText,
|
|
129
|
+
nullable: true,
|
|
130
|
+
unique: false,
|
|
131
|
+
})
|
|
132
|
+
public transports?: string = undefined;
|
|
133
|
+
|
|
134
|
+
@ColumnAccessControl({
|
|
135
|
+
create: [Permission.CurrentUser],
|
|
136
|
+
read: [Permission.CurrentUser],
|
|
137
|
+
update: [],
|
|
138
|
+
})
|
|
139
|
+
@TableColumn({
|
|
140
|
+
type: TableColumnType.Boolean,
|
|
141
|
+
canReadOnRelationQuery: true,
|
|
142
|
+
title: "Is Verified",
|
|
143
|
+
isDefaultValueColumn: true,
|
|
144
|
+
description: "Is this WebAuthn credential verified and validated",
|
|
145
|
+
defaultValue: false,
|
|
146
|
+
})
|
|
147
|
+
@Column({
|
|
148
|
+
type: ColumnType.Boolean,
|
|
149
|
+
nullable: false,
|
|
150
|
+
default: false,
|
|
151
|
+
})
|
|
152
|
+
public isVerified?: boolean = undefined;
|
|
153
|
+
|
|
154
|
+
@ColumnAccessControl({
|
|
155
|
+
create: [],
|
|
156
|
+
read: [],
|
|
157
|
+
update: [],
|
|
158
|
+
})
|
|
159
|
+
@TableColumn({
|
|
160
|
+
manyToOneRelationColumn: "deletedByUserId",
|
|
161
|
+
type: TableColumnType.Entity,
|
|
162
|
+
title: "Deleted by User",
|
|
163
|
+
modelType: User,
|
|
164
|
+
description:
|
|
165
|
+
"Relation to User who deleted this object (if this object was deleted by a User)",
|
|
166
|
+
})
|
|
167
|
+
@ManyToOne(
|
|
168
|
+
() => {
|
|
169
|
+
return User;
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
cascade: false,
|
|
173
|
+
eager: false,
|
|
174
|
+
nullable: true,
|
|
175
|
+
onDelete: "SET NULL",
|
|
176
|
+
orphanedRowAction: "nullify",
|
|
177
|
+
},
|
|
178
|
+
)
|
|
179
|
+
@JoinColumn({ name: "deletedByUserId" })
|
|
180
|
+
public deletedByUser?: User = undefined;
|
|
181
|
+
|
|
182
|
+
@ColumnAccessControl({
|
|
183
|
+
create: [],
|
|
184
|
+
read: [],
|
|
185
|
+
update: [],
|
|
186
|
+
})
|
|
187
|
+
@TableColumn({
|
|
188
|
+
type: TableColumnType.ObjectID,
|
|
189
|
+
title: "Deleted by User ID",
|
|
190
|
+
description:
|
|
191
|
+
"User ID who deleted this object (if this object was deleted by a User)",
|
|
192
|
+
})
|
|
193
|
+
@Column({
|
|
194
|
+
type: ColumnType.ObjectID,
|
|
195
|
+
nullable: true,
|
|
196
|
+
transformer: ObjectID.getDatabaseTransformer(),
|
|
197
|
+
})
|
|
198
|
+
public deletedByUserId?: ObjectID = undefined;
|
|
199
|
+
|
|
200
|
+
@ColumnAccessControl({
|
|
201
|
+
create: [Permission.CurrentUser],
|
|
202
|
+
read: [Permission.CurrentUser],
|
|
203
|
+
update: [Permission.CurrentUser],
|
|
204
|
+
})
|
|
205
|
+
@TableColumn({
|
|
206
|
+
manyToOneRelationColumn: "userId",
|
|
207
|
+
type: TableColumnType.Entity,
|
|
208
|
+
title: "User",
|
|
209
|
+
description: "Relation to User who owns this WebAuthn credential",
|
|
210
|
+
})
|
|
211
|
+
@ManyToOne(
|
|
212
|
+
() => {
|
|
213
|
+
return User;
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
cascade: false,
|
|
217
|
+
eager: false,
|
|
218
|
+
nullable: true,
|
|
219
|
+
onDelete: "CASCADE",
|
|
220
|
+
orphanedRowAction: "nullify",
|
|
221
|
+
},
|
|
222
|
+
)
|
|
223
|
+
@JoinColumn({ name: "userId" })
|
|
224
|
+
public user?: User = undefined;
|
|
225
|
+
|
|
226
|
+
@ColumnAccessControl({
|
|
227
|
+
create: [Permission.CurrentUser],
|
|
228
|
+
read: [Permission.CurrentUser],
|
|
229
|
+
update: [Permission.CurrentUser],
|
|
230
|
+
})
|
|
231
|
+
@TableColumn({
|
|
232
|
+
type: TableColumnType.ObjectID,
|
|
233
|
+
title: "User ID",
|
|
234
|
+
description: "User ID who owns this WebAuthn credential",
|
|
235
|
+
})
|
|
236
|
+
@Column({
|
|
237
|
+
type: ColumnType.ObjectID,
|
|
238
|
+
nullable: true,
|
|
239
|
+
transformer: ObjectID.getDatabaseTransformer(),
|
|
240
|
+
})
|
|
241
|
+
public userId?: ObjectID = undefined;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
export default UserWebAuthn;
|
|
@@ -21,6 +21,11 @@ export interface MiscData {
|
|
|
21
21
|
[key: string]: any;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
+
export interface MicrosoftTeamsTeam {
|
|
25
|
+
id: string;
|
|
26
|
+
name: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
24
29
|
export interface SlackMiscData extends MiscData {
|
|
25
30
|
teamId: string;
|
|
26
31
|
teamName: string;
|
|
@@ -34,6 +39,22 @@ export interface SlackMiscData extends MiscData {
|
|
|
34
39
|
};
|
|
35
40
|
}
|
|
36
41
|
|
|
42
|
+
export interface MicrosoftTeamsMiscData extends MiscData {
|
|
43
|
+
tenantId: string;
|
|
44
|
+
teamId: string;
|
|
45
|
+
teamName: string;
|
|
46
|
+
botId: string;
|
|
47
|
+
appAccessToken?: string;
|
|
48
|
+
adminConsentGranted?: boolean;
|
|
49
|
+
lastAppTokenIssuedAt?: string;
|
|
50
|
+
adminConsentGrantedAt?: string;
|
|
51
|
+
adminConsentGrantedBy?: string;
|
|
52
|
+
availableTeams?: Record<string, MicrosoftTeamsTeam>;
|
|
53
|
+
appAccessTokenExpiresAt?: string;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export type WorkspaceMiscData = SlackMiscData | MicrosoftTeamsMiscData;
|
|
57
|
+
|
|
37
58
|
@TenantColumn("projectId")
|
|
38
59
|
@TableAccessControl({
|
|
39
60
|
create: [
|
package/Server/API/BaseAPI.ts
CHANGED
|
@@ -235,8 +235,10 @@ export default class BaseAPI<
|
|
|
235
235
|
): Promise<void> {
|
|
236
236
|
await this.onBeforeList(req, res);
|
|
237
237
|
|
|
238
|
-
|
|
239
|
-
|
|
238
|
+
/*
|
|
239
|
+
* Extract pagination parameters from query or body (for POST requests)
|
|
240
|
+
* Support both 'skip' and 'offset' parameters (offset is alias for skip)
|
|
241
|
+
*/
|
|
240
242
|
let skipValue: number = 0;
|
|
241
243
|
let limitValue: number = DEFAULT_LIMIT;
|
|
242
244
|
|
|
@@ -21,20 +21,24 @@ export default class GlobalConfigAPI extends BaseAPI<
|
|
|
21
21
|
`${new this.entityType().getCrudApiPath()?.toString()}/vars`,
|
|
22
22
|
async (req: ExpressRequest, res: ExpressResponse, next: NextFunction) => {
|
|
23
23
|
try {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
24
|
+
/*
|
|
25
|
+
* const globalConfig: GlobalConfig | null =
|
|
26
|
+
* await GlobalConfigService.findOneById({
|
|
27
|
+
* id: ObjectID.getZeroObjectID(),
|
|
28
|
+
* select: {
|
|
29
|
+
* useHttps: true,
|
|
30
|
+
* },
|
|
31
|
+
* props: {
|
|
32
|
+
* isRoot: true,
|
|
33
|
+
* },
|
|
34
|
+
* });
|
|
35
|
+
*/
|
|
34
36
|
|
|
35
37
|
return Response.sendJsonObjectResponse(req, res, {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
+
/*
|
|
39
|
+
* USE_HTTPS:
|
|
40
|
+
* globalConfig?.useHttps?.toString() || 'false',
|
|
41
|
+
*/
|
|
38
42
|
});
|
|
39
43
|
} catch (err) {
|
|
40
44
|
next(err);
|