@oneuptime/common 8.0.5239 → 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/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/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
|
@@ -58,7 +58,7 @@ const mockCreateResponse: MockCreateResponseFunction = async (
|
|
|
58
58
|
return new HTTPResponse(
|
|
59
59
|
200,
|
|
60
60
|
{
|
|
61
|
-
file: (await file.arrayBuffer())
|
|
61
|
+
file: Buffer.from(await file.arrayBuffer()),
|
|
62
62
|
name: file.name,
|
|
63
63
|
type: file.type as MimeType,
|
|
64
64
|
slug: file.name,
|
|
@@ -78,7 +78,7 @@ const mockFileModel: MockFileModelFunction = async (
|
|
|
78
78
|
fileModel.fileType = file.type as MimeType;
|
|
79
79
|
fileModel.slug = file.name;
|
|
80
80
|
fileModel.isPublic = true;
|
|
81
|
-
fileModel.file = (await file.arrayBuffer())
|
|
81
|
+
fileModel.file = Buffer.from(await file.arrayBuffer());
|
|
82
82
|
return fileModel;
|
|
83
83
|
};
|
|
84
84
|
|
package/Tests/Utils/API.test.ts
CHANGED
|
@@ -32,12 +32,11 @@ jest.mock("axios", () => {
|
|
|
32
32
|
return Object.assign(jest.fn(), jest.requireActual("axios"));
|
|
33
33
|
});
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
jest.mocked<AxiosStatic>(axios);
|
|
35
|
+
/*
|
|
36
|
+
* Mock axios(config) top level function
|
|
37
|
+
*/
|
|
38
|
+
const mockedAxios: jest.MockedFunction<AxiosStatic> =
|
|
39
|
+
axios as jest.MockedFunction<typeof axios>;
|
|
41
40
|
|
|
42
41
|
// Spy on calls to HTTPErrorResponse
|
|
43
42
|
jest.mock("../../Types/API/HTTPErrorResponse");
|
|
@@ -342,8 +341,10 @@ interface HTTPMethodType {
|
|
|
342
341
|
method: HTTPMethod;
|
|
343
342
|
}
|
|
344
343
|
|
|
345
|
-
|
|
346
|
-
|
|
344
|
+
/*
|
|
345
|
+
* Set up table-driven tests for
|
|
346
|
+
* .get(), .post(), .put(), .delete(), get(), post(), put(), delete()
|
|
347
|
+
*/
|
|
347
348
|
const httpMethodTests: Array<HTTPMethodType> = [
|
|
348
349
|
{
|
|
349
350
|
name: "get",
|
|
@@ -11,9 +11,11 @@ export default class DatabaseCommonInteractionPropsUtil {
|
|
|
11
11
|
props: DatabaseCommonInteractionProps,
|
|
12
12
|
permissionType: PermissionType,
|
|
13
13
|
): Array<UserPermission> {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
/*
|
|
15
|
+
* Check first if the user has Global Permissions.
|
|
16
|
+
* Global permissions includes all the tenantId user has access to.
|
|
17
|
+
* and it includes all the global permissions that applies to all the tenant, like PUBLIC.
|
|
18
|
+
*/
|
|
17
19
|
if (!props.userGlobalAccessPermission) {
|
|
18
20
|
props.userGlobalAccessPermission = {
|
|
19
21
|
globalPermissions: [Permission.Public],
|
package/Types/Html.ts
CHANGED
|
@@ -18,9 +18,11 @@ export default class HTML {
|
|
|
18
18
|
public static isHtml(text: string): boolean {
|
|
19
19
|
// Check if the text is HTML
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
/*
|
|
22
|
+
* Example usage const htmlString = '<div>Hello, World!</div>'; const notHtmlString = 'Just a regular string'
|
|
23
|
+
* console.log(HTML.isHtml(htmlString)); // true
|
|
24
|
+
* console.log(HTML.isHtml(notHtmlString)); // false
|
|
25
|
+
*/
|
|
24
26
|
|
|
25
27
|
const htmlPattern: RegExp = /<\/?[a-z][\s\S]*>/i;
|
|
26
28
|
return htmlPattern.test(text);
|
package/Types/JSONFunctions.ts
CHANGED
|
@@ -27,11 +27,11 @@ export default class JSONFunctions {
|
|
|
27
27
|
// obj could be in this format:
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
* {
|
|
31
|
+
*"http.url.protocol": "http",
|
|
32
|
+
*"http.url.hostname": "localhost",
|
|
33
|
+
*"http.host": "localhost",
|
|
34
|
+
*/
|
|
35
35
|
|
|
36
36
|
// we want to convert it to this format:
|
|
37
37
|
|
|
@@ -7,10 +7,12 @@ export default interface MetricsQuery {
|
|
|
7
7
|
aggegationType: MetricsAggregationType;
|
|
8
8
|
aggregateBy: Dictionary<boolean>;
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
/*
|
|
11
|
+
* This is used for example for probes.
|
|
12
|
+
* To display US probe and EU probe in chart for example.
|
|
13
|
+
* In this case groupByAttribute is "probeId"
|
|
14
|
+
* and attributeValueToLegendMap is { "xx-xx-xx-xx": "US Probe", "yy-yyy-yyy-yy-yy": "EU Probe" }
|
|
15
|
+
*/
|
|
14
16
|
|
|
15
17
|
groupByAttribute?: string | undefined;
|
|
16
18
|
attributeValueToLegendMap?: Dictionary<string>;
|
|
@@ -69,12 +69,14 @@ export class MonitorTypeHelper {
|
|
|
69
69
|
description:
|
|
70
70
|
"This monitor type does the basic ping test of an endpoint.",
|
|
71
71
|
},
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
72
|
+
/*
|
|
73
|
+
* {
|
|
74
|
+
* monitorType: MonitorType.Kubernetes,
|
|
75
|
+
* title: 'Kubernetes',
|
|
76
|
+
* description:
|
|
77
|
+
* 'This monitor types lets you monitor Kubernetes clusters.',
|
|
78
|
+
* },
|
|
79
|
+
*/
|
|
78
80
|
{
|
|
79
81
|
monitorType: MonitorType.IP,
|
|
80
82
|
title: "IP",
|
|
@@ -663,9 +663,11 @@ export default class LayerUtil {
|
|
|
663
663
|
// if start time is after end time, we need to add one week to the end time
|
|
664
664
|
|
|
665
665
|
if (OneUptimeDate.isAfter(startTime, endTime)) {
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
666
|
+
/*
|
|
667
|
+
* in this case the restriction is towards the ends of the week and not in the middle so we need to add two objects to the array.
|
|
668
|
+
* One for start of the week
|
|
669
|
+
* and the other for end of the week .
|
|
670
|
+
*/
|
|
669
671
|
|
|
670
672
|
const startOfWeek: Date = data.eventStartTime;
|
|
671
673
|
// add 7 days to the end time to get the end of the week
|
|
@@ -718,11 +720,13 @@ export default class LayerUtil {
|
|
|
718
720
|
let restrictionStartTime: Date = dayRestrictionTimes.startTime;
|
|
719
721
|
let restrictionEndTime: Date = dayRestrictionTimes.endTime;
|
|
720
722
|
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
723
|
+
/*
|
|
724
|
+
* Special Case: Overnight (wrap-around) window where end time is logically on the next day.
|
|
725
|
+
* Example: 23:00 -> 11:00 (next day). Existing algorithm assumed end >= start within same day
|
|
726
|
+
* and returned no events. We explicitly expand such windows into two segments per day:
|
|
727
|
+
* 1) start -> endOfDay(start)
|
|
728
|
+
* 2) startOfNextDay -> end (moved to next day)
|
|
729
|
+
*/
|
|
726
730
|
if (OneUptimeDate.isBefore(restrictionEndTime, restrictionStartTime)) {
|
|
727
731
|
const results: Array<StartAndEndTime> = [];
|
|
728
732
|
|
|
@@ -1012,9 +1016,11 @@ export default class LayerUtil {
|
|
|
1012
1016
|
public removeOverlappingEvents(
|
|
1013
1017
|
events: PriorityCalendarEvents[],
|
|
1014
1018
|
): CalendarEvent[] {
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1019
|
+
/*
|
|
1020
|
+
* now remove overlapping events by priority and trim them by priority. Lower priority number will be kept and higher priority number will be trimmed.
|
|
1021
|
+
* so if there are two events with the same start and end time, we will keep the one with the lower priority number and remove the one with the higher priority number.
|
|
1022
|
+
* if there are overlapping events, we will trim the one with the higher priority number.
|
|
1023
|
+
*/
|
|
1018
1024
|
|
|
1019
1025
|
// sort the events by priority
|
|
1020
1026
|
|
|
@@ -1078,14 +1084,18 @@ export default class LayerUtil {
|
|
|
1078
1084
|
) {
|
|
1079
1085
|
// if the current event has a higher priority than the final event, we need to trim the final event
|
|
1080
1086
|
if (event.priority < finalEvent.priority) {
|
|
1081
|
-
|
|
1082
|
-
|
|
1087
|
+
/*
|
|
1088
|
+
* trim the final event based on the current event
|
|
1089
|
+
* end time of the final event will be the start time of the current event - 1 second
|
|
1090
|
+
*/
|
|
1083
1091
|
const tempFinalEventEnd: Date = finalEvent.end;
|
|
1084
1092
|
|
|
1085
1093
|
finalEvent.end = OneUptimeDate.addRemoveSeconds(event.start, -1);
|
|
1086
1094
|
|
|
1087
|
-
|
|
1088
|
-
|
|
1095
|
+
/*
|
|
1096
|
+
* check if the final event end time is before the start time of the current event
|
|
1097
|
+
* if it is, we need to remove the final event from the final events array
|
|
1098
|
+
*/
|
|
1089
1099
|
if (OneUptimeDate.isBefore(finalEvent.end, finalEvent.start)) {
|
|
1090
1100
|
finalEvents.splice(i, 1);
|
|
1091
1101
|
i--; // Adjust index after removal
|
|
@@ -1115,8 +1125,10 @@ export default class LayerUtil {
|
|
|
1115
1125
|
}
|
|
1116
1126
|
}
|
|
1117
1127
|
} else {
|
|
1118
|
-
|
|
1119
|
-
|
|
1128
|
+
/*
|
|
1129
|
+
* trim the current event based on the final event
|
|
1130
|
+
* start time of the current event will be the end time of the final event + 1 second
|
|
1131
|
+
*/
|
|
1120
1132
|
event.start = OneUptimeDate.addRemoveSeconds(finalEvent.end, 1);
|
|
1121
1133
|
}
|
|
1122
1134
|
}
|
package/Types/Phone.ts
CHANGED
|
@@ -15,9 +15,11 @@ export default class Phone extends DatabaseProperty {
|
|
|
15
15
|
primaryPhoneNumberToPickFrom: Phone | string;
|
|
16
16
|
seocndaryPhoneNumbersToPickFrom: Phone[] | string[];
|
|
17
17
|
}): Phone {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
/*
|
|
19
|
+
* convert all to string, so that we can compare them
|
|
20
|
+
* if the country code matches in secondary phone numbers, then pick that number
|
|
21
|
+
* if no country code matches, then pick the primary phone number and return it.
|
|
22
|
+
*/
|
|
21
23
|
|
|
22
24
|
const to: string =
|
|
23
25
|
typeof data.to === "string" ? data.to : data.to.toString();
|
|
@@ -7,12 +7,15 @@ export default interface CreateChannelNotificationRule
|
|
|
7
7
|
|
|
8
8
|
// if filters match then do:
|
|
9
9
|
shouldCreateNewChannel: boolean;
|
|
10
|
+
teamToCreateChannelIn?: string; // team to create new channel in (for MS Teams)
|
|
10
11
|
inviteTeamsToNewChannel: Array<ObjectID>;
|
|
11
12
|
inviteUsersToNewChannel: Array<ObjectID>;
|
|
12
13
|
shouldInviteOwnersToNewChannel: boolean;
|
|
13
14
|
newChannelTemplateName: string;
|
|
14
15
|
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
/*
|
|
17
|
+
* if selected this would archive channel when incident, alert, scheduled maintenance reaches the last state (is resolved)
|
|
18
|
+
* This would only archive the channel which was created.
|
|
19
|
+
*/
|
|
17
20
|
archiveChannelAutomatically: boolean;
|
|
18
21
|
}
|
|
@@ -105,4 +105,5 @@ export default interface WorkspaceMessagePayload {
|
|
|
105
105
|
channelIds: Array<string>; // Channel ids to send message to.
|
|
106
106
|
messageBlocks: Array<WorkspaceMessageBlock>; // Message to add to blocks.
|
|
107
107
|
workspaceType: WorkspaceType;
|
|
108
|
+
teamId?: string | undefined; // Team ID for Microsoft Teams
|
|
108
109
|
}
|
|
@@ -3,4 +3,17 @@ enum WorkspaceType {
|
|
|
3
3
|
MicrosoftTeams = "MicrosoftTeams",
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
+
export function getWorkspaceTypeDisplayName(
|
|
7
|
+
workspaceType: WorkspaceType,
|
|
8
|
+
): string {
|
|
9
|
+
if (workspaceType === WorkspaceType.MicrosoftTeams) {
|
|
10
|
+
return "Microsoft Teams";
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
if (workspaceType === WorkspaceType.Slack) {
|
|
14
|
+
return "Slack";
|
|
15
|
+
}
|
|
16
|
+
return workspaceType;
|
|
17
|
+
}
|
|
18
|
+
|
|
6
19
|
export default WorkspaceType;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
/*
|
|
2
|
+
* ChartDataPoint is in the format of:
|
|
3
|
+
* {
|
|
4
|
+
* date: "Feb 22",
|
|
5
|
+
* SolarPanels: 2756,
|
|
6
|
+
* Inverters: 2103,
|
|
7
|
+
* }
|
|
8
|
+
*/
|
|
7
9
|
|
|
8
10
|
import BadDataException from "../../../../Types/Exception/BadDataException";
|
|
9
11
|
import ChartDataPoint from "../ChartLibrary/Types/ChartDataPoint";
|
|
@@ -261,7 +261,10 @@ const Detail: DetailFunction = <T extends GenericObject>(
|
|
|
261
261
|
(props.item[fieldKey] as unknown as FileModel).fileType
|
|
262
262
|
) {
|
|
263
263
|
const blob: Blob = new Blob(
|
|
264
|
-
[
|
|
264
|
+
[
|
|
265
|
+
(props.item[fieldKey] as unknown as FileModel).file!
|
|
266
|
+
.buffer as ArrayBuffer,
|
|
267
|
+
],
|
|
265
268
|
{
|
|
266
269
|
type: (props.item[fieldKey] as unknown as FileModel)
|
|
267
270
|
.fileType as string,
|
|
@@ -131,7 +131,7 @@ const FilePicker: FunctionComponent<ComponentProps> = (
|
|
|
131
131
|
return <></>;
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
-
const blob: Blob = new Blob([file.file as
|
|
134
|
+
const blob: Blob = new Blob([file.file!.buffer as ArrayBuffer], {
|
|
135
135
|
type: file.fileType as string,
|
|
136
136
|
});
|
|
137
137
|
const url: string = URL.createObjectURL(blob);
|
|
@@ -114,8 +114,10 @@ export default interface Field<TEntity> {
|
|
|
114
114
|
|
|
115
115
|
hideOptionalLabel?: boolean | undefined;
|
|
116
116
|
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
/*
|
|
118
|
+
* Spell check configuration (primarily for Markdown and text fields)
|
|
119
|
+
* Default: false (spell check enabled). Set to true to disable spell check.
|
|
120
|
+
*/
|
|
119
121
|
disableSpellCheck?: boolean | undefined;
|
|
120
122
|
|
|
121
123
|
getSummaryElement?: (item: FormValues<TEntity>) => ReactElement | undefined;
|
|
@@ -18,7 +18,7 @@ export interface ComponentProps {
|
|
|
18
18
|
|
|
19
19
|
export class ImageFunctions {
|
|
20
20
|
public static getImageURL(file: File): string {
|
|
21
|
-
const blob: Blob = new Blob([file.file as
|
|
21
|
+
const blob: Blob = new Blob([file.file!.buffer as ArrayBuffer], {
|
|
22
22
|
type: (file as File).fileType as string,
|
|
23
23
|
});
|
|
24
24
|
|
|
@@ -46,8 +46,10 @@ const JSONTable: FunctionComponent<JSONTableProps> = (
|
|
|
46
46
|
JSONFunctions.nestJson(json),
|
|
47
47
|
) as { [key: string]: any };
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
/*
|
|
50
|
+
* Post-process flattened keys to group primitive arrays: prefix.0, prefix.1 => prefix: [v0, v1]
|
|
51
|
+
* We ONLY group if all matching keys are simple (no deeper nesting like prefix.0.field)
|
|
52
|
+
*/
|
|
51
53
|
type GroupEntry = { index: number; value: unknown };
|
|
52
54
|
type GroupMap = { [prefix: string]: Array<GroupEntry> };
|
|
53
55
|
const groupMap: GroupMap = {};
|
|
@@ -224,9 +224,11 @@ export interface BaseTableProps<
|
|
|
224
224
|
|
|
225
225
|
formSummary?: FormSummaryConfig | undefined;
|
|
226
226
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
227
|
+
/*
|
|
228
|
+
* this key is used to save table user preferences in local storage.
|
|
229
|
+
* If you provide this key, the table will save the user preferences in local storage.
|
|
230
|
+
* If you do not provide this key, the table will not save the user preferences in local storage.
|
|
231
|
+
*/
|
|
230
232
|
userPreferencesKey: string;
|
|
231
233
|
}
|
|
232
234
|
|
|
@@ -132,8 +132,10 @@ const SideMenu: FunctionComponent<ComponentProps> = (props: ComponentProps) => {
|
|
|
132
132
|
|
|
133
133
|
// Re-run active item detection when location changes
|
|
134
134
|
useEffect(() => {
|
|
135
|
-
|
|
136
|
-
|
|
135
|
+
/*
|
|
136
|
+
* This will trigger a re-render when navigation changes
|
|
137
|
+
* The activeItem will be recalculated
|
|
138
|
+
*/
|
|
137
139
|
}, [Navigation.getCurrentPath().toString()]);
|
|
138
140
|
|
|
139
141
|
// Render function for the menu content
|
|
@@ -35,32 +35,44 @@ const SideMenuItem: FunctionComponent<ComponentProps> = (
|
|
|
35
35
|
subItemLinkClassName = `bg-gray-100 text-indigo-600 hover:bg-white group rounded-md px-3 py-2 flex items-center text-sm font-medium`;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
/*
|
|
39
|
+
* if(props.badge && props.badge > 0){
|
|
40
|
+
* if(props.badgeType === BadgeType.DANGER){
|
|
41
|
+
* linkClassName = `text-red-400 hover:text-red-600 hover:bg-gray-100 group rounded-md px-3 py-2 flex items-center text-sm font-medium`;
|
|
42
|
+
*/
|
|
43
|
+
|
|
44
|
+
/*
|
|
45
|
+
* if(Navigation.isOnThisPage(props.link.to)){
|
|
46
|
+
* linkClassName = `bg-gray-100 text-red-600 hover:bg-white group rounded-md px-3 py-2 flex items-center text-sm font-medium`;
|
|
47
|
+
* }
|
|
48
|
+
*/
|
|
41
49
|
|
|
42
|
-
// if(Navigation.isOnThisPage(props.link.to)){
|
|
43
|
-
// linkClassName = `bg-gray-100 text-red-600 hover:bg-white group rounded-md px-3 py-2 flex items-center text-sm font-medium`;
|
|
44
|
-
// }
|
|
45
|
-
|
|
46
|
-
// }
|
|
47
|
-
|
|
48
|
-
// if(props.badgeType === BadgeType.WARNING){
|
|
49
|
-
// linkClassName = `text-yellow-400 hover:text-yellow-600 hover:bg-gray-100 group rounded-md px-3 py-2 flex items-center text-sm font-medium`;
|
|
50
|
-
|
|
51
|
-
// if(Navigation.isOnThisPage(props.link.to)){
|
|
52
|
-
// linkClassName = `bg-gray-100 text-yellow-600 hover:bg-white group rounded-md px-3 py-2 flex items-center text-sm font-medium`;
|
|
53
|
-
// }
|
|
54
50
|
// }
|
|
55
51
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
52
|
+
/*
|
|
53
|
+
* if(props.badgeType === BadgeType.WARNING){
|
|
54
|
+
* linkClassName = `text-yellow-400 hover:text-yellow-600 hover:bg-gray-100 group rounded-md px-3 py-2 flex items-center text-sm font-medium`;
|
|
55
|
+
*/
|
|
56
|
+
|
|
57
|
+
/*
|
|
58
|
+
* if(Navigation.isOnThisPage(props.link.to)){
|
|
59
|
+
* linkClassName = `bg-gray-100 text-yellow-600 hover:bg-white group rounded-md px-3 py-2 flex items-center text-sm font-medium`;
|
|
60
|
+
* }
|
|
61
|
+
* }
|
|
62
|
+
*/
|
|
63
|
+
|
|
64
|
+
/*
|
|
65
|
+
* if(props.badgeType === BadgeType.SUCCESS){
|
|
66
|
+
* linkClassName = `text-emerald-400 hover:text-emerald-600 hover:bg-gray-100 group rounded-md px-3 py-2 flex items-center text-sm font-medium`;
|
|
67
|
+
*/
|
|
68
|
+
|
|
69
|
+
/*
|
|
70
|
+
* if(Navigation.isOnThisPage(props.link.to)){
|
|
71
|
+
* linkClassName = `bg-gray-100 text-emerald-600 hover:bg-white group rounded-md px-3 py-2 flex items-center text-sm font-medium`;
|
|
72
|
+
* }
|
|
73
|
+
* }
|
|
74
|
+
* }
|
|
75
|
+
*/
|
|
64
76
|
|
|
65
77
|
let iconClassName: string =
|
|
66
78
|
"text-gray-400 group-hover:text-gray-500 flex-shrink-0 -ml-1 mr-3 h-6 w-6";
|
|
@@ -76,32 +88,44 @@ const SideMenuItem: FunctionComponent<ComponentProps> = (
|
|
|
76
88
|
subItemIconClassName = "text-indigo-500 flex-shrink-0 -ml-1 mr-3 h-6 w-6";
|
|
77
89
|
}
|
|
78
90
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
91
|
+
/*
|
|
92
|
+
* if(props.badge && props.badge > 0){
|
|
93
|
+
* if(props.badgeType === BadgeType.DANGER){
|
|
94
|
+
* iconClassName = `text-red-400 group-hover:text-red-500 flex-shrink-0 -ml-1 mr-3 h-6 w-6`;
|
|
95
|
+
*/
|
|
82
96
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
97
|
+
/*
|
|
98
|
+
* if(Navigation.isOnThisPage(props.link.to)){
|
|
99
|
+
* iconClassName = `text-red-500 flex-shrink-0 -ml-1 mr-3 h-6 w-6`;
|
|
100
|
+
* }
|
|
101
|
+
*/
|
|
86
102
|
|
|
87
103
|
// }
|
|
88
104
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
+
/*
|
|
106
|
+
* if(props.badgeType === BadgeType.WARNING){
|
|
107
|
+
* iconClassName = `text-yellow-400 group-hover:text-yellow-500 flex-shrink-0 -ml-1 mr-3 h-6 w-6`;
|
|
108
|
+
*/
|
|
109
|
+
|
|
110
|
+
/*
|
|
111
|
+
* if(Navigation.isOnThisPage(props.link.to)){
|
|
112
|
+
* iconClassName = `text-yellow-500 flex-shrink-0 -ml-1 mr-3 h-6 w-6`;
|
|
113
|
+
* }
|
|
114
|
+
* }
|
|
115
|
+
*/
|
|
116
|
+
|
|
117
|
+
/*
|
|
118
|
+
* if(props.badgeType === BadgeType.SUCCESS){
|
|
119
|
+
* iconClassName = `text-emerald-400 group-hover:text-emerald-500 flex-shrink-0 -ml-1 mr-3 h-6 w-6`;
|
|
120
|
+
*/
|
|
121
|
+
|
|
122
|
+
/*
|
|
123
|
+
* if(Navigation.isOnThisPage(props.link.to)){
|
|
124
|
+
* iconClassName = `text-emerald-500 flex-shrink-0 -ml-1 mr-3 h-6 w-6`;
|
|
125
|
+
* }
|
|
126
|
+
* }
|
|
127
|
+
* }
|
|
128
|
+
*/
|
|
105
129
|
|
|
106
130
|
return (
|
|
107
131
|
<>
|
package/UI/Config.ts
CHANGED
|
@@ -246,3 +246,6 @@ export const DisableTelemetry: boolean = env("DISABLE_TELEMETRY") === "true";
|
|
|
246
246
|
|
|
247
247
|
export const SlackAppClientId: string | null =
|
|
248
248
|
env("SLACK_APP_CLIENT_ID") || null;
|
|
249
|
+
|
|
250
|
+
export const MicrosoftTeamsAppClientId: string | null =
|
|
251
|
+
env("MICROSOFT_TEAMS_APP_CLIENT_ID") || null;
|
package/UI/Utils/API/API.ts
CHANGED
|
@@ -98,9 +98,11 @@ class BaseAPI extends API {
|
|
|
98
98
|
public static override handleError(
|
|
99
99
|
error: HTTPErrorResponse | APIException,
|
|
100
100
|
): HTTPErrorResponse | APIException {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
101
|
+
/*
|
|
102
|
+
* 405 Status - Tenant not found. If Project was deleted.
|
|
103
|
+
* 401 Status - User is not logged in.
|
|
104
|
+
* 403 Status - Forbidden. If the IP address is not whitelisted (for example).
|
|
105
|
+
*/
|
|
104
106
|
if (
|
|
105
107
|
error instanceof HTTPErrorResponse &&
|
|
106
108
|
(error.statusCode === 401 || error.statusCode === 405)
|
package/UI/Utils/Countries.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/*
|
|
2
|
+
* ISO 3166-1 alpha-2 country codes and names.
|
|
3
|
+
* Limited to widely recognized sovereign states and territories supported by Stripe.
|
|
4
|
+
* If needed, expand or adjust for specific business logic.
|
|
5
|
+
*/
|
|
4
6
|
export interface CountryOption {
|
|
5
7
|
value: string;
|
|
6
8
|
label: string;
|
package/UI/Utils/Login.ts
CHANGED
|
@@ -22,7 +22,12 @@ export default abstract class LoginUtil {
|
|
|
22
22
|
if (user.timezone) {
|
|
23
23
|
UserUtil.setSavedUserTimezone(user.timezone);
|
|
24
24
|
}
|
|
25
|
-
|
|
25
|
+
|
|
26
|
+
if (user.isMasterAdmin) {
|
|
27
|
+
UserUtil.setIsMasterAdmin(user.isMasterAdmin as boolean);
|
|
28
|
+
} else {
|
|
29
|
+
UserUtil.setIsMasterAdmin(false);
|
|
30
|
+
}
|
|
26
31
|
|
|
27
32
|
if (user.profilePictureId) {
|
|
28
33
|
UserUtil.setProfilePicId(user.profilePictureId);
|
package/Utils/Base64.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
class Base64 {
|
|
2
|
+
public static base64UrlToUint8Array(base64Url: string): Uint8Array {
|
|
3
|
+
const base64: string = base64Url.replace(/-/g, "+").replace(/_/g, "/");
|
|
4
|
+
return Buffer.from(base64, "base64") as Uint8Array;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
public static uint8ArrayToBase64Url(uint8Array: Uint8Array): string {
|
|
8
|
+
const base64: string = Buffer.from(uint8Array).toString("base64");
|
|
9
|
+
return base64.replace(/\+/g, "-").replace(/\//g, "_").replace(/[=]/g, "");
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default Base64;
|
|
@@ -1157,8 +1157,10 @@ export class ModelSchema extends BaseSchema {
|
|
|
1157
1157
|
data.disableOpenApiSchema || false,
|
|
1158
1158
|
);
|
|
1159
1159
|
|
|
1160
|
-
|
|
1161
|
-
|
|
1160
|
+
/*
|
|
1161
|
+
* Check if the column is required and make it optional if not
|
|
1162
|
+
* Also make columns with default values optional in create schemas
|
|
1163
|
+
*/
|
|
1162
1164
|
if (column.isDefaultValueColumn) {
|
|
1163
1165
|
// should be optional
|
|
1164
1166
|
zodType = zodType.optional();
|