@beabee/beabee-common 1.2.2 → 1.4.0
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/dist/cjs/search/callouts.js +1 -10
- package/dist/cjs/search/contacts.js +1 -18
- package/dist/cjs/search/index.js +21 -2
- package/dist/cjs/search/notices.js +1 -10
- package/dist/cjs/search/payments.js +11 -0
- package/dist/esm/search/callouts.js +0 -9
- package/dist/esm/search/contacts.js +0 -17
- package/dist/esm/search/index.js +20 -1
- package/dist/esm/search/notices.js +0 -9
- package/dist/esm/search/payments.js +8 -0
- package/dist/types/search/callouts.d.ts +2 -4
- package/dist/types/search/contacts.d.ts +1 -2
- package/dist/types/search/index.d.ts +4 -2
- package/dist/types/search/notices.d.ts +1 -2
- package/dist/types/search/payments.d.ts +9 -0
- package/package.json +1 -1
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.calloutResponseFilters = exports.
|
|
3
|
+
exports.calloutResponseFilters = exports.calloutFilters = void 0;
|
|
4
4
|
const data_1 = require("../data");
|
|
5
|
-
exports.calloutFilterNames = [
|
|
6
|
-
"title",
|
|
7
|
-
"status",
|
|
8
|
-
"answeredBy",
|
|
9
|
-
"starts",
|
|
10
|
-
"expires",
|
|
11
|
-
"hidden",
|
|
12
|
-
];
|
|
13
5
|
exports.calloutFilters = {
|
|
14
6
|
title: {
|
|
15
7
|
type: "text",
|
|
@@ -36,7 +28,6 @@ exports.calloutFilters = {
|
|
|
36
28
|
type: "boolean",
|
|
37
29
|
},
|
|
38
30
|
};
|
|
39
|
-
exports.calloutResponseFilterNames = ["member", "poll"];
|
|
40
31
|
exports.calloutResponseFilters = {
|
|
41
32
|
member: {
|
|
42
33
|
type: "contact",
|
|
@@ -1,24 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.contactFilters =
|
|
3
|
+
exports.contactFilters = void 0;
|
|
4
4
|
const data_1 = require("../data");
|
|
5
|
-
exports.contactFilterNames = [
|
|
6
|
-
"firstname",
|
|
7
|
-
"lastname",
|
|
8
|
-
"email",
|
|
9
|
-
"joined",
|
|
10
|
-
"contributionType",
|
|
11
|
-
"contributionMonthlyAmount",
|
|
12
|
-
"contributionPeriod",
|
|
13
|
-
"deliveryOptIn",
|
|
14
|
-
"newsletterStatus",
|
|
15
|
-
"activePermission",
|
|
16
|
-
"activeMembership",
|
|
17
|
-
"membershipStarts",
|
|
18
|
-
"membershipExpires",
|
|
19
|
-
"manualPaymentSource",
|
|
20
|
-
"tags",
|
|
21
|
-
];
|
|
22
5
|
exports.contactFilters = {
|
|
23
6
|
firstname: {
|
|
24
7
|
type: "text",
|
package/dist/cjs/search/index.js
CHANGED
|
@@ -14,7 +14,25 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.convertFiltersToRules = exports.convertRulesToFilters = exports.
|
|
17
|
+
exports.convertFiltersToRules = exports.convertRulesToFilters = exports.operationParams = exports.nullableOperators = exports.operators = void 0;
|
|
18
|
+
exports.operators = [
|
|
19
|
+
"equal",
|
|
20
|
+
"not_equal",
|
|
21
|
+
"less",
|
|
22
|
+
"less_or_equal",
|
|
23
|
+
"greater",
|
|
24
|
+
"greater_or_equal",
|
|
25
|
+
"between",
|
|
26
|
+
"not_between",
|
|
27
|
+
"begins_with",
|
|
28
|
+
"not_begins_with",
|
|
29
|
+
"contains",
|
|
30
|
+
"not_contains",
|
|
31
|
+
"ends_with",
|
|
32
|
+
"not_ends_with",
|
|
33
|
+
"is_empty",
|
|
34
|
+
"is_not_empty",
|
|
35
|
+
];
|
|
18
36
|
const equal = { args: 1 };
|
|
19
37
|
const equalityOperators = { equal, not_equal: { args: 1 } };
|
|
20
38
|
const numericOperators = {
|
|
@@ -34,7 +52,7 @@ exports.nullableOperators = {
|
|
|
34
52
|
is_empty: { args: 0 },
|
|
35
53
|
is_not_empty: { args: 0 },
|
|
36
54
|
};
|
|
37
|
-
exports.
|
|
55
|
+
exports.operationParams = {
|
|
38
56
|
text: {
|
|
39
57
|
...equalityOperators,
|
|
40
58
|
...arrayOperators,
|
|
@@ -77,3 +95,4 @@ exports.convertFiltersToRules = convertFiltersToRules;
|
|
|
77
95
|
__exportStar(require("./callouts"), exports);
|
|
78
96
|
__exportStar(require("./contacts"), exports);
|
|
79
97
|
__exportStar(require("./notices"), exports);
|
|
98
|
+
__exportStar(require("./payments"), exports);
|
|
@@ -1,16 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.noticeFilters =
|
|
3
|
+
exports.noticeFilters = void 0;
|
|
4
4
|
const data_1 = require("../data");
|
|
5
|
-
exports.noticeFilterNames = [
|
|
6
|
-
"createdAt",
|
|
7
|
-
"updatedAt",
|
|
8
|
-
"name",
|
|
9
|
-
"expires",
|
|
10
|
-
"enabled",
|
|
11
|
-
"text",
|
|
12
|
-
"status",
|
|
13
|
-
];
|
|
14
5
|
exports.noticeFilters = {
|
|
15
6
|
createdAt: {
|
|
16
7
|
type: "date",
|
|
@@ -1,12 +1,4 @@
|
|
|
1
1
|
import { ItemStatus } from "../data";
|
|
2
|
-
export const calloutFilterNames = [
|
|
3
|
-
"title",
|
|
4
|
-
"status",
|
|
5
|
-
"answeredBy",
|
|
6
|
-
"starts",
|
|
7
|
-
"expires",
|
|
8
|
-
"hidden",
|
|
9
|
-
];
|
|
10
2
|
export const calloutFilters = {
|
|
11
3
|
title: {
|
|
12
4
|
type: "text",
|
|
@@ -33,7 +25,6 @@ export const calloutFilters = {
|
|
|
33
25
|
type: "boolean",
|
|
34
26
|
},
|
|
35
27
|
};
|
|
36
|
-
export const calloutResponseFilterNames = ["member", "poll"];
|
|
37
28
|
export const calloutResponseFilters = {
|
|
38
29
|
member: {
|
|
39
30
|
type: "contact",
|
|
@@ -1,21 +1,4 @@
|
|
|
1
1
|
import { ContributionPeriod, ContributionType, NewsletterStatus, PermissionTypes, } from "../data";
|
|
2
|
-
export const contactFilterNames = [
|
|
3
|
-
"firstname",
|
|
4
|
-
"lastname",
|
|
5
|
-
"email",
|
|
6
|
-
"joined",
|
|
7
|
-
"contributionType",
|
|
8
|
-
"contributionMonthlyAmount",
|
|
9
|
-
"contributionPeriod",
|
|
10
|
-
"deliveryOptIn",
|
|
11
|
-
"newsletterStatus",
|
|
12
|
-
"activePermission",
|
|
13
|
-
"activeMembership",
|
|
14
|
-
"membershipStarts",
|
|
15
|
-
"membershipExpires",
|
|
16
|
-
"manualPaymentSource",
|
|
17
|
-
"tags",
|
|
18
|
-
];
|
|
19
2
|
export const contactFilters = {
|
|
20
3
|
firstname: {
|
|
21
4
|
type: "text",
|
package/dist/esm/search/index.js
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
export const operators = [
|
|
2
|
+
"equal",
|
|
3
|
+
"not_equal",
|
|
4
|
+
"less",
|
|
5
|
+
"less_or_equal",
|
|
6
|
+
"greater",
|
|
7
|
+
"greater_or_equal",
|
|
8
|
+
"between",
|
|
9
|
+
"not_between",
|
|
10
|
+
"begins_with",
|
|
11
|
+
"not_begins_with",
|
|
12
|
+
"contains",
|
|
13
|
+
"not_contains",
|
|
14
|
+
"ends_with",
|
|
15
|
+
"not_ends_with",
|
|
16
|
+
"is_empty",
|
|
17
|
+
"is_not_empty",
|
|
18
|
+
];
|
|
1
19
|
const equal = { args: 1 };
|
|
2
20
|
const equalityOperators = { equal, not_equal: { args: 1 } };
|
|
3
21
|
const numericOperators = {
|
|
@@ -17,7 +35,7 @@ export const nullableOperators = {
|
|
|
17
35
|
is_empty: { args: 0 },
|
|
18
36
|
is_not_empty: { args: 0 },
|
|
19
37
|
};
|
|
20
|
-
export const
|
|
38
|
+
export const operationParams = {
|
|
21
39
|
text: {
|
|
22
40
|
...equalityOperators,
|
|
23
41
|
...arrayOperators,
|
|
@@ -58,3 +76,4 @@ export function convertFiltersToRules(matchType, filters) {
|
|
|
58
76
|
export * from "./callouts";
|
|
59
77
|
export * from "./contacts";
|
|
60
78
|
export * from "./notices";
|
|
79
|
+
export * from "./payments";
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { ItemStatus } from "../data";
|
|
2
|
-
export declare const calloutFilterNames: readonly ["title", "status", "answeredBy", "starts", "expires", "hidden"];
|
|
3
|
-
export declare type CalloutFilterName = typeof calloutFilterNames[number];
|
|
4
2
|
export declare const calloutFilters: {
|
|
5
3
|
readonly title: {
|
|
6
4
|
readonly type: "text";
|
|
@@ -22,8 +20,7 @@ export declare const calloutFilters: {
|
|
|
22
20
|
readonly type: "boolean";
|
|
23
21
|
};
|
|
24
22
|
};
|
|
25
|
-
export declare
|
|
26
|
-
export declare type CalloutResponseFilterName = typeof calloutResponseFilterNames[number];
|
|
23
|
+
export declare type CalloutFilterName = keyof typeof calloutFilters;
|
|
27
24
|
export declare const calloutResponseFilters: {
|
|
28
25
|
readonly member: {
|
|
29
26
|
readonly type: "contact";
|
|
@@ -32,3 +29,4 @@ export declare const calloutResponseFilters: {
|
|
|
32
29
|
readonly type: "text";
|
|
33
30
|
};
|
|
34
31
|
};
|
|
32
|
+
export declare type CalloutResponseFilterName = keyof typeof calloutResponseFilters;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { ContributionPeriod, ContributionType, NewsletterStatus } from "../data";
|
|
2
|
-
export declare const contactFilterNames: readonly ["firstname", "lastname", "email", "joined", "contributionType", "contributionMonthlyAmount", "contributionPeriod", "deliveryOptIn", "newsletterStatus", "activePermission", "activeMembership", "membershipStarts", "membershipExpires", "manualPaymentSource", "tags"];
|
|
3
|
-
export declare type ContactFilterName = typeof contactFilterNames[number];
|
|
4
2
|
export declare const contactFilters: {
|
|
5
3
|
readonly firstname: {
|
|
6
4
|
readonly type: "text";
|
|
@@ -54,3 +52,4 @@ export declare const contactFilters: {
|
|
|
54
52
|
readonly nullable: true;
|
|
55
53
|
};
|
|
56
54
|
};
|
|
55
|
+
export declare type ContactFilterName = keyof typeof contactFilters;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export declare
|
|
1
|
+
export declare const operators: 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"];
|
|
2
|
+
export declare type GetPaginatedQueryRuleOperator = typeof operators[number];
|
|
2
3
|
export declare type GetPaginatedQueryRuleValue = string | number | boolean;
|
|
3
4
|
export interface GetPaginatedQueryRule<T> {
|
|
4
5
|
field: T;
|
|
@@ -30,7 +31,7 @@ export declare const nullableOperators: {
|
|
|
30
31
|
args: number;
|
|
31
32
|
};
|
|
32
33
|
};
|
|
33
|
-
export declare const
|
|
34
|
+
export declare const operationParams: Record<FilterType, Partial<Record<FilterOperator, FilterOperatorParams>>>;
|
|
34
35
|
interface BaseFilterArgs {
|
|
35
36
|
type: FilterType;
|
|
36
37
|
nullable?: boolean;
|
|
@@ -54,3 +55,4 @@ export declare function convertFiltersToRules(matchType: "all" | "any", filters:
|
|
|
54
55
|
export * from "./callouts";
|
|
55
56
|
export * from "./contacts";
|
|
56
57
|
export * from "./notices";
|
|
58
|
+
export * from "./payments";
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { ItemStatus } from "../data";
|
|
2
|
-
export declare const noticeFilterNames: readonly ["createdAt", "updatedAt", "name", "expires", "enabled", "text", "status"];
|
|
3
|
-
export declare type NoticeFilterName = typeof noticeFilterNames[number];
|
|
4
2
|
export declare const noticeFilters: {
|
|
5
3
|
readonly createdAt: {
|
|
6
4
|
readonly type: "date";
|
|
@@ -26,3 +24,4 @@ export declare const noticeFilters: {
|
|
|
26
24
|
readonly options: readonly [ItemStatus.Draft, ItemStatus.Scheduled, ItemStatus.Open, ItemStatus.Ended];
|
|
27
25
|
};
|
|
28
26
|
};
|
|
27
|
+
export declare type NoticeFilterName = keyof typeof noticeFilters;
|