Skip to content

Commit

Permalink
[backend] add label and isFilterable up to groupings (#4939)
Browse files Browse the repository at this point in the history
  • Loading branch information
Archidoit committed Dec 19, 2023
1 parent 646fe4b commit 9e8b58f
Show file tree
Hide file tree
Showing 13 changed files with 52 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ const ADMINISTRATIVE_AREA_DEFINITION: ModuleDefinition<StoreEntityAdministrative
},
},
attributes: [
{ name: 'name', type: 'string', mandatoryType: 'external', editDefault: true, multiple: false, upsert: true },
{ name: 'description', type: 'string', mandatoryType: 'customizable', editDefault: true, multiple: false, upsert: true },
{ name: 'latitude', type: 'numeric', mandatoryType: 'customizable', editDefault: true, multiple: false, upsert: true },
{ name: 'longitude', type: 'numeric', mandatoryType: 'customizable', editDefault: true, multiple: false, upsert: true },
{ name: 'name', label: 'Name', type: 'string', mandatoryType: 'external', editDefault: true, multiple: false, upsert: true, isFilterable: true },
{ name: 'description', label: 'Description', type: 'string', mandatoryType: 'customizable', editDefault: true, multiple: false, upsert: true, isFilterable: true },
{ name: 'latitude', label: 'Latitude', type: 'numeric', mandatoryType: 'customizable', editDefault: true, multiple: false, upsert: true, isFilterable: true },
{ name: 'longitude', label: 'Longitude', type: 'numeric', mandatoryType: 'customizable', editDefault: true, multiple: false, upsert: true, isFilterable: true },
entityLocationType,
],
relations: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ const CASE_INCIDENT_DEFINITION: ModuleDefinition<StoreEntityCaseIncident, StixCa
},
},
attributes: [
{ name: 'created', type: 'date', mandatoryType: 'external', editDefault: true, multiple: false, upsert: true },
{ name: 'severity', type: 'string', mandatoryType: 'customizable', editDefault: true, multiple: false, upsert: true },
{ name: 'priority', type: 'string', mandatoryType: 'customizable', editDefault: true, multiple: false, upsert: true },
{ name: 'response_types', type: 'string', mandatoryType: 'customizable', editDefault: true, multiple: true, upsert: true, label: 'Incident type' },
{ name: 'created', label: 'Created', type: 'date', mandatoryType: 'external', editDefault: true, multiple: false, upsert: true, isFilterable: true },
{ name: 'severity', label: 'Severity', type: 'string', mandatoryType: 'customizable', editDefault: true, multiple: false, upsert: true, isFilterable: true },
{ name: 'priority', label: 'Priority', type: 'string', mandatoryType: 'customizable', editDefault: true, multiple: false, upsert: true, isFilterable: true },
{ name: 'response_types', label: 'Incident type', type: 'string', mandatoryType: 'customizable', editDefault: true, multiple: true, upsert: true, isFilterable: true },
],
relations: [],
relationsRefs: [createdBy, objectMarking, objectAssignee, objectParticipant],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ const CASE_RFI_DEFINITION: ModuleDefinition<StoreEntityCaseRfi, StixCaseRfi> = {
},
},
attributes: [
{ name: 'name', type: 'string', mandatoryType: 'external', editDefault: true, multiple: false, upsert: true },
{ name: 'created', type: 'date', mandatoryType: 'external', editDefault: true, multiple: false, upsert: true },
{ name: 'information_types', type: 'string', mandatoryType: 'customizable', editDefault: true, multiple: true, upsert: true, label: 'information_types' },
{ name: 'severity', type: 'string', mandatoryType: 'customizable', editDefault: true, multiple: false, upsert: true },
{ name: 'priority', type: 'string', mandatoryType: 'customizable', editDefault: true, multiple: false, upsert: true },
{ name: 'name', label: 'Name', type: 'string', mandatoryType: 'external', editDefault: true, multiple: false, upsert: true, isFilterable: true },
{ name: 'created', label: 'Created', type: 'date', mandatoryType: 'external', editDefault: true, multiple: false, upsert: true, isFilterable: true },
{ name: 'information_types', label: 'Information types', type: 'string', mandatoryType: 'customizable', editDefault: true, multiple: true, upsert: true, isFilterable: true },
{ name: 'severity', label: 'Severity', type: 'string', mandatoryType: 'customizable', editDefault: true, multiple: false, upsert: true, isFilterable: true },
{ name: 'priority', label: 'Priority', type: 'string', mandatoryType: 'customizable', editDefault: true, multiple: false, upsert: true, isFilterable: true },
],
relations: [],
relationsRefs: [createdBy, objectMarking, objectAssignee, objectParticipant],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ const CASE_RFT_DEFINITION: ModuleDefinition<StoreEntityCaseRft, StixCaseRft> = {
},
},
attributes: [
{ name: 'name', type: 'string', mandatoryType: 'external', editDefault: true, multiple: false, upsert: true },
{ name: 'created', type: 'date', mandatoryType: 'external', editDefault: true, multiple: false, upsert: true },
{ name: 'takedown_types', type: 'string', mandatoryType: 'customizable', editDefault: true, multiple: true, upsert: true, label: 'takedown_types' },
{ name: 'severity', type: 'string', mandatoryType: 'customizable', editDefault: true, multiple: false, upsert: true },
{ name: 'priority', type: 'string', mandatoryType: 'customizable', editDefault: true, multiple: false, upsert: true },
{ name: 'name', label: 'Name', type: 'string', mandatoryType: 'external', editDefault: true, multiple: false, upsert: true, isFilterable: true },
{ name: 'created', label: 'Created', type: 'date', mandatoryType: 'external', editDefault: true, multiple: false, upsert: true, isFilterable: true },
{ name: 'takedown_types', label: 'Takedown types', type: 'string', mandatoryType: 'customizable', editDefault: true, multiple: true, upsert: true, isFilterable: true },
{ name: 'severity', label: 'Severity', type: 'string', mandatoryType: 'customizable', editDefault: true, multiple: false, upsert: true, isFilterable: true },
{ name: 'priority', label: 'Priority', type: 'string', mandatoryType: 'customizable', editDefault: true, multiple: false, upsert: true, isFilterable: true },
],
relations: [],
relationsRefs: [createdBy, objectMarking, objectAssignee, objectParticipant],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ const CASE_TEMPLATE_DEFINITION: ModuleDefinition<StoreEntityCaseTemplate, StixCa
},
},
attributes: [
{ name: 'name', type: 'string', mandatoryType: 'external', editDefault: true, multiple: false, upsert: true },
{ name: 'description', type: 'string', mandatoryType: 'no', editDefault: false, multiple: false, upsert: true },
{ name: 'name', label: 'Name', type: 'string', mandatoryType: 'external', editDefault: true, multiple: false, upsert: true, isFilterable: true },
{ name: 'description', label: 'Description', type: 'string', mandatoryType: 'no', editDefault: false, multiple: false, upsert: true, isFilterable: true },
],
relations: [],
relationsRefs: [CaseTemplateToTaskTemplateRelation],
Expand Down
10 changes: 5 additions & 5 deletions opencti-platform/opencti-graphql/src/modules/case/case.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ const CASE_DEFINITION: ModuleDefinition<StoreEntityCase, StixCase> = {
},
},
attributes: [
{ name: 'name', type: 'string', mandatoryType: 'external', editDefault: true, multiple: false, upsert: true },
{ name: 'description', type: 'string', mandatoryType: 'customizable', editDefault: true, multiple: false, upsert: true },
{ name: 'content', type: 'string', mandatoryType: 'customizable', editDefault: true, multiple: false, upsert: true },
{ name: 'content_mapping', type: 'string', mandatoryType: 'no', editDefault: false, multiple: false, upsert: true },
{ name: 'caseTemplate', type: 'string', mandatoryType: 'no', editDefault: false, multiple: false, upsert: true },
{ name: 'name', label: 'Name', type: 'string', mandatoryType: 'external', editDefault: true, multiple: false, upsert: true, isFilterable: true },
{ name: 'description', label: 'Description', type: 'string', mandatoryType: 'customizable', editDefault: true, multiple: false, upsert: true, isFilterable: true },
{ name: 'content', label: 'Content', type: 'string', mandatoryType: 'customizable', editDefault: true, multiple: false, upsert: true, isFilterable: true },
{ name: 'content_mapping', label: 'Content mapping', type: 'string', mandatoryType: 'no', editDefault: false, multiple: false, upsert: true, isFilterable: true },
{ name: 'caseTemplate', label: 'Case template', type: 'string', mandatoryType: 'no', editDefault: false, multiple: false, upsert: true, isFilterable: true },
],
relations: [],
relationsRefs: [objectOrganization],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ const FEEDBACK_DEFINITION: ModuleDefinition<StoreEntityFeedback, StixFeedback> =
},
},
attributes: [
{ name: 'rating', type: 'numeric', mandatoryType: 'external', editDefault: true, multiple: false, upsert: true },
{ name: 'authorized_members', type: 'json', mandatoryType: 'no', editDefault: true, multiple: true, upsert: false }
{ name: 'rating', label: 'Rating', type: 'numeric', mandatoryType: 'external', editDefault: true, multiple: false, upsert: true, isFilterable: true },
{ name: 'authorized_members', label: 'Authorized members', type: 'json', mandatoryType: 'no', editDefault: true, multiple: true, upsert: false, isFilterable: false }
],
relations: [],
relationsRefs: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ const CHANNEL_DEFINITION: ModuleDefinition<StoreEntityChannel, StixChannel> = {
},
},
attributes: [
{ name: 'name', type: 'string', mandatoryType: 'external', editDefault: true, multiple: false, upsert: true },
{ name: 'description', type: 'string', mandatoryType: 'customizable', editDefault: true, multiple: false, upsert: true },
{ name: 'channel_types', type: 'string', mandatoryType: 'customizable', editDefault: true, multiple: true, upsert: true, label: 'Channel types' },
{ name: 'name', label: 'Name', type: 'string', mandatoryType: 'external', editDefault: true, multiple: false, upsert: true, isFilterable: true },
{ name: 'description', label: 'Description', type: 'string', mandatoryType: 'customizable', editDefault: true, multiple: false, upsert: true, isFilterable: true },
{ name: 'channel_types', label: 'Channel types', type: 'string', mandatoryType: 'customizable', editDefault: true, multiple: true, upsert: true, isFilterable: true },
],
relations: [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ const DATA_COMPONENT_DEFINITION: ModuleDefinition<StoreEntityDataComponent, Stix
},
},
attributes: [
{ name: 'name', type: 'string', mandatoryType: 'external', editDefault: true, multiple: false, upsert: true },
{ name: 'description', type: 'string', mandatoryType: 'customizable', editDefault: true, multiple: false, upsert: true },
{ name: 'name', label: 'Name', type: 'string', mandatoryType: 'external', editDefault: true, multiple: false, upsert: true, isFilterable: true },
{ name: 'description', label: 'Description', type: 'string', mandatoryType: 'customizable', editDefault: true, multiple: false, upsert: true, isFilterable: true },
],
relations: [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ const DATA_SOURCE_DEFINITION: ModuleDefinition<StoreEntityDataSource, StixDataSo
},
},
attributes: [
{ name: 'name', type: 'string', mandatoryType: 'external', editDefault: true, multiple: false, upsert: true },
{ name: 'description', type: 'string', mandatoryType: 'customizable', editDefault: true, multiple: false, upsert: true },
{ name: 'x_mitre_platforms', type: 'string', mandatoryType: 'customizable', editDefault: true, multiple: true, upsert: true, label: 'Platforms' },
{ name: 'collection_layers', type: 'string', mandatoryType: 'customizable', editDefault: true, multiple: true, upsert: true, label: 'Layers' },
{ name: 'name', label: 'Name', type: 'string', mandatoryType: 'external', editDefault: true, multiple: false, upsert: true, isFilterable: true },
{ name: 'description', label: 'Description', type: 'string', mandatoryType: 'customizable', editDefault: true, multiple: false, upsert: true, isFilterable: true },
{ name: 'x_mitre_platforms', label: 'Platforms', type: 'string', mandatoryType: 'customizable', editDefault: true, multiple: true, upsert: true, isFilterable: true },
{ name: 'collection_layers', label: 'Layers', type: 'string', mandatoryType: 'customizable', editDefault: true, multiple: true, upsert: true, isFilterable: true },
],
relations: [],
relationsRefs: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ const ENTITY_SETTING_DEFINITION: ModuleDefinition<StoreEntityEntitySetting, Stix
},
},
attributes: [
{ name: 'target_type', type: 'string', mandatoryType: 'internal', editDefault: false, multiple: false, upsert: false },
{ name: 'platform_entity_files_ref', type: 'boolean', mandatoryType: 'external', editDefault: true, multiple: false, upsert: false },
{ name: 'platform_hidden_type', type: 'boolean', mandatoryType: 'external', editDefault: true, multiple: false, upsert: false },
{ name: 'enforce_reference', type: 'boolean', mandatoryType: 'external', editDefault: true, multiple: false, upsert: false },
{ name: 'attributes_configuration', type: 'json', mandatoryType: 'no', editDefault: false, multiple: false, upsert: false, schemaDef: attributeConfiguration },
{ name: 'availableSettings', type: 'string', mandatoryType: 'no', editDefault: false, multiple: true, upsert: false },
{ name: 'target_type', label: 'Target type', type: 'string', mandatoryType: 'internal', editDefault: false, multiple: false, upsert: false, isFilterable: false },
{ name: 'platform_entity_files_ref', label: 'Platform entity files ref', type: 'boolean', mandatoryType: 'external', editDefault: true, multiple: false, upsert: false, isFilterable: false },
{ name: 'platform_hidden_type', label: 'Platform hidden type', type: 'boolean', mandatoryType: 'external', editDefault: true, multiple: false, upsert: false, isFilterable: false },
{ name: 'enforce_reference', label: 'Enforce reference', type: 'boolean', mandatoryType: 'external', editDefault: true, multiple: false, upsert: false, isFilterable: false },
{ name: 'attributes_configuration', label: 'Attributes configuration', type: 'json', mandatoryType: 'no', editDefault: false, multiple: false, upsert: false, schemaDef: attributeConfiguration, isFilterable: false },
{ name: 'availableSettings', label: 'Available settings', type: 'string', mandatoryType: 'no', editDefault: false, multiple: true, upsert: false, isFilterable: false },
],
relations: [],
validators: {
Expand Down
10 changes: 5 additions & 5 deletions opencti-platform/opencti-graphql/src/modules/event/event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ const EVENT_DEFINITION: ModuleDefinition<StoreEntityEvent, StixEvent> = {
},
},
attributes: [
{ name: 'name', type: 'string', mandatoryType: 'external', editDefault: true, multiple: false, upsert: true },
{ name: 'description', type: 'string', mandatoryType: 'customizable', editDefault: true, multiple: false, upsert: true },
{ name: 'event_types', type: 'string', mandatoryType: 'customizable', editDefault: true, multiple: true, upsert: true, label: 'Event types' },
{ name: 'start_time', type: 'date', mandatoryType: 'customizable', editDefault: true, multiple: false, upsert: true, label: 'Start date' },
{ name: 'stop_time', type: 'date', mandatoryType: 'customizable', editDefault: true, multiple: false, upsert: true, label: 'End date' },
{ name: 'name', label: 'Name', type: 'string', mandatoryType: 'external', editDefault: true, multiple: false, upsert: true, isFilterable: true },
{ name: 'description', label: 'Description', type: 'string', mandatoryType: 'customizable', editDefault: true, multiple: false, upsert: true, isFilterable: true },
{ name: 'event_types', label: 'Event types', type: 'string', mandatoryType: 'customizable', editDefault: true, multiple: true, upsert: true, isFilterable: true },
{ name: 'start_time', label: 'Start date', type: 'date', mandatoryType: 'customizable', editDefault: true, multiple: false, upsert: true, isFilterable: true },
{ name: 'stop_time', label: 'End date', type: 'date', mandatoryType: 'customizable', editDefault: true, multiple: false, upsert: true, isFilterable: true },
],
relations: [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ const GROUPING_DEFINITION: ModuleDefinition<StoreEntityGrouping, StixGrouping> =
},
},
attributes: [
{ name: 'name', type: 'string', mandatoryType: 'external', editDefault: true, multiple: false, upsert: true },
{ name: 'description', type: 'string', mandatoryType: 'customizable', editDefault: true, multiple: false, upsert: true },
{ name: 'content', type: 'string', mandatoryType: 'customizable', editDefault: true, multiple: false, upsert: true },
{ name: 'content_mapping', type: 'string', mandatoryType: 'no', editDefault: false, multiple: false, upsert: true },
{ name: 'context', type: 'string', mandatoryType: 'external', editDefault: true, multiple: false, upsert: true },
{ name: 'name', label: 'Name', type: 'string', mandatoryType: 'external', editDefault: true, multiple: false, upsert: true, isFilterable: true },
{ name: 'description', label: 'Description', type: 'string', mandatoryType: 'customizable', editDefault: true, multiple: false, upsert: true, isFilterable: true },
{ name: 'content', label: 'Content', type: 'string', mandatoryType: 'customizable', editDefault: true, multiple: false, upsert: true, isFilterable: true },
{ name: 'content_mapping', label: 'Content mapping', type: 'string', mandatoryType: 'no', editDefault: false, multiple: false, upsert: true, isFilterable: true },
{ name: 'context', label: 'Content', type: 'string', mandatoryType: 'external', editDefault: true, multiple: false, upsert: true, isFilterable: true },
],
relations: [],
representative: (stix: StixGrouping) => {
Expand Down

0 comments on commit 9e8b58f

Please sign in to comment.