better-auth-streampay 2.2.1 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
- import * as _streamsdk_typescript from '@streamsdk/typescript';
2
- import { SubscriptionDetailed, CurrencyCode, CreatePaymentLinkDto, PaymentRefundRequest, SubscriptionUpdate, ConsumerCreate, ConsumerResponse, PaginationParams, ConsumerListResponse, ConsumerUpdate, PaymentLinkDetailed, PaymentLinkListResponse, UpdatePaymentLinkStatusDto, ProductCreate, ProductDto, ProductListResponse, ProductUpdate, CouponCreate, CouponDetailed, CouponListResponse, CouponUpdate, SubscriptionCreate, SubscriptionListResponse, SubscriptionCancel, FreezeSubscriptionCreateRequest, FreezeSubscriptionBase, FreezeListResponse, FreezeSubscriptionUpdateRequest, InvoiceListResponse, InvoiceDetailed, PaymentListResponse, PaymentResponse } from '@streamsdk/typescript';
3
1
  import * as better_auth from 'better-auth';
4
- import { GenericEndpointContext, User, UnionToIntersection } from 'better-auth';
2
+ import { Where, GenericEndpointContext, User, UnionToIntersection } from 'better-auth';
3
+ import * as _streamsdk_typescript from '@streamsdk/typescript';
4
+ import { SubscriptionDetailed, CurrencyCode, CreatePaymentLinkDto, FreezeListResponse, PaymentRefundRequest, SubscriptionUpdate, ConsumerCreate, ConsumerResponse, PaginationParams, ConsumerListResponse, ConsumerUpdate, PaymentLinkDetailed, PaymentLinkListResponse, UpdatePaymentLinkStatusDto, ProductCreate, ProductDto, ProductListResponse, ProductUpdate, CouponCreate, CouponDetailed, CouponListResponse, CouponUpdate, SubscriptionCreate, SubscriptionListResponse, SubscriptionCancel, FreezeSubscriptionCreateRequest, FreezeSubscriptionBase, FreezeSubscriptionUpdateRequest, InvoiceListResponse, InvoiceDetailed, PaymentListResponse, PaymentResponse } from '@streamsdk/typescript';
5
5
  import * as zod from 'zod';
6
6
  import { z } from 'zod';
7
7
  import * as zod_v4_core from 'zod/v4/core';
@@ -55,6 +55,32 @@ declare const $ERROR_CODES: {
55
55
  type StreamPayErrorCode = keyof typeof $ERROR_CODES;
56
56
  declare function mapToErrorCode(rawCode: string | undefined, status: number | undefined): StreamPayErrorCode;
57
57
 
58
+ interface StreamPayLoggerContext {
59
+ context: {
60
+ adapter?: {
61
+ findOne: <T = unknown>(input: {
62
+ model: string;
63
+ where: Where[];
64
+ }) => Promise<T | null>;
65
+ update?: (input: {
66
+ model: string;
67
+ update: Record<string, unknown>;
68
+ where: Where[];
69
+ }) => Promise<unknown>;
70
+ };
71
+ internalAdapter?: {
72
+ updateUser?: (userId: string, data: Record<string, unknown>) => Promise<unknown>;
73
+ listUsers?: (limit: number, offset: number, sortBy: undefined, where: Where[]) => Promise<Record<string, unknown>[]>;
74
+ };
75
+ logger: {
76
+ error: (message: string) => void;
77
+ warn: (message: string) => void;
78
+ info: (message: string) => void;
79
+ debug: (message: string) => void;
80
+ };
81
+ };
82
+ }
83
+
58
84
  interface StreamPaySessionUser {
59
85
  id: string;
60
86
  email?: string;
@@ -74,6 +100,7 @@ declare const STREAMPAY_EVENT_ENTITY_TYPES: {
74
100
  readonly PAYMENT_FAILED: "PAYMENT";
75
101
  readonly PAYMENT_CANCELED: "PAYMENT";
76
102
  readonly PAYMENT_REFUNDED: "PAYMENT";
103
+ readonly PAYMENT_PARTIALLY_REFUNDED: "PAYMENT";
77
104
  readonly PAYMENT_MARKED_AS_PAID: "PAYMENT";
78
105
  readonly INVOICE_CREATED: "INVOICE";
79
106
  readonly INVOICE_SENT: "INVOICE";
@@ -88,6 +115,7 @@ declare const STREAMPAY_EVENT_ENTITY_TYPES: {
88
115
  readonly SUBSCRIPTION_CANCELED: "SUBSCRIPTION";
89
116
  readonly SUBSCRIPTION_FROZEN: "SUBSCRIPTION";
90
117
  readonly SUBSCRIPTION_CYCLE_RENEWAL_FAILED: "SUBSCRIPTION";
118
+ readonly SUBSCRIPTION_CYCLE_RENEWED_SUCCESSFULLY: "SUBSCRIPTION";
91
119
  readonly SUBSCRIPTION_CANCEL_AT_PERIOD_END: "SUBSCRIPTION";
92
120
  readonly SUBSCRIPTION_FREEZE_NOW: "SUBSCRIPTION";
93
121
  readonly SUBSCRIPTION_UNFREEZE_NOW: "SUBSCRIPTION";
@@ -194,6 +222,8 @@ interface Subscription {
194
222
  streampayConsumerId: string | null;
195
223
  streampayPaymentLinkId: string | null;
196
224
  plan: string;
225
+ /** False when Stream's effective products cannot be mapped to a configured plan. */
226
+ catalogMapped?: boolean | null;
197
227
  planVersion: string | null;
198
228
  productId: string | null;
199
229
  group: string | null;
@@ -210,6 +240,8 @@ interface Subscription {
210
240
  periodStart: Date | null;
211
241
  periodEnd: Date | null;
212
242
  currentCycleNumber: number | null;
243
+ /** Event that owns a projected cycle's pending renewal callback. */
244
+ renewalCallbackEventId?: string | null;
213
245
  trialStart: Date | null;
214
246
  trialEnd: Date | null;
215
247
  cancelAtPeriodEnd: boolean;
@@ -273,6 +305,11 @@ interface TrialEligibilityContext {
273
305
  declare function subscriptionSlotKey(referenceType: SubscriptionReferenceType, referenceId: string, group: string | null | undefined): string;
274
306
  interface SubscriptionsOptionsBase extends SubscriptionCallbacks {
275
307
  plans: PlansInput;
308
+ /** Paginated REST adapter for SDK versions that cannot pass freeze query parameters. */
309
+ listSubscriptionFreezes?: (subscriptionId: string, params: {
310
+ page: number;
311
+ limit: number;
312
+ }) => Promise<FreezeListResponse>;
276
313
  authorizeReference?: (data: AuthorizeReferenceContext, ctx: GenericEndpointContext) => boolean | Promise<boolean>;
277
314
  /** StreamPay makes the final trial decision even when this overrides local eligibility. */
278
315
  isTrialEligible?: (data: TrialEligibilityContext, ctx: GenericEndpointContext) => boolean | Promise<boolean>;
@@ -297,7 +334,7 @@ interface ResolvedPlans {
297
334
  type FeatureKey<P> = P extends {
298
335
  limits?: infer L;
299
336
  } ? L extends Record<string, unknown> ? Extract<keyof L, string> : string : string;
300
- declare function hasSubscriptionAccess(subscription: Pick<Subscription, "status">, accessStatuses?: readonly SubscriptionStatus[]): boolean;
337
+ declare function hasSubscriptionAccess(subscription: Pick<Subscription, "status" | "catalogMapped">, accessStatuses?: readonly SubscriptionStatus[]): boolean;
301
338
  declare function hasFeature<P extends StreamPayPlanLike>(subscription: Subscription, plan: P | undefined, feature: FeatureKey<P>, accessStatuses?: readonly SubscriptionStatus[]): boolean;
302
339
  interface LimitCheckResult {
303
340
  allowed: boolean;
@@ -411,6 +448,7 @@ interface StreamPayPluginRegistry {
411
448
  replayed: true;
412
449
  eventId: string;
413
450
  }>;
451
+ replayWebhookHandler?: NonNullable<StreamPayPluginRegistry["replayWebhookEvent"]>;
414
452
  }
415
453
  declare function subscriptions(subsOptions: SubscriptionsOptions): (options: StreamPayOptions, registry?: StreamPayPluginRegistry) => {
416
454
  endpoints: {
@@ -428,7 +466,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
428
466
  successUrl: zod.ZodOptional<zod.ZodString>;
429
467
  failureUrl: zod.ZodOptional<zod.ZodString>;
430
468
  }, zod_v4_core.$strict>;
431
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
469
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
432
470
  session: {
433
471
  session: Record<string, any> & {
434
472
  id: string;
@@ -450,7 +488,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
450
488
  image?: string | null | undefined;
451
489
  };
452
490
  };
453
- }>)[];
491
+ }>>[];
454
492
  }, {
455
493
  subscriptionId: string;
456
494
  url: string;
@@ -465,7 +503,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
465
503
  query: zod.ZodObject<{
466
504
  subscriptionId: zod.ZodString;
467
505
  }, zod_v4_core.$strip>;
468
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
506
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
469
507
  session: {
470
508
  session: Record<string, any> & {
471
509
  id: string;
@@ -487,9 +525,9 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
487
525
  image?: string | null | undefined;
488
526
  };
489
527
  };
490
- }>)[];
528
+ }>>[];
491
529
  }, {
492
- subscription: Subscription;
530
+ subscription: Subscription | null;
493
531
  synced: boolean;
494
532
  }>;
495
533
  cancelSubscription: better_auth.StrictEndpoint<"/subscription/cancel", {
@@ -499,7 +537,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
499
537
  cancelRelatedInvoices: zod.ZodOptional<zod.ZodBoolean>;
500
538
  cancelAtPeriodEnd: zod.ZodOptional<zod.ZodBoolean>;
501
539
  }, zod_v4_core.$strip>;
502
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
540
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
503
541
  session: {
504
542
  session: Record<string, any> & {
505
543
  id: string;
@@ -521,7 +559,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
521
559
  image?: string | null | undefined;
522
560
  };
523
561
  };
524
- }>)[];
562
+ }>>[];
525
563
  }, {
526
564
  created_at?: string;
527
565
  updated_at?: string | null;
@@ -667,7 +705,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
667
705
  home_currency_amount_actual?: string | null;
668
706
  exchange_rate_at_creation?: string | null;
669
707
  consumer_message?: string | null;
670
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
708
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
671
709
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
672
710
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
673
711
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -746,7 +784,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
746
784
  plan: zod.ZodString;
747
785
  seats: zod.ZodOptional<zod.ZodNumber>;
748
786
  }, zod_v4_core.$strict>;
749
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
787
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
750
788
  session: {
751
789
  session: Record<string, any> & {
752
790
  id: string;
@@ -768,7 +806,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
768
806
  image?: string | null | undefined;
769
807
  };
770
808
  };
771
- }>)[];
809
+ }>>[];
772
810
  }, {
773
811
  mode: string;
774
812
  subscriptionId: string;
@@ -1001,7 +1039,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
1001
1039
  home_currency_amount_actual?: string | null;
1002
1040
  exchange_rate_at_creation?: string | null;
1003
1041
  consumer_message?: string | null;
1004
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
1042
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
1005
1043
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
1006
1044
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
1007
1045
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -1081,7 +1119,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
1081
1119
  subscriptionId: zod.ZodString;
1082
1120
  seats: zod.ZodNumber;
1083
1121
  }, zod_v4_core.$strict>;
1084
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
1122
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
1085
1123
  session: {
1086
1124
  session: Record<string, any> & {
1087
1125
  id: string;
@@ -1103,7 +1141,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
1103
1141
  image?: string | null | undefined;
1104
1142
  };
1105
1143
  };
