@noodleseed/one 0.52.0 → 0.53.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 (36) hide show
  1. package/node_modules/@noodle-borg/agent-kit/package.json +1 -1
  2. package/node_modules/@noodle-borg/service/dist/billing/commercial-entitlements.d.ts +8 -0
  3. package/node_modules/@noodle-borg/service/dist/billing/commercial-entitlements.d.ts.map +1 -1
  4. package/node_modules/@noodle-borg/service/dist/billing/commercial-entitlements.js +49 -0
  5. package/node_modules/@noodle-borg/service/dist/billing/commercial-entitlements.js.map +1 -1
  6. package/node_modules/@noodle-borg/service/dist/billing/in-memory.d.ts.map +1 -1
  7. package/node_modules/@noodle-borg/service/dist/billing/in-memory.js +3 -2
  8. package/node_modules/@noodle-borg/service/dist/billing/in-memory.js.map +1 -1
  9. package/node_modules/@noodle-borg/service/dist/billing/model.d.ts +16 -3
  10. package/node_modules/@noodle-borg/service/dist/billing/model.d.ts.map +1 -1
  11. package/node_modules/@noodle-borg/service/dist/billing/model.js +1 -0
  12. package/node_modules/@noodle-borg/service/dist/billing/model.js.map +1 -1
  13. package/node_modules/@noodle-borg/service/dist/billing/paid-plan-catalog.d.ts +25 -0
  14. package/node_modules/@noodle-borg/service/dist/billing/paid-plan-catalog.d.ts.map +1 -0
  15. package/node_modules/@noodle-borg/service/dist/billing/paid-plan-catalog.js +87 -0
  16. package/node_modules/@noodle-borg/service/dist/billing/paid-plan-catalog.js.map +1 -0
  17. package/node_modules/@noodle-borg/service/dist/billing/postgres-records.d.ts +4 -0
  18. package/node_modules/@noodle-borg/service/dist/billing/postgres-records.d.ts.map +1 -1
  19. package/node_modules/@noodle-borg/service/dist/billing/postgres-records.js +38 -9
  20. package/node_modules/@noodle-borg/service/dist/billing/postgres-records.js.map +1 -1
  21. package/node_modules/@noodle-borg/service/dist/billing/postgres-schema.d.ts.map +1 -1
  22. package/node_modules/@noodle-borg/service/dist/billing/postgres-schema.js +28 -21
  23. package/node_modules/@noodle-borg/service/dist/billing/postgres-schema.js.map +1 -1
  24. package/node_modules/@noodle-borg/service/dist/billing/postgres-subscription-schema.d.ts +4 -0
  25. package/node_modules/@noodle-borg/service/dist/billing/postgres-subscription-schema.d.ts.map +1 -0
  26. package/node_modules/@noodle-borg/service/dist/billing/postgres-subscription-schema.js +319 -0
  27. package/node_modules/@noodle-borg/service/dist/billing/postgres-subscription-schema.js.map +1 -0
  28. package/node_modules/@noodle-borg/service/dist/billing/subscription-model.d.ts +40 -0
  29. package/node_modules/@noodle-borg/service/dist/billing/subscription-model.d.ts.map +1 -0
  30. package/node_modules/@noodle-borg/service/dist/billing/subscription-model.js +380 -0
  31. package/node_modules/@noodle-borg/service/dist/billing/subscription-model.js.map +1 -0
  32. package/node_modules/@noodle-borg/service/dist/billing-public.d.ts +4 -1
  33. package/node_modules/@noodle-borg/service/dist/billing-public.d.ts.map +1 -1
  34. package/node_modules/@noodle-borg/service/dist/billing-public.js +3 -0
  35. package/node_modules/@noodle-borg/service/dist/billing-public.js.map +1 -1
  36. package/package.json +1 -1
