@churchapps/helpers 1.2.3 → 1.2.5

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 (53) hide show
  1. package/.eslintrc.json +28 -28
  2. package/.github/FUNDING.yml +1 -1
  3. package/.prettierrc +11 -11
  4. package/.yarnrc.yml +5 -5
  5. package/LICENSE +21 -21
  6. package/README.md +15 -15
  7. package/dist/ApiHelper.d.ts.map +1 -1
  8. package/dist/ApiHelper.js +4 -10
  9. package/dist/ApiHelper.js.map +1 -1
  10. package/dist/ArrayHelper.js +2 -1
  11. package/dist/ArrayHelper.js.map +1 -1
  12. package/dist/CommonEnvironmentHelper.d.ts +1 -1
  13. package/dist/CommonEnvironmentHelper.d.ts.map +1 -1
  14. package/dist/CommonEnvironmentHelper.js +5 -5
  15. package/dist/CommonEnvironmentHelper.js.map +1 -1
  16. package/dist/DateHelper.d.ts.map +1 -1
  17. package/dist/DateHelper.js +2 -0
  18. package/dist/DateHelper.js.map +1 -1
  19. package/dist/PersonHelper.js +2 -2
  20. package/dist/PersonHelper.js.map +1 -1
  21. package/dist/UserHelper.d.ts.map +1 -1
  22. package/dist/UserHelper.js +6 -2
  23. package/dist/UserHelper.js.map +1 -1
  24. package/package.json +50 -49
  25. package/scripts/build-cjs.js +32 -32
  26. package/src/ApiHelper.ts +169 -176
  27. package/src/AppearanceHelper.ts +69 -69
  28. package/src/ArrayHelper.ts +157 -157
  29. package/src/CommonEnvironmentHelper.ts +104 -104
  30. package/src/CurrencyHelper.ts +10 -10
  31. package/src/DateHelper.ts +154 -153
  32. package/src/DonationHelper.ts +26 -26
  33. package/src/ErrorHelper.ts +39 -39
  34. package/src/EventHelper.ts +49 -49
  35. package/src/FileHelper.ts +55 -55
  36. package/src/PersonHelper.ts +82 -82
  37. package/src/UniqueIdHelper.ts +36 -36
  38. package/src/UserHelper.ts +62 -59
  39. package/src/index.ts +15 -15
  40. package/src/interfaces/Access.ts +138 -138
  41. package/src/interfaces/Attendance.ts +45 -45
  42. package/src/interfaces/Content.ts +84 -84
  43. package/src/interfaces/Doing.ts +93 -93
  44. package/src/interfaces/Donation.ts +190 -190
  45. package/src/interfaces/Error.ts +17 -17
  46. package/src/interfaces/Membership.ts +184 -184
  47. package/src/interfaces/Messaging.ts +96 -96
  48. package/src/interfaces/Permissions.ts +92 -92
  49. package/src/interfaces/Reporting.ts +41 -41
  50. package/src/interfaces/UserContextInterface.ts +13 -13
  51. package/src/interfaces/index.ts +13 -13
  52. package/tsconfig.json +36 -36
  53. package/CLAUDE.md +0 -98
