denotify-client 1.1.14 → 1.1.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,36 +1,36 @@
1
1
  import {
2
- NotificationTypeId,
3
- NotificationConfig,
4
- NotifyRawId,
5
- NotifyRawConfig,
6
- NotifyRawResponse,
7
- NotifyRawUpdate,
8
- NotificationRawConfig,
9
- Notification
2
+ NotificationTypeId,
3
+ NotificationConfig,
4
+ NotifyRawId,
5
+ NotifyRawConfig,
6
+ NotifyRawResponse,
7
+ NotifyRawUpdate,
8
+ NotificationRawConfig,
9
+ Notification
10
10
  } from './notification.js'
11
11
  import {
12
- DiscordWebhook,
13
- NotifyDiscordWebhookRawId,
14
- NOTIFY_DISCORD_WEBHOOK_RAW_ID,
15
- NotifyDiscordWebhookRawConfig,
16
- NotifyDiscordWebhookRawResponse,
17
- NotifyDiscordWebhookRawUpdate,
18
- NotifyDiscordWebhook
12
+ DiscordWebhook,
13
+ NotifyDiscordWebhookRawId,
14
+ NOTIFY_DISCORD_WEBHOOK_RAW_ID,
15
+ NotifyDiscordWebhookRawConfig,
16
+ NotifyDiscordWebhookRawResponse,
17
+ NotifyDiscordWebhookRawUpdate,
18
+ NotifyDiscordWebhook
19
19
  } from './notify_discord_webhook.js'
20
20
  export {
21
- DiscordWebhook,
22
- NotifyDiscordWebhookRawId,
23
- NOTIFY_DISCORD_WEBHOOK_RAW_ID,
24
- NotifyDiscordWebhookRawConfig,
25
- NotifyDiscordWebhookRawResponse,
26
- NotifyDiscordWebhookRawUpdate,
27
- NotifyDiscordWebhook,
28
- NotificationTypeId,
29
- NotificationConfig,
30
- NotifyRawId,
31
- NotifyRawConfig,
32
- NotifyRawResponse,
33
- NotifyRawUpdate,
34
- NotificationRawConfig,
35
- Notification
21
+ DiscordWebhook,
22
+ NotifyDiscordWebhookRawId,
23
+ NOTIFY_DISCORD_WEBHOOK_RAW_ID,
24
+ NotifyDiscordWebhookRawConfig,
25
+ NotifyDiscordWebhookRawResponse,
26
+ NotifyDiscordWebhookRawUpdate,
27
+ NotifyDiscordWebhook,
28
+ NotificationTypeId,
29
+ NotificationConfig,
30
+ NotifyRawId,
31
+ NotifyRawConfig,
32
+ NotifyRawResponse,
33
+ NotifyRawUpdate,
34
+ NotificationRawConfig,
35
+ Notification
36
36
  }
@@ -1,9 +1,9 @@
1
1
  import {
2
- DiscordWebhook,
3
- NotifyDiscordWebhookRawConfig,
4
- NotifyDiscordWebhookRawId,
5
- NotifyDiscordWebhookRawResponse,
6
- NotifyDiscordWebhookRawUpdate
2
+ DiscordWebhook,
3
+ NotifyDiscordWebhookRawConfig,
4
+ NotifyDiscordWebhookRawId,
5
+ NotifyDiscordWebhookRawResponse,
6
+ NotifyDiscordWebhookRawUpdate
7
7
  } from './notify_discord_webhook.js'
8
8
  export type NotificationTypeId = 'Discord'
9
9
  export type NotificationConfig = DiscordWebhook
@@ -12,20 +12,20 @@ export type NotifyRawConfig = NotifyDiscordWebhookRawConfig
12
12
  export type NotifyRawResponse = NotifyDiscordWebhookRawResponse
13
13
  export type NotifyRawUpdate = NotifyDiscordWebhookRawUpdate
14
14
  export type NotificationRawConfig = {
15
- name: string
16
- notify_type: NotifyRawId
17
- notify: NotifyRawConfig
15
+ name: string
16
+ notify_type: NotifyRawId
17
+ notify: NotifyRawConfig
18
18
  }
