@noodleseed/one 0.53.0 → 0.55.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.
Files changed (79) hide show
  1. package/dist/commands/billing-enforcement-activation-ops.js +3 -0
  2. package/dist/commands/billing-enforcement-activation-ops.js.map +1 -1
  3. package/node_modules/@noodle-borg/service/dist/billing/active-commercial-entitlement.d.ts +25 -0
  4. package/node_modules/@noodle-borg/service/dist/billing/active-commercial-entitlement.d.ts.map +1 -0
  5. package/node_modules/@noodle-borg/service/dist/billing/active-commercial-entitlement.js +94 -0
  6. package/node_modules/@noodle-borg/service/dist/billing/active-commercial-entitlement.js.map +1 -0
  7. package/node_modules/@noodle-borg/service/dist/billing/enforcement-release-config.d.ts +1 -1
  8. package/node_modules/@noodle-borg/service/dist/billing/enforcement-release-config.d.ts.map +1 -1
  9. package/node_modules/@noodle-borg/service/dist/billing/enforcement-release-config.js +2 -5
  10. package/node_modules/@noodle-borg/service/dist/billing/enforcement-release-config.js.map +1 -1
  11. package/node_modules/@noodle-borg/service/dist/billing/integration.d.ts +2 -1
  12. package/node_modules/@noodle-borg/service/dist/billing/integration.d.ts.map +1 -1
  13. package/node_modules/@noodle-borg/service/dist/billing/integration.js +2 -5
  14. package/node_modules/@noodle-borg/service/dist/billing/integration.js.map +1 -1
  15. package/node_modules/@noodle-borg/service/dist/billing/paid-plan-catalog.d.ts +1 -0
  16. package/node_modules/@noodle-borg/service/dist/billing/paid-plan-catalog.d.ts.map +1 -1
  17. package/node_modules/@noodle-borg/service/dist/billing/paid-plan-catalog.js +7 -0
  18. package/node_modules/@noodle-borg/service/dist/billing/paid-plan-catalog.js.map +1 -1
  19. package/node_modules/@noodle-borg/service/dist/billing/postgres-authoritative-authority.d.ts +4 -1
  20. package/node_modules/@noodle-borg/service/dist/billing/postgres-authoritative-authority.d.ts.map +1 -1
  21. package/node_modules/@noodle-borg/service/dist/billing/postgres-authoritative-authority.js +21 -7
  22. package/node_modules/@noodle-borg/service/dist/billing/postgres-authoritative-authority.js.map +1 -1
  23. package/node_modules/@noodle-borg/service/dist/billing/postgres-commercial-contract-cutover.d.ts +27 -0
  24. package/node_modules/@noodle-borg/service/dist/billing/postgres-commercial-contract-cutover.d.ts.map +1 -0
  25. package/node_modules/@noodle-borg/service/dist/billing/postgres-commercial-contract-cutover.js +284 -0
  26. package/node_modules/@noodle-borg/service/dist/billing/postgres-commercial-contract-cutover.js.map +1 -0
  27. package/node_modules/@noodle-borg/service/dist/billing/postgres-commercial-enforcement-counters.js +4 -5
  28. package/node_modules/@noodle-borg/service/dist/billing/postgres-commercial-enforcement-counters.js.map +1 -1
  29. package/node_modules/@noodle-borg/service/dist/billing/postgres-commercial-enforcement-projection.d.ts +0 -1
  30. package/node_modules/@noodle-borg/service/dist/billing/postgres-commercial-enforcement-projection.d.ts.map +1 -1
  31. package/node_modules/@noodle-borg/service/dist/billing/postgres-commercial-enforcement-projection.js +92 -27
  32. package/node_modules/@noodle-borg/service/dist/billing/postgres-commercial-enforcement-projection.js.map +1 -1
  33. package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-activation-schema.d.ts.map +1 -1
  34. package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-activation-schema.js +55 -0
  35. package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-activation-schema.js.map +1 -1
  36. package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-release-activation.d.ts +4 -7
  37. package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-release-activation.d.ts.map +1 -1
  38. package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-release-activation.js +34 -4
  39. package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-release-activation.js.map +1 -1
  40. package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-admission.d.ts +0 -1
  41. package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-admission.d.ts.map +1 -1
  42. package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-admission.js +72 -27
  43. package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-admission.js.map +1 -1
  44. package/node_modules/@noodle-borg/service/dist/billing/postgres-production-app-admission.d.ts.map +1 -1
  45. package/node_modules/@noodle-borg/service/dist/billing/postgres-production-app-admission.js +56 -26
  46. package/node_modules/@noodle-borg/service/dist/billing/postgres-production-app-admission.js.map +1 -1
  47. package/node_modules/@noodle-borg/service/dist/billing/postgres-subscription-reconciliation-authority.d.ts +5 -0
  48. package/node_modules/@noodle-borg/service/dist/billing/postgres-subscription-reconciliation-authority.d.ts.map +1 -0
  49. package/node_modules/@noodle-borg/service/dist/billing/postgres-subscription-reconciliation-authority.js +97 -0
  50. package/node_modules/@noodle-borg/service/dist/billing/postgres-subscription-reconciliation-authority.js.map +1 -0
  51. package/node_modules/@noodle-borg/service/dist/billing/postgres-subscription-reconciliation-persistence.d.ts +50 -0
  52. package/node_modules/@noodle-borg/service/dist/billing/postgres-subscription-reconciliation-persistence.d.ts.map +1 -0
  53. package/node_modules/@noodle-borg/service/dist/billing/postgres-subscription-reconciliation-persistence.js +221 -0
  54. package/node_modules/@noodle-borg/service/dist/billing/postgres-subscription-reconciliation-persistence.js.map +1 -0
  55. package/node_modules/@noodle-borg/service/dist/billing/postgres-subscription-reconciliation-support.d.ts +8 -0
  56. package/node_modules/@noodle-borg/service/dist/billing/postgres-subscription-reconciliation-support.d.ts.map +1 -0
  57. package/node_modules/@noodle-borg/service/dist/billing/postgres-subscription-reconciliation-support.js +42 -0
  58. package/node_modules/@noodle-borg/service/dist/billing/postgres-subscription-reconciliation-support.js.map +1 -0
  59. package/node_modules/@noodle-borg/service/dist/billing/postgres-subscription-reconciliation.d.ts +15 -0
  60. package/node_modules/@noodle-borg/service/dist/billing/postgres-subscription-reconciliation.d.ts.map +1 -0
  61. package/node_modules/@noodle-borg/service/dist/billing/postgres-subscription-reconciliation.js +123 -0
  62. package/node_modules/@noodle-borg/service/dist/billing/postgres-subscription-reconciliation.js.map +1 -0
  63. package/node_modules/@noodle-borg/service/dist/billing/postgres-subscription-schema.js +100 -0
  64. package/node_modules/@noodle-borg/service/dist/billing/postgres-subscription-schema.js.map +1 -1
  65. package/node_modules/@noodle-borg/service/dist/billing/service-enforcement-release.d.ts.map +1 -1
  66. package/node_modules/@noodle-borg/service/dist/billing/service-enforcement-release.js +4 -1
  67. package/node_modules/@noodle-borg/service/dist/billing/service-enforcement-release.js.map +1 -1
  68. package/node_modules/@noodle-borg/service/dist/billing/subscription-model.d.ts.map +1 -1
  69. package/node_modules/@noodle-borg/service/dist/billing/subscription-model.js +9 -1
  70. package/node_modules/@noodle-borg/service/dist/billing/subscription-model.js.map +1 -1
  71. package/node_modules/@noodle-borg/service/dist/billing/subscription-reconciliation.d.ts +45 -0
  72. package/node_modules/@noodle-borg/service/dist/billing/subscription-reconciliation.d.ts.map +1 -0
  73. package/node_modules/@noodle-borg/service/dist/billing/subscription-reconciliation.js +165 -0
  74. package/node_modules/@noodle-borg/service/dist/billing/subscription-reconciliation.js.map +1 -0
  75. package/node_modules/@noodle-borg/service/dist/billing-public.d.ts +2 -0
  76. package/node_modules/@noodle-borg/service/dist/billing-public.d.ts.map +1 -1
  77. package/node_modules/@noodle-borg/service/dist/billing-public.js +2 -0
  78. package/node_modules/@noodle-borg/service/dist/billing-public.js.map +1 -1
  79. package/package.json +1 -1
