Skip to content

Commit

Permalink
feat: new queue signals
Browse files Browse the repository at this point in the history
  • Loading branch information
jackmellis committed Jan 25, 2024
1 parent 61c0d10 commit 0698950
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/queue/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,20 @@ export type Signals = {
'index-collection': { collectionAddress: Address; network: number };
'index-vault': { network: number; vaultId: string };
'index-inactive-vaults': { network: number };
'index-new-vaults': { network: number };
'index-twap-vaults': { network: number };
};

type ListenerFn<T, S extends keyof T> = (signal: {
type: S;
payload: T[S];
}) => any;

export type SignalCallback = ListenerFn<Signals, 'index-vault'> &
ListenerFn<Signals, 'index-collection'> &
ListenerFn<Signals, 'index-inactive-vaults'>;
ListenerFn<Signals, 'index-inactive-vaults'> &
ListenerFn<Signals, 'index-new-vaults'> &
ListenerFn<Signals, 'index-twap-vaults'>;

export type Messages = {
'collection-indexed': { collectionAddress: Address; network: number };
Expand Down

0 comments on commit 0698950

Please sign in to comment.