@noodleseed/one 0.46.0 → 0.48.0
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/commands/assistant-ops.d.ts.map +1 -1
- package/dist/commands/assistant-ops.js +65 -1
- package/dist/commands/assistant-ops.js.map +1 -1
- package/dist/commands/auth-ops.d.ts.map +1 -1
- package/dist/commands/auth-ops.js +28 -4
- package/dist/commands/auth-ops.js.map +1 -1
- package/dist/commands/billing-enforcement-ops.d.ts +2 -0
- package/dist/commands/billing-enforcement-ops.d.ts.map +1 -0
- package/dist/commands/billing-enforcement-ops.js +312 -0
- package/dist/commands/billing-enforcement-ops.js.map +1 -0
- package/dist/commands/billing-metering-ops.d.ts +2 -0
- package/dist/commands/billing-metering-ops.d.ts.map +1 -0
- package/dist/commands/billing-metering-ops.js +128 -0
- package/dist/commands/billing-metering-ops.js.map +1 -0
- package/dist/commands/billing-metering-validation-ops.d.ts +2 -0
- package/dist/commands/billing-metering-validation-ops.d.ts.map +1 -0
- package/dist/commands/billing-metering-validation-ops.js +186 -0
- package/dist/commands/billing-metering-validation-ops.js.map +1 -0
- package/dist/commands/billing-ops.d.ts.map +1 -1
- package/dist/commands/billing-ops.js +6 -0
- package/dist/commands/billing-ops.js.map +1 -1
- package/dist/commands/catalog-data-resources.d.ts.map +1 -1
- package/dist/commands/catalog-data-resources.js +25 -4
- package/dist/commands/catalog-data-resources.js.map +1 -1
- package/dist/commands/catalog-render.d.ts.map +1 -1
- package/dist/commands/catalog-render.js +7 -5
- package/dist/commands/catalog-render.js.map +1 -1
- package/dist/commands/deploy-ops.d.ts.map +1 -1
- package/dist/commands/deploy-ops.js +10 -1
- package/dist/commands/deploy-ops.js.map +1 -1
- package/dist/commands/deploy-output.d.ts.map +1 -1
- package/dist/commands/deploy-output.js +4 -0
- package/dist/commands/deploy-output.js.map +1 -1
- package/dist/commands/deploy-version-resolution.d.ts +1 -0
- package/dist/commands/deploy-version-resolution.d.ts.map +1 -1
- package/dist/commands/deploy-version-resolution.js +8 -0
- package/dist/commands/deploy-version-resolution.js.map +1 -1
- package/dist/commands/mcp-apps-chatgpt.d.ts +7 -0
- package/dist/commands/mcp-apps-chatgpt.d.ts.map +1 -0
- package/dist/commands/mcp-apps-chatgpt.js +143 -0
- package/dist/commands/mcp-apps-chatgpt.js.map +1 -0
- package/dist/commands/mcp-apps.d.ts.map +1 -1
- package/dist/commands/mcp-apps.js +2 -114
- package/dist/commands/mcp-apps.js.map +1 -1
- package/dist/deploy-payload-size.d.ts +3 -0
- package/dist/deploy-payload-size.d.ts.map +1 -0
- package/dist/deploy-payload-size.js +29 -0
- package/dist/deploy-payload-size.js.map +1 -0
- package/dist/deploy.d.ts.map +1 -1
- package/dist/deploy.js +19 -8
- package/dist/deploy.js.map +1 -1
- package/dist/sdk-version-skew.d.ts +3 -0
- package/dist/sdk-version-skew.d.ts.map +1 -0
- package/dist/sdk-version-skew.js +34 -0
- package/dist/sdk-version-skew.js.map +1 -0
- package/node_modules/@noodle-borg/agent-kit/dist/generated/example-files.js +3 -3
- package/node_modules/@noodle-borg/agent-kit/dist/generated/example-files.js.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/skill-authoring-refs.js +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/skill-authoring-refs.js.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/skill-content.js +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/skill-content.js.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/skill-embedded-assistant-ref.d.ts.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/skill-embedded-assistant-ref.js +10 -2
- package/node_modules/@noodle-borg/agent-kit/dist/skill-embedded-assistant-ref.js.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/package.json +1 -1
- package/node_modules/@noodle-borg/authoring/dist/server.d.ts +5 -0
- package/node_modules/@noodle-borg/authoring/dist/server.d.ts.map +1 -1
- package/node_modules/@noodle-borg/authoring/dist/server.js +1 -0
- package/node_modules/@noodle-borg/authoring/dist/server.js.map +1 -1
- package/node_modules/@noodle-borg/compiler/dist/artifact/types.d.ts +7 -1
- package/node_modules/@noodle-borg/compiler/dist/artifact/types.d.ts.map +1 -1
- package/node_modules/@noodle-borg/compiler/dist/artifact/types.js +4 -1
- package/node_modules/@noodle-borg/compiler/dist/artifact/types.js.map +1 -1
- package/node_modules/@noodle-borg/compiler/dist/compile.d.ts.map +1 -1
- package/node_modules/@noodle-borg/compiler/dist/compile.js +3 -0
- package/node_modules/@noodle-borg/compiler/dist/compile.js.map +1 -1
- package/node_modules/@noodle-borg/compiler/dist/manifest/schema.d.ts +12 -0
- package/node_modules/@noodle-borg/compiler/dist/manifest/schema.d.ts.map +1 -1
- package/node_modules/@noodle-borg/compiler/dist/manifest/schema.js +7 -0
- package/node_modules/@noodle-borg/compiler/dist/manifest/schema.js.map +1 -1
- package/node_modules/@noodle-borg/protocol/dist/mapping.d.ts.map +1 -1
- package/node_modules/@noodle-borg/protocol/dist/mapping.js +40 -1
- package/node_modules/@noodle-borg/protocol/dist/mapping.js.map +1 -1
- package/node_modules/@noodle-borg/protocol/dist/sdk-server.d.ts.map +1 -1
- package/node_modules/@noodle-borg/protocol/dist/sdk-server.js +109 -1
- package/node_modules/@noodle-borg/protocol/dist/sdk-server.js.map +1 -1
- package/node_modules/@noodle-borg/protocol/dist/tool-interaction.d.ts +10 -3
- package/node_modules/@noodle-borg/protocol/dist/tool-interaction.d.ts.map +1 -1
- package/node_modules/@noodle-borg/protocol/dist/tool-interaction.js +69 -5
- package/node_modules/@noodle-borg/protocol/dist/tool-interaction.js.map +1 -1
- package/node_modules/@noodle-borg/protocol/dist/widget/action-wiring-bootstrap.d.ts +3 -0
- package/node_modules/@noodle-borg/protocol/dist/widget/action-wiring-bootstrap.d.ts.map +1 -0
- package/node_modules/@noodle-borg/protocol/dist/widget/action-wiring-bootstrap.js +17 -0
- package/node_modules/@noodle-borg/protocol/dist/widget/action-wiring-bootstrap.js.map +1 -0
- package/node_modules/@noodle-borg/protocol/dist/widget/bootstrap.d.ts.map +1 -1
- package/node_modules/@noodle-borg/protocol/dist/widget/bootstrap.js +8 -16
- package/node_modules/@noodle-borg/protocol/dist/widget/bootstrap.js.map +1 -1
- package/node_modules/@noodle-borg/protocol/dist/widget/interaction-bootstrap.d.ts +3 -0
- package/node_modules/@noodle-borg/protocol/dist/widget/interaction-bootstrap.d.ts.map +1 -0
- package/node_modules/@noodle-borg/protocol/dist/widget/interaction-bootstrap.js +177 -0
- package/node_modules/@noodle-borg/protocol/dist/widget/interaction-bootstrap.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/enforcement-profile.d.ts +96 -0
- package/node_modules/@noodle-borg/service/dist/billing/enforcement-profile.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/enforcement-profile.js +198 -0
- package/node_modules/@noodle-borg/service/dist/billing/enforcement-profile.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/integration.d.ts +25 -2
- package/node_modules/@noodle-borg/service/dist/billing/integration.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/integration.js +51 -5
- package/node_modules/@noodle-borg/service/dist/billing/integration.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/meter-capacity.d.ts +77 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-capacity.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-capacity.js +202 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-capacity.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-live-validation-contract.d.ts +8 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-live-validation-contract.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-live-validation-contract.js +93 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-live-validation-contract.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-live-validation.d.ts +76 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-live-validation.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-live-validation.js +233 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-live-validation.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-readiness-health.d.ts +89 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-readiness-health.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-readiness-health.js +191 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-readiness-health.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-readiness.d.ts +99 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-readiness.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-readiness.js +136 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-readiness.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-runtime-config.d.ts +9 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-runtime-config.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-runtime-config.js +24 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-runtime-config.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-validation-epoch.d.ts +75 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-validation-epoch.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-validation-epoch.js +127 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-validation-epoch.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-profile-schema.d.ts +4 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-profile-schema.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-profile-schema.js +107 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-profile-schema.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-profile.d.ts +18 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-profile.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-profile.js +341 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-profile.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-clock.d.ts +3 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-clock.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-clock.js +9 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-clock.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-epoch-fixtures.d.ts +13 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-epoch-fixtures.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-epoch-fixtures.js +102 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-epoch-fixtures.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-epochs.d.ts +41 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-epochs.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-epochs.js +289 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-epochs.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-evidence-retention.d.ts +16 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-evidence-retention.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-evidence-retention.js +126 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-evidence-retention.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-live-validation.d.ts +33 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-live-validation.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-live-validation.js +436 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-live-validation.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-maintenance.d.ts +26 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-maintenance.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-maintenance.js +146 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-maintenance.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-partition.d.ts +8 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-partition.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-partition.js +42 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-partition.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-prepare-preflight.d.ts +8 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-prepare-preflight.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-prepare-preflight.js +44 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-prepare-preflight.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-readiness-live.d.ts +13 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-readiness-live.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-readiness-live.js +189 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-readiness-live.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-readiness.d.ts +18 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-readiness.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-readiness.js +342 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-readiness.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-reconciliation.d.ts +27 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-reconciliation.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-reconciliation.js +304 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-reconciliation.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-retention.d.ts +22 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-retention.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-retention.js +224 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-retention.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-runtime.d.ts +33 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-runtime.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-runtime.js +173 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-runtime.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-scheduler-schema.d.ts +7 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-scheduler-schema.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-scheduler-schema.js +50 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-scheduler-schema.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-scheduler-store.d.ts +34 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-scheduler-store.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-scheduler-store.js +157 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-scheduler-store.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-scheduler.d.ts +56 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-scheduler.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-scheduler.js +264 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-scheduler.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-schema.d.ts +6 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-schema.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-schema.js +414 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-schema.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-validation.d.ts +43 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-validation.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-validation.js +321 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-validation.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-window-lock.d.ts +10 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-window-lock.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-window-lock.js +13 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-window-lock.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-window-schema.d.ts +6 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-window-schema.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-window-schema.js +248 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-window-schema.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-writer-compaction.d.ts +29 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-writer-compaction.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-writer-compaction.js +240 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-writer-compaction.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-writer-health-schema.d.ts +4 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-writer-health-schema.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-writer-health-schema.js +140 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-writer-health-schema.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-migration.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/postgres-migration.js +4 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-migration.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/postgres-schema.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/postgres-schema.js +6 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-schema.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/postgres.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/postgres.js +3 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/service-meter-runtime.d.ts +7 -0
- package/node_modules/@noodle-borg/service/dist/billing/service-meter-runtime.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/service-meter-runtime.js +19 -0
- package/node_modules/@noodle-borg/service/dist/billing/service-meter-runtime.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/shadow-meter.d.ts +9 -4
- package/node_modules/@noodle-borg/service/dist/billing/shadow-meter.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/shadow-meter.js +34 -95
- package/node_modules/@noodle-borg/service/dist/billing/shadow-meter.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/usage-identity.d.ts +14 -0
- package/node_modules/@noodle-borg/service/dist/billing/usage-identity.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/usage-identity.js +87 -0
- package/node_modules/@noodle-borg/service/dist/billing/usage-identity.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/usage-observer.d.ts +6 -0
- package/node_modules/@noodle-borg/service/dist/billing/usage-observer.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/usage-observer.js +26 -0
- package/node_modules/@noodle-borg/service/dist/billing/usage-observer.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing-public.d.ts +16 -0
- package/node_modules/@noodle-borg/service/dist/billing-public.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing-public.js +15 -0
- package/node_modules/@noodle-borg/service/dist/billing-public.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/customer-verifier.d.ts +1 -0
- package/node_modules/@noodle-borg/service/dist/customer-verifier.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/customer-verifier.js +15 -0
- package/node_modules/@noodle-borg/service/dist/customer-verifier.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/http-util.d.ts +13 -0
- package/node_modules/@noodle-borg/service/dist/http-util.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/http-util.js +42 -2
- package/node_modules/@noodle-borg/service/dist/http-util.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/index.d.ts +2 -7
- package/node_modules/@noodle-borg/service/dist/index.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/index.js +1 -6
- package/node_modules/@noodle-borg/service/dist/index.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/main.js +3 -0
- package/node_modules/@noodle-borg/service/dist/main.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/options.d.ts +18 -0
- package/node_modules/@noodle-borg/service/dist/options.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/persistence-options.d.ts +4 -0
- package/node_modules/@noodle-borg/service/dist/persistence-options.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/persistence-options.js +22 -0
- package/node_modules/@noodle-borg/service/dist/persistence-options.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/assistant-dispatch.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/assistant-dispatch.js +10 -1
- package/node_modules/@noodle-borg/service/dist/routes/assistant-dispatch.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/assistant.d.ts +2 -0
- package/node_modules/@noodle-borg/service/dist/routes/assistant.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/assistant.js +85 -0
- package/node_modules/@noodle-borg/service/dist/routes/assistant.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/billing-enforcement-cohort.d.ts +17 -0
- package/node_modules/@noodle-borg/service/dist/routes/billing-enforcement-cohort.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/billing-enforcement-cohort.js +145 -0
- package/node_modules/@noodle-borg/service/dist/routes/billing-enforcement-cohort.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/billing-meter-readiness.d.ts +15 -0
- package/node_modules/@noodle-borg/service/dist/routes/billing-meter-readiness.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/billing-meter-readiness.js +78 -0
- package/node_modules/@noodle-borg/service/dist/routes/billing-meter-readiness.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/billing-meter-validation.d.ts +15 -0
- package/node_modules/@noodle-borg/service/dist/routes/billing-meter-validation.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/billing-meter-validation.js +108 -0
- package/node_modules/@noodle-borg/service/dist/routes/billing-meter-validation.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/commercial-dispatch.d.ts +6 -0
- package/node_modules/@noodle-borg/service/dist/routes/commercial-dispatch.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/commercial-dispatch.js +99 -0
- package/node_modules/@noodle-borg/service/dist/routes/commercial-dispatch.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/commercial-service-deps.d.ts +25 -0
- package/node_modules/@noodle-borg/service/dist/routes/commercial-service-deps.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/commercial-service-deps.js +35 -0
- package/node_modules/@noodle-borg/service/dist/routes/commercial-service-deps.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/control-plane.js +3 -3
- package/node_modules/@noodle-borg/service/dist/routes/control-plane.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/serve-options.d.ts +93 -0
- package/node_modules/@noodle-borg/service/dist/serve-options.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/serve-options.js +2 -0
- package/node_modules/@noodle-borg/service/dist/serve-options.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/serve.d.ts +2 -92
- package/node_modules/@noodle-borg/service/dist/serve.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/serve.js +64 -59
- package/node_modules/@noodle-borg/service/dist/serve.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/service-resource-cleanup.d.ts +22 -0
- package/node_modules/@noodle-borg/service/dist/service-resource-cleanup.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/service-resource-cleanup.js +51 -0
- package/node_modules/@noodle-borg/service/dist/service-resource-cleanup.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/service.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/service.js +10 -21
- package/node_modules/@noodle-borg/service/dist/service.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/cloudsql-pool.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/cloudsql-pool.js +7 -1
- package/node_modules/@noodle-borg/service/dist/store/cloudsql-pool.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-billing.d.ts +6 -2
- package/node_modules/@noodle-borg/service/dist/store/postgres-billing.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-billing.js +11 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-billing.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
import { noopLogger } from '@noodle-borg/transport-http';
|
|
2
|
+
import { runBillingMeterMaintenanceOnClient } from './postgres-meter-maintenance.js';
|
|
3
|
+
import { BillingMeterConnectionUnsafeError, reconcileBillingMeterWindowOnClient, } from './postgres-meter-reconciliation.js';
|
|
4
|
+
import { completeBillingMeterSchedulerRun, configureBillingMeterSchedulerSession, discoverBillingMeterSchedulerWindows, startBillingMeterSchedulerRun, } from './postgres-meter-scheduler-store.js';
|
|
5
|
+
export { ensureBillingMeterSchedulerSchema } from './postgres-meter-scheduler-schema.js';
|
|
6
|
+
export { BILLING_METER_SCHEDULER_CONTRACT_VERSION, } from './postgres-meter-scheduler-store.js';
|
|
7
|
+
export const BILLING_METER_SCHEDULER_LOCK_KEY = 'billing-meter-maintenance-scheduler:v1';
|
|
8
|
+
export const BILLING_METER_SCHEDULER_INTERVAL_MS = 5 * 60 * 1_000;
|
|
9
|
+
export const BILLING_METER_SCHEDULER_MAX_WINDOWS_PER_CYCLE = 100;
|
|
10
|
+
export const BILLING_METER_SCHEDULER_STATEMENT_TIMEOUT_MS = 30_000;
|
|
11
|
+
export const BILLING_METER_SCHEDULER_LOCK_TIMEOUT_MS = 5_000;
|
|
12
|
+
export const BILLING_METER_SCHEDULER_CYCLE_TIMEOUT_MS = 4 * 60 * 1_000;
|
|
13
|
+
const DEFAULT_OPERATIONS = {
|
|
14
|
+
reconcileWindow: (client, window) => reconcileBillingMeterWindowOnClient(client, window),
|
|
15
|
+
runMaintenance: (client) => runBillingMeterMaintenanceOnClient(client),
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* One scheduler may run in every stateless service instance. Local recursion prevents overlap in
|
|
19
|
+
* one process; the session advisory lock elects one leader across the fleet for the complete cycle.
|
|
20
|
+
* Validation remains fail-open and this class never activates an epoch or changes admission.
|
|
21
|
+
*/
|
|
22
|
+
export class PostgresBillingMeterScheduler {
|
|
23
|
+
#pool;
|
|
24
|
+
#releaseSha;
|
|
25
|
+
#intervalMs;
|
|
26
|
+
#maxWindowsPerCycle;
|
|
27
|
+
#statementTimeoutMs;
|
|
28
|
+
#lockTimeoutMs;
|
|
29
|
+
#cycleTimeoutMs;
|
|
30
|
+
#logger;
|
|
31
|
+
#operations;
|
|
32
|
+
#started = false;
|
|
33
|
+
#timer;
|
|
34
|
+
#cycleInFlight;
|
|
35
|
+
constructor(pool, options) {
|
|
36
|
+
this.#pool = pool;
|
|
37
|
+
this.#releaseSha = validateReleaseSha(options.releaseSha);
|
|
38
|
+
if (options.cpuAlwaysAllocated !== true) {
|
|
39
|
+
throw new Error('billing meter scheduler requires CPU to be always allocated');
|
|
40
|
+
}
|
|
41
|
+
this.#intervalMs = validatePositiveBoundedInteger('billing meter scheduler interval', options.intervalMs ?? BILLING_METER_SCHEDULER_INTERVAL_MS);
|
|
42
|
+
this.#maxWindowsPerCycle = validatePositiveBoundedInteger('billing meter scheduler window limit', options.maxWindowsPerCycle ?? BILLING_METER_SCHEDULER_MAX_WINDOWS_PER_CYCLE);
|
|
43
|
+
this.#statementTimeoutMs = validatePositiveBoundedInteger('billing meter scheduler statement timeout', options.statementTimeoutMs ?? BILLING_METER_SCHEDULER_STATEMENT_TIMEOUT_MS);
|
|
44
|
+
this.#lockTimeoutMs = validatePositiveBoundedInteger('billing meter scheduler lock timeout', options.lockTimeoutMs ?? BILLING_METER_SCHEDULER_LOCK_TIMEOUT_MS);
|
|
45
|
+
this.#cycleTimeoutMs = validatePositiveBoundedInteger('billing meter scheduler cycle timeout', options.cycleTimeoutMs ?? BILLING_METER_SCHEDULER_CYCLE_TIMEOUT_MS);
|
|
46
|
+
this.#logger = options.logger ?? noopLogger;
|
|
47
|
+
this.#operations = options.operations ?? DEFAULT_OPERATIONS;
|
|
48
|
+
}
|
|
49
|
+
/** Start one immediate cycle, followed by a recursive delay measured after each completion. */
|
|
50
|
+
start() {
|
|
51
|
+
if (this.#started)
|
|
52
|
+
return;
|
|
53
|
+
this.#started = true;
|
|
54
|
+
void this.#runScheduledCycle();
|
|
55
|
+
}
|
|
56
|
+
/** Stop future recursion and wait for the current bounded cycle to release its database client. */
|
|
57
|
+
async stop() {
|
|
58
|
+
this.#started = false;
|
|
59
|
+
if (this.#timer !== undefined) {
|
|
60
|
+
clearTimeout(this.#timer);
|
|
61
|
+
this.#timer = undefined;
|
|
62
|
+
}
|
|
63
|
+
await this.#cycleInFlight?.catch(() => undefined);
|
|
64
|
+
}
|
|
65
|
+
/** Run now, or join the already-running local cycle rather than overlapping it. */
|
|
66
|
+
runNow() {
|
|
67
|
+
if (this.#cycleInFlight !== undefined)
|
|
68
|
+
return this.#cycleInFlight;
|
|
69
|
+
const cycle = this.#runCycle();
|
|
70
|
+
this.#cycleInFlight = cycle;
|
|
71
|
+
const clear = () => {
|
|
72
|
+
if (this.#cycleInFlight === cycle)
|
|
73
|
+
this.#cycleInFlight = undefined;
|
|
74
|
+
};
|
|
75
|
+
void cycle.then(clear, clear);
|
|
76
|
+
return cycle;
|
|
77
|
+
}
|
|
78
|
+
async #runScheduledCycle() {
|
|
79
|
+
try {
|
|
80
|
+
await this.runNow();
|
|
81
|
+
}
|
|
82
|
+
catch (error) {
|
|
83
|
+
this.#logger.warn('billing.meter.scheduler.cycle_failed', {
|
|
84
|
+
errorKind: error instanceof Error ? error.name : 'unknown',
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
finally {
|
|
88
|
+
if (this.#started) {
|
|
89
|
+
this.#timer = setTimeout(() => {
|
|
90
|
+
this.#timer = undefined;
|
|
91
|
+
void this.#runScheduledCycle();
|
|
92
|
+
}, this.#intervalMs);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
async #runCycle() {
|
|
97
|
+
const client = await this.#pool.connect();
|
|
98
|
+
let lockHeld = false;
|
|
99
|
+
let clientReusable = true;
|
|
100
|
+
let clientReleasedByDeadline = false;
|
|
101
|
+
try {
|
|
102
|
+
await configureBillingMeterSchedulerSession(client, this.#statementTimeoutMs, this.#lockTimeoutMs);
|
|
103
|
+
const leader = await client.query(`SELECT pg_try_advisory_lock(
|
|
104
|
+
hashtextextended(
|
|
105
|
+
$1 || ':' || 'billing_meter_scheduler_runs'::regclass::oid::text,
|
|
106
|
+
0
|
|
107
|
+
)
|
|
108
|
+
) AS acquired`, [BILLING_METER_SCHEDULER_LOCK_KEY]);
|
|
109
|
+
if (leader.rows[0]?.acquired !== true) {
|
|
110
|
+
return { status: 'skipped', reason: 'lock_not_acquired' };
|
|
111
|
+
}
|
|
112
|
+
lockHeld = true;
|
|
113
|
+
try {
|
|
114
|
+
return await withCycleDeadline(client, this.#cycleTimeoutMs, () => this.#runLeaderCycle(client), () => {
|
|
115
|
+
clientReleasedByDeadline = true;
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
catch (error) {
|
|
119
|
+
if (error instanceof BillingMeterConnectionUnsafeError)
|
|
120
|
+
clientReusable = false;
|
|
121
|
+
throw error;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
finally {
|
|
125
|
+
if (lockHeld && !clientReleasedByDeadline) {
|
|
126
|
+
try {
|
|
127
|
+
const unlock = await client.query(`SELECT pg_advisory_unlock(
|
|
128
|
+
hashtextextended(
|
|
129
|
+
$1 || ':' || 'billing_meter_scheduler_runs'::regclass::oid::text,
|
|
130
|
+
0
|
|
131
|
+
)
|
|
132
|
+
) AS unlocked`, [BILLING_METER_SCHEDULER_LOCK_KEY]);
|
|
133
|
+
clientReusable = clientReusable && unlock.rows[0]?.unlocked === true;
|
|
134
|
+
}
|
|
135
|
+
catch {
|
|
136
|
+
clientReusable = false;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
if (!clientReleasedByDeadline)
|
|
140
|
+
client.release(clientReusable ? undefined : true);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
async #runLeaderCycle(client) {
|
|
144
|
+
const evidence = await startBillingMeterSchedulerRun(client, this.#releaseSha);
|
|
145
|
+
let counts = {
|
|
146
|
+
windowsDiscovered: 0,
|
|
147
|
+
windowsProcessed: 0,
|
|
148
|
+
windowsSucceeded: 0,
|
|
149
|
+
windowsFailed: 0,
|
|
150
|
+
backlogDetected: false,
|
|
151
|
+
maintenanceRunId: null,
|
|
152
|
+
};
|
|
153
|
+
try {
|
|
154
|
+
const discovered = await discoverBillingMeterSchedulerWindows(client, this.#maxWindowsPerCycle + 1);
|
|
155
|
+
const backlogDetected = discovered.length > this.#maxWindowsPerCycle;
|
|
156
|
+
const windows = discovered.slice(0, this.#maxWindowsPerCycle);
|
|
157
|
+
let windowsSucceeded = 0;
|
|
158
|
+
let windowsFailed = 0;
|
|
159
|
+
for (const window of windows) {
|
|
160
|
+
try {
|
|
161
|
+
const reconciliation = await this.#operations.reconcileWindow(client, window);
|
|
162
|
+
if (reconciliation.status === 'succeeded')
|
|
163
|
+
windowsSucceeded += 1;
|
|
164
|
+
else
|
|
165
|
+
windowsFailed += 1;
|
|
166
|
+
}
|
|
167
|
+
catch (error) {
|
|
168
|
+
if (error instanceof BillingMeterConnectionUnsafeError)
|
|
169
|
+
throw error;
|
|
170
|
+
windowsFailed += 1;
|
|
171
|
+
this.#logger.warn('billing.meter.scheduler.reconciliation_failed', {
|
|
172
|
+
runId: evidence.runId,
|
|
173
|
+
epochId: window.epochId,
|
|
174
|
+
errorKind: error instanceof Error ? error.name : 'unknown',
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
let maintenanceRunId = null;
|
|
179
|
+
let maintenanceFailed = false;
|
|
180
|
+
try {
|
|
181
|
+
maintenanceRunId = (await this.#operations.runMaintenance(client)).runId;
|
|
182
|
+
}
|
|
183
|
+
catch (error) {
|
|
184
|
+
if (error instanceof BillingMeterConnectionUnsafeError)
|
|
185
|
+
throw error;
|
|
186
|
+
maintenanceFailed = true;
|
|
187
|
+
this.#logger.warn('billing.meter.scheduler.maintenance_failed', {
|
|
188
|
+
runId: evidence.runId,
|
|
189
|
+
errorKind: error instanceof Error ? error.name : 'unknown',
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
counts = {
|
|
193
|
+
windowsDiscovered: discovered.length,
|
|
194
|
+
windowsProcessed: windows.length,
|
|
195
|
+
windowsSucceeded,
|
|
196
|
+
windowsFailed,
|
|
197
|
+
backlogDetected,
|
|
198
|
+
maintenanceRunId,
|
|
199
|
+
};
|
|
200
|
+
const failureCode = deriveFailureCode(windowsFailed, maintenanceFailed);
|
|
201
|
+
const status = failureCode !== null ? 'failed' : backlogDetected ? 'backlogged' : 'succeeded';
|
|
202
|
+
return await completeBillingMeterSchedulerRun(client, evidence, counts, status, failureCode);
|
|
203
|
+
}
|
|
204
|
+
catch (error) {
|
|
205
|
+
if (error instanceof BillingMeterConnectionUnsafeError)
|
|
206
|
+
throw error;
|
|
207
|
+
this.#logger.warn('billing.meter.scheduler.unexpected_failure', {
|
|
208
|
+
runId: evidence.runId,
|
|
209
|
+
errorKind: error instanceof Error ? error.name : 'unknown',
|
|
210
|
+
});
|
|
211
|
+
return await completeBillingMeterSchedulerRun(client, evidence, counts, 'failed', 'cycle_failed');
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
async function withCycleDeadline(client, timeoutMs, operation, onClientReleased) {
|
|
216
|
+
let timer;
|
|
217
|
+
const deadline = new Promise((_resolve, reject) => {
|
|
218
|
+
timer = setTimeout(() => {
|
|
219
|
+
onClientReleased();
|
|
220
|
+
try {
|
|
221
|
+
client.release(true);
|
|
222
|
+
}
|
|
223
|
+
finally {
|
|
224
|
+
reject(new BillingMeterSchedulerCycleTimeoutError());
|
|
225
|
+
}
|
|
226
|
+
}, timeoutMs);
|
|
227
|
+
});
|
|
228
|
+
try {
|
|
229
|
+
return await Promise.race([operation(), deadline]);
|
|
230
|
+
}
|
|
231
|
+
finally {
|
|
232
|
+
if (timer !== undefined)
|
|
233
|
+
clearTimeout(timer);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
export class BillingMeterSchedulerCycleTimeoutError extends Error {
|
|
237
|
+
constructor() {
|
|
238
|
+
super('billing meter scheduler cycle exceeded its bounded duration');
|
|
239
|
+
this.name = 'BillingMeterSchedulerCycleTimeoutError';
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
function deriveFailureCode(windowsFailed, maintenanceFailed) {
|
|
243
|
+
if (windowsFailed > 0 && maintenanceFailed) {
|
|
244
|
+
return 'reconciliation_and_maintenance_failed';
|
|
245
|
+
}
|
|
246
|
+
if (windowsFailed > 0)
|
|
247
|
+
return 'reconciliation_failed';
|
|
248
|
+
if (maintenanceFailed)
|
|
249
|
+
return 'maintenance_failed';
|
|
250
|
+
return null;
|
|
251
|
+
}
|
|
252
|
+
function validateReleaseSha(value) {
|
|
253
|
+
if (!/^[0-9a-f]{40}$/.test(value)) {
|
|
254
|
+
throw new Error('billing meter scheduler release SHA must be a full 40-character commit digest');
|
|
255
|
+
}
|
|
256
|
+
return value;
|
|
257
|
+
}
|
|
258
|
+
function validatePositiveBoundedInteger(label, value) {
|
|
259
|
+
if (!Number.isSafeInteger(value) || value < 1 || value > 2_147_483_647) {
|
|
260
|
+
throw new Error(`${label} must be a positive bounded integer`);
|
|
261
|
+
}
|
|
262
|
+
return value;
|
|
263
|
+
}
|
|
264
|
+
//# sourceMappingURL=postgres-meter-scheduler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postgres-meter-scheduler.js","sourceRoot":"","sources":["../../src/billing/postgres-meter-scheduler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAEtE,OAAO,EAAE,kCAAkC,EAAE,MAAM,iCAAiC,CAAC;AACrF,OAAO,EACL,iCAAiC,EACjC,mCAAmC,GACpC,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAKL,gCAAgC,EAChC,qCAAqC,EACrC,oCAAoC,EACpC,6BAA6B,GAC9B,MAAM,qCAAqC,CAAC;AAE7C,OAAO,EAAE,iCAAiC,EAAE,MAAM,sCAAsC,CAAC;AACzF,OAAO,EACL,wCAAwC,GAIzC,MAAM,qCAAqC,CAAC;AAE7C,MAAM,CAAC,MAAM,gCAAgC,GAAG,wCAAwC,CAAC;AACzF,MAA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Aa,GAAG,CAAC;QAAE,OAAO,uBAAuB,CAAC;IACtD,IAAI,iBAAiB;QAAE,OAAO,oBAAoB,CAAC;IACnD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,kBAAkB,CAAC,KAAa;IACvC,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QAClC,MAAM,IAAI,KAAK,CACb,+EAA+E,CAChF,CAAC;IACJ,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,8BAA8B,CAAC,KAAa,EAAE,KAAa;IAClE,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,IAAI,KAAK,GAAG,aAAa,EAAE,CAAC;QACvE,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,qCAAqC,CAAC,CAAC;IACjE,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Pool, PoolClient } from 'pg';
|
|
2
|
+
/** Additive, inactive storage for validation and readiness evidence. Never activates a meter epoch. */
|
|
3
|
+
export declare function ensureAuthoritativeMeterSchema(pool: Pool): Promise<void>;
|
|
4
|
+
export declare function ensureAuthoritativeMeterPartitions(pool: Pool | PoolClient): Promise<void>;
|
|
5
|
+
export declare function billingMeterPartitionName(month: Date): string;
|
|
6
|
+
//# sourceMappingURL=postgres-meter-schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postgres-meter-schema.d.ts","sourceRoot":"","sources":["../../src/billing/postgres-meter-schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAc3C,uGAAuG;AACvG,wBAAsB,8BAA8B,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAyY9E;AAED,wBAAsB,kCAAkC,CAAC,IAAI,EAAE,IAAI,GAAG,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAY/F;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,IAAI,GAAG,MAAM,CAK7D"}
|