From a5c6f6b1fb944a730b605a120f84b4f38f608f9f Mon Sep 17 00:00:00 2001 From: Leonardo Benini Date: Thu, 6 Nov 2025 13:45:03 +0100 Subject: [PATCH] fix(core-flows): update SendNotificationsStepInput (#13979) --- .changeset/heavy-shirts-fold.md | 5 +++++ .../src/notification/steps/send-notifications.ts | 12 ++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 .changeset/heavy-shirts-fold.md diff --git a/.changeset/heavy-shirts-fold.md b/.changeset/heavy-shirts-fold.md new file mode 100644 index 0000000000..82ee348388 --- /dev/null +++ b/.changeset/heavy-shirts-fold.md @@ -0,0 +1,5 @@ +--- +"@medusajs/core-flows": patch +--- + +fix(core-flows): update SendNotificationsStepInput diff --git a/packages/core/core-flows/src/notification/steps/send-notifications.ts b/packages/core/core-flows/src/notification/steps/send-notifications.ts index a0c6ae9b9c..e67de5a63f 100644 --- a/packages/core/core-flows/src/notification/steps/send-notifications.ts +++ b/packages/core/core-flows/src/notification/steps/send-notifications.ts @@ -1,4 +1,4 @@ -import type { INotificationModuleService } from "@medusajs/framework/types" +import type { Attachment, INotificationModuleService, NotificationContent } from "@medusajs/framework/types" import { Modules } from "@medusajs/framework/utils" import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk" @@ -19,7 +19,11 @@ export type SendNotificationsStepInput = { * The ID of the template to use for the notification. This template ID may be defined * in a third-party service used to send the notification. */ - template: string + template?: string | null + /** + * The content that gets passed over to the provider. + */ + content?: NotificationContent | null /** * The data to use in the notification template. This data may be used to personalize * the notification, such as the user's name or the order number. @@ -51,6 +55,10 @@ export type SendNotificationsStepInput = { * is sent multiple times, the key ensures that the notification is sent only once. */ idempotency_key?: string | null + /** + * Optional attachments for the notification. + */ + attachments?: Attachment[] | null }[] export const sendNotificationsStepId = "send-notifications"