wanas-zcrm-extractor 1.7.0 → 1.7.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/package.json
CHANGED
|
@@ -11,13 +11,14 @@ async function delay(ms) {
|
|
|
11
11
|
|
|
12
12
|
async function exportAuditLog(filterFile) {
|
|
13
13
|
try {
|
|
14
|
-
// For a
|
|
15
|
-
//
|
|
16
|
-
//
|
|
17
|
-
//
|
|
18
|
-
//
|
|
19
|
-
//
|
|
20
|
-
|
|
14
|
+
// For a FULL export Zoho's docs say to "skip the input request" entirely —
|
|
15
|
+
// i.e. send an EMPTY body. We send `null` (empty body); the apiClient adds
|
|
16
|
+
// the required `Content-Type: application/json` header on POSTs. This avoids
|
|
17
|
+
// BOTH the 415 (missing content type) and the 400 MANDATORY_NOT_FOUND that a
|
|
18
|
+
// present-but-incomplete object (`{}` or `[{}]`) triggers at $.audit_log_export[0].
|
|
19
|
+
// A filter file (which must contain a valid `audit_log_export[0].criteria`)
|
|
20
|
+
// overrides it when supplied.
|
|
21
|
+
let requestBody = null;
|
|
21
22
|
|
|
22
23
|
if (filterFile) {
|
|
23
24
|
const filterPath = path.resolve(process.cwd(), filterFile);
|