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.
@@ -1,20 +1,23 @@
1
- import { NotificationConfig, NotificationTypeId } from "../notifications/notification.js";
2
- import { Network, TriggerConfig, TriggerTypeId } from "../triggers/trigger.js";
3
- export type Condition = '>' | '>=' | '<' | '<=' | '=' | 'true';
4
- export type TriggerOn = 'event' | 'latch';
1
+ import {
2
+ NotificationConfig,
3
+ NotificationTypeId
4
+ } from '../notifications/notification.js'
5
+ import { Network, TriggerConfig, TriggerTypeId } from '../triggers/trigger.js'
6
+ export type Condition = '>' | '>=' | '<' | '<=' | '=' | 'true'
7
+ export type TriggerOn = 'event' | 'latch'
5
8
  export type DeNotifyOptions = {
6
- email?: string;
7
- password?: string;
8
- projectId?: string;
9
- key?: string;
10
- url?: string;
11
- anonKey?: string;
12
- };
9
+ email?: string
10
+ password?: string
11
+ projectId?: string
12
+ key?: string
13
+ url?: string
14
+ anonKey?: string
15
+ }
13
16
  export type AlertConfig = {
14
- name: string;
15
- network: Network;
16
- triggerId: TriggerTypeId;
17
- trigger: TriggerConfig;
18
- notificationId: NotificationTypeId;
19
- notification: NotificationConfig;
20
- };
17
+ name: string
18
+ network: Network
19
+ triggerId: TriggerTypeId
20
+ trigger: TriggerConfig
21
+ notificationId: NotificationTypeId
22
+ notification: NotificationConfig
23
+ }
@@ -1,46 +1,73 @@
1
- type Logic = 'AND' | 'OR' | 'XOR' | 'NAND' | 'NOR' | 'WHERE';
2
- type NumericOperation = 'eq' | '!eq' | 'gt' | 'gte' | 'lt' | 'lte';
3
- type StringOperation = 'contains' | '!contains' | 'is' | '!is' | 'isEmpty' | '!isEmpty';
4
- type AddressOperation = 'is' | '!is' | 'isEmpty' | '!isEmpty';
5
- type FilterDataTypes = 'String' | 'Address' | 'Number';
6
- type FilterOpertationType = NumericOperation | StringOperation | AddressOperation;
7
- import * as yup from 'yup';
1
+ type Logic = 'AND' | 'OR' | 'XOR' | 'NAND' | 'NOR' | 'WHERE'
2
+ type NumericOperation = 'eq' | '!eq' | 'gt' | 'gte' | 'lt' | 'lte'
3
+ type StringOperation =
4
+ | 'contains'
5
+ | '!contains'
6
+ | 'is'
7
+ | '!is'
8
+ | 'isEmpty'
9
+ | '!isEmpty'
10
+ type AddressOperation = 'is' | '!is' | 'isEmpty' | '!isEmpty'
11
+ type FilterDataTypes = 'String' | 'Address' | 'Number'
12
+ type FilterOpertationType =
13
+ | NumericOperation
14
+ | StringOperation
15
+ | AddressOperation
16
+ import * as yup from 'yup'
8
17
  export type Condition = {
9
- logic?: Logic;
10
- key: string;
11
- type: FilterDataTypes;
12
- operation: FilterOpertationType;
13
- constant: string | number;
14
- };
18
+ logic?: Logic
19
+ key: string
20
+ type: FilterDataTypes
21
+ operation: FilterOpertationType
22
+ constant: string | number
23
+ }
15
24
  export type ConditionGroup = {
16
- logic: Logic;
17
- conditions: Condition[];
18
- };
19
- export type FilterConfig = ConditionGroup[];
25
+ logic: Logic
26
+ conditions: Condition[]
27
+ }
28
+ export type FilterConfig = ConditionGroup[]
20
29
  export declare class Filter {
21
- static version(): string;
22
- static execute(record: any, groupsIn: FilterConfig, version?: string): boolean;
23
- private static process;
24
- private static execLogic;
25
- private static execCondition;
30
+ static version(): string
31
+ static execute(record: any, groupsIn: FilterConfig, version?: string): boolean
32
+ private static process
33
+ private static execLogic
34
+ private static execCondition
26
35
  }
27
36
  export declare class FilterBuilder {
28
- private groups;
29
- constructor();
30
- static version(): string;
31
- static new(): FilterBuilder;
32
- newGroup(logic: Logic): FilterBuilder;
33
- addCondition(logic: Logic, key: string, type: FilterDataTypes, operation: FilterOpertationType, constant: string | number): FilterBuilder;
34
- finalise(): ConditionGroup[];
35
- static schema(): yup.ArraySchema<{
36
- conditions?: {
37
- operation?: string | undefined;
38
- constant?: {} | undefined;
39
- logic: NonNullable<"AND" | "OR" | "XOR" | "NAND" | "NOR" | "WHERE" | undefined>;
40
- key: string;
41
- type: NonNullable<"String" | "Address" | "Number" | undefined>;
42
- }[] | undefined;
43
- logic: NonNullable<"AND" | "OR" | "XOR" | "NAND" | "NOR" | "WHERE" | undefined>;
44
- }[] | undefined, yup.AnyObject, "", "">;
37
+ private groups
38
+ constructor()
39
+ static version(): string
40
+ static new(): FilterBuilder
41
+ newGroup(logic: Logic): FilterBuilder
42
+ addCondition(
43
+ logic: Logic,
44
+ key: string,
45
+ type: FilterDataTypes,
46
+ operation: FilterOpertationType,
47
+ constant: string | number
48
+ ): FilterBuilder
49
+ finalise(): ConditionGroup[]
50
+ static schema(): yup.ArraySchema<
51
+ | {
52
+ conditions?:
53
+ | {
54
+ operation?: string | undefined
55
+ constant?: {} | undefined
56
+ logic: NonNullable<
57
+ 'AND' | 'OR' | 'XOR' | 'NAND' | 'NOR' | 'WHERE' | undefined
58
+ >
59
+ key: string
60
+ type: NonNullable<'String' | 'Address' | 'Number' | undefined>
61
+ }[]
62
+ | undefined
63
+ logic: NonNullable<
64
+ 'AND' | 'OR' | 'XOR' | 'NAND' | 'NOR' | 'WHERE' | undefined
65
+ >
66
+ }[]
67
+ | undefined,
68
+ yup.AnyObject,
69
+ '',
70
+ ''
71
+ >
45
72
  }
46
- export {};
73
+ export {}