@stewardhq/sdk 0.1.0-rc.0 → 0.2.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.
@@ -1,5 +1,5 @@
1
- import { D as API_VERSION, L as ErrorResponseSchema, O as ActorRefSchema, p as AccountDeleteResponseSchema, w as EntitlementSnapshotSchema, y as AccountStateSchema } from "./events.js";
2
- import { $ as HEADER_SDK, B as AccountDetailSchema, C as WebhookEndpointListSchema, Et as CheckoutSessionCreatedSchema, H as BillingProfileResponseSchema, I as ResyncResultSchema, J as GrantCreateResponseSchema, Jt as AccountsRefreshResultSchema, K as EventListSchema, P as PlanSetResponseSchema, Q as HEADER_REQUEST_ID, R as errorCodeSpec, T as WebhookEndpointSchema, U as CancelSubscriptionResponseSchema, V as AccountUpsertResponseSchema, W as CheckoutSessionResponseSchema, X as HEADER_API_VERSION, Y as HEADER_ACTOR_REF, Yt as CatalogSchema, Z as HEADER_IDEMPOTENCY_KEY, Zt as CatalogSyncResultSchema, _t as StatsSchema, et as InvoiceIssueResponseSchema, nt as ManualInvoiceResponseSchema, q as EventRecordSchema, tt as InvoiceVoidResponseSchema, u as DoctorReportSchema, xt as PortalSessionSchema, zt as ProductSettingsSchema } from "./src.js";
1
+ import { D as API_VERSION, L as ErrorResponseSchema, O as ActorRefSchema, p as AccountDeleteResponseSchema, y as AccountStateSchema } from "./events.js";
2
+ import { B as AccountDetailSchema, C as WebhookEndpointListSchema, G as HEADER_ACTOR_REF, H as CancelSubscriptionResponseSchema, I as ResyncResultSchema, J as HEADER_REQUEST_ID, K as HEADER_API_VERSION, Kt as CatalogSyncResultSchema, P as PlanSetResponseSchema, Pt as ProductSettingsSchema, Q as ManualInvoiceResponseSchema, R as errorCodeSpec, St as CheckoutSessionCreatedSchema, T as WebhookEndpointSchema, U as CheckoutSessionResponseSchema, Ut as AccountsRefreshResultSchema, V as AccountUpsertResponseSchema, W as GrantCreateResponseSchema, Wt as CatalogSchema, X as InvoiceIssueResponseSchema, Y as HEADER_SDK, Z as InvoiceVoidResponseSchema, _t as PortalSessionSchema, pt as StatsSchema, q as HEADER_IDEMPOTENCY_KEY, u as DoctorReportSchema } from "./src.js";
3
3
  import { a as StewardNetworkError, n as StewardConfigError, r as StewardContractError, t as StewardApiError } from "./errors.js";
4
4
  import { z } from "zod";
5
5
  //#region ../contract/src/client.ts
@@ -127,7 +127,6 @@ function createBillingClient(options) {
127
127
  syncCatalog: (input, opts) => call(CatalogSyncResultSchema, "PUT", "/v1/admin/catalog", input, opts),
128
128
  upsertAccount: (accountRef, input, opts) => call(AccountUpsertResponseSchema, "PUT", `/v1/accounts/${ref(accountRef)}`, input, opts),
129
129
  getAccount: (accountRef, include = []) => call(AccountDetailSchema, "GET", `/v1/accounts/${ref(accountRef)}${include.length ? `?include=${include.join(",")}` : ""}`),
130
- getEntitlements: (accountRef) => call(EntitlementSnapshotSchema, "GET", `/v1/accounts/${ref(accountRef)}/entitlements`),
131
130
  /**
132
131
  * Hesap durumu (`AccountState`). ETag = `"<version>"`; önceki yanıtın
133
132
  * `etag`'i verilirse ve durum değişmediyse 304 → `{notModified: true}`.
@@ -153,7 +152,6 @@ function createBillingClient(options) {
153
152
  state: parsed.data
154
153
  });
155
154
  },
156
- putBillingProfile: (accountRef, profile, opts) => call(BillingProfileResponseSchema, "PUT", `/v1/accounts/${ref(accountRef)}/billing-profile`, profile, opts),
157
155
  /** Atomik plan (K6): aktif plan grant'leri → tek plan grant'i (`planCode: null` kaldırır); `strict`'te 409 `subscription_plan_higher`. */
158
156
  setPlan: (accountRef, input, opts) => call(PlanSetResponseSchema, "PUT", `/v1/accounts/${ref(accountRef)}/plan`, input, opts),
159
157
  /** Saklı durumu `account.state_changed` (`cause: "resync"`) olarak yeniden yayınlar; version değişmez (202). */
@@ -183,15 +181,6 @@ function createBillingClient(options) {
183
181
  bytes: new Uint8Array(await res.arrayBuffer())
184
182
  });
185
183
  },
186
- listEvents: (query = {}) => {
187
- const params = new URLSearchParams();
188
- if (query.accountRef) params.set("account", query.accountRef);
189
- if (query.cursor) params.set("cursor", query.cursor);
190
- if (query.limit) params.set("limit", String(query.limit));
191
- const qs = params.toString();
192
- return call(EventListSchema, "GET", `/v1/events${qs ? `?${qs}` : ""}`);
193
- },
194
- redeliverEvent: (id, opts) => call(EventRecordSchema, "POST", `/v1/events/${ref(id)}/redeliver`, void 0, opts),
195
184
  getSettings: () => call(ProductSettingsSchema, "GET", "/v1/admin/settings"),
196
185
  updateSettings: (patch, opts) => call(ProductSettingsSchema, "PATCH", "/v1/admin/settings", patch, opts),
197
186
  listWebhookEndpoints: () => call(WebhookEndpointListSchema, "GET", "/v1/admin/webhook-endpoints"),
@@ -256,7 +245,7 @@ async function withRetries(request, policy, send) {
256
245
  }
257
246
  //#endregion
258
247
  //#region src/steward.ts
259
- const SDK_HEADER = `@stewardhq/sdk/0.1.0-rc.0`;
248
+ const SDK_HEADER = `@stewardhq/sdk/0.2.0`;
260
249
  const MeSchema = z.object({
261
250
  product: z.string(),
262
251
  keyName: z.string(),
@@ -322,10 +311,10 @@ function createSteward(options = {}) {
322
311
  apiKey
323
312
  } : null;
324
313
  const missingProduct = (name) => new StewardConfigError({ message: `steward.${name}: STEWARD_URL (baseUrl) ve STEWARD_API_KEY (apiKey) tanımlı değil; istemci yalnızca admin.* için yapılandırıldı` });
325
- const raw = productTarget !== null ? createBillingClient(clientOptions(productTarget)) : rejectAll(createBillingClient(clientOptions({
314
+ const raw = createBillingClient(clientOptions(productTarget ?? {
326
315
  baseUrl: "http://steward.invalid",
327
316
  apiKey: "-"
328
- })), (name) => missingProduct(`raw.${name}`));
317
+ }));
329
318
  const eitherTarget = productTarget ?? adminTarget;
330
319
  const eitherClient = productTarget !== null ? raw : adminClient;
331
320
  function requireAdmin() {
@@ -495,8 +484,6 @@ function createSteward(options = {}) {
495
484
  return result.state;
496
485
  },
497
486
  readState: (ref, opts = {}) => read(() => raw.getAccountState(ref, opts.etag !== void 0 ? { etag: opts.etag } : {})),
498
- entitlements: (ref) => read(() => raw.getEntitlements(ref)),
499
- putBillingProfile: (ref, profile, call) => run("PUT", call, (c) => raw.putBillingProfile(ref, profile, c)),
500
487
  setPlan: (ref, input, call) => run("PUT", call, (c) => raw.setPlan(ref, input, c)),
501
488
  resync: (ref, call) => run("POST", call, (c) => raw.resync(ref, c)),
502
489
  delete: (ref, call) => run("DELETE", call, (c) => raw.deleteAccount(ref, c))
@@ -523,10 +510,6 @@ function createSteward(options = {}) {
523
510
  get: () => read(() => raw.getCatalog()),
524
511
  read: (opts = {}) => read(() => readCatalog(opts.etag))
525
512
  },
526
- events: {
527
- list: (query = {}) => read(() => raw.listEvents(query)),
528
- redeliver: (id, call) => run("POST", call, (c) => raw.redeliverEvent(id, c))
529
- },
530
513
  stats: () => read(() => raw.getStats())
531
514
  };
532
515
  return {
@@ -570,9 +553,8 @@ function createSteward(options = {}) {
570
553
  return run("POST", call, (c) => client.deactivateWebhookEndpoint(id, c));
571
554
  }
572
555
  }
573
- },
574
- raw
556
+ }
575
557
  };
576
558
  }
577
559
  //#endregion