@@ -0,0 +1,380 @@
1
+ import { parseBillingCommercialV2Entitlements } from './commercial-entitlements.js';
2
+ import { billingContentChecksum, validateBillingAccountId, } from './model.js';
3
+ import { getBillingPublicPlanVersion } from './paid-plan-catalog.js';
4
+ const BILLING_PAYMENT_GRACE_DURATION_MS = 7 * 24 * 60 * 60 * 1_000;
5
+ export function createBillingBaseSubscriptionRevision(input) {
6
+ const content = normalizeSubscriptionRevisionContent(input);
7
+ return Object.freeze({
8
+ ...content,
9
+ contentChecksum: billingContentChecksum(content),
10
+ });
11
+ }
12
+ export function parseBillingBaseSubscriptionRevision(value) {
13
+ const input = requireRecord('subscription revision', value);
14
+ if (input.schemaVersion !== 1)
15
+ throw new Error('subscription revision schema is invalid');
16
+ const content = normalizeSubscriptionRevisionContent({
17
+ subscriptionId: requireString(input, 'subscriptionId'),
18
+ billingAccountId: requireString(input, 'billingAccountId'),
19
+ version: requireNumber(input, 'version'),
20
+ planVersionId: requireString(input, 'planVersionId'),
21
+ state: requireString(input, 'state'),
22
+ billingInterval: requireString(input, 'billingInterval'),
23
+ currency: requireString(input, 'currency'),
24
+ baseAmountMinor: requireNumber(input, 'baseAmountMinor'),
25
+ currentPeriodStart: requireString(input, 'currentPeriodStart'),
26
+ currentPeriodEnd: requireString(input, 'currentPeriodEnd'),
27
+ effectiveFrom: requireString(input, 'effectiveFrom'),
28
+ effectiveUntil: requireString(input, 'effectiveUntil'),
29
+ renews: requireBoolean(input, 'renews'),
30
+ verifiedAt: requireString(input, 'verifiedAt'),
31
+ createdAt: requireString(input, 'createdAt'),
32
+ });
33
+ const checksum = requireString(input, 'contentChecksum');
34
+ if (billingContentChecksum(content) !== checksum) {
35
+ throw new Error('subscription revision failed checksum verification');
36
+ }
37
+ return Object.freeze({ ...content, contentChecksum: checksum });
38
+ }
39
+ export function createPaidEntitlementSnapshot(input) {
40
+ const sourceSubscription = parseBillingBaseSubscriptionRevision(input.sourceSubscription);
41
+ const previousSnapshot = validatePreviousEntitlementSnapshot(input.previousSnapshot);
42
+ if (previousSnapshot.billingAccountId !== sourceSubscription.billingAccountId) {
43
+ throw new Error('paid entitlement snapshot must preserve its billing account');
44
+ }
45
+ if (input.version !== previousSnapshot.version + 1) {
46
+ throw new Error('paid entitlement snapshot version must follow the previous snapshot');
47
+ }
48
+ const plan = getCanonicalPaidPlan(sourceSubscription.planVersionId);
49
+ const commercial = parseBillingCommercialV2Entitlements(plan.entitlements);
50
+ if (commercial.planCode === 'free' || commercial.planCode !== plan.planCode) {
51
+ throw new Error('paid entitlement snapshot requires a canonical paid plan');
52
+ }
53
+ const content = normalizePaidSnapshotContent({
54
+ id: input.id,
55
+ schemaVersion: 2,
56
+ billingAccountId: sourceSubscription.billingAccountId,
57
+ version: input.version,
58
+ planVersionId: plan.id,
59
+ planCode: plan.planCode,
60
+ planVersion: plan.version,
61
+ sourceKind: 'subscription',
62
+ generationReason: 'subscription-reconciled',
63
+ verificationStatus: 'verified',
64
+ sourceSubscriptionId: sourceSubscription.subscriptionId,
65
+ sourceSubscriptionVersion: sourceSubscription.version,
66
+ effectiveFrom: sourceSubscription.effectiveFrom,
67
+ effectiveUntil: sourceSubscription.effectiveUntil,
68
+ monthlyUsageAnchor: previousSnapshot.monthlyUsageAnchor,
69
+ entitlements: plan.entitlements,
70
+ verifiedAt: sourceSubscription.verifiedAt,
71
+ createdAt: sourceSubscription.createdAt,
72
+ });
73
+ return Object.freeze({
74
+ ...content,
75
+ contentChecksum: paidSnapshotChecksum(content),
76
+ });
77
+ }
78
+ function validatePreviousEntitlementSnapshot(snapshot) {
79
+ if (snapshot.schemaVersion === 2)
80
+ return parsePaidEntitlementSnapshot(snapshot);
81
+ if (snapshot.schemaVersion !== 1 ||
82
+ snapshot.sourceKind !== 'system-free' ||
83
+ snapshot.generationReason !== 'default-account-created' ||
84
+ snapshot.verificationStatus !== 'verified') {
85
+ throw new Error('previous entitlement snapshot provenance is invalid');
86
+ }
87
+ const plan = getBillingPublicPlanVersion(snapshot.planVersionId);
88
+ if (plan === undefined ||
89
+ plan.planCode !== 'free' ||
90
+ snapshot.planCode !== plan.planCode ||
91
+ snapshot.planVersion !== plan.version ||
92
+ billingContentChecksum(snapshot.entitlements) !== billingContentChecksum(plan.entitlements)) {
93
+ throw new Error('previous entitlement snapshot does not match the canonical Free plan');
94
+ }
95
+ const contentChecksum = billingContentChecksum({
96
+ billingAccountId: snapshot.billingAccountId,
97
+ version: snapshot.version,
98
+ planVersionId: snapshot.planVersionId,
99
+ effectiveFrom: snapshot.effectiveFrom,
100
+ monthlyUsageAnchor: snapshot.monthlyUsageAnchor,
101
+ entitlements: snapshot.entitlements,
102
+ });
103
+ if (contentChecksum !== snapshot.contentChecksum) {
104
+ throw new Error('previous entitlement snapshot failed checksum verification');
105
+ }
106
+ validateEntitlementSnapshotId(snapshot.id);
107
+ validateBillingAccountId(snapshot.billingAccountId);
108
+ positiveInteger('previous entitlement snapshot version', snapshot.version);
109
+ const effectiveFrom = canonicalInstant('previous entitlement start', snapshot.effectiveFrom);
110
+ const monthlyUsageAnchor = canonicalInstant('previous monthly usage anchor', snapshot.monthlyUsageAnchor);
111
+ const verifiedAt = canonicalInstant('previous entitlement verified at', snapshot.verifiedAt);
112
+ const createdAt = canonicalInstant('previous entitlement created at', snapshot.createdAt);
113
+ if (monthlyUsageAnchor > effectiveFrom || verifiedAt < effectiveFrom || createdAt < verifiedAt) {
114
+ throw new Error('previous entitlement snapshot timing is invalid');
115
+ }
116
+ return snapshot;
117
+ }
118
+ export function parsePaidEntitlementSnapshot(value) {
119
+ const input = requireRecord('paid entitlement snapshot', value);
120
+ const content = normalizePaidSnapshotContent({
121
+ id: requireString(input, 'id'),
122
+ schemaVersion: requireNumber(input, 'schemaVersion'),
123
+ billingAccountId: requireString(input, 'billingAccountId'),
124
+ version: requireNumber(input, 'version'),
125
+ planVersionId: requireString(input, 'planVersionId'),
126
+ planCode: requireString(input, 'planCode'),
127
+ planVersion: requireNumber(input, 'planVersion'),
128
+ sourceKind: requireString(input, 'sourceKind'),
129
+ generationReason: requireString(input, 'generationReason'),
130
+ verificationStatus: requireString(input, 'verificationStatus'),
131
+ sourceSubscriptionId: requireString(input, 'sourceSubscriptionId'),
132
+ sourceSubscriptionVersion: requireNumber(input, 'sourceSubscriptionVersion'),
133
+ effectiveFrom: requireString(input, 'effectiveFrom'),
134
+ effectiveUntil: requireString(input, 'effectiveUntil'),
135
+ monthlyUsageAnchor: requireString(input, 'monthlyUsageAnchor'),
136
+ entitlements: requireEntitlements(input.entitlements),
137
+ verifiedAt: requireString(input, 'verifiedAt'),
138
+ createdAt: requireString(input, 'createdAt'),
139
+ });
140
+ const checksum = requireString(input, 'contentChecksum');
141
+ if (paidSnapshotChecksum(content) !== checksum) {
142
+ throw new Error('paid entitlement snapshot failed checksum verification');
143
+ }
144
+ const plan = getCanonicalPaidPlan(content.planVersionId);
145
+ if (content.planCode !== plan.planCode ||
146
+ content.planVersion !== plan.version ||
147
+ billingContentChecksum(content.entitlements) !== billingContentChecksum(plan.entitlements)) {
148
+ throw new Error('paid entitlement snapshot does not match the canonical paid plan');
149
+ }
150
+ return Object.freeze({ ...content, contentChecksum: checksum });
151
+ }
152
+ function getCanonicalPaidPlan(planVersionId) {
153
+ const plan = getBillingPublicPlanVersion(planVersionId);
154
+ if (plan === undefined || plan.planCode === 'free') {
155
+ throw new Error('paid entitlement snapshot requires a canonical paid plan');
156
+ }
157
+ const contentChecksum = billingContentChecksum({
158
+ id: plan.id,
159
+ planCode: plan.planCode,
160
+ version: plan.version,
161
+ effectiveFrom: plan.effectiveFrom,
162
+ entitlements: plan.entitlements,
163
+ });
164
+ if (contentChecksum !== plan.contentChecksum) {
165
+ throw new Error('canonical paid plan failed checksum verification');
166
+ }
167
+ return plan;
168
+ }
169
+ function normalizeSubscriptionRevisionContent(input) {
170
+ const state = input.state;
171
+ if (state !== 'active' && state !== 'payment_grace' && state !== 'ended') {
172
+ throw new Error('subscription state is invalid');
173
+ }
174
+ if (input.billingInterval !== 'month' && input.billingInterval !== 'year') {
175
+ throw new Error('billing interval is invalid');
176
+ }
177
+ if (input.currency !== 'usd')
178
+ throw new Error('subscription currency is invalid');
179
+ if (input.planVersionId !== 'pro@1' && input.planVersionId !== 'scale@1') {
180
+ throw new Error('subscription revision requires a paid public plan');
181
+ }
182
+ if (!Number.isSafeInteger(input.baseAmountMinor) || input.baseAmountMinor < 0) {
183
+ throw new Error('base amount minor must be a non-negative safe integer');
184
+ }
185
+ if (state === 'ended' && input.renews)
186
+ throw new Error('ended subscriptions cannot renew');
187
+ const currentPeriodStart = canonicalInstant('subscription period start', input.currentPeriodStart);
188
+ const currentPeriodEnd = canonicalInstant('subscription period end', input.currentPeriodEnd);
189
+ if (currentPeriodEnd <= currentPeriodStart) {
190
+ throw new Error('subscription period end must be after its start');
191
+ }
192
+ const effectiveFrom = canonicalInstant('subscription effective start', input.effectiveFrom);
193
+ const effectiveUntil = canonicalInstant('subscription effective end', input.effectiveUntil);
194
+ if (effectiveUntil <= effectiveFrom) {
195
+ throw new Error('subscription effective end must be after its start');
196
+ }
197
+ const verifiedAt = canonicalInstant('subscription verified at', input.verifiedAt);
198
+ const createdAt = canonicalInstant('subscription created at', input.createdAt);
199
+ if (verifiedAt < effectiveFrom) {
200
+ throw new Error('subscription cannot be verified before access starts');
201
+ }
202
+ if (createdAt < verifiedAt) {
203
+ throw new Error('subscription record cannot predate verification');
204
+ }
205
+ if (state === 'active' && effectiveUntil !== currentPeriodEnd) {
206
+ throw new Error('active subscription access must end with its current paid period');
207
+ }
208
+ if (state === 'payment_grace') {
209
+ const expectedGraceEnd = new Date(new Date(currentPeriodEnd).getTime() + BILLING_PAYMENT_GRACE_DURATION_MS).toISOString();
210
+ if (effectiveUntil !== expectedGraceEnd) {
211
+ throw new Error('payment grace must extend the paid period by exactly seven days');
212
+ }
213
+ if (verifiedAt < currentPeriodEnd) {
214
+ throw new Error('payment grace cannot be verified before the paid period ends');
215
+ }
216
+ }
217
+ if (state === 'ended' && verifiedAt < effectiveUntil) {
218
+ throw new Error('ended subscription cannot be verified before access ends');
219
+ }
220
+ return Object.freeze({
221
+ schemaVersion: 1,
222
+ subscriptionId: validateBillingSubscriptionId(input.subscriptionId),
223
+ billingAccountId: validateBillingAccountId(input.billingAccountId),
224
+ version: positiveInteger('subscription revision version', input.version),
225
+ planVersionId: scalar('plan version id', input.planVersionId),
226
+ state,
227
+ billingInterval: input.billingInterval,
228
+ currency: input.currency,
229
+ baseAmountMinor: input.baseAmountMinor,
230
+ currentPeriodStart,
231
+ currentPeriodEnd,
232
+ effectiveFrom,
233
+ effectiveUntil,
234
+ renews: input.renews,
235
+ verifiedAt,
236
+ createdAt,
237
+ });
238
+ }
239
+ function normalizePaidSnapshotContent(input) {
240
+ if (input.schemaVersion !== 2 ||
241
+ input.sourceKind !== 'subscription' ||
242
+ input.generationReason !== 'subscription-reconciled' ||
243
+ input.verificationStatus !== 'verified') {
244
+ throw new Error('paid entitlement snapshot provenance is invalid');
245
+ }
246
+ const commercial = parseBillingCommercialV2Entitlements(input.entitlements);
247
+ if (commercial.planCode === 'free' || commercial.planCode !== input.planCode) {
248
+ throw new Error('paid entitlement snapshot plan is invalid');
249
+ }
250
+ if (input.planVersion !== 1 || input.planVersionId !== `${commercial.planCode}@1`) {
251
+ throw new Error('paid entitlement snapshot plan version is invalid');
252
+ }
253
+ const effectiveFrom = canonicalInstant('paid entitlement start', input.effectiveFrom);
254
+ const effectiveUntil = canonicalInstant('paid entitlement end', input.effectiveUntil);
255
+ if (effectiveUntil <= effectiveFrom) {
256
+ throw new Error('paid entitlement end must be after its start');
257
+ }
258
+ const monthlyUsageAnchor = canonicalInstant('monthly usage anchor', input.monthlyUsageAnchor);
259
+ const verifiedAt = canonicalInstant('paid entitlement verified at', input.verifiedAt);
260
+ const createdAt = canonicalInstant('paid entitlement created at', input.createdAt);
261
+ if (monthlyUsageAnchor > effectiveFrom) {
262
+ throw new Error('monthly usage anchor cannot start after paid access');
263
+ }
264
+ if (verifiedAt < effectiveFrom) {
265
+ throw new Error('paid entitlement cannot be verified before access starts');
266
+ }
267
+ if (createdAt < verifiedAt) {
268
+ throw new Error('paid entitlement record cannot predate verification');
269
+ }
270
+ return Object.freeze({
271
+ id: validateEntitlementSnapshotId(input.id),
272
+ schemaVersion: 2,
273
+ billingAccountId: validateBillingAccountId(input.billingAccountId),
274
+ version: positiveInteger('entitlement snapshot version', input.version),
275
+ planVersionId: scalar('plan version id', input.planVersionId),
276
+ planCode: commercial.planCode,
277
+ planVersion: positiveInteger('plan version', input.planVersion),
278
+ sourceKind: 'subscription',
279
+ generationReason: 'subscription-reconciled',
280
+ verificationStatus: 'verified',
281
+ sourceSubscriptionId: validateBillingSubscriptionId(input.sourceSubscriptionId),
282
+ sourceSubscriptionVersion: positiveInteger('source subscription version', input.sourceSubscriptionVersion),
283
+ effectiveFrom,
284
+ effectiveUntil,
285
+ monthlyUsageAnchor,
286
+ entitlements: Object.freeze({ ...input.entitlements }),
287
+ verifiedAt,
288
+ createdAt,
289
+ });
290
+ }
291
+ function paidSnapshotChecksum(snapshot) {
292
+ return billingContentChecksum({
293
+ schemaVersion: snapshot.schemaVersion,
294
+ billingAccountId: snapshot.billingAccountId,
295
+ version: snapshot.version,
296
+ planVersionId: snapshot.planVersionId,
297
+ sourceKind: snapshot.sourceKind,
298
+ generationReason: snapshot.generationReason,
299
+ sourceSubscriptionId: snapshot.sourceSubscriptionId,
300
+ sourceSubscriptionVersion: snapshot.sourceSubscriptionVersion,
301
+ effectiveFrom: snapshot.effectiveFrom,
302
+ effectiveUntil: snapshot.effectiveUntil,
303
+ monthlyUsageAnchor: snapshot.monthlyUsageAnchor,
304
+ entitlements: snapshot.entitlements,
305
+ });
306
+ }
307
+ export function validateBillingSubscriptionId(value) {
308
+ if (!/^bs_[0-9a-f-]{36}$/.test(value))
309
+ throw new Error('invalid billing subscription id');
310
+ return value;
311
+ }
312
+ function validateEntitlementSnapshotId(value) {
313
+ if (!/^es_[0-9a-f-]{36}$/.test(value))
314
+ throw new Error('invalid entitlement snapshot id');
315
+ return value;
316
+ }
317
+ function positiveInteger(name, value) {
318
+ if (!Number.isSafeInteger(value) || value < 1)
319
+ throw new Error(`${name} must be positive`);
320
+ return value;
321
+ }
322
+ function canonicalInstant(name, value) {
323
+ const date = new Date(value);
324
+ if (!Number.isFinite(date.getTime()) || date.toISOString() !== value) {
325
+ throw new Error(`${name} must be a canonical ISO-8601 instant`);
326
+ }
327
+ return value;
328
+ }
329
+ function scalar(name, value) {
330
+ const normalized = value.trim();
331
+ if (normalized.length === 0 ||
332
+ normalized.length > 512 ||
333
+ normalized !== value ||
334
+ [...normalized].some((character) => {
335
+ const code = character.charCodeAt(0);
336
+ return code <= 0x1f || code === 0x7f;
337
+ })) {
338
+ throw new Error(`${name} must be a non-empty scalar identifier`);
339
+ }
340
+ return normalized;
341
+ }
342
+ function requireRecord(name, value) {
343
+ if (value === null || typeof value !== 'object' || Array.isArray(value)) {
344
+ throw new Error(`${name} must be an object`);
345
+ }
346
+ return value;
347
+ }
348
+ function requireString(record, key) {
349
+ const value = record[key];
350
+ if (typeof value !== 'string')
351
+ throw new Error(`${key} must be a string`);
352
+ return value;
353
+ }
354
+ function requireNumber(record, key) {
355
+ const value = record[key];
356
+ if (typeof value !== 'number')
357
+ throw new Error(`${key} must be a number`);
358
+ return value;
359
+ }
360
+ function requireBoolean(record, key) {
361
+ const value = record[key];
362
+ if (typeof value !== 'boolean')
363
+ throw new Error(`${key} must be a boolean`);
364
+ return value;
365
+ }
366
+ function requireEntitlements(value) {
367
+ const record = requireRecord('paid entitlements', value);
368
+ const entitlements = {};
369
+ for (const [key, candidate] of Object.entries(record)) {
370
+ if (candidate !== null &&
371
+ typeof candidate !== 'boolean' &&
372
+ typeof candidate !== 'string' &&
373
+ (typeof candidate !== 'number' || !Number.isFinite(candidate))) {
374
+ throw new Error(`paid entitlement ${key} is invalid`);
375
+ }
376
+ entitlements[key] = candidate;
377
+ }
378
+ return Object.freeze(entitlements);
379
+ }
380
+ //# sourceMappingURL=subscription-model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subscription-model.js","sourceRoot":"","sources":["../../src/billing/subscription-model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oCAAoC,EAAE,MAAM,8BAA8B,CAAC;AACpF,OAAO,EAEL,sBAAsB,EAGtB,wBAAwB,GACzB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAKrE,MAAM,iCAAiC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC;AAsCnE,MAAM,UAAU,qCAAqC,CACnD,KAA2C;IAE3C,MAAM,OAAO,GAAG,oCAAoC,CAAC,KAAK,CAAC,CAAC;IAC5D,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,GAAG,OAAO;QACV,eAAe,EAAE,sBAAsB,CAAC,OAAO,CAAC;KACjD,CAAC,CAAC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C;QACtD,IACE,SAAS,KAAK,IAAI;YAClB,OAAO,SAAS,KAAK,SAAS;YAC9B,OAAO,SAAS,KAAK,QAAQ;YAC7B,CAAC,OAAO,SAAS,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,EAC9D,CAAC;YACD,MAAM,IAAI,KAAK,CAAC,oBAAoB,GAAG,aAAa,CAAC,CAAC;QACxD,CAAC;QACD,YAAY,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC;IAChC,CAAC;IACD,OAAO,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;AACrC,CAAC"}
@@ -1,3 +1,4 @@
1
+ export { type BillingCommercialV2Entitlements, parseBillingCommercialV2Entitlements, } from './billing/commercial-entitlements.js';
1
2
  export { BILLING_AUTHORITATIVE_ADMISSION_CONTRACT_VERSION, BILLING_ENFORCEMENT_ACTIVATION_BLOCKER_CODES, BILLING_ENFORCEMENT_ACTIVATION_EVIDENCE_MAX_AGE_MS, BILLING_ENFORCEMENT_ACTIVATION_SCHEMA_VERSION, BILLING_ENFORCEMENT_COMMERCIAL_SCOPE, BILLING_ENFORCEMENT_PAID_PLANS, type BillingEnforcementActivateRequest, type BillingEnforcementActivationApproval, BillingEnforcementActivationApprovalSchema, type BillingEnforcementActivationConflictCode, BillingEnforcementActivationConflictError, type BillingEnforcementActivationMutationResult, BillingEnforcementActivationMutationResultSchema, type BillingEnforcementActivationPreflight, type BillingEnforcementActivationPreview, BillingEnforcementActivationPreviewSchema, type BillingEnforcementActivationSignals, type BillingEnforcementActivationStatus, BillingEnforcementActivationStatusSchema, type BillingEnforcementActivationStore, type BillingEnforcementRollbackRequest, billingEnforcementActivationApprovalChecksum, normalizeActivationServiceUrl, parseBillingEnforcementActivateRequest, parseBillingEnforcementRollbackRequest, } from './billing/enforcement-activation.js';
