@churchapps/helpers 1.1.8 → 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.
Files changed (40) hide show
  1. package/.eslintrc.json +29 -0
  2. package/.github/FUNDING.yml +1 -1
  3. package/.prettierrc +11 -11
  4. package/.yarnrc.yml +6 -0
  5. package/CLAUDE.md +97 -89
  6. package/LICENSE +21 -21
  7. package/README.md +15 -15
  8. package/dist/interfaces/Donation.d.ts +6 -0
  9. package/dist/interfaces/Donation.d.ts.map +1 -1
  10. package/dist/interfaces/Donation.js.map +1 -1
  11. package/package.json +55 -54
  12. package/scripts/build-cjs.js +32 -32
  13. package/src/ApiHelper.ts +176 -176
  14. package/src/AppearanceHelper.ts +69 -69
  15. package/src/ArrayHelper.ts +157 -157
  16. package/src/CommonEnvironmentHelper.ts +104 -104
  17. package/src/CurrencyHelper.ts +10 -10
  18. package/src/DateHelper.ts +153 -153
  19. package/src/DonationHelper.ts +26 -26
  20. package/src/ErrorHelper.ts +39 -39
  21. package/src/EventHelper.ts +49 -49
  22. package/src/FileHelper.ts +55 -55
  23. package/src/PersonHelper.ts +82 -82
  24. package/src/UniqueIdHelper.ts +36 -36
  25. package/src/UserHelper.ts +59 -59
  26. package/src/index.ts +15 -15
  27. package/src/interfaces/Access.ts +138 -138
  28. package/src/interfaces/Attendance.ts +45 -45
  29. package/src/interfaces/Content.ts +84 -84
  30. package/src/interfaces/Doing.ts +93 -93
  31. package/src/interfaces/Donation.ts +190 -183
  32. package/src/interfaces/Error.ts +17 -17
  33. package/src/interfaces/Membership.ts +184 -184
  34. package/src/interfaces/Messaging.ts +96 -96
  35. package/src/interfaces/Permissions.ts +92 -92
  36. package/src/interfaces/Reporting.ts +41 -41
  37. package/src/interfaces/UserContextInterface.ts +13 -13
  38. package/src/interfaces/index.ts +13 -13
  39. package/tsconfig.json +36 -36
  40. package/eslint.config.js +0 -33