578
- export { createBillingClient as n, parseRetryAfter as r, createSteward as t };
560
+ export { createSteward as t };
@@ -1,4 +1,4 @@
1
- import { $ as DEFAULT_CHECKOUT_TTL_MINUTES, $n as CheckoutPrefillSchema, $r as IdSchema, $t as EventRecord, A as hostedReadinessOf, An as CancelSubscriptionInput, Ar as PlanDef, At as ResolvedEntitlements, B as WebhookEndpointRotateInput, Bn as Subscription, Br as Currency, Bt as AccountDetailSchema, C as DoctorUnsellablePriceSchema, Cn as MANUAL_INVOICE_MAX_AMOUNT_MINOR, Cr as CatalogSyncInput, Ct as PlanSetWarningSchema, D as DoctorWarningSchema, Dn as ManualInvoiceLineInputSchema, Dr as FeatureDef, Dt as EntitlementRulesGrant, E as DoctorWarningCode, En as ManualInvoiceLineInput, Er as CatalogSyncResultSchema, Et as EntitlementRulesCatalog, F as WebhookEndpoint, Fn as GrantSchema, Fr as PriceSchema, Ft as ErrorCode, G as WebhookLastDelivery, Gn as PortalSessionCreateInputSchema, Gr as EntitlementValueSchema, Gt as CancelSubscriptionResponse, H as WebhookEndpointSchema, Hn as PORTAL_SESSION_ERRORS, Hr as DateTimeSchema, Ht as AccountUpsertResponseSchema, I as WebhookEndpointCreateInput, In as Payment, Ir as API_VERSION, It as ErrorCodeSpec, J as generateWebhookSecret, Jn as CHECKOUT_ERRORS, Jr as ErrorCategory, Jt as CheckoutSessionResponseSchema, K as WebhookLastDeliverySchema, Kn as PortalSessionError, Kr as Entitlements, Kt as CancelSubscriptionResponseSchema, L as WebhookEndpointCreateInputSchema, Ln as PaymentSchema, Lr as ActorRefSchema, Lt as errorCodeSpec, M as EventTypeSchema, Mn as Grant, Mr as Price, Mt as isLiveSubscriptionStatus, N as WEBHOOK_ENDPOINT_STATUSES, Nn as GrantCreateInput, Nr as PriceDef, Nt as resolveEntitlements, O as buildDoctorReport, On as manualInvoiceTotals, Or as FeatureDefSchema, Ot as LIVE_SUBSCRIPTION_STATUSES, P as WEBHOOK_SECRET_PREFIX, Pn as GrantCreateInputSchema, Pr as PriceDefSchema, Pt as ERROR_CODES, Q as BrandingSchema, Qn as CheckoutPrefill, Qr as ExternalRefSchema, Qt as EventListSchema, R as WebhookEndpointList, Rn as Stats, Rr as AmountMinorSchema, Rt as isKnownErrorCode, S as DoctorUnsellablePrice, Sn as InvoiceVoidInputSchema, Sr as CatalogSchema, St as PlanSetWarningCode, T as DoctorWarning, Tn as ManualInvoiceInputSchema, Tr as CatalogSyncResult, Tt as ResyncResultSchema, U as WebhookEndpointStatus, Un as PortalSession, Ur as ERROR_CATEGORIES, Ut as BillingProfileResponse, V as WebhookEndpointRotateInputSchema, Vn as SubscriptionSchema, Vr as CurrencySchema, Vt as AccountUpsertResponse, W as WebhookEndpointStatusSchema, Wn as PortalSessionCreateInput, Wr as EntitlementValue, Wt as BillingProfileResponseSchema, X as Branding, Xn as CheckoutConsentInputSchema, Xr as ErrorResponse, Xt as DeliverySchema, Y as webhookEndpointUrlProblem, Yn as CheckoutConsentInput, Yr as ErrorCategorySchema, Yt as Delivery, Z as BrandingPatchSchema, Zn as CheckoutError, Zr as ErrorResponseSchema, Zt as EventList, _ as DoctorReportSchema, _n as InvoiceLine, _r as checkoutRedirectUrl, _t as PlanSetMode, a as DOCTOR_SEVERITIES, an as HEADER_IDEMPOTENCY_KEY, ar as CheckoutSessionCreateParsed, at as ReturnOriginSchema, b as DoctorSeverity, bn as InvoiceStatusSchema, br as AccountsRefreshResultSchema, bt as PlanSetResponseSchema, c as DoctorEndpoint, cn as InvoiceIssueResponse, cr as CheckoutSessionSchema, ct as SettingsLocaleSchema, d as DoctorFacts, dn as InvoiceVoidResponseSchema, dr as Consent, dt as applySettingsPatch, ei as Interval, en as EventRecordSchema, er as CheckoutRedirectTarget, et as DEFAULT_PORTAL_TTL_MINUTES, f as DoctorHosted, fn as ManualInvoiceResponse, fr as ConsentSchema, ft as isReturnUrlAllowed, g as DoctorReport, gn as InvoiceIssueInputSchema, gr as ProviderPayloadSchema, gt as PlanSetInputSchema, h as DoctorProviderSchema, hn as InvoiceIssueInput, hr as ProviderPayload, ht as PlanSetInput, i as DOCTOR_REQUIRED_LEGAL_LINKS, in as HEADER_API_VERSION, ir as CheckoutSessionCreateInputSchema, it as ProductSettingsSchema, j as DEFAULT_ENDPOINT_EVENT_TYPES, jn as CancelSubscriptionInputSchema, jr as PlanDefSchema, jt as isGrantActive, k as endpointDiagnosisOf, kn as splitInclusiveTax, kr as FeatureTypeSchema, kt as ResolveEntitlementsInput, l as DoctorEndpointDiagnosis, ln as InvoiceIssueResponseSchema, lr as CheckoutStatus, lt as TtlMinutesSchema, m as DoctorProvider, mn as Invoice, mr as MAX_CHECKOUT_CONSENT_DOCS, mt as PLAN_SET_MODES, n as DOCTOR_PROVIDER_ENVIRONMENTS, ni as MetadataSchema, nn as GrantCreateResponseSchema, nr as CheckoutSession, nt as ProductSettingsPatch, o as DoctorCatalog, on as HEADER_REQUEST_ID, or as CheckoutSessionCreated, ot as SETTINGS_LOCALES, p as DoctorHostedSchema, pn as ManualInvoiceResponseSchema, pr as LegacyCheckoutSessionCreateParsed, pt as returnOriginsOf, q as WebhookSecretSchema, qn as PortalSessionSchema, qr as EntitlementsSchema, qt as CheckoutSessionResponse, r as DOCTOR_REQUIRED_BRANDING, rn as HEADER_ACTOR_REF, rr as CheckoutSessionCreateInput, rt as ProductSettingsPatchSchema, s as DoctorCatalogSchema, sn as HEADER_SDK, sr as CheckoutSessionCreatedSchema, st as SettingsLocale, t as DOCTOR_PENDING_BACKLOG_MS, ti as IntervalSchema, tn as GrantCreateResponse, tr as CheckoutReturnStatus, tt as ProductSettings, u as DoctorEndpointSchema, un as InvoiceVoidResponse, ur as CheckoutStatusSchema, ut as WebUrlSchema, v as DoctorSettings, vn as InvoiceLineSchema, vr as isLegacyCheckoutInput, vt as PlanSetModeSchema, w as DoctorUnsellableReason, wn as ManualInvoiceInput, wr as CatalogSyncInputSchema, wt as ResyncResult, x as DoctorSeveritySchema, xn as InvoiceVoidInput, xr as Catalog, xt as PlanSetWarning, y as DoctorSettingsSchema, yn as InvoiceSchema, yr as AccountsRefreshResult, yt as PlanSetResponse, z as WebhookEndpointListSchema, zn as StatsSchema, zr as CodeSchema, zt as AccountDetail } from "./_chunks/index.js";
1
+ import { $ as DEFAULT_CHECKOUT_TTL_MINUTES, $n as CheckoutSessionCreatedSchema, $t as HEADER_SDK, A as hostedReadinessOf, An as Stats, Ar as Currency, At as ResolvedEntitlements, B as WebhookEndpointRotateInput, Bn as CHECKOUT_ERRORS, Br as ErrorResponse, Bt as AccountDetailSchema, C as DoctorUnsellablePriceSchema, Cn as CancelSubscriptionInputSchema, Cr as PriceDef, Ct as PlanSetWarningSchema, D as DoctorWarningSchema, Dn as GrantSchema, Dr as ActorRefSchema, Dt as EntitlementRulesGrant, E as DoctorWarningCode, En as GrantCreateInputSchema, Er as API_VERSION, Et as EntitlementRulesCatalog, F as WebhookEndpoint, Fn as PortalSession, Fr as EntitlementValueSchema, Ft as ErrorCode, G as WebhookLastDelivery, Gn as CheckoutPrefillSchema, Gr as IntervalSchema, Gt as CheckoutSessionResponse, H as WebhookEndpointSchema, Hn as CheckoutConsentInputSchema, Hr as ExternalRefSchema, Ht as AccountUpsertResponseSchema, I as WebhookEndpointCreateInput, In as PortalSessionCreateInput, Ir as Entitlements, It as ErrorCodeSpec, J as generateWebhookSecret, Jn as CheckoutSession, Jt as GrantCreateResponseSchema, K as WebhookLastDeliverySchema, Kn as CheckoutRedirectTarget, Kr as MetadataSchema, Kt as CheckoutSessionResponseSchema, L as WebhookEndpointCreateInputSchema, Ln as PortalSessionCreateInputSchema, Lr as EntitlementsSchema, Lt as errorCodeSpec, M as EventTypeSchema, Mn as Subscription, Mr as DateTimeSchema, Mt as isLiveSubscriptionStatus, N as WEBHOOK_ENDPOINT_STATUSES, Nn as SubscriptionSchema, Nr as ERROR_CATEGORIES, Nt as resolveEntitlements, O as buildDoctorReport, On as Payment, Or as AmountMinorSchema, Ot as LIVE_SUBSCRIPTION_STATUSES, P as WEBHOOK_SECRET_PREFIX, Pn as PORTAL_SESSION_ERRORS, Pr as EntitlementValue, Pt as ERROR_CODES, Q as BrandingSchema, Qn as CheckoutSessionCreated, Qt as HEADER_REQUEST_ID, R as WebhookEndpointList, Rn as PortalSessionError, Rr as ErrorCategory, Rt as isKnownErrorCode, S as DoctorUnsellablePrice, Sn as CancelSubscriptionInput, Sr as Price, St as PlanSetWarningCode, T as DoctorWarning, Tn as GrantCreateInput, Tr as PriceSchema, Tt as ResyncResultSchema, U as WebhookEndpointStatus, Un as CheckoutError, Ur as IdSchema, Ut as CancelSubscriptionResponse, V as WebhookEndpointRotateInputSchema, Vn as CheckoutConsentInput, Vr as ErrorResponseSchema, Vt as AccountUpsertResponse, W as WebhookEndpointStatusSchema, Wn as CheckoutPrefill, Wr as Interval, Wt as CancelSubscriptionResponseSchema, X as Branding, Xn as CheckoutSessionCreateInputSchema, Xt as HEADER_API_VERSION, Y as webhookEndpointUrlProblem, Yn as CheckoutSessionCreateInput, Yt as HEADER_ACTOR_REF, Z as BrandingPatchSchema, Zn as CheckoutSessionCreateParsed, Zt as HEADER_IDEMPOTENCY_KEY, _ as DoctorReportSchema, _n as ManualInvoiceInputSchema, _r as FeatureDef, _t as PlanSetMode, a as DOCTOR_SEVERITIES, an as ManualInvoiceResponseSchema, ar as MAX_CHECKOUT_CONSENT_DOCS, at as ReturnOriginSchema, b as DoctorSeverity, bn as manualInvoiceTotals, br as PlanDef, bt as PlanSetResponseSchema, c as DoctorEndpoint, cn as InvoiceIssueInputSchema, cr as checkoutRedirectUrl, ct as SettingsLocaleSchema, d as DoctorFacts, dn as InvoiceSchema, dr as Catalog, dt as applySettingsPatch, en as InvoiceIssueResponse, er as CheckoutSessionSchema, et as DEFAULT_PORTAL_TTL_MINUTES, f as DoctorHosted, fn as InvoiceStatusSchema, fr as CatalogSchema, ft as isReturnUrlAllowed, g as DoctorReport, gn as ManualInvoiceInput, gr as CatalogSyncResultSchema, gt as PlanSetInputSchema, h as DoctorProviderSchema, hn as MANUAL_INVOICE_MAX_AMOUNT_MINOR, hr as CatalogSyncResult, ht as PlanSetInput, i as DOCTOR_REQUIRED_LEGAL_LINKS, in as ManualInvoiceResponse, ir as ConsentSchema, it as ProductSettingsSchema, j as DEFAULT_ENDPOINT_EVENT_TYPES, jn as StatsSchema, jr as CurrencySchema, jt as isGrantActive, k as endpointDiagnosisOf, kn as PaymentSchema, kr as CodeSchema, kt as ResolveEntitlementsInput, l as DoctorEndpointDiagnosis, ln as InvoiceLine, lr as AccountsRefreshResult, lt as TtlMinutesSchema, m as DoctorProvider, mn as InvoiceVoidInputSchema, mr as CatalogSyncInputSchema, mt as PLAN_SET_MODES, n as DOCTOR_PROVIDER_ENVIRONMENTS, nn as InvoiceVoidResponse, nr as CheckoutStatusSchema, nt as ProductSettingsPatch, o as DoctorCatalog, on as Invoice, or as ProviderPayload, ot as SETTINGS_LOCALES, p as DoctorHostedSchema, pn as InvoiceVoidInput, pr as CatalogSyncInput, pt as returnOriginsOf, q as WebhookSecretSchema, qn as CheckoutReturnStatus, qt as GrantCreateResponse, r as DOCTOR_REQUIRED_BRANDING, rn as InvoiceVoidResponseSchema, rr as Consent, rt as ProductSettingsPatchSchema, s as DoctorCatalogSchema, sn as InvoiceIssueInput, sr as ProviderPayloadSchema, st as SettingsLocale, t as DOCTOR_PENDING_BACKLOG_MS, tn as InvoiceIssueResponseSchema, tr as CheckoutStatus, tt as ProductSettings, u as DoctorEndpointSchema, un as InvoiceLineSchema, ur as AccountsRefreshResultSchema, ut as WebUrlSchema, v as DoctorSettings, vn as ManualInvoiceLineInput, vr as FeatureDefSchema, vt as PlanSetModeSchema, w as DoctorUnsellableReason, wn as Grant, wr as PriceDefSchema, wt as ResyncResult, x as DoctorSeveritySchema, xn as splitInclusiveTax, xr as PlanDefSchema, xt as PlanSetWarning, y as DoctorSettingsSchema, yn as ManualInvoiceLineInputSchema, yr as FeatureTypeSchema, yt as PlanSetResponse, z as WebhookEndpointListSchema, zn as PortalSessionSchema, zr as ErrorCategorySchema, zt as AccountDetail } from "./_chunks/index.js";
2
2
  import { A as AccountProfileState, B as AccountUpsertInputSchema, C as AccountDeleteResponse, D as AccountInclude, E as AccountDunningStateSchema, F as AccountState, G as EntitlementSnapshot, H as BillingProfileInput, I as AccountStateSchema, J as SubscriptionStatusSchema, K as EntitlementSnapshotSchema, L as AccountSubscriptionState, M as AccountScheduledChange, N as AccountScheduledChangeSchema, O as AccountOpenCheckout, P as AccountSchema, R as AccountSubscriptionStateSchema, S as Account, T as AccountDunningState, U as BillingProfileKindSchema, V as BillingProfile, W as BillingProfileSchema, X as SubscriptionSummarySchema, Y as SubscriptionSummary, _ as PingSchema, a as BillingEvent, b as AccessState, c as EVENT_DETAIL_SCHEMAS, d as EventIdSchema, f as EventType, g as Ping, h as PING_EVENT_TYPE, i as ApiVersionSchema, j as AccountProfileStateSchema, k as AccountOpenCheckoutSchema, l as EVENT_TYPES, m as LegacyEventType, n as AnyBillingEvent, o as BillingEventOf, p as LEGACY_EVENT_TYPES, q as SubscriptionStatus, r as AnyBillingEventSchema, s as BillingEventSchema, t as AccountStateChangeCause, u as EventDetail, v as isEventType, w as AccountDeleteResponseSchema, x as AccessStateSchema, y as ACCOUNT_INCLUDES, z as AccountUpsertInput } from "./_chunks/events.js";
