@wildo-ai/saas-specifications 1.1.1 → 1.1.2
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/dist/assurance/external-framework-mapping.json +980 -0
- package/dist/esm/_core/brand/brand.family-aspects.d.ts +3 -0
- package/dist/esm/_core/brand/brand.family-aspects.d.ts.map +1 -0
- package/dist/esm/_core/brand/brand.family-aspects.js +51 -0
- package/dist/esm/_core/brand/brand.family-aspects.js.map +1 -0
- package/dist/esm/_core/build-plan/build-plan.family-aspects.d.ts +3 -0
- package/dist/esm/_core/build-plan/build-plan.family-aspects.d.ts.map +1 -0
- package/dist/esm/_core/build-plan/build-plan.family-aspects.js +28 -0
- package/dist/esm/_core/build-plan/build-plan.family-aspects.js.map +1 -0
- package/dist/esm/_core/business-model-lite/business-model.family-aspects.d.ts +3 -0
- package/dist/esm/_core/business-model-lite/business-model.family-aspects.d.ts.map +1 -0
- package/dist/esm/_core/business-model-lite/business-model.family-aspects.js +21 -0
- package/dist/esm/_core/business-model-lite/business-model.family-aspects.js.map +1 -0
- package/dist/esm/_core/chart-view-specification.schemas.d.ts +11 -0
- package/dist/esm/_core/chart-view-specification.schemas.d.ts.map +1 -1
- package/dist/esm/_core/chart-view-specification.schemas.js.map +1 -1
- package/dist/esm/_core/compliance-documents/compliance-document-candidate-generation.schemas.d.ts +85 -0
- package/dist/esm/_core/compliance-documents/compliance-document-candidate-generation.schemas.d.ts.map +1 -1
- package/dist/esm/_core/compliance-documents/compliance-document-candidate-generation.schemas.js +41 -0
- package/dist/esm/_core/compliance-documents/compliance-document-candidate-generation.schemas.js.map +1 -1
- package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.d.ts +168 -2
- package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.d.ts.map +1 -1
- package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.js +98 -9
- package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.js.map +1 -1
- package/dist/esm/_core/compliance-documents/compliance-documents.family-aspects.d.ts +12 -0
- package/dist/esm/_core/compliance-documents/compliance-documents.family-aspects.d.ts.map +1 -0
- package/dist/esm/_core/compliance-documents/compliance-documents.family-aspects.js +47 -0
- package/dist/esm/_core/compliance-documents/compliance-documents.family-aspects.js.map +1 -0
- package/dist/esm/_core/compliance-documents/document-fact-specification-generation.schemas.d.ts.map +1 -1
- package/dist/esm/_core/compliance-documents/document-fact-specification-generation.schemas.js +8 -3
- package/dist/esm/_core/compliance-documents/document-fact-specification-generation.schemas.js.map +1 -1
- package/dist/esm/_core/compliance-documents/processor-register.family-aspects.d.ts +21 -0
- package/dist/esm/_core/compliance-documents/processor-register.family-aspects.d.ts.map +1 -0
- package/dist/esm/_core/compliance-documents/processor-register.family-aspects.js +40 -0
- package/dist/esm/_core/compliance-documents/processor-register.family-aspects.js.map +1 -0
- package/dist/esm/_core/composite-view-specification.schemas.d.ts +11 -0
- package/dist/esm/_core/composite-view-specification.schemas.d.ts.map +1 -1
- package/dist/esm/_core/composite-view-specification.schemas.js.map +1 -1
- package/dist/esm/_core/domain-plan/domain-plan.family-aspects.d.ts +3 -0
- package/dist/esm/_core/domain-plan/domain-plan.family-aspects.d.ts.map +1 -0
- package/dist/esm/_core/domain-plan/domain-plan.family-aspects.js +32 -0
- package/dist/esm/_core/domain-plan/domain-plan.family-aspects.js.map +1 -0
- package/dist/esm/_core/execution-view-specification.schemas.d.ts +11 -0
- package/dist/esm/_core/execution-view-specification.schemas.d.ts.map +1 -1
- package/dist/esm/_core/execution-view-specification.schemas.js.map +1 -1
- package/dist/esm/_core/family-aspects.registry.d.ts +18 -0
- package/dist/esm/_core/family-aspects.registry.d.ts.map +1 -0
- package/dist/esm/_core/family-aspects.registry.js +60 -0
- package/dist/esm/_core/family-aspects.registry.js.map +1 -0
- package/dist/esm/_core/family-aspects.schemas.d.ts +122 -0
- package/dist/esm/_core/family-aspects.schemas.d.ts.map +1 -0
- package/dist/esm/_core/family-aspects.schemas.js +15 -0
- package/dist/esm/_core/family-aspects.schemas.js.map +1 -0
- package/dist/esm/_core/feature-drafts/capability-map-output-set-generation.schemas.d.ts +11 -11
- package/dist/esm/_core/feature-drafts/feature-drafts.family-aspects.d.ts +3 -0
- package/dist/esm/_core/feature-drafts/feature-drafts.family-aspects.d.ts.map +1 -0
- package/dist/esm/_core/feature-drafts/feature-drafts.family-aspects.js +25 -0
- package/dist/esm/_core/feature-drafts/feature-drafts.family-aspects.js.map +1 -0
- package/dist/esm/_core/flows-actors-view-specification.schemas.d.ts +11 -0
- package/dist/esm/_core/flows-actors-view-specification.schemas.d.ts.map +1 -1
- package/dist/esm/_core/flows-actors-view-specification.schemas.js.map +1 -1
- package/dist/esm/_core/frontend-component-specification.schemas.d.ts.map +1 -1
- package/dist/esm/_core/frontend-component-specification.schemas.js +19 -1
- package/dist/esm/_core/frontend-component-specification.schemas.js.map +1 -1
- package/dist/esm/_core/full-custom-view-specification.schemas.d.ts +11 -0
- package/dist/esm/_core/full-custom-view-specification.schemas.d.ts.map +1 -1
- package/dist/esm/_core/full-custom-view-specification.schemas.js.map +1 -1
- package/dist/esm/_core/guidance-flow-specification.schemas.d.ts +11 -0
- package/dist/esm/_core/guidance-flow-specification.schemas.d.ts.map +1 -1
- package/dist/esm/_core/guidance-flow-specification.schemas.js +14 -0
- package/dist/esm/_core/guidance-flow-specification.schemas.js.map +1 -1
- package/dist/esm/_core/index.d.ts +2 -0
- package/dist/esm/_core/index.d.ts.map +1 -1
- package/dist/esm/_core/index.js +2 -0
- package/dist/esm/_core/index.js.map +1 -1
- package/dist/esm/_core/market/market-snapshot-generation.schemas.d.ts +22 -22
- package/dist/esm/_core/market/market.family-aspects.d.ts +9 -0
- package/dist/esm/_core/market/market.family-aspects.d.ts.map +1 -0
- package/dist/esm/_core/market/market.family-aspects.js +227 -0
- package/dist/esm/_core/market/market.family-aspects.js.map +1 -0
- package/dist/esm/_core/onboarding-view-specification.schemas.d.ts +11 -0
- package/dist/esm/_core/onboarding-view-specification.schemas.d.ts.map +1 -1
- package/dist/esm/_core/onboarding-view-specification.schemas.js +14 -0
- package/dist/esm/_core/onboarding-view-specification.schemas.js.map +1 -1
- package/dist/esm/_core/placement-plan/placement-plan.family-aspects.d.ts +3 -0
- package/dist/esm/_core/placement-plan/placement-plan.family-aspects.d.ts.map +1 -0
- package/dist/esm/_core/placement-plan/placement-plan.family-aspects.js +31 -0
- package/dist/esm/_core/placement-plan/placement-plan.family-aspects.js.map +1 -0
- package/dist/esm/_core/requirements/requirements.family-aspects.d.ts +9 -0
- package/dist/esm/_core/requirements/requirements.family-aspects.d.ts.map +1 -0
- package/dist/esm/_core/requirements/requirements.family-aspects.js +40 -0
- package/dist/esm/_core/requirements/requirements.family-aspects.js.map +1 -0
- package/dist/esm/_core/resource-specification.schemas.d.ts +22 -0
- package/dist/esm/_core/resource-specification.schemas.d.ts.map +1 -1
- package/dist/esm/_core/resource-specification.schemas.js.map +1 -1
- package/dist/esm/_core/roadmap/roadmap.family-aspects.d.ts +3 -0
- package/dist/esm/_core/roadmap/roadmap.family-aspects.d.ts.map +1 -0
- package/dist/esm/_core/roadmap/roadmap.family-aspects.js +26 -0
- package/dist/esm/_core/roadmap/roadmap.family-aspects.js.map +1 -0
- package/dist/esm/_core/vision/vision.family-aspects.d.ts +11 -0
- package/dist/esm/_core/vision/vision.family-aspects.d.ts.map +1 -0
- package/dist/esm/_core/vision/vision.family-aspects.js +63 -0
- package/dist/esm/_core/vision/vision.family-aspects.js.map +1 -0
- package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.d.ts +188 -33
- package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.d.ts.map +1 -1
- package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.js +158 -57
- package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.js.map +1 -1
- package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.d.ts +38 -4
- package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.d.ts.map +1 -1
- package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.js +37 -3
- package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.js.map +1 -1
- package/dist/esm/application-creation/document-facts.family-aspects.d.ts +12 -0
- package/dist/esm/application-creation/document-facts.family-aspects.d.ts.map +1 -0
- package/dist/esm/application-creation/document-facts.family-aspects.js +37 -0
- package/dist/esm/application-creation/document-facts.family-aspects.js.map +1 -0
- package/dist/esm/application-creation/document-release-policy.family-aspects.d.ts +3 -0
- package/dist/esm/application-creation/document-release-policy.family-aspects.d.ts.map +1 -0
- package/dist/esm/application-creation/document-release-policy.family-aspects.js +23 -0
- package/dist/esm/application-creation/document-release-policy.family-aspects.js.map +1 -0
- package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts +93 -62
- package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts.map +1 -1
- package/dist/esm/application-creation/playbooks.application-creation.schemas.js +114 -59
- package/dist/esm/application-creation/playbooks.application-creation.schemas.js.map +1 -1
- package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.d.ts +2 -0
- package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.d.ts.map +1 -1
- package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.js +2 -0
- package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.js.map +1 -1
- package/dist/esm/application-creation.exports.d.ts +11 -0
- package/dist/esm/application-creation.exports.d.ts.map +1 -1
- package/dist/esm/application-creation.exports.js +11 -0
- package/dist/esm/application-creation.exports.js.map +1 -1
- package/dist/esm/assurance/assurance-authority-basis.definitions.d.ts +976 -2
- package/dist/esm/assurance/assurance-authority-basis.definitions.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-authority-basis.definitions.js +2026 -61
- package/dist/esm/assurance/assurance-authority-basis.definitions.js.map +1 -1
- package/dist/esm/assurance/assurance-authority-basis.schemas.d.ts +1 -0
- package/dist/esm/assurance/assurance-authority-basis.schemas.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-document-system.definitions.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-document-system.definitions.js +18 -3
- package/dist/esm/assurance/assurance-document-system.definitions.js.map +1 -1
- package/dist/esm/assurance/assurance-document-system.schemas.d.ts +32 -2
- package/dist/esm/assurance/assurance-document-system.schemas.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-document-system.schemas.js +32 -2
- package/dist/esm/assurance/assurance-document-system.schemas.js.map +1 -1
- package/dist/esm/assurance/assurance-external-framework-mapping.d.ts +90 -0
- package/dist/esm/assurance/assurance-external-framework-mapping.d.ts.map +1 -0
- package/dist/esm/assurance/assurance-external-framework-mapping.js +134 -0
- package/dist/esm/assurance/assurance-external-framework-mapping.js.map +1 -0
- package/dist/esm/assurance/assurance-objective-catalog.definitions.d.ts +71 -1
- package/dist/esm/assurance/assurance-objective-catalog.definitions.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-objective-catalog.definitions.js +545 -5
- package/dist/esm/assurance/assurance-objective-catalog.definitions.js.map +1 -1
- package/dist/esm/assurance/assurance-program-generation.schemas.d.ts +141 -0
- package/dist/esm/assurance/assurance-program-generation.schemas.d.ts.map +1 -0
- package/dist/esm/assurance/assurance-program-generation.schemas.js +377 -0
- package/dist/esm/assurance/assurance-program-generation.schemas.js.map +1 -0
- package/dist/esm/assurance/assurance-program.family-aspects.d.ts +13 -0
- package/dist/esm/assurance/assurance-program.family-aspects.d.ts.map +1 -0
- package/dist/esm/assurance/assurance-program.family-aspects.js +16 -0
- package/dist/esm/assurance/assurance-program.family-aspects.js.map +1 -0
- package/dist/esm/assurance/assurance-program.schemas.d.ts +30 -6
- package/dist/esm/assurance/assurance-program.schemas.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-program.schemas.js +29 -6
- package/dist/esm/assurance/assurance-program.schemas.js.map +1 -1
- package/dist/esm/assurance/assurance-source-registry.definitions.d.ts +1 -0
- package/dist/esm/assurance/assurance-source-registry.definitions.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-source-registry.definitions.js +12 -0
- package/dist/esm/assurance/assurance-source-registry.definitions.js.map +1 -1
- package/dist/esm/assurance/assurance-sources.schemas.d.ts +76 -0
- package/dist/esm/assurance/assurance-sources.schemas.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-sources.schemas.js +59 -0
- package/dist/esm/assurance/assurance-sources.schemas.js.map +1 -1
- package/dist/esm/assurance/document-publication.family-aspects.d.ts +29 -0
- package/dist/esm/assurance/document-publication.family-aspects.d.ts.map +1 -0
- package/dist/esm/assurance/document-publication.family-aspects.js +48 -0
- package/dist/esm/assurance/document-publication.family-aspects.js.map +1 -0
- package/dist/esm/assurance.exports.d.ts +2 -0
- package/dist/esm/assurance.exports.d.ts.map +1 -1
- package/dist/esm/assurance.exports.js +2 -0
- package/dist/esm/assurance.exports.js.map +1 -1
- package/dist/esm/companion-exports.d.ts +19 -2
- package/dist/esm/companion-exports.d.ts.map +1 -1
- package/dist/esm/companion-exports.js.map +1 -1
- package/dist/esm/engine/applications/resources/application-api-keys.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/applications/resources/application-api-keys.resource.specification.js +2 -0
- package/dist/esm/engine/applications/resources/application-api-keys.resource.specification.js.map +1 -1
- package/dist/esm/engine/applications/resources/application-metadata.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/applications/resources/application-metadata.resource.specification.js +3 -1
- package/dist/esm/engine/applications/resources/application-metadata.resource.specification.js.map +1 -1
- package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.js +3 -1
- package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.js.map +1 -1
- package/dist/esm/engine/applications/resources/application-versions.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/applications/resources/application-versions.resource.specification.js +3 -1
- package/dist/esm/engine/applications/resources/application-versions.resource.specification.js.map +1 -1
- package/dist/esm/engine/applications/resources/applications.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/applications/resources/applications.resource.specification.js +3 -1
- package/dist/esm/engine/applications/resources/applications.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/consumable-tokens.resource.specification.d.ts +36 -0
- package/dist/esm/engine/auth/resources/consumable-tokens.resource.specification.d.ts.map +1 -0
- package/dist/esm/engine/auth/resources/consumable-tokens.resource.specification.js +193 -0
- package/dist/esm/engine/auth/resources/consumable-tokens.resource.specification.js.map +1 -0
- package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.d.ts +1 -1
- package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.js +2 -0
- package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/organization-api-keys.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/organization-api-keys.resource.specification.js +2 -0
- package/dist/esm/engine/auth/resources/organization-api-keys.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.js +3 -1
- package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.d.ts +1 -1
- package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.js +2 -0
- package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/scim-provisioning-config.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/scim-provisioning-config.resource.specification.js +2 -0
- package/dist/esm/engine/auth/resources/scim-provisioning-config.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/scim-tokens.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/scim-tokens.resource.specification.js +2 -0
- package/dist/esm/engine/auth/resources/scim-tokens.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/siem-delivery-dlq.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/siem-delivery-dlq.resource.specification.js +2 -0
- package/dist/esm/engine/auth/resources/siem-delivery-dlq.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/siem-export-config.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/siem-export-config.resource.specification.js +6 -4
- package/dist/esm/engine/auth/resources/siem-export-config.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/sso-config.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/sso-config.resource.specification.js +2 -0
- package/dist/esm/engine/auth/resources/sso-config.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/sso-connections.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/sso-connections.resource.specification.js +2 -0
- package/dist/esm/engine/auth/resources/sso-connections.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.d.ts +2 -2
- package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.js +2 -0
- package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/credit-pools.resource.specification.d.ts +8 -8
- package/dist/esm/engine/billing/resources/credit-pools.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/billing/resources/credit-pools.resource.specification.js +2 -0
- package/dist/esm/engine/billing/resources/credit-pools.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.d.ts +2 -2
- package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.js +2 -0
- package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/prices.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/billing/resources/prices.resource.specification.js +3 -1
- package/dist/esm/engine/billing/resources/prices.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/products.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/billing/resources/products.resource.specification.js +3 -1
- package/dist/esm/engine/billing/resources/products.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/promotions.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/billing/resources/promotions.resource.specification.js +2 -0
- package/dist/esm/engine/billing/resources/promotions.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/referrals.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/billing/resources/referrals.resource.specification.js +3 -1
- package/dist/esm/engine/billing/resources/referrals.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/subscriptions.resource.specification.d.ts +6 -6
- package/dist/esm/engine/billing/resources/subscriptions.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/billing/resources/subscriptions.resource.specification.js +2 -0
- package/dist/esm/engine/billing/resources/subscriptions.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/usage-records.resource.specification.d.ts +6 -6
- package/dist/esm/engine/billing/resources/usage-records.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/billing/resources/usage-records.resource.specification.js +2 -0
- package/dist/esm/engine/billing/resources/usage-records.resource.specification.js.map +1 -1
- package/dist/esm/engine/compliance/resources/audit-logs.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/compliance/resources/audit-logs.resource.specification.js +2 -0
- package/dist/esm/engine/compliance/resources/audit-logs.resource.specification.js.map +1 -1
- package/dist/esm/engine/engine-resource-specifications.registry.d.ts.map +1 -1
- package/dist/esm/engine/engine-resource-specifications.registry.js +5 -0
- package/dist/esm/engine/engine-resource-specifications.registry.js.map +1 -1
- package/dist/esm/engine/engine-resource-sub-domain.d.ts +63 -0
- package/dist/esm/engine/engine-resource-sub-domain.d.ts.map +1 -0
- package/dist/esm/engine/engine-resource-sub-domain.js +87 -0
- package/dist/esm/engine/engine-resource-sub-domain.js.map +1 -0
- package/dist/esm/engine/errors/error-messages.specification.d.ts.map +1 -1
- package/dist/esm/engine/errors/error-messages.specification.js +30 -1
- package/dist/esm/engine/errors/error-messages.specification.js.map +1 -1
- package/dist/esm/engine/features/resources/application-features.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/features/resources/application-features.resource.specification.js +2 -0
- package/dist/esm/engine/features/resources/application-features.resource.specification.js.map +1 -1
- package/dist/esm/engine/features/resources/organization-features.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/features/resources/organization-features.resource.specification.js +2 -0
- package/dist/esm/engine/features/resources/organization-features.resource.specification.js.map +1 -1
- package/dist/esm/engine/features/resources/user-features.resource.specification.d.ts +1 -1
- package/dist/esm/engine/features/resources/user-features.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/features/resources/user-features.resource.specification.js +2 -0
- package/dist/esm/engine/features/resources/user-features.resource.specification.js.map +1 -1
- package/dist/esm/engine/files/resources/files.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/files/resources/files.resource.specification.js +2 -0
- package/dist/esm/engine/files/resources/files.resource.specification.js.map +1 -1
- package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.d.ts +3 -3
- package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.js +12 -0
- package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.js.map +1 -1
- package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.d.ts +3 -3
- package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.js +2 -0
- package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.js.map +1 -1
- package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.d.ts +3 -3
- package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.js +2 -0
- package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.js.map +1 -1
- package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.d.ts +3 -3
- package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.js +3 -1
- package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/app/public-layout-main-container.frontend-component.specification.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/app/public-layout-main-container.frontend-component.specification.js +8 -3
- package/dist/esm/engine/frontend-components/app/public-layout-main-container.frontend-component.specification.js.map +1 -1
- package/dist/esm/engine/guidance/resources/guidance-state.resource.specification.d.ts +1 -1
- package/dist/esm/engine/guidance/resources/guidance-state.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/guidance/resources/guidance-state.resource.specification.js +3 -0
- package/dist/esm/engine/guidance/resources/guidance-state.resource.specification.js.map +1 -1
- package/dist/esm/engine/guidance/resources/lifecycle-state.resource.specification.d.ts +1 -1
- package/dist/esm/engine/guidance/resources/lifecycle-state.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/guidance/resources/lifecycle-state.resource.specification.js +3 -0
- package/dist/esm/engine/guidance/resources/lifecycle-state.resource.specification.js.map +1 -1
- package/dist/esm/engine/guidance/resources/progression-state.resource.specification.d.ts +1 -1
- package/dist/esm/engine/guidance/resources/progression-state.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/guidance/resources/progression-state.resource.specification.js +3 -0
- package/dist/esm/engine/guidance/resources/progression-state.resource.specification.js.map +1 -1
- package/dist/esm/engine/index.d.ts +1 -0
- package/dist/esm/engine/index.d.ts.map +1 -1
- package/dist/esm/engine/index.js +1 -0
- package/dist/esm/engine/index.js.map +1 -1
- package/dist/esm/engine/infrastructure/resources/data-seed-runs.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/infrastructure/resources/data-seed-runs.resource.specification.js +2 -0
- package/dist/esm/engine/infrastructure/resources/data-seed-runs.resource.specification.js.map +1 -1
- package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.js +2 -0
- package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.js.map +1 -1
- package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.js +2 -0
- package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.js.map +1 -1
- package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.js +2 -0
- package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.js.map +1 -1
- package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.js +2 -0
- package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.js.map +1 -1
- package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.d.ts +1 -1
- package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.js +3 -0
- package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.js.map +1 -1
- package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.js +2 -0
- package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.js.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-members.resource.specification.d.ts +1 -1
- package/dist/esm/engine/organizations/resources/organization-members.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-members.resource.specification.js +2 -0
- package/dist/esm/engine/organizations/resources/organization-members.resource.specification.js.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-notifications.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-notifications.resource.specification.js +2 -0
- package/dist/esm/engine/organizations/resources/organization-notifications.resource.specification.js.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-preferences.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-preferences.resource.specification.js +2 -0
- package/dist/esm/engine/organizations/resources/organization-preferences.resource.specification.js.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-profiles.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-profiles.resource.specification.js +2 -0
- package/dist/esm/engine/organizations/resources/organization-profiles.resource.specification.js.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-unit-members.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-unit-members.resource.specification.js +2 -0
- package/dist/esm/engine/organizations/resources/organization-unit-members.resource.specification.js.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-units.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-units.resource.specification.js +2 -0
- package/dist/esm/engine/organizations/resources/organization-units.resource.specification.js.map +1 -1
- package/dist/esm/engine/organizations/resources/organizations.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/organizations/resources/organizations.resource.specification.js +2 -0
- package/dist/esm/engine/organizations/resources/organizations.resource.specification.js.map +1 -1
- package/dist/esm/engine/users/resources/anonymous-users.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/users/resources/anonymous-users.resource.specification.js +2 -0
- package/dist/esm/engine/users/resources/anonymous-users.resource.specification.js.map +1 -1
- package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.d.ts +1 -1
- package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.js +2 -0
- package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.js.map +1 -1
- package/dist/esm/engine/users/resources/user-credentials.resource.specification.d.ts +1 -1
- package/dist/esm/engine/users/resources/user-credentials.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/users/resources/user-credentials.resource.specification.js +2 -0
- package/dist/esm/engine/users/resources/user-credentials.resource.specification.js.map +1 -1
- package/dist/esm/engine/users/resources/user-identity-links.resource.specification.d.ts +1 -1
- package/dist/esm/engine/users/resources/user-identity-links.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/users/resources/user-identity-links.resource.specification.js +2 -0
- package/dist/esm/engine/users/resources/user-identity-links.resource.specification.js.map +1 -1
- package/dist/esm/engine/users/resources/user-preferences.resource.specification.d.ts +1 -1
- package/dist/esm/engine/users/resources/user-preferences.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/users/resources/user-preferences.resource.specification.js +2 -0
- package/dist/esm/engine/users/resources/user-preferences.resource.specification.js.map +1 -1
- package/dist/esm/engine/users/resources/user-profiles.resource.specification.d.ts +1 -1
- package/dist/esm/engine/users/resources/user-profiles.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/users/resources/user-profiles.resource.specification.js +2 -0
- package/dist/esm/engine/users/resources/user-profiles.resource.specification.js.map +1 -1
- package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.d.ts +1 -1
- package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.js +2 -0
- package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.js.map +1 -1
- package/dist/esm/engine/users/resources/user-self-profiles.resource.specification.d.ts +1 -1
- package/dist/esm/engine/users/resources/user-self-profiles.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/users/resources/user-self-profiles.resource.specification.js +2 -0
- package/dist/esm/engine/users/resources/user-self-profiles.resource.specification.js.map +1 -1
- package/dist/esm/engine/users/resources/user-self.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/users/resources/user-self.resource.specification.js +3 -1
- package/dist/esm/engine/users/resources/user-self.resource.specification.js.map +1 -1
- package/dist/esm/engine/users/resources/users.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/users/resources/users.resource.specification.js +2 -0
- package/dist/esm/engine/users/resources/users.resource.specification.js.map +1 -1
- package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.d.ts +5 -0
- package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.d.ts.map +1 -1
- package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.js +385 -9
- package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.js.map +1 -1
- package/dist/esm/technical-documentation/technical-documentation-units.schemas.js +1 -1
- package/dist/esm/technical-documentation/technical-documentation-units.schemas.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/package.json +8 -8
- package/dist/esm/.builder.pid +0 -9
- package/dist/esm/_core/business-coverage/coverage-findings-validation.d.ts +0 -0
- package/dist/esm/_core/business-coverage/coverage-findings-validation.d.ts.map +0 -0
- package/dist/esm/_core/business-coverage/coverage-findings-validation.js.map +0 -0
- package/dist/esm/_core/business-coverage/coverage-findings.schemas.d.ts +0 -0
- package/dist/esm/_core/business-coverage/coverage-findings.schemas.d.ts.map +0 -0
- package/dist/esm/_core/business-coverage/coverage-findings.schemas.js.map +0 -0
package/dist/esm/engine/applications/resources/application-metadata.resource.specification.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application-metadata.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/applications/resources/application-metadata.resource.specification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0CAA0C,IAAI,yBAAyB,EAAE,MAAM,8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AAE;gBAChB,EAAE,IAAI,EAAE,sBAAsB,CAAC,cAAc,EAAE,OAAO,EAAE,sDAAsD,EAAE;aACjH;YACD,cAAc,EAAE;gBACd,EAAE,IAAI,EAAE,sBAAsB,CAAC,aAAa,EAAE,IAAI,EAAE,kGAAkG,EAAE;gBACxJ,EAAE,IAAI,EAAE,sBAAsB,CAAC,aAAa,EAAE,IAAI,EAAE,sFAAsF,EAAE;aAC7I;YACD,UAAU,EAAE,IAAI;SACjB;KACF;IACD,mBAAmB,EAAE;QACnB,kLAAkL;KACnL;CACF,CAAC,EACF,EAAE,oBAAoB,EAAE,oBAAoB,CAAC,WAAW,EAAE,CAC3D,EACD,GAAG,EAAE,CAAC,CAAC;IACL,KAAK,EAAE;QACL,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,yDAAyD,EAAE,SAAS,EAAE,uDAAuD,EAAE;QACvJ,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,kDAAkD,EAAE,SAAS,EAAE,kDAAkD,EAAE;QACzI,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,6DAA6D,EAAE,SAAS,EAAE,+CAA+C,EAAE;QACnJ,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,6DAA6D,EAAE,SAAS,EAAE,uEAAuE,EAAE;KAC5K;CACF,CAAC,CACH,CAAC","sourcesContent":["import { applicationMetadataAdminResourceUIBehavior as applicationMetadataSource } from '@wildo-ai/presets-components';\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport type { ResourceUIBehaviorConfig } from '@wildo-ai/saas-frontend-lib/companion';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n ApplicationMetadataSchema,\n CoreResourceOperation as Op,\n ResourcePrimaryScope,\n applicationMetadataResourceConfiguration_InitializationFactory as applicationMetadataFactory,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n} from '~wildo-specifications/_core';\n\ntype Cfg = ReturnType<typeof applicationMetadataFactory>;\ntype Core = Cfg['coreOperations'][number];\ntype Main = Cfg['mainSchema'];\n\nconst applicationMetadataUI = applicationMetadataSource as ResourceUIBehaviorConfig<undefined, Core, Main>;\n\nexport const applicationMetadataResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n resourceFrontendConfiguration(applicationMetadataUI),\n resourceSpecification(\n applicationMetadataFactory,\n ApplicationMetadataSchema,\n ({ schemaShape }) => ({\n purpose: 'Human prose describing the application purpose, marketing fit, and internal notes (distinct from the lean `ApplicationSchema` row).',\n businessRole: 'Feeds about pages, app-store-like listings, and support tooling with narrative context.',\n lifecycleRole: 'Co-updated with branding and GTM; long-form `description` can change more often than slugs.',\n audience: LabelAudience.DEVELOPER,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'ApplicationMetadataSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'applicationMetadataResourceConfiguration_InitializationFactory',\n symbolKind: CodeSymbolKind.FACTORY,\n declarationKind: CodeDeclarationKind.FUNCTION,\n },\n resourceType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n memberName: 'APPLICATION_METADATA',\n },\n operationVocabulary: {\n coreEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceOperation',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n frontendConfigurationSources: [\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'applicationMetadataAdminResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n },\n fields: {\n appId: schemaShape.appId.foreignKeySpec({\n meaning: 'The owning `applications` row this metadata describes; immutable after create (one metadata record per application).',\n whyItMatters: 'Anchors the narrative to a single application so about-pages and support tooling render the right description; the `APPLICATION → APPLICATION_METADATA` relationship is one-to-one.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n description: schemaShape.description.stringSpec({\n meaning: 'Indexed description for search and about-page rendering.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n },\n operations: {\n [Op.CREATE]: {\n purpose:\n 'Author metadata for an `APPLICATION` row that has none. In practice the row normally exists already: '\n + 'the framework seeds it at application init (`engine-applications:application-metadata`, ADDITIVE) with the '\n + 'schema-default empty description, because the APPLICATION row itself is provisioned by the apps-manager at '\n + 'the repository tier and so triggers no composition lifecycle. Authoring a real description is therefore an '\n + 'UPDATE on the seeded row; this CREATE remains for an application whose seed never ran.',\n outcome: 'Downstream UIs and SEO surfaces have a paragraph of truth.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'The metadata child was created for the parent application and the stored description is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The description payload fails schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an org admin for the owning application; metadata authoring is org-admin gated.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'The parent application this metadata attaches to does not exist in the caller’s scope.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The application already has a metadata record — the `APPLICATION → APPLICATION_METADATA` relationship is one-to-one, so a second create collides.' },\n ],\n idempotent: false,\n examples: [\n {\n title: 'Seed metadata for an application',\n request: {\n description: 'Wonder Todos keeps small teams aligned with shared, prioritized task lists.',\n },\n response: {\n description: 'Wonder Todos keeps small teams aligned with shared, prioritized task lists.',\n },\n forStatus: HttpResponseStatusCode.CREATED_201,\n },\n ],\n },\n [Op.READ]: {\n purpose: 'Public or member read of description for about surfaces.',\n outcome: 'Consistent long-form text across hosts.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The application metadata was found and its description is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No metadata record exists for the addressed application in the caller’s scope.' },\n ],\n idempotent: true,\n },\n [Op.UPDATE]: {\n purpose: 'Org or platform admin edits the narrative and SEO fields.',\n outcome: 'Search indexes and in-app about pages refresh on next load.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The metadata description was updated and the new value is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The edited description fails schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an org admin for the owning application; metadata edits are org-admin gated.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No metadata record exists for the addressed application in the caller’s scope.' },\n ],\n idempotent: true,\n },\n [Op.DELETE]: {\n purpose: 'Remove the metadata child when the app record is decommissioned.',\n outcome: 'Description no longer published; `APPLICATION` removal rules apply separately.',\n responseStatuses: [\n { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The metadata child was deleted; no body is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an org admin for the owning application; metadata deletion is org-admin gated.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No metadata record exists for the addressed application (or it was already deleted).' },\n ],\n idempotent: true,\n },\n },\n businessConstraints: [\n 'The merged `application` admin preset exposes `APPLICATION_METADATA` as a tab; main preset hides the relationship — only admin UI behavior is exported for the spec to validate.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.APPLICATION },\n ),\n () => ({\n views: {\n [Op.CREATE]: { purpose: 'Create metadata in admin tab host after the app exists.', whenToUse: 'First-time setup of marketing copy in platform tools.' },\n [Op.READ]: { purpose: 'Read-only about body for admins editing context.', whenToUse: 'Support reviewing app narrative before a launch.' },\n [Op.UPDATE]: { purpose: 'Inline long-form description editor from admin preset form.', whenToUse: 'Launch-week copy iterations and rebrand work.' },\n [Op.DELETE]: { purpose: 'Remove the metadata sub-document when the app is torn down.', whenToUse: 'GDPR, mistaken provisioning, and migration to another metadata store.' },\n },\n }),\n);\n"]}
|
|
1
|
+
{"version":3,"file":"application-metadata.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/applications/resources/application-metadata.resource.specification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0CAA0C,IAAI,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AACvH,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,yBAAyB,EACzB,qBAAqB,IAAI,EAAE,EAC3B,oBAAoB,EACpB,8DAA8D,IAAI,0BAA0B,GAC7F,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB,6BAA6B,EAC7B,qBAAqB,EACrB,8CAA8C,GAC/C,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAM3E,MAAM,qBAAqB,GAAG,yBAA4E,CAAC;AAE3G,MAAM,CAAC,MAAM,wCAAwC,GAAG,8CAA8C,CACpG,6BAA6B,CAAC,qBAAqB,CAAC,EACpD,qBAAqB,CACnB,0BAA0B,EAC1B,yBAAyB,EACzB,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,CAAC;IACpB,OAAO,EAAE,qKAAqK;IAC9K,YAAY,EAAE,yFAAyF;IACvG,aAAa,EAAE,6FAA6F;IAC5G,QAAQ,EAAE,aAAa,CAAC,SAAS;IACjC,SAAS,EAAE,uBAAuB,CAAC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AE,EAAE,OAAO,EAAE,6DAA6D,EAAE,SAAS,EAAE,+CAA+C,EAAE;QACnJ,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,6DAA6D,EAAE,SAAS,EAAE,uEAAuE,EAAE;KAC5K;CACF,CAAC,CACH,CAAC","sourcesContent":["import { applicationMetadataAdminResourceUIBehavior as applicationMetadataSource } from '@wildo-ai/presets-components';\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport type { ResourceUIBehaviorConfig } from '@wildo-ai/saas-frontend-lib/companion';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n ApplicationMetadataSchema,\n CoreResourceOperation as Op,\n ResourcePrimaryScope,\n applicationMetadataResourceConfiguration_InitializationFactory as applicationMetadataFactory,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n} from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\ntype Cfg = ReturnType<typeof applicationMetadataFactory>;\ntype Core = Cfg['coreOperations'][number];\ntype Main = Cfg['mainSchema'];\n\nconst applicationMetadataUI = applicationMetadataSource as ResourceUIBehaviorConfig<undefined, Core, Main>;\n\nexport const applicationMetadataResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n resourceFrontendConfiguration(applicationMetadataUI),\n resourceSpecification(\n applicationMetadataFactory,\n ApplicationMetadataSchema,\n ({ schemaShape }) => ({\n purpose: 'The descriptive text about the application itself: what it is for, who it serves and how it is positioned, kept separately from the application\\'s identity record.',\n businessRole: 'Feeds about pages, app-store-like listings, and support tooling with narrative context.',\n lifecycleRole: 'Co-updated with branding and GTM; long-form `description` can change more often than slugs.',\n audience: LabelAudience.DEVELOPER,\n subDomain: EngineResourceSubDomain.APPLICATIONS,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'ApplicationMetadataSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'applicationMetadataResourceConfiguration_InitializationFactory',\n symbolKind: CodeSymbolKind.FACTORY,\n declarationKind: CodeDeclarationKind.FUNCTION,\n },\n resourceType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n memberName: 'APPLICATION_METADATA',\n },\n operationVocabulary: {\n coreEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceOperation',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n frontendConfigurationSources: [\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'applicationMetadataAdminResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n },\n fields: {\n appId: schemaShape.appId.foreignKeySpec({\n meaning: 'The owning `applications` row this metadata describes; immutable after create (one metadata record per application).',\n whyItMatters: 'Anchors the narrative to a single application so about-pages and support tooling render the right description; the `APPLICATION → APPLICATION_METADATA` relationship is one-to-one.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n description: schemaShape.description.stringSpec({\n meaning: 'Indexed description for search and about-page rendering.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n },\n operations: {\n [Op.CREATE]: {\n purpose:\n 'Author metadata for an `APPLICATION` row that has none. In practice the row normally exists already: '\n + 'the framework seeds it at application init (`engine-applications:application-metadata`, ADDITIVE) with the '\n + 'schema-default empty description, because the APPLICATION row itself is provisioned by the apps-manager at '\n + 'the repository tier and so triggers no composition lifecycle. Authoring a real description is therefore an '\n + 'UPDATE on the seeded row; this CREATE remains for an application whose seed never ran.',\n outcome: 'Downstream UIs and SEO surfaces have a paragraph of truth.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'The metadata child was created for the parent application and the stored description is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The description payload fails schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an org admin for the owning application; metadata authoring is org-admin gated.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'The parent application this metadata attaches to does not exist in the caller’s scope.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The application already has a metadata record — the `APPLICATION → APPLICATION_METADATA` relationship is one-to-one, so a second create collides.' },\n ],\n idempotent: false,\n examples: [\n {\n title: 'Seed metadata for an application',\n request: {\n description: 'Wonder Todos keeps small teams aligned with shared, prioritized task lists.',\n },\n response: {\n description: 'Wonder Todos keeps small teams aligned with shared, prioritized task lists.',\n },\n forStatus: HttpResponseStatusCode.CREATED_201,\n },\n ],\n },\n [Op.READ]: {\n purpose: 'Public or member read of description for about surfaces.',\n outcome: 'Consistent long-form text across hosts.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The application metadata was found and its description is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No metadata record exists for the addressed application in the caller’s scope.' },\n ],\n idempotent: true,\n },\n [Op.UPDATE]: {\n purpose: 'Org or platform admin edits the narrative and SEO fields.',\n outcome: 'Search indexes and in-app about pages refresh on next load.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The metadata description was updated and the new value is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The edited description fails schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an org admin for the owning application; metadata edits are org-admin gated.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No metadata record exists for the addressed application in the caller’s scope.' },\n ],\n idempotent: true,\n },\n [Op.DELETE]: {\n purpose: 'Remove the metadata child when the app record is decommissioned.',\n outcome: 'Description no longer published; `APPLICATION` removal rules apply separately.',\n responseStatuses: [\n { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The metadata child was deleted; no body is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an org admin for the owning application; metadata deletion is org-admin gated.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No metadata record exists for the addressed application (or it was already deleted).' },\n ],\n idempotent: true,\n },\n },\n businessConstraints: [\n 'The merged `application` admin preset exposes `APPLICATION_METADATA` as a tab; main preset hides the relationship — only admin UI behavior is exported for the spec to validate.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.APPLICATION },\n ),\n () => ({\n views: {\n [Op.CREATE]: { purpose: 'Create metadata in admin tab host after the app exists.', whenToUse: 'First-time setup of marketing copy in platform tools.' },\n [Op.READ]: { purpose: 'Read-only about body for admins editing context.', whenToUse: 'Support reviewing app narrative before a launch.' },\n [Op.UPDATE]: { purpose: 'Inline long-form description editor from admin preset form.', whenToUse: 'Launch-week copy iterations and rebrand work.' },\n [Op.DELETE]: { purpose: 'Remove the metadata sub-document when the app is torn down.', whenToUse: 'GDPR, mistaken provisioning, and migration to another metadata store.' },\n },\n }),\n);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application-oauth-clients.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/applications/resources/application-oauth-clients.resource.specification.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,0BAA0B,EAC1B,WAAW,EACX,cAAc,EACd,qBAAqB,IAAI,EAAE,EAC3B,cAAc,EAEd,6BAA6B,EAC7B,iBAAiB,EACjB,4BAA4B,EAG7B,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"application-oauth-clients.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/applications/resources/application-oauth-clients.resource.specification.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,0BAA0B,EAC1B,WAAW,EACX,cAAc,EACd,qBAAqB,IAAI,EAAE,EAC3B,cAAc,EAEd,6BAA6B,EAC7B,iBAAiB,EACjB,4BAA4B,EAG7B,MAAM,uBAAuB,CAAC;AA+C/B;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,4CAA4C;;;;;;;;;;;;;;;;;;;;;;;;iCAoYxD,CAAC"}
|
package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.js
CHANGED
|
@@ -2,6 +2,7 @@ import { LabelAudience } from '@wildo-ai/presets-components-models';
|
|
|
2
2
|
import { CodeDeclarationKind, CodeSymbolKind, FieldSemanticImportance, } from '@wildo-ai/zod-decorators';
|
|
3
3
|
import { AppOAuthClients_Operations, ApiKeyScope, CORE_APP_ROLES, CoreResourceOperation as Op, OAuthGrantType, OAuthClientApplicationSchema, OAuthClientRegistrationOrigin, OAuthClientStatus, OAuthTokenEndpointAuthMethod, ResourcePrimaryScope, appOAuthClientsResourceConfiguration_InitializationFactory as appOAuthClientsFactory, } from '@wildo-ai/saas-models';
|
|
4
4
|
import { HttpResponseStatusCode, resourceSpecification } from '../../../_core/index.js';
|
|
5
|
+
import { EngineResourceSubDomain } from '../../engine-resource-sub-domain.js';
|
|
5
6
|
const APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE = {
|
|
6
7
|
_id: 'oauth_client_app_01HX2EXAMPLE',
|
|
7
8
|
name: 'Tenant provisioning service',
|
|
@@ -69,6 +70,7 @@ export const applicationOAuthClientsResourceSpecification = resourceSpecificatio
|
|
|
69
70
|
businessRole: 'App-admin machine-to-machine OAuth credential. Under client-credentials it authenticates the SAME application machine principal (`APPLICATION_MACHINE`) that an application API key does — a distinct credential type, not a distinct principal — distinct from end-user sessions and from organization OAuth clients.',
|
|
70
71
|
lifecycleRole: 'Created, rotated, regenerated, and retired by application administrators; ordinary application members cannot manage these credentials. The current token paths do not populate `lastUsedAt`, so usage must be established from audit and workload evidence.',
|
|
71
72
|
audience: LabelAudience.DEVELOPER,
|
|
73
|
+
subDomain: EngineResourceSubDomain.APPLICATIONS,
|
|
72
74
|
codeHandling: {
|
|
73
75
|
mainSchema: {
|
|
74
76
|
packageName: '@wildo-ai/saas-models',
|
|
@@ -206,7 +208,7 @@ export const applicationOAuthClientsResourceSpecification = resourceSpecificatio
|
|
|
206
208
|
},
|
|
207
209
|
}),
|
|
208
210
|
tokenEndpointAuthMethod: schemaShape.tokenEndpointAuthMethod.enumSpec({
|
|
209
|
-
meaning: '
|
|
211
|
+
meaning: 'How the client authenticates at the token endpoint: `none` for a public client (PKCE only, no client secret), or `client_secret_basic` / `client_secret_post` for a confidential client that presents its client_secret to redeem an authorization code or revoke a token. Defaults to `none`; a server-side client that can safely hold a secret opts into one of the secret-bearing methods.',
|
|
210
212
|
importance: FieldSemanticImportance.CONTEXTUAL,
|
|
211
213
|
enumDeclaration: {
|
|
212
214
|
packageName: '@wildo-ai/saas-models',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application-oauth-clients.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/applications/resources/application-oauth-clients.resource.specification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,0BAA0B,EAC1B,WAAW,EACX,cAAc,EACd,qBAAqB,IAAI,EAAE,EAC3B,cAAc,EACd,4BAA4B,EAC5B,6BAA6B,EAC7B,iBAAiB,EACjB,4BAA4B,EAC5B,oBAAoB,EACpB,0DAA0D,IAAI,sBAAsB,GACrF,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;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EAAE,0BAA0B;wBAC1D,WAAW,EAAE,qCAAqC;wBAClD,WAAW,EAAE,uCAAuC,CAAC,GAAG;wBACxD,yBAAyB,EAAE,0BAA0B;qBACtD;oBACD,SAAS,EAAE,sBAAsB,CAAC,MAAM;iBACzC;aACF;SACF;QACD,CAAC,0BAA0B,CAAC,UAAU,CAAC,EAAE;YACvC,WAAW,EAAE,0BAA0B,CAAC,UAAU;YAClD,OAAO,EAAE,oEAAoE;YAC7E,OAAO,EAAE,qKAAqK;YAC9K,gBAAgB,EAAE;gBAChB,EAAE,IAAI,EAAE,sBAAsB,CAAC,MAAM,EAAE,OAAO,EAAE,+GAA+G,EAAE;aAClK;YACD,cAAc,EAAE;gBACd,EAAE,IAAI,EAAE,sBAAsB,CAAC,aAAa,EAAE,IAAI,EAAE,qFAAqF,EAAE;gBAC3I,EAAE,IAAI,EAAE,sBAAsB,CAAC,aAAa,EAAE,IAAI,EAAE,6EAA6E,EAAE;gBACnI,EAAE,IAAI,EAAE,sBAAsB,CAAC,YAAY,EAAE,IAAI,EAAE,yGAAyG,EAAE;aAC/J;YACD,UAAU,EAAE,KAAK;YACjB,aAAa,EAAE,qGAAqG;YACpH,QAAQ,EAAE;gBACR;oBACE,KAAK,EAAE,2CAA2C;oBAClD,OAAO,EAAE,EAAE;oBACX,QAAQ,EAAE;wBACR,GAAG,uCAAuC;wBAC1C,YAAY,EAAE,UAAU;wBACxB,oBAAoB,EAAE,uCAAuC,CAAC,YAAY;wBAC1E,WAAW,EAAE,yCAAyC;qBACvD;oBACD,SAAS,EAAE,sBAAsB,CAAC,MAAM;iBACzC;aACF;SACF;KACF;IACD,mBAAmB,EAAE;QACnB,mJAAmJ;QACnJ,yHAAyH;QACzH,qQAAqQ;KACtQ;CACF,CAAC,EACF,EAAE,oBAAoB,EAAE,oBAAoB,CAAC,WAAW,EAAE,CAC3D,CAAC","sourcesContent":["import { LabelAudience } from '@wildo-ai/presets-components-models';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n AppOAuthClients_Operations,\n ApiKeyScope,\n CORE_APP_ROLES,\n CoreResourceOperation as Op,\n OAuthGrantType,\n OAuthClientApplicationSchema,\n OAuthClientRegistrationOrigin,\n OAuthClientStatus,\n OAuthTokenEndpointAuthMethod,\n ResourcePrimaryScope,\n appOAuthClientsResourceConfiguration_InitializationFactory as appOAuthClientsFactory,\n} from '@wildo-ai/saas-models';\nimport { HttpResponseStatusCode, resourceSpecification } from '~wildo-specifications/_core';\n\nconst APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE = {\n _id: 'oauth_client_app_01HX2EXAMPLE',\n name: 'Tenant provisioning service',\n description: 'Confidential application client used by the tenant provisioning worker.',\n scope: ApiKeyScope.APPLICATION,\n roles: [CORE_APP_ROLES.APP_ADMIN_VIEWER],\n allowedScopes: [],\n allowedGrants: [OAuthGrantType.CLIENT_CREDENTIALS],\n redirectUris: [],\n postLogoutRedirectUris: [],\n requiresConsent: false,\n tokenEndpointAuthMethod: OAuthTokenEndpointAuthMethod.CLIENT_SECRET_BASIC,\n status: OAuthClientStatus.ACTIVE,\n expiresAt: '2099-06-15T00:00:00.000Z',\n createdAt: '2026-08-02T09:30:00.000Z',\n updatedAt: '2026-08-17T15:05:00.000Z',\n secretPrefix: 'oc_app_1',\n registrationOrigin: OAuthClientRegistrationOrigin.OPERATOR,\n applicationId: 'application_01HX2EXAMPLE',\n} as const;\n\nconst APPLICATION_OAUTH_CLIENT_SUMMARY_EXAMPLE = {\n _id: APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE._id,\n name: APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE.name,\n tokenEndpointAuthMethod: APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE.tokenEndpointAuthMethod,\n status: APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE.status,\n expiresAt: APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE.expiresAt,\n createdAt: APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE.createdAt,\n secretPrefix: APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE.secretPrefix,\n registrationOrigin: APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE.registrationOrigin,\n applicationId: APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE.applicationId,\n} as const;\n\nconst APPLICATION_OAUTH_CLIENT_PAGE_EXAMPLE = {\n data: [APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE],\n pagination: { page: 1, limit: 20, total: 1, totalPages: 1 },\n} as const;\n\nconst APPLICATION_OAUTH_CLIENT_SUMMARY_PAGE_EXAMPLE = {\n data: [APPLICATION_OAUTH_CLIENT_SUMMARY_EXAMPLE],\n pagination: { page: 1, limit: 20, total: 1, totalPages: 1 },\n} as const;\n\n/**\n * Framework-owned base specification for the application-scoped\n * `applicationOAuthClients` resource.\n *\n * This resource is a FAITHFUL MIRROR of the api-keys resource\n * (`application-api-keys.resource.specification.ts`) with a FOCUSED operation\n * set — core READ/LIST/SEARCH/CREATE plus a REPOSITORY_ONLY DELETE\n * (onParentDelete cascade) and custom ROTATE/REGENERATE. The\n * DEACTIVATE/REACTIVATE/EXTEND_EXPIRY/USAGE_STATS custom ops the api-keys spec\n * documents are intentionally deferred to the OIDC branch\n * (`.claude/plans/external-access-oidc-mcp-a2a.md`).\n *\n * Unlike api-keys, this resource ships NO UI behavior preset today, so — like\n * `jobExecutions` — it is authored from the shared resource factory only\n * (`resourceSpecification(...)`, no `resourceSpecificationFromFrontendConfiguration`\n * overlay). The label/layout/views frontend narration the api-keys spec carries\n * has no preset to document here.\n *\n * `resourcePrimaryScope: APPLICATION` — an application OAuth client is\n * application-wide data owned by the `applicationId` FK; the scope is enforced by\n * the spec ↔ registry alignment guard against the `isPrimaryScope: true`\n * relationship row for `OAUTH_CLIENTS_APPLICATION`.\n */\nexport const applicationOAuthClientsResourceSpecification = resourceSpecification(\n appOAuthClientsFactory,\n OAuthClientApplicationSchema,\n ({ schemaShape }) => ({\n purpose: 'Application-scoped registered OAuth clients: client-credentials secrets for obtaining tokens and calling backend APIs in app-level automation and integration contexts.',\n businessRole: 'App-admin machine-to-machine OAuth credential. Under client-credentials it authenticates the SAME application machine principal (`APPLICATION_MACHINE`) that an application API key does — a distinct credential type, not a distinct principal — distinct from end-user sessions and from organization OAuth clients.',\n lifecycleRole: 'Created, rotated, regenerated, and retired by application administrators; ordinary application members cannot manage these credentials. The current token paths do not populate `lastUsedAt`, so usage must be established from audit and workload evidence.',\n audience: LabelAudience.DEVELOPER,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'OAuthClientApplicationSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'appOAuthClientsResourceConfiguration_InitializationFactory',\n symbolKind: CodeSymbolKind.FACTORY,\n declarationKind: CodeDeclarationKind.FUNCTION,\n },\n resourceType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n memberName: 'OAUTH_CLIENTS_APPLICATION',\n },\n operationVocabulary: {\n coreEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceOperation',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n customEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'AppOAuthClients_Operations',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n notes: [\n 'No UI behavior preset exists for this resource — authored backend-only (no frontend overlay), mirroring the `jobExecutions` shape rather than the api-keys mixed shape.',\n 'Runtime declares userNotifications with channel EMAIL on CREATE/ROTATE/REGENERATE; DF-1 communications blocks are omitted from this pass to stay a structural mirror of the api-keys spec, which likewise documents no communications blocks.',\n ],\n },\n fields: {\n name: schemaShape.name.stringSpec({\n meaning: 'Label for the OAuth client in app-admin UI.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n description: schemaShape.description.stringSpec({\n meaning: 'Operator-authored explanation of the application-level integration that owns this credential.',\n }),\n status: schemaShape.status.enumSpec({\n meaning: 'Whether the app client is allowed to obtain tokens and authenticate.',\n importance: FieldSemanticImportance.PRIMARY,\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'OAuthClientStatus',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [OAuthClientStatus.ACTIVE]: { meaning: 'Client may mint tokens within policy and expiry.' },\n [OAuthClientStatus.INACTIVE]: { meaning: 'Revoked or disabled; token exchanges should fail.' },\n [OAuthClientStatus.EXPIRED]: { meaning: 'Past its validity window; treat as invalid.' },\n },\n }),\n secretPrefix: schemaShape.secretPrefix.stringSpec({\n meaning: 'Short prefix for support correlation (not the full secret).',\n }),\n roles: schemaShape.roles.arraySpec({\n meaning: 'Roles embedded on the client; every token minted for it inherits exactly these roles, bounding what the integration can do (least-privilege for automation).',\n elementMeaning: 'One role identifier — a core app/org role token or an app-defined custom role string.',\n // Element is a union of `CORE_APP_ROLES` + `CORE_ORG_ROLES` + a free\n // custom-role string; the shape validator requires ONE enum vocabulary\n // to advertise, so we name the app-scope enum (the primary vocabulary\n // for an application client). Org tokens and custom strings remain valid\n // per `elementMeaning`.\n elementType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CORE_APP_ROLES',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n }),\n allowedScopes: schemaShape.allowedScopes.arraySpec({\n meaning:\n 'Identity scopes this client may request in an authorization-code flow. These scopes select identity claims; authorization remains roles-only. Empty for a client-credentials-only machine client.',\n elementMeaning: 'One OAuth/OIDC identity scope allowed for this client, such as `openid`, `profile`, or `email`.',\n }),\n allowedGrants: schemaShape.allowedGrants.arraySpec({\n meaning: 'OAuth grant types this client is allowed to use. A token request using any other grant is refused.',\n elementMeaning: 'One permitted OAuth grant type.',\n elementType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'OAuthGrantType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n }),\n requiresConsent: schemaShape.requiresConsent.booleanSpec({\n meaning:\n 'Whether an authorization-code request must obtain explicit user consent before a code is issued. Machine-only client-credentials clients leave this false.',\n }),\n applicationId: schemaShape.applicationId.stringSpec({ meaning: 'Immutable owning application for this client record.' }),\n expiresAt: schemaShape.expiresAt.dateSpec({ meaning: 'Optional hard stop for validity.' }),\n lastUsedAt: schemaShape.lastUsedAt.dateSpec({\n meaning: 'Reserved timestamp for a recorded successful use. The current OAuth token paths do not populate it; an absent or old value is not evidence that the client is unused.',\n }),\n previousSecretPrefix: schemaShape.previousSecretPrefix.stringSpec({\n meaning: 'Public prefix of the previous secret retained during a rotation or regeneration overlap window.',\n }),\n previousSecretInvalidationDate: schemaShape.previousSecretInvalidationDate.dateSpec({\n meaning: 'After a rotation, when the PRIOR secret stops authenticating; during this grace window both secrets work so integrations can migrate without downtime (absent/null after a regenerate = prior secret valid until the next rotation).',\n }),\n redirectUris: schemaShape.redirectUris.arraySpec({\n meaning:\n 'Exact-match allowlist of post-authorization redirect targets for the authorization_code flow. A request redirect_uri must equal one entry by exact string (no wildcards/substrings), and each entry is itself constrained to a safe absolute URL — https for any host/port, or http only for a loopback host — with no fragment or embedded credentials, so a registered entry can never become an open-redirect or stored-XSS navigation target. Empty for pure client_credentials clients.',\n elementMeaning: 'One registered redirect URI: an https URL (any host/port) or an http loopback URL (localhost / 127.0.0.1 / ::1).',\n }),\n postLogoutRedirectUris: schemaShape.postLogoutRedirectUris.arraySpec({\n meaning:\n 'Exact-match allowlist of POST-LOGOUT redirect targets for OIDC RP-Initiated Logout. When a relying party ends the user session at /oauth/end-session with a post_logout_redirect_uri, that value must equal one entry by exact string (no wildcards/substrings) or the OP refuses to redirect back and lands the user on its own logged-out page. Each entry is constrained to a safe absolute URL — https for any host/port, or http only for a loopback host — with no fragment or embedded credentials, the same anti-open-redirect gate as redirectUris. Empty for clients that never drive an interactive logout.',\n elementMeaning: 'One registered post-logout redirect URI: an https URL (any host/port) or an http loopback URL (localhost / 127.0.0.1 / ::1).',\n }),\n registrationOrigin: schemaShape.registrationOrigin.enumSpec({\n meaning:\n 'WHO registered this client, which is a different question from which scope owns the row. Every client created through the admin APIs is OPERATOR — a principal with standing in this application vouched for it. DYNAMIC means an anonymous caller self-registered it at the RFC 7591 `/oauth/register` endpoint and proved nothing beyond reaching the server. The authorize path reads this field to decide TRUST: a DYNAMIC client is treated as belonging to no tenant, so it can never inherit the first-party posture its APPLICATION-scoped row would otherwise imply, always faces the interactive consent screen, and is capped at identity scopes. Server-managed and immutable — a caller able to set it could file itself as vouched-for.',\n importance: FieldSemanticImportance.CONTEXTUAL,\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'OAuthClientRegistrationOrigin',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [OAuthClientRegistrationOrigin.OPERATOR]: { meaning: 'Created by a principal with standing in this application (an administrator, a platform operator, or a seed). The default for authenticated administrative registration.' },\n [OAuthClientRegistrationOrigin.DYNAMIC]: { meaning: 'Self-registered anonymously through RFC 7591 dynamic client registration; unaffiliated, consent-always, identity scopes only.' },\n },\n }),\n tokenEndpointAuthMethod: schemaShape.tokenEndpointAuthMethod.enumSpec({\n meaning: 'Whether this client is PUBLIC (PKCE-only — no client secret at the token endpoint) or CONFIDENTIAL (must present its client_secret to redeem an authorization code or revoke a token). Defaults to public; a server-side client that can safely hold a secret opts into confidential.',\n importance: FieldSemanticImportance.CONTEXTUAL,\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'OAuthTokenEndpointAuthMethod',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [OAuthTokenEndpointAuthMethod.NONE]: { meaning: 'Public client: no secret at the token endpoint; authorization_code relies on PKCE S256 + exact redirect_uri.' },\n [OAuthTokenEndpointAuthMethod.CLIENT_SECRET_BASIC]: { meaning: 'Confidential client presenting its secret via HTTP Basic auth.' },\n [OAuthTokenEndpointAuthMethod.CLIENT_SECRET_POST]: { meaning: 'Confidential client presenting its secret in the request body.' },\n },\n }),\n },\n operations: {\n [Op.READ]: {\n purpose: 'Inspect a single app client without exposing the hashed secret in responses.',\n outcome: 'The client metadata is returned to an application super administrator; secret material is never returned by this operation.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The client metadata (never the hashed secret) was found and returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an app super-admin; every public variant of this resource is `APP_ADMIN_SUPER_ADMIN`-only.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No app client exists for the supplied id in the caller’s application scope.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Inspect a confidential application integration client',\n response: APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n variants: {\n context: {\n examples: [\n {\n title: 'Inspect the client through the context representation',\n response: APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n summary: {\n examples: [\n {\n title: 'Inspect the client summary used in selectors',\n response: APPLICATION_OAUTH_CLIENT_SUMMARY_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n },\n },\n [Op.LIST]: {\n purpose: 'List clients in app scope for admin users.',\n outcome: 'Rows in the app-admin OAuth-clients surface and related entry points.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of app clients in the caller’s application scope.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an app super-admin; client inventory is `APP_ADMIN_SUPER_ADMIN`-only.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Browse application OAuth clients',\n request: { page: 1, limit: 20, sort: 'createdAt:desc' },\n response: APPLICATION_OAUTH_CLIENT_PAGE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n variants: {\n context: {\n examples: [\n {\n title: 'Browse clients through the context representation',\n request: { page: 1, limit: 20, sort: 'createdAt:desc' },\n response: APPLICATION_OAUTH_CLIENT_PAGE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n summary: {\n examples: [\n {\n title: 'Browse compact client summaries',\n request: { page: 1, limit: 20, sort: 'createdAt:desc' },\n response: APPLICATION_OAUTH_CLIENT_SUMMARY_PAGE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n },\n },\n [Op.SEARCH]: {\n purpose: 'Find application OAuth clients by the documented administrative filters and sort order.',\n outcome: 'A paginated set of clients matching the supplied filters.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of app clients matching the admin filter/sort criteria.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an app super-admin; the admin search variant is `APP_ADMIN_SUPER_ADMIN`-only.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Find active expiring application integrations',\n request: {\n status: OAuthClientStatus.ACTIVE,\n hasExpiration: true,\n page: 1,\n limit: 20,\n sort: 'lastUsedAt:desc',\n },\n response: APPLICATION_OAUTH_CLIENT_PAGE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n [Op.CREATE]: {\n purpose: 'Register a new application OAuth client and issue its first client secret.',\n outcome: 'The client is registered, application administrators are notified, and the plaintext secret is returned exactly once. Later reads expose only its prefix.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'The client was registered; the response carries the one-time plaintext secret alongside the persisted metadata.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The client name, roles, or expiry payload fails schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an app super-admin; registering clients is a high-risk `APP_ADMIN_SUPER_ADMIN`-only operation.' },\n ],\n idempotent: false,\n rateLimitNote: 'Client registration is high-risk credential issuance and is rate-limited per application to slow credential-spraying and accidental bulk creation.',\n examples: [\n {\n title: 'Register a confidential application machine client',\n request: {\n name: APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE.name,\n description: APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE.description,\n roles: APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE.roles,\n allowedScopes: APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE.allowedScopes,\n allowedGrants: APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE.allowedGrants,\n redirectUris: APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE.redirectUris,\n requiresConsent: APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE.requiresConsent,\n tokenEndpointAuthMethod: APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE.tokenEndpointAuthMethod,\n status: APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE.status,\n expiresAt: APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE.expiresAt,\n },\n response: {\n ...APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE,\n hashedSecret: 'cf9879a8df9068394d6281461312360432572ad96951f86eed4ab515a9f5222d',\n plainSecret: 'oc_app_example-secret-returned-once',\n },\n forStatus: HttpResponseStatusCode.CREATED_201,\n },\n ],\n },\n [Op.DELETE]: {\n purpose: 'Repository-only teardown of the application OAuth-client row when its owning application is deleted (composition `onParentDelete` cascade).',\n outcome: 'Every OAuth client under the application is removed together with the application — the composition parts do not outlive their whole.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The application OAuth-client row was deleted as part of the owning application’s deletion cascade.' },\n ],\n // REPOSITORY_ONLY variant (APP_ADMIN_SUPER_ADMIN) — invoked by the onParentDelete cascade, not a public HTTP endpoint, so no client-facing 400/403/404 are documented.\n idempotent: true,\n },\n [AppOAuthClients_Operations.ROTATE]: {\n operationId: AppOAuthClients_Operations.ROTATE,\n purpose: 'Reissue a client with invalidation of the old material at a specified boundary.',\n outcome: 'The new plaintext secret is returned exactly once. The previous secret remains valid until the requested invalidation time so integrations can migrate without downtime.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The client was rotated; the response carries the new one-time plaintext and the old-material cutover fields.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The rotation boundary/cutover payload fails schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an app super-admin; rotation is a high-risk `APP_ADMIN_SUPER_ADMIN`-only operation.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The operation declares `requiresStepUpAuthentication`, and the request carried no valid single-use re-authentication token. Rotation hands back the replacement in plaintext and establishes when the previous secret becomes unusable, so holding a live session is deliberately not sufficient — obtain a token from the re-authentication route and retry with it.', errorCode: 'STEP_UP_REQUIRED' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No app client exists for the supplied id in the caller’s application scope.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The client is in a state where rotation is not allowed (e.g. it is already inactive or expired).' },\n ],\n idempotent: false,\n rateLimitNote: 'Rotation issues fresh secret material and is rate-limited per client to prevent rapid re-rotation that would churn the credential cutover window.',\n examples: [\n {\n title: 'Rotate a client with a scheduled migration window',\n request: {\n oldSecretInvalidationDate: '2099-06-16T00:00:00.000Z',\n },\n response: {\n ...APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE,\n secretPrefix: 'oc_app_2',\n previousSecretPrefix: APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE.secretPrefix,\n previousSecretInvalidationDate: '2099-06-16T00:00:00.000Z',\n plainSecret: 'oc_app_rotated-secret-returned-once',\n oldClientId: APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE._id,\n oldSecretInvalidationDate: '2099-06-16T00:00:00.000Z',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n [AppOAuthClients_Operations.REGENERATE]: {\n operationId: AppOAuthClients_Operations.REGENERATE,\n purpose: 'Generate a new secret without the full rotate lifecycle semantics.',\n outcome: 'The new plaintext secret is returned exactly once, administrators are notified, and the previous secret remains valid until a later rotation completes the cutover.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A fresh secret was generated for the existing client record; the response carries the new one-time plaintext.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an app super-admin; regeneration is `APP_ADMIN_SUPER_ADMIN`-only.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No app client exists for the supplied id in the caller’s application scope.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The client is in a state where regenerating the secret is not allowed (e.g. it is inactive or expired).' },\n ],\n idempotent: false,\n rateLimitNote: 'Secret regeneration is rate-limited per client for the same credential-hygiene reasons as rotation.',\n examples: [\n {\n title: 'Regenerate with an open migration overlap',\n request: {},\n response: {\n ...APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE,\n secretPrefix: 'oc_app_3',\n previousSecretPrefix: APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE.secretPrefix,\n plainSecret: 'oc_app_regenerated-secret-returned-once',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n },\n businessConstraints: [\n 'All public HTTP operation variants in the factory are restricted to `APP_ADMIN_SUPER_ADMIN`; do not model member-level access in companion flows.',\n 'Plaintext is only on create/rotate/regenerate responses; avoid implying clients can re-download full secrets from READ.',\n 'ROTATE/REGENERATE keep the prior secret authenticating during a grace window (rotate: until `previousSecretInvalidationDate`; regenerate: until the next rotation); the client-credentials exchange accepts the current OR the not-yet-invalidated previous secret.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.APPLICATION },\n);\n"]}
|
|
1
|
+
{"version":3,"file":"application-oauth-clients.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/applications/resources/application-oauth-clients.resource.specification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,0BAA0B,EAC1B,WAAW,EACX,cAAc,EACd,qBAAqB,IAAI,EAAE,EAC3B,cAAc,EACd,4BAA4B,EAC5B,6BAA6B,EAC7B,iBAAiB,EACjB,4BAA4B,EAC5B,oBAAoB,EACpB,0DAA0D,IAAI,sBAAsB,GACrF,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAC5F,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAE3E,MAAM,uCAAuC,GAAG;IAC9C,GAAG,EAAE,+BAA+B;IACpC,IAAI,EAAE,6BAA6B;IACnC,WAAW,EAAE,yEAAyE;IACtF,KAAK,EAAE,WAAW,CAAC,WAAW;IAC9B,KAAK,EAAE,CAAC,cAAc,CAAC,gBAAgB,CAAC;IACxC,aAAa,EAAE,EAAE;IACjB,aAAa,EAAE,CAAC,cAAc,CAAC,kBAAkB,CAAC;IAClD,YAAY,EAAE,EAAE;IAChB,sBAAsB,EAAE,EAAE;IAC1B,eAAe,EAAE,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E,qKAAqK;YAC9K,gBAAgB,EAAE;gBAChB,EAAE,IAAI,EAAE,sBAAsB,CAAC,MAAM,EAAE,OAAO,EAAE,+GAA+G,EAAE;aAClK;YACD,cAAc,EAAE;gBACd,EAAE,IAAI,EAAE,sBAAsB,CAAC,aAAa,EAAE,IAAI,EAAE,qFAAqF,EAAE;gBAC3I,EAAE,IAAI,EAAE,sBAAsB,CAAC,aAAa,EAAE,IAAI,EAAE,6EAA6E,EAAE;gBACnI,EAAE,IAAI,EAAE,sBAAsB,CAAC,YAAY,EAAE,IAAI,EAAE,yGAAyG,EAAE;aAC/J;YACD,UAAU,EAAE,KAAK;YACjB,aAAa,EAAE,qGAAqG;YACpH,QAAQ,EAAE;gBACR;oBACE,KAAK,EAAE,2CAA2C;oBAClD,OAAO,EAAE,EAAE;oBACX,QAAQ,EAAE;wBACR,GAAG,uCAAuC;wBAC1C,YAAY,EAAE,UAAU;wBACxB,oBAAoB,EAAE,uCAAuC,CAAC,YAAY;wBAC1E,WAAW,EAAE,yCAAyC;qBACvD;oBACD,SAAS,EAAE,sBAAsB,CAAC,MAAM;iBACzC;aACF;SACF;KACF;IACD,mBAAmB,EAAE;QACnB,mJAAmJ;QACnJ,yHAAyH;QACzH,qQAAqQ;KACtQ;CACF,CAAC,EACF,EAAE,oBAAoB,EAAE,oBAAoB,CAAC,WAAW,EAAE,CAC3D,CAAC","sourcesContent":["import { LabelAudience } from '@wildo-ai/presets-components-models';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n AppOAuthClients_Operations,\n ApiKeyScope,\n CORE_APP_ROLES,\n CoreResourceOperation as Op,\n OAuthGrantType,\n OAuthClientApplicationSchema,\n OAuthClientRegistrationOrigin,\n OAuthClientStatus,\n OAuthTokenEndpointAuthMethod,\n ResourcePrimaryScope,\n appOAuthClientsResourceConfiguration_InitializationFactory as appOAuthClientsFactory,\n} from '@wildo-ai/saas-models';\nimport { HttpResponseStatusCode, resourceSpecification } from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\nconst APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE = {\n _id: 'oauth_client_app_01HX2EXAMPLE',\n name: 'Tenant provisioning service',\n description: 'Confidential application client used by the tenant provisioning worker.',\n scope: ApiKeyScope.APPLICATION,\n roles: [CORE_APP_ROLES.APP_ADMIN_VIEWER],\n allowedScopes: [],\n allowedGrants: [OAuthGrantType.CLIENT_CREDENTIALS],\n redirectUris: [],\n postLogoutRedirectUris: [],\n requiresConsent: false,\n tokenEndpointAuthMethod: OAuthTokenEndpointAuthMethod.CLIENT_SECRET_BASIC,\n status: OAuthClientStatus.ACTIVE,\n expiresAt: '2099-06-15T00:00:00.000Z',\n createdAt: '2026-08-02T09:30:00.000Z',\n updatedAt: '2026-08-17T15:05:00.000Z',\n secretPrefix: 'oc_app_1',\n registrationOrigin: OAuthClientRegistrationOrigin.OPERATOR,\n applicationId: 'application_01HX2EXAMPLE',\n} as const;\n\nconst APPLICATION_OAUTH_CLIENT_SUMMARY_EXAMPLE = {\n _id: APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE._id,\n name: APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE.name,\n tokenEndpointAuthMethod: APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE.tokenEndpointAuthMethod,\n status: APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE.status,\n expiresAt: APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE.expiresAt,\n createdAt: APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE.createdAt,\n secretPrefix: APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE.secretPrefix,\n registrationOrigin: APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE.registrationOrigin,\n applicationId: APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE.applicationId,\n} as const;\n\nconst APPLICATION_OAUTH_CLIENT_PAGE_EXAMPLE = {\n data: [APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE],\n pagination: { page: 1, limit: 20, total: 1, totalPages: 1 },\n} as const;\n\nconst APPLICATION_OAUTH_CLIENT_SUMMARY_PAGE_EXAMPLE = {\n data: [APPLICATION_OAUTH_CLIENT_SUMMARY_EXAMPLE],\n pagination: { page: 1, limit: 20, total: 1, totalPages: 1 },\n} as const;\n\n/**\n * Framework-owned base specification for the application-scoped\n * `applicationOAuthClients` resource.\n *\n * This resource is a FAITHFUL MIRROR of the api-keys resource\n * (`application-api-keys.resource.specification.ts`) with a FOCUSED operation\n * set — core READ/LIST/SEARCH/CREATE plus a REPOSITORY_ONLY DELETE\n * (onParentDelete cascade) and custom ROTATE/REGENERATE. The\n * DEACTIVATE/REACTIVATE/EXTEND_EXPIRY/USAGE_STATS custom ops the api-keys spec\n * documents are intentionally deferred to the OIDC branch\n * (`.claude/plans/external-access-oidc-mcp-a2a.md`).\n *\n * Unlike api-keys, this resource ships NO UI behavior preset today, so — like\n * `jobExecutions` — it is authored from the shared resource factory only\n * (`resourceSpecification(...)`, no `resourceSpecificationFromFrontendConfiguration`\n * overlay). The label/layout/views frontend narration the api-keys spec carries\n * has no preset to document here.\n *\n * `resourcePrimaryScope: APPLICATION` — an application OAuth client is\n * application-wide data owned by the `applicationId` FK; the scope is enforced by\n * the spec ↔ registry alignment guard against the `isPrimaryScope: true`\n * relationship row for `OAUTH_CLIENTS_APPLICATION`.\n */\nexport const applicationOAuthClientsResourceSpecification = resourceSpecification(\n appOAuthClientsFactory,\n OAuthClientApplicationSchema,\n ({ schemaShape }) => ({\n purpose: 'Application-scoped registered OAuth clients: client-credentials secrets for obtaining tokens and calling backend APIs in app-level automation and integration contexts.',\n businessRole: 'App-admin machine-to-machine OAuth credential. Under client-credentials it authenticates the SAME application machine principal (`APPLICATION_MACHINE`) that an application API key does — a distinct credential type, not a distinct principal — distinct from end-user sessions and from organization OAuth clients.',\n lifecycleRole: 'Created, rotated, regenerated, and retired by application administrators; ordinary application members cannot manage these credentials. The current token paths do not populate `lastUsedAt`, so usage must be established from audit and workload evidence.',\n audience: LabelAudience.DEVELOPER,\n subDomain: EngineResourceSubDomain.APPLICATIONS,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'OAuthClientApplicationSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'appOAuthClientsResourceConfiguration_InitializationFactory',\n symbolKind: CodeSymbolKind.FACTORY,\n declarationKind: CodeDeclarationKind.FUNCTION,\n },\n resourceType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n memberName: 'OAUTH_CLIENTS_APPLICATION',\n },\n operationVocabulary: {\n coreEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceOperation',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n customEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'AppOAuthClients_Operations',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n notes: [\n 'No UI behavior preset exists for this resource — authored backend-only (no frontend overlay), mirroring the `jobExecutions` shape rather than the api-keys mixed shape.',\n 'Runtime declares userNotifications with channel EMAIL on CREATE/ROTATE/REGENERATE; DF-1 communications blocks are omitted from this pass to stay a structural mirror of the api-keys spec, which likewise documents no communications blocks.',\n ],\n },\n fields: {\n name: schemaShape.name.stringSpec({\n meaning: 'Label for the OAuth client in app-admin UI.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n description: schemaShape.description.stringSpec({\n meaning: 'Operator-authored explanation of the application-level integration that owns this credential.',\n }),\n status: schemaShape.status.enumSpec({\n meaning: 'Whether the app client is allowed to obtain tokens and authenticate.',\n importance: FieldSemanticImportance.PRIMARY,\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'OAuthClientStatus',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [OAuthClientStatus.ACTIVE]: { meaning: 'Client may mint tokens within policy and expiry.' },\n [OAuthClientStatus.INACTIVE]: { meaning: 'Revoked or disabled; token exchanges should fail.' },\n [OAuthClientStatus.EXPIRED]: { meaning: 'Past its validity window; treat as invalid.' },\n },\n }),\n secretPrefix: schemaShape.secretPrefix.stringSpec({\n meaning: 'Short prefix for support correlation (not the full secret).',\n }),\n roles: schemaShape.roles.arraySpec({\n meaning: 'Roles embedded on the client; every token minted for it inherits exactly these roles, bounding what the integration can do (least-privilege for automation).',\n elementMeaning: 'One role identifier — a core app/org role token or an app-defined custom role string.',\n // Element is a union of `CORE_APP_ROLES` + `CORE_ORG_ROLES` + a free\n // custom-role string; the shape validator requires ONE enum vocabulary\n // to advertise, so we name the app-scope enum (the primary vocabulary\n // for an application client). Org tokens and custom strings remain valid\n // per `elementMeaning`.\n elementType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CORE_APP_ROLES',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n }),\n allowedScopes: schemaShape.allowedScopes.arraySpec({\n meaning:\n 'Identity scopes this client may request in an authorization-code flow. These scopes select identity claims; authorization remains roles-only. Empty for a client-credentials-only machine client.',\n elementMeaning: 'One OAuth/OIDC identity scope allowed for this client, such as `openid`, `profile`, or `email`.',\n }),\n allowedGrants: schemaShape.allowedGrants.arraySpec({\n meaning: 'OAuth grant types this client is allowed to use. A token request using any other grant is refused.',\n elementMeaning: 'One permitted OAuth grant type.',\n elementType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'OAuthGrantType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n }),\n requiresConsent: schemaShape.requiresConsent.booleanSpec({\n meaning:\n 'Whether an authorization-code request must obtain explicit user consent before a code is issued. Machine-only client-credentials clients leave this false.',\n }),\n applicationId: schemaShape.applicationId.stringSpec({ meaning: 'Immutable owning application for this client record.' }),\n expiresAt: schemaShape.expiresAt.dateSpec({ meaning: 'Optional hard stop for validity.' }),\n lastUsedAt: schemaShape.lastUsedAt.dateSpec({\n meaning: 'Reserved timestamp for a recorded successful use. The current OAuth token paths do not populate it; an absent or old value is not evidence that the client is unused.',\n }),\n previousSecretPrefix: schemaShape.previousSecretPrefix.stringSpec({\n meaning: 'Public prefix of the previous secret retained during a rotation or regeneration overlap window.',\n }),\n previousSecretInvalidationDate: schemaShape.previousSecretInvalidationDate.dateSpec({\n meaning: 'After a rotation, when the PRIOR secret stops authenticating; during this grace window both secrets work so integrations can migrate without downtime (absent/null after a regenerate = prior secret valid until the next rotation).',\n }),\n redirectUris: schemaShape.redirectUris.arraySpec({\n meaning:\n 'Exact-match allowlist of post-authorization redirect targets for the authorization_code flow. A request redirect_uri must equal one entry by exact string (no wildcards/substrings), and each entry is itself constrained to a safe absolute URL — https for any host/port, or http only for a loopback host — with no fragment or embedded credentials, so a registered entry can never become an open-redirect or stored-XSS navigation target. Empty for pure client_credentials clients.',\n elementMeaning: 'One registered redirect URI: an https URL (any host/port) or an http loopback URL (localhost / 127.0.0.1 / ::1).',\n }),\n postLogoutRedirectUris: schemaShape.postLogoutRedirectUris.arraySpec({\n meaning:\n 'Exact-match allowlist of POST-LOGOUT redirect targets for OIDC RP-Initiated Logout. When a relying party ends the user session at /oauth/end-session with a post_logout_redirect_uri, that value must equal one entry by exact string (no wildcards/substrings) or the OP refuses to redirect back and lands the user on its own logged-out page. Each entry is constrained to a safe absolute URL — https for any host/port, or http only for a loopback host — with no fragment or embedded credentials, the same anti-open-redirect gate as redirectUris. Empty for clients that never drive an interactive logout.',\n elementMeaning: 'One registered post-logout redirect URI: an https URL (any host/port) or an http loopback URL (localhost / 127.0.0.1 / ::1).',\n }),\n registrationOrigin: schemaShape.registrationOrigin.enumSpec({\n meaning:\n 'WHO registered this client, which is a different question from which scope owns the row. Every client created through the admin APIs is OPERATOR — a principal with standing in this application vouched for it. DYNAMIC means an anonymous caller self-registered it at the RFC 7591 `/oauth/register` endpoint and proved nothing beyond reaching the server. The authorize path reads this field to decide TRUST: a DYNAMIC client is treated as belonging to no tenant, so it can never inherit the first-party posture its APPLICATION-scoped row would otherwise imply, always faces the interactive consent screen, and is capped at identity scopes. Server-managed and immutable — a caller able to set it could file itself as vouched-for.',\n importance: FieldSemanticImportance.CONTEXTUAL,\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'OAuthClientRegistrationOrigin',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [OAuthClientRegistrationOrigin.OPERATOR]: { meaning: 'Created by a principal with standing in this application (an administrator, a platform operator, or a seed). The default for authenticated administrative registration.' },\n [OAuthClientRegistrationOrigin.DYNAMIC]: { meaning: 'Self-registered anonymously through RFC 7591 dynamic client registration; unaffiliated, consent-always, identity scopes only.' },\n },\n }),\n tokenEndpointAuthMethod: schemaShape.tokenEndpointAuthMethod.enumSpec({\n meaning: 'How the client authenticates at the token endpoint: `none` for a public client (PKCE only, no client secret), or `client_secret_basic` / `client_secret_post` for a confidential client that presents its client_secret to redeem an authorization code or revoke a token. Defaults to `none`; a server-side client that can safely hold a secret opts into one of the secret-bearing methods.',\n importance: FieldSemanticImportance.CONTEXTUAL,\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'OAuthTokenEndpointAuthMethod',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [OAuthTokenEndpointAuthMethod.NONE]: { meaning: 'Public client: no secret at the token endpoint; authorization_code relies on PKCE S256 + exact redirect_uri.' },\n [OAuthTokenEndpointAuthMethod.CLIENT_SECRET_BASIC]: { meaning: 'Confidential client presenting its secret via HTTP Basic auth.' },\n [OAuthTokenEndpointAuthMethod.CLIENT_SECRET_POST]: { meaning: 'Confidential client presenting its secret in the request body.' },\n },\n }),\n },\n operations: {\n [Op.READ]: {\n purpose: 'Inspect a single app client without exposing the hashed secret in responses.',\n outcome: 'The client metadata is returned to an application super administrator; secret material is never returned by this operation.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The client metadata (never the hashed secret) was found and returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an app super-admin; every public variant of this resource is `APP_ADMIN_SUPER_ADMIN`-only.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No app client exists for the supplied id in the caller’s application scope.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Inspect a confidential application integration client',\n response: APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n variants: {\n context: {\n examples: [\n {\n title: 'Inspect the client through the context representation',\n response: APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n summary: {\n examples: [\n {\n title: 'Inspect the client summary used in selectors',\n response: APPLICATION_OAUTH_CLIENT_SUMMARY_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n },\n },\n [Op.LIST]: {\n purpose: 'List clients in app scope for admin users.',\n outcome: 'Rows in the app-admin OAuth-clients surface and related entry points.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of app clients in the caller’s application scope.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an app super-admin; client inventory is `APP_ADMIN_SUPER_ADMIN`-only.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Browse application OAuth clients',\n request: { page: 1, limit: 20, sort: 'createdAt:desc' },\n response: APPLICATION_OAUTH_CLIENT_PAGE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n variants: {\n context: {\n examples: [\n {\n title: 'Browse clients through the context representation',\n request: { page: 1, limit: 20, sort: 'createdAt:desc' },\n response: APPLICATION_OAUTH_CLIENT_PAGE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n summary: {\n examples: [\n {\n title: 'Browse compact client summaries',\n request: { page: 1, limit: 20, sort: 'createdAt:desc' },\n response: APPLICATION_OAUTH_CLIENT_SUMMARY_PAGE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n },\n },\n [Op.SEARCH]: {\n purpose: 'Find application OAuth clients by the documented administrative filters and sort order.',\n outcome: 'A paginated set of clients matching the supplied filters.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of app clients matching the admin filter/sort criteria.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an app super-admin; the admin search variant is `APP_ADMIN_SUPER_ADMIN`-only.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Find active expiring application integrations',\n request: {\n status: OAuthClientStatus.ACTIVE,\n hasExpiration: true,\n page: 1,\n limit: 20,\n sort: 'lastUsedAt:desc',\n },\n response: APPLICATION_OAUTH_CLIENT_PAGE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n [Op.CREATE]: {\n purpose: 'Register a new application OAuth client and issue its first client secret.',\n outcome: 'The client is registered, application administrators are notified, and the plaintext secret is returned exactly once. Later reads expose only its prefix.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'The client was registered; the response carries the one-time plaintext secret alongside the persisted metadata.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The client name, roles, or expiry payload fails schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an app super-admin; registering clients is a high-risk `APP_ADMIN_SUPER_ADMIN`-only operation.' },\n ],\n idempotent: false,\n rateLimitNote: 'Client registration is high-risk credential issuance and is rate-limited per application to slow credential-spraying and accidental bulk creation.',\n examples: [\n {\n title: 'Register a confidential application machine client',\n request: {\n name: APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE.name,\n description: APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE.description,\n roles: APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE.roles,\n allowedScopes: APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE.allowedScopes,\n allowedGrants: APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE.allowedGrants,\n redirectUris: APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE.redirectUris,\n requiresConsent: APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE.requiresConsent,\n tokenEndpointAuthMethod: APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE.tokenEndpointAuthMethod,\n status: APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE.status,\n expiresAt: APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE.expiresAt,\n },\n response: {\n ...APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE,\n hashedSecret: 'cf9879a8df9068394d6281461312360432572ad96951f86eed4ab515a9f5222d',\n plainSecret: 'oc_app_example-secret-returned-once',\n },\n forStatus: HttpResponseStatusCode.CREATED_201,\n },\n ],\n },\n [Op.DELETE]: {\n purpose: 'Repository-only teardown of the application OAuth-client row when its owning application is deleted (composition `onParentDelete` cascade).',\n outcome: 'Every OAuth client under the application is removed together with the application — the composition parts do not outlive their whole.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The application OAuth-client row was deleted as part of the owning application’s deletion cascade.' },\n ],\n // REPOSITORY_ONLY variant (APP_ADMIN_SUPER_ADMIN) — invoked by the onParentDelete cascade, not a public HTTP endpoint, so no client-facing 400/403/404 are documented.\n idempotent: true,\n },\n [AppOAuthClients_Operations.ROTATE]: {\n operationId: AppOAuthClients_Operations.ROTATE,\n purpose: 'Reissue a client with invalidation of the old material at a specified boundary.',\n outcome: 'The new plaintext secret is returned exactly once. The previous secret remains valid until the requested invalidation time so integrations can migrate without downtime.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The client was rotated; the response carries the new one-time plaintext and the old-material cutover fields.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The rotation boundary/cutover payload fails schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an app super-admin; rotation is a high-risk `APP_ADMIN_SUPER_ADMIN`-only operation.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The operation declares `requiresStepUpAuthentication`, and the request carried no valid single-use re-authentication token. Rotation hands back the replacement in plaintext and establishes when the previous secret becomes unusable, so holding a live session is deliberately not sufficient — obtain a token from the re-authentication route and retry with it.', errorCode: 'STEP_UP_REQUIRED' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No app client exists for the supplied id in the caller’s application scope.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The client is in a state where rotation is not allowed (e.g. it is already inactive or expired).' },\n ],\n idempotent: false,\n rateLimitNote: 'Rotation issues fresh secret material and is rate-limited per client to prevent rapid re-rotation that would churn the credential cutover window.',\n examples: [\n {\n title: 'Rotate a client with a scheduled migration window',\n request: {\n oldSecretInvalidationDate: '2099-06-16T00:00:00.000Z',\n },\n response: {\n ...APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE,\n secretPrefix: 'oc_app_2',\n previousSecretPrefix: APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE.secretPrefix,\n previousSecretInvalidationDate: '2099-06-16T00:00:00.000Z',\n plainSecret: 'oc_app_rotated-secret-returned-once',\n oldClientId: APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE._id,\n oldSecretInvalidationDate: '2099-06-16T00:00:00.000Z',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n [AppOAuthClients_Operations.REGENERATE]: {\n operationId: AppOAuthClients_Operations.REGENERATE,\n purpose: 'Generate a new secret without the full rotate lifecycle semantics.',\n outcome: 'The new plaintext secret is returned exactly once, administrators are notified, and the previous secret remains valid until a later rotation completes the cutover.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A fresh secret was generated for the existing client record; the response carries the new one-time plaintext.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an app super-admin; regeneration is `APP_ADMIN_SUPER_ADMIN`-only.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No app client exists for the supplied id in the caller’s application scope.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The client is in a state where regenerating the secret is not allowed (e.g. it is inactive or expired).' },\n ],\n idempotent: false,\n rateLimitNote: 'Secret regeneration is rate-limited per client for the same credential-hygiene reasons as rotation.',\n examples: [\n {\n title: 'Regenerate with an open migration overlap',\n request: {},\n response: {\n ...APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE,\n secretPrefix: 'oc_app_3',\n previousSecretPrefix: APPLICATION_OAUTH_CLIENT_RECORD_EXAMPLE.secretPrefix,\n plainSecret: 'oc_app_regenerated-secret-returned-once',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n },\n businessConstraints: [\n 'All public HTTP operation variants in the factory are restricted to `APP_ADMIN_SUPER_ADMIN`; do not model member-level access in companion flows.',\n 'Plaintext is only on create/rotate/regenerate responses; avoid implying clients can re-download full secrets from READ.',\n 'ROTATE/REGENERATE keep the prior secret authenticating during a grace window (rotate: until `previousSecretInvalidationDate`; regenerate: until the next rotation); the client-credentials exchange accepts the current OR the not-yet-invalidated previous secret.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.APPLICATION },\n);\n"]}
|
package/dist/esm/engine/applications/resources/application-versions.resource.specification.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application-versions.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/applications/resources/application-versions.resource.specification.ts"],"names":[],"mappings":"AAQA,OAAO,EAEL,qBAAqB,IAAI,EAAE,EAG5B,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"application-versions.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/applications/resources/application-versions.resource.specification.ts"],"names":[],"mappings":"AAQA,OAAO,EAEL,qBAAqB,IAAI,EAAE,EAG5B,MAAM,uBAAuB,CAAC;AAgB/B,eAAO,MAAM,wCAAwC;;;;;;iCAmKpD,CAAC"}
|
package/dist/esm/engine/applications/resources/application-versions.resource.specification.js
CHANGED
|
@@ -3,12 +3,14 @@ import { LabelAudience } from '@wildo-ai/presets-components-models';
|
|
|
3
3
|
import { CodeDeclarationKind, CodeSymbolKind, FieldSemanticImportance, } from '@wildo-ai/zod-decorators';
|
|
4
4
|
import { ApplicationVersionSchema, CoreResourceOperation as Op, ResourcePrimaryScope, applicationVersionsResourceConfiguration_InitializationFactory as applicationVersionsFactory, } from '@wildo-ai/saas-models';
|
|
5
5
|
import { HttpResponseStatusCode, resourceFrontendConfiguration, resourceSpecification, resourceSpecificationFromFrontendConfiguration, } from '../../../_core/index.js';
|
|
6
|
+
import { EngineResourceSubDomain } from '../../engine-resource-sub-domain.js';
|
|
6
7
|
const applicationVersionsUI = applicationVersionsSource;
|
|
7
8
|
export const applicationVersionsResourceSpecification = resourceSpecificationFromFrontendConfiguration(resourceFrontendConfiguration(applicationVersionsUI), resourceSpecification(applicationVersionsFactory, ApplicationVersionSchema, ({ schemaShape }) => ({
|
|
8
|
-
purpose: '
|
|
9
|
+
purpose: 'The application\'s published releases: one record per version, with its release notes and publication date. A published version is not edited afterwards.',
|
|
9
10
|
businessRole: 'Serves as the application’s changelog of record — what shipped, when, and with which notes — for support, audit, and migration planning.',
|
|
10
11
|
lifecycleRole: 'Grows an append-mostly history over time through core CRUD; it records releases and does not control them. Deployment (which build runs where) is owned by the CLI self-host lane, and the framework is mono-env, so no promotion/rollback/deprecation state lives on the version row.',
|
|
11
12
|
audience: LabelAudience.DEVELOPER,
|
|
13
|
+
subDomain: EngineResourceSubDomain.APPLICATIONS,
|
|
12
14
|
codeHandling: {
|
|
13
15
|
mainSchema: {
|
|
14
16
|
packageName: '@wildo-ai/saas-models',
|
package/dist/esm/engine/applications/resources/application-versions.resource.specification.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application-versions.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/applications/resources/application-versions.resource.specification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0CAA0C,IAAI,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AACvH,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,wBAAwB,EACxB,qBAAqB,IAAI,EAAE,EAC3B,oBAAoB,EACpB,8DAA8D,IAAI,0BAA0B,GAC7F,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB,6BAA6B,EAC7B,qBAAqB,EACrB,8CAA8C,GAC/C,MAAM,6BAA6B,CAAC;AAOrC,MAAM,qBAAqB,GAAG,yBAAyE,CAAC;AAExG,MAAM,CAAC,MAAM,wCAAwC,GAAG,8CAA8C,CACpG,6BAA6B,CAAC,qBAAqB,CAAC,EACpD,qBAAqB,CACnB,0BAA0B,EAC1B,wBAAwB,EACxB,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,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ACnJ;CACF,CAAC,CACH,CAAC","sourcesContent":["import { applicationVersionsAdminResourceUIBehavior as applicationVersionsSource } from '@wildo-ai/presets-components';\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport type { ResourceUIBehaviorConfig } from '@wildo-ai/saas-frontend-lib/companion';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n ApplicationVersionSchema,\n CoreResourceOperation as Op,\n ResourcePrimaryScope,\n applicationVersionsResourceConfiguration_InitializationFactory as applicationVersionsFactory,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n} from '~wildo-specifications/_core';\n\ntype Cfg = ReturnType<typeof applicationVersionsFactory>;\ntype Custom = NonNullable<Cfg['customOperation']>;\ntype Core = Cfg['coreOperations'][number];\ntype Main = Cfg['mainSchema'];\n\nconst applicationVersionsUI = applicationVersionsSource as ResourceUIBehaviorConfig<Custom, Core, Main>;\n\nexport const applicationVersionsResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n resourceFrontendConfiguration(applicationVersionsUI),\n resourceSpecification(\n applicationVersionsFactory,\n ApplicationVersionSchema,\n ({ schemaShape }) => ({\n purpose: 'Immutable-ish semver release rows for an application, including release notes and publish dates.',\n businessRole: 'Serves as the application’s changelog of record — what shipped, when, and with which notes — for support, audit, and migration planning.',\n lifecycleRole: 'Grows an append-mostly history over time through core CRUD; it records releases and does not control them. Deployment (which build runs where) is owned by the CLI self-host lane, and the framework is mono-env, so no promotion/rollback/deprecation state lives on the version row.',\n audience: LabelAudience.DEVELOPER,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'ApplicationVersionSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'applicationVersionsResourceConfiguration_InitializationFactory',\n symbolKind: CodeSymbolKind.FACTORY,\n declarationKind: CodeDeclarationKind.FUNCTION,\n },\n resourceType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n memberName: 'APPLICATION_VERSIONS',\n },\n // No `customEnum`: this resource has no custom operations. The former\n // `ApplicationVersion_Operations` enum was removed on 2026-08-01 along with its three\n // release-management verbs (see `businessConstraints`).\n operationVocabulary: {\n coreEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceOperation',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n frontendConfigurationSources: [\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'applicationVersionsAdminResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n },\n fields: {\n appId: schemaShape.appId.foreignKeySpec({\n meaning: 'The owning `applications` row this release belongs to; immutable after create.',\n whyItMatters: 'Scopes the version history to a single application so roll-forward/rollback and changelog surfaces only ever mix builds of the same app.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n version: schemaShape.version.stringSpec({ meaning: 'Semver (or product-specific) string for this build.', importance: FieldSemanticImportance.PRIMARY }),\n releaseDate: schemaShape.releaseDate.dateSpec({ meaning: 'Publish timestamp for the cut.' }),\n releaseNotes: schemaShape.releaseNotes.stringSpec({ meaning: 'Changelog and migration notes for operators and support.' }),\n },\n operations: {\n [Op.CREATE]: {\n purpose: 'Record a new build row when a pipeline produces artifacts.',\n outcome: 'Appears in history tables and can be selected for traffic.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'The release row was recorded for the owning application and is returned with its id.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The version string or release fields fail schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an org admin for the owning application; recording releases is org-admin gated.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'The owning application referenced by this release does not exist in the caller’s scope.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'A release row with the same version string already exists for this application.' },\n ],\n idempotent: false,\n examples: [\n {\n title: 'Record a new release',\n request: {\n version: '2.4.0',\n releaseDate: '2026-06-15T09:00:00.000Z',\n releaseNotes: 'Adds bulk task completion and fixes the assignee filter.',\n },\n response: {\n version: '2.4.0',\n releaseDate: '2026-06-15T09:00:00.000Z',\n releaseNotes: 'Adds bulk task completion and fixes the assignee filter.',\n },\n forStatus: HttpResponseStatusCode.CREATED_201,\n },\n ],\n },\n [Op.READ]: {\n purpose: 'Detail view for a single release, including long notes.',\n outcome: 'Support and SRE can verify exactly what shipped.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The release row was found and its full detail (including notes) is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No release row exists for the supplied id in the caller’s scope.' },\n ],\n idempotent: true,\n },\n [Op.LIST]: {\n purpose: 'Paginated history for the owning application.',\n outcome: 'Ordered timeline for “what’s live” decisions.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of release rows for the owning application.' },\n ],\n idempotent: true,\n },\n [Op.SEARCH]: {\n purpose: 'Search or filter the release log when the factory enables it.',\n outcome: 'Narrowed rows for big tenants with frequent deploys.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of release rows matching the version/notes query.' },\n ],\n idempotent: true,\n },\n [Op.UPDATE]: {\n purpose: 'Patch release notes or metadata where mutability is allowed by policy.',\n outcome: 'Correct typos in notes without re-running the build.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The release row was patched and the updated record is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The edited release fields fail schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an org admin for the owning application; editing releases is org-admin gated.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No release row exists for the supplied id in the caller’s scope.' },\n ],\n idempotent: true,\n },\n [Op.DELETE]: {\n purpose: 'Remove errant or superseded records when legal policy allows hard delete.',\n outcome: 'Row absent from public history; audit events may still exist outside this resource.',\n responseStatuses: [\n { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The release row was deleted; no body is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an org admin for the owning application; deleting releases is org-admin gated.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No release row exists for the supplied id (or it was already deleted).' },\n ],\n idempotent: true,\n },\n },\n businessConstraints: [\n 'Only the admin `application` preset materializes the versions relationship tab; end-user `APPLICATION` main preset keeps versions hidden in merged maps.',\n 'This resource RECORDS releases; it does not control them. `PROMOTE` / `ROLLBACK` / `DEPRECATE` were declared here and removed on 2026-08-01 — all three were routed but wrote nothing, and the state they implied cannot live on this row: the framework is mono-env (each deployment has its own infrastructure and database), so \"which build is live in environment X\" is not a fact this application\\'s database can hold, and deploying a built image is owned by the CLI self-host lane rather than by a resource verb.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.APPLICATION },\n ),\n () => ({\n views: {\n [Op.CREATE]: { purpose: 'Register a new row after CI publishes artifacts.', whenToUse: 'Release automation and manual hotfix entry.' },\n [Op.READ]: { purpose: 'Detail drawer in admin for one release line.', whenToUse: 'Comparing notes during migration planning.' },\n [Op.LIST]: { purpose: 'History tab in admin apps surface.', whenToUse: 'Default release browser experience.' },\n [Op.SEARCH]: { purpose: 'Search the release log when search is enabled in factory config.', whenToUse: 'Large app histories in enterprise tenants.' },\n [Op.UPDATE]: { purpose: 'Note edits for clarifications or legal redactions in displayed changelog.', whenToUse: 'When marketing updates copy without changing bits.' },\n [Op.DELETE]: { purpose: 'Remove mistaken rows in exceptional migration flows.', whenToUse: 'Test builds accidentally captured as prod releases.' },\n },\n }),\n);\n"]}
|
|
1
|
+
{"version":3,"file":"application-versions.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/applications/resources/application-versions.resource.specification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0CAA0C,IAAI,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AACvH,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,wBAAwB,EACxB,qBAAqB,IAAI,EAAE,EAC3B,oBAAoB,EACpB,8DAA8D,IAAI,0BAA0B,GAC7F,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB,6BAA6B,EAC7B,qBAAqB,EACrB,8CAA8C,GAC/C,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAO3E,MAAM,qBAAqB,GAAG,yBAAyE,CAAC;AAExG,MAAM,CAAC,MAAM,wCAAwC,GAAG,8CAA8C,CACpG,6BAA6B,CAAC,qBAAqB,CAAC,EACpD,qBAAqB,CACnB,0BAA0B,EAC1B,wBAAwB,EACxB,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,CAAC;IACpB,OAAO,EAAE,2JAA2J;IACpK,YAAY,EAAE,0IAA0I;IACxJ,aAAa,EAAE,wRAAwR;IACvS,QAAQ,EAAE,aAAa,CAAC,SAAS;IACjC,SAAS,EAAE,uBAAuB,CAAC,YAAY;IAC/C,YAAY,EAAE;QACZ,UAAU,EAAE;YACV,WAAW,EAAE,uBAAuB;YACpC,UAAU,EAAE,0BAA0B;YACtC,UAAU,EAAE,cAA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;YACD,cAAc,EAAE;gBACd,EAAE,IAAI,EAAE,sBAAsB,CAAC,aAAa,EAAE,IAAI,EAAE,kGAAkG,EAAE;gBACxJ,EAAE,IAAI,EAAE,sBAAsB,CAAC,aAAa,EAAE,IAAI,EAAE,wEAAwE,EAAE;aAC/H;YACD,UAAU,EAAE,IAAI;SACjB;KACF;IACD,mBAAmB,EAAE;QACnB,0JAA0J;QAC1J,+fAA+f;KAChgB;CACF,CAAC,EACF,EAAE,oBAAoB,EAAE,oBAAoB,CAAC,WAAW,EAAE,CAC3D,EACD,GAAG,EAAE,CAAC,CAAC;IACL,KAAK,EAAE;QACL,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,kDAAkD,EAAE,SAAS,EAAE,6CAA6C,EAAE;QACtI,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,8CAA8C,EAAE,SAAS,EAAE,4CAA4C,EAAE;QAC/H,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,oCAAoC,EAAE,SAAS,EAAE,qCAAqC,EAAE;QAC9G,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,kEAAkE,EAAE,SAAS,EAAE,4CAA4C,EAAE;QACrJ,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,2EAA2E,EAAE,SAAS,EAAE,oDAAoD,EAAE;QACtK,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,sDAAsD,EAAE,SAAS,EAAE,qDAAqD,EAAE;KACnJ;CACF,CAAC,CACH,CAAC","sourcesContent":["import { applicationVersionsAdminResourceUIBehavior as applicationVersionsSource } from '@wildo-ai/presets-components';\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport type { ResourceUIBehaviorConfig } from '@wildo-ai/saas-frontend-lib/companion';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n ApplicationVersionSchema,\n CoreResourceOperation as Op,\n ResourcePrimaryScope,\n applicationVersionsResourceConfiguration_InitializationFactory as applicationVersionsFactory,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n} from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\ntype Cfg = ReturnType<typeof applicationVersionsFactory>;\ntype Custom = NonNullable<Cfg['customOperation']>;\ntype Core = Cfg['coreOperations'][number];\ntype Main = Cfg['mainSchema'];\n\nconst applicationVersionsUI = applicationVersionsSource as ResourceUIBehaviorConfig<Custom, Core, Main>;\n\nexport const applicationVersionsResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n resourceFrontendConfiguration(applicationVersionsUI),\n resourceSpecification(\n applicationVersionsFactory,\n ApplicationVersionSchema,\n ({ schemaShape }) => ({\n purpose: 'The application\\'s published releases: one record per version, with its release notes and publication date. A published version is not edited afterwards.',\n businessRole: 'Serves as the application’s changelog of record — what shipped, when, and with which notes — for support, audit, and migration planning.',\n lifecycleRole: 'Grows an append-mostly history over time through core CRUD; it records releases and does not control them. Deployment (which build runs where) is owned by the CLI self-host lane, and the framework is mono-env, so no promotion/rollback/deprecation state lives on the version row.',\n audience: LabelAudience.DEVELOPER,\n subDomain: EngineResourceSubDomain.APPLICATIONS,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'ApplicationVersionSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'applicationVersionsResourceConfiguration_InitializationFactory',\n symbolKind: CodeSymbolKind.FACTORY,\n declarationKind: CodeDeclarationKind.FUNCTION,\n },\n resourceType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n memberName: 'APPLICATION_VERSIONS',\n },\n // No `customEnum`: this resource has no custom operations. The former\n // `ApplicationVersion_Operations` enum was removed on 2026-08-01 along with its three\n // release-management verbs (see `businessConstraints`).\n operationVocabulary: {\n coreEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceOperation',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n frontendConfigurationSources: [\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'applicationVersionsAdminResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n },\n fields: {\n appId: schemaShape.appId.foreignKeySpec({\n meaning: 'The owning `applications` row this release belongs to; immutable after create.',\n whyItMatters: 'Scopes the version history to a single application so roll-forward/rollback and changelog surfaces only ever mix builds of the same app.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n version: schemaShape.version.stringSpec({ meaning: 'Semver (or product-specific) string for this build.', importance: FieldSemanticImportance.PRIMARY }),\n releaseDate: schemaShape.releaseDate.dateSpec({ meaning: 'Publish timestamp for the cut.' }),\n releaseNotes: schemaShape.releaseNotes.stringSpec({ meaning: 'Changelog and migration notes for operators and support.' }),\n },\n operations: {\n [Op.CREATE]: {\n purpose: 'Record a new build row when a pipeline produces artifacts.',\n outcome: 'Appears in history tables and can be selected for traffic.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'The release row was recorded for the owning application and is returned with its id.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The version string or release fields fail schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an org admin for the owning application; recording releases is org-admin gated.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'The owning application referenced by this release does not exist in the caller’s scope.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'A release row with the same version string already exists for this application.' },\n ],\n idempotent: false,\n examples: [\n {\n title: 'Record a new release',\n request: {\n version: '2.4.0',\n releaseDate: '2026-06-15T09:00:00.000Z',\n releaseNotes: 'Adds bulk task completion and fixes the assignee filter.',\n },\n response: {\n version: '2.4.0',\n releaseDate: '2026-06-15T09:00:00.000Z',\n releaseNotes: 'Adds bulk task completion and fixes the assignee filter.',\n },\n forStatus: HttpResponseStatusCode.CREATED_201,\n },\n ],\n },\n [Op.READ]: {\n purpose: 'Detail view for a single release, including long notes.',\n outcome: 'Support and SRE can verify exactly what shipped.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The release row was found and its full detail (including notes) is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No release row exists for the supplied id in the caller’s scope.' },\n ],\n idempotent: true,\n },\n [Op.LIST]: {\n purpose: 'Paginated history for the owning application.',\n outcome: 'Ordered timeline for “what’s live” decisions.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of release rows for the owning application.' },\n ],\n idempotent: true,\n },\n [Op.SEARCH]: {\n purpose: 'Search or filter the release log when the factory enables it.',\n outcome: 'Narrowed rows for big tenants with frequent deploys.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of release rows matching the version/notes query.' },\n ],\n idempotent: true,\n },\n [Op.UPDATE]: {\n purpose: 'Patch release notes or metadata where mutability is allowed by policy.',\n outcome: 'Correct typos in notes without re-running the build.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The release row was patched and the updated record is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The edited release fields fail schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an org admin for the owning application; editing releases is org-admin gated.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No release row exists for the supplied id in the caller’s scope.' },\n ],\n idempotent: true,\n },\n [Op.DELETE]: {\n purpose: 'Remove errant or superseded records when legal policy allows hard delete.',\n outcome: 'Row absent from public history; audit events may still exist outside this resource.',\n responseStatuses: [\n { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The release row was deleted; no body is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an org admin for the owning application; deleting releases is org-admin gated.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No release row exists for the supplied id (or it was already deleted).' },\n ],\n idempotent: true,\n },\n },\n businessConstraints: [\n 'Only the admin `application` preset materializes the versions relationship tab; end-user `APPLICATION` main preset keeps versions hidden in merged maps.',\n 'This resource RECORDS releases; it does not control them. `PROMOTE` / `ROLLBACK` / `DEPRECATE` were declared here and removed on 2026-08-01 — all three were routed but wrote nothing, and the state they implied cannot live on this row: the framework is mono-env (each deployment has its own infrastructure and database), so \"which build is live in environment X\" is not a fact this application\\'s database can hold, and deploying a built image is owned by the CLI self-host lane rather than by a resource verb.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.APPLICATION },\n ),\n () => ({\n views: {\n [Op.CREATE]: { purpose: 'Register a new row after CI publishes artifacts.', whenToUse: 'Release automation and manual hotfix entry.' },\n [Op.READ]: { purpose: 'Detail drawer in admin for one release line.', whenToUse: 'Comparing notes during migration planning.' },\n [Op.LIST]: { purpose: 'History tab in admin apps surface.', whenToUse: 'Default release browser experience.' },\n [Op.SEARCH]: { purpose: 'Search the release log when search is enabled in factory config.', whenToUse: 'Large app histories in enterprise tenants.' },\n [Op.UPDATE]: { purpose: 'Note edits for clarifications or legal redactions in displayed changelog.', whenToUse: 'When marketing updates copy without changing bits.' },\n [Op.DELETE]: { purpose: 'Remove mistaken rows in exceptional migration flows.', whenToUse: 'Test builds accidentally captured as prod releases.' },\n },\n }),\n);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"applications.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/applications/resources/applications.resource.specification.ts"],"names":[],"mappings":"AAWA,OAAO,EAEL,qBAAqB,IAAI,EAAE,EAG5B,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"applications.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/applications/resources/applications.resource.specification.ts"],"names":[],"mappings":"AAWA,OAAO,EAEL,qBAAqB,IAAI,EAAE,EAG5B,MAAM,uBAAuB,CAAC;AAmB/B,eAAO,MAAM,iCAAiC;;;;;;iCAwL7C,CAAC"}
|
|
@@ -3,15 +3,17 @@ import { LabelAudience } from '@wildo-ai/presets-components-models';
|
|
|
3
3
|
import { CodeDeclarationKind, CodeSymbolKind, FieldSemanticImportance, } from '@wildo-ai/zod-decorators';
|
|
4
4
|
import { ApplicationSchema, CoreResourceOperation as Op, ResourcePrimaryScope, applicationResourceConfiguration_InitializationFactory as applicationsFactory, } from '@wildo-ai/saas-models';
|
|
5
5
|
import { HttpResponseStatusCode, mergeResourceFrontendConfigurations, resourceFrontendConfiguration, resourceSpecification, resourceSpecificationFromFrontendConfiguration, } from '../../../_core/index.js';
|
|
6
|
+
import { EngineResourceSubDomain } from '../../engine-resource-sub-domain.js';
|
|
6
7
|
// `undefined` custom-operation parameter: `APPLICATION` declares no custom operations (see the
|
|
7
8
|
// operationVocabulary note below). Same shape as `application-metadata.resource.specification.ts`.
|
|
8
9
|
const applicationsMainUI = applicationsMainSource;
|
|
9
10
|
const applicationsAdminUI = applicationsAdminSource;
|
|
10
11
|
export const applicationsResourceSpecification = resourceSpecificationFromFrontendConfiguration(mergeResourceFrontendConfigurations(resourceFrontendConfiguration(applicationsMainUI), resourceFrontendConfiguration(applicationsAdminUI)), resourceSpecification(applicationsFactory, ApplicationSchema, ({ schemaShape }) => ({
|
|
11
|
-
purpose: '
|
|
12
|
+
purpose: 'The application\'s own identity record: its slug, display name and how it is registered with the platform that hosts it.',
|
|
12
13
|
businessRole: 'Anchor for all app-scoped entitlements, versions, and infrastructure configuration in the control plane.',
|
|
13
14
|
lifecycleRole: 'Provisioned through platform bootstrap, managed by admins, and suspended or re-activated under governance. Its tenancy is fixed at creation — an application cannot be re-parented to another organization.',
|
|
14
15
|
audience: LabelAudience.ADMIN,
|
|
16
|
+
subDomain: EngineResourceSubDomain.APPLICATIONS,
|
|
15
17
|
codeHandling: {
|
|
16
18
|
mainSchema: {
|
|
17
19
|
packageName: '@wildo-ai/saas-models',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"applications.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/applications/resources/applications.resource.specification.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,6CAA6C,IAAI,uBAAuB,EACxE,4CAA4C,IAAI,sBAAsB,GACvE,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,iBAAiB,EACjB,qBAAqB,IAAI,EAAE,EAC3B,oBAAoB,EACpB,sDAAsD,IAAI,mBAAmB,GAC9E,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB,mCAAmC,EACnC,6BAA6B,EAC7B,qBAAqB,EACrB,8CAA8C,GAC/C,MAAM,6BAA6B,CAAC;AAMrC,+FAA+F;AAC/F,mGAAmG;AACnG,MAAM,kBAAkB,GAAG,sBAAyE,CAAC;AACrG,MAAM,mBAAmB,GAAG,uBAA0E,CAAC;AAEvG,MAAM,CAAC,MAAM,iCAAiC,GAAG,8CAA8C,CAC7F,mCAAmC,CACjC,6BAA6B,CAAC,kBAAkB,CAAC,EACjD,6BAA6B,CAAC,mBAAmB,CAAC,CACnD,EACD,qBAAqB,CACnB,mBAAmB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EAAE,EAAE,OAAO,EAAE,yFAAyF,EAAE,SAAS,EAAE,kDAAkD,EAAE;QAClL,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,kEAAkE,EAAE,SAAS,EAAE,wDAAwD,EAAE;QACjK,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,sEAAsE,EAAE,SAAS,EAAE,yCAAyC,EAAE;KACvJ;CACF,CAAC,CACH,CAAC","sourcesContent":["import {\n applicationAdminApplicationResourceUIBehavior as applicationsAdminSource,\n applicationMainApplicationResourceUIBehavior as applicationsMainSource,\n} from '@wildo-ai/presets-components';\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport type { ResourceUIBehaviorConfig } from '@wildo-ai/saas-frontend-lib/companion';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n ApplicationSchema,\n CoreResourceOperation as Op,\n ResourcePrimaryScope,\n applicationResourceConfiguration_InitializationFactory as applicationsFactory,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n mergeResourceFrontendConfigurations,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n} from '~wildo-specifications/_core';\n\ntype Cfg = ReturnType<typeof applicationsFactory>;\ntype Core = Cfg['coreOperations'][number];\ntype Main = Cfg['mainSchema'];\n\n// `undefined` custom-operation parameter: `APPLICATION` declares no custom operations (see the\n// operationVocabulary note below). Same shape as `application-metadata.resource.specification.ts`.\nconst applicationsMainUI = applicationsMainSource as ResourceUIBehaviorConfig<undefined, Core, Main>;\nconst applicationsAdminUI = applicationsAdminSource as ResourceUIBehaviorConfig<undefined, Core, Main>;\n\nexport const applicationsResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n mergeResourceFrontendConfigurations(\n resourceFrontendConfiguration(applicationsMainUI),\n resourceFrontendConfiguration(applicationsAdminUI),\n ),\n resourceSpecification(\n applicationsFactory,\n ApplicationSchema,\n ({ schemaShape }) => ({\n purpose: 'Core application record (slug, display name, and platform linkage) for one deployable product within Wildo.',\n businessRole: 'Anchor for all app-scoped entitlements, versions, and infrastructure configuration in the control plane.',\n lifecycleRole: 'Provisioned through platform bootstrap, managed by admins, and suspended or re-activated under governance. Its tenancy is fixed at creation — an application cannot be re-parented to another organization.',\n audience: LabelAudience.ADMIN,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'ApplicationSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'applicationResourceConfiguration_InitializationFactory',\n symbolKind: CodeSymbolKind.FACTORY,\n declarationKind: CodeDeclarationKind.FUNCTION,\n },\n resourceType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n memberName: 'APPLICATION',\n },\n operationVocabulary: {\n coreEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceOperation',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n // No `customEnum`: `APPLICATION` declares no custom operations. TRANSFER, ACTIVATE and\n // SUSPEND were all removed on 2026-08-01 (see businessConstraints), emptying the\n // `Application_Operations` enum, which was deleted with them.\n },\n frontendConfigurationSources: [\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'applicationMainApplicationResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'applicationAdminApplicationResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n },\n fields: {\n appDisplayName: schemaShape.appDisplayName.stringSpec({\n meaning: 'Operator-facing name shown in org and platform consoles.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n appSlug: schemaShape.appSlug.stringSpec({\n meaning: 'Immutable routing key and DNS-safe identifier for the app install.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n lastVersion: schemaShape.lastVersion.stringSpec({ meaning: 'Most recent published semver for this application. Read-only on the API (excluded from create and update); it is written by platform provisioning, not by application traffic, and is absent until provisioning sets it.' }),\n },\n operations: {\n [Op.READ]: {\n purpose: 'Members read a lightweight about row; app admins read the full row; platform admins use `admin` variants.',\n outcome: 'Clients hydrate shell chrome and about surfaces.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The application row was found and the variant-appropriate projection (about row vs full record) is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No application exists for the supplied id in the caller’s scope.' },\n ],\n idempotent: true,\n },\n [Op.LIST]: {\n purpose: 'Paginated apps in org or platform directory views.',\n outcome: 'Rows for org multi-app and platform overviews.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of applications visible to the caller (org-scoped by default, all apps via the `admin` variant).' },\n ],\n idempotent: true,\n },\n [Op.SEARCH]: {\n purpose: 'Filter apps by display name, slug, or health metadata where indexed.',\n outcome: 'Matches for back-office and org admin tools.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of applications matching the display-name/slug query in the caller’s scope.' },\n ],\n idempotent: true,\n },\n [Op.CREATE]: {\n purpose: 'Provision a new app under an org or for a customer in platform mode.',\n outcome: 'New `APPLICATION` and downstream bootstrap hooks.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'The application was provisioned under the org and is returned with its server-assigned id and slug.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The display name or slug payload fails schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is neither an org admin (for their own org) nor a platform super-admin (for any org); app provisioning is admin gated.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The requested `appSlug` is already taken — slugs are immutable routing keys and must be unique.' },\n ],\n idempotent: false,\n examples: [\n {\n title: 'Provision a new application',\n request: {\n appDisplayName: 'Wonder Todos',\n appSlug: 'wonder-todos',\n },\n response: {\n appDisplayName: 'Wonder Todos',\n appSlug: 'wonder-todos',\n lastVersion: null,\n },\n forStatus: HttpResponseStatusCode.CREATED_201,\n },\n ],\n },\n [Op.UPDATE]: {\n purpose: 'Change display name or mutable metadata; slug remains immutable in normal flows.',\n outcome: 'Updated copy and routing for dependent services.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The mutable application fields were updated and the new state is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The edited fields fail schema validation (e.g. attempting to mutate the immutable slug).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an org admin (or platform super-admin) for this application; edits are admin gated.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No application exists for the supplied id in the caller’s scope.' },\n ],\n idempotent: true,\n },\n [Op.DELETE]: {\n purpose: 'Remove an application record and cascade per registry (high risk).',\n outcome: 'Tombstone/soft delete varies by product policy.',\n responseStatuses: [\n { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The application (and its composed children) were removed per the registry cascade; no body is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an org admin (or platform super-admin) for this application; this is a critical-risk admin-gated operation.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'Both variants declare `requiresStepUpAuthentication`, and the request carried no valid single-use re-authentication token. Obtain one from the re-authentication route and retry with it — an application is a top-level scope, so its deletion destroys everything scoped beneath it and a live session alone is deliberately not sufficient.', errorCode: 'STEP_UP_REQUIRED' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No application exists for the supplied id (or it was already deleted).' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'Product policy blocks the delete because the application has dependents that cannot be cascaded automatically (e.g. it is still active or has bound infrastructure).' },\n ],\n idempotent: true,\n },\n },\n businessConstraints: [\n '`APPLICATION` is the self-anchor for `APPLICATION` primary scope; align the declared `resourcePrimaryScope` with the registry for companion prompts.',\n 'Cross-organization application transfer is intentionally NOT a framework capability. A `TRANSFER` operation was declared here in two variants and removed on 2026-08-01: it was routed but wrote nothing, and the move it named is incoherent in this model. `APPLICATION` is the self-anchored top-level scope — the application IS the tenant container and organizations are a sibling scope inside its tenancy — so there is no owning-organization field to re-point and no `ORGANIZATIONS → APPLICATION` relationship in the registry. This mirrors the framework’s refusal of cross-organization MEMBER transfer as a tenant-boundary crossing it does not sanction.',\n 'Application status lifecycle is intentionally NOT a framework capability. `ACTIVATE` and `SUSPEND` were declared here as super-admin verbs (each with a generated bulk variant) and removed on 2026-08-01: they were routed but wrote nothing, because this resource carries no lifecycle state to write. `APPLICATION` is an identity row (`appSlug`, `appDisplayName`, `lastVersion`, `platformAppId`); an application’s real operational state lives one tier up, at `PLATFORM_APPLICATIONS` / `Wildo_Application_Config`, managed by the platform apps-manager. Halting an application is a platform-tier action, not a field flip on the application’s own registry entry — and by ground 3 above, the suspending super-admin’s session lives inside the container being suspended. Re-declaring these verbs requires the per-organization application-ownership model first, not an `ApplicationStatus` field bolted on to satisfy two buttons.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.APPLICATION },\n ),\n () => ({\n views: {\n [Op.READ]: {\n variants: {\n default: {\n purpose: 'Read-only \"about this app\" shell entry for end users in merged main preset.',\n whenToUse: 'In-app about drawer when org members cannot manage versions directly.',\n },\n admin: {\n purpose: 'App-admin and platform read for full fields and child relationships.',\n whenToUse: 'Admin area host surfaces (`application` preset wires metadata/versions as tabs in admin).',\n },\n },\n },\n [Op.LIST]: { purpose: 'Directory listing in admin and platform UIs (admin variants only in merged map).', whenToUse: 'Multi-app org view and support consoles.' },\n [Op.SEARCH]: { purpose: 'Search in admin and platform UIs for application discovery.', whenToUse: 'When many apps exist in one org or in global catalog.' },\n [Op.CREATE]: { purpose: 'App creation in admin and platform (merged preset adds `admin` variant addressability).', whenToUse: 'Onboarding a new app id under customer contract.' },\n [Op.UPDATE]: { purpose: 'Administrator edits the mutable fields on the `APPLICATION` row.', whenToUse: 'Rebranding, slug freeze exceptions, and support edits.' },\n [Op.DELETE]: { purpose: 'Destructive removal when policy allows a hard delete in admin flows.', whenToUse: 'Pilots, migrations, and contract exits.' },\n },\n }),\n);\n"]}
|
|
1
|
+
{"version":3,"file":"applications.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/applications/resources/applications.resource.specification.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,6CAA6C,IAAI,uBAAuB,EACxE,4CAA4C,IAAI,sBAAsB,GACvE,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,iBAAiB,EACjB,qBAAqB,IAAI,EAAE,EAC3B,oBAAoB,EACpB,sDAAsD,IAAI,mBAAmB,GAC9E,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB,mCAAmC,EACnC,6BAA6B,EAC7B,qBAAqB,EACrB,8CAA8C,GAC/C,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAM3E,+FAA+F;AAC/F,mGAAmG;AACnG,MAAM,kBAAkB,GAAG,sBAAyE,CAAC;AACrG,MAAM,mBAAmB,GAAG,uBAA0E,CAAC;AAEvG,MAAM,CAAC,MAAM,iCAAiC,GAAG,8CAA8C,CAC7F,mCAAmC,CACjC,6BAA6B,CAAC,kBAAkB,CAAC,EACjD,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AAE,EAAE,OAAO,EAAE,6DAA6D,EAAE,SAAS,EAAE,uDAAuD,EAAE;QAC3J,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,yFAAyF,EAAE,SAAS,EAAE,kDAAkD,EAAE;QAClL,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,kEAAkE,EAAE,SAAS,EAAE,wDAAwD,EAAE;QACjK,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,sEAAsE,EAAE,SAAS,EAAE,yCAAyC,EAAE;KACvJ;CACF,CAAC,CACH,CAAC","sourcesContent":["import {\n applicationAdminApplicationResourceUIBehavior as applicationsAdminSource,\n applicationMainApplicationResourceUIBehavior as applicationsMainSource,\n} from '@wildo-ai/presets-components';\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport type { ResourceUIBehaviorConfig } from '@wildo-ai/saas-frontend-lib/companion';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n ApplicationSchema,\n CoreResourceOperation as Op,\n ResourcePrimaryScope,\n applicationResourceConfiguration_InitializationFactory as applicationsFactory,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n mergeResourceFrontendConfigurations,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n} from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\ntype Cfg = ReturnType<typeof applicationsFactory>;\ntype Core = Cfg['coreOperations'][number];\ntype Main = Cfg['mainSchema'];\n\n// `undefined` custom-operation parameter: `APPLICATION` declares no custom operations (see the\n// operationVocabulary note below). Same shape as `application-metadata.resource.specification.ts`.\nconst applicationsMainUI = applicationsMainSource as ResourceUIBehaviorConfig<undefined, Core, Main>;\nconst applicationsAdminUI = applicationsAdminSource as ResourceUIBehaviorConfig<undefined, Core, Main>;\n\nexport const applicationsResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n mergeResourceFrontendConfigurations(\n resourceFrontendConfiguration(applicationsMainUI),\n resourceFrontendConfiguration(applicationsAdminUI),\n ),\n resourceSpecification(\n applicationsFactory,\n ApplicationSchema,\n ({ schemaShape }) => ({\n purpose: 'The application\\'s own identity record: its slug, display name and how it is registered with the platform that hosts it.',\n businessRole: 'Anchor for all app-scoped entitlements, versions, and infrastructure configuration in the control plane.',\n lifecycleRole: 'Provisioned through platform bootstrap, managed by admins, and suspended or re-activated under governance. Its tenancy is fixed at creation — an application cannot be re-parented to another organization.',\n audience: LabelAudience.ADMIN,\n subDomain: EngineResourceSubDomain.APPLICATIONS,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'ApplicationSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'applicationResourceConfiguration_InitializationFactory',\n symbolKind: CodeSymbolKind.FACTORY,\n declarationKind: CodeDeclarationKind.FUNCTION,\n },\n resourceType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n memberName: 'APPLICATION',\n },\n operationVocabulary: {\n coreEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceOperation',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n // No `customEnum`: `APPLICATION` declares no custom operations. TRANSFER, ACTIVATE and\n // SUSPEND were all removed on 2026-08-01 (see businessConstraints), emptying the\n // `Application_Operations` enum, which was deleted with them.\n },\n frontendConfigurationSources: [\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'applicationMainApplicationResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'applicationAdminApplicationResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n },\n fields: {\n appDisplayName: schemaShape.appDisplayName.stringSpec({\n meaning: 'Operator-facing name shown in org and platform consoles.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n appSlug: schemaShape.appSlug.stringSpec({\n meaning: 'Immutable routing key and DNS-safe identifier for the app install.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n lastVersion: schemaShape.lastVersion.stringSpec({ meaning: 'Most recent published semver for this application. Read-only on the API (excluded from create and update); it is written by platform provisioning, not by application traffic, and is absent until provisioning sets it.' }),\n },\n operations: {\n [Op.READ]: {\n purpose: 'Members read a lightweight about row; app admins read the full row; platform admins use `admin` variants.',\n outcome: 'Clients hydrate shell chrome and about surfaces.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The application row was found and the variant-appropriate projection (about row vs full record) is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No application exists for the supplied id in the caller’s scope.' },\n ],\n idempotent: true,\n },\n [Op.LIST]: {\n purpose: 'Paginated apps in org or platform directory views.',\n outcome: 'Rows for org multi-app and platform overviews.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of applications visible to the caller (org-scoped by default, all apps via the `admin` variant).' },\n ],\n idempotent: true,\n },\n [Op.SEARCH]: {\n purpose: 'Filter apps by display name, slug, or health metadata where indexed.',\n outcome: 'Matches for back-office and org admin tools.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of applications matching the display-name/slug query in the caller’s scope.' },\n ],\n idempotent: true,\n },\n [Op.CREATE]: {\n purpose: 'Provision a new app under an org or for a customer in platform mode.',\n outcome: 'New `APPLICATION` and downstream bootstrap hooks.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'The application was provisioned under the org and is returned with its server-assigned id and slug.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The display name or slug payload fails schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is neither an org admin (for their own org) nor a platform super-admin (for any org); app provisioning is admin gated.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The requested `appSlug` is already taken — slugs are immutable routing keys and must be unique.' },\n ],\n idempotent: false,\n examples: [\n {\n title: 'Provision a new application',\n request: {\n appDisplayName: 'Wonder Todos',\n appSlug: 'wonder-todos',\n },\n response: {\n appDisplayName: 'Wonder Todos',\n appSlug: 'wonder-todos',\n lastVersion: null,\n },\n forStatus: HttpResponseStatusCode.CREATED_201,\n },\n ],\n },\n [Op.UPDATE]: {\n purpose: 'Change display name or mutable metadata; slug remains immutable in normal flows.',\n outcome: 'Updated copy and routing for dependent services.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The mutable application fields were updated and the new state is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The edited fields fail schema validation (e.g. attempting to mutate the immutable slug).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an org admin (or platform super-admin) for this application; edits are admin gated.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No application exists for the supplied id in the caller’s scope.' },\n ],\n idempotent: true,\n },\n [Op.DELETE]: {\n purpose: 'Remove an application record and cascade per registry (high risk).',\n outcome: 'Tombstone/soft delete varies by product policy.',\n responseStatuses: [\n { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The application (and its composed children) were removed per the registry cascade; no body is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an org admin (or platform super-admin) for this application; this is a critical-risk admin-gated operation.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'Both variants declare `requiresStepUpAuthentication`, and the request carried no valid single-use re-authentication token. Obtain one from the re-authentication route and retry with it — an application is a top-level scope, so its deletion destroys everything scoped beneath it and a live session alone is deliberately not sufficient.', errorCode: 'STEP_UP_REQUIRED' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No application exists for the supplied id (or it was already deleted).' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'Product policy blocks the delete because the application has dependents that cannot be cascaded automatically (e.g. it is still active or has bound infrastructure).' },\n ],\n idempotent: true,\n },\n },\n businessConstraints: [\n '`APPLICATION` is the self-anchor for `APPLICATION` primary scope; align the declared `resourcePrimaryScope` with the registry for companion prompts.',\n 'Cross-organization application transfer is intentionally NOT a framework capability. A `TRANSFER` operation was declared here in two variants and removed on 2026-08-01: it was routed but wrote nothing, and the move it named is incoherent in this model. `APPLICATION` is the self-anchored top-level scope — the application IS the tenant container and organizations are a sibling scope inside its tenancy — so there is no owning-organization field to re-point and no `ORGANIZATIONS → APPLICATION` relationship in the registry. This mirrors the framework’s refusal of cross-organization MEMBER transfer as a tenant-boundary crossing it does not sanction.',\n 'Application status lifecycle is intentionally NOT a framework capability. `ACTIVATE` and `SUSPEND` were declared here as super-admin verbs (each with a generated bulk variant) and removed on 2026-08-01: they were routed but wrote nothing, because this resource carries no lifecycle state to write. `APPLICATION` is an identity row (`appSlug`, `appDisplayName`, `lastVersion`, `platformAppId`); an application’s real operational state lives one tier up, at `PLATFORM_APPLICATIONS` / `Wildo_Application_Config`, managed by the platform apps-manager. Halting an application is a platform-tier action, not a field flip on the application’s own registry entry — and by ground 3 above, the suspending super-admin’s session lives inside the container being suspended. Re-declaring these verbs requires the per-organization application-ownership model first, not an `ApplicationStatus` field bolted on to satisfy two buttons.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.APPLICATION },\n ),\n () => ({\n views: {\n [Op.READ]: {\n variants: {\n default: {\n purpose: 'Read-only \"about this app\" shell entry for end users in merged main preset.',\n whenToUse: 'In-app about drawer when org members cannot manage versions directly.',\n },\n admin: {\n purpose: 'App-admin and platform read for full fields and child relationships.',\n whenToUse: 'Admin area host surfaces (`application` preset wires metadata/versions as tabs in admin).',\n },\n },\n },\n [Op.LIST]: { purpose: 'Directory listing in admin and platform UIs (admin variants only in merged map).', whenToUse: 'Multi-app org view and support consoles.' },\n [Op.SEARCH]: { purpose: 'Search in admin and platform UIs for application discovery.', whenToUse: 'When many apps exist in one org or in global catalog.' },\n [Op.CREATE]: { purpose: 'App creation in admin and platform (merged preset adds `admin` variant addressability).', whenToUse: 'Onboarding a new app id under customer contract.' },\n [Op.UPDATE]: { purpose: 'Administrator edits the mutable fields on the `APPLICATION` row.', whenToUse: 'Rebranding, slug freeze exceptions, and support edits.' },\n [Op.DELETE]: { purpose: 'Destructive removal when policy allows a hard delete in admin flows.', whenToUse: 'Pilots, migrations, and contract exits.' },\n },\n }),\n);\n"]}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type AnyResourceSpecificationConfig } from '../../../_core';
|
|
2
|
+
/**
|
|
3
|
+
* Framework-owned specification for `consumableTokens` — the one bearer secret the engine mints on a
|
|
4
|
+
* user's behalf, and, until this file existed, the ONLY registered engine resource with no
|
|
5
|
+
* specification at all.
|
|
6
|
+
*
|
|
7
|
+
* ## Why it was the last one, and how that surfaced
|
|
8
|
+
*
|
|
9
|
+
* `backend-resource-registry.exports.ts` had already written the prediction down: *"`CONSUMABLE_TOKENS`
|
|
10
|
+
* has the identical shape [to `dataSeedRuns`] and was orphan-free only because nobody had authored its
|
|
11
|
+
* spec yet."* What made the omission visible rather than merely known was the domain-model graph
|
|
12
|
+
* grouping the engine by `subDomain` — 84 of 85 resources fell into a named box and this one landed in
|
|
13
|
+
* a box called `unclassified`, which is exactly what that box exists to make impossible to miss.
|
|
14
|
+
*
|
|
15
|
+
* ## Audience is DEVELOPER, and that is a decision
|
|
16
|
+
*
|
|
17
|
+
* A token row is never rendered to the person it authenticates: they receive a link or a code, and the
|
|
18
|
+
* row behind it is read by an operator diagnosing why a reset link was refused. `END_USER` would make
|
|
19
|
+
* the label generator write consumer copy for a table whose only reader is debugging an auth flow.
|
|
20
|
+
*
|
|
21
|
+
* ## What this spec does NOT say
|
|
22
|
+
*
|
|
23
|
+
* Nothing here describes how a token is minted, exchanged or revoked — that is
|
|
24
|
+
* `ConsumableTokenBackendService`'s contract, and this resource's own CRUD surface is not how any flow
|
|
25
|
+
* uses it. The field prose below explains what a persisted row MEANS, which is the question an operator
|
|
26
|
+
* reading one actually has.
|
|
27
|
+
*
|
|
28
|
+
* WHY THE EXPLICIT TYPE ANNOTATION: the same reason `data-seed-runs.resource.specification.ts` records
|
|
29
|
+
* at length. This resource's schema and factory come from `@wildo-ai/saas-backend-lib`, not
|
|
30
|
+
* `@wildo-ai/saas-models`, so the inferred type is nameable only through a non-portable nested path and
|
|
31
|
+
* declaration emit rejects it with TS2742. `AnyResourceSpecificationConfig` loses nothing at the only
|
|
32
|
+
* consumption point — `engineResourceSpecificationsByType` is `Record<string, AnyResourceSpecificationConfig>`,
|
|
33
|
+
* so the precise instantiation was already erased there.
|
|
34
|
+
*/
|
|
35
|
+
export declare const consumableTokensResourceSpecification: AnyResourceSpecificationConfig;
|
|
36
|
+
//# sourceMappingURL=consumable-tokens.resource.specification.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consumable-tokens.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/auth/resources/consumable-tokens.resource.specification.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,KAAK,8BAA8B,EAAyB,MAAM,6BAA6B,CAAC;AAGzG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,qCAAqC,EAAE,8BA4KnD,CAAC"}
|