2
3
  export { BILLING_ENFORCEMENT_COHORT_KIND, BILLING_ENFORCEMENT_PROFILE_SCHEMA_VERSION, type BillingAccountEnforcementProfileRecord, type BillingEnforcementCohortConflictCode, BillingEnforcementCohortConflictError, type BillingEnforcementCohortKind, type BillingEnforcementCohortSealRequest, BillingEnforcementCohortSealRequestSchema, type BillingEnforcementCohortSealResponse, BillingEnforcementCohortSealResponseSchema, type BillingEnforcementCohortStatusResponse, BillingEnforcementCohortStatusResponseSchema, type BillingEnforcementProfileMode, type BillingEnforcementProfileSource, type BillingEnforcementProfileStore, billingEnforcementCohortRequestFingerprint, billingEnforcementCohortSuccessAudit, LEGACY_INTERNAL_ENFORCEMENT_PROFILE, normalizeBillingEnforcementServiceUrl, POST_SEAL_ENFORCEMENT_PROFILE, parseBillingEnforcementCohortSealRequest, } from './billing/enforcement-profile.js';
3
4
  export { BILLING_METER_CAPACITY_TARGET, BILLING_METER_PLAN_MONTHLY_CALLS, type BillingMeterCapacityEvaluation, type BillingMeterCapacityScenarioName, type BillingMeterCapacityScenarioResult, type BillingMeterRelationStorage, type BillingMeterRetainedStorageProjection, type BillingMeterStorageEvidence, type BillingMeterStorageSample, billingMeterPercentile, buildBillingMeterStorageEvidence, evaluateBillingMeterCapacity, presentBillingMeterCapacityScenario, } from './billing/meter-capacity.js';