@@ -1,184 +1,184 @@
1
- export interface AnswerInterface {
2
- id?: string;
3
- value?: string;
4
- questionId?: string;
5
- formSubmissionId?: string;
6
- required?: boolean;
7
- }
8
- export interface CampusInterface {
9
- id?: string;
10
- name?: string;
11
- }
12
- export interface ContactInfoInterface {
13
- address1?: string;
14
- address2?: string;
15
- city?: string;
16
- state?: string;
17
- zip?: string;
18
- homePhone?: string;
19
- mobilePhone?: string;
20
- workPhone?: string;
21
- email?: string;
22
- pager?: string;
23
- fax?: string;
24
- skype?: string;
25
- workEmail?: string;
26
- }
27
- export interface FormInterface {
28
- id?: string;
29
- name?: string;
30
- contentType?: string;
31
- restricted?: boolean;
32
- accessStartTime?: Date;
33
- accessEndTime?: Date;
34
- archived: boolean;
35
- action?: string;
36
- }
37
- export interface FormSubmissionInterface {
38
- id?: string;
39
- formId?: string;
40
- contentType?: string;
41
- contentId?: string;
42
- form?: FormInterface;
43
- answers?: AnswerInterface[];
44
- questions?: QuestionInterface[];
45
- }
46
- export interface GroupInterface {
47
- id?: string;
48
- name?: string;
49
- categoryName?: string;
50
- memberCount?: number;
51
- trackAttendance?: boolean;
52
- parentPickup?: boolean;
53
- printNametag?: boolean;
54
- about?: string;
55
- photoUrl?: string;
56
- tags?: string;
57
- meetingTime?: string;
58
- meetingLocation?: string;
59
- labelArray?: string[];
60
- slug?: string;
61
- }
62
- export interface GroupMemberInterface {
63
- id?: string;
64
- personId: string;
65
- person?: PersonInterface;
66
- groupId: string;
67
- group?: GroupInterface;
68
- leader?: boolean;
69
- }
70
- export interface GroupServiceTimeInterface {
71
- id?: string;
72
- groupId?: string;
73
- serviceTimeId?: string;
74
- serviceTime?: ServiceTimeInterface;
75
- }
76
- export interface HouseholdInterface {
77
- id?: string;
78
- name?: string;
79
- }
80
- export interface HouseholdMemberInterface {
81
- id?: string;
82
- householdId?: string;
83
- household?: HouseholdInterface;
84
- personId?: string;
85
- person?: PersonInterface;
86
- role?: string;
87
- }
88
- export interface NameInterface {
89
- first?: string;
90
- middle?: string;
91
- last?: string;
92
- nick?: string;
93
- display?: string;
94
- title?: string;
95
- suffix?: string;
96
- }
97
- export interface SearchCondition {
98
- field: string;
99
- operator: string;
100
- value: string;
101
- }
102
- export interface VisibilityPreferenceInterface {
103
- id?: string;
104
- churchId?: string;
105
- personId?: string;
106
- address?: string;
107
- phoneNumber?: string;
108
- email?: string;
109
- }
110
-
111
- export interface PersonInterface {
112
- id?: string;
113
- name: NameInterface;
114
- contactInfo: ContactInfoInterface;
115
- membershipStatus?: string;
116
- gender?: string;
117
- birthDate?: Date;
118
- maritalStatus?: string;
119
- anniversary?: Date;
120
- photo?: string;
121
- photoUpdated?: Date;
122
- householdId?: string;
123
- householdRole?: string;
124
- userId?: string;
125
- school?: string;
126
- grade?: string;
127
- graduationDate?: string;
128
- employer?: string;
129
- formSubmissions?: [FormSubmissionInterface];
130
- child?: boolean;
131
- inactiveReason?: string;
132
- inactiveDate?: Date;
133
- servicesUser?: boolean;
134
- calendarUser?: boolean;
135
- checkInsUser?: boolean;
136
- registrationsUser?: boolean;
137
- givingUser?: boolean;
138
- groupsUser?: boolean;
139
- conversationId?: string;
140
- optedOut?: boolean;
141
- nametagNotes?: string;
142
- donorNumber?: string;
143
- }
144
- export interface QuestionInterface {
145
- id?: string;
146
- formId?: string;
147
- title?: string;
148
- fieldType?: string;
149
- placeholder?: string;
150
- description?: string;
151
- required?: boolean;
152
- choices?: [{ value?: string; text?: string }];
153
- }
154
- export interface ServiceInterface {
155
- id?: string;
156
- campusId?: string;
157
- name?: string;
158
- campus?: CampusInterface;
159
- }
160
- export interface ServiceTimeInterface {
161
- id?: string;
162
- name?: string;
163
- longName?: string;
164
- serviceId?: string;
165
- groups?: GroupInterface[];
166
- }
167
- export interface MemberPermissionInterface {
168
- id?: string;
169
- churchId?: string;
170
- memberId?: string;
171
- contentType?: string;
172
- contentId?: string;
173
- action?: string;
174
- personName: string;
175
- formName?: string;
176
- emailNotification?: boolean;
177
- }
178
- export interface FormMemberInterface {
179
- person?: PersonInterface;
180
- access?: string;
181
- }
182
- export interface FormMemberListInterface {
183
- members?: FormMemberInterface[];
184
- }
1
+ export interface AnswerInterface {
2
+ id?: string;
3
+ value?: string;
4
+ questionId?: string;
5
+ formSubmissionId?: string;
6
+ required?: boolean;
7
+ }
8
+ export interface CampusInterface {
9
+ id?: string;
10
+ name?: string;
11
+ }
12
+ export interface ContactInfoInterface {
13
+ address1?: string;
14
+ address2?: string;
15
+ city?: string;
16
+ state?: string;
17
+ zip?: string;
18
+ homePhone?: string;
19
+ mobilePhone?: string;
20
+ workPhone?: string;
21
+ email?: string;
22
+ pager?: string;
23
+ fax?: string;
24
+ skype?: string;
25
+ workEmail?: string;
26
+ }
27
+ export interface FormInterface {
28
+ id?: string;
29
+ name?: string;
30
+ contentType?: string;
31
+ restricted?: boolean;
32
+ accessStartTime?: Date;
33
+ accessEndTime?: Date;
34
+ archived: boolean;
35
+ action?: string;
36
+ }
37
+ export interface FormSubmissionInterface {
38
+ id?: string;
39
+ formId?: string;
40
+ contentType?: string;
41
+ contentId?: string;
42
+ form?: FormInterface;
43
+ answers?: AnswerInterface[];
44
+ questions?: QuestionInterface[];
45
+ }
46
+ export interface GroupInterface {
47
+ id?: string;
48
+ name?: string;
49
+ categoryName?: string;
50
+ memberCount?: number;
51
+ trackAttendance?: boolean;
52
+ parentPickup?: boolean;
53
+ printNametag?: boolean;
54
+ about?: string;
55
+ photoUrl?: string;
56
+ tags?: string;
57
+ meetingTime?: string;
58
+ meetingLocation?: string;
59
+ labelArray?: string[];
60
+ slug?: string;
61
+ }
62
+ export interface GroupMemberInterface {
63
+ id?: string;
64
+ personId: string;
65
+ person?: PersonInterface;
66
+ groupId: string;
67
+ group?: GroupInterface;
68
+ leader?: boolean;
69
+ }
70
+ export interface GroupServiceTimeInterface {
71
+ id?: string;
72
+ groupId?: string;
73
+ serviceTimeId?: string;
74
+ serviceTime?: ServiceTimeInterface;
75
+ }
76
+ export interface HouseholdInterface {
77
+ id?: string;
78
+ name?: string;
79
+ }
80
+ export interface HouseholdMemberInterface {
81
+ id?: string;
82
+ householdId?: string;
83
+ household?: HouseholdInterface;
84
+ personId?: string;
85
+ person?: PersonInterface;
86
+ role?: string;
87
+ }
88
+ export interface NameInterface {
89
+ first?: string;
90
+ middle?: string;
91
+ last?: string;
92
+ nick?: string;
93
+ display?: string;
94
+ title?: string;
95
+ suffix?: string;
96
+ }
97
+ export interface SearchCondition {
98
+ field: string;
99
+ operator: string;
100
+ value: string;
101
+ }
102
+ export interface VisibilityPreferenceInterface {
103
+ id?: string;
104
+ churchId?: string;
105
+ personId?: string;
106
+ address?: string;
107
+ phoneNumber?: string;
108
+ email?: string;
109
+ }
110
+
111
+ export interface PersonInterface {
112
+ id?: string;
113
+ name: NameInterface;
114
+ contactInfo: ContactInfoInterface;
115
+ membershipStatus?: string;
116
+ gender?: string;
117
+ birthDate?: Date;
118
+ maritalStatus?: string;
119
+ anniversary?: Date;
120
+ photo?: string;
121
+ photoUpdated?: Date;
122
+ householdId?: string;
123
+ householdRole?: string;
124
+ userId?: string;
125
+ school?: string;
126
+ grade?: string;
127
+ graduationDate?: string;
128
+ employer?: string;
129
+ formSubmissions?: [FormSubmissionInterface];
130
+ child?: boolean;
131
+ inactiveReason?: string;
132
+ inactiveDate?: Date;
133
+ servicesUser?: boolean;
134
+ calendarUser?: boolean;
135
+ checkInsUser?: boolean;
136
+ registrationsUser?: boolean;
137
+ givingUser?: boolean;
138
+ groupsUser?: boolean;
139
+ conversationId?: string;
140
+ optedOut?: boolean;
141
+ nametagNotes?: string;
142
+ donorNumber?: string;
143
+ }
144
+ export interface QuestionInterface {
145
+ id?: string;
146
+ formId?: string;
147
+ title?: string;
148
+ fieldType?: string;
149
+ placeholder?: string;
150
+ description?: string;
151
+ required?: boolean;
152
+ choices?: [{ value?: string; text?: string }];
153
+ }
154
+ export interface ServiceInterface {
155
+ id?: string;
156
+ campusId?: string;
157
+ name?: string;
158
+ campus?: CampusInterface;
159
+ }
160
+ export interface ServiceTimeInterface {
161
+ id?: string;
162
+ name?: string;
163
+ longName?: string;
164
+ serviceId?: string;
165
+ groups?: GroupInterface[];
166
+ }
167
+ export interface MemberPermissionInterface {
168
+ id?: string;
169
+ churchId?: string;
170
+ memberId?: string;
171
+ contentType?: string;
172
+ contentId?: string;
173
+ action?: string;
174
+ personName: string;
175
+ formName?: string;
176
+ emailNotification?: boolean;
177
+ }
178
+ export interface FormMemberInterface {
179
+ person?: PersonInterface;
180
+ access?: string;
181
+ }
182
+ export interface FormMemberListInterface {
183
+ members?: FormMemberInterface[];
184
+ }
@@ -1,96 +1,96 @@
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
+ 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
+ }