tango-app-api-client 3.3.3-beta.15 → 3.3.3-beta.16
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
|
@@ -2130,7 +2130,7 @@ function findDifferences( previous, current, logType, logSubType, path = '' ) {
|
|
|
2130
2130
|
const dbKeys = JSON.parse( process.env.DB_KEYS );
|
|
2131
2131
|
const ignoredKeys = new Set( [
|
|
2132
2132
|
'_id', 'updatedAt', 'createdAt', 'password', 'clientId',
|
|
2133
|
-
'storeId', 'refreshToken', 'employeeId', 'fcmToken', 'permission',
|
|
2133
|
+
'storeId', 'refreshToken', 'employeeId', 'fcmToken', 'permission', 'updateFeatureConfig',
|
|
2134
2134
|
] );
|
|
2135
2135
|
const documents = dbKeys.DOCUMENTS;
|
|
2136
2136
|
// Get correct key mapping based on logType
|
|
@@ -2145,21 +2145,25 @@ function findDifferences( previous, current, logType, logSubType, path = '' ) {
|
|
|
2145
2145
|
const prevValue = previous[key];
|
|
2146
2146
|
const currValue = current[key];
|
|
2147
2147
|
|
|
2148
|
-
if ( typeof prevValue === 'object' && typeof currValue === 'object' && prevValue !== null && currValue !== null
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
} else if ( Array.isArray( prevValue ) && Array.isArray( currValue ) && prevValue.length !== 0 && currValue.length !== 0 ) {
|
|
2148
|
+
if ( typeof prevValue === 'object' && typeof currValue === 'object' && prevValue !== null && currValue !== null ) {
|
|
2149
|
+
if ( logSubType!== 'userUpdated' ) {
|
|
2150
|
+
if ( key == 'spocDetails' ) {
|
|
2151
|
+
if ( _.isEqual( prevValue, currValue ) ) {
|
|
2152
|
+
continue;
|
|
2153
|
+
} else {
|
|
2154
|
+
let result = compareArrayObjects( prevValue, currValue );
|
|
2155
|
+
differences = { ...differences, ...result };
|
|
2156
|
+
}
|
|
2157
|
+
} else if ( Array.isArray( prevValue ) && prevValue.every( ( item ) => typeof item === 'string' ) ||Array.isArray( currValue ) && currValue.every( ( item ) => typeof item === 'string' ) ) {
|
|
2159
2158
|
JSON.stringify( prevValue ) !== JSON.stringify( currValue )?
|
|
2160
2159
|
differences[`${path}${key}`] = { previous: prevValue.length> 0 ? prevValue.join( ',' ): null, current: currValue.length > 0? currValue.join( ',' ): null } : null;
|
|
2161
2160
|
|
|
2162
|
-
|
|
2161
|
+
// differences[`${path}${key}`] = { previous: removed.length> 0 ? prevValue.join( ',' ): prevValue.join( ', ' ) :, current: added.length > 0? addedUsers.join( ', ' ) : currValue.join( ',' ) } : null;
|
|
2162
|
+
}
|
|
2163
|
+
} else {
|
|
2164
|
+
const nestedDiffs = findDifferences( prevValue, currValue, logType, logSubType, `${path}${key}.` );
|
|
2165
|
+
Object.assign( differences, nestedDiffs );
|
|
2166
|
+
}
|
|
2163
2167
|
} else if ( prevValue !== currValue ) {
|
|
2164
2168
|
if (
|
|
2165
2169
|
( prevValue === '' && currValue === '' ) ||
|
|
@@ -2187,7 +2191,7 @@ function findDifferences( previous, current, logType, logSubType, path = '' ) {
|
|
|
2187
2191
|
if ( userFriendlyKey ) {
|
|
2188
2192
|
newKey = userFriendlyKey;
|
|
2189
2193
|
}
|
|
2190
|
-
const binaryKeys = [ 'Two Factor Authentication', 'Mat Enabled', 'Audit', 'Infra Email Alert', 'Ip Whitelist', 'Excluded Area', 'Passer
|
|
2194
|
+
const binaryKeys = [ 'Two Factor Authentication', 'Mat Enabled', 'Audit', 'Infra Email Alert', 'Ip Whitelist', 'Excluded Area', 'Passer-by data', 'Normalized data during downtime', 'Billing', 'Camera Blurring', 'Footfall Directory', 'Footfall Directory Audit', 'Footfall Directory Limit', 'NOB Status', 'Traffic', 'Trax', 'Zone V1', 'Zone V2', 'Reports', 'Analyze' ];
|
|
2191
2195
|
if ( binaryKeys.includes( newKey ) ) {
|
|
2192
2196
|
diff.previous = ( diff.previous == true || diff.previous == 'Enabled' ) ? 'Enabled' : 'Disabled';
|
|
2193
2197
|
diff.current = ( diff.current == true || diff.current == 'Enabled' ) ? 'Enabled' : 'Disabled';
|
|
@@ -2197,6 +2201,11 @@ function findDifferences( previous, current, logType, logSubType, path = '' ) {
|
|
|
2197
2201
|
diff.current = ( diff.current == true || diff.current == 'Server' ) ? 'Server' : 'Serverless';
|
|
2198
2202
|
}
|
|
2199
2203
|
|
|
2204
|
+
if ( newKey === 'Stream Type' ) {
|
|
2205
|
+
diff.previous = ( diff.previous == 'Edge' || diff.previous == 'Edge App' ) ? 'Edge App' : 'RTSP';
|
|
2206
|
+
diff.current = ( diff.current == 'Edge' || diff.current == 'Edge App' ) ? 'Edge App' : 'RTSP';
|
|
2207
|
+
}
|
|
2208
|
+
|
|
2200
2209
|
// **Transform Roles Permission Keys**
|
|
2201
2210
|
const rolesPermissionMatch = newKey.match( /rolespermission\.(\d+)\.modules\.(\d+)\.(isAdd|isEdit)/ );
|
|
2202
2211
|
if ( rolesPermissionMatch ) {
|