3
3
  import { n as isValidTckn, r as isValidVkn, t as isE164 } from "./_chunks/validators.js";
4
- export { ACCOUNT_INCLUDES, API_VERSION, AccessState, AccessStateSchema, Account, AccountDeleteResponse, AccountDeleteResponseSchema, AccountDetail, AccountDetailSchema, AccountDunningState, AccountDunningStateSchema, AccountInclude, AccountOpenCheckout, AccountOpenCheckoutSchema, AccountProfileState, AccountProfileStateSchema, AccountScheduledChange, AccountScheduledChangeSchema, AccountSchema, AccountState, AccountStateChangeCause, AccountStateSchema, AccountSubscriptionState, AccountSubscriptionStateSchema, AccountUpsertInput, AccountUpsertInputSchema, AccountUpsertResponse, AccountUpsertResponseSchema, AccountsRefreshResult, AccountsRefreshResultSchema, ActorRefSchema, AmountMinorSchema, AnyBillingEvent, AnyBillingEventSchema, ApiVersionSchema, BillingEvent, BillingEventOf, BillingEventSchema, BillingProfile, BillingProfileInput, BillingProfileKindSchema, BillingProfileResponse, BillingProfileResponseSchema, BillingProfileSchema, Branding, BrandingPatchSchema, BrandingSchema, CHECKOUT_ERRORS, CancelSubscriptionInput, CancelSubscriptionInputSchema, CancelSubscriptionResponse, CancelSubscriptionResponseSchema, Catalog, CatalogSchema, CatalogSyncInput, CatalogSyncInputSchema, CatalogSyncResult, CatalogSyncResultSchema, CheckoutConsentInput, CheckoutConsentInputSchema, CheckoutError, CheckoutPrefill, CheckoutPrefillSchema, CheckoutRedirectTarget, CheckoutReturnStatus, CheckoutSession, CheckoutSessionCreateInput, CheckoutSessionCreateInputSchema, CheckoutSessionCreateParsed, CheckoutSessionCreated, CheckoutSessionCreatedSchema, CheckoutSessionResponse, CheckoutSessionResponseSchema, CheckoutSessionSchema, CheckoutStatus, CheckoutStatusSchema, CodeSchema, Consent, ConsentSchema, Currency, CurrencySchema, DEFAULT_CHECKOUT_TTL_MINUTES, DEFAULT_ENDPOINT_EVENT_TYPES, DEFAULT_PORTAL_TTL_MINUTES, DOCTOR_PENDING_BACKLOG_MS, DOCTOR_PROVIDER_ENVIRONMENTS, DOCTOR_REQUIRED_BRANDING, DOCTOR_REQUIRED_LEGAL_LINKS, DOCTOR_SEVERITIES, DateTimeSchema, Delivery, DeliverySchema, DoctorCatalog, DoctorCatalogSchema, DoctorEndpoint, DoctorEndpointDiagnosis, DoctorEndpointSchema, DoctorFacts, DoctorHosted, DoctorHostedSchema, DoctorProvider, DoctorProviderSchema, DoctorReport, DoctorReportSchema, DoctorSettings, DoctorSettingsSchema, DoctorSeverity, DoctorSeveritySchema, DoctorUnsellablePrice, DoctorUnsellablePriceSchema, DoctorUnsellableReason, DoctorWarning, DoctorWarningCode, DoctorWarningSchema, ERROR_CATEGORIES, ERROR_CODES, EVENT_DETAIL_SCHEMAS, EVENT_TYPES, EntitlementRulesCatalog, EntitlementRulesGrant, EntitlementSnapshot, EntitlementSnapshotSchema, EntitlementValue, EntitlementValueSchema, Entitlements, EntitlementsSchema, ErrorCategory, ErrorCategorySchema, ErrorCode, ErrorCodeSpec, ErrorResponse, ErrorResponseSchema, EventDetail, EventIdSchema, EventList, EventListSchema, EventRecord, EventRecordSchema, EventType, EventTypeSchema, ExternalRefSchema, FeatureDef, FeatureDefSchema, FeatureTypeSchema, Grant, GrantCreateInput, GrantCreateInputSchema, GrantCreateResponse, GrantCreateResponseSchema, GrantSchema, HEADER_ACTOR_REF, HEADER_API_VERSION, HEADER_IDEMPOTENCY_KEY, HEADER_REQUEST_ID, HEADER_SDK, IdSchema, Interval, IntervalSchema, Invoice, InvoiceIssueInput, InvoiceIssueInputSchema, InvoiceIssueResponse, InvoiceIssueResponseSchema, InvoiceLine, InvoiceLineSchema, InvoiceSchema, InvoiceStatusSchema, InvoiceVoidInput, InvoiceVoidInputSchema, InvoiceVoidResponse, InvoiceVoidResponseSchema, LEGACY_EVENT_TYPES, LIVE_SUBSCRIPTION_STATUSES, LegacyCheckoutSessionCreateParsed, LegacyEventType, MANUAL_INVOICE_MAX_AMOUNT_MINOR, MAX_CHECKOUT_CONSENT_DOCS, ManualInvoiceInput, ManualInvoiceInputSchema, ManualInvoiceLineInput, ManualInvoiceLineInputSchema, ManualInvoiceResponse, ManualInvoiceResponseSchema, MetadataSchema, PING_EVENT_TYPE, PLAN_SET_MODES, PORTAL_SESSION_ERRORS, Payment, PaymentSchema, Ping, PingSchema, PlanDef, PlanDefSchema, PlanSetInput, PlanSetInputSchema, PlanSetMode, PlanSetModeSchema, PlanSetResponse, PlanSetResponseSchema, PlanSetWarning, PlanSetWarningCode, PlanSetWarningSchema, PortalSession, PortalSessionCreateInput, PortalSessionCreateInputSchema, PortalSessionError, PortalSessionSchema, Price, PriceDef, PriceDefSchema, PriceSchema, ProductSettings, ProductSettingsPatch, ProductSettingsPatchSchema, ProductSettingsSchema, ProviderPayload, ProviderPayloadSchema, ResolveEntitlementsInput, ResolvedEntitlements, ResyncResult, ResyncResultSchema, ReturnOriginSchema, SETTINGS_LOCALES, SettingsLocale, SettingsLocaleSchema, Stats, StatsSchema, Subscription, SubscriptionSchema, SubscriptionStatus, SubscriptionStatusSchema, SubscriptionSummary, SubscriptionSummarySchema, TtlMinutesSchema, WEBHOOK_ENDPOINT_STATUSES, WEBHOOK_SECRET_PREFIX, WebUrlSchema, WebhookEndpoint, WebhookEndpointCreateInput, WebhookEndpointCreateInputSchema, WebhookEndpointList, WebhookEndpointListSchema, WebhookEndpointRotateInput, WebhookEndpointRotateInputSchema, WebhookEndpointSchema, WebhookEndpointStatus, WebhookEndpointStatusSchema, WebhookLastDelivery, WebhookLastDeliverySchema, WebhookSecretSchema, applySettingsPatch, buildDoctorReport, checkoutRedirectUrl, endpointDiagnosisOf, errorCodeSpec, generateWebhookSecret, hostedReadinessOf, isE164, isEventType, isGrantActive, isKnownErrorCode, isLegacyCheckoutInput, isLiveSubscriptionStatus, isReturnUrlAllowed, isValidTckn, isValidVkn, manualInvoiceTotals, resolveEntitlements, returnOriginsOf, splitInclusiveTax, webhookEndpointUrlProblem };
4
+ export { ACCOUNT_INCLUDES, API_VERSION, AccessState, AccessStateSchema, Account, AccountDeleteResponse, AccountDeleteResponseSchema, AccountDetail, AccountDetailSchema, AccountDunningState, AccountDunningStateSchema, AccountInclude, AccountOpenCheckout, AccountOpenCheckoutSchema, AccountProfileState, AccountProfileStateSchema, AccountScheduledChange, AccountScheduledChangeSchema, AccountSchema, AccountState, AccountStateChangeCause, AccountStateSchema, AccountSubscriptionState, AccountSubscriptionStateSchema, AccountUpsertInput, AccountUpsertInputSchema, AccountUpsertResponse, AccountUpsertResponseSchema, AccountsRefreshResult, AccountsRefreshResultSchema, ActorRefSchema, AmountMinorSchema, AnyBillingEvent, AnyBillingEventSchema, ApiVersionSchema, BillingEvent, BillingEventOf, BillingEventSchema, BillingProfile, BillingProfileInput, BillingProfileKindSchema, BillingProfileSchema, Branding, BrandingPatchSchema, BrandingSchema, CHECKOUT_ERRORS, CancelSubscriptionInput, CancelSubscriptionInputSchema, CancelSubscriptionResponse, CancelSubscriptionResponseSchema, Catalog, CatalogSchema, CatalogSyncInput, CatalogSyncInputSchema, CatalogSyncResult, CatalogSyncResultSchema, CheckoutConsentInput, CheckoutConsentInputSchema, CheckoutError, CheckoutPrefill, CheckoutPrefillSchema, CheckoutRedirectTarget, CheckoutReturnStatus, CheckoutSession, CheckoutSessionCreateInput, CheckoutSessionCreateInputSchema, CheckoutSessionCreateParsed, CheckoutSessionCreated, CheckoutSessionCreatedSchema, CheckoutSessionResponse, CheckoutSessionResponseSchema, CheckoutSessionSchema, CheckoutStatus, CheckoutStatusSchema, CodeSchema, Consent, ConsentSchema, Currency, CurrencySchema, DEFAULT_CHECKOUT_TTL_MINUTES, DEFAULT_ENDPOINT_EVENT_TYPES, DEFAULT_PORTAL_TTL_MINUTES, DOCTOR_PENDING_BACKLOG_MS, DOCTOR_PROVIDER_ENVIRONMENTS, DOCTOR_REQUIRED_BRANDING, DOCTOR_REQUIRED_LEGAL_LINKS, DOCTOR_SEVERITIES, DateTimeSchema, DoctorCatalog, DoctorCatalogSchema, DoctorEndpoint, DoctorEndpointDiagnosis, DoctorEndpointSchema, DoctorFacts, DoctorHosted, DoctorHostedSchema, DoctorProvider, DoctorProviderSchema, DoctorReport, DoctorReportSchema, DoctorSettings, DoctorSettingsSchema, DoctorSeverity, DoctorSeveritySchema, DoctorUnsellablePrice, DoctorUnsellablePriceSchema, DoctorUnsellableReason, DoctorWarning, DoctorWarningCode, DoctorWarningSchema, ERROR_CATEGORIES, ERROR_CODES, EVENT_DETAIL_SCHEMAS, EVENT_TYPES, EntitlementRulesCatalog, EntitlementRulesGrant, EntitlementSnapshot, EntitlementSnapshotSchema, EntitlementValue, EntitlementValueSchema, Entitlements, EntitlementsSchema, ErrorCategory, ErrorCategorySchema, ErrorCode, ErrorCodeSpec, ErrorResponse, ErrorResponseSchema, EventDetail, EventIdSchema, EventType, EventTypeSchema, ExternalRefSchema, FeatureDef, FeatureDefSchema, FeatureTypeSchema, Grant, GrantCreateInput, GrantCreateInputSchema, GrantCreateResponse, GrantCreateResponseSchema, GrantSchema, HEADER_ACTOR_REF, HEADER_API_VERSION, HEADER_IDEMPOTENCY_KEY, HEADER_REQUEST_ID, HEADER_SDK, IdSchema, Interval, IntervalSchema, Invoice, InvoiceIssueInput, InvoiceIssueInputSchema, InvoiceIssueResponse, InvoiceIssueResponseSchema, InvoiceLine, InvoiceLineSchema, InvoiceSchema, InvoiceStatusSchema, InvoiceVoidInput, InvoiceVoidInputSchema, InvoiceVoidResponse, InvoiceVoidResponseSchema, LEGACY_EVENT_TYPES, LIVE_SUBSCRIPTION_STATUSES, LegacyEventType, MANUAL_INVOICE_MAX_AMOUNT_MINOR, MAX_CHECKOUT_CONSENT_DOCS, ManualInvoiceInput, ManualInvoiceInputSchema, ManualInvoiceLineInput, ManualInvoiceLineInputSchema, ManualInvoiceResponse, ManualInvoiceResponseSchema, MetadataSchema, PING_EVENT_TYPE, PLAN_SET_MODES, PORTAL_SESSION_ERRORS, Payment, PaymentSchema, Ping, PingSchema, PlanDef, PlanDefSchema, PlanSetInput, PlanSetInputSchema, PlanSetMode, PlanSetModeSchema, PlanSetResponse, PlanSetResponseSchema, PlanSetWarning, PlanSetWarningCode, PlanSetWarningSchema, PortalSession, PortalSessionCreateInput, PortalSessionCreateInputSchema, PortalSessionError, PortalSessionSchema, Price, PriceDef, PriceDefSchema, PriceSchema, ProductSettings, ProductSettingsPatch, ProductSettingsPatchSchema, ProductSettingsSchema, ProviderPayload, ProviderPayloadSchema, ResolveEntitlementsInput, ResolvedEntitlements, ResyncResult, ResyncResultSchema, ReturnOriginSchema, SETTINGS_LOCALES, SettingsLocale, SettingsLocaleSchema, Stats, StatsSchema, Subscription, SubscriptionSchema, SubscriptionStatus, SubscriptionStatusSchema, SubscriptionSummary, SubscriptionSummarySchema, TtlMinutesSchema, WEBHOOK_ENDPOINT_STATUSES, WEBHOOK_SECRET_PREFIX, WebUrlSchema, WebhookEndpoint, WebhookEndpointCreateInput, WebhookEndpointCreateInputSchema, WebhookEndpointList, WebhookEndpointListSchema, WebhookEndpointRotateInput, WebhookEndpointRotateInputSchema, WebhookEndpointSchema, WebhookEndpointStatus, WebhookEndpointStatusSchema, WebhookLastDelivery, WebhookLastDeliverySchema, WebhookSecretSchema, applySettingsPatch, buildDoctorReport, checkoutRedirectUrl, endpointDiagnosisOf, errorCodeSpec, generateWebhookSecret, hostedReadinessOf, isE164, isEventType, isGrantActive, isKnownErrorCode, isLiveSubscriptionStatus, isReturnUrlAllowed, isValidTckn, isValidVkn, manualInvoiceTotals, resolveEntitlements, returnOriginsOf, splitInclusiveTax, webhookEndpointUrlProblem };
package/dist/contract.js CHANGED
@@ -1,4 +1,4 @@
1
1
  import { A as CodeSchema, B as IntervalSchema, C as BillingProfileSchema, D as API_VERSION, E as SubscriptionSummarySchema, F as EntitlementsSchema, I as ErrorCategorySchema, L as ErrorResponseSchema, M as DateTimeSchema, N as ERROR_CATEGORIES, O as ActorRefSchema, P as EntitlementValueSchema, R as ExternalRefSchema, S as BillingProfileKindSchema, T as SubscriptionStatusSchema, V as MetadataSchema, _ as AccountScheduledChangeSchema, a as EVENT_TYPES, b as AccountSubscriptionStateSchema, c as PING_EVENT_TYPE, d as ACCOUNT_INCLUDES, f as AccessStateSchema, g as AccountProfileStateSchema, h as AccountOpenCheckoutSchema, i as EVENT_DETAIL_SCHEMAS, j as CurrencySchema, k as AmountMinorSchema, l as PingSchema, m as AccountDunningStateSchema, n as ApiVersionSchema, o as EventIdSchema, p as AccountDeleteResponseSchema, r as BillingEventSchema, s as LEGACY_EVENT_TYPES, t as AnyBillingEventSchema, u as isEventType, v as AccountSchema, w as EntitlementSnapshotSchema, x as AccountUpsertInputSchema, y as AccountStateSchema, z as IdSchema } from "./_chunks/events.js";