@@ -5,7 +6,8 @@ export { BILLING_METER_LATER_CUTOVER_GATES, BILLING_METER_READINESS_CHECK_CODES,
5
6
  export { BILLING_METER_VALIDATION_WRITER_CONTRACT_VERSION, type BillingMeterValidationEpochConflictCode, BillingMeterValidationEpochConflictError, type BillingMeterValidationEpochPrepareRequest, type BillingMeterValidationEpochResult, BillingMeterValidationEpochResultSchema, type BillingMeterValidationEpochRetireRequest, type BillingMeterValidationEpochStore, billingMeterValidationEpochRequestFingerprint, billingMeterValidationEpochSuccessAudit, normalizeBillingMeterServiceUrl, parseBillingMeterValidationEpochPrepareRequest, parseBillingMeterValidationEpochRetireRequest, } from './billing/meter-validation-epoch.js';
6
7
  export { type LegacyBillingMigrationBlocker, type LegacyBillingMigrationBlockerCode, type LegacyBillingMigrationMapping, type LegacyBillingMigrationPreview, type LegacyBillingMigrationRequest, type LegacyProductionAppIdentity, legacyBillingMigrationMappingChecksum, legacyBillingMigrationPreviewChecksum, parseLegacyBillingMigrationRequest, previewLegacyBillingMigration, } from './billing/migration.js';
7
8
  export { type LegacyBillingMigrationApplyRequest, type LegacyBillingMigrationApplyResult, type LegacyBillingMigrationConflictCode, LegacyBillingMigrationConflictError, type LegacyBillingMigrationStore, type LegacyBillingPlanEvidence, legacyBillingMigrationPlanEvidenceChecksum, normalizeBillingMigrationServiceUrl, parseLegacyBillingMigrationApplyRequest, parseLegacyBillingMigrationPlanEvidence, } from './billing/migration-apply.js';
8
- export { type BillingAccountMemberRecord, type BillingAccountMemberRole, type BillingAccountRecord, type BillingAccountState, type BillingEntitlements, type BillingIdentityRef, type EntitlementSnapshotRecord, FREE_ENTITLEMENTS, FREE_PLAN_VERSION, GOOGLE_CONTROL_PLANE_ISSUER, type OrgBillingLinkRecord, type PlanVersionRecord, } from './billing/model.js';
9
+ export { type BillingAccountMemberRecord, type BillingAccountMemberRole, type BillingAccountRecord, type BillingAccountState, type BillingEntitlements, type BillingIdentityRef, type EntitlementSnapshotRecord, FREE_ENTITLEMENTS, FREE_PLAN_VERSION, type FreeEntitlementSnapshotRecord, GOOGLE_CONTROL_PLANE_ISSUER, type OrgBillingLinkRecord, type PaidEntitlementSnapshotRecord, type PlanVersionRecord, } from './billing/model.js';
10
+ export { BILLING_PUBLIC_PLAN_VERSIONS, BILLING_STARTED_OVERAGE_POLICY, type BillableOverage, type BillingStartedOveragePolicy, calculateBillableOverage, PAID_PLAN_VERSIONS, PRO_ENTITLEMENTS, PRO_PLAN_VERSION, SCALE_ENTITLEMENTS, SCALE_PLAN_VERSION, } from './billing/paid-plan-catalog.js';
9
11
  export { PostgresBillingEnforcementActivationStore, type PostgresBillingEnforcementActivationStoreOptions, } from './billing/postgres-enforcement-activation.js';
10
12
  export { createPostgresBillingEnforcementActivationPreflight, type PostgresBillingEnforcementActivationPreflightOptions, } from './billing/postgres-enforcement-activation-preflight.js';
11
13
  export { BILLING_ENFORCEMENT_COHORT_LIFECYCLE_LOCK_KEY } from './billing/postgres-enforcement-profile.js';
@@ -14,6 +16,7 @@ export { type BillingMeterMaintenanceResult, type BillingMeterReconciliationResu
14
16
  export { type BillingMeterValidationClassification, BillingMeterValidationIdempotencyConflictError, type BillingMeterValidationRecordInput, type BillingMeterValidationRecordOptions, type BillingMeterValidationRecordResult, recordBillingMeterValidationUsage, } from './billing/postgres-meter-validation.js';
15
17
  export { type BillingAccountResponse, BillingAccountResponseSchema, type BillingAccountSummary, type BillingAccountsListResponse, BillingAccountsListResponseSchema, BillingEntitlementsSchema, type OrgBillingResponse, OrgBillingResponseSchema, } from './billing/read-contract.js';
16
18
  export type { BillingAccountStore, EnsureDefaultBillingAccountInput, EnsureOrgBillingLinkInput, LegacyBillingAccountPreparationRecord, } from './billing/store.js';
19
+ export { type BillingBaseSubscriptionRecord, type BillingBaseSubscriptionRevisionInput, type BillingBaseSubscriptionRevisionRecord, type BillingBaseSubscriptionState, type BillingInterval, type CreatePaidEntitlementSnapshotInput, createBillingBaseSubscriptionRevision, createPaidEntitlementSnapshot, parseBillingBaseSubscriptionRevision, parsePaidEntitlementSnapshot, validateBillingSubscriptionId, } from './billing/subscription-model.js';
17
20
  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';
18
21
  export { type BillingUsageWindow, resolveUtcMonthlyUsageWindow, } from './billing/usage-window.js';
19
22
  //# 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,E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,qCAAqC,EAC1C,KAAK,4BAA4B,EACjC,KAAK,eAAe,EACpB,KAAK,kCAAkC,EACvC,qCAAqC,EACrC,6BAA6B,EAC7B,oCAAoC,EACpC,4BAA4B,EAC5B,6BAA6B,GAC9B,MAAM,iCAAiC,CAAC;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,3 +1,4 @@
1
+ export { parseBillingCommercialV2Entitlements, } from './billing/commercial-entitlements.js';
1
2
  export { BILLING_AUTHORITATIVE_ADMISSION_CONTRACT_VERSION, BILLING_ENFORCEMENT_ACTIVATION_BLOCKER_CODES, BILLING_ENFORCEMENT_ACTIVATION_EVIDENCE_MAX_AGE_MS, BILLING_ENFORCEMENT_ACTIVATION_SCHEMA_VERSION, BILLING_ENFORCEMENT_COMMERCIAL_SCOPE, BILLING_ENFORCEMENT_PAID_PLANS, BillingEnforcementActivationApprovalSchema, BillingEnforcementActivationConflictError, BillingEnforcementActivationMutationResultSchema, BillingEnforcementActivationPreviewSchema, BillingEnforcementActivationStatusSchema, billingEnforcementActivationApprovalChecksum, normalizeActivationServiceUrl, parseBillingEnforcementActivateRequest, parseBillingEnforcementRollbackRequest, } from './billing/enforcement-activation.js';
2
3
  export { BILLING_ENFORCEMENT_COHORT_KIND, BILLING_ENFORCEMENT_PROFILE_SCHEMA_VERSION, BillingEnforcementCohortConflictError, BillingEnforcementCohortSealRequestSchema, BillingEnforcementCohortSealResponseSchema, BillingEnforcementCohortStatusResponseSchema, billingEnforcementCohortRequestFingerprint, billingEnforcementCohortSuccessAudit, LEGACY_INTERNAL_ENFORCEMENT_PROFILE, normalizeBillingEnforcementServiceUrl, POST_SEAL_ENFORCEMENT_PROFILE, parseBillingEnforcementCohortSealRequest, } from './billing/enforcement-profile.js';
3
4
  export { BILLING_METER_CAPACITY_TARGET, BILLING_METER_PLAN_MONTHLY_CALLS, billingMeterPercentile, buildBillingMeterStorageEvidence, evaluateBillingMeterCapacity, presentBillingMeterCapacityScenario, } from './billing/meter-capacity.js';
@@ -6,6 +7,7 @@ export { BILLING_METER_VALIDATION_WRITER_CONTRACT_VERSION, BillingMeterValidatio
6
7
  export { legacyBillingMigrationMappingChecksum, legacyBillingMigrationPreviewChecksum, parseLegacyBillingMigrationRequest, previewLegacyBillingMigration, } from './billing/migration.js';
7
8
  export { LegacyBillingMigrationConflictError, legacyBillingMigrationPlanEvidenceChecksum, normalizeBillingMigrationServiceUrl, parseLegacyBillingMigrationApplyRequest, parseLegacyBillingMigrationPlanEvidence, } from './billing/migration-apply.js';
8
9
  export { FREE_ENTITLEMENTS, FREE_PLAN_VERSION, GOOGLE_CONTROL_PLANE_ISSUER, } from './billing/model.js';
10
+ export { BILLING_PUBLIC_PLAN_VERSIONS, BILLING_STARTED_OVERAGE_POLICY, calculateBillableOverage, PAID_PLAN_VERSIONS, PRO_ENTITLEMENTS, PRO_PLAN_VERSION, SCALE_ENTITLEMENTS, SCALE_PLAN_VERSION, } from './billing/paid-plan-catalog.js';
9
11
  export { PostgresBillingEnforcementActivationStore, } from './billing/postgres-enforcement-activation.js';
10
12
  export { createPostgresBillingEnforcementActivationPreflight, } from './billing/postgres-enforcement-activation-preflight.js';
11
13
  export { BILLING_ENFORCEMENT_COHORT_LIFECYCLE_LOCK_KEY } from './billing/postgres-enforcement-profile.js';
@@ -13,6 +15,7 @@ export { BILLING_METER_VALIDATION_EPOCH_LIFECYCLE_LOCK_KEY, PostgresBillingMeter
13
15
  export { PostgresBillingMeterReadinessStore, reconcileBillingMeterWindow, runBillingMeterMaintenance, } from './billing/postgres-meter-readiness.js';
14
16
  export { BillingMeterValidationIdempotencyConflictError, recordBillingMeterValidationUsage, } from './billing/postgres-meter-validation.js';
15
17
  export { BillingAccountResponseSchema, BillingAccountsListResponseSchema, BillingEntitlementsSchema, OrgBillingResponseSchema, } from './billing/read-contract.js';
18
+ export { createBillingBaseSubscriptionRevision, createPaidEntitlementSnapshot, parseBillingBaseSubscriptionRevision, parsePaidEntitlementSnapshot, validateBillingSubscriptionId, } from './billing/subscription-model.js';
16
19
  export { BillingUsageIdempotencyConflictError, DEFAULT_BILLING_USAGE_RETRY_WINDOW_MS, unavailableBillingUsageRead, } from './billing/usage-store.js';
17
20
  export { resolveUtcMonthlyUsageWindow, } from './billing/usage-window.js';
18
21
  //# sourceMappingURL=billing-public.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"billing-public.js","sourceRoot":"","sources":["../src/billing-public.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gDAAgD,EAChD,4CAA4C,EAC5C,kDAAkD,EAClD,6CAA6C,EAC7C,oCAAoC,EACpC,8BAA8B,EAG9B,0CAA0C,EAE1C,yCAAyC,EAEzC,gDAAgD,EAGhD,yCAAyC,EAGzC,wCAAwC,EAGxC,4CAA4C,EAC5C,6BAA6B,EAC7B,sCAAsC,EACtC,sCAAsC,GACvC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACL,+BAA+B,EAC/B,0CAA0C,EAG1C,qCAAqC,EAGrC,yCAAyC,EAEzC,0CAA0C,EAE1C,4CAA4C,EAI5C,0CAA0C,EAC1C,oCAAoC,EACpC,mCAAmC,EACnC,qCAAqC,EACrC,6BAA6B,EAC7B,wCAAwC,GACzC,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,6BAA6B,EAC7B,gCAAgC,EAQhC,sBAAsB,EACtB,gCAAgC,EAChC,4BAA4B,EAC5B,mCAAmC,GACpC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAC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C,GACxC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAQL,iBAAiB,EACjB,iBAAiB,EAEjB,2BAA2B,GAI5B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,4BAA4B,EAC5B,8BAA8B,EAG9B,wBAAwB,EACxB,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,yCAAyC,GAE1C,MAAM,8CAA8C,CAAC;AACtD,OAAO,EACL,mDAAmD,GAEpD,MAAM,wDAAwD,CAAC;AAChE,OAAO,EAAE,6CAA6C,EAAE,MAAM,2CAA2C,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,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,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.52.0",
3
+ "version": "0.53.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",