Skip to content

UpdateWhatsAppFlowAssets

Source: src/AWS/SocialMessaging/UpdateWhatsAppFlowAssets.ts

Runtime binding for social-messaging:UpdateWhatsAppFlowAssets.

Replaces a WhatsApp Flow’s Flow JSON asset on the bound account and returns any validation errors Meta reports.

The deploy-time half grants social-messaging:UpdateWhatsAppFlowAssets on the bound WABA’s ARN and the runtime half injects the linked account id into every request. Provide the implementation with Effect.provide(AWS.SocialMessaging.UpdateWhatsAppFlowAssetsHttp).

// init — bind the operation to the linked WABA
const updateFlowAssets = yield* AWS.SocialMessaging.UpdateWhatsAppFlowAssets(account);
// runtime
const { validationErrors } = yield* updateFlowAssets({
flowId: "1234567890",
flowJson: new TextEncoder().encode(JSON.stringify(flowDefinition)),
});