2
- import { $ as HEADER_SDK, $t as FeatureTypeSchema, A as webhookEndpointUrlProblem, At as MAX_CHECKOUT_CONSENT_DOCS, B as AccountDetailSchema, Bt as ReturnOriginSchema, C as WebhookEndpointListSchema, Ct as CheckoutConsentInputSchema, D as WebhookLastDeliverySchema, Dt as CheckoutSessionSchema, E as WebhookEndpointStatusSchema, Et as CheckoutSessionCreatedSchema, F as PlanSetWarningSchema, Ft as BrandingSchema, G as DeliverySchema, Gt as applySettingsPatch, H as BillingProfileResponseSchema, Ht as SettingsLocaleSchema, I as ResyncResultSchema, It as DEFAULT_CHECKOUT_TTL_MINUTES, J as GrantCreateResponseSchema, Jt as AccountsRefreshResultSchema, K as EventListSchema, Kt as isReturnUrlAllowed, L as ERROR_CODES, Lt as DEFAULT_PORTAL_TTL_MINUTES, M as PlanSetInputSchema, Mt as checkoutRedirectUrl, N as PlanSetModeSchema, Nt as isLegacyCheckoutInput, O as WebhookSecretSchema, Ot as CheckoutStatusSchema, P as PlanSetResponseSchema, Pt as BrandingPatchSchema, Q as HEADER_REQUEST_ID, Qt as FeatureDefSchema, R as errorCodeSpec, Rt as ProductSettingsPatchSchema, S as WebhookEndpointCreateInputSchema, St as CHECKOUT_ERRORS, T as WebhookEndpointSchema, Tt as CheckoutSessionCreateInputSchema, U as CancelSubscriptionResponseSchema, Ut as TtlMinutesSchema, V as AccountUpsertResponseSchema, Vt as SETTINGS_LOCALES, W as CheckoutSessionResponseSchema, Wt as WebUrlSchema, X as HEADER_API_VERSION, Xt as CatalogSyncInputSchema, Y as HEADER_ACTOR_REF, Yt as CatalogSchema, Z as HEADER_IDEMPOTENCY_KEY, Zt as CatalogSyncResultSchema, _ as hostedReadinessOf, _t as StatsSchema, a as DOCTOR_SEVERITIES, at as InvoiceSchema, b as WEBHOOK_ENDPOINT_STATUSES, bt as PortalSessionCreateInputSchema, c as DoctorHostedSchema, ct as MANUAL_INVOICE_MAX_AMOUNT_MINOR, d as DoctorSettingsSchema, dt as manualInvoiceTotals, en as PlanDefSchema, et as InvoiceIssueResponseSchema, f as DoctorSeveritySchema, ft as splitInclusiveTax, g as endpointDiagnosisOf, gt as PaymentSchema, h as buildDoctorReport, ht as GrantSchema, i as DOCTOR_REQUIRED_LEGAL_LINKS, it as InvoiceLineSchema, j as PLAN_SET_MODES, jt as ProviderPayloadSchema, k as generateWebhookSecret, kt as ConsentSchema, l as DoctorProviderSchema, lt as ManualInvoiceInputSchema, m as DoctorWarningSchema, mt as GrantCreateInputSchema, n as DOCTOR_PROVIDER_ENVIRONMENTS, nn as PriceSchema, nt as ManualInvoiceResponseSchema, o as DoctorCatalogSchema, ot as InvoiceStatusSchema, p as DoctorUnsellablePriceSchema, pt as CancelSubscriptionInputSchema, q as EventRecordSchema, qt as returnOriginsOf, r as DOCTOR_REQUIRED_BRANDING, rt as InvoiceIssueInputSchema, s as DoctorEndpointSchema, st as InvoiceVoidInputSchema, t as DOCTOR_PENDING_BACKLOG_MS, tn as PriceDefSchema, tt as InvoiceVoidResponseSchema, u as DoctorReportSchema, ut as ManualInvoiceLineInputSchema, v as DEFAULT_ENDPOINT_EVENT_TYPES, vt as SubscriptionSchema, w as WebhookEndpointRotateInputSchema, wt as CheckoutPrefillSchema, x as WEBHOOK_SECRET_PREFIX, xt as PortalSessionSchema, y as EventTypeSchema, yt as PORTAL_SESSION_ERRORS, z as isKnownErrorCode, zt as ProductSettingsSchema } from "./_chunks/src.js";
2
+ import { $ as InvoiceIssueInputSchema, A as webhookEndpointUrlProblem, At as BrandingSchema, B as AccountDetailSchema, Bt as applySettingsPatch, C as WebhookEndpointListSchema, Ct as CheckoutSessionSchema, D as WebhookLastDeliverySchema, Dt as ProviderPayloadSchema, E as WebhookEndpointStatusSchema, Et as MAX_CHECKOUT_CONSENT_DOCS, F as PlanSetWarningSchema, Ft as ReturnOriginSchema, G as HEADER_ACTOR_REF, Gt as CatalogSyncInputSchema, H as CancelSubscriptionResponseSchema, Ht as returnOriginsOf, I as ResyncResultSchema, It as SETTINGS_LOCALES, J as HEADER_REQUEST_ID, Jt as FeatureTypeSchema, K as HEADER_API_VERSION, Kt as CatalogSyncResultSchema, L as ERROR_CODES, Lt as SettingsLocaleSchema, M as PlanSetInputSchema, Mt as DEFAULT_PORTAL_TTL_MINUTES, N as PlanSetModeSchema, Nt as ProductSettingsPatchSchema, O as WebhookSecretSchema, Ot as checkoutRedirectUrl, P as PlanSetResponseSchema, Pt as ProductSettingsSchema, Q as ManualInvoiceResponseSchema, R as errorCodeSpec, Rt as TtlMinutesSchema, S as WebhookEndpointCreateInputSchema, St as CheckoutSessionCreatedSchema, T as WebhookEndpointSchema, Tt as ConsentSchema, U as CheckoutSessionResponseSchema, Ut as AccountsRefreshResultSchema, V as AccountUpsertResponseSchema, Vt as isReturnUrlAllowed, W as GrantCreateResponseSchema, Wt as CatalogSchema, X as InvoiceIssueResponseSchema, Xt as PriceDefSchema, Y as HEADER_SDK, Yt as PlanDefSchema, Z as InvoiceVoidResponseSchema, Zt as PriceSchema, _ as hostedReadinessOf, _t as PortalSessionSchema, a as DOCTOR_SEVERITIES, at as ManualInvoiceInputSchema, b as WEBHOOK_ENDPOINT_STATUSES, bt as CheckoutPrefillSchema, c as DoctorHostedSchema, ct as splitInclusiveTax, d as DoctorSettingsSchema, dt as GrantSchema, et as InvoiceLineSchema, f as DoctorSeveritySchema, ft as PaymentSchema, g as endpointDiagnosisOf, gt as PortalSessionCreateInputSchema, h as buildDoctorReport, ht as PORTAL_SESSION_ERRORS, i as DOCTOR_REQUIRED_LEGAL_LINKS, it as MANUAL_INVOICE_MAX_AMOUNT_MINOR, j as PLAN_SET_MODES, jt as DEFAULT_CHECKOUT_TTL_MINUTES, k as generateWebhookSecret, kt as BrandingPatchSchema, l as DoctorProviderSchema, lt as CancelSubscriptionInputSchema, m as DoctorWarningSchema, mt as SubscriptionSchema, n as DOCTOR_PROVIDER_ENVIRONMENTS, nt as InvoiceStatusSchema, o as DoctorCatalogSchema, ot as ManualInvoiceLineInputSchema, p as DoctorUnsellablePriceSchema, pt as StatsSchema, q as HEADER_IDEMPOTENCY_KEY, qt as FeatureDefSchema, r as DOCTOR_REQUIRED_BRANDING, rt as InvoiceVoidInputSchema, s as DoctorEndpointSchema, st as manualInvoiceTotals, t as DOCTOR_PENDING_BACKLOG_MS, tt as InvoiceSchema, u as DoctorReportSchema, ut as GrantCreateInputSchema, v as DEFAULT_ENDPOINT_EVENT_TYPES, vt as CHECKOUT_ERRORS, w as WebhookEndpointRotateInputSchema, wt as CheckoutStatusSchema, x as WEBHOOK_SECRET_PREFIX, xt as CheckoutSessionCreateInputSchema, y as EventTypeSchema, yt as CheckoutConsentInputSchema, z as isKnownErrorCode, zt as WebUrlSchema } from "./_chunks/src.js";
3
3
  import { a as isGrantActive, i as LIVE_SUBSCRIPTION_STATUSES, n as isValidTckn, o as isLiveSubscriptionStatus, r as isValidVkn, s as resolveEntitlements, t as isE164 } from "./_chunks/validators.js";
