Skip to content

Commit

Permalink
feat: adds function-invocation to app action type [EXT-5324] (#2423)
Browse files Browse the repository at this point in the history
* feat: adds function-invocation to app action type [EXT-5324]

* adds AppActionType

* adds new type to export-types

* better comment for appactiontype
  • Loading branch information
sarahlessner authored Aug 29, 2024
1 parent ba137b1 commit c729234
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/entities/app-action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,13 @@ type CustomAppActionProps = {
type AppActionCategory = BuiltInCategoriesProps | CustomAppActionProps
export type AppActionCategoryType = AppActionCategory['category']

export type AppActionType = 'endpoint' | 'function' | 'function-invocation'

export type CreateAppActionProps = AppActionCategory & {
url: string
name: string
description?: string
type?: AppActionType
}

export type AppActionProps = AppActionCategory & {
Expand All @@ -65,7 +68,13 @@ export type AppActionProps = AppActionCategory & {
* Human readable description of the action
*/
description?: string
type?: 'endpoint' | 'function'
/**
* Type of the action, defaults to endpoint if not provided
* endpoint: action is sent to specified URL
* function: deprecated, use function-invocation instead
* function-invocation: action invokes a contentful function
*/
type?: AppActionType
}

export type AppAction = AppActionProps &
Expand Down
1 change: 1 addition & 0 deletions lib/export-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export type {
AppActionCategoryType,
AppActionParameterDefinition,
AppActionProps,
AppActionType,
CreateAppActionProps,
} from './entities/app-action'
export type {
Expand Down

0 comments on commit c729234

Please sign in to comment.