@stewardhq/sdk 0.6.0 → 0.7.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 +19 -1
- package/dist/_chunks/errors.js +1 -1
- package/dist/_chunks/index.d.ts +344 -11
- package/dist/_chunks/locale.d.ts +40 -1
- package/dist/_chunks/src.js +254 -13
- package/dist/contract.d.ts +2 -2
- package/dist/contract.js +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +65 -4
- package/dist/server.d.ts +1 -1
- package/package.json +2 -2
package/dist/_chunks/src.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $t as MeteredPriceSchema, A as SubscriptionStatusSchema, Bn as EntitlementsSchema, C as AccountSchema, D as BillingProfileKindSchema, Fn as CodeSchema, H as EmailSettingsSchema, Ht as MeterCreditPropertiesSchema, In as CurrencySchema, Jn as InvoiceBillingReasonSchema, Kn as IdSchema, L as EMAIL_TEMPLATES, Ln as DateTimeSchema, Nn as ActorRefSchema, O as BillingProfileSchema, Pn as AmountMinorSchema, Qt as MeteredPriceDefSchema, Un as ExternalRefSchema, Ut as MeterDefSchema, V as EmailSettingsPatchSchema, Vt as MeterCreditEntrySchema, Yn as InvoicePaymentStatusSchema, Z as applyEmailSettingsPatch, a as EVENT_TYPES, bt as AccountMetersSchema, ct as BenefitDefSchema, ft as CatalogBenefitSchema, gt as featureValueMatchesType, ln as plainDecimalOf, o as EventIdSchema, qn as IntervalSchema, rn as MICRO_UNITS_PER_UNIT, tn as meterFilterClauseOf, un as toMicroUnits, w as AccountStateSchema, wt as DecimalUnitsStringSchema, xt as CatalogMeterSchema } from "./events.js";
|
|
1
|
+
import { $t as MeteredPriceSchema, A as SubscriptionStatusSchema, Bn as EntitlementsSchema, C as AccountSchema, D as BillingProfileKindSchema, Et as MAX_METER_UNITS, Fn as CodeSchema, H as EmailSettingsSchema, Ht as MeterCreditPropertiesSchema, In as CurrencySchema, Jn as InvoiceBillingReasonSchema, Kn as IdSchema, L as EMAIL_TEMPLATES, Ln as DateTimeSchema, Nn as ActorRefSchema, O as BillingProfileSchema, Pn as AmountMinorSchema, Qt as MeteredPriceDefSchema, Un as ExternalRefSchema, Ut as MeterDefSchema, V as EmailSettingsPatchSchema, Vt as MeterCreditEntrySchema, X as PriceChangeNoticeMeteredRateSchema, Yn as InvoicePaymentStatusSchema, Z as applyEmailSettingsPatch, a as EVENT_TYPES, bt as AccountMetersSchema, ct as BenefitDefSchema, ft as CatalogBenefitSchema, gt as featureValueMatchesType, ln as plainDecimalOf, o as EventIdSchema, on as isMicroPrecise, qn as IntervalSchema, rn as MICRO_UNITS_PER_UNIT, tn as meterFilterClauseOf, un as toMicroUnits, w as AccountStateSchema, wt as DecimalUnitsStringSchema, xt as CatalogMeterSchema } from "./events.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
//#region ../contract/src/catalog.ts
|
|
4
4
|
const FeatureTypeSchema = z.enum([
|
|
@@ -440,6 +440,12 @@ const BrandingPatchSchema = z.object({
|
|
|
440
440
|
}).strict();
|
|
441
441
|
/** `PATCH /v1/admin/settings` gövdesi. */
|
|
442
442
|
const ProductSettingsPatchSchema = z.object({
|
|
443
|
+
/**
|
|
444
|
+
* The payment provider for NEW checkouts and payment sessions (issue #57 decision 2; an open
|
|
445
|
+
* session keeps the provider it was opened with). Steward refuses a provider this deployment
|
|
446
|
+
* has not configured (422 `provider_not_available`).
|
|
447
|
+
*/
|
|
448
|
+
provider: z.string().regex(/^[a-z][a-z0-9_-]{0,39}$/, "a provider id (lowercase)").optional(),
|
|
443
449
|
appUrl: WebUrlSchema.nullable().optional(),
|
|
444
450
|
defaultCurrency: CurrencySchema.optional(),
|
|
445
451
|
defaultLocale: SettingsLocaleSchema.optional(),
|
|
@@ -733,6 +739,180 @@ const BankTransferRecordedSchema = z.object({
|
|
|
733
739
|
account: AccountStateSchema.optional()
|
|
734
740
|
});
|
|
735
741
|
//#endregion
|
|
742
|
+
//#region ../contract/src/admin.ts
|
|
743
|
+
const API_KEY_SCOPES = [
|
|
744
|
+
"product",
|
|
745
|
+
"admin",
|
|
746
|
+
"checkout"
|
|
747
|
+
];
|
|
748
|
+
const ApiKeyScopeSchema = z.enum(API_KEY_SCOPES);
|
|
749
|
+
/** The public part of a key: the 12 hex characters after `stw_` (in logs, audit rows and `doctor`). */
|
|
750
|
+
const ApiKeyPrefixSchema = z.string().regex(/^[0-9a-f]{12}$/, "12 lowercase hex characters");
|
|
751
|
+
/**
|
|
752
|
+
* `stw_<prefix: 12 hex>_<secret: 43 base64url>`. A low-variety secret (e.g. one character
|
|
753
|
+
* repeated) is refused; `generateApiKeyToken` draws 32 random bytes.
|
|
754
|
+
*/
|
|
755
|
+
const ApiKeyTokenSchema = z.string().regex(/^stw_[0-9a-f]{12}_[A-Za-z0-9_-]{43}$/, "stw_ + 12 hex + _ + 43 base64url characters").refine((token) => new Set(token.slice(17)).size >= 16, "the secret is not random enough");
|
|
756
|
+
/** Longest expiry a key can be given, in days (about ten years). */
|
|
757
|
+
const MAX_API_KEY_TTL_DAYS = 3650;
|
|
758
|
+
const ApiKeyCreateInputSchema = z.object({
|
|
759
|
+
/** Generated by the client (`generateApiKeyToken`); never echoed back. */
|
|
760
|
+
token: ApiKeyTokenSchema,
|
|
761
|
+
name: z.string().trim().min(1).max(100),
|
|
762
|
+
scope: ApiKeyScopeSchema,
|
|
763
|
+
/**
|
|
764
|
+
* Whole days until the key expires. Omitted: the scope's default (admin 90 days, others never).
|
|
765
|
+
* null: never expires, refused for an admin key (issue #57 decision 1).
|
|
766
|
+
*/
|
|
767
|
+
expiresInDays: z.number().int().min(1).max(MAX_API_KEY_TTL_DAYS).nullable().optional()
|
|
768
|
+
}).strict().refine((input) => !(input.scope === "admin" && input.expiresInDays === null), {
|
|
769
|
+
path: ["expiresInDays"],
|
|
770
|
+
message: "an admin key must expire"
|
|
771
|
+
});
|
|
772
|
+
const ApiKeySchema = z.object({
|
|
773
|
+
prefix: ApiKeyPrefixSchema,
|
|
774
|
+
name: z.string(),
|
|
775
|
+
scope: ApiKeyScopeSchema,
|
|
776
|
+
createdAt: DateTimeSchema,
|
|
777
|
+
/** Updated at most once a minute. */
|
|
778
|
+
lastUsedAt: DateTimeSchema.nullable(),
|
|
779
|
+
expiresAt: DateTimeSchema.nullable(),
|
|
780
|
+
revokedAt: DateTimeSchema.nullable()
|
|
781
|
+
});
|
|
782
|
+
/** `GET /v1/admin/api-keys`: the product's keys, revoked and expired ones included, oldest first. */
|
|
783
|
+
const ApiKeyListSchema = z.object({ items: z.array(ApiKeySchema) });
|
|
784
|
+
/** A new API key token (`stw_…`), Web Crypto; Node ≥22, edge and workerd. Store it once, send it once. */
|
|
785
|
+
function generateApiKeyToken() {
|
|
786
|
+
const random = (n) => globalThis.crypto.getRandomValues(new Uint8Array(n));
|
|
787
|
+
return `stw_${[...random(6)].map((b) => b.toString(16).padStart(2, "0")).join("")}_${btoa(String.fromCharCode(...random(32))).replaceAll("+", "-").replaceAll("/", "_").replace(/=+$/, "")}`;
|
|
788
|
+
}
|
|
789
|
+
const DUNNING_ACTIONS = [
|
|
790
|
+
"retry_payment",
|
|
791
|
+
"suspend",
|
|
792
|
+
"terminate"
|
|
793
|
+
];
|
|
794
|
+
/**
|
|
795
|
+
* `products.dunning_policy`: steps by days after the first failed payment; `dryRun` only audits.
|
|
796
|
+
* Not strict: stored policies are read through it too (an unknown field must not turn a stored
|
|
797
|
+
* policy into the default).
|
|
798
|
+
*/
|
|
799
|
+
const DunningPolicySchema = z.object({
|
|
800
|
+
steps: z.array(z.object({
|
|
801
|
+
afterDays: z.number().min(0).max(365),
|
|
802
|
+
action: z.enum(DUNNING_ACTIONS)
|
|
803
|
+
})).refine((steps) => steps.every((s, i) => i === 0 || s.afterDays >= steps[i - 1].afterDays), "steps must be in order of days"),
|
|
804
|
+
dryRun: z.boolean().default(true)
|
|
805
|
+
});
|
|
806
|
+
/** `POST /v1/admin/events/:id/redeliver`: every delivery of the event requeued, attempts reset. */
|
|
807
|
+
const RedeliveredEventSchema = z.object({
|
|
808
|
+
eventId: EventIdSchema,
|
|
809
|
+
type: z.string(),
|
|
810
|
+
deliveries: z.array(z.object({
|
|
811
|
+
endpointId: IdSchema,
|
|
812
|
+
status: z.enum([
|
|
813
|
+
"pending",
|
|
814
|
+
"delivered",
|
|
815
|
+
"dead"
|
|
816
|
+
]),
|
|
817
|
+
attempts: z.number().int().nonnegative(),
|
|
818
|
+
nextAttemptAt: DateTimeSchema
|
|
819
|
+
}))
|
|
820
|
+
});
|
|
821
|
+
const MAX_NOTICE_DAYS = 3650;
|
|
822
|
+
const RepriceInputSchema = z.object({
|
|
823
|
+
planCode: CodeSchema,
|
|
824
|
+
/** The move takes effect from the first period boundary at least this many days away. */
|
|
825
|
+
noticeDays: z.number().int().min(0).max(MAX_NOTICE_DAYS),
|
|
826
|
+
/** true: the same list, nothing written and no e-mail. Required so a real run is never implicit. */
|
|
827
|
+
dryRun: z.boolean()
|
|
828
|
+
}).strict();
|
|
829
|
+
const RepriceItemSchema = z.object({
|
|
830
|
+
subscriptionId: IdSchema,
|
|
831
|
+
accountRef: ExternalRefSchema,
|
|
832
|
+
interval: IntervalSchema,
|
|
833
|
+
currency: CurrencySchema,
|
|
834
|
+
oldAmountMinor: z.number().int(),
|
|
835
|
+
newAmountMinor: z.number().int(),
|
|
836
|
+
taxInclusive: z.boolean(),
|
|
837
|
+
/** The boundary the current amount applies from; null for a skipped subscription. */
|
|
838
|
+
effectiveAt: DateTimeSchema.nullable(),
|
|
839
|
+
action: z.enum([
|
|
840
|
+
"schedule",
|
|
841
|
+
"already_scheduled",
|
|
842
|
+
"skip"
|
|
843
|
+
]),
|
|
844
|
+
reason: z.enum([
|
|
845
|
+
"cancel_scheduled",
|
|
846
|
+
"change_scheduled",
|
|
847
|
+
"legacy_provider",
|
|
848
|
+
"no_period"
|
|
849
|
+
]).optional(),
|
|
850
|
+
/** The metered rates that change (locked → current); absent when none does. */
|
|
851
|
+
meteredRates: z.array(PriceChangeNoticeMeteredRateSchema).optional()
|
|
852
|
+
});
|
|
853
|
+
const RepriceResultSchema = z.object({
|
|
854
|
+
dryRun: z.boolean(),
|
|
855
|
+
/** The earliest boundary a move can take effect at (now + notice days). */
|
|
856
|
+
effectiveNotBefore: DateTimeSchema,
|
|
857
|
+
/** Subscriptions scheduled by this run (one notice e-mail each); 0 on a dry run. */
|
|
858
|
+
scheduled: z.number().int().nonnegative(),
|
|
859
|
+
items: z.array(RepriceItemSchema)
|
|
860
|
+
});
|
|
861
|
+
/** `POST /v1/admin/accounts/:ref/meters/recompute`: every meter, or one. */
|
|
862
|
+
const MeterRecomputeInputSchema = z.object({ meter: CodeSchema.optional() }).strict();
|
|
863
|
+
const MeterRecomputeResultSchema = z.object({ items: z.array(z.object({
|
|
864
|
+
meter: CodeSchema,
|
|
865
|
+
/** The open period rebuilt; null when the account has no open period of the meter. */
|
|
866
|
+
periodStart: DateTimeSchema.nullable(),
|
|
867
|
+
periodEnd: DateTimeSchema.nullable(),
|
|
868
|
+
/** Consumption before and after (decimal strings). */
|
|
869
|
+
before: z.string().nullable(),
|
|
870
|
+
after: z.string().nullable()
|
|
871
|
+
})) });
|
|
872
|
+
/** `POST /v1/admin/accounts/:ref/meters/close-periods`: `force` does not wait for unrolled events. */
|
|
873
|
+
const MeterClosePeriodsInputSchema = z.object({
|
|
874
|
+
meter: CodeSchema.optional(),
|
|
875
|
+
force: z.boolean().optional()
|
|
876
|
+
}).strict();
|
|
877
|
+
const MeterClosePeriodsResultSchema = z.object({
|
|
878
|
+
closed: z.number().int().nonnegative(),
|
|
879
|
+
/** `meter.period_closed` events written. */
|
|
880
|
+
events: z.number().int().nonnegative(),
|
|
881
|
+
/** Closing periods left (not ended yet, or waiting for the rollup). */
|
|
882
|
+
pending: z.number().int().nonnegative()
|
|
883
|
+
});
|
|
884
|
+
/**
|
|
885
|
+
* `POST /v1/admin/accounts/:ref/credits`: positive units = `manual_grant` (as the product route),
|
|
886
|
+
* negative = `adjustment` (a correction; admin only, issue #57 decision 3). Response:
|
|
887
|
+
* `CreditGrantResponseSchema`.
|
|
888
|
+
*/
|
|
889
|
+
const CreditAdjustmentInputSchema = z.object({
|
|
890
|
+
meter: CodeSchema,
|
|
891
|
+
units: z.number().min(-MAX_METER_UNITS).max(MAX_METER_UNITS).refine((value) => value !== 0, "must not be zero").refine((value) => isMicroPrecise(value), "at most 6 decimal places"),
|
|
892
|
+
reason: z.string().trim().min(3).max(500)
|
|
893
|
+
}).strict();
|
|
894
|
+
const BANK_TRANSFER_LIST_STATUSES = ["pending", "expired"];
|
|
895
|
+
const BankTransferListStatusSchema = z.enum(BANK_TRANSFER_LIST_STATUSES);
|
|
896
|
+
const BankTransferListItemSchema = z.object({
|
|
897
|
+
kind: z.enum(["checkout", "invoice"]),
|
|
898
|
+
id: IdSchema,
|
|
899
|
+
/** The session status, or the invoice's payment status. */
|
|
900
|
+
status: z.string(),
|
|
901
|
+
/** The checkout's plan, or the invoice's subscription plan (null: none). */
|
|
902
|
+
planCode: z.string().nullable(),
|
|
903
|
+
totalMinor: z.number().int(),
|
|
904
|
+
currency: CurrencySchema,
|
|
905
|
+
/** The session's expiry, or the invoice's due date (null: none). */
|
|
906
|
+
deadline: DateTimeSchema.nullable(),
|
|
907
|
+
/** The account's order code (in the transfer description). */
|
|
908
|
+
code: z.string().nullable(),
|
|
909
|
+
accountRef: ExternalRefSchema,
|
|
910
|
+
/** When bank transfer was chosen (checkouts); null for invoices. */
|
|
911
|
+
selectedAt: DateTimeSchema.nullable()
|
|
912
|
+
});
|
|
913
|
+
/** `GET /v1/admin/bank-transfers`: `pending` by deadline; `expired`: expired in the last 30 days. */
|
|
914
|
+
const BankTransferListSchema = z.object({ items: z.array(BankTransferListItemSchema) });
|
|
915
|
+
//#endregion
|
|
736
916
|
//#region ../contract/src/portal.ts
|
|
737
917
|
const PortalSessionCreateInputSchema = z.object({
|
|
738
918
|
/** Sayfa dili; verilmezse ürün ayarı `defaultLocale`. */
|
|
@@ -1124,6 +1304,11 @@ const ERROR_CODES = Object.freeze({
|
|
|
1124
1304
|
actor_ref_required: spec(400, "validation"),
|
|
1125
1305
|
idempotency_key_required: spec(400, "validation"),
|
|
1126
1306
|
invalid_idempotency_key: spec(400, "validation"),
|
|
1307
|
+
/**
|
|
1308
|
+
* The request body is over the route's limit (`/v1`: 64 KiB; catalog sync 1 MiB; invoice issue
|
|
1309
|
+
* 10 MiB). Event ingest keeps its own code (`batch_too_large`).
|
|
1310
|
+
*/
|
|
1311
|
+
payload_too_large: spec(413, "validation"),
|
|
1127
1312
|
/** Anahtar yok / iptal / yanlış — neden ayrıştırılmaz. */
|
|
1128
1313
|
unauthorized: spec(401, "config"),
|
|
1129
1314
|
/** Admin kapsamı gereken uç. */
|
|
@@ -1142,6 +1327,22 @@ const ERROR_CODES = Object.freeze({
|
|
|
1142
1327
|
checkout_session_not_found: spec(404, "not_found"),
|
|
1143
1328
|
/** Yönetim ucu: endpoint yok ya da başka ürünün. */
|
|
1144
1329
|
webhook_endpoint_not_found: spec(404, "not_found"),
|
|
1330
|
+
/** Admin endpoint (issue #57): no API key of the product has this prefix. */
|
|
1331
|
+
api_key_not_found: spec(404, "not_found"),
|
|
1332
|
+
/** Admin endpoint (issue #57): no event of the product has this id. */
|
|
1333
|
+
event_not_found: spec(404, "not_found"),
|
|
1334
|
+
/**
|
|
1335
|
+
* `POST /v1/admin/webhook-endpoints`: the URL fails the SSRF policy (through the Ingress only public
|
|
1336
|
+
* `https://` names resolving to public addresses; cluster addresses only from inside the cluster).
|
|
1337
|
+
* The message says which rule.
|
|
1338
|
+
*/
|
|
1339
|
+
webhook_url_not_allowed: spec(422, "validation"),
|
|
1340
|
+
/** `POST /v1/admin/api-keys`: a key with this prefix already exists (generate a new token). */
|
|
1341
|
+
api_key_exists: spec(409, "conflict"),
|
|
1342
|
+
/** `POST /v1/admin/api-keys/:prefix/revoke`: a key cannot revoke itself (revoke it with another admin key). */
|
|
1343
|
+
api_key_self_revoke: spec(409, "conflict"),
|
|
1344
|
+
/** `PATCH /v1/admin/settings`: the `provider` is not configured in this deployment. */
|
|
1345
|
+
provider_not_available: spec(422, "validation"),
|
|
1145
1346
|
/** Ürün için henüz katalog senkronlanmadı (404 ama kurulum eksiği). */
|
|
1146
1347
|
catalog_not_configured: spec(404, "config"),
|
|
1147
1348
|
plan_missing_feature: spec(422, "validation"),
|
|
@@ -1232,9 +1433,9 @@ const ERROR_CODES = Object.freeze({
|
|
|
1232
1433
|
/** `/health`: veritabanına ulaşılamıyor. */
|
|
1233
1434
|
database_unavailable: spec(503, "unavailable", true),
|
|
1234
1435
|
/**
|
|
1235
|
-
*
|
|
1236
|
-
*
|
|
1237
|
-
*
|
|
1436
|
+
* Always with `Retry-After` (seconds). `/v1`: the key's budget for the route is spent, or the client
|
|
1437
|
+
* IP is blocked after too many rejected keys (`service/src/http/rate-limit.ts`, issue #43). Hosted
|
|
1438
|
+
* pages: wrong page key / action limit (`hosted/routes.ts`, `hosted/portal-routes.ts`).
|
|
1238
1439
|
*/
|
|
1239
1440
|
rate_limited: spec(429, "unavailable", true),
|
|
1240
1441
|
unknown_provider: spec(404, "not_found"),
|
|
@@ -1614,25 +1815,26 @@ const LOOPBACK_HOSTS = /* @__PURE__ */ new Set([
|
|
|
1614
1815
|
]);
|
|
1615
1816
|
const CLUSTER_SUFFIX = ".svc.cluster.local";
|
|
1616
1817
|
/**
|
|
1617
|
-
*
|
|
1618
|
-
*
|
|
1619
|
-
*
|
|
1818
|
+
* Address SYNTAX policy; null when acceptable, otherwise the reason. `allowLoopback` is false in
|
|
1819
|
+
* production. Separate from the schema: only the service knows whether it runs in production. The
|
|
1820
|
+
* service adds the SSRF rules on top (who may register a cluster address, public names only, DNS
|
|
1821
|
+
* resolving to public addresses; `service/src/domain/webhook-url-policy.ts`).
|
|
1620
1822
|
*/
|
|
1621
1823
|
function webhookEndpointUrlProblem(value, options) {
|
|
1622
1824
|
let url;
|
|
1623
1825
|
try {
|
|
1624
1826
|
url = new URL(value);
|
|
1625
1827
|
} catch {
|
|
1626
|
-
return "
|
|
1828
|
+
return "not a valid url";
|
|
1627
1829
|
}
|
|
1628
|
-
if (url.username !== "" || url.password !== "") return "
|
|
1830
|
+
if (url.username !== "" || url.password !== "") return "url must not contain credentials";
|
|
1629
1831
|
if (url.protocol === "https:") return null;
|
|
1630
1832
|
const host = url.hostname.toLowerCase();
|
|
1631
1833
|
if (url.protocol === "http:") {
|
|
1632
1834
|
if (host.endsWith(CLUSTER_SUFFIX) && host.length > 18) return null;
|
|
1633
1835
|
if (options.allowLoopback && LOOPBACK_HOSTS.has(host)) return null;
|
|
1634
1836
|
}
|
|
1635
|
-
return options.allowLoopback ? "https://, cluster
|
|
1837
|
+
return options.allowLoopback ? "must be https://, cluster-internal http://*.svc.cluster.local or http://localhost" : "must be https:// or cluster-internal http://*.svc.cluster.local";
|
|
1636
1838
|
}
|
|
1637
1839
|
const EndpointUrlSchema = z.url({ protocol: /^https?$/ }).max(2e3).refine((value) => !hasSecretMarker(value), "adres sır içeremez");
|
|
1638
1840
|
const DescriptionSchema = z.string().trim().min(1).max(200).refine((value) => !hasSecretMarker(value), "açıklama sır içeremez");
|
|
@@ -1658,7 +1860,10 @@ const WebhookLastDeliverySchema = z.object({
|
|
|
1658
1860
|
"dead"
|
|
1659
1861
|
]),
|
|
1660
1862
|
httpStatus: z.number().int().nullable(),
|
|
1661
|
-
/**
|
|
1863
|
+
/**
|
|
1864
|
+
* `http_<kod>`, `timeout`, `network_error`, `endpoint_inactive`, `url_not_allowed` (the URL or the
|
|
1865
|
+
* address it resolves to fails the SSRF policy at send time); başarıda null.
|
|
1866
|
+
*/
|
|
1662
1867
|
error: z.string().nullable(),
|
|
1663
1868
|
attempts: z.number().int().nonnegative(),
|
|
1664
1869
|
at: DateTimeSchema
|
|
@@ -1671,6 +1876,11 @@ const WebhookEndpointSchema = z.object({
|
|
|
1671
1876
|
/** null: filtre yok, yalnızca 0.1'in 15 eski tipi (`LEGACY_EVENT_TYPES`). */
|
|
1672
1877
|
eventTypes: z.array(EventTypeSchema).nullable(),
|
|
1673
1878
|
description: z.string().nullable(),
|
|
1879
|
+
/**
|
|
1880
|
+
* A cluster address registered from inside the cluster (`*.svc.cluster.local`); every other
|
|
1881
|
+
* endpoint must be public `https://`. Absent from stewards before issue #43.
|
|
1882
|
+
*/
|
|
1883
|
+
internal: z.boolean().optional(),
|
|
1674
1884
|
createdAt: DateTimeSchema,
|
|
1675
1885
|
rotatedAt: DateTimeSchema.nullable(),
|
|
1676
1886
|
lastDelivery: WebhookLastDeliverySchema.nullable()
|
|
@@ -1852,6 +2062,23 @@ const DoctorEmailsSchema = z.object({
|
|
|
1852
2062
|
/** Emails are sent: transport and sender configured, at least one template on. */
|
|
1853
2063
|
ready: z.boolean()
|
|
1854
2064
|
});
|
|
2065
|
+
/** An active `api_keys` row (not revoked, not expired); issue #43. Never the secret. */
|
|
2066
|
+
const DoctorApiKeySchema = z.object({
|
|
2067
|
+
name: z.string(),
|
|
2068
|
+
/** Public prefix (`stw_<prefix>_…`): what `revoke-api-key` takes. */
|
|
2069
|
+
prefix: z.string(),
|
|
2070
|
+
/** `product` | `admin` | `checkout`; open set. */
|
|
2071
|
+
scope: z.string(),
|
|
2072
|
+
createdAt: DateTimeSchema,
|
|
2073
|
+
/** Updated at most once a minute. */
|
|
2074
|
+
lastUsedAt: DateTimeSchema.nullable(),
|
|
2075
|
+
/** null: never expires. */
|
|
2076
|
+
expiresAt: DateTimeSchema.nullable(),
|
|
2077
|
+
/** Whole days since creation. */
|
|
2078
|
+
ageDays: z.number().int().nonnegative()
|
|
2079
|
+
});
|
|
2080
|
+
/** A key expiring within this many days is a warning. */
|
|
2081
|
+
const DOCTOR_KEY_EXPIRY_WARN_DAYS = 14;
|
|
1855
2082
|
const DoctorReportSchema = z.object({
|
|
1856
2083
|
/** `error` önemde uyarı yok. */
|
|
1857
2084
|
ok: z.boolean(),
|
|
@@ -1877,6 +2104,8 @@ dryRun: z.boolean() }),
|
|
|
1877
2104
|
events: DoctorEventsSchema.optional(),
|
|
1878
2105
|
/** Metering MF5; absent without metered prices and from older steward. */
|
|
1879
2106
|
overage: DoctorOverageSchema.optional(),
|
|
2107
|
+
/** The product's active API keys, oldest first; absent from steward versions before issue #43. */
|
|
2108
|
+
apiKeys: z.array(DoctorApiKeySchema).optional(),
|
|
1880
2109
|
warnings: z.array(DoctorWarningSchema)
|
|
1881
2110
|
});
|
|
1882
2111
|
/** Email readiness from settings and the deployment's transport (pure). */
|
|
@@ -1958,7 +2187,9 @@ function buildDoctorReport(facts) {
|
|
|
1958
2187
|
if (drift > 0) warn("info", "price_drift", `${drift} live subscription(s) keep a locked amount that differs from the current price; moving them to the current price is an explicit operation`);
|
|
1959
2188
|
const legacy = facts.billing?.legacyProviderSubscriptions ?? 0;
|
|
1960
2189
|
if (legacy > 0) warn("error", "legacy_provider_subscription", `${legacy} live subscription(s) still have a provider subscription: steward never invoices them and the provider may still charge them; cancel each in the provider panel, then immediately in steward`);
|
|
1961
|
-
|
|
2190
|
+
const transferCurrencies = facts.bankTransfer?.currencies ?? [];
|
|
2191
|
+
if (!provider.configured && transferCurrencies.length > 0) warn("warning", "card_payments_unavailable", `payment provider ${provider.id} is not configured in this deployment: card payments are off, checkout offers bank transfer only (${transferCurrencies.join(", ")})`);
|
|
2192
|
+
else if (!provider.configured) warn("error", "provider_not_configured", `ödeme sağlayıcısı ${provider.id} bu deployment'ta yapılandırılmamış`);
|
|
1962
2193
|
else if (provider.healthy === false) warn("warning", "provider_unhealthy", `ödeme sağlayıcısı ${provider.id} art arda erişilemedi (yanıtı veren pod'un gözlemi)`);
|
|
1963
2194
|
const returnOrigins = returnOriginsOf(settings);
|
|
1964
2195
|
if (returnOrigins.length === 0) warn("error", "no_return_origin", "checkout dönüşüne izinli origin yok: `appUrl` ayarlanmalı (her checkout return_url_not_allowed alır)");
|
|
@@ -2000,6 +2231,15 @@ function buildDoctorReport(facts) {
|
|
|
2000
2231
|
else if (overage.chargeMode === "dry_run") warn("info", "overage_dry_run", "metering.chargeMode is dry_run: overage is priced into meter charges (GET /v1/accounts/:ref/meter-charges) but not invoiced; switch to live after one full cycle");
|
|
2001
2232
|
}
|
|
2002
2233
|
if (overage && overage.unratedSubscriptions > 0) warn("info", "overage_unrated_subscriptions", `${overage.unratedSubscriptions} live subscription(s) have no locked rate for a metered price of their plan (added after they started, M20): their overage is not billed until they move to the current terms`);
|
|
2234
|
+
const DAY_MS = 864e5;
|
|
2235
|
+
const apiKeys = facts.apiKeys?.map((key) => ({
|
|
2236
|
+
...key,
|
|
2237
|
+
ageDays: Math.max(0, Math.floor((facts.checkedAt.getTime() - Date.parse(key.createdAt)) / DAY_MS))
|
|
2238
|
+
}));
|
|
2239
|
+
for (const key of apiKeys ?? []) if (key.expiresAt !== null) {
|
|
2240
|
+
const daysLeft = (Date.parse(key.expiresAt) - facts.checkedAt.getTime()) / DAY_MS;
|
|
2241
|
+
if (daysLeft <= 14) warn("warning", "api_key_expiring", `${key.scope} key "${key.name}" (${key.prefix}) expires in ${Math.max(0, Math.ceil(daysLeft))} day(s): create a new key and revoke this one`);
|
|
2242
|
+
} else if (key.scope === "admin") warn("info", "admin_key_without_expiry", `admin key "${key.name}" (${key.prefix}) never expires: replace it with a key created with an expiry`);
|
|
2003
2243
|
return {
|
|
2004
2244
|
ok: !warnings.some((w) => w.severity === "error"),
|
|
2005
2245
|
checkedAt: facts.checkedAt.toISOString(),
|
|
@@ -2017,8 +2257,9 @@ function buildDoctorReport(facts) {
|
|
|
2017
2257
|
...facts.billing ? { billing: facts.billing } : {},
|
|
2018
2258
|
...facts.events ? { events: facts.events } : {},
|
|
2019
2259
|
...overage ? { overage } : {},
|
|
2260
|
+
...apiKeys ? { apiKeys } : {},
|
|
2020
2261
|
warnings
|
|
2021
2262
|
};
|
|
2022
2263
|
}
|
|
2023
2264
|
//#endregion
|
|
2024
|
-
export {
|
|
2265
|
+
export { periodBoundsOf as $, EventsSettingsSchema as $n, ApiKeySchema as $t, WebhookEndpointCreateInputSchema as A, INDIVIDUAL_IDENTITY_PLACEHOLDER as An, METERED_PRICE_TAX_MISMATCH as Ar, InvoiceStatusSchema as At, PlanSetInputSchema as B, BillingSettingsSchema as Bn, GrantSchema as Bt, emailReadinessOf as C, CheckoutConsentInputSchema as Cn, CatalogSyncResultSchema as Cr, STEWARD_CAPABILITIES as Ct, EventTypeSchema as D, CheckoutSessionSchema as Dn, MAX_CATALOG_METERED_PRICES as Dr, InvoicePaymentSessionCreateInputSchema as Dt, DEFAULT_ENDPOINT_EVENT_TYPES as E, CheckoutSessionCreatedSchema as En, MAX_CATALOG_BENEFITS as Er, InvoiceLineSchema as Et, WebhookLastDeliverySchema as F, checkoutRedirectUrl as Fn, ManualInvoiceLineInputSchema as Ft, addUtcMonths as G, DEFAULT_EVENT_RETENTION_DAYS as Gn, SubscriptionSchema as Gt, PlanSetResponseSchema as H, BrandingSchema as Hn, PaymentSchema as Ht, WebhookSecretSchema as I, BankTransferPaymentDaysSchema as In, manualInvoiceTotals as It, matchesFilter as J, DEFAULT_MIN_INVOICE_MINOR as Jn, PortalSessionSchema as Jt, consumptionOf as K, DEFAULT_LATE_GRACE_MINUTES as Kn, PORTAL_SESSION_ERRORS as Kt, generateWebhookSecret as L, BankTransferSettingsPatchSchema as Ln, splitInclusiveTax as Lt, WebhookEndpointRotateInputSchema as M, PAYMENT_METHODS as Mn, PriceDefSchema as Mr, InvoiceWaiveInputSchema as Mt, WebhookEndpointSchema as N, PaymentMethodSchema as Nn, PriceSchema as Nr, MANUAL_INVOICE_MAX_AMOUNT_MINOR as Nt, WEBHOOK_ENDPOINT_STATUSES as O, CheckoutStatusSchema as On, MAX_CATALOG_METERS as Or, InvoicePaymentSessionSchema as Ot, WebhookEndpointStatusSchema as P, ProviderPayloadSchema as Pn, ManualInvoiceInputSchema as Pt, overageOf as Q, EventsSettingsPatchSchema as Qn, ApiKeyPrefixSchema as Qt, webhookEndpointUrlProblem as R, BankTransferSettingsSchema as Rn, CancelSubscriptionInputSchema as Rt, buildDoctorReport as S, CHECKOUT_ERRORS as Sn, CatalogSyncInputSchema as Sr, MeResponseSchema as St, hostedReadinessOf as T, CheckoutSessionCreateInputSchema as Tn, FeatureTypeSchema as Tr, InvoiceIssueInputSchema as Tt, PlanSetWarningSchema as U, DEFAULT_BANK_TRANSFER_PAYMENT_DAYS as Un, StatsSchema as Ut, PlanSetModeSchema as V, BrandingPatchSchema as Vn, MAX_GRANT_BENEFITS as Vt, ResyncResultSchema as W, DEFAULT_CHECKOUT_TTL_MINUTES as Wn, SubscriptionChangeInputSchema as Wt, meterCreditsOf as X, DEFAULT_PORTAL_TTL_MINUTES as Xn, ApiKeyCreateInputSchema as Xt, meterChargeTotals as Y, DEFAULT_PAYMENT_DUE_DAYS as Yn, API_KEY_SCOPES as Yt, overageCapReached as Z, EventRetentionDaysSchema as Zn, ApiKeyListSchema as Zt, DoctorReportSchema as _, RepriceItemSchema as _n, meteringSettingsOf as _r, HEADER_SDK as _t, DOCTOR_REQUIRED_LEGAL_LINKS as a, BankTransferListStatusSchema as an, PaymentDueDaysSchema as ar, isKnownErrorCode as at, DoctorUnsellablePriceSchema as b, BankTransferRecordInputSchema as bn, CatalogPlanSchema as br, InvoiceWaiveResponseSchema as bt, DoctorApiKeySchema as c, DunningPolicySchema as cn, ReturnOriginSchema as cr, CancelSubscriptionResponseSchema as ct, DoctorEmailsSchema as d, MeterClosePeriodsInputSchema as dn, TtlMinutesSchema as dr, CreditGrantResponseSchema as dt, ApiKeyScopeSchema as en, LateGraceMinutesSchema as er, rateOverage as et, DoctorEndpointSchema as f, MeterClosePeriodsResultSchema as fn, WebUrlSchema as fr, GrantCreateResponseSchema as ft, DoctorProviderSchema as g, RepriceInputSchema as gn, isReturnUrlAllowed as gr, HEADER_REQUEST_ID as gt, DoctorOverageSchema as h, RedeliveredEventSchema as hn, eventsSettingsOf as hr, HEADER_IDEMPOTENCY_KEY as ht, DOCTOR_REQUIRED_BRANDING as i, BankTransferListSchema as in, MeteringSettingsSchema as ir, errorCodeSpec as it, WebhookEndpointListSchema as j, MAX_CHECKOUT_CONSENT_DOCS as jn, PlanDefSchema as jr, InvoiceVoidInputSchema as jt, WEBHOOK_SECRET_PREFIX as k, ConsentSchema as kn, MAX_PLAN_BENEFITS as kr, InvoiceSchema as kt, DoctorBillingSchema as l, MAX_API_KEY_TTL_DAYS as ln, SETTINGS_LOCALES as lr, ChangeSubscriptionResponseSchema as lt, DoctorHostedSchema as m, MeterRecomputeResultSchema as mn, billingSettingsOf as mr, HEADER_API_VERSION as mt, DOCTOR_PENDING_BACKLOG_MS as n, BANK_TRANSFER_LIST_STATUSES as nn, MeterChargeModeSchema as nr, standingOf as nt, DOCTOR_ROLLUP_LAG_WARN_SECONDS as o, CreditAdjustmentInputSchema as on, ProductSettingsPatchSchema as or, AccountDetailSchema as ot, DoctorEventsSchema as p, MeterRecomputeInputSchema as pn, applySettingsPatch as pr, HEADER_ACTOR_REF as pt, contributionOf as q, DEFAULT_METER_CHARGE_MODE as qn, PortalSessionCreateInputSchema as qt, DOCTOR_PROVIDER_ENVIRONMENTS as r, BankTransferListItemSchema as rn, MeteringSettingsPatchSchema as rr, ERROR_CODES as rt, DOCTOR_SEVERITIES as s, DUNNING_ACTIONS as sn, ProductSettingsSchema as sr, AccountUpsertResponseSchema as st, DOCTOR_KEY_EXPIRY_WARN_DAYS as t, ApiKeyTokenSchema as tn, METER_CHARGE_MODES as tr, rolloverOf as tt, DoctorCatalogSchema as u, MAX_NOTICE_DAYS as un, SettingsLocaleSchema as ur, CheckoutSessionResponseSchema as ut, DoctorSettingsSchema as v, RepriceResultSchema as vn, returnOriginsOf as vr, InvoiceIssueResponseSchema as vt, endpointDiagnosisOf as w, CheckoutPrefillSchema as wn, FeatureDefSchema as wr, UncancelSubscriptionResponseSchema as wt, DoctorWarningSchema as x, BankTransferRecordedSchema as xn, CatalogSchema as xr, ManualInvoiceResponseSchema as xt, DoctorSeveritySchema as y, generateApiKeyToken as yn, AccountsRefreshResultSchema as yr, InvoiceVoidResponseSchema as yt, PLAN_SET_MODES as z, BillingSettingsPatchSchema as zn, GrantCreateInputSchema as zt };
|
package/dist/contract.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as WebhookEndpointStatus, $a as Consent, $i as InvoiceStatusSchema, $n as MeterCreditsOptions, $o as MeterCreditBenefitDefSchema, $r as ResolvedBenefits, $s as MeterLowAtSchema, $t as BankTransferInstructionsEmail, A as DoctorSeveritySchema, Aa as PortalSessionError, Ac as ErrorResponseSchema, Ai as InvoiceIssueResponseSchema, An as emailLocaleOf, Ao as PriceDef, Ar as EventsIngestInput, As as MeterChargeListSchema, At as MeterChargeMode, B as hostedReadinessOf, Ba as CheckoutPrefill, Bc as InvoicePaymentStatusSchema, Bi as StewardCapability, Bn as PlanSetMode, Bo as BenefitFeatureType, Br as IngestRejectionSchema, Bs as MeterDef, Bt as ReturnOriginSchema, C as DoctorProvider, Ca as SubscriptionChangeInput, Cc as EntitlementValue, Ci as GrantCreateResponseSchema, Cn as NotificationEmailsSchema, Co as MAX_CATALOG_METERED_PRICES, Cr as EventExternalIdSchema, Cs as MeterAggregation, Ct as DEFAULT_PORTAL_TTL_MINUTES, D as DoctorSettings, Da as PortalSession, Dc as ErrorCategory, Di as HEADER_REQUEST_ID, Dn as PriceChangeNoticeMeteredRateSchema, Do as PlanDef, Dr as EventMetadataValue, Ds as MeterChargeLine, Dt as EventsSettingsSchema, E as DoctorReportSchema, Ea as PORTAL_SESSION_ERRORS, Ec as EntitlementsSchema, Ei as HEADER_IDEMPOTENCY_KEY, En as PriceChangeNoticeMeteredRate, Eo as METERED_PRICE_TAX_MISMATCH, Er as EventMetadataSchema, Es as MeterCharge, Et as EventsSettingsPatchSchema, F as DoctorWarningCode, Fa as BankTransferRecordedSchema, Fc as Interval, Fi as ManualInvoiceResponse, Fn as liveSubscriptionOf, Fo as BENEFIT_TYPES, Fr as IngestEvent, Fs as MeterCreditEntryKind, Ft as PaymentDueDaysSchema, G as WebhookEndpoint, Ga as CheckoutSessionCreateInput, Gi as InvoiceIssueInputSchema, Gn as PlanSetWarningCode, Go as CatalogBenefitSchema, Gr as EntitlementRulesCatalog, Gs as MeterFilterCondition, Gt as WebUrlSchema, H as EventTypeSchema, Ha as CheckoutRedirectTarget, Hi as UncancelSubscriptionResponseSchema, Hn as PlanSetResponse, Ho as BenefitType, Hr as isEventTimestampInRange, Hs as MeterDefSchema, Ht as SettingsLocale, I as DoctorWarningSchema, Ia as CHECKOUT_ERRORS, Ic as IntervalSchema, Ii as ManualInvoiceResponseSchema, In as uniqueEmails, Io as BenefitDef, Ir as IngestEventSchema, Is as MeterCreditEntryKindSchema, It as ProductSettings, J as WebhookEndpointList, Ja as CheckoutSessionCreated, Ji as InvoicePaymentSession, Jn as ResyncResultSchema, Jo as FeatureFlagBenefitDefSchema, Jr as LIVE_SUBSCRIPTION_STATUSES, Js as MeterFilterOperator, Jt as eventsSettingsOf, K as WebhookEndpointCreateInput, Ka as CheckoutSessionCreateInputSchema, Ki as InvoiceLine, Kn as PlanSetWarningSchema, Ko as FeatureFlagAccountBenefit, Kr as EntitlementRulesGrant, Ks as MeterFilterGroup, Kt as applySettingsPatch, L as buildDoctorReport, La as CheckoutConsentInput, Lc as InvoiceBillingReason, Li as MeResponse, Ln as PLAN_SET_MODES, Lo as BenefitDefSchema, Lr as IngestRejectCode, Ls as MeterCreditEntrySchema, Lt as ProductSettingsPatch, M as DoctorUnsellablePriceSchema, Ma as BankTransferRecordInput, Mc as INVOICE_BILLING_REASONS, Mi as InvoiceVoidResponseSchema, Mn as emailTemplateOf, Mo as PriceSchema, Mr as EventsIngestResult, Ms as MeterChargeStatus, Mt as MeteringSettings, N as DoctorUnsellableReason, Na as BankTransferRecordInputSchema, Nc as INVOICE_PAYMENT_STATUSES, Ni as InvoiceWaiveResponse, Nn as emailTemplateSettings, No as AccountBenefit, Nr as EventsIngestResultSchema, Ns as MeterChargeStatusSchema, Nt as MeteringSettingsPatchSchema, O as DoctorSettingsSchema, Oa as PortalSessionCreateInput, Oc as ErrorCategorySchema, Oi as HEADER_SDK, On as applyEmailSettingsPatch, Oo as PlanDefSchema, Or as EventMetadataValueSchema, Os as MeterChargeLineSchema, Ot as LateGraceMinutesSchema, P as DoctorWarning, Pa as BankTransferRecorded, Pc as IdSchema, Pi as InvoiceWaiveResponseSchema, Pn as isEmailRelevant, Po as AccountBenefitSchema, Pr as INGEST_REJECT_CODES, Ps as MeterCreditEntry, Pt as MeteringSettingsSchema, Q as WebhookEndpointSchema, Qa as CheckoutStatusSchema, Qi as InvoiceSchema, Qn as MeterCreditBenefit, Qo as MeterCreditBenefitDef, Qr as ResolvedBenefit, Qs as MeterLabelSchema, Qt as BILLING_PATH_PLACEHOLDERS, R as emailReadinessOf, Ra as CheckoutConsentInputSchema, Rc as InvoiceBillingReasonSchema, Ri as MeResponseSchema, Rn as PlanSetInput, Ro as BenefitDescription, Rr as IngestRejectCodeSchema, Rs as MeterCreditProperties, Rt as ProductSettingsPatchSchema, S as DoctorOverageSchema, Sa as Subscription, Sc as ERROR_CATEGORIES, Si as GrantCreateResponse, Sn as NoticedMeteredRateSchema, So as MAX_CATALOG_BENEFITS, Sr as EVENT_TIMESTAMP_MAX_SKEW_MINUTES, Ss as METER_STANDINGS, St as DEFAULT_PAYMENT_DUE_DAYS, T as DoctorReport, Ta as SubscriptionSchema, Tc as Entitlements, Ti as HEADER_API_VERSION, Tn as PriceChangeNoticeEmailSchema, To as MAX_PLAN_BENEFITS, Tr as EventMetadataKeySchema, Ts as MeterAggregationSchema, Tt as EventsSettings, U as WEBHOOK_ENDPOINT_STATUSES, Ua as CheckoutReturnStatus, Ui as Invoice, Un as PlanSetResponseSchema, Uo as BenefitTypeSchema, Ur as BenefitRulesDefinition, Us as MeterFilter, Ut as SettingsLocaleSchema, V as DEFAULT_ENDPOINT_EVENT_TYPES, Va as CheckoutPrefillSchema, Vc as MetadataSchema, Vi as UncancelSubscriptionResponse, Vn as PlanSetModeSchema, Vo as BenefitSourceSchema, Vr as hasControlCharacters, Vs as MeterDefInput, Vt as SETTINGS_LOCALES, W as WEBHOOK_SECRET_PREFIX, Wa as CheckoutSession, Wi as InvoiceIssueInput, Wn as PlanSetWarning, Wo as CatalogBenefit, Wr as BenefitRulesSubscription, Ws as MeterFilterClause, Wt as TtlMinutesSchema, X as WebhookEndpointRotateInput, Xa as CheckoutSessionSchema, Xi as InvoicePaymentSessionCreateInputSchema, Xn as MeterChargeTotalsLine, Xo as FeatureFlagPropertiesSchema, Xr as ResolveBenefitsInput, Xs as MeterFilterValue, Xt as meteringSettingsOf, Y as WebhookEndpointListSchema, Ya as CheckoutSessionCreatedSchema, Yi as InvoicePaymentSessionCreateInput, Yn as GrantedMeterCredit, Yo as FeatureFlagProperties, Yr as OVERRIDE_BENEFIT_SOURCE, Ys as MeterFilterSchema, Yt as isReturnUrlAllowed, Z as WebhookEndpointRotateInputSchema, Za as CheckoutStatus, Zi as InvoicePaymentSessionSchema, Zn as MeterContribution, Zo as MeterCreditAccountBenefit, Zr as ResolveEntitlementsInput, Zs as MeterLabel, Zt as returnOriginsOf, _ as DoctorEventsSchema, _a as MAX_GRANT_BENEFITS, _c as AmountMinorSchema, _i as ChangeSubscriptionResponseSchema, _n as EmailTemplateSettingsSchema, _o as CatalogSyncResult, _r as EVENT_METADATA_KEY_MAX_LENGTH, _s as METER_CREDIT_ENTRY_KINDS, _t as DEFAULT_CHECKOUT_TTL_MINUTES, a as DOCTOR_ROLLUP_LAG_WARN_SECONDS, aa as ManualInvoiceInput, ac as MeterPeriodStatusSchema, ai as ERROR_CODES, an as EMAIL_TEMPLATE_BY_EVENT, ao as PaymentMethodSchema, ar as contributionOf, as as AccountMeters, at as webhookEndpointUrlProblem, b as DoctorHostedSchema, ba as Stats, bc as CurrencySchema, bi as CreditGrantResponse, bn as MAX_NOTIFICATION_EMAILS, bo as FeatureDefSchema, br as EVENT_NAME_MAX_LENGTH, bs as METER_FILTER_OPERATORS, bt as DEFAULT_METER_CHARGE_MODE, c as DoctorBillingSchema, ca as ManualInvoiceLineInputSchema, cc as MeterUnitsSchema, ci as errorCodeSpec, cn as EmailRelevanceFacts, co as checkoutRedirectUrl, cr as meterCreditsOf, cs as CatalogMeterSchema, ct as BankTransferSettingsPatchSchema, d as DoctorEmails, da as CancelSubscriptionInput, dc as MeteredPriceDefSchema, di as AccountDetailSchema, dn as EmailSettingsPatch, do as Catalog, dr as periodBoundsOf, ds as DEFAULT_METER_LOW_AT, dt as BillingSettingsPatchSchema, ea as InvoiceVoidInput, ec as MeterPeriod, ei as ResolvedEntitlements, en as BankTransferInstructionsEmailSchema, eo as ConsentSchema, er as MeterRulesEvent, es as featureValueMatchesType, et as WebhookEndpointStatusSchema, f as DoctorEmailsSchema, fa as CancelSubscriptionInputSchema, fc as MeteredPriceSchema, fi as AccountUpsertResponse, fn as EmailSettingsPatchSchema, fo as CatalogPlan, fr as rateOverage, fs as DecimalUnitsStringSchema, ft as BillingSettingsSchema, g as DoctorEvents, ga as GrantSchema, gc as ActorRefSchema, gi as ChangeSubscriptionResponse, gn as EmailTemplateSettings, go as CatalogSyncInputSchema, gr as EVENTS_INGEST_MAX_EVENTS, gs as METER_CHARGE_STATUSES, gt as DEFAULT_BANK_TRANSFER_PAYMENT_DAYS, h as DoctorEndpointSchema, ha as GrantCreateInputSchema, hc as API_VERSION, hi as CancelSubscriptionResponseSchema, hn as EmailTemplateSchema, ho as CatalogSyncInput, hr as EVENTS_INGEST_MAX_BYTES, hs as METER_AGGREGATION_KINDS, ht as BrandingSchema, i as DOCTOR_REQUIRED_LEGAL_LINKS, ia as MANUAL_INVOICE_MAX_AMOUNT_MINOR, ic as MeterPeriodStatus, ii as resolveEntitlements, in as EMAIL_TEMPLATES, io as PaymentMethod, ir as consumptionOf, is as AccountMeterSchema, it as generateWebhookSecret, j as DoctorUnsellablePrice, ja as PortalSessionSchema, jc as ExternalRefSchema, ji as InvoiceVoidResponse, jn as emailRecipients, jo as PriceDefSchema, jr as EventsIngestInputSchema, js as MeterChargeSchema, jt as MeterChargeModeSchema, k as DoctorSeverity, ka as PortalSessionCreateInputSchema, kc as ErrorResponse, ki as InvoiceIssueResponse, kn as billingPageUrl, ko as Price, kr as EventNameSchema, ks as MeterChargeList, kt as METER_CHARGE_MODES, l as DoctorCatalog, la as manualInvoiceTotals, lc as MeteredPrice, li as isKnownErrorCode, ln as EmailSenderSchema, lo as AccountsRefreshResult, lr as overageCapReached, ls as CreditGrantInput, lt as BankTransferSettingsSchema, m as DoctorEndpointDiagnosis, ma as GrantCreateInput, mc as meterFilterClauseOf, mi as CancelSubscriptionResponse, mn as EmailTemplate, mo as CatalogSchema, mr as standingOf, ms as MAX_METER_UNITS, mt as BrandingPatchSchema, n as DOCTOR_PROVIDER_ENVIRONMENTS, na as InvoiceWaiveInput, nc as MeterPeriodListSchema, ni as isLiveSubscriptionStatus, nn as EMAIL_LOCALES, no as MAX_CHECKOUT_CONSENT_DOCS, nr as OverageRateInput, ns as isMeterCreditBenefit, nt as WebhookLastDeliverySchema, o as DOCTOR_SEVERITIES, oa as ManualInvoiceInputSchema, oc as MeterStanding, oi as ErrorCode, on as EmailExtraTextSchema, oo as ProviderPayload, or as matchesFilter, os as AccountMetersSchema, ot as BankTransferPaymentDaysSchema, p as DoctorEndpoint, pa as Grant, pc as canonicalMeterFilter, pi as AccountUpsertResponseSchema, pn as EmailSettingsSchema, po as CatalogPlanSchema, pr as rolloverOf, ps as MAX_METERED_PRICE_PER_UNITS, pt as Branding, q as WebhookEndpointCreateInputSchema, qa as CheckoutSessionCreateParsed, qi as InvoiceLineSchema, qn as ResyncResult, qo as FeatureFlagBenefitDef, qr as FEATURE_FLAG_BENEFIT_TYPE, qs as MeterFilterOperand, qt as billingSettingsOf, r as DOCTOR_REQUIRED_BRANDING, ra as InvoiceWaiveInputSchema, rc as MeterPeriodSchema, ri as resolveBenefits, rn as EMAIL_PAYLOAD_SCHEMAS, ro as PAYMENT_METHODS, rr as addUtcMonths, rs as AccountMeter, rt as WebhookSecretSchema, s as DoctorBilling, sa as ManualInvoiceLineInput, sc as MeterStandingSchema, si as ErrorCodeSpec, sn as EmailLocale, so as ProviderPayloadSchema, sr as meterChargeTotals, ss as CatalogMeter, st as BankTransferSettings, t as DOCTOR_PENDING_BACKLOG_MS, ta as InvoiceVoidInputSchema, tc as MeterPeriodList, ti as isGrantActive, tn as BillingPathSchema, to as INDIVIDUAL_IDENTITY_PLACEHOLDER, tr as MeterRulesMeter, ts as isFeatureFlagBenefit, tt as WebhookLastDelivery, u as DoctorCatalogSchema, ua as splitInclusiveTax, uc as MeteredPriceDef, ui as AccountDetail, un as EmailSettings, uo as AccountsRefreshResultSchema, ur as overageOf, us as CreditGrantInputSchema, ut as BillingSettings, v as DoctorFacts, va as Payment, vc as CodeSchema, vi as CheckoutSessionResponse, vn as InvoicePaymentDueEmail, vo as CatalogSyncResultSchema, vr as EVENT_METADATA_MAX_PAIRS, vs as METER_FILTER_MAX_CONDITIONS, vt as DEFAULT_EVENT_RETENTION_DAYS, w as DoctorProviderSchema, wa as SubscriptionChangeInputSchema, wc as EntitlementValueSchema, wi as HEADER_ACTOR_REF, wn as PriceChangeNoticeEmail, wo as MAX_CATALOG_METERS, wr as EventMetadata, ws as MeterAggregationKind, wt as EventRetentionDaysSchema, x as DoctorOverage, xa as StatsSchema, xc as DateTimeSchema, xi as CreditGrantResponseSchema, xn as NoticedMeteredRate, xo as FeatureTypeSchema, xr as EVENT_TIMESTAMP_MAX_AGE_DAYS, xs as METER_PERIOD_STATUSES, xt as DEFAULT_MIN_INVOICE_MINOR, y as DoctorHosted, ya as PaymentSchema, yc as Currency, yi as CheckoutSessionResponseSchema, yn as InvoicePaymentDueEmailSchema, yo as FeatureDef, yr as EVENT_METADATA_STRING_MAX_LENGTH, ys as METER_FILTER_MAX_DEPTH, yt as DEFAULT_LATE_GRACE_MINUTES, z as endpointDiagnosisOf, za as CheckoutError, zc as InvoicePaymentStatus, zi as STEWARD_CAPABILITIES, zn as PlanSetInputSchema, zo as BenefitDescriptionSchema, zr as IngestRejection, zs as MeterCreditPropertiesSchema, zt as ProductSettingsSchema } from "./_chunks/index.js";
|
|
1
|
+
import { $ as WebhookEndpointRotateInput, $a as CreditAdjustmentInput, $c as MeterStandingSchema, $i as InvoicePaymentSessionCreateInputSchema, $n as MeterChargeTotalsLine, $o as ProviderPayloadSchema, $r as ResolveBenefitsInput, $s as CatalogMeter, $t as meteringSettingsOf, A as DoctorSettings, Aa as PortalSession, Ac as MeterCreditProperties, Ai as HEADER_REQUEST_ID, Al as InvoiceBillingReasonSchema, An as PriceChangeNoticeMeteredRateSchema, Ao as CheckoutConsentInputSchema, Ar as EventMetadataValue, As as BenefitDescription, At as EventsSettingsSchema, B as buildDoctorReport, Ba as ApiKeyListSchema, Bc as MeterFilterOperator, Bi as MeResponse, Bn as PLAN_SET_MODES, Bo as CheckoutSessionCreated, Br as IngestRejectCode, Bs as FeatureFlagBenefitDefSchema, Bt as ProductSettingsPatch, C as DoctorHostedSchema, Ca as Stats, Cc as MeterChargeSchema, Ci as CreditGrantResponse, Cl as ExternalRefSchema, Cn as MAX_NOTIFICATION_EMAILS, Co as generateApiKeyToken, Cr as EVENT_NAME_MAX_LENGTH, Cs as PriceDefSchema, Ct as DEFAULT_METER_CHARGE_MODE, D as DoctorProviderSchema, Da as SubscriptionChangeInputSchema, Dc as MeterCreditEntryKind, Di as HEADER_ACTOR_REF, Dl as Interval, Dn as PriceChangeNoticeEmail, Do as BankTransferRecordedSchema, Dr as EventMetadata, Ds as BENEFIT_TYPES, Dt as EventRetentionDaysSchema, E as DoctorProvider, Ea as SubscriptionChangeInput, Ec as MeterCreditEntry, Ei as GrantCreateResponseSchema, El as IdSchema, En as NotificationEmailsSchema, Eo as BankTransferRecorded, Er as EventExternalIdSchema, Es as AccountBenefitSchema, Et as DEFAULT_PORTAL_TTL_MINUTES, F as DoctorUnsellablePriceSchema, Fa as API_KEY_SCOPES, Fc as MeterFilter, Fi as InvoiceVoidResponseSchema, Fn as emailTemplateOf, Fo as CheckoutReturnStatus, Fr as EventsIngestResult, Fs as BenefitTypeSchema, Ft as MeteringSettings, G as EventTypeSchema, Ga as ApiKeyTokenSchema, Gc as MeterLowAtSchema, Gi as UncancelSubscriptionResponseSchema, Gn as PlanSetResponse, Go as Consent, Gr as isEventTimestampInRange, Gs as MeterCreditBenefitDefSchema, Gt as SettingsLocale, H as endpointDiagnosisOf, Ha as ApiKeySchema, Hc as MeterFilterValue, Hi as STEWARD_CAPABILITIES, Hn as PlanSetInputSchema, Ho as CheckoutSessionSchema, Hr as IngestRejection, Hs as FeatureFlagPropertiesSchema, Ht as ProductSettingsSchema, I as DoctorUnsellableReason, Ia as ApiKey, Ic as MeterFilterClause, Ii as InvoiceWaiveResponse, In as emailTemplateSettings, Io as CheckoutSession, Ir as EventsIngestResultSchema, Is as CatalogBenefit, It as MeteringSettingsPatchSchema, J as WebhookEndpoint, Ja as BankTransferListItem, Jc as MeterPeriodListSchema, Ji as InvoiceIssueInputSchema, Jn as PlanSetWarningCode, Jo as MAX_CHECKOUT_CONSENT_DOCS, Jr as EntitlementRulesCatalog, Js as isMeterCreditBenefit, Jt as WebUrlSchema, K as WEBHOOK_ENDPOINT_STATUSES, Ka as BANK_TRANSFER_LIST_STATUSES, Kc as MeterPeriod, Ki as Invoice, Kn as PlanSetResponseSchema, Ko as ConsentSchema, Kr as BenefitRulesDefinition, Ks as featureValueMatchesType, Kt as SettingsLocaleSchema, L as DoctorWarning, La as ApiKeyCreateInput, Lc as MeterFilterCondition, Li as InvoiceWaiveResponseSchema, Ln as isEmailRelevant, Lo as CheckoutSessionCreateInput, Lr as INGEST_REJECT_CODES, Ls as CatalogBenefitSchema, Lt as MeteringSettingsSchema, M as DoctorSeverity, Ma as PortalSessionCreateInputSchema, Mc as MeterDef, Mi as InvoiceIssueResponse, Ml as InvoicePaymentStatusSchema, Mn as billingPageUrl, Mo as CheckoutPrefill, Mr as EventNameSchema, Ms as BenefitFeatureType, Mt as METER_CHARGE_MODES, N as DoctorSeveritySchema, Na as PortalSessionError, Nc as MeterDefInput, Ni as InvoiceIssueResponseSchema, Nl as MetadataSchema, Nn as emailLocaleOf, No as CheckoutPrefillSchema, Nr as EventsIngestInput, Ns as BenefitSourceSchema, Nt as MeterChargeMode, O as DoctorReport, Oa as SubscriptionSchema, Oc as MeterCreditEntryKindSchema, Oi as HEADER_API_VERSION, Ol as IntervalSchema, On as PriceChangeNoticeEmailSchema, Oo as CHECKOUT_ERRORS, Or as EventMetadataKeySchema, Os as BenefitDef, Ot as EventsSettings, P as DoctorUnsellablePrice, Pa as PortalSessionSchema, Pc as MeterDefSchema, Pi as InvoiceVoidResponse, Pn as emailRecipients, Po as CheckoutRedirectTarget, Pr as EventsIngestInputSchema, Ps as BenefitType, Pt as MeterChargeModeSchema, Q as WebhookEndpointListSchema, Qa as BankTransferListStatusSchema, Qc as MeterStanding, Qi as InvoicePaymentSessionCreateInput, Qn as GrantedMeterCredit, Qo as ProviderPayload, Qr as OVERRIDE_BENEFIT_SOURCE, Qs as AccountMetersSchema, Qt as isReturnUrlAllowed, R as DoctorWarningCode, Ra as ApiKeyCreateInputSchema, Rc as MeterFilterGroup, Ri as ManualInvoiceResponse, Rn as liveSubscriptionOf, Ro as CheckoutSessionCreateInputSchema, Rr as IngestEvent, Rs as FeatureFlagAccountBenefit, Rt as PaymentDueDaysSchema, S as DoctorHosted, Sa as PaymentSchema, Sc as MeterChargeListSchema, Si as CheckoutSessionResponseSchema, Sl as ErrorResponseSchema, Sn as InvoicePaymentDueEmailSchema, So as RepriceResultSchema, Sr as EVENT_METADATA_STRING_MAX_LENGTH, Ss as PriceDef, St as DEFAULT_LATE_GRACE_MINUTES, T as DoctorOverageSchema, Ta as Subscription, Tc as MeterChargeStatusSchema, Ti as GrantCreateResponse, Tl as INVOICE_PAYMENT_STATUSES, Tn as NoticedMeteredRateSchema, To as BankTransferRecordInputSchema, Tr as EVENT_TIMESTAMP_MAX_SKEW_MINUTES, Ts as AccountBenefit, Tt as DEFAULT_PAYMENT_DUE_DAYS, U as hostedReadinessOf, Ua as ApiKeyScope, Uc as MeterLabel, Ui as StewardCapability, Un as PlanSetMode, Uo as CheckoutStatus, Ur as IngestRejectionSchema, Us as MeterCreditAccountBenefit, Ut as ReturnOriginSchema, V as emailReadinessOf, Va as ApiKeyPrefixSchema, Vc as MeterFilterSchema, Vi as MeResponseSchema, Vn as PlanSetInput, Vo as CheckoutSessionCreatedSchema, Vr as IngestRejectCodeSchema, Vs as FeatureFlagProperties, Vt as ProductSettingsPatchSchema, W as DEFAULT_ENDPOINT_EVENT_TYPES, Wa as ApiKeyScopeSchema, Wc as MeterLabelSchema, Wi as UncancelSubscriptionResponse, Wn as PlanSetModeSchema, Wo as CheckoutStatusSchema, Wr as hasControlCharacters, Ws as MeterCreditBenefitDef, Wt as SETTINGS_LOCALES, X as WebhookEndpointCreateInputSchema, Xa as BankTransferListSchema, Xc as MeterPeriodStatus, Xi as InvoiceLineSchema, Xn as ResyncResult, Xo as PaymentMethod, Xr as FEATURE_FLAG_BENEFIT_TYPE, Xs as AccountMeterSchema, Xt as billingSettingsOf, Y as WebhookEndpointCreateInput, Ya as BankTransferListItemSchema, Yc as MeterPeriodSchema, Yi as InvoiceLine, Yn as PlanSetWarningSchema, Yo as PAYMENT_METHODS, Yr as EntitlementRulesGrant, Ys as AccountMeter, Yt as applySettingsPatch, Z as WebhookEndpointList, Za as BankTransferListStatus, Zc as MeterPeriodStatusSchema, Zi as InvoicePaymentSession, Zn as ResyncResultSchema, Zo as PaymentMethodSchema, Zr as LIVE_SUBSCRIPTION_STATUSES, Zs as AccountMeters, Zt as eventsSettingsOf, _ as DoctorEndpointDiagnosis, _a as GrantCreateInput, _c as MeterAggregationSchema, _i as CancelSubscriptionResponse, _l as Entitlements, _n as EmailTemplate, _o as RepriceInput, _r as standingOf, _s as MAX_PLAN_BENEFITS, _t as BrandingPatchSchema, a as DOCTOR_REQUIRED_LEGAL_LINKS, aa as InvoiceWaiveInput, ac as MAX_METERED_PRICE_PER_UNITS, ai as isLiveSubscriptionStatus, al as canonicalMeterFilter, an as EMAIL_LOCALES, ao as MAX_API_KEY_TTL_DAYS, ar as OverageRateInput, as as CatalogPlanSchema, at as WebhookLastDeliverySchema, b as DoctorEventsSchema, ba as MAX_GRANT_BENEFITS, bc as MeterChargeLineSchema, bi as ChangeSubscriptionResponseSchema, bl as ErrorCategorySchema, bn as EmailTemplateSettingsSchema, bo as RepriceItemSchema, br as EVENT_METADATA_KEY_MAX_LENGTH, bs as PlanDefSchema, bt as DEFAULT_CHECKOUT_TTL_MINUTES, c as DoctorApiKey, ca as ManualInvoiceInput, cc as METER_CHARGE_STATUSES, ci as ERROR_CODES, cl as ActorRefSchema, cn as EMAIL_TEMPLATE_BY_EVENT, co as MeterClosePeriodsInputSchema, cr as contributionOf, cs as CatalogSyncInputSchema, ct as webhookEndpointUrlProblem, d as DoctorBillingSchema, da as ManualInvoiceLineInputSchema, dc as METER_FILTER_MAX_DEPTH, di as errorCodeSpec, dl as Currency, dn as EmailRelevanceFacts, do as MeterRecomputeInput, dr as meterCreditsOf, ds as FeatureDef, dt as BankTransferSettingsPatchSchema, ea as InvoicePaymentSessionSchema, ec as CatalogMeterSchema, ei as ResolveEntitlementsInput, el as MeterUnitsSchema, en as returnOriginsOf, eo as CreditAdjustmentInputSchema, er as MeterContribution, es as checkoutRedirectUrl, et as WebhookEndpointRotateInputSchema, f as DoctorCatalog, fa as manualInvoiceTotals, fc as METER_FILTER_OPERATORS, fi as isKnownErrorCode, fl as CurrencySchema, fn as EmailSenderSchema, fo as MeterRecomputeInputSchema, fr as overageCapReached, fs as FeatureDefSchema, ft as BankTransferSettingsSchema, g as DoctorEndpoint, ga as Grant, gc as MeterAggregationKind, gi as AccountUpsertResponseSchema, gl as EntitlementValueSchema, gn as EmailSettingsSchema, go as RedeliveredEventSchema, gr as rolloverOf, gs as MAX_CATALOG_METERS, gt as Branding, h as DoctorEmailsSchema, ha as CancelSubscriptionInputSchema, hc as MeterAggregation, hi as AccountUpsertResponse, hl as EntitlementValue, hn as EmailSettingsPatchSchema, ho as RedeliveredEvent, hr as rateOverage, hs as MAX_CATALOG_METERED_PRICES, ht as BillingSettingsSchema, i as DOCTOR_REQUIRED_BRANDING, ia as InvoiceVoidInputSchema, ic as DecimalUnitsStringSchema, ii as isGrantActive, il as MeteredPriceSchema, in as BillingPathSchema, io as DunningPolicySchema, ir as MeterRulesMeter, is as CatalogPlan, it as WebhookLastDelivery, j as DoctorSettingsSchema, ja as PortalSessionCreateInput, jc as MeterCreditPropertiesSchema, ji as HEADER_SDK, jl as InvoicePaymentStatus, jn as applyEmailSettingsPatch, jo as CheckoutError, jr as EventMetadataValueSchema, js as BenefitDescriptionSchema, jt as LateGraceMinutesSchema, k as DoctorReportSchema, ka as PORTAL_SESSION_ERRORS, kc as MeterCreditEntrySchema, ki as HEADER_IDEMPOTENCY_KEY, kl as InvoiceBillingReason, kn as PriceChangeNoticeMeteredRate, ko as CheckoutConsentInput, kr as EventMetadataSchema, ks as BenefitDefSchema, kt as EventsSettingsPatchSchema, l as DoctorApiKeySchema, la as ManualInvoiceInputSchema, lc as METER_CREDIT_ENTRY_KINDS, li as ErrorCode, ll as AmountMinorSchema, ln as EmailExtraTextSchema, lo as MeterClosePeriodsResult, lr as matchesFilter, ls as CatalogSyncResult, lt as BankTransferPaymentDaysSchema, m as DoctorEmails, ma as CancelSubscriptionInput, mc as METER_STANDINGS, mi as AccountDetailSchema, ml as ERROR_CATEGORIES, mn as EmailSettingsPatch, mo as MeterRecomputeResultSchema, mr as periodBoundsOf, ms as MAX_CATALOG_BENEFITS, mt as BillingSettingsPatchSchema, n as DOCTOR_PENDING_BACKLOG_MS, na as InvoiceStatusSchema, nc as CreditGrantInputSchema, ni as ResolvedBenefits, nl as MeteredPriceDef, nn as BankTransferInstructionsEmail, no as DunningPolicy, nr as MeterCreditsOptions, ns as AccountsRefreshResultSchema, nt as WebhookEndpointStatus, o as DOCTOR_ROLLUP_LAG_WARN_SECONDS, oa as InvoiceWaiveInputSchema, oc as MAX_METER_UNITS, oi as resolveBenefits, ol as meterFilterClauseOf, on as EMAIL_PAYLOAD_SCHEMAS, oo as MAX_NOTICE_DAYS, or as addUtcMonths, os as CatalogSchema, ot as WebhookSecretSchema, p as DoctorCatalogSchema, pa as splitInclusiveTax, pc as METER_PERIOD_STATUSES, pi as AccountDetail, pl as DateTimeSchema, pn as EmailSettings, po as MeterRecomputeResult, pr as overageOf, ps as FeatureTypeSchema, pt as BillingSettings, q as WEBHOOK_SECRET_PREFIX, qa as BankTransferList, qc as MeterPeriodList, qi as InvoiceIssueInput, qn as PlanSetWarning, qo as INDIVIDUAL_IDENTITY_PLACEHOLDER, qr as BenefitRulesSubscription, qs as isFeatureFlagBenefit, qt as TtlMinutesSchema, r as DOCTOR_PROVIDER_ENVIRONMENTS, ra as InvoiceVoidInput, rc as DEFAULT_METER_LOW_AT, ri as ResolvedEntitlements, rl as MeteredPriceDefSchema, rn as BankTransferInstructionsEmailSchema, ro as DunningPolicyInput, rr as MeterRulesEvent, rs as Catalog, rt as WebhookEndpointStatusSchema, s as DOCTOR_SEVERITIES, sa as MANUAL_INVOICE_MAX_AMOUNT_MINOR, sc as METER_AGGREGATION_KINDS, si as resolveEntitlements, sl as API_VERSION, sn as EMAIL_TEMPLATES, so as MeterClosePeriodsInput, sr as consumptionOf, ss as CatalogSyncInput, st as generateWebhookSecret, t as DOCTOR_KEY_EXPIRY_WARN_DAYS, ta as InvoiceSchema, tc as CreditGrantInput, ti as ResolvedBenefit, tl as MeteredPrice, tn as BILLING_PATH_PLACEHOLDERS, to as DUNNING_ACTIONS, tr as MeterCreditBenefit, ts as AccountsRefreshResult, tt as WebhookEndpointSchema, u as DoctorBilling, ua as ManualInvoiceLineInput, uc as METER_FILTER_MAX_CONDITIONS, ui as ErrorCodeSpec, ul as CodeSchema, un as EmailLocale, uo as MeterClosePeriodsResultSchema, ur as meterChargeTotals, us as CatalogSyncResultSchema, ut as BankTransferSettings, v as DoctorEndpointSchema, va as GrantCreateInputSchema, vc as MeterCharge, vi as CancelSubscriptionResponseSchema, vl as EntitlementsSchema, vn as EmailTemplateSchema, vo as RepriceInputSchema, vr as EVENTS_INGEST_MAX_BYTES, vs as METERED_PRICE_TAX_MISMATCH, vt as BrandingSchema, w as DoctorOverage, wa as StatsSchema, wc as MeterChargeStatus, wi as CreditGrantResponseSchema, wl as INVOICE_BILLING_REASONS, wn as NoticedMeteredRate, wo as BankTransferRecordInput, wr as EVENT_TIMESTAMP_MAX_AGE_DAYS, ws as PriceSchema, wt as DEFAULT_MIN_INVOICE_MINOR, x as DoctorFacts, xa as Payment, xc as MeterChargeList, xi as CheckoutSessionResponse, xl as ErrorResponse, xn as InvoicePaymentDueEmail, xo as RepriceResult, xr as EVENT_METADATA_MAX_PAIRS, xs as Price, xt as DEFAULT_EVENT_RETENTION_DAYS, y as DoctorEvents, ya as GrantSchema, yc as MeterChargeLine, yi as ChangeSubscriptionResponse, yl as ErrorCategory, yn as EmailTemplateSettings, yo as RepriceItem, yr as EVENTS_INGEST_MAX_EVENTS, ys as PlanDef, yt as DEFAULT_BANK_TRANSFER_PAYMENT_DAYS, z as DoctorWarningSchema, za as ApiKeyList, zc as MeterFilterOperand, zi as ManualInvoiceResponseSchema, zn as uniqueEmails, zo as CheckoutSessionCreateParsed, zr as IngestEventSchema, zs as FeatureFlagBenefitDef, zt as ProductSettings } from "./_chunks/index.js";
|
|
2
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
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, BankTransferInstructionsEmail, BankTransferInstructionsEmailSchema, BankTransferPaymentDaysSchema, BankTransferRecordInput, BankTransferRecordInputSchema, BankTransferRecorded, BankTransferRecordedSchema, BankTransferSettings, BankTransferSettingsPatchSchema, BankTransferSettingsSchema, 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_BANK_TRANSFER_PAYMENT_DAYS, 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, PAYMENT_METHODS, PING_EVENT_TYPE, PLAN_SET_MODES, PORTAL_SESSION_ERRORS, Payment, PaymentDueDaysSchema, PaymentMethod, PaymentMethodSchema, 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 };
|
|
4
|
+
export { ACCOUNT_INCLUDES, API_KEY_SCOPES, 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, ApiKey, ApiKeyCreateInput, ApiKeyCreateInputSchema, ApiKeyList, ApiKeyListSchema, ApiKeyPrefixSchema, ApiKeySchema, ApiKeyScope, ApiKeyScopeSchema, ApiKeyTokenSchema, ApiVersionSchema, BANK_TRANSFER_LIST_STATUSES, BENEFIT_TYPES, BILLING_PATH_PLACEHOLDERS, BankTransferInstructionsEmail, BankTransferInstructionsEmailSchema, BankTransferList, BankTransferListItem, BankTransferListItemSchema, BankTransferListSchema, BankTransferListStatus, BankTransferListStatusSchema, BankTransferPaymentDaysSchema, BankTransferRecordInput, BankTransferRecordInputSchema, BankTransferRecorded, BankTransferRecordedSchema, BankTransferSettings, BankTransferSettingsPatchSchema, BankTransferSettingsSchema, 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, CreditAdjustmentInput, CreditAdjustmentInputSchema, CreditGrantInput, CreditGrantInputSchema, CreditGrantResponse, CreditGrantResponseSchema, Currency, CurrencySchema, DEFAULT_BANK_TRANSFER_PAYMENT_DAYS, 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_KEY_EXPIRY_WARN_DAYS, DOCTOR_PENDING_BACKLOG_MS, DOCTOR_PROVIDER_ENVIRONMENTS, DOCTOR_REQUIRED_BRANDING, DOCTOR_REQUIRED_LEGAL_LINKS, DOCTOR_ROLLUP_LAG_WARN_SECONDS, DOCTOR_SEVERITIES, DUNNING_ACTIONS, DateTimeSchema, DecimalUnitsStringSchema, DoctorApiKey, DoctorApiKeySchema, 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, DunningPolicy, DunningPolicyInput, DunningPolicySchema, 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_API_KEY_TTL_DAYS, 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_NOTICE_DAYS, 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, MeterClosePeriodsInput, MeterClosePeriodsInputSchema, MeterClosePeriodsResult, MeterClosePeriodsResultSchema, 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, MeterRecomputeInput, MeterRecomputeInputSchema, MeterRecomputeResult, MeterRecomputeResultSchema, MeterRulesEvent, MeterRulesMeter, MeterStanding, MeterStandingSchema, MeterUnitsSchema, MeteredPrice, MeteredPriceDef, MeteredPriceDefSchema, MeteredPriceSchema, MeteringSettings, MeteringSettingsPatchSchema, MeteringSettingsSchema, NoticedMeteredRate, NoticedMeteredRateSchema, NotificationEmailsSchema, OVERRIDE_BENEFIT_SOURCE, OverageRateInput, PAYMENT_METHODS, PING_EVENT_TYPE, PLAN_SET_MODES, PORTAL_SESSION_ERRORS, Payment, PaymentDueDaysSchema, PaymentMethod, PaymentMethodSchema, 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, RedeliveredEvent, RedeliveredEventSchema, RepriceInput, RepriceInputSchema, RepriceItem, RepriceItemSchema, RepriceResult, RepriceResultSchema, 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, generateApiKeyToken, 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
1
|
import { $ as emailLocaleOf, $t as MeteredPriceSchema, A as SubscriptionStatusSchema, An as hasControlCharacters, At as METER_FILTER_MAX_CONDITIONS, B as EmailSenderSchema, Bn as EntitlementsSchema, Bt as MeterCreditEntryKindSchema, C as AccountSchema, Cn as EventNameSchema, Ct as DEFAULT_METER_LOW_AT, D as BillingProfileKindSchema, Dn as IngestEventSchema, Dt as METER_AGGREGATION_KINDS, E as AccountUpsertInputSchema, En as INGEST_REJECT_CODES, Et as MAX_METER_UNITS, F as EMAIL_LOCALES, Fn as CodeSchema, Ft as MeterAggregationSchema, G as InvoicePaymentDueEmailSchema, Gn as INVOICE_PAYMENT_STATUSES, Gt as MeterLabelSchema, H as EmailSettingsSchema, Hn as ErrorResponseSchema, Ht as MeterCreditPropertiesSchema, I as EMAIL_PAYLOAD_SCHEMAS, In as CurrencySchema, It as MeterChargeLineSchema, J as NotificationEmailsSchema, Jn as InvoiceBillingReasonSchema, Jt as MeterPeriodSchema, K as MAX_NOTIFICATION_EMAILS, Kn as IdSchema, Kt as MeterLowAtSchema, L as EMAIL_TEMPLATES, Ln as DateTimeSchema, Lt as MeterChargeListSchema, M as BILLING_PATH_PLACEHOLDERS, Mn as API_VERSION, Mt as METER_FILTER_OPERATORS, N as BankTransferInstructionsEmailSchema, Nn as ActorRefSchema, Nt as METER_PERIOD_STATUSES, O as BillingProfileSchema, On as IngestRejectCodeSchema, Ot as METER_CHARGE_STATUSES, P as BillingPathSchema, Pn as AmountMinorSchema, Pt as METER_STANDINGS, Q as billingPageUrl, Qt as MeteredPriceDefSchema, R as EMAIL_TEMPLATE_BY_EVENT, Rn as ERROR_CATEGORIES, Rt as MeterChargeSchema, S as AccountScheduledChangeSchema, Sn as EventMetadataValueSchema, St as CreditGrantInputSchema, T as AccountSubscriptionStateSchema, Tn as EventsIngestResultSchema, Tt as MAX_METERED_PRICE_PER_UNITS, U as EmailTemplateSchema, Un as ExternalRefSchema, Ut as MeterDefSchema, V as EmailSettingsPatchSchema, Vn as ErrorCategorySchema, Vt as MeterCreditEntrySchema, W as EmailTemplateSettingsSchema, Wn as INVOICE_BILLING_REASONS, Wt as MeterFilterSchema, X as PriceChangeNoticeMeteredRateSchema, Xn as MetadataSchema, Xt as MeterStandingSchema, Y as PriceChangeNoticeEmailSchema, Yn as InvoicePaymentStatusSchema, Yt as MeterPeriodStatusSchema, Z as applyEmailSettingsPatch, Zt as MeterUnitsSchema, _ as AccountMeterStateSchema, _n as EVENT_TIMESTAMP_MAX_AGE_DAYS, _t as isFeatureFlagBenefit, a as EVENT_TYPES, an as fromMicroUnits, at as uniqueEmails, b as AccountOpenInvoiceSchema, bn as EventMetadataKeySchema, bt as AccountMetersSchema, c as LEGACY_EVENT_TYPES, cn as parseMicroUnits, ct as BenefitDefSchema, d as isEventType, dn as EVENTS_INGEST_MAX_BYTES, dt as BenefitTypeSchema, en as canonicalMeterFilter, et as emailRecipients, f as ACCOUNT_INCLUDES, fn as EVENTS_INGEST_MAX_EVENTS, ft as CatalogBenefitSchema, g as AccountLocaleSchema, gn as EVENT_NAME_MAX_LENGTH, gt as featureValueMatchesType, h as AccountDunningStateSchema, hn as EVENT_METADATA_STRING_MAX_LENGTH, ht as MeterCreditBenefitDefSchema, i as EVENT_DETAIL_SCHEMAS, in as UNIT_DECIMALS, it as liveSubscriptionOf, j as SubscriptionSummarySchema, jn as isEventTimestampInRange, jt as METER_FILTER_MAX_DEPTH, k as EntitlementSnapshotSchema, kn as IngestRejectionSchema, kt as METER_CREDIT_ENTRY_KINDS, l as PING_EVENT_TYPE, ln as plainDecimalOf, lt as BenefitDescriptionSchema, m as AccountDeleteResponseSchema, mn as EVENT_METADATA_MAX_PAIRS, mt as FeatureFlagPropertiesSchema, n as ApiVersionSchema, nn as InvalidUnitValueError, nt as emailTemplateSettings, o as EventIdSchema, on as isMicroPrecise, ot as AccountBenefitSchema, p as AccessStateSchema, pn as EVENT_METADATA_KEY_MAX_LENGTH, pt as FeatureFlagBenefitDefSchema, q as NoticedMeteredRateSchema, qn as IntervalSchema, qt as MeterPeriodListSchema, r as BillingEventSchema, rn as MICRO_UNITS_PER_UNIT, rt as isEmailRelevant, s as FULL_STATE_EVENT_TYPES, sn as microToDecimalString, st as BENEFIT_TYPES, t as AnyBillingEventSchema, tn as meterFilterClauseOf, tt as emailTemplateOf, u as PingSchema, un as toMicroUnits, ut as BenefitSourceSchema, v as AccountMetersStateSchema, vn as EVENT_TIMESTAMP_MAX_SKEW_MINUTES, vt as isMeterCreditBenefit, w as AccountStateSchema, wn as EventsIngestInputSchema, wt as DecimalUnitsStringSchema, x as AccountProfileStateSchema, xn as EventMetadataSchema, xt as CatalogMeterSchema, y as AccountOpenCheckoutSchema, yn as EventExternalIdSchema, yt as AccountMeterSchema, z as EmailExtraTextSchema, zn as EntitlementValueSchema, zt as MeterChargeStatusSchema } from "./_chunks/events.js";
|
|
2
|
-
import { $ as
|
|
2
|
+
import { $ as periodBoundsOf, $n as EventsSettingsSchema, $t as ApiKeySchema, A as WebhookEndpointCreateInputSchema, An as INDIVIDUAL_IDENTITY_PLACEHOLDER, Ar as METERED_PRICE_TAX_MISMATCH, At as InvoiceStatusSchema, B as PlanSetInputSchema, Bn as BillingSettingsSchema, Bt as GrantSchema, C as emailReadinessOf, Cn as CheckoutConsentInputSchema, Cr as CatalogSyncResultSchema, Ct as STEWARD_CAPABILITIES, D as EventTypeSchema, Dn as CheckoutSessionSchema, Dr as MAX_CATALOG_METERED_PRICES, Dt as InvoicePaymentSessionCreateInputSchema, E as DEFAULT_ENDPOINT_EVENT_TYPES, En as CheckoutSessionCreatedSchema, Er as MAX_CATALOG_BENEFITS, Et as InvoiceLineSchema, F as WebhookLastDeliverySchema, Fn as checkoutRedirectUrl, Ft as ManualInvoiceLineInputSchema, G as addUtcMonths, Gn as DEFAULT_EVENT_RETENTION_DAYS, Gt as SubscriptionSchema, H as PlanSetResponseSchema, Hn as BrandingSchema, Ht as PaymentSchema, I as WebhookSecretSchema, In as BankTransferPaymentDaysSchema, It as manualInvoiceTotals, J as matchesFilter, Jn as DEFAULT_MIN_INVOICE_MINOR, Jt as PortalSessionSchema, K as consumptionOf, Kn as DEFAULT_LATE_GRACE_MINUTES, Kt as PORTAL_SESSION_ERRORS, L as generateWebhookSecret, Ln as BankTransferSettingsPatchSchema, Lt as splitInclusiveTax, M as WebhookEndpointRotateInputSchema, Mn as PAYMENT_METHODS, Mr as PriceDefSchema, Mt as InvoiceWaiveInputSchema, N as WebhookEndpointSchema, Nn as PaymentMethodSchema, Nr as PriceSchema, Nt as MANUAL_INVOICE_MAX_AMOUNT_MINOR, O as WEBHOOK_ENDPOINT_STATUSES, On as CheckoutStatusSchema, Or as MAX_CATALOG_METERS, Ot as InvoicePaymentSessionSchema, P as WebhookEndpointStatusSchema, Pn as ProviderPayloadSchema, Pt as ManualInvoiceInputSchema, Q as overageOf, Qn as EventsSettingsPatchSchema, Qt as ApiKeyPrefixSchema, R as webhookEndpointUrlProblem, Rn as BankTransferSettingsSchema, Rt as CancelSubscriptionInputSchema, S as buildDoctorReport, Sn as CHECKOUT_ERRORS, Sr as CatalogSyncInputSchema, St as MeResponseSchema, T as hostedReadinessOf, Tn as CheckoutSessionCreateInputSchema, Tr as FeatureTypeSchema, Tt as InvoiceIssueInputSchema, U as PlanSetWarningSchema, Un as DEFAULT_BANK_TRANSFER_PAYMENT_DAYS, Ut as StatsSchema, V as PlanSetModeSchema, Vn as BrandingPatchSchema, Vt as MAX_GRANT_BENEFITS, W as ResyncResultSchema, Wn as DEFAULT_CHECKOUT_TTL_MINUTES, Wt as SubscriptionChangeInputSchema, X as meterCreditsOf, Xn as DEFAULT_PORTAL_TTL_MINUTES, Xt as ApiKeyCreateInputSchema, Y as meterChargeTotals, Yn as DEFAULT_PAYMENT_DUE_DAYS, Yt as API_KEY_SCOPES, Z as overageCapReached, Zn as EventRetentionDaysSchema, Zt as ApiKeyListSchema, _ as DoctorReportSchema, _n as RepriceItemSchema, _r as meteringSettingsOf, _t as HEADER_SDK, a as DOCTOR_REQUIRED_LEGAL_LINKS, an as BankTransferListStatusSchema, ar as PaymentDueDaysSchema, at as isKnownErrorCode, b as DoctorUnsellablePriceSchema, bn as BankTransferRecordInputSchema, br as CatalogPlanSchema, bt as InvoiceWaiveResponseSchema, c as DoctorApiKeySchema, cn as DunningPolicySchema, cr as ReturnOriginSchema, ct as CancelSubscriptionResponseSchema, d as DoctorEmailsSchema, dn as MeterClosePeriodsInputSchema, dr as TtlMinutesSchema, dt as CreditGrantResponseSchema, en as ApiKeyScopeSchema, er as LateGraceMinutesSchema, et as rateOverage, f as DoctorEndpointSchema, fn as MeterClosePeriodsResultSchema, fr as WebUrlSchema, ft as GrantCreateResponseSchema, g as DoctorProviderSchema, gn as RepriceInputSchema, gr as isReturnUrlAllowed, gt as HEADER_REQUEST_ID, h as DoctorOverageSchema, hn as RedeliveredEventSchema, hr as eventsSettingsOf, ht as HEADER_IDEMPOTENCY_KEY, i as DOCTOR_REQUIRED_BRANDING, in as BankTransferListSchema, ir as MeteringSettingsSchema, it as errorCodeSpec, j as WebhookEndpointListSchema, jn as MAX_CHECKOUT_CONSENT_DOCS, jr as PlanDefSchema, jt as InvoiceVoidInputSchema, k as WEBHOOK_SECRET_PREFIX, kn as ConsentSchema, kr as MAX_PLAN_BENEFITS, kt as InvoiceSchema, l as DoctorBillingSchema, ln as MAX_API_KEY_TTL_DAYS, lr as SETTINGS_LOCALES, lt as ChangeSubscriptionResponseSchema, m as DoctorHostedSchema, mn as MeterRecomputeResultSchema, mr as billingSettingsOf, mt as HEADER_API_VERSION, n as DOCTOR_PENDING_BACKLOG_MS, nn as BANK_TRANSFER_LIST_STATUSES, nr as MeterChargeModeSchema, nt as standingOf, o as DOCTOR_ROLLUP_LAG_WARN_SECONDS, on as CreditAdjustmentInputSchema, or as ProductSettingsPatchSchema, ot as AccountDetailSchema, p as DoctorEventsSchema, pn as MeterRecomputeInputSchema, pr as applySettingsPatch, pt as HEADER_ACTOR_REF, q as contributionOf, qn as DEFAULT_METER_CHARGE_MODE, qt as PortalSessionCreateInputSchema, r as DOCTOR_PROVIDER_ENVIRONMENTS, rn as BankTransferListItemSchema, rr as MeteringSettingsPatchSchema, rt as ERROR_CODES, s as DOCTOR_SEVERITIES, sn as DUNNING_ACTIONS, sr as ProductSettingsSchema, st as AccountUpsertResponseSchema, t as DOCTOR_KEY_EXPIRY_WARN_DAYS, tn as ApiKeyTokenSchema, tr as METER_CHARGE_MODES, tt as rolloverOf, u as DoctorCatalogSchema, un as MAX_NOTICE_DAYS, ur as SettingsLocaleSchema, ut as CheckoutSessionResponseSchema, v as DoctorSettingsSchema, vn as RepriceResultSchema, vr as returnOriginsOf, vt as InvoiceIssueResponseSchema, w as endpointDiagnosisOf, wn as CheckoutPrefillSchema, wr as FeatureDefSchema, wt as UncancelSubscriptionResponseSchema, x as DoctorWarningSchema, xn as BankTransferRecordedSchema, xr as CatalogSchema, xt as ManualInvoiceResponseSchema, y as DoctorSeveritySchema, yn as generateApiKeyToken, yr as AccountsRefreshResultSchema, yt as InvoiceVoidResponseSchema, z as PLAN_SET_MODES, zn as BillingSettingsPatchSchema, zt as GrantCreateInputSchema } from "./_chunks/src.js";
|
|
3
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, BankTransferInstructionsEmailSchema, BankTransferPaymentDaysSchema, BankTransferRecordInputSchema, BankTransferRecordedSchema, BankTransferSettingsPatchSchema, BankTransferSettingsSchema, 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_BANK_TRANSFER_PAYMENT_DAYS, 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, PAYMENT_METHODS, PING_EVENT_TYPE, PLAN_SET_MODES, PORTAL_SESSION_ERRORS, PaymentDueDaysSchema, PaymentMethodSchema, 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 };
|
|
4
|
+
export { ACCOUNT_INCLUDES, API_KEY_SCOPES, 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, ApiKeyCreateInputSchema, ApiKeyListSchema, ApiKeyPrefixSchema, ApiKeySchema, ApiKeyScopeSchema, ApiKeyTokenSchema, ApiVersionSchema, BANK_TRANSFER_LIST_STATUSES, BENEFIT_TYPES, BILLING_PATH_PLACEHOLDERS, BankTransferInstructionsEmailSchema, BankTransferListItemSchema, BankTransferListSchema, BankTransferListStatusSchema, BankTransferPaymentDaysSchema, BankTransferRecordInputSchema, BankTransferRecordedSchema, BankTransferSettingsPatchSchema, BankTransferSettingsSchema, 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, CreditAdjustmentInputSchema, CreditGrantInputSchema, CreditGrantResponseSchema, CurrencySchema, DEFAULT_BANK_TRANSFER_PAYMENT_DAYS, 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_KEY_EXPIRY_WARN_DAYS, DOCTOR_PENDING_BACKLOG_MS, DOCTOR_PROVIDER_ENVIRONMENTS, DOCTOR_REQUIRED_BRANDING, DOCTOR_REQUIRED_LEGAL_LINKS, DOCTOR_ROLLUP_LAG_WARN_SECONDS, DOCTOR_SEVERITIES, DUNNING_ACTIONS, DateTimeSchema, DecimalUnitsStringSchema, DoctorApiKeySchema, DoctorBillingSchema, DoctorCatalogSchema, DoctorEmailsSchema, DoctorEndpointSchema, DoctorEventsSchema, DoctorHostedSchema, DoctorOverageSchema, DoctorProviderSchema, DoctorReportSchema, DoctorSettingsSchema, DoctorSeveritySchema, DoctorUnsellablePriceSchema, DoctorWarningSchema, DunningPolicySchema, 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_API_KEY_TTL_DAYS, 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_NOTICE_DAYS, 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, MeterClosePeriodsInputSchema, MeterClosePeriodsResultSchema, MeterCreditBenefitDefSchema, MeterCreditEntryKindSchema, MeterCreditEntrySchema, MeterCreditPropertiesSchema, MeterDefSchema, MeterFilterSchema, MeterLabelSchema, MeterLowAtSchema, MeterPeriodListSchema, MeterPeriodSchema, MeterPeriodStatusSchema, MeterRecomputeInputSchema, MeterRecomputeResultSchema, MeterStandingSchema, MeterUnitsSchema, MeteredPriceDefSchema, MeteredPriceSchema, MeteringSettingsPatchSchema, MeteringSettingsSchema, NoticedMeteredRateSchema, NotificationEmailsSchema, OVERRIDE_BENEFIT_SOURCE, PAYMENT_METHODS, PING_EVENT_TYPE, PLAN_SET_MODES, PORTAL_SESSION_ERRORS, PaymentDueDaysSchema, PaymentMethodSchema, PaymentSchema, PingSchema, PlanDefSchema, PlanSetInputSchema, PlanSetModeSchema, PlanSetResponseSchema, PlanSetWarningSchema, PortalSessionCreateInputSchema, PortalSessionSchema, PriceChangeNoticeEmailSchema, PriceChangeNoticeMeteredRateSchema, PriceDefSchema, PriceSchema, ProductSettingsPatchSchema, ProductSettingsSchema, ProviderPayloadSchema, RedeliveredEventSchema, RepriceInputSchema, RepriceItemSchema, RepriceResultSchema, 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, generateApiKeyToken, 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 };
|