4
- export { ACCOUNT_INCLUDES, API_VERSION, AccessStateSchema, AccountDeleteResponseSchema, AccountDetailSchema, AccountDunningStateSchema, AccountOpenCheckoutSchema, AccountProfileStateSchema, AccountScheduledChangeSchema, AccountSchema, AccountStateSchema, AccountSubscriptionStateSchema, AccountUpsertInputSchema, AccountUpsertResponseSchema, AccountsRefreshResultSchema, ActorRefSchema, AmountMinorSchema, AnyBillingEventSchema, ApiVersionSchema, BillingEventSchema, BillingProfileKindSchema, BillingProfileResponseSchema, BillingProfileSchema, BrandingPatchSchema, BrandingSchema, CHECKOUT_ERRORS, CancelSubscriptionInputSchema, CancelSubscriptionResponseSchema, CatalogSchema, CatalogSyncInputSchema, CatalogSyncResultSchema, CheckoutConsentInputSchema, CheckoutPrefillSchema, CheckoutSessionCreateInputSchema, CheckoutSessionCreatedSchema, CheckoutSessionResponseSchema, CheckoutSessionSchema, CheckoutStatusSchema, CodeSchema, ConsentSchema, CurrencySchema, DEFAULT_CHECKOUT_TTL_MINUTES, DEFAULT_ENDPOINT_EVENT_TYPES, DEFAULT_PORTAL_TTL_MINUTES, DOCTOR_PENDING_BACKLOG_MS, DOCTOR_PROVIDER_ENVIRONMENTS, DOCTOR_REQUIRED_BRANDING, DOCTOR_REQUIRED_LEGAL_LINKS, DOCTOR_SEVERITIES, DateTimeSchema, DeliverySchema, DoctorCatalogSchema, DoctorEndpointSchema, DoctorHostedSchema, DoctorProviderSchema, DoctorReportSchema, DoctorSettingsSchema, DoctorSeveritySchema, DoctorUnsellablePriceSchema, DoctorWarningSchema, ERROR_CATEGORIES, ERROR_CODES, EVENT_DETAIL_SCHEMAS, EVENT_TYPES, EntitlementSnapshotSchema, EntitlementValueSchema, EntitlementsSchema, ErrorCategorySchema, ErrorResponseSchema, EventIdSchema, EventListSchema, EventRecordSchema, EventTypeSchema, ExternalRefSchema, FeatureDefSchema, FeatureTypeSchema, GrantCreateInputSchema, GrantCreateResponseSchema, GrantSchema, HEADER_ACTOR_REF, HEADER_API_VERSION, HEADER_IDEMPOTENCY_KEY, HEADER_REQUEST_ID, HEADER_SDK, IdSchema, IntervalSchema, InvoiceIssueInputSchema, InvoiceIssueResponseSchema, InvoiceLineSchema, InvoiceSchema, InvoiceStatusSchema, InvoiceVoidInputSchema, InvoiceVoidResponseSchema, LEGACY_EVENT_TYPES, LIVE_SUBSCRIPTION_STATUSES, MANUAL_INVOICE_MAX_AMOUNT_MINOR, MAX_CHECKOUT_CONSENT_DOCS, ManualInvoiceInputSchema, ManualInvoiceLineInputSchema, ManualInvoiceResponseSchema, MetadataSchema, PING_EVENT_TYPE, PLAN_SET_MODES, PORTAL_SESSION_ERRORS, PaymentSchema, PingSchema, PlanDefSchema, PlanSetInputSchema, PlanSetModeSchema, PlanSetResponseSchema, PlanSetWarningSchema, PortalSessionCreateInputSchema, PortalSessionSchema, PriceDefSchema, PriceSchema, ProductSettingsPatchSchema, ProductSettingsSchema, ProviderPayloadSchema, ResyncResultSchema, ReturnOriginSchema, SETTINGS_LOCALES, SettingsLocaleSchema, StatsSchema, SubscriptionSchema, SubscriptionStatusSchema, SubscriptionSummarySchema, TtlMinutesSchema, WEBHOOK_ENDPOINT_STATUSES, WEBHOOK_SECRET_PREFIX, WebUrlSchema, WebhookEndpointCreateInputSchema, WebhookEndpointListSchema, WebhookEndpointRotateInputSchema, WebhookEndpointSchema, WebhookEndpointStatusSchema, WebhookLastDeliverySchema, WebhookSecretSchema, applySettingsPatch, buildDoctorReport, checkoutRedirectUrl, endpointDiagnosisOf, errorCodeSpec, generateWebhookSecret, hostedReadinessOf, isE164, isEventType, isGrantActive, isKnownErrorCode, isLegacyCheckoutInput, isLiveSubscriptionStatus, isReturnUrlAllowed, isValidTckn, isValidVkn, manualInvoiceTotals, resolveEntitlements, returnOriginsOf, splitInclusiveTax, webhookEndpointUrlProblem };
4
+ export { ACCOUNT_INCLUDES, API_VERSION, AccessStateSchema, AccountDeleteResponseSchema, AccountDetailSchema, AccountDunningStateSchema, AccountOpenCheckoutSchema, AccountProfileStateSchema, AccountScheduledChangeSchema, AccountSchema, AccountStateSchema, AccountSubscriptionStateSchema, AccountUpsertInputSchema, AccountUpsertResponseSchema, AccountsRefreshResultSchema, ActorRefSchema, AmountMinorSchema, AnyBillingEventSchema, ApiVersionSchema, BillingEventSchema, BillingProfileKindSchema, BillingProfileSchema, BrandingPatchSchema, BrandingSchema, CHECKOUT_ERRORS, CancelSubscriptionInputSchema, CancelSubscriptionResponseSchema, CatalogSchema, CatalogSyncInputSchema, CatalogSyncResultSchema, CheckoutConsentInputSchema, CheckoutPrefillSchema, CheckoutSessionCreateInputSchema, CheckoutSessionCreatedSchema, CheckoutSessionResponseSchema, CheckoutSessionSchema, CheckoutStatusSchema, CodeSchema, ConsentSchema, CurrencySchema, DEFAULT_CHECKOUT_TTL_MINUTES, DEFAULT_ENDPOINT_EVENT_TYPES, DEFAULT_PORTAL_TTL_MINUTES, DOCTOR_PENDING_BACKLOG_MS, DOCTOR_PROVIDER_ENVIRONMENTS, DOCTOR_REQUIRED_BRANDING, DOCTOR_REQUIRED_LEGAL_LINKS, DOCTOR_SEVERITIES, DateTimeSchema, DoctorCatalogSchema, DoctorEndpointSchema, DoctorHostedSchema, DoctorProviderSchema, DoctorReportSchema, DoctorSettingsSchema, DoctorSeveritySchema, DoctorUnsellablePriceSchema, DoctorWarningSchema, ERROR_CATEGORIES, ERROR_CODES, EVENT_DETAIL_SCHEMAS, EVENT_TYPES, EntitlementSnapshotSchema, EntitlementValueSchema, EntitlementsSchema, ErrorCategorySchema, ErrorResponseSchema, EventIdSchema, EventTypeSchema, ExternalRefSchema, FeatureDefSchema, FeatureTypeSchema, GrantCreateInputSchema, GrantCreateResponseSchema, GrantSchema, HEADER_ACTOR_REF, HEADER_API_VERSION, HEADER_IDEMPOTENCY_KEY, HEADER_REQUEST_ID, HEADER_SDK, IdSchema, IntervalSchema, InvoiceIssueInputSchema, InvoiceIssueResponseSchema, InvoiceLineSchema, InvoiceSchema, InvoiceStatusSchema, InvoiceVoidInputSchema, InvoiceVoidResponseSchema, LEGACY_EVENT_TYPES, LIVE_SUBSCRIPTION_STATUSES, MANUAL_INVOICE_MAX_AMOUNT_MINOR, MAX_CHECKOUT_CONSENT_DOCS, ManualInvoiceInputSchema, ManualInvoiceLineInputSchema, ManualInvoiceResponseSchema, MetadataSchema, PING_EVENT_TYPE, PLAN_SET_MODES, PORTAL_SESSION_ERRORS, PaymentSchema, PingSchema, PlanDefSchema, PlanSetInputSchema, PlanSetModeSchema, PlanSetResponseSchema, PlanSetWarningSchema, PortalSessionCreateInputSchema, PortalSessionSchema, PriceDefSchema, PriceSchema, ProductSettingsPatchSchema, ProductSettingsSchema, ProviderPayloadSchema, ResyncResultSchema, ReturnOriginSchema, SETTINGS_LOCALES, SettingsLocaleSchema, StatsSchema, SubscriptionSchema, SubscriptionStatusSchema, SubscriptionSummarySchema, TtlMinutesSchema, WEBHOOK_ENDPOINT_STATUSES, WEBHOOK_SECRET_PREFIX, WebUrlSchema, WebhookEndpointCreateInputSchema, WebhookEndpointListSchema, WebhookEndpointRotateInputSchema, WebhookEndpointSchema, WebhookEndpointStatusSchema, WebhookLastDeliverySchema, WebhookSecretSchema, applySettingsPatch, buildDoctorReport, checkoutRedirectUrl, endpointDiagnosisOf, errorCodeSpec, generateWebhookSecret, hostedReadinessOf, isE164, isEventType, isGrantActive, isKnownErrorCode, isLiveSubscriptionStatus, isReturnUrlAllowed, isValidTckn, isValidVkn, manualInvoiceTotals, resolveEntitlements, returnOriginsOf, splitInclusiveTax, webhookEndpointUrlProblem };
package/dist/index.d.ts CHANGED
@@ -1,22 +1,8 @@
1
- import { $ as DEFAULT_CHECKOUT_TTL_MINUTES, $n as CheckoutPrefillSchema, $r as IdSchema, $t as EventRecord, A as hostedReadinessOf, An as CancelSubscriptionInput, Ar as PlanDef, At as ResolvedEntitlements, B as WebhookEndpointRotateInput, Bn as Subscription, Br as Currency, Bt as AccountDetailSchema, C as DoctorUnsellablePriceSchema, Cn as MANUAL_INVOICE_MAX_AMOUNT_MINOR, Cr as CatalogSyncInput, Ct as PlanSetWarningSchema, D as DoctorWarningSchema, Dn as ManualInvoiceLineInputSchema, Dr as FeatureDef, Dt as EntitlementRulesGrant, E as DoctorWarningCode, En as ManualInvoiceLineInput, Er as CatalogSyncResultSchema, Et as EntitlementRulesCatalog, F as WebhookEndpoint, Fn as GrantSchema, Fr as PriceSchema, Ft as ErrorCode, G as WebhookLastDelivery, Gn as PortalSessionCreateInputSchema, Gr as EntitlementValueSchema, Gt as CancelSubscriptionResponse, H as WebhookEndpointSchema, Hn as PORTAL_SESSION_ERRORS, Hr as DateTimeSchema, Ht as AccountUpsertResponseSchema, I as WebhookEndpointCreateInput, In as Payment, Ir as API_VERSION, It as ErrorCodeSpec, J as generateWebhookSecret, Jn as CHECKOUT_ERRORS, Jr as ErrorCategory, Jt as CheckoutSessionResponseSchema, K as WebhookLastDeliverySchema, Kn as PortalSessionError, Kr as Entitlements, Kt as CancelSubscriptionResponseSchema, L as WebhookEndpointCreateInputSchema, Ln as PaymentSchema, Lr as ActorRefSchema, Lt as errorCodeSpec, M as EventTypeSchema, Mn as Grant, Mr as Price, Mt as isLiveSubscriptionStatus, N as WEBHOOK_ENDPOINT_STATUSES, Nn as GrantCreateInput, Nr as PriceDef, Nt as resolveEntitlements, O as buildDoctorReport, On as manualInvoiceTotals, Or as FeatureDefSchema, Ot as LIVE_SUBSCRIPTION_STATUSES, P as WEBHOOK_SECRET_PREFIX, Pn as GrantCreateInputSchema, Pr as PriceDefSchema, Pt as ERROR_CODES, Q as BrandingSchema, Qn as CheckoutPrefill, Qr as ExternalRefSchema, Qt as EventListSchema, R as WebhookEndpointList, Rn as Stats, Rr as AmountMinorSchema, Rt as isKnownErrorCode, S as DoctorUnsellablePrice, Sn as InvoiceVoidInputSchema, Sr as CatalogSchema, St as PlanSetWarningCode, T as DoctorWarning, Tn as ManualInvoiceInputSchema, Tr as CatalogSyncResult, Tt as ResyncResultSchema, U as WebhookEndpointStatus, Un as PortalSession, Ur as ERROR_CATEGORIES, Ut as BillingProfileResponse, V as WebhookEndpointRotateInputSchema, Vn as SubscriptionSchema, Vr as CurrencySchema, Vt as AccountUpsertResponse, W as WebhookEndpointStatusSchema, Wn as PortalSessionCreateInput, Wr as EntitlementValue, Wt as BillingProfileResponseSchema, X as Branding, Xn as CheckoutConsentInputSchema, Xr as ErrorResponse, Xt as DeliverySchema, Y as webhookEndpointUrlProblem, Yn as CheckoutConsentInput, Yr as ErrorCategorySchema, Yt as Delivery, Z as BrandingPatchSchema, Zn as CheckoutError, Zr as ErrorResponseSchema, Zt as EventList, _ as DoctorReportSchema, _n as InvoiceLine, _r as checkoutRedirectUrl, _t as PlanSetMode, a as DOCTOR_SEVERITIES, an as HEADER_IDEMPOTENCY_KEY, ar as CheckoutSessionCreateParsed, at as ReturnOriginSchema, b as DoctorSeverity, bn as InvoiceStatusSchema, br as AccountsRefreshResultSchema, bt as PlanSetResponseSchema, c as DoctorEndpoint, cn as InvoiceIssueResponse, cr as CheckoutSessionSchema, ct as SettingsLocaleSchema, d as DoctorFacts, dn as InvoiceVoidResponseSchema, dr as Consent, dt as applySettingsPatch, ei as Interval, en as EventRecordSchema, er as CheckoutRedirectTarget, et as DEFAULT_PORTAL_TTL_MINUTES, f as DoctorHosted, fn as ManualInvoiceResponse, fr as ConsentSchema, ft as isReturnUrlAllowed, g as DoctorReport, gn as InvoiceIssueInputSchema, gr as ProviderPayloadSchema, gt as PlanSetInputSchema, h as DoctorProviderSchema, hn as InvoiceIssueInput, hr as ProviderPayload, ht as PlanSetInput, i as DOCTOR_REQUIRED_LEGAL_LINKS, in as HEADER_API_VERSION, ir as CheckoutSessionCreateInputSchema, it as ProductSettingsSchema, j as DEFAULT_ENDPOINT_EVENT_TYPES, jn as CancelSubscriptionInputSchema, jr as PlanDefSchema, jt as isGrantActive, k as endpointDiagnosisOf, kn as splitInclusiveTax, kr as FeatureTypeSchema, kt as ResolveEntitlementsInput, l as DoctorEndpointDiagnosis, ln as InvoiceIssueResponseSchema, lr as CheckoutStatus, lt as TtlMinutesSchema, m as DoctorProvider, mn as Invoice, mr as MAX_CHECKOUT_CONSENT_DOCS, mt as PLAN_SET_MODES, n as DOCTOR_PROVIDER_ENVIRONMENTS, ni as MetadataSchema, nn as GrantCreateResponseSchema, nr as CheckoutSession, nt as ProductSettingsPatch, o as DoctorCatalog, on as HEADER_REQUEST_ID, or as CheckoutSessionCreated, ot as SETTINGS_LOCALES, p as DoctorHostedSchema, pn as ManualInvoiceResponseSchema, pr as LegacyCheckoutSessionCreateParsed, pt as returnOriginsOf, q as WebhookSecretSchema, qn as PortalSessionSchema, qr as EntitlementsSchema, qt as CheckoutSessionResponse, r as DOCTOR_REQUIRED_BRANDING, rn as HEADER_ACTOR_REF, rr as CheckoutSessionCreateInput, rt as ProductSettingsPatchSchema, s as DoctorCatalogSchema, sn as HEADER_SDK, sr as CheckoutSessionCreatedSchema, st as SettingsLocale, t as DOCTOR_PENDING_BACKLOG_MS, ti as IntervalSchema, tn as GrantCreateResponse, tr as CheckoutReturnStatus, tt as ProductSettings, u as DoctorEndpointSchema, un as InvoiceVoidResponse, ur as CheckoutStatusSchema, ut as WebUrlSchema, v as DoctorSettings, vn as InvoiceLineSchema, vr as isLegacyCheckoutInput, vt as PlanSetModeSchema, w as DoctorUnsellableReason, wn as ManualInvoiceInput, wr as CatalogSyncInputSchema, wt as ResyncResult, x as DoctorSeveritySchema, xn as InvoiceVoidInput, xr as Catalog, xt as PlanSetWarning, y as DoctorSettingsSchema, yn as InvoiceSchema, yr as AccountsRefreshResult, yt as PlanSetResponse, z as WebhookEndpointListSchema, zn as StatsSchema, zr as CodeSchema, zt as AccountDetail } from "./_chunks/index.js";
1
+ import { $ as DEFAULT_CHECKOUT_TTL_MINUTES, $n as CheckoutSessionCreatedSchema, $t as HEADER_SDK, A as hostedReadinessOf, An as Stats, Ar as Currency, At as ResolvedEntitlements, B as WebhookEndpointRotateInput, Bn as CHECKOUT_ERRORS, Br as ErrorResponse, Bt as AccountDetailSchema, C as DoctorUnsellablePriceSchema, Cn as CancelSubscriptionInputSchema, Cr as PriceDef, Ct as PlanSetWarningSchema, D as DoctorWarningSchema, Dn as GrantSchema, Dr as ActorRefSchema, Dt as EntitlementRulesGrant, E as DoctorWarningCode, En as GrantCreateInputSchema, Er as API_VERSION, Et as EntitlementRulesCatalog, F as WebhookEndpoint, Fn as PortalSession, Fr as EntitlementValueSchema, Ft as ErrorCode, G as WebhookLastDelivery, Gn as CheckoutPrefillSchema, Gr as IntervalSchema, Gt as CheckoutSessionResponse, H as WebhookEndpointSchema, Hn as CheckoutConsentInputSchema, Hr as ExternalRefSchema, Ht as AccountUpsertResponseSchema, I as WebhookEndpointCreateInput, In as PortalSessionCreateInput, Ir as Entitlements, It as ErrorCodeSpec, J as generateWebhookSecret, Jn as CheckoutSession, Jt as GrantCreateResponseSchema, K as WebhookLastDeliverySchema, Kn as CheckoutRedirectTarget, Kr as MetadataSchema, Kt as CheckoutSessionResponseSchema, L as WebhookEndpointCreateInputSchema, Ln as PortalSessionCreateInputSchema, Lr as EntitlementsSchema, Lt as errorCodeSpec, M as EventTypeSchema, Mn as Subscription, Mr as DateTimeSchema, Mt as isLiveSubscriptionStatus, N as WEBHOOK_ENDPOINT_STATUSES, Nn as SubscriptionSchema, Nr as ERROR_CATEGORIES, Nt as resolveEntitlements, O as buildDoctorReport, On as Payment, Or as AmountMinorSchema, Ot as LIVE_SUBSCRIPTION_STATUSES, P as WEBHOOK_SECRET_PREFIX, Pn as PORTAL_SESSION_ERRORS, Pr as EntitlementValue, Pt as ERROR_CODES, Q as BrandingSchema, Qn as CheckoutSessionCreated, Qt as HEADER_REQUEST_ID, R as WebhookEndpointList, Rn as PortalSessionError, Rr as ErrorCategory, Rt as isKnownErrorCode, S as DoctorUnsellablePrice, Sn as CancelSubscriptionInput, Sr as Price, St as PlanSetWarningCode, T as DoctorWarning, Tn as GrantCreateInput, Tr as PriceSchema, Tt as ResyncResultSchema, U as WebhookEndpointStatus, Un as CheckoutError, Ur as IdSchema, Ut as CancelSubscriptionResponse, V as WebhookEndpointRotateInputSchema, Vn as CheckoutConsentInput, Vr as ErrorResponseSchema, Vt as AccountUpsertResponse, W as WebhookEndpointStatusSchema, Wn as CheckoutPrefill, Wr as Interval, Wt as CancelSubscriptionResponseSchema, X as Branding, Xn as CheckoutSessionCreateInputSchema, Xt as HEADER_API_VERSION, Y as webhookEndpointUrlProblem, Yn as CheckoutSessionCreateInput, Yt as HEADER_ACTOR_REF, Z as BrandingPatchSchema, Zn as CheckoutSessionCreateParsed, Zt as HEADER_IDEMPOTENCY_KEY, _ as DoctorReportSchema, _n as ManualInvoiceInputSchema, _r as FeatureDef, _t as PlanSetMode, a as DOCTOR_SEVERITIES, an as ManualInvoiceResponseSchema, ar as MAX_CHECKOUT_CONSENT_DOCS, at as ReturnOriginSchema, b as DoctorSeverity, bn as manualInvoiceTotals, br as PlanDef, bt as PlanSetResponseSchema, c as DoctorEndpoint, cn as InvoiceIssueInputSchema, cr as checkoutRedirectUrl, ct as SettingsLocaleSchema, d as DoctorFacts, dn as InvoiceSchema, dr as Catalog, dt as applySettingsPatch, en as InvoiceIssueResponse, er as CheckoutSessionSchema, et as DEFAULT_PORTAL_TTL_MINUTES, f as DoctorHosted, fn as InvoiceStatusSchema, fr as CatalogSchema, ft as isReturnUrlAllowed, g as DoctorReport, gn as ManualInvoiceInput, gr as CatalogSyncResultSchema, gt as PlanSetInputSchema, h as DoctorProviderSchema, hn as MANUAL_INVOICE_MAX_AMOUNT_MINOR, hr as CatalogSyncResult, ht as PlanSetInput, i as DOCTOR_REQUIRED_LEGAL_LINKS, in as ManualInvoiceResponse, ir as ConsentSchema, it as ProductSettingsSchema, j as DEFAULT_ENDPOINT_EVENT_TYPES, jn as StatsSchema, jr as CurrencySchema, jt as isGrantActive, k as endpointDiagnosisOf, kn as PaymentSchema, kr as CodeSchema, kt as ResolveEntitlementsInput, l as DoctorEndpointDiagnosis, ln as InvoiceLine, lr as AccountsRefreshResult, lt as TtlMinutesSchema, m as DoctorProvider, mn as InvoiceVoidInputSchema, mr as CatalogSyncInputSchema, mt as PLAN_SET_MODES, n as DOCTOR_PROVIDER_ENVIRONMENTS, nn as InvoiceVoidResponse, nr as CheckoutStatusSchema, nt as ProductSettingsPatch, o as DoctorCatalog, on as Invoice, or as ProviderPayload, ot as SETTINGS_LOCALES, p as DoctorHostedSchema, pn as InvoiceVoidInput, pr as CatalogSyncInput, pt as returnOriginsOf, q as WebhookSecretSchema, qn as CheckoutReturnStatus, qt as GrantCreateResponse, r as DOCTOR_REQUIRED_BRANDING, rn as InvoiceVoidResponseSchema, rr as Consent, rt as ProductSettingsPatchSchema, s as DoctorCatalogSchema, sn as InvoiceIssueInput, sr as ProviderPayloadSchema, st as SettingsLocale, t as DOCTOR_PENDING_BACKLOG_MS, tn as InvoiceIssueResponseSchema, tr as CheckoutStatus, tt as ProductSettings, u as DoctorEndpointSchema, un as InvoiceLineSchema, ur as AccountsRefreshResultSchema, ut as WebUrlSchema, v as DoctorSettings, vn as ManualInvoiceLineInput, vr as FeatureDefSchema, vt as PlanSetModeSchema, w as DoctorUnsellableReason, wn as Grant, wr as PriceDefSchema, wt as ResyncResult, x as DoctorSeveritySchema, xn as splitInclusiveTax, xr as PlanDefSchema, xt as PlanSetWarning, y as DoctorSettingsSchema, yn as ManualInvoiceLineInputSchema, yr as FeatureTypeSchema, yt as PlanSetResponse, z as WebhookEndpointListSchema, zn as PortalSessionSchema, zr as ErrorCategorySchema, zt as AccountDetail } from "./_chunks/index.js";
2
2
  import { A as AccountProfileState, B as AccountUpsertInputSchema, C as AccountDeleteResponse, D as AccountInclude, E as AccountDunningStateSchema, F as AccountState, G as EntitlementSnapshot, H as BillingProfileInput, I as AccountStateSchema, J as SubscriptionStatusSchema, K as EntitlementSnapshotSchema, L as AccountSubscriptionState, M as AccountScheduledChange, N as AccountScheduledChangeSchema, O as AccountOpenCheckout, P as AccountSchema, R as AccountSubscriptionStateSchema, S as Account, T as AccountDunningState, U as BillingProfileKindSchema, V as BillingProfile, W as BillingProfileSchema, X as SubscriptionSummarySchema, Y as SubscriptionSummary, _ as PingSchema, a as BillingEvent, b as AccessState, c as EVENT_DETAIL_SCHEMAS, d as EventIdSchema, f as EventType, g as Ping, h as PING_EVENT_TYPE, i as ApiVersionSchema, j as AccountProfileStateSchema, k as AccountOpenCheckoutSchema, l as EVENT_TYPES, m as LegacyEventType, n as AnyBillingEvent, o as BillingEventOf, p as LEGACY_EVENT_TYPES, q as SubscriptionStatus, r as AnyBillingEventSchema, s as BillingEventSchema, t as AccountStateChangeCause, u as EventDetail, v as isEventType, w as AccountDeleteResponseSchema, x as AccessStateSchema, y as ACCOUNT_INCLUDES, z as AccountUpsertInput } from "./_chunks/events.js";
