@churchapps/helpers 1.0.8 → 1.0.10

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.
@@ -1,17 +1,17 @@
1
- export interface ErrorLogInterface {
2
- application?: string,
3
- errorTime?: Date,
4
- userId?: string,
5
- churchId?: string,
6
- originUrl?: string,
7
- errorType?: string,
8
- message?: string,
9
- details?: string,
10
- };
11
-
12
- export interface ErrrorAppDataInterface {
13
- churchId: string,
14
- userId: string,
15
- originUrl: string,
16
- application: string
17
- }
1
+ export interface ErrorLogInterface {
2
+ application?: string,
3
+ errorTime?: Date,
4
+ userId?: string,
5
+ churchId?: string,
6
+ originUrl?: string,
7
+ errorType?: string,
8
+ message?: string,
9
+ details?: string,
10
+ };
11
+
12
+ export interface ErrrorAppDataInterface {
13
+ churchId: string,
14
+ userId: string,
15
+ originUrl: string,
16
+ application: string
17
+ }
@@ -1,51 +1,51 @@
1
- export interface AnswerInterface { id?: string, value?: string, questionId?: string, formSubmissionId?: string, required?: boolean }
2
- export interface CampusInterface { id?: string, name?: string }
3
- export interface ContactInfoInterface { address1?: string, address2?: string, city?: string, state?: string, zip?: string, homePhone?: string, mobilePhone?: string, workPhone?: string, email?: string, pager?: string, fax?: string, skype?: string, workEmail?: string }
4
- export interface FormInterface { id?: string, name?: string, contentType?: string, restricted?: boolean, accessStartTime?: Date, accessEndTime?: Date, archived: boolean, action?: string }
5
- export interface FormSubmissionInterface { id?: string, formId?: string, contentType?: string, contentId?: string, form?: FormInterface, answers?: AnswerInterface[], questions?: QuestionInterface[] }
6
- export interface GroupInterface { id?: string, name?: string, categoryName?: string, memberCount?: number, trackAttendance?: boolean, parentPickup?: boolean, about?: string, photoUrl?: string }
7
- export interface GroupMemberInterface { id?: string, personId: string, person?: PersonInterface, groupId: string, group?: GroupInterface, leader?: boolean }
8
- export interface GroupServiceTimeInterface { id?: string, groupId?: string, serviceTimeId?: string, serviceTime?: ServiceTimeInterface }
9
- export interface HouseholdInterface { id?: string, name?: string }
10
- export interface HouseholdMemberInterface { id?: string, householdId?: string, household?: HouseholdInterface, personId?: string, person?: PersonInterface, role?: string }
11
- export interface NameInterface { first?: string, middle?: string, last?: string, nick?: string, display?: string, title?: string, suffix?: string }
12
- export interface SearchCondition { field: string, operator: string, value: string }
13
-
14
- export interface PersonInterface {
15
- id?: string,
16
- name: NameInterface,
17
- contactInfo: ContactInfoInterface,
18
- membershipStatus?: string,
19
- gender?: string,
20
- birthDate?: Date,
21
- maritalStatus?: string,
22
- anniversary?: Date,
23
- photo?: string,
24
- photoUpdated?: Date,
25
- householdId?: string,
26
- householdRole?: string,
27
- userId?: string,
28
- school?: string,
29
- grade?: string,
30
- graduationDate?: string,
31
- employer?: string,
32
- formSubmissions?: [FormSubmissionInterface]
33
- child?: boolean,
34
- inactiveReason?: string,
35
- inactiveDate?: Date,
36
- servicesUser?: boolean,
37
- calendarUser?: boolean,
38
- checkInsUser?: boolean,
39
- registrationsUser?: boolean,
40
- givingUser?: boolean,
41
- groupsUser?: boolean,
42
- conversationId?: string,
43
- optedOut?: boolean,
44
- nametagNotes?: string
45
- }
46
- export interface QuestionInterface { id?: string, formId?: string, title?: string, fieldType?: string, placeholder?: string, description?: string, required?: boolean, choices?: [{ value?: string, text?: string }] }
47
- export interface ServiceInterface { id?: string, campusId?: string, name?: string, campus?: CampusInterface }
48
- export interface ServiceTimeInterface { id?: string, name?: string, longName?: string, serviceId?: string, groups?: GroupInterface[] }
49
- export interface MemberPermissionInterface { id?: string, churchId?: string, memberId?: string, contentType?: string, contentId?: string, action?: string, personName: string, formName?: string, emailNotification?: boolean }
50
- export interface FormMemberInterface { person?: PersonInterface, access?: string }
51
- export interface FormMemberListInterface { members?: FormMemberInterface[] }
1
+ export interface AnswerInterface { id?: string, value?: string, questionId?: string, formSubmissionId?: string, required?: boolean }
2
+ export interface CampusInterface { id?: string, name?: string }
3
+ export interface ContactInfoInterface { address1?: string, address2?: string, city?: string, state?: string, zip?: string, homePhone?: string, mobilePhone?: string, workPhone?: string, email?: string, pager?: string, fax?: string, skype?: string, workEmail?: string }
4
+ export interface FormInterface { id?: string, name?: string, contentType?: string, restricted?: boolean, accessStartTime?: Date, accessEndTime?: Date, archived: boolean, action?: string }
5
+ export interface FormSubmissionInterface { id?: string, formId?: string, contentType?: string, contentId?: string, form?: FormInterface, answers?: AnswerInterface[], questions?: QuestionInterface[] }
6
+ export interface GroupInterface { id?: string, name?: string, categoryName?: string, memberCount?: number, trackAttendance?: boolean, parentPickup?: boolean, about?: string, photoUrl?: string }
7
+ export interface GroupMemberInterface { id?: string, personId: string, person?: PersonInterface, groupId: string, group?: GroupInterface, leader?: boolean }
8
+ export interface GroupServiceTimeInterface { id?: string, groupId?: string, serviceTimeId?: string, serviceTime?: ServiceTimeInterface }
9
+ export interface HouseholdInterface { id?: string, name?: string }
10
+ export interface HouseholdMemberInterface { id?: string, householdId?: string, household?: HouseholdInterface, personId?: string, person?: PersonInterface, role?: string }
11
+ export interface NameInterface { first?: string, middle?: string, last?: string, nick?: string, display?: string, title?: string, suffix?: string }
12
+ export interface SearchCondition { field: string, operator: string, value: string }
13
+
14
+ export interface PersonInterface {
15
+ id?: string,
16
+ name: NameInterface,
17
+ contactInfo: ContactInfoInterface,
18
+ membershipStatus?: string,
19
+ gender?: string,
20
+ birthDate?: Date,
21
+ maritalStatus?: string,
22
+ anniversary?: Date,
23
+ photo?: string,
24
+ photoUpdated?: Date,
25
+ householdId?: string,
26
+ householdRole?: string,
27
+ userId?: string,
28
+ school?: string,
29
+ grade?: string,
30
+ graduationDate?: string,
31
+ employer?: string,
32
+ formSubmissions?: [FormSubmissionInterface]
33
+ child?: boolean,
34
+ inactiveReason?: string,
35
+ inactiveDate?: Date,
36
+ servicesUser?: boolean,
37
+ calendarUser?: boolean,
38
+ checkInsUser?: boolean,
39
+ registrationsUser?: boolean,
40
+ givingUser?: boolean,
41
+ groupsUser?: boolean,
42
+ conversationId?: string,
43
+ optedOut?: boolean,
44
+ nametagNotes?: string
45
+ }
46
+ export interface QuestionInterface { id?: string, formId?: string, title?: string, fieldType?: string, placeholder?: string, description?: string, required?: boolean, choices?: [{ value?: string, text?: string }] }
47
+ export interface ServiceInterface { id?: string, campusId?: string, name?: string, campus?: CampusInterface }
48
+ export interface ServiceTimeInterface { id?: string, name?: string, longName?: string, serviceId?: string, groups?: GroupInterface[] }
49
+ export interface MemberPermissionInterface { id?: string, churchId?: string, memberId?: string, contentType?: string, contentId?: string, action?: string, personName: string, formName?: string, emailNotification?: boolean }
50
+ export interface FormMemberInterface { person?: PersonInterface, access?: string }
51
+ export interface FormMemberListInterface { members?: FormMemberInterface[] }
@@ -1,20 +1,20 @@
1
- import { PersonInterface } from "./Membership";
2
-
3
- export interface ConnectionInterface { id?: string, churchId?: string, conversationId?: string, userId?: string, displayName?: string, timeJoined?: Date, socketId?: string }
4
- export interface ConversationInterface {
5
- id?: string, churchId?: string, contentType?: string, contentId?: string, title?: string, dateCreated?: Date, groupId?: string, visibility?: string, firstPostId?: string, lastPostId?: string, postCount?: number, allowAnonymousPosts?: boolean;
6
- messages?: MessageInterface[],
7
- }
8
- export interface MessageInterface {
9
- id?: string, churchId?: string, conversationId?: string, userId?: string, personId?: string, displayName?: string, timeSent?: Date, timeUpdated?: Date, messageType?: string, content?: string,
10
- person?: PersonInterface
11
- }
12
- export interface PrivateMessageInterface {
13
- id?: string, churchId?: string, fromPersonId?: string, toPersonId?: string, conversationId?: string, notifyPersonId?: string
14
- conversation?: ConversationInterface;
15
- person?: PersonInterface;
16
- }
17
-
18
- export interface SocketActionHandlerInterface { action:string, id:string, handleMessage:(data:any) => void }
19
- export type SocketPayloadAction = "message" | "deleteMessage" | "callout" | "attendance" | "prayerRequest" | "socketId" | "privateMessage" | "privateRoomAdded" | "videoChatInvite" | "reconnect";
20
- export interface SocketPayloadInterface { action: SocketPayloadAction, data: any }
1
+ import { PersonInterface } from "./Membership";
2
+
3
+ export interface ConnectionInterface { id?: string, churchId?: string, conversationId?: string, userId?: string, displayName?: string, timeJoined?: Date, socketId?: string }
4
+ export interface ConversationInterface {
5
+ id?: string, churchId?: string, contentType?: string, contentId?: string, title?: string, dateCreated?: Date, groupId?: string, visibility?: string, firstPostId?: string, lastPostId?: string, postCount?: number, allowAnonymousPosts?: boolean;
6
+ messages?: MessageInterface[],
7
+ }
8
+ export interface MessageInterface {
9
+ id?: string, churchId?: string, conversationId?: string, userId?: string, personId?: string, displayName?: string, timeSent?: Date, timeUpdated?: Date, messageType?: string, content?: string,
10
+ person?: PersonInterface
11
+ }
12
+ export interface PrivateMessageInterface {
13
+ id?: string, churchId?: string, fromPersonId?: string, toPersonId?: string, conversationId?: string, notifyPersonId?: string
14
+ conversation?: ConversationInterface;
15
+ person?: PersonInterface;
16
+ }
17
+
18
+ export interface SocketActionHandlerInterface { action:string, id:string, handleMessage:(data:any) => void }
19
+ export type SocketPayloadAction = "message" | "deleteMessage" | "callout" | "attendance" | "prayerRequest" | "socketId" | "privateMessage" | "privateRoomAdded" | "videoChatInvite" | "reconnect";
20
+ export interface SocketPayloadInterface { action: SocketPayloadAction, data: any }
@@ -1,68 +1,68 @@
1
- export class Permissions {
2
- static attendanceApi = {
3
- attendance: {
4
- view: { api: "AttendanceApi", contentType: "Attendance", action: "View" },
5
- viewSummary: { api: "AttendanceApi", contentType: "Attendance", action: "View Summary" },
6
- edit: { api: "AttendanceApi", contentType: "Attendance", action: "Edit" }
7
- },
8
- services: {
9
- edit: { api: "AttendanceApi", contentType: "Services", action: "Edit" }
10
- }
11
- };
12
-
13
- static membershipApi = {
14
- roles: {
15
- view: { api: "MembershipApi", contentType: "Roles", action: "View" },
16
- edit: { api: "MembershipApi", contentType: "Roles", action: "Edit" }
17
- },
18
- settings: {
19
- edit: { api: "MembershipApi", contentType: "Settings", action: "Edit" }
20
- },
21
- server: {
22
- admin: { api: "MembershipApi", contentType: "Server", action: "Admin" }
23
- },
24
- forms: {
25
- admin: { api: "MembershipApi", contentType: "Forms", action: "Admin" },
26
- edit: { api: "MembershipApi", contentType: "Forms", action: "Edit" }
27
- },
28
- groups: {
29
- edit: { api: "MembershipApi", contentType: "Groups", action: "Edit" }
30
- },
31
- people: {
32
- view: { api: "MembershipApi", contentType: "People", action: "View" },
33
- viewMembers: { api: "MembershipApi", contentType: "People", action: "View Members" },
34
- edit: { api: "MembershipApi", contentType: "People", action: "Edit" }
35
- },
36
- groupMembers: {
37
- edit: { api: "MembershipApi", contentType: "Group Members", action: "Edit" },
38
- view: { api: "MembershipApi", contentType: "Group Members", action: "View" }
39
- }
40
- };
41
-
42
- static givingApi = {
43
- donations: {
44
- viewSummary: { api: "GivingApi", contentType: "Donations", action: "View Summary" },
45
- view: { api: "GivingApi", contentType: "Donations", action: "View" },
46
- edit: { api: "GivingApi", contentType: "Donations", action: "Edit" }
47
- },
48
- settings: {
49
- view: { api: "GivingApi", contentType: "Settings", action: "View" },
50
- edit: { api: "GivingApi", contentType: "Settings", action: "Edit" }
51
- }
52
-
53
- }
54
-
55
- static contentApi = {
56
- chat: {
57
- host: { api: "ContentApi", contentType: "Chat", action: "Host" }
58
- },
59
- content: {
60
- edit: { api: "ContentApi", contentType: "Content", action: "Edit" }
61
- },
62
- streamingServices: {
63
- edit: { api: "ContentApi", contentType: "StreamingServices", action: "Edit" }
64
- },
65
-
66
- };
67
-
68
- }
1
+ export class Permissions {
2
+ static attendanceApi = {
3
+ attendance: {
4
+ view: { api: "AttendanceApi", contentType: "Attendance", action: "View" },
5
+ viewSummary: { api: "AttendanceApi", contentType: "Attendance", action: "View Summary" },
6
+ edit: { api: "AttendanceApi", contentType: "Attendance", action: "Edit" }
7
+ },
8
+ services: {
9
+ edit: { api: "AttendanceApi", contentType: "Services", action: "Edit" }
10
+ }
11
+ };
12
+
13
+ static membershipApi = {
14
+ roles: {
15
+ view: { api: "MembershipApi", contentType: "Roles", action: "View" },
16
+ edit: { api: "MembershipApi", contentType: "Roles", action: "Edit" }
17
+ },
18
+ settings: {
19
+ edit: { api: "MembershipApi", contentType: "Settings", action: "Edit" }
20
+ },
21
+ server: {
22
+ admin: { api: "MembershipApi", contentType: "Server", action: "Admin" }
23
+ },
24
+ forms: {
25
+ admin: { api: "MembershipApi", contentType: "Forms", action: "Admin" },
26
+ edit: { api: "MembershipApi", contentType: "Forms", action: "Edit" }
27
+ },
28
+ groups: {
29
+ edit: { api: "MembershipApi", contentType: "Groups", action: "Edit" }
30
+ },
31
+ people: {
32
+ view: { api: "MembershipApi", contentType: "People", action: "View" },
33
+ viewMembers: { api: "MembershipApi", contentType: "People", action: "View Members" },
34
+ edit: { api: "MembershipApi", contentType: "People", action: "Edit" }
35
+ },
36
+ groupMembers: {
37
+ edit: { api: "MembershipApi", contentType: "Group Members", action: "Edit" },
38
+ view: { api: "MembershipApi", contentType: "Group Members", action: "View" }
39
+ }
40
+ };
41
+
42
+ static givingApi = {
43
+ donations: {
44
+ viewSummary: { api: "GivingApi", contentType: "Donations", action: "View Summary" },
45
+ view: { api: "GivingApi", contentType: "Donations", action: "View" },
46
+ edit: { api: "GivingApi", contentType: "Donations", action: "Edit" }
47
+ },
48
+ settings: {
49
+ view: { api: "GivingApi", contentType: "Settings", action: "View" },
50
+ edit: { api: "GivingApi", contentType: "Settings", action: "Edit" }
51
+ }
52
+
53
+ }
54
+
55
+ static contentApi = {
56
+ chat: {
57
+ host: { api: "ContentApi", contentType: "Chat", action: "Host" }
58
+ },
59
+ content: {
60
+ edit: { api: "ContentApi", contentType: "Content", action: "Edit" }
61
+ },
62
+ streamingServices: {
63
+ edit: { api: "ContentApi", contentType: "StreamingServices", action: "Edit" }
64
+ },
65
+
66
+ };
67
+
68
+ }
@@ -1,7 +1,7 @@
1
- export interface ReportResultInterface { displayName: string, description: string, table: any[], outputs: ReportOutputInterface[] }
2
- export interface ReportInterface { keyName: string, displayName: string, description: string, parameters: ParameterInterface[], permissions: ReportPermissionGroupInterface[] }
3
- export interface ParameterInterface { keyName: string, displayName?: string, source: string, sourceKey: string, options: { value: string, text: string }[], value?: string, requiredParentIds?: string[], defaultValue: string }
4
- export interface ReportOutputInterface { outputType: string, columns: ColumnInterface[], groupings?: number[] }
5
- export interface ColumnInterface { header: string, value: string, formatter: string }
6
- export interface ReportPermissionGroupInterface { requireOne: ReportPermissionInterface[] }
7
- export interface ReportPermissionInterface { api: string, contentType: string, action: string }
1
+ export interface ReportResultInterface { displayName: string, description: string, table: any[], outputs: ReportOutputInterface[] }
2
+ export interface ReportInterface { keyName: string, displayName: string, description: string, parameters: ParameterInterface[], permissions: ReportPermissionGroupInterface[] }
3
+ export interface ParameterInterface { keyName: string, displayName?: string, source: string, sourceKey: string, options: { value: string, text: string }[], value?: string, requiredParentIds?: string[], defaultValue: string }
4
+ export interface ReportOutputInterface { outputType: string, columns: ColumnInterface[], groupings?: number[] }
5
+ export interface ColumnInterface { header: string, value: string, formatter: string }
6
+ export interface ReportPermissionGroupInterface { requireOne: ReportPermissionInterface[] }
7
+ export interface ReportPermissionInterface { api: string, contentType: string, action: string }
@@ -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
+ }
@@ -1,12 +1,12 @@
1
- export * from "./UserContextInterface";
2
- export * from "./Permissions";
3
-
4
- // API interfaces
5
- export * from "./Access";
6
- export * from "./Attendance";
7
- export * from "./Content";
8
- export * from "./Doing";
9
- export * from "./Donation";
10
- export * from "./Membership";
11
- export * from "./Messaging";
12
- export * from "./Reporting";
1
+ export * from "./UserContextInterface";
2
+ export * from "./Permissions";
3
+
4
+ // API interfaces
5
+ export * from "./Access";
6
+ export * from "./Attendance";
7
+ export * from "./Content";
8
+ export * from "./Doing";
9
+ export * from "./Donation";
10
+ export * from "./Membership";
11
+ export * from "./Messaging";
12
+ export * from "./Reporting";
package/tsconfig.json CHANGED
@@ -1,36 +1,36 @@
1
- {
2
- "compilerOptions": {
3
- "target": "es6",
4
- "typeRoots": [
5
- "./types",
6
- "node_modules/@types"
7
- ],
8
- "lib": [
9
- "dom",
10
- "dom.iterable",
11
- "esnext"
12
- ],
13
- "allowJs": true,
14
- "skipLibCheck": true,
15
- "esModuleInterop": true,
16
- "allowSyntheticDefaultImports": true,
17
- "strict": true,
18
- "strictNullChecks": false,
19
- "forceConsistentCasingInFileNames": true,
20
- "module": "CommonJS",
21
- "moduleResolution": "node",
22
- "resolveJsonModule": true,
23
- "isolatedModules": true,
24
- "jsx": "react",
25
- "sourceMap": true,
26
- "allowUnreachableCode": false,
27
- "allowUnusedLabels": false,
28
- "declaration": true,
29
- "declarationMap": true,
30
- "noImplicitReturns": true,
31
- "pretty": true,
32
- "paths": {},
33
- "outDir": "dist"
34
- },
35
- "include": ["src/**/*.ts"]
36
- }
1
+ {
2
+ "compilerOptions": {
3
+ "target": "es6",
4
+ "typeRoots": [
5
+ "./types",
6
+ "node_modules/@types"
7
+ ],
8
+ "lib": [
9
+ "dom",
10
+ "dom.iterable",
11
+ "esnext"
12
+ ],
13
+ "allowJs": true,
14
+ "skipLibCheck": true,
15
+ "esModuleInterop": true,
16
+ "allowSyntheticDefaultImports": true,
17
+ "strict": true,
18
+ "strictNullChecks": false,
19
+ "forceConsistentCasingInFileNames": true,
20
+ "module": "CommonJS",
21
+ "moduleResolution": "node",
22
+ "resolveJsonModule": true,
23
+ "isolatedModules": true,
24
+ "jsx": "react",
25
+ "sourceMap": true,
26
+ "allowUnreachableCode": false,
27
+ "allowUnusedLabels": false,
28
+ "declaration": true,
29
+ "declarationMap": true,
30
+ "noImplicitReturns": true,
31
+ "pretty": true,
32
+ "paths": {},
33
+ "outDir": "dist"
34
+ },
35
+ "include": ["src/**/*.ts"]
36
+ }