Skip to content

Add SCHEMA notification category #1211

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions packages/core/src/notification-filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Object.freeze(notificationFilterMinimumSeverityLevel)

type NotificationFilterDisabledCategory = ExcludeUnknown<NotificationCategory>
/**
* @typedef {'HINT' | 'UNRECOGNIZED' | 'UNSUPPORTED' |'PERFORMANCE' | 'TOPOLOGY' | 'SECURITY' | 'DEPRECATION' | 'GENERIC'} NotificationFilterDisabledCategory
* @typedef {'HINT' | 'UNRECOGNIZED' | 'UNSUPPORTED' |'PERFORMANCE' | 'TOPOLOGY' | 'SECURITY' | 'DEPRECATION' | 'GENERIC' | 'SCHEMA'} NotificationFilterDisabledCategory
*/
/**
* Constants that represents the disabled categories in the {@link NotificationFilter}
Expand All @@ -53,7 +53,8 @@ const notificationFilterDisabledCategory: EnumRecord<NotificationFilterDisabledC
TOPOLOGY: 'TOPOLOGY',
SECURITY: 'SECURITY',
DEPRECATION: 'DEPRECATION',
GENERIC: 'GENERIC'
GENERIC: 'GENERIC',
SCHEMA: 'SCHEMA'
}
Object.freeze(notificationFilterDisabledCategory)

Expand Down
5 changes: 3 additions & 2 deletions packages/core/src/notification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ Object.freeze(notificationSeverityLevel)
const severityLevels = Object.values(notificationSeverityLevel)

type NotificationCategory = 'HINT' | 'UNRECOGNIZED' | 'UNSUPPORTED' | 'PERFORMANCE' |
'TOPOLOGY' | 'SECURITY' | 'DEPRECATION' | 'GENERIC' | 'UNKNOWN'
'TOPOLOGY' | 'SECURITY' | 'DEPRECATION' | 'GENERIC' | 'SCHEMA' | 'UNKNOWN'
/**
* @typedef {'HINT' | 'UNRECOGNIZED' | 'UNSUPPORTED' |'PERFORMANCE' | 'TOPOLOGY' | 'SECURITY' | 'DEPRECATION' | 'GENERIC' | 'UNKNOWN' } NotificationCategory
* @typedef {'HINT' | 'UNRECOGNIZED' | 'UNSUPPORTED' |'PERFORMANCE' | 'TOPOLOGY' | 'SECURITY' | 'DEPRECATION' | 'GENERIC' | 'SCHEMA' | 'UNKNOWN' } NotificationCategory
*/
/**
* Constants that represents the Category in the {@link Notification}
Expand All @@ -78,6 +78,7 @@ const notificationCategory: { [key in NotificationCategory]: key } = {
TOPOLOGY: 'TOPOLOGY',
SECURITY: 'SECURITY',
GENERIC: 'GENERIC',
SCHEMA: 'SCHEMA',
UNKNOWN: 'UNKNOWN'
}

Expand Down
1 change: 1 addition & 0 deletions packages/core/test/notification-filter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ function getValidNotificationsCategories (): NotificationFilterDisabledCategory[
'PERFORMANCE',
'TOPOLOGY',
'SECURITY',
'SCHEMA',
'UNRECOGNIZED',
'UNSUPPORTED'
]
Expand Down
2 changes: 2 additions & 0 deletions packages/core/test/notification.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1393,6 +1393,7 @@ function getValidCategories (): NotificationCategory[] {
'TOPOLOGY',
'SECURITY',
'DEPRECATION',
'SCHEMA',
'GENERIC',
'UNKNOWN'
]
Expand All @@ -1407,6 +1408,7 @@ function getValidClassifications (): NotificationClassification[] {
'TOPOLOGY',
'SECURITY',
'DEPRECATION',
'SCHEMA',
'GENERIC',
'UNKNOWN'
]
Expand Down
5 changes: 3 additions & 2 deletions packages/neo4j-driver-deno/lib/core/notification-filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Object.freeze(notificationFilterMinimumSeverityLevel)

type NotificationFilterDisabledCategory = ExcludeUnknown<NotificationCategory>
/**
* @typedef {'HINT' | 'UNRECOGNIZED' | 'UNSUPPORTED' |'PERFORMANCE' | 'TOPOLOGY' | 'SECURITY' | 'DEPRECATION' | 'GENERIC'} NotificationFilterDisabledCategory
* @typedef {'HINT' | 'UNRECOGNIZED' | 'UNSUPPORTED' |'PERFORMANCE' | 'TOPOLOGY' | 'SECURITY' | 'DEPRECATION' | 'GENERIC' | 'SCHEMA'} NotificationFilterDisabledCategory
*/
/**
* Constants that represents the disabled categories in the {@link NotificationFilter}
Expand All @@ -53,7 +53,8 @@ const notificationFilterDisabledCategory: EnumRecord<NotificationFilterDisabledC
TOPOLOGY: 'TOPOLOGY',
SECURITY: 'SECURITY',
DEPRECATION: 'DEPRECATION',
GENERIC: 'GENERIC'
GENERIC: 'GENERIC',
SCHEMA: 'SCHEMA'
}
Object.freeze(notificationFilterDisabledCategory)

Expand Down
5 changes: 3 additions & 2 deletions packages/neo4j-driver-deno/lib/core/notification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ Object.freeze(notificationSeverityLevel)
const severityLevels = Object.values(notificationSeverityLevel)

type NotificationCategory = 'HINT' | 'UNRECOGNIZED' | 'UNSUPPORTED' | 'PERFORMANCE' |
'TOPOLOGY' | 'SECURITY' | 'DEPRECATION' | 'GENERIC' | 'UNKNOWN'
'TOPOLOGY' | 'SECURITY' | 'DEPRECATION' | 'GENERIC' | 'SCHEMA' | 'UNKNOWN'
/**
* @typedef {'HINT' | 'UNRECOGNIZED' | 'UNSUPPORTED' |'PERFORMANCE' | 'TOPOLOGY' | 'SECURITY' | 'DEPRECATION' | 'GENERIC' | 'UNKNOWN' } NotificationCategory
* @typedef {'HINT' | 'UNRECOGNIZED' | 'UNSUPPORTED' |'PERFORMANCE' | 'TOPOLOGY' | 'SECURITY' | 'DEPRECATION' | 'GENERIC' | 'SCHEMA' | 'UNKNOWN' } NotificationCategory
*/
/**
* Constants that represents the Category in the {@link Notification}
Expand All @@ -78,6 +78,7 @@ const notificationCategory: { [key in NotificationCategory]: key } = {
TOPOLOGY: 'TOPOLOGY',
SECURITY: 'SECURITY',
GENERIC: 'GENERIC',
SCHEMA: 'SCHEMA',
UNKNOWN: 'UNKNOWN'
}

Expand Down
4 changes: 4 additions & 0 deletions packages/neo4j-driver/test/types/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ const deprecationCategoryString: string = notificationCategory.DEPRECATION
const performanceCategoryString: string = notificationCategory.PERFORMANCE
const topologyCategoryString: string = notificationCategory.TOPOLOGY
const securityCategoryString: string = notificationCategory.SECURITY
const schemaCategoryString: string = notificationCategory.SCHEMA
const genericCategoryString: string = notificationCategory.GENERIC
const unrecognizedCategoryString: string = notificationCategory.UNRECOGNIZED
const unsupportedCategoryString: string = notificationCategory.UNSUPPORTED
Expand All @@ -158,6 +159,7 @@ const deprecationCategory: NotificationCategory = notificationCategory.DEPRECATI
const performanceCategory: NotificationCategory = notificationCategory.PERFORMANCE
const topologyCategory: NotificationCategory = notificationCategory.TOPOLOGY
const securityCategory: NotificationCategory = notificationCategory.SECURITY
const schemaCategory: NotificationCategory = notificationCategory.SCHEMA
const genericCategory: NotificationCategory = notificationCategory.GENERIC
const unrecognizedCategory: NotificationCategory = notificationCategory.UNRECOGNIZED
const unsupportedCategory: NotificationCategory = notificationCategory.UNSUPPORTED
Expand All @@ -168,6 +170,7 @@ const deprecationClassificationString: string = notificationClassification.DEPRE
const performanceClassificationString: string = notificationClassification.PERFORMANCE
const topologyClassificationString: string = notificationClassification.TOPOLOGY
const securityClassificationString: string = notificationClassification.SECURITY
const schemaClassificationString: string = notificationClassification.SCHEMA
const genericClassificationString: string = notificationClassification.GENERIC
const unrecognizedClassificationString: string = notificationClassification.UNRECOGNIZED
const unsupportedClassificationString: string = notificationClassification.UNSUPPORTED
Expand All @@ -177,6 +180,7 @@ const deprecationClassification: NotificationClassification = notificationClassi
const performanceClassification: NotificationClassification = notificationClassification.PERFORMANCE
const topologyClassification: NotificationClassification = notificationClassification.TOPOLOGY
const securityClassification: NotificationClassification = notificationClassification.SECURITY
const schemaClassification: NotificationClassification = notificationClassification.SCHEMA
const genericClassification: NotificationClassification = notificationClassification.GENERIC
const unrecognizedClassification: NotificationClassification = notificationClassification.UNRECOGNIZED
const unsupportedClassification: NotificationClassification = notificationClassification.UNSUPPORTED
Expand Down