1106
- }>)[];
1144
+ }>>[];
1107
1145
  }, {
1108
1146
  mode: string;
1109
1147
  subscriptionId: string;
@@ -1341,7 +1379,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
1341
1379
  home_currency_amount_actual?: string | null;
1342
1380
  exchange_rate_at_creation?: string | null;
1343
1381
  consumer_message?: string | null;
1344
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
1382
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
1345
1383
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
1346
1384
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
1347
1385
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -1420,7 +1458,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
1420
1458
  body: zod.ZodObject<{
1421
1459
  subscriptionId: zod.ZodString;
1422
1460
  }, zod_v4_core.$strip>;
1423
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
1461
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
1424
1462
  session: {
1425
1463
  session: Record<string, any> & {
1426
1464
  id: string;
@@ -1442,7 +1480,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
1442
1480
  image?: string | null | undefined;
1443
1481
  };
1444
1482
  };
1445
- }>)[];
1483
+ }>>[];
1446
1484
  }, {
1447
1485
  canceled: boolean;
1448
1486
  reused: boolean;
@@ -1591,7 +1629,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
1591
1629
  home_currency_amount_actual?: string | null;
1592
1630
  exchange_rate_at_creation?: string | null;
1593
1631
  consumer_message?: string | null;
1594
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
1632
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
1595
1633
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
1596
1634
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
1597
1635
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -1669,7 +1707,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
1669
1707
  body: zod.ZodObject<{
1670
1708
  subscriptionId: zod.ZodString;
1671
1709
  }, zod_v4_core.$strip>;
1672
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
1710
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
1673
1711
  session: {
1674
1712
  session: Record<string, any> & {
1675
1713
  id: string;
@@ -1691,7 +1729,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
1691
1729
  image?: string | null | undefined;
1692
1730
  };
1693
1731
  };
1694
- }>)[];
1732
+ }>>[];
1695
1733
  }, {
1696
1734
  canceled: boolean;
1697
1735
  reused: boolean;
@@ -1840,7 +1878,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
1840
1878
  home_currency_amount_actual?: string | null;
1841
1879
  exchange_rate_at_creation?: string | null;
1842
1880
  consumer_message?: string | null;
1843
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
1881
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
1844
1882
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
1845
1883
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
1846
1884
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -1918,7 +1956,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
1918
1956
  body: zod.ZodObject<{
1919
1957
  subscriptionId: zod.ZodString;
1920
1958
  }, zod_v4_core.$strip>;
1921
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
1959
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
1922
1960
  session: {
1923
1961
  session: Record<string, any> & {
1924
1962
  id: string;
@@ -1940,7 +1978,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
1940
1978
  image?: string | null | undefined;
1941
1979
  };
1942
1980
  };
1943
- }>)[];
1981
+ }>>[];
1944
1982
  }, {
1945
1983
  uncanceled: boolean;
1946
1984
  subscription: {
@@ -2088,7 +2126,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
2088
2126
  home_currency_amount_actual?: string | null;
2089
2127
  exchange_rate_at_creation?: string | null;
2090
2128
  consumer_message?: string | null;
2091
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
2129
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
2092
2130
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
2093
2131
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
2094
2132
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -2169,7 +2207,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
2169
2207
  freezeEndDatetime: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
2170
2208
  notes: zod.ZodOptional<zod.ZodString>;
2171
2209
  }, zod_v4_core.$strip>;
2172
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
2210
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
2173
2211
  session: {
2174
2212
  session: Record<string, any> & {
2175
2213
  id: string;
@@ -2191,7 +2229,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
2191
2229
  image?: string | null | undefined;
2192
2230
  };
2193
2231
  };
2194
- }>)[];
2232
+ }>>[];
2195
2233
  }, {
2196
2234
  created_at?: string;
2197
2235
  updated_at?: string | null;
@@ -2208,7 +2246,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
2208
2246
  body: zod.ZodObject<{
2209
2247
  subscriptionId: zod.ZodString;
2210
2248
  }, zod_v4_core.$strip>;
2211
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
2249
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
2212
2250
  session: {
2213
2251
  session: Record<string, any> & {
2214
2252
  id: string;
@@ -2230,7 +2268,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
2230
2268
  image?: string | null | undefined;
2231
2269
  };
2232
2270
  };
2233
- }>)[];
2271
+ }>>[];
2234
2272
  }, {
2235
2273
  unfrozen: boolean;
2236
2274
  }>;
@@ -2240,7 +2278,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
2240
2278
  subscriptionId: zod.ZodString;
2241
2279
  freezeId: zod.ZodString;
2242
2280
  }, zod_v4_core.$strip>;
2243
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
2281
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
2244
2282
  session: {
2245
2283
  session: Record<string, any> & {
2246
2284
  id: string;
@@ -2262,7 +2300,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
2262
2300
  image?: string | null | undefined;
2263
2301
  };
2264
2302
  };
2265
- }>)[];
2303
+ }>>[];
2266
2304
  }, {
2267
2305
  canceled: boolean;
2268
2306
  freezeId: string;
@@ -2278,7 +2316,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
2278
2316
  organization: "organization";
2279
2317
  }>>;
2280
2318
  }, zod_v4_core.$strip>>;
2281
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
2319
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
2282
2320
  session: {
2283
2321
  session: Record<string, any> & {
2284
2322
  id: string;
@@ -2300,7 +2338,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
2300
2338
  image?: string | null | undefined;
2301
2339
  };
2302
2340
  };
2303
- }>)[];
2341
+ }>>[];
2304
2342
  }, {
2305
2343
  seats: number;
2306
2344
  plan: StreamPayPlanLike | null;
@@ -2311,6 +2349,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
2311
2349
  streampaySubscriptionId: string | null;
2312
2350
  streampayConsumerId: string | null;
2313
2351
  streampayPaymentLinkId: string | null;
2352
+ catalogMapped?: boolean | null;
2314
2353
  planVersion: string | null;
2315
2354
  productId: string | null;
2316
2355
  group: string | null;
@@ -2325,6 +2364,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
2325
2364
  periodStart: Date | null;
2326
2365
  periodEnd: Date | null;
2327
2366
  currentCycleNumber: number | null;
2367
+ renewalCallbackEventId?: string | null;
2328
2368
  trialStart: Date | null;
2329
2369
  trialEnd: Date | null;
2330
2370
  cancelAtPeriodEnd: boolean;
@@ -2355,7 +2395,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
2355
2395
  organization: "organization";
2356
2396
  }>>;
2357
2397
  }, zod_v4_core.$strip>>;
2358
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
2398
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
2359
2399
  session: {
2360
2400
  session: Record<string, any> & {
2361
2401
  id: string;
@@ -2377,7 +2417,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
2377
2417
  image?: string | null | undefined;
2378
2418
  };
2379
2419
  };
2380
- }>)[];
2420
+ }>>[];
2381
2421
  }, {
2382
2422
  seats: number;
2383
2423
  plan: StreamPayPlanLike | null;
@@ -2388,6 +2428,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
2388
2428
  streampaySubscriptionId: string | null;
2389
2429
  streampayConsumerId: string | null;
2390
2430
  streampayPaymentLinkId: string | null;
2431
+ catalogMapped?: boolean | null;
2391
2432
  planVersion: string | null;
2392
2433
  productId: string | null;
2393
2434
  group: string | null;
@@ -2402,6 +2443,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
2402
2443
  periodStart: Date | null;
2403
2444
  periodEnd: Date | null;
2404
2445
  currentCycleNumber: number | null;
2446
+ renewalCallbackEventId?: string | null;
2405
2447
  trialStart: Date | null;
2406
2448
  trialEnd: Date | null;
2407
2449
  cancelAtPeriodEnd: boolean;
@@ -2433,7 +2475,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
2433
2475
  organization: "organization";
2434
2476
  }>>;
2435
2477
  }, zod_v4_core.$strip>;
2436
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
2478
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
2437
2479
  session: {
2438
2480
  session: Record<string, any> & {
2439
2481
  id: string;
@@ -2455,7 +2497,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
2455
2497
  image?: string | null | undefined;
2456
2498
  };
2457
2499
  };
2458
- }>)[];
2500
+ }>>[];
2459
2501
  }, {
2460
2502
  hasFeature: boolean;
2461
2503
  }>;
@@ -2472,7 +2514,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
2472
2514
  organization: "organization";
2473
2515
  }>>;
2474
2516
  }, zod_v4_core.$strip>;
2475
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
2517
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
2476
2518
  session: {
2477
2519
  session: Record<string, any> & {
2478
2520
  id: string;
@@ -2494,7 +2536,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
2494
2536
  image?: string | null | undefined;
2495
2537
  };
2496
2538
  };
2497
- }>)[];
2539
+ }>>[];
2498
2540
  }, {
2499
2541
  allowed: boolean;
2500
2542
  limit: number;
@@ -2619,6 +2661,12 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
2619
2661
  readonly type: "string";
2620
2662
  readonly required: true;
2621
2663
  };
2664
+ readonly catalogMapped: {
2665
+ readonly type: "boolean";
2666
+ readonly required: false;
2667
+ readonly defaultValue: true;
2668
+ readonly input: false;
2669
+ };
2622
2670
  readonly planVersion: {
2623
2671
  readonly type: "string";
2624
2672
  readonly required: false;
@@ -2688,6 +2736,11 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
2688
2736
  readonly type: "number";
2689
2737
  readonly required: false;
2690
2738
  };
2739
+ readonly renewalCallbackEventId: {
2740
+ readonly type: "string";
2741
+ readonly required: false;
2742
+ readonly input: false;
2743
+ };
2691
2744
  readonly trialStart: {
2692
2745
  readonly type: "date";
2693
2746
  readonly required: false;
@@ -2800,7 +2853,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
2800
2853
  page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
2801
2854
  size: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
2802
2855
  }, z.core.$loose>;
2803
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
2856
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
2804
2857
  session: {
2805
2858
  session: Record<string, any> & {
2806
2859
  id: string;
@@ -2822,7 +2875,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
2822
2875
  image?: string | null | undefined;
2823
2876
  };
2824
2877
  };
2825
- }>)[];
2878
+ }>>[];
2826
2879
  }, {
2827
2880
  items: WebhookEventRow[];
2828
2881
  total: number;
@@ -2831,7 +2884,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
2831
2884
  }>;
2832
2885
  adminGetWebhookEvent: better_auth.StrictEndpoint<"/admin/streampay/webhook-events/:eventId", {
2833
2886
  method: "GET";
2834
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
2887
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
2835
2888
  session: {
2836
2889
  session: Record<string, any> & {
2837
2890
  id: string;
@@ -2853,12 +2906,12 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
2853
2906
  image?: string | null | undefined;
2854
2907
  };
2855
2908
  };
2856
- }>)[];
2909
+ }>>[];
2857
2910
  }, {}>;
2858
2911
  adminReplayWebhookEvent: better_auth.StrictEndpoint<"/admin/streampay/webhook-events/:eventId/replay", {
2859
2912
  method: "POST";
2860
2913
  disableBody: true;
2861
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
2914
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
2862
2915
  session: {
2863
2916
  session: Record<string, any> & {
2864
2917
  id: string;
@@ -2880,7 +2933,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
2880
2933
  image?: string | null | undefined;
2881
2934
  };
2882
2935
  };
2883
- }>)[];
2936
+ }>>[];
2884
2937
  }, {
2885
2938
  replayed: true;
2886
2939
  eventId: string;
@@ -2888,7 +2941,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
2888
2941
  adminDiscardWebhookEvent: better_auth.StrictEndpoint<"/admin/streampay/webhook-events/:eventId", {
2889
2942
  method: "DELETE";
2890
2943
  disableBody: true;
2891
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
2944
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
2892
2945
  session: {
2893
2946
  session: Record<string, any> & {
2894
2947
  id: string;
@@ -2910,7 +2963,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
2910
2963
  image?: string | null | undefined;
2911
2964
  };
2912
2965
  };
2913
- }>)[];
2966
+ }>>[];
2914
2967
  }, {
2915
2968
  discarded: boolean;
2916
2969
  eventId: string;
@@ -2921,7 +2974,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
2921
2974
  page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
2922
2975
  size: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
2923
2976
  }, z.core.$loose>;
2924
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
2977
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
2925
2978
  session: {
2926
2979
  session: Record<string, any> & {
2927
2980
  id: string;
@@ -2943,7 +2996,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
2943
2996
  image?: string | null | undefined;
2944
2997
  };
2945
2998
  };
2946
- }>)[];
2999
+ }>>[];
2947
3000
  }, {
2948
3001
  data?: {
2949
3002
  created_at?: string;
@@ -3080,7 +3133,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3080
3133
  }>;
3081
3134
  adminGetPaymentLink: better_auth.StrictEndpoint<"/admin/streampay/payment-links/:id", {
3082
3135
  method: "GET";
3083
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
3136
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
3084
3137
  session: {
3085
3138
  session: Record<string, any> & {
3086
3139
  id: string;
@@ -3102,7 +3155,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3102
3155
  image?: string | null | undefined;
3103
3156
  };
3104
3157
  };
3105
- }>)[];
3158
+ }>>[];
3106
3159
  }, {
3107
3160
  created_at?: string;
3108
3161
  updated_at?: string | null;
@@ -3242,7 +3295,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3242
3295
  is_percentage: boolean;
3243
3296
  is_active: boolean;
3244
3297
  }>;
