@wildo-ai/saas-models 1.1.3 → 1.1.4
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/esm/__tests__/setup.d.ts.map +1 -1
- package/dist/esm/_inspect.d.ts.map +1 -1
- package/dist/esm/applications/application-metadata.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/applications/application-subject.shared.schemas.d.ts.map +1 -1
- package/dist/esm/applications/application-versions.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/applications/applications-context.schemas.d.ts.map +1 -1
- package/dist/esm/applications/applications.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/applications/applications.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/applications/applications.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-account.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-account.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-configuration.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-configuration.shared.schemas.js.map +1 -1
- package/dist/esm/billing/billing-enums.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-enums.shared.schemas.js.map +1 -1
- package/dist/esm/billing/billing-types.shared.schemas.d.ts +1 -0
- package/dist/esm/billing/billing-types.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-types.shared.schemas.js +45 -0
- package/dist/esm/billing/billing-types.shared.schemas.js.map +1 -1
- package/dist/esm/billing/credit-pool.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/credit-pool.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/invoice-ref.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/invoice-ref.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/price.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/price.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/price.shared.schemas.js.map +1 -1
- package/dist/esm/billing/product-behavior-policy.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/product-behavior-policy.shared.schemas.js.map +1 -1
- package/dist/esm/billing/product-definition.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/product.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/product.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/product.shared.schemas.js.map +1 -1
- package/dist/esm/billing/promotions.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/promotions.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/referral.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/referral.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/subscription.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/subscription.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/billing/subscription.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/usage-record.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/usage-record.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/usage-record.shared.schemas.js.map +1 -1
- package/dist/esm/charts/aggregation-query.shared.schemas.d.ts.map +1 -1
- package/dist/esm/charts/chart-definition-builder.shared.d.ts.map +1 -1
- package/dist/esm/companion/provider-discovery.shared.schemas.d.ts +2 -0
- package/dist/esm/companion/provider-discovery.shared.schemas.d.ts.map +1 -1
- package/dist/esm/companion/provider-discovery.shared.schemas.js.map +1 -1
- package/dist/esm/companion/shared-library-companion.shared.definitions.d.ts.map +1 -1
- package/dist/esm/companion-exports.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/compliance/audit-trails/audit-log-sink.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.d.ts +178 -6
- package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.js +326 -4
- package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.js.map +1 -1
- package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.js +22 -0
- package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.js.map +1 -1
- package/dist/esm/compliance/documents/governed-documents.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/client-storage.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/data-retention.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/impersonalization-scrub.shared.utils.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/impersonalization.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.d.ts +27 -0
- package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.js +36 -2
- package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/personal-data-category.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/personal-data-declaration.shared.utils.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/privacy.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/privacy.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/redaction.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/redaction.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/retention-schedule.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/subject-export-render.shared.utils.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/subject-export.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/subject-export.shared.schemas.js.map +1 -1
- package/dist/esm/config/analytics-value-moments.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/analytics-value-moments.shared.schemas.js.map +1 -1
- package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/auth-config-resolution.shared.utils.d.ts.map +1 -1
- package/dist/esm/config/auth-config-resolution.shared.utils.js.map +1 -1
- package/dist/esm/config/brand-assets.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/entity-identity-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/entity-identity-config.shared.schemas.js.map +1 -1
- package/dist/esm/config/frontend/chart-definition.shared.schemas.d.ts +14 -14
- package/dist/esm/config/frontend/chart-definition.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/frontend/chart-registration-alignment.shared.d.ts +139 -3
- package/dist/esm/config/frontend/chart-registration-alignment.shared.d.ts.map +1 -1
- package/dist/esm/config/frontend/chart-registration-alignment.shared.js +151 -4
- package/dist/esm/config/frontend/chart-registration-alignment.shared.js.map +1 -1
- package/dist/esm/config/frontend/navigation.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/frontend/onboarding.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/registration-acquisition-policy.shared.utils.d.ts.map +1 -1
- package/dist/esm/config-authoring.entry.d.ts.map +1 -1
- package/dist/esm/crdt/crdt-merge.shared.utils.d.ts.map +1 -1
- package/dist/esm/data-seeding/data-seeding-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/errors/errors.custom-message-ref.shared.definitions.d.ts +6 -0
- package/dist/esm/errors/errors.custom-message-ref.shared.definitions.d.ts.map +1 -1
- package/dist/esm/errors/errors.custom-message-ref.shared.definitions.js +6 -0
- package/dist/esm/errors/errors.custom-message-ref.shared.definitions.js.map +1 -1
- package/dist/esm/errors/errors.shared.definitions.d.ts.map +1 -1
- package/dist/esm/errors/errors.shared.schemas.d.ts.map +1 -1
- package/dist/esm/errors/errors.shared.utils.d.ts.map +1 -1
- package/dist/esm/external-data/external-data-pipeline.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-data/external-data-pipeline.shared.schemas.js.map +1 -1
- package/dist/esm/external-data.exports.d.ts.map +1 -1
- package/dist/esm/external-providers/compose-provider-registry.shared.d.ts.map +1 -1
- package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts +7 -0
- package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/engine-capabilities.shared.schemas.js +7 -0
- package/dist/esm/external-providers/engine-capabilities.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/engine-capability-resolution-mode.shared.d.ts.map +1 -1
- package/dist/esm/external-providers/engine-capability-resolution-mode.shared.js.map +1 -1
- package/dist/esm/external-providers/external-providers.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts +4 -0
- package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/frontend-capability-runtime.shared.types.d.ts.map +1 -1
- package/dist/esm/external-providers/frontend-capability-runtime.shared.types.js.map +1 -1
- package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.d.ts +57 -0
- package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.js +29 -0
- package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/frontend-provider-public-config.shared.d.ts +175 -0
- package/dist/esm/external-providers/frontend-provider-public-config.shared.d.ts.map +1 -0
- package/dist/esm/external-providers/frontend-provider-public-config.shared.js +207 -0
- package/dist/esm/external-providers/frontend-provider-public-config.shared.js.map +1 -0
- package/dist/esm/external-providers/provider-capability.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-capability.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.d.ts +18 -8
- package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.js +10 -4
- package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.d.ts +165 -0
- package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.d.ts.map +1 -0
- package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.js +39 -0
- package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.js.map +1 -0
- package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/provider-metadata.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-metadata.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/provider-protocol.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-protocol.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/provider-tier-rule.shared.utils.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-tier-rule.shared.utils.js.map +1 -1
- package/dist/esm/external-providers/provider-usage-pricing.shared.schemas.d.ts.map +1 -1
- package/dist/esm/features/application-features.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/features/application-features.shared.resources-config.schemas.js +12 -0
- package/dist/esm/features/application-features.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/features/core-feature-definitions.shared.d.ts.map +1 -1
- package/dist/esm/features/core-feature-definitions.shared.js.map +1 -1
- package/dist/esm/features/feature-builders.shared.d.ts.map +1 -1
- package/dist/esm/features/feature-builders.shared.js.map +1 -1
- package/dist/esm/features/feature-definition.shared.schemas.d.ts.map +1 -1
- package/dist/esm/features/feature-registry.shared.d.ts.map +1 -1
- package/dist/esm/features/feature-resolution.shared.schemas.d.ts.map +1 -1
- package/dist/esm/features/scope-features.shared.schemas.d.ts.map +1 -1
- package/dist/esm/features/user-features.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/features/user-features.shared.resources-config.schemas.js +12 -0
- package/dist/esm/features/user-features.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/files/file-remote-reference-link.shared.schemas.d.ts +73 -0
- package/dist/esm/files/file-remote-reference-link.shared.schemas.d.ts.map +1 -0
- package/dist/esm/files/file-remote-reference-link.shared.schemas.js +62 -0
- package/dist/esm/files/file-remote-reference-link.shared.schemas.js.map +1 -0
- package/dist/esm/files/file-upload-grant.shared.schemas.d.ts.map +1 -1
- package/dist/esm/files/file-upload-grant.shared.schemas.js.map +1 -1
- package/dist/esm/files/files.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/files/files.shared.schemas.d.ts.map +1 -1
- package/dist/esm/files/files.shared.schemas.js.map +1 -1
- package/dist/esm/files/files.shared.utils.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a-push-delivery-log.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a-push-delivery-log.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a-token-budget-state.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a-token-budget-state.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/actors.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/actors.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/agent-traceability.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/agents.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/agents.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/apps-blueprint/apps-blueprint.shared.schemas.d.ts +6 -6
- package/dist/esm/flows-actors/apps-blueprint/apps-blueprint.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/apps-blueprint/artifacts.apps-blueprint.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/deliberation.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/deliberation.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/flows-actors-execution.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/flows-actors-task.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors-task.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors.io.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors.io.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/flows-actors.system.shared.definitions.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors.system.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors.system.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/flows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/mcp-servers.shared.schemas.d.ts +2 -0
- package/dist/esm/flows-actors/mcp-servers.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/mcp-servers.shared.schemas.js +11 -0
- package/dist/esm/flows-actors/mcp-servers.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/actions.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/catalog.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/continuity-identifiers.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/portable-primitives.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/prompt-ir.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/task-continuity-binding.actors.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/tasks.actors.shared.schemas.d.ts.map +1 -1
- package/dist/esm/frontend-definitions/settings-destination-ref.definitions.d.ts +112 -0
- package/dist/esm/frontend-definitions/settings-destination-ref.definitions.d.ts.map +1 -0
- package/dist/esm/frontend-definitions/settings-destination-ref.definitions.js +113 -0
- package/dist/esm/frontend-definitions/settings-destination-ref.definitions.js.map +1 -0
- package/dist/esm/guidance/guidance-flow.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/guidance-state.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/guidance-state.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/guidance-state.shared.utils.d.ts.map +1 -1
- package/dist/esm/guidance/guidance-state.shared.utils.js.map +1 -1
- package/dist/esm/guidance/lifecycle-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/lifecycle-state.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/lifecycle-state.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/milestone-builders.shared.d.ts.map +1 -1
- package/dist/esm/guidance/milestone-definition.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/progression-state.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/progression-state.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/progression-state.shared.schemas.js.map +1 -1
- package/dist/esm/http-api-binding/http-api-binding-id.shared.utils.d.ts.map +1 -1
- package/dist/esm/http-api-binding/http-api-binding.shared.schemas.d.ts.map +1 -1
- package/dist/esm/http-api-binding/http-api-binding.shared.schemas.js.map +1 -1
- package/dist/esm/i18n/labelling.dto.shared.schemas.d.ts.map +1 -1
- package/dist/esm/index.d.ts +6 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +6 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/meta-workflows.exports.d.ts.map +1 -1
- package/dist/esm/monitoring/monitoring.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/email/email-context.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/email/email-template-registry.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/email/email-template-registry.shared.schemas.js.map +1 -1
- package/dist/esm/notifications/email/email-template.shared.enums.d.ts.map +1 -1
- package/dist/esm/notifications/email/email-template.shared.enums.js.map +1 -1
- package/dist/esm/notifications/m2m/m2m-webhook-delivery-contract.shared.d.ts.map +1 -1
- package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/notifications/m2m/webhook-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/m2m/webhook-config.shared.schemas.js.map +1 -1
- package/dist/esm/notifications/notification-badges.core.definitions.d.ts.map +1 -1
- package/dist/esm/notifications/notification-badges.core.definitions.js.map +1 -1
- package/dist/esm/notifications/notification-badges.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/notification-badges.schemas.js.map +1 -1
- package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/notifications.shared.schemas.d.ts +51 -0
- package/dist/esm/notifications/notifications.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/notifications.shared.schemas.js +51 -0
- package/dist/esm/notifications/notifications.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-features.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-features.shared.resources-config.schemas.js +13 -0
- package/dist/esm/organizations/organization-features.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-members.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-members.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-notifications.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-notifications.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-notifications.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-preferences.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-preferences.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-preferences.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-profile.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-profile.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-profile.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-unit-inheritance.shared.d.ts.map +1 -1
- package/dist/esm/organizations/organization-unit-members.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-unit-members.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-unit-narrowing-decision.shared.d.ts.map +1 -1
- package/dist/esm/organizations/organization-unit-narrowing.example.d.ts.map +1 -1
- package/dist/esm/organizations/organization-unit-narrowing.shared.d.ts.map +1 -1
- package/dist/esm/organizations/organization-unit-narrowing.shared.js.map +1 -1
- package/dist/esm/organizations/organization-units.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-units.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organizations.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organizations.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/organizations/organizations.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/tenant-teardown-config.shared.schemas.d.ts +13 -0
- package/dist/esm/organizations/tenant-teardown-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/tenant-teardown-config.shared.schemas.js +13 -0
- package/dist/esm/organizations/tenant-teardown-config.shared.schemas.js.map +1 -1
- package/dist/esm/provider-registration-runtime.exports.d.ts.map +1 -1
- package/dist/esm/public-runtime/index.d.ts +22 -0
- package/dist/esm/public-runtime/index.d.ts.map +1 -1
- package/dist/esm/public-runtime/index.js +14 -0
- package/dist/esm/public-runtime/index.js.map +1 -1
- package/dist/esm/queue/jobs.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/queue/jobs.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/queue/jobs.shared.schemas.d.ts.map +1 -1
- package/dist/esm/queue/jobs.shared.schemas.js.map +1 -1
- package/dist/esm/queue/jobs.shared.utils.d.ts.map +1 -1
- package/dist/esm/queue/queues.shared.schemas.d.ts.map +1 -1
- package/dist/esm/queue/queues.shared.utils.d.ts.map +1 -1
- package/dist/esm/requests/manual-controllers-routes-documentation.d.ts.map +1 -1
- package/dist/esm/requests/manual-controllers-routes-documentation.js +57 -3
- package/dist/esm/requests/manual-controllers-routes-documentation.js.map +1 -1
- package/dist/esm/requests/manual-controllers-routes-urls.d.ts +47 -0
- package/dist/esm/requests/manual-controllers-routes-urls.d.ts.map +1 -1
- package/dist/esm/requests/manual-controllers-routes-urls.js +51 -0
- package/dist/esm/requests/manual-controllers-routes-urls.js.map +1 -1
- package/dist/esm/requests/rate-limits.shared.schemas.d.ts.map +1 -1
- package/dist/esm/requests/rate-limits.shared.schemas.js.map +1 -1
- package/dist/esm/requests/websocket.shared.schemas.d.ts +9 -7
- package/dist/esm/requests/websocket.shared.schemas.d.ts.map +1 -1
- package/dist/esm/requests/websocket.shared.schemas.js +17 -0
- package/dist/esm/requests/websocket.shared.schemas.js.map +1 -1
- package/dist/esm/resources/child-operations.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/context-policy.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/relationship-display.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/resources-config.shared.factory.d.ts.map +1 -1
- package/dist/esm/resources/resources-config.shared.factory.js +98 -5
- package/dist/esm/resources/resources-config.shared.factory.js.map +1 -1
- package/dist/esm/resources/resources-config.shared.schemas.d.ts +48 -1
- package/dist/esm/resources/resources-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/resources-config.shared.schemas.js.map +1 -1
- package/dist/esm/resources/resources-registry.shared.core.definitions.d.ts.map +1 -1
- package/dist/esm/resources/resources-registry.shared.core.definitions.js +54 -0
- package/dist/esm/resources/resources-registry.shared.core.definitions.js.map +1 -1
- package/dist/esm/resources/resources-relationships.shared.factory.d.ts.map +1 -1
- package/dist/esm/resources/resources-relationships.shared.factory.js.map +1 -1
- package/dist/esm/resources/resources-serialization.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/resources.shared.core.definitions.d.ts +17 -0
- package/dist/esm/resources/resources.shared.core.definitions.d.ts.map +1 -1
- package/dist/esm/resources/resources.shared.core.definitions.js +18 -0
- package/dist/esm/resources/resources.shared.core.definitions.js.map +1 -1
- package/dist/esm/resources/resources.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/resources.shared.schemas.js.map +1 -1
- package/dist/esm/resources/resources.shared.utils.d.ts +32 -7
- package/dist/esm/resources/resources.shared.utils.d.ts.map +1 -1
- package/dist/esm/resources/resources.shared.utils.js +32 -7
- package/dist/esm/resources/resources.shared.utils.js.map +1 -1
- package/dist/esm/resources/utils/collection-export.shared.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/composition-cascade-deletability.validation.d.ts.map +1 -1
- package/dist/esm/resources/utils/composition-seedability.validation.d.ts.map +1 -1
- package/dist/esm/resources/utils/context-addressed-composition-singleton.shared.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/duplicate-relationship-registration.validation.d.ts.map +1 -1
- package/dist/esm/resources/utils/field-value-disclosure.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/field-value-disclosure.utils.js.map +1 -1
- package/dist/esm/resources/utils/persistence-adapter-discrimination.shared.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/repository-dto-builder.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/required-fk-fillability.validation.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-operation-type-guards.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.factory.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.relationships.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.schemas.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-subtree.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-config-context-needs.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-config-operations.path.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-config-operations.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-serialization.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-summary.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-summary.utils.js.map +1 -1
- package/dist/esm/resources/utils/schema-family-builder.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/schema-type-inference.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/schema-type-utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/schema-variant-resolver.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/shared-persistence-collection.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/shared-persistence-collection.utils.js.map +1 -1
- package/dist/esm/resources/utils/templatable-file-fields.shared.utils.d.ts.map +1 -1
- package/dist/esm/runtime/domain-module.shared.definitions.d.ts.map +1 -1
- package/dist/esm/runtime/domain-module.shared.definitions.js.map +1 -1
- package/dist/esm/runtime/execution-context.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/api-keys/api-keys.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/anonymous-session/anonymous-session.shared.contract.d.ts.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts +1 -1
- package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.dto.schemas.js.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.schemas.js.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.utils.d.ts.map +1 -1
- package/dist/esm/security/authentications/consumable-token.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/consumable-token.shared.schemas.js.map +1 -1
- package/dist/esm/security/authentications/cross-frontend-handoff.shared.dto.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/password-reset.shared.dto.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/registration.shared.dto.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/registration.shared.dto.schemas.js.map +1 -1
- package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.d.ts.map +1 -1
- package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.js.map +1 -1
- package/dist/esm/security/authentications/scim/scim-tokens.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/scim/scim-tokens.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/siem/siem-delivery-reliability-contract.shared.d.ts.map +1 -1
- package/dist/esm/security/authentications/siem/siem-delivery-reliability-contract.shared.js.map +1 -1
- package/dist/esm/security/authentications/siem/siem-export-config.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.d.ts +3 -3
- package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.js +35 -5
- package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/authentications/sso/sso-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/sso/sso-config.shared.schemas.js.map +1 -1
- package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.d.ts +2 -0
- package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.js +15 -0
- package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.js.map +1 -1
- package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.d.ts +45 -2
- package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.js +45 -2
- package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.js.map +1 -1
- package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.d.ts +35 -0
- package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.js +257 -0
- package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/security/authorizations/application-access-grants.shared.schemas.d.ts +143 -0
- package/dist/esm/security/authorizations/application-access-grants.shared.schemas.d.ts.map +1 -0
- package/dist/esm/security/authorizations/application-access-grants.shared.schemas.js +219 -0
- package/dist/esm/security/authorizations/application-access-grants.shared.schemas.js.map +1 -0
- package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.d.ts +23 -0
- package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.js +24 -0
- package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.js.map +1 -1
- package/dist/esm/security/authorizations/roles.shared.defaults.d.ts.map +1 -1
- package/dist/esm/security/authorizations/roles.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authorizations/roles.shared.utils.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.d.ts +57 -0
- package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js +44 -0
- package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.js.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.js.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-resource-server.shared.schemas.d.ts.map +1 -1
- package/dist/esm/testing/resource-config-builders.d.ts.map +1 -1
- package/dist/esm/testing.d.ts.map +1 -1
- package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/anonymous-users.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/anonymous-users.shared.schema.d.ts.map +1 -1
- package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/inbound-contacts.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-credentials.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-credentials.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-identity-links.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-identity-links.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-preferences-reset.shared.utils.d.ts.map +1 -1
- package/dist/esm/users/user-preferences.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-profiles.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-self-profiles.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-self.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-self.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/users/users.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/users.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/users/users.shared.schemas.d.ts +17 -1
- package/dist/esm/users/users.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/users.shared.schemas.js +18 -2
- package/dist/esm/users/users.shared.schemas.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notifications.shared.schemas.js","sourceRoot":"","sources":["../../../../src/notifications/notifications.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAG7E,MAAM,CAAN,IAAY,2BAMX;AAND,WAAY,2BAA2B;IACrC,8CAAe,CAAA;IACf,0CAAW,CAAA;IACX,4CAAa,CAAA;IACb,sDAAuB,CAAA;IACvB,sEAAuC,CAAA;AACzC,CAAC,EANW,2BAA2B,KAA3B,2BAA2B,QAMtC;AAED,MAAM,CAAN,IAAY,qBAKX;AALD,WAAY,qBAAqB;IAC/B,sCAAa,CAAA;IACb,4CAAmB,CAAA;IACnB,4CAAmB,CAAA;IACnB,wCAAe,CAAA;AACjB,CAAC,EALW,qBAAqB,KAArB,qBAAqB,QAKhC;AAED,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC;IACjD,CAAC,CAAC,IAAI,CAAC,2BAA2B,CAAC;IACnC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACpB,CAAC,CAAC;AAGH,MAAM,CAAN,IAAY,0BAiBX;AAjBD,WAAY,0BAA0B;IAClC,qFAAuD,CAAA;IACvD,yEAA2C,CAAA;IAC3C,yFAA2D,CAAA;IAC3D,2EAA6C,CAAA;IAC7C,yEAA2C,CAAA;IAC3C,qEAAuC,CAAA;IACvC,mFAAqD,CAAA;IACrD,2DAA6B,CAAA;IAC7B,uEAAyC,CAAA;IACzC,2EAA6C,CAAA;IAC7C,2FAA6D,CAAA;IAC7D,yFAA2D,CAAA;IAC3D,6EAA+C,CAAA;IAC/C,qDAAuB,CAAA;IACvB,2DA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AAC,CAAC,CAAC;AAEL,oFAAoF;AAEpF;;GAEG;AAIH,MAAM,CAAN,IAAY,oBAIT;AAJH,WAAY,oBAAoB;IAC5B,qCAAa,CAAA;IACb,2CAAmB,CAAA;IACnB,uCAAe,CAAA;AACjB,CAAC,EAJS,oBAAoB,KAApB,oBAAoB,QAI7B;AAEH,MAAM,CAAN,IAAY,0BAGX;AAHD,WAAY,0BAA0B;IAClC,2EAA6C,CAAA;IAC7C,yEAA2C,CAAA;AAC/C,CAAC,EAHW,0BAA0B,KAA1B,0BAA0B,QAGrC;AAED,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC;IAChD,CAAC,CAAC,IAAI,CAAC,0BAA0B,CAAC;IAClC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACpB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC,MAAM,CAAC;IACpD,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC7B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC,QAAQ,EAAE;CACjD,CAAC,CAAC","sourcesContent":["import { z } from \"zod\";\nimport { ResourcePrimaryScope } from \"../resources/resources.shared.schemas\";\n\n\nexport enum CoreUserNotificationChannel {\n EMAIL = 'email',\n SMS = 'sms',\n PUSH = 'push',\n WEBSOCKET = 'websocket',\n FRONT_END_SUCCESS = 'front_end_success',\n}\n\nexport enum UserNotificationLevel {\n INFO = 'info',\n SUCCESS = 'success',\n WARNING = 'warning',\n ERROR = 'error',\n}\n\nexport const UserNotificationChannelSchema = z.union([\n z.enum(CoreUserNotificationChannel),\n z.string().min(1)\n]);\n\n\nexport enum CoreUserNotificationTarget {\n APPLICATION_ADMINISTRATOR = 'application_administrator',\n APPLICATION_BILLING = 'application_billing',\n APPLICATION_USER_MANAGEMENT = 'application_user_management',\n APPLICATION_SECURITY = 'application_security',\n APPLICATION_SUPPORT = 'application_support',\n APPLICATION_OTHER = 'application_other',\n APPLICATION_ADMIN_VIEWER = 'application_admin_viewer',\n ORGANIZATION = 'organization',\n ORGANIZATION_USERS = 'organization_users',\n ORGANIZATION_BILLING = 'organization_billing',\n ORGANIZATION_USER_MANAGEMENT = 'organization_user_management',\n ORGANIZATION_ADMINISTRATIVE = 'organization_administrative',\n ORGANIZATION_SECURITY = 'organization_security',\n USER_SELF = 'user_self',\n USERS_CUSTOM = 'users_custom',\n INBOUND_CONTACT = 'inbound_contact',\n}\n\n/**\n * Whether a notification aimed at this target may be SUPPRESSED by the recipient's own channel\n * preference (`UserPreferences.notifications.email` / `.sms` / `.push` / `.inApp`).\n *\n * DERIVED from the target rather than declared per notification, because the target already carries\n * the distinction and a second field would be one more thing to get wrong on 87 declarations.\n *\n * `USER_SELF` and `USERS_CUSTOM` reach a PERSON about their own affairs — those are the messages a\n * person is choosing about when they turn a channel off, and honouring that choice is the whole\n * point of the switch existing (#409).\n *\n * Every other target reaches somebody because of a ROLE they hold: an application administrator, an\n * organization's security or billing contact. A personal channel preference must not silently\n * disable a tenant's or an application's administrative monitoring — the recipient did not choose to\n * receive those as a person and cannot switch them off as one. A tenant that wants role mail\n * elsewhere routes it, which is what the organization notification-settings record is for.\n *\n * Nothing here reaches account RECOVERY. Password reset, magic link and email verification are sent\n * directly through the email service and never pass through the notification dispatcher, so no\n * channel preference can lock a person out of their own account. That measurement is what made\n * suppression safe to implement at all.\n */\nexport function userNotificationTargetIsSuppressibleByRecipientPreference(target: string): boolean {\n return target === CoreUserNotificationTarget.USER_SELF\n || target === CoreUserNotificationTarget.USERS_CUSTOM;\n}\n\n/**\n * The targets on which `userRoles` MEANS anything (#495).\n *\n * `userRoles` is not a recipient FILTER, which is how its name reads and how it has been authored. It\n * is the role-SELECTION override for the eleven role-scoped targets: `mapOrganizationTargetToRoles`\n * and `mapApplicationTargetToRoles` take it in place of their per-target default, and nothing else\n * anywhere reads it.\n *\n * On every other target it is inert, and inert in three different ways that all looked the same to an\n * author: `USER_SELF` addresses the initiator, `USERS_CUSTOM` goes straight to `userIdsSelector`, and\n * `ORGANIZATION`/`ORGANIZATION_USERS` mean everyone in the tenant by definition. Declaring it there\n * is a filter that silently does nothing, which is what the refinement below now refuses.\n *\n * Scoped as a POSITIVE list of targets that read it rather than a rule about one target, because the\n * defect was never specific to `USERS_CUSTOM` — refusing it there alone would leave the other three\n * free to mislead the next author in exactly the same way.\n */\nexport function userNotificationTargetReadsUserRoles(target: string): boolean {\n return target === CoreUserNotificationTarget.ORGANIZATION_BILLING\n || target === CoreUserNotificationTarget.ORGANIZATION_USER_MANAGEMENT\n || target === CoreUserNotificationTarget.ORGANIZATION_ADMINISTRATIVE\n || target === CoreUserNotificationTarget.ORGANIZATION_SECURITY\n || target === CoreUserNotificationTarget.APPLICATION_ADMINISTRATOR\n || target === CoreUserNotificationTarget.APPLICATION_BILLING\n || target === CoreUserNotificationTarget.APPLICATION_USER_MANAGEMENT\n || target === CoreUserNotificationTarget.APPLICATION_SECURITY\n || target === CoreUserNotificationTarget.APPLICATION_SUPPORT\n || target === CoreUserNotificationTarget.APPLICATION_OTHER\n || target === CoreUserNotificationTarget.APPLICATION_ADMIN_VIEWER;\n}\n\nexport const UserNotificationTargetSchema = z.union([\n z.enum(CoreUserNotificationTarget),\n z.string().min(1)\n]);\n\n\n\n// =====================================================\n// Celebration & Next-Step Enums (Phase 1a)\n// =====================================================\n\n/**\n * How the frontend renders a celebration after a successful operation.\n * - OVERLAY: Full-screen overlay with animation (e.g., confetti + message)\n * - CONFETTI: Lightweight confetti burst (no overlay)\n * - LOTTIE: Custom Lottie animation (resolved by notification identifier)\n */\nexport enum CelebrationDisplayMode {\n OVERLAY = 'overlay',\n CONFETTI = 'confetti',\n LOTTIE = 'lottie',\n}\n\n/**\n * Type of next-step suggestion attached to a notification.\n * - OPERATION: Navigate to and/or trigger a resource operation\n * - URL: Navigate to an arbitrary URL (internal or external)\n */\nexport enum NotificationNextStepType {\n OPERATION = 'operation',\n URL = 'url',\n}\n\n// =====================================================\n// Frontend Display Hints Schema (reusable)\n// =====================================================\n\nexport const FrontendDisplayHintsCelebrationSchema = z.object({\n mode: z.enum(CelebrationDisplayMode).default(CelebrationDisplayMode.OVERLAY),\n});\nexport type FrontendDisplayHintsCelebration = z.infer<typeof FrontendDisplayHintsCelebrationSchema>;\n\nexport const FrontendDisplayHintsNextStepSchema = z.object({\n /** Operation path (e.g., \"TASKS.CREATE.default\") or URL */\n operationRef: z.string(),\n type: z.enum(NotificationNextStepType).default(NotificationNextStepType.OPERATION),\n});\nexport type FrontendDisplayHintsNextStep = z.infer<typeof FrontendDisplayHintsNextStepSchema>;\n\nexport const FrontendDisplayHintsSchema = z.object({\n celebration: FrontendDisplayHintsCelebrationSchema.optional(),\n nextStep: FrontendDisplayHintsNextStepSchema.optional(),\n});\nexport type FrontendDisplayHints = z.infer<typeof FrontendDisplayHintsSchema>;\n\n// =====================================================\n// UserNotificationDefinition — Discriminated Union on `channel`\n// =====================================================\n\n/**\n * @wildo_source:part:start saas.models.notifications.user-notification-definition facet:layer:shared facet:audience:app-developer\n *\n * One notification an operation sends. Declared as `userNotifications` on a resource operation, in\n * the resource config — an array, so one operation may send several.\n *\n * ```ts\n * userNotifications: [\n * { target: CoreUserNotificationTarget.USER_SELF, channel: CoreUserNotificationChannel.EMAIL,\n * condition: ({ currentObject }) => currentObject.status === 'INVITED' },\n * { target: CoreUserNotificationTarget.ORGANIZATION_USERS, channel: CoreUserNotificationChannel.WEBSOCKET },\n * ]\n * ```\n *\n * ## What actually sends\n *\n * `EMAIL`, `WEBSOCKET` and `FRONT_END_SUCCESS` deliver. **`SMS` and `PUSH` are declaration vocabulary\n * only** — the dispatcher's branch for them logs and returns without sending. The framework does have\n * an SMS transport (authentication's one-time codes use it) and this dispatcher is not wired to it,\n * so declaring an SMS notification is inert rather than pending.\n *\n * For an EMAIL, create the template directory the reference names. The startup validator resolves\n * every declared reference through the configured locale chain before the application takes traffic,\n * and prints the exact directory to create when one is missing.\n *\n * ## The recipient's preferences are honoured, and three things override them\n *\n * A recipient who has switched a channel off does not receive it. Three deliberate exceptions:\n *\n * - a ROLE-addressed target — the recipient did not choose to receive it as a person;\n * - `alwaysDeliver: true` — declare it on a security notice a compromised account's owner must still\n * receive;\n * - a recipient with NO preferences row at all, because preferences are created lazily and a missing\n * record must never read as \"everything off\".\n *\n * The `inApp` switch governs the notification CENTRE on the frontend rather than the socket frame —\n * suppressing the frame would also suppress the live UI updates that ride the same channel.\n *\n * ## `condition` gates the notification, not the operation\n *\n * The predicate goes on the notification. It decides only whether this one message is sent; refusing\n * the CALL is a separate declaration on the operation variant, and the two are independent — a\n * variant can be enabled while its notification is gated off, and the reverse. The form deliberately\n * matches an operation variant's `enabledCondition` so both read the same way.\n *\n * ## Emailing somebody who is not a user\n *\n * `recipientEmailField` names a TOP-LEVEL field on the record holding the address. There is no\n * recipient, so there are no recipient preferences and no recipient language: the message goes out in\n * the application's default locale. A nested address cannot be named, nor a list — the path sends\n * exactly one message per notification. Pair it with a `condition` when the same operation also\n * serves rows whose address belongs to somebody who must not be written to.\n *\n * Base fields shared by all user notification channel variants.\n */\nexport const UserNotificationDefinition_BaseSchema = z.object({\n identifier: z.string().min(1),\n target: z.string(),\n level: z.enum(UserNotificationLevel).optional(),\n primaryScope: z.enum(ResourcePrimaryScope),\n /**\n * Role-SELECTION override for a role-scoped target — NOT a recipient filter. See\n * {@link userNotificationTargetReadsUserRoles}, which is also what refuses it elsewhere.\n */\n userRoles: z.array(z.string()).optional(),\n userIdsSelector: z.custom<\n (params: {\n currentObject: any;\n inputDto: any;\n objectContext: { parents: Record<string, any>; children: Record<string, any> };\n initiatorIds: { userId?: string; organizationId?: string; applicationId?: string };\n }) => string[]\n >((val) => typeof val === 'function').optional(),\n /**\n * Optional gate — dispatch this notification ONLY when the predicate returns truthy\n * against the post-operation context. Absent = always dispatches (backward compatible).\n * Evaluated per-notification BEFORE channel resolution, so it uniformly gates every\n * channel (email/websocket/front-end-success/…).\n *\n * The canonical use is a POLYMORPHIC operation whose notification must fire for only one\n * branch: the org-member CREATE op serves both INVITE (`status` INVITED — send the invite\n * email to `userEmail`) and DIRECT-ADD (`status` ACTIVE — founder / SSO-JIT / SCIM, whose\n * `userEmail` is the member's OWN address, so an \"you've been invited\" email is a\n * misdelivery). Keying on `currentObject.status === INVITED` fires the invite email for\n * invites only.\n *\n * Params mirror `userIdsSelector` (its sibling), so an author writes the same\n * `({ currentObject }) => …` form used by the operation-variant `enabledCondition`.\n *\n * @example `({ currentObject }) => currentObject.status === OrganizationMemberStatus.INVITED`\n */\n condition: z.custom<\n (params: {\n currentObject: any;\n inputDto: any;\n objectContext: { parents: Record<string, any>; children: Record<string, any> };\n initiatorIds: { userId?: string; organizationId?: string; applicationId?: string };\n }) => boolean\n >((val) => typeof val === 'function').optional(),\n /**\n * Custom notification reference for disambiguating multiple notifications of the same type.\n *\n * REQUIRED when:\n * - There are 2+ notifications with the same target in the same operation\n * - Example: 2+ USERS_CUSTOM notifications (one for creator, one for assignee)\n *\n * This allows distinguishing between multiple similar notifications\n * in the same operation (e.g., \"notify-creator\" vs \"notify-assignee\").\n *\n * Format: lowercase-kebab-case (e.g., \"notify-creator\", \"task-assigned\")\n * Will be appended to auto-generated identifier for notification/template lookup.\n */\n customNotificationRef: z.string().min(1).optional(),\n /**\n * Deliver this notification even when the recipient has switched its channel OFF.\n *\n * Only meaningful on a target that is suppressible in the first place — `USER_SELF` and\n * `USERS_CUSTOM` (see `userNotificationTargetIsSuppressibleByRecipientPreference`). On a\n * role-addressed target the preference never applied, so this flag changes nothing there.\n *\n * The narrow escape, for the case the target axis cannot express: a message that reaches a\n * person about their OWN affairs and is nevertheless a security notice they should not be able\n * to silence — a credential minted or destroyed on their account, an authentication factor\n * changed. Those are the alerts a person most needs when they did NOT perform the action.\n *\n * Author it with the reason at the site. It is deliberately not a default and deliberately not\n * derived: \"is this alert one a compromised account's owner must still receive?\" is a judgement\n * about the message, and inventing a rule for it would be a rule nobody could check.\n */\n alwaysDeliver: z.boolean().optional(),\n});\n\n// --- Channel-specific variants ---\n\n/** EMAIL channel — template-oriented (email-specific fields handled by email templates) */\nexport const UserNotificationDefinition_EmailSchema = UserNotificationDefinition_BaseSchema.extend({\n channel: z.literal(CoreUserNotificationChannel.EMAIL),\n /**\n * Deliver this email to a raw address read from the current object, rather than\n * to a resolved platform user.\n *\n * When set, the recipient is `currentObject[recipientEmailField]` (a top-level\n * string field — e.g. `'email'`). The dispatcher sends a single email directly to\n * that address using the application's default locale, BYPASSING the `userId`-based\n * `target` resolution entirely.\n *\n * This is the framework's mechanism for notifying a party who is **not (yet) a\n * platform user** — an organization-invitation invitee, an inbound lead — for whom\n * no `userId` exists. Without it, the only email recipients the dispatcher can\n * resolve are members/initiators by id (`fetchUserContext(userId).email`).\n *\n * When this is set, `target` no longer selects the recipient; it is retained only\n * to (a) classify the notification, (b) drive the email `templateRef` derivation,\n * and (c) route the dashboard URL (admin app vs main app). Choose a `target` whose\n * dashboard-routing class matches the recipient (e.g. `USER_SELF` for a main-app\n * link).\n *\n * All other context is built identically to a user-targeted email (organization\n * name, initiator name, and the token `acceptUrl` enricher), so token-bearing\n * emails such as invitations still carry their `<frontendBase><emailLinkPath>?token=`\n * acceptance link.\n */\n recipientEmailField: z.string().trim().min(1).optional(),\n});\n\n/** WEBSOCKET channel — pure WebSocket push (no frontend display) */\nexport const UserNotificationDefinition_WebSocketSchema = UserNotificationDefinition_BaseSchema.extend({\n channel: z.literal(CoreUserNotificationChannel.WEBSOCKET),\n});\n\n/**\n * FRONT_END_SUCCESS channel — frontend display with optional celebration + nextStep.\n *\n * `celebration`: Tells the frontend to render richer feedback than a simple toast.\n * `nextStep`: Suggested next action rendered as a CTA button in the toast or celebration overlay.\n *\n * Example usage in operation config:\n * ```\n * userNotifications: [{\n * identifier: 'first-document-created',\n * target: CoreUserNotificationTarget.USER_SELF,\n * channel: CoreUserNotificationChannel.FRONT_END_SUCCESS,\n * primaryScope: ResourcePrimaryScope.ORGANIZATIONS,\n * celebration: { mode: CelebrationDisplayMode.OVERLAY },\n * nextStep: { operationRef: 'DOCUMENTS.LIST.default', type: NotificationNextStepType.OPERATION },\n * }]\n * ```\n */\nexport const UserNotificationDefinition_FrontEndSuccessSchema = UserNotificationDefinition_BaseSchema.extend({\n channel: z.literal(CoreUserNotificationChannel.FRONT_END_SUCCESS),\n /** Celebration display hints — triggers richer frontend feedback (overlay/confetti/lottie) */\n celebration: FrontendDisplayHintsCelebrationSchema.optional(),\n /** Suggested next action after operation completes — rendered as CTA in toast or celebration */\n nextStep: FrontendDisplayHintsNextStepSchema.optional(),\n});\n\n/** SMS channel — not yet implemented, plain base */\nexport const UserNotificationDefinition_SMSSchema = UserNotificationDefinition_BaseSchema.extend({\n channel: z.literal(CoreUserNotificationChannel.SMS),\n});\n\n/** PUSH channel — not yet implemented, plain base */\nexport const UserNotificationDefinition_PushSchema = UserNotificationDefinition_BaseSchema.extend({\n channel: z.literal(CoreUserNotificationChannel.PUSH),\n});\n\n/** Catch-all for custom channels (any string not matching core channels) */\nexport const UserNotificationDefinition_CustomChannelSchema = UserNotificationDefinition_BaseSchema.extend({\n channel: z.string().min(1),\n});\n\n/**\n * Final union of all notification channel variants.\n * Uses z.union() (not z.discriminatedUnion) because the catch-all custom channel\n * uses z.string() which is not a literal discriminant.\n * Order matters: specific literals are tried before the catch-all string.\n */\nexport const UserNotificationDefinitionSchema = z.union([\n UserNotificationDefinition_EmailSchema,\n UserNotificationDefinition_WebSocketSchema,\n UserNotificationDefinition_FrontEndSuccessSchema,\n UserNotificationDefinition_SMSSchema,\n UserNotificationDefinition_PushSchema,\n UserNotificationDefinition_CustomChannelSchema,\n])\n /**\n * `userRoles` on a target that never reads it is a filter that silently does nothing (#495).\n *\n * Refined on the UNION rather than on the base object, deliberately: the base is `.extend()`ed by\n * six channel variants, and a refinement there would be dropped by every one of them — the shape of\n * bug this refinement exists to prevent.\n */\n .superRefine((notification, context) => {\n if (notification.userRoles !== undefined && !userNotificationTargetReadsUserRoles(notification.target)) {\n context.addIssue({\n code: 'custom',\n path: ['userRoles'],\n message: `userRoles is only read for a role-scoped target and would be inert on \"${notification.target}\". `\n + 'It selects WHICH roles a role-scoped target reaches; it does not filter the recipients of any other '\n + 'target. Remove it, or address the notification to a role-scoped target.',\n });\n }\n });\nexport type UserNotificationDefinition = z.infer<typeof UserNotificationDefinitionSchema>;\n/** @wildo_source:part:end saas.models.notifications.user-notification-definition */\n\n/**\n * M2M Notification Channels\n */\n\n\n\nexport enum M2MNotificationLevel {\n INFO = 'info',\n SUCCESS = 'success',\n ERROR = 'error',\n }\n\nexport enum CoreM2MNotificationChannel {\n WEBHOOK_ORGANIZATION = 'webhook_organization',\n WEBHOOK_APPLICATION = 'webhook_application',\n}\n\nexport const M2MNotificationChannelSchema = z.union([\n z.enum(CoreM2MNotificationChannel),\n z.string().min(1)\n]);\n\nexport const M2MNotificationDefinitionSchema = z.object({\n identifier: z.string().min(1),\n channel: z.string(),\n level: z.enum(M2MNotificationLevel).optional(),\n});\nexport type M2MNotificationDefinition = z.infer<typeof M2MNotificationDefinitionSchema>;\n\n/**\n * Inferred types (interfaces defined above for isolatedDeclarations compatibility)\n */\n\nexport type UserNotificationTarget = string;\nexport type NotificationChannel = string;\nexport type M2MNotificationChannel = string;\n"]}
|
|
1
|
+
{"version":3,"file":"notifications.shared.schemas.js","sourceRoot":"","sources":["../../../src/notifications/notifications.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAG7E,MAAM,CAAN,IAAY,2BAMX;AAND,WAAY,2BAA2B;IACrC,8CAAe,CAAA;IACf,0CAAW,CAAA;IACX,4CAAa,CAAA;IACb,sDAAuB,CAAA;IACvB,sEAAuC,CAAA;AACzC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M,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC;IAChD,CAAC,CAAC,IAAI,CAAC,0BAA0B,CAAC;IAClC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACpB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC,MAAM,CAAC;IACpD,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC7B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC,QAAQ,EAAE;CACjD,CAAC,CAAC","sourcesContent":["import { z } from \"zod\";\nimport { ResourcePrimaryScope } from \"../resources/resources.shared.schemas\";\n\n\nexport enum CoreUserNotificationChannel {\n EMAIL = 'email',\n SMS = 'sms',\n PUSH = 'push',\n WEBSOCKET = 'websocket',\n FRONT_END_SUCCESS = 'front_end_success',\n}\n\nexport enum UserNotificationLevel {\n INFO = 'info',\n SUCCESS = 'success',\n WARNING = 'warning',\n ERROR = 'error',\n}\n\nexport const UserNotificationChannelSchema = z.union([\n z.enum(CoreUserNotificationChannel),\n z.string().min(1)\n]);\n\n\n/** @wildo_source:part:start saas.models.notifications.targets facet:layer:shared facet:audience:app-developer */\n/**\n * WHO a declared `userNotifications` entry reaches — and, on the EMAIL channel, whether the tenant\n * gets to redirect or silence it.\n *\n * Imported from `@wildo-ai/saas-models`. The target is the single most consequential field of a\n * notification declaration, because it decides three separate things at once:\n *\n * 1. **the recipients** — resolved per member below;\n * 2. **whether the recipient's own channel preference can suppress it** — only `USER_SELF` and\n * `USERS_CUSTOM` are suppressible, because only they reach a person about their own affairs. Every\n * other target reaches somebody because of a ROLE they hold, and a personal switch must not\n * silently disable a tenant's administrative monitoring. See\n * {@link userNotificationTargetIsSuppressibleByRecipientPreference};\n * 3. **whether `userRoles` is read at all** — see {@link userNotificationTargetReadsUserRoles}. On the\n * two tenant-wide targets the field is REFUSED rather than ignored, because \"everyone in the\n * tenant\" is not a set a role list may narrow.\n *\n * ## Who each target resolves to\n *\n * | target | recipients |\n * |---|---|\n * | `USER_SELF` | the initiator of the operation |\n * | `USERS_CUSTOM` | whatever your `userIdsSelector` returns. Without that function the target resolves nobody |\n * | `ORGANIZATION`, `ORGANIZATION_USERS` | every member of the initiator's tenant. `userRoles` is refused here |\n * | `ORGANIZATION_BILLING`, `ORGANIZATION_SECURITY`, `ORGANIZATION_USER_MANAGEMENT`, `ORGANIZATION_ADMINISTRATIVE` | members of the tenant holding `ORG_OWNER` or `ORG_ADMIN`, unless `userRoles` names a different set |\n * | `APPLICATION_BILLING` | holders of `APP_ADMIN_BILLING_MANAGER` or `APP_ADMIN_SUPER_ADMIN`, application-wide |\n * | `APPLICATION_ADMIN_VIEWER` | holders of `APP_ADMIN_VIEWER` or `APP_ADMIN_SUPER_ADMIN` |\n * | every other `APPLICATION_*` | holders of `APP_ADMIN_SUPER_ADMIN` |\n * | `INBOUND_CONTACT` | nobody, deliberately. The recipient is not a user of your application, so this target is only usable with an EMAIL notification declaring `recipientEmailField` |\n *\n * A target the dispatcher has no rule for resolves nobody and logs a warning — so a custom target\n * string (the schema accepts one) sends nothing on the email and websocket paths.\n *\n * ## The tenant can redirect or silence an ORGANIZATION-flavoured EMAIL, and you cannot override it\n *\n * Each tenant owns a notification-settings record with a per-category switch and a per-category\n * address, and the category is DERIVED from the target — `ORGANIZATION_BILLING` to `billing`,\n * `ORGANIZATION_SECURITY` to `security`, and so on. Two consequences to design around:\n *\n * - **a configured address REPLACES the member fan-out**, it does not add to it. A tenant routing\n * security mail to a monitoring address is saying where that mail goes, not asking for a copy;\n * - **the category switch suppresses the notification entirely**, whether or not an address is\n * configured. A tenant that turns billing notifications off means it for the members too.\n *\n * `ORGANIZATION` and `ORGANIZATION_USERS` are tenant-wide and belong to no category, so no switch can\n * silence them; a tenant-wide default address still redirects them.\n *\n * This applies to EMAIL only. The websocket and in-product paths always fan out to the members.\n */\nexport enum CoreUserNotificationTarget {\n APPLICATION_ADMINISTRATOR = 'application_administrator',\n APPLICATION_BILLING = 'application_billing',\n APPLICATION_USER_MANAGEMENT = 'application_user_management',\n APPLICATION_SECURITY = 'application_security',\n APPLICATION_SUPPORT = 'application_support',\n APPLICATION_OTHER = 'application_other',\n APPLICATION_ADMIN_VIEWER = 'application_admin_viewer',\n ORGANIZATION = 'organization',\n ORGANIZATION_USERS = 'organization_users',\n ORGANIZATION_BILLING = 'organization_billing',\n ORGANIZATION_USER_MANAGEMENT = 'organization_user_management',\n ORGANIZATION_ADMINISTRATIVE = 'organization_administrative',\n ORGANIZATION_SECURITY = 'organization_security',\n USER_SELF = 'user_self',\n USERS_CUSTOM = 'users_custom',\n INBOUND_CONTACT = 'inbound_contact',\n}\n\n/**\n * Whether a notification aimed at this target may be SUPPRESSED by the recipient's own channel\n * preference (`UserPreferences.notifications.email` / `.sms` / `.push` / `.inApp`).\n *\n * DERIVED from the target rather than declared per notification, because the target already carries\n * the distinction and a second field would be one more thing to get wrong on 87 declarations.\n *\n * `USER_SELF` and `USERS_CUSTOM` reach a PERSON about their own affairs — those are the messages a\n * person is choosing about when they turn a channel off, and honouring that choice is the whole\n * point of the switch existing (#409).\n *\n * Every other target reaches somebody because of a ROLE they hold: an application administrator, an\n * organization's security or billing contact. A personal channel preference must not silently\n * disable a tenant's or an application's administrative monitoring — the recipient did not choose to\n * receive those as a person and cannot switch them off as one. A tenant that wants role mail\n * elsewhere routes it, which is what the organization notification-settings record is for.\n *\n * Nothing here reaches account RECOVERY. Password reset, magic link and email verification are sent\n * directly through the email service and never pass through the notification dispatcher, so no\n * channel preference can lock a person out of their own account. That measurement is what made\n * suppression safe to implement at all.\n */\nexport function userNotificationTargetIsSuppressibleByRecipientPreference(target: string): boolean {\n return target === CoreUserNotificationTarget.USER_SELF\n || target === CoreUserNotificationTarget.USERS_CUSTOM;\n}\n\n/**\n * The targets on which `userRoles` MEANS anything (#495).\n *\n * `userRoles` is not a recipient FILTER, which is how its name reads and how it has been authored. It\n * is the role-SELECTION override for the eleven role-scoped targets: `mapOrganizationTargetToRoles`\n * and `mapApplicationTargetToRoles` take it in place of their per-target default, and nothing else\n * anywhere reads it.\n *\n * On every other target it is inert, and inert in three different ways that all looked the same to an\n * author: `USER_SELF` addresses the initiator, `USERS_CUSTOM` goes straight to `userIdsSelector`, and\n * `ORGANIZATION`/`ORGANIZATION_USERS` mean everyone in the tenant by definition. Declaring it there\n * is a filter that silently does nothing, which is what the refinement below now refuses.\n *\n * Scoped as a POSITIVE list of targets that read it rather than a rule about one target, because the\n * defect was never specific to `USERS_CUSTOM` — refusing it there alone would leave the other three\n * free to mislead the next author in exactly the same way.\n */\nexport function userNotificationTargetReadsUserRoles(target: string): boolean {\n return target === CoreUserNotificationTarget.ORGANIZATION_BILLING\n || target === CoreUserNotificationTarget.ORGANIZATION_USER_MANAGEMENT\n || target === CoreUserNotificationTarget.ORGANIZATION_ADMINISTRATIVE\n || target === CoreUserNotificationTarget.ORGANIZATION_SECURITY\n || target === CoreUserNotificationTarget.APPLICATION_ADMINISTRATOR\n || target === CoreUserNotificationTarget.APPLICATION_BILLING\n || target === CoreUserNotificationTarget.APPLICATION_USER_MANAGEMENT\n || target === CoreUserNotificationTarget.APPLICATION_SECURITY\n || target === CoreUserNotificationTarget.APPLICATION_SUPPORT\n || target === CoreUserNotificationTarget.APPLICATION_OTHER\n || target === CoreUserNotificationTarget.APPLICATION_ADMIN_VIEWER;\n}\n/** @wildo_source:part:end saas.models.notifications.targets */\n\nexport const UserNotificationTargetSchema = z.union([\n z.enum(CoreUserNotificationTarget),\n z.string().min(1)\n]);\n\n\n\n// =====================================================\n// Celebration & Next-Step Enums (Phase 1a)\n// =====================================================\n\n/**\n * How the frontend renders a celebration after a successful operation.\n * - OVERLAY: Full-screen overlay with animation (e.g., confetti + message)\n * - CONFETTI: Lightweight confetti burst (no overlay)\n * - LOTTIE: Custom Lottie animation (resolved by notification identifier)\n */\nexport enum CelebrationDisplayMode {\n OVERLAY = 'overlay',\n CONFETTI = 'confetti',\n LOTTIE = 'lottie',\n}\n\n/**\n * Type of next-step suggestion attached to a notification.\n * - OPERATION: Navigate to and/or trigger a resource operation\n * - URL: Navigate to an arbitrary URL (internal or external)\n */\nexport enum NotificationNextStepType {\n OPERATION = 'operation',\n URL = 'url',\n}\n\n// =====================================================\n// Frontend Display Hints Schema (reusable)\n// =====================================================\n\nexport const FrontendDisplayHintsCelebrationSchema = z.object({\n mode: z.enum(CelebrationDisplayMode).default(CelebrationDisplayMode.OVERLAY),\n});\nexport type FrontendDisplayHintsCelebration = z.infer<typeof FrontendDisplayHintsCelebrationSchema>;\n\nexport const FrontendDisplayHintsNextStepSchema = z.object({\n /** Operation path (e.g., \"TASKS.CREATE.default\") or URL */\n operationRef: z.string(),\n type: z.enum(NotificationNextStepType).default(NotificationNextStepType.OPERATION),\n});\nexport type FrontendDisplayHintsNextStep = z.infer<typeof FrontendDisplayHintsNextStepSchema>;\n\nexport const FrontendDisplayHintsSchema = z.object({\n celebration: FrontendDisplayHintsCelebrationSchema.optional(),\n nextStep: FrontendDisplayHintsNextStepSchema.optional(),\n});\nexport type FrontendDisplayHints = z.infer<typeof FrontendDisplayHintsSchema>;\n\n// =====================================================\n// UserNotificationDefinition — Discriminated Union on `channel`\n// =====================================================\n\n/**\n * @wildo_source:part:start saas.models.notifications.user-notification-definition facet:layer:shared facet:audience:app-developer\n *\n * One notification an operation sends. Declared as `userNotifications` on a resource operation, in\n * the resource config — an array, so one operation may send several.\n *\n * ```ts\n * userNotifications: [\n * { target: CoreUserNotificationTarget.USER_SELF, channel: CoreUserNotificationChannel.EMAIL,\n * condition: ({ currentObject }) => currentObject.status === 'INVITED' },\n * { target: CoreUserNotificationTarget.ORGANIZATION_USERS, channel: CoreUserNotificationChannel.WEBSOCKET },\n * ]\n * ```\n *\n * ## What actually sends\n *\n * `EMAIL`, `WEBSOCKET` and `FRONT_END_SUCCESS` deliver. **`SMS` and `PUSH` are declaration vocabulary\n * only** — the dispatcher's branch for them logs and returns without sending. The framework does have\n * an SMS transport (authentication's one-time codes use it) and this dispatcher is not wired to it,\n * so declaring an SMS notification is inert rather than pending.\n *\n * For an EMAIL, create the template directory the reference names. The startup validator resolves\n * every declared reference through the configured locale chain before the application takes traffic,\n * and prints the exact directory to create when one is missing.\n *\n * ## The recipient's preferences are honoured, and three things override them\n *\n * A recipient who has switched a channel off does not receive it. Three deliberate exceptions:\n *\n * - a ROLE-addressed target — the recipient did not choose to receive it as a person;\n * - `alwaysDeliver: true` — declare it on a security notice a compromised account's owner must still\n * receive;\n * - a recipient with NO preferences row at all, because preferences are created lazily and a missing\n * record must never read as \"everything off\".\n *\n * The `inApp` switch governs the notification CENTRE on the frontend rather than the socket frame —\n * suppressing the frame would also suppress the live UI updates that ride the same channel.\n *\n * ## `condition` gates the notification, not the operation\n *\n * The predicate goes on the notification. It decides only whether this one message is sent; refusing\n * the CALL is a separate declaration on the operation variant, and the two are independent — a\n * variant can be enabled while its notification is gated off, and the reverse. The form deliberately\n * matches an operation variant's `enabledCondition` so both read the same way.\n *\n * ## Emailing somebody who is not a user\n *\n * `recipientEmailField` names a TOP-LEVEL field on the record holding the address. There is no\n * recipient, so there are no recipient preferences and no recipient language: the message goes out in\n * the application's default locale. A nested address cannot be named, nor a list — the path sends\n * exactly one message per notification. Pair it with a `condition` when the same operation also\n * serves rows whose address belongs to somebody who must not be written to.\n *\n * Base fields shared by all user notification channel variants.\n */\nexport const UserNotificationDefinition_BaseSchema = z.object({\n identifier: z.string().min(1),\n target: z.string(),\n level: z.enum(UserNotificationLevel).optional(),\n primaryScope: z.enum(ResourcePrimaryScope),\n /**\n * Role-SELECTION override for a role-scoped target — NOT a recipient filter. See\n * {@link userNotificationTargetReadsUserRoles}, which is also what refuses it elsewhere.\n */\n userRoles: z.array(z.string()).optional(),\n userIdsSelector: z.custom<\n (params: {\n currentObject: any;\n inputDto: any;\n objectContext: { parents: Record<string, any>; children: Record<string, any> };\n initiatorIds: { userId?: string; organizationId?: string; applicationId?: string };\n }) => string[]\n >((val) => typeof val === 'function').optional(),\n /**\n * Optional gate — dispatch this notification ONLY when the predicate returns truthy\n * against the post-operation context. Absent = always dispatches (backward compatible).\n * Evaluated per-notification BEFORE channel resolution, so it uniformly gates every\n * channel (email/websocket/front-end-success/…).\n *\n * The canonical use is a POLYMORPHIC operation whose notification must fire for only one\n * branch: the org-member CREATE op serves both INVITE (`status` INVITED — send the invite\n * email to `userEmail`) and DIRECT-ADD (`status` ACTIVE — founder / SSO-JIT / SCIM, whose\n * `userEmail` is the member's OWN address, so an \"you've been invited\" email is a\n * misdelivery). Keying on `currentObject.status === INVITED` fires the invite email for\n * invites only.\n *\n * Params mirror `userIdsSelector` (its sibling), so an author writes the same\n * `({ currentObject }) => …` form used by the operation-variant `enabledCondition`.\n *\n * @example `({ currentObject }) => currentObject.status === OrganizationMemberStatus.INVITED`\n */\n condition: z.custom<\n (params: {\n currentObject: any;\n inputDto: any;\n objectContext: { parents: Record<string, any>; children: Record<string, any> };\n initiatorIds: { userId?: string; organizationId?: string; applicationId?: string };\n }) => boolean\n >((val) => typeof val === 'function').optional(),\n /**\n * Custom notification reference for disambiguating multiple notifications of the same type.\n *\n * REQUIRED when:\n * - There are 2+ notifications with the same target in the same operation\n * - Example: 2+ USERS_CUSTOM notifications (one for creator, one for assignee)\n *\n * This allows distinguishing between multiple similar notifications\n * in the same operation (e.g., \"notify-creator\" vs \"notify-assignee\").\n *\n * Format: lowercase-kebab-case (e.g., \"notify-creator\", \"task-assigned\")\n * Will be appended to auto-generated identifier for notification/template lookup.\n */\n customNotificationRef: z.string().min(1).optional(),\n /**\n * Deliver this notification even when the recipient has switched its channel OFF.\n *\n * Only meaningful on a target that is suppressible in the first place — `USER_SELF` and\n * `USERS_CUSTOM` (see `userNotificationTargetIsSuppressibleByRecipientPreference`). On a\n * role-addressed target the preference never applied, so this flag changes nothing there.\n *\n * The narrow escape, for the case the target axis cannot express: a message that reaches a\n * person about their OWN affairs and is nevertheless a security notice they should not be able\n * to silence — a credential minted or destroyed on their account, an authentication factor\n * changed. Those are the alerts a person most needs when they did NOT perform the action.\n *\n * Author it with the reason at the site. It is deliberately not a default and deliberately not\n * derived: \"is this alert one a compromised account's owner must still receive?\" is a judgement\n * about the message, and inventing a rule for it would be a rule nobody could check.\n */\n alwaysDeliver: z.boolean().optional(),\n});\n\n// --- Channel-specific variants ---\n\n/** EMAIL channel — template-oriented (email-specific fields handled by email templates) */\nexport const UserNotificationDefinition_EmailSchema = UserNotificationDefinition_BaseSchema.extend({\n channel: z.literal(CoreUserNotificationChannel.EMAIL),\n /**\n * Deliver this email to a raw address read from the current object, rather than\n * to a resolved platform user.\n *\n * When set, the recipient is `currentObject[recipientEmailField]` (a top-level\n * string field — e.g. `'email'`). The dispatcher sends a single email directly to\n * that address using the application's default locale, BYPASSING the `userId`-based\n * `target` resolution entirely.\n *\n * This is the framework's mechanism for notifying a party who is **not (yet) a\n * platform user** — an organization-invitation invitee, an inbound lead — for whom\n * no `userId` exists. Without it, the only email recipients the dispatcher can\n * resolve are members/initiators by id (`fetchUserContext(userId).email`).\n *\n * When this is set, `target` no longer selects the recipient; it is retained only\n * to (a) classify the notification, (b) drive the email `templateRef` derivation,\n * and (c) route the dashboard URL (admin app vs main app). Choose a `target` whose\n * dashboard-routing class matches the recipient (e.g. `USER_SELF` for a main-app\n * link).\n *\n * All other context is built identically to a user-targeted email (organization\n * name, initiator name, and the token `acceptUrl` enricher), so token-bearing\n * emails such as invitations still carry their `<frontendBase><emailLinkPath>?token=`\n * acceptance link.\n */\n recipientEmailField: z.string().trim().min(1).optional(),\n});\n\n/** WEBSOCKET channel — pure WebSocket push (no frontend display) */\nexport const UserNotificationDefinition_WebSocketSchema = UserNotificationDefinition_BaseSchema.extend({\n channel: z.literal(CoreUserNotificationChannel.WEBSOCKET),\n});\n\n/**\n * FRONT_END_SUCCESS channel — frontend display with optional celebration + nextStep.\n *\n * `celebration`: Tells the frontend to render richer feedback than a simple toast.\n * `nextStep`: Suggested next action rendered as a CTA button in the toast or celebration overlay.\n *\n * Example usage in operation config:\n * ```\n * userNotifications: [{\n * identifier: 'first-document-created',\n * target: CoreUserNotificationTarget.USER_SELF,\n * channel: CoreUserNotificationChannel.FRONT_END_SUCCESS,\n * primaryScope: ResourcePrimaryScope.ORGANIZATIONS,\n * celebration: { mode: CelebrationDisplayMode.OVERLAY },\n * nextStep: { operationRef: 'DOCUMENTS.LIST.default', type: NotificationNextStepType.OPERATION },\n * }]\n * ```\n */\nexport const UserNotificationDefinition_FrontEndSuccessSchema = UserNotificationDefinition_BaseSchema.extend({\n channel: z.literal(CoreUserNotificationChannel.FRONT_END_SUCCESS),\n /** Celebration display hints — triggers richer frontend feedback (overlay/confetti/lottie) */\n celebration: FrontendDisplayHintsCelebrationSchema.optional(),\n /** Suggested next action after operation completes — rendered as CTA in toast or celebration */\n nextStep: FrontendDisplayHintsNextStepSchema.optional(),\n});\n\n/** SMS channel — not yet implemented, plain base */\nexport const UserNotificationDefinition_SMSSchema = UserNotificationDefinition_BaseSchema.extend({\n channel: z.literal(CoreUserNotificationChannel.SMS),\n});\n\n/** PUSH channel — not yet implemented, plain base */\nexport const UserNotificationDefinition_PushSchema = UserNotificationDefinition_BaseSchema.extend({\n channel: z.literal(CoreUserNotificationChannel.PUSH),\n});\n\n/** Catch-all for custom channels (any string not matching core channels) */\nexport const UserNotificationDefinition_CustomChannelSchema = UserNotificationDefinition_BaseSchema.extend({\n channel: z.string().min(1),\n});\n\n/**\n * Final union of all notification channel variants.\n * Uses z.union() (not z.discriminatedUnion) because the catch-all custom channel\n * uses z.string() which is not a literal discriminant.\n * Order matters: specific literals are tried before the catch-all string.\n */\nexport const UserNotificationDefinitionSchema = z.union([\n UserNotificationDefinition_EmailSchema,\n UserNotificationDefinition_WebSocketSchema,\n UserNotificationDefinition_FrontEndSuccessSchema,\n UserNotificationDefinition_SMSSchema,\n UserNotificationDefinition_PushSchema,\n UserNotificationDefinition_CustomChannelSchema,\n])\n /**\n * `userRoles` on a target that never reads it is a filter that silently does nothing (#495).\n *\n * Refined on the UNION rather than on the base object, deliberately: the base is `.extend()`ed by\n * six channel variants, and a refinement there would be dropped by every one of them — the shape of\n * bug this refinement exists to prevent.\n */\n .superRefine((notification, context) => {\n if (notification.userRoles !== undefined && !userNotificationTargetReadsUserRoles(notification.target)) {\n context.addIssue({\n code: 'custom',\n path: ['userRoles'],\n message: `userRoles is only read for a role-scoped target and would be inert on \"${notification.target}\". `\n + 'It selects WHICH roles a role-scoped target reaches; it does not filter the recipients of any other '\n + 'target. Remove it, or address the notification to a role-scoped target.',\n });\n }\n });\nexport type UserNotificationDefinition = z.infer<typeof UserNotificationDefinitionSchema>;\n/** @wildo_source:part:end saas.models.notifications.user-notification-definition */\n\n/**\n * M2M Notification Channels\n */\n\n\n\nexport enum M2MNotificationLevel {\n INFO = 'info',\n SUCCESS = 'success',\n ERROR = 'error',\n }\n\nexport enum CoreM2MNotificationChannel {\n WEBHOOK_ORGANIZATION = 'webhook_organization',\n WEBHOOK_APPLICATION = 'webhook_application',\n}\n\nexport const M2MNotificationChannelSchema = z.union([\n z.enum(CoreM2MNotificationChannel),\n z.string().min(1)\n]);\n\nexport const M2MNotificationDefinitionSchema = z.object({\n identifier: z.string().min(1),\n channel: z.string(),\n level: z.enum(M2MNotificationLevel).optional(),\n});\nexport type M2MNotificationDefinition = z.infer<typeof M2MNotificationDefinitionSchema>;\n\n/**\n * Inferred types (interfaces defined above for isolatedDeclarations compatibility)\n */\n\nexport type UserNotificationTarget = string;\nexport type NotificationChannel = string;\nexport type M2MNotificationChannel = string;\n"]}
|
package/dist/esm/organizations/organization-features.shared.resources-config.schemas.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization-features.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"organization-features.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../src/organizations/organization-features.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAGrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAAoD,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAU/H,oBAAY,+BAA+B;IACzC,cAAc,mBAAmB;IACjC,eAAe,oBAAoB;IACnC,cAAc,mBAAmB;CAClC;AAED,eAAO,MAAM,iDAAiD;;;iBAG5D,CAAC;AAEH,eAAO,MAAM,kDAAkD;;;iBAG7D,CAAC;AAEH,eAAO,MAAM,iDAAiD;;iBAE5D,CAAC;AAQH,KAAK,kCAAkC,GACnC,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,CAAC;AAKjC,eAAO,MAAM,+DAA+D,GAAI,wBAAwB,oBAAoB,EAAE;;;;;;;;kBA0J5H,CAAC"}
|
|
@@ -55,6 +55,19 @@ export const organizationFeaturesResourceConfiguration_InitializationFactory = (
|
|
|
55
55
|
CoreResourceOperation.DELETE
|
|
56
56
|
],
|
|
57
57
|
customOperation: OrganizationFeatures_Operations,
|
|
58
|
+
// assurance-control: WILDO.ENTITLEMENT.NO_SELF_GRANT — a tenant cannot widen its own entitlements.
|
|
59
|
+
//
|
|
60
|
+
// This ledger IS the organization's entitlement set, so the only thing standing between a tenant
|
|
61
|
+
// administrator and an arbitrary feature grant is the role on each WRITE below. Every one of them —
|
|
62
|
+
// CREATE, UPDATE, DELETE, ENABLE_FEATURE, DISABLE_FEATURE, RESET_FEATURES — is
|
|
63
|
+
// `APP_ADMIN_SUPER_ADMIN`, a role no organization-scope entry can confer, while READ and SEARCH are
|
|
64
|
+
// deliberately `ORG_MEMBER` so a tenant can see what it has without being able to change it.
|
|
65
|
+
//
|
|
66
|
+
// Field-level protection is NOT available here and would be the wrong instrument if it were: the
|
|
67
|
+
// super-admin path has to write these same fields, so `excludeFromUpdate` would block the legitimate
|
|
68
|
+
// grant along with the illegitimate one. The role gate is therefore the whole control, and adding a
|
|
69
|
+
// tenant role to any write below removes it entirely rather than weakening it. Pinned by
|
|
70
|
+
// `security-sensitive-operation-reachability.backend.test.ts`, which asserts the exact role array.
|
|
58
71
|
operationsConfiguration: {
|
|
59
72
|
[CoreResourceOperation.CREATE]: {
|
|
60
73
|
variants: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization-features.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../../src/organizations/organization-features.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AACrE,OAAO,EAAE,gCAAgC,EAAE,MAAM,2CAA2C,CAAC;AAE7F,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAAE,0BAA0B,EAA8C,MAAM,uCAAuC,CAAC;AAC/H,OAAO,EAAE,gBAAgB,EAAE,kCAAkC,EAAE,MAAM,gDAAgD,CAAC;AAEtH,OAAO,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AAErF,OAAO,EAAE,0CAA0C,EAAE,MAAM,8CAA8C,CAAC;AAE1G,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AAEjG,mDAAmD;AACnD,MAAM,CAAN,IAAY,+BAIX;AAJD,WAAY,+BAA+B;IACzC,oEAAiC,CAAA;IACjC,sEAAmC,CAAA;IACnC,oEAAiC,CAAA;AACnC,CAAC,EAJW,+BAA+B,KAA/B,+BAA+B,QAI1C;AAED,MAAM,CAAC,MAAM,iDAAiD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;iBACpD;aACF;SACF;QAED,CAAC,+BAA+B,CAAC,cAAc,CAAC,EAAE;YAChD,QAAQ,EAAE;gBACR;oBACE,WAAW,EAAE,4BAA4B,CAAC,QAAQ;oBAClD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,qBAAqB,CAAC,EAAE,uCAAuC;oBACtF,SAAS,EAAE,0BAA0B,CAAC,QAAQ;oBAC9C,qBAAqB,EAAE,qBAAqB,CAAC,WAAW;oBACxD,UAAU,EAAE,iDAAiD;oBAC7D,iBAAiB,EAAE,gCAAgC;iBACpD;aACF;SACF;KACF;CACF,CAAC,CAAC","sourcesContent":["/**\n * Organization Features Shared Resource Configuration\n *\n * Resource configuration for organization feature management.\n * Controls which features are available to organizations.\n */\n\nimport { z } from 'zod';\nimport { CoreFeature } from './organization-features.shared.schemas';\nimport { ScopeFeaturesWithOverridesSchema } from '../features/scope-features.shared.schemas';\n\nimport { CoreResourceOperation } from '../resources/resources.shared.core.definitions';\nimport { ResourceOperationRiskLevel, ResourcePrimaryScope, ResourceRelationship } from '../resources/resources.shared.schemas';\nimport { CoreResourceType, coreResourceShared_FieldIdentifier } from '../resources/resources.shared.core.definitions';\nimport { CoreUserNotificationTarget, CoreUserNotificationChannel } from '../notifications/notifications.shared.schemas';\nimport { ResourceOperationVariantType } from '../resources/resources.shared.schemas';\n\nimport { createResourceConfiguration_Initialization } from '../resources/resources-config.shared.factory';\n\nimport { CORE_APP_ROLES, CORE_ORG_ROLES } from '../security/authorizations/roles.shared.schemas';\n\n// Custom operations enum for organization features\nexport enum OrganizationFeatures_Operations {\n ENABLE_FEATURE = 'enable_feature',\n DISABLE_FEATURE = 'disable_feature',\n RESET_FEATURES = 'reset_features', // Reset to default features\n}\n\nexport const OrganizationFeaturesEnableFeatureRequestDtoSchema = z.object({\n featureId: z.enum(CoreFeature),\n reason: z.string().max(500).optional()\n});\n\nexport const OrganizationFeaturesDisableFeatureRequestDtoSchema = z.object({\n featureId: z.enum(CoreFeature),\n reason: z.string().min(1).max(500)\n});\n\nexport const OrganizationFeaturesResetFeaturesRequestDtoSchema = z.object({\n reason: z.string().min(1).max(500)\n});\n\nconst ORGANIZATION_FEATURES_SORT_FIELDS = ['features'];\n\nconst ORGANIZATION_FEATURES_FILTER_FIELDS = {\n features: z.enum(CoreFeature),\n};\n\ntype OrganizationFeaturesCoreOperations =\n | CoreResourceOperation.CREATE\n | CoreResourceOperation.READ\n | CoreResourceOperation.SEARCH\n | CoreResourceOperation.UPDATE\n | CoreResourceOperation.DELETE;\n\n/*\nOrganization Features Resource Configuration Factory\n*/\nexport const organizationFeaturesResourceConfiguration_InitializationFactory = (resourcesRelationships: ResourceRelationship[]) => createResourceConfiguration_Initialization<\n typeof OrganizationFeatures_Operations,\n OrganizationFeaturesCoreOperations,\n typeof ScopeFeaturesWithOverridesSchema\n>({\n mainSchema: ScopeFeaturesWithOverridesSchema,\n resourceIdentifier: CoreResourceType.ORGANIZATION_FEATURES,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.ORGANIZATION_FEATURES],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true,\n\n coreOperations: [\n CoreResourceOperation.CREATE,\n CoreResourceOperation.READ,\n CoreResourceOperation.SEARCH,\n CoreResourceOperation.UPDATE,\n // DELETE is REPOSITORY_ONLY (no HTTP route): powers the composition onParentDelete\n // cascade so the row is physically removed when its org is deleted. Without it the\n // cascade throws ErrorType.CONFIGURATION on any org that has a features row.\n CoreResourceOperation.DELETE\n ],\n\n customOperation: OrganizationFeatures_Operations,\n\n operationsConfiguration: {\n [CoreResourceOperation.CREATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.MEDIUM,\n }\n ],\n },\n\n [CoreResourceOperation.READ]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_MEMBER], // Org members can view features\n riskLevel: ResourceOperationRiskLevel.LOW,\n }\n ]\n },\n\n [CoreResourceOperation.SEARCH]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_MEMBER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n isSearchable: true,\n searchableFields: ['features'],\n searchableOptions: { caseSensitive: false, fullMatchOnly: false },\n filterFields: ORGANIZATION_FEATURES_FILTER_FIELDS,\n sortFields: ORGANIZATION_FEATURES_SORT_FIELDS,\n maxPaginatedResultPerPageLimit: 50,\n }\n ],\n },\n\n [CoreResourceOperation.UPDATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN], // Only super admins can update organization features\n riskLevel: ResourceOperationRiskLevel.HIGH,\n requestDto: ScopeFeaturesWithOverridesSchema.partial(),\n }\n ],\n },\n\n // Internal-only (REPOSITORY_ONLY): powers the composition onParentDelete cascade,\n // not a public API surface — the ledger is reset, never DELETEd, over HTTP.\n // Role is APP_ADMIN_SUPER_ADMIN (matching this ledger's CREATE/UPDATE), NOT the\n // org-scope-admin (ORG_ADMIN) used by other org-scoped onParentDelete adopters\n // (progression/guidance/preferences): the features ledger is super-admin-managed —\n // org-admins have no authority over it — so its teardown tracks the super-admin tier.\n // Ratified 2026-07-11; the role is inert here anyway (REPOSITORY_ONLY → the cascade\n // calls repository.delete() with no role check). Do NOT \"align\" this to ORG_ADMIN.\n [CoreResourceOperation.DELETE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n }\n ],\n },\n\n [OrganizationFeatures_Operations.ENABLE_FEATURE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN], // Only super admins can enable features\n riskLevel: ResourceOperationRiskLevel.MEDIUM,\n resourceOperationLike: CoreResourceOperation.UPDATE_MANY,\n requestDto: OrganizationFeaturesEnableFeatureRequestDtoSchema,\n // The collection-scoped route shape is UPDATE_MANY-like, but the\n // override-all implementation persists and returns the singleton\n // feature ledger. Keep the wire response owned here rather than\n // inheriting DefaultUpdateManyResponseSchema from the route shape.\n customResponseDto: ScopeFeaturesWithOverridesSchema,\n }\n ],\n },\n\n [OrganizationFeatures_Operations.DISABLE_FEATURE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN], // Only super admins can disable features\n riskLevel: ResourceOperationRiskLevel.HIGH,\n resourceOperationLike: CoreResourceOperation.UPDATE_MANY,\n requestDto: OrganizationFeaturesDisableFeatureRequestDtoSchema,\n customResponseDto: ScopeFeaturesWithOverridesSchema,\n }\n ],\n },\n\n [OrganizationFeatures_Operations.RESET_FEATURES]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN], // Only super admins can reset features\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n resourceOperationLike: CoreResourceOperation.UPDATE_MANY,\n requestDto: OrganizationFeaturesResetFeaturesRequestDtoSchema,\n customResponseDto: ScopeFeaturesWithOverridesSchema,\n }\n ],\n }\n },\n});\n"]}
|
|
1
|
+
{"version":3,"file":"organization-features.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../src/organizations/organization-features.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AACrE,OAAO,EAAE,gCAAgC,EAA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F;QAED,CAAC,+BAA+B,CAAC,cAAc,CAAC,EAAE;YAChD,QAAQ,EAAE;gBACR;oBACE,WAAW,EAAE,4BAA4B,CAAC,QAAQ;oBAClD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,qBAAqB,CAAC,EAAE,wCAAwC;oBACvF,SAAS,EAAE,0BAA0B,CAAC,MAAM;oBAC5C,qBAAqB,EAAE,qBAAqB,CAAC,WAAW;oBACxD,UAAU,EAAE,iDAAiD;oBAC7D,iEAAiE;oBACjE,iEAAiE;oBACjE,gEAAgE;oBAChE,mEAAmE;oBACnE,iBAAiB,EAAE,gCAAgC;iBACpD;aACF;SACF;QAED,CAAC,+BAA+B,CAAC,eAAe,CAAC,EAAE;YACjD,QAAQ,EAAE;gBACR;oBACE,WAAW,EAAE,4BAA4B,CAAC,QAAQ;oBAClD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,qBAAqB,CAAC,EAAE,yCAAyC;oBACxF,SAAS,EAAE,0BAA0B,CAAC,IAAI;oBAC1C,qBAAqB,EAAE,qBAAqB,CAAC,WAAW;oBACxD,UAAU,EAAE,kDAAkD;oBAC9D,iBAAiB,EAAE,gCAAgC;iBACpD;aACF;SACF;QAED,CAAC,+BAA+B,CAAC,cAAc,CAAC,EAAE;YAChD,QAAQ,EAAE;gBACR;oBACE,WAAW,EAAE,4BAA4B,CAAC,QAAQ;oBAClD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,qBAAqB,CAAC,EAAE,uCAAuC;oBACtF,SAAS,EAAE,0BAA0B,CAAC,QAAQ;oBAC9C,qBAAqB,EAAE,qBAAqB,CAAC,WAAW;oBACxD,UAAU,EAAE,iDAAiD;oBAC7D,iBAAiB,EAAE,gCAAgC;iBACpD;aACF;SACF;KACF;CACF,CAAC,CAAC","sourcesContent":["/**\n * Organization Features Shared Resource Configuration\n *\n * Resource configuration for organization feature management.\n * Controls which features are available to organizations.\n */\n\nimport { z } from 'zod';\nimport { CoreFeature } from './organization-features.shared.schemas';\nimport { ScopeFeaturesWithOverridesSchema } from '../features/scope-features.shared.schemas';\n\nimport { CoreResourceOperation } from '../resources/resources.shared.core.definitions';\nimport { ResourceOperationRiskLevel, ResourcePrimaryScope, ResourceRelationship } from '../resources/resources.shared.schemas';\nimport { CoreResourceType, coreResourceShared_FieldIdentifier } from '../resources/resources.shared.core.definitions';\nimport { CoreUserNotificationTarget, CoreUserNotificationChannel } from '../notifications/notifications.shared.schemas';\nimport { ResourceOperationVariantType } from '../resources/resources.shared.schemas';\n\nimport { createResourceConfiguration_Initialization } from '../resources/resources-config.shared.factory';\n\nimport { CORE_APP_ROLES, CORE_ORG_ROLES } from '../security/authorizations/roles.shared.schemas';\n\n// Custom operations enum for organization features\nexport enum OrganizationFeatures_Operations {\n ENABLE_FEATURE = 'enable_feature',\n DISABLE_FEATURE = 'disable_feature',\n RESET_FEATURES = 'reset_features', // Reset to default features\n}\n\nexport const OrganizationFeaturesEnableFeatureRequestDtoSchema = z.object({\n featureId: z.enum(CoreFeature),\n reason: z.string().max(500).optional()\n});\n\nexport const OrganizationFeaturesDisableFeatureRequestDtoSchema = z.object({\n featureId: z.enum(CoreFeature),\n reason: z.string().min(1).max(500)\n});\n\nexport const OrganizationFeaturesResetFeaturesRequestDtoSchema = z.object({\n reason: z.string().min(1).max(500)\n});\n\nconst ORGANIZATION_FEATURES_SORT_FIELDS = ['features'];\n\nconst ORGANIZATION_FEATURES_FILTER_FIELDS = {\n features: z.enum(CoreFeature),\n};\n\ntype OrganizationFeaturesCoreOperations =\n | CoreResourceOperation.CREATE\n | CoreResourceOperation.READ\n | CoreResourceOperation.SEARCH\n | CoreResourceOperation.UPDATE\n | CoreResourceOperation.DELETE;\n\n/*\nOrganization Features Resource Configuration Factory\n*/\nexport const organizationFeaturesResourceConfiguration_InitializationFactory = (resourcesRelationships: ResourceRelationship[]) => createResourceConfiguration_Initialization<\n typeof OrganizationFeatures_Operations,\n OrganizationFeaturesCoreOperations,\n typeof ScopeFeaturesWithOverridesSchema\n>({\n mainSchema: ScopeFeaturesWithOverridesSchema,\n resourceIdentifier: CoreResourceType.ORGANIZATION_FEATURES,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.ORGANIZATION_FEATURES],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true,\n\n coreOperations: [\n CoreResourceOperation.CREATE,\n CoreResourceOperation.READ,\n CoreResourceOperation.SEARCH,\n CoreResourceOperation.UPDATE,\n // DELETE is REPOSITORY_ONLY (no HTTP route): powers the composition onParentDelete\n // cascade so the row is physically removed when its org is deleted. Without it the\n // cascade throws ErrorType.CONFIGURATION on any org that has a features row.\n CoreResourceOperation.DELETE\n ],\n\n customOperation: OrganizationFeatures_Operations,\n\n // assurance-control: WILDO.ENTITLEMENT.NO_SELF_GRANT — a tenant cannot widen its own entitlements.\n //\n // This ledger IS the organization's entitlement set, so the only thing standing between a tenant\n // administrator and an arbitrary feature grant is the role on each WRITE below. Every one of them —\n // CREATE, UPDATE, DELETE, ENABLE_FEATURE, DISABLE_FEATURE, RESET_FEATURES — is\n // `APP_ADMIN_SUPER_ADMIN`, a role no organization-scope entry can confer, while READ and SEARCH are\n // deliberately `ORG_MEMBER` so a tenant can see what it has without being able to change it.\n //\n // Field-level protection is NOT available here and would be the wrong instrument if it were: the\n // super-admin path has to write these same fields, so `excludeFromUpdate` would block the legitimate\n // grant along with the illegitimate one. The role gate is therefore the whole control, and adding a\n // tenant role to any write below removes it entirely rather than weakening it. Pinned by\n // `security-sensitive-operation-reachability.backend.test.ts`, which asserts the exact role array.\n operationsConfiguration: {\n [CoreResourceOperation.CREATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.MEDIUM,\n }\n ],\n },\n\n [CoreResourceOperation.READ]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_MEMBER], // Org members can view features\n riskLevel: ResourceOperationRiskLevel.LOW,\n }\n ]\n },\n\n [CoreResourceOperation.SEARCH]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_MEMBER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n isSearchable: true,\n searchableFields: ['features'],\n searchableOptions: { caseSensitive: false, fullMatchOnly: false },\n filterFields: ORGANIZATION_FEATURES_FILTER_FIELDS,\n sortFields: ORGANIZATION_FEATURES_SORT_FIELDS,\n maxPaginatedResultPerPageLimit: 50,\n }\n ],\n },\n\n [CoreResourceOperation.UPDATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN], // Only super admins can update organization features\n riskLevel: ResourceOperationRiskLevel.HIGH,\n requestDto: ScopeFeaturesWithOverridesSchema.partial(),\n }\n ],\n },\n\n // Internal-only (REPOSITORY_ONLY): powers the composition onParentDelete cascade,\n // not a public API surface — the ledger is reset, never DELETEd, over HTTP.\n // Role is APP_ADMIN_SUPER_ADMIN (matching this ledger's CREATE/UPDATE), NOT the\n // org-scope-admin (ORG_ADMIN) used by other org-scoped onParentDelete adopters\n // (progression/guidance/preferences): the features ledger is super-admin-managed —\n // org-admins have no authority over it — so its teardown tracks the super-admin tier.\n // Ratified 2026-07-11; the role is inert here anyway (REPOSITORY_ONLY → the cascade\n // calls repository.delete() with no role check). Do NOT \"align\" this to ORG_ADMIN.\n [CoreResourceOperation.DELETE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n }\n ],\n },\n\n [OrganizationFeatures_Operations.ENABLE_FEATURE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN], // Only super admins can enable features\n riskLevel: ResourceOperationRiskLevel.MEDIUM,\n resourceOperationLike: CoreResourceOperation.UPDATE_MANY,\n requestDto: OrganizationFeaturesEnableFeatureRequestDtoSchema,\n // The collection-scoped route shape is UPDATE_MANY-like, but the\n // override-all implementation persists and returns the singleton\n // feature ledger. Keep the wire response owned here rather than\n // inheriting DefaultUpdateManyResponseSchema from the route shape.\n customResponseDto: ScopeFeaturesWithOverridesSchema,\n }\n ],\n },\n\n [OrganizationFeatures_Operations.DISABLE_FEATURE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN], // Only super admins can disable features\n riskLevel: ResourceOperationRiskLevel.HIGH,\n resourceOperationLike: CoreResourceOperation.UPDATE_MANY,\n requestDto: OrganizationFeaturesDisableFeatureRequestDtoSchema,\n customResponseDto: ScopeFeaturesWithOverridesSchema,\n }\n ],\n },\n\n [OrganizationFeatures_Operations.RESET_FEATURES]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN], // Only super admins can reset features\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n resourceOperationLike: CoreResourceOperation.UPDATE_MANY,\n requestDto: OrganizationFeaturesResetFeaturesRequestDtoSchema,\n customResponseDto: ScopeFeaturesWithOverridesSchema,\n }\n ],\n }\n },\n});\n"]}
|
package/dist/esm/organizations/organization-members.shared.resources-config.schemas.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization-members.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"organization-members.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../src/organizations/organization-members.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAEL,wBAAwB,EACzB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAAoD,oBAAoB,EAA+B,MAAM,uCAAuC,CAAC;AAO5J,OAAO,EACL,wBAAwB,EAEzB,MAAM,6DAA6D,CAAC;AAMrE,OAAO,EAAkB,cAAc,EAAE,MAAM,iDAAiD,CAAC;AAmCjG,oBAAY,8BAA8B;IACxC,OAAO,YAAY;IACnB,UAAU,eAAe;IACzB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,eAAe,mBAAmB;CACnC;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,+CAA+C;;;CAK3B,CAAC;AAsBlC,KAAK,iCAAiC,GAClC,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,KAAK,GAE3B,qBAAqB,CAAC,WAAW,CAAC;AAKtC,eAAO,MAAM,8DAA8D,GAAI,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;mBA4f3H,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization-members.shared.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"organization-members.shared.schemas.d.ts","sourceRoot":"","sources":["../../../src/organizations/organization-members.shared.schemas.ts"],"names":[],"mappings":"AACA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,cAAc,EAAkB,MAAM,iDAAiD,CAAC;AAQjG;;;;;;;;;;;;;;;;;;GAkBG;AACH,oBAAY,wBAAwB;IAClC,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,SAAS,cAAc;CACxB;AAED,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;kBAiLnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
|
package/dist/esm/organizations/organization-notifications.shared.resources-config.schemas.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization-notifications.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"organization-notifications.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../src/organizations/organization-notifications.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAAoD,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAS/H,KAAK,uCAAuC,GACxC,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,CAAC;AAKjC,eAAO,MAAM,oEAAoE,GAAI,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;;kBAmGjI,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization-notifications.shared.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"organization-notifications.shared.schemas.d.ts","sourceRoot":"","sources":["../../../src/organizations/organization-notifications.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;GAQG;AACH,eAAO,MAAM,oCAAoC;;;;;;;;;;iBAiC/C,CAAC;AACH,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oCAAoC,CAAC,CAAC;AAElG,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;iBAoB1C,CAAC;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization-notifications.shared.schemas.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"organization-notifications.shared.schemas.js","sourceRoot":"","sources":["../../../src/organizations/organization-notifications.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,oCAAoC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3D;;;;;;;;;;;;;;;;;OAiBG;IACH,mBAAmB,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,CAAC,cAAc,EAAE;IAC1D,cAAc,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;IACpC,eAAe,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;IACrC,qBAAqB,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;IAC3C,sBAAsB,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;IAE5C;;;OAGG;IACH,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IAClC,cAAc,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IACzC,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IACnC,eAAe,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;CAC3C,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC,MAAM,CAAC;IACtD,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,YAAY,EAAE,CAAC,cAAc,EAAE;IACtD,6EAA6E;IAC7E,iFAAiF;IACjF,gFAAgF;IAChF,eAAe;IACf,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,QAAQ,EAAE,CAAC,YAAY,EAAE,CAAC,cAAc,EAAE,CAAC,iBAAiB,EAAE;IAE9G,6FAA6F;IAC7F,4EAA4E;IAC5E,+EAA+E;IAC/E,0EAA0E;IAC1E,kDAAkD;IAClD,kBAAkB,EAAE,oCAAoC;SACrD,OAAO,CAAC,oCAAoC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;SACvD,cAAc,EAAE;IAEnB,eAAe;IACf,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,iBAAiB,EAAE,CAAC,iBAAiB,EAAE;IACnG,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,iBAAiB,EAAE,CAAC,iBAAiB,EAAE;CACpG,CAAC,CAAC","sourcesContent":["/**\n * Organization Notifications Shared Schemas\n * \n * Notification preferences and settings.\n * Separated from core organization for performance optimization.\n */\n\nimport { z } from 'zod';\n\n/**\n * Per-category notification routing block for an organization.\n *\n * Every interior field is optional (the routing addresses) or carries a\n * `.default(...)` (the category opt-in booleans), so the object is fully\n * materializable from `{}`. Extracted as a named schema so\n * {@link OrganizationNotificationsSchema} can default it via the Zod-4-safe\n * `Schema.default(Schema.parse({}))` idiom — see the `emailNotifications` field.\n */\nexport const OrganizationEmailNotificationsSchema = z.object({\n /**\n * Where a tenant's organization-flavoured email goes, and whether it goes at all. READ by the\n * notification dispatcher since 2026-09-08 (#410).\n *\n * It was read by NOTHING before that. The record was seeded by apps-manager at provisioning,\n * rendered and edited through the organizations preset and audited, while organization-targeted\n * notifications resolved to member user ids by role and went to each member's own address — so a\n * tenant that filled this screen in changed nothing.\n *\n * The category a notification belongs to is DERIVED from its target: the notification-target\n * vocabulary and these four categories line up one-for-one, so a per-notification declaration\n * would only be a place for the two to disagree. `ORGANIZATION_USERS` is deliberately outside the\n * mapping — it fans out to every member by design, and routing it to one address would change who\n * the message is FOR rather than where it lands.\n *\n * An address REPLACES the member fan-out rather than adding to it: a tenant routing security mail\n * to a SOC address is saying where it goes, not asking for a copy.\n */\n defaultEmailAddress: z.email().optional().isSummaryField(),\n billingAddress: z.email().optional(),\n securityAddress: z.email().optional(),\n administrativeAddress: z.email().optional(),\n usersManagementAddress: z.email().optional(),\n\n /**\n * Category opt-ins. A `false` SUPPRESSES that category entirely — for the members too, not only\n * for the routing address — because a tenant turning billing notifications off means it.\n */\n billing: z.boolean().default(true),\n administrative: z.boolean().default(true),\n security: z.boolean().default(true),\n usersManagement: z.boolean().default(true),\n});\nexport type OrganizationEmailNotifications = z.infer<typeof OrganizationEmailNotificationsSchema>;\n\nexport const OrganizationNotificationsSchema = z.object({\n _id: z.string().min(1).isPrimaryKey().isSummaryField(),\n // `.isUnique()` = idempotency backstop for onParentCreate seeding: the eager\n // `createAsSystem` seed on ORGANIZATIONS create writes one notifications row per\n // org; the unique index makes a re-fire (retry / replay) fail-closed instead of\n // duplicating.\n organizationId: z.string().min(1).isDBIndexed().isUnique().isForeignKey().isSummaryField().excludeFromUpdate(),\n\n // Email notification preferences. `.default(OrganizationEmailNotificationsSchema.parse({}))`\n // makes the block materialize to its interior defaults when omitted, so the\n // resource is default-seedable from its CREATE DTO + parent FK alone (required\n // by the onParentCreate lifecycle guard). The output type keeps the block\n // required, so downstream readers are unaffected.\n emailNotifications: OrganizationEmailNotificationsSchema\n .default(OrganizationEmailNotificationsSchema.parse({}))\n .isSummaryField(),\n\n // Audit fields\n createdAt: z.date().default(() => new Date()).isDBIndexed().excludeFromCreate().excludeFromUpdate(),\n updatedAt: z.date().default(() => new Date()).isDBIndexed().excludeFromCreate().excludeFromUpdate()\n});\nexport type OrganizationNotifications = z.infer<typeof OrganizationNotificationsSchema>;\n\n"]}
|
package/dist/esm/organizations/organization-preferences.shared.resources-config.schemas.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization-preferences.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"organization-preferences.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../src/organizations/organization-preferences.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAAoD,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAU/H,KAAK,qCAAqC,GACtC,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,CAAC;AAKjC,eAAO,MAAM,kEAAkE,GAAI,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;;kBAmG/H,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization-preferences.shared.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"organization-preferences.shared.schemas.d.ts","sourceRoot":"","sources":["../../../src/organizations/organization-preferences.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAkB,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAEhH,eAAO,MAAM,qCAAqC;;;;;iBAKhD,CAAC;AACH,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qCAAqC,CAAC,CAAC;AAEpG,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;iBA+BxC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEpF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,qCAAqC;;;;;iBAKhD,CAAC;AACH,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qCAAqC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization-preferences.shared.schemas.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"organization-preferences.shared.schemas.js","sourceRoot":"","sources":["../../../src/organizations/organization-preferences.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAEhH,MAAM,CAAC,MAAM,qCAAqC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5D,eAAe,EAAE,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC,cAAc,EAAE;IACzH,kBAAkB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC;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gBAAgB,CAAC,CAAC,WAAW,EAAE;IAE1G,uBAAuB;IACvB,mBAAmB,EAAE,qCAAqC,CAAC,OAAO,CAAC,qCAAqC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,cAAc,EAAE;IAEpI,wBAAwB,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE;IAEjE,eAAe;IACf,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,iBAAiB,EAAE,CAAC,iBAAiB,EAAE;IACnG,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,iBAAiB,EAAE,CAAC,iBAAiB,EAAE;CACpG,CAAC,CAAC;AAGH;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,qCAAqC,GAAG,6BAA6B,CAAC,IAAI,CAAC;IACtF,QAAQ,EAAE,IAAI;IACd,MAAM,EAAE,IAAI;IACZ,UAAU,EAAE,IAAI;IAChB,UAAU,EAAE,IAAI;CACjB,CAAC,CAAC","sourcesContent":["/**\n * Organization Preferences Shared Schemas\n * \n * Localization, regional settings, and application preferences.\n * Separated from core organization for performance optimization.\n */\n\nimport { z } from 'zod';\nimport { AvailableLanguage, TimeFormat, TimezoneSchema, DateFormat } from '@wildo-ai/presets-components-models';\n\nexport const OrganizationLanguagePreferencesSchema = z.object({\n primaryLanguage: z.enum(AvailableLanguage).systemEnum('AvailableLanguage').default(AvailableLanguage.EN).isSummaryField(),\n supportedLanguages: z.array(z.enum(AvailableLanguage).systemEnum('AvailableLanguage')).default([AvailableLanguage.EN]),\n allowUserOverride: z.boolean().default(true),\n enforceForAllMembers: z.boolean().default(false)\n});\nexport type OrganizationLanguagePreferences = z.infer<typeof OrganizationLanguagePreferencesSchema>;\n\nexport const OrganizationPreferencesSchema = z.object({\n _id: z.string().min(1).isPrimaryKey().isSummaryField(),\n // `.isUnique()` = idempotency backstop for onParentCreate seeding: the eager\n // `createAsSystem` seed on ORGANIZATIONS create writes one preferences row per\n // org; the unique index makes a re-fire (retry / replay) fail-closed instead of\n // duplicating.\n organizationId: z.string().min(1).isDBIndexed().isUnique().isForeignKey().isSummaryField().excludeFromUpdate(),\n \n // Regional settings\n // Default 'UTC' (a valid `CommonTimezone`), NOT 'US_SHORT' — that was a\n // `DateFormat` value mistakenly used here. `TimezoneSchema` is a\n // `union([enum(CommonTimezone), string])`, so Zod accepted the bad string\n // (the onParentCreate boot-guard probe passed), but the Mongoose model enforces\n // the enum and rejected 'US_SHORT' at seed time → the org preferences row failed\n // to eager-seed. Mirrors the USER preferences `timezone` default. See\n // composition-oncreate-lifecycle plan (W3 runtime-verify).\n timezone: TimezoneSchema.default('UTC').isDBIndexed().isSummaryField(),\n locale: z.enum(AvailableLanguage).systemEnum('AvailableLanguage').default(AvailableLanguage.EN).isDBIndexed().isSummaryField(),\n // LOCALE_DEFAULT (not ISO_8601): mirrors the USER preferences default — see the\n // rationale on `UserPreferences_RegionalSchema.dateFormat`.\n dateFormat: z.enum(DateFormat).systemEnum('DateFormat').default(DateFormat.LOCALE_DEFAULT).isDBIndexed(),\n timeFormat: z.enum(TimeFormat).systemEnum('TimeFormat').default(TimeFormat.TWENTY_FOUR_HOUR).isDBIndexed(),\n \n // Language preferences\n languagePreferences: OrganizationLanguagePreferencesSchema.default(OrganizationLanguagePreferencesSchema.parse({})).isSummaryField(),\n \n allowMemberEmailOverride: z.boolean().default(true).isDBIndexed(),\n \n // Audit fields\n createdAt: z.date().default(() => new Date()).isDBIndexed().excludeFromCreate().excludeFromUpdate(),\n updatedAt: z.date().default(() => new Date()).isDBIndexed().excludeFromCreate().excludeFromUpdate()\n});\nexport type OrganizationPreferences = z.infer<typeof OrganizationPreferencesSchema>;\n\n/**\n * The tenant's regional answer, as the DEFAULT LAYER beneath a member's own (#410).\n *\n * These four fields sit at the top level of {@link OrganizationPreferencesSchema} because they are\n * the organization's own settings, not a sub-record; this is a derived VIEW of them, so the two can\n * never drift. It exists because the frontend needs to carry exactly this much of the tenant's\n * preferences record to `I18nContext` — sending the whole record would put `_id`, audit fields and\n * the member-email-override policy on an event that has no use for any of them.\n *\n * The resolution `I18nContext` performs is: the member's own value, then this, then the framework\n * fallback. A member's explicit choice always wins — that is why\n * {@link UserPreferences_RegionalSchema}'s four fields are optional, so \"the member expressed\n * nothing\" is representable at all.\n *\n * Unlike the member's block, these fields keep their defaults, and that is correct rather than an\n * oversight: the organization record is seeded at provisioning and always exists, so its values ARE\n * the tenant's answer. A tenant that has edited nothing answers with the same four values the\n * framework would have used, which makes the layer a no-op for it — exactly as it should be.\n */\nexport const OrganizationRegionalPreferencesSchema = OrganizationPreferencesSchema.pick({\n timezone: true,\n locale: true,\n dateFormat: true,\n timeFormat: true,\n});\nexport type OrganizationRegionalPreferences = z.infer<typeof OrganizationRegionalPreferencesSchema>;\n"]}
|
package/dist/esm/organizations/organization-profile.shared.resources-config.schemas.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization-profile.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"organization-profile.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../src/organizations/organization-profile.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAEL,oBAAoB,EACpB,gBAAgB,EACjB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAAoD,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAW/H,oBAAY,8BAA8B;IACxC,eAAe,oBAAoB;CACpC;AAED,KAAK,iCAAiC,GAClC,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,CAAC;AAKjC,eAAO,MAAM,8DAA8D,GAAI,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAgH3H,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization-profile.shared.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"organization-profile.shared.schemas.d.ts","sourceRoot":"","sources":["../../../src/organizations/organization-profile.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,oBAAY,gBAAgB;IAC1B,OAAO,YAAY,CAAY,iBAAiB;IAChD,KAAK,UAAU,CAAgB,kBAAkB;IACjD,MAAM,WAAW,CAAc,mBAAmB;IAClD,KAAK,UAAU,CAAgB,qBAAqB;IACpD,UAAU,eAAe;CAC1B;AAED,oBAAY,oBAAoB;IAC9B,UAAU,eAAe;IACzB,OAAO,YAAY;IACnB,UAAU,eAAe;IACzB,SAAS,cAAc;IACvB,MAAM,WAAW;IACjB,aAAa,kBAAkB;IAC/B,UAAU,eAAe;IACzB,KAAK,UAAU;IACf,UAAU,eAAe;IACzB,SAAS,cAAc;IACvB,KAAK,UAAU;CAChB;AAID,eAAO,MAAM,0BAA0B;;;;;;iBA+BrC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,8BAA8B,CAC5C,QAAQ,EAAE,oBAAoB,GAAG,IAAI,GAAG,SAAS,EACjD,gBAAgB,EAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,GAC5D;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,CAK7C;AAED,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAoCpC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization-profile.shared.schemas.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"organization-profile.shared.schemas.js","sourceRoot":"","sources":["../../../src/organizations/organization-profile.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAkB,MAAM,qCAAqC,CAAC;AAErF,oCAAoC;AACpC,MAAM,CAAN,IAAY,gBAMX;AAND,WAAY,gBAAgB;IAC1B,uCAAmB,CAAA;IACnB,mCAAe,CAAA;IACf,qCAAiB,CAAA;IACjB,mCAAe,CAAA;IACf,6CAAyB,CAAA,CAAM,kBAAkB;AACnD,CAAC,EANW,gBAAgB,KAAhB,gBAAgB,QAM3B;AAED,MAAM,CAAN,IAAY,oBAYX;AAZD,WAAY,oBAAoB;IAC9B,iDAAyB,CAAA;IACzB,2CAAmB,CAAA;IACnB,iDAAyB,CAAA;IACzB,+CAAuB,CAAA;IACvB,yCAAiB,CAAA;IACjB,uDAA+B,CAAA;IAC/B,iDAAyB,CAAA;IACzB,uCAAe,CAAA;IACf,iDAAyB,CAAA;IACzB,+CAAuB,CAAA;IACvB,uCAAe,CAAA;AACjB,CAAC,EAZW,oBAAoB,KAApB,oBAAoB,QAY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AE;IAEb,eAAe;IACf,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,iBAAiB,EAAE,CAAC,iBAAiB,EAAE;IACnG,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,iBAAiB,EAAE,CAAC,iBAAiB,EAAE;CACpG,CAAC,CAAC","sourcesContent":["/**\n * Organization Profile Shared Schemas\n * \n * Company information, branding, and public profile data.\n * Separated from core organization for performance optimization.\n */\n\nimport { z } from 'zod';\nimport { AddressSchema } from '@wildo-ai/presets-components-models';\nimport { ZodTypeForColors } from '@wildo-ai/zod-decorators';\nimport { CommonTimezone, TimezoneSchema } from '@wildo-ai/presets-components-models';\n\n// Organization classification enums\nexport enum OrganizationSize {\n STARTUP = 'STARTUP', // 1-10 employees\n SMALL = 'SMALL', // 11-50 employees\n MEDIUM = 'MEDIUM', // 51-200 employees\n LARGE = 'LARGE', // 201-1000 employees\n ENTERPRISE = 'ENTERPRISE' // 1000+ employees\n}\n\nexport enum OrganizationIndustry {\n TECHNOLOGY = 'TECHNOLOGY',\n FINANCE = 'FINANCE',\n HEALTHCARE = 'HEALTHCARE',\n EDUCATION = 'EDUCATION',\n RETAIL = 'RETAIL',\n MANUFACTURING = 'MANUFACTURING',\n CONSULTING = 'CONSULTING',\n MEDIA = 'MEDIA',\n GOVERNMENT = 'GOVERNMENT',\n NONPROFIT = 'NONPROFIT',\n OTHER = 'OTHER'\n}\n\n// Address Schema\n\nexport const OrganizationBrandingSchema = z.object({\n /**\n * Per-org logo (user-authored, absolute URL), READ by the login screen since 2026-09-08 (#410).\n *\n * A tenant that uploads a logo now sees it on its own sign-in page: the identification response\n * resolves this first and falls back to the application's own brand assets. See\n * {@link resolveTenantBrandPresentation}, which owns the precedence.\n *\n * **The audit note this replaces was accurate and its conclusion was wrong**, and the way it went\n * wrong is worth keeping. It read: *\"the one place that surfaces an organization's branding logo\n * to a DTO is the auth login response, and it ALREADY applies the app-level default: at\n * identification time only a domain was matched (the org profile is not loaded) … Because the only\n * surfacing seam is already handled, no additional backend fallback seam is introduced here\n * (invented seams are avoided by design).\"*\n *\n * Every factual clause held. But \"the org profile is not loaded\" described what the code DID, not\n * what it could do — the domain lookup resolves `scopeId`, which is the organization id, so the\n * profile was always one read away. Reasoning from the current call graph to \"no seam is needed\"\n * turned an unfinished implementation into a documented design decision, and it then justified\n * leaving the field inert for as long as anyone read the note. Avoiding invented seams is right;\n * this seam was not invented, it was the one the field exists for.\n *\n * Kept `z.url()` (absolute) because this is direct user input, unlike the\n * backend-populated `logoUrl` output fields (auth-response / email context)\n * that accept app-relative brand-asset paths.\n */\n logo: z.url().optional(),\n favicon: z.url().optional(),\n primaryColor: ZodTypeForColors.optional(),\n secondaryColor: ZodTypeForColors.optional(),\n customDomain: z.string().min(1).max(100).optional(),\n});\nexport type OrganizationBranding = z.infer<typeof OrganizationBrandingSchema>;\n\n/**\n * What a tenant's own sign-in screen should show: the ORGANIZATION's branding when it declared any,\n * otherwise the application's (#410).\n *\n * Per field, not per record — a tenant that uploaded a logo and never picked a colour keeps the\n * application's colour rather than losing it. Resolving the record as a unit would make one\n * expressed field silence the others, which is the same trap the regional-preferences layer had to\n * avoid.\n *\n * A pure function taking the application's ALREADY-RESOLVED values, so it can live beside the schema\n * it resolves without this module knowing anything about brand assets, configuration services or\n * how the application's own logo is chosen. The caller keeps that; this owns only the precedence,\n * which is the part worth having one copy of.\n *\n * `favicon` and `secondaryColor` are deliberately absent: the DTO that carries this to a login\n * screen has no field for either, so resolving them would produce values nothing transports. Adding\n * them is a DTO decision first.\n */\nexport function resolveTenantBrandPresentation(\n branding: OrganizationBranding | null | undefined,\n applicationBrand: { logoUrl?: string; primaryColor?: string },\n): { logoUrl?: string; primaryColor?: string } {\n return {\n logoUrl: branding?.logo ?? applicationBrand.logoUrl,\n primaryColor: branding?.primaryColor ?? applicationBrand.primaryColor,\n };\n}\n\nexport const OrganizationProfileSchema = z.object({\n _id: z.string().min(1).isPrimaryKey().isSummaryField(),\n organizationId: z.string().min(1).isDBIndexed().isForeignKey().isSummaryField().excludeFromUpdate(),\n \n // Company information\n displayName: z.string().max(100).optional().isDBIndexed().isSummaryField(),\n domain: z.string().min(1).max(100).optional().isDBIndexed(),\n phone: z.string().max(20).optional(),\n website: z.url().optional(),\n description: z.string().max(500).optional(),\n \n // Classification\n industry: z.enum(OrganizationIndustry).optional().isDBIndexed(),\n size: z.enum(OrganizationSize).optional().isDBIndexed(),\n founded: z.date().optional(),\n \n // Location\n address: AddressSchema.optional(),\n timezone: z.string().default(CommonTimezone.UTC).isDBIndexed(),\n \n // Branding\n // `.default(...)` (interior fully optional/defaulted) so the row is eager-seedable\n // via onParentCreate — root-cause fix, consistent with sibling defaulted objects.\n branding: OrganizationBrandingSchema.default(OrganizationBrandingSchema.parse({})),\n \n // Social links\n socialLinks: z.object({\n linkedin: z.url().optional(),\n twitter: z.url().optional(),\n facebook: z.url().optional(),\n github: z.url().optional()\n }).optional(),\n \n // Audit fields\n createdAt: z.date().default(() => new Date()).isDBIndexed().excludeFromCreate().excludeFromUpdate(),\n updatedAt: z.date().default(() => new Date()).isDBIndexed().excludeFromCreate().excludeFromUpdate()\n});\nexport type OrganizationProfile = z.infer<typeof OrganizationProfileSchema>; "]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization-unit-inheritance.shared.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"organization-unit-inheritance.shared.d.ts","sourceRoot":"","sources":["../../../src/organizations/organization-unit-inheritance.shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAE,0CAA0C,EAAE,MAAM,qCAAqC,CAAC;AAGjG;;;;;;;GAOG;AACH,MAAM,MAAM,+BAA+B,GAAG;IAC5C,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,QAAQ,CAAC,eAAe,CAAC,EAAE,0CAA0C,GAAG,IAAI,CAAC;CAC9E,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,8BAA8B,GAAG;IAC3C,wFAAwF;IACxF,QAAQ,CAAC,4BAA4B,EAAE,MAAM,EAAE,CAAC;IAChD,yFAAyF;IACzF,QAAQ,CAAC,4BAA4B,EAAE,MAAM,EAAE,CAAC;CACjD,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,uCAAuC,CAAC,IAAI,EAAE,+BAA+B,GAAG,OAAO,CAEtG;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,6CAA6C,CAC3D,YAAY,EAAE,SAAS,+BAA+B,EAAE,EACxD,iBAAiB,EAAE,SAAS,+BAA+B,EAAE,GAC5D,8BAA8B,CAyBhC;AAED;;;;;GAKG;AACH,wBAAgB,wCAAwC,CACtD,YAAY,EAAE,SAAS,+BAA+B,EAAE,GACvD,OAAO,CAET"}
|
package/dist/esm/organizations/organization-unit-members.shared.resources-config.schemas.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization-unit-members.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"organization-unit-members.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../src/organizations/organization-unit-members.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAA8B,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAMzG,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AAQjF,KAAK,oCAAoC,GACrC,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,CAAC;AAEjC;;;;;;GAMG;AACH,eAAO,MAAM,iEAAiE,GAAI,wBAAwB,oBAAoB,EAAE;;;;;;;;mBA8E9H,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization-unit-members.shared.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"organization-unit-members.shared.schemas.d.ts","sourceRoot":"","sources":["../../../src/organizations/organization-unit-members.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,4BAA4B;;;;;;;;kBA4CvC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization-unit-narrowing-decision.shared.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"organization-unit-narrowing-decision.shared.d.ts","sourceRoot":"","sources":["../../../src/organizations/organization-unit-narrowing-decision.shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6CAA6C,CAAC;AAE7F,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,KAAK,EAAE,oCAAoC,EAAE,MAAM,sCAAsC,CAAC;AAGjG,sDAAsD;AACtD,oBAAY,qCAAqC;IAC/C,6FAA6F;IAC7F,YAAY,iBAAiB;IAC7B,2FAA2F;IAC3F,i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AC,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1C,QAAQ,CAAC,cAAc,EAAE,SAAS,yBAAyB,EAAE,GAAG,SAAS,CAAC;IAC1E,QAAQ,CAAC,iBAAiB,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,oCAAoC,CAAC,CAAC,CAAC,CAAC;IACpG,QAAQ,CAAC,qBAAqB,EAAE,qCAAqC,CAAC;CACvE,GAAG,iCAAiC,CA6BpC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization-unit-narrowing.example.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"organization-unit-narrowing.example.d.ts","sourceRoot":"","sources":["../../../src/organizations/organization-unit-narrowing.example.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,oCAAoC,EAAE,MAAM,sCAAsC,CAAC;AAEjG;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,gCAAgC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,oCAAoC,CAAC,CAG3G,CAAC;AACF,8EAA8E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization-unit-narrowing.shared.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"organization-unit-narrowing.shared.d.ts","sourceRoot":"","sources":["../../../src/organizations/organization-unit-narrowing.shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAElF;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,MAAM,oCAAoC,GAAG;IACjD,4EAA4E;IAC5E,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;CAChC,CAAC;AACF,iFAAiF;AAEjF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,eAAO,MAAM,+CAA+C,EAAE,SAAS,gBAAgB,EAetF,CAAC;AACF,iFAAiF;AAEjF;;;;;;;GAOG;AACH,eAAO,MAAM,kCAAkC,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,gBAAgB,EAAE,oCAAoC,CAAC,CAAC,CAAM,CAAC;AAExI;;;;;;;;;;;;GAYG;AACH,wBAAgB,0CAA0C,CACxD,eAAe,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,oCAAoC,CAAC,CAAC,CAAC,EACxF,oBAAoB,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,oCAAoC,CAAC,CAAC,CAAC,GAAG,SAAS,GACxG,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,oCAAoC,CAAC,CAAC,CAAC,CAEzE;AAED,6DAA6D;AAC7D,MAAM,MAAM,kCAAkC,GAAG;IAC/C,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,wDAAwD,GAAG,yBAAyB,CAAC;CACvG,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,0CAA0C,CACxD,iBAAiB,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,oCAAoC,CAAC,CAAC,CAAC,GACzF,kCAAkC,EAAE,CAgBtC;AAED;;;;;;GAMG;AACH,wBAAgB,gCAAgC,CAC9C,iBAAiB,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,oCAAoC,CAAC,CAAC,CAAC,EAC1F,YAAY,EAAE,MAAM,GACnB,oCAAoC,GAAG,SAAS,CAKlD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization-unit-narrowing.shared.js","sourceRoot":"","sources":["../../../../src/organizations/organization-unit-narrowing.shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,gBAAgB,EA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AAa,KAAK,QAAQ,IAAI,WAAW,CAAC,aAAa,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC5F,UAAU,CAAC,IAAI,CAAC,EAAE,YAAY,EAAE,MAAM,EAAE,yBAAyB,EAAE,CAAC,CAAC;QACvE,CAAC;IACH,CAAC;IAED,OAAO,UAAU,CAAC;AACpB,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,gCAAgC,CAC9C,iBAA0F,EAC1F,YAAoB;IAEpB,IAAI,+CAA+C,CAAC,QAAQ,CAAC,YAAgC,CAAC;QAAE,OAAO,SAAS,CAAC;IACjH,MAAM,WAAW,GAAG,iBAAiB,CAAC,YAAY,CAAC,CAAC;IACpD,IAAI,CAAC,WAAW,EAAE,aAAa;QAAE,OAAO,SAAS,CAAC;IAClD,OAAO,WAAW,CAAC;AACrB,CAAC","sourcesContent":["/**\n * Organization-unit narrowing — the opt-in registry and its hard containment rule.\n *\n * Unit grants are ADDITIVE (plan decision D-C3b): they widen a principal's reach, never shrink it.\n * A caller whose organization-wide grant already satisfies an operation is not narrowed at all; a\n * caller who would otherwise be denied gains access to the rows of the units they hold.\n *\n * A resource participates ONLY by opting in here. Narrowing is never implicit: inferring it from the\n * presence of an `organizationUnitId` field would silently change the result set of every existing\n * LIST the moment such a field was added.\n */\n\nimport { CoreResourceType } from '../resources/resources.shared.core.definitions';\n\n/**\n * @wildo_source:part:start saas.models.organization-unit-narrowing-declaration facet:layer:shared facet:family:authorization\n *\n * How one resource is narrowed: the field carrying the unit a row belongs to.\n *\n * Import from `@wildo-ai/saas-models`. Declare narrowing by passing an\n * `organizationUnitNarrowing` map to application startup, keyed by resource type:\n *\n * ```ts\n * organizationUnitNarrowing: {\n * [MyResourceType.PROJECTS]: { unitFieldName: 'organizationUnitId' },\n * }\n * ```\n *\n * `unitFieldName` must name a real field on the resource's main schema that stores the owning\n * `ORGANIZATION_UNITS` id — it becomes a query predicate on every read and a write-time check on\n * every create/update, so a misspelled field is an authorization defect, not a typo.\n *\n * Opting in is ADDITIVE: a caller whose organization-wide role already satisfies the operation is\n * never narrowed and keeps seeing the whole tenant, while a caller who would otherwise be denied\n * gains access to the rows of the units they hold. Opting a resource in therefore cannot shrink any\n * existing result set.\n *\n * Deliberately an object rather than a bare boolean so per-operation narrowing can be added later as\n * an optional property (D-C5) without migrating any existing declaration — Dynamics carries depth\n * per privilege, and Wildo already declares roles per operation variant, so that is the likely next\n * shape. Resource-level is a strict subset of it.\n */\nexport type OrganizationUnitNarrowingDeclaration = {\n /** The field on the resource holding the owning `ORGANIZATION_UNITS` id. */\n readonly unitFieldName: string;\n};\n/** @wildo_source:part:end saas.models.organization-unit-narrowing-declaration */\n\n/**\n * @wildo_source:part:start saas.models.organization-unit-narrowing-containment facet:layer:shared facet:family:authorization facet:audience:app-developer\n *\n * Resources that may NEVER be unit-narrowable — the authorization plane.\n *\n * ## The loop this closes\n *\n * A resource that ISSUES authority must not be governed by the authority it issues. Were\n * `ORGANIZATION_UNIT_MEMBERS` narrowable:\n *\n * 1. a principal who is organization-wide `ORG_MEMBER` but `ORG_ADMIN` of ONE unit\n * 2. satisfies the `ORG_ADMIN` gate on the grant surface via that unit grant,\n * 3. grants themselves `ORG_ADMIN` in every other unit,\n * 4. and the union of all units is organization-wide admin — assembled from a single unit grant.\n *\n * Step 3 is blocked today only because the role ceiling derives from organization-wide grants. That\n * is one refactor away from being undone (see the `D-C4 LOCK` regression test), so the containment\n * is also structural: a unit grant can never reach these resources at all.\n *\n * Every major suite enforces the same separation — SAP puts user↔role assignment behind dedicated\n * authorization objects, Azure puts role assignment outside the data plane behind\n * `Microsoft.Authorization/roleAssignments/write`, and Dynamics forbids assigning a role you do not\n * hold.\n *\n * `ORGANIZATION_MEMBERS` is listed for the same reason one level up: it carries the organization-wide\n * `roles` array that produces `initiatorRoles`. The roles-bearing machine credentials are listed\n * because the roles written at CREATE become the authority of every token minted from them.\n *\n * ## `ORGANIZATIONS` is listed for a SECOND, distinct reason — scope inversion\n *\n * The rule above is \"a resource that ISSUES authority may not be governed by the authority it\n * issues\". `ORGANIZATIONS` is barred by its sibling: **a resource that DEFINES a scope may not be\n * governed by a narrowing INSIDE that scope.** A unit is owned BY an organization, so letting the\n * owned thing gate access to its owner inverts the containment.\n *\n * That is not abstract. The tenant lifecycle verbs live on this resource, and\n * `request_deletion` / `suspend` are `ORG_ADMIN`-gated. Were `ORGANIZATIONS` narrowable, a principal\n * who is organization-wide `ORG_MEMBER` but `ORG_ADMIN` of ONE unit would satisfy that gate through\n * the unit grant — and one division's administrator could mark the ENTIRE tenant for deletion, or\n * halt it. The blast radius is the whole organization, reached from a grant that was supposed to\n * confine them to a subtree of it.\n *\n * It is also meaningless independently of the hazard: an organization is not located inside one of\n * its own units, so there is no honest `unitFieldName` to declare. Listing it turns a declaration\n * that could never be correct into a boot failure instead of a silent authorization hole.\n */\nexport const ORGANIZATION_UNIT_NARROWING_FORBIDDEN_RESOURCES: readonly CoreResourceType[] = [\n CoreResourceType.ORGANIZATION_UNIT_MEMBERS,\n CoreResourceType.ORGANIZATION_MEMBERS,\n CoreResourceType.ORGANIZATION_UNITS,\n // The tenant itself — scope inversion, and the door to the tenant lifecycle verbs. See the\n // dedicated section above; this is a different rule from the issues-authority one.\n CoreResourceType.ORGANIZATIONS,\n CoreResourceType.ORG_API_KEYS,\n CoreResourceType.OAUTH_CLIENTS_ORGANIZATION,\n // A credential authenticates the WHOLE TENANT toward a third party — there is one Slack workspace\n // behind it, not one per division. Narrowing it to a unit would let a unit-scoped administrator\n // rotate or delete the credential every other unit spends, which is the same issues-authority\n // hazard the sibling entries above record: the grant confines them to a subtree, the object they\n // reach does not live in one.\n CoreResourceType.ORG_PROVIDER_CREDENTIALS,\n];\n/** @wildo_source:part:end saas.models.organization-unit-narrowing-containment */\n\n/**\n * The engine's opted-in resources.\n *\n * EMPTY BY DESIGN. No engine resource carries a unit FK yet, and opting one in is a deliberate\n * per-resource decision, not a default. The mechanism ships ahead of its first consumer so that the\n * containment rule is enforced from the start rather than retrofitted after a resource has already\n * been narrowed incorrectly.\n */\nexport const ENGINE_ORGANIZATION_UNIT_NARROWING: Readonly<Partial<Record<CoreResourceType, OrganizationUnitNarrowingDeclaration>>> = {};\n\n/**\n * Merge the engine's opt-ins with an application's into the map that GOVERNS RUNTIME.\n *\n * The engine ships none today, so in practice this is the application's own map — but the merge\n * exists rather than the application map being used directly, because the containment validation and\n * every runtime lookup must see ONE map. A second, unmerged source is how a resource ends up narrowed\n * on the read path and not on the write path.\n *\n * An application declaration for a resource the engine also declares REPLACES it: the application\n * owns the field name on its own schema. Nothing here validates the result — the caller passes the\n * merged map to {@link collectOrganizationUnitNarrowingViolations} and fails closed at boot, so that\n * an application cannot narrow the authorization plane merely by declaring it later than the engine.\n */\nexport function mergeOrganizationUnitNarrowingDeclarations(\n engineNarrowing: Readonly<Partial<Record<string, OrganizationUnitNarrowingDeclaration>>>,\n applicationNarrowing: Readonly<Partial<Record<string, OrganizationUnitNarrowingDeclaration>>> | undefined,\n): Readonly<Partial<Record<string, OrganizationUnitNarrowingDeclaration>>> {\n return { ...engineNarrowing, ...(applicationNarrowing ?? {}) };\n}\n\n/** A declaration that violates the D-C4 containment rule. */\nexport type OrganizationUnitNarrowingViolation = {\n readonly resourceType: string;\n readonly reason: 'authorization_plane_resource_cannot_be_unit_narrowable' | 'missing_unit_field_name';\n};\n\n/**\n * Validate a narrowing registry against the containment rule.\n *\n * Returns violations rather than throwing so the caller owns the failure mode — the engine boot path\n * turns these into a startup error (fail closed: a misdeclared narrowing is a silent authorization\n * hole, so the application must not start), while tooling can report them without dying.\n */\nexport function collectOrganizationUnitNarrowingViolations(\n narrowingRegistry: Readonly<Partial<Record<string, OrganizationUnitNarrowingDeclaration>>>,\n): OrganizationUnitNarrowingViolation[] {\n const forbidden = new Set<string>(ORGANIZATION_UNIT_NARROWING_FORBIDDEN_RESOURCES);\n const violations: OrganizationUnitNarrowingViolation[] = [];\n\n for (const [resourceType, declaration] of Object.entries(narrowingRegistry)) {\n if (!declaration) continue;\n if (forbidden.has(resourceType)) {\n violations.push({ resourceType, reason: 'authorization_plane_resource_cannot_be_unit_narrowable' });\n continue;\n }\n if (typeof declaration.unitFieldName !== 'string' || declaration.unitFieldName.length === 0) {\n violations.push({ resourceType, reason: 'missing_unit_field_name' });\n }\n }\n\n return violations;\n}\n\n/**\n * Is this resource narrowed by organization unit?\n *\n * The single question every consumer asks. Reading the registry directly is how a call site ends up\n * disagreeing with the containment rule — the forbidden set is re-checked here so a registry that\n * was assembled without validation still cannot narrow the authorization plane.\n */\nexport function resolveOrganizationUnitNarrowing(\n narrowingRegistry: Readonly<Partial<Record<string, OrganizationUnitNarrowingDeclaration>>>,\n resourceType: string,\n): OrganizationUnitNarrowingDeclaration | undefined {\n if (ORGANIZATION_UNIT_NARROWING_FORBIDDEN_RESOURCES.includes(resourceType as CoreResourceType)) return undefined;\n const declaration = narrowingRegistry[resourceType];\n if (!declaration?.unitFieldName) return undefined;\n return declaration;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"organization-unit-narrowing.shared.js","sourceRoot":"","sources":["../../../src/organizations/organization-unit-narrowing.shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAkClF,iFAAiF;AAEjF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,MAAM,CAAC,MAAM,+CAA+C,GAAgC;IAC1F,gBAAgB,CAAC,yBAAyB;IAC1C,gBAAgB,CAAC,oBAAoB;IACrC,gBAAgB,CAAC,kBAAkB;IACnC,2FAA2F;IAC3F,mFAAmF;IACnF,gBAAgB,CAAC,aAAa;IAC9B,gBAAgB,CAAC,YAAY;IAC7B,gBAAgB,CAAC,0BAA0B;IAC3C,kGAAkG;IAClG,gGAAgG;IAChG,8FAA8F;IAC9F,iGAAiG;IACjG,8BAA8B;IAC9B,gBAAgB,CAAC,wBAAwB;CAC1C,CAAC;AAC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AE,OAAO,SAAS,CAAC;IAClD,OAAO,WAAW,CAAC;AACrB,CAAC","sourcesContent":["/**\n * Organization-unit narrowing — the opt-in registry and its hard containment rule.\n *\n * Unit grants are ADDITIVE (plan decision D-C3b): they widen a principal's reach, never shrink it.\n * A caller whose organization-wide grant already satisfies an operation is not narrowed at all; a\n * caller who would otherwise be denied gains access to the rows of the units they hold.\n *\n * A resource participates ONLY by opting in here. Narrowing is never implicit: inferring it from the\n * presence of an `organizationUnitId` field would silently change the result set of every existing\n * LIST the moment such a field was added.\n */\n\nimport { CoreResourceType } from '../resources/resources.shared.core.definitions';\n\n/**\n * @wildo_source:part:start saas.models.organization-unit-narrowing-declaration facet:layer:shared facet:family:authorization\n *\n * How one resource is narrowed: the field carrying the unit a row belongs to.\n *\n * Import from `@wildo-ai/saas-models`. Declare narrowing by passing an\n * `organizationUnitNarrowing` map to application startup, keyed by resource type:\n *\n * ```ts\n * organizationUnitNarrowing: {\n * [MyResourceType.PROJECTS]: { unitFieldName: 'organizationUnitId' },\n * }\n * ```\n *\n * `unitFieldName` must name a real field on the resource's main schema that stores the owning\n * `ORGANIZATION_UNITS` id — it becomes a query predicate on every read and a write-time check on\n * every create/update, so a misspelled field is an authorization defect, not a typo.\n *\n * Opting in is ADDITIVE: a caller whose organization-wide role already satisfies the operation is\n * never narrowed and keeps seeing the whole tenant, while a caller who would otherwise be denied\n * gains access to the rows of the units they hold. Opting a resource in therefore cannot shrink any\n * existing result set.\n *\n * Deliberately an object rather than a bare boolean so per-operation narrowing can be added later as\n * an optional property (D-C5) without migrating any existing declaration — Dynamics carries depth\n * per privilege, and Wildo already declares roles per operation variant, so that is the likely next\n * shape. Resource-level is a strict subset of it.\n */\nexport type OrganizationUnitNarrowingDeclaration = {\n /** The field on the resource holding the owning `ORGANIZATION_UNITS` id. */\n readonly unitFieldName: string;\n};\n/** @wildo_source:part:end saas.models.organization-unit-narrowing-declaration */\n\n/**\n * @wildo_source:part:start saas.models.organization-unit-narrowing-containment facet:layer:shared facet:family:authorization facet:audience:app-developer\n *\n * Resources that may NEVER be unit-narrowable — the authorization plane.\n *\n * ## The loop this closes\n *\n * A resource that ISSUES authority must not be governed by the authority it issues. Were\n * `ORGANIZATION_UNIT_MEMBERS` narrowable:\n *\n * 1. a principal who is organization-wide `ORG_MEMBER` but `ORG_ADMIN` of ONE unit\n * 2. satisfies the `ORG_ADMIN` gate on the grant surface via that unit grant,\n * 3. grants themselves `ORG_ADMIN` in every other unit,\n * 4. and the union of all units is organization-wide admin — assembled from a single unit grant.\n *\n * Step 3 is blocked today only because the role ceiling derives from organization-wide grants. That\n * is one refactor away from being undone (see the `D-C4 LOCK` regression test), so the containment\n * is also structural: a unit grant can never reach these resources at all.\n *\n * Every major suite enforces the same separation — SAP puts user↔role assignment behind dedicated\n * authorization objects, Azure puts role assignment outside the data plane behind\n * `Microsoft.Authorization/roleAssignments/write`, and Dynamics forbids assigning a role you do not\n * hold.\n *\n * `ORGANIZATION_MEMBERS` is listed for the same reason one level up: it carries the organization-wide\n * `roles` array that produces `initiatorRoles`. The roles-bearing machine credentials are listed\n * because the roles written at CREATE become the authority of every token minted from them.\n *\n * ## `ORGANIZATIONS` is listed for a SECOND, distinct reason — scope inversion\n *\n * The rule above is \"a resource that ISSUES authority may not be governed by the authority it\n * issues\". `ORGANIZATIONS` is barred by its sibling: **a resource that DEFINES a scope may not be\n * governed by a narrowing INSIDE that scope.** A unit is owned BY an organization, so letting the\n * owned thing gate access to its owner inverts the containment.\n *\n * That is not abstract. The tenant lifecycle verbs live on this resource, and\n * `request_deletion` / `suspend` are `ORG_ADMIN`-gated. Were `ORGANIZATIONS` narrowable, a principal\n * who is organization-wide `ORG_MEMBER` but `ORG_ADMIN` of ONE unit would satisfy that gate through\n * the unit grant — and one division's administrator could mark the ENTIRE tenant for deletion, or\n * halt it. The blast radius is the whole organization, reached from a grant that was supposed to\n * confine them to a subtree of it.\n *\n * It is also meaningless independently of the hazard: an organization is not located inside one of\n * its own units, so there is no honest `unitFieldName` to declare. Listing it turns a declaration\n * that could never be correct into a boot failure instead of a silent authorization hole.\n */\nexport const ORGANIZATION_UNIT_NARROWING_FORBIDDEN_RESOURCES: readonly CoreResourceType[] = [\n CoreResourceType.ORGANIZATION_UNIT_MEMBERS,\n CoreResourceType.ORGANIZATION_MEMBERS,\n CoreResourceType.ORGANIZATION_UNITS,\n // The tenant itself — scope inversion, and the door to the tenant lifecycle verbs. See the\n // dedicated section above; this is a different rule from the issues-authority one.\n CoreResourceType.ORGANIZATIONS,\n CoreResourceType.ORG_API_KEYS,\n CoreResourceType.OAUTH_CLIENTS_ORGANIZATION,\n // A credential authenticates the WHOLE TENANT toward a third party — there is one Slack workspace\n // behind it, not one per division. Narrowing it to a unit would let a unit-scoped administrator\n // rotate or delete the credential every other unit spends, which is the same issues-authority\n // hazard the sibling entries above record: the grant confines them to a subtree, the object they\n // reach does not live in one.\n CoreResourceType.ORG_PROVIDER_CREDENTIALS,\n];\n/** @wildo_source:part:end saas.models.organization-unit-narrowing-containment */\n\n/**\n * The engine's opted-in resources.\n *\n * EMPTY BY DESIGN. No engine resource carries a unit FK yet, and opting one in is a deliberate\n * per-resource decision, not a default. The mechanism ships ahead of its first consumer so that the\n * containment rule is enforced from the start rather than retrofitted after a resource has already\n * been narrowed incorrectly.\n */\nexport const ENGINE_ORGANIZATION_UNIT_NARROWING: Readonly<Partial<Record<CoreResourceType, OrganizationUnitNarrowingDeclaration>>> = {};\n\n/**\n * Merge the engine's opt-ins with an application's into the map that GOVERNS RUNTIME.\n *\n * The engine ships none today, so in practice this is the application's own map — but the merge\n * exists rather than the application map being used directly, because the containment validation and\n * every runtime lookup must see ONE map. A second, unmerged source is how a resource ends up narrowed\n * on the read path and not on the write path.\n *\n * An application declaration for a resource the engine also declares REPLACES it: the application\n * owns the field name on its own schema. Nothing here validates the result — the caller passes the\n * merged map to {@link collectOrganizationUnitNarrowingViolations} and fails closed at boot, so that\n * an application cannot narrow the authorization plane merely by declaring it later than the engine.\n */\nexport function mergeOrganizationUnitNarrowingDeclarations(\n engineNarrowing: Readonly<Partial<Record<string, OrganizationUnitNarrowingDeclaration>>>,\n applicationNarrowing: Readonly<Partial<Record<string, OrganizationUnitNarrowingDeclaration>>> | undefined,\n): Readonly<Partial<Record<string, OrganizationUnitNarrowingDeclaration>>> {\n return { ...engineNarrowing, ...(applicationNarrowing ?? {}) };\n}\n\n/** A declaration that violates the D-C4 containment rule. */\nexport type OrganizationUnitNarrowingViolation = {\n readonly resourceType: string;\n readonly reason: 'authorization_plane_resource_cannot_be_unit_narrowable' | 'missing_unit_field_name';\n};\n\n/**\n * Validate a narrowing registry against the containment rule.\n *\n * Returns violations rather than throwing so the caller owns the failure mode — the engine boot path\n * turns these into a startup error (fail closed: a misdeclared narrowing is a silent authorization\n * hole, so the application must not start), while tooling can report them without dying.\n */\nexport function collectOrganizationUnitNarrowingViolations(\n narrowingRegistry: Readonly<Partial<Record<string, OrganizationUnitNarrowingDeclaration>>>,\n): OrganizationUnitNarrowingViolation[] {\n const forbidden = new Set<string>(ORGANIZATION_UNIT_NARROWING_FORBIDDEN_RESOURCES);\n const violations: OrganizationUnitNarrowingViolation[] = [];\n\n for (const [resourceType, declaration] of Object.entries(narrowingRegistry)) {\n if (!declaration) continue;\n if (forbidden.has(resourceType)) {\n violations.push({ resourceType, reason: 'authorization_plane_resource_cannot_be_unit_narrowable' });\n continue;\n }\n if (typeof declaration.unitFieldName !== 'string' || declaration.unitFieldName.length === 0) {\n violations.push({ resourceType, reason: 'missing_unit_field_name' });\n }\n }\n\n return violations;\n}\n\n/**\n * Is this resource narrowed by organization unit?\n *\n * The single question every consumer asks. Reading the registry directly is how a call site ends up\n * disagreeing with the containment rule — the forbidden set is re-checked here so a registry that\n * was assembled without validation still cannot narrow the authorization plane.\n */\nexport function resolveOrganizationUnitNarrowing(\n narrowingRegistry: Readonly<Partial<Record<string, OrganizationUnitNarrowingDeclaration>>>,\n resourceType: string,\n): OrganizationUnitNarrowingDeclaration | undefined {\n if (ORGANIZATION_UNIT_NARROWING_FORBIDDEN_RESOURCES.includes(resourceType as CoreResourceType)) return undefined;\n const declaration = narrowingRegistry[resourceType];\n if (!declaration?.unitFieldName) return undefined;\n return declaration;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization-units.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"organization-units.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../src/organizations/organization-units.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAAoD,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAU/H,oBAAY,2BAA2B;IACrC,IAAI,SAAS,CAAE,gCAAgC;IAC/C,OAAO,YAAY,CAAE,eAAe;IACpC,OAAO,YAAY;CACpB;AASD,KAAK,8BAA8B,GAC/B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,CAAC;AAKjC,eAAO,MAAM,2DAA2D,GAAI,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;mBAmLxH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization-units.shared.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"organization-units.shared.schemas.d.ts","sourceRoot":"","sources":["../../../src/organizations/organization-units.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB;;GAEG;AACH,oBAAY,oBAAoB;IAC9B,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,UAAU,eAAe;IACzB,IAAI,SAAS;IACb,OAAO,YAAY;IACnB,aAAa,kBAAkB;IAC/B,UAAU,eAAe;IACzB,UAAU,eAAe;IACzB,MAAM,WAAW;CAClB;AAED,oBAAY,sBAAsB;IAChC,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,QAAQ,aAAa;IACrB,SAAS,cAAc;CACxB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,oBAAY,0CAA0C;IACpD,qEAAqE;IACrE,YAAY,iBAAiB;IAC7B,wGAAwG;IACxG,cAAc,mBAAmB;CAClC;AAGD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;kBAyClC,CAAC;AACF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAGtE,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,gBAAgB,CAAC;IACvB,QAAQ,EAAE,wBAAwB,EAAE,CAAC;CACtC;AAED,eAAO,MAAM,8BAA8B,EAAE,CAAC,CAAC,OAAO,CAAC,wBAAwB,CAG7E,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organizations.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"organizations.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../src/organizations/organizations.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAEL,kBAAkB,EACnB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAAoD,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAW/H;;;;;;;;;;;;;;GAcG;AACH,oBAAY,iCAAiC;IAC3C,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB;;;;;;;OAOG;IACH,gBAAgB,qBAAqB;IACrC;;;;;;OAMG;IACH,OAAO,YAAY;CACpB;AAQD,KAAK,0BAA0B,GAC3B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,CAAC;AAKjC,eAAO,MAAM,uDAAuD,GAAI,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;kBA+pBpH,CAAC"}
|