@stewardhq/sdk 0.5.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.
@@ -31,13 +31,13 @@ declare const MetadataSchema: z.ZodRecord<z.ZodString, z.ZodString>;
31
31
  * `subscription_cycle` renewal (phase 2 adds overage lines to it), `subscription_update` plan
32
32
  * change, `purchase` reserved (one-off purchases are deferred), `manual` staff-written.
33
33
  */
34
- declare const INVOICE_BILLING_REASONS: readonly ["subscription_create", "subscription_cycle", "subscription_update", "purchase", "manual"];
34
+ declare const INVOICE_BILLING_REASONS: readonly ['subscription_create', 'subscription_cycle', 'subscription_update', 'purchase', 'manual'];
35
35
  declare const InvoiceBillingReasonSchema: z.ZodEnum<{
36
+ manual: "manual";
37
+ purchase: "purchase";
36
38
  subscription_create: "subscription_create";
37
39
  subscription_cycle: "subscription_cycle";
38
40
  subscription_update: "subscription_update";
39
- purchase: "purchase";
40
- manual: "manual";
41
41
  }>;
42
42
  type InvoiceBillingReason = z.infer<typeof InvoiceBillingReasonSchema>;
43
43
  /**
@@ -45,22 +45,22 @@ type InvoiceBillingReason = z.infer<typeof InvoiceBillingReasonSchema>;
45
45
  * `uncollectible` (given up after dunning), `waived` (operator forgave it). Invoices written the
46
46
  * pre-billing-core way (after a payment, manual invoices) carry no payment status.
47
47
  */
48
- declare const INVOICE_PAYMENT_STATUSES: readonly ["unpaid", "paid", "uncollectible", "waived"];
48
+ declare const INVOICE_PAYMENT_STATUSES: readonly ['unpaid', 'paid', 'uncollectible', 'waived'];
49
49
  declare const InvoicePaymentStatusSchema: z.ZodEnum<{
50
- unpaid: "unpaid";
51
50
  paid: "paid";
52
51
  uncollectible: "uncollectible";
52
+ unpaid: "unpaid";
53
53
  waived: "waived";
54
54
  }>;
55
55
  type InvoicePaymentStatus = z.infer<typeof InvoicePaymentStatusSchema>;
56
- declare const ERROR_CATEGORIES: readonly ["validation", "not_found", "conflict", "config", "provider", "unavailable"];
56
+ declare const ERROR_CATEGORIES: readonly ['validation', 'not_found', 'conflict', 'config', 'provider', 'unavailable'];
57
57
  declare const ErrorCategorySchema: z.ZodEnum<{
58
- validation: "validation";
59
- not_found: "not_found";
60
- conflict: "conflict";
61
58
  config: "config";
59
+ conflict: "conflict";
60
+ not_found: "not_found";
62
61
  provider: "provider";
63
62
  unavailable: "unavailable";
63
+ validation: "validation";
64
64
  }>;
65
65
  type ErrorCategory = z.infer<typeof ErrorCategorySchema>;
66
66
  /**
@@ -73,12 +73,12 @@ declare const ErrorResponseSchema: z.ZodObject<{
73
73
  error: z.ZodString;
74
74
  message: z.ZodOptional<z.ZodString>;
75
75
  category: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
76
- validation: "validation";
77
- not_found: "not_found";
78
- conflict: "conflict";
79
76
  config: "config";
77
+ conflict: "conflict";
78
+ not_found: "not_found";
80
79
  provider: "provider";
81
80
  unavailable: "unavailable";
81
+ validation: "validation";
82
82
  }>>>;
83
83
  retryable: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
84
84
  requestId: z.ZodCatch<z.ZodOptional<z.ZodString>>;
@@ -86,7 +86,7 @@ declare const ErrorResponseSchema: z.ZodObject<{
86
86
  type ErrorResponse = z.infer<typeof ErrorResponseSchema>;
87
87
  //#endregion
88
88
  //#region ../contract/src/meters.d.ts
89
- declare const METER_FILTER_OPERATORS: readonly ["eq", "ne", "gt", "gte", "lt", "lte", "like", "not_like"];
89
+ declare const METER_FILTER_OPERATORS: readonly ['eq', 'ne', 'gt', 'gte', 'lt', 'lte', 'like', 'not_like'];
90
90
  type MeterFilterOperator = (typeof METER_FILTER_OPERATORS)[number];
91
91
  /** Deepest nesting of `and`/`or` groups. */
92
92
  declare const METER_FILTER_MAX_DEPTH = 3;
@@ -145,7 +145,7 @@ declare function canonicalMeterFilter(filter: MeterFilter): MeterFilter;
145
145
  * allowed); `unique` count of distinct values at `metadata.<key>`. An event without a usable
146
146
  * value adds nothing to that meter (`invalid_value`, shown by doctor).
147
147
  */
148
- declare const METER_AGGREGATION_KINDS: readonly ["count", "sum", "max", "unique"];
148
+ declare const METER_AGGREGATION_KINDS: readonly ['count', 'sum', 'max', 'unique'];
149
149
  type MeterAggregationKind = (typeof METER_AGGREGATION_KINDS)[number];
150
150
  declare const MeterAggregationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
151
151
  kind: z.ZodLiteral<"count">;
@@ -222,14 +222,16 @@ declare const MeterDefSchema: z.ZodPipe<z.ZodObject<{
222
222
  tr: string;
223
223
  en: string;
224
224
  };
225
- lowAt: number | null;
226
225
  unitLabel?: {
227
226
  tr: string;
228
227
  en: string;
229
228
  } | undefined;
230
229
  displayPer?: number | undefined;
230
+ lowAt: number | null;
231
231
  filter: MeterFilter;
