denotify-client 1.1.13 → 1.1.14
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.
- package/.eslintrc +1 -1
- package/.prettierrc +2 -2
- package/.vscode/settings.json +4 -0
- package/dist/denotify-client.cjs +1 -1
- package/dist/denotify-client.d.ts +2 -2
- package/dist/denotify-client.iife.js +1 -1
- package/dist/denotify-client.mjs +1 -1
- package/package.json +1 -1
- package/tsconfig.json +33 -21
- package/types/alertbuilder.d.ts +99 -69
- package/types/client.d.ts +12 -12
- package/types/denotifyclient.d.ts +59 -46
- package/types/examples/aave-healthcheck.d.ts +1 -1
- package/types/examples/balance-monitor.d.ts +1 -1
- package/types/examples/delete-alert.d.ts +1 -1
- package/types/functionbuilder.d.ts +31 -20
- package/types/index.d.ts +14 -7
- package/types/notifications/index.d.ts +36 -3
- package/types/notifications/notification.d.ts +27 -18
- package/types/notifications/notify_discord_webhook.d.ts +32 -32
- package/types/temp.d.ts +1 -1
- package/types/triggers/handler_function_call.d.ts +60 -56
- package/types/triggers/handler_function_call_v2.d.ts +94 -79
- package/types/triggers/handler_onchain_event.d.ts +51 -47
- package/types/triggers/index.d.ts +64 -5
- package/types/triggers/trigger.d.ts +66 -31
- package/types/types/notification.d.ts +6 -6
- package/types/types/trigger.d.ts +24 -21
- package/types/types/types.d.ts +21 -18
- package/types/util/filter.d.ts +67 -40
@@ -1,62 +1,66 @@
|
|
1
|
-
import { Condition } from
|
2
|
-
import { Network, TriggerRawConfig } from
|
1
|
+
import { Condition } from '../types/types.js'
|
2
|
+
import { Network, TriggerRawConfig } from './trigger.js'
|
3
3
|
export type PollFunctionV1 = {
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
}
|
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
|
+
}
|
14
14
|
export type HandlerFunctionCallRawConfig = {
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
}
|
25
|
-
export type HandlerFunctionCallUpdate = Partial<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
|
24
|
+
}
|
25
|
+
export type HandlerFunctionCallUpdate = Partial<HandlerFunctionCallRawConfig>
|
26
26
|
export type HandlerFunctionCallRawResponse = {
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
}
|
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
|
+
}
|
40
40
|
export type HandlerFunctionCallRawUpdate = {
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
}
|
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
|
+
}
|
51
51
|
export declare class HandlerFunctionCall {
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
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
|
+
}>
|
62
66
|
}
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import { FunctionCallerConfig } from
|
2
|
-
import { Condition } from
|
3
|
-
import { FilterConfig } from
|
4
|
-
import { Network, TriggerRawConfig } from
|
5
|
-
type TimeBase = 'blocks' | 'time'
|
1
|
+
import { FunctionCallerConfig } from '../functionbuilder.js'
|
2
|
+
import { Condition } from '../types/types.js'
|
3
|
+
import { FilterConfig } from '../util/filter.js'
|
4
|
+
import { Network, TriggerRawConfig } from './trigger.js'
|
5
|
+
type TimeBase = 'blocks' | 'time'
|
6
6
|
/**
|
7
7
|
* @typedef PollFunction
|
8
8
|
* @param {TimeBase} timeBase - Supports two poll period types. 'block' will test the trigger ever nBlocks blocks, 'time' will test the trigger as specified by timePeriod
|
@@ -10,82 +10,97 @@ type TimeBase = 'blocks' | 'time';
|
|
10
10
|
*
|
11
11
|
*/
|
12
12
|
export type PollFunctionV2 = {
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
}
|
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
|
+
}
|
24
24
|
export type HandlerFunctionCallV2RawConfig = {
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
}
|
36
|
-
export type HandlerFunctionCallV2Update =
|
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
|
+
}
|
36
|
+
export type HandlerFunctionCallV2Update =
|
37
|
+
Partial<HandlerFunctionCallV2RawConfig>
|
37
38
|
export type HandlerFunctionCallV2RawResponse = {
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
}
|
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
|
export type HandlerFunctionCallV2RawUpdate = {
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
}
|
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
|
export declare class HandlerFunctionCallV2 {
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
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
|
+
}>
|
90
105
|
}
|
91
|
-
export {}
|
106
|
+
export {}
|
@@ -1,53 +1,57 @@
|
|
1
|
-
import { Network, TriggerRawConfig } from
|
2
|
-
import { Condition } from
|
1
|
+
import { Network, TriggerRawConfig } from './trigger.js'
|
2
|
+
import { Condition } from '../types/types.js'
|
3
3
|
export type OnchainEventV1 = {
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
}
|
4
|
+
address: string
|
5
|
+
event: string
|
6
|
+
abi: any
|
7
|
+
condition: Condition
|
8
|
+
paramsIndex?: number
|
9
|
+
paramsDecimals?: number
|
10
|
+
constant?: number
|
11
|
+
}
|
12
12
|
export type HandlerOnchainEventRawConfig = {
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
}
|
21
|
-
export type HandlerOnchainEventUpdate = Partial<HandlerOnchainEventRawConfig
|
13
|
+
address: string
|
14
|
+
event: string
|
15
|
+
abi: any
|
16
|
+
condition: Condition
|
17
|
+
paramsIndex?: number
|
18
|
+
paramsDecimals?: number
|
19
|
+
constant?: number
|
20
|
+
}
|
21
|
+
export type HandlerOnchainEventUpdate = Partial<HandlerOnchainEventRawConfig>
|
22
22
|
export type HandlerOnchainEventRawResponse = {
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
}
|
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
|
+
}
|
33
33
|
export type HandlerOnchainEventRawUpdate = {
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
}
|
34
|
+
address?: string
|
35
|
+
event?: string
|
36
|
+
abi?: any
|
37
|
+
paramsIndex?: number
|
38
|
+
paramsDecimals?: number
|
39
|
+
constant?: number
|
40
|
+
}
|
41
41
|
export declare class HandlerOnchainEvent {
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
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
|
53
57
|
}
|
@@ -1,5 +1,64 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
import {
|
2
|
+
Network,
|
3
|
+
TriggerConfig,
|
4
|
+
TriggerTypeId,
|
5
|
+
TriggerUpdate,
|
6
|
+
TriggerTypeRawId,
|
7
|
+
TriggerOn,
|
8
|
+
HandlerRawConfig,
|
9
|
+
TriggerRawConfig,
|
10
|
+
Trigger
|
11
|
+
} from './trigger.js'
|
12
|
+
import {
|
13
|
+
PollFunctionV2,
|
14
|
+
HandlerFunctionCallV2RawConfig,
|
15
|
+
HandlerFunctionCallV2Update,
|
16
|
+
HandlerFunctionCallV2RawResponse,
|
17
|
+
HandlerFunctionCallV2RawUpdate,
|
18
|
+
HandlerFunctionCallV2
|
19
|
+
} from './handler_function_call_v2.js'
|
20
|
+
import {
|
21
|
+
PollFunctionV1,
|
22
|
+
HandlerFunctionCallRawConfig,
|
23
|
+
HandlerFunctionCallUpdate,
|
24
|
+
HandlerFunctionCallRawResponse,
|
25
|
+
HandlerFunctionCallRawUpdate,
|
26
|
+
HandlerFunctionCall
|
27
|
+
} from './handler_function_call.js'
|
28
|
+
import {
|
29
|
+
OnchainEventV1,
|
30
|
+
HandlerOnchainEventRawConfig,
|
31
|
+
HandlerOnchainEventUpdate,
|
32
|
+
HandlerOnchainEventRawResponse,
|
33
|
+
HandlerOnchainEventRawUpdate,
|
34
|
+
HandlerOnchainEvent
|
35
|
+
} from './handler_onchain_event.js'
|
36
|
+
export {
|
37
|
+
Network,
|
38
|
+
TriggerConfig,
|
39
|
+
TriggerTypeId,
|
40
|
+
TriggerUpdate,
|
41
|
+
TriggerTypeRawId,
|
42
|
+
TriggerOn,
|
43
|
+
HandlerRawConfig,
|
44
|
+
TriggerRawConfig,
|
45
|
+
Trigger,
|
46
|
+
PollFunctionV2,
|
47
|
+
HandlerFunctionCallV2RawConfig,
|
48
|
+
HandlerFunctionCallV2Update,
|
49
|
+
HandlerFunctionCallV2RawResponse,
|
50
|
+
HandlerFunctionCallV2RawUpdate,
|
51
|
+
HandlerFunctionCallV2,
|
52
|
+
PollFunctionV1,
|
53
|
+
HandlerFunctionCallRawConfig,
|
54
|
+
HandlerFunctionCallUpdate,
|
55
|
+
HandlerFunctionCallRawResponse,
|
56
|
+
HandlerFunctionCallRawUpdate,
|
57
|
+
HandlerFunctionCall,
|
58
|
+
OnchainEventV1,
|
59
|
+
HandlerOnchainEventRawConfig,
|
60
|
+
HandlerOnchainEventUpdate,
|
61
|
+
HandlerOnchainEventRawResponse,
|
62
|
+
HandlerOnchainEventRawUpdate,
|
63
|
+
HandlerOnchainEvent
|
64
|
+
}
|
@@ -1,35 +1,70 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
1
|
+
import {
|
2
|
+
HandlerFunctionCallRawConfig,
|
3
|
+
HandlerFunctionCallRawResponse,
|
4
|
+
HandlerFunctionCallUpdate,
|
5
|
+
PollFunctionV1
|
6
|
+
} from './handler_function_call.js'
|
7
|
+
import {
|
8
|
+
HandlerOnchainEventRawConfig,
|
9
|
+
HandlerOnchainEventRawResponse,
|
10
|
+
HandlerOnchainEventUpdate,
|
11
|
+
OnchainEventV1
|
12
|
+
} from './handler_onchain_event.js'
|
13
|
+
import {
|
14
|
+
HandlerFunctionCallV2RawConfig,
|
15
|
+
HandlerFunctionCallV2RawResponse,
|
16
|
+
HandlerFunctionCallV2Update,
|
17
|
+
PollFunctionV2
|
18
|
+
} from './handler_function_call_v2.js'
|
19
|
+
export type Network = 'avalanche' | 'ethereum'
|
20
|
+
export type TriggerConfig = PollFunctionV2 | PollFunctionV1 | OnchainEventV1
|
21
|
+
export type TriggerTypeId =
|
22
|
+
| 'PollFunctionV2'
|
23
|
+
| 'OnchainEventV1'
|
24
|
+
| 'PollFunctionV1'
|
25
|
+
export type TriggerUpdate =
|
26
|
+
| HandlerFunctionCallV2Update
|
27
|
+
| HandlerFunctionCallUpdate
|
28
|
+
| HandlerOnchainEventUpdate
|
29
|
+
export type TriggerTypeRawId =
|
30
|
+
| 'handler_function_call'
|
31
|
+
| 'handler_onchain_event'
|
32
|
+
| 'handler_function_call_v2'
|
33
|
+
export type TriggerOn = 'event' | 'latch'
|
34
|
+
export type HandlerRawConfig =
|
35
|
+
| HandlerFunctionCallRawConfig
|
36
|
+
| HandlerOnchainEventRawConfig
|
37
|
+
| HandlerFunctionCallV2RawConfig
|
11
38
|
export type TriggerRawConfig = {
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
}
|
18
|
-
export type HandlerRawResponse =
|
39
|
+
nickname: string
|
40
|
+
type: TriggerTypeRawId
|
41
|
+
alertType: TriggerOn
|
42
|
+
network: Network
|
43
|
+
handler: HandlerRawConfig
|
44
|
+
}
|
45
|
+
export type HandlerRawResponse =
|
46
|
+
| HandlerFunctionCallV2RawResponse
|
47
|
+
| HandlerFunctionCallRawResponse
|
48
|
+
| HandlerOnchainEventRawResponse
|
19
49
|
export type TriggerRawResponse = {
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
}
|
50
|
+
id: number
|
51
|
+
type: TriggerTypeRawId
|
52
|
+
triggered: boolean
|
53
|
+
lastBlock: number
|
54
|
+
alertType: 'event' | 'latch'
|
55
|
+
enabled: boolean
|
56
|
+
nickname: string
|
57
|
+
error: boolean
|
58
|
+
error_message: string | null
|
59
|
+
error_timestamp: number | null
|
60
|
+
network: Network
|
61
|
+
handler: HandlerRawResponse
|
62
|
+
}
|
33
63
|
export declare class Trigger {
|
34
|
-
|
64
|
+
static SimpleToRaw(
|
65
|
+
name: string,
|
66
|
+
id: TriggerTypeId,
|
67
|
+
network: Network,
|
68
|
+
config: TriggerConfig
|
69
|
+
): TriggerRawConfig
|
35
70
|
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
declare type DiscordWebhook = {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
}
|
7
|
-
declare type NotificationType = DiscordWebhook
|
2
|
+
url: string
|
3
|
+
message: string
|
4
|
+
username?: string
|
5
|
+
avatar_url?: string
|
6
|
+
}
|
7
|
+
declare type NotificationType = DiscordWebhook
|
package/types/types/trigger.d.ts
CHANGED
@@ -1,12 +1,15 @@
|
|
1
|
-
import { FilterConfig } from
|
1
|
+
import { FilterConfig } from '../util/filter'
|
2
2
|
export declare type FunctionCallerConfig = {
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
}[]
|
8
|
-
export declare type TriggerTypeId =
|
9
|
-
|
3
|
+
address: string
|
4
|
+
bytecode: string
|
5
|
+
abiHash: string
|
6
|
+
function: string
|
7
|
+
}[]
|
8
|
+
export declare type TriggerTypeId =
|
9
|
+
| 'PollFunctionV2'
|
10
|
+
| 'OnchainEventV2'
|
11
|
+
| 'FunctionEventV2'
|
12
|
+
declare type TimeBase = 'blocks' | 'time'
|
10
13
|
/**
|
11
14
|
* @typedef PollFunction
|
12
15
|
* @param {TimeBase} timeBase - Supports two poll period types. 'block' will test the trigger ever nBlocks blocks, 'time' will test the trigger as specified by timePeriod
|
@@ -14,16 +17,16 @@ declare type TimeBase = 'blocks' | 'time';
|
|
14
17
|
*
|
15
18
|
*/
|
16
19
|
export declare type PollFunction = {
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
}
|
28
|
-
export declare type TriggerType = PollFunction
|
29
|
-
export {}
|
20
|
+
timeBase: TimeBase
|
21
|
+
nBlocks?: number
|
22
|
+
timePeriod?: string | null
|
23
|
+
startTime?: number
|
24
|
+
debounceCount?: number
|
25
|
+
functions: FunctionCallerConfig
|
26
|
+
triggerOn: 'always' | 'filter'
|
27
|
+
latch?: boolean
|
28
|
+
filterVersion?: string
|
29
|
+
filter?: FilterConfig
|
30
|
+
}
|
31
|
+
export declare type TriggerType = PollFunction
|
32
|
+
export {}
|