3
3
  import { n as isValidTckn, r as isValidVkn, t as isE164 } from "./_chunks/validators.js";
4
- import { _ as createBillingClient, a as Steward, c as StewardOptions, d as RetryOptions, f as AccountStateRead, g as ClientResult, h as CallOptions, i as MutationOptions, l as createSteward, m as BillingClientOptions, n as EventListQuery, o as StewardEnv, p as BillingClient, r as InvoiceDocument, s as StewardMe, t as CatalogRead, u as RetryClass, v as parseRetryAfter } from "./_chunks/steward.js";
4
+ import { a as StewardEnv, c as createSteward, d as AccountStateRead, i as Steward, l as RetryClass, n as InvoiceDocument, o as StewardMe, r as MutationOptions, s as StewardOptions, t as CatalogRead, u as RetryOptions } from "./_chunks/steward.js";
5
5
  import { i as httpStatusFor, n as HttpStatusResult, r as StewardLogger, t as StewardLocale } from "./_chunks/locale.js";
6
- //#region src/catalog-cache.d.ts
7
- export type CatalogCacheOptions = {
8
- /** Varsayılan 60 sn. */
9
- ttlMs?: number;
10
- /** Bayat değer uyarısı; varsayılan `console`. */
11
- logger?: Pick<StewardLogger, "warn">;
12
- };
13
- export type CatalogCache = {
14
- get(): Promise<Catalog>;
15
- /** Sonraki `get()` süreyi beklemeden (ETag'le) tazeler. */
16
- invalidate(): void;
17
- };
18
- export declare function createCatalogCache(steward: Pick<Steward, "catalog">, options?: CatalogCacheOptions): CatalogCache;
19
- //#endregion
20
6
  //#region src/catalog.d.ts
