@oneuptime/common 14.0.96 → 14.0.98

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.
Files changed (271) hide show
  1. package/Models/AnalyticsModels/NetworkFlow.d.mts +4 -0
  2. package/Models/AnalyticsModels/NetworkFlow.d.ts +4 -0
  3. package/Models/AnalyticsModels/NetworkFlow.js +50 -0
  4. package/Models/DatabaseModels/Alert.d.mts +2 -0
  5. package/Models/DatabaseModels/Alert.d.ts +2 -0
  6. package/Models/DatabaseModels/Alert.js +63 -0
  7. package/Models/DatabaseModels/CodeRepository.d.mts +3 -0
  8. package/Models/DatabaseModels/CodeRepository.d.ts +3 -0
  9. package/Models/DatabaseModels/CodeRepository.js +104 -0
  10. package/Models/DatabaseModels/Incident.d.mts +2 -0
  11. package/Models/DatabaseModels/Incident.d.ts +2 -0
  12. package/Models/DatabaseModels/Incident.js +63 -0
  13. package/Models/DatabaseModels/Index.js +12 -0
  14. package/Models/DatabaseModels/NetworkAddressName.d.mts +14 -0
  15. package/Models/DatabaseModels/NetworkAddressName.d.ts +14 -0
  16. package/Models/DatabaseModels/NetworkAddressName.js +300 -0
  17. package/Models/DatabaseModels/NetworkAddressName.mjs +2 -0
  18. package/Models/DatabaseModels/NetworkDevice.d.mts +1 -0
  19. package/Models/DatabaseModels/NetworkDevice.d.ts +1 -0
  20. package/Models/DatabaseModels/NetworkDevice.js +38 -0
  21. package/Models/DatabaseModels/SecurityCase.d.mts +8 -0
  22. package/Models/DatabaseModels/SecurityCase.d.ts +8 -0
  23. package/Models/DatabaseModels/SecurityCase.js +145 -0
  24. package/Models/DatabaseModels/SecurityCaseEvidence.d.mts +32 -0
  25. package/Models/DatabaseModels/SecurityCaseEvidence.d.ts +32 -0
  26. package/Models/DatabaseModels/SecurityCaseEvidence.js +548 -0
  27. package/Models/DatabaseModels/SecurityCaseEvidence.mjs +2 -0
  28. package/Models/DatabaseModels/SecurityCaseFeed.d.mts +4 -1
  29. package/Models/DatabaseModels/SecurityCaseFeed.d.ts +4 -1
  30. package/Models/DatabaseModels/SecurityCaseFeed.js +6 -0
  31. package/Models/DatabaseModels/SecurityCasePriority.d.mts +2 -0
  32. package/Models/DatabaseModels/SecurityCasePriority.d.ts +2 -0
  33. package/Models/DatabaseModels/SecurityCasePriority.js +44 -0
  34. package/Models/DatabaseModels/SecurityCaseTask.d.mts +22 -0
  35. package/Models/DatabaseModels/SecurityCaseTask.d.ts +22 -0
  36. package/Models/DatabaseModels/SecurityCaseTask.js +467 -0
  37. package/Models/DatabaseModels/SecurityCaseTask.mjs +2 -0
  38. package/Models/DatabaseModels/SecurityHunt.d.mts +34 -0
  39. package/Models/DatabaseModels/SecurityHunt.d.ts +34 -0
  40. package/Models/DatabaseModels/SecurityHunt.js +608 -0
  41. package/Models/DatabaseModels/SecurityHunt.mjs +2 -0
  42. package/Models/DatabaseModels/SecurityWatchlist.d.mts +22 -0
  43. package/Models/DatabaseModels/SecurityWatchlist.d.ts +22 -0
  44. package/Models/DatabaseModels/SecurityWatchlist.js +411 -0
  45. package/Models/DatabaseModels/SecurityWatchlist.mjs +2 -0
  46. package/Models/DatabaseModels/SecurityWatchlistItem.d.mts +17 -0
  47. package/Models/DatabaseModels/SecurityWatchlistItem.d.ts +17 -0
  48. package/Models/DatabaseModels/SecurityWatchlistItem.js +321 -0
  49. package/Models/DatabaseModels/SecurityWatchlistItem.mjs +2 -0
  50. package/Types/AI/AIChatTypes.d.mts +1 -0
  51. package/Types/AI/AIChatTypes.d.ts +1 -0
  52. package/Types/AI/AIRunEventType.d.mts +1 -0
  53. package/Types/AI/AIRunEventType.d.ts +1 -0
  54. package/Types/AI/AIRunEventType.js +8 -0
  55. package/Types/AI/AiAffectedResources.d.mts +2 -1
  56. package/Types/AI/AiAffectedResources.d.ts +2 -1
  57. package/Types/AI/AiAffectedResources.js +12 -1
  58. package/Types/AI/AiTokenCount.d.mts +22 -1
  59. package/Types/AI/AiTokenCount.d.ts +22 -1
  60. package/Types/AI/AiTokenCount.js +126 -57
  61. package/Types/AI/AiTokenCount.mjs +2 -0
  62. package/Types/AI/CodeFixTaskContext.d.mts +1 -0
  63. package/Types/AI/CodeFixTaskContext.d.ts +1 -0
  64. package/Types/AffectedResources/AffectedResourceSearch.d.mts +53 -0
  65. package/Types/AffectedResources/AffectedResourceSearch.d.ts +53 -0
  66. package/Types/AffectedResources/AffectedResourceSearch.js +224 -0
  67. package/Types/AffectedResources/AffectedResourceSearch.mjs +11 -0
  68. package/Types/ArchivableValue/ArchivableValueUsage.d.mts +21 -2
  69. package/Types/ArchivableValue/ArchivableValueUsage.d.ts +21 -2
  70. package/Types/ArchivableValue/ArchivableValueUsage.js +91 -12
  71. package/Types/ArchivableValue/ArchivableValueUsage.mjs +1 -0
  72. package/Types/CodeRepository/CodeRepositorySetting.d.mts +1 -0
  73. package/Types/CodeRepository/CodeRepositorySetting.d.ts +1 -0
  74. package/Types/CodeRepository/CodeRepositorySetting.js +2 -0
  75. package/Types/Color.d.mts +0 -2
  76. package/Types/Color.d.ts +0 -2
  77. package/Types/Color.js +0 -14
  78. package/Types/Database/DatabaseProperty.d.mts +0 -2
  79. package/Types/Database/DatabaseProperty.d.ts +0 -2
  80. package/Types/Database/DatabaseProperty.js +0 -3
  81. package/Types/Date.d.mts +0 -2
  82. package/Types/Date.d.ts +0 -2
  83. package/Types/Date.js +0 -23
  84. package/Types/Domain.d.mts +0 -2
  85. package/Types/Domain.d.ts +0 -2
  86. package/Types/Domain.js +0 -14
  87. package/Types/Email/EmailTemplateType.d.mts +3 -0
  88. package/Types/Email/EmailTemplateType.d.ts +3 -0
  89. package/Types/Email/EmailTemplateType.js +4 -0
  90. package/Types/Email.d.mts +0 -2
  91. package/Types/Email.d.ts +0 -2
  92. package/Types/Email.js +0 -15
  93. package/Types/IP/IP.d.mts +0 -2
  94. package/Types/IP/IP.d.ts +0 -2
  95. package/Types/IP/IP.js +0 -14
  96. package/Types/Link.d.mts +1 -0
  97. package/Types/Link.d.ts +1 -0
  98. package/Types/Monitor/CriteriaAlert.d.mts +0 -2
  99. package/Types/Monitor/CriteriaAlert.d.ts +0 -2
  100. package/Types/Monitor/CriteriaAlert.js +0 -18
  101. package/Types/Monitor/CriteriaAlert.mjs +1 -2
  102. package/Types/Monitor/CriteriaFilter.d.mts +0 -2
  103. package/Types/Monitor/CriteriaFilter.d.ts +0 -2
  104. package/Types/Monitor/CriteriaFilter.js +1 -42
  105. package/Types/Monitor/CriteriaFilter.mjs +0 -1
  106. package/Types/Monitor/CriteriaIncident.d.mts +0 -2
  107. package/Types/Monitor/CriteriaIncident.d.ts +0 -2
  108. package/Types/Monitor/CriteriaIncident.js +0 -23
  109. package/Types/Monitor/CriteriaIncident.mjs +1 -2
  110. package/Types/Monitor/IncomingMonitor/IncidentGroupingConfig.d.mts +0 -2
  111. package/Types/Monitor/IncomingMonitor/IncidentGroupingConfig.d.ts +0 -2
  112. package/Types/Monitor/IncomingMonitor/IncidentGroupingConfig.js +0 -11
  113. package/Types/Monitor/IncomingMonitor/IncidentGroupingConfig.mjs +1 -2
  114. package/Types/Monitor/MonitorCriteria.d.mts +0 -2
  115. package/Types/Monitor/MonitorCriteria.d.ts +0 -2
  116. package/Types/Monitor/MonitorCriteria.js +0 -21
  117. package/Types/Monitor/MonitorCriteriaInstance.d.mts +0 -2
  118. package/Types/Monitor/MonitorCriteriaInstance.d.ts +0 -2
  119. package/Types/Monitor/MonitorCriteriaInstance.js +0 -54
  120. package/Types/Monitor/MonitorStep.d.mts +0 -2
  121. package/Types/Monitor/MonitorStep.d.ts +0 -2
  122. package/Types/Monitor/MonitorStep.js +0 -80
  123. package/Types/Monitor/MonitorSteps.d.mts +0 -2
  124. package/Types/Monitor/MonitorSteps.d.ts +0 -2
  125. package/Types/Monitor/MonitorSteps.js +0 -31
  126. package/Types/Name.d.mts +0 -2
  127. package/Types/Name.d.ts +0 -2
  128. package/Types/Name.js +0 -14
  129. package/Types/NetFlow/NetworkAddressName.d.mts +30 -0
  130. package/Types/NetFlow/NetworkAddressName.d.ts +30 -0
  131. package/Types/NetFlow/NetworkAddressName.js +149 -0
  132. package/Types/NetFlow/NetworkAddressName.mjs +6 -0
  133. package/Types/NetFlow/NetworkTraffic.d.mts +20 -0
  134. package/Types/NetFlow/NetworkTraffic.d.ts +20 -0
  135. package/Types/NetFlow/NetworkTraffic.js +5 -1
  136. package/Types/NetFlow/NetworkTraffic.mjs +2 -0
  137. package/Types/NetworkController/NetworkControllerReadSummary.d.mts +2 -0
  138. package/Types/NetworkController/NetworkControllerReadSummary.d.ts +2 -0
  139. package/Types/NetworkController/NetworkControllerReadSummary.js +7 -1
  140. package/Types/NetworkDevice/NetworkDeviceDiscoveredDetails.d.mts +47 -1
  141. package/Types/NetworkDevice/NetworkDeviceDiscoveredDetails.d.ts +47 -1
  142. package/Types/NetworkDevice/NetworkDeviceDiscoveredDetails.js +173 -8
  143. package/Types/NetworkDevice/NetworkDeviceDiscoveredDetails.mjs +7 -0
  144. package/Types/NotificationSetting/NotificationEmailRollupCategory.d.mts +1 -0
  145. package/Types/NotificationSetting/NotificationEmailRollupCategory.d.ts +1 -0
  146. package/Types/NotificationSetting/NotificationEmailRollupCategory.js +12 -0
  147. package/Types/NotificationSetting/NotificationEmailRollupPolicy.js +6 -0
  148. package/Types/NotificationSetting/NotificationSettingEventType.d.mts +3 -0
  149. package/Types/NotificationSetting/NotificationSettingEventType.d.ts +3 -0
  150. package/Types/NotificationSetting/NotificationSettingEventType.js +15 -0
  151. package/Types/ObjectID.d.mts +0 -1
  152. package/Types/ObjectID.d.ts +0 -1
  153. package/Types/ObjectID.js +0 -9
  154. package/Types/OnCallDutyPolicy/OnCallDutyPolicyRunEnding.d.mts +4 -0
  155. package/Types/OnCallDutyPolicy/OnCallDutyPolicyRunEnding.d.ts +4 -0
  156. package/Types/OnCallDutyPolicy/OnCallDutyPolicyRunEnding.js +25 -1
  157. package/Types/OnCallDutyPolicy/OnCallDutyPolicyRunEnding.mjs +4 -0
  158. package/Types/OnCallDutyPolicy/OnCallEmptyLevel.d.mts +15 -0
  159. package/Types/OnCallDutyPolicy/OnCallEmptyLevel.d.ts +15 -0
  160. package/Types/OnCallDutyPolicy/OnCallEmptyLevel.js +118 -0
  161. package/Types/OnCallDutyPolicy/OnCallEmptyLevel.mjs +9 -0
  162. package/Types/Permission.d.mts +8 -0
  163. package/Types/Permission.d.ts +8 -0
  164. package/Types/Permission.js +87 -3
  165. package/Types/Phone.d.mts +0 -2
  166. package/Types/Phone.d.ts +0 -2
  167. package/Types/Phone.js +0 -14
  168. package/Types/Port.d.mts +0 -2
  169. package/Types/Port.d.ts +0 -2
  170. package/Types/Port.js +0 -14
  171. package/Types/ProviderLogo/ProviderLogo.d.mts +8 -1
  172. package/Types/ProviderLogo/ProviderLogo.d.ts +8 -1
  173. package/Types/ProviderLogo/ProviderLogo.js +14 -0
  174. package/Types/SecurityCase/SecurityCaseEventEvidence.d.mts +67 -0
  175. package/Types/SecurityCase/SecurityCaseEventEvidence.d.ts +67 -0
  176. package/Types/SecurityCase/SecurityCaseEventEvidence.js +271 -0
  177. package/Types/SecurityCase/SecurityCaseEventEvidence.mjs +13 -0
  178. package/Types/SecurityCase/SecurityCaseEvidenceKind.d.mts +8 -0
  179. package/Types/SecurityCase/SecurityCaseEvidenceKind.d.ts +8 -0
  180. package/Types/SecurityCase/SecurityCaseEvidenceKind.js +34 -0
  181. package/Types/SecurityCase/SecurityCaseEvidenceKind.mjs +4 -0
  182. package/Types/SecurityEvent/SecurityHunt.d.mts +122 -0
  183. package/Types/SecurityEvent/SecurityHunt.d.ts +122 -0
  184. package/Types/SecurityEvent/SecurityHunt.js +391 -0
  185. package/Types/SecurityEvent/SecurityHunt.mjs +32 -0
  186. package/Types/SecurityEvent/SecurityWatchlist.d.mts +167 -0
  187. package/Types/SecurityEvent/SecurityWatchlist.d.ts +167 -0
  188. package/Types/SecurityEvent/SecurityWatchlist.js +648 -0
  189. package/Types/SecurityEvent/SecurityWatchlist.mjs +51 -0
  190. package/Types/SecurityEvent/SigmaRule.d.mts +2 -0
  191. package/Types/SecurityEvent/SigmaRule.d.ts +2 -0
  192. package/Types/SecurityEvent/SigmaRule.js +5 -0
  193. package/Types/Telemetry/OpenTelemetryGuides.js +177 -5
  194. package/Types/Version.d.mts +0 -2
  195. package/Types/Version.d.ts +0 -2
  196. package/Types/Version.js +0 -14
  197. package/Types/Workflow/AffectedResourcesSetting.d.mts +13 -0
  198. package/Types/Workflow/AffectedResourcesSetting.d.ts +13 -0
  199. package/Types/Workflow/AffectedResourcesSetting.js +120 -0
  200. package/Types/Workflow/AffectedResourcesSetting.mjs +8 -0
  201. package/Types/Workflow/Components/BaseModel.js +15 -3
  202. package/Types/Workflow/Documentation/DatabaseDocumentation.js +36 -0
  203. package/Types/Workflow/RunRecord.d.mts +3 -14
  204. package/Types/Workflow/RunRecord.d.ts +3 -14
  205. package/Types/Workflow/RunRecord.js +10 -51
  206. package/Utils/AI/InvestigationLogStall.d.mts +38 -0
  207. package/Utils/AI/InvestigationLogStall.d.ts +38 -0
  208. package/Utils/AI/InvestigationLogStall.js +163 -0
  209. package/Utils/AI/InvestigationLogStall.mjs +11 -0
  210. package/Utils/Inventory/AssetFactSource.d.mts +6 -2
  211. package/Utils/Inventory/AssetFactSource.d.ts +6 -2
  212. package/Utils/Inventory/AssetFactSource.js +18 -1
  213. package/Utils/Inventory/AssetFactSource.mjs +1 -0
  214. package/Utils/Markdown/FeedLead.d.mts +10 -0
  215. package/Utils/Markdown/FeedLead.d.ts +10 -0
  216. package/Utils/Markdown/FeedLead.js +198 -0
  217. package/Utils/Markdown/FeedLead.mjs +8 -0
  218. package/Utils/NetworkDevice/NetworkDeviceAssetFacts.d.mts +9 -1
  219. package/Utils/NetworkDevice/NetworkDeviceAssetFacts.d.ts +9 -1
  220. package/Utils/NetworkDevice/NetworkDeviceAssetFacts.js +139 -18
  221. package/Utils/NetworkDevice/NetworkDeviceAssetFacts.mjs +1 -0
  222. package/Utils/NetworkDevice/NetworkDeviceRefresh.d.mts +88 -0
  223. package/Utils/NetworkDevice/NetworkDeviceRefresh.d.ts +88 -0
  224. package/Utils/NetworkDevice/NetworkDeviceRefresh.js +232 -0
  225. package/Utils/NetworkDevice/NetworkDeviceRefresh.mjs +16 -0
  226. package/Utils/NetworkTraffic/NetworkAddressBlock.d.mts +20 -0
  227. package/Utils/NetworkTraffic/NetworkAddressBlock.d.ts +20 -0
  228. package/Utils/NetworkTraffic/NetworkAddressBlock.js +264 -0
  229. package/Utils/NetworkTraffic/NetworkAddressBlock.mjs +3 -0
  230. package/Utils/Project/RecordNumber.d.mts +43 -0
  231. package/Utils/Project/RecordNumber.d.ts +43 -0
  232. package/Utils/Project/RecordNumber.js +151 -0
  233. package/Utils/Project/RecordNumber.mjs +6 -0
  234. package/Utils/Schema/MonitorSchemas.d.mts +9 -0
  235. package/Utils/Schema/MonitorSchemas.d.ts +9 -0
  236. package/Utils/Schema/MonitorSchemas.js +291 -0
  237. package/Utils/Schema/MonitorSchemas.mjs +9 -0
  238. package/Utils/Schema/TypeSchemas.d.mts +12 -0
  239. package/Utils/Schema/TypeSchemas.d.ts +12 -0
  240. package/Utils/Schema/TypeSchemas.js +176 -0
  241. package/Utils/Schema/TypeSchemas.mjs +11 -0
  242. package/Utils/Schema/Zod.js +17 -17
  243. package/Utils/SecurityCase/SecurityCaseMarkdown.d.mts +43 -0
  244. package/Utils/SecurityCase/SecurityCaseMarkdown.d.ts +43 -0
  245. package/Utils/SecurityCase/SecurityCaseMarkdown.js +89 -0
  246. package/Utils/SecurityCase/SecurityCaseMarkdown.mjs +11 -0
  247. package/Utils/SecurityCase/SecurityCasePriorities.d.mts +2 -0
  248. package/Utils/SecurityCase/SecurityCasePriorities.d.ts +2 -0
  249. package/Utils/SecurityCase/SecurityCasePriorities.js +15 -1
  250. package/Utils/SecurityCase/SecurityCaseTargets.d.mts +128 -0
  251. package/Utils/SecurityCase/SecurityCaseTargets.d.ts +128 -0
  252. package/Utils/SecurityCase/SecurityCaseTargets.js +482 -0
  253. package/Utils/SecurityCase/SecurityCaseTargets.mjs +28 -0
  254. package/Utils/SecurityEvent/SecurityEventSearch.d.mts +56 -0
  255. package/Utils/SecurityEvent/SecurityEventSearch.d.ts +56 -0
  256. package/Utils/SecurityEvent/SecurityEventSearch.js +422 -0
  257. package/Utils/SecurityEvent/SecurityEventSearch.mjs +21 -0
  258. package/Utils/SecurityEvent/SecurityHuntSearch.d.mts +12 -0
  259. package/Utils/SecurityEvent/SecurityHuntSearch.d.ts +12 -0
  260. package/Utils/SecurityEvent/SecurityHuntSearch.js +51 -0
  261. package/Utils/SecurityEvent/SecurityHuntSearch.mjs +3 -0
  262. package/Utils/SecurityEvent/Sigma/SigmaRuleParser.js +22 -0
  263. package/Utils/SecurityEvent/Sigma/SigmaWatchlists.d.mts +24 -0
  264. package/Utils/SecurityEvent/Sigma/SigmaWatchlists.d.ts +24 -0
  265. package/Utils/SecurityEvent/Sigma/SigmaWatchlists.js +183 -0
  266. package/Utils/SecurityEvent/Sigma/SigmaWatchlists.mjs +9 -0
  267. package/Utils/Suggestions/TracePerformanceFixSuggestion.d.mts +9 -0
  268. package/Utils/Suggestions/TracePerformanceFixSuggestion.d.ts +9 -0
  269. package/Utils/Suggestions/TracePerformanceFixSuggestion.js +69 -1
  270. package/Utils/Suggestions/TracePerformanceFixSuggestion.mjs +4 -0
  271. package/package.json +1 -1
