@cccsaurora/howler-ui 2.18.0-dev.766 → 2.18.0-dev.771
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/api/index.d.ts +0 -2
- package/api/index.js +2 -4
- package/api/search/facet/hit.d.ts +3 -1
- package/api/search/facet/index.d.ts +1 -3
- package/api/search/index.d.ts +1 -2
- package/api/search/index.js +1 -2
- package/commons/components/leftnav/LeftNavDrawer.js +1 -1
- package/components/app/App.js +8 -36
- package/components/app/hooks/useMatchers.d.ts +1 -1
- package/components/app/hooks/useMatchers.js +11 -23
- package/components/app/hooks/useMatchers.test.js +22 -22
- package/components/app/hooks/useTitle.js +3 -3
- package/components/app/providers/FavouritesProvider.js +2 -2
- package/components/app/providers/HitProvider.d.ts +22 -0
- package/components/app/providers/{RecordProvider.js → HitProvider.js} +41 -41
- package/components/app/providers/{RecordSearchProvider.d.ts → HitSearchProvider.d.ts} +6 -6
- package/components/app/providers/{RecordSearchProvider.js → HitSearchProvider.js} +17 -12
- package/components/app/providers/{RecordSearchProvider.test.js → HitSearchProvider.test.js} +71 -52
- package/components/app/providers/ModalProvider.d.ts +0 -1
- package/components/app/providers/ParameterProvider.d.ts +2 -9
- package/components/app/providers/ParameterProvider.js +240 -165
- package/components/app/providers/ParameterProvider.test.js +94 -346
- package/components/app/providers/UserListProvider.js +8 -28
- package/components/elements/PluginTypography.d.ts +1 -2
- package/components/elements/PluginTypography.js +2 -3
- package/components/elements/UserList.d.ts +2 -5
- package/components/elements/UserList.js +8 -18
- package/components/elements/addons/search/phrase/Phrase.js +1 -1
- package/components/elements/display/ChipPopper.d.ts +1 -1
- package/components/elements/display/HowlerCard.js +1 -1
- package/components/elements/display/Modal.js +0 -2
- package/components/elements/display/icons/BundleButton.d.ts +6 -0
- package/components/elements/display/icons/BundleButton.js +32 -0
- package/components/elements/hit/HitActions.js +4 -4
- package/components/elements/hit/HitBanner.d.ts +0 -1
- package/components/elements/hit/HitBanner.js +49 -29
- package/components/elements/hit/HitCard.d.ts +0 -2
- package/components/elements/hit/HitCard.js +7 -7
- package/components/elements/{record/RecordComments.d.ts → hit/HitComments.d.ts} +4 -5
- package/components/elements/{record/RecordComments.js → hit/HitComments.js} +28 -29
- package/components/elements/{ObjectDetails.js → hit/HitDetails.js} +17 -17
- package/components/elements/hit/HitLabels.js +2 -2
- package/components/elements/hit/HitLinks.js +1 -1
- package/components/elements/hit/HitOutline.d.ts +0 -1
- package/components/elements/hit/HitOutline.js +3 -3
- package/components/elements/hit/{HitPreview.d.ts → HitQuickSearch.d.ts} +3 -3
- package/components/elements/hit/{HitPreview.js → HitQuickSearch.js} +4 -10
- package/components/elements/hit/HitRelated.d.ts +6 -0
- package/components/elements/hit/HitRelated.js +7 -0
- package/components/elements/hit/HitSummary.d.ts +1 -2
- package/components/elements/hit/HitSummary.js +5 -6
- package/components/elements/{record/RecordWorklog.d.ts → hit/HitWorklog.d.ts} +3 -4
- package/components/elements/{record/RecordWorklog.js → hit/HitWorklog.js} +13 -15
- package/components/elements/hit/aggregate/HitGraph.js +8 -8
- package/components/elements/hit/outlines/DefaultOutline.js +1 -1
- package/components/elements/view/ViewTitle.d.ts +0 -1
- package/components/elements/view/ViewTitle.js +2 -9
- package/components/hooks/useHitActions.d.ts +1 -1
- package/components/hooks/useHitActions.js +4 -4
- package/components/hooks/{useRecordSelection.d.ts → useHitSelection.d.ts} +2 -2
- package/components/hooks/{useRecordSelection.js → useHitSelection.js} +33 -12
- package/components/hooks/useMyPreferences.js +1 -10
- package/components/hooks/useMySearch.js +2 -2
- package/components/hooks/useMySitemap.js +1 -4
- package/components/hooks/useMyTheme.js +2 -9
- package/components/routes/action/edit/ActionEditor.js +2 -2
- package/components/routes/action/view/ActionSearch.js +1 -1
- package/components/routes/advanced/QueryBuilder.js +1 -1
- package/components/routes/advanced/QueryEditor.js +3 -3
- package/components/routes/advanced/historyCompletionProvider.js +3 -3
- package/components/routes/analytics/AnalyticDetails.js +2 -2
- package/components/routes/analytics/AnalyticSearch.js +1 -1
- package/components/routes/dossiers/DossierEditor.js +2 -2
- package/components/routes/dossiers/DossierEditor.test.js +1 -1
- package/components/routes/help/ApiDocumentation.js +1 -1
- package/components/routes/help/BundleDocumentation.d.ts +3 -0
- package/components/routes/help/BundleDocumentation.js +12 -0
- package/components/routes/help/HitBannerDocumentation.js +0 -1
- package/components/routes/help/HitDocumentation.js +3 -1
- package/components/routes/help/markdown/en/bundles.md.js +1 -0
- package/components/routes/help/markdown/fr/bundles.md.js +1 -0
- package/components/routes/hits/search/BundleParentMenu.d.ts +6 -0
- package/components/routes/hits/search/BundleParentMenu.js +32 -0
- package/components/routes/hits/search/BundleScroller.d.ts +2 -0
- package/components/routes/hits/search/BundleScroller.js +6 -0
- package/components/routes/hits/search/{RecordBrowser.js → HitBrowser.js} +9 -9
- package/components/{elements/record/RecordContextMenu.d.ts → routes/hits/search/HitContextMenu.d.ts} +3 -3
- package/components/routes/hits/search/HitContextMenu.js +227 -0
- package/components/{elements/record/RecordContextMenu.test.js → routes/hits/search/HitContextMenu.test.js} +39 -94
- package/components/routes/hits/search/{RecordQuery.d.ts → HitQuery.d.ts} +2 -2
- package/components/routes/hits/search/{RecordQuery.js → HitQuery.js} +6 -6
- package/components/routes/hits/search/InformationPane.d.ts +0 -1
- package/components/routes/hits/search/InformationPane.js +60 -47
- package/components/routes/hits/search/LayoutSettings.js +3 -3
- package/components/routes/hits/search/QuerySettings.js +1 -2
- package/components/routes/hits/search/QuerySettings.test.js +9 -14
- package/components/routes/hits/search/SearchPane.js +49 -26
- package/components/routes/hits/search/ViewLink.js +3 -3
- package/components/routes/hits/search/ViewLink.test.js +8 -8
- package/components/routes/hits/search/grid/AddColumnModal.js +4 -5
- package/components/routes/hits/search/grid/EnhancedCell.d.ts +1 -2
- package/components/routes/hits/search/grid/EnhancedCell.js +2 -2
- package/components/routes/hits/search/grid/HitGrid.js +18 -20
- package/components/routes/hits/search/grid/{RecordRow.d.ts → HitRow.d.ts} +2 -3
- package/components/routes/hits/search/grid/{RecordRow.js → HitRow.js} +8 -10
- package/components/routes/hits/view/HitViewer.js +13 -12
- package/components/routes/home/ViewCard.js +41 -47
- package/components/{elements/MarkdownEditor.js → routes/overviews/OverviewEditor.js} +3 -3
- package/components/routes/overviews/OverviewViewer.js +2 -2
- package/components/routes/views/ViewComposer.js +19 -46
- package/locales/en/translation.json +3 -109
- package/locales/fr/translation.json +3 -107
- package/models/WithMetadata.d.ts +1 -2
- package/models/entities/generated/{ThreatEnrichment.d.ts → Enrichment.d.ts} +1 -1
- package/models/entities/generated/Hit.d.ts +0 -1
- package/models/entities/generated/Howler.d.ts +4 -0
- package/models/entities/generated/Rule.d.ts +10 -2
- package/models/entities/generated/Threat.d.ts +2 -2
- package/models/entities/generated/View.d.ts +0 -1
- package/package.json +3 -21
- package/plugins/clue/components/ClueTypography.js +2 -2
- package/plugins/clue/utils.d.ts +1 -2
- package/tests/mocks.d.ts +1 -11
- package/tests/mocks.js +7 -12
- package/tests/server-handlers.js +1 -6
- package/tests/utils.d.ts +0 -4
- package/tests/utils.js +0 -20
- package/utils/constants.d.ts +3 -4
- package/utils/constants.js +0 -6
- package/utils/hitFunctions.d.ts +1 -2
- package/utils/hitFunctions.js +4 -4
- package/utils/viewUtils.js +0 -3
- package/api/search/case.d.ts +0 -4
- package/api/search/case.js +0 -8
- package/api/v2/case/index.d.ts +0 -8
- package/api/v2/case/index.js +0 -20
- package/api/v2/case/items.d.ts +0 -6
- package/api/v2/case/items.js +0 -18
- package/api/v2/index.d.ts +0 -4
- package/api/v2/index.js +0 -6
- package/api/v2/search/facet.d.ts +0 -3
- package/api/v2/search/facet.js +0 -12
- package/api/v2/search/index.d.ts +0 -5
- package/api/v2/search/index.js +0 -24
- package/components/app/providers/RecordProvider.d.ts +0 -23
- package/components/elements/ContextMenu.d.ts +0 -56
- package/components/elements/ContextMenu.js +0 -109
- package/components/elements/ContextMenu.test.js +0 -215
- package/components/elements/ObjectDetails.d.ts +0 -6
- package/components/elements/case/CaseCard.d.ts +0 -12
- package/components/elements/case/CaseCard.js +0 -42
- package/components/elements/case/CasePreview.d.ts +0 -6
- package/components/elements/case/CasePreview.js +0 -17
- package/components/elements/case/StatusIcon.d.ts +0 -5
- package/components/elements/case/StatusIcon.js +0 -13
- package/components/elements/hit/elements/AnalyticLink.d.ts +0 -9
- package/components/elements/hit/elements/AnalyticLink.js +0 -22
- package/components/elements/hit/related/RelatedRecords.js +0 -63
- package/components/elements/observable/ObservableCard.d.ts +0 -6
- package/components/elements/observable/ObservableCard.js +0 -22
- package/components/elements/observable/ObservablePreview.d.ts +0 -6
- package/components/elements/observable/ObservablePreview.js +0 -12
- package/components/elements/record/RecordContextMenu.js +0 -256
- package/components/elements/record/RecordContextMenu.test.d.ts +0 -1
- package/components/elements/record/RecordRelated.d.ts +0 -7
- package/components/elements/record/RecordRelated.js +0 -34
- package/components/hooks/useRelatedRecords.d.ts +0 -13
- package/components/hooks/useRelatedRecords.js +0 -32
- package/components/routes/cases/CaseViewer.d.ts +0 -2
- package/components/routes/cases/CaseViewer.js +0 -22
- package/components/routes/cases/Cases.d.ts +0 -2
- package/components/routes/cases/Cases.js +0 -148
- package/components/routes/cases/constants.d.ts +0 -6
- package/components/routes/cases/constants.js +0 -6
- package/components/routes/cases/detail/AlertPanel.d.ts +0 -6
- package/components/routes/cases/detail/AlertPanel.js +0 -33
- package/components/routes/cases/detail/CaseAssets.d.ts +0 -11
- package/components/routes/cases/detail/CaseAssets.js +0 -104
- package/components/routes/cases/detail/CaseAssets.test.d.ts +0 -1
- package/components/routes/cases/detail/CaseAssets.test.js +0 -167
- package/components/routes/cases/detail/CaseDashboard.d.ts +0 -7
- package/components/routes/cases/detail/CaseDashboard.js +0 -66
- package/components/routes/cases/detail/CaseDetails.d.ts +0 -6
- package/components/routes/cases/detail/CaseDetails.js +0 -61
- package/components/routes/cases/detail/CaseOverview.d.ts +0 -7
- package/components/routes/cases/detail/CaseOverview.js +0 -43
- package/components/routes/cases/detail/CaseSidebar.d.ts +0 -8
- package/components/routes/cases/detail/CaseSidebar.js +0 -107
- package/components/routes/cases/detail/CaseSidebar.test.d.ts +0 -1
- package/components/routes/cases/detail/CaseSidebar.test.js +0 -246
- package/components/routes/cases/detail/CaseTask.d.ts +0 -11
- package/components/routes/cases/detail/CaseTask.js +0 -57
- package/components/routes/cases/detail/CaseTimeline.d.ts +0 -12
- package/components/routes/cases/detail/CaseTimeline.js +0 -106
- package/components/routes/cases/detail/CaseTimeline.test.d.ts +0 -1
- package/components/routes/cases/detail/CaseTimeline.test.js +0 -320
- package/components/routes/cases/detail/ItemPage.d.ts +0 -6
- package/components/routes/cases/detail/ItemPage.js +0 -99
- package/components/routes/cases/detail/RelatedCasePanel.d.ts +0 -6
- package/components/routes/cases/detail/RelatedCasePanel.js +0 -34
- package/components/routes/cases/detail/TaskPanel.d.ts +0 -7
- package/components/routes/cases/detail/TaskPanel.js +0 -52
- package/components/routes/cases/detail/aggregates/CaseAggregate.d.ts +0 -11
- package/components/routes/cases/detail/aggregates/CaseAggregate.js +0 -24
- package/components/routes/cases/detail/aggregates/SourceAggregate.d.ts +0 -6
- package/components/routes/cases/detail/aggregates/SourceAggregate.js +0 -26
- package/components/routes/cases/detail/assets/Asset.d.ts +0 -14
- package/components/routes/cases/detail/assets/Asset.js +0 -12
- package/components/routes/cases/detail/assets/Asset.test.d.ts +0 -1
- package/components/routes/cases/detail/assets/Asset.test.js +0 -72
- package/components/routes/cases/detail/sidebar/CaseFolder.d.ts +0 -20
- package/components/routes/cases/detail/sidebar/CaseFolder.js +0 -83
- package/components/routes/cases/detail/sidebar/CaseFolder.test.d.ts +0 -1
- package/components/routes/cases/detail/sidebar/CaseFolder.test.js +0 -295
- package/components/routes/cases/detail/sidebar/CaseFolderContextMenu.d.ts +0 -34
- package/components/routes/cases/detail/sidebar/CaseFolderContextMenu.js +0 -103
- package/components/routes/cases/detail/sidebar/CaseFolderContextMenu.test.d.ts +0 -1
- package/components/routes/cases/detail/sidebar/CaseFolderContextMenu.test.js +0 -363
- package/components/routes/cases/detail/sidebar/FolderEntry.d.ts +0 -25
- package/components/routes/cases/detail/sidebar/FolderEntry.js +0 -88
- package/components/routes/cases/detail/sidebar/FolderEntry.test.d.ts +0 -1
- package/components/routes/cases/detail/sidebar/FolderEntry.test.js +0 -206
- package/components/routes/cases/detail/sidebar/RootDropZone.d.ts +0 -5
- package/components/routes/cases/detail/sidebar/RootDropZone.js +0 -33
- package/components/routes/cases/detail/sidebar/types.d.ts +0 -9
- package/components/routes/cases/detail/sidebar/utils.d.ts +0 -3
- package/components/routes/cases/detail/sidebar/utils.js +0 -29
- package/components/routes/cases/detail/sidebar/utils.test.d.ts +0 -1
- package/components/routes/cases/detail/sidebar/utils.test.js +0 -82
- package/components/routes/cases/hooks/useCase.d.ts +0 -13
- package/components/routes/cases/hooks/useCase.js +0 -51
- package/components/routes/cases/modals/AddToCaseModal.d.ts +0 -7
- package/components/routes/cases/modals/AddToCaseModal.js +0 -59
- package/components/routes/cases/modals/AddToCaseModal.test.d.ts +0 -1
- package/components/routes/cases/modals/AddToCaseModal.test.js +0 -313
- package/components/routes/cases/modals/CaseRecordRow.d.ts +0 -9
- package/components/routes/cases/modals/CaseRecordRow.js +0 -15
- package/components/routes/cases/modals/CreateCaseModal.d.ts +0 -7
- package/components/routes/cases/modals/CreateCaseModal.js +0 -55
- package/components/routes/cases/modals/CreateCaseModal.test.d.ts +0 -1
- package/components/routes/cases/modals/CreateCaseModal.test.js +0 -358
- package/components/routes/cases/modals/RenameItemModal.d.ts +0 -9
- package/components/routes/cases/modals/RenameItemModal.js +0 -48
- package/components/routes/cases/modals/ResolveModal.d.ts +0 -7
- package/components/routes/cases/modals/ResolveModal.js +0 -115
- package/components/routes/cases/modals/ResolveModal.test.d.ts +0 -1
- package/components/routes/cases/modals/ResolveModal.test.js +0 -384
- package/components/routes/cases/modals/hooks.d.ts +0 -7
- package/components/routes/cases/modals/hooks.js +0 -44
- package/components/routes/cases/modals/types.d.ts +0 -5
- package/components/routes/cases/search/CaseAssigneeFilter.d.ts +0 -6
- package/components/routes/cases/search/CaseAssigneeFilter.js +0 -33
- package/components/routes/cases/search/CaseAssigneeFilter.test.d.ts +0 -1
- package/components/routes/cases/search/CaseAssigneeFilter.test.js +0 -127
- package/components/routes/cases/search/CaseDateFilter.d.ts +0 -13
- package/components/routes/cases/search/CaseDateFilter.js +0 -26
- package/components/routes/cases/search/CaseDateFilter.test.d.ts +0 -1
- package/components/routes/cases/search/CaseDateFilter.test.js +0 -115
- package/components/routes/cases/search/CaseStatusFilter.d.ts +0 -6
- package/components/routes/cases/search/CaseStatusFilter.js +0 -13
- package/components/routes/cases/search/CaseStatusFilter.test.d.ts +0 -1
- package/components/routes/cases/search/CaseStatusFilter.test.js +0 -86
- package/components/routes/hits/search/shared/IndexPicker.d.ts +0 -2
- package/components/routes/hits/search/shared/IndexPicker.js +0 -20
- package/components/routes/observables/ObservableViewer.d.ts +0 -7
- package/components/routes/observables/ObservableViewer.js +0 -27
- package/models/entities/generated/AttachmentsFile.d.ts +0 -12
- package/models/entities/generated/Case.d.ts +0 -28
- package/models/entities/generated/DestinationOriginal.d.ts +0 -19
- package/models/entities/generated/EmailAttachment.d.ts +0 -8
- package/models/entities/generated/EmailParent.d.ts +0 -19
- package/models/entities/generated/Enrichments.d.ts +0 -7
- package/models/entities/generated/EnrichmentsIndicator.d.ts +0 -21
- package/models/entities/generated/HttpResponse.d.ts +0 -11
- package/models/entities/generated/Item.d.ts +0 -9
- package/models/entities/generated/Observable.d.ts +0 -85
- package/models/entities/generated/ObservableCloud.d.ts +0 -20
- package/models/entities/generated/ObservableDestination.d.ts +0 -23
- package/models/entities/generated/ObservableEmail.d.ts +0 -30
- package/models/entities/generated/ObservableFile.d.ts +0 -36
- package/models/entities/generated/ObservableHowler.d.ts +0 -43
- package/models/entities/generated/ObservableHttp.d.ts +0 -11
- package/models/entities/generated/ObservableObserver.d.ts +0 -21
- package/models/entities/generated/ObservableOrganization.d.ts +0 -7
- package/models/entities/generated/ObservableProcess.d.ts +0 -34
- package/models/entities/generated/ObservableSource.d.ts +0 -23
- package/models/entities/generated/ObservableThreat.d.ts +0 -21
- package/models/entities/generated/ObservableTls.d.ts +0 -12
- package/models/entities/generated/ObserverIngress.d.ts +0 -9
- package/models/entities/generated/Task.d.ts +0 -10
- package/utils/typeUtils.d.ts +0 -7
- package/utils/typeUtils.js +0 -27
- /package/components/app/providers/{RecordSearchProvider.test.d.ts → HitSearchProvider.test.d.ts} +0 -0
- /package/components/elements/hit/{related/RelatedRecords.d.ts → HitDetails.d.ts} +0 -0
- /package/components/routes/hits/search/{RecordBrowser.d.ts → HitBrowser.d.ts} +0 -0
- /package/components/{elements/ContextMenu.test.d.ts → routes/hits/search/HitContextMenu.test.d.ts} +0 -0
- /package/components/{elements/MarkdownEditor.d.ts → routes/overviews/OverviewEditor.d.ts} +0 -0
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { AvTimer } from '@mui/icons-material';
|
|
3
|
-
import { Autocomplete, Stack, TextField, Typography } from '@mui/material';
|
|
4
|
-
import { LocalizationProvider } from '@mui/x-date-pickers';
|
|
5
|
-
import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
|
|
6
|
-
import { DateTimePicker } from '@mui/x-date-pickers/DateTimePicker';
|
|
7
|
-
import ChipPopper from '@cccsaurora/howler-ui/components/elements/display/ChipPopper';
|
|
8
|
-
import { useTranslation } from 'react-i18next';
|
|
9
|
-
import { DATE_RANGES } from '@cccsaurora/howler-ui/utils/constants';
|
|
10
|
-
const CaseDateFilter = ({ dateRange, onChange, customStart, customEnd, onCustomStartChange, onCustomEndChange }) => {
|
|
11
|
-
const { t } = useTranslation();
|
|
12
|
-
return (_jsx(ChipPopper, { icon: _jsx(AvTimer, { fontSize: "small" }), label: _jsx(Typography, { variant: "body2", children: dateRange === 'date.range.all'
|
|
13
|
-
? t('route.cases.filter.date')
|
|
14
|
-
: dateRange === 'date.range.custom'
|
|
15
|
-
? `${customStart.format('YYYY-MM-DD')} ${t('to')} ${customEnd.format('YYYY-MM-DD')}`
|
|
16
|
-
: t(dateRange) }), minWidth: "225px", slotProps: { chip: { size: 'small', color: dateRange !== 'date.range.all' ? 'primary' : 'default' } }, children: _jsxs(Stack, { spacing: 1, children: [_jsx(Autocomplete, { size: "small", value: dateRange, options: [...DATE_RANGES], getOptionLabel: o => t(o), disableClearable: true, onChange: (_, nv) => onChange(nv), renderInput: params => _jsx(TextField, { ...params, label: t('route.cases.filter.date') }) }), dateRange === 'date.range.custom' && (_jsx(LocalizationProvider, { dateAdapter: AdapterDayjs, children: _jsxs(Stack, { direction: "row", spacing: 1, useFlexGap: true, flexWrap: "wrap", children: [_jsx(DateTimePicker, { sx: { minWidth: '175px', flexGrow: 1 }, slotProps: { textField: { size: 'small' } }, label: t('date.select.start'), value: customStart, maxDate: customEnd, onChange: nv => {
|
|
17
|
-
if (nv) {
|
|
18
|
-
onCustomStartChange(nv);
|
|
19
|
-
}
|
|
20
|
-
}, ampm: false, disableFuture: true }), _jsx(DateTimePicker, { sx: { minWidth: '175px', flexGrow: 1 }, slotProps: { textField: { size: 'small' } }, label: t('date.select.end'), value: customEnd, minDate: customStart, onChange: nv => {
|
|
21
|
-
if (nv) {
|
|
22
|
-
onCustomEndChange(nv);
|
|
23
|
-
}
|
|
24
|
-
}, ampm: false, disableFuture: true })] }) }))] }) }));
|
|
25
|
-
};
|
|
26
|
-
export default CaseDateFilter;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
/// <reference types="vitest" />
|
|
3
|
-
import { render, screen, waitFor } from '@testing-library/react';
|
|
4
|
-
import userEvent, {} from '@testing-library/user-event';
|
|
5
|
-
import dayjs from 'dayjs';
|
|
6
|
-
import i18n from '@cccsaurora/howler-ui/i18n';
|
|
7
|
-
import { I18nextProvider } from 'react-i18next';
|
|
8
|
-
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
|
9
|
-
import CaseDateFilter from './CaseDateFilter';
|
|
10
|
-
globalThis.IS_REACT_ACT_ENVIRONMENT = true;
|
|
11
|
-
// ---------------------------------------------------------------------------
|
|
12
|
-
// Stub the date pickers so jsdom doesn't choke on them
|
|
13
|
-
// ---------------------------------------------------------------------------
|
|
14
|
-
vi.mock('@mui/x-date-pickers/DateTimePicker', () => ({
|
|
15
|
-
DateTimePicker: ({ label, onChange }) => (_jsx("button", { id: `picker-${label}`, onClick: () => onChange(dayjs('2025-06-01')), children: label }))
|
|
16
|
-
}));
|
|
17
|
-
// ---------------------------------------------------------------------------
|
|
18
|
-
// Wrapper / render helper
|
|
19
|
-
// ---------------------------------------------------------------------------
|
|
20
|
-
const FIXED_START = dayjs('2025-01-01');
|
|
21
|
-
const FIXED_END = dayjs('2025-03-01');
|
|
22
|
-
const Wrapper = ({ children }) => _jsx(I18nextProvider, { i18n: i18n, children: children });
|
|
23
|
-
const renderFilter = ({ dateRange = 'date.range.all', onChange = vi.fn(), onCustomStartChange = vi.fn(), onCustomEndChange = vi.fn() } = {}) => render(_jsx(CaseDateFilter, { dateRange: dateRange, onChange: onChange, customStart: FIXED_START, customEnd: FIXED_END, onCustomStartChange: onCustomStartChange, onCustomEndChange: onCustomEndChange }), { wrapper: Wrapper });
|
|
24
|
-
const openPopper = async (user) => {
|
|
25
|
-
// The chip label varies; find the chip by the AvTimer icon's sibling
|
|
26
|
-
const chip = document.querySelector('.MuiChip-root');
|
|
27
|
-
await user.click(chip);
|
|
28
|
-
await waitFor(() => {
|
|
29
|
-
expect(screen.getByRole('combobox')).toBeInTheDocument();
|
|
30
|
-
});
|
|
31
|
-
};
|
|
32
|
-
// ---------------------------------------------------------------------------
|
|
33
|
-
// Tests
|
|
34
|
-
// ---------------------------------------------------------------------------
|
|
35
|
-
describe('CaseDateFilter', () => {
|
|
36
|
-
let user;
|
|
37
|
-
beforeEach(() => {
|
|
38
|
-
user = userEvent.setup();
|
|
39
|
-
vi.clearAllMocks();
|
|
40
|
-
});
|
|
41
|
-
describe('label', () => {
|
|
42
|
-
it('shows "Date Range" label when date.range.all is selected', () => {
|
|
43
|
-
renderFilter({ dateRange: 'date.range.all' });
|
|
44
|
-
expect(screen.getByText(i18n.t('route.cases.filter.date'))).toBeInTheDocument();
|
|
45
|
-
});
|
|
46
|
-
it('shows the translated range label for a non-all preset', () => {
|
|
47
|
-
renderFilter({ dateRange: 'date.range.1.week' });
|
|
48
|
-
expect(screen.getByText(i18n.t('date.range.1.week'))).toBeInTheDocument();
|
|
49
|
-
});
|
|
50
|
-
it('shows formatted start/end dates for the custom range', () => {
|
|
51
|
-
renderFilter({ dateRange: 'date.range.custom' });
|
|
52
|
-
const expected = `${FIXED_START.format('YYYY-MM-DD')} ${i18n.t('to')} ${FIXED_END.format('YYYY-MM-DD')}`;
|
|
53
|
-
expect(screen.getByText(expected)).toBeInTheDocument();
|
|
54
|
-
});
|
|
55
|
-
});
|
|
56
|
-
describe('chip color', () => {
|
|
57
|
-
it('uses default color for date.range.all', () => {
|
|
58
|
-
renderFilter({ dateRange: 'date.range.all' });
|
|
59
|
-
const chip = document.querySelector('.MuiChip-root');
|
|
60
|
-
expect(chip).not.toHaveClass('MuiChip-colorPrimary');
|
|
61
|
-
});
|
|
62
|
-
it('uses primary color for any non-all range', () => {
|
|
63
|
-
renderFilter({ dateRange: 'date.range.1.day' });
|
|
64
|
-
const chip = document.querySelector('.MuiChip-root');
|
|
65
|
-
expect(chip).toHaveClass('MuiChip-colorPrimary');
|
|
66
|
-
});
|
|
67
|
-
});
|
|
68
|
-
describe('popper content', () => {
|
|
69
|
-
it('does not show the autocomplete before the chip is clicked', () => {
|
|
70
|
-
renderFilter();
|
|
71
|
-
expect(screen.queryByRole('combobox')).toBeNull();
|
|
72
|
-
});
|
|
73
|
-
it('shows the range autocomplete after the chip is clicked', async () => {
|
|
74
|
-
renderFilter();
|
|
75
|
-
await openPopper(user);
|
|
76
|
-
expect(screen.getByRole('combobox')).toBeInTheDocument();
|
|
77
|
-
});
|
|
78
|
-
it('does not show date pickers when a preset (non-custom) range is active', async () => {
|
|
79
|
-
renderFilter({ dateRange: 'date.range.1.day' });
|
|
80
|
-
await openPopper(user);
|
|
81
|
-
expect(screen.queryByTestId(`picker-${i18n.t('date.select.start')}`)).toBeNull();
|
|
82
|
-
});
|
|
83
|
-
it('shows start and end date pickers when custom range is active', async () => {
|
|
84
|
-
renderFilter({ dateRange: 'date.range.custom' });
|
|
85
|
-
await openPopper(user);
|
|
86
|
-
expect(screen.getByTestId(`picker-${i18n.t('date.select.start')}`)).toBeInTheDocument();
|
|
87
|
-
expect(screen.getByTestId(`picker-${i18n.t('date.select.end')}`)).toBeInTheDocument();
|
|
88
|
-
});
|
|
89
|
-
});
|
|
90
|
-
describe('interactions', () => {
|
|
91
|
-
it('calls onChange when a range option is selected from the autocomplete', async () => {
|
|
92
|
-
const onChange = vi.fn();
|
|
93
|
-
renderFilter({ dateRange: 'date.range.all', onChange });
|
|
94
|
-
await openPopper(user);
|
|
95
|
-
await user.click(screen.getByRole('combobox'));
|
|
96
|
-
const option = await screen.findByRole('option', { name: i18n.t('date.range.1.week') });
|
|
97
|
-
await user.click(option);
|
|
98
|
-
expect(onChange).toHaveBeenCalledWith('date.range.1.week');
|
|
99
|
-
});
|
|
100
|
-
it('calls onCustomStartChange when the start date picker fires', async () => {
|
|
101
|
-
const onCustomStartChange = vi.fn();
|
|
102
|
-
renderFilter({ dateRange: 'date.range.custom', onCustomStartChange });
|
|
103
|
-
await openPopper(user);
|
|
104
|
-
await user.click(screen.getByTestId(`picker-${i18n.t('date.select.start')}`));
|
|
105
|
-
expect(onCustomStartChange).toHaveBeenCalledWith(dayjs('2025-06-01'));
|
|
106
|
-
});
|
|
107
|
-
it('calls onCustomEndChange when the end date picker fires', async () => {
|
|
108
|
-
const onCustomEndChange = vi.fn();
|
|
109
|
-
renderFilter({ dateRange: 'date.range.custom', onCustomEndChange });
|
|
110
|
-
await openPopper(user);
|
|
111
|
-
await user.click(screen.getByTestId(`picker-${i18n.t('date.select.end')}`));
|
|
112
|
-
expect(onCustomEndChange).toHaveBeenCalledWith(dayjs('2025-06-01'));
|
|
113
|
-
});
|
|
114
|
-
});
|
|
115
|
-
});
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { FilterList } from '@mui/icons-material';
|
|
3
|
-
import { ToggleButton, ToggleButtonGroup, Typography } from '@mui/material';
|
|
4
|
-
import ChipPopper from '@cccsaurora/howler-ui/components/elements/display/ChipPopper';
|
|
5
|
-
import { useTranslation } from 'react-i18next';
|
|
6
|
-
import { CASE_STATUSES } from '../constants';
|
|
7
|
-
const CaseStatusFilter = ({ statusFilter, onChange }) => {
|
|
8
|
-
const { t } = useTranslation();
|
|
9
|
-
return (_jsx(ChipPopper, { icon: _jsx(FilterList, { fontSize: "small" }), label: _jsx(Typography, { variant: "body2", children: statusFilter.length === 0
|
|
10
|
-
? t('route.cases.filter.status')
|
|
11
|
-
: statusFilter.map(s => t(`page.cases.status.${s}`)).join(', ') }), minWidth: "200px", slotProps: { chip: { size: 'small', color: statusFilter.length > 0 ? 'primary' : 'default' } }, children: _jsx(ToggleButtonGroup, { value: statusFilter, onChange: (_, nv) => onChange(nv), size: "small", orientation: "vertical", sx: { width: '100%' }, children: CASE_STATUSES.map(s => (_jsx(ToggleButton, { value: s, sx: { justifyContent: 'flex-start' }, children: t(`page.cases.status.${s}`) }, s))) }) }));
|
|
12
|
-
};
|
|
13
|
-
export default CaseStatusFilter;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
/// <reference types="vitest" />
|
|
3
|
-
import { render, screen, waitFor } from '@testing-library/react';
|
|
4
|
-
import userEvent, {} from '@testing-library/user-event';
|
|
5
|
-
import i18n from '@cccsaurora/howler-ui/i18n';
|
|
6
|
-
import { I18nextProvider } from 'react-i18next';
|
|
7
|
-
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
|
8
|
-
import CaseStatusFilter from './CaseStatusFilter';
|
|
9
|
-
globalThis.IS_REACT_ACT_ENVIRONMENT = true;
|
|
10
|
-
const Wrapper = ({ children }) => _jsx(I18nextProvider, { i18n: i18n, children: children });
|
|
11
|
-
const renderFilter = (statusFilter, onChange = vi.fn()) => render(_jsx(CaseStatusFilter, { statusFilter: statusFilter, onChange: onChange }), { wrapper: Wrapper });
|
|
12
|
-
const openPopper = async (user) => {
|
|
13
|
-
const chip = screen.getByText(i18n.t('route.cases.filter.status')).closest('.MuiChip-root');
|
|
14
|
-
await user.click(chip);
|
|
15
|
-
await waitFor(() => {
|
|
16
|
-
expect(screen.getByRole('group')).toBeInTheDocument();
|
|
17
|
-
});
|
|
18
|
-
};
|
|
19
|
-
describe('CaseStatusFilter', () => {
|
|
20
|
-
let user;
|
|
21
|
-
beforeEach(() => {
|
|
22
|
-
user = userEvent.setup();
|
|
23
|
-
vi.clearAllMocks();
|
|
24
|
-
});
|
|
25
|
-
describe('label', () => {
|
|
26
|
-
it('shows the default "Status" label when no statuses are selected', () => {
|
|
27
|
-
renderFilter([]);
|
|
28
|
-
expect(screen.getByText(i18n.t('route.cases.filter.status'))).toBeInTheDocument();
|
|
29
|
-
});
|
|
30
|
-
it('shows a comma-separated list of status labels when statuses are selected', () => {
|
|
31
|
-
renderFilter(['open', 'on-hold']);
|
|
32
|
-
const expected = [i18n.t('page.cases.status.open'), i18n.t('page.cases.status.on-hold')].join(', ');
|
|
33
|
-
expect(screen.getByText(expected)).toBeInTheDocument();
|
|
34
|
-
});
|
|
35
|
-
it('shows a single status label when one status is selected', () => {
|
|
36
|
-
renderFilter(['resolved']);
|
|
37
|
-
expect(screen.getByText(i18n.t('page.cases.status.resolved'))).toBeInTheDocument();
|
|
38
|
-
});
|
|
39
|
-
});
|
|
40
|
-
describe('chip color', () => {
|
|
41
|
-
it('uses default color when no statuses are selected', () => {
|
|
42
|
-
renderFilter([]);
|
|
43
|
-
const chip = screen.getByText(i18n.t('route.cases.filter.status')).closest('.MuiChip-root');
|
|
44
|
-
expect(chip).not.toHaveClass('MuiChip-colorPrimary');
|
|
45
|
-
});
|
|
46
|
-
it('uses primary color when statuses are selected', () => {
|
|
47
|
-
renderFilter(['open']);
|
|
48
|
-
const chip = screen.getByText(i18n.t('page.cases.status.open')).closest('.MuiChip-root');
|
|
49
|
-
expect(chip).toHaveClass('MuiChip-colorPrimary');
|
|
50
|
-
});
|
|
51
|
-
});
|
|
52
|
-
describe('popper content', () => {
|
|
53
|
-
it('does not show toggle buttons before the chip is clicked', () => {
|
|
54
|
-
renderFilter([]);
|
|
55
|
-
expect(screen.queryByRole('group')).toBeNull();
|
|
56
|
-
});
|
|
57
|
-
it('shows all four status toggle buttons when the chip is clicked', async () => {
|
|
58
|
-
renderFilter([]);
|
|
59
|
-
await openPopper(user);
|
|
60
|
-
expect(screen.getByText(i18n.t('page.cases.status.open'))).toBeInTheDocument();
|
|
61
|
-
expect(screen.getByText(i18n.t('page.cases.status.in-progress'))).toBeInTheDocument();
|
|
62
|
-
expect(screen.getByText(i18n.t('page.cases.status.on-hold'))).toBeInTheDocument();
|
|
63
|
-
expect(screen.getByText(i18n.t('page.cases.status.resolved'))).toBeInTheDocument();
|
|
64
|
-
});
|
|
65
|
-
});
|
|
66
|
-
describe('interactions', () => {
|
|
67
|
-
it('calls onChange when a toggle button is clicked', async () => {
|
|
68
|
-
const onChange = vi.fn();
|
|
69
|
-
renderFilter([], onChange);
|
|
70
|
-
await openPopper(user);
|
|
71
|
-
await user.click(screen.getByText(i18n.t('page.cases.status.open')));
|
|
72
|
-
expect(onChange).toHaveBeenCalledWith(['open']);
|
|
73
|
-
});
|
|
74
|
-
it('calls onChange with empty array when the only selected status is deselected', async () => {
|
|
75
|
-
const onChange = vi.fn();
|
|
76
|
-
renderFilter(['open'], onChange);
|
|
77
|
-
const chip = screen.getByText(i18n.t('page.cases.status.open')).closest('.MuiChip-root');
|
|
78
|
-
await user.click(chip);
|
|
79
|
-
await waitFor(() => {
|
|
80
|
-
expect(screen.getByRole('group')).toBeInTheDocument();
|
|
81
|
-
});
|
|
82
|
-
await user.click(screen.getAllByText(i18n.t('page.cases.status.open'))[1]);
|
|
83
|
-
expect(onChange).toHaveBeenCalledWith([]);
|
|
84
|
-
});
|
|
85
|
-
});
|
|
86
|
-
});
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { FilterList } from '@mui/icons-material';
|
|
3
|
-
import { Autocomplete, TextField } from '@mui/material';
|
|
4
|
-
import { ParameterContext } from '@cccsaurora/howler-ui/components/app/providers/ParameterProvider';
|
|
5
|
-
import ChipPopper from '@cccsaurora/howler-ui/components/elements/display/ChipPopper';
|
|
6
|
-
import { memo } from 'react';
|
|
7
|
-
import { useTranslation } from 'react-i18next';
|
|
8
|
-
import { useContextSelector } from 'use-context-selector';
|
|
9
|
-
const FILTER_OPTIONS = [
|
|
10
|
-
{ label: 'hit.search.index.hit', value: 'hit' },
|
|
11
|
-
{ label: 'hit.search.index.observable', value: 'observable' }
|
|
12
|
-
];
|
|
13
|
-
const IndexPicker = () => {
|
|
14
|
-
const { t } = useTranslation();
|
|
15
|
-
const indexes = useContextSelector(ParameterContext, ctx => ctx.indexes);
|
|
16
|
-
const setIndexes = useContextSelector(ParameterContext, ctx => ctx.setIndexes);
|
|
17
|
-
const selectedOptions = FILTER_OPTIONS.filter(opt => indexes.includes(opt.value));
|
|
18
|
-
return (_jsx(ChipPopper, { icon: _jsx(FilterList, { fontSize: "small" }), label: selectedOptions.map(opt => t(opt.label)).join(', '), minWidth: "225px", slotProps: { chip: { size: 'small' } }, children: _jsx(Autocomplete, { size: "small", multiple: true, options: FILTER_OPTIONS, value: selectedOptions, onChange: (_ev, values) => values.length > 0 && setIndexes(values.map(val => val.value)), isOptionEqualToValue: (opt, val) => opt.value === val.value, getOptionLabel: opt => t(opt.label), renderInput: params => _jsx(TextField, { ...params }) }) }));
|
|
19
|
-
};
|
|
20
|
-
export default memo(IndexPicker);
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Box, Skeleton } from '@mui/material';
|
|
3
|
-
import api from '@cccsaurora/howler-ui/api';
|
|
4
|
-
import ObjectDetails from '@cccsaurora/howler-ui/components/elements/ObjectDetails';
|
|
5
|
-
import useMyApi from '@cccsaurora/howler-ui/components/hooks/useMyApi';
|
|
6
|
-
import { useEffect, useState } from 'react';
|
|
7
|
-
const ObservableViewer = ({ observable: provided, observableId }) => {
|
|
8
|
-
const { dispatchApi } = useMyApi();
|
|
9
|
-
const [observable, setObservable] = useState(null);
|
|
10
|
-
useEffect(() => {
|
|
11
|
-
if (provided) {
|
|
12
|
-
setObservable(provided);
|
|
13
|
-
}
|
|
14
|
-
}, [provided]);
|
|
15
|
-
useEffect(() => {
|
|
16
|
-
if (observableId) {
|
|
17
|
-
dispatchApi(api.v2.search.post('observable', { query: `howler.id:${observableId}`, rows: 1 }), {
|
|
18
|
-
throwError: false
|
|
19
|
-
}).then(res => setObservable(res.items[0]));
|
|
20
|
-
}
|
|
21
|
-
}, [dispatchApi, observableId]);
|
|
22
|
-
if (!observable) {
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
return _jsx(Box, { p: 1, children: observable ? _jsx(ObjectDetails, { obj: observable }) : _jsx(Skeleton, { height: 120 }) });
|
|
26
|
-
};
|
|
27
|
-
export default ObservableViewer;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { FileHash } from './FileHash';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* NOTE: This is an auto-generated file. Don't edit this manually.
|
|
5
|
-
*/
|
|
6
|
-
export interface AttachmentsFile {
|
|
7
|
-
extension?: string;
|
|
8
|
-
hash?: FileHash;
|
|
9
|
-
mime_type?: string;
|
|
10
|
-
name?: string;
|
|
11
|
-
size?: number;
|
|
12
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { Enrichments } from './Enrichments';
|
|
2
|
-
import type { Item } from './Item';
|
|
3
|
-
import type { Rule } from './Rule';
|
|
4
|
-
import type { Task } from './Task';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* NOTE: This is an auto-generated file. Don't edit this manually.
|
|
8
|
-
*/
|
|
9
|
-
export interface Case {
|
|
10
|
-
case_id?: string;
|
|
11
|
-
created?: string;
|
|
12
|
-
end?: string;
|
|
13
|
-
enrichments?: Enrichments;
|
|
14
|
-
escalation?: string;
|
|
15
|
-
indicators?: string[];
|
|
16
|
-
items?: Item[];
|
|
17
|
-
overview?: string;
|
|
18
|
-
participants?: string[];
|
|
19
|
-
rules?: Rule[];
|
|
20
|
-
status?: string;
|
|
21
|
-
start?: string;
|
|
22
|
-
summary?: string;
|
|
23
|
-
targets?: string[];
|
|
24
|
-
tasks?: Task[];
|
|
25
|
-
threats?: string[];
|
|
26
|
-
title?: string;
|
|
27
|
-
updated?: string;
|
|
28
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { AutonomousSystems } from './AutonomousSystems';
|
|
2
|
-
import type { Geo } from './Geo';
|
|
3
|
-
import type { Nat } from './Nat';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* NOTE: This is an auto-generated file. Don't edit this manually.
|
|
7
|
-
*/
|
|
8
|
-
export interface DestinationOriginal {
|
|
9
|
-
address?: string;
|
|
10
|
-
autonomous_systems?: AutonomousSystems;
|
|
11
|
-
bytes?: number;
|
|
12
|
-
domain?: string;
|
|
13
|
-
geo?: Geo;
|
|
14
|
-
ip?: string;
|
|
15
|
-
mac?: string;
|
|
16
|
-
nat?: Nat;
|
|
17
|
-
packets?: number;
|
|
18
|
-
port?: number;
|
|
19
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { Bcc } from './Bcc';
|
|
2
|
-
import type { Cc } from './Cc';
|
|
3
|
-
import type { From } from './From';
|
|
4
|
-
import type { To } from './To';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* NOTE: This is an auto-generated file. Don't edit this manually.
|
|
8
|
-
*/
|
|
9
|
-
export interface EmailParent {
|
|
10
|
-
bcc?: Bcc;
|
|
11
|
-
cc?: Cc;
|
|
12
|
-
destination?: string;
|
|
13
|
-
from?: From;
|
|
14
|
-
message_id?: string;
|
|
15
|
-
origination_timestamp?: string;
|
|
16
|
-
source?: string;
|
|
17
|
-
subject?: string;
|
|
18
|
-
to?: To;
|
|
19
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { IndicatorEmail } from './IndicatorEmail';
|
|
2
|
-
import type { IndicatorFile } from './IndicatorFile';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* NOTE: This is an auto-generated file. Don't edit this manually.
|
|
6
|
-
*/
|
|
7
|
-
export interface EnrichmentsIndicator {
|
|
8
|
-
confidence?: string;
|
|
9
|
-
description?: string;
|
|
10
|
-
email?: IndicatorEmail;
|
|
11
|
-
file?: IndicatorFile;
|
|
12
|
-
first_seen?: string;
|
|
13
|
-
ip?: string;
|
|
14
|
-
last_seen?: string;
|
|
15
|
-
port?: number;
|
|
16
|
-
provider?: string;
|
|
17
|
-
reference?: string;
|
|
18
|
-
scanner_stats?: number;
|
|
19
|
-
sightings?: number;
|
|
20
|
-
type?: string;
|
|
21
|
-
}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import type { Agent } from './Agent';
|
|
2
|
-
import type { Assemblyline } from './Assemblyline';
|
|
3
|
-
import type { Aws } from './Aws';
|
|
4
|
-
import type { Azure } from './Azure';
|
|
5
|
-
import type { Cbs } from './Cbs';
|
|
6
|
-
import type { Clue } from './Clue';
|
|
7
|
-
import type { Container } from './Container';
|
|
8
|
-
import type { Dns } from './Dns';
|
|
9
|
-
import type { Ecs } from './Ecs';
|
|
10
|
-
import type { Error } from './Error';
|
|
11
|
-
import type { Event } from './Event';
|
|
12
|
-
import type { Faas } from './Faas';
|
|
13
|
-
import type { Gcp } from './Gcp';
|
|
14
|
-
import type { Group } from './Group';
|
|
15
|
-
import type { Host } from './Host';
|
|
16
|
-
import type { Interface } from './Interface';
|
|
17
|
-
import type { Network } from './Network';
|
|
18
|
-
import type { ObservableCloud } from './ObservableCloud';
|
|
19
|
-
import type { ObservableDestination } from './ObservableDestination';
|
|
20
|
-
import type { ObservableEmail } from './ObservableEmail';
|
|
21
|
-
import type { ObservableFile } from './ObservableFile';
|
|
22
|
-
import type { ObservableHowler } from './ObservableHowler';
|
|
23
|
-
import type { ObservableHttp } from './ObservableHttp';
|
|
24
|
-
import type { ObservableObserver } from './ObservableObserver';
|
|
25
|
-
import type { ObservableOrganization } from './ObservableOrganization';
|
|
26
|
-
import type { ObservableProcess } from './ObservableProcess';
|
|
27
|
-
import type { ObservableSource } from './ObservableSource';
|
|
28
|
-
import type { ObservableThreat } from './ObservableThreat';
|
|
29
|
-
import type { ObservableTls } from './ObservableTls';
|
|
30
|
-
import type { Registry } from './Registry';
|
|
31
|
-
import type { Related } from './Related';
|
|
32
|
-
import type { Rule } from './Rule';
|
|
33
|
-
import type { Server } from './Server';
|
|
34
|
-
import type { Url } from './Url';
|
|
35
|
-
import type { User } from './User';
|
|
36
|
-
import type { UserAgent } from './UserAgent';
|
|
37
|
-
import type { Vulnerability } from './Vulnerability';
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* NOTE: This is an auto-generated file. Don't edit this manually.
|
|
41
|
-
*/
|
|
42
|
-
export interface Observable {
|
|
43
|
-
__index: 'observable';
|
|
44
|
-
agent?: Agent;
|
|
45
|
-
assemblyline?: Assemblyline;
|
|
46
|
-
aws?: Aws;
|
|
47
|
-
azure?: Azure;
|
|
48
|
-
cbs?: Cbs;
|
|
49
|
-
cloud?: ObservableCloud;
|
|
50
|
-
clue?: Clue;
|
|
51
|
-
container?: Container;
|
|
52
|
-
destination?: ObservableDestination;
|
|
53
|
-
dns?: Dns;
|
|
54
|
-
ecs?: Ecs;
|
|
55
|
-
email?: ObservableEmail;
|
|
56
|
-
error?: Error;
|
|
57
|
-
event?: Event;
|
|
58
|
-
faas?: Faas;
|
|
59
|
-
file?: ObservableFile;
|
|
60
|
-
gcp?: Gcp;
|
|
61
|
-
group?: Group;
|
|
62
|
-
host?: Host;
|
|
63
|
-
howler: ObservableHowler;
|
|
64
|
-
http?: ObservableHttp;
|
|
65
|
-
interface?: Interface;
|
|
66
|
-
labels?: { [index: string]: string };
|
|
67
|
-
message?: string;
|
|
68
|
-
network?: Network;
|
|
69
|
-
observer?: ObservableObserver;
|
|
70
|
-
organization?: ObservableOrganization;
|
|
71
|
-
process?: ObservableProcess;
|
|
72
|
-
registry?: Registry;
|
|
73
|
-
related?: Related;
|
|
74
|
-
rule?: Rule;
|
|
75
|
-
server?: Server;
|
|
76
|
-
source?: ObservableSource;
|
|
77
|
-
tags?: string[];
|
|
78
|
-
threat?: ObservableThreat;
|
|
79
|
-
timestamp: string;
|
|
80
|
-
tls?: ObservableTls;
|
|
81
|
-
url?: Url;
|
|
82
|
-
user?: User;
|
|
83
|
-
user_agent?: UserAgent;
|
|
84
|
-
vulnerability?: Vulnerability;
|
|
85
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { CloudAccount } from './CloudAccount';
|
|
2
|
-
import type { Instance } from './Instance';
|
|
3
|
-
import type { Machine } from './Machine';
|
|
4
|
-
import type { Project } from './Project';
|
|
5
|
-
import type { Service } from './Service';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* NOTE: This is an auto-generated file. Don't edit this manually.
|
|
9
|
-
*/
|
|
10
|
-
export interface ObservableCloud {
|
|
11
|
-
account?: CloudAccount;
|
|
12
|
-
availability_zone?: string;
|
|
13
|
-
instance?: Instance;
|
|
14
|
-
machine?: Machine;
|
|
15
|
-
project?: Project;
|
|
16
|
-
provider?: string;
|
|
17
|
-
region?: string;
|
|
18
|
-
service?: Service;
|
|
19
|
-
tenant_id?: string;
|
|
20
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { AutonomousSystems } from './AutonomousSystems';
|
|
2
|
-
import type { DestinationOriginal } from './DestinationOriginal';
|
|
3
|
-
import type { Geo } from './Geo';
|
|
4
|
-
import type { Nat } from './Nat';
|
|
5
|
-
import type { User } from './User';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* NOTE: This is an auto-generated file. Don't edit this manually.
|
|
9
|
-
*/
|
|
10
|
-
export interface ObservableDestination {
|
|
11
|
-
address?: string;
|
|
12
|
-
autonomous_systems?: AutonomousSystems;
|
|
13
|
-
bytes?: number;
|
|
14
|
-
domain?: string;
|
|
15
|
-
geo?: Geo;
|
|
16
|
-
ip?: string;
|
|
17
|
-
mac?: string;
|
|
18
|
-
nat?: Nat;
|
|
19
|
-
original?: DestinationOriginal;
|
|
20
|
-
packets?: number;
|
|
21
|
-
port?: number;
|
|
22
|
-
user?: User;
|
|
23
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { Bcc } from './Bcc';
|
|
2
|
-
import type { Cc } from './Cc';
|
|
3
|
-
import type { EmailAttachment } from './EmailAttachment';
|
|
4
|
-
import type { EmailParent } from './EmailParent';
|
|
5
|
-
import type { From } from './From';
|
|
6
|
-
import type { ReplyTo } from './ReplyTo';
|
|
7
|
-
import type { Sender } from './Sender';
|
|
8
|
-
import type { To } from './To';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* NOTE: This is an auto-generated file. Don't edit this manually.
|
|
12
|
-
*/
|
|
13
|
-
export interface ObservableEmail {
|
|
14
|
-
attachments?: EmailAttachment[];
|
|
15
|
-
bcc?: Bcc;
|
|
16
|
-
cc?: Cc;
|
|
17
|
-
content_type?: string;
|
|
18
|
-
delivery_timestamp?: string;
|
|
19
|
-
direction?: string;
|
|
20
|
-
from?: From;
|
|
21
|
-
local_id?: string;
|
|
22
|
-
message_id?: string;
|
|
23
|
-
origination_timestamp?: string;
|
|
24
|
-
parent?: EmailParent;
|
|
25
|
-
reply_to?: ReplyTo;
|
|
26
|
-
sender?: Sender;
|
|
27
|
-
subject?: string;
|
|
28
|
-
to?: To;
|
|
29
|
-
x_mailer?: string;
|
|
30
|
-
}
|