denotify-client 1.1.13 → 1.1.15

Sign up to get free protection for your applications and to get access to all the features.
@@ -199,7 +199,7 @@ export type HandlerFunctionCallV2RawResponse = {
199
199
  abi: string[];
200
200
  version: number;
201
201
  };
202
- export type Network = "avalanche" | "ethereum";
202
+ export type Network = "ethereum" | "avalanche" | "bsc" | "polygon" | "fantom" | "optimism" | "arbitrum" | "canto";
203
203
  export type TriggerConfig = PollFunctionV2 | PollFunctionV1 | OnchainEventV1;
204
204
  export type TriggerTypeId = "PollFunctionV2" | "OnchainEventV1" | "PollFunctionV1";
205
205
  export type TriggerUpdate = HandlerFunctionCallV2Update | HandlerFunctionCallUpdate | HandlerOnchainEventUpdate;
@@ -300,8 +300,8 @@ export declare class AlertBuilder {
300
300
  * @param options Desired trigger configuration
301
301
  * @returns self for piping
302
302
  */
303
- withTrigger<T>(id: TriggerTypeId, options: T): AlertBuilder;
304
- withNotification<T = NotificationConfig>(id: NotificationTypeId, options: T): AlertBuilder;
303
+ withTrigger<TTriggerTypeId extends TriggerTypeId>(id: TTriggerTypeId, options: TTriggerTypeId extends "PollFunctionV2" ? PollFunctionV2 : TTriggerTypeId extends "OnchainEventV1" ? OnchainEventV1 : TTriggerTypeId extends "PollFunctionV1" ? PollFunctionV1 : never): AlertBuilder;
304
+ withNotification<TNotificationTypeId extends NotificationTypeId>(id: TNotificationTypeId, options: TNotificationTypeId extends "Discord" ? DiscordWebhook : never): AlertBuilder;
305
305
  validate(): Promise<{
306
306
  username?: string | undefined;
307
307
  avatar_url?: string | undefined;