diff --git a/.claude/skills/scaffold-app/references/storefront-plugin-templates.md b/.claude/skills/scaffold-app/references/storefront-plugin-templates.md index 89f7591..f9b6dea 100644 --- a/.claude/skills/scaffold-app/references/storefront-plugin-templates.md +++ b/.claude/skills/scaffold-app/references/storefront-plugin-templates.md @@ -22,6 +22,13 @@ Complete templates for the extension system. All files must use TypeScript (.ts/ "path": "extensions/{{appName}}/providers/{{AppName}}Provider.tsx", "order": 0 } + ], + "actionHooks": [ + { + "hookId": "sfcc.checkout.fraud.afterSubmitContactInfo", + "handler": "extensions/{{appName}}/hooks/{{hookName}}.server.ts", + "order": 0 + } ] } ``` @@ -31,6 +38,7 @@ Complete templates for the extension system. All files must use TypeScript (.ts/ - `path`: Relative path from `src/` to the component file - `order`: Insertion order when multiple components target the same slot (lower = earlier) - `contextProviders`: Application-root level providers (injected after ComposeProviders) +- `actionHooks`: Server-side handlers that run during storefront actions (see "Action Hook Handler" below) - `devOnly`: (optional) Set to `true` to exclude extension from production builds **⚠️ IMPORTANT:** Use `target-config.json` (not `plugin-config.json`) and `targetId` (not `pluginId`) @@ -260,6 +268,115 @@ export function use{{AppName}}Context(): {{AppName}}ContextType { - Use `useConfig()` with TypeScript type for type-safe configuration access - Access config with direct property access: `appConfig.extension?.{{appName}}?.key || defaultValue` +## Injecting External SDK Scripts + +Context providers can render `