@oneuptime/common 7.0.1982 → 7.0.1987

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.
@@ -2,7 +2,7 @@ enum ProductType {
2
2
  Logs = 'Logs',
3
3
  Traces = 'Traces',
4
4
  Metrics = 'Metrics',
5
- ActiveMonitoring = 'ActiveMonitoring',
5
+ ActiveMonitoring = 'Active Monitoring',
6
6
  }
7
7
 
8
8
  export default ProductType;
@@ -118,4 +118,36 @@ export class MonitorTypeHelper {
118
118
 
119
119
  return monitorTypeProps[0].title;
120
120
  }
121
+
122
+ public static isProbableMonitors(monitorType: MonitorType): boolean {
123
+ const isProbeableMonitor: boolean =
124
+ monitorType === MonitorType.API ||
125
+ monitorType === MonitorType.Website ||
126
+ monitorType === MonitorType.IP ||
127
+ monitorType === MonitorType.Ping ||
128
+ monitorType === MonitorType.Port ||
129
+ monitorType === MonitorType.SSLCertificate;
130
+ return isProbeableMonitor;
131
+ }
132
+
133
+ public static doesMonitorTypeHaveDocumentation(
134
+ monitorType: MonitorType
135
+ ): boolean {
136
+ return (
137
+ monitorType === MonitorType.IncomingRequest ||
138
+ monitorType === MonitorType.Server
139
+ );
140
+ }
141
+
142
+ public static doesMonitorTypeHaveInterval(
143
+ monitorType: MonitorType
144
+ ): boolean {
145
+ return this.isProbableMonitors(monitorType);
146
+ }
147
+
148
+ public static doesMonitorTypeHaveCriteria(
149
+ monitorType: MonitorType
150
+ ): boolean {
151
+ return monitorType !== MonitorType.Manual;
152
+ }
121
153
  }
@@ -4,7 +4,7 @@ enum WorkflowStatus {
4
4
  Success = 'Success',
5
5
  Error = 'Error',
6
6
  Timeout = 'Timeout',
7
- WorkflowCountExceeded = 'WorkflowCountExceeded',
7
+ WorkflowCountExceeded = 'Workflow Count Exceeded',
8
8
  }
9
9
 
10
10
  export default WorkflowStatus;
@@ -3,7 +3,7 @@ var ProductType;
3
3
  ProductType["Logs"] = "Logs";
4
4
  ProductType["Traces"] = "Traces";
5
5
  ProductType["Metrics"] = "Metrics";
6
- ProductType["ActiveMonitoring"] = "ActiveMonitoring";
6
+ ProductType["ActiveMonitoring"] = "Active Monitoring";
7
7
  })(ProductType || (ProductType = {}));
8
8
  export default ProductType;
9
9
  //# sourceMappingURL=ProductType.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ProductType.js","sourceRoot":"","sources":["../../../../Types/MeteredPlan/ProductType.ts"],"names":[],"mappings":"AAAA,IAAK,WAKJ;AALD,WAAK,WAAW;IACZ,4BAAa,CAAA;IACb,gCAAiB,CAAA;IACjB,kCAAmB,CAAA;IACnB,oDAAqC,CAAA;AACzC,CAAC,EALI,WAAW,KAAX,WAAW,QAKf;AAED,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"ProductType.js","sourceRoot":"","sources":["../../../../Types/MeteredPlan/ProductType.ts"],"names":[],"mappings":"AAAA,IAAK,WAKJ;AALD,WAAK,WAAW;IACZ,4BAAa,CAAA;IACb,gCAAiB,CAAA;IACjB,kCAAmB,CAAA;IACnB,qDAAsC,CAAA;AAC1C,CAAC,EALI,WAAW,KAAX,WAAW,QAKf;AAED,eAAe,WAAW,CAAC"}
@@ -88,5 +88,24 @@ export class MonitorTypeHelper {
88
88
  }
89
89
  return monitorTypeProps[0].title;
90
90
  }
91
+ static isProbableMonitors(monitorType) {
92
+ const isProbeableMonitor = monitorType === MonitorType.API ||
93
+ monitorType === MonitorType.Website ||
94
+ monitorType === MonitorType.IP ||
95
+ monitorType === MonitorType.Ping ||
96
+ monitorType === MonitorType.Port ||
97
+ monitorType === MonitorType.SSLCertificate;
98
+ return isProbeableMonitor;
99
+ }
100
+ static doesMonitorTypeHaveDocumentation(monitorType) {
101
+ return (monitorType === MonitorType.IncomingRequest ||
102
+ monitorType === MonitorType.Server);
103
+ }
104
+ static doesMonitorTypeHaveInterval(monitorType) {
105
+ return this.isProbableMonitors(monitorType);
106
+ }
107
+ static doesMonitorTypeHaveCriteria(monitorType) {
108
+ return monitorType !== MonitorType.Manual;
109
+ }
91
110
  }
