Skip to content

Commit bfd6c76

Browse files
feat: allow appaction.call events in the accepts field [EXT-5360] (#2111)
1 parent 4292f64 commit bfd6c76

File tree

1 file changed

+2
-4
lines changed
  • packages/contentful--app-scripts/src

1 file changed

+2
-4
lines changed

packages/contentful--app-scripts/src/utils.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,10 @@ const functionEvents = {
1313
queryEvent: 'graphql.query',
1414
resourceLinksSearchEvent: 'resources.search',
1515
resourceLinksLookupEvent: 'resources.lookup',
16-
};
17-
18-
const appEvents = {
1916
appEventFilter: 'appevent.filter',
2017
appEventHandler: 'appevent.handler',
2118
appEventTransformation: 'appevent.transformation',
19+
appActionCall: 'appaction.call',
2220
};
2321

2422
export const throwValidationException = (subject: string, message?: string, details?: string) => {
@@ -132,7 +130,7 @@ export function getEntityFromManifest<Type extends 'actions' | 'functions'>(
132130

133131
const accepts = 'accepts' in item && Array.isArray(item.accepts) ? item.accepts : undefined;
134132
const hasInvalidEvent = accepts?.some(
135-
(event) => ![...Object.values(functionEvents), ...Object.values(appEvents)].includes(event)
133+
(event) => !Object.values(functionEvents).includes(event)
136134
);
137135

138136
const hasInvalidNetwork = allowNetworks.find((netWork) => !isValidNetwork(netWork));

0 commit comments

Comments
 (0)