@beabee/beabee-common 1.1.2 → 1.2.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/data/index.js +8 -1
- package/dist/cjs/search/callouts.js +38 -0
- package/dist/cjs/search/contacts.js +1 -1
- package/dist/cjs/search/index.js +1 -0
- package/dist/cjs/search/notices.js +43 -0
- package/dist/esm/data/index.js +7 -0
- package/dist/esm/search/callouts.js +35 -0
- package/dist/esm/search/contacts.js +2 -2
- package/dist/esm/search/index.js +1 -0
- package/dist/esm/search/notices.js +40 -0
- package/dist/types/data/index.d.ts +6 -0
- package/dist/types/search/callouts.d.ts +24 -0
- package/dist/types/search/index.d.ts +1 -1
- package/dist/types/search/notices.d.ts +28 -0
- package/package.json +1 -1
package/dist/cjs/data/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PermissionTypes = exports.PaymentStatus = exports.PaymentMethod = exports.NewsletterStatus = exports.MembershipStatus = exports.ContributionType = exports.ContributionPeriod = void 0;
|
|
3
|
+
exports.PermissionTypes = exports.PaymentStatus = exports.PaymentMethod = exports.NewsletterStatus = exports.MembershipStatus = exports.ItemStatus = exports.ContributionType = exports.ContributionPeriod = void 0;
|
|
4
4
|
var ContributionPeriod;
|
|
5
5
|
(function (ContributionPeriod) {
|
|
6
6
|
ContributionPeriod["Monthly"] = "monthly";
|
|
@@ -13,6 +13,13 @@ var ContributionType;
|
|
|
13
13
|
ContributionType["Gift"] = "Gift";
|
|
14
14
|
ContributionType["None"] = "None";
|
|
15
15
|
})(ContributionType = exports.ContributionType || (exports.ContributionType = {}));
|
|
16
|
+
var ItemStatus;
|
|
17
|
+
(function (ItemStatus) {
|
|
18
|
+
ItemStatus["Draft"] = "draft";
|
|
19
|
+
ItemStatus["Scheduled"] = "scheduled";
|
|
20
|
+
ItemStatus["Open"] = "open";
|
|
21
|
+
ItemStatus["Ended"] = "ended";
|
|
22
|
+
})(ItemStatus = exports.ItemStatus || (exports.ItemStatus = {}));
|
|
16
23
|
var MembershipStatus;
|
|
17
24
|
(function (MembershipStatus) {
|
|
18
25
|
MembershipStatus["Active"] = "active";
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.calloutFilters = exports.calloutFilterNames = void 0;
|
|
4
|
+
const data_1 = require("../data");
|
|
5
|
+
exports.calloutFilterNames = [
|
|
6
|
+
"title",
|
|
7
|
+
"status",
|
|
8
|
+
"answeredBy",
|
|
9
|
+
"starts",
|
|
10
|
+
"expires",
|
|
11
|
+
"hidden",
|
|
12
|
+
];
|
|
13
|
+
exports.calloutFilters = {
|
|
14
|
+
title: {
|
|
15
|
+
type: "text",
|
|
16
|
+
},
|
|
17
|
+
status: {
|
|
18
|
+
type: "enum",
|
|
19
|
+
options: [
|
|
20
|
+
data_1.ItemStatus.Draft,
|
|
21
|
+
data_1.ItemStatus.Scheduled,
|
|
22
|
+
data_1.ItemStatus.Open,
|
|
23
|
+
data_1.ItemStatus.Ended,
|
|
24
|
+
],
|
|
25
|
+
},
|
|
26
|
+
answeredBy: {
|
|
27
|
+
type: "contact",
|
|
28
|
+
},
|
|
29
|
+
starts: {
|
|
30
|
+
type: "date",
|
|
31
|
+
},
|
|
32
|
+
expires: {
|
|
33
|
+
type: "date",
|
|
34
|
+
},
|
|
35
|
+
hidden: {
|
|
36
|
+
type: "boolean",
|
|
37
|
+
},
|
|
38
|
+
};
|
package/dist/cjs/search/index.js
CHANGED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.noticeFilters = exports.noticeFilterNames = void 0;
|
|
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
|
+
exports.noticeFilters = {
|
|
15
|
+
createdAt: {
|
|
16
|
+
type: "date",
|
|
17
|
+
},
|
|
18
|
+
updatedAt: {
|
|
19
|
+
type: "date",
|
|
20
|
+
},
|
|
21
|
+
name: {
|
|
22
|
+
type: "text",
|
|
23
|
+
},
|
|
24
|
+
expires: {
|
|
25
|
+
type: "date",
|
|
26
|
+
nullable: true,
|
|
27
|
+
},
|
|
28
|
+
enabled: {
|
|
29
|
+
type: "boolean",
|
|
30
|
+
},
|
|
31
|
+
text: {
|
|
32
|
+
type: "text",
|
|
33
|
+
},
|
|
34
|
+
status: {
|
|
35
|
+
type: "enum",
|
|
36
|
+
options: [
|
|
37
|
+
data_1.ItemStatus.Draft,
|
|
38
|
+
data_1.ItemStatus.Scheduled,
|
|
39
|
+
data_1.ItemStatus.Open,
|
|
40
|
+
data_1.ItemStatus.Ended,
|
|
41
|
+
],
|
|
42
|
+
},
|
|
43
|
+
};
|
package/dist/esm/data/index.js
CHANGED
|
@@ -10,6 +10,13 @@ export var ContributionType;
|
|
|
10
10
|
ContributionType["Gift"] = "Gift";
|
|
11
11
|
ContributionType["None"] = "None";
|
|
12
12
|
})(ContributionType || (ContributionType = {}));
|
|
13
|
+
export var ItemStatus;
|
|
14
|
+
(function (ItemStatus) {
|
|
15
|
+
ItemStatus["Draft"] = "draft";
|
|
16
|
+
ItemStatus["Scheduled"] = "scheduled";
|
|
17
|
+
ItemStatus["Open"] = "open";
|
|
18
|
+
ItemStatus["Ended"] = "ended";
|
|
19
|
+
})(ItemStatus || (ItemStatus = {}));
|
|
13
20
|
export var MembershipStatus;
|
|
14
21
|
(function (MembershipStatus) {
|
|
15
22
|
MembershipStatus["Active"] = "active";
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ItemStatus } from "../data";
|
|
2
|
+
export const calloutFilterNames = [
|
|
3
|
+
"title",
|
|
4
|
+
"status",
|
|
5
|
+
"answeredBy",
|
|
6
|
+
"starts",
|
|
7
|
+
"expires",
|
|
8
|
+
"hidden",
|
|
9
|
+
];
|
|
10
|
+
export const calloutFilters = {
|
|
11
|
+
title: {
|
|
12
|
+
type: "text",
|
|
13
|
+
},
|
|
14
|
+
status: {
|
|
15
|
+
type: "enum",
|
|
16
|
+
options: [
|
|
17
|
+
ItemStatus.Draft,
|
|
18
|
+
ItemStatus.Scheduled,
|
|
19
|
+
ItemStatus.Open,
|
|
20
|
+
ItemStatus.Ended,
|
|
21
|
+
],
|
|
22
|
+
},
|
|
23
|
+
answeredBy: {
|
|
24
|
+
type: "contact",
|
|
25
|
+
},
|
|
26
|
+
starts: {
|
|
27
|
+
type: "date",
|
|
28
|
+
},
|
|
29
|
+
expires: {
|
|
30
|
+
type: "date",
|
|
31
|
+
},
|
|
32
|
+
hidden: {
|
|
33
|
+
type: "boolean",
|
|
34
|
+
},
|
|
35
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ContributionPeriod, ContributionType, NewsletterStatus, } from "../data";
|
|
1
|
+
import { ContributionPeriod, ContributionType, NewsletterStatus, PermissionTypes, } from "../data";
|
|
2
2
|
export const contactFilterNames = [
|
|
3
3
|
"firstname",
|
|
4
4
|
"lastname",
|
|
@@ -59,7 +59,7 @@ export const contactFilters = {
|
|
|
59
59
|
},
|
|
60
60
|
activePermission: {
|
|
61
61
|
type: "enum",
|
|
62
|
-
options:
|
|
62
|
+
options: PermissionTypes,
|
|
63
63
|
},
|
|
64
64
|
activeMembership: {
|
|
65
65
|
type: "boolean",
|
package/dist/esm/search/index.js
CHANGED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ItemStatus } from "../data";
|
|
2
|
+
export const noticeFilterNames = [
|
|
3
|
+
"createdAt",
|
|
4
|
+
"updatedAt",
|
|
5
|
+
"name",
|
|
6
|
+
"expires",
|
|
7
|
+
"enabled",
|
|
8
|
+
"text",
|
|
9
|
+
"status",
|
|
10
|
+
];
|
|
11
|
+
export const noticeFilters = {
|
|
12
|
+
createdAt: {
|
|
13
|
+
type: "date",
|
|
14
|
+
},
|
|
15
|
+
updatedAt: {
|
|
16
|
+
type: "date",
|
|
17
|
+
},
|
|
18
|
+
name: {
|
|
19
|
+
type: "text",
|
|
20
|
+
},
|
|
21
|
+
expires: {
|
|
22
|
+
type: "date",
|
|
23
|
+
nullable: true,
|
|
24
|
+
},
|
|
25
|
+
enabled: {
|
|
26
|
+
type: "boolean",
|
|
27
|
+
},
|
|
28
|
+
text: {
|
|
29
|
+
type: "text",
|
|
30
|
+
},
|
|
31
|
+
status: {
|
|
32
|
+
type: "enum",
|
|
33
|
+
options: [
|
|
34
|
+
ItemStatus.Draft,
|
|
35
|
+
ItemStatus.Scheduled,
|
|
36
|
+
ItemStatus.Open,
|
|
37
|
+
ItemStatus.Ended,
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
};
|
|
@@ -8,6 +8,12 @@ export declare enum ContributionType {
|
|
|
8
8
|
Gift = "Gift",
|
|
9
9
|
None = "None"
|
|
10
10
|
}
|
|
11
|
+
export declare enum ItemStatus {
|
|
12
|
+
Draft = "draft",
|
|
13
|
+
Scheduled = "scheduled",
|
|
14
|
+
Open = "open",
|
|
15
|
+
Ended = "ended"
|
|
16
|
+
}
|
|
11
17
|
export declare enum MembershipStatus {
|
|
12
18
|
Active = "active",
|
|
13
19
|
Expiring = "expiring",
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
export declare const calloutFilters: {
|
|
5
|
+
readonly title: {
|
|
6
|
+
readonly type: "text";
|
|
7
|
+
};
|
|
8
|
+
readonly status: {
|
|
9
|
+
readonly type: "enum";
|
|
10
|
+
readonly options: readonly [ItemStatus.Draft, ItemStatus.Scheduled, ItemStatus.Open, ItemStatus.Ended];
|
|
11
|
+
};
|
|
12
|
+
readonly answeredBy: {
|
|
13
|
+
readonly type: "contact";
|
|
14
|
+
};
|
|
15
|
+
readonly starts: {
|
|
16
|
+
readonly type: "date";
|
|
17
|
+
};
|
|
18
|
+
readonly expires: {
|
|
19
|
+
readonly type: "date";
|
|
20
|
+
};
|
|
21
|
+
readonly hidden: {
|
|
22
|
+
readonly type: "boolean";
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -16,7 +16,7 @@ export interface GetPaginatedQuery<T> {
|
|
|
16
16
|
order?: "ASC" | "DESC";
|
|
17
17
|
rules?: GetPaginatedQueryRuleGroup<T>;
|
|
18
18
|
}
|
|
19
|
-
export declare type FilterType = "text" | "date" | "number" | "boolean" | "array" | "enum";
|
|
19
|
+
export declare type FilterType = "text" | "date" | "number" | "boolean" | "array" | "enum" | "contact";
|
|
20
20
|
export declare type FilterValue = GetPaginatedQueryRuleValue;
|
|
21
21
|
export declare type FilterOperator = GetPaginatedQueryRuleOperator;
|
|
22
22
|
export interface FilterOperatorParams {
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
export declare const noticeFilters: {
|
|
5
|
+
readonly createdAt: {
|
|
6
|
+
readonly type: "date";
|
|
7
|
+
};
|
|
8
|
+
readonly updatedAt: {
|
|
9
|
+
readonly type: "date";
|
|
10
|
+
};
|
|
11
|
+
readonly name: {
|
|
12
|
+
readonly type: "text";
|
|
13
|
+
};
|
|
14
|
+
readonly expires: {
|
|
15
|
+
readonly type: "date";
|
|
16
|
+
readonly nullable: true;
|
|
17
|
+
};
|
|
18
|
+
readonly enabled: {
|
|
19
|
+
readonly type: "boolean";
|
|
20
|
+
};
|
|
21
|
+
readonly text: {
|
|
22
|
+
readonly type: "text";
|
|
23
|
+
};
|
|
24
|
+
readonly status: {
|
|
25
|
+
readonly type: "enum";
|
|
26
|
+
readonly options: readonly [ItemStatus.Draft, ItemStatus.Scheduled, ItemStatus.Open, ItemStatus.Ended];
|
|
27
|
+
};
|
|
28
|
+
};
|