3245
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
3298
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
3246
3299
  session: {
3247
3300
  session: Record<string, any> & {
3248
3301
  id: string;
@@ -3264,7 +3317,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3264
3317
  image?: string | null | undefined;
3265
3318
  };
3266
3319
  };
3267
- }>)[];
3320
+ }>>[];
3268
3321
  }, {
3269
3322
  created_at?: string;
3270
3323
  updated_at?: string | null;
@@ -3282,7 +3335,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3282
3335
  page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
3283
3336
  size: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
3284
3337
  }, z.core.$loose>;
3285
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
3338
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
3286
3339
  session: {
3287
3340
  session: Record<string, any> & {
3288
3341
  id: string;
@@ -3304,7 +3357,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3304
3357
  image?: string | null | undefined;
3305
3358
  };
3306
3359
  };
3307
- }>)[];
3360
+ }>>[];
3308
3361
  }, {
3309
3362
  data?: {
3310
3363
  created_at?: string;
@@ -3328,7 +3381,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3328
3381
  }>;
3329
3382
  adminGetCoupon: better_auth.StrictEndpoint<"/admin/streampay/coupons/:id", {
3330
3383
  method: "GET";
3331
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
3384
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
3332
3385
  session: {
3333
3386
  session: Record<string, any> & {
3334
3387
  id: string;
@@ -3350,7 +3403,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3350
3403
  image?: string | null | undefined;
3351
3404
  };
3352
3405
  };
3353
- }>)[];
3406
+ }>>[];
3354
3407
  }, {
3355
3408
  created_at?: string;
3356
3409
  updated_at?: string | null;
@@ -3377,7 +3430,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3377
3430
  is_percentage?: boolean | null;
3378
3431
  is_active?: boolean | null;
3379
3432
  }>;
3380
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
3433
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
3381
3434
  session: {
3382
3435
  session: Record<string, any> & {
3383
3436
  id: string;
@@ -3399,7 +3452,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3399
3452
  image?: string | null | undefined;
3400
3453
  };
3401
3454
  };
3402
- }>)[];
3455
+ }>>[];
3403
3456
  }, {
3404
3457
  created_at?: string;
3405
3458
  updated_at?: string | null;
@@ -3414,7 +3467,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3414
3467
  adminDeleteCoupon: better_auth.StrictEndpoint<"/admin/streampay/coupons/:id", {
3415
3468
  method: "DELETE";
3416
3469
  disableBody: true;
3417
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
3470
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
3418
3471
  session: {
3419
3472
  session: Record<string, any> & {
3420
3473
  id: string;
@@ -3436,7 +3489,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3436
3489
  image?: string | null | undefined;
3437
3490
  };
3438
3491
  };
3439
- }>)[];
3492
+ }>>[];
3440
3493
  }, {
3441
3494
  deleted: boolean;
3442
3495
  }>;
@@ -3475,7 +3528,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3475
3528
  is_price_exempt_from_vat?: boolean | null;
3476
3529
  is_price_inclusive_of_vat?: boolean | null;
3477
3530
  }>;
3478
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
3531
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
3479
3532
  session: {
3480
3533
  session: Record<string, any> & {
3481
3534
  id: string;
@@ -3497,7 +3550,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3497
3550
  image?: string | null | undefined;
3498
3551
  };
3499
3552
  };
3500
- }>)[];
3553
+ }>>[];
3501
3554
  }, {
3502
3555
  created_at?: string;
3503
3556
  updated_at?: string | null;
@@ -3533,7 +3586,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3533
3586
  page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
3534
3587
  size: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
3535
3588
  }, z.core.$loose>;
3536
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
3589
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
3537
3590
  session: {
3538
3591
  session: Record<string, any> & {
3539
3592
  id: string;
@@ -3555,7 +3608,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3555
3608
  image?: string | null | undefined;
3556
3609
  };
3557
3610
  };
3558
- }>)[];
3611
+ }>>[];
3559
3612
  }, {
3560
3613
  data?: {
3561
3614
  created_at?: string;
@@ -3597,7 +3650,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3597
3650
  }>;
3598
3651
  adminGetProduct: better_auth.StrictEndpoint<"/admin/streampay/products/:id", {
3599
3652
  method: "GET";
3600
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
3653
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
3601
3654
  session: {
3602
3655
  session: Record<string, any> & {
3603
3656
  id: string;
@@ -3619,7 +3672,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3619
3672
  image?: string | null | undefined;
3620
3673
  };
3621
3674
  };
3622
- }>)[];
3675
+ }>>[];
3623
3676
  }, {
3624
3677
  created_at?: string;
3625
3678
  updated_at?: string | null;
@@ -3684,7 +3737,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3684
3737
  is_price_exempt_from_vat?: boolean | null;
3685
3738
  is_price_inclusive_of_vat?: boolean | null;
3686
3739
  }>;
3687
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
3740
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
3688
3741
  session: {
3689
3742
  session: Record<string, any> & {
3690
3743
  id: string;
@@ -3706,7 +3759,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3706
3759
  image?: string | null | undefined;
3707
3760
  };
3708
3761
  };
3709
- }>)[];
3762
+ }>>[];
3710
3763
  }, {
3711
3764
  created_at?: string;
3712
3765
  updated_at?: string | null;
@@ -3739,7 +3792,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3739
3792
  adminDeleteProduct: better_auth.StrictEndpoint<"/admin/streampay/products/:id", {
3740
3793
  method: "DELETE";
3741
3794
  disableBody: true;
3742
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
3795
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
3743
3796
  session: {
3744
3797
  session: Record<string, any> & {
3745
3798
  id: string;
@@ -3761,7 +3814,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3761
3814
  image?: string | null | undefined;
3762
3815
  };
3763
3816
  };
3764
- }>)[];
3817
+ }>>[];
3765
3818
  }, {
3766
3819
  deleted: boolean;
3767
3820
  }>;
@@ -3771,7 +3824,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3771
3824
  page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
3772
3825
  size: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
3773
3826
  }, z.core.$loose>;
3774
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
3827
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
3775
3828
  session: {
3776
3829
  session: Record<string, any> & {
3777
3830
  id: string;
@@ -3793,7 +3846,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3793
3846
  image?: string | null | undefined;
3794
3847
  };
3795
3848
  };
3796
- }>)[];
3849
+ }>>[];
3797
3850
  }, {
3798
3851
  data?: {
3799
3852
  created_at?: string;
@@ -3830,7 +3883,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3830
3883
  home_currency_amount_actual?: string | null;
3831
3884
  exchange_rate_at_creation?: string | null;
3832
3885
  consumer_message?: string | null;
3833
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
3886
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
3834
3887
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
3835
3888
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
3836
3889
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -3910,7 +3963,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3910
3963
  }>;
3911
3964
  adminGetInvoice: better_auth.StrictEndpoint<"/admin/streampay/invoices/:id", {
3912
3965
  method: "GET";
3913
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
3966
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
3914
3967
  session: {
3915
3968
  session: Record<string, any> & {
3916
3969
  id: string;
@@ -3932,7 +3985,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3932
3985
  image?: string | null | undefined;
3933
3986
  };
3934
3987
  };
3935
- }>)[];
3988
+ }>>[];
3936
3989
  }, {
3937
3990
  created_at?: string;
3938
3991
  updated_at?: string | null;
@@ -3968,7 +4021,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3968
4021
  home_currency_amount_actual?: string | null;
3969
4022
  exchange_rate_at_creation?: string | null;
3970
4023
  consumer_message?: string | null;
3971
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
4024
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
3972
4025
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
3973
4026
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
3974
4027
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -4229,7 +4282,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
4229
4282
  home_currency_amount_actual?: string | null;
4230
4283
  exchange_rate_at_creation?: string | null;
4231
4284
  consumer_message?: string | null;
4232
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
4285
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
4233
4286
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
4234
4287
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
4235
4288
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -4328,7 +4381,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
4328
4381
  size: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
4329
4382
  search_term: z.ZodOptional<z.ZodString>;
4330
4383
  }, z.core.$loose>;
4331
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
4384
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
4332
4385
  session: {
4333
4386
  session: Record<string, any> & {
4334
4387
  id: string;
@@ -4350,7 +4403,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
4350
4403
  image?: string | null | undefined;
4351
4404
  };
4352
4405
  };
4353
- }>)[];
4406
+ }>>[];
4354
4407
  }, {
4355
4408
  data?: {
4356
4409
  id?: string;
@@ -4401,7 +4454,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
4401
4454
  }>;
4402
4455
  adminGetConsumer: better_auth.StrictEndpoint<"/admin/streampay/consumers/:id", {
4403
4456
  method: "GET";
4404
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
4457
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
4405
4458
  session: {
4406
4459
  session: Record<string, any> & {
4407
4460
  id: string;
@@ -4423,7 +4476,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
4423
4476
  image?: string | null | undefined;
4424
4477
  };
4425
4478
  };
4426
- }>)[];
4479
+ }>>[];
4427
4480
  }, {
4428
4481
  id?: string;
4429
4482
  name?: string;
@@ -4505,7 +4558,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
4505
4558
  vat_number?: string | null;
4506
4559
  commercial_registration?: string | null;
4507
4560
  }>;
4508
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
4561
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
4509
4562
  session: {
4510
4563
  session: Record<string, any> & {
4511
4564
  id: string;
@@ -4527,7 +4580,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
4527
4580
  image?: string | null | undefined;
4528
4581
  };
4529
4582
  };
4530
- }>)[];
4583
+ }>>[];
4531
4584
  }, {
4532
4585
  id?: string;
4533
4586
  name?: string;
@@ -4569,7 +4622,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
4569
4622
  adminDeleteConsumer: better_auth.StrictEndpoint<"/admin/streampay/consumers/:id", {
4570
4623
  method: "DELETE";
4571
4624
  disableBody: true;
4572
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
4625
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
4573
4626
  session: {
4574
4627
  session: Record<string, any> & {
4575
4628
  id: string;
@@ -4591,7 +4644,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
4591
4644
  image?: string | null | undefined;
4592
4645
  };
4593
4646
  };
4594
- }>)[];
4647
+ }>>[];
4595
4648
  }, {
4596
4649
  deleted: boolean;
4597
4650
  }>;
@@ -4646,7 +4699,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
4646
4699
  currency: "SAR" | "USD" | "EUR" | "GBP" | "AED" | "BHD" | "KWD" | "OMR" | "QAR";
4647
4700
  trial: boolean;
4648
4701
  }>;
4649
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
4702
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
4650
4703
  session: {
4651
4704
  session: Record<string, any> & {
4652
4705
  id: string;
@@ -4668,7 +4721,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
4668
4721
  image?: string | null | undefined;
4669
4722
  };
4670
4723
  };
4671
- }>)[];
4724
+ }>>[];
4672
4725
  }, {
4673
4726
  created_at?: string;
4674
4727
  updated_at?: string | null;
@@ -4814,7 +4867,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
4814
4867
  home_currency_amount_actual?: string | null;
4815
4868
  exchange_rate_at_creation?: string | null;
4816
4869
  consumer_message?: string | null;
4817
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
4870
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
4818
4871
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
4819
4872
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
4820
4873
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -4931,7 +4984,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
4931
4984
  recurring_interval_count?: number | null;
4932
4985
  exclude_coupons_if_installments?: boolean | null;
4933
4986
  }>;
4934
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
4987
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
4935
4988
  session: {
4936
4989
  session: Record<string, any> & {
4937
4990
  id: string;
@@ -4953,7 +5006,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
4953
5006
  image?: string | null | undefined;
4954
5007
  };
4955
5008
  };
4956
- }>)[];
5009
+ }>>[];
4957
5010
  }, {
4958
5011
  created_at?: string;
4959
5012
  updated_at?: string | null;
@@ -5099,7 +5152,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
5099
5152
  home_currency_amount_actual?: string | null;
5100
5153
  exchange_rate_at_creation?: string | null;
5101
5154
  consumer_message?: string | null;
5102
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
5155
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
5103
5156
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
5104
5157
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
5105
5158
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -5177,7 +5230,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
5177
5230
  page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
5178
5231
  size: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
5179
5232
  }, z.core.$loose>;