19
19
  export type NotificationRawResponse = {
20
- notify_type: NotifyRawId
21
- notify: NotifyRawResponse
22
- error: boolean
23
- error_message: string | null
24
- error_timestamp: number | null
20
+ notify_type: NotifyRawId
21
+ notify: NotifyRawResponse
22
+ error: boolean
23
+ error_message: string | null
24
+ error_timestamp: number | null
25
25
  }
26
26
  export declare class Notification {
27
- static SimpleToRaw(
28
- id: NotificationTypeId,
29
- config: NotificationConfig
30
- ): NotificationRawConfig
27
+ static SimpleToRaw(
28
+ id: NotificationTypeId,
29
+ config: NotificationConfig
30
+ ): NotificationRawConfig
31
31
  }
@@ -1,38 +1,38 @@
1
1
  import { NotificationRawConfig } from './notification.js'
2
2
  export type DiscordWebhook = {
3
- url: string
4
- username?: string
5
- avatar_url?: string
6
- message: string
3
+ url: string
4
+ username?: string
5
+ avatar_url?: string
6
+ message: string
7
7
  }
8
8
  export type NotifyDiscordWebhookRawId = 'notify_discord_webhook'
9
9
  export declare const NOTIFY_DISCORD_WEBHOOK_RAW_ID = 'notify_discord_webhook'
10
10
  export type NotifyDiscordWebhookRawConfig = {
11
- url: string
12
- username?: string
13
- avatar_url?: string
14
- message: string
11
+ url: string
12
+ username?: string
13
+ avatar_url?: string
14
+ message: string
15
15
  }
16
16
  export type NotifyDiscordWebhookRawResponse = {
17
- id: number
18
- created_at: string
19
- url: string
20
- username: string
21
- avatar_url: string
22
- message: string
17
+ id: number
18
+ created_at: string
19
+ url: string
20
+ username: string
21
+ avatar_url: string
22
+ message: string
23
23
  }
24
24
  export type NotifyDiscordWebhookRawUpdate = {
25
- url?: string
26
- username?: string
27
- avatar_url?: string
28
- message?: string
25
+ url?: string
26
+ username?: string
27
+ avatar_url?: string
28
+ message?: string
29
29
  }
30
30
  export declare class NotifyDiscordWebhook {
31
- static SimpleToRaw(config: DiscordWebhook): NotificationRawConfig
32
- static validateCreate(options: any): Promise<{
33
- username?: string | undefined
34
- avatar_url?: string | undefined
35
- message: string
36
- url: string
37
- }>
31
+ static SimpleToRaw(config: DiscordWebhook): NotificationRawConfig
32
+ static validateCreate(options: any): Promise<{
33
+ username?: string | undefined
34
+ avatar_url?: string | undefined
35
+ message: string
36
+ url: string
37
+ }>
38
38
  }
@@ -1,66 +1,66 @@
1
1
  import { Condition } from '../types/types.js'
2
2
  import { Network, TriggerRawConfig } from './trigger.js'
3
3
  export type PollFunctionV1 = {
4
- nBlocks: number
5
- address: string
6
- abi: any
7
- fixedArgs?: (string | number)[]
8
- function: string
9
- condition: Condition
10
- responseArgIndex?: number
11
- responseArgDecimals?: number
12
- constant?: number
4
+ nBlocks: number
5
+ address: string
6
+ abi: any
7
+ fixedArgs?: (string | number)[]
8
+ function: string
9
+ condition: Condition
10
+ responseArgIndex?: number
11
+ responseArgDecimals?: number
12
+ constant?: number
13
13
  }