@@ -0,0 +1,165 @@
1
+ import { billingContentChecksum, validateBillingAccountId } from './model.js';
2
+ import { getBillingPublicPlanVersion } from './paid-plan-catalog.js';
3
+ import { createBillingBaseSubscriptionRevision, validateBillingSubscriptionId, } from './subscription-model.js';
4
+ export const BILLING_PAID_ADMISSION_CONTRACT_VERSION = 2;
5
+ export class BillingSubscriptionReconciliationConflictError extends Error {
6
+ code;
7
+ constructor(code, message) {
8
+ super(message);
9
+ this.name = 'BillingSubscriptionReconciliationConflictError';
10
+ this.code = code;
11
+ }
12
+ }
13
+ export function billingSubscriptionReconciliationContractError(message = 'paid subscription reconciliation violates the active commercial contract') {
14
+ return new BillingSubscriptionReconciliationConflictError('paid_subscription_contract_invalid', message);
15
+ }
16
+ export function requireCurrentlyEffectivePaidSubscription(revision, databaseTime) {
17
+ const now = canonicalInstant('subscription reconciliation database time', databaseTime);
18
+ const plan = getBillingPublicPlanVersion(revision.planVersionId);
19
+ if (plan === undefined ||
20
+ plan.planCode === 'free' ||
21
+ plan.effectiveFrom > revision.effectiveFrom ||
22
+ revision.effectiveFrom > now ||
23
+ now >= revision.effectiveUntil ||
24
+ revision.verifiedAt > now ||
25
+ revision.createdAt > now) {
26
+ throw billingSubscriptionReconciliationContractError('paid subscription reconciliation requires currently effective verified access');
27
+ }
28
+ }
29
+ export function normalizeBillingSubscriptionReconciliationRequest(input) {
30
+ if (input.schemaVersion !== 1) {
31
+ throw new Error('billing subscription reconciliation schema is invalid');
32
+ }
33
+ const billingAccountId = validateBillingAccountId(input.billingAccountId);
34
+ const revision = createBillingBaseSubscriptionRevision(input.revision);
35
+ if (revision.billingAccountId !== billingAccountId) {
36
+ throw new Error('subscription reconciliation must preserve its billing account');
37
+ }
38
+ if (revision.state !== 'active') {
39
+ throw new Error('paid subscription reconciliation currently requires active access');
40
+ }
41
+ const expectedActiveSnapshotVersion = positiveInteger('expected active snapshot version', input.expectedActiveSnapshotVersion);
42
+ const expectedCurrentBaseSubscription = normalizeCurrentSubscriptionExpectation(input.expectedCurrentBaseSubscription);
43
+ if (expectedCurrentBaseSubscription === null) {
44
+ if (revision.version !== 1) {
45
+ throw new Error('the first subscription reconciliation must create revision one');
46
+ }
47
+ }
48
+ else if (expectedCurrentBaseSubscription.subscriptionId !== revision.subscriptionId ||
49
+ revision.version !== expectedCurrentBaseSubscription.revisionVersion + 1) {
50
+ throw new Error('subscription reconciliation revisions must be sequential');
51
+ }
52
+ return Object.freeze({
53
+ schemaVersion: 1,
54
+ billingAccountId,
55
+ idempotencyKey: scalar('idempotency key', input.idempotencyKey),
56
+ expectedActiveSnapshotVersion,
57
+ expectedCurrentBaseSubscription,
58
+ snapshotId: validateSnapshotId(input.snapshotId),
59
+ revision,
60
+ });
61
+ }
62
+ export function billingSubscriptionReconciliationRequestFingerprint(request) {
63
+ return billingContentChecksum({
64
+ schemaVersion: request.schemaVersion,
65
+ billingAccountId: request.billingAccountId,
66
+ expectedActiveSnapshotVersion: request.expectedActiveSnapshotVersion,
67
+ expectedCurrentBaseSubscription: request.expectedCurrentBaseSubscription,
68
+ snapshotId: request.snapshotId,
69
+ revision: request.revision,
70
+ });
71
+ }
72
+ export function parseBillingSubscriptionReconciliationResult(value) {
73
+ const input = requireRecord('billing subscription reconciliation result', value);
74
+ if (input.schemaVersion !== 1) {
75
+ throw new Error('billing subscription reconciliation result schema is invalid');
76
+ }
77
+ return Object.freeze({
78
+ schemaVersion: 1,
79
+ billingAccountId: validateBillingAccountId(requireString(input, 'billingAccountId')),
80
+ subscriptionId: validateBillingSubscriptionId(requireString(input, 'subscriptionId')),
81
+ subscriptionRevisionVersion: positiveInteger('subscription revision version', requireNumber(input, 'subscriptionRevisionVersion')),
82
+ snapshotId: validateSnapshotId(requireString(input, 'snapshotId')),
83
+ snapshotVersion: positiveInteger('entitlement snapshot version', requireNumber(input, 'snapshotVersion')),
84
+ planVersionId: scalar('plan version id', requireString(input, 'planVersionId')),
85
+ reconciledAt: canonicalInstant('subscription reconciliation time', requireString(input, 'reconciledAt')),
86
+ replayed: requireBoolean(input, 'replayed'),
87
+ });
88
+ }
89
+ export function billingSubscriptionReconciliationSuccessAudit(result) {
90
+ return {
91
+ eventType: 'billing.subscription.reconciled',
92
+ org: 'platform',
93
+ actorSubject: 'system:billing-subscription-reconciliation',
94
+ decision: 'allow',
95
+ status: 201,
96
+ details: {
97
+ billingAccountId: result.billingAccountId,
98
+ planVersionId: result.planVersionId,
99
+ snapshotVersion: result.snapshotVersion,
100
+ subscriptionRevisionVersion: result.subscriptionRevisionVersion,
101
+ },
102
+ };
103
+ }
104
+ function normalizeCurrentSubscriptionExpectation(input) {
105
+ if (input === null)
106
+ return null;
107
+ return Object.freeze({
108
+ subscriptionId: validateBillingSubscriptionId(input.subscriptionId),
109
+ revisionVersion: positiveInteger('expected subscription revision version', input.revisionVersion),
110
+ });
111
+ }
112
+ function validateSnapshotId(value) {
113
+ if (!/^es_[0-9a-f-]{36}$/.test(value))
114
+ throw new Error('invalid entitlement snapshot id');
115
+ return value;
116
+ }
117
+ function positiveInteger(name, value) {
118
+ if (!Number.isSafeInteger(value) || value < 1)
119
+ throw new Error(`${name} must be positive`);
120
+ return value;
121
+ }
122
+ function canonicalInstant(name, value) {
123
+ const date = new Date(value);
124
+ if (!Number.isFinite(date.getTime()))
125
+ throw new Error(`${name} must be an ISO-8601 instant`);
126
+ return date.toISOString();
127
+ }
128
+ function scalar(name, value) {
129
+ const normalized = value.trim();
130
+ if (normalized.length === 0 ||
131
+ normalized.length > 512 ||
132
+ normalized !== value ||
133
+ [...normalized].some((character) => {
134
+ const code = character.charCodeAt(0);
135
+ return code <= 0x1f || code === 0x7f;
136
+ })) {
137
+ throw new Error(`${name} must be a non-empty scalar identifier`);
138
+ }
139
+ return normalized;
140
+ }
141
+ function requireRecord(name, value) {
142
+ if (value === null || typeof value !== 'object' || Array.isArray(value)) {
143
+ throw new Error(`${name} must be an object`);
144
+ }
145
+ return value;
146
+ }
147
+ function requireString(record, key) {
148
+ const value = record[key];
149
+ if (typeof value !== 'string')
150
+ throw new Error(`${key} must be a string`);
151
+ return value;
152
+ }
153
+ function requireNumber(record, key) {
154
+ const value = record[key];
155
+ if (typeof value !== 'number')
156
+ throw new Error(`${key} must be a number`);
157
+ return value;
158
+ }
159
+ function requireBoolean(record, key) {
160
+ const value = record[key];
161
+ if (typeof value !== 'boolean')
162
+ throw new Error(`${key} must be a boolean`);
163
+ return value;
164
+ }
165
+ //# sourceMappingURL=subscription-reconciliation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subscription-reconciliation.js","sourceRoot":"","sources":["../../src/billing/subscription-reconciliation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAs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,CAAC,MAA+B,EAAE,GAAW;IACjE,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;IAC1B,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,MAAM,IAAI,KAAK,CAAC,GAAG,GAAG,mBAAmB,CAAC,CAAC;IAC1E,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,cAAc,CAAC,MAA+B,EAAE,GAAW;IAClE,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;IAC1B,IAAI,OAAO,KAAK,KAAK,SAAS;QAAE,MAAM,IAAI,KAAK,CAAC,GAAG,GAAG,oBAAoB,CAAC,CAAC;IAC5E,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -14,9 +14,11 @@ export { BILLING_ENFORCEMENT_COHORT_LIFECYCLE_LOCK_KEY } from './billing/postgre
14
14
  export { BILLING_METER_VALIDATION_EPOCH_LIFECYCLE_LOCK_KEY, type BillingMeterValidationEpochPrepareBindings, type BillingMeterValidationEpochPreparePreflight, PostgresBillingMeterValidationEpochStore, type PostgresBillingMeterValidationEpochStoreOptions, } from './billing/postgres-meter-epochs.js';