5180
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
5233
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
5181
5234
  session: {
5182
5235
  session: Record<string, any> & {
5183
5236
  id: string;
@@ -5199,7 +5252,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
5199
5252
  image?: string | null | undefined;
5200
5253
  };
5201
5254
  };
5202
- }>)[];
5255
+ }>>[];
5203
5256
  }, {
5204
5257
  data?: {
5205
5258
  created_at?: string;
@@ -5346,7 +5399,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
5346
5399
  home_currency_amount_actual?: string | null;
5347
5400
  exchange_rate_at_creation?: string | null;
5348
5401
  consumer_message?: string | null;
5349
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
5402
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
5350
5403
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
5351
5404
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
5352
5405
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -5429,7 +5482,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
5429
5482
  }>;
5430
5483
  adminGetSubscription: better_auth.StrictEndpoint<"/admin/streampay/subscriptions/:id", {
5431
5484
  method: "GET";
5432
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
5485
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
5433
5486
  session: {
5434
5487
  session: Record<string, any> & {
5435
5488
  id: string;
@@ -5451,7 +5504,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
5451
5504
  image?: string | null | undefined;
5452
5505
  };
5453
5506
  };
5454
- }>)[];
5507
+ }>>[];
5455
5508
  }, {
5456
5509
  created_at?: string;
5457
5510
  updated_at?: string | null;
@@ -5597,7 +5650,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
5597
5650
  home_currency_amount_actual?: string | null;
5598
5651
  exchange_rate_at_creation?: string | null;
5599
5652
  consumer_message?: string | null;
5600
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
5653
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
5601
5654
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
5602
5655
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
5603
5656
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -5676,7 +5729,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
5676
5729
  }, {
5677
5730
  cancel_related_invoices: boolean;
5678
5731
  }>;
5679
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
5732
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
5680
5733
  session: {
5681
5734
  session: Record<string, any> & {
5682
5735
  id: string;
@@ -5698,7 +5751,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
5698
5751
  image?: string | null | undefined;
5699
5752
  };
5700
5753
  };
5701
- }>)[];
5754
+ }>>[];
5702
5755
  }, {
5703
5756
  created_at?: string;
5704
5757
  updated_at?: string | null;
@@ -5844,7 +5897,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
5844
5897
  home_currency_amount_actual?: string | null;
5845
5898
  exchange_rate_at_creation?: string | null;
5846
5899
  consumer_message?: string | null;
5847
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
5900
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
5848
5901
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
5849
5902
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
5850
5903
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -5927,7 +5980,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
5927
5980
  freeze_end_datetime?: string | null;
5928
5981
  notes?: string | null;
5929
5982
  }>;
5930
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
5983
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
5931
5984
  session: {
5932
5985
  session: Record<string, any> & {
5933
5986
  id: string;
@@ -5949,7 +6002,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
5949
6002
  image?: string | null | undefined;
5950
6003
  };
5951
6004
  };
5952
- }>)[];
6005
+ }>>[];
5953
6006
  }, {
5954
6007
  created_at?: string;
5955
6008
  updated_at?: string | null;
@@ -5963,7 +6016,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
5963
6016
  }>;
5964
6017
  adminListSubscriptionFreezes: better_auth.StrictEndpoint<"/admin/streampay/subscriptions/:id/freeze", {
5965
6018
  method: "GET";
5966
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
6019
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
5967
6020
  session: {
5968
6021
  session: Record<string, any> & {
5969
6022
  id: string;
@@ -5985,7 +6038,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
5985
6038
  image?: string | null | undefined;
5986
6039
  };
5987
6040
  };
5988
- }>)[];
6041
+ }>>[];
5989
6042
  }, {
5990
6043
  data?: {
5991
6044
  created_at?: string;
@@ -6018,7 +6071,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
6018
6071
  freeze_end_datetime: string | null;
6019
6072
  notes?: string | null;
6020
6073
  }>;
6021
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
6074
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
6022
6075
  session: {
6023
6076
  session: Record<string, any> & {
6024
6077
  id: string;
@@ -6040,7 +6093,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
6040
6093
  image?: string | null | undefined;
6041
6094
  };
6042
6095
  };
6043
- }>)[];
6096
+ }>>[];
6044
6097
  }, {
6045
6098
  created_at?: string;
6046
6099
  updated_at?: string | null;
@@ -6055,7 +6108,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
6055
6108
  adminDeleteSubscriptionFreeze: better_auth.StrictEndpoint<"/admin/streampay/subscriptions/:id/freeze/:freezeId", {
6056
6109
  method: "DELETE";
6057
6110
  disableBody: true;
6058
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
6111
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
6059
6112
  session: {
6060
6113
  session: Record<string, any> & {
6061
6114
  id: string;
@@ -6077,7 +6130,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
6077
6130
  image?: string | null | undefined;
6078
6131
  };
6079
6132
  };
6080
- }>)[];
6133
+ }>>[];
6081
6134
  }, {
6082
6135
  deleted: boolean;
6083
6136
  }>;
@@ -6092,7 +6145,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
6092
6145
  refund_note?: string | null;
6093
6146
  allow_refund_multiple_related_payments: boolean;
6094
6147
  }>;
6095
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
6148
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
6096
6149
  session: {
6097
6150
  session: Record<string, any> & {
6098
6151
  id: string;
@@ -6114,7 +6167,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
6114
6167
  image?: string | null | undefined;
6115
6168
  };
6116
6169
  };
6117
- }>)[];
6170
+ }>>[];
6118
6171
  }, {
6119
6172
  id?: string;
6120
6173
  amount?: string;
@@ -6137,7 +6190,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
6137
6190
  size: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
6138
6191
  invoice_id: z.ZodOptional<z.ZodString>;
6139
6192
  }, z.core.$loose>;
6140
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
6193
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
6141
6194
  session: {
6142
6195
  session: Record<string, any> & {
6143
6196
  id: string;
@@ -6159,7 +6212,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
6159
6212
  image?: string | null | undefined;
6160
6213
  };
6161
6214
  };