@@ -1,138 +1,138 @@
1
- import { PersonInterface } from "./Membership";
2
-
3
- export interface ApiInterface {
4
- name: string;
5
- keyName?: string;
6
- permissions: RolePermissionInterface[];
7
- jwt: string;
8
- }
9
- export interface ChurchInterface {
10
- id?: string;
11
- name?: string;
12
- registrationDate?: Date;
13
- address1?: string;
14
- address2?: string;
15
- city?: string;
16
- state?: string;
17
- zip?: string;
18
- country?: string;
19
- subDomain?: string;
20
- settings?: GenericSettingInterface[];
21
- archivedDate?: Date;
22
- }
23
- export interface DomainInterface {
24
- id?: string;
25
- domainName?: string;
26
- }
27
- export interface RegisterChurchRequestInterface extends ChurchInterface {
28
- appName?: string;
29
- }
30
- export interface LoadCreateUserRequestInterface {
31
- userEmail: string;
32
- fromEmail?: string;
33
- subject?: string;
34
- body?: string;
35
- firstName: string;
36
- lastName: string;
37
- }
38
- export interface LoginResponseInterface {
39
- user: UserInterface;
40
- userChurches: LoginUserChurchInterface[];
41
- errors: string[];
42
- }
43
- export interface LoginUserChurchInterface {
44
- person: PersonInterface;
45
- church: ChurchInterface;
46
- apis: ApiInterface[];
47
- jwt: string;
48
- groups: { id: string; tags: string; name: string; leader: boolean }[];
49
- }
50
-
51
- export interface PermissionInterface {
52
- apiName?: string;
53
- section?: string;
54
- action?: string;
55
- displaySection?: string;
56
- displayAction?: string;
57
- }
58
- export interface RegisterUserInterface {
59
- firstName?: string;
60
- lastName: string;
61
- email?: string;
62
- appName: string;
63
- appUrl: string;
64
- }
65
- export interface RoleInterface {
66
- id?: string;
67
- churchId?: string;
68
- name?: string;
69
- }
70
- export interface RolePermissionInterface {
71
- id?: string;
72
- churchId?: string;
73
- roleId?: string;
74
- apiName?: string;
75
- contentType?: string;
76
- contentId?: string;
77
- action?: string;
78
- }
79
- export interface RoleMemberInterface {
80
- id?: string;
81
- churchId?: string;
82
- roleId?: string;
83
- userId?: string;
84
- user?: UserInterface;
85
- personId?: string;
86
- }
87
- export interface ResetPasswordRequestInterface {
88
- userEmail: string;
89
- }
90
- export interface ResetPasswordResponseInterface {
91
- emailed: boolean;
92
- }
93
- export interface UserInterface {
94
- id?: string;
95
- email?: string;
96
- authGuid?: string;
97
- firstName?: string;
98
- lastName?: string;
99
- registrationDate?: Date;
100
- lastLogin?: Date;
101
- password?: string;
102
- jwt?: string;
103
- }
104
- export interface GenericSettingInterface {
105
- id?: string;
106
- churchId?: string;
107
- keyName?: string;
108
- value?: string;
109
- public?: number;
110
- }
111
- export interface UserChurchInterface {
112
- id?: string;
113
- userId?: string;
114
- churchId?: string;
115
- personId?: string;
116
- }
117
-
118
- export interface ApiConfig {
119
- keyName: string;
120
- url: string;
121
- jwt: string;
122
- permissions: RolePermissionInterface[];
123
- }
124
- export type ApiListType =
125
- | "MembershipApi"
126
- | "AttendanceApi"
127
- | "GivingApi"
128
- | "DoingApi"
129
- | "MessagingApi"
130
- | "LessonsApi"
131
- | "ReportingApi"
132
- | "ContentApi"
133
- | "AskApi";
134
- export interface IApiPermission {
135
- api: string;
136
- contentType: string;
137
- action: string;
138
- }
1
+ import { PersonInterface } from "./Membership";
2
+
3
+ export interface ApiInterface {
4
+ name: string;
5
+ keyName?: string;
6
+ permissions: RolePermissionInterface[];
7
+ jwt: string;
8
+ }
9
+ export interface ChurchInterface {
10
+ id?: string;
11
+ name?: string;
12
+ registrationDate?: Date;
13
+ address1?: string;
14
+ address2?: string;
15
+ city?: string;
16
+ state?: string;
17
+ zip?: string;
18
+ country?: string;
19
+ subDomain?: string;
20
+ settings?: GenericSettingInterface[];
21
+ archivedDate?: Date;
22
+ }
23
+ export interface DomainInterface {
24
+ id?: string;
25
+ domainName?: string;
26
+ }
27
+ export interface RegisterChurchRequestInterface extends ChurchInterface {
28
+ appName?: string;
29
+ }
30
+ export interface LoadCreateUserRequestInterface {
31
+ userEmail: string;
32
+ fromEmail?: string;
33
+ subject?: string;
34
+ body?: string;
35
+ firstName: string;
36
+ lastName: string;
37
+ }
38
+ export interface LoginResponseInterface {
39
+ user: UserInterface;
40
+ userChurches: LoginUserChurchInterface[];
41
+ errors: string[];
42
+ }
43
+ export interface LoginUserChurchInterface {
44
+ person: PersonInterface;
45
+ church: ChurchInterface;
46
+ apis: ApiInterface[];
47
+ jwt: string;
48
+ groups: { id: string; tags: string; name: string; leader: boolean }[];
49
+ }
50
+
51
+ export interface PermissionInterface {
52
+ apiName?: string;
53
+ section?: string;
54
+ action?: string;
55
+ displaySection?: string;
56
+ displayAction?: string;
57
+ }
58
+ export interface RegisterUserInterface {
59
+ firstName?: string;
60
+ lastName: string;
61
+ email?: string;
62
+ appName: string;
63
+ appUrl: string;
64
+ }
65
+ export interface RoleInterface {
66
+ id?: string;
67
+ churchId?: string;
68
+ name?: string;
69
+ }
70
+ export interface RolePermissionInterface {
71
+ id?: string;
72
+ churchId?: string;
73
+ roleId?: string;
74
+ apiName?: string;
75
+ contentType?: string;
76
+ contentId?: string;
77
+ action?: string;
78
+ }
79
+ export interface RoleMemberInterface {
80
+ id?: string;
81
+ churchId?: string;
82
+ roleId?: string;
83
+ userId?: string;
84
+ user?: UserInterface;
85
+ personId?: string;
86
+ }
87
+ export interface ResetPasswordRequestInterface {
88
+ userEmail: string;
89
+ }
90
+ export interface ResetPasswordResponseInterface {
91
+ emailed: boolean;
92
+ }
93
+ export interface UserInterface {
94
+ id?: string;
95
+ email?: string;
96
+ authGuid?: string;
97
+ firstName?: string;
98
+ lastName?: string;
99
+ registrationDate?: Date;
100
+ lastLogin?: Date;
101
+ password?: string;
102
+ jwt?: string;
103
+ }
104
+ export interface GenericSettingInterface {
105
+ id?: string;
106
+ churchId?: string;
107
+ keyName?: string;
108
+ value?: string;
109
+ public?: number;
110
+ }
111
+ export interface UserChurchInterface {
112
+ id?: string;
113
+ userId?: string;
114
+ churchId?: string;
115
+ personId?: string;
116
+ }
117
+
118
+ export interface ApiConfig {
119
+ keyName: string;
120
+ url: string;
121
+ jwt: string;
122
+ permissions: RolePermissionInterface[];
123
+ }
124
+ export type ApiListType =
125
+ | "MembershipApi"
126
+ | "AttendanceApi"
127
+ | "GivingApi"
128
+ | "DoingApi"
129
+ | "MessagingApi"
130
+ | "LessonsApi"
131
+ | "ReportingApi"
132
+ | "ContentApi"
133
+ | "AskApi";
134
+ export interface IApiPermission {
135
+ api: string;
136
+ contentType: string;
137
+ action: string;
138
+ }
@@ -1,45 +1,45 @@
1
- import { CampusInterface, ServiceInterface, ServiceTimeInterface, PersonInterface } from ".";
2
-
3
- export interface AttendanceInterface {
4
- campus: CampusInterface;
5
- service: ServiceInterface;
6
- serviceTime: ServiceTimeInterface;
7
- groupId: string;
8
- }
9
- export interface AttendanceRecordInterface {
10
- serviceTime: ServiceTimeInterface;
11
- service: ServiceInterface;
12
- campus: CampusInterface;
13
- week: number;
14
- count: number;
15
- visitDate: Date;
16
- groupId: string;
17
- }
18
- export interface VisitInterface {
19
- id?: string;
20
- personId?: string;
21
- serviceId?: string;
22
- groupId?: string;
23
- visitDate?: Date;
24
- visitSessions?: VisitSessionInterface[];
25
- person?: PersonInterface;
26
- }
27
- export interface VisitSessionInterface {
28
- id?: string;
29
- visitId?: string;
30
- sessionId?: string;
31
- visit?: VisitInterface;
32
- session?: SessionInterface;
33
- }
34
- export interface SessionInterface {
35
- id?: string;
36
- groupId: string;
37
- serviceTimeId: string;
38
- sessionDate?: Date;
39
- displayName: string;
40
- }
41
- export interface SettingInterface {
42
- id?: string;
43
- keyName?: string;
44
- value?: string;
45
- }
1
+ import { CampusInterface, ServiceInterface, ServiceTimeInterface, PersonInterface } from ".";
2
+
3
+ export interface AttendanceInterface {
4
+ campus: CampusInterface;
5
+ service: ServiceInterface;
6
+ serviceTime: ServiceTimeInterface;
7
+ groupId: string;
8
+ }
9
+ export interface AttendanceRecordInterface {
10
+ serviceTime: ServiceTimeInterface;
11
+ service: ServiceInterface;
12
+ campus: CampusInterface;
13
+ week: number;
14
+ count: number;
15
+ visitDate: Date;
16
+ groupId: string;
17
+ }
18
+ export interface VisitInterface {
19
+ id?: string;
20
+ personId?: string;
21
+ serviceId?: string;
22
+ groupId?: string;
23
+ visitDate?: Date;
24
+ visitSessions?: VisitSessionInterface[];
25
+ person?: PersonInterface;
26
+ }
27
+ export interface VisitSessionInterface {
28
+ id?: string;
29
+ visitId?: string;
30
+ sessionId?: string;
31
+ visit?: VisitInterface;
32
+ session?: SessionInterface;
33
+ }
34
+ export interface SessionInterface {
35
+ id?: string;
36
+ groupId: string;
37
+ serviceTimeId: string;
38
+ sessionDate?: Date;
39
+ displayName: string;
40
+ }
41
+ export interface SettingInterface {
42
+ id?: string;
43
+ keyName?: string;
44
+ value?: string;
45
+ }
@@ -1,84 +1,84 @@
1
- export interface LinkInterface {
2
- id?: string;
3
- churchId?: string;
4
- url?: string;
5
- text?: string;
6
- sort?: number;
7
- linkType: string;
8
- linkData: string;
9
- icon: string;
10
- category: string;
11
- parentId?: string;
12
- children?: any;
13
- }
14
- export interface SermonInterface {
15
- id?: string;
16
- churchId?: string;
17
- playlistId?: string;
18
- videoType?: string;
19
- videoData?: string;
20
- videoUrl?: string;
21
- title?: string;
22
- description?: string;
23
- publishDate?: Date;
24
- thumbnail?: string;
25
- duration?: number;
26
- permanentUrl?: boolean;
27
- }
28
- export interface PlaylistInterface {
29
- id?: string;
30
- churchId?: string;
31
- title?: string;
32
- description?: string;
33
- publishDate?: Date;
34
- thumbnail?: string;
35
- }
36
- export interface StreamingServiceInterface {
37
- id?: string;
38
- churchId?: string;
39
- serviceTime?: Date;
40
- earlyStart?: number;
41
- duration: number;
42
- chatBefore: number;
43
- chatAfter: number;
44
- provider: string;
45
- providerKey: string;
46
- videoUrl: string;
47
- timezoneOffset: number;
48
- recurring: boolean;
49
- label: string;
50
- sermonId?: string;
51
- }
52
- export interface EventInterface {
53
- id?: string;
54
- churchId?: string;
55
- groupId?: string;
56
- start?: Date;
57
- end?: Date;
58
- title?: string;
59
- description?: string;
60
- allDay?: boolean;
61
- visibility?: string;
62
- recurrenceRule?: string;
63
- exceptionDates?: Date[];
64
- }
65
- export interface EventExceptionInterface {
66
- id?: string;
67
- churchId?: string;
68
- eventId?: string;
69
- exceptionDate?: Date;
70
- }
71
- export interface CuratedCalendarInterface {
72
- id?: string;
73
- churchId?: string;
74
- name?: string;
75
- }
76
- export interface CuratedEventInterface {
77
- id?: string;
78
- churchId?: string;
79
- curratedCalendarId?: string;
80
- groupId?: string;
81
- eventId?: string;
82
- }
83
- export interface CuratedEventWithEventInterface extends EventInterface, CuratedEventInterface {}
84
- export type VisibilityOptions = "public" | "private" | "hidden";
1
+ export interface LinkInterface {
2
+ id?: string;
3
+ churchId?: string;
4
+ url?: string;
5
+ text?: string;
6
+ sort?: number;
7
+ linkType: string;
8
+ linkData: string;
9
+ icon: string;
10
+ category: string;
11
+ parentId?: string;
12
+ children?: any;
13
+ }
14
+ export interface SermonInterface {
15
+ id?: string;
16
+ churchId?: string;
17
+ playlistId?: string;
18
+ videoType?: string;
19
+ videoData?: string;
20
+ videoUrl?: string;
21
+ title?: string;
22
+ description?: string;
23
+ publishDate?: Date;
24
+ thumbnail?: string;
25
+ duration?: number;
26
+ permanentUrl?: boolean;
27
+ }
28
+ export interface PlaylistInterface {
29
+ id?: string;
30
+ churchId?: string;
31
+ title?: string;
32
+ description?: string;
33
+ publishDate?: Date;
34
+ thumbnail?: string;
35
+ }
36
+ export interface StreamingServiceInterface {
37
+ id?: string;
38
+ churchId?: string;
39
+ serviceTime?: Date;
40
+ earlyStart?: number;
41
+ duration: number;
42
+ chatBefore: number;
43
+ chatAfter: number;
44
+ provider: string;
45
+ providerKey: string;
46
+ videoUrl: string;
47
+ timezoneOffset: number;
48
+ recurring: boolean;
49
+ label: string;
50
+ sermonId?: string;
51
+ }
52
+ export interface EventInterface {
53
+ id?: string;
54
+ churchId?: string;
55
+ groupId?: string;
56
+ start?: Date;
57
+ end?: Date;
58
+ title?: string;
59
+ description?: string;
60
+ allDay?: boolean;
61
+ visibility?: string;
62
+ recurrenceRule?: string;
63
+ exceptionDates?: Date[];
64
+ }
65
+ export interface EventExceptionInterface {
66
+ id?: string;
67
+ churchId?: string;
68
+ eventId?: string;
69
+ exceptionDate?: Date;
70
+ }
71
+ export interface CuratedCalendarInterface {
72
+ id?: string;
73
+ churchId?: string;
74
+ name?: string;
75
+ }
76
+ export interface CuratedEventInterface {
77
+ id?: string;
78
+ churchId?: string;
79
+ curratedCalendarId?: string;
80
+ groupId?: string;
81
+ eventId?: string;
82
+ }
83
+ export interface CuratedEventWithEventInterface extends EventInterface, CuratedEventInterface {}
84
+ export type VisibilityOptions = "public" | "private" | "hidden";