@@ -1,4 +1,5 @@
1
1
  import BaseModel from "../../Models/DatabaseModels/DatabaseBaseModel/DatabaseBaseModel.mjs";
2
+ import { NUMBER_WITH_PREFIX_SUFFIX, RecordNumberColumns, getRecordNumberColumns } from "../../Utils/Project/RecordNumber.mjs";
2
3
  import { JSONObject } from "../JSON.mjs";
3
4
  import ComponentMetadata, { Argument } from "./Component.mjs";
4
5
  export declare const RUN_RECORD_ARGUMENT_ID: string;
@@ -6,7 +7,8 @@ export declare const RUN_RECORD_SEARCH_LIMIT: number;
6
7
  export declare const RUN_RECORD_SEARCH_MAX_LENGTH: number;
7
8
  export declare const RUN_RECORD_SEARCH_MAX_WORDS: number;
8
9
  export declare const MAX_RUN_RECORD_NUMBER: number;
9
- export declare const NUMBER_WITH_PREFIX_SUFFIX: string;
10
+ export { NUMBER_WITH_PREFIX_SUFFIX, getRecordNumberColumns };
11
+ export type { RecordNumberColumns };
10
12
  export declare enum RunRecordReferenceKind {
11
13
  Empty = "Empty",
12
14
  Id = "Id",
@@ -39,17 +41,6 @@ type IsRunRecordNumberMatchFunction = (data: {
39
41
  * old one, as its page shows it.
40
42
  */
41
43
  export declare const isRunRecordNumberMatch: IsRunRecordNumberMatchFunction;
42
- export interface RecordNumberColumns {
43
- numberColumn: string;
44
- numberWithPrefixColumn: string;
45
- }
46
- type GetRecordNumberColumnsFunction = (model: BaseModel) => RecordNumberColumns | null;
47
- /**
48
- * The columns that hold a record's number, or null for a model whose records
49
- * have none: a numeric column with a "<column>WithPrefix" text column beside
50
- * it.
51
- */
52
- export declare const getRecordNumberColumns: GetRecordNumberColumnsFunction;
53
44
  export interface RunRecordColumns {
54
45
  number: RecordNumberColumns | null;
55
46
  nameColumn: string | null;
@@ -85,7 +76,6 @@ type FormatRunRecordNumberFunction = (data: {
85
76
  number: unknown;
86
77
  numberWithPrefix: unknown;
87
78
  }) => string | undefined;
88
- /** "INC-8" as stored, else "#8", else nothing. */
89
79
  export declare const formatRunRecordNumber: FormatRunRecordNumberFunction;
90
80
  type GetRunRecordSearchWordsFunction = (text: string) => Array<string>;
91
81
  /**
@@ -154,4 +144,3 @@ export declare const withRunRecordEvent: WithRunRecordEventFunction;
154
144
  type IsRunRecordIdFunction = (value: unknown) => boolean;
155
145
  /** Whether a value is a record's ID as it is sent to the run: a UUID. */
156
146
  export declare const isRunRecordId: IsRunRecordIdFunction;
157
- export {};
@@ -1,4 +1,5 @@
1
1
  import BaseModel from "../../Models/DatabaseModels/DatabaseBaseModel/DatabaseBaseModel";
2
+ import { NUMBER_WITH_PREFIX_SUFFIX, RecordNumberColumns, getRecordNumberColumns } from "../../Utils/Project/RecordNumber";
2
3
  import { JSONObject } from "../JSON";
3
4
  import ComponentMetadata, { Argument } from "./Component";
4
5
  export declare const RUN_RECORD_ARGUMENT_ID: string;
@@ -6,7 +7,8 @@ export declare const RUN_RECORD_SEARCH_LIMIT: number;
6
7
  export declare const RUN_RECORD_SEARCH_MAX_LENGTH: number;
7
8
  export declare const RUN_RECORD_SEARCH_MAX_WORDS: number;
8
9
  export declare const MAX_RUN_RECORD_NUMBER: number;
9
- export declare const NUMBER_WITH_PREFIX_SUFFIX: string;
10
+ export { NUMBER_WITH_PREFIX_SUFFIX, getRecordNumberColumns };
11
+ export type { RecordNumberColumns };
10
12
  export declare enum RunRecordReferenceKind {
11
13
  Empty = "Empty",
12
14
  Id = "Id",
@@ -39,17 +41,6 @@ type IsRunRecordNumberMatchFunction = (data: {
39
41
  * old one, as its page shows it.
40
42
  */
41
43
  export declare const isRunRecordNumberMatch: IsRunRecordNumberMatchFunction;
42
- export interface RecordNumberColumns {
43
- numberColumn: string;
44
- numberWithPrefixColumn: string;
45
- }
46
- type GetRecordNumberColumnsFunction = (model: BaseModel) => RecordNumberColumns | null;
47
- /**
48
- * The columns that hold a record's number, or null for a model whose records
49
- * have none: a numeric column with a "<column>WithPrefix" text column beside
50
- * it.
51
- */
52
- export declare const getRecordNumberColumns: GetRecordNumberColumnsFunction;
53
44
  export interface RunRecordColumns {
54
45
  number: RecordNumberColumns | null;
55
46
  nameColumn: string | null;
@@ -85,7 +76,6 @@ type FormatRunRecordNumberFunction = (data: {
85
76
  number: unknown;
86
77
  numberWithPrefix: unknown;
87
78
  }) => string | undefined;
88
- /** "INC-8" as stored, else "#8", else nothing. */
89
79
  export declare const formatRunRecordNumber: FormatRunRecordNumberFunction;
90
80
  type GetRunRecordSearchWordsFunction = (text: string) => Array<string>;
91
81
  /**
@@ -154,4 +144,3 @@ export declare const withRunRecordEvent: WithRunRecordEventFunction;
154
144
  type IsRunRecordIdFunction = (value: unknown) => boolean;
155
145
  /** Whether a value is a record's ID as it is sent to the run: a UUID. */
156
146
  export declare const isRunRecordId: IsRunRecordIdFunction;
157
- export {};
@@ -30,9 +30,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
30
30
  return (mod && mod.__esModule) ? mod : { "default": mod };
31
31
  };
32
32
  Object.defineProperty(exports, "__esModule", { value: true });
33
- exports.isRunRecordId = exports.withRunRecordEvent = exports.getRunRecordEvent = exports.getRunRecordTriggerInfo = exports.RunRecordEvent = exports.RunRecordMessages = exports.nameInSentence = exports.getRunRecordArgument = exports.readRunRecordText = exports.RUN_RECORD_NAME_MAX_LENGTH = exports.getRunRecordSearchWords = exports.formatRunRecordNumber = exports.parseRunRecordSearchResponse = exports.RunRecordMatch = exports.getRunRecordColumns = exports.getRecordNumberColumns = exports.isRunRecordNumberMatch = exports.parseRunRecordReference = exports.RunRecordReferenceKind = exports.NUMBER_WITH_PREFIX_SUFFIX = exports.MAX_RUN_RECORD_NUMBER = exports.RUN_RECORD_SEARCH_MAX_WORDS = exports.RUN_RECORD_SEARCH_MAX_LENGTH = exports.RUN_RECORD_SEARCH_LIMIT = exports.RUN_RECORD_ARGUMENT_ID = void 0;
34
- const TableColumn_1 = require("../Database/TableColumn");
35
- const TableColumnType_1 = __importDefault(require("../Database/TableColumnType"));
33
+ exports.isRunRecordId = exports.withRunRecordEvent = exports.getRunRecordEvent = exports.getRunRecordTriggerInfo = exports.RunRecordEvent = exports.RunRecordMessages = exports.nameInSentence = exports.getRunRecordArgument = exports.readRunRecordText = exports.RUN_RECORD_NAME_MAX_LENGTH = exports.getRunRecordSearchWords = exports.formatRunRecordNumber = exports.parseRunRecordSearchResponse = exports.RunRecordMatch = exports.getRunRecordColumns = exports.isRunRecordNumberMatch = exports.parseRunRecordReference = exports.RunRecordReferenceKind = exports.getRecordNumberColumns = exports.NUMBER_WITH_PREFIX_SUFFIX = exports.MAX_RUN_RECORD_NUMBER = exports.RUN_RECORD_SEARCH_MAX_WORDS = exports.RUN_RECORD_SEARCH_MAX_LENGTH = exports.RUN_RECORD_SEARCH_LIMIT = exports.RUN_RECORD_ARGUMENT_ID = void 0;
34
+ const RecordNumber_1 = require("../../Utils/Project/RecordNumber");
35
+ Object.defineProperty(exports, "NUMBER_WITH_PREFIX_SUFFIX", { enumerable: true, get: function () { return RecordNumber_1.NUMBER_WITH_PREFIX_SUFFIX; } });
36
+ Object.defineProperty(exports, "getRecordNumberColumns", { enumerable: true, get: function () { return RecordNumber_1.getRecordNumberColumns; } });
36
37
  const ObjectID_1 = __importDefault(require("../ObjectID"));
37
38
  const Component_1 = require("./Component");
38
39
  const CreateOrUpdateTrigger_1 = require("./CreateOrUpdateTrigger");
@@ -52,20 +53,6 @@ exports.RUN_RECORD_SEARCH_MAX_WORDS = 12;
52
53
  * record that does not exist.
53
54
  */
54
55
  exports.MAX_RUN_RECORD_NUMBER = 2147483647;
55
- // The suffix that names the column holding a record's number with its prefix.
56
- exports.NUMBER_WITH_PREFIX_SUFFIX = "WithPrefix";
57
- const NUMERIC_COLUMN_TYPES = [
58
- TableColumnType_1.default.Number,
59
- TableColumnType_1.default.SmallNumber,
60
- TableColumnType_1.default.BigNumber,
61
- TableColumnType_1.default.PositiveNumber,
62
- TableColumnType_1.default.SmallPositiveNumber,
63
- TableColumnType_1.default.BigPositiveNumber,
64
- ];
65
- const TEXT_COLUMN_TYPES = [
66
- TableColumnType_1.default.ShortText,
67
- TableColumnType_1.default.LongText,
68
- ];
69
56
  var RunRecordReferenceKind;
70
57
  (function (RunRecordReferenceKind) {
71
58
  // Nothing typed: the newest records are listed.
@@ -144,36 +131,12 @@ const isRunRecordNumberMatch = (data) => {
144
131
  normalizeReference(data.reference.text));
145
132
  };
146
133
  exports.isRunRecordNumberMatch = isRunRecordNumberMatch;
147
- /**
148
- * The columns that hold a record's number, or null for a model whose records
149
- * have none: a numeric column with a "<column>WithPrefix" text column beside
150
- * it.
151
- */
152
- const getRecordNumberColumns = (model) => {
153
- const columns = (0, TableColumn_1.getTableColumns)(model);
154
- for (const columnId of Object.keys(columns)) {
155
- const column = columns[columnId];
156
- if (!column || !NUMERIC_COLUMN_TYPES.includes(column.type)) {
157
- continue;
158
- }
159
- const withPrefixId = `${columnId}${exports.NUMBER_WITH_PREFIX_SUFFIX}`;
160
- const withPrefix = columns[withPrefixId];
161
- if (withPrefix && TEXT_COLUMN_TYPES.includes(withPrefix.type)) {
162
- return {
163
- numberColumn: columnId,
164
- numberWithPrefixColumn: withPrefixId,
165
- };
166
- }
167
- }
168
- return null;
169
- };
170
- exports.getRecordNumberColumns = getRecordNumberColumns;
171
134
  /** Where a record of this model is looked up: its number and its name. */
172
135
  const getRunRecordColumns = (model) => {
173
136
  const display = (0, ModelExamples_1.getDisplayColumn)(model);
174
137
  const hasName = display.id !== ModelExamples_1.ID_COLUMN_ID;
175
138
  return {
176
- number: (0, exports.getRecordNumberColumns)(model),
139
+ number: (0, RecordNumber_1.getRecordNumberColumns)(model),
177
140
  nameColumn: hasName ? display.id : null,
178
141
  nameTitle: hasName ? display.title : null,
179
142
  };
@@ -229,16 +192,12 @@ const parseRunRecordSearchResponse = (data) => {
229
192
  return options;
230
193
  };
231
194
  exports.parseRunRecordSearchResponse = parseRunRecordSearchResponse;
232
- /** "INC-8" as stored, else "#8", else nothing. */
195
+ /*
196
+ * "INC-8" as stored, else "#8", else nothing: a record's number as every
197
+ * page shows it (RecordNumber's formatRecordNumber).
198
+ */
233
199
  const formatRunRecordNumber = (data) => {
234
- if (typeof data.numberWithPrefix === "string" &&
235
- data.numberWithPrefix.trim() !== "") {
236
- return data.numberWithPrefix.trim();
237
- }
238
- if (typeof data.number === "number" && Number.isFinite(data.number)) {
239
- return `#${data.number}`;
240
- }
241
- return undefined;
200
+ return (0, RecordNumber_1.formatRecordNumber)(data);
242
201
  };
243
202
  exports.formatRunRecordNumber = formatRunRecordNumber;
244
203
  /**
@@ -0,0 +1,38 @@
1
+ import { JSONObject } from "../../Types/JSON.mjs";
2
+ export declare enum InvestigationLogStallReason {
3
+ NoLogs = "NoLogs",
4
+ NoMatchingLogs = "NoMatchingLogs"
5
+ }
6
+ export declare const INVESTIGATION_LOG_TOOL_NAMES: ReadonlyArray<string>;
7
+ export declare const INVESTIGATION_LOG_WINDOW_MINUTES_BEFORE: number;
8
+ export interface InvestigationLogStall {
9
+ reason: InvestigationLogStallReason;
10
+ logSearchCount: number;
11
+ windowStart: string;
12
+ windowEnd: string;
13
+ }
14
+ export interface InvestigationLogCitation {
15
+ toolName: string;
16
+ rowCount: number;
17
+ }
18
+ export interface InvestigationLogSearches {
19
+ searchCount: number;
20
+ searchesWithLines: number;
21
+ }
22
+ export declare function isInvestigationLogTool(toolName: string): boolean;
23
+ export declare function getInvestigationLogSearches(citations: ReadonlyArray<InvestigationLogCitation>): InvestigationLogSearches;
24
+ export declare function decideInvestigationLogStall(input: {
25
+ isInconclusive: boolean;
26
+ searches: InvestigationLogSearches;
27
+ hasLogs: boolean | null;
28
+ }): InvestigationLogStallReason | null;
29
+ export declare function getInvestigationLogWindow(data: {
30
+ subjectStartedAt: Date | null | undefined;
31
+ now: Date;
32
+ }): {
33
+ startTime: Date;
34
+ endTime: Date;
35
+ };
36
+ export declare function investigationLogStallToJSON(stall: InvestigationLogStall): JSONObject;
37
+ export declare function parseInvestigationLogStall(value: unknown): InvestigationLogStall | null;
38
+ export declare function describeInvestigationLogStall(stall: InvestigationLogStall, subjectType: "incident" | "alert"): string;
@@ -0,0 +1,38 @@
1
+ import { JSONObject } from "../../Types/JSON";
2
+ export declare enum InvestigationLogStallReason {
3
+ NoLogs = "NoLogs",
4
+ NoMatchingLogs = "NoMatchingLogs"
5
+ }
6
+ export declare const INVESTIGATION_LOG_TOOL_NAMES: ReadonlyArray<string>;
7
+ export declare const INVESTIGATION_LOG_WINDOW_MINUTES_BEFORE: number;
8
+ export interface InvestigationLogStall {
9
+ reason: InvestigationLogStallReason;
10
+ logSearchCount: number;
11
+ windowStart: string;
12
+ windowEnd: string;
13
+ }
14
+ export interface InvestigationLogCitation {
15
+ toolName: string;
16
+ rowCount: number;
17
+ }
18
+ export interface InvestigationLogSearches {
19
+ searchCount: number;
20
+ searchesWithLines: number;
21
+ }
22
+ export declare function isInvestigationLogTool(toolName: string): boolean;
23
+ export declare function getInvestigationLogSearches(citations: ReadonlyArray<InvestigationLogCitation>): InvestigationLogSearches;
24
+ export declare function decideInvestigationLogStall(input: {
25
+ isInconclusive: boolean;
26
+ searches: InvestigationLogSearches;
27
+ hasLogs: boolean | null;
28
+ }): InvestigationLogStallReason | null;
29
+ export declare function getInvestigationLogWindow(data: {
30
+ subjectStartedAt: Date | null | undefined;
31
+ now: Date;
32
+ }): {
33
+ startTime: Date;
34
+ endTime: Date;
35
+ };
36
+ export declare function investigationLogStallToJSON(stall: InvestigationLogStall): JSONObject;
37
+ export declare function parseInvestigationLogStall(value: unknown): InvestigationLogStall | null;
38
+ export declare function describeInvestigationLogStall(stall: InvestigationLogStall, subjectType: "incident" | "alert"): string;
@@ -0,0 +1,163 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.INVESTIGATION_LOG_WINDOW_MINUTES_BEFORE = exports.INVESTIGATION_LOG_TOOL_NAMES = exports.InvestigationLogStallReason = void 0;
4
+ exports.isInvestigationLogTool = isInvestigationLogTool;
5
+ exports.getInvestigationLogSearches = getInvestigationLogSearches;
6
+ exports.decideInvestigationLogStall = decideInvestigationLogStall;
7
+ exports.getInvestigationLogWindow = getInvestigationLogWindow;
8
+ exports.investigationLogStallToJSON = investigationLogStallToJSON;
9
+ exports.parseInvestigationLogStall = parseInvestigationLogStall;
10
+ exports.describeInvestigationLogStall = describeInvestigationLogStall;
11
+ /*
12
+ * AN INVESTIGATION THAT COULD NOT TELL THE CAUSE FOR LACK OF LOGS (the
13
+ * follow-up of #5242 that #5273 listed): it says so, and offers a way
14
+ * forward.
15
+ *
16
+ * Whether the logs stood in the way is decided from what the server knows,
17
+ * never from what the model wrote (every lane's rule: no LLM decides what is
18
+ * a problem):
19
+ *
20
+ * - the investigation could not tell the cause - a positive inconclusive
21
+ * verdict (AIConfidenceSignal.shouldEnqueueInstrumentationTask: the
22
+ * evidence floor, or the constrained classification), never a failed
23
+ * classification;
24
+ * - none of its log searches found a line - its own server-minted
25
+ * citations of search_logs and log_histogram, rows and all;
26
+ * - and either no log reached OneUptime for the project from the hour
27
+ * before the incident or alert started until the investigation ran
28
+ * (NoLogs: there was nothing to read), or some did and its searches still
29
+ * found nothing (NoMatchingLogs: nothing about this one).
30
+ *
31
+ * An investigation that found a log line, or found the cause, or never
32
+ * searched the logs of a project that has them, is not stalled for lack of
33
+ * logs and says nothing of the kind.
34
+ *
35
+ * Pure: the server decides with it, the Dashboard reads what the run
36
+ * recorded with it, and the tests and docs suites hold both to it.
37
+ */
38
+ var InvestigationLogStallReason;
39
+ (function (InvestigationLogStallReason) {
40
+ // No log reached OneUptime around the record: nothing to read.
41
+ InvestigationLogStallReason["NoLogs"] = "NoLogs";
42
+ // Logs reached OneUptime, and none of the investigation's searches found a line.
43
+ InvestigationLogStallReason["NoMatchingLogs"] = "NoMatchingLogs";
44
+ })(InvestigationLogStallReason || (exports.InvestigationLogStallReason = InvestigationLogStallReason = {}));
45
+ // The toolbox's log reads: a citation of either is a search of the logs.
46
+ exports.INVESTIGATION_LOG_TOOL_NAMES = [
47
+ "search_logs",
48
+ "log_histogram",
49
+ ];
50
+ /*
51
+ * How far before the record started the logs are looked for: an hour, the
52
+ * window an investigation reads first.
53
+ */
54
+ exports.INVESTIGATION_LOG_WINDOW_MINUTES_BEFORE = 60;
55
+ function isInvestigationLogTool(toolName) {
56
+ return exports.INVESTIGATION_LOG_TOOL_NAMES.includes((toolName || "").trim());
57
+ }
58
+ // What the investigation's log searches found, from its citations.
59
+ function getInvestigationLogSearches(citations) {
60
+ let searchCount = 0;
61
+ let searchesWithLines = 0;
62
+ for (const citation of citations) {
63
+ if (!citation || !isInvestigationLogTool(citation.toolName)) {
64
+ continue;
65
+ }
66
+ searchCount++;
67
+ if (typeof citation.rowCount === "number" &&
68
+ Number.isFinite(citation.rowCount) &&
69
+ citation.rowCount > 0) {
70
+ searchesWithLines++;
71
+ }
72
+ }
73
+ return { searchCount, searchesWithLines };
74
+ }
75
+ /*
76
+ * Whether, and why, the logs stood in the investigation's way. `hasLogs` is
77
+ * whether any log reached OneUptime in the window, or null when that could
78
+ * not be read - then only the investigation's own searches speak: searched
79
+ * and found nothing is NoMatchingLogs, never searched is nothing to say.
80
+ */
81
+ function decideInvestigationLogStall(input) {
82
+ if (!input.isInconclusive || input.searches.searchesWithLines > 0) {
83
+ return null;
84
+ }
85
+ if (input.hasLogs === false) {
86
+ return InvestigationLogStallReason.NoLogs;
87
+ }
88
+ return input.searches.searchCount > 0
89
+ ? InvestigationLogStallReason.NoMatchingLogs
90
+ : null;
91
+ }
92
+ // The window an investigation's logs are looked for in.
93
+ function getInvestigationLogWindow(data) {
94
+ const startedAt = data.subjectStartedAt &&
95
+ Number.isFinite(data.subjectStartedAt.getTime()) &&
96
+ data.subjectStartedAt.getTime() <= data.now.getTime()
97
+ ? data.subjectStartedAt
98
+ : data.now;
99
+ return {
100
+ startTime: new Date(startedAt.getTime() - exports.INVESTIGATION_LOG_WINDOW_MINUTES_BEFORE * 60 * 1000),
101
+ endTime: data.now,
102
+ };
103
+ }
104
+ function investigationLogStallToJSON(stall) {
105
+ return {
106
+ reason: stall.reason,
107
+ logSearchCount: stall.logSearchCount,
108
+ windowStart: stall.windowStart,
109
+ windowEnd: stall.windowEnd,
110
+ };
111
+ }
112
+ function readTimestamp(value) {
113
+ if (typeof value !== "string" || !value.trim()) {
114
+ return null;
115
+ }
116
+ return Number.isFinite(Date.parse(value)) ? value : null;
117
+ }
118
+ /*
119
+ * Reads what a run recorded (the InvestigationStalled event's
120
+ * resultSummary.logStall). Anything that does not hold together - an
121
+ * unknown reason, a count that is no count, a window that is no window -
122
+ * reads as no stall, so the card never says what the run did not record.
123
+ */
124
+ function parseInvestigationLogStall(value) {
125
+ if (!value || typeof value !== "object" || Array.isArray(value)) {
126
+ return null;
127
+ }
128
+ const record = value;
129
+ const reason = record["reason"];
130
+ if (reason !== InvestigationLogStallReason.NoLogs &&
131
+ reason !== InvestigationLogStallReason.NoMatchingLogs) {
132
+ return null;
133
+ }
134
+ const count = record["logSearchCount"];
135
+ if (typeof count !== "number" ||
136
+ !Number.isInteger(count) ||
137
+ count < 0 ||
138
+ (reason === InvestigationLogStallReason.NoMatchingLogs && count === 0)) {
139
+ return null;
140
+ }
141
+ const windowStart = readTimestamp(record["windowStart"]);
142
+ const windowEnd = readTimestamp(record["windowEnd"]);
143
+ if (!windowStart || !windowEnd) {
144
+ return null;
145
+ }
146
+ return {
147
+ reason: reason,
148
+ logSearchCount: count,
149
+ windowStart,
150
+ windowEnd,
151
+ };
152
+ }
153
+ /*
154
+ * The line the run's own record says it in, in English (the AIRunEvent's
155
+ * message): what an API reader or a support engineer reads. The card words
156
+ * it in the reader's language from the structured fields.
157
+ */
158
+ function describeInvestigationLogStall(stall, subjectType) {
159
+ if (stall.reason === InvestigationLogStallReason.NoLogs) {
160
+ return `No logs reached OneUptime from the hour before this ${subjectType} started, so OneUptime AI had none to read.`;
161
+ }
162
+ return `OneUptime AI searched the logs ${stall.logSearchCount === 1 ? "once" : `${stall.logSearchCount} times`} and found nothing about this ${subjectType}.`;
163
+ }
@@ -0,0 +1,11 @@
1
+ import commonJsModule from "./InvestigationLogStall.js";
2
+ export const INVESTIGATION_LOG_TOOL_NAMES = commonJsModule.INVESTIGATION_LOG_TOOL_NAMES;
3
+ export const INVESTIGATION_LOG_WINDOW_MINUTES_BEFORE = commonJsModule.INVESTIGATION_LOG_WINDOW_MINUTES_BEFORE;
4
+ export const InvestigationLogStallReason = commonJsModule.InvestigationLogStallReason;
5
+ export const decideInvestigationLogStall = commonJsModule.decideInvestigationLogStall;
6
+ export const describeInvestigationLogStall = commonJsModule.describeInvestigationLogStall;
7
+ export const getInvestigationLogSearches = commonJsModule.getInvestigationLogSearches;
8
+ export const getInvestigationLogWindow = commonJsModule.getInvestigationLogWindow;
9
+ export const investigationLogStallToJSON = commonJsModule.investigationLogStallToJSON;
10
+ export const isInvestigationLogTool = commonJsModule.isInvestigationLogTool;
11
+ export const parseInvestigationLogStall = commonJsModule.parseInvestigationLogStall;
@@ -1,4 +1,5 @@
1
- import { NetworkDeviceDiscoveredValue, NetworkDeviceDiscoveryMethod, NetworkDeviceDiscoveryReader } from "../../Types/NetworkDevice/NetworkDeviceDiscoveredDetails.mjs";
1
+ import NetworkControllerProvider from "../../Types/NetworkController/NetworkControllerProvider.mjs";
2
+ import { NetworkDeviceControllerReading, NetworkDeviceDiscoveredValue, NetworkDeviceDiscoveryMethod, NetworkDeviceDiscoveryReader } from "../../Types/NetworkDevice/NetworkDeviceDiscoveredDetails.mjs";
2
3
  export declare enum AssetFactSourceKind {
3
4
  SnmpPoll = "snmpPoll",
4
5
  Discovered = "discovered",
@@ -9,18 +10,21 @@ export declare enum AssetFactSourceKind {
9
10
  Site = "site",
10
11
  Classified = "classified",
11
12
  Collector = "collector",
12
- CloudPlacement = "cloudPlacement"
13
+ CloudPlacement = "cloudPlacement",
14
+ Controller = "controller"
13
15
  }
14
16
  export interface AssetFactSource {
15
17
  kind: AssetFactSourceKind;
16
18
  method?: NetworkDeviceDiscoveryMethod | undefined;
17
19
  readBy?: NetworkDeviceDiscoveryReader | undefined;
18
20
  readAt?: string | undefined;
21
+ provider?: NetworkControllerProvider | undefined;
19
22
  }
20
23
  export interface AssetFactDifference {
21
24
  value: string;
22
25
  source: AssetFactSource;
23
26
  }
24
27
  export declare function sourceOfDiscoveredValue(entry: NetworkDeviceDiscoveredValue): AssetFactSource;
28
+ export declare function sourceOfControllerReading(reading: NetworkDeviceControllerReading): AssetFactSource;
25
29
  export declare function isAutomaticAssetFactSource(source: AssetFactSource | undefined): boolean;
26
30
  export default AssetFactSource;
@@ -1,4 +1,5 @@
1
- import { NetworkDeviceDiscoveredValue, NetworkDeviceDiscoveryMethod, NetworkDeviceDiscoveryReader } from "../../Types/NetworkDevice/NetworkDeviceDiscoveredDetails";
1
+ import NetworkControllerProvider from "../../Types/NetworkController/NetworkControllerProvider";
2
+ import { NetworkDeviceControllerReading, NetworkDeviceDiscoveredValue, NetworkDeviceDiscoveryMethod, NetworkDeviceDiscoveryReader } from "../../Types/NetworkDevice/NetworkDeviceDiscoveredDetails";
2
3
  export declare enum AssetFactSourceKind {
3
4
  SnmpPoll = "snmpPoll",
4
5
  Discovered = "discovered",
@@ -9,18 +10,21 @@ export declare enum AssetFactSourceKind {
9
10
  Site = "site",
10
11
  Classified = "classified",
11
12
  Collector = "collector",
12
- CloudPlacement = "cloudPlacement"
13
+ CloudPlacement = "cloudPlacement",
14
+ Controller = "controller"
13
15
  }
14
16
  export interface AssetFactSource {
15
17
  kind: AssetFactSourceKind;
16
18
  method?: NetworkDeviceDiscoveryMethod | undefined;
17
19
  readBy?: NetworkDeviceDiscoveryReader | undefined;
18
20
  readAt?: string | undefined;
21
+ provider?: NetworkControllerProvider | undefined;
19
22
  }
20
23
  export interface AssetFactDifference {
21
24
  value: string;
22
25
  source: AssetFactSource;
23
26
  }
24
27
  export declare function sourceOfDiscoveredValue(entry: NetworkDeviceDiscoveredValue): AssetFactSource;
28
+ export declare function sourceOfControllerReading(reading: NetworkDeviceControllerReading): AssetFactSource;
25
29
  export declare function isAutomaticAssetFactSource(source: AssetFactSource | undefined): boolean;
26
30
  export default AssetFactSource;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AssetFactSourceKind = void 0;
4
4
  exports.sourceOfDiscoveredValue = sourceOfDiscoveredValue;
5
+ exports.sourceOfControllerReading = sourceOfControllerReading;
5
6
  exports.isAutomaticAssetFactSource = isAutomaticAssetFactSource;
6
7
  /*
7
8
  * Where one asset detail came from, and when it was read (OneUptime issue
@@ -48,6 +49,12 @@ var AssetFactSourceKind;
48
49
  AssetFactSourceKind["Collector"] = "collector";
49
50
  // A host's cloud zone, standing in for a location it does not report.
50
51
  AssetFactSourceKind["CloudPlacement"] = "cloudPlacement";
52
+ /*
53
+ * What the device's network controller says it is - the Meraki dashboard
54
+ * of an organization the project reads. `readBy` is the connection that
55
+ * read it, `readAt` when, and `provider` which controller.
56
+ */
57
+ AssetFactSourceKind["Controller"] = "controller";
51
58
  })(AssetFactSourceKind || (exports.AssetFactSourceKind = AssetFactSourceKind = {}));
52
59
  // The source of a value discovery read.
53
60
  function sourceOfDiscoveredValue(entry) {
@@ -58,6 +65,15 @@ function sourceOfDiscoveredValue(entry) {
58
65
  readAt: entry.readAt,
59
66
  };
60
67
  }
68
+ // The source of what a device's controller says about it.
69
+ function sourceOfControllerReading(reading) {
70
+ return {
71
+ kind: AssetFactSourceKind.Controller,
72
+ readBy: reading.readBy,
73
+ readAt: reading.readAt,
74
+ provider: reading.provider,
75
+ };
76
+ }
61
77
  /*
62
78
  * True when the source is something OneUptime read by itself, which is what
63
79
  * makes it replaceable by a newer reading. A saved value, an assigned role or
@@ -70,5 +86,6 @@ function isAutomaticAssetFactSource(source) {
70
86
  return (source.kind === AssetFactSourceKind.SnmpPoll ||
71
87
  source.kind === AssetFactSourceKind.Discovered ||
72
88
  source.kind === AssetFactSourceKind.LearnedFromArp ||
73
- source.kind === AssetFactSourceKind.Collector);
89
+ source.kind === AssetFactSourceKind.Collector ||
90
+ source.kind === AssetFactSourceKind.Controller);
74
91
  }
@@ -1,4 +1,5 @@
1
1
  import commonJsModule from "./AssetFactSource.js";
2
2
  export const AssetFactSourceKind = commonJsModule.AssetFactSourceKind;
3
3
  export const isAutomaticAssetFactSource = commonJsModule.isAutomaticAssetFactSource;
4
+ export const sourceOfControllerReading = commonJsModule.sourceOfControllerReading;
4
5
  export const sourceOfDiscoveredValue = commonJsModule.sourceOfDiscoveredValue;
@@ -0,0 +1,10 @@
1
+ export declare const FEED_LEAD_SCAN_LENGTH: number;
2
+ export declare const FEED_LEADING_EMOJI: RegExp;
3
+ export declare const FEED_LEAD_VERBS: ReadonlySet<string>;
4
+ export declare const readFeedLeadingEmoji: (text: string) => string;
5
+ export declare const getSentenceAfterName: (sentence: string) => string | null;
6
+ export declare const opensWithFeedLeadVerb: (sentence: string) => boolean;
7
+ export declare const leadWithAuthorMarkdown: (data: {
8
+ authorMarkdown: string;
9
+ markdown: string;
10
+ }) => string;
@@ -0,0 +1,10 @@
1
+ export declare const FEED_LEAD_SCAN_LENGTH: number;
2
+ export declare const FEED_LEADING_EMOJI: RegExp;
3
+ export declare const FEED_LEAD_VERBS: ReadonlySet<string>;
4
+ export declare const readFeedLeadingEmoji: (text: string) => string;
5
+ export declare const getSentenceAfterName: (sentence: string) => string | null;
6
+ export declare const opensWithFeedLeadVerb: (sentence: string) => boolean;
7
+ export declare const leadWithAuthorMarkdown: (data: {
8
+ authorMarkdown: string;
9
+ markdown: string;
10
+ }) => string;