6162
- }>)[];
6215
+ }>>[];
6163
6216
  }, {
6164
6217
  data?: {
6165
6218
  id?: string;
@@ -6187,7 +6240,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
6187
6240
  }>;
6188
6241
  adminGetPayment: better_auth.StrictEndpoint<"/admin/streampay/payments/:id", {
6189
6242
  method: "GET";
6190
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
6243
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
6191
6244
  session: {
6192
6245
  session: Record<string, any> & {
6193
6246
  id: string;
@@ -6209,7 +6262,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
6209
6262
  image?: string | null | undefined;
6210
6263
  };
6211
6264
  };
6212
- }>)[];
6265
+ }>>[];
6213
6266
  }, {
6214
6267
  id?: string;
6215
6268
  amount?: string;
@@ -6337,12 +6390,46 @@ declare const checkout: (checkoutOptions?: CheckoutOptions) => (options: StreamP
6337
6390
 
6338
6391
  interface PortalOptions {
6339
6392
  pageSize?: number;
6393
+ /** Server-side bridge for Stream's hosted portal API, which SDK 1.1.3 does not expose. */
6394
+ createSession?: (input: {
6395
+ organization_consumer_id: string;
6396
+ }) => Promise<{
6397
+ url: string;
6398
+ }>;
6340
6399
  }
6341
- declare const portal: ({ pageSize }?: PortalOptions) => (options: StreamPayOptions) => {
6400
+ declare const portal: ({ pageSize, createSession }?: PortalOptions) => (options: StreamPayOptions) => {
6342
6401
  endpoints: {
6402
+ portalSession: better_auth.StrictEndpoint<"/consumer/portal/session", {
6403
+ method: "POST";
6404
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
6405
+ session: {
6406
+ session: Record<string, any> & {
6407
+ id: string;
6408
+ createdAt: Date;
6409
+ updatedAt: Date;
6410
+ userId: string;
6411
+ expiresAt: Date;
6412
+ token: string;
6413
+ ipAddress?: string | null | undefined;
6414
+ userAgent?: string | null | undefined;
6415
+ };
6416
+ user: Record<string, any> & {
6417
+ id: string;
6418
+ createdAt: Date;
6419
+ updatedAt: Date;
6420
+ email: string;
6421
+ emailVerified: boolean;
6422
+ name: string;
6423
+ image?: string | null | undefined;
6424
+ };
6425
+ };
6426
+ }>>[];
6427
+ }, {
6428
+ url: string;
6429
+ }>;
6343
6430
  state: better_auth.StrictEndpoint<"/consumer/state", {
6344
6431
  method: "GET";
6345
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
6432
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
6346
6433
  session: {
6347
6434
  session: Record<string, any> & {
6348
6435
  id: string;
@@ -6364,7 +6451,7 @@ declare const portal: ({ pageSize }?: PortalOptions) => (options: StreamPayOptio
6364
6451
  image?: string | null | undefined;
6365
6452
  };
6366
6453
  };
6367
- }>)[];
6454
+ }>>[];
6368
6455
  }, {
6369
6456
  hasConsumer: boolean;
6370
6457
  consumer: null;
@@ -6411,7 +6498,7 @@ declare const portal: ({ pageSize }?: PortalOptions) => (options: StreamPayOptio
6411
6498
  }>;
6412
6499
  subscriptions: better_auth.StrictEndpoint<"/consumer/subscriptions/list", {
6413
6500
  method: "GET";
6414
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
6501
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
6415
6502
  session: {
6416
6503
  session: Record<string, any> & {
6417
6504
  id: string;
@@ -6433,8 +6520,15 @@ declare const portal: ({ pageSize }?: PortalOptions) => (options: StreamPayOptio
6433
6520
  image?: string | null | undefined;
6434
6521
  };
6435
6522
  };
6436
- }>)[];
6523
+ }>>[];
6524
+ query: z.ZodObject<{
6525
+ page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
6526
+ size: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
6527
+ }, z.core.$strip>;
6437
6528
  }, {
6529
+ hasConsumer: boolean;
6530
+ data: never[];
6531
+ } | {
6438
6532
  hasConsumer: boolean;
6439
6533
  data: {
6440
6534
  created_at?: string;
@@ -6581,7 +6675,7 @@ declare const portal: ({ pageSize }?: PortalOptions) => (options: StreamPayOptio
6581
6675
  home_currency_amount_actual?: string | null;
6582
6676
  exchange_rate_at_creation?: string | null;
6583
6677
  consumer_message?: string | null;
6584
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
6678
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
6585
6679
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
6586
6680
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
6587
6681
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -6653,10 +6747,18 @@ declare const portal: ({ pageSize }?: PortalOptions) => (options: StreamPayOptio
6653
6747
  readonly amount_in_smallest_unit?: number;
6654
6748
  readonly original_amount_in_smallest_unit?: number;
6655
6749
  }[];
6750
+ pagination: {
6751
+ total_count?: number;
6752
+ max_page?: number;
6753
+ current_page?: number;
6754
+ limit?: number;
6755
+ has_next_page?: boolean;
6756
+ has_previous_page?: boolean;
6757
+ } | undefined;
6656
6758
  }>;
6657
6759
  invoices: better_auth.StrictEndpoint<"/consumer/invoices/list", {
6658
6760
  method: "GET";
6659
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
6761
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
6660
6762
  session: {
6661
6763
  session: Record<string, any> & {
6662
6764
  id: string;
@@ -6678,8 +6780,15 @@ declare const portal: ({ pageSize }?: PortalOptions) => (options: StreamPayOptio
6678
6780
  image?: string | null | undefined;
6679
6781
  };
6680
6782
  };
6681
- }>)[];
6783
+ }>>[];
6784
+ query: z.ZodObject<{
6785
+ page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
6786
+ size: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
6787
+ }, z.core.$strip>;
6682
6788
  }, {
6789
+ hasConsumer: boolean;
6790
+ data: never[];
6791
+ } | {
6683
6792
  hasConsumer: boolean;
6684
6793
  data: {
6685
6794
  created_at?: string;
@@ -6716,7 +6825,7 @@ declare const portal: ({ pageSize }?: PortalOptions) => (options: StreamPayOptio
6716
6825
  home_currency_amount_actual?: string | null;
6717
6826
  exchange_rate_at_creation?: string | null;
6718
6827
  consumer_message?: string | null;
6719
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
6828
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
6720
6829
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
6721
6830
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
6722
6831
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -6785,6 +6894,14 @@ declare const portal: ({ pageSize }?: PortalOptions) => (options: StreamPayOptio
6785
6894
  remaining_amount_in_smallest_unit?: number | null;
6786
6895
  readonly paid_amount_in_smallest_unit?: number;
6787
6896
  }[];
6897
+ pagination: {
6898
+ total_count?: number;
6899
+ max_page?: number;
6900
+ current_page?: number;
6901
+ limit?: number;
6902
+ has_next_page?: boolean;
6903
+ has_previous_page?: boolean;
6904
+ } | undefined;
6788
6905
  }>;
6789
6906
  };
6790
6907
  };
@@ -6797,6 +6914,7 @@ interface WebhookHandlers {
6797
6914
  onPaymentFailed?: WebhookHandler<"PAYMENT_FAILED", "PAYMENT">;
6798
6915
  onPaymentCanceled?: WebhookHandler<"PAYMENT_CANCELED", "PAYMENT">;
6799
6916
  onPaymentRefunded?: WebhookHandler<"PAYMENT_REFUNDED", "PAYMENT">;
6917
+ onPaymentPartiallyRefunded?: WebhookHandler<"PAYMENT_PARTIALLY_REFUNDED", "PAYMENT">;
6800
6918
  onPaymentMarkedAsPaid?: WebhookHandler<"PAYMENT_MARKED_AS_PAID", "PAYMENT">;
6801
6919
  onInvoiceCreated?: WebhookHandler<"INVOICE_CREATED", "INVOICE">;
6802
6920
  onInvoiceSent?: WebhookHandler<"INVOICE_SENT", "INVOICE">;
@@ -6811,6 +6929,7 @@ interface WebhookHandlers {
6811
6929
  onSubscriptionCanceled?: WebhookHandler<"SUBSCRIPTION_CANCELED", "SUBSCRIPTION">;
6812
6930
  onSubscriptionFrozen?: WebhookHandler<"SUBSCRIPTION_FROZEN", "SUBSCRIPTION">;
6813
6931
  onSubscriptionCycleRenewalFailed?: WebhookHandler<"SUBSCRIPTION_CYCLE_RENEWAL_FAILED", "SUBSCRIPTION">;
6932
+ onSubscriptionCycleRenewedSuccessfully?: WebhookHandler<"SUBSCRIPTION_CYCLE_RENEWED_SUCCESSFULLY", "SUBSCRIPTION">;
6814
6933
  onSubscriptionCancelAtPeriodEnd?: WebhookHandler<"SUBSCRIPTION_CANCEL_AT_PERIOD_END", "SUBSCRIPTION">;
6815
6934
  onSubscriptionFreezeNow?: WebhookHandler<"SUBSCRIPTION_FREEZE_NOW", "SUBSCRIPTION">;
6816
6935
  onSubscriptionUnfreezeNow?: WebhookHandler<"SUBSCRIPTION_UNFREEZE_NOW", "SUBSCRIPTION">;
@@ -6828,8 +6947,11 @@ declare function dispatchWebhook(payload: StreamPayWebhookEnvelope, handlers: We
6828
6947
  interface WebhooksOptions extends WebhookHandlers {
6829
6948
  secret: string | readonly string[];
6830
6949
  toleranceSeconds?: number;
6950
+ /** Persist and deduplicate callback deliveries. Requires the webhook inbox migration. */
6951
+ deduplicate?: boolean;
6831
6952
  }
6832
6953
  declare const webhooks: (webhooksOptions: WebhooksOptions) => (_options: StreamPayOptions, registry?: StreamPayPluginRegistry) => {
6954
+ schema: {};
6833
6955
  endpoints: {
6834
6956
  streampayWebhooks: better_auth.StrictEndpoint<"/streampay/webhooks", {
6835
6957
  method: "POST";
@@ -6843,10 +6965,13 @@ declare const webhooks: (webhooksOptions: WebhooksOptions) => (_options: StreamP
6843
6965
  };
6844
6966
  };
6845
6967
 
6846
- type StreamPayListConsumersParams = PaginationParams & {
6968
+ type StreamPayPaginationParams = PaginationParams & {
6969
+ limit?: number;
6970
+ };
6971
+ type StreamPayListConsumersParams = StreamPayPaginationParams & {
6847
6972
  search_term?: string | null;
6848
6973
  };
6849
- type StreamPayListSubscriptionsParams = PaginationParams & {
6974
+ type StreamPayListSubscriptionsParams = StreamPayPaginationParams & {
6850
6975
  organization_consumer_id?: string | null;
6851
6976
  statuses?: string[];
6852
6977
  latest_invoice_is_paid?: boolean;
@@ -6864,7 +6989,7 @@ type StreamPayListSubscriptionsParams = PaginationParams & {
6864
6989
  sort_field?: string;
6865
6990
  sort_direction?: string;
6866
6991
  };
6867
- type StreamPayListInvoicesParams = PaginationParams & {
6992
+ type StreamPayListInvoicesParams = StreamPayPaginationParams & {
6868
6993
  organization_consumer_id?: string | null;
6869
6994
  subscription_id?: string | null;
6870
6995
  include_payments?: boolean;
@@ -6890,17 +7015,17 @@ interface StreamPayClient {
6890
7015
  updateConsumer(consumerId: string, input: ConsumerUpdate): Promise<ConsumerResponse>;
6891
7016
  deleteConsumer(consumerId: string): Promise<void>;
6892
7017
  createPaymentLink(input: CreatePaymentLinkDto): Promise<PaymentLinkDetailed>;
6893
- listPaymentLinks(params?: PaginationParams): Promise<PaymentLinkListResponse>;
7018
+ listPaymentLinks(params?: StreamPayPaginationParams): Promise<PaymentLinkListResponse>;
6894
7019
  getPaymentLink(paymentLinkId: string): Promise<PaymentLinkDetailed>;
6895
7020
  updatePaymentLinkStatus?(paymentLinkId: string, input: UpdatePaymentLinkStatusDto): Promise<PaymentLinkDetailed>;
6896
7021
  getPaymentUrl(link: PaymentLinkDetailed): string | null;
6897
7022
  createProduct(input: ProductCreate): Promise<ProductDto>;
6898
- listProducts(params?: PaginationParams): Promise<ProductListResponse>;
7023
+ listProducts(params?: StreamPayPaginationParams): Promise<ProductListResponse>;
6899
7024
  getProduct(productId: string): Promise<ProductDto>;
6900
7025
  updateProduct(productId: string, input: ProductUpdate): Promise<ProductDto>;
6901
7026
  deleteProduct(productId: string): Promise<void>;
6902
7027
  createCoupon(input: CouponCreate): Promise<CouponDetailed>;
6903
- listCoupons(params?: PaginationParams): Promise<CouponListResponse>;
7028
+ listCoupons(params?: StreamPayPaginationParams): Promise<CouponListResponse>;
6904
7029
  getCoupon(couponId: string): Promise<CouponDetailed>;
6905
7030
  updateCoupon(couponId: string, input: CouponUpdate): Promise<CouponDetailed>;
6906
7031
  deleteCoupon(couponId: string): Promise<void>;
@@ -6920,6 +7045,7 @@ interface StreamPayClient {
6920
7045
  listPayments(params?: {
6921
7046
  page?: number;
6922
7047
  size?: number;
7048
+ limit?: number;
6923
7049
  invoice_id?: string;
6924
7050
  }): Promise<PaymentListResponse>;
6925
7051
  getPayment(paymentId: string): Promise<PaymentResponse>;
@@ -6945,17 +7071,6 @@ interface StreamPayOptions {
6945
7071
  use: StreamPayPlugins;
6946
7072
  }
6947
7073
 
6948
- interface StreamPayLoggerContext {
6949
- context: {
6950
- logger: {
6951
- error: (message: string) => void;
6952
- warn: (message: string) => void;
6953
- info: (message: string) => void;
6954
- debug: (message: string) => void;
6955
- };
6956
- };
6957
- }
6958
-
6959
7074
  type StreamPayHookContext = StreamPayLoggerContext;
6960
7075
 
6961
7076
  declare const streampay: <O extends StreamPayOptions>(options: O) => {
@@ -6974,7 +7089,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
6974
7089
  page: zod.ZodOptional<zod.ZodCoercedNumber<unknown>>;
6975
7090
  size: zod.ZodOptional<zod.ZodCoercedNumber<unknown>>;
6976
7091
  }, zod_v4_core.$loose>;
6977
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7092
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
6978
7093
  session: {
6979
7094
  session: Record<string, any> & {
6980
7095
  id: string;
@@ -6996,7 +7111,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
6996
7111
  image?: string | null | undefined;
6997
7112
  };
6998
7113
  };
6999
- }>)[];
7114
+ }>>[];
7000
7115
  }, {
7001
7116
  items: WebhookEventRow[];
7002
7117
  total: number;
@@ -7005,7 +7120,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7005
7120
  }>;
7006
7121
  adminGetWebhookEvent: better_auth.StrictEndpoint<"/admin/streampay/webhook-events/:eventId", {
7007
7122
  method: "GET";
7008
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7123
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7009
7124
  session: {
7010
7125
  session: Record<string, any> & {
7011
7126
  id: string;
@@ -7027,12 +7142,12 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7027
7142
  image?: string | null | undefined;
7028
7143
  };
7029
7144
  };
7030
- }>)[];
7145
+ }>>[];
7031
7146
  }, {}>;
7032
7147
  adminReplayWebhookEvent: better_auth.StrictEndpoint<"/admin/streampay/webhook-events/:eventId/replay", {
7033
7148
  method: "POST";
7034
7149
  disableBody: true;
7035
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7150
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7036
7151
  session: {
7037
7152
  session: Record<string, any> & {
7038
7153
  id: string;
@@ -7054,7 +7169,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7054
7169
  image?: string | null | undefined;
7055
7170
  };
7056
7171
  };
7057
- }>)[];
7172
+ }>>[];
7058
7173
  }, {
7059
7174
  replayed: true;
7060
7175
  eventId: string;
@@ -7062,7 +7177,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7062
7177
  adminDiscardWebhookEvent: better_auth.StrictEndpoint<"/admin/streampay/webhook-events/:eventId", {
7063
7178
  method: "DELETE";
7064
7179
  disableBody: true;
7065
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7180
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7066
7181
  session: {
7067
7182
  session: Record<string, any> & {
7068
7183
  id: string;
@@ -7084,7 +7199,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7084
7199
  image?: string | null | undefined;
7085
7200
  };
7086
7201
  };
7087
- }>)[];
7202
+ }>>[];
7088
7203
  }, {
7089
7204
  discarded: boolean;
7090
7205
  eventId: string;
@@ -7095,7 +7210,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7095
7210
  page: zod.ZodOptional<zod.ZodCoercedNumber<unknown>>;
7096
7211
  size: zod.ZodOptional<zod.ZodCoercedNumber<unknown>>;
7097
7212
  }, zod_v4_core.$loose>;
7098
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7213
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7099
7214
  session: {
7100
7215
  session: Record<string, any> & {
7101
7216
  id: string;
@@ -7117,7 +7232,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7117
7232
  image?: string | null | undefined;
7118
7233
  };
7119
7234
  };
7120
- }>)[];
7235
+ }>>[];
7121
7236
  }, {
7122
7237
  data?: {
7123
7238
  created_at?: string;
@@ -7254,7 +7369,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7254
7369
  }>;
7255
7370
  adminGetPaymentLink: better_auth.StrictEndpoint<"/admin/streampay/payment-links/:id", {
7256
7371
  method: "GET";
7257
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7372
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7258
7373
  session: {
7259
7374
  session: Record<string, any> & {
7260
7375
  id: string;
@@ -7276,7 +7391,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7276
7391
  image?: string | null | undefined;
7277
7392
  };
7278
7393
  };
7279
- }>)[];
7394
+ }>>[];
7280
7395
  }, {
7281
7396
  created_at?: string;
7282
7397
  updated_at?: string | null;
@@ -7416,7 +7531,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7416
7531
  is_percentage: boolean;
7417
7532
  is_active: boolean;
7418
7533
  }>;
7419
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7534
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7420
7535
  session: {
7421
7536
  session: Record<string, any> & {
7422
7537
  id: string;
@@ -7438,7 +7553,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7438
7553
  image?: string | null | undefined;
7439
7554
  };
7440
7555
  };
