@oneuptime/common 7.0.4395 → 7.0.4428
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/AnalyticsModels/AnalyticsBaseModel/CommonModel.ts +2 -2
- package/Models/DatabaseModels/DatabaseBaseModel/DatabaseBaseModel.ts +2 -1
- package/Models/DatabaseModels/Project.ts +44 -10
- package/Server/API/OpenAPI.ts +1 -1
- package/Server/API/StatusPageAPI.ts +5 -0
- package/Server/Middleware/NotificationMiddleware.ts +2 -0
- package/Server/Middleware/ProjectAuthorization.ts +10 -1
- package/Server/Middleware/UserAuthorization.ts +1 -0
- package/Server/Services/OpenTelemetryIngestService.ts +3 -3
- package/Server/Services/StatusPageDomainService.ts +1 -0
- package/Server/Types/Database/QueryHelper.ts +22 -22
- package/Server/Types/Workflow/Components/JSON/JsonToText.ts +2 -0
- package/Server/Types/Workflow/Components/JSON/TextToJson.ts +2 -0
- package/Server/Utils/CronTab.ts +2 -0
- package/Server/Utils/JsonWebToken.ts +2 -0
- package/Server/Utils/Monitor/Criteria/CustomCodeMonitorCriteria.ts +2 -0
- package/Server/Utils/Monitor/MonitorResource.ts +1 -0
- package/Server/Utils/OpenAPI.ts +2 -15
- package/Server/Utils/VM/VMAPI.ts +3 -0
- package/Server/Utils/VM/VMRunner.ts +1 -1
- package/Tests/Server/API/BaseAPI.test.ts +1 -3
- package/Tests/Server/Middleware/ProjectAuthorization.test.ts +8 -4
- package/Tests/Server/Services/AnalyticsDatabaseService.test.ts +55 -55
- package/Tests/Server/Services/BillingService.test.ts +16 -17
- package/Tests/Server/Services/TeamMemberService.test.ts +18 -1
- package/Tests/Server/TestingUtils/Services/BillingServiceHelper.ts +6 -6
- package/Tests/Server/Utils/AnalyticsDatabase/StatementGenerator.test.ts +5 -6
- package/Tests/UI/Components/404.test.tsx +12 -7
- package/Tests/UI/Components/ConfirmModal.test.tsx +1 -1
- package/Tests/UI/Components/DuplicateModel.test.tsx +14 -6
- package/Tests/UI/Components/OrderedStatesList.test.tsx +1 -1
- package/Types/API/EmptyResponse.ts +2 -1
- package/Types/API/StatusCode.ts +1 -1
- package/Types/BaseDatabase/QueryOperator.ts +1 -1
- package/Types/Database/TableColumn.ts +1 -0
- package/Types/Date.ts +18 -0
- package/Types/GenericFunction.ts +1 -1
- package/Types/GenericObject.ts +1 -1
- package/Types/IP/IP.ts +1 -1
- package/Types/ObjectID.ts +7 -15
- package/Types/Port.ts +1 -1
- package/UI/Components/Accordion/Accordion.tsx +7 -5
- package/UI/Components/BulkUpdate/BulkUpdateForm.tsx +6 -2
- package/UI/Components/Button/Button.tsx +3 -1
- package/UI/Components/CategoryCheckbox/CheckboxList.tsx +6 -2
- package/UI/Components/CodeEditor/CodeEditor.tsx +12 -4
- package/UI/Components/ColorViewer/ColorViewer.tsx +1 -1
- package/UI/Components/Date/StartAndEndDate.tsx +36 -48
- package/UI/Components/Detail/Detail.tsx +3 -1
- package/UI/Components/Dropdown/Dropdown.tsx +12 -13
- package/UI/Components/DuplicateModel/DuplicateModel.tsx +1 -1
- package/UI/Components/Events/RecurringArrayFieldElement.tsx +2 -2
- package/UI/Components/FilePicker/FilePicker.tsx +5 -5
- package/UI/Components/Filters/FilterViewer.tsx +3 -3
- package/UI/Components/FormModal/BasicFormModal.tsx +1 -1
- package/UI/Components/Forms/BasicForm.tsx +1 -1
- package/UI/Components/Forms/Fields/FormField.tsx +5 -4
- package/UI/Components/Forms/ModelForm.tsx +2 -2
- package/UI/Components/Forms/Validation.ts +2 -0
- package/UI/Components/FullPageModal/FullPageModal.tsx +1 -1
- package/UI/Components/Header/HeaderIconDropdownButton.tsx +2 -2
- package/UI/Components/HeaderAlert/HeaderAlert.tsx +1 -1
- package/UI/Components/Icon/Icon.tsx +3 -1
- package/UI/Components/Image/Image.tsx +1 -1
- package/UI/Components/Input/Input.tsx +1 -1
- package/UI/Components/List/List.tsx +4 -4
- package/UI/Components/LogsViewer/LogItem.tsx +2 -0
- package/UI/Components/Modal/ModalFooter.tsx +1 -1
- package/UI/Components/ModelDelete/ModelDelete.tsx +1 -1
- package/UI/Components/ModelDetail/ModelDetail.tsx +3 -3
- package/UI/Components/ModelFormModal/ModelFormModal.tsx +2 -1
- package/UI/Components/ModelList/ModelList.tsx +2 -2
- package/UI/Components/ModelList/StaticModelList.tsx +4 -4
- package/UI/Components/ModelTable/BaseModelTable.tsx +2 -2
- package/UI/Components/ModelTable/TableView.tsx +3 -3
- package/UI/Components/ObjectID/IDGenerator.tsx +1 -1
- package/UI/Components/OrderedStatesList/OrderedStatesList.tsx +4 -2
- package/UI/Components/ProgressBar/ProgressBar.tsx +2 -0
- package/UI/Components/Radio/Radio.tsx +10 -4
- package/UI/Components/Table/Table.tsx +8 -7
- package/UI/Components/TableColumnList/TableColumnListComponent.tsx +1 -1
- package/UI/Components/Tabs/Tabs.tsx +2 -2
- package/UI/Components/TextArea/TextArea.tsx +3 -1
- package/UI/Utils/AnalyticsModelAPI/AnalyticsModelAPI.ts +2 -2
- package/UI/Utils/Cookie.ts +2 -0
- package/UI/Utils/LocalStorage.ts +2 -0
- package/UI/Utils/Logger.ts +10 -8
- package/UI/Utils/ModelAPI/ModelAPI.ts +2 -2
- package/UI/Utils/SessionStorage.ts +2 -0
- package/Utils/Schema/AnalyticsModelSchema.ts +5 -9
- package/Utils/Schema/ModelSchema.ts +34 -17
- package/build/dist/Models/AnalyticsModels/AnalyticsBaseModel/CommonModel.js +2 -2
- package/build/dist/Models/AnalyticsModels/AnalyticsBaseModel/CommonModel.js.map +1 -1
- package/build/dist/Models/DatabaseModels/DatabaseBaseModel/DatabaseBaseModel.js +2 -1
- package/build/dist/Models/DatabaseModels/DatabaseBaseModel/DatabaseBaseModel.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Project.js +42 -10
- package/build/dist/Models/DatabaseModels/Project.js.map +1 -1
- package/build/dist/Server/API/OpenAPI.js +1 -1
- package/build/dist/Server/API/OpenAPI.js.map +1 -1
- package/build/dist/Server/API/StatusPageAPI.js +3 -0
- package/build/dist/Server/API/StatusPageAPI.js.map +1 -1
- package/build/dist/Server/Middleware/NotificationMiddleware.js +2 -0
- package/build/dist/Server/Middleware/NotificationMiddleware.js.map +1 -1
- package/build/dist/Server/Middleware/ProjectAuthorization.js +6 -1
- package/build/dist/Server/Middleware/ProjectAuthorization.js.map +1 -1
- package/build/dist/Server/Middleware/UserAuthorization.js +1 -0
- package/build/dist/Server/Middleware/UserAuthorization.js.map +1 -1
- package/build/dist/Server/Services/StatusPageDomainService.js +1 -0
- package/build/dist/Server/Services/StatusPageDomainService.js.map +1 -1
- package/build/dist/Server/Types/Database/QueryHelper.js.map +1 -1
- package/build/dist/Server/Types/Workflow/Components/JSON/JsonToText.js +2 -0
- package/build/dist/Server/Types/Workflow/Components/JSON/JsonToText.js.map +1 -1
- package/build/dist/Server/Types/Workflow/Components/JSON/TextToJson.js +2 -0
- package/build/dist/Server/Types/Workflow/Components/JSON/TextToJson.js.map +1 -1
- package/build/dist/Server/Utils/CronTab.js +2 -0
- package/build/dist/Server/Utils/CronTab.js.map +1 -1
- package/build/dist/Server/Utils/JsonWebToken.js +2 -0
- package/build/dist/Server/Utils/JsonWebToken.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/CustomCodeMonitorCriteria.js +2 -0
- package/build/dist/Server/Utils/Monitor/Criteria/CustomCodeMonitorCriteria.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorResource.js +1 -0
- package/build/dist/Server/Utils/Monitor/MonitorResource.js.map +1 -1
- package/build/dist/Server/Utils/OpenAPI.js +2 -9
- package/build/dist/Server/Utils/OpenAPI.js.map +1 -1
- package/build/dist/Server/Utils/VM/VMAPI.js +3 -0
- package/build/dist/Server/Utils/VM/VMAPI.js.map +1 -1
- package/build/dist/Tests/Server/API/BaseAPI.test.js +1 -3
- package/build/dist/Tests/Server/API/BaseAPI.test.js.map +1 -1
- package/build/dist/Tests/Server/Middleware/ProjectAuthorization.test.js +7 -4
- package/build/dist/Tests/Server/Middleware/ProjectAuthorization.test.js.map +1 -1
- package/build/dist/Tests/Server/Services/AnalyticsDatabaseService.test.js +51 -41
- package/build/dist/Tests/Server/Services/AnalyticsDatabaseService.test.js.map +1 -1
- package/build/dist/Tests/Server/Services/BillingService.test.js +16 -17
- package/build/dist/Tests/Server/Services/BillingService.test.js.map +1 -1
- package/build/dist/Tests/Server/Services/TeamMemberService.test.js +17 -1
- 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/Server/Utils/AnalyticsDatabase/StatementGenerator.test.js +5 -5
- package/build/dist/Tests/Server/Utils/AnalyticsDatabase/StatementGenerator.test.js.map +1 -1
- package/build/dist/Tests/UI/Components/404.test.js +8 -3
- package/build/dist/Tests/UI/Components/404.test.js.map +1 -1
- package/build/dist/Tests/UI/Components/ConfirmModal.test.js +1 -1
- package/build/dist/Tests/UI/Components/ConfirmModal.test.js.map +1 -1
- package/build/dist/Tests/UI/Components/DuplicateModel.test.js +7 -2
- package/build/dist/Tests/UI/Components/DuplicateModel.test.js.map +1 -1
- package/build/dist/Tests/UI/Components/OrderedStatesList.test.js +1 -1
- package/build/dist/Tests/UI/Components/OrderedStatesList.test.js.map +1 -1
- package/build/dist/Types/API/StatusCode.js +1 -1
- package/build/dist/Types/API/StatusCode.js.map +1 -1
- package/build/dist/Types/Database/TableColumn.js.map +1 -1
- package/build/dist/Types/Date.js +17 -0
- package/build/dist/Types/Date.js.map +1 -1
- package/build/dist/Types/IP/IP.js +1 -1
- package/build/dist/Types/IP/IP.js.map +1 -1
- package/build/dist/Types/ObjectID.js +5 -13
- package/build/dist/Types/ObjectID.js.map +1 -1
- package/build/dist/Types/Port.js +1 -1
- package/build/dist/Types/Port.js.map +1 -1
- package/build/dist/UI/Components/Accordion/Accordion.js +7 -5
- package/build/dist/UI/Components/Accordion/Accordion.js.map +1 -1
- package/build/dist/UI/Components/BulkUpdate/BulkUpdateForm.js +6 -2
- package/build/dist/UI/Components/BulkUpdate/BulkUpdateForm.js.map +1 -1
- package/build/dist/UI/Components/Button/Button.js +3 -1
- package/build/dist/UI/Components/Button/Button.js.map +1 -1
- package/build/dist/UI/Components/CategoryCheckbox/CheckboxList.js +6 -2
- package/build/dist/UI/Components/CategoryCheckbox/CheckboxList.js.map +1 -1
- package/build/dist/UI/Components/CodeEditor/CodeEditor.js +12 -4
- package/build/dist/UI/Components/CodeEditor/CodeEditor.js.map +1 -1
- package/build/dist/UI/Components/ColorViewer/ColorViewer.js +2 -1
- package/build/dist/UI/Components/ColorViewer/ColorViewer.js.map +1 -1
- package/build/dist/UI/Components/Date/StartAndEndDate.js +22 -24
- package/build/dist/UI/Components/Date/StartAndEndDate.js.map +1 -1
- package/build/dist/UI/Components/Detail/Detail.js +3 -1
- package/build/dist/UI/Components/Detail/Detail.js.map +1 -1
- package/build/dist/UI/Components/Dropdown/Dropdown.js +14 -11
- package/build/dist/UI/Components/Dropdown/Dropdown.js.map +1 -1
- package/build/dist/UI/Components/DuplicateModel/DuplicateModel.js +2 -1
- package/build/dist/UI/Components/DuplicateModel/DuplicateModel.js.map +1 -1
- package/build/dist/UI/Components/Events/RecurringArrayFieldElement.js +4 -2
- package/build/dist/UI/Components/Events/RecurringArrayFieldElement.js.map +1 -1
- package/build/dist/UI/Components/FilePicker/FilePicker.js +8 -5
- package/build/dist/UI/Components/FilePicker/FilePicker.js.map +1 -1
- package/build/dist/UI/Components/Filters/FilterViewer.js +6 -3
- package/build/dist/UI/Components/Filters/FilterViewer.js.map +1 -1
- package/build/dist/UI/Components/FormModal/BasicFormModal.js +2 -1
- package/build/dist/UI/Components/FormModal/BasicFormModal.js.map +1 -1
- package/build/dist/UI/Components/Forms/BasicForm.js +2 -1
- package/build/dist/UI/Components/Forms/BasicForm.js.map +1 -1
- package/build/dist/UI/Components/Forms/Fields/FormField.js +8 -4
- package/build/dist/UI/Components/Forms/Fields/FormField.js.map +1 -1
- package/build/dist/UI/Components/Forms/ModelForm.js +4 -2
- package/build/dist/UI/Components/Forms/ModelForm.js.map +1 -1
- package/build/dist/UI/Components/Forms/Validation.js +2 -0
- package/build/dist/UI/Components/Forms/Validation.js.map +1 -1
- package/build/dist/UI/Components/FullPageModal/FullPageModal.js +2 -1
- package/build/dist/UI/Components/FullPageModal/FullPageModal.js.map +1 -1
- package/build/dist/UI/Components/Header/HeaderIconDropdownButton.js +4 -2
- package/build/dist/UI/Components/Header/HeaderIconDropdownButton.js.map +1 -1
- package/build/dist/UI/Components/HeaderAlert/HeaderAlert.js +2 -1
- package/build/dist/UI/Components/HeaderAlert/HeaderAlert.js.map +1 -1
- package/build/dist/UI/Components/Icon/Icon.js +3 -1
- package/build/dist/UI/Components/Icon/Icon.js.map +1 -1
- package/build/dist/UI/Components/Image/Image.js +2 -1
- package/build/dist/UI/Components/Image/Image.js.map +1 -1
- package/build/dist/UI/Components/Input/Input.js +2 -1
- package/build/dist/UI/Components/Input/Input.js.map +1 -1
- package/build/dist/UI/Components/List/List.js +6 -4
- package/build/dist/UI/Components/List/List.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/LogItem.js +2 -0
- package/build/dist/UI/Components/LogsViewer/LogItem.js.map +1 -1
- package/build/dist/UI/Components/Modal/ModalFooter.js +2 -1
- package/build/dist/UI/Components/Modal/ModalFooter.js.map +1 -1
- package/build/dist/UI/Components/ModelDelete/ModelDelete.js +2 -1
- package/build/dist/UI/Components/ModelDelete/ModelDelete.js.map +1 -1
- package/build/dist/UI/Components/ModelDetail/ModelDetail.js +5 -5
- package/build/dist/UI/Components/ModelDetail/ModelDetail.js.map +1 -1
- package/build/dist/UI/Components/ModelFormModal/ModelFormModal.js +2 -1
- package/build/dist/UI/Components/ModelFormModal/ModelFormModal.js.map +1 -1
- package/build/dist/UI/Components/ModelList/ModelList.js +4 -2
- package/build/dist/UI/Components/ModelList/ModelList.js.map +1 -1
- package/build/dist/UI/Components/ModelList/StaticModelList.js +7 -5
- package/build/dist/UI/Components/ModelList/StaticModelList.js.map +1 -1
- package/build/dist/UI/Components/ModelTable/BaseModelTable.js +4 -2
- package/build/dist/UI/Components/ModelTable/BaseModelTable.js.map +1 -1
- package/build/dist/UI/Components/ModelTable/TableView.js +6 -3
- package/build/dist/UI/Components/ModelTable/TableView.js.map +1 -1
- package/build/dist/UI/Components/ObjectID/IDGenerator.js +2 -1
- package/build/dist/UI/Components/ObjectID/IDGenerator.js.map +1 -1
- package/build/dist/UI/Components/OrderedStatesList/OrderedStatesList.js +4 -2
- package/build/dist/UI/Components/OrderedStatesList/OrderedStatesList.js.map +1 -1
- package/build/dist/UI/Components/ProgressBar/ProgressBar.js +2 -0
- package/build/dist/UI/Components/ProgressBar/ProgressBar.js.map +1 -1
- package/build/dist/UI/Components/Radio/Radio.js +9 -3
- package/build/dist/UI/Components/Radio/Radio.js.map +1 -1
- package/build/dist/UI/Components/Table/Table.js +12 -7
- package/build/dist/UI/Components/Table/Table.js.map +1 -1
- package/build/dist/UI/Components/Tabs/Tabs.js +2 -2
- package/build/dist/UI/Components/Tabs/Tabs.js.map +1 -1
- package/build/dist/UI/Components/TextArea/TextArea.js +3 -1
- package/build/dist/UI/Components/TextArea/TextArea.js.map +1 -1
- package/build/dist/UI/Utils/Cookie.js +2 -0
- package/build/dist/UI/Utils/Cookie.js.map +1 -1
- package/build/dist/UI/Utils/LocalStorage.js +2 -0
- package/build/dist/UI/Utils/LocalStorage.js.map +1 -1
- package/build/dist/UI/Utils/Logger.js.map +1 -1
- package/build/dist/UI/Utils/SessionStorage.js +2 -0
- package/build/dist/UI/Utils/SessionStorage.js.map +1 -1
- package/build/dist/Utils/Schema/AnalyticsModelSchema.js +5 -9
- package/build/dist/Utils/Schema/AnalyticsModelSchema.js.map +1 -1
- package/build/dist/Utils/Schema/ModelSchema.js +30 -17
- package/build/dist/Utils/Schema/ModelSchema.js.map +1 -1
- package/package.json +1 -1
|
@@ -76,7 +76,7 @@ export default class CommonModel {
|
|
|
76
76
|
if (column.type === TableColumnType.JSON && typeof value === "string") {
|
|
77
77
|
try {
|
|
78
78
|
value = JSONFunctions.parse(value);
|
|
79
|
-
} catch
|
|
79
|
+
} catch {
|
|
80
80
|
value = {};
|
|
81
81
|
}
|
|
82
82
|
}
|
|
@@ -91,7 +91,7 @@ export default class CommonModel {
|
|
|
91
91
|
if (!Array.isArray(value)) {
|
|
92
92
|
throw new BadDataException("Not an array");
|
|
93
93
|
}
|
|
94
|
-
} catch
|
|
94
|
+
} catch {
|
|
95
95
|
value = [];
|
|
96
96
|
}
|
|
97
97
|
}
|
|
@@ -92,8 +92,9 @@ export default class DatabaseBaseModel extends BaseEntity {
|
|
|
92
92
|
|
|
93
93
|
@TableColumn({
|
|
94
94
|
title: "Version",
|
|
95
|
-
type: TableColumnType.
|
|
95
|
+
type: TableColumnType.Number,
|
|
96
96
|
description: "Object version",
|
|
97
|
+
hideColumnInDocumentation: true,
|
|
97
98
|
})
|
|
98
99
|
@VersionColumn()
|
|
99
100
|
public version?: number = undefined;
|
|
@@ -595,7 +595,10 @@ export default class Project extends TenantModel {
|
|
|
595
595
|
read: [],
|
|
596
596
|
update: [],
|
|
597
597
|
})
|
|
598
|
-
@TableColumn({
|
|
598
|
+
@TableColumn({
|
|
599
|
+
type: TableColumnType.Number,
|
|
600
|
+
hideColumnInDocumentation: true,
|
|
601
|
+
})
|
|
599
602
|
@Column({
|
|
600
603
|
type: ColumnType.Number,
|
|
601
604
|
nullable: true,
|
|
@@ -768,6 +771,7 @@ export default class Project extends TenantModel {
|
|
|
768
771
|
@TableColumn({
|
|
769
772
|
required: true,
|
|
770
773
|
isDefaultValueColumn: true,
|
|
774
|
+
hideColumnInDocumentation: true,
|
|
771
775
|
type: TableColumnType.Boolean,
|
|
772
776
|
title: "Low Call and SMS Balance Notification Sent to Owners",
|
|
773
777
|
description: "Low Call and SMS Balance Notification Sent to Owners",
|
|
@@ -788,6 +792,7 @@ export default class Project extends TenantModel {
|
|
|
788
792
|
required: true,
|
|
789
793
|
isDefaultValueColumn: true,
|
|
790
794
|
type: TableColumnType.Boolean,
|
|
795
|
+
hideColumnInDocumentation: true,
|
|
791
796
|
title: "Failed Call and SMS Balance Charge Notification Sent to Owners",
|
|
792
797
|
description:
|
|
793
798
|
"Failed Call and SMS Balance Charge Notification Sent to Owners",
|
|
@@ -808,6 +813,7 @@ export default class Project extends TenantModel {
|
|
|
808
813
|
@TableColumn({
|
|
809
814
|
required: true,
|
|
810
815
|
isDefaultValueColumn: true,
|
|
816
|
+
hideColumnInDocumentation: true,
|
|
811
817
|
type: TableColumnType.Boolean,
|
|
812
818
|
title: "Failed Call and SMS Balance Charge Notification Sent to Owners",
|
|
813
819
|
description:
|
|
@@ -838,6 +844,7 @@ export default class Project extends TenantModel {
|
|
|
838
844
|
title: "Plan Name",
|
|
839
845
|
description: "Name of the plan this project is subscribed to.",
|
|
840
846
|
canReadOnRelationQuery: true,
|
|
847
|
+
hideColumnInDocumentation: true,
|
|
841
848
|
})
|
|
842
849
|
@Column({
|
|
843
850
|
nullable: true,
|
|
@@ -865,7 +872,7 @@ export default class Project extends TenantModel {
|
|
|
865
872
|
read: [],
|
|
866
873
|
update: [],
|
|
867
874
|
})
|
|
868
|
-
@TableColumn({ type: TableColumnType.Phone })
|
|
875
|
+
@TableColumn({ type: TableColumnType.Phone, hideColumnInDocumentation: true })
|
|
869
876
|
@Column({
|
|
870
877
|
type: ColumnType.Phone,
|
|
871
878
|
length: ColumnLength.Phone,
|
|
@@ -880,7 +887,7 @@ export default class Project extends TenantModel {
|
|
|
880
887
|
read: [],
|
|
881
888
|
update: [],
|
|
882
889
|
})
|
|
883
|
-
@TableColumn({ type: TableColumnType.Email })
|
|
890
|
+
@TableColumn({ type: TableColumnType.Email, hideColumnInDocumentation: true })
|
|
884
891
|
@Column({
|
|
885
892
|
type: ColumnType.Email,
|
|
886
893
|
length: ColumnLength.Email,
|
|
@@ -895,7 +902,7 @@ export default class Project extends TenantModel {
|
|
|
895
902
|
read: [],
|
|
896
903
|
update: [],
|
|
897
904
|
})
|
|
898
|
-
@TableColumn({ type: TableColumnType.Name })
|
|
905
|
+
@TableColumn({ type: TableColumnType.Name, hideColumnInDocumentation: true })
|
|
899
906
|
@Column({
|
|
900
907
|
type: ColumnType.Name,
|
|
901
908
|
length: ColumnLength.Name,
|
|
@@ -910,7 +917,10 @@ export default class Project extends TenantModel {
|
|
|
910
917
|
read: [],
|
|
911
918
|
update: [],
|
|
912
919
|
})
|
|
913
|
-
@TableColumn({
|
|
920
|
+
@TableColumn({
|
|
921
|
+
type: TableColumnType.LongText,
|
|
922
|
+
hideColumnInDocumentation: true,
|
|
923
|
+
})
|
|
914
924
|
@Column({
|
|
915
925
|
type: ColumnType.LongText,
|
|
916
926
|
length: ColumnLength.LongText,
|
|
@@ -924,7 +934,10 @@ export default class Project extends TenantModel {
|
|
|
924
934
|
read: [],
|
|
925
935
|
update: [],
|
|
926
936
|
})
|
|
927
|
-
@TableColumn({
|
|
937
|
+
@TableColumn({
|
|
938
|
+
type: TableColumnType.LongText,
|
|
939
|
+
hideColumnInDocumentation: true,
|
|
940
|
+
})
|
|
928
941
|
@Column({
|
|
929
942
|
type: ColumnType.LongText,
|
|
930
943
|
length: ColumnLength.LongText,
|
|
@@ -938,7 +951,10 @@ export default class Project extends TenantModel {
|
|
|
938
951
|
read: [],
|
|
939
952
|
update: [],
|
|
940
953
|
})
|
|
941
|
-
@TableColumn({
|
|
954
|
+
@TableColumn({
|
|
955
|
+
type: TableColumnType.LongText,
|
|
956
|
+
hideColumnInDocumentation: true,
|
|
957
|
+
})
|
|
942
958
|
@Column({
|
|
943
959
|
type: ColumnType.LongText,
|
|
944
960
|
length: ColumnLength.LongText,
|
|
@@ -952,7 +968,10 @@ export default class Project extends TenantModel {
|
|
|
952
968
|
read: [],
|
|
953
969
|
update: [],
|
|
954
970
|
})
|
|
955
|
-
@TableColumn({
|
|
971
|
+
@TableColumn({
|
|
972
|
+
type: TableColumnType.LongText,
|
|
973
|
+
hideColumnInDocumentation: true,
|
|
974
|
+
})
|
|
956
975
|
@Column({
|
|
957
976
|
type: ColumnType.LongText,
|
|
958
977
|
length: ColumnLength.LongText,
|
|
@@ -980,10 +999,14 @@ export default class Project extends TenantModel {
|
|
|
980
999
|
read: [],
|
|
981
1000
|
update: [],
|
|
982
1001
|
})
|
|
983
|
-
@TableColumn({
|
|
1002
|
+
@TableColumn({
|
|
1003
|
+
type: TableColumnType.LongText,
|
|
1004
|
+
hideColumnInDocumentation: true,
|
|
1005
|
+
})
|
|
984
1006
|
@Column({
|
|
985
1007
|
type: ColumnType.LongText,
|
|
986
1008
|
length: ColumnLength.LongText,
|
|
1009
|
+
|
|
987
1010
|
nullable: true,
|
|
988
1011
|
unique: false,
|
|
989
1012
|
})
|
|
@@ -994,9 +1017,13 @@ export default class Project extends TenantModel {
|
|
|
994
1017
|
read: [],
|
|
995
1018
|
update: [],
|
|
996
1019
|
})
|
|
997
|
-
@TableColumn({
|
|
1020
|
+
@TableColumn({
|
|
1021
|
+
type: TableColumnType.ShortText,
|
|
1022
|
+
hideColumnInDocumentation: true,
|
|
1023
|
+
})
|
|
998
1024
|
@Column({
|
|
999
1025
|
type: ColumnType.ShortText,
|
|
1026
|
+
|
|
1000
1027
|
length: ColumnLength.ShortText,
|
|
1001
1028
|
nullable: true,
|
|
1002
1029
|
unique: false,
|
|
@@ -1011,6 +1038,7 @@ export default class Project extends TenantModel {
|
|
|
1011
1038
|
@TableColumn({
|
|
1012
1039
|
manyToOneRelationColumn: "resellerId",
|
|
1013
1040
|
type: TableColumnType.Entity,
|
|
1041
|
+
hideColumnInDocumentation: true,
|
|
1014
1042
|
modelType: Reseller,
|
|
1015
1043
|
title: "Reseller",
|
|
1016
1044
|
description: "Relation to Reseller Resource in which this object belongs",
|
|
@@ -1046,6 +1074,7 @@ export default class Project extends TenantModel {
|
|
|
1046
1074
|
type: TableColumnType.ObjectID,
|
|
1047
1075
|
required: false,
|
|
1048
1076
|
canReadOnRelationQuery: true,
|
|
1077
|
+
hideColumnInDocumentation: true,
|
|
1049
1078
|
title: "Reseller ID",
|
|
1050
1079
|
description: "ID of your OneUptime Reseller in which this object belongs",
|
|
1051
1080
|
})
|
|
@@ -1065,6 +1094,7 @@ export default class Project extends TenantModel {
|
|
|
1065
1094
|
manyToOneRelationColumn: "ResellerPlanId",
|
|
1066
1095
|
type: TableColumnType.Entity,
|
|
1067
1096
|
modelType: ResellerPlan,
|
|
1097
|
+
hideColumnInDocumentation: true,
|
|
1068
1098
|
title: "ResellerPlan",
|
|
1069
1099
|
description:
|
|
1070
1100
|
"Relation to ResellerPlan Resource in which this object belongs",
|
|
@@ -1093,6 +1123,7 @@ export default class Project extends TenantModel {
|
|
|
1093
1123
|
type: TableColumnType.ObjectID,
|
|
1094
1124
|
required: false,
|
|
1095
1125
|
canReadOnRelationQuery: true,
|
|
1126
|
+
hideColumnInDocumentation: true,
|
|
1096
1127
|
title: "Reseller Plan ID",
|
|
1097
1128
|
description:
|
|
1098
1129
|
"ID of your OneUptime Reseller Plan in which this object belongs",
|
|
@@ -1113,6 +1144,7 @@ export default class Project extends TenantModel {
|
|
|
1113
1144
|
required: false,
|
|
1114
1145
|
type: TableColumnType.ShortText,
|
|
1115
1146
|
title: "License ID",
|
|
1147
|
+
hideColumnInDocumentation: true,
|
|
1116
1148
|
description: "License ID from a OneUptime Reseller",
|
|
1117
1149
|
canReadOnRelationQuery: true,
|
|
1118
1150
|
})
|
|
@@ -1132,6 +1164,7 @@ export default class Project extends TenantModel {
|
|
|
1132
1164
|
required: false,
|
|
1133
1165
|
type: TableColumnType.Number,
|
|
1134
1166
|
title: "Enterprise Annual Contract Value",
|
|
1167
|
+
hideColumnInDocumentation: true,
|
|
1135
1168
|
description:
|
|
1136
1169
|
"Annual contract value for this project (in USD). This field is only applicable for enterprise customers and is manually edited.",
|
|
1137
1170
|
})
|
|
@@ -1156,6 +1189,7 @@ export default class Project extends TenantModel {
|
|
|
1156
1189
|
required: false,
|
|
1157
1190
|
type: TableColumnType.Boolean,
|
|
1158
1191
|
title: "Let Customer Support Access Project",
|
|
1192
|
+
hideColumnInDocumentation: true,
|
|
1159
1193
|
description:
|
|
1160
1194
|
"OneUptime customer support can access this project. This is used for debugging purposes.",
|
|
1161
1195
|
})
|
package/Server/API/OpenAPI.ts
CHANGED
|
@@ -19,7 +19,7 @@ export default class OpenAPI {
|
|
|
19
19
|
public static getRouter(): ExpressRouter {
|
|
20
20
|
const router: ExpressRouter = Express.getRouter();
|
|
21
21
|
|
|
22
|
-
router.get("/openapi", (req: ExpressRequest, res: ExpressResponse) => {
|
|
22
|
+
router.get("/openapi/spec", (req: ExpressRequest, res: ExpressResponse) => {
|
|
23
23
|
const openAPISpec: JSONObject = OpenAPIUtil.generateOpenAPISpec();
|
|
24
24
|
return Response.sendJsonObjectResponse(req, res, openAPISpec);
|
|
25
25
|
});
|
|
@@ -142,6 +142,10 @@ export default class StatusPageAPI extends BaseAPI<
|
|
|
142
142
|
try {
|
|
143
143
|
statusPageId = new ObjectID(statusPageIdOrDomain);
|
|
144
144
|
} catch (err) {
|
|
145
|
+
logger.error(
|
|
146
|
+
`Error converting statusPageIdOrDomain to ObjectID: ${statusPageIdOrDomain}`,
|
|
147
|
+
);
|
|
148
|
+
logger.error(err);
|
|
145
149
|
return Response.sendErrorResponse(
|
|
146
150
|
req,
|
|
147
151
|
res,
|
|
@@ -224,6 +228,7 @@ export default class StatusPageAPI extends BaseAPI<
|
|
|
224
228
|
try {
|
|
225
229
|
statusPageId = new ObjectID(statusPageIdOrDomain);
|
|
226
230
|
} catch (err) {
|
|
231
|
+
logger.error(err);
|
|
227
232
|
return Response.sendErrorResponse(
|
|
228
233
|
req,
|
|
229
234
|
res,
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
} from "../Utils/Express";
|
|
7
7
|
import JSONWebToken from "../Utils/JsonWebToken";
|
|
8
8
|
import Response from "../Utils/Response";
|
|
9
|
+
import logger from "../Utils/Logger";
|
|
9
10
|
import { OnCallInputRequest } from "../../Types/Call/CallRequest";
|
|
10
11
|
import BadDataException from "../../Types/Exception/BadDataException";
|
|
11
12
|
import JSONFunctions from "../../Types/JSONFunctions";
|
|
@@ -61,6 +62,7 @@ export default class NotificationMiddleware {
|
|
|
61
62
|
JSONWebToken.decodeJsonPayload(token),
|
|
62
63
|
);
|
|
63
64
|
} catch (e) {
|
|
65
|
+
logger.error(e);
|
|
64
66
|
return Response.sendErrorResponse(
|
|
65
67
|
req,
|
|
66
68
|
res,
|
|
@@ -76,7 +76,9 @@ export default class ProjectMiddleware {
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
if (!apiKey) {
|
|
79
|
-
throw new BadDataException(
|
|
79
|
+
throw new BadDataException(
|
|
80
|
+
"Api Key not found in the request header. Please provide a valid API Key in the request header.",
|
|
81
|
+
);
|
|
80
82
|
}
|
|
81
83
|
|
|
82
84
|
let apiKeyModel: ApiKey | null = null;
|
|
@@ -102,6 +104,8 @@ export default class ProjectMiddleware {
|
|
|
102
104
|
);
|
|
103
105
|
}
|
|
104
106
|
|
|
107
|
+
(req as OneUptimeRequest).tenantId = tenantId;
|
|
108
|
+
|
|
105
109
|
if (apiKeyModel) {
|
|
106
110
|
(req as OneUptimeRequest).userType = UserType.API;
|
|
107
111
|
// TODO: Add API key permissions.
|
|
@@ -184,6 +188,11 @@ export default class ProjectMiddleware {
|
|
|
184
188
|
}
|
|
185
189
|
}
|
|
186
190
|
|
|
191
|
+
if (apiKey) {
|
|
192
|
+
// If we have an API key but no tenant ID, we throw an error.
|
|
193
|
+
throw new BadDataException("Invalid API Key");
|
|
194
|
+
}
|
|
195
|
+
|
|
187
196
|
if (!tenantId) {
|
|
188
197
|
throw new BadDataException(
|
|
189
198
|
"ProjectID not found in the request header.",
|
|
@@ -173,6 +173,7 @@ export default class UserMiddleware {
|
|
|
173
173
|
oneuptimeRequest.userAuthorization = JSONWebToken.decode(accessToken);
|
|
174
174
|
} catch (err) {
|
|
175
175
|
// if the token is invalid or expired, it'll throw this error.
|
|
176
|
+
logger.error(err);
|
|
176
177
|
oneuptimeRequest.userType = UserType.Public;
|
|
177
178
|
return next();
|
|
178
179
|
}
|
|
@@ -125,20 +125,20 @@ export default class OTelIngestService {
|
|
|
125
125
|
|
|
126
126
|
const newDbMetric: Metric = Metric.fromJSON(
|
|
127
127
|
dbMetric.toJSON(),
|
|
128
|
-
Metric
|
|
128
|
+
Metric,
|
|
129
129
|
) as Metric;
|
|
130
130
|
|
|
131
131
|
if (datapoint["startTimeUnixNano"]) {
|
|
132
132
|
newDbMetric.startTimeUnixNano = datapoint["startTimeUnixNano"] as number;
|
|
133
133
|
newDbMetric.startTime = OneUptimeDate.fromUnixNano(
|
|
134
|
-
datapoint["startTimeUnixNano"] as number
|
|
134
|
+
datapoint["startTimeUnixNano"] as number,
|
|
135
135
|
);
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
if (datapoint["timeUnixNano"]) {
|
|
139
139
|
newDbMetric.timeUnixNano = datapoint["timeUnixNano"] as number;
|
|
140
140
|
newDbMetric.time = OneUptimeDate.fromUnixNano(
|
|
141
|
-
datapoint["timeUnixNano"] as number
|
|
141
|
+
datapoint["timeUnixNano"] as number,
|
|
142
142
|
);
|
|
143
143
|
}
|
|
144
144
|
|
|
@@ -271,7 +271,7 @@ export default class QueryHelper {
|
|
|
271
271
|
@CaptureSpan()
|
|
272
272
|
public static greaterThanEqualTo<T extends number | Date>(
|
|
273
273
|
value: T,
|
|
274
|
-
): FindWhereProperty<
|
|
274
|
+
): FindWhereProperty<any> {
|
|
275
275
|
const rid: string = Text.generateRandomText(10);
|
|
276
276
|
return Raw(
|
|
277
277
|
(alias: string) => {
|
|
@@ -280,13 +280,13 @@ export default class QueryHelper {
|
|
|
280
280
|
{
|
|
281
281
|
[rid]: value,
|
|
282
282
|
},
|
|
283
|
-
) as FindWhereProperty<
|
|
283
|
+
) as FindWhereProperty<any>;
|
|
284
284
|
}
|
|
285
285
|
|
|
286
286
|
@CaptureSpan()
|
|
287
287
|
public static greaterThanEqualToOrNull<T extends number | Date>(
|
|
288
288
|
value: T,
|
|
289
|
-
): FindWhereProperty<
|
|
289
|
+
): FindWhereProperty<any> {
|
|
290
290
|
const rid: string = Text.generateRandomText(10);
|
|
291
291
|
return Raw(
|
|
292
292
|
(alias: string) => {
|
|
@@ -295,13 +295,13 @@ export default class QueryHelper {
|
|
|
295
295
|
{
|
|
296
296
|
[rid]: value,
|
|
297
297
|
},
|
|
298
|
-
) as FindWhereProperty<
|
|
298
|
+
) as FindWhereProperty<any>;
|
|
299
299
|
}
|
|
300
300
|
|
|
301
301
|
@CaptureSpan()
|
|
302
302
|
public static lessThanEqualTo<T extends number | Date>(
|
|
303
303
|
value: T,
|
|
304
|
-
): FindWhereProperty<
|
|
304
|
+
): FindWhereProperty<any> {
|
|
305
305
|
const rid: string = Text.generateRandomText(10);
|
|
306
306
|
return Raw(
|
|
307
307
|
(alias: string) => {
|
|
@@ -310,13 +310,13 @@ export default class QueryHelper {
|
|
|
310
310
|
{
|
|
311
311
|
[rid]: value,
|
|
312
312
|
},
|
|
313
|
-
) as FindWhereProperty<
|
|
313
|
+
) as FindWhereProperty<any>;
|
|
314
314
|
}
|
|
315
315
|
|
|
316
316
|
@CaptureSpan()
|
|
317
317
|
public static lessThanOrNull<T extends number | Date>(
|
|
318
318
|
value: T,
|
|
319
|
-
): FindWhereProperty<
|
|
319
|
+
): FindWhereProperty<any> {
|
|
320
320
|
const rid: string = Text.generateRandomText(10);
|
|
321
321
|
return Raw(
|
|
322
322
|
(alias: string) => {
|
|
@@ -325,13 +325,13 @@ export default class QueryHelper {
|
|
|
325
325
|
{
|
|
326
326
|
[rid]: value,
|
|
327
327
|
},
|
|
328
|
-
) as FindWhereProperty<
|
|
328
|
+
) as FindWhereProperty<any>;
|
|
329
329
|
}
|
|
330
330
|
|
|
331
331
|
@CaptureSpan()
|
|
332
332
|
public static lessThanEqualToOrNull<T extends number | Date>(
|
|
333
333
|
value: T,
|
|
334
|
-
): FindWhereProperty<
|
|
334
|
+
): FindWhereProperty<any> {
|
|
335
335
|
const rid: string = Text.generateRandomText(10);
|
|
336
336
|
return Raw(
|
|
337
337
|
(alias: string) => {
|
|
@@ -340,13 +340,13 @@ export default class QueryHelper {
|
|
|
340
340
|
{
|
|
341
341
|
[rid]: value,
|
|
342
342
|
},
|
|
343
|
-
) as FindWhereProperty<
|
|
343
|
+
) as FindWhereProperty<any>;
|
|
344
344
|
}
|
|
345
345
|
|
|
346
346
|
@CaptureSpan()
|
|
347
347
|
public static greaterThan<T extends number | Date>(
|
|
348
348
|
value: T,
|
|
349
|
-
): FindWhereProperty<
|
|
349
|
+
): FindWhereProperty<any> {
|
|
350
350
|
const rid: string = Text.generateRandomText(10);
|
|
351
351
|
return Raw(
|
|
352
352
|
(alias: string) => {
|
|
@@ -355,13 +355,13 @@ export default class QueryHelper {
|
|
|
355
355
|
{
|
|
356
356
|
[rid]: value,
|
|
357
357
|
},
|
|
358
|
-
) as FindWhereProperty<
|
|
358
|
+
) as FindWhereProperty<any>;
|
|
359
359
|
}
|
|
360
360
|
|
|
361
361
|
@CaptureSpan()
|
|
362
362
|
public static greaterThanOrNull<T extends number | Date>(
|
|
363
363
|
value: T,
|
|
364
|
-
): FindWhereProperty<
|
|
364
|
+
): FindWhereProperty<any> {
|
|
365
365
|
const rid: string = Text.generateRandomText(10);
|
|
366
366
|
return Raw(
|
|
367
367
|
(alias: string) => {
|
|
@@ -370,14 +370,14 @@ export default class QueryHelper {
|
|
|
370
370
|
{
|
|
371
371
|
[rid]: value,
|
|
372
372
|
},
|
|
373
|
-
) as FindWhereProperty<
|
|
373
|
+
) as FindWhereProperty<any>;
|
|
374
374
|
}
|
|
375
375
|
|
|
376
376
|
@CaptureSpan()
|
|
377
377
|
public static inBetween<T extends number | Date>(
|
|
378
378
|
startValue: T,
|
|
379
379
|
endValue: T,
|
|
380
|
-
): FindWhereProperty<
|
|
380
|
+
): FindWhereProperty<any> {
|
|
381
381
|
const rid1: string = Text.generateRandomText(10);
|
|
382
382
|
const rid2: string = Text.generateRandomText(10);
|
|
383
383
|
return Raw(
|
|
@@ -388,14 +388,14 @@ export default class QueryHelper {
|
|
|
388
388
|
[rid1]: startValue,
|
|
389
389
|
[rid2]: endValue,
|
|
390
390
|
},
|
|
391
|
-
) as FindWhereProperty<
|
|
391
|
+
) as FindWhereProperty<any>;
|
|
392
392
|
}
|
|
393
393
|
|
|
394
394
|
@CaptureSpan()
|
|
395
395
|
public static inBetweenOrNull<T extends number | Date>(
|
|
396
396
|
startValue: T,
|
|
397
397
|
endValue: T,
|
|
398
|
-
): FindWhereProperty<
|
|
398
|
+
): FindWhereProperty<any> {
|
|
399
399
|
const rid1: string = Text.generateRandomText(10);
|
|
400
400
|
const rid2: string = Text.generateRandomText(10);
|
|
401
401
|
return Raw(
|
|
@@ -406,14 +406,14 @@ export default class QueryHelper {
|
|
|
406
406
|
[rid1]: startValue,
|
|
407
407
|
[rid2]: endValue,
|
|
408
408
|
},
|
|
409
|
-
) as FindWhereProperty<
|
|
409
|
+
) as FindWhereProperty<any>;
|
|
410
410
|
}
|
|
411
411
|
|
|
412
412
|
@CaptureSpan()
|
|
413
413
|
public static notInBetween<T extends number | Date>(
|
|
414
414
|
startValue: T,
|
|
415
415
|
endValue: T,
|
|
416
|
-
): FindWhereProperty<
|
|
416
|
+
): FindWhereProperty<any> {
|
|
417
417
|
const rid1: string = Text.generateRandomText(10);
|
|
418
418
|
const rid2: string = Text.generateRandomText(10);
|
|
419
419
|
return Raw(
|
|
@@ -424,7 +424,7 @@ export default class QueryHelper {
|
|
|
424
424
|
[rid1]: startValue,
|
|
425
425
|
[rid2]: endValue,
|
|
426
426
|
},
|
|
427
|
-
) as FindWhereProperty<
|
|
427
|
+
) as FindWhereProperty<any>;
|
|
428
428
|
}
|
|
429
429
|
|
|
430
430
|
@CaptureSpan()
|
|
@@ -481,7 +481,7 @@ export default class QueryHelper {
|
|
|
481
481
|
@CaptureSpan()
|
|
482
482
|
public static lessThan<T extends number | Date>(
|
|
483
483
|
value: T,
|
|
484
|
-
): FindWhereProperty<
|
|
484
|
+
): FindWhereProperty<any> {
|
|
485
485
|
const rid: string = Text.generateRandomText(10);
|
|
486
486
|
return Raw(
|
|
487
487
|
(alias: string) => {
|
|
@@ -490,6 +490,6 @@ export default class QueryHelper {
|
|
|
490
490
|
{
|
|
491
491
|
[rid]: value,
|
|
492
492
|
},
|
|
493
|
-
) as FindWhereProperty<
|
|
493
|
+
) as FindWhereProperty<any>;
|
|
494
494
|
}
|
|
495
495
|
}
|
|
@@ -2,6 +2,7 @@ import ComponentCode, { RunOptions, RunReturnType } from "../../ComponentCode";
|
|
|
2
2
|
import BadDataException from "../../../../../Types/Exception/BadDataException";
|
|
3
3
|
import { JSONObject } from "../../../../../Types/JSON";
|
|
4
4
|
import JSONFunctions from "../../../../../Types/JSONFunctions";
|
|
5
|
+
import logger from "../../../../Utils/Logger";
|
|
5
6
|
import ComponentMetadata, {
|
|
6
7
|
Port,
|
|
7
8
|
} from "../../../../../Types/Workflow/Component";
|
|
@@ -74,6 +75,7 @@ export default class JsonToText extends ComponentCode {
|
|
|
74
75
|
executePort: successPort,
|
|
75
76
|
});
|
|
76
77
|
} catch (err) {
|
|
78
|
+
logger.error(err);
|
|
77
79
|
options.log("JSON is not in the correct format.");
|
|
78
80
|
return Promise.resolve({
|
|
79
81
|
returnValues: {},
|
|
@@ -2,6 +2,7 @@ import ComponentCode, { RunOptions, RunReturnType } from "../../ComponentCode";
|
|
|
2
2
|
import BadDataException from "../../../../../Types/Exception/BadDataException";
|
|
3
3
|
import { JSONObject } from "../../../../../Types/JSON";
|
|
4
4
|
import JSONFunctions from "../../../../../Types/JSONFunctions";
|
|
5
|
+
import logger from "../../../../Utils/Logger";
|
|
5
6
|
import ComponentMetadata, {
|
|
6
7
|
Port,
|
|
7
8
|
} from "../../../../../Types/Workflow/Component";
|
|
@@ -72,6 +73,7 @@ export default class TextToJSON extends ComponentCode {
|
|
|
72
73
|
executePort: successPort,
|
|
73
74
|
});
|
|
74
75
|
} catch (err) {
|
|
76
|
+
logger.error(err);
|
|
75
77
|
options.log("text is not in the correct format.");
|
|
76
78
|
return Promise.resolve({
|
|
77
79
|
returnValues: {},
|
package/Server/Utils/CronTab.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import BadDataException from "../../Types/Exception/BadDataException";
|
|
2
2
|
import CronParser, { CronExpression } from "cron-parser";
|
|
3
|
+
import logger from "./Logger";
|
|
3
4
|
import CaptureSpan from "./Telemetry/CaptureSpan";
|
|
4
5
|
|
|
5
6
|
export default class CronTab {
|
|
@@ -10,6 +11,7 @@ export default class CronTab {
|
|
|
10
11
|
const nextExecutionTime: Date = interval.next().toDate();
|
|
11
12
|
return nextExecutionTime;
|
|
12
13
|
} catch (error) {
|
|
14
|
+
logger.error(error);
|
|
13
15
|
throw new BadDataException(`Invalid cron expression: ${crontab}`);
|
|
14
16
|
}
|
|
15
17
|
}
|
|
@@ -10,6 +10,7 @@ import Timezone from "../../Types/Timezone";
|
|
|
10
10
|
import StatusPagePrivateUser from "../../Models/DatabaseModels/StatusPagePrivateUser";
|
|
11
11
|
import User from "../../Models/DatabaseModels/User";
|
|
12
12
|
import jwt from "jsonwebtoken";
|
|
13
|
+
import logger from "./Logger";
|
|
13
14
|
import CaptureSpan from "./Telemetry/CaptureSpan";
|
|
14
15
|
|
|
15
16
|
class JSONWebToken {
|
|
@@ -119,6 +120,7 @@ class JSONWebToken {
|
|
|
119
120
|
isGlobalLogin: Boolean(decoded["isGlobalLogin"]),
|
|
120
121
|
};
|
|
121
122
|
} catch (e) {
|
|
123
|
+
logger.error(e);
|
|
122
124
|
throw new BadDataException("AccessToken is invalid or expired");
|
|
123
125
|
}
|
|
124
126
|
}
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
CriteriaFilter,
|
|
5
5
|
} from "../../../../Types/Monitor/CriteriaFilter";
|
|
6
6
|
import CustomCodeMonitorResponse from "../../../../Types/Monitor/CustomCodeMonitor/CustomCodeMonitorResponse";
|
|
7
|
+
import logger from "../../Logger";
|
|
7
8
|
import CaptureSpan from "../../Telemetry/CaptureSpan";
|
|
8
9
|
|
|
9
10
|
export default class CustomCodeMonitoringCriteria {
|
|
@@ -78,6 +79,7 @@ export default class CustomCodeMonitoringCriteria {
|
|
|
78
79
|
thresholdAsNumber = parseFloat(threshold.toString());
|
|
79
80
|
}
|
|
80
81
|
} catch (err) {
|
|
82
|
+
logger.error(err);
|
|
81
83
|
thresholdAsNumber = null;
|
|
82
84
|
}
|
|
83
85
|
|