ofsc-utility 1.0.23 → 1.0.25
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/events/index.d.ts +4 -0
- package/dist/events/index.js +4 -4
- package/package.json +1 -1
package/dist/events/index.d.ts
CHANGED
package/dist/events/index.js
CHANGED
|
@@ -116,7 +116,7 @@ function processEventItems(items, sinceDate, output) {
|
|
|
116
116
|
// Add activityId as first level field
|
|
117
117
|
const activityId = item.activityDetails?.activityId ?? null;
|
|
118
118
|
item["uniqueId"] = generateHash(item);
|
|
119
|
-
item["Change"] = item.activityChanges || item.inventoryChanges || item.requestChanges || {};
|
|
119
|
+
item["Change"] = item.activityChanges || item.inventoryChanges || item.requestChanges || item.userChanges || {};
|
|
120
120
|
item["Id"] = item.activityId || item.resourceDetails?.resourceId || '-';
|
|
121
121
|
output.push({ activityId, ...item });
|
|
122
122
|
}
|
|
@@ -258,7 +258,7 @@ function generateHash(item) {
|
|
|
258
258
|
.createHash("sha256")
|
|
259
259
|
.update(stableStringify({
|
|
260
260
|
eventType: item.eventType,
|
|
261
|
-
activityId: item.activityId || item.resourceDetails.
|
|
261
|
+
activityId: item.activityId || item.resourceDetails?.resourceId || item.userDetails?.login || '-',
|
|
262
262
|
time: item.time,
|
|
263
263
|
activityChanges: item.activityChanges || item.inventoryChanges || item.requestChanges || {},
|
|
264
264
|
}))
|
|
@@ -346,8 +346,8 @@ async function downloadAllEventsOfDLastTwoMinutes(clientId, clientSecret, instan
|
|
|
346
346
|
}
|
|
347
347
|
for (let k of page.items) {
|
|
348
348
|
k["uniqueId"] = generateHash(k);
|
|
349
|
-
k["Change"] = k.activityChanges || k.inventoryChanges || k.requestChanges || {};
|
|
350
|
-
k["Id"] = k.activityId || k.resourceDetails?.resourceId || '-';
|
|
349
|
+
k["Change"] = k.activityChanges || k.inventoryChanges || k.requestChanges || k.userChanges || {};
|
|
350
|
+
k["Id"] = k.activityId || k.resourceDetails?.resourceId || `${k.userDetails?.login}(${k.userDetails?.status})` || '-';
|
|
351
351
|
events.push(k);
|
|
352
352
|
}
|
|
353
353
|
}
|