7441
- }>)[];
7556
+ }>>[];
7442
7557
  }, {
7443
7558
  created_at?: string;
7444
7559
  updated_at?: string | null;
@@ -7456,7 +7571,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7456
7571
  page: zod.ZodOptional<zod.ZodCoercedNumber<unknown>>;
7457
7572
  size: zod.ZodOptional<zod.ZodCoercedNumber<unknown>>;
7458
7573
  }, zod_v4_core.$loose>;
7459
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7574
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7460
7575
  session: {
7461
7576
  session: Record<string, any> & {
7462
7577
  id: string;
@@ -7478,7 +7593,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7478
7593
  image?: string | null | undefined;
7479
7594
  };
7480
7595
  };
7481
- }>)[];
7596
+ }>>[];
7482
7597
  }, {
7483
7598
  data?: {
7484
7599
  created_at?: string;
@@ -7502,7 +7617,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7502
7617
  }>;
7503
7618
  adminGetCoupon: better_auth.StrictEndpoint<"/admin/streampay/coupons/:id", {
7504
7619
  method: "GET";
7505
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7620
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7506
7621
  session: {
7507
7622
  session: Record<string, any> & {
7508
7623
  id: string;
@@ -7524,7 +7639,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7524
7639
  image?: string | null | undefined;
7525
7640
  };
7526
7641
  };
7527
- }>)[];
7642
+ }>>[];
7528
7643
  }, {
7529
7644
  created_at?: string;
7530
7645
  updated_at?: string | null;
@@ -7551,7 +7666,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7551
7666
  is_percentage?: boolean | null;
7552
7667
  is_active?: boolean | null;
7553
7668
  }>;
7554
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7669
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7555
7670
  session: {
7556
7671
  session: Record<string, any> & {
7557
7672
  id: string;
@@ -7573,7 +7688,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7573
7688
  image?: string | null | undefined;
7574
7689
  };
7575
7690
  };
7576
- }>)[];
7691
+ }>>[];
7577
7692
  }, {
7578
7693
  created_at?: string;
7579
7694
  updated_at?: string | null;
@@ -7588,7 +7703,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7588
7703
  adminDeleteCoupon: better_auth.StrictEndpoint<"/admin/streampay/coupons/:id", {
7589
7704
  method: "DELETE";
7590
7705
  disableBody: true;
7591
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7706
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7592
7707
  session: {
7593
7708
  session: Record<string, any> & {
7594
7709
  id: string;
@@ -7610,7 +7725,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7610
7725
  image?: string | null | undefined;
7611
7726
  };
7612
7727
  };
7613
- }>)[];
7728
+ }>>[];
7614
7729
  }, {
7615
7730
  deleted: boolean;
7616
7731
  }>;
@@ -7649,7 +7764,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7649
7764
  is_price_exempt_from_vat?: boolean | null;
7650
7765
  is_price_inclusive_of_vat?: boolean | null;
7651
7766
  }>;
7652
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7767
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7653
7768
  session: {
7654
7769
  session: Record<string, any> & {
7655
7770
  id: string;
@@ -7671,7 +7786,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7671
7786
  image?: string | null | undefined;
7672
7787
  };
7673
7788
  };
7674
- }>)[];
7789
+ }>>[];
7675
7790
  }, {
7676
7791
  created_at?: string;
7677
7792
  updated_at?: string | null;
@@ -7707,7 +7822,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7707
7822
  page: zod.ZodOptional<zod.ZodCoercedNumber<unknown>>;
7708
7823
  size: zod.ZodOptional<zod.ZodCoercedNumber<unknown>>;
7709
7824
  }, zod_v4_core.$loose>;
7710
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7825
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7711
7826
  session: {
7712
7827
  session: Record<string, any> & {
7713
7828
  id: string;
@@ -7729,7 +7844,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7729
7844
  image?: string | null | undefined;
7730
7845
  };
7731
7846
  };
7732
- }>)[];
7847
+ }>>[];
7733
7848
  }, {
7734
7849
  data?: {
7735
7850
  created_at?: string;
@@ -7771,7 +7886,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7771
7886
  }>;
7772
7887
  adminGetProduct: better_auth.StrictEndpoint<"/admin/streampay/products/:id", {
7773
7888
  method: "GET";
7774
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7889
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7775
7890
  session: {
7776
7891
  session: Record<string, any> & {
7777
7892
  id: string;
@@ -7793,7 +7908,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7793
7908
  image?: string | null | undefined;
7794
7909
  };
7795
7910
  };
7796
- }>)[];
7911
+ }>>[];
7797
7912
  }, {
7798
7913
  created_at?: string;
7799
7914
  updated_at?: string | null;
@@ -7858,7 +7973,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7858
7973
  is_price_exempt_from_vat?: boolean | null;
7859
7974
  is_price_inclusive_of_vat?: boolean | null;
7860
7975
  }>;
7861
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7976
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7862
7977
  session: {
7863
7978
  session: Record<string, any> & {
7864
7979
  id: string;
@@ -7880,7 +7995,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7880
7995
  image?: string | null | undefined;
7881
7996
  };
7882
7997
  };
7883
- }>)[];
7998
+ }>>[];
7884
7999
  }, {
7885
8000
  created_at?: string;
7886
8001
  updated_at?: string | null;
@@ -7913,7 +8028,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7913
8028
  adminDeleteProduct: better_auth.StrictEndpoint<"/admin/streampay/products/:id", {
7914
8029
  method: "DELETE";
7915
8030
  disableBody: true;
7916
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
8031
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7917
8032
  session: {
7918
8033
  session: Record<string, any> & {
7919
8034
  id: string;
@@ -7935,7 +8050,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7935
8050
  image?: string | null | undefined;
7936
8051
  };
7937
8052
  };
7938
- }>)[];
8053
+ }>>[];
7939
8054
  }, {
7940
8055
  deleted: boolean;
7941
8056
  }>;
@@ -7945,7 +8060,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7945
8060
  page: zod.ZodOptional<zod.ZodCoercedNumber<unknown>>;
7946
8061
  size: zod.ZodOptional<zod.ZodCoercedNumber<unknown>>;
7947
8062
  }, zod_v4_core.$loose>;
7948
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
8063
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7949
8064
  session: {
7950
8065
  session: Record<string, any> & {
7951
8066
  id: string;
@@ -7967,7 +8082,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7967
8082
  image?: string | null | undefined;
7968
8083
  };
7969
8084
  };
7970
- }>)[];
8085
+ }>>[];
7971
8086
  }, {
7972
8087
  data?: {
7973
8088
  created_at?: string;
@@ -8004,7 +8119,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
8004
8119
  home_currency_amount_actual?: string | null;
8005
8120
  exchange_rate_at_creation?: string | null;
8006
8121
  consumer_message?: string | null;
8007
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
8122
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
8008
8123
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
8009
8124
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
8010
8125
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -8084,7 +8199,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
8084
8199
  }>;
8085
8200
  adminGetInvoice: better_auth.StrictEndpoint<"/admin/streampay/invoices/:id", {
8086
8201
  method: "GET";
8087
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
8202
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
8088
8203
  session: {
8089
8204
  session: Record<string, any> & {
8090
8205
  id: string;
@@ -8106,7 +8221,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
8106
8221
  image?: string | null | undefined;
8107
8222
  };
8108
8223
  };
8109
- }>)[];
8224
+ }>>[];
8110
8225
  }, {
8111
8226
  created_at?: string;
8112
8227
  updated_at?: string | null;
@@ -8142,7 +8257,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
8142
8257
  home_currency_amount_actual?: string | null;
8143
8258
  exchange_rate_at_creation?: string | null;
8144
8259
  consumer_message?: string | null;
8145
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
8260
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
8146
8261
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
8147
8262
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
8148
8263
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -8403,7 +8518,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
8403
8518
  home_currency_amount_actual?: string | null;
8404
8519
  exchange_rate_at_creation?: string | null;
8405
8520
  consumer_message?: string | null;
8406
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
8521
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
8407
8522
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
8408
8523
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
8409
8524
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -8502,7 +8617,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
8502
8617
  size: zod.ZodOptional<zod.ZodCoercedNumber<unknown>>;
8503
8618
  search_term: zod.ZodOptional<zod.ZodString>;
8504
8619
  }, zod_v4_core.$loose>;
8505
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
8620
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
8506
8621
  session: {
8507
8622
  session: Record<string, any> & {
8508
8623
  id: string;
@@ -8524,7 +8639,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
8524
8639
  image?: string | null | undefined;
8525
8640
  };
8526
8641
  };
8527
- }>)[];
8642
+ }>>[];
8528
8643
  }, {
8529
8644
  data?: {
8530
8645
  id?: string;
@@ -8575,7 +8690,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
8575
8690
  }>;
8576
8691
  adminGetConsumer: better_auth.StrictEndpoint<"/admin/streampay/consumers/:id", {
8577
8692
  method: "GET";
8578
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
8693
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
8579
8694
  session: {
8580
8695
  session: Record<string, any> & {
8581
8696
  id: string;
@@ -8597,7 +8712,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
8597
8712
  image?: string | null | undefined;
8598
8713
  };
8599
8714
  };
8600
- }>)[];
8715
+ }>>[];
8601
8716
  }, {
8602
8717
  id?: string;
8603
8718
  name?: string;
@@ -8679,7 +8794,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
8679
8794
  vat_number?: string | null;
8680
8795
  commercial_registration?: string | null;
8681
8796
  }>;
8682
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
8797
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
8683
8798
  session: {
8684
8799
  session: Record<string, any> & {
8685
8800
  id: string;
@@ -8701,7 +8816,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
8701
8816
  image?: string | null | undefined;
8702
8817
  };
8703
8818
  };
8704
- }>)[];
8819
+ }>>[];
8705
8820
  }, {
8706
8821
  id?: string;
8707
8822
  name?: string;
@@ -8743,7 +8858,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
8743
8858
  adminDeleteConsumer: better_auth.StrictEndpoint<"/admin/streampay/consumers/:id", {
8744
8859
  method: "DELETE";
8745
8860
  disableBody: true;
8746
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
8861
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
8747
8862
  session: {
8748
8863
  session: Record<string, any> & {
8749
8864
  id: string;
@@ -8765,7 +8880,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
8765
8880
  image?: string | null | undefined;
8766
8881
  };
8767
8882
  };
8768
- }>)[];
8883
+ }>>[];
8769
8884
  }, {
8770
8885
  deleted: boolean;
8771
8886
  }>;
@@ -8820,7 +8935,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
8820
8935
  currency: "SAR" | "USD" | "EUR" | "GBP" | "AED" | "BHD" | "KWD" | "OMR" | "QAR";
8821
8936
  trial: boolean;
8822
8937
  }>;
8823
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
8938
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
8824
8939
  session: {
8825
8940
  session: Record<string, any> & {
8826
8941
  id: string;
@@ -8842,7 +8957,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
8842
8957
  image?: string | null | undefined;
8843
8958
  };
8844
8959
  };
8845
- }>)[];
8960
+ }>>[];
8846
8961
  }, {
8847
8962
  created_at?: string;
8848
8963
  updated_at?: string | null;
@@ -8988,7 +9103,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
8988
9103
  home_currency_amount_actual?: string | null;
8989
9104
  exchange_rate_at_creation?: string | null;
8990
9105
  consumer_message?: string | null;
8991
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
9106
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
8992
9107
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
8993
9108
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
8994
9109
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -9105,7 +9220,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
9105
9220
  recurring_interval_count?: number | null;
9106
9221
  exclude_coupons_if_installments?: boolean | null;
9107
9222
  }>;
9108
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
9223
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
9109
9224
  session: {
9110
9225
  session: Record<string, any> & {
9111
9226
  id: string;
@@ -9127,7 +9242,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
9127
9242
  image?: string | null | undefined;
9128
9243
  };
9129
9244
  };
9130
- }>)[];
9245
+ }>>[];
9131
9246
  }, {
9132
9247
  created_at?: string;
9133
9248
  updated_at?: string | null;
@@ -9273,7 +9388,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
9273
9388
  home_currency_amount_actual?: string | null;
9274
9389
  exchange_rate_at_creation?: string | null;
9275
9390
  consumer_message?: string | null;
9276
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
9391
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
9277
9392
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
9278
9393
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
9279
9394
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -9351,7 +9466,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
9351
9466
  page: zod.ZodOptional<zod.ZodCoercedNumber<unknown>>;
9352
9467
  size: zod.ZodOptional<zod.ZodCoercedNumber<unknown>>;
9353
9468
  }, zod_v4_core.$loose>;