21
7
  type FeatureType = "limit" | "boolean" | "string";
22
8
  export type FeatureSpec<T extends FeatureType = FeatureType> = {
@@ -217,52 +203,4 @@ export declare class StewardConfigError extends StewardError {
217
203
  });
218
204
  }
219
205
  //#endregion
220
- //#region src/messages.d.ts
221
- /** SDK'nın kendisinin ürettiği kodlar (yanıt yok ya da istek hiç gönderilmedi). */
222
- declare const CLIENT_ERROR_CODES: readonly ["network_error", "timeout", "invalid_response", "config_error"];
223
- export type StewardErrorCode = ErrorCode | (typeof CLIENT_ERROR_CODES)[number];
224
- export declare const STEWARD_ERROR_CODES: readonly StewardErrorCode[];
225
- export type ErrorMessages = Record<StewardErrorCode, string> & {
226
- fallback: string;
227
- };
228
- export declare const errorMessages: {
229
- readonly tr: ErrorMessages;
230
- readonly en: ErrorMessages;
231
- };
232
- /** Kullanıcıya gösterilecek metin (`tr`, `tr-TR` → tr; diğer diller → en); tanınmayan kodda genel metin. */
233
- export declare function messageFor(code: string, locale: string): string;
234
- //#endregion
235
- //#region src/money.d.ts
236
- /** `Price`, `PriceDef` ve `defineCatalog` fiyatlarıyla uyumlu en küçük şekil. */
237
- export type PriceAmount = {
238
- amountMinor: number;
239
- currency: string;
240
- taxInclusive: boolean;
241
- /** Baz puan: %20 = 2000. */
242
- taxRateBps: number;
243
- };
244
- export type TaxBreakdown = {
245
- /** Matrah (vergi hariç). */
246
- subtotalMinor: number;
247
- taxMinor: number;
248
- /** Ödenecek toplam = matrah + vergi. */
249
- totalMinor: number;
250
- };
251
- /**
252
- * Vergi dahil fiyatta toplam korunur, matrah kuruşa yuvarlanır ve vergi kalandır;
253
- * vergi hariç fiyatta vergi kuruşa yuvarlanıp üstüne eklenir.
254
- */
255
- export declare function taxBreakdown(price: Pick<PriceAmount, "amountMinor" | "taxInclusive" | "taxRateBps">): TaxBreakdown;
256
- /**
257
- * Tutar, para biriminin ondalık hanesiyle (TRY/USD 2, JPY 0): `₺1.250,00`
258
- * (tr), `₺1,250.00` (en). Sembol dar biçimde (`TRY 1,250.00` değil).
259
- */
260
- export declare function formatMoney(amountMinor: number, currency: string, locale: string): string;
261
- /**
262
- * Fiyat etiketi: `₺1.250,00 · KDV dahil` (tr), `₺1,250.00 · VAT included` (en).
263
- * Vergi oranı 0 ise vergi ibaresi yazılmaz. Sayı biçimi `locale`'in kendisiyle,
264
- * ibare `tr*` → Türkçe, diğerleri İngilizce.
265
- */
266
- export declare function formatPrice(price: PriceAmount, locale: string): string;
267
- //#endregion
268
- export { ACCOUNT_INCLUDES, API_VERSION, AccessState, AccessStateSchema, Account, AccountDeleteResponse, AccountDeleteResponseSchema, AccountDetail, AccountDetailSchema, AccountDunningState, AccountDunningStateSchema, AccountInclude, AccountOpenCheckout, AccountOpenCheckoutSchema, AccountProfileState, AccountProfileStateSchema, AccountScheduledChange, AccountScheduledChangeSchema, AccountSchema, AccountState, AccountStateChangeCause, AccountStateRead, AccountStateSchema, AccountSubscriptionState, AccountSubscriptionStateSchema, AccountUpsertInput, AccountUpsertInputSchema, AccountUpsertResponse, AccountUpsertResponseSchema, AccountsRefreshResult, AccountsRefreshResultSchema, ActorRefSchema, AmountMinorSchema, AnyBillingEvent, AnyBillingEventSchema, ApiVersionSchema, BillingClient, BillingClientOptions, BillingEvent, BillingEventOf, BillingEventSchema, BillingProfile, BillingProfileInput, BillingProfileKindSchema, BillingProfileResponse, BillingProfileResponseSchema, BillingProfileSchema, Branding, BrandingPatchSchema, BrandingSchema, CHECKOUT_ERRORS, CallOptions, CancelSubscriptionInput, CancelSubscriptionInputSchema, CancelSubscriptionResponse, CancelSubscriptionResponseSchema, Catalog, CatalogRead, CatalogSchema, CatalogSyncInput, CatalogSyncInputSchema, CatalogSyncResult, CatalogSyncResultSchema, CheckoutConsentInput, CheckoutConsentInputSchema, CheckoutError, CheckoutPrefill, CheckoutPrefillSchema, CheckoutRedirectTarget, CheckoutReturnStatus, CheckoutSession, CheckoutSessionCreateInput, CheckoutSessionCreateInputSchema, CheckoutSessionCreateParsed, CheckoutSessionCreated, CheckoutSessionCreatedSchema, CheckoutSessionResponse, CheckoutSessionResponseSchema, CheckoutSessionSchema, CheckoutStatus, CheckoutStatusSchema, ClientResult, CodeSchema, Consent, ConsentSchema, Currency, CurrencySchema, DEFAULT_CHECKOUT_TTL_MINUTES, DEFAULT_ENDPOINT_EVENT_TYPES, DEFAULT_PORTAL_TTL_MINUTES, DOCTOR_PENDING_BACKLOG_MS, DOCTOR_PROVIDER_ENVIRONMENTS, DOCTOR_REQUIRED_BRANDING, DOCTOR_REQUIRED_LEGAL_LINKS, DOCTOR_SEVERITIES, DateTimeSchema, Delivery, DeliverySchema, DoctorCatalog, DoctorCatalogSchema, DoctorEndpoint, DoctorEndpointDiagnosis, DoctorEndpointSchema, DoctorFacts, DoctorHosted, DoctorHostedSchema, DoctorProvider, DoctorProviderSchema, DoctorReport, DoctorReportSchema, DoctorSettings, DoctorSettingsSchema, DoctorSeverity, DoctorSeveritySchema, DoctorUnsellablePrice, DoctorUnsellablePriceSchema, DoctorUnsellableReason, DoctorWarning, DoctorWarningCode, DoctorWarningSchema, ERROR_CATEGORIES, ERROR_CODES, EVENT_DETAIL_SCHEMAS, EVENT_TYPES, EntitlementRulesCatalog, EntitlementRulesGrant, EntitlementSnapshot, EntitlementSnapshotSchema, EntitlementValue, EntitlementValueSchema, Entitlements, EntitlementsSchema, ErrorCategory, ErrorCategorySchema, ErrorCode, ErrorCodeSpec, ErrorResponse, ErrorResponseSchema, EventDetail, EventIdSchema, EventList, EventListQuery, EventListSchema, EventRecord, EventRecordSchema, EventType, EventTypeSchema, ExternalRefSchema, FeatureDef, FeatureDefSchema, FeatureTypeSchema, Grant, GrantCreateInput, GrantCreateInputSchema, GrantCreateResponse, GrantCreateResponseSchema, GrantSchema, HEADER_ACTOR_REF, HEADER_API_VERSION, HEADER_IDEMPOTENCY_KEY, HEADER_REQUEST_ID, HEADER_SDK, HttpStatusResult, IdSchema, Interval, IntervalSchema, Invoice, InvoiceDocument, InvoiceIssueInput, InvoiceIssueInputSchema, InvoiceIssueResponse, InvoiceIssueResponseSchema, InvoiceLine, InvoiceLineSchema, InvoiceSchema, InvoiceStatusSchema, InvoiceVoidInput, InvoiceVoidInputSchema, InvoiceVoidResponse, InvoiceVoidResponseSchema, LEGACY_EVENT_TYPES, LIVE_SUBSCRIPTION_STATUSES, LegacyCheckoutSessionCreateParsed, LegacyEventType, MANUAL_INVOICE_MAX_AMOUNT_MINOR, MAX_CHECKOUT_CONSENT_DOCS, ManualInvoiceInput, ManualInvoiceInputSchema, ManualInvoiceLineInput, ManualInvoiceLineInputSchema, ManualInvoiceResponse, ManualInvoiceResponseSchema, MetadataSchema, MutationOptions, PING_EVENT_TYPE, PLAN_SET_MODES, PORTAL_SESSION_ERRORS, Payment, PaymentSchema, Ping, PingSchema, PlanDef, PlanDefSchema, PlanSetInput, PlanSetInputSchema, PlanSetMode, PlanSetModeSchema, PlanSetResponse, PlanSetResponseSchema, PlanSetWarning, PlanSetWarningCode, PlanSetWarningSchema, PortalSession, PortalSessionCreateInput, PortalSessionCreateInputSchema, PortalSessionError, PortalSessionSchema, Price, PriceDef, PriceDefSchema, PriceSchema, ProductSettings, ProductSettingsPatch, ProductSettingsPatchSchema, ProductSettingsSchema, ProviderPayload, ProviderPayloadSchema, ResolveEntitlementsInput, ResolvedEntitlements, ResyncResult, ResyncResultSchema, type RetryClass, type RetryOptions, ReturnOriginSchema, SETTINGS_LOCALES, SettingsLocale, SettingsLocaleSchema, Stats, StatsSchema, Steward, StewardEnv, type StewardLocale, StewardLogger, StewardMe, StewardOptions, Subscription, SubscriptionSchema, SubscriptionStatus, SubscriptionStatusSchema, SubscriptionSummary, SubscriptionSummarySchema, TtlMinutesSchema, WEBHOOK_ENDPOINT_STATUSES, WEBHOOK_SECRET_PREFIX, WebUrlSchema, WebhookEndpoint, WebhookEndpointCreateInput, WebhookEndpointCreateInputSchema, WebhookEndpointList, WebhookEndpointListSchema, WebhookEndpointRotateInput, WebhookEndpointRotateInputSchema, WebhookEndpointSchema, WebhookEndpointStatus, WebhookEndpointStatusSchema, WebhookLastDelivery, WebhookLastDeliverySchema, WebhookSecretSchema, applySettingsPatch, buildDoctorReport, checkoutRedirectUrl, createBillingClient, createSteward, endpointDiagnosisOf, errorCodeSpec, generateWebhookSecret, hostedReadinessOf, httpStatusFor, isE164, isEventType, isGrantActive, isKnownErrorCode, isLegacyCheckoutInput, isLiveSubscriptionStatus, isReturnUrlAllowed, isValidTckn, isValidVkn, manualInvoiceTotals, parseRetryAfter, resolveEntitlements, returnOriginsOf, splitInclusiveTax, webhookEndpointUrlProblem };
206
+ export { ACCOUNT_INCLUDES, API_VERSION, AccessState, AccessStateSchema, Account, AccountDeleteResponse, AccountDeleteResponseSchema, AccountDetail, AccountDetailSchema, AccountDunningState, AccountDunningStateSchema, AccountInclude, AccountOpenCheckout, AccountOpenCheckoutSchema, AccountProfileState, AccountProfileStateSchema, AccountScheduledChange, AccountScheduledChangeSchema, AccountSchema, AccountState, AccountStateChangeCause, type AccountStateRead, AccountStateSchema, AccountSubscriptionState, AccountSubscriptionStateSchema, AccountUpsertInput, AccountUpsertInputSchema, AccountUpsertResponse, AccountUpsertResponseSchema, AccountsRefreshResult, AccountsRefreshResultSchema, ActorRefSchema, AmountMinorSchema, AnyBillingEvent, AnyBillingEventSchema, ApiVersionSchema, BillingEvent, BillingEventOf, BillingEventSchema, BillingProfile, BillingProfileInput, BillingProfileKindSchema, BillingProfileSchema, Branding, BrandingPatchSchema, BrandingSchema, CHECKOUT_ERRORS, CancelSubscriptionInput, CancelSubscriptionInputSchema, CancelSubscriptionResponse, CancelSubscriptionResponseSchema, Catalog, CatalogRead, CatalogSchema, CatalogSyncInput, CatalogSyncInputSchema, CatalogSyncResult, CatalogSyncResultSchema, CheckoutConsentInput, CheckoutConsentInputSchema, CheckoutError, CheckoutPrefill, CheckoutPrefillSchema, CheckoutRedirectTarget, CheckoutReturnStatus, CheckoutSession, CheckoutSessionCreateInput, CheckoutSessionCreateInputSchema, CheckoutSessionCreateParsed, CheckoutSessionCreated, CheckoutSessionCreatedSchema, CheckoutSessionResponse, CheckoutSessionResponseSchema, CheckoutSessionSchema, CheckoutStatus, CheckoutStatusSchema, CodeSchema, Consent, ConsentSchema, Currency, CurrencySchema, DEFAULT_CHECKOUT_TTL_MINUTES, DEFAULT_ENDPOINT_EVENT_TYPES, DEFAULT_PORTAL_TTL_MINUTES, DOCTOR_PENDING_BACKLOG_MS, DOCTOR_PROVIDER_ENVIRONMENTS, DOCTOR_REQUIRED_BRANDING, DOCTOR_REQUIRED_LEGAL_LINKS, DOCTOR_SEVERITIES, DateTimeSchema, DoctorCatalog, DoctorCatalogSchema, DoctorEndpoint, DoctorEndpointDiagnosis, DoctorEndpointSchema, DoctorFacts, DoctorHosted, DoctorHostedSchema, DoctorProvider, DoctorProviderSchema, DoctorReport, DoctorReportSchema, DoctorSettings, DoctorSettingsSchema, DoctorSeverity, DoctorSeveritySchema, DoctorUnsellablePrice, DoctorUnsellablePriceSchema, DoctorUnsellableReason, DoctorWarning, DoctorWarningCode, DoctorWarningSchema, ERROR_CATEGORIES, ERROR_CODES, EVENT_DETAIL_SCHEMAS, EVENT_TYPES, EntitlementRulesCatalog, EntitlementRulesGrant, EntitlementSnapshot, EntitlementSnapshotSchema, EntitlementValue, EntitlementValueSchema, Entitlements, EntitlementsSchema, ErrorCategory, ErrorCategorySchema, ErrorCode, ErrorCodeSpec, ErrorResponse, ErrorResponseSchema, EventDetail, EventIdSchema, EventType, EventTypeSchema, ExternalRefSchema, FeatureDef, FeatureDefSchema, FeatureTypeSchema, Grant, GrantCreateInput, GrantCreateInputSchema, GrantCreateResponse, GrantCreateResponseSchema, GrantSchema, HEADER_ACTOR_REF, HEADER_API_VERSION, HEADER_IDEMPOTENCY_KEY, HEADER_REQUEST_ID, HEADER_SDK, HttpStatusResult, IdSchema, Interval, IntervalSchema, Invoice, InvoiceDocument, InvoiceIssueInput, InvoiceIssueInputSchema, InvoiceIssueResponse, InvoiceIssueResponseSchema, InvoiceLine, InvoiceLineSchema, InvoiceSchema, InvoiceStatusSchema, InvoiceVoidInput, InvoiceVoidInputSchema, InvoiceVoidResponse, InvoiceVoidResponseSchema, LEGACY_EVENT_TYPES, LIVE_SUBSCRIPTION_STATUSES, LegacyEventType, MANUAL_INVOICE_MAX_AMOUNT_MINOR, MAX_CHECKOUT_CONSENT_DOCS, ManualInvoiceInput, ManualInvoiceInputSchema, ManualInvoiceLineInput, ManualInvoiceLineInputSchema, ManualInvoiceResponse, ManualInvoiceResponseSchema, MetadataSchema, MutationOptions, PING_EVENT_TYPE, PLAN_SET_MODES, PORTAL_SESSION_ERRORS, Payment, PaymentSchema, Ping, PingSchema, PlanDef, PlanDefSchema, PlanSetInput, PlanSetInputSchema, PlanSetMode, PlanSetModeSchema, PlanSetResponse, PlanSetResponseSchema, PlanSetWarning, PlanSetWarningCode, PlanSetWarningSchema, PortalSession, PortalSessionCreateInput, PortalSessionCreateInputSchema, PortalSessionError, PortalSessionSchema, Price, PriceDef, PriceDefSchema, PriceSchema, ProductSettings, ProductSettingsPatch, ProductSettingsPatchSchema, ProductSettingsSchema, ProviderPayload, ProviderPayloadSchema, ResolveEntitlementsInput, ResolvedEntitlements, ResyncResult, ResyncResultSchema, type RetryClass, type RetryOptions, ReturnOriginSchema, SETTINGS_LOCALES, SettingsLocale, SettingsLocaleSchema, Stats, StatsSchema, Steward, StewardEnv, type StewardLocale, StewardLogger, StewardMe, StewardOptions, Subscription, SubscriptionSchema, SubscriptionStatus, SubscriptionStatusSchema, SubscriptionSummary, SubscriptionSummarySchema, TtlMinutesSchema, WEBHOOK_ENDPOINT_STATUSES, WEBHOOK_SECRET_PREFIX, WebUrlSchema, WebhookEndpoint, WebhookEndpointCreateInput, WebhookEndpointCreateInputSchema, WebhookEndpointList, WebhookEndpointListSchema, WebhookEndpointRotateInput, WebhookEndpointRotateInputSchema, WebhookEndpointSchema, WebhookEndpointStatus, WebhookEndpointStatusSchema, WebhookLastDelivery, WebhookLastDeliverySchema, WebhookSecretSchema, applySettingsPatch, buildDoctorReport, checkoutRedirectUrl, createSteward, endpointDiagnosisOf, errorCodeSpec, generateWebhookSecret, hostedReadinessOf, httpStatusFor, isE164, isEventType, isGrantActive, isKnownErrorCode, isLiveSubscriptionStatus, isReturnUrlAllowed, isValidTckn, isValidVkn, manualInvoiceTotals, resolveEntitlements, returnOriginsOf, splitInclusiveTax, webhookEndpointUrlProblem };