232
232
  }, {
233
+ event?: string | undefined;
234
+ filter?: MeterFilter | undefined;
233
235
  aggregation: {
234
236
  kind: "count";
235
237
  } | {
@@ -246,14 +248,12 @@ declare const MeterDefSchema: z.ZodPipe<z.ZodObject<{
246
248
  tr: string;
247
249
  en: string;
248
250
  };
249
- lowAt: number | null;
250
- event?: string | undefined;
251
- filter?: MeterFilter | undefined;
252
251
  unitLabel?: {
253
252
  tr: string;
254
253
  en: string;
255
254
  } | undefined;
256
255
  displayPer?: number | undefined;
256
+ lowAt: number | null;
257
257
  }>>;
258
258
  type MeterDef = z.output<typeof MeterDefSchema>;
259
259
  type MeterDefInput = z.input<typeof MeterDefSchema>;
@@ -333,11 +333,11 @@ type MeteredPrice = z.infer<typeof MeteredPriceSchema>;
333
333
  * `exhausted` once the balance is ≤ 0; a meter without credit is always `ok`. Standing describes
334
334
  * the credit only: a billable meter (metered price) keeps working past `exhausted` (M15).
335
335
  */
336
- declare const METER_STANDINGS: readonly ["ok", "low", "exhausted"];
336
+ declare const METER_STANDINGS: readonly ['ok', 'low', 'exhausted'];
337
337
  declare const MeterStandingSchema: z.ZodEnum<{
338
- ok: "ok";
339
- low: "low";
340
338
  exhausted: "exhausted";
339
+ low: "low";
340
+ ok: "ok";
341
341
  }>;
342
342
  type MeterStanding = z.infer<typeof MeterStandingSchema>;
343
343
  /**
@@ -355,9 +355,9 @@ declare const AccountMeterSchema: z.ZodObject<{
355
355
  balance: z.ZodNumber;
356
356
  overageUnits: z.ZodNumber;
357
357
  standing: z.ZodEnum<{
358
- ok: "ok";
359
- low: "low";
360
358
  exhausted: "exhausted";
359
+ low: "low";
360
+ ok: "ok";
361
361
  }>;
362
362
  billable: z.ZodBoolean;
363
363
  amountDueMinor: z.ZodNullable<z.ZodNumber>;
@@ -383,9 +383,9 @@ declare const AccountMetersSchema: z.ZodObject<{
383
383
  balance: z.ZodNumber;
384
384
  overageUnits: z.ZodNumber;
385
385
  standing: z.ZodEnum<{
386
- ok: "ok";
387
- low: "low";
388
386
  exhausted: "exhausted";
387
+ low: "low";
388
+ ok: "ok";
389
389
  }>;
390
390
  billable: z.ZodBoolean;
391
391
  amountDueMinor: z.ZodNullable<z.ZodNumber>;
@@ -394,11 +394,11 @@ declare const AccountMetersSchema: z.ZodObject<{
394
394
  }, z.core.$strip>>;
395
395
  }, z.core.$strip>;
396
396
  type AccountMeters = z.infer<typeof AccountMetersSchema>;
397
- declare const METER_PERIOD_STATUSES: readonly ["open", "closing", "closed"];
397
+ declare const METER_PERIOD_STATUSES: readonly ['open', 'closing', 'closed'];
398
398
  declare const MeterPeriodStatusSchema: z.ZodEnum<{
399
- open: "open";
400
- closing: "closing";
401
399
  closed: "closed";
400
+ closing: "closing";
401
+ open: "open";
402
402
  }>;
403
403
  type MeterPeriodStatus = z.infer<typeof MeterPeriodStatusSchema>;
404
404
  /** A meter period (`GET /v1/accounts/:ref/meters/periods`; closed periods, newest first). */
@@ -407,9 +407,9 @@ declare const MeterPeriodSchema: z.ZodObject<{
407
407
  periodStart: z.ZodISODateTime;
408
408
  periodEnd: z.ZodISODateTime;
409
409
  status: z.ZodEnum<{
410
- open: "open";
411
- closing: "closing";
412
410
  closed: "closed";
411
+ closing: "closing";
412
+ open: "open";
413
413
  }>;
414
414
  subscriptionId: z.ZodNullable<z.ZodUUID>;
415
415
  consumedUnits: z.ZodNumber;
@@ -425,9 +425,9 @@ declare const MeterPeriodListSchema: z.ZodObject<{
425
425
  periodStart: z.ZodISODateTime;
426
426
  periodEnd: z.ZodISODateTime;
427
427
  status: z.ZodEnum<{
428
- open: "open";
429
- closing: "closing";
430
428
  closed: "closed";
429
+ closing: "closing";
430
+ open: "open";
431
431
  }>;
432
432
  subscriptionId: z.ZodNullable<z.ZodUUID>;
433
433
  consumedUnits: z.ZodNumber;
@@ -449,24 +449,24 @@ declare const CreditGrantInputSchema: z.ZodObject<{
449
449
  }, z.core.$strip>;
450
450
  type CreditGrantInput = z.input<typeof CreditGrantInputSchema>;
451
451
  /** Credit ledger entry kinds (M5). Entries are never rewritten. */
452
- declare const METER_CREDIT_ENTRY_KINDS: readonly ["cycle_grant", "rollover", "plan_change", "manual_grant", "adjustment"];
452
+ declare const METER_CREDIT_ENTRY_KINDS: readonly ['cycle_grant', 'rollover', 'plan_change', 'manual_grant', 'adjustment'];
453
453
  declare const MeterCreditEntryKindSchema: z.ZodEnum<{
454
+ adjustment: "adjustment";
454
455
  cycle_grant: "cycle_grant";
455
- rollover: "rollover";
456
- plan_change: "plan_change";
457
456
  manual_grant: "manual_grant";
458
- adjustment: "adjustment";
457
+ plan_change: "plan_change";
458
+ rollover: "rollover";
459
459
  }>;
460
460
  type MeterCreditEntryKind = z.infer<typeof MeterCreditEntryKindSchema>;
461
461
  declare const MeterCreditEntrySchema: z.ZodObject<{
462
462
  id: z.ZodUUID;
463
463
  meter: z.ZodString;
464
464
  kind: z.ZodEnum<{
465
+ adjustment: "adjustment";
465
466
  cycle_grant: "cycle_grant";
466
- rollover: "rollover";
467
- plan_change: "plan_change";
468
467
  manual_grant: "manual_grant";
469
- adjustment: "adjustment";
468
+ plan_change: "plan_change";
469
+ rollover: "rollover";
470
470
  }>;
471
471
  units: z.ZodNumber;
472
472
  periodStart: z.ZodISODateTime;
@@ -475,10 +475,10 @@ declare const MeterCreditEntrySchema: z.ZodObject<{
475
475
  createdAt: z.ZodISODateTime;
476
476
  }, z.core.$strip>;
477
477
  type MeterCreditEntry = z.infer<typeof MeterCreditEntrySchema>;
478
- declare const METER_CHARGE_STATUSES: readonly ["dry_run", "carried", "invoiced"];
478
+ declare const METER_CHARGE_STATUSES: readonly ['dry_run', 'carried', 'invoiced'];
479
479
  declare const MeterChargeStatusSchema: z.ZodEnum<{
480
- dry_run: "dry_run";
481
480
  carried: "carried";
481
+ dry_run: "dry_run";
482
482
  invoiced: "invoiced";
483
483
  }>;
484
484
  type MeterChargeStatus = z.infer<typeof MeterChargeStatusSchema>;
@@ -524,8 +524,8 @@ declare const MeterChargeSchema: z.ZodObject<{
524
524
  totalMinor: z.ZodNumber;
525
525
  carriedInMinor: z.ZodNumber;
526
526
  status: z.ZodEnum<{
527
- dry_run: "dry_run";
528
527
  carried: "carried";
528
+ dry_run: "dry_run";
529
529
  invoiced: "invoiced";
530
530
  }>;
531
531
  invoiceId: z.ZodNullable<z.ZodUUID>;
@@ -558,8 +558,8 @@ declare const MeterChargeListSchema: z.ZodObject<{
558
558
  totalMinor: z.ZodNumber;
559
559
  carriedInMinor: z.ZodNumber;
560
560
  status: z.ZodEnum<{
561
- dry_run: "dry_run";
562
561
  carried: "carried";
562
+ dry_run: "dry_run";
563
563
  invoiced: "invoiced";
564
564
  }>;
565
565
  invoiceId: z.ZodNullable<z.ZodUUID>;
@@ -570,7 +570,7 @@ type MeterChargeList = z.infer<typeof MeterChargeListSchema>;
570
570
  //#endregion
571
571
  //#region ../contract/src/benefits.d.ts
572
572
  /** Benefit types this contract version defines. */
573
- declare const BENEFIT_TYPES: readonly ["feature_flag", "meter_credit"];
573
+ declare const BENEFIT_TYPES: readonly ['feature_flag', 'meter_credit'];
574
574
  declare const BenefitTypeSchema: z.ZodEnum<{
575
575
  feature_flag: "feature_flag";
576
576
  meter_credit: "meter_credit";
@@ -662,19 +662,19 @@ declare const AccountBenefitSchema: z.ZodObject<{
662
662
  }, z.core.$strip>;
663
663
  type AccountBenefit = z.infer<typeof AccountBenefitSchema>;
664
664
  type FeatureFlagAccountBenefit = AccountBenefit & {
665
- type: "feature_flag";
665
+ type: 'feature_flag';
666
666
  properties: FeatureFlagProperties;
667
667
  };
668
668
  /** Narrows a granted benefit to `feature_flag` (type and property values checked). */
669
669
  declare function isFeatureFlagBenefit(benefit: AccountBenefit): benefit is FeatureFlagAccountBenefit;
670
670
  type MeterCreditAccountBenefit = AccountBenefit & {
671
- type: "meter_credit";
671
+ type: 'meter_credit';
672
672
  properties: MeterCreditProperties;
673
673
  };
674
674
  /** Narrows a granted benefit to `meter_credit` (type and properties checked). */
675
675
  declare function isMeterCreditBenefit(benefit: AccountBenefit): benefit is MeterCreditAccountBenefit;
676
676
  /** Feature types (same values as `FeatureTypeSchema` in `catalog.ts`). */
677
- type BenefitFeatureType = "limit" | "boolean" | "string";
677
+ type BenefitFeatureType = 'limit' | 'boolean' | 'string';
678
678
  /**
679
679
  * Whether a value fits a feature type (K4): `limit` → integer ≥ 0 or `null` (unlimited),
680
680
  * `boolean` → boolean, `string` → string. `null` is only valid for `limit`.
@@ -683,16 +683,16 @@ declare function featureValueMatchesType(type: BenefitFeatureType, value: Entitl
683
683
  //#endregion
684
684
  //#region ../contract/src/catalog.d.ts
685
685
  declare const FeatureTypeSchema: z.ZodEnum<{
686
- string: "string";
687
686
  boolean: "boolean";
688
687
  limit: "limit";
688
+ string: "string";
689
689
  }>;
690
690
  declare const FeatureDefSchema: z.ZodObject<{
691
691
  key: z.ZodString;
692
692
  type: z.ZodEnum<{
693
- string: "string";
694
693
  boolean: "boolean";
695
694
  limit: "limit";
695
+ string: "string";
696
696
  }>;
697
697
  description: z.ZodOptional<z.ZodString>;
698
698
  }, z.core.$strip>;
@@ -745,9 +745,9 @@ declare const CatalogSyncInputSchema: z.ZodObject<{
745
745
  features: z.ZodArray<z.ZodObject<{
746
746
  key: z.ZodString;
747
747
  type: z.ZodEnum<{
748
- string: "string";
749
748
  boolean: "boolean";
750
749
  limit: "limit";
750
+ string: "string";
751
751
  }>;
752
752
  description: z.ZodOptional<z.ZodString>;
753
753
  }, z.core.$strip>>;
@@ -832,14 +832,16 @@ declare const CatalogSyncInputSchema: z.ZodObject<{
832
832
  tr: string;
833
833
  en: string;
834
834
  };
835
- lowAt: number | null;
836
835
  unitLabel?: {
837
836
  tr: string;
838
837
  en: string;
839
838
  } | undefined;
840
839
  displayPer?: number | undefined;
840
+ lowAt: number | null;
841
841
  filter: MeterFilter;
842
842
  }, {
843
+ event?: string | undefined;
844
+ filter?: MeterFilter | undefined;
843
845
  aggregation: {
844
846
  kind: "count";
845
847
  } | {
@@ -856,14 +858,12 @@ declare const CatalogSyncInputSchema: z.ZodObject<{
856
858
  tr: string;
857
859
  en: string;
858
860
  };
859
- lowAt: number | null;
860
- event?: string | undefined;
861
- filter?: MeterFilter | undefined;
862
861
  unitLabel?: {
863
862
  tr: string;
864
863
  en: string;
865
864
  } | undefined;
866
865
  displayPer?: number | undefined;
866
+ lowAt: number | null;
867
867
  }>>>>;
868
868
  meteredPrices: z.ZodDefault<z.ZodArray<z.ZodObject<{
869
869
  planCode: z.ZodString;
@@ -899,9 +899,9 @@ declare const CatalogSchema: z.ZodObject<{
899
899
  features: z.ZodArray<z.ZodObject<{
900
900
  key: z.ZodString;
901
901
  type: z.ZodEnum<{
902
- string: "string";
903
902
  boolean: "boolean";
904
903
  limit: "limit";
904
+ string: "string";
905
905
  }>;
906
906
  description: z.ZodOptional<z.ZodString>;
907
907
  }, z.core.$strip>>;
@@ -1028,8 +1028,8 @@ declare const CheckoutPrefillSchema: z.ZodObject<{
1028
1028
  email: z.ZodOptional<z.ZodEmail>;
1029
1029
  name: z.ZodOptional<z.ZodString>;
1030
1030
  kind: z.ZodOptional<z.ZodEnum<{
1031
- individual: "individual";
1032
1031
  company: "company";
1032
+ individual: "individual";
1033
1033
  }>>;
1034
1034
  }, z.core.$strip>;
1035
1035
  type CheckoutPrefill = z.infer<typeof CheckoutPrefillSchema>;
@@ -1043,8 +1043,8 @@ declare const CheckoutSessionCreateInputSchema: z.ZodObject<{
1043
1043
  }>;
1044
1044
  currency: z.ZodOptional<z.ZodString>;
1045
1045
  locale: z.ZodOptional<z.ZodEnum<{
1046
- tr: "tr";
1047
1046
  en: "en";
1047
+ tr: "tr";
1048
1048
  }>>;
1049
1049
  successUrl: z.ZodURL;
1050
1050
  cancelUrl: z.ZodOptional<z.ZodURL>;
@@ -1053,8 +1053,8 @@ declare const CheckoutSessionCreateInputSchema: z.ZodObject<{
1053
1053
  email: z.ZodOptional<z.ZodEmail>;
1054
1054
  name: z.ZodOptional<z.ZodString>;
1055
1055
  kind: z.ZodOptional<z.ZodEnum<{
1056
- individual: "individual";
1057
1056
  company: "company";
1057
+ individual: "individual";
1058
1058
  }>>;
1059
1059
  }, z.core.$strip>>;
1060
1060
  consents: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -1062,6 +1062,7 @@ declare const CheckoutSessionCreateInputSchema: z.ZodObject<{
1062
1062
  version: z.ZodString;
1063
1063
  url: z.ZodURL;
1064
1064
  }, z.core.$strip>>>;
1065
+ replacesSubscriptionId: z.ZodOptional<z.ZodUUID>;
1065
1066
  }, z.core.$strip>;
1066
1067
  type CheckoutSessionCreateInput = z.input<typeof CheckoutSessionCreateInputSchema>;
1067
1068
  type CheckoutSessionCreateParsed = z.output<typeof CheckoutSessionCreateInputSchema>;
@@ -1071,13 +1072,28 @@ type CheckoutSessionCreateParsed = z.output<typeof CheckoutSessionCreateInputSch
1071
1072
  */
1072
1073
  declare const CheckoutStatusSchema: z.ZodEnum<{
1073
1074
  canceled: "canceled";
1074
- expired: "expired";
1075
- open: "open";
1076
1075
  completed: "completed";
1076
+ expired: "expired";
1077
1077
  failed: "failed";
1078
+ open: "open";
1078
1079
  }>;
1079
1080
  type CheckoutStatus = z.infer<typeof CheckoutStatusSchema>;
1080
- /** Provider form shown on steward's hosted checkout page (never returned to the product). */
1081
+ /**
1082
+ * How the customer chose to pay on the hosted page (bank transfer plan H5): `card` (the provider's
1083
+ * form) or `bank_transfer` (the session stays `open` until an operator records the transfer).
1084
+ * Absent/null: not chosen yet. The session status set does not change for it.
1085
+ */
1086
+ declare const PAYMENT_METHODS: readonly ['card', 'bank_transfer'];
1087
+ declare const PaymentMethodSchema: z.ZodEnum<{
1088
+ bank_transfer: "bank_transfer";
1089
+ card: "card";
1090
+ }>;
1091
+ type PaymentMethod = z.infer<typeof PaymentMethodSchema>;
1092
+ /**
1093
+ * Provider form shown on steward's hosted checkout page (never returned to the product).
1094
+ * @deprecated Ürün yüzeyinde kullanılmıyor; yalnızca servis içi. Bir sonraki minor sürümde paketin
1095
+ * dış yüzeyinden çıkarılacak (temizlik planı C9).
1096
+ */
1081
1097
  declare const ProviderPayloadSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1082
1098
  type: z.ZodLiteral<"html_snippet">;
1083
1099
  html: z.ZodString;
@@ -1091,10 +1107,10 @@ declare const CheckoutSessionSchema: z.ZodObject<{
1091
1107
  accountRef: z.ZodString;
1092
1108
  status: z.ZodEnum<{
1093
1109
  canceled: "canceled";
1094
- expired: "expired";
1095
- open: "open";
1096
1110
  completed: "completed";
1111
+ expired: "expired";
1097
1112
  failed: "failed";
1113
+ open: "open";
1098
1114
  }>;
1099
1115
  planCode: z.ZodString;
1100
1116
  interval: z.ZodEnum<{
@@ -1119,6 +1135,11 @@ declare const CheckoutSessionSchema: z.ZodObject<{
1119
1135
  expiresAt: z.ZodISODateTime;
1120
1136
  createdAt: z.ZodISODateTime;
1121
1137
  completedAt: z.ZodNullable<z.ZodISODateTime>;
1138
+ paymentMethod: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
1139
+ bank_transfer: "bank_transfer";
1140
+ card: "card";
1141
+ }>>>;
1142
+ replacesSubscriptionId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
1122
1143
  }, z.core.$strip>;
1123
1144
  type CheckoutSession = z.infer<typeof CheckoutSessionSchema>;
1124
1145
  /**
@@ -1131,10 +1152,10 @@ declare const CheckoutSessionCreatedSchema: z.ZodObject<{
1131
1152
  accountRef: z.ZodString;
1132
1153
  status: z.ZodEnum<{
1133
1154
  canceled: "canceled";
1134
- expired: "expired";
1135
- open: "open";
1136
1155
  completed: "completed";
1156
+ expired: "expired";
1137
1157
  failed: "failed";
1158
+ open: "open";
1138
1159
  }>;
1139
1160
  planCode: z.ZodString;
1140
1161
  interval: z.ZodEnum<{
@@ -1159,6 +1180,11 @@ declare const CheckoutSessionCreatedSchema: z.ZodObject<{
1159
1180
  expiresAt: z.ZodISODateTime;
1160
1181
  createdAt: z.ZodISODateTime;
1161
1182
  completedAt: z.ZodNullable<z.ZodISODateTime>;
1183
+ paymentMethod: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
1184
+ bank_transfer: "bank_transfer";
1185
+ card: "card";
1186
+ }>>>;
1187
+ replacesSubscriptionId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
1162
1188
  url: z.ZodString;
1163
1189
  account: z.ZodOptional<z.ZodObject<{
1164
1190
  version: z.ZodNumber;
@@ -1176,10 +1202,10 @@ declare const CheckoutSessionCreatedSchema: z.ZodObject<{
1176
1202
  id: z.ZodUUID;
1177
1203
  status: z.ZodEnum<{
1178
1204
  active: "active";
1179
- suspended: "suspended";
1180
- past_due: "past_due";
1181
1205
  canceled: "canceled";
1182
1206
  expired: "expired";
1207
+ past_due: "past_due";
1208
+ suspended: "suspended";
1183
1209
  }>;
1184
1210
  planCode: z.ZodString;
1185
1211
  interval: z.ZodEnum<{
@@ -1218,22 +1244,26 @@ declare const CheckoutSessionCreatedSchema: z.ZodObject<{
1218
1244
  currency: z.ZodString;
1219
1245
  amountMinor: z.ZodNumber;
1220
1246
  expiresAt: z.ZodISODateTime;
1247
+ paymentMethod: z.ZodOptional<z.ZodEnum<{
1248
+ bank_transfer: "bank_transfer";
1249
+ card: "card";
1250
+ }>>;
1221
1251
  }, z.core.$strip>>;
1222
1252
  profile: z.ZodObject<{
1223
1253
  present: z.ZodBoolean;
1224
1254
  kind: z.ZodNullable<z.ZodEnum<{
1225
- individual: "individual";
1226
1255
  company: "company";
1256
+ individual: "individual";
1227
1257
  }>>;
1228
1258
  }, z.core.$strip>;
1229
1259
  subscriptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1230
1260
  id: z.ZodUUID;
1231
1261
  status: z.ZodEnum<{
1232
1262
  active: "active";
1233
- suspended: "suspended";
1234
- past_due: "past_due";
1235
1263
  canceled: "canceled";
1236
1264
  expired: "expired";
1265
+ past_due: "past_due";
1266
+ suspended: "suspended";
1237
1267
  }>;
1238
1268
  planCode: z.ZodString;
1239
1269
  interval: z.ZodEnum<{
@@ -1265,11 +1295,11 @@ declare const CheckoutSessionCreatedSchema: z.ZodObject<{
1265
1295
  id: z.ZodUUID;
1266
1296
  subscriptionId: z.ZodNullable<z.ZodUUID>;
1267
1297
  billingReason: z.ZodEnum<{
1298
+ manual: "manual";
1299
+ purchase: "purchase";
1268
1300
  subscription_create: "subscription_create";
1269
1301
  subscription_cycle: "subscription_cycle";
1270
1302
  subscription_update: "subscription_update";
1271
- purchase: "purchase";
1272
- manual: "manual";
1273
1303
  }>;
1274
1304
  totalMinor: z.ZodNumber;
1275
1305
  currency: z.ZodString;
@@ -1286,16 +1316,17 @@ declare const CheckoutSessionCreatedSchema: z.ZodObject<{
1286
1316
  includedUnits: z.ZodNullable<z.ZodNumber>;
1287
1317
  billable: z.ZodBoolean;
1288
1318
  standing: z.ZodEnum<{
1289
- ok: "ok";
1290
- low: "low";
1291
1319
  exhausted: "exhausted";
1320
+ low: "low";
1321
+ ok: "ok";
1292
1322
  }>;
1293
1323
  }, z.core.$strip>>>;
1324
+ bankTransferCode: z.ZodOptional<z.ZodString>;
1294
1325
  }, z.core.$strip>>;
1295
1326
  }, z.core.$strip>;
1296
1327
  type CheckoutSessionCreated = z.infer<typeof CheckoutSessionCreatedSchema>;
1297
1328
  /** `STATUS` value of the outcome redirect (`{STATUS}` placeholder in `successUrl`). */
1298
- type CheckoutReturnStatus = "success" | "failed" | "pending";
1329
+ type CheckoutReturnStatus = 'success' | 'failed' | 'pending';
1299
1330
  /** Redirect input: the stored session fields (service row). */
1300
1331
  type CheckoutRedirectTarget = {
1301
1332
  id: string;
@@ -1311,141 +1342,598 @@ type CheckoutRedirectTarget = {
1311
1342
  * would change the URL is returned unfilled.
1312
1343
  */
1313
1344
  declare function checkoutRedirectUrl(target: CheckoutRedirectTarget, status: CheckoutReturnStatus): string;
1314
- declare const CHECKOUT_ERRORS: readonly ["account_not_found", "already_subscribed", "plan_not_sellable", "return_url_not_allowed", "provider_not_configured", "provider_error", "account_deleted", "meter_already_billed"];
1315
- type CheckoutError = (typeof CHECKOUT_ERRORS)[number];
1316
- //#endregion
1317
- //#region ../contract/src/portal.d.ts
1318
- declare const PortalSessionCreateInputSchema: z.ZodObject<{
1319
- locale: z.ZodOptional<z.ZodEnum<{
1320
- tr: "tr";
1321
- en: "en";
1322
- }>>;
1323
- returnUrl: z.ZodOptional<z.ZodURL>;
1324
- }, z.core.$strip>;
1325
- type PortalSessionCreateInput = z.input<typeof PortalSessionCreateInputSchema>;
1326
- /** `POST /v1/accounts/{ref}/portal-sessions` yanıtı (201). */
1327
- declare const PortalSessionSchema: z.ZodObject<{
1328
- id: z.ZodUUID;
1329
- url: z.ZodString;
1330
- expiresAt: z.ZodISODateTime;
1331
- }, z.core.$strip>;
1332
- type PortalSession = z.infer<typeof PortalSessionSchema>;
1333
- declare const PORTAL_SESSION_ERRORS: readonly ["account_not_found", "return_url_not_allowed"];
1334
- type PortalSessionError = (typeof PORTAL_SESSION_ERRORS)[number];
1335
- //#endregion
1336
- //#region ../contract/src/subscriptions.d.ts
1337
- declare const SubscriptionSchema: z.ZodObject<{
1338
- id: z.ZodUUID;
1339
- accountRef: z.ZodString;
1340
- status: z.ZodEnum<{
1341
- active: "active";
1342
- suspended: "suspended";
1343
- past_due: "past_due";
1344
- canceled: "canceled";
1345
- expired: "expired";
1346
- }>;
1347
- planCode: z.ZodString;
1348
- priceId: z.ZodUUID;
1349
- interval: z.ZodEnum<{
1350
- month: "month";
1351
- year: "year";
1352
- }>;
1353
- amountMinor: z.ZodNumber;
1354
- currency: z.ZodString;
1355
- provider: z.ZodString;
1356
- providerSubscriptionRef: z.ZodString;
1357
- cancelAtPeriodEnd: z.ZodBoolean;
1358
- cancelAt: z.ZodNullable<z.ZodISODateTime>;
1359
- cancelReason: z.ZodNullable<z.ZodString>;
1360
- canceledAt: z.ZodNullable<z.ZodISODateTime>;
1361
- startedAt: z.ZodISODateTime;
1362
- currentPeriodStart: z.ZodNullable<z.ZodISODateTime>;
1363
- currentPeriodEnd: z.ZodNullable<z.ZodISODateTime>;
1364
- dunningStartedAt: z.ZodNullable<z.ZodISODateTime>;
1365
- }, z.core.$strip>;
1366
- type Subscription = z.infer<typeof SubscriptionSchema>;
1367
- declare const CancelSubscriptionInputSchema: z.ZodObject<{
1368
- mode: z.ZodEnum<{
1369
- at_period_end: "at_period_end";
1370
- immediate: "immediate";
1371
- }>;
1372
- reason: z.ZodString;
1373
- skipProvider: z.ZodDefault<z.ZodBoolean>;
1374
- }, z.core.$strip>;
1375
- type CancelSubscriptionInput = z.input<typeof CancelSubscriptionInputSchema>;
1345
+ declare const CHECKOUT_ERRORS: readonly ['account_not_found',
1346
+ /** Canlı abonelik var (dönem sonunda iptali planlanmış olan dahil). */
1347
+ 'already_subscribed', 'plan_not_sellable', 'return_url_not_allowed', 'provider_not_configured', 'provider_error',
1348
+ /** The account was deleted (F4e): `displayName` does not reopen it. */
1349
+ 'account_deleted',
1376
1350
  /**
1377
- * `POST /v1/subscriptions/{id}/change` (billing core MF9): schedule a change for the next period
1378
- * boundary (`AccountState.subscription.scheduledChange`); the next renewal invoice is written from
1379
- * the new terms. `planCode` / `interval` pick another price of the subscription's currency;
1380
- * `price: "current"` re-locks the current amount of the (possibly updated) price and the plan's
1381
- * current metered rates — a metered price added later is attached only this way (M20, M36). At
1382
- * least one of the three. `when` is required so other timings can be added later. A second change
1383
- * replaces the first; asking for the current plan and interval while a change is pending takes it
1384
- * back ("keep my plan"; a move to the current price the operator announced stays).
1385
- * Errors: 404 `subscription_not_found`; 409 `already_subscribed` (another live subscription of the
1386
- * account holds the target plan or is moving to it), `meter_already_billed` (the target prices a
1387
- * meter another live subscription bills; for `price: "current"` only when that is the only
1388
- * difference); 422 `plan_not_found`, `plan_not_sellable`, `subscription_change_invalid` (no such
1389
- * price, nothing changes, the subscription is not live, has a cancellation scheduled or is a legacy
1390
- * provider subscription).
1351
+ * 409 (metering, M20/M34): the plan has a metered price for a meter another live subscription of
1352
+ * the account already bills (one billing subscription per meter). Checked when the session is
1353
+ * opened and again before the payment form; a payment that still races past it is recorded for a
1354
+ * refund (`checkout.duplicate_payment`).
1391
1355
  */
1392
- declare const SubscriptionChangeInputSchema: z.ZodObject<{
1393
- planCode: z.ZodOptional<z.ZodString>;
1394
- interval: z.ZodOptional<z.ZodEnum<{
1395
- month: "month";
1396
- year: "year";
1397
- }>>;
1398
- price: z.ZodOptional<z.ZodLiteral<"current">>;
1399
- when: z.ZodLiteral<"next_period">;
1400
- }, z.core.$strip>;
1401
- type SubscriptionChangeInput = z.input<typeof SubscriptionChangeInputSchema>;
1402
- declare const PaymentSchema: z.ZodObject<{
1403
- id: z.ZodUUID;
1404
- subscriptionId: z.ZodUUID;
1405
- providerOrderRef: z.ZodString;
1406
- status: z.ZodEnum<{
1407
- failed: "failed";
1408
- succeeded: "succeeded";
1409
- }>;
1356
+ 'meter_already_billed',
1357
+ /** 422 (H16): `replacesSubscriptionId` is not a live subscription of the account. */
1358
+ 'replaces_subscription_invalid'];
1359
+ type CheckoutError = (typeof CHECKOUT_ERRORS)[number];
1360
+ //#endregion
1361
+ //#region ../contract/src/bank-transfers.d.ts
1362
+ declare const BankTransferRecordInputSchema: z.ZodObject<{
1363
+ code: z.ZodString;
1410
1364
  amountMinor: z.ZodNumber;
1411
1365
  currency: z.ZodString;
1412
- periodStart: z.ZodNullable<z.ZodISODateTime>;
1413
- periodEnd: z.ZodNullable<z.ZodISODateTime>;
1414
- occurredAt: z.ZodISODateTime;
1415
- }, z.core.$strip>;
1416
- type Payment = z.infer<typeof PaymentSchema>;
1417
- /** Upper bound of named benefits in one grant. */
1418
- declare const MAX_GRANT_BENEFITS = 100;
1419
- declare const GrantCreateInputSchema: z.ZodObject<{
1420
- planCode: z.ZodOptional<z.ZodString>;
1421
- overrides: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNumber, z.ZodBoolean, z.ZodString, z.ZodNull]>>>;
1422
- benefitCodes: z.ZodOptional<z.ZodArray<z.ZodString>>;
1423
- reason: z.ZodString;
1424
- startsAt: z.ZodOptional<z.ZodISODateTime>;
1425
- endsAt: z.ZodOptional<z.ZodISODateTime>;
1426
- }, z.core.$strip>;
1427
- type GrantCreateInput = z.input<typeof GrantCreateInputSchema>;
1428
- declare const GrantSchema: z.ZodObject<{
1429
- id: z.ZodUUID;
1366
+ receivedAt: z.ZodISODateTime;
1367
+ bankRef: z.ZodString;
1368
+ checkoutSessionId: z.ZodOptional<z.ZodUUID>;
1369
+ invoiceId: z.ZodOptional<z.ZodUUID>;
1370
+ acceptExpired: z.ZodOptional<z.ZodBoolean>;
1371
+ }, z.core.$strict>;
1372
+ type BankTransferRecordInput = z.input<typeof BankTransferRecordInputSchema>;
1373
+ declare const BankTransferRecordedSchema: z.ZodObject<{
1430
1374
  accountRef: z.ZodString;
1431
- planCode: z.ZodNullable<z.ZodString>;
1432
- overrides: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNumber, z.ZodBoolean, z.ZodString, z.ZodNull]>>;
1433
- benefitCodes: z.ZodOptional<z.ZodArray<z.ZodString>>;
1434
- reason: z.ZodString;
1435
- actorRef: z.ZodNullable<z.ZodString>;
1436
- startsAt: z.ZodISODateTime;
1437
- endsAt: z.ZodNullable<z.ZodISODateTime>;
1438
- revokedAt: z.ZodNullable<z.ZodISODateTime>;
1439
- createdAt: z.ZodISODateTime;
1440
- }, z.core.$strip>;
1441
- type Grant = z.infer<typeof GrantSchema>;
1442
- declare const StatsSchema: z.ZodObject<{
1443
- subscriptions: z.ZodRecord<z.ZodEnum<{
1444
- active: "active";
1445
- suspended: "suspended";
1375
+ code: z.ZodString;
1376
+ checkoutSessionId: z.ZodNullable<z.ZodUUID>;
1377
+ invoiceId: z.ZodNullable<z.ZodUUID>;
1378
+ subscriptionId: z.ZodUUID;
1379
+ paymentId: z.ZodUUID;
1380
+ replacedSubscriptionId: z.ZodNullable<z.ZodUUID>;
1381
+ acceptedAfterExpiry: z.ZodBoolean;
1382
+ paidAfterWriteoff: z.ZodBoolean;
1383
+ account: z.ZodOptional<z.ZodObject<{
1384
+ version: z.ZodNumber;
1385
+ planCode: z.ZodString;
1386
+ accessState: z.ZodEnum<{
1387
+ active: "active";
1388
+ suspended: "suspended";
1389
+ }>;
1390
+ entitlements: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNumber, z.ZodBoolean, z.ZodString, z.ZodNull]>>;
1391
+ ref: z.ZodString;
1392
+ displayName: z.ZodString;
1393
+ updatedAt: z.ZodISODateTime;
1394
+ catalogVersion: z.ZodNullable<z.ZodString>;
1395
+ subscription: z.ZodNullable<z.ZodObject<{
1396
+ id: z.ZodUUID;
1397
+ status: z.ZodEnum<{
1398
+ active: "active";
1399
+ canceled: "canceled";
1400
+ expired: "expired";
1401
+ past_due: "past_due";
1402
+ suspended: "suspended";
1403
+ }>;
1404
+ planCode: z.ZodString;
1405
+ interval: z.ZodEnum<{
1406
+ month: "month";
1407
+ year: "year";
1408
+ }>;
1409
+ amountMinor: z.ZodNumber;
1410
+ currency: z.ZodString;
1411
+ currentPeriodEnd: z.ZodNullable<z.ZodISODateTime>;
1412
+ cancelAt: z.ZodNullable<z.ZodISODateTime>;
1413
+ cancelAtPeriodEnd: z.ZodBoolean;
1414
+ pastDueSince: z.ZodNullable<z.ZodISODateTime>;
1415
+ currentPeriodStart: z.ZodNullable<z.ZodISODateTime>;
1416
+ dunning: z.ZodNullable<z.ZodObject<{
1417
+ step: z.ZodNumber;
1418
+ nextActionAt: z.ZodNullable<z.ZodISODateTime>;
1419
+ }, z.core.$strip>>;
1420
+ scheduledChange: z.ZodNullable<z.ZodObject<{
1421
+ planCode: z.ZodString;
1422
+ interval: z.ZodEnum<{
1423
+ month: "month";
1424
+ year: "year";
1425
+ }>;
1426
+ effectiveAt: z.ZodISODateTime;
1427
+ amountMinor: z.ZodOptional<z.ZodNumber>;
1428
+ }, z.core.$strip>>;
1429
+ }, z.core.$strip>>;
1430
+ openCheckout: z.ZodNullable<z.ZodObject<{
1431
+ id: z.ZodUUID;
1432
+ planCode: z.ZodString;
1433
+ interval: z.ZodEnum<{
1434
+ month: "month";
1435
+ year: "year";
1436
+ }>;
1437
+ intervalCount: z.ZodNumber;
1438
+ currency: z.ZodString;
1439
+ amountMinor: z.ZodNumber;
1440
+ expiresAt: z.ZodISODateTime;
1441
+ paymentMethod: z.ZodOptional<z.ZodEnum<{
1442
+ bank_transfer: "bank_transfer";
1443
+ card: "card";
1444
+ }>>;
1445
+ }, z.core.$strip>>;
1446
+ profile: z.ZodObject<{
1447
+ present: z.ZodBoolean;
1448
+ kind: z.ZodNullable<z.ZodEnum<{
1449
+ company: "company";
1450
+ individual: "individual";
1451
+ }>>;
1452
+ }, z.core.$strip>;
1453
+ subscriptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1454
+ id: z.ZodUUID;
1455
+ status: z.ZodEnum<{
1456
+ active: "active";
1457
+ canceled: "canceled";
1458
+ expired: "expired";
1459
+ past_due: "past_due";
1460
+ suspended: "suspended";
1461
+ }>;
1462
+ planCode: z.ZodString;
1463
+ interval: z.ZodEnum<{
1464
+ month: "month";
1465
+ year: "year";
1466
+ }>;
1467
+ amountMinor: z.ZodNumber;
1468
+ currency: z.ZodString;
1469
+ currentPeriodEnd: z.ZodNullable<z.ZodISODateTime>;
1470
+ cancelAt: z.ZodNullable<z.ZodISODateTime>;
1471
+ cancelAtPeriodEnd: z.ZodBoolean;
1472
+ pastDueSince: z.ZodNullable<z.ZodISODateTime>;
1473
+ currentPeriodStart: z.ZodNullable<z.ZodISODateTime>;
1474
+ dunning: z.ZodNullable<z.ZodObject<{
1475
+ step: z.ZodNumber;
1476
+ nextActionAt: z.ZodNullable<z.ZodISODateTime>;
1477
+ }, z.core.$strip>>;
1478
+ scheduledChange: z.ZodNullable<z.ZodObject<{
1479
+ planCode: z.ZodString;
1480
+ interval: z.ZodEnum<{
1481
+ month: "month";
1482
+ year: "year";
1483
+ }>;
1484
+ effectiveAt: z.ZodISODateTime;
1485
+ amountMinor: z.ZodOptional<z.ZodNumber>;
1486
+ }, z.core.$strip>>;
1487
+ }, z.core.$strip>>>;
1488
+ openInvoices: z.ZodOptional<z.ZodArray<z.ZodObject<{
1489
+ id: z.ZodUUID;
1490
+ subscriptionId: z.ZodNullable<z.ZodUUID>;
1491
+ billingReason: z.ZodEnum<{
1492
+ manual: "manual";
1493
+ purchase: "purchase";
1494
+ subscription_create: "subscription_create";
1495
+ subscription_cycle: "subscription_cycle";
1496
+ subscription_update: "subscription_update";
1497
+ }>;
1498
+ totalMinor: z.ZodNumber;
1499
+ currency: z.ZodString;
1500
+ dueAt: z.ZodISODateTime;
1501
+ }, z.core.$strip>>>;
1502
+ benefits: z.ZodOptional<z.ZodArray<z.ZodObject<{
1503
+ code: z.ZodNullable<z.ZodString>;
1504
+ type: z.ZodString;
1505
+ properties: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1506
+ source: z.ZodString;
1507
+ grantedAt: z.ZodISODateTime;
1508
+ }, z.core.$strip>>>;
1509
+ meters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1510
+ includedUnits: z.ZodNullable<z.ZodNumber>;
1511
+ billable: z.ZodBoolean;
1512
+ standing: z.ZodEnum<{
1513
+ exhausted: "exhausted";
1514
+ low: "low";
1515
+ ok: "ok";
1516
+ }>;
1517
+ }, z.core.$strip>>>;
1518
+ bankTransferCode: z.ZodOptional<z.ZodString>;
1519
+ }, z.core.$strip>>;
1520
+ }, z.core.$strip>;
1521
+ type BankTransferRecorded = z.infer<typeof BankTransferRecordedSchema>;
1522
+ //#endregion
1523
+ //#region ../contract/src/admin.d.ts
1524
+ declare const API_KEY_SCOPES: readonly ['product', 'admin', 'checkout'];
1525
+ declare const ApiKeyScopeSchema: z.ZodEnum<{
1526
+ admin: "admin";
1527
+ checkout: "checkout";
1528
+ product: "product";
1529
+ }>;
1530
+ type ApiKeyScope = z.infer<typeof ApiKeyScopeSchema>;
1531
+ /** The public part of a key: the 12 hex characters after `stw_` (in logs, audit rows and `doctor`). */
1532
+ declare const ApiKeyPrefixSchema: z.ZodString;
1533
+ /**
1534
+ * `stw_<prefix: 12 hex>_<secret: 43 base64url>`. A low-variety secret (e.g. one character
1535
+ * repeated) is refused; `generateApiKeyToken` draws 32 random bytes.
1536
+ */
1537
+ declare const ApiKeyTokenSchema: z.ZodString;
1538
+ /** Longest expiry a key can be given, in days (about ten years). */
1539
+ declare const MAX_API_KEY_TTL_DAYS = 3650;
1540
+ declare const ApiKeyCreateInputSchema: z.ZodObject<{
1541
+ token: z.ZodString;
1542
+ name: z.ZodString;
1543
+ scope: z.ZodEnum<{
1544
+ admin: "admin";
1545
+ checkout: "checkout";
1546
+ product: "product";
1547
+ }>;
1548
+ expiresInDays: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1549
+ }, z.core.$strict>;
1550
+ type ApiKeyCreateInput = z.input<typeof ApiKeyCreateInputSchema>;
1551
+ declare const ApiKeySchema: z.ZodObject<{
1552
+ prefix: z.ZodString;
1553
+ name: z.ZodString;
1554
+ scope: z.ZodEnum<{
1555
+ admin: "admin";
1556
+ checkout: "checkout";
1557
+ product: "product";
1558
+ }>;
1559
+ createdAt: z.ZodISODateTime;
1560
+ lastUsedAt: z.ZodNullable<z.ZodISODateTime>;
1561
+ expiresAt: z.ZodNullable<z.ZodISODateTime>;
1562
+ revokedAt: z.ZodNullable<z.ZodISODateTime>;
1563
+ }, z.core.$strip>;
1564
+ type ApiKey = z.infer<typeof ApiKeySchema>;
1565
+ /** `GET /v1/admin/api-keys`: the product's keys, revoked and expired ones included, oldest first. */
1566
+ declare const ApiKeyListSchema: z.ZodObject<{
1567
+ items: z.ZodArray<z.ZodObject<{
1568
+ prefix: z.ZodString;
1569
+ name: z.ZodString;
1570
+ scope: z.ZodEnum<{
1571
+ admin: "admin";
1572
+ checkout: "checkout";
1573
+ product: "product";
1574
+ }>;
1575
+ createdAt: z.ZodISODateTime;
1576
+ lastUsedAt: z.ZodNullable<z.ZodISODateTime>;
1577
+ expiresAt: z.ZodNullable<z.ZodISODateTime>;
1578
+ revokedAt: z.ZodNullable<z.ZodISODateTime>;
1579
+ }, z.core.$strip>>;
1580
+ }, z.core.$strip>;
1581
+ type ApiKeyList = z.infer<typeof ApiKeyListSchema>;
1582
+ /** A new API key token (`stw_…`), Web Crypto; Node ≥22, edge and workerd. Store it once, send it once. */
1583
+ declare function generateApiKeyToken(): string;
1584
+ declare const DUNNING_ACTIONS: readonly ['retry_payment', 'suspend', 'terminate'];
1585
+ /**
1586
+ * `products.dunning_policy`: steps by days after the first failed payment; `dryRun` only audits.
1587
+ * Not strict: stored policies are read through it too (an unknown field must not turn a stored
1588
+ * policy into the default).
1589
+ */
1590
+ declare const DunningPolicySchema: z.ZodObject<{
1591
+ steps: z.ZodArray<z.ZodObject<{
1592
+ afterDays: z.ZodNumber;
1593
+ action: z.ZodEnum<{
1594
+ retry_payment: "retry_payment";
1595
+ suspend: "suspend";
1596
+ terminate: "terminate";
1597
+ }>;
1598
+ }, z.core.$strip>>;
1599
+ dryRun: z.ZodDefault<z.ZodBoolean>;
1600
+ }, z.core.$strip>;
1601
+ type DunningPolicy = z.output<typeof DunningPolicySchema>;
1602
+ type DunningPolicyInput = z.input<typeof DunningPolicySchema>;
1603
+ /** `POST /v1/admin/events/:id/redeliver`: every delivery of the event requeued, attempts reset. */
1604
+ declare const RedeliveredEventSchema: z.ZodObject<{
1605
+ eventId: z.ZodString;
1606
+ type: z.ZodString;
1607
+ deliveries: z.ZodArray<z.ZodObject<{
1608
+ endpointId: z.ZodUUID;
1609
+ status: z.ZodEnum<{
1610
+ dead: "dead";
1611
+ delivered: "delivered";
1612
+ pending: "pending";
1613
+ }>;
1614
+ attempts: z.ZodNumber;
1615
+ nextAttemptAt: z.ZodISODateTime;
1616
+ }, z.core.$strip>>;
1617
+ }, z.core.$strip>;
1618
+ type RedeliveredEvent = z.infer<typeof RedeliveredEventSchema>;
1619
+ declare const MAX_NOTICE_DAYS = 3650;
1620
+ declare const RepriceInputSchema: z.ZodObject<{
1621
+ planCode: z.ZodString;
1622
+ noticeDays: z.ZodNumber;
1623
+ dryRun: z.ZodBoolean;
1624
+ }, z.core.$strict>;
1625
+ type RepriceInput = z.input<typeof RepriceInputSchema>;
1626
+ declare const RepriceItemSchema: z.ZodObject<{
1627
+ subscriptionId: z.ZodUUID;
1628
+ accountRef: z.ZodString;
1629
+ interval: z.ZodEnum<{
1630
+ month: "month";
1631
+ year: "year";
1632
+ }>;
1633
+ currency: z.ZodString;
1634
+ oldAmountMinor: z.ZodNumber;
1635
+ newAmountMinor: z.ZodNumber;
1636
+ taxInclusive: z.ZodBoolean;
1637
+ effectiveAt: z.ZodNullable<z.ZodISODateTime>;
1638
+ action: z.ZodEnum<{
1639
+ already_scheduled: "already_scheduled";
1640
+ schedule: "schedule";
1641
+ skip: "skip";
1642
+ }>;
1643
+ reason: z.ZodOptional<z.ZodEnum<{
1644
+ cancel_scheduled: "cancel_scheduled";
1645
+ change_scheduled: "change_scheduled";
1646
+ legacy_provider: "legacy_provider";
1647
+ no_period: "no_period";
1648
+ }>>;
1649
+ meteredRates: z.ZodOptional<z.ZodArray<z.ZodObject<{
1650
+ meter: z.ZodString;
1651
+ label: z.ZodObject<{
1652
+ tr: z.ZodString;
1653
+ en: z.ZodString;
1654
+ }, z.core.$strip>;
1655
+ unitLabel: z.ZodNullable<z.ZodObject<{
1656
+ tr: z.ZodString;
1657
+ en: z.ZodString;
1658
+ }, z.core.$strip>>;
1659
+ displayPer: z.ZodNullable<z.ZodNumber>;
1660
+ oldRate: z.ZodNullable<z.ZodObject<{
1661
+ amountMinor: z.ZodNumber;
1662
+ perUnits: z.ZodNumber;
1663
+ capMinor: z.ZodNullable<z.ZodNumber>;
1664
+ }, z.core.$strip>>;
1665
+ newRate: z.ZodNullable<z.ZodObject<{
1666
+ amountMinor: z.ZodNumber;
1667
+ perUnits: z.ZodNumber;
1668
+ capMinor: z.ZodNullable<z.ZodNumber>;
1669
+ }, z.core.$strip>>;
1670
+ }, z.core.$strip>>>;
1671
+ }, z.core.$strip>;
1672
+ type RepriceItem = z.infer<typeof RepriceItemSchema>;
1673
+ declare const RepriceResultSchema: z.ZodObject<{
1674
+ dryRun: z.ZodBoolean;
1675
+ effectiveNotBefore: z.ZodISODateTime;
1676
+ scheduled: z.ZodNumber;
1677
+ items: z.ZodArray<z.ZodObject<{
1678
+ subscriptionId: z.ZodUUID;
1679
+ accountRef: z.ZodString;
1680
+ interval: z.ZodEnum<{
1681
+ month: "month";
1682
+ year: "year";
1683
+ }>;
1684
+ currency: z.ZodString;
1685
+ oldAmountMinor: z.ZodNumber;
1686
+ newAmountMinor: z.ZodNumber;
1687
+ taxInclusive: z.ZodBoolean;
1688
+ effectiveAt: z.ZodNullable<z.ZodISODateTime>;
1689
+ action: z.ZodEnum<{
1690
+ already_scheduled: "already_scheduled";
1691
+ schedule: "schedule";
1692
+ skip: "skip";
1693
+ }>;
1694
+ reason: z.ZodOptional<z.ZodEnum<{
1695
+ cancel_scheduled: "cancel_scheduled";
1696
+ change_scheduled: "change_scheduled";
1697
+ legacy_provider: "legacy_provider";
1698
+ no_period: "no_period";
1699
+ }>>;
1700
+ meteredRates: z.ZodOptional<z.ZodArray<z.ZodObject<{
1701
+ meter: z.ZodString;
1702
+ label: z.ZodObject<{
1703
+ tr: z.ZodString;
1704
+ en: z.ZodString;
1705
+ }, z.core.$strip>;
1706
+ unitLabel: z.ZodNullable<z.ZodObject<{
1707
+ tr: z.ZodString;
1708
+ en: z.ZodString;
1709
+ }, z.core.$strip>>;
1710
+ displayPer: z.ZodNullable<z.ZodNumber>;
1711
+ oldRate: z.ZodNullable<z.ZodObject<{
1712
+ amountMinor: z.ZodNumber;
1713
+ perUnits: z.ZodNumber;
1714
+ capMinor: z.ZodNullable<z.ZodNumber>;
1715
+ }, z.core.$strip>>;
1716
+ newRate: z.ZodNullable<z.ZodObject<{
1717
+ amountMinor: z.ZodNumber;
1718
+ perUnits: z.ZodNumber;
1719
+ capMinor: z.ZodNullable<z.ZodNumber>;
1720
+ }, z.core.$strip>>;
1721
+ }, z.core.$strip>>>;
1722
+ }, z.core.$strip>>;
1723
+ }, z.core.$strip>;
1724
+ type RepriceResult = z.infer<typeof RepriceResultSchema>;
1725
+ /** `POST /v1/admin/accounts/:ref/meters/recompute`: every meter, or one. */
1726
+ declare const MeterRecomputeInputSchema: z.ZodObject<{
1727
+ meter: z.ZodOptional<z.ZodString>;
1728
+ }, z.core.$strict>;
1729
+ type MeterRecomputeInput = z.input<typeof MeterRecomputeInputSchema>;
1730
+ declare const MeterRecomputeResultSchema: z.ZodObject<{
1731
+ items: z.ZodArray<z.ZodObject<{
1732
+ meter: z.ZodString;
1733
+ periodStart: z.ZodNullable<z.ZodISODateTime>;
1734
+ periodEnd: z.ZodNullable<z.ZodISODateTime>;
1735
+ before: z.ZodNullable<z.ZodString>;
1736
+ after: z.ZodNullable<z.ZodString>;
1737
+ }, z.core.$strip>>;
1738
+ }, z.core.$strip>;
1739
+ type MeterRecomputeResult = z.infer<typeof MeterRecomputeResultSchema>;
1740
+ /** `POST /v1/admin/accounts/:ref/meters/close-periods`: `force` does not wait for unrolled events. */
1741
+ declare const MeterClosePeriodsInputSchema: z.ZodObject<{
1742
+ meter: z.ZodOptional<z.ZodString>;
1743
+ force: z.ZodOptional<z.ZodBoolean>;
1744
+ }, z.core.$strict>;
1745
+ type MeterClosePeriodsInput = z.input<typeof MeterClosePeriodsInputSchema>;
1746
+ declare const MeterClosePeriodsResultSchema: z.ZodObject<{
1747
+ closed: z.ZodNumber;
1748
+ events: z.ZodNumber;
1749
+ pending: z.ZodNumber;
1750
+ }, z.core.$strip>;
1751
+ type MeterClosePeriodsResult = z.infer<typeof MeterClosePeriodsResultSchema>;
1752
+ /**
1753
+ * `POST /v1/admin/accounts/:ref/credits`: positive units = `manual_grant` (as the product route),
1754
+ * negative = `adjustment` (a correction; admin only, issue #57 decision 3). Response:
1755
+ * `CreditGrantResponseSchema`.
1756
+ */
1757
+ declare const CreditAdjustmentInputSchema: z.ZodObject<{
1758
+ meter: z.ZodString;
1759
+ units: z.ZodNumber;
1760
+ reason: z.ZodString;
1761
+ }, z.core.$strict>;
1762
+ type CreditAdjustmentInput = z.input<typeof CreditAdjustmentInputSchema>;
1763
+ declare const BANK_TRANSFER_LIST_STATUSES: readonly ['pending', 'expired'];
1764
+ declare const BankTransferListStatusSchema: z.ZodEnum<{
1765
+ expired: "expired";
1766
+ pending: "pending";
1767
+ }>;
1768
+ type BankTransferListStatus = z.infer<typeof BankTransferListStatusSchema>;
1769
+ declare const BankTransferListItemSchema: z.ZodObject<{
1770
+ kind: z.ZodEnum<{
1771
+ checkout: "checkout";
1772
+ invoice: "invoice";
1773
+ }>;
1774
+ id: z.ZodUUID;
1775
+ status: z.ZodString;
1776
+ planCode: z.ZodNullable<z.ZodString>;
1777
+ totalMinor: z.ZodNumber;
1778
+ currency: z.ZodString;
1779
+ deadline: z.ZodNullable<z.ZodISODateTime>;
1780
+ code: z.ZodNullable<z.ZodString>;
1781
+ accountRef: z.ZodString;
1782
+ selectedAt: z.ZodNullable<z.ZodISODateTime>;
1783
+ }, z.core.$strip>;
1784
+ type BankTransferListItem = z.infer<typeof BankTransferListItemSchema>;
1785
+ /** `GET /v1/admin/bank-transfers`: `pending` by deadline; `expired`: expired in the last 30 days. */
1786
+ declare const BankTransferListSchema: z.ZodObject<{
1787
+ items: z.ZodArray<z.ZodObject<{
1788
+ kind: z.ZodEnum<{
1789
+ checkout: "checkout";
1790
+ invoice: "invoice";
1791
+ }>;
1792
+ id: z.ZodUUID;
1793
+ status: z.ZodString;
1794
+ planCode: z.ZodNullable<z.ZodString>;
1795
+ totalMinor: z.ZodNumber;
1796
+ currency: z.ZodString;
1797
+ deadline: z.ZodNullable<z.ZodISODateTime>;
1798
+ code: z.ZodNullable<z.ZodString>;
1799
+ accountRef: z.ZodString;
1800
+ selectedAt: z.ZodNullable<z.ZodISODateTime>;
1801
+ }, z.core.$strip>>;
1802
+ }, z.core.$strip>;
1803
+ type BankTransferList = z.infer<typeof BankTransferListSchema>;
1804
+ //#endregion
1805
+ //#region ../contract/src/portal.d.ts
1806
+ declare const PortalSessionCreateInputSchema: z.ZodObject<{
1807
+ locale: z.ZodOptional<z.ZodEnum<{
1808
+ en: "en";
1809
+ tr: "tr";
1810
+ }>>;
1811
+ returnUrl: z.ZodOptional<z.ZodURL>;
1812
+ }, z.core.$strip>;
1813
+ type PortalSessionCreateInput = z.input<typeof PortalSessionCreateInputSchema>;
1814
+ /** `POST /v1/accounts/{ref}/portal-sessions` yanıtı (201). */
1815
+ declare const PortalSessionSchema: z.ZodObject<{
1816
+ id: z.ZodUUID;
1817
+ url: z.ZodString;
1818
+ expiresAt: z.ZodISODateTime;
1819
+ }, z.core.$strip>;
1820
+ type PortalSession = z.infer<typeof PortalSessionSchema>;
1821
+ declare const PORTAL_SESSION_ERRORS: readonly ['account_not_found', 'return_url_not_allowed'];
1822
+ type PortalSessionError = (typeof PORTAL_SESSION_ERRORS)[number];
1823
+ //#endregion
1824
+ //#region ../contract/src/subscriptions.d.ts
1825
+ declare const SubscriptionSchema: z.ZodObject<{
1826
+ id: z.ZodUUID;
1827
+ accountRef: z.ZodString;
1828
+ status: z.ZodEnum<{
1829
+ active: "active";
1830
+ canceled: "canceled";
1831
+ expired: "expired";
1446
1832
  past_due: "past_due";
1833
+ suspended: "suspended";
1834
+ }>;
1835
+ planCode: z.ZodString;
1836
+ priceId: z.ZodUUID;
1837
+ interval: z.ZodEnum<{
1838
+ month: "month";
1839
+ year: "year";
1840
+ }>;
1841
+ amountMinor: z.ZodNumber;
1842
+ currency: z.ZodString;
1843
+ provider: z.ZodString;
1844
+ providerSubscriptionRef: z.ZodString;
1845
+ cancelAtPeriodEnd: z.ZodBoolean;
1846
+ cancelAt: z.ZodNullable<z.ZodISODateTime>;
1847
+ cancelReason: z.ZodNullable<z.ZodString>;
1848
+ canceledAt: z.ZodNullable<z.ZodISODateTime>;
1849
+ startedAt: z.ZodISODateTime;
1850
+ currentPeriodStart: z.ZodNullable<z.ZodISODateTime>;
1851
+ currentPeriodEnd: z.ZodNullable<z.ZodISODateTime>;
1852
+ dunningStartedAt: z.ZodNullable<z.ZodISODateTime>;
1853
+ }, z.core.$strip>;
1854
+ type Subscription = z.infer<typeof SubscriptionSchema>;
1855
+ declare const CancelSubscriptionInputSchema: z.ZodObject<{
1856
+ mode: z.ZodEnum<{
1857
+ at_period_end: "at_period_end";
1858
+ immediate: "immediate";
1859
+ }>;
1860
+ reason: z.ZodString;
1861
+ skipProvider: z.ZodDefault<z.ZodBoolean>;
1862
+ }, z.core.$strip>;
1863
+ type CancelSubscriptionInput = z.input<typeof CancelSubscriptionInputSchema>;
1864
+ /**
1865
+ * `POST /v1/subscriptions/{id}/change` (billing core MF9): schedule a change for the next period
1866
+ * boundary (`AccountState.subscription.scheduledChange`); the next renewal invoice is written from
1867
+ * the new terms. `planCode` / `interval` pick another price of the subscription's currency;
1868
+ * `price: "current"` re-locks the current amount of the (possibly updated) price and the plan's
1869
+ * current metered rates — a metered price added later is attached only this way (M20, M36). At
1870
+ * least one of the three. `when` is required so other timings can be added later. A second change
1871
+ * replaces the first; asking for the current plan and interval while a change is pending takes it
1872
+ * back ("keep my plan"; a move to the current price the operator announced stays).
1873
+ * Errors: 404 `subscription_not_found`; 409 `already_subscribed` (another live subscription of the
1874
+ * account holds the target plan or is moving to it), `meter_already_billed` (the target prices a
1875
+ * meter another live subscription bills; for `price: "current"` only when that is the only
1876
+ * difference); 422 `plan_not_found`, `plan_not_sellable`, `subscription_change_invalid` (no such
1877
+ * price, nothing changes, the subscription is not live, has a cancellation scheduled or is a legacy
1878
+ * provider subscription).
1879
+ */
1880
+ declare const SubscriptionChangeInputSchema: z.ZodObject<{
1881
+ planCode: z.ZodOptional<z.ZodString>;
1882
+ interval: z.ZodOptional<z.ZodEnum<{
1883
+ month: "month";
1884
+ year: "year";
1885
+ }>>;
1886
+ price: z.ZodOptional<z.ZodLiteral<"current">>;
1887
+ when: z.ZodLiteral<"next_period">;
1888
+ }, z.core.$strip>;
1889
+ type SubscriptionChangeInput = z.input<typeof SubscriptionChangeInputSchema>;
1890
+ declare const PaymentSchema: z.ZodObject<{
1891
+ id: z.ZodUUID;
1892
+ subscriptionId: z.ZodUUID;
1893
+ providerOrderRef: z.ZodString;
1894
+ status: z.ZodEnum<{
1895
+ failed: "failed";
1896
+ succeeded: "succeeded";
1897
+ }>;
1898
+ amountMinor: z.ZodNumber;
1899
+ currency: z.ZodString;
1900
+ periodStart: z.ZodNullable<z.ZodISODateTime>;
1901
+ periodEnd: z.ZodNullable<z.ZodISODateTime>;
1902
+ occurredAt: z.ZodISODateTime;
1903
+ }, z.core.$strip>;
1904
+ type Payment = z.infer<typeof PaymentSchema>;
1905
+ /** Upper bound of named benefits in one grant. */
1906
+ declare const MAX_GRANT_BENEFITS = 100;
1907
+ declare const GrantCreateInputSchema: z.ZodObject<{
1908
+ planCode: z.ZodOptional<z.ZodString>;
1909
+ overrides: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNumber, z.ZodBoolean, z.ZodString, z.ZodNull]>>>;
1910
+ benefitCodes: z.ZodOptional<z.ZodArray<z.ZodString>>;
1911
+ reason: z.ZodString;
1912
+ startsAt: z.ZodOptional<z.ZodISODateTime>;
1913
+ endsAt: z.ZodOptional<z.ZodISODateTime>;
1914
+ }, z.core.$strip>;
1915
+ type GrantCreateInput = z.input<typeof GrantCreateInputSchema>;
1916
+ declare const GrantSchema: z.ZodObject<{
1917
+ id: z.ZodUUID;
1918
+ accountRef: z.ZodString;
1919
+ planCode: z.ZodNullable<z.ZodString>;
1920
+ overrides: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNumber, z.ZodBoolean, z.ZodString, z.ZodNull]>>;
1921
+ benefitCodes: z.ZodOptional<z.ZodArray<z.ZodString>>;
1922
+ reason: z.ZodString;
1923
+ actorRef: z.ZodNullable<z.ZodString>;
1924
+ startsAt: z.ZodISODateTime;
1925
+ endsAt: z.ZodNullable<z.ZodISODateTime>;
1926
+ revokedAt: z.ZodNullable<z.ZodISODateTime>;
1927
+ createdAt: z.ZodISODateTime;
1928
+ }, z.core.$strip>;
1929
+ type Grant = z.infer<typeof GrantSchema>;
1930
+ declare const StatsSchema: z.ZodObject<{
1931
+ subscriptions: z.ZodRecord<z.ZodEnum<{
1932
+ active: "active";
1447
1933
  canceled: "canceled";
1448
1934
  expired: "expired";
1935
+ past_due: "past_due";
1936
+ suspended: "suspended";
1449
1937
  }>, z.ZodNumber>;
1450
1938
  mrrMinor: z.ZodRecord<z.ZodString, z.ZodNumber>;
1451
1939
  accounts: z.ZodNumber;
@@ -1454,9 +1942,9 @@ type Stats = z.infer<typeof StatsSchema>;
1454
1942
  //#endregion
1455
1943
  //#region ../contract/src/invoices.d.ts
1456
1944
  declare const InvoiceStatusSchema: z.ZodEnum<{
1457
- void: "void";
1458
1945
  draft: "draft";
1459
1946
  issued: "issued";
1947
+ void: "void";
1460
1948
  }>;
1461
1949
  declare const InvoiceLineSchema: z.ZodObject<{
1462
1950
  description: z.ZodString;
@@ -1475,9 +1963,9 @@ declare const InvoiceSchema: z.ZodObject<{
1475
1963
  subscriptionId: z.ZodNullable<z.ZodUUID>;
1476
1964
  paymentId: z.ZodNullable<z.ZodUUID>;
1477
1965
  status: z.ZodEnum<{
1478
- void: "void";
1479
1966
  draft: "draft";
1480
1967
  issued: "issued";
1968
+ void: "void";
1481
1969
  }>;
1482
1970
  number: z.ZodNullable<z.ZodString>;
1483
1971
  currency: z.ZodString;
@@ -1487,8 +1975,8 @@ declare const InvoiceSchema: z.ZodObject<{
1487
1975
  taxRateBps: z.ZodNumber;
1488
1976
  buyer: z.ZodObject<{
1489
1977
  kind: z.ZodEnum<{
1490
- individual: "individual";
1491
1978
  company: "company";
1979
+ individual: "individual";
1492
1980
  }>;
1493
1981
  contactName: z.ZodString;
1494
1982
  companyName: z.ZodOptional<z.ZodString>;
@@ -1520,16 +2008,16 @@ declare const InvoiceSchema: z.ZodObject<{
1520
2008
  voidedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
1521
2009
  voidReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1522
2010
  billingReason: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
2011
+ manual: "manual";
2012
+ purchase: "purchase";
1523
2013
  subscription_create: "subscription_create";
1524
2014
  subscription_cycle: "subscription_cycle";
1525
2015
  subscription_update: "subscription_update";
1526
- purchase: "purchase";
1527
- manual: "manual";
1528
2016
  }>>>;
1529
2017
  paymentStatus: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
1530
- unpaid: "unpaid";
1531
2018
  paid: "paid";
1532
2019
  uncollectible: "uncollectible";
2020
+ unpaid: "unpaid";
1533
2021
  waived: "waived";
1534
2022
  }>>>;
1535
2023
  periodStart: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
@@ -1582,8 +2070,8 @@ type InvoiceVoidInput = z.input<typeof InvoiceVoidInputSchema>;
1582
2070
  */
1583
2071
  declare const InvoicePaymentSessionCreateInputSchema: z.ZodObject<{
1584
2072
  locale: z.ZodOptional<z.ZodEnum<{
1585
- tr: "tr";
1586
2073
  en: "en";
2074
+ tr: "tr";
1587
2075
  }>>;
1588
2076
  returnUrl: z.ZodOptional<z.ZodURL>;
1589
2077
  }, z.core.$strip>;
@@ -1655,10 +2143,10 @@ declare const AccountDetailSchema: z.ZodObject<{
1655
2143
  id: z.ZodUUID;
1656
2144
  status: z.ZodEnum<{
1657
2145
  active: "active";
1658
- suspended: "suspended";
1659
- past_due: "past_due";
1660
2146
  canceled: "canceled";
1661
2147
  expired: "expired";
2148
+ past_due: "past_due";
2149
+ suspended: "suspended";
1662
2150
  }>;
1663
2151
  planCode: z.ZodString;
1664
2152
  interval: z.ZodEnum<{
@@ -1673,13 +2161,13 @@ declare const AccountDetailSchema: z.ZodObject<{
1673
2161
  }, z.core.$strip>;
1674
2162
  notificationEmails: z.ZodDefault<z.ZodArray<z.ZodString>>;
1675
2163
  locale: z.ZodDefault<z.ZodNullable<z.ZodEnum<{
1676
- tr: "tr";
1677
2164
  en: "en";
2165
+ tr: "tr";
1678
2166
  }>>>;
1679
2167
  profile: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1680
2168
  kind: z.ZodEnum<{
1681
- individual: "individual";
1682
2169
  company: "company";
2170
+ individual: "individual";
1683
2171
  }>;
1684
2172
  contactName: z.ZodString;
1685
2173
  companyName: z.ZodOptional<z.ZodString>;
@@ -1696,10 +2184,10 @@ declare const AccountDetailSchema: z.ZodObject<{
1696
2184
  accountRef: z.ZodString;
1697
2185
  status: z.ZodEnum<{
1698
2186
  active: "active";
1699
- suspended: "suspended";
1700
- past_due: "past_due";
1701
2187
  canceled: "canceled";
1702
2188
  expired: "expired";
2189
+ past_due: "past_due";
2190
+ suspended: "suspended";
1703
2191
  }>;
1704
2192
  planCode: z.ZodString;
1705
2193
  priceId: z.ZodUUID;
@@ -1725,10 +2213,10 @@ declare const AccountDetailSchema: z.ZodObject<{
1725
2213
  accountRef: z.ZodString;
1726
2214
  status: z.ZodEnum<{
1727
2215
  canceled: "canceled";
1728
- expired: "expired";
1729
- open: "open";
1730
2216
  completed: "completed";
2217
+ expired: "expired";
1731
2218
  failed: "failed";
2219
+ open: "open";
1732
2220
  }>;
1733
2221
  planCode: z.ZodString;
1734
2222
  interval: z.ZodEnum<{
@@ -1753,6 +2241,11 @@ declare const AccountDetailSchema: z.ZodObject<{
1753
2241
  expiresAt: z.ZodISODateTime;
1754
2242
  createdAt: z.ZodISODateTime;
1755
2243
  completedAt: z.ZodNullable<z.ZodISODateTime>;
2244
+ paymentMethod: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
2245
+ bank_transfer: "bank_transfer";
2246
+ card: "card";
2247
+ }>>>;
2248
+ replacesSubscriptionId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
1756
2249
  }, z.core.$strip>>>;
1757
2250
  payments: z.ZodOptional<z.ZodArray<z.ZodObject<{
1758
2251
  id: z.ZodUUID;
@@ -1774,9 +2267,9 @@ declare const AccountDetailSchema: z.ZodObject<{
1774
2267
  subscriptionId: z.ZodNullable<z.ZodUUID>;
1775
2268
  paymentId: z.ZodNullable<z.ZodUUID>;
1776
2269
  status: z.ZodEnum<{
1777
- void: "void";
1778
2270
  draft: "draft";
1779
2271
  issued: "issued";
2272
+ void: "void";
1780
2273
  }>;
1781
2274
  number: z.ZodNullable<z.ZodString>;
1782
2275
  currency: z.ZodString;
@@ -1786,8 +2279,8 @@ declare const AccountDetailSchema: z.ZodObject<{
1786
2279
  taxRateBps: z.ZodNumber;
1787
2280
  buyer: z.ZodObject<{
1788
2281
  kind: z.ZodEnum<{
1789
- individual: "individual";
1790
2282
  company: "company";
2283
+ individual: "individual";
1791
2284
  }>;
1792
2285
  contactName: z.ZodString;
1793
2286
  companyName: z.ZodOptional<z.ZodString>;
@@ -1819,16 +2312,16 @@ declare const AccountDetailSchema: z.ZodObject<{
1819
2312
  voidedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
1820
2313
  voidReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1821
2314
  billingReason: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
2315
+ manual: "manual";
2316
+ purchase: "purchase";
1822
2317
  subscription_create: "subscription_create";
1823
2318
  subscription_cycle: "subscription_cycle";
1824
2319
  subscription_update: "subscription_update";
1825
- purchase: "purchase";
1826
- manual: "manual";
1827
2320
  }>>>;
1828
2321
  paymentStatus: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
1829
- unpaid: "unpaid";
1830
2322
  paid: "paid";
1831
2323
  uncollectible: "uncollectible";
2324
+ unpaid: "unpaid";
1832
2325
  waived: "waived";
1833
2326
  }>>>;
1834
2327
  periodStart: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
@@ -1867,10 +2360,10 @@ declare const AccountUpsertResponseSchema: z.ZodObject<{
1867
2360
  id: z.ZodUUID;
1868
2361
  status: z.ZodEnum<{
1869
2362
  active: "active";
1870
- suspended: "suspended";
1871
- past_due: "past_due";
1872
2363
  canceled: "canceled";
1873
2364
  expired: "expired";
2365
+ past_due: "past_due";
2366
+ suspended: "suspended";
1874
2367
  }>;
1875
2368
  planCode: z.ZodString;
1876
2369
  interval: z.ZodEnum<{
@@ -1885,8 +2378,8 @@ declare const AccountUpsertResponseSchema: z.ZodObject<{
1885
2378
  }, z.core.$strip>;
1886
2379
  notificationEmails: z.ZodDefault<z.ZodArray<z.ZodString>>;
1887
2380
  locale: z.ZodDefault<z.ZodNullable<z.ZodEnum<{
1888
- tr: "tr";
1889
2381
  en: "en";
2382
+ tr: "tr";
1890
2383
  }>>>;
1891
2384
  account: z.ZodOptional<z.ZodObject<{
1892
2385
  version: z.ZodNumber;
@@ -1904,10 +2397,10 @@ declare const AccountUpsertResponseSchema: z.ZodObject<{
1904
2397
  id: z.ZodUUID;
1905
2398
  status: z.ZodEnum<{
1906
2399
  active: "active";
1907
- suspended: "suspended";
1908
- past_due: "past_due";
1909
2400
  canceled: "canceled";
1910
2401
  expired: "expired";
2402
+ past_due: "past_due";
2403
+ suspended: "suspended";
1911
2404
  }>;
1912
2405
  planCode: z.ZodString;
1913
2406
  interval: z.ZodEnum<{
@@ -1946,22 +2439,26 @@ declare const AccountUpsertResponseSchema: z.ZodObject<{
1946
2439
  currency: z.ZodString;
1947
2440
  amountMinor: z.ZodNumber;
1948
2441
  expiresAt: z.ZodISODateTime;
2442
+ paymentMethod: z.ZodOptional<z.ZodEnum<{
2443
+ bank_transfer: "bank_transfer";
2444
+ card: "card";
2445
+ }>>;
1949
2446
  }, z.core.$strip>>;
1950
2447
  profile: z.ZodObject<{
1951
2448
  present: z.ZodBoolean;
1952
2449
  kind: z.ZodNullable<z.ZodEnum<{
1953
- individual: "individual";
1954
2450
  company: "company";
2451
+ individual: "individual";
1955
2452
  }>>;
1956
2453
  }, z.core.$strip>;
1957
2454
  subscriptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1958
2455
  id: z.ZodUUID;
1959
2456
  status: z.ZodEnum<{
1960
2457
  active: "active";
1961
- suspended: "suspended";
1962
- past_due: "past_due";
1963
2458
  canceled: "canceled";
1964
2459
  expired: "expired";
2460
+ past_due: "past_due";
2461
+ suspended: "suspended";
1965
2462
  }>;
1966
2463
  planCode: z.ZodString;
1967
2464
  interval: z.ZodEnum<{
@@ -1993,11 +2490,11 @@ declare const AccountUpsertResponseSchema: z.ZodObject<{
1993
2490
  id: z.ZodUUID;
1994
2491
  subscriptionId: z.ZodNullable<z.ZodUUID>;
1995
2492
  billingReason: z.ZodEnum<{
2493
+ manual: "manual";
2494
+ purchase: "purchase";
1996
2495
  subscription_create: "subscription_create";
1997
2496
  subscription_cycle: "subscription_cycle";
1998
2497
  subscription_update: "subscription_update";
1999
- purchase: "purchase";
2000
- manual: "manual";
2001
2498
  }>;
2002
2499
  totalMinor: z.ZodNumber;
2003
2500
  currency: z.ZodString;
@@ -2014,11 +2511,12 @@ declare const AccountUpsertResponseSchema: z.ZodObject<{
2014
2511
  includedUnits: z.ZodNullable<z.ZodNumber>;
2015
2512
  billable: z.ZodBoolean;
2016
2513
  standing: z.ZodEnum<{
2017
- ok: "ok";
2018
- low: "low";
2019
2514
  exhausted: "exhausted";
2515
+ low: "low";
2516
+ ok: "ok";
2020
2517
  }>;
2021
2518
  }, z.core.$strip>>>;
2519
+ bankTransferCode: z.ZodOptional<z.ZodString>;
2022
2520
  }, z.core.$strip>>;
2023
2521
  }, z.core.$strip>;
2024
2522
  type AccountUpsertResponse = z.infer<typeof AccountUpsertResponseSchema>;
@@ -2051,10 +2549,10 @@ declare const GrantCreateResponseSchema: z.ZodObject<{
2051
2549
  id: z.ZodUUID;
2052
2550
  status: z.ZodEnum<{
2053
2551
  active: "active";
2054
- suspended: "suspended";
2055
- past_due: "past_due";
2056
2552
  canceled: "canceled";
2057
2553
  expired: "expired";
2554
+ past_due: "past_due";
2555
+ suspended: "suspended";
2058
2556
  }>;
2059
2557
  planCode: z.ZodString;
2060
2558
  interval: z.ZodEnum<{
@@ -2093,22 +2591,26 @@ declare const GrantCreateResponseSchema: z.ZodObject<{
2093
2591
  currency: z.ZodString;
2094
2592
  amountMinor: z.ZodNumber;
2095
2593
  expiresAt: z.ZodISODateTime;
2594
+ paymentMethod: z.ZodOptional<z.ZodEnum<{
2595
+ bank_transfer: "bank_transfer";
2596
+ card: "card";
2597
+ }>>;
2096
2598
  }, z.core.$strip>>;
2097
2599
  profile: z.ZodObject<{
2098
2600
  present: z.ZodBoolean;
2099
2601
  kind: z.ZodNullable<z.ZodEnum<{
2100
- individual: "individual";
2101
2602
  company: "company";
2603
+ individual: "individual";
2102
2604
  }>>;
2103
2605
  }, z.core.$strip>;
2104
2606
  subscriptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
2105
2607
  id: z.ZodUUID;
2106
2608
  status: z.ZodEnum<{
2107
2609
  active: "active";
2108
- suspended: "suspended";
2109
- past_due: "past_due";
2110
2610
  canceled: "canceled";
2111
2611
  expired: "expired";
2612
+ past_due: "past_due";
2613
+ suspended: "suspended";
2112
2614
  }>;
2113
2615
  planCode: z.ZodString;
2114
2616
  interval: z.ZodEnum<{
@@ -2140,11 +2642,11 @@ declare const GrantCreateResponseSchema: z.ZodObject<{
2140
2642
  id: z.ZodUUID;
2141
2643
  subscriptionId: z.ZodNullable<z.ZodUUID>;
2142
2644
  billingReason: z.ZodEnum<{
2645
+ manual: "manual";
2646
+ purchase: "purchase";
2143
2647
  subscription_create: "subscription_create";
2144
2648
  subscription_cycle: "subscription_cycle";
2145
2649
  subscription_update: "subscription_update";
2146
- purchase: "purchase";
2147
- manual: "manual";
2148
2650
  }>;
2149
2651
  totalMinor: z.ZodNumber;
2150
2652
  currency: z.ZodString;
@@ -2161,11 +2663,12 @@ declare const GrantCreateResponseSchema: z.ZodObject<{
2161
2663
  includedUnits: z.ZodNullable<z.ZodNumber>;
2162
2664
  billable: z.ZodBoolean;
2163
2665
  standing: z.ZodEnum<{
2164
- ok: "ok";
2165
- low: "low";
2166
2666
  exhausted: "exhausted";
2667
+ low: "low";
2668
+ ok: "ok";
2167
2669
  }>;
2168
2670
  }, z.core.$strip>>>;
2671
+ bankTransferCode: z.ZodOptional<z.ZodString>;
2169
2672
  }, z.core.$strip>>;
2170
2673
  }, z.core.$strip>;
2171
2674
  type GrantCreateResponse = z.infer<typeof GrantCreateResponseSchema>;
@@ -2175,10 +2678,10 @@ declare const CancelSubscriptionResponseSchema: z.ZodObject<{
2175
2678
  accountRef: z.ZodString;
2176
2679
  status: z.ZodEnum<{
2177
2680
  active: "active";
2178
- suspended: "suspended";
2179
- past_due: "past_due";
2180
2681
  canceled: "canceled";
2181
2682
  expired: "expired";
2683
+ past_due: "past_due";
2684
+ suspended: "suspended";
2182
2685
  }>;
2183
2686
  planCode: z.ZodString;
2184
2687
  priceId: z.ZodUUID;
@@ -2214,10 +2717,10 @@ declare const CancelSubscriptionResponseSchema: z.ZodObject<{
2214
2717
  id: z.ZodUUID;
2215
2718
  status: z.ZodEnum<{
2216
2719
  active: "active";
2217
- suspended: "suspended";
2218
- past_due: "past_due";
2219
2720
  canceled: "canceled";
2220
2721
  expired: "expired";
2722
+ past_due: "past_due";
2723
+ suspended: "suspended";
2221
2724
  }>;
2222
2725
  planCode: z.ZodString;
2223
2726
  interval: z.ZodEnum<{
@@ -2256,22 +2759,26 @@ declare const CancelSubscriptionResponseSchema: z.ZodObject<{
2256
2759
  currency: z.ZodString;
2257
2760
  amountMinor: z.ZodNumber;
2258
2761
  expiresAt: z.ZodISODateTime;
2762
+ paymentMethod: z.ZodOptional<z.ZodEnum<{
2763
+ bank_transfer: "bank_transfer";
2764
+ card: "card";
2765
+ }>>;
2259
2766
  }, z.core.$strip>>;
2260
2767
  profile: z.ZodObject<{
2261
2768
  present: z.ZodBoolean;
2262
2769
  kind: z.ZodNullable<z.ZodEnum<{
2263
- individual: "individual";
2264
2770
  company: "company";
2771
+ individual: "individual";
2265
2772
  }>>;
2266
2773
  }, z.core.$strip>;
2267
2774
  subscriptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
2268
2775
  id: z.ZodUUID;
2269
2776
  status: z.ZodEnum<{
2270
2777
  active: "active";
2271
- suspended: "suspended";
2272
- past_due: "past_due";
2273
2778
  canceled: "canceled";
2274
2779
  expired: "expired";
2780
+ past_due: "past_due";
2781
+ suspended: "suspended";
2275
2782
  }>;
2276
2783
  planCode: z.ZodString;
2277
2784
  interval: z.ZodEnum<{
@@ -2303,11 +2810,11 @@ declare const CancelSubscriptionResponseSchema: z.ZodObject<{
2303
2810
  id: z.ZodUUID;
2304
2811
  subscriptionId: z.ZodNullable<z.ZodUUID>;
2305
2812
  billingReason: z.ZodEnum<{
2813
+ manual: "manual";
2814
+ purchase: "purchase";
2306
2815
  subscription_create: "subscription_create";
2307
2816
  subscription_cycle: "subscription_cycle";
2308
2817
  subscription_update: "subscription_update";
2309
- purchase: "purchase";
2310
- manual: "manual";
2311
2818
  }>;
2312
2819
  totalMinor: z.ZodNumber;
2313
2820
  currency: z.ZodString;
@@ -2324,11 +2831,12 @@ declare const CancelSubscriptionResponseSchema: z.ZodObject<{
2324
2831
  includedUnits: z.ZodNullable<z.ZodNumber>;
2325
2832
  billable: z.ZodBoolean;
2326
2833
  standing: z.ZodEnum<{
2327
- ok: "ok";
2328
- low: "low";
2329
2834
  exhausted: "exhausted";
2835
+ low: "low";
2836
+ ok: "ok";
2330
2837
  }>;
2331
2838
  }, z.core.$strip>>>;
2839
+ bankTransferCode: z.ZodOptional<z.ZodString>;
2332
2840
  }, z.core.$strip>>;
2333
2841
  }, z.core.$strip>;
2334
2842
  type CancelSubscriptionResponse = z.infer<typeof CancelSubscriptionResponseSchema>;
@@ -2339,9 +2847,9 @@ declare const InvoiceIssueResponseSchema: z.ZodObject<{
2339
2847
  subscriptionId: z.ZodNullable<z.ZodUUID>;
2340
2848
  paymentId: z.ZodNullable<z.ZodUUID>;
2341
2849
  status: z.ZodEnum<{
2342
- void: "void";
2343
2850
  draft: "draft";
2344
2851
  issued: "issued";
2852
+ void: "void";
2345
2853
  }>;
2346
2854
  number: z.ZodNullable<z.ZodString>;
2347
2855
  currency: z.ZodString;
@@ -2351,8 +2859,8 @@ declare const InvoiceIssueResponseSchema: z.ZodObject<{
2351
2859
  taxRateBps: z.ZodNumber;
2352
2860
  buyer: z.ZodObject<{
2353
2861
  kind: z.ZodEnum<{
2354
- individual: "individual";
2355
2862
  company: "company";
2863
+ individual: "individual";
2356
2864
  }>;
2357
2865
  contactName: z.ZodString;
2358
2866
  companyName: z.ZodOptional<z.ZodString>;
@@ -2384,16 +2892,16 @@ declare const InvoiceIssueResponseSchema: z.ZodObject<{
2384
2892
  voidedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
2385
2893
  voidReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2386
2894
  billingReason: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
2895
+ manual: "manual";
2896
+ purchase: "purchase";
2387
2897
  subscription_create: "subscription_create";
2388
2898
  subscription_cycle: "subscription_cycle";
2389
2899
  subscription_update: "subscription_update";
2390
- purchase: "purchase";
2391
- manual: "manual";
2392
2900
  }>>>;
2393
2901
  paymentStatus: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
2394
- unpaid: "unpaid";
2395
2902
  paid: "paid";
2396
2903
  uncollectible: "uncollectible";
2904
+ unpaid: "unpaid";
2397
2905
  waived: "waived";
2398
2906
  }>>>;
2399
2907
  periodStart: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
@@ -2414,10 +2922,10 @@ declare const InvoiceIssueResponseSchema: z.ZodObject<{
2414
2922
  id: z.ZodUUID;
2415
2923
  status: z.ZodEnum<{
2416
2924
  active: "active";
2417
- suspended: "suspended";
2418
- past_due: "past_due";
2419
2925
  canceled: "canceled";
2420
2926
  expired: "expired";
2927
+ past_due: "past_due";
2928
+ suspended: "suspended";
2421
2929
  }>;
2422
2930
  planCode: z.ZodString;
2423
2931
  interval: z.ZodEnum<{
@@ -2456,22 +2964,26 @@ declare const InvoiceIssueResponseSchema: z.ZodObject<{
2456
2964
  currency: z.ZodString;
2457
2965
  amountMinor: z.ZodNumber;
2458
2966
  expiresAt: z.ZodISODateTime;
2967
+ paymentMethod: z.ZodOptional<z.ZodEnum<{
2968
+ bank_transfer: "bank_transfer";
2969
+ card: "card";
2970
+ }>>;
2459
2971
  }, z.core.$strip>>;
2460
2972
  profile: z.ZodObject<{
2461
2973
  present: z.ZodBoolean;
2462
2974
  kind: z.ZodNullable<z.ZodEnum<{
2463
- individual: "individual";
2464
2975
  company: "company";
2976
+ individual: "individual";
2465
2977
  }>>;
2466
2978
  }, z.core.$strip>;
2467
2979
  subscriptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
2468
2980
  id: z.ZodUUID;
2469
2981
  status: z.ZodEnum<{
2470
2982
  active: "active";
2471
- suspended: "suspended";
2472
- past_due: "past_due";
2473
2983
  canceled: "canceled";
2474
2984
  expired: "expired";
2985
+ past_due: "past_due";
2986
+ suspended: "suspended";
2475
2987
  }>;
2476
2988
  planCode: z.ZodString;
2477
2989
  interval: z.ZodEnum<{
@@ -2503,11 +3015,11 @@ declare const InvoiceIssueResponseSchema: z.ZodObject<{
2503
3015
  id: z.ZodUUID;
2504
3016
  subscriptionId: z.ZodNullable<z.ZodUUID>;
2505
3017
  billingReason: z.ZodEnum<{
3018
+ manual: "manual";
3019
+ purchase: "purchase";
2506
3020
  subscription_create: "subscription_create";
2507
3021
  subscription_cycle: "subscription_cycle";
2508
3022
  subscription_update: "subscription_update";
2509
- purchase: "purchase";
2510
- manual: "manual";
2511
3023
  }>;
2512
3024
  totalMinor: z.ZodNumber;
2513
3025
  currency: z.ZodString;
@@ -2524,11 +3036,12 @@ declare const InvoiceIssueResponseSchema: z.ZodObject<{
2524
3036
  includedUnits: z.ZodNullable<z.ZodNumber>;
2525
3037
  billable: z.ZodBoolean;
2526
3038
  standing: z.ZodEnum<{
2527
- ok: "ok";
2528
- low: "low";
2529
3039
  exhausted: "exhausted";
3040
+ low: "low";
3041
+ ok: "ok";
2530
3042
  }>;
2531
3043
  }, z.core.$strip>>>;
3044
+ bankTransferCode: z.ZodOptional<z.ZodString>;
2532
3045
  }, z.core.$strip>>;
2533
3046
  }, z.core.$strip>;
2534
3047
  type InvoiceIssueResponse = z.infer<typeof InvoiceIssueResponseSchema>;
@@ -2539,9 +3052,9 @@ declare const ManualInvoiceResponseSchema: z.ZodObject<{
2539
3052
  subscriptionId: z.ZodNullable<z.ZodUUID>;
2540
3053
  paymentId: z.ZodNullable<z.ZodUUID>;
2541
3054
  status: z.ZodEnum<{
2542
- void: "void";
2543
3055
  draft: "draft";
2544
3056
  issued: "issued";
3057
+ void: "void";
2545
3058
  }>;
2546
3059
  number: z.ZodNullable<z.ZodString>;
2547
3060
  currency: z.ZodString;
@@ -2551,8 +3064,8 @@ declare const ManualInvoiceResponseSchema: z.ZodObject<{
2551
3064
  taxRateBps: z.ZodNumber;
2552
3065
  buyer: z.ZodObject<{
2553
3066
  kind: z.ZodEnum<{
2554
- individual: "individual";
2555
3067
  company: "company";
3068
+ individual: "individual";
2556
3069
  }>;
2557
3070
  contactName: z.ZodString;
2558
3071
  companyName: z.ZodOptional<z.ZodString>;
@@ -2584,16 +3097,16 @@ declare const ManualInvoiceResponseSchema: z.ZodObject<{
2584
3097
  voidedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
2585
3098
  voidReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2586
3099
  billingReason: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
3100
+ manual: "manual";
3101
+ purchase: "purchase";
2587
3102
  subscription_create: "subscription_create";
2588
3103
  subscription_cycle: "subscription_cycle";
2589
3104
  subscription_update: "subscription_update";
2590
- purchase: "purchase";
2591
- manual: "manual";
2592
3105
  }>>>;
2593
3106
  paymentStatus: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
2594
- unpaid: "unpaid";
2595
3107
  paid: "paid";
2596
3108
  uncollectible: "uncollectible";
3109
+ unpaid: "unpaid";
2597
3110
  waived: "waived";
2598
3111
  }>>>;
2599
3112
  periodStart: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
@@ -2614,10 +3127,10 @@ declare const ManualInvoiceResponseSchema: z.ZodObject<{
2614
3127
  id: z.ZodUUID;
2615
3128
  status: z.ZodEnum<{
2616
3129
  active: "active";
2617
- suspended: "suspended";
2618
- past_due: "past_due";
2619
3130
  canceled: "canceled";
2620
3131
  expired: "expired";
3132
+ past_due: "past_due";
3133
+ suspended: "suspended";
2621
3134
  }>;
2622
3135
  planCode: z.ZodString;
2623
3136
  interval: z.ZodEnum<{
@@ -2656,22 +3169,26 @@ declare const ManualInvoiceResponseSchema: z.ZodObject<{
2656
3169
  currency: z.ZodString;
2657
3170
  amountMinor: z.ZodNumber;
2658
3171
  expiresAt: z.ZodISODateTime;
3172
+ paymentMethod: z.ZodOptional<z.ZodEnum<{
3173
+ bank_transfer: "bank_transfer";
3174
+ card: "card";
3175
+ }>>;
2659
3176
  }, z.core.$strip>>;
2660
3177
  profile: z.ZodObject<{
2661
3178
  present: z.ZodBoolean;
2662
3179
  kind: z.ZodNullable<z.ZodEnum<{
2663
- individual: "individual";
2664
3180
  company: "company";
3181
+ individual: "individual";
2665
3182
  }>>;
2666
3183
  }, z.core.$strip>;
2667
3184
  subscriptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
2668
3185
  id: z.ZodUUID;
2669
3186
  status: z.ZodEnum<{
2670
3187
  active: "active";
2671
- suspended: "suspended";
2672
- past_due: "past_due";
2673
3188
  canceled: "canceled";
2674
3189
  expired: "expired";
3190
+ past_due: "past_due";
3191
+ suspended: "suspended";
2675
3192
  }>;
2676
3193
  planCode: z.ZodString;
2677
3194
  interval: z.ZodEnum<{
@@ -2703,11 +3220,11 @@ declare const ManualInvoiceResponseSchema: z.ZodObject<{
2703
3220
  id: z.ZodUUID;
2704
3221
  subscriptionId: z.ZodNullable<z.ZodUUID>;
2705
3222
  billingReason: z.ZodEnum<{
3223
+ manual: "manual";
3224
+ purchase: "purchase";
2706
3225
  subscription_create: "subscription_create";
2707
3226
  subscription_cycle: "subscription_cycle";
2708
3227
  subscription_update: "subscription_update";
2709
- purchase: "purchase";
2710
- manual: "manual";
2711
3228
  }>;
2712
3229
  totalMinor: z.ZodNumber;
2713
3230
  currency: z.ZodString;
@@ -2724,11 +3241,12 @@ declare const ManualInvoiceResponseSchema: z.ZodObject<{
2724
3241
  includedUnits: z.ZodNullable<z.ZodNumber>;
2725
3242
  billable: z.ZodBoolean;
2726
3243
  standing: z.ZodEnum<{
2727
- ok: "ok";
2728
- low: "low";
2729
3244
  exhausted: "exhausted";
3245
+ low: "low";
3246
+ ok: "ok";
2730
3247
  }>;
2731
3248
  }, z.core.$strip>>>;
3249
+ bankTransferCode: z.ZodOptional<z.ZodString>;
2732
3250
  }, z.core.$strip>>;
2733
3251
  }, z.core.$strip>;
2734
3252
  type ManualInvoiceResponse = z.infer<typeof ManualInvoiceResponseSchema>;
@@ -2739,9 +3257,9 @@ declare const InvoiceVoidResponseSchema: z.ZodObject<{
2739
3257
  subscriptionId: z.ZodNullable<z.ZodUUID>;
2740
3258
  paymentId: z.ZodNullable<z.ZodUUID>;
2741
3259
  status: z.ZodEnum<{
2742
- void: "void";
2743
3260
  draft: "draft";
2744
3261
  issued: "issued";
3262
+ void: "void";
2745
3263
  }>;
2746
3264
  number: z.ZodNullable<z.ZodString>;
2747
3265
  currency: z.ZodString;
@@ -2751,8 +3269,8 @@ declare const InvoiceVoidResponseSchema: z.ZodObject<{
2751
3269
  taxRateBps: z.ZodNumber;
2752
3270
  buyer: z.ZodObject<{
2753
3271
  kind: z.ZodEnum<{
2754
- individual: "individual";
2755
3272
  company: "company";
3273
+ individual: "individual";
2756
3274
  }>;
2757
3275
  contactName: z.ZodString;
2758
3276
  companyName: z.ZodOptional<z.ZodString>;
@@ -2784,16 +3302,16 @@ declare const InvoiceVoidResponseSchema: z.ZodObject<{
2784
3302
  voidedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
2785
3303
  voidReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2786
3304
  billingReason: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
3305
+ manual: "manual";
3306
+ purchase: "purchase";
2787
3307
  subscription_create: "subscription_create";
2788
3308
  subscription_cycle: "subscription_cycle";
2789
3309
  subscription_update: "subscription_update";
2790
- purchase: "purchase";
2791
- manual: "manual";
2792
3310
  }>>>;
2793
3311
  paymentStatus: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
2794
- unpaid: "unpaid";
2795
3312
  paid: "paid";
2796
3313
  uncollectible: "uncollectible";
3314
+ unpaid: "unpaid";
2797
3315
  waived: "waived";
2798
3316
  }>>>;
2799
3317
  periodStart: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
@@ -2814,10 +3332,10 @@ declare const InvoiceVoidResponseSchema: z.ZodObject<{
2814
3332
  id: z.ZodUUID;
2815
3333
  status: z.ZodEnum<{
2816
3334
  active: "active";
2817
- suspended: "suspended";
2818
- past_due: "past_due";
2819
3335
  canceled: "canceled";
2820
3336
  expired: "expired";
3337
+ past_due: "past_due";
3338
+ suspended: "suspended";
2821
3339
  }>;
2822
3340
  planCode: z.ZodString;
2823
3341
  interval: z.ZodEnum<{
@@ -2856,22 +3374,26 @@ declare const InvoiceVoidResponseSchema: z.ZodObject<{
2856
3374
  currency: z.ZodString;
2857
3375
  amountMinor: z.ZodNumber;
2858
3376
  expiresAt: z.ZodISODateTime;
3377
+ paymentMethod: z.ZodOptional<z.ZodEnum<{
3378
+ bank_transfer: "bank_transfer";
3379
+ card: "card";
3380
+ }>>;
2859
3381
  }, z.core.$strip>>;
2860
3382
  profile: z.ZodObject<{
2861
3383
  present: z.ZodBoolean;
2862
3384
  kind: z.ZodNullable<z.ZodEnum<{
2863
- individual: "individual";
2864
3385
  company: "company";
3386
+ individual: "individual";
2865
3387
  }>>;
2866
3388
  }, z.core.$strip>;
2867
3389
  subscriptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
2868
3390
  id: z.ZodUUID;
2869
3391
  status: z.ZodEnum<{
2870
3392
  active: "active";
2871
- suspended: "suspended";
2872
- past_due: "past_due";
2873
3393
  canceled: "canceled";
2874
3394
  expired: "expired";
3395
+ past_due: "past_due";
3396
+ suspended: "suspended";
2875
3397
  }>;
2876
3398
  planCode: z.ZodString;
2877
3399
  interval: z.ZodEnum<{
@@ -2903,11 +3425,11 @@ declare const InvoiceVoidResponseSchema: z.ZodObject<{
2903
3425
  id: z.ZodUUID;
2904
3426
  subscriptionId: z.ZodNullable<z.ZodUUID>;
2905
3427
  billingReason: z.ZodEnum<{
3428
+ manual: "manual";
3429
+ purchase: "purchase";
2906
3430
  subscription_create: "subscription_create";
2907
3431
  subscription_cycle: "subscription_cycle";
2908
3432
  subscription_update: "subscription_update";
2909
- purchase: "purchase";
2910
- manual: "manual";
2911
3433
  }>;
2912
3434
  totalMinor: z.ZodNumber;
2913
3435
  currency: z.ZodString;
@@ -2924,11 +3446,12 @@ declare const InvoiceVoidResponseSchema: z.ZodObject<{
2924
3446
  includedUnits: z.ZodNullable<z.ZodNumber>;
2925
3447
  billable: z.ZodBoolean;
2926
3448
  standing: z.ZodEnum<{
2927
- ok: "ok";
2928
- low: "low";
2929
3449
  exhausted: "exhausted";
3450
+ low: "low";
3451
+ ok: "ok";
2930
3452
  }>;
2931
3453
  }, z.core.$strip>>>;
3454
+ bankTransferCode: z.ZodOptional<z.ZodString>;
2932
3455
  }, z.core.$strip>>;
2933
3456
  }, z.core.$strip>;
2934
3457
  type InvoiceVoidResponse = z.infer<typeof InvoiceVoidResponseSchema>;
@@ -2938,10 +3461,10 @@ declare const CheckoutSessionResponseSchema: z.ZodObject<{
2938
3461
  accountRef: z.ZodString;
2939
3462
  status: z.ZodEnum<{
2940
3463
  canceled: "canceled";
2941
- expired: "expired";
2942
- open: "open";
2943
3464
  completed: "completed";
3465
+ expired: "expired";
2944
3466
  failed: "failed";
3467
+ open: "open";
2945
3468
  }>;
2946
3469
  planCode: z.ZodString;
2947
3470
  interval: z.ZodEnum<{
@@ -2966,6 +3489,11 @@ declare const CheckoutSessionResponseSchema: z.ZodObject<{
2966
3489
  expiresAt: z.ZodISODateTime;
2967
3490
  createdAt: z.ZodISODateTime;
2968
3491
  completedAt: z.ZodNullable<z.ZodISODateTime>;
3492
+ paymentMethod: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
3493
+ bank_transfer: "bank_transfer";
3494
+ card: "card";
3495
+ }>>>;
3496
+ replacesSubscriptionId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
2969
3497
  account: z.ZodOptional<z.ZodObject<{
2970
3498
  version: z.ZodNumber;
2971
3499
  planCode: z.ZodString;
@@ -2982,10 +3510,10 @@ declare const CheckoutSessionResponseSchema: z.ZodObject<{
2982
3510
  id: z.ZodUUID;
2983
3511
  status: z.ZodEnum<{
2984
3512
  active: "active";
2985
- suspended: "suspended";
2986
- past_due: "past_due";
2987
3513
  canceled: "canceled";
2988
3514
  expired: "expired";
3515
+ past_due: "past_due";
3516
+ suspended: "suspended";
2989
3517
  }>;
2990
3518
  planCode: z.ZodString;
2991
3519
  interval: z.ZodEnum<{
@@ -3024,22 +3552,26 @@ declare const CheckoutSessionResponseSchema: z.ZodObject<{
3024
3552
  currency: z.ZodString;
3025
3553
  amountMinor: z.ZodNumber;
3026
3554
  expiresAt: z.ZodISODateTime;
3555
+ paymentMethod: z.ZodOptional<z.ZodEnum<{
3556
+ bank_transfer: "bank_transfer";
3557
+ card: "card";
3558
+ }>>;
3027
3559
  }, z.core.$strip>>;
3028
3560
  profile: z.ZodObject<{
3029
3561
  present: z.ZodBoolean;
3030
3562
  kind: z.ZodNullable<z.ZodEnum<{
3031
- individual: "individual";
3032
3563
  company: "company";
3564
+ individual: "individual";
3033
3565
  }>>;
3034
3566
  }, z.core.$strip>;
3035
3567
  subscriptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
3036
3568
  id: z.ZodUUID;
3037
3569
  status: z.ZodEnum<{
3038
3570
  active: "active";
3039
- suspended: "suspended";
3040
- past_due: "past_due";
3041
3571
  canceled: "canceled";
3042
3572
  expired: "expired";
3573
+ past_due: "past_due";
3574
+ suspended: "suspended";
3043
3575
  }>;
3044
3576
  planCode: z.ZodString;
3045
3577
  interval: z.ZodEnum<{
@@ -3071,11 +3603,11 @@ declare const CheckoutSessionResponseSchema: z.ZodObject<{
3071
3603
  id: z.ZodUUID;
3072
3604
  subscriptionId: z.ZodNullable<z.ZodUUID>;
3073
3605
  billingReason: z.ZodEnum<{
3606
+ manual: "manual";
3607
+ purchase: "purchase";
3074
3608
  subscription_create: "subscription_create";
3075
3609
  subscription_cycle: "subscription_cycle";
3076
3610
  subscription_update: "subscription_update";
3077
- purchase: "purchase";
3078
- manual: "manual";
3079
3611
  }>;
3080
3612
  totalMinor: z.ZodNumber;
3081
3613
  currency: z.ZodString;
@@ -3092,11 +3624,12 @@ declare const CheckoutSessionResponseSchema: z.ZodObject<{
3092
3624
  includedUnits: z.ZodNullable<z.ZodNumber>;
3093
3625
  billable: z.ZodBoolean;
3094
3626
  standing: z.ZodEnum<{
3095
- ok: "ok";
3096
- low: "low";
3097
3627
  exhausted: "exhausted";
3628
+ low: "low";
3629
+ ok: "ok";
3098
3630
  }>;
3099
3631
  }, z.core.$strip>>>;
3632
+ bankTransferCode: z.ZodOptional<z.ZodString>;
3100
3633
  }, z.core.$strip>>;
3101
3634
  }, z.core.$strip>;
3102
3635
  type CheckoutSessionResponse = z.infer<typeof CheckoutSessionResponseSchema>;
@@ -3107,9 +3640,9 @@ declare const InvoiceWaiveResponseSchema: z.ZodObject<{
3107
3640
  subscriptionId: z.ZodNullable<z.ZodUUID>;
3108
3641
  paymentId: z.ZodNullable<z.ZodUUID>;
3109
3642
  status: z.ZodEnum<{
3110
- void: "void";
3111
3643
  draft: "draft";
3112
3644
  issued: "issued";
3645
+ void: "void";
3113
3646
  }>;
3114
3647
  number: z.ZodNullable<z.ZodString>;
3115
3648
  currency: z.ZodString;
@@ -3119,8 +3652,8 @@ declare const InvoiceWaiveResponseSchema: z.ZodObject<{
3119
3652
  taxRateBps: z.ZodNumber;
3120
3653
  buyer: z.ZodObject<{
3121
3654
  kind: z.ZodEnum<{
3122
- individual: "individual";
3123
3655
  company: "company";
3656
+ individual: "individual";
3124
3657
  }>;
3125
3658
  contactName: z.ZodString;
3126
3659
  companyName: z.ZodOptional<z.ZodString>;
@@ -3152,16 +3685,16 @@ declare const InvoiceWaiveResponseSchema: z.ZodObject<{
3152
3685
  voidedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
3153
3686
  voidReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3154
3687
  billingReason: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
3688
+ manual: "manual";
3689
+ purchase: "purchase";
3155
3690
  subscription_create: "subscription_create";
3156
3691
  subscription_cycle: "subscription_cycle";
3157
3692
  subscription_update: "subscription_update";
3158
- purchase: "purchase";
3159
- manual: "manual";
3160
3693
  }>>>;
3161
3694
  paymentStatus: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
3162
- unpaid: "unpaid";
3163
3695
  paid: "paid";
3164
3696
  uncollectible: "uncollectible";
3697
+ unpaid: "unpaid";
3165
3698
  waived: "waived";
3166
3699
  }>>>;
3167
3700
  periodStart: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
@@ -3182,10 +3715,10 @@ declare const InvoiceWaiveResponseSchema: z.ZodObject<{
3182
3715
  id: z.ZodUUID;
3183
3716
  status: z.ZodEnum<{
3184
3717
  active: "active";
3185
- suspended: "suspended";
3186
- past_due: "past_due";
3187
3718
  canceled: "canceled";
3188
3719
  expired: "expired";
3720
+ past_due: "past_due";
3721
+ suspended: "suspended";
3189
3722
  }>;
3190
3723
  planCode: z.ZodString;
3191
3724
  interval: z.ZodEnum<{
@@ -3224,22 +3757,26 @@ declare const InvoiceWaiveResponseSchema: z.ZodObject<{
3224
3757
  currency: z.ZodString;
3225
3758
  amountMinor: z.ZodNumber;
3226
3759
  expiresAt: z.ZodISODateTime;
3760
+ paymentMethod: z.ZodOptional<z.ZodEnum<{
3761
+ bank_transfer: "bank_transfer";
3762
+ card: "card";
3763
+ }>>;
3227
3764
  }, z.core.$strip>>;
3228
3765
  profile: z.ZodObject<{
3229
3766
  present: z.ZodBoolean;
3230
3767
  kind: z.ZodNullable<z.ZodEnum<{
3231
- individual: "individual";
3232
3768
  company: "company";
3769
+ individual: "individual";
3233
3770
  }>>;
3234
3771
  }, z.core.$strip>;
3235
3772
  subscriptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
3236
3773
  id: z.ZodUUID;
3237
3774
  status: z.ZodEnum<{
3238
3775
  active: "active";
3239
- suspended: "suspended";
3240
- past_due: "past_due";
3241
3776
  canceled: "canceled";
3242
3777
  expired: "expired";
3778
+ past_due: "past_due";
3779
+ suspended: "suspended";
3243
3780
  }>;
3244
3781
  planCode: z.ZodString;
3245
3782
  interval: z.ZodEnum<{
@@ -3271,11 +3808,11 @@ declare const InvoiceWaiveResponseSchema: z.ZodObject<{
3271
3808
  id: z.ZodUUID;
3272
3809
  subscriptionId: z.ZodNullable<z.ZodUUID>;
3273
3810
  billingReason: z.ZodEnum<{
3811
+ manual: "manual";
3812
+ purchase: "purchase";
3274
3813
  subscription_create: "subscription_create";
3275
3814
  subscription_cycle: "subscription_cycle";
3276
3815
  subscription_update: "subscription_update";
3277
- purchase: "purchase";
3278
- manual: "manual";
3279
3816
  }>;
3280
3817
  totalMinor: z.ZodNumber;
3281
3818
  currency: z.ZodString;
@@ -3292,11 +3829,12 @@ declare const InvoiceWaiveResponseSchema: z.ZodObject<{
3292
3829
  includedUnits: z.ZodNullable<z.ZodNumber>;
3293
3830
  billable: z.ZodBoolean;
3294
3831
  standing: z.ZodEnum<{
3295
- ok: "ok";
3296
- low: "low";
3297
3832
  exhausted: "exhausted";
3833
+ low: "low";
3834
+ ok: "ok";
3298
3835
  }>;
3299
3836
  }, z.core.$strip>>>;
3837
+ bankTransferCode: z.ZodOptional<z.ZodString>;
3300
3838
  }, z.core.$strip>>;
3301
3839
  }, z.core.$strip>;
3302
3840
  type InvoiceWaiveResponse = z.infer<typeof InvoiceWaiveResponseSchema>;
@@ -3306,10 +3844,10 @@ declare const ChangeSubscriptionResponseSchema: z.ZodObject<{
3306
3844
  accountRef: z.ZodString;
3307
3845
  status: z.ZodEnum<{
3308
3846
  active: "active";
3309
- suspended: "suspended";
3310
- past_due: "past_due";
3311
3847
  canceled: "canceled";
3312
3848
  expired: "expired";
3849
+ past_due: "past_due";
3850
+ suspended: "suspended";
3313
3851
  }>;
3314
3852
  planCode: z.ZodString;
3315
3853
  priceId: z.ZodUUID;
@@ -3345,10 +3883,10 @@ declare const ChangeSubscriptionResponseSchema: z.ZodObject<{
3345
3883
  id: z.ZodUUID;
3346
3884
  status: z.ZodEnum<{
3347
3885
  active: "active";
3348
- suspended: "suspended";
3349
- past_due: "past_due";
3350
3886
  canceled: "canceled";
3351
3887
  expired: "expired";
3888
+ past_due: "past_due";
3889
+ suspended: "suspended";
3352
3890
  }>;
3353
3891
  planCode: z.ZodString;
3354
3892
  interval: z.ZodEnum<{
@@ -3387,22 +3925,26 @@ declare const ChangeSubscriptionResponseSchema: z.ZodObject<{
3387
3925
  currency: z.ZodString;
3388
3926
  amountMinor: z.ZodNumber;
3389
3927
  expiresAt: z.ZodISODateTime;
3928
+ paymentMethod: z.ZodOptional<z.ZodEnum<{
3929
+ bank_transfer: "bank_transfer";
3930
+ card: "card";
3931
+ }>>;
3390
3932
  }, z.core.$strip>>;
3391
3933
  profile: z.ZodObject<{
3392
3934
  present: z.ZodBoolean;
3393
3935
  kind: z.ZodNullable<z.ZodEnum<{
3394
- individual: "individual";
3395
3936
  company: "company";
3937
+ individual: "individual";
3396
3938
  }>>;
3397
3939
  }, z.core.$strip>;
3398
3940
  subscriptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
3399
3941
  id: z.ZodUUID;
3400
3942
  status: z.ZodEnum<{
3401
3943
  active: "active";
3402
- suspended: "suspended";
3403
- past_due: "past_due";
3404
3944
  canceled: "canceled";
3405
3945
  expired: "expired";
3946
+ past_due: "past_due";
3947
+ suspended: "suspended";
3406
3948
  }>;
3407
3949
  planCode: z.ZodString;
3408
3950
  interval: z.ZodEnum<{
@@ -3434,11 +3976,11 @@ declare const ChangeSubscriptionResponseSchema: z.ZodObject<{
3434
3976
  id: z.ZodUUID;
3435
3977
  subscriptionId: z.ZodNullable<z.ZodUUID>;
3436
3978
  billingReason: z.ZodEnum<{
3979
+ manual: "manual";
3980
+ purchase: "purchase";
3437
3981
  subscription_create: "subscription_create";
3438
3982
  subscription_cycle: "subscription_cycle";
3439
3983
  subscription_update: "subscription_update";
3440
- purchase: "purchase";
3441
- manual: "manual";
3442
3984
  }>;
3443
3985
  totalMinor: z.ZodNumber;
3444
3986
  currency: z.ZodString;
@@ -3455,11 +3997,12 @@ declare const ChangeSubscriptionResponseSchema: z.ZodObject<{
3455
3997
  includedUnits: z.ZodNullable<z.ZodNumber>;
3456
3998
  billable: z.ZodBoolean;
3457
3999
  standing: z.ZodEnum<{
3458
- ok: "ok";
3459
- low: "low";
3460
4000
  exhausted: "exhausted";
4001
+ low: "low";
4002
+ ok: "ok";
3461
4003
  }>;
3462
4004
  }, z.core.$strip>>>;
4005
+ bankTransferCode: z.ZodOptional<z.ZodString>;
3463
4006
  }, z.core.$strip>>;
3464
4007
  }, z.core.$strip>;
3465
4008
  type ChangeSubscriptionResponse = z.infer<typeof ChangeSubscriptionResponseSchema>;
@@ -3469,10 +4012,10 @@ declare const UncancelSubscriptionResponseSchema: z.ZodObject<{
3469
4012
  accountRef: z.ZodString;
3470
4013
  status: z.ZodEnum<{
3471
4014
  active: "active";
3472
- suspended: "suspended";
3473
- past_due: "past_due";
3474
4015
  canceled: "canceled";
3475
4016
  expired: "expired";
4017
+ past_due: "past_due";
4018
+ suspended: "suspended";
3476
4019
  }>;
3477
4020
  planCode: z.ZodString;
3478
4021
  priceId: z.ZodUUID;
@@ -3508,10 +4051,10 @@ declare const UncancelSubscriptionResponseSchema: z.ZodObject<{
3508
4051
  id: z.ZodUUID;
3509
4052
  status: z.ZodEnum<{
3510
4053
  active: "active";
3511
- suspended: "suspended";
3512
- past_due: "past_due";
3513
4054
  canceled: "canceled";
3514
4055
  expired: "expired";
4056
+ past_due: "past_due";
4057
+ suspended: "suspended";
3515
4058
  }>;
3516
4059
  planCode: z.ZodString;
3517
4060
  interval: z.ZodEnum<{
@@ -3550,22 +4093,26 @@ declare const UncancelSubscriptionResponseSchema: z.ZodObject<{
3550
4093
  currency: z.ZodString;
3551
4094
  amountMinor: z.ZodNumber;
3552
4095
  expiresAt: z.ZodISODateTime;
4096
+ paymentMethod: z.ZodOptional<z.ZodEnum<{
4097
+ bank_transfer: "bank_transfer";
4098
+ card: "card";
4099
+ }>>;
3553
4100
  }, z.core.$strip>>;
3554
4101
  profile: z.ZodObject<{
3555
4102
  present: z.ZodBoolean;
3556
4103
  kind: z.ZodNullable<z.ZodEnum<{
3557
- individual: "individual";
3558
4104
  company: "company";
4105
+ individual: "individual";
3559
4106
  }>>;
3560
4107
  }, z.core.$strip>;
3561
4108
  subscriptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
3562
4109
  id: z.ZodUUID;
3563
4110
  status: z.ZodEnum<{
3564
4111
  active: "active";
3565
- suspended: "suspended";
3566
- past_due: "past_due";
3567
4112
  canceled: "canceled";
3568
4113
  expired: "expired";
4114
+ past_due: "past_due";
4115
+ suspended: "suspended";
3569
4116
  }>;
3570
4117
  planCode: z.ZodString;
3571
4118
  interval: z.ZodEnum<{
@@ -3597,11 +4144,11 @@ declare const UncancelSubscriptionResponseSchema: z.ZodObject<{
3597
4144
  id: z.ZodUUID;
3598
4145
  subscriptionId: z.ZodNullable<z.ZodUUID>;
3599
4146
  billingReason: z.ZodEnum<{
4147
+ manual: "manual";
4148
+ purchase: "purchase";
3600
4149
  subscription_create: "subscription_create";
3601
4150
  subscription_cycle: "subscription_cycle";
3602
4151
  subscription_update: "subscription_update";
3603
- purchase: "purchase";
3604
- manual: "manual";
3605
4152
  }>;
3606
4153
  totalMinor: z.ZodNumber;
3607
4154
  currency: z.ZodString;
@@ -3618,11 +4165,12 @@ declare const UncancelSubscriptionResponseSchema: z.ZodObject<{
3618
4165
  includedUnits: z.ZodNullable<z.ZodNumber>;
3619
4166
  billable: z.ZodBoolean;
3620
4167
  standing: z.ZodEnum<{
3621
- ok: "ok";
3622
- low: "low";
3623
4168
  exhausted: "exhausted";
4169
+ low: "low";
4170
+ ok: "ok";
3624
4171
  }>;
3625
4172
  }, z.core.$strip>>>;
4173
+ bankTransferCode: z.ZodOptional<z.ZodString>;
3626
4174
  }, z.core.$strip>>;
3627
4175
  }, z.core.$strip>;
3628
4176
  type UncancelSubscriptionResponse = z.infer<typeof UncancelSubscriptionResponseSchema>;
@@ -3647,10 +4195,10 @@ declare const CreditGrantResponseSchema: z.ZodObject<{
3647
4195
  id: z.ZodUUID;
3648
4196
  status: z.ZodEnum<{
3649
4197
  active: "active";
3650
- suspended: "suspended";
3651
- past_due: "past_due";
3652
4198
  canceled: "canceled";
3653
4199
  expired: "expired";
4200
+ past_due: "past_due";
4201
+ suspended: "suspended";
3654
4202
  }>;
3655
4203
  planCode: z.ZodString;
3656
4204
  interval: z.ZodEnum<{
@@ -3689,22 +4237,26 @@ declare const CreditGrantResponseSchema: z.ZodObject<{
3689
4237
  currency: z.ZodString;
3690
4238
  amountMinor: z.ZodNumber;
3691
4239
  expiresAt: z.ZodISODateTime;
4240
+ paymentMethod: z.ZodOptional<z.ZodEnum<{
4241
+ bank_transfer: "bank_transfer";
4242
+ card: "card";
4243
+ }>>;
3692
4244
  }, z.core.$strip>>;
3693
4245
  profile: z.ZodObject<{
3694
4246
  present: z.ZodBoolean;
3695
4247
  kind: z.ZodNullable<z.ZodEnum<{
3696
- individual: "individual";
3697
4248
  company: "company";
4249
+ individual: "individual";
3698
4250
  }>>;
3699
4251
  }, z.core.$strip>;
3700
4252
  subscriptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
3701
4253
  id: z.ZodUUID;
3702
4254
  status: z.ZodEnum<{
3703
4255
  active: "active";
3704
- suspended: "suspended";
3705
- past_due: "past_due";
3706
4256
  canceled: "canceled";
3707
4257
  expired: "expired";
4258
+ past_due: "past_due";
4259
+ suspended: "suspended";
3708
4260
  }>;
3709
4261
  planCode: z.ZodString;
3710
4262
  interval: z.ZodEnum<{
@@ -3736,11 +4288,11 @@ declare const CreditGrantResponseSchema: z.ZodObject<{
3736
4288
  id: z.ZodUUID;
3737
4289
  subscriptionId: z.ZodNullable<z.ZodUUID>;
3738
4290
  billingReason: z.ZodEnum<{
4291
+ manual: "manual";
4292
+ purchase: "purchase";
3739
4293
  subscription_create: "subscription_create";
3740
4294
  subscription_cycle: "subscription_cycle";
3741
4295
  subscription_update: "subscription_update";
3742
- purchase: "purchase";
3743
- manual: "manual";
3744
4296
  }>;
3745
4297
  totalMinor: z.ZodNumber;
3746
4298
  currency: z.ZodString;
@@ -3757,21 +4309,22 @@ declare const CreditGrantResponseSchema: z.ZodObject<{
3757
4309
  includedUnits: z.ZodNullable<z.ZodNumber>;
3758
4310
  billable: z.ZodBoolean;
3759
4311
  standing: z.ZodEnum<{
3760
- ok: "ok";
3761
- low: "low";
3762
4312
  exhausted: "exhausted";
4313
+ low: "low";
4314
+ ok: "ok";
3763
4315
  }>;
3764
4316
  }, z.core.$strip>>>;
4317
+ bankTransferCode: z.ZodOptional<z.ZodString>;
3765
4318
  }, z.core.$strip>>;
3766
4319
  entry: z.ZodObject<{
3767
4320
  id: z.ZodUUID;
3768
4321
  meter: z.ZodString;
3769
4322
  kind: z.ZodEnum<{
4323
+ adjustment: "adjustment";
3770
4324
  cycle_grant: "cycle_grant";
3771
- rollover: "rollover";
3772
- plan_change: "plan_change";
3773
4325
  manual_grant: "manual_grant";
3774
- adjustment: "adjustment";
4326
+ plan_change: "plan_change";
4327
+ rollover: "rollover";
3775
4328
  }>;
3776
4329
  units: z.ZodNumber;
3777
4330
  periodStart: z.ZodISODateTime;
@@ -3792,9 +4345,9 @@ declare const CreditGrantResponseSchema: z.ZodObject<{
3792
4345
  balance: z.ZodNumber;
3793
4346
  overageUnits: z.ZodNumber;
3794
4347
  standing: z.ZodEnum<{
3795
- ok: "ok";
3796
- low: "low";
3797
4348
  exhausted: "exhausted";
4349
+ low: "low";
4350
+ ok: "ok";
3798
4351
  }>;
3799
4352
  billable: z.ZodBoolean;
3800
4353
  amountDueMinor: z.ZodNullable<z.ZodNumber>;
@@ -3811,16 +4364,16 @@ type CreditGrantResponse = z.infer<typeof CreditGrantResponseSchema>;
3811
4364
  * (catalog `meters`, `meter_credit` benefits, `GET …/meters`, credits) and `overage` (metered
3812
4365
  * prices, meter charges). A steward lists a capability only once it implements it. Open set.
3813
4366
  */
3814
- declare const STEWARD_CAPABILITIES: readonly ["benefits", "events", "meters", "overage"];
4367
+ declare const STEWARD_CAPABILITIES: readonly ['benefits', 'events', 'meters', 'overage'];
3815
4368
  type StewardCapability = (typeof STEWARD_CAPABILITIES)[number];
3816
4369
  /** `GET /v1/me`: the key's product and scope (setup check). `capabilities` absent from older steward. */
3817
4370
  declare const MeResponseSchema: z.ZodObject<{
3818
4371
  product: z.ZodString;
3819
4372
  keyName: z.ZodString;
3820
4373
  scope: z.ZodEnum<{
3821
- product: "product";
3822
4374
  admin: "admin";
3823
4375
  checkout: "checkout";
4376
+ product: "product";
3824
4377
  }>;
3825
4378
  capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
3826
4379
  }, z.core.$strip>;
@@ -3847,6 +4400,11 @@ declare const ERROR_CODES: Readonly<{
3847
4400
  actor_ref_required: ErrorCodeSpec;
3848
4401
  idempotency_key_required: ErrorCodeSpec;
3849
4402
  invalid_idempotency_key: ErrorCodeSpec;
4403
+ /**
4404
+ * The request body is over the route's limit (`/v1`: 64 KiB; catalog sync 1 MiB; invoice issue
4405
+ * 10 MiB). Event ingest keeps its own code (`batch_too_large`).
4406
+ */
4407
+ payload_too_large: ErrorCodeSpec;
3850
4408
  /** Anahtar yok / iptal / yanlış — neden ayrıştırılmaz. */
3851
4409
  unauthorized: ErrorCodeSpec;
3852
4410
  /** Admin kapsamı gereken uç. */
@@ -3865,6 +4423,22 @@ declare const ERROR_CODES: Readonly<{
3865
4423
  checkout_session_not_found: ErrorCodeSpec;
3866
4424
  /** Yönetim ucu: endpoint yok ya da başka ürünün. */
3867
4425
  webhook_endpoint_not_found: ErrorCodeSpec;
4426
+ /** Admin endpoint (issue #57): no API key of the product has this prefix. */
4427
+ api_key_not_found: ErrorCodeSpec;
4428
+ /** Admin endpoint (issue #57): no event of the product has this id. */
4429
+ event_not_found: ErrorCodeSpec;
4430
+ /**
4431
+ * `POST /v1/admin/webhook-endpoints`: the URL fails the SSRF policy (through the Ingress only public
4432
+ * `https://` names resolving to public addresses; cluster addresses only from inside the cluster).
4433
+ * The message says which rule.
4434
+ */
4435
+ webhook_url_not_allowed: ErrorCodeSpec;
4436
+ /** `POST /v1/admin/api-keys`: a key with this prefix already exists (generate a new token). */
4437
+ api_key_exists: ErrorCodeSpec;
4438
+ /** `POST /v1/admin/api-keys/:prefix/revoke`: a key cannot revoke itself (revoke it with another admin key). */
4439
+ api_key_self_revoke: ErrorCodeSpec;
4440
+ /** `PATCH /v1/admin/settings`: the `provider` is not configured in this deployment. */
4441
+ provider_not_available: ErrorCodeSpec;
3868
4442
  /** Ürün için henüz katalog senkronlanmadı (404 ama kurulum eksiği). */
3869
4443
  catalog_not_configured: ErrorCodeSpec;
3870
4444
  plan_missing_feature: ErrorCodeSpec;
@@ -3878,12 +4452,14 @@ declare const ERROR_CODES: Readonly<{
3878
4452
  already_subscribed: ErrorCodeSpec;
3879
4453
  already_canceled: ErrorCodeSpec;
3880
4454
  /**
3881
- * LEGACY — no longer produced (billing core, M35: no plan rank). Steward before the billing core
4455
+ * @deprecated LEGACY — no longer produced (billing core, M35: no plan rank). Steward before the billing core
3882
4456
  * answered `PUT …/plan` `mode: "strict"` with it when a live subscription's plan outranked the
3883
4457
  * target. Kept so clients that handle it keep compiling.
3884
4458
  */
3885
4459
  subscription_plan_higher: ErrorCodeSpec;
3886
4460
  plan_not_sellable: ErrorCodeSpec;
4461
+ /** Checkout `replacesSubscriptionId` (bank transfer plan H16): not a live subscription of the account. */
4462
+ replaces_subscription_invalid: ErrorCodeSpec;
3887
4463
  /**
3888
4464
  * F4e: hesap silinmiş (anonimleştirilmiş). `/v1/accounts/:ref` altındaki her uç (tekrar
3889
4465
  * `DELETE` ve aynı ref'le `PUT` dahil) 410 döner; hesap geri açılmaz.
@@ -3891,13 +4467,26 @@ declare const ERROR_CODES: Readonly<{
3891
4467
  account_deleted: ErrorCodeSpec;
3892
4468
  /** `DELETE /v1/accounts/:ref`: canlı abonelik (dönem sonunda iptali planlı dahil) var; önce hemen iptal. */
3893
4469
  subscription_active: ErrorCodeSpec;
3894
- /** `DELETE /v1/accounts/:ref`: sağlayıcı formu açık checkout oturumu var; süresi dolup kapanınca tekrar dene. */
4470
+ /**
4471
+ * `DELETE /v1/accounts/:ref`: sağlayıcı formu açık ya da havale bekleyen (bank transfer plan H5) checkout
4472
+ * oturumu var; kapanınca (süre dolumu, ödeme kaydı) tekrar dene.
4473
+ */
3895
4474
  checkout_in_progress: ErrorCodeSpec;
3896
4475
  /** `successUrl`, `cancelUrl` or portal `returnUrl` is not in the product's allowed origins: product misconfiguration. */
3897
4476
  return_url_not_allowed: ErrorCodeSpec;
3898
4477
  /** Bu deployment'ta sağlayıcı yapılandırılmamış (503 ama beklemekle düzelmez). */
3899
4478
  provider_not_configured: ErrorCodeSpec;
3900
4479
  provider_error: ErrorCodeSpec;
4480
+ /** Not an order code, or its check symbol does not match (a typo in the transfer description). */
4481
+ bank_transfer_code_invalid: ErrorCodeSpec;
4482
+ /** No account of the product has this order code. */
4483
+ bank_transfer_code_not_found: ErrorCodeSpec;
4484
+ /** This bank reference is already recorded. */
4485
+ bank_transfer_duplicate: ErrorCodeSpec;
4486
+ /** Nothing of the account waits for exactly this amount, or several items do (name one), or the named checkout is not one. */
4487
+ bank_transfer_unmatched: ErrorCodeSpec;
4488
+ /** The checkout expired (only `acceptExpired` settles it), is closed or cannot be completed: refund the transfer. */
4489
+ bank_transfer_rejected: ErrorCodeSpec;
3901
4490
  already_issued: ErrorCodeSpec;
3902
4491
  number_taken: ErrorCodeSpec;
3903
4492
  invalid_document: ErrorCodeSpec;
@@ -3939,14 +4528,21 @@ declare const ERROR_CODES: Readonly<{
3939
4528
  internal_error: ErrorCodeSpec;
3940
4529
  /** `/health`: veritabanına ulaşılamıyor. */
3941
4530
  database_unavailable: ErrorCodeSpec;
3942
- /** F2c (K26): anahtar prefix'i başına bütçe aşıldı; `Retry-After` başlığı taşır. */
4531
+ /**
4532
+ * Always with `Retry-After` (seconds). `/v1`: the key's budget for the route is spent, or the client
4533
+ * IP is blocked after too many rejected keys (`service/src/http/rate-limit.ts`, issue #43). Hosted
4534
+ * pages: wrong page key / action limit (`hosted/routes.ts`, `hosted/portal-routes.ts`).
4535
+ */
3943
4536
  rate_limited: ErrorCodeSpec;
3944
4537
  unknown_provider: ErrorCodeSpec;
3945
4538
  bad_signature: ErrorCodeSpec;
3946
4539
  invalid_payload: ErrorCodeSpec;
3947
4540
  stale_event: ErrorCodeSpec;
3948
4541
  not_configured: ErrorCodeSpec;
3949
- /** Yalnızca sahte sağlayıcı (yerel/test). */
4542
+ /**
4543
+ * @deprecated Üretilmiyor: sağlayıcı abonelik yolu silindi (M30) ve sahte sağlayıcı da bu kodu
4544
+ * döndürmüyor. Eski istemciler derlensin diye duruyor; bir sonraki minor sürümde kaldırılacak.
4545
+ */
3950
4546
  unknown_subscription: ErrorCodeSpec;
3951
4547
  }>;
3952
4548
  type ErrorCode = keyof typeof ERROR_CODES;
@@ -3956,7 +4552,7 @@ declare function errorCodeSpec(code: string): ErrorCodeSpec | null;
3956
4552
  //#endregion
3957
4553
  //#region ../contract/src/rules.d.ts
3958
4554
  /** Live subscription statuses. An account may hold several live subscriptions (billing core, M34). */
3959
- declare const LIVE_SUBSCRIPTION_STATUSES: readonly ["active", "past_due", "suspended"];
4555
+ declare const LIVE_SUBSCRIPTION_STATUSES: readonly ['active', 'past_due', 'suspended'];
3960
4556
  declare function isLiveSubscriptionStatus(status: SubscriptionStatus): boolean;
3961
4557
  type Instant = string | Date;
3962
4558
  /** Catalog benefit definition as the rule reads it (catalog input and `GET /v1/catalog` both fit). */
@@ -4040,7 +4636,7 @@ type ResolvedBenefit = {
4040
4636
  /** `plan:<code>`, `grant:<id>` or `override`. */
4041
4637
  source: string;
4042
4638
  };
4043
- type ResolvedEntitlements = Pick<EntitlementSnapshot, "planCode" | "accessState" | "entitlements">;
4639
+ type ResolvedEntitlements = Pick<EntitlementSnapshot, 'planCode' | 'accessState' | 'entitlements'>;
4044
4640
  type ResolvedBenefits = ResolvedEntitlements & {
4045
4641
  /** Granted benefits in layer order; the `override` benefit (if any) is last. */
4046
4642
  benefits: ResolvedBenefit[];
@@ -4109,17 +4705,17 @@ declare const EventsIngestInputSchema: z.ZodObject<{
4109
4705
  }, z.core.$strip>;
4110
4706
  type EventsIngestInput = z.infer<typeof EventsIngestInputSchema>;
4111
4707
  /** Per-event rejection codes this version knows (M12). The result schema accepts others too. */
4112
- declare const INGEST_REJECT_CODES: readonly ["account_not_found", "account_deleted", "timestamp_out_of_range"];
4708
+ declare const INGEST_REJECT_CODES: readonly ['account_not_found', 'account_deleted', 'timestamp_out_of_range'];
4113
4709
  declare const IngestRejectCodeSchema: z.ZodEnum<{
4114
- account_not_found: "account_not_found";
4115
4710
  account_deleted: "account_deleted";
4711
+ account_not_found: "account_not_found";
4116
4712
  timestamp_out_of_range: "timestamp_out_of_range";
4117
4713
  }>;
4118
4714
  type IngestRejectCode = z.infer<typeof IngestRejectCodeSchema>;
4119
4715
  declare const IngestRejectionSchema: z.ZodObject<{
4120
4716
  index: z.ZodNumber;
4121
4717
  externalId: z.ZodString;
4122
- code: z.ZodType<"account_not_found" | "account_deleted" | "timestamp_out_of_range" | (string & Record<never, never>), string, z.core.$ZodTypeInternals<"account_not_found" | "account_deleted" | "timestamp_out_of_range" | (string & Record<never, never>), string>>;
4718
+ code: z.ZodType<"account_deleted" | "account_not_found" | "timestamp_out_of_range" | (string & Record<never, never>), string, z.core.$ZodTypeInternals<"account_deleted" | "account_not_found" | "timestamp_out_of_range" | (string & Record<never, never>), string>>;
4123
4719
  }, z.core.$strip>;
4124
4720
  type IngestRejection = z.infer<typeof IngestRejectionSchema>;
4125
4721
  /**
@@ -4132,7 +4728,7 @@ declare const EventsIngestResultSchema: z.ZodObject<{
4132
4728
  rejected: z.ZodArray<z.ZodObject<{
4133
4729
  index: z.ZodNumber;
4134
4730
  externalId: z.ZodString;
4135
- code: z.ZodType<"account_not_found" | "account_deleted" | "timestamp_out_of_range" | (string & Record<never, never>), string, z.core.$ZodTypeInternals<"account_not_found" | "account_deleted" | "timestamp_out_of_range" | (string & Record<never, never>), string>>;
4731
+ code: z.ZodType<"account_deleted" | "account_not_found" | "timestamp_out_of_range" | (string & Record<never, never>), string, z.core.$ZodTypeInternals<"account_deleted" | "account_not_found" | "timestamp_out_of_range" | (string & Record<never, never>), string>>;
4136
4732
  }, z.core.$strip>>;
4137
4733
  }, z.core.$strip>;
4138
4734
  type EventsIngestResult = z.infer<typeof EventsIngestResultSchema>;
@@ -4170,15 +4766,15 @@ declare function matchesFilter(event: MeterRulesEvent, filter: MeterFilter): boo
4170
4766
  * non-negative number — a numeric string does not count. The event adds nothing to that meter.
4171
4767
  */
4172
4768
  type MeterContribution = {
4173
- kind: "count";
4769
+ kind: 'count';
4174
4770
  } | {
4175
- kind: "sum" | "max";
4771
+ kind: 'sum' | 'max';
4176
4772
  micro: bigint;
4177
4773
  } | {
4178
- kind: "unique";
4774
+ kind: 'unique';
4179
4775
  value: string;
4180
4776
  } | {
4181
- kind: "invalid_value";
4777
+ kind: 'invalid_value';
4182
4778
  };
4183
4779
  declare function contributionOf(event: MeterRulesEvent, aggregation: MeterAggregation): MeterContribution;
4184
4780
  /**
@@ -4334,7 +4930,7 @@ declare function meterChargeTotals(lines: readonly MeterChargeTotalsLine[], term
4334
4930
  };
4335
4931
  //#endregion
4336
4932
  //#region ../contract/src/plan.d.ts
4337
- declare const PLAN_SET_MODES: readonly ["ensure", "strict"];
4933
+ declare const PLAN_SET_MODES: readonly ['ensure', 'strict'];
4338
4934
  declare const PlanSetModeSchema: z.ZodEnum<{
4339
4935
  ensure: "ensure";
4340
4936
  strict: "strict";
@@ -4352,7 +4948,7 @@ declare const PlanSetInputSchema: z.ZodObject<{
4352
4948
  }, z.core.$strip>;
4353
4949
  type PlanSetInput = z.input<typeof PlanSetInputSchema>;
4354
4950
  /** `warnings[].code` — open set. None is produced since the billing core; `subscription_plan_higher` is legacy. */
4355
- type PlanSetWarningCode = "subscription_plan_higher" | (string & Record<never, never>);
4951
+ type PlanSetWarningCode = 'subscription_plan_higher' | (string & Record<never, never>);
4356
4952
  declare const PlanSetWarningSchema: z.ZodObject<{
4357
4953
  code: z.ZodString;
4358
4954
  message: z.ZodString;
@@ -4389,10 +4985,10 @@ declare const PlanSetResponseSchema: z.ZodObject<{
4389
4985
  id: z.ZodUUID;
4390
4986
  status: z.ZodEnum<{
4391
4987
  active: "active";
4392
- suspended: "suspended";
4393
- past_due: "past_due";
4394
4988
  canceled: "canceled";
4395
4989
  expired: "expired";
4990
+ past_due: "past_due";
4991
+ suspended: "suspended";
4396
4992
  }>;
4397
4993
  planCode: z.ZodString;
4398
4994
  interval: z.ZodEnum<{
@@ -4431,22 +5027,26 @@ declare const PlanSetResponseSchema: z.ZodObject<{
4431
5027
  currency: z.ZodString;
4432
5028
  amountMinor: z.ZodNumber;
4433
5029
  expiresAt: z.ZodISODateTime;
5030
+ paymentMethod: z.ZodOptional<z.ZodEnum<{
5031
+ bank_transfer: "bank_transfer";
5032
+ card: "card";
5033
+ }>>;
4434
5034
  }, z.core.$strip>>;
4435
5035
  profile: z.ZodObject<{
4436
5036
  present: z.ZodBoolean;
4437
5037
  kind: z.ZodNullable<z.ZodEnum<{
4438
- individual: "individual";
4439
5038
  company: "company";
5039
+ individual: "individual";
4440
5040
  }>>;
4441
5041
  }, z.core.$strip>;
4442
5042
  subscriptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
4443
5043
  id: z.ZodUUID;
4444
5044
  status: z.ZodEnum<{
4445
5045
  active: "active";
4446
- suspended: "suspended";
4447
- past_due: "past_due";
4448
5046
  canceled: "canceled";
4449
5047
  expired: "expired";
5048
+ past_due: "past_due";
5049
+ suspended: "suspended";
4450
5050
  }>;
4451
5051
  planCode: z.ZodString;
4452
5052
  interval: z.ZodEnum<{
@@ -4478,11 +5078,11 @@ declare const PlanSetResponseSchema: z.ZodObject<{
4478
5078
  id: z.ZodUUID;
4479
5079
  subscriptionId: z.ZodNullable<z.ZodUUID>;
4480
5080
  billingReason: z.ZodEnum<{
5081
+ manual: "manual";
5082
+ purchase: "purchase";
4481
5083
  subscription_create: "subscription_create";
4482
5084
  subscription_cycle: "subscription_cycle";
4483
5085
  subscription_update: "subscription_update";
4484
- purchase: "purchase";
4485
- manual: "manual";
4486
5086
  }>;
4487
5087
  totalMinor: z.ZodNumber;
4488
5088
  currency: z.ZodString;
@@ -4499,11 +5099,12 @@ declare const PlanSetResponseSchema: z.ZodObject<{
4499
5099
  includedUnits: z.ZodNullable<z.ZodNumber>;
4500
5100
  billable: z.ZodBoolean;
4501
5101
  standing: z.ZodEnum<{
4502
- ok: "ok";
4503
- low: "low";
4504
5102
  exhausted: "exhausted";
5103
+ low: "low";
5104
+ ok: "ok";
4505
5105
  }>;
4506
5106
  }, z.core.$strip>>>;
5107
+ bankTransferCode: z.ZodOptional<z.ZodString>;
4507
5108
  }, z.core.$strip>;
4508
5109
  warnings: z.ZodArray<z.ZodObject<{
4509
5110
  code: z.ZodString;
@@ -4518,18 +5119,19 @@ declare const ResyncResultSchema: z.ZodObject<{
4518
5119
  type ResyncResult = z.infer<typeof ResyncResultSchema>;
4519
5120
  //#endregion
4520
5121
  //#region ../contract/src/emails.d.ts
4521
- declare const EMAIL_TEMPLATES: readonly ["subscription_started", "payment_receipt", "payment_failed", "cancel_scheduled", "subscription_ended", "access_suspended", "subscription_terminated", "invoice_issued", "invoice_payment_due", "price_change_notice"];
5122
+ declare const EMAIL_TEMPLATES: readonly ['subscription_started', 'payment_receipt', 'payment_failed', 'cancel_scheduled', 'subscription_ended', 'access_suspended', 'subscription_terminated', 'invoice_issued', 'invoice_payment_due', 'price_change_notice', 'bank_transfer_instructions'];
4522
5123
  declare const EmailTemplateSchema: z.ZodEnum<{
4523
- subscription_started: "subscription_started";
4524
- payment_receipt: "payment_receipt";
4525
- payment_failed: "payment_failed";
4526
- cancel_scheduled: "cancel_scheduled";
4527
- subscription_ended: "subscription_ended";
4528
5124
  access_suspended: "access_suspended";
4529
- subscription_terminated: "subscription_terminated";
5125
+ bank_transfer_instructions: "bank_transfer_instructions";
5126
+ cancel_scheduled: "cancel_scheduled";
4530
5127
  invoice_issued: "invoice_issued";
4531
5128
  invoice_payment_due: "invoice_payment_due";
5129
+ payment_failed: "payment_failed";
5130
+ payment_receipt: "payment_receipt";
4532
5131
  price_change_notice: "price_change_notice";
5132
+ subscription_ended: "subscription_ended";
5133
+ subscription_started: "subscription_started";
5134
+ subscription_terminated: "subscription_terminated";
4533
5135
  }>;
4534
5136
  type EmailTemplate = z.infer<typeof EmailTemplateSchema>;
4535
5137
  /** `invoice_payment_due`: summary of an unpaid invoice, its due date and the hosted pay page link. */
@@ -4537,11 +5139,11 @@ declare const InvoicePaymentDueEmailSchema: z.ZodObject<{
4537
5139
  invoiceId: z.ZodUUID;
4538
5140
  number: z.ZodNullable<z.ZodString>;
4539
5141
  billingReason: z.ZodEnum<{
5142
+ manual: "manual";
5143
+ purchase: "purchase";
4540
5144
  subscription_create: "subscription_create";
4541
5145
  subscription_cycle: "subscription_cycle";
4542
5146
  subscription_update: "subscription_update";
4543
- purchase: "purchase";
4544
- manual: "manual";
4545
5147
  }>;
4546
5148
  planName: z.ZodNullable<z.ZodString>;
4547
5149
  totalMinor: z.ZodNumber;
@@ -4630,17 +5232,47 @@ declare const PriceChangeNoticeEmailSchema: z.ZodObject<{
4630
5232
  }, z.core.$strip>>>;
4631
5233
  }, z.core.$strip>;
4632
5234
  type PriceChangeNoticeEmail = z.infer<typeof PriceChangeNoticeEmailSchema>;
5235
+ /**
5236
+ * `bank_transfer_instructions` (bank transfer plan H12): how to pay a checkout by bank transfer —
5237
+ * the deployment's bank account for the currency, the exact amount, the account's order code to
5238
+ * write in the description and the deadline. `reminder`: sent the day before the deadline.
5239
+ */
5240
+ declare const BankTransferInstructionsEmailSchema: z.ZodObject<{
5241
+ checkoutSessionId: z.ZodUUID;
5242
+ planName: z.ZodString;
5243
+ totalMinor: z.ZodNumber;
5244
+ currency: z.ZodString;
5245
+ beneficiary: z.ZodString;
5246
+ bank: z.ZodNullable<z.ZodString>;
5247
+ iban: z.ZodString;
5248
+ code: z.ZodString;
5249
+ deadline: z.ZodISODateTime;
5250
+ reminder: z.ZodBoolean;
5251
+ }, z.core.$strip>;
5252
+ type BankTransferInstructionsEmail = z.infer<typeof BankTransferInstructionsEmailSchema>;
4633
5253
  /** Payload schema per billing core template. */
4634
5254
  declare const EMAIL_PAYLOAD_SCHEMAS: Readonly<{
5255
+ readonly bank_transfer_instructions: z.ZodObject<{
5256
+ checkoutSessionId: z.ZodUUID;
5257
+ planName: z.ZodString;
5258
+ totalMinor: z.ZodNumber;
5259
+ currency: z.ZodString;
5260
+ beneficiary: z.ZodString;
5261
+ bank: z.ZodNullable<z.ZodString>;
5262
+ iban: z.ZodString;
5263
+ code: z.ZodString;
5264
+ deadline: z.ZodISODateTime;
5265
+ reminder: z.ZodBoolean;
5266
+ }, z.core.$strip>;
4635
5267
  readonly invoice_payment_due: z.ZodObject<{
4636
5268
  invoiceId: z.ZodUUID;
4637
5269
  number: z.ZodNullable<z.ZodString>;
4638
5270
  billingReason: z.ZodEnum<{
5271
+ manual: "manual";
5272
+ purchase: "purchase";
4639
5273
  subscription_create: "subscription_create";
4640
5274
  subscription_cycle: "subscription_cycle";
4641
5275
  subscription_update: "subscription_update";
4642
- purchase: "purchase";
4643
- manual: "manual";
4644
5276
  }>;
4645
5277
  planName: z.ZodNullable<z.ZodString>;
4646
5278
  totalMinor: z.ZodNumber;
@@ -4694,7 +5326,7 @@ declare const EMAIL_PAYLOAD_SCHEMAS: Readonly<{
4694
5326
  */
4695
5327
  declare const EMAIL_TEMPLATE_BY_EVENT: Readonly<Partial<Record<EventType, EmailTemplate>>>;
4696
5328
  declare function emailTemplateOf(type: string): EmailTemplate | null;
4697
- declare const EMAIL_LOCALES: readonly ["tr", "en"];
5329
+ declare const EMAIL_LOCALES: readonly ['tr', 'en'];
4698
5330
  type EmailLocale = (typeof EMAIL_LOCALES)[number];
4699
5331
  /** Upper bound of product-provided recipients per account. */
4700
5332
  declare const MAX_NOTIFICATION_EMAILS = 10;
@@ -4721,7 +5353,7 @@ declare const EmailSenderSchema: z.ZodObject<{
4721
5353
  address: z.ZodOptional<z.ZodEmail>;
4722
5354
  }, z.core.$strip>;
4723
5355
  /** Placeholders a billing path may use. */
4724
- declare const BILLING_PATH_PLACEHOLDERS: readonly ["{LOCALE}", "{ACCOUNT_REF}"];
5356
+ declare const BILLING_PATH_PLACEHOLDERS: readonly ['{LOCALE}', '{ACCOUNT_REF}'];
4725
5357
  declare const BillingPathSchema: z.ZodString;
4726
5358
  declare const EmailSettingsSchema: z.ZodObject<{
4727
5359
  from: z.ZodOptional<z.ZodObject<{
@@ -4731,70 +5363,77 @@ declare const EmailSettingsSchema: z.ZodObject<{
4731
5363
  replyTo: z.ZodOptional<z.ZodEmail>;
4732
5364
  billingPath: z.ZodOptional<z.ZodString>;
4733
5365
  templates: z.ZodDefault<z.ZodObject<{
4734
- subscription_started: z.ZodOptional<z.ZodObject<{
5366
+ access_suspended: z.ZodOptional<z.ZodObject<{
4735
5367
  enabled: z.ZodDefault<z.ZodBoolean>;
4736
5368
  extraText: z.ZodOptional<z.ZodObject<{
4737
5369
  tr: z.ZodOptional<z.ZodString>;
4738
5370
  en: z.ZodOptional<z.ZodString>;
4739
5371
  }, z.core.$strip>>;
4740
5372
  }, z.core.$strip>>;
4741
- payment_receipt: z.ZodOptional<z.ZodObject<{
5373
+ bank_transfer_instructions: z.ZodOptional<z.ZodObject<{
4742
5374
  enabled: z.ZodDefault<z.ZodBoolean>;
4743
5375
  extraText: z.ZodOptional<z.ZodObject<{
4744
5376
  tr: z.ZodOptional<z.ZodString>;
4745
5377
  en: z.ZodOptional<z.ZodString>;
4746
5378
  }, z.core.$strip>>;
4747
5379
  }, z.core.$strip>>;
4748
- payment_failed: z.ZodOptional<z.ZodObject<{
5380
+ cancel_scheduled: z.ZodOptional<z.ZodObject<{
4749
5381
  enabled: z.ZodDefault<z.ZodBoolean>;
4750
5382
  extraText: z.ZodOptional<z.ZodObject<{
4751
5383
  tr: z.ZodOptional<z.ZodString>;
4752
5384
  en: z.ZodOptional<z.ZodString>;
4753
5385
  }, z.core.$strip>>;
4754
5386
  }, z.core.$strip>>;
4755
- cancel_scheduled: z.ZodOptional<z.ZodObject<{
5387
+ invoice_issued: z.ZodOptional<z.ZodObject<{
4756
5388
  enabled: z.ZodDefault<z.ZodBoolean>;
4757
5389
  extraText: z.ZodOptional<z.ZodObject<{
4758
5390
  tr: z.ZodOptional<z.ZodString>;
4759
5391
  en: z.ZodOptional<z.ZodString>;
4760
5392
  }, z.core.$strip>>;
4761
5393
  }, z.core.$strip>>;
4762
- subscription_ended: z.ZodOptional<z.ZodObject<{
5394
+ invoice_payment_due: z.ZodOptional<z.ZodObject<{
4763
5395
  enabled: z.ZodDefault<z.ZodBoolean>;
4764
5396
  extraText: z.ZodOptional<z.ZodObject<{
4765
5397
  tr: z.ZodOptional<z.ZodString>;
4766
5398
  en: z.ZodOptional<z.ZodString>;
4767
5399
  }, z.core.$strip>>;
4768
5400
  }, z.core.$strip>>;
4769
- access_suspended: z.ZodOptional<z.ZodObject<{
5401
+ payment_failed: z.ZodOptional<z.ZodObject<{
4770
5402
  enabled: z.ZodDefault<z.ZodBoolean>;
4771
5403
  extraText: z.ZodOptional<z.ZodObject<{
4772
5404
  tr: z.ZodOptional<z.ZodString>;
4773
5405
  en: z.ZodOptional<z.ZodString>;
4774
5406
  }, z.core.$strip>>;
4775
5407
  }, z.core.$strip>>;
4776
- subscription_terminated: z.ZodOptional<z.ZodObject<{
5408
+ payment_receipt: z.ZodOptional<z.ZodObject<{
4777
5409
  enabled: z.ZodDefault<z.ZodBoolean>;
4778
5410
  extraText: z.ZodOptional<z.ZodObject<{
4779
5411
  tr: z.ZodOptional<z.ZodString>;
4780
5412
  en: z.ZodOptional<z.ZodString>;
4781
5413
  }, z.core.$strip>>;
4782
5414
  }, z.core.$strip>>;
4783
- invoice_issued: z.ZodOptional<z.ZodObject<{
5415
+ price_change_notice: z.ZodOptional<z.ZodObject<{
4784
5416
  enabled: z.ZodDefault<z.ZodBoolean>;
4785
5417
  extraText: z.ZodOptional<z.ZodObject<{
4786
5418
  tr: z.ZodOptional<z.ZodString>;
4787
5419
  en: z.ZodOptional<z.ZodString>;
4788
5420
  }, z.core.$strip>>;
4789
5421
  }, z.core.$strip>>;
4790
- invoice_payment_due: z.ZodOptional<z.ZodObject<{
5422
+ subscription_ended: z.ZodOptional<z.ZodObject<{
4791
5423
  enabled: z.ZodDefault<z.ZodBoolean>;
4792
5424
  extraText: z.ZodOptional<z.ZodObject<{
4793
5425
  tr: z.ZodOptional<z.ZodString>;
4794
5426
  en: z.ZodOptional<z.ZodString>;
4795
5427
  }, z.core.$strip>>;
4796
5428
  }, z.core.$strip>>;
4797
- price_change_notice: z.ZodOptional<z.ZodObject<{
5429
+ subscription_started: z.ZodOptional<z.ZodObject<{
5430
+ enabled: z.ZodDefault<z.ZodBoolean>;
5431
+ extraText: z.ZodOptional<z.ZodObject<{
5432
+ tr: z.ZodOptional<z.ZodString>;
5433
+ en: z.ZodOptional<z.ZodString>;
5434
+ }, z.core.$strip>>;
5435
+ }, z.core.$strip>>;
5436
+ subscription_terminated: z.ZodOptional<z.ZodObject<{
4798
5437
  enabled: z.ZodDefault<z.ZodBoolean>;
4799
5438
  extraText: z.ZodOptional<z.ZodObject<{
4800
5439
  tr: z.ZodOptional<z.ZodString>;
@@ -4812,43 +5451,47 @@ declare const EmailSettingsPatchSchema: z.ZodObject<{
4812
5451
  replyTo: z.ZodOptional<z.ZodNullable<z.ZodEmail>>;
4813
5452
  billingPath: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4814
5453
  templates: z.ZodOptional<z.ZodObject<{
4815
- subscription_started: z.ZodOptional<z.ZodNullable<z.ZodObject<{
5454
+ access_suspended: z.ZodOptional<z.ZodNullable<z.ZodObject<{
4816
5455
  enabled: z.ZodOptional<z.ZodBoolean>;
4817
5456
  extraText: z.ZodOptional<typeof EmailExtraTextSchema>;
4818
5457
  }, z.core.$strict>>>;
4819
- payment_receipt: z.ZodOptional<z.ZodNullable<z.ZodObject<{
5458
+ bank_transfer_instructions: z.ZodOptional<z.ZodNullable<z.ZodObject<{
4820
5459
  enabled: z.ZodOptional<z.ZodBoolean>;
4821
5460
  extraText: z.ZodOptional<typeof EmailExtraTextSchema>;
4822
5461
  }, z.core.$strict>>>;
4823
- payment_failed: z.ZodOptional<z.ZodNullable<z.ZodObject<{
5462
+ cancel_scheduled: z.ZodOptional<z.ZodNullable<z.ZodObject<{
4824
5463
  enabled: z.ZodOptional<z.ZodBoolean>;
4825
5464
  extraText: z.ZodOptional<typeof EmailExtraTextSchema>;
4826
5465
  }, z.core.$strict>>>;
4827
- cancel_scheduled: z.ZodOptional<z.ZodNullable<z.ZodObject<{
5466
+ invoice_issued: z.ZodOptional<z.ZodNullable<z.ZodObject<{
4828
5467
  enabled: z.ZodOptional<z.ZodBoolean>;
4829
5468
  extraText: z.ZodOptional<typeof EmailExtraTextSchema>;
4830
5469
  }, z.core.$strict>>>;
4831
- subscription_ended: z.ZodOptional<z.ZodNullable<z.ZodObject<{
5470
+ invoice_payment_due: z.ZodOptional<z.ZodNullable<z.ZodObject<{
4832
5471
  enabled: z.ZodOptional<z.ZodBoolean>;
4833
5472
  extraText: z.ZodOptional<typeof EmailExtraTextSchema>;
4834
5473
  }, z.core.$strict>>>;
4835
- access_suspended: z.ZodOptional<z.ZodNullable<z.ZodObject<{
5474
+ payment_failed: z.ZodOptional<z.ZodNullable<z.ZodObject<{
4836
5475
  enabled: z.ZodOptional<z.ZodBoolean>;
4837
5476
  extraText: z.ZodOptional<typeof EmailExtraTextSchema>;
4838
5477
  }, z.core.$strict>>>;
4839
- subscription_terminated: z.ZodOptional<z.ZodNullable<z.ZodObject<{
5478
+ payment_receipt: z.ZodOptional<z.ZodNullable<z.ZodObject<{
4840
5479
  enabled: z.ZodOptional<z.ZodBoolean>;
4841
5480
  extraText: z.ZodOptional<typeof EmailExtraTextSchema>;
4842
5481
  }, z.core.$strict>>>;
4843
- invoice_issued: z.ZodOptional<z.ZodNullable<z.ZodObject<{
5482
+ price_change_notice: z.ZodOptional<z.ZodNullable<z.ZodObject<{
4844
5483
  enabled: z.ZodOptional<z.ZodBoolean>;
4845
5484
  extraText: z.ZodOptional<typeof EmailExtraTextSchema>;
4846
5485
  }, z.core.$strict>>>;
4847
- invoice_payment_due: z.ZodOptional<z.ZodNullable<z.ZodObject<{
5486
+ subscription_ended: z.ZodOptional<z.ZodNullable<z.ZodObject<{
4848
5487
  enabled: z.ZodOptional<z.ZodBoolean>;
4849
5488
  extraText: z.ZodOptional<typeof EmailExtraTextSchema>;
4850
5489
  }, z.core.$strict>>>;
4851
- price_change_notice: z.ZodOptional<z.ZodNullable<z.ZodObject<{
5490
+ subscription_started: z.ZodOptional<z.ZodNullable<z.ZodObject<{
5491
+ enabled: z.ZodOptional<z.ZodBoolean>;
5492
+ extraText: z.ZodOptional<typeof EmailExtraTextSchema>;
5493
+ }, z.core.$strict>>>;
5494
+ subscription_terminated: z.ZodOptional<z.ZodNullable<z.ZodObject<{
4852
5495
  enabled: z.ZodOptional<z.ZodBoolean>;
4853
5496
  extraText: z.ZodOptional<typeof EmailExtraTextSchema>;
4854
5497
  }, z.core.$strict>>>;
@@ -4872,6 +5515,8 @@ type EmailRelevanceFacts = {
4872
5515
  invoiceStatus?: string | null;
4873
5516
  /** Current payment status of the invoice (`invoice_payment_due`). */
4874
5517
  invoicePaymentStatus?: string | null;
5518
+ /** The checkout session still waits for a bank transfer (`bank_transfer_instructions`). */
5519
+ transferPending?: boolean;
4875
5520
  };
4876
5521
  /**
4877
5522
  * The event's subscription among the account's live subscriptions at send time, or null when it
@@ -4879,7 +5524,7 @@ type EmailRelevanceFacts = {
4879
5524
  * only the primary one); a state without that list (older steward) has only the primary
4880
5525
  * `subscription`.
4881
5526
  */
4882
- declare function liveSubscriptionOf(state: AccountState, subscriptionId: string | null): AccountState["subscription"];
5527
+ declare function liveSubscriptionOf(state: AccountState, subscriptionId: string | null): AccountState['subscription'];
4883
5528
  /**
4884
5529
  * Whether the email still describes the account at send time. Receipts, the welcome email
4885
5530
  * (legal confirmation) and the final termination notice always go; the others only while
@@ -4893,10 +5538,10 @@ declare function isEmailRelevant(template: EmailTemplate, facts: EmailRelevanceF
4893
5538
  declare const WebUrlSchema: z.ZodURL;
4894
5539
  /** http(s) adresinin origin'i (ör. `https://app.example.com`). */
4895
5540
  declare const ReturnOriginSchema: z.ZodPipe<z.ZodURL, z.ZodTransform<string, string>>;
4896
- declare const SETTINGS_LOCALES: readonly ["tr", "en"];
5541
+ declare const SETTINGS_LOCALES: readonly ['tr', 'en'];
4897
5542
  declare const SettingsLocaleSchema: z.ZodEnum<{
4898
- tr: "tr";
4899
5543
  en: "en";
5544
+ tr: "tr";
4900
5545
  }>;
4901
5546
  type SettingsLocale = z.infer<typeof SettingsLocaleSchema>;
4902
5547
  declare const TtlMinutesSchema: z.ZodNumber;
@@ -4911,26 +5556,46 @@ declare const BrandingSchema: z.ZodObject<{
4911
5556
  type Branding = z.infer<typeof BrandingSchema>;
4912
5557
  declare const DEFAULT_PAYMENT_DUE_DAYS = 7;
4913
5558
  declare const DEFAULT_MIN_INVOICE_MINOR = 1000;
5559
+ declare const DEFAULT_BANK_TRANSFER_PAYMENT_DAYS = 5;
4914
5560
  declare const PaymentDueDaysSchema: z.ZodNumber;
5561
+ declare const BankTransferPaymentDaysSchema: z.ZodNumber;
5562
+ declare const BankTransferSettingsSchema: z.ZodObject<{
5563
+ enabled: z.ZodDefault<z.ZodBoolean>;
5564
+ paymentDays: z.ZodDefault<z.ZodNumber>;
5565
+ }, z.core.$strip>;
5566
+ type BankTransferSettings = z.output<typeof BankTransferSettingsSchema>;
4915
5567
  declare const BillingSettingsSchema: z.ZodObject<{
4916
5568
  paymentDueDays: z.ZodDefault<z.ZodNumber>;
4917
5569
  minInvoiceMinor: z.ZodDefault<z.ZodNumber>;
4918
5570
  allowMultipleSubscriptions: z.ZodDefault<z.ZodBoolean>;
5571
+ bankTransfer: z.ZodDefault<z.ZodObject<{
5572
+ enabled: z.ZodDefault<z.ZodBoolean>;
5573
+ paymentDays: z.ZodDefault<z.ZodNumber>;
5574
+ }, z.core.$strip>>;
4919
5575
  }, z.core.$strip>;
4920
5576
  type BillingSettings = z.output<typeof BillingSettingsSchema>;
5577
+ /** Patch of `settings.billing.bankTransfer`: an omitted field is unchanged, `null` restores its default. */
5578
+ declare const BankTransferSettingsPatchSchema: z.ZodObject<{
5579
+ enabled: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
5580
+ paymentDays: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
5581
+ }, z.core.$strict>;
4921
5582
  /** Patch of `settings.billing`: an omitted field is unchanged, `null` restores its default. */
4922
5583
  declare const BillingSettingsPatchSchema: z.ZodObject<{
4923
5584
  paymentDueDays: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
4924
5585
  minInvoiceMinor: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
4925
5586
  allowMultipleSubscriptions: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
5587
+ bankTransfer: z.ZodOptional<z.ZodNullable<z.ZodObject<{
5588
+ enabled: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
5589
+ paymentDays: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
5590
+ }, z.core.$strict>>>;
4926
5591
  }, z.core.$strict>;
4927
5592
  declare const DEFAULT_EVENT_RETENTION_DAYS = 120;
4928
5593
  declare const DEFAULT_LATE_GRACE_MINUTES = 60;
4929
- declare const METER_CHARGE_MODES: readonly ["off", "dry_run", "live"];
5594
+ declare const METER_CHARGE_MODES: readonly ['off', 'dry_run', 'live'];
4930
5595
  declare const MeterChargeModeSchema: z.ZodEnum<{
4931
- off: "off";
4932
5596
  dry_run: "dry_run";
4933
5597
  live: "live";
5598
+ off: "off";
4934
5599
  }>;
4935
5600
  type MeterChargeMode = z.infer<typeof MeterChargeModeSchema>;
4936
5601
  declare const DEFAULT_METER_CHARGE_MODE: MeterChargeMode;
@@ -4943,9 +5608,9 @@ type EventsSettings = z.output<typeof EventsSettingsSchema>;
4943
5608
  declare const MeteringSettingsSchema: z.ZodObject<{
4944
5609
  lateGraceMinutes: z.ZodDefault<z.ZodNumber>;
4945
5610
  chargeMode: z.ZodDefault<z.ZodEnum<{
4946
- off: "off";
4947
5611
  dry_run: "dry_run";
4948
5612
  live: "live";
5613
+ off: "off";
4949
5614
  }>>;
4950
5615
  }, z.core.$strip>;
4951
5616
  type MeteringSettings = z.output<typeof MeteringSettingsSchema>;
@@ -4957,9 +5622,9 @@ declare const EventsSettingsPatchSchema: z.ZodObject<{
4957
5622
  declare const MeteringSettingsPatchSchema: z.ZodObject<{
4958
5623
  lateGraceMinutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
4959
5624
  chargeMode: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
4960
- off: "off";
4961
5625
  dry_run: "dry_run";
4962
5626
  live: "live";
5627
+ off: "off";
4963
5628
  }>>>;
4964
5629
  }, z.core.$strict>;
4965
5630
  declare const ProductSettingsSchema: z.ZodObject<{
@@ -4967,8 +5632,8 @@ declare const ProductSettingsSchema: z.ZodObject<{
4967
5632
  appUrl: z.ZodOptional<z.ZodURL>;
4968
5633
  defaultCurrency: z.ZodDefault<z.ZodString>;
4969
5634
  defaultLocale: z.ZodDefault<z.ZodEnum<{
4970
- tr: "tr";
4971
5635
  en: "en";
5636
+ tr: "tr";
4972
5637
  }>>;
4973
5638
  extraReturnOrigins: z.ZodDefault<z.ZodPipe<z.ZodArray<z.ZodPipe<z.ZodURL, z.ZodTransform<string, string>>>, z.ZodTransform<string[], string[]>>>;
4974
5639
  privacyUrl: z.ZodOptional<z.ZodURL>;
@@ -4989,70 +5654,77 @@ declare const ProductSettingsSchema: z.ZodObject<{
4989
5654
  replyTo: z.ZodOptional<z.ZodEmail>;
4990
5655
  billingPath: z.ZodOptional<z.ZodString>;
4991
5656
  templates: z.ZodDefault<z.ZodObject<{
4992
- subscription_started: z.ZodOptional<z.ZodObject<{
5657
+ access_suspended: z.ZodOptional<z.ZodObject<{
4993
5658
  enabled: z.ZodDefault<z.ZodBoolean>;
4994
5659
  extraText: z.ZodOptional<z.ZodObject<{
4995
5660
  tr: z.ZodOptional<z.ZodString>;
4996
5661
  en: z.ZodOptional<z.ZodString>;
4997
5662
  }, z.core.$strip>>;
4998
5663
  }, z.core.$strip>>;
4999
- payment_receipt: z.ZodOptional<z.ZodObject<{
5664
+ bank_transfer_instructions: z.ZodOptional<z.ZodObject<{
5000
5665
  enabled: z.ZodDefault<z.ZodBoolean>;
5001
5666
  extraText: z.ZodOptional<z.ZodObject<{
5002
5667
  tr: z.ZodOptional<z.ZodString>;
5003
5668
  en: z.ZodOptional<z.ZodString>;
5004
5669
  }, z.core.$strip>>;
5005
5670
  }, z.core.$strip>>;
5006
- payment_failed: z.ZodOptional<z.ZodObject<{
5671
+ cancel_scheduled: z.ZodOptional<z.ZodObject<{
5007
5672
  enabled: z.ZodDefault<z.ZodBoolean>;
5008
5673
  extraText: z.ZodOptional<z.ZodObject<{
5009
5674
  tr: z.ZodOptional<z.ZodString>;
5010
5675
  en: z.ZodOptional<z.ZodString>;
5011
5676
  }, z.core.$strip>>;
5012
5677
  }, z.core.$strip>>;
5013
- cancel_scheduled: z.ZodOptional<z.ZodObject<{
5678
+ invoice_issued: z.ZodOptional<z.ZodObject<{
5014
5679
  enabled: z.ZodDefault<z.ZodBoolean>;
5015
5680
  extraText: z.ZodOptional<z.ZodObject<{
5016
5681
  tr: z.ZodOptional<z.ZodString>;
5017
5682
  en: z.ZodOptional<z.ZodString>;
5018
5683
  }, z.core.$strip>>;
5019
5684
  }, z.core.$strip>>;
5020
- subscription_ended: z.ZodOptional<z.ZodObject<{
5685
+ invoice_payment_due: z.ZodOptional<z.ZodObject<{
5021
5686
  enabled: z.ZodDefault<z.ZodBoolean>;
5022
5687
  extraText: z.ZodOptional<z.ZodObject<{
5023
5688
  tr: z.ZodOptional<z.ZodString>;
5024
5689
  en: z.ZodOptional<z.ZodString>;
5025
5690
  }, z.core.$strip>>;
5026
5691
  }, z.core.$strip>>;
5027
- access_suspended: z.ZodOptional<z.ZodObject<{
5692
+ payment_failed: z.ZodOptional<z.ZodObject<{
5028
5693
  enabled: z.ZodDefault<z.ZodBoolean>;
5029
5694
  extraText: z.ZodOptional<z.ZodObject<{
5030
5695
  tr: z.ZodOptional<z.ZodString>;
5031
5696
  en: z.ZodOptional<z.ZodString>;
5032
5697
  }, z.core.$strip>>;
5033
5698
  }, z.core.$strip>>;
5034
- subscription_terminated: z.ZodOptional<z.ZodObject<{
5699
+ payment_receipt: z.ZodOptional<z.ZodObject<{
5035
5700
  enabled: z.ZodDefault<z.ZodBoolean>;
5036
5701
  extraText: z.ZodOptional<z.ZodObject<{
5037
5702
  tr: z.ZodOptional<z.ZodString>;
5038
5703
  en: z.ZodOptional<z.ZodString>;
5039
5704
  }, z.core.$strip>>;
5040
5705
  }, z.core.$strip>>;
5041
- invoice_issued: z.ZodOptional<z.ZodObject<{
5706
+ price_change_notice: z.ZodOptional<z.ZodObject<{
5042
5707
  enabled: z.ZodDefault<z.ZodBoolean>;
5043
5708
  extraText: z.ZodOptional<z.ZodObject<{
5044
5709
  tr: z.ZodOptional<z.ZodString>;
5045
5710
  en: z.ZodOptional<z.ZodString>;
5046
5711
  }, z.core.$strip>>;
5047
5712
  }, z.core.$strip>>;
5048
- invoice_payment_due: z.ZodOptional<z.ZodObject<{
5713
+ subscription_ended: z.ZodOptional<z.ZodObject<{
5049
5714
  enabled: z.ZodDefault<z.ZodBoolean>;
5050
5715
  extraText: z.ZodOptional<z.ZodObject<{
5051
5716
  tr: z.ZodOptional<z.ZodString>;
5052
5717
  en: z.ZodOptional<z.ZodString>;
5053
5718
  }, z.core.$strip>>;
5054
5719
  }, z.core.$strip>>;
5055
- price_change_notice: z.ZodOptional<z.ZodObject<{
5720
+ subscription_started: z.ZodOptional<z.ZodObject<{
5721
+ enabled: z.ZodDefault<z.ZodBoolean>;
5722
+ extraText: z.ZodOptional<z.ZodObject<{
5723
+ tr: z.ZodOptional<z.ZodString>;
5724
+ en: z.ZodOptional<z.ZodString>;
5725
+ }, z.core.$strip>>;
5726
+ }, z.core.$strip>>;
5727
+ subscription_terminated: z.ZodOptional<z.ZodObject<{
5056
5728
  enabled: z.ZodDefault<z.ZodBoolean>;
5057
5729
  extraText: z.ZodOptional<z.ZodObject<{
5058
5730
  tr: z.ZodOptional<z.ZodString>;
@@ -5065,6 +5737,10 @@ declare const ProductSettingsSchema: z.ZodObject<{
5065
5737
  paymentDueDays: z.ZodDefault<z.ZodNumber>;
5066
5738
  minInvoiceMinor: z.ZodDefault<z.ZodNumber>;
5067
5739
  allowMultipleSubscriptions: z.ZodDefault<z.ZodBoolean>;
5740
+ bankTransfer: z.ZodDefault<z.ZodObject<{
5741
+ enabled: z.ZodDefault<z.ZodBoolean>;
5742
+ paymentDays: z.ZodDefault<z.ZodNumber>;
5743
+ }, z.core.$strip>>;
5068
5744
  }, z.core.$strip>>;
5069
5745
  events: z.ZodOptional<z.ZodObject<{
5070
5746
  retentionDays: z.ZodDefault<z.ZodNumber>;
@@ -5072,19 +5748,19 @@ declare const ProductSettingsSchema: z.ZodObject<{
5072
5748
  metering: z.ZodOptional<z.ZodObject<{
5073
5749
  lateGraceMinutes: z.ZodDefault<z.ZodNumber>;
5074
5750
  chargeMode: z.ZodDefault<z.ZodEnum<{
5075
- off: "off";
5076
5751
  dry_run: "dry_run";
5077
5752
  live: "live";
5753
+ off: "off";
5078
5754
  }>>;
5079
5755
  }, z.core.$strip>>;
5080
5756
  }, z.core.$strip>;
5081
5757
  type ProductSettings = z.output<typeof ProductSettingsSchema>;
5082
5758
  /** `settings.billing` with defaults filled in. */
5083
- declare function billingSettingsOf(settings: Pick<ProductSettings, "billing">): BillingSettings;
5759
+ declare function billingSettingsOf(settings: Pick<ProductSettings, 'billing'>): BillingSettings;
5084
5760
  /** `settings.events` with defaults filled in. */
5085
- declare function eventsSettingsOf(settings: Pick<ProductSettings, "events">): EventsSettings;
5761
+ declare function eventsSettingsOf(settings: Pick<ProductSettings, 'events'>): EventsSettings;
5086
5762
  /** `settings.metering` with defaults filled in. */
5087
- declare function meteringSettingsOf(settings: Pick<ProductSettings, "metering">): MeteringSettings;
5763
+ declare function meteringSettingsOf(settings: Pick<ProductSettings, 'metering'>): MeteringSettings;
5088
5764
  declare const BrandingPatchSchema: z.ZodObject<{
5089
5765
  name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5090
5766
  logoUrl: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
@@ -5093,11 +5769,12 @@ declare const BrandingPatchSchema: z.ZodObject<{
5093
5769
  }, z.core.$strict>;
5094
5770
  /** `PATCH /v1/admin/settings` gövdesi. */
5095
5771
  declare const ProductSettingsPatchSchema: z.ZodObject<{
5772
+ provider: z.ZodOptional<z.ZodString>;
5096
5773
  appUrl: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
5097
5774
  defaultCurrency: z.ZodOptional<z.ZodString>;
5098
5775
  defaultLocale: z.ZodOptional<z.ZodEnum<{
5099
- tr: "tr";
5100
5776
  en: "en";
5777
+ tr: "tr";
5101
5778
  }>>;
5102
5779
  extraReturnOrigins: z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodPipe<z.ZodURL, z.ZodTransform<string, string>>>, z.ZodTransform<string[], string[]>>>;
5103
5780
  privacyUrl: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
@@ -5118,43 +5795,47 @@ declare const ProductSettingsPatchSchema: z.ZodObject<{
5118
5795
  replyTo: z.ZodOptional<z.ZodNullable<z.ZodEmail>>;
5119
5796
  billingPath: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5120
5797
  templates: z.ZodOptional<z.ZodObject<{
5121
- subscription_started: z.ZodOptional<z.ZodNullable<z.ZodObject<{
5798
+ access_suspended: z.ZodOptional<z.ZodNullable<z.ZodObject<{
5122
5799
  enabled: z.ZodOptional<z.ZodBoolean>;
5123
5800
  extraText: z.ZodOptional<typeof EmailExtraTextSchema>;
5124
5801
  }, z.core.$strict>>>;
5125
- payment_receipt: z.ZodOptional<z.ZodNullable<z.ZodObject<{
5802
+ bank_transfer_instructions: z.ZodOptional<z.ZodNullable<z.ZodObject<{
5126
5803
  enabled: z.ZodOptional<z.ZodBoolean>;
5127
5804
  extraText: z.ZodOptional<typeof EmailExtraTextSchema>;
5128
5805
  }, z.core.$strict>>>;
5129
- payment_failed: z.ZodOptional<z.ZodNullable<z.ZodObject<{
5806
+ cancel_scheduled: z.ZodOptional<z.ZodNullable<z.ZodObject<{
5130
5807
  enabled: z.ZodOptional<z.ZodBoolean>;
5131
5808
  extraText: z.ZodOptional<typeof EmailExtraTextSchema>;
5132
5809
  }, z.core.$strict>>>;
5133
- cancel_scheduled: z.ZodOptional<z.ZodNullable<z.ZodObject<{
5810
+ invoice_issued: z.ZodOptional<z.ZodNullable<z.ZodObject<{
5811
+ enabled: z.ZodOptional<z.ZodBoolean>;
5812
+ extraText: z.ZodOptional<typeof EmailExtraTextSchema>;
5813
+ }, z.core.$strict>>>;
5814
+ invoice_payment_due: z.ZodOptional<z.ZodNullable<z.ZodObject<{
5134
5815
  enabled: z.ZodOptional<z.ZodBoolean>;
5135
5816
  extraText: z.ZodOptional<typeof EmailExtraTextSchema>;
5136
5817
  }, z.core.$strict>>>;
5137
- subscription_ended: z.ZodOptional<z.ZodNullable<z.ZodObject<{
5818
+ payment_failed: z.ZodOptional<z.ZodNullable<z.ZodObject<{
5138
5819
  enabled: z.ZodOptional<z.ZodBoolean>;
5139
5820
  extraText: z.ZodOptional<typeof EmailExtraTextSchema>;
5140
5821
  }, z.core.$strict>>>;
5141
- access_suspended: z.ZodOptional<z.ZodNullable<z.ZodObject<{
5822
+ payment_receipt: z.ZodOptional<z.ZodNullable<z.ZodObject<{
5142
5823
  enabled: z.ZodOptional<z.ZodBoolean>;
5143
5824
  extraText: z.ZodOptional<typeof EmailExtraTextSchema>;
5144
5825
  }, z.core.$strict>>>;
5145
- subscription_terminated: z.ZodOptional<z.ZodNullable<z.ZodObject<{
5826
+ price_change_notice: z.ZodOptional<z.ZodNullable<z.ZodObject<{
5146
5827
  enabled: z.ZodOptional<z.ZodBoolean>;
5147
5828
  extraText: z.ZodOptional<typeof EmailExtraTextSchema>;
5148
5829
  }, z.core.$strict>>>;
5149
- invoice_issued: z.ZodOptional<z.ZodNullable<z.ZodObject<{
5830
+ subscription_ended: z.ZodOptional<z.ZodNullable<z.ZodObject<{
5150
5831
  enabled: z.ZodOptional<z.ZodBoolean>;
5151
5832
  extraText: z.ZodOptional<typeof EmailExtraTextSchema>;
5152
5833
  }, z.core.$strict>>>;
5153
- invoice_payment_due: z.ZodOptional<z.ZodNullable<z.ZodObject<{
5834
+ subscription_started: z.ZodOptional<z.ZodNullable<z.ZodObject<{
5154
5835
  enabled: z.ZodOptional<z.ZodBoolean>;
5155
5836
  extraText: z.ZodOptional<typeof EmailExtraTextSchema>;
5156
5837
  }, z.core.$strict>>>;
5157
- price_change_notice: z.ZodOptional<z.ZodNullable<z.ZodObject<{
5838
+ subscription_terminated: z.ZodOptional<z.ZodNullable<z.ZodObject<{
5158
5839
  enabled: z.ZodOptional<z.ZodBoolean>;
5159
5840
  extraText: z.ZodOptional<typeof EmailExtraTextSchema>;
5160
5841
  }, z.core.$strict>>>;
@@ -5164,6 +5845,10 @@ declare const ProductSettingsPatchSchema: z.ZodObject<{
5164
5845
  paymentDueDays: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
5165
5846
  minInvoiceMinor: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
5166
5847
  allowMultipleSubscriptions: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
5848
+ bankTransfer: z.ZodOptional<z.ZodNullable<z.ZodObject<{
5849
+ enabled: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
5850
+ paymentDays: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
5851
+ }, z.core.$strict>>>;
5167
5852
  }, z.core.$strict>>>;
5168
5853
  events: z.ZodOptional<z.ZodNullable<z.ZodObject<{
5169
5854
  retentionDays: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
@@ -5171,9 +5856,9 @@ declare const ProductSettingsPatchSchema: z.ZodObject<{
5171
5856
  metering: z.ZodOptional<z.ZodNullable<z.ZodObject<{
5172
5857
  lateGraceMinutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
5173
5858
  chargeMode: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
5174
- off: "off";
5175
5859
  dry_run: "dry_run";
5176
5860
  live: "live";
5861
+ off: "off";
5177
5862
  }>>>;
5178
5863
  }, z.core.$strict>>>;
5179
5864
  }, z.core.$strict>;
@@ -5182,13 +5867,11 @@ type ProductSettingsPatch = z.input<typeof ProductSettingsPatchSchema>;
5182
5867
  * Doğrulanmış yamayı ayarlara uygular (saf). Sonuç şemadan geçer; alan kuralları
5183
5868
  * yamada zaten denetlendiği için yalnızca programlama hatasında fırlatır.
5184
5869
  */
5185
- declare function applySettingsPatch(current: ProductSettings, patch: z.output<typeof ProductSettingsPatchSchema> & {
5186
- readonly provider?: string | undefined;
5187
- }): ProductSettings;
5870
+ declare function applySettingsPatch(current: ProductSettings, patch: z.output<typeof ProductSettingsPatchSchema>): ProductSettings;
5188
5871
  /** Checkout dönüşüne izinli origin'ler: `appUrl`'in origin'i + `extraReturnOrigins`. */
5189
- declare function returnOriginsOf(settings: Pick<ProductSettings, "appUrl" | "extraReturnOrigins">): string[];
5872
+ declare function returnOriginsOf(settings: Pick<ProductSettings, 'appUrl' | 'extraReturnOrigins'>): string[];
5190
5873
  /** `returnUrl`'in origin'i izinli mi (geçersiz adres: hayır). */
5191
- declare function isReturnUrlAllowed(settings: Pick<ProductSettings, "appUrl" | "extraReturnOrigins">, returnUrl: string): boolean;
5874
+ declare function isReturnUrlAllowed(settings: Pick<ProductSettings, 'appUrl' | 'extraReturnOrigins'>, returnUrl: string): boolean;
5192
5875
  //#endregion
5193
5876
  //#region ../contract/src/webhook-endpoints.d.ts
5194
5877
  declare const WEBHOOK_SECRET_PREFIX = "whsec_";
@@ -5199,43 +5882,44 @@ declare const WEBHOOK_SECRET_PREFIX = "whsec_";
5199
5882
  */
5200
5883
  declare const WebhookSecretSchema: z.ZodString;
5201
5884
  declare const EventTypeSchema: z.ZodEnum<{
5885
+ "account.deleted": "account.deleted";
5886
+ "account.state_changed": "account.state_changed";
5202
5887
  "account.updated": "account.updated";
5888
+ "benefit_grant.created": "benefit_grant.created";
5889
+ "benefit_grant.cycled": "benefit_grant.cycled";
5890
+ "benefit_grant.revoked": "benefit_grant.revoked";
5891
+ "benefit_grant.updated": "benefit_grant.updated";
5203
5892
  "checkout.completed": "checkout.completed";
5204
- "checkout.failed": "checkout.failed";
5205
5893
  "checkout.expired": "checkout.expired";
5894
+ "checkout.failed": "checkout.failed";
5895
+ "invoice.created": "invoice.created";
5896
+ "invoice.issued": "invoice.issued";
5897
+ "invoice.paid": "invoice.paid";
5898
+ "invoice.voided": "invoice.voided";
5899
+ "meter.period_closed": "meter.period_closed";
5900
+ "meter.threshold_crossed": "meter.threshold_crossed";
5206
5901
  "subscription.activated": "subscription.activated";
5207
- "subscription.renewed": "subscription.renewed";
5208
- "subscription.payment_failed": "subscription.payment_failed";
5209
- "subscription.suspended": "subscription.suspended";
5210
- "subscription.reactivated": "subscription.reactivated";
5211
5902
  "subscription.cancel_scheduled": "subscription.cancel_scheduled";
5212
5903
  "subscription.canceled": "subscription.canceled";
5213
5904
  "subscription.expired": "subscription.expired";
5905
+ "subscription.payment_failed": "subscription.payment_failed";
5906
+ "subscription.reactivated": "subscription.reactivated";
5907
+ "subscription.renewed": "subscription.renewed";
5908
+ "subscription.suspended": "subscription.suspended";
5214
5909
  "subscription.terminated": "subscription.terminated";
5215
- "invoice.created": "invoice.created";
5216
- "invoice.issued": "invoice.issued";
5217
- "invoice.voided": "invoice.voided";
5218
- "account.state_changed": "account.state_changed";
5219
- "account.deleted": "account.deleted";
5220
- "invoice.paid": "invoice.paid";
5221
- "benefit_grant.created": "benefit_grant.created";
5222
- "benefit_grant.updated": "benefit_grant.updated";
5223
- "benefit_grant.revoked": "benefit_grant.revoked";
5224
- "benefit_grant.cycled": "benefit_grant.cycled";
5225
- "meter.threshold_crossed": "meter.threshold_crossed";
5226
- "meter.period_closed": "meter.period_closed";
5227
5910
  }>;
5228
- declare const WEBHOOK_ENDPOINT_STATUSES: readonly ["active", "paused", "inactive"];
5911
+ declare const WEBHOOK_ENDPOINT_STATUSES: readonly ['active', 'paused', 'inactive'];
5229
5912
  declare const WebhookEndpointStatusSchema: z.ZodEnum<{
5230
5913
  active: "active";
5231
- paused: "paused";
5232
5914
  inactive: "inactive";
5915
+ paused: "paused";
5233
5916
  }>;
5234
5917
  type WebhookEndpointStatus = z.infer<typeof WebhookEndpointStatusSchema>;
5235
5918
  /**
5236
- * Adres politikası; uygunsa null, değilse nedeni. `allowLoopback` üretimde false.
5237
- * Şemadan ayrıdır: üretim bilgisi yalnızca serviste var (servis ve sahte steward
5238
- * gövde şemasına `superRefine` ile ekler).
5919
+ * Address SYNTAX policy; null when acceptable, otherwise the reason. `allowLoopback` is false in
5920
+ * production. Separate from the schema: only the service knows whether it runs in production. The
5921
+ * service adds the SSRF rules on top (who may register a cluster address, public names only, DNS
5922
+ * resolving to public addresses; `service/src/domain/webhook-url-policy.ts`).
5239
5923
  */
5240
5924
  declare function webhookEndpointUrlProblem(value: string, options: {
5241
5925
  allowLoopback: boolean;
@@ -5245,32 +5929,32 @@ declare const WebhookEndpointCreateInputSchema: z.ZodObject<{
5245
5929
  url: z.ZodURL;
5246
5930
  secret: z.ZodString;
5247
5931
  eventTypes: z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodEnum<{
5932
+ "account.deleted": "account.deleted";
5933
+ "account.state_changed": "account.state_changed";
5248
5934
  "account.updated": "account.updated";
5935
+ "benefit_grant.created": "benefit_grant.created";
5936
+ "benefit_grant.cycled": "benefit_grant.cycled";
5937
+ "benefit_grant.revoked": "benefit_grant.revoked";
5938
+ "benefit_grant.updated": "benefit_grant.updated";
5249
5939
  "checkout.completed": "checkout.completed";
5250
- "checkout.failed": "checkout.failed";
5251
5940
  "checkout.expired": "checkout.expired";
5941
+ "checkout.failed": "checkout.failed";
5942
+ "invoice.created": "invoice.created";
5943
+ "invoice.issued": "invoice.issued";
5944
+ "invoice.paid": "invoice.paid";
5945
+ "invoice.voided": "invoice.voided";
5946
+ "meter.period_closed": "meter.period_closed";
5947
+ "meter.threshold_crossed": "meter.threshold_crossed";
5252
5948
  "subscription.activated": "subscription.activated";
5253
- "subscription.renewed": "subscription.renewed";
5254
- "subscription.payment_failed": "subscription.payment_failed";
5255
- "subscription.suspended": "subscription.suspended";
5256
- "subscription.reactivated": "subscription.reactivated";
5257
5949
  "subscription.cancel_scheduled": "subscription.cancel_scheduled";
5258
5950
  "subscription.canceled": "subscription.canceled";
5259
5951
  "subscription.expired": "subscription.expired";
5952
+ "subscription.payment_failed": "subscription.payment_failed";
5953
+ "subscription.reactivated": "subscription.reactivated";
5954
+ "subscription.renewed": "subscription.renewed";
5955
+ "subscription.suspended": "subscription.suspended";
5260
5956
  "subscription.terminated": "subscription.terminated";
5261
- "invoice.created": "invoice.created";
5262
- "invoice.issued": "invoice.issued";
5263
- "invoice.voided": "invoice.voided";
5264
- "account.state_changed": "account.state_changed";
5265
- "account.deleted": "account.deleted";
5266
- "invoice.paid": "invoice.paid";
5267
- "benefit_grant.created": "benefit_grant.created";
5268
- "benefit_grant.updated": "benefit_grant.updated";
5269
- "benefit_grant.revoked": "benefit_grant.revoked";
5270
- "benefit_grant.cycled": "benefit_grant.cycled";
5271
- "meter.threshold_crossed": "meter.threshold_crossed";
5272
- "meter.period_closed": "meter.period_closed";
5273
- }>>, z.ZodTransform<("account.updated" | "checkout.completed" | "checkout.failed" | "checkout.expired" | "subscription.activated" | "subscription.renewed" | "subscription.payment_failed" | "subscription.suspended" | "subscription.reactivated" | "subscription.cancel_scheduled" | "subscription.canceled" | "subscription.expired" | "subscription.terminated" | "invoice.created" | "invoice.issued" | "invoice.voided" | "account.state_changed" | "account.deleted" | "invoice.paid" | "benefit_grant.created" | "benefit_grant.updated" | "benefit_grant.revoked" | "benefit_grant.cycled" | "meter.threshold_crossed" | "meter.period_closed")[], ("account.updated" | "checkout.completed" | "checkout.failed" | "checkout.expired" | "subscription.activated" | "subscription.renewed" | "subscription.payment_failed" | "subscription.suspended" | "subscription.reactivated" | "subscription.cancel_scheduled" | "subscription.canceled" | "subscription.expired" | "subscription.terminated" | "invoice.created" | "invoice.issued" | "invoice.voided" | "account.state_changed" | "account.deleted" | "invoice.paid" | "benefit_grant.created" | "benefit_grant.updated" | "benefit_grant.revoked" | "benefit_grant.cycled" | "meter.threshold_crossed" | "meter.period_closed")[]>>>;
5957
+ }>>, z.ZodTransform<("account.deleted" | "account.state_changed" | "account.updated" | "benefit_grant.created" | "benefit_grant.cycled" | "benefit_grant.revoked" | "benefit_grant.updated" | "checkout.completed" | "checkout.expired" | "checkout.failed" | "invoice.created" | "invoice.issued" | "invoice.paid" | "invoice.voided" | "meter.period_closed" | "meter.threshold_crossed" | "subscription.activated" | "subscription.cancel_scheduled" | "subscription.canceled" | "subscription.expired" | "subscription.payment_failed" | "subscription.reactivated" | "subscription.renewed" | "subscription.suspended" | "subscription.terminated")[], ("account.deleted" | "account.state_changed" | "account.updated" | "benefit_grant.created" | "benefit_grant.cycled" | "benefit_grant.revoked" | "benefit_grant.updated" | "checkout.completed" | "checkout.expired" | "checkout.failed" | "invoice.created" | "invoice.issued" | "invoice.paid" | "invoice.voided" | "meter.period_closed" | "meter.threshold_crossed" | "subscription.activated" | "subscription.cancel_scheduled" | "subscription.canceled" | "subscription.expired" | "subscription.payment_failed" | "subscription.reactivated" | "subscription.renewed" | "subscription.suspended" | "subscription.terminated")[]>>>;
5274
5958
  description: z.ZodOptional<z.ZodString>;
5275
5959
  }, z.core.$strict>;
5276
5960
  type WebhookEndpointCreateInput = z.input<typeof WebhookEndpointCreateInputSchema>;
@@ -5287,9 +5971,9 @@ type WebhookEndpointRotateInput = z.input<typeof WebhookEndpointRotateInputSchem
5287
5971
  */
5288
5972
  declare const WebhookLastDeliverySchema: z.ZodObject<{
5289
5973
  status: z.ZodEnum<{
5290
- pending: "pending";
5291
5974
  dead: "dead";
5292
5975
  delivered: "delivered";
5976
+ pending: "pending";
5293
5977
  }>;
5294
5978
  httpStatus: z.ZodNullable<z.ZodNumber>;
5295
5979
  error: z.ZodNullable<z.ZodString>;
@@ -5303,44 +5987,45 @@ declare const WebhookEndpointSchema: z.ZodObject<{
5303
5987
  url: z.ZodString;
5304
5988
  status: z.ZodEnum<{
5305
5989
  active: "active";
5306
- paused: "paused";
5307
5990
  inactive: "inactive";
5991
+ paused: "paused";
5308
5992
  }>;
5309
5993
  eventTypes: z.ZodNullable<z.ZodArray<z.ZodEnum<{
5994
+ "account.deleted": "account.deleted";
5995
+ "account.state_changed": "account.state_changed";
5310
5996
  "account.updated": "account.updated";
5997
+ "benefit_grant.created": "benefit_grant.created";
5998
+ "benefit_grant.cycled": "benefit_grant.cycled";
5999
+ "benefit_grant.revoked": "benefit_grant.revoked";
6000
+ "benefit_grant.updated": "benefit_grant.updated";
5311
6001
  "checkout.completed": "checkout.completed";
5312
- "checkout.failed": "checkout.failed";
5313
6002
  "checkout.expired": "checkout.expired";
6003
+ "checkout.failed": "checkout.failed";
6004
+ "invoice.created": "invoice.created";
6005
+ "invoice.issued": "invoice.issued";
6006
+ "invoice.paid": "invoice.paid";
6007
+ "invoice.voided": "invoice.voided";
6008
+ "meter.period_closed": "meter.period_closed";
6009
+ "meter.threshold_crossed": "meter.threshold_crossed";
5314
6010
  "subscription.activated": "subscription.activated";
5315
- "subscription.renewed": "subscription.renewed";
5316
- "subscription.payment_failed": "subscription.payment_failed";
5317
- "subscription.suspended": "subscription.suspended";
5318
- "subscription.reactivated": "subscription.reactivated";
5319
6011
  "subscription.cancel_scheduled": "subscription.cancel_scheduled";
5320
6012
  "subscription.canceled": "subscription.canceled";
5321
6013
  "subscription.expired": "subscription.expired";
6014
+ "subscription.payment_failed": "subscription.payment_failed";
6015
+ "subscription.reactivated": "subscription.reactivated";
6016
+ "subscription.renewed": "subscription.renewed";
6017
+ "subscription.suspended": "subscription.suspended";
5322
6018
  "subscription.terminated": "subscription.terminated";
5323
- "invoice.created": "invoice.created";
5324
- "invoice.issued": "invoice.issued";
5325
- "invoice.voided": "invoice.voided";
5326
- "account.state_changed": "account.state_changed";
5327
- "account.deleted": "account.deleted";
5328
- "invoice.paid": "invoice.paid";
5329
- "benefit_grant.created": "benefit_grant.created";
5330
- "benefit_grant.updated": "benefit_grant.updated";
5331
- "benefit_grant.revoked": "benefit_grant.revoked";
5332
- "benefit_grant.cycled": "benefit_grant.cycled";
5333
- "meter.threshold_crossed": "meter.threshold_crossed";
5334
- "meter.period_closed": "meter.period_closed";
5335
6019
  }>>>;
5336
6020
  description: z.ZodNullable<z.ZodString>;
6021
+ internal: z.ZodOptional<z.ZodBoolean>;
5337
6022
  createdAt: z.ZodISODateTime;
5338
6023
  rotatedAt: z.ZodNullable<z.ZodISODateTime>;
5339
6024
  lastDelivery: z.ZodNullable<z.ZodObject<{
5340
6025
  status: z.ZodEnum<{
5341
- pending: "pending";
5342
6026
  dead: "dead";
5343
6027
  delivered: "delivered";
6028
+ pending: "pending";
5344
6029
  }>;
5345
6030
  httpStatus: z.ZodNullable<z.ZodNumber>;
5346
6031
  error: z.ZodNullable<z.ZodString>;
@@ -5356,44 +6041,45 @@ declare const WebhookEndpointListSchema: z.ZodObject<{
5356
6041
  url: z.ZodString;
5357
6042
  status: z.ZodEnum<{
5358
6043
  active: "active";
5359
- paused: "paused";
5360
6044
  inactive: "inactive";
6045
+ paused: "paused";
5361
6046
  }>;
5362
6047
  eventTypes: z.ZodNullable<z.ZodArray<z.ZodEnum<{
6048
+ "account.deleted": "account.deleted";
6049
+ "account.state_changed": "account.state_changed";
5363
6050
  "account.updated": "account.updated";
6051
+ "benefit_grant.created": "benefit_grant.created";
6052
+ "benefit_grant.cycled": "benefit_grant.cycled";
6053
+ "benefit_grant.revoked": "benefit_grant.revoked";
6054
+ "benefit_grant.updated": "benefit_grant.updated";
5364
6055
  "checkout.completed": "checkout.completed";
5365
- "checkout.failed": "checkout.failed";
5366
6056
  "checkout.expired": "checkout.expired";
6057
+ "checkout.failed": "checkout.failed";
6058
+ "invoice.created": "invoice.created";
6059
+ "invoice.issued": "invoice.issued";
6060
+ "invoice.paid": "invoice.paid";
6061
+ "invoice.voided": "invoice.voided";
6062
+ "meter.period_closed": "meter.period_closed";
6063
+ "meter.threshold_crossed": "meter.threshold_crossed";
5367
6064
  "subscription.activated": "subscription.activated";
5368
- "subscription.renewed": "subscription.renewed";
5369
- "subscription.payment_failed": "subscription.payment_failed";
5370
- "subscription.suspended": "subscription.suspended";
5371
- "subscription.reactivated": "subscription.reactivated";
5372
6065
  "subscription.cancel_scheduled": "subscription.cancel_scheduled";
5373
6066
  "subscription.canceled": "subscription.canceled";
5374
6067
  "subscription.expired": "subscription.expired";
6068
+ "subscription.payment_failed": "subscription.payment_failed";
6069
+ "subscription.reactivated": "subscription.reactivated";
6070
+ "subscription.renewed": "subscription.renewed";
6071
+ "subscription.suspended": "subscription.suspended";
5375
6072
  "subscription.terminated": "subscription.terminated";
5376
- "invoice.created": "invoice.created";
5377
- "invoice.issued": "invoice.issued";
5378
- "invoice.voided": "invoice.voided";
5379
- "account.state_changed": "account.state_changed";
5380
- "account.deleted": "account.deleted";
5381
- "invoice.paid": "invoice.paid";
5382
- "benefit_grant.created": "benefit_grant.created";
5383
- "benefit_grant.updated": "benefit_grant.updated";
5384
- "benefit_grant.revoked": "benefit_grant.revoked";
5385
- "benefit_grant.cycled": "benefit_grant.cycled";
5386
- "meter.threshold_crossed": "meter.threshold_crossed";
5387
- "meter.period_closed": "meter.period_closed";
5388
6073
  }>>>;
5389
6074
  description: z.ZodNullable<z.ZodString>;
6075
+ internal: z.ZodOptional<z.ZodBoolean>;
5390
6076
  createdAt: z.ZodISODateTime;
5391
6077
  rotatedAt: z.ZodNullable<z.ZodISODateTime>;
5392
6078
  lastDelivery: z.ZodNullable<z.ZodObject<{
5393
6079
  status: z.ZodEnum<{
5394
- pending: "pending";
5395
6080
  dead: "dead";
5396
6081
  delivered: "delivered";
6082
+ pending: "pending";
5397
6083
  }>;
5398
6084
  httpStatus: z.ZodNullable<z.ZodNumber>;
5399
6085
  error: z.ZodNullable<z.ZodString>;
@@ -5407,21 +6093,21 @@ type WebhookEndpointList = z.infer<typeof WebhookEndpointListSchema>;
5407
6093
  declare function generateWebhookSecret(): string;
5408
6094
  //#endregion
5409
6095
  //#region ../contract/src/doctor.d.ts
5410
- declare const DOCTOR_SEVERITIES: readonly ["error", "warning", "info"];
6096
+ declare const DOCTOR_SEVERITIES: readonly ['error', 'warning', 'info'];
5411
6097
  declare const DoctorSeveritySchema: z.ZodEnum<{
5412
6098
  error: "error";
5413
- warning: "warning";
5414
6099
  info: "info";
6100
+ warning: "warning";
5415
6101
  }>;
5416
6102
  type DoctorSeverity = z.infer<typeof DoctorSeveritySchema>;
5417
6103
  /** `warnings[].code` — bu sürümün ürettiği kodlar; küme açık. */
5418
- type DoctorWarningCode = "catalog_not_synced" | "price_unsellable" | "price_drift" | "legacy_provider_subscription" | "provider_not_configured" | "provider_unhealthy" | "no_return_origin" | "app_url_missing" | "branding_incomplete" | "legal_links_missing" | "no_active_endpoint" | "no_state_changed_endpoint" | "endpoint_wrong_secret" | "endpoint_old_contract" | "endpoint_unreachable" | "endpoint_failing" | "endpoint_dead_deliveries" | "endpoint_pending_backlog" | "dunning_dry_run" | "email_not_configured" | "email_sender_missing" | "email_billing_link_missing" | "events_backlog" | "meter_rollup_lag" | "events_invalid_value" | "meter_without_events" | "events_unmatched" | "overage_charge_mode_off" | "overage_dry_run" | "overage_unrated_subscriptions" | (string & Record<never, never>);
6104
+ type DoctorWarningCode = 'catalog_not_synced' | 'price_unsellable' | 'price_drift' | 'legacy_provider_subscription' | 'provider_not_configured' | 'card_payments_unavailable' | 'provider_unhealthy' | 'no_return_origin' | 'app_url_missing' | 'branding_incomplete' | 'legal_links_missing' | 'no_active_endpoint' | 'no_state_changed_endpoint' | 'endpoint_wrong_secret' | 'endpoint_old_contract' | 'endpoint_unreachable' | 'endpoint_failing' | 'endpoint_dead_deliveries' | 'endpoint_pending_backlog' | 'dunning_dry_run' | 'email_not_configured' | 'email_sender_missing' | 'email_billing_link_missing' | 'events_backlog' | 'meter_rollup_lag' | 'events_invalid_value' | 'meter_without_events' | 'events_unmatched' | 'overage_charge_mode_off' | 'overage_dry_run' | 'overage_unrated_subscriptions' | 'api_key_expiring' | 'admin_key_without_expiry' | (string & Record<never, never>);
5419
6105
  declare const DoctorWarningSchema: z.ZodObject<{
5420
6106
  code: z.ZodString;
5421
6107
  severity: z.ZodEnum<{
5422
6108
  error: "error";
5423
- warning: "warning";
5424
6109
  info: "info";
6110
+ warning: "warning";
5425
6111
  }>;
5426
6112
  message: z.ZodString;
5427
6113
  endpointId: z.ZodOptional<z.ZodUUID>;
@@ -5430,10 +6116,10 @@ type DoctorWarning = z.infer<typeof DoctorWarningSchema>;
5430
6116
  /**
5431
6117
  * Why an active price cannot be sold — open set: `provider_not_configured`,
5432
6118
  * `unsupported_currency`, `interval_count_unsupported` (checkout sells `intervalCount: 1` only).
5433
- * `provider_price_missing` (no provider plan for the price) is produced only by steward before the
5434
- * billing core: prices live only in steward now (M30).
6119
+ * `provider_price_missing` (no provider plan for the price) is **no longer produced** (@deprecated):
6120
+ * prices live only in steward since the billing core (M30); it is removed in the next minor.
5435
6121
  */
5436
- type DoctorUnsellableReason = "provider_price_missing" | "provider_not_configured" | "unsupported_currency" | "interval_count_unsupported" | (string & Record<never, never>);
6122
+ type DoctorUnsellableReason = 'provider_price_missing' | 'provider_not_configured' | 'unsupported_currency' | 'interval_count_unsupported' | (string & Record<never, never>);
5437
6123
  declare const DoctorUnsellablePriceSchema: z.ZodObject<{
5438
6124
  priceId: z.ZodUUID;
5439
6125
  planCode: z.ZodString;
@@ -5505,14 +6191,14 @@ declare const DoctorOverageSchema: z.ZodObject<{
5505
6191
  carriedCharges: z.ZodNumber;
5506
6192
  }, z.core.$strip>;
5507
6193
  type DoctorOverage = z.infer<typeof DoctorOverageSchema>;
5508
- declare const DOCTOR_PROVIDER_ENVIRONMENTS: readonly ["sandbox", "live", "fake"];
6194
+ declare const DOCTOR_PROVIDER_ENVIRONMENTS: readonly ['sandbox', 'live', 'fake'];
5509
6195
  declare const DoctorProviderSchema: z.ZodObject<{
5510
6196
  id: z.ZodString;
5511
6197
  configured: z.ZodBoolean;
5512
6198
  environment: z.ZodNullable<z.ZodEnum<{
6199
+ fake: "fake";
5513
6200
  live: "live";
5514
6201
  sandbox: "sandbox";
5515
- fake: "fake";
5516
6202
  }>>;
5517
6203
  merchantId: z.ZodNullable<z.ZodString>;
5518
6204
  healthy: z.ZodNullable<z.ZodBoolean>;
@@ -5529,9 +6215,9 @@ declare const DoctorSettingsSchema: z.ZodObject<{
5529
6215
  }, z.core.$strip>;
5530
6216
  type DoctorSettings = z.infer<typeof DoctorSettingsSchema>;
5531
6217
  /** Hosted sayfanın (F2b checkout, F3a portal) zorunlu saydığı marka alanları; logo ve renk nötr varsayılana düşer. */
5532
- declare const DOCTOR_REQUIRED_BRANDING: readonly ["name", "supportEmail"];
6218
+ declare const DOCTOR_REQUIRED_BRANDING: readonly ['name', 'supportEmail'];
5533
6219
  /** KVKK/mesafeli satış bağları. */
5534
- declare const DOCTOR_REQUIRED_LEGAL_LINKS: readonly ["privacyUrl", "termsUrl"];
6220
+ declare const DOCTOR_REQUIRED_LEGAL_LINKS: readonly ['privacyUrl', 'termsUrl'];
5535
6221
  declare const DoctorHostedSchema: z.ZodObject<{
5536
6222
  branding: z.ZodObject<{
5537
6223
  missing: z.ZodArray<z.ZodString>;
@@ -5549,50 +6235,50 @@ type DoctorHosted = z.infer<typeof DoctorHostedSchema>;
5549
6235
  * `unreachable` zaman aşımı/ağ hatası; `failing` diğer yanıtlar (5xx, 404…);
5550
6236
  * `in_progress` ilk deneme sürüyor; `no_deliveries` henüz denenmiş teslimat yok.
5551
6237
  */
5552
- type DoctorEndpointDiagnosis = "ok" | "wrong_secret" | "old_contract" | "unreachable" | "failing" | "in_progress" | "no_deliveries" | (string & Record<never, never>);
6238
+ type DoctorEndpointDiagnosis = 'ok' | 'wrong_secret' | 'old_contract' | 'unreachable' | 'failing' | 'in_progress' | 'no_deliveries' | (string & Record<never, never>);
5553
6239
  declare const DoctorEndpointSchema: z.ZodObject<{
5554
6240
  id: z.ZodUUID;
5555
6241
  url: z.ZodString;
5556
6242
  status: z.ZodEnum<{
5557
6243
  active: "active";
5558
- paused: "paused";
5559
6244
  inactive: "inactive";
6245
+ paused: "paused";
5560
6246
  }>;
5561
6247
  eventTypes: z.ZodNullable<z.ZodArray<z.ZodEnum<{
6248
+ "account.deleted": "account.deleted";
6249
+ "account.state_changed": "account.state_changed";
5562
6250
  "account.updated": "account.updated";
6251
+ "benefit_grant.created": "benefit_grant.created";
6252
+ "benefit_grant.cycled": "benefit_grant.cycled";
6253
+ "benefit_grant.revoked": "benefit_grant.revoked";
6254
+ "benefit_grant.updated": "benefit_grant.updated";
5563
6255
  "checkout.completed": "checkout.completed";
5564
- "checkout.failed": "checkout.failed";
5565
6256
  "checkout.expired": "checkout.expired";
6257
+ "checkout.failed": "checkout.failed";
6258
+ "invoice.created": "invoice.created";
6259
+ "invoice.issued": "invoice.issued";
6260
+ "invoice.paid": "invoice.paid";
6261
+ "invoice.voided": "invoice.voided";
6262
+ "meter.period_closed": "meter.period_closed";
6263
+ "meter.threshold_crossed": "meter.threshold_crossed";
5566
6264
  "subscription.activated": "subscription.activated";
5567
- "subscription.renewed": "subscription.renewed";
5568
- "subscription.payment_failed": "subscription.payment_failed";
5569
- "subscription.suspended": "subscription.suspended";
5570
- "subscription.reactivated": "subscription.reactivated";
5571
6265
  "subscription.cancel_scheduled": "subscription.cancel_scheduled";
5572
6266
  "subscription.canceled": "subscription.canceled";
5573
6267
  "subscription.expired": "subscription.expired";
6268
+ "subscription.payment_failed": "subscription.payment_failed";
6269
+ "subscription.reactivated": "subscription.reactivated";
6270
+ "subscription.renewed": "subscription.renewed";
6271
+ "subscription.suspended": "subscription.suspended";
5574
6272
  "subscription.terminated": "subscription.terminated";
5575
- "invoice.created": "invoice.created";
5576
- "invoice.issued": "invoice.issued";
5577
- "invoice.voided": "invoice.voided";
5578
- "account.state_changed": "account.state_changed";
5579
- "account.deleted": "account.deleted";
5580
- "invoice.paid": "invoice.paid";
5581
- "benefit_grant.created": "benefit_grant.created";
5582
- "benefit_grant.updated": "benefit_grant.updated";
5583
- "benefit_grant.revoked": "benefit_grant.revoked";
5584
- "benefit_grant.cycled": "benefit_grant.cycled";
5585
- "meter.threshold_crossed": "meter.threshold_crossed";
5586
- "meter.period_closed": "meter.period_closed";
5587
6273
  }>>>;
5588
6274
  pending: z.ZodNumber;
5589
6275
  dead: z.ZodNumber;
5590
6276
  oldestPendingAt: z.ZodNullable<z.ZodISODateTime>;
5591
6277
  lastDelivery: z.ZodNullable<z.ZodObject<{
5592
6278
  status: z.ZodEnum<{
5593
- pending: "pending";
5594
6279
  dead: "dead";
5595
6280
  delivered: "delivered";
6281
+ pending: "pending";
5596
6282
  }>;
5597
6283
  httpStatus: z.ZodNullable<z.ZodNumber>;
5598
6284
  error: z.ZodNullable<z.ZodString>;
@@ -5610,6 +6296,19 @@ declare const DoctorEmailsSchema: z.ZodObject<{
5610
6296
  ready: z.ZodBoolean;
5611
6297
  }, z.core.$strip>;
5612
6298
  type DoctorEmails = z.infer<typeof DoctorEmailsSchema>;
6299
+ /** An active `api_keys` row (not revoked, not expired); issue #43. Never the secret. */
6300
+ declare const DoctorApiKeySchema: z.ZodObject<{
6301
+ name: z.ZodString;
6302
+ prefix: z.ZodString;
6303
+ scope: z.ZodString;
6304
+ createdAt: z.ZodISODateTime;
6305
+ lastUsedAt: z.ZodNullable<z.ZodISODateTime>;
6306
+ expiresAt: z.ZodNullable<z.ZodISODateTime>;
6307
+ ageDays: z.ZodNumber;
6308
+ }, z.core.$strip>;
6309
+ type DoctorApiKey = z.infer<typeof DoctorApiKeySchema>;
6310
+ /** A key expiring within this many days is a warning. */
6311
+ declare const DOCTOR_KEY_EXPIRY_WARN_DAYS = 14;
5613
6312
  declare const DoctorReportSchema: z.ZodObject<{
5614
6313
  ok: z.ZodBoolean;
5615
6314
  checkedAt: z.ZodISODateTime;
@@ -5639,9 +6338,9 @@ declare const DoctorReportSchema: z.ZodObject<{
5639
6338
  id: z.ZodString;
5640
6339
  configured: z.ZodBoolean;
5641
6340
  environment: z.ZodNullable<z.ZodEnum<{
6341
+ fake: "fake";
5642
6342
  live: "live";
5643
6343
  sandbox: "sandbox";
5644
- fake: "fake";
5645
6344
  }>>;
5646
6345
  merchantId: z.ZodNullable<z.ZodString>;
5647
6346
  healthy: z.ZodNullable<z.ZodBoolean>;
@@ -5669,44 +6368,44 @@ declare const DoctorReportSchema: z.ZodObject<{
5669
6368
  url: z.ZodString;
5670
6369
  status: z.ZodEnum<{
5671
6370
  active: "active";
5672
- paused: "paused";
5673
6371
  inactive: "inactive";
6372
+ paused: "paused";
5674
6373
  }>;
5675
6374
  eventTypes: z.ZodNullable<z.ZodArray<z.ZodEnum<{
6375
+ "account.deleted": "account.deleted";
6376
+ "account.state_changed": "account.state_changed";
5676
6377
  "account.updated": "account.updated";
6378
+ "benefit_grant.created": "benefit_grant.created";
6379
+ "benefit_grant.cycled": "benefit_grant.cycled";
6380
+ "benefit_grant.revoked": "benefit_grant.revoked";
6381
+ "benefit_grant.updated": "benefit_grant.updated";
5677
6382
  "checkout.completed": "checkout.completed";
5678
- "checkout.failed": "checkout.failed";
5679
6383
  "checkout.expired": "checkout.expired";
6384
+ "checkout.failed": "checkout.failed";
6385
+ "invoice.created": "invoice.created";
6386
+ "invoice.issued": "invoice.issued";
6387
+ "invoice.paid": "invoice.paid";
6388
+ "invoice.voided": "invoice.voided";
6389
+ "meter.period_closed": "meter.period_closed";
6390
+ "meter.threshold_crossed": "meter.threshold_crossed";
5680
6391
  "subscription.activated": "subscription.activated";
5681
- "subscription.renewed": "subscription.renewed";
5682
- "subscription.payment_failed": "subscription.payment_failed";
5683
- "subscription.suspended": "subscription.suspended";
5684
- "subscription.reactivated": "subscription.reactivated";
5685
6392
  "subscription.cancel_scheduled": "subscription.cancel_scheduled";
5686
6393
  "subscription.canceled": "subscription.canceled";
5687
6394
  "subscription.expired": "subscription.expired";
6395
+ "subscription.payment_failed": "subscription.payment_failed";
6396
+ "subscription.reactivated": "subscription.reactivated";
6397
+ "subscription.renewed": "subscription.renewed";
6398
+ "subscription.suspended": "subscription.suspended";
5688
6399
  "subscription.terminated": "subscription.terminated";
5689
- "invoice.created": "invoice.created";
5690
- "invoice.issued": "invoice.issued";
5691
- "invoice.voided": "invoice.voided";
5692
- "account.state_changed": "account.state_changed";
5693
- "account.deleted": "account.deleted";
5694
- "invoice.paid": "invoice.paid";
5695
- "benefit_grant.created": "benefit_grant.created";
5696
- "benefit_grant.updated": "benefit_grant.updated";
5697
- "benefit_grant.revoked": "benefit_grant.revoked";
5698
- "benefit_grant.cycled": "benefit_grant.cycled";
5699
- "meter.threshold_crossed": "meter.threshold_crossed";
5700
- "meter.period_closed": "meter.period_closed";
5701
6400
  }>>>;
5702
6401
  pending: z.ZodNumber;
5703
6402
  dead: z.ZodNumber;
5704
6403
  oldestPendingAt: z.ZodNullable<z.ZodISODateTime>;
5705
6404
  lastDelivery: z.ZodNullable<z.ZodObject<{
5706
6405
  status: z.ZodEnum<{
5707
- pending: "pending";
5708
6406
  dead: "dead";
5709
6407
  delivered: "delivered";
6408
+ pending: "pending";
5710
6409
  }>;
5711
6410
  httpStatus: z.ZodNullable<z.ZodNumber>;
5712
6411
  error: z.ZodNullable<z.ZodString>;
@@ -5750,12 +6449,21 @@ declare const DoctorReportSchema: z.ZodObject<{
5750
6449
  unratedSubscriptions: z.ZodNumber;
5751
6450
  carriedCharges: z.ZodNumber;
5752
6451
  }, z.core.$strip>>;
6452
+ apiKeys: z.ZodOptional<z.ZodArray<z.ZodObject<{
6453
+ name: z.ZodString;
6454
+ prefix: z.ZodString;
6455
+ scope: z.ZodString;
6456
+ createdAt: z.ZodISODateTime;
6457
+ lastUsedAt: z.ZodNullable<z.ZodISODateTime>;
6458
+ expiresAt: z.ZodNullable<z.ZodISODateTime>;
6459
+ ageDays: z.ZodNumber;
6460
+ }, z.core.$strip>>>;
5753
6461
  warnings: z.ZodArray<z.ZodObject<{
5754
6462
  code: z.ZodString;
5755
6463
  severity: z.ZodEnum<{
5756
6464
  error: "error";
5757
- warning: "warning";
5758
6465
  info: "info";
6466
+ warning: "warning";
5759
6467
  }>;
5760
6468
  message: z.ZodString;
5761
6469
  endpointId: z.ZodOptional<z.ZodUUID>;
@@ -5765,12 +6473,12 @@ type DoctorReport = z.infer<typeof DoctorReportSchema>;
5765
6473
  /** Toplanan olgular: teşhis, hosted hazırlığı, uyarılar ve `ok` `buildDoctorReport`'ta türetilir. */
5766
6474
  type DoctorFacts = {
5767
6475
  checkedAt: Date;
5768
- product: DoctorReport["product"];
6476
+ product: DoctorReport['product'];
5769
6477
  catalog: DoctorCatalog;
5770
6478
  provider: DoctorProvider;
5771
- settings: Pick<ProductSettings, "appUrl" | "extraReturnOrigins" | "privacyUrl" | "termsUrl" | "branding"> & Partial<Pick<ProductSettings, "emails">>;
5772
- endpoints: Omit<DoctorEndpoint, "diagnosis">[];
5773
- dunning: DoctorReport["dunning"];
6479
+ settings: Pick<ProductSettings, 'appUrl' | 'extraReturnOrigins' | 'privacyUrl' | 'termsUrl' | 'branding'> & Partial<Pick<ProductSettings, 'emails'>>;
6480
+ endpoints: Omit<DoctorEndpoint, 'diagnosis'>[];
6481
+ dunning: DoctorReport['dunning'];
5774
6482
  /** Deployment email transport facts; omitted: no email section in the report. */
5775
6483
  emailTransport?: {
5776
6484
  configured: boolean;
@@ -5782,16 +6490,22 @@ type DoctorFacts = {
5782
6490
  events?: DoctorEvents;
5783
6491
  /** Overage facts (MF5); omitted: no overage section in the report. */
5784
6492
  overage?: DoctorOverage;
6493
+ /** Currencies the product sells by bank transfer (switch on and a deployment IBAN); omitted: none. */
6494
+ bankTransfer?: {
6495
+ currencies: string[];
6496
+ };
6497
+ /** Active API keys; omitted: no `apiKeys` section in the report. */
6498
+ apiKeys?: Omit<DoctorApiKey, 'ageDays'>[];
5785
6499
  };
5786
6500
  /** Email readiness from settings and the deployment's transport (pure). */
5787
- declare function emailReadinessOf(settings: DoctorFacts["settings"], transport: NonNullable<DoctorFacts["emailTransport"]>): DoctorEmails;
6501
+ declare function emailReadinessOf(settings: DoctorFacts['settings'], transport: NonNullable<DoctorFacts['emailTransport']>): DoctorEmails;
5788
6502
  /** Bekleyen en eski teslimat bundan eskiyse `endpoint_pending_backlog` (K23 alarmıyla aynı eşik). */
5789
6503
  declare const DOCTOR_PENDING_BACKLOG_MS: number;
5790
6504
  /** Son denenmiş teslimattan endpoint teşhisi (saf). */
5791
6505
  declare function endpointDiagnosisOf(last: WebhookLastDelivery | null): DoctorEndpointDiagnosis;
5792
6506
  /** Hosted sayfa hazırlığı: eksik zorunlu marka alanları ve yasal bağlar (saf). */
5793
- declare function hostedReadinessOf(settings: DoctorFacts["settings"]): DoctorHosted;
6507
+ declare function hostedReadinessOf(settings: DoctorFacts['settings']): DoctorHosted;
5794
6508
  /** Olgulardan raporu türetir (saf): endpoint teşhisleri, hosted hazırlığı, uyarılar ve `ok`. */
5795
6509
  declare function buildDoctorReport(facts: DoctorFacts): DoctorReport;
5796
6510
  //#endregion
5797
- export { WebhookEndpointStatus as $, CatalogPlanSchema as $a, ManualInvoiceInputSchema as $i, matchesFilter as $n, MAX_METERED_PRICE_PER_UNITS as $o, ErrorCode as $r, canonicalMeterFilter as $s, EmailExtraTextSchema as $t, DoctorSeveritySchema as A, CheckoutPrefillSchema as Aa, MeResponse as Ai, PLAN_SET_MODES as An, CatalogBenefit as Ao, IngestRejectCode as Ar, MeterFilterClause as As, PaymentDueDaysSchema as At, hostedReadinessOf as B, CheckoutStatus as Ba, InvoiceLineSchema as Bi, ResyncResult as Bn, featureValueMatchesType as Bo, FEATURE_FLAG_BENEFIT_TYPE as Br, MeterPeriod as Bs, WebUrlSchema as Bt, DoctorProvider as C, PortalSessionError as Ca, InvoiceBillingReason as Cc, InvoiceIssueResponseSchema as Ci, emailLocaleOf as Cn, BenefitDefSchema as Co, EventsIngestInput as Cr, MeterCreditEntrySchema as Cs, LateGraceMinutesSchema as Ct, DoctorSettings as D, CheckoutConsentInputSchema as Da, MetadataSchema as Dc, InvoiceWaiveResponseSchema as Di, isEmailRelevant as Dn, BenefitSourceSchema as Do, INGEST_REJECT_CODES as Dr, MeterDefInput as Ds, MeteringSettings as Dt, DoctorReportSchema as E, CheckoutConsentInput as Ea, InvoicePaymentStatusSchema as Ec, InvoiceWaiveResponse as Ei, emailTemplateSettings as En, BenefitFeatureType as Eo, EventsIngestResultSchema as Er, MeterDef as Es, MeterChargeModeSchema as Et, DoctorWarningCode as F, CheckoutSessionCreateInputSchema as Fa, UncancelSubscriptionResponseSchema as Fi, PlanSetResponse as Fn, FeatureFlagProperties as Fo, isEventTimestampInRange as Fr, MeterFilterSchema as Fs, ReturnOriginSchema as Ft, WebhookEndpoint as G, MAX_CHECKOUT_CONSENT_DOCS as Ga, InvoiceSchema as Gi, MeterCreditBenefit as Gn, AccountMeters as Go, ResolvedBenefit as Gr, MeterPeriodStatusSchema as Gs, meteringSettingsOf as Gt, EventTypeSchema as H, Consent as Ha, InvoicePaymentSessionCreateInput as Hi, GrantedMeterCredit as Hn, isMeterCreditBenefit as Ho, OVERRIDE_BENEFIT_SOURCE as Hr, MeterPeriodListSchema as Hs, billingSettingsOf as Ht, DoctorWarningSchema as I, CheckoutSessionCreateParsed as Ia, Invoice as Ii, PlanSetResponseSchema as In, FeatureFlagPropertiesSchema as Io, BenefitRulesDefinition as Ir, MeterFilterValue as Is, SETTINGS_LOCALES as It, WebhookEndpointList as J, checkoutRedirectUrl as Ja, InvoiceVoidInputSchema as Ji, MeterRulesMeter as Jn, CatalogMeterSchema as Jo, isGrantActive as Jr, MeterUnitsSchema as Js, BillingPathSchema as Jt, WebhookEndpointCreateInput as K, ProviderPayload as Ka, InvoiceStatusSchema as Ki, MeterCreditsOptions as Kn, AccountMetersSchema as Ko, ResolvedBenefits as Kr, MeterStanding as Ks, returnOriginsOf as Kt, buildDoctorReport as L, CheckoutSessionCreated as La, InvoiceIssueInput as Li, PlanSetWarning as Ln, MeterCreditAccountBenefit as Lo, BenefitRulesSubscription as Lr, MeterLabel as Ls, SettingsLocale as Lt, DoctorUnsellablePriceSchema as M, CheckoutReturnStatus as Ma, STEWARD_CAPABILITIES as Mi, PlanSetInputSchema as Mn, FeatureFlagAccountBenefit as Mo, IngestRejection as Mr, MeterFilterGroup as Ms, ProductSettingsPatch as Mt, DoctorUnsellableReason as N, CheckoutSession as Na, StewardCapability as Ni, PlanSetMode as Nn, FeatureFlagBenefitDef as No, IngestRejectionSchema as Nr, MeterFilterOperand as Ns, ProductSettingsPatchSchema as Nt, DoctorSettingsSchema as O, CheckoutError as Oa, ManualInvoiceResponse as Oi, liveSubscriptionOf as On, BenefitType as Oo, IngestEvent as Or, MeterDefSchema as Os, MeteringSettingsPatchSchema as Ot, DoctorWarning as P, CheckoutSessionCreateInput as Pa, UncancelSubscriptionResponse as Pi, PlanSetModeSchema as Pn, FeatureFlagBenefitDefSchema as Po, hasControlCharacters as Pr, MeterFilterOperator as Ps, ProductSettingsSchema as Pt, WebhookEndpointSchema as Q, CatalogPlan as Qa, ManualInvoiceInput as Qi, contributionOf as Qn, DecimalUnitsStringSchema as Qo, ERROR_CODES as Qr, MeteredPriceSchema as Qs, EMAIL_TEMPLATE_BY_EVENT as Qt, emailReadinessOf as R, CheckoutSessionCreatedSchema as Ra, InvoiceIssueInputSchema as Ri, PlanSetWarningCode as Rn, MeterCreditBenefitDef as Ro, EntitlementRulesCatalog as Rr, MeterLabelSchema as Rs, SettingsLocaleSchema as Rt, DoctorOverageSchema as S, PortalSessionCreateInputSchema as Sa, IntervalSchema as Sc, InvoiceIssueResponse as Si, billingPageUrl as Sn, BenefitDef as So, EventNameSchema as Sr, MeterCreditEntryKindSchema as Ss, EventsSettingsSchema as St, DoctorReport as T, CHECKOUT_ERRORS as Ta, InvoicePaymentStatus as Tc, InvoiceVoidResponseSchema as Ti, emailTemplateOf as Tn, BenefitDescriptionSchema as To, EventsIngestResult as Tr, MeterCreditPropertiesSchema as Ts, MeterChargeMode as Tt, WEBHOOK_ENDPOINT_STATUSES as U, ConsentSchema as Ua, InvoicePaymentSessionCreateInputSchema as Ui, MeterChargeTotalsLine as Un, AccountMeter as Uo, ResolveBenefitsInput as Ur, MeterPeriodSchema as Us, eventsSettingsOf as Ut, DEFAULT_ENDPOINT_EVENT_TYPES as V, CheckoutStatusSchema as Va, InvoicePaymentSession as Vi, ResyncResultSchema as Vn, isFeatureFlagBenefit as Vo, LIVE_SUBSCRIPTION_STATUSES as Vr, MeterPeriodList as Vs, applySettingsPatch as Vt, WEBHOOK_SECRET_PREFIX as W, INDIVIDUAL_IDENTITY_PLACEHOLDER as Wa, InvoicePaymentSessionSchema as Wi, MeterContribution as Wn, AccountMeterSchema as Wo, ResolveEntitlementsInput as Wr, MeterPeriodStatus as Ws, isReturnUrlAllowed as Wt, WebhookEndpointRotateInput as X, AccountsRefreshResultSchema as Xa, InvoiceWaiveInputSchema as Xi, addUtcMonths as Xn, CreditGrantInputSchema as Xo, resolveBenefits as Xr, MeteredPriceDef as Xs, EMAIL_PAYLOAD_SCHEMAS as Xt, WebhookEndpointListSchema as Y, AccountsRefreshResult as Ya, InvoiceWaiveInput as Yi, OverageRateInput as Yn, CreditGrantInput as Yo, isLiveSubscriptionStatus as Yr, MeteredPrice as Ys, EMAIL_LOCALES as Yt, WebhookEndpointRotateInputSchema as Z, Catalog as Za, MANUAL_INVOICE_MAX_AMOUNT_MINOR as Zi, consumptionOf as Zn, DEFAULT_METER_LOW_AT as Zo, resolveEntitlements as Zr, MeteredPriceDefSchema as Zs, EMAIL_TEMPLATES as Zt, DoctorEventsSchema as _, SubscriptionChangeInputSchema as _a, ExternalRefSchema as _c, HEADER_ACTOR_REF as _i, PriceChangeNoticeEmail as _n, PriceDefSchema as _o, EventMetadata as _r, MeterChargeSchema as _s, DEFAULT_PAYMENT_DUE_DAYS as _t, DOCTOR_ROLLUP_LAG_WARN_SECONDS as a, CancelSubscriptionInputSchema as aa, Currency as ac, AccountUpsertResponse as ai, EmailSettingsPatchSchema as an, FeatureDef as ao, rateOverage as ar, METER_FILTER_MAX_DEPTH as as, webhookEndpointUrlProblem as at, DoctorHostedSchema as b, PortalSession as ba, IdSchema as bc, HEADER_REQUEST_ID as bi, PriceChangeNoticeMeteredRateSchema as bn, AccountBenefitSchema as bo, EventMetadataValue as br, MeterCreditEntry as bs, EventsSettings as bt, DoctorBillingSchema as c, GrantCreateInputSchema as ca, ERROR_CATEGORIES as cc, CancelSubscriptionResponseSchema as ci, EmailTemplateSchema as cn, MAX_CATALOG_BENEFITS as co, EVENTS_INGEST_MAX_BYTES as cr, METER_STANDINGS as cs, BillingSettingsSchema as ct, DoctorEmails as d, Payment as da, Entitlements as dc, CheckoutSessionResponse as di, InvoicePaymentDueEmail as dn, MAX_PLAN_BENEFITS as do, EVENT_METADATA_MAX_PAIRS as dr, MeterAggregationSchema as ds, BrandingSchema as dt, ManualInvoiceLineInput as ea, meterFilterClauseOf as ec, ErrorCodeSpec as ei, EmailLocale as en, CatalogSchema as eo, meterChargeTotals as er, MAX_METER_UNITS as es, WebhookEndpointStatusSchema as et, DoctorEmailsSchema as f, PaymentSchema as fa, EntitlementsSchema as fc, CheckoutSessionResponseSchema as fi, InvoicePaymentDueEmailSchema as fn, METERED_PRICE_TAX_MISMATCH as fo, EVENT_METADATA_STRING_MAX_LENGTH as fr, MeterCharge as fs, DEFAULT_CHECKOUT_TTL_MINUTES as ft, DoctorEvents as g, SubscriptionChangeInput as ga, ErrorResponseSchema as gc, GrantCreateResponseSchema as gi, NotificationEmailsSchema as gn, PriceDef as go, EventExternalIdSchema as gr, MeterChargeListSchema as gs, DEFAULT_MIN_INVOICE_MINOR as gt, DoctorEndpointSchema as h, Subscription as ha, ErrorResponse as hc, GrantCreateResponse as hi, NoticedMeteredRateSchema as hn, Price as ho, EVENT_TIMESTAMP_MAX_SKEW_MINUTES as hr, MeterChargeList as hs, DEFAULT_METER_CHARGE_MODE as ht, DOCTOR_REQUIRED_LEGAL_LINKS as i, CancelSubscriptionInput as ia, CodeSchema as ic, AccountDetailSchema as ii, EmailSettingsPatch as in, CatalogSyncResultSchema as io, periodBoundsOf as ir, METER_FILTER_MAX_CONDITIONS as is, generateWebhookSecret as it, DoctorUnsellablePrice as j, CheckoutRedirectTarget as ja, MeResponseSchema as ji, PlanSetInput as jn, CatalogBenefitSchema as jo, IngestRejectCodeSchema as jr, MeterFilterCondition as js, ProductSettings as jt, DoctorSeverity as k, CheckoutPrefill as ka, ManualInvoiceResponseSchema as ki, uniqueEmails as kn, BenefitTypeSchema as ko, IngestEventSchema as kr, MeterFilter as ks, MeteringSettingsSchema as kt, DoctorCatalog as l, GrantSchema as la, EntitlementValue as lc, ChangeSubscriptionResponse as li, EmailTemplateSettings as ln, MAX_CATALOG_METERED_PRICES as lo, EVENTS_INGEST_MAX_EVENTS as lr, MeterAggregation as ls, Branding as lt, DoctorEndpointDiagnosis as m, StatsSchema as ma, ErrorCategorySchema as mc, CreditGrantResponseSchema as mi, NoticedMeteredRate as mn, PlanDefSchema as mo, EVENT_TIMESTAMP_MAX_AGE_DAYS as mr, MeterChargeLineSchema as ms, DEFAULT_LATE_GRACE_MINUTES as mt, DOCTOR_PROVIDER_ENVIRONMENTS as n, manualInvoiceTotals as na, ActorRefSchema as nc, isKnownErrorCode as ni, EmailSenderSchema as nn, CatalogSyncInputSchema as no, overageCapReached as nr, METER_CHARGE_STATUSES as ns, WebhookLastDeliverySchema as nt, DOCTOR_SEVERITIES as o, Grant as oa, CurrencySchema as oc, AccountUpsertResponseSchema as oi, EmailSettingsSchema as on, FeatureDefSchema as oo, rolloverOf as or, METER_FILTER_OPERATORS as os, BillingSettings as ot, DoctorEndpoint as p, Stats as pa, ErrorCategory as pc, CreditGrantResponse as pi, MAX_NOTIFICATION_EMAILS as pn, PlanDef as po, EVENT_NAME_MAX_LENGTH as pr, MeterChargeLine as ps, DEFAULT_EVENT_RETENTION_DAYS as pt, WebhookEndpointCreateInputSchema as q, ProviderPayloadSchema as qa, InvoiceVoidInput as qi, MeterRulesEvent as qn, CatalogMeter as qo, ResolvedEntitlements as qr, MeterStandingSchema as qs, BILLING_PATH_PLACEHOLDERS as qt, DOCTOR_REQUIRED_BRANDING as r, splitInclusiveTax as ra, AmountMinorSchema as rc, AccountDetail as ri, EmailSettings as rn, CatalogSyncResult as ro, overageOf as rr, METER_CREDIT_ENTRY_KINDS as rs, WebhookSecretSchema as rt, DoctorBilling as s, GrantCreateInput as sa, DateTimeSchema as sc, CancelSubscriptionResponse as si, EmailTemplate as sn, FeatureTypeSchema as so, standingOf as sr, METER_PERIOD_STATUSES as ss, BillingSettingsPatchSchema as st, DOCTOR_PENDING_BACKLOG_MS as t, ManualInvoiceLineInputSchema as ta, API_VERSION as tc, errorCodeSpec as ti, EmailRelevanceFacts as tn, CatalogSyncInput as to, meterCreditsOf as tr, METER_AGGREGATION_KINDS as ts, WebhookLastDelivery as tt, DoctorCatalogSchema as u, MAX_GRANT_BENEFITS as ua, EntitlementValueSchema as uc, ChangeSubscriptionResponseSchema as ui, EmailTemplateSettingsSchema as un, MAX_CATALOG_METERS as uo, EVENT_METADATA_KEY_MAX_LENGTH as ur, MeterAggregationKind as us, BrandingPatchSchema as ut, DoctorFacts as v, SubscriptionSchema as va, INVOICE_BILLING_REASONS as vc, HEADER_API_VERSION as vi, PriceChangeNoticeEmailSchema as vn, PriceSchema as vo, EventMetadataKeySchema as vr, MeterChargeStatus as vs, DEFAULT_PORTAL_TTL_MINUTES as vt, DoctorProviderSchema as w, PortalSessionSchema as wa, InvoiceBillingReasonSchema as wc, InvoiceVoidResponse as wi, emailRecipients as wn, BenefitDescription as wo, EventsIngestInputSchema as wr, MeterCreditProperties as ws, METER_CHARGE_MODES as wt, DoctorOverage as x, PortalSessionCreateInput as xa, Interval as xc, HEADER_SDK as xi, applyEmailSettingsPatch as xn, BENEFIT_TYPES as xo, EventMetadataValueSchema as xr, MeterCreditEntryKind as xs, EventsSettingsPatchSchema as xt, DoctorHosted as y, PORTAL_SESSION_ERRORS as ya, INVOICE_PAYMENT_STATUSES as yc, HEADER_IDEMPOTENCY_KEY as yi, PriceChangeNoticeMeteredRate as yn, AccountBenefit as yo, EventMetadataSchema as yr, MeterChargeStatusSchema as ys, EventRetentionDaysSchema as yt, endpointDiagnosisOf as z, CheckoutSessionSchema as za, InvoiceLine as zi, PlanSetWarningSchema as zn, MeterCreditBenefitDefSchema as zo, EntitlementRulesGrant as zr, MeterLowAtSchema as zs, TtlMinutesSchema as zt };
6511
+ export { WebhookEndpointRotateInput as $, CreditAdjustmentInput as $a, MeterStandingSchema as $c, InvoicePaymentSessionCreateInputSchema as $i, MeterChargeTotalsLine as $n, ProviderPayloadSchema as $o, ResolveBenefitsInput as $r, CatalogMeter as $s, meteringSettingsOf as $t, DoctorSettings as A, PortalSession as Aa, MeterCreditProperties as Ac, HEADER_REQUEST_ID as Ai, InvoiceBillingReasonSchema as Al, PriceChangeNoticeMeteredRateSchema as An, CheckoutConsentInputSchema as Ao, EventMetadataValue as Ar, BenefitDescription as As, EventsSettingsSchema as At, buildDoctorReport as B, ApiKeyListSchema as Ba, MeterFilterOperator as Bc, MeResponse as Bi, PLAN_SET_MODES as Bn, CheckoutSessionCreated as Bo, IngestRejectCode as Br, FeatureFlagBenefitDefSchema as Bs, ProductSettingsPatch as Bt, DoctorHostedSchema as C, Stats as Ca, MeterChargeSchema as Cc, CreditGrantResponse as Ci, ExternalRefSchema as Cl, MAX_NOTIFICATION_EMAILS as Cn, generateApiKeyToken as Co, EVENT_NAME_MAX_LENGTH as Cr, PriceDefSchema as Cs, DEFAULT_METER_CHARGE_MODE as Ct, DoctorProviderSchema as D, SubscriptionChangeInputSchema as Da, MeterCreditEntryKind as Dc, HEADER_ACTOR_REF as Di, Interval as Dl, PriceChangeNoticeEmail as Dn, BankTransferRecordedSchema as Do, EventMetadata as Dr, BENEFIT_TYPES as Ds, EventRetentionDaysSchema as Dt, DoctorProvider as E, SubscriptionChangeInput as Ea, MeterCreditEntry as Ec, GrantCreateResponseSchema as Ei, IdSchema as El, NotificationEmailsSchema as En, BankTransferRecorded as Eo, EventExternalIdSchema as Er, AccountBenefitSchema as Es, DEFAULT_PORTAL_TTL_MINUTES as Et, DoctorUnsellablePriceSchema as F, API_KEY_SCOPES as Fa, MeterFilter as Fc, InvoiceVoidResponseSchema as Fi, emailTemplateOf as Fn, CheckoutReturnStatus as Fo, EventsIngestResult as Fr, BenefitTypeSchema as Fs, MeteringSettings as Ft, EventTypeSchema as G, ApiKeyTokenSchema as Ga, MeterLowAtSchema as Gc, UncancelSubscriptionResponseSchema as Gi, PlanSetResponse as Gn, Consent as Go, isEventTimestampInRange as Gr, MeterCreditBenefitDefSchema as Gs, SettingsLocale as Gt, endpointDiagnosisOf as H, ApiKeySchema as Ha, MeterFilterValue as Hc, STEWARD_CAPABILITIES as Hi, PlanSetInputSchema as Hn, CheckoutSessionSchema as Ho, IngestRejection as Hr, FeatureFlagPropertiesSchema as Hs, ProductSettingsSchema as Ht, DoctorUnsellableReason as I, ApiKey as Ia, MeterFilterClause as Ic, InvoiceWaiveResponse as Ii, emailTemplateSettings as In, CheckoutSession as Io, EventsIngestResultSchema as Ir, CatalogBenefit as Is, MeteringSettingsPatchSchema as It, WebhookEndpoint as J, BankTransferListItem as Ja, MeterPeriodListSchema as Jc, InvoiceIssueInputSchema as Ji, PlanSetWarningCode as Jn, MAX_CHECKOUT_CONSENT_DOCS as Jo, EntitlementRulesCatalog as Jr, isMeterCreditBenefit as Js, WebUrlSchema as Jt, WEBHOOK_ENDPOINT_STATUSES as K, BANK_TRANSFER_LIST_STATUSES as Ka, MeterPeriod as Kc, Invoice as Ki, PlanSetResponseSchema as Kn, ConsentSchema as Ko, BenefitRulesDefinition as Kr, featureValueMatchesType as Ks, SettingsLocaleSchema as Kt, DoctorWarning as L, ApiKeyCreateInput as La, MeterFilterCondition as Lc, InvoiceWaiveResponseSchema as Li, isEmailRelevant as Ln, CheckoutSessionCreateInput as Lo, INGEST_REJECT_CODES as Lr, CatalogBenefitSchema as Ls, MeteringSettingsSchema as Lt, DoctorSeverity as M, PortalSessionCreateInputSchema as Ma, MeterDef as Mc, InvoiceIssueResponse as Mi, InvoicePaymentStatusSchema as Ml, billingPageUrl as Mn, CheckoutPrefill as Mo, EventNameSchema as Mr, BenefitFeatureType as Ms, METER_CHARGE_MODES as Mt, DoctorSeveritySchema as N, PortalSessionError as Na, MeterDefInput as Nc, InvoiceIssueResponseSchema as Ni, MetadataSchema as Nl, emailLocaleOf as Nn, CheckoutPrefillSchema as No, EventsIngestInput as Nr, BenefitSourceSchema as Ns, MeterChargeMode as Nt, DoctorReport as O, SubscriptionSchema as Oa, MeterCreditEntryKindSchema as Oc, HEADER_API_VERSION as Oi, IntervalSchema as Ol, PriceChangeNoticeEmailSchema as On, CHECKOUT_ERRORS as Oo, EventMetadataKeySchema as Or, BenefitDef as Os, EventsSettings as Ot, DoctorUnsellablePrice as P, PortalSessionSchema as Pa, MeterDefSchema as Pc, InvoiceVoidResponse as Pi, emailRecipients as Pn, CheckoutRedirectTarget as Po, EventsIngestInputSchema as Pr, BenefitType as Ps, MeterChargeModeSchema as Pt, WebhookEndpointListSchema as Q, BankTransferListStatusSchema as Qa, MeterStanding as Qc, InvoicePaymentSessionCreateInput as Qi, GrantedMeterCredit as Qn, ProviderPayload as Qo, OVERRIDE_BENEFIT_SOURCE as Qr, AccountMetersSchema as Qs, isReturnUrlAllowed as Qt, DoctorWarningCode as R, ApiKeyCreateInputSchema as Ra, MeterFilterGroup as Rc, ManualInvoiceResponse as Ri, liveSubscriptionOf as Rn, CheckoutSessionCreateInputSchema as Ro, IngestEvent as Rr, FeatureFlagAccountBenefit as Rs, PaymentDueDaysSchema as Rt, DoctorHosted as S, PaymentSchema as Sa, MeterChargeListSchema as Sc, CheckoutSessionResponseSchema as Si, ErrorResponseSchema as Sl, InvoicePaymentDueEmailSchema as Sn, RepriceResultSchema as So, EVENT_METADATA_STRING_MAX_LENGTH as Sr, PriceDef as Ss, DEFAULT_LATE_GRACE_MINUTES as St, DoctorOverageSchema as T, Subscription as Ta, MeterChargeStatusSchema as Tc, GrantCreateResponse as Ti, INVOICE_PAYMENT_STATUSES as Tl, NoticedMeteredRateSchema as Tn, BankTransferRecordInputSchema as To, EVENT_TIMESTAMP_MAX_SKEW_MINUTES as Tr, AccountBenefit as Ts, DEFAULT_PAYMENT_DUE_DAYS as Tt, hostedReadinessOf as U, ApiKeyScope as Ua, MeterLabel as Uc, StewardCapability as Ui, PlanSetMode as Un, CheckoutStatus as Uo, IngestRejectionSchema as Ur, MeterCreditAccountBenefit as Us, ReturnOriginSchema as Ut, emailReadinessOf as V, ApiKeyPrefixSchema as Va, MeterFilterSchema as Vc, MeResponseSchema as Vi, PlanSetInput as Vn, CheckoutSessionCreatedSchema as Vo, IngestRejectCodeSchema as Vr, FeatureFlagProperties as Vs, ProductSettingsPatchSchema as Vt, DEFAULT_ENDPOINT_EVENT_TYPES as W, ApiKeyScopeSchema as Wa, MeterLabelSchema as Wc, UncancelSubscriptionResponse as Wi, PlanSetModeSchema as Wn, CheckoutStatusSchema as Wo, hasControlCharacters as Wr, MeterCreditBenefitDef as Ws, SETTINGS_LOCALES as Wt, WebhookEndpointCreateInputSchema as X, BankTransferListSchema as Xa, MeterPeriodStatus as Xc, InvoiceLineSchema as Xi, ResyncResult as Xn, PaymentMethod as Xo, FEATURE_FLAG_BENEFIT_TYPE as Xr, AccountMeterSchema as Xs, billingSettingsOf as Xt, WebhookEndpointCreateInput as Y, BankTransferListItemSchema as Ya, MeterPeriodSchema as Yc, InvoiceLine as Yi, PlanSetWarningSchema as Yn, PAYMENT_METHODS as Yo, EntitlementRulesGrant as Yr, AccountMeter as Ys, applySettingsPatch as Yt, WebhookEndpointList as Z, BankTransferListStatus as Za, MeterPeriodStatusSchema as Zc, InvoicePaymentSession as Zi, ResyncResultSchema as Zn, PaymentMethodSchema as Zo, LIVE_SUBSCRIPTION_STATUSES as Zr, AccountMeters as Zs, eventsSettingsOf as Zt, DoctorEndpointDiagnosis as _, GrantCreateInput as _a, MeterAggregationSchema as _c, CancelSubscriptionResponse as _i, Entitlements as _l, EmailTemplate as _n, RepriceInput as _o, standingOf as _r, MAX_PLAN_BENEFITS as _s, BrandingPatchSchema as _t, DOCTOR_REQUIRED_LEGAL_LINKS as a, InvoiceWaiveInput as aa, MAX_METERED_PRICE_PER_UNITS as ac, isLiveSubscriptionStatus as ai, canonicalMeterFilter as al, EMAIL_LOCALES as an, MAX_API_KEY_TTL_DAYS as ao, OverageRateInput as ar, CatalogPlanSchema as as, WebhookLastDeliverySchema as at, DoctorEventsSchema as b, MAX_GRANT_BENEFITS as ba, MeterChargeLineSchema as bc, ChangeSubscriptionResponseSchema as bi, ErrorCategorySchema as bl, EmailTemplateSettingsSchema as bn, RepriceItemSchema as bo, EVENT_METADATA_KEY_MAX_LENGTH as br, PlanDefSchema as bs, DEFAULT_CHECKOUT_TTL_MINUTES as bt, DoctorApiKey as c, ManualInvoiceInput as ca, METER_CHARGE_STATUSES as cc, ERROR_CODES as ci, ActorRefSchema as cl, EMAIL_TEMPLATE_BY_EVENT as cn, MeterClosePeriodsInputSchema as co, contributionOf as cr, CatalogSyncInputSchema as cs, webhookEndpointUrlProblem as ct, DoctorBillingSchema as d, ManualInvoiceLineInputSchema as da, METER_FILTER_MAX_DEPTH as dc, errorCodeSpec as di, Currency as dl, EmailRelevanceFacts as dn, MeterRecomputeInput as do, meterCreditsOf as dr, FeatureDef as ds, BankTransferSettingsPatchSchema as dt, InvoicePaymentSessionSchema as ea, CatalogMeterSchema as ec, ResolveEntitlementsInput as ei, MeterUnitsSchema as el, returnOriginsOf as en, CreditAdjustmentInputSchema as eo, MeterContribution as er, checkoutRedirectUrl as es, WebhookEndpointRotateInputSchema as et, DoctorCatalog as f, manualInvoiceTotals as fa, METER_FILTER_OPERATORS as fc, isKnownErrorCode as fi, CurrencySchema as fl, EmailSenderSchema as fn, MeterRecomputeInputSchema as fo, overageCapReached as fr, FeatureDefSchema as fs, BankTransferSettingsSchema as ft, DoctorEndpoint as g, Grant as ga, MeterAggregationKind as gc, AccountUpsertResponseSchema as gi, EntitlementValueSchema as gl, EmailSettingsSchema as gn, RedeliveredEventSchema as go, rolloverOf as gr, MAX_CATALOG_METERS as gs, Branding as gt, DoctorEmailsSchema as h, CancelSubscriptionInputSchema as ha, MeterAggregation as hc, AccountUpsertResponse as hi, EntitlementValue as hl, EmailSettingsPatchSchema as hn, RedeliveredEvent as ho, rateOverage as hr, MAX_CATALOG_METERED_PRICES as hs, BillingSettingsSchema as ht, DOCTOR_REQUIRED_BRANDING as i, InvoiceVoidInputSchema as ia, DecimalUnitsStringSchema as ic, isGrantActive as ii, MeteredPriceSchema as il, BillingPathSchema as in, DunningPolicySchema as io, MeterRulesMeter as ir, CatalogPlan as is, WebhookLastDelivery as it, DoctorSettingsSchema as j, PortalSessionCreateInput as ja, MeterCreditPropertiesSchema as jc, HEADER_SDK as ji, InvoicePaymentStatus as jl, applyEmailSettingsPatch as jn, CheckoutError as jo, EventMetadataValueSchema as jr, BenefitDescriptionSchema as js, LateGraceMinutesSchema as jt, DoctorReportSchema as k, PORTAL_SESSION_ERRORS as ka, MeterCreditEntrySchema as kc, HEADER_IDEMPOTENCY_KEY as ki, InvoiceBillingReason as kl, PriceChangeNoticeMeteredRate as kn, CheckoutConsentInput as ko, EventMetadataSchema as kr, BenefitDefSchema as ks, EventsSettingsPatchSchema as kt, DoctorApiKeySchema as l, ManualInvoiceInputSchema as la, METER_CREDIT_ENTRY_KINDS as lc, ErrorCode as li, AmountMinorSchema as ll, EmailExtraTextSchema as ln, MeterClosePeriodsResult as lo, matchesFilter as lr, CatalogSyncResult as ls, BankTransferPaymentDaysSchema as lt, DoctorEmails as m, CancelSubscriptionInput as ma, METER_STANDINGS as mc, AccountDetailSchema as mi, ERROR_CATEGORIES as ml, EmailSettingsPatch as mn, MeterRecomputeResultSchema as mo, periodBoundsOf as mr, MAX_CATALOG_BENEFITS as ms, BillingSettingsPatchSchema as mt, DOCTOR_PENDING_BACKLOG_MS as n, InvoiceStatusSchema as na, CreditGrantInputSchema as nc, ResolvedBenefits as ni, MeteredPriceDef as nl, BankTransferInstructionsEmail as nn, DunningPolicy as no, MeterCreditsOptions as nr, AccountsRefreshResultSchema as ns, WebhookEndpointStatus as nt, DOCTOR_ROLLUP_LAG_WARN_SECONDS as o, InvoiceWaiveInputSchema as oa, MAX_METER_UNITS as oc, resolveBenefits as oi, meterFilterClauseOf as ol, EMAIL_PAYLOAD_SCHEMAS as on, MAX_NOTICE_DAYS as oo, addUtcMonths as or, CatalogSchema as os, WebhookSecretSchema as ot, DoctorCatalogSchema as p, splitInclusiveTax as pa, METER_PERIOD_STATUSES as pc, AccountDetail as pi, DateTimeSchema as pl, EmailSettings as pn, MeterRecomputeResult as po, overageOf as pr, FeatureTypeSchema as ps, BillingSettings as pt, WEBHOOK_SECRET_PREFIX as q, BankTransferList as qa, MeterPeriodList as qc, InvoiceIssueInput as qi, PlanSetWarning as qn, INDIVIDUAL_IDENTITY_PLACEHOLDER as qo, BenefitRulesSubscription as qr, isFeatureFlagBenefit as qs, TtlMinutesSchema as qt, DOCTOR_PROVIDER_ENVIRONMENTS as r, InvoiceVoidInput as ra, DEFAULT_METER_LOW_AT as rc, ResolvedEntitlements as ri, MeteredPriceDefSchema as rl, BankTransferInstructionsEmailSchema as rn, DunningPolicyInput as ro, MeterRulesEvent as rr, Catalog as rs, WebhookEndpointStatusSchema as rt, DOCTOR_SEVERITIES as s, MANUAL_INVOICE_MAX_AMOUNT_MINOR as sa, METER_AGGREGATION_KINDS as sc, resolveEntitlements as si, API_VERSION as sl, EMAIL_TEMPLATES as sn, MeterClosePeriodsInput as so, consumptionOf as sr, CatalogSyncInput as ss, generateWebhookSecret as st, DOCTOR_KEY_EXPIRY_WARN_DAYS as t, InvoiceSchema as ta, CreditGrantInput as tc, ResolvedBenefit as ti, MeteredPrice as tl, BILLING_PATH_PLACEHOLDERS as tn, DUNNING_ACTIONS as to, MeterCreditBenefit as tr, AccountsRefreshResult as ts, WebhookEndpointSchema as tt, DoctorBilling as u, ManualInvoiceLineInput as ua, METER_FILTER_MAX_CONDITIONS as uc, ErrorCodeSpec as ui, CodeSchema as ul, EmailLocale as un, MeterClosePeriodsResultSchema as uo, meterChargeTotals as ur, CatalogSyncResultSchema as us, BankTransferSettings as ut, DoctorEndpointSchema as v, GrantCreateInputSchema as va, MeterCharge as vc, CancelSubscriptionResponseSchema as vi, EntitlementsSchema as vl, EmailTemplateSchema as vn, RepriceInputSchema as vo, EVENTS_INGEST_MAX_BYTES as vr, METERED_PRICE_TAX_MISMATCH as vs, BrandingSchema as vt, DoctorOverage as w, StatsSchema as wa, MeterChargeStatus as wc, CreditGrantResponseSchema as wi, INVOICE_BILLING_REASONS as wl, NoticedMeteredRate as wn, BankTransferRecordInput as wo, EVENT_TIMESTAMP_MAX_AGE_DAYS as wr, PriceSchema as ws, DEFAULT_MIN_INVOICE_MINOR as wt, DoctorFacts as x, Payment as xa, MeterChargeList as xc, CheckoutSessionResponse as xi, ErrorResponse as xl, InvoicePaymentDueEmail as xn, RepriceResult as xo, EVENT_METADATA_MAX_PAIRS as xr, Price as xs, DEFAULT_EVENT_RETENTION_DAYS as xt, DoctorEvents as y, GrantSchema as ya, MeterChargeLine as yc, ChangeSubscriptionResponse as yi, ErrorCategory as yl, EmailTemplateSettings as yn, RepriceItem as yo, EVENTS_INGEST_MAX_EVENTS as yr, PlanDef as ys, DEFAULT_BANK_TRANSFER_PAYMENT_DAYS as yt, DoctorWarningSchema as z, ApiKeyList as za, MeterFilterOperand as zc, ManualInvoiceResponseSchema as zi, uniqueEmails as zn, CheckoutSessionCreateParsed as zo, IngestEventSchema as zr, FeatureFlagBenefitDef as zs, ProductSettings as zt };