9354
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
9469
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
9355
9470
  session: {
9356
9471
  session: Record<string, any> & {
9357
9472
  id: string;
@@ -9373,7 +9488,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
9373
9488
  image?: string | null | undefined;
9374
9489
  };
9375
9490
  };
9376
- }>)[];
9491
+ }>>[];
9377
9492
  }, {
9378
9493
  data?: {
9379
9494
  created_at?: string;
@@ -9520,7 +9635,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
9520
9635
  home_currency_amount_actual?: string | null;
9521
9636
  exchange_rate_at_creation?: string | null;
9522
9637
  consumer_message?: string | null;
9523
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
9638
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
9524
9639
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
9525
9640
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
9526
9641
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -9603,7 +9718,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
9603
9718
  }>;
9604
9719
  adminGetSubscription: better_auth.StrictEndpoint<"/admin/streampay/subscriptions/:id", {
9605
9720
  method: "GET";
9606
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
9721
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
9607
9722
  session: {
9608
9723
  session: Record<string, any> & {
9609
9724
  id: string;
@@ -9625,7 +9740,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
9625
9740
  image?: string | null | undefined;
9626
9741
  };
9627
9742
  };
9628
- }>)[];
9743
+ }>>[];
9629
9744
  }, {
9630
9745
  created_at?: string;
9631
9746
  updated_at?: string | null;
@@ -9771,7 +9886,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
9771
9886
  home_currency_amount_actual?: string | null;
9772
9887
  exchange_rate_at_creation?: string | null;
9773
9888
  consumer_message?: string | null;
9774
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
9889
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
9775
9890
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
9776
9891
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
9777
9892
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -9850,7 +9965,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
9850
9965
  }, {
9851
9966
  cancel_related_invoices: boolean;
9852
9967
  }>;
9853
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
9968
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
9854
9969
  session: {
9855
9970
  session: Record<string, any> & {
9856
9971
  id: string;
@@ -9872,7 +9987,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
9872
9987
  image?: string | null | undefined;
9873
9988
  };
9874
9989
  };
9875
- }>)[];
9990
+ }>>[];
9876
9991
  }, {
9877
9992
  created_at?: string;
9878
9993
  updated_at?: string | null;
@@ -10018,7 +10133,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10018
10133
  home_currency_amount_actual?: string | null;
10019
10134
  exchange_rate_at_creation?: string | null;
10020
10135
  consumer_message?: string | null;
10021
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
10136
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
10022
10137
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
10023
10138
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
10024
10139
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -10101,7 +10216,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10101
10216
  freeze_end_datetime?: string | null;
10102
10217
  notes?: string | null;
10103
10218
  }>;
10104
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
10219
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
10105
10220
  session: {
10106
10221
  session: Record<string, any> & {
10107
10222
  id: string;
@@ -10123,7 +10238,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10123
10238
  image?: string | null | undefined;
10124
10239
  };
10125
10240
  };
10126
- }>)[];
10241
+ }>>[];
10127
10242
  }, {
10128
10243
  created_at?: string;
10129
10244
  updated_at?: string | null;
@@ -10137,7 +10252,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10137
10252
  }>;
10138
10253
  adminListSubscriptionFreezes: better_auth.StrictEndpoint<"/admin/streampay/subscriptions/:id/freeze", {
10139
10254
  method: "GET";
10140
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
10255
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
10141
10256
  session: {
10142
10257
  session: Record<string, any> & {
10143
10258
  id: string;
@@ -10159,7 +10274,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10159
10274
  image?: string | null | undefined;
10160
10275
  };
10161
10276
  };
10162
- }>)[];
10277
+ }>>[];
10163
10278
  }, {
10164
10279
  data?: {
10165
10280
  created_at?: string;
@@ -10192,7 +10307,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10192
10307
  freeze_end_datetime: string | null;
10193
10308
  notes?: string | null;
10194
10309
  }>;
10195
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
10310
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
10196
10311
  session: {
10197
10312
  session: Record<string, any> & {
10198
10313
  id: string;
@@ -10214,7 +10329,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10214
10329
  image?: string | null | undefined;
10215
10330
  };
10216
10331
  };
10217
- }>)[];
10332
+ }>>[];
10218
10333
  }, {
10219
10334
  created_at?: string;
10220
10335
  updated_at?: string | null;
@@ -10229,7 +10344,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10229
10344
  adminDeleteSubscriptionFreeze: better_auth.StrictEndpoint<"/admin/streampay/subscriptions/:id/freeze/:freezeId", {
10230
10345
  method: "DELETE";
10231
10346
  disableBody: true;
10232
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
10347
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
10233
10348
  session: {
10234
10349
  session: Record<string, any> & {
10235
10350
  id: string;
@@ -10251,7 +10366,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10251
10366
  image?: string | null | undefined;
10252
10367
  };
10253
10368
  };
10254
- }>)[];
10369
+ }>>[];
10255
10370
  }, {
10256
10371
  deleted: boolean;
10257
10372
  }>;
@@ -10266,7 +10381,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10266
10381
  refund_note?: string | null;
10267
10382
  allow_refund_multiple_related_payments: boolean;
10268
10383
  }>;
10269
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
10384
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
10270
10385
  session: {
10271
10386
  session: Record<string, any> & {
10272
10387
  id: string;
@@ -10288,7 +10403,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10288
10403
  image?: string | null | undefined;
10289
10404
  };
10290
10405
  };
10291
- }>)[];
10406
+ }>>[];
10292
10407
  }, {
10293
10408
  id?: string;
10294
10409
  amount?: string;
@@ -10311,7 +10426,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10311
10426
  size: zod.ZodOptional<zod.ZodCoercedNumber<unknown>>;
10312
10427
  invoice_id: zod.ZodOptional<zod.ZodString>;
10313
10428
  }, zod_v4_core.$loose>;
10314
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
10429
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
10315
10430
  session: {
10316
10431
  session: Record<string, any> & {
10317
10432
  id: string;
@@ -10333,7 +10448,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10333
10448
  image?: string | null | undefined;
10334
10449
  };
10335
10450
  };
10336
- }>)[];
10451
+ }>>[];
10337
10452
  }, {
10338
10453
  data?: {
10339
10454
  id?: string;
@@ -10361,7 +10476,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10361
10476
  }>;
10362
10477
  adminGetPayment: better_auth.StrictEndpoint<"/admin/streampay/payments/:id", {
10363
10478
  method: "GET";
10364
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
10479
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
10365
10480
  session: {
10366
10481
  session: Record<string, any> & {
10367
10482
  id: string;
@@ -10383,7 +10498,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10383
10498
  image?: string | null | undefined;
10384
10499
  };
10385
10500
  };
10386
- }>)[];
10501
+ }>>[];
10387
10502
  }, {
10388
10503
  id?: string;
10389
10504
  amount?: string;
@@ -10425,9 +10540,37 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10425
10540
  redirect: boolean;
10426
10541
  }>;
10427
10542
  } & {
10543
+ portalSession: better_auth.StrictEndpoint<"/consumer/portal/session", {
10544
+ method: "POST";
10545
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
10546
+ session: {
10547
+ session: Record<string, any> & {
10548
+ id: string;
10549
+ createdAt: Date;
10550
+ updatedAt: Date;
10551
+ userId: string;
10552
+ expiresAt: Date;
10553
+ token: string;
10554
+ ipAddress?: string | null | undefined;
10555
+ userAgent?: string | null | undefined;
10556
+ };
10557
+ user: Record<string, any> & {
10558
+ id: string;
10559
+ createdAt: Date;
10560
+ updatedAt: Date;
10561
+ email: string;
10562
+ emailVerified: boolean;
10563
+ name: string;
10564
+ image?: string | null | undefined;
10565
+ };
10566
+ };
10567
+ }>>[];
10568
+ }, {
10569
+ url: string;
10570
+ }>;
10428
10571
  state: better_auth.StrictEndpoint<"/consumer/state", {
10429
10572
  method: "GET";
10430
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
10573
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
10431
10574
  session: {
10432
10575
  session: Record<string, any> & {
10433
10576
  id: string;
@@ -10449,7 +10592,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10449
10592
  image?: string | null | undefined;
10450
10593
  };
10451
10594
  };
10452
- }>)[];
10595
+ }>>[];
10453
10596
  }, {
10454
10597
  hasConsumer: boolean;
10455
10598
  consumer: null;
@@ -10496,7 +10639,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10496
10639
  }>;
10497
10640
  subscriptions: better_auth.StrictEndpoint<"/consumer/subscriptions/list", {
10498
10641
  method: "GET";
10499
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
10642
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
10500
10643
  session: {
10501
10644
  session: Record<string, any> & {
10502
10645
  id: string;
@@ -10518,8 +10661,15 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10518
10661
  image?: string | null | undefined;
10519
10662
  };
10520
10663
  };
10521
- }>)[];
10664
+ }>>[];
10665
+ query: zod.ZodObject<{
10666
+ page: zod.ZodOptional<zod.ZodCoercedNumber<unknown>>;
10667
+ size: zod.ZodOptional<zod.ZodCoercedNumber<unknown>>;
10668
+ }, zod_v4_core.$strip>;
10522
10669
  }, {
10670
+ hasConsumer: boolean;
10671
+ data: never[];
10672
+ } | {
10523
10673
  hasConsumer: boolean;
10524
10674
  data: {
10525
10675
  created_at?: string;
@@ -10666,7 +10816,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10666
10816
  home_currency_amount_actual?: string | null;
10667
10817
  exchange_rate_at_creation?: string | null;
10668
10818
  consumer_message?: string | null;
10669
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
10819
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
10670
10820
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
10671
10821
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
10672
10822
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -10738,10 +10888,18 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10738
10888
  readonly amount_in_smallest_unit?: number;
10739
10889
  readonly original_amount_in_smallest_unit?: number;
10740
10890
  }[];
10891
+ pagination: {
10892
+ total_count?: number;
10893
+ max_page?: number;
10894
+ current_page?: number;
10895
+ limit?: number;
10896
+ has_next_page?: boolean;
10897
+ has_previous_page?: boolean;
10898
+ } | undefined;
10741
10899
  }>;
10742
10900
  invoices: better_auth.StrictEndpoint<"/consumer/invoices/list", {
10743
10901
  method: "GET";
10744
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
10902
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
10745
10903
  session: {
10746
10904
  session: Record<string, any> & {
10747
10905
  id: string;
@@ -10763,8 +10921,15 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10763
10921
  image?: string | null | undefined;
10764
10922
  };
10765
10923
  };
10766
- }>)[];
10924
+ }>>[];
10925
+ query: zod.ZodObject<{
10926
+ page: zod.ZodOptional<zod.ZodCoercedNumber<unknown>>;
10927
+ size: zod.ZodOptional<zod.ZodCoercedNumber<unknown>>;
10928
+ }, zod_v4_core.$strip>;
10767
10929
  }, {
10930
+ hasConsumer: boolean;
10931
+ data: never[];
10932
+ } | {
10768
10933
  hasConsumer: boolean;
10769
10934
  data: {
10770
10935
  created_at?: string;
@@ -10801,7 +10966,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10801
10966
  home_currency_amount_actual?: string | null;
10802
10967
  exchange_rate_at_creation?: string | null;
10803
10968
  consumer_message?: string | null;
10804
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
10969
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
10805
10970
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
10806
10971
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
10807
10972
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -10870,6 +11035,14 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10870
11035
  remaining_amount_in_smallest_unit?: number | null;
10871
11036
  readonly paid_amount_in_smallest_unit?: number;
10872
11037
  }[];
11038
+ pagination: {
11039
+ total_count?: number;
11040
+ max_page?: number;
11041
+ current_page?: number;
11042
+ limit?: number;
11043
+ has_next_page?: boolean;
11044
+ has_previous_page?: boolean;
11045
+ } | undefined;
10873
11046
  }>;
10874
11047
  } & {
10875
11048
  upgradeSubscription: better_auth.StrictEndpoint<"/subscription/upgrade", {
@@ -10886,7 +11059,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10886
11059
  successUrl: zod.ZodOptional<zod.ZodString>;
10887
11060
  failureUrl: zod.ZodOptional<zod.ZodString>;
10888
11061
  }, zod_v4_core.$strict>;
10889
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
11062
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
10890
11063
  session: {
10891
11064
  session: Record<string, any> & {
10892
11065
  id: string;
@@ -10908,7 +11081,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10908
11081
  image?: string | null | undefined;
10909
11082
  };
10910
11083
  };
10911
- }>)[];
11084
+ }>>[];
10912
11085
  }, {
10913
11086
  subscriptionId: string;
10914
11087
  url: string;
@@ -10923,7 +11096,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10923
11096
  query: zod.ZodObject<{
10924
11097
  subscriptionId: zod.ZodString;
10925
11098
  }, zod_v4_core.$strip>;
10926
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
11099
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
10927
11100
  session: {
10928
11101
  session: Record<string, any> & {
10929
11102
  id: string;
@@ -10945,9 +11118,9 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10945
11118
  image?: string | null | undefined;
10946
11119
  };
10947
11120
  };
10948
- }>)[];
11121
+ }>>[];
10949
11122
  }, {
10950
- subscription: Subscription;
11123
+ subscription: Subscription | null;
10951
11124
  synced: boolean;
10952
11125
  }>;
10953
11126
  cancelSubscription: better_auth.StrictEndpoint<"/subscription/cancel", {
@@ -10957,7 +11130,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10957
11130
  cancelRelatedInvoices: zod.ZodOptional<zod.ZodBoolean>;
10958
11131
  cancelAtPeriodEnd: zod.ZodOptional<zod.ZodBoolean>;
10959
11132
  }, zod_v4_core.$strip>;
10960
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
11133
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
10961
11134
  session: {
10962
11135
  session: Record<string, any> & {
10963
11136
  id: string;
@@ -10979,7 +11152,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10979
11152
  image?: string | null | undefined;
10980
11153
  };
10981
11154
  };
10982
- }>)[];
11155
+ }>>[];
10983
11156
  }, {
10984
11157
  created_at?: string;
10985
11158
  updated_at?: string | null;
@@ -11125,7 +11298,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
11125
11298
  home_currency_amount_actual?: string | null;
11126
11299
  exchange_rate_at_creation?: string | null;
11127
11300
  consumer_message?: string | null;
11128
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
11301
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
11129
11302
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
11130
11303
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
11131
11304
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -11204,7 +11377,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
11204
11377
  plan: zod.ZodString;
11205
11378
  seats: zod.ZodOptional<zod.ZodNumber>;
11206
11379
  }, zod_v4_core.$strict>;
11207
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
11380
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
11208
11381
  session: {
11209
11382
  session: Record<string, any> & {
11210
11383
  id: string;
@@ -11226,7 +11399,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
11226
11399
  image?: string | null | undefined;
11227
11400
  };
11228
11401
  };
11229
- }>)[];
11402
+ }>>[];
11230
11403
  }, {
11231
11404
  mode: string;
11232
11405
  subscriptionId: string;
@@ -11459,7 +11632,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
11459
11632
  home_currency_amount_actual?: string | null;
11460
11633
  exchange_rate_at_creation?: string | null;
11461
11634
  consumer_message?: string | null;
11462
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
11635
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
11463
11636
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
11464
11637
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
11465
11638
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -11539,7 +11712,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
11539
11712
  subscriptionId: zod.ZodString;
11540
11713
  seats: zod.ZodNumber;
11541
11714
  }, zod_v4_core.$strict>;
11542
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
11715
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
11543
11716
  session: {
11544
11717
  session: Record<string, any> & {
11545
11718
  id: string;
@@ -11561,7 +11734,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
11561
11734
  image?: string | null | undefined;
11562
11735
  };
11563
11736
  };
11564
- }>)[];
11737
+ }>>[];
11565
11738
  }, {
11566
11739
  mode: string;
11567
11740
  subscriptionId: string;
@@ -11799,7 +11972,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
11799
11972
  home_currency_amount_actual?: string | null;
11800
11973
  exchange_rate_at_creation?: string | null;
11801
11974
  consumer_message?: string | null;
11802
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
11975
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
11803
11976
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
11804
11977
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
11805
11978
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -11878,7 +12051,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
11878
12051
  body: zod.ZodObject<{
11879
12052
  subscriptionId: zod.ZodString;
11880
12053
  }, zod_v4_core.$strip>;
11881
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
12054
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
11882
12055
  session: {
11883
12056
  session: Record<string, any> & {
11884
12057
  id: string;
@@ -11900,7 +12073,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
11900
12073
  image?: string | null | undefined;
11901
12074
  };
11902
12075
  };
11903
- }>)[];
12076
+ }>>[];
11904
12077
  }, {
11905
12078
  canceled: boolean;
11906
12079
  reused: boolean;
@@ -12049,7 +12222,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
12049
12222
  home_currency_amount_actual?: string | null;
12050
12223
  exchange_rate_at_creation?: string | null;
12051
12224
  consumer_message?: string | null;
12052
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
12225
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
12053
12226
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
12054
12227
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
12055
12228
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -12127,7 +12300,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
12127
12300
  body: zod.ZodObject<{
12128
12301
  subscriptionId: zod.ZodString;
12129
12302
  }, zod_v4_core.$strip>;
12130
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
12303
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
12131
12304
  session: {
12132
12305
  session: Record<string, any> & {
12133
12306
  id: string;
@@ -12149,7 +12322,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
12149
12322
  image?: string | null | undefined;
12150
12323
  };
12151
12324
  };
12152
- }>)[];
12325
+ }>>[];
12153
12326
  }, {
12154
12327
  canceled: boolean;
12155
12328
  reused: boolean;
@@ -12298,7 +12471,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
12298
12471
  home_currency_amount_actual?: string | null;
12299
12472
  exchange_rate_at_creation?: string | null;
12300
12473
  consumer_message?: string | null;
12301
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
12474
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
12302
12475
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
12303
12476
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
12304
12477
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -12376,7 +12549,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
12376
12549
  body: zod.ZodObject<{
12377
12550
  subscriptionId: zod.ZodString;
12378
12551
  }, zod_v4_core.$strip>;
12379
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
12552
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
12380
12553
  session: {
12381
12554
  session: Record<string, any> & {
12382
12555
  id: string;
@@ -12398,7 +12571,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
12398
12571
  image?: string | null | undefined;
12399
12572
  };
12400
12573
  };
12401
- }>)[];
12574
+ }>>[];
12402
12575
  }, {
12403
12576
  uncanceled: boolean;
12404
12577
  subscription: {
@@ -12546,7 +12719,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
12546
12719
  home_currency_amount_actual?: string | null;
12547
12720
  exchange_rate_at_creation?: string | null;
12548
12721
  consumer_message?: string | null;
12549
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
12722
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
12550
12723
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
12551
12724
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
12552
12725
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -12627,7 +12800,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
12627
12800
  freezeEndDatetime: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
12628
12801
  notes: zod.ZodOptional<zod.ZodString>;
12629
12802
  }, zod_v4_core.$strip>;
12630
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
12803
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
12631
12804
  session: {
12632
12805
  session: Record<string, any> & {
12633
12806
  id: string;
@@ -12649,7 +12822,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
12649
12822
  image?: string | null | undefined;
12650
12823
  };
12651
12824
  };
12652
- }>)[];
12825
+ }>>[];
12653
12826
  }, {
12654
12827
  created_at?: string;
12655
12828
  updated_at?: string | null;
@@ -12666,7 +12839,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
12666
12839
  body: zod.ZodObject<{
12667
12840
  subscriptionId: zod.ZodString;
12668
12841
  }, zod_v4_core.$strip>;
12669
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
12842
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
12670
12843
  session: {
12671
12844
  session: Record<string, any> & {
12672
12845
  id: string;
@@ -12688,7 +12861,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
12688
12861
  image?: string | null | undefined;
12689
12862
  };
12690
12863
  };
12691
- }>)[];
12864
+ }>>[];
12692
12865
  }, {
12693
12866
  unfrozen: boolean;
12694
12867
  }>;
@@ -12698,7 +12871,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
12698
12871
  subscriptionId: zod.ZodString;
12699
12872
  freezeId: zod.ZodString;
12700
12873
  }, zod_v4_core.$strip>;
12701
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
12874
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
12702
12875
  session: {
12703
12876
  session: Record<string, any> & {
12704
12877
  id: string;
@@ -12720,7 +12893,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
12720
12893
  image?: string | null | undefined;
12721
12894
  };
12722
12895
  };
12723
- }>)[];
12896
+ }>>[];
12724
12897
  }, {
12725
12898
  canceled: boolean;
12726
12899
  freezeId: string;
@@ -12736,7 +12909,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
12736
12909
  organization: "organization";
12737
12910
  }>>;
12738
12911
  }, zod_v4_core.$strip>>;
12739
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
12912
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
12740
12913
  session: {
12741
12914
  session: Record<string, any> & {
12742
12915
  id: string;
@@ -12758,7 +12931,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
12758
12931
  image?: string | null | undefined;
12759
12932
  };
12760
12933
  };
12761
- }>)[];
12934
+ }>>[];
12762
12935
  }, {
12763
12936
  seats: number;
12764
12937
  plan: StreamPayPlanLike | null;
@@ -12769,6 +12942,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
12769
12942
  streampaySubscriptionId: string | null;
12770
12943
  streampayConsumerId: string | null;
12771
12944
  streampayPaymentLinkId: string | null;
12945
+ catalogMapped?: boolean | null;
12772
12946
  planVersion: string | null;
12773
12947
  productId: string | null;
12774
12948
  group: string | null;
@@ -12783,6 +12957,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
12783
12957
  periodStart: Date | null;
12784
12958
  periodEnd: Date | null;
12785
12959
  currentCycleNumber: number | null;
12960
+ renewalCallbackEventId?: string | null;
12786
12961
  trialStart: Date | null;
12787
12962
  trialEnd: Date | null;
12788
12963
  cancelAtPeriodEnd: boolean;
@@ -12813,7 +12988,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
12813
12988
  organization: "organization";
12814
12989
  }>>;
12815
12990
  }, zod_v4_core.$strip>>;
12816
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
12991
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
12817
12992
  session: {
12818
12993
  session: Record<string, any> & {
12819
12994
  id: string;
@@ -12835,7 +13010,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
12835
13010
  image?: string | null | undefined;
12836
13011
  };
12837
13012
  };
12838
- }>)[];
13013
+ }>>[];
12839
13014
  }, {
12840
13015
  seats: number;
12841
13016
  plan: StreamPayPlanLike | null;
@@ -12846,6 +13021,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
12846
13021
  streampaySubscriptionId: string | null;
12847
13022
  streampayConsumerId: string | null;
12848
13023
  streampayPaymentLinkId: string | null;
13024
+ catalogMapped?: boolean | null;
12849
13025
  planVersion: string | null;
12850
13026
  productId: string | null;
12851
13027
  group: string | null;
@@ -12860,6 +13036,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
12860
13036
  periodStart: Date | null;
12861
13037
  periodEnd: Date | null;
12862
13038
  currentCycleNumber: number | null;
13039
+ renewalCallbackEventId?: string | null;
12863
13040
  trialStart: Date | null;
12864
13041
  trialEnd: Date | null;
12865
13042
  cancelAtPeriodEnd: boolean;
@@ -12891,7 +13068,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
12891
13068
  organization: "organization";
12892
13069
  }>>;
12893
13070
  }, zod_v4_core.$strip>;
12894
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
13071
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
12895
13072
  session: {
12896
13073
  session: Record<string, any> & {
12897
13074
  id: string;
@@ -12913,7 +13090,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
12913
13090
  image?: string | null | undefined;
12914
13091
  };
12915
13092
  };
12916
- }>)[];
13093
+ }>>[];
12917
13094
  }, {
12918
13095
  hasFeature: boolean;
12919
13096
  }>;
@@ -12930,7 +13107,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
12930
13107
  organization: "organization";
12931
13108
  }>>;
12932
13109
  }, zod_v4_core.$strip>;
12933
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
13110
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
12934
13111
  session: {
12935
13112
  session: Record<string, any> & {
12936
13113
  id: string;
@@ -12952,7 +13129,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
12952
13129
  image?: string | null | undefined;
12953
13130
  };
12954
13131
  };
12955
- }>)[];
13132
+ }>>[];
12956
13133
  }, {
12957
13134
  allowed: boolean;
12958
13135
  limit: number;