14
14
  export type HandlerFunctionCallRawConfig = {
15
- nBlocks: number
16
- address: string
17
- abi: any
18
- fixedArgs?: (string | number)[]
19
- function: string
20
- condition: Condition
21
- responseArgIndex?: number
22
- responseArgDecimals?: number
23
- constant?: number
15
+ nBlocks: number
16
+ address: string
17
+ abi: any
18
+ fixedArgs?: (string | number)[]
19
+ function: string
20
+ condition: Condition
21
+ responseArgIndex?: number
22
+ responseArgDecimals?: number
23
+ constant?: number
24
24
  }
25
25
  export type HandlerFunctionCallUpdate = Partial<HandlerFunctionCallRawConfig>
26
26
  export type HandlerFunctionCallRawResponse = {
27
- id: number
28
- created_at: string
29
- nBlocks: number
30
- address: string
31
- fixedArgs: string[]
32
- responseArgIndex: number
33
- responseArgDecimals: number
34
- function: string
35
- condition: Condition
36
- constant: number
37
- abi: string[]
38
- version: number
27
+ id: number
28
+ created_at: string
29
+ nBlocks: number
30
+ address: string
31
+ fixedArgs: string[]
32
+ responseArgIndex: number
33
+ responseArgDecimals: number
34
+ function: string
35
+ condition: Condition
36
+ constant: number
37
+ abi: string[]
38
+ version: number
39
39
  }
40
40
  export type HandlerFunctionCallRawUpdate = {
41
- address?: string
42
- function?: string
43
- abi?: any
44
- constant?: number
45
- nBlocks?: number
46
- confition?: Condition
47
- fixedArgs?: (string | number)[]
48
- responseArgIndex?: number
49
- responseArgDecimals?: number
41
+ address?: string
42
+ function?: string
43
+ abi?: any
44
+ constant?: number
45
+ nBlocks?: number
46
+ confition?: Condition
47
+ fixedArgs?: (string | number)[]
48
+ responseArgIndex?: number
49
+ responseArgDecimals?: number
50
50
  }
51
51
  export declare class HandlerFunctionCall {
52
- static SimpleToRaw(
53
- name: string,
54
- network: Network,
55
- config: PollFunctionV1
56
- ): TriggerRawConfig
57
- static validateCreate(options: any): Promise<{
58
- condition?: string | undefined
59
- nBlocks?: number | undefined
60
- constant?: number | undefined
61
- responseArgIndex?: number | undefined
62
- responseArgDecimals?: number | undefined
63
- address: string
64
- abi: any[]
65
- }>
52
+ static SimpleToRaw(
53
+ name: string,
54
+ network: Network,
55
+ config: PollFunctionV1
56
+ ): TriggerRawConfig
57
+ static validateCreate(options: any): Promise<{
58
+ condition?: string | undefined
59
+ nBlocks?: number | undefined
60
+ constant?: number | undefined
61
+ responseArgIndex?: number | undefined
62
+ responseArgDecimals?: number | undefined
63
+ address: string
64
+ abi: any[]
65
+ }>
66
66
  }
@@ -10,97 +10,97 @@ type TimeBase = 'blocks' | 'time'
10
10
  *
11
11
  */
12
12
  export type PollFunctionV2 = {
13
- timeBase: TimeBase
14
- nBlocks?: number
15
- timePeriod?: string | null
16
- startTime?: number
17
- debounceCount?: number
18
- functions: FunctionCallerConfig
19
- triggerOn: 'always' | 'filter'
20
- latch?: boolean
21
- filterVersion?: string
22
- filter?: FilterConfig
13
+ timeBase: TimeBase
14
+ nBlocks?: number
15
+ timePeriod?: string | null
16
+ startTime?: number
17
+ debounceCount?: number
18
+ functions: FunctionCallerConfig
19
+ triggerOn: 'always' | 'filter'
20
+ latch?: boolean
21
+ filterVersion?: string
22
+ filter?: FilterConfig
23
23
  }
