mp-js-api 0.0.1
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/index.d.ts +120 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +341 -0
- package/dist/tables/addresses.d.ts +55 -0
- package/dist/tables/addresses.d.ts.map +1 -0
- package/dist/tables/addresses.js +60 -0
- package/dist/tables/contact-attributes.d.ts +19 -0
- package/dist/tables/contact-attributes.d.ts.map +1 -0
- package/dist/tables/contact-attributes.js +24 -0
- package/dist/tables/contacts.d.ts +105 -0
- package/dist/tables/contacts.d.ts.map +1 -0
- package/dist/tables/contacts.js +114 -0
- package/dist/tables/event-participants.d.ts +47 -0
- package/dist/tables/event-participants.d.ts.map +1 -0
- package/dist/tables/event-participants.js +52 -0
- package/dist/tables/events.d.ts +117 -0
- package/dist/tables/events.d.ts.map +1 -0
- package/dist/tables/events.js +122 -0
- package/dist/tables/group-participants.d.ts +61 -0
- package/dist/tables/group-participants.d.ts.map +1 -0
- package/dist/tables/group-participants.js +66 -0
- package/dist/tables/groups.d.ts +103 -0
- package/dist/tables/groups.d.ts.map +1 -0
- package/dist/tables/groups.js +108 -0
- package/dist/tables/households.d.ts +55 -0
- package/dist/tables/households.d.ts.map +1 -0
- package/dist/tables/households.js +60 -0
- package/dist/tables/participants.d.ts +63 -0
- package/dist/tables/participants.d.ts.map +1 -0
- package/dist/tables/participants.js +68 -0
- package/dist/utils/strings.d.ts +2 -0
- package/dist/utils/strings.d.ts.map +1 -0
- package/dist/utils/strings.js +30 -0
- package/package.json +26 -0
- package/src/index.ts +571 -0
- package/src/tables/addresses.ts +111 -0
- package/src/tables/contact-attributes.ts +40 -0
- package/src/tables/contacts.ts +223 -0
- package/src/tables/event-participants.ts +95 -0
- package/src/tables/events.ts +235 -0
- package/src/tables/group-participants.ts +123 -0
- package/src/tables/groups.ts +207 -0
- package/src/tables/households.ts +111 -0
- package/src/tables/participants.ts +127 -0
- package/src/utils/strings.ts +29 -0
- package/src/utils/types.d.ts +7 -0
- package/test/index.spec.ts +103 -0
- package/tsconfig.json +25 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export interface ContactAttributeRecord {
|
|
2
|
+
Contact_Attribute_ID: number;
|
|
3
|
+
Contact_ID: number;
|
|
4
|
+
Attribute_ID: number;
|
|
5
|
+
Start_Date: string;
|
|
6
|
+
End_Date?: string | null;
|
|
7
|
+
Notes?: string | null;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface ContactAttribute {
|
|
11
|
+
contactAttributeID: number;
|
|
12
|
+
contactID: number;
|
|
13
|
+
attributeID: number;
|
|
14
|
+
startDate: string;
|
|
15
|
+
endDate?: string | null;
|
|
16
|
+
notes?: string | null;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
export function mapContactAttributeRecord(originalObject: ContactAttributeRecord): ContactAttribute {
|
|
21
|
+
return {
|
|
22
|
+
contactAttributeID: originalObject.Contact_Attribute_ID,
|
|
23
|
+
contactID: originalObject.Contact_ID,
|
|
24
|
+
attributeID: originalObject.Attribute_ID,
|
|
25
|
+
startDate: originalObject.Start_Date,
|
|
26
|
+
endDate: originalObject.End_Date,
|
|
27
|
+
notes: originalObject.Notes
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function mapContactAttributeToContactAttributeRecord(contactAttribute: ContactAttribute): ContactAttributeRecord {
|
|
32
|
+
return {
|
|
33
|
+
Contact_Attribute_ID: contactAttribute.contactAttributeID,
|
|
34
|
+
Contact_ID: contactAttribute.contactID,
|
|
35
|
+
Attribute_ID: contactAttribute.attributeID,
|
|
36
|
+
Start_Date: contactAttribute.startDate,
|
|
37
|
+
End_Date: contactAttribute.endDate,
|
|
38
|
+
Notes: contactAttribute.notes
|
|
39
|
+
};
|
|
40
|
+
}
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
export interface ContactRecord {
|
|
2
|
+
Contact_ID: number;
|
|
3
|
+
Company: boolean;
|
|
4
|
+
Company_Name: string | null;
|
|
5
|
+
Display_Name: string;
|
|
6
|
+
Prefix_ID: number | null;
|
|
7
|
+
First_Name: string | null;
|
|
8
|
+
Middle_Name: string | null;
|
|
9
|
+
Last_Name: string | null;
|
|
10
|
+
Suffix_ID: number | null;
|
|
11
|
+
Nickname: string | null;
|
|
12
|
+
Date_of_Birth: string | null;
|
|
13
|
+
Gender_ID: number | null;
|
|
14
|
+
Marital_Status_ID: number | null;
|
|
15
|
+
Contact_Status_ID: number;
|
|
16
|
+
Household_ID: number | null;
|
|
17
|
+
Household_Position_ID: number | null;
|
|
18
|
+
Anniversary_Date: string | null;
|
|
19
|
+
Date_of_Death: string | null;
|
|
20
|
+
Participant_Record: number | null;
|
|
21
|
+
Donor_Record: number | null;
|
|
22
|
+
Email_Address: string | null;
|
|
23
|
+
Mobile_Phone: string | null;
|
|
24
|
+
Company_Phone: string | null;
|
|
25
|
+
Pager_Phone: string | null;
|
|
26
|
+
Fax_Phone: string | null;
|
|
27
|
+
Facebook_Account: string | null;
|
|
28
|
+
Twitter_Account: string | null;
|
|
29
|
+
Web_Page: string | null;
|
|
30
|
+
Industry_ID: number | null;
|
|
31
|
+
Occupation_ID: number | null;
|
|
32
|
+
HS_Graduation_Year: number | null;
|
|
33
|
+
Bulk_Email_Opt_Out: boolean;
|
|
34
|
+
Email_Unlisted: boolean;
|
|
35
|
+
Do_Not_Text: boolean;
|
|
36
|
+
Mobile_Phone_Unlisted: boolean;
|
|
37
|
+
Remove_From_Directory: boolean;
|
|
38
|
+
User_Account: number | null;
|
|
39
|
+
ID_Card: string | null;
|
|
40
|
+
Contact_GUID: string;
|
|
41
|
+
_Contact_Setup_Date: string;
|
|
42
|
+
Occupation_Name: string | null;
|
|
43
|
+
Email_Verified: boolean;
|
|
44
|
+
Mobile_Phone_Verified: boolean;
|
|
45
|
+
Maiden_Name: string | null;
|
|
46
|
+
|
|
47
|
+
Professional_Information: unknown | null;
|
|
48
|
+
Contact_Methods: unknown | null;
|
|
49
|
+
Current_School: unknown | null;
|
|
50
|
+
Other_Information: unknown | null;
|
|
51
|
+
Communication_Preferences: unknown | null;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface Contact {
|
|
55
|
+
contactID: number;
|
|
56
|
+
company: boolean;
|
|
57
|
+
companyName: string | null;
|
|
58
|
+
displayName: string;
|
|
59
|
+
prefixID: number | null;
|
|
60
|
+
firstName: string | null;
|
|
61
|
+
middleName: string | null;
|
|
62
|
+
lastName: string | null;
|
|
63
|
+
suffixID: number | null;
|
|
64
|
+
nickname: string | null;
|
|
65
|
+
dateOfBirth: string | null;
|
|
66
|
+
genderID: number | null;
|
|
67
|
+
maritalStatusID: number | null;
|
|
68
|
+
contactStatusID: number;
|
|
69
|
+
householdID: number | null;
|
|
70
|
+
householdPositionID: number | null;
|
|
71
|
+
anniversaryDate: string | null;
|
|
72
|
+
dateOfDeath: string | null;
|
|
73
|
+
participantRecord: number | null;
|
|
74
|
+
donorRecord: number | null;
|
|
75
|
+
emailAddress: string | null;
|
|
76
|
+
mobilePhone: string | null;
|
|
77
|
+
companyPhone: string | null;
|
|
78
|
+
pagerPhone: string | null;
|
|
79
|
+
faxPhone: string | null;
|
|
80
|
+
facebookAccount: string | null;
|
|
81
|
+
twitterAccount: string | null;
|
|
82
|
+
webPage: string | null;
|
|
83
|
+
industryID: number | null;
|
|
84
|
+
occupationID: number | null;
|
|
85
|
+
hsGraduationYear: number | null;
|
|
86
|
+
bulkEmailOptOut: boolean;
|
|
87
|
+
emailUnlisted: boolean;
|
|
88
|
+
doNotText: boolean;
|
|
89
|
+
mobilePhoneUnlisted: boolean;
|
|
90
|
+
removeFromDirectory: boolean;
|
|
91
|
+
userAccount: number | null;
|
|
92
|
+
idCard: string | null;
|
|
93
|
+
contactGUID: string;
|
|
94
|
+
_contactSetupDate: string;
|
|
95
|
+
occupationName: string | null;
|
|
96
|
+
emailVerified: boolean;
|
|
97
|
+
mobilePhoneVerified: boolean;
|
|
98
|
+
maidenName: string | null;
|
|
99
|
+
|
|
100
|
+
professionalInformation: unknown | null;
|
|
101
|
+
contactMethods: unknown | null;
|
|
102
|
+
currentSchool: unknown | null;
|
|
103
|
+
otherInformation: unknown | null;
|
|
104
|
+
communicationPreferences: unknown | null;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export const mapContactRecord = (record: ContactRecord): Contact => ({
|
|
108
|
+
contactID: record.Contact_ID,
|
|
109
|
+
company: record.Company,
|
|
110
|
+
companyName: record.Company_Name,
|
|
111
|
+
displayName: record.Display_Name,
|
|
112
|
+
prefixID: record.Prefix_ID,
|
|
113
|
+
firstName: record.First_Name,
|
|
114
|
+
middleName: record.Middle_Name,
|
|
115
|
+
lastName: record.Last_Name,
|
|
116
|
+
suffixID: record.Suffix_ID,
|
|
117
|
+
nickname: record.Nickname,
|
|
118
|
+
dateOfBirth: record.Date_of_Birth,
|
|
119
|
+
genderID: record.Gender_ID,
|
|
120
|
+
maritalStatusID: record.Marital_Status_ID,
|
|
121
|
+
contactStatusID: record.Contact_Status_ID,
|
|
122
|
+
householdID: record.Household_ID,
|
|
123
|
+
householdPositionID: record.Household_Position_ID,
|
|
124
|
+
anniversaryDate: record.Anniversary_Date,
|
|
125
|
+
dateOfDeath: record.Date_of_Death,
|
|
126
|
+
participantRecord: record.Participant_Record,
|
|
127
|
+
donorRecord: record.Donor_Record,
|
|
128
|
+
emailAddress: record.Email_Address,
|
|
129
|
+
mobilePhone: record.Mobile_Phone,
|
|
130
|
+
companyPhone: record.Company_Phone,
|
|
131
|
+
pagerPhone: record.Pager_Phone,
|
|
132
|
+
faxPhone: record.Fax_Phone,
|
|
133
|
+
facebookAccount: record.Facebook_Account,
|
|
134
|
+
twitterAccount: record.Twitter_Account,
|
|
135
|
+
webPage: record.Web_Page,
|
|
136
|
+
industryID: record.Industry_ID,
|
|
137
|
+
occupationID: record.Occupation_ID,
|
|
138
|
+
hsGraduationYear: record.HS_Graduation_Year,
|
|
139
|
+
bulkEmailOptOut: record.Bulk_Email_Opt_Out,
|
|
140
|
+
emailUnlisted: record.Email_Unlisted,
|
|
141
|
+
doNotText: record.Do_Not_Text,
|
|
142
|
+
mobilePhoneUnlisted: record.Mobile_Phone_Unlisted,
|
|
143
|
+
removeFromDirectory: record.Remove_From_Directory,
|
|
144
|
+
userAccount: record.User_Account,
|
|
145
|
+
idCard: record.ID_Card,
|
|
146
|
+
contactGUID: record.Contact_GUID,
|
|
147
|
+
_contactSetupDate: record._Contact_Setup_Date,
|
|
148
|
+
occupationName: record.Occupation_Name,
|
|
149
|
+
emailVerified: record.Email_Verified,
|
|
150
|
+
mobilePhoneVerified: record.Mobile_Phone_Verified,
|
|
151
|
+
maidenName: record.Maiden_Name,
|
|
152
|
+
|
|
153
|
+
professionalInformation: record.Professional_Information,
|
|
154
|
+
contactMethods: record.Contact_Methods,
|
|
155
|
+
currentSchool: record.Current_School,
|
|
156
|
+
otherInformation: record.Other_Information,
|
|
157
|
+
communicationPreferences: record.Communication_Preferences,
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
export const mapContactToContactRecord = <
|
|
161
|
+
T extends Contact | Partial<Contact> = Contact
|
|
162
|
+
>(
|
|
163
|
+
contact: Contact | Partial<Contact>
|
|
164
|
+
): T extends Contact ? ContactRecord : Partial<ContactRecord> => {
|
|
165
|
+
const mappings = {
|
|
166
|
+
contactID: 'Contact_ID',
|
|
167
|
+
company: 'Company',
|
|
168
|
+
companyName: 'Company_Name',
|
|
169
|
+
displayName: 'Display_Name',
|
|
170
|
+
prefixID: 'Prefix_ID',
|
|
171
|
+
firstName: 'First_Name',
|
|
172
|
+
middleName: 'Middle_Name',
|
|
173
|
+
lastName: 'Last_Name',
|
|
174
|
+
suffixID: 'Suffix_ID',
|
|
175
|
+
nickname: 'Nickname',
|
|
176
|
+
dateOfBirth: 'Date_of_Birth',
|
|
177
|
+
genderID: 'Gender_ID',
|
|
178
|
+
maritalStatusID: 'Marital_Status_ID',
|
|
179
|
+
contactStatusID: 'Contact_Status_ID',
|
|
180
|
+
householdID: 'Household_ID',
|
|
181
|
+
householdPositionID: 'Household_Position_ID',
|
|
182
|
+
anniversaryDate: 'Anniversary_Date',
|
|
183
|
+
dateOfDeath: 'Date_of_Death',
|
|
184
|
+
participantRecord: 'Participant_Record',
|
|
185
|
+
donorRecord: 'Donor_Record',
|
|
186
|
+
emailAddress: 'Email_Address',
|
|
187
|
+
mobilePhone: 'Mobile_Phone',
|
|
188
|
+
companyPhone: 'Company_Phone',
|
|
189
|
+
pagerPhone: 'Pager_Phone',
|
|
190
|
+
faxPhone: 'Fax_Phone',
|
|
191
|
+
facebookAccount: 'Facebook_Account',
|
|
192
|
+
twitterAccount: 'Twitter_Account',
|
|
193
|
+
webPage: 'Web_Page',
|
|
194
|
+
industryID: 'Industry_ID',
|
|
195
|
+
occupationID: 'Occupation_ID',
|
|
196
|
+
hsGraduationYear: 'HS_Graduation_Year',
|
|
197
|
+
bulkEmailOptOut: 'Bulk_Email_Opt_Out',
|
|
198
|
+
emailUnlisted: 'Email_Unlisted',
|
|
199
|
+
doNotText: 'Do_Not_Text',
|
|
200
|
+
mobilePhoneUnlisted: 'Mobile_Phone_Unlisted',
|
|
201
|
+
removeFromDirectory: 'Remove_From_Directory',
|
|
202
|
+
userAccount: 'User_Account',
|
|
203
|
+
idCard: 'ID_Card',
|
|
204
|
+
contactGUID: 'Contact_GUID',
|
|
205
|
+
_contactSetupDate: '_Contact_Setup_Date',
|
|
206
|
+
occupationName: 'Occupation_Name',
|
|
207
|
+
emailVerified: 'Email_Verified',
|
|
208
|
+
mobilePhoneVerified: 'Mobile_Phone_Verified',
|
|
209
|
+
maidenName: 'Maiden_Name',
|
|
210
|
+
professionalInformation: 'Professional_Information',
|
|
211
|
+
contactMethods: 'Contact_Methods',
|
|
212
|
+
currentSchool: 'Current_School',
|
|
213
|
+
otherInformation: 'Other_Information',
|
|
214
|
+
communicationPreferences: 'Communication_Preferences',
|
|
215
|
+
};
|
|
216
|
+
|
|
217
|
+
let contactRecord: Partial<ContactRecord> = {};
|
|
218
|
+
for (const key in contact) {
|
|
219
|
+
contactRecord[mappings[key]] = contact[key];
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
return contactRecord as ContactRecord;
|
|
223
|
+
};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
export interface EventParticipantRecord {
|
|
2
|
+
Event_Participant_ID: number;
|
|
3
|
+
Event_ID: number;
|
|
4
|
+
Participant_ID: number;
|
|
5
|
+
Participation_Status_ID: number;
|
|
6
|
+
Time_In: string;
|
|
7
|
+
Time_Confirmed: string | null;
|
|
8
|
+
Time_Out: string | null;
|
|
9
|
+
Notes: string;
|
|
10
|
+
Group_Participant_ID: null | number;
|
|
11
|
+
Check_in_Station: null | string;
|
|
12
|
+
_Setup_Date: string;
|
|
13
|
+
Group_ID: number;
|
|
14
|
+
Room_ID: null | number;
|
|
15
|
+
Call_Parents: null | string;
|
|
16
|
+
Group_Role_ID: number;
|
|
17
|
+
Response_ID: null | number;
|
|
18
|
+
Registrant_Message_Sent: boolean;
|
|
19
|
+
Attendee_Message_Sent: boolean;
|
|
20
|
+
Attending_Online: boolean;
|
|
21
|
+
RSVP_Status_ID: null | number;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface EventParticipant {
|
|
25
|
+
eventParticipantID: number;
|
|
26
|
+
eventID: number;
|
|
27
|
+
participantID: number;
|
|
28
|
+
participationStatusID: number;
|
|
29
|
+
timeIn: string;
|
|
30
|
+
timeConfirmed: string | null;
|
|
31
|
+
timeOut: string | null;
|
|
32
|
+
notes: string;
|
|
33
|
+
groupParticipantID: null | number;
|
|
34
|
+
checkInStation: null | string;
|
|
35
|
+
setupDate: string;
|
|
36
|
+
groupID: number;
|
|
37
|
+
roomID: null | number;
|
|
38
|
+
callParents: null | string;
|
|
39
|
+
groupRoleID: number;
|
|
40
|
+
responseID: null | number;
|
|
41
|
+
registrantMessageSent: boolean;
|
|
42
|
+
attendeeMessageSent: boolean;
|
|
43
|
+
attendingOnline: boolean;
|
|
44
|
+
rsvpStatusID: null | number;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function mapEventParticipantRecord(originalObject: EventParticipantRecord): EventParticipant {
|
|
48
|
+
return {
|
|
49
|
+
eventParticipantID: originalObject.Event_Participant_ID,
|
|
50
|
+
eventID: originalObject.Event_ID,
|
|
51
|
+
participantID: originalObject.Participant_ID,
|
|
52
|
+
participationStatusID: originalObject.Participation_Status_ID,
|
|
53
|
+
timeIn: originalObject.Time_In,
|
|
54
|
+
timeConfirmed: originalObject.Time_Confirmed,
|
|
55
|
+
timeOut: originalObject.Time_Out,
|
|
56
|
+
notes: originalObject.Notes,
|
|
57
|
+
groupParticipantID: originalObject.Group_Participant_ID,
|
|
58
|
+
checkInStation: originalObject.Check_in_Station,
|
|
59
|
+
setupDate: originalObject._Setup_Date,
|
|
60
|
+
groupID: originalObject.Group_ID,
|
|
61
|
+
roomID: originalObject.Room_ID,
|
|
62
|
+
callParents: originalObject.Call_Parents,
|
|
63
|
+
groupRoleID: originalObject.Group_Role_ID,
|
|
64
|
+
responseID: originalObject.Response_ID,
|
|
65
|
+
registrantMessageSent: originalObject.Registrant_Message_Sent,
|
|
66
|
+
attendeeMessageSent: originalObject.Attendee_Message_Sent,
|
|
67
|
+
attendingOnline: originalObject.Attending_Online,
|
|
68
|
+
rsvpStatusID: originalObject.RSVP_Status_ID,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function mapEventParticipantToEventParticipantRecord(eventParticipant: EventParticipant): EventParticipantRecord {
|
|
73
|
+
return {
|
|
74
|
+
Event_Participant_ID: eventParticipant.eventParticipantID,
|
|
75
|
+
Event_ID: eventParticipant.eventID,
|
|
76
|
+
Participant_ID: eventParticipant.participantID,
|
|
77
|
+
Participation_Status_ID: eventParticipant.participationStatusID,
|
|
78
|
+
Time_In: eventParticipant.timeIn,
|
|
79
|
+
Time_Confirmed: eventParticipant.timeConfirmed,
|
|
80
|
+
Time_Out: eventParticipant.timeOut,
|
|
81
|
+
Notes: eventParticipant.notes,
|
|
82
|
+
Group_Participant_ID: eventParticipant.groupParticipantID,
|
|
83
|
+
Check_in_Station: eventParticipant.checkInStation,
|
|
84
|
+
_Setup_Date: eventParticipant.setupDate,
|
|
85
|
+
Group_ID: eventParticipant.groupID,
|
|
86
|
+
Room_ID: eventParticipant.roomID,
|
|
87
|
+
Call_Parents: eventParticipant.callParents,
|
|
88
|
+
Group_Role_ID: eventParticipant.groupRoleID,
|
|
89
|
+
Response_ID: eventParticipant.responseID,
|
|
90
|
+
Registrant_Message_Sent: eventParticipant.registrantMessageSent,
|
|
91
|
+
Attendee_Message_Sent: eventParticipant.attendeeMessageSent,
|
|
92
|
+
Attending_Online: eventParticipant.attendingOnline,
|
|
93
|
+
RSVP_Status_ID: eventParticipant.rsvpStatusID,
|
|
94
|
+
};
|
|
95
|
+
}
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
export type EventRecord = {
|
|
2
|
+
Event_ID: number;
|
|
3
|
+
Event_Title: string;
|
|
4
|
+
Event_Type_ID: number;
|
|
5
|
+
Congregation_ID: number;
|
|
6
|
+
Location_ID: null | number;
|
|
7
|
+
Meeting_Instructions: null | string;
|
|
8
|
+
Description: null | string;
|
|
9
|
+
Program_ID: number;
|
|
10
|
+
Primary_Contact: number;
|
|
11
|
+
Participants_Expected: null | number;
|
|
12
|
+
Minutes_for_Setup: number;
|
|
13
|
+
Event_Start_Date: string;
|
|
14
|
+
Event_End_Date: string;
|
|
15
|
+
Minutes_for_Cleanup: number;
|
|
16
|
+
Cancelled: boolean;
|
|
17
|
+
_Approved: boolean;
|
|
18
|
+
Public_Website_Settings: null | string;
|
|
19
|
+
Visibility_Level_ID: number;
|
|
20
|
+
Featured_On_Calendar: boolean;
|
|
21
|
+
Online_Registration_Product: null | string;
|
|
22
|
+
Registration_Form: null | string;
|
|
23
|
+
Registration_Start: string;
|
|
24
|
+
Registration_End: string;
|
|
25
|
+
Registration_Active: boolean;
|
|
26
|
+
Register_Into_Series: boolean;
|
|
27
|
+
External_Registration_URL: null | string;
|
|
28
|
+
_Web_Approved: boolean;
|
|
29
|
+
Force_Login: boolean;
|
|
30
|
+
Check_in_Information: null | string;
|
|
31
|
+
Allow_Check_in: boolean;
|
|
32
|
+
Ignore_Program_Groups: boolean;
|
|
33
|
+
Prohibit_Guests: boolean;
|
|
34
|
+
Search_Results: number;
|
|
35
|
+
Early_Check_in_Period: null | string;
|
|
36
|
+
Late_Check_in_Period: null | string;
|
|
37
|
+
Notification_Settings: null | string;
|
|
38
|
+
Registrant_Message: null | string;
|
|
39
|
+
Days_Out_to_Remind: null | number;
|
|
40
|
+
Optional_Reminder_Message: null | string;
|
|
41
|
+
Attendee_Message: null | string;
|
|
42
|
+
Send_To_Heads: boolean;
|
|
43
|
+
Other_Event_Information: null | string;
|
|
44
|
+
Parent_Event_ID: null | number;
|
|
45
|
+
Priority_ID: null | number;
|
|
46
|
+
On_Connection_Card: boolean;
|
|
47
|
+
Accounting_Information: null | string;
|
|
48
|
+
On_Donation_Batch_Tool: boolean;
|
|
49
|
+
Project_Code: null | string;
|
|
50
|
+
Online_Meeting_Link: null | string;
|
|
51
|
+
Read_More_URL: null | string;
|
|
52
|
+
Allow_Self_Checkin: boolean;
|
|
53
|
+
Minor_Registration: boolean;
|
|
54
|
+
Allow_Email: boolean;
|
|
55
|
+
Show_Building_Room_Info: boolean;
|
|
56
|
+
Convert_Default_Contacts: boolean;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export type Event = {
|
|
60
|
+
eventID: number;
|
|
61
|
+
eventTitle: string;
|
|
62
|
+
eventTypeID: number;
|
|
63
|
+
congregationID: number;
|
|
64
|
+
locationID: null | number;
|
|
65
|
+
meetingInstructions: null | string;
|
|
66
|
+
description: null | string;
|
|
67
|
+
programID: number;
|
|
68
|
+
primaryContact: number;
|
|
69
|
+
participantsExpected: null | number;
|
|
70
|
+
minutesForSetup: number;
|
|
71
|
+
eventStartDate: string;
|
|
72
|
+
eventEndDate: string;
|
|
73
|
+
minutesForCleanup: number;
|
|
74
|
+
cancelled: boolean;
|
|
75
|
+
approved: boolean;
|
|
76
|
+
publicWebsiteSettings: null | string;
|
|
77
|
+
visibilityLevelID: number;
|
|
78
|
+
featuredOnCalendar: boolean;
|
|
79
|
+
onlineRegistrationProduct: null | string;
|
|
80
|
+
registrationForm: null | string;
|
|
81
|
+
registrationStart: string;
|
|
82
|
+
registrationEnd: string;
|
|
83
|
+
registrationActive: boolean;
|
|
84
|
+
registerIntoSeries: boolean;
|
|
85
|
+
externalRegistrationURL: null | string;
|
|
86
|
+
webApproved: boolean;
|
|
87
|
+
forceLogin: boolean;
|
|
88
|
+
checkInInformation: null | string;
|
|
89
|
+
allowCheckin: boolean;
|
|
90
|
+
ignoreProgramGroups: boolean;
|
|
91
|
+
prohibitGuests: boolean;
|
|
92
|
+
searchResults: number;
|
|
93
|
+
earlyCheckinPeriod: null | string;
|
|
94
|
+
lateCheckinPeriod: null | string;
|
|
95
|
+
notificationSettings: null | string;
|
|
96
|
+
registrantMessage: null | string;
|
|
97
|
+
daysOutToRemind: null | number;
|
|
98
|
+
optionalReminderMessage: null | string;
|
|
99
|
+
attendeeMessage: null | string;
|
|
100
|
+
sendToHeads: boolean;
|
|
101
|
+
otherEventInformation: null | string;
|
|
102
|
+
parentEventID: null | number;
|
|
103
|
+
priorityID: null | number;
|
|
104
|
+
onConnectionCard: boolean;
|
|
105
|
+
accountingInformation: null | string;
|
|
106
|
+
onDonationBatchTool: boolean;
|
|
107
|
+
projectCode: null | string;
|
|
108
|
+
onlineMeetingLink: null | string;
|
|
109
|
+
readMoreURL: null | string;
|
|
110
|
+
allowSelfCheckin: boolean;
|
|
111
|
+
minorRegistration: boolean;
|
|
112
|
+
allowEmail: boolean;
|
|
113
|
+
showBuildingRoomInfo: boolean;
|
|
114
|
+
convertDefaultContacts: boolean;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export function mapEventRecord(originalObject: EventRecord): Event {
|
|
118
|
+
return {
|
|
119
|
+
eventID: originalObject.Event_ID,
|
|
120
|
+
eventTitle: originalObject.Event_Title,
|
|
121
|
+
eventTypeID: originalObject.Event_Type_ID,
|
|
122
|
+
congregationID: originalObject.Congregation_ID,
|
|
123
|
+
locationID: originalObject.Location_ID,
|
|
124
|
+
meetingInstructions: originalObject.Meeting_Instructions,
|
|
125
|
+
description: originalObject.Description,
|
|
126
|
+
programID: originalObject.Program_ID,
|
|
127
|
+
primaryContact: originalObject.Primary_Contact,
|
|
128
|
+
participantsExpected: originalObject.Participants_Expected,
|
|
129
|
+
minutesForSetup: originalObject.Minutes_for_Setup,
|
|
130
|
+
eventStartDate: originalObject.Event_Start_Date,
|
|
131
|
+
eventEndDate: originalObject.Event_End_Date,
|
|
132
|
+
minutesForCleanup: originalObject.Minutes_for_Cleanup,
|
|
133
|
+
cancelled: originalObject.Cancelled,
|
|
134
|
+
approved: originalObject._Approved,
|
|
135
|
+
publicWebsiteSettings: originalObject.Public_Website_Settings,
|
|
136
|
+
visibilityLevelID: originalObject.Visibility_Level_ID,
|
|
137
|
+
featuredOnCalendar: originalObject.Featured_On_Calendar,
|
|
138
|
+
onlineRegistrationProduct: originalObject.Online_Registration_Product,
|
|
139
|
+
registrationForm: originalObject.Registration_Form,
|
|
140
|
+
registrationStart: originalObject.Registration_Start,
|
|
141
|
+
registrationEnd: originalObject.Registration_End,
|
|
142
|
+
registrationActive: originalObject.Registration_Active,
|
|
143
|
+
registerIntoSeries: originalObject.Register_Into_Series,
|
|
144
|
+
externalRegistrationURL: originalObject.External_Registration_URL,
|
|
145
|
+
webApproved: originalObject._Web_Approved,
|
|
146
|
+
forceLogin: originalObject.Force_Login,
|
|
147
|
+
checkInInformation: originalObject.Check_in_Information,
|
|
148
|
+
allowCheckin: originalObject.Allow_Check_in,
|
|
149
|
+
ignoreProgramGroups: originalObject.Ignore_Program_Groups,
|
|
150
|
+
prohibitGuests: originalObject.Prohibit_Guests,
|
|
151
|
+
searchResults: originalObject.Search_Results,
|
|
152
|
+
earlyCheckinPeriod: originalObject.Early_Check_in_Period,
|
|
153
|
+
lateCheckinPeriod: originalObject.Late_Check_in_Period,
|
|
154
|
+
notificationSettings: originalObject.Notification_Settings,
|
|
155
|
+
registrantMessage: originalObject.Registrant_Message,
|
|
156
|
+
daysOutToRemind: originalObject.Days_Out_to_Remind,
|
|
157
|
+
optionalReminderMessage: originalObject.Optional_Reminder_Message,
|
|
158
|
+
attendeeMessage: originalObject.Attendee_Message,
|
|
159
|
+
sendToHeads: originalObject.Send_To_Heads,
|
|
160
|
+
otherEventInformation: originalObject.Other_Event_Information,
|
|
161
|
+
parentEventID: originalObject.Parent_Event_ID,
|
|
162
|
+
priorityID: originalObject.Priority_ID,
|
|
163
|
+
onConnectionCard: originalObject.On_Connection_Card,
|
|
164
|
+
accountingInformation: originalObject.Accounting_Information,
|
|
165
|
+
onDonationBatchTool: originalObject.On_Donation_Batch_Tool,
|
|
166
|
+
projectCode: originalObject.Project_Code,
|
|
167
|
+
onlineMeetingLink: originalObject.Online_Meeting_Link,
|
|
168
|
+
readMoreURL: originalObject.Read_More_URL,
|
|
169
|
+
allowSelfCheckin: originalObject.Allow_Self_Checkin,
|
|
170
|
+
minorRegistration: originalObject.Minor_Registration,
|
|
171
|
+
allowEmail: originalObject.Allow_Email,
|
|
172
|
+
showBuildingRoomInfo: originalObject.Show_Building_Room_Info,
|
|
173
|
+
convertDefaultContacts: originalObject.Convert_Default_Contacts,
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export function mapEventToEventRecord(event: Event): EventRecord {
|
|
178
|
+
return {
|
|
179
|
+
Event_ID: event.eventID,
|
|
180
|
+
Event_Title: event.eventTitle,
|
|
181
|
+
Event_Type_ID: event.eventTypeID,
|
|
182
|
+
Congregation_ID: event.congregationID,
|
|
183
|
+
Location_ID: event.locationID,
|
|
184
|
+
Meeting_Instructions: event.meetingInstructions,
|
|
185
|
+
Description: event.description,
|
|
186
|
+
Program_ID: event.programID,
|
|
187
|
+
Primary_Contact: event.primaryContact,
|
|
188
|
+
Participants_Expected: event.participantsExpected,
|
|
189
|
+
Minutes_for_Setup: event.minutesForSetup,
|
|
190
|
+
Event_Start_Date: event.eventStartDate,
|
|
191
|
+
Event_End_Date: event.eventEndDate,
|
|
192
|
+
Minutes_for_Cleanup: event.minutesForCleanup,
|
|
193
|
+
Cancelled: event.cancelled,
|
|
194
|
+
_Approved: event.approved,
|
|
195
|
+
Public_Website_Settings: event.publicWebsiteSettings,
|
|
196
|
+
Visibility_Level_ID: event.visibilityLevelID,
|
|
197
|
+
Featured_On_Calendar: event.featuredOnCalendar,
|
|
198
|
+
Online_Registration_Product: event.onlineRegistrationProduct,
|
|
199
|
+
Registration_Form: event.registrationForm,
|
|
200
|
+
Registration_Start: event.registrationStart,
|
|
201
|
+
Registration_End: event.registrationEnd,
|
|
202
|
+
Registration_Active: event.registrationActive,
|
|
203
|
+
Register_Into_Series: event.registerIntoSeries,
|
|
204
|
+
External_Registration_URL: event.externalRegistrationURL,
|
|
205
|
+
_Web_Approved: event.webApproved,
|
|
206
|
+
Force_Login: event.forceLogin,
|
|
207
|
+
Check_in_Information: event.checkInInformation,
|
|
208
|
+
Allow_Check_in: event.allowCheckin,
|
|
209
|
+
Ignore_Program_Groups: event.ignoreProgramGroups,
|
|
210
|
+
Prohibit_Guests: event.prohibitGuests,
|
|
211
|
+
Search_Results: event.searchResults,
|
|
212
|
+
Early_Check_in_Period: event.earlyCheckinPeriod,
|
|
213
|
+
Late_Check_in_Period: event.lateCheckinPeriod,
|
|
214
|
+
Notification_Settings: event.notificationSettings,
|
|
215
|
+
Registrant_Message: event.registrantMessage,
|
|
216
|
+
Days_Out_to_Remind: event.daysOutToRemind,
|
|
217
|
+
Optional_Reminder_Message: event.optionalReminderMessage,
|
|
218
|
+
Attendee_Message: event.attendeeMessage,
|
|
219
|
+
Send_To_Heads: event.sendToHeads,
|
|
220
|
+
Other_Event_Information: event.otherEventInformation,
|
|
221
|
+
Parent_Event_ID: event.parentEventID,
|
|
222
|
+
Priority_ID: event.priorityID,
|
|
223
|
+
On_Connection_Card: event.onConnectionCard,
|
|
224
|
+
Accounting_Information: event.accountingInformation,
|
|
225
|
+
On_Donation_Batch_Tool: event.onDonationBatchTool,
|
|
226
|
+
Project_Code: event.projectCode,
|
|
227
|
+
Online_Meeting_Link: event.onlineMeetingLink,
|
|
228
|
+
Read_More_URL: event.readMoreURL,
|
|
229
|
+
Allow_Self_Checkin: event.allowSelfCheckin,
|
|
230
|
+
Minor_Registration: event.minorRegistration,
|
|
231
|
+
Allow_Email: event.allowEmail,
|
|
232
|
+
Show_Building_Room_Info: event.showBuildingRoomInfo,
|
|
233
|
+
Convert_Default_Contacts: event.convertDefaultContacts,
|
|
234
|
+
};
|
|
235
|
+
}
|