15
15
  export { type BillingMeterMaintenanceResult, type BillingMeterReconciliationResult, PostgresBillingMeterReadinessStore, type PostgresBillingMeterReadinessStoreOptions, reconcileBillingMeterWindow, runBillingMeterMaintenance, } from './billing/postgres-meter-readiness.js';
16
16
  export { type BillingMeterValidationClassification, BillingMeterValidationIdempotencyConflictError, type BillingMeterValidationRecordInput, type BillingMeterValidationRecordOptions, type BillingMeterValidationRecordResult, recordBillingMeterValidationUsage, } from './billing/postgres-meter-validation.js';
17
+ export { PostgresBillingSubscriptionReconciliationStore, type PostgresBillingSubscriptionReconciliationStoreOptions, } from './billing/postgres-subscription-reconciliation.js';
17
18
  export { type BillingAccountResponse, BillingAccountResponseSchema, type BillingAccountSummary, type BillingAccountsListResponse, BillingAccountsListResponseSchema, BillingEntitlementsSchema, type OrgBillingResponse, OrgBillingResponseSchema, } from './billing/read-contract.js';
18
19
  export type { BillingAccountStore, EnsureDefaultBillingAccountInput, EnsureOrgBillingLinkInput, LegacyBillingAccountPreparationRecord, } from './billing/store.js';
