@beabee/beabee-common 1.19.5 → 1.19.7
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/README.md +41 -0
- package/dist/cjs/data/index.cjs +87 -0
- package/dist/cjs/error/InvalidRule.cjs +35 -0
- package/dist/cjs/error/index.cjs +22 -0
- package/dist/cjs/index.cjs +28 -0
- package/dist/cjs/search/api-keys.cjs +35 -0
- package/dist/cjs/search/callouts.cjs +131 -0
- package/dist/cjs/search/contacts.cjs +105 -0
- package/dist/cjs/search/index.cjs +32 -0
- package/dist/cjs/search/notices.cjs +61 -0
- package/dist/cjs/search/operators.cjs +89 -0
- package/dist/cjs/search/payments.cjs +51 -0
- package/dist/cjs/types/api-key-filter-name.cjs +16 -0
- package/dist/cjs/types/array-filter-args.cjs +16 -0
- package/dist/cjs/types/base-callout-component-schema.cjs +16 -0
- package/dist/cjs/types/base-filter-args.cjs +16 -0
- package/dist/cjs/types/base-validated-rule.cjs +16 -0
- package/dist/cjs/types/callout-component-schema.cjs +16 -0
- package/dist/cjs/types/callout-filter-name.cjs +16 -0
- package/dist/cjs/types/callout-form-schema.cjs +16 -0
- package/dist/cjs/types/callout-navigation-schema.cjs +16 -0
- package/dist/cjs/types/callout-response-answer-address.cjs +16 -0
- package/dist/cjs/types/callout-response-answer-file-upload.cjs +16 -0
- package/dist/cjs/types/callout-response-answer.cjs +16 -0
- package/dist/cjs/types/callout-response-answers.cjs +16 -0
- package/dist/cjs/types/callout-response-comment-filter-name.cjs +16 -0
- package/dist/cjs/types/callout-response-filter-name.cjs +16 -0
- package/dist/cjs/types/callout-slide-schema.cjs +16 -0
- package/dist/cjs/types/callout-tag-filter-name.cjs +16 -0
- package/dist/cjs/types/content-callout-component-schema.cjs +16 -0
- package/dist/cjs/types/date-unit.cjs +16 -0
- package/dist/cjs/types/duration.cjs +16 -0
- package/dist/cjs/types/enum-filter-args.cjs +16 -0
- package/dist/cjs/types/feeable.cjs +16 -0
- package/dist/cjs/types/filter-args.cjs +16 -0
- package/dist/cjs/types/filter-type.cjs +16 -0
- package/dist/cjs/types/filters.cjs +16 -0
- package/dist/cjs/types/index.cjs +120 -0
- package/dist/cjs/types/input-callout-component-schema.cjs +16 -0
- package/dist/cjs/types/input-file-callout-component-schema.cjs +16 -0
- package/dist/cjs/types/nestable-callout-component-schema.cjs +16 -0
- package/dist/cjs/types/notice-filter-name.cjs +16 -0
- package/dist/cjs/types/operators-by-type.cjs +16 -0
- package/dist/cjs/types/other-filter-args.cjs +16 -0
- package/dist/cjs/types/paginated-query.cjs +16 -0
- package/dist/cjs/types/paginated.cjs +16 -0
- package/dist/cjs/types/payment-filter-name.cjs +16 -0
- package/dist/cjs/types/radio-callout-component-schema.cjs +16 -0
- package/dist/cjs/types/role-type.cjs +16 -0
- package/dist/cjs/types/rule-group.cjs +16 -0
- package/dist/cjs/types/rule-operator.cjs +16 -0
- package/dist/cjs/types/rule-opperator-params.cjs +16 -0
- package/dist/cjs/types/rule-value.cjs +16 -0
- package/dist/cjs/types/rule.cjs +16 -0
- package/dist/cjs/types/select-callout-component-schema.cjs +16 -0
- package/dist/cjs/types/stripe-fee-country.cjs +16 -0
- package/dist/cjs/types/unit-matches.cjs +16 -0
- package/dist/cjs/types/validated-boolean-rule.cjs +16 -0
- package/dist/cjs/types/validated-number-rule.cjs +16 -0
- package/dist/cjs/types/validated-rule-group.cjs +16 -0
- package/dist/cjs/types/validated-rule-value.cjs +16 -0
- package/dist/cjs/types/validated-rule.cjs +16 -0
- package/dist/cjs/types/validated-string-rule.cjs +16 -0
- package/dist/cjs/utils/callouts.cjs +137 -0
- package/dist/cjs/utils/date.cjs +87 -0
- package/dist/cjs/utils/index.cjs +28 -0
- package/dist/cjs/utils/payments.cjs +53 -0
- package/dist/cjs/utils/rules.cjs +109 -0
- package/dist/esm/data/index.js +57 -50
- package/dist/esm/error/InvalidRule.js +10 -7
- package/dist/esm/error/index.js +1 -2
- package/dist/esm/index.js +4 -7
- package/dist/esm/search/api-keys.js +10 -7
- package/dist/esm/search/callouts.js +100 -94
- package/dist/esm/search/contacts.js +83 -74
- package/dist/esm/search/index.js +6 -64
- package/dist/esm/search/notices.js +36 -33
- package/dist/esm/search/operators.js +62 -0
- package/dist/esm/search/payments.js +26 -23
- package/dist/esm/types/api-key-filter-name.js +0 -0
- package/dist/esm/types/array-filter-args.js +0 -0
- package/dist/esm/types/base-callout-component-schema.js +0 -0
- package/dist/esm/types/base-filter-args.js +0 -0
- package/dist/esm/types/base-validated-rule.js +0 -0
- package/dist/esm/types/callout-component-schema.js +0 -0
- package/dist/esm/types/callout-filter-name.js +0 -0
- package/dist/esm/types/callout-form-schema.js +0 -0
- package/dist/esm/types/callout-navigation-schema.js +0 -0
- package/dist/esm/types/callout-response-answer-address.js +0 -0
- package/dist/esm/types/callout-response-answer-file-upload.js +0 -0
- package/dist/esm/types/callout-response-answer.js +0 -0
- package/dist/esm/types/callout-response-answers.js +0 -0
- package/dist/esm/types/callout-response-comment-filter-name.js +0 -0
- package/dist/esm/types/callout-response-filter-name.js +0 -0
- package/dist/esm/types/callout-slide-schema.js +0 -0
- package/dist/esm/types/callout-tag-filter-name.js +0 -0
- package/dist/esm/types/content-callout-component-schema.js +0 -0
- package/dist/esm/types/date-unit.js +0 -0
- package/dist/esm/types/duration.js +0 -0
- package/dist/esm/types/enum-filter-args.js +0 -0
- package/dist/esm/types/feeable.js +0 -0
- package/dist/esm/types/filter-args.js +0 -0
- package/dist/esm/types/filter-type.js +0 -0
- package/dist/esm/types/filters.js +0 -0
- package/dist/esm/types/index.js +50 -0
- package/dist/esm/types/input-callout-component-schema.js +0 -0
- package/dist/esm/types/input-file-callout-component-schema.js +0 -0
- package/dist/esm/types/nestable-callout-component-schema.js +0 -0
- package/dist/esm/types/notice-filter-name.js +0 -0
- package/dist/esm/types/operators-by-type.js +0 -0
- package/dist/esm/types/other-filter-args.js +0 -0
- package/dist/esm/types/paginated-query.js +0 -0
- package/dist/esm/types/paginated.js +0 -0
- package/dist/esm/types/payment-filter-name.js +0 -0
- package/dist/esm/types/radio-callout-component-schema.js +0 -0
- package/dist/esm/types/role-type.js +0 -0
- package/dist/esm/types/rule-group.js +0 -0
- package/dist/esm/types/rule-operator.js +0 -0
- package/dist/esm/types/rule-opperator-params.js +0 -0
- package/dist/esm/types/rule-value.js +0 -0
- package/dist/esm/types/rule.js +0 -0
- package/dist/esm/types/select-callout-component-schema.js +0 -0
- package/dist/esm/types/stripe-fee-country.js +0 -0
- package/dist/esm/types/unit-matches.js +0 -0
- package/dist/esm/types/validated-boolean-rule.js +0 -0
- package/dist/esm/types/validated-number-rule.js +0 -0
- package/dist/esm/types/validated-rule-group.js +0 -0
- package/dist/esm/types/validated-rule-value.js +0 -0
- package/dist/esm/types/validated-rule.js +0 -0
- package/dist/esm/types/validated-string-rule.js +0 -0
- package/dist/esm/utils/callouts.js +91 -93
- package/dist/esm/utils/date.js +56 -56
- package/dist/esm/utils/index.js +4 -0
- package/dist/esm/utils/payments.js +25 -23
- package/dist/esm/utils/rules.js +75 -58
- package/dist/types/data/index.d.ts +0 -4
- package/dist/types/error/InvalidRule.d.ts +2 -2
- package/dist/types/error/index.d.ts +1 -2
- package/dist/types/index.d.ts +5 -7
- package/dist/types/search/api-keys.d.ts +0 -1
- package/dist/types/search/callouts.d.ts +1 -5
- package/dist/types/search/contacts.d.ts +3 -2
- package/dist/types/search/index.d.ts +6 -194
- package/dist/types/search/notices.d.ts +1 -2
- package/dist/types/search/operators.d.ts +128 -0
- package/dist/types/search/payments.d.ts +1 -2
- package/dist/types/types/api-key-filter-name.d.ts +2 -0
- package/dist/types/types/array-filter-args.d.ts +5 -0
- package/dist/types/types/base-callout-component-schema.d.ts +9 -0
- package/dist/types/types/base-filter-args.d.ts +5 -0
- package/dist/types/types/base-validated-rule.d.ts +9 -0
- package/dist/types/types/callout-component-schema.d.ts +2 -0
- package/dist/types/types/callout-filter-name.d.ts +2 -0
- package/dist/types/types/callout-form-schema.d.ts +4 -0
- package/dist/types/types/callout-navigation-schema.d.ts +6 -0
- package/dist/types/types/callout-response-answer-address.d.ts +9 -0
- package/dist/types/types/callout-response-answer-file-upload.d.ts +3 -0
- package/dist/types/types/callout-response-answer.d.ts +2 -0
- package/dist/types/types/callout-response-answers.d.ts +5 -0
- package/dist/types/types/callout-response-comment-filter-name.d.ts +2 -0
- package/dist/types/types/callout-response-filter-name.d.ts +2 -0
- package/dist/types/types/callout-slide-schema.d.ts +7 -0
- package/dist/types/types/callout-tag-filter-name.d.ts +2 -0
- package/dist/types/types/content-callout-component-schema.d.ts +5 -0
- package/dist/types/types/date-unit.d.ts +2 -0
- package/dist/types/types/duration.d.ts +1 -0
- package/dist/types/types/enum-filter-args.d.ts +5 -0
- package/dist/types/types/feeable.d.ts +6 -0
- package/dist/types/types/filter-args.d.ts +2 -0
- package/dist/types/types/filter-type.d.ts +1 -0
- package/dist/types/types/filters.d.ts +2 -0
- package/dist/types/types/index.d.ts +50 -0
- package/dist/types/types/input-callout-component-schema.d.ts +6 -0
- package/dist/types/types/input-file-callout-component-schema.d.ts +5 -0
- package/dist/types/types/nestable-callout-component-schema.d.ts +6 -0
- package/dist/types/types/notice-filter-name.d.ts +2 -0
- package/dist/types/types/operators-by-type.d.ts +2 -0
- package/dist/types/types/other-filter-args.d.ts +4 -0
- package/dist/types/types/paginated-query.d.ts +8 -0
- package/dist/types/types/paginated.d.ts +6 -0
- package/dist/types/types/payment-filter-name.d.ts +2 -0
- package/dist/types/types/radio-callout-component-schema.d.ts +10 -0
- package/dist/types/types/role-type.d.ts +2 -0
- package/dist/types/types/rule-group.d.ts +5 -0
- package/dist/types/types/rule-operator.d.ts +2 -0
- package/dist/types/types/rule-opperator-params.d.ts +3 -0
- package/dist/types/types/rule-value.d.ts +1 -0
- package/dist/types/types/rule.d.ts +6 -0
- package/dist/types/types/select-callout-component-schema.d.ts +11 -0
- package/dist/types/types/stripe-fee-country.d.ts +1 -0
- package/dist/types/types/unit-matches.d.ts +2 -0
- package/dist/types/types/validated-boolean-rule.d.ts +2 -0
- package/dist/types/types/validated-number-rule.d.ts +2 -0
- package/dist/types/types/validated-rule-group.d.ts +5 -0
- package/dist/types/types/validated-rule-value.d.ts +2 -0
- package/dist/types/types/validated-rule.d.ts +2 -0
- package/dist/types/types/validated-string-rule.d.ts +2 -0
- package/dist/types/utils/callouts.d.ts +1 -3
- package/dist/types/utils/date.d.ts +3 -3
- package/dist/types/utils/index.d.ts +4 -0
- package/dist/types/utils/payments.d.ts +1 -7
- package/dist/types/utils/rules.d.ts +1 -1
- package/package.json +31 -12
- package/dist/cjs/data/callouts.js +0 -2
- package/dist/cjs/data/index.js +0 -67
- package/dist/cjs/error/InvalidRule.js +0 -11
- package/dist/cjs/error/index.js +0 -8
- package/dist/cjs/index.js +0 -23
- package/dist/cjs/search/api-keys.js +0 -11
- package/dist/cjs/search/callouts.js +0 -101
- package/dist/cjs/search/contacts.js +0 -78
- package/dist/cjs/search/index.js +0 -81
- package/dist/cjs/search/notices.js +0 -37
- package/dist/cjs/search/payments.js +0 -27
- package/dist/cjs/utils/callouts.js +0 -118
- package/dist/cjs/utils/date.js +0 -77
- package/dist/cjs/utils/payments.js +0 -31
- package/dist/cjs/utils/rules.js +0 -69
- package/dist/esm/data/callouts.js +0 -1
- package/dist/types/data/callouts.d.ts +0 -70
|
@@ -1,194 +1,6 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
value: RuleValue[];
|
|
8
|
-
}
|
|
9
|
-
export interface RuleGroup {
|
|
10
|
-
condition: "AND" | "OR";
|
|
11
|
-
rules: (RuleGroup | Rule)[];
|
|
12
|
-
}
|
|
13
|
-
export type ValidatedRuleValue<T extends FilterType> = T extends "number" ? number : T extends "boolean" ? boolean : string;
|
|
14
|
-
interface BaseValidatedRule<T extends FilterType, F extends string> {
|
|
15
|
-
type: T;
|
|
16
|
-
field: F;
|
|
17
|
-
nullable: boolean;
|
|
18
|
-
operator: keyof (typeof operatorsByType)[T];
|
|
19
|
-
value: ValidatedRuleValue<T>[];
|
|
20
|
-
}
|
|
21
|
-
type ValidatedNumberRule<Field extends string> = BaseValidatedRule<"number", Field>;
|
|
22
|
-
type ValidatedStringRule<Field extends string> = BaseValidatedRule<Exclude<FilterType, "number" | "boolean">, Field>;
|
|
23
|
-
type ValidatedBooleanRule<Field extends string> = BaseValidatedRule<"boolean", Field>;
|
|
24
|
-
export type ValidatedRule<Field extends string> = ValidatedNumberRule<Field> | ValidatedStringRule<Field> | ValidatedBooleanRule<Field>;
|
|
25
|
-
export interface ValidatedRuleGroup<Field extends string> {
|
|
26
|
-
condition: "AND" | "OR";
|
|
27
|
-
rules: (ValidatedRuleGroup<Field> | ValidatedRule<Field>)[];
|
|
28
|
-
}
|
|
29
|
-
export type FilterType = "text" | "blob" | "date" | "number" | "boolean" | "array" | "enum" | "contact";
|
|
30
|
-
interface BaseFilterArgs {
|
|
31
|
-
type: FilterType;
|
|
32
|
-
nullable?: boolean;
|
|
33
|
-
}
|
|
34
|
-
export interface ArrayFilterArgs<T extends readonly string[] | undefined> extends BaseFilterArgs {
|
|
35
|
-
type: "array";
|
|
36
|
-
options?: T;
|
|
37
|
-
}
|
|
38
|
-
export interface EnumFilterArgs<T extends readonly string[]> extends BaseFilterArgs {
|
|
39
|
-
type: "enum";
|
|
40
|
-
options: T;
|
|
41
|
-
}
|
|
42
|
-
export interface OtherFilterArgs extends BaseFilterArgs {
|
|
43
|
-
type: Exclude<FilterType, "array" | "enum">;
|
|
44
|
-
}
|
|
45
|
-
export type FilterArgs = ArrayFilterArgs<readonly string[] | undefined> | EnumFilterArgs<readonly string[]> | OtherFilterArgs;
|
|
46
|
-
export type Filters<T extends string = string> = Record<T, FilterArgs>;
|
|
47
|
-
export interface RuleOperatorParams {
|
|
48
|
-
args: number;
|
|
49
|
-
}
|
|
50
|
-
export declare const nullableOperators: {
|
|
51
|
-
is_empty: {
|
|
52
|
-
args: number;
|
|
53
|
-
};
|
|
54
|
-
is_not_empty: {
|
|
55
|
-
args: number;
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
type OperatorsByType = Record<FilterType, Partial<Record<RuleOperator, RuleOperatorParams>>>;
|
|
59
|
-
export declare const operatorsByType: {
|
|
60
|
-
readonly text: {
|
|
61
|
-
readonly begins_with: {
|
|
62
|
-
args: number;
|
|
63
|
-
};
|
|
64
|
-
readonly ends_with: {
|
|
65
|
-
args: number;
|
|
66
|
-
};
|
|
67
|
-
readonly not_begins_with: {
|
|
68
|
-
args: number;
|
|
69
|
-
};
|
|
70
|
-
readonly not_ends_with: {
|
|
71
|
-
args: number;
|
|
72
|
-
};
|
|
73
|
-
readonly contains: {
|
|
74
|
-
args: number;
|
|
75
|
-
};
|
|
76
|
-
readonly not_contains: {
|
|
77
|
-
args: number;
|
|
78
|
-
};
|
|
79
|
-
readonly equal: {
|
|
80
|
-
args: number;
|
|
81
|
-
};
|
|
82
|
-
readonly not_equal: {
|
|
83
|
-
args: number;
|
|
84
|
-
};
|
|
85
|
-
};
|
|
86
|
-
readonly blob: {
|
|
87
|
-
contains: {
|
|
88
|
-
args: number;
|
|
89
|
-
};
|
|
90
|
-
not_contains: {
|
|
91
|
-
args: number;
|
|
92
|
-
};
|
|
93
|
-
};
|
|
94
|
-
readonly date: {
|
|
95
|
-
between: {
|
|
96
|
-
args: number;
|
|
97
|
-
};
|
|
98
|
-
not_between: {
|
|
99
|
-
args: number;
|
|
100
|
-
};
|
|
101
|
-
less: {
|
|
102
|
-
args: number;
|
|
103
|
-
};
|
|
104
|
-
greater: {
|
|
105
|
-
args: number;
|
|
106
|
-
};
|
|
107
|
-
less_or_equal: {
|
|
108
|
-
args: number;
|
|
109
|
-
};
|
|
110
|
-
greater_or_equal: {
|
|
111
|
-
args: number;
|
|
112
|
-
};
|
|
113
|
-
equal: {
|
|
114
|
-
args: number;
|
|
115
|
-
};
|
|
116
|
-
not_equal: {
|
|
117
|
-
args: number;
|
|
118
|
-
};
|
|
119
|
-
};
|
|
120
|
-
readonly number: {
|
|
121
|
-
between: {
|
|
122
|
-
args: number;
|
|
123
|
-
};
|
|
124
|
-
not_between: {
|
|
125
|
-
args: number;
|
|
126
|
-
};
|
|
127
|
-
less: {
|
|
128
|
-
args: number;
|
|
129
|
-
};
|
|
130
|
-
greater: {
|
|
131
|
-
args: number;
|
|
132
|
-
};
|
|
133
|
-
less_or_equal: {
|
|
134
|
-
args: number;
|
|
135
|
-
};
|
|
136
|
-
greater_or_equal: {
|
|
137
|
-
args: number;
|
|
138
|
-
};
|
|
139
|
-
equal: {
|
|
140
|
-
args: number;
|
|
141
|
-
};
|
|
142
|
-
not_equal: {
|
|
143
|
-
args: number;
|
|
144
|
-
};
|
|
145
|
-
};
|
|
146
|
-
readonly boolean: {
|
|
147
|
-
readonly equal: {
|
|
148
|
-
args: number;
|
|
149
|
-
};
|
|
150
|
-
};
|
|
151
|
-
readonly array: {
|
|
152
|
-
contains: {
|
|
153
|
-
args: number;
|
|
154
|
-
};
|
|
155
|
-
not_contains: {
|
|
156
|
-
args: number;
|
|
157
|
-
};
|
|
158
|
-
};
|
|
159
|
-
readonly enum: {
|
|
160
|
-
equal: {
|
|
161
|
-
args: number;
|
|
162
|
-
};
|
|
163
|
-
not_equal: {
|
|
164
|
-
args: number;
|
|
165
|
-
};
|
|
166
|
-
};
|
|
167
|
-
readonly contact: {
|
|
168
|
-
equal: {
|
|
169
|
-
args: number;
|
|
170
|
-
};
|
|
171
|
-
not_equal: {
|
|
172
|
-
args: number;
|
|
173
|
-
};
|
|
174
|
-
};
|
|
175
|
-
};
|
|
176
|
-
export declare const operatorsByTypeMap: OperatorsByType;
|
|
177
|
-
export interface Paginated<T> {
|
|
178
|
-
items: T[];
|
|
179
|
-
offset: number;
|
|
180
|
-
count: number;
|
|
181
|
-
total: number;
|
|
182
|
-
}
|
|
183
|
-
export interface PaginatedQuery {
|
|
184
|
-
limit?: number;
|
|
185
|
-
offset?: number;
|
|
186
|
-
sort?: string;
|
|
187
|
-
order?: "ASC" | "DESC";
|
|
188
|
-
rules?: RuleGroup;
|
|
189
|
-
}
|
|
190
|
-
export * from "./api-keys";
|
|
191
|
-
export * from "./callouts";
|
|
192
|
-
export * from "./contacts";
|
|
193
|
-
export * from "./notices";
|
|
194
|
-
export * from "./payments";
|
|
1
|
+
export * from "./api-keys.ts";
|
|
2
|
+
export * from "./callouts.ts";
|
|
3
|
+
export * from "./contacts.ts";
|
|
4
|
+
export * from "./notices.ts";
|
|
5
|
+
export * from "./operators.ts";
|
|
6
|
+
export * from "./payments.ts";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ItemStatus } from "../data";
|
|
1
|
+
import { ItemStatus } from "../data/index.ts";
|
|
2
2
|
export declare const noticeFilters: {
|
|
3
3
|
readonly id: {
|
|
4
4
|
readonly type: "text";
|
|
@@ -27,4 +27,3 @@ export declare const noticeFilters: {
|
|
|
27
27
|
readonly options: readonly [ItemStatus.Draft, ItemStatus.Scheduled, ItemStatus.Open, ItemStatus.Ended];
|
|
28
28
|
};
|
|
29
29
|
};
|
|
30
|
-
export type NoticeFilterName = keyof typeof noticeFilters;
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import type { OperatorsByType } from "../types/index.ts";
|
|
2
|
+
export declare const nullableOperators: {
|
|
3
|
+
is_empty: {
|
|
4
|
+
args: number;
|
|
5
|
+
};
|
|
6
|
+
is_not_empty: {
|
|
7
|
+
args: number;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export declare const operatorsByType: {
|
|
11
|
+
readonly text: {
|
|
12
|
+
readonly begins_with: {
|
|
13
|
+
args: number;
|
|
14
|
+
};
|
|
15
|
+
readonly ends_with: {
|
|
16
|
+
args: number;
|
|
17
|
+
};
|
|
18
|
+
readonly not_begins_with: {
|
|
19
|
+
args: number;
|
|
20
|
+
};
|
|
21
|
+
readonly not_ends_with: {
|
|
22
|
+
args: number;
|
|
23
|
+
};
|
|
24
|
+
readonly contains: {
|
|
25
|
+
args: number;
|
|
26
|
+
};
|
|
27
|
+
readonly not_contains: {
|
|
28
|
+
args: number;
|
|
29
|
+
};
|
|
30
|
+
readonly equal: {
|
|
31
|
+
args: number;
|
|
32
|
+
};
|
|
33
|
+
readonly not_equal: {
|
|
34
|
+
args: number;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
readonly blob: {
|
|
38
|
+
contains: {
|
|
39
|
+
args: number;
|
|
40
|
+
};
|
|
41
|
+
not_contains: {
|
|
42
|
+
args: number;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
readonly date: {
|
|
46
|
+
between: {
|
|
47
|
+
args: number;
|
|
48
|
+
};
|
|
49
|
+
not_between: {
|
|
50
|
+
args: number;
|
|
51
|
+
};
|
|
52
|
+
less: {
|
|
53
|
+
args: number;
|
|
54
|
+
};
|
|
55
|
+
greater: {
|
|
56
|
+
args: number;
|
|
57
|
+
};
|
|
58
|
+
less_or_equal: {
|
|
59
|
+
args: number;
|
|
60
|
+
};
|
|
61
|
+
greater_or_equal: {
|
|
62
|
+
args: number;
|
|
63
|
+
};
|
|
64
|
+
equal: {
|
|
65
|
+
args: number;
|
|
66
|
+
};
|
|
67
|
+
not_equal: {
|
|
68
|
+
args: number;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
readonly number: {
|
|
72
|
+
between: {
|
|
73
|
+
args: number;
|
|
74
|
+
};
|
|
75
|
+
not_between: {
|
|
76
|
+
args: number;
|
|
77
|
+
};
|
|
78
|
+
less: {
|
|
79
|
+
args: number;
|
|
80
|
+
};
|
|
81
|
+
greater: {
|
|
82
|
+
args: number;
|
|
83
|
+
};
|
|
84
|
+
less_or_equal: {
|
|
85
|
+
args: number;
|
|
86
|
+
};
|
|
87
|
+
greater_or_equal: {
|
|
88
|
+
args: number;
|
|
89
|
+
};
|
|
90
|
+
equal: {
|
|
91
|
+
args: number;
|
|
92
|
+
};
|
|
93
|
+
not_equal: {
|
|
94
|
+
args: number;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
readonly boolean: {
|
|
98
|
+
readonly equal: {
|
|
99
|
+
args: number;
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
readonly array: {
|
|
103
|
+
contains: {
|
|
104
|
+
args: number;
|
|
105
|
+
};
|
|
106
|
+
not_contains: {
|
|
107
|
+
args: number;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
readonly enum: {
|
|
111
|
+
equal: {
|
|
112
|
+
args: number;
|
|
113
|
+
};
|
|
114
|
+
not_equal: {
|
|
115
|
+
args: number;
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
readonly contact: {
|
|
119
|
+
equal: {
|
|
120
|
+
args: number;
|
|
121
|
+
};
|
|
122
|
+
not_equal: {
|
|
123
|
+
args: number;
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
export declare const operatorsByTypeMap: OperatorsByType;
|
|
128
|
+
export declare const ruleOperators: readonly ["equal", "not_equal", "less", "less_or_equal", "greater", "greater_or_equal", "between", "not_between", "begins_with", "not_begins_with", "contains", "not_contains", "ends_with", "not_ends_with", "is_empty", "is_not_empty"];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PaymentStatus } from "../data";
|
|
1
|
+
import { PaymentStatus } from "../data/index.ts";
|
|
2
2
|
export declare const paymentFilters: {
|
|
3
3
|
readonly id: {
|
|
4
4
|
readonly type: "text";
|
|
@@ -17,4 +17,3 @@ export declare const paymentFilters: {
|
|
|
17
17
|
readonly options: readonly [PaymentStatus.Successful, PaymentStatus.Pending, PaymentStatus.Failed, PaymentStatus.Cancelled];
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
|
-
export type PaymentFilterName = keyof typeof paymentFilters;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { FilterType, ValidatedRuleValue } from "./index.ts";
|
|
2
|
+
import type { operatorsByType } from "../search/operators.ts";
|
|
3
|
+
export interface BaseValidatedRule<T extends FilterType, F extends string> {
|
|
4
|
+
type: T;
|
|
5
|
+
field: F;
|
|
6
|
+
nullable: boolean;
|
|
7
|
+
operator: keyof (typeof operatorsByType)[T];
|
|
8
|
+
value: ValidatedRuleValue<T>[];
|
|
9
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import type { ContentCalloutComponentSchema, InputCalloutComponentSchema, NestableCalloutComponentSchema, RadioCalloutComponentSchema, SelectCalloutComponentSchema } from "./index.ts";
|
|
2
|
+
export type CalloutComponentSchema = ContentCalloutComponentSchema | SelectCalloutComponentSchema | RadioCalloutComponentSchema | InputCalloutComponentSchema | NestableCalloutComponentSchema;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { CalloutResponseAnswer } from "./index.ts";
|
|
2
|
+
/**
|
|
3
|
+
* Answers are grouped by slide key: {[slideId]: {[componentKey]: answer | answer[]}}
|
|
4
|
+
*/
|
|
5
|
+
export type CalloutResponseAnswers = Record<string, Record<string, CalloutResponseAnswer | CalloutResponseAnswer[]> | undefined>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { Duration } from "date-fns";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type FilterType = "text" | "blob" | "date" | "number" | "boolean" | "array" | "enum" | "contact";
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export * from "./api-key-filter-name.ts";
|
|
2
|
+
export * from "./array-filter-args.ts";
|
|
3
|
+
export * from "./base-callout-component-schema.ts";
|
|
4
|
+
export * from "./base-filter-args.ts";
|
|
5
|
+
export * from "./base-validated-rule.ts";
|
|
6
|
+
export * from "./callout-component-schema.ts";
|
|
7
|
+
export * from "./callout-filter-name.ts";
|
|
8
|
+
export * from "./callout-form-schema.ts";
|
|
9
|
+
export * from "./callout-navigation-schema.ts";
|
|
10
|
+
export * from "./callout-response-answer-address.ts";
|
|
11
|
+
export * from "./callout-response-answer-file-upload.ts";
|
|
12
|
+
export * from "./callout-response-answer.ts";
|
|
13
|
+
export * from "./callout-response-answers.ts";
|
|
14
|
+
export * from "./callout-response-comment-filter-name.ts";
|
|
15
|
+
export * from "./callout-response-filter-name.ts";
|
|
16
|
+
export * from "./callout-slide-schema.ts";
|
|
17
|
+
export * from "./callout-tag-filter-name.ts";
|
|
18
|
+
export * from "./content-callout-component-schema.ts";
|
|
19
|
+
export * from "./date-unit.ts";
|
|
20
|
+
export * from "./duration.ts";
|
|
21
|
+
export * from "./enum-filter-args.ts";
|
|
22
|
+
export * from "./feeable.ts";
|
|
23
|
+
export * from "./filter-args.ts";
|
|
24
|
+
export * from "./filter-type.ts";
|
|
25
|
+
export * from "./filters.ts";
|
|
26
|
+
export * from "./input-callout-component-schema.ts";
|
|
27
|
+
export * from "./input-file-callout-component-schema.ts";
|
|
28
|
+
export * from "./nestable-callout-component-schema.ts";
|
|
29
|
+
export * from "./notice-filter-name.ts";
|
|
30
|
+
export * from "./operators-by-type.ts";
|
|
31
|
+
export * from "./other-filter-args.ts";
|
|
32
|
+
export * from "./paginated-query.ts";
|
|
33
|
+
export * from "./paginated.ts";
|
|
34
|
+
export * from "./payment-filter-name.ts";
|
|
35
|
+
export * from "./radio-callout-component-schema.ts";
|
|
36
|
+
export * from "./role-type.ts";
|
|
37
|
+
export * from "./rule-group.ts";
|
|
38
|
+
export * from "./rule-operator.ts";
|
|
39
|
+
export * from "./rule-opperator-params.ts";
|
|
40
|
+
export * from "./rule-value.ts";
|
|
41
|
+
export * from "./rule.ts";
|
|
42
|
+
export * from "./select-callout-component-schema.ts";
|
|
43
|
+
export * from "./stripe-fee-country.ts";
|
|
44
|
+
export * from "./unit-matches.ts";
|
|
45
|
+
export * from "./validated-boolean-rule.ts";
|
|
46
|
+
export * from "./validated-number-rule.ts";
|
|
47
|
+
export * from "./validated-rule-group.ts";
|
|
48
|
+
export * from "./validated-rule-value.ts";
|
|
49
|
+
export * from "./validated-rule.ts";
|
|
50
|
+
export * from "./validated-string-rule.ts";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { BaseCalloutComponentSchema } from "./index.ts";
|
|
2
|
+
export interface InputCalloutComponentSchema extends BaseCalloutComponentSchema {
|
|
3
|
+
type: "address" | "button" | "checkbox" | "email" | "file" | "number" | "password" | "textfield" | "textarea" | "content" | "phoneNumber" | "currency" | "datetime" | "time" | "url" | "signature";
|
|
4
|
+
input: true;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { BaseCalloutComponentSchema } from "./index.ts";
|
|
2
|
+
export interface RadioCalloutComponentSchema extends BaseCalloutComponentSchema {
|
|
3
|
+
type: "radio" | "selectboxes";
|
|
4
|
+
input: true;
|
|
5
|
+
values: {
|
|
6
|
+
label: string;
|
|
7
|
+
value: string;
|
|
8
|
+
nextSlideId: string;
|
|
9
|
+
}[];
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type RuleValue = string | number | boolean;
|