mp-js-api 0.0.26 → 0.0.29
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/.gitattributes +2 -2
- package/dist/api.d.ts +44 -22
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +75 -75
- package/dist/index.d.ts +65 -52
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +109 -91
- package/dist/tables/addresses.d.ts.map +1 -1
- package/dist/tables/contacts.d.ts +6 -0
- package/dist/tables/contacts.d.ts.map +1 -1
- package/dist/tables/files.d.ts +17 -0
- package/dist/tables/files.d.ts.map +1 -0
- package/dist/tables/files.js +2 -0
- package/dist/tables/form-responses.d.ts +1 -1
- package/dist/tables/groups.d.ts.map +1 -1
- package/dist/tables/households.d.ts.map +1 -1
- package/dist/tables/participants.d.ts.map +1 -1
- package/dist/utils/converters.d.ts +2 -2
- package/dist/utils/converters.d.ts.map +1 -1
- package/package.json +3 -2
- package/src/api.ts +135 -116
- package/src/index.ts +233 -195
- package/src/tables/addresses.ts +48 -48
- package/src/tables/contacts.ts +8 -0
- package/src/tables/files.ts +16 -0
- package/src/tables/form-responses.ts +1 -1
- package/src/tables/groups.ts +96 -96
- package/src/tables/households.ts +48 -48
- package/src/tables/participants.ts +56 -56
- package/src/utils/converters.ts +2 -2
- package/tsconfig.json +4 -3
package/src/tables/addresses.ts
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
1
|
export interface AddressRecord {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
2
|
+
Address_ID: number;
|
|
3
|
+
Address_Line_1: string;
|
|
4
|
+
Address_Line_2: string;
|
|
5
|
+
City: string;
|
|
6
|
+
'State/Region': string;
|
|
7
|
+
Postal_Code: string;
|
|
8
|
+
Foreign_Country: null | string;
|
|
9
|
+
Country_Code: string;
|
|
10
|
+
Carrier_Route: null | string;
|
|
11
|
+
Lot_Number: null | string;
|
|
12
|
+
Delivery_Point_Code: null | string;
|
|
13
|
+
Delivery_Point_Check_Digit: null | string;
|
|
14
|
+
Latitude: null | number;
|
|
15
|
+
Longitude: null | number;
|
|
16
|
+
Altitude: null | number;
|
|
17
|
+
Time_Zone: null | string;
|
|
18
|
+
Bar_Code: null | string;
|
|
19
|
+
Area_Code: null | string;
|
|
20
|
+
Last_Validation_Attempt: null | string;
|
|
21
|
+
County: string;
|
|
22
|
+
Validated: null | string;
|
|
23
|
+
Do_Not_Validate: boolean;
|
|
24
|
+
Last_GeoCode_Attempt: null | string;
|
|
25
|
+
Country: null | string;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
export interface Address {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
29
|
+
addressID: number;
|
|
30
|
+
addressLine1: string;
|
|
31
|
+
addressLine2: string;
|
|
32
|
+
city: string;
|
|
33
|
+
'state/Region': string;
|
|
34
|
+
postalCode: string;
|
|
35
|
+
foreignCountry: null | string;
|
|
36
|
+
countryCode: string;
|
|
37
|
+
carrierRoute: null | string;
|
|
38
|
+
lotNumber: null | string;
|
|
39
|
+
deliveryPointCode: null | string;
|
|
40
|
+
deliveryPointCheckDigit: null | string;
|
|
41
|
+
latitude: null | number;
|
|
42
|
+
longitude: null | number;
|
|
43
|
+
altitude: null | number;
|
|
44
|
+
timeZone: null | string;
|
|
45
|
+
barCode: null | string;
|
|
46
|
+
areaCode: null | string;
|
|
47
|
+
lastValidationAttempt: null | string;
|
|
48
|
+
county: string;
|
|
49
|
+
validated: null | string;
|
|
50
|
+
doNotValidate: boolean;
|
|
51
|
+
lastGeoCodeAttempt: null | string;
|
|
52
|
+
country: null | string;
|
|
53
53
|
}
|
package/src/tables/contacts.ts
CHANGED
|
@@ -51,6 +51,10 @@ export interface ContactRecord {
|
|
|
51
51
|
Current_School: unknown | null;
|
|
52
52
|
Other_Information: unknown | null;
|
|
53
53
|
Communication_Preferences: unknown | null;
|
|
54
|
+
|
|
55
|
+
Ministry_Safe_ID: number | null;
|
|
56
|
+
Populi_ID: number | null;
|
|
57
|
+
Planning_Center_ID: number | null;
|
|
54
58
|
}
|
|
55
59
|
|
|
56
60
|
export interface Contact {
|
|
@@ -104,4 +108,8 @@ export interface Contact {
|
|
|
104
108
|
currentSchool: unknown | null;
|
|
105
109
|
otherInformation: unknown | null;
|
|
106
110
|
communicationPreferences: unknown | null;
|
|
111
|
+
|
|
112
|
+
ministrySafeID: number | null;
|
|
113
|
+
populiID: number | null;
|
|
114
|
+
planningCenterID: number | null;
|
|
107
115
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface AttachedFile {
|
|
2
|
+
FileId: number;
|
|
3
|
+
FileName: string;
|
|
4
|
+
FileExtension: string;
|
|
5
|
+
Description: null;
|
|
6
|
+
FileSize: number;
|
|
7
|
+
ImageHeight: number;
|
|
8
|
+
ImageWidth: number;
|
|
9
|
+
IsImage: boolean;
|
|
10
|
+
IsDefaultImage: boolean;
|
|
11
|
+
TableName: string;
|
|
12
|
+
RecordId: number;
|
|
13
|
+
UniqueFileId: string;
|
|
14
|
+
LastUpdated: string;
|
|
15
|
+
InclusionType: string;
|
|
16
|
+
}
|
package/src/tables/groups.ts
CHANGED
|
@@ -1,101 +1,101 @@
|
|
|
1
1
|
export interface GroupRecord {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
|
|
2
|
+
Group_ID: number;
|
|
3
|
+
Group_Name: string;
|
|
4
|
+
Group_Type_ID: number;
|
|
5
|
+
Ministry_ID: number;
|
|
6
|
+
Congregation_ID: number;
|
|
7
|
+
Primary_Contact: number;
|
|
8
|
+
Description: null | string;
|
|
9
|
+
Start_Date: string;
|
|
10
|
+
End_Date: string;
|
|
11
|
+
Target_Size: null | number;
|
|
12
|
+
Parent_Group: null | number;
|
|
13
|
+
Priority_ID: null | number;
|
|
14
|
+
Small_Group_Information: null | string;
|
|
15
|
+
Offsite_Meeting_Address: null | string;
|
|
16
|
+
Group_Is_Full: boolean;
|
|
17
|
+
Available_Online: boolean;
|
|
18
|
+
Meets_Online: boolean;
|
|
19
|
+
Life_Stage_ID: null | number;
|
|
20
|
+
Group_Focus_ID: number;
|
|
21
|
+
Meeting_Time: null | string;
|
|
22
|
+
Meeting_Day_ID: null | number;
|
|
23
|
+
Meeting_Frequency_ID: null | number;
|
|
24
|
+
Meeting_Duration_ID: null | number;
|
|
25
|
+
Required_Book: null | string;
|
|
26
|
+
Descended_From: null | number;
|
|
27
|
+
Reason_Ended: null | string;
|
|
28
|
+
_Last_Attendance_Posted: null | string;
|
|
29
|
+
_Last_Group_Member_Changed: string;
|
|
30
|
+
Check_in_Information: null | string;
|
|
31
|
+
'Secure_Check-in': boolean;
|
|
32
|
+
Suppress_Nametag: boolean;
|
|
33
|
+
Suppress_Care_Note: boolean;
|
|
34
|
+
On_Classroom_Manager: boolean;
|
|
35
|
+
Promotion_Information: null | string;
|
|
36
|
+
Promote_to_Group: null | string;
|
|
37
|
+
Age_in_Months_to_Promote: null | number;
|
|
38
|
+
Promote_Weekly: boolean;
|
|
39
|
+
Promotion_Date: null | string;
|
|
40
|
+
Promote_Participants_Only: boolean;
|
|
41
|
+
Notifications: null | string;
|
|
42
|
+
Send_Attendance_Notification: boolean;
|
|
43
|
+
Send_Service_Notification: boolean;
|
|
44
|
+
Enable_Discussion: boolean;
|
|
45
|
+
SMS_Number: null | string;
|
|
46
|
+
Default_Meeting_Room: null | string;
|
|
47
|
+
Create_Next_Meeting: boolean;
|
|
48
|
+
Next_Scheduled_Meeting: null | string;
|
|
49
|
+
Available_On_App: null | string;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
export interface Group {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
53
|
+
groupID: number;
|
|
54
|
+
groupName: string;
|
|
55
|
+
groupTypeID: number;
|
|
56
|
+
ministryID: number;
|
|
57
|
+
congregationID: number;
|
|
58
|
+
primaryContact: number;
|
|
59
|
+
description: null | string;
|
|
60
|
+
startDate: string;
|
|
61
|
+
endDate: string;
|
|
62
|
+
targetSize: null | number;
|
|
63
|
+
parentGroup: null | number;
|
|
64
|
+
priorityID: null | number;
|
|
65
|
+
smallGroupInformation: null | string;
|
|
66
|
+
offsiteMeetingAddress: null | string;
|
|
67
|
+
groupIsFull: boolean;
|
|
68
|
+
availableOnline: boolean;
|
|
69
|
+
meetsOnline: boolean;
|
|
70
|
+
lifeStageID: null | number;
|
|
71
|
+
groupFocusID: number;
|
|
72
|
+
meetingTime: null | string;
|
|
73
|
+
meetingDayID: null | number;
|
|
74
|
+
meetingFrequencyID: null | number;
|
|
75
|
+
meetingDurationID: null | number;
|
|
76
|
+
requiredBook: null | string;
|
|
77
|
+
descendedFrom: null | number;
|
|
78
|
+
reasonEnded: null | string;
|
|
79
|
+
readonly _lastAttendancePosted: null | string;
|
|
80
|
+
readonly _lastGroupMemberChanged: string;
|
|
81
|
+
checkInInformation: null | string;
|
|
82
|
+
secureCheckIn: boolean;
|
|
83
|
+
suppressNametag: boolean;
|
|
84
|
+
suppressCareNote: boolean;
|
|
85
|
+
onClassroomManager: boolean;
|
|
86
|
+
promotionInformation: null | string;
|
|
87
|
+
promoteToGroup: null | string;
|
|
88
|
+
ageInMonthsToPromote: null | number;
|
|
89
|
+
promoteWeekly: boolean;
|
|
90
|
+
promotionDate: null | string;
|
|
91
|
+
promoteParticipantsOnly: boolean;
|
|
92
|
+
notifications: null | string;
|
|
93
|
+
sendAttendanceNotification: boolean;
|
|
94
|
+
sendServiceNotification: boolean;
|
|
95
|
+
enableDiscussion: boolean;
|
|
96
|
+
smsNumber: null | string;
|
|
97
|
+
defaultMeetingRoom: null | string;
|
|
98
|
+
createNextMeeting: boolean;
|
|
99
|
+
nextScheduledMeeting: null | string;
|
|
100
|
+
availableOnApp: null | string;
|
|
101
101
|
}
|
package/src/tables/households.ts
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
1
|
export interface HouseholdRecord {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
2
|
+
Household_ID: number;
|
|
3
|
+
Household_Name: string;
|
|
4
|
+
Address_ID: number;
|
|
5
|
+
Home_Phone: null | string;
|
|
6
|
+
Congregation_ID: number;
|
|
7
|
+
Care_Person: null | string;
|
|
8
|
+
Household_Source_ID: number;
|
|
9
|
+
Family_Call_Number: number;
|
|
10
|
+
Household_Preferences: null | string;
|
|
11
|
+
Home_Phone_Unlisted: boolean;
|
|
12
|
+
Home_Address_Unlisted: boolean;
|
|
13
|
+
Bulk_Mail_Opt_Out: boolean;
|
|
14
|
+
_First_Donation: null | string;
|
|
15
|
+
_Last_Donation: null | string;
|
|
16
|
+
_Last_Activity: string;
|
|
17
|
+
Seasonal_Alternate_Address_Settings: null | string;
|
|
18
|
+
Alternate_Mailing_Address: null | string;
|
|
19
|
+
Season_Start: null | string;
|
|
20
|
+
Season_End: null | string;
|
|
21
|
+
Repeats_Annually: boolean;
|
|
22
|
+
End_Seasonal_Alternate_Address_Settings: null | string;
|
|
23
|
+
Congregation_Drive_Time: null | string;
|
|
24
|
+
Driving_Distance: null | string;
|
|
25
|
+
Driving_Time: null | string;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
export interface Household {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
29
|
+
householdID: number;
|
|
30
|
+
householdName: string;
|
|
31
|
+
addressID: number;
|
|
32
|
+
homePhone: null | string;
|
|
33
|
+
congregationID: number;
|
|
34
|
+
carePerson: null | string;
|
|
35
|
+
householdSourceID: number;
|
|
36
|
+
familyCallNumber: number;
|
|
37
|
+
householdPreferences: null | string;
|
|
38
|
+
homePhoneUnlisted: boolean;
|
|
39
|
+
homeAddressUnlisted: boolean;
|
|
40
|
+
bulkMailOptOut: boolean;
|
|
41
|
+
readonly _firstDonation: null | string;
|
|
42
|
+
readonly _lastDonation: null | string;
|
|
43
|
+
readonly _lastActivity: string;
|
|
44
|
+
seasonalAlternateAddressSettings: null | string;
|
|
45
|
+
alternateMailingAddress: null | string;
|
|
46
|
+
seasonStart: null | string;
|
|
47
|
+
seasonEnd: null | string;
|
|
48
|
+
repeatsAnnually: boolean;
|
|
49
|
+
endSeasonalAlternateAddressSettings: null | string;
|
|
50
|
+
congregationDriveTime: null | string;
|
|
51
|
+
drivingDistance: null | string;
|
|
52
|
+
drivingTime: null | string;
|
|
53
53
|
}
|
|
@@ -1,61 +1,61 @@
|
|
|
1
1
|
export interface ParticipantRecord {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
2
|
+
Participant_ID: number;
|
|
3
|
+
Red_Flag_Notes: null | string;
|
|
4
|
+
Contact_ID: number;
|
|
5
|
+
Participant_Type_ID: number;
|
|
6
|
+
Member_Status_ID: null | number;
|
|
7
|
+
Participant_Engagement_ID: number;
|
|
8
|
+
Participant_Start_Date: string;
|
|
9
|
+
Participant_End_Date: null | string;
|
|
10
|
+
Notes: string;
|
|
11
|
+
_First_Attendance_Ever: null | string;
|
|
12
|
+
_Second_Attendance_Ever: null | string;
|
|
13
|
+
_Third_Attendance_Ever: null | string;
|
|
14
|
+
_Last_Attendance_Ever: null | string;
|
|
15
|
+
SubStatus_Name: null | string;
|
|
16
|
+
Status_Date: null | string;
|
|
17
|
+
Former_Denomination: null | string;
|
|
18
|
+
Former_Church: null | string;
|
|
19
|
+
_Background_Check_Information: null | string;
|
|
20
|
+
_Background_Check_Type: null | string;
|
|
21
|
+
_Background_Check_Status: null | string;
|
|
22
|
+
_Background_Check_Date: null | string;
|
|
23
|
+
Sacrament_Information: null | string;
|
|
24
|
+
Church_of_Record: null | string;
|
|
25
|
+
Baptism_Parish_Name: null | string;
|
|
26
|
+
Baptism_Parish_Address: null | string;
|
|
27
|
+
Birth_Certificate_Address: null | string;
|
|
28
|
+
Birth_Certificate_City: null | string;
|
|
29
|
+
Birth_Certificate_State: null | string;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
export interface Participant {
|
|
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
|
-
|
|
33
|
+
participantID: number;
|
|
34
|
+
redFlagNotes: null | string;
|
|
35
|
+
contactID: number;
|
|
36
|
+
participantTypeID: number;
|
|
37
|
+
memberStatusID: null | number;
|
|
38
|
+
participantEngagementID: number;
|
|
39
|
+
participantStartDate: string;
|
|
40
|
+
participantEndDate: null | string;
|
|
41
|
+
notes: string;
|
|
42
|
+
readonly _firstAttendanceEver: null | string;
|
|
43
|
+
readonly _secondAttendanceEver: null | string;
|
|
44
|
+
readonly _thirdAttendanceEver: null | string;
|
|
45
|
+
readonly _lastAttendanceEver: null | string;
|
|
46
|
+
subStatusName: null | string;
|
|
47
|
+
statusDate: null | string;
|
|
48
|
+
formerDenomination: null | string;
|
|
49
|
+
formerChurch: null | string;
|
|
50
|
+
readonly _backgroundCheckInformation: null | string;
|
|
51
|
+
readonly _backgroundCheckType: null | string;
|
|
52
|
+
readonly _backgroundCheckStatus: null | string;
|
|
53
|
+
readonly _backgroundCheckDate: null | string;
|
|
54
|
+
sacramentInformation: null | string;
|
|
55
|
+
churchOfRecord: null | string;
|
|
56
|
+
baptismParishName: null | string;
|
|
57
|
+
baptismParishAddress: null | string;
|
|
58
|
+
birthCertificateAddress: null | string;
|
|
59
|
+
birthCertificateCity: null | string;
|
|
60
|
+
birthCertificateState: null | string;
|
|
61
61
|
}
|
package/src/utils/converters.ts
CHANGED
|
@@ -107,10 +107,10 @@ export function caseConverter<T>(obj: T, { type, capitalIds = false }: { type: '
|
|
|
107
107
|
return obj; // Return value if it's neither an array nor an object
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
export function convertToCamelCase<T = any,
|
|
110
|
+
export function convertToCamelCase<T extends Record<string, any> = Record<string, any>, D extends Record<string, any> = Record<string, any>>(obj: Partial<D>, capitalIds = true): T {
|
|
111
111
|
return caseConverter(obj, { type: 'toCamel', capitalIds });
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
export function convertToSnakeCase<T = any,
|
|
114
|
+
export function convertToSnakeCase<T extends Record<string, any> = Record<string, any>, D extends Record<string, any> = Record<string, any>>(obj: Partial<D>, capitalIds = true): T {
|
|
115
115
|
return caseConverter(obj, { type: 'toSnake', capitalIds });
|
|
116
116
|
}
|
package/tsconfig.json
CHANGED
|
@@ -2,15 +2,16 @@
|
|
|
2
2
|
// Change this to match your project
|
|
3
3
|
"include": ["src/**/*"],
|
|
4
4
|
"compilerOptions": {
|
|
5
|
-
"lib": ["
|
|
6
|
-
"module": "
|
|
7
|
-
"target": "
|
|
5
|
+
"lib": ["ESNext"],
|
|
6
|
+
"module": "node18",
|
|
7
|
+
"target": "ESNext",
|
|
8
8
|
"strictNullChecks": true,
|
|
9
9
|
// Tells TypeScript to read JS files, as
|
|
10
10
|
// normally they are ignored as source files
|
|
11
11
|
"allowJs": true,
|
|
12
12
|
// Generate d.ts files
|
|
13
13
|
"declaration": true,
|
|
14
|
+
"esModuleInterop": true,
|
|
14
15
|
// This compiler run should
|
|
15
16
|
// only output d.ts files
|
|
16
17
|
// "emitDeclarationOnly": true,
|