@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
|
@@ -3,6 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.generateClientRuntimeCode = exports.generateSharedRuntimeUtilsCode = void 0;
|
|
4
4
|
const email_locale_1 = require("./email-locale");
|
|
5
5
|
const signed_in_destination_code_1 = require("./auth-return/signed-in-destination-code");
|
|
6
|
+
const trusted_html_code_1 = require("./nodes/email/trusted-html-code");
|
|
7
|
+
const html_escape_code_1 = require("./nodes/email/html-escape-code");
|
|
8
|
+
const self_call_headers_1 = require("./self-call-headers");
|
|
6
9
|
const credential_columns_code_1 = require("./credential-columns-code");
|
|
7
10
|
const credential_results_1 = require("./credential-results");
|
|
8
11
|
const NO_EMAIL_LOCALES = { locales: [], defaultLocale: '' };
|
|
@@ -42,6 +45,22 @@ function resolveValue(value, context) {
|
|
|
42
45
|
}
|
|
43
46
|
|
|
44
47
|
function resolveContextRef(ref, context) {
|
|
48
|
+
// On the server, a read of the page state's currentUser — at any depth, in
|
|
49
|
+
// any copy of the bag the request carries — is a read of the SESSION's user
|
|
50
|
+
// (see bindSessionIdentity in the server runtime).
|
|
51
|
+
if (context && Object.prototype.hasOwnProperty.call(context, '__sessionUserId')) {
|
|
52
|
+
var walk = [ref.nodeId].concat(ref.path || []);
|
|
53
|
+
for (var wi = 0; wi < walk.length - 1; wi++) {
|
|
54
|
+
if (walk[wi] === '__stateValues' && walk[wi + 1] === 'currentUser') {
|
|
55
|
+
var sessionValue = context.__sessionUser || null;
|
|
56
|
+
for (var wj = wi + 2; wj < walk.length; wj++) {
|
|
57
|
+
if (sessionValue === undefined || sessionValue === null) return undefined;
|
|
58
|
+
sessionValue = sessionValue[walk[wj]];
|
|
59
|
+
}
|
|
60
|
+
return sessionValue === null ? undefined : sessionValue;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
45
64
|
const nodeOutput = context[ref.nodeId];
|
|
46
65
|
if (nodeOutput === undefined || nodeOutput === null) return undefined;
|
|
47
66
|
let result = nodeOutput;
|
|
@@ -190,27 +209,42 @@ function isSecretRef(value) {
|
|
|
190
209
|
// of the resolved value. Handles both the raw single-quoted attribute form and
|
|
191
210
|
// the Quill-serialized "-escaped form, plus the nested inner <span> Quill
|
|
192
211
|
// wraps the label in.
|
|
193
|
-
|
|
212
|
+
// asText: the text is not HTML (a subject, an SMS or toast message): a value
|
|
213
|
+
// loses its line breaks and gets no HTML entities.
|
|
214
|
+
function resolveRichTextContext(html, context, asText) {
|
|
194
215
|
if (typeof html !== 'string' || html.indexOf('context-value-inline') === -1) {
|
|
195
216
|
return html;
|
|
196
217
|
}
|
|
197
|
-
|
|
218
|
+
return splitRichTextChips(html).map(function(part) {
|
|
219
|
+
if (typeof part === 'string') return part;
|
|
220
|
+
if (!part.chip) return '';
|
|
221
|
+
var value = resolveContextRef(part.chip, context);
|
|
222
|
+
if (value === undefined || value === null) return '';
|
|
223
|
+
return asText ? plainTextValue(String(value)) : escapeHtmlText(String(value));
|
|
224
|
+
}).join('');
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
// The rich text cut into its literal text (strings) and its inline context
|
|
228
|
+
// chips (\`{ chip: <workflowContext ref, or null when the chip names none> }\`),
|
|
229
|
+
// in order. An unrelated <span> stays text; a chip's nested inner spans are
|
|
230
|
+
// part of the chip.
|
|
231
|
+
function splitRichTextChips(html) {
|
|
232
|
+
var parts = [];
|
|
233
|
+
var text = '';
|
|
198
234
|
var i = 0;
|
|
199
235
|
while (i < html.length) {
|
|
200
236
|
var spanStart = html.indexOf('<span', i);
|
|
201
|
-
if (spanStart === -1) {
|
|
237
|
+
if (spanStart === -1) { text += html.slice(i); break; }
|
|
202
238
|
var openEnd = html.indexOf('>', spanStart);
|
|
203
|
-
if (openEnd === -1) {
|
|
239
|
+
if (openEnd === -1) { text += html.slice(i); break; }
|
|
204
240
|
var openTag = html.slice(spanStart, openEnd + 1);
|
|
205
241
|
if (openTag.indexOf('context-value-inline') === -1) {
|
|
206
242
|
// Unrelated <span> — copy it through verbatim and keep scanning.
|
|
207
|
-
|
|
243
|
+
text += html.slice(i, openEnd + 1);
|
|
208
244
|
i = openEnd + 1;
|
|
209
245
|
continue;
|
|
210
246
|
}
|
|
211
|
-
|
|
212
|
-
// (including any nested inner spans) with the resolved value.
|
|
213
|
-
out += html.slice(i, spanStart);
|
|
247
|
+
text += html.slice(i, spanStart);
|
|
214
248
|
var depth = 1;
|
|
215
249
|
var j = openEnd + 1;
|
|
216
250
|
while (j < html.length && depth > 0) {
|
|
@@ -226,13 +260,17 @@ function resolveRichTextContext(html, context) {
|
|
|
226
260
|
depth--;
|
|
227
261
|
}
|
|
228
262
|
}
|
|
229
|
-
|
|
263
|
+
parts.push(text);
|
|
264
|
+
text = '';
|
|
265
|
+
parts.push({ chip: richTextChipRef(openTag) });
|
|
230
266
|
i = j;
|
|
231
267
|
}
|
|
232
|
-
|
|
268
|
+
parts.push(text);
|
|
269
|
+
return parts;
|
|
233
270
|
}
|
|
234
271
|
|
|
235
|
-
|
|
272
|
+
// The context value a chip's opening tag names, as a workflowContext ref.
|
|
273
|
+
function richTextChipRef(openTag) {
|
|
236
274
|
var nodeId = extractHtmlAttr(openTag, 'data-ctx-node-id');
|
|
237
275
|
var pathRaw = extractHtmlAttr(openTag, 'data-ctx-path');
|
|
238
276
|
var path = null;
|
|
@@ -244,10 +282,7 @@ function resolveRichTextContextSpan(openTag, context) {
|
|
|
244
282
|
path = nodeId ? [nodeId] : [];
|
|
245
283
|
}
|
|
246
284
|
if (!nodeId && path.length > 0) { nodeId = path[0]; }
|
|
247
|
-
|
|
248
|
-
var value = resolveContextRef({ type: 'workflowContext', nodeId: nodeId, path: path }, context);
|
|
249
|
-
if (value === undefined || value === null) { return ''; }
|
|
250
|
-
return escapeHtmlText(String(value));
|
|
285
|
+
return nodeId ? { type: 'workflowContext', nodeId: nodeId, path: path } : null;
|
|
251
286
|
}
|
|
252
287
|
|
|
253
288
|
// Read a quoted HTML attribute value (double- or single-quoted) without a regex
|
|
@@ -264,8 +299,33 @@ function extractHtmlAttr(tag, name) {
|
|
|
264
299
|
return tag.slice(start, end);
|
|
265
300
|
}
|
|
266
301
|
|
|
302
|
+
// A value that lands in HTML text (a rich-text placeholder, a list item).
|
|
303
|
+
// Idempotent: an & that already starts a character reference stays as it is,
|
|
304
|
+
// so a value that arrives escaped is not escaped twice.
|
|
267
305
|
function escapeHtmlText(value) {
|
|
268
|
-
return
|
|
306
|
+
return ${(0, html_escape_code_1.escapeHtmlTextJs)('value')};
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
// A value filled into an email HTML body, where it may sit inside an attribute
|
|
310
|
+
// (href="{{url}}"): quotes too. Idempotent like escapeHtmlText.
|
|
311
|
+
function escapeHtmlValue(value) {
|
|
312
|
+
return ${(0, html_escape_code_1.escapeHtmlValueJs)('value')};
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
// A value placed in text that is not HTML (a subject, an SMS or toast
|
|
316
|
+
// message): the character references it arrived with (the lifecycle token
|
|
317
|
+
// scripts escape theirs) are read back as characters, and line breaks are
|
|
318
|
+
// taken out — after the read-back, so an encoded line break goes too.
|
|
319
|
+
function plainTextValue(value) {
|
|
320
|
+
return value.replace(/&(amp|lt|gt|quot|apos|#[0-9]{1,7}|#[xX][0-9a-fA-F]{1,6});/g, function(m, ref) {
|
|
321
|
+
if (ref === 'amp') return '&';
|
|
322
|
+
if (ref === 'lt') return '<';
|
|
323
|
+
if (ref === 'gt') return '>';
|
|
324
|
+
if (ref === 'quot') return '"';
|
|
325
|
+
if (ref === 'apos') return "'";
|
|
326
|
+
var code = ref.charAt(1) === 'x' || ref.charAt(1) === 'X' ? parseInt(ref.slice(2), 16) : parseInt(ref.slice(1), 10);
|
|
327
|
+
return code > 0 && code <= 0x10ffff ? String.fromCodePoint(code) : m;
|
|
328
|
+
}).replace(/[\\r\\n]+/g, ' ');
|
|
269
329
|
}
|
|
270
330
|
|
|
271
331
|
// Sentinel for a page-context template token ({{urlDifferentiator}} /
|
|
@@ -312,7 +372,16 @@ function resolveTemplateTokenString(value, context) {
|
|
|
312
372
|
}
|
|
313
373
|
return { matched: true, value: UNRESOLVED_ROUTE_PARAM };
|
|
314
374
|
}
|
|
315
|
-
|
|
375
|
+
var userField = currentUserTokenField(token);
|
|
376
|
+
if (userField) {
|
|
377
|
+
// On the server the visitor is the SESSION's user, never one the request
|
|
378
|
+
// describes: a server route fills these reserved keys from the session
|
|
379
|
+
// cookie (empty for a guest) before any node resolves — see
|
|
380
|
+
// bindSessionIdentity in the server runtime.
|
|
381
|
+
if (context && Object.prototype.hasOwnProperty.call(context, '__sessionUserId')) {
|
|
382
|
+
return { matched: true, value: sessionUserField(context, userField) };
|
|
383
|
+
}
|
|
384
|
+
if (userField !== 'id') return { matched: false };
|
|
316
385
|
var currentUser = context && context.__stateValues && context.__stateValues.currentUser;
|
|
317
386
|
var userId = currentUser && typeof currentUser === 'object' ? currentUser.id : undefined;
|
|
318
387
|
return { matched: true, value: userId === undefined ? null : userId };
|
|
@@ -320,10 +389,31 @@ function resolveTemplateTokenString(value, context) {
|
|
|
320
389
|
return { matched: false };
|
|
321
390
|
}
|
|
322
391
|
|
|
392
|
+
// 'id' for {{Current User.id}} / {{currentUser.id}}, the field for any other
|
|
393
|
+
// {{Current User.<field>}}; null for every other token.
|
|
394
|
+
function currentUserTokenField(token) {
|
|
395
|
+
var m = /^(?:Current User|currentUser)\\.([A-Za-z_$][A-Za-z0-9_$]*)$/.exec(token);
|
|
396
|
+
return m ? m[1] : null;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
function sessionUserField(context, field) {
|
|
400
|
+
var value;
|
|
401
|
+
if (field === 'id') value = context.__sessionUserId;
|
|
402
|
+
else if (field === 'role') value = context.__sessionRole;
|
|
403
|
+
else {
|
|
404
|
+
var user = context.__sessionUser;
|
|
405
|
+
value = user && typeof user === 'object' && Object.prototype.hasOwnProperty.call(user, field) ? user[field] : undefined;
|
|
406
|
+
}
|
|
407
|
+
return value === undefined ? null : value;
|
|
408
|
+
}
|
|
409
|
+
|
|
323
410
|
// Fills flat {{key}} merge tokens in a component-bodied email node's body/subject
|
|
324
411
|
// from its (already-resolved) templateParams. Unknown tokens are left verbatim so
|
|
325
412
|
// unrelated {{...}} (e.g. a campaign CustomerData {{name}}) is never blanked.
|
|
326
|
-
//
|
|
413
|
+
// Every value is escaped where it is filled in (it may come from the visitor —
|
|
414
|
+
// a form field, page state — or from a record a visitor once wrote), so only
|
|
415
|
+
// the author's template is HTML; asText (a subject, a header) takes its line
|
|
416
|
+
// breaks out instead. A value that must be markup goes through a list block.
|
|
327
417
|
// Expands each \`<!--tq:each KEY-->…{{field}}…<!--/tq:each-->\` block (emitted by
|
|
328
418
|
// the email serializer for a builder array mapper) by repeating the inner body
|
|
329
419
|
// once per row of lists[KEY], substituting each row's {{field}} with the
|
|
@@ -349,7 +439,8 @@ function expandListBlocks(text, lists) {
|
|
|
349
439
|
});
|
|
350
440
|
}
|
|
351
441
|
|
|
352
|
-
|
|
442
|
+
${trusted_html_code_1.TRUSTED_HTML_RUNTIME_CODE}
|
|
443
|
+
function applyTemplateParams(text, params, asText) {
|
|
353
444
|
if (typeof text !== 'string' || !Array.isArray(params)) return text;
|
|
354
445
|
var map = {};
|
|
355
446
|
for (var i = 0; i < params.length; i++) {
|
|
@@ -360,11 +451,17 @@ function applyTemplateParams(text, params) {
|
|
|
360
451
|
map[p.key] = p.value;
|
|
361
452
|
}
|
|
362
453
|
}
|
|
454
|
+
// The products list is built here from its lines, never taken as handed over.
|
|
455
|
+
if (Array.isArray(map.${trusted_html_code_1.PRODUCTS_ROWS_PARAM}) && Object.prototype.hasOwnProperty.call(map, '${trusted_html_code_1.PRODUCTS_LIST_PARAM}')) {
|
|
456
|
+
map.${trusted_html_code_1.PRODUCTS_LIST_PARAM} = renderProductsListHtml(map.${trusted_html_code_1.PRODUCTS_ROWS_PARAM});
|
|
457
|
+
}
|
|
363
458
|
var expanded = expandListBlocks(text, map);
|
|
364
459
|
return expanded.replace(/\\{\\{\\s*([\\w.-]+)\\s*\\}\\}/g, function(m, key) {
|
|
365
460
|
if (!Object.prototype.hasOwnProperty.call(map, key)) return m;
|
|
366
461
|
var v = map[key];
|
|
367
|
-
|
|
462
|
+
if (v === null || v === undefined) return '';
|
|
463
|
+
if (asText) return plainTextValue(String(v));
|
|
464
|
+
return isTrustedHtml(v) ? String(v) : escapeHtmlValue(String(v));
|
|
368
465
|
});
|
|
369
466
|
}
|
|
370
467
|
|
|
@@ -478,13 +575,13 @@ function finalizeResolvedConfig(nodeType, config) {
|
|
|
478
575
|
// Scalar config values are normally just secret-resolved. Rich-text strings
|
|
479
576
|
// (email bodies) additionally need their inline context placeholders resolved,
|
|
480
577
|
// and whole-string {{...}} template tokens resolve against the page context.
|
|
481
|
-
function resolveScalarValue(value, context) {
|
|
578
|
+
function resolveScalarValue(value, context, key) {
|
|
482
579
|
var tokenResolution = resolveTemplateTokenString(value, context);
|
|
483
580
|
if (tokenResolution.matched) {
|
|
484
581
|
return tokenResolution.value;
|
|
485
582
|
}
|
|
486
583
|
if (typeof value === 'string' && value.indexOf('context-value-inline') !== -1) {
|
|
487
|
-
return resolveRichTextContext(value, context);
|
|
584
|
+
return resolveRichTextContext(value, context, key === 'subject' || key === 'message');
|
|
488
585
|
}
|
|
489
586
|
return resolveSecret(value, context);
|
|
490
587
|
}
|
|
@@ -540,7 +637,7 @@ function resolveConfig(config, context) {
|
|
|
540
637
|
} else if (val && typeof val === 'object' && !Array.isArray(val)) {
|
|
541
638
|
resolved[key] = resolveConfig(val, context);
|
|
542
639
|
} else {
|
|
543
|
-
resolved[key] = resolveScalarValue(val, context);
|
|
640
|
+
resolved[key] = resolveScalarValue(val, context, key);
|
|
544
641
|
}
|
|
545
642
|
}
|
|
546
643
|
// Component-bodied email nodes carry their merge values as \`templateParams\`
|
|
@@ -574,18 +671,191 @@ function resolveConfig(config, context) {
|
|
|
574
671
|
resolved.body = applyTemplateParams(resolved.body, resolved.templateParams);
|
|
575
672
|
}
|
|
576
673
|
if (typeof resolved.subject === 'string') {
|
|
577
|
-
resolved.subject = applyTemplateParams(resolved.subject, resolved.templateParams);
|
|
674
|
+
resolved.subject = applyTemplateParams(resolved.subject, resolved.templateParams, true);
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
return resolved;
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
// The config fields a node compiles as code, and the mode fields that decide
|
|
681
|
+
// whether an if / switch compiles its condition. Only the text the author
|
|
682
|
+
// wrote may be: a field bound to a value — a {{…}} token, a context value, a
|
|
683
|
+
// secret, an inserted chip — is dropped from the resolved config, so the node
|
|
684
|
+
// runs its default (transform-array hands the item on as it is, a custom-JS
|
|
685
|
+
// step runs nothing, a condition compares as it does by default) and no
|
|
686
|
+
// request, webhook body or stored value ever becomes code. Every path that
|
|
687
|
+
// runs a node resolves its config through resolveNodeConfig: the client
|
|
688
|
+
// executor and the custom nodes it runs (in the browser, or in process inside
|
|
689
|
+
// a cron, webhook or automation route), and every loop of the segment, cron,
|
|
690
|
+
// webhook and automation routes.
|
|
691
|
+
var AUTHORED_ONLY_FIELDS = {
|
|
692
|
+
'general-custom-js': ['code'],
|
|
693
|
+
'transform-array': ['expression', 'mapExpression', 'filterExpression', 'reduceExpression', 'findExpression', 'sortExpression', 'includesExpression'],
|
|
694
|
+
'general-if-statement': ['conditionType'],
|
|
695
|
+
'general-switch': ['comparisonMode']
|
|
696
|
+
};
|
|
697
|
+
|
|
698
|
+
// Text the author wrote, taken as it is: no inserted chip, not a whole {{…}}
|
|
699
|
+
// token, not a secret reference.
|
|
700
|
+
function isAuthoredText(value) {
|
|
701
|
+
return typeof value === 'string' &&
|
|
702
|
+
value.indexOf('context-value-inline') === -1 &&
|
|
703
|
+
!/^\\s*\\{\\{[\\s\\S]*\\}\\}\\s*$/.test(value) &&
|
|
704
|
+
value.indexOf('WORKFLOW_SECRET_') !== 0 &&
|
|
705
|
+
value.indexOf('teleporthq.secrets.') !== 0;
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
// A node's config resolved for its handler (resolveConfig), with its code and
|
|
709
|
+
// mode fields only as the author wrote them.
|
|
710
|
+
function resolveNodeConfig(node, context) {
|
|
711
|
+
var authored = node ? node.config : undefined;
|
|
712
|
+
var resolved = resolveConfig(authored, context);
|
|
713
|
+
var fields = node ? AUTHORED_ONLY_FIELDS[node.type] : null;
|
|
714
|
+
if (!fields || !authored || typeof authored !== 'object' || !resolved || typeof resolved !== 'object') {
|
|
715
|
+
return resolved;
|
|
716
|
+
}
|
|
717
|
+
for (var i = 0; i < fields.length; i++) {
|
|
718
|
+
var field = fields[i];
|
|
719
|
+
if (authored[field] === undefined) continue;
|
|
720
|
+
if (isAuthoredText(authored[field])) {
|
|
721
|
+
resolved[field] = authored[field];
|
|
722
|
+
} else {
|
|
723
|
+
delete resolved[field];
|
|
578
724
|
}
|
|
579
725
|
}
|
|
580
726
|
return resolved;
|
|
581
727
|
}
|
|
582
728
|
|
|
583
|
-
|
|
584
|
-
|
|
729
|
+
// Only the expression the AUTHOR wrote is ever compiled, and only once. Every
|
|
730
|
+
// context chip in it (an inline chip of the rich-text input, a reference part
|
|
731
|
+
// of a parts array) is handed to the compiled function as a named argument —
|
|
732
|
+
// \`value > <chip max>\` runs as \`value > __tqv0\` with the chip's value passed
|
|
733
|
+
// in as \`__tqv0\` — so a value from the context is data, never code, and
|
|
734
|
+
// request text cannot run on the server (nor stored data in a visitor's
|
|
735
|
+
// browser). A chip the author wrote inside quotes (\`value === '<chip>'\`) is
|
|
736
|
+
// passed as a string. A condition that IS a reference, a whole {{…}} token or a
|
|
737
|
+
// secret has no code of the author's in it: its value is read as data, by its
|
|
738
|
+
// truth. \`authored\` is the node's config as written.
|
|
739
|
+
var WHOLE_TEMPLATE_TOKEN = /^\\{\\{\\s*[^{}]+?\\s*\\}\\}$/;
|
|
740
|
+
|
|
741
|
+
function authoredExpressionParts(authored) {
|
|
742
|
+
if (typeof authored === 'string') {
|
|
743
|
+
if (WHOLE_TEMPLATE_TOKEN.test(authored.trim())) return null;
|
|
744
|
+
if (authored.indexOf('WORKFLOW_SECRET_') === 0 || authored.indexOf('teleporthq.secrets.') === 0) return null;
|
|
745
|
+
return authored.indexOf('context-value-inline') === -1 ? [authored] : splitRichTextChips(authored);
|
|
746
|
+
}
|
|
747
|
+
if (Array.isArray(authored)) {
|
|
748
|
+
return authored.map(function(item) {
|
|
749
|
+
if (item && typeof item === 'object' && (item.type === 'workflowContext' || item.type === 'ctx')) {
|
|
750
|
+
return { chip: item };
|
|
751
|
+
}
|
|
752
|
+
return item === null || item === undefined ? '' : String(item);
|
|
753
|
+
});
|
|
754
|
+
}
|
|
755
|
+
return null;
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
var __compiledExpressions = new Map();
|
|
759
|
+
|
|
760
|
+
function compileExpression(parts, argNames) {
|
|
761
|
+
var text = '';
|
|
762
|
+
var chips = [];
|
|
763
|
+
var pending = parts.slice();
|
|
764
|
+
for (var i = 0; i < pending.length; i++) {
|
|
765
|
+
var part = pending[i];
|
|
766
|
+
if (typeof part === 'string') { text += part; continue; }
|
|
767
|
+
var quote = text.charAt(text.length - 1);
|
|
768
|
+
var next = pending[i + 1];
|
|
769
|
+
var quoted = (quote === '"' || quote === "'" || quote === '\`') && typeof next === 'string' && next.charAt(0) === quote;
|
|
770
|
+
if (quoted) {
|
|
771
|
+
text = text.slice(0, -1);
|
|
772
|
+
pending[i + 1] = next.slice(1);
|
|
773
|
+
}
|
|
774
|
+
text += '__tqv' + chips.length;
|
|
775
|
+
chips.push({ ref: part.chip, quoted: quoted });
|
|
776
|
+
}
|
|
777
|
+
var names = argNames.slice();
|
|
778
|
+
for (var c = 0; c < chips.length; c++) names.push('__tqv' + c);
|
|
779
|
+
var key = names.join(',') + '\\n' + text;
|
|
780
|
+
if (!__compiledExpressions.has(key)) {
|
|
781
|
+
var fn = null;
|
|
782
|
+
try { fn = Function.apply(null, names.concat(['return (' + text + ')'])); } catch (e) { fn = null; }
|
|
783
|
+
__compiledExpressions.set(key, fn);
|
|
784
|
+
}
|
|
785
|
+
return { fn: __compiledExpressions.get(key), chips: chips };
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
// The truth of a value read as data: a string reads as the word or number it
|
|
789
|
+
// spells ('false', '0', '' and 'null' are false), anything else by JS truth.
|
|
790
|
+
function truthOf(value) {
|
|
791
|
+
if (typeof value === 'string') {
|
|
792
|
+
var text = value.trim().toLowerCase();
|
|
793
|
+
if (text === '' || text === 'false' || text === 'null' || text === 'undefined' || text === 'nan') return false;
|
|
794
|
+
if (text === 'true') return true;
|
|
795
|
+
var number = Number(text);
|
|
796
|
+
return isNaN(number) ? true : number !== 0;
|
|
797
|
+
}
|
|
798
|
+
return !!value;
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
function chipValue(ref, context) {
|
|
802
|
+
if (!ref) return undefined;
|
|
803
|
+
return ref.type === 'ctx' ? resolveCtxRef(ref, context) : resolveContextRef(ref, context);
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
// The one chip a condition consists of, when the rest of it is only blank
|
|
807
|
+
// text or the editor's markup around it (\`<p>\`, \` \`); null otherwise.
|
|
808
|
+
function soleChip(parts) {
|
|
809
|
+
var chip = null;
|
|
810
|
+
for (var i = 0; i < parts.length; i++) {
|
|
811
|
+
var part = parts[i];
|
|
812
|
+
if (typeof part === 'string') {
|
|
813
|
+
if (part.replace(/<[^>]*>/g, '').replace(/ /g, ' ').trim() !== '') return null;
|
|
814
|
+
} else if (chip) {
|
|
815
|
+
return null;
|
|
816
|
+
} else {
|
|
817
|
+
chip = part;
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
return chip;
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
function runExpression(authored, resolved, argNames, args, context) {
|
|
824
|
+
var parts = authoredExpressionParts(authored);
|
|
825
|
+
if (!parts) return truthOf(resolved);
|
|
826
|
+
// A condition that is only a chip is a value, read by the word it spells
|
|
827
|
+
// ('false', '0' and '' are false), as a whole {{…}} token is.
|
|
828
|
+
var only = soleChip(parts);
|
|
829
|
+
if (only) return truthOf(chipValue(only.chip, context));
|
|
830
|
+
var compiled = compileExpression(parts, argNames);
|
|
831
|
+
if (!compiled.fn) return false;
|
|
832
|
+
var values = args.slice();
|
|
833
|
+
for (var c = 0; c < compiled.chips.length; c++) {
|
|
834
|
+
var chip = compiled.chips[c];
|
|
835
|
+
var value = chipValue(chip.ref, context);
|
|
836
|
+
values.push(chip.quoted ? (value === null || value === undefined ? '' : String(value)) : value);
|
|
837
|
+
}
|
|
838
|
+
try { return !!compiled.fn.apply(null, values); }
|
|
839
|
+
catch (e) { return false; }
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
// The mode a condition runs in (an if's conditionType, a switch's
|
|
843
|
+
// comparisonMode), as the author wrote it. A mode bound to a value — a {{…}}
|
|
844
|
+
// token, a context value, a secret, an inserted chip — is no mode: request text
|
|
845
|
+
// can never switch a step into compiling its expression.
|
|
846
|
+
function authoredMode(value) {
|
|
847
|
+
return isAuthoredText(value) ? value : '';
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
function evaluateCondition(config, context, authoredConfig) {
|
|
851
|
+
const written = arguments.length > 2 ? (authoredConfig || {}) : config;
|
|
852
|
+
const condType = authoredMode(written.conditionType) || 'simple-comparison';
|
|
585
853
|
if (condType === 'expression') {
|
|
586
854
|
const cond = resolveValue(config.condition, context);
|
|
587
|
-
|
|
588
|
-
|
|
855
|
+
// Callers pass the node's config as written; a caller that has only one
|
|
856
|
+
// config hands that one, whose condition is then its own text.
|
|
857
|
+
const authored = arguments.length > 2 ? (authoredConfig || {}).condition : config.condition;
|
|
858
|
+
return runExpression(authored, cond, ['context'], [context], context);
|
|
589
859
|
}
|
|
590
860
|
if (condType === 'multiple-conditions') {
|
|
591
861
|
const conditions = config.conditions || [];
|
|
@@ -596,6 +866,26 @@ function evaluateCondition(config, context) {
|
|
|
596
866
|
return evaluateSingleComparison(config, context);
|
|
597
867
|
}
|
|
598
868
|
|
|
869
|
+
// The id of the case a switch node takes, 'default' when none matches.
|
|
870
|
+
// \`authoredConfig\` is the node's config as written (see runExpression): in
|
|
871
|
+
// expression mode only an authored case condition is compiled, with the switch
|
|
872
|
+
// value handed in as \`value\`.
|
|
873
|
+
function matchSwitchCase(authoredConfig, resolvedConfig, context) {
|
|
874
|
+
var switchVal = resolveValue(resolvedConfig.switchValue, context);
|
|
875
|
+
var cases = resolvedConfig.cases || [];
|
|
876
|
+
var authoredCases = authoredConfig && Array.isArray(authoredConfig.cases) ? authoredConfig.cases : [];
|
|
877
|
+
for (var i = 0; i < cases.length; i++) {
|
|
878
|
+
var caseVal = resolveValue(cases[i].condition, context);
|
|
879
|
+
if (authoredMode((authoredConfig || resolvedConfig).comparisonMode) === 'expression') {
|
|
880
|
+
var authored = authoredCases[i] && typeof authoredCases[i] === 'object' ? authoredCases[i].condition : undefined;
|
|
881
|
+
if (runExpression(authored, caseVal, ['value', 'context'], [switchVal, context], context)) return cases[i].id;
|
|
882
|
+
} else if (switchVal === caseVal) {
|
|
883
|
+
return cases[i].id;
|
|
884
|
+
}
|
|
885
|
+
}
|
|
886
|
+
return 'default';
|
|
887
|
+
}
|
|
888
|
+
|
|
599
889
|
function coerceForComparison(a, b) {
|
|
600
890
|
if (typeof a === 'boolean' && typeof b === 'string') {
|
|
601
891
|
if (b === 'true') return [a, true];
|
|
@@ -910,7 +1200,7 @@ async function executeNodes(nodes, edges, context, nodeHandlers, workflowConfig,
|
|
|
910
1200
|
continue;
|
|
911
1201
|
}
|
|
912
1202
|
|
|
913
|
-
const resolvedConfig =
|
|
1203
|
+
const resolvedConfig = resolveNodeConfig(node, context);
|
|
914
1204
|
|
|
915
1205
|
try {
|
|
916
1206
|
const configError = finalizeResolvedConfig(node.type, resolvedConfig);
|
|
@@ -923,7 +1213,7 @@ async function executeNodes(nodes, edges, context, nodeHandlers, workflowConfig,
|
|
|
923
1213
|
// once — see the comment there.
|
|
924
1214
|
|
|
925
1215
|
if (node.type === 'general-if-statement') {
|
|
926
|
-
const condResult = evaluateCondition(resolvedConfig, context);
|
|
1216
|
+
const condResult = evaluateCondition(resolvedConfig, context, node.config);
|
|
927
1217
|
context[node.id] = { result: condResult };
|
|
928
1218
|
executed[node.id] = true;
|
|
929
1219
|
|
|
@@ -940,17 +1230,7 @@ async function executeNodes(nodes, edges, context, nodeHandlers, workflowConfig,
|
|
|
940
1230
|
}
|
|
941
1231
|
|
|
942
1232
|
if (node.type === 'general-switch') {
|
|
943
|
-
const
|
|
944
|
-
const cases = resolvedConfig.cases || [];
|
|
945
|
-
let matchedCase = 'default';
|
|
946
|
-
for (let ci = 0; ci < cases.length; ci++) {
|
|
947
|
-
const caseVal = resolveValue(cases[ci].condition, context);
|
|
948
|
-
if (resolvedConfig.comparisonMode === 'expression') {
|
|
949
|
-
try { if (new Function('value', 'context', 'return (' + caseVal + ')')(switchVal, context)) { matchedCase = cases[ci].id; break; } } catch(e) {}
|
|
950
|
-
} else {
|
|
951
|
-
if (switchVal === caseVal) { matchedCase = cases[ci].id; break; }
|
|
952
|
-
}
|
|
953
|
-
}
|
|
1233
|
+
const matchedCase = matchSwitchCase(node.config, resolvedConfig, context);
|
|
954
1234
|
context[node.id] = { matchedCase: matchedCase };
|
|
955
1235
|
executed[node.id] = true;
|
|
956
1236
|
|
|
@@ -1216,8 +1496,8 @@ async function executeLoop(loopNode, config, allNodes, edges, context, nodeHandl
|
|
|
1216
1496
|
const whileCtx = Object.assign({}, context);
|
|
1217
1497
|
whileCtx[loopNode.id + '_iter'] = { iteration: iter };
|
|
1218
1498
|
const condStr = resolveValue(config.condition, whileCtx);
|
|
1219
|
-
|
|
1220
|
-
|
|
1499
|
+
// Only the authored condition is compiled (see runExpression).
|
|
1500
|
+
const condResult = runExpression(loopNode.config && loopNode.config.condition, condStr, ['context'], [whileCtx], whileCtx);
|
|
1221
1501
|
if (loopType === 'while' && !condResult) break;
|
|
1222
1502
|
if (loopType === 'until' && condResult) break;
|
|
1223
1503
|
await executeNodes(bodyNodes, edges, whileCtx, nodeHandlers, workflowConfig, callServerSegment, executionId);
|
|
@@ -1398,12 +1678,17 @@ function snapshotIncomingContext(incoming) {
|
|
|
1398
1678
|
}
|
|
1399
1679
|
|
|
1400
1680
|
// Never replied: the caller's own page-state snapshot (the client never merges
|
|
1401
|
-
// it back — see mergeServerResults) and the route's private state
|
|
1681
|
+
// it back — see mergeServerResults) and the route's private state, the
|
|
1682
|
+
// visitor's session identity included (the server reads it from the cookie on
|
|
1683
|
+
// every request).
|
|
1402
1684
|
var SEGMENT_REPLY_PRIVATE_KEYS = {
|
|
1403
1685
|
__stateValues: true,
|
|
1404
1686
|
__internalHeaders: true,
|
|
1405
1687
|
__request: true,
|
|
1406
|
-
__pendingNodePromises: true
|
|
1688
|
+
__pendingNodePromises: true,
|
|
1689
|
+
__sessionUserId: true,
|
|
1690
|
+
__sessionRole: true,
|
|
1691
|
+
__sessionUser: true
|
|
1407
1692
|
};
|
|
1408
1693
|
|
|
1409
1694
|
// What a server segment replies with: the result of every node it ran itself
|
|
@@ -1493,12 +1778,7 @@ function internalRequestHeaders(req) {
|
|
|
1493
1778
|
if (req && req.headers && req.headers.cookie) {
|
|
1494
1779
|
headers.cookie = req.headers.cookie;
|
|
1495
1780
|
}
|
|
1496
|
-
|
|
1497
|
-
if (bypassSecret) {
|
|
1498
|
-
headers['x-vercel-protection-bypass'] = bypassSecret;
|
|
1499
|
-
// Tells Vercel not to hand the bypass back to the caller as a cookie.
|
|
1500
|
-
headers['x-vercel-set-bypass-cookie'] = 'false';
|
|
1501
|
-
}
|
|
1781
|
+
${(0, self_call_headers_1.generateProtectionBypassHeaderStatements)('headers')}
|
|
1502
1782
|
return headers;
|
|
1503
1783
|
}
|
|
1504
1784
|
|
|
@@ -1515,6 +1795,7 @@ module.exports = {
|
|
|
1515
1795
|
resolveValue,
|
|
1516
1796
|
resolveSecret,
|
|
1517
1797
|
resolveConfig,
|
|
1798
|
+
resolveNodeConfig,
|
|
1518
1799
|
resolveContextRef,
|
|
1519
1800
|
resolveRichTextContext,
|
|
1520
1801
|
unwrapWorkflowCollection,
|
|
@@ -1524,6 +1805,7 @@ module.exports = {
|
|
|
1524
1805
|
withoutCredentialColumns,
|
|
1525
1806
|
credentialResultNodeIds,
|
|
1526
1807
|
evaluateCondition,
|
|
1808
|
+
matchSwitchCase,
|
|
1527
1809
|
evaluateSingleComparison,
|
|
1528
1810
|
normalizeComparisonOperator,
|
|
1529
1811
|
resolveTemplateTokenString,
|
|
@@ -1702,10 +1984,13 @@ function pruneContext(context, stateKeys) {
|
|
|
1702
1984
|
// Credentials for a server-side caller's own requests travel as HEADERS
|
|
1703
1985
|
// (see segmentRequestHeaders), never in the body.
|
|
1704
1986
|
if (key === '__internalHeaders') continue;
|
|
1705
|
-
// The
|
|
1706
|
-
//
|
|
1707
|
-
|
|
1708
|
-
|
|
1987
|
+
// The visitor's identity is the server's to read from the session cookie;
|
|
1988
|
+
// a route ignores any it is sent.
|
|
1989
|
+
if (key === '__sessionUserId' || key === '__sessionRole' || key === '__sessionUser') continue;
|
|
1990
|
+
// The signatures of earlier server results, of the key order and of the
|
|
1991
|
+
// run they belong to must cross whole: a pruned signature no longer
|
|
1992
|
+
// matches, and the server then treats the result it covers as never produced.
|
|
1993
|
+
if (key === '__sig' || key === '__sigOrder' || key === '__sigRun') {
|
|
1709
1994
|
pruned[key] = val;
|
|
1710
1995
|
continue;
|
|
1711
1996
|
}
|
|
@@ -1817,7 +2102,16 @@ async function callServerSegment(segmentUrl, context, stateKeys) {
|
|
|
1817
2102
|
let errorData;
|
|
1818
2103
|
try { errorData = await response.json(); } catch(e) { errorData = { error: response.statusText }; }
|
|
1819
2104
|
if (response.status === 429) {
|
|
1820
|
-
|
|
2105
|
+
// The sentence the visitor reads. A rate-limiter step answers its
|
|
2106
|
+
// author's own \`message\` beside a generic \`error\` ("Too Many
|
|
2107
|
+
// Requests"), so \`message\` comes first; every other 429 (the shared
|
|
2108
|
+
// security runtime, a step's visitor limit, the route's abuse gate, the
|
|
2109
|
+
// site's AI budget) says only \`error\`. No 429 carries internal text.
|
|
2110
|
+
var rlErr = new Error(
|
|
2111
|
+
(errorData && typeof errorData.message === 'string' && errorData.message) ||
|
|
2112
|
+
(errorData && typeof errorData.error === 'string' && errorData.error) ||
|
|
2113
|
+
'Too many requests. Try again later.'
|
|
2114
|
+
);
|
|
1821
2115
|
rlErr.__skipErrorHandler = true;
|
|
1822
2116
|
rlErr.__rateLimited = true;
|
|
1823
2117
|
rlErr.__earlyResponse = errorData;
|
|
@@ -1907,7 +2201,16 @@ async function callStreamingServerSegment(segmentUrl, context, streamingInfo, al
|
|
|
1907
2201
|
let errorData;
|
|
1908
2202
|
try { errorData = await response.json(); } catch(e) { errorData = { error: response.statusText }; }
|
|
1909
2203
|
if (response.status === 429) {
|
|
1910
|
-
|
|
2204
|
+
// The sentence the visitor reads. A rate-limiter step answers its
|
|
2205
|
+
// author's own \`message\` beside a generic \`error\` ("Too Many
|
|
2206
|
+
// Requests"), so \`message\` comes first; every other 429 (the shared
|
|
2207
|
+
// security runtime, a step's visitor limit, the route's abuse gate, the
|
|
2208
|
+
// site's AI budget) says only \`error\`. No 429 carries internal text.
|
|
2209
|
+
var rlErr = new Error(
|
|
2210
|
+
(errorData && typeof errorData.message === 'string' && errorData.message) ||
|
|
2211
|
+
(errorData && typeof errorData.error === 'string' && errorData.error) ||
|
|
2212
|
+
'Too many requests. Try again later.'
|
|
2213
|
+
);
|
|
1911
2214
|
rlErr.__skipErrorHandler = true;
|
|
1912
2215
|
rlErr.__rateLimited = true;
|
|
1913
2216
|
rlErr.__earlyResponse = errorData;
|
|
@@ -2166,14 +2469,19 @@ async function executeWorkflowWithSegments(workflowConfig, triggerContext, clien
|
|
|
2166
2469
|
}
|
|
2167
2470
|
}
|
|
2168
2471
|
} catch (error) {
|
|
2169
|
-
|
|
2472
|
+
// A step the server refused for its rate limit (429) is a failure the
|
|
2473
|
+
// visitor must see: the workflow's error branch runs with the server's
|
|
2474
|
+
// public sentence and \`rateLimited: true\`, so a busy button is released
|
|
2475
|
+
// and a message shown. Only a workflow without an error branch ends quietly.
|
|
2476
|
+
const errorHandler = findErrorHandlerNodes(workflowConfig);
|
|
2477
|
+
if (error.__rateLimited ? !errorHandler : error.__skipErrorHandler) {
|
|
2170
2478
|
return context;
|
|
2171
2479
|
}
|
|
2172
|
-
const errorHandler = findErrorHandlerNodes(workflowConfig);
|
|
2173
2480
|
if (errorHandler) {
|
|
2174
2481
|
context[workflowConfig.errorHandlerNodeId] = {
|
|
2175
2482
|
error: { message: error.message || String(error), stack: error.stack || '' },
|
|
2176
|
-
errorMessage: error.message || String(error)
|
|
2483
|
+
errorMessage: error.message || String(error),
|
|
2484
|
+
rateLimited: error.__rateLimited === true
|
|
2177
2485
|
};
|
|
2178
2486
|
try {
|
|
2179
2487
|
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,iDAIuB;AACvB,yFAA0F;AAC1F,uEAAyE;AACzE,6DAAoE;AAYpE,MAAM,gBAAgB,GAAsB,EAAE,OAAO,EAAE,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,CAAA;AAEvE,MAAM,8BAA8B,GAAG,CAAC,UAAqC,EAAE,EAAU,EAAE;IAChG,OAAO;;;;;;;;;EASP,IAAA,6CAA8B,EAAC,OAAO,CAAC,YAAY,IAAI,gBAAgB,CAAC;EACxE,IAAA,gDAAiC,GAAE;EACnC,IAAA,4DAA+B,GAAE
|
|
1
|
+
{"version":3,"file":"executor-generator.js","sourceRoot":"","sources":["../../src/executor-generator.ts"],"names":[],"mappings":";;;AAAA,iDAIuB;AACvB,yFAA0F;AAC1F,uEAIwC;AACxC,qEAAoF;AACpF,2DAA8E;AAC9E,uEAAyE;AACzE,6DAAoE;AAYpE,MAAM,gBAAgB,GAAsB,EAAE,OAAO,EAAE,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,CAAA;AAEvE,MAAM,8BAA8B,GAAG,CAAC,UAAqC,EAAE,EAAU,EAAE;IAChG,OAAO;;;;;;;;;EASP,IAAA,6CAA8B,EAAC,OAAO,CAAC,YAAY,IAAI,gBAAgB,CAAC;EACxE,IAAA,gDAAiC,GAAE;EACnC,IAAA,4DAA+B,GAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WA0RxB,IAAA,mCAAgB,EAAC,OAAO,CAAC;;;;;;WAMzB,IAAA,oCAAiB,EAAC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkInC,6CAAyB;;;;;;;;;;;;;0BAaD,uCAAmB,mDAAmD,uCAAmB;UACzG,uCAAmB,iCAAiC,uCAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyuC/E,IAAA,uDAA6B,GAAE;EAC/B,IAAA,kDAA6B,GAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmE/B,IAAA,4DAAwC,EAAC,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoDpD,CAAA;AACD,CAAC,CAAA;AA9xDY,QAAA,8BAA8B,kCA8xD1C;AAEM,MAAM,yBAAyB,GAAG,GAAW,EAAE;IACpD,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAupBR,CAAA;AACD,CAAC,CAAA;AAzpBY,QAAA,yBAAyB,6BAypBrC"}
|