@noodleseed/one 0.48.0 → 0.49.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/archive-ops.js +1 -1
- package/dist/commands/archive-ops.js.map +1 -1
- package/dist/commands/billing-admission-output.d.ts +16 -0
- package/dist/commands/billing-admission-output.d.ts.map +1 -0
- package/dist/commands/billing-admission-output.js +40 -0
- package/dist/commands/billing-admission-output.js.map +1 -0
- package/dist/commands/billing-enforcement-activation-args.d.ts +40 -0
- package/dist/commands/billing-enforcement-activation-args.d.ts.map +1 -0
- package/dist/commands/billing-enforcement-activation-args.js +125 -0
- package/dist/commands/billing-enforcement-activation-args.js.map +1 -0
- package/dist/commands/billing-enforcement-activation-files.d.ts +11 -0
- package/dist/commands/billing-enforcement-activation-files.d.ts.map +1 -0
- package/dist/commands/billing-enforcement-activation-files.js +54 -0
- package/dist/commands/billing-enforcement-activation-files.js.map +1 -0
- package/dist/commands/billing-enforcement-activation-ops.d.ts +2 -0
- package/dist/commands/billing-enforcement-activation-ops.d.ts.map +1 -0
- package/dist/commands/billing-enforcement-activation-ops.js +283 -0
- package/dist/commands/billing-enforcement-activation-ops.js.map +1 -0
- package/dist/commands/billing-enforcement-ops.d.ts.map +1 -1
- package/dist/commands/billing-enforcement-ops.js +5 -1
- package/dist/commands/billing-enforcement-ops.js.map +1 -1
- package/dist/commands/billing-read-ops.d.ts.map +1 -1
- package/dist/commands/billing-read-ops.js +15 -3
- package/dist/commands/billing-read-ops.js.map +1 -1
- package/dist/commands/billing-read-view.d.ts +40 -1
- package/dist/commands/billing-read-view.d.ts.map +1 -1
- package/dist/commands/billing-read-view.js +50 -0
- package/dist/commands/billing-read-view.js.map +1 -1
- package/dist/commands/catalog-data-resources.d.ts.map +1 -1
- package/dist/commands/catalog-data-resources.js +4 -3
- package/dist/commands/catalog-data-resources.js.map +1 -1
- package/dist/commands/deploy-ops.d.ts +1 -0
- package/dist/commands/deploy-ops.d.ts.map +1 -1
- package/dist/commands/deploy-ops.js +5 -0
- package/dist/commands/deploy-ops.js.map +1 -1
- package/dist/commands/deploy-status-ops.js +1 -1
- package/dist/commands/deploy-status-ops.js.map +1 -1
- package/dist/commands/shared.d.ts.map +1 -1
- package/dist/commands/shared.js +13 -0
- package/dist/commands/shared.js.map +1 -1
- package/dist/deploy.d.ts +1 -0
- package/dist/deploy.d.ts.map +1 -1
- package/dist/deploy.js +1 -0
- package/dist/deploy.js.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/package.json +1 -1
- package/node_modules/@noodle-borg/protocol/dist/mapping.d.ts.map +1 -1
- package/node_modules/@noodle-borg/protocol/dist/mapping.js +2 -0
- package/node_modules/@noodle-borg/protocol/dist/mapping.js.map +1 -1
- package/node_modules/@noodle-borg/runtime/dist/result.d.ts +3 -1
- package/node_modules/@noodle-borg/runtime/dist/result.d.ts.map +1 -1
- package/node_modules/@noodle-borg/runtime/dist/result.js.map +1 -1
- package/node_modules/@noodle-borg/runtime/dist/tool-dispatch.d.ts +10 -0
- package/node_modules/@noodle-borg/runtime/dist/tool-dispatch.d.ts.map +1 -1
- package/node_modules/@noodle-borg/runtime/dist/tool-dispatch.js +26 -1
- package/node_modules/@noodle-borg/runtime/dist/tool-dispatch.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/authoritative-admission.d.ts +46 -0
- package/node_modules/@noodle-borg/service/dist/billing/authoritative-admission.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/authoritative-admission.js +111 -0
- package/node_modules/@noodle-borg/service/dist/billing/authoritative-admission.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/commercial-enforcement-projection.d.ts +80 -0
- package/node_modules/@noodle-borg/service/dist/billing/commercial-enforcement-projection.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/commercial-enforcement-projection.js +2 -0
- package/node_modules/@noodle-borg/service/dist/billing/commercial-enforcement-projection.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/commercial-entitlements.d.ts +18 -0
- package/node_modules/@noodle-borg/service/dist/billing/commercial-entitlements.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/commercial-entitlements.js +51 -0
- package/node_modules/@noodle-borg/service/dist/billing/commercial-entitlements.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/enforcement-activation-support.d.ts +34 -0
- package/node_modules/@noodle-borg/service/dist/billing/enforcement-activation-support.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/enforcement-activation-support.js +125 -0
- package/node_modules/@noodle-borg/service/dist/billing/enforcement-activation-support.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/enforcement-activation.d.ts +265 -0
- package/node_modules/@noodle-borg/service/dist/billing/enforcement-activation.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/enforcement-activation.js +340 -0
- package/node_modules/@noodle-borg/service/dist/billing/enforcement-activation.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/enforcement-profile.d.ts +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/integration.d.ts +15 -3
- package/node_modules/@noodle-borg/service/dist/billing/integration.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/integration.js +56 -3
- package/node_modules/@noodle-borg/service/dist/billing/integration.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/postgres-authoritative-authority.d.ts +20 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-authoritative-authority.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-authoritative-authority.js +121 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-authoritative-authority.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-commercial-enforcement-apps.d.ts +10 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-commercial-enforcement-apps.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-commercial-enforcement-apps.js +33 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-commercial-enforcement-apps.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-commercial-enforcement-counters.d.ts +25 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-commercial-enforcement-counters.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-commercial-enforcement-counters.js +248 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-commercial-enforcement-counters.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-commercial-enforcement-projection.d.ts +17 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-commercial-enforcement-projection.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-commercial-enforcement-projection.js +278 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-commercial-enforcement-projection.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-commercial-enforcement-transaction.d.ts +7 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-commercial-enforcement-transaction.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-commercial-enforcement-transaction.js +63 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-commercial-enforcement-transaction.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-activation-locks.d.ts +6 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-activation-locks.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-activation-locks.js +89 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-activation-locks.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-activation-preflight.d.ts +13 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-activation-preflight.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-activation-preflight.js +193 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-activation-preflight.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-activation-schema.d.ts +4 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-activation-schema.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-activation-schema.js +119 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-activation-schema.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-activation-support.d.ts +65 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-activation-support.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-activation-support.js +159 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-activation-support.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-activation.d.ts +31 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-activation.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-activation.js +247 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-activation.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-profile-schema.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-profile-schema.js +40 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-profile-schema.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-profile.d.ts +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-profile.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-profile.js +45 -22
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-profile.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-admission-ledger.d.ts +33 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-admission-ledger.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-admission-ledger.js +158 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-admission-ledger.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-admission.d.ts +18 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-admission.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-admission.js +326 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-admission.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-epochs.d.ts +2 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-epochs.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-epochs.js +10 -5
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-epochs.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-live-validation.js +3 -3
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-live-validation.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-readiness.d.ts +3 -1
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-readiness.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-readiness.js +8 -2
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-readiness.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-reconciliation.js +4 -4
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-reconciliation.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-runtime.d.ts +2 -2
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-runtime.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-runtime.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-scheduler-store.js +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-schema.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-schema.js +27 -1
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-schema.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/postgres-production-app-admission.d.ts +33 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-production-app-admission.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-production-app-admission.js +272 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-production-app-admission.js.map +1 -0
- 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 +2 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-schema.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/read-contract.d.ts +174 -28
- package/node_modules/@noodle-borg/service/dist/billing/read-contract.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/read-contract.js +51 -6
- package/node_modules/@noodle-borg/service/dist/billing/read-contract.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing-public.d.ts +3 -0
- package/node_modules/@noodle-borg/service/dist/billing-public.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing-public.js +3 -0
- package/node_modules/@noodle-borg/service/dist/billing-public.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/options.d.ts +14 -2
- package/node_modules/@noodle-borg/service/dist/options.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/persistence-options.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/persistence-options.js +9 -0
- package/node_modules/@noodle-borg/service/dist/persistence-options.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/registry.d.ts +2 -0
- package/node_modules/@noodle-borg/service/dist/registry.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/registry.js +10 -0
- package/node_modules/@noodle-borg/service/dist/registry.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/archive.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/archive.js +18 -1
- package/node_modules/@noodle-borg/service/dist/routes/archive.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/billing-enforcement-activation.d.ts +15 -0
- package/node_modules/@noodle-borg/service/dist/routes/billing-enforcement-activation.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/billing-enforcement-activation.js +197 -0
- package/node_modules/@noodle-borg/service/dist/routes/billing-enforcement-activation.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/billing-production-app-response.d.ts +15 -0
- package/node_modules/@noodle-borg/service/dist/routes/billing-production-app-response.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/billing-production-app-response.js +33 -0
- package/node_modules/@noodle-borg/service/dist/routes/billing-production-app-response.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/billing-read.d.ts +2 -0
- package/node_modules/@noodle-borg/service/dist/routes/billing-read.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/billing-read.js +203 -41
- package/node_modules/@noodle-borg/service/dist/routes/billing-read.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/commercial-dispatch.d.ts +4 -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 +25 -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 +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/commercial-service-deps.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/commercial-service-deps.js +9 -1
- package/node_modules/@noodle-borg/service/dist/routes/commercial-service-deps.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/control-plane.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/control-plane.js +19 -1
- package/node_modules/@noodle-borg/service/dist/routes/control-plane.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/rollback.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/rollback.js +19 -1
- package/node_modules/@noodle-borg/service/dist/routes/rollback.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/serve.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/serve.js +41 -1
- package/node_modules/@noodle-borg/service/dist/serve.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/service.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/service.js +6 -3
- package/node_modules/@noodle-borg/service/dist/service.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/cloudsql-pool.js +3 -3
- package/node_modules/@noodle-borg/service/dist/store/cloudsql-pool.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-apps.d.ts +5 -7
- package/node_modules/@noodle-borg/service/dist/store/postgres-apps.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-apps.js +71 -0
- package/node_modules/@noodle-borg/service/dist/store/postgres-apps.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-github-runs.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-github-runs.js +7 -0
- package/node_modules/@noodle-borg/service/dist/store/postgres-github-runs.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-schema.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-schema.js +5 -0
- package/node_modules/@noodle-borg/service/dist/store/postgres-schema.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres.js +29 -34
- package/node_modules/@noodle-borg/service/dist/store/postgres.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export const BILLING_COMMERCIAL_FREE_V1_INCLUDED_CALLS = 1_000_000;
|
|
2
|
+
export const BILLING_COMMERCIAL_FREE_V1_PRODUCTION_APPS = 1;
|
|
3
|
+
export class BillingCommercialEntitlementError extends Error {
|
|
4
|
+
constructor() {
|
|
5
|
+
super('commercial usage entitlements are invalid');
|
|
6
|
+
this.name = 'BillingCommercialEntitlementError';
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
/** Canonical parser shared by admission and read projections for verified commercial snapshots. */
|
|
10
|
+
export function parseBillingCommercialUsageEntitlements(value) {
|
|
11
|
+
if (value === null || typeof value !== 'object' || Array.isArray(value))
|
|
12
|
+
throw invalid();
|
|
13
|
+
const record = value;
|
|
14
|
+
const included = record['usage.mcp_calls.included'];
|
|
15
|
+
if (!Number.isSafeInteger(included) || included < 1)
|
|
16
|
+
throw invalid();
|
|
17
|
+
const overage = record['usage.mcp_calls.overage'];
|
|
18
|
+
if (overage === false) {
|
|
19
|
+
return { includedCalls: included, overageAllowed: false };
|
|
20
|
+
}
|
|
21
|
+
if (overage === true || (typeof overage === 'string' && overage.trim().length > 0)) {
|
|
22
|
+
return { includedCalls: included, overageAllowed: true };
|
|
23
|
+
}
|
|
24
|
+
throw invalid();
|
|
25
|
+
}
|
|
26
|
+
/** Require the exact commercial tuple supported by the Free-v1 activation contract. */
|
|
27
|
+
export function parseBillingCommercialFreeV1Entitlements(value) {
|
|
28
|
+
const usage = parseBillingCommercialUsageEntitlements(value);
|
|
29
|
+
const record = value;
|
|
30
|
+
if (usage.includedCalls !== BILLING_COMMERCIAL_FREE_V1_INCLUDED_CALLS ||
|
|
31
|
+
usage.overageAllowed ||
|
|
32
|
+
record['apps.production.max'] !== BILLING_COMMERCIAL_FREE_V1_PRODUCTION_APPS) {
|
|
33
|
+
throw invalid();
|
|
34
|
+
}
|
|
35
|
+
return { ...usage, productionAppLimit: BILLING_COMMERCIAL_FREE_V1_PRODUCTION_APPS };
|
|
36
|
+
}
|
|
37
|
+
export function isBillingCommercialFreeV1Entitlements(value) {
|
|
38
|
+
try {
|
|
39
|
+
parseBillingCommercialFreeV1Entitlements(value);
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
catch (error) {
|
|
43
|
+
if (error instanceof BillingCommercialEntitlementError)
|
|
44
|
+
return false;
|
|
45
|
+
throw error;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
function invalid() {
|
|
49
|
+
return new BillingCommercialEntitlementError();
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=commercial-entitlements.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commercial-entitlements.js","sourceRoot":"","sources":["../../src/billing/commercial-entitlements.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,MAAM,yCAAyC,GAAG,SAAS,CAAC;AACnE,MAAM,CAAC,MAAM,0CAA0C,GAAG,CAAC,CAAC;AAM5D,MAAM,OAAO,iCAAkC,SAAQ,KAAK;IAC1D;QACE,KAAK,CAAC,2CAA2C,CAAC,CAAC;QACnD,IAAI,CAAC,IAAI,GAAG,mCAAmC,CAAC;IAClD,CAAC;CACF;AAED,mGAAmG;AACnG,MAAM,UAAU,uCAAuC,CACrD,KAAc;IAEd,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,MAAM,OAAO,EAAE,CAAC;IACzF,MAAM,MAAM,GAAG,KAAgC,CAAC;IAChD,MAAM,QAAQ,GAAG,MAAM,CAAC,0BAA0B,CAAC,CAAC;IACpD,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC,IAAK,QAAmB,GAAG,CAAC;QAAE,MAAM,OAAO,EAAE,CAAC;IACjF,MAAM,OAAO,GAAG,MAAM,CAAC,yBAAyB,CAAC,CAAC;IAClD,IAAI,OAAO,KAAK,KAAK,EAAE,CAAC;QACtB,OAAO,EAAE,aAAa,EAAE,QAAkB,EAAE,cAAc,EAAE,KAAK,EAAE,CAAC;IACtE,CAAC;IACD,IAAI,OAAO,KAAK,IAAI,IAAI,CAAC,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC;QACnF,OAAO,EAAE,aAAa,EAAE,QAAkB,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC;IACrE,CAAC;IACD,MAAM,OAAO,EAAE,CAAC;AAClB,CAAC;AAED,uFAAuF;AACvF,MAAM,UAAU,wCAAwC,CACtD,KAAc;IAEd,MAAM,KAAK,GAAG,uCAAuC,CAAC,KAAK,CAAC,CAAC;IAC7D,MAAM,MAAM,GAAG,KAAgC,CAAC;IAChD,IACE,KAAK,CAAC,aAAa,KAAK,yCAAyC;QACjE,KAAK,CAAC,cAAc;QACpB,MAAM,CAAC,qBAAqB,CAAC,KAAK,0CAA0C,EAC5E,CAAC;QACD,MAAM,OAAO,EAAE,CAAC;IAClB,CAAC;IACD,OAAO,EAAE,GAAG,KAAK,EAAE,kBAAkB,EAAE,0CAA0C,EAAE,CAAC;AACtF,CAAC;AAED,MAAM,UAAU,qCAAqC,CAAC,KAAc;IAClE,IAAI,CAAC;QACH,wCAAwC,CAAC,KAAK,CAAC,CAAC;QAChD,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,iCAAiC;YAAE,OAAO,KAAK,CAAC;QACrE,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC;AAED,SAAS,OAAO;IACd,OAAO,IAAI,iCAAiC,EAAE,CAAC;AACjD,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { z } from 'zod';
|
|
2
|
+
import type { BillingEnforcementActivationApproval, BillingEnforcementActivationSignals } from './enforcement-activation.js';
|
|
3
|
+
export declare const BILLING_ENFORCEMENT_ACTIVATION_EVIDENCE_MAX_AGE_MS: Readonly<{
|
|
4
|
+
trafficFleetConvergence: number;
|
|
5
|
+
planVolumeCapacity: number;
|
|
6
|
+
nonproductionFailClosedDrill: number;
|
|
7
|
+
protectedProductionApproval: number;
|
|
8
|
+
}>;
|
|
9
|
+
export declare const BILLING_ENFORCEMENT_ACTIVATION_EFFECTS: Readonly<{
|
|
10
|
+
profileScope: "enforced";
|
|
11
|
+
commercialScope: "free_v1";
|
|
12
|
+
paidPlans: false;
|
|
13
|
+
startsFreshAuthoritativeEpochAtZero: true;
|
|
14
|
+
productionAppEnforcement: true;
|
|
15
|
+
legacyInternalExemptBypass: true;
|
|
16
|
+
stripe: false;
|
|
17
|
+
migrationGrants: false;
|
|
18
|
+
invoiceEvidence: false;
|
|
19
|
+
}>;
|
|
20
|
+
export declare function validateActivationStatus(status: {
|
|
21
|
+
readonly state: 'not_activated' | 'active' | 'rolled_back';
|
|
22
|
+
readonly generation: number;
|
|
23
|
+
readonly activeEpochId: string | null;
|
|
24
|
+
readonly lastEpochId: string | null;
|
|
25
|
+
readonly activatedAt: string | null;
|
|
26
|
+
readonly rolledBackAt: string | null;
|
|
27
|
+
readonly activationServiceReleaseSha: string | null;
|
|
28
|
+
readonly admissionContractVersion: number | null;
|
|
29
|
+
readonly approvalChecksum: string | null;
|
|
30
|
+
}, context: z.RefinementCtx): void;
|
|
31
|
+
export declare function normalizeActivationSignals(signals: BillingEnforcementActivationSignals): BillingEnforcementActivationSignals;
|
|
32
|
+
export declare function activationEvidenceIsCurrent(approval: BillingEnforcementActivationApproval, checkedAt: string): boolean;
|
|
33
|
+
export declare function hasActivationControlCharacters(value: string): boolean;
|
|
34
|
+
//# sourceMappingURL=enforcement-activation-support.d.ts.map
|
package/node_modules/@noodle-borg/service/dist/billing/enforcement-activation-support.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enforcement-activation-support.d.ts","sourceRoot":"","sources":["../../src/billing/enforcement-activation-support.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EACV,oCAAoC,EACpC,mCAAmC,EACpC,MAAM,6BAA6B,CAAC;AAErC,eAAO,MAAM,kDAAkD;;;;;EAK7D,CAAC;AAEH,eAAO,MAAM,sCAAsC;;;;;;;;;;EAUjD,CAAC;AAEH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE;IACN,QAAQ,CAAC,KAAK,EAAE,eAAe,GAAG,QAAQ,GAAG,aAAa,CAAC;IAC3D,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,QAAQ,CAAC,2BAA2B,EAAE,MAAM,GAAG,IAAI,CAAC;IACpD,QAAQ,CAAC,wBAAwB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjD,QAAQ,CAAC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1C,EACD,OAAO,EAAE,CAAC,CAAC,aAAa,GACvB,IAAI,CAkEN;AAED,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,mCAAmC,GAC3C,mCAAmC,CAgBrC;AAED,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,oCAAoC,EAC9C,SAAS,EAAE,MAAM,GAChB,OAAO,CAwBT;AAED,wBAAgB,8BAA8B,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAKrE"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
export const BILLING_ENFORCEMENT_ACTIVATION_EVIDENCE_MAX_AGE_MS = Object.freeze({
|
|
2
|
+
trafficFleetConvergence: 60 * 60 * 1_000,
|
|
3
|
+
planVolumeCapacity: 24 * 60 * 60 * 1_000,
|
|
4
|
+
nonproductionFailClosedDrill: 24 * 60 * 60 * 1_000,
|
|
5
|
+
protectedProductionApproval: 60 * 60 * 1_000,
|
|
6
|
+
});
|
|
7
|
+
export const BILLING_ENFORCEMENT_ACTIVATION_EFFECTS = Object.freeze({
|
|
8
|
+
profileScope: 'enforced',
|
|
9
|
+
commercialScope: 'free_v1',
|
|
10
|
+
paidPlans: false,
|
|
11
|
+
startsFreshAuthoritativeEpochAtZero: true,
|
|
12
|
+
productionAppEnforcement: true,
|
|
13
|
+
legacyInternalExemptBypass: true,
|
|
14
|
+
stripe: false,
|
|
15
|
+
migrationGrants: false,
|
|
16
|
+
invoiceEvidence: false,
|
|
17
|
+
});
|
|
18
|
+
export function validateActivationStatus(status, context) {
|
|
19
|
+
const hasProvenance = status.lastEpochId !== null &&
|
|
20
|
+
status.activatedAt !== null &&
|
|
21
|
+
status.activationServiceReleaseSha !== null &&
|
|
22
|
+
status.admissionContractVersion !== null &&
|
|
23
|
+
status.approvalChecksum !== null;
|
|
24
|
+
if (status.state === 'not_activated') {
|
|
25
|
+
if (status.generation !== 0 ||
|
|
26
|
+
status.activeEpochId !== null ||
|
|
27
|
+
status.lastEpochId !== null ||
|
|
28
|
+
status.activatedAt !== null ||
|
|
29
|
+
status.rolledBackAt !== null ||
|
|
30
|
+
status.activationServiceReleaseSha !== null ||
|
|
31
|
+
status.admissionContractVersion !== null ||
|
|
32
|
+
status.approvalChecksum !== null) {
|
|
33
|
+
context.addIssue({
|
|
34
|
+
code: 'custom',
|
|
35
|
+
path: ['state'],
|
|
36
|
+
message: 'not-activated state cannot contain activation history',
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
if (status.generation < 1 || !hasProvenance) {
|
|
42
|
+
context.addIssue({
|
|
43
|
+
code: 'custom',
|
|
44
|
+
path: ['generation'],
|
|
45
|
+
message: 'activated state requires complete provenance',
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
if (status.state === 'active' &&
|
|
49
|
+
(status.activeEpochId === null ||
|
|
50
|
+
status.activeEpochId !== status.lastEpochId ||
|
|
51
|
+
status.rolledBackAt !== null)) {
|
|
52
|
+
context.addIssue({
|
|
53
|
+
code: 'custom',
|
|
54
|
+
path: ['activeEpochId'],
|
|
55
|
+
message: 'active state is invalid',
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
if (status.state === 'rolled_back' &&
|
|
59
|
+
(status.activeEpochId !== null || status.rolledBackAt === null)) {
|
|
60
|
+
context.addIssue({
|
|
61
|
+
code: 'custom',
|
|
62
|
+
path: ['rolledBackAt'],
|
|
63
|
+
message: 'rolled-back state is invalid',
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
if (status.rolledBackAt !== null &&
|
|
67
|
+
status.activatedAt !== null &&
|
|
68
|
+
Date.parse(status.rolledBackAt) < Date.parse(status.activatedAt)) {
|
|
69
|
+
context.addIssue({
|
|
70
|
+
code: 'custom',
|
|
71
|
+
path: ['rolledBackAt'],
|
|
72
|
+
message: 'rollback cannot predate activation',
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
export function normalizeActivationSignals(signals) {
|
|
77
|
+
for (const [label, value] of [
|
|
78
|
+
['unprofiled account count', signals.unprofiledAccountCount],
|
|
79
|
+
['activation generation', signals.activationGeneration],
|
|
80
|
+
['supported admission contract', signals.supportedAdmissionContractVersion],
|
|
81
|
+
['invalid enforced entitlement account count', signals.invalidEnforcedEntitlementAccountCount],
|
|
82
|
+
['non-Free enforced account count', signals.nonFreeEnforcedAccountCount],
|
|
83
|
+
['enforced over-capacity account count', signals.enforcedOverCapacityAccountCount],
|
|
84
|
+
[
|
|
85
|
+
'legacy exempt over-capacity account count',
|
|
86
|
+
signals.legacyInternalExemptOverCapacityAccountCount,
|
|
87
|
+
],
|
|
88
|
+
]) {
|
|
89
|
+
if (!Number.isSafeInteger(value) || value < 0)
|
|
90
|
+
throw new Error(`${label} must be non-negative`);
|
|
91
|
+
}
|
|
92
|
+
return { ...signals };
|
|
93
|
+
}
|
|
94
|
+
export function activationEvidenceIsCurrent(approval, checkedAt) {
|
|
95
|
+
const checkedAtMs = Date.parse(checkedAt);
|
|
96
|
+
const evidence = [
|
|
97
|
+
[
|
|
98
|
+
approval.evidence.trafficFleetConvergence.verifiedAt,
|
|
99
|
+
BILLING_ENFORCEMENT_ACTIVATION_EVIDENCE_MAX_AGE_MS.trafficFleetConvergence,
|
|
100
|
+
],
|
|
101
|
+
[
|
|
102
|
+
approval.evidence.planVolumeCapacity.approvedAt,
|
|
103
|
+
BILLING_ENFORCEMENT_ACTIVATION_EVIDENCE_MAX_AGE_MS.planVolumeCapacity,
|
|
104
|
+
],
|
|
105
|
+
[
|
|
106
|
+
approval.evidence.nonproductionFailClosedDrill.verifiedAt,
|
|
107
|
+
BILLING_ENFORCEMENT_ACTIVATION_EVIDENCE_MAX_AGE_MS.nonproductionFailClosedDrill,
|
|
108
|
+
],
|
|
109
|
+
[
|
|
110
|
+
approval.evidence.protectedProductionApproval.approvedAt,
|
|
111
|
+
BILLING_ENFORCEMENT_ACTIVATION_EVIDENCE_MAX_AGE_MS.protectedProductionApproval,
|
|
112
|
+
],
|
|
113
|
+
];
|
|
114
|
+
return evidence.every(([instant, maxAgeMs]) => {
|
|
115
|
+
const ageMs = checkedAtMs - Date.parse(instant);
|
|
116
|
+
return ageMs >= 0 && ageMs <= maxAgeMs;
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
export function hasActivationControlCharacters(value) {
|
|
120
|
+
return [...value].some((character) => {
|
|
121
|
+
const code = character.charCodeAt(0);
|
|
122
|
+
return code <= 0x1f || code === 0x7f;
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
//# sourceMappingURL=enforcement-activation-support.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enforcement-activation-support.js","sourceRoot":"","sources":["../../src/billing/enforcement-activation-support.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,MAAM,kDAAkD,GAAG,MAAM,CAAC,MAAM,CAAC;IAC9E,uBAAuB,EAAE,EAAE,GAAG,EAAE,GAAG,KAAK;IACxC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C/E;KACO,CAAC;IACX,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,EAAE,QAAQ,CAAC,EAAE,EAAE;QAC5C,MAAM,KAAK,GAAG,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAChD,OAAO,KAAK,IAAI,CAAC,IAAI,KAAK,IAAI,QAAQ,CAAC;IACzC,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,8BAA8B,CAAC,KAAa;IAC1D,OAAO,CAAC,GAAG,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE;QACnC,MAAM,IAAI,GAAG,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QACrC,OAAO,IAAI,IAAI,IAAI,IAAI,IAAI,KAAK,IAAI,CAAC;IACvC,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
import type { AuditEventInput } from '@noodle-borg/module';
|
|
2
|
+
import type { PoolClient } from 'pg';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import type { ControlPlaneIdentity } from '../auth/deploy-gate.js';
|
|
5
|
+
import { BILLING_ENFORCEMENT_ACTIVATION_EVIDENCE_MAX_AGE_MS } from './enforcement-activation-support.js';
|
|
6
|
+
export declare const BILLING_ENFORCEMENT_ACTIVATION_SCHEMA_VERSION: 1;
|
|
7
|
+
export declare const BILLING_AUTHORITATIVE_ADMISSION_CONTRACT_VERSION: 1;
|
|
8
|
+
export declare const BILLING_ENFORCEMENT_COMMERCIAL_SCOPE: "free_v1";
|
|
9
|
+
export declare const BILLING_ENFORCEMENT_PAID_PLANS: false;
|
|
10
|
+
export { BILLING_ENFORCEMENT_ACTIVATION_EVIDENCE_MAX_AGE_MS };
|
|
11
|
+
export declare const BillingEnforcementActivationApprovalSchema: z.ZodObject<{
|
|
12
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
13
|
+
targetEnvironment: z.ZodLiteral<"production">;
|
|
14
|
+
commercialScope: z.ZodLiteral<"free_v1">;
|
|
15
|
+
paidPlans: z.ZodLiteral<false>;
|
|
16
|
+
service: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
17
|
+
expectedState: z.ZodEnum<{
|
|
18
|
+
not_activated: "not_activated";
|
|
19
|
+
rolled_back: "rolled_back";
|
|
20
|
+
}>;
|
|
21
|
+
expectedGeneration: z.ZodNumber;
|
|
22
|
+
expectedCohortSealId: z.ZodString;
|
|
23
|
+
expectedValidationEpochId: z.ZodString;
|
|
24
|
+
expectedServiceReleaseSha: z.ZodString;
|
|
25
|
+
evidence: z.ZodObject<{
|
|
26
|
+
trafficFleetConvergence: z.ZodObject<{
|
|
27
|
+
serviceReleaseSha: z.ZodString;
|
|
28
|
+
verifiedAt: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<string, string>>;
|
|
29
|
+
checksum: z.ZodString;
|
|
30
|
+
}, z.core.$strict>;
|
|
31
|
+
planVolumeCapacity: z.ZodObject<{
|
|
32
|
+
serviceReleaseSha: z.ZodString;
|
|
33
|
+
topology: z.ZodLiteral<"production">;
|
|
34
|
+
approvedAt: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<string, string>>;
|
|
35
|
+
checksum: z.ZodString;
|
|
36
|
+
}, z.core.$strict>;
|
|
37
|
+
nonproductionFailClosedDrill: z.ZodObject<{
|
|
38
|
+
serviceReleaseSha: z.ZodString;
|
|
39
|
+
environment: z.ZodLiteral<"staging">;
|
|
40
|
+
verifiedAt: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<string, string>>;
|
|
41
|
+
checksum: z.ZodString;
|
|
42
|
+
}, z.core.$strict>;
|
|
43
|
+
protectedProductionApproval: z.ZodObject<{
|
|
44
|
+
serviceReleaseSha: z.ZodString;
|
|
45
|
+
systemReleaseId: z.ZodString;
|
|
46
|
+
approvedAt: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<string, string>>;
|
|
47
|
+
checksum: z.ZodString;
|
|
48
|
+
}, z.core.$strict>;
|
|
49
|
+
}, z.core.$strict>;
|
|
50
|
+
}, z.core.$strict>;
|
|
51
|
+
export type BillingEnforcementActivationApproval = z.infer<typeof BillingEnforcementActivationApprovalSchema>;
|
|
52
|
+
export declare const BillingEnforcementActivationStatusSchema: z.ZodObject<{
|
|
53
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
54
|
+
state: z.ZodEnum<{
|
|
55
|
+
active: "active";
|
|
56
|
+
not_activated: "not_activated";
|
|
57
|
+
rolled_back: "rolled_back";
|
|
58
|
+
}>;
|
|
59
|
+
generation: z.ZodNumber;
|
|
60
|
+
cohortSealId: z.ZodString;
|
|
61
|
+
activeEpochId: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
|
|
62
|
+
lastEpochId: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
|
|
63
|
+
activatedAt: z.ZodUnion<readonly [z.ZodPipe<z.ZodISODateTime, z.ZodTransform<string, string>>, z.ZodNull]>;
|
|
64
|
+
rolledBackAt: z.ZodUnion<readonly [z.ZodPipe<z.ZodISODateTime, z.ZodTransform<string, string>>, z.ZodNull]>;
|
|
65
|
+
activationServiceReleaseSha: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
|
|
66
|
+
admissionContractVersion: z.ZodUnion<readonly [z.ZodNumber, z.ZodNull]>;
|
|
67
|
+
approvalChecksum: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
|
|
68
|
+
}, z.core.$strict>;
|
|
69
|
+
export type BillingEnforcementActivationStatus = z.infer<typeof BillingEnforcementActivationStatusSchema>;
|
|
70
|
+
export declare const BILLING_ENFORCEMENT_ACTIVATION_BLOCKER_CODES: readonly ["cohort_not_sealed", "cohort_seal_mismatch", "billing_attribution_incomplete", "unprofiled_billing_accounts", "activation_state_mismatch", "activation_generation_mismatch", "active_epoch_exists", "prepared_validation_epoch_mismatch", "service_origin_mismatch", "service_release_mismatch", "admission_contract_mismatch", "approval_evidence_not_current", "technical_readiness_blocked", "production_preflight_unavailable", "invalid_enforced_entitlements", "enforced_account_not_free_v1", "enforced_account_over_capacity"];
|
|
71
|
+
export declare const BillingEnforcementActivationPreviewSchema: z.ZodObject<{
|
|
72
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
73
|
+
ready: z.ZodBoolean;
|
|
74
|
+
commercialScope: z.ZodLiteral<"free_v1">;
|
|
75
|
+
paidPlans: z.ZodLiteral<false>;
|
|
76
|
+
checkedAt: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<string, string>>;
|
|
77
|
+
approvalChecksum: z.ZodString;
|
|
78
|
+
previewChecksum: z.ZodString;
|
|
79
|
+
blockers: z.ZodArray<z.ZodObject<{
|
|
80
|
+
code: z.ZodEnum<{
|
|
81
|
+
cohort_not_sealed: "cohort_not_sealed";
|
|
82
|
+
cohort_seal_mismatch: "cohort_seal_mismatch";
|
|
83
|
+
billing_attribution_incomplete: "billing_attribution_incomplete";
|
|
84
|
+
unprofiled_billing_accounts: "unprofiled_billing_accounts";
|
|
85
|
+
activation_state_mismatch: "activation_state_mismatch";
|
|
86
|
+
activation_generation_mismatch: "activation_generation_mismatch";
|
|
87
|
+
active_epoch_exists: "active_epoch_exists";
|
|
88
|
+
prepared_validation_epoch_mismatch: "prepared_validation_epoch_mismatch";
|
|
89
|
+
service_origin_mismatch: "service_origin_mismatch";
|
|
90
|
+
service_release_mismatch: "service_release_mismatch";
|
|
91
|
+
admission_contract_mismatch: "admission_contract_mismatch";
|
|
92
|
+
approval_evidence_not_current: "approval_evidence_not_current";
|
|
93
|
+
technical_readiness_blocked: "technical_readiness_blocked";
|
|
94
|
+
production_preflight_unavailable: "production_preflight_unavailable";
|
|
95
|
+
invalid_enforced_entitlements: "invalid_enforced_entitlements";
|
|
96
|
+
enforced_account_not_free_v1: "enforced_account_not_free_v1";
|
|
97
|
+
enforced_account_over_capacity: "enforced_account_over_capacity";
|
|
98
|
+
}>;
|
|
99
|
+
}, z.core.$strict>>;
|
|
100
|
+
effects: z.ZodObject<{
|
|
101
|
+
profileScope: z.ZodLiteral<"enforced">;
|
|
102
|
+
commercialScope: z.ZodLiteral<"free_v1">;
|
|
103
|
+
paidPlans: z.ZodLiteral<false>;
|
|
104
|
+
startsFreshAuthoritativeEpochAtZero: z.ZodLiteral<true>;
|
|
105
|
+
productionAppEnforcement: z.ZodLiteral<true>;
|
|
106
|
+
legacyInternalExemptBypass: z.ZodLiteral<true>;
|
|
107
|
+
stripe: z.ZodLiteral<false>;
|
|
108
|
+
migrationGrants: z.ZodLiteral<false>;
|
|
109
|
+
invoiceEvidence: z.ZodLiteral<false>;
|
|
110
|
+
}, z.core.$strict>;
|
|
111
|
+
}, z.core.$strict>;
|
|
112
|
+
export type BillingEnforcementActivationPreview = z.infer<typeof BillingEnforcementActivationPreviewSchema>;
|
|
113
|
+
export interface BillingEnforcementActivationSignals {
|
|
114
|
+
readonly cohortState: 'unsealed' | 'sealed';
|
|
115
|
+
readonly cohortSealId: string | null;
|
|
116
|
+
readonly billingAttributionComplete: boolean;
|
|
117
|
+
readonly unprofiledAccountCount: number;
|
|
118
|
+
readonly activationState: 'not_activated' | 'active' | 'rolled_back';
|
|
119
|
+
readonly activationGeneration: number;
|
|
120
|
+
readonly activeEpochId: string | null;
|
|
121
|
+
readonly preparedValidationEpochId: string | null;
|
|
122
|
+
readonly preparedValidationEpochReleaseSha: string | null;
|
|
123
|
+
readonly preparedValidationEpochAdmissionContractVersion: number | null;
|
|
124
|
+
readonly currentServiceOrigin: string;
|
|
125
|
+
readonly currentServiceReleaseSha: string;
|
|
126
|
+
readonly supportedAdmissionContractVersion: number;
|
|
127
|
+
readonly technicalReadiness: 'ready' | 'blocked' | 'unavailable';
|
|
128
|
+
readonly invalidEnforcedEntitlementAccountCount: number;
|
|
129
|
+
readonly nonFreeEnforcedAccountCount: number;
|
|
130
|
+
readonly enforcedOverCapacityAccountCount: number;
|
|
131
|
+
readonly legacyInternalExemptOverCapacityAccountCount: number;
|
|
132
|
+
}
|
|
133
|
+
export declare function billingEnforcementActivationApprovalChecksum(value: unknown): string;
|
|
134
|
+
export declare function buildBillingEnforcementActivationPreview(input: {
|
|
135
|
+
readonly approval: BillingEnforcementActivationApproval;
|
|
136
|
+
readonly checkedAt: string;
|
|
137
|
+
readonly signals: BillingEnforcementActivationSignals;
|
|
138
|
+
}): BillingEnforcementActivationPreview;
|
|
139
|
+
declare const activateRequestSchema: z.ZodObject<{
|
|
140
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
141
|
+
approval: z.ZodObject<{
|
|
142
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
143
|
+
targetEnvironment: z.ZodLiteral<"production">;
|
|
144
|
+
commercialScope: z.ZodLiteral<"free_v1">;
|
|
145
|
+
paidPlans: z.ZodLiteral<false>;
|
|
146
|
+
service: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
147
|
+
expectedState: z.ZodEnum<{
|
|
148
|
+
not_activated: "not_activated";
|
|
149
|
+
rolled_back: "rolled_back";
|
|
150
|
+
}>;
|
|
151
|
+
expectedGeneration: z.ZodNumber;
|
|
152
|
+
expectedCohortSealId: z.ZodString;
|
|
153
|
+
expectedValidationEpochId: z.ZodString;
|
|
154
|
+
expectedServiceReleaseSha: z.ZodString;
|
|
155
|
+
evidence: z.ZodObject<{
|
|
156
|
+
trafficFleetConvergence: z.ZodObject<{
|
|
157
|
+
serviceReleaseSha: z.ZodString;
|
|
158
|
+
verifiedAt: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<string, string>>;
|
|
159
|
+
checksum: z.ZodString;
|
|
160
|
+
}, z.core.$strict>;
|
|
161
|
+
planVolumeCapacity: z.ZodObject<{
|
|
162
|
+
serviceReleaseSha: z.ZodString;
|
|
163
|
+
topology: z.ZodLiteral<"production">;
|
|
164
|
+
approvedAt: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<string, string>>;
|
|
165
|
+
checksum: z.ZodString;
|
|
166
|
+
}, z.core.$strict>;
|
|
167
|
+
nonproductionFailClosedDrill: z.ZodObject<{
|
|
168
|
+
serviceReleaseSha: z.ZodString;
|
|
169
|
+
environment: z.ZodLiteral<"staging">;
|
|
170
|
+
verifiedAt: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<string, string>>;
|
|
171
|
+
checksum: z.ZodString;
|
|
172
|
+
}, z.core.$strict>;
|
|
173
|
+
protectedProductionApproval: z.ZodObject<{
|
|
174
|
+
serviceReleaseSha: z.ZodString;
|
|
175
|
+
systemReleaseId: z.ZodString;
|
|
176
|
+
approvedAt: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<string, string>>;
|
|
177
|
+
checksum: z.ZodString;
|
|
178
|
+
}, z.core.$strict>;
|
|
179
|
+
}, z.core.$strict>;
|
|
180
|
+
}, z.core.$strict>;
|
|
181
|
+
expectedPreviewChecksum: z.ZodString;
|
|
182
|
+
reason: z.ZodString;
|
|
183
|
+
idempotencyKey: z.ZodString;
|
|
184
|
+
confirmed: z.ZodLiteral<true>;
|
|
185
|
+
}, z.core.$strict>;
|
|
186
|
+
declare const rollbackRequestSchema: z.ZodObject<{
|
|
187
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
188
|
+
expectedState: z.ZodLiteral<"active">;
|
|
189
|
+
expectedGeneration: z.ZodNumber;
|
|
190
|
+
expectedEpochId: z.ZodString;
|
|
191
|
+
reason: z.ZodString;
|
|
192
|
+
idempotencyKey: z.ZodString;
|
|
193
|
+
confirmed: z.ZodLiteral<true>;
|
|
194
|
+
}, z.core.$strict>;
|
|
195
|
+
export type BillingEnforcementActivateRequest = z.infer<typeof activateRequestSchema>;
|
|
196
|
+
export type BillingEnforcementRollbackRequest = z.infer<typeof rollbackRequestSchema>;
|
|
197
|
+
export declare function parseBillingEnforcementActivateRequest(value: unknown): BillingEnforcementActivateRequest;
|
|
198
|
+
export declare function parseBillingEnforcementRollbackRequest(value: unknown): BillingEnforcementRollbackRequest;
|
|
199
|
+
export declare const BillingEnforcementActivationMutationResultSchema: z.ZodObject<{
|
|
200
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
201
|
+
action: z.ZodEnum<{
|
|
202
|
+
activate: "activate";
|
|
203
|
+
rollback: "rollback";
|
|
204
|
+
}>;
|
|
205
|
+
state: z.ZodEnum<{
|
|
206
|
+
active: "active";
|
|
207
|
+
rolled_back: "rolled_back";
|
|
208
|
+
}>;
|
|
209
|
+
generation: z.ZodNumber;
|
|
210
|
+
replayed: z.ZodBoolean;
|
|
211
|
+
cohortSealId: z.ZodString;
|
|
212
|
+
activeEpochId: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
|
|
213
|
+
lastEpochId: z.ZodString;
|
|
214
|
+
retiredValidationEpochId: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
|
|
215
|
+
activatedAt: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<string, string>>;
|
|
216
|
+
rolledBackAt: z.ZodUnion<readonly [z.ZodPipe<z.ZodISODateTime, z.ZodTransform<string, string>>, z.ZodNull]>;
|
|
217
|
+
activationServiceReleaseSha: z.ZodString;
|
|
218
|
+
admissionContractVersion: z.ZodNumber;
|
|
219
|
+
approvalChecksum: z.ZodString;
|
|
220
|
+
previewChecksum: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
|
|
221
|
+
}, z.core.$strict>;
|
|
222
|
+
export type BillingEnforcementActivationMutationResult = z.infer<typeof BillingEnforcementActivationMutationResultSchema>;
|
|
223
|
+
export type BillingEnforcementActivationPreflight = (input: {
|
|
224
|
+
readonly client: PoolClient;
|
|
225
|
+
readonly approval: BillingEnforcementActivationApproval;
|
|
226
|
+
readonly checkedAt: string;
|
|
227
|
+
}) => Promise<BillingEnforcementActivationPreview>;
|
|
228
|
+
export interface BillingEnforcementActivationStore {
|
|
229
|
+
/** PostgreSQL stores commit canonical success audits with the lifecycle mutation. */
|
|
230
|
+
readonly successAuditMode?: 'transactional';
|
|
231
|
+
getActivationStatus(): Promise<BillingEnforcementActivationStatus>;
|
|
232
|
+
previewActivation(input: {
|
|
233
|
+
readonly approval: BillingEnforcementActivationApproval;
|
|
234
|
+
}): Promise<BillingEnforcementActivationPreview>;
|
|
235
|
+
activateEnforcement(input: {
|
|
236
|
+
readonly request: BillingEnforcementActivateRequest;
|
|
237
|
+
readonly actor: ControlPlaneIdentity;
|
|
238
|
+
readonly service: string;
|
|
239
|
+
}): Promise<BillingEnforcementActivationMutationResult>;
|
|
240
|
+
rollbackEnforcement(input: {
|
|
241
|
+
readonly request: BillingEnforcementRollbackRequest;
|
|
242
|
+
readonly actor: ControlPlaneIdentity;
|
|
243
|
+
readonly service: string;
|
|
244
|
+
}): Promise<BillingEnforcementActivationMutationResult>;
|
|
245
|
+
}
|
|
246
|
+
export type BillingEnforcementActivationConflictCode = 'idempotency_key_conflict' | 'activation_state_conflict' | 'activation_epoch_conflict' | 'activation_preflight_blocked' | 'activation_preview_changed' | 'activation_configuration_unavailable' | 'activation_lock_timeout' | 'serialization_conflict';
|
|
247
|
+
export declare class BillingEnforcementActivationConflictError extends Error {
|
|
248
|
+
readonly code: BillingEnforcementActivationConflictCode;
|
|
249
|
+
constructor(code: BillingEnforcementActivationConflictCode, message: string);
|
|
250
|
+
}
|
|
251
|
+
type FingerprintInput = {
|
|
252
|
+
readonly action: 'activate';
|
|
253
|
+
readonly request: BillingEnforcementActivateRequest;
|
|
254
|
+
readonly actor: Pick<ControlPlaneIdentity, 'subject' | 'email'>;
|
|
255
|
+
readonly service: string;
|
|
256
|
+
} | {
|
|
257
|
+
readonly action: 'rollback';
|
|
258
|
+
readonly request: BillingEnforcementRollbackRequest;
|
|
259
|
+
readonly actor: Pick<ControlPlaneIdentity, 'subject' | 'email'>;
|
|
260
|
+
readonly service: string;
|
|
261
|
+
};
|
|
262
|
+
export declare function billingEnforcementActivationRequestFingerprint(input: FingerprintInput): string;
|
|
263
|
+
export declare function billingEnforcementActivationSuccessAudit(result: BillingEnforcementActivationMutationResult, actor: Pick<ControlPlaneIdentity, 'subject' | 'email'>): AuditEventInput;
|
|
264
|
+
export declare function normalizeActivationServiceUrl(value: string): string;
|
|
265
|
+
//# sourceMappingURL=enforcement-activation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enforcement-activation.d.ts","sourceRoot":"","sources":["../../src/billing/enforcement-activation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AACrC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAGL,kDAAkD,EAInD,MAAM,qCAAqC,CAAC;AAG7C,eAAO,MAAM,6CAA6C,EAAG,CAAU,CAAC;AACxE,eAAO,MAAM,gDAAgD,EAAG,CAAU,CAAC;AAC3E,eAAO,MAAM,oCAAoC,EAAG,SAAkB,CAAC;AACvE,eAAO,MAAM,8BAA8B,EAAG,KAAc,CAAC;AAC7D,OAAO,EAAE,kDAAkD,EAAE,CAAC;AAqC9D,eAAO,MAAM,0CAA0C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA4DnD,CAAC;AAEL,MAAM,MAAM,oCAAoC,GAAG,CAAC,CAAC,KAAK,CACxD,OAAO,0CAA0C,CAClD,CAAC;AAEF,eAAO,MAAM,wCAAwC;;;;;;;;;;;;;;;;kBAcb,CAAC;AAEzC,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,KAAK,CACtD,OAAO,wCAAwC,CAChD,CAAC;AAEF,eAAO,MAAM,4CAA4C,khBAkB/C,CAAC;AAMX,eAAO,MAAM,yCAAyC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAoBpD,CAAC;AAEH,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,KAAK,CACvD,OAAO,yCAAyC,CACjD,CAAC;AAEF,MAAM,WAAW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