2049 timebox 1j zapier integration 4 define and implement a first trigger for zapier app (#2132)
* Add create company trigger * Refactor * Add operation in subscribe * Add create hook api endpoint * Add import of hook module * Add a test for hook subscribe * Add delete hook api endpoint * Add delete hook test * Add findMany hook route --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
@ -7,6 +7,7 @@ import {
|
||||
ActivityTarget,
|
||||
Attachment,
|
||||
ApiKey,
|
||||
Hook,
|
||||
Comment,
|
||||
Company,
|
||||
Favorite,
|
||||
@ -35,6 +36,7 @@ type SubjectsAbility = Subjects<{
|
||||
Comment: Comment;
|
||||
Company: Company;
|
||||
Favorite: Favorite;
|
||||
Hook: Hook;
|
||||
Person: Person;
|
||||
Pipeline: Pipeline;
|
||||
PipelineProgress: PipelineProgress;
|
||||
@ -81,6 +83,11 @@ export class AbilityFactory {
|
||||
can(AbilityAction.Create, 'ApiKey');
|
||||
can(AbilityAction.Update, 'ApiKey', { workspaceId: workspace.id });
|
||||
|
||||
// Hook
|
||||
can(AbilityAction.Read, 'Hook', { workspaceId: workspace.id });
|
||||
can(AbilityAction.Create, 'Hook');
|
||||
can(AbilityAction.Delete, 'Hook', { workspaceId: workspace.id });
|
||||
|
||||
// Workspace
|
||||
can(AbilityAction.Read, 'Workspace');
|
||||
can(AbilityAction.Update, 'Workspace');
|
||||
|
||||
Reference in New Issue
Block a user