92
111
  //# sourceMappingURL=MonitorType.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MonitorType.js","sourceRoot":"","sources":["../../../../Types/Monitor/MonitorType.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,+BAA+B,CAAC;AAE7D,IAAK,WAWJ;AAXD,WAAK,WAAW;IACZ,gCAAiB,CAAA;IACjB,kCAAmB,CAAA;IACnB,0BAAW,CAAA;IACX,4BAAa,CAAA;IACb,wCAAyB,CAAA;IACzB,wBAAS,CAAA;IACT,mDAAoC,CAAA;IACpC,4BAAa,CAAA;IACb,gCAAiB,CAAA;IACjB,iDAAkC,CAAA;AACtC,CAAC,EAXI,WAAW,KAAX,WAAW,QAWf;AAED,eAAe,WAAW,CAAC;AAQ3B,MAAM,OAAO,iBAAiB;IACnB,MAAM,CAAC,sBAAsB;QAChC,MAAM,gBAAgB,GAA4B;YAC9C;gBACI,WAAW,EAAE,WAAW,CAAC,GAAG;gBAC5B,KAAK,EAAE,KAAK;gBACZ,WAAW,EACP,8EAA8E;aACrF;YACD;gBACI,WAAW,EAAE,WAAW,CAAC,MAAM;gBAC/B,KAAK,EAAE,QAAQ;gBACf,WAAW,EACP,wKAAwK;aAC/K;YACD;gBACI,WAAW,EAAE,WAAW,CAAC,OAAO;gBAChC,KAAK,EAAE,SAAS;gBAChB,WAAW,EACP,iGAAiG;aACxG;YACD;gBACI,WAAW,EAAE,WAAW,CAAC,IAAI;gBAC7B,KAAK,EAAE,MAAM;gBACb,WAAW,EACP,6DAA6D;aACpE;YACD,IAAI;YACJ,2CAA2C;YAC3C,2BAA2B;YAC3B,mBAAmB;YACnB,sEAAsE;YACtE,KAAK;YACL;gBACI,WAAW,EAAE,WAAW,CAAC,EAAE;gBAC3B,KAAK,EAAE,IAAI;gBACX,WAAW,EACP,iEAAiE;aACxE;YACD;gBACI,WAAW,EAAE,WAAW,CAAC,eAAe;gBACxC,KAAK,EAAE,kBAAkB;gBACz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C9B,WAAW,KAAK,WAAW,CAAC,IAAI;YAChC,WAAW,KAAK,WAAW,CAAC,IAAI;YAChC,WAAW,KAAK,WAAW,CAAC,cAAc,CAAC;QAC/C,OAAO,kBAAkB,CAAC;IAC9B,CAAC;IAEM,MAAM,CAAC,gCAAgC,CAC1C,WAAwB;QAExB,OAAO,CACH,WAAW,KAAK,WAAW,CAAC,eAAe;YAC3C,WAAW,KAAK,WAAW,CAAC,MAAM,CACrC,CAAC;IACN,CAAC;IAEM,MAAM,CAAC,2BAA2B,CACrC,WAAwB;QAExB,OAAO,IAAI,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAAC;IAChD,CAAC;IAEM,MAAM,CAAC,2BAA2B,CACrC,WAAwB;QAExB,OAAO,WAAW,KAAK,WAAW,CAAC,MAAM,CAAC;IAC9C,CAAC;CACJ"}
@@ -5,7 +5,7 @@ var WorkflowStatus;
5
5
  WorkflowStatus["Success"] = "Success";
6
6
  WorkflowStatus["Error"] = "Error";
7
7
  WorkflowStatus["Timeout"] = "Timeout";
8
- WorkflowStatus["WorkflowCountExceeded"] = "WorkflowCountExceeded";
8
+ WorkflowStatus["WorkflowCountExceeded"] = "Workflow Count Exceeded";
9
9
  })(WorkflowStatus || (WorkflowStatus = {}));
10
10
  export default WorkflowStatus;
11
11
  //# sourceMappingURL=WorkflowStatus.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"WorkflowStatus.js","sourceRoot":"","sources":["../../../../Types/Workflow/WorkflowStatus.ts"],"names":[],"mappings":"AAAA,IAAK,cAOJ;AAPD,WAAK,cAAc;IACf,yCAAuB,CAAA;IACvB,qCAAmB,CAAA;IACnB,qCAAmB,CAAA;IACnB,iCAAe,CAAA;IACf,qCAAmB,CAAA;IACnB,iEAA+C,CAAA;AACnD,CAAC,EAPI,cAAc,KAAd,cAAc,QAOlB;AAED,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"WorkflowStatus.js","sourceRoot":"","sources":["../../../../Types/Workflow/WorkflowStatus.ts"],"names":[],"mappings":"AAAA,IAAK,cAOJ;AAPD,WAAK,cAAc;IACf,yCAAuB,CAAA;IACvB,qCAAmB,CAAA;IACnB,qCAAmB,CAAA;IACnB,iCAAe,CAAA;IACf,qCAAmB,CAAA;IACnB,mEAAiD,CAAA;AACrD,CAAC,EAPI,cAAc,KAAd,cAAc,QAOlB;AAED,eAAe,cAAc,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oneuptime/common",
3
- "version": "7.0.1982",
3
+ "version": "7.0.1987",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {