Skip to content

Commit c4e4c1c

Browse files
authored
Merge pull request #1211 from neo4j/5.x-schema-notification-category
Add SCHEMA notification category
2 parents bb5687e + de3bc2f commit c4e4c1c

File tree

7 files changed

+19
-8
lines changed

7 files changed

+19
-8
lines changed

packages/core/src/notification-filter.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Object.freeze(notificationFilterMinimumSeverityLevel)
4040

4141
type NotificationFilterDisabledCategory = ExcludeUnknown<NotificationCategory>
4242
/**
43-
* @typedef {'HINT' | 'UNRECOGNIZED' | 'UNSUPPORTED' |'PERFORMANCE' | 'TOPOLOGY' | 'SECURITY' | 'DEPRECATION' | 'GENERIC'} NotificationFilterDisabledCategory
43+
* @typedef {'HINT' | 'UNRECOGNIZED' | 'UNSUPPORTED' |'PERFORMANCE' | 'TOPOLOGY' | 'SECURITY' | 'DEPRECATION' | 'GENERIC' | 'SCHEMA'} NotificationFilterDisabledCategory
4444
*/
4545
/**
4646
* Constants that represents the disabled categories in the {@link NotificationFilter}
@@ -53,7 +53,8 @@ const notificationFilterDisabledCategory: EnumRecord<NotificationFilterDisabledC
5353
TOPOLOGY: 'TOPOLOGY',
5454
SECURITY: 'SECURITY',
5555
DEPRECATION: 'DEPRECATION',
56-
GENERIC: 'GENERIC'
56+
GENERIC: 'GENERIC',
57+
SCHEMA: 'SCHEMA'
5758
}
5859
Object.freeze(notificationFilterDisabledCategory)
5960

packages/core/src/notification.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ Object.freeze(notificationSeverityLevel)
6262
const severityLevels = Object.values(notificationSeverityLevel)
6363

6464
type NotificationCategory = 'HINT' | 'UNRECOGNIZED' | 'UNSUPPORTED' | 'PERFORMANCE' |
65-
'TOPOLOGY' | 'SECURITY' | 'DEPRECATION' | 'GENERIC' | 'UNKNOWN'
65+
'TOPOLOGY' | 'SECURITY' | 'DEPRECATION' | 'GENERIC' | 'SCHEMA' | 'UNKNOWN'
6666
/**
67-
* @typedef {'HINT' | 'UNRECOGNIZED' | 'UNSUPPORTED' |'PERFORMANCE' | 'TOPOLOGY' | 'SECURITY' | 'DEPRECATION' | 'GENERIC' | 'UNKNOWN' } NotificationCategory
67+
* @typedef {'HINT' | 'UNRECOGNIZED' | 'UNSUPPORTED' |'PERFORMANCE' | 'TOPOLOGY' | 'SECURITY' | 'DEPRECATION' | 'GENERIC' | 'SCHEMA' | 'UNKNOWN' } NotificationCategory
6868
*/
6969
/**
7070
* Constants that represents the Category in the {@link Notification}
@@ -78,6 +78,7 @@ const notificationCategory: { [key in NotificationCategory]: key } = {
7878
TOPOLOGY: 'TOPOLOGY',
7979
SECURITY: 'SECURITY',
8080
GENERIC: 'GENERIC',
81+
SCHEMA: 'SCHEMA',
8182
UNKNOWN: 'UNKNOWN'
8283
}
8384

packages/core/test/notification-filter.test.ts

+1
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ function getValidNotificationsCategories (): NotificationFilterDisabledCategory[
103103
'PERFORMANCE',
104104
'TOPOLOGY',
105105
'SECURITY',
106+
'SCHEMA',
106107
'UNRECOGNIZED',
107108
'UNSUPPORTED'
108109
]

packages/core/test/notification.test.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1393,6 +1393,7 @@ function getValidCategories (): NotificationCategory[] {
13931393
'TOPOLOGY',
13941394
'SECURITY',
13951395
'DEPRECATION',
1396+
'SCHEMA',
13961397
'GENERIC',
13971398
'UNKNOWN'
13981399
]
@@ -1407,6 +1408,7 @@ function getValidClassifications (): NotificationClassification[] {
14071408
'TOPOLOGY',
14081409
'SECURITY',
14091410
'DEPRECATION',
1411+
'SCHEMA',
14101412
'GENERIC',
14111413
'UNKNOWN'
14121414
]

packages/neo4j-driver-deno/lib/core/notification-filter.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Object.freeze(notificationFilterMinimumSeverityLevel)
4040

4141
type NotificationFilterDisabledCategory = ExcludeUnknown<NotificationCategory>
4242
/**
43-
* @typedef {'HINT' | 'UNRECOGNIZED' | 'UNSUPPORTED' |'PERFORMANCE' | 'TOPOLOGY' | 'SECURITY' | 'DEPRECATION' | 'GENERIC'} NotificationFilterDisabledCategory
43+
* @typedef {'HINT' | 'UNRECOGNIZED' | 'UNSUPPORTED' |'PERFORMANCE' | 'TOPOLOGY' | 'SECURITY' | 'DEPRECATION' | 'GENERIC' | 'SCHEMA'} NotificationFilterDisabledCategory
4444
*/
4545
/**
4646
* Constants that represents the disabled categories in the {@link NotificationFilter}
@@ -53,7 +53,8 @@ const notificationFilterDisabledCategory: EnumRecord<NotificationFilterDisabledC
5353
TOPOLOGY: 'TOPOLOGY',
5454
SECURITY: 'SECURITY',
5555
DEPRECATION: 'DEPRECATION',
56-
GENERIC: 'GENERIC'
56+
GENERIC: 'GENERIC',
57+
SCHEMA: 'SCHEMA'
5758
}
5859
Object.freeze(notificationFilterDisabledCategory)
5960

packages/neo4j-driver-deno/lib/core/notification.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ Object.freeze(notificationSeverityLevel)
6262
const severityLevels = Object.values(notificationSeverityLevel)
6363

6464
type NotificationCategory = 'HINT' | 'UNRECOGNIZED' | 'UNSUPPORTED' | 'PERFORMANCE' |
65-
'TOPOLOGY' | 'SECURITY' | 'DEPRECATION' | 'GENERIC' | 'UNKNOWN'
65+
'TOPOLOGY' | 'SECURITY' | 'DEPRECATION' | 'GENERIC' | 'SCHEMA' | 'UNKNOWN'
6666
/**
67-
* @typedef {'HINT' | 'UNRECOGNIZED' | 'UNSUPPORTED' |'PERFORMANCE' | 'TOPOLOGY' | 'SECURITY' | 'DEPRECATION' | 'GENERIC' | 'UNKNOWN' } NotificationCategory
67+
* @typedef {'HINT' | 'UNRECOGNIZED' | 'UNSUPPORTED' |'PERFORMANCE' | 'TOPOLOGY' | 'SECURITY' | 'DEPRECATION' | 'GENERIC' | 'SCHEMA' | 'UNKNOWN' } NotificationCategory
6868
*/
6969
/**
7070
* Constants that represents the Category in the {@link Notification}
@@ -78,6 +78,7 @@ const notificationCategory: { [key in NotificationCategory]: key } = {
7878
TOPOLOGY: 'TOPOLOGY',
7979
SECURITY: 'SECURITY',
8080
GENERIC: 'GENERIC',
81+
SCHEMA: 'SCHEMA',
8182
UNKNOWN: 'UNKNOWN'
8283
}
8384

packages/neo4j-driver/test/types/index.test.ts

+4
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ const deprecationCategoryString: string = notificationCategory.DEPRECATION
149149
const performanceCategoryString: string = notificationCategory.PERFORMANCE
150150
const topologyCategoryString: string = notificationCategory.TOPOLOGY
151151
const securityCategoryString: string = notificationCategory.SECURITY
152+
const schemaCategoryString: string = notificationCategory.SCHEMA
152153
const genericCategoryString: string = notificationCategory.GENERIC
153154
const unrecognizedCategoryString: string = notificationCategory.UNRECOGNIZED
154155
const unsupportedCategoryString: string = notificationCategory.UNSUPPORTED
@@ -158,6 +159,7 @@ const deprecationCategory: NotificationCategory = notificationCategory.DEPRECATI
158159
const performanceCategory: NotificationCategory = notificationCategory.PERFORMANCE
159160
const topologyCategory: NotificationCategory = notificationCategory.TOPOLOGY
160161
const securityCategory: NotificationCategory = notificationCategory.SECURITY
162+
const schemaCategory: NotificationCategory = notificationCategory.SCHEMA
161163
const genericCategory: NotificationCategory = notificationCategory.GENERIC
162164
const unrecognizedCategory: NotificationCategory = notificationCategory.UNRECOGNIZED
163165
const unsupportedCategory: NotificationCategory = notificationCategory.UNSUPPORTED
@@ -168,6 +170,7 @@ const deprecationClassificationString: string = notificationClassification.DEPRE
168170
const performanceClassificationString: string = notificationClassification.PERFORMANCE
169171
const topologyClassificationString: string = notificationClassification.TOPOLOGY
170172
const securityClassificationString: string = notificationClassification.SECURITY
173+
const schemaClassificationString: string = notificationClassification.SCHEMA
171174
const genericClassificationString: string = notificationClassification.GENERIC
172175
const unrecognizedClassificationString: string = notificationClassification.UNRECOGNIZED
173176
const unsupportedClassificationString: string = notificationClassification.UNSUPPORTED
@@ -177,6 +180,7 @@ const deprecationClassification: NotificationClassification = notificationClassi
177180
const performanceClassification: NotificationClassification = notificationClassification.PERFORMANCE
178181
const topologyClassification: NotificationClassification = notificationClassification.TOPOLOGY
179182
const securityClassification: NotificationClassification = notificationClassification.SECURITY
183+
const schemaClassification: NotificationClassification = notificationClassification.SCHEMA
180184
const genericClassification: NotificationClassification = notificationClassification.GENERIC
181185
const unrecognizedClassification: NotificationClassification = notificationClassification.UNRECOGNIZED
182186
const unsupportedClassification: NotificationClassification = notificationClassification.UNSUPPORTED

0 commit comments

Comments
 (0)