Type alias AppActionRequest<CategoryType, CustomCategoryBody>
Type Parameters
- CategoryType extends AppActionCategoryType = "Custom"
- CustomCategoryBody = AppActionCategoryBodyMap["Custom"]
Type declaration
headers: Record<string, string | number>
type: FunctionTypeEnum.AppActionCall
The app action request body will contain different parameters depending on the category of the app action
Specify your app action category as the generic type
Categoryto get the correct body type, e.g.const { body: { message, recipient }} = event as AppActionRequest<'Notification.v1.0'>If you are using the Custom category, you can specify the parameter shape as the second generic type
CustomCategoryBody, e.g.const { body: { myNumber }} = event as AppActionRequest<'Custom', { myNumber: number }>