@wildo-ai/saas-models 1.1.6 → 1.1.7
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/__tests__/setup.js.map +1 -1
- package/dist/esm/_inspect.d.ts.map +1 -1
- package/dist/esm/_inspect.js.map +1 -1
- package/dist/esm/applications/application-metadata.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/applications/application-metadata.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/applications/application-subject.shared.schemas.d.ts.map +1 -1
- package/dist/esm/applications/application-subject.shared.schemas.js.map +1 -1
- package/dist/esm/applications/application-versions.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/applications/application-versions.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/applications/applications-context.schemas.d.ts.map +1 -1
- package/dist/esm/applications/applications-context.schemas.js.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/applications/applications.shared.schemas.js.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.resources-config.schemas.js.map +1 -1
- package/dist/esm/billing/billing-account.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-account.shared.schemas.js.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.map +1 -1
- 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.resources-config.schemas.js.map +1 -1
- package/dist/esm/billing/credit-pool.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/credit-pool.shared.schemas.js.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.resources-config.schemas.js.map +1 -1
- package/dist/esm/billing/invoice-ref.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/invoice-ref.shared.schemas.js.map +1 -1
- package/dist/esm/billing/price.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/price.shared.resources-config.schemas.js.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-definition.shared.schemas.js.map +1 -1
- package/dist/esm/billing/product.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/product.shared.resources-config.schemas.js.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.resources-config.schemas.js.map +1 -1
- package/dist/esm/billing/promotions.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/promotions.shared.schemas.js.map +1 -1
- package/dist/esm/billing/public-pricing-catalog.shared.atoms.d.ts.map +1 -1
- package/dist/esm/billing/public-pricing-catalog.shared.atoms.js.map +1 -1
- package/dist/esm/billing/public-pricing-catalog.shared.d.ts.map +1 -1
- package/dist/esm/billing/public-pricing-catalog.shared.js.map +1 -1
- package/dist/esm/billing/referral-reward.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/referral-reward.shared.schemas.js.map +1 -1
- package/dist/esm/billing/referral.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/referral.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/billing/referral.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/referral.shared.schemas.js.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/subscription.shared.schemas.js.map +1 -1
- package/dist/esm/billing/usage-flush-evidence.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/usage-flush-evidence.shared.schemas.js.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.resources-config.schemas.js.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/aggregation-query.shared.schemas.js.map +1 -1
- package/dist/esm/charts/aggregation.shared.definitions.d.ts.map +1 -1
- package/dist/esm/charts/aggregation.shared.definitions.js.map +1 -1
- package/dist/esm/charts/chart-definition-builder.shared.d.ts.map +1 -1
- package/dist/esm/charts/chart-definition-builder.shared.js.map +1 -1
- package/dist/esm/companion/artifact-placement.shared.definitions.d.ts.map +1 -1
- package/dist/esm/companion/artifact-placement.shared.definitions.js.map +1 -1
- 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/shared-library-companion.shared.definitions.js.map +1 -1
- package/dist/esm/companion-exports.d.ts.map +1 -1
- package/dist/esm/companion-exports.js.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-actor.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/audit-actor.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/audit-trails/audit-export-projection.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/audit-export-projection.shared.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-log-sink.shared.schemas.js.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-logs.shared.resources-config.schemas.js.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.map +1 -1
- 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.map +1 -1
- package/dist/esm/compliance/data-classification/data-classification.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/data-classification/data-classification.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/documents/governed-document-interactions.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/documents/governed-document-interactions.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/documents/governed-documents.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/documents/governed-documents.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/capability-consent-purposes.shared.utils.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/capability-consent-purposes.shared.utils.js.map +1 -1
- package/dist/esm/compliance/privacy/client-storage.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/client-storage.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/consent-gate-vocabulary.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/consent-gate-vocabulary.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/consent-purposes.shared.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/consent-purposes.shared.js.map +1 -1
- package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/impersonalization-scrub.shared.utils.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/impersonalization-scrub.shared.utils.js.map +1 -1
- package/dist/esm/compliance/privacy/impersonalization.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/impersonalization.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/legal-hold-subject-attribution.shared.utils.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/legal-hold-subject-attribution.shared.utils.js.map +1 -1
- package/dist/esm/compliance/privacy/legal-holds.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/legal-holds.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/legal-holds.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/legal-holds.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.d.ts.map +1 -1
- 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/operator-compliance-identity.shared.schemas.js.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-category.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/personal-data-declaration.shared.utils.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/personal-data-declaration.shared.utils.js.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/provider-capability-disclosure.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/provider-capability-disclosure.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/purpose-ref.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/purpose-ref.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-binding.shared.utils.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/retention-binding.shared.utils.js.map +1 -1
- package/dist/esm/compliance/privacy/retention-enforcement-records.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/retention-enforcement-records.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/retention-enforcement-records.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/retention-enforcement-records.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/retention-schedule.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/retention-scope-deleted.shared.utils.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/retention-scope-deleted.shared.utils.js.map +1 -1
- package/dist/esm/compliance/privacy/sharing.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/sharing.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/subject-data-recipients.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/subject-data-recipients.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/subject-erasure-lane-evidence.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/subject-erasure-lane-evidence.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.js.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-render.shared.utils.js.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/compliance/review-cadence.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/review-cadence.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/risk-posture.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/risk-posture.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/app-configuration-shared.shared.schemas.js.map +1 -1
- package/dist/esm/config/app-frontend-type.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/app-frontend-type.shared.schemas.js.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/brand-assets.shared.schemas.js.map +1 -1
- package/dist/esm/config/configuration-validation.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/configuration-validation.shared.schemas.js.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 +22 -22
- package/dist/esm/config/frontend/chart-definition.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/frontend/chart-definition.shared.schemas.js.map +1 -1
- package/dist/esm/config/frontend/chart-registration-alignment.shared.d.ts.map +1 -1
- 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/navigation.shared.schemas.js.map +1 -1
- package/dist/esm/config/frontend/onboarding.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/frontend/onboarding.shared.schemas.js.map +1 -1
- package/dist/esm/config/postgresql.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/postgresql.shared.schemas.js.map +1 -1
- package/dist/esm/config/registration-acquisition-policy.shared.utils.d.ts.map +1 -1
- package/dist/esm/config/registration-acquisition-policy.shared.utils.js.map +1 -1
- package/dist/esm/config-authoring.entry.d.ts.map +1 -1
- package/dist/esm/config-authoring.entry.js.map +1 -1
- package/dist/esm/crdt/crdt-merge.shared.utils.d.ts.map +1 -1
- package/dist/esm/crdt/crdt-merge.shared.utils.js.map +1 -1
- package/dist/esm/data-seeding/data-seeding-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/data-seeding/data-seeding-config.shared.schemas.js.map +1 -1
- package/dist/esm/errors/caught-error-description.shared.utils.d.ts.map +1 -1
- package/dist/esm/errors/caught-error-description.shared.utils.js.map +1 -1
- 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.map +1 -1
- package/dist/esm/errors/errors.shared.definitions.d.ts.map +1 -1
- package/dist/esm/errors/errors.shared.definitions.js.map +1 -1
- package/dist/esm/errors/errors.shared.schemas.d.ts.map +1 -1
- package/dist/esm/errors/errors.shared.schemas.js.map +1 -1
- package/dist/esm/errors/errors.shared.utils.d.ts.map +1 -1
- package/dist/esm/errors/errors.shared.utils.js.map +1 -1
- package/dist/esm/errors/resource-access-forbidden.shared.error.d.ts.map +1 -1
- package/dist/esm/errors/resource-access-forbidden.shared.error.js.map +1 -1
- package/dist/esm/errors/thrown-value-description.shared.utils.d.ts.map +1 -1
- package/dist/esm/errors/thrown-value-description.shared.utils.js.map +1 -1
- package/dist/esm/errors/zod-issue-formatting.shared.utils.d.ts.map +1 -1
- package/dist/esm/errors/zod-issue-formatting.shared.utils.js.map +1 -1
- package/dist/esm/exports/tabular-csv.shared.utils.d.ts.map +1 -1
- package/dist/esm/exports/tabular-csv.shared.utils.js.map +1 -1
- package/dist/esm/external-data/external-data-pipeline-description.shared.d.ts.map +1 -1
- package/dist/esm/external-data/external-data-pipeline-description.shared.js.map +1 -1
- package/dist/esm/external-data/external-data-pipeline-pass-mode.shared.d.ts.map +1 -1
- package/dist/esm/external-data/external-data-pipeline-pass-mode.shared.js.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/external-data-provenance.shared.d.ts.map +1 -1
- package/dist/esm/external-data/external-data-provenance.shared.js.map +1 -1
- package/dist/esm/external-data.exports.d.ts.map +1 -1
- package/dist/esm/external-data.exports.js.map +1 -1
- package/dist/esm/external-providers/compose-provider-registry.shared.d.ts.map +1 -1
- package/dist/esm/external-providers/compose-provider-registry.shared.js.map +1 -1
- package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts.map +1 -1
- 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/engine-capability-surface.shared.d.ts.map +1 -1
- package/dist/esm/external-providers/engine-capability-surface.shared.js.map +1 -1
- package/dist/esm/external-providers/external-providers.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/external-providers.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.js.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.map +1 -1
- 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.map +1 -1
- package/dist/esm/external-providers/frontend-provider-public-config.shared.js.map +1 -1
- package/dist/esm/external-providers/model-cost-accounting-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/model-cost-accounting-config.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/provider-address-lookup-contract.shared.types.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-address-lookup-contract.shared.types.js.map +1 -1
- package/dist/esm/external-providers/provider-augmentation-opt-ins.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-augmentation-opt-ins.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/provider-authentication-assurance.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-authentication-assurance.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/provider-browser-operations.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-browser-operations.shared.schemas.js.map +1 -1
- 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.map +1 -1
- 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.map +1 -1
- package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.js.map +1 -1
- 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-package-allow-list.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-package-allow-list.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-scope-reauthorization.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-scope-reauthorization.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/provider-shared-connections.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-shared-connections.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-cost.shared.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-usage-cost.shared.js.map +1 -1
- package/dist/esm/external-providers/provider-usage-pricing.example.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-usage-pricing.example.js.map +1 -1
- package/dist/esm/external-providers/provider-usage-pricing.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-usage-pricing.shared.schemas.js.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.map +1 -1
- package/dist/esm/features/connected-feature.example.d.ts.map +1 -1
- package/dist/esm/features/connected-feature.example.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-definition.shared.schemas.js.map +1 -1
- package/dist/esm/features/feature-registry.shared.d.ts.map +1 -1
- package/dist/esm/features/feature-registry.shared.js.map +1 -1
- package/dist/esm/features/feature-resolution.shared.schemas.d.ts.map +1 -1
- package/dist/esm/features/feature-resolution.shared.schemas.js.map +1 -1
- package/dist/esm/features/scope-features.shared.schemas.d.ts.map +1 -1
- package/dist/esm/features/scope-features.shared.schemas.js.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.map +1 -1
- package/dist/esm/files/file-remote-reference-link.shared.schemas.d.ts.map +1 -1
- package/dist/esm/files/file-remote-reference-link.shared.schemas.js.map +1 -1
- 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.resources-config.schemas.js.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/files/files.shared.utils.js.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.resources-config.schemas.js.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-push-delivery-log.shared.schemas.js.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.resources-config.schemas.js.map +1 -1
- package/dist/esm/flows-actors/a2a-token-budget-state.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a-token-budget-state.shared.schemas.js.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/agent-traceability.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/agent-work-decisions.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/agent-work-decisions.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/flows-actors/agent-work-decisions.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/agent-work-decisions.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/agents.shared.schemas.d.ts +2 -2
- 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/autonomous-agents.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/autonomous-agents.shared.schemas.js.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/execution-plan-readiness.shared.utils.d.ts.map +1 -1
- package/dist/esm/flows-actors/execution-plan-readiness.shared.utils.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.resources-config.schemas.js.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.resources-config.schemas.js.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-task.shared.schemas.js.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.configuration.shared.schemas.js.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.frontend.shared.schemas.js.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.definitions.js.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/human-decision.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/human-decision.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/mcp-servers.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/mcp-servers.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/model-call-attributions.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/model-call-attributions.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/flows-actors/model-call-attributions.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/model-call-attributions.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/model-cost-period-aggregates.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/model-cost-period-aggregates.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/flows-actors/model-cost-period-aggregates.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/model-cost-period-aggregates.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/model-cost-summary.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/model-cost-summary.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/prompt-ir.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/prompt-ir.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/flows-actors/provider-call-records.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/provider-call-records.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/review-deadlines.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/review-deadlines.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/tasks.actors.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/tasks.actors.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/work-attribution.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/work-attribution.shared.schemas.js.map +1 -1
- package/dist/esm/frontend-definitions/frontend-notification-custom-message-ref.definitions.d.ts.map +1 -1
- package/dist/esm/frontend-definitions/frontend-notification-custom-message-ref.definitions.js.map +1 -1
- package/dist/esm/frontend-definitions/settings-destination-ref.definitions.d.ts.map +1 -1
- package/dist/esm/frontend-definitions/settings-destination-ref.definitions.js.map +1 -1
- package/dist/esm/guidance/guidance-flow.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/guidance-flow.shared.schemas.js.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.resources-config.schemas.js.map +1 -1
- package/dist/esm/guidance/guidance-state.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/guidance-state.shared.schemas.js.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-config.shared.schemas.js.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.resources-config.schemas.js.map +1 -1
- package/dist/esm/guidance/lifecycle-state.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/lifecycle-state.shared.schemas.js.map +1 -1
- package/dist/esm/guidance/milestone-builders.shared.d.ts.map +1 -1
- package/dist/esm/guidance/milestone-builders.shared.js.map +1 -1
- package/dist/esm/guidance/milestone-definition.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/milestone-definition.shared.schemas.js.map +1 -1
- package/dist/esm/guidance/progression-presentation.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/progression-presentation.shared.schemas.js.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.resources-config.schemas.js.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-id.shared.utils.js.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/http-api-binding/http-api-erasure-stance.shared.d.ts.map +1 -1
- package/dist/esm/http-api-binding/http-api-erasure-stance.shared.js.map +1 -1
- package/dist/esm/http-api-binding/http-api-rest-write-operations.shared.schemas.d.ts.map +1 -1
- package/dist/esm/http-api-binding/http-api-rest-write-operations.shared.schemas.js.map +1 -1
- package/dist/esm/http-api-binding/http-api-transport-dialect.shared.d.ts.map +1 -1
- package/dist/esm/http-api-binding/http-api-transport-dialect.shared.js.map +1 -1
- package/dist/esm/http-api-binding/read-through-engine-anchors.shared.d.ts.map +1 -1
- package/dist/esm/http-api-binding/read-through-engine-anchors.shared.js.map +1 -1
- package/dist/esm/i18n/application-config-vocabulary.shared.d.ts.map +1 -1
- package/dist/esm/i18n/application-config-vocabulary.shared.js.map +1 -1
- package/dist/esm/i18n/engine-open-vocabulary-values.shared.d.ts.map +1 -1
- package/dist/esm/i18n/engine-open-vocabulary-values.shared.js.map +1 -1
- package/dist/esm/i18n/engine-open-vocabulary.shared.d.ts.map +1 -1
- package/dist/esm/i18n/engine-open-vocabulary.shared.js.map +1 -1
- package/dist/esm/i18n/interpolate-label-params.shared.utils.d.ts.map +1 -1
- package/dist/esm/i18n/interpolate-label-params.shared.utils.js.map +1 -1
- package/dist/esm/i18n/labelling.dto.shared.schemas.d.ts.map +1 -1
- package/dist/esm/i18n/labelling.dto.shared.schemas.js.map +1 -1
- package/dist/esm/inbound/conversation-threads.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/inbound/conversation-threads.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/inbound/conversation-threads.shared.schemas.d.ts.map +1 -1
- package/dist/esm/inbound/conversation-threads.shared.schemas.js.map +1 -1
- package/dist/esm/inbound/inbound-channels.shared.schemas.d.ts.map +1 -1
- package/dist/esm/inbound/inbound-channels.shared.schemas.js.map +1 -1
- package/dist/esm/inbound/inbound-delivery.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/inbound/inbound-delivery.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/inbound/inbound-delivery.shared.schemas.d.ts.map +1 -1
- package/dist/esm/inbound/inbound-delivery.shared.schemas.js.map +1 -1
- package/dist/esm/inbound/inbound-endpoint-env.shared.d.ts.map +1 -1
- package/dist/esm/inbound/inbound-endpoint-env.shared.js.map +1 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/meta-workflows/actions.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/meta-workflows/actions.meta-workflows.shared.schemas.js.map +1 -1
- package/dist/esm/meta-workflows/catalog.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/meta-workflows/catalog.meta-workflows.shared.schemas.js.map +1 -1
- package/dist/esm/meta-workflows/coding-tasks.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/meta-workflows/coding-tasks.meta-workflows.shared.schemas.js.map +1 -1
- package/dist/esm/meta-workflows/context-selection.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/meta-workflows/context-selection.meta-workflows.shared.schemas.js.map +1 -1
- package/dist/esm/meta-workflows/decisions.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/meta-workflows/decisions.meta-workflows.shared.schemas.js.map +1 -1
- package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.js.map +1 -1
- package/dist/esm/meta-workflows/portable-primitives.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/meta-workflows/portable-primitives.meta-workflows.shared.schemas.js.map +1 -1
- package/dist/esm/meta-workflows.exports.d.ts.map +1 -1
- package/dist/esm/meta-workflows.exports.js.map +1 -1
- package/dist/esm/monitoring/monitoring.shared.schemas.d.ts.map +1 -1
- package/dist/esm/monitoring/monitoring.shared.schemas.js.map +1 -1
- package/dist/esm/notifications/email/email-context.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/email/email-context.shared.schemas.js.map +1 -1
- package/dist/esm/notifications/email/email-submission.shared.enums.d.ts.map +1 -1
- package/dist/esm/notifications/email/email-submission.shared.enums.js.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/inbound-email/inbound-email.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/inbound-email/inbound-email.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/notifications/inbound-email/inbound-email.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/inbound-email/inbound-email.shared.schemas.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-contract.shared.js.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.resources-config.schemas.js.map +1 -1
- package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.js.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/notification-badges.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/notifications/notifications.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/notifications.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/application-owner-organization.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/application-owner-organization.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.map +1 -1
- package/dist/esm/organizations/organization-features.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-features.shared.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.resources-config.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-members.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-members.shared.schemas.js.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.resources-config.schemas.js.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.resources-config.schemas.js.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.resources-config.schemas.js.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-inheritance.shared.js.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.resources-config.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-unit-members.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-unit-members.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-unit-narrowing-decision.shared.d.ts.map +1 -1
- package/dist/esm/organizations/organization-unit-narrowing-decision.shared.js.map +1 -1
- package/dist/esm/organizations/organization-unit-narrowing.example.d.ts.map +1 -1
- package/dist/esm/organizations/organization-unit-narrowing.example.js.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.path.d.ts.map +1 -1
- package/dist/esm/organizations/organization-units.shared.path.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.resources-config.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-units.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-units.shared.schemas.js.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/organizations.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/service-provider-activity-feed.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/service-provider-activity-feed.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/organizations/service-provider-activity-feed.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/service-provider-activity-feed.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/service-provider-capability-grants.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/service-provider-capability-grants.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/organizations/service-provider-capability-grants.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/service-provider-capability-grants.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/service-provider-client-controls.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/service-provider-client-controls.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/service-provider-relationships.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/service-provider-relationships.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/organizations/service-provider-relationships.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/service-provider-relationships.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/tenant-teardown-config.shared.schemas.d.ts.map +1 -1
- 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/provider-registration-runtime.exports.js.map +1 -1
- package/dist/esm/public-runtime/index.d.ts.map +1 -1
- 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 +8 -8
- 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/jobs.shared.utils.js.map +1 -1
- package/dist/esm/queue/queues.shared.schemas.d.ts.map +1 -1
- package/dist/esm/queue/queues.shared.schemas.js.map +1 -1
- package/dist/esm/queue/queues.shared.utils.d.ts.map +1 -1
- package/dist/esm/queue/queues.shared.utils.js.map +1 -1
- package/dist/esm/queue/rabbitmq-queue-args.shared.d.ts.map +1 -1
- package/dist/esm/queue/rabbitmq-queue-args.shared.js.map +1 -1
- package/dist/esm/rag/rag-retrieval-health.shared.d.ts.map +1 -1
- package/dist/esm/rag/rag-retrieval-health.shared.js.map +1 -1
- package/dist/esm/requests/header-keys.shared.d.ts.map +1 -1
- package/dist/esm/requests/header-keys.shared.js.map +1 -1
- package/dist/esm/requests/http-requests.shared.d.ts.map +1 -1
- package/dist/esm/requests/http-requests.shared.js.map +1 -1
- package/dist/esm/requests/idempotency-key.shared.d.ts.map +1 -1
- package/dist/esm/requests/idempotency-key.shared.js.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.map +1 -1
- package/dist/esm/requests/manual-controllers-routes-urls.d.ts.map +1 -1
- 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.map +1 -1
- 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/child-operations.shared.schemas.js.map +1 -1
- package/dist/esm/resources/collection-query-parameters.shared.d.ts.map +1 -1
- package/dist/esm/resources/collection-query-parameters.shared.js.map +1 -1
- package/dist/esm/resources/context-policy.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/context-policy.shared.schemas.js.map +1 -1
- package/dist/esm/resources/embedded-resource-mark.shared.utils.d.ts.map +1 -1
- package/dist/esm/resources/embedded-resource-mark.shared.utils.js.map +1 -1
- package/dist/esm/resources/relationship-display.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/relationship-display.shared.schemas.js.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.map +1 -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 +18 -2
- 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-serialization.shared.schemas.js.map +1 -1
- package/dist/esm/resources/resources.shared.core.definitions.d.ts.map +1 -1
- 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.map +1 -1
- 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/collection-export.shared.utils.js.map +1 -1
- package/dist/esm/resources/utils/composition-cascade-deletability.validation.d.ts.map +1 -1
- package/dist/esm/resources/utils/composition-cascade-deletability.validation.js.map +1 -1
- package/dist/esm/resources/utils/composition-seedability.validation.d.ts.map +1 -1
- package/dist/esm/resources/utils/composition-seedability.validation.js.map +1 -1
- package/dist/esm/resources/utils/context-addressed-composition-singleton.shared.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/context-addressed-composition-singleton.shared.utils.js.map +1 -1
- package/dist/esm/resources/utils/dependent-lifecycle-classification.validation.d.ts.map +1 -1
- package/dist/esm/resources/utils/dependent-lifecycle-classification.validation.js.map +1 -1
- package/dist/esm/resources/utils/duplicate-relationship-registration.validation.d.ts.map +1 -1
- package/dist/esm/resources/utils/duplicate-relationship-registration.validation.js.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/http-api-write-declaration.shared.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/http-api-write-declaration.shared.utils.js.map +1 -1
- package/dist/esm/resources/utils/initiator-stamped-field-satisfiability.validation.d.ts.map +1 -1
- package/dist/esm/resources/utils/initiator-stamped-field-satisfiability.validation.js.map +1 -1
- package/dist/esm/resources/utils/no-subject-data-stance-coherence.shared.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/no-subject-data-stance-coherence.shared.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/persistence-adapter-discrimination.shared.utils.js.map +1 -1
- package/dist/esm/resources/utils/populated-file-fields.shared.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/populated-file-fields.shared.utils.js.map +1 -1
- package/dist/esm/resources/utils/repository-dto-builder.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/repository-dto-builder.utils.js.map +1 -1
- package/dist/esm/resources/utils/request-schema-field-carriage.shared.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/request-schema-field-carriage.shared.utils.js.map +1 -1
- package/dist/esm/resources/utils/required-fk-fillability.validation.d.ts.map +1 -1
- package/dist/esm/resources/utils/required-fk-fillability.validation.js.map +1 -1
- package/dist/esm/resources/utils/resource-operation-type-guards.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-operation-type-guards.utils.js.map +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.factory.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.factory.js.map +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.relationships.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.relationships.js.map +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.schemas.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.schemas.js.map +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.utils.js.map +1 -1
- package/dist/esm/resources/utils/resource-subtree.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-subtree.utils.js.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-context-needs.utils.js.map +1 -1
- package/dist/esm/resources/utils/resources-config-naming.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-config-naming.utils.js.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.dtos-builder.utils.js.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.path.utils.js.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.urls-builder.utils.js.map +1 -1
- package/dist/esm/resources/utils/resources-config-operations.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-config-operations.utils.js.map +1 -1
- package/dist/esm/resources/utils/resources-serialization.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-serialization.utils.js.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-family-builder.utils.js.map +1 -1
- package/dist/esm/resources/utils/schema-type-inference.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/schema-type-inference.utils.js.map +1 -1
- package/dist/esm/resources/utils/schema-type-utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/schema-type-utils.js.map +1 -1
- package/dist/esm/resources/utils/schema-variant-resolver.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/schema-variant-resolver.utils.js.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/resources/utils/templatable-file-fields.shared.utils.js.map +1 -1
- package/dist/esm/resources/work-unit.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/work-unit.shared.schemas.js.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/runtime/execution-context.shared.schemas.js.map +1 -1
- package/dist/esm/runtime/runtime.shared.schemas.d.ts.map +1 -1
- package/dist/esm/runtime/runtime.shared.schemas.js.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/api-keys/api-keys.shared.schemas.js.map +1 -1
- package/dist/esm/security/authentications/anonymous-session/anonymous-session.shared.contract.d.ts.map +1 -1
- package/dist/esm/security/authentications/anonymous-session/anonymous-session.shared.contract.js.map +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/authentication.shared.utils.js.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/cross-frontend-handoff.shared.dto.schemas.js.map +1 -1
- package/dist/esm/security/authentications/mfa-backup-code-contract.shared.d.ts.map +1 -1
- package/dist/esm/security/authentications/mfa-backup-code-contract.shared.js.map +1 -1
- package/dist/esm/security/authentications/password-blocklist.shared.utils.d.ts.map +1 -1
- package/dist/esm/security/authentications/password-blocklist.shared.utils.js.map +1 -1
- package/dist/esm/security/authentications/password-reset.shared.dto.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/password-reset.shared.dto.schemas.js.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/same-origin-redirect-path.shared.d.ts.map +1 -1
- package/dist/esm/security/authentications/same-origin-redirect-path.shared.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-organization-unit-mapping.shared.js.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.resources-config.schemas.js.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.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/authentications/scim/scim-tokens.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/scim/scim-tokens.shared.schemas.js.map +1 -1
- package/dist/esm/security/authentications/service-provider-client-authentication.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/service-provider-client-authentication.shared.schemas.js.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.resources-config.schemas.js.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-dlq.shared.schemas.js.map +1 -1
- package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.schemas.js.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.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.js.map +1 -1
- 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.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.resources-config.schemas.js.map +1 -1
- 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.map +1 -1
- package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/authorizations/application-access-grants.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authorizations/application-access-grants.shared.schemas.js.map +1 -1
- 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.map +1 -1
- 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.defaults.js.map +1 -1
- package/dist/esm/security/authorizations/roles.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authorizations/roles.shared.schemas.js.map +1 -1
- package/dist/esm/security/authorizations/roles.shared.utils.d.ts.map +1 -1
- package/dist/esm/security/authorizations/roles.shared.utils.js.map +1 -1
- package/dist/esm/security/connected-accounts/provider-connection-listing.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/provider-connection-listing.shared.schemas.js.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.map +1 -1
- package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js.map +1 -1
- package/dist/esm/security/credential-rotation-grace.shared.utils.d.ts.map +1 -1
- package/dist/esm/security/credential-rotation-grace.shared.utils.js.map +1 -1
- package/dist/esm/security/crypto-keys/crypto-keys.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/crypto-keys/crypto-keys.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.resources-config.schemas.js.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/security/oauth-clients/oauth-resource-server.shared.schemas.js.map +1 -1
- package/dist/esm/security/outbound-target-control.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/outbound-target-control.shared.schemas.js.map +1 -1
- package/dist/esm/security/submission-challenge/submission-challenge.shared.d.ts.map +1 -1
- package/dist/esm/security/submission-challenge/submission-challenge.shared.js.map +1 -1
- package/dist/esm/systems-of-record/system-of-record-actions.shared.schemas.d.ts.map +1 -1
- package/dist/esm/systems-of-record/system-of-record-actions.shared.schemas.js.map +1 -1
- package/dist/esm/systems-of-record/system-of-record-credential-kind.shared.d.ts.map +1 -1
- package/dist/esm/systems-of-record/system-of-record-credential-kind.shared.js.map +1 -1
- package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.d.ts.map +1 -1
- package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.js.map +1 -1
- package/dist/esm/systems-of-record/system-of-record-env.shared.d.ts.map +1 -1
- package/dist/esm/systems-of-record/system-of-record-env.shared.js.map +1 -1
- package/dist/esm/systems-of-record/system-of-record-error-codes.shared.d.ts.map +1 -1
- package/dist/esm/systems-of-record/system-of-record-error-codes.shared.js.map +1 -1
- package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.d.ts.map +1 -1
- package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.js.map +1 -1
- package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.schemas.d.ts.map +1 -1
- package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.schemas.js.map +1 -1
- package/dist/esm/testing/resource-config-builders.d.ts.map +1 -1
- package/dist/esm/testing/resource-config-builders.js.map +1 -1
- package/dist/esm/testing.d.ts.map +1 -1
- package/dist/esm/testing.js.map +1 -1
- package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.js.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.resources-config.schemas.js.map +1 -1
- package/dist/esm/users/anonymous-users.shared.schema.d.ts.map +1 -1
- package/dist/esm/users/anonymous-users.shared.schema.js.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.resources-config.schemas.js.map +1 -1
- package/dist/esm/users/inbound-contacts.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/inbound-contacts.shared.schemas.js.map +1 -1
- package/dist/esm/users/user-consent-decision.shared.utils.d.ts.map +1 -1
- package/dist/esm/users/user-consent-decision.shared.utils.js.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.resources-config.schemas.js.map +1 -1
- package/dist/esm/users/user-credentials.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-credentials.shared.schemas.js.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.resources-config.schemas.js.map +1 -1
- package/dist/esm/users/user-identity-links.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-identity-links.shared.schemas.js.map +1 -1
- package/dist/esm/users/user-preferences-reset.shared.utils.d.ts.map +1 -1
- package/dist/esm/users/user-preferences-reset.shared.utils.js.map +1 -1
- package/dist/esm/users/user-preferences.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-preferences.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/users/user-profiles.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-profiles.shared.resources-config.schemas.js.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-preferences.shared.resources-config.schemas.js.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-profiles.shared.resources-config.schemas.js.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.map +1 -1
- package/dist/esm/users/users.shared.schemas.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/package.json +4 -4
- package/dist/esm/compliance/privacy/data-retention.shared.schemas.d.ts +0 -0
- package/dist/esm/compliance/privacy/data-retention.shared.schemas.d.ts.map +0 -0
- package/dist/esm/compliance/privacy/data-retention.shared.schemas.js.map +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider-metadata.shared.schemas.js","sourceRoot":"","sources":["../../../../src/external-providers/provider-metadata.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;;;GAMG;AACH,MAAM,UAAU,gCAAgC,CAAC,WAAmB;IAClE,OAAO,aAAa,WAAW,cAAc,CAAC;AAChD,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,CAAN,IAAY,YAuBX;AAvBD,WAAY,YAAY;IACtB;;;;;;OAMG;IACH,6BAAa,CAAA;IACb;;;;;OAKG;IACH,uCAAuB,CAAA;IACvB;;;;;OAKG;IACH,uCAAuB,CAAA;AACzB,CAAC,EAvBW,YAAY,KAAZ,YAAY,QAuBvB;AAED,iDAAiD;AACjD,MAAM,CAAN,IAAY,kBAWX;AAXD,WAAY,kBAAkB;IAC5B,yDAAyD;IACzD,uCAAiB,CAAA;IACjB,yEAAyE;IACzE,iDAA2B,CAAA;IAC3B;;;;OAIG;IACH,6CAAuB,CAAA;AACzB,CAAC,EAXW,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K,CAAC;QAClC,GAAG,EAAE,KAAK,CAAC,GAAG;QACd,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,MAAM,EAAE,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,GAAG;QACjC,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,mBAAmB,EAAE,gCAAgC,CAAC,KAAK,CAAC,GAAG,CAAC;QAChE,GAAG,CAAC,KAAK,CAAC,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,KAAK,CAAC,WAAW,EAAE,CAAC;QAC9E,GAAG,CAAC,KAAK,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC;KACnE,CAAqB,CAAC;AACzB,CAAC","sourcesContent":["/**\n * `ProviderMetadata` — shared, frontend-safe header carried by every\n * provider module across every facet (backend, frontend-app, techdoc,\n * website).\n *\n * Intentionally **frontend-safe**: holds no secrets, no protocol\n * contracts, no backend behavior. The fields are exactly what a UI needs\n * to render a provider entry (translation-ready display-name key, optional\n * legacy fallback label, optional icon ref) plus the stable `ref` used as\n * the join key between facet modules — and, since #328, the provider's\n * IDENTITY: which package ships it, which tier it belongs to, which vendor\n * groups it, and where it came from.\n *\n * ## Why identity lives here and not on the ref\n *\n * A bare `ref` string cannot say whether a provider is one the engine\n * REQUIRES (a MAIN provider binding an `EngineCapability` slot), one that\n * merely MAY bind a slot as a substitute (EXTENSION), or one of the bulk\n * loaded on demand that must never claim a slot (CATALOGUE). Nor can it say\n * that `microsoft-graph-mail` and `microsoft-teams` are two packages of one\n * vendor sharing an OAuth client. Encoding any of that in the ref's\n * spelling is invisible to the compiler and to every consumer; encoding it\n * as fields is what lets composition ENFORCE the tier rule\n * (`assertProviderTierCoherence`) and lets tooling display and group.\n *\n * The identity fields are REQUIRED. A provider without a tier is a provider\n * nobody has decided about, and \"undecided\" must not parse as \"fine\".\n */\n\nimport { z } from 'zod';\n\n\n/**\n * Translation key builder for provider display names.\n *\n * Provider modules stay locale-neutral by exporting this stable label key;\n * consuming frontend surfaces resolve it via the app i18n service at render\n * time instead of freezing human copy into generated/runtime artifacts.\n */\nexport function buildProviderDisplayNameLabelKey(providerRef: string): string {\n return `providers.${providerRef}.displayName`;\n}\n\n/**\n * The three provider tiers (decided 2026-09-05, epic #337).\n *\n * The tier is a DECISION recorded on the module, never inferred from its\n * capabilities at runtime — inference is silent and wrong for a provider\n * such as Odoo, whose empty capability list says nothing about whether the\n * engine depends on it.\n */\nexport enum ProviderTier {\n /**\n * Mandatory, engine-shipped. Binds an `EngineCapability` slot the engine\n * itself consumes (email, billing, SMS, the AI slots) or is an SSO login\n * provider the auth subsystem consumes. MAIN is the engine's own set:\n * its origin is always `ENGINE`, and it is what stays in the static\n * engine registry when everything else loads on demand.\n */\n MAIN = 'MAIN',\n /**\n * May ALSO bind an engine slot, as a substitute for a MAIN provider\n * (a second email sink, a telemetry sink, an audit sink). Kept distinct\n * from MAIN so the engine's floor is not confused with what happens to\n * be installed.\n */\n EXTENSION = 'EXTENSION',\n /**\n * The bulk: integrations with no engine slot, loaded on demand when an\n * application declares them. A CATALOGUE provider may claim only OPEN\n * `ProviderCapability` tokens — never one that maps to an engine slot —\n * which composition enforces.\n */\n CATALOGUE = 'CATALOGUE',\n}\n\n/** Where a provider module's code comes from. */\nexport enum ProviderOriginKind {\n /** Shipped by the framework's own connector packages. */\n ENGINE = 'ENGINE',\n /** Authored inside an application (its own `provider-contributions`). */\n APPLICATION = 'APPLICATION',\n /**\n * Emitted by the framework packager from an external catalogue source;\n * carries the catalogue provenance so the wrapped upstream artifact can\n * be named, attributed and re-generated.\n */\n GENERATED = 'GENERATED',\n}\n\n/**\n * External catalogues a build-time MAPPER reads to emit a native Wildo provider package.\n *\n * Every member is a SOURCE that is read, never a runtime the application depends on: the mapper\n * extracts each operation's method, URL template, parameters and auth shape as DATA, and Wildo's\n * own HTTP client executes them. Nothing third-party is installed or executed by a generated\n * application. (An earlier revision of this enum described Activepieces as a set of executable\n * bundles Wildo would WRAP; that model was built, measured and deleted on 2026-09-06 — see\n * `providers-are-scraped-never-wrapped`.)\n *\n * - `ACTIVEPIECES` — the community pieces monorepo. Each piece's actions and triggers call\n * `httpClient.sendRequest({ method, url, body })` in plain TypeScript an AST pass can read.\n * Note the PUBLISHED bundle is NOT a usable input: its metadata carries name, inputs and auth\n * but not the endpoint, which lives inside the compiled `run`.\n * - `SIM` — Sim's tool modules, whose request declaration carries URL and headers the same way.\n * Their `transformResponse` / `postProcess` are functions and are deliberately not read; response\n * shaping stays Wildo's.\n * - `OPENAPI_DOCUMENT` — a vendor's OpenAPI document, read as an ORACLE rather than as a catalogue:\n * it never decides WHICH operations exist, and answers questions about the operations the two\n * catalogues chose — the response shape, and the names of path holes a catalogue could only name\n * by position (#1572). Consulted on every full batch, from a public corpus or from a URL a\n * provider decision pins.\n */\nexport enum ProviderCatalogueSource {\n ACTIVEPIECES = 'ACTIVEPIECES',\n SIM = 'SIM',\n OPENAPI_DOCUMENT = 'OPENAPI_DOCUMENT',\n}\n\nexport const ProviderCatalogueProvenanceSchema = z.object({\n source: z.enum(ProviderCatalogueSource),\n /**\n * The upstream artifact read, addressed the way its catalogue addresses it: the piece's\n * directory or package name, the Sim tool's module, the OpenAPI document's path.\n */\n sourceRef: z.string().min(1),\n /**\n * The exact upstream revision read — a source-control revision for a monorepo catalogue, a\n * document version for an OpenAPI input. A re-generation pins a new one, which is what makes a\n * regenerated package's diff attributable to a specific upstream movement.\n */\n sourceVersion: z.string().min(1),\n});\nexport type ProviderCatalogueProvenance = z.infer<typeof ProviderCatalogueProvenanceSchema>;\n\n/**\n * Origin as ONE object with a `kind` and a provenance that is REQUIRED exactly when the kind is\n * `GENERATED` (and forbidden otherwise), enforced by the refinement below.\n *\n * Not a `z.discriminatedUnion`, deliberately: under `strictNullChecks: false` — how the engine\n * packages compile — Zod 4 infers a union-typed object key as OPTIONAL (the members' `optout`\n * collapses to `\"optional\"` once `undefined` is erased), so `metadata.origin` would type as\n * omittable in every engine consumer while the runtime refused its absence. A plain object\n * infers as required in both modes; the invariant the union expressed lives in the refinement\n * and in the `ProviderOrigin` type below.\n */\nexport const ProviderOriginSchema = z\n .object({\n kind: z.enum(ProviderOriginKind),\n /** Present iff `kind === GENERATED`. */\n catalogue: ProviderCatalogueProvenanceSchema.optional(),\n })\n .superRefine((origin, ctx) => {\n if (origin.kind === ProviderOriginKind.GENERATED && origin.catalogue === undefined) {\n ctx.addIssue({ code: 'custom', path: ['catalogue'], message: 'A GENERATED origin must carry its catalogue provenance.' });\n }\n if (origin.kind !== ProviderOriginKind.GENERATED && origin.catalogue !== undefined) {\n ctx.addIssue({ code: 'custom', path: ['catalogue'], message: `Only a GENERATED origin carries catalogue provenance (kind is ${origin.kind}).` });\n }\n });\nexport type ProviderOrigin =\n | { kind: ProviderOriginKind.ENGINE; catalogue?: undefined }\n | { kind: ProviderOriginKind.APPLICATION; catalogue?: undefined }\n | { kind: ProviderOriginKind.GENERATED; catalogue: ProviderCatalogueProvenance };\n\n/** The one engine origin value, so 22 modules do not each spell it. */\nexport const ENGINE_PROVIDER_ORIGIN: ProviderOrigin = Object.freeze({ kind: ProviderOriginKind.ENGINE });\n\nexport const ProviderMetadataSchema = z.object({\n /**\n * Stable identifier for the provider, e.g. `'resend'`, `'stripe'`,\n * `'openai'`. Used as the join key across facet modules and as the\n * map key inside `BackendProviderRegistry.modules`.\n */\n ref: z.string().min(1),\n /**\n * The npm package that ships this provider's module(s), e.g.\n * `@wildo-ai/external-connectors-private` for an engine provider or\n * `@wildo-ai/provider-slack` for a per-provider package. One package,\n * several facet barrels — this is the package, not a barrel.\n */\n packageName: z.string().min(1),\n /** See {@link ProviderTier}. A recorded decision, never inferred. */\n tier: z.enum(ProviderTier),\n /**\n * Vendor grouping. Equal to `ref` for a single-package vendor; the shared\n * name for a sub-cut vendor (`vendor: 'microsoft'` on both\n * `microsoft-graph-mail` and `microsoft-teams`), which is what lets an\n * OAuth client or a secret be shared by reference across sub-packages.\n */\n vendor: z.string().min(1),\n /** See {@link ProviderOriginSchema}. */\n origin: ProviderOriginSchema,\n /**\n * Translation-ready key for the provider display name.\n *\n * Frontend/public surfaces should prefer this field over embedding\n * locale-bound copy in provider modules or runtime artifacts.\n */\n displayNameLabelKey: z.string().optional(),\n /**\n * Legacy human-readable fallback label for non-i18n-aware consumers.\n * When absent, consumers fall back to the `ref`.\n */\n displayName: z.string().optional(),\n /**\n * Optional icon reference resolved through the frontend icon registry.\n * Stays a string (not a URL or component reference) to keep this type\n * frontend-safe AND portable to non-React surfaces.\n */\n iconRef: z.string().optional(),\n});\n\nexport type ProviderMetadata = Omit<z.infer<typeof ProviderMetadataSchema>, 'origin'> & { origin: ProviderOrigin };\n\n/**\n * The identity half of {@link ProviderMetadataSchema} on its own — what a\n * companion contribution carries so tooling can display tiers and group\n * vendors without loading a provider's runtime module.\n */\nexport const ProviderIdentitySchema = ProviderMetadataSchema.pick({\n packageName: true,\n tier: true,\n vendor: true,\n origin: true,\n});\nexport type ProviderIdentity = Omit<z.infer<typeof ProviderIdentitySchema>, 'origin'> & { origin: ProviderOrigin };\n\nexport interface DefineProviderMetadataInput {\n ref: string;\n packageName: string;\n tier: ProviderTier;\n origin: ProviderOrigin;\n /** Defaults to `ref` — the single-package vendor case. */\n vendor?: string;\n displayName?: string;\n iconRef?: string;\n}\n\n/**\n * The one way a provider module authors its metadata.\n *\n * Derives `displayNameLabelKey` from the ref (every module used to call\n * `buildProviderDisplayNameLabelKey` by hand), defaults `vendor` to the ref,\n * and parses the result so an incomplete identity fails at MODULE LOAD —\n * in the package that owns the module — rather than at the first consumer\n * that reads a field which is not there.\n */\nexport function defineProviderMetadata(input: DefineProviderMetadataInput): ProviderMetadata {\n return ProviderMetadataSchema.parse({\n ref: input.ref,\n packageName: input.packageName,\n tier: input.tier,\n vendor: input.vendor ?? input.ref,\n origin: input.origin,\n displayNameLabelKey: buildProviderDisplayNameLabelKey(input.ref),\n ...(input.displayName === undefined ? {} : { displayName: input.displayName }),\n ...(input.iconRef === undefined ? {} : { iconRef: input.iconRef }),\n }) as ProviderMetadata;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"provider-metadata.shared.schemas.js","sourceRoot":"","sources":["../../../src/external-providers/provider-metadata.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;;;GAMG;AACH,MAAM,UAAU,gCAAgC,CAAC,WAAmB;IAClE,OAAO,aAAa,WAAW,cAAc,CAAC;AAChD,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,CAAN,IAAY,YAuBX;AAvBD,WAAY,YAAY;IACtB;;;;;;OAMG;IACH,6BAAa,CAAA;IACb;;;;;OAKG;IACH,uCAAuB,CAAA;IACvB;;;;;OAKG;IACH,uCAAuB,CAAA;AACzB,CAAC,EAvBW,YAAY,KAAZ,YAAY,QAuBvB;AAED,iDAAiD;AACjD,MAAM,CAAN,IAAY,kBAWX;AAXD,WAAY,kBAAkB;IAC5B,yDAAyD;IACzD,uCAAiB,CAAA;IACjB,yEAAyE;IACzE,iDAA2B,CAAA;IAC3B;;;;OAIG;IACH,6CAAuB,CAAA;AACzB,CAAC,EAXW,kBAAkB,KAAlB,kBAAkB,QAW7B;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAN,IAAY,uBAIX;AAJD,WAAY,uBAAuB;IACjC,wDAA6B,CAAA;IAC7B,sCAAW,CAAA;IACX,gEAAqC,CAAA;AACvC,CAAC,EAJW,uBAAuB,KAAvB,uBAAuB,QAIlC;AAED,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,CAAC,MAAM,CAAC;IACxD,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,uBAAu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EAAE,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,KAAK,CAAC,WAAW,EAAE,CAAC;QAC9E,GAAG,CAAC,KAAK,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC;KACnE,CAAqB,CAAC;AACzB,CAAC","sourcesContent":["/**\n * `ProviderMetadata` — shared, frontend-safe header carried by every\n * provider module across every facet (backend, frontend-app, techdoc,\n * website).\n *\n * Intentionally **frontend-safe**: holds no secrets, no protocol\n * contracts, no backend behavior. The fields are exactly what a UI needs\n * to render a provider entry (translation-ready display-name key, optional\n * legacy fallback label, optional icon ref) plus the stable `ref` used as\n * the join key between facet modules — and, since #328, the provider's\n * IDENTITY: which package ships it, which tier it belongs to, which vendor\n * groups it, and where it came from.\n *\n * ## Why identity lives here and not on the ref\n *\n * A bare `ref` string cannot say whether a provider is one the engine\n * REQUIRES (a MAIN provider binding an `EngineCapability` slot), one that\n * merely MAY bind a slot as a substitute (EXTENSION), or one of the bulk\n * loaded on demand that must never claim a slot (CATALOGUE). Nor can it say\n * that `microsoft-graph-mail` and `microsoft-teams` are two packages of one\n * vendor sharing an OAuth client. Encoding any of that in the ref's\n * spelling is invisible to the compiler and to every consumer; encoding it\n * as fields is what lets composition ENFORCE the tier rule\n * (`assertProviderTierCoherence`) and lets tooling display and group.\n *\n * The identity fields are REQUIRED. A provider without a tier is a provider\n * nobody has decided about, and \"undecided\" must not parse as \"fine\".\n */\n\nimport { z } from 'zod';\n\n\n/**\n * Translation key builder for provider display names.\n *\n * Provider modules stay locale-neutral by exporting this stable label key;\n * consuming frontend surfaces resolve it via the app i18n service at render\n * time instead of freezing human copy into generated/runtime artifacts.\n */\nexport function buildProviderDisplayNameLabelKey(providerRef: string): string {\n return `providers.${providerRef}.displayName`;\n}\n\n/**\n * The three provider tiers (decided 2026-09-05, epic #337).\n *\n * The tier is a DECISION recorded on the module, never inferred from its\n * capabilities at runtime — inference is silent and wrong for a provider\n * such as Odoo, whose empty capability list says nothing about whether the\n * engine depends on it.\n */\nexport enum ProviderTier {\n /**\n * Mandatory, engine-shipped. Binds an `EngineCapability` slot the engine\n * itself consumes (email, billing, SMS, the AI slots) or is an SSO login\n * provider the auth subsystem consumes. MAIN is the engine's own set:\n * its origin is always `ENGINE`, and it is what stays in the static\n * engine registry when everything else loads on demand.\n */\n MAIN = 'MAIN',\n /**\n * May ALSO bind an engine slot, as a substitute for a MAIN provider\n * (a second email sink, a telemetry sink, an audit sink). Kept distinct\n * from MAIN so the engine's floor is not confused with what happens to\n * be installed.\n */\n EXTENSION = 'EXTENSION',\n /**\n * The bulk: integrations with no engine slot, loaded on demand when an\n * application declares them. A CATALOGUE provider may claim only OPEN\n * `ProviderCapability` tokens — never one that maps to an engine slot —\n * which composition enforces.\n */\n CATALOGUE = 'CATALOGUE',\n}\n\n/** Where a provider module's code comes from. */\nexport enum ProviderOriginKind {\n /** Shipped by the framework's own connector packages. */\n ENGINE = 'ENGINE',\n /** Authored inside an application (its own `provider-contributions`). */\n APPLICATION = 'APPLICATION',\n /**\n * Emitted by the framework packager from an external catalogue source;\n * carries the catalogue provenance so the wrapped upstream artifact can\n * be named, attributed and re-generated.\n */\n GENERATED = 'GENERATED',\n}\n\n/**\n * External catalogues a build-time MAPPER reads to emit a native Wildo provider package.\n *\n * Every member is a SOURCE that is read, never a runtime the application depends on: the mapper\n * extracts each operation's method, URL template, parameters and auth shape as DATA, and Wildo's\n * own HTTP client executes them. Nothing third-party is installed or executed by a generated\n * application. (An earlier revision of this enum described Activepieces as a set of executable\n * bundles Wildo would WRAP; that model was built, measured and deleted on 2026-09-06 — see\n * `providers-are-scraped-never-wrapped`.)\n *\n * - `ACTIVEPIECES` — the community pieces monorepo. Each piece's actions and triggers call\n * `httpClient.sendRequest({ method, url, body })` in plain TypeScript an AST pass can read.\n * Note the PUBLISHED bundle is NOT a usable input: its metadata carries name, inputs and auth\n * but not the endpoint, which lives inside the compiled `run`.\n * - `SIM` — Sim's tool modules, whose request declaration carries URL and headers the same way.\n * Their `transformResponse` / `postProcess` are functions and are deliberately not read; response\n * shaping stays Wildo's.\n * - `OPENAPI_DOCUMENT` — a vendor's OpenAPI document, read as an ORACLE rather than as a catalogue:\n * it never decides WHICH operations exist, and answers questions about the operations the two\n * catalogues chose — the response shape, and the names of path holes a catalogue could only name\n * by position (#1572). Consulted on every full batch, from a public corpus or from a URL a\n * provider decision pins.\n */\nexport enum ProviderCatalogueSource {\n ACTIVEPIECES = 'ACTIVEPIECES',\n SIM = 'SIM',\n OPENAPI_DOCUMENT = 'OPENAPI_DOCUMENT',\n}\n\nexport const ProviderCatalogueProvenanceSchema = z.object({\n source: z.enum(ProviderCatalogueSource),\n /**\n * The upstream artifact read, addressed the way its catalogue addresses it: the piece's\n * directory or package name, the Sim tool's module, the OpenAPI document's path.\n */\n sourceRef: z.string().min(1),\n /**\n * The exact upstream revision read — a source-control revision for a monorepo catalogue, a\n * document version for an OpenAPI input. A re-generation pins a new one, which is what makes a\n * regenerated package's diff attributable to a specific upstream movement.\n */\n sourceVersion: z.string().min(1),\n});\nexport type ProviderCatalogueProvenance = z.infer<typeof ProviderCatalogueProvenanceSchema>;\n\n/**\n * Origin as ONE object with a `kind` and a provenance that is REQUIRED exactly when the kind is\n * `GENERATED` (and forbidden otherwise), enforced by the refinement below.\n *\n * Not a `z.discriminatedUnion`, deliberately: under `strictNullChecks: false` — how the engine\n * packages compile — Zod 4 infers a union-typed object key as OPTIONAL (the members' `optout`\n * collapses to `\"optional\"` once `undefined` is erased), so `metadata.origin` would type as\n * omittable in every engine consumer while the runtime refused its absence. A plain object\n * infers as required in both modes; the invariant the union expressed lives in the refinement\n * and in the `ProviderOrigin` type below.\n */\nexport const ProviderOriginSchema = z\n .object({\n kind: z.enum(ProviderOriginKind),\n /** Present iff `kind === GENERATED`. */\n catalogue: ProviderCatalogueProvenanceSchema.optional(),\n })\n .superRefine((origin, ctx) => {\n if (origin.kind === ProviderOriginKind.GENERATED && origin.catalogue === undefined) {\n ctx.addIssue({ code: 'custom', path: ['catalogue'], message: 'A GENERATED origin must carry its catalogue provenance.' });\n }\n if (origin.kind !== ProviderOriginKind.GENERATED && origin.catalogue !== undefined) {\n ctx.addIssue({ code: 'custom', path: ['catalogue'], message: `Only a GENERATED origin carries catalogue provenance (kind is ${origin.kind}).` });\n }\n });\nexport type ProviderOrigin =\n | { kind: ProviderOriginKind.ENGINE; catalogue?: undefined }\n | { kind: ProviderOriginKind.APPLICATION; catalogue?: undefined }\n | { kind: ProviderOriginKind.GENERATED; catalogue: ProviderCatalogueProvenance };\n\n/** The one engine origin value, so 22 modules do not each spell it. */\nexport const ENGINE_PROVIDER_ORIGIN: ProviderOrigin = Object.freeze({ kind: ProviderOriginKind.ENGINE });\n\nexport const ProviderMetadataSchema = z.object({\n /**\n * Stable identifier for the provider, e.g. `'resend'`, `'stripe'`,\n * `'openai'`. Used as the join key across facet modules and as the\n * map key inside `BackendProviderRegistry.modules`.\n */\n ref: z.string().min(1),\n /**\n * The npm package that ships this provider's module(s), e.g.\n * `@wildo-ai/external-connectors-private` for an engine provider or\n * `@wildo-ai/provider-slack` for a per-provider package. One package,\n * several facet barrels — this is the package, not a barrel.\n */\n packageName: z.string().min(1),\n /** See {@link ProviderTier}. A recorded decision, never inferred. */\n tier: z.enum(ProviderTier),\n /**\n * Vendor grouping. Equal to `ref` for a single-package vendor; the shared\n * name for a sub-cut vendor (`vendor: 'microsoft'` on both\n * `microsoft-graph-mail` and `microsoft-teams`), which is what lets an\n * OAuth client or a secret be shared by reference across sub-packages.\n */\n vendor: z.string().min(1),\n /** See {@link ProviderOriginSchema}. */\n origin: ProviderOriginSchema,\n /**\n * Translation-ready key for the provider display name.\n *\n * Frontend/public surfaces should prefer this field over embedding\n * locale-bound copy in provider modules or runtime artifacts.\n */\n displayNameLabelKey: z.string().optional(),\n /**\n * Legacy human-readable fallback label for non-i18n-aware consumers.\n * When absent, consumers fall back to the `ref`.\n */\n displayName: z.string().optional(),\n /**\n * Optional icon reference resolved through the frontend icon registry.\n * Stays a string (not a URL or component reference) to keep this type\n * frontend-safe AND portable to non-React surfaces.\n */\n iconRef: z.string().optional(),\n});\n\nexport type ProviderMetadata = Omit<z.infer<typeof ProviderMetadataSchema>, 'origin'> & { origin: ProviderOrigin };\n\n/**\n * The identity half of {@link ProviderMetadataSchema} on its own — what a\n * companion contribution carries so tooling can display tiers and group\n * vendors without loading a provider's runtime module.\n */\nexport const ProviderIdentitySchema = ProviderMetadataSchema.pick({\n packageName: true,\n tier: true,\n vendor: true,\n origin: true,\n});\nexport type ProviderIdentity = Omit<z.infer<typeof ProviderIdentitySchema>, 'origin'> & { origin: ProviderOrigin };\n\nexport interface DefineProviderMetadataInput {\n ref: string;\n packageName: string;\n tier: ProviderTier;\n origin: ProviderOrigin;\n /** Defaults to `ref` — the single-package vendor case. */\n vendor?: string;\n displayName?: string;\n iconRef?: string;\n}\n\n/**\n * The one way a provider module authors its metadata.\n *\n * Derives `displayNameLabelKey` from the ref (every module used to call\n * `buildProviderDisplayNameLabelKey` by hand), defaults `vendor` to the ref,\n * and parses the result so an incomplete identity fails at MODULE LOAD —\n * in the package that owns the module — rather than at the first consumer\n * that reads a field which is not there.\n */\nexport function defineProviderMetadata(input: DefineProviderMetadataInput): ProviderMetadata {\n return ProviderMetadataSchema.parse({\n ref: input.ref,\n packageName: input.packageName,\n tier: input.tier,\n vendor: input.vendor ?? input.ref,\n origin: input.origin,\n displayNameLabelKey: buildProviderDisplayNameLabelKey(input.ref),\n ...(input.displayName === undefined ? {} : { displayName: input.displayName }),\n ...(input.iconRef === undefined ? {} : { iconRef: input.iconRef }),\n }) as ProviderMetadata;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider-package-allow-list.shared.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"provider-package-allow-list.shared.schemas.d.ts","sourceRoot":"","sources":["../../../src/external-providers/provider-package-allow-list.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,2IAA2I;AAC3I;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,eAAO,MAAM,8BAA8B,yBASvC,CAAC;AACL,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AACtF,4DAA4D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider-package-allow-list.shared.schemas.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"provider-package-allow-list.shared.schemas.js","sourceRoot":"","sources":["../../../src/external-providers/provider-package-allow-list.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AACH,MAAM,wBAAwB,GAAG,0DAA0D,CAAC;AAE5F,2IAA2I;AAC3I;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC;KAC5C,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,wBAAwB,EAAE,sDAAsD,CAAC,CAAC;KACzG,GAAG,CAAC,CAAC,CAAC;KACN,WAAW,CAAC,CAAC,YAAY,EAAE,GAAG,EAAE,EAAE;IACjC,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,KAAK,MAAM,CAAC,KAAK,EAAE,WAAW,CAAC,IAAI,YAAY,CAAC,OAAO,EAAE,EAAE,CAAC;QAC1D,IAAI,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC;YAAE,GAAG,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,IAAI,WAAW,oBAAoB,EAAE,CAAC,CAAC;QACzH,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IACxB,CAAC;AACH,CAAC,CAAC,CAAC;AAEL,4DAA4D","sourcesContent":["import { z } from 'zod';\n\n/**\n * An npm package name, scoped or not, as npm itself accepts one: lower-case, no leading dot or underscore, and never\n * a `.` or `..` segment. Checked here because discovery splices the name into a `node_modules` path and EXECUTES the\n * package's companion entry, so a name that walks out of `node_modules` must be refused where it is authored.\n */\nconst NPM_PACKAGE_NAME_PATTERN = /^(?:@[a-z0-9-~][a-z0-9-._~]*\\/)?[a-z0-9-~][a-z0-9-._~]*$/;\n\n/** @wildo_source:part:start saas.config.providers.packages facet:layer:shared facet:family:provider-config facet:audience:app-developer */\n/**\n * Provider packages this application admits to discovery from OUTSIDE the names discovery walks by itself (#1676).\n *\n * ```ts\n * providers: {\n * scopes: { backend: { providers: { teams: { protocols: ['REST_API'] } } } },\n * packages: ['@acme/wildo-provider-teams'],\n * }\n * ```\n *\n * Discovery walks, on its own, only the framework's names (`@wildo-ai/provider-*`, the engine's own provider barrel,\n * the system-of-record facet library `@wildo-ai/systems-of-record`) and packages of the application's own scope named\n * `<application-scope>/provider-*` — which is how a registry provider an install copied into the application is\n * found. Any other\n * package — from anybody else's scope, or an own-scope one not named `provider-*` — is never executed by the walk\n * unless it is named here: a dependency cannot contribute providers merely by being installed.\n *\n * ## Admission is not activation\n *\n * A listed package is WALKED: its provider contributions, its browser facets and its provider augmentations are\n * discovered exactly as a framework package's are. Nothing it ships is used until the application uses it in the\n * ordinary way — a provider through `scopes`, an augmentation through `augmentations`. Its system-of-record facet\n * module goes one step further: it is not even recorded until an instance names the package in `facetAugmentations`\n * (#2013); only the framework's own facet library is recorded without being asked for.\n *\n * ## What `wildo config sync` refuses\n *\n * A listed package that no runtime owner (nor the application root) depends on, one that is declared but not\n * installed, one whose companion entry cannot be read, one that ships nothing — no provider contribution, no\n * augmentation and no `./systems-of-record` module — one discovery already walks by its name, and one of the\n * application's own runtime packages. Each refusal names the package. Every admitted package is\n * printed by `config sync` and recorded in the provider lock with its installed version, so a reviewer sees\n * third-party code entering the application.\n *\n * Absent means none.\n */\nexport const ProviderPackageAllowListSchema = z\n .array(z.string().regex(NPM_PACKAGE_NAME_PATTERN, 'A provider package is named by its npm package name.'))\n .min(1)\n .superRefine((packageNames, ctx) => {\n const seen = new Set<string>();\n for (const [index, packageName] of packageNames.entries()) {\n if (seen.has(packageName)) ctx.addIssue({ code: 'custom', path: [index], message: `\"${packageName}\" is listed twice.` });\n seen.add(packageName);\n }\n });\nexport type ProviderPackageAllowList = z.infer<typeof ProviderPackageAllowListSchema>;\n/** @wildo_source:part:end saas.config.providers.packages */\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider-protocol.shared.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"provider-protocol.shared.schemas.d.ts","sourceRoot":"","sources":["../../../src/external-providers/provider-protocol.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,yBAAyB;;;;;IAKpC;;;OAGG;;IAEH;;;;;;OAMG;;IAEH;;;;OAIG;;;IAGH;;;;OAIG;;;;;;CAMK,CAAC;AAEX,MAAM,MAAM,uBAAuB,GACjC,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,OAAO,yBAAyB,CAAC,CAAC;AAE7E,MAAM,MAAM,gBAAgB,GAAG,uBAAuB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider-protocol.shared.schemas.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"provider-protocol.shared.schemas.js","sourceRoot":"","sources":["../../../src/external-providers/provider-protocol.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,QAAQ,EAAE,UAAU;IACpB,kBAAkB,EAAE,oBAAoB;IACxC,YAAY,EAAE,cAAc;IAC5B,qBAAqB,EAAE,uBAAuB;IAC9C;;;OAGG;IACH,cAAc,EAAE,gBAAgB;IAChC;;;;;;OAMG;IACH,mBAAmB,EAAE,qBAAqB;IAC1C;;;;OAIG;IACH,4BAA4B,EAAE,8BAA8B;IAC5D,cAAc,EAAE,gBAAgB;IAChC;;;;OAIG;IACH,sBAAsB,EAAE,wBAAwB;IAChD,UAAU,EAAE,YAAY;IACxB,gBAAgB,EAAE,kBAAkB;IACpC,YAAY,EAAE,cAAc;IAC5B,YAAY,EAAE,cAAc;CACpB,CAAC","sourcesContent":["/**\n * Closed built-in provider protocol vocabulary used by app authoring and\n * runtime-provider declarations.\n *\n * This is intentionally a pure `as const` object + union type so browser-bound\n * packages can consume it through `@wildo-ai/saas-models/public-runtime`\n * without pulling decorators or broader config-authoring seams. Do NOT add an\n * import here — not even an `import type` of the engine enum this list mirrors.\n *\n * ## Relationship to `ExternalProvider_ExchangeProtocol_Kind`\n *\n * This list re-states a population the engine owns: every member of\n * `ExternalProvider_ExchangeProtocol_Kind`\n * (`@wildo-ai/external-connectors-models`) that an application may legally\n * WRITE in `wildo.saas.config.ts > providers.scopes.<scope>.providers.<ref>`.\n * Two hand-maintained enumerations of one population is the shape that drifts,\n * and this one did: `IMAGE_PROVIDER` and `EMBEDDINGS_PROVIDER` shipped as live\n * engine protocols — a provider module declares them, discovery reports them,\n * the backend registry resolves them — while this list had no legal value for\n * either, so no application could declare what those transports speak.\n *\n * The keys are therefore checked against the engine enum by\n * `__tests__/provider-protocol-vocabulary.drift.test.ts`, which also owns the\n * documented allow-list of deliberate exclusions. **`AUDIO_PROVIDER` and\n * `VIDEO_PROVIDER` are deliberately absent** — see that file for the reason and\n * for the exact condition under which they are admitted.\n *\n * RETIRED 2026-09-05 (#327) together with the engine enum members: `MCP_CONNECTOR`,\n * `A2A_CONNECTOR`, `GIT_PROVIDER`, `GRPC`, `SSO_SAML` — authorable here, typed in the union,\n * declared by no provider module, resolvable by no runtime arm. An application that still\n * writes one is refused at config time by `ProviderProtocolSelectorSchema`, which now accepts\n * ONLY these keys (the engine's snake_case wire values were also accepted before, a second\n * spelling nothing else understood).\n */\nexport const BUILTIN_PROVIDER_PROTOCOL = {\n REST_API: 'REST_API',\n WEBHOOK_ORIGINATOR: 'WEBHOOK_ORIGINATOR',\n LLM_PROVIDER: 'LLM_PROVIDER',\n AGENT_CLIENT_PROTOCOL: 'AGENT_CLIENT_PROTOCOL',\n /**\n * Text-to-image generation (wired: gpt-image, via the OpenAI provider's\n * `IMAGE_PROVIDER` transport). Serves the IMAGE artifact modality.\n */\n IMAGE_PROVIDER: 'IMAGE_PROVIDER',\n /**\n * Text → vector embeddings (wired: OpenAI `text-embedding-3-*`). Serves the\n * RAG derived-data tier — corpus embedding in the `rag:embedding-drain`\n * worker, query-time embedding in retrieval. Its own protocol rather than an\n * `LLM_PROVIDER` operation so a provider can be selected for embeddings\n * independently of chat.\n */\n EMBEDDINGS_PROVIDER: 'EMBEDDINGS_PROVIDER',\n /**\n * Document bytes → text (wired: Mistral `mistral-ocr-latest`). Serves file text extraction and\n * the `.ragSource()` corpus built on it, and fills `EngineCapability.AI_DOCUMENT_EXTRACTION` so\n * an OCR provider is selected independently of chat and embeddings.\n */\n DOCUMENT_EXTRACTION_PROVIDER: 'DOCUMENT_EXTRACTION_PROVIDER',\n EMAIL_PROVIDER: 'EMAIL_PROVIDER',\n /**\n * Receiving email (#1630): the provider hosts a receiving domain, announces each message through\n * its `WEBHOOK_ORIGINATOR` endpoint and serves the message on request. Fills\n * `EngineCapability.EMAIL_INBOUND`, selected independently of the sending provider.\n */\n EMAIL_INBOUND_PROVIDER: 'EMAIL_INBOUND_PROVIDER',\n SSO_OAUTH2: 'SSO_OAUTH2',\n BILLING_PROVIDER: 'BILLING_PROVIDER',\n SMS_PROVIDER: 'SMS_PROVIDER',\n FRONTEND_SDK: 'FRONTEND_SDK',\n} as const;\n\nexport type BuiltinProviderProtocol =\n (typeof BUILTIN_PROVIDER_PROTOCOL)[keyof typeof BUILTIN_PROVIDER_PROTOCOL];\n\nexport type ProviderProtocol = BuiltinProviderProtocol;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider-scope-reauthorization.shared.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"provider-scope-reauthorization.shared.schemas.d.ts","sourceRoot":"","sources":["../../../src/external-providers/provider-scope-reauthorization.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,iJAAiJ;AACjJ,uDAAuD;AACvD,oBAAY,8BAA8B;IACxC,+GAA+G;IAC/G,0BAA0B,+BAA+B;IACzD,8EAA8E;IAC9E,4BAA4B,iCAAiC;IAC7D;;;OAGG;IACH,mBAAmB,wBAAwB;IAC3C,kGAAkG;IAClG,8BAA8B,mCAAmC;IACjE;;;;;;;OAOG;IACH,oBAAoB,yBAAyB;CAC9C;AAED;;;;;;GAMG;AACH,MAAM,WAAW,iCAAiC;IAChD,wCAAwC;IACxC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,qFAAqF;IACrF,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,0GAA0G;IAC1G,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,yEAAyE;IACzE,QAAQ,CAAC,iBAAiB,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9C,qEAAqE;IACrE,QAAQ,CAAC,0BAA0B,EAAE,SAAS,MAAM,EAAE,CAAC;IACvD,mFAAmF;IACnF,QAAQ,CAAC,mBAAmB,EAAE,SAAS;QAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,OAAO,EAAE,8BAA8B,CAAA;KAAE,EAAE,CAAC;CACvH;AACD,yEAAyE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider-scope-reauthorization.shared.schemas.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"provider-scope-reauthorization.shared.schemas.js","sourceRoot":"","sources":["../../../src/external-providers/provider-scope-reauthorization.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,iJAAiJ;AACjJ,uDAAuD;AACvD,MAAM,CAAN,IAAY,8BAqBX;AArBD,WAAY,8BAA8B;IACxC,+GAA+G;IAC/G,2FAAyD,CAAA;IACzD,8EAA8E;IAC9E,+FAA6D,CAAA;IAC7D;;;OAGG;IACH,6EAA2C,CAAA;IAC3C,kGAAkG;IAClG,mGAAiE,CAAA;IACjE;;;;;;;OAOG;IACH,+EAA6C,CAAA;AAC/C,CAAC,EArBW,8BAA8B,KAA9B,8BAA8B,QAqBzC;AAuBD,yEAAyE","sourcesContent":["/**\n * The re-authorization OFFER a provider operation refused for a missing scope carries, and why a scope may not be\n * requestable on a connection (#1671) — shared, because the backend composes it and a frontend component acts on it\n * (the browser door answers it in `409 PROVIDER_OPERATION_SCOPE_NOT_GRANTED`).\n *\n * How the ceiling behind it is computed is the backend's (`provider-connection-scope-ceiling.backend.ts`); this is the\n * vocabulary both sides read.\n */\n\n/** @wildo_source:part:start saas.models.providers.scope-reauthorization facet:layer:shared facet:family:provider facet:audience:app-developer */\n/** Why a scope cannot be requested on a connection. */\nexport enum ProviderConnectionScopeRefusal {\n /** No declared ref and no opted-in augmentation of the connection declares it. An author declares it first. */\n NOT_DECLARED_BY_CONNECTION = 'NOT_DECLARED_BY_CONNECTION',\n /** It names a resource none of the connection's declared audiences covers. */\n OUTSIDE_CONNECTION_AUDIENCES = 'OUTSIDE_CONNECTION_AUDIENCES',\n /**\n * A member or augmentation scope carrying a `{placeholder}`: it can be resolved only against its own declaring ref's\n * allowances, which are inert inside a connection, so it is never a value a request could carry.\n */\n CARRIES_PLACEHOLDER = 'CARRIES_PLACEHOLDER',\n /** Only an administrator of the account can grant it; a person is never sent to consent to it. */\n ADMINISTRATOR_CONSENT_REQUIRED = 'ADMINISTRATOR_CONSENT_REQUIRED',\n /**\n * It names a declared audience OTHER than the primary one (a Dataverse environment, Business Central, Power BI on a\n * Graph-primary Microsoft connection). A vendor that mints one resource per request answers an authorization with a\n * token for the resource the request names, and the stored grant holds the PRIMARY audience's token — so growing the\n * grant with another resource's scope would put that resource's token where every primary call reads it. Such a\n * permission is consented statically (the operator lists it on the registration, and the person reconnects); the\n * audience's token is then minted from the refresh token as before.\n */\n NOT_PRIMARY_AUDIENCE = 'NOT_PRIMARY_AUDIENCE',\n}\n\n/**\n * What a refused call hands back so the person can grow the grant (#1671) — carried by `ProviderOperationScopeError`\n * and the browser door's `409 PROVIDER_OPERATION_SCOPE_NOT_GRANTED`.\n *\n * `requestableScopes` is exactly what `POST /connections/:providerRef/start` accepts as `addScopes`; the other two\n * lists are what no re-authorization can obtain, each with its own remedy.\n */\nexport interface ProviderScopeReauthorizationOffer {\n /** The connection whose grant grows. */\n readonly connectionRef: string;\n /** The ref to start the re-authorization through — the one the refused call used. */\n readonly providerRef: string;\n /** The operation that needs them, echoed as `forOperationId` so the grant's audit row names its cause. */\n readonly operationId: string;\n /** The missing scopes a person may grant now. Empty when none can be. */\n readonly requestableScopes: readonly string[];\n /** Missing scopes only an administrator of the account can grant. */\n readonly administratorConsentScopes: readonly string[];\n /** Missing scopes no re-authorization of this connection can ask for, with why. */\n readonly unrequestableScopes: readonly { readonly scope: string; readonly refusal: ProviderConnectionScopeRefusal }[];\n}\n/** @wildo_source:part:end saas.models.providers.scope-reauthorization */\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider-shared-connections.shared.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"provider-shared-connections.shared.schemas.d.ts","sourceRoot":"","sources":["../../../src/external-providers/provider-shared-connections.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,qJAAqJ;AACrJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,eAAO,MAAM,8BAA8B;IACzC;;;OAGG;;IAEH;;;;;;;;;;;;;OAaG;;kBAEH,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAEtF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,+BAA+B;IAlC1C;;;OAGG;;IAEH;;;;;;;;;;;;;OAaG;;mBAqBD,CAAC;AACL,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AACxF,sEAAsE;AAEtE,sGAAsG;AACtG,MAAM,WAAW,gCAAgC;IAC/C,QAAQ,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IACnC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;GAKG;AACH,wBAAgB,qCAAqC,CACnD,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,CAAC,CAAC,GAC1E,gCAAgC,EAAE,CAwCpC;AAED;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAC1C,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,CAAC,CAAC,GAAG,SAAS,EACvF,WAAW,EAAE,MAAM,GAClB,MAAM,CAOR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider-shared-connections.shared.schemas.js","sourceRoot":"","sources":["../../../../src/external-providers/provider-shared-connections.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,qJAAqJ;AACrJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MA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AC,CAAC;gBACH,SAAS;YACX,CAAC;YACD,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;QAC7B,CAAC;IACH,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,4BAA4B,CAC1C,WAAuF,EACvF,WAAmB;IAEnB,IAAI,WAAW,KAAK,SAAS;QAAE,OAAO,WAAW,CAAC;IAClD,IAAI,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE,WAAW,CAAC;QAAE,OAAO,WAAW,CAAC;IAChE,KAAK,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,CAAC;QAChE,IAAI,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC;YAAE,OAAO,OAAO,CAAC;IAC5D,CAAC;IACD,OAAO,WAAW,CAAC;AACrB,CAAC","sourcesContent":["import { z } from 'zod';\n\n/** @wildo_source:part:start saas.config.providers.shared-connections facet:layer:shared facet:family:provider-config facet:audience:app-developer */\n/**\n * One declared SHARED CONNECTION (#1725): the provider refs that spend ONE vendor grant, keyed in\n * {@link ProviderSharedConnectionsSchema} by the BASE ref that owns the connection's OAuth client.\n *\n * ```ts\n * providers: {\n * scopes: { backend: { providers: { microsoft: {}, 'microsoft-teams': {}, 'microsoft-dataverse': {} } } },\n * sharedConnections: {\n * microsoft: { refs: ['microsoft-teams', 'microsoft-dataverse'] },\n * },\n * }\n * ```\n *\n * A person connects Microsoft ONCE, through any of the three refs, and every one of them spends the same\n * stored grant. Without a declaration every ref is its own connection — which is the default and changes\n * nothing for an application that declares none.\n *\n * ## The base alone owns the client\n *\n * The BASE ref's OAuth2 block is the connection's: its authorize and token endpoints, its client-id and\n * client-secret slots, its connection parameters (`{tenantId}`), and the AUDIENCES its tokens may be sent to.\n * A member ref brings operations — never a client. A member's own OAuth2 block and client slots become inert\n * while it is a member: they are reported by `wildo config sync`, never required.\n *\n * ## Membership is this LIST, never the vendor string\n *\n * `vendor` on a provider's metadata is display and compliance grouping only. Two refs that both say\n * `vendor: 'microsoft'` are two connections until they are listed here, because spending one grant from a\n * second package is a trust decision the application makes explicitly, never one inferred from a label.\n */\nexport const ProviderSharedConnectionSchema = z.strictObject({\n /**\n * The member refs, besides the base. Every runtime scope that declares a member must declare the base too,\n * because the base's module is what connects, refreshes and revokes the grant.\n */\n refs: z.array(z.string().min(1)).min(1),\n /**\n * `true` makes the connection use the base's SIGN-IN registration (the `OAUTH2_SSO` client) instead of its\n * own connected-account client. `false`, the default, keeps sign-in and data access on two registrations.\n *\n * Why separate is the default, stated where the choice is made:\n * - one client secret then authorizes both sign-in and data access, so its compromise exposes both;\n * - a tenant administrator's admin consent covers every permission statically configured on a registration,\n * so data permissions listed statically on a sign-in registration would be granted at sign-in;\n * - a vendor that reviews sensitive scopes (Google's app verification) reviews the sign-in client too once\n * it carries them.\n *\n * With `true`, data permissions must be requested dynamically at connect time and never listed statically\n * on the sign-in registration.\n */\n sharedWithSignIn: z.boolean().optional(),\n});\nexport type ProviderSharedConnection = z.infer<typeof ProviderSharedConnectionSchema>;\n\n/**\n * `providers.sharedConnections` — `baseRef` → the connection that ref owns (#1725). See\n * {@link ProviderSharedConnectionSchema}.\n *\n * Refused at parse time, naming both sides: a ref listed in two connections (two bases would each own its\n * client, so which grant it spends would depend on lookup order), a base listed as a member of its own or\n * another connection, and a ref listed twice in one connection.\n *\n * assurance-control: WILDO.IDENTITY.DELEGATED_AUTHORIZATION — which refs may spend one delegated grant is the\n * application's explicit, reviewable declaration, never inferred from a vendor label.\n */\nexport const ProviderSharedConnectionsSchema = z.record(z.string().min(1), ProviderSharedConnectionSchema)\n .superRefine((connections, ctx) => {\n for (const problem of findProviderSharedConnectionConflicts(connections)) {\n ctx.addIssue({ code: 'custom', path: problem.path, message: problem.message });\n }\n });\nexport type ProviderSharedConnections = z.infer<typeof ProviderSharedConnectionsSchema>;\n/** @wildo_source:part:end saas.config.providers.shared-connections */\n\n/** One conflict {@link findProviderSharedConnectionConflicts} reports, located in the declaration. */\nexport interface ProviderSharedConnectionConflict {\n readonly path: (string | number)[];\n readonly message: string;\n}\n\n/**\n * Every membership conflict in a declaration — empty when the declaration is coherent.\n *\n * Exported (rather than living only inside the schema) so the registry can assert the same predicate over a\n * configuration that reached it without passing through this schema, and so a test pins the messages.\n */\nexport function findProviderSharedConnectionConflicts(\n connections: Readonly<Record<string, { readonly refs: readonly string[] }>>,\n): ProviderSharedConnectionConflict[] {\n const problems: ProviderSharedConnectionConflict[] = [];\n const bases = new Set(Object.keys(connections));\n const memberOf = new Map<string, string>();\n for (const [baseRef, connection] of Object.entries(connections).sort(([left], [right]) => left.localeCompare(right))) {\n const seen = new Set<string>();\n for (const [index, ref] of connection.refs.entries()) {\n if (seen.has(ref)) {\n problems.push({ path: [baseRef, 'refs', index], message: `\"${ref}\" is listed twice in the shared connection \"${baseRef}\".` });\n continue;\n }\n seen.add(ref);\n if (ref === baseRef) {\n problems.push({\n path: [baseRef, 'refs', index],\n message: `\"${baseRef}\" lists itself as a member. The base ref is the connection's owner already; list only the other refs.`,\n });\n continue;\n }\n if (bases.has(ref)) {\n problems.push({\n path: [baseRef, 'refs', index],\n message: `\"${ref}\" is a member of the shared connection \"${baseRef}\" and also the base of its own shared connection. `\n + 'A ref spends exactly one grant; declare one connection that lists both.',\n });\n continue;\n }\n const earlier = memberOf.get(ref);\n if (earlier !== undefined) {\n problems.push({\n path: [baseRef, 'refs', index],\n message: `\"${ref}\" is listed in two shared connections, \"${earlier}\" and \"${baseRef}\". A ref spends exactly one grant; `\n + 'remove it from one of them.',\n });\n continue;\n }\n memberOf.set(ref, baseRef);\n }\n }\n return problems;\n}\n\n/**\n * The CONNECTION each ref spends: a declared member → its base, a declared base → itself, and any other ref →\n * itself (the #1670 default, where every undeclared ref is its own connection).\n *\n * ONE function, used by `wildo config sync` (lock entries, refusals) and by the running registry\n * (`resolveCredentialConnectionRef`), so the two cannot disagree about which grant a ref spends.\n */\nexport function resolveProviderConnectionRef(\n connections: Readonly<Record<string, { readonly refs: readonly string[] }>> | undefined,\n providerRef: string,\n): string {\n if (connections === undefined) return providerRef;\n if (Object.hasOwn(connections, providerRef)) return providerRef;\n for (const [baseRef, connection] of Object.entries(connections)) {\n if (connection.refs.includes(providerRef)) return baseRef;\n }\n return providerRef;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"provider-shared-connections.shared.schemas.js","sourceRoot":"","sources":["../../../src/external-providers/provider-shared-connections.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,qJAAqJ;AACrJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,YAAY,CAAC;IAC3D;;;OAGG;IACH,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACvC;;;;;;;;;;;;;OAaG;IACH,gBAAgB,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CACzC,CAAC,CAAC;AAGH;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,8BAA8B,CAAC;KACvG,WAAW,CAAC,CAAC,WAAW,EAAE,GAAG,EAAE,EAAE;IAChC,KAAK,MAAM,OAAO,IAAI,qCAAqC,CAAC,WAAW,CAAC,EAAE,CAAC;QACzE,GAAG,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;IACjF,CAAC;AAC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AI,CAAC;oBACZ,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC;oBAC9B,OAAO,EAAE,IAAI,GAAG,2CAA2C,OAAO,oDAAoD;0BAClH,yEAAyE;iBAC9E,CAAC,CAAC;gBACH,SAAS;YACX,CAAC;YACD,MAAM,OAAO,GAAG,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YAClC,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;gBAC1B,QAAQ,CAAC,IAAI,CAAC;oBACZ,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC;oBAC9B,OAAO,EAAE,IAAI,GAAG,2CAA2C,OAAO,UAAU,OAAO,qCAAqC;0BACpH,6BAA6B;iBAClC,CAAC,CAAC;gBACH,SAAS;YACX,CAAC;YACD,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;QAC7B,CAAC;IACH,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,4BAA4B,CAC1C,WAAuF,EACvF,WAAmB;IAEnB,IAAI,WAAW,KAAK,SAAS;QAAE,OAAO,WAAW,CAAC;IAClD,IAAI,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE,WAAW,CAAC;QAAE,OAAO,WAAW,CAAC;IAChE,KAAK,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,CAAC;QAChE,IAAI,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC;YAAE,OAAO,OAAO,CAAC;IAC5D,CAAC;IACD,OAAO,WAAW,CAAC;AACrB,CAAC","sourcesContent":["import { z } from 'zod';\n\n/** @wildo_source:part:start saas.config.providers.shared-connections facet:layer:shared facet:family:provider-config facet:audience:app-developer */\n/**\n * One declared SHARED CONNECTION (#1725): the provider refs that spend ONE vendor grant, keyed in\n * {@link ProviderSharedConnectionsSchema} by the BASE ref that owns the connection's OAuth client.\n *\n * ```ts\n * providers: {\n * scopes: { backend: { providers: { microsoft: {}, 'microsoft-teams': {}, 'microsoft-dataverse': {} } } },\n * sharedConnections: {\n * microsoft: { refs: ['microsoft-teams', 'microsoft-dataverse'] },\n * },\n * }\n * ```\n *\n * A person connects Microsoft ONCE, through any of the three refs, and every one of them spends the same\n * stored grant. Without a declaration every ref is its own connection — which is the default and changes\n * nothing for an application that declares none.\n *\n * ## The base alone owns the client\n *\n * The BASE ref's OAuth2 block is the connection's: its authorize and token endpoints, its client-id and\n * client-secret slots, its connection parameters (`{tenantId}`), and the AUDIENCES its tokens may be sent to.\n * A member ref brings operations — never a client. A member's own OAuth2 block and client slots become inert\n * while it is a member: they are reported by `wildo config sync`, never required.\n *\n * ## Membership is this LIST, never the vendor string\n *\n * `vendor` on a provider's metadata is display and compliance grouping only. Two refs that both say\n * `vendor: 'microsoft'` are two connections until they are listed here, because spending one grant from a\n * second package is a trust decision the application makes explicitly, never one inferred from a label.\n */\nexport const ProviderSharedConnectionSchema = z.strictObject({\n /**\n * The member refs, besides the base. Every runtime scope that declares a member must declare the base too,\n * because the base's module is what connects, refreshes and revokes the grant.\n */\n refs: z.array(z.string().min(1)).min(1),\n /**\n * `true` makes the connection use the base's SIGN-IN registration (the `OAUTH2_SSO` client) instead of its\n * own connected-account client. `false`, the default, keeps sign-in and data access on two registrations.\n *\n * Why separate is the default, stated where the choice is made:\n * - one client secret then authorizes both sign-in and data access, so its compromise exposes both;\n * - a tenant administrator's admin consent covers every permission statically configured on a registration,\n * so data permissions listed statically on a sign-in registration would be granted at sign-in;\n * - a vendor that reviews sensitive scopes (Google's app verification) reviews the sign-in client too once\n * it carries them.\n *\n * With `true`, data permissions must be requested dynamically at connect time and never listed statically\n * on the sign-in registration.\n */\n sharedWithSignIn: z.boolean().optional(),\n});\nexport type ProviderSharedConnection = z.infer<typeof ProviderSharedConnectionSchema>;\n\n/**\n * `providers.sharedConnections` — `baseRef` → the connection that ref owns (#1725). See\n * {@link ProviderSharedConnectionSchema}.\n *\n * Refused at parse time, naming both sides: a ref listed in two connections (two bases would each own its\n * client, so which grant it spends would depend on lookup order), a base listed as a member of its own or\n * another connection, and a ref listed twice in one connection.\n *\n * assurance-control: WILDO.IDENTITY.DELEGATED_AUTHORIZATION — which refs may spend one delegated grant is the\n * application's explicit, reviewable declaration, never inferred from a vendor label.\n */\nexport const ProviderSharedConnectionsSchema = z.record(z.string().min(1), ProviderSharedConnectionSchema)\n .superRefine((connections, ctx) => {\n for (const problem of findProviderSharedConnectionConflicts(connections)) {\n ctx.addIssue({ code: 'custom', path: problem.path, message: problem.message });\n }\n });\nexport type ProviderSharedConnections = z.infer<typeof ProviderSharedConnectionsSchema>;\n/** @wildo_source:part:end saas.config.providers.shared-connections */\n\n/** One conflict {@link findProviderSharedConnectionConflicts} reports, located in the declaration. */\nexport interface ProviderSharedConnectionConflict {\n readonly path: (string | number)[];\n readonly message: string;\n}\n\n/**\n * Every membership conflict in a declaration — empty when the declaration is coherent.\n *\n * Exported (rather than living only inside the schema) so the registry can assert the same predicate over a\n * configuration that reached it without passing through this schema, and so a test pins the messages.\n */\nexport function findProviderSharedConnectionConflicts(\n connections: Readonly<Record<string, { readonly refs: readonly string[] }>>,\n): ProviderSharedConnectionConflict[] {\n const problems: ProviderSharedConnectionConflict[] = [];\n const bases = new Set(Object.keys(connections));\n const memberOf = new Map<string, string>();\n for (const [baseRef, connection] of Object.entries(connections).sort(([left], [right]) => left.localeCompare(right))) {\n const seen = new Set<string>();\n for (const [index, ref] of connection.refs.entries()) {\n if (seen.has(ref)) {\n problems.push({ path: [baseRef, 'refs', index], message: `\"${ref}\" is listed twice in the shared connection \"${baseRef}\".` });\n continue;\n }\n seen.add(ref);\n if (ref === baseRef) {\n problems.push({\n path: [baseRef, 'refs', index],\n message: `\"${baseRef}\" lists itself as a member. The base ref is the connection's owner already; list only the other refs.`,\n });\n continue;\n }\n if (bases.has(ref)) {\n problems.push({\n path: [baseRef, 'refs', index],\n message: `\"${ref}\" is a member of the shared connection \"${baseRef}\" and also the base of its own shared connection. `\n + 'A ref spends exactly one grant; declare one connection that lists both.',\n });\n continue;\n }\n const earlier = memberOf.get(ref);\n if (earlier !== undefined) {\n problems.push({\n path: [baseRef, 'refs', index],\n message: `\"${ref}\" is listed in two shared connections, \"${earlier}\" and \"${baseRef}\". A ref spends exactly one grant; `\n + 'remove it from one of them.',\n });\n continue;\n }\n memberOf.set(ref, baseRef);\n }\n }\n return problems;\n}\n\n/**\n * The CONNECTION each ref spends: a declared member → its base, a declared base → itself, and any other ref →\n * itself (the #1670 default, where every undeclared ref is its own connection).\n *\n * ONE function, used by `wildo config sync` (lock entries, refusals) and by the running registry\n * (`resolveCredentialConnectionRef`), so the two cannot disagree about which grant a ref spends.\n */\nexport function resolveProviderConnectionRef(\n connections: Readonly<Record<string, { readonly refs: readonly string[] }>> | undefined,\n providerRef: string,\n): string {\n if (connections === undefined) return providerRef;\n if (Object.hasOwn(connections, providerRef)) return providerRef;\n for (const [baseRef, connection] of Object.entries(connections)) {\n if (connection.refs.includes(providerRef)) return baseRef;\n }\n return providerRef;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider-tier-rule.shared.utils.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"provider-tier-rule.shared.utils.d.ts","sourceRoot":"","sources":["../../../src/external-providers/provider-tier-rule.shared.utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAoC,KAAK,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAG7G,uDAAuD;AACvD,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,oBAAoB,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;CAC7C;AAED,mEAAmE;AACnE,wBAAgB,8BAA8B,CAC5C,oBAAoB,EAAE,aAAa,CAAC,MAAM,CAAC,GAC1C,KAAK,CAAC;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,gBAAgB,CAAA;CAAE,CAAC,CAOvD;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,QAAQ,CAAC,uBAAuB,CAAC,GAAG,MAAM,EAAE,CAuC/F;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAC,uBAAuB,CAAC,GAAG,IAAI,CAOhH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider-tier-rule.shared.utils.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"provider-tier-rule.shared.utils.js","sourceRoot":"","sources":["../../../src/external-providers/provider-tier-rule.shared.utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,wCAAwC,GAEzC,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAyB,MAAM,oCAAoC,CAAC;AAS7G,mEAAmE;AACnE,MAAM,UAAU,8BAA8B,CAC5C,oBAA2C;IAE3C,MAAM,KAAK,GAA0D,EAAE,CAAC;IACxE,KAAK,MAAM,UAAU,IAAI,oBAAoB,EAAE,CAAC;QAC9C,MAAM,IAAI,GAAG,wCAAwC,CAAC,UAAuC,CAAC,CAAC;QAC/F,IAAI,IAAI,KAAK,SAAS;YAAE,KAAK,CAAC,IAAI,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;IAC3D,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,0BAA0B,CAAC,OAA0C;IACnF,MAAM,UAAU,GAAa,EAAE,CAAC;IAChC,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,C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C;AAED;;;GAGG;AACH,MAAM,UAAU,2BAA2B,CAAC,UAAkB,EAAE,OAA0C;IACxG,MAAM,UAAU,GAAG,0BAA0B,CAAC,OAAO,CAAC,CAAC;IACvD,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC1B,MAAM,IAAI,KAAK,CACb,GAAG,UAAU,oDAAoD,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CACzF,CAAC;IACJ,CAAC;AACH,CAAC","sourcesContent":["/**\n * The provider TIER RULE, enforced at composition on every facet (#328).\n *\n * - A `CATALOGUE` provider may claim only OPEN `ProviderCapability` tokens.\n * It must never bind an `EngineCapability` slot: the engine's floor is\n * the MAIN set, and a bulk-loaded integration that quietly filled the\n * billing or email slot would make \"mandatory\" mean \"whatever happened\n * to be installed\".\n * - A `MAIN` provider is the engine's own: its origin is `ENGINE`. An\n * application or a generated package cannot declare itself MAIN.\n * - An `EXTENSION` provider may bind a slot through\n * `PROVIDER_CAPABILITY_TO_ENGINE_CAPABILITY` — that is what the tier is for.\n *\n * Lives in `saas-models` (not in the private package) because the rule is\n * facet-neutral: the three browser-bound registries compose through it too,\n * and they reach this package only through `/public-runtime`.\n */\n\nimport {\n PROVIDER_CAPABILITY_TO_ENGINE_CAPABILITY,\n type EngineCapability,\n} from './engine-capabilities.shared.schemas';\nimport { ProviderOriginKind, ProviderTier, type ProviderMetadata } from './provider-metadata.shared.schemas';\nimport type { BuiltinProviderCapability } from './provider-capability.shared.schemas';\n\n/** What the rule needs from a module, on any facet. */\nexport interface ProviderTierRuleSubject {\n metadata: ProviderMetadata;\n providerCapabilities: ReadonlyArray<string>;\n}\n\n/** Engine slots a capability list binds through the closed map. */\nexport function engineSlotsBoundByCapabilities(\n providerCapabilities: ReadonlyArray<string>,\n): Array<{ capability: string; slot: EngineCapability }> {\n const bound: Array<{ capability: string; slot: EngineCapability }> = [];\n for (const capability of providerCapabilities) {\n const slot = PROVIDER_CAPABILITY_TO_ENGINE_CAPABILITY[capability as BuiltinProviderCapability];\n if (slot !== undefined) bound.push({ capability, slot });\n }\n return bound;\n}\n\n/**\n * Every tier-rule violation across the given modules, as human sentences\n * naming the ref, the tier and the offending fact. Empty when coherent.\n */\nexport function findProviderTierViolations(modules: Iterable<ProviderTierRuleSubject>): string[] {\n const violations: string[] = [];\n for (const module of modules) {\n if (!module.metadata) {\n // A module with no metadata has no ref to name; refuse in words rather than with a TypeError.\n violations.push('(module without metadata): every provider module declares ProviderMetadata via defineProviderMetadata');\n continue;\n }\n const { ref, tier, origin } = module.metadata;\n switch (tier) {\n case ProviderTier.CATALOGUE: {\n const bound = engineSlotsBoundByCapabilities(module.providerCapabilities);\n if (bound.length > 0) {\n violations.push(\n `${ref}: tier CATALOGUE may claim only open ProviderCapability tokens, but `\n + bound.map((entry) => `\"${entry.capability}\" binds the ${entry.slot} engine slot`).join(', ')\n + '. Declare the provider EXTENSION if it is meant to substitute for a MAIN provider.',\n );\n }\n break;\n }\n case ProviderTier.MAIN: {\n if (origin.kind !== ProviderOriginKind.ENGINE) {\n violations.push(\n `${ref}: tier MAIN is the engine's own set, but its origin is ${origin.kind}. `\n + 'A package or application provider that binds an engine slot is an EXTENSION.',\n );\n }\n break;\n }\n case ProviderTier.EXTENSION:\n break;\n default: {\n const unhandled: never = tier;\n violations.push(`${ref}: unknown provider tier \"${String(unhandled)}\".`);\n }\n }\n }\n return violations;\n}\n\n/**\n * Refuse a registry whose modules break the tier rule. Called by every\n * facet's `compose*Providers` so the rule holds wherever modules meet.\n */\nexport function assertProviderTierCoherence(facetLabel: string, modules: Iterable<ProviderTierRuleSubject>): void {\n const violations = findProviderTierViolations(modules);\n if (violations.length > 0) {\n throw new Error(\n `${facetLabel} provider composition refused by the tier rule — ${violations.join('; ')}`,\n );\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider-usage-cost.shared.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"provider-usage-cost.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C,WAAW,CAAO;IAEnB,GAAG,CAAC,sBAAsB,EAAE,MAAM,EAAE,wBAAwB,EAAE,MAAM,EAAE,cAAc,SAAI,EAAE,gBAAgB,SAAI,GAAG,IAAI;IAW5H,oGAAoG;IAC7F,SAAS,IAAI,MAAM;CAI3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider-usage-cost.shared.js","sourceRoot":"","sources":["../../../../src/external-providers/provider-usage-cost.shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EACL,2CAA2C,EAC3C,4BAA4B,GAI7B,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,iDAAiD,CAAC;AAY1F,MAAM,IAAI,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;AACvB,MAAM,GAAG,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;AAEtB,SAAS,GAAG,CAAC,CAAS,EAAE,CAAS;IAC/B,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1B,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1B,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC;QAClB,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAChB,CAAC,GAAG,CAAC,CAAC;QACN,CAAC,GAAG,CAAC,CAAC;IACR,CAAC;IACD,OAAO,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9B,CAAC;AAED,SAAS,KAAK,CAAC,KAAyB;IACtC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,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,CAAC,WAAW,GAAG,GAAG,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC;IACtE,CAAC;CACF","sourcesContent":["/**\n * # Provider-usage cost: pricing one call exactly, and rounding a total once\n *\n * The arithmetic half of #1598's cost calculator. Pure and adapter-free, so the backend recorder, the\n * `summarize` read and the period close use ONE implementation and cannot disagree about a cost.\n *\n * ## Exact per call, rounded once per total (review F11)\n *\n * A call's cost is stored as an exact fraction of a minor currency unit\n * (`callCostMinorNumerator / callCostUnitsDenominator`). A total is the exact sum of those fractions (each\n * multiplied by its row's share), rounded UP to a whole minor unit once, at the moment a total is reported.\n * Rounding each call would overstate a case made of many small embedding calls by up to one minor unit\n * per call. Currencies are never converted and never mixed: an accumulator holds one currency.\n *\n * ## Quantities (#1598 §7)\n *\n * - Input: with a reported split, `noCacheTokens` → `INPUT_TOKEN`, `cacheReadTokens` →\n * `CACHED_INPUT_TOKEN`, `cacheWriteTokens` → `CACHE_WRITE_INPUT_TOKEN`; without one, every prompt token is\n * `INPUT_TOKEN`. A cache category the authority prices no rate for is priced at the input rate: a missing\n * rate never makes tokens free.\n * - Output: `completionTokens` → `OUTPUT_TOKEN`. When the authority declares a `REASONING_TOKEN` rate and the\n * provider reported the reasoning split, the reasoning quantity is priced at that rate and SUBTRACTED from\n * the output quantity, so it is never billed twice (Paul, Q3).\n * - Tiers are per request: the highest threshold the call's whole input quantity exceeds applies its\n * multipliers to the input categories and to output/reasoning respectively.\n */\nimport {\n PROVIDER_USAGE_RATE_MULTIPLIER_BASIS_POINTS,\n ProviderUsagePricingCategory,\n type ProviderUsageAmount,\n type ProviderUsageCostResult,\n type ProviderUsagePricingAuthority,\n} from './provider-usage-pricing.shared.schemas';\nimport { ReasoningUsageReporting } from '../flows-actors/work-attribution.shared.schemas';\n\n/** The token counts one call reported, as the provider-call record stores them. Absent means not reported. */\nexport interface ProviderUsageQuantities {\n readonly promptTokens?: number;\n readonly completionTokens?: number;\n readonly noCacheTokens?: number;\n readonly cacheReadTokens?: number;\n readonly cacheWriteTokens?: number;\n readonly reasoningTokens?: number;\n}\n\nconst ZERO = BigInt(0);\nconst ONE = BigInt(1);\n\nfunction gcd(a: bigint, b: bigint): bigint {\n let x = a < ZERO ? -a : a;\n let y = b < ZERO ? -b : b;\n while (y !== ZERO) {\n const t = x % y;\n x = y;\n y = t;\n }\n return x === ZERO ? ONE : x;\n}\n\nfunction count(value: number | undefined): number {\n return typeof value === 'number' && Number.isFinite(value) && value > 0 ? Math.floor(value) : 0;\n}\n\n/**\n * Pick the authority that prices a call: same provider and model, `effectiveFrom` not after the call, the\n * highest version among those. `undefined` means the call is UNPRICED.\n */\nexport function selectProviderUsagePricingAuthority(\n authorities: readonly ProviderUsagePricingAuthority[],\n call: { provider?: string | null; model?: string | null; calledAt: Date },\n): ProviderUsagePricingAuthority | undefined {\n if (!call.provider || !call.model) return undefined;\n let chosen: ProviderUsagePricingAuthority | undefined;\n for (const authority of authorities) {\n if (authority.providerRef !== call.provider || authority.model !== call.model) continue;\n if (Date.parse(authority.effectiveFrom) > call.calledAt.getTime()) continue;\n if (!chosen || authority.pricingAuthorityVersion > chosen.pricingAuthorityVersion) chosen = authority;\n }\n return chosen;\n}\n\n/**\n * Refuse a registered list that names one `ref@version` twice (#1598 §7). Two entries under one identity\n * would make \"the price used\" ambiguous in every row and aggregate that names it. Throws with every\n * duplicated identity named.\n */\nexport function assertUniqueProviderUsagePricingAuthorities(authorities: readonly ProviderUsagePricingAuthority[]): void {\n const seen = new Set<string>();\n const duplicates = new Set<string>();\n for (const authority of authorities) {\n const identity = `${authority.pricingAuthorityRef}@${authority.pricingAuthorityVersion}`;\n if (seen.has(identity)) duplicates.add(identity);\n seen.add(identity);\n }\n if (duplicates.size > 0) {\n throw new Error(\n `modelCostAccounting.providerUsagePricingAuthorities registers the same pricing authority more than once: ${[...duplicates].join(', ')}. `\n + 'A price is identified by pricingAuthorityRef@pricingAuthorityVersion; publish a changed rate as a new version.',\n );\n }\n}\n\n/** Whether a call's usage reports the reasoning split. */\nexport function reasoningUsageReportingOf(usage: ProviderUsageQuantities): ReasoningUsageReporting {\n return typeof usage.reasoningTokens === 'number' && Number.isFinite(usage.reasoningTokens) && usage.reasoningTokens >= 0\n ? ReasoningUsageReporting.REPORTED\n : ReasoningUsageReporting.UNREPORTED;\n}\n\n/**\n * The exact cost of one call under `authority`, unrounded. See the file header for the quantity rules.\n */\nexport function computeProviderUsageCallCost(authority: ProviderUsagePricingAuthority, usage: ProviderUsageQuantities): ProviderUsageCostResult {\n const rateOf = new Map(authority.rates.map((rate) => [rate.category, rate.amountMinorNumerator]));\n const inputRate = rateOf.get(ProviderUsagePricingCategory.INPUT_TOKEN)!;\n\n const promptTokens = count(usage.promptTokens);\n const completionTokens = count(usage.completionTokens);\n const hasInputSplit = usage.noCacheTokens !== undefined || usage.cacheReadTokens !== undefined || usage.cacheWriteTokens !== undefined;\n const cacheRead = hasInputSplit ? count(usage.cacheReadTokens) : 0;\n const cacheWrite = hasInputSplit ? count(usage.cacheWriteTokens) : 0;\n const noCache = hasInputSplit\n ? (usage.noCacheTokens !== undefined ? count(usage.noCacheTokens) : Math.max(0, promptTokens - cacheRead - cacheWrite))\n : promptTokens;\n\n const pricesReasoningApart = rateOf.has(ProviderUsagePricingCategory.REASONING_TOKEN)\n && reasoningUsageReportingOf(usage) === ReasoningUsageReporting.REPORTED;\n const reasoning = pricesReasoningApart ? Math.min(count(usage.reasoningTokens), completionTokens) : 0;\n const output = completionTokens - reasoning;\n\n // The tier is decided by the request's WHOLE input quantity, whatever its cache split.\n const inputQuantity = hasInputSplit ? noCache + cacheRead + cacheWrite : promptTokens;\n let inputMultiplier = PROVIDER_USAGE_RATE_MULTIPLIER_BASIS_POINTS;\n let outputMultiplier = PROVIDER_USAGE_RATE_MULTIPLIER_BASIS_POINTS;\n for (const rule of authority.usageTierRules) {\n if (inputQuantity > rule.inputTokenThresholdExclusive) {\n inputMultiplier = rule.inputRateMultiplierBasisPoints;\n outputMultiplier = rule.outputRateMultiplierBasisPoints;\n }\n }\n\n const amounts: ProviderUsageAmount[] = [];\n let numerator = ZERO;\n const add = (category: ProviderUsagePricingCategory, quantity: number, rate: number, multiplier: number): void => {\n if (quantity === 0) return;\n amounts.push({ category, quantity });\n numerator += BigInt(quantity) * BigInt(rate) * BigInt(multiplier);\n };\n add(ProviderUsagePricingCategory.INPUT_TOKEN, noCache, inputRate, inputMultiplier);\n add(ProviderUsagePricingCategory.CACHED_INPUT_TOKEN, cacheRead, rateOf.get(ProviderUsagePricingCategory.CACHED_INPUT_TOKEN) ?? inputRate, inputMultiplier);\n add(ProviderUsagePricingCategory.CACHE_WRITE_INPUT_TOKEN, cacheWrite, rateOf.get(ProviderUsagePricingCategory.CACHE_WRITE_INPUT_TOKEN) ?? inputRate, inputMultiplier);\n add(ProviderUsagePricingCategory.OUTPUT_TOKEN, output, rateOf.get(ProviderUsagePricingCategory.OUTPUT_TOKEN)!, outputMultiplier);\n if (pricesReasoningApart) {\n add(ProviderUsagePricingCategory.REASONING_TOKEN, reasoning, rateOf.get(ProviderUsagePricingCategory.REASONING_TOKEN)!, outputMultiplier);\n }\n\n let denominator = BigInt(authority.unitsDenominator) * BigInt(PROVIDER_USAGE_RATE_MULTIPLIER_BASIS_POINTS);\n const divisor = gcd(numerator, denominator);\n numerator /= divisor;\n denominator /= divisor;\n\n return {\n pricingAuthorityRef: authority.pricingAuthorityRef,\n pricingAuthorityVersion: authority.pricingAuthorityVersion,\n currency: authority.currency,\n callCostMinorNumerator: numerator.toString(),\n callCostUnitsDenominator: Number(denominator),\n amounts,\n };\n}\n\n/**\n * An exact running total of minor-unit fractions in ONE currency, rounded up once when read.\n *\n * `add` takes a call's exact cost and the attribution row's share of it (`shareNumerator / shareDenominator`,\n * 1/1 for a whole call). The sum stays a reduced fraction of bigints, so no precision is lost however many\n * rows are added.\n */\nexport class ExactMinorCostTotal {\n private numerator = ZERO;\n private denominator = ONE;\n\n public add(callCostMinorNumerator: string, callCostUnitsDenominator: number, shareNumerator = 1, shareDenominator = 1): void {\n if (shareDenominator <= 0 || callCostUnitsDenominator <= 0) return;\n const partNumerator = BigInt(callCostMinorNumerator) * BigInt(Math.max(0, Math.floor(shareNumerator)));\n const partDenominator = BigInt(callCostUnitsDenominator) * BigInt(Math.floor(shareDenominator));\n const nextNumerator = this.numerator * partDenominator + partNumerator * this.denominator;\n const nextDenominator = this.denominator * partDenominator;\n const divisor = gcd(nextNumerator, nextDenominator);\n this.numerator = nextNumerator / divisor;\n this.denominator = nextDenominator / divisor;\n }\n\n /** The total, rounded UP to a whole minor unit: `CEILING_AGGREGATE_TO_MINOR_UNIT`, applied once. */\n public ceilMinor(): bigint {\n if (this.numerator === ZERO) return ZERO;\n return (this.numerator + this.denominator - ONE) / this.denominator;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"provider-usage-cost.shared.js","sourceRoot":"","sources":["../../../src/external-providers/provider-usage-cost.shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EACL,2CAA2C,EAC3C,4BAA4B,GAI7B,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,iDAAiD,CAAC;AAY1F,MAAM,IAAI,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;AACvB,MAAM,GAAG,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;AAEtB,SAAS,GAAG,CAAC,CAAS,EAAE,CAAS;IAC/B,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1B,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1B,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC;QAClB,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAChB,CAAC,GAAG,CAAC,CAAC;QACN,CAAC,G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AAC,CAAC;QACpD,IAAI,CAAC,SAAS,GAAG,aAAa,GAAG,OAAO,CAAC;QACzC,IAAI,CAAC,WAAW,GAAG,eAAe,GAAG,OAAO,CAAC;IAC/C,CAAC;IAED,oGAAoG;IAC7F,SAAS;QACd,IAAI,IAAI,CAAC,SAAS,KAAK,IAAI;YAAE,OAAO,IAAI,CAAC;QACzC,OAAO,CAAC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,WAAW,GAAG,GAAG,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC;IACtE,CAAC;CACF","sourcesContent":["/**\n * # Provider-usage cost: pricing one call exactly, and rounding a total once\n *\n * The arithmetic half of #1598's cost calculator. Pure and adapter-free, so the backend recorder, the\n * `summarize` read and the period close use ONE implementation and cannot disagree about a cost.\n *\n * ## Exact per call, rounded once per total (review F11)\n *\n * A call's cost is stored as an exact fraction of a minor currency unit\n * (`callCostMinorNumerator / callCostUnitsDenominator`). A total is the exact sum of those fractions (each\n * multiplied by its row's share), rounded UP to a whole minor unit once, at the moment a total is reported.\n * Rounding each call would overstate a case made of many small embedding calls by up to one minor unit\n * per call. Currencies are never converted and never mixed: an accumulator holds one currency.\n *\n * ## Quantities (#1598 §7)\n *\n * - Input: with a reported split, `noCacheTokens` → `INPUT_TOKEN`, `cacheReadTokens` →\n * `CACHED_INPUT_TOKEN`, `cacheWriteTokens` → `CACHE_WRITE_INPUT_TOKEN`; without one, every prompt token is\n * `INPUT_TOKEN`. A cache category the authority prices no rate for is priced at the input rate: a missing\n * rate never makes tokens free.\n * - Output: `completionTokens` → `OUTPUT_TOKEN`. When the authority declares a `REASONING_TOKEN` rate and the\n * provider reported the reasoning split, the reasoning quantity is priced at that rate and SUBTRACTED from\n * the output quantity, so it is never billed twice (Paul, Q3).\n * - Tiers are per request: the highest threshold the call's whole input quantity exceeds applies its\n * multipliers to the input categories and to output/reasoning respectively.\n */\nimport {\n PROVIDER_USAGE_RATE_MULTIPLIER_BASIS_POINTS,\n ProviderUsagePricingCategory,\n type ProviderUsageAmount,\n type ProviderUsageCostResult,\n type ProviderUsagePricingAuthority,\n} from './provider-usage-pricing.shared.schemas';\nimport { ReasoningUsageReporting } from '../flows-actors/work-attribution.shared.schemas';\n\n/** The token counts one call reported, as the provider-call record stores them. Absent means not reported. */\nexport interface ProviderUsageQuantities {\n readonly promptTokens?: number;\n readonly completionTokens?: number;\n readonly noCacheTokens?: number;\n readonly cacheReadTokens?: number;\n readonly cacheWriteTokens?: number;\n readonly reasoningTokens?: number;\n}\n\nconst ZERO = BigInt(0);\nconst ONE = BigInt(1);\n\nfunction gcd(a: bigint, b: bigint): bigint {\n let x = a < ZERO ? -a : a;\n let y = b < ZERO ? -b : b;\n while (y !== ZERO) {\n const t = x % y;\n x = y;\n y = t;\n }\n return x === ZERO ? ONE : x;\n}\n\nfunction count(value: number | undefined): number {\n return typeof value === 'number' && Number.isFinite(value) && value > 0 ? Math.floor(value) : 0;\n}\n\n/**\n * Pick the authority that prices a call: same provider and model, `effectiveFrom` not after the call, the\n * highest version among those. `undefined` means the call is UNPRICED.\n */\nexport function selectProviderUsagePricingAuthority(\n authorities: readonly ProviderUsagePricingAuthority[],\n call: { provider?: string | null; model?: string | null; calledAt: Date },\n): ProviderUsagePricingAuthority | undefined {\n if (!call.provider || !call.model) return undefined;\n let chosen: ProviderUsagePricingAuthority | undefined;\n for (const authority of authorities) {\n if (authority.providerRef !== call.provider || authority.model !== call.model) continue;\n if (Date.parse(authority.effectiveFrom) > call.calledAt.getTime()) continue;\n if (!chosen || authority.pricingAuthorityVersion > chosen.pricingAuthorityVersion) chosen = authority;\n }\n return chosen;\n}\n\n/**\n * Refuse a registered list that names one `ref@version` twice (#1598 §7). Two entries under one identity\n * would make \"the price used\" ambiguous in every row and aggregate that names it. Throws with every\n * duplicated identity named.\n */\nexport function assertUniqueProviderUsagePricingAuthorities(authorities: readonly ProviderUsagePricingAuthority[]): void {\n const seen = new Set<string>();\n const duplicates = new Set<string>();\n for (const authority of authorities) {\n const identity = `${authority.pricingAuthorityRef}@${authority.pricingAuthorityVersion}`;\n if (seen.has(identity)) duplicates.add(identity);\n seen.add(identity);\n }\n if (duplicates.size > 0) {\n throw new Error(\n `modelCostAccounting.providerUsagePricingAuthorities registers the same pricing authority more than once: ${[...duplicates].join(', ')}. `\n + 'A price is identified by pricingAuthorityRef@pricingAuthorityVersion; publish a changed rate as a new version.',\n );\n }\n}\n\n/** Whether a call's usage reports the reasoning split. */\nexport function reasoningUsageReportingOf(usage: ProviderUsageQuantities): ReasoningUsageReporting {\n return typeof usage.reasoningTokens === 'number' && Number.isFinite(usage.reasoningTokens) && usage.reasoningTokens >= 0\n ? ReasoningUsageReporting.REPORTED\n : ReasoningUsageReporting.UNREPORTED;\n}\n\n/**\n * The exact cost of one call under `authority`, unrounded. See the file header for the quantity rules.\n */\nexport function computeProviderUsageCallCost(authority: ProviderUsagePricingAuthority, usage: ProviderUsageQuantities): ProviderUsageCostResult {\n const rateOf = new Map(authority.rates.map((rate) => [rate.category, rate.amountMinorNumerator]));\n const inputRate = rateOf.get(ProviderUsagePricingCategory.INPUT_TOKEN)!;\n\n const promptTokens = count(usage.promptTokens);\n const completionTokens = count(usage.completionTokens);\n const hasInputSplit = usage.noCacheTokens !== undefined || usage.cacheReadTokens !== undefined || usage.cacheWriteTokens !== undefined;\n const cacheRead = hasInputSplit ? count(usage.cacheReadTokens) : 0;\n const cacheWrite = hasInputSplit ? count(usage.cacheWriteTokens) : 0;\n const noCache = hasInputSplit\n ? (usage.noCacheTokens !== undefined ? count(usage.noCacheTokens) : Math.max(0, promptTokens - cacheRead - cacheWrite))\n : promptTokens;\n\n const pricesReasoningApart = rateOf.has(ProviderUsagePricingCategory.REASONING_TOKEN)\n && reasoningUsageReportingOf(usage) === ReasoningUsageReporting.REPORTED;\n const reasoning = pricesReasoningApart ? Math.min(count(usage.reasoningTokens), completionTokens) : 0;\n const output = completionTokens - reasoning;\n\n // The tier is decided by the request's WHOLE input quantity, whatever its cache split.\n const inputQuantity = hasInputSplit ? noCache + cacheRead + cacheWrite : promptTokens;\n let inputMultiplier = PROVIDER_USAGE_RATE_MULTIPLIER_BASIS_POINTS;\n let outputMultiplier = PROVIDER_USAGE_RATE_MULTIPLIER_BASIS_POINTS;\n for (const rule of authority.usageTierRules) {\n if (inputQuantity > rule.inputTokenThresholdExclusive) {\n inputMultiplier = rule.inputRateMultiplierBasisPoints;\n outputMultiplier = rule.outputRateMultiplierBasisPoints;\n }\n }\n\n const amounts: ProviderUsageAmount[] = [];\n let numerator = ZERO;\n const add = (category: ProviderUsagePricingCategory, quantity: number, rate: number, multiplier: number): void => {\n if (quantity === 0) return;\n amounts.push({ category, quantity });\n numerator += BigInt(quantity) * BigInt(rate) * BigInt(multiplier);\n };\n add(ProviderUsagePricingCategory.INPUT_TOKEN, noCache, inputRate, inputMultiplier);\n add(ProviderUsagePricingCategory.CACHED_INPUT_TOKEN, cacheRead, rateOf.get(ProviderUsagePricingCategory.CACHED_INPUT_TOKEN) ?? inputRate, inputMultiplier);\n add(ProviderUsagePricingCategory.CACHE_WRITE_INPUT_TOKEN, cacheWrite, rateOf.get(ProviderUsagePricingCategory.CACHE_WRITE_INPUT_TOKEN) ?? inputRate, inputMultiplier);\n add(ProviderUsagePricingCategory.OUTPUT_TOKEN, output, rateOf.get(ProviderUsagePricingCategory.OUTPUT_TOKEN)!, outputMultiplier);\n if (pricesReasoningApart) {\n add(ProviderUsagePricingCategory.REASONING_TOKEN, reasoning, rateOf.get(ProviderUsagePricingCategory.REASONING_TOKEN)!, outputMultiplier);\n }\n\n let denominator = BigInt(authority.unitsDenominator) * BigInt(PROVIDER_USAGE_RATE_MULTIPLIER_BASIS_POINTS);\n const divisor = gcd(numerator, denominator);\n numerator /= divisor;\n denominator /= divisor;\n\n return {\n pricingAuthorityRef: authority.pricingAuthorityRef,\n pricingAuthorityVersion: authority.pricingAuthorityVersion,\n currency: authority.currency,\n callCostMinorNumerator: numerator.toString(),\n callCostUnitsDenominator: Number(denominator),\n amounts,\n };\n}\n\n/**\n * An exact running total of minor-unit fractions in ONE currency, rounded up once when read.\n *\n * `add` takes a call's exact cost and the attribution row's share of it (`shareNumerator / shareDenominator`,\n * 1/1 for a whole call). The sum stays a reduced fraction of bigints, so no precision is lost however many\n * rows are added.\n */\nexport class ExactMinorCostTotal {\n private numerator = ZERO;\n private denominator = ONE;\n\n public add(callCostMinorNumerator: string, callCostUnitsDenominator: number, shareNumerator = 1, shareDenominator = 1): void {\n if (shareDenominator <= 0 || callCostUnitsDenominator <= 0) return;\n const partNumerator = BigInt(callCostMinorNumerator) * BigInt(Math.max(0, Math.floor(shareNumerator)));\n const partDenominator = BigInt(callCostUnitsDenominator) * BigInt(Math.floor(shareDenominator));\n const nextNumerator = this.numerator * partDenominator + partNumerator * this.denominator;\n const nextDenominator = this.denominator * partDenominator;\n const divisor = gcd(nextNumerator, nextDenominator);\n this.numerator = nextNumerator / divisor;\n this.denominator = nextDenominator / divisor;\n }\n\n /** The total, rounded UP to a whole minor unit: `CEILING_AGGREGATE_TO_MINOR_UNIT`, applied once. */\n public ceilMinor(): bigint {\n if (this.numerator === ZERO) return ZERO;\n return (this.numerator + this.denominator - ONE) / this.denominator;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider-usage-pricing.example.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"provider-usage-pricing.example.d.ts","sourceRoot":"","sources":["../../../src/external-providers/provider-usage-pricing.example.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,kCAAkC,EACxC,MAAM,yCAAyC,CAAC;AAEjD;;;;;;GAMG;AACH,2HAA2H;AAC3H,eAAO,MAAM,oCAAoC,EAAE,kCA4BlD,CAAC;AACF,mEAAmE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider-usage-pricing.example.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"provider-usage-pricing.example.js","sourceRoot":"","sources":["../../../src/external-providers/provider-usage-pricing.example.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,4BAA4B,EAC5B,gCAAgC,EAChC,gCAAgC,GAEjC,MAAM,yCAAyC,CAAC;AAEjD;;;;;;GAMG;AACH,2HAA2H;AAC3H,MAAM,CAAC,MAAM,oCAAoC,GAAuC;IACtF,aAAa,EAAE,CAAC;IAChB,mBAAmB,EAAE,8BAA8B;IACnD,uBAAuB,EAAE,CAAC;IAC1B,WAAW,EAAE,QAAQ;IACrB,uFAAuF;IACvF,KAAK,EAAE,eAAe;IACtB,QAAQ,EAAE,KAAK;IACf,0DAA0D;IAC1D,gBAAgB,EAAE,SAAS;IAC3B,YAAY,EAAE,gCAAgC,CAAC,+BAA+B;IAC9E,KAAK,EAAE;QACL,EAAE,QAAQ,EAAE,4BAA4B,CAAC,WAAW,EAAE,oBAAoB,EAAE,GAAG,EAAE;QACjF,EAAE,QAAQ,EAAE,4BAA4B,CAAC,kBAAkB,EAAE,oBAAoB,EAAE,EAAE,EAAE;QACvF,EAAE,QAAQ,EAAE,4BAA4B,CAAC,uBAAuB,EAAE,oBAAoB,EAAE,GAAG,EAAE;QAC7F,+FAA+F;QAC/F,EAAE,QAAQ,EAAE,4BAA4B,CAAC,YAAY,EAAE,oBAAoB,EAAE,KAAK,EAAE;KACrF;IACD,0EAA0E;IAC1E,cAAc,EAAE,CAAC;YACf,IAAI,EAAE,gCAAgC,CAAC,0BAA0B;YACjE,4BAA4B,EAAE,OAAO;YACrC,8BAA8B,EAAE,MAAM;YACtC,+BAA+B,EAAE,MAAM;SACxC,CAAC;IACF,aAAa,EAAE,0BAA0B;IACzC,SAAS,EAAE,6DAA6D;IACxE,aAAa,EAAE,qBAAqB;CACrC,CAAC;AACF,mEAAmE","sourcesContent":["import {\n ProviderUsagePricingCategory,\n ProviderUsagePricingRoundingMode,\n ProviderUsagePricingTierRuleKind,\n type ProviderUsagePricingAuthorityInput,\n} from './provider-usage-pricing.shared.schemas';\n\n/**\n * Tier-B example (#1598): one provider price, as an application registers it in\n * `modelCostAccounting.providerUsagePricingAuthorities`.\n *\n * The rates are OpenAI's public list price for `gpt-5.6-terra`, observed on 2026-08-13. A firm with a\n * negotiated contract registers its own numbers instead; that is why the list is the application's.\n */\n/** @wildo_source:part:start example.config.provider-usage-pricing facet:kind:usage-example facet:audience:app-developer */\nexport const exampleProviderUsagePricingAuthority: ProviderUsagePricingAuthorityInput = {\n schemaVersion: 1,\n pricingAuthorityRef: 'pricing:openai/gpt-5.6-terra',\n pricingAuthorityVersion: 1,\n providerRef: 'openai',\n // The resolved model id exactly as the call records it (the agent's configured model).\n model: 'gpt-5.6-terra',\n currency: 'USD',\n // Rates below are minor units (cents) per million tokens.\n unitsDenominator: 1_000_000,\n roundingMode: ProviderUsagePricingRoundingMode.CEILING_AGGREGATE_TO_MINOR_UNIT,\n rates: [\n { category: ProviderUsagePricingCategory.INPUT_TOKEN, amountMinorNumerator: 200 },\n { category: ProviderUsagePricingCategory.CACHED_INPUT_TOKEN, amountMinorNumerator: 20 },\n { category: ProviderUsagePricingCategory.CACHE_WRITE_INPUT_TOKEN, amountMinorNumerator: 250 },\n // No REASONING_TOKEN rate: reasoning is priced as output, which is how this provider bills it.\n { category: ProviderUsagePricingCategory.OUTPUT_TOKEN, amountMinorNumerator: 1_200 },\n ],\n // Requests over 272k input tokens are priced at 2x input and 1.5x output.\n usageTierRules: [{\n kind: ProviderUsagePricingTierRuleKind.INPUT_TOKEN_QUANTITY_ABOVE,\n inputTokenThresholdExclusive: 272_000,\n inputRateMultiplierBasisPoints: 20_000,\n outputRateMultiplierBasisPoints: 15_000,\n }],\n effectiveFrom: '2026-08-13T00:00:00.000Z',\n sourceRef: 'https://developers.openai.com/api/docs/models/gpt-5.6-terra',\n sourceVersion: 'observed:2026-08-13',\n};\n/** @wildo_source:part:end example.config.provider-usage-pricing */\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider-usage-pricing.shared.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"provider-usage-pricing.shared.schemas.d.ts","sourceRoot":"","sources":["../../../src/external-providers/provider-usage-pricing.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB;;;;;GAKG;AACH,oBAAY,4BAA4B;IACtC,4GAA4G;IAC5G,WAAW,gBAAgB;IAC3B,4GAA4G;IAC5G,kBAAkB,uBAAuB;IACzC,6GAA6G;IAC7G,uBAAuB,4BAA4B;IACnD,gGAAgG;IAChG,YAAY,iBAAiB;IAC7B;;;;OAIG;IACH,eAAe,oBAAoB;CACpC;AAED,eAAO,MAAM,qCAAqC,EAAE,SAAS,4BAA4B,EAMvF,CAAC;AAEH;;;;GAIG;AACH,oBAAY,gCAAgC;IAC1C,+BAA+B,oCAAoC;CACpE;AAED,4DAA4D;AAC5D,oBAAY,gCAAgC;IAC1C,iHAAiH;IACjH,0BAA0B,+BAA+B;CAC1D;AAED,iEAAiE;AACjE,eAAO,MAAM,2CAA2C,QAAS,CAAC;AAElE,eAAO,MAAM,kCAAkC;;;IAG7C,oGAAoG;;IAEpG,sEAAsE;;kBAEtE,CAAC;AACH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAE9F,eAAO,MAAM,8BAA8B;;IAEzC,0EAA0E;;kBAE1E,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAEtF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,mCAAmC;;IAE9C,wFAAwF;;IAExF,yGAAyG;;IAEzG,kGAAkG;;IAElG,uGAAuG;;IAEvG,kFAAkF;;IAElF,2HAA2H;;;;;QAlC3H,0EAA0E;;;IAsC1E,mFAAmF;;;;QA/CnF,oGAAoG;;QAEpG,sEAAsE;;;IA+CtE,4DAA4D;;IAE5D,6FAA6F;;;kBAuB7F,CAAC;AACH,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAC;AAChG,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAC;AACrG,0EAA0E;AAE1E,6FAA6F;AAC7F,eAAO,MAAM,yBAAyB;;;kBAGpC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E;;;;;;GAMG;AACH,eAAO,MAAM,6BAA6B;;;;;;;;;;kBAOxC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider-usage-pricing.shared.schemas.js","sourceRoot":"","sources":["../../../../src/external-providers/provider-usage-pricing.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,4BAA4B,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,gCAAgC,CAAC,CAAC;AAC5K,MAAM,yBAAyB,GAAG,4BAA4B,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,GAAG,CAAC,EAAE,wBAAwB,CAAC,CAAC;AACtH,MAAM,iBAAiB,GAAG,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;AAE3D;;;;;GAKG;AACH,MAAM,CAAN,IAAY,4BAeX;AAfD,WAAY,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IACjD,wBAAwB,EAAE,yBAAyB;IACnD,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,yBAAyB,CAAC;CAC5C,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\n\nconst nonnegativeSafeIntegerSchema = z.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER).refine((value) => !Object.is(value, -0), 'negative zero is not canonical');\nconst positiveSafeIntegerSchema = nonnegativeSafeIntegerSchema.refine((value) => value > 0, 'value must be positive');\nconst isoDateTimeSchema = z.iso.datetime({ offset: true });\n\n/**\n * @wildo_source:part:start saas.models.provider-usage-pricing-authority facet:layer:shared facet:family:config facet:audience:app-developer\n *\n * Billable provider-usage dimensions. These are ACQUISITION-cost categories (what the application pays a\n * model provider), not customer billing units.\n */\nexport enum ProviderUsagePricingCategory {\n /** Input tokens read without a prompt cache (or every input token, when the provider reported no split). */\n INPUT_TOKEN = 'INPUT_TOKEN',\n /** Input tokens served from a prompt cache. Priced at `INPUT_TOKEN` when the authority declares no rate. */\n CACHED_INPUT_TOKEN = 'CACHED_INPUT_TOKEN',\n /** Input tokens written into a prompt cache. Priced at `INPUT_TOKEN` when the authority declares no rate. */\n CACHE_WRITE_INPUT_TOKEN = 'CACHE_WRITE_INPUT_TOKEN',\n /** Output tokens. Includes reasoning unless the authority declares a `REASONING_TOKEN` rate. */\n OUTPUT_TOKEN = 'OUTPUT_TOKEN',\n /**\n * Reasoning tokens, when the authority prices them apart. They are then SUBTRACTED from the output\n * quantity: every provider already counts reasoning inside its output total, so reasoning is never\n * billed twice.\n */\n REASONING_TOKEN = 'REASONING_TOKEN',\n}\n\nexport const PROVIDER_USAGE_PRICING_CATEGORY_ORDER: readonly ProviderUsagePricingCategory[] = Object.freeze([\n ProviderUsagePricingCategory.INPUT_TOKEN,\n ProviderUsagePricingCategory.CACHED_INPUT_TOKEN,\n ProviderUsagePricingCategory.CACHE_WRITE_INPUT_TOKEN,\n ProviderUsagePricingCategory.OUTPUT_TOKEN,\n ProviderUsagePricingCategory.REASONING_TOKEN,\n]);\n\n/**\n * How a TOTAL is rounded to a whole minor currency unit. There is one mode: exact per-call costs are summed\n * first and the sum is rounded up once, per reported total (#1598 review F11). Rounding each call up would\n * overstate an embedding-heavy case by up to one minor unit per call.\n */\nexport enum ProviderUsagePricingRoundingMode {\n CEILING_AGGREGATE_TO_MINOR_UNIT = 'CEILING_AGGREGATE_TO_MINOR_UNIT',\n}\n\n/** Closed trigger vocabulary for provider pricing tiers. */\nexport enum ProviderUsagePricingTierRuleKind {\n /** The whole request is priced at the tier when its INPUT quantity (all prompt tokens) exceeds the threshold. */\n INPUT_TOKEN_QUANTITY_ABOVE = 'INPUT_TOKEN_QUANTITY_ABOVE',\n}\n\n/** A rate multiplier is written in basis points: 10 000 = ×1. */\nexport const PROVIDER_USAGE_RATE_MULTIPLIER_BASIS_POINTS = 10_000;\n\nexport const ProviderUsagePricingTierRuleSchema = z.strictObject({\n kind: z.literal(ProviderUsagePricingTierRuleKind.INPUT_TOKEN_QUANTITY_ABOVE),\n inputTokenThresholdExclusive: nonnegativeSafeIntegerSchema,\n /** Multiplier on the three input categories, in basis points (≥ 10 000: a tier never discounts). */\n inputRateMultiplierBasisPoints: positiveSafeIntegerSchema,\n /** Multiplier on output and reasoning, in basis points (≥ 10 000). */\n outputRateMultiplierBasisPoints: positiveSafeIntegerSchema,\n});\nexport type ProviderUsagePricingTierRule = z.infer<typeof ProviderUsagePricingTierRuleSchema>;\n\nexport const ProviderUsagePricingRateSchema = z.strictObject({\n category: z.enum(ProviderUsagePricingCategory),\n /** Minor-currency units charged per `unitsDenominator` billable units. */\n amountMinorNumerator: nonnegativeSafeIntegerSchema,\n});\nexport type ProviderUsagePricingRate = z.infer<typeof ProviderUsagePricingRateSchema>;\n\n/**\n * One provider/model acquisition-cost price, REGISTERED BY THE APPLICATION in\n * `modelCostAccounting.providerUsagePricingAuthorities` (#1598), because rates are negotiated: a list price\n * shipped by the engine would be wrong for every firm with a contract, and would go stale.\n *\n * A price is identified by `pricingAuthorityRef@pricingAuthorityVersion`; the registry refuses a duplicate\n * pair at startup. A call is priced by the authority whose `providerRef` and `model` equal the call's\n * recorded provider and model, choosing the highest version whose `effectiveFrom` is not after the call.\n * No match leaves the call `UNPRICED`, never priced at zero.\n *\n * Deliberately separate from billing's `PriceSchema`, which is what the application CHARGES its customers.\n *\n * History: an earlier revision carried `implementationDigest` and `pricingDigest` and a \"sealed basis\" type\n * saying an application could \"neither choose rates\" nor mint the digest. Both were remnants of the retired\n * digest era (one-source-of-truth Rule 0) and contradicted the decision that the application registers its\n * rates. `modelRef` / `modelVersion` were replaced by `model`, the one id a call actually records.\n */\nexport const ProviderUsagePricingAuthoritySchema = z.strictObject({\n schemaVersion: z.literal(1),\n /** Stable name of this price list entry, for example `pricing:openai/gpt-5.6-terra`. */\n pricingAuthorityRef: z.string().min(1).max(200),\n /** Version of that entry. A rate change is a new version with a later `effectiveFrom`, never an edit. */\n pricingAuthorityVersion: positiveSafeIntegerSchema,\n /** The provider the call went to, exactly as the call records it (`openai`, `anthropic`, ...). */\n providerRef: z.string().min(1),\n /** The resolved model id, exactly as the call records it (`gpt-5.6-terra`, `claude-opus-4-8`, ...). */\n model: z.string().min(1),\n /** ISO 4217 code. Currencies are never converted: every total is per currency. */\n currency: z.string().regex(/^[A-Z]{3}$/),\n /** The number of billable units each rate's `amountMinorNumerator` is charged per (1 000 000 for \"per million tokens\"). */\n unitsDenominator: positiveSafeIntegerSchema,\n roundingMode: z.literal(ProviderUsagePricingRoundingMode.CEILING_AGGREGATE_TO_MINOR_UNIT),\n rates: z.array(ProviderUsagePricingRateSchema).min(1),\n /** Ordered full-request price tiers; the highest matching input threshold wins. */\n usageTierRules: z.array(ProviderUsagePricingTierRuleSchema),\n /** From when this version applies to a call (inclusive). */\n effectiveFrom: isoDateTimeSchema,\n /** Where the rates come from: a public price page, a contract reference. Provenance only. */\n sourceRef: z.string().min(1),\n sourceVersion: z.string().min(1),\n}).superRefine((authority, context) => {\n const categories = authority.rates.map((rate) => rate.category);\n if (new Set(categories).size !== categories.length) {\n context.addIssue({ code: 'custom', message: 'pricing categories must be unique', path: ['rates'] });\n }\n const order = new Map(PROVIDER_USAGE_PRICING_CATEGORY_ORDER.map((category, index) => [category, index]));\n if (!categories.every((category, index) => index === 0 || order.get(categories[index - 1]!)! < order.get(category)!)) {\n context.addIssue({ code: 'custom', message: 'pricing categories must use canonical order', path: ['rates'] });\n }\n for (const required of [ProviderUsagePricingCategory.INPUT_TOKEN, ProviderUsagePricingCategory.OUTPUT_TOKEN]) {\n if (!categories.includes(required)) context.addIssue({ code: 'custom', message: `${required} pricing is required`, path: ['rates'] });\n }\n if (!authority.usageTierRules.every((rule, index) => index === 0 || authority.usageTierRules[index - 1]!.inputTokenThresholdExclusive < rule.inputTokenThresholdExclusive)) {\n context.addIssue({ code: 'custom', message: 'usage pricing tiers must use unique ascending thresholds', path: ['usageTierRules'] });\n }\n for (const [index, rule] of authority.usageTierRules.entries()) {\n if (rule.inputRateMultiplierBasisPoints < PROVIDER_USAGE_RATE_MULTIPLIER_BASIS_POINTS || rule.outputRateMultiplierBasisPoints < PROVIDER_USAGE_RATE_MULTIPLIER_BASIS_POINTS) {\n context.addIssue({ code: 'custom', message: 'usage pricing tier multipliers cannot discount the registered base rate', path: ['usageTierRules', index] });\n }\n }\n});\nexport type ProviderUsagePricingAuthority = z.infer<typeof ProviderUsagePricingAuthoritySchema>;\nexport type ProviderUsagePricingAuthorityInput = z.input<typeof ProviderUsagePricingAuthoritySchema>;\n/** @wildo_source:part:end saas.models.provider-usage-pricing-authority */\n\n/** One priced quantity of one category, as the calculator derived it from a call's usage. */\nexport const ProviderUsageAmountSchema = z.strictObject({\n category: z.enum(ProviderUsagePricingCategory),\n quantity: nonnegativeSafeIntegerSchema,\n});\nexport type ProviderUsageAmount = z.infer<typeof ProviderUsageAmountSchema>;\n\n/**\n * The EXACT cost of one call under one authority, unrounded (#1598 F11):\n * `callCostMinorNumerator / callCostUnitsDenominator` minor currency units.\n *\n * The numerator is a decimal INTEGER STRING because it is an exact rational part and must survive both\n * adapters without floating-point loss; the denominator is small enough to stay a number.\n */\nexport const ProviderUsageCostResultSchema = z.strictObject({\n pricingAuthorityRef: z.string().min(1),\n pricingAuthorityVersion: positiveSafeIntegerSchema,\n currency: z.string().regex(/^[A-Z]{3}$/),\n callCostMinorNumerator: z.string().regex(/^\\d+$/),\n callCostUnitsDenominator: positiveSafeIntegerSchema,\n amounts: z.array(ProviderUsageAmountSchema),\n});\nexport type ProviderUsageCostResult = z.infer<typeof ProviderUsageCostResultSchema>;\n"]}
|
|
1
|
+
{"version":3,"file":"provider-usage-pricing.shared.schemas.js","sourceRoot":"","sources":["../../../src/external-providers/provider-usage-pricing.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,4BAA4B,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,gCAAgC,CAAC,CAAC;AAC5K,MAAM,yBAAyB,GAAG,4BAA4B,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,GAAG,CAAC,EAAE,wBAAwB,CAAC,CAAC;AACtH,MAAM,iBAAiB,GAAG,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;AAE3D;;;;;GAKG;AACH,MAAM,CAAN,IAAY,4BAeX;AAfD,WAAY,4BAA4B;IACtC,4GAA4G;IAC5G,2DAA2B,CAAA;IAC3B,4GAA4G;IAC5G,yEAAyC,CAAA;IACzC,6GAA6G;IAC7G,mFAAmD,CAAA;IACnD,gGAAgG;IAChG,6DAA6B,CAAA;IAC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number().int().nonnegative().max(Number.MAX_SAFE_INTEGER).refine((value) => !Object.is(value, -0), 'negative zero is not canonical');\nconst positiveSafeIntegerSchema = nonnegativeSafeIntegerSchema.refine((value) => value > 0, 'value must be positive');\nconst isoDateTimeSchema = z.iso.datetime({ offset: true });\n\n/**\n * @wildo_source:part:start saas.models.provider-usage-pricing-authority facet:layer:shared facet:family:config facet:audience:app-developer\n *\n * Billable provider-usage dimensions. These are ACQUISITION-cost categories (what the application pays a\n * model provider), not customer billing units.\n */\nexport enum ProviderUsagePricingCategory {\n /** Input tokens read without a prompt cache (or every input token, when the provider reported no split). */\n INPUT_TOKEN = 'INPUT_TOKEN',\n /** Input tokens served from a prompt cache. Priced at `INPUT_TOKEN` when the authority declares no rate. */\n CACHED_INPUT_TOKEN = 'CACHED_INPUT_TOKEN',\n /** Input tokens written into a prompt cache. Priced at `INPUT_TOKEN` when the authority declares no rate. */\n CACHE_WRITE_INPUT_TOKEN = 'CACHE_WRITE_INPUT_TOKEN',\n /** Output tokens. Includes reasoning unless the authority declares a `REASONING_TOKEN` rate. */\n OUTPUT_TOKEN = 'OUTPUT_TOKEN',\n /**\n * Reasoning tokens, when the authority prices them apart. They are then SUBTRACTED from the output\n * quantity: every provider already counts reasoning inside its output total, so reasoning is never\n * billed twice.\n */\n REASONING_TOKEN = 'REASONING_TOKEN',\n}\n\nexport const PROVIDER_USAGE_PRICING_CATEGORY_ORDER: readonly ProviderUsagePricingCategory[] = Object.freeze([\n ProviderUsagePricingCategory.INPUT_TOKEN,\n ProviderUsagePricingCategory.CACHED_INPUT_TOKEN,\n ProviderUsagePricingCategory.CACHE_WRITE_INPUT_TOKEN,\n ProviderUsagePricingCategory.OUTPUT_TOKEN,\n ProviderUsagePricingCategory.REASONING_TOKEN,\n]);\n\n/**\n * How a TOTAL is rounded to a whole minor currency unit. There is one mode: exact per-call costs are summed\n * first and the sum is rounded up once, per reported total (#1598 review F11). Rounding each call up would\n * overstate an embedding-heavy case by up to one minor unit per call.\n */\nexport enum ProviderUsagePricingRoundingMode {\n CEILING_AGGREGATE_TO_MINOR_UNIT = 'CEILING_AGGREGATE_TO_MINOR_UNIT',\n}\n\n/** Closed trigger vocabulary for provider pricing tiers. */\nexport enum ProviderUsagePricingTierRuleKind {\n /** The whole request is priced at the tier when its INPUT quantity (all prompt tokens) exceeds the threshold. */\n INPUT_TOKEN_QUANTITY_ABOVE = 'INPUT_TOKEN_QUANTITY_ABOVE',\n}\n\n/** A rate multiplier is written in basis points: 10 000 = ×1. */\nexport const PROVIDER_USAGE_RATE_MULTIPLIER_BASIS_POINTS = 10_000;\n\nexport const ProviderUsagePricingTierRuleSchema = z.strictObject({\n kind: z.literal(ProviderUsagePricingTierRuleKind.INPUT_TOKEN_QUANTITY_ABOVE),\n inputTokenThresholdExclusive: nonnegativeSafeIntegerSchema,\n /** Multiplier on the three input categories, in basis points (≥ 10 000: a tier never discounts). */\n inputRateMultiplierBasisPoints: positiveSafeIntegerSchema,\n /** Multiplier on output and reasoning, in basis points (≥ 10 000). */\n outputRateMultiplierBasisPoints: positiveSafeIntegerSchema,\n});\nexport type ProviderUsagePricingTierRule = z.infer<typeof ProviderUsagePricingTierRuleSchema>;\n\nexport const ProviderUsagePricingRateSchema = z.strictObject({\n category: z.enum(ProviderUsagePricingCategory),\n /** Minor-currency units charged per `unitsDenominator` billable units. */\n amountMinorNumerator: nonnegativeSafeIntegerSchema,\n});\nexport type ProviderUsagePricingRate = z.infer<typeof ProviderUsagePricingRateSchema>;\n\n/**\n * One provider/model acquisition-cost price, REGISTERED BY THE APPLICATION in\n * `modelCostAccounting.providerUsagePricingAuthorities` (#1598), because rates are negotiated: a list price\n * shipped by the engine would be wrong for every firm with a contract, and would go stale.\n *\n * A price is identified by `pricingAuthorityRef@pricingAuthorityVersion`; the registry refuses a duplicate\n * pair at startup. A call is priced by the authority whose `providerRef` and `model` equal the call's\n * recorded provider and model, choosing the highest version whose `effectiveFrom` is not after the call.\n * No match leaves the call `UNPRICED`, never priced at zero.\n *\n * Deliberately separate from billing's `PriceSchema`, which is what the application CHARGES its customers.\n *\n * History: an earlier revision carried `implementationDigest` and `pricingDigest` and a \"sealed basis\" type\n * saying an application could \"neither choose rates\" nor mint the digest. Both were remnants of the retired\n * digest era (one-source-of-truth Rule 0) and contradicted the decision that the application registers its\n * rates. `modelRef` / `modelVersion` were replaced by `model`, the one id a call actually records.\n */\nexport const ProviderUsagePricingAuthoritySchema = z.strictObject({\n schemaVersion: z.literal(1),\n /** Stable name of this price list entry, for example `pricing:openai/gpt-5.6-terra`. */\n pricingAuthorityRef: z.string().min(1).max(200),\n /** Version of that entry. A rate change is a new version with a later `effectiveFrom`, never an edit. */\n pricingAuthorityVersion: positiveSafeIntegerSchema,\n /** The provider the call went to, exactly as the call records it (`openai`, `anthropic`, ...). */\n providerRef: z.string().min(1),\n /** The resolved model id, exactly as the call records it (`gpt-5.6-terra`, `claude-opus-4-8`, ...). */\n model: z.string().min(1),\n /** ISO 4217 code. Currencies are never converted: every total is per currency. */\n currency: z.string().regex(/^[A-Z]{3}$/),\n /** The number of billable units each rate's `amountMinorNumerator` is charged per (1 000 000 for \"per million tokens\"). */\n unitsDenominator: positiveSafeIntegerSchema,\n roundingMode: z.literal(ProviderUsagePricingRoundingMode.CEILING_AGGREGATE_TO_MINOR_UNIT),\n rates: z.array(ProviderUsagePricingRateSchema).min(1),\n /** Ordered full-request price tiers; the highest matching input threshold wins. */\n usageTierRules: z.array(ProviderUsagePricingTierRuleSchema),\n /** From when this version applies to a call (inclusive). */\n effectiveFrom: isoDateTimeSchema,\n /** Where the rates come from: a public price page, a contract reference. Provenance only. */\n sourceRef: z.string().min(1),\n sourceVersion: z.string().min(1),\n}).superRefine((authority, context) => {\n const categories = authority.rates.map((rate) => rate.category);\n if (new Set(categories).size !== categories.length) {\n context.addIssue({ code: 'custom', message: 'pricing categories must be unique', path: ['rates'] });\n }\n const order = new Map(PROVIDER_USAGE_PRICING_CATEGORY_ORDER.map((category, index) => [category, index]));\n if (!categories.every((category, index) => index === 0 || order.get(categories[index - 1]!)! < order.get(category)!)) {\n context.addIssue({ code: 'custom', message: 'pricing categories must use canonical order', path: ['rates'] });\n }\n for (const required of [ProviderUsagePricingCategory.INPUT_TOKEN, ProviderUsagePricingCategory.OUTPUT_TOKEN]) {\n if (!categories.includes(required)) context.addIssue({ code: 'custom', message: `${required} pricing is required`, path: ['rates'] });\n }\n if (!authority.usageTierRules.every((rule, index) => index === 0 || authority.usageTierRules[index - 1]!.inputTokenThresholdExclusive < rule.inputTokenThresholdExclusive)) {\n context.addIssue({ code: 'custom', message: 'usage pricing tiers must use unique ascending thresholds', path: ['usageTierRules'] });\n }\n for (const [index, rule] of authority.usageTierRules.entries()) {\n if (rule.inputRateMultiplierBasisPoints < PROVIDER_USAGE_RATE_MULTIPLIER_BASIS_POINTS || rule.outputRateMultiplierBasisPoints < PROVIDER_USAGE_RATE_MULTIPLIER_BASIS_POINTS) {\n context.addIssue({ code: 'custom', message: 'usage pricing tier multipliers cannot discount the registered base rate', path: ['usageTierRules', index] });\n }\n }\n});\nexport type ProviderUsagePricingAuthority = z.infer<typeof ProviderUsagePricingAuthoritySchema>;\nexport type ProviderUsagePricingAuthorityInput = z.input<typeof ProviderUsagePricingAuthoritySchema>;\n/** @wildo_source:part:end saas.models.provider-usage-pricing-authority */\n\n/** One priced quantity of one category, as the calculator derived it from a call's usage. */\nexport const ProviderUsageAmountSchema = z.strictObject({\n category: z.enum(ProviderUsagePricingCategory),\n quantity: nonnegativeSafeIntegerSchema,\n});\nexport type ProviderUsageAmount = z.infer<typeof ProviderUsageAmountSchema>;\n\n/**\n * The EXACT cost of one call under one authority, unrounded (#1598 F11):\n * `callCostMinorNumerator / callCostUnitsDenominator` minor currency units.\n *\n * The numerator is a decimal INTEGER STRING because it is an exact rational part and must survive both\n * adapters without floating-point loss; the denominator is small enough to stay a number.\n */\nexport const ProviderUsageCostResultSchema = z.strictObject({\n pricingAuthorityRef: z.string().min(1),\n pricingAuthorityVersion: positiveSafeIntegerSchema,\n currency: z.string().regex(/^[A-Z]{3}$/),\n callCostMinorNumerator: z.string().regex(/^\\d+$/),\n callCostUnitsDenominator: positiveSafeIntegerSchema,\n amounts: z.array(ProviderUsageAmountSchema),\n});\nexport type ProviderUsageCostResult = z.infer<typeof ProviderUsageCostResultSchema>;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application-features.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"application-features.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../src/features/application-features.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,uDAAuD,CAAC;AAGpF,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAA8D,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAOzI,oBAAY,8BAA8B;IACxC,cAAc,mBAAmB;IACjC,eAAe,oBAAoB;IACnC,cAAc,mBAAmB;CAClC;AAED,eAAO,MAAM,gDAAgD;;;iBAG3D,CAAC;AAEH,eAAO,MAAM,iDAAiD;;;iBAG5D,CAAC;AAEH,eAAO,MAAM,gDAAgD;;iBAE3D,CAAC;AAEH,KAAK,iCAAiC,GAClC,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,CAAC;AAEjC,eAAO,MAAM,8DAA8D,GAAI,wBAAwB,oBAAoB,EAAE;;;;;;;;;;kBA4K3H,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application-features.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../../src/features/application-features.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;GA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AY;oBAC1D,qBAAqB,EAAE,qBAAqB,CAAC,WAAW;oBACxD,UAAU,EAAE,gDAAgD;oBAC5D,gEAAgE;oBAChE,iBAAiB,EAAE,gCAAgC;iBACpD;aACF;SACF;KACF;CACF,CAAC,CAAC","sourcesContent":["/**\n * Application Features Shared Resource Configuration\n *\n * Application-scope entitlement ledger. This mirrors organization/user feature\n * ledgers so exact-scope gates such as `M2M_WEBHOOK_DELIVERY` can be enabled\n * for `WEBHOOK_APPLICATION` without leaking app enablement to every org.\n */\n\nimport { z } from 'zod';\nimport { CoreFeature } from '../organizations/organization-features.shared.schemas';\nimport { ApplicationFeaturesSchema, ScopeFeaturesWithOverridesSchema } from './scope-features.shared.schemas';\n\nimport { CoreResourceOperation } from '../resources/resources.shared.core.definitions';\nimport { ResourceOperationRiskLevel, ResourceOperationReversibility, ResourceRelationship } from '../resources/resources.shared.schemas';\nimport { CoreResourceType, coreResourceShared_FieldIdentifier } from '../resources/resources.shared.core.definitions';\nimport { ResourceOperationVariantType } from '../resources/resources.shared.schemas';\nimport { ResourceSystemAccessMode } from '../resources/resources-config.shared.schemas';\nimport { createResourceConfiguration_Initialization } from '../resources/resources-config.shared.factory';\nimport { CORE_APP_ROLES } from '../security/authorizations/roles.shared.schemas';\n\nexport enum ApplicationFeatures_Operations {\n ENABLE_FEATURE = 'enable_feature',\n DISABLE_FEATURE = 'disable_feature',\n RESET_FEATURES = 'reset_features',\n}\n\nexport const ApplicationFeaturesEnableFeatureRequestDtoSchema = z.object({\n featureId: z.enum(CoreFeature).describe('The feature to switch on. It is added to this scope\\'s manual overrides and taken off its removed list, so it stays on through billing changes.'),\n reason: z.string().max(500).optional().describe('Why the feature is being switched on. Recorded on the audit trail with the change.'),\n});\n\nexport const ApplicationFeaturesDisableFeatureRequestDtoSchema = z.object({\n featureId: z.enum(CoreFeature).describe('The feature to switch off. It is added to this scope\\'s removed list and taken off its added list, so it stays off through billing changes.'),\n reason: z.string().min(1).max(500).describe('Why the feature is being switched off. Recorded on the audit trail with the change.'),\n});\n\nexport const ApplicationFeaturesResetFeaturesRequestDtoSchema = z.object({\n reason: z.string().min(1).max(500).describe('Why every manual override is being cleared. Recorded on the audit trail with the change.'),\n});\n\ntype ApplicationFeaturesCoreOperations =\n | CoreResourceOperation.CREATE\n | CoreResourceOperation.READ\n | CoreResourceOperation.SEARCH\n | CoreResourceOperation.UPDATE\n | CoreResourceOperation.DELETE;\n\nexport const applicationFeaturesResourceConfiguration_InitializationFactory = (resourcesRelationships: ResourceRelationship[]) => createResourceConfiguration_Initialization<\n typeof ApplicationFeatures_Operations,\n ApplicationFeaturesCoreOperations,\n typeof ApplicationFeaturesSchema\n>({\n mainSchema: ApplicationFeaturesSchema,\n resourceIdentifier: CoreResourceType.APPLICATION_FEATURES,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.APPLICATION_FEATURES],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true,\n /*\n * The framework may materialise this scope's row on a caller's behalf.\n *\n * `systemAccessPolicy.create: ALLOWED` is what #1179's seam reads before materialising a\n * context-addressed singleton the caller never named: an administrator can START configuring a\n * scope that has no row yet, instead of being 404ed for the framework's own omission. Its three\n * enterprise-config siblings (SSO / SCIM / SIEM) already declared it; this resource did not, so\n * the same first write was refused here and nowhere else.\n *\n * The row written is the scope foreign key and nothing else — this resource's own schema fills\n * the rest — so the seeding system keeps ownership of what a default MEANS and the seam decides\n * only WHEN the row comes into existence.\n *\n * NOTE, because it was measured on 2026-09-19 and is easy to assume otherwise: this does NOT make\n * a READ materialise. That seam is reached for UPDATE and DELETE only, and extending it to READ\n * was tried and reverted — a probe of the running backend showed the read route never enters it.\n * A scope whose row is still absent therefore still 404s on read; making that row EXIST is a\n * seeding question, not an access-policy one.\n */\n systemAccessPolicy: {\n read: ResourceSystemAccessMode.ALLOWED,\n create: ResourceSystemAccessMode.ALLOWED,\n },\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 application is deleted. Without\n // it the cascade throws ErrorType.CONFIGURATION on any app that has a features row.\n CoreResourceOperation.DELETE,\n ],\n\n customOperation: ApplicationFeatures_Operations,\n\n // assurance-control: WILDO.ENTITLEMENT.NO_SELF_GRANT — the application-wide entitlement set is\n // operator-gated on every operation, read included.\n //\n // This is the widest of the three feature ledgers: a write here changes what EVERY tenant is\n // entitled to, so it is the one ledger where even READ and SEARCH are `APP_ADMIN_SUPER_ADMIN`\n // rather than a tenant role. That asymmetry against the organization and user ledgers is the\n // deliberate part — those two let a tenant see its own entitlements; this one is not a tenant's to\n // see at all.\n //\n // As on the sibling ledgers the role is the entire control, because the super-admin path must write\n // these fields and so they cannot be field-protected. Pinned by\n // `security-sensitive-operation-reachability.backend.test.ts`.\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_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n ],\n },\n\n [CoreResourceOperation.SEARCH]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n isSearchable: false,\n searchableFields: [],\n searchableOptions: { caseSensitive: false, fullMatchOnly: false },\n filterFields: {},\n sortFields: [],\n maxPaginatedResultPerPageLimit: 50,\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],\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 [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 [ApplicationFeatures_Operations.ENABLE_FEATURE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.MEDIUM,\n resourceOperationLike: CoreResourceOperation.UPDATE_MANY,\n requestDto: ApplicationFeaturesEnableFeatureRequestDtoSchema,\n // The handler persists and returns the application's features row, like the organization\n // twin, so the response is that row rather than the UPDATE_MANY envelope the route shape\n // would imply (which the row does not satisfy, and the API reference published).\n customResponseDto: ScopeFeaturesWithOverridesSchema,\n },\n ],\n },\n\n [ApplicationFeatures_Operations.DISABLE_FEATURE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n resourceOperationLike: CoreResourceOperation.UPDATE_MANY,\n requestDto: ApplicationFeaturesDisableFeatureRequestDtoSchema,\n // Same as ENABLE_FEATURE: the handler returns the features row.\n customResponseDto: ScopeFeaturesWithOverridesSchema,\n },\n ],\n },\n\n [ApplicationFeatures_Operations.RESET_FEATURES]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n // IRREVERSIBLE: Clears every override on the application. There is no backup of the list, and organizations relying on one lose access.\n // This is what admits it to the danger zone; risk alone no longer does.\n reversibility: ResourceOperationReversibility.IRREVERSIBLE,\n resourceOperationLike: CoreResourceOperation.UPDATE_MANY,\n requestDto: ApplicationFeaturesResetFeaturesRequestDtoSchema,\n // Same as ENABLE_FEATURE: the handler returns the features row.\n customResponseDto: ScopeFeaturesWithOverridesSchema,\n },\n ],\n },\n },\n});\n"]}
|
|
1
|
+
{"version":3,"file":"application-features.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../src/features/application-features.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,uDAAuD,CAAC;AACpF,OAAO,EAAE,yBAAyB,EAAE,gCAAgC,EAAE,MAAM,iCAAiC,CAAC;AAE9G,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAAE,0BAA0B,EAAE,8BAA8B,EAAwB,MAAM,uCAAuC,CAAC;AACzI,OAAO,EAAE,gBAAgB,EAAE,kCAAkC,EAAE,MAAM,gDAAgD,CAAC;AACtH,OAAO,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AACrF,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AACxF,OAAO,EAAE,0CAA0C,EAAE,MAAM,8CAA8C,CAAC;AAC1G,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AAEjF,MAAM,CAAN,IAAY,8BAIX;AAJD,WAAY,8BAA8B;IACxC,mEAAiC,CAAA;IACjC,qEAAmC,CAAA;IACnC,mEAAiC,CAAA;AACnC,CAAC,EAJW,8BAA8B,KAA9B,8BAA8B,QAIzC;AAED,MAAM,CAAC,MAAM,g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C;oBAC7C,SAAS,EAAE,0BAA0B,CAAC,IAAI;oBAC1C,qBAAqB,EAAE,qBAAqB,CAAC,WAAW;oBACxD,UAAU,EAAE,iDAAiD;oBAC7D,gEAAgE;oBAChE,iBAAiB,EAAE,gCAAgC;iBACpD;aACF;SACF;QAED,CAAC,8BAA8B,CAAC,cAAc,CAAC,EAAE;YAC/C,QAAQ,EAAE;gBACR;oBACE,WAAW,EAAE,4BAA4B,CAAC,QAAQ;oBAClD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,qBAAqB,CAAC;oBAC7C,SAAS,EAAE,0BAA0B,CAAC,QAAQ;oBAC9C,wIAAwI;oBACxI,wEAAwE;oBACxE,aAAa,EAAE,8BAA8B,CAAC,YAAY;oBAC1D,qBAAqB,EAAE,qBAAqB,CAAC,WAAW;oBACxD,UAAU,EAAE,gDAAgD;oBAC5D,gEAAgE;oBAChE,iBAAiB,EAAE,gCAAgC;iBACpD;aACF;SACF;KACF;CACF,CAAC,CAAC","sourcesContent":["/**\n * Application Features Shared Resource Configuration\n *\n * Application-scope entitlement ledger. This mirrors organization/user feature\n * ledgers so exact-scope gates such as `M2M_WEBHOOK_DELIVERY` can be enabled\n * for `WEBHOOK_APPLICATION` without leaking app enablement to every org.\n */\n\nimport { z } from 'zod';\nimport { CoreFeature } from '../organizations/organization-features.shared.schemas';\nimport { ApplicationFeaturesSchema, ScopeFeaturesWithOverridesSchema } from './scope-features.shared.schemas';\n\nimport { CoreResourceOperation } from '../resources/resources.shared.core.definitions';\nimport { ResourceOperationRiskLevel, ResourceOperationReversibility, ResourceRelationship } from '../resources/resources.shared.schemas';\nimport { CoreResourceType, coreResourceShared_FieldIdentifier } from '../resources/resources.shared.core.definitions';\nimport { ResourceOperationVariantType } from '../resources/resources.shared.schemas';\nimport { ResourceSystemAccessMode } from '../resources/resources-config.shared.schemas';\nimport { createResourceConfiguration_Initialization } from '../resources/resources-config.shared.factory';\nimport { CORE_APP_ROLES } from '../security/authorizations/roles.shared.schemas';\n\nexport enum ApplicationFeatures_Operations {\n ENABLE_FEATURE = 'enable_feature',\n DISABLE_FEATURE = 'disable_feature',\n RESET_FEATURES = 'reset_features',\n}\n\nexport const ApplicationFeaturesEnableFeatureRequestDtoSchema = z.object({\n featureId: z.enum(CoreFeature).describe('The feature to switch on. It is added to this scope\\'s manual overrides and taken off its removed list, so it stays on through billing changes.'),\n reason: z.string().max(500).optional().describe('Why the feature is being switched on. Recorded on the audit trail with the change.'),\n});\n\nexport const ApplicationFeaturesDisableFeatureRequestDtoSchema = z.object({\n featureId: z.enum(CoreFeature).describe('The feature to switch off. It is added to this scope\\'s removed list and taken off its added list, so it stays off through billing changes.'),\n reason: z.string().min(1).max(500).describe('Why the feature is being switched off. Recorded on the audit trail with the change.'),\n});\n\nexport const ApplicationFeaturesResetFeaturesRequestDtoSchema = z.object({\n reason: z.string().min(1).max(500).describe('Why every manual override is being cleared. Recorded on the audit trail with the change.'),\n});\n\ntype ApplicationFeaturesCoreOperations =\n | CoreResourceOperation.CREATE\n | CoreResourceOperation.READ\n | CoreResourceOperation.SEARCH\n | CoreResourceOperation.UPDATE\n | CoreResourceOperation.DELETE;\n\nexport const applicationFeaturesResourceConfiguration_InitializationFactory = (resourcesRelationships: ResourceRelationship[]) => createResourceConfiguration_Initialization<\n typeof ApplicationFeatures_Operations,\n ApplicationFeaturesCoreOperations,\n typeof ApplicationFeaturesSchema\n>({\n mainSchema: ApplicationFeaturesSchema,\n resourceIdentifier: CoreResourceType.APPLICATION_FEATURES,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.APPLICATION_FEATURES],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true,\n /*\n * The framework may materialise this scope's row on a caller's behalf.\n *\n * `systemAccessPolicy.create: ALLOWED` is what #1179's seam reads before materialising a\n * context-addressed singleton the caller never named: an administrator can START configuring a\n * scope that has no row yet, instead of being 404ed for the framework's own omission. Its three\n * enterprise-config siblings (SSO / SCIM / SIEM) already declared it; this resource did not, so\n * the same first write was refused here and nowhere else.\n *\n * The row written is the scope foreign key and nothing else — this resource's own schema fills\n * the rest — so the seeding system keeps ownership of what a default MEANS and the seam decides\n * only WHEN the row comes into existence.\n *\n * NOTE, because it was measured on 2026-09-19 and is easy to assume otherwise: this does NOT make\n * a READ materialise. That seam is reached for UPDATE and DELETE only, and extending it to READ\n * was tried and reverted — a probe of the running backend showed the read route never enters it.\n * A scope whose row is still absent therefore still 404s on read; making that row EXIST is a\n * seeding question, not an access-policy one.\n */\n systemAccessPolicy: {\n read: ResourceSystemAccessMode.ALLOWED,\n create: ResourceSystemAccessMode.ALLOWED,\n },\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 application is deleted. Without\n // it the cascade throws ErrorType.CONFIGURATION on any app that has a features row.\n CoreResourceOperation.DELETE,\n ],\n\n customOperation: ApplicationFeatures_Operations,\n\n // assurance-control: WILDO.ENTITLEMENT.NO_SELF_GRANT — the application-wide entitlement set is\n // operator-gated on every operation, read included.\n //\n // This is the widest of the three feature ledgers: a write here changes what EVERY tenant is\n // entitled to, so it is the one ledger where even READ and SEARCH are `APP_ADMIN_SUPER_ADMIN`\n // rather than a tenant role. That asymmetry against the organization and user ledgers is the\n // deliberate part — those two let a tenant see its own entitlements; this one is not a tenant's to\n // see at all.\n //\n // As on the sibling ledgers the role is the entire control, because the super-admin path must write\n // these fields and so they cannot be field-protected. Pinned by\n // `security-sensitive-operation-reachability.backend.test.ts`.\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_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n ],\n },\n\n [CoreResourceOperation.SEARCH]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n isSearchable: false,\n searchableFields: [],\n searchableOptions: { caseSensitive: false, fullMatchOnly: false },\n filterFields: {},\n sortFields: [],\n maxPaginatedResultPerPageLimit: 50,\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],\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 [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 [ApplicationFeatures_Operations.ENABLE_FEATURE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.MEDIUM,\n resourceOperationLike: CoreResourceOperation.UPDATE_MANY,\n requestDto: ApplicationFeaturesEnableFeatureRequestDtoSchema,\n // The handler persists and returns the application's features row, like the organization\n // twin, so the response is that row rather than the UPDATE_MANY envelope the route shape\n // would imply (which the row does not satisfy, and the API reference published).\n customResponseDto: ScopeFeaturesWithOverridesSchema,\n },\n ],\n },\n\n [ApplicationFeatures_Operations.DISABLE_FEATURE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n resourceOperationLike: CoreResourceOperation.UPDATE_MANY,\n requestDto: ApplicationFeaturesDisableFeatureRequestDtoSchema,\n // Same as ENABLE_FEATURE: the handler returns the features row.\n customResponseDto: ScopeFeaturesWithOverridesSchema,\n },\n ],\n },\n\n [ApplicationFeatures_Operations.RESET_FEATURES]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n // IRREVERSIBLE: Clears every override on the application. There is no backup of the list, and organizations relying on one lose access.\n // This is what admits it to the danger zone; risk alone no longer does.\n reversibility: ResourceOperationReversibility.IRREVERSIBLE,\n resourceOperationLike: CoreResourceOperation.UPDATE_MANY,\n requestDto: ApplicationFeaturesResetFeaturesRequestDtoSchema,\n // Same as ENABLE_FEATURE: the handler returns the features row.\n customResponseDto: ScopeFeaturesWithOverridesSchema,\n },\n ],\n },\n },\n});\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connected-feature.example.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"connected-feature.example.d.ts","sourceRoot":"","sources":["../../../src/features/connected-feature.example.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAqC,KAAK,iCAAiC,EAAE,MAAM,2BAA2B,CAAC;AAItH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8CAA8C,CAAC;AAI3F,oIAAoI;AAYpI;;;GAGG;AACH,oBAAY,kBAAkB;IAC5B,2EAA2E;IAC3E,gBAAgB,qBAAqB;CACtC;AAED,eAAO,MAAM,0BAA0B,EAAE,iCAAiC,EAMzE,CAAC;AAGF,eAAO,MAAM,qBAAqB;;;;;;;;;;;CAM2D,CAAC;AAG9F,eAAO,MAAM,qBAAqB;;CAEoB,CAAC;AAGvD,eAAO,MAAM,oBAAoB,EAAE,sBAElC,CAAC;AACF,eAAO,MAAM,sBAAsB;;CAA6C,CAAC;AAEjF,oBAAY,aAAa;IACvB,uFAAuF;IACvF,iBAAiB,sBAAsB;CACxC;AAGD,eAAO,MAAM,kBAAkB,mCAI7B,CAAC;AACH,4EAA4E"}
|