@teleporthq/teleport-plugin-next-workflows 0.44.11 → 0.44.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/__tests__/_helpers/fake-fetch.ts +75 -0
- package/__tests__/_helpers/gui-place-order-statements.ts +17 -0
- package/__tests__/_helpers/inserted-lines.ts +22 -0
- package/__tests__/_helpers/invoice-store.ts +10 -1
- package/__tests__/_helpers/load-security-runtime.ts +45 -0
- package/__tests__/_helpers/load-server-runtime.ts +26 -3
- package/__tests__/_helpers/run-account-delete-route.ts +3 -1
- package/__tests__/_helpers/run-generated-middleware.ts +7 -2
- package/__tests__/account-delete-owned-rows.test.ts +3 -1
- package/__tests__/adopted-element-trigger-code.test.ts +128 -0
- package/__tests__/analytics-track-outcome.test.ts +145 -0
- package/__tests__/auth-password-change-ends-sessions.test.ts +8 -1
- package/__tests__/auth-password-security.test.ts +2275 -0
- package/__tests__/auth-session-cost.test.ts +31 -0
- package/__tests__/auth-signup-route.test.ts +960 -0
- package/__tests__/authored-code-every-path.test.ts +247 -0
- package/__tests__/automations-bus.test.ts +3820 -0
- package/__tests__/automations-catalog-drift.test.ts +97 -0
- package/__tests__/booking-calendar-feed-route.test.ts +20 -3
- package/__tests__/cart-price-order.test.ts +336 -1
- package/__tests__/code-lookup-rate-limit-route.test.ts +189 -0
- package/__tests__/cost-bearing-node-types.test.ts +119 -0
- package/__tests__/credential-columns-reply.test.ts +9 -0
- package/__tests__/credential-result-reply.test.ts +19 -5
- package/__tests__/cron-route-loop-templateparams.test.ts +6 -3
- package/__tests__/custom-js-authored-code.test.ts +304 -0
- package/__tests__/custom-node-custom-code-gate.test.ts +136 -0
- package/__tests__/custom-node-step-handlers.test.ts +251 -0
- package/__tests__/custom-node-step-reach.test.ts +63 -0
- package/__tests__/data-api-anon-user-id-fallback.test.ts +7 -2
- package/__tests__/data-api-browser-reads.test.ts +7 -0
- package/__tests__/data-api-business-events.test.ts +403 -0
- package/__tests__/data-api-invalid-body.test.ts +7 -0
- package/__tests__/data-api-low-stock-autofire.test.ts +30 -4
- package/__tests__/data-api-optional-feature-columns.test.ts +44 -0
- package/__tests__/data-api-owner-scope-credentials.test.ts +1324 -0
- package/__tests__/data-api-protected-tables.test.ts +48 -15
- package/__tests__/data-api-retired-table-and-account-fields.test.ts +208 -0
- package/__tests__/email-locale-senders.test.ts +5 -3
- package/__tests__/expression-injection.test.ts +343 -0
- package/__tests__/fixtures/admin-file-workflows.json +242 -0
- package/__tests__/form-confirmation-email-template.test.ts +44 -0
- package/__tests__/internal-request-headers.test.ts +25 -0
- package/__tests__/invoice-pdf-service-project-header.test.ts +120 -0
- package/__tests__/invoice-self-call-origin.test.ts +57 -1
- package/__tests__/legacy-webhook-self-calls.test.ts +86 -1
- package/__tests__/middleware-home-route-protection.test.ts +3 -1
- package/__tests__/middleware-subscriber-access.test.ts +1 -1
- package/__tests__/newsletter-admin-route.test.ts +649 -0
- package/__tests__/newsletter-plugin.test.ts +1248 -0
- package/__tests__/outbound-nodes-security.test.ts +1929 -0
- package/__tests__/page-access-guard.test.ts +217 -0
- package/__tests__/page-access-route-table.test.ts +231 -0
- package/__tests__/payment-drivers-module.test.ts +23 -0
- package/__tests__/payment-legacy-webhook-routes.test.ts +100 -5
- package/__tests__/payment-webhook-route.test.ts +4 -1
- package/__tests__/paypal-webhook-signature-verification.test.ts +44 -0
- package/__tests__/place-order-guards.test.ts +506 -0
- package/__tests__/public-step-guards.test.ts +310 -0
- package/__tests__/publish-refusals.test.ts +505 -0
- package/__tests__/realtime-identity-routes.test.ts +492 -0
- package/__tests__/record-event-writer-server-only.test.ts +975 -0
- package/__tests__/resolve-config-template-params.test.ts +3 -3
- package/__tests__/runtime-storage-upload-access.test.ts +280 -17
- package/__tests__/security-integration-env-names.test.ts +74 -0
- package/__tests__/security-lists-parity.test.ts +245 -0
- package/__tests__/security-runtime-shadow.test.ts +224 -1
- package/__tests__/security-runtime.test.ts +893 -0
- package/__tests__/segment-rate-limit-error-branch.test.ts +284 -0
- package/__tests__/segment-route-abuse-gate.test.ts +309 -0
- package/__tests__/server-job-hops-real-data-api.test.ts +669 -0
- package/__tests__/server-session-identity.test.ts +522 -0
- package/__tests__/server-step-chain.test.ts +222 -0
- package/__tests__/server-step-signing.test.ts +107 -2
- package/__tests__/session-cookie-resolver.test.ts +62 -106
- package/__tests__/signup-event.test.ts +649 -0
- package/__tests__/signup-reply-identical.test.ts +144 -0
- package/__tests__/slack-message-escaping.test.ts +123 -0
- package/__tests__/visitor-step-limits.test.ts +318 -0
- package/__tests__/webhook-delivery-lease.test.ts +4 -1
- package/__tests__/webpack-safe-handlers.test.ts +57 -8
- package/__tests__/workflow-auth-guard.test.ts +9 -1
- package/dist/cjs/account-delete-route-generator.d.ts +1 -0
- package/dist/cjs/account-delete-route-generator.d.ts.map +1 -1
- package/dist/cjs/account-delete-route-generator.js +18 -3
- package/dist/cjs/account-delete-route-generator.js.map +1 -1
- package/dist/cjs/api-route-generator.d.ts +52 -3
- package/dist/cjs/api-route-generator.d.ts.map +1 -1
- package/dist/cjs/api-route-generator.js +600 -145
- package/dist/cjs/api-route-generator.js.map +1 -1
- package/dist/cjs/auth-generator.d.ts +126 -3
- package/dist/cjs/auth-generator.d.ts.map +1 -1
- package/dist/cjs/auth-generator.js +1353 -139
- package/dist/cjs/auth-generator.js.map +1 -1
- package/dist/cjs/automations/activity-kicks.d.ts +12 -0
- package/dist/cjs/automations/activity-kicks.d.ts.map +1 -0
- package/dist/cjs/automations/activity-kicks.js +123 -0
- package/dist/cjs/automations/activity-kicks.js.map +1 -0
- package/dist/cjs/automations/app-events-source.d.ts +33 -0
- package/dist/cjs/automations/app-events-source.d.ts.map +1 -0
- package/dist/cjs/automations/app-events-source.js +109 -0
- package/dist/cjs/automations/app-events-source.js.map +1 -0
- package/dist/cjs/automations/automations-project-plugin.d.ts +21 -0
- package/dist/cjs/automations/automations-project-plugin.d.ts.map +1 -0
- package/dist/cjs/automations/automations-project-plugin.js +102 -0
- package/dist/cjs/automations/automations-project-plugin.js.map +1 -0
- package/dist/cjs/automations/automations-scope.d.ts +104 -0
- package/dist/cjs/automations/automations-scope.d.ts.map +1 -0
- package/dist/cjs/automations/automations-scope.js +176 -0
- package/dist/cjs/automations/automations-scope.js.map +1 -0
- package/dist/cjs/automations/dispatcher-source.d.ts +72 -0
- package/dist/cjs/automations/dispatcher-source.d.ts.map +1 -0
- package/dist/cjs/automations/dispatcher-source.js +1008 -0
- package/dist/cjs/automations/dispatcher-source.js.map +1 -0
- package/dist/cjs/automations/event-bus-source.d.ts +44 -0
- package/dist/cjs/automations/event-bus-source.d.ts.map +1 -0
- package/dist/cjs/automations/event-bus-source.js +427 -0
- package/dist/cjs/automations/event-bus-source.js.map +1 -0
- package/dist/cjs/automations/handler-module-generator.d.ts +25 -0
- package/dist/cjs/automations/handler-module-generator.d.ts.map +1 -0
- package/dist/cjs/automations/handler-module-generator.js +78 -0
- package/dist/cjs/automations/handler-module-generator.js.map +1 -0
- package/dist/cjs/automations/hydrators-source.d.ts +33 -0
- package/dist/cjs/automations/hydrators-source.d.ts.map +1 -0
- package/dist/cjs/automations/hydrators-source.js +571 -0
- package/dist/cjs/automations/hydrators-source.js.map +1 -0
- package/dist/cjs/booking-calendar-feed-route-generator.d.ts.map +1 -1
- package/dist/cjs/booking-calendar-feed-route-generator.js +8 -0
- package/dist/cjs/booking-calendar-feed-route-generator.js.map +1 -1
- package/dist/cjs/configured-nextauth-url.d.ts +17 -0
- package/dist/cjs/configured-nextauth-url.d.ts.map +1 -0
- package/dist/cjs/configured-nextauth-url.js +20 -0
- package/dist/cjs/configured-nextauth-url.js.map +1 -0
- package/dist/cjs/cron-request-verification.d.ts +22 -1
- package/dist/cjs/cron-request-verification.d.ts.map +1 -1
- package/dist/cjs/cron-request-verification.js +50 -6
- package/dist/cjs/cron-request-verification.js.map +1 -1
- package/dist/cjs/data-api-route-generator.d.ts +19 -0
- package/dist/cjs/data-api-route-generator.d.ts.map +1 -1
- package/dist/cjs/data-api-route-generator.js +711 -43
- package/dist/cjs/data-api-route-generator.js.map +1 -1
- package/dist/cjs/ecommerce/parameterized-stock-chain.d.ts +3 -1
- package/dist/cjs/ecommerce/parameterized-stock-chain.d.ts.map +1 -1
- package/dist/cjs/ecommerce/parameterized-stock-chain.js +45 -5
- package/dist/cjs/ecommerce/parameterized-stock-chain.js.map +1 -1
- package/dist/cjs/ecommerce/place-order-guards.d.ts +126 -0
- package/dist/cjs/ecommerce/place-order-guards.d.ts.map +1 -0
- package/dist/cjs/ecommerce/place-order-guards.js +670 -0
- package/dist/cjs/ecommerce/place-order-guards.js.map +1 -0
- package/dist/cjs/ecommerce-customhandler-rewriter.d.ts +2 -0
- package/dist/cjs/ecommerce-customhandler-rewriter.d.ts.map +1 -1
- package/dist/cjs/ecommerce-customhandler-rewriter.js +38 -2
- package/dist/cjs/ecommerce-customhandler-rewriter.js.map +1 -1
- package/dist/cjs/executor-generator.d.ts.map +1 -1
- package/dist/cjs/executor-generator.js +368 -60
- package/dist/cjs/executor-generator.js.map +1 -1
- package/dist/cjs/graph-utils.d.ts +9 -0
- package/dist/cjs/graph-utils.d.ts.map +1 -1
- package/dist/cjs/graph-utils.js +32 -1
- package/dist/cjs/graph-utils.js.map +1 -1
- package/dist/cjs/index.d.ts +20 -1
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +72 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/invoice/api-routes-code.d.ts +9 -3
- package/dist/cjs/invoice/api-routes-code.d.ts.map +1 -1
- package/dist/cjs/invoice/api-routes-code.js +9 -7
- package/dist/cjs/invoice/api-routes-code.js.map +1 -1
- package/dist/cjs/invoice/index.d.ts.map +1 -1
- package/dist/cjs/invoice/index.js +12 -7
- package/dist/cjs/invoice/index.js.map +1 -1
- package/dist/cjs/invoice/invoice-assembly-code.d.ts.map +1 -1
- package/dist/cjs/invoice/invoice-assembly-code.js +8 -3
- package/dist/cjs/invoice/invoice-assembly-code.js.map +1 -1
- package/dist/cjs/invoice/pdf-generator-code.d.ts.map +1 -1
- package/dist/cjs/invoice/pdf-generator-code.js +2 -1
- package/dist/cjs/invoice/pdf-generator-code.js.map +1 -1
- package/dist/cjs/invoice/pdf-service-client-code.d.ts.map +1 -1
- package/dist/cjs/invoice/pdf-service-client-code.js +15 -7
- package/dist/cjs/invoice/pdf-service-client-code.js.map +1 -1
- package/dist/cjs/newsletter/admin-route-code.d.ts +60 -0
- package/dist/cjs/newsletter/admin-route-code.d.ts.map +1 -0
- package/dist/cjs/newsletter/admin-route-code.js +300 -0
- package/dist/cjs/newsletter/admin-route-code.js.map +1 -0
- package/dist/cjs/newsletter/helper-code.d.ts +109 -0
- package/dist/cjs/newsletter/helper-code.d.ts.map +1 -0
- package/dist/cjs/newsletter/helper-code.js +662 -0
- package/dist/cjs/newsletter/helper-code.js.map +1 -0
- package/dist/cjs/newsletter/newsletter-scope.d.ts +65 -0
- package/dist/cjs/newsletter/newsletter-scope.d.ts.map +1 -0
- package/dist/cjs/newsletter/newsletter-scope.js +103 -0
- package/dist/cjs/newsletter/newsletter-scope.js.map +1 -0
- package/dist/cjs/newsletter/project-plugin.d.ts +18 -0
- package/dist/cjs/newsletter/project-plugin.d.ts.map +1 -0
- package/dist/cjs/newsletter/project-plugin.js +97 -0
- package/dist/cjs/newsletter/project-plugin.js.map +1 -0
- package/dist/cjs/newsletter/routes-code.d.ts +6 -0
- package/dist/cjs/newsletter/routes-code.d.ts.map +1 -0
- package/dist/cjs/newsletter/routes-code.js +181 -0
- package/dist/cjs/newsletter/routes-code.js.map +1 -0
- package/dist/cjs/nodes/account/account-compare-passwords.d.ts.map +1 -1
- package/dist/cjs/nodes/account/account-compare-passwords.js +16 -6
- package/dist/cjs/nodes/account/account-compare-passwords.js.map +1 -1
- package/dist/cjs/nodes/account/account-delete-current.js +1 -1
- package/dist/cjs/nodes/account/account-get-current.js +1 -1
- package/dist/cjs/nodes/account/account-hash-password.d.ts.map +1 -1
- package/dist/cjs/nodes/account/account-hash-password.js +15 -3
- package/dist/cjs/nodes/account/account-hash-password.js.map +1 -1
- package/dist/cjs/nodes/account/account-login.d.ts.map +1 -1
- package/dist/cjs/nodes/account/account-login.js +23 -6
- package/dist/cjs/nodes/account/account-login.js.map +1 -1
- package/dist/cjs/nodes/account/account-logout.js +1 -1
- package/dist/cjs/nodes/account/account-refresh-session.js +1 -1
- package/dist/cjs/nodes/account/account-request-password-reset.d.ts +3 -0
- package/dist/cjs/nodes/account/account-request-password-reset.d.ts.map +1 -0
- package/dist/cjs/nodes/account/account-request-password-reset.js +46 -0
- package/dist/cjs/nodes/account/account-request-password-reset.js.map +1 -0
- package/dist/cjs/nodes/account/account-reset-password.d.ts +3 -0
- package/dist/cjs/nodes/account/account-reset-password.d.ts.map +1 -0
- package/dist/cjs/nodes/account/account-reset-password.js +44 -0
- package/dist/cjs/nodes/account/account-reset-password.js.map +1 -0
- package/dist/cjs/nodes/account/account-signup.d.ts.map +1 -1
- package/dist/cjs/nodes/account/account-signup.js +82 -19
- package/dist/cjs/nodes/account/account-signup.js.map +1 -1
- package/dist/cjs/nodes/account/account-social-login.js +1 -1
- package/dist/cjs/nodes/ai/ai-custom-prompt.d.ts.map +1 -1
- package/dist/cjs/nodes/ai/ai-custom-prompt.js +20 -5
- package/dist/cjs/nodes/ai/ai-custom-prompt.js.map +1 -1
- package/dist/cjs/nodes/ai/ai-detect-language.d.ts.map +1 -1
- package/dist/cjs/nodes/ai/ai-detect-language.js +20 -5
- package/dist/cjs/nodes/ai/ai-detect-language.js.map +1 -1
- package/dist/cjs/nodes/ai/ai-generate-text-embedding.d.ts.map +1 -1
- package/dist/cjs/nodes/ai/ai-generate-text-embedding.js +10 -2
- package/dist/cjs/nodes/ai/ai-generate-text-embedding.js.map +1 -1
- package/dist/cjs/nodes/ai/ai-provider-utils-sources.generated.js +2 -2
- package/dist/cjs/nodes/ai/ai-provider-utils-sources.generated.js.map +1 -1
- package/dist/cjs/nodes/ai/ai-provider-utils.d.ts +31 -2
- package/dist/cjs/nodes/ai/ai-provider-utils.d.ts.map +1 -1
- package/dist/cjs/nodes/ai/ai-provider-utils.js +125 -11
- package/dist/cjs/nodes/ai/ai-provider-utils.js.map +1 -1
- package/dist/cjs/nodes/ai/ai-select-database-data.d.ts.map +1 -1
- package/dist/cjs/nodes/ai/ai-select-database-data.js +6 -2
- package/dist/cjs/nodes/ai/ai-select-database-data.js.map +1 -1
- package/dist/cjs/nodes/ai/ai-sentiment-analysis.d.ts.map +1 -1
- package/dist/cjs/nodes/ai/ai-sentiment-analysis.js +20 -5
- package/dist/cjs/nodes/ai/ai-sentiment-analysis.js.map +1 -1
- package/dist/cjs/nodes/ai/ai-summarization.d.ts.map +1 -1
- package/dist/cjs/nodes/ai/ai-summarization.js +20 -5
- package/dist/cjs/nodes/ai/ai-summarization.js.map +1 -1
- package/dist/cjs/nodes/ai/ai-text-classifier.d.ts.map +1 -1
- package/dist/cjs/nodes/ai/ai-text-classifier.js +20 -5
- package/dist/cjs/nodes/ai/ai-text-classifier.js.map +1 -1
- package/dist/cjs/nodes/ai/ai-text-transform.d.ts.map +1 -1
- package/dist/cjs/nodes/ai/ai-text-transform.js +20 -5
- package/dist/cjs/nodes/ai/ai-text-transform.js.map +1 -1
- package/dist/cjs/nodes/analytics/analytics-track-outcome.d.ts +3 -0
- package/dist/cjs/nodes/analytics/analytics-track-outcome.d.ts.map +1 -0
- package/dist/cjs/nodes/analytics/analytics-track-outcome.js +110 -0
- package/dist/cjs/nodes/analytics/analytics-track-outcome.js.map +1 -0
- package/dist/cjs/nodes/cart/cart-price-order.d.ts.map +1 -1
- package/dist/cjs/nodes/cart/cart-price-order.js +161 -2
- package/dist/cjs/nodes/cart/cart-price-order.js.map +1 -1
- package/dist/cjs/nodes/cost-bearing-node-types.d.ts +4 -0
- package/dist/cjs/nodes/cost-bearing-node-types.d.ts.map +1 -0
- package/dist/cjs/nodes/cost-bearing-node-types.js +43 -0
- package/dist/cjs/nodes/cost-bearing-node-types.js.map +1 -0
- package/dist/cjs/nodes/data/data-select.d.ts.map +1 -1
- package/dist/cjs/nodes/data/data-select.js +12 -2
- package/dist/cjs/nodes/data/data-select.js.map +1 -1
- package/dist/cjs/nodes/email/email-mailersend.d.ts.map +1 -1
- package/dist/cjs/nodes/email/email-mailersend.js +15 -11
- package/dist/cjs/nodes/email/email-mailersend.js.map +1 -1
- package/dist/cjs/nodes/email/email-mailgun.d.ts.map +1 -1
- package/dist/cjs/nodes/email/email-mailgun.js +15 -15
- package/dist/cjs/nodes/email/email-mailgun.js.map +1 -1
- package/dist/cjs/nodes/email/email-postmark.d.ts.map +1 -1
- package/dist/cjs/nodes/email/email-postmark.js +15 -15
- package/dist/cjs/nodes/email/email-postmark.js.map +1 -1
- package/dist/cjs/nodes/email/email-resend.d.ts.map +1 -1
- package/dist/cjs/nodes/email/email-resend.js +15 -15
- package/dist/cjs/nodes/email/email-resend.js.map +1 -1
- package/dist/cjs/nodes/email/email-sendgrid.d.ts.map +1 -1
- package/dist/cjs/nodes/email/email-sendgrid.js +15 -15
- package/dist/cjs/nodes/email/email-sendgrid.js.map +1 -1
- package/dist/cjs/nodes/email/html-escape-code.d.ts +3 -0
- package/dist/cjs/nodes/email/html-escape-code.d.ts.map +1 -0
- package/dist/cjs/nodes/email/html-escape-code.js +23 -0
- package/dist/cjs/nodes/email/html-escape-code.js.map +1 -0
- package/dist/cjs/nodes/email/message-trust.d.ts +40 -0
- package/dist/cjs/nodes/email/message-trust.d.ts.map +1 -0
- package/dist/cjs/nodes/email/message-trust.js +167 -0
- package/dist/cjs/nodes/email/message-trust.js.map +1 -0
- package/dist/cjs/nodes/email/outbound-message-guard.d.ts +113 -0
- package/dist/cjs/nodes/email/outbound-message-guard.d.ts.map +1 -0
- package/dist/cjs/nodes/email/outbound-message-guard.js +460 -0
- package/dist/cjs/nodes/email/outbound-message-guard.js.map +1 -0
- package/dist/cjs/nodes/email/trusted-html-code.d.ts +22 -0
- package/dist/cjs/nodes/email/trusted-html-code.d.ts.map +1 -0
- package/dist/cjs/nodes/email/trusted-html-code.js +52 -0
- package/dist/cjs/nodes/email/trusted-html-code.js.map +1 -0
- package/dist/cjs/nodes/general/general-custom-js.d.ts.map +1 -1
- package/dist/cjs/nodes/general/general-custom-js.js +44 -7
- package/dist/cjs/nodes/general/general-custom-js.js.map +1 -1
- package/dist/cjs/nodes/general/general-http-request.d.ts.map +1 -1
- package/dist/cjs/nodes/general/general-http-request.js +431 -45
- package/dist/cjs/nodes/general/general-http-request.js.map +1 -1
- package/dist/cjs/nodes/general/general-rate-limiter.d.ts.map +1 -1
- package/dist/cjs/nodes/general/general-rate-limiter.js +46 -78
- package/dist/cjs/nodes/general/general-rate-limiter.js.map +1 -1
- package/dist/cjs/nodes/general/general-wait.d.ts +3 -0
- package/dist/cjs/nodes/general/general-wait.d.ts.map +1 -0
- package/dist/cjs/nodes/general/general-wait.js +81 -0
- package/dist/cjs/nodes/general/general-wait.js.map +1 -0
- package/dist/cjs/nodes/general/visitor-request.d.ts +44 -0
- package/dist/cjs/nodes/general/visitor-request.d.ts.map +1 -0
- package/dist/cjs/nodes/general/visitor-request.js +72 -0
- package/dist/cjs/nodes/general/visitor-request.js.map +1 -0
- package/dist/cjs/nodes/index.d.ts.map +1 -1
- package/dist/cjs/nodes/index.js +7 -1
- package/dist/cjs/nodes/index.js.map +1 -1
- package/dist/cjs/nodes/integrations/integration-slack.d.ts.map +1 -1
- package/dist/cjs/nodes/integrations/integration-slack.js +17 -6
- package/dist/cjs/nodes/integrations/integration-slack.js.map +1 -1
- package/dist/cjs/nodes/newsletter/newsletter-confirm.d.ts +3 -0
- package/dist/cjs/nodes/newsletter/newsletter-confirm.d.ts.map +1 -0
- package/dist/cjs/nodes/newsletter/newsletter-confirm.js +41 -0
- package/dist/cjs/nodes/newsletter/newsletter-confirm.js.map +1 -0
- package/dist/cjs/nodes/newsletter/newsletter-subscribe.d.ts +7 -0
- package/dist/cjs/nodes/newsletter/newsletter-subscribe.d.ts.map +1 -0
- package/dist/cjs/nodes/newsletter/newsletter-subscribe.js +69 -0
- package/dist/cjs/nodes/newsletter/newsletter-subscribe.js.map +1 -0
- package/dist/cjs/nodes/newsletter/newsletter-unsubscribe.d.ts +3 -0
- package/dist/cjs/nodes/newsletter/newsletter-unsubscribe.d.ts.map +1 -0
- package/dist/cjs/nodes/newsletter/newsletter-unsubscribe.js +42 -0
- package/dist/cjs/nodes/newsletter/newsletter-unsubscribe.js.map +1 -0
- package/dist/cjs/nodes/realtime/realtime-join-channel.d.ts.map +1 -1
- package/dist/cjs/nodes/realtime/realtime-join-channel.js +5 -4
- package/dist/cjs/nodes/realtime/realtime-join-channel.js.map +1 -1
- package/dist/cjs/nodes/realtime/realtime-send-channel-event.d.ts.map +1 -1
- package/dist/cjs/nodes/realtime/realtime-send-channel-event.js +11 -2
- package/dist/cjs/nodes/realtime/realtime-send-channel-event.js.map +1 -1
- package/dist/cjs/nodes/realtime/realtime-send-channel-message.d.ts.map +1 -1
- package/dist/cjs/nodes/realtime/realtime-send-channel-message.js +11 -2
- package/dist/cjs/nodes/realtime/realtime-send-channel-message.js.map +1 -1
- package/dist/cjs/nodes/sms/sms-infobip.d.ts.map +1 -1
- package/dist/cjs/nodes/sms/sms-infobip.js +11 -8
- package/dist/cjs/nodes/sms/sms-infobip.js.map +1 -1
- package/dist/cjs/nodes/sms/sms-smsapi.d.ts.map +1 -1
- package/dist/cjs/nodes/sms/sms-smsapi.js +11 -8
- package/dist/cjs/nodes/sms/sms-smsapi.js.map +1 -1
- package/dist/cjs/nodes/sms/sms-textmagic.d.ts.map +1 -1
- package/dist/cjs/nodes/sms/sms-textmagic.js +11 -8
- package/dist/cjs/nodes/sms/sms-textmagic.js.map +1 -1
- package/dist/cjs/nodes/sms/sms-twilio.d.ts.map +1 -1
- package/dist/cjs/nodes/sms/sms-twilio.js +12 -10
- package/dist/cjs/nodes/sms/sms-twilio.js.map +1 -1
- package/dist/cjs/nodes/types.d.ts +8 -1
- package/dist/cjs/nodes/types.d.ts.map +1 -1
- package/dist/cjs/nodes/utility/utility-similarity-scoring.d.ts.map +1 -1
- package/dist/cjs/nodes/utility/utility-similarity-scoring.js +29 -10
- package/dist/cjs/nodes/utility/utility-similarity-scoring.js.map +1 -1
- package/dist/cjs/page-access-guard-generator.d.ts +23 -0
- package/dist/cjs/page-access-guard-generator.d.ts.map +1 -0
- package/dist/cjs/page-access-guard-generator.js +135 -0
- package/dist/cjs/page-access-guard-generator.js.map +1 -0
- package/dist/cjs/password-reset-route-generator.d.ts +119 -0
- package/dist/cjs/password-reset-route-generator.d.ts.map +1 -0
- package/dist/cjs/password-reset-route-generator.js +460 -0
- package/dist/cjs/password-reset-route-generator.js.map +1 -0
- package/dist/cjs/payments/payment-core-code.d.ts.map +1 -1
- package/dist/cjs/payments/payment-core-code.js +12 -7
- package/dist/cjs/payments/payment-core-code.js.map +1 -1
- package/dist/cjs/project-code-scanner.d.ts +11 -0
- package/dist/cjs/project-code-scanner.d.ts.map +1 -0
- package/dist/cjs/project-code-scanner.js +80 -0
- package/dist/cjs/project-code-scanner.js.map +1 -0
- package/dist/cjs/public-step-guards.d.ts +122 -0
- package/dist/cjs/public-step-guards.d.ts.map +1 -0
- package/dist/cjs/public-step-guards.js +288 -0
- package/dist/cjs/public-step-guards.js.map +1 -0
- package/dist/cjs/publish-refusals.d.ts +66 -0
- package/dist/cjs/publish-refusals.d.ts.map +1 -0
- package/dist/cjs/publish-refusals.js +278 -0
- package/dist/cjs/publish-refusals.js.map +1 -0
- package/dist/cjs/realtime-generator.d.ts +63 -1
- package/dist/cjs/realtime-generator.d.ts.map +1 -1
- package/dist/cjs/realtime-generator.js +404 -230
- package/dist/cjs/realtime-generator.js.map +1 -1
- package/dist/cjs/runtime-storage-generator.d.ts +32 -1
- package/dist/cjs/runtime-storage-generator.d.ts.map +1 -1
- package/dist/cjs/runtime-storage-generator.js +265 -12
- package/dist/cjs/runtime-storage-generator.js.map +1 -1
- package/dist/cjs/security-runtime/index.d.ts +14 -0
- package/dist/cjs/security-runtime/index.d.ts.map +1 -0
- package/dist/cjs/security-runtime/index.js +48 -0
- package/dist/cjs/security-runtime/index.js.map +1 -0
- package/dist/cjs/security-runtime/security-runtime-code.d.ts +53 -0
- package/dist/cjs/security-runtime/security-runtime-code.d.ts.map +1 -0
- package/dist/cjs/security-runtime/security-runtime-code.js +580 -0
- package/dist/cjs/security-runtime/security-runtime-code.js.map +1 -0
- package/dist/cjs/security-scanner.d.ts +72 -3
- package/dist/cjs/security-scanner.d.ts.map +1 -1
- package/dist/cjs/security-scanner.js +220 -8
- package/dist/cjs/security-scanner.js.map +1 -1
- package/dist/cjs/segment-splitter.d.ts.map +1 -1
- package/dist/cjs/segment-splitter.js +10 -2
- package/dist/cjs/segment-splitter.js.map +1 -1
- package/dist/cjs/segment-trust.d.ts +36 -0
- package/dist/cjs/segment-trust.d.ts.map +1 -1
- package/dist/cjs/segment-trust.js +147 -3
- package/dist/cjs/segment-trust.js.map +1 -1
- package/dist/cjs/self-call-headers.d.ts +31 -0
- package/dist/cjs/self-call-headers.d.ts.map +1 -0
- package/dist/cjs/self-call-headers.js +48 -0
- package/dist/cjs/self-call-headers.js.map +1 -0
- package/dist/cjs/sent-email-log/index.d.ts +7 -0
- package/dist/cjs/sent-email-log/index.d.ts.map +1 -1
- package/dist/cjs/sent-email-log/index.js +17 -1
- package/dist/cjs/sent-email-log/index.js.map +1 -1
- package/dist/cjs/sent-email-log/sent-email-log-code.d.ts +7 -0
- package/dist/cjs/sent-email-log/sent-email-log-code.d.ts.map +1 -1
- package/dist/cjs/sent-email-log/sent-email-log-code.js +17 -3
- package/dist/cjs/sent-email-log/sent-email-log-code.js.map +1 -1
- package/dist/cjs/server-custom-node-call.d.ts +79 -0
- package/dist/cjs/server-custom-node-call.d.ts.map +1 -0
- package/dist/cjs/server-custom-node-call.js +285 -0
- package/dist/cjs/server-custom-node-call.js.map +1 -0
- package/dist/cjs/server-runtime-code.d.ts +39 -12
- package/dist/cjs/server-runtime-code.d.ts.map +1 -1
- package/dist/cjs/server-runtime-code.js +484 -41
- package/dist/cjs/server-runtime-code.js.map +1 -1
- package/dist/cjs/session-cookie-resolver.d.ts +3 -1
- package/dist/cjs/session-cookie-resolver.d.ts.map +1 -1
- package/dist/cjs/session-revocation-generator.d.ts +39 -0
- package/dist/cjs/session-revocation-generator.d.ts.map +1 -0
- package/dist/cjs/session-revocation-generator.js +177 -0
- package/dist/cjs/session-revocation-generator.js.map +1 -0
- package/dist/cjs/slack-message-values.d.ts +6 -0
- package/dist/cjs/slack-message-values.d.ts.map +1 -0
- package/dist/cjs/slack-message-values.js +73 -0
- package/dist/cjs/slack-message-values.js.map +1 -0
- package/dist/cjs/transactional-email-code.d.ts +11 -0
- package/dist/cjs/transactional-email-code.d.ts.map +1 -1
- package/dist/cjs/transactional-email-code.js +29 -5
- package/dist/cjs/transactional-email-code.js.map +1 -1
- package/dist/cjs/trigger-generator.d.ts +2 -0
- package/dist/cjs/trigger-generator.d.ts.map +1 -1
- package/dist/cjs/trigger-generator.js +17 -4
- package/dist/cjs/trigger-generator.js.map +1 -1
- package/dist/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/cjs/visitor-step-limits.d.ts +66 -0
- package/dist/cjs/visitor-step-limits.d.ts.map +1 -0
- package/dist/cjs/visitor-step-limits.js +187 -0
- package/dist/cjs/visitor-step-limits.js.map +1 -0
- package/dist/cjs/webhook-generator.d.ts.map +1 -1
- package/dist/cjs/webhook-generator.js +93 -15
- package/dist/cjs/webhook-generator.js.map +1 -1
- package/dist/cjs/webhook-signature-verification.d.ts.map +1 -1
- package/dist/cjs/webhook-signature-verification.js +13 -3
- package/dist/cjs/webhook-signature-verification.js.map +1 -1
- package/dist/cjs/workflow-auth-generator.d.ts +4 -1
- package/dist/cjs/workflow-auth-generator.d.ts.map +1 -1
- package/dist/cjs/workflow-auth-generator.js +8 -3
- package/dist/cjs/workflow-auth-generator.js.map +1 -1
- package/dist/cjs/workflow-component-plugin.js +11 -3
- package/dist/cjs/workflow-component-plugin.js.map +1 -1
- package/dist/cjs/workflow-project-plugin.d.ts.map +1 -1
- package/dist/cjs/workflow-project-plugin.js +302 -56
- package/dist/cjs/workflow-project-plugin.js.map +1 -1
- package/dist/cjs/workflow-scope.d.ts.map +1 -1
- package/dist/cjs/workflow-scope.js +5 -0
- package/dist/cjs/workflow-scope.js.map +1 -1
- package/dist/esm/account-delete-route-generator.d.ts +1 -0
- package/dist/esm/account-delete-route-generator.d.ts.map +1 -1
- package/dist/esm/account-delete-route-generator.js +18 -3
- package/dist/esm/account-delete-route-generator.js.map +1 -1
- package/dist/esm/api-route-generator.d.ts +52 -3
- package/dist/esm/api-route-generator.d.ts.map +1 -1
- package/dist/esm/api-route-generator.js +595 -142
- package/dist/esm/api-route-generator.js.map +1 -1
- package/dist/esm/auth-generator.d.ts +126 -3
- package/dist/esm/auth-generator.d.ts.map +1 -1
- package/dist/esm/auth-generator.js +1350 -140
- package/dist/esm/auth-generator.js.map +1 -1
- package/dist/esm/automations/activity-kicks.d.ts +12 -0
- package/dist/esm/automations/activity-kicks.d.ts.map +1 -0
- package/dist/esm/automations/activity-kicks.js +118 -0
- package/dist/esm/automations/activity-kicks.js.map +1 -0
- package/dist/esm/automations/app-events-source.d.ts +33 -0
- package/dist/esm/automations/app-events-source.d.ts.map +1 -0
- package/dist/esm/automations/app-events-source.js +104 -0
- package/dist/esm/automations/app-events-source.js.map +1 -0
- package/dist/esm/automations/automations-project-plugin.d.ts +21 -0
- package/dist/esm/automations/automations-project-plugin.d.ts.map +1 -0
- package/dist/esm/automations/automations-project-plugin.js +98 -0
- package/dist/esm/automations/automations-project-plugin.js.map +1 -0
- package/dist/esm/automations/automations-scope.d.ts +104 -0
- package/dist/esm/automations/automations-scope.d.ts.map +1 -0
- package/dist/esm/automations/automations-scope.js +165 -0
- package/dist/esm/automations/automations-scope.js.map +1 -0
- package/dist/esm/automations/dispatcher-source.d.ts +72 -0
- package/dist/esm/automations/dispatcher-source.d.ts.map +1 -0
- package/dist/esm/automations/dispatcher-source.js +999 -0
- package/dist/esm/automations/dispatcher-source.js.map +1 -0
- package/dist/esm/automations/event-bus-source.d.ts +44 -0
- package/dist/esm/automations/event-bus-source.d.ts.map +1 -0
- package/dist/esm/automations/event-bus-source.js +421 -0
- package/dist/esm/automations/event-bus-source.js.map +1 -0
- package/dist/esm/automations/handler-module-generator.d.ts +25 -0
- package/dist/esm/automations/handler-module-generator.d.ts.map +1 -0
- package/dist/esm/automations/handler-module-generator.js +71 -0
- package/dist/esm/automations/handler-module-generator.js.map +1 -0
- package/dist/esm/automations/hydrators-source.d.ts +33 -0
- package/dist/esm/automations/hydrators-source.d.ts.map +1 -0
- package/dist/esm/automations/hydrators-source.js +567 -0
- package/dist/esm/automations/hydrators-source.js.map +1 -0
- package/dist/esm/booking-calendar-feed-route-generator.d.ts.map +1 -1
- package/dist/esm/booking-calendar-feed-route-generator.js +8 -0
- package/dist/esm/booking-calendar-feed-route-generator.js.map +1 -1
- package/dist/esm/configured-nextauth-url.d.ts +17 -0
- package/dist/esm/configured-nextauth-url.d.ts.map +1 -0
- package/dist/esm/configured-nextauth-url.js +17 -0
- package/dist/esm/configured-nextauth-url.js.map +1 -0
- package/dist/esm/cron-request-verification.d.ts +22 -1
- package/dist/esm/cron-request-verification.d.ts.map +1 -1
- package/dist/esm/cron-request-verification.js +48 -5
- package/dist/esm/cron-request-verification.js.map +1 -1
- package/dist/esm/data-api-route-generator.d.ts +19 -0
- package/dist/esm/data-api-route-generator.d.ts.map +1 -1
- package/dist/esm/data-api-route-generator.js +710 -43
- package/dist/esm/data-api-route-generator.js.map +1 -1
- package/dist/esm/ecommerce/parameterized-stock-chain.d.ts +3 -1
- package/dist/esm/ecommerce/parameterized-stock-chain.d.ts.map +1 -1
- package/dist/esm/ecommerce/parameterized-stock-chain.js +43 -4
- package/dist/esm/ecommerce/parameterized-stock-chain.js.map +1 -1
- package/dist/esm/ecommerce/place-order-guards.d.ts +126 -0
- package/dist/esm/ecommerce/place-order-guards.d.ts.map +1 -0
- package/dist/esm/ecommerce/place-order-guards.js +655 -0
- package/dist/esm/ecommerce/place-order-guards.js.map +1 -0
- package/dist/esm/ecommerce-customhandler-rewriter.d.ts +2 -0
- package/dist/esm/ecommerce-customhandler-rewriter.d.ts.map +1 -1
- package/dist/esm/ecommerce-customhandler-rewriter.js +38 -2
- package/dist/esm/ecommerce-customhandler-rewriter.js.map +1 -1
- package/dist/esm/executor-generator.d.ts.map +1 -1
- package/dist/esm/executor-generator.js +368 -60
- package/dist/esm/executor-generator.js.map +1 -1
- package/dist/esm/graph-utils.d.ts +9 -0
- package/dist/esm/graph-utils.d.ts.map +1 -1
- package/dist/esm/graph-utils.js +30 -0
- package/dist/esm/graph-utils.js.map +1 -1
- package/dist/esm/index.d.ts +20 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +27 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/invoice/api-routes-code.d.ts +9 -3
- package/dist/esm/invoice/api-routes-code.d.ts.map +1 -1
- package/dist/esm/invoice/api-routes-code.js +9 -7
- package/dist/esm/invoice/api-routes-code.js.map +1 -1
- package/dist/esm/invoice/index.d.ts.map +1 -1
- package/dist/esm/invoice/index.js +12 -7
- package/dist/esm/invoice/index.js.map +1 -1
- package/dist/esm/invoice/invoice-assembly-code.d.ts.map +1 -1
- package/dist/esm/invoice/invoice-assembly-code.js +8 -3
- package/dist/esm/invoice/invoice-assembly-code.js.map +1 -1
- package/dist/esm/invoice/pdf-generator-code.d.ts.map +1 -1
- package/dist/esm/invoice/pdf-generator-code.js +2 -1
- package/dist/esm/invoice/pdf-generator-code.js.map +1 -1
- package/dist/esm/invoice/pdf-service-client-code.d.ts.map +1 -1
- package/dist/esm/invoice/pdf-service-client-code.js +15 -7
- package/dist/esm/invoice/pdf-service-client-code.js.map +1 -1
- package/dist/esm/newsletter/admin-route-code.d.ts +60 -0
- package/dist/esm/newsletter/admin-route-code.d.ts.map +1 -0
- package/dist/esm/newsletter/admin-route-code.js +295 -0
- package/dist/esm/newsletter/admin-route-code.js.map +1 -0
- package/dist/esm/newsletter/helper-code.d.ts +109 -0
- package/dist/esm/newsletter/helper-code.d.ts.map +1 -0
- package/dist/esm/newsletter/helper-code.js +656 -0
- package/dist/esm/newsletter/helper-code.js.map +1 -0
- package/dist/esm/newsletter/newsletter-scope.d.ts +65 -0
- package/dist/esm/newsletter/newsletter-scope.d.ts.map +1 -0
- package/dist/esm/newsletter/newsletter-scope.js +97 -0
- package/dist/esm/newsletter/newsletter-scope.js.map +1 -0
- package/dist/esm/newsletter/project-plugin.d.ts +18 -0
- package/dist/esm/newsletter/project-plugin.d.ts.map +1 -0
- package/dist/esm/newsletter/project-plugin.js +93 -0
- package/dist/esm/newsletter/project-plugin.js.map +1 -0
- package/dist/esm/newsletter/routes-code.d.ts +6 -0
- package/dist/esm/newsletter/routes-code.d.ts.map +1 -0
- package/dist/esm/newsletter/routes-code.js +175 -0
- package/dist/esm/newsletter/routes-code.js.map +1 -0
- package/dist/esm/nodes/account/account-compare-passwords.d.ts.map +1 -1
- package/dist/esm/nodes/account/account-compare-passwords.js +16 -6
- package/dist/esm/nodes/account/account-compare-passwords.js.map +1 -1
- package/dist/esm/nodes/account/account-delete-current.js +1 -1
- package/dist/esm/nodes/account/account-get-current.js +1 -1
- package/dist/esm/nodes/account/account-hash-password.d.ts.map +1 -1
- package/dist/esm/nodes/account/account-hash-password.js +15 -3
- package/dist/esm/nodes/account/account-hash-password.js.map +1 -1
- package/dist/esm/nodes/account/account-login.d.ts.map +1 -1
- package/dist/esm/nodes/account/account-login.js +23 -6
- package/dist/esm/nodes/account/account-login.js.map +1 -1
- package/dist/esm/nodes/account/account-logout.js +1 -1
- package/dist/esm/nodes/account/account-refresh-session.js +1 -1
- package/dist/esm/nodes/account/account-request-password-reset.d.ts +3 -0
- package/dist/esm/nodes/account/account-request-password-reset.d.ts.map +1 -0
- package/dist/esm/nodes/account/account-request-password-reset.js +43 -0
- package/dist/esm/nodes/account/account-request-password-reset.js.map +1 -0
- package/dist/esm/nodes/account/account-reset-password.d.ts +3 -0
- package/dist/esm/nodes/account/account-reset-password.d.ts.map +1 -0
- package/dist/esm/nodes/account/account-reset-password.js +41 -0
- package/dist/esm/nodes/account/account-reset-password.js.map +1 -0
- package/dist/esm/nodes/account/account-signup.d.ts.map +1 -1
- package/dist/esm/nodes/account/account-signup.js +82 -19
- package/dist/esm/nodes/account/account-signup.js.map +1 -1
- package/dist/esm/nodes/account/account-social-login.js +1 -1
- package/dist/esm/nodes/ai/ai-custom-prompt.d.ts.map +1 -1
- package/dist/esm/nodes/ai/ai-custom-prompt.js +20 -5
- package/dist/esm/nodes/ai/ai-custom-prompt.js.map +1 -1
- package/dist/esm/nodes/ai/ai-detect-language.d.ts.map +1 -1
- package/dist/esm/nodes/ai/ai-detect-language.js +20 -5
- package/dist/esm/nodes/ai/ai-detect-language.js.map +1 -1
- package/dist/esm/nodes/ai/ai-generate-text-embedding.d.ts.map +1 -1
- package/dist/esm/nodes/ai/ai-generate-text-embedding.js +10 -2
- package/dist/esm/nodes/ai/ai-generate-text-embedding.js.map +1 -1
- package/dist/esm/nodes/ai/ai-provider-utils-sources.generated.js +2 -2
- package/dist/esm/nodes/ai/ai-provider-utils-sources.generated.js.map +1 -1
- package/dist/esm/nodes/ai/ai-provider-utils.d.ts +31 -2
- package/dist/esm/nodes/ai/ai-provider-utils.d.ts.map +1 -1
- package/dist/esm/nodes/ai/ai-provider-utils.js +124 -10
- package/dist/esm/nodes/ai/ai-provider-utils.js.map +1 -1
- package/dist/esm/nodes/ai/ai-select-database-data.d.ts.map +1 -1
- package/dist/esm/nodes/ai/ai-select-database-data.js +6 -2
- package/dist/esm/nodes/ai/ai-select-database-data.js.map +1 -1
- package/dist/esm/nodes/ai/ai-sentiment-analysis.d.ts.map +1 -1
- package/dist/esm/nodes/ai/ai-sentiment-analysis.js +20 -5
- package/dist/esm/nodes/ai/ai-sentiment-analysis.js.map +1 -1
- package/dist/esm/nodes/ai/ai-summarization.d.ts.map +1 -1
- package/dist/esm/nodes/ai/ai-summarization.js +20 -5
- package/dist/esm/nodes/ai/ai-summarization.js.map +1 -1
- package/dist/esm/nodes/ai/ai-text-classifier.d.ts.map +1 -1
- package/dist/esm/nodes/ai/ai-text-classifier.js +20 -5
- package/dist/esm/nodes/ai/ai-text-classifier.js.map +1 -1
- package/dist/esm/nodes/ai/ai-text-transform.d.ts.map +1 -1
- package/dist/esm/nodes/ai/ai-text-transform.js +20 -5
- package/dist/esm/nodes/ai/ai-text-transform.js.map +1 -1
- package/dist/esm/nodes/analytics/analytics-track-outcome.d.ts +3 -0
- package/dist/esm/nodes/analytics/analytics-track-outcome.d.ts.map +1 -0
- package/dist/esm/nodes/analytics/analytics-track-outcome.js +107 -0
- package/dist/esm/nodes/analytics/analytics-track-outcome.js.map +1 -0
- package/dist/esm/nodes/cart/cart-price-order.d.ts.map +1 -1
- package/dist/esm/nodes/cart/cart-price-order.js +161 -2
- package/dist/esm/nodes/cart/cart-price-order.js.map +1 -1
- package/dist/esm/nodes/cost-bearing-node-types.d.ts +4 -0
- package/dist/esm/nodes/cost-bearing-node-types.d.ts.map +1 -0
- package/dist/esm/nodes/cost-bearing-node-types.js +39 -0
- package/dist/esm/nodes/cost-bearing-node-types.js.map +1 -0
- package/dist/esm/nodes/data/data-select.d.ts.map +1 -1
- package/dist/esm/nodes/data/data-select.js +12 -2
- package/dist/esm/nodes/data/data-select.js.map +1 -1
- package/dist/esm/nodes/email/email-mailersend.d.ts.map +1 -1
- package/dist/esm/nodes/email/email-mailersend.js +15 -11
- package/dist/esm/nodes/email/email-mailersend.js.map +1 -1
- package/dist/esm/nodes/email/email-mailgun.d.ts.map +1 -1
- package/dist/esm/nodes/email/email-mailgun.js +15 -15
- package/dist/esm/nodes/email/email-mailgun.js.map +1 -1
- package/dist/esm/nodes/email/email-postmark.d.ts.map +1 -1
- package/dist/esm/nodes/email/email-postmark.js +15 -15
- package/dist/esm/nodes/email/email-postmark.js.map +1 -1
- package/dist/esm/nodes/email/email-resend.d.ts.map +1 -1
- package/dist/esm/nodes/email/email-resend.js +15 -15
- package/dist/esm/nodes/email/email-resend.js.map +1 -1
- package/dist/esm/nodes/email/email-sendgrid.d.ts.map +1 -1
- package/dist/esm/nodes/email/email-sendgrid.js +15 -15
- package/dist/esm/nodes/email/email-sendgrid.js.map +1 -1
- package/dist/esm/nodes/email/html-escape-code.d.ts +3 -0
- package/dist/esm/nodes/email/html-escape-code.d.ts.map +1 -0
- package/dist/esm/nodes/email/html-escape-code.js +18 -0
- package/dist/esm/nodes/email/html-escape-code.js.map +1 -0
- package/dist/esm/nodes/email/message-trust.d.ts +40 -0
- package/dist/esm/nodes/email/message-trust.d.ts.map +1 -0
- package/dist/esm/nodes/email/message-trust.js +161 -0
- package/dist/esm/nodes/email/message-trust.js.map +1 -0
- package/dist/esm/nodes/email/outbound-message-guard.d.ts +113 -0
- package/dist/esm/nodes/email/outbound-message-guard.d.ts.map +1 -0
- package/dist/esm/nodes/email/outbound-message-guard.js +452 -0
- package/dist/esm/nodes/email/outbound-message-guard.js.map +1 -0
- package/dist/esm/nodes/email/trusted-html-code.d.ts +22 -0
- package/dist/esm/nodes/email/trusted-html-code.d.ts.map +1 -0
- package/dist/esm/nodes/email/trusted-html-code.js +49 -0
- package/dist/esm/nodes/email/trusted-html-code.js.map +1 -0
- package/dist/esm/nodes/general/general-custom-js.d.ts.map +1 -1
- package/dist/esm/nodes/general/general-custom-js.js +44 -7
- package/dist/esm/nodes/general/general-custom-js.js.map +1 -1
- package/dist/esm/nodes/general/general-http-request.d.ts.map +1 -1
- package/dist/esm/nodes/general/general-http-request.js +431 -45
- package/dist/esm/nodes/general/general-http-request.js.map +1 -1
- package/dist/esm/nodes/general/general-rate-limiter.d.ts.map +1 -1
- package/dist/esm/nodes/general/general-rate-limiter.js +46 -78
- package/dist/esm/nodes/general/general-rate-limiter.js.map +1 -1
- package/dist/esm/nodes/general/general-wait.d.ts +3 -0
- package/dist/esm/nodes/general/general-wait.d.ts.map +1 -0
- package/dist/esm/nodes/general/general-wait.js +78 -0
- package/dist/esm/nodes/general/general-wait.js.map +1 -0
- package/dist/esm/nodes/general/visitor-request.d.ts +44 -0
- package/dist/esm/nodes/general/visitor-request.d.ts.map +1 -0
- package/dist/esm/nodes/general/visitor-request.js +65 -0
- package/dist/esm/nodes/general/visitor-request.js.map +1 -0
- package/dist/esm/nodes/index.d.ts.map +1 -1
- package/dist/esm/nodes/index.js +7 -1
- package/dist/esm/nodes/index.js.map +1 -1
- package/dist/esm/nodes/integrations/integration-slack.d.ts.map +1 -1
- package/dist/esm/nodes/integrations/integration-slack.js +17 -6
- package/dist/esm/nodes/integrations/integration-slack.js.map +1 -1
- package/dist/esm/nodes/newsletter/newsletter-confirm.d.ts +3 -0
- package/dist/esm/nodes/newsletter/newsletter-confirm.d.ts.map +1 -0
- package/dist/esm/nodes/newsletter/newsletter-confirm.js +38 -0
- package/dist/esm/nodes/newsletter/newsletter-confirm.js.map +1 -0
- package/dist/esm/nodes/newsletter/newsletter-subscribe.d.ts +7 -0
- package/dist/esm/nodes/newsletter/newsletter-subscribe.d.ts.map +1 -0
- package/dist/esm/nodes/newsletter/newsletter-subscribe.js +66 -0
- package/dist/esm/nodes/newsletter/newsletter-subscribe.js.map +1 -0
- package/dist/esm/nodes/newsletter/newsletter-unsubscribe.d.ts +3 -0
- package/dist/esm/nodes/newsletter/newsletter-unsubscribe.d.ts.map +1 -0
- package/dist/esm/nodes/newsletter/newsletter-unsubscribe.js +39 -0
- package/dist/esm/nodes/newsletter/newsletter-unsubscribe.js.map +1 -0
- package/dist/esm/nodes/realtime/realtime-join-channel.d.ts.map +1 -1
- package/dist/esm/nodes/realtime/realtime-join-channel.js +5 -4
- package/dist/esm/nodes/realtime/realtime-join-channel.js.map +1 -1
- package/dist/esm/nodes/realtime/realtime-send-channel-event.d.ts.map +1 -1
- package/dist/esm/nodes/realtime/realtime-send-channel-event.js +11 -2
- package/dist/esm/nodes/realtime/realtime-send-channel-event.js.map +1 -1
- package/dist/esm/nodes/realtime/realtime-send-channel-message.d.ts.map +1 -1
- package/dist/esm/nodes/realtime/realtime-send-channel-message.js +11 -2
- package/dist/esm/nodes/realtime/realtime-send-channel-message.js.map +1 -1
- package/dist/esm/nodes/sms/sms-infobip.d.ts.map +1 -1
- package/dist/esm/nodes/sms/sms-infobip.js +11 -8
- package/dist/esm/nodes/sms/sms-infobip.js.map +1 -1
- package/dist/esm/nodes/sms/sms-smsapi.d.ts.map +1 -1
- package/dist/esm/nodes/sms/sms-smsapi.js +11 -8
- package/dist/esm/nodes/sms/sms-smsapi.js.map +1 -1
- package/dist/esm/nodes/sms/sms-textmagic.d.ts.map +1 -1
- package/dist/esm/nodes/sms/sms-textmagic.js +11 -8
- package/dist/esm/nodes/sms/sms-textmagic.js.map +1 -1
- package/dist/esm/nodes/sms/sms-twilio.d.ts.map +1 -1
- package/dist/esm/nodes/sms/sms-twilio.js +12 -10
- package/dist/esm/nodes/sms/sms-twilio.js.map +1 -1
- package/dist/esm/nodes/types.d.ts +8 -1
- package/dist/esm/nodes/types.d.ts.map +1 -1
- package/dist/esm/nodes/utility/utility-similarity-scoring.d.ts.map +1 -1
- package/dist/esm/nodes/utility/utility-similarity-scoring.js +29 -10
- package/dist/esm/nodes/utility/utility-similarity-scoring.js.map +1 -1
- package/dist/esm/page-access-guard-generator.d.ts +23 -0
- package/dist/esm/page-access-guard-generator.d.ts.map +1 -0
- package/dist/esm/page-access-guard-generator.js +131 -0
- package/dist/esm/page-access-guard-generator.js.map +1 -0
- package/dist/esm/password-reset-route-generator.d.ts +119 -0
- package/dist/esm/password-reset-route-generator.d.ts.map +1 -0
- package/dist/esm/password-reset-route-generator.js +448 -0
- package/dist/esm/password-reset-route-generator.js.map +1 -0
- package/dist/esm/payments/payment-core-code.d.ts.map +1 -1
- package/dist/esm/payments/payment-core-code.js +12 -7
- package/dist/esm/payments/payment-core-code.js.map +1 -1
- package/dist/esm/project-code-scanner.d.ts +11 -0
- package/dist/esm/project-code-scanner.d.ts.map +1 -0
- package/dist/esm/project-code-scanner.js +75 -0
- package/dist/esm/project-code-scanner.js.map +1 -0
- package/dist/esm/public-step-guards.d.ts +122 -0
- package/dist/esm/public-step-guards.d.ts.map +1 -0
- package/dist/esm/public-step-guards.js +280 -0
- package/dist/esm/public-step-guards.js.map +1 -0
- package/dist/esm/publish-refusals.d.ts +66 -0
- package/dist/esm/publish-refusals.d.ts.map +1 -0
- package/dist/esm/publish-refusals.js +271 -0
- package/dist/esm/publish-refusals.js.map +1 -0
- package/dist/esm/realtime-generator.d.ts +63 -1
- package/dist/esm/realtime-generator.d.ts.map +1 -1
- package/dist/esm/realtime-generator.js +401 -229
- package/dist/esm/realtime-generator.js.map +1 -1
- package/dist/esm/runtime-storage-generator.d.ts +32 -1
- package/dist/esm/runtime-storage-generator.d.ts.map +1 -1
- package/dist/esm/runtime-storage-generator.js +264 -11
- package/dist/esm/runtime-storage-generator.js.map +1 -1
- package/dist/esm/security-runtime/index.d.ts +14 -0
- package/dist/esm/security-runtime/index.d.ts.map +1 -0
- package/dist/esm/security-runtime/index.js +37 -0
- package/dist/esm/security-runtime/index.js.map +1 -0
- package/dist/esm/security-runtime/security-runtime-code.d.ts +53 -0
- package/dist/esm/security-runtime/security-runtime-code.d.ts.map +1 -0
- package/dist/esm/security-runtime/security-runtime-code.js +575 -0
- package/dist/esm/security-runtime/security-runtime-code.js.map +1 -0
- package/dist/esm/security-scanner.d.ts +72 -3
- package/dist/esm/security-scanner.d.ts.map +1 -1
- package/dist/esm/security-scanner.js +217 -8
- package/dist/esm/security-scanner.js.map +1 -1
- package/dist/esm/segment-splitter.d.ts.map +1 -1
- package/dist/esm/segment-splitter.js +10 -2
- package/dist/esm/segment-splitter.js.map +1 -1
- package/dist/esm/segment-trust.d.ts +36 -0
- package/dist/esm/segment-trust.d.ts.map +1 -1
- package/dist/esm/segment-trust.js +146 -2
- package/dist/esm/segment-trust.js.map +1 -1
- package/dist/esm/self-call-headers.d.ts +31 -0
- package/dist/esm/self-call-headers.d.ts.map +1 -0
- package/dist/esm/self-call-headers.js +43 -0
- package/dist/esm/self-call-headers.js.map +1 -0
- package/dist/esm/sent-email-log/index.d.ts +7 -0
- package/dist/esm/sent-email-log/index.d.ts.map +1 -1
- package/dist/esm/sent-email-log/index.js +15 -0
- package/dist/esm/sent-email-log/index.js.map +1 -1
- package/dist/esm/sent-email-log/sent-email-log-code.d.ts +7 -0
- package/dist/esm/sent-email-log/sent-email-log-code.d.ts.map +1 -1
- package/dist/esm/sent-email-log/sent-email-log-code.js +17 -3
- package/dist/esm/sent-email-log/sent-email-log-code.js.map +1 -1
- package/dist/esm/server-custom-node-call.d.ts +79 -0
- package/dist/esm/server-custom-node-call.d.ts.map +1 -0
- package/dist/esm/server-custom-node-call.js +278 -0
- package/dist/esm/server-custom-node-call.js.map +1 -0
- package/dist/esm/server-runtime-code.d.ts +39 -12
- package/dist/esm/server-runtime-code.d.ts.map +1 -1
- package/dist/esm/server-runtime-code.js +483 -40
- package/dist/esm/server-runtime-code.js.map +1 -1
- package/dist/esm/session-cookie-resolver.d.ts +3 -1
- package/dist/esm/session-cookie-resolver.d.ts.map +1 -1
- package/dist/esm/session-revocation-generator.d.ts +39 -0
- package/dist/esm/session-revocation-generator.d.ts.map +1 -0
- package/dist/esm/session-revocation-generator.js +172 -0
- package/dist/esm/session-revocation-generator.js.map +1 -0
- package/dist/esm/slack-message-values.d.ts +6 -0
- package/dist/esm/slack-message-values.d.ts.map +1 -0
- package/dist/esm/slack-message-values.js +68 -0
- package/dist/esm/slack-message-values.js.map +1 -0
- package/dist/esm/transactional-email-code.d.ts +11 -0
- package/dist/esm/transactional-email-code.d.ts.map +1 -1
- package/dist/esm/transactional-email-code.js +28 -4
- package/dist/esm/transactional-email-code.js.map +1 -1
- package/dist/esm/trigger-generator.d.ts +2 -0
- package/dist/esm/trigger-generator.d.ts.map +1 -1
- package/dist/esm/trigger-generator.js +15 -3
- package/dist/esm/trigger-generator.js.map +1 -1
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/dist/esm/visitor-step-limits.d.ts +66 -0
- package/dist/esm/visitor-step-limits.d.ts.map +1 -0
- package/dist/esm/visitor-step-limits.js +181 -0
- package/dist/esm/visitor-step-limits.js.map +1 -0
- package/dist/esm/webhook-generator.d.ts.map +1 -1
- package/dist/esm/webhook-generator.js +93 -15
- package/dist/esm/webhook-generator.js.map +1 -1
- package/dist/esm/webhook-signature-verification.d.ts.map +1 -1
- package/dist/esm/webhook-signature-verification.js +13 -3
- package/dist/esm/webhook-signature-verification.js.map +1 -1
- package/dist/esm/workflow-auth-generator.d.ts +4 -1
- package/dist/esm/workflow-auth-generator.d.ts.map +1 -1
- package/dist/esm/workflow-auth-generator.js +8 -3
- package/dist/esm/workflow-auth-generator.js.map +1 -1
- package/dist/esm/workflow-component-plugin.js +12 -4
- package/dist/esm/workflow-component-plugin.js.map +1 -1
- package/dist/esm/workflow-project-plugin.d.ts.map +1 -1
- package/dist/esm/workflow-project-plugin.js +306 -60
- package/dist/esm/workflow-project-plugin.js.map +1 -1
- package/dist/esm/workflow-scope.d.ts.map +1 -1
- package/dist/esm/workflow-scope.js +5 -0
- package/dist/esm/workflow-scope.js.map +1 -1
- package/package.json +4 -4
- package/src/account-delete-route-generator.ts +28 -4
- package/src/api-route-generator.ts +712 -134
- package/src/auth-generator.ts +1471 -142
- package/src/automations/activity-kicks.ts +139 -0
- package/src/automations/app-events-source.ts +117 -0
- package/src/automations/automations-project-plugin.ts +202 -0
- package/src/automations/automations-scope.ts +196 -0
- package/src/automations/dispatcher-source.ts +1072 -0
- package/src/automations/event-bus-source.ts +428 -0
- package/src/automations/handler-module-generator.ts +107 -0
- package/src/automations/hydrators-source.ts +647 -0
- package/src/booking-calendar-feed-route-generator.ts +8 -0
- package/src/configured-nextauth-url.ts +17 -0
- package/src/cron-request-verification.ts +55 -5
- package/src/data-api-route-generator.ts +780 -43
- package/src/ecommerce/parameterized-stock-chain.ts +52 -5
- package/src/ecommerce/place-order-guards.ts +785 -0
- package/src/ecommerce-customhandler-rewriter.ts +55 -2
- package/src/executor-generator.ts +372 -60
- package/src/graph-utils.ts +33 -0
- package/src/index.ts +70 -0
- package/src/invoice/api-routes-code.ts +20 -7
- package/src/invoice/index.ts +11 -6
- package/src/invoice/invoice-assembly-code.ts +8 -3
- package/src/invoice/pdf-generator-code.ts +2 -1
- package/src/invoice/pdf-service-client-code.ts +15 -7
- package/src/newsletter/admin-route-code.ts +319 -0
- package/src/newsletter/helper-code.ts +748 -0
- package/src/newsletter/newsletter-scope.ts +116 -0
- package/src/newsletter/project-plugin.ts +119 -0
- package/src/newsletter/routes-code.ts +186 -0
- package/src/nodes/account/account-compare-passwords.ts +17 -6
- package/src/nodes/account/account-delete-current.ts +1 -1
- package/src/nodes/account/account-get-current.ts +1 -1
- package/src/nodes/account/account-hash-password.ts +19 -3
- package/src/nodes/account/account-login.ts +24 -7
- package/src/nodes/account/account-logout.ts +1 -1
- package/src/nodes/account/account-refresh-session.ts +1 -1
- package/src/nodes/account/account-request-password-reset.ts +47 -0
- package/src/nodes/account/account-reset-password.ts +45 -0
- package/src/nodes/account/account-signup.ts +86 -20
- package/src/nodes/account/account-social-login.ts +1 -1
- package/src/nodes/ai/ai-custom-prompt.ts +25 -6
- package/src/nodes/ai/ai-detect-language.ts +25 -6
- package/src/nodes/ai/ai-generate-text-embedding.ts +16 -3
- package/src/nodes/ai/ai-provider-utils-sources.generated.ts +2 -2
- package/src/nodes/ai/ai-provider-utils.ts +135 -10
- package/src/nodes/ai/ai-select-database-data.ts +8 -3
- package/src/nodes/ai/ai-sentiment-analysis.ts +25 -6
- package/src/nodes/ai/ai-summarization.ts +25 -6
- package/src/nodes/ai/ai-text-classifier.ts +25 -6
- package/src/nodes/ai/ai-text-transform.ts +25 -6
- package/src/nodes/analytics/analytics-track-outcome.ts +111 -0
- package/src/nodes/cart/cart-price-order.ts +200 -2
- package/src/nodes/cost-bearing-node-types.ts +45 -0
- package/src/nodes/data/data-select.ts +11 -2
- package/src/nodes/email/email-mailersend.ts +16 -8
- package/src/nodes/email/email-mailgun.ts +17 -12
- package/src/nodes/email/email-postmark.ts +17 -12
- package/src/nodes/email/email-resend.ts +17 -12
- package/src/nodes/email/email-sendgrid.ts +17 -12
- package/src/nodes/email/html-escape-code.ts +21 -0
- package/src/nodes/email/message-trust.ts +198 -0
- package/src/nodes/email/outbound-message-guard.ts +572 -0
- package/src/nodes/email/trusted-html-code.ts +49 -0
- package/src/nodes/general/general-custom-js.ts +46 -7
- package/src/nodes/general/general-http-request.ts +449 -46
- package/src/nodes/general/general-rate-limiter.ts +54 -81
- package/src/nodes/general/general-wait.ts +80 -0
- package/src/nodes/general/visitor-request.ts +79 -0
- package/src/nodes/index.ts +12 -0
- package/src/nodes/integrations/integration-slack.ts +21 -6
- package/src/nodes/newsletter/newsletter-confirm.ts +44 -0
- package/src/nodes/newsletter/newsletter-subscribe.ts +78 -0
- package/src/nodes/newsletter/newsletter-unsubscribe.ts +43 -0
- package/src/nodes/realtime/realtime-join-channel.ts +5 -4
- package/src/nodes/realtime/realtime-send-channel-event.ts +13 -2
- package/src/nodes/realtime/realtime-send-channel-message.ts +13 -2
- package/src/nodes/sms/sms-infobip.ts +14 -4
- package/src/nodes/sms/sms-smsapi.ts +14 -4
- package/src/nodes/sms/sms-textmagic.ts +14 -4
- package/src/nodes/sms/sms-twilio.ts +14 -4
- package/src/nodes/types.ts +9 -1
- package/src/nodes/utility/utility-similarity-scoring.ts +33 -12
- package/src/page-access-guard-generator.ts +154 -0
- package/src/password-reset-route-generator.ts +531 -0
- package/src/payments/payment-core-code.ts +12 -7
- package/src/project-code-scanner.ts +98 -0
- package/src/public-step-guards.ts +448 -0
- package/src/publish-refusals.ts +459 -0
- package/src/realtime-generator.ts +457 -234
- package/src/runtime-storage-generator.ts +270 -11
- package/src/security-runtime/index.ts +53 -0
- package/src/security-runtime/security-runtime-code.ts +579 -0
- package/src/security-scanner.ts +253 -10
- package/src/segment-splitter.ts +10 -2
- package/src/segment-trust.ts +205 -2
- package/src/self-call-headers.ts +46 -0
- package/src/sent-email-log/index.ts +16 -0
- package/src/sent-email-log/sent-email-log-code.ts +30 -4
- package/src/server-custom-node-call.ts +331 -0
- package/src/server-runtime-code.ts +488 -40
- package/src/session-revocation-generator.ts +177 -0
- package/src/slack-message-values.ts +84 -0
- package/src/transactional-email-code.ts +30 -4
- package/src/trigger-generator.ts +19 -3
- package/src/visitor-step-limits.ts +228 -0
- package/src/webhook-generator.ts +94 -14
- package/src/webhook-signature-verification.ts +13 -3
- package/src/workflow-auth-generator.ts +9 -4
- package/src/workflow-component-plugin.ts +14 -4
- package/src/workflow-project-plugin.ts +374 -61
- package/src/workflow-scope.ts +6 -0
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { generateEmailLocaleHelpersCode, generateWorkflowLocaleHelpersCode, } from './email-locale';
|
|
2
2
|
import { generateSignedInDestinationCode } from './auth-return/signed-in-destination-code';
|
|
3
|
+
import { PRODUCTS_LIST_PARAM, PRODUCTS_ROWS_PARAM, TRUSTED_HTML_RUNTIME_CODE, } from './nodes/email/trusted-html-code';
|
|
4
|
+
import { escapeHtmlTextJs, escapeHtmlValueJs } from './nodes/email/html-escape-code';
|
|
5
|
+
import { generateProtectionBypassHeaderStatements } from './self-call-headers';
|
|
3
6
|
import { generateCredentialColumnsCode } from './credential-columns-code';
|
|
4
7
|
import { generateCredentialResultsCode } from './credential-results';
|
|
5
8
|
const NO_EMAIL_LOCALES = { locales: [], defaultLocale: '' };
|
|
@@ -39,6 +42,22 @@ function resolveValue(value, context) {
|
|
|
39
42
|
}
|
|
40
43
|
|
|
41
44
|
function resolveContextRef(ref, context) {
|
|
45
|
+
// On the server, a read of the page state's currentUser — at any depth, in
|
|
46
|
+
// any copy of the bag the request carries — is a read of the SESSION's user
|
|
47
|
+
// (see bindSessionIdentity in the server runtime).
|
|
48
|
+
if (context && Object.prototype.hasOwnProperty.call(context, '__sessionUserId')) {
|
|
49
|
+
var walk = [ref.nodeId].concat(ref.path || []);
|
|
50
|
+
for (var wi = 0; wi < walk.length - 1; wi++) {
|
|
51
|
+
if (walk[wi] === '__stateValues' && walk[wi + 1] === 'currentUser') {
|
|
52
|
+
var sessionValue = context.__sessionUser || null;
|
|
53
|
+
for (var wj = wi + 2; wj < walk.length; wj++) {
|
|
54
|
+
if (sessionValue === undefined || sessionValue === null) return undefined;
|
|
55
|
+
sessionValue = sessionValue[walk[wj]];
|
|
56
|
+
}
|
|
57
|
+
return sessionValue === null ? undefined : sessionValue;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
42
61
|
const nodeOutput = context[ref.nodeId];
|
|
43
62
|
if (nodeOutput === undefined || nodeOutput === null) return undefined;
|
|
44
63
|
let result = nodeOutput;
|
|
@@ -187,27 +206,42 @@ function isSecretRef(value) {
|
|
|
187
206
|
// of the resolved value. Handles both the raw single-quoted attribute form and
|
|
188
207
|
// the Quill-serialized "-escaped form, plus the nested inner <span> Quill
|
|
189
208
|
// wraps the label in.
|
|
190
|
-
|
|
209
|
+
// asText: the text is not HTML (a subject, an SMS or toast message): a value
|
|
210
|
+
// loses its line breaks and gets no HTML entities.
|
|
211
|
+
function resolveRichTextContext(html, context, asText) {
|
|
191
212
|
if (typeof html !== 'string' || html.indexOf('context-value-inline') === -1) {
|
|
192
213
|
return html;
|
|
193
214
|
}
|
|
194
|
-
|
|
215
|
+
return splitRichTextChips(html).map(function(part) {
|
|
216
|
+
if (typeof part === 'string') return part;
|
|
217
|
+
if (!part.chip) return '';
|
|
218
|
+
var value = resolveContextRef(part.chip, context);
|
|
219
|
+
if (value === undefined || value === null) return '';
|
|
220
|
+
return asText ? plainTextValue(String(value)) : escapeHtmlText(String(value));
|
|
221
|
+
}).join('');
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
// The rich text cut into its literal text (strings) and its inline context
|
|
225
|
+
// chips (\`{ chip: <workflowContext ref, or null when the chip names none> }\`),
|
|
226
|
+
// in order. An unrelated <span> stays text; a chip's nested inner spans are
|
|
227
|
+
// part of the chip.
|
|
228
|
+
function splitRichTextChips(html) {
|
|
229
|
+
var parts = [];
|
|
230
|
+
var text = '';
|
|
195
231
|
var i = 0;
|
|
196
232
|
while (i < html.length) {
|
|
197
233
|
var spanStart = html.indexOf('<span', i);
|
|
198
|
-
if (spanStart === -1) {
|
|
234
|
+
if (spanStart === -1) { text += html.slice(i); break; }
|
|
199
235
|
var openEnd = html.indexOf('>', spanStart);
|
|
200
|
-
if (openEnd === -1) {
|
|
236
|
+
if (openEnd === -1) { text += html.slice(i); break; }
|
|
201
237
|
var openTag = html.slice(spanStart, openEnd + 1);
|
|
202
238
|
if (openTag.indexOf('context-value-inline') === -1) {
|
|
203
239
|
// Unrelated <span> — copy it through verbatim and keep scanning.
|
|
204
|
-
|
|
240
|
+
text += html.slice(i, openEnd + 1);
|
|
205
241
|
i = openEnd + 1;
|
|
206
242
|
continue;
|
|
207
243
|
}
|
|
208
|
-
|
|
209
|
-
// (including any nested inner spans) with the resolved value.
|
|
210
|
-
out += html.slice(i, spanStart);
|
|
244
|
+
text += html.slice(i, spanStart);
|
|
211
245
|
var depth = 1;
|
|
212
246
|
var j = openEnd + 1;
|
|
213
247
|
while (j < html.length && depth > 0) {
|
|
@@ -223,13 +257,17 @@ function resolveRichTextContext(html, context) {
|
|
|
223
257
|
depth--;
|
|
224
258
|
}
|
|
225
259
|
}
|
|
226
|
-
|
|
260
|
+
parts.push(text);
|
|
261
|
+
text = '';
|
|
262
|
+
parts.push({ chip: richTextChipRef(openTag) });
|
|
227
263
|
i = j;
|
|
228
264
|
}
|
|
229
|
-
|
|
265
|
+
parts.push(text);
|
|
266
|
+
return parts;
|
|
230
267
|
}
|
|
231
268
|
|
|
232
|
-
|
|
269
|
+
// The context value a chip's opening tag names, as a workflowContext ref.
|
|
270
|
+
function richTextChipRef(openTag) {
|
|
233
271
|
var nodeId = extractHtmlAttr(openTag, 'data-ctx-node-id');
|
|
234
272
|
var pathRaw = extractHtmlAttr(openTag, 'data-ctx-path');
|
|
235
273
|
var path = null;
|
|
@@ -241,10 +279,7 @@ function resolveRichTextContextSpan(openTag, context) {
|
|
|
241
279
|
path = nodeId ? [nodeId] : [];
|
|
242
280
|
}
|
|
243
281
|
if (!nodeId && path.length > 0) { nodeId = path[0]; }
|
|
244
|
-
|
|
245
|
-
var value = resolveContextRef({ type: 'workflowContext', nodeId: nodeId, path: path }, context);
|
|
246
|
-
if (value === undefined || value === null) { return ''; }
|
|
247
|
-
return escapeHtmlText(String(value));
|
|
282
|
+
return nodeId ? { type: 'workflowContext', nodeId: nodeId, path: path } : null;
|
|
248
283
|
}
|
|
249
284
|
|
|
250
285
|
// Read a quoted HTML attribute value (double- or single-quoted) without a regex
|
|
@@ -261,8 +296,33 @@ function extractHtmlAttr(tag, name) {
|
|
|
261
296
|
return tag.slice(start, end);
|
|
262
297
|
}
|
|
263
298
|
|
|
299
|
+
// A value that lands in HTML text (a rich-text placeholder, a list item).
|
|
300
|
+
// Idempotent: an & that already starts a character reference stays as it is,
|
|
301
|
+
// so a value that arrives escaped is not escaped twice.
|
|
264
302
|
function escapeHtmlText(value) {
|
|
265
|
-
return
|
|
303
|
+
return ${escapeHtmlTextJs('value')};
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
// A value filled into an email HTML body, where it may sit inside an attribute
|
|
307
|
+
// (href="{{url}}"): quotes too. Idempotent like escapeHtmlText.
|
|
308
|
+
function escapeHtmlValue(value) {
|
|
309
|
+
return ${escapeHtmlValueJs('value')};
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
// A value placed in text that is not HTML (a subject, an SMS or toast
|
|
313
|
+
// message): the character references it arrived with (the lifecycle token
|
|
314
|
+
// scripts escape theirs) are read back as characters, and line breaks are
|
|
315
|
+
// taken out — after the read-back, so an encoded line break goes too.
|
|
316
|
+
function plainTextValue(value) {
|
|
317
|
+
return value.replace(/&(amp|lt|gt|quot|apos|#[0-9]{1,7}|#[xX][0-9a-fA-F]{1,6});/g, function(m, ref) {
|
|
318
|
+
if (ref === 'amp') return '&';
|
|
319
|
+
if (ref === 'lt') return '<';
|
|
320
|
+
if (ref === 'gt') return '>';
|
|
321
|
+
if (ref === 'quot') return '"';
|
|
322
|
+
if (ref === 'apos') return "'";
|
|
323
|
+
var code = ref.charAt(1) === 'x' || ref.charAt(1) === 'X' ? parseInt(ref.slice(2), 16) : parseInt(ref.slice(1), 10);
|
|
324
|
+
return code > 0 && code <= 0x10ffff ? String.fromCodePoint(code) : m;
|
|
325
|
+
}).replace(/[\\r\\n]+/g, ' ');
|
|
266
326
|
}
|
|
267
327
|
|
|
268
328
|
// Sentinel for a page-context template token ({{urlDifferentiator}} /
|
|
@@ -309,7 +369,16 @@ function resolveTemplateTokenString(value, context) {
|
|
|
309
369
|
}
|
|
310
370
|
return { matched: true, value: UNRESOLVED_ROUTE_PARAM };
|
|
311
371
|
}
|
|
312
|
-
|
|
372
|
+
var userField = currentUserTokenField(token);
|
|
373
|
+
if (userField) {
|
|
374
|
+
// On the server the visitor is the SESSION's user, never one the request
|
|
375
|
+
// describes: a server route fills these reserved keys from the session
|
|
376
|
+
// cookie (empty for a guest) before any node resolves — see
|
|
377
|
+
// bindSessionIdentity in the server runtime.
|
|
378
|
+
if (context && Object.prototype.hasOwnProperty.call(context, '__sessionUserId')) {
|
|
379
|
+
return { matched: true, value: sessionUserField(context, userField) };
|
|
380
|
+
}
|
|
381
|
+
if (userField !== 'id') return { matched: false };
|
|
313
382
|
var currentUser = context && context.__stateValues && context.__stateValues.currentUser;
|
|
314
383
|
var userId = currentUser && typeof currentUser === 'object' ? currentUser.id : undefined;
|
|
315
384
|
return { matched: true, value: userId === undefined ? null : userId };
|
|
@@ -317,10 +386,31 @@ function resolveTemplateTokenString(value, context) {
|
|
|
317
386
|
return { matched: false };
|
|
318
387
|
}
|
|
319
388
|
|
|
389
|
+
// 'id' for {{Current User.id}} / {{currentUser.id}}, the field for any other
|
|
390
|
+
// {{Current User.<field>}}; null for every other token.
|
|
391
|
+
function currentUserTokenField(token) {
|
|
392
|
+
var m = /^(?:Current User|currentUser)\\.([A-Za-z_$][A-Za-z0-9_$]*)$/.exec(token);
|
|
393
|
+
return m ? m[1] : null;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
function sessionUserField(context, field) {
|
|
397
|
+
var value;
|
|
398
|
+
if (field === 'id') value = context.__sessionUserId;
|
|
399
|
+
else if (field === 'role') value = context.__sessionRole;
|
|
400
|
+
else {
|
|
401
|
+
var user = context.__sessionUser;
|
|
402
|
+
value = user && typeof user === 'object' && Object.prototype.hasOwnProperty.call(user, field) ? user[field] : undefined;
|
|
403
|
+
}
|
|
404
|
+
return value === undefined ? null : value;
|
|
405
|
+
}
|
|
406
|
+
|
|
320
407
|
// Fills flat {{key}} merge tokens in a component-bodied email node's body/subject
|
|
321
408
|
// from its (already-resolved) templateParams. Unknown tokens are left verbatim so
|
|
322
409
|
// unrelated {{...}} (e.g. a campaign CustomerData {{name}}) is never blanked.
|
|
323
|
-
//
|
|
410
|
+
// Every value is escaped where it is filled in (it may come from the visitor —
|
|
411
|
+
// a form field, page state — or from a record a visitor once wrote), so only
|
|
412
|
+
// the author's template is HTML; asText (a subject, a header) takes its line
|
|
413
|
+
// breaks out instead. A value that must be markup goes through a list block.
|
|
324
414
|
// Expands each \`<!--tq:each KEY-->…{{field}}…<!--/tq:each-->\` block (emitted by
|
|
325
415
|
// the email serializer for a builder array mapper) by repeating the inner body
|
|
326
416
|
// once per row of lists[KEY], substituting each row's {{field}} with the
|
|
@@ -346,7 +436,8 @@ function expandListBlocks(text, lists) {
|
|
|
346
436
|
});
|
|
347
437
|
}
|
|
348
438
|
|
|
349
|
-
|
|
439
|
+
${TRUSTED_HTML_RUNTIME_CODE}
|
|
440
|
+
function applyTemplateParams(text, params, asText) {
|
|
350
441
|
if (typeof text !== 'string' || !Array.isArray(params)) return text;
|
|
351
442
|
var map = {};
|
|
352
443
|
for (var i = 0; i < params.length; i++) {
|
|
@@ -357,11 +448,17 @@ function applyTemplateParams(text, params) {
|
|
|
357
448
|
map[p.key] = p.value;
|
|
358
449
|
}
|
|
359
450
|
}
|
|
451
|
+
// The products list is built here from its lines, never taken as handed over.
|
|
452
|
+
if (Array.isArray(map.${PRODUCTS_ROWS_PARAM}) && Object.prototype.hasOwnProperty.call(map, '${PRODUCTS_LIST_PARAM}')) {
|
|
453
|
+
map.${PRODUCTS_LIST_PARAM} = renderProductsListHtml(map.${PRODUCTS_ROWS_PARAM});
|
|
454
|
+
}
|
|
360
455
|
var expanded = expandListBlocks(text, map);
|
|
361
456
|
return expanded.replace(/\\{\\{\\s*([\\w.-]+)\\s*\\}\\}/g, function(m, key) {
|
|
362
457
|
if (!Object.prototype.hasOwnProperty.call(map, key)) return m;
|
|
363
458
|
var v = map[key];
|
|
364
|
-
|
|
459
|
+
if (v === null || v === undefined) return '';
|
|
460
|
+
if (asText) return plainTextValue(String(v));
|
|
461
|
+
return isTrustedHtml(v) ? String(v) : escapeHtmlValue(String(v));
|
|
365
462
|
});
|
|
366
463
|
}
|
|
367
464
|
|
|
@@ -475,13 +572,13 @@ function finalizeResolvedConfig(nodeType, config) {
|
|
|
475
572
|
// Scalar config values are normally just secret-resolved. Rich-text strings
|
|
476
573
|
// (email bodies) additionally need their inline context placeholders resolved,
|
|
477
574
|
// and whole-string {{...}} template tokens resolve against the page context.
|
|
478
|
-
function resolveScalarValue(value, context) {
|
|
575
|
+
function resolveScalarValue(value, context, key) {
|
|
479
576
|
var tokenResolution = resolveTemplateTokenString(value, context);
|
|
480
577
|
if (tokenResolution.matched) {
|
|
481
578
|
return tokenResolution.value;
|
|
482
579
|
}
|
|
483
580
|
if (typeof value === 'string' && value.indexOf('context-value-inline') !== -1) {
|
|
484
|
-
return resolveRichTextContext(value, context);
|
|
581
|
+
return resolveRichTextContext(value, context, key === 'subject' || key === 'message');
|
|
485
582
|
}
|
|
486
583
|
return resolveSecret(value, context);
|
|
487
584
|
}
|
|
@@ -537,7 +634,7 @@ function resolveConfig(config, context) {
|
|
|
537
634
|
} else if (val && typeof val === 'object' && !Array.isArray(val)) {
|
|
538
635
|
resolved[key] = resolveConfig(val, context);
|
|
539
636
|
} else {
|
|
540
|
-
resolved[key] = resolveScalarValue(val, context);
|
|
637
|
+
resolved[key] = resolveScalarValue(val, context, key);
|
|
541
638
|
}
|
|
542
639
|
}
|
|
543
640
|
// Component-bodied email nodes carry their merge values as \`templateParams\`
|
|
@@ -571,18 +668,191 @@ function resolveConfig(config, context) {
|
|
|
571
668
|
resolved.body = applyTemplateParams(resolved.body, resolved.templateParams);
|
|
572
669
|
}
|
|
573
670
|
if (typeof resolved.subject === 'string') {
|
|
574
|
-
resolved.subject = applyTemplateParams(resolved.subject, resolved.templateParams);
|
|
671
|
+
resolved.subject = applyTemplateParams(resolved.subject, resolved.templateParams, true);
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
return resolved;
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
// The config fields a node compiles as code, and the mode fields that decide
|
|
678
|
+
// whether an if / switch compiles its condition. Only the text the author
|
|
679
|
+
// wrote may be: a field bound to a value — a {{…}} token, a context value, a
|
|
680
|
+
// secret, an inserted chip — is dropped from the resolved config, so the node
|
|
681
|
+
// runs its default (transform-array hands the item on as it is, a custom-JS
|
|
682
|
+
// step runs nothing, a condition compares as it does by default) and no
|
|
683
|
+
// request, webhook body or stored value ever becomes code. Every path that
|
|
684
|
+
// runs a node resolves its config through resolveNodeConfig: the client
|
|
685
|
+
// executor and the custom nodes it runs (in the browser, or in process inside
|
|
686
|
+
// a cron, webhook or automation route), and every loop of the segment, cron,
|
|
687
|
+
// webhook and automation routes.
|
|
688
|
+
var AUTHORED_ONLY_FIELDS = {
|
|
689
|
+
'general-custom-js': ['code'],
|
|
690
|
+
'transform-array': ['expression', 'mapExpression', 'filterExpression', 'reduceExpression', 'findExpression', 'sortExpression', 'includesExpression'],
|
|
691
|
+
'general-if-statement': ['conditionType'],
|
|
692
|
+
'general-switch': ['comparisonMode']
|
|
693
|
+
};
|
|
694
|
+
|
|
695
|
+
// Text the author wrote, taken as it is: no inserted chip, not a whole {{…}}
|
|
696
|
+
// token, not a secret reference.
|
|
697
|
+
function isAuthoredText(value) {
|
|
698
|
+
return typeof value === 'string' &&
|
|
699
|
+
value.indexOf('context-value-inline') === -1 &&
|
|
700
|
+
!/^\\s*\\{\\{[\\s\\S]*\\}\\}\\s*$/.test(value) &&
|
|
701
|
+
value.indexOf('WORKFLOW_SECRET_') !== 0 &&
|
|
702
|
+
value.indexOf('teleporthq.secrets.') !== 0;
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
// A node's config resolved for its handler (resolveConfig), with its code and
|
|
706
|
+
// mode fields only as the author wrote them.
|
|
707
|
+
function resolveNodeConfig(node, context) {
|
|
708
|
+
var authored = node ? node.config : undefined;
|
|
709
|
+
var resolved = resolveConfig(authored, context);
|
|
710
|
+
var fields = node ? AUTHORED_ONLY_FIELDS[node.type] : null;
|
|
711
|
+
if (!fields || !authored || typeof authored !== 'object' || !resolved || typeof resolved !== 'object') {
|
|
712
|
+
return resolved;
|
|
713
|
+
}
|
|
714
|
+
for (var i = 0; i < fields.length; i++) {
|
|
715
|
+
var field = fields[i];
|
|
716
|
+
if (authored[field] === undefined) continue;
|
|
717
|
+
if (isAuthoredText(authored[field])) {
|
|
718
|
+
resolved[field] = authored[field];
|
|
719
|
+
} else {
|
|
720
|
+
delete resolved[field];
|
|
575
721
|
}
|
|
576
722
|
}
|
|
577
723
|
return resolved;
|
|
578
724
|
}
|
|
579
725
|
|
|
580
|
-
|
|
581
|
-
|
|
726
|
+
// Only the expression the AUTHOR wrote is ever compiled, and only once. Every
|
|
727
|
+
// context chip in it (an inline chip of the rich-text input, a reference part
|
|
728
|
+
// of a parts array) is handed to the compiled function as a named argument —
|
|
729
|
+
// \`value > <chip max>\` runs as \`value > __tqv0\` with the chip's value passed
|
|
730
|
+
// in as \`__tqv0\` — so a value from the context is data, never code, and
|
|
731
|
+
// request text cannot run on the server (nor stored data in a visitor's
|
|
732
|
+
// browser). A chip the author wrote inside quotes (\`value === '<chip>'\`) is
|
|
733
|
+
// passed as a string. A condition that IS a reference, a whole {{…}} token or a
|
|
734
|
+
// secret has no code of the author's in it: its value is read as data, by its
|
|
735
|
+
// truth. \`authored\` is the node's config as written.
|
|
736
|
+
var WHOLE_TEMPLATE_TOKEN = /^\\{\\{\\s*[^{}]+?\\s*\\}\\}$/;
|
|
737
|
+
|
|
738
|
+
function authoredExpressionParts(authored) {
|
|
739
|
+
if (typeof authored === 'string') {
|
|
740
|
+
if (WHOLE_TEMPLATE_TOKEN.test(authored.trim())) return null;
|
|
741
|
+
if (authored.indexOf('WORKFLOW_SECRET_') === 0 || authored.indexOf('teleporthq.secrets.') === 0) return null;
|
|
742
|
+
return authored.indexOf('context-value-inline') === -1 ? [authored] : splitRichTextChips(authored);
|
|
743
|
+
}
|
|
744
|
+
if (Array.isArray(authored)) {
|
|
745
|
+
return authored.map(function(item) {
|
|
746
|
+
if (item && typeof item === 'object' && (item.type === 'workflowContext' || item.type === 'ctx')) {
|
|
747
|
+
return { chip: item };
|
|
748
|
+
}
|
|
749
|
+
return item === null || item === undefined ? '' : String(item);
|
|
750
|
+
});
|
|
751
|
+
}
|
|
752
|
+
return null;
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
var __compiledExpressions = new Map();
|
|
756
|
+
|
|
757
|
+
function compileExpression(parts, argNames) {
|
|
758
|
+
var text = '';
|
|
759
|
+
var chips = [];
|
|
760
|
+
var pending = parts.slice();
|
|
761
|
+
for (var i = 0; i < pending.length; i++) {
|
|
762
|
+
var part = pending[i];
|
|
763
|
+
if (typeof part === 'string') { text += part; continue; }
|
|
764
|
+
var quote = text.charAt(text.length - 1);
|
|
765
|
+
var next = pending[i + 1];
|
|
766
|
+
var quoted = (quote === '"' || quote === "'" || quote === '\`') && typeof next === 'string' && next.charAt(0) === quote;
|
|
767
|
+
if (quoted) {
|
|
768
|
+
text = text.slice(0, -1);
|
|
769
|
+
pending[i + 1] = next.slice(1);
|
|
770
|
+
}
|
|
771
|
+
text += '__tqv' + chips.length;
|
|
772
|
+
chips.push({ ref: part.chip, quoted: quoted });
|
|
773
|
+
}
|
|
774
|
+
var names = argNames.slice();
|
|
775
|
+
for (var c = 0; c < chips.length; c++) names.push('__tqv' + c);
|
|
776
|
+
var key = names.join(',') + '\\n' + text;
|
|
777
|
+
if (!__compiledExpressions.has(key)) {
|
|
778
|
+
var fn = null;
|
|
779
|
+
try { fn = Function.apply(null, names.concat(['return (' + text + ')'])); } catch (e) { fn = null; }
|
|
780
|
+
__compiledExpressions.set(key, fn);
|
|
781
|
+
}
|
|
782
|
+
return { fn: __compiledExpressions.get(key), chips: chips };
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
// The truth of a value read as data: a string reads as the word or number it
|
|
786
|
+
// spells ('false', '0', '' and 'null' are false), anything else by JS truth.
|
|
787
|
+
function truthOf(value) {
|
|
788
|
+
if (typeof value === 'string') {
|
|
789
|
+
var text = value.trim().toLowerCase();
|
|
790
|
+
if (text === '' || text === 'false' || text === 'null' || text === 'undefined' || text === 'nan') return false;
|
|
791
|
+
if (text === 'true') return true;
|
|
792
|
+
var number = Number(text);
|
|
793
|
+
return isNaN(number) ? true : number !== 0;
|
|
794
|
+
}
|
|
795
|
+
return !!value;
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
function chipValue(ref, context) {
|
|
799
|
+
if (!ref) return undefined;
|
|
800
|
+
return ref.type === 'ctx' ? resolveCtxRef(ref, context) : resolveContextRef(ref, context);
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
// The one chip a condition consists of, when the rest of it is only blank
|
|
804
|
+
// text or the editor's markup around it (\`<p>\`, \` \`); null otherwise.
|
|
805
|
+
function soleChip(parts) {
|
|
806
|
+
var chip = null;
|
|
807
|
+
for (var i = 0; i < parts.length; i++) {
|
|
808
|
+
var part = parts[i];
|
|
809
|
+
if (typeof part === 'string') {
|
|
810
|
+
if (part.replace(/<[^>]*>/g, '').replace(/ /g, ' ').trim() !== '') return null;
|
|
811
|
+
} else if (chip) {
|
|
812
|
+
return null;
|
|
813
|
+
} else {
|
|
814
|
+
chip = part;
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
return chip;
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
function runExpression(authored, resolved, argNames, args, context) {
|
|
821
|
+
var parts = authoredExpressionParts(authored);
|
|
822
|
+
if (!parts) return truthOf(resolved);
|
|
823
|
+
// A condition that is only a chip is a value, read by the word it spells
|
|
824
|
+
// ('false', '0' and '' are false), as a whole {{…}} token is.
|
|
825
|
+
var only = soleChip(parts);
|
|
826
|
+
if (only) return truthOf(chipValue(only.chip, context));
|
|
827
|
+
var compiled = compileExpression(parts, argNames);
|
|
828
|
+
if (!compiled.fn) return false;
|
|
829
|
+
var values = args.slice();
|
|
830
|
+
for (var c = 0; c < compiled.chips.length; c++) {
|
|
831
|
+
var chip = compiled.chips[c];
|
|
832
|
+
var value = chipValue(chip.ref, context);
|
|
833
|
+
values.push(chip.quoted ? (value === null || value === undefined ? '' : String(value)) : value);
|
|
834
|
+
}
|
|
835
|
+
try { return !!compiled.fn.apply(null, values); }
|
|
836
|
+
catch (e) { return false; }
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
// The mode a condition runs in (an if's conditionType, a switch's
|
|
840
|
+
// comparisonMode), as the author wrote it. A mode bound to a value — a {{…}}
|
|
841
|
+
// token, a context value, a secret, an inserted chip — is no mode: request text
|
|
842
|
+
// can never switch a step into compiling its expression.
|
|
843
|
+
function authoredMode(value) {
|
|
844
|
+
return isAuthoredText(value) ? value : '';
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
function evaluateCondition(config, context, authoredConfig) {
|
|
848
|
+
const written = arguments.length > 2 ? (authoredConfig || {}) : config;
|
|
849
|
+
const condType = authoredMode(written.conditionType) || 'simple-comparison';
|
|
582
850
|
if (condType === 'expression') {
|
|
583
851
|
const cond = resolveValue(config.condition, context);
|
|
584
|
-
|
|
585
|
-
|
|
852
|
+
// Callers pass the node's config as written; a caller that has only one
|
|
853
|
+
// config hands that one, whose condition is then its own text.
|
|
854
|
+
const authored = arguments.length > 2 ? (authoredConfig || {}).condition : config.condition;
|
|
855
|
+
return runExpression(authored, cond, ['context'], [context], context);
|
|
586
856
|
}
|
|
587
857
|
if (condType === 'multiple-conditions') {
|
|
588
858
|
const conditions = config.conditions || [];
|
|
@@ -593,6 +863,26 @@ function evaluateCondition(config, context) {
|
|
|
593
863
|
return evaluateSingleComparison(config, context);
|
|
594
864
|
}
|
|
595
865
|
|
|
866
|
+
// The id of the case a switch node takes, 'default' when none matches.
|
|
867
|
+
// \`authoredConfig\` is the node's config as written (see runExpression): in
|
|
868
|
+
// expression mode only an authored case condition is compiled, with the switch
|
|
869
|
+
// value handed in as \`value\`.
|
|
870
|
+
function matchSwitchCase(authoredConfig, resolvedConfig, context) {
|
|
871
|
+
var switchVal = resolveValue(resolvedConfig.switchValue, context);
|
|
872
|
+
var cases = resolvedConfig.cases || [];
|
|
873
|
+
var authoredCases = authoredConfig && Array.isArray(authoredConfig.cases) ? authoredConfig.cases : [];
|
|
874
|
+
for (var i = 0; i < cases.length; i++) {
|
|
875
|
+
var caseVal = resolveValue(cases[i].condition, context);
|
|
876
|
+
if (authoredMode((authoredConfig || resolvedConfig).comparisonMode) === 'expression') {
|
|
877
|
+
var authored = authoredCases[i] && typeof authoredCases[i] === 'object' ? authoredCases[i].condition : undefined;
|
|
878
|
+
if (runExpression(authored, caseVal, ['value', 'context'], [switchVal, context], context)) return cases[i].id;
|
|
879
|
+
} else if (switchVal === caseVal) {
|
|
880
|
+
return cases[i].id;
|
|
881
|
+
}
|
|
882
|
+
}
|
|
883
|
+
return 'default';
|
|
884
|
+
}
|
|
885
|
+
|
|
596
886
|
function coerceForComparison(a, b) {
|
|
597
887
|
if (typeof a === 'boolean' && typeof b === 'string') {
|
|
598
888
|
if (b === 'true') return [a, true];
|
|
@@ -907,7 +1197,7 @@ async function executeNodes(nodes, edges, context, nodeHandlers, workflowConfig,
|
|
|
907
1197
|
continue;
|
|
908
1198
|
}
|
|
909
1199
|
|
|
910
|
-
const resolvedConfig =
|
|
1200
|
+
const resolvedConfig = resolveNodeConfig(node, context);
|
|
911
1201
|
|
|
912
1202
|
try {
|
|
913
1203
|
const configError = finalizeResolvedConfig(node.type, resolvedConfig);
|
|
@@ -920,7 +1210,7 @@ async function executeNodes(nodes, edges, context, nodeHandlers, workflowConfig,
|
|
|
920
1210
|
// once — see the comment there.
|
|
921
1211
|
|
|
922
1212
|
if (node.type === 'general-if-statement') {
|
|
923
|
-
const condResult = evaluateCondition(resolvedConfig, context);
|
|
1213
|
+
const condResult = evaluateCondition(resolvedConfig, context, node.config);
|
|
924
1214
|
context[node.id] = { result: condResult };
|
|
925
1215
|
executed[node.id] = true;
|
|
926
1216
|
|
|
@@ -937,17 +1227,7 @@ async function executeNodes(nodes, edges, context, nodeHandlers, workflowConfig,
|
|
|
937
1227
|
}
|
|
938
1228
|
|
|
939
1229
|
if (node.type === 'general-switch') {
|
|
940
|
-
const
|
|
941
|
-
const cases = resolvedConfig.cases || [];
|
|
942
|
-
let matchedCase = 'default';
|
|
943
|
-
for (let ci = 0; ci < cases.length; ci++) {
|
|
944
|
-
const caseVal = resolveValue(cases[ci].condition, context);
|
|
945
|
-
if (resolvedConfig.comparisonMode === 'expression') {
|
|
946
|
-
try { if (new Function('value', 'context', 'return (' + caseVal + ')')(switchVal, context)) { matchedCase = cases[ci].id; break; } } catch(e) {}
|
|
947
|
-
} else {
|
|
948
|
-
if (switchVal === caseVal) { matchedCase = cases[ci].id; break; }
|
|
949
|
-
}
|
|
950
|
-
}
|
|
1230
|
+
const matchedCase = matchSwitchCase(node.config, resolvedConfig, context);
|
|
951
1231
|
context[node.id] = { matchedCase: matchedCase };
|
|
952
1232
|
executed[node.id] = true;
|
|
953
1233
|
|
|
@@ -1213,8 +1493,8 @@ async function executeLoop(loopNode, config, allNodes, edges, context, nodeHandl
|
|
|
1213
1493
|
const whileCtx = Object.assign({}, context);
|
|
1214
1494
|
whileCtx[loopNode.id + '_iter'] = { iteration: iter };
|
|
1215
1495
|
const condStr = resolveValue(config.condition, whileCtx);
|
|
1216
|
-
|
|
1217
|
-
|
|
1496
|
+
// Only the authored condition is compiled (see runExpression).
|
|
1497
|
+
const condResult = runExpression(loopNode.config && loopNode.config.condition, condStr, ['context'], [whileCtx], whileCtx);
|
|
1218
1498
|
if (loopType === 'while' && !condResult) break;
|
|
1219
1499
|
if (loopType === 'until' && condResult) break;
|
|
1220
1500
|
await executeNodes(bodyNodes, edges, whileCtx, nodeHandlers, workflowConfig, callServerSegment, executionId);
|
|
@@ -1395,12 +1675,17 @@ function snapshotIncomingContext(incoming) {
|
|
|
1395
1675
|
}
|
|
1396
1676
|
|
|
1397
1677
|
// Never replied: the caller's own page-state snapshot (the client never merges
|
|
1398
|
-
// it back — see mergeServerResults) and the route's private state
|
|
1678
|
+
// it back — see mergeServerResults) and the route's private state, the
|
|
1679
|
+
// visitor's session identity included (the server reads it from the cookie on
|
|
1680
|
+
// every request).
|
|
1399
1681
|
var SEGMENT_REPLY_PRIVATE_KEYS = {
|
|
1400
1682
|
__stateValues: true,
|
|
1401
1683
|
__internalHeaders: true,
|
|
1402
1684
|
__request: true,
|
|
1403
|
-
__pendingNodePromises: true
|
|
1685
|
+
__pendingNodePromises: true,
|
|
1686
|
+
__sessionUserId: true,
|
|
1687
|
+
__sessionRole: true,
|
|
1688
|
+
__sessionUser: true
|
|
1404
1689
|
};
|
|
1405
1690
|
|
|
1406
1691
|
// What a server segment replies with: the result of every node it ran itself
|
|
@@ -1490,12 +1775,7 @@ function internalRequestHeaders(req) {
|
|
|
1490
1775
|
if (req && req.headers && req.headers.cookie) {
|
|
1491
1776
|
headers.cookie = req.headers.cookie;
|
|
1492
1777
|
}
|
|
1493
|
-
|
|
1494
|
-
if (bypassSecret) {
|
|
1495
|
-
headers['x-vercel-protection-bypass'] = bypassSecret;
|
|
1496
|
-
// Tells Vercel not to hand the bypass back to the caller as a cookie.
|
|
1497
|
-
headers['x-vercel-set-bypass-cookie'] = 'false';
|
|
1498
|
-
}
|
|
1778
|
+
${generateProtectionBypassHeaderStatements('headers')}
|
|
1499
1779
|
return headers;
|
|
1500
1780
|
}
|
|
1501
1781
|
|
|
@@ -1512,6 +1792,7 @@ module.exports = {
|
|
|
1512
1792
|
resolveValue,
|
|
1513
1793
|
resolveSecret,
|
|
1514
1794
|
resolveConfig,
|
|
1795
|
+
resolveNodeConfig,
|
|
1515
1796
|
resolveContextRef,
|
|
1516
1797
|
resolveRichTextContext,
|
|
1517
1798
|
unwrapWorkflowCollection,
|
|
@@ -1521,6 +1802,7 @@ module.exports = {
|
|
|
1521
1802
|
withoutCredentialColumns,
|
|
1522
1803
|
credentialResultNodeIds,
|
|
1523
1804
|
evaluateCondition,
|
|
1805
|
+
matchSwitchCase,
|
|
1524
1806
|
evaluateSingleComparison,
|
|
1525
1807
|
normalizeComparisonOperator,
|
|
1526
1808
|
resolveTemplateTokenString,
|
|
@@ -1698,10 +1980,13 @@ function pruneContext(context, stateKeys) {
|
|
|
1698
1980
|
// Credentials for a server-side caller's own requests travel as HEADERS
|
|
1699
1981
|
// (see segmentRequestHeaders), never in the body.
|
|
1700
1982
|
if (key === '__internalHeaders') continue;
|
|
1701
|
-
// The
|
|
1702
|
-
//
|
|
1703
|
-
|
|
1704
|
-
|
|
1983
|
+
// The visitor's identity is the server's to read from the session cookie;
|
|
1984
|
+
// a route ignores any it is sent.
|
|
1985
|
+
if (key === '__sessionUserId' || key === '__sessionRole' || key === '__sessionUser') continue;
|
|
1986
|
+
// The signatures of earlier server results, of the key order and of the
|
|
1987
|
+
// run they belong to must cross whole: a pruned signature no longer
|
|
1988
|
+
// matches, and the server then treats the result it covers as never produced.
|
|
1989
|
+
if (key === '__sig' || key === '__sigOrder' || key === '__sigRun') {
|
|
1705
1990
|
pruned[key] = val;
|
|
1706
1991
|
continue;
|
|
1707
1992
|
}
|
|
@@ -1813,7 +2098,16 @@ async function callServerSegment(segmentUrl, context, stateKeys) {
|
|
|
1813
2098
|
let errorData;
|
|
1814
2099
|
try { errorData = await response.json(); } catch(e) { errorData = { error: response.statusText }; }
|
|
1815
2100
|
if (response.status === 429) {
|
|
1816
|
-
|
|
2101
|
+
// The sentence the visitor reads. A rate-limiter step answers its
|
|
2102
|
+
// author's own \`message\` beside a generic \`error\` ("Too Many
|
|
2103
|
+
// Requests"), so \`message\` comes first; every other 429 (the shared
|
|
2104
|
+
// security runtime, a step's visitor limit, the route's abuse gate, the
|
|
2105
|
+
// site's AI budget) says only \`error\`. No 429 carries internal text.
|
|
2106
|
+
var rlErr = new Error(
|
|
2107
|
+
(errorData && typeof errorData.message === 'string' && errorData.message) ||
|
|
2108
|
+
(errorData && typeof errorData.error === 'string' && errorData.error) ||
|
|
2109
|
+
'Too many requests. Try again later.'
|
|
2110
|
+
);
|
|
1817
2111
|
rlErr.__skipErrorHandler = true;
|
|
1818
2112
|
rlErr.__rateLimited = true;
|
|
1819
2113
|
rlErr.__earlyResponse = errorData;
|
|
@@ -1903,7 +2197,16 @@ async function callStreamingServerSegment(segmentUrl, context, streamingInfo, al
|
|
|
1903
2197
|
let errorData;
|
|
1904
2198
|
try { errorData = await response.json(); } catch(e) { errorData = { error: response.statusText }; }
|
|
1905
2199
|
if (response.status === 429) {
|
|
1906
|
-
|
|
2200
|
+
// The sentence the visitor reads. A rate-limiter step answers its
|
|
2201
|
+
// author's own \`message\` beside a generic \`error\` ("Too Many
|
|
2202
|
+
// Requests"), so \`message\` comes first; every other 429 (the shared
|
|
2203
|
+
// security runtime, a step's visitor limit, the route's abuse gate, the
|
|
2204
|
+
// site's AI budget) says only \`error\`. No 429 carries internal text.
|
|
2205
|
+
var rlErr = new Error(
|
|
2206
|
+
(errorData && typeof errorData.message === 'string' && errorData.message) ||
|
|
2207
|
+
(errorData && typeof errorData.error === 'string' && errorData.error) ||
|
|
2208
|
+
'Too many requests. Try again later.'
|
|
2209
|
+
);
|
|
1907
2210
|
rlErr.__skipErrorHandler = true;
|
|
1908
2211
|
rlErr.__rateLimited = true;
|
|
1909
2212
|
rlErr.__earlyResponse = errorData;
|
|
@@ -2162,14 +2465,19 @@ async function executeWorkflowWithSegments(workflowConfig, triggerContext, clien
|
|
|
2162
2465
|
}
|
|
2163
2466
|
}
|
|
2164
2467
|
} catch (error) {
|
|
2165
|
-
|
|
2468
|
+
// A step the server refused for its rate limit (429) is a failure the
|
|
2469
|
+
// visitor must see: the workflow's error branch runs with the server's
|
|
2470
|
+
// public sentence and \`rateLimited: true\`, so a busy button is released
|
|
2471
|
+
// and a message shown. Only a workflow without an error branch ends quietly.
|
|
2472
|
+
const errorHandler = findErrorHandlerNodes(workflowConfig);
|
|
2473
|
+
if (error.__rateLimited ? !errorHandler : error.__skipErrorHandler) {
|
|
2166
2474
|
return context;
|
|
2167
2475
|
}
|
|
2168
|
-
const errorHandler = findErrorHandlerNodes(workflowConfig);
|
|
2169
2476
|
if (errorHandler) {
|
|
2170
2477
|
context[workflowConfig.errorHandlerNodeId] = {
|
|
2171
2478
|
error: { message: error.message || String(error), stack: error.stack || '' },
|
|
2172
|
-
errorMessage: error.message || String(error)
|
|
2479
|
+
errorMessage: error.message || String(error),
|
|
2480
|
+
rateLimited: error.__rateLimited === true
|
|
2173
2481
|
};
|
|
2174
2482
|
try {
|
|
2175
2483
|
await utils.executeNodes(errorHandler.nodes, errorHandler.edges, context, clientHandlers, workflowConfig, null, executionId);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executor-generator.js","sourceRoot":"","sources":["../../src/executor-generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,8BAA8B,EAC9B,iCAAiC,GAClC,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,+BAA+B,EAAE,MAAM,0CAA0C,CAAA;AAC1F,OAAO,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAA;AACzE,OAAO,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAA;AAYpE,MAAM,gBAAgB,GAAsB,EAAE,OAAO,EAAE,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,CAAA;AAE9E,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,UAAqC,EAAE,EAAU,EAAE;IAChG,OAAO;;;;;;;;;EASP,8BAA8B,CAAC,OAAO,CAAC,YAAY,IAAI,gBAAgB,CAAC;EACxE,iCAAiC,EAAE;EACnC,+BAA+B,EAAE
|
|
1
|
+
{"version":3,"file":"executor-generator.js","sourceRoot":"","sources":["../../src/executor-generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,8BAA8B,EAC9B,iCAAiC,GAClC,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,+BAA+B,EAAE,MAAM,0CAA0C,CAAA;AAC1F,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,yBAAyB,GAC1B,MAAM,iCAAiC,CAAA;AACxC,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACpF,OAAO,EAAE,wCAAwC,EAAE,MAAM,qBAAqB,CAAA;AAC9E,OAAO,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAA;AACzE,OAAO,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAA;AAYpE,MAAM,gBAAgB,GAAsB,EAAE,OAAO,EAAE,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,CAAA;AAE9E,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,UAAqC,EAAE,EAAU,EAAE;IAChG,OAAO;;;;;;;;;EASP,8BAA8B,CAAC,OAAO,CAAC,YAAY,IAAI,gBAAgB,CAAC;EACxE,iCAAiC,EAAE;EACnC,+BAA+B,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WA0RxB,gBAAgB,CAAC,OAAO,CAAC;;;;;;WAMzB,iBAAiB,CAAC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkInC,yBAAyB;;;;;;;;;;;;;0BAaD,mBAAmB,mDAAmD,mBAAmB;UACzG,mBAAmB,iCAAiC,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyuC/E,6BAA6B,EAAE;EAC/B,6BAA6B,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmE/B,wCAAwC,CAAC,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoDpD,CAAA;AACD,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAW,EAAE;IACpD,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAupBR,CAAA;AACD,CAAC,CAAA"}
|