IAV-848/Refactor credential injection (regex → Jackson DOM), add Shopify OAuth, extract workflow helpers
Summary
Replaces the fragile regex-based credential injection with Jackson DOM parsing, adds Shopify OAuth 2.0 store authorization, and cleans up workflow-related helpers.
What changed
Credential injection refactor — The old approach used 3 regex patterns (regular, escaped, double-escaped JSON) to replace credential IDs in n8n templates. WorkflowCredentialInjector now parses the JSON into a tree, walks each node's credentials block, and sets values directly. Handles embedded JSON via recursive descent. N8nCredentialTypeMapping centralizes type name mappings that were previously duplicated.
Shopify OAuth — Two new endpoints for store authorization. State managed via Caffeine cache (10min TTL). Server holds client credentials. Token stored via N8nService.createCredential().
Workflow creation — WorkflowCreationHelper handles template selection (Shopify vs WooCommerce), webhook path modification, and cleanup. Webhook URLs are config-driven. Prerequisites validated before creation. DB saves reduced from 3 to 1.
Bug fix — mapToN8nFormat() was hardcoded to WOOCOMMERCE for all credential types.
Testing notes
- Verify credential injection for all 7 integration types
- Test Shopify OAuth end-to-end with a dev store
- Test workflow creation with both Shopify and WooCommerce templates
- Confirm prerequisite validation rejects incomplete configs
- Interrupt workflow creation → verify cleanup deletes the n8n workflow
Closes IAV-848