@stewardhq/sdk 0.2.0 → 0.5.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/README.md +123 -88
- package/dist/_chunks/errors.js +1 -1
- package/dist/_chunks/events.d.ts +315 -4
- package/dist/_chunks/events.js +1155 -9
- package/dist/_chunks/index.d.ts +3473 -90
- package/dist/_chunks/locale.d.ts +269 -1
- package/dist/_chunks/src.js +842 -24
- package/dist/_chunks/validators.d.ts +45 -1
- package/dist/_chunks/validators.js +128 -27
- package/dist/contract.d.ts +4 -4
- package/dist/contract.js +4 -4
- package/dist/index.d.ts +436 -22
- package/dist/index.js +1659 -26
- package/dist/server.d.ts +44 -6
- package/dist/server.js +29 -2
- package/package.json +4 -10
- package/dist/_chunks/steward.d.ts +0 -189
- package/dist/_chunks/steward.js +0 -560
- package/dist/testing/fixtures/events/LOCK.json +0 -27
- package/dist/testing/fixtures/events/account.deleted.json +0 -36
- package/dist/testing/fixtures/events/account.state_changed.json +0 -53
- package/dist/testing/fixtures/events/account.updated.json +0 -37
- package/dist/testing/fixtures/events/checkout.completed.json +0 -36
- package/dist/testing/fixtures/events/checkout.expired.json +0 -26
- package/dist/testing/fixtures/events/checkout.failed.json +0 -27
- package/dist/testing/fixtures/events/invoice.created.json +0 -37
- package/dist/testing/fixtures/events/invoice.issued.json +0 -38
- package/dist/testing/fixtures/events/invoice.voided.json +0 -39
- package/dist/testing/fixtures/events/subscription.activated.json +0 -40
- package/dist/testing/fixtures/events/subscription.cancel_scheduled.json +0 -38
- package/dist/testing/fixtures/events/subscription.canceled.json +0 -29
- package/dist/testing/fixtures/events/subscription.expired.json +0 -27
- package/dist/testing/fixtures/events/subscription.payment_failed.json +0 -38
- package/dist/testing/fixtures/events/subscription.reactivated.json +0 -36
- package/dist/testing/fixtures/events/subscription.renewed.json +0 -39
- package/dist/testing/fixtures/events/subscription.suspended.json +0 -36
- package/dist/testing/fixtures/events/subscription.terminated.json +0 -28
- package/dist/testing.d.ts +0 -626
- package/dist/testing.js +0 -3638
|
@@ -1,3 +1,47 @@
|
|
|
1
|
+
//#region ../contract/src/micro-units.d.ts
|
|
2
|
+
/** Decimal places of a meter unit value (10⁻⁶). */
|
|
3
|
+
declare const UNIT_DECIMALS = 6;
|
|
4
|
+
/** Micro units in one unit. */
|
|
5
|
+
declare const MICRO_UNITS_PER_UNIT = 1000000n;
|
|
6
|
+
/** A unit value that is not a finite, non-negative decimal (M4 `invalid_value`). */
|
|
7
|
+
declare class InvalidUnitValueError extends RangeError {
|
|
8
|
+
readonly code: "invalid_value";
|
|
9
|
+
constructor(value: unknown);
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Micro units (10⁻⁶) of a finite, non-negative decimal, or `null` when the value is not one.
|
|
13
|
+
* A number is read from its canonical decimal text (`String(value)`); a string must be a plain
|
|
14
|
+
* decimal (`"12"`, `"0.25"`, `"1e-7"`, Postgres `numeric` text). Beyond 6 decimals: half up.
|
|
15
|
+
*/
|
|
16
|
+
declare function parseMicroUnits(value: number | string): bigint | null;
|
|
17
|
+
/**
|
|
18
|
+
* Micro units (10⁻⁶) of a finite, non-negative decimal: `toMicroUnits(0.25) === 250000n`,
|
|
19
|
+
* `toMicroUnits("123.4567895") === 123456790n` (half up), `toMicroUnits(1e-7) === 0n`.
|
|
20
|
+
* Throws `InvalidUnitValueError` (`code: "invalid_value"`) for a negative, non-finite or
|
|
21
|
+
* non-decimal value.
|
|
22
|
+
*/
|
|
23
|
+
declare function toMicroUnits(value: number | string): bigint;
|
|
24
|
+
/**
|
|
25
|
+
* Canonical decimal text of micro units: no exponent, no leading zeros, no trailing fraction zeros
|
|
26
|
+
* (`1500000000n` → `"1500"`, `250000n` → `"0.25"`, `-1500000n` → `"-1.5"`). Invoice line `units`.
|
|
27
|
+
*/
|
|
28
|
+
declare function microToDecimalString(micro: bigint): string;
|
|
29
|
+
/**
|
|
30
|
+
* Micro units as a JSON number (API responses): the double nearest to the exact decimal, so any
|
|
31
|
+
* value up to 15 significant digits round-trips (`toMicroUnits(fromMicroUnits(x)) === x`).
|
|
32
|
+
*/
|
|
33
|
+
declare function fromMicroUnits(micro: bigint): number;
|
|
34
|
+
/**
|
|
35
|
+
* Plain decimal text of a finite number, without exponent: `1e21` → `"1000000000000000000000"`,
|
|
36
|
+
* `1e-7` → `"0.0000001"`, `-0` → `"0"`. Throws for a non-finite number.
|
|
37
|
+
*/
|
|
38
|
+
declare function plainDecimalOf(value: number): string;
|
|
39
|
+
/**
|
|
40
|
+
* Whether a number is a finite value with at most 6 decimals, i.e. exactly representable in micro
|
|
41
|
+
* units (catalog credits, credit grants and `lowAt` must be; event values are rounded instead).
|
|
42
|
+
*/
|
|
43
|
+
declare function isMicroPrecise(value: number): boolean;
|
|
44
|
+
//#endregion
|
|
1
45
|
//#region ../contract/src/validators.d.ts
|
|
2
46
|
/**
|
|
3
47
|
* T.C. kimlik numarası: 11 hane, ilk hane 0 değil;
|
|
@@ -20,4 +64,4 @@ declare function isE164(value: unknown, options?: {
|
|
|
20
64
|
country?: "TR";
|
|
21
65
|
}): boolean;
|
|
22
66
|
//#endregion
|
|
23
|
-
export { isValidTckn as n, isValidVkn as r, isE164 as t };
|
|
67
|
+
export { MICRO_UNITS_PER_UNIT as a, isMicroPrecise as c, plainDecimalOf as d, toMicroUnits as f, InvalidUnitValueError as i, microToDecimalString as l, isValidTckn as n, UNIT_DECIMALS as o, isValidVkn as r, fromMicroUnits as s, isE164 as t, parseMicroUnits as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region ../contract/src/rules.ts
|
|
2
|
-
/**
|
|
2
|
+
/** Live subscription statuses. An account may hold several live subscriptions (billing core, M34). */
|
|
3
3
|
const LIVE_SUBSCRIPTION_STATUSES = [
|
|
4
4
|
"active",
|
|
5
5
|
"past_due",
|
|
@@ -8,8 +8,12 @@ const LIVE_SUBSCRIPTION_STATUSES = [
|
|
|
8
8
|
function isLiveSubscriptionStatus(status) {
|
|
9
9
|
return LIVE_SUBSCRIPTION_STATUSES.includes(status);
|
|
10
10
|
}
|
|
11
|
+
/** Type of a plan's implicit benefit and of account overrides. */
|
|
12
|
+
const FEATURE_FLAG_BENEFIT_TYPE = "feature_flag";
|
|
13
|
+
/** Source of the account overrides benefit. */
|
|
14
|
+
const OVERRIDE_BENEFIT_SOURCE = "override";
|
|
11
15
|
const toMs = (value) => value instanceof Date ? value.getTime() : Date.parse(value);
|
|
12
|
-
/**
|
|
16
|
+
/** Not revoked and (when `at` is given) inside its window. */
|
|
13
17
|
function isGrantActive(grant, at) {
|
|
14
18
|
if (grant.revokedAt !== void 0 && grant.revokedAt !== null) return false;
|
|
15
19
|
if (at === void 0) return true;
|
|
@@ -18,46 +22,143 @@ function isGrantActive(grant, at) {
|
|
|
18
22
|
if (grant.endsAt !== void 0 && grant.endsAt !== null && toMs(grant.endsAt) <= now) return false;
|
|
19
23
|
return true;
|
|
20
24
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
+
/** Stable sort by an instant, then id; the given order when not every item has the instant. */
|
|
26
|
+
function orderedBy(items, instant) {
|
|
27
|
+
if (!items.every((item) => instant(item) !== void 0)) return items;
|
|
28
|
+
return [...items].sort((a, b) => {
|
|
29
|
+
const diff = toMs(instant(a)) - toMs(instant(b));
|
|
25
30
|
if (diff !== 0) return diff;
|
|
26
31
|
if (a.id === void 0 || b.id === void 0 || a.id === b.id) return 0;
|
|
27
32
|
return a.id < b.id ? -1 : 1;
|
|
28
33
|
});
|
|
29
34
|
}
|
|
35
|
+
function isEntitlementValue(value) {
|
|
36
|
+
return value === null || typeof value === "boolean" || typeof value === "string" || typeof value === "number" && Number.isFinite(value);
|
|
37
|
+
}
|
|
38
|
+
function inferredType(value) {
|
|
39
|
+
if (typeof value === "boolean") return "boolean";
|
|
40
|
+
if (typeof value === "string") return "string";
|
|
41
|
+
return "limit";
|
|
42
|
+
}
|
|
30
43
|
/**
|
|
31
|
-
*
|
|
32
|
-
*
|
|
44
|
+
* Merges one layer's value into the current value of a feature (`undefined` = no layer set it
|
|
45
|
+
* yet). A value that does not fit the feature type (and `null` outside `limit`) does not count.
|
|
33
46
|
*/
|
|
34
|
-
function
|
|
47
|
+
function mergeValue(type, current, next) {
|
|
48
|
+
switch (type ?? inferredType(next)) {
|
|
49
|
+
case "limit":
|
|
50
|
+
if (next !== null && typeof next !== "number") return current;
|
|
51
|
+
if (current === void 0) return next;
|
|
52
|
+
if (current === null || next === null) return null;
|
|
53
|
+
return typeof current === "number" ? Math.max(current, next) : next;
|
|
54
|
+
case "boolean":
|
|
55
|
+
if (typeof next !== "boolean") return current;
|
|
56
|
+
return current === true || next;
|
|
57
|
+
case "string": return typeof next === "string" ? next : current;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* The account's granted benefits and their projection (planCode, accessState, entitlements).
|
|
62
|
+
* Throws when a plan it refers to is not in the catalog (inconsistent data; the service
|
|
63
|
+
* guarantees it with foreign keys).
|
|
64
|
+
*/
|
|
65
|
+
function resolveBenefits(input) {
|
|
35
66
|
const { catalog } = input;
|
|
36
67
|
const plans = new Map(catalog.plans.map((p) => [p.code, p]));
|
|
37
68
|
const planOf = (code) => {
|
|
38
69
|
const plan = plans.get(code);
|
|
39
|
-
if (!plan) throw new Error(`plan
|
|
70
|
+
if (!plan) throw new Error(`plan not in catalog: ${code}`);
|
|
40
71
|
return plan;
|
|
41
72
|
};
|
|
42
|
-
const
|
|
43
|
-
const
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
73
|
+
const featureTypes = new Map(catalog.features.map((f) => [f.key, f.type]));
|
|
74
|
+
const definitions = catalog.benefits ?? {};
|
|
75
|
+
const live = orderedBy(input.subscriptions, (s) => s.startedAt).filter((s) => isLiveSubscriptionStatus(s.status));
|
|
76
|
+
const grants = orderedBy((input.grants ?? []).filter((g) => isGrantActive(g, input.at)), (g) => g.createdAt);
|
|
77
|
+
const grantSource = (grant, index) => `grant:${grant.id ?? index}`;
|
|
78
|
+
const benefits = [];
|
|
79
|
+
const seen = /* @__PURE__ */ new Set();
|
|
80
|
+
const add = (benefit) => {
|
|
81
|
+
const identity = `${benefit.source}|${benefit.code ?? ""}`;
|
|
82
|
+
if (seen.has(identity)) return;
|
|
83
|
+
seen.add(identity);
|
|
84
|
+
benefits.push(benefit);
|
|
85
|
+
};
|
|
86
|
+
const onlyFeatures = (properties) => Object.fromEntries(Object.entries(properties).filter(([key]) => featureTypes.has(key)));
|
|
87
|
+
const addNamed = (code, source) => {
|
|
88
|
+
if (!Object.hasOwn(definitions, code)) return;
|
|
89
|
+
const definition = definitions[code];
|
|
90
|
+
const properties = definition.type === "feature_flag" ? onlyFeatures(definition.properties) : { ...definition.properties };
|
|
91
|
+
add({
|
|
92
|
+
code,
|
|
93
|
+
type: definition.type,
|
|
94
|
+
properties,
|
|
95
|
+
source
|
|
96
|
+
});
|
|
97
|
+
};
|
|
98
|
+
const addPlan = (code, source) => {
|
|
99
|
+
const plan = planOf(code);
|
|
100
|
+
const properties = Object.fromEntries(catalog.features.filter((f) => Object.hasOwn(plan.entitlements, f.key)).map((f) => [f.key, plan.entitlements[f.key] ?? null]));
|
|
101
|
+
add({
|
|
102
|
+
code: null,
|
|
103
|
+
type: FEATURE_FLAG_BENEFIT_TYPE,
|
|
104
|
+
properties,
|
|
105
|
+
source
|
|
106
|
+
});
|
|
107
|
+
for (const benefitCode of plan.benefits ?? []) addNamed(benefitCode, source);
|
|
108
|
+
};
|
|
109
|
+
addPlan(catalog.defaultPlanCode, `plan:${catalog.defaultPlanCode}`);
|
|
110
|
+
const anyNotSuspended = live.some((sub) => sub.status !== "suspended");
|
|
111
|
+
for (const sub of live) if (sub.status === "suspended" && anyNotSuspended) planOf(sub.planCode);
|
|
112
|
+
else addPlan(sub.planCode, `plan:${sub.planCode}`);
|
|
113
|
+
grants.forEach((g, i) => {
|
|
114
|
+
if (g.planCode) addPlan(g.planCode, grantSource(g, i));
|
|
115
|
+
});
|
|
116
|
+
grants.forEach((g, i) => {
|
|
117
|
+
for (const code of g.benefitCodes ?? []) addNamed(code, grantSource(g, i));
|
|
118
|
+
});
|
|
119
|
+
const values = /* @__PURE__ */ new Map();
|
|
120
|
+
for (const benefit of benefits) {
|
|
121
|
+
if (benefit.type !== "feature_flag") continue;
|
|
122
|
+
for (const [key, value] of Object.entries(benefit.properties)) {
|
|
123
|
+
if (!featureTypes.has(key) || !isEntitlementValue(value)) continue;
|
|
124
|
+
values.set(key, mergeValue(featureTypes.get(key), values.get(key), value));
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
const overrides = {};
|
|
128
|
+
for (const g of grants) for (const [key, value] of Object.entries(g.overrides ?? {})) if (featureTypes.has(key)) overrides[key] = value;
|
|
129
|
+
if (Object.keys(overrides).length > 0) {
|
|
130
|
+
const properties = Object.fromEntries(catalog.features.filter((f) => Object.hasOwn(overrides, f.key)).map((f) => [f.key, overrides[f.key]]));
|
|
131
|
+
benefits.push({
|
|
132
|
+
code: null,
|
|
133
|
+
type: FEATURE_FLAG_BENEFIT_TYPE,
|
|
134
|
+
properties,
|
|
135
|
+
source: OVERRIDE_BENEFIT_SOURCE
|
|
136
|
+
});
|
|
137
|
+
for (const [key, value] of Object.entries(properties)) values.set(key, value);
|
|
53
138
|
}
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
|
|
139
|
+
const planGrants = grants.filter((g) => g.planCode);
|
|
140
|
+
return {
|
|
141
|
+
planCode: live[0]?.planCode ?? planGrants.at(-1)?.planCode ?? catalog.defaultPlanCode,
|
|
142
|
+
accessState: live.length > 0 && live.every((s) => s.status === "suspended") ? "suspended" : "active",
|
|
143
|
+
entitlements: Object.fromEntries(catalog.features.map((f) => [f.key, values.get(f.key) ?? null])),
|
|
144
|
+
benefits
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* The account's effective plan, entitlements and access state: the projection of
|
|
149
|
+
* `resolveBenefits` for a single subscription (the pre-billing-core signature).
|
|
150
|
+
*/
|
|
151
|
+
function resolveEntitlements(input) {
|
|
152
|
+
const { planCode, accessState, entitlements } = resolveBenefits({
|
|
153
|
+
catalog: input.catalog,
|
|
154
|
+
subscriptions: input.subscription ? [input.subscription] : [],
|
|
155
|
+
grants: input.grants,
|
|
156
|
+
at: input.at
|
|
157
|
+
});
|
|
57
158
|
return {
|
|
58
|
-
planCode
|
|
159
|
+
planCode,
|
|
59
160
|
accessState,
|
|
60
|
-
entitlements
|
|
161
|
+
entitlements
|
|
61
162
|
};
|
|
62
163
|
}
|
|
63
164
|
//#endregion
|
|
@@ -103,4 +204,4 @@ function isE164(value, options = {}) {
|
|
|
103
204
|
return options.country === "TR" ? /^\+90\d{10}$/.test(value) : /^\+[1-9]\d{7,14}$/.test(value);
|
|
104
205
|
}
|
|
105
206
|
//#endregion
|
|
106
|
-
export {
|
|
207
|
+
export { LIVE_SUBSCRIPTION_STATUSES as a, isLiveSubscriptionStatus as c, FEATURE_FLAG_BENEFIT_TYPE as i, resolveBenefits as l, isValidTckn as n, OVERRIDE_BENEFIT_SOURCE as o, isValidVkn as r, isGrantActive as s, isE164 as t, resolveEntitlements as u };
|
package/dist/contract.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as DEFAULT_CHECKOUT_TTL_MINUTES, $n as CheckoutSessionCreatedSchema, $t as HEADER_SDK, A as hostedReadinessOf, An as Stats, Ar as Currency, At as ResolvedEntitlements, B as WebhookEndpointRotateInput, Bn as CHECKOUT_ERRORS, Br as ErrorResponse, Bt as AccountDetailSchema, C as DoctorUnsellablePriceSchema, Cn as CancelSubscriptionInputSchema, Cr as PriceDef, Ct as PlanSetWarningSchema, D as DoctorWarningSchema, Dn as GrantSchema, Dr as ActorRefSchema, Dt as EntitlementRulesGrant, E as DoctorWarningCode, En as GrantCreateInputSchema, Er as API_VERSION, Et as EntitlementRulesCatalog, F as WebhookEndpoint, Fn as PortalSession, Fr as EntitlementValueSchema, Ft as ErrorCode, G as WebhookLastDelivery, Gn as CheckoutPrefillSchema, Gr as IntervalSchema, Gt as CheckoutSessionResponse, H as WebhookEndpointSchema, Hn as CheckoutConsentInputSchema, Hr as ExternalRefSchema, Ht as AccountUpsertResponseSchema, I as WebhookEndpointCreateInput, In as PortalSessionCreateInput, Ir as Entitlements, It as ErrorCodeSpec, J as generateWebhookSecret, Jn as CheckoutSession, Jt as GrantCreateResponseSchema, K as WebhookLastDeliverySchema, Kn as CheckoutRedirectTarget, Kr as MetadataSchema, Kt as CheckoutSessionResponseSchema, L as WebhookEndpointCreateInputSchema, Ln as PortalSessionCreateInputSchema, Lr as EntitlementsSchema, Lt as errorCodeSpec, M as EventTypeSchema, Mn as Subscription, Mr as DateTimeSchema, Mt as isLiveSubscriptionStatus, N as WEBHOOK_ENDPOINT_STATUSES, Nn as SubscriptionSchema, Nr as ERROR_CATEGORIES, Nt as resolveEntitlements, O as buildDoctorReport, On as Payment, Or as AmountMinorSchema, Ot as LIVE_SUBSCRIPTION_STATUSES, P as WEBHOOK_SECRET_PREFIX, Pn as PORTAL_SESSION_ERRORS, Pr as EntitlementValue, Pt as ERROR_CODES, Q as BrandingSchema, Qn as CheckoutSessionCreated, Qt as HEADER_REQUEST_ID, R as WebhookEndpointList, Rn as PortalSessionError, Rr as ErrorCategory, Rt as isKnownErrorCode, S as DoctorUnsellablePrice, Sn as CancelSubscriptionInput, Sr as Price, St as PlanSetWarningCode, T as DoctorWarning, Tn as GrantCreateInput, Tr as PriceSchema, Tt as ResyncResultSchema, U as WebhookEndpointStatus, Un as CheckoutError, Ur as IdSchema, Ut as CancelSubscriptionResponse, V as WebhookEndpointRotateInputSchema, Vn as CheckoutConsentInput, Vr as ErrorResponseSchema, Vt as AccountUpsertResponse, W as WebhookEndpointStatusSchema, Wn as CheckoutPrefill, Wr as Interval, Wt as CancelSubscriptionResponseSchema, X as Branding, Xn as CheckoutSessionCreateInputSchema, Xt as HEADER_API_VERSION, Y as webhookEndpointUrlProblem, Yn as CheckoutSessionCreateInput, Yt as HEADER_ACTOR_REF, Z as BrandingPatchSchema, Zn as CheckoutSessionCreateParsed, Zt as HEADER_IDEMPOTENCY_KEY, _ as DoctorReportSchema, _n as ManualInvoiceInputSchema, _r as FeatureDef, _t as PlanSetMode, a as DOCTOR_SEVERITIES, an as ManualInvoiceResponseSchema, ar as MAX_CHECKOUT_CONSENT_DOCS, at as ReturnOriginSchema, b as DoctorSeverity, bn as manualInvoiceTotals, br as PlanDef, bt as PlanSetResponseSchema, c as DoctorEndpoint, cn as InvoiceIssueInputSchema, cr as checkoutRedirectUrl, ct as SettingsLocaleSchema, d as DoctorFacts, dn as InvoiceSchema, dr as Catalog, dt as applySettingsPatch, en as InvoiceIssueResponse, er as CheckoutSessionSchema, et as DEFAULT_PORTAL_TTL_MINUTES, f as DoctorHosted, fn as InvoiceStatusSchema, fr as CatalogSchema, ft as isReturnUrlAllowed, g as DoctorReport, gn as ManualInvoiceInput, gr as CatalogSyncResultSchema, gt as PlanSetInputSchema, h as DoctorProviderSchema, hn as MANUAL_INVOICE_MAX_AMOUNT_MINOR, hr as CatalogSyncResult, ht as PlanSetInput, i as DOCTOR_REQUIRED_LEGAL_LINKS, in as ManualInvoiceResponse, ir as ConsentSchema, it as ProductSettingsSchema, j as DEFAULT_ENDPOINT_EVENT_TYPES, jn as StatsSchema, jr as CurrencySchema, jt as isGrantActive, k as endpointDiagnosisOf, kn as PaymentSchema, kr as CodeSchema, kt as ResolveEntitlementsInput, l as DoctorEndpointDiagnosis, ln as InvoiceLine, lr as AccountsRefreshResult, lt as TtlMinutesSchema, m as DoctorProvider, mn as InvoiceVoidInputSchema, mr as CatalogSyncInputSchema, mt as PLAN_SET_MODES, n as DOCTOR_PROVIDER_ENVIRONMENTS, nn as InvoiceVoidResponse, nr as CheckoutStatusSchema, nt as ProductSettingsPatch, o as DoctorCatalog, on as Invoice, or as ProviderPayload, ot as SETTINGS_LOCALES, p as DoctorHostedSchema, pn as InvoiceVoidInput, pr as CatalogSyncInput, pt as returnOriginsOf, q as WebhookSecretSchema, qn as CheckoutReturnStatus, qt as GrantCreateResponse, r as DOCTOR_REQUIRED_BRANDING, rn as InvoiceVoidResponseSchema, rr as Consent, rt as ProductSettingsPatchSchema, s as DoctorCatalogSchema, sn as InvoiceIssueInput, sr as ProviderPayloadSchema, st as SettingsLocale, t as DOCTOR_PENDING_BACKLOG_MS, tn as InvoiceIssueResponseSchema, tr as CheckoutStatus, tt as ProductSettings, u as DoctorEndpointSchema, un as InvoiceLineSchema, ur as AccountsRefreshResultSchema, ut as WebUrlSchema, v as DoctorSettings, vn as ManualInvoiceLineInput, vr as FeatureDefSchema, vt as PlanSetModeSchema, w as DoctorUnsellableReason, wn as Grant, wr as PriceDefSchema, wt as ResyncResult, x as DoctorSeveritySchema, xn as splitInclusiveTax, xr as PlanDefSchema, xt as PlanSetWarning, y as DoctorSettingsSchema, yn as ManualInvoiceLineInputSchema, yr as FeatureTypeSchema, yt as PlanSetResponse, z as WebhookEndpointListSchema, zn as PortalSessionSchema, zr as ErrorCategorySchema, zt as AccountDetail } from "./_chunks/index.js";
|
|
2
|
-
import { A as
|
|
3
|
-
import { n as isValidTckn, r as isValidVkn, t as isE164 } from "./_chunks/validators.js";
|
|
4
|
-
export { ACCOUNT_INCLUDES, API_VERSION, AccessState, AccessStateSchema, Account, AccountDeleteResponse, AccountDeleteResponseSchema, AccountDetail, AccountDetailSchema, AccountDunningState, AccountDunningStateSchema, AccountInclude, AccountOpenCheckout, AccountOpenCheckoutSchema, AccountProfileState, AccountProfileStateSchema, AccountScheduledChange, AccountScheduledChangeSchema, AccountSchema, AccountState, AccountStateChangeCause, AccountStateSchema, AccountSubscriptionState, AccountSubscriptionStateSchema, AccountUpsertInput, AccountUpsertInputSchema, AccountUpsertResponse, AccountUpsertResponseSchema, AccountsRefreshResult, AccountsRefreshResultSchema, ActorRefSchema, AmountMinorSchema, AnyBillingEvent, AnyBillingEventSchema, ApiVersionSchema, BillingEvent, BillingEventOf, BillingEventSchema, BillingProfile, BillingProfileInput, BillingProfileKindSchema, BillingProfileSchema, Branding, BrandingPatchSchema, BrandingSchema, CHECKOUT_ERRORS, CancelSubscriptionInput, CancelSubscriptionInputSchema, CancelSubscriptionResponse, CancelSubscriptionResponseSchema, Catalog, CatalogSchema, CatalogSyncInput, CatalogSyncInputSchema, CatalogSyncResult, CatalogSyncResultSchema, CheckoutConsentInput, CheckoutConsentInputSchema, CheckoutError, CheckoutPrefill, CheckoutPrefillSchema, CheckoutRedirectTarget, CheckoutReturnStatus, CheckoutSession, CheckoutSessionCreateInput, CheckoutSessionCreateInputSchema, CheckoutSessionCreateParsed, CheckoutSessionCreated, CheckoutSessionCreatedSchema, CheckoutSessionResponse, CheckoutSessionResponseSchema, CheckoutSessionSchema, CheckoutStatus, CheckoutStatusSchema, CodeSchema, Consent, ConsentSchema, Currency, CurrencySchema, DEFAULT_CHECKOUT_TTL_MINUTES, DEFAULT_ENDPOINT_EVENT_TYPES, DEFAULT_PORTAL_TTL_MINUTES, DOCTOR_PENDING_BACKLOG_MS, DOCTOR_PROVIDER_ENVIRONMENTS, DOCTOR_REQUIRED_BRANDING, DOCTOR_REQUIRED_LEGAL_LINKS, DOCTOR_SEVERITIES, DateTimeSchema, DoctorCatalog, DoctorCatalogSchema, DoctorEndpoint, DoctorEndpointDiagnosis, DoctorEndpointSchema, DoctorFacts, DoctorHosted, DoctorHostedSchema, DoctorProvider, DoctorProviderSchema, DoctorReport, DoctorReportSchema, DoctorSettings, DoctorSettingsSchema, DoctorSeverity, DoctorSeveritySchema, DoctorUnsellablePrice, DoctorUnsellablePriceSchema, DoctorUnsellableReason, DoctorWarning, DoctorWarningCode, DoctorWarningSchema, ERROR_CATEGORIES, ERROR_CODES, EVENT_DETAIL_SCHEMAS, EVENT_TYPES, EntitlementRulesCatalog, EntitlementRulesGrant, EntitlementSnapshot, EntitlementSnapshotSchema, EntitlementValue, EntitlementValueSchema, Entitlements, EntitlementsSchema, ErrorCategory, ErrorCategorySchema, ErrorCode, ErrorCodeSpec, ErrorResponse, ErrorResponseSchema, EventDetail, EventIdSchema, EventType, EventTypeSchema, ExternalRefSchema, FeatureDef, FeatureDefSchema, FeatureTypeSchema, Grant, GrantCreateInput, GrantCreateInputSchema, GrantCreateResponse, GrantCreateResponseSchema, GrantSchema, HEADER_ACTOR_REF, HEADER_API_VERSION, HEADER_IDEMPOTENCY_KEY, HEADER_REQUEST_ID, HEADER_SDK, IdSchema, Interval, IntervalSchema, Invoice, InvoiceIssueInput, InvoiceIssueInputSchema, InvoiceIssueResponse, InvoiceIssueResponseSchema, InvoiceLine, InvoiceLineSchema, InvoiceSchema, InvoiceStatusSchema, InvoiceVoidInput, InvoiceVoidInputSchema, InvoiceVoidResponse, InvoiceVoidResponseSchema, LEGACY_EVENT_TYPES, LIVE_SUBSCRIPTION_STATUSES, LegacyEventType, MANUAL_INVOICE_MAX_AMOUNT_MINOR, MAX_CHECKOUT_CONSENT_DOCS, ManualInvoiceInput, ManualInvoiceInputSchema, ManualInvoiceLineInput, ManualInvoiceLineInputSchema, ManualInvoiceResponse, ManualInvoiceResponseSchema, MetadataSchema, PING_EVENT_TYPE, PLAN_SET_MODES, PORTAL_SESSION_ERRORS, Payment, PaymentSchema, Ping, PingSchema, PlanDef, PlanDefSchema, PlanSetInput, PlanSetInputSchema, PlanSetMode, PlanSetModeSchema, PlanSetResponse, PlanSetResponseSchema, PlanSetWarning, PlanSetWarningCode, PlanSetWarningSchema, PortalSession, PortalSessionCreateInput, PortalSessionCreateInputSchema, PortalSessionError, PortalSessionSchema, Price, PriceDef, PriceDefSchema, PriceSchema, ProductSettings, ProductSettingsPatch, ProductSettingsPatchSchema, ProductSettingsSchema, ProviderPayload, ProviderPayloadSchema, ResolveEntitlementsInput, ResolvedEntitlements, ResyncResult, ResyncResultSchema, ReturnOriginSchema, SETTINGS_LOCALES, SettingsLocale, SettingsLocaleSchema, Stats, StatsSchema, Subscription, SubscriptionSchema, SubscriptionStatus, SubscriptionStatusSchema, SubscriptionSummary, SubscriptionSummarySchema, TtlMinutesSchema, WEBHOOK_ENDPOINT_STATUSES, WEBHOOK_SECRET_PREFIX, WebUrlSchema, WebhookEndpoint, WebhookEndpointCreateInput, WebhookEndpointCreateInputSchema, WebhookEndpointList, WebhookEndpointListSchema, WebhookEndpointRotateInput, WebhookEndpointRotateInputSchema, WebhookEndpointSchema, WebhookEndpointStatus, WebhookEndpointStatusSchema, WebhookLastDelivery, WebhookLastDeliverySchema, WebhookSecretSchema, applySettingsPatch, buildDoctorReport, checkoutRedirectUrl, endpointDiagnosisOf, errorCodeSpec, generateWebhookSecret, hostedReadinessOf, isE164, isEventType, isGrantActive, isKnownErrorCode, isLiveSubscriptionStatus, isReturnUrlAllowed, isValidTckn, isValidVkn, manualInvoiceTotals, resolveEntitlements, returnOriginsOf, splitInclusiveTax, webhookEndpointUrlProblem };
|
|
1
|
+
import { $ as WebhookEndpointStatus, $a as CatalogPlanSchema, $i as ManualInvoiceInputSchema, $n as matchesFilter, $o as MAX_METERED_PRICE_PER_UNITS, $r as ErrorCode, $s as canonicalMeterFilter, $t as EmailExtraTextSchema, A as DoctorSeveritySchema, Aa as CheckoutPrefillSchema, Ai as MeResponse, An as PLAN_SET_MODES, Ao as CatalogBenefit, Ar as IngestRejectCode, As as MeterFilterClause, At as PaymentDueDaysSchema, B as hostedReadinessOf, Ba as CheckoutStatus, Bi as InvoiceLineSchema, Bn as ResyncResult, Bo as featureValueMatchesType, Br as FEATURE_FLAG_BENEFIT_TYPE, Bs as MeterPeriod, Bt as WebUrlSchema, C as DoctorProvider, Ca as PortalSessionError, Cc as InvoiceBillingReason, Ci as InvoiceIssueResponseSchema, Cn as emailLocaleOf, Co as BenefitDefSchema, Cr as EventsIngestInput, Cs as MeterCreditEntrySchema, Ct as LateGraceMinutesSchema, D as DoctorSettings, Da as CheckoutConsentInputSchema, Dc as MetadataSchema, Di as InvoiceWaiveResponseSchema, Dn as isEmailRelevant, Do as BenefitSourceSchema, Dr as INGEST_REJECT_CODES, Ds as MeterDefInput, Dt as MeteringSettings, E as DoctorReportSchema, Ea as CheckoutConsentInput, Ec as InvoicePaymentStatusSchema, Ei as InvoiceWaiveResponse, En as emailTemplateSettings, Eo as BenefitFeatureType, Er as EventsIngestResultSchema, Es as MeterDef, Et as MeterChargeModeSchema, F as DoctorWarningCode, Fa as CheckoutSessionCreateInputSchema, Fi as UncancelSubscriptionResponseSchema, Fn as PlanSetResponse, Fo as FeatureFlagProperties, Fr as isEventTimestampInRange, Fs as MeterFilterSchema, Ft as ReturnOriginSchema, G as WebhookEndpoint, Ga as MAX_CHECKOUT_CONSENT_DOCS, Gi as InvoiceSchema, Gn as MeterCreditBenefit, Go as AccountMeters, Gr as ResolvedBenefit, Gs as MeterPeriodStatusSchema, Gt as meteringSettingsOf, H as EventTypeSchema, Ha as Consent, Hi as InvoicePaymentSessionCreateInput, Hn as GrantedMeterCredit, Ho as isMeterCreditBenefit, Hr as OVERRIDE_BENEFIT_SOURCE, Hs as MeterPeriodListSchema, Ht as billingSettingsOf, I as DoctorWarningSchema, Ia as CheckoutSessionCreateParsed, Ii as Invoice, In as PlanSetResponseSchema, Io as FeatureFlagPropertiesSchema, Ir as BenefitRulesDefinition, Is as MeterFilterValue, It as SETTINGS_LOCALES, J as WebhookEndpointList, Ja as checkoutRedirectUrl, Ji as InvoiceVoidInputSchema, Jn as MeterRulesMeter, Jo as CatalogMeterSchema, Jr as isGrantActive, Js as MeterUnitsSchema, Jt as BillingPathSchema, K as WebhookEndpointCreateInput, Ka as ProviderPayload, Ki as InvoiceStatusSchema, Kn as MeterCreditsOptions, Ko as AccountMetersSchema, Kr as ResolvedBenefits, Ks as MeterStanding, Kt as returnOriginsOf, L as buildDoctorReport, La as CheckoutSessionCreated, Li as InvoiceIssueInput, Ln as PlanSetWarning, Lo as MeterCreditAccountBenefit, Lr as BenefitRulesSubscription, Ls as MeterLabel, Lt as SettingsLocale, M as DoctorUnsellablePriceSchema, Ma as CheckoutReturnStatus, Mi as STEWARD_CAPABILITIES, Mn as PlanSetInputSchema, Mo as FeatureFlagAccountBenefit, Mr as IngestRejection, Ms as MeterFilterGroup, Mt as ProductSettingsPatch, N as DoctorUnsellableReason, Na as CheckoutSession, Ni as StewardCapability, Nn as PlanSetMode, No as FeatureFlagBenefitDef, Nr as IngestRejectionSchema, Ns as MeterFilterOperand, Nt as ProductSettingsPatchSchema, O as DoctorSettingsSchema, Oa as CheckoutError, Oi as ManualInvoiceResponse, On as liveSubscriptionOf, Oo as BenefitType, Or as IngestEvent, Os as MeterDefSchema, Ot as MeteringSettingsPatchSchema, P as DoctorWarning, Pa as CheckoutSessionCreateInput, Pi as UncancelSubscriptionResponse, Pn as PlanSetModeSchema, Po as FeatureFlagBenefitDefSchema, Pr as hasControlCharacters, Ps as MeterFilterOperator, Pt as ProductSettingsSchema, Q as WebhookEndpointSchema, Qa as CatalogPlan, Qi as ManualInvoiceInput, Qn as contributionOf, Qo as DecimalUnitsStringSchema, Qr as ERROR_CODES, Qs as MeteredPriceSchema, Qt as EMAIL_TEMPLATE_BY_EVENT, R as emailReadinessOf, Ra as CheckoutSessionCreatedSchema, Ri as InvoiceIssueInputSchema, Rn as PlanSetWarningCode, Ro as MeterCreditBenefitDef, Rr as EntitlementRulesCatalog, Rs as MeterLabelSchema, Rt as SettingsLocaleSchema, S as DoctorOverageSchema, Sa as PortalSessionCreateInputSchema, Sc as IntervalSchema, Si as InvoiceIssueResponse, Sn as billingPageUrl, So as BenefitDef, Sr as EventNameSchema, Ss as MeterCreditEntryKindSchema, St as EventsSettingsSchema, T as DoctorReport, Ta as CHECKOUT_ERRORS, Tc as InvoicePaymentStatus, Ti as InvoiceVoidResponseSchema, Tn as emailTemplateOf, To as BenefitDescriptionSchema, Tr as EventsIngestResult, Ts as MeterCreditPropertiesSchema, Tt as MeterChargeMode, U as WEBHOOK_ENDPOINT_STATUSES, Ua as ConsentSchema, Ui as InvoicePaymentSessionCreateInputSchema, Un as MeterChargeTotalsLine, Uo as AccountMeter, Ur as ResolveBenefitsInput, Us as MeterPeriodSchema, Ut as eventsSettingsOf, V as DEFAULT_ENDPOINT_EVENT_TYPES, Va as CheckoutStatusSchema, Vi as InvoicePaymentSession, Vn as ResyncResultSchema, Vo as isFeatureFlagBenefit, Vr as LIVE_SUBSCRIPTION_STATUSES, Vs as MeterPeriodList, Vt as applySettingsPatch, W as WEBHOOK_SECRET_PREFIX, Wa as INDIVIDUAL_IDENTITY_PLACEHOLDER, Wi as InvoicePaymentSessionSchema, Wn as MeterContribution, Wo as AccountMeterSchema, Wr as ResolveEntitlementsInput, Ws as MeterPeriodStatus, Wt as isReturnUrlAllowed, X as WebhookEndpointRotateInput, Xa as AccountsRefreshResultSchema, Xi as InvoiceWaiveInputSchema, Xn as addUtcMonths, Xo as CreditGrantInputSchema, Xr as resolveBenefits, Xs as MeteredPriceDef, Xt as EMAIL_PAYLOAD_SCHEMAS, Y as WebhookEndpointListSchema, Ya as AccountsRefreshResult, Yi as InvoiceWaiveInput, Yn as OverageRateInput, Yo as CreditGrantInput, Yr as isLiveSubscriptionStatus, Ys as MeteredPrice, Yt as EMAIL_LOCALES, Z as WebhookEndpointRotateInputSchema, Za as Catalog, Zi as MANUAL_INVOICE_MAX_AMOUNT_MINOR, Zn as consumptionOf, Zo as DEFAULT_METER_LOW_AT, Zr as resolveEntitlements, Zs as MeteredPriceDefSchema, Zt as EMAIL_TEMPLATES, _ as DoctorEventsSchema, _a as SubscriptionChangeInputSchema, _c as ExternalRefSchema, _i as HEADER_ACTOR_REF, _n as PriceChangeNoticeEmail, _o as PriceDefSchema, _r as EventMetadata, _s as MeterChargeSchema, _t as DEFAULT_PAYMENT_DUE_DAYS, a as DOCTOR_ROLLUP_LAG_WARN_SECONDS, aa as CancelSubscriptionInputSchema, ac as Currency, ai as AccountUpsertResponse, an as EmailSettingsPatchSchema, ao as FeatureDef, ar as rateOverage, as as METER_FILTER_MAX_DEPTH, at as webhookEndpointUrlProblem, b as DoctorHostedSchema, ba as PortalSession, bc as IdSchema, bi as HEADER_REQUEST_ID, bn as PriceChangeNoticeMeteredRateSchema, bo as AccountBenefitSchema, br as EventMetadataValue, bs as MeterCreditEntry, bt as EventsSettings, c as DoctorBillingSchema, ca as GrantCreateInputSchema, cc as ERROR_CATEGORIES, ci as CancelSubscriptionResponseSchema, cn as EmailTemplateSchema, co as MAX_CATALOG_BENEFITS, cr as EVENTS_INGEST_MAX_BYTES, cs as METER_STANDINGS, ct as BillingSettingsSchema, d as DoctorEmails, da as Payment, dc as Entitlements, di as CheckoutSessionResponse, dn as InvoicePaymentDueEmail, do as MAX_PLAN_BENEFITS, dr as EVENT_METADATA_MAX_PAIRS, ds as MeterAggregationSchema, dt as BrandingSchema, ea as ManualInvoiceLineInput, ec as meterFilterClauseOf, ei as ErrorCodeSpec, en as EmailLocale, eo as CatalogSchema, er as meterChargeTotals, es as MAX_METER_UNITS, et as WebhookEndpointStatusSchema, f as DoctorEmailsSchema, fa as PaymentSchema, fc as EntitlementsSchema, fi as CheckoutSessionResponseSchema, fn as InvoicePaymentDueEmailSchema, fo as METERED_PRICE_TAX_MISMATCH, fr as EVENT_METADATA_STRING_MAX_LENGTH, fs as MeterCharge, ft as DEFAULT_CHECKOUT_TTL_MINUTES, g as DoctorEvents, ga as SubscriptionChangeInput, gc as ErrorResponseSchema, gi as GrantCreateResponseSchema, gn as NotificationEmailsSchema, go as PriceDef, gr as EventExternalIdSchema, gs as MeterChargeListSchema, gt as DEFAULT_MIN_INVOICE_MINOR, h as DoctorEndpointSchema, ha as Subscription, hc as ErrorResponse, hi as GrantCreateResponse, hn as NoticedMeteredRateSchema, ho as Price, hr as EVENT_TIMESTAMP_MAX_SKEW_MINUTES, hs as MeterChargeList, ht as DEFAULT_METER_CHARGE_MODE, i as DOCTOR_REQUIRED_LEGAL_LINKS, ia as CancelSubscriptionInput, ic as CodeSchema, ii as AccountDetailSchema, in as EmailSettingsPatch, io as CatalogSyncResultSchema, ir as periodBoundsOf, is as METER_FILTER_MAX_CONDITIONS, it as generateWebhookSecret, j as DoctorUnsellablePrice, ja as CheckoutRedirectTarget, ji as MeResponseSchema, jn as PlanSetInput, jo as CatalogBenefitSchema, jr as IngestRejectCodeSchema, js as MeterFilterCondition, jt as ProductSettings, k as DoctorSeverity, ka as CheckoutPrefill, ki as ManualInvoiceResponseSchema, kn as uniqueEmails, ko as BenefitTypeSchema, kr as IngestEventSchema, ks as MeterFilter, kt as MeteringSettingsSchema, l as DoctorCatalog, la as GrantSchema, lc as EntitlementValue, li as ChangeSubscriptionResponse, ln as EmailTemplateSettings, lo as MAX_CATALOG_METERED_PRICES, lr as EVENTS_INGEST_MAX_EVENTS, ls as MeterAggregation, lt as Branding, m as DoctorEndpointDiagnosis, ma as StatsSchema, mc as ErrorCategorySchema, mi as CreditGrantResponseSchema, mn as NoticedMeteredRate, mo as PlanDefSchema, mr as EVENT_TIMESTAMP_MAX_AGE_DAYS, ms as MeterChargeLineSchema, mt as DEFAULT_LATE_GRACE_MINUTES, n as DOCTOR_PROVIDER_ENVIRONMENTS, na as manualInvoiceTotals, nc as ActorRefSchema, ni as isKnownErrorCode, nn as EmailSenderSchema, no as CatalogSyncInputSchema, nr as overageCapReached, ns as METER_CHARGE_STATUSES, nt as WebhookLastDeliverySchema, o as DOCTOR_SEVERITIES, oa as Grant, oc as CurrencySchema, oi as AccountUpsertResponseSchema, on as EmailSettingsSchema, oo as FeatureDefSchema, or as rolloverOf, os as METER_FILTER_OPERATORS, ot as BillingSettings, p as DoctorEndpoint, pa as Stats, pc as ErrorCategory, pi as CreditGrantResponse, pn as MAX_NOTIFICATION_EMAILS, po as PlanDef, pr as EVENT_NAME_MAX_LENGTH, ps as MeterChargeLine, pt as DEFAULT_EVENT_RETENTION_DAYS, q as WebhookEndpointCreateInputSchema, qa as ProviderPayloadSchema, qi as InvoiceVoidInput, qn as MeterRulesEvent, qo as CatalogMeter, qr as ResolvedEntitlements, qs as MeterStandingSchema, qt as BILLING_PATH_PLACEHOLDERS, r as DOCTOR_REQUIRED_BRANDING, ra as splitInclusiveTax, rc as AmountMinorSchema, ri as AccountDetail, rn as EmailSettings, ro as CatalogSyncResult, rr as overageOf, rs as METER_CREDIT_ENTRY_KINDS, rt as WebhookSecretSchema, s as DoctorBilling, sa as GrantCreateInput, sc as DateTimeSchema, si as CancelSubscriptionResponse, sn as EmailTemplate, so as FeatureTypeSchema, sr as standingOf, ss as METER_PERIOD_STATUSES, st as BillingSettingsPatchSchema, t as DOCTOR_PENDING_BACKLOG_MS, ta as ManualInvoiceLineInputSchema, tc as API_VERSION, ti as errorCodeSpec, tn as EmailRelevanceFacts, to as CatalogSyncInput, tr as meterCreditsOf, ts as METER_AGGREGATION_KINDS, tt as WebhookLastDelivery, u as DoctorCatalogSchema, ua as MAX_GRANT_BENEFITS, uc as EntitlementValueSchema, ui as ChangeSubscriptionResponseSchema, un as EmailTemplateSettingsSchema, uo as MAX_CATALOG_METERS, ur as EVENT_METADATA_KEY_MAX_LENGTH, us as MeterAggregationKind, ut as BrandingPatchSchema, v as DoctorFacts, va as SubscriptionSchema, vc as INVOICE_BILLING_REASONS, vi as HEADER_API_VERSION, vn as PriceChangeNoticeEmailSchema, vo as PriceSchema, vr as EventMetadataKeySchema, vs as MeterChargeStatus, vt as DEFAULT_PORTAL_TTL_MINUTES, w as DoctorProviderSchema, wa as PortalSessionSchema, wc as InvoiceBillingReasonSchema, wi as InvoiceVoidResponse, wn as emailRecipients, wo as BenefitDescription, wr as EventsIngestInputSchema, ws as MeterCreditProperties, wt as METER_CHARGE_MODES, x as DoctorOverage, xa as PortalSessionCreateInput, xc as Interval, xi as HEADER_SDK, xn as applyEmailSettingsPatch, xo as BENEFIT_TYPES, xr as EventMetadataValueSchema, xs as MeterCreditEntryKind, xt as EventsSettingsPatchSchema, y as DoctorHosted, ya as PORTAL_SESSION_ERRORS, yc as INVOICE_PAYMENT_STATUSES, yi as HEADER_IDEMPOTENCY_KEY, yn as PriceChangeNoticeMeteredRate, yo as AccountBenefit, yr as EventMetadataSchema, ys as MeterChargeStatusSchema, yt as EventRetentionDaysSchema, z as endpointDiagnosisOf, za as CheckoutSessionSchema, zi as InvoiceLine, zn as PlanSetWarningSchema, zo as MeterCreditBenefitDefSchema, zr as EntitlementRulesGrant, zs as MeterLowAtSchema, zt as TtlMinutesSchema } from "./_chunks/index.js";
|
|
2
|
+
import { $ as EntitlementSnapshot, A as AccountMeterState, B as AccountScheduledChange, C as Account, D as AccountDunningStateSchema, E as AccountDunningState, F as AccountOpenCheckoutSchema, G as AccountSubscriptionState, H as AccountSchema, I as AccountOpenInvoice, J as AccountUpsertInputSchema, K as AccountSubscriptionStateSchema, L as AccountOpenInvoiceSchema, M as AccountMetersState, N as AccountMetersStateSchema, O as AccountInclude, P as AccountOpenCheckout, Q as BillingProfileSchema, R as AccountProfileState, S as AccessStateSchema, T as AccountDeleteResponseSchema, U as AccountState, V as AccountScheduledChangeSchema, W as AccountStateSchema, X as BillingProfileInput, Y as BillingProfile, Z as BillingProfileKindSchema, _ as Ping, a as BillingEvent, b as ACCOUNT_INCLUDES, c as EVENT_DETAIL_SCHEMAS, d as EventIdSchema, et as EntitlementSnapshotSchema, f as EventType, g as PING_EVENT_TYPE, h as LegacyEventType, i as ApiVersionSchema, it as SubscriptionSummarySchema, j as AccountMeterStateSchema, k as AccountLocaleSchema, l as EVENT_TYPES, m as LEGACY_EVENT_TYPES, n as AnyBillingEvent, nt as SubscriptionStatusSchema, o as BillingEventOf, p as FULL_STATE_EVENT_TYPES, q as AccountUpsertInput, r as AnyBillingEventSchema, rt as SubscriptionSummary, s as BillingEventSchema, t as AccountStateChangeCause, tt as SubscriptionStatus, u as EventDetail, v as PingSchema, w as AccountDeleteResponse, x as AccessState, y as isEventType, z as AccountProfileStateSchema } from "./_chunks/events.js";
|
|
3
|
+
import { a as MICRO_UNITS_PER_UNIT, c as isMicroPrecise, d as plainDecimalOf, f as toMicroUnits, i as InvalidUnitValueError, l as microToDecimalString, n as isValidTckn, o as UNIT_DECIMALS, r as isValidVkn, s as fromMicroUnits, t as isE164, u as parseMicroUnits } from "./_chunks/validators.js";
|
|
4
|
+
export { ACCOUNT_INCLUDES, API_VERSION, AccessState, AccessStateSchema, Account, AccountBenefit, AccountBenefitSchema, AccountDeleteResponse, AccountDeleteResponseSchema, AccountDetail, AccountDetailSchema, AccountDunningState, AccountDunningStateSchema, AccountInclude, AccountLocaleSchema, AccountMeter, AccountMeterSchema, AccountMeterState, AccountMeterStateSchema, AccountMeters, AccountMetersSchema, AccountMetersState, AccountMetersStateSchema, AccountOpenCheckout, AccountOpenCheckoutSchema, AccountOpenInvoice, AccountOpenInvoiceSchema, AccountProfileState, AccountProfileStateSchema, AccountScheduledChange, AccountScheduledChangeSchema, AccountSchema, AccountState, AccountStateChangeCause, AccountStateSchema, AccountSubscriptionState, AccountSubscriptionStateSchema, AccountUpsertInput, AccountUpsertInputSchema, AccountUpsertResponse, AccountUpsertResponseSchema, AccountsRefreshResult, AccountsRefreshResultSchema, ActorRefSchema, AmountMinorSchema, AnyBillingEvent, AnyBillingEventSchema, ApiVersionSchema, BENEFIT_TYPES, BILLING_PATH_PLACEHOLDERS, BenefitDef, BenefitDefSchema, BenefitDescription, BenefitDescriptionSchema, BenefitFeatureType, BenefitRulesDefinition, BenefitRulesSubscription, BenefitSourceSchema, BenefitType, BenefitTypeSchema, BillingEvent, BillingEventOf, BillingEventSchema, BillingPathSchema, BillingProfile, BillingProfileInput, BillingProfileKindSchema, BillingProfileSchema, BillingSettings, BillingSettingsPatchSchema, BillingSettingsSchema, Branding, BrandingPatchSchema, BrandingSchema, CHECKOUT_ERRORS, CancelSubscriptionInput, CancelSubscriptionInputSchema, CancelSubscriptionResponse, CancelSubscriptionResponseSchema, Catalog, CatalogBenefit, CatalogBenefitSchema, CatalogMeter, CatalogMeterSchema, CatalogPlan, CatalogPlanSchema, CatalogSchema, CatalogSyncInput, CatalogSyncInputSchema, CatalogSyncResult, CatalogSyncResultSchema, ChangeSubscriptionResponse, ChangeSubscriptionResponseSchema, CheckoutConsentInput, CheckoutConsentInputSchema, CheckoutError, CheckoutPrefill, CheckoutPrefillSchema, CheckoutRedirectTarget, CheckoutReturnStatus, CheckoutSession, CheckoutSessionCreateInput, CheckoutSessionCreateInputSchema, CheckoutSessionCreateParsed, CheckoutSessionCreated, CheckoutSessionCreatedSchema, CheckoutSessionResponse, CheckoutSessionResponseSchema, CheckoutSessionSchema, CheckoutStatus, CheckoutStatusSchema, CodeSchema, Consent, ConsentSchema, CreditGrantInput, CreditGrantInputSchema, CreditGrantResponse, CreditGrantResponseSchema, Currency, CurrencySchema, DEFAULT_CHECKOUT_TTL_MINUTES, DEFAULT_ENDPOINT_EVENT_TYPES, DEFAULT_EVENT_RETENTION_DAYS, DEFAULT_LATE_GRACE_MINUTES, DEFAULT_METER_CHARGE_MODE, DEFAULT_METER_LOW_AT, DEFAULT_MIN_INVOICE_MINOR, DEFAULT_PAYMENT_DUE_DAYS, DEFAULT_PORTAL_TTL_MINUTES, DOCTOR_PENDING_BACKLOG_MS, DOCTOR_PROVIDER_ENVIRONMENTS, DOCTOR_REQUIRED_BRANDING, DOCTOR_REQUIRED_LEGAL_LINKS, DOCTOR_ROLLUP_LAG_WARN_SECONDS, DOCTOR_SEVERITIES, DateTimeSchema, DecimalUnitsStringSchema, DoctorBilling, DoctorBillingSchema, DoctorCatalog, DoctorCatalogSchema, DoctorEmails, DoctorEmailsSchema, DoctorEndpoint, DoctorEndpointDiagnosis, DoctorEndpointSchema, DoctorEvents, DoctorEventsSchema, DoctorFacts, DoctorHosted, DoctorHostedSchema, DoctorOverage, DoctorOverageSchema, DoctorProvider, DoctorProviderSchema, DoctorReport, DoctorReportSchema, DoctorSettings, DoctorSettingsSchema, DoctorSeverity, DoctorSeveritySchema, DoctorUnsellablePrice, DoctorUnsellablePriceSchema, DoctorUnsellableReason, DoctorWarning, DoctorWarningCode, DoctorWarningSchema, EMAIL_LOCALES, EMAIL_PAYLOAD_SCHEMAS, EMAIL_TEMPLATES, EMAIL_TEMPLATE_BY_EVENT, ERROR_CATEGORIES, ERROR_CODES, EVENTS_INGEST_MAX_BYTES, EVENTS_INGEST_MAX_EVENTS, EVENT_DETAIL_SCHEMAS, EVENT_METADATA_KEY_MAX_LENGTH, EVENT_METADATA_MAX_PAIRS, EVENT_METADATA_STRING_MAX_LENGTH, EVENT_NAME_MAX_LENGTH, EVENT_TIMESTAMP_MAX_AGE_DAYS, EVENT_TIMESTAMP_MAX_SKEW_MINUTES, EVENT_TYPES, EmailExtraTextSchema, EmailLocale, EmailRelevanceFacts, EmailSenderSchema, EmailSettings, EmailSettingsPatch, EmailSettingsPatchSchema, EmailSettingsSchema, EmailTemplate, EmailTemplateSchema, EmailTemplateSettings, EmailTemplateSettingsSchema, EntitlementRulesCatalog, EntitlementRulesGrant, EntitlementSnapshot, EntitlementSnapshotSchema, EntitlementValue, EntitlementValueSchema, Entitlements, EntitlementsSchema, ErrorCategory, ErrorCategorySchema, ErrorCode, ErrorCodeSpec, ErrorResponse, ErrorResponseSchema, EventDetail, EventExternalIdSchema, EventIdSchema, EventMetadata, EventMetadataKeySchema, EventMetadataSchema, EventMetadataValue, EventMetadataValueSchema, EventNameSchema, EventRetentionDaysSchema, EventType, EventTypeSchema, EventsIngestInput, EventsIngestInputSchema, EventsIngestResult, EventsIngestResultSchema, EventsSettings, EventsSettingsPatchSchema, EventsSettingsSchema, ExternalRefSchema, FEATURE_FLAG_BENEFIT_TYPE, FULL_STATE_EVENT_TYPES, FeatureDef, FeatureDefSchema, FeatureFlagAccountBenefit, FeatureFlagBenefitDef, FeatureFlagBenefitDefSchema, FeatureFlagProperties, FeatureFlagPropertiesSchema, FeatureTypeSchema, Grant, GrantCreateInput, GrantCreateInputSchema, GrantCreateResponse, GrantCreateResponseSchema, GrantSchema, GrantedMeterCredit, HEADER_ACTOR_REF, HEADER_API_VERSION, HEADER_IDEMPOTENCY_KEY, HEADER_REQUEST_ID, HEADER_SDK, INDIVIDUAL_IDENTITY_PLACEHOLDER, INGEST_REJECT_CODES, INVOICE_BILLING_REASONS, INVOICE_PAYMENT_STATUSES, IdSchema, IngestEvent, IngestEventSchema, IngestRejectCode, IngestRejectCodeSchema, IngestRejection, IngestRejectionSchema, Interval, IntervalSchema, InvalidUnitValueError, Invoice, InvoiceBillingReason, InvoiceBillingReasonSchema, InvoiceIssueInput, InvoiceIssueInputSchema, InvoiceIssueResponse, InvoiceIssueResponseSchema, InvoiceLine, InvoiceLineSchema, InvoicePaymentDueEmail, InvoicePaymentDueEmailSchema, InvoicePaymentSession, InvoicePaymentSessionCreateInput, InvoicePaymentSessionCreateInputSchema, InvoicePaymentSessionSchema, InvoicePaymentStatus, InvoicePaymentStatusSchema, InvoiceSchema, InvoiceStatusSchema, InvoiceVoidInput, InvoiceVoidInputSchema, InvoiceVoidResponse, InvoiceVoidResponseSchema, InvoiceWaiveInput, InvoiceWaiveInputSchema, InvoiceWaiveResponse, InvoiceWaiveResponseSchema, LEGACY_EVENT_TYPES, LIVE_SUBSCRIPTION_STATUSES, LateGraceMinutesSchema, LegacyEventType, MANUAL_INVOICE_MAX_AMOUNT_MINOR, MAX_CATALOG_BENEFITS, MAX_CATALOG_METERED_PRICES, MAX_CATALOG_METERS, MAX_CHECKOUT_CONSENT_DOCS, MAX_GRANT_BENEFITS, MAX_METERED_PRICE_PER_UNITS, MAX_METER_UNITS, MAX_NOTIFICATION_EMAILS, MAX_PLAN_BENEFITS, METERED_PRICE_TAX_MISMATCH, METER_AGGREGATION_KINDS, METER_CHARGE_MODES, METER_CHARGE_STATUSES, METER_CREDIT_ENTRY_KINDS, METER_FILTER_MAX_CONDITIONS, METER_FILTER_MAX_DEPTH, METER_FILTER_OPERATORS, METER_PERIOD_STATUSES, METER_STANDINGS, MICRO_UNITS_PER_UNIT, ManualInvoiceInput, ManualInvoiceInputSchema, ManualInvoiceLineInput, ManualInvoiceLineInputSchema, ManualInvoiceResponse, ManualInvoiceResponseSchema, MeResponse, MeResponseSchema, MetadataSchema, MeterAggregation, MeterAggregationKind, MeterAggregationSchema, MeterCharge, MeterChargeLine, MeterChargeLineSchema, MeterChargeList, MeterChargeListSchema, MeterChargeMode, MeterChargeModeSchema, MeterChargeSchema, MeterChargeStatus, MeterChargeStatusSchema, MeterChargeTotalsLine, MeterContribution, MeterCreditAccountBenefit, MeterCreditBenefit, MeterCreditBenefitDef, MeterCreditBenefitDefSchema, MeterCreditEntry, MeterCreditEntryKind, MeterCreditEntryKindSchema, MeterCreditEntrySchema, MeterCreditProperties, MeterCreditPropertiesSchema, MeterCreditsOptions, MeterDef, MeterDefInput, MeterDefSchema, MeterFilter, MeterFilterClause, MeterFilterCondition, MeterFilterGroup, MeterFilterOperand, MeterFilterOperator, MeterFilterSchema, MeterFilterValue, MeterLabel, MeterLabelSchema, MeterLowAtSchema, MeterPeriod, MeterPeriodList, MeterPeriodListSchema, MeterPeriodSchema, MeterPeriodStatus, MeterPeriodStatusSchema, MeterRulesEvent, MeterRulesMeter, MeterStanding, MeterStandingSchema, MeterUnitsSchema, MeteredPrice, MeteredPriceDef, MeteredPriceDefSchema, MeteredPriceSchema, MeteringSettings, MeteringSettingsPatchSchema, MeteringSettingsSchema, NoticedMeteredRate, NoticedMeteredRateSchema, NotificationEmailsSchema, OVERRIDE_BENEFIT_SOURCE, OverageRateInput, PING_EVENT_TYPE, PLAN_SET_MODES, PORTAL_SESSION_ERRORS, Payment, PaymentDueDaysSchema, PaymentSchema, Ping, PingSchema, PlanDef, PlanDefSchema, PlanSetInput, PlanSetInputSchema, PlanSetMode, PlanSetModeSchema, PlanSetResponse, PlanSetResponseSchema, PlanSetWarning, PlanSetWarningCode, PlanSetWarningSchema, PortalSession, PortalSessionCreateInput, PortalSessionCreateInputSchema, PortalSessionError, PortalSessionSchema, Price, PriceChangeNoticeEmail, PriceChangeNoticeEmailSchema, PriceChangeNoticeMeteredRate, PriceChangeNoticeMeteredRateSchema, PriceDef, PriceDefSchema, PriceSchema, ProductSettings, ProductSettingsPatch, ProductSettingsPatchSchema, ProductSettingsSchema, ProviderPayload, ProviderPayloadSchema, ResolveBenefitsInput, ResolveEntitlementsInput, ResolvedBenefit, ResolvedBenefits, ResolvedEntitlements, ResyncResult, ResyncResultSchema, ReturnOriginSchema, SETTINGS_LOCALES, STEWARD_CAPABILITIES, SettingsLocale, SettingsLocaleSchema, Stats, StatsSchema, StewardCapability, Subscription, SubscriptionChangeInput, SubscriptionChangeInputSchema, SubscriptionSchema, SubscriptionStatus, SubscriptionStatusSchema, SubscriptionSummary, SubscriptionSummarySchema, TtlMinutesSchema, UNIT_DECIMALS, UncancelSubscriptionResponse, UncancelSubscriptionResponseSchema, WEBHOOK_ENDPOINT_STATUSES, WEBHOOK_SECRET_PREFIX, WebUrlSchema, WebhookEndpoint, WebhookEndpointCreateInput, WebhookEndpointCreateInputSchema, WebhookEndpointList, WebhookEndpointListSchema, WebhookEndpointRotateInput, WebhookEndpointRotateInputSchema, WebhookEndpointSchema, WebhookEndpointStatus, WebhookEndpointStatusSchema, WebhookLastDelivery, WebhookLastDeliverySchema, WebhookSecretSchema, addUtcMonths, applyEmailSettingsPatch, applySettingsPatch, billingPageUrl, billingSettingsOf, buildDoctorReport, canonicalMeterFilter, checkoutRedirectUrl, consumptionOf, contributionOf, emailLocaleOf, emailReadinessOf, emailRecipients, emailTemplateOf, emailTemplateSettings, endpointDiagnosisOf, errorCodeSpec, eventsSettingsOf, featureValueMatchesType, fromMicroUnits, generateWebhookSecret, hasControlCharacters, hostedReadinessOf, isE164, isEmailRelevant, isEventTimestampInRange, isEventType, isFeatureFlagBenefit, isGrantActive, isKnownErrorCode, isLiveSubscriptionStatus, isMeterCreditBenefit, isMicroPrecise, isReturnUrlAllowed, isValidTckn, isValidVkn, liveSubscriptionOf, manualInvoiceTotals, matchesFilter, meterChargeTotals, meterCreditsOf, meterFilterClauseOf, meteringSettingsOf, microToDecimalString, overageCapReached, overageOf, parseMicroUnits, periodBoundsOf, plainDecimalOf, rateOverage, resolveBenefits, resolveEntitlements, returnOriginsOf, rolloverOf, splitInclusiveTax, standingOf, toMicroUnits, uniqueEmails, webhookEndpointUrlProblem };
|
package/dist/contract.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
import { $ as
|
|
3
|
-
import { a as
|
|
4
|
-
export { ACCOUNT_INCLUDES, API_VERSION, AccessStateSchema, AccountDeleteResponseSchema, AccountDetailSchema, AccountDunningStateSchema, AccountOpenCheckoutSchema, AccountProfileStateSchema, AccountScheduledChangeSchema, AccountSchema, AccountStateSchema, AccountSubscriptionStateSchema, AccountUpsertInputSchema, AccountUpsertResponseSchema, AccountsRefreshResultSchema, ActorRefSchema, AmountMinorSchema, AnyBillingEventSchema, ApiVersionSchema, BillingEventSchema, BillingProfileKindSchema, BillingProfileSchema, BrandingPatchSchema, BrandingSchema, CHECKOUT_ERRORS, CancelSubscriptionInputSchema, CancelSubscriptionResponseSchema, CatalogSchema, CatalogSyncInputSchema, CatalogSyncResultSchema, CheckoutConsentInputSchema, CheckoutPrefillSchema, CheckoutSessionCreateInputSchema, CheckoutSessionCreatedSchema, CheckoutSessionResponseSchema, CheckoutSessionSchema, CheckoutStatusSchema, CodeSchema, ConsentSchema, CurrencySchema, DEFAULT_CHECKOUT_TTL_MINUTES, DEFAULT_ENDPOINT_EVENT_TYPES, DEFAULT_PORTAL_TTL_MINUTES, DOCTOR_PENDING_BACKLOG_MS, DOCTOR_PROVIDER_ENVIRONMENTS, DOCTOR_REQUIRED_BRANDING, DOCTOR_REQUIRED_LEGAL_LINKS, DOCTOR_SEVERITIES, DateTimeSchema, DoctorCatalogSchema, DoctorEndpointSchema, DoctorHostedSchema, DoctorProviderSchema, DoctorReportSchema, DoctorSettingsSchema, DoctorSeveritySchema, DoctorUnsellablePriceSchema, DoctorWarningSchema, ERROR_CATEGORIES, ERROR_CODES, EVENT_DETAIL_SCHEMAS, EVENT_TYPES, EntitlementSnapshotSchema, EntitlementValueSchema, EntitlementsSchema, ErrorCategorySchema, ErrorResponseSchema, EventIdSchema, EventTypeSchema, ExternalRefSchema, FeatureDefSchema, FeatureTypeSchema, GrantCreateInputSchema, GrantCreateResponseSchema, GrantSchema, HEADER_ACTOR_REF, HEADER_API_VERSION, HEADER_IDEMPOTENCY_KEY, HEADER_REQUEST_ID, HEADER_SDK, IdSchema, IntervalSchema, InvoiceIssueInputSchema, InvoiceIssueResponseSchema, InvoiceLineSchema, InvoiceSchema, InvoiceStatusSchema, InvoiceVoidInputSchema, InvoiceVoidResponseSchema, LEGACY_EVENT_TYPES, LIVE_SUBSCRIPTION_STATUSES, MANUAL_INVOICE_MAX_AMOUNT_MINOR, MAX_CHECKOUT_CONSENT_DOCS, ManualInvoiceInputSchema, ManualInvoiceLineInputSchema, ManualInvoiceResponseSchema, MetadataSchema, PING_EVENT_TYPE, PLAN_SET_MODES, PORTAL_SESSION_ERRORS, PaymentSchema, PingSchema, PlanDefSchema, PlanSetInputSchema, PlanSetModeSchema, PlanSetResponseSchema, PlanSetWarningSchema, PortalSessionCreateInputSchema, PortalSessionSchema, PriceDefSchema, PriceSchema, ProductSettingsPatchSchema, ProductSettingsSchema, ProviderPayloadSchema, ResyncResultSchema, ReturnOriginSchema, SETTINGS_LOCALES, SettingsLocaleSchema, StatsSchema, SubscriptionSchema, SubscriptionStatusSchema, SubscriptionSummarySchema, TtlMinutesSchema, WEBHOOK_ENDPOINT_STATUSES, WEBHOOK_SECRET_PREFIX, WebUrlSchema, WebhookEndpointCreateInputSchema, WebhookEndpointListSchema, WebhookEndpointRotateInputSchema, WebhookEndpointSchema, WebhookEndpointStatusSchema, WebhookLastDeliverySchema, WebhookSecretSchema, applySettingsPatch, buildDoctorReport, checkoutRedirectUrl, endpointDiagnosisOf, errorCodeSpec, generateWebhookSecret, hostedReadinessOf, isE164, isEventType, isGrantActive, isKnownErrorCode, isLiveSubscriptionStatus, isReturnUrlAllowed, isValidTckn, isValidVkn, manualInvoiceTotals, resolveEntitlements, returnOriginsOf, splitInclusiveTax, webhookEndpointUrlProblem };
|
|
1
|
+
import { $ as emailRecipients, $t as canonicalMeterFilter, A as SubscriptionStatusSchema, An as isEventTimestampInRange, At as METER_FILTER_MAX_DEPTH, B as EmailSettingsPatchSchema, Bn as ErrorCategorySchema, Bt as MeterCreditEntrySchema, C as AccountSchema, Cn as EventsIngestInputSchema, Ct as DecimalUnitsStringSchema, D as BillingProfileKindSchema, Dn as IngestRejectCodeSchema, Dt as METER_CHARGE_STATUSES, E as AccountUpsertInputSchema, En as IngestEventSchema, Et as METER_AGGREGATION_KINDS, F as EMAIL_PAYLOAD_SCHEMAS, Fn as CurrencySchema, Ft as MeterChargeLineSchema, G as MAX_NOTIFICATION_EMAILS, Gn as IdSchema, Gt as MeterLowAtSchema, H as EmailTemplateSchema, Hn as ExternalRefSchema, Ht as MeterDefSchema, I as EMAIL_TEMPLATES, In as DateTimeSchema, It as MeterChargeListSchema, J as PriceChangeNoticeEmailSchema, Jn as InvoicePaymentStatusSchema, Jt as MeterPeriodStatusSchema, K as NoticedMeteredRateSchema, Kn as IntervalSchema, Kt as MeterPeriodListSchema, L as EMAIL_TEMPLATE_BY_EVENT, Ln as ERROR_CATEGORIES, Lt as MeterChargeSchema, M as BILLING_PATH_PLACEHOLDERS, Mn as ActorRefSchema, Mt as METER_PERIOD_STATUSES, N as BillingPathSchema, Nn as AmountMinorSchema, Nt as METER_STANDINGS, O as BillingProfileSchema, On as IngestRejectionSchema, Ot as METER_CREDIT_ENTRY_KINDS, P as EMAIL_LOCALES, Pn as CodeSchema, Pt as MeterAggregationSchema, Q as emailLocaleOf, Qt as MeteredPriceSchema, R as EmailExtraTextSchema, Rn as EntitlementValueSchema, Rt as MeterChargeStatusSchema, S as AccountScheduledChangeSchema, Sn as EventNameSchema, St as DEFAULT_METER_LOW_AT, T as AccountSubscriptionStateSchema, Tn as INGEST_REJECT_CODES, Tt as MAX_METER_UNITS, U as EmailTemplateSettingsSchema, Un as INVOICE_BILLING_REASONS, Ut as MeterFilterSchema, V as EmailSettingsSchema, Vn as ErrorResponseSchema, Vt as MeterCreditPropertiesSchema, W as InvoicePaymentDueEmailSchema, Wn as INVOICE_PAYMENT_STATUSES, Wt as MeterLabelSchema, X as applyEmailSettingsPatch, Xt as MeterUnitsSchema, Y as PriceChangeNoticeMeteredRateSchema, Yn as MetadataSchema, Yt as MeterStandingSchema, Z as billingPageUrl, Zt as MeteredPriceDefSchema, _ as AccountMeterStateSchema, _n as EVENT_TIMESTAMP_MAX_SKEW_MINUTES, _t as isMeterCreditBenefit, a as EVENT_TYPES, an as isMicroPrecise, at as AccountBenefitSchema, b as AccountOpenInvoiceSchema, bn as EventMetadataSchema, bt as CatalogMeterSchema, c as LEGACY_EVENT_TYPES, cn as plainDecimalOf, ct as BenefitDescriptionSchema, d as isEventType, dn as EVENTS_INGEST_MAX_EVENTS, dt as CatalogBenefitSchema, en as meterFilterClauseOf, et as emailTemplateOf, f as ACCOUNT_INCLUDES, fn as EVENT_METADATA_KEY_MAX_LENGTH, ft as FeatureFlagBenefitDefSchema, g as AccountLocaleSchema, gn as EVENT_TIMESTAMP_MAX_AGE_DAYS, gt as isFeatureFlagBenefit, h as AccountDunningStateSchema, hn as EVENT_NAME_MAX_LENGTH, ht as featureValueMatchesType, i as EVENT_DETAIL_SCHEMAS, in as fromMicroUnits, it as uniqueEmails, j as SubscriptionSummarySchema, jn as API_VERSION, jt as METER_FILTER_OPERATORS, k as EntitlementSnapshotSchema, kn as hasControlCharacters, kt as METER_FILTER_MAX_CONDITIONS, l as PING_EVENT_TYPE, ln as toMicroUnits, lt as BenefitSourceSchema, m as AccountDeleteResponseSchema, mn as EVENT_METADATA_STRING_MAX_LENGTH, mt as MeterCreditBenefitDefSchema, n as ApiVersionSchema, nn as MICRO_UNITS_PER_UNIT, nt as isEmailRelevant, o as EventIdSchema, on as microToDecimalString, ot as BENEFIT_TYPES, p as AccessStateSchema, pn as EVENT_METADATA_MAX_PAIRS, pt as FeatureFlagPropertiesSchema, q as NotificationEmailsSchema, qn as InvoiceBillingReasonSchema, qt as MeterPeriodSchema, r as BillingEventSchema, rn as UNIT_DECIMALS, rt as liveSubscriptionOf, s as FULL_STATE_EVENT_TYPES, sn as parseMicroUnits, st as BenefitDefSchema, t as AnyBillingEventSchema, tn as InvalidUnitValueError, tt as emailTemplateSettings, u as PingSchema, un as EVENTS_INGEST_MAX_BYTES, ut as BenefitTypeSchema, v as AccountMetersStateSchema, vn as EventExternalIdSchema, vt as AccountMeterSchema, w as AccountStateSchema, wn as EventsIngestResultSchema, wt as MAX_METERED_PRICE_PER_UNITS, x as AccountProfileStateSchema, xn as EventMetadataValueSchema, xt as CreditGrantInputSchema, y as AccountOpenCheckoutSchema, yn as EventMetadataKeySchema, yt as AccountMetersSchema, z as EmailSenderSchema, zn as EntitlementsSchema, zt as MeterCreditEntryKindSchema } from "./_chunks/events.js";
|
|
2
|
+
import { $ as rolloverOf, $t as CheckoutStatusSchema, A as WebhookEndpointRotateInputSchema, An as TtlMinutesSchema, At as InvoiceWaiveInputSchema, B as PlanSetResponseSchema, Bn as CatalogSchema, Bt as PaymentSchema, C as hostedReadinessOf, Cn as MeteringSettingsSchema, Ct as InvoiceIssueInputSchema, D as WEBHOOK_SECRET_PREFIX, Dn as ReturnOriginSchema, Dt as InvoiceSchema, E as WEBHOOK_ENDPOINT_STATUSES, En as ProductSettingsSchema, Et as InvoicePaymentSessionSchema, F as generateWebhookSecret, Fn as isReturnUrlAllowed, Ft as splitInclusiveTax, G as contributionOf, Gn as MAX_CATALOG_BENEFITS, Gt as PortalSessionCreateInputSchema, H as ResyncResultSchema, Hn as CatalogSyncResultSchema, Ht as SubscriptionChangeInputSchema, I as webhookEndpointUrlProblem, In as meteringSettingsOf, It as CancelSubscriptionInputSchema, J as meterCreditsOf, Jn as MAX_PLAN_BENEFITS, Jt as CheckoutConsentInputSchema, K as matchesFilter, Kn as MAX_CATALOG_METERED_PRICES, Kt as PortalSessionSchema, L as PLAN_SET_MODES, Ln as returnOriginsOf, Lt as GrantCreateInputSchema, M as WebhookEndpointStatusSchema, Mn as applySettingsPatch, Mt as ManualInvoiceInputSchema, N as WebhookLastDeliverySchema, Nn as billingSettingsOf, Nt as ManualInvoiceLineInputSchema, O as WebhookEndpointCreateInputSchema, On as SETTINGS_LOCALES, Ot as InvoiceStatusSchema, P as WebhookSecretSchema, Pn as eventsSettingsOf, Pt as manualInvoiceTotals, Q as rateOverage, Qn as PriceSchema, Qt as CheckoutSessionSchema, R as PlanSetInputSchema, Rn as AccountsRefreshResultSchema, Rt as GrantSchema, S as endpointDiagnosisOf, Sn as MeteringSettingsPatchSchema, St as UncancelSubscriptionResponseSchema, T as EventTypeSchema, Tn as ProductSettingsPatchSchema, Tt as InvoicePaymentSessionCreateInputSchema, U as addUtcMonths, Un as FeatureDefSchema, Ut as SubscriptionSchema, V as PlanSetWarningSchema, Vn as CatalogSyncInputSchema, Vt as StatsSchema, W as consumptionOf, Wn as FeatureTypeSchema, Wt as PORTAL_SESSION_ERRORS, X as overageOf, Xn as PlanDefSchema, Xt as CheckoutSessionCreateInputSchema, Y as overageCapReached, Yn as METERED_PRICE_TAX_MISMATCH, Yt as CheckoutPrefillSchema, Z as periodBoundsOf, Zn as PriceDefSchema, Zt as CheckoutSessionCreatedSchema, _ as DoctorSeveritySchema, _n as EventsSettingsPatchSchema, _t as InvoiceVoidResponseSchema, a as DOCTOR_ROLLUP_LAG_WARN_SECONDS, an as BillingSettingsPatchSchema, at as AccountUpsertResponseSchema, b as buildDoctorReport, bn as METER_CHARGE_MODES, bt as MeResponseSchema, c as DoctorCatalogSchema, cn as BrandingSchema, ct as CheckoutSessionResponseSchema, d as DoctorEventsSchema, dn as DEFAULT_LATE_GRACE_MINUTES, dt as HEADER_ACTOR_REF, en as ConsentSchema, et as standingOf, f as DoctorHostedSchema, fn as DEFAULT_METER_CHARGE_MODE, ft as HEADER_API_VERSION, g as DoctorSettingsSchema, gn as EventRetentionDaysSchema, gt as InvoiceIssueResponseSchema, h as DoctorReportSchema, hn as DEFAULT_PORTAL_TTL_MINUTES, ht as HEADER_SDK, i as DOCTOR_REQUIRED_LEGAL_LINKS, in as checkoutRedirectUrl, it as AccountDetailSchema, j as WebhookEndpointSchema, jn as WebUrlSchema, jt as MANUAL_INVOICE_MAX_AMOUNT_MINOR, k as WebhookEndpointListSchema, kn as SettingsLocaleSchema, kt as InvoiceVoidInputSchema, l as DoctorEmailsSchema, ln as DEFAULT_CHECKOUT_TTL_MINUTES, lt as CreditGrantResponseSchema, m as DoctorProviderSchema, mn as DEFAULT_PAYMENT_DUE_DAYS, mt as HEADER_REQUEST_ID, n as DOCTOR_PROVIDER_ENVIRONMENTS, nn as MAX_CHECKOUT_CONSENT_DOCS, nt as errorCodeSpec, o as DOCTOR_SEVERITIES, on as BillingSettingsSchema, ot as CancelSubscriptionResponseSchema, p as DoctorOverageSchema, pn as DEFAULT_MIN_INVOICE_MINOR, pt as HEADER_IDEMPOTENCY_KEY, q as meterChargeTotals, qn as MAX_CATALOG_METERS, qt as CHECKOUT_ERRORS, r as DOCTOR_REQUIRED_BRANDING, rn as ProviderPayloadSchema, rt as isKnownErrorCode, s as DoctorBillingSchema, sn as BrandingPatchSchema, st as ChangeSubscriptionResponseSchema, t as DOCTOR_PENDING_BACKLOG_MS, tn as INDIVIDUAL_IDENTITY_PLACEHOLDER, tt as ERROR_CODES, u as DoctorEndpointSchema, un as DEFAULT_EVENT_RETENTION_DAYS, ut as GrantCreateResponseSchema, v as DoctorUnsellablePriceSchema, vn as EventsSettingsSchema, vt as InvoiceWaiveResponseSchema, w as DEFAULT_ENDPOINT_EVENT_TYPES, wn as PaymentDueDaysSchema, wt as InvoiceLineSchema, x as emailReadinessOf, xn as MeterChargeModeSchema, xt as STEWARD_CAPABILITIES, y as DoctorWarningSchema, yn as LateGraceMinutesSchema, yt as ManualInvoiceResponseSchema, z as PlanSetModeSchema, zn as CatalogPlanSchema, zt as MAX_GRANT_BENEFITS } from "./_chunks/src.js";
|
|
3
|
+
import { a as LIVE_SUBSCRIPTION_STATUSES, c as isLiveSubscriptionStatus, i as FEATURE_FLAG_BENEFIT_TYPE, l as resolveBenefits, n as isValidTckn, o as OVERRIDE_BENEFIT_SOURCE, r as isValidVkn, s as isGrantActive, t as isE164, u as resolveEntitlements } from "./_chunks/validators.js";
|
|
4
|
+
export { ACCOUNT_INCLUDES, API_VERSION, AccessStateSchema, AccountBenefitSchema, AccountDeleteResponseSchema, AccountDetailSchema, AccountDunningStateSchema, AccountLocaleSchema, AccountMeterSchema, AccountMeterStateSchema, AccountMetersSchema, AccountMetersStateSchema, AccountOpenCheckoutSchema, AccountOpenInvoiceSchema, AccountProfileStateSchema, AccountScheduledChangeSchema, AccountSchema, AccountStateSchema, AccountSubscriptionStateSchema, AccountUpsertInputSchema, AccountUpsertResponseSchema, AccountsRefreshResultSchema, ActorRefSchema, AmountMinorSchema, AnyBillingEventSchema, ApiVersionSchema, BENEFIT_TYPES, BILLING_PATH_PLACEHOLDERS, BenefitDefSchema, BenefitDescriptionSchema, BenefitSourceSchema, BenefitTypeSchema, BillingEventSchema, BillingPathSchema, BillingProfileKindSchema, BillingProfileSchema, BillingSettingsPatchSchema, BillingSettingsSchema, BrandingPatchSchema, BrandingSchema, CHECKOUT_ERRORS, CancelSubscriptionInputSchema, CancelSubscriptionResponseSchema, CatalogBenefitSchema, CatalogMeterSchema, CatalogPlanSchema, CatalogSchema, CatalogSyncInputSchema, CatalogSyncResultSchema, ChangeSubscriptionResponseSchema, CheckoutConsentInputSchema, CheckoutPrefillSchema, CheckoutSessionCreateInputSchema, CheckoutSessionCreatedSchema, CheckoutSessionResponseSchema, CheckoutSessionSchema, CheckoutStatusSchema, CodeSchema, ConsentSchema, CreditGrantInputSchema, CreditGrantResponseSchema, CurrencySchema, DEFAULT_CHECKOUT_TTL_MINUTES, DEFAULT_ENDPOINT_EVENT_TYPES, DEFAULT_EVENT_RETENTION_DAYS, DEFAULT_LATE_GRACE_MINUTES, DEFAULT_METER_CHARGE_MODE, DEFAULT_METER_LOW_AT, DEFAULT_MIN_INVOICE_MINOR, DEFAULT_PAYMENT_DUE_DAYS, DEFAULT_PORTAL_TTL_MINUTES, DOCTOR_PENDING_BACKLOG_MS, DOCTOR_PROVIDER_ENVIRONMENTS, DOCTOR_REQUIRED_BRANDING, DOCTOR_REQUIRED_LEGAL_LINKS, DOCTOR_ROLLUP_LAG_WARN_SECONDS, DOCTOR_SEVERITIES, DateTimeSchema, DecimalUnitsStringSchema, DoctorBillingSchema, DoctorCatalogSchema, DoctorEmailsSchema, DoctorEndpointSchema, DoctorEventsSchema, DoctorHostedSchema, DoctorOverageSchema, DoctorProviderSchema, DoctorReportSchema, DoctorSettingsSchema, DoctorSeveritySchema, DoctorUnsellablePriceSchema, DoctorWarningSchema, EMAIL_LOCALES, EMAIL_PAYLOAD_SCHEMAS, EMAIL_TEMPLATES, EMAIL_TEMPLATE_BY_EVENT, ERROR_CATEGORIES, ERROR_CODES, EVENTS_INGEST_MAX_BYTES, EVENTS_INGEST_MAX_EVENTS, EVENT_DETAIL_SCHEMAS, EVENT_METADATA_KEY_MAX_LENGTH, EVENT_METADATA_MAX_PAIRS, EVENT_METADATA_STRING_MAX_LENGTH, EVENT_NAME_MAX_LENGTH, EVENT_TIMESTAMP_MAX_AGE_DAYS, EVENT_TIMESTAMP_MAX_SKEW_MINUTES, EVENT_TYPES, EmailExtraTextSchema, EmailSenderSchema, EmailSettingsPatchSchema, EmailSettingsSchema, EmailTemplateSchema, EmailTemplateSettingsSchema, EntitlementSnapshotSchema, EntitlementValueSchema, EntitlementsSchema, ErrorCategorySchema, ErrorResponseSchema, EventExternalIdSchema, EventIdSchema, EventMetadataKeySchema, EventMetadataSchema, EventMetadataValueSchema, EventNameSchema, EventRetentionDaysSchema, EventTypeSchema, EventsIngestInputSchema, EventsIngestResultSchema, EventsSettingsPatchSchema, EventsSettingsSchema, ExternalRefSchema, FEATURE_FLAG_BENEFIT_TYPE, FULL_STATE_EVENT_TYPES, FeatureDefSchema, FeatureFlagBenefitDefSchema, FeatureFlagPropertiesSchema, FeatureTypeSchema, GrantCreateInputSchema, GrantCreateResponseSchema, GrantSchema, HEADER_ACTOR_REF, HEADER_API_VERSION, HEADER_IDEMPOTENCY_KEY, HEADER_REQUEST_ID, HEADER_SDK, INDIVIDUAL_IDENTITY_PLACEHOLDER, INGEST_REJECT_CODES, INVOICE_BILLING_REASONS, INVOICE_PAYMENT_STATUSES, IdSchema, IngestEventSchema, IngestRejectCodeSchema, IngestRejectionSchema, IntervalSchema, InvalidUnitValueError, InvoiceBillingReasonSchema, InvoiceIssueInputSchema, InvoiceIssueResponseSchema, InvoiceLineSchema, InvoicePaymentDueEmailSchema, InvoicePaymentSessionCreateInputSchema, InvoicePaymentSessionSchema, InvoicePaymentStatusSchema, InvoiceSchema, InvoiceStatusSchema, InvoiceVoidInputSchema, InvoiceVoidResponseSchema, InvoiceWaiveInputSchema, InvoiceWaiveResponseSchema, LEGACY_EVENT_TYPES, LIVE_SUBSCRIPTION_STATUSES, LateGraceMinutesSchema, MANUAL_INVOICE_MAX_AMOUNT_MINOR, MAX_CATALOG_BENEFITS, MAX_CATALOG_METERED_PRICES, MAX_CATALOG_METERS, MAX_CHECKOUT_CONSENT_DOCS, MAX_GRANT_BENEFITS, MAX_METERED_PRICE_PER_UNITS, MAX_METER_UNITS, MAX_NOTIFICATION_EMAILS, MAX_PLAN_BENEFITS, METERED_PRICE_TAX_MISMATCH, METER_AGGREGATION_KINDS, METER_CHARGE_MODES, METER_CHARGE_STATUSES, METER_CREDIT_ENTRY_KINDS, METER_FILTER_MAX_CONDITIONS, METER_FILTER_MAX_DEPTH, METER_FILTER_OPERATORS, METER_PERIOD_STATUSES, METER_STANDINGS, MICRO_UNITS_PER_UNIT, ManualInvoiceInputSchema, ManualInvoiceLineInputSchema, ManualInvoiceResponseSchema, MeResponseSchema, MetadataSchema, MeterAggregationSchema, MeterChargeLineSchema, MeterChargeListSchema, MeterChargeModeSchema, MeterChargeSchema, MeterChargeStatusSchema, MeterCreditBenefitDefSchema, MeterCreditEntryKindSchema, MeterCreditEntrySchema, MeterCreditPropertiesSchema, MeterDefSchema, MeterFilterSchema, MeterLabelSchema, MeterLowAtSchema, MeterPeriodListSchema, MeterPeriodSchema, MeterPeriodStatusSchema, MeterStandingSchema, MeterUnitsSchema, MeteredPriceDefSchema, MeteredPriceSchema, MeteringSettingsPatchSchema, MeteringSettingsSchema, NoticedMeteredRateSchema, NotificationEmailsSchema, OVERRIDE_BENEFIT_SOURCE, PING_EVENT_TYPE, PLAN_SET_MODES, PORTAL_SESSION_ERRORS, PaymentDueDaysSchema, PaymentSchema, PingSchema, PlanDefSchema, PlanSetInputSchema, PlanSetModeSchema, PlanSetResponseSchema, PlanSetWarningSchema, PortalSessionCreateInputSchema, PortalSessionSchema, PriceChangeNoticeEmailSchema, PriceChangeNoticeMeteredRateSchema, PriceDefSchema, PriceSchema, ProductSettingsPatchSchema, ProductSettingsSchema, ProviderPayloadSchema, ResyncResultSchema, ReturnOriginSchema, SETTINGS_LOCALES, STEWARD_CAPABILITIES, SettingsLocaleSchema, StatsSchema, SubscriptionChangeInputSchema, SubscriptionSchema, SubscriptionStatusSchema, SubscriptionSummarySchema, TtlMinutesSchema, UNIT_DECIMALS, UncancelSubscriptionResponseSchema, WEBHOOK_ENDPOINT_STATUSES, WEBHOOK_SECRET_PREFIX, WebUrlSchema, WebhookEndpointCreateInputSchema, WebhookEndpointListSchema, WebhookEndpointRotateInputSchema, WebhookEndpointSchema, WebhookEndpointStatusSchema, WebhookLastDeliverySchema, WebhookSecretSchema, addUtcMonths, applyEmailSettingsPatch, applySettingsPatch, billingPageUrl, billingSettingsOf, buildDoctorReport, canonicalMeterFilter, checkoutRedirectUrl, consumptionOf, contributionOf, emailLocaleOf, emailReadinessOf, emailRecipients, emailTemplateOf, emailTemplateSettings, endpointDiagnosisOf, errorCodeSpec, eventsSettingsOf, featureValueMatchesType, fromMicroUnits, generateWebhookSecret, hasControlCharacters, hostedReadinessOf, isE164, isEmailRelevant, isEventTimestampInRange, isEventType, isFeatureFlagBenefit, isGrantActive, isKnownErrorCode, isLiveSubscriptionStatus, isMeterCreditBenefit, isMicroPrecise, isReturnUrlAllowed, isValidTckn, isValidVkn, liveSubscriptionOf, manualInvoiceTotals, matchesFilter, meterChargeTotals, meterCreditsOf, meterFilterClauseOf, meteringSettingsOf, microToDecimalString, overageCapReached, overageOf, parseMicroUnits, periodBoundsOf, plainDecimalOf, rateOverage, resolveBenefits, resolveEntitlements, returnOriginsOf, rolloverOf, splitInclusiveTax, standingOf, toMicroUnits, uniqueEmails, webhookEndpointUrlProblem };
|