@wildo-ai/framework-knowledge 1.1.0
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/LICENSE +34 -0
- package/dist/esm/.builder.pid +9 -0
- package/dist/esm/framework-knowledge.definitions.d.ts +51 -0
- package/dist/esm/framework-knowledge.definitions.d.ts.map +1 -0
- package/dist/esm/framework-knowledge.definitions.js +1571 -0
- package/dist/esm/framework-knowledge.definitions.js.map +1 -0
- package/dist/esm/framework-knowledge.loader.d.ts +72 -0
- package/dist/esm/framework-knowledge.loader.d.ts.map +1 -0
- package/dist/esm/framework-knowledge.loader.js +258 -0
- package/dist/esm/framework-knowledge.loader.js.map +1 -0
- package/dist/esm/framework-knowledge.schemas.d.ts +236 -0
- package/dist/esm/framework-knowledge.schemas.d.ts.map +1 -0
- package/dist/esm/framework-knowledge.schemas.js +23 -0
- package/dist/esm/framework-knowledge.schemas.js.map +1 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +4 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/playbooks/bottom_up.build-decompose/playbook.definition.d.ts +53 -0
- package/dist/esm/playbooks/bottom_up.build-decompose/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/bottom_up.build-decompose/playbook.definition.js +56 -0
- package/dist/esm/playbooks/bottom_up.build-decompose/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/bottom_up.build-dispatch/playbook.definition.d.ts +200 -0
- package/dist/esm/playbooks/bottom_up.build-dispatch/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/bottom_up.build-dispatch/playbook.definition.js +228 -0
- package/dist/esm/playbooks/bottom_up.build-dispatch/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/bottom_up.build-scale/playbook.definition.d.ts +39 -0
- package/dist/esm/playbooks/bottom_up.build-scale/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/bottom_up.build-scale/playbook.definition.js +39 -0
- package/dist/esm/playbooks/bottom_up.build-scale/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/bottom_up.domain-plan/playbook.definition.d.ts +261 -0
- package/dist/esm/playbooks/bottom_up.domain-plan/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/bottom_up.domain-plan/playbook.definition.js +412 -0
- package/dist/esm/playbooks/bottom_up.domain-plan/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/bottom_up.foundation/playbook.definition.d.ts +61 -0
- package/dist/esm/playbooks/bottom_up.foundation/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/bottom_up.foundation/playbook.definition.js +65 -0
- package/dist/esm/playbooks/bottom_up.foundation/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/bottom_up.placement-plan/playbook.definition.d.ts +53 -0
- package/dist/esm/playbooks/bottom_up.placement-plan/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/bottom_up.placement-plan/playbook.definition.js +54 -0
- package/dist/esm/playbooks/bottom_up.placement-plan/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/refinement.compliance-document-candidate/playbook.definition.d.ts +43 -0
- package/dist/esm/playbooks/refinement.compliance-document-candidate/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/refinement.compliance-document-candidate/playbook.definition.js +73 -0
- package/dist/esm/playbooks/refinement.compliance-document-candidate/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/refinement.document-facts/playbook.definition.d.ts +53 -0
- package/dist/esm/playbooks/refinement.document-facts/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/refinement.document-facts/playbook.definition.js +114 -0
- package/dist/esm/playbooks/refinement.document-facts/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/top_down.brand-identity/playbook.definition.d.ts +95 -0
- package/dist/esm/playbooks/top_down.brand-identity/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/top_down.brand-identity/playbook.definition.js +102 -0
- package/dist/esm/playbooks/top_down.brand-identity/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/top_down.business-model/playbook.definition.d.ts +258 -0
- package/dist/esm/playbooks/top_down.business-model/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/top_down.business-model/playbook.definition.js +241 -0
- package/dist/esm/playbooks/top_down.business-model/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/top_down.capability-map/playbook.definition.d.ts +241 -0
- package/dist/esm/playbooks/top_down.capability-map/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/top_down.capability-map/playbook.definition.js +202 -0
- package/dist/esm/playbooks/top_down.capability-map/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/top_down.compliance-posture/playbook.definition.d.ts +82 -0
- package/dist/esm/playbooks/top_down.compliance-posture/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/top_down.compliance-posture/playbook.definition.js +89 -0
- package/dist/esm/playbooks/top_down.compliance-posture/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/top_down.market-analysis/playbook.definition.d.ts +56 -0
- package/dist/esm/playbooks/top_down.market-analysis/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/top_down.market-analysis/playbook.definition.js +76 -0
- package/dist/esm/playbooks/top_down.market-analysis/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/top_down.market-evidence-adequacy/playbook.definition.d.ts +30 -0
- package/dist/esm/playbooks/top_down.market-evidence-adequacy/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/top_down.market-evidence-adequacy/playbook.definition.js +27 -0
- package/dist/esm/playbooks/top_down.market-evidence-adequacy/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/top_down.market-research/playbook.definition.d.ts +31 -0
- package/dist/esm/playbooks/top_down.market-research/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/top_down.market-research/playbook.definition.js +26 -0
- package/dist/esm/playbooks/top_down.market-research/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/top_down.market-snapshot-produce/playbook.definition.d.ts +254 -0
- package/dist/esm/playbooks/top_down.market-snapshot-produce/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/top_down.market-snapshot-produce/playbook.definition.js +219 -0
- package/dist/esm/playbooks/top_down.market-snapshot-produce/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/top_down.phase-gate/playbook.definition.d.ts +180 -0
- package/dist/esm/playbooks/top_down.phase-gate/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/top_down.phase-gate/playbook.definition.js +302 -0
- package/dist/esm/playbooks/top_down.phase-gate/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/top_down.requirements-definition/playbook.definition.d.ts +249 -0
- package/dist/esm/playbooks/top_down.requirements-definition/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/top_down.requirements-definition/playbook.definition.js +286 -0
- package/dist/esm/playbooks/top_down.requirements-definition/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/top_down.scope-roadmap/playbook.definition.d.ts +248 -0
- package/dist/esm/playbooks/top_down.scope-roadmap/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/top_down.scope-roadmap/playbook.definition.js +227 -0
- package/dist/esm/playbooks/top_down.scope-roadmap/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/top_down.value-proposition/playbook.definition.d.ts +45 -0
- package/dist/esm/playbooks/top_down.value-proposition/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/top_down.value-proposition/playbook.definition.js +48 -0
- package/dist/esm/playbooks/top_down.value-proposition/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/top_down.vision-elicitation/playbook.definition.d.ts +250 -0
- package/dist/esm/playbooks/top_down.vision-elicitation/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/top_down.vision-elicitation/playbook.definition.js +218 -0
- package/dist/esm/playbooks/top_down.vision-elicitation/playbook.definition.js.map +1 -0
- package/dist/knowledge/assurance-authority-bases/wildo-safe-baseline-v1/authority-basis.json +1 -0
- package/dist/knowledge/manifest.json +45 -0
- package/dist/knowledge/playbooks/bottom_up.build-decompose/method.md +407 -0
- package/dist/knowledge/playbooks/bottom_up.build-decompose/playbook.json +69 -0
- package/dist/knowledge/playbooks/bottom_up.build-dispatch/evaluation-protocol.json +1 -0
- package/dist/knowledge/playbooks/bottom_up.build-dispatch/evaluation-treatment.json +1 -0
- package/dist/knowledge/playbooks/bottom_up.build-dispatch/method.md +556 -0
- package/dist/knowledge/playbooks/bottom_up.build-dispatch/playbook.json +47 -0
- package/dist/knowledge/playbooks/bottom_up.build-scale/method.md +344 -0
- package/dist/knowledge/playbooks/bottom_up.build-scale/playbook.json +43 -0
- package/dist/knowledge/playbooks/bottom_up.domain-plan/evaluation-protocol.json +1 -0
- package/dist/knowledge/playbooks/bottom_up.domain-plan/evaluation-treatment.json +1 -0
- package/dist/knowledge/playbooks/bottom_up.domain-plan/method.md +259 -0
- package/dist/knowledge/playbooks/bottom_up.domain-plan/playbook.json +83 -0
- package/dist/knowledge/playbooks/bottom_up.domain-plan/structured-artifact-action.json +1 -0
- package/dist/knowledge/playbooks/bottom_up.foundation/method.md +321 -0
- package/dist/knowledge/playbooks/bottom_up.foundation/playbook.json +79 -0
- package/dist/knowledge/playbooks/bottom_up.placement-plan/method.md +185 -0
- package/dist/knowledge/playbooks/bottom_up.placement-plan/playbook.json +66 -0
- package/dist/knowledge/playbooks/refinement.compliance-document-candidate/method.md +737 -0
- package/dist/knowledge/playbooks/refinement.compliance-document-candidate/playbook.json +44 -0
- package/dist/knowledge/playbooks/refinement.document-facts/method.md +261 -0
- package/dist/knowledge/playbooks/refinement.document-facts/playbook.json +57 -0
- package/dist/knowledge/playbooks/top_down.brand-identity/method.md +151 -0
- package/dist/knowledge/playbooks/top_down.brand-identity/playbook.json +124 -0
- package/dist/knowledge/playbooks/top_down.business-model/evaluation-protocol.json +1 -0
- package/dist/knowledge/playbooks/top_down.business-model/evaluation-treatment.json +1 -0
- package/dist/knowledge/playbooks/top_down.business-model/method.md +128 -0
- package/dist/knowledge/playbooks/top_down.business-model/playbook.json +102 -0
- package/dist/knowledge/playbooks/top_down.business-model/structured-artifact-action.json +1 -0
- package/dist/knowledge/playbooks/top_down.capability-map/evaluation-protocol.json +1 -0
- package/dist/knowledge/playbooks/top_down.capability-map/evaluation-treatment.json +1 -0
- package/dist/knowledge/playbooks/top_down.capability-map/method.md +239 -0
- package/dist/knowledge/playbooks/top_down.capability-map/playbook.json +73 -0
- package/dist/knowledge/playbooks/top_down.capability-map/structured-artifact-action.json +1 -0
- package/dist/knowledge/playbooks/top_down.compliance-posture/method.md +177 -0
- package/dist/knowledge/playbooks/top_down.compliance-posture/playbook.json +95 -0
- package/dist/knowledge/playbooks/top_down.market-analysis/method.md +64 -0
- package/dist/knowledge/playbooks/top_down.market-analysis/playbook.json +49 -0
- package/dist/knowledge/playbooks/top_down.market-evidence-adequacy/method.md +56 -0
- package/dist/knowledge/playbooks/top_down.market-evidence-adequacy/playbook.json +40 -0
- package/dist/knowledge/playbooks/top_down.market-research/method.md +68 -0
- package/dist/knowledge/playbooks/top_down.market-research/playbook.json +42 -0
- package/dist/knowledge/playbooks/top_down.market-snapshot-produce/evaluation-protocol.json +1 -0
- package/dist/knowledge/playbooks/top_down.market-snapshot-produce/evaluation-treatment.json +1 -0
- package/dist/knowledge/playbooks/top_down.market-snapshot-produce/method.md +239 -0
- package/dist/knowledge/playbooks/top_down.market-snapshot-produce/playbook.json +69 -0
- package/dist/knowledge/playbooks/top_down.market-snapshot-produce/structured-artifact-action.json +1 -0
- package/dist/knowledge/playbooks/top_down.phase-gate/evaluation-protocol.json +1 -0
- package/dist/knowledge/playbooks/top_down.phase-gate/evaluation-treatment.json +1 -0
- package/dist/knowledge/playbooks/top_down.phase-gate/method.md +96 -0
- package/dist/knowledge/playbooks/top_down.phase-gate/playbook.json +77 -0
- package/dist/knowledge/playbooks/top_down.requirements-definition/evaluation-protocol.json +1 -0
- package/dist/knowledge/playbooks/top_down.requirements-definition/evaluation-treatment.json +1 -0
- package/dist/knowledge/playbooks/top_down.requirements-definition/method.md +53 -0
- package/dist/knowledge/playbooks/top_down.requirements-definition/playbook.json +61 -0
- package/dist/knowledge/playbooks/top_down.requirements-definition/structured-artifact-action.json +1 -0
- package/dist/knowledge/playbooks/top_down.scope-roadmap/evaluation-protocol.json +1 -0
- package/dist/knowledge/playbooks/top_down.scope-roadmap/evaluation-treatment.json +1 -0
- package/dist/knowledge/playbooks/top_down.scope-roadmap/method.md +280 -0
- package/dist/knowledge/playbooks/top_down.scope-roadmap/playbook.json +87 -0
- package/dist/knowledge/playbooks/top_down.scope-roadmap/structured-artifact-action.json +1 -0
- package/dist/knowledge/playbooks/top_down.value-proposition/method.md +204 -0
- package/dist/knowledge/playbooks/top_down.value-proposition/playbook.json +54 -0
- package/dist/knowledge/playbooks/top_down.vision-elicitation/evaluation-protocol.json +1 -0
- package/dist/knowledge/playbooks/top_down.vision-elicitation/evaluation-treatment.json +1 -0
- package/dist/knowledge/playbooks/top_down.vision-elicitation/method.md +146 -0
- package/dist/knowledge/playbooks/top_down.vision-elicitation/playbook.json +120 -0
- package/dist/knowledge/playbooks/top_down.vision-elicitation/structured-artifact-action.json +1 -0
- package/dist/knowledge/references/application.database.migration-change-risk.md +28 -0
- package/dist/knowledge/references/assertions.authored-metadata.config.md +90 -0
- package/dist/knowledge/references/assertions.behaviors.wire-contracts.md +223 -0
- package/dist/knowledge/references/assertions.references.conventions.md +92 -0
- package/dist/knowledge/references/assertions.snapshot.validation.md +317 -0
- package/dist/knowledge/references/assertions.specification.config.md +287 -0
- package/dist/knowledge/references/brand.asset.config.md +167 -0
- package/dist/knowledge/references/brand.authored-metadata.config.md +51 -0
- package/dist/knowledge/references/brand.logo-direction.config.md +88 -0
- package/dist/knowledge/references/brand.name.config.md +46 -0
- package/dist/knowledge/references/brand.snapshot.config.md +76 -0
- package/dist/knowledge/references/brand.snapshot.validation.md +446 -0
- package/dist/knowledge/references/brand.visual-tone.config.md +56 -0
- package/dist/knowledge/references/build-plan.task-graph.config.md +198 -0
- package/dist/knowledge/references/business-model.authored-metadata.config.md +65 -0
- package/dist/knowledge/references/business-model.pricing-plan.config.md +122 -0
- package/dist/knowledge/references/business-model.references.conventions.md +99 -0
- package/dist/knowledge/references/business-model.snapshot.config.md +121 -0
- package/dist/knowledge/references/business-model.snapshot.validation.md +325 -0
- package/dist/knowledge/references/cli.market.generate-command.md +230 -0
- package/dist/knowledge/references/cli.market.utils.md +147 -0
- package/dist/knowledge/references/companion.introspection.behaviors.market.md +90 -0
- package/dist/knowledge/references/companion.introspection.handlers.market.md +42 -0
- package/dist/knowledge/references/companion.market.generation-service.md +270 -0
- package/dist/knowledge/references/companion.market.prompt-renderer.md +244 -0
- package/dist/knowledge/references/companion.technical-doc.service.md +809 -0
- package/dist/knowledge/references/engine.client-bundle.allow-list.md +125 -0
- package/dist/knowledge/references/engine.client-bundle.discipline.md +130 -0
- package/dist/knowledge/references/engine.client-bundle.external-connectors-public.discipline.md +55 -0
- package/dist/knowledge/references/engine.saas-technical-doc.config.md +215 -0
- package/dist/knowledge/references/engine.saas-website.config.md +331 -0
- package/dist/knowledge/references/example.authorization.unit-narrowing.declaration.md +24 -0
- package/dist/knowledge/references/example.backend.addon-wiring.module.md +55 -0
- package/dist/knowledge/references/example.backend.custom-operation.create-postfix.md +35 -0
- package/dist/knowledge/references/example.backend.operation.error-throw.md +17 -0
- package/dist/knowledge/references/example.config.app-shell.command-menu-items.md +63 -0
- package/dist/knowledge/references/example.config.app-shell.full.md +147 -0
- package/dist/knowledge/references/example.config.app-shell.hosted-components.md +45 -0
- package/dist/knowledge/references/example.config.app-shell.quick-switcher-fields.md +37 -0
- package/dist/knowledge/references/example.config.backend.billing-enable.md +20 -0
- package/dist/knowledge/references/example.config.backend.required-floors.md +46 -0
- package/dist/knowledge/references/example.config.design-system.full.md +162 -0
- package/dist/knowledge/references/example.config.navigation.full.md +71 -0
- package/dist/knowledge/references/example.config.provider.backend-scope-billing.md +27 -0
- package/dist/knowledge/references/example.data-seeding.minimal.md +114 -0
- package/dist/knowledge/references/example.email.template.minimal.md +54 -0
- package/dist/knowledge/references/example.engine.component-registration.lazy-load.md +16 -0
- package/dist/knowledge/references/example.engine.product-definitions.feature-and-profiles.md +146 -0
- package/dist/knowledge/references/example.flows-actors.chat-assistant.md +196 -0
- package/dist/knowledge/references/example.flows-actors.llm-agent-one-shot.md +174 -0
- package/dist/knowledge/references/example.i18n.label-generation.engine-barrel.md +15 -0
- package/dist/knowledge/references/example.infra.cdn.cloudflare.md +23 -0
- package/dist/knowledge/references/example.infra.cdn.generic.md +17 -0
- package/dist/knowledge/references/example.infra.environment-config.local.md +250 -0
- package/dist/knowledge/references/example.market.alternative.in-house-build.md +49 -0
- package/dist/knowledge/references/example.market.authored-metadata.md +32 -0
- package/dist/knowledge/references/example.market.buying-journey.core-icp.md +140 -0
- package/dist/knowledge/references/example.market.category.config.md +71 -0
- package/dist/knowledge/references/example.market.channel.community.md +39 -0
- package/dist/knowledge/references/example.market.feature-benefit.kano-threshold.md +67 -0
- package/dist/knowledge/references/example.market.feature-benefit.pain-reliever.md +65 -0
- package/dist/knowledge/references/example.market.icp.anti-target.md +47 -0
- package/dist/knowledge/references/example.market.icp.individual.md +82 -0
- package/dist/knowledge/references/example.market.icp.legal-entity-with-geographies.md +95 -0
- package/dist/knowledge/references/example.market.is-benefit-available.composition.md +40 -0
- package/dist/knowledge/references/example.market.job.emotional.md +27 -0
- package/dist/knowledge/references/example.market.job.functional.md +28 -0
- package/dist/knowledge/references/example.market.message-template.seeds.md +106 -0
- package/dist/knowledge/references/example.market.objection.pricing.md +39 -0
- package/dist/knowledge/references/example.market.persona.dmu-with-inheritance.md +62 -0
- package/dist/knowledge/references/example.market.persona.individual-self.md +51 -0
- package/dist/knowledge/references/example.market.positioning.per-icp.md +103 -0
- package/dist/knowledge/references/example.market.proof.metric.md +39 -0
- package/dist/knowledge/references/example.market.scoring.golden-case.md +46 -0
- package/dist/knowledge/references/example.market.scoring.no-coverage-zero.md +40 -0
- package/dist/knowledge/references/example.market.snapshot-validation.duplicate-journey-stage.md +36 -0
- package/dist/knowledge/references/example.market.snapshot-validation.errors-by-kind.md +55 -0
- package/dist/knowledge/references/example.market.snapshot-validation.objection-proof-benefit-mismatch.md +74 -0
- package/dist/knowledge/references/example.market.snapshot-validation.proof-without-support.md +32 -0
- package/dist/knowledge/references/example.market.snapshot-validation.threshold-without-job.md +44 -0
- package/dist/knowledge/references/example.market.snapshot.assembled.md +49 -0
- package/dist/knowledge/references/example.market.tone-of-voice.config.md +41 -0
- package/dist/knowledge/references/example.market.trigger.growth-milestone.md +43 -0
- package/dist/knowledge/references/example.module.companion-exports.full.md +142 -0
- package/dist/knowledge/references/example.module.registration.shared.md +16 -0
- package/dist/knowledge/references/example.module.relationships.actor-edge-back-to-scope-owner.md +47 -0
- package/dist/knowledge/references/example.module.relationships.discriminator.md +25 -0
- package/dist/knowledge/references/example.module.relationships.scope-membership-junction.md +25 -0
- package/dist/knowledge/references/example.provider.backend-module-shape.md +110 -0
- package/dist/knowledge/references/example.provider.contribution.backend-billing.md +12 -0
- package/dist/knowledge/references/example.provider.frontend-file-picker.contribution.md +30 -0
- package/dist/knowledge/references/example.provider.frontend-file-picker.module.md +21 -0
- package/dist/knowledge/references/example.rag.source-fields.declaration.md +83 -0
- package/dist/knowledge/references/example.rate-limit.custom-controller-surface.md +25 -0
- package/dist/knowledge/references/example.rate-limit.resource-operation-surface.md +24 -0
- package/dist/knowledge/references/example.resource.add-field.priority-enum.md +19 -0
- package/dist/knowledge/references/example.resource.add-resource.module-factory-map.md +21 -0
- package/dist/knowledge/references/example.resource.config-wiring.fk-relationship.md +33 -0
- package/dist/knowledge/references/example.resource.custom-view.read-host.md +28 -0
- package/dist/knowledge/references/example.resource.mcp-exposure.md +65 -0
- package/dist/knowledge/references/example.resource.reference-constraints.role-constrained.md +27 -0
- package/dist/knowledge/references/example.resource.ui-behavior.enum-badge.md +22 -0
- package/dist/knowledge/references/example.resource.ui-behavior.operation-icon.md +43 -0
- package/dist/knowledge/references/example.spec.composite-view.workspace.md +72 -0
- package/dist/knowledge/references/example.spec.feature.flag-with-codehandling.md +64 -0
- package/dist/knowledge/references/example.spec.frontend-component.prop-vocabulary.md +88 -0
- package/dist/knowledge/references/example.spec.resource.semantic-field.md +23 -0
- package/dist/knowledge/references/example.views.app-level.composite-views-config.md +19 -0
- package/dist/knowledge/references/example.views.chart-view.resource-owned.md +69 -0
- package/dist/knowledge/references/example.views.composite-view.host-embeds.md +31 -0
- package/dist/knowledge/references/example.views.composite-view.workspace.md +65 -0
- package/dist/knowledge/references/example.views.custom-view.execution-host.md +41 -0
- package/dist/knowledge/references/example.views.execution-view.resource-owned.md +25 -0
- package/dist/knowledge/references/external-connectors.app.frontend-provider-module.md +42 -0
- package/dist/knowledge/references/market.alternative.config.md +68 -0
- package/dist/knowledge/references/market.alternative.kind.md +32 -0
- package/dist/knowledge/references/market.authored-metadata.config.md +64 -0
- package/dist/knowledge/references/market.buying-journey.config.md +43 -0
- package/dist/knowledge/references/market.buying-journey.stage.md +33 -0
- package/dist/knowledge/references/market.category.config.md +63 -0
- package/dist/knowledge/references/market.channel.config.md +59 -0
- package/dist/knowledge/references/market.channel.kind.md +49 -0
- package/dist/knowledge/references/market.context-block.builder.md +544 -0
- package/dist/knowledge/references/market.context-block.response.md +57 -0
- package/dist/knowledge/references/market.feature-benefit.config.md +84 -0
- package/dist/knowledge/references/market.feature-benefit.kano.md +41 -0
- package/dist/knowledge/references/market.gain.config.md +50 -0
- package/dist/knowledge/references/market.generation.response.md +108 -0
- package/dist/knowledge/references/market.icp.config.md +162 -0
- package/dist/knowledge/references/market.icp.geographic-targeting.md +57 -0
- package/dist/knowledge/references/market.inherit-from.md +74 -0
- package/dist/knowledge/references/market.is-benefit-available.md +58 -0
- package/dist/knowledge/references/market.job.config.md +48 -0
- package/dist/knowledge/references/market.message-template.config.md +86 -0
- package/dist/knowledge/references/market.objection.config.md +56 -0
- package/dist/knowledge/references/market.objection.kind.md +34 -0
- package/dist/knowledge/references/market.pain.config.md +50 -0
- package/dist/knowledge/references/market.persona.config.md +64 -0
- package/dist/knowledge/references/market.positioning.config.md +84 -0
- package/dist/knowledge/references/market.proof.config.md +48 -0
- package/dist/knowledge/references/market.proof.kind.md +34 -0
- package/dist/knowledge/references/market.references.weighted-edges.md +105 -0
- package/dist/knowledge/references/market.scoring.fit.md +215 -0
- package/dist/knowledge/references/market.snapshot.config.md +34 -0
- package/dist/knowledge/references/market.snapshot.validation.md +1171 -0
- package/dist/knowledge/references/market.tone-of-voice.config.md +80 -0
- package/dist/knowledge/references/market.trigger.config.md +45 -0
- package/dist/knowledge/references/market.trigger.kind.md +35 -0
- package/dist/knowledge/references/placement-plan.config.md +330 -0
- package/dist/knowledge/references/platform.config.application-database.md +74 -0
- package/dist/knowledge/references/platform.config.application-modules.md +30 -0
- package/dist/knowledge/references/platform.config.backing-services.md +266 -0
- package/dist/knowledge/references/platform.config.cdn.md +167 -0
- package/dist/knowledge/references/platform.config.environment.deployment.md +263 -0
- package/dist/knowledge/references/platform.config.saas.md +405 -0
- package/dist/knowledge/references/presets.models.design-system.configuration.md +59 -0
- package/dist/knowledge/references/presets.models.design-system.source-config.md +72 -0
- package/dist/knowledge/references/presets.models.labelling.sections.md +64 -0
- package/dist/knowledge/references/presets.models.material.profile-contract.md +192 -0
- package/dist/knowledge/references/presets.models.material.runtime-policy.md +60 -0
- package/dist/knowledge/references/presets.models.surface-policy.defaults.md +613 -0
- package/dist/knowledge/references/presets.models.surface-policy.md +534 -0
- package/dist/knowledge/references/presets.models.surface-variant.md +56 -0
- package/dist/knowledge/references/requirements.authored-metadata.config.md +64 -0
- package/dist/knowledge/references/requirements.functional-requirement.config.md +68 -0
- package/dist/knowledge/references/requirements.non-functional-requirement.config.md +100 -0
- package/dist/knowledge/references/requirements.references.conventions.md +125 -0
- package/dist/knowledge/references/requirements.snapshot.config.md +73 -0
- package/dist/knowledge/references/requirements.snapshot.validation.md +333 -0
- package/dist/knowledge/references/roadmap.authored-metadata.config.md +64 -0
- package/dist/knowledge/references/roadmap.phase.config.md +149 -0
- package/dist/knowledge/references/roadmap.references.conventions.md +89 -0
- package/dist/knowledge/references/roadmap.snapshot.config.md +65 -0
- package/dist/knowledge/references/roadmap.snapshot.validation.md +325 -0
- package/dist/knowledge/references/saas.backend.app-config.backend-authored.md +32 -0
- package/dist/knowledge/references/saas.backend.application-initialization.assembly.md +38 -0
- package/dist/knowledge/references/saas.backend.billing.resolution-failure-reasons.md +45 -0
- package/dist/knowledge/references/saas.backend.custom-operation.authoritative-fields.md +53 -0
- package/dist/knowledge/references/saas.backend.custom-operation.transactional-core.md +120 -0
- package/dist/knowledge/references/saas.backend.domain-module.md +237 -0
- package/dist/knowledge/references/saas.backend.email-template.definition.md +69 -0
- package/dist/knowledge/references/saas.backend.flows-actors.a2a-agent-card.md +89 -0
- package/dist/knowledge/references/saas.backend.flows-actors.a2a-task-surface.md +118 -0
- package/dist/knowledge/references/saas.backend.flows-actors.function-tool.md +82 -0
- package/dist/knowledge/references/saas.backend.flows-actors.invoke-agent.md +48 -0
- package/dist/knowledge/references/saas.backend.flows-actors.resource-read-tool.md +39 -0
- package/dist/knowledge/references/saas.backend.flows-actors.resource-write-tool.md +67 -0
- package/dist/knowledge/references/saas.backend.pdf-template.bindings.md +52 -0
- package/dist/knowledge/references/saas.backend.pdf-template.definition.md +113 -0
- package/dist/knowledge/references/saas.backend.rate-limit-service.check-policy.md +75 -0
- package/dist/knowledge/references/saas.backend.system-access-service.md +994 -0
- package/dist/knowledge/references/saas.data-seeding.admin-endpoints.md +59 -0
- package/dist/knowledge/references/saas.data-seeding.bootstrap-wiring.md +184 -0
- package/dist/knowledge/references/saas.data-seeding.definition-input.md +95 -0
- package/dist/knowledge/references/saas.data-seeding.modes.md +72 -0
- package/dist/knowledge/references/saas.data-seeding.run-ledger.md +198 -0
- package/dist/knowledge/references/saas.data-seeding.run-status.md +35 -0
- package/dist/knowledge/references/saas.data-seeding.schedule.md +91 -0
- package/dist/knowledge/references/saas.data-seeding.scope-iteration-strategy.md +46 -0
- package/dist/knowledge/references/saas.external-providers.backend-provider-registry.runtime-filter.md +55 -0
- package/dist/knowledge/references/saas.external-providers.document-extraction.applicability.md +26 -0
- package/dist/knowledge/references/saas.external-providers.embeddings.applicability.md +30 -0
- package/dist/knowledge/references/saas.external-providers.llm.model-configuration.md +124 -0
- package/dist/knowledge/references/saas.external-providers.llm.operation-key.md +49 -0
- package/dist/knowledge/references/saas.frontend.app-level-component.configuration.md +265 -0
- package/dist/knowledge/references/saas.frontend.app-level-component.vocabulary.md +148 -0
- package/dist/knowledge/references/saas.frontend.app-shell.hosted-components.md +145 -0
- package/dist/knowledge/references/saas.frontend.chart-view.inserted-declaration.md +80 -0
- package/dist/knowledge/references/saas.frontend.command-menu.omnibox.md +88 -0
- package/dist/knowledge/references/saas.frontend.command-menu.search-resource.md +109 -0
- package/dist/knowledge/references/saas.frontend.component-registration.entry.md +21 -0
- package/dist/knowledge/references/saas.frontend.composite-view.authoring.md +102 -0
- package/dist/knowledge/references/saas.frontend.composite-view.define-helper.md +31 -0
- package/dist/knowledge/references/saas.frontend.domain-module.md +31 -0
- package/dist/knowledge/references/saas.frontend.embedded-resource-descent.md +37 -0
- package/dist/knowledge/references/saas.frontend.execution-view.action-status-contract.md +172 -0
- package/dist/knowledge/references/saas.frontend.execution-view.action-status-contract.per-action-retry-loop.md +115 -0
- package/dist/knowledge/references/saas.frontend.execution-view.definition.md +172 -0
- package/dist/knowledge/references/saas.frontend.execution-view.dirty-bridge-contract.local-pane.md +109 -0
- package/dist/knowledge/references/saas.frontend.execution-view.dirty-bridge-contract.md +55 -0
- package/dist/knowledge/references/saas.frontend.execution-view.dirty-state-contract.md +151 -0
- package/dist/knowledge/references/saas.frontend.execution-view.failure-handling-contract.md +302 -0
- package/dist/knowledge/references/saas.frontend.execution-view.loading-aggregation.md +89 -0
- package/dist/knowledge/references/saas.frontend.execution-view.loading-aggregation.participation-prefetch.md +231 -0
- package/dist/knowledge/references/saas.frontend.execution-view.loading-aggregation.participation-prefetch.shell-data-hydrator.md +174 -0
- package/dist/knowledge/references/saas.frontend.execution-view.navigation-handling-and-embedding.md +96 -0
- package/dist/knowledge/references/saas.frontend.execution-view.navigation-handling-and-embedding.resolution.md +45 -0
- package/dist/knowledge/references/saas.frontend.execution-view.outcome-emission-contract.md +71 -0
- package/dist/knowledge/references/saas.frontend.execution-view.participation-and-anchor.md +80 -0
- package/dist/knowledge/references/saas.frontend.execution-view.three-zone-contract.md +147 -0
- package/dist/knowledge/references/saas.frontend.flows-actors-view.md +40 -0
- package/dist/knowledge/references/saas.frontend.form-fields.file-provider-constraints.md +80 -0
- package/dist/knowledge/references/saas.frontend.full-custom-view.definition.md +64 -0
- package/dist/knowledge/references/saas.frontend.inserted-view.identity-bindings-descriptor.md +149 -0
- package/dist/knowledge/references/saas.frontend.operation-key-and-resource-config-like.md +63 -0
- package/dist/knowledge/references/saas.frontend.quick-switcher.scope-field.md +102 -0
- package/dist/knowledge/references/saas.frontend.related-resource-embeds.md +86 -0
- package/dist/knowledge/references/saas.frontend.related-resource-preview.md +23 -0
- package/dist/knowledge/references/saas.frontend.related-resource-sections.md +28 -0
- package/dist/knowledge/references/saas.frontend.resource-header-title.md +43 -0
- package/dist/knowledge/references/saas.frontend.resource-layout-templates.md +215 -0
- package/dist/knowledge/references/saas.frontend.resource-operation-frontend-config.md +531 -0
- package/dist/knowledge/references/saas.frontend.resource-ui-behavior-config.md +210 -0
- package/dist/knowledge/references/saas.frontend.resource-ui-behavior-preset-map.md +39 -0
- package/dist/knowledge/references/saas.frontend.settings-hub.engine-destinations.md +58 -0
- package/dist/knowledge/references/saas.frontend.settings-hub.placement.md +118 -0
- package/dist/knowledge/references/saas.frontend.view-definition-scope.md +42 -0
- package/dist/knowledge/references/saas.market.generation-agent.md +104 -0
- package/dist/knowledge/references/saas.models.core-resource-operation.md +86 -0
- package/dist/knowledge/references/saas.models.data-mode-read-list.md +395 -0
- package/dist/knowledge/references/saas.models.engine-capabilities.md +114 -0
- package/dist/knowledge/references/saas.models.error-type.md +45 -0
- package/dist/knowledge/references/saas.models.external-data-pipeline.md +162 -0
- package/dist/knowledge/references/saas.models.feature-limit-semantic.md +51 -0
- package/dist/knowledge/references/saas.models.flows-actors.agent-configuration.md +127 -0
- package/dist/knowledge/references/saas.models.flows-actors.agent-definition.md +115 -0
- package/dist/knowledge/references/saas.models.flows-actors.agent-invocation.md +52 -0
- package/dist/knowledge/references/saas.models.flows-actors.agent-prompt-spec.md +188 -0
- package/dist/knowledge/references/saas.models.http-api-binding.md +237 -0
- package/dist/knowledge/references/saas.models.navigation.layout.md +149 -0
- package/dist/knowledge/references/saas.models.organization-unit-narrowing-containment.md +22 -0
- package/dist/knowledge/references/saas.models.organization-unit-narrowing-declaration.md +42 -0
- package/dist/knowledge/references/saas.models.polymorphism.optout-business-key.md +62 -0
- package/dist/knowledge/references/saas.models.polymorphism.variant-definition.md +74 -0
- package/dist/knowledge/references/saas.models.provider-capabilities.md +97 -0
- package/dist/knowledge/references/saas.models.rate-limit-configuration.md +67 -0
- package/dist/knowledge/references/saas.models.relationship-handling-contract.md +30 -0
- package/dist/knowledge/references/saas.models.relationship-handling-settings.md +62 -0
- package/dist/knowledge/references/saas.models.relationship-nature-and-models.md +112 -0
- package/dist/knowledge/references/saas.models.resource-config.builder-parameters.md +431 -0
- package/dist/knowledge/references/saas.models.resource-config.forwarded-label.md +88 -0
- package/dist/knowledge/references/saas.models.resource-config.operation-api-call.md +89 -0
- package/dist/knowledge/references/saas.models.resource-config.operation-base.md +79 -0
- package/dist/knowledge/references/saas.models.resource-config.operation-mcp-exposure.md +49 -0
- package/dist/knowledge/references/saas.models.resource-config.operation-path.md +27 -0
- package/dist/knowledge/references/saas.models.resource-config.operation-union.md +26 -0
- package/dist/knowledge/references/saas.models.resource-config.operation-variant-for-key.md +62 -0
- package/dist/knowledge/references/saas.models.resource-config.resource-configuration.md +124 -0
- package/dist/knowledge/references/saas.models.resource-config.resource-relationships-buckets.md +38 -0
- package/dist/knowledge/references/saas.models.resource-config.resources-registry.md +69 -0
- package/dist/knowledge/references/saas.models.resource-config.searchable-relation.md +89 -0
- package/dist/knowledge/references/saas.models.resource-config.system-access-policy.md +121 -0
- package/dist/knowledge/references/saas.models.resource-config.token-generation.md +145 -0
- package/dist/knowledge/references/saas.models.resource-field-identifier.md +25 -0
- package/dist/knowledge/references/saas.models.resource-operation-display-risk.md +77 -0
- package/dist/knowledge/references/saas.models.resource-operation-variant-runtime.md +58 -0
- package/dist/knowledge/references/saas.models.resource-primary-scope.md +36 -0
- package/dist/knowledge/references/saas.models.resource-relationship-access-scope.md +26 -0
- package/dist/knowledge/references/saas.models.resource-relationship-builder-parameters.md +100 -0
- package/dist/knowledge/references/saas.models.resource-relationship-cardinality.md +57 -0
- package/dist/knowledge/references/saas.models.resource-relationship-declaration.md +69 -0
- package/dist/knowledge/references/saas.models.resource-relationship-resolved-semantics.md +60 -0
- package/dist/knowledge/references/saas.models.resource-relationship-schema.md +172 -0
- package/dist/knowledge/references/saas.models.resource-server-instance.md +109 -0
- package/dist/knowledge/references/saas.models.resource-type.md +24 -0
- package/dist/knowledge/references/saas.models.schema-family-builder.md +242 -0
- package/dist/knowledge/references/saas.models.scope-membership.md +143 -0
- package/dist/knowledge/references/saas.models.shared-domain-module.md +36 -0
- package/dist/knowledge/references/saas.models.shared-saas-module.md +36 -0
- package/dist/knowledge/references/saas.public-runtime.contract.md +229 -0
- package/dist/knowledge/references/saas.rag.retrieval-bounds.md +106 -0
- package/dist/knowledge/references/saas.rag.retrieval-refusals.md +89 -0
- package/dist/knowledge/references/saas.rag.retrieval-request.md +130 -0
- package/dist/knowledge/references/saas.rag.retrieval-result.md +147 -0
- package/dist/knowledge/references/saas.rag.retrieval-scores.md +54 -0
- package/dist/knowledge/references/saas.specifications.application-document-fact-specification.contract.md +59 -0
- package/dist/knowledge/references/saas.specifications.application-document-publication.contract.md +74 -0
- package/dist/knowledge/references/saas.specifications.assurance-document-blueprint.contract.md +1158 -0
- package/dist/knowledge/references/saas.specifications.assurance-program.contract.md +2602 -0
- package/dist/knowledge/references/saas.specifications.catalogs.schema-org.catalog-spec-shared.md +180 -0
- package/dist/knowledge/references/saas.specifications.catalogs.schema-org.discriminated-union.md +138 -0
- package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-aggregate-offer.md +46 -0
- package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-aggregate-rating.md +47 -0
- package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-article.md +49 -0
- package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-blog-posting.md +62 -0
- package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-breadcrumb-list.md +46 -0
- package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-faq-page.md +51 -0
- package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-offer.md +46 -0
- package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-organization.md +48 -0
- package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-product.md +59 -0
- package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-review.md +46 -0
- package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-website.md +46 -0
- package/dist/knowledge/references/saas.specifications.companion-exports.contract.md +530 -0
- package/dist/knowledge/references/saas.specifications.composite-view-specification.md +49 -0
- package/dist/knowledge/references/saas.specifications.error-message-specification.md +92 -0
- package/dist/knowledge/references/saas.specifications.family-specifications.md +109 -0
- package/dist/knowledge/references/saas.specifications.feature-specification.md +93 -0
- package/dist/knowledge/references/saas.specifications.frontend-component-spec-factory.md +113 -0
- package/dist/knowledge/references/saas.specifications.frontend-component-spec-model.md +366 -0
- package/dist/knowledge/references/saas.specifications.resource-frontend-configuration-aspect.md +41 -0
- package/dist/knowledge/references/saas.specifications.resource-operation-spec.md +1978 -0
- package/dist/knowledge/references/saas.specifications.resource-pdf-template-spec.md +58 -0
- package/dist/knowledge/references/saas.specifications.resource-spec-code-handling.md +49 -0
- package/dist/knowledge/references/saas.specifications.resource-spec-config.md +156 -0
- package/dist/knowledge/references/saas.specifications.resource-spec-factory.md +171 -0
- package/dist/knowledge/references/saas.specifications.resource-spec-frontend-config-type.md +54 -0
- package/dist/knowledge/references/saas.specifications.resource-spec-frontend-prose.md +171 -0
- package/dist/knowledge/references/saas.website.astro.bridge.md +262 -0
- package/dist/knowledge/references/saas.website.astro.head-renderer.md +271 -0
- package/dist/knowledge/references/saas.website.astro.headers-renderer.md +41 -0
- package/dist/knowledge/references/saas.website.astro.i18n-helper.md +121 -0
- package/dist/knowledge/references/saas.website.astro.label-key-collector.md +117 -0
- package/dist/knowledge/references/saas.website.astro.label-loader.md +377 -0
- package/dist/knowledge/references/saas.website.astro.llms-txt-server.md +46 -0
- package/dist/knowledge/references/saas.website.astro.pick-labels-for-page.md +90 -0
- package/dist/knowledge/references/saas.website.astro.robots-renderer.md +174 -0
- package/dist/knowledge/references/saas.website.astro.runtime-helper.md +187 -0
- package/dist/knowledge/references/saas.website.astro.site-context.md +141 -0
- package/dist/knowledge/references/saas.website.astro.sitemap-coverage.md +188 -0
- package/dist/knowledge/references/saas.website.astro.structured-data-renderer.md +174 -0
- package/dist/knowledge/references/saas.website.blog.bridge.md +396 -0
- package/dist/knowledge/references/saas.website.blog.collection-config.md +180 -0
- package/dist/knowledge/references/saas.website.blog.frontmatter.md +116 -0
- package/dist/knowledge/references/saas.website.blog.head-renderer.md +292 -0
- package/dist/knowledge/references/saas.website.blog.mdx-provider.md +100 -0
- package/dist/knowledge/references/saas.website.blog.post-renderer.md +291 -0
- package/dist/knowledge/references/saas.website.design-tokens.bundle.md +29 -0
- package/dist/knowledge/references/saas.website.design-tokens.colors.md +64 -0
- package/dist/knowledge/references/saas.website.design-tokens.radius.md +38 -0
- package/dist/knowledge/references/saas.website.factories.define-page-manifest.md +98 -0
- package/dist/knowledge/references/saas.website.factories.define-section.md +128 -0
- package/dist/knowledge/references/saas.website.label-keys.compose-helper.md +36 -0
- package/dist/knowledge/references/saas.website.label-keys.format.md +67 -0
- package/dist/knowledge/references/saas.website.label-pack.validator.md +206 -0
- package/dist/knowledge/references/saas.website.page-layout.component.md +217 -0
- package/dist/knowledge/references/saas.website.page-manifest.meta-label-keys.md +47 -0
- package/dist/knowledge/references/saas.website.page-manifest.route-path.md +49 -0
- package/dist/knowledge/references/saas.website.page-manifest.schema.md +186 -0
- package/dist/knowledge/references/saas.website.page-manifest.seo.md +46 -0
- package/dist/knowledge/references/saas.website.page.context.md +57 -0
- package/dist/knowledge/references/saas.website.primitives.button.md +123 -0
- package/dist/knowledge/references/saas.website.primitives.heading.md +103 -0
- package/dist/knowledge/references/saas.website.primitives.image.md +103 -0
- package/dist/knowledge/references/saas.website.primitives.internal-button.md +151 -0
- package/dist/knowledge/references/saas.website.primitives.internal-link.md +193 -0
- package/dist/knowledge/references/saas.website.primitives.link.md +78 -0
- package/dist/knowledge/references/saas.website.primitives.text.md +82 -0
- package/dist/knowledge/references/saas.website.refs.page.md +56 -0
- package/dist/knowledge/references/saas.website.refs.section.md +57 -0
- package/dist/knowledge/references/saas.website.root-config.navigation.md +37 -0
- package/dist/knowledge/references/saas.website.root-config.schema.md +192 -0
- package/dist/knowledge/references/saas.website.root-config.seo.md +98 -0
- package/dist/knowledge/references/saas.website.routing.localized-path.md +84 -0
- package/dist/knowledge/references/saas.website.runtime.context.md +174 -0
- package/dist/knowledge/references/saas.website.section.component.md +138 -0
- package/dist/knowledge/references/saas.website.section.context.md +63 -0
- package/dist/knowledge/references/saas.website.sections.category-enum.md +72 -0
- package/dist/knowledge/references/saas.website.sections.definition-schema.md +121 -0
- package/dist/knowledge/references/saas.website.seo.llms-txt-config.md +37 -0
- package/dist/knowledge/references/saas.website.seo.robots-config.md +106 -0
- package/dist/knowledge/references/saas.website.seo.sitemap-config.md +73 -0
- package/dist/knowledge/references/saas.website.structured-data.payload-shape.md +71 -0
- package/dist/knowledge/references/saas.website.use-label-by-key.hook.md +45 -0
- package/dist/knowledge/references/saas.website.use-label.hook.md +82 -0
- package/dist/knowledge/references/saas.website.use-page.hook.md +30 -0
- package/dist/knowledge/references/saas.website.use-runtime.hook.md +36 -0
- package/dist/knowledge/references/saas.website.use-section.hook.md +30 -0
- package/dist/knowledge/references/saas.website.use-tokens.hook.md +32 -0
- package/dist/knowledge/references/vision.authored-metadata.config.md +64 -0
- package/dist/knowledge/references/vision.constraint.config.md +66 -0
- package/dist/knowledge/references/vision.idea.config.md +45 -0
- package/dist/knowledge/references/vision.mission.config.md +46 -0
- package/dist/knowledge/references/vision.problem.config.md +51 -0
- package/dist/knowledge/references/vision.references.conventions.md +115 -0
- package/dist/knowledge/references/vision.snapshot.config.md +85 -0
- package/dist/knowledge/references/vision.snapshot.validation.md +226 -0
- package/dist/knowledge/references/vision.success-criterion.config.md +60 -0
- package/dist/knowledge/references/zod.decorators.chainable-runtime.md +550 -0
- package/dist/knowledge/references/zod.decorators.conditional-visibility.md +104 -0
- package/dist/knowledge/references/zod.decorators.data-categories.md +197 -0
- package/dist/knowledge/references/zod.decorators.decorator-vocabulary.md +436 -0
- package/dist/knowledge/references/zod.decorators.display-edit-modes.md +174 -0
- package/dist/knowledge/references/zod.decorators.enums.frontend-handling.md +101 -0
- package/dist/knowledge/references/zod.decorators.field-spec-params.md +317 -0
- package/dist/knowledge/references/zod.decorators.file-generation.md +36 -0
- package/dist/knowledge/references/zod.decorators.file-rag-source.md +56 -0
- package/dist/knowledge/references/zod.decorators.file-schema.md +319 -0
- package/dist/knowledge/references/zod.decorators.foreign-key-display-mode.md +83 -0
- package/dist/knowledge/references/zod.decorators.per-primitive-ui.md +459 -0
- package/dist/knowledge/references/zod.decorators.primitive-ui.md +123 -0
- package/dist/knowledge/references/zod.decorators.rag-source.md +164 -0
- package/dist/knowledge/references/zod.decorators.schema-metadata.md +122 -0
- package/dist/knowledge/references/zod.decorators.shared-structural-methods.md +152 -0
- package/dist/knowledge/references/zod.decorators.shared-structural-params.md +314 -0
- package/dist/knowledge/references/zod.decorators.structural-lifecycle-params.md +529 -0
- package/dist/knowledge/references/zod.factories.bigdecimal.md +155 -0
- package/dist/knowledge/references/zod.factories.code.md +127 -0
- package/dist/knowledge/references/zod.factories.duration.md +246 -0
- package/dist/knowledge/references/zod.factories.money.md +166 -0
- package/dist/knowledge/references/zod.factories.phone.md +88 -0
- package/dist/knowledge/references/zod.factories.range.md +174 -0
- package/dist/knowledge/registries/assurance-authority-bases.json +15 -0
- package/dist/knowledge/registries/framework-topics.json +5212 -0
- package/dist/knowledge/registries/playbooks.json +488 -0
- package/dist/knowledge/registries/source-tags.json +7664 -0
- package/dist/knowledge/rules/resource-schema-awareness.md +77 -0
- package/dist/knowledge/skills/INDEX.md +349 -0
- package/dist/knowledge/skills/application-consumer-documentation-authoring/SKILL.md +415 -0
- package/dist/knowledge/skills/application-consumer-documentation-authoring/examples/domain-use-case-and-admin-task.example.md +49 -0
- package/dist/knowledge/skills/application-consumer-documentation-authoring/references/source-and-ownership-routing.md +52 -0
- package/dist/knowledge/skills/application-database-migrations/SKILL.md +218 -0
- package/dist/knowledge/skills/application-database-migrations/references/framework-application-database-api.md +84 -0
- package/dist/knowledge/skills/application-database-migrations/references/framework-migration-change-risk-api.md +37 -0
- package/dist/knowledge/skills/application-database-migrations/references/migration-refusals.md +64 -0
- package/dist/knowledge/skills/application-database-migrations/references/postgresql-vs-mongodb-obligations.md +34 -0
- package/dist/knowledge/skills/authorization-unit-narrowing/SKILL.md +323 -0
- package/dist/knowledge/skills/authorization-unit-narrowing/references/framework-unit-narrowing-declaration-api.md +84 -0
- package/dist/knowledge/skills/backend-addon-wiring/SKILL.md +324 -0
- package/dist/knowledge/skills/backend-addon-wiring/references/backend-di-routing.md +7 -0
- package/dist/knowledge/skills/backend-addon-wiring/references/framework-backend-bootstrap-api.md +276 -0
- package/dist/knowledge/skills/backend-custom-operation/SKILL.md +374 -0
- package/dist/knowledge/skills/backend-custom-operation/references/framework-error-handling-api.md +118 -0
- package/dist/knowledge/skills/backend-custom-operation/references/framework-operation-base-and-path-api.md +107 -0
- package/dist/knowledge/skills/backend-custom-operation/references/framework-transactional-core-api.md +134 -0
- package/dist/knowledge/skills/backend-custom-operation/references/operation-file-conventions.md +10 -0
- package/dist/knowledge/skills/brand-logo-authoring/SKILL.md +192 -0
- package/dist/knowledge/skills/brand-logo-authoring/references/brand-authoring-decisions.md +55 -0
- package/dist/knowledge/skills/brand-logo-authoring/references/framework-brand-asset-api.md +184 -0
- package/dist/knowledge/skills/brand-logo-authoring/references/framework-brand-snapshot-api.md +279 -0
- package/dist/knowledge/skills/compliance-document-authoring/SKILL.md +346 -0
- package/dist/knowledge/skills/compliance-document-authoring/references/document-composition-governance.md +160 -0
- package/dist/knowledge/skills/compliance-document-authoring/references/document-composition-privacy-notice.md +518 -0
- package/dist/knowledge/skills/compliance-document-authoring/references/document-composition-service-terms.md +158 -0
- package/dist/knowledge/skills/compliance-document-authoring/references/framework-application-document-fact-specification-contract.md +95 -0
- package/dist/knowledge/skills/compliance-document-authoring/references/framework-application-document-publication-contract.md +100 -0
- package/dist/knowledge/skills/compliance-document-authoring/references/framework-assurance-document-blueprint-contract.md +1210 -0
- package/dist/knowledge/skills/compliance-document-authoring/references/framework-governed-document-after-drafting.md +40 -0
- package/dist/knowledge/skills/config-app-shell/SKILL.md +698 -0
- package/dist/knowledge/skills/config-app-shell/references/app-shell-surfaces.md +5 -0
- package/dist/knowledge/skills/config-app-shell/references/framework-app-shell-api.md +415 -0
- package/dist/knowledge/skills/config-app-shell/references/framework-app-shell-hosted-components-api.md +170 -0
- package/dist/knowledge/skills/config-app-shell/references/framework-command-menu-omnibox-api.md +212 -0
- package/dist/knowledge/skills/config-app-shell/references/framework-quick-switcher-scope-field-api.md +178 -0
- package/dist/knowledge/skills/config-design-system/SKILL.md +424 -0
- package/dist/knowledge/skills/config-design-system/references/design-system-file.md +10 -0
- package/dist/knowledge/skills/config-design-system/references/framework-design-system-configuration-api.md +77 -0
- package/dist/knowledge/skills/config-design-system/references/framework-material-profile-api.md +200 -0
- package/dist/knowledge/skills/config-design-system/references/framework-material-runtime-policy-api.md +68 -0
- package/dist/knowledge/skills/config-design-system/references/framework-surface-policy-api.md +1212 -0
- package/dist/knowledge/skills/config-design-system/references/surface-policy-authoring.md +92 -0
- package/dist/knowledge/skills/config-navigation/SKILL.md +249 -0
- package/dist/knowledge/skills/config-navigation/references/framework-navigation-layout-api.md +152 -0
- package/dist/knowledge/skills/config-navigation/references/navigation-zones.md +5 -0
- package/dist/knowledge/skills/config-saas/SKILL.md +209 -0
- package/dist/knowledge/skills/config-saas/references/framework-provider-capabilities-api.md +221 -0
- package/dist/knowledge/skills/config-saas/references/framework-wildo-saas-config-api.md +408 -0
- package/dist/knowledge/skills/config-saas/references/saas-config-scope.md +9 -0
- package/dist/knowledge/skills/config-saas-backend/SKILL.md +183 -0
- package/dist/knowledge/skills/config-saas-backend/references/framework-backend-authored-config-api.md +40 -0
- package/dist/knowledge/skills/configure-billing/SKILL.md +261 -0
- package/dist/knowledge/skills/configure-billing/references/config-chain-and-failure-map.md +90 -0
- package/dist/knowledge/skills/configure-billing/references/example-backend-provider-module-shape.md +122 -0
- package/dist/knowledge/skills/configure-billing/references/example-provider-contribution-and-backend-config.md +48 -0
- package/dist/knowledge/skills/configure-billing/references/framework-backend-provider-reachability-api.md +69 -0
- package/dist/knowledge/skills/configure-billing/references/framework-billing-resolution-failure-api.md +57 -0
- package/dist/knowledge/skills/email-add-template/SKILL.md +439 -0
- package/dist/knowledge/skills/email-add-template/references/email-artifact-paths.md +9 -0
- package/dist/knowledge/skills/email-add-template/references/framework-email-template-api.md +72 -0
- package/dist/knowledge/skills/email-definition-wiring/SKILL.md +62 -0
- package/dist/knowledge/skills/email-labels-authoring/SKILL.md +64 -0
- package/dist/knowledge/skills/email-template-authoring/SKILL.md +62 -0
- package/dist/knowledge/skills/engine-component-registration/SKILL.md +257 -0
- package/dist/knowledge/skills/engine-component-registration/references/component-registration-file.md +7 -0
- package/dist/knowledge/skills/engine-component-registration/references/framework-component-registration-api.md +24 -0
- package/dist/knowledge/skills/engine-product-definitions/SKILL.md +429 -0
- package/dist/knowledge/skills/engine-product-definitions/references/framework-engine-product-definitions-api.md +287 -0
- package/dist/knowledge/skills/engine-product-definitions/references/product-registry-scope.md +5 -0
- package/dist/knowledge/skills/flows-actors-a2a-exposure/SKILL.md +491 -0
- package/dist/knowledge/skills/flows-actors-a2a-exposure/references/framework-flows-actors-a2a-contract.md +227 -0
- package/dist/knowledge/skills/flows-actors-a2a-exposure/references/framework-named-a2a-agents-contract.md +143 -0
- package/dist/knowledge/skills/flows-actors-chat-assistant/SKILL.md +368 -0
- package/dist/knowledge/skills/flows-actors-chat-assistant/examples/todo-assistant.example.md +226 -0
- package/dist/knowledge/skills/flows-actors-chat-assistant/references/framework-flows-actors-tool-api.md +208 -0
- package/dist/knowledge/skills/flows-actors-chat-assistant/references/framework-flows-actors-view-api.md +286 -0
- package/dist/knowledge/skills/flows-actors-llm-agent-invocation/SKILL.md +376 -0
- package/dist/knowledge/skills/flows-actors-llm-agent-invocation/references/framework-llm-agent-definition-api.md +262 -0
- package/dist/knowledge/skills/flows-actors-llm-agent-invocation/references/framework-llm-agent-invocation-api.md +130 -0
- package/dist/knowledge/skills/flows-actors-llm-agent-invocation/references/framework-llm-agent-prompt-spec-api.md +214 -0
- package/dist/knowledge/skills/flows-actors-llm-agent-invocation/references/framework-llm-operation-and-model-api.md +195 -0
- package/dist/knowledge/skills/flows-actors-llm-agent-invocation/references/operation-key-selection.md +60 -0
- package/dist/knowledge/skills/frontend-cdn-publish/SKILL.md +237 -0
- package/dist/knowledge/skills/frontend-cdn-publish/references/cloudflare-and-operator-setup.md +56 -0
- package/dist/knowledge/skills/frontend-cdn-publish/references/framework-cdn-config-api.md +176 -0
- package/dist/knowledge/skills/i18n-label-generation/SKILL.md +261 -0
- package/dist/knowledge/skills/i18n-label-generation/references/framework-labelling-sections-api.md +67 -0
- package/dist/knowledge/skills/i18n-label-generation/references/label-placement.md +7 -0
- package/dist/knowledge/skills/i18n-rerun-pipeline/SKILL.md +269 -0
- package/dist/knowledge/skills/i18n-rerun-pipeline/references/framework-labelling-sections-api.md +67 -0
- package/dist/knowledge/skills/i18n-rerun-pipeline/references/i18n-routing.md +9 -0
- package/dist/knowledge/skills/i18n-translation-rerun/SKILL.md +245 -0
- package/dist/knowledge/skills/i18n-translation-rerun/references/framework-labelling-sections-api.md +67 -0
- package/dist/knowledge/skills/i18n-translation-rerun/references/translation-workflow.md +17 -0
- package/dist/knowledge/skills/infra-environment-config/SKILL.md +646 -0
- package/dist/knowledge/skills/infra-environment-config/references/framework-application-database-api.md +77 -0
- package/dist/knowledge/skills/infra-environment-config/references/framework-backing-services-api.md +282 -0
- package/dist/knowledge/skills/infra-environment-config/references/framework-environment-deployment-api.md +265 -0
- package/dist/knowledge/skills/infra-environment-config/references/infra-config-files.md +7 -0
- package/dist/knowledge/skills/journey-approve/SKILL.md +43 -0
- package/dist/knowledge/skills/journey-bootstrap-scope/SKILL.md +42 -0
- package/dist/knowledge/skills/journey-next/SKILL.md +42 -0
- package/dist/knowledge/skills/journey-report/SKILL.md +43 -0
- package/dist/knowledge/skills/journey-run/SKILL.md +55 -0
- package/dist/knowledge/skills/journey-status/SKILL.md +50 -0
- package/dist/knowledge/skills/local-environment-bootstrap/SKILL.md +370 -0
- package/dist/knowledge/skills/local-environment-bootstrap/references/initialization-recovery-recipe.md +50 -0
- package/dist/knowledge/skills/local-environment-bootstrap/references/local-environment-troubleshooting.md +409 -0
- package/dist/knowledge/skills/local-environment-bootstrap/references/wildo-cli-bootstrap-commands.md +247 -0
- package/dist/knowledge/skills/market-add-feature-benefit/SKILL.md +474 -0
- package/dist/knowledge/skills/market-add-feature-benefit/references/framework-feature-benefit-api.md +139 -0
- package/dist/knowledge/skills/market-alternatives/SKILL.md +543 -0
- package/dist/knowledge/skills/market-authoring-overview/SKILL.md +354 -0
- package/dist/knowledge/skills/market-authoring-overview/references/framework-market-references-api.md +138 -0
- package/dist/knowledge/skills/market-authoring-overview/references/framework-market-snapshot-api.md +129 -0
- package/dist/knowledge/skills/market-category/SKILL.md +290 -0
- package/dist/knowledge/skills/market-channels/SKILL.md +361 -0
- package/dist/knowledge/skills/market-companion-prompt-enrichment/SKILL.md +2752 -0
- package/dist/knowledge/skills/market-companion-prompt-enrichment/references/framework-companion-behavior-api.md +2443 -0
- package/dist/knowledge/skills/market-generation-cli/SKILL.md +1484 -0
- package/dist/knowledge/skills/market-generation-cli/references/framework-market-generation-cli.md +1230 -0
- package/dist/knowledge/skills/market-icp/SKILL.md +625 -0
- package/dist/knowledge/skills/market-jobs-pains-gains/SKILL.md +352 -0
- package/dist/knowledge/skills/market-message-templates-authoring/SKILL.md +415 -0
- package/dist/knowledge/skills/market-message-templates-authoring/references/framework-message-template-api.md +1439 -0
- package/dist/knowledge/skills/market-persona/SKILL.md +407 -0
- package/dist/knowledge/skills/market-positioning-authoring/SKILL.md +392 -0
- package/dist/knowledge/skills/market-positioning-authoring/references/framework-positioning-api.md +97 -0
- package/dist/knowledge/skills/market-proof-and-objection/SKILL.md +665 -0
- package/dist/knowledge/skills/market-scoring-interpretation/SKILL.md +620 -0
- package/dist/knowledge/skills/market-scoring-interpretation/references/framework-scoring-api.md +291 -0
- package/dist/knowledge/skills/market-snapshot-validation/SKILL.md +1706 -0
- package/dist/knowledge/skills/market-snapshot-validation/references/framework-snapshot-validation-api.md +1228 -0
- package/dist/knowledge/skills/market-tone-of-voice/SKILL.md +260 -0
- package/dist/knowledge/skills/market-triggers-and-journey/SKILL.md +579 -0
- package/dist/knowledge/skills/module-companion-exports/SKILL.md +318 -0
- package/dist/knowledge/skills/module-companion-exports/references/companion-exports-by-package.md +544 -0
- package/dist/knowledge/skills/module-registration/SKILL.md +212 -0
- package/dist/knowledge/skills/module-registration/references/framework-domain-modules-api.md +366 -0
- package/dist/knowledge/skills/module-registration/references/registry-files.md +9 -0
- package/dist/knowledge/skills/module-relationships/SKILL.md +523 -0
- package/dist/knowledge/skills/module-relationships/references/cross-resource-fk-checklist.md +7 -0
- package/dist/knowledge/skills/module-relationships/references/framework-resource-relationship-authoring-api.md +738 -0
- package/dist/knowledge/skills/pdf-template-authoring/SKILL.md +174 -0
- package/dist/knowledge/skills/pdf-template-authoring/references/framework-pdf-template-api.md +203 -0
- package/dist/knowledge/skills/pdf-template-authoring/references/framework-pdf-template-spec-api.md +62 -0
- package/dist/knowledge/skills/provider-frontend-file-picker/SKILL.md +239 -0
- package/dist/knowledge/skills/provider-frontend-file-picker/references/framework-file-provider-constraints-api.md +90 -0
- package/dist/knowledge/skills/provider-frontend-file-picker/references/framework-frontend-provider-module-api.md +50 -0
- package/dist/knowledge/skills/rate-limit-authoring/SKILL.md +652 -0
- package/dist/knowledge/skills/rate-limit-authoring/references/framework-rate-limit-policy-api.md +182 -0
- package/dist/knowledge/skills/rate-limit-authoring/references/scope-key-and-bucket-conventions.md +137 -0
- package/dist/knowledge/skills/resource-add-field/SKILL.md +272 -0
- package/dist/knowledge/skills/resource-add-field/examples/add-priority-field-to-todos.example.md +153 -0
- package/dist/knowledge/skills/resource-add-field/references/framework-field-cross-layer-api.md +845 -0
- package/dist/knowledge/skills/resource-add-module/SKILL.md +322 -0
- package/dist/knowledge/skills/resource-add-module/references/framework-new-module-wiring-api.md +67 -0
- package/dist/knowledge/skills/resource-add-module/references/module-scaffold-layout.md +15 -0
- package/dist/knowledge/skills/resource-add-resource/SKILL.md +222 -0
- package/dist/knowledge/skills/resource-add-resource/references/framework-new-resource-core-config-api.md +540 -0
- package/dist/knowledge/skills/resource-add-resource/references/scaffold-surfaces-checklist.md +25 -0
- package/dist/knowledge/skills/resource-config-wiring/SKILL.md +370 -0
- package/dist/knowledge/skills/resource-config-wiring/references/config-change-routing.md +11 -0
- package/dist/knowledge/skills/resource-config-wiring/references/framework-personal-data-declaration-api.md +622 -0
- package/dist/knowledge/skills/resource-config-wiring/references/framework-saas-models-operation-scope-enums-api.md +248 -0
- package/dist/knowledge/skills/resource-config-wiring/references/framework-saas-models-resource-config-api.md +1769 -0
- package/dist/knowledge/skills/resource-config-wiring/references/framework-system-access-reads-api.md +1209 -0
- package/dist/knowledge/skills/resource-custom-view/SKILL.md +228 -0
- package/dist/knowledge/skills/resource-custom-view/references/custom-view-contracts.md +693 -0
- package/dist/knowledge/skills/resource-external-data/SKILL.md +349 -0
- package/dist/knowledge/skills/resource-external-data/references/framework-external-data-pipeline-api.md +187 -0
- package/dist/knowledge/skills/resource-external-data/references/framework-http-api-binding-api.md +261 -0
- package/dist/knowledge/skills/resource-external-data/references/lane-selection.md +49 -0
- package/dist/knowledge/skills/resource-external-data/references/pipeline-destination-schema.md +43 -0
- package/dist/knowledge/skills/resource-mcp-tool-exposure/SKILL.md +308 -0
- package/dist/knowledge/skills/resource-mcp-tool-exposure/references/framework-named-mcp-servers-contract.md +166 -0
- package/dist/knowledge/skills/resource-mcp-tool-exposure/references/framework-resource-mcp-exposure-contract.md +63 -0
- package/dist/knowledge/skills/resource-mcp-tool-exposure/references/mcp-catalogue-withdrawal-and-verification.md +77 -0
- package/dist/knowledge/skills/resource-mcp-tool-exposure/references/mcp-client-registration-postures.md +90 -0
- package/dist/knowledge/skills/resource-rag-source-fields/SKILL.md +424 -0
- package/dist/knowledge/skills/resource-rag-source-fields/references/corpus-field-selection.md +90 -0
- package/dist/knowledge/skills/resource-rag-source-fields/references/framework-embeddings-capability-api.md +261 -0
- package/dist/knowledge/skills/resource-rag-source-fields/references/framework-file-rag-source-api.md +117 -0
- package/dist/knowledge/skills/resource-rag-source-fields/references/framework-rag-retrieval-api.md +597 -0
- package/dist/knowledge/skills/resource-rag-source-fields/references/framework-rag-source-decorator-api.md +181 -0
- package/dist/knowledge/skills/resource-schema-authoring/SKILL.md +318 -0
- package/dist/knowledge/skills/resource-schema-authoring/examples/add-enum-field-with-ui.example.md +132 -0
- package/dist/knowledge/skills/resource-schema-authoring/examples/basic-resource-schema.example.md +62 -0
- package/dist/knowledge/skills/resource-schema-authoring/references/decorator-layer-map.md +63 -0
- package/dist/knowledge/skills/resource-schema-authoring/references/field-type-selection.md +70 -0
- package/dist/knowledge/skills/resource-schema-authoring/references/framework-decorator-vocabulary-api.md +559 -0
- package/dist/knowledge/skills/resource-schema-authoring/references/framework-personal-data-category-api.md +245 -0
- package/dist/knowledge/skills/resource-schema-authoring/references/framework-polymorphic-resources-api.md +147 -0
- package/dist/knowledge/skills/resource-schema-authoring/references/framework-schema-family-api.md +247 -0
- package/dist/knowledge/skills/resource-schema-authoring/references/framework-shared-decorator-methods-api.md +164 -0
- package/dist/knowledge/skills/resource-schema-authoring/references/framework-shared-structural-params-api.md +327 -0
- package/dist/knowledge/skills/resource-schema-authoring/references/framework-special-factories-api.md +1286 -0
- package/dist/knowledge/skills/resource-schema-authoring/references/framework-zod-lifecycle-and-chainable-api.md +1080 -0
- package/dist/knowledge/skills/resource-schema-authoring/references/polymorphic-per-scope-resources.md +75 -0
- package/dist/knowledge/skills/resource-schema-authoring/references/schema-variants-and-discriminators.md +62 -0
- package/dist/knowledge/skills/resource-schema-authoring/references/shared-layer-decorator-checklist.md +69 -0
- package/dist/knowledge/skills/resource-schema-authoring/references/special-factories.md +45 -0
- package/dist/knowledge/skills/resource-ui-behavior/SKILL.md +389 -0
- package/dist/knowledge/skills/resource-ui-behavior/references/framework-conditional-visibility-api.md +106 -0
- package/dist/knowledge/skills/resource-ui-behavior/references/framework-display-edit-modes-api.md +176 -0
- package/dist/knowledge/skills/resource-ui-behavior/references/framework-enum-frontend-handling-api.md +103 -0
- package/dist/knowledge/skills/resource-ui-behavior/references/framework-foreign-key-ui-api.md +97 -0
- package/dist/knowledge/skills/resource-ui-behavior/references/framework-frontend-resource-ui-contracts-api.md +839 -0
- package/dist/knowledge/skills/resource-ui-behavior/references/framework-per-primitive-ui-api.md +461 -0
- package/dist/knowledge/skills/resource-ui-behavior/references/framework-primitive-ui-api.md +125 -0
- package/dist/knowledge/skills/resource-ui-behavior/references/framework-related-resource-embeds-api.md +245 -0
- package/dist/knowledge/skills/resource-ui-behavior/references/framework-resource-layout-templates-api.md +302 -0
- package/dist/knowledge/skills/resource-ui-behavior/references/ui-layer-boundaries.md +13 -0
- package/dist/knowledge/skills/seeding-authoring/SKILL.md +569 -0
- package/dist/knowledge/skills/seeding-authoring/references/data-seeding-mode-picker.md +154 -0
- package/dist/knowledge/skills/seeding-authoring/references/framework-data-seeding-api.md +176 -0
- package/dist/knowledge/skills/seeding-operations/SKILL.md +505 -0
- package/dist/knowledge/skills/seeding-operations/references/data-seeding-admin-runbook.md +337 -0
- package/dist/knowledge/skills/seeding-operations/references/data-seeding-cron-scheduler.md +171 -0
- package/dist/knowledge/skills/seeding-operations/references/framework-data-seeding-operations-api.md +662 -0
- package/dist/knowledge/skills/settings-placement-authoring/SKILL.md +134 -0
- package/dist/knowledge/skills/settings-placement-authoring/references/framework-settings-destinations-catalog.md +65 -0
- package/dist/knowledge/skills/settings-placement-authoring/references/framework-settings-placement-api.md +127 -0
- package/dist/knowledge/skills/spec-catalog-authoring/SKILL.md +726 -0
- package/dist/knowledge/skills/spec-catalog-authoring/references/catalog-spec-pattern-overview.md +242 -0
- package/dist/knowledge/skills/spec-companion-exports/SKILL.md +362 -0
- package/dist/knowledge/skills/spec-companion-exports/references/companion-export-checklist.md +8 -0
- package/dist/knowledge/skills/spec-companion-exports/references/framework-companion-exports-contract-api.md +533 -0
- package/dist/knowledge/skills/spec-component-update/SKILL.md +315 -0
- package/dist/knowledge/skills/spec-component-update/references/component-spec-props.md +8 -0
- package/dist/knowledge/skills/spec-component-update/references/framework-frontend-component-spec-api.md +481 -0
- package/dist/knowledge/skills/spec-composite-view-update/SKILL.md +283 -0
- package/dist/knowledge/skills/spec-composite-view-update/references/composite-spec-sections.md +5 -0
- package/dist/knowledge/skills/spec-composite-view-update/references/framework-composite-view-specification-api.md +51 -0
- package/dist/knowledge/skills/spec-family-update/SKILL.md +300 -0
- package/dist/knowledge/skills/spec-family-update/references/family-spec-routing.md +13 -0
- package/dist/knowledge/skills/spec-family-update/references/framework-error-message-specifications-api.md +108 -0
- package/dist/knowledge/skills/spec-family-update/references/framework-family-specifications-api.md +111 -0
- package/dist/knowledge/skills/spec-feature-update/SKILL.md +306 -0
- package/dist/knowledge/skills/spec-feature-update/references/feature-spec-scope.md +5 -0
- package/dist/knowledge/skills/spec-feature-update/references/framework-feature-specification-api.md +95 -0
- package/dist/knowledge/skills/spec-resource-update/SKILL.md +220 -0
- package/dist/knowledge/skills/spec-resource-update/references/framework-field-spec-params-api.md +319 -0
- package/dist/knowledge/skills/spec-resource-update/references/framework-spec-resource-contracts-api.md +2610 -0
- package/dist/knowledge/skills/spec-resource-update/references/resource-spec-field-routing.md +12 -0
- package/dist/knowledge/skills/spec-update-after-change/SKILL.md +195 -0
- package/dist/knowledge/skills/spec-update-after-change/references/framework-spec-factory-api.md +173 -0
- package/dist/knowledge/skills/spec-update-after-change/references/spec-maintenance-by-surface.md +33 -0
- package/dist/knowledge/skills/spec-update-after-change/references/surface-to-spec-routing.md +14 -0
- package/dist/knowledge/skills/views-add-composite-view/SKILL.md +259 -0
- package/dist/knowledge/skills/views-add-composite-view/references/composite-view-routing.md +10 -0
- package/dist/knowledge/skills/views-add-composite-view/references/framework-inserted-view-identity-api.md +151 -0
- package/dist/knowledge/skills/views-add-custom-view/SKILL.md +225 -0
- package/dist/knowledge/skills/views-add-custom-view/references/custom-view-routing.md +10 -0
- package/dist/knowledge/skills/views-add-custom-view/references/framework-view-scope-and-full-custom-api.md +107 -0
- package/dist/knowledge/skills/views-app-level/SKILL.md +201 -0
- package/dist/knowledge/skills/views-app-level/references/app-level-views-routing.md +9 -0
- package/dist/knowledge/skills/views-app-level/references/framework-view-scope-and-full-custom-api.md +107 -0
- package/dist/knowledge/skills/views-chart-authoring/SKILL.md +264 -0
- package/dist/knowledge/skills/views-chart-authoring/references/chart-view-checklist.md +7 -0
- package/dist/knowledge/skills/views-chart-authoring/references/framework-chart-view-contracts-api.md +82 -0
- package/dist/knowledge/skills/views-chart-authoring/references/framework-inserted-view-identity-api.md +152 -0
- package/dist/knowledge/skills/views-composite-authoring/SKILL.md +302 -0
- package/dist/knowledge/skills/views-composite-authoring/references/composite-embedding-checklist.md +23 -0
- package/dist/knowledge/skills/views-composite-authoring/references/framework-composite-view-contracts-api.md +133 -0
- package/dist/knowledge/skills/views-composite-authoring/references/framework-inserted-view-identity-api.md +152 -0
- package/dist/knowledge/skills/views-execution-authoring/SKILL.md +209 -0
- package/dist/knowledge/skills/views-execution-authoring/references/execution-view-checklist.md +7 -0
- package/dist/knowledge/skills/views-execution-authoring/references/framework-execution-view-contracts-api.md +389 -0
- package/dist/knowledge/skills/views-execution-authoring/references/framework-inserted-view-identity-api.md +152 -0
- package/dist/knowledge/skills/website-anonymous-session/SKILL.md +444 -0
- package/dist/knowledge/skills/website-blog-authoring/SKILL.md +587 -0
- package/dist/knowledge/skills/website-blog-authoring/references/blog-adapter-api.md +1426 -0
- package/dist/knowledge/skills/website-bundle-discipline/SKILL.md +553 -0
- package/dist/knowledge/skills/website-bundle-discipline/references/example-website-button-override.md +52 -0
- package/dist/knowledge/skills/website-bundle-discipline/references/website-bundle-rules.md +357 -0
- package/dist/knowledge/skills/website-consent-gate-overrides/SKILL.md +511 -0
- package/dist/knowledge/skills/website-factory-advanced/SKILL.md +376 -0
- package/dist/knowledge/skills/website-inbound-contact-forms/SKILL.md +304 -0
- package/dist/knowledge/skills/website-label-pack/SKILL.md +390 -0
- package/dist/knowledge/skills/website-layout-overrides/SKILL.md +461 -0
- package/dist/knowledge/skills/website-marketing-metadata-extension/SKILL.md +264 -0
- package/dist/knowledge/skills/website-navigation-authoring/SKILL.md +414 -0
- package/dist/knowledge/skills/website-navigation-authoring/references/worked-examples-header-footer.md +366 -0
- package/dist/knowledge/skills/website-page-authoring/SKILL.md +420 -0
- package/dist/knowledge/skills/website-page-variants/SKILL.md +256 -0
- package/dist/knowledge/skills/website-primitive-overrides/SKILL.md +302 -0
- package/dist/knowledge/skills/website-section-contact/SKILL.md +950 -0
- package/dist/knowledge/skills/website-section-contact/references/define-website-section-api.md +579 -0
- package/dist/knowledge/skills/website-section-cta/SKILL.md +822 -0
- package/dist/knowledge/skills/website-section-cta/references/define-website-section-api.md +579 -0
- package/dist/knowledge/skills/website-section-faq/SKILL.md +917 -0
- package/dist/knowledge/skills/website-section-faq/references/define-website-section-api.md +579 -0
- package/dist/knowledge/skills/website-section-feature-benefit-summary/SKILL.md +878 -0
- package/dist/knowledge/skills/website-section-feature-benefit-summary/references/define-website-section-api.md +579 -0
- package/dist/knowledge/skills/website-section-feature-detail/SKILL.md +895 -0
- package/dist/knowledge/skills/website-section-feature-detail/references/define-website-section-api.md +579 -0
- package/dist/knowledge/skills/website-section-footer-cta/SKILL.md +814 -0
- package/dist/knowledge/skills/website-section-footer-cta/references/define-website-section-api.md +579 -0
- package/dist/knowledge/skills/website-section-hero/SKILL.md +944 -0
- package/dist/knowledge/skills/website-section-hero/references/define-website-section-api.md +583 -0
- package/dist/knowledge/skills/website-section-pricing/SKILL.md +934 -0
- package/dist/knowledge/skills/website-section-pricing/references/define-website-section-api.md +579 -0
- package/dist/knowledge/skills/website-section-social-proof/SKILL.md +912 -0
- package/dist/knowledge/skills/website-section-social-proof/references/define-website-section-api.md +579 -0
- package/dist/knowledge/skills/website-seo-aeo-geo/SKILL.md +624 -0
- package/dist/knowledge/skills/website-seo-aeo-geo/references/aeo-api.md +633 -0
- package/dist/knowledge/skills/website-seo-aeo-geo/references/geo-api.md +193 -0
- package/dist/knowledge/skills/website-seo-aeo-geo/references/seo-api.md +790 -0
- package/dist/knowledge/topic-index.json +17510 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +49 -0
|
@@ -0,0 +1,1769 @@
|
|
|
1
|
+
# Framework — `resources-config` types (saas-models)
|
|
2
|
+
|
|
3
|
+
Source-backed excerpts for authoring `*.resources-config.ts`: identity, data modes, operation shapes, transactional token generation, builder params, full `ResourceConfiguration`, `ResourcesRegistry`, the relational-search descriptor for a SEARCH op's `searchableFields`, and the label-forwarding descriptor (`forwardedLabel`) that labels a row by a related resource's fields.
|
|
4
|
+
|
|
5
|
+
## Import Origins
|
|
6
|
+
|
|
7
|
+
- `@wildo-ai/saas-models`
|
|
8
|
+
|
|
9
|
+
## Source Excerpts
|
|
10
|
+
|
|
11
|
+
### Origin Package: `@wildo-ai/saas-models`
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
*
|
|
15
|
+
* Core CRUD and collection operations every resource may expose.
|
|
16
|
+
*
|
|
17
|
+
* @remarks Import from `@wildo-ai/saas-models`. App `resources-config` picks a
|
|
18
|
+
* subset via `coreOperations` and adds `customOperation` identifiers.
|
|
19
|
+
*/
|
|
20
|
+
export enum CoreResourceOperation {
|
|
21
|
+
READ = 'read', // View/retrieve existing resource
|
|
22
|
+
UPDATE = 'update', // Update existing resource
|
|
23
|
+
UPDATE_MANY = 'update_many', // Update multiple resources
|
|
24
|
+
DELETE = 'delete', // Remove resource
|
|
25
|
+
DELETE_MANY = 'delete_many', // Delete multiple resources
|
|
26
|
+
CREATE = 'create', // Create new resource
|
|
27
|
+
CREATE_MANY = 'create_many', // Create multiple resources
|
|
28
|
+
LIST = 'list', // List/search multiple resources
|
|
29
|
+
SEARCH = 'search', // Search resources with advanced filtering
|
|
30
|
+
COUNT = 'count', // Count resources matching criteria
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export const ALL_CORE_OPERATIONS = Object.values(CoreResourceOperation);
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Collection operations that operate on collections rather than specific resources.
|
|
37
|
+
* These operations don't require a resource ID and authorization is based on roles + parent scope.
|
|
38
|
+
*/
|
|
39
|
+
export const COLLECTION_OPERATIONS_WITHOUT_IDS: CoreResourceOperation[] = [
|
|
40
|
+
CoreResourceOperation.LIST,
|
|
41
|
+
CoreResourceOperation.CREATE,
|
|
42
|
+
CoreResourceOperation.CREATE_MANY,
|
|
43
|
+
CoreResourceOperation.SEARCH,
|
|
44
|
+
CoreResourceOperation.COUNT,
|
|
45
|
+
];
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Collection operations that may require resource IDs in the request body or query parameters.
|
|
49
|
+
* These operations operate on collections but may filter/update/delete specific resources by ID.
|
|
50
|
+
*/
|
|
51
|
+
export const COLLECTION_OPERATIONS_WITH_ID: CoreResourceOperation[] = [
|
|
52
|
+
CoreResourceOperation.UPDATE_MANY,
|
|
53
|
+
CoreResourceOperation.DELETE_MANY,
|
|
54
|
+
];
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* All collection operations (both with and without IDs).
|
|
58
|
+
* These operations operate on collections rather than specific resources.
|
|
59
|
+
* Used for URL building to determine if an operation needs an entity ID in the URL path.
|
|
60
|
+
*/
|
|
61
|
+
export const ALL_COLLECTION_OPERATIONS: CoreResourceOperation[] = [
|
|
62
|
+
...COLLECTION_OPERATIONS_WITHOUT_IDS,
|
|
63
|
+
...COLLECTION_OPERATIONS_WITH_ID,
|
|
64
|
+
];
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Operations that return array responses (multiple resources).
|
|
68
|
+
* Used for validation and transformation logic that needs to handle arrays.
|
|
69
|
+
*/
|
|
70
|
+
export const ARRAY_RESPONSE_OPERATIONS: CoreResourceOperation[] = [
|
|
71
|
+
CoreResourceOperation.LIST,
|
|
72
|
+
CoreResourceOperation.DELETE_MANY,
|
|
73
|
+
CoreResourceOperation.UPDATE_MANY,
|
|
74
|
+
CoreResourceOperation.CREATE_MANY,
|
|
75
|
+
];
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Operations that don't require request body validation.
|
|
79
|
+
* These operations use IDs from execution context or query parameters, not from request body.
|
|
80
|
+
*/
|
|
81
|
+
export const OPERATIONS_WITHOUT_REQUEST_BODY: CoreResourceOperation[] = [
|
|
82
|
+
CoreResourceOperation.READ,
|
|
83
|
+
CoreResourceOperation.LIST,
|
|
84
|
+
CoreResourceOperation.DELETE,
|
|
85
|
+
CoreResourceOperation.COUNT,
|
|
86
|
+
CoreResourceOperation.SEARCH,
|
|
87
|
+
];
|
|
88
|
+
```
|
|
89
|
+
## Import Origins
|
|
90
|
+
|
|
91
|
+
- `@wildo-ai/saas-models`
|
|
92
|
+
|
|
93
|
+
## Source Excerpts
|
|
94
|
+
|
|
95
|
+
### Origin Package: `@wildo-ai/saas-models`
|
|
96
|
+
|
|
97
|
+
```typescript
|
|
98
|
+
*
|
|
99
|
+
* Resource Type Schema (Core + Custom)
|
|
100
|
+
*
|
|
101
|
+
* @remarks Import from `@wildo-ai/saas-models`. Custom app resources use
|
|
102
|
+
* string literals beyond `CoreResourceType`.
|
|
103
|
+
*/
|
|
104
|
+
export const ResourceTypeSchema = z.union([
|
|
105
|
+
z.enum(CoreResourceType),
|
|
106
|
+
z.string() // Custom resource types
|
|
107
|
+
]);
|
|
108
|
+
|
|
109
|
+
export type ResourceType = z.infer<typeof ResourceTypeSchema>;
|
|
110
|
+
```
|
|
111
|
+
## Import Origins
|
|
112
|
+
|
|
113
|
+
- `@wildo-ai/saas-models`
|
|
114
|
+
|
|
115
|
+
## Source Excerpts
|
|
116
|
+
|
|
117
|
+
### Origin Package: `@wildo-ai/saas-models`
|
|
118
|
+
|
|
119
|
+
```typescript
|
|
120
|
+
*
|
|
121
|
+
* FK / primary-key field identifier string for a resource (core or custom).
|
|
122
|
+
*
|
|
123
|
+
* @remarks Import from `@wildo-ai/saas-models`.
|
|
124
|
+
*/
|
|
125
|
+
export const ResourceFieldIdentifierSchema = z.union([
|
|
126
|
+
z.string().refine((value) => Object.values(coreResourceShared_FieldIdentifier).includes(value), {
|
|
127
|
+
message: "Must be a valid core resource field identifier"
|
|
128
|
+
}),
|
|
129
|
+
z.string() // Custom resource field identifiers
|
|
130
|
+
]);
|
|
131
|
+
|
|
132
|
+
export type ResourceFieldIdentifier = z.infer<typeof ResourceFieldIdentifierSchema>;
|
|
133
|
+
```
|
|
134
|
+
## Import Origins
|
|
135
|
+
|
|
136
|
+
- `@wildo-ai/saas-models`
|
|
137
|
+
|
|
138
|
+
## Source Excerpts
|
|
139
|
+
|
|
140
|
+
### Origin Package: `@wildo-ai/saas-models`
|
|
141
|
+
|
|
142
|
+
```typescript
|
|
143
|
+
*
|
|
144
|
+
* Data mode for read/list operations — controls API data shape.
|
|
145
|
+
* SUMMARY = backend returns only `isSummaryField()` fields and populates `isSummaryField({ populate: true })` FKs.
|
|
146
|
+
*
|
|
147
|
+
* Note: "summary" here is about *data shape*, not FK rendering (see ForeignKeyDisplayMode.SUMMARY)
|
|
148
|
+
* or operation bar density (see ResourceOperationDisplayMode.SUMMARY).
|
|
149
|
+
* Values are lowercase strings matching URL/serialization format directly.
|
|
150
|
+
*
|
|
151
|
+
* @remarks Import from `@wildo-ai/saas-models`. Used by read/list/search configs and DTO shaping.
|
|
152
|
+
*/
|
|
153
|
+
export enum DataMode {
|
|
154
|
+
/** All stored fields, no population */
|
|
155
|
+
RAW = 'raw',
|
|
156
|
+
|
|
157
|
+
/** isSummaryField fields only, populate isSummaryField({ populate: true }) FKs */
|
|
158
|
+
SUMMARY = 'summary',
|
|
159
|
+
|
|
160
|
+
/** All fields, populate based on contextPolicy */
|
|
161
|
+
CONTEXT = 'context'
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// --------------------------------
|
|
165
|
+
// Persistence Adapter (Database Type)
|
|
166
|
+
// --------------------------------
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Canonical persistence adapters supported by the resource system.
|
|
170
|
+
*
|
|
171
|
+
* Determines which backing store serves a resource's rows:
|
|
172
|
+
* - `mongodb`: MongoDB with Mongoose ORM (platform-provisioned)
|
|
173
|
+
* - `postgresql`: PostgreSQL SQL adapter (platform-provisioned)
|
|
174
|
+
* - `http-api`: a system reached over an authenticated HTTP API (OData or REST/JSON dialect) —
|
|
175
|
+
* the platform provisions NOTHING for it; rows are queried on demand
|
|
176
|
+
*
|
|
177
|
+
* If not specified at resource level, uses `appConfig.database.defaultAdapter`.
|
|
178
|
+
*/
|
|
179
|
+
/**
|
|
180
|
+
* What an INTROSPECTION-backed resource projects.
|
|
181
|
+
*
|
|
182
|
+
* Declared BY THE AUTHOR beside the resource, exactly as `httpApiBinding` is, and for the same
|
|
183
|
+
* reason: the adapter answers "how rows are reached", and everything specific to THIS resource's
|
|
184
|
+
* reach is a typed declaration rather than runtime inference.
|
|
185
|
+
*
|
|
186
|
+
* Keeping it here rather than in a companion-side lookup table matters. A table keyed by resource
|
|
187
|
+
* type would be a second enumeration of a population the resource configs already define — the
|
|
188
|
+
* shape that silently drifts when one side gains an entry.
|
|
189
|
+
*/
|
|
190
|
+
export enum IntrospectionTenancyStance {
|
|
191
|
+
/**
|
|
192
|
+
* The rows describe the APPLICATION'S OWN STRUCTURE — its modules, resource specifications,
|
|
193
|
+
* design system, compliance declarations — and carry no tenant dimension, so there is nothing for
|
|
194
|
+
* a contextual scope predicate to filter on.
|
|
195
|
+
*
|
|
196
|
+
* This is the only stance implemented, and it is declared rather than inferred for the reason
|
|
197
|
+
* `HttpApiTenancyStance` gives for its own: an unstated stance is indistinguishable from an
|
|
198
|
+
* overlooked one. Every other repository enforces scoping ITSELF — Mongo and PostgreSQL through
|
|
199
|
+
* `buildContextualFilter`, HTTP_API through its tenancy stance — so a read-through adapter that
|
|
200
|
+
* simply returned whatever its source produced would be the one backing kind with no scoping
|
|
201
|
+
* story, and nobody would be asked to notice.
|
|
202
|
+
*/
|
|
203
|
+
APPLICATION_STRUCTURE = 'application-structure',
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* The rows carry a tenant dimension and a scope predicate must be pushed into the source.
|
|
207
|
+
*
|
|
208
|
+
* REFUSED AT REGISTRATION today: no introspection behavior takes a scope argument, so the engine
|
|
209
|
+
* has nothing to push down. Declared as a member rather than omitted so the refusal is explicit
|
|
210
|
+
* and a future scoped behavior is a deliberate design step — the alternative is that the first
|
|
211
|
+
* author needing it discovers the gap by shipping unscoped rows.
|
|
212
|
+
*/
|
|
213
|
+
SCOPE_FILTER_PUSHDOWN = 'scope-filter-pushdown',
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
export interface IntrospectionResourceBinding {
|
|
217
|
+
/**
|
|
218
|
+
* The companion introspection behavior whose output becomes this resource's rows.
|
|
219
|
+
*
|
|
220
|
+
* A plain string on purpose: the behavior catalog lives in the companion (23 behaviors as of
|
|
221
|
+
* 2026-08-29) and the engine must not depend on it. An unknown id is refused by the companion at
|
|
222
|
+
* read time, naming the id and the supported set.
|
|
223
|
+
*/
|
|
224
|
+
readonly behavior: string;
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Path into the behavior's result that holds the rows, dot-separated. Omitted means the result
|
|
228
|
+
* itself is the row collection.
|
|
229
|
+
*
|
|
230
|
+
* Behaviors answer their own natural shape — `{ frontendChartRegistrationRefs: [...] }` — and
|
|
231
|
+
* teaching each one to answer a uniform envelope would change 23 working behaviors to suit a
|
|
232
|
+
* consumer that arrived later.
|
|
233
|
+
*/
|
|
234
|
+
readonly rowsPath?: string;
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* REQUIRED. Why these rows need no contextual scope predicate, or that they do.
|
|
238
|
+
*
|
|
239
|
+
* Not optional and not defaulted: a default would make "nobody thought about tenancy" and
|
|
240
|
+
* "tenancy does not apply here" the same declaration.
|
|
241
|
+
*/
|
|
242
|
+
readonly tenancy: IntrospectionTenancyStance;
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* Fields whose values COMPOSE each row's primary key, in order, when the behavior's rows carry no
|
|
246
|
+
* identifier of their own.
|
|
247
|
+
*
|
|
248
|
+
* Most introspection behaviors answer structural projections rather than records: a module row
|
|
249
|
+
* carries `moduleId` and needs nothing here, while a relationship row carries only the two
|
|
250
|
+
* resource types it joins. Without a key such a resource can be LISTed and never READ, because
|
|
251
|
+
* there is no value to address a row by.
|
|
252
|
+
*
|
|
253
|
+
* Composition is DECLARED rather than derived because only the author knows which fields are
|
|
254
|
+
* jointly unique for a given behavior — and being wrong is not hypothetical. `resourceType1` +
|
|
255
|
+
* `resourceType2` is unique across all 16 relationships in the dogfood application and is still
|
|
256
|
+
* unsafe in general, since the framework permits several edges between the same pair (a junction
|
|
257
|
+
* with two roles, a self-relationship). So the source FAILS LOUDLY when two rows compose the same
|
|
258
|
+
* key rather than serving both under one id, which would make READ return an arbitrary one of
|
|
259
|
+
* them and give no sign anything was wrong.
|
|
260
|
+
*
|
|
261
|
+
* The composed value is written to the resource's own `resourceFieldIdentifier`, which is the one
|
|
262
|
+
* key name resolvable from the registry without introspecting the schema's decorators. A resource
|
|
263
|
+
* declaring `identityFields` must therefore name that field as its primary key.
|
|
264
|
+
*
|
|
265
|
+
* The values are joined verbatim, so the key stays READABLE — `workspace__users__createdByUserId`
|
|
266
|
+
* rather than an opaque hash. That is possible because an INTROSPECTION-backed resource resolves
|
|
267
|
+
* to `ResourceIdFormat.INTROSPECTION_SYNTHESIZED`, which admits a URL-safe charset instead of the
|
|
268
|
+
* ObjectId-or-UUID rule platform rows follow.
|
|
269
|
+
*
|
|
270
|
+
* It was briefly a deterministic UUIDv5, before that format existed. Hashing worked and was the
|
|
271
|
+
* wrong trade: it made every id opaque, and it disguised the real property — a DERIVED id is only
|
|
272
|
+
* as stable as the fields it is derived from, and hiding that behind a hash removes the reader's
|
|
273
|
+
* ability to notice when a row's identity moves.
|
|
274
|
+
*
|
|
275
|
+
* Each value must be URL-safe (`[a-zA-Z0-9_-]`) and the whole key at most 255 characters; the
|
|
276
|
+
* source refuses per row rather than emitting a key that lists and cannot be read.
|
|
277
|
+
*
|
|
278
|
+
* Omit when the behavior's rows already carry an identifier of their own.
|
|
279
|
+
*/
|
|
280
|
+
readonly identityFields?: readonly string[];
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
export enum PersistenceAdapter {
|
|
284
|
+
MONGODB = 'mongodb',
|
|
285
|
+
POSTGRESQL = 'postgresql',
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Rows are DERIVED on demand by asking the running dev companion to introspect the application —
|
|
289
|
+
* its resource registry, specifications, design system, compliance facts, assertions, market and
|
|
290
|
+
* persona context. Nothing is stored: every read recomputes.
|
|
291
|
+
*
|
|
292
|
+
* ## Why this is an adapter and not a service call
|
|
293
|
+
*
|
|
294
|
+
* The companion already computes all of it — 23 named introspection behaviors — and today each is
|
|
295
|
+
* reachable only through a bespoke route. Making it an adapter is what turns those behaviors into
|
|
296
|
+
* ordinary RESOURCES: list, read, filter, search, labels, navigation, all generated, with no
|
|
297
|
+
* per-behavior UI. That is the same argument `HTTP_API` settled on 2026-08-26 — the adapter answers
|
|
298
|
+
* "how rows are reached", and the mechanism behind it is a binding an author declares.
|
|
299
|
+
*
|
|
300
|
+
* Distinct from `HTTP_API`, deliberately, and not merely because the transport differs. Retrieval
|
|
301
|
+
* is a SUBPROCESS that imports the target application's built modules; it costs seconds rather than
|
|
302
|
+
* milliseconds, it requires that application's `dist` to exist, and its failure mode is a behavior
|
|
303
|
+
* throwing rather than a row being absent. Collapsing the two would give one declaration whose
|
|
304
|
+
* discriminator chooses between an HTTP call and a subprocess — two adapters wearing one name.
|
|
305
|
+
*
|
|
306
|
+
* ## What every adapter decision site must honor
|
|
307
|
+
*
|
|
308
|
+
* - **READ-ONLY, absolutely.** There is no writable target: a row is a projection of the
|
|
309
|
+
* application's own source. Every write method refuses, as `HTTP_API`'s twelve do.
|
|
310
|
+
* - **No provisioning, migration or schema surface.** Nothing is stored, so there is nothing to
|
|
311
|
+
* create, migrate or verify — the platform must never believe it owns a store here.
|
|
312
|
+
* - **Never a legal application-wide DEFAULT adapter.** It is a per-resource declaration only;
|
|
313
|
+
* an application whose default was introspection could persist nothing at all.
|
|
314
|
+
* - **It must DEGRADE, never fail closed at boot.** The companion is the only thing that can run
|
|
315
|
+
* an introspection behavior, so a boot path that refuses on an introspection failure would need
|
|
316
|
+
* the companion to fix the companion — see `continuity-drift-and-cas-basis.md` Rule 3.
|
|
317
|
+
*/
|
|
318
|
+
INTROSPECTION = 'introspection',
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* Rows live in a system reached over an authenticated HTTP API and are queried on demand
|
|
322
|
+
* (read-through). Decided 2026-08-26 (ETL workstream, D1): this IS a persistence-adapter answer
|
|
323
|
+
* — "how rows are reached" — not a separate axis; the dialect (OData vs REST/JSON-RPC) and every
|
|
324
|
+
* other binding property live in the REQUIRED companion declaration
|
|
325
|
+
* (`HttpApiResourceBindingSchema`, published by `@wildo-ai/saas-models/external-data`).
|
|
326
|
+
*
|
|
327
|
+
* ## Why that companion lives in a SHARED package at all (asked 2026-08-29, measured not argued)
|
|
328
|
+
*
|
|
329
|
+
* Only the backend has a runtime for it — 19 references there, none in any frontend package — so
|
|
330
|
+
* "surely this is backend-only" is the natural reading. It is wrong, for one decisive reason: an
|
|
331
|
+
* application author writes the binding in `*.resources-config.ts`, which lives in the app's
|
|
332
|
+
* `shared-lib`, and that package depends on `@wildo-ai/saas-models` and deliberately NOT on
|
|
333
|
+
* `@wildo-ai/saas-backend-lib` (the frontend imports `shared-lib`, so a backend dependency there
|
|
334
|
+
* would pull the backend graph browser-ward — the opposite of the isolation wanted). Moving the
|
|
335
|
+
* declaration to the backend would leave an author unable to type their own declaration.
|
|
336
|
+
*
|
|
337
|
+
* Nothing in that companion is runtime: dialects, tenancy, erasure, key fields, remote-call
|
|
338
|
+
* semantics are all typed by a human. The runtime that consumes them — read client, extraction
|
|
339
|
+
* source, transform, run service, batch — is already backend-only. So the tiers are already
|
|
340
|
+
* split where they should be; what was owed was SURFACE hygiene, which is why the companion is
|
|
341
|
+
* published by a subpath instead of the root barrel rather than moved.
|
|
342
|
+
*
|
|
343
|
+
* This asymmetry with MONGODB / POSTGRESQL is therefore principled, not accidental: those need
|
|
344
|
+
* no AUTHORED companion at all (their detail is infra config plus a runtime planner), while
|
|
345
|
+
* HTTP_API is the one adapter whose detail an app developer writes.
|
|
346
|
+
*
|
|
347
|
+
* Consequences every adapter decision site must honor explicitly (compile-forced via
|
|
348
|
+
* `PersistenceAdapterCases`):
|
|
349
|
+
* - provisioning/migration/schema surfaces have NOTHING to do — the platform does not own the
|
|
350
|
+
* store and must never mutate its schema;
|
|
351
|
+
* - it is never a legal application-wide DEFAULT adapter — only a per-resource declaration
|
|
352
|
+
* accompanied by its binding;
|
|
353
|
+
* - until the external repository ships, `createRepository()` refuses it loudly.
|
|
354
|
+
*/
|
|
355
|
+
HTTP_API = 'http-api',
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* String-value form accepted by authored resource configuration.
|
|
360
|
+
*
|
|
361
|
+
* This remains a string union so declarative configuration may use either the
|
|
362
|
+
* enum members or their serialized values, while deriving the vocabulary from
|
|
363
|
+
* the single canonical enum above.
|
|
364
|
+
*/
|
|
365
|
+
export type PersistenceAdapterType = `${PersistenceAdapter}`;
|
|
366
|
+
|
|
367
|
+
const PERSISTENCE_ADAPTER_VALUES: readonly string[] = Object.freeze(Object.values(PersistenceAdapter));
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* Runtime guard for persistence-adapter values entering through erased,
|
|
371
|
+
* serialized, or otherwise untyped configuration boundaries.
|
|
372
|
+
*
|
|
373
|
+
* Keeping this beside the canonical enum ensures future adapter additions are
|
|
374
|
+
* recognized by validation without duplicating a second vocabulary.
|
|
375
|
+
*/
|
|
376
|
+
export function isPersistenceAdapter(
|
|
377
|
+
value: unknown,
|
|
378
|
+
): value is PersistenceAdapterType {
|
|
379
|
+
return typeof value === 'string'
|
|
380
|
+
&& PERSISTENCE_ADAPTER_VALUES.includes(value);
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* Default persistence adapter when not specified.
|
|
385
|
+
*
|
|
386
|
+
* Typed as the ENUM member (not the string-union `PersistenceAdapterType`) so it satisfies
|
|
387
|
+
* enum-typed configuration fields directly; enum member types are assignable to the string
|
|
388
|
+
* union, so every union-typed consumer is unaffected.
|
|
389
|
+
*/
|
|
390
|
+
export const DEFAULT_PERSISTENCE_ADAPTER: PersistenceAdapter =
|
|
391
|
+
PersistenceAdapter.MONGODB;
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* A resource's declared relationship to CROSS-ADAPTER ATOMIC WRITE BOUNDARIES.
|
|
395
|
+
*
|
|
396
|
+
* **Why this exists.** An application is wholly one persistence adapter by default, and the
|
|
397
|
+
* resources registry REFUSES a per-resource `persistenceAdapter` that disagrees with
|
|
398
|
+
* `database.defaultAdapter`. That refusal protects exactly one property: a mixed application
|
|
399
|
+
* cannot commit two resources in one native transaction, so every cross-resource boundary
|
|
400
|
+
* silently degrades from atomic to at-least-once.
|
|
401
|
+
*
|
|
402
|
+
* The refusal is right as a DEFAULT and wrong as an absolute — some resources provably never
|
|
403
|
+
* participate in such a boundary, and for those the blanket refusal forbids a legitimate,
|
|
404
|
+
* safe deployment (a retrieval corpus whose vector tier only PostgreSQL can serve, say) with
|
|
405
|
+
* no way past it. Per `.claude/rules/design-philosophy.md`, a construct that refuses must ship
|
|
406
|
+
* the door in the same change: this enum IS that door. Declaring a member is a positive claim
|
|
407
|
+
* about the resource's write topology, made by its author, recorded in the config, and logged
|
|
408
|
+
* at registration — never an ambient tolerance and never a flag that merely silences an error.
|
|
409
|
+
*
|
|
410
|
+
* **This declaration is a claim, not an exemption.** It does not weaken any runtime guarantee:
|
|
411
|
+
* `ResourcePersistenceUnitOfWorkBackendService.assessCompatibility` still classifies any real
|
|
412
|
+
* boundary whose ATOMIC participants resolve to more than one adapter as
|
|
413
|
+
* `MIXED_PERSISTENCE_ADAPTERS`, and `executeInUnitOfWork` still THROWS on it. So a resource
|
|
414
|
+
* that declares a member here and then IS reached by a cross-adapter atomic boundary fails
|
|
415
|
+
* loudly at that boundary, exactly as it would have without the declaration. What the
|
|
416
|
+
* declaration buys is the right to boot; what it can never buy is a silent degradation.
|
|
417
|
+
*
|
|
418
|
+
* assurance-control: WILDO.DATA.TRANSACTIONAL_INTEGRITY — the declaration a resource must make
|
|
419
|
+
* before it may sit on a non-default persistence adapter.
|
|
420
|
+
*/
|
|
421
|
+
export enum ResourcePersistenceAdapterIsolation {
|
|
422
|
+
/**
|
|
423
|
+
* This resource participates in NO cross-adapter atomic write boundary.
|
|
424
|
+
*
|
|
425
|
+
* The author asserts that no operation commits this resource and a resource on another
|
|
426
|
+
* adapter inside one native transaction — neither as the subject of a
|
|
427
|
+
* `ResourcePersistenceUnitOfWork` boundary nor as a participant in someone else's.
|
|
428
|
+
*
|
|
429
|
+
* Legitimate when the resource is a self-contained store whose writes stand alone: a
|
|
430
|
+
* retrieval corpus, an append-only analytical sink, a projection rebuilt from its source
|
|
431
|
+
* rather than written beside it. It is NOT legitimate merely because no such boundary
|
|
432
|
+
* exists *today* — the claim is about the resource's design, and a later operation that
|
|
433
|
+
* makes it false must change the declaration rather than discover the refusal at runtime.
|
|
434
|
+
*/
|
|
435
|
+
NO_CROSS_ADAPTER_TRANSACTION = 'NO_CROSS_ADAPTER_TRANSACTION',
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* String-value form accepted by authored resource configuration, mirroring the
|
|
440
|
+
* {@link PersistenceAdapterType} convention so declarative config may use either the enum
|
|
441
|
+
* member or its serialized value.
|
|
442
|
+
*
|
|
443
|
+
* **Deliberately one member.** A second — "participates only as a COMPENSATABLE participant",
|
|
444
|
+
* mirroring the persistence unit of work's own
|
|
445
|
+
* `ResourcePersistenceParticipantCoupling.COMPENSATABLE` — is describable, but no resource is
|
|
446
|
+
* asking for it, and an admission path with no caller is an admission path with no coverage.
|
|
447
|
+
* Add it when a real resource needs it, with the compensating path named at its call site.
|
|
448
|
+
*/
|
|
449
|
+
export type ResourcePersistenceAdapterIsolationType = `${ResourcePersistenceAdapterIsolation}`;
|
|
450
|
+
|
|
451
|
+
const RESOURCE_PERSISTENCE_ADAPTER_ISOLATION_VALUES: readonly string[] =
|
|
452
|
+
Object.freeze(Object.values(ResourcePersistenceAdapterIsolation));
|
|
453
|
+
|
|
454
|
+
/**
|
|
455
|
+
* Runtime guard for isolation declarations entering through erased, serialized, or otherwise
|
|
456
|
+
* untyped configuration boundaries — which is exactly how the resources registry sees them, since
|
|
457
|
+
* it reads heterogeneous resource configurations through an erased index.
|
|
458
|
+
*
|
|
459
|
+
* Deliberately a MEMBERSHIP test rather than a presence test: the registry admits a non-default
|
|
460
|
+
* adapter only on a recognised member, so a typo, a stale value from an older vocabulary, or a
|
|
461
|
+
* truthy non-string cannot open the door. Fail-closed is the point — an unrecognised declaration
|
|
462
|
+
* is treated as no declaration at all, and the application is refused with the standard message.
|
|
463
|
+
*/
|
|
464
|
+
export function isResourcePersistenceAdapterIsolation(
|
|
465
|
+
value: unknown,
|
|
466
|
+
): value is ResourcePersistenceAdapterIsolationType {
|
|
467
|
+
return typeof value === 'string'
|
|
468
|
+
&& RESOURCE_PERSISTENCE_ADAPTER_ISOLATION_VALUES.includes(value);
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
/**
|
|
472
|
+
* Variant key constants for operation variants.
|
|
473
|
+
* Values are identical to DataMode.SUMMARY and DataMode.CONTEXT.
|
|
474
|
+
* Kept as a standalone constant for use in factory/controller code that
|
|
475
|
+
* deals with variant keys independently of DataMode.
|
|
476
|
+
*/
|
|
477
|
+
export const OPERATION_VARIANT_KEY = {
|
|
478
|
+
SUMMARY: 'summary',
|
|
479
|
+
CONTEXT: 'context',
|
|
480
|
+
} as const;
|
|
481
|
+
|
|
482
|
+
/**
|
|
483
|
+
* Convert DataMode to corresponding variant key.
|
|
484
|
+
* RAW mode has no variant (returns undefined).
|
|
485
|
+
* For SUMMARY/CONTEXT, the variant key equals the DataMode value directly.
|
|
486
|
+
*/
|
|
487
|
+
export function dataModeToVariantKey(dataMode: DataMode): string | undefined {
|
|
488
|
+
if (dataMode === DataMode.RAW) {
|
|
489
|
+
return undefined;
|
|
490
|
+
}
|
|
491
|
+
return dataMode;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
/**
|
|
495
|
+
* Options for read operations.
|
|
496
|
+
*/
|
|
497
|
+
export interface ReadOperationOptions {
|
|
498
|
+
/**
|
|
499
|
+
* Data mode controlling fields and population.
|
|
500
|
+
* @default DataMode.RAW
|
|
501
|
+
*/
|
|
502
|
+
dataMode?: DataMode;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
/**
|
|
506
|
+
* Options for list operations.
|
|
507
|
+
*/
|
|
508
|
+
export interface ListOperationOptions {
|
|
509
|
+
/**
|
|
510
|
+
* Data mode controlling fields and population.
|
|
511
|
+
* @default DataMode.RAW
|
|
512
|
+
*/
|
|
513
|
+
dataMode?: DataMode;
|
|
514
|
+
|
|
515
|
+
/**
|
|
516
|
+
* Whether to wrap in pagination container.
|
|
517
|
+
* @default false for internal, should be true for API responses
|
|
518
|
+
*/
|
|
519
|
+
paginated?: boolean;
|
|
520
|
+
|
|
521
|
+
/**
|
|
522
|
+
* Pagination parameters (required if paginated: true).
|
|
523
|
+
*/
|
|
524
|
+
pagination?: Resources_PaginationRequest;
|
|
525
|
+
}
|
|
526
|
+
```
|
|
527
|
+
## Import Origins
|
|
528
|
+
|
|
529
|
+
- `@wildo-ai/saas-models`
|
|
530
|
+
|
|
531
|
+
## Source Excerpts
|
|
532
|
+
|
|
533
|
+
### Origin Package: `@wildo-ai/saas-models`
|
|
534
|
+
|
|
535
|
+
```typescript
|
|
536
|
+
*
|
|
537
|
+
* Valid operation keys from core + custom enums, and builder params for `createResourceConfiguration`.
|
|
538
|
+
*/
|
|
539
|
+
// Helper type to extract valid operation keys, excluding undefined
|
|
540
|
+
export type ValidOperationKeys<
|
|
541
|
+
TCustomOperationEnum extends EnumLikeType | undefined,
|
|
542
|
+
TCoreOperationEnum extends Partial<CoreResourceOperation> | undefined
|
|
543
|
+
> = (TCustomOperationEnum extends EnumLikeType ? EnumValues<TCustomOperationEnum> : never) |
|
|
544
|
+
(TCoreOperationEnum extends Partial<CoreResourceOperation> ? TCoreOperationEnum : never);
|
|
545
|
+
|
|
546
|
+
/**
|
|
547
|
+
*
|
|
548
|
+
* Access mode for the ACL-bypassing system-context reads
|
|
549
|
+
* (`SystemAccessBackendService.readAsSystem` / `listAsSystem`, from
|
|
550
|
+
* `@wildo-ai/saas-backend-lib`).
|
|
551
|
+
*
|
|
552
|
+
* Those primitives run with a synthesised super-admin execution context and
|
|
553
|
+
* therefore SKIP the caller's scope and role checks entirely. A resource is
|
|
554
|
+
* readable that way ONLY if its resource configuration opts the verb in. Any
|
|
555
|
+
* verb left undeclared defaults to `FORBIDDEN`: a system read of a resource
|
|
556
|
+
* that has not opted in throws `ErrorType.CONFIGURATION` — the framework is
|
|
557
|
+
* fail-closed here by construction.
|
|
558
|
+
*/
|
|
559
|
+
export enum ResourceSystemAccessMode {
|
|
560
|
+
/** The verb's system-context primitive is rejected for this resource (default). */
|
|
561
|
+
FORBIDDEN = 'FORBIDDEN',
|
|
562
|
+
/** The verb's system-context primitive is permitted for this resource. */
|
|
563
|
+
ALLOWED = 'ALLOWED',
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
/**
|
|
567
|
+
* Per-resource opt-in policy for the ACL-bypassing system-context primitives
|
|
568
|
+
* on `SystemAccessBackendService`: the reads (`readAsSystem` / `listAsSystem`)
|
|
569
|
+
* and the trusted writes (`createAsSystem` / `updateAsSystem` /
|
|
570
|
+
* `updateManyAsSystem`).
|
|
571
|
+
*
|
|
572
|
+
* A system-context call does not REMOVE the authorization decision — it
|
|
573
|
+
* RELOCATES it from the resource ACL onto the calling service, which MUST
|
|
574
|
+
* enforce an explicit alternative check (e.g. consumable-token or
|
|
575
|
+
* email-ownership matching). Declaring this policy is the data owner's
|
|
576
|
+
* statement that such a bypass is permissible at all, and for which verb. An
|
|
577
|
+
* absent policy — or a verb set to (or left defaulting to) `FORBIDDEN` — makes
|
|
578
|
+
* the primitive throw.
|
|
579
|
+
*
|
|
580
|
+
* The WRITE verbs additionally let a trusted in-process caller persist the
|
|
581
|
+
* fields the client-shaped request DTO strips — `.isBackendOnly()` material
|
|
582
|
+
* (e.g. a credential `passwordHash`) and the context-auto-populated FKs (e.g.
|
|
583
|
+
* `userId` on a system resource that has no HTTP surface to seed it) — by
|
|
584
|
+
* re-attaching exactly those fields after the strict parse. They are the
|
|
585
|
+
* sanctioned path for engine flows like registration that must write system
|
|
586
|
+
* resources directly; opting a verb in is the data owner's acknowledgement that
|
|
587
|
+
* a super-admin-context mutation of this resource is legitimate.
|
|
588
|
+
*
|
|
589
|
+
* Caveats a system-context call inherits (it runs as super-admin), to weigh
|
|
590
|
+
* before opting in:
|
|
591
|
+
* - a READ returns the FULL record — every field, including ones a normal
|
|
592
|
+
* caller's role / field-visibility would hide — so never forward the result
|
|
593
|
+
* verbatim to an under-privileged caller; project only what is safe.
|
|
594
|
+
* - a WRITE bypasses the caller's scope + role ACL, so the calling service
|
|
595
|
+
* owns the authorization decision (only trusted engine code can reach the
|
|
596
|
+
* primitive — it is never exposed to an HTTP payload).
|
|
597
|
+
* - feature flags do not gate it (it is an internal request).
|
|
598
|
+
* - the policy is RESOURCE-LEVEL: for a polymorphic resource it is shared by
|
|
599
|
+
* every scope variant (declare it once on the shared config).
|
|
600
|
+
*
|
|
601
|
+
* Intentionally DISTINCT from `isSystemResource`: marking a resource as
|
|
602
|
+
* framework infrastructure does NOT imply that an ACL bypass is acceptable
|
|
603
|
+
* for its data. Keep the two concepts separate.
|
|
604
|
+
*/
|
|
605
|
+
export type ResourceSystemAccessPolicy = {
|
|
606
|
+
/** Governs `readAsSystem`. Omitted ⇒ FORBIDDEN. */
|
|
607
|
+
read?: ResourceSystemAccessMode,
|
|
608
|
+
/** Governs `listAsSystem`. Omitted ⇒ FORBIDDEN. */
|
|
609
|
+
list?: ResourceSystemAccessMode,
|
|
610
|
+
/** Governs `createAsSystem`. Omitted ⇒ FORBIDDEN. */
|
|
611
|
+
create?: ResourceSystemAccessMode,
|
|
612
|
+
/** Governs `updateAsSystem`. Omitted ⇒ FORBIDDEN. */
|
|
613
|
+
update?: ResourceSystemAccessMode,
|
|
614
|
+
/** Governs `updateManyAsSystem`. Omitted ⇒ FORBIDDEN. */
|
|
615
|
+
updateMany?: ResourceSystemAccessMode,
|
|
616
|
+
// NOTE: there is deliberately NO `delete` verb here — there is no `deleteAsSystem` primitive. A row is
|
|
617
|
+
// removed either through its own DELETE operation ACL (e.g. an owner-facing `API_CALL` DELETE under the
|
|
618
|
+
// USER_SELF owner filter) or by the `onParentDelete` composition cascade (which deletes at the raw
|
|
619
|
+
// repository layer, variant-agnostic — see `deleteChildrenImmediate`). If you find yourself reaching
|
|
620
|
+
// for `systemAccessPolicy.delete`, model the removal as one of those two instead.
|
|
621
|
+
/**
|
|
622
|
+
* Governs the impersonalization see-through reads (`readRetainedAsSystem` /
|
|
623
|
+
* `listRetainedAsSystem`) — the privileged, audited path that reveals
|
|
624
|
+
* `retentionStatus = RETAINED` rows hidden-by-default. Omitted ⇒ FORBIDDEN.
|
|
625
|
+
* Auto-derived to `ALLOWED` by the factory when a resource opts into
|
|
626
|
+
* `retentionPolicy`; never authored by hand in the common case.
|
|
627
|
+
*
|
|
628
|
+
* **LIVE.** `readRetainedAsSystem` / `listRetainedAsSystem` exist and are enforced: the verb is
|
|
629
|
+
* asserted fail-closed, a privileged human role is required, and every reveal emits a
|
|
630
|
+
* human-attributed `RETAINED_DATA_ACCESS` audit event. (This block previously said the primitives
|
|
631
|
+
* were "wired in a later phase" — false since the M5b work landed.)
|
|
632
|
+
*/
|
|
633
|
+
seeRetained?: ResourceSystemAccessMode,
|
|
634
|
+
|
|
635
|
+
/**
|
|
636
|
+
* May this resource's rows be swept into a SUBJECT EXPORT bundle (GDPR Art. 15 / Art. 20)?
|
|
637
|
+
*
|
|
638
|
+
* Fail-closed by omission, like every other verb here. A subject export reads across the whole
|
|
639
|
+
* child-direction graph of its subject, so without an explicit opt-in a resource could be
|
|
640
|
+
* disclosed to a data subject because it merely sits on an edge — nobody having decided that its
|
|
641
|
+
* contents are appropriate to hand over.
|
|
642
|
+
*
|
|
643
|
+
* **The refusal is LOUD, not a silent skip.** When an edge the classifier marked for inclusion
|
|
644
|
+
* belongs to a resource that has not opted in, the export REFUSES and names it. Silently dropping
|
|
645
|
+
* it would produce an access bundle that is incomplete without saying so — a disclosure failure
|
|
646
|
+
* wearing the appearance of a successful response, which is the same class of lie as the routed
|
|
647
|
+
* export operations this capability replaced. Refusing is a one-line fix per resource; a silent
|
|
648
|
+
* omission is undetectable.
|
|
649
|
+
*
|
|
650
|
+
* NOT derived from `portabilityPolicy`: declaring where fields came from (Art. 20 scoping) and
|
|
651
|
+
* consenting to be disclosed at all are different decisions, and a resource may legitimately want
|
|
652
|
+
* the first without the second.
|
|
653
|
+
*/
|
|
654
|
+
exportSubject?: ResourceSystemAccessMode,
|
|
655
|
+
};
|
|
656
|
+
|
|
657
|
+
/**
|
|
658
|
+
* Resource-level opt-in to the **impersonalization-on-erasure** capability: on erasure the
|
|
659
|
+
* resource is impersonalized-and-retained (personal fields scrubbed, row kept for a legal/audit
|
|
660
|
+
* obligation) instead of hard-deleted. When set, the factory injects a `retentionStatus` marker
|
|
661
|
+
* and derives the `updateMany` + `seeRetained` system-access grants.
|
|
662
|
+
*
|
|
663
|
+
* RESOURCE-level (intrinsic, trigger-agnostic). The per-EDGE trigger is
|
|
664
|
+
* `onParentDelete.strategy = IMPERSONALIZE_AND_RETAIN`; the per-FIELD scrub is `.impersonalizeWith()`.
|
|
665
|
+
*
|
|
666
|
+
* **LIVE — opting in has real effect today.** The marker + derived grants, the in-place scrub writer,
|
|
667
|
+
* the `IMPERSONALIZE_AND_RETAIN` cascade mode and the hidden-by-default read filter all exist and are
|
|
668
|
+
* enforced. A RETAINED row is invisible to reads, lists, counts and CHART aggregates, and immutable
|
|
669
|
+
* to ordinary writes, on BOTH persistence adapters; the only door is the audited see-through path.
|
|
670
|
+
*
|
|
671
|
+
* Runtime-proven, not asserted — and scoped precisely, because an earlier revision of this block
|
|
672
|
+
* over-claimed it. Against a real MongoDB, the erasure orchestrator reaches its terminal path and its
|
|
673
|
+
* receipt is truthful over a registered subset of resources
|
|
674
|
+
* (`subject-erasure-completion.mongo.integration.test.ts`); the retention OUTCOME and a SECOND erasure
|
|
675
|
+
* are observed (`subject-impersonalization-retention-outcome.mongo.integration.test.ts`); and a
|
|
676
|
+
* retained row is absent from a real application chart over real HTTP
|
|
677
|
+
* (Your Application `e2e/chart-retention-hide.e2e.ts`).
|
|
678
|
+
*
|
|
679
|
+
* What is NOT proven: that an erasure completes over the FULL `onParentDelete` closure, and that
|
|
680
|
+
* external (provider-side) effects run. The completion lane deliberately requires
|
|
681
|
+
* `declinedEdges.length > 0`, so it asserts a state in which some edges were NOT executed, and
|
|
682
|
+
* `externalEffects` is stubbed empty. Do not read "runtime-proven" here as end-to-end completeness.
|
|
683
|
+
*
|
|
684
|
+
* (This block previously read "Contract only in this phase … No record is impersonalized-and-retained
|
|
685
|
+
* yet." That was true when written and became false without being revisited — it is the public
|
|
686
|
+
* authoring contract an app developer reads before declaring this policy, so it is corrected here
|
|
687
|
+
* rather than left to mislead.)
|
|
688
|
+
*
|
|
689
|
+
* ⚠️ NOT the anonymous-user concept (`isAnonymizable` is pre-auth ownership transposition — the
|
|
690
|
+
* opposite direction). Reuse of that mechanism, never its name.
|
|
691
|
+
*/
|
|
692
|
+
/**
|
|
693
|
+
* WHO a row of this resource is with respect to an erasure, and where that person's session lives.
|
|
694
|
+
* The companion of {@link ResourceRetentionPolicy}: retention says what happens to the ROW and whether
|
|
695
|
+
* the row holds personal data at all; this says **whose SESSION an erasure of it must end**.
|
|
696
|
+
*
|
|
697
|
+
* The two are independent, and reading this one as "is the row about a person" is the mistake that
|
|
698
|
+
* cost `NO_PRINCIPAL` its previous name — see {@link ResourceDataSubjectKind}. A CRM contact holds
|
|
699
|
+
* personal data (`RETAIN_AND_IMPERSONALIZE`) and has no session (`NO_PRINCIPAL`); an invoice holds
|
|
700
|
+
* none (`RETAIN_ONLY`) and also has no session. Same value here, opposite compliance meaning, and the
|
|
701
|
+
* retention mode is what tells them apart.
|
|
702
|
+
*
|
|
703
|
+
* Required on every resource declaring a {@link ResourceRetentionPolicy}, because those are exactly
|
|
704
|
+
* the resources that can be passed to `eraseSubjectAsSystem` as a subject (the orchestrator refuses a
|
|
705
|
+
* subject with no retention policy). Undeclared fails at config build rather than defaulting: the safe
|
|
706
|
+
* default is unknowable — guessing `NO_PRINCIPAL` silently drops a real person's revocation, and
|
|
707
|
+
* guessing a linked principal revokes the wrong people. See {@link ResourceDataSubjectKind} for why
|
|
708
|
+
* the linkage can never be inferred from the presence of a user foreign key.
|
|
709
|
+
*/
|
|
710
|
+
export interface ResourceDataSubjectPolicy {
|
|
711
|
+
/** Whose login session an erasure of this row must end — never whether the row is about a person. */
|
|
712
|
+
kind: ResourceDataSubjectKind;
|
|
713
|
+
/**
|
|
714
|
+
* The field naming the `USERS` row whose session an erasure of this row must end.
|
|
715
|
+
*
|
|
716
|
+
* REQUIRED when {@link kind} is `LINKED_PRINCIPAL`, and FORBIDDEN otherwise — under
|
|
717
|
+
* `SELF_PRINCIPAL` the row's own id is the principal, and under `NO_PRINCIPAL` there is no
|
|
718
|
+
* principal at all, so a field there would be a contradiction rather than redundancy. Both
|
|
719
|
+
* directions are enforced at config build.
|
|
720
|
+
*/
|
|
721
|
+
sessionPrincipalField?: string;
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
export interface ResourceRetentionPolicy {
|
|
725
|
+
/**
|
|
726
|
+
* WHAT happens to a row of this resource when its subject is erased.
|
|
727
|
+
*
|
|
728
|
+
* Both modes retain the row (kept, marked `RETAINED`, hidden from normal reads and immutable,
|
|
729
|
+
* readable only through the audited see-through path). They differ on whether the row's own FIELDS
|
|
730
|
+
* additionally need scrubbing — which is a genuinely separate question, because a record can be
|
|
731
|
+
* legally retainable while holding no personal data of its own (a financial row that merely POINTS
|
|
732
|
+
* at a person). Fusing the two forced such a resource to either invent a fake scrub or forgo
|
|
733
|
+
* retention entirely; keeping them distinct is what makes "retain, nothing to scrub" expressible.
|
|
734
|
+
*/
|
|
735
|
+
mode: ErasureRetentionMode;
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
/**
|
|
739
|
+
* Resource-level DEFAULT for where this resource's field values came from — the axis that decides
|
|
740
|
+
* GDPR Art. 20 (portability) scope. Per-field overrides are `.portabilityProvenance()`.
|
|
741
|
+
*
|
|
742
|
+
* ## Why a resource-level default exists at all
|
|
743
|
+
*
|
|
744
|
+
* Art. 20 is intrinsically a per-FIELD question: one row routinely mixes data the subject supplied
|
|
745
|
+
* (`firstName`) with data the controller produced about them (a computed score, a server-assigned
|
|
746
|
+
* status). But requiring a decorator on EVERY field of every resource would make the capability
|
|
747
|
+
* unadoptable, and an unadopted disclosure capability is worse than a coarse one — it means
|
|
748
|
+
* portability requests cannot be answered at all.
|
|
749
|
+
*
|
|
750
|
+
* So the declaration is two-level: this default carries the resource's common case in one line, and
|
|
751
|
+
* only fields that DIFFER from it need a decorator. A `USER_PROFILES` resource is
|
|
752
|
+
* `SUBJECT_PROVIDED` by default with a handful of derived exceptions; an `AUDIT_LOGS` resource is
|
|
753
|
+
* `DERIVED` throughout with none.
|
|
754
|
+
*
|
|
755
|
+
* ## Why it is optional, and what happens without it
|
|
756
|
+
*
|
|
757
|
+
* Omitting it entirely is legitimate: **Art. 15 (access) never consults provenance**, so an
|
|
758
|
+
* application can answer access requests in full before annotating anything. Only an Art. 20
|
|
759
|
+
* portability export needs the axis, and for a resource where neither the field nor this default
|
|
760
|
+
* declares one, that export REFUSES rather than guessing — see
|
|
761
|
+
* `SubjectExportFieldScope.UNDECLARED` for why neither guess is the safe one.
|
|
762
|
+
*
|
|
763
|
+
* ⚠️ NOT `retentionPolicy`. That says what happens to a value on ERASURE (destroy vs retain-and-
|
|
764
|
+
* scrub); this says where the value ORIGINATED, for a DISCLOSURE decision. A field is commonly
|
|
765
|
+
* `SUBJECT_PROVIDED` here and masked on erasure there — orthogonal axes on the same value.
|
|
766
|
+
*/
|
|
767
|
+
export interface ResourcePortabilityPolicy {
|
|
768
|
+
/**
|
|
769
|
+
* The provenance every field of this resource is assumed to carry unless its own
|
|
770
|
+
* `.portabilityProvenance()` says otherwise.
|
|
771
|
+
*/
|
|
772
|
+
defaultProvenance: DataPortabilityProvenance;
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
/**
|
|
776
|
+
* Builder parameters for creating a resource configuration.
|
|
777
|
+
* NOTE: databaseSchema has been removed. Backend-only fields are now marked with
|
|
778
|
+
* the isBackendOnly decorator in mainSchema and are stripped at the service layer.
|
|
779
|
+
*/
|
|
780
|
+
export type ResourceConfiguration_BuilderParameters<
|
|
781
|
+
TCustomOperationEnum extends EnumLikeType | undefined,
|
|
782
|
+
TCoreOperationEnum extends Partial<CoreResourceOperation> | undefined,
|
|
783
|
+
TMainSchema extends z.ZodTypeAny,
|
|
784
|
+
> = {
|
|
785
|
+
isDisabled?: boolean, // default false
|
|
786
|
+
mainSchema: TMainSchema,
|
|
787
|
+
resourceIdentifier : ResourceType,
|
|
788
|
+
resourceFieldIdentifier : ResourceFieldIdentifier,
|
|
789
|
+
resourceRelationships : ResourceRelationship[],
|
|
790
|
+
inheritenceSchemaDefinition?: ResourceConfiguration_InheritanceSchemaDefinition<EnumLikeType,TMainSchema>,
|
|
791
|
+
|
|
792
|
+
/**
|
|
793
|
+
* Persistence adapter (database type) for this resource.
|
|
794
|
+
* - `mongodb`: MongoDB with Mongoose ORM
|
|
795
|
+
* - `postgresql`: PostgreSQL (SQL adapter)
|
|
796
|
+
*
|
|
797
|
+
* If not specified, uses `appConfig.database.defaultAdapter` — which is the normal case and
|
|
798
|
+
* should stay the normal case.
|
|
799
|
+
*
|
|
800
|
+
* **Declaring a value that DISAGREES with the application default is refused at registration
|
|
801
|
+
* unless {@link ResourceConfiguration_BuilderParameters.persistenceAdapterIsolation} is also
|
|
802
|
+
* declared.** An application is wholly one adapter by default because two adapters cannot
|
|
803
|
+
* share a native transaction; the isolation declaration is the only way past that refusal,
|
|
804
|
+
* and it is a claim about this resource's write topology rather than a way to silence the
|
|
805
|
+
* error. Declaring an adapter that AGREES with the default is always fine and needs nothing.
|
|
806
|
+
*/
|
|
807
|
+
persistenceAdapter?: PersistenceAdapterType,
|
|
808
|
+
|
|
809
|
+
/**
|
|
810
|
+
* This resource's declared relationship to cross-adapter atomic write boundaries.
|
|
811
|
+
*
|
|
812
|
+
* Required — and only meaningful — when {@link
|
|
813
|
+
* ResourceConfiguration_BuilderParameters.persistenceAdapter} disagrees with
|
|
814
|
+
* `appConfig.database.defaultAdapter`. Without it, the resources registry refuses the
|
|
815
|
+
* application at startup; with it, the registry admits the resource and LOGS the admitted
|
|
816
|
+
* set, so a mixed configuration is always named and never ambient.
|
|
817
|
+
*
|
|
818
|
+
* Read {@link ResourcePersistenceAdapterIsolation} before declaring one: the member is an
|
|
819
|
+
* assertion about the resource's design that the persistence unit of work will still enforce
|
|
820
|
+
* at every real boundary.
|
|
821
|
+
*/
|
|
822
|
+
persistenceAdapterIsolation?: ResourcePersistenceAdapterIsolationType,
|
|
823
|
+
|
|
824
|
+
/**
|
|
825
|
+
* REQUIRED companion declaration when `persistenceAdapter` is `HTTP_API`; forbidden otherwise.
|
|
826
|
+
*
|
|
827
|
+
* Carries everything the external repository needs that the platform does not own: provider
|
|
828
|
+
* reference (credentials resolve through `ExternalProvidersRegistryBackendService`), transport
|
|
829
|
+
* dialect, remote entity, ordered key declaration (id synthesis), identity mode, tenancy
|
|
830
|
+
* stance, erasure stance, and remote-call semantics. The factory enforces presence/absence
|
|
831
|
+
* coherence and content-validates the declaration.
|
|
832
|
+
*/
|
|
833
|
+
httpApiBinding?: HttpApiResourceBinding,
|
|
834
|
+
/** REQUIRED when `persistenceAdapter` is INTROSPECTION; meaningless otherwise. */
|
|
835
|
+
introspectionBinding?: IntrospectionResourceBinding,
|
|
836
|
+
|
|
837
|
+
/**
|
|
838
|
+
* OPTIONAL inbound ETL pipeline on an ordinary LOCAL resource — "some resources local, some
|
|
839
|
+
* remote, ETL between them" (partial-resource coverage, model v3; PR-3). FORBIDDEN on an
|
|
840
|
+
* HTTP_API-adapter resource: a virtual resource IS the remote side. The factory
|
|
841
|
+
* content-validates the declaration and every mainSchema-dependent coherence rule (the
|
|
842
|
+
* remote-key field is a declared `.isBusinessKey()` + excludeFromCreate/Update STRING; mapped
|
|
843
|
+
* targets exist, accept null unless `required`, and are excludeFromCreate/Update; CLOSED
|
|
844
|
+
* population refuses caller CREATE operations).
|
|
845
|
+
*/
|
|
846
|
+
externalDataPipeline?: ExternalDataPipelineDeclaration,
|
|
847
|
+
|
|
848
|
+
isSystemResource?: boolean, // default false - true for core system resources (organizations, users, etc.), false for tenant-specific resources
|
|
849
|
+
|
|
850
|
+
/**
|
|
851
|
+
* Does this resource's OWN primary-key URL segment name the CALLER, or the SUBJECT?
|
|
852
|
+
*
|
|
853
|
+
* Default `true` (the segment names the caller) — deliberately the SAFE default, so a resource
|
|
854
|
+
* whose author has not considered the question keeps the identity-coherence guard rather than
|
|
855
|
+
* silently losing it.
|
|
856
|
+
*
|
|
857
|
+
* ## Why this cannot be inferred
|
|
858
|
+
*
|
|
859
|
+
* The W3.6 identity-coherence guard (`handleUserJwtAuthentication` →
|
|
860
|
+
* `AUTHORIZATION_USER_ID_MISMATCH`) refuses a request whose URL `userId` differs from the JWT
|
|
861
|
+
* subject. That is exactly right for `USER_SELF` (`/user-self/{userId}` — the segment IS the
|
|
862
|
+
* caller, pinned by the horizontal-IDOR probes) and for child routes under a user
|
|
863
|
+
* (`/users/{userId}/draft-notes` — a PARENT segment naming whose rows these are).
|
|
864
|
+
*
|
|
865
|
+
* It is exactly WRONG for `USERS`, whose own `resourceFieldIdentifier` is also `userId` but whose
|
|
866
|
+
* segment names the TARGET of an administrative action. Both resources are keyed on the same
|
|
867
|
+
* field name, so no structural rule can tell them apart — the framework already had to add
|
|
868
|
+
* `coreResourceShared_FieldIdentifierPriority` to disambiguate the very same collision for FK
|
|
869
|
+
* resolution. This declaration is that disambiguation for IDENTITY.
|
|
870
|
+
*
|
|
871
|
+
* ## What it does and does not change
|
|
872
|
+
*
|
|
873
|
+
* Setting `false` relaxes ONLY the coherence refusal. It does not touch:
|
|
874
|
+
* - `initiatorIds.userId`, which is taken from the JWT and spread LAST precisely so a URL can
|
|
875
|
+
* never spoof the caller (see the `W3.6` comment at that assignment) — so permitting the
|
|
876
|
+
* mismatch cannot produce impersonation;
|
|
877
|
+
* - the contextual-field map, which legitimately carries the ADDRESSED resource's id;
|
|
878
|
+
* - authorization, which still decides whether this caller may run this operation at all.
|
|
879
|
+
*
|
|
880
|
+
* Set `false` only for an administrative resource whose primary key is a person/tenant identifier
|
|
881
|
+
* that a privileged caller is MEANT to address on someone else's behalf.
|
|
882
|
+
*/
|
|
883
|
+
primaryKeyIdentifiesInitiator?: boolean,
|
|
884
|
+
|
|
885
|
+
/**
|
|
886
|
+
* Opt-in policy for the ACL-bypassing system-context primitives
|
|
887
|
+
* (`readAsSystem` / `listAsSystem` and the trusted writes `createAsSystem` /
|
|
888
|
+
* `updateAsSystem` / `updateManyAsSystem`). Omitted ⇒ EVERY verb FORBIDDEN
|
|
889
|
+
* (fail-closed): a system-context call on this resource throws unless the
|
|
890
|
+
* matching verb is explicitly set to ALLOWED. Declare ONLY the verb(s) that
|
|
891
|
+
* genuinely need a system bypass, and ensure the calling service enforces an
|
|
892
|
+
* explicit alternative authorization.
|
|
893
|
+
*/
|
|
894
|
+
systemAccessPolicy?: ResourceSystemAccessPolicy,
|
|
895
|
+
coreOperations: TCoreOperationEnum[],
|
|
896
|
+
customOperation?: TCustomOperationEnum, // default undefined
|
|
897
|
+
operationsConfiguration : { [K in ValidOperationKeys<TCustomOperationEnum, TCoreOperationEnum>]: OperationConfig_ForKey<K, TMainSchema> }
|
|
898
|
+
/**
|
|
899
|
+
* Configuration for auto-generated operation variants.
|
|
900
|
+
* Controls which READ/LIST variants (summary, context) are auto-generated.
|
|
901
|
+
* All variants are enabled by default.
|
|
902
|
+
*/
|
|
903
|
+
autoVariants?: ResourceConfiguration_AutoVariants,
|
|
904
|
+
// NOTE: responseSummaryDto removed - now auto-derived from isSummaryField() decorators in factory
|
|
905
|
+
|
|
906
|
+
/**
|
|
907
|
+
* W7.3a: Marks this resource as accessible to anonymous sessions.
|
|
908
|
+
* When true, the factory auto-generates dual URL paths (USER_SELF + ANONYMOUS)
|
|
909
|
+
* and a STANDALONE relationship to ANONYMOUS_USERS.
|
|
910
|
+
* The resource MUST have a nullable `userId` field.
|
|
911
|
+
*/
|
|
912
|
+
isAnonymizable?: boolean,
|
|
913
|
+
|
|
914
|
+
/**
|
|
915
|
+
* W7.3a: Controls how anonymous resources are handled during transposition.
|
|
916
|
+
* Only meaningful when isAnonymizable is true.
|
|
917
|
+
* Defaults to ADD (simple ownership reassignment).
|
|
918
|
+
*/
|
|
919
|
+
transpositionPolicy?: ResourceTranspositionPolicy,
|
|
920
|
+
|
|
921
|
+
/**
|
|
922
|
+
* Opt in to impersonalization-on-erasure (retain + scrub instead of hard-delete). When set, the
|
|
923
|
+
* factory injects a `retentionStatus` marker and derives the `updateMany` / `seeRetained`
|
|
924
|
+
* system-access grants. Per-field scrub is `.impersonalizeWith()`; the per-edge trigger is the
|
|
925
|
+
* `IMPERSONALIZE_AND_RETAIN` cascade mode.
|
|
926
|
+
*
|
|
927
|
+
* **LIVE.** Marker injection, grant derivation, the scrub writer, the cascade mode and the
|
|
928
|
+
* hidden-by-default read filter are all enforced today — see `ResourceRetentionPolicy` for the
|
|
929
|
+
* runtime evidence. Declaring this changes behaviour; it is not a forward declaration.
|
|
930
|
+
*
|
|
931
|
+
* Declaring this also REQUIRES {@link dataSubjectPolicy}: a retention-governed resource is exactly
|
|
932
|
+
* one that can be handed to `eraseSubjectAsSystem` as a subject, so it must say whether its rows are
|
|
933
|
+
* a person — and if so, whose session an erasure ends.
|
|
934
|
+
*/
|
|
935
|
+
retentionPolicy?: ResourceRetentionPolicy,
|
|
936
|
+
|
|
937
|
+
/**
|
|
938
|
+
* WHO a row of this resource is with respect to an erasure — and, when it is a person, which field
|
|
939
|
+
* names the `USERS` row whose session that erasure must end.
|
|
940
|
+
*
|
|
941
|
+
* Mandatory for any resource declaring a {@link retentionPolicy}; meaningless (and rejected) without
|
|
942
|
+
* one, since a resource with no retention policy can never be an erasure subject. See
|
|
943
|
+
* {@link ResourceDataSubjectPolicy}.
|
|
944
|
+
*/
|
|
945
|
+
dataSubjectPolicy?: ResourceDataSubjectPolicy,
|
|
946
|
+
|
|
947
|
+
/**
|
|
948
|
+
* Resource-level DEFAULT provenance for GDPR Art. 20 (portability) scoping; per-field overrides
|
|
949
|
+
* are `.portabilityProvenance()`. Optional — Art. 15 (access) never consults provenance, so an
|
|
950
|
+
* application can answer access requests without declaring this. See
|
|
951
|
+
* {@link ResourcePortabilityPolicy}.
|
|
952
|
+
*/
|
|
953
|
+
portabilityPolicy?: ResourcePortabilityPolicy,
|
|
954
|
+
}
|
|
955
|
+
```
|
|
956
|
+
## Import Origins
|
|
957
|
+
|
|
958
|
+
- `@wildo-ai/saas-models`
|
|
959
|
+
|
|
960
|
+
## Source Excerpts
|
|
961
|
+
|
|
962
|
+
### Origin Package: `@wildo-ai/saas-models`
|
|
963
|
+
|
|
964
|
+
```typescript
|
|
965
|
+
*
|
|
966
|
+
* Base operation configuration type.
|
|
967
|
+
* NOTE: TDatabaseSchema has been removed. Backend-only fields are now marked with
|
|
968
|
+
* the isBackendOnly decorator in mainSchema and are stripped at the service layer.
|
|
969
|
+
*
|
|
970
|
+
* @remarks Import from `@wildo-ai/saas-models`. App `resources-config` fills these per operation variant.
|
|
971
|
+
*/
|
|
972
|
+
export type ResourceConfiguration_Operation_Base<
|
|
973
|
+
TCustomOperationEnum extends EnumLikeType | undefined,
|
|
974
|
+
TCoreOperationEnum extends Partial<CoreResourceOperation> | undefined,
|
|
975
|
+
TMainSchema extends z.ZodTypeAny = z.ZodAny,
|
|
976
|
+
> = ResourceConfiguration_OperationVariant_Base<TMainSchema> & {
|
|
977
|
+
isDisabled: boolean, // default false
|
|
978
|
+
mainSchema: TMainSchema,
|
|
979
|
+
resourcePrimaryScope : ResourcePrimaryScope, // default ResourcePrimaryScope.ORGANIZATIONS
|
|
980
|
+
resourceIdentifier : ResourceType,
|
|
981
|
+
resourceFieldIdentifier : ResourceFieldIdentifier,
|
|
982
|
+
|
|
983
|
+
resourceRelationships : ResourceConfiguration_ResourceRelationships,
|
|
984
|
+
|
|
985
|
+
isSystemResource: boolean, // default false - true for core system resources (organizations, users, etc.), false for tenant-specific resources
|
|
986
|
+
operationIdentifier : TCustomOperationEnum | TCoreOperationEnum,
|
|
987
|
+
isOperationDefault : boolean, // default true
|
|
988
|
+
serviceRuntimeMode: ResourceOperation_ServiceRuntimeMode; //default ResourceOperation_ServiceRuntimeMode.INLINE
|
|
989
|
+
generatedOperation?: ResourceConfiguration_GeneratedOperationMetadata;
|
|
990
|
+
|
|
991
|
+
requestDto?: z.ZodSchema<any>;
|
|
992
|
+
responseDto?: z.ZodSchema<any>;
|
|
993
|
+
/** Set by factory when an explicit `requestDto` was provided in variant params.
|
|
994
|
+
* Allows the DTO builder to skip heuristic comparison and trust the flag:
|
|
995
|
+
* `true` ⇒ preserve the supplied schema verbatim; `false` ⇒ the requestDto is
|
|
996
|
+
* the factory's auto-derived temporary placeholder, so always use the
|
|
997
|
+
* inheritance-rebuilt DTO (a discriminated union for inheritance resources).
|
|
998
|
+
* Absent only on legacy/hand-authored operations that predate the flag. */
|
|
999
|
+
hasCustomRequestDto?: boolean;
|
|
1000
|
+
/** Set by factory when `customResponseDto` was explicitly provided in variant params.
|
|
1001
|
+
* Allows the DTO builder to skip heuristic comparison and always preserve the custom schema. */
|
|
1002
|
+
hasCustomResponseDto?: boolean;
|
|
1003
|
+
/**
|
|
1004
|
+
* SummaryDto contains only fields marked with isSummaryField decorator.
|
|
1005
|
+
* Used for LIST operations in SUMMARY mode.
|
|
1006
|
+
* Calculated at factory execution time.
|
|
1007
|
+
*/
|
|
1008
|
+
summaryDto?: z.ZodSchema<any>;
|
|
1009
|
+
/**
|
|
1010
|
+
* ContextDto includes relationship placeholders for context-dependent operations.
|
|
1011
|
+
* Used for operations in CONTEXT mode.
|
|
1012
|
+
* Calculated at factory execution time.
|
|
1013
|
+
*/
|
|
1014
|
+
contextDto?: z.ZodSchema<any>;
|
|
1015
|
+
/**
|
|
1016
|
+
* InternalDto includes backend-only fields (isBackendOnly decorator).
|
|
1017
|
+
* Used for backend-to-backend communication (queues, internal calls).
|
|
1018
|
+
* Calculated at factory execution time.
|
|
1019
|
+
*/
|
|
1020
|
+
internalDto?: z.ZodSchema<any>;
|
|
1021
|
+
/**
|
|
1022
|
+
* RepositoryDto for repository projection.
|
|
1023
|
+
* Excludes virtual fields and populated placeholders.
|
|
1024
|
+
* Calculated at factory execution time.
|
|
1025
|
+
*/
|
|
1026
|
+
repositoryDto?: z.ZodSchema<any>;
|
|
1027
|
+
|
|
1028
|
+
notificationBadgeOperations: { identifier : NotificationBadgeIdentifier, operation : NotificationBadgeOperation }[]; //
|
|
1029
|
+
userNotifications: UserNotificationDefinition[];
|
|
1030
|
+
m2mNotifications: M2MNotificationDefinitionWithoutIdentifier[];
|
|
1031
|
+
}
|
|
1032
|
+
```
|
|
1033
|
+
## Import Origins
|
|
1034
|
+
|
|
1035
|
+
- `@wildo-ai/saas-models`
|
|
1036
|
+
|
|
1037
|
+
## Source Excerpts
|
|
1038
|
+
|
|
1039
|
+
### Origin Package: `@wildo-ai/saas-models`
|
|
1040
|
+
|
|
1041
|
+
```typescript
|
|
1042
|
+
*
|
|
1043
|
+
* HTTP API surface for an operation: URL templates, method, tokens,
|
|
1044
|
+
* enabledCondition, and per-endpoint rate-limit policy (`rateLimit?`).
|
|
1045
|
+
*
|
|
1046
|
+
* @remarks Import from `@wildo-ai/saas-models`.
|
|
1047
|
+
*/
|
|
1048
|
+
// URL parameter information for each URL
|
|
1049
|
+
export type ResourceConfiguration_Operation_UrlParameterInfo = {
|
|
1050
|
+
fieldIdentifier: string;
|
|
1051
|
+
resourceType: ResourceType;
|
|
1052
|
+
/**
|
|
1053
|
+
* The FK relationship field if this parameter comes from a FK relationship.
|
|
1054
|
+
* e.g., 'assignedToUserId' for /assigned-to-users/{userId}/...
|
|
1055
|
+
* undefined for default parent relationships.
|
|
1056
|
+
*/
|
|
1057
|
+
relationshipField?: string;
|
|
1058
|
+
/**
|
|
1059
|
+
* Scope-via-junction tag, propagated from the synthetic scope-anchored parent
|
|
1060
|
+
* edge (`ResourceRelationship.scopeViaJunction`). When set, this param scopes
|
|
1061
|
+
* the (target) resource's SEARCH/LIST through the named junction `J` rather
|
|
1062
|
+
* than via a direct column the resource owns — e.g. on
|
|
1063
|
+
* `/organizations/{organizationId}/users/search`, `organizationId` carries
|
|
1064
|
+
* `scopeViaJunction: 'organizationMembers'`. The backend contextual filter +
|
|
1065
|
+
* authorization read this off the runtime relationship context. Absent on
|
|
1066
|
+
* normal parent params.
|
|
1067
|
+
*/
|
|
1068
|
+
scopeViaJunction?: ResourceType;
|
|
1069
|
+
};
|
|
1070
|
+
|
|
1071
|
+
// URL information structure
|
|
1072
|
+
export type ResourceConfiguration_Operation_UrlInitiatorInfo = {
|
|
1073
|
+
url: string;
|
|
1074
|
+
urlCallback?: string;
|
|
1075
|
+
parameters: ResourceConfiguration_Operation_UrlParameterInfo[];
|
|
1076
|
+
};
|
|
1077
|
+
|
|
1078
|
+
export type ResourceConfiguration_Operation_ApiCall<
|
|
1079
|
+
TCustomOperationEnum extends EnumLikeType | undefined,
|
|
1080
|
+
TCoreOperationEnum extends Partial<CoreResourceOperation> | undefined,
|
|
1081
|
+
TMainSchema extends z.ZodTypeAny = z.ZodAny,
|
|
1082
|
+
> = ResourceConfiguration_Operation_Base<TCustomOperationEnum, TCoreOperationEnum, TMainSchema> & {
|
|
1083
|
+
variantType : ResourceOperationVariantType.API_CALL;
|
|
1084
|
+
httpVerb: HttpMethod;
|
|
1085
|
+
isApiKeyAccessDisabled: boolean; // default false
|
|
1086
|
+
isBulkOperation: boolean; // default false
|
|
1087
|
+
initiatorInfos?: ResourceConfiguration_Operation_UrlInitiatorInfo[];
|
|
1088
|
+
|
|
1089
|
+
tokenAuthentication?: TokenAuthenticationConfig; // default undefined
|
|
1090
|
+
tokenGeneration?: TokenGenerationConfig; // default undefined
|
|
1091
|
+
tokenRevocation?: TokenRevocationConfig; // default undefined
|
|
1092
|
+
/**
|
|
1093
|
+
* Resolved per-endpoint rate-limit policy (forwarded by the resource
|
|
1094
|
+
* configuration factory from the variant builder parameters). Read at
|
|
1095
|
+
* runtime by `RateLimitBackendService.checkPolicyForVariant` at the
|
|
1096
|
+
* controller pre-flight seam (`controller-resource.backend.service.ts`
|
|
1097
|
+
* → `doOperation`).
|
|
1098
|
+
*
|
|
1099
|
+
* Auto-variants (`SUMMARY` / `CONTEXT` for READ/LIST) inherit this
|
|
1100
|
+
* field from their default URL-bearing variant (`API_CALL` or
|
|
1101
|
+
* `API_CALL_WITH_CALLBACK`) — a single declaration on the default variant
|
|
1102
|
+
* covers all derived auto-variants by design.
|
|
1103
|
+
*
|
|
1104
|
+
* The declaration is inherited by derived variants so every route for this
|
|
1105
|
+
* operation presents one consistent request budget.
|
|
1106
|
+
*/
|
|
1107
|
+
rateLimit?: RateLimitConfiguration; // default undefined
|
|
1108
|
+
/**
|
|
1109
|
+
* Function to determine if operation variant is enabled.
|
|
1110
|
+
* Available in both frontend and backend.
|
|
1111
|
+
* Can optionally specify needsObjectContext/needsUserContext flags:
|
|
1112
|
+
* enabledCondition.needsObjectContext = true
|
|
1113
|
+
* enabledCondition.needsUserContext = true
|
|
1114
|
+
*/
|
|
1115
|
+
enabledCondition?: ResourceConfiguration_FunctionWithContextNeeds<
|
|
1116
|
+
(params: ResourceConfiguration_OperationVariant_CustomImplementation_FunctionParameters<TMainSchema>) => boolean
|
|
1117
|
+
>; // default undefined
|
|
1118
|
+
}
|
|
1119
|
+
```
|
|
1120
|
+
## Import Origins
|
|
1121
|
+
|
|
1122
|
+
- `@wildo-ai/saas-models`
|
|
1123
|
+
|
|
1124
|
+
## Source Excerpts
|
|
1125
|
+
|
|
1126
|
+
### Origin Package: `@wildo-ai/saas-models`
|
|
1127
|
+
|
|
1128
|
+
```typescript
|
|
1129
|
+
*
|
|
1130
|
+
* Variant builder type that distributes operation-specific fields based on the operation key.
|
|
1131
|
+
*
|
|
1132
|
+
* Collection-view fields are intersected with the **full** variant union — not restricted to
|
|
1133
|
+
* API_CALL. The variant type ("how is this triggered?") and collection-view fields ("how does
|
|
1134
|
+
* this operation query/present a collection?") are orthogonal concerns. A REPOSITORY_ONLY LIST
|
|
1135
|
+
* still lists things and may need pageSize, filterFields, sortFields for internal queries.
|
|
1136
|
+
*
|
|
1137
|
+
* Only collection-style operations get operation-specific frontend/query
|
|
1138
|
+
* metadata here. Action-style behavior for custom operations is modeled
|
|
1139
|
+
* explicitly through custom operation identifiers plus variant/runtime config,
|
|
1140
|
+
* not through a special core operation.
|
|
1141
|
+
*/
|
|
1142
|
+
export type OperationVariant_ForKey<
|
|
1143
|
+
K,
|
|
1144
|
+
TMainSchema extends z.ZodTypeAny = z.ZodAny
|
|
1145
|
+
> =
|
|
1146
|
+
K extends CoreResourceOperation.LIST
|
|
1147
|
+
? ResourceConfiguration_OperationVariant_BuilderParameters<TMainSchema> & CollectionViewFields_List
|
|
1148
|
+
: K extends CoreResourceOperation.SEARCH
|
|
1149
|
+
? ResourceConfiguration_OperationVariant_BuilderParameters<TMainSchema> & CollectionViewFields_Search
|
|
1150
|
+
: K extends CoreResourceOperation
|
|
1151
|
+
? ResourceConfiguration_OperationVariant_BuilderParameters<TMainSchema>
|
|
1152
|
+
: ResourceConfiguration_OperationVariant_BuilderParameters<TMainSchema>
|
|
1153
|
+
| (
|
|
1154
|
+
ResourceConfiguration_OperationVariant_BuilderParameters<TMainSchema>
|
|
1155
|
+
& { resourceOperationLike: CoreResourceOperation.LIST }
|
|
1156
|
+
& CollectionViewFields_List
|
|
1157
|
+
)
|
|
1158
|
+
| (
|
|
1159
|
+
ResourceConfiguration_OperationVariant_BuilderParameters<TMainSchema>
|
|
1160
|
+
& { resourceOperationLike: CoreResourceOperation.SEARCH }
|
|
1161
|
+
& CollectionViewFields_Search
|
|
1162
|
+
);
|
|
1163
|
+
|
|
1164
|
+
/**
|
|
1165
|
+
* Operation config with variant type narrowed by operation key.
|
|
1166
|
+
* Distributes at the operation-config level; collection-view fields live on the variant.
|
|
1167
|
+
*/
|
|
1168
|
+
export type OperationConfig_ForKey<
|
|
1169
|
+
K,
|
|
1170
|
+
TMainSchema extends z.ZodTypeAny = z.ZodAny
|
|
1171
|
+
> = {
|
|
1172
|
+
variants: OperationVariant_ForKey<K, TMainSchema>[];
|
|
1173
|
+
serviceRuntimeMode?: ResourceOperation_ServiceRuntimeMode;
|
|
1174
|
+
parentResourceAccessScopeStrategyOverrides?: { resourceType: ResourceType, accessScopeStrategy: ResourceRelationshipAccessScopeStrategy }[];
|
|
1175
|
+
userNotifications?: UserNotificationDefinitionWithoutPrimaryScopeAndIdentifier[];
|
|
1176
|
+
notificationBadgeOperations?: { identifier: NotificationBadgeIdentifier, operation: NotificationBadgeOperation }[];
|
|
1177
|
+
m2mNotifications?: M2MNotificationDefinitionWithoutIdentifier[];
|
|
1178
|
+
};
|
|
1179
|
+
```
|
|
1180
|
+
## Import Origins
|
|
1181
|
+
|
|
1182
|
+
- `@wildo-ai/saas-models`
|
|
1183
|
+
|
|
1184
|
+
## Source Excerpts
|
|
1185
|
+
|
|
1186
|
+
### Origin Package: `@wildo-ai/saas-models`
|
|
1187
|
+
|
|
1188
|
+
```typescript
|
|
1189
|
+
*
|
|
1190
|
+
* Discriminated union of resolved operation configuration shapes (variant discriminant).
|
|
1191
|
+
*/
|
|
1192
|
+
export type ResourceConfiguration_Operation<
|
|
1193
|
+
TCustomOperationEnum extends EnumLikeType | undefined,
|
|
1194
|
+
TCoreOperationEnum extends Partial<CoreResourceOperation> | undefined,
|
|
1195
|
+
TMainSchema extends z.ZodTypeAny = z.ZodAny,
|
|
1196
|
+
> =
|
|
1197
|
+
ResourceConfiguration_Operation_ApiCall<TCustomOperationEnum, TCoreOperationEnum, TMainSchema> |
|
|
1198
|
+
ResourceConfiguration_Operation_ApiCallWithCallback<TCustomOperationEnum, TCoreOperationEnum, TMainSchema> |
|
|
1199
|
+
ResourceConfiguration_Operation_CronJob<TCustomOperationEnum, TCoreOperationEnum, TMainSchema> |
|
|
1200
|
+
ResourceConfiguration_Operation_BatchJob<TCustomOperationEnum, TCoreOperationEnum, TMainSchema> |
|
|
1201
|
+
ResourceConfiguration_Operation_InternalCall<TCustomOperationEnum, TCoreOperationEnum, TMainSchema> |
|
|
1202
|
+
ResourceConfiguration_Operation_RepositoryOnly<TCustomOperationEnum, TCoreOperationEnum, TMainSchema>;
|
|
1203
|
+
```
|
|
1204
|
+
## Import Origins
|
|
1205
|
+
|
|
1206
|
+
- `@wildo-ai/saas-models`
|
|
1207
|
+
|
|
1208
|
+
## Source Excerpts
|
|
1209
|
+
|
|
1210
|
+
### Origin Package: `@wildo-ai/saas-models`
|
|
1211
|
+
|
|
1212
|
+
```typescript
|
|
1213
|
+
*
|
|
1214
|
+
* Path key for routing: resource, operation, variant, optional variantKey / bulk.
|
|
1215
|
+
*/
|
|
1216
|
+
export type ResourceConfiguration_OperationPath<
|
|
1217
|
+
TCustomOperationEnum extends EnumLikeType | undefined,
|
|
1218
|
+
TCoreOperationEnum extends Partial<CoreResourceOperation> | undefined
|
|
1219
|
+
> = {
|
|
1220
|
+
resourceIdentifier: ResourceType;
|
|
1221
|
+
operationIdentifier: TCustomOperationEnum | TCoreOperationEnum;
|
|
1222
|
+
variantType : ResourceOperationVariantType
|
|
1223
|
+
isOperationDefault?: boolean;
|
|
1224
|
+
isBulkOperation?: boolean;
|
|
1225
|
+
variantKey?: string;
|
|
1226
|
+
|
|
1227
|
+
}
|
|
1228
|
+
```
|
|
1229
|
+
## Import Origins
|
|
1230
|
+
|
|
1231
|
+
- `@wildo-ai/saas-models`
|
|
1232
|
+
|
|
1233
|
+
## Source Excerpts
|
|
1234
|
+
|
|
1235
|
+
### Origin Package: `@wildo-ai/saas-models`
|
|
1236
|
+
|
|
1237
|
+
```typescript
|
|
1238
|
+
*
|
|
1239
|
+
* Config-declared gate deciding whether a `tokenGeneration` side-effect actually
|
|
1240
|
+
* mints a token, evaluated against the POST-operation row (`currentObject`).
|
|
1241
|
+
*
|
|
1242
|
+
* WHY the destructured params-object shape `({ currentObject }) => boolean` and NOT
|
|
1243
|
+
* the positional `StaticOrDerived` shape used by `expiresIn`/`grantedRoles` above (R5):
|
|
1244
|
+
* this deliberately mirrors the operation-variant `enabledCondition` predicate (see the
|
|
1245
|
+
* org-members REVOKE/RESEND configs) so an app author writes ONE predicate form for every
|
|
1246
|
+
* "config-declared gate over currentObject". The trade-off is worth it — cross-surface
|
|
1247
|
+
* authoring consistency beats intra-type consistency with the positional derivers.
|
|
1248
|
+
*
|
|
1249
|
+
* WHY the params object carries ONLY `currentObject` (unlike the notification `condition`,
|
|
1250
|
+
* which also gets `inputDto`/`objectContext`/`initiatorIds`): a token is a PERSISTED
|
|
1251
|
+
* side-effect keyed on the resulting row, so its gate must depend only on the persisted
|
|
1252
|
+
* result — never on raw request input. Narrowing the params to `currentObject` makes that
|
|
1253
|
+
* guarantee structural. (It also keeps this type free of the `resources-config` params type,
|
|
1254
|
+
* which would be a circular import — `resources-config.shared.schemas` imports FROM here.)
|
|
1255
|
+
*/
|
|
1256
|
+
export type TokenGenerationCondition = (params: { currentObject: Record<string, any> }) => boolean;
|
|
1257
|
+
```
|
|
1258
|
+
|
|
1259
|
+
### Origin Package: `@wildo-ai/saas-models`
|
|
1260
|
+
|
|
1261
|
+
```typescript
|
|
1262
|
+
*
|
|
1263
|
+
* Declarative config for automatic token generation on an operation variant.
|
|
1264
|
+
* Placed on CREATE/RESEND-like operations to generate a token as a side-effect.
|
|
1265
|
+
*
|
|
1266
|
+
* Import from `@wildo-ai/saas-models`; application authors normally provide
|
|
1267
|
+
* this shape through an API-call variant in
|
|
1268
|
+
* `createResourceConfiguration_Initialization(...)`.
|
|
1269
|
+
*
|
|
1270
|
+
* The operation pipeline creates the token in the same persistence transaction
|
|
1271
|
+
* as the resource mutation, then injects `additionalContext.tokenValue` into
|
|
1272
|
+
* post-commit notification dispatch.
|
|
1273
|
+
*
|
|
1274
|
+
* The contract requires one canonical persisted resource state. It cannot be
|
|
1275
|
+
* authored on a collection/aggregate operation, a core bulk mutation, or a
|
|
1276
|
+
* variant with `haveBulkOperation: true`; those operations do not expose one
|
|
1277
|
+
* unambiguous related resource identity for the generated token.
|
|
1278
|
+
*
|
|
1279
|
+
* @example
|
|
1280
|
+
* `tokenGeneration: { tokenType: MyTokenType.INVITATION, consumptionMode:
|
|
1281
|
+
* ConsumableToken_ConsumptionMode.SINGLE_USE, expiresIn: { value: 7, unit:
|
|
1282
|
+
* DurationUnit.DAYS }, relatedIdField: '_id' }`
|
|
1283
|
+
*/
|
|
1284
|
+
export type TokenGenerationConfig = {
|
|
1285
|
+
/** Token type identifier (from CoreConsumableTokenTypes or custom app enum) */
|
|
1286
|
+
tokenType: ConsumableTokenTypes;
|
|
1287
|
+
|
|
1288
|
+
/** How the token behaves when used */
|
|
1289
|
+
consumptionMode: ConsumableToken_ConsumptionMode;
|
|
1290
|
+
|
|
1291
|
+
/**
|
|
1292
|
+
* Expiration duration — static or derived from currentObject.
|
|
1293
|
+
* Units: minutes, hours, or days only. Value must be ≥ 1.
|
|
1294
|
+
* Static: `{ value: 7, unit: DurationUnit.DAYS }`
|
|
1295
|
+
* Derived: `(currentObject) => ({ value: currentObject.shareDurationDays, unit: 'days' })`
|
|
1296
|
+
*/
|
|
1297
|
+
expiresIn: StaticOrDerived<ExpiresInDuration>;
|
|
1298
|
+
|
|
1299
|
+
/**
|
|
1300
|
+
* Optional gate — mint this token ONLY when the predicate returns truthy against the
|
|
1301
|
+
* post-operation row. Absent = always mint.
|
|
1302
|
+
*
|
|
1303
|
+
* Canonical use: a POLYMORPHIC CREATE (org-member INVITE vs DIRECT-ADD) mints the
|
|
1304
|
+
* single-use accept token ONLY for the INVITED branch. A direct-add (founder / SSO-JIT /
|
|
1305
|
+
* SCIM) persists `ACTIVE` with nothing to accept, so minting a token there would leave a
|
|
1306
|
+
* live single-use accept token dangling on an already-ACTIVE row (a hygiene/security
|
|
1307
|
+
* hole). Keying on the resulting `status` — the semantic driver, uniformly present on
|
|
1308
|
+
* every branch's `currentObject` — auto-covers any future non-INVITED direct-add path.
|
|
1309
|
+
*
|
|
1310
|
+
* @example `({ currentObject }) => currentObject.status === OrganizationMemberStatus.INVITED`
|
|
1311
|
+
*/
|
|
1312
|
+
condition?: TokenGenerationCondition;
|
|
1313
|
+
|
|
1314
|
+
/**
|
|
1315
|
+
* Roles granted when the token is used for authentication.
|
|
1316
|
+
* Static: `[{ roles: ['ORG_MEMBER'], relatedPrimaryScope: 'ORGANIZATIONS' }]`
|
|
1317
|
+
* Derived: `(currentObject) => [{ roles: [currentObject.assignedRole], relatedPrimaryScope: 'ORGANIZATIONS' }]`
|
|
1318
|
+
*/
|
|
1319
|
+
grantedRoles?: StaticOrDerived<ExecutionContext_RoleInfo[]>;
|
|
1320
|
+
|
|
1321
|
+
/** Max uses for BOUNDED_REUSE mode. Required when consumptionMode is BOUNDED_REUSE. */
|
|
1322
|
+
maxUses?: number;
|
|
1323
|
+
|
|
1324
|
+
/** Revoke existing tokens of same type for same relatedId before creating new one (e.g., RESEND) */
|
|
1325
|
+
revokeExistingForSameRelated?: boolean;
|
|
1326
|
+
|
|
1327
|
+
/** Field in currentState to use as relatedId. Defaults to '_id' (the resource's own ID). */
|
|
1328
|
+
relatedIdField?: string;
|
|
1329
|
+
|
|
1330
|
+
/**
|
|
1331
|
+
* Field in currentState to capture as the token's userId (user_self pattern).
|
|
1332
|
+
* e.g., 'invitedUserId' — if not set, no userId stored on token.
|
|
1333
|
+
*/
|
|
1334
|
+
userIdField?: string;
|
|
1335
|
+
|
|
1336
|
+
/**
|
|
1337
|
+
* W7.3b: Marks the generated token as exchangeable for a one-off session JWT.
|
|
1338
|
+
* When true, the token can be used via POST /auth/one-off-session/exchange.
|
|
1339
|
+
*/
|
|
1340
|
+
createsOneOffSession?: boolean;
|
|
1341
|
+
|
|
1342
|
+
/**
|
|
1343
|
+
* W7.3b: When the token is consumed — at exchange time or at target operation time.
|
|
1344
|
+
* Required when `createsOneOffSession` is true.
|
|
1345
|
+
* - `EXCHANGE`: consumed immediately when exchanged for a JWT (no token carried into session)
|
|
1346
|
+
* - `TARGET_OPERATION`: carried through the session, consumed when the target operation executes
|
|
1347
|
+
*/
|
|
1348
|
+
consumeAt?: 'EXCHANGE' | 'TARGET_OPERATION';
|
|
1349
|
+
|
|
1350
|
+
/**
|
|
1351
|
+
* W7.3b: Builds targeting.initiatorIds for frontend URL resolution.
|
|
1352
|
+
* Maps field identifier names to field paths in currentState.
|
|
1353
|
+
* organizationId is auto-included from execution context if not specified.
|
|
1354
|
+
*
|
|
1355
|
+
* Example: `{ taskId: '_id' }` → on a Tasks resource, reads `currentState._id` as the taskId.
|
|
1356
|
+
* The frontend uses these to resolve the target URL after session exchange.
|
|
1357
|
+
*/
|
|
1358
|
+
targetingFields?: Record<string, string>;
|
|
1359
|
+
|
|
1360
|
+
/**
|
|
1361
|
+
* Public path of the frontend page that consumes this token (e.g. `/invitation`).
|
|
1362
|
+
* When set, the notification dispatcher builds
|
|
1363
|
+
* `additionalContext.acceptUrl = <frontendPublicUrl><emailLinkPath>?token=<tokenValue>`
|
|
1364
|
+
* for the token-bearing notification email, so the recipient can act on the
|
|
1365
|
+
* token straight from the email. Without it, only the raw `tokenValue` is
|
|
1366
|
+
* exposed and the email falls back to its generic (sign-in) CTA. Use a stable
|
|
1367
|
+
* framework route — the backend cannot import frontend route constants.
|
|
1368
|
+
*/
|
|
1369
|
+
emailLinkPath?: string;
|
|
1370
|
+
};
|
|
1371
|
+
```
|
|
1372
|
+
## Import Origins
|
|
1373
|
+
|
|
1374
|
+
- `@wildo-ai/saas-models`
|
|
1375
|
+
|
|
1376
|
+
## Source Excerpts
|
|
1377
|
+
|
|
1378
|
+
### Origin Package: `@wildo-ai/saas-models`
|
|
1379
|
+
|
|
1380
|
+
```typescript
|
|
1381
|
+
*
|
|
1382
|
+
* Relational search descriptor — lets a SEARCH operation match rows of THIS
|
|
1383
|
+
* resource by searching a RELATED ("juncted") resource's own searchable fields,
|
|
1384
|
+
* WITHOUT denormalizing those fields onto this resource. Author it inline inside
|
|
1385
|
+
* a SEARCH operation's `searchableFields` array, alongside plain own-field names.
|
|
1386
|
+
*
|
|
1387
|
+
* WHY IT EXISTS — some human-meaningful search keys live on a related resource
|
|
1388
|
+
* and are MUTABLE there (e.g. a user's first/last name on a user-profile
|
|
1389
|
+
* resource). Copying such a field onto this row would go stale and demand a
|
|
1390
|
+
* change-propagation sync on every mutation path of the owning resource. This
|
|
1391
|
+
* descriptor reuses the related resource's OWN searchable surface at query time
|
|
1392
|
+
* instead — single source of truth, never stale, no sync hooks to maintain.
|
|
1393
|
+
*
|
|
1394
|
+
* HOW IT WORKS (tenant-safe by construction) — at search time the framework runs
|
|
1395
|
+
* a secondary, system-level match on {@link relatedResource} using {@link fields}
|
|
1396
|
+
* (defaulting to that resource's own string `searchableFields`), collects the
|
|
1397
|
+
* matching rows' {@link relatedJoinField} values, and adds "this resource's
|
|
1398
|
+
* {@link localField} is one of those values" as an extra match branch, OR-ed
|
|
1399
|
+
* with the own-field matches. The primary query stays scoped (e.g. by
|
|
1400
|
+
* organization) via the normal contextual filter, so the secondary match's own
|
|
1401
|
+
* (often global) scope is irrelevant to safety: a row outside the caller's scope
|
|
1402
|
+
* can never enter the already-scoped primary result set. Because the join
|
|
1403
|
+
* collapses to a single-collection lookup, pagination and totals are unchanged.
|
|
1404
|
+
*
|
|
1405
|
+
* FAIL-SAFE — a relational entry only ever ADDS matches within the already-scoped
|
|
1406
|
+
* set, so if the related resource cannot be resolved the entry contributes
|
|
1407
|
+
* nothing (the search under-matches; it can never widen visibility).
|
|
1408
|
+
*
|
|
1409
|
+
* @remarks Import from `@wildo-ai/saas-models`. Supported on MongoDB-backed
|
|
1410
|
+
* resources today; on a PostgreSQL-backed resource the relational entries are
|
|
1411
|
+
* skipped and only the own-field entries apply (own-field search is unaffected).
|
|
1412
|
+
*
|
|
1413
|
+
* @example
|
|
1414
|
+
* // Search org members by the linked user's name. The user's firstName/lastName
|
|
1415
|
+
* // live on a separate USER_PROFILES resource (mutable) and are deliberately NOT
|
|
1416
|
+
* // copied onto the member row; both members and profiles carry the same `userId`,
|
|
1417
|
+
* // so we join on it and reuse the profile's own searchableFields.
|
|
1418
|
+
* searchableFields: [
|
|
1419
|
+
* 'userEmail',
|
|
1420
|
+
* { localField: 'userId', relatedResource: CoreResourceType.USER_PROFILES,
|
|
1421
|
+
* relatedJoinField: 'userId', fields: ['firstName', 'lastName'] },
|
|
1422
|
+
* ]
|
|
1423
|
+
*/
|
|
1424
|
+
export type SearchableRelationDescriptor = {
|
|
1425
|
+
/** Field on THIS resource matched against the resolved related ids (e.g. `userId`). */
|
|
1426
|
+
localField: string;
|
|
1427
|
+
/** The related resource whose own searchable surface is reused (e.g. `USER_PROFILES`). */
|
|
1428
|
+
relatedResource: ResourceType;
|
|
1429
|
+
/**
|
|
1430
|
+
* Field on the related resource whose values are matched against
|
|
1431
|
+
* {@link localField}'s values. Defaults to the related primary key (`_id`) —
|
|
1432
|
+
* set it explicitly when joining on a shared key other than the primary key
|
|
1433
|
+
* (e.g. members and profiles both carry `userId`).
|
|
1434
|
+
*/
|
|
1435
|
+
relatedJoinField?: string;
|
|
1436
|
+
/**
|
|
1437
|
+
* Which related fields to match the search term against. Defaults to the
|
|
1438
|
+
* related resource's OWN (string) `searchableFields` — i.e. literally "use the
|
|
1439
|
+
* juncted element's own search". Provide an explicit list only to narrow it.
|
|
1440
|
+
*/
|
|
1441
|
+
fields?: string[];
|
|
1442
|
+
};
|
|
1443
|
+
|
|
1444
|
+
/**
|
|
1445
|
+
* A SEARCH `searchableFields` entry: either an OWN-resource field name (string),
|
|
1446
|
+
* matched on this collection, or a {@link SearchableRelationDescriptor} that
|
|
1447
|
+
* matches via a related resource. The two forms coexist in one array and are
|
|
1448
|
+
* OR-ed together at query time.
|
|
1449
|
+
*/
|
|
1450
|
+
export type SearchableFieldDescriptor = string | SearchableRelationDescriptor;
|
|
1451
|
+
|
|
1452
|
+
/** Runtime guard distinguishing a relational descriptor from an own-field name. */
|
|
1453
|
+
export function isSearchableRelationDescriptor(
|
|
1454
|
+
field: SearchableFieldDescriptor
|
|
1455
|
+
): field is SearchableRelationDescriptor {
|
|
1456
|
+
return typeof field === 'object' && field !== null;
|
|
1457
|
+
}
|
|
1458
|
+
```
|
|
1459
|
+
## Import Origins
|
|
1460
|
+
|
|
1461
|
+
- `@wildo-ai/saas-models`
|
|
1462
|
+
|
|
1463
|
+
## Source Excerpts
|
|
1464
|
+
|
|
1465
|
+
### Origin Package: `@wildo-ai/saas-models`
|
|
1466
|
+
|
|
1467
|
+
```typescript
|
|
1468
|
+
*
|
|
1469
|
+
* A **label-forwarding descriptor** — declares how a junction (or any) resource
|
|
1470
|
+
* row labels itself using fields from a RELATED resource, resolved SERVER-SIDE
|
|
1471
|
+
* and projected onto the response DTO via {@link forwardedLabel}.
|
|
1472
|
+
*
|
|
1473
|
+
* Reuses the join vocabulary of `SearchableRelationDescriptor` (from
|
|
1474
|
+
* `@wildo-ai/saas-models`), resolved in the read direction. WHY a
|
|
1475
|
+
* descriptor and not denormalization: the human-meaningful label lives on a
|
|
1476
|
+
* RELATED resource and is MUTABLE there (a user's first/last name on
|
|
1477
|
+
* `USER_PROFILES`); copying it onto the junction would go stale and demand a sync
|
|
1478
|
+
* hook on every mutation path. Resolving the related resource's own fields at read
|
|
1479
|
+
* time is single-source-of-truth, never stale, and reaches a resource DIFFERENT
|
|
1480
|
+
* from the foreign key's declared target (the name lives on `USER_PROFILES`, not
|
|
1481
|
+
* on `users`, the FK target — joined on the shared `userId`).
|
|
1482
|
+
*
|
|
1483
|
+
* TENANT SAFETY (by construction): the descriptor only resolves related rows for
|
|
1484
|
+
* `localField` values that appear on rows the caller can ALREADY see (its own
|
|
1485
|
+
* already-scoped page), so the related read is a bounded SYSTEM read that can
|
|
1486
|
+
* never widen visibility — the same contract `SearchableRelationDescriptor`
|
|
1487
|
+
* relies on, mirrored for reads. The viewer therefore needs no read access to the
|
|
1488
|
+
* related row itself (e.g. another member's `user_profile`).
|
|
1489
|
+
*
|
|
1490
|
+
* @remarks Resolution requires the related resource to be MongoDB-backed. If the
|
|
1491
|
+
* related resource is PostgreSQL-backed the read is skipped and the label degrades
|
|
1492
|
+
* to `fallback` — parity is a future enhancement, mirroring the same adapter gap
|
|
1493
|
+
* on `SearchableRelationDescriptor`. Import from `@wildo-ai/saas-models`.
|
|
1494
|
+
*
|
|
1495
|
+
* @example
|
|
1496
|
+
* // organizationMembers labels itself by the linked user's name. firstName/
|
|
1497
|
+
* // lastName live on USER_PROFILES (mutable, deliberately NOT denormalized);
|
|
1498
|
+
* // both members and profiles carry the same `userId`, so join on it.
|
|
1499
|
+
* instanceLabel: forwardedLabel({
|
|
1500
|
+
* localField: 'userId',
|
|
1501
|
+
* relatedResource: CoreResourceType.USER_PROFILES,
|
|
1502
|
+
* relatedJoinField: 'userId',
|
|
1503
|
+
* fields: ['firstName', 'lastName'],
|
|
1504
|
+
* fallbackField: 'userEmail', // shown when the profile/name is unavailable
|
|
1505
|
+
* })
|
|
1506
|
+
*/
|
|
1507
|
+
export type LabelRelationDescriptor = {
|
|
1508
|
+
/** Field on THIS resource holding the join value (e.g. `userId`). */
|
|
1509
|
+
localField: string;
|
|
1510
|
+
/** The related resource whose fields are rendered into the label (e.g. `USER_PROFILES`). */
|
|
1511
|
+
relatedResource: ResourceType;
|
|
1512
|
+
/**
|
|
1513
|
+
* Field on the related resource matched against {@link localField}'s value.
|
|
1514
|
+
* Defaults to the related primary key (`_id`) — set it explicitly when joining
|
|
1515
|
+
* on a shared key other than the primary key (e.g. members and profiles both
|
|
1516
|
+
* carry `userId`).
|
|
1517
|
+
*/
|
|
1518
|
+
relatedJoinField?: string;
|
|
1519
|
+
/**
|
|
1520
|
+
* Related fields to render, in order. Required: unlike search (which can default
|
|
1521
|
+
* to the related resource's own `searchableFields`), a label must declare what
|
|
1522
|
+
* to show. Resolving the related resource's OWN label as a default is a possible
|
|
1523
|
+
* future enhancement (it needs server-side label resolution that does not exist
|
|
1524
|
+
* in this path today).
|
|
1525
|
+
*/
|
|
1526
|
+
fields: string[];
|
|
1527
|
+
/** Join separator between rendered field values. Default `' '` (single space). */
|
|
1528
|
+
separator?: string;
|
|
1529
|
+
/**
|
|
1530
|
+
* OWN-field on THIS resource used as the fallback label when the related row is
|
|
1531
|
+
* missing or every rendered field is empty — preferred over the static
|
|
1532
|
+
* {@link fallback}. Use an immutable own identifier (e.g. a denormalized
|
|
1533
|
+
* `userEmail`) so a row without a resolvable related label still shows a human
|
|
1534
|
+
* value instead of degrading to a raw id. Must be on the summary row (a summary
|
|
1535
|
+
* field) to be available to the resolver.
|
|
1536
|
+
*/
|
|
1537
|
+
fallbackField?: string;
|
|
1538
|
+
/**
|
|
1539
|
+
* Static label of last resort, when the related row is missing/empty AND
|
|
1540
|
+
* {@link fallbackField} is unset or also empty. Default `''` (empty).
|
|
1541
|
+
*/
|
|
1542
|
+
fallback?: string;
|
|
1543
|
+
};
|
|
1544
|
+
```
|
|
1545
|
+
## Import Origins
|
|
1546
|
+
|
|
1547
|
+
- `@wildo-ai/saas-models`
|
|
1548
|
+
|
|
1549
|
+
## Source Excerpts
|
|
1550
|
+
|
|
1551
|
+
### Origin Package: `@wildo-ai/saas-models`
|
|
1552
|
+
|
|
1553
|
+
```typescript
|
|
1554
|
+
*
|
|
1555
|
+
* Categorized resource relationships produced by `transformResourceRelationships()`.
|
|
1556
|
+
*
|
|
1557
|
+
* All relationships — including conditional ones (those with `discriminator` or `condition`) —
|
|
1558
|
+
* are stored flat in these three buckets. There is no separate `inheritanceSchemaRelationships`
|
|
1559
|
+
* bucket; that structure was removed because it was populated but never consumed at runtime,
|
|
1560
|
+
* making the conditional relationship system non-functional.
|
|
1561
|
+
*
|
|
1562
|
+
* The flat design means:
|
|
1563
|
+
* - **Factory/startup**: All relationships are categorized structurally (by resourceType
|
|
1564
|
+
* and cardinality), regardless of whether they have conditions.
|
|
1565
|
+
* - **Runtime**: Consumers (ResourceContext, ServicesRegistryHandler, ContainerNested)
|
|
1566
|
+
* evaluate `discriminator`/`condition` inline when actual parent data is available.
|
|
1567
|
+
*
|
|
1568
|
+
* M:N relationships are decomposed into synthetic 1:N relationships and placed into the
|
|
1569
|
+
* appropriate bucket. Synthetic relationships for entity→junction carry the original
|
|
1570
|
+
* `discriminator` and `condition` from the M:N declaration.
|
|
1571
|
+
*
|
|
1572
|
+
* @see ResourceRelationship — for the full type including optional `condition` function.
|
|
1573
|
+
* @see transformResourceRelationships — in resources-config.shared.factory.ts for categorization logic.
|
|
1574
|
+
*/
|
|
1575
|
+
export type ResourceConfiguration_ResourceRelationships = {
|
|
1576
|
+
parentRelationships: ResourceRelationship[],
|
|
1577
|
+
childRelationships: ResourceRelationship[],
|
|
1578
|
+
selfRelationships: ResourceRelationship[],
|
|
1579
|
+
}
|
|
1580
|
+
```
|
|
1581
|
+
## Import Origins
|
|
1582
|
+
|
|
1583
|
+
- `@wildo-ai/saas-models`
|
|
1584
|
+
|
|
1585
|
+
## Source Excerpts
|
|
1586
|
+
|
|
1587
|
+
### Origin Package: `@wildo-ai/saas-models`
|
|
1588
|
+
|
|
1589
|
+
```typescript
|
|
1590
|
+
*
|
|
1591
|
+
* Full resource configuration type.
|
|
1592
|
+
* NOTE: databaseSchema has been removed. Backend-only fields are now marked with
|
|
1593
|
+
* the isBackendOnly decorator in mainSchema and are stripped at the service layer.
|
|
1594
|
+
*/
|
|
1595
|
+
export type ResourceConfiguration<
|
|
1596
|
+
TCustomOperationEnum extends EnumLikeType | undefined,
|
|
1597
|
+
TCoreOperationEnum extends Partial<CoreResourceOperation> | undefined,
|
|
1598
|
+
TMainSchema extends z.ZodTypeAny,
|
|
1599
|
+
> = {
|
|
1600
|
+
isDisabled: boolean, // default false
|
|
1601
|
+
|
|
1602
|
+
resourcePrimaryScope : ResourcePrimaryScope, // default ResourcePrimaryScope.ORGANIZATIONS
|
|
1603
|
+
resourceIdentifier : ResourceType,
|
|
1604
|
+
resourceFieldIdentifier : ResourceFieldIdentifier,
|
|
1605
|
+
coreOperations: TCoreOperationEnum[],
|
|
1606
|
+
customOperation?: TCustomOperationEnum, // default undefined
|
|
1607
|
+
mainSchema: TMainSchema,
|
|
1608
|
+
resourceRelationships : ResourceConfiguration_ResourceRelationships,
|
|
1609
|
+
inheritenceSchemaDefinition?: ResourceConfiguration_InheritanceSchemaDefinition<EnumLikeType,TMainSchema>,
|
|
1610
|
+
|
|
1611
|
+
/**
|
|
1612
|
+
* Persistence adapter (database type) for this resource.
|
|
1613
|
+
* - `mongodb`: MongoDB with Mongoose ORM
|
|
1614
|
+
* - `postgresql`: PostgreSQL (SQL adapter)
|
|
1615
|
+
*
|
|
1616
|
+
* Resolved at runtime from:
|
|
1617
|
+
* 1. This field (if specified)
|
|
1618
|
+
* 2. `appConfig.database.defaultAdapter` (fallback)
|
|
1619
|
+
*
|
|
1620
|
+
* A value disagreeing with the application default is admitted at registration ONLY when
|
|
1621
|
+
* {@link ResourceConfiguration.persistenceAdapterIsolation} is declared beside it.
|
|
1622
|
+
*/
|
|
1623
|
+
persistenceAdapter?: PersistenceAdapterType,
|
|
1624
|
+
|
|
1625
|
+
/**
|
|
1626
|
+
* This resource's declared relationship to cross-adapter atomic write boundaries; see the
|
|
1627
|
+
* authoring-side declaration and {@link ResourcePersistenceAdapterIsolation} for the full
|
|
1628
|
+
* rationale.
|
|
1629
|
+
*
|
|
1630
|
+
* Carried through to the resolved config UNMATERIALISED (no default is substituted) because
|
|
1631
|
+
* absence is semantically load-bearing here: the registry's admission asks whether the author
|
|
1632
|
+
* MADE the claim, and a materialised default would answer that question for them.
|
|
1633
|
+
*/
|
|
1634
|
+
persistenceAdapterIsolation?: ResourcePersistenceAdapterIsolationType,
|
|
1635
|
+
|
|
1636
|
+
/**
|
|
1637
|
+
* The external HTTP-API binding — present exactly when `persistenceAdapter` is `HTTP_API`
|
|
1638
|
+
* (factory-enforced both ways). See the authoring-side declaration for the full contract.
|
|
1639
|
+
*/
|
|
1640
|
+
httpApiBinding?: HttpApiResourceBinding,
|
|
1641
|
+
/** REQUIRED when `persistenceAdapter` is INTROSPECTION; meaningless otherwise. */
|
|
1642
|
+
introspectionBinding?: IntrospectionResourceBinding,
|
|
1643
|
+
|
|
1644
|
+
/**
|
|
1645
|
+
* The inbound ETL pipeline, when this LOCAL resource declared one — parsed + coherence-checked
|
|
1646
|
+
* by the factory (see the authoring-side declaration for the full contract).
|
|
1647
|
+
*/
|
|
1648
|
+
externalDataPipeline?: ExternalDataPipelineDeclaration,
|
|
1649
|
+
|
|
1650
|
+
isSystemResource: boolean, // default false - true for core system resources (organizations, users, etc.), false for tenant-specific resources
|
|
1651
|
+
|
|
1652
|
+
/**
|
|
1653
|
+
* Whether this resource's own primary-key URL segment names the CALLER (see the authoring-side
|
|
1654
|
+
* declaration for the full rationale).
|
|
1655
|
+
*
|
|
1656
|
+
* Materialised by the factory to a concrete boolean, defaulting to `true`, so the consuming guard
|
|
1657
|
+
* never has to distinguish "declared true" from "not declared" — an un-migrated or hand-built
|
|
1658
|
+
* config keeps the identity-coherence refusal.
|
|
1659
|
+
*/
|
|
1660
|
+
primaryKeyIdentifiesInitiator: boolean,
|
|
1661
|
+
|
|
1662
|
+
/**
|
|
1663
|
+
* Opt-in policy gating the ACL-bypassing `readAsSystem` / `listAsSystem`
|
|
1664
|
+
* primitives for this resource. Optional on the resolved config so that
|
|
1665
|
+
* non-factory-built configs (mocks/tests) need not declare it; the factory
|
|
1666
|
+
* always materialises a concrete value (defaulting both verbs to FORBIDDEN
|
|
1667
|
+
* when unauthored). The system-read primitives treat an absent policy — or
|
|
1668
|
+
* any verb not explicitly ALLOWED — as forbidden and throw.
|
|
1669
|
+
*/
|
|
1670
|
+
systemAccessPolicy?: ResourceSystemAccessPolicy,
|
|
1671
|
+
|
|
1672
|
+
/**
|
|
1673
|
+
* W7.3a: Marks this resource as accessible to anonymous sessions.
|
|
1674
|
+
* When true, the engine generates dual URL paths and a STANDALONE relationship to ANONYMOUS_USERS.
|
|
1675
|
+
*/
|
|
1676
|
+
isAnonymizable: boolean,
|
|
1677
|
+
|
|
1678
|
+
/**
|
|
1679
|
+
* W7.3a: Transposition policy for anonymous→authenticated ownership transfer.
|
|
1680
|
+
* Only meaningful when isAnonymizable is true. Defaults to ADD.
|
|
1681
|
+
*/
|
|
1682
|
+
transpositionPolicy: ResourceTranspositionPolicy,
|
|
1683
|
+
|
|
1684
|
+
/** Resolved impersonalization opt-in (undefined when the resource did not opt into `retentionPolicy`). */
|
|
1685
|
+
retentionPolicy?: ResourceRetentionPolicy,
|
|
1686
|
+
|
|
1687
|
+
/**
|
|
1688
|
+
* Resolved data-subject declaration. Present exactly when `retentionPolicy` is (the factory refuses
|
|
1689
|
+
* a retention-governed resource that declares no `dataSubjectPolicy`, and refuses a
|
|
1690
|
+
* `dataSubjectPolicy` on a resource with no `retentionPolicy`), so a consumer that has one may read
|
|
1691
|
+
* the other without a second existence check.
|
|
1692
|
+
*/
|
|
1693
|
+
dataSubjectPolicy?: ResourceDataSubjectPolicy,
|
|
1694
|
+
|
|
1695
|
+
/** Resolved portability default (undefined when the resource declared no `portabilityPolicy` — an
|
|
1696
|
+
* Art. 15 export is unaffected, an Art. 20 export refuses on any field that also lacks its own
|
|
1697
|
+
* `.portabilityProvenance()`). */
|
|
1698
|
+
portabilityPolicy?: ResourcePortabilityPolicy,
|
|
1699
|
+
|
|
1700
|
+
operations : ResourceConfiguration_Operation<TCustomOperationEnum, TCoreOperationEnum, TMainSchema>[]
|
|
1701
|
+
}
|
|
1702
|
+
```
|
|
1703
|
+
## Import Origins
|
|
1704
|
+
|
|
1705
|
+
- `@wildo-ai/saas-models`
|
|
1706
|
+
|
|
1707
|
+
## Source Excerpts
|
|
1708
|
+
|
|
1709
|
+
### Origin Package: `@wildo-ai/saas-models`
|
|
1710
|
+
|
|
1711
|
+
```typescript
|
|
1712
|
+
*
|
|
1713
|
+
* Aggregated registry passed to app bootstrap (relationships + per-resource configs + FK maps).
|
|
1714
|
+
*/
|
|
1715
|
+
export type ResourcesRegistry = {
|
|
1716
|
+
notificationBadgeDefinitions: NotificationBadgeDefinition[];
|
|
1717
|
+
additionalUserNotificationDefinitions: UserNotificationDefinition[];
|
|
1718
|
+
resourceRelationships: ResourceRelationship[];
|
|
1719
|
+
resourceConfigurations: {
|
|
1720
|
+
[key: ResourceType]: AnyResourceConfiguration ;
|
|
1721
|
+
};
|
|
1722
|
+
/**
|
|
1723
|
+
* The resource types the APPLICATION registered — its own, never the engine's.
|
|
1724
|
+
*
|
|
1725
|
+
* The registry composes app and core factory maps into one `resourceConfigurations`, which is what
|
|
1726
|
+
* every runtime consumer wants. This is the one place the two are still distinguishable, so the
|
|
1727
|
+
* split is recorded HERE rather than re-derived by each consumer from a core key set — which would
|
|
1728
|
+
* be a second enumeration of a population this file already knows.
|
|
1729
|
+
*
|
|
1730
|
+
* Its consumer today is the personal-data declaration report, which asks a question only an
|
|
1731
|
+
* application author can act on: the engine declares its own posture on ~85 resources, and putting
|
|
1732
|
+
* those in front of a reader of a report about THEIR application is how a diagnostic channel stops
|
|
1733
|
+
* being read.
|
|
1734
|
+
*/
|
|
1735
|
+
applicationResourceTypes: ResourceType[];
|
|
1736
|
+
/**
|
|
1737
|
+
* Map of ResourceType to its standard field identifier (e.g., USERS -> userId).
|
|
1738
|
+
* Used for FK field resolution without string manipulation.
|
|
1739
|
+
*/
|
|
1740
|
+
allResourceFieldIdentifiers: Record<ResourceType, string>;
|
|
1741
|
+
/**
|
|
1742
|
+
* Reverse map of field identifier to ResourceType (e.g., userId -> USERS).
|
|
1743
|
+
* Used for quick lookup of resource type from a FK field name.
|
|
1744
|
+
*/
|
|
1745
|
+
fieldIdentifierToResourceType: Record<string, ResourceType>;
|
|
1746
|
+
/**
|
|
1747
|
+
* Scope-required reference-search junctions, keyed by `${target}|${scope}`.
|
|
1748
|
+
* When a foreign key targets `T` from a resource whose primary scope is `S`,
|
|
1749
|
+
* and `T ↔ S` is a MANY-to-MANY relationship via junction `J`, a reference
|
|
1750
|
+
* people-picker searches `T` scoped to the caller's current `S` through `J`
|
|
1751
|
+
* (rather than enumerating every `T`). Derived from the registered M:N
|
|
1752
|
+
* relationships at registry init.
|
|
1753
|
+
*/
|
|
1754
|
+
manyToManyScopeJunctions: ManyToManyScopeJunctionMap;
|
|
1755
|
+
/**
|
|
1756
|
+
* Resources narrowed by ORGANIZATION UNIT, keyed by resource type — the engine's opt-ins merged
|
|
1757
|
+
* with the application's, validated at boot against the authorization-plane containment rule.
|
|
1758
|
+
*
|
|
1759
|
+
* Opting a resource in means: a principal whose authority for it comes ONLY from a unit grant is
|
|
1760
|
+
* admitted by the operation gate and then confined to the rows of those units. Narrowing is
|
|
1761
|
+
* ADDITIVE — an organization-wide grant that already satisfies the operation is never narrowed —
|
|
1762
|
+
* so opting in can only widen who can reach the resource, never shrink an existing result set.
|
|
1763
|
+
*
|
|
1764
|
+
* Empty for an application that declares none, which is the default: narrowing is never inferred
|
|
1765
|
+
* from the presence of a unit field. See `OrganizationUnitNarrowingDeclaration`.
|
|
1766
|
+
*/
|
|
1767
|
+
organizationUnitNarrowing: Readonly<Partial<Record<ResourceType, OrganizationUnitNarrowingDeclaration>>>;
|
|
1768
|
+
}
|
|
1769
|
+
```
|