19
20
  export { type BillingBaseSubscriptionRecord, type BillingBaseSubscriptionRevisionInput, type BillingBaseSubscriptionRevisionRecord, type BillingBaseSubscriptionState, type BillingInterval, type CreatePaidEntitlementSnapshotInput, createBillingBaseSubscriptionRevision, createPaidEntitlementSnapshot, parseBillingBaseSubscriptionRevision, parsePaidEntitlementSnapshot, validateBillingSubscriptionId, } from './billing/subscription-model.js';
21
+ export { BILLING_PAID_ADMISSION_CONTRACT_VERSION, type BillingCurrentBaseSubscriptionExpectation, type BillingSubscriptionReconciliationConflictCode, BillingSubscriptionReconciliationConflictError, type BillingSubscriptionReconciliationRequest, type BillingSubscriptionReconciliationResult, type BillingSubscriptionReconciliationStore, billingSubscriptionReconciliationRequestFingerprint, billingSubscriptionReconciliationSuccessAudit, normalizeBillingSubscriptionReconciliationRequest, parseBillingSubscriptionReconciliationResult, } from './billing/subscription-reconciliation.js';
20
22
  export { type BillingUsageAttribution, BillingUsageIdempotencyConflictError, type BillingUsageRead, type BillingUsageReadScope, type BillingUsageReceipt, type BillingUsageReportingRead, type BillingUsageStore, type BillingUsageUnavailableRead, DEFAULT_BILLING_USAGE_RETRY_WINDOW_MS, type GetBillingAccountUsageInput, type GetOrganizationBillingUsageInput, type RecordBillingUsageInput, unavailableBillingUsageRead, } from './billing/usage-store.js';
