@salsita-ai/sdk 0.50.0-develop.9241bcf09e → 0.50.0-develop.927e2414eb
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/README.md +3 -3
- package/dist/admin/common/admin-interface.d.ts +11 -1
- package/dist/admin/common/admin-interface.js +1 -1
- package/dist/admin/ui/layout/UserProfile.d.ts +1 -1
- package/dist/admin/ui/layout/UserProfile.js +1 -1
- package/dist/admin/ui/maintenance/ImportPresets.js +1 -1
- package/dist/application/mount-application.js +1 -1
- package/dist/application/mount-configurator.js +1 -1
- package/dist/application/studio-embedding.d.ts +6 -0
- package/dist/application/studio-embedding.js +1 -0
- package/dist/application-spec/core/enhanced-json-schema.d.ts +5 -6
- package/dist/application-spec/core/enhanced-json-schema.js +1 -1
- package/dist/application-spec/core/markers/index.d.ts +1 -0
- package/dist/application-spec/core/markers/index.js +1 -1
- package/dist/application-spec/core/markers/set-in-studio-marker.d.ts +15 -0
- package/dist/application-spec/core/markers/set-in-studio-marker.js +1 -0
- package/dist/application-spec/errors/diagnostic-codes.d.ts +16 -0
- package/dist/application-spec/errors/diagnostic-codes.js +1 -1
- package/dist/application-spec/errors/diagnostic-messages.d.ts +16 -0
- package/dist/application-spec/errors/diagnostic-messages.js +1 -1
- package/dist/application-spec/generate-application/code/domain-runtime-files.d.ts +3 -3
- package/dist/application-spec/generate-application/code/domain-runtime-files.js +1 -1
- package/dist/application-spec/generate-application/code/standalone-app-files.d.ts +0 -12
- package/dist/application-spec/generate-application/code/standalone-app-files.js +1 -1
- package/dist/application-spec/generate-application/code/templates/admin-config.d.ts +5 -1
- package/dist/application-spec/generate-application/code/templates/admin-config.js +4 -4
- package/dist/application-spec/generate-application/code/templates/application-types.js +5 -5
- package/dist/application-spec/generate-application/code/templates/configurator-config.js +6 -6
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-phx-globals.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-phx-globals.js +19 -0
- package/dist/application-spec/generate-application/code/templates/domain-spec.js +12 -12
- package/dist/application-spec/generate-application/code/templates/frontend-config.js +7 -3
- package/dist/application-spec/generate-application/code/templates/global-definition/generate-action-types.d.ts +3 -3
- package/dist/application-spec/generate-application/code/templates/global-definition/generate-action-types.js +3 -3
- package/dist/application-spec/generate-application/code/templates/global-definition/generate-assistant-form-element-types.d.ts +10 -6
- package/dist/application-spec/generate-application/code/templates/global-definition/generate-assistant-form-element-types.js +7 -7
- package/dist/application-spec/generate-application/code/templates/global-definition/generate-phx-types.js +12 -12
- package/dist/application-spec/generate-application/code/templates/globals.js +21 -12
- package/dist/application-spec/generate-application/code/templates/index.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/index.js +1 -1
- package/dist/application-spec/generate-application/code/templates/sign-in-page-options.d.ts +5 -0
- package/dist/application-spec/generate-application/code/templates/sign-in-page-options.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/core/cli.d.ts +2 -1
- package/dist/application-spec/generate-application/code/templates/skills/core/cli.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/core/sdk.js +2 -1
- package/dist/application-spec/generate-application/code/templates/skills/features/application-states/presets.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/features/application-states/views-and-tools.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/features/assistant/index.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/assistant/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/{custom-layout/assistant.d.ts → assistant/panel.d.ts} +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/features/assistant/panel.js +42 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/assistant/reading-and-changing.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/assistant/reading-and-changing.js +55 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/{webhooks/assistant-setup.d.ts → assistant/session-setup.d.ts} +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/features/assistant/session-setup.js +16 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/custom-layout.js +2 -2
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/sign-in.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/sign-in.js +19 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/actions.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/features/embedding.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/embedding.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/features.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/authentication.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/authentication.js +32 -26
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/entry-and-environment.js +1 -3
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/publishing.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/session-fields.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/session-fields.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/webhooks.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/guide.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill-bundle.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill-bundle.js +3 -3
- package/dist/application-spec/generate-application/code/templates/skills/processes/asset-conversion.js +3 -3
- package/dist/application-spec/generate-application/code/templates/skills/processes/assistant-configuration.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/assistant-configuration.js +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/report.js +2 -2
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/handoff.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/processes/index.d.ts +2 -1
- package/dist/application-spec/generate-application/code/templates/skills/processes/index.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/processes/model-migration.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/appearance.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/code.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/processes/scene-realism.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/scene-realism.js +29 -0
- package/dist/application-spec/generate-application/code/templates/skills/sdk-channel.d.ts +17 -0
- package/dist/application-spec/generate-application/code/templates/skills/sdk-channel.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/sdk-subpath-imports.js +1 -1
- package/dist/application-spec/generate-application/code/templates/webhook-builders.js +3 -2
- package/dist/application-spec/generate-application/code/templates/webhook-index.d.ts +1 -2
- package/dist/application-spec/generate-application/code/templates/webhook-index.js +3 -7
- package/dist/application-spec/generate-application/code/webhook-safe-files.d.ts +3 -1
- package/dist/application-spec/generate-application/code/webhook-safe-files.js +1 -1
- package/dist/application-spec/parse-application-files/access/access-handler-kinds.d.ts +18 -0
- package/dist/application-spec/parse-application-files/access/access-handler-kinds.js +1 -0
- package/dist/application-spec/parse-application-files/access/analyzed-file.d.ts +7 -0
- package/dist/application-spec/parse-application-files/access/analyzed-file.js +1 -0
- package/dist/application-spec/parse-application-files/access/check-access-handler-files.d.ts +20 -0
- package/dist/application-spec/parse-application-files/access/check-access-handler-files.js +1 -0
- package/dist/application-spec/parse-application-files/access/check-auth-hook-files.d.ts +17 -0
- package/dist/application-spec/parse-application-files/access/check-auth-hook-files.js +1 -0
- package/dist/application-spec/parse-application-files/access/index.d.ts +5 -0
- package/dist/application-spec/parse-application-files/access/index.js +1 -0
- package/dist/application-spec/parse-application-files/access/sign-in-control.d.ts +7 -0
- package/dist/application-spec/parse-application-files/access/sign-in-control.js +1 -0
- package/dist/application-spec/parse-application-files/categorize/categorize-files.d.ts +2 -1
- package/dist/application-spec/parse-application-files/categorize/categorize-files.js +1 -1
- package/dist/application-spec/parse-application-files/categorize/module-analysis.d.ts +30 -4
- package/dist/application-spec/parse-application-files/categorize/module-analysis.js +1 -1
- package/dist/application-spec/parse-application-files/categorize/webhook-safety.js +1 -1
- package/dist/application-spec/parse-application-files/merge/merged-app-metadata.d.ts +16 -1
- package/dist/application-spec/parse-application-files/merge/merged-app-metadata.js +1 -1
- package/dist/application-spec/parse-application-files/merge/merged-assistant.js +1 -1
- package/dist/application-spec/parse-application-files/merge/merged-spec.d.ts +7 -1
- package/dist/application-spec/parse-application-files/merge/merged-spec.js +1 -1
- package/dist/application-spec/parse-application-files/parse-application-files.js +1 -1
- package/dist/application-spec/parse-application-files/parse-common-admin-spec.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-actions.d.ts +3 -2
- package/dist/application-spec/parse-application-files/raw-spec/raw-actions.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.d.ts +29 -6
- package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-components.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-spec-file.d.ts +11 -3
- package/dist/application-spec/parse-application-files/raw-spec/raw-spec-file.js +1 -1
- package/dist/application-spec/parse-application-files/resolve/resolve-import-modules.js +1 -1
- package/dist/application-spec/parse-application-files/spec/application/configurator-spec/configurator-spec.d.ts +6 -0
- package/dist/application-spec/parse-application-files/spec/application/configurator-spec/configurator-spec.js +1 -1
- package/dist/application-spec/parse-application-files/spec/model/index.d.ts +2 -1
- package/dist/application-spec/parse-application-files/spec/model/index.js +1 -1
- package/dist/application-spec/parse-application-files/spec/model/session-data-schema.d.ts +5 -2
- package/dist/application-spec/parse-application-files/spec/model/session-data-schema.js +1 -1
- package/dist/application-spec/parse-application-files/spec/model/session-fields/index.d.ts +1 -0
- package/dist/application-spec/parse-application-files/spec/model/session-fields/index.js +1 -0
- package/dist/application-spec/parse-application-files/spec/model/session-fields/session-fields.d.ts +15 -0
- package/dist/application-spec/parse-application-files/spec/model/session-fields/session-fields.js +1 -0
- package/dist/application-spec/parse-application-files/spec/relations/relations.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/actions.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/app-metadata.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-form-elements.d.ts +14 -2
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-form-elements.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.d.ts +6 -9
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/assistant/index.d.ts +0 -1
- package/dist/client/authenticated-client.d.ts +5 -1
- package/dist/client/authenticated-client.js +1 -1
- package/dist/client/authorized-client.d.ts +3 -1
- package/dist/client/authorized-client.js +1 -1
- package/dist/client/base-client.d.ts +15 -1
- package/dist/client/base-client.js +1 -1
- package/dist/client/cli-client/cli-api-client.d.ts +17 -0
- package/dist/client/cli-client/cli-api-client.js +1 -0
- package/dist/client/cli-client/index.d.ts +2 -0
- package/dist/client/cli-client/index.js +1 -0
- package/dist/client/cli-client/unsupported-api-version-error.d.ts +11 -0
- package/dist/client/cli-client/unsupported-api-version-error.js +1 -0
- package/dist/client/contract.d.ts +39 -4
- package/dist/client/contract.js +1 -1
- package/dist/client/index.d.ts +3 -1
- package/dist/client/index.js +1 -1
- package/dist/client/phoenix-api.d.ts +7834 -2378
- package/dist/client/unauthenticated-client.d.ts +2 -1
- package/dist/client/unauthenticated-client.js +1 -1
- package/dist/client/version.d.ts +11 -0
- package/dist/client/version.js +1 -1
- package/dist/configurator/application-runtime/extensions/selectors.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/action-system/action.d.ts +16 -4
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +25 -10
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.d.ts +15 -5
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/index.d.ts +1 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/index.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/register-webmcp-tools.d.ts +7 -3
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/register-webmcp-tools.js +6 -2
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/share-link.d.ts +14 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/share-link.js +2 -0
- package/dist/configurator/application-runtime/extensions/systems/camera-control-system/camera-control-system.d.ts +41 -35
- package/dist/configurator/application-runtime/extensions/systems/camera-control-system/camera-control-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/export-system/export-system.d.ts +4 -2
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.d.ts +9 -3
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/read-offered-navigation.d.ts +6 -3
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/read-offered-navigation.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/export-image-capture.d.ts +15 -4
- package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/export-image-capture.js +3 -3
- package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/image-rendering-system.d.ts +15 -7
- package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/image-rendering-system.js +1 -1
- package/dist/configurator/common/configurator-interface.d.ts +13 -1
- package/dist/configurator/common/configurator-interface.js +1 -1
- package/dist/configurator/scene/animations/Animations.js +1 -1
- package/dist/configurator/scene/cameras/CameraPadding.d.ts +5 -0
- package/dist/configurator/scene/cameras/CameraPadding.js +1 -1
- package/dist/configurator/scene/resources/use-phx-gltf.js +1 -1
- package/dist/configurator/scene/scene-entity/materials/LocalCreatedMaterial.js +1 -1
- package/dist/configurator/scene/scene-entity/materials/RemoteReplacedMaterial.d.ts +5 -0
- package/dist/configurator/scene/scene-entity/materials/RemoteReplacedMaterial.js +1 -1
- package/dist/configurator/scene/scene-entity/materials/use-dispose-replaced.d.ts +27 -0
- package/dist/configurator/scene/scene-entity/materials/use-dispose-replaced.js +1 -0
- package/dist/configurator/toolbar-actions/use-toolbar-actions.js +1 -1
- package/dist/configurator/ui/assistant/AssistantComposer.js +1 -1
- package/dist/configurator/ui/assistant/AssistantPanel.js +1 -1
- package/dist/configurator/ui/assistant/annotation/editor/AnnotationComment.d.ts +6 -5
- package/dist/configurator/ui/assistant/annotation/editor/AnnotationComment.js +1 -1
- package/dist/configurator/ui/assistant/annotation/editor/AnnotationEditor.d.ts +4 -3
- package/dist/configurator/ui/assistant/annotation/editor/AnnotationEditor.js +1 -1
- package/dist/configurator/ui/assistant/annotation/editor/annotation-pins.d.ts +5 -0
- package/dist/configurator/ui/assistant/annotation/editor/annotation-pins.js +1 -1
- package/dist/configurator/ui/assistant/disclaimer/AssistantDisclaimerDialog.d.ts +10 -0
- package/dist/configurator/ui/assistant/disclaimer/AssistantDisclaimerDialog.js +1 -0
- package/dist/configurator/ui/assistant/disclaimer/AssistantDisclaimerLine.d.ts +10 -0
- package/dist/configurator/ui/assistant/disclaimer/AssistantDisclaimerLine.js +1 -0
- package/dist/configurator/ui/assistant/disclaimer/index.d.ts +2 -0
- package/dist/configurator/ui/assistant/disclaimer/index.js +1 -0
- package/dist/configurator/ui/assistant/drawing/AssistantDrawing.d.ts +2 -3
- package/dist/configurator/ui/assistant/drawing/AssistantDrawing.js +1 -1
- package/dist/configurator/ui/assistant/drawing/index.d.ts +1 -1
- package/dist/configurator/ui/assistant/drawing/index.js +1 -1
- package/dist/configurator/ui/assistant/drawing/use-drawing-url.d.ts +6 -12
- package/dist/configurator/ui/assistant/drawing/use-drawing-url.js +1 -1
- package/dist/configurator/ui/assistant/form/registry/create-assistant-form-element.d.ts +11 -7
- package/dist/configurator/ui/assistant/form-elements/FormTile.js +1 -1
- package/dist/configurator/ui/assistant/image-view/ImageView.js +1 -1
- package/dist/configurator/ui/assistant/panel/AssistantPanelHeader.js +1 -1
- package/dist/configurator/ui/assistant/use-assistant-composer.d.ts +5 -0
- package/dist/configurator/ui/assistant/use-assistant-composer.js +2 -2
- package/dist/configurator/ui/configurator-layout/index.d.ts +1 -1
- package/dist/configurator/ui/configurator-layout/index.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/desktop-sidebar/DesktopSidebar.js +4 -4
- package/dist/configurator/ui/configurator-layout/slots/index.d.ts +2 -0
- package/dist/configurator/ui/configurator-layout/slots/index.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/view-controls/DesktopViewControls.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/view-controls/MobileViewControls.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/view-controls/NestedViewControls.d.ts +7 -0
- package/dist/configurator/ui/configurator-layout/slots/view-controls/NestedViewControls.js +1 -0
- package/dist/configurator/ui/configurator-layout/slots/view-controls/use-view-control-items.d.ts +6 -0
- package/dist/configurator/ui/configurator-layout/slots/view-controls/use-view-control-items.js +1 -0
- package/dist/configurator/ui/configurator-layout/universal/DesktopPreview.js +1 -1
- package/dist/configurator/ui/configurator-layout/universal/MobileLayout.js +3 -3
- package/dist/configurator/ui/configurator-layout/universal/MobilePreview.js +1 -1
- package/dist/configurator/ui/configurator-layout/universal/use-preview-description.d.ts +1 -0
- package/dist/configurator/ui/configurator-layout/universal/use-preview-description.js +1 -0
- package/dist/configurator/ui/index.d.ts +1 -1
- package/dist/configurator/ui/legacy/layout/common/ViewControls.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/AssistantToolbarButton.js +1 -1
- package/dist/docs/index.json +117 -2
- package/dist/docs/layouts/nested-view-controls.mdx +223 -0
- package/dist/docs/layouts/preview/always.mdx +22 -0
- package/dist/docs/layouts/view-controls.mdx +2 -0
- package/dist/docs/other-features/domain-actions.mdx +53 -56
- package/dist/docs/phoenix/admin.mdx +5 -40
- package/dist/docs/phoenix/application-states.mdx +1 -1
- package/dist/docs/phoenix/assistant/actions.mdx +183 -0
- package/dist/docs/phoenix/assistant/changing-the-configuration.mdx +333 -0
- package/dist/docs/phoenix/assistant/instructions-and-ai-settings.mdx +221 -0
- package/dist/docs/phoenix/assistant/overview.mdx +137 -0
- package/dist/docs/phoenix/assistant/per-session-setup.mdx +166 -0
- package/dist/docs/phoenix/assistant/reading-the-configuration.mdx +349 -0
- package/dist/docs/phoenix/assistant/screenshots.mdx +135 -0
- package/dist/docs/phoenix/assistant/security-and-limits.mdx +151 -0
- package/dist/docs/phoenix/assistant/the-panel.mdx +298 -0
- package/dist/docs/phoenix/clerk-sign-in.mdx +9 -5
- package/dist/docs/phoenix/configurator-interface.mdx +18 -33
- package/dist/docs/phoenix/csp.mdx +3 -1
- package/dist/docs/phoenix/data-sources.mdx +26 -30
- package/dist/docs/phoenix/deployments.mdx +3 -3
- package/dist/docs/phoenix/finalization.mdx +0 -1
- package/dist/docs/phoenix/integration/authentication-external.mdx +17 -15
- package/dist/docs/phoenix/integration/authentication-internal.mdx +1 -1
- package/dist/docs/phoenix/integration/finalization-internal.mdx +1 -4
- package/dist/docs/phoenix/integration/integration-modes-external.mdx +2 -2
- package/dist/docs/phoenix/integration/integration-modes-internal.mdx +9 -0
- package/dist/docs/phoenix/layout-slots.mdx +1 -1
- package/dist/docs/phoenix/migrations.mdx +1 -1
- package/dist/docs/phoenix/phoenix-cli.mdx +90 -57
- package/dist/docs/phoenix/project-structure.mdx +30 -15
- package/dist/docs/phoenix/publishing.mdx +21 -28
- package/dist/docs/phoenix/sdk-builder-workflow.mdx +51 -34
- package/dist/docs/phoenix/sessions-and-access.mdx +171 -164
- package/dist/docs/phoenix/webhook-membership.mdx +4 -1
- package/dist/docs/phoenix/webhooks.mdx +93 -116
- package/dist/docs/ux-guidelines/interaction-modes.mdx +2 -2
- package/dist/domain/application/access/access-handlers.d.ts +19 -0
- package/dist/domain/application/access/access-handlers.js +1 -0
- package/dist/domain/application/access/anonymous-handler.d.ts +16 -0
- package/dist/domain/application/access/anonymous-handler.js +1 -0
- package/dist/domain/application/access/chunk-scopes-handler.d.ts +27 -0
- package/dist/domain/application/access/chunk-scopes-handler.js +1 -0
- package/dist/domain/application/access/code-handler.d.ts +16 -0
- package/dist/domain/application/access/code-handler.js +1 -0
- package/dist/domain/application/access/index.d.ts +7 -0
- package/dist/domain/application/access/index.js +1 -0
- package/dist/domain/application/access/refresh-handler.d.ts +16 -0
- package/dist/domain/application/access/refresh-handler.js +1 -0
- package/dist/domain/application/access/signed-in-handler.d.ts +44 -0
- package/dist/domain/application/access/signed-in-handler.js +1 -0
- package/dist/domain/application/access/visitor-handler.d.ts +23 -0
- package/dist/domain/application/access/visitor-handler.js +1 -0
- package/dist/domain/application/application-config.d.ts +36 -1
- package/dist/domain/application/assistant/assistant-exposure.d.ts +22 -0
- package/dist/domain/application/assistant/assistant-exposure.js +1 -0
- package/dist/domain/application/assistant/build-assistant-lenses.js +3 -3
- package/dist/domain/application/assistant/build-assistant-manifest.js +1 -1
- package/dist/domain/application/assistant/generate-assistant-prompt.d.ts +6 -2
- package/dist/domain/application/assistant/generate-assistant-prompt.js +1 -1
- package/dist/domain/application/assistant/index.d.ts +1 -0
- package/dist/domain/application/assistant/index.js +1 -1
- package/dist/domain/application/assistant/session-setup/apply-assistant-setup.js +1 -1
- package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.d.ts +14 -2
- package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.js +1 -1
- package/dist/domain/application/assistant/session-setup/assistant-takes-images.d.ts +7 -0
- package/dist/domain/application/assistant/session-setup/assistant-takes-images.js +1 -0
- package/dist/domain/application/assistant/session-setup/index.d.ts +1 -0
- package/dist/domain/application/assistant/session-setup/index.js +1 -1
- package/dist/domain/application/assistant-mutations.js +1 -1
- package/dist/domain/application/assistant-recipe-groups.d.ts +4 -3
- package/dist/domain/application/assistant-recipe-groups.js +1 -1
- package/dist/domain/application/configurator-builder.d.ts +2 -0
- package/dist/domain/application/configurator-builder.js +1 -1
- package/dist/domain/application/index.d.ts +2 -1
- package/dist/domain/application/index.js +1 -1
- package/dist/domain/application/standard-properties.d.ts +1 -1
- package/dist/domain/application/standard-properties.js +1 -1
- package/dist/domain/available-system-components/available-system-components.js +1 -1
- package/dist/domain/core/component/system-component-filter.d.ts +1 -0
- package/dist/domain/core/component/system-component-filter.js +1 -1
- package/dist/domain/core/component/view-state-component.d.ts +4 -3
- package/dist/domain/core/component/view-state-component.js +1 -1
- package/dist/domain/core/domain-factory.d.ts +6 -0
- package/dist/domain/core/domain-factory.js +1 -1
- package/dist/domain/core/fit-session-data.d.ts +16 -0
- package/dist/domain/core/fit-session-data.js +1 -0
- package/dist/domain/domain-context/navigation-system/navigation-system.d.ts +2 -2
- package/dist/domain/domain-context/navigation-system/navigation-system.js +1 -1
- package/dist/domain/domain-context/transformers/when-builder.js +1 -1
- package/dist/domain/domain-runtime/domain-context/actions.d.ts +4 -0
- package/dist/domain/domain-runtime/domain-context/actions.js +1 -1
- package/dist/domain/domain-runtime/domain-context/domain-context.d.ts +8 -0
- package/dist/domain/domain-runtime/domain-context/domain-context.js +1 -1
- package/dist/domain/domain-runtime/domain-context/selectors.d.ts +1 -0
- package/dist/domain/domain-runtime/domain-context/selectors.js +1 -1
- package/dist/domain/domain-runtime/domain-context/types.d.ts +8 -4
- package/dist/domain/domain-runtime/domain-runtime.d.ts +8 -0
- package/dist/domain/extensions/export-images/agent-screenshot.d.ts +5 -4
- package/dist/domain/extensions/export-images/agent-screenshot.js +1 -1
- package/dist/domain/extensions/index.d.ts +0 -1
- package/dist/domain/extensions/index.js +1 -1
- package/dist/domain/mocks/create-mock-domain-runtime.d.ts +4 -0
- package/dist/domain/spec/sections/actions.d.ts +3 -2
- package/dist/domain/spec/sections/app-metadata.d.ts +12 -0
- package/dist/domain/spec/sections/assistant/assistant-features.d.ts +13 -0
- package/dist/domain/spec/sections/assistant/assistant-features.js +1 -0
- package/dist/domain/spec/sections/assistant/assistant-manifest.d.ts +17 -6
- package/dist/domain/spec/sections/assistant/assistant-resolved-manifest.d.ts +28 -5
- package/dist/domain/spec/sections/assistant/index.d.ts +1 -0
- package/dist/domain/system-components/index.d.ts +1 -0
- package/dist/domain/system-components/index.js +1 -1
- package/dist/domain/system-components/navigation/index.d.ts +1 -0
- package/dist/domain/system-components/navigation/index.js +1 -0
- package/dist/domain/system-components/navigation/view-controls.d.ts +24 -0
- package/dist/domain/system-components/navigation/view-controls.js +1 -0
- package/dist/editor/domain-editors/use-implementation-files.js +1 -1
- package/dist/extras/clerk/index.d.ts +6 -0
- package/dist/extras/cognito/AccountAvatar.d.ts +7 -0
- package/dist/extras/cognito/AccountAvatar.js +1 -0
- package/dist/extras/cognito/AccountControl.d.ts +14 -0
- package/dist/extras/cognito/AccountControl.js +1 -0
- package/dist/extras/cognito/AdminSignInPage.d.ts +26 -0
- package/dist/extras/cognito/AdminSignInPage.js +1 -0
- package/dist/extras/cognito/CognitoSignInPage.d.ts +8 -2
- package/dist/extras/cognito/CognitoSignInPage.js +1 -1
- package/dist/extras/cognito/ConfiguratorSignInPage.d.ts +19 -0
- package/dist/extras/cognito/ConfiguratorSignInPage.js +1 -0
- package/dist/extras/cognito/SignInFailurePage.d.ts +11 -0
- package/dist/extras/cognito/SignInFailurePage.js +1 -0
- package/dist/extras/cognito/SignInGateLayout.d.ts +25 -0
- package/dist/extras/cognito/SignInGateLayout.js +1 -0
- package/dist/extras/cognito/SignInNotice.d.ts +9 -0
- package/dist/extras/cognito/SignInNotice.js +1 -0
- package/dist/extras/cognito/index.d.ts +4 -0
- package/dist/extras/cognito/index.js +1 -1
- package/dist/globals/index.d.ts +5 -0
- package/dist/i18n/locales/cs/messages.js +1 -1
- package/dist/i18n/locales/da/messages.js +1 -1
- package/dist/i18n/locales/de/messages.js +1 -1
- package/dist/i18n/locales/de-AT/messages.js +1 -1
- package/dist/i18n/locales/en/messages.js +1 -1
- package/dist/i18n/locales/en-AU/messages.js +1 -1
- package/dist/i18n/locales/en-GB/messages.js +1 -1
- package/dist/i18n/locales/es/messages.js +1 -1
- package/dist/i18n/locales/fr/messages.js +1 -1
- package/dist/i18n/locales/hu/messages.js +1 -1
- package/dist/i18n/locales/it/messages.js +1 -1
- package/dist/i18n/locales/nl/messages.js +1 -1
- package/dist/i18n/locales/pl/messages.js +1 -1
- package/dist/i18n/locales/pt/messages.js +1 -1
- package/dist/i18n/locales/ro/messages.js +1 -1
- package/dist/i18n/locales/sk/messages.js +1 -1
- package/dist/i18n/locales/tr/messages.js +1 -1
- package/dist/legacy/deployment-cli/commands/create-environment.js +1 -1
- package/dist/legacy/deployment-cli/commands/list-environments.js +1 -1
- package/dist/legacy/deployment-cli/commands/register-deployment.js +1 -1
- package/dist/legacy/domain-spec/__generated/domain-schema.d.ts +12 -3
- package/dist/legacy/phoenix-cli/commands/prepare-deployment-command.js +1 -1
- package/dist/legacy/phoenix-cli/commands/prepare-local-environment-command.js +1 -1
- package/dist/legacy/phoenix-cli/services/prepare-development-environment.js +1 -1
- package/dist/legacy/phoenix-cli/services/webhook-service/transport.js +1 -1
- package/dist/phoenix/application-spec/index.d.ts +1 -1
- package/dist/phoenix/application-spec/index.js +1 -1
- package/dist/phoenix/application-spec/resolve-deployment-data.d.ts +10 -3
- package/dist/phoenix/application-spec/resolve-deployment-data.js +2 -2
- package/dist/phoenix/cli.js +1 -1
- package/dist/phoenix/commands/account/whoami.d.ts +8 -2
- package/dist/phoenix/commands/account/whoami.js +4 -3
- package/dist/phoenix/commands/cleanup-environment.js +1 -1
- package/dist/phoenix/commands/deploy.d.ts +7 -2
- package/dist/phoenix/commands/deploy.js +9 -3
- package/dist/phoenix/commands/deployment-build-envs-command.js +1 -1
- package/dist/phoenix/commands/deps/deps.js +2 -2
- package/dist/phoenix/commands/feedback.d.ts +2 -2
- package/dist/phoenix/commands/feedback.js +1 -1
- package/dist/phoenix/commands/finish-deployment-command.js +1 -1
- package/dist/phoenix/commands/init-starter-spec.js +3 -4
- package/dist/phoenix/commands/init.d.ts +2 -2
- package/dist/phoenix/commands/init.js +1 -1
- package/dist/phoenix/commands/login.d.ts +1 -1
- package/dist/phoenix/commands/login.js +2 -2
- package/dist/phoenix/commands/logout.js +1 -1
- package/dist/phoenix/commands/prepare-deployment-command.js +2 -2
- package/dist/phoenix/commands/prepare-local-environment-command.js +1 -1
- package/dist/phoenix/services/cli-credentials.d.ts +13 -2
- package/dist/phoenix/services/cli-credentials.js +2 -2
- package/dist/phoenix/services/cli-server/describe-saved-logins.d.ts +5 -0
- package/dist/phoenix/services/cli-server/describe-saved-logins.js +1 -0
- package/dist/phoenix/services/cli-server/index.d.ts +2 -0
- package/dist/phoenix/services/cli-server/index.js +1 -0
- package/dist/phoenix/services/cli-server/resolve-cli-server-url.d.ts +25 -0
- package/dist/phoenix/services/cli-server/resolve-cli-server-url.js +1 -0
- package/dist/phoenix/services/development-credential.js +1 -1
- package/dist/phoenix/services/frontend-config.d.ts +2 -0
- package/dist/phoenix/services/index.d.ts +4 -2
- package/dist/phoenix/services/index.js +1 -1
- package/dist/phoenix/services/phoenix-regions.d.ts +15 -5
- package/dist/phoenix/services/phoenix-regions.js +1 -1
- package/dist/phoenix/services/prepare-development-environment.js +2 -2
- package/dist/phoenix/services/session/phoenix-application.js +1 -1
- package/dist/phoenix/services/signed-in-development-environment.d.ts +15 -4
- package/dist/phoenix/services/signed-in-development-environment.js +1 -1
- package/dist/phoenix/services/spec-project/describe-workspace-projects.d.ts +11 -0
- package/dist/phoenix/services/spec-project/describe-workspace-projects.js +1 -0
- package/dist/phoenix/services/spec-project/index.d.ts +3 -0
- package/dist/phoenix/services/spec-project/index.js +1 -0
- package/dist/phoenix/services/spec-project/resolve-deploy-target.d.ts +47 -0
- package/dist/phoenix/services/spec-project/resolve-deploy-target.js +1 -0
- package/dist/phoenix/services/spec-project/resolve-target-project.d.ts +34 -0
- package/dist/phoenix/services/spec-project/resolve-target-project.js +2 -0
- package/dist/phoenix/services/spec-project/write-spec-project.d.ts +7 -0
- package/dist/phoenix/services/spec-project/write-spec-project.js +1 -0
- package/dist/phoenix/services/variant-file-session.js +1 -1
- package/dist/phoenix/services/vite-config.js +1 -1
- package/dist/phoenix/services/webhook-service/transport.js +1 -1
- package/dist/react-sdk/application-runtime/common-services/selectors.js +1 -1
- package/dist/react-sdk/application-runtime/domain-application-context/configuration-persist-system.d.ts +6 -0
- package/dist/react-sdk/application-runtime/domain-application-context/configuration-persist-system.js +1 -1
- package/dist/react-sdk/application-runtime/host-properties/selectors.d.ts +2 -2
- package/dist/react-sdk/application-runtime/integration/integration-mode.d.ts +30 -0
- package/dist/react-sdk/application-runtime/integration/integration-mode.js +1 -1
- package/dist/react-sdk/application-runtime/runtime/create-application-runtime.d.ts +20 -6
- package/dist/react-sdk/application-runtime/session/actions.d.ts +2 -1
- package/dist/react-sdk/application-runtime/session/actions.js +1 -1
- package/dist/react-sdk/application-runtime/session/initialize.js +1 -1
- package/dist/react-sdk/application-runtime/session/selectors.d.ts +2 -0
- package/dist/react-sdk/application-runtime/session/selectors.js +1 -1
- package/dist/react-sdk/application-runtime/session/session-service.d.ts +64 -2
- package/dist/react-sdk/application-runtime/session/session-service.js +1 -1
- package/dist/react-sdk/application-runtime/session/session-token.d.ts +8 -0
- package/dist/react-sdk/application-runtime/session/session-token.js +1 -1
- package/dist/react-sdk/application-runtime/session/types.d.ts +6 -1
- package/dist/react-sdk/domain-context/common-hooks/use-domain-context.d.ts +1 -0
- package/dist/react-sdk/domain-context/index.d.ts +3 -2
- package/dist/react-sdk/domain-context/index.js +1 -1
- package/dist/react-sdk/domain-context/system-hooks/generate-share-link-hooks.d.ts +1 -5
- package/dist/react-sdk/domain-context/system-hooks/generate-share-link-hooks.js +1 -1
- package/dist/react-sdk/domain-context/system-hooks/generate-share-link.d.ts +25 -0
- package/dist/react-sdk/domain-context/system-hooks/generate-share-link.js +1 -0
- package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.d.ts +5 -3
- package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.js +1 -1
- package/dist/react-sdk/preset-selection/PresetSelectionProvider.js +1 -1
- package/dist/react-sdk/session/AccessDeniedAdminPage.d.ts +13 -0
- package/dist/react-sdk/session/AccessDeniedAdminPage.js +1 -0
- package/dist/react-sdk/session/AccessDeniedPage.d.ts +20 -0
- package/dist/react-sdk/session/AccessDeniedPage.js +1 -0
- package/dist/react-sdk/session/ConfiguratorUnavailablePage.d.ts +5 -0
- package/dist/react-sdk/session/ConfiguratorUnavailablePage.js +1 -0
- package/dist/react-sdk/session/SessionServiceProvider.d.ts +5 -0
- package/dist/react-sdk/session/SessionServiceProvider.js +1 -1
- package/dist/react-sdk/session/index.d.ts +3 -0
- package/dist/react-sdk/session/index.js +1 -1
- package/dist/react-sdk/session/server-sign-in-support.d.ts +16 -0
- package/dist/react-sdk/session/server-sign-in-support.js +1 -0
- package/dist/react-sdk/session/sign-in-address.d.ts +18 -0
- package/dist/react-sdk/session/sign-in-address.js +1 -0
- package/dist/react-sdk/session/studio-frame.d.ts +14 -0
- package/dist/react-sdk/session/studio-frame.js +1 -0
- package/dist/react-sdk/session/use-sign-in.d.ts +51 -0
- package/dist/react-sdk/session/use-sign-in.js +1 -0
- package/dist/ui-sdk/components/preview/Preview.d.ts +12 -4
- package/dist/ui-sdk/components/preview/Preview.js +2 -2
- package/dist/ui-sdk/components/snackbar/Snackbar.d.ts +3 -2
- package/dist/ui-sdk/components/snackbar/Snackbar.js +1 -1
- package/dist/ui-sdk/components/toolbar/desktop-toolbar/ToolbarPopper.d.ts +2 -0
- package/dist/ui-sdk/components/toolbar/desktop-toolbar/ToolbarPopper.js +1 -1
- package/dist/ui-sdk/components/view-controls/ViewControlsContext.d.ts +3 -1
- package/dist/ui-sdk/components/view-controls/ViewControlsItem.js +1 -1
- package/dist/ui-sdk/components/view-controls/ViewControlsRoot.d.ts +6 -1
- package/dist/ui-sdk/components/view-controls/ViewControlsRoot.js +1 -1
- package/dist/webhook/builders/auth-handler-builder.d.ts +21 -1
- package/dist/webhook/builders/auth-handler-builder.js +1 -1
- package/dist/webhook/builders/common.d.ts +9 -0
- package/dist/webhook/builders/webhook-builder.d.ts +18 -0
- package/dist/webhook/builders/webhook-builder.js +1 -1
- package/package.json +5 -4
- package/schema/domain-spec.json +224 -65
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/assistant.js +0 -43
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/assistant-setup.js +0 -32
- package/dist/application-spec/generate-application/code/templates/skills/processes/beta.d.ts +0 -14
- package/dist/application-spec/generate-application/code/templates/skills/processes/beta.js +0 -4
- package/dist/domain/extensions/view-controls.d.ts +0 -25
- package/dist/domain/extensions/view-controls.js +0 -1
|
@@ -28,11 +28,19 @@ When a user enters the Phoenix application, the session service begins by checki
|
|
|
28
28
|
|
|
29
29
|
These _one-time codes_ are particularly important as they're generated server-side and correspond to data stored in Redis, including third-party access tokens from OAuth providers that shouldn't be exposed to the client.
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
Who can open the configurator and who signs its users in is the project's **`access` setting** in `spec/application.yaml`:
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
| `access` | Configurator | Who signs configurator users in |
|
|
34
|
+
| --------------------- | ---------------------------------- | ------------------------------- |
|
|
35
|
+
| `public` (default) | Everyone opens it as a visitor | Nobody |
|
|
36
|
+
| `invited` | Only signed-in people open it | Studio accounts |
|
|
37
|
+
| `public-with-sign-in` | Visitors open it and may sign in | Studio accounts |
|
|
38
|
+
| `custom` | Decided by your webhook code | Your own auth handlers |
|
|
39
|
+
| `legacy-clerk` | Decided by the built-in Clerk flow | The workspace's Clerk |
|
|
34
40
|
|
|
35
|
-
|
|
41
|
+
In every mode each session, visitors included, starts with a call to your webhook's auth handlers: the server retrieves cached tokens from Redis and calls the handlers with this data. Handlers process authentication, determine user roles, and generate session data. In `public` and `public-with-sign-in` a webhook that registers no auth handler, or an auth handler without an anonymous handler, lets visitors in. `public`, `invited` and `public-with-sign-in` work in a workspace with Studio accounts; in a workspace that signs people in with Clerk, use `legacy-clerk` or `custom`.
|
|
42
|
+
|
|
43
|
+
`useAuthHook`, `useClerk` and `useCognito` are deprecated and replaced by `access`; a spec that still sets them keeps working and parsing reports the mode it works as. A project that has auth-hook code but never switched the hook on (no flag, `useAuthHook: false`, or `useClerk: true` with `useAuthHook: false`) now runs that hook for every session. Such a spec works as `public`, where the server refuses a visitor session the hook's anonymous handler gives another role than `anonymous` and refuses its code and refresh handlers; the Clerk case works as `legacy-clerk` and needs an anonymous handler to keep admitting visitors. Deployments registered by an SDK older than `access` keep their behavior: without `useAuthHook` the server generates anonymous session tokens directly, without calling the webhook.
|
|
36
44
|
|
|
37
45
|
**Configuration-specific access validation** occurs only when users navigate to a specific configuration (not on general pages like presets). The access service validates permissions by checking for an **access token** — either from the URL parameter (`ca`), from the `route` web component property, or from localStorage/sessionStorage (depending on the [integration mode](?path=/docs/phoenix-integration-integration-modes-internal--docs)). This JWT specifies whether the user can view or edit that specific configuration, and optionally locks them to a particular revision for read-only viewing.
|
|
38
46
|
|
|
@@ -83,7 +91,7 @@ Configurator and admin session tokens can carry a `sub` claim naming the user th
|
|
|
83
91
|
|
|
84
92
|
| `sub` | When |
|
|
85
93
|
| ------------------ | ---------------------------------------------------------------------------------------------------------------- |
|
|
86
|
-
| `clerk-<id>` | The
|
|
94
|
+
| `clerk-<id>` | The built-in Clerk handlers signed the user in; `<id>` is the Clerk user id. |
|
|
87
95
|
| `phoenix-<id>` | The shared Cognito flow resolved a Phoenix account and current project grant; `<id>` is its stable account UUID. |
|
|
88
96
|
| `custom-<id>` | Any other auth handler returned `userId`; `<id>` is that value. |
|
|
89
97
|
| `anonymous-<uuid>` | No auth hook, or the handler returned no `userId`; `<uuid>` is the browser's anonymous id. |
|
|
@@ -91,13 +99,52 @@ Configurator and admin session tokens can carry a `sub` claim naming the user th
|
|
|
91
99
|
|
|
92
100
|
The browser's anonymous id is a random UUID the SDK keeps under the localStorage key `configurator-user-id` and sends with every session authentication, so one browser is one anonymous user. It is separate from the analytics `user_id`. When storage is unavailable, the id lasts for the page's lifetime.
|
|
93
101
|
|
|
94
|
-
For
|
|
102
|
+
For Studio-account sign-in, role gates and revocation, see **[Webhooks — Studio-account sign-in](?path=/docs/phoenix-webhooks--docs#studio-account-sign-in)**.
|
|
95
103
|
|
|
96
104
|
A signed-in user therefore keeps the same identity across browsers, while an anonymous one is tied to the browser. A custom refresh handler must return `userId` again, or the renewed session becomes the browser's anonymous user. Return `userId` from your handlers as shown in **[Webhooks - Custom auth handlers](?path=/docs/phoenix-webhooks--docs#custom-auth-handlers)**.
|
|
97
105
|
|
|
106
|
+
### Account control for Public with sign-in
|
|
107
|
+
|
|
108
|
+
In `access: public-with-sign-in` visitors use the configurator and sign in only by choice, so place the SDK's account control in your layout, such as in its toolbar. Without it, or a control of your own built on `phx.frontend.useSignIn()`, parsing warns with `SIGN_IN_CONTROL_NOT_PLACED`.
|
|
109
|
+
|
|
110
|
+
```tsx
|
|
111
|
+
import { AccountControl, SignInNotice } from '@salsita-ai/sdk/extras/cognito'
|
|
112
|
+
|
|
113
|
+
// The control tells a visitor under its button when a sign-in did not finish, the account isn't invited, or the
|
|
114
|
+
// sign-in ended while they were signed in ("You were signed out", with Sign in again)
|
|
115
|
+
const Toolbar = () => <AccountControl />
|
|
116
|
+
|
|
117
|
+
// Or show that note as a banner in the page, and switch the control's own off
|
|
118
|
+
const ToolbarWithBanner = () => <AccountControl notice={false} />
|
|
119
|
+
const PageTop = () => <SignInNotice />
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Session fields set in Studio
|
|
123
|
+
|
|
124
|
+
In `access: invited` and `access: public-with-sign-in`, every top-level `sessionData` property except the identity fields (`id`, `emailAddress`, `fullName`, `tags`, `accessToken`) is a session field: workspace and project superadmins set its value per person and project in Studio, where it is called a user setting. A property marked `setInStudio: false` stays out of Studio; a signed-in handler may fill it, and in `public-with-sign-in` a visitor handler may fill it for visitors. In `public`, `custom` and `legacy-clerk` nothing is a session field, and `setInStudio: true` fails parsing with `SESSION_FIELD_ACCESS_MODE`.
|
|
125
|
+
|
|
126
|
+
```yaml
|
|
127
|
+
# spec/session.yaml
|
|
128
|
+
sessionData:
|
|
129
|
+
type: object
|
|
130
|
+
properties:
|
|
131
|
+
priceList:
|
|
132
|
+
title: Price list
|
|
133
|
+
type: string
|
|
134
|
+
enum: [retail, dealer]
|
|
135
|
+
default: retail
|
|
136
|
+
portalId:
|
|
137
|
+
type: string
|
|
138
|
+
setInStudio: false # filled by the signed-in handler
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
A session field is `type: string` (at most 500 characters), `type: number` or `type: integer`, `type: boolean`, `type: string` with a string `enum`, or `type: array` with `uniqueItems: true` and string `enum` `items`, with only `title`, `description` and `default` besides. A project has at most 30 fields and 100 values per list, and a person at most 4 KB of stored values per project. Parsing reports `SESSION_FIELD_UNSUPPORTED`, `SESSION_FIELD_DEFAULT`, `SESSION_FIELD_IDENTITY_KEY` and `SESSION_FIELD_LIMIT`.
|
|
142
|
+
|
|
143
|
+
The stored value arrives in the session data of every Studio-account sign-in and refresh, next to the identity fields; read it there like any session property. A person with no stored value gets the field's `default`, or no property. Nothing is migrated when a deployment changes a field: a stored value the build's field no longer allows gets the `default` instead, or is left out, and an any-of value keeps the choices the field still allows; Studio marks the person **Needs review**. Values of a renamed or removed field are ignored and flag nobody. When a person's values change while the configurator is open, the server refuses the next request and the configurator refreshes its session once by itself and sends it again. The server refuses a request the same way when the person's sign-in has ended or no longer grants access, such as after signing out in another browser or losing the project grant: the refresh then continues as a visitor where visitors may use the configurator, with the configuration kept on screen and the account control saying they were signed out, or shows the sign-in page in `invited`.
|
|
144
|
+
|
|
98
145
|
### Studio Embedded Admin Sessions
|
|
99
146
|
|
|
100
|
-
Studio manages embedded-admin authentication as the host application. It loads the deployed embedded module, reads every unique scope from its YAML-generated `config.chunks`, and requests both Configurator and Admin session tokens containing that complete `chunkScopes` set. This lets authenticated Studio admins manage all chunks without invoking the project's
|
|
147
|
+
Studio manages embedded-admin authentication as the host application. It loads the deployed embedded module, reads every unique scope from its YAML-generated `config.chunks`, and requests both Configurator and Admin session tokens containing that complete `chunkScopes` set. This lets authenticated Studio admins manage all chunks without invoking the project's chunk scopes handler.
|
|
101
148
|
|
|
102
149
|
The session service automatically handles several key responsibilities:
|
|
103
150
|
|
|
@@ -156,9 +203,9 @@ The session service requests a session token to establish user identity, checkin
|
|
|
156
203
|
- **Stored refresh token** for session renewal
|
|
157
204
|
- **Anonymous authentication** as fallback
|
|
158
205
|
|
|
159
|
-
### 2. Webhook Processing
|
|
206
|
+
### 2. Webhook Processing
|
|
160
207
|
|
|
161
|
-
|
|
208
|
+
In every access mode:
|
|
162
209
|
|
|
163
210
|
- Server retrieves **cached tokens from Redis** and includes them in webhook payload
|
|
164
211
|
- **Code handler** - Receives and processes access and ID tokens
|
|
@@ -195,114 +242,101 @@ Finally, Phoenix creates an **authorized API client** that:
|
|
|
195
242
|
|
|
196
243
|
## Auth Webhook Handlers
|
|
197
244
|
|
|
198
|
-
Authentication
|
|
199
|
-
|
|
200
|
-
- **Run in AWS Lambda** - Serverless execution environment; under `phoenix dev` they run on the developer's machine through the development webhook tunnel
|
|
201
|
-
- **Control user roles** - Determine superadmin, admin, user, or anonymous access
|
|
202
|
-
- **Generate session data** - Custom data attached to user sessions
|
|
203
|
-
- **Manage token generation** - Control session and refresh token creation
|
|
245
|
+
Authentication runs in the webhook's **auth hook**, which every access mode calls. It:
|
|
204
246
|
|
|
205
|
-
|
|
247
|
+
- **Runs in AWS Lambda** - Serverless execution environment; under `phoenix dev` it runs on the developer's machine through the development webhook tunnel
|
|
248
|
+
- **Controls user roles** - Determines superadmin, admin, user, or anonymous access
|
|
249
|
+
- **Generates session data** - Custom data attached to user sessions
|
|
250
|
+
- **Manages token generation** - Controls session and refresh token creation
|
|
206
251
|
|
|
207
|
-
|
|
252
|
+
The access mode in `spec/application.yaml` builds the hook, with or without `src/webhooks/index.ts`:
|
|
208
253
|
|
|
209
254
|
```yaml
|
|
210
255
|
# spec/application.yaml
|
|
211
|
-
|
|
256
|
+
access: public # The default: visitors get in, the admin signs in with a Studio account
|
|
212
257
|
# OR
|
|
213
|
-
|
|
258
|
+
access: invited # Only people invited to the project sign in, with Studio accounts
|
|
259
|
+
# OR
|
|
260
|
+
access: public-with-sign-in # Visitors get in, and invited people sign in with Studio accounts
|
|
261
|
+
# OR
|
|
262
|
+
access: legacy-clerk # The built-in Clerk handlers sign people in, visitors get in
|
|
263
|
+
# OR
|
|
264
|
+
access: custom # Your own handlers decide who gets in
|
|
214
265
|
```
|
|
215
266
|
|
|
216
|
-
|
|
267
|
+
In `public`, `invited` and `public-with-sign-in` the server decides every role other than `anonymous` from the person's Studio-account grant; project code cannot sign anyone in or grant a role. Only `custom` signs people in with the project's own code.
|
|
217
268
|
|
|
218
|
-
The
|
|
219
|
-
|
|
220
|
-
```typescript
|
|
221
|
-
// src/webhooks/index.ts
|
|
222
|
-
const authHandler = phx.webhooks.authHandlerBuilder
|
|
223
|
-
// Built-in Clerk integration for SSO/OAuth
|
|
224
|
-
.withClerkCodeHandler()
|
|
225
|
-
.withClerkRefreshHandler()
|
|
226
|
-
// Allow anonymous access
|
|
227
|
-
.withAnonymousHandler(async () => {
|
|
228
|
-
return {
|
|
229
|
-
success: true,
|
|
230
|
-
data: {
|
|
231
|
-
tags: [],
|
|
232
|
-
},
|
|
233
|
-
role: 'anonymous',
|
|
234
|
-
}
|
|
235
|
-
})
|
|
236
|
-
.build()
|
|
269
|
+
The project customises the hook with files in `src/handlers/`, each default-exporting one `phx.access` handler, which the generated `.phoenix/` code sets as a global, so project code never imports from `.phoenix/`:
|
|
237
270
|
|
|
238
|
-
|
|
239
|
-
|
|
271
|
+
- **Chunk scopes handler** (`phx.access.createChunkScopesHandler`), every mode - the published-data chunk scopes a session may read
|
|
272
|
+
- **Visitor handler** (`phx.access.createVisitorHandler`), `public` and `public-with-sign-in` - session data for people who are not signed in
|
|
273
|
+
- **Signed-in handler** (`phx.access.createSignedInHandler`), `invited` and `public-with-sign-in` - session data for, or a refusal of, a person signed in with a Studio account, at sign-in and each refresh
|
|
274
|
+
- **Code handler** (`phx.access.createCodeHandler`), `custom` - processes authentication for _third-party integrations_, where the server retrieves cached tokens from Redis and passes them to your handler
|
|
275
|
+
- **Refresh handler** (`phx.access.createRefreshHandler`), `custom` - renews expired sessions using _refresh tokens_
|
|
276
|
+
- **Anonymous handler** (`phx.access.createAnonymousHandler`), `custom` - decides about visitors
|
|
240
277
|
|
|
241
|
-
|
|
278
|
+
A `custom` project with a code handler and an anonymous handler:
|
|
242
279
|
|
|
243
280
|
```typescript
|
|
244
|
-
// src/
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
headers: { authorization: `Bearer ${accessToken}` },
|
|
252
|
-
})
|
|
253
|
-
|
|
254
|
-
if (!response.ok) {
|
|
255
|
-
logger.warn(`The partner API refused the access token with status ${response.status}.`)
|
|
256
|
-
|
|
257
|
-
return { success: false }
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
const userData: {
|
|
261
|
-
readonly id: string
|
|
262
|
-
readonly email: string
|
|
263
|
-
readonly permissions: string[]
|
|
264
|
-
readonly isAdmin: boolean
|
|
265
|
-
} = await response.json()
|
|
266
|
-
|
|
267
|
-
return {
|
|
268
|
-
success: true,
|
|
269
|
-
data: {
|
|
270
|
-
email: userData.email,
|
|
271
|
-
tags: userData.permissions,
|
|
272
|
-
},
|
|
273
|
-
role: userData.isAdmin ? 'admin' : 'user',
|
|
274
|
-
// The session user, a top-level field rather than part of the session data
|
|
275
|
-
userId: userData.id,
|
|
276
|
-
// An absolute Unix timestamp in seconds; three hours from now when omitted
|
|
277
|
-
expirationTime: Math.floor(Date.now() / 1000) + 3600,
|
|
278
|
-
}
|
|
279
|
-
})
|
|
280
|
-
.withAnonymousHandler(async () => {
|
|
281
|
-
return {
|
|
282
|
-
success: true,
|
|
283
|
-
data: {
|
|
284
|
-
tags: [],
|
|
285
|
-
},
|
|
286
|
-
role: 'anonymous',
|
|
287
|
-
expirationTime: Math.floor(Date.now() / 1000) + 900,
|
|
288
|
-
}
|
|
281
|
+
// src/handlers/code.ts
|
|
282
|
+
export default phx.access.createCodeHandler(async ({ accessToken }) => {
|
|
283
|
+
// The platform already redeemed the one-time code, so the payload holds
|
|
284
|
+
// { type: 'code', accessToken, refreshToken?, idToken? } and no code.
|
|
285
|
+
// PARTNER_API_URL is declared under `env.webhook` in a spec file
|
|
286
|
+
const response = await fetch(`${phx.webhooksEnv.PARTNER_API_URL}/me`, {
|
|
287
|
+
headers: { authorization: `Bearer ${accessToken}` },
|
|
289
288
|
})
|
|
290
|
-
.build()
|
|
291
289
|
|
|
292
|
-
|
|
290
|
+
if (!response.ok) {
|
|
291
|
+
console.warn(`The partner API refused the access token with status ${response.status}.`)
|
|
292
|
+
|
|
293
|
+
return { success: false }
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
const userData: {
|
|
297
|
+
readonly id: string
|
|
298
|
+
readonly email: string
|
|
299
|
+
readonly permissions: string[]
|
|
300
|
+
readonly isAdmin: boolean
|
|
301
|
+
} = await response.json()
|
|
302
|
+
|
|
303
|
+
return {
|
|
304
|
+
success: true,
|
|
305
|
+
data: {
|
|
306
|
+
email: userData.email,
|
|
307
|
+
tags: userData.permissions,
|
|
308
|
+
},
|
|
309
|
+
role: userData.isAdmin ? 'admin' : 'user',
|
|
310
|
+
// The session user, a top-level field rather than part of the session data
|
|
311
|
+
userId: userData.id,
|
|
312
|
+
// An absolute Unix timestamp in seconds; three hours from now when omitted
|
|
313
|
+
expirationTime: Math.floor(Date.now() / 1000) + 3600,
|
|
314
|
+
}
|
|
315
|
+
})
|
|
293
316
|
```
|
|
294
317
|
|
|
295
|
-
|
|
318
|
+
```typescript
|
|
319
|
+
// src/handlers/anonymous.ts
|
|
320
|
+
export default phx.access.createAnonymousHandler(async () => {
|
|
321
|
+
return {
|
|
322
|
+
success: true,
|
|
323
|
+
data: {
|
|
324
|
+
tags: [],
|
|
325
|
+
},
|
|
326
|
+
role: 'anonymous',
|
|
327
|
+
expirationTime: Math.floor(Date.now() / 1000) + 900,
|
|
328
|
+
}
|
|
329
|
+
})
|
|
330
|
+
```
|
|
296
331
|
|
|
297
|
-
|
|
332
|
+
Each handler receives the authentication payload and returns session data, user role, and token metadata. A handler refuses the session with `{ success: false }`; log the reason, because the response carries no error message. The session data you return becomes available throughout the application and can include any custom fields declared in the spec's `sessionData` schema, which declares no required properties.
|
|
298
333
|
|
|
299
|
-
|
|
300
|
-
- **Custom code handlers** (`withCodeHandler`) - Process authentication for _third-party integrations_ where the server retrieves cached tokens from Redis and passes them to your handler (not meant for SSO - use Clerk handlers instead)
|
|
301
|
-
- **Refresh handlers** (`withRefreshHandler`) - Renew expired sessions using _refresh tokens_
|
|
302
|
-
- **Anonymous handlers** (`withAnonymousHandler`) - Provide _limited access_ without authentication
|
|
334
|
+
`phx.webhooks.authHandlerBuilder` and `withAuthHook` are deprecated; see [Webhooks - Auth Hook](?path=/docs/phoenix-webhooks--docs#auth-hook) for the migration.
|
|
303
335
|
|
|
304
336
|
## Clerk Integration
|
|
305
337
|
|
|
338
|
+
> **Legacy.** Clerk is the `legacy-clerk` mode for workspaces Salsita set up with Clerk. A workspace with Studio accounts uses `invited` or `public-with-sign-in` instead (see [Webhooks — Studio-account sign-in](?path=/docs/phoenix-webhooks--docs#studio-account-sign-in)).
|
|
339
|
+
|
|
306
340
|
**Clerk** provides a ready-to-use authentication solution with:
|
|
307
341
|
|
|
308
342
|
- **Built-in UI** - Pre-designed authentication components
|
|
@@ -319,30 +353,12 @@ To enable Clerk authentication:
|
|
|
319
353
|
|
|
320
354
|
```yaml
|
|
321
355
|
# spec/application.yaml
|
|
322
|
-
|
|
356
|
+
access: legacy-clerk # Signs people in with the workspace's Clerk
|
|
323
357
|
```
|
|
324
358
|
|
|
325
359
|
**2. Configure Clerk for the workspace in Studio.** The Clerk credentials come from the workspace's Clerk settings in Studio and reach the webhook as generated variables (`CLERK_API_KEY`, `JWT_SECRET_BASE64`, `OAUTH_PROVIDER_CLIENT_ID`, `OAUTH_PROVIDER_CLIENT_SECRET`, `OAUTH_PROVIDER_BASE_URL`, `FRONTEND_URL` and `RESOURCES_URL`). The project neither declares them nor keeps them in its `.env`. See [Clerk Sign-In](?path=/docs/phoenix-clerk-sign-in--docs).
|
|
326
360
|
|
|
327
|
-
**3.
|
|
328
|
-
|
|
329
|
-
```typescript
|
|
330
|
-
// src/webhooks/index.ts
|
|
331
|
-
const authHandler = phx.webhooks.authHandlerBuilder
|
|
332
|
-
.withClerkSessionHandler()
|
|
333
|
-
.withClerkCodeHandler()
|
|
334
|
-
.withClerkRefreshHandler()
|
|
335
|
-
.withAnonymousHandler(async () => {
|
|
336
|
-
return {
|
|
337
|
-
success: true,
|
|
338
|
-
data: { tags: [] },
|
|
339
|
-
role: 'anonymous',
|
|
340
|
-
}
|
|
341
|
-
})
|
|
342
|
-
.build()
|
|
343
|
-
|
|
344
|
-
export default phx.webhooks.webhookBuilder.withAuthHook(authHandler).build()
|
|
345
|
-
```
|
|
361
|
+
**3. No webhook code is needed:** with `access: legacy-clerk` the webhook's auth hook uses the built-in Clerk session, code and refresh handlers and lets visitors in.
|
|
346
362
|
|
|
347
363
|
The Clerk handlers automatically:
|
|
348
364
|
|
|
@@ -352,7 +368,7 @@ The Clerk handlers automatically:
|
|
|
352
368
|
- **Map organizations to Phoenix tags** - For permission control
|
|
353
369
|
- **Handle token refresh** - Through Clerk's OAuth endpoints
|
|
354
370
|
|
|
355
|
-
**Important**:
|
|
371
|
+
**Important**: With `access: legacy-clerk`, your `sessionData` schema must declare the complete payload the Clerk handlers return — application-spec parsing rejects the spec with a `CLERK_SESSION_DATA_INCOMPATIBLE` diagnostic otherwise. Declare all five built-in properties with exactly these types, keep `required: []` so anonymous and Admin-issued sessions stay valid, and add any project-specific properties alongside them:
|
|
356
372
|
|
|
357
373
|
```yaml
|
|
358
374
|
sessionData:
|
|
@@ -436,7 +452,7 @@ The `readonly` web component property lets the host force view mode without chan
|
|
|
436
452
|
|
|
437
453
|
Because an owner-token session can be forced read-only client-side while the server still accepts writes from that owner token, Phoenix skips persistence and logs a warning instead of updating the configuration. This guards against the configuration being silently overwritten by code paths that mutate state in read-only mode. UI that triggers significant changes (anything that produces a new revision) should still be disabled when `accessInfo.viewMode` is true — the warning is a backstop, not a substitute.
|
|
438
454
|
|
|
439
|
-
The assistant follows the same read-only rule as the UI: its `apply` tool refuses changes while `accessInfo.viewMode` is true, that is with a read-revision token or while `readonly` is set, and makes them again once it is false. A switch of `readonly` takes effect at once, in both directions, and the configurator loads the configuration again. A change applied after `readonly` is cleared and before the configuration has loaded again is not saved; saving resumes once it has loaded. The `query` tool keeps working, including its dry-run mutations.
|
|
455
|
+
The assistant follows the same read-only rule as the UI: its `apply` tool refuses changes while `accessInfo.viewMode` is true, that is with a read-revision token or while `readonly` is set, and makes them again once it is false. A switch of `readonly` takes effect at once, in both directions, and the configurator loads the configuration again. A change applied after `readonly` is cleared and before the configuration has loaded again is not saved; saving resumes once it has loaded. The `query` tool keeps working, including its dry-run mutations. See [Security and Limits](?path=/docs/phoenix-assistant-security-and-limits--docs#what-the-assistant-can-be-talked-into).
|
|
440
456
|
|
|
441
457
|
```html
|
|
442
458
|
<salsita-configurator readonly></salsita-configurator>
|
|
@@ -486,67 +502,58 @@ Session tokens provide additional security through domain-specific validation of
|
|
|
486
502
|
|
|
487
503
|
### Simple Public Configurator (No Auth Webhook)
|
|
488
504
|
|
|
489
|
-
For configurators that don't require user authentication,
|
|
505
|
+
For configurators that don't require user authentication, keep the default access mode.
|
|
490
506
|
|
|
491
507
|
```yaml
|
|
492
508
|
# spec/application.yaml
|
|
493
|
-
|
|
509
|
+
access: public # The default: everyone opens the configurator as a visitor
|
|
494
510
|
```
|
|
495
511
|
|
|
496
|
-
This approach is simpler to deploy and maintain when you don't need custom authentication logic. No webhook implementation is required
|
|
512
|
+
This approach is simpler to deploy and maintain when you don't need custom authentication logic. No webhook implementation is required: with or without `src/webhooks/index.ts` the auth hook lets every visitor in, and the admin signs in with a Studio account.
|
|
497
513
|
|
|
498
514
|
### Custom Third-Party Integrations
|
|
499
515
|
|
|
500
|
-
Use custom code
|
|
516
|
+
Use `access: custom` with a code handler for third-party integrations. The server handles Redis caching and passes retrieved tokens to your handler. For SSO and OAuth authentication, use Studio accounts or Clerk instead.
|
|
501
517
|
|
|
502
518
|
```typescript
|
|
503
|
-
// src/
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
headers: { authorization: `Bearer ${accessToken}` },
|
|
511
|
-
})
|
|
512
|
-
|
|
513
|
-
if (!response.ok) {
|
|
514
|
-
logger.warn(`The integration rejected the access token with status ${response.status}.`)
|
|
515
|
-
|
|
516
|
-
return { success: false }
|
|
517
|
-
}
|
|
518
|
-
|
|
519
|
-
const integrationUser: {
|
|
520
|
-
readonly id: string
|
|
521
|
-
readonly email: string
|
|
522
|
-
readonly permissions?: string[]
|
|
523
|
-
readonly isAdmin: boolean
|
|
524
|
-
} = await response.json()
|
|
525
|
-
|
|
526
|
-
// Map third-party data to Phoenix session
|
|
527
|
-
return {
|
|
528
|
-
success: true,
|
|
529
|
-
data: {
|
|
530
|
-
email: integrationUser.email,
|
|
531
|
-
tags: integrationUser.permissions ?? [],
|
|
532
|
-
},
|
|
533
|
-
role: integrationUser.isAdmin ? 'admin' : 'user',
|
|
534
|
-
userId: integrationUser.id,
|
|
535
|
-
expirationTime: Math.floor(Date.now() / 1000) + 3600,
|
|
536
|
-
}
|
|
537
|
-
})
|
|
538
|
-
.withAnonymousHandler(async () => {
|
|
539
|
-
return {
|
|
540
|
-
success: true,
|
|
541
|
-
data: { tags: [] },
|
|
542
|
-
role: 'anonymous',
|
|
543
|
-
}
|
|
519
|
+
// src/handlers/code.ts
|
|
520
|
+
export default phx.access.createCodeHandler(async ({ accessToken }) => {
|
|
521
|
+
// Server already retrieved tokens from Redis and passed them here
|
|
522
|
+
|
|
523
|
+
// Verify the third-party token; INTEGRATION_API_URL is declared under `env.webhook` in a spec file
|
|
524
|
+
const response = await fetch(`${phx.webhooksEnv.INTEGRATION_API_URL}/tokens/verify`, {
|
|
525
|
+
headers: { authorization: `Bearer ${accessToken}` },
|
|
544
526
|
})
|
|
545
|
-
.build()
|
|
546
527
|
|
|
547
|
-
|
|
528
|
+
if (!response.ok) {
|
|
529
|
+
console.warn(`The integration rejected the access token with status ${response.status}.`)
|
|
530
|
+
|
|
531
|
+
return { success: false }
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
const integrationUser: {
|
|
535
|
+
readonly id: string
|
|
536
|
+
readonly email: string
|
|
537
|
+
readonly permissions?: string[]
|
|
538
|
+
readonly isAdmin: boolean
|
|
539
|
+
} = await response.json()
|
|
540
|
+
|
|
541
|
+
// Map third-party data to Phoenix session
|
|
542
|
+
return {
|
|
543
|
+
success: true,
|
|
544
|
+
data: {
|
|
545
|
+
email: integrationUser.email,
|
|
546
|
+
tags: integrationUser.permissions ?? [],
|
|
547
|
+
},
|
|
548
|
+
role: integrationUser.isAdmin ? 'admin' : 'user',
|
|
549
|
+
userId: integrationUser.id,
|
|
550
|
+
expirationTime: Math.floor(Date.now() / 1000) + 3600,
|
|
551
|
+
}
|
|
552
|
+
})
|
|
548
553
|
```
|
|
549
554
|
|
|
555
|
+
Add `phx.access.createAnonymousHandler` in another file to let visitors in as well.
|
|
556
|
+
|
|
550
557
|
### Embedded Configurator with Pre-Authenticated Session
|
|
551
558
|
|
|
552
559
|
When embedding a Phoenix configurator in an application that already handles authentication, pass session tokens directly to skip the authentication flow entirely.
|
|
@@ -594,7 +601,7 @@ Phoenix's authentication system provides the foundation for building secure, sca
|
|
|
594
601
|
Now that you understand authentication and access control, explore these related topics:
|
|
595
602
|
|
|
596
603
|
- **[Webhooks](?path=/docs/phoenix-webhooks--docs)** - Learn how to implement auth webhook handlers for custom authentication logic and integrate with third-party identity providers
|
|
597
|
-
- **[Deployments](?path=/docs/phoenix-deployments--docs)** - Understand how to configure deployment settings including
|
|
604
|
+
- **[Deployments](?path=/docs/phoenix-deployments--docs)** - Understand how to configure deployment settings including the access mode and manage different environments
|
|
598
605
|
- **[Admin](?path=/docs/phoenix-admin--docs)** - Explore the Admin application that uses separate authentication tokens for managing deployments and configurations
|
|
599
606
|
- **[Domain Model](?path=/docs/phoenix-domain-model--docs)** - Define SessionData types and understand how authentication data flows through your domain model
|
|
600
607
|
|
|
@@ -11,6 +11,7 @@ Build component controls with React and browser SDKs without pulling them into t
|
|
|
11
11
|
| Ordinary handler | Yes | No |
|
|
12
12
|
| Published-data, validator or assistant setup handler | Yes | Yes |
|
|
13
13
|
| Any other handler with `'use webhook'` | Yes | Yes |
|
|
14
|
+
| Access handler (`phx.access.create…Handler`) | No | Yes |
|
|
14
15
|
| File under `src/webhooks/` | No | Yes |
|
|
15
16
|
|
|
16
17
|
Published-data, validator and assistant setup handlers are detected when they register one of these APIs:
|
|
@@ -19,7 +20,9 @@ Published-data, validator and assistant setup handlers are detected when they re
|
|
|
19
20
|
- `createMapPublishedChunkedDataHandler`
|
|
20
21
|
- `createDataRowValidatorHandler`
|
|
21
22
|
- `createSheetValidatorHandler`
|
|
22
|
-
- `phx.domain.createAssistantSetupHandler`
|
|
23
|
+
- `phx.domain.createAssistantSetupHandler` (see [Per-session Setup](?path=/docs/phoenix-assistant-per-session-setup--docs))
|
|
24
|
+
|
|
25
|
+
An access handler customises the sign-in, which runs only in the webhook, so its file stays out of the browser bundle, also with `'use webhook'`, and may import server-only modules. The file holds only access handlers: a file that default-exports anything else beside them fails parsing with `ACCESS_HANDLER_NOT_ALONE`. See [Webhooks](?path=/docs/phoenix-webhooks--docs).
|
|
23
26
|
|
|
24
27
|
## Pin a Server-Safe Component
|
|
25
28
|
|