Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add global event bus #4860

Merged
merged 114 commits into from
Jan 4, 2023
Merged
Show file tree
Hide file tree
Changes from 99 commits
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
fa55303
fix branch
flipswitchingmonkey Nov 7, 2022
684473b
fix deserialize, add filewriter
flipswitchingmonkey Nov 8, 2022
1bc930b
add catchAll eventGroup/Name
flipswitchingmonkey Nov 8, 2022
573f825
adding simple Redis sender and receiver to eventbus
flipswitchingmonkey Nov 8, 2022
00b4603
remove native node threads
flipswitchingmonkey Nov 8, 2022
06e4679
improve eventbus
flipswitchingmonkey Nov 8, 2022
a33b26e
refactor and simplify
flipswitchingmonkey Nov 10, 2022
5235a33
more refactoring and syslog client
flipswitchingmonkey Nov 11, 2022
7d31b51
more refactor, improved endpoints and eventbus
flipswitchingmonkey Nov 11, 2022
d854a46
remove local broker and receivers from mvp
flipswitchingmonkey Nov 11, 2022
b362940
destination de/serialization
flipswitchingmonkey Nov 15, 2022
cf8486a
create MessageEventBusDestinationEntity
flipswitchingmonkey Nov 15, 2022
53548fb
db migrations, load destinations at startup
flipswitchingmonkey Nov 15, 2022
3119d7b
add delete destination endpoint
flipswitchingmonkey Nov 15, 2022
39ab156
Merge branch 'master' into n8n-5359-mvp-event-bus
flipswitchingmonkey Nov 15, 2022
363ea04
pnpm merge and circular import fix
flipswitchingmonkey Nov 15, 2022
b9e0a16
delete destination fix
flipswitchingmonkey Nov 15, 2022
830aba1
trigger log file shuffle after size reached
flipswitchingmonkey Nov 15, 2022
9bec3c2
add environment variables for eventbus
flipswitchingmonkey Nov 16, 2022
e31beb8
reworking event messages
flipswitchingmonkey Nov 16, 2022
cca6b3a
serialize to thread fix
flipswitchingmonkey Nov 16, 2022
f925602
some refactor and lint fixing
flipswitchingmonkey Nov 16, 2022
a008bf3
add emit to eventbus
flipswitchingmonkey Nov 17, 2022
798aa5d
cleanup and fix sending unsent
flipswitchingmonkey Nov 17, 2022
6a46b5b
quicksave frontend trial
flipswitchingmonkey Nov 18, 2022
25a6db9
initial EventTree vue component
flipswitchingmonkey Nov 19, 2022
4445a8f
basic log streaming settings in vue
flipswitchingmonkey Nov 21, 2022
8c5faeb
http request code merge
flipswitchingmonkey Nov 23, 2022
804cc96
create destination settings modals
flipswitchingmonkey Nov 23, 2022
b199037
fix eventmessage options types
flipswitchingmonkey Nov 24, 2022
c7f26dc
credentials are loaded
flipswitchingmonkey Nov 24, 2022
f7a6164
fix and clean up frontend code
flipswitchingmonkey Nov 25, 2022
e70fcf8
move request code to axios
flipswitchingmonkey Nov 25, 2022
7b895f8
Merge branch 'master' into n8n-5359-mvp-event-bus
flipswitchingmonkey Nov 25, 2022
fda004b
update lock file
flipswitchingmonkey Nov 25, 2022
77e22bd
merge fix
flipswitchingmonkey Nov 25, 2022
947e588
fix redis build
flipswitchingmonkey Nov 25, 2022
1dece35
move destination interfaces into workflow pkg
flipswitchingmonkey Nov 28, 2022
a1ec927
revive sentry as destination
flipswitchingmonkey Nov 28, 2022
b6a7d4a
migration fixes and frontend cleanup
flipswitchingmonkey Nov 29, 2022
b0dd57b
N8N-5777 / N8N-5789 N8N-5788
flipswitchingmonkey Nov 30, 2022
9009731
N8N-5784
flipswitchingmonkey Nov 30, 2022
e859159
N8N-5782 removed event levels
flipswitchingmonkey Nov 30, 2022
8104ca0
N8N-5790 sentry destination cleanup
flipswitchingmonkey Nov 30, 2022
fba9f64
N8N-5786 and refactoring
flipswitchingmonkey Nov 30, 2022
f994790
N8N-5809 and refactor/cleanup
flipswitchingmonkey Dec 2, 2022
80d2ec9
UI fixes and anonymize renaming
flipswitchingmonkey Dec 5, 2022
8319cf8
N8N-5837
flipswitchingmonkey Dec 5, 2022
f02587e
N8N-5834
flipswitchingmonkey Dec 5, 2022
c869ce5
fix no-items UI issues
flipswitchingmonkey Dec 5, 2022
7a5d782
remove card / settings label in modal
flipswitchingmonkey Dec 5, 2022
b98ff6a
Merge branch 'master' into n8n-5359-mvp-event-bus
flipswitchingmonkey Dec 5, 2022
7441355
N8N-5842 fix
flipswitchingmonkey Dec 6, 2022
b6ae5e6
disable webhook auth for now and update ui
flipswitchingmonkey Dec 7, 2022
9fbe590
change sidebar to tabs
flipswitchingmonkey Dec 7, 2022
a33385f
remove payload option
flipswitchingmonkey Dec 7, 2022
29d06ce
Merge branch 'master' into n8n-5359-mvp-event-bus
flipswitchingmonkey Dec 7, 2022
6f37c31
extend audit events with more user data
flipswitchingmonkey Dec 7, 2022
952eff5
N8N-5853 and UI revert to sidebar
flipswitchingmonkey Dec 8, 2022
6ca4ecd
remove redis destination
flipswitchingmonkey Dec 8, 2022
d74bbfd
N8N-5864 / N8N-5868 / N8N-5867 / N8N-5865
flipswitchingmonkey Dec 8, 2022
802f02c
ui and licensing fixes
flipswitchingmonkey Dec 9, 2022
29349d3
Merge branch 'master' into n8n-5359-mvp-event-bus
flipswitchingmonkey Dec 9, 2022
3e18d56
add node events and info bubbles to frontend
flipswitchingmonkey Dec 9, 2022
af1c1d7
ui wording changes
flipswitchingmonkey Dec 12, 2022
0a032ce
frontend tests
flipswitchingmonkey Dec 13, 2022
ccd9e3d
N8N-5896 and ee rename
flipswitchingmonkey Dec 14, 2022
cb6a7a9
improves backend tests
flipswitchingmonkey Dec 15, 2022
8689908
Merge branch 'master' into n8n-5359-mvp-event-bus
flipswitchingmonkey Dec 15, 2022
da1b55f
merge fix
flipswitchingmonkey Dec 15, 2022
69c88f6
fix backend test
flipswitchingmonkey Dec 15, 2022
fad92ea
make linter happy
flipswitchingmonkey Dec 15, 2022
c0f0048
remove unnecessary cfg / limit actions to owners
flipswitchingmonkey Dec 15, 2022
32dea0e
fix multiple sentry DSN and anon bug
flipswitchingmonkey Dec 15, 2022
2f3e5cb
eslint fix
flipswitchingmonkey Dec 16, 2022
e2bacf8
more tests and fixes
flipswitchingmonkey Dec 16, 2022
d452a0e
Merge branch 'master' into n8n-5359-mvp-event-bus
flipswitchingmonkey Dec 16, 2022
429734d
Merge branch 'master' into n8n-5359-mvp-event-bus
flipswitchingmonkey Dec 16, 2022
6d3c364
merge fix
flipswitchingmonkey Dec 16, 2022
e32efaf
Merge remote-tracking branch 'origin/master' into n8n-5359-mvp-event-bus
netroy Dec 20, 2022
8f282b5
Merge branch 'master' into n8n-5359-mvp-event-bus
flipswitchingmonkey Dec 21, 2022
d9b8255
fix workflow audit events
flipswitchingmonkey Dec 21, 2022
f22526a
remove 'n8n.workflow.execution.error' event
flipswitchingmonkey Dec 21, 2022
b8b8afd
Merge branch 'master' into n8n-5359-mvp-event-bus
flipswitchingmonkey Jan 2, 2023
85ffef5
merge fix
flipswitchingmonkey Jan 2, 2023
0a56f76
lint fix
flipswitchingmonkey Jan 2, 2023
0dbdbae
lint fix
flipswitchingmonkey Jan 2, 2023
cdb4c70
review fixes
flipswitchingmonkey Jan 2, 2023
18e23f5
fix merge
flipswitchingmonkey Jan 2, 2023
735d953
prettier fixes
flipswitchingmonkey Jan 2, 2023
95577e8
Merge branch 'master' into n8n-5359-mvp-event-bus
flipswitchingmonkey Jan 2, 2023
5c83abd
merge
flipswitchingmonkey Jan 2, 2023
815f77e
review changes
flipswitchingmonkey Jan 2, 2023
b537b7e
use loggerproxy
flipswitchingmonkey Jan 2, 2023
c66309a
Merge remote-tracking branch 'origin/master' into n8n-5359-mvp-event-bus
netroy Jan 2, 2023
2013f63
remove catch from internal hook promises
flipswitchingmonkey Jan 3, 2023
ba7a693
fix tests
flipswitchingmonkey Jan 3, 2023
fbba8d9
lint fix
flipswitchingmonkey Jan 3, 2023
fd57516
include review PR changes
flipswitchingmonkey Jan 3, 2023
1366b3b
review changes
flipswitchingmonkey Jan 3, 2023
31b87e6
Merge remote-tracking branch 'origin/master' into n8n-5359-mvp-event-bus
netroy Jan 3, 2023
74d95cf
delete duplicate lines from a bad merge
netroy Jan 3, 2023
9bd6ff0
decouple log-streaming UI options from public API
netroy Jan 3, 2023
cbcf3f7
Merge remote-tracking branch 'origin/master' into n8n-5359-mvp-event-bus
netroy Jan 3, 2023
31672e7
logstreaming -> log-streaming for consistency
netroy Jan 3, 2023
c347595
do not make unnecessary api calls when log streaming is disabled
netroy Jan 3, 2023
20f3b21
prevent sentryClient.close() from being called if init failed
netroy Jan 3, 2023
f436f47
fix the e2e test for log-streaming
netroy Jan 3, 2023
13dbef9
review changes
flipswitchingmonkey Jan 3, 2023
f6190da
cleanup
flipswitchingmonkey Jan 3, 2023
125add7
use `private` for one last private property
netroy Jan 3, 2023
6d20580
do not use node prefix package names.. just yet
netroy Jan 3, 2023
adc6fda
remove unused import
netroy Jan 3, 2023
a9c99f8
fix the tests
netroy Jan 4, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
114 changes: 114 additions & 0 deletions cypress/e2e/10-settings-log-streaming.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
import { SettingsLogStreamingPage } from '../pages';

