@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sso-connections.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/auth/resources/sso-connections.resource.specification.ts"],"names":[],"mappings":"AAUA,OAAO,EACL,qBAAqB,IAAI,EAAE,EAG3B,wBAAwB,EAKxB,WAAW,EAEZ,MAAM,uBAAuB,CAAC;AAM/B,OAAO,EAML,KAAK,2BAA2B,EACjC,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"sso-connections.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/auth/resources/sso-connections.resource.specification.ts"],"names":[],"mappings":"AAUA,OAAO,EACL,qBAAqB,IAAI,EAAE,EAG3B,wBAAwB,EAKxB,WAAW,EAEZ,MAAM,uBAAuB,CAAC;AAM/B,OAAO,EAML,KAAK,2BAA2B,EACjC,MAAM,6BAA6B,CAAC;AAukBrC,eAAO,MAAM,+CAA+C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAG3D,CAAC;AAEF,eAAO,MAAM,8CAA8C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAG1D,CAAC"}
|
|
@@ -3,6 +3,7 @@ import { securityAdminPresets, securityMainPresets, } from '@wildo-ai/presets-co
|
|
|
3
3
|
import { CoreResourceOperation as Op, CoreResourceType, ResourcePrimaryScope, SsoConnection_Operations, SsoConnectionDiscoverySource, SsoConnectionTestOverallStatus, SsoConnectionBaseSchema, SamlNameIdFormat, SsoProtocol, ssoConnectionPolymorphicFactories, } from '@wildo-ai/saas-models';
|
|
4
4
|
import { CodeDeclarationKind, CodeSymbolKind, FieldSemanticImportance, } from '@wildo-ai/zod-decorators';
|
|
5
5
|
import { HttpResponseStatusCode, mergeResourceFrontendConfigurations, resourceFrontendConfiguration, resourceSpecification, resourceSpecificationFromFrontendConfiguration, } from '../../../_core/index.js';
|
|
6
|
+
import { EngineResourceSubDomain } from '../../engine-resource-sub-domain.js';
|
|
6
7
|
function resolveSsoConnectionUIBehavior(source, resourceType, sourceName) {
|
|
7
8
|
const uiBehavior = source[resourceType];
|
|
8
9
|
if (!uiBehavior) {
|
|
@@ -95,6 +96,7 @@ function buildSsoConnectionsBaseSpecification(resourceType, resourceTypeMemberNa
|
|
|
95
96
|
businessRole: 'Administrative authentication-connection record that binds one auth scope to a concrete OIDC or SAML provider setup.',
|
|
96
97
|
lifecycleRole: 'Moves from draft/provider setup through validation and eventual activation, rotation, or retirement under admin control.',
|
|
97
98
|
audience: LabelAudience.DEVELOPER,
|
|
99
|
+
subDomain: EngineResourceSubDomain.AUTH,
|
|
98
100
|
codeHandling: {
|
|
99
101
|
mainSchema: {
|
|
100
102
|
packageName: '@wildo-ai/saas-models',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sso-connections.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/auth/resources/sso-connections.resource.specification.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,8BAA8B,EAC9B,aAAa,GACd,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACL,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EACL,qBAAqB,IAAI,EAAE,EAC3B,gBAAgB,EAChB,oBAAoB,EACpB,wBAAwB,EACxB,4BAA4B,EAC5B,8BAA8B,EAC9B,uBAAuB,EACvB,gBAAgB,EAChB,WAAW,EACX,iCAAiC,GAClC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,sBAAsB,EACtB,mCAAmC,EACnC,6BAA6B,EAC7B,qBAAqB,EACrB,8CAA8C,GAE/C,MAAM,6BAA6B,CAAC;AAsBrC,SAAS,8BAA8B,CACrC,MAAwC,EACxC,YAAuC,EACvC,UAAkB;IAElB,MAAM,UAAU,GAAG,MAAM,CAAC,YAAY,CAAmD,CAAC;IAC1F,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,MAAM,IAAI,KA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C9B,CAAC","sourcesContent":["import {\n CorePresetNames,\n CorePreset_ResourceLayout_Read,\n LabelAudience,\n} from '@wildo-ai/presets-components-models';\nimport {\n securityAdminPresets,\n securityMainPresets,\n} from '@wildo-ai/presets-components';\nimport type { ResourceUIBehaviorConfig } from '@wildo-ai/saas-frontend-lib/companion';\nimport {\n CoreResourceOperation as Op,\n CoreResourceType,\n ResourcePrimaryScope,\n SsoConnection_Operations,\n SsoConnectionDiscoverySource,\n SsoConnectionTestOverallStatus,\n SsoConnectionBaseSchema,\n SamlNameIdFormat,\n SsoProtocol,\n ssoConnectionPolymorphicFactories,\n} from '@wildo-ai/saas-models';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n HttpResponseStatusCode,\n mergeResourceFrontendConfigurations,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n type ResourceSpecificationConfig,\n} from '~wildo-specifications/_core';\n\ntype SsoConnectionResourceType =\n | CoreResourceType.ORGANIZATION_SSO_CONNECTIONS\n | CoreResourceType.APPLICATION_SSO_CONNECTIONS;\n\ntype SsoConnectionResourceTypeMemberName =\n | 'ORGANIZATION_SSO_CONNECTIONS'\n | 'APPLICATION_SSO_CONNECTIONS';\n\ntype SsoConnectionResourceConfiguration = ReturnType<\n (typeof ssoConnectionPolymorphicFactories)[CoreResourceType.ORGANIZATION_SSO_CONNECTIONS]\n>;\ntype SsoConnectionCustomOperation = NonNullable<SsoConnectionResourceConfiguration['customOperation']>;\ntype SsoConnectionCoreOperation = SsoConnectionResourceConfiguration['coreOperations'][number];\ntype SsoConnectionMainSchema = typeof SsoConnectionBaseSchema;\ntype SsoConnectionFrontendConfiguration = ResourceUIBehaviorConfig<\n SsoConnectionCustomOperation,\n SsoConnectionCoreOperation,\n SsoConnectionMainSchema\n>;\n\nfunction resolveSsoConnectionUIBehavior(\n source: Partial<Record<string, unknown>>,\n resourceType: SsoConnectionResourceType,\n sourceName: string,\n): SsoConnectionFrontendConfiguration {\n const uiBehavior = source[resourceType] as SsoConnectionFrontendConfiguration | undefined;\n if (!uiBehavior) {\n throw new Error(`Missing \"${resourceType}\" UI behavior in ${sourceName}.`);\n }\n return uiBehavior;\n}\n\n/**\n * Map each polymorphic SSO-connection resource type to its declared\n * `resourcePrimaryScope` (Phase 4.5 Step 2 — F-1). The polymorphic\n * factory derives the same value from the resource's relationships\n * (`AUTH_SCOPE_VARIANTS` carries `isPrimaryScope: true` for both the\n * `ORGANIZATIONS` and `APPLICATION` parents, so\n * `createPolymorphicScopeRelationships` emits scope edges for both\n * variants). Adding a new SSO-connection variant requires explicitly\n * extending this map (TypeScript-enforced via the\n * `Record<SsoConnectionResourceType, ...>` type), preventing a silent\n * scope-default regression on the new variant.\n *\n * The cross-check that the declared value here matches the registry-\n * assembled scope is the responsibility of the post-factory check\n * tracked as Phase 4.5 Step 2.5 — the spec layer cannot perform it\n * because it never sees the real cross-resource `ResourceRelationship[]`.\n */\nconst ssoConnectionResourcePrimaryScopeByResourceType: Record<\n SsoConnectionResourceType,\n ResourcePrimaryScope\n> = {\n [CoreResourceType.ORGANIZATION_SSO_CONNECTIONS]: ResourcePrimaryScope.ORGANIZATIONS,\n [CoreResourceType.APPLICATION_SSO_CONNECTIONS]: ResourcePrimaryScope.APPLICATION,\n};\n\nconst SSO_CONNECTION_LIST_REQUEST_EXAMPLE = { page: 1, limit: 20, sort: 'displayName:asc' } as const;\n\nfunction createSsoConnectionExamples(resourceType: SsoConnectionResourceType) {\n const scopeIdentity = resourceType === CoreResourceType.ORGANIZATION_SSO_CONNECTIONS\n ? { organizationId: 'organization_01HX2EXAMPLE' }\n : { applicationId: 'application_01HX2EXAMPLE' };\n const record = {\n _id: resourceType === CoreResourceType.ORGANIZATION_SSO_CONNECTIONS ? 'sso_org_01HX2EXAMPLE' : 'sso_app_01HX2EXAMPLE',\n protocol: SsoProtocol.SAML,\n displayName: 'Corporate workforce SAML',\n enabled: true,\n isDefault: true,\n saml: {\n entityId: 'https://idp.example.com/saml',\n ssoUrl: 'https://idp.example.com/saml/sso',\n sloUrl: 'https://idp.example.com/saml/slo',\n x509Certificates: ['MIIBEXAMPLECERTIFICATE'],\n attributeMapping: {\n email: 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress',\n firstName: 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname',\n lastName: 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname',\n },\n signRequests: true,\n wantAssertionsSigned: true,\n allowedClockDrift: 30,\n forceAuthn: false,\n nameIdFormat: SamlNameIdFormat.EMAIL_ADDRESS,\n allowIdpInitiated: false,\n auditSettings: {\n logAuthAttempts: true,\n logAttributeMapping: true,\n retentionDays: 90,\n },\n },\n autoCreateUsers: true,\n autoVerifyEmail: true,\n bypassAppMFA: false,\n defaultRole: 'member',\n allowedDomains: ['example.com'],\n createdAt: '2026-08-01T09:00:00.000Z',\n updatedAt: '2026-08-20T08:30:00.000Z',\n ...scopeIdentity,\n };\n const page = {\n data: [record],\n pagination: { page: 1, limit: 20, total: 1, totalPages: 1 },\n };\n const summaryPage = {\n data: [{\n _id: record._id,\n protocol: record.protocol,\n displayName: record.displayName,\n enabled: record.enabled,\n }],\n pagination: page.pagination,\n };\n\n return { page, summaryPage };\n}\n\nfunction buildSsoConnectionsBaseSpecification(\n resourceType: SsoConnectionResourceType,\n resourceTypeMemberName: SsoConnectionResourceTypeMemberName,\n): ResourceSpecificationConfig<\n SsoConnectionCustomOperation,\n SsoConnectionCoreOperation,\n SsoConnectionMainSchema\n> {\n const examples = createSsoConnectionExamples(resourceType);\n return resourceSpecification<\n SsoConnectionCustomOperation,\n SsoConnectionCoreOperation,\n SsoConnectionMainSchema\n >(\n ssoConnectionPolymorphicFactories[resourceType],\n SsoConnectionBaseSchema,\n ({ schemaShape }) => ({\n purpose: 'Represent one configured SSO provider connection that governs how an organization or application accepts external identity-provider sign-ins.',\n businessRole: 'Administrative authentication-connection record that binds one auth scope to a concrete OIDC or SAML provider setup.',\n lifecycleRole: 'Moves from draft/provider setup through validation and eventual activation, rotation, or retirement under admin control.',\n audience: LabelAudience.DEVELOPER,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'SsoConnectionBaseSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactoryCollectionEntry: {\n collectionSymbol: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'ssoConnectionPolymorphicFactories',\n symbolKind: CodeSymbolKind.FACTORY,\n },\n identifierField: 'collectionKey',\n identifierValue: resourceType,\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: resourceTypeMemberName,\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: 'SsoConnection_Operations',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n frontendConfigurationSourceEntries: [\n {\n collectionSymbol: {\n packageName: '@wildo-ai/presets-components',\n exportName: 'securityMainPresets',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n identifierField: 'collectionKey',\n identifierValue: resourceType,\n },\n {\n collectionSymbol: {\n packageName: '@wildo-ai/presets-components',\n exportName: 'securityAdminPresets',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n identifierField: 'collectionKey',\n identifierValue: resourceType,\n },\n ],\n notes: [\n 'These resources are polymorphic: import the shared collection exports and select the entry keyed by the concrete resource type.',\n ],\n },\n fields: {\n protocol: schemaShape.protocol.enumSpec({\n meaning: 'Chooses which external authentication protocol contract this connection follows.',\n whyItMatters: 'It changes which nested configuration block is meaningful, which validation UI applies, and which custom admin views can surface.',\n importance: FieldSemanticImportance.PRIMARY,\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'SsoProtocol',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [SsoProtocol.OIDC]: { meaning: 'OIDC provider configuration with discovery/token endpoints and OAuth-style settings.' },\n [SsoProtocol.SAML]: { meaning: 'SAML identity-provider configuration with metadata, certificates, and assertion settings.' },\n },\n }),\n displayName: schemaShape.displayName.stringSpec({\n meaning: 'Human-facing name administrators use to recognize this SSO connection in settings and support flows.',\n whyItMatters: 'It anchors the connection in admin UX and makes protocol/test results intelligible during troubleshooting.',\n semanticRole: 'label',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n enabled: schemaShape.enabled.booleanSpec({\n meaning: 'Indicates whether the connection may actively participate in authentication flows.',\n whyItMatters: 'Disabled connections remain configured for audit or later reuse, but should not be offered for live sign-in attempts.',\n }),\n allowedDomains: schemaShape.allowedDomains.arraySpec({\n meaning: 'Restricts which email/identity domains are accepted through this SSO connection.',\n whyItMatters: 'It is the primary admin-controlled allow-list that prevents unintended tenants or users from authenticating through this connection — a security-critical setting.',\n elementMeaning: 'One DNS-style domain that an authenticating identity must match (e.g. acme.com).',\n elementType: {\n notes: [\n 'Element schema is a free-form string — domain values are application-declared and validated at the backend service layer rather than via a fixed enum.',\n ],\n },\n }),\n },\n operations: {\n [Op.LIST]: {\n purpose: 'List the SSO connections configured for the current organization or application authentication scope.',\n outcome: 'Administrators receive each configured provider connection with its protocol, enabled state, and configuration summary so they can select one to inspect, test, or maintain.',\n whenToUse: 'Use to build the authentication settings inventory or to locate a connection before a configuration or diagnostics action.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The SSO connections visible in the caller’s authentication scope are returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the security-admin role required to inspect SSO connection configuration.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Browse configured SSO connections',\n request: SSO_CONNECTION_LIST_REQUEST_EXAMPLE,\n response: examples.page,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n examples: [{\n title: 'Browse SSO connections through the context representation',\n request: SSO_CONNECTION_LIST_REQUEST_EXAMPLE,\n response: examples.page,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n examples: [{\n title: 'Browse compact SSO connection summaries',\n request: SSO_CONNECTION_LIST_REQUEST_EXAMPLE,\n response: examples.summaryPage,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n },\n [Op.READ]: {\n purpose: 'Retrieve the current configuration and status of one SSO connection.',\n outcome: 'Administrators can inspect how the connection is wired and whether it is ready to support sign-in flows.',\n whenToUse: 'Use when the goal is configuration review, troubleshooting, or pre-change verification.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The SSO connection was found and its protocol configuration, allowed domains, and enabled state are returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the security-admin role required to inspect SSO connection configuration.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No SSO connection exists for the supplied id in the caller’s auth scope.' },\n ],\n idempotent: true,\n },\n [Op.CREATE]: {\n purpose: 'Create a new SSO connection for the current auth scope. INTERNAL_CALL service transport — there is no public HTTP CREATE route (only API_CALL variants register routes); administrators reach this through the DISCOVER_ENDPOINTS wizard and internal/system callers through `createAsSystem`. The statuses below describe the service-operation outcome, not a client-facing endpoint.',\n outcome: 'The organization or application gains a newly authored external identity-provider connection.',\n whenToUse: 'Use when onboarding a new enterprise identity provider or adding another auth route.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'A new SSO connection was created for the auth scope and returned with its server-assigned id.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The connection fails schema validation (e.g. a missing `protocol`, an empty `displayName`, or protocol settings that do not match the selected `protocol`).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the security-admin role required to author SSO connections for the scope.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'A connection with the same provider identity (e.g. duplicate `displayName` or issuer) already exists in this auth scope.' },\n ],\n idempotent: false,\n examples: [\n {\n title: 'Create an OIDC SSO connection',\n request: {\n protocol: SsoProtocol.OIDC,\n displayName: 'Acme Okta',\n enabled: false,\n allowedDomains: ['acme.com'],\n },\n response: {\n _id: 'ssoconn_01HX2…',\n protocol: SsoProtocol.OIDC,\n displayName: 'Acme Okta',\n enabled: false,\n allowedDomains: ['acme.com'],\n },\n forStatus: HttpResponseStatusCode.CREATED_201,\n },\n ],\n },\n [Op.UPDATE]: {\n purpose: 'Adjust the configuration of an existing SSO connection. INTERNAL_CALL service transport — no public HTTP UPDATE route; the statuses below describe the service-operation outcome, not a client-facing endpoint. The write-only `oidc.clientSecret` is preserved when the caller round-trips the masked value.',\n outcome: 'The connection stays the same logical identity-provider entry but with updated settings or lifecycle posture.',\n whenToUse: 'Use when rotating metadata, changing mapping rules, or enabling/disabling the provider.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The SSO connection was updated and its new configuration/lifecycle state is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The edited protocol settings, domains, or display name fail schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the security-admin role required to modify SSO connections.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No SSO connection exists for the supplied id in the caller’s auth scope.' },\n ],\n idempotent: true,\n },\n [SsoConnection_Operations.TEST_CONNECTION]: {\n operationId: SsoConnection_Operations.TEST_CONNECTION,\n purpose: 'Evaluate the stored SSO connection without accepting a second connection identity in the request. SAML returns concrete certificate, endpoint, and service-provider metadata diagnostics; OIDC explicitly reports that its test flow is not implemented.',\n outcome: 'Administrators receive a protocol-discriminated result with `supported` always present, so a real SAML diagnostic cannot be confused with an unavailable OIDC test.',\n whenToUse: 'Use after configuring a SAML connection and before enabling it for production sign-in. For OIDC, use the response only to detect that this diagnostic capability is currently unavailable.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A protocol-discriminated result is returned. SAML validation failures use `overallStatus: fail`; OIDC returns `supported: false` and performs no provider handshake.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the security-admin role required to run an SSO connection test.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No SSO connection exists for the supplied id to test.' },\n ],\n idempotent: false,\n rateLimitNote: 'A supported SAML test checks provider endpoints; throttle repeated calls to avoid tripping identity-provider limits while an administrator iterates.',\n examples: [\n {\n title: 'SAML connection passes diagnostics',\n response: {\n protocol: SsoProtocol.SAML,\n supported: true,\n entityIdConfigured: true,\n ssoUrlReachable: true,\n ssoUrlStatus: 200,\n certificates: [{\n index: 0,\n valid: true,\n expiresAt: '2027-08-18T00:00:00.000Z',\n daysRemaining: 365,\n algorithm: 'sha256WithRSAEncryption',\n fingerprint: 'AA:BB:CC:DD:EE:FF',\n warnings: [],\n }],\n sloUrlReachable: true,\n sloUrlStatus: 200,\n spMetadataValid: true,\n overallStatus: SsoConnectionTestOverallStatus.PASS,\n errors: [],\n warnings: [],\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n {\n title: 'SAML connection fails diagnostics',\n response: {\n protocol: SsoProtocol.SAML,\n supported: true,\n entityIdConfigured: true,\n ssoUrlReachable: false,\n certificates: [],\n spMetadataValid: true,\n overallStatus: SsoConnectionTestOverallStatus.FAIL,\n errors: ['SSO URL is not reachable: request timed out', 'No X.509 certificates configured'],\n warnings: [],\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n {\n title: 'OIDC diagnostics are unavailable',\n response: {\n protocol: SsoProtocol.OIDC,\n supported: false,\n message: 'OIDC connection testing is not implemented; no provider handshake was attempted.',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n [SsoConnection_Operations.DISCOVER_ENDPOINTS]: {\n operationId: SsoConnection_Operations.DISCOVER_ENDPOINTS,\n purpose: 'Read provider endpoint metadata without creating or mutating an SSO connection. SAML metadata discovery is implemented; OIDC issuer discovery returns an explicit unsupported result.',\n outcome: 'The response contains discovered SAML metadata for the caller to review and apply separately, or an OIDC `supported: false` result. This operation never persists the returned values.',\n whenToUse: 'Use a `metadataUrl` while preparing SAML configuration. Supplying an `issuerUrl` currently provides only a machine-readable indication that OIDC discovery is unavailable.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A protocol-discriminated discovery result is returned. SAML contains parsed provider metadata; OIDC returns `supported: false` without fetching issuer metadata.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'Neither source is supplied, a URL is malformed or unreachable, or the SAML endpoint returns oversized, non-XML, or unparseable metadata.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the security-admin role required to run endpoint discovery.' },\n ],\n idempotent: false,\n examples: [\n {\n title: 'Discover SAML identity-provider endpoints',\n request: { metadataUrl: 'https://idp.example.com/saml/metadata' },\n response: {\n protocol: SsoProtocol.SAML,\n supported: true,\n entityId: 'https://idp.example.com/saml',\n ssoUrl: 'https://idp.example.com/saml/sso',\n sloUrl: 'https://idp.example.com/saml/slo',\n x509Certificates: ['-----BEGIN CERTIFICATE-----\\nMIIBEXAMPLE\\n-----END CERTIFICATE-----'],\n nameIdFormat: 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress',\n source: SsoConnectionDiscoverySource.SAML_METADATA,\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n {\n title: 'OIDC discovery is unavailable',\n request: { issuerUrl: 'https://idp.example.com/oauth2/default' },\n response: {\n protocol: SsoProtocol.OIDC,\n supported: false,\n message: 'OIDC endpoint discovery is not implemented; issuer metadata was not fetched.',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n },\n businessConstraints: [\n 'Protocol-specific nested settings are only meaningful when the matching `protocol` is selected; do not flatten SAML and OIDC concerns into one generic prose bucket.',\n 'These resources describe authentication-provider wiring, not end-user identity records or access-policy outcomes directly.',\n ],\n }),\n {\n // Phase 4.5 Step 2 (F-1): scope is parameterised per polymorphic\n // resource type via `ssoConnectionResourcePrimaryScopeByResourceType`\n // — the map is `Record<SsoConnectionResourceType, ...>` so adding a\n // new variant is a TypeScript error until the scope is declared.\n resourcePrimaryScope: ssoConnectionResourcePrimaryScopeByResourceType[resourceType],\n },\n );\n}\n\nfunction buildSsoConnectionsResourceSpecification(\n resourceType: SsoConnectionResourceType,\n resourceTypeMemberName: SsoConnectionResourceTypeMemberName,\n): ResourceSpecificationConfig<\n SsoConnectionCustomOperation,\n SsoConnectionCoreOperation,\n SsoConnectionMainSchema\n> {\n const baseSpecification = buildSsoConnectionsBaseSpecification(resourceType, resourceTypeMemberName);\n const mainUIBehavior = resolveSsoConnectionUIBehavior(\n securityMainPresets as Partial<Record<string, unknown>>,\n resourceType,\n 'securityMainPresets',\n );\n const adminUIBehavior = resolveSsoConnectionUIBehavior(\n securityAdminPresets as Partial<Record<string, unknown>>,\n resourceType,\n 'securityAdminPresets',\n );\n const mergedFrontendConfiguration = mergeResourceFrontendConfigurations(\n resourceFrontendConfiguration(mainUIBehavior),\n resourceFrontendConfiguration(adminUIBehavior),\n );\n\n return resourceSpecificationFromFrontendConfiguration(\n mergedFrontendConfiguration,\n baseSpecification,\n () => ({\n label: {\n purpose: 'Use the connection display name as the primary admin label so protocol diagnostics and provider-specific actions stay easy to map to the right external identity provider.',\n },\n views: {\n [SsoConnection_Operations.TEST_CONNECTION]: {\n purpose: 'Surface an admin-facing validation flow for the configured provider connection.',\n views: {\n default: {\n customView: {\n purpose: 'Augment the standard read shell with SAML-specific diagnostic and metadata sections while keeping the surrounding resource context intact.',\n whenToUse: 'Use when the operation behaves like a read-oriented diagnostics screen rather than a plain preset swap.',\n textSlots: {\n title: {\n purpose: 'Name this custom diagnostics host as the SSO connection test surface users are currently in.',\n },\n description: {\n purpose: 'Explain that this host focuses on validation and protocol diagnostics for the selected SSO connection.',\n },\n },\n basedOnPreset: CorePreset_ResourceLayout_Read.DEFAULT,\n implementationSymbol: {\n packageName: '@wildo-ai/saas-frontend-lib',\n exportName: 'ResourceLayoutPreset_Read_SsoSaml',\n symbolKind: CodeSymbolKind.COMPONENT,\n declarationKind: CodeDeclarationKind.FUNCTION,\n },\n declarationSymbols: [\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'securityMainPresets',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'securityAdminPresets',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n notes: [\n 'This is resource-owned operation metadata, not an injectable framework component preset.',\n ],\n },\n },\n },\n },\n [SsoConnection_Operations.DISCOVER_ENDPOINTS]: {\n purpose: 'Surface a metadata-discovery workflow that behaves like a guided create/setup flow for SSO connections.',\n views: {\n default: {\n customView: {\n purpose: 'Replace the generic create host with the SAML discovery wizard when the administrator needs provider-derived endpoint setup.',\n whenToUse: 'Use when the operation should drive guided discovery rather than the default create form shell.',\n textSlots: {\n title: {\n purpose: 'Name this custom setup host as the SSO endpoint-discovery workflow users are currently in.',\n },\n description: {\n purpose: 'Explain that this host guides administrators through metadata-driven SSO endpoint discovery rather than generic manual creation.',\n },\n },\n basedOnPreset: CorePresetNames.DEFAULT,\n implementationSymbol: {\n packageName: '@wildo-ai/saas-frontend-lib',\n exportName: 'ResourceLayoutPreset_Create_SamlWizard',\n symbolKind: CodeSymbolKind.COMPONENT,\n declarationKind: CodeDeclarationKind.FUNCTION,\n },\n declarationSymbols: [\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'securityMainPresets',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'securityAdminPresets',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n },\n },\n },\n },\n },\n }),\n );\n}\n\nexport const organizationSsoConnectionsResourceSpecification = buildSsoConnectionsResourceSpecification(\n CoreResourceType.ORGANIZATION_SSO_CONNECTIONS,\n 'ORGANIZATION_SSO_CONNECTIONS',\n);\n\nexport const applicationSsoConnectionsResourceSpecification = buildSsoConnectionsResourceSpecification(\n CoreResourceType.APPLICATION_SSO_CONNECTIONS,\n 'APPLICATION_SSO_CONNECTIONS',\n);\n"]}
|
|
1
|
+
{"version":3,"file":"sso-connections.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/auth/resources/sso-connections.resource.specification.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,8BAA8B,EAC9B,aAAa,GACd,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACL,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EACL,qBAAqB,IAAI,EAAE,EAC3B,gBAAgB,EAChB,oBAAoB,EACpB,wBAAwB,EACxB,4BAA4B,EAC5B,8BAA8B,EAC9B,uBAAuB,EACvB,gBAAgB,EAChB,WAAW,EACX,iCAAiC,GAClC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,sBAAsB,EACtB,mCAAmC,EACnC,6BAA6B,EAC7B,qBAAqB,EACrB,8CAA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U,EAAE,cAAc,CAAC,WAAW;iCACvC;6BACF;yBACF;qBACF;iBACF;aACF;SACF;KACF,CAAC,CACH,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,+CAA+C,GAAG,wCAAwC,CACrG,gBAAgB,CAAC,4BAA4B,EAC7C,8BAA8B,CAC/B,CAAC;AAEF,MAAM,CAAC,MAAM,8CAA8C,GAAG,wCAAwC,CACpG,gBAAgB,CAAC,2BAA2B,EAC5C,6BAA6B,CAC9B,CAAC","sourcesContent":["import {\n CorePresetNames,\n CorePreset_ResourceLayout_Read,\n LabelAudience,\n} from '@wildo-ai/presets-components-models';\nimport {\n securityAdminPresets,\n securityMainPresets,\n} from '@wildo-ai/presets-components';\nimport type { ResourceUIBehaviorConfig } from '@wildo-ai/saas-frontend-lib/companion';\nimport {\n CoreResourceOperation as Op,\n CoreResourceType,\n ResourcePrimaryScope,\n SsoConnection_Operations,\n SsoConnectionDiscoverySource,\n SsoConnectionTestOverallStatus,\n SsoConnectionBaseSchema,\n SamlNameIdFormat,\n SsoProtocol,\n ssoConnectionPolymorphicFactories,\n} from '@wildo-ai/saas-models';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n HttpResponseStatusCode,\n mergeResourceFrontendConfigurations,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n type ResourceSpecificationConfig,\n} from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\ntype SsoConnectionResourceType =\n | CoreResourceType.ORGANIZATION_SSO_CONNECTIONS\n | CoreResourceType.APPLICATION_SSO_CONNECTIONS;\n\ntype SsoConnectionResourceTypeMemberName =\n | 'ORGANIZATION_SSO_CONNECTIONS'\n | 'APPLICATION_SSO_CONNECTIONS';\n\ntype SsoConnectionResourceConfiguration = ReturnType<\n (typeof ssoConnectionPolymorphicFactories)[CoreResourceType.ORGANIZATION_SSO_CONNECTIONS]\n>;\ntype SsoConnectionCustomOperation = NonNullable<SsoConnectionResourceConfiguration['customOperation']>;\ntype SsoConnectionCoreOperation = SsoConnectionResourceConfiguration['coreOperations'][number];\ntype SsoConnectionMainSchema = typeof SsoConnectionBaseSchema;\ntype SsoConnectionFrontendConfiguration = ResourceUIBehaviorConfig<\n SsoConnectionCustomOperation,\n SsoConnectionCoreOperation,\n SsoConnectionMainSchema\n>;\n\nfunction resolveSsoConnectionUIBehavior(\n source: Partial<Record<string, unknown>>,\n resourceType: SsoConnectionResourceType,\n sourceName: string,\n): SsoConnectionFrontendConfiguration {\n const uiBehavior = source[resourceType] as SsoConnectionFrontendConfiguration | undefined;\n if (!uiBehavior) {\n throw new Error(`Missing \"${resourceType}\" UI behavior in ${sourceName}.`);\n }\n return uiBehavior;\n}\n\n/**\n * Map each polymorphic SSO-connection resource type to its declared\n * `resourcePrimaryScope` (Phase 4.5 Step 2 — F-1). The polymorphic\n * factory derives the same value from the resource's relationships\n * (`AUTH_SCOPE_VARIANTS` carries `isPrimaryScope: true` for both the\n * `ORGANIZATIONS` and `APPLICATION` parents, so\n * `createPolymorphicScopeRelationships` emits scope edges for both\n * variants). Adding a new SSO-connection variant requires explicitly\n * extending this map (TypeScript-enforced via the\n * `Record<SsoConnectionResourceType, ...>` type), preventing a silent\n * scope-default regression on the new variant.\n *\n * The cross-check that the declared value here matches the registry-\n * assembled scope is the responsibility of the post-factory check\n * tracked as Phase 4.5 Step 2.5 — the spec layer cannot perform it\n * because it never sees the real cross-resource `ResourceRelationship[]`.\n */\nconst ssoConnectionResourcePrimaryScopeByResourceType: Record<\n SsoConnectionResourceType,\n ResourcePrimaryScope\n> = {\n [CoreResourceType.ORGANIZATION_SSO_CONNECTIONS]: ResourcePrimaryScope.ORGANIZATIONS,\n [CoreResourceType.APPLICATION_SSO_CONNECTIONS]: ResourcePrimaryScope.APPLICATION,\n};\n\nconst SSO_CONNECTION_LIST_REQUEST_EXAMPLE = { page: 1, limit: 20, sort: 'displayName:asc' } as const;\n\nfunction createSsoConnectionExamples(resourceType: SsoConnectionResourceType) {\n const scopeIdentity = resourceType === CoreResourceType.ORGANIZATION_SSO_CONNECTIONS\n ? { organizationId: 'organization_01HX2EXAMPLE' }\n : { applicationId: 'application_01HX2EXAMPLE' };\n const record = {\n _id: resourceType === CoreResourceType.ORGANIZATION_SSO_CONNECTIONS ? 'sso_org_01HX2EXAMPLE' : 'sso_app_01HX2EXAMPLE',\n protocol: SsoProtocol.SAML,\n displayName: 'Corporate workforce SAML',\n enabled: true,\n isDefault: true,\n saml: {\n entityId: 'https://idp.example.com/saml',\n ssoUrl: 'https://idp.example.com/saml/sso',\n sloUrl: 'https://idp.example.com/saml/slo',\n x509Certificates: ['MIIBEXAMPLECERTIFICATE'],\n attributeMapping: {\n email: 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress',\n firstName: 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname',\n lastName: 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname',\n },\n signRequests: true,\n wantAssertionsSigned: true,\n allowedClockDrift: 30,\n forceAuthn: false,\n nameIdFormat: SamlNameIdFormat.EMAIL_ADDRESS,\n allowIdpInitiated: false,\n auditSettings: {\n logAuthAttempts: true,\n logAttributeMapping: true,\n retentionDays: 90,\n },\n },\n autoCreateUsers: true,\n autoVerifyEmail: true,\n bypassAppMFA: false,\n defaultRole: 'member',\n allowedDomains: ['example.com'],\n createdAt: '2026-08-01T09:00:00.000Z',\n updatedAt: '2026-08-20T08:30:00.000Z',\n ...scopeIdentity,\n };\n const page = {\n data: [record],\n pagination: { page: 1, limit: 20, total: 1, totalPages: 1 },\n };\n const summaryPage = {\n data: [{\n _id: record._id,\n protocol: record.protocol,\n displayName: record.displayName,\n enabled: record.enabled,\n }],\n pagination: page.pagination,\n };\n\n return { page, summaryPage };\n}\n\nfunction buildSsoConnectionsBaseSpecification(\n resourceType: SsoConnectionResourceType,\n resourceTypeMemberName: SsoConnectionResourceTypeMemberName,\n): ResourceSpecificationConfig<\n SsoConnectionCustomOperation,\n SsoConnectionCoreOperation,\n SsoConnectionMainSchema\n> {\n const examples = createSsoConnectionExamples(resourceType);\n return resourceSpecification<\n SsoConnectionCustomOperation,\n SsoConnectionCoreOperation,\n SsoConnectionMainSchema\n >(\n ssoConnectionPolymorphicFactories[resourceType],\n SsoConnectionBaseSchema,\n ({ schemaShape }) => ({\n purpose: 'Represent one configured SSO provider connection that governs how an organization or application accepts external identity-provider sign-ins.',\n businessRole: 'Administrative authentication-connection record that binds one auth scope to a concrete OIDC or SAML provider setup.',\n lifecycleRole: 'Moves from draft/provider setup through validation and eventual activation, rotation, or retirement under admin control.',\n audience: LabelAudience.DEVELOPER,\n subDomain: EngineResourceSubDomain.AUTH,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'SsoConnectionBaseSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactoryCollectionEntry: {\n collectionSymbol: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'ssoConnectionPolymorphicFactories',\n symbolKind: CodeSymbolKind.FACTORY,\n },\n identifierField: 'collectionKey',\n identifierValue: resourceType,\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: resourceTypeMemberName,\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: 'SsoConnection_Operations',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n frontendConfigurationSourceEntries: [\n {\n collectionSymbol: {\n packageName: '@wildo-ai/presets-components',\n exportName: 'securityMainPresets',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n identifierField: 'collectionKey',\n identifierValue: resourceType,\n },\n {\n collectionSymbol: {\n packageName: '@wildo-ai/presets-components',\n exportName: 'securityAdminPresets',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n identifierField: 'collectionKey',\n identifierValue: resourceType,\n },\n ],\n notes: [\n 'These resources are polymorphic: import the shared collection exports and select the entry keyed by the concrete resource type.',\n ],\n },\n fields: {\n protocol: schemaShape.protocol.enumSpec({\n meaning: 'Chooses which external authentication protocol contract this connection follows.',\n whyItMatters: 'It changes which nested configuration block is meaningful, which validation UI applies, and which custom admin views can surface.',\n importance: FieldSemanticImportance.PRIMARY,\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'SsoProtocol',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [SsoProtocol.OIDC]: { meaning: 'OIDC provider configuration with discovery/token endpoints and OAuth-style settings.' },\n [SsoProtocol.SAML]: { meaning: 'SAML identity-provider configuration with metadata, certificates, and assertion settings.' },\n },\n }),\n displayName: schemaShape.displayName.stringSpec({\n meaning: 'Human-facing name administrators use to recognize this SSO connection in settings and support flows.',\n whyItMatters: 'It anchors the connection in admin UX and makes protocol/test results intelligible during troubleshooting.',\n semanticRole: 'label',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n enabled: schemaShape.enabled.booleanSpec({\n meaning: 'Indicates whether the connection may actively participate in authentication flows.',\n whyItMatters: 'Disabled connections remain configured for audit or later reuse, but should not be offered for live sign-in attempts.',\n }),\n allowedDomains: schemaShape.allowedDomains.arraySpec({\n meaning: 'Restricts which email/identity domains are accepted through this SSO connection.',\n whyItMatters: 'It is the primary admin-controlled allow-list that prevents unintended tenants or users from authenticating through this connection — a security-critical setting.',\n elementMeaning: 'One DNS-style domain that an authenticating identity must match (e.g. acme.com).',\n elementType: {\n notes: [\n 'Element schema is a free-form string — domain values are application-declared and validated at the backend service layer rather than via a fixed enum.',\n ],\n },\n }),\n },\n operations: {\n [Op.LIST]: {\n purpose: 'List the SSO connections configured for the current organization or application authentication scope.',\n outcome: 'Administrators receive each configured provider connection with its protocol, enabled state, and configuration summary so they can select one to inspect, test, or maintain.',\n whenToUse: 'Use to build the authentication settings inventory or to locate a connection before a configuration or diagnostics action.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The SSO connections visible in the caller’s authentication scope are returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the security-admin role required to inspect SSO connection configuration.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Browse configured SSO connections',\n request: SSO_CONNECTION_LIST_REQUEST_EXAMPLE,\n response: examples.page,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n examples: [{\n title: 'Browse SSO connections through the context representation',\n request: SSO_CONNECTION_LIST_REQUEST_EXAMPLE,\n response: examples.page,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n examples: [{\n title: 'Browse compact SSO connection summaries',\n request: SSO_CONNECTION_LIST_REQUEST_EXAMPLE,\n response: examples.summaryPage,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n },\n [Op.READ]: {\n purpose: 'Retrieve the current configuration and status of one SSO connection.',\n outcome: 'Administrators can inspect how the connection is wired and whether it is ready to support sign-in flows.',\n whenToUse: 'Use when the goal is configuration review, troubleshooting, or pre-change verification.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The SSO connection was found and its protocol configuration, allowed domains, and enabled state are returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the security-admin role required to inspect SSO connection configuration.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No SSO connection exists for the supplied id in the caller’s auth scope.' },\n ],\n idempotent: true,\n },\n [Op.CREATE]: {\n purpose: 'Create a new SSO connection for the current auth scope. INTERNAL_CALL service transport — there is no public HTTP CREATE route (only API_CALL variants register routes); administrators reach this through the DISCOVER_ENDPOINTS wizard and internal/system callers through `createAsSystem`. The statuses below describe the service-operation outcome, not a client-facing endpoint.',\n outcome: 'The organization or application gains a newly authored external identity-provider connection.',\n whenToUse: 'Use when onboarding a new enterprise identity provider or adding another auth route.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'A new SSO connection was created for the auth scope and returned with its server-assigned id.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The connection fails schema validation (e.g. a missing `protocol`, an empty `displayName`, or protocol settings that do not match the selected `protocol`).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the security-admin role required to author SSO connections for the scope.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'A connection with the same provider identity (e.g. duplicate `displayName` or issuer) already exists in this auth scope.' },\n ],\n idempotent: false,\n examples: [\n {\n title: 'Create an OIDC SSO connection',\n request: {\n protocol: SsoProtocol.OIDC,\n displayName: 'Acme Okta',\n enabled: false,\n allowedDomains: ['acme.com'],\n },\n response: {\n _id: 'ssoconn_01HX2…',\n protocol: SsoProtocol.OIDC,\n displayName: 'Acme Okta',\n enabled: false,\n allowedDomains: ['acme.com'],\n },\n forStatus: HttpResponseStatusCode.CREATED_201,\n },\n ],\n },\n [Op.UPDATE]: {\n purpose: 'Adjust the configuration of an existing SSO connection. INTERNAL_CALL service transport — no public HTTP UPDATE route; the statuses below describe the service-operation outcome, not a client-facing endpoint. The write-only `oidc.clientSecret` is preserved when the caller round-trips the masked value.',\n outcome: 'The connection stays the same logical identity-provider entry but with updated settings or lifecycle posture.',\n whenToUse: 'Use when rotating metadata, changing mapping rules, or enabling/disabling the provider.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The SSO connection was updated and its new configuration/lifecycle state is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The edited protocol settings, domains, or display name fail schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the security-admin role required to modify SSO connections.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No SSO connection exists for the supplied id in the caller’s auth scope.' },\n ],\n idempotent: true,\n },\n [SsoConnection_Operations.TEST_CONNECTION]: {\n operationId: SsoConnection_Operations.TEST_CONNECTION,\n purpose: 'Evaluate the stored SSO connection without accepting a second connection identity in the request. SAML returns concrete certificate, endpoint, and service-provider metadata diagnostics; OIDC explicitly reports that its test flow is not implemented.',\n outcome: 'Administrators receive a protocol-discriminated result with `supported` always present, so a real SAML diagnostic cannot be confused with an unavailable OIDC test.',\n whenToUse: 'Use after configuring a SAML connection and before enabling it for production sign-in. For OIDC, use the response only to detect that this diagnostic capability is currently unavailable.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A protocol-discriminated result is returned. SAML validation failures use `overallStatus: fail`; OIDC returns `supported: false` and performs no provider handshake.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the security-admin role required to run an SSO connection test.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No SSO connection exists for the supplied id to test.' },\n ],\n idempotent: false,\n rateLimitNote: 'A supported SAML test checks provider endpoints; throttle repeated calls to avoid tripping identity-provider limits while an administrator iterates.',\n examples: [\n {\n title: 'SAML connection passes diagnostics',\n response: {\n protocol: SsoProtocol.SAML,\n supported: true,\n entityIdConfigured: true,\n ssoUrlReachable: true,\n ssoUrlStatus: 200,\n certificates: [{\n index: 0,\n valid: true,\n expiresAt: '2027-08-18T00:00:00.000Z',\n daysRemaining: 365,\n algorithm: 'sha256WithRSAEncryption',\n fingerprint: 'AA:BB:CC:DD:EE:FF',\n warnings: [],\n }],\n sloUrlReachable: true,\n sloUrlStatus: 200,\n spMetadataValid: true,\n overallStatus: SsoConnectionTestOverallStatus.PASS,\n errors: [],\n warnings: [],\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n {\n title: 'SAML connection fails diagnostics',\n response: {\n protocol: SsoProtocol.SAML,\n supported: true,\n entityIdConfigured: true,\n ssoUrlReachable: false,\n certificates: [],\n spMetadataValid: true,\n overallStatus: SsoConnectionTestOverallStatus.FAIL,\n errors: ['SSO URL is not reachable: request timed out', 'No X.509 certificates configured'],\n warnings: [],\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n {\n title: 'OIDC diagnostics are unavailable',\n response: {\n protocol: SsoProtocol.OIDC,\n supported: false,\n message: 'OIDC connection testing is not implemented; no provider handshake was attempted.',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n [SsoConnection_Operations.DISCOVER_ENDPOINTS]: {\n operationId: SsoConnection_Operations.DISCOVER_ENDPOINTS,\n purpose: 'Read provider endpoint metadata without creating or mutating an SSO connection. SAML metadata discovery is implemented; OIDC issuer discovery returns an explicit unsupported result.',\n outcome: 'The response contains discovered SAML metadata for the caller to review and apply separately, or an OIDC `supported: false` result. This operation never persists the returned values.',\n whenToUse: 'Use a `metadataUrl` while preparing SAML configuration. Supplying an `issuerUrl` currently provides only a machine-readable indication that OIDC discovery is unavailable.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A protocol-discriminated discovery result is returned. SAML contains parsed provider metadata; OIDC returns `supported: false` without fetching issuer metadata.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'Neither source is supplied, a URL is malformed or unreachable, or the SAML endpoint returns oversized, non-XML, or unparseable metadata.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the security-admin role required to run endpoint discovery.' },\n ],\n idempotent: false,\n examples: [\n {\n title: 'Discover SAML identity-provider endpoints',\n request: { metadataUrl: 'https://idp.example.com/saml/metadata' },\n response: {\n protocol: SsoProtocol.SAML,\n supported: true,\n entityId: 'https://idp.example.com/saml',\n ssoUrl: 'https://idp.example.com/saml/sso',\n sloUrl: 'https://idp.example.com/saml/slo',\n x509Certificates: ['-----BEGIN CERTIFICATE-----\\nMIIBEXAMPLE\\n-----END CERTIFICATE-----'],\n nameIdFormat: 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress',\n source: SsoConnectionDiscoverySource.SAML_METADATA,\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n {\n title: 'OIDC discovery is unavailable',\n request: { issuerUrl: 'https://idp.example.com/oauth2/default' },\n response: {\n protocol: SsoProtocol.OIDC,\n supported: false,\n message: 'OIDC endpoint discovery is not implemented; issuer metadata was not fetched.',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n },\n businessConstraints: [\n 'Protocol-specific nested settings are only meaningful when the matching `protocol` is selected; do not flatten SAML and OIDC concerns into one generic prose bucket.',\n 'These resources describe authentication-provider wiring, not end-user identity records or access-policy outcomes directly.',\n ],\n }),\n {\n // Phase 4.5 Step 2 (F-1): scope is parameterised per polymorphic\n // resource type via `ssoConnectionResourcePrimaryScopeByResourceType`\n // — the map is `Record<SsoConnectionResourceType, ...>` so adding a\n // new variant is a TypeScript error until the scope is declared.\n resourcePrimaryScope: ssoConnectionResourcePrimaryScopeByResourceType[resourceType],\n },\n );\n}\n\nfunction buildSsoConnectionsResourceSpecification(\n resourceType: SsoConnectionResourceType,\n resourceTypeMemberName: SsoConnectionResourceTypeMemberName,\n): ResourceSpecificationConfig<\n SsoConnectionCustomOperation,\n SsoConnectionCoreOperation,\n SsoConnectionMainSchema\n> {\n const baseSpecification = buildSsoConnectionsBaseSpecification(resourceType, resourceTypeMemberName);\n const mainUIBehavior = resolveSsoConnectionUIBehavior(\n securityMainPresets as Partial<Record<string, unknown>>,\n resourceType,\n 'securityMainPresets',\n );\n const adminUIBehavior = resolveSsoConnectionUIBehavior(\n securityAdminPresets as Partial<Record<string, unknown>>,\n resourceType,\n 'securityAdminPresets',\n );\n const mergedFrontendConfiguration = mergeResourceFrontendConfigurations(\n resourceFrontendConfiguration(mainUIBehavior),\n resourceFrontendConfiguration(adminUIBehavior),\n );\n\n return resourceSpecificationFromFrontendConfiguration(\n mergedFrontendConfiguration,\n baseSpecification,\n () => ({\n label: {\n purpose: 'Use the connection display name as the primary admin label so protocol diagnostics and provider-specific actions stay easy to map to the right external identity provider.',\n },\n views: {\n [SsoConnection_Operations.TEST_CONNECTION]: {\n purpose: 'Surface an admin-facing validation flow for the configured provider connection.',\n views: {\n default: {\n customView: {\n purpose: 'Augment the standard read shell with SAML-specific diagnostic and metadata sections while keeping the surrounding resource context intact.',\n whenToUse: 'Use when the operation behaves like a read-oriented diagnostics screen rather than a plain preset swap.',\n textSlots: {\n title: {\n purpose: 'Name this custom diagnostics host as the SSO connection test surface users are currently in.',\n },\n description: {\n purpose: 'Explain that this host focuses on validation and protocol diagnostics for the selected SSO connection.',\n },\n },\n basedOnPreset: CorePreset_ResourceLayout_Read.DEFAULT,\n implementationSymbol: {\n packageName: '@wildo-ai/saas-frontend-lib',\n exportName: 'ResourceLayoutPreset_Read_SsoSaml',\n symbolKind: CodeSymbolKind.COMPONENT,\n declarationKind: CodeDeclarationKind.FUNCTION,\n },\n declarationSymbols: [\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'securityMainPresets',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'securityAdminPresets',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n notes: [\n 'This is resource-owned operation metadata, not an injectable framework component preset.',\n ],\n },\n },\n },\n },\n [SsoConnection_Operations.DISCOVER_ENDPOINTS]: {\n purpose: 'Surface a metadata-discovery workflow that behaves like a guided create/setup flow for SSO connections.',\n views: {\n default: {\n customView: {\n purpose: 'Replace the generic create host with the SAML discovery wizard when the administrator needs provider-derived endpoint setup.',\n whenToUse: 'Use when the operation should drive guided discovery rather than the default create form shell.',\n textSlots: {\n title: {\n purpose: 'Name this custom setup host as the SSO endpoint-discovery workflow users are currently in.',\n },\n description: {\n purpose: 'Explain that this host guides administrators through metadata-driven SSO endpoint discovery rather than generic manual creation.',\n },\n },\n basedOnPreset: CorePresetNames.DEFAULT,\n implementationSymbol: {\n packageName: '@wildo-ai/saas-frontend-lib',\n exportName: 'ResourceLayoutPreset_Create_SamlWizard',\n symbolKind: CodeSymbolKind.COMPONENT,\n declarationKind: CodeDeclarationKind.FUNCTION,\n },\n declarationSymbols: [\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'securityMainPresets',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'securityAdminPresets',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n },\n },\n },\n },\n },\n }),\n );\n}\n\nexport const organizationSsoConnectionsResourceSpecification = buildSsoConnectionsResourceSpecification(\n CoreResourceType.ORGANIZATION_SSO_CONNECTIONS,\n 'ORGANIZATION_SSO_CONNECTIONS',\n);\n\nexport const applicationSsoConnectionsResourceSpecification = buildSsoConnectionsResourceSpecification(\n CoreResourceType.APPLICATION_SSO_CONNECTIONS,\n 'APPLICATION_SSO_CONNECTIONS',\n);\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BillingAccount_Operations, CoreResourceOperation as Op } from '@wildo-ai/saas-models';
|
|
2
|
-
export declare const organizationBillingAccountsResourceSpecification: import("../../../_core").ResourceSpecificationConfig<typeof BillingAccount_Operations, Op.READ | Op.UPDATE | Op.DELETE | Op.CREATE | Op.LIST, import("zod").ZodObject<{
|
|
2
|
+
export declare const organizationBillingAccountsResourceSpecification: import("../../../_core").ResourceSpecificationConfig<typeof BillingAccount_Operations, Op.READ | Op.UPDATE | Op.UPDATE_MANY | Op.DELETE | Op.CREATE | Op.LIST, import("zod").ZodObject<{
|
|
3
3
|
_id: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>>;
|
|
4
4
|
providerCustomerId: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodOptional<import("zod").ZodString>>>;
|
|
5
5
|
providerRef: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
@@ -8,7 +8,7 @@ export declare const organizationBillingAccountsResourceSpecification: import(".
|
|
|
8
8
|
createdAt: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("zod").ZodDate>>>;
|
|
9
9
|
updatedAt: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("zod").ZodDate>>>;
|
|
10
10
|
}, import("zod/v4/core").$strip>>;
|
|
11
|
-
export declare const userBillingAccountsResourceSpecification: import("../../../_core").ResourceSpecificationConfig<typeof BillingAccount_Operations, Op.READ | Op.UPDATE | Op.DELETE | Op.CREATE | Op.LIST, import("zod").ZodObject<{
|
|
11
|
+
export declare const userBillingAccountsResourceSpecification: import("../../../_core").ResourceSpecificationConfig<typeof BillingAccount_Operations, Op.READ | Op.UPDATE | Op.UPDATE_MANY | Op.DELETE | Op.CREATE | Op.LIST, import("zod").ZodObject<{
|
|
12
12
|
_id: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>>;
|
|
13
13
|
providerCustomerId: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodOptional<import("zod").ZodString>>>;
|
|
14
14
|
providerRef: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billing-accounts.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/billing/resources/billing-accounts.resource.specification.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,yBAAyB,EAEzB,qBAAqB,IAAI,EAAE,EAI5B,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"billing-accounts.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/billing/resources/billing-accounts.resource.specification.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,yBAAyB,EAEzB,qBAAqB,IAAI,EAAE,EAI5B,MAAM,uBAAuB,CAAC;AAmW/B,eAAO,MAAM,gDAAgD;;;;;;;;iCAG5D,CAAC;AAEF,eAAO,MAAM,wCAAwC;;;;;;;;iCAGpD,CAAC"}
|
|
@@ -4,6 +4,7 @@ import { CodeDeclarationKind, CodeSymbolKind, FieldSemanticImportance } from '@w
|
|
|
4
4
|
import { BillingAccount_Operations, BillingAccountBaseSchema, CoreResourceOperation as Op, CoreResourceType, ResourcePrimaryScope, billingAccountsPolymorphicFactories, } from '@wildo-ai/saas-models';
|
|
5
5
|
import { HttpResponseStatusCode, mergeResourceFrontendConfigurations, resourceFrontendConfiguration, resourceSpecification, resourceSpecificationFromFrontendConfiguration, } from '../../../_core/index.js';
|
|
6
6
|
import { BILLING_API_REFERENCE_PAGE_REQUEST, billingApiReferencePage, createBillingApiReferenceScopeExample, } from './billing-api-reference-examples.js';
|
|
7
|
+
import { EngineResourceSubDomain } from '../../engine-resource-sub-domain.js';
|
|
7
8
|
const billingAccountResourcePrimaryScopeByResourceType = {
|
|
8
9
|
[CoreResourceType.ORGANIZATION_BILLING_ACCOUNTS]: ResourcePrimaryScope.ORGANIZATIONS,
|
|
9
10
|
[CoreResourceType.USER_BILLING_ACCOUNTS]: ResourcePrimaryScope.USER_SELF,
|
|
@@ -34,6 +35,7 @@ function buildBillingAccountBase(resourceType, resourceTypeMemberName) {
|
|
|
34
35
|
businessRole: 'Anchor row for subscriptions, invoices, credit pools, and self-serve `OPEN_CHECKOUT` / `OPEN_PORTAL` flows in user/org billing settings.',
|
|
35
36
|
lifecycleRole: 'Created automatically the first time billing state is requested, then synchronized from billing-provider events. An inactive account remains readable for billing history but cannot start a new checkout or portal session. There is no client-facing create operation.',
|
|
36
37
|
audience: LabelAudience.ADMIN,
|
|
38
|
+
subDomain: EngineResourceSubDomain.BILLING,
|
|
37
39
|
codeHandling: {
|
|
38
40
|
mainSchema: {
|
|
39
41
|
packageName: '@wildo-ai/saas-models',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billing-accounts.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/billing/resources/billing-accounts.resource.specification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AACvF,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACxG,OAAO,EACL,yBAAyB,EACzB,wBAAwB,EACxB,qBAAqB,IAAI,EAAE,EAC3B,gBAAgB,EAChB,oBAAoB,EACpB,mCAAmC,GACpC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB,mCAAmC,EACnC,6BAA6B,EAC7B,qBAAqB,EACrB,8CAA8C,GAC/C,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,kCAAkC,EAClC,uBAAuB,EACvB,qCAAqC,GAEtC,MAAM,kCAAkC,CAAC;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,EAAE;QACnI,MAAM,EAAE;YACN,OAAO,EAAE,6OAA6O;YACtP,cAAc,EAAE,2OAA2O;SAC5P;QACD,KAAK,EAAE;YACL,CAAC,yBAAyB,CAAC,aAAa,CAAC,EAAE,EAAE,OAAO,EAAE,8EAA8E,EAAE,SAAS,EAAE,0EAA0E,EAAE;YAC7N,CAAC,yBAAyB,CAAC,WAAW,CAAC,EAAE,EAAE,OAAO,EAAE,yHAAyH,EAAE,SAAS,EAAE,iDAAiD,EAAE;YAC7O,CAAC,yBAAyB,CAAC,SAAS,CAAC,EAAE,EAAE,OAAO,EAAE,2EAA2E,EAAE,SAAS,EAAE,4DAA4D,EAAE;SACzM;KACF,CAAC,CACH,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,gDAAgD,GAAG,wCAAwC,CACtG,gBAAgB,CAAC,6BAA6B,EAC9C,+BAA+B,CAChC,CAAC;AAEF,MAAM,CAAC,MAAM,wCAAwC,GAAG,wCAAwC,CAC9F,gBAAgB,CAAC,qBAAqB,EACtC,uBAAuB,CACxB,CAAC","sourcesContent":["import { billingAdminPresets, billingMainPresets } from '@wildo-ai/presets-components';\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport type { ResourceUIBehaviorConfig } from '@wildo-ai/saas-frontend-lib/companion';\nimport { CodeDeclarationKind, CodeSymbolKind, FieldSemanticImportance } from '@wildo-ai/zod-decorators';\nimport {\n BillingAccount_Operations,\n BillingAccountBaseSchema,\n CoreResourceOperation as Op,\n CoreResourceType,\n ResourcePrimaryScope,\n billingAccountsPolymorphicFactories,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n mergeResourceFrontendConfigurations,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n} from '~wildo-specifications/_core';\nimport {\n BILLING_API_REFERENCE_PAGE_REQUEST,\n billingApiReferencePage,\n createBillingApiReferenceScopeExample,\n type BillingApiReferenceExampleScope,\n} from './billing-api-reference-examples';\n\ntype BillingAccountResourceType = CoreResourceType.ORGANIZATION_BILLING_ACCOUNTS | CoreResourceType.USER_BILLING_ACCOUNTS;\ntype BillingAccountResourceTypeMember = 'ORGANIZATION_BILLING_ACCOUNTS' | 'USER_BILLING_ACCOUNTS';\n\nconst billingAccountResourcePrimaryScopeByResourceType: Record<BillingAccountResourceType, BillingApiReferenceExampleScope> = {\n [CoreResourceType.ORGANIZATION_BILLING_ACCOUNTS]: ResourcePrimaryScope.ORGANIZATIONS,\n [CoreResourceType.USER_BILLING_ACCOUNTS]: ResourcePrimaryScope.USER_SELF,\n};\n\ntype Cfg = ReturnType<(typeof billingAccountsPolymorphicFactories)[CoreResourceType.ORGANIZATION_BILLING_ACCOUNTS]>;\ntype Custom = NonNullable<Cfg['customOperation']>;\ntype Core = Cfg['coreOperations'][number];\ntype Main = typeof BillingAccountBaseSchema;\ntype BillAcctFrontend = ResourceUIBehaviorConfig<Custom, Core, Main>;\n\nfunction resolveBillingAccountUI(\n source: Partial<Record<string, unknown>>,\n resourceType: BillingAccountResourceType,\n sourceName: string,\n): BillAcctFrontend {\n const uiBehavior = source[resourceType] as BillAcctFrontend | undefined;\n if (!uiBehavior) {\n throw new Error(`Missing \"${resourceType}\" UI behavior in ${sourceName}.`);\n }\n return uiBehavior;\n}\n\nfunction buildBillingAccountBase(\n resourceType: BillingAccountResourceType,\n resourceTypeMemberName: BillingAccountResourceTypeMember,\n) {\n const exampleScope = createBillingApiReferenceScopeExample(\n billingAccountResourcePrimaryScopeByResourceType[resourceType],\n );\n const billingAccountExample = {\n _id: exampleScope.billingAccountId,\n isActive: true,\n metadata: { costCentre: 'customer-success' },\n createdAt: '2026-06-01T09:00:00.000Z',\n updatedAt: '2026-06-18T14:30:00.000Z',\n ...exampleScope.scopeIdentity,\n };\n const billingAccountSummaryExample = {\n _id: billingAccountExample._id,\n isActive: billingAccountExample.isActive,\n };\n\n return resourceSpecification<Custom, Core, Main>(\n billingAccountsPolymorphicFactories[resourceType],\n BillingAccountBaseSchema,\n ({ schemaShape }) => ({\n purpose:\n `Billing account for ${exampleScope.scopeLabel === 'organization' ? 'an organization' : 'a user'}: exposes activation state and safe metadata, and provides the entry point for checkout, the billing portal, and aggregated billing state.`,\n businessRole: 'Anchor row for subscriptions, invoices, credit pools, and self-serve `OPEN_CHECKOUT` / `OPEN_PORTAL` flows in user/org billing settings.',\n lifecycleRole:\n 'Created automatically the first time billing state is requested, then synchronized from billing-provider events. An inactive account remains readable for billing history but cannot start a new checkout or portal session. There is no client-facing create operation.',\n audience: LabelAudience.ADMIN,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'BillingAccountBaseSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactoryCollectionEntry: {\n collectionSymbol: { packageName: '@wildo-ai/saas-models', exportName: 'billingAccountsPolymorphicFactories', symbolKind: CodeSymbolKind.FACTORY },\n identifierField: 'collectionKey',\n identifierValue: resourceType,\n },\n resourceType: {\n enumDeclaration: { packageName: '@wildo-ai/saas-models', exportName: 'CoreResourceType', symbolKind: CodeSymbolKind.ENUM, declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM },\n memberName: resourceTypeMemberName,\n },\n operationVocabulary: {\n coreEnum: { packageName: '@wildo-ai/saas-models', exportName: 'CoreResourceOperation', symbolKind: CodeSymbolKind.ENUM, declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM },\n customEnum: { packageName: '@wildo-ai/saas-models', exportName: 'BillingAccount_Operations', symbolKind: CodeSymbolKind.ENUM, declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM },\n },\n frontendConfigurationSourceEntries: [\n { collectionSymbol: { packageName: '@wildo-ai/presets-components', exportName: 'billingMainPresets', symbolKind: CodeSymbolKind.UI_BEHAVIOR }, identifierField: 'collectionKey', identifierValue: resourceType },\n { collectionSymbol: { packageName: '@wildo-ai/presets-components', exportName: 'billingAdminPresets', symbolKind: CodeSymbolKind.UI_BEHAVIOR }, identifierField: 'collectionKey', identifierValue: resourceType },\n ],\n notes: ['Two variants under `BILLING_SCOPE_VARIANTS` — org primary catalog scope is `ORGANIZATIONS`; user row is `USER_SELF`.'],\n },\n fields: {\n _id: schemaShape._id.stringSpec({ meaning: 'Document id in Mongo for this billing account row.', importance: FieldSemanticImportance.PRIMARY, semanticRole: 'identifier' }),\n isActive: schemaShape.isActive.booleanSpec({ meaning: 'Whether the account should participate in new purchases and portal sessions.', importance: FieldSemanticImportance.PRIMARY }),\n providerRef: schemaShape.providerRef.stringSpec({ meaning: 'Which billing adapter integration backs this account (e.g. stripe) — backend-only in typical responses.', whyItMatters: 'Drives which SDK and webhook namespace hydrate the row.' }),\n providerCustomerId: schemaShape.providerCustomerId.stringSpec({ meaning: 'Provider-side customer id; master link for subscription and invoice fetch.', whyItMatters: 'Without it the row cannot call provider APIs for portal or state.', importance: FieldSemanticImportance.PRIMARY }),\n metadata: schemaShape.metadata.objectSpec({ meaning: 'Key/value tags mirrored to the provider for analytics or tax hints — not the full address book.' }),\n createdAt: schemaShape.createdAt.dateSpec({ meaning: 'When the row was first created.', temporalRole: 'creation' }),\n updatedAt: schemaShape.updatedAt.dateSpec({ meaning: 'Last backend sync with provider or local patch.', temporalRole: 'modified' }),\n },\n operations: {\n [Op.READ]: {\n purpose: 'Load the account row and derived UI flags for settings surfaces.',\n outcome: 'Owner sees the account id, activation state, and non-sensitive metadata needed for support correlation. Provider customer identifiers remain backend-only.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The billing account was found and its public id, activation state, and metadata are returned. Backend-only provider identifiers are omitted.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No billing account exists for the supplied id in the caller’s scope.' },\n ],\n idempotent: true,\n examples: [{\n title: `Inspect an active ${exampleScope.scopeLabel} billing account`,\n response: billingAccountExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n examples: [{\n title: 'Inspect the billing account with available relationship context',\n response: billingAccountExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n examples: [{\n title: 'Inspect the compact billing-account summary',\n response: billingAccountSummaryExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n },\n [Op.LIST]: {\n purpose: 'List billing account rows in org or user scope (often singleton).',\n outcome: 'Picker or table for rare multi-account orgs in admin.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty, often singleton) page of billing accounts for the scope.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Browse billing accounts for the current scope',\n request: BILLING_API_REFERENCE_PAGE_REQUEST,\n response: billingApiReferencePage([billingAccountExample]),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n examples: [{\n title: 'Browse billing accounts with relationship context',\n request: BILLING_API_REFERENCE_PAGE_REQUEST,\n response: billingApiReferencePage([billingAccountExample]),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n examples: [{\n title: 'Browse compact billing-account summaries',\n request: BILLING_API_REFERENCE_PAGE_REQUEST,\n response: billingApiReferencePage([billingAccountSummaryExample]),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n },\n [Op.CREATE]: {\n purpose: 'System-context bootstrap when a scope first needs a billing account: auto-created in-process by the billing service (INTERNAL_CALL, no HTTP surface) through the `systemAccessPolicy.create` opt-in, which injects the scope FK via the execution context map.',\n outcome: 'New row for the scope after provider customer linkage in implementation.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'A billing account was provisioned for the scope (with its provider customer linked) and is returned with its server-assigned id.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The account payload fails schema validation (e.g. missing `providerRef`).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the entitlement to provision a billing account in this scope.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'A billing account already links this scope to the provider customer (the scope→customer link is unique).', errorCode: 'BILLING_ACCOUNT_EXISTS' },\n ],\n idempotent: false,\n examples: [\n {\n title: 'Provision a Stripe-backed billing account for a scope',\n request: {\n providerRef: 'stripe',\n providerCustomerId: 'cus_01HX2…',\n isActive: true,\n metadata: { tier: 'pro' },\n },\n response: {\n _id: 'billacct_01HX2…',\n providerRef: 'stripe',\n providerCustomerId: 'cus_01HX2…',\n isActive: true,\n },\n forStatus: HttpResponseStatusCode.CREATED_201,\n },\n ],\n },\n [Op.UPDATE]: {\n purpose: 'Metadata or activation toggles; heavy provider writes often go through webhooks or custom ops instead.',\n outcome: 'Patched `metadata` or `isActive` per DTO in factory config.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The account’s `metadata` / `isActive` fields were patched and the updated row is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The edited fields fail schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the entitlement to mutate this billing account.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No billing account exists for the supplied id in the caller’s scope.' },\n ],\n idempotent: true,\n },\n [Op.DELETE]: {\n purpose: 'Dangerous off-boarding: in-process hard removal of the account row (INTERNAL_CALL, no HTTP surface). The product off-boarding path is the soft retire (`isActive: false`), not this.',\n outcome: 'Row removed — but only once the account has no retained financial children left. The dependents check is enforced by the engine before the delete, not left to the caller.',\n responseStatuses: [\n { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The billing account had no retained financial children and was removed; no body is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the elevated entitlement required for billing-account off-boarding.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No billing account exists for the supplied id (or it was already removed).' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The account still has retained financial children — subscriptions, invoice refs, usage records, or credit pools — that reference it. Those rows survive scope and account deletion by design (billing-retention decision), and this account holds the only local `providerCustomerId` that maps them back to the provider customer, so the delete fails closed. The blocking families are named in the error context.', errorCode: 'BILLING_ACCOUNT_HAS_DEPENDENTS' },\n ],\n idempotent: true,\n },\n [BillingAccount_Operations.OPEN_CHECKOUT]: {\n operationId: BillingAccount_Operations.OPEN_CHECKOUT,\n purpose: 'Start a hosted checkout session (product+price) for the connected customer.',\n outcome: 'Redirect URL or client secret to complete purchase in the provider UI.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A provider checkout session was created; the redirect URL / client secret to complete the purchase is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The requested product/price is missing or malformed in the checkout request.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'A caller-supplied `metadata` key uses the framework-reserved `wildo_` namespace, or `quantity` is not an integer within the supported bound. Reserved keys are refused rather than dropped: that namespace carries the values the completion webhook reads back to decide which account is credited and by how much.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: '`priceId` names a price whose `productId` is not `productKey`’s product. The provider is billed the PRICE while the purchase is recorded against the PRODUCT, so an unmatched pair would deliver one product’s goods at another’s price.', errorCode: 'BILLING_PRICE_PRODUCT_MISMATCH' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller does not own this billing account and may not open checkout for it.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No billing account exists for the supplied id, or the referenced price is not in the catalog.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The account is inactive or has no linked provider customer, so a checkout session cannot be opened.' },\n ],\n idempotent: false,\n examples: [{\n title: 'Open checkout for the Pro plan',\n request: {\n productKey: 'pro_plan',\n priceId: 'price_pro_monthly',\n successUrl: 'https://app.example.test/settings/billing?checkout=success',\n cancelUrl: 'https://app.example.test/settings/billing?checkout=cancelled',\n quantity: 25,\n promotionCode: 'WELCOME20',\n metadata: { campaign: 'customer-expansion' },\n },\n response: {\n url: 'https://billing.example.test/checkout/cs_01HX2EXAMPLE',\n sessionId: 'cs_01HX2EXAMPLE',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [BillingAccount_Operations.OPEN_PORTAL]: {\n operationId: BillingAccount_Operations.OPEN_PORTAL,\n purpose: 'Open the provider customer portal (payment methods, cancel at period end) with a return URL.',\n outcome: 'Session URL for self-serve management.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A provider customer-portal session was created; its session URL is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller does not own this billing account and may not open its portal.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No billing account exists for the supplied id in the caller’s scope.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The account has no linked provider customer, so a portal session cannot be opened.' },\n ],\n idempotent: false,\n examples: [{\n title: 'Open the hosted billing portal',\n request: { returnUrl: 'https://app.example.test/settings/billing' },\n response: { url: 'https://billing.example.test/portal/bps_01HX2EXAMPLE' },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [BillingAccount_Operations.GET_STATE]: {\n operationId: BillingAccount_Operations.GET_STATE,\n purpose: 'Collection-scoped aggregate read of account + subscriptions + catalog slices for billing home widgets. The billing service auto-creates the scope’s account when none exists.',\n outcome: 'Convenience bundle for a single call instead of N reads in the client; the absence of an existing account is a bootstrap condition, not a 404.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The denormalized billing snapshot (account + subscriptions + catalog slices) is returned in one bundle.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The authenticated request context does not contain the scope identifier required to resolve billing state.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The requested scope does not match the caller’s authenticated scope.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'Billing is not enabled for this scope type.', errorCode: 'BILLING_SCOPE_NOT_ENABLED' },\n ],\n idempotent: true,\n examples: [{\n title: 'Load the billing home state before a subscription exists',\n response: {\n billingAccount: {\n _id: billingAccountExample._id,\n isActive: true,\n createdAt: billingAccountExample.createdAt,\n updatedAt: billingAccountExample.updatedAt,\n },\n subscription: null,\n products: [],\n prices: [],\n invoices: [],\n usage: { byProduct: {} },\n creditPools: {},\n activePromotions: [],\n scopeType: exampleScope.scopeType,\n },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n businessConstraints: [\n 'Contact, tax, and payment instruments live in the provider — do not expect them duplicated on this document.',\n 'Checkout-session metadata is split by trust: keys prefixed `wildo_` are framework-authoritative (they are what the signed completion webhook reads back to credit an account), and caller-supplied keys in that namespace are refused at the request DTO. A provider signature proves the provider sent the echoed metadata, never that the framework wrote it, so the completion handler re-derives the billing account from the provider CUSTOMER and only cross-checks the echoed value.',\n 'Polymorphic scope FKs (`organizationId` / `userId`) are injected on concrete variant schemas, not on `BillingAccountBaseSchema` itself.',\n 'The account outlives its scope: deleting the owning org or user does NOT cascade to this row, and its financial children (subscriptions, invoice refs, usage records, credit pools) are retained too. Consequently a hard DELETE is refused with 409 while any of those children remain — this row carries the only local `providerCustomerId`, so removing it would leave the retained financial records unreconcilable against the provider.',\n ],\n }),\n { resourcePrimaryScope: billingAccountResourcePrimaryScopeByResourceType[resourceType] },\n );\n}\n\nfunction buildBillingAccountResourceSpecification(\n resourceType: BillingAccountResourceType,\n memberName: BillingAccountResourceTypeMember,\n) {\n const base = buildBillingAccountBase(resourceType, memberName);\n const main = resolveBillingAccountUI(billingMainPresets as Partial<Record<string, unknown>>, resourceType, 'billingMainPresets');\n const admin = resolveBillingAccountUI(billingAdminPresets as Partial<Record<string, unknown>>, resourceType, 'billingAdminPresets');\n return resourceSpecificationFromFrontendConfiguration(\n mergeResourceFrontendConfigurations(resourceFrontendConfiguration(main), resourceFrontendConfiguration(admin)),\n base,\n () => ({\n label: { purpose: 'Preset uses the Mongo id string as a compact label when the row is the anchor for self-serve and admin lists.' },\n layout: {\n purpose: 'Inline summary template (no named `layout.refs.sections` in billing presets) shows `isActive` and `_id`; `variantOverrides` wire subscription/invoice/usage/credit child tabs in org vs user parent views at different `orderIndex` values.',\n displayPurpose: 'Not a public directory — org-owner/org-admin or user self-serve billing surfaces; LIST/READ are org-owner/org-admin-gated API operations, while writes (auto-create + webhook sync) stay internal service-pipeline ops, not HTTP-exposed.',\n },\n views: {\n [BillingAccount_Operations.OPEN_CHECKOUT]: { purpose: 'Custom flow entry that behaves like a purchase wizard linked to the account.', whenToUse: '“Upgrade” or “Buy credits” in product UI when checkout is the next step.' },\n [BillingAccount_Operations.OPEN_PORTAL]: { purpose: 'Custom flow entry for hosted portal; non-addressable `views` entry in merged presets (still documented as surfaced op).', whenToUse: '“Manage payment method / invoices” in settings.' },\n [BillingAccount_Operations.GET_STATE]: { purpose: 'Aggregate “billing snapshot” for dashboards; not a CRUD read replacement.', whenToUse: 'Billing home that needs a denormalized bundle in one call.' },\n },\n }),\n );\n}\n\nexport const organizationBillingAccountsResourceSpecification = buildBillingAccountResourceSpecification(\n CoreResourceType.ORGANIZATION_BILLING_ACCOUNTS,\n 'ORGANIZATION_BILLING_ACCOUNTS',\n);\n\nexport const userBillingAccountsResourceSpecification = buildBillingAccountResourceSpecification(\n CoreResourceType.USER_BILLING_ACCOUNTS,\n 'USER_BILLING_ACCOUNTS',\n);\n"]}
|
|
1
|
+
{"version":3,"file":"billing-accounts.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/billing/resources/billing-accounts.resource.specification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AACvF,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE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,CAC/C,YAAwC,EACxC,UAA4C;IAE5C,MAAM,IAAI,GAAG,uBAAuB,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;IAC/D,MAAM,IAAI,GAAG,uBAAuB,CAAC,kBAAsD,EAAE,YAAY,EAAE,oBAAoB,CAAC,CAAC;IACjI,MAAM,KAAK,GAAG,uBAAuB,CAAC,mBAAuD,EAAE,YAAY,EAAE,qBAAqB,CAAC,CAAC;IACpI,OAAO,8CAA8C,CACnD,mCAAmC,CAAC,6BAA6B,CAAC,IAAI,CAAC,EAAE,6BAA6B,CAAC,KAAK,CAAC,CAAC,EAC9G,IAAI,EACJ,GAAG,EAAE,CAAC,CAAC;QACL,KAAK,EAAE,EAAE,OAAO,EAAE,+GAA+G,EAAE;QACnI,MAAM,EAAE;YACN,OAAO,EAAE,6OAA6O;YACtP,cAAc,EAAE,2OAA2O;SAC5P;QACD,KAAK,EAAE;YACL,CAAC,yBAAyB,CAAC,aAAa,CAAC,EAAE,EAAE,OAAO,EAAE,8EAA8E,EAAE,SAAS,EAAE,0EAA0E,EAAE;YAC7N,CAAC,yBAAyB,CAAC,WAAW,CAAC,EAAE,EAAE,OAAO,EAAE,yHAAyH,EAAE,SAAS,EAAE,iDAAiD,EAAE;YAC7O,CAAC,yBAAyB,CAAC,SAAS,CAAC,EAAE,EAAE,OAAO,EAAE,2EAA2E,EAAE,SAAS,EAAE,4DAA4D,EAAE;SACzM;KACF,CAAC,CACH,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,gDAAgD,GAAG,wCAAwC,CACtG,gBAAgB,CAAC,6BAA6B,EAC9C,+BAA+B,CAChC,CAAC;AAEF,MAAM,CAAC,MAAM,wCAAwC,GAAG,wCAAwC,CAC9F,gBAAgB,CAAC,qBAAqB,EACtC,uBAAuB,CACxB,CAAC","sourcesContent":["import { billingAdminPresets, billingMainPresets } from '@wildo-ai/presets-components';\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport type { ResourceUIBehaviorConfig } from '@wildo-ai/saas-frontend-lib/companion';\nimport { CodeDeclarationKind, CodeSymbolKind, FieldSemanticImportance } from '@wildo-ai/zod-decorators';\nimport {\n BillingAccount_Operations,\n BillingAccountBaseSchema,\n CoreResourceOperation as Op,\n CoreResourceType,\n ResourcePrimaryScope,\n billingAccountsPolymorphicFactories,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n mergeResourceFrontendConfigurations,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n} from '~wildo-specifications/_core';\nimport {\n BILLING_API_REFERENCE_PAGE_REQUEST,\n billingApiReferencePage,\n createBillingApiReferenceScopeExample,\n type BillingApiReferenceExampleScope,\n} from './billing-api-reference-examples';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\ntype BillingAccountResourceType = CoreResourceType.ORGANIZATION_BILLING_ACCOUNTS | CoreResourceType.USER_BILLING_ACCOUNTS;\ntype BillingAccountResourceTypeMember = 'ORGANIZATION_BILLING_ACCOUNTS' | 'USER_BILLING_ACCOUNTS';\n\nconst billingAccountResourcePrimaryScopeByResourceType: Record<BillingAccountResourceType, BillingApiReferenceExampleScope> = {\n [CoreResourceType.ORGANIZATION_BILLING_ACCOUNTS]: ResourcePrimaryScope.ORGANIZATIONS,\n [CoreResourceType.USER_BILLING_ACCOUNTS]: ResourcePrimaryScope.USER_SELF,\n};\n\ntype Cfg = ReturnType<(typeof billingAccountsPolymorphicFactories)[CoreResourceType.ORGANIZATION_BILLING_ACCOUNTS]>;\ntype Custom = NonNullable<Cfg['customOperation']>;\ntype Core = Cfg['coreOperations'][number];\ntype Main = typeof BillingAccountBaseSchema;\ntype BillAcctFrontend = ResourceUIBehaviorConfig<Custom, Core, Main>;\n\nfunction resolveBillingAccountUI(\n source: Partial<Record<string, unknown>>,\n resourceType: BillingAccountResourceType,\n sourceName: string,\n): BillAcctFrontend {\n const uiBehavior = source[resourceType] as BillAcctFrontend | undefined;\n if (!uiBehavior) {\n throw new Error(`Missing \"${resourceType}\" UI behavior in ${sourceName}.`);\n }\n return uiBehavior;\n}\n\nfunction buildBillingAccountBase(\n resourceType: BillingAccountResourceType,\n resourceTypeMemberName: BillingAccountResourceTypeMember,\n) {\n const exampleScope = createBillingApiReferenceScopeExample(\n billingAccountResourcePrimaryScopeByResourceType[resourceType],\n );\n const billingAccountExample = {\n _id: exampleScope.billingAccountId,\n isActive: true,\n metadata: { costCentre: 'customer-success' },\n createdAt: '2026-06-01T09:00:00.000Z',\n updatedAt: '2026-06-18T14:30:00.000Z',\n ...exampleScope.scopeIdentity,\n };\n const billingAccountSummaryExample = {\n _id: billingAccountExample._id,\n isActive: billingAccountExample.isActive,\n };\n\n return resourceSpecification<Custom, Core, Main>(\n billingAccountsPolymorphicFactories[resourceType],\n BillingAccountBaseSchema,\n ({ schemaShape }) => ({\n purpose:\n `Billing account for ${exampleScope.scopeLabel === 'organization' ? 'an organization' : 'a user'}: exposes activation state and safe metadata, and provides the entry point for checkout, the billing portal, and aggregated billing state.`,\n businessRole: 'Anchor row for subscriptions, invoices, credit pools, and self-serve `OPEN_CHECKOUT` / `OPEN_PORTAL` flows in user/org billing settings.',\n lifecycleRole:\n 'Created automatically the first time billing state is requested, then synchronized from billing-provider events. An inactive account remains readable for billing history but cannot start a new checkout or portal session. There is no client-facing create operation.',\n audience: LabelAudience.ADMIN,\n subDomain: EngineResourceSubDomain.BILLING,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'BillingAccountBaseSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactoryCollectionEntry: {\n collectionSymbol: { packageName: '@wildo-ai/saas-models', exportName: 'billingAccountsPolymorphicFactories', symbolKind: CodeSymbolKind.FACTORY },\n identifierField: 'collectionKey',\n identifierValue: resourceType,\n },\n resourceType: {\n enumDeclaration: { packageName: '@wildo-ai/saas-models', exportName: 'CoreResourceType', symbolKind: CodeSymbolKind.ENUM, declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM },\n memberName: resourceTypeMemberName,\n },\n operationVocabulary: {\n coreEnum: { packageName: '@wildo-ai/saas-models', exportName: 'CoreResourceOperation', symbolKind: CodeSymbolKind.ENUM, declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM },\n customEnum: { packageName: '@wildo-ai/saas-models', exportName: 'BillingAccount_Operations', symbolKind: CodeSymbolKind.ENUM, declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM },\n },\n frontendConfigurationSourceEntries: [\n { collectionSymbol: { packageName: '@wildo-ai/presets-components', exportName: 'billingMainPresets', symbolKind: CodeSymbolKind.UI_BEHAVIOR }, identifierField: 'collectionKey', identifierValue: resourceType },\n { collectionSymbol: { packageName: '@wildo-ai/presets-components', exportName: 'billingAdminPresets', symbolKind: CodeSymbolKind.UI_BEHAVIOR }, identifierField: 'collectionKey', identifierValue: resourceType },\n ],\n notes: ['Two variants under `BILLING_SCOPE_VARIANTS` — org primary catalog scope is `ORGANIZATIONS`; user row is `USER_SELF`.'],\n },\n fields: {\n _id: schemaShape._id.stringSpec({ meaning: 'Document id in Mongo for this billing account row.', importance: FieldSemanticImportance.PRIMARY, semanticRole: 'identifier' }),\n isActive: schemaShape.isActive.booleanSpec({ meaning: 'Whether the account should participate in new purchases and portal sessions.', importance: FieldSemanticImportance.PRIMARY }),\n providerRef: schemaShape.providerRef.stringSpec({ meaning: 'Which billing adapter integration backs this account (e.g. stripe) — backend-only in typical responses.', whyItMatters: 'Drives which SDK and webhook namespace hydrate the row.' }),\n providerCustomerId: schemaShape.providerCustomerId.stringSpec({ meaning: 'Provider-side customer id; master link for subscription and invoice fetch.', whyItMatters: 'Without it the row cannot call provider APIs for portal or state.', importance: FieldSemanticImportance.PRIMARY }),\n metadata: schemaShape.metadata.objectSpec({ meaning: 'Key/value tags mirrored to the provider for analytics or tax hints — not the full address book.' }),\n createdAt: schemaShape.createdAt.dateSpec({ meaning: 'When the row was first created.', temporalRole: 'creation' }),\n updatedAt: schemaShape.updatedAt.dateSpec({ meaning: 'Last backend sync with provider or local patch.', temporalRole: 'modified' }),\n },\n operations: {\n [Op.READ]: {\n purpose: 'Load the account row and derived UI flags for settings surfaces.',\n outcome: 'Owner sees the account id, activation state, and non-sensitive metadata needed for support correlation. Provider customer identifiers remain backend-only.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The billing account was found and its public id, activation state, and metadata are returned. Backend-only provider identifiers are omitted.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No billing account exists for the supplied id in the caller’s scope.' },\n ],\n idempotent: true,\n examples: [{\n title: `Inspect an active ${exampleScope.scopeLabel} billing account`,\n response: billingAccountExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n examples: [{\n title: 'Inspect the billing account with available relationship context',\n response: billingAccountExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n examples: [{\n title: 'Inspect the compact billing-account summary',\n response: billingAccountSummaryExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n },\n [Op.LIST]: {\n purpose: 'List billing account rows in org or user scope (often singleton).',\n outcome: 'Picker or table for rare multi-account orgs in admin.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty, often singleton) page of billing accounts for the scope.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Browse billing accounts for the current scope',\n request: BILLING_API_REFERENCE_PAGE_REQUEST,\n response: billingApiReferencePage([billingAccountExample]),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n examples: [{\n title: 'Browse billing accounts with relationship context',\n request: BILLING_API_REFERENCE_PAGE_REQUEST,\n response: billingApiReferencePage([billingAccountExample]),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n examples: [{\n title: 'Browse compact billing-account summaries',\n request: BILLING_API_REFERENCE_PAGE_REQUEST,\n response: billingApiReferencePage([billingAccountSummaryExample]),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n },\n [Op.CREATE]: {\n purpose: 'System-context bootstrap when a scope first needs a billing account: auto-created in-process by the billing service (INTERNAL_CALL, no HTTP surface) through the `systemAccessPolicy.create` opt-in, which injects the scope FK via the execution context map.',\n outcome: 'New row for the scope after provider customer linkage in implementation.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'A billing account was provisioned for the scope (with its provider customer linked) and is returned with its server-assigned id.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The account payload fails schema validation (e.g. missing `providerRef`).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the entitlement to provision a billing account in this scope.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'A billing account already links this scope to the provider customer (the scope→customer link is unique).', errorCode: 'BILLING_ACCOUNT_EXISTS' },\n ],\n idempotent: false,\n examples: [\n {\n title: 'Provision a Stripe-backed billing account for a scope',\n request: {\n providerRef: 'stripe',\n providerCustomerId: 'cus_01HX2…',\n isActive: true,\n metadata: { tier: 'pro' },\n },\n response: {\n _id: 'billacct_01HX2…',\n providerRef: 'stripe',\n providerCustomerId: 'cus_01HX2…',\n isActive: true,\n },\n forStatus: HttpResponseStatusCode.CREATED_201,\n },\n ],\n },\n [Op.UPDATE]: {\n purpose: 'Metadata or activation toggles; heavy provider writes often go through webhooks or custom ops instead.',\n outcome: 'Patched `metadata` or `isActive` per DTO in factory config.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The account’s `metadata` / `isActive` fields were patched and the updated row is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The edited fields fail schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the entitlement to mutate this billing account.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No billing account exists for the supplied id in the caller’s scope.' },\n ],\n idempotent: true,\n },\n [Op.DELETE]: {\n purpose: 'Dangerous off-boarding: in-process hard removal of the account row (INTERNAL_CALL, no HTTP surface). The product off-boarding path is the soft retire (`isActive: false`), not this.',\n outcome: 'Row removed — but only once the account has no retained financial children left. The dependents check is enforced by the engine before the delete, not left to the caller.',\n responseStatuses: [\n { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The billing account had no retained financial children and was removed; no body is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the elevated entitlement required for billing-account off-boarding.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No billing account exists for the supplied id (or it was already removed).' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The account still has retained financial children — subscriptions, invoice refs, usage records, or credit pools — that reference it. Those rows survive scope and account deletion by design (billing-retention decision), and this account holds the only local `providerCustomerId` that maps them back to the provider customer, so the delete fails closed. The blocking families are named in the error context.', errorCode: 'BILLING_ACCOUNT_HAS_DEPENDENTS' },\n ],\n idempotent: true,\n },\n [BillingAccount_Operations.OPEN_CHECKOUT]: {\n operationId: BillingAccount_Operations.OPEN_CHECKOUT,\n purpose: 'Start a hosted checkout session (product+price) for the connected customer.',\n outcome: 'Redirect URL or client secret to complete purchase in the provider UI.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A provider checkout session was created; the redirect URL / client secret to complete the purchase is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The requested product/price is missing or malformed in the checkout request.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'A caller-supplied `metadata` key uses the framework-reserved `wildo_` namespace, or `quantity` is not an integer within the supported bound. Reserved keys are refused rather than dropped: that namespace carries the values the completion webhook reads back to decide which account is credited and by how much.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: '`priceId` names a price whose `productId` is not `productKey`’s product. The provider is billed the PRICE while the purchase is recorded against the PRODUCT, so an unmatched pair would deliver one product’s goods at another’s price.', errorCode: 'BILLING_PRICE_PRODUCT_MISMATCH' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller does not own this billing account and may not open checkout for it.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No billing account exists for the supplied id, or the referenced price is not in the catalog.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The account is inactive or has no linked provider customer, so a checkout session cannot be opened.' },\n ],\n idempotent: false,\n examples: [{\n title: 'Open checkout for the Pro plan',\n request: {\n productKey: 'pro_plan',\n priceId: 'price_pro_monthly',\n successUrl: 'https://app.example.test/settings/billing?checkout=success',\n cancelUrl: 'https://app.example.test/settings/billing?checkout=cancelled',\n quantity: 25,\n promotionCode: 'WELCOME20',\n metadata: { campaign: 'customer-expansion' },\n },\n response: {\n url: 'https://billing.example.test/checkout/cs_01HX2EXAMPLE',\n sessionId: 'cs_01HX2EXAMPLE',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [BillingAccount_Operations.OPEN_PORTAL]: {\n operationId: BillingAccount_Operations.OPEN_PORTAL,\n purpose: 'Open the provider customer portal (payment methods, cancel at period end) with a return URL.',\n outcome: 'Session URL for self-serve management.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A provider customer-portal session was created; its session URL is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller does not own this billing account and may not open its portal.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No billing account exists for the supplied id in the caller’s scope.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The account has no linked provider customer, so a portal session cannot be opened.' },\n ],\n idempotent: false,\n examples: [{\n title: 'Open the hosted billing portal',\n request: { returnUrl: 'https://app.example.test/settings/billing' },\n response: { url: 'https://billing.example.test/portal/bps_01HX2EXAMPLE' },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [BillingAccount_Operations.GET_STATE]: {\n operationId: BillingAccount_Operations.GET_STATE,\n purpose: 'Collection-scoped aggregate read of account + subscriptions + catalog slices for billing home widgets. The billing service auto-creates the scope’s account when none exists.',\n outcome: 'Convenience bundle for a single call instead of N reads in the client; the absence of an existing account is a bootstrap condition, not a 404.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The denormalized billing snapshot (account + subscriptions + catalog slices) is returned in one bundle.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The authenticated request context does not contain the scope identifier required to resolve billing state.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The requested scope does not match the caller’s authenticated scope.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'Billing is not enabled for this scope type.', errorCode: 'BILLING_SCOPE_NOT_ENABLED' },\n ],\n idempotent: true,\n examples: [{\n title: 'Load the billing home state before a subscription exists',\n response: {\n billingAccount: {\n _id: billingAccountExample._id,\n isActive: true,\n createdAt: billingAccountExample.createdAt,\n updatedAt: billingAccountExample.updatedAt,\n },\n subscription: null,\n products: [],\n prices: [],\n invoices: [],\n usage: { byProduct: {} },\n creditPools: {},\n activePromotions: [],\n scopeType: exampleScope.scopeType,\n },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n businessConstraints: [\n 'Contact, tax, and payment instruments live in the provider — do not expect them duplicated on this document.',\n 'Checkout-session metadata is split by trust: keys prefixed `wildo_` are framework-authoritative (they are what the signed completion webhook reads back to credit an account), and caller-supplied keys in that namespace are refused at the request DTO. A provider signature proves the provider sent the echoed metadata, never that the framework wrote it, so the completion handler re-derives the billing account from the provider CUSTOMER and only cross-checks the echoed value.',\n 'Polymorphic scope FKs (`organizationId` / `userId`) are injected on concrete variant schemas, not on `BillingAccountBaseSchema` itself.',\n 'The account outlives its scope: deleting the owning org or user does NOT cascade to this row, and its financial children (subscriptions, invoice refs, usage records, credit pools) are retained too. Consequently a hard DELETE is refused with 409 while any of those children remain — this row carries the only local `providerCustomerId`, so removing it would leave the retained financial records unreconcilable against the provider.',\n ],\n }),\n { resourcePrimaryScope: billingAccountResourcePrimaryScopeByResourceType[resourceType] },\n );\n}\n\nfunction buildBillingAccountResourceSpecification(\n resourceType: BillingAccountResourceType,\n memberName: BillingAccountResourceTypeMember,\n) {\n const base = buildBillingAccountBase(resourceType, memberName);\n const main = resolveBillingAccountUI(billingMainPresets as Partial<Record<string, unknown>>, resourceType, 'billingMainPresets');\n const admin = resolveBillingAccountUI(billingAdminPresets as Partial<Record<string, unknown>>, resourceType, 'billingAdminPresets');\n return resourceSpecificationFromFrontendConfiguration(\n mergeResourceFrontendConfigurations(resourceFrontendConfiguration(main), resourceFrontendConfiguration(admin)),\n base,\n () => ({\n label: { purpose: 'Preset uses the Mongo id string as a compact label when the row is the anchor for self-serve and admin lists.' },\n layout: {\n purpose: 'Inline summary template (no named `layout.refs.sections` in billing presets) shows `isActive` and `_id`; `variantOverrides` wire subscription/invoice/usage/credit child tabs in org vs user parent views at different `orderIndex` values.',\n displayPurpose: 'Not a public directory — org-owner/org-admin or user self-serve billing surfaces; LIST/READ are org-owner/org-admin-gated API operations, while writes (auto-create + webhook sync) stay internal service-pipeline ops, not HTTP-exposed.',\n },\n views: {\n [BillingAccount_Operations.OPEN_CHECKOUT]: { purpose: 'Custom flow entry that behaves like a purchase wizard linked to the account.', whenToUse: '“Upgrade” or “Buy credits” in product UI when checkout is the next step.' },\n [BillingAccount_Operations.OPEN_PORTAL]: { purpose: 'Custom flow entry for hosted portal; non-addressable `views` entry in merged presets (still documented as surfaced op).', whenToUse: '“Manage payment method / invoices” in settings.' },\n [BillingAccount_Operations.GET_STATE]: { purpose: 'Aggregate “billing snapshot” for dashboards; not a CRUD read replacement.', whenToUse: 'Billing home that needs a denormalized bundle in one call.' },\n },\n }),\n );\n}\n\nexport const organizationBillingAccountsResourceSpecification = buildBillingAccountResourceSpecification(\n CoreResourceType.ORGANIZATION_BILLING_ACCOUNTS,\n 'ORGANIZATION_BILLING_ACCOUNTS',\n);\n\nexport const userBillingAccountsResourceSpecification = buildBillingAccountResourceSpecification(\n CoreResourceType.USER_BILLING_ACCOUNTS,\n 'USER_BILLING_ACCOUNTS',\n);\n"]}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { CoreResourceOperation as Op, CreditPool_Operations } from '@wildo-ai/saas-models';
|
|
2
|
-
export declare const organizationCreditPoolsResourceSpecification: import("../../../_core").ResourceSpecificationConfig<typeof CreditPool_Operations, Op.READ | Op.UPDATE | Op.CREATE | Op.LIST, import("zod").ZodObject<{
|
|
2
|
+
export declare const organizationCreditPoolsResourceSpecification: import("../../../_core").ResourceSpecificationConfig<typeof CreditPool_Operations, Op.READ | Op.UPDATE | Op.UPDATE_MANY | Op.CREATE | Op.LIST, import("zod").ZodObject<{
|
|
3
3
|
_id: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>;
|
|
4
4
|
billingAccountId: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>>>;
|
|
5
5
|
poolKey: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>>>>;
|
|
6
|
-
available: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("
|
|
7
|
-
totalPurchased: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("
|
|
8
|
-
totalConsumed: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("
|
|
6
|
+
available: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("zod").ZodNumber>>>;
|
|
7
|
+
totalPurchased: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("zod").ZodNumber>>>;
|
|
8
|
+
totalConsumed: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("zod").ZodNumber>>>;
|
|
9
9
|
createdAt: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("zod").ZodDate>>>;
|
|
10
10
|
updatedAt: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("zod").ZodDate>>>;
|
|
11
11
|
}, import("zod/v4/core").$strip>>;
|
|
12
|
-
export declare const userCreditPoolsResourceSpecification: import("../../../_core").ResourceSpecificationConfig<typeof CreditPool_Operations, Op.READ | Op.UPDATE | Op.CREATE | Op.LIST, import("zod").ZodObject<{
|
|
12
|
+
export declare const userCreditPoolsResourceSpecification: import("../../../_core").ResourceSpecificationConfig<typeof CreditPool_Operations, Op.READ | Op.UPDATE | Op.UPDATE_MANY | Op.CREATE | Op.LIST, import("zod").ZodObject<{
|
|
13
13
|
_id: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>;
|
|
14
14
|
billingAccountId: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>>>;
|
|
15
15
|
poolKey: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>>>>;
|
|
16
|
-
available: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("
|
|
17
|
-
totalPurchased: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("
|
|
18
|
-
totalConsumed: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("
|
|
16
|
+
available: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("zod").ZodNumber>>>;
|
|
17
|
+
totalPurchased: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("zod").ZodNumber>>>;
|
|
18
|
+
totalConsumed: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("zod").ZodNumber>>>;
|
|
19
19
|
createdAt: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("zod").ZodDate>>>;
|
|
20
20
|
updatedAt: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("zod").ZodDate>>>;
|
|
21
21
|
}, import("zod/v4/core").$strip>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credit-pools.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/billing/resources/credit-pools.resource.specification.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,qBAAqB,IAAI,EAAE,EAE3B,qBAAqB,EAItB,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"credit-pools.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/billing/resources/credit-pools.resource.specification.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,qBAAqB,IAAI,EAAE,EAE3B,qBAAqB,EAItB,MAAM,uBAAuB,CAAC;AA8L/B,eAAO,MAAM,4CAA4C;;;;;;;;;iCAGxD,CAAC;AAEF,eAAO,MAAM,oCAAoC;;;;;;;;;iCAA+E,CAAC"}
|
|
@@ -3,6 +3,7 @@ import { LabelAudience } from '@wildo-ai/presets-components-models';
|
|
|
3
3
|
import { CodeDeclarationKind, CodeSymbolKind, FieldSemanticImportance } from '@wildo-ai/zod-decorators';
|
|
4
4
|
import { CoreResourceOperation as Op, CoreResourceType, CreditPool_Operations, ResourcePrimaryScope, CreditPoolSchema, creditPoolsPolymorphicFactories, } 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
|
const poolResourcePrimaryScopeByResourceType = {
|
|
7
8
|
[CoreResourceType.ORGANIZATION_CREDIT_POOLS]: ResourcePrimaryScope.ORGANIZATIONS,
|
|
8
9
|
[CoreResourceType.USER_CREDIT_POOLS]: ResourcePrimaryScope.USER_SELF,
|
|
@@ -20,6 +21,7 @@ function buildCreditPoolBase(resourceType, memberName) {
|
|
|
20
21
|
businessRole: 'Holds the spendable balance used by feature gates. BOTH balance mutations are system-only (INTERNAL_CALL, no client route): `CONSUME` decrements as a metered capability is used, `TOP_UP` increments after a purchase webhook. Neither is client-initiated.',
|
|
21
22
|
lifecycleRole: 'Row created on first need; monotonic counters updated by service layer — not a general ledger in Wildo.',
|
|
22
23
|
audience: LabelAudience.ADMIN,
|
|
24
|
+
subDomain: EngineResourceSubDomain.BILLING,
|
|
23
25
|
codeHandling: {
|
|
24
26
|
mainSchema: { packageName: '@wildo-ai/saas-models', exportName: 'CreditPoolSchema', symbolKind: CodeSymbolKind.SCHEMA, declarationKind: CodeDeclarationKind.ZOD_SCHEMA },
|
|
25
27
|
resourceFactoryCollectionEntry: {
|