From a302055beab2df02195630b7a9b57847f8be0bce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gast=C3=B3n=20Fournier?= Date: Wed, 28 May 2025 09:39:59 +0200 Subject: [PATCH] feat: add required cdn events (#10040) ## About the changes Exposes configuration revision service UPDATE_EVENT constant so it can be used, and we also add a new event for cdn token created --- src/lib/events/index.ts | 3 +++ src/lib/server-impl.ts | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/lib/events/index.ts b/src/lib/events/index.ts index 0c58498020..8f1f6165d9 100644 --- a/src/lib/events/index.ts +++ b/src/lib/events/index.ts @@ -213,6 +213,8 @@ export const USER_PREFERENCE_UPDATED = 'user-preference-updated' as const; export const SCIM_USERS_DELETED = 'scim-users-deleted' as const; export const SCIM_GROUPS_DELETED = 'scim-groups-deleted' as const; +export const CDN_TOKEN_CREATED = 'cdn-token-created' as const; + export const IEventTypes = [ APPLICATION_CREATED, FEATURE_CREATED, @@ -373,6 +375,7 @@ export const IEventTypes = [ USER_PREFERENCE_UPDATED, SCIM_USERS_DELETED, SCIM_GROUPS_DELETED, + CDN_TOKEN_CREATED, ] as const; export type IEventType = (typeof IEventTypes)[number]; diff --git a/src/lib/server-impl.ts b/src/lib/server-impl.ts index 09ad5d9910..bdd78b78ae 100644 --- a/src/lib/server-impl.ts +++ b/src/lib/server-impl.ts @@ -181,6 +181,7 @@ import { import { getDbConfig } from '../test/e2e/helpers/database-config.js'; import { testDbPrefix } from '../test/e2e/helpers/database-init.js'; import type { RequestHandler } from 'express'; +import { UPDATE_REVISION } from './features/feature-toggle/configuration-revision-service.js'; export async function initialServiceSetup( { authentication }: Pick, @@ -420,6 +421,7 @@ export { CUSTOM_ROOT_ROLE_TYPE, getVariantValue, UPDATE_DELTA, + UPDATE_REVISION, applyGenericQueryParams, normalizeQueryParams, parseSearchOperatorValue,