mp-js-api 0.0.28 → 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/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/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/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/contacts.ts +8 -0
- package/src/tables/files.ts +16 -0
- package/src/utils/converters.ts +2 -2
- package/tsconfig.json +4 -3
package/dist/index.js
CHANGED
|
@@ -8,143 +8,161 @@ Object.defineProperty(exports, "convertToSnakeCase", { enumerable: true, get: fu
|
|
|
8
8
|
Object.defineProperty(exports, "escapeSql", { enumerable: true, get: function () { return converters_1.escapeSql; } });
|
|
9
9
|
Object.defineProperty(exports, "stringifyURLParams", { enumerable: true, get: function () { return converters_1.stringifyURLParams; } });
|
|
10
10
|
const createMPInstance = ({ auth }) => {
|
|
11
|
-
const { getOne, getMany, createOne, createMany,
|
|
11
|
+
const { getOne, getMany, createOne, createMany, updateMany, createFile, updateFile, get, post, put } = (0, api_1.createApiBase)({ auth });
|
|
12
12
|
return {
|
|
13
|
+
get,
|
|
14
|
+
post,
|
|
15
|
+
put,
|
|
13
16
|
getOne,
|
|
14
17
|
getMany,
|
|
15
18
|
createOne,
|
|
16
19
|
createMany,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
updateMany,
|
|
21
|
+
createFile,
|
|
22
|
+
updateFile,
|
|
23
|
+
async getContact(id, mpQuery = {}) {
|
|
24
|
+
return getOne({ path: `/tables/contacts`, id, mpQuery });
|
|
25
|
+
},
|
|
26
|
+
async getContactDetails(id, mpQuery) {
|
|
27
|
+
return getOne({
|
|
28
|
+
path: `/tables/contacts`, id,
|
|
29
|
+
mpQuery: {
|
|
30
|
+
...mpQuery,
|
|
31
|
+
select: 'Contacts.*, Participant_Record_Table.*, Household_ID_Table.*, Gender_ID_Table.Gender, Participant_Record_Table_Member_Status_ID_Table.Member_Status, Participant_Record_Table_Participant_Type_ID_Table.Participant_Type, Marital_Status_ID_Table.Marital_Status, dp_fileUniqueId as Image_ID'
|
|
32
|
+
}
|
|
28
33
|
});
|
|
29
34
|
},
|
|
30
|
-
async getContactAttribute(id,
|
|
31
|
-
return getOne({ path: `/tables/contact_attributes`, id,
|
|
35
|
+
async getContactAttribute(id, mpQuery = {}) {
|
|
36
|
+
return getOne({ path: `/tables/contact_attributes`, id, mpQuery });
|
|
32
37
|
},
|
|
33
|
-
async getContactEmailAddress(id,
|
|
34
|
-
return getOne({ path: `/tables/contact_email_addresses`, id,
|
|
38
|
+
async getContactEmailAddress(id, mpQuery = {}) {
|
|
39
|
+
return getOne({ path: `/tables/contact_email_addresses`, id, mpQuery });
|
|
35
40
|
},
|
|
36
|
-
async getHousehold(id,
|
|
37
|
-
return getOne({ path: `/tables/households`, id,
|
|
41
|
+
async getHousehold(id, mpQuery = {}) {
|
|
42
|
+
return getOne({ path: `/tables/households`, id, mpQuery });
|
|
38
43
|
},
|
|
39
|
-
async getAddress(id,
|
|
40
|
-
return getOne({ path: `/tables/addresses`, id,
|
|
44
|
+
async getAddress(id, mpQuery = {}) {
|
|
45
|
+
return getOne({ path: `/tables/addresses`, id, mpQuery });
|
|
41
46
|
},
|
|
42
|
-
async getParticipant(id,
|
|
43
|
-
return getOne({ path: `/tables/participants`, id,
|
|
47
|
+
async getParticipant(id, mpQuery = {}) {
|
|
48
|
+
return getOne({ path: `/tables/participants`, id, mpQuery });
|
|
44
49
|
},
|
|
45
|
-
async getEvent(id,
|
|
46
|
-
return getOne({ path: `/tables/events`, id,
|
|
50
|
+
async getEvent(id, mpQuery = {}) {
|
|
51
|
+
return getOne({ path: `/tables/events`, id, mpQuery });
|
|
47
52
|
},
|
|
48
|
-
async getGroup(id,
|
|
49
|
-
return getOne({ path: `/tables/groups`, id,
|
|
53
|
+
async getGroup(id, mpQuery = {}) {
|
|
54
|
+
return getOne({ path: `/tables/groups`, id, mpQuery });
|
|
50
55
|
},
|
|
51
|
-
async getEventParticipant(id,
|
|
52
|
-
return getOne({ path: `/tables/event_participants`, id,
|
|
56
|
+
async getEventParticipant(id, mpQuery = {}) {
|
|
57
|
+
return getOne({ path: `/tables/event_participants`, id, mpQuery });
|
|
53
58
|
},
|
|
54
|
-
async getGroupParticipant(id,
|
|
55
|
-
return getOne({ path: `/tables/group_participants`, id,
|
|
59
|
+
async getGroupParticipant(id, mpQuery = {}) {
|
|
60
|
+
return getOne({ path: `/tables/group_participants`, id, mpQuery });
|
|
56
61
|
},
|
|
57
|
-
async getFormResponse(id,
|
|
58
|
-
return getOne({ path: `/tables/form_responses`, id,
|
|
62
|
+
async getFormResponse(id, mpQuery = {}) {
|
|
63
|
+
return getOne({ path: `/tables/form_responses`, id, mpQuery });
|
|
59
64
|
},
|
|
60
|
-
async getContacts(
|
|
61
|
-
return getMany({ path: `/tables/contacts`,
|
|
65
|
+
async getContacts(mpQuery) {
|
|
66
|
+
return getMany({ path: `/tables/contacts`, mpQuery });
|
|
62
67
|
},
|
|
63
|
-
async getContactAttributes(
|
|
64
|
-
return getMany({ path: `/tables/contact_attributes`,
|
|
68
|
+
async getContactAttributes(mpQuery) {
|
|
69
|
+
return getMany({ path: `/tables/contact_attributes`, mpQuery });
|
|
65
70
|
},
|
|
66
|
-
async getContactsWithAttributes(
|
|
67
|
-
return getMany({
|
|
68
|
-
|
|
71
|
+
async getContactsWithAttributes(mpQuery) {
|
|
72
|
+
return getMany({
|
|
73
|
+
path: `/tables/contact_attributes`,
|
|
74
|
+
mpQuery: { ...mpQuery, select: 'Contact_ID_Table.*, Contact_Attributes.*' }
|
|
69
75
|
});
|
|
70
76
|
},
|
|
71
|
-
async getContactEmailAddresses(
|
|
72
|
-
return getMany({ path: `/tables/contact_email_addresses`,
|
|
77
|
+
async getContactEmailAddresses(mpQuery) {
|
|
78
|
+
return getMany({ path: `/tables/contact_email_addresses`, mpQuery });
|
|
73
79
|
},
|
|
74
|
-
async getContactsWithEmailAddress(
|
|
75
|
-
return getMany({
|
|
76
|
-
|
|
77
|
-
|
|
80
|
+
async getContactsWithEmailAddress(mpQuery) {
|
|
81
|
+
return getMany({
|
|
82
|
+
path: `/tables/contact_email_addresses`,
|
|
83
|
+
mpQuery: {
|
|
84
|
+
...mpQuery,
|
|
85
|
+
select: 'Contact_ID_Table.*, Contact_Email_Addresses.Email_Address As Alternate_Email, Contact_Email_Addresses.*'
|
|
86
|
+
}
|
|
78
87
|
});
|
|
79
88
|
},
|
|
80
|
-
async getHouseholds(
|
|
81
|
-
return getMany({ path: `/tables/households`,
|
|
89
|
+
async getHouseholds(mpQuery) {
|
|
90
|
+
return getMany({ path: `/tables/households`, mpQuery });
|
|
91
|
+
},
|
|
92
|
+
async getAddresses(mpQuery) {
|
|
93
|
+
return getMany({ path: `/tables/addresses`, mpQuery });
|
|
94
|
+
},
|
|
95
|
+
async getParticipants(mpQuery) {
|
|
96
|
+
return getMany({ path: `/tables/participants`, mpQuery });
|
|
97
|
+
},
|
|
98
|
+
async getEvents(mpQuery) {
|
|
99
|
+
return getMany({ path: `/tables/events`, mpQuery });
|
|
82
100
|
},
|
|
83
|
-
async
|
|
84
|
-
return getMany({ path: `/tables/
|
|
101
|
+
async getGroups(mpQuery) {
|
|
102
|
+
return getMany({ path: `/tables/groups`, mpQuery });
|
|
85
103
|
},
|
|
86
|
-
async
|
|
87
|
-
return getMany({ path: `/tables/
|
|
104
|
+
async getEventParticipants(mpQuery) {
|
|
105
|
+
return getMany({ path: `/tables/event_participants`, mpQuery });
|
|
88
106
|
},
|
|
89
|
-
async
|
|
90
|
-
return getMany({ path: `/tables/
|
|
107
|
+
async getGroupParticipants(mpQuery) {
|
|
108
|
+
return getMany({ path: `/tables/group_participants`, mpQuery });
|
|
91
109
|
},
|
|
92
|
-
async
|
|
93
|
-
return getMany({ path: `/tables/
|
|
110
|
+
async getFormResponseAnswers(mpQuery) {
|
|
111
|
+
return getMany({ path: `/tables/form_response_answers`, mpQuery });
|
|
94
112
|
},
|
|
95
|
-
async
|
|
96
|
-
return
|
|
113
|
+
async createContact(data, mpQuery = {}) {
|
|
114
|
+
return createOne({ path: `/tables/contacts`, mpQuery, data });
|
|
97
115
|
},
|
|
98
|
-
async
|
|
99
|
-
return
|
|
116
|
+
async createHousehold(data, mpQuery) {
|
|
117
|
+
return createOne({ path: `/tables/households`, mpQuery, data });
|
|
100
118
|
},
|
|
101
|
-
async
|
|
102
|
-
return
|
|
119
|
+
async createAddress(data, mpQuery) {
|
|
120
|
+
return createOne({ path: `/tables/addresses`, mpQuery, data });
|
|
103
121
|
},
|
|
104
|
-
async
|
|
105
|
-
return createOne({ path: `/tables/
|
|
122
|
+
async createParticipant(data, mpQuery) {
|
|
123
|
+
return createOne({ path: `/tables/participants`, mpQuery, data });
|
|
106
124
|
},
|
|
107
|
-
async
|
|
108
|
-
return createOne({ path: `/tables/
|
|
125
|
+
async createEventParticipant(data, mpQuery) {
|
|
126
|
+
return createOne({ path: `/tables/event_participants`, mpQuery, data });
|
|
109
127
|
},
|
|
110
|
-
async
|
|
111
|
-
return createOne({ path: `/tables/
|
|
128
|
+
async createGroupParticipant(data, mpQuery) {
|
|
129
|
+
return createOne({ path: `/tables/group_participants`, mpQuery, data });
|
|
112
130
|
},
|
|
113
|
-
async
|
|
114
|
-
return createOne({ path: `/tables/
|
|
131
|
+
async createContactAttribute(data, mpQuery) {
|
|
132
|
+
return createOne({ path: `/tables/contact_attributes`, mpQuery, data });
|
|
115
133
|
},
|
|
116
|
-
async
|
|
117
|
-
return createOne({ path: `/tables/
|
|
134
|
+
async createFormResponse(data, mpQuery) {
|
|
135
|
+
return createOne({ path: `/tables/form_responses`, mpQuery, data });
|
|
118
136
|
},
|
|
119
|
-
async
|
|
120
|
-
return
|
|
137
|
+
async createFormResponseAnswers(data, mpQuery) {
|
|
138
|
+
return createMany({ path: `/tables/form_response_answers`, mpQuery, data });
|
|
121
139
|
},
|
|
122
|
-
async
|
|
123
|
-
return
|
|
140
|
+
async createContactEmailAddress(data, mpQuery) {
|
|
141
|
+
return createMany({ path: `/tables/contact_email_addresses`, mpQuery, data });
|
|
124
142
|
},
|
|
125
|
-
async
|
|
126
|
-
return
|
|
143
|
+
async updateContacts(data, mpQuery) {
|
|
144
|
+
return updateMany({ path: `/tables/contacts`, mpQuery, data });
|
|
127
145
|
},
|
|
128
|
-
async
|
|
129
|
-
return
|
|
146
|
+
async updateHouseholds(data, mpQuery) {
|
|
147
|
+
return updateMany({ path: `/tables/households`, mpQuery, data });
|
|
130
148
|
},
|
|
131
|
-
async
|
|
132
|
-
return
|
|
149
|
+
async updateEventParticipants(data, mpQuery) {
|
|
150
|
+
return updateMany({ path: `/tables/event_participants`, mpQuery, data });
|
|
133
151
|
},
|
|
134
|
-
async
|
|
135
|
-
return
|
|
152
|
+
async updateGroupParticipants(data, mpQuery) {
|
|
153
|
+
return updateMany({ path: `/tables/group_participants`, mpQuery, data });
|
|
136
154
|
},
|
|
137
|
-
async
|
|
138
|
-
return
|
|
155
|
+
async updateFormResponseAnswers(data, mpQuery) {
|
|
156
|
+
return updateMany({ path: `/tables/form_response_answers`, mpQuery, data });
|
|
139
157
|
},
|
|
140
|
-
async
|
|
141
|
-
return
|
|
158
|
+
async getFiles(table, recordId) {
|
|
159
|
+
return getMany({ path: `/files/${table}/${recordId}`, mpQuery: {} });
|
|
142
160
|
},
|
|
143
|
-
async
|
|
144
|
-
return
|
|
161
|
+
async uploadFiles(table, recordId, data) {
|
|
162
|
+
return createFile({ path: `/files/${table}/${recordId}`, data });
|
|
145
163
|
},
|
|
146
|
-
async
|
|
147
|
-
return
|
|
164
|
+
async updateFiles(table, fileId, data) {
|
|
165
|
+
return updateMany({ path: `/files/${table}/${fileId}`, data });
|
|
148
166
|
},
|
|
149
167
|
};
|
|
150
168
|
};
|
|
@@ -49,6 +49,9 @@ export interface ContactRecord {
|
|
|
49
49
|
Current_School: unknown | null;
|
|
50
50
|
Other_Information: unknown | null;
|
|
51
51
|
Communication_Preferences: unknown | null;
|
|
52
|
+
Ministry_Safe_ID: number | null;
|
|
53
|
+
Populi_ID: number | null;
|
|
54
|
+
Planning_Center_ID: number | null;
|
|
52
55
|
}
|
|
53
56
|
export interface Contact {
|
|
54
57
|
contactID: number;
|
|
@@ -100,5 +103,8 @@ export interface Contact {
|
|
|
100
103
|
currentSchool: unknown | null;
|
|
101
104
|
otherInformation: unknown | null;
|
|
102
105
|
communicationPreferences: unknown | null;
|
|
106
|
+
ministrySafeID: number | null;
|
|
107
|
+
populiID: number | null;
|
|
108
|
+
planningCenterID: number | null;
|
|
103
109
|
}
|
|
104
110
|
//# sourceMappingURL=contacts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contacts.d.ts","sourceRoot":"","sources":["../../src/tables/contacts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAE3C,MAAM,WAAW,aAAa;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,S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
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
|
+
}
|
|
17
|
+
//# sourceMappingURL=files.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../src/tables/files.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,IAAI,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,cAAc,EAAE,OAAO,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;CACvB"}
|
|
@@ -12,6 +12,6 @@ export declare function caseConverter<T>(obj: T, { type, capitalIds }: {
|
|
|
12
12
|
type: 'toCamel' | 'toSnake';
|
|
13
13
|
capitalIds?: boolean;
|
|
14
14
|
}): any;
|
|
15
|
-
export declare function convertToCamelCase<T = any,
|
|
16
|
-
export declare function convertToSnakeCase<T = any,
|
|
15
|
+
export declare function convertToCamelCase<T extends Record<string, any> = Record<string, any>, D extends Record<string, any> = Record<string, any>>(obj: Partial<D>, capitalIds?: boolean): T;
|
|
16
|
+
export declare function convertToSnakeCase<T extends Record<string, any> = Record<string, any>, D extends Record<string, any> = Record<string, any>>(obj: Partial<D>, capitalIds?: boolean): T;
|
|
17
17
|
//# sourceMappingURL=converters.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"converters.d.ts","sourceRoot":"","sources":["../../src/utils/converters.ts"],"names":[],"mappings":"AAAA,wBAAgB,kBAAkB,CAAC,CAAC,GAAG,GAAG,EAAE,SAAS,GAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAM,UAS5E;AAED,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,UA2BpC;AAED,wBAAgB,gBAAgB,CAAC,CAAC,GAAG,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,CAU3D;AAED,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,KAgB1C;AAGD,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,UAAkB,EAAE,GAAE;IAAE,UAAU,CAAC,EAAE,OAAO,CAAC;CAAO,UAQ9F;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,UAAkB,EAAE,GAAE;IAAE,UAAU,CAAC,EAAE,OAAO,CAAA;CAAO,UAKpG;AAGD,wBAAgB,aAAa,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,UAAkB,EAAE,EAAE;IAAE,IAAI,EAAE,SAAS,GAAG,SAAS,CAAC;IAAC,UAAU,CAAC,EAAE,OAAO,CAAC;CAAE,OAkB5H;AAED,wBAAgB,kBAAkB,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,UAAU,UAAO,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"converters.d.ts","sourceRoot":"","sources":["../../src/utils/converters.ts"],"names":[],"mappings":"AAAA,w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AC,MAAM,EAAE,GAAG,CAAC,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,UAAU,UAAO,GAAG,CAAC,CAElL"}
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mp-js-api",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.29",
|
|
4
4
|
"description": "Node MinistryPlatform API",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"test": "mocha --require ts-node/register test/*",
|
|
8
|
-
"compile": "tsc"
|
|
8
|
+
"compile": "tsc",
|
|
9
|
+
"prepare": "tsc"
|
|
9
10
|
},
|
|
10
11
|
"keywords": [],
|
|
11
12
|
"author": "",
|