denotify-client 1.1.32 → 1.1.33
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/denotify-client.cjs +2 -2
- package/dist/denotify-client.d.ts +17 -4
- package/dist/denotify-client.iife.js +2 -2
- package/dist/denotify-client.mjs +952 -925
- package/package.json +1 -1
@@ -37,14 +37,27 @@ export type Telegram = {
|
|
37
37
|
content: string;
|
38
38
|
};
|
39
39
|
export type NotifyTelegramRawId = "notify_telegram";
|
40
|
-
export type
|
41
|
-
|
40
|
+
export type Webhook = {
|
41
|
+
url: string;
|
42
|
+
params?: {
|
43
|
+
[key: string]: string;
|
44
|
+
} | null;
|
45
|
+
pathname?: string | null;
|
46
|
+
access_token?: string | null;
|
47
|
+
headers?: {
|
48
|
+
[key: string]: string;
|
49
|
+
} | null;
|
50
|
+
method?: "get" | "post" | "put" | "delete" | "patch";
|
51
|
+
};
|
52
|
+
export type NotifyWebhookRawId = "notify_webhook";
|
53
|
+
export type NotificationTypeId = "Discord" | "Telegram" | "Email" | "Webhook";
|
54
|
+
export type NotificationConfig = DiscordWebhook | Telegram | Email | Webhook;
|
42
55
|
export type Notification = NotificationConfig & {
|
43
56
|
error?: boolean;
|
44
57
|
error_message?: string | null;
|
45
58
|
error_timestamp?: number | null;
|
46
59
|
};
|
47
|
-
export type NotifyRawId = NotifyDiscordWebhookRawId | NotifyTelegramRawId | NotifyEmailRawId;
|
60
|
+
export type NotifyRawId = NotifyDiscordWebhookRawId | NotifyTelegramRawId | NotifyEmailRawId | NotifyWebhookRawId;
|
48
61
|
export type PollFunctionV1 = {
|
49
62
|
nBlocks: number;
|
50
63
|
address: string;
|
@@ -261,7 +274,7 @@ export declare class AlertBuilder {
|
|
261
274
|
* @returns self for piping
|
262
275
|
*/
|
263
276
|
withTrigger<TTriggerTypeId extends TriggerTypeId>(id: TTriggerTypeId, options: TTriggerTypeId extends "PollFunctionV2" ? Partial<PollFunctionV2> : TTriggerTypeId extends "OnchainEventV2" ? Partial<OnchainEventV2> : TTriggerTypeId extends "PollFunctionV1" ? Partial<PollFunctionV1> : TTriggerTypeId extends "OnchainEventV1" ? OnchainEventV1 : never): AlertBuilder;
|
264
|
-
withNotification<TNotificationTypeId extends NotificationTypeId>(id: TNotificationTypeId, options: TNotificationTypeId extends "Discord" ? DiscordWebhook : TNotificationTypeId extends "Telegram" ? Telegram : TNotificationTypeId extends "Email" ? Email : never): AlertBuilder;
|
277
|
+
withNotification<TNotificationTypeId extends NotificationTypeId>(id: TNotificationTypeId, options: TNotificationTypeId extends "Discord" ? DiscordWebhook : TNotificationTypeId extends "Telegram" ? Telegram : TNotificationTypeId extends "Email" ? Email : TNotificationTypeId extends "Webhook" ? Webhook : never): AlertBuilder;
|
265
278
|
config(): Promise<Alert>;
|
266
279
|
}
|
267
280
|
|