mp-js-api 0.0.28 → 0.0.30
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/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/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,
|