@happyvertical/smrt-subscriptions 0.60.15 → 0.60.17

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 (47) hide show
  1. package/AGENTS.md +78 -0
  2. package/README.md +195 -0
  3. package/dist/billing/apply.d.ts +52 -0
  4. package/dist/billing/apply.d.ts.map +1 -0
  5. package/dist/billing/checkout-sessions.d.ts +99 -0
  6. package/dist/billing/checkout-sessions.d.ts.map +1 -0
  7. package/dist/billing/config.d.ts +64 -0
  8. package/dist/billing/config.d.ts.map +1 -0
  9. package/dist/billing/events.d.ts +49 -0
  10. package/dist/billing/events.d.ts.map +1 -0
  11. package/dist/billing/host.d.ts +3 -0
  12. package/dist/billing/host.d.ts.map +1 -0
  13. package/dist/billing/index.d.ts +4 -0
  14. package/dist/billing/index.d.ts.map +1 -0
  15. package/dist/billing/plans.d.ts +45 -0
  16. package/dist/billing/plans.d.ts.map +1 -0
  17. package/dist/billing/signing.d.ts +24 -0
  18. package/dist/billing/signing.d.ts.map +1 -0
  19. package/dist/billing/types.d.ts +265 -0
  20. package/dist/billing/types.d.ts.map +1 -0
  21. package/dist/index.d.ts +3 -1
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +1648 -26
  24. package/dist/index.js.map +1 -1
  25. package/dist/manifest.json +313 -4
  26. package/dist/models/BillingCheckoutSession.d.ts +39 -0
  27. package/dist/models/BillingCheckoutSession.d.ts.map +1 -0
  28. package/dist/models/index.d.ts +1 -0
  29. package/dist/models/index.d.ts.map +1 -1
  30. package/dist/recipes.d.ts +1 -1
  31. package/dist/smrt-knowledge.json +101 -8
  32. package/dist/smrt-knowledge.okf.md +5 -2
  33. package/dist/svelte/CommercialOverview.svelte +37 -11
  34. package/dist/svelte/PlanPicker.svelte +18 -17
  35. package/dist/svelte/SubscriptionSummary.svelte +13 -11
  36. package/dist/svelte/UsageThresholds.svelte +21 -17
  37. package/dist/vault-account/actions.d.ts +24 -0
  38. package/dist/vault-account/actions.d.ts.map +1 -0
  39. package/dist/vault-account/errors.d.ts +20 -0
  40. package/dist/vault-account/errors.d.ts.map +1 -0
  41. package/dist/vault-account/index.d.ts +5 -0
  42. package/dist/vault-account/index.d.ts.map +1 -0
  43. package/dist/vault-account/relay-admin-client.d.ts +10 -0
  44. package/dist/vault-account/relay-admin-client.d.ts.map +1 -0
  45. package/dist/vault-account/types.d.ts +115 -0
  46. package/dist/vault-account/types.d.ts.map +1 -0
  47. package/package.json +9 -7
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Signed Checkout metadata and secret hygiene (#4786).
3
+ *
4
+ * Another integration on the same Stripe account can create Checkout Sessions
5
+ * with any metadata it likes. A completed session is only trusted to link a
6
+ * tenant and plan when its `smrt_*` metadata carries an HMAC made with a
7
+ * server-side secret at session creation. Uses WebCrypto so the module loads
8
+ * in every runtime the package does.
9
+ */
10
+ export declare const METADATA_SIGNATURE_KEY = "smrt_sig";
11
+ export declare const METADATA_PURPOSE = "tenant_subscription";
12
+ /** Compare without an early exit on the first differing character. */
13
+ export declare function constantTimeEqual(left: string, right: string): boolean;
14
+ /** Add the signature to `metadata`. Only `smrt_*` keys are covered. */
15
+ export declare function signCheckoutMetadata(metadata: Record<string, string>, secret: string): Promise<Record<string, string>>;
16
+ export declare function checkoutMetadataValid(metadata: Record<string, string>, secret: string): Promise<boolean>;
17
+ /**
18
+ * Strip anything shaped like a Stripe key or signing secret. Applied to every
19
+ * error message before it reaches a log, as provider errors can echo the
20
+ * credential they were called with.
21
+ */
22
+ export declare function redactSecrets(text: string): string;
23
+ export declare function safeErrorMessage(error: unknown): string;
24
+ //# sourceMappingURL=signing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signing.d.ts","sourceRoot":"","sources":["../../src/billing/signing.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,eAAO,MAAM,sBAAsB,aAAa,CAAC;AACjD,eAAO,MAAM,gBAAgB,wBAAwB,CAAC;AAyBtD,sEAAsE;AACtE,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAOtE;AAeD,uEAAuE;AACvE,wBAAsB,oBAAoB,CACxC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAChC,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAQjC;AAED,wBAAsB,qBAAqB,CACzC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAChC,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,OAAO,CAAC,CAOlB;AAID;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAElD;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAGvD"}
@@ -0,0 +1,265 @@
1
+ /**
2
+ * Types for the billing host glue (#4786).
3
+ *
4
+ * The provider port is structural: `StripeAccountingProvider` from
5
+ * `@happyvertical/accounting` satisfies it (a compile-time test pins that), so
6
+ * this package carries no runtime or type dependency on the SDK. Every
7
+ * provider call goes through that SDK; nothing here talks to Stripe directly.
8
+ */
9
+ import type { DatabaseInterface } from '@happyvertical/sql';
10
+ import type { SubscriptionPlan } from '../models/SubscriptionPlan.js';
11
+ /** A line item priced by a provider price id (never by a client-sent amount). */
12
+ export interface BillingCheckoutLineItem {
13
+ price: string;
14
+ quantity: number;
15
+ }
16
+ export interface BillingCheckoutSessionInput {
17
+ mode?: 'subscription';
18
+ successUrl: string;
19
+ cancelUrl: string;
20
+ customerExternalId?: string;
21
+ customerEmail?: string;
22
+ clientReferenceId?: string;
23
+ lineItems: BillingCheckoutLineItem[];
24
+ metadata: Record<string, string>;
25
+ idempotencyKey?: string;
26
+ }
27
+ /** The slice of a provider subscription this module reads. */
28
+ export interface BillingSubscriptionState {
29
+ externalId: string;
30
+ status: string;
31
+ customerExternalId: string;
32
+ currentPeriodStart?: Date;
33
+ currentPeriodEnd?: Date;
34
+ cancelAtPeriodEnd: boolean;
35
+ canceledAt?: Date;
36
+ trialEnd?: Date;
37
+ raw?: unknown;
38
+ }
39
+ /** A parsed (not yet trusted until `verify` passed) webhook event. */
40
+ export interface BillingProviderWebhookEvent {
41
+ id?: string;
42
+ type: string;
43
+ timestamp: Date;
44
+ payload: unknown;
45
+ }
46
+ /**
47
+ * The provider operations the glue needs. `StripeAccountingProvider` from
48
+ * `@happyvertical/accounting` is assignable to this.
49
+ */
50
+ export interface BillingProviderPort {
51
+ readonly webhooks: {
52
+ verify(payload: string, signature: string, secret: string): boolean;
53
+ parse(payload: string): BillingProviderWebhookEvent;
54
+ };
55
+ readonly billing: {
56
+ createCheckoutSession(input: BillingCheckoutSessionInput): Promise<{
57
+ externalId: string;
58
+ url: string | null;
59
+ }>;
60
+ createCustomerPortalSession(input: {
61
+ customerExternalId: string;
62
+ returnUrl: string;
63
+ }): Promise<{
64
+ url: string;
65
+ }>;
66
+ retrieveSubscriptionStatus(subscriptionExternalId: string): Promise<BillingSubscriptionState>;
67
+ };
68
+ }
69
+ /** Fixed, host-configured destinations. Never taken from a request. */
70
+ export interface BillingUrls {
71
+ /** Where Checkout sends the buyer after paying. */
72
+ successUrl: string;
73
+ /** Where Checkout sends the buyer when they back out. */
74
+ cancelUrl: string;
75
+ /** Where the customer portal returns to. */
76
+ portalReturnUrl: string;
77
+ }
78
+ /**
79
+ * Structured, secret-free log sink. Every field passed is safe to persist:
80
+ * event ids, types, tenant ids and reason codes only.
81
+ */
82
+ export interface BillingLogger {
83
+ info?(message: string, fields?: Record<string, unknown>): void;
84
+ warn?(message: string, fields?: Record<string, unknown>): void;
85
+ error?(message: string, fields?: Record<string, unknown>): void;
86
+ }
87
+ export interface BillingPlanPurchaseContext {
88
+ tenantId: string;
89
+ plan: SubscriptionPlan;
90
+ }
91
+ export interface BillingHostOptions {
92
+ /** The accounting provider (Stripe) from `@happyvertical/accounting`. */
93
+ provider: BillingProviderPort;
94
+ /**
95
+ * Resolved database handle with `transaction()` support (SQLite or
96
+ * PostgreSQL). Event idempotency and the subscription write share one
97
+ * transaction on it. Take it from any collection, for example
98
+ * `(await TenantSubscriptionCollection.create(config)).db`.
99
+ */
100
+ db: DatabaseInterface;
101
+ /** Webhook endpoint signing secret (`whsec_…`). Required, never defaulted. */
102
+ webhookSecret: string;
103
+ /**
104
+ * Secret used to sign new Checkout metadata. Defaults to `webhookSecret`, so
105
+ * rotating the webhook secret also changes it: list the retired secret in
106
+ * `metadataVerificationSecrets` for as long as sessions created under it can
107
+ * still complete, or give the host its own stable secret here.
108
+ */
109
+ metadataSigningSecret?: string;
110
+ /**
111
+ * Retired secrets still accepted when a completed Checkout is verified (never
112
+ * used to sign). Needed across a rotation of the signing secret, otherwise a
113
+ * session paid after the rotation is not trusted and the purchase is dropped.
114
+ */
115
+ metadataVerificationSecrets?: readonly string[];
116
+ /** Maximum webhook signature age in seconds (default 300, at most 900). */
117
+ webhookToleranceSeconds?: number;
118
+ /** Largest accepted webhook body in bytes (default 1 MiB). */
119
+ maxWebhookBodyBytes?: number;
120
+ urls: BillingUrls;
121
+ /**
122
+ * Whether tenant-owned plans (`SubscriptionPlan.tenantId` set) may be sold.
123
+ * Default `deny`: only operator-owned global plans are sold, so a tenant
124
+ * that can write plan rows cannot buy entitlements it defined itself. Use
125
+ * `allow` only when tenants cannot write plans.
126
+ */
127
+ tenantPlans?: 'deny' | 'allow';
128
+ /** Plan key to provider price id. Wins over the plan's own price binding. */
129
+ prices?: Record<string, string>;
130
+ /**
131
+ * Extra purchase policy, evaluated after the built-in checks (plan visible
132
+ * to the tenant, active, fixed price, price configured, tenant not already
133
+ * subscribed). Return false to refuse.
134
+ */
135
+ canPurchasePlan?: (context: BillingPlanPurchaseContext) => boolean | Promise<boolean>;
136
+ /** Namespaces the idempotency claim when several accounts share a database. */
137
+ accountKey?: string;
138
+ logger?: BillingLogger;
139
+ }
140
+ /** The tenant a host has already authenticated and authorised for billing. */
141
+ export interface BillingAuth {
142
+ tenantId: string;
143
+ /** Prefilled on Checkout for a tenant with no billing customer yet. */
144
+ email?: string;
145
+ }
146
+ export type BillingHostErrorCode = 'invalid_request' | 'tenant_mismatch' | 'plan_unavailable' | 'plan_forbidden' | 'plan_not_purchasable' | 'price_unconfigured' | 'already_subscribed' | 'no_billing_account' | 'checkout_not_reconcilable' | 'provider_error';
147
+ /**
148
+ * A refusal with a stable code and a fixed message. The message never carries
149
+ * provider text, ids or configuration, so it is safe to return to a browser.
150
+ */
151
+ export declare class BillingHostError extends Error {
152
+ readonly code: BillingHostErrorCode;
153
+ readonly status: number;
154
+ constructor(code: BillingHostErrorCode);
155
+ }
156
+ export interface BillingCheckoutResult {
157
+ /** Hosted checkout page to send the buyer to. */
158
+ url: string;
159
+ sessionId: string;
160
+ }
161
+ export interface BillingPortalResult {
162
+ url: string;
163
+ }
164
+ export type BillingWebhookOutcome = 'applied' | 'ignored' | 'duplicate'
165
+ /**
166
+ * A paid first-purchase Checkout could not be tied to a session this host
167
+ * created. It was not linked and not discarded: it is stored for an
168
+ * operator (`listCheckoutsNeedingReconciliation`, `reconcileCheckout`).
169
+ */
170
+ | 'needs_reconciliation';
171
+ /** A paid Checkout session waiting for an operator. Ids and codes only. */
172
+ export interface BillingUnreconciledCheckout {
173
+ sessionId: string;
174
+ /** `session_record_missing`, `session_record_mismatch` or `session_expired`. */
175
+ reason: string;
176
+ /** The tenant the signed metadata named (not trusted). */
177
+ claimedTenantId: string;
178
+ subscriptionId: string;
179
+ /**
180
+ * The provider customer that paid. Confirm it is the claimed tenant's own
181
+ * customer before reconciling: it is the one value that decides who gets
182
+ * control of the tenant's billing portal.
183
+ */
184
+ customerId: string;
185
+ /** The tenant the host recorded the session for (empty when no record). */
186
+ targetTenantId: string;
187
+ /**
188
+ * True when the claimed tenant has its own pending or completed session
189
+ * recorded by this host, which suggests the flagged payment is a copy of
190
+ * that tenant's signed metadata rather than the tenant's purchase.
191
+ */
192
+ claimedTenantHasOwnSession: boolean;
193
+ eventId: string;
194
+ flaggedAt: Date;
195
+ }
196
+ export interface BillingWebhookResponse {
197
+ status: number;
198
+ body: {
199
+ received: boolean;
200
+ outcome?: BillingWebhookOutcome;
201
+ error?: string;
202
+ };
203
+ }
204
+ export interface BillingHost {
205
+ createCheckout(auth: BillingAuth, input: {
206
+ planKey?: string;
207
+ planId?: string;
208
+ }): Promise<BillingCheckoutResult>;
209
+ createPortalLink(auth: BillingAuth): Promise<BillingPortalResult>;
210
+ /** Paid Checkout sessions flagged `needs_reconciliation`, oldest first. */
211
+ listCheckoutsNeedingReconciliation(options?: {
212
+ /** Page size, 1..1000 (default 200). */
213
+ limit?: number;
214
+ offset?: number;
215
+ }): Promise<BillingUnreconciledCheckout[]>;
216
+ /** How many paid sessions are flagged, so a page is never mistaken for all. */
217
+ countCheckoutsNeedingReconciliation(): Promise<number>;
218
+ /**
219
+ * Operator-only (same rules as `reconcileCheckout`): close a flagged session
220
+ * on purpose WITHOUT linking it (for example a payment from another
221
+ * integration on the same account). Terminal state `dismissed`, logged with
222
+ * the operator id and reason; throws `checkout_not_reconcilable` when the
223
+ * session is not flagged.
224
+ */
225
+ dismissCheckout(input: {
226
+ sessionId: string;
227
+ operatorId: string;
228
+ reason: string;
229
+ }): Promise<void>;
230
+ /**
231
+ * Operator-only, called by host code that has already authenticated and
232
+ * authorised an operator (never wired to a request handler). Links a flagged
233
+ * paid session to `tenantId` on purpose, once: the subscription is re-read
234
+ * from the provider and must be the one recorded when the session was
235
+ * flagged. `planId` defaults to the plan the signed metadata named. Throws
236
+ * `checkout_not_reconcilable` when the session is not flagged (or was
237
+ * already reconciled); otherwise reports whether the link was `applied` or
238
+ * `ignored` with a reason (for example `already_subscribed`).
239
+ */
240
+ reconcileCheckout(input: {
241
+ sessionId: string;
242
+ tenantId: string;
243
+ planId?: string;
244
+ /** Who is acting; recorded in the audit log. */
245
+ operatorId: string;
246
+ }): Promise<{
247
+ outcome: 'applied' | 'ignored';
248
+ reason?: string;
249
+ }>;
250
+ handleWebhook(input: {
251
+ payload: string;
252
+ signature: string | null;
253
+ }): Promise<BillingWebhookResponse>;
254
+ /**
255
+ * Fetch-API handlers for any framework (`+server.ts`, Hono, Workers). The
256
+ * host authenticates and authorises the caller first and passes the tenant;
257
+ * checkout and portal never read a tenant, price or URL from the request.
258
+ */
259
+ handlers: {
260
+ checkout(request: Request, auth: BillingAuth): Promise<Response>;
261
+ portal(request: Request, auth: BillingAuth): Promise<Response>;
262
+ webhook(request: Request): Promise<Response>;
263
+ };
264
+ }
265
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/billing/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEtE,iFAAiF;AACjF,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,2BAA2B;IAC1C,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,SAAS,EAAE,uBAAuB,EAAE,CAAC;IACrC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,8DAA8D;AAC9D,MAAM,WAAW,wBAAwB;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,kBAAkB,EAAE,MAAM,CAAC;IA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K,EAAE;QACnB,OAAO,EAAE,MAAM,CAAC;QAChB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;KAC1B,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;IACpC;;;;OAIG;IACH,QAAQ,EAAE;QACR,QAAQ,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;QACjE,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;QAC/D,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;KAC9C,CAAC;CACH"}
package/dist/index.d.ts CHANGED
@@ -7,11 +7,12 @@
7
7
  * @packageDocumentation
8
8
  */
9
9
  import './__smrt-register__.js';
10
+ export { BILLING_ENV, type BillingAuth, type BillingCheckoutLineItem, type BillingCheckoutResult, type BillingCheckoutSessionInput, type BillingEnvConfig, type BillingEnvOptions, type BillingHost, BillingHostError, type BillingHostErrorCode, type BillingHostOptions, type BillingLogger, type BillingPlanPurchaseContext, type BillingPortalResult, type BillingProviderPort, type BillingProviderWebhookEvent, type BillingSubscriptionState, type BillingUnreconciledCheckout, type BillingUrls, type BillingWebhookOutcome, type BillingWebhookResponse, createBillingHost, DEFAULT_WEBHOOK_TOLERANCE_SECONDS, MAX_WEBHOOK_TOLERANCE_SECONDS, priceEnvName, readBillingEnv, } from './billing/index.js';
10
11
  export { SubscriptionPlanCollection, SubscriptionPlanVersionCollection, TenantSubscriptionCollection, TenantUsageMetricCollection, } from './collections/index.js';
11
12
  export { migrateSubscriptionsMoneyToMinorUnits, preflightSubscriptionsMoneyMinorUnits, SUBSCRIPTIONS_MONEY_COLUMNS, SUBSCRIPTIONS_MONEY_MINOR_UNITS_BACKFILL, } from './migrations/moneyMinorUnits.js';
12
13
  export { migrateSubscriptionPlanVersions, type SubscriptionPlanVersionsMigrationReport, } from './migrations/planVersions.js';
13
14
  export type { PriceBookKind, PricingStrategy, SpendingBasis, SpendingPeriod, SpendingPolicyBehavior, } from './models/index.js';
14
- export { BillingAdjustment, BillingAdjustmentCollection, ClientCharge, ClientChargeCollection, CreditGrant, CreditGrantCollection, isCurrencyCode, isPriceBookKind, PriceBook, PriceBookAssignment, PriceBookCollection, PricingRule, PricingRuleCollection, RetailCharge, RetailChargeCollection, SpendingPolicy, SpendingPolicyCollection, SubscriptionPlan, SubscriptionPlanVersion, TenantSubscription, TenantUsageMetric, } from './models/index.js';
15
+ export { BillingAdjustment, BillingAdjustmentCollection, BillingCheckoutSession, ClientCharge, ClientChargeCollection, CreditGrant, CreditGrantCollection, isCurrencyCode, isPriceBookKind, PriceBook, PriceBookAssignment, PriceBookCollection, PricingRule, PricingRuleCollection, RetailCharge, RetailChargeCollection, SpendingPolicy, SpendingPolicyCollection, SubscriptionPlan, SubscriptionPlanVersion, TenantSubscription, TenantUsageMetric, } from './models/index.js';
15
16
  export { enabledFeatureKeys, extractPlanTerms, isEntitlementUpgrade, PLAN_TERM_FIELDS, samePlanTerms, validThresholds, } from './plan-terms.js';
16
17
  export type { PlanVersionReplacement } from './plan-versioning.js';
17
18
  export { SubscriptionPlansRecipe } from './recipes.js';
@@ -19,4 +20,5 @@ export type { AssignPriceBooksInput, AutoTopUpGrant, AutoTopUpHook, AutoTopUpReq
19
20
  export { AI_HOSTED_SPEND_METRIC, AI_HOSTED_USER_SPEND_METRIC, assertCommercialBillingStorageSupported, CommercialBillingStorageConfigurationError, CommercialUsageService, createHostedAiSpendReader, decideHostedAiSpend, diffEntitlements, ENTITLEMENT_CHANGE_LISTENERS_SLOT_KEY, type EntitlementChange, type EntitlementChangeFailure, type EntitlementChangeListener, type EntitlementChangeOutcome, type EntitlementSnapshot, emptyEntitlementSnapshot, evaluateHostedAiSpendThreshold, evaluateThreshold, evaluateThresholds, FEATURE_GRANT_SOURCE_SLOT_KEY, type GrantingPlanReader, getEntitlementChangeListeners, type HostedAiSpendDecision, type HostedAiSpendEvaluation, HostedAiSpendEvaluator, type HostedAiSpendEvaluatorOptions, type HostedAiSpendPolicy, HostedAiSpendPolicyError, type HostedAiSpendReader, type HostedAiSpendScope, type HostedAiSpendSummary, hasEntitlementChange, hostedAiSpendThresholds, hostedAiTagFragment, isMissingSubscriptionTableError, MICROS_PER_USD, notifyEntitlementChange, ResellerBillingError, ResellerBillingService, registerEntitlementChangeListener, registerSubscriptionFeatureSource, SpendingPolicyEvaluator, type SubscriptionFeatureGrants, SubscriptionFeatureSource, type SubscriptionFeatureSourceOptions, type SubscriptionGrantingPlan, type SubscriptionPlanReader, type SubscriptionPlanVersionReader, SubscriptionResolver, type SubscriptionResolverReaders, snapshotEntitlements, type TenantSubscriptionReader, TenantUsageMeter, type TrackEntitlementChangeOptions, trackEntitlementChange, UnsupportedCommercialBillingStorageError, type UsageSummaryReader, } from './services/index.js';
20
21
  export type { AiUsageSummary, BillingInterval, EntitlementResolution, EntitlementResolutionContext, JsonObject, PlanFeatureGrant, PlanTerms, PlanThreshold, PlanVersionPinReason, PricingMode, RecordUsageOptions, Subscriber, SubscriberKind, SubscriptionPlanStatus, SubscriptionPlanVersionOptions, SubscriptionResolverOptions, SubscriptionStatus, SummarizeAiUsageOptions, SummarizeUsageBatchOptions, SummarizeUsageOptions, ThresholdEnforcement, ThresholdEvaluation, ThresholdWindow, UsageMeterOptions, UsageMetricRecord, UsageSummary, UsageWindow, } from './types.js';
21
22
  export { assertSubscriberInvariant, getWindowForThreshold, getWindowKey, isValidThreshold, normalizeFeatureGrants, normalizeSubscriber, subscriberToColumns, } from './utils.js';
23
+ export { createVaultRelayAdminClient, NOT_OWNER_CODE, NotOwnerError, type ProvisionRestartAccountInput, type ProvisionRestartAccountResult, provisionRestartAccount, StepUpRequiredError, type SupersedeVaultAccountInput, supersedeVaultAccount, type UnsupersedeVaultAccountInput, unsupersedeVaultAccount, type VaultAccountAction, type VaultAccountAdminDeps, VaultAccountAdminError, type VaultAccountAuditEntry, type VaultAccountAuditSink, type VaultAccountDenial, type VaultAccountDirectory, type VaultRelayAdminClientOptions, type VaultRelayAdminPort, } from './vault-account/index.js';
22
24
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,wBAAwB,CAAC;AAEhC,OAAO,EACL,0BAA0B,EAC1B,iCAAiC,EACjC,4BAA4B,EAC5B,2BAA2B,GAC5B,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,qCAAqC,EACrC,qCAAqC,EACrC,2BAA2B,EAC3B,wCAAwC,GACzC,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EACL,+BAA+B,EAC/B,KAAK,uCAAuC,GAC7C,MAAM,8BAA8B,CAAC;AACtC,YAAY,EACV,aAAa,EACb,eAAe,EACf,aAAa,EACb,cAAc,EACd,sBAAsB,GACvB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,iBAAiB,EACjB,2BAA2B,EAC3B,YAAY,EACZ,sBAAsB,EACtB,WAAW,EACX,qBAAqB,EACrB,cAAc,EACd,eAAe,EACf,SAAS,EACT,mBAAmB,EACnB,mBAAmB,EACnB,WAAW,EACX,qBAAqB,EACrB,YAAY,EACZ,sBAAsB,EACtB,cAAc,EACd,wBAAwB,EACxB,gBAAgB,EAChB,uBAAuB,EACvB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,gBAAgB,EAChB,aAAa,EACb,eAAe,GAChB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAEnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AACvD,YAAY,EACV,qBAAqB,EACrB,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,yB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BAA6B,EAClC,sBAAsB,EACtB,wCAAwC,EACxC,KAAK,kBAAkB,GACxB,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACV,cAAc,EACd,eAAe,EACf,qBAAqB,EACrB,4BAA4B,EAC5B,UAAU,EACV,gBAAgB,EAChB,SAAS,EACT,aAAa,EACb,oBAAoB,EACpB,WAAW,EACX,kBAAkB,EAClB,UAAU,EACV,cAAc,EACd,sBAAsB,EACtB,8BAA8B,EAC9B,2BAA2B,EAC3B,kBAAkB,EAClB,uBAAuB,EACvB,0BAA0B,EAC1B,qBAAqB,EACrB,oBAAoB,EACpB,mBAAmB,EACnB,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,YAAY,EACZ,WAAW,GACZ,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,YAAY,EACZ,gBAAgB,EAChB,sBAAsB,EACtB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,wBAAwB,CAAC;AAGhC,OAAO,EACL,WAAW,EACX,KAAK,WAAW,EAChB,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,2BAA2B,EAChC,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAChB,gBAAgB,EAChB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,0BAA0B,EAC/B,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,2BAA2B,EAChC,KAAK,wBAAwB,EAC7B,KAAK,2BAA2B,EAChC,KAAK,WAAW,EAChB,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC3B,iBAAiB,EACjB,iCAAiC,EACjC,6BAA6B,EAC7B,YAAY,EACZ,cAAc,GACf,MAAM,oBAAo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