@wildo-ai/saas-models 1.1.5 → 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 +2 -1
- package/dist/esm/applications/application-versions.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/applications/applications-context.schemas.d.ts +176 -2
- 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 +3 -2
- package/dist/esm/applications/applications.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/applications/applications.shared.schemas.d.ts +7 -5
- package/dist/esm/applications/applications.shared.schemas.d.ts.map +1 -1
- package/dist/esm/applications/applications.shared.schemas.js +6 -4
- package/dist/esm/applications/applications.shared.schemas.js.map +1 -1
- package/dist/esm/billing/billing-account.shared.resources-config.schemas.d.ts +10 -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 +49 -15
- 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 +2 -2
- package/dist/esm/billing/billing-account.shared.schemas.js.map +1 -1
- package/dist/esm/billing/billing-configuration.shared.schemas.d.ts +25 -0
- package/dist/esm/billing/billing-configuration.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-configuration.shared.schemas.js +19 -0
- package/dist/esm/billing/billing-configuration.shared.schemas.js.map +1 -1
- package/dist/esm/billing/billing-enums.shared.schemas.d.ts +27 -5
- package/dist/esm/billing/billing-enums.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-enums.shared.schemas.js +30 -4
- package/dist/esm/billing/billing-enums.shared.schemas.js.map +1 -1
- package/dist/esm/billing/billing-types.shared.schemas.d.ts +37 -11
- package/dist/esm/billing/billing-types.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-types.shared.schemas.js +31 -19
- package/dist/esm/billing/billing-types.shared.schemas.js.map +1 -1
- package/dist/esm/billing/credit-pool.shared.resources-config.schemas.d.ts +2 -0
- 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 +18 -7
- package/dist/esm/billing/credit-pool.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/billing/credit-pool.shared.schemas.d.ts +2 -0
- package/dist/esm/billing/credit-pool.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/credit-pool.shared.schemas.js +7 -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 +6 -6
- 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 +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 +5 -3
- package/dist/esm/billing/price.shared.schemas.js.map +1 -1
- package/dist/esm/billing/product-behavior-policy.shared.schemas.d.ts +11 -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 +39 -23
- package/dist/esm/billing/product-behavior-policy.shared.schemas.js.map +1 -1
- package/dist/esm/billing/product-definition.shared.schemas.d.ts +30 -2
- package/dist/esm/billing/product-definition.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/product-definition.shared.schemas.js +35 -0
- package/dist/esm/billing/product-definition.shared.schemas.js.map +1 -1
- package/dist/esm/billing/product.shared.resources-config.schemas.d.ts +6 -3
- 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 +7 -3
- package/dist/esm/billing/product.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/product.shared.schemas.js +22 -7
- 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 +8 -8
- 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 +135 -0
- package/dist/esm/billing/public-pricing-catalog.shared.atoms.d.ts.map +1 -0
- package/dist/esm/billing/public-pricing-catalog.shared.atoms.js +112 -0
- package/dist/esm/billing/public-pricing-catalog.shared.atoms.js.map +1 -0
- package/dist/esm/billing/public-pricing-catalog.shared.d.ts +30 -0
- package/dist/esm/billing/public-pricing-catalog.shared.d.ts.map +1 -0
- package/dist/esm/billing/public-pricing-catalog.shared.js +53 -0
- package/dist/esm/billing/public-pricing-catalog.shared.js.map +1 -0
- package/dist/esm/billing/referral-reward.shared.schemas.d.ts +51 -0
- package/dist/esm/billing/referral-reward.shared.schemas.d.ts.map +1 -0
- package/dist/esm/billing/referral-reward.shared.schemas.js +92 -0
- package/dist/esm/billing/referral-reward.shared.schemas.js.map +1 -0
- package/dist/esm/billing/referral.shared.resources-config.schemas.d.ts +54 -33
- package/dist/esm/billing/referral.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/referral.shared.resources-config.schemas.js +56 -2
- package/dist/esm/billing/referral.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/billing/referral.shared.schemas.d.ts +22 -37
- package/dist/esm/billing/referral.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/referral.shared.schemas.js +24 -44
- package/dist/esm/billing/referral.shared.schemas.js.map +1 -1
- package/dist/esm/billing/subscription.shared.resources-config.schemas.d.ts +9 -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 +55 -22
- package/dist/esm/billing/subscription.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/billing/subscription.shared.schemas.d.ts +80 -5
- package/dist/esm/billing/subscription.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/subscription.shared.schemas.js +85 -25
- 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 +5 -5
- 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 +143 -2
- package/dist/esm/companion/provider-discovery.shared.schemas.d.ts.map +1 -1
- package/dist/esm/companion/provider-discovery.shared.schemas.js +84 -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 +14 -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 +4 -0
- 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 +70 -0
- 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 +87 -0
- 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 +34 -0
- 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 +137 -3
- 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 +7 -0
- 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 +28 -2
- 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 +29 -8
- 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 +29 -6
- 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 +38 -9
- 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 +1822 -146
- 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 +1777 -87
- 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 +10 -0
- 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 +148 -7
- 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 +2 -0
- 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 +2 -0
- 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 +17 -8
- 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 +43 -20
- 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 +38 -0
- package/dist/esm/compliance/privacy/impersonalization.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/impersonalization.shared.schemas.js +39 -0
- 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 +35 -0
- package/dist/esm/compliance/privacy/legal-hold-subject-attribution.shared.utils.d.ts.map +1 -0
- package/dist/esm/compliance/privacy/legal-hold-subject-attribution.shared.utils.js +82 -0
- package/dist/esm/compliance/privacy/legal-hold-subject-attribution.shared.utils.js.map +1 -0
- package/dist/esm/compliance/privacy/legal-holds.shared.resources-config.schemas.d.ts +37 -0
- package/dist/esm/compliance/privacy/legal-holds.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/compliance/privacy/legal-holds.shared.resources-config.schemas.js +223 -0
- package/dist/esm/compliance/privacy/legal-holds.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/compliance/privacy/legal-holds.shared.schemas.d.ts +222 -0
- package/dist/esm/compliance/privacy/legal-holds.shared.schemas.d.ts.map +1 -0
- package/dist/esm/compliance/privacy/legal-holds.shared.schemas.js +331 -0
- package/dist/esm/compliance/privacy/legal-holds.shared.schemas.js.map +1 -0
- package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.d.ts +37 -3
- 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 +33 -4
- 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 +52 -0
- package/dist/esm/compliance/privacy/provider-capability-disclosure.shared.schemas.d.ts.map +1 -0
- package/dist/esm/compliance/privacy/provider-capability-disclosure.shared.schemas.js +116 -0
- package/dist/esm/compliance/privacy/provider-capability-disclosure.shared.schemas.js.map +1 -0
- package/dist/esm/compliance/privacy/purpose-ref.shared.schemas.d.ts +11 -0
- package/dist/esm/compliance/privacy/purpose-ref.shared.schemas.d.ts.map +1 -0
- package/dist/esm/compliance/privacy/purpose-ref.shared.schemas.js +11 -0
- package/dist/esm/compliance/privacy/purpose-ref.shared.schemas.js.map +1 -0
- 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 +93 -0
- package/dist/esm/compliance/privacy/retention-binding.shared.utils.d.ts.map +1 -0
- package/dist/esm/compliance/privacy/retention-binding.shared.utils.js +149 -0
- package/dist/esm/compliance/privacy/retention-binding.shared.utils.js.map +1 -0
- package/dist/esm/compliance/privacy/retention-enforcement-records.shared.resources-config.schemas.d.ts +43 -0
- package/dist/esm/compliance/privacy/retention-enforcement-records.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/compliance/privacy/retention-enforcement-records.shared.resources-config.schemas.js +106 -0
- package/dist/esm/compliance/privacy/retention-enforcement-records.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/compliance/privacy/retention-enforcement-records.shared.schemas.d.ts +209 -0
- package/dist/esm/compliance/privacy/retention-enforcement-records.shared.schemas.d.ts.map +1 -0
- package/dist/esm/compliance/privacy/retention-enforcement-records.shared.schemas.js +226 -0
- package/dist/esm/compliance/privacy/retention-enforcement-records.shared.schemas.js.map +1 -0
- package/dist/esm/compliance/privacy/retention-schedule.shared.schemas.d.ts +129 -5
- package/dist/esm/compliance/privacy/retention-schedule.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/retention-schedule.shared.schemas.js +128 -4
- 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 +53 -0
- package/dist/esm/compliance/privacy/retention-scope-deleted.shared.utils.d.ts.map +1 -0
- package/dist/esm/compliance/privacy/retention-scope-deleted.shared.utils.js +74 -0
- package/dist/esm/compliance/privacy/retention-scope-deleted.shared.utils.js.map +1 -0
- 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 +311 -0
- package/dist/esm/compliance/privacy/subject-data-recipients.shared.schemas.d.ts.map +1 -0
- package/dist/esm/compliance/privacy/subject-data-recipients.shared.schemas.js +355 -0
- package/dist/esm/compliance/privacy/subject-data-recipients.shared.schemas.js.map +1 -0
- 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 +178 -39
- package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.js +145 -35
- 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 +26 -0
- 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 +9 -0
- 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 +109 -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 +57 -0
- 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 +69 -0
- package/dist/esm/config/entity-identity-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/entity-identity-config.shared.schemas.js +93 -0
- package/dist/esm/config/entity-identity-config.shared.schemas.js.map +1 -1
- package/dist/esm/config/frontend/chart-definition.shared.schemas.d.ts +16 -16
- 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 +160 -61
- package/dist/esm/config/frontend/navigation.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/frontend/navigation.shared.schemas.js +297 -65
- 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 +69 -0
- package/dist/esm/errors/caught-error-description.shared.utils.d.ts.map +1 -0
- package/dist/esm/errors/caught-error-description.shared.utils.js +77 -0
- package/dist/esm/errors/caught-error-description.shared.utils.js.map +1 -0
- package/dist/esm/errors/errors.custom-message-ref.shared.definitions.d.ts +76 -3
- 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 +76 -2
- 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 +20 -1
- package/dist/esm/errors/errors.shared.schemas.d.ts.map +1 -1
- package/dist/esm/errors/errors.shared.schemas.js +16 -9
- package/dist/esm/errors/errors.shared.schemas.js.map +1 -1
- package/dist/esm/errors/errors.shared.utils.d.ts +0 -24
- package/dist/esm/errors/errors.shared.utils.d.ts.map +1 -1
- package/dist/esm/errors/errors.shared.utils.js +0 -39
- 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 +6 -7
- package/dist/esm/errors/thrown-value-description.shared.utils.d.ts.map +1 -1
- package/dist/esm/errors/thrown-value-description.shared.utils.js +6 -7
- 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 +70 -0
- package/dist/esm/external-data/external-data-pipeline-description.shared.d.ts.map +1 -0
- package/dist/esm/external-data/external-data-pipeline-description.shared.js +92 -0
- package/dist/esm/external-data/external-data-pipeline-description.shared.js.map +1 -0
- package/dist/esm/external-data/external-data-pipeline-pass-mode.shared.d.ts +154 -0
- package/dist/esm/external-data/external-data-pipeline-pass-mode.shared.d.ts.map +1 -0
- package/dist/esm/external-data/external-data-pipeline-pass-mode.shared.js +161 -0
- package/dist/esm/external-data/external-data-pipeline-pass-mode.shared.js.map +1 -0
- package/dist/esm/external-data/external-data-pipeline.shared.schemas.d.ts +1071 -23
- 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 +1065 -17
- 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 +71 -0
- package/dist/esm/external-data/external-data-provenance.shared.d.ts.map +1 -0
- package/dist/esm/external-data/external-data-provenance.shared.js +88 -0
- package/dist/esm/external-data/external-data-provenance.shared.js.map +1 -0
- package/dist/esm/external-data.exports.d.ts +5 -0
- package/dist/esm/external-data.exports.d.ts.map +1 -1
- package/dist/esm/external-data.exports.js +11 -0
- 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 +17 -2
- package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/engine-capabilities.shared.schemas.js +22 -4
- 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 +3 -0
- 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 +2 -0
- 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 +152 -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 +4 -3
- 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 +4 -3
- 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 +45 -0
- 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 +14 -0
- 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 +188 -4
- 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 +76 -9
- package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/frontend-provider-public-config.shared.d.ts +175 -33
- 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 +247 -42
- 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 +53 -0
- package/dist/esm/external-providers/model-cost-accounting-config.shared.schemas.d.ts.map +1 -0
- package/dist/esm/external-providers/model-cost-accounting-config.shared.schemas.js +41 -0
- package/dist/esm/external-providers/model-cost-accounting-config.shared.schemas.js.map +1 -0
- package/dist/esm/external-providers/provider-address-lookup-contract.shared.types.d.ts +150 -0
- package/dist/esm/external-providers/provider-address-lookup-contract.shared.types.d.ts.map +1 -0
- package/dist/esm/external-providers/provider-address-lookup-contract.shared.types.js +22 -0
- package/dist/esm/external-providers/provider-address-lookup-contract.shared.types.js.map +1 -0
- package/dist/esm/external-providers/provider-augmentation-opt-ins.shared.schemas.d.ts +42 -0
- package/dist/esm/external-providers/provider-augmentation-opt-ins.shared.schemas.d.ts.map +1 -0
- package/dist/esm/external-providers/provider-augmentation-opt-ins.shared.schemas.js +49 -0
- package/dist/esm/external-providers/provider-augmentation-opt-ins.shared.schemas.js.map +1 -0
- 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 +53 -0
- 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 +56 -0
- 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 +34 -0
- package/dist/esm/external-providers/provider-capability.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-capability.shared.schemas.js +34 -0
- 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 +341 -4
- 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 +270 -20
- 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 +6 -2
- 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 +6 -2
- 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 +174 -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 +125 -0
- 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 +3 -3
- 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 +42 -0
- package/dist/esm/external-providers/provider-package-allow-list.shared.schemas.d.ts.map +1 -0
- package/dist/esm/external-providers/provider-package-allow-list.shared.schemas.js +57 -0
- package/dist/esm/external-providers/provider-package-allow-list.shared.schemas.js.map +1 -0
- package/dist/esm/external-providers/provider-protocol.shared.schemas.d.ts +6 -0
- package/dist/esm/external-providers/provider-protocol.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-protocol.shared.schemas.js +6 -0
- 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 +58 -0
- package/dist/esm/external-providers/provider-scope-reauthorization.shared.schemas.d.ts.map +1 -0
- package/dist/esm/external-providers/provider-scope-reauthorization.shared.schemas.js +35 -0
- package/dist/esm/external-providers/provider-scope-reauthorization.shared.schemas.js.map +1 -0
- package/dist/esm/external-providers/provider-shared-connections.shared.schemas.d.ts +115 -0
- package/dist/esm/external-providers/provider-shared-connections.shared.schemas.d.ts.map +1 -0
- package/dist/esm/external-providers/provider-shared-connections.shared.schemas.js +137 -0
- package/dist/esm/external-providers/provider-shared-connections.shared.schemas.js.map +1 -0
- 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 +73 -0
- package/dist/esm/external-providers/provider-usage-cost.shared.d.ts.map +1 -0
- package/dist/esm/external-providers/provider-usage-cost.shared.js +171 -0
- package/dist/esm/external-providers/provider-usage-cost.shared.js.map +1 -0
- package/dist/esm/external-providers/provider-usage-pricing.example.d.ts +12 -0
- package/dist/esm/external-providers/provider-usage-pricing.example.d.ts.map +1 -0
- package/dist/esm/external-providers/provider-usage-pricing.example.js +40 -0
- package/dist/esm/external-providers/provider-usage-pricing.example.js.map +1 -0
- package/dist/esm/external-providers/provider-usage-pricing.shared.schemas.d.ts +68 -32
- 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 +63 -52
- 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 +5 -5
- 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 +13 -5
- 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 +2 -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 +2 -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 +2 -11
- package/dist/esm/features/feature-definition.shared.schemas.d.ts.map +1 -1
- package/dist/esm/features/feature-definition.shared.schemas.js +0 -12
- 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 +31 -17
- package/dist/esm/features/scope-features.shared.schemas.d.ts.map +1 -1
- package/dist/esm/features/scope-features.shared.schemas.js +27 -5
- package/dist/esm/features/scope-features.shared.schemas.js.map +1 -1
- package/dist/esm/features/user-features.shared.resources-config.schemas.d.ts +5 -5
- 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 +127 -11
- package/dist/esm/flows-actors/actors.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/actors.shared.schemas.js +32 -1
- package/dist/esm/flows-actors/actors.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/agent-traceability.shared.schemas.d.ts +16 -0
- package/dist/esm/flows-actors/agent-traceability.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/agent-traceability.shared.schemas.js +7 -0
- 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 +68 -0
- package/dist/esm/flows-actors/agent-work-decisions.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/flows-actors/agent-work-decisions.shared.resources-config.schemas.js +276 -0
- package/dist/esm/flows-actors/agent-work-decisions.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/flows-actors/agent-work-decisions.shared.schemas.d.ts +468 -0
- package/dist/esm/flows-actors/agent-work-decisions.shared.schemas.d.ts.map +1 -0
- package/dist/esm/flows-actors/agent-work-decisions.shared.schemas.js +472 -0
- package/dist/esm/flows-actors/agent-work-decisions.shared.schemas.js.map +1 -0
- 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 +118 -0
- package/dist/esm/flows-actors/autonomous-agents.shared.schemas.d.ts.map +1 -0
- package/dist/esm/flows-actors/autonomous-agents.shared.schemas.js +144 -0
- package/dist/esm/flows-actors/autonomous-agents.shared.schemas.js.map +1 -0
- 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 +142 -8
- 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 +209 -11
- 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 +37 -2
- 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 +30 -2
- 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 +0 -11
- 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 +12 -5
- 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 +45 -6
- 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 +31 -5
- 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 +30 -30
- 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 +15 -7
- 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 +15 -0
- 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 +506 -0
- package/dist/esm/flows-actors/human-decision.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/human-decision.shared.schemas.js +502 -0
- 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 +46 -0
- package/dist/esm/flows-actors/model-call-attributions.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/flows-actors/model-call-attributions.shared.resources-config.schemas.js +65 -0
- package/dist/esm/flows-actors/model-call-attributions.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/flows-actors/model-call-attributions.shared.schemas.d.ts +120 -0
- package/dist/esm/flows-actors/model-call-attributions.shared.schemas.d.ts.map +1 -0
- package/dist/esm/flows-actors/model-call-attributions.shared.schemas.js +165 -0
- package/dist/esm/flows-actors/model-call-attributions.shared.schemas.js.map +1 -0
- package/dist/esm/flows-actors/model-cost-period-aggregates.shared.resources-config.schemas.d.ts +45 -0
- package/dist/esm/flows-actors/model-cost-period-aggregates.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/flows-actors/model-cost-period-aggregates.shared.resources-config.schemas.js +127 -0
- package/dist/esm/flows-actors/model-cost-period-aggregates.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/flows-actors/model-cost-period-aggregates.shared.schemas.d.ts +83 -0
- package/dist/esm/flows-actors/model-cost-period-aggregates.shared.schemas.d.ts.map +1 -0
- package/dist/esm/flows-actors/model-cost-period-aggregates.shared.schemas.js +97 -0
- package/dist/esm/flows-actors/model-cost-period-aggregates.shared.schemas.js.map +1 -0
- package/dist/esm/flows-actors/model-cost-summary.shared.schemas.d.ts +136 -0
- package/dist/esm/flows-actors/model-cost-summary.shared.schemas.d.ts.map +1 -0
- package/dist/esm/flows-actors/model-cost-summary.shared.schemas.js +90 -0
- package/dist/esm/flows-actors/model-cost-summary.shared.schemas.js.map +1 -0
- 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 +5 -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 +19 -4
- 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 +13 -15
- 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 +30 -17
- 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 +268 -0
- package/dist/esm/flows-actors/review-deadlines.shared.schemas.d.ts.map +1 -0
- package/dist/esm/flows-actors/review-deadlines.shared.schemas.js +576 -0
- package/dist/esm/flows-actors/review-deadlines.shared.schemas.js.map +1 -0
- package/dist/esm/flows-actors/tasks.actors.shared.schemas.d.ts +30 -0
- 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 +129 -0
- package/dist/esm/flows-actors/work-attribution.shared.schemas.d.ts.map +1 -0
- package/dist/esm/flows-actors/work-attribution.shared.schemas.js +141 -0
- package/dist/esm/flows-actors/work-attribution.shared.schemas.js.map +1 -0
- package/dist/esm/frontend-definitions/frontend-notification-custom-message-ref.definitions.d.ts +22 -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 +23 -0
- 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 +61 -0
- package/dist/esm/frontend-definitions/settings-destination-ref.definitions.d.ts.map +1 -1
- package/dist/esm/frontend-definitions/settings-destination-ref.definitions.js +61 -0
- 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 +11 -10
- 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 +6 -6
- 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 +8 -7
- 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 +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 +550 -30
- 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 +498 -34
- 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 +62 -0
- package/dist/esm/http-api-binding/http-api-erasure-stance.shared.d.ts.map +1 -0
- package/dist/esm/http-api-binding/http-api-erasure-stance.shared.js +66 -0
- package/dist/esm/http-api-binding/http-api-erasure-stance.shared.js.map +1 -0
- package/dist/esm/http-api-binding/http-api-rest-write-operations.shared.schemas.d.ts +133 -0
- package/dist/esm/http-api-binding/http-api-rest-write-operations.shared.schemas.d.ts.map +1 -0
- package/dist/esm/http-api-binding/http-api-rest-write-operations.shared.schemas.js +191 -0
- package/dist/esm/http-api-binding/http-api-rest-write-operations.shared.schemas.js.map +1 -0
- package/dist/esm/http-api-binding/http-api-transport-dialect.shared.d.ts +37 -6
- 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 +37 -6
- 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 +36 -0
- package/dist/esm/i18n/application-config-vocabulary.shared.d.ts.map +1 -0
- package/dist/esm/i18n/application-config-vocabulary.shared.js +39 -0
- package/dist/esm/i18n/application-config-vocabulary.shared.js.map +1 -0
- package/dist/esm/i18n/engine-open-vocabulary-values.shared.d.ts +11 -0
- package/dist/esm/i18n/engine-open-vocabulary-values.shared.d.ts.map +1 -0
- package/dist/esm/i18n/engine-open-vocabulary-values.shared.js +14 -0
- package/dist/esm/i18n/engine-open-vocabulary-values.shared.js.map +1 -0
- package/dist/esm/i18n/engine-open-vocabulary.shared.d.ts +20 -0
- package/dist/esm/i18n/engine-open-vocabulary.shared.d.ts.map +1 -0
- package/dist/esm/i18n/engine-open-vocabulary.shared.js +21 -0
- package/dist/esm/i18n/engine-open-vocabulary.shared.js.map +1 -0
- 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 +94 -0
- package/dist/esm/inbound/conversation-threads.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/inbound/conversation-threads.shared.resources-config.schemas.js +206 -0
- package/dist/esm/inbound/conversation-threads.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/inbound/conversation-threads.shared.schemas.d.ts +169 -0
- package/dist/esm/inbound/conversation-threads.shared.schemas.d.ts.map +1 -0
- package/dist/esm/inbound/conversation-threads.shared.schemas.js +231 -0
- package/dist/esm/inbound/conversation-threads.shared.schemas.js.map +1 -0
- package/dist/esm/inbound/inbound-channels.shared.schemas.d.ts +195 -0
- package/dist/esm/inbound/inbound-channels.shared.schemas.d.ts.map +1 -0
- package/dist/esm/inbound/inbound-channels.shared.schemas.js +244 -0
- package/dist/esm/inbound/inbound-channels.shared.schemas.js.map +1 -0
- package/dist/esm/inbound/inbound-delivery.shared.resources-config.schemas.d.ts +36 -0
- package/dist/esm/inbound/inbound-delivery.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/inbound/inbound-delivery.shared.resources-config.schemas.js +169 -0
- package/dist/esm/inbound/inbound-delivery.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/inbound/inbound-delivery.shared.schemas.d.ts +404 -0
- package/dist/esm/inbound/inbound-delivery.shared.schemas.d.ts.map +1 -0
- package/dist/esm/inbound/inbound-delivery.shared.schemas.js +449 -0
- package/dist/esm/inbound/inbound-delivery.shared.schemas.js.map +1 -0
- package/dist/esm/inbound/inbound-endpoint-env.shared.d.ts +46 -0
- package/dist/esm/inbound/inbound-endpoint-env.shared.d.ts.map +1 -0
- package/dist/esm/inbound/inbound-endpoint-env.shared.js +57 -0
- package/dist/esm/inbound/inbound-endpoint-env.shared.js.map +1 -0
- package/dist/esm/index.d.ts +58 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +67 -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 +28 -0
- 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 +29 -0
- 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 +95 -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 +121 -0
- 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 +0 -1
- package/dist/esm/meta-workflows.exports.d.ts.map +1 -1
- package/dist/esm/meta-workflows.exports.js +0 -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 +7 -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 +35 -0
- 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 +131 -0
- package/dist/esm/notifications/inbound-email/inbound-email.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/notifications/inbound-email/inbound-email.shared.resources-config.schemas.js +258 -0
- package/dist/esm/notifications/inbound-email/inbound-email.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/notifications/inbound-email/inbound-email.shared.schemas.d.ts +448 -0
- package/dist/esm/notifications/inbound-email/inbound-email.shared.schemas.d.ts.map +1 -0
- package/dist/esm/notifications/inbound-email/inbound-email.shared.schemas.js +530 -0
- package/dist/esm/notifications/inbound-email/inbound-email.shared.schemas.js.map +1 -0
- 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 +4 -3
- 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 +16 -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 +46 -16
- 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 +19 -12
- package/dist/esm/notifications/m2m/webhook-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/m2m/webhook-config.shared.schemas.js +77 -12
- 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 +35 -3
- package/dist/esm/notifications/notification-badges.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/notification-badges.schemas.js +43 -3
- 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 +66 -399
- package/dist/esm/notifications/notifications.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/notifications.shared.schemas.js +111 -58
- 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 +5 -5
- 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 +6 -6
- 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 +3 -0
- 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 +60 -14
- package/dist/esm/organizations/organization-members.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-members.shared.schemas.d.ts +3 -0
- package/dist/esm/organizations/organization-members.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-members.shared.schemas.js +30 -0
- 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 +9 -9
- 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 +4 -4
- package/dist/esm/organizations/organization-preferences.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-profile.shared.resources-config.schemas.d.ts +0 -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 +5 -5
- package/dist/esm/organizations/organization-profile.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-profile.shared.schemas.js +15 -10
- 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 +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 +2 -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 +63 -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 +106 -5
- 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 +9 -0
- 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 +7 -2
- 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 +3 -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 +12 -8
- package/dist/esm/organizations/organizations.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/organizations/organizations.shared.schemas.d.ts +7 -2
- package/dist/esm/organizations/organizations.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organizations.shared.schemas.js +51 -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 +58 -0
- package/dist/esm/organizations/service-provider-activity-feed.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/organizations/service-provider-activity-feed.shared.resources-config.schemas.js +188 -0
- package/dist/esm/organizations/service-provider-activity-feed.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/organizations/service-provider-activity-feed.shared.schemas.d.ts +122 -0
- package/dist/esm/organizations/service-provider-activity-feed.shared.schemas.d.ts.map +1 -0
- package/dist/esm/organizations/service-provider-activity-feed.shared.schemas.js +136 -0
- package/dist/esm/organizations/service-provider-activity-feed.shared.schemas.js.map +1 -0
- package/dist/esm/organizations/service-provider-capability-grants.shared.resources-config.schemas.d.ts +36 -0
- package/dist/esm/organizations/service-provider-capability-grants.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/organizations/service-provider-capability-grants.shared.resources-config.schemas.js +155 -0
- package/dist/esm/organizations/service-provider-capability-grants.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/organizations/service-provider-capability-grants.shared.schemas.d.ts +229 -0
- package/dist/esm/organizations/service-provider-capability-grants.shared.schemas.d.ts.map +1 -0
- package/dist/esm/organizations/service-provider-capability-grants.shared.schemas.js +290 -0
- package/dist/esm/organizations/service-provider-capability-grants.shared.schemas.js.map +1 -0
- package/dist/esm/organizations/service-provider-client-controls.shared.schemas.d.ts +48 -0
- package/dist/esm/organizations/service-provider-client-controls.shared.schemas.d.ts.map +1 -0
- package/dist/esm/organizations/service-provider-client-controls.shared.schemas.js +50 -0
- package/dist/esm/organizations/service-provider-client-controls.shared.schemas.js.map +1 -0
- package/dist/esm/organizations/service-provider-relationships.shared.resources-config.schemas.d.ts +97 -0
- package/dist/esm/organizations/service-provider-relationships.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/organizations/service-provider-relationships.shared.resources-config.schemas.js +572 -0
- package/dist/esm/organizations/service-provider-relationships.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/organizations/service-provider-relationships.shared.schemas.d.ts +590 -0
- package/dist/esm/organizations/service-provider-relationships.shared.schemas.d.ts.map +1 -0
- package/dist/esm/organizations/service-provider-relationships.shared.schemas.js +869 -0
- package/dist/esm/organizations/service-provider-relationships.shared.schemas.js.map +1 -0
- package/dist/esm/organizations/tenant-teardown-config.shared.schemas.d.ts +36 -6
- package/dist/esm/organizations/tenant-teardown-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/tenant-teardown-config.shared.schemas.js +57 -16
- package/dist/esm/organizations/tenant-teardown-config.shared.schemas.js.map +1 -1
- package/dist/esm/provider-registration-runtime.exports.d.ts +0 -1
- package/dist/esm/provider-registration-runtime.exports.d.ts.map +1 -1
- package/dist/esm/provider-registration-runtime.exports.js +0 -1
- package/dist/esm/provider-registration-runtime.exports.js.map +1 -1
- package/dist/esm/public-runtime/index.d.ts +30 -11
- package/dist/esm/public-runtime/index.d.ts.map +1 -1
- package/dist/esm/public-runtime/index.js +30 -11
- 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 +30 -2
- package/dist/esm/queue/jobs.shared.schemas.d.ts.map +1 -1
- package/dist/esm/queue/jobs.shared.schemas.js +12 -0
- 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 +6 -0
- package/dist/esm/requests/header-keys.shared.d.ts.map +1 -1
- package/dist/esm/requests/header-keys.shared.js +7 -0
- 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 +147 -8
- package/dist/esm/requests/manual-controllers-routes-documentation.js.map +1 -1
- package/dist/esm/requests/manual-controllers-routes-urls.d.ts +51 -23
- package/dist/esm/requests/manual-controllers-routes-urls.d.ts.map +1 -1
- package/dist/esm/requests/manual-controllers-routes-urls.js +64 -0
- package/dist/esm/requests/manual-controllers-routes-urls.js.map +1 -1
- package/dist/esm/requests/rate-limits.shared.schemas.d.ts.map +1 -1
- package/dist/esm/requests/rate-limits.shared.schemas.js.map +1 -1
- package/dist/esm/requests/websocket.shared.schemas.d.ts +78 -13
- package/dist/esm/requests/websocket.shared.schemas.d.ts.map +1 -1
- package/dist/esm/requests/websocket.shared.schemas.js +91 -18
- 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 +21 -0
- package/dist/esm/resources/embedded-resource-mark.shared.utils.d.ts.map +1 -0
- package/dist/esm/resources/embedded-resource-mark.shared.utils.js +22 -0
- package/dist/esm/resources/embedded-resource-mark.shared.utils.js.map +1 -0
- 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 +812 -32
- package/dist/esm/resources/resources-config.shared.factory.js.map +1 -1
- package/dist/esm/resources/resources-config.shared.schemas.d.ts +244 -48
- package/dist/esm/resources/resources-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/resources-config.shared.schemas.js +151 -17
- 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 +369 -12
- 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 +45 -0
- package/dist/esm/resources/resources.shared.core.definitions.d.ts.map +1 -1
- package/dist/esm/resources/resources.shared.core.definitions.js +92 -0
- package/dist/esm/resources/resources.shared.core.definitions.js.map +1 -1
- package/dist/esm/resources/resources.shared.schemas.d.ts +2 -17
- package/dist/esm/resources/resources.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/resources.shared.schemas.js +24 -20
- package/dist/esm/resources/resources.shared.schemas.js.map +1 -1
- package/dist/esm/resources/resources.shared.utils.d.ts +16 -8
- package/dist/esm/resources/resources.shared.utils.d.ts.map +1 -1
- package/dist/esm/resources/resources.shared.utils.js +16 -8
- package/dist/esm/resources/resources.shared.utils.js.map +1 -1
- package/dist/esm/resources/utils/collection-export.shared.utils.d.ts +2 -2
- package/dist/esm/resources/utils/collection-export.shared.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/collection-export.shared.utils.js +4 -2
- 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 +103 -0
- package/dist/esm/resources/utils/http-api-write-declaration.shared.utils.d.ts.map +1 -0
- package/dist/esm/resources/utils/http-api-write-declaration.shared.utils.js +275 -0
- package/dist/esm/resources/utils/http-api-write-declaration.shared.utils.js.map +1 -0
- 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 +51 -0
- package/dist/esm/resources/utils/no-subject-data-stance-coherence.shared.utils.d.ts.map +1 -0
- package/dist/esm/resources/utils/no-subject-data-stance-coherence.shared.utils.js +28 -0
- package/dist/esm/resources/utils/no-subject-data-stance-coherence.shared.utils.js.map +1 -0
- 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 +30 -19
- 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 +2 -0
- package/dist/esm/resources/utils/request-schema-field-carriage.shared.utils.d.ts.map +1 -0
- package/dist/esm/resources/utils/request-schema-field-carriage.shared.utils.js +33 -0
- package/dist/esm/resources/utils/request-schema-field-carriage.shared.utils.js.map +1 -0
- 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 +15 -0
- package/dist/esm/resources/utils/resource-polymorphism.factory.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.factory.js +6 -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 +30 -4
- 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 +46 -0
- 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 +205 -22
- 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 +19 -2
- package/dist/esm/resources/utils/resources-serialization.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-serialization.utils.js +4 -0
- 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 +15 -9
- 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 +20 -0
- package/dist/esm/resources/work-unit.shared.schemas.d.ts.map +1 -0
- package/dist/esm/resources/work-unit.shared.schemas.js +19 -0
- package/dist/esm/resources/work-unit.shared.schemas.js.map +1 -0
- 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 +48 -1
- package/dist/esm/runtime/execution-context.shared.schemas.d.ts.map +1 -1
- package/dist/esm/runtime/execution-context.shared.schemas.js +101 -9
- 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 +1 -0
- 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 +37 -20
- 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 +1 -0
- 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 +61 -48
- 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 +26 -0
- 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 +39 -5
- 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 +5 -3
- package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.dto.schemas.js +6 -0
- 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 +2 -2
- 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 +11 -0
- 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 +19 -8
- 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 +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 +5 -5
- 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 +11 -11
- 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 +2 -0
- 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 +9 -0
- 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 +169 -0
- package/dist/esm/security/authentications/service-provider-client-authentication.shared.schemas.d.ts.map +1 -0
- package/dist/esm/security/authentications/service-provider-client-authentication.shared.schemas.js +162 -0
- package/dist/esm/security/authentications/service-provider-client-authentication.shared.schemas.js.map +1 -0
- 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 +10 -8
- 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 +8 -8
- 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 +17 -16
- 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 +28 -25
- 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 +17 -6
- 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 +90 -38
- 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 +0 -24
- 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 +79 -68
- 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 +8 -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 +7 -0
- 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 +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 +7 -7
- 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 +56 -0
- package/dist/esm/security/authorizations/roles.shared.defaults.js.map +1 -1
- package/dist/esm/security/authorizations/roles.shared.schemas.d.ts +77 -1
- package/dist/esm/security/authorizations/roles.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authorizations/roles.shared.schemas.js +90 -0
- 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 +86 -0
- package/dist/esm/security/connected-accounts/provider-connection-listing.shared.schemas.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/provider-connection-listing.shared.schemas.js +40 -0
- package/dist/esm/security/connected-accounts/provider-connection-listing.shared.schemas.js.map +1 -0
- package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.d.ts +2 -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 +2 -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 +2 -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 +2 -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 +46 -14
- 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 +81 -21
- 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 +69 -0
- package/dist/esm/security/credential-rotation-grace.shared.utils.d.ts.map +1 -0
- package/dist/esm/security/credential-rotation-grace.shared.utils.js +77 -0
- package/dist/esm/security/credential-rotation-grace.shared.utils.js.map +1 -0
- 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 +28 -8
- 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 +3 -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 +89 -14
- 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 +1 -0
- 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 +25 -4
- 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 +7 -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 +6 -0
- package/dist/esm/security/outbound-target-control.shared.schemas.js.map +1 -1
- package/dist/esm/security/submission-challenge/submission-challenge.shared.d.ts +143 -0
- package/dist/esm/security/submission-challenge/submission-challenge.shared.d.ts.map +1 -0
- package/dist/esm/security/submission-challenge/submission-challenge.shared.js +123 -0
- package/dist/esm/security/submission-challenge/submission-challenge.shared.js.map +1 -0
- package/dist/esm/systems-of-record/system-of-record-actions.shared.schemas.d.ts +384 -0
- package/dist/esm/systems-of-record/system-of-record-actions.shared.schemas.d.ts.map +1 -0
- package/dist/esm/systems-of-record/system-of-record-actions.shared.schemas.js +327 -0
- package/dist/esm/systems-of-record/system-of-record-actions.shared.schemas.js.map +1 -0
- 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 +121 -8
- 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 +83 -4
- 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 +266 -8
- 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 +291 -7
- 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 +313 -3
- 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 +369 -3
- 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 +2 -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 +5 -3
- 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 +19 -10
- 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 +6 -0
- 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 +2 -2
- 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 +0 -3
- 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 +0 -3
- 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 +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 +82 -20
- package/dist/esm/users/users.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/users/users.shared.schemas.d.ts +12 -9
- package/dist/esm/users/users.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/users.shared.schemas.js +49 -18
- package/dist/esm/users/users.shared.schemas.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/dist/esm/compliance/privacy/data-retention.shared.schemas.d.ts +0 -8
- package/dist/esm/compliance/privacy/data-retention.shared.schemas.d.ts.map +0 -1
- package/dist/esm/compliance/privacy/data-retention.shared.schemas.js +0 -7
- package/dist/esm/compliance/privacy/data-retention.shared.schemas.js.map +0 -1
|
@@ -4,13 +4,15 @@ export var StaticFrontEndType;
|
|
|
4
4
|
StaticFrontEndType["WEBSITE"] = "website";
|
|
5
5
|
StaticFrontEndType["TECHNICAL_DOCUMENTATION"] = "technical_documentation";
|
|
6
6
|
})(StaticFrontEndType || (StaticFrontEndType = {}));
|
|
7
|
+
/**
|
|
8
|
+
* The backend endpoints the runtime topology declares. One: the backend process binds exactly one port,
|
|
9
|
+
* and serves health, webhooks, the OAuth provider and MCP as routes on it. Four "sibling" members
|
|
10
|
+
* (health, webhook, OAuth, MCP at the API port minus 1..4) were removed with #1783 — nothing listened on
|
|
11
|
+
* any of them, so each was a URL that refused every connection.
|
|
12
|
+
*/
|
|
7
13
|
export var BackendApiType;
|
|
8
14
|
(function (BackendApiType) {
|
|
9
15
|
BackendApiType["MAIN_BACKEND_API"] = "main_backend_api";
|
|
10
|
-
BackendApiType["HEALTH_CHECK_API"] = "health_check_api";
|
|
11
|
-
BackendApiType["MAIN_WEBHOOK_API"] = "main_webhook_api";
|
|
12
|
-
BackendApiType["OAUTH2_PROVIDER_API"] = "oauth2_provider_api";
|
|
13
|
-
BackendApiType["MCP_API"] = "mcp_api";
|
|
14
16
|
})(BackendApiType || (BackendApiType = {}));
|
|
15
17
|
/**
|
|
16
18
|
* Background app-owned runtimes — kinds that an application owns but that
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"applications.shared.schemas.js","sourceRoot":"","sources":["../../../../src/applications/applications.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAN,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC5B,yCAAmB,CAAA;IACnB,yEAAmD,CAAA;AACrD,CAAC,EAHW,kBAAkB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Ac,EAAE;CACtE,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\n\nexport enum StaticFrontEndType {\n WEBSITE = 'website',\n TECHNICAL_DOCUMENTATION = 'technical_documentation',\n}\n\nexport enum BackendApiType {\n MAIN_BACKEND_API = 'main_backend_api',\n HEALTH_CHECK_API = 'health_check_api',\n MAIN_WEBHOOK_API = 'main_webhook_api',\n OAUTH2_PROVIDER_API = 'oauth2_provider_api',\n MCP_API = 'mcp_api',\n}\n\n/**\n * Background app-owned runtimes — kinds that an application owns but that\n * do NOT serve user-facing requests directly (no public HTTP surface for\n * end-users, no rendered frontend).\n *\n * Introduced by the minions-and-workers plan\n * (`.claude/plans/minions-and-workers-implementation.md`, KD-9):\n *\n * - `MINION` — TS/Node single-instance process sharing the application\n * scope (Mongo / Redis / RabbitMQ); hosts the actor system; consumes\n * queue / cron ticks. Always-up or cron-triggered.\n * - `WORKER` — language-pluggable stateless HTTP subprocess (Rust / Node /\n * Java / …) called by the backend-api with a Wildo JWT. No backing\n * services; ClusterIP-only, no ingress.\n *\n * Deploy-time identity uses the `{kind, name}` vocabulary (`name` = the\n * `wildo.saas.config.ts` bucket key), surfaced in two forms — the\n * `APP_OWNED_SERVICE_KIND` + `APP_OWNED_SERVICE_NAME` **env** pair and the\n * matching `wildo.ai/owned-service-{kind,name}` pod **labels**. WHICH forms a\n * kind carries, and how it consumes them, differs because their runtimes differ:\n *\n * - `WORKER` — language-pluggable, so a non-Node runtime (the reference Rust\n * worker) READS the `APP_OWNED_SERVICE_NAME` **env** var at boot and forwards\n * it as the apps-manager `worker-bootstrap` path segment\n * (`appConfig.workers[name]`). A Node worker instead hardcodes `workerName` in\n * `defineWorkerInit`; the env pair is still stamped on every worker deploy path\n * (k8s, docker-compose, CLI `.env`) for the language-agnostic case +\n * observability, alongside the matching pod labels.\n * - `MINION` — always Node, and sources its `minionName` from its compiled-in\n * `defineMinionInit({ minionName })` config (the minion package is\n * domain-specific by construction), cross-validated at boot against the\n * fetched `appConfig.minions[minionName]`. Because identity is a compile-time\n * fact, minions carry it ONLY as the `wildo.ai/owned-service-{kind,name}` pod\n * **labels** (operators, selectors, observability); the `APP_OWNED_SERVICE_*`\n * **env** pair is deliberately omitted on EVERY minion deploy path (k8s, CLI\n * `.env`, docker-compose), since an env identity would be a second,\n * drift-prone authority (see `env-configuration-generator.service.ts`).\n */\nexport enum BackgroundRuntimeType {\n MINION = 'minion',\n WORKER = 'worker',\n}\n\n/**\n * Schema for all shared (non-platform-private) application types.\n *\n * Interactive frontend surfaces are config-defined strings keyed by frontend\n * service identity via `frontendServices` in AppConfiguration, not an enum.\n * `z.string()` accepts those config-defined values alongside the known\n * static-frontend and backend-API enums.\n */\nexport const AllSharedApplicationTypesSchema = z.union([\n z.enum(StaticFrontEndType),\n z.enum(BackendApiType),\n z.string(),\n]);\nexport type AllSharedApplicationTypes = z.infer<typeof AllSharedApplicationTypesSchema>;\n\n/**\n * Full app-owned runtime identity surface: every primary application type\n * (`AllSharedApplicationTypesSchema` — backend kinds, static frontends,\n * dynamic-frontend keys) plus the background runtimes\n * (`BackgroundRuntimeType` — minions, workers).\n *\n * Use this where a process needs to declare what kind of app-owned\n * runtime it is without forcing every caller to switch on a coarse\n * vocabulary that overlaps the existing fine-grained enums.\n */\nexport const AllAppOwnedRuntimeTypesSchema = z.union([\n AllSharedApplicationTypesSchema,\n z.enum(BackgroundRuntimeType),\n]);\nexport type AllAppOwnedRuntimeTypes = z.infer<typeof AllAppOwnedRuntimeTypesSchema>;\n\nexport const ApplicationSchema = z.object({\n _id : z.string().isPrimaryKey().isSummaryField(),\n appSlug : z.string().isDBIndexed().isSummaryField().excludeFromUpdate(),\n appDisplayName : z.string().isDBIndexed().isSummaryField(),\n lastVersion : z.string().optional().excludeFromCreate().excludeFromUpdate(),\n // Backend-only field - stored in DB but never sent to frontend\n platformAppId : z.string().isDBIndexed().isBackendOnly(),\n /**\n * Serializes every decision about WHICH organization owns the application (#1054).\n *\n * ## The race it closes\n *\n * `organizations.promoteToOwnerOrganization` measures (\"does an owner organization exist?\") and\n * then writes (`type`). Under snapshot isolation that is textbook WRITE SKEW: two operators\n * promote two DIFFERENT organizations, each observes no owner, and both commit — producing the two\n * owner organizations the whole design refuses, which neither was individually permitted to\n * create. No amount of additional checking closes it: each transaction's view is internally\n * consistent, and a re-measure after the write cannot see the other's uncommitted row.\n *\n * The remedy is to give the two transactions something to collide ON. The promotion bumps this\n * token inside its transaction before measuring, so two of them touch the same document and the\n * storage engine aborts the loser. Same mechanism, same reasoning, as\n * `Organization.ownerFloorSerializationToken` — which is also where the trap is recorded: the\n * write MUST carry `preserveServerInjectedFields` for this field, or the repository's strict\n * re-parse silently strips it and the serialization protects nothing.\n *\n * ## Why the APPLICATION row and not an organization's\n *\n * The two racing promotions target DIFFERENT organizations, so neither organization's row is\n * shared and colliding on one would serialize nothing. The APPLICATION row is the only row both\n * transactions can be made to touch, and it is also the right subject semantically: the fact being\n * protected is a property of the application (\"it has one owner organization\"), not of any tenant.\n *\n * The VALUE is irrelevant and nothing reads it, so a lost update here costs nothing; what matters\n * is that the document is written at all. `.nullish()` because every existing application predates\n * the field, and one that has never had a promotion legitimately has no token — absent and zero\n * mean the same thing.\n */\n ownerOrganizationSerializationToken : z.number().int().nullish().excludeFromCreate().excludeFromUpdate().isBackendOnly().isHidden(),\n});\nexport type Application = z.infer<typeof ApplicationSchema>;\n\nexport const ApplicationVersionSchema = z.object({\n _id : z.string().isPrimaryKey().isSummaryField(),\n applicationId : z.string().isDBIndexed().isForeignKey().isSummaryField().excludeFromUpdate(),\n version : z.string().isDBIndexed().isSummaryField(),\n releaseDate : z.date().isDBIndexed().isSummaryField(),\n releaseNotes : z.string(),\n});\nexport type ApplicationVersion = z.infer<typeof ApplicationVersionSchema>;\n\nexport const ApplicationMetadataSchema = z.object({\n _id : z.string().isPrimaryKey().isSummaryField(),\n /**\n * The owning application — and this row's BUSINESS IDENTITY.\n *\n * `APPLICATION → APPLICATION_METADATA` is 1:1, so \"the metadata of application X\"\n * identifies the row completely. Declaring that lets the framework's business-key\n * repository helpers address it: the app-init seed\n * (`engine-applications:application-metadata`) upserts through\n * `upsertByBusinessKey`, which refuses a schema that declares no identity —\n * \"Schema declares no business-key identity\" — rather than guessing one.\n *\n * `.isUnique()` carries the 1:1 down to the database. `.isBusinessKey()` alone is\n * a pure marker with no index, so two concurrent creates could otherwise leave\n * an application with two metadata rows, which no read path expects.\n *\n * The name is `applicationId`, matching the APPLICATION scope's registered field\n * identifier and every other APPLICATION-scoped resource. It was `appId` until\n * 2026-09-18, which silently excluded this resource — and its two siblings — from\n * every mechanism keyed on that identifier, up to and including the settings panes\n * that render it. See the APPLICATION_FEATURES edge in\n * `resources-registry.shared.core.definitions.ts` for the measured consequences.\n */\n applicationId : z.string().isDBIndexed().isForeignKey().isBusinessKey().isUnique().isSummaryField().excludeFromUpdate(),\n // `.default('')` so the row is eager-seedable via onParentCreate (placeholder;\n // the app sets a real description later) — root-cause fix for the blocking field.\n description : z.string().default('').isDBIndexed().isSummaryField(),\n});\nexport type ApplicationMetadata = z.infer<typeof ApplicationMetadataSchema>;\n"]}
|
|
1
|
+
{"version":3,"file":"applications.shared.schemas.js","sourceRoot":"","sources":["../../../src/applications/applications.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAN,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC5B,yCAAmB,CAAA;IACnB,yEAAmD,CAAA;AACrD,CAAC,EAHW,kBAAkB,KAAlB,kBAAkB,QAG7B;AAED;;;;;GAKG;AACH,MAAM,CAAN,IAAY,cAEX;AAFD,WAAY,cAAc;IACxB,uDAAqC,CAAA;AACvC,CAAC,EAFW,cAAc,KAAd,cAAc,QAEzB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,MAAM,CAAN,IAAY,qBAGX;AAHD,WAAY,qBAAqB;IAC/B,0CAAiB,CAAA;IACjB,0CAA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AC;IAC7C,GAAG,EAAG,CAAC,CAAC,MAAM,EAAE,CAAC,YAAY,EAAE,CAAC,cAAc,EAAE;IAChD,aAAa,EAAG,CAAC,CAAC,MAAM,EAAE,CAAC,WAAW,EAAE,CAAC,YAAY,EAAE,CAAC,cAAc,EAAE,CAAC,iBAAiB,EAAE;IAC5F,OAAO,EAAG,CAAC,CAAC,MAAM,EAAE,CAAC,WAAW,EAAE,CAAC,cAAc,EAAE;IACnD,WAAW,EAAG,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,cAAc,EAAE;IACrD,YAAY,EAAG,CAAC,CAAC,MAAM,EAAE;CAC5B,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,GAAG,EAAG,CAAC,CAAC,MAAM,EAAE,CAAC,YAAY,EAAE,CAAC,cAAc,EAAE;IAChD;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,aAAa,EAAG,CAAC,CAAC,MAAM,EAAE,CAAC,WAAW,EAAE,CAAC,YAAY,EAAE,CAAC,aAAa,EAAE,CAAC,QAAQ,EAAE,CAAC,cAAc,EAAE,CAAC,iBAAiB,EAAE;IACvH,+EAA+E;IAC/E,kFAAkF;IAClF,WAAW,EAAG,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,cAAc,EAAE;CACtE,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\n\nexport enum StaticFrontEndType {\n WEBSITE = 'website',\n TECHNICAL_DOCUMENTATION = 'technical_documentation',\n}\n\n/**\n * The backend endpoints the runtime topology declares. One: the backend process binds exactly one port,\n * and serves health, webhooks, the OAuth provider and MCP as routes on it. Four \"sibling\" members\n * (health, webhook, OAuth, MCP at the API port minus 1..4) were removed with #1783 — nothing listened on\n * any of them, so each was a URL that refused every connection.\n */\nexport enum BackendApiType {\n MAIN_BACKEND_API = 'main_backend_api',\n}\n\n/**\n * Background app-owned runtimes — kinds that an application owns but that\n * do NOT serve user-facing requests directly (no public HTTP surface for\n * end-users, no rendered frontend).\n *\n * Introduced by the minions-and-workers plan\n * (`.claude/plans/minions-and-workers-implementation.md`, KD-9):\n *\n * - `MINION` — TS/Node single-instance process sharing the application\n * scope (Mongo / Redis / RabbitMQ); hosts the actor system; consumes\n * queue / cron ticks. Always-up or cron-triggered.\n * - `WORKER` — language-pluggable stateless HTTP subprocess (Rust / Node /\n * Java / …) called by the backend-api with a Wildo JWT. No backing\n * services; ClusterIP-only, no ingress.\n *\n * Deploy-time identity uses the `{kind, name}` vocabulary (`name` = the\n * `wildo.saas.config.ts` bucket key), surfaced in two forms — the\n * `APP_OWNED_SERVICE_KIND` + `APP_OWNED_SERVICE_NAME` **env** pair and the\n * matching `wildo.ai/owned-service-{kind,name}` pod **labels**. WHICH forms a\n * kind carries, and how it consumes them, differs because their runtimes differ:\n *\n * - `WORKER` — language-pluggable, so a non-Node runtime (the reference Rust\n * worker) READS the `APP_OWNED_SERVICE_NAME` **env** var at boot and forwards\n * it as the apps-manager `worker-bootstrap` path segment\n * (`appConfig.workers[name]`). A Node worker instead hardcodes `workerName` in\n * `defineWorkerInit`; the env pair is still stamped on every worker deploy path\n * (k8s, docker-compose, CLI `.env`) for the language-agnostic case +\n * observability, alongside the matching pod labels.\n * - `MINION` — always Node, and sources its `minionName` from its compiled-in\n * `defineMinionInit({ minionName })` config (the minion package is\n * domain-specific by construction), cross-validated at boot against the\n * fetched `appConfig.minions[minionName]`. Because identity is a compile-time\n * fact, minions carry it ONLY as the `wildo.ai/owned-service-{kind,name}` pod\n * **labels** (operators, selectors, observability); the `APP_OWNED_SERVICE_*`\n * **env** pair is deliberately omitted on EVERY minion deploy path (k8s, CLI\n * `.env`, docker-compose), since an env identity would be a second,\n * drift-prone authority (see `env-configuration-generator.service.ts`).\n */\nexport enum BackgroundRuntimeType {\n MINION = 'minion',\n WORKER = 'worker',\n}\n\n/**\n * Schema for all shared (non-platform-private) application types.\n *\n * Interactive frontend surfaces are config-defined strings keyed by frontend\n * service identity via `frontendServices` in AppConfiguration, not an enum.\n * `z.string()` accepts those config-defined values alongside the known\n * static-frontend and backend-API enums.\n */\nexport const AllSharedApplicationTypesSchema = z.union([\n z.enum(StaticFrontEndType),\n z.enum(BackendApiType),\n z.string(),\n]);\nexport type AllSharedApplicationTypes = z.infer<typeof AllSharedApplicationTypesSchema>;\n\n/**\n * Full app-owned runtime identity surface: every primary application type\n * (`AllSharedApplicationTypesSchema` — backend kinds, static frontends,\n * dynamic-frontend keys) plus the background runtimes\n * (`BackgroundRuntimeType` — minions, workers).\n *\n * Use this where a process needs to declare what kind of app-owned\n * runtime it is without forcing every caller to switch on a coarse\n * vocabulary that overlaps the existing fine-grained enums.\n */\nexport const AllAppOwnedRuntimeTypesSchema = z.union([\n AllSharedApplicationTypesSchema,\n z.enum(BackgroundRuntimeType),\n]);\nexport type AllAppOwnedRuntimeTypes = z.infer<typeof AllAppOwnedRuntimeTypesSchema>;\n\nexport const ApplicationSchema = z.object({\n _id : z.string().isPrimaryKey().isSummaryField(),\n appSlug : z.string().isDBIndexed().isSummaryField().excludeFromUpdate(),\n appDisplayName : z.string().isDBIndexed().isSummaryField(),\n lastVersion : z.string().optional().excludeFromCreate().excludeFromUpdate(),\n // Backend-only field - stored in DB but never sent to frontend\n platformAppId : z.string().isDBIndexed().isBackendOnly(),\n /**\n * Serializes every decision about WHICH organization owns the application (#1054).\n *\n * ## The race it closes\n *\n * `organizations.promoteToOwnerOrganization` measures (\"does an owner organization exist?\") and\n * then writes (`type`). Under snapshot isolation that is textbook WRITE SKEW: two operators\n * promote two DIFFERENT organizations, each observes no owner, and both commit — producing the two\n * owner organizations the whole design refuses, which neither was individually permitted to\n * create. No amount of additional checking closes it: each transaction's view is internally\n * consistent, and a re-measure after the write cannot see the other's uncommitted row.\n *\n * The remedy is to give the two transactions something to collide ON. The promotion bumps this\n * token inside its transaction before measuring, so two of them touch the same document and the\n * storage engine aborts the loser. Same mechanism, same reasoning, as\n * `Organization.ownerFloorSerializationToken` — which is also where the trap is recorded: the\n * write MUST carry `preserveServerInjectedFields` for this field, or the repository's strict\n * re-parse silently strips it and the serialization protects nothing.\n *\n * ## Why the APPLICATION row and not an organization's\n *\n * The two racing promotions target DIFFERENT organizations, so neither organization's row is\n * shared and colliding on one would serialize nothing. The APPLICATION row is the only row both\n * transactions can be made to touch, and it is also the right subject semantically: the fact being\n * protected is a property of the application (\"it has one owner organization\"), not of any tenant.\n *\n * The VALUE is irrelevant and nothing reads it, so a lost update here costs nothing; what matters\n * is that the document is written at all. `.nullish()` because every existing application predates\n * the field, and one that has never had a promotion legitimately has no token — absent and zero\n * mean the same thing.\n */\n ownerOrganizationSerializationToken : z.number().int().nullish().excludeFromCreate().excludeFromUpdate().isBackendOnly().isHidden(),\n});\nexport type Application = z.infer<typeof ApplicationSchema>;\n\nexport const ApplicationVersionSchema = z.object({\n _id : z.string().isPrimaryKey().isSummaryField(),\n applicationId : z.string().isDBIndexed().isForeignKey().isSummaryField().excludeFromUpdate(),\n version : z.string().isDBIndexed().isSummaryField(),\n releaseDate : z.date().isDBIndexed().isSummaryField(),\n releaseNotes : z.string(),\n});\nexport type ApplicationVersion = z.infer<typeof ApplicationVersionSchema>;\n\nexport const ApplicationMetadataSchema = z.object({\n _id : z.string().isPrimaryKey().isSummaryField(),\n /**\n * The owning application — and this row's BUSINESS IDENTITY.\n *\n * `APPLICATION → APPLICATION_METADATA` is 1:1, so \"the metadata of application X\"\n * identifies the row completely. Declaring that lets the framework's business-key\n * repository helpers address it: the app-init seed\n * (`engine-applications:application-metadata`) upserts through\n * `upsertByBusinessKey`, which refuses a schema that declares no identity —\n * \"Schema declares no business-key identity\" — rather than guessing one.\n *\n * `.isUnique()` carries the 1:1 down to the database. `.isBusinessKey()` alone is\n * a pure marker with no index, so two concurrent creates could otherwise leave\n * an application with two metadata rows, which no read path expects.\n *\n * The name is `applicationId`, matching the APPLICATION scope's registered field\n * identifier and every other APPLICATION-scoped resource. It was `appId` until\n * 2026-09-18, which silently excluded this resource — and its two siblings — from\n * every mechanism keyed on that identifier, up to and including the settings panes\n * that render it. See the APPLICATION_FEATURES edge in\n * `resources-registry.shared.core.definitions.ts` for the measured consequences.\n */\n applicationId : z.string().isDBIndexed().isForeignKey().isBusinessKey().isUnique().isSummaryField().excludeFromUpdate(),\n // `.default('')` so the row is eager-seedable via onParentCreate (placeholder;\n // the app sets a real description later) — root-cause fix for the blocking field.\n description : z.string().default('').isDBIndexed().isSummaryField(),\n});\nexport type ApplicationMetadata = z.infer<typeof ApplicationMetadataSchema>;\n"]}
|
|
@@ -15,7 +15,12 @@ export declare enum BillingAccount_Operations {
|
|
|
15
15
|
/** Open the Stripe Customer Portal for self-service management */
|
|
16
16
|
OPEN_PORTAL = "open_portal",
|
|
17
17
|
/** Fetch aggregated billing state (account, subscription, products, prices, credit pools) */
|
|
18
|
-
GET_STATE = "get_state"
|
|
18
|
+
GET_STATE = "get_state",
|
|
19
|
+
/**
|
|
20
|
+
* Redeem another account's referral code (#1802). Only a new customer may: an account that has never
|
|
21
|
+
* subscribed, is not already referred, and is not the referrer.
|
|
22
|
+
*/
|
|
23
|
+
REDEEM_REFERRAL = "redeem_referral"
|
|
19
24
|
}
|
|
20
25
|
/** Request DTO for OPEN_CHECKOUT. Trial duration is server-owned product/application policy, never a payer option. */
|
|
21
26
|
export declare const BillingAccount_OpenCheckoutRequestDto: z.ZodObject<{
|
|
@@ -27,6 +32,10 @@ export declare const BillingAccount_OpenCheckoutRequestDto: z.ZodObject<{
|
|
|
27
32
|
promotionCode: z.ZodOptional<z.ZodString>;
|
|
28
33
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
29
34
|
}, z.core.$strip>;
|
|
35
|
+
/** Request DTO for REDEEM_REFERRAL (#1802). */
|
|
36
|
+
export declare const BillingAccount_RedeemReferralRequestDto: z.ZodObject<{
|
|
37
|
+
referralCode: z.ZodString;
|
|
38
|
+
}, z.core.$strict>;
|
|
30
39
|
/** Request DTO for OPEN_PORTAL operation */
|
|
31
40
|
export declare const BillingAccount_OpenPortalRequestDto: z.ZodObject<{
|
|
32
41
|
returnUrl: z.ZodURL;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billing-account.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"billing-account.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../src/billing/billing-account.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,qBAAqB,EAAoB,MAAM,gDAAgD,CAAC;AAiBzG,oBAAY,yBAAyB;IACnC,wEAAwE;IACxE,aAAa,kBAAkB;IAC/B,kEAAkE;IAClE,WAAW,gBAAgB;IAC3B,6FAA6F;IAC7F,SAAS,cAAc;IACvB;;;OAGG;IACH,eAAe,oBAAoB;CACpC;AAID,sHAAsH;AACtH,eAAO,MAAM,qCAAqC;;;;;;;;iBAoChD,CAAC;AAEH,+CAA+C;AAC/C,eAAO,MAAM,uCAAuC;;kBAElD,CAAC;AAEH,4CAA4C;AAC5C,eAAO,MAAM,mCAAmC;;iBAE9C,CAAC;AAMH;;;;;;;;GAQG;AACH,eAAO,MAAM,mCAAmC,2SAyN/C,CAAC"}
|
|
@@ -13,7 +13,8 @@ import { ResourceOperationRiskLevel, ResourceOperationVariantType, } from '../re
|
|
|
13
13
|
import { ResourceSystemAccessMode } from '../resources/resources-config.shared.schemas.js';
|
|
14
14
|
import { createPolymorphicResourceConfigurations } from '../resources/utils/resource-polymorphism.factory.js';
|
|
15
15
|
import { CORE_APP_ROLES, CORE_ORG_ROLES } from '../security/authorizations/roles.shared.schemas.js';
|
|
16
|
-
import { BILLING_CHECKOUT_MAX_QUANTITY, BILLING_RESERVED_METADATA_KEY_PREFIX } from './billing-enums.shared.schemas.js';
|
|
16
|
+
import { BILLING_CHECKOUT_MAX_QUANTITY, BILLING_RESERVED_METADATA_KEY_PREFIX, ReferralStatus } from './billing-enums.shared.schemas.js';
|
|
17
|
+
import { ReferredRewardSchema } from './referral-reward.shared.schemas.js';
|
|
17
18
|
import { billingAccountsPolymorphicDeclaration } from './billing-account.shared.schemas.js';
|
|
18
19
|
import { BillingStateResponseSchema } from './billing-types.shared.schemas.js';
|
|
19
20
|
import { DataPortabilityProvenance } from '../compliance/privacy/subject-export.shared.schemas.js';
|
|
@@ -27,21 +28,26 @@ export var BillingAccount_Operations;
|
|
|
27
28
|
BillingAccount_Operations["OPEN_PORTAL"] = "open_portal";
|
|
28
29
|
/** Fetch aggregated billing state (account, subscription, products, prices, credit pools) */
|
|
29
30
|
BillingAccount_Operations["GET_STATE"] = "get_state";
|
|
31
|
+
/**
|
|
32
|
+
* Redeem another account's referral code (#1802). Only a new customer may: an account that has never
|
|
33
|
+
* subscribed, is not already referred, and is not the referrer.
|
|
34
|
+
*/
|
|
35
|
+
BillingAccount_Operations["REDEEM_REFERRAL"] = "redeem_referral";
|
|
30
36
|
})(BillingAccount_Operations || (BillingAccount_Operations = {}));
|
|
31
37
|
// ── Request DTOs ─────────────────────────────────────────────────────
|
|
32
38
|
/** Request DTO for OPEN_CHECKOUT. Trial duration is server-owned product/application policy, never a payer option. */
|
|
33
39
|
export const BillingAccount_OpenCheckoutRequestDto = z.object({
|
|
34
|
-
productKey: z.string().min(1),
|
|
35
|
-
priceId: z.string().min(1),
|
|
36
|
-
successUrl: z.url(),
|
|
37
|
-
cancelUrl: z.url(),
|
|
40
|
+
productKey: z.string().min(1).describe("The key of the product to buy. It must be available for purchase and offered to this account's scope."),
|
|
41
|
+
priceId: z.string().min(1).describe("The id of the price to buy the product at. It must be a price of that product."),
|
|
42
|
+
successUrl: z.url().describe("Where the billing provider sends the customer after a completed checkout."),
|
|
43
|
+
cancelUrl: z.url().describe("Where the billing provider sends the customer if they leave checkout without paying."),
|
|
38
44
|
/**
|
|
39
45
|
* Bounded by the same constant the webhook consumer honours. An unbounded quantity here would be
|
|
40
46
|
* billed by the provider and then refused on the way back in, charging the customer for credits
|
|
41
47
|
* that never arrive.
|
|
42
48
|
*/
|
|
43
|
-
quantity: z.number().int().min(1).max(BILLING_CHECKOUT_MAX_QUANTITY).default(1),
|
|
44
|
-
promotionCode: z.string().optional(),
|
|
49
|
+
quantity: z.number().int().min(1).max(BILLING_CHECKOUT_MAX_QUANTITY).default(1).describe("How many units to buy, such as seats or credit packs. Defaults to 1."),
|
|
50
|
+
promotionCode: z.string().optional().describe("A promotion code to apply. It is checked before checkout opens, and refused when it is unknown, inactive, outside its validity dates, used up, not valid for this product, or not set up with the billing provider. The checkout page accepts no code of its own."),
|
|
45
51
|
/**
|
|
46
52
|
* Caller-supplied tags mirrored to the provider for the application's own analytics or
|
|
47
53
|
* reconciliation. They carry NO authority.
|
|
@@ -61,9 +67,13 @@ export const BillingAccount_OpenCheckoutRequestDto = z.object({
|
|
|
61
67
|
.record(z.string().refine((key) => !key.startsWith(BILLING_RESERVED_METADATA_KEY_PREFIX), `Metadata keys starting with "${BILLING_RESERVED_METADATA_KEY_PREFIX}" are reserved by the framework and cannot be supplied by the caller`), z.string())
|
|
62
68
|
.optional(),
|
|
63
69
|
});
|
|
70
|
+
/** Request DTO for REDEEM_REFERRAL (#1802). */
|
|
71
|
+
export const BillingAccount_RedeemReferralRequestDto = z.strictObject({
|
|
72
|
+
referralCode: z.string().trim().min(1).max(64).describe('The referral code to redeem, as the referrer shared it.'),
|
|
73
|
+
});
|
|
64
74
|
/** Request DTO for OPEN_PORTAL operation */
|
|
65
75
|
export const BillingAccount_OpenPortalRequestDto = z.object({
|
|
66
|
-
returnUrl: z.url(),
|
|
76
|
+
returnUrl: z.url().describe('Absolute URL the billing portal sends the customer back to when they leave it.'),
|
|
67
77
|
});
|
|
68
78
|
// =============================================================================
|
|
69
79
|
// POLYMORPHIC FACTORY — 2 variants (org, user)
|
|
@@ -169,8 +179,8 @@ export const billingAccountsPolymorphicFactories = createPolymorphicResourceConf
|
|
|
169
179
|
variantType: ResourceOperationVariantType.API_CALL,
|
|
170
180
|
isDefault: true,
|
|
171
181
|
polymorphicRole: {
|
|
172
|
-
[CoreResourceType.ORGANIZATIONS]: [CORE_ORG_ROLES.ORG_OWNER, CORE_ORG_ROLES.ORG_ADMIN],
|
|
173
|
-
[CoreResourceType.USERS]: [CORE_APP_ROLES.APP_USER],
|
|
182
|
+
[CoreResourceType.ORGANIZATIONS]: [CORE_ORG_ROLES.ORG_OWNER, CORE_ORG_ROLES.ORG_ADMIN, CORE_ORG_ROLES.ORG_BILLING_PROVIDER_EVENTS],
|
|
183
|
+
[CoreResourceType.USERS]: [CORE_APP_ROLES.APP_USER, CORE_APP_ROLES.APP_BILLING_PROVIDER_EVENTS],
|
|
174
184
|
},
|
|
175
185
|
riskLevel: ResourceOperationRiskLevel.LOW,
|
|
176
186
|
}],
|
|
@@ -191,8 +201,8 @@ export const billingAccountsPolymorphicFactories = createPolymorphicResourceConf
|
|
|
191
201
|
variantType: ResourceOperationVariantType.INTERNAL_CALL,
|
|
192
202
|
isDefault: true,
|
|
193
203
|
polymorphicRole: {
|
|
194
|
-
[CoreResourceType.ORGANIZATIONS]: [CORE_ORG_ROLES.ORG_OWNER, CORE_ORG_ROLES.ORG_ADMIN],
|
|
195
|
-
[CoreResourceType.USERS]: [CORE_APP_ROLES.APP_USER],
|
|
204
|
+
[CoreResourceType.ORGANIZATIONS]: [CORE_ORG_ROLES.ORG_OWNER, CORE_ORG_ROLES.ORG_ADMIN, CORE_ORG_ROLES.ORG_BILLING_PROVIDER_EVENTS],
|
|
205
|
+
[CoreResourceType.USERS]: [CORE_APP_ROLES.APP_USER, CORE_APP_ROLES.APP_BILLING_PROVIDER_EVENTS],
|
|
196
206
|
},
|
|
197
207
|
riskLevel: ResourceOperationRiskLevel.MEDIUM,
|
|
198
208
|
}],
|
|
@@ -223,8 +233,32 @@ export const billingAccountsPolymorphicFactories = createPolymorphicResourceConf
|
|
|
223
233
|
// session, NOT the billing-account resource. Without this the DTO builder
|
|
224
234
|
// would validate the service output against the resource schema and 500.
|
|
225
235
|
customResponseDto: z.object({
|
|
226
|
-
url: z.url(),
|
|
227
|
-
sessionId: z.string(),
|
|
236
|
+
url: z.url().describe("The billing provider's hosted checkout page. Send the customer there to pay."),
|
|
237
|
+
sessionId: z.string().describe("The billing provider's id for this checkout session."),
|
|
238
|
+
}),
|
|
239
|
+
}],
|
|
240
|
+
},
|
|
241
|
+
/*
|
|
242
|
+
* #1802 — the account that was referred redeems the code. Refusals are the ones a person can act on:
|
|
243
|
+
* an unusable code, and an account that cannot be referred. The rewards are the referrer's policy,
|
|
244
|
+
* copied when the code was issued, and are reported back so the purchase screen can show them.
|
|
245
|
+
*/
|
|
246
|
+
[BillingAccount_Operations.REDEEM_REFERRAL]: {
|
|
247
|
+
variants: [{
|
|
248
|
+
variantType: ResourceOperationVariantType.API_CALL,
|
|
249
|
+
isDefault: true,
|
|
250
|
+
polymorphicRole: {
|
|
251
|
+
[CoreResourceType.ORGANIZATIONS]: [CORE_ORG_ROLES.ORG_OWNER, CORE_ORG_ROLES.ORG_ADMIN],
|
|
252
|
+
[CoreResourceType.USERS]: [CORE_APP_ROLES.APP_USER],
|
|
253
|
+
},
|
|
254
|
+
riskLevel: ResourceOperationRiskLevel.MEDIUM,
|
|
255
|
+
resourceOperationLike: CoreResourceOperation.UPDATE,
|
|
256
|
+
requestDto: BillingAccount_RedeemReferralRequestDto,
|
|
257
|
+
// Returns the redemption, not the billing account.
|
|
258
|
+
customResponseDto: z.object({
|
|
259
|
+
referralId: z.string().describe('The id of the referral that was redeemed.'),
|
|
260
|
+
status: z.enum(ReferralStatus).systemEnum('ReferralStatus').describe('`accepted`: the account is now the referred side, and the rewards are granted when it pays its first invoice.'),
|
|
261
|
+
referredReward: ReferredRewardSchema.optional().describe('What this account receives. Absent when the referral gives the referred side nothing.'),
|
|
228
262
|
}),
|
|
229
263
|
}],
|
|
230
264
|
},
|
|
@@ -242,7 +276,7 @@ export const billingAccountsPolymorphicFactories = createPolymorphicResourceConf
|
|
|
242
276
|
// Borrows READ for its route/verb but returns the provider portal
|
|
243
277
|
// redirect URL, NOT the billing-account resource.
|
|
244
278
|
customResponseDto: z.object({
|
|
245
|
-
url: z.url(),
|
|
279
|
+
url: z.url().describe("The billing provider's customer portal, where the customer manages their billing. Send the customer there; the portal links back to `returnUrl`."),
|
|
246
280
|
}),
|
|
247
281
|
}],
|
|
248
282
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billing-account.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../../src/billing/billing-account.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AACzG,OAAO,EACL,0BAA0B,EAC1B,4BAA4B,GAC7B,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AACxF,OAAO,EAAE,uCAAuC,EAAE,MAAM,kDAAkD,CAAC;AAC3G,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AACjG,OAAO,EAAE,6BAA6B,EAAE,oCAAoC,EAAE,MAAM,gCAAgC,CAAC;AACrH,OAAO,EAAE,qCAAqC,EAAE,MAAM,kCAAkC,CAAC;AACzF,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EAAE,yBAAyB,EAAE,MAAM,qDAAqD,CAAC;AAChG,OAAO,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,wDAAwD,CAAC;AAEvH,wEAAwE;AAExE,MAAM,CAAN,IAAY,yBAOX;AAPD,WAAY,yBAAyB;IACnC,wEAAwE;IACxE,4DAA+B,CAAA;IAC/B,kEA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ACtE,sEAAsE;oBACtE,sDAAsD;oBACtD,iBAAiB,EAAE,0BAA0B;iBAC9C,CAAC;SACH;KACF;CACF,CACF,CAAC","sourcesContent":["/**\n * Billing Account Resource Configuration — Polymorphic\n *\n * Produces 3 factory functions (one per scope variant) via the polymorphic factory.\n * Spread into the registry factory map:\n * ...billingAccountsPolymorphicFactories\n *\n * @see polymorphic-scope-approach-A-expansion.md — Phase 3\n */\n\nimport { z } from 'zod';\nimport { CoreResourceOperation, CoreResourceType } from '../resources/resources.shared.core.definitions';\nimport {\n ResourceOperationRiskLevel,\n ResourceOperationVariantType,\n} from '../resources/resources.shared.schemas';\nimport { ResourceSystemAccessMode } from '../resources/resources-config.shared.schemas';\nimport { createPolymorphicResourceConfigurations } from '../resources/utils/resource-polymorphism.factory';\nimport { CORE_APP_ROLES, CORE_ORG_ROLES } from '../security/authorizations/roles.shared.schemas';\nimport { BILLING_CHECKOUT_MAX_QUANTITY, BILLING_RESERVED_METADATA_KEY_PREFIX } from './billing-enums.shared.schemas';\nimport { billingAccountsPolymorphicDeclaration } from './billing-account.shared.schemas';\nimport { BillingStateResponseSchema } from './billing-types.shared.schemas';\nimport { DataPortabilityProvenance } from '../compliance/privacy/subject-export.shared.schemas';\nimport { ErasureRetentionMode, ResourceDataSubjectKind } from '../compliance/privacy/impersonalization.shared.schemas';\n\n// ── Custom Operations ────────────────────────────────────────────────\n\nexport enum BillingAccount_Operations {\n /** Create a Stripe Checkout Session for the user to complete payment */\n OPEN_CHECKOUT = 'open_checkout',\n /** Open the Stripe Customer Portal for self-service management */\n OPEN_PORTAL = 'open_portal',\n /** Fetch aggregated billing state (account, subscription, products, prices, credit pools) */\n GET_STATE = 'get_state',\n}\n\n// ── Request DTOs ─────────────────────────────────────────────────────\n\n/** Request DTO for OPEN_CHECKOUT. Trial duration is server-owned product/application policy, never a payer option. */\nexport const BillingAccount_OpenCheckoutRequestDto = z.object({\n productKey: z.string().min(1),\n priceId: z.string().min(1),\n successUrl: z.url(),\n cancelUrl: z.url(),\n /**\n * Bounded by the same constant the webhook consumer honours. An unbounded quantity here would be\n * billed by the provider and then refused on the way back in, charging the customer for credits\n * that never arrive.\n */\n quantity: z.number().int().min(1).max(BILLING_CHECKOUT_MAX_QUANTITY).default(1),\n promotionCode: z.string().optional(),\n /**\n * Caller-supplied tags mirrored to the provider for the application's own analytics or\n * reconciliation. They carry NO authority.\n *\n * Keys in the framework-reserved namespace are REFUSED here rather than silently dropped: the\n * caller is trying to write into the namespace that decides which billing account gets credited\n * and by how much, and an app developer who typed a reserved key deserves to be told, not to\n * watch their tag vanish. Refusal at the DTO is the loud, outermost half of the boundary; the\n * builder's write-reserved-last ordering and the consumer's read-only-reserved rule are the two\n * structural halves. See {@link BILLING_RESERVED_METADATA_KEY_PREFIX}.\n *\n * The refinement sits on the KEY schema, not on the record: it keeps the DTO a plain `ZodRecord`\n * for the OpenAPI projector and the request-validation pipeline, where a wrapping effect would\n * change the node type every consumer of this DTO narrows on.\n */\n metadata: z\n .record(\n z.string().refine(\n (key) => !key.startsWith(BILLING_RESERVED_METADATA_KEY_PREFIX),\n `Metadata keys starting with \"${BILLING_RESERVED_METADATA_KEY_PREFIX}\" are reserved by the framework and cannot be supplied by the caller`,\n ),\n z.string(),\n )\n .optional(),\n});\n\n/** Request DTO for OPEN_PORTAL operation */\nexport const BillingAccount_OpenPortalRequestDto = z.object({\n returnUrl: z.url(),\n});\n\n// =============================================================================\n// POLYMORPHIC FACTORY — 2 variants (org, user)\n// =============================================================================\n\n/**\n * Polymorphic factory map for billing accounts.\n * Spread into `coreShared_ResourcesConfigurations_FactoryMap`:\n * ...billingAccountsPolymorphicFactories\n *\n * Produces entries for:\n * - organizationBillingAccounts\n * - userBillingAccounts\n */\nexport const billingAccountsPolymorphicFactories = createPolymorphicResourceConfigurations(\n billingAccountsPolymorphicDeclaration,\n {\n isSystemResource: true,\n // System-context CREATE opt-in (fail-closed default is FORBIDDEN). The billing\n // account is auto-created by `BillingStateBackendService.getState()` on first\n // access via `SystemAccessBackendService.createAsSystem` — a trusted in-process\n // write with no HTTP surface and no request context to seed the scope FK. That\n // path relocates the ACL onto the billing service (which has already resolved\n // the scope) and injects the scope FK (`organizationId` / `userId`) through the\n // execution context map. Resource-level and shared by BOTH scope variants\n // (org + user) per the polymorphic-resource contract on ResourceSystemAccessPolicy.\n systemAccessPolicy: {\n // Subject-export disclosure. The subject's own billing account. Secrets and backend-only values are withheld by the export's security floor regardless of this grant. On a polymorphic resource this grant applies to EVERY generated variant, which is the documented intent of the shared config.\n exportSubject: ResourceSystemAccessMode.ALLOWED,\n create: ResourceSystemAccessMode.ALLOWED,\n // System-context LIST opt-in. Subject erasure must enumerate the erased person's billing\n // accounts to reach their provider customer (cancel subscriptions, anonymize, detach payment\n // methods). That runs with no request context — the subject is being erased — so it reads\n // through `SystemAccessBackendService.listAsSystem`, which is fail-closed and refuses a\n // resource that has not opted in here.\n //\n // Safe to grant: LIST is the READ side, and the erasure path filters by the subject's own\n // scope FK. The default LIST variant is API_CALL, so it resolves through\n // `getServiceOperationPathDefault` — a REPOSITORY_ONLY-only LIST would pass this grant and\n // then fail to resolve at erasure time, which is the failure mode this comment exists to\n // stop someone from reintroducing.\n list: ResourceSystemAccessMode.ALLOWED,\n },\n portabilityPolicy: { defaultProvenance: DataPortabilityProvenance.OBSERVED },\n\n /**\n * Subject erasure RETAINS this row and scrubs the provider customer id.\n *\n * The financial record is kept for the tax/audit obligation this family exists to serve, and — as the\n * family's authoring rule states — erasure scrubs the linked USER rather than these rows, because the\n * person is a foreign key. `providerCustomerId` is the exception the rule does not cover: it is a stable\n * handle that re-identifies the person INSIDE the payment provider, so it is personal data this row holds.\n * It takes `REMOVE`; everything else is retained.\n */\n retentionPolicy: {\n mode: ErasureRetentionMode.RETAIN_AND_IMPERSONALIZE,\n },\n\n /**\n * Erasing one of these rows revokes NO session. The row is not a person — its owner FK names the ACTOR the\n * record belongs to — and the enum prescribes `NO_PRINCIPAL` for exactly that shape. The subject's own\n * session ends through the `USERS` row, which is `SELF_PRINCIPAL`.\n */\n dataSubjectPolicy: { kind: ResourceDataSubjectKind.NO_PRINCIPAL },\n customOperation: BillingAccount_Operations,\n coreOperations: [\n CoreResourceOperation.READ,\n CoreResourceOperation.LIST,\n CoreResourceOperation.CREATE,\n CoreResourceOperation.UPDATE,\n CoreResourceOperation.DELETE,\n // Route-less; `retentionPolicy` requires READ + LIST + UPDATE_MANY.\n CoreResourceOperation.UPDATE_MANY,\n ],\n operationsConfiguration: {\n /*\n * Route-less retention plumbing — INTERNAL_CALL registers no route, so no API surface is added, and it\n * must not be REPOSITORY_ONLY: the retention primitives resolve through `getServiceOperationPathDefault`,\n * which matches only INTERNAL_CALL / API_CALL. LIST is LOW (a read-shaped op may not claim the\n * HIGH/CRITICAL band, which carries an audit-emission obligation); UPDATE_MANY is CRITICAL — it is the\n * verb the impersonalize writer uses to stamp the retention markers.\n */\n [CoreResourceOperation.UPDATE_MANY]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n }],\n },\n\n [CoreResourceOperation.READ]: {\n variants: [{\n // API_CALL: the billing account is a user-facing record (Settings Hub → Billing →\n // Account, and the resource presets' LIST/READ views). REPOSITORY_ONLY would strip\n // the op from the frontend registry and register no HTTP route. Writes (auto-create\n // + webhook sync) are INTERNAL_CALL — run through the service pipeline, no HTTP surface.\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n polymorphicRole: {\n [CoreResourceType.ORGANIZATIONS]: [CORE_ORG_ROLES.ORG_OWNER, CORE_ORG_ROLES.ORG_ADMIN],\n [CoreResourceType.USERS]: [CORE_APP_ROLES.APP_USER],\n },\n riskLevel: ResourceOperationRiskLevel.LOW,\n }],\n },\n [CoreResourceOperation.LIST]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n polymorphicRole: {\n [CoreResourceType.ORGANIZATIONS]: [CORE_ORG_ROLES.ORG_OWNER, CORE_ORG_ROLES.ORG_ADMIN],\n [CoreResourceType.USERS]: [CORE_APP_ROLES.APP_USER],\n },\n riskLevel: ResourceOperationRiskLevel.LOW,\n }],\n },\n [CoreResourceOperation.CREATE]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n polymorphicRole: {\n [CoreResourceType.ORGANIZATIONS]: [CORE_ORG_ROLES.ORG_OWNER, CORE_ORG_ROLES.ORG_ADMIN],\n [CoreResourceType.USERS]: [CORE_APP_ROLES.APP_USER],\n },\n riskLevel: ResourceOperationRiskLevel.MEDIUM,\n }],\n },\n [CoreResourceOperation.UPDATE]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n polymorphicRole: {\n [CoreResourceType.ORGANIZATIONS]: [CORE_ORG_ROLES.ORG_OWNER, CORE_ORG_ROLES.ORG_ADMIN],\n [CoreResourceType.USERS]: [CORE_APP_ROLES.APP_USER],\n },\n riskLevel: ResourceOperationRiskLevel.MEDIUM,\n }],\n },\n [CoreResourceOperation.DELETE]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n polymorphicRole: {\n [CoreResourceType.ORGANIZATIONS]: [CORE_ORG_ROLES.ORG_OWNER, CORE_ORG_ROLES.ORG_ADMIN],\n [CoreResourceType.USERS]: [CORE_APP_ROLES.APP_USER],\n },\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n }],\n },\n [BillingAccount_Operations.OPEN_CHECKOUT]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n polymorphicRole: {\n [CoreResourceType.ORGANIZATIONS]: [CORE_ORG_ROLES.ORG_OWNER, CORE_ORG_ROLES.ORG_ADMIN],\n [CoreResourceType.USERS]: [CORE_APP_ROLES.APP_USER],\n },\n riskLevel: ResourceOperationRiskLevel.HIGH,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: BillingAccount_OpenCheckoutRequestDto,\n // Borrows UPDATE for its route/verb but returns the provider checkout\n // session, NOT the billing-account resource. Without this the DTO builder\n // would validate the service output against the resource schema and 500.\n customResponseDto: z.object({\n url: z.url(),\n sessionId: z.string(),\n }),\n }],\n },\n [BillingAccount_Operations.OPEN_PORTAL]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n polymorphicRole: {\n [CoreResourceType.ORGANIZATIONS]: [CORE_ORG_ROLES.ORG_OWNER, CORE_ORG_ROLES.ORG_ADMIN],\n [CoreResourceType.USERS]: [CORE_APP_ROLES.APP_USER],\n },\n riskLevel: ResourceOperationRiskLevel.LOW,\n resourceOperationLike: CoreResourceOperation.READ,\n requestDto: BillingAccount_OpenPortalRequestDto,\n // Borrows READ for its route/verb but returns the provider portal\n // redirect URL, NOT the billing-account resource.\n customResponseDto: z.object({\n url: z.url(),\n }),\n }],\n },\n [BillingAccount_Operations.GET_STATE]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n polymorphicRole: {\n [CoreResourceType.ORGANIZATIONS]: [CORE_ORG_ROLES.ORG_OWNER, CORE_ORG_ROLES.ORG_ADMIN],\n [CoreResourceType.USERS]: [CORE_APP_ROLES.APP_USER],\n },\n riskLevel: ResourceOperationRiskLevel.LOW,\n resourceOperationLike: CoreResourceOperation.COUNT,\n // Borrows COUNT for its route/verb but returns the aggregated billing\n // state bundle, NOT a `{ count }`. Without this the DTO builder would\n // assign the COUNT default envelope and the service output would fail\n // `transformOutput`'s `internalDto.parse` → HTTP 500.\n customResponseDto: BillingStateResponseSchema,\n }],\n },\n },\n },\n);\n"]}
|
|
1
|
+
{"version":3,"file":"billing-account.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../src/billing/billing-account.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;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Resource Configuration — Polymorphic\n *\n * Produces 3 factory functions (one per scope variant) via the polymorphic factory.\n * Spread into the registry factory map:\n * ...billingAccountsPolymorphicFactories\n *\n * @see polymorphic-scope-approach-A-expansion.md — Phase 3\n */\n\nimport { z } from 'zod';\nimport { CoreResourceOperation, CoreResourceType } from '../resources/resources.shared.core.definitions';\nimport {\n ResourceOperationRiskLevel,\n ResourceOperationVariantType,\n} from '../resources/resources.shared.schemas';\nimport { ResourceSystemAccessMode } from '../resources/resources-config.shared.schemas';\nimport { createPolymorphicResourceConfigurations } from '../resources/utils/resource-polymorphism.factory';\nimport { CORE_APP_ROLES, CORE_ORG_ROLES } from '../security/authorizations/roles.shared.schemas';\nimport { BILLING_CHECKOUT_MAX_QUANTITY, BILLING_RESERVED_METADATA_KEY_PREFIX, ReferralStatus } from './billing-enums.shared.schemas';\nimport { ReferredRewardSchema } from './referral-reward.shared.schemas';\nimport { billingAccountsPolymorphicDeclaration } from './billing-account.shared.schemas';\nimport { BillingStateResponseSchema } from './billing-types.shared.schemas';\nimport { DataPortabilityProvenance } from '../compliance/privacy/subject-export.shared.schemas';\nimport { ErasureRetentionMode, ResourceDataSubjectKind } from '../compliance/privacy/impersonalization.shared.schemas';\n\n// ── Custom Operations ────────────────────────────────────────────────\n\nexport enum BillingAccount_Operations {\n /** Create a Stripe Checkout Session for the user to complete payment */\n OPEN_CHECKOUT = 'open_checkout',\n /** Open the Stripe Customer Portal for self-service management */\n OPEN_PORTAL = 'open_portal',\n /** Fetch aggregated billing state (account, subscription, products, prices, credit pools) */\n GET_STATE = 'get_state',\n /**\n * Redeem another account's referral code (#1802). Only a new customer may: an account that has never\n * subscribed, is not already referred, and is not the referrer.\n */\n REDEEM_REFERRAL = 'redeem_referral',\n}\n\n// ── Request DTOs ─────────────────────────────────────────────────────\n\n/** Request DTO for OPEN_CHECKOUT. Trial duration is server-owned product/application policy, never a payer option. */\nexport const BillingAccount_OpenCheckoutRequestDto = z.object({\n productKey: z.string().min(1).describe(\"The key of the product to buy. It must be available for purchase and offered to this account's scope.\"),\n priceId: z.string().min(1).describe(\"The id of the price to buy the product at. It must be a price of that product.\"),\n successUrl: z.url().describe(\"Where the billing provider sends the customer after a completed checkout.\"),\n cancelUrl: z.url().describe(\"Where the billing provider sends the customer if they leave checkout without paying.\"),\n /**\n * Bounded by the same constant the webhook consumer honours. An unbounded quantity here would be\n * billed by the provider and then refused on the way back in, charging the customer for credits\n * that never arrive.\n */\n quantity: z.number().int().min(1).max(BILLING_CHECKOUT_MAX_QUANTITY).default(1).describe(\"How many units to buy, such as seats or credit packs. Defaults to 1.\"),\n promotionCode: z.string().optional().describe(\"A promotion code to apply. It is checked before checkout opens, and refused when it is unknown, inactive, outside its validity dates, used up, not valid for this product, or not set up with the billing provider. The checkout page accepts no code of its own.\"),\n /**\n * Caller-supplied tags mirrored to the provider for the application's own analytics or\n * reconciliation. They carry NO authority.\n *\n * Keys in the framework-reserved namespace are REFUSED here rather than silently dropped: the\n * caller is trying to write into the namespace that decides which billing account gets credited\n * and by how much, and an app developer who typed a reserved key deserves to be told, not to\n * watch their tag vanish. Refusal at the DTO is the loud, outermost half of the boundary; the\n * builder's write-reserved-last ordering and the consumer's read-only-reserved rule are the two\n * structural halves. See {@link BILLING_RESERVED_METADATA_KEY_PREFIX}.\n *\n * The refinement sits on the KEY schema, not on the record: it keeps the DTO a plain `ZodRecord`\n * for the OpenAPI projector and the request-validation pipeline, where a wrapping effect would\n * change the node type every consumer of this DTO narrows on.\n */\n metadata: z\n .record(\n z.string().refine(\n (key) => !key.startsWith(BILLING_RESERVED_METADATA_KEY_PREFIX),\n `Metadata keys starting with \"${BILLING_RESERVED_METADATA_KEY_PREFIX}\" are reserved by the framework and cannot be supplied by the caller`,\n ),\n z.string(),\n )\n .optional(),\n});\n\n/** Request DTO for REDEEM_REFERRAL (#1802). */\nexport const BillingAccount_RedeemReferralRequestDto = z.strictObject({\n referralCode: z.string().trim().min(1).max(64).describe('The referral code to redeem, as the referrer shared it.'),\n});\n\n/** Request DTO for OPEN_PORTAL operation */\nexport const BillingAccount_OpenPortalRequestDto = z.object({\n returnUrl: z.url().describe('Absolute URL the billing portal sends the customer back to when they leave it.'),\n});\n\n// =============================================================================\n// POLYMORPHIC FACTORY — 2 variants (org, user)\n// =============================================================================\n\n/**\n * Polymorphic factory map for billing accounts.\n * Spread into `coreShared_ResourcesConfigurations_FactoryMap`:\n * ...billingAccountsPolymorphicFactories\n *\n * Produces entries for:\n * - organizationBillingAccounts\n * - userBillingAccounts\n */\nexport const billingAccountsPolymorphicFactories = createPolymorphicResourceConfigurations(\n billingAccountsPolymorphicDeclaration,\n {\n isSystemResource: true,\n // System-context CREATE opt-in (fail-closed default is FORBIDDEN). The billing\n // account is auto-created by `BillingStateBackendService.getState()` on first\n // access via `SystemAccessBackendService.createAsSystem` — a trusted in-process\n // write with no HTTP surface and no request context to seed the scope FK. That\n // path relocates the ACL onto the billing service (which has already resolved\n // the scope) and injects the scope FK (`organizationId` / `userId`) through the\n // execution context map. Resource-level and shared by BOTH scope variants\n // (org + user) per the polymorphic-resource contract on ResourceSystemAccessPolicy.\n systemAccessPolicy: {\n // Subject-export disclosure. The subject's own billing account. Secrets and backend-only values are withheld by the export's security floor regardless of this grant. On a polymorphic resource this grant applies to EVERY generated variant, which is the documented intent of the shared config.\n exportSubject: ResourceSystemAccessMode.ALLOWED,\n create: ResourceSystemAccessMode.ALLOWED,\n // System-context LIST opt-in. Subject erasure must enumerate the erased person's billing\n // accounts to reach their provider customer (cancel subscriptions, anonymize, detach payment\n // methods). That runs with no request context — the subject is being erased — so it reads\n // through `SystemAccessBackendService.listAsSystem`, which is fail-closed and refuses a\n // resource that has not opted in here.\n //\n // Safe to grant: LIST is the READ side, and the erasure path filters by the subject's own\n // scope FK. The default LIST variant is API_CALL, so it resolves through\n // `getServiceOperationPathDefault` — a REPOSITORY_ONLY-only LIST would pass this grant and\n // then fail to resolve at erasure time, which is the failure mode this comment exists to\n // stop someone from reintroducing.\n list: ResourceSystemAccessMode.ALLOWED,\n },\n portabilityPolicy: { defaultProvenance: DataPortabilityProvenance.OBSERVED },\n\n /**\n * Subject erasure RETAINS this row and scrubs the provider customer id.\n *\n * The financial record is kept for the tax/audit obligation this family exists to serve, and — as the\n * family's authoring rule states — erasure scrubs the linked USER rather than these rows, because the\n * person is a foreign key. `providerCustomerId` is the exception the rule does not cover: it is a stable\n * handle that re-identifies the person INSIDE the payment provider, so it is personal data this row holds.\n * It takes `REMOVE`; everything else is retained.\n */\n retentionPolicy: {\n mode: ErasureRetentionMode.RETAIN_AND_IMPERSONALIZE,\n },\n\n /**\n * Erasing one of these rows revokes NO session. The row is not a person — its owner FK names the ACTOR the\n * record belongs to — and the enum prescribes `NO_PRINCIPAL` for exactly that shape. The subject's own\n * session ends through the `USERS` row, which is `SELF_PRINCIPAL`.\n */\n dataSubjectPolicy: { kind: ResourceDataSubjectKind.NO_PRINCIPAL },\n customOperation: BillingAccount_Operations,\n coreOperations: [\n CoreResourceOperation.READ,\n CoreResourceOperation.LIST,\n CoreResourceOperation.CREATE,\n CoreResourceOperation.UPDATE,\n CoreResourceOperation.DELETE,\n // Route-less; `retentionPolicy` requires READ + LIST + UPDATE_MANY.\n CoreResourceOperation.UPDATE_MANY,\n ],\n operationsConfiguration: {\n /*\n * Route-less retention plumbing — INTERNAL_CALL registers no route, so no API surface is added, and it\n * must not be REPOSITORY_ONLY: the retention primitives resolve through `getServiceOperationPathDefault`,\n * which matches only INTERNAL_CALL / API_CALL. LIST is LOW (a read-shaped op may not claim the\n * HIGH/CRITICAL band, which carries an audit-emission obligation); UPDATE_MANY is CRITICAL — it is the\n * verb the impersonalize writer uses to stamp the retention markers.\n */\n [CoreResourceOperation.UPDATE_MANY]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n }],\n },\n\n [CoreResourceOperation.READ]: {\n variants: [{\n // API_CALL: the billing account is a user-facing record (Settings Hub → Billing →\n // Account, and the resource presets' LIST/READ views). REPOSITORY_ONLY would strip\n // the op from the frontend registry and register no HTTP route. Writes (auto-create\n // + webhook sync) are INTERNAL_CALL — run through the service pipeline, no HTTP surface.\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n polymorphicRole: {\n [CoreResourceType.ORGANIZATIONS]: [CORE_ORG_ROLES.ORG_OWNER, CORE_ORG_ROLES.ORG_ADMIN],\n [CoreResourceType.USERS]: [CORE_APP_ROLES.APP_USER],\n },\n riskLevel: ResourceOperationRiskLevel.LOW,\n }],\n },\n [CoreResourceOperation.LIST]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n polymorphicRole: {\n [CoreResourceType.ORGANIZATIONS]: [CORE_ORG_ROLES.ORG_OWNER, CORE_ORG_ROLES.ORG_ADMIN, CORE_ORG_ROLES.ORG_BILLING_PROVIDER_EVENTS],\n [CoreResourceType.USERS]: [CORE_APP_ROLES.APP_USER, CORE_APP_ROLES.APP_BILLING_PROVIDER_EVENTS],\n },\n riskLevel: ResourceOperationRiskLevel.LOW,\n }],\n },\n [CoreResourceOperation.CREATE]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n polymorphicRole: {\n [CoreResourceType.ORGANIZATIONS]: [CORE_ORG_ROLES.ORG_OWNER, CORE_ORG_ROLES.ORG_ADMIN],\n [CoreResourceType.USERS]: [CORE_APP_ROLES.APP_USER],\n },\n riskLevel: ResourceOperationRiskLevel.MEDIUM,\n }],\n },\n [CoreResourceOperation.UPDATE]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n polymorphicRole: {\n [CoreResourceType.ORGANIZATIONS]: [CORE_ORG_ROLES.ORG_OWNER, CORE_ORG_ROLES.ORG_ADMIN, CORE_ORG_ROLES.ORG_BILLING_PROVIDER_EVENTS],\n [CoreResourceType.USERS]: [CORE_APP_ROLES.APP_USER, CORE_APP_ROLES.APP_BILLING_PROVIDER_EVENTS],\n },\n riskLevel: ResourceOperationRiskLevel.MEDIUM,\n }],\n },\n [CoreResourceOperation.DELETE]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n polymorphicRole: {\n [CoreResourceType.ORGANIZATIONS]: [CORE_ORG_ROLES.ORG_OWNER, CORE_ORG_ROLES.ORG_ADMIN],\n [CoreResourceType.USERS]: [CORE_APP_ROLES.APP_USER],\n },\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n }],\n },\n [BillingAccount_Operations.OPEN_CHECKOUT]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n polymorphicRole: {\n [CoreResourceType.ORGANIZATIONS]: [CORE_ORG_ROLES.ORG_OWNER, CORE_ORG_ROLES.ORG_ADMIN],\n [CoreResourceType.USERS]: [CORE_APP_ROLES.APP_USER],\n },\n riskLevel: ResourceOperationRiskLevel.HIGH,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: BillingAccount_OpenCheckoutRequestDto,\n // Borrows UPDATE for its route/verb but returns the provider checkout\n // session, NOT the billing-account resource. Without this the DTO builder\n // would validate the service output against the resource schema and 500.\n customResponseDto: z.object({\n url: z.url().describe(\"The billing provider's hosted checkout page. Send the customer there to pay.\"),\n sessionId: z.string().describe(\"The billing provider's id for this checkout session.\"),\n }),\n }],\n },\n /*\n * #1802 — the account that was referred redeems the code. Refusals are the ones a person can act on:\n * an unusable code, and an account that cannot be referred. The rewards are the referrer's policy,\n * copied when the code was issued, and are reported back so the purchase screen can show them.\n */\n [BillingAccount_Operations.REDEEM_REFERRAL]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n polymorphicRole: {\n [CoreResourceType.ORGANIZATIONS]: [CORE_ORG_ROLES.ORG_OWNER, CORE_ORG_ROLES.ORG_ADMIN],\n [CoreResourceType.USERS]: [CORE_APP_ROLES.APP_USER],\n },\n riskLevel: ResourceOperationRiskLevel.MEDIUM,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: BillingAccount_RedeemReferralRequestDto,\n // Returns the redemption, not the billing account.\n customResponseDto: z.object({\n referralId: z.string().describe('The id of the referral that was redeemed.'),\n status: z.enum(ReferralStatus).systemEnum('ReferralStatus').describe('`accepted`: the account is now the referred side, and the rewards are granted when it pays its first invoice.'),\n referredReward: ReferredRewardSchema.optional().describe('What this account receives. Absent when the referral gives the referred side nothing.'),\n }),\n }],\n },\n [BillingAccount_Operations.OPEN_PORTAL]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n polymorphicRole: {\n [CoreResourceType.ORGANIZATIONS]: [CORE_ORG_ROLES.ORG_OWNER, CORE_ORG_ROLES.ORG_ADMIN],\n [CoreResourceType.USERS]: [CORE_APP_ROLES.APP_USER],\n },\n riskLevel: ResourceOperationRiskLevel.LOW,\n resourceOperationLike: CoreResourceOperation.READ,\n requestDto: BillingAccount_OpenPortalRequestDto,\n // Borrows READ for its route/verb but returns the provider portal\n // redirect URL, NOT the billing-account resource.\n customResponseDto: z.object({\n url: z.url().describe(\"The billing provider's customer portal, where the customer manages their billing. Send the customer there; the portal links back to `returnUrl`.\"),\n }),\n }],\n },\n [BillingAccount_Operations.GET_STATE]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n polymorphicRole: {\n [CoreResourceType.ORGANIZATIONS]: [CORE_ORG_ROLES.ORG_OWNER, CORE_ORG_ROLES.ORG_ADMIN],\n [CoreResourceType.USERS]: [CORE_APP_ROLES.APP_USER],\n },\n riskLevel: ResourceOperationRiskLevel.LOW,\n resourceOperationLike: CoreResourceOperation.COUNT,\n // Borrows COUNT for its route/verb but returns the aggregated billing\n // state bundle, NOT a `{ count }`. Without this the DTO builder would\n // assign the COUNT default envelope and the service output would fail\n // `transformOutput`'s `internalDto.parse` → HTTP 500.\n customResponseDto: BillingStateResponseSchema,\n }],\n },\n },\n },\n);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billing-account.shared.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"billing-account.shared.schemas.d.ts","sourceRoot":"","sources":["../../../src/billing/billing-account.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAErE,OAAO,EAA6B,KAAK,4BAA4B,EAAE,MAAM,kDAAkD,CAAC;AAShI;;;GAGG;AACH,eAAO,MAAM,sBAAsB,EAAE,4BAA4B,EAGhE,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,EAAE,oBAAoB,EAGzD,CAAC;AAEJ;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,uCAAuC,EAAE,oBAAoB,EAWzE,CAAC;AAMF;;;;GAIG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;iBAkDnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAM1E;;;;;GAKG;AACH,eAAO,MAAM,qCAAqC;;;;;;;;kBAMhD,CAAC;AAMH,eAAO,MAAM,oBAAoB;;;;;;;;iBAA2B,CAAC;AAC7D,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
|
|
@@ -112,7 +112,7 @@ export const BillingAccountBaseSchema = z.object({
|
|
|
112
112
|
/** Which provider (e.g., 'stripe') */
|
|
113
113
|
providerRef: z.string().optional().isBackendOnly(),
|
|
114
114
|
/** Status */
|
|
115
|
-
isActive: z.boolean().default(true).isDBIndexed().isSummaryField(),
|
|
115
|
+
isActive: z.boolean().default(true).isDBIndexed().isSummaryField().describe("Whether the account is active. It becomes `false` when the customer is deleted at the billing provider, and an inactive account is skipped when every account's features are recomputed."),
|
|
116
116
|
/**
|
|
117
117
|
* Open key-value bag for operational tagging (cost-centre, campaign ref, internal correlation id).
|
|
118
118
|
*
|
|
@@ -132,7 +132,7 @@ export const BillingAccountBaseSchema = z.object({
|
|
|
132
132
|
* hide/freeze to become separable from scrub — a real capability change with no current consumer.
|
|
133
133
|
* Revisit only if an app is found using the bag this way.
|
|
134
134
|
*/
|
|
135
|
-
metadata: z.record(z.string(), z.string()).optional(),
|
|
135
|
+
metadata: z.record(z.string(), z.string()).optional().describe("String tags the application's own code may attach to the account. Do not store personal data here: this record is kept when its owner is erased."),
|
|
136
136
|
createdAt: z.date().default(() => new Date()).excludeFromCreate().excludeFromUpdate(),
|
|
137
137
|
updatedAt: z.date().default(() => new Date()).excludeFromCreate().excludeFromUpdate(),
|
|
138
138
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billing-account.shared.schemas.js","sourceRoot":"","sources":["../../../../src/billing/billing-account.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,6DAA6D,CAAC;AAEnG,OAAO,EAAE,gBAAgB,EAAE,kCAAkC,EAAE,MAAM,gDAAgD,CAAC;AACtH,OAAO,EAAE,yBAAyB,EAAqC,MAAM,kDAAkD,CAAC;AAChI,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,gDAAgD,CAAC;AAC/E,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,gFAAgF;AAChF,6BAA6B;AAC7B,gFAAgF;AAEhF;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAmC;IACpE,EAAE,kBAAkB,EAAE,gBAAgB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AAyB;AACzB,gFAAgF;AAEhF,MAAM,CAAC,MAAM,oBAAoB,GAAG,wBAAwB,CAAC","sourcesContent":["/**\n * Billing Account Schema (Shared) — Polymorphic\n *\n * BillingAccount is the PURE SCOPE BRIDGE between a Wildo entity and the billing provider.\n *\n * POLYMORPHIC EXPANSION: The base schema does NOT contain identity scope fields\n * (organizationId, userId). These are injected per variant by\n * `declarePolymorphicSchemas()`, producing 2 concrete resources:\n * - organizationBillingAccounts (with organizationId)\n * - userBillingAccounts (with userId)\n *\n * DELEGATION PRINCIPLE: All customer details (contact info, billing address, tax IDs,\n * payment methods) are managed by the provider. BillingAccount stores ONLY:\n * 1. The provider reference (which provider customer this maps to)\n * 2. Status\n * The scope reference is the injected identity FK.\n *\n * @see polymorphic-scope-approach-A-expansion.md\n * @see billing-and-features-system.md §6.1 (Core Design)\n */\n\nimport { z } from 'zod';\nimport { PersonalDataCategory } from '../compliance/privacy/personal-data-category.shared.schemas';\nimport type { PolymorphicFkVariant } from '@wildo-ai/zod-decorators';\nimport { CoreResourceType, coreResourceShared_FieldIdentifier } from '../resources/resources.shared.core.definitions';\nimport { declarePolymorphicSchemas, type PolymorphicVariantDefinition } from '../resources/utils/resource-polymorphism.schemas';\nimport { BillingScopeType } from './billing-enums.shared.schemas';\nimport { RedactionType } from '../compliance/privacy/redaction.shared.schemas';\nimport { addImpersonalizeWith } from '@wildo-ai/zod-decorators';\n\n// =============================================================================\n// SHARED VARIANT DEFINITIONS\n// =============================================================================\n\n/**\n * The 2 billing scope variants — shared across BillingAccounts, Subscriptions, and children.\n * Centralised here to avoid repetition (DX concern from plan remarks #1).\n */\nexport const BILLING_SCOPE_VARIANTS: PolymorphicVariantDefinition[] = [\n { parentResourceType: CoreResourceType.ORGANIZATIONS, parentFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.ORGANIZATIONS], isPrimaryScope: true },\n { parentResourceType: CoreResourceType.USERS, parentFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.USERS], isPrimaryScope: true },\n];\n\n/**\n * FK variant definitions for child resources referencing polymorphic billing accounts.\n * Used on `billingAccountId` fields as: `.isForeignKey({ polymorphicVariants: BILLING_SCOPE_FK_VARIANTS })`\n *\n * This tells the polymorphic engine to rename `billingAccountId` per variant:\n * - organizations → `organizationBillingAccountId`\n * - users → `userBillingAccountId`\n */\nexport const BILLING_SCOPE_FK_VARIANTS: PolymorphicFkVariant[] = BILLING_SCOPE_VARIANTS.map(v => ({\n parentResourceType: v.parentResourceType,\n parentFieldIdentifier: v.parentFieldIdentifier,\n}));\n\n/**\n * FK variant definitions for a SHARED-FIELD DISCRIMINATED polymorphic\n * billing-account FK — e.g. a referral's `referrerBillingAccountId`, a single\n * column on the flat `referrals` resource that points at EITHER a user OR an\n * organization billing account, with the branch chosen PER RECORD by a sibling\n * `*ScopeType` field.\n *\n * Same scope branches as {@link BILLING_SCOPE_FK_VARIANTS}, but each variant\n * additionally carries the `discriminatorValue` ({@link BillingScopeType}) that\n * the holder record's discriminator field uses to select the branch. Declare as:\n *\n * ```ts\n * referrerBillingAccountId: z.string().min(1).isForeignKey({\n * polymorphicVariants: BILLING_SCOPE_DISCRIMINATED_FK_VARIANTS,\n * polymorphicDiscriminatorField: 'referrerScopeType',\n * })\n * ```\n *\n * Contrast with {@link BILLING_SCOPE_FK_VARIANTS} (rename-only, used when the\n * HOLDER is itself polymorphically expanded). The branch TARGET is resolved at\n * runtime via the scope bridge: `discriminatorValue` selects the variant, whose\n * `parentResourceType` scope root matches the branch's `resourcePrimaryScope`.\n */\nexport const BILLING_SCOPE_DISCRIMINATED_FK_VARIANTS: PolymorphicFkVariant[] = [\n {\n parentResourceType: CoreResourceType.ORGANIZATIONS,\n parentFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.ORGANIZATIONS],\n discriminatorValue: BillingScopeType.ORGANIZATIONS,\n },\n {\n parentResourceType: CoreResourceType.USERS,\n parentFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.USERS],\n discriminatorValue: BillingScopeType.USER_SELF,\n },\n];\n\n// =============================================================================\n// BASE SCHEMA\n// =============================================================================\n\n/**\n * BillingAccount base schema — NO identity scope fields.\n * The polymorphic declaration injects the parent FK (organizationId / userId)\n * automatically per variant.\n */\nexport const BillingAccountBaseSchema = z.object({\n _id: z.string().min(1).isPrimaryKey().isSummaryField(),\n\n /** Provider sync - the ONLY provider-side reference we store */\n // ── FINANCIAL, and declared on the SHARED base rather than per scope variant ──\n //\n // This family is polymorphic: `userBillingAccounts` holds a person's billing relationship,\n // `organizationBillingAccounts` a company's, and both are built from this one schema. A category\n // declared here therefore reaches both, and that is the direction to err in — an organization on a\n // single-seat plan is one person, and the framework cannot tell which. Declaring only on a\n // hypothetical user-only variant would UNDER-report, which is the silent failure a notice must\n // never make; declaring on both at worst tells a reader the operator holds financial data, which\n // it does. The same note applies to the invoice, usage, credit-pool and subscription siblings.\n // REMOVE on erasure. This is the person's identifier AT THE PAYMENT PROVIDER — a stable handle that\n // re-identifies them in a system we do not own, which is personal data this row HOLDS rather than a\n // link it merely carries. The provider-side customer is retired by the billing subject-erasure\n // external effect, so keeping the id afterwards would leave a dangling pointer at a deleted person.\n // Clearable: the field is `.optional()`, so REMOVE resolves to a removed key rather than a rejected null.\n providerCustomerId: addImpersonalizeWith(\n z.string().optional().isBackendOnly().dataCategories(PersonalDataCategory.FINANCIAL),\n RedactionType.REMOVE,\n ),\n /** Which provider (e.g., 'stripe') */\n providerRef: z.string().optional().isBackendOnly(),\n\n /** Status */\n isActive: z.boolean().default(true).isDBIndexed().isSummaryField(),\n\n /**\n * Open key-value bag for operational tagging (cost-centre, campaign ref, internal correlation id).\n *\n * ⚠️ **AUTHORING RULE — never store personal data here.** This row is RETAINED when its subject is\n * erased: the billing-retention decision keeps the financial record for tax/audit obligations, and\n * subject erasure scrubs the linked USER rather than these rows, because a billing row holds no\n * personal data of its own — the person is a foreign key. An open bag is the one place that\n * assumption can be broken by an app author, and nothing would catch it: the erasure scrub is\n * field-directed (`.impersonalizeWith()`), and it cannot reach inside an arbitrary record whose\n * keys it does not know.\n *\n * Concretely: no names, emails, phone numbers, addresses, free-text notes about a person, or\n * anything else that identifies one. Personal data written here SURVIVES an erasure — a compliance\n * breach that the retained label makes look intentional.\n *\n * Enforcement is deliberately NOT built (Q3, 2026-07-31): scrubbing these rows would require\n * hide/freeze to become separable from scrub — a real capability change with no current consumer.\n * Revisit only if an app is found using the bag this way.\n */\n metadata: z.record(z.string(), z.string()).optional(),\n createdAt: z.date().default(() => new Date()).excludeFromCreate().excludeFromUpdate(),\n updatedAt: z.date().default(() => new Date()).excludeFromCreate().excludeFromUpdate(),\n});\nexport type BillingAccountBase = z.infer<typeof BillingAccountBaseSchema>;\n\n// =============================================================================\n// POLYMORPHIC DECLARATION\n// =============================================================================\n\n/**\n * Polymorphic declaration for BillingAccounts.\n * Produces 2 variants:\n * - organizations → organizationBillingAccounts (organizationId injected)\n * - users → userBillingAccounts (userId injected)\n */\nexport const billingAccountsPolymorphicDeclaration = declarePolymorphicSchemas({\n baseResourceType: 'billingAccounts',\n baseFieldIdentifier: 'billingAccountId',\n baseEnumKey: 'BILLING_ACCOUNTS',\n baseSchema: BillingAccountBaseSchema,\n variants: BILLING_SCOPE_VARIANTS,\n});\n\n// =============================================================================\n// EXPORTED SCHEMA & TYPE\n// =============================================================================\n\nexport const BillingAccountSchema = BillingAccountBaseSchema;\nexport type BillingAccount = z.infer<typeof BillingAccountBaseSchema>;\n"]}
|
|
1
|
+
{"version":3,"file":"billing-account.shared.schemas.js","sourceRoot":"","sources":["../../../src/billing/billing-account.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,6DAA6D,CAAC;AAEnG,OAAO,EAAE,gBAAgB,EAAE,kCAAkC,EAAE,MAAM,gDAAgD,CAAC;AACtH,OAAO,EAAE,yB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AAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,iBAAiB,EAAE,CAAC,iBAAiB,EAAE;CACtF,CAAC,CAAC;AAGH,gFAAgF;AAChF,0BAA0B;AAC1B,gFAAgF;AAEhF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,qCAAqC,GAAG,yBAAyB,CAAC;IAC7E,gBAAgB,EAAE,iBAAiB;IACnC,mBAAmB,EAAE,kBAAkB;IACvC,WAAW,EAAE,kBAAkB;IAC/B,UAAU,EAAE,wBAAwB;IACpC,QAAQ,EAAE,sBAAsB;CACjC,CAAC,CAAC;AAEH,gFAAgF;AAChF,yBAAyB;AACzB,gFAAgF;AAEhF,MAAM,CAAC,MAAM,oBAAoB,GAAG,wBAAwB,CAAC","sourcesContent":["/**\n * Billing Account Schema (Shared) — Polymorphic\n *\n * BillingAccount is the PURE SCOPE BRIDGE between a Wildo entity and the billing provider.\n *\n * POLYMORPHIC EXPANSION: The base schema does NOT contain identity scope fields\n * (organizationId, userId). These are injected per variant by\n * `declarePolymorphicSchemas()`, producing 2 concrete resources:\n * - organizationBillingAccounts (with organizationId)\n * - userBillingAccounts (with userId)\n *\n * DELEGATION PRINCIPLE: All customer details (contact info, billing address, tax IDs,\n * payment methods) are managed by the provider. BillingAccount stores ONLY:\n * 1. The provider reference (which provider customer this maps to)\n * 2. Status\n * The scope reference is the injected identity FK.\n *\n * @see polymorphic-scope-approach-A-expansion.md\n * @see billing-and-features-system.md §6.1 (Core Design)\n */\n\nimport { z } from 'zod';\nimport { PersonalDataCategory } from '../compliance/privacy/personal-data-category.shared.schemas';\nimport type { PolymorphicFkVariant } from '@wildo-ai/zod-decorators';\nimport { CoreResourceType, coreResourceShared_FieldIdentifier } from '../resources/resources.shared.core.definitions';\nimport { declarePolymorphicSchemas, type PolymorphicVariantDefinition } from '../resources/utils/resource-polymorphism.schemas';\nimport { BillingScopeType } from './billing-enums.shared.schemas';\nimport { RedactionType } from '../compliance/privacy/redaction.shared.schemas';\nimport { addImpersonalizeWith } from '@wildo-ai/zod-decorators';\n\n// =============================================================================\n// SHARED VARIANT DEFINITIONS\n// =============================================================================\n\n/**\n * The 2 billing scope variants — shared across BillingAccounts, Subscriptions, and children.\n * Centralised here to avoid repetition (DX concern from plan remarks #1).\n */\nexport const BILLING_SCOPE_VARIANTS: PolymorphicVariantDefinition[] = [\n { parentResourceType: CoreResourceType.ORGANIZATIONS, parentFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.ORGANIZATIONS], isPrimaryScope: true },\n { parentResourceType: CoreResourceType.USERS, parentFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.USERS], isPrimaryScope: true },\n];\n\n/**\n * FK variant definitions for child resources referencing polymorphic billing accounts.\n * Used on `billingAccountId` fields as: `.isForeignKey({ polymorphicVariants: BILLING_SCOPE_FK_VARIANTS })`\n *\n * This tells the polymorphic engine to rename `billingAccountId` per variant:\n * - organizations → `organizationBillingAccountId`\n * - users → `userBillingAccountId`\n */\nexport const BILLING_SCOPE_FK_VARIANTS: PolymorphicFkVariant[] = BILLING_SCOPE_VARIANTS.map(v => ({\n parentResourceType: v.parentResourceType,\n parentFieldIdentifier: v.parentFieldIdentifier,\n}));\n\n/**\n * FK variant definitions for a SHARED-FIELD DISCRIMINATED polymorphic\n * billing-account FK — e.g. a referral's `referrerBillingAccountId`, a single\n * column on the flat `referrals` resource that points at EITHER a user OR an\n * organization billing account, with the branch chosen PER RECORD by a sibling\n * `*ScopeType` field.\n *\n * Same scope branches as {@link BILLING_SCOPE_FK_VARIANTS}, but each variant\n * additionally carries the `discriminatorValue` ({@link BillingScopeType}) that\n * the holder record's discriminator field uses to select the branch. Declare as:\n *\n * ```ts\n * referrerBillingAccountId: z.string().min(1).isForeignKey({\n * polymorphicVariants: BILLING_SCOPE_DISCRIMINATED_FK_VARIANTS,\n * polymorphicDiscriminatorField: 'referrerScopeType',\n * })\n * ```\n *\n * Contrast with {@link BILLING_SCOPE_FK_VARIANTS} (rename-only, used when the\n * HOLDER is itself polymorphically expanded). The branch TARGET is resolved at\n * runtime via the scope bridge: `discriminatorValue` selects the variant, whose\n * `parentResourceType` scope root matches the branch's `resourcePrimaryScope`.\n */\nexport const BILLING_SCOPE_DISCRIMINATED_FK_VARIANTS: PolymorphicFkVariant[] = [\n {\n parentResourceType: CoreResourceType.ORGANIZATIONS,\n parentFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.ORGANIZATIONS],\n discriminatorValue: BillingScopeType.ORGANIZATIONS,\n },\n {\n parentResourceType: CoreResourceType.USERS,\n parentFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.USERS],\n discriminatorValue: BillingScopeType.USER_SELF,\n },\n];\n\n// =============================================================================\n// BASE SCHEMA\n// =============================================================================\n\n/**\n * BillingAccount base schema — NO identity scope fields.\n * The polymorphic declaration injects the parent FK (organizationId / userId)\n * automatically per variant.\n */\nexport const BillingAccountBaseSchema = z.object({\n _id: z.string().min(1).isPrimaryKey().isSummaryField(),\n\n /** Provider sync - the ONLY provider-side reference we store */\n // ── FINANCIAL, and declared on the SHARED base rather than per scope variant ──\n //\n // This family is polymorphic: `userBillingAccounts` holds a person's billing relationship,\n // `organizationBillingAccounts` a company's, and both are built from this one schema. A category\n // declared here therefore reaches both, and that is the direction to err in — an organization on a\n // single-seat plan is one person, and the framework cannot tell which. Declaring only on a\n // hypothetical user-only variant would UNDER-report, which is the silent failure a notice must\n // never make; declaring on both at worst tells a reader the operator holds financial data, which\n // it does. The same note applies to the invoice, usage, credit-pool and subscription siblings.\n // REMOVE on erasure. This is the person's identifier AT THE PAYMENT PROVIDER — a stable handle that\n // re-identifies them in a system we do not own, which is personal data this row HOLDS rather than a\n // link it merely carries. The provider-side customer is retired by the billing subject-erasure\n // external effect, so keeping the id afterwards would leave a dangling pointer at a deleted person.\n // Clearable: the field is `.optional()`, so REMOVE resolves to a removed key rather than a rejected null.\n providerCustomerId: addImpersonalizeWith(\n z.string().optional().isBackendOnly().dataCategories(PersonalDataCategory.FINANCIAL),\n RedactionType.REMOVE,\n ),\n /** Which provider (e.g., 'stripe') */\n providerRef: z.string().optional().isBackendOnly(),\n\n /** Status */\n isActive: z.boolean().default(true).isDBIndexed().isSummaryField().describe(\"Whether the account is active. It becomes `false` when the customer is deleted at the billing provider, and an inactive account is skipped when every account's features are recomputed.\"),\n\n /**\n * Open key-value bag for operational tagging (cost-centre, campaign ref, internal correlation id).\n *\n * ⚠️ **AUTHORING RULE — never store personal data here.** This row is RETAINED when its subject is\n * erased: the billing-retention decision keeps the financial record for tax/audit obligations, and\n * subject erasure scrubs the linked USER rather than these rows, because a billing row holds no\n * personal data of its own — the person is a foreign key. An open bag is the one place that\n * assumption can be broken by an app author, and nothing would catch it: the erasure scrub is\n * field-directed (`.impersonalizeWith()`), and it cannot reach inside an arbitrary record whose\n * keys it does not know.\n *\n * Concretely: no names, emails, phone numbers, addresses, free-text notes about a person, or\n * anything else that identifies one. Personal data written here SURVIVES an erasure — a compliance\n * breach that the retained label makes look intentional.\n *\n * Enforcement is deliberately NOT built (Q3, 2026-07-31): scrubbing these rows would require\n * hide/freeze to become separable from scrub — a real capability change with no current consumer.\n * Revisit only if an app is found using the bag this way.\n */\n metadata: z.record(z.string(), z.string()).optional().describe(\"String tags the application's own code may attach to the account. Do not store personal data here: this record is kept when its owner is erased.\"),\n createdAt: z.date().default(() => new Date()).excludeFromCreate().excludeFromUpdate(),\n updatedAt: z.date().default(() => new Date()).excludeFromCreate().excludeFromUpdate(),\n});\nexport type BillingAccountBase = z.infer<typeof BillingAccountBaseSchema>;\n\n// =============================================================================\n// POLYMORPHIC DECLARATION\n// =============================================================================\n\n/**\n * Polymorphic declaration for BillingAccounts.\n * Produces 2 variants:\n * - organizations → organizationBillingAccounts (organizationId injected)\n * - users → userBillingAccounts (userId injected)\n */\nexport const billingAccountsPolymorphicDeclaration = declarePolymorphicSchemas({\n baseResourceType: 'billingAccounts',\n baseFieldIdentifier: 'billingAccountId',\n baseEnumKey: 'BILLING_ACCOUNTS',\n baseSchema: BillingAccountBaseSchema,\n variants: BILLING_SCOPE_VARIANTS,\n});\n\n// =============================================================================\n// EXPORTED SCHEMA & TYPE\n// =============================================================================\n\nexport const BillingAccountSchema = BillingAccountBaseSchema;\nexport type BillingAccount = z.infer<typeof BillingAccountBaseSchema>;\n"]}
|
|
@@ -27,6 +27,31 @@ export declare const BillingConfigurationSchema: z.ZodObject<{
|
|
|
27
27
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
28
28
|
defaultInitialBalance: z.ZodDefault<z.ZodNumber>;
|
|
29
29
|
}, z.core.$strip>>;
|
|
30
|
+
referrals: z.ZodDefault<z.ZodObject<{
|
|
31
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
32
|
+
referrerReward: z.ZodOptional<z.ZodObject<{
|
|
33
|
+
credits: z.ZodOptional<z.ZodNumber>;
|
|
34
|
+
creditPoolKey: z.ZodOptional<z.ZodString>;
|
|
35
|
+
featureKey: z.ZodOptional<z.ZodString>;
|
|
36
|
+
durationDays: z.ZodOptional<z.ZodNumber>;
|
|
37
|
+
percentOff: z.ZodOptional<z.ZodNumber>;
|
|
38
|
+
discountDuration: z.ZodOptional<z.ZodEnum<typeof import("./billing-enums.shared.schemas").PromotionDuration>>;
|
|
39
|
+
discountDurationInMonths: z.ZodOptional<z.ZodNumber>;
|
|
40
|
+
type: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof import("./billing-enums.shared.schemas").ReferrerRewardType>>;
|
|
41
|
+
}, z.core.$strip>>;
|
|
42
|
+
referredReward: z.ZodOptional<z.ZodObject<{
|
|
43
|
+
trialExtensionDays: z.ZodOptional<z.ZodNumber>;
|
|
44
|
+
credits: z.ZodOptional<z.ZodNumber>;
|
|
45
|
+
creditPoolKey: z.ZodOptional<z.ZodString>;
|
|
46
|
+
featureKey: z.ZodOptional<z.ZodString>;
|
|
47
|
+
durationDays: z.ZodOptional<z.ZodNumber>;
|
|
48
|
+
percentOff: z.ZodOptional<z.ZodNumber>;
|
|
49
|
+
discountDuration: z.ZodOptional<z.ZodEnum<typeof import("./billing-enums.shared.schemas").PromotionDuration>>;
|
|
50
|
+
discountDurationInMonths: z.ZodOptional<z.ZodNumber>;
|
|
51
|
+
type: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof import("./billing-enums.shared.schemas").ReferredRewardType>>;
|
|
52
|
+
}, z.core.$strip>>;
|
|
53
|
+
codeValidityDays: z.ZodDefault<z.ZodNumber>;
|
|
54
|
+
}, z.core.$strip>>;
|
|
30
55
|
defaultBehaviorPolicy: z.ZodDefault<z.ZodObject<{
|
|
31
56
|
defaultTrialDays: z.ZodDefault<z.ZodNumber>;
|
|
32
57
|
paymentGracePeriodDays: z.ZodDefault<z.ZodNumber>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billing-configuration.shared.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"billing-configuration.shared.schemas.d.ts","sourceRoot":"","sources":["../../../src/billing/billing-configuration.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,iBAAiB,EACjB,aAAa,EACd,MAAM,gCAAgC,CAAC;AAGxC,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAyJrC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
|
|
@@ -11,6 +11,7 @@ import { z } from 'zod';
|
|
|
11
11
|
import { CurrencySchema } from '@wildo-ai/zod-decorators';
|
|
12
12
|
import { ResourcePrimaryScope } from '../resources/resources.shared.schemas.js';
|
|
13
13
|
import { TaxCalculationMode, TaxDisplayMode, ProrationBehavior, BillingTiming, } from './billing-enums.shared.schemas.js';
|
|
14
|
+
import { ReferredRewardSchema, ReferrerRewardSchema } from './referral-reward.shared.schemas.js';
|
|
14
15
|
export const BillingConfigurationSchema = z.object({
|
|
15
16
|
/** Master switch: is billing enabled for this app? */
|
|
16
17
|
enabled: z.boolean().default(false),
|
|
@@ -105,6 +106,24 @@ export const BillingConfigurationSchema = z.object({
|
|
|
105
106
|
enabled: true,
|
|
106
107
|
defaultInitialBalance: 0,
|
|
107
108
|
})),
|
|
109
|
+
/** @wildo_source:part:start saas.models.billing.referral-program facet:layer:shared facet:audience:app-developer */
|
|
110
|
+
/**
|
|
111
|
+
* The referral program (#1802): whether organizations may issue referral codes, and what each side
|
|
112
|
+
* receives when a referral converts (the referred account's first paid invoice).
|
|
113
|
+
*
|
|
114
|
+
* The rewards are copied onto each referral when its code is issued, so changing them here affects
|
|
115
|
+
* codes issued afterwards and never re-prices a referral already made. A reward's `featureKey` must
|
|
116
|
+
* name a registered boolean feature; startup WARNS about one that does not, like every other feature
|
|
117
|
+
* reference, and a feature nobody registered grants nothing.
|
|
118
|
+
*/
|
|
119
|
+
referrals: z.object({
|
|
120
|
+
/** Off by default: issuing codes that promise rewards is a commercial decision the application makes. */
|
|
121
|
+
enabled: z.boolean().default(false).describe('Whether organizations may issue referral codes. Redeeming and converting codes already issued keeps working when this is turned off.'),
|
|
122
|
+
referrerReward: ReferrerRewardSchema.optional().describe('What the referrer receives when a referral converts. Absent means nothing.'),
|
|
123
|
+
referredReward: ReferredRewardSchema.optional().describe('What the referred account receives. Absent means nothing.'),
|
|
124
|
+
codeValidityDays: z.number().int().min(1).default(30).describe('How many days a referral code can be redeemed after it is issued. Defaults to 30.'),
|
|
125
|
+
}).default(() => ({ enabled: false, codeValidityDays: 30 })),
|
|
126
|
+
/** @wildo_source:part:end saas.models.billing.referral-program */
|
|
108
127
|
/** Global billing policy defaults (overridden by ProductBehaviorPolicy per product) */
|
|
109
128
|
defaultBehaviorPolicy: z.object({
|
|
110
129
|
/** Default trial days for new subscriptions (0 = no trial) */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billing-configuration.shared.schemas.js","sourceRoot":"","sources":["../../../../src/billing/billing-configuration.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,iBAAiB,EACjB,aAAa,GACd,MAAM,gCAAgC,CAAC;AAExC,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,sDAAsD;IACtD,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IACnC,qDAAqD;IACrD,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAElC;;;;;;;;;;;OAWG;IAEH;;;;;OAKG;IACH,eAAe,EAAE,cAAc,CAAC,OAAO,CAAC,KAAK,CAAC;IAC9C,gDAAgD;IAChD,mBAAmB,EAAE,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC;IAE7D;;;OAGG;IACH,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC;QACZ;;;;;;;;WAQG;QACH,eAAe,EAAE,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,OAAO,CAAC,kBAAkB,CAAC,QAAQ,CAAC;QAEhF;;;;;;;;;;;WAWG;QACH,kBAAkB,EAAE,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,SAAS,CAAC;KAC7E,CAAC,CAAC,OAAO,CAAC,GAAG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AAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;QAC/C,uFAAuF;QACvF,gBAAgB,EAAE,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC,iBAAiB,CAAC;QACxF;;;;;;;;WAQG;QACH,mBAAmB,EAAE,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,aAAa,CAAC;KAChF,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;QAChB,gBAAgB,EAAE,CAAC;QACnB,sBAAsB,EAAE,CAAC;QACzB,iBAAiB,EAAE,CAAC;QACpB,gBAAgB,EAAE,iBAAiB,CAAC,iBAAiB;QACrD,mBAAmB,EAAE,aAAa,CAAC,aAAa;KACjD,CAAC,CAAC;CACJ,CAAC,CAAC","sourcesContent":["/**\n * Billing Configuration Schema (Shared)\n *\n * Top-level billing configuration that custom apps provide at startup.\n * Controls: provider selection, currency, tax policy, enabled scopes,\n * and default behavior policies.\n *\n * @see billing-and-features-system.md §6.7 (Billing Configuration)\n */\n\nimport { z } from 'zod';\nimport { CurrencySchema } from '@wildo-ai/zod-decorators';\nimport { ResourcePrimaryScope } from '../resources/resources.shared.schemas';\nimport {\n TaxCalculationMode,\n TaxDisplayMode,\n ProrationBehavior,\n BillingTiming,\n} from './billing-enums.shared.schemas';\n\nexport const BillingConfigurationSchema = z.object({\n /** Master switch: is billing enabled for this app? */\n enabled: z.boolean().default(false),\n /** Which billing provider to use (e.g., 'stripe') */\n providerRef: z.string().optional(),\n\n /*\n * NO `webhooks` block. `path` and `signingSecretRef` were declared here and read by NOTHING —\n * `signingSecretRef` had zero references outside its own declaration — and they were removed on\n * 2026-09-08 (#408) rather than relabelled, because unlike the commercial-intent keys below they\n * were not even an input to anything.\n *\n * The route and the signing secret both come from the provider module's `WEBHOOK_ORIGINATOR`\n * contract: `buildWebhookEndpoints` mounts it at `/api/v1/webhooks/<provider>/billing`. That is\n * the single authority, and `webhook-auto-controller.backend.service.ts` already recorded the\n * same conclusion when endpoint-level path/secret extras were dropped as dead in the 2026-05-06\n * reshape. This block was the copy that survived that sweep.\n */\n\n /**\n * DECLARATION-ONLY (#408, 2026-09-08). Read by the application-creation commercial-model brief and\n * by no runtime billing path: nothing validates a product's currency against these, and what\n * reaches the provider is each price's own `currency`. Authoring them records the commercial\n * intent a reviewer reads; it enforces nothing.\n */\n defaultCurrency: CurrencySchema.default('USD'),\n /** DECLARATION-ONLY — see `defaultCurrency`. */\n supportedCurrencies: z.array(CurrencySchema).default(['USD']),\n\n /**\n * Tax configuration — calculation is ALWAYS delegated to provider (Stripe Tax, etc.).\n * We never calculate tax locally.\n */\n tax: z.object({\n /**\n * Whether the PROVIDER computes tax on a purchase. READ since 2026-09-08 (#408): the checkout\n * path — the only production purchase route — sends `automaticTax` from this value.\n *\n * It reached nothing before that, so `PROVIDER_MANAGED` changed no behaviour and the provider\n * account's own configuration silently decided. Enabling it changes invoice totals and the tax\n * amounts persisted against them, which is why it is a decision an application makes rather\n * than a default the framework picks.\n */\n calculationMode: z.enum(TaxCalculationMode).default(TaxCalculationMode.DISABLED),\n\n /**\n * How prices are DISPLAYED to users (does not affect provider calculation).\n * - 'exclusive': Prices shown excluding tax (HT / ex-VAT). Tax added at checkout.\n * Common for B2B. Shows \"$49/mo\" and tax is added separately.\n * - 'inclusive': Prices shown including tax (TTC / inc-VAT). Tax is embedded.\n * Common for consumer-facing. Shows \"€49/mo TTC\" and tax is extracted at checkout.\n *\n * DECLARATIVE ONLY: nothing reads this value. It is not an application-wide default that\n * `product.taxDisplayMode` and `price.taxBehavior` override, because there is no resolution\n * chain between the three. What reaches the billing provider is each price's own\n * `taxBehavior`, and only that.\n */\n defaultDisplayMode: z.enum(TaxDisplayMode).default(TaxDisplayMode.EXCLUSIVE),\n }).default(() => ({\n calculationMode: TaxCalculationMode.DISABLED,\n defaultDisplayMode: TaxDisplayMode.EXCLUSIVE,\n })),\n\n /**\n * Which scopes can have billing accounts (default: ORGANIZATIONS only).\n * Can be extended to include USER_SELF (personal billing).\n */\n enabledScopes: z.array(z.enum(ResourcePrimaryScope)).default([ResourcePrimaryScope.ORGANIZATIONS]),\n\n /**\n * Promotions configuration.\n * Controls whether the promotions subsystem is active.\n */\n promotions: z.object({\n /**\n * DECLARATION-ONLY (#408, 2026-09-08), and the sharpest of them: the promotions subsystem runs\n * UNCONDITIONALLY. Promotion codes are applied at `billing-account.mutations` and resolved in\n * `billing-state`, neither of which consults this flag — so setting it `false` disables\n * nothing, which is a stronger statement than \"is not read\".\n */\n enabled: z.boolean().default(true),\n }).default(() => ({\n enabled: true,\n })),\n\n /**\n * Credit pool configuration.\n * Controls whether credit pools are enabled and defines default pool behavior.\n */\n creditPools: z.object({\n /**\n * DECLARATION-ONLY (#408, 2026-09-08) — same shape as `promotions.enabled` above, and the same\n * correction: credit pools run unconditionally in `billing-state`, so `false` disables nothing.\n */\n enabled: z.boolean().default(true),\n /** Default initial balance for auto-created pools (default 0) */\n defaultInitialBalance: z.number().min(0).default(0),\n }).default(() => ({\n enabled: true,\n defaultInitialBalance: 0,\n })),\n\n /** Global billing policy defaults (overridden by ProductBehaviorPolicy per product) */\n defaultBehaviorPolicy: z.object({\n /** Default trial days for new subscriptions (0 = no trial) */\n defaultTrialDays: z.number().min(0).default(0),\n /**\n * DECLARATION-ONLY (#408, 2026-09-08). Dunning — how long to wait and how often to retry after a\n * failed payment — is configured at the PROVIDER, on its own schedule, and nothing here reaches\n * it. Binding them would mean writing a provider's retry settings from application config, which\n * is a different feature from reading a policy at a call site.\n */\n paymentGracePeriodDays: z.number().min(0).default(3),\n /** DECLARATION-ONLY — see `paymentGracePeriodDays`. */\n maxPaymentRetries: z.number().min(0).default(3),\n /** Default proration when no product-specific policy. READ by the change-plan path. */\n defaultProration: z.enum(ProrationBehavior).default(ProrationBehavior.CREATE_PRORATIONS),\n /**\n * Default cancellation timing when neither the caller nor the plan product names one.\n *\n * READ since 2026-09-08 (#408). It was dead until then, and it is bound rather than relabelled\n * because — unlike its neighbours above — it needs no provider call at all: cancellation timing\n * is resolved locally, so the only thing standing between this key and meaning something was a\n * reader. The chain is caller → product `behaviorPolicy.cancellation.defaultBehavior` → this →\n * period-end.\n */\n defaultCancellation: z.enum(BillingTiming).default(BillingTiming.AT_PERIOD_END),\n }).default(() => ({\n defaultTrialDays: 0,\n paymentGracePeriodDays: 3,\n maxPaymentRetries: 3,\n defaultProration: ProrationBehavior.CREATE_PRORATIONS,\n defaultCancellation: BillingTiming.AT_PERIOD_END,\n })),\n});\nexport type BillingConfiguration = z.infer<typeof BillingConfigurationSchema>;\n"]}
|
|
1
|
+
{"version":3,"file":"billing-configuration.shared.schemas.js","sourceRoot":"","sources":["../../../src/billing/billing-configuration.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,iBAAiB,EACjB,aAAa,GACd,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAE9F,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,sDAAsD;IACtD,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IACnC,qDAAqD;IACrD,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAElC;;;;;;;;;;;OAWG;IAEH;;;;;OAKG;IACH,eAAe,EAAE,cAAc,CAAC,OAAO,CAAC,KAAK,CAAC;IAC9C,gDAAgD;IAChD,mBAAmB,EAAE,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AO,CAAC,iBAAiB,CAAC,iBAAiB,CAAC;QACxF;;;;;;;;WAQG;QACH,mBAAmB,EAAE,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,aAAa,CAAC;KAChF,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;QAChB,gBAAgB,EAAE,CAAC;QACnB,sBAAsB,EAAE,CAAC;QACzB,iBAAiB,EAAE,CAAC;QACpB,gBAAgB,EAAE,iBAAiB,CAAC,iBAAiB;QACrD,mBAAmB,EAAE,aAAa,CAAC,aAAa;KACjD,CAAC,CAAC;CACJ,CAAC,CAAC","sourcesContent":["/**\n * Billing Configuration Schema (Shared)\n *\n * Top-level billing configuration that custom apps provide at startup.\n * Controls: provider selection, currency, tax policy, enabled scopes,\n * and default behavior policies.\n *\n * @see billing-and-features-system.md §6.7 (Billing Configuration)\n */\n\nimport { z } from 'zod';\nimport { CurrencySchema } from '@wildo-ai/zod-decorators';\nimport { ResourcePrimaryScope } from '../resources/resources.shared.schemas';\nimport {\n TaxCalculationMode,\n TaxDisplayMode,\n ProrationBehavior,\n BillingTiming,\n} from './billing-enums.shared.schemas';\nimport { ReferredRewardSchema, ReferrerRewardSchema } from './referral-reward.shared.schemas';\n\nexport const BillingConfigurationSchema = z.object({\n /** Master switch: is billing enabled for this app? */\n enabled: z.boolean().default(false),\n /** Which billing provider to use (e.g., 'stripe') */\n providerRef: z.string().optional(),\n\n /*\n * NO `webhooks` block. `path` and `signingSecretRef` were declared here and read by NOTHING —\n * `signingSecretRef` had zero references outside its own declaration — and they were removed on\n * 2026-09-08 (#408) rather than relabelled, because unlike the commercial-intent keys below they\n * were not even an input to anything.\n *\n * The route and the signing secret both come from the provider module's `WEBHOOK_ORIGINATOR`\n * contract: `buildWebhookEndpoints` mounts it at `/api/v1/webhooks/<provider>/billing`. That is\n * the single authority, and `webhook-auto-controller.backend.service.ts` already recorded the\n * same conclusion when endpoint-level path/secret extras were dropped as dead in the 2026-05-06\n * reshape. This block was the copy that survived that sweep.\n */\n\n /**\n * DECLARATION-ONLY (#408, 2026-09-08). Read by the application-creation commercial-model brief and\n * by no runtime billing path: nothing validates a product's currency against these, and what\n * reaches the provider is each price's own `currency`. Authoring them records the commercial\n * intent a reviewer reads; it enforces nothing.\n */\n defaultCurrency: CurrencySchema.default('USD'),\n /** DECLARATION-ONLY — see `defaultCurrency`. */\n supportedCurrencies: z.array(CurrencySchema).default(['USD']),\n\n /**\n * Tax configuration — calculation is ALWAYS delegated to provider (Stripe Tax, etc.).\n * We never calculate tax locally.\n */\n tax: z.object({\n /**\n * Whether the PROVIDER computes tax on a purchase. READ since 2026-09-08 (#408): the checkout\n * path — the only production purchase route — sends `automaticTax` from this value.\n *\n * It reached nothing before that, so `PROVIDER_MANAGED` changed no behaviour and the provider\n * account's own configuration silently decided. Enabling it changes invoice totals and the tax\n * amounts persisted against them, which is why it is a decision an application makes rather\n * than a default the framework picks.\n */\n calculationMode: z.enum(TaxCalculationMode).default(TaxCalculationMode.DISABLED),\n\n /**\n * How prices are DISPLAYED to users (does not affect provider calculation).\n * - 'exclusive': Prices shown excluding tax (HT / ex-VAT). Tax added at checkout.\n * Common for B2B. Shows \"$49/mo\" and tax is added separately.\n * - 'inclusive': Prices shown including tax (TTC / inc-VAT). Tax is embedded.\n * Common for consumer-facing. Shows \"€49/mo TTC\" and tax is extracted at checkout.\n *\n * DECLARATIVE ONLY: nothing reads this value. It is not an application-wide default that\n * `product.taxDisplayMode` and `price.taxBehavior` override, because there is no resolution\n * chain between the three. What reaches the billing provider is each price's own\n * `taxBehavior`, and only that.\n */\n defaultDisplayMode: z.enum(TaxDisplayMode).default(TaxDisplayMode.EXCLUSIVE),\n }).default(() => ({\n calculationMode: TaxCalculationMode.DISABLED,\n defaultDisplayMode: TaxDisplayMode.EXCLUSIVE,\n })),\n\n /**\n * Which scopes can have billing accounts (default: ORGANIZATIONS only).\n * Can be extended to include USER_SELF (personal billing).\n */\n enabledScopes: z.array(z.enum(ResourcePrimaryScope)).default([ResourcePrimaryScope.ORGANIZATIONS]),\n\n /**\n * Promotions configuration.\n * Controls whether the promotions subsystem is active.\n */\n promotions: z.object({\n /**\n * DECLARATION-ONLY (#408, 2026-09-08), and the sharpest of them: the promotions subsystem runs\n * UNCONDITIONALLY. Promotion codes are applied at `billing-account.mutations` and resolved in\n * `billing-state`, neither of which consults this flag — so setting it `false` disables\n * nothing, which is a stronger statement than \"is not read\".\n */\n enabled: z.boolean().default(true),\n }).default(() => ({\n enabled: true,\n })),\n\n /**\n * Credit pool configuration.\n * Controls whether credit pools are enabled and defines default pool behavior.\n */\n creditPools: z.object({\n /**\n * DECLARATION-ONLY (#408, 2026-09-08) — same shape as `promotions.enabled` above, and the same\n * correction: credit pools run unconditionally in `billing-state`, so `false` disables nothing.\n */\n enabled: z.boolean().default(true),\n /** Default initial balance for auto-created pools (default 0) */\n defaultInitialBalance: z.number().min(0).default(0),\n }).default(() => ({\n enabled: true,\n defaultInitialBalance: 0,\n })),\n\n /** @wildo_source:part:start saas.models.billing.referral-program facet:layer:shared facet:audience:app-developer */\n /**\n * The referral program (#1802): whether organizations may issue referral codes, and what each side\n * receives when a referral converts (the referred account's first paid invoice).\n *\n * The rewards are copied onto each referral when its code is issued, so changing them here affects\n * codes issued afterwards and never re-prices a referral already made. A reward's `featureKey` must\n * name a registered boolean feature; startup WARNS about one that does not, like every other feature\n * reference, and a feature nobody registered grants nothing.\n */\n referrals: z.object({\n /** Off by default: issuing codes that promise rewards is a commercial decision the application makes. */\n enabled: z.boolean().default(false).describe('Whether organizations may issue referral codes. Redeeming and converting codes already issued keeps working when this is turned off.'),\n referrerReward: ReferrerRewardSchema.optional().describe('What the referrer receives when a referral converts. Absent means nothing.'),\n referredReward: ReferredRewardSchema.optional().describe('What the referred account receives. Absent means nothing.'),\n codeValidityDays: z.number().int().min(1).default(30).describe('How many days a referral code can be redeemed after it is issued. Defaults to 30.'),\n }).default(() => ({ enabled: false, codeValidityDays: 30 })),\n /** @wildo_source:part:end saas.models.billing.referral-program */\n\n /** Global billing policy defaults (overridden by ProductBehaviorPolicy per product) */\n defaultBehaviorPolicy: z.object({\n /** Default trial days for new subscriptions (0 = no trial) */\n defaultTrialDays: z.number().min(0).default(0),\n /**\n * DECLARATION-ONLY (#408, 2026-09-08). Dunning — how long to wait and how often to retry after a\n * failed payment — is configured at the PROVIDER, on its own schedule, and nothing here reaches\n * it. Binding them would mean writing a provider's retry settings from application config, which\n * is a different feature from reading a policy at a call site.\n */\n paymentGracePeriodDays: z.number().min(0).default(3),\n /** DECLARATION-ONLY — see `paymentGracePeriodDays`. */\n maxPaymentRetries: z.number().min(0).default(3),\n /** Default proration when no product-specific policy. READ by the change-plan path. */\n defaultProration: z.enum(ProrationBehavior).default(ProrationBehavior.CREATE_PRORATIONS),\n /**\n * Default cancellation timing when neither the caller nor the plan product names one.\n *\n * READ since 2026-09-08 (#408). It was dead until then, and it is bound rather than relabelled\n * because — unlike its neighbours above — it needs no provider call at all: cancellation timing\n * is resolved locally, so the only thing standing between this key and meaning something was a\n * reader. The chain is caller → product `behaviorPolicy.cancellation.defaultBehavior` → this →\n * period-end.\n */\n defaultCancellation: z.enum(BillingTiming).default(BillingTiming.AT_PERIOD_END),\n }).default(() => ({\n defaultTrialDays: 0,\n paymentGracePeriodDays: 3,\n maxPaymentRetries: 3,\n defaultProration: ProrationBehavior.CREATE_PRORATIONS,\n defaultCancellation: BillingTiming.AT_PERIOD_END,\n })),\n});\nexport type BillingConfiguration = z.infer<typeof BillingConfigurationSchema>;\n"]}
|