24
24
  export type HandlerFunctionCallV2RawConfig = {
25
- timeBase: TimeBase
26
- nBlocks?: number
27
- timePeriod?: string | null
28
- startTime?: number
29
- debounceCount?: number
30
- functions: FunctionCallerConfig
31
- triggerOn: 'always' | 'filter'
32
- latch?: boolean
33
- filterVersion?: string
34
- filter?: FilterConfig
25
+ timeBase: TimeBase
26
+ nBlocks?: number
27
+ timePeriod?: string | null
28
+ startTime?: number
29
+ debounceCount?: number
30
+ functions: FunctionCallerConfig
31
+ triggerOn: 'always' | 'filter'
32
+ latch?: boolean
33
+ filterVersion?: string
34
+ filter?: FilterConfig
35
35
  }
36
36
  export type HandlerFunctionCallV2Update =
37
- Partial<HandlerFunctionCallV2RawConfig>
37
+ Partial<HandlerFunctionCallV2RawConfig>
38
38
  export type HandlerFunctionCallV2RawResponse = {
39
- id: number
40
- created_at: string
41
- nBlocks: number
42
- address: string
43
- fixedArgs: string[]
44
- responseArgIndex: number
45
- responseArgDecimals: number
46
- function: string
47
- condition: Condition
48
- constant: number
49
- abi: string[]
50
- version: number
39
+ id: number
40
+ created_at: string
41
+ nBlocks: number
42
+ address: string
43
+ fixedArgs: string[]
44
+ responseArgIndex: number
45
+ responseArgDecimals: number
46
+ function: string
47
+ condition: Condition
48
+ constant: number
49
+ abi: string[]
50
+ version: number
51
51
  }
52
52
  export type HandlerFunctionCallV2RawUpdate = {
53
- address?: string
54
- function?: string
55
- abi?: any
56
- constant?: number
57
- nBlocks?: number
58
- confition?: Condition
59
- fixedArgs?: (string | number)[]
60
- responseArgIndex?: number
61
- responseArgDecimals?: number
53
+ address?: string
54
+ function?: string
55
+ abi?: any
56
+ constant?: number
57
+ nBlocks?: number
58
+ confition?: Condition
59
+ fixedArgs?: (string | number)[]
60
+ responseArgIndex?: number
61
+ responseArgDecimals?: number
62
62
  }
63
63
  export declare class HandlerFunctionCallV2 {
64
- static SimpleToRaw(
65
- name: string,
66
- network: Network,
67
- config: PollFunctionV2
68
- ): TriggerRawConfig
69
- static validateCreate(options: any): Promise<{
70
- filter?:
71
- | {
72
- conditions?:
73
- | {
74
- operation?: string | undefined
75
- constant?: {} | undefined
76
- logic: NonNullable<
77
- 'AND' | 'OR' | 'XOR' | 'NAND' | 'NOR' | 'WHERE' | undefined
78
- >
79
- key: string
80
- type: NonNullable<'String' | 'Address' | 'Number' | undefined>
81
- }[]
82
- | undefined
83
- logic: NonNullable<
84
- 'AND' | 'OR' | 'XOR' | 'NAND' | 'NOR' | 'WHERE' | undefined
85
- >
86
- }[]
87
- | undefined
88
- nBlocks?: number | undefined
89
- timePeriod?: string | undefined
90
- debounceCount?: number | undefined
91
- functions?:
92
- | {
93
- function: string
94
- address: string
95
- bytecode: string
96
- abiHash: string
97
- }[]
98
- | undefined
99
- filterVersion?: string | undefined
100
- latch: boolean
101
- timeBase: NonNullable<'blocks' | 'time' | undefined>
102
- startTime: number
103
- triggerOn: 'always' | 'filter'
104
- }>
64
+ static SimpleToRaw(
65
+ name: string,
66
+ network: Network,
67
+ config: PollFunctionV2
68
+ ): TriggerRawConfig
69
+ static validateCreate(options: any): Promise<{
70
+ filter?:
71
+ | {
72
+ conditions?:
73
+ | {
74
+ operation?: string | undefined
75
+ constant?: {} | undefined
76
+ logic: NonNullable<
77
+ 'AND' | 'OR' | 'XOR' | 'NAND' | 'NOR' | 'WHERE' | undefined
78
+ >
79
+ key: string
80
+ type: NonNullable<'String' | 'Address' | 'Number' | undefined>
81
+ }[]
82
+ | undefined
83
+ logic: NonNullable<
84
+ 'AND' | 'OR' | 'XOR' | 'NAND' | 'NOR' | 'WHERE' | undefined
85
+ >
86
+ }[]
87
+ | undefined
88
+ nBlocks?: number | undefined
89
+ timePeriod?: string | undefined
90
+ debounceCount?: number | undefined
91
+ functions?:
92
+ | {
93
+ function: string
94
+ address: string
95
+ bytecode: string
96
+ abiHash: string
97
+ }[]
98
+ | undefined
99
+ filterVersion?: string | undefined
100
+ latch: boolean
101
+ timeBase: NonNullable<'blocks' | 'time' | undefined>
102
+ startTime: number
103
+ triggerOn: 'always' | 'filter'
104
+ }>
105
105
  }
