@churchapps/helpers 1.0.37 → 1.0.39
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/.prettierrc +12 -0
- package/CLAUDE.md +90 -0
- package/dist/ApiHelper.d.ts.map +1 -1
- package/dist/ApiHelper.js +92 -110
- package/dist/ApiHelper.js.map +1 -1
- package/dist/AppearanceHelper.js +12 -12
- package/dist/AppearanceHelper.js.map +1 -1
- package/dist/ArrayHelper.d.ts +1 -1
- package/dist/ArrayHelper.d.ts.map +1 -1
- package/dist/ArrayHelper.js +5 -4
- package/dist/ArrayHelper.js.map +1 -1
- package/dist/DateHelper.d.ts.map +1 -1
- package/dist/DateHelper.js +5 -4
- package/dist/DateHelper.js.map +1 -1
- package/dist/ErrorHelper.d.ts +2 -2
- package/dist/ErrorHelper.d.ts.map +1 -1
- package/dist/ErrorHelper.js.map +1 -1
- package/dist/EventHelper.js +1 -2
- package/dist/EventHelper.js.map +1 -1
- package/dist/FileHelper.d.ts.map +1 -1
- package/dist/FileHelper.js +8 -1
- package/dist/FileHelper.js.map +1 -1
- package/dist/PersonHelper.js +12 -8
- package/dist/PersonHelper.js.map +1 -1
- package/dist/UniqueIdHelper.d.ts.map +1 -1
- package/dist/UniqueIdHelper.js +2 -2
- package/dist/UniqueIdHelper.js.map +1 -1
- package/dist/UserHelper.js +3 -12
- package/dist/UserHelper.js.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -3
- package/dist/index.js.map +1 -1
- package/dist/interfaces/Access.d.ts +1 -1
- package/dist/interfaces/Access.d.ts.map +1 -1
- package/dist/interfaces/Attendance.d.ts.map +1 -1
- package/dist/interfaces/Content.d.ts.map +1 -1
- package/dist/interfaces/Doing.d.ts.map +1 -1
- package/dist/interfaces/Donation.d.ts.map +1 -1
- package/dist/interfaces/Donation.js +9 -15
- package/dist/interfaces/Donation.js.map +1 -1
- package/dist/interfaces/Error.d.ts +1 -1
- package/dist/interfaces/Error.d.ts.map +1 -1
- package/dist/interfaces/Error.js +0 -1
- package/dist/interfaces/Error.js.map +1 -1
- package/dist/interfaces/Membership.d.ts.map +1 -1
- package/dist/interfaces/Messaging.d.ts.map +1 -1
- package/dist/interfaces/Permissions.d.ts.map +1 -1
- package/dist/interfaces/Permissions.js +31 -7
- package/dist/interfaces/Permissions.js.map +1 -1
- package/dist/interfaces/Reporting.d.ts.map +1 -1
- package/dist/interfaces/index.d.ts.map +1 -1
- package/dist/interfaces/index.js.map +1 -1
- package/eslint.config.js +33 -0
- package/package.json +17 -4
- package/src/ApiHelper.ts +7 -4
- package/src/AppearanceHelper.ts +8 -8
- package/src/ArrayHelper.ts +2 -1
- package/src/DateHelper.ts +3 -2
- package/src/ErrorHelper.ts +2 -2
- package/src/FileHelper.ts +6 -2
- package/src/UniqueIdHelper.ts +2 -2
- package/src/UserHelper.ts +1 -1
- package/src/index.ts +6 -3
- package/src/interfaces/Access.ts +137 -24
- package/src/interfaces/Attendance.ts +45 -8
- package/src/interfaces/Content.ts +84 -10
- package/src/interfaces/Doing.ts +93 -11
- package/src/interfaces/Donation.ts +145 -45
- package/src/interfaces/Error.ts +17 -17
- package/src/interfaces/Membership.ts +183 -52
- package/src/interfaces/Messaging.ts +96 -12
- package/src/interfaces/Permissions.ts +92 -71
- package/src/interfaces/Reporting.ts +41 -7
- package/src/interfaces/UserContextInterface.ts +13 -13
- package/src/interfaces/index.ts +13 -14
- package/tsconfig.json +6 -6
|
@@ -1,12 +1,96 @@
|
|
|
1
|
-
import { PersonInterface } from "./Membership";
|
|
2
|
-
|
|
3
|
-
export interface ConnectionInterface {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { PersonInterface } from "./Membership";
|
|
2
|
+
|
|
3
|
+
export interface ConnectionInterface {
|
|
4
|
+
id?: string;
|
|
5
|
+
churchId?: string;
|
|
6
|
+
conversationId?: string;
|
|
7
|
+
personId?: string;
|
|
8
|
+
displayName?: string;
|
|
9
|
+
timeJoined?: Date;
|
|
10
|
+
socketId?: string;
|
|
11
|
+
ipAddress?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface ConversationInterface {
|
|
14
|
+
id?: string;
|
|
15
|
+
churchId?: string;
|
|
16
|
+
contentType?: string;
|
|
17
|
+
contentId?: string;
|
|
18
|
+
title?: string;
|
|
19
|
+
dateCreated?: Date;
|
|
20
|
+
groupId?: string;
|
|
21
|
+
visibility?: string;
|
|
22
|
+
firstPostId?: string;
|
|
23
|
+
lastPostId?: string;
|
|
24
|
+
postCount?: number;
|
|
25
|
+
allowAnonymousPosts?: boolean;
|
|
26
|
+
messages?: MessageInterface[];
|
|
27
|
+
}
|
|
28
|
+
export interface MessageInterface {
|
|
29
|
+
id?: string;
|
|
30
|
+
churchId?: string;
|
|
31
|
+
conversationId?: string;
|
|
32
|
+
personId?: string;
|
|
33
|
+
displayName?: string;
|
|
34
|
+
timeSent?: Date;
|
|
35
|
+
timeUpdated?: Date;
|
|
36
|
+
messageType?: string;
|
|
37
|
+
content?: string;
|
|
38
|
+
person?: PersonInterface;
|
|
39
|
+
}
|
|
40
|
+
export interface NotificationInterface {
|
|
41
|
+
id?: string;
|
|
42
|
+
churchId?: string;
|
|
43
|
+
personId?: string;
|
|
44
|
+
contentType?: string;
|
|
45
|
+
contentId: string;
|
|
46
|
+
timeSent?: Date;
|
|
47
|
+
isNew: boolean;
|
|
48
|
+
message?: string;
|
|
49
|
+
link?: string;
|
|
50
|
+
deliveryMethod?: string;
|
|
51
|
+
}
|
|
52
|
+
export interface NotificationPreferenceInterface {
|
|
53
|
+
id?: string;
|
|
54
|
+
churchId?: string;
|
|
55
|
+
personId?: string;
|
|
56
|
+
allowPush: boolean;
|
|
57
|
+
emailFrequency: string;
|
|
58
|
+
}
|
|
59
|
+
export interface PrivateMessageInterface {
|
|
60
|
+
id?: string;
|
|
61
|
+
churchId?: string;
|
|
62
|
+
fromPersonId?: string;
|
|
63
|
+
toPersonId?: string;
|
|
64
|
+
conversationId?: string;
|
|
65
|
+
notifyPersonId?: string;
|
|
66
|
+
conversation?: ConversationInterface;
|
|
67
|
+
person?: PersonInterface;
|
|
68
|
+
deliveryMethod?: string;
|
|
69
|
+
}
|
|
70
|
+
export interface BlockedIpInterface {
|
|
71
|
+
id?: string;
|
|
72
|
+
churchId?: string;
|
|
73
|
+
conversationId?: string;
|
|
74
|
+
serviceId?: string;
|
|
75
|
+
ipAddress?: string;
|
|
76
|
+
}
|
|
77
|
+
export interface SocketActionHandlerInterface {
|
|
78
|
+
action: string;
|
|
79
|
+
id: string;
|
|
80
|
+
handleMessage: (data: any) => void;
|
|
81
|
+
}
|
|
82
|
+
export type SocketPayloadAction =
|
|
83
|
+
| "message"
|
|
84
|
+
| "deleteMessage"
|
|
85
|
+
| "callout"
|
|
86
|
+
| "attendance"
|
|
87
|
+
| "prayerRequest"
|
|
88
|
+
| "socketId"
|
|
89
|
+
| "privateMessage"
|
|
90
|
+
| "privateRoomAdded"
|
|
91
|
+
| "videoChatInvite"
|
|
92
|
+
| "reconnect";
|
|
93
|
+
export interface SocketPayloadInterface {
|
|
94
|
+
action: SocketPayloadAction;
|
|
95
|
+
data: any;
|
|
96
|
+
}
|
|
@@ -1,71 +1,92 @@
|
|
|
1
|
-
export class Permissions {
|
|
2
|
-
static attendanceApi = {
|
|
3
|
-
attendance: {
|
|
4
|
-
view: { api: "AttendanceApi", contentType: "Attendance", action: "View" },
|
|
5
|
-
viewSummary: {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
1
|
+
export class Permissions {
|
|
2
|
+
static attendanceApi = {
|
|
3
|
+
attendance: {
|
|
4
|
+
view: { api: "AttendanceApi", contentType: "Attendance", action: "View" },
|
|
5
|
+
viewSummary: {
|
|
6
|
+
api: "AttendanceApi",
|
|
7
|
+
contentType: "Attendance",
|
|
8
|
+
action: "View Summary"
|
|
9
|
+
},
|
|
10
|
+
edit: { api: "AttendanceApi", contentType: "Attendance", action: "Edit" }
|
|
11
|
+
},
|
|
12
|
+
services: {
|
|
13
|
+
edit: { api: "AttendanceApi", contentType: "Services", action: "Edit" }
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
static membershipApi = {
|
|
18
|
+
roles: {
|
|
19
|
+
view: { api: "MembershipApi", contentType: "Roles", action: "View" },
|
|
20
|
+
edit: { api: "MembershipApi", contentType: "Roles", action: "Edit" }
|
|
21
|
+
},
|
|
22
|
+
settings: {
|
|
23
|
+
edit: { api: "MembershipApi", contentType: "Settings", action: "Edit" }
|
|
24
|
+
},
|
|
25
|
+
server: {
|
|
26
|
+
admin: { api: "MembershipApi", contentType: "Server", action: "Admin" }
|
|
27
|
+
},
|
|
28
|
+
forms: {
|
|
29
|
+
admin: { api: "MembershipApi", contentType: "Forms", action: "Admin" },
|
|
30
|
+
edit: { api: "MembershipApi", contentType: "Forms", action: "Edit" }
|
|
31
|
+
},
|
|
32
|
+
groups: {
|
|
33
|
+
edit: { api: "MembershipApi", contentType: "Groups", action: "Edit" }
|
|
34
|
+
},
|
|
35
|
+
people: {
|
|
36
|
+
view: { api: "MembershipApi", contentType: "People", action: "View" },
|
|
37
|
+
viewMembers: {
|
|
38
|
+
api: "MembershipApi",
|
|
39
|
+
contentType: "People",
|
|
40
|
+
action: "View Members"
|
|
41
|
+
},
|
|
42
|
+
edit: { api: "MembershipApi", contentType: "People", action: "Edit" }
|
|
43
|
+
},
|
|
44
|
+
plans: {
|
|
45
|
+
edit: { api: "MembershipApi", contentType: "Plans", action: "Edit" }
|
|
46
|
+
},
|
|
47
|
+
groupMembers: {
|
|
48
|
+
edit: {
|
|
49
|
+
api: "MembershipApi",
|
|
50
|
+
contentType: "Group Members",
|
|
51
|
+
action: "Edit"
|
|
52
|
+
},
|
|
53
|
+
view: {
|
|
54
|
+
api: "MembershipApi",
|
|
55
|
+
contentType: "Group Members",
|
|
56
|
+
action: "View"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
static givingApi = {
|
|
62
|
+
donations: {
|
|
63
|
+
viewSummary: {
|
|
64
|
+
api: "GivingApi",
|
|
65
|
+
contentType: "Donations",
|
|
66
|
+
action: "View Summary"
|
|
67
|
+
},
|
|
68
|
+
view: { api: "GivingApi", contentType: "Donations", action: "View" },
|
|
69
|
+
edit: { api: "GivingApi", contentType: "Donations", action: "Edit" }
|
|
70
|
+
},
|
|
71
|
+
settings: {
|
|
72
|
+
view: { api: "GivingApi", contentType: "Settings", action: "View" },
|
|
73
|
+
edit: { api: "GivingApi", contentType: "Settings", action: "Edit" }
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
static contentApi = {
|
|
78
|
+
chat: {
|
|
79
|
+
host: { api: "ContentApi", contentType: "Chat", action: "Host" }
|
|
80
|
+
},
|
|
81
|
+
content: {
|
|
82
|
+
edit: { api: "ContentApi", contentType: "Content", action: "Edit" }
|
|
83
|
+
},
|
|
84
|
+
streamingServices: {
|
|
85
|
+
edit: {
|
|
86
|
+
api: "ContentApi",
|
|
87
|
+
contentType: "StreamingServices",
|
|
88
|
+
action: "Edit"
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
}
|
|
@@ -1,7 +1,41 @@
|
|
|
1
|
-
export interface ReportResultInterface {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export interface
|
|
1
|
+
export interface ReportResultInterface {
|
|
2
|
+
displayName: string;
|
|
3
|
+
description: string;
|
|
4
|
+
table: any[];
|
|
5
|
+
outputs: ReportOutputInterface[];
|
|
6
|
+
}
|
|
7
|
+
export interface ReportInterface {
|
|
8
|
+
keyName: string;
|
|
9
|
+
displayName: string;
|
|
10
|
+
description: string;
|
|
11
|
+
parameters: ParameterInterface[];
|
|
12
|
+
permissions: ReportPermissionGroupInterface[];
|
|
13
|
+
}
|
|
14
|
+
export interface ParameterInterface {
|
|
15
|
+
keyName: string;
|
|
16
|
+
displayName?: string;
|
|
17
|
+
source: string;
|
|
18
|
+
sourceKey: string;
|
|
19
|
+
options: { value: string; text: string }[];
|
|
20
|
+
value?: string;
|
|
21
|
+
requiredParentIds?: string[];
|
|
22
|
+
defaultValue: string;
|
|
23
|
+
}
|
|
24
|
+
export interface ReportOutputInterface {
|
|
25
|
+
outputType: string;
|
|
26
|
+
columns: ColumnInterface[];
|
|
27
|
+
groupings?: number[];
|
|
28
|
+
}
|
|
29
|
+
export interface ColumnInterface {
|
|
30
|
+
header: string;
|
|
31
|
+
value: string;
|
|
32
|
+
formatter: string;
|
|
33
|
+
}
|
|
34
|
+
export interface ReportPermissionGroupInterface {
|
|
35
|
+
requireOne: ReportPermissionInterface[];
|
|
36
|
+
}
|
|
37
|
+
export interface ReportPermissionInterface {
|
|
38
|
+
api: string;
|
|
39
|
+
contentType: string;
|
|
40
|
+
action: string;
|
|
41
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { LoginUserChurchInterface, UserInterface } from "./Access";
|
|
2
|
-
import { PersonInterface } from "./Membership";
|
|
3
|
-
|
|
4
|
-
export interface UserContextInterface {
|
|
5
|
-
user: UserInterface
|
|
6
|
-
setUser: (user: UserInterface) => void
|
|
7
|
-
person: PersonInterface
|
|
8
|
-
setPerson: (person: PersonInterface) => void
|
|
9
|
-
userChurch: LoginUserChurchInterface
|
|
10
|
-
setUserChurch: (userChurch: LoginUserChurchInterface) => void
|
|
11
|
-
userChurches: LoginUserChurchInterface[]
|
|
12
|
-
setUserChurches: (userChurches: LoginUserChurchInterface[]) => void
|
|
13
|
-
}
|
|
1
|
+
import { LoginUserChurchInterface, UserInterface } from "./Access";
|
|
2
|
+
import { PersonInterface } from "./Membership";
|
|
3
|
+
|
|
4
|
+
export interface UserContextInterface {
|
|
5
|
+
user: UserInterface;
|
|
6
|
+
setUser: (user: UserInterface) => void;
|
|
7
|
+
person: PersonInterface;
|
|
8
|
+
setPerson: (person: PersonInterface) => void;
|
|
9
|
+
userChurch: LoginUserChurchInterface;
|
|
10
|
+
setUserChurch: (userChurch: LoginUserChurchInterface) => void;
|
|
11
|
+
userChurches: LoginUserChurchInterface[];
|
|
12
|
+
setUserChurches: (userChurches: LoginUserChurchInterface[]) => void;
|
|
13
|
+
}
|
package/src/interfaces/index.ts
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
export * from "./Error";
|
|
2
|
-
export * from "./UserContextInterface";
|
|
3
|
-
export * from "./Permissions";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export * from "./
|
|
8
|
-
export * from "./
|
|
9
|
-
export * from "./
|
|
10
|
-
export * from "./
|
|
11
|
-
export * from "./
|
|
12
|
-
export * from "./
|
|
13
|
-
export * from "./
|
|
14
|
-
export * from "./Reporting";
|
|
1
|
+
export * from "./Error";
|
|
2
|
+
export * from "./UserContextInterface";
|
|
3
|
+
export * from "./Permissions";
|
|
4
|
+
|
|
5
|
+
// API interfaces
|
|
6
|
+
export * from "./Access";
|
|
7
|
+
export * from "./Attendance";
|
|
8
|
+
export * from "./Content";
|
|
9
|
+
export * from "./Doing";
|
|
10
|
+
export * from "./Donation";
|
|
11
|
+
export * from "./Membership";
|
|
12
|
+
export * from "./Messaging";
|
|
13
|
+
export * from "./Reporting";
|
package/tsconfig.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
|
-
"target": "
|
|
3
|
+
"target": "ES2020",
|
|
4
4
|
"typeRoots": [
|
|
5
5
|
"./types",
|
|
6
6
|
"node_modules/@types"
|
|
@@ -14,14 +14,13 @@
|
|
|
14
14
|
"skipLibCheck": true,
|
|
15
15
|
"esModuleInterop": true,
|
|
16
16
|
"allowSyntheticDefaultImports": true,
|
|
17
|
-
"strict":
|
|
18
|
-
"strictNullChecks": false,
|
|
17
|
+
"strict": false,
|
|
19
18
|
"forceConsistentCasingInFileNames": true,
|
|
20
|
-
"module": "
|
|
19
|
+
"module": "commonjs",
|
|
21
20
|
"moduleResolution": "node",
|
|
22
21
|
"resolveJsonModule": true,
|
|
23
22
|
"isolatedModules": true,
|
|
24
|
-
"jsx": "react",
|
|
23
|
+
"jsx": "react-jsx",
|
|
25
24
|
"sourceMap": true,
|
|
26
25
|
"allowUnreachableCode": false,
|
|
27
26
|
"allowUnusedLabels": false,
|
|
@@ -32,5 +31,6 @@
|
|
|
32
31
|
"paths": {},
|
|
33
32
|
"outDir": "dist"
|
|
34
33
|
},
|
|
35
|
-
"include": ["src
|
|
34
|
+
"include": ["src/**/*"],
|
|
35
|
+
"exclude": ["node_modules", "dist"]
|
|
36
36
|
}
|