21
23
  export { type BillingUsageWindow, resolveUtcMonthlyUsageWindow, } from './billing/usage-window.js';
22
24
  //# sourceMappingURL=billing-public.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"billing-public.d.ts","sourceRoot":"","sources":["../src/billing-public.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,+BAA+B,EACpC,oCAAoC,GACrC,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,gDAAgD,EAChD,4CAA4C,EAC5C,kDAAkD,EAClD,6CAA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AAC;AACzC,OAAO,EACL,KAAK,uBAAuB,EAC5B,oCAAoC,EACpC,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,EACtB,KAAK,2BAA2B,EAChC,qCAAqC,EACrC,KAAK,2BAA2B,EAChC,KAAK,gCAAgC,EACrC,KAAK,uBAAuB,EAC5B,2BAA2B,GAC5B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,KAAK,kBAAkB,EACvB,4BAA4B,GAC7B,MAAM,2BAA2B,CAAC"}
1
+ {"version":3,"file":"billing-public.d.ts","sourceRoot":"","sources":["../src/billing-public.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,+BAA+B,EACpC,oCAAoC,GACrC,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,gDAAgD,EAChD,4CAA4C,EAC5C,kDAAkD,EAClD,6CAA6C,EAC7C,oCAAoC,EACpC,8BAA8B,EAC9B,KAAK,iCAAiC,EACtC,KAAK,oCAAoC,EACzC,0CAA0C,EAC1C,KAAK,wCAAwC,EAC7C,yCAAyC,EACzC,KAAK,0CAA0C,EAC/C,gDAAgD,EAChD,KAAK,qCAAqC,EAC1C,KAAK,mCAAmC,EACxC,yCAAyC,EACzC,KAAK,mCAAmC,EACxC,KAAK,kCAAkC,EACvC,wCAAwC,EACxC,KAAK,iCAAiC,EACtC,KAAK,iCAAiC,EACtC,4CAA4C,EAC5C,6BAA6B,EAC7B,sCAAsC,EACtC,sCAAsC,GACvC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACL,+BAA+B,EAC/B,0CAA0C,EAC1C,KAAK,sCAAsC,EAC3C,KAAK,oCAAoC,EACzC,qCAAqC,EACrC,KAAK,4BAA4B,EACjC,KAAK,mCAAmC,EACxC,yCAAyC,EACzC,KAAK,oCAAoC,EACzC,0CAA0C,EAC1C,KAAK,sCAAsC,EAC3C,4CAA4C,EAC5C,KAAK,6BAA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4B,GAC7B,MAAM,2BAA2B,CAAC"}
@@ -14,8 +14,10 @@ export { BILLING_ENFORCEMENT_COHORT_LIFECYCLE_LOCK_KEY } from './billing/postgre
14
14
  export { BILLING_METER_VALIDATION_EPOCH_LIFECYCLE_LOCK_KEY, PostgresBillingMeterValidationEpochStore, } from './billing/postgres-meter-epochs.js';
15
15
  export { PostgresBillingMeterReadinessStore, reconcileBillingMeterWindow, runBillingMeterMaintenance, } from './billing/postgres-meter-readiness.js';
16
16
  export { BillingMeterValidationIdempotencyConflictError, recordBillingMeterValidationUsage, } from './billing/postgres-meter-validation.js';
17
+ export { PostgresBillingSubscriptionReconciliationStore, } from './billing/postgres-subscription-reconciliation.js';
17
18
  export { BillingAccountResponseSchema, BillingAccountsListResponseSchema, BillingEntitlementsSchema, OrgBillingResponseSchema, } from './billing/read-contract.js';
18
19
  export { createBillingBaseSubscriptionRevision, createPaidEntitlementSnapshot, parseBillingBaseSubscriptionRevision, parsePaidEntitlementSnapshot, validateBillingSubscriptionId, } from './billing/subscription-model.js';
20
+ export { BILLING_PAID_ADMISSION_CONTRACT_VERSION, BillingSubscriptionReconciliationConflictError, billingSubscriptionReconciliationRequestFingerprint, billingSubscriptionReconciliationSuccessAudit, normalizeBillingSubscriptionReconciliationRequest, parseBillingSubscriptionReconciliationResult, } from './billing/subscription-reconciliation.js';
19
21
  export { BillingUsageIdempotencyConflictError, DEFAULT_BILLING_USAGE_RETRY_WINDOW_MS, unavailableBillingUsageRead, } from './billing/usage-store.js';
20
22
  export { resolveUtcMonthlyUsageWindow, } from './billing/usage-window.js';
21
23
  //# sourceMappingURL=billing-public.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"billing-public.js","sourceRoot":"","sources":["../src/billing-public.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,oCAAoC,GACrC,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,gDAAgD,EAChD,4CAA4C,EAC5C,kDAAkD,EAClD,6CAA6C,EAC7C,oCAAoC,EAC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2C,CAAC;AAC1G,OAAO,EACL,iDAAiD,EAGjD,wCAAwC,GAEzC,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAGL,kCAAkC,EAElC,2BAA2B,EAC3B,0BAA0B,GAC3B,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAEL,8CAA8C,EAI9C,iCAAiC,GAClC,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,8CAA8C,GAE/C,MAAM,mDAAmD,CAAC;AAC3D,OAAO,EAEL,4BAA4B,EAG5B,iCAAiC,EACjC,yBAAyB,EAEzB,wBAAwB,GACzB,MAAM,4BAA4B,CAAC;AAOpC,OAAO,EAOL,qCAAqC,EACrC,6BAA6B,EAC7B,oCAAoC,EACpC,4BAA4B,EAC5B,6BAA6B,GAC9B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,uCAAuC,EAGvC,8CAA8C,EAI9C,mDAAmD,EACnD,6CAA6C,EAC7C,iDAAiD,EACjD,4CAA4C,GAC7C,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAEL,oCAAoC,EAOpC,qCAAqC,EAIrC,2BAA2B,GAC5B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAEL,4BAA4B,GAC7B,MAAM,2BAA2B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noodleseed/one",
3
- "version": "0.53.0",
3
+ "version": "0.55.0",
4
4
  "private": false,
5
5
  "description": "Noodle CLI by Noodle Seed — author, run, and deploy declarative MCP servers. Embedding the assistant in your own web app is @noodleseed/assistant.",
6
6
  "license": "Apache-2.0",