106
106
  export {}
@@ -1,57 +1,57 @@
1
1
  import { Network, TriggerRawConfig } from './trigger.js'
2
2
  import { Condition } from '../types/types.js'
3
3
  export type OnchainEventV1 = {
4
- address: string
5
- event: string
6
- abi: any
7
- condition: Condition
8
- paramsIndex?: number
9
- paramsDecimals?: number
10
- constant?: number
4
+ address: string
5
+ event: string
6
+ abi: any
7
+ condition: Condition
8
+ paramsIndex?: number
9
+ paramsDecimals?: number
10
+ constant?: number
11
11
  }
12
12
  export type HandlerOnchainEventRawConfig = {
13
- address: string
14
- event: string
15
- abi: any
16
- condition: Condition
17
- paramsIndex?: number
18
- paramsDecimals?: number
19
- constant?: number
13
+ address: string
14
+ event: string
15
+ abi: any
16
+ condition: Condition
17
+ paramsIndex?: number
18
+ paramsDecimals?: number
19
+ constant?: number
20
20
  }
21
21
  export type HandlerOnchainEventUpdate = Partial<HandlerOnchainEventRawConfig>
22
22
  export type HandlerOnchainEventRawResponse = {
23
- id: number
24
- created_at: string
25
- address: string
26
- event: string
27
- abi: any
28
- paramsIndex: number
29
- paramsDecimals: number
30
- condition: Condition
31
- constant: number
23
+ id: number
24
+ created_at: string
25
+ address: string
26
+ event: string
27
+ abi: any
28
+ paramsIndex: number
29
+ paramsDecimals: number
30
+ condition: Condition
31
+ constant: number
32
32
  }
33
33
  export type HandlerOnchainEventRawUpdate = {
34
- address?: string
35
- event?: string
36
- abi?: any
37
- paramsIndex?: number
38
- paramsDecimals?: number
39
- constant?: number
34
+ address?: string
35
+ event?: string
36
+ abi?: any
37
+ paramsIndex?: number
38
+ paramsDecimals?: number
39
+ constant?: number
40
40
  }
41
41
  export declare class HandlerOnchainEvent {
42
- static SimpleToRaw(
43
- name: string,
44
- network: Network,
45
- config: OnchainEventV1
46
- ): TriggerRawConfig
47
- static validateCreate(options: any): Promise<{
48
- condition?: string | undefined
49
- constant?: number | undefined
50
- paramsIndex?: number | undefined
51
- paramsDecimals?: number | undefined
52
- event: string
53
- address: string
54
- abi: any[]
55
- }>
56
- static validateUpdate(options: any): void
42
+ static SimpleToRaw(
43
+ name: string,
44
+ network: Network,
45
+ config: OnchainEventV1
46
+ ): TriggerRawConfig
47
+ static validateCreate(options: any): Promise<{
48
+ condition?: string | undefined
49
+ constant?: number | undefined
50
+ paramsIndex?: number | undefined
51
+ paramsDecimals?: number | undefined
52
+ event: string
53
+ address: string
54
+ abi: any[]
55
+ }>
56
+ static validateUpdate(options: any): void
57
57
  }