refactor: Rename NotificationChannelInfo to NotificationChannel

This commit is contained in:
Joachim Van Herwegen
2023-02-07 14:35:02 +01:00
parent 61f04487a1
commit 8d31233075
41 changed files with 358 additions and 357 deletions

View File

@@ -27,4 +27,21 @@ export const NOTIFICATION_CHANNEL_SCHEMA = object({
toSeconds(parse(original)) * 1000).optional(),
accept: string().optional(),
});
export type NotificationChannel = InferType<typeof NOTIFICATION_CHANNEL_SCHEMA>;
export type NotificationChannelJson = InferType<typeof NOTIFICATION_CHANNEL_SCHEMA>;
/**
* The info provided for a notification channel during a subscription.
* `features` can contain custom values relevant for a specific channel type.
*/
export type NotificationChannel<T = Record<string, unknown>> = {
id: string;
topic: string;
type: string;
startAt?: number;
endAt?: number;
accept?: string;
rate?: number;
state?: string;
lastEmit: number;
features: T;
};