const settingsLogStreamingPage = new SettingsLogStreamingPage();

describe('Default owner', () => {
before(() => {
cy.resetAll();
});

it('should skip owner setup', () => {
cy.skipSetup();
});

it('should be shown unlicensed view', () => {
cy.visit('/settings/logstreaming');
// force license to be disabled
settingsLogStreamingPage.getters.getDisableLicenseToggle().click();
settingsLogStreamingPage.getters.getActionBoxUnlicensed().should('be.visible');
settingsLogStreamingPage.getters.getContactUsButton().should('be.visible');
settingsLogStreamingPage.getters.getActionBoxLicensed().should('not.exist');
});

it('should be shown licensed view', () => {
cy.visit('/settings/logstreaming');
settingsLogStreamingPage.getters.getActionBoxLicensed().should('be.visible');
settingsLogStreamingPage.getters.getAddFirstDestinationButton().should('be.visible');
settingsLogStreamingPage.getters.getActionBoxUnlicensed().should('not.exist');
});

it('should be shown the add destination modal', () => {
cy.visit('/settings/logstreaming');
settingsLogStreamingPage.actions.clickAddFirstDestination();
cy.wait(100);
settingsLogStreamingPage.getters.getDestinationModal().should('be.visible');
settingsLogStreamingPage.getters.getSelectDestinationType().should('be.visible');
settingsLogStreamingPage.getters.getSelectDestinationButton().should('be.visible');
settingsLogStreamingPage.getters.getSelectDestinationButton().should('have.attr', 'disabled');
settingsLogStreamingPage.getters
.getDestinationModalDialog()
.invoke('css', 'width')
.then((widthStr) => parseInt((widthStr as unknown as string).replace('px', '')))
.should('be.lessThan', 500);
settingsLogStreamingPage.getters.getSelectDestinationType().click();
settingsLogStreamingPage.getters.getSelectDestinationTypeItems().eq(0).click();
settingsLogStreamingPage.getters
.getSelectDestinationButton()
.should('not.have.attr', 'disabled');
settingsLogStreamingPage.getters.getDestinationModal().click(1, 1);
settingsLogStreamingPage.getters.getDestinationModal().should('not.exist');
});

it('should create a destination and delete it', () => {
cy.visit('/settings/logstreaming');
settingsLogStreamingPage.actions.clickAddFirstDestination();
cy.wait(100);
settingsLogStreamingPage.getters.getDestinationModal().should('be.visible');
settingsLogStreamingPage.getters.getSelectDestinationType().click();
settingsLogStreamingPage.getters.getSelectDestinationTypeItems().eq(0).click();
settingsLogStreamingPage.getters.getSelectDestinationButton().click();
settingsLogStreamingPage.getters
.getDestinationNameInput()
.click()
.clear()
.type('Destination 0');
settingsLogStreamingPage.getters.getDestinationSaveButton().click();
cy.wait(100);
settingsLogStreamingPage.getters.getDestinationModal().click(1, 1);
cy.reload();
settingsLogStreamingPage.getters.getDestinationCards().eq(0).click();
settingsLogStreamingPage.getters.getDestinationDeleteButton().should('be.visible').click();
cy.get('.el-message-box').should('be.visible').find('.btn--cancel').click();
settingsLogStreamingPage.getters.getDestinationDeleteButton().click();
cy.get('.el-message-box').should('be.visible').find('.btn--confirm').click();
cy.reload();
});

it('should create a destination and delete it via card actions', () => {
cy.visit('/settings/logstreaming');
settingsLogStreamingPage.actions.clickAddFirstDestination();
cy.wait(100);
settingsLogStreamingPage.getters.getDestinationModal().should('be.visible');
settingsLogStreamingPage.getters.getSelectDestinationType().click();
settingsLogStreamingPage.getters.getSelectDestinationTypeItems().eq(1).click();
settingsLogStreamingPage.getters.getSelectDestinationButton().click();
settingsLogStreamingPage.getters
.getDestinationNameInput()
.click()
.clear()
.type('Destination 1');
settingsLogStreamingPage.getters.getDestinationSaveButton().should('not.have.attr', 'disabled');
settingsLogStreamingPage.getters.getDestinationSaveButton().click();
cy.wait(100);
settingsLogStreamingPage.getters.getDestinationModal().click(1, 1);
cy.reload();

settingsLogStreamingPage.getters
.getDestinationCards()
.eq(0)
.find('.el-dropdown-selfdefine')
.click();
cy.get('.el-dropdown-menu').find('.el-dropdown-menu__item').eq(0).click();
settingsLogStreamingPage.getters.getDestinationSaveButton().should('not.exist');
settingsLogStreamingPage.getters.getDestinationModal().click(1, 1);

settingsLogStreamingPage.getters
.getDestinationCards()
.eq(0)
.find('.el-dropdown-selfdefine')
.click();
cy.get('.el-dropdown-menu').find('.el-dropdown-menu__item').eq(1).click();
cy.get('.el-message-box').should('be.visible').find('.btn--confirm').click();
cy.reload();
});
});
1 change: 1 addition & 0 deletions cypress/pages/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ export * from './workflows';
export * from './workflow';
export * from './modals';
export * from './settings-users';
export * from './settings-logstreaming';
export * from './ndv';
27 changes: 27 additions & 0 deletions cypress/pages/settings-logstreaming.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { BasePage } from './base';

