@balena/event-log
Advanced tools
Comparing version 5.1.0-add-organizaton-events-67f0584bb8af2d6b30563d69155bcb733b262a51 to 5.1.0-alias-members-events-f8bcb4769a84d921860518233d46df49e4a380e8
@@ -25,17 +25,2 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
publicKey: ['create', 'delete'], | ||
organization: [ | ||
'create', | ||
'edit', | ||
'delete' | ||
], | ||
team: [ | ||
'create', | ||
'edit', | ||
'delete' | ||
], | ||
organizationMember: [ | ||
'add', | ||
'invite', | ||
'delete', | ||
], | ||
application: [ | ||
@@ -121,2 +106,6 @@ 'create', | ||
}; | ||
var ALIASSED_EVENT_NAMESPACES = { | ||
invite: 'applicationInvite', | ||
members: 'applicationMember', | ||
}; | ||
var DEFAULT_HOOKS = { | ||
@@ -248,2 +237,6 @@ beforeCreate: function (_type, _jsonData, _applicationId, _deviceId, callback) { | ||
}); | ||
var aliasedNamespace = ALIASSED_EVENT_NAMESPACES[base]; | ||
if (aliasedNamespace) { | ||
eventLog[aliasedNamespace] = eventLog[base]; | ||
} | ||
}); | ||
@@ -250,0 +243,0 @@ return eventLog; |
@@ -9,3 +9,4 @@ # Change Log | ||
* Add organization team and member main events [JSReds] | ||
* Deprecate invite events in favor of applicationInvite alias [Thodoris Greasidis] | ||
* Deprecate members events in favor of applicationMember alias [Thodoris Greasidis] | ||
@@ -12,0 +13,0 @@ ## 5.0.1 - 2020-12-08 |
{ | ||
"name": "@balena/event-log", | ||
"version": "5.1.0-add-organizaton-events-67f0584bb8af2d6b30563d69155bcb733b262a51", | ||
"version": "5.1.0-alias-members-events-f8bcb4769a84d921860518233d46df49e4a380e8", | ||
"description": "Balena events logging util", | ||
@@ -5,0 +5,0 @@ "main": "build/balena-event-log.js", |
@@ -26,2 +26,9 @@ // tslint:disable-next-line:no-namespace | ||
interface InviteMethods { | ||
addInviteOpen: TrackFunction; | ||
create: TrackFunction; | ||
delete: TrackFunction; | ||
accept: TrackFunction; | ||
} | ||
interface BalenaEventLog { | ||
@@ -76,9 +83,2 @@ userId: number | null; | ||
}; | ||
organization: IHaveCreateEditDelete; | ||
team: IHaveCreateEditDelete; | ||
organizationMember: { | ||
add: TrackFunction; | ||
invite: TrackFunction; | ||
delete: TrackFunction; | ||
}; | ||
application: { | ||
@@ -101,2 +101,4 @@ create: TrackFunction; | ||
}; | ||
applicationMember: IHaveCreateEditDelete; | ||
applicationInvite: InviteMethods; | ||
applicationTag: IHaveCreateEditDelete & { | ||
@@ -166,2 +168,3 @@ set: TrackFunction; | ||
}; | ||
/** @deprecated Use applicationMember */ | ||
members: IHaveCreateEditDelete; | ||
@@ -183,8 +186,4 @@ billing: { | ||
}; | ||
invite: { | ||
addInviteOpen: TrackFunction; | ||
create: TrackFunction; | ||
delete: TrackFunction; | ||
accept: TrackFunction; | ||
}; | ||
/** @deprecated Use applicationInvite */ | ||
invite: InviteMethods; | ||
} | ||
@@ -191,0 +190,0 @@ |
Sorry, the diff of this file is not supported yet
37096
567