Skip to content

Commit

Permalink
Company-specific link/unlink events
Browse files Browse the repository at this point in the history
Adds event hooks that a company can extend when a link is created
or unlinked.

We are using this with our custom Kusto/Azure Data Explorer
integration where we are more actively ingesting changes to
link data.
  • Loading branch information
jeffwilcox committed Jan 7, 2024
1 parent cc2b07f commit 36cd598
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
12 changes: 12 additions & 0 deletions interfaces/companySpecific/events/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//
// Copyright (c) Microsoft.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//

import type { ICompanySpecificEventsLinking } from './linking';

export * from './linking';

export interface ICompanySpecificEvents {
linking?: ICompanySpecificEventsLinking;
}
11 changes: 11 additions & 0 deletions interfaces/companySpecific/events/linking.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
//
// Copyright (c) Microsoft.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//

import type { ICorporateLink, IProviders } from '../..';

export interface ICompanySpecificEventsLinking {
onLink?: (providers: IProviders, link: ICorporateLink) => Promise<void>;
onUnlink?: (providers: IProviders, corporateId: string) => Promise<void>;
}

0 comments on commit 36cd598

Please sign in to comment.