export class SettingsLogStreamingPage extends BasePage {
url = '/settings/users';
getters = {
getDisableLicenseToggle: () => cy.getByTestId('disable-license-toggle'),
getActionBoxUnlicensed: () => cy.getByTestId('action-box-unlicensed'),
getActionBoxLicensed: () => cy.getByTestId('action-box-licensed'),
getDestinationModal: () => cy.getByTestId('destination-modal'),
getDestinationModalDialog: () => this.getters.getDestinationModal().find('.el-dialog'),
getSelectDestinationType: () => cy.getByTestId('select-destination-type'),
getDestinationNameInput: () => cy.getByTestId('subtitle-showing-type'),
getSelectDestinationTypeItems: () =>
this.getters.getSelectDestinationType().find('.el-select-dropdown__item'),
getSelectDestinationButton: () => cy.getByTestId('select-destination-button'),
getContactUsButton: () => this.getters.getActionBoxUnlicensed().find('button'),
getAddFirstDestinationButton: () => this.getters.getActionBoxLicensed().find('button'),
getDestinationSaveButton: () => cy.getByTestId('destination-save-button').find('button'),
getDestinationDeleteButton: () => cy.getByTestId('destination-delete-button'),
getDestinationCards: () => cy.getByTestId('destination-card'),
};
actions = {
clickContactUs: () => this.getters.getContactUsButton().click(),
clickAddFirstDestination: () => this.getters.getAddFirstDestinationButton().click(),
clickSelectDestinationButton: () => this.getters.getSelectDestinationButton().click(),
};
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"webhook": "./packages/cli/bin/n8n webhook",
"worker": "./packages/cli/bin/n8n worker",
"cypress:install": "cypress install",
"cypress:open": "CYPRESS_BASE_URL=http://localhost:8080 cypress open",
"test:e2e:ui": "cross-env E2E_TESTS=true start-server-and-test start http://localhost:5678/favicon.ico 'cypress open'",
"test:e2e:dev": "cross-env E2E_TESTS=true CYPRESS_BASE_URL=http://localhost:8080 start-server-and-test dev http://localhost:8080/favicon.ico 'cypress open'",
"test:e2e:smoke": "cross-env E2E_TESTS=true start-server-and-test start http://localhost:5678/favicon.ico 'cypress run --headless --spec \"cypress/e2e/0-smoke.cy.ts\"'",
Expand Down
1 change: 1 addition & 0 deletions packages/cli/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ module.exports = {
},
globalSetup: '<rootDir>/test/setup.ts',
globalTeardown: '<rootDir>/test/teardown.ts',
setupFilesAfterEnv: ['<rootDir>/test/setup-mocks.ts'],
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
'^@db/(.*)$': '<rootDir>/src/databases/$1',
Expand Down
13 changes: 13 additions & 0 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,21 @@
"@types/convict": "^4.2.1",
"@types/cookie-parser": "^1.4.2",
"@types/express": "^4.17.6",
"@types/ioredis": "^4.0.0",
flipswitchingmonkey marked this conversation as resolved.
Show resolved Hide resolved
"@types/json-diff": "^0.5.1",
"@types/jsonwebtoken": "^8.5.2",
"@types/localtunnel": "^1.9.0",
"@types/lodash.get": "^4.4.6",
"@types/lodash.intersection": "^4.4.7",
"@types/lodash.iteratee": "^4.7.7",
"@types/lodash.merge": "^4.6.6",
"@types/lodash.omit": "^4.5.7",
"@types/lodash.pick": "^4.4.7",
"@types/lodash.remove": "^4.7.7",
"@types/lodash.set": "^4.3.6",
"@types/lodash.split": "^4.4.7",
"@types/lodash.unionby": "^4.8.7",
"@types/lodash.uniqby": "^4.7.7",
"@types/lodash.unset": "^4.5.7",
"@types/parseurl": "^1.3.1",
"@types/passport-jwt": "^3.0.6",
Expand All @@ -90,6 +95,7 @@
"@types/superagent": "4.1.13",
"@types/supertest": "^2.0.11",
"@types/swagger-ui-express": "^4.1.3",
"@types/syslog-client": "^1.1.2",
"@types/uuid": "^8.3.2",
"@types/validator": "^13.7.0",
"@types/yamljs": "^0.2.31",
Expand Down Expand Up @@ -142,12 +148,17 @@
"localtunnel": "^2.0.0",
"lodash.get": "^4.4.2",
"lodash.intersection": "^4.4.0",
"lodash.iteratee": "^4.7.0",
"lodash.merge": "^4.6.2",
"lodash.omit": "^4.5.0",
"lodash.pick": "^4.4.0",
"lodash.remove": "^4.7.0",
"lodash.set": "^4.3.2",
"lodash.split": "^4.4.2",
"lodash.unionby": "^4.8.0",
"lodash.uniqby": "^4.7.0",
"lodash.unset": "^4.5.2",
"luxon": "^3.1.0",
"mysql2": "~2.3.0",
"n8n-core": "~0.149.2",
"n8n-editor-ui": "~0.175.4",
Expand All @@ -174,6 +185,8 @@
"sqlite3": "^5.1.2",
"sse-channel": "^4.0.0",
"swagger-ui-express": "^4.3.0",
"syslog-client": "^1.1.1",
"threads": "^1.7.0",
"tslib": "1.14.1",
"typeorm": "0.2.45",
"uuid": "^8.3.2",
Expand Down
2 changes: 2 additions & 0 deletions packages/cli/src/Db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ export async function init(
collections.InstalledNodes = linkRepository(entities.InstalledNodes);
collections.WorkflowStatistics = linkRepository(entities.WorkflowStatistics);

collections.EventDestinations = linkRepository(entities.EventDestinations);

isInitialized = true;

return collections;
Expand Down
107 changes: 90 additions & 17 deletions packages/cli/src/Interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import type { User } from '@db/entities/User';
import type { WebhookEntity } from '@db/entities/WebhookEntity';
import type { WorkflowEntity } from '@db/entities/WorkflowEntity';
import type { WorkflowStatistics } from '@db/entities/WorkflowStatistics';
import type { EventDestinations } from '@db/entities/MessageEventBusDestinationEntity';

export interface IActivationError {
time: number;
Expand Down Expand Up @@ -82,6 +83,7 @@ export interface IDatabaseCollections {
InstalledPackages: Repository<InstalledPackages>;
InstalledNodes: Repository<InstalledNodes>;
WorkflowStatistics: Repository<WorkflowStatistics>;
EventDestinations: Repository<EventDestinations>;
}

// ----------------------------------
Expand Down Expand Up @@ -339,32 +341,102 @@ export interface IInternalHooksClass {
firstWorkflowCreatedAt?: Date,
): Promise<unknown[]>;
onPersonalizationSurveySubmitted(userId: string, answers: Record<string, string>): Promise<void>;
onWorkflowCreated(userId: string, workflow: IWorkflowBase, publicApi: boolean): Promise<void>;
onWorkflowDeleted(userId: string, workflowId: string, publicApi: boolean): Promise<void>;
onWorkflowSaved(userId: string, workflow: IWorkflowBase, publicApi: boolean): Promise<void>;
onWorkflowCreated(user: User, workflow: IWorkflowBase, publicApi: boolean): Promise<void>;
onWorkflowDeleted(user: User, workflowId: string, publicApi: boolean): Promise<void>;
onWorkflowSaved(user: User, workflow: IWorkflowBase, publicApi: boolean): Promise<void>;
onWorkflowBeforeExecute(executionId: string, data: IWorkflowExecutionDataProcess): Promise<void>;
onWorkflowPostExecute(
executionId: string,
workflow: IWorkflowBase,
runData?: IRun,
userId?: string,
): Promise<void>;
onUserDeletion(
userId: string,
userDeletionData: ITelemetryUserDeletionData,
publicApi: boolean,
onNodeBeforeExecute(
executionId: string,
workflow: IWorkflowBase,
nodeName: string,
): Promise<void>;
onNodePostExecute(executionId: string, workflow: IWorkflowBase, nodeName: string): Promise<void>;
onUserDeletion(userDeletionData: {
user: User;
telemetryData: ITelemetryUserDeletionData;
publicApi: boolean;
}): Promise<void>;
onUserInvite(userInviteData: {
user: User;
target_user_id: string[];
public_api: boolean;
}): Promise<void>;
onUserReinvite(userReinviteData: {
user: User;
target_user_id: string;
public_api: boolean;
}): Promise<void>;
onUserUpdate(userUpdateData: { user: User; fields_changed: string[] }): Promise<void>;
onUserInviteEmailClick(userInviteClickData: { inviter: User; invitee: User }): Promise<void>;
onUserPasswordResetEmailClick(userPasswordResetData: { user: User }): Promise<void>;
onUserTransactionalEmail(
userTransactionalEmailData: {
user_id: string;
message_type: 'Reset password' | 'New user invite' | 'Resend invite';
},
user?: User,
): Promise<void>;
onUserInvite(userInviteData: { user_id: string; target_user_id: string[] }): Promise<void>;
onUserReinvite(userReinviteData: { user_id: string; target_user_id: string }): Promise<void>;
onUserUpdate(userUpdateData: { user_id: string; fields_changed: string[] }): Promise<void>;
onUserInviteEmailClick(userInviteClickData: { user_id: string }): Promise<void>;
onUserPasswordResetEmailClick(userPasswordResetData: { user_id: string }): Promise<void>;
onUserTransactionalEmail(userTransactionalEmailData: {
user_id: string;
onEmailFailed(failedEmailData: {
user: User;
message_type: 'Reset password' | 'New user invite' | 'Resend invite';
public_api: boolean;
}): Promise<void>;
onUserCreatedCredentials(userCreatedCredentialsData: {
user: User;
credential_name: string;
credential_type: string;
credential_id: string;
public_api: boolean;
}): Promise<void>;

onUserSharedCredentials(userSharedCredentialsData: {
user: User;
credential_name: string;
credential_type: string;
credential_id: string;
user_id_sharer: string;
user_ids_sharees_added: string[];
sharees_removed: number | null;
}): Promise<void>;
onUserPasswordResetRequestClick(userPasswordResetData: { user: User }): Promise<void>;
onInstanceOwnerSetup(instanceOwnerSetupData: { user_id: string }, user?: User): Promise<void>;
onUserSignup(userSignupData: { user: User }): Promise<void>;
onCommunityPackageInstallFinished(installationData: {
user: User;
input_string: string;
package_name: string;
success: boolean;
package_version?: string;
package_node_names?: string[];
package_author?: string;
package_author_email?: string;
failure_reason?: string;
}): Promise<void>;
onCommunityPackageUpdateFinished(updateData: {
user: User;
package_name: string;
package_version_current: string;
package_version_new: string;
package_node_names: string[];
package_author?: string;
package_author_email?: string;
}): Promise<void>;
onCommunityPackageDeleteFinished(deleteData: {
user: User;
package_name: string;
package_version?: string;
package_node_names?: string[];
package_author?: string;
package_author_email?: string;
}): Promise<void>;
onUserPasswordResetRequestClick(userPasswordResetData: { user_id: string }): Promise<void>;
onInstanceOwnerSetup(instanceOwnerSetupData: { user_id: string }): Promise<void>;
onUserSignup(userSignupData: { user_id: string }): Promise<void>;
onApiKeyCreated(apiKeyDeletedData: { user: User; public_api: boolean }): Promise<void>;
onApiKeyDeleted(apiKeyDeletedData: { user: User; public_api: boolean }): Promise<void>;
}

export interface IN8nConfig {
Expand Down Expand Up @@ -475,6 +547,7 @@ export interface IN8nUISettings {
};
enterprise: {
sharing: boolean;
logStreaming: boolean;
};
hideUsagePage: boolean;
license: {
Expand Down
Loading