better-auth-streampay 2.2.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
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';
2
+ 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';
3
3
  import * as better_auth from 'better-auth';
4
4
  import { GenericEndpointContext, User, UnionToIntersection } from 'better-auth';
5
5
  import * as zod from 'zod';
@@ -74,6 +74,7 @@ declare const STREAMPAY_EVENT_ENTITY_TYPES: {
74
74
  readonly PAYMENT_FAILED: "PAYMENT";
75
75
  readonly PAYMENT_CANCELED: "PAYMENT";
76
76
  readonly PAYMENT_REFUNDED: "PAYMENT";
77
+ readonly PAYMENT_PARTIALLY_REFUNDED: "PAYMENT";
77
78
  readonly PAYMENT_MARKED_AS_PAID: "PAYMENT";
78
79
  readonly INVOICE_CREATED: "INVOICE";
79
80
  readonly INVOICE_SENT: "INVOICE";
@@ -88,6 +89,7 @@ declare const STREAMPAY_EVENT_ENTITY_TYPES: {
88
89
  readonly SUBSCRIPTION_CANCELED: "SUBSCRIPTION";
89
90
  readonly SUBSCRIPTION_FROZEN: "SUBSCRIPTION";
90
91
  readonly SUBSCRIPTION_CYCLE_RENEWAL_FAILED: "SUBSCRIPTION";
92
+ readonly SUBSCRIPTION_CYCLE_RENEWED_SUCCESSFULLY: "SUBSCRIPTION";
91
93
  readonly SUBSCRIPTION_CANCEL_AT_PERIOD_END: "SUBSCRIPTION";
92
94
  readonly SUBSCRIPTION_FREEZE_NOW: "SUBSCRIPTION";
93
95
  readonly SUBSCRIPTION_UNFREEZE_NOW: "SUBSCRIPTION";
@@ -194,6 +196,8 @@ interface Subscription {
194
196
  streampayConsumerId: string | null;
195
197
  streampayPaymentLinkId: string | null;
196
198
  plan: string;
199
+ /** False when Stream's effective products cannot be mapped to a configured plan. */
200
+ catalogMapped?: boolean | null;
197
201
  planVersion: string | null;
198
202
  productId: string | null;
199
203
  group: string | null;
@@ -210,6 +214,8 @@ interface Subscription {
210
214
  periodStart: Date | null;
211
215
  periodEnd: Date | null;
212
216
  currentCycleNumber: number | null;
217
+ /** Event that owns a projected cycle's pending renewal callback. */
218
+ renewalCallbackEventId?: string | null;
213
219
  trialStart: Date | null;
214
220
  trialEnd: Date | null;
215
221
  cancelAtPeriodEnd: boolean;
@@ -273,6 +279,11 @@ interface TrialEligibilityContext {
273
279
  declare function subscriptionSlotKey(referenceType: SubscriptionReferenceType, referenceId: string, group: string | null | undefined): string;
274
280
  interface SubscriptionsOptionsBase extends SubscriptionCallbacks {
275
281
  plans: PlansInput;
282
+ /** Paginated REST adapter for SDK versions that cannot pass freeze query parameters. */
283
+ listSubscriptionFreezes?: (subscriptionId: string, params: {
284
+ page: number;
285
+ limit: number;
286
+ }) => Promise<FreezeListResponse>;
276
287
  authorizeReference?: (data: AuthorizeReferenceContext, ctx: GenericEndpointContext) => boolean | Promise<boolean>;
277
288
  /** StreamPay makes the final trial decision even when this overrides local eligibility. */
278
289
  isTrialEligible?: (data: TrialEligibilityContext, ctx: GenericEndpointContext) => boolean | Promise<boolean>;
@@ -297,7 +308,7 @@ interface ResolvedPlans {
297
308
  type FeatureKey<P> = P extends {
298
309
  limits?: infer L;
299
310
  } ? L extends Record<string, unknown> ? Extract<keyof L, string> : string : string;
300
- declare function hasSubscriptionAccess(subscription: Pick<Subscription, "status">, accessStatuses?: readonly SubscriptionStatus[]): boolean;
311
+ declare function hasSubscriptionAccess(subscription: Pick<Subscription, "status" | "catalogMapped">, accessStatuses?: readonly SubscriptionStatus[]): boolean;
301
312
  declare function hasFeature<P extends StreamPayPlanLike>(subscription: Subscription, plan: P | undefined, feature: FeatureKey<P>, accessStatuses?: readonly SubscriptionStatus[]): boolean;
302
313
  interface LimitCheckResult {
303
314
  allowed: boolean;
@@ -411,6 +422,7 @@ interface StreamPayPluginRegistry {
411
422
  replayed: true;
412
423
  eventId: string;
413
424
  }>;
425
+ replayWebhookHandler?: NonNullable<StreamPayPluginRegistry["replayWebhookEvent"]>;
414
426
  }
415
427
  declare function subscriptions(subsOptions: SubscriptionsOptions): (options: StreamPayOptions, registry?: StreamPayPluginRegistry) => {
416
428
  endpoints: {
@@ -428,7 +440,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
428
440
  successUrl: zod.ZodOptional<zod.ZodString>;
429
441
  failureUrl: zod.ZodOptional<zod.ZodString>;
430
442
  }, zod_v4_core.$strict>;
431
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
443
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
432
444
  session: {
433
445
  session: Record<string, any> & {
434
446
  id: string;
@@ -450,7 +462,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
450
462
  image?: string | null | undefined;
451
463
  };
452
464
  };
453
- }>)[];
465
+ }>>[];
454
466
  }, {
455
467
  subscriptionId: string;
456
468
  url: string;
@@ -465,7 +477,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
465
477
  query: zod.ZodObject<{
466
478
  subscriptionId: zod.ZodString;
467
479
  }, zod_v4_core.$strip>;
468
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
480
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
469
481
  session: {
470
482
  session: Record<string, any> & {
471
483
  id: string;
@@ -487,9 +499,9 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
487
499
  image?: string | null | undefined;
488
500
  };
489
501
  };
490
- }>)[];
502
+ }>>[];
491
503
  }, {
492
- subscription: Subscription;
504
+ subscription: Subscription | null;
493
505
  synced: boolean;
494
506
  }>;
495
507
  cancelSubscription: better_auth.StrictEndpoint<"/subscription/cancel", {
@@ -499,7 +511,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
499
511
  cancelRelatedInvoices: zod.ZodOptional<zod.ZodBoolean>;
500
512
  cancelAtPeriodEnd: zod.ZodOptional<zod.ZodBoolean>;
501
513
  }, zod_v4_core.$strip>;
502
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
514
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
503
515
  session: {
504
516
  session: Record<string, any> & {
505
517
  id: string;
@@ -521,7 +533,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
521
533
  image?: string | null | undefined;
522
534
  };
523
535
  };
524
- }>)[];
536
+ }>>[];
525
537
  }, {
526
538
  created_at?: string;
527
539
  updated_at?: string | null;
@@ -667,7 +679,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
667
679
  home_currency_amount_actual?: string | null;
668
680
  exchange_rate_at_creation?: string | null;
669
681
  consumer_message?: string | null;
670
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
682
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
671
683
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
672
684
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
673
685
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -746,7 +758,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
746
758
  plan: zod.ZodString;
747
759
  seats: zod.ZodOptional<zod.ZodNumber>;
748
760
  }, zod_v4_core.$strict>;
749
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
761
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
750
762
  session: {
751
763
  session: Record<string, any> & {
752
764
  id: string;
@@ -768,7 +780,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
768
780
  image?: string | null | undefined;
769
781
  };
770
782
  };
771
- }>)[];
783
+ }>>[];
772
784
  }, {
773
785
  mode: string;
774
786
  subscriptionId: string;
@@ -1001,7 +1013,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
1001
1013
  home_currency_amount_actual?: string | null;
1002
1014
  exchange_rate_at_creation?: string | null;
1003
1015
  consumer_message?: string | null;
1004
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
1016
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
1005
1017
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
1006
1018
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
1007
1019
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -1081,7 +1093,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
1081
1093
  subscriptionId: zod.ZodString;
1082
1094
  seats: zod.ZodNumber;
1083
1095
  }, zod_v4_core.$strict>;
1084
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
1096
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
1085
1097
  session: {
1086
1098
  session: Record<string, any> & {
1087
1099
  id: string;
@@ -1103,7 +1115,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
1103
1115
  image?: string | null | undefined;
1104
1116
  };
1105
1117
  };
1106
- }>)[];
1118
+ }>>[];
1107
1119
  }, {
1108
1120
  mode: string;
1109
1121
  subscriptionId: string;
@@ -1341,7 +1353,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
1341
1353
  home_currency_amount_actual?: string | null;
1342
1354
  exchange_rate_at_creation?: string | null;
1343
1355
  consumer_message?: string | null;
1344
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
1356
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
1345
1357
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
1346
1358
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
1347
1359
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -1420,7 +1432,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
1420
1432
  body: zod.ZodObject<{
1421
1433
  subscriptionId: zod.ZodString;
1422
1434
  }, zod_v4_core.$strip>;
1423
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
1435
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
1424
1436
  session: {
1425
1437
  session: Record<string, any> & {
1426
1438
  id: string;
@@ -1442,7 +1454,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
1442
1454
  image?: string | null | undefined;
1443
1455
  };
1444
1456
  };
1445
- }>)[];
1457
+ }>>[];
1446
1458
  }, {
1447
1459
  canceled: boolean;
1448
1460
  reused: boolean;
@@ -1591,7 +1603,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
1591
1603
  home_currency_amount_actual?: string | null;
1592
1604
  exchange_rate_at_creation?: string | null;
1593
1605
  consumer_message?: string | null;
1594
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
1606
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
1595
1607
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
1596
1608
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
1597
1609
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -1669,7 +1681,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
1669
1681
  body: zod.ZodObject<{
1670
1682
  subscriptionId: zod.ZodString;
1671
1683
  }, zod_v4_core.$strip>;
1672
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
1684
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
1673
1685
  session: {
1674
1686
  session: Record<string, any> & {
1675
1687
  id: string;
@@ -1691,7 +1703,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
1691
1703
  image?: string | null | undefined;
1692
1704
  };
1693
1705
  };
1694
- }>)[];
1706
+ }>>[];
1695
1707
  }, {
1696
1708
  canceled: boolean;
1697
1709
  reused: boolean;
@@ -1840,7 +1852,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
1840
1852
  home_currency_amount_actual?: string | null;
1841
1853
  exchange_rate_at_creation?: string | null;
1842
1854
  consumer_message?: string | null;
1843
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
1855
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
1844
1856
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
1845
1857
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
1846
1858
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -1918,7 +1930,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
1918
1930
  body: zod.ZodObject<{
1919
1931
  subscriptionId: zod.ZodString;
1920
1932
  }, zod_v4_core.$strip>;
1921
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
1933
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
1922
1934
  session: {
1923
1935
  session: Record<string, any> & {
1924
1936
  id: string;
@@ -1940,7 +1952,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
1940
1952
  image?: string | null | undefined;
1941
1953
  };
1942
1954
  };
1943
- }>)[];
1955
+ }>>[];
1944
1956
  }, {
1945
1957
  uncanceled: boolean;
1946
1958
  subscription: {
@@ -2088,7 +2100,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
2088
2100
  home_currency_amount_actual?: string | null;
2089
2101
  exchange_rate_at_creation?: string | null;
2090
2102
  consumer_message?: string | null;
2091
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
2103
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
2092
2104
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
2093
2105
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
2094
2106
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -2169,7 +2181,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
2169
2181
  freezeEndDatetime: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
2170
2182
  notes: zod.ZodOptional<zod.ZodString>;
2171
2183
  }, zod_v4_core.$strip>;
2172
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
2184
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
2173
2185
  session: {
2174
2186
  session: Record<string, any> & {
2175
2187
  id: string;
@@ -2191,7 +2203,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
2191
2203
  image?: string | null | undefined;
2192
2204
  };
2193
2205
  };
2194
- }>)[];
2206
+ }>>[];
2195
2207
  }, {
2196
2208
  created_at?: string;
2197
2209
  updated_at?: string | null;
@@ -2208,7 +2220,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
2208
2220
  body: zod.ZodObject<{
2209
2221
  subscriptionId: zod.ZodString;
2210
2222
  }, zod_v4_core.$strip>;
2211
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
2223
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
2212
2224
  session: {
2213
2225
  session: Record<string, any> & {
2214
2226
  id: string;
@@ -2230,7 +2242,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
2230
2242
  image?: string | null | undefined;
2231
2243
  };
2232
2244
  };
2233
- }>)[];
2245
+ }>>[];
2234
2246
  }, {
2235
2247
  unfrozen: boolean;
2236
2248
  }>;
@@ -2240,7 +2252,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
2240
2252
  subscriptionId: zod.ZodString;
2241
2253
  freezeId: zod.ZodString;
2242
2254
  }, zod_v4_core.$strip>;
2243
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
2255
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
2244
2256
  session: {
2245
2257
  session: Record<string, any> & {
2246
2258
  id: string;
@@ -2262,7 +2274,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
2262
2274
  image?: string | null | undefined;
2263
2275
  };
2264
2276
  };
2265
- }>)[];
2277
+ }>>[];
2266
2278
  }, {
2267
2279
  canceled: boolean;
2268
2280
  freezeId: string;
@@ -2278,7 +2290,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
2278
2290
  organization: "organization";
2279
2291
  }>>;
2280
2292
  }, zod_v4_core.$strip>>;
2281
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
2293
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
2282
2294
  session: {
2283
2295
  session: Record<string, any> & {
2284
2296
  id: string;
@@ -2300,7 +2312,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
2300
2312
  image?: string | null | undefined;
2301
2313
  };
2302
2314
  };
2303
- }>)[];
2315
+ }>>[];
2304
2316
  }, {
2305
2317
  seats: number;
2306
2318
  plan: StreamPayPlanLike | null;
@@ -2311,6 +2323,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
2311
2323
  streampaySubscriptionId: string | null;
2312
2324
  streampayConsumerId: string | null;
2313
2325
  streampayPaymentLinkId: string | null;
2326
+ catalogMapped?: boolean | null;
2314
2327
  planVersion: string | null;
2315
2328
  productId: string | null;
2316
2329
  group: string | null;
@@ -2325,6 +2338,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
2325
2338
  periodStart: Date | null;
2326
2339
  periodEnd: Date | null;
2327
2340
  currentCycleNumber: number | null;
2341
+ renewalCallbackEventId?: string | null;
2328
2342
  trialStart: Date | null;
2329
2343
  trialEnd: Date | null;
2330
2344
  cancelAtPeriodEnd: boolean;
@@ -2355,7 +2369,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
2355
2369
  organization: "organization";
2356
2370
  }>>;
2357
2371
  }, zod_v4_core.$strip>>;
2358
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
2372
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
2359
2373
  session: {
2360
2374
  session: Record<string, any> & {
2361
2375
  id: string;
@@ -2377,7 +2391,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
2377
2391
  image?: string | null | undefined;
2378
2392
  };
2379
2393
  };
2380
- }>)[];
2394
+ }>>[];
2381
2395
  }, {
2382
2396
  seats: number;
2383
2397
  plan: StreamPayPlanLike | null;
@@ -2388,6 +2402,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
2388
2402
  streampaySubscriptionId: string | null;
2389
2403
  streampayConsumerId: string | null;
2390
2404
  streampayPaymentLinkId: string | null;
2405
+ catalogMapped?: boolean | null;
2391
2406
  planVersion: string | null;
2392
2407
  productId: string | null;
2393
2408
  group: string | null;
@@ -2402,6 +2417,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
2402
2417
  periodStart: Date | null;
2403
2418
  periodEnd: Date | null;
2404
2419
  currentCycleNumber: number | null;
2420
+ renewalCallbackEventId?: string | null;
2405
2421
  trialStart: Date | null;
2406
2422
  trialEnd: Date | null;
2407
2423
  cancelAtPeriodEnd: boolean;
@@ -2433,7 +2449,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
2433
2449
  organization: "organization";
2434
2450
  }>>;
2435
2451
  }, zod_v4_core.$strip>;
2436
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
2452
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
2437
2453
  session: {
2438
2454
  session: Record<string, any> & {
2439
2455
  id: string;
@@ -2455,7 +2471,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
2455
2471
  image?: string | null | undefined;
2456
2472
  };
2457
2473
  };
2458
- }>)[];
2474
+ }>>[];
2459
2475
  }, {
2460
2476
  hasFeature: boolean;
2461
2477
  }>;
@@ -2472,7 +2488,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
2472
2488
  organization: "organization";
2473
2489
  }>>;
2474
2490
  }, zod_v4_core.$strip>;
2475
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
2491
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
2476
2492
  session: {
2477
2493
  session: Record<string, any> & {
2478
2494
  id: string;
@@ -2494,7 +2510,7 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
2494
2510
  image?: string | null | undefined;
2495
2511
  };
2496
2512
  };
2497
- }>)[];
2513
+ }>>[];
2498
2514
  }, {
2499
2515
  allowed: boolean;
2500
2516
  limit: number;
@@ -2619,6 +2635,12 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
2619
2635
  readonly type: "string";
2620
2636
  readonly required: true;
2621
2637
  };
2638
+ readonly catalogMapped: {
2639
+ readonly type: "boolean";
2640
+ readonly required: false;
2641
+ readonly defaultValue: true;
2642
+ readonly input: false;
2643
+ };
2622
2644
  readonly planVersion: {
2623
2645
  readonly type: "string";
2624
2646
  readonly required: false;
@@ -2688,6 +2710,11 @@ declare function subscriptions(subsOptions: SubscriptionsOptions): (options: Str
2688
2710
  readonly type: "number";
2689
2711
  readonly required: false;
2690
2712
  };
2713
+ readonly renewalCallbackEventId: {
2714
+ readonly type: "string";
2715
+ readonly required: false;
2716
+ readonly input: false;
2717
+ };
2691
2718
  readonly trialStart: {
2692
2719
  readonly type: "date";
2693
2720
  readonly required: false;
@@ -2800,7 +2827,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
2800
2827
  page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
2801
2828
  size: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
2802
2829
  }, z.core.$loose>;
2803
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
2830
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
2804
2831
  session: {
2805
2832
  session: Record<string, any> & {
2806
2833
  id: string;
@@ -2822,7 +2849,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
2822
2849
  image?: string | null | undefined;
2823
2850
  };
2824
2851
  };
2825
- }>)[];
2852
+ }>>[];
2826
2853
  }, {
2827
2854
  items: WebhookEventRow[];
2828
2855
  total: number;
@@ -2831,7 +2858,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
2831
2858
  }>;
2832
2859
  adminGetWebhookEvent: better_auth.StrictEndpoint<"/admin/streampay/webhook-events/:eventId", {
2833
2860
  method: "GET";
2834
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
2861
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
2835
2862
  session: {
2836
2863
  session: Record<string, any> & {
2837
2864
  id: string;
@@ -2853,12 +2880,12 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
2853
2880
  image?: string | null | undefined;
2854
2881
  };
2855
2882
  };
2856
- }>)[];
2883
+ }>>[];
2857
2884
  }, {}>;
2858
2885
  adminReplayWebhookEvent: better_auth.StrictEndpoint<"/admin/streampay/webhook-events/:eventId/replay", {
2859
2886
  method: "POST";
2860
2887
  disableBody: true;
2861
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
2888
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
2862
2889
  session: {
2863
2890
  session: Record<string, any> & {
2864
2891
  id: string;
@@ -2880,7 +2907,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
2880
2907
  image?: string | null | undefined;
2881
2908
  };
2882
2909
  };
2883
- }>)[];
2910
+ }>>[];
2884
2911
  }, {
2885
2912
  replayed: true;
2886
2913
  eventId: string;
@@ -2888,7 +2915,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
2888
2915
  adminDiscardWebhookEvent: better_auth.StrictEndpoint<"/admin/streampay/webhook-events/:eventId", {
2889
2916
  method: "DELETE";
2890
2917
  disableBody: true;
2891
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
2918
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
2892
2919
  session: {
2893
2920
  session: Record<string, any> & {
2894
2921
  id: string;
@@ -2910,7 +2937,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
2910
2937
  image?: string | null | undefined;
2911
2938
  };
2912
2939
  };
2913
- }>)[];
2940
+ }>>[];
2914
2941
  }, {
2915
2942
  discarded: boolean;
2916
2943
  eventId: string;
@@ -2921,7 +2948,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
2921
2948
  page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
2922
2949
  size: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
2923
2950
  }, z.core.$loose>;
2924
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
2951
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
2925
2952
  session: {
2926
2953
  session: Record<string, any> & {
2927
2954
  id: string;
@@ -2943,7 +2970,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
2943
2970
  image?: string | null | undefined;
2944
2971
  };
2945
2972
  };
2946
- }>)[];
2973
+ }>>[];
2947
2974
  }, {
2948
2975
  data?: {
2949
2976
  created_at?: string;
@@ -3080,7 +3107,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3080
3107
  }>;
3081
3108
  adminGetPaymentLink: better_auth.StrictEndpoint<"/admin/streampay/payment-links/:id", {
3082
3109
  method: "GET";
3083
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
3110
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
3084
3111
  session: {
3085
3112
  session: Record<string, any> & {
3086
3113
  id: string;
@@ -3102,7 +3129,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3102
3129
  image?: string | null | undefined;
3103
3130
  };
3104
3131
  };
3105
- }>)[];
3132
+ }>>[];
3106
3133
  }, {
3107
3134
  created_at?: string;
3108
3135
  updated_at?: string | null;
@@ -3242,7 +3269,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3242
3269
  is_percentage: boolean;
3243
3270
  is_active: boolean;
3244
3271
  }>;
3245
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
3272
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
3246
3273
  session: {
3247
3274
  session: Record<string, any> & {
3248
3275
  id: string;
@@ -3264,7 +3291,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3264
3291
  image?: string | null | undefined;
3265
3292
  };
3266
3293
  };
3267
- }>)[];
3294
+ }>>[];
3268
3295
  }, {
3269
3296
  created_at?: string;
3270
3297
  updated_at?: string | null;
@@ -3282,7 +3309,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3282
3309
  page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
3283
3310
  size: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
3284
3311
  }, z.core.$loose>;
3285
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
3312
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
3286
3313
  session: {
3287
3314
  session: Record<string, any> & {
3288
3315
  id: string;
@@ -3304,7 +3331,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3304
3331
  image?: string | null | undefined;
3305
3332
  };
3306
3333
  };
3307
- }>)[];
3334
+ }>>[];
3308
3335
  }, {
3309
3336
  data?: {
3310
3337
  created_at?: string;
@@ -3328,7 +3355,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3328
3355
  }>;
3329
3356
  adminGetCoupon: better_auth.StrictEndpoint<"/admin/streampay/coupons/:id", {
3330
3357
  method: "GET";
3331
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
3358
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
3332
3359
  session: {
3333
3360
  session: Record<string, any> & {
3334
3361
  id: string;
@@ -3350,7 +3377,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3350
3377
  image?: string | null | undefined;
3351
3378
  };
3352
3379
  };
3353
- }>)[];
3380
+ }>>[];
3354
3381
  }, {
3355
3382
  created_at?: string;
3356
3383
  updated_at?: string | null;
@@ -3377,7 +3404,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3377
3404
  is_percentage?: boolean | null;
3378
3405
  is_active?: boolean | null;
3379
3406
  }>;
3380
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
3407
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
3381
3408
  session: {
3382
3409
  session: Record<string, any> & {
3383
3410
  id: string;
@@ -3399,7 +3426,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3399
3426
  image?: string | null | undefined;
3400
3427
  };
3401
3428
  };
3402
- }>)[];
3429
+ }>>[];
3403
3430
  }, {
3404
3431
  created_at?: string;
3405
3432
  updated_at?: string | null;
@@ -3414,7 +3441,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3414
3441
  adminDeleteCoupon: better_auth.StrictEndpoint<"/admin/streampay/coupons/:id", {
3415
3442
  method: "DELETE";
3416
3443
  disableBody: true;
3417
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
3444
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
3418
3445
  session: {
3419
3446
  session: Record<string, any> & {
3420
3447
  id: string;
@@ -3436,7 +3463,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3436
3463
  image?: string | null | undefined;
3437
3464
  };
3438
3465
  };
3439
- }>)[];
3466
+ }>>[];
3440
3467
  }, {
3441
3468
  deleted: boolean;
3442
3469
  }>;
@@ -3475,7 +3502,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3475
3502
  is_price_exempt_from_vat?: boolean | null;
3476
3503
  is_price_inclusive_of_vat?: boolean | null;
3477
3504
  }>;
3478
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
3505
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
3479
3506
  session: {
3480
3507
  session: Record<string, any> & {
3481
3508
  id: string;
@@ -3497,7 +3524,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3497
3524
  image?: string | null | undefined;
3498
3525
  };
3499
3526
  };
3500
- }>)[];
3527
+ }>>[];
3501
3528
  }, {
3502
3529
  created_at?: string;
3503
3530
  updated_at?: string | null;
@@ -3533,7 +3560,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3533
3560
  page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
3534
3561
  size: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
3535
3562
  }, z.core.$loose>;
3536
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
3563
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
3537
3564
  session: {
3538
3565
  session: Record<string, any> & {
3539
3566
  id: string;
@@ -3555,7 +3582,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3555
3582
  image?: string | null | undefined;
3556
3583
  };
3557
3584
  };
3558
- }>)[];
3585
+ }>>[];
3559
3586
  }, {
3560
3587
  data?: {
3561
3588
  created_at?: string;
@@ -3597,7 +3624,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3597
3624
  }>;
3598
3625
  adminGetProduct: better_auth.StrictEndpoint<"/admin/streampay/products/:id", {
3599
3626
  method: "GET";
3600
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
3627
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
3601
3628
  session: {
3602
3629
  session: Record<string, any> & {
3603
3630
  id: string;
@@ -3619,7 +3646,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3619
3646
  image?: string | null | undefined;
3620
3647
  };
3621
3648
  };
3622
- }>)[];
3649
+ }>>[];
3623
3650
  }, {
3624
3651
  created_at?: string;
3625
3652
  updated_at?: string | null;
@@ -3684,7 +3711,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3684
3711
  is_price_exempt_from_vat?: boolean | null;
3685
3712
  is_price_inclusive_of_vat?: boolean | null;
3686
3713
  }>;
3687
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
3714
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
3688
3715
  session: {
3689
3716
  session: Record<string, any> & {
3690
3717
  id: string;
@@ -3706,7 +3733,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3706
3733
  image?: string | null | undefined;
3707
3734
  };
3708
3735
  };
3709
- }>)[];
3736
+ }>>[];
3710
3737
  }, {
3711
3738
  created_at?: string;
3712
3739
  updated_at?: string | null;
@@ -3739,7 +3766,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3739
3766
  adminDeleteProduct: better_auth.StrictEndpoint<"/admin/streampay/products/:id", {
3740
3767
  method: "DELETE";
3741
3768
  disableBody: true;
3742
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
3769
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
3743
3770
  session: {
3744
3771
  session: Record<string, any> & {
3745
3772
  id: string;
@@ -3761,7 +3788,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3761
3788
  image?: string | null | undefined;
3762
3789
  };
3763
3790
  };
3764
- }>)[];
3791
+ }>>[];
3765
3792
  }, {
3766
3793
  deleted: boolean;
3767
3794
  }>;
@@ -3771,7 +3798,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3771
3798
  page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
3772
3799
  size: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
3773
3800
  }, z.core.$loose>;
3774
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
3801
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
3775
3802
  session: {
3776
3803
  session: Record<string, any> & {
3777
3804
  id: string;
@@ -3793,7 +3820,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3793
3820
  image?: string | null | undefined;
3794
3821
  };
3795
3822
  };
3796
- }>)[];
3823
+ }>>[];
3797
3824
  }, {
3798
3825
  data?: {
3799
3826
  created_at?: string;
@@ -3830,7 +3857,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3830
3857
  home_currency_amount_actual?: string | null;
3831
3858
  exchange_rate_at_creation?: string | null;
3832
3859
  consumer_message?: string | null;
3833
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
3860
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
3834
3861
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
3835
3862
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
3836
3863
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -3910,7 +3937,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3910
3937
  }>;
3911
3938
  adminGetInvoice: better_auth.StrictEndpoint<"/admin/streampay/invoices/:id", {
3912
3939
  method: "GET";
3913
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
3940
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
3914
3941
  session: {
3915
3942
  session: Record<string, any> & {
3916
3943
  id: string;
@@ -3932,7 +3959,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3932
3959
  image?: string | null | undefined;
3933
3960
  };
3934
3961
  };
3935
- }>)[];
3962
+ }>>[];
3936
3963
  }, {
3937
3964
  created_at?: string;
3938
3965
  updated_at?: string | null;
@@ -3968,7 +3995,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
3968
3995
  home_currency_amount_actual?: string | null;
3969
3996
  exchange_rate_at_creation?: string | null;
3970
3997
  consumer_message?: string | null;
3971
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
3998
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
3972
3999
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
3973
4000
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
3974
4001
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -4229,7 +4256,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
4229
4256
  home_currency_amount_actual?: string | null;
4230
4257
  exchange_rate_at_creation?: string | null;
4231
4258
  consumer_message?: string | null;
4232
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
4259
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
4233
4260
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
4234
4261
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
4235
4262
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -4328,7 +4355,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
4328
4355
  size: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
4329
4356
  search_term: z.ZodOptional<z.ZodString>;
4330
4357
  }, z.core.$loose>;
4331
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
4358
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
4332
4359
  session: {
4333
4360
  session: Record<string, any> & {
4334
4361
  id: string;
@@ -4350,7 +4377,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
4350
4377
  image?: string | null | undefined;
4351
4378
  };
4352
4379
  };
4353
- }>)[];
4380
+ }>>[];
4354
4381
  }, {
4355
4382
  data?: {
4356
4383
  id?: string;
@@ -4401,7 +4428,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
4401
4428
  }>;
4402
4429
  adminGetConsumer: better_auth.StrictEndpoint<"/admin/streampay/consumers/:id", {
4403
4430
  method: "GET";
4404
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
4431
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
4405
4432
  session: {
4406
4433
  session: Record<string, any> & {
4407
4434
  id: string;
@@ -4423,7 +4450,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
4423
4450
  image?: string | null | undefined;
4424
4451
  };
4425
4452
  };
4426
- }>)[];
4453
+ }>>[];
4427
4454
  }, {
4428
4455
  id?: string;
4429
4456
  name?: string;
@@ -4505,7 +4532,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
4505
4532
  vat_number?: string | null;
4506
4533
  commercial_registration?: string | null;
4507
4534
  }>;
4508
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
4535
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
4509
4536
  session: {
4510
4537
  session: Record<string, any> & {
4511
4538
  id: string;
@@ -4527,7 +4554,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
4527
4554
  image?: string | null | undefined;
4528
4555
  };
4529
4556
  };
4530
- }>)[];
4557
+ }>>[];
4531
4558
  }, {
4532
4559
  id?: string;
4533
4560
  name?: string;
@@ -4569,7 +4596,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
4569
4596
  adminDeleteConsumer: better_auth.StrictEndpoint<"/admin/streampay/consumers/:id", {
4570
4597
  method: "DELETE";
4571
4598
  disableBody: true;
4572
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
4599
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
4573
4600
  session: {
4574
4601
  session: Record<string, any> & {
4575
4602
  id: string;
@@ -4591,7 +4618,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
4591
4618
  image?: string | null | undefined;
4592
4619
  };
4593
4620
  };
4594
- }>)[];
4621
+ }>>[];
4595
4622
  }, {
4596
4623
  deleted: boolean;
4597
4624
  }>;
@@ -4646,7 +4673,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
4646
4673
  currency: "SAR" | "USD" | "EUR" | "GBP" | "AED" | "BHD" | "KWD" | "OMR" | "QAR";
4647
4674
  trial: boolean;
4648
4675
  }>;
4649
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
4676
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
4650
4677
  session: {
4651
4678
  session: Record<string, any> & {
4652
4679
  id: string;
@@ -4668,7 +4695,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
4668
4695
  image?: string | null | undefined;
4669
4696
  };
4670
4697
  };
4671
- }>)[];
4698
+ }>>[];
4672
4699
  }, {
4673
4700
  created_at?: string;
4674
4701
  updated_at?: string | null;
@@ -4814,7 +4841,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
4814
4841
  home_currency_amount_actual?: string | null;
4815
4842
  exchange_rate_at_creation?: string | null;
4816
4843
  consumer_message?: string | null;
4817
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
4844
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
4818
4845
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
4819
4846
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
4820
4847
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -4931,7 +4958,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
4931
4958
  recurring_interval_count?: number | null;
4932
4959
  exclude_coupons_if_installments?: boolean | null;
4933
4960
  }>;
4934
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
4961
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
4935
4962
  session: {
4936
4963
  session: Record<string, any> & {
4937
4964
  id: string;
@@ -4953,7 +4980,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
4953
4980
  image?: string | null | undefined;
4954
4981
  };
4955
4982
  };
4956
- }>)[];
4983
+ }>>[];
4957
4984
  }, {
4958
4985
  created_at?: string;
4959
4986
  updated_at?: string | null;
@@ -5099,7 +5126,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
5099
5126
  home_currency_amount_actual?: string | null;
5100
5127
  exchange_rate_at_creation?: string | null;
5101
5128
  consumer_message?: string | null;
5102
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
5129
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
5103
5130
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
5104
5131
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
5105
5132
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -5177,7 +5204,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
5177
5204
  page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
5178
5205
  size: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
5179
5206
  }, z.core.$loose>;
5180
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
5207
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
5181
5208
  session: {
5182
5209
  session: Record<string, any> & {
5183
5210
  id: string;
@@ -5199,7 +5226,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
5199
5226
  image?: string | null | undefined;
5200
5227
  };
5201
5228
  };
5202
- }>)[];
5229
+ }>>[];
5203
5230
  }, {
5204
5231
  data?: {
5205
5232
  created_at?: string;
@@ -5346,7 +5373,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
5346
5373
  home_currency_amount_actual?: string | null;
5347
5374
  exchange_rate_at_creation?: string | null;
5348
5375
  consumer_message?: string | null;
5349
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
5376
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
5350
5377
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
5351
5378
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
5352
5379
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -5429,7 +5456,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
5429
5456
  }>;
5430
5457
  adminGetSubscription: better_auth.StrictEndpoint<"/admin/streampay/subscriptions/:id", {
5431
5458
  method: "GET";
5432
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
5459
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
5433
5460
  session: {
5434
5461
  session: Record<string, any> & {
5435
5462
  id: string;
@@ -5451,7 +5478,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
5451
5478
  image?: string | null | undefined;
5452
5479
  };
5453
5480
  };
5454
- }>)[];
5481
+ }>>[];
5455
5482
  }, {
5456
5483
  created_at?: string;
5457
5484
  updated_at?: string | null;
@@ -5597,7 +5624,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
5597
5624
  home_currency_amount_actual?: string | null;
5598
5625
  exchange_rate_at_creation?: string | null;
5599
5626
  consumer_message?: string | null;
5600
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
5627
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
5601
5628
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
5602
5629
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
5603
5630
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -5676,7 +5703,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
5676
5703
  }, {
5677
5704
  cancel_related_invoices: boolean;
5678
5705
  }>;
5679
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
5706
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
5680
5707
  session: {
5681
5708
  session: Record<string, any> & {
5682
5709
  id: string;
@@ -5698,7 +5725,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
5698
5725
  image?: string | null | undefined;
5699
5726
  };
5700
5727
  };
5701
- }>)[];
5728
+ }>>[];
5702
5729
  }, {
5703
5730
  created_at?: string;
5704
5731
  updated_at?: string | null;
@@ -5844,7 +5871,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
5844
5871
  home_currency_amount_actual?: string | null;
5845
5872
  exchange_rate_at_creation?: string | null;
5846
5873
  consumer_message?: string | null;
5847
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
5874
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
5848
5875
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
5849
5876
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
5850
5877
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -5927,7 +5954,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
5927
5954
  freeze_end_datetime?: string | null;
5928
5955
  notes?: string | null;
5929
5956
  }>;
5930
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
5957
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
5931
5958
  session: {
5932
5959
  session: Record<string, any> & {
5933
5960
  id: string;
@@ -5949,7 +5976,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
5949
5976
  image?: string | null | undefined;
5950
5977
  };
5951
5978
  };
5952
- }>)[];
5979
+ }>>[];
5953
5980
  }, {
5954
5981
  created_at?: string;
5955
5982
  updated_at?: string | null;
@@ -5963,7 +5990,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
5963
5990
  }>;
5964
5991
  adminListSubscriptionFreezes: better_auth.StrictEndpoint<"/admin/streampay/subscriptions/:id/freeze", {
5965
5992
  method: "GET";
5966
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
5993
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
5967
5994
  session: {
5968
5995
  session: Record<string, any> & {
5969
5996
  id: string;
@@ -5985,7 +6012,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
5985
6012
  image?: string | null | undefined;
5986
6013
  };
5987
6014
  };
5988
- }>)[];
6015
+ }>>[];
5989
6016
  }, {
5990
6017
  data?: {
5991
6018
  created_at?: string;
@@ -6018,7 +6045,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
6018
6045
  freeze_end_datetime: string | null;
6019
6046
  notes?: string | null;
6020
6047
  }>;
6021
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
6048
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
6022
6049
  session: {
6023
6050
  session: Record<string, any> & {
6024
6051
  id: string;
@@ -6040,7 +6067,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
6040
6067
  image?: string | null | undefined;
6041
6068
  };
6042
6069
  };
6043
- }>)[];
6070
+ }>>[];
6044
6071
  }, {
6045
6072
  created_at?: string;
6046
6073
  updated_at?: string | null;
@@ -6055,7 +6082,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
6055
6082
  adminDeleteSubscriptionFreeze: better_auth.StrictEndpoint<"/admin/streampay/subscriptions/:id/freeze/:freezeId", {
6056
6083
  method: "DELETE";
6057
6084
  disableBody: true;
6058
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
6085
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
6059
6086
  session: {
6060
6087
  session: Record<string, any> & {
6061
6088
  id: string;
@@ -6077,7 +6104,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
6077
6104
  image?: string | null | undefined;
6078
6105
  };
6079
6106
  };
6080
- }>)[];
6107
+ }>>[];
6081
6108
  }, {
6082
6109
  deleted: boolean;
6083
6110
  }>;
@@ -6092,7 +6119,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
6092
6119
  refund_note?: string | null;
6093
6120
  allow_refund_multiple_related_payments: boolean;
6094
6121
  }>;
6095
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
6122
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
6096
6123
  session: {
6097
6124
  session: Record<string, any> & {
6098
6125
  id: string;
@@ -6114,7 +6141,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
6114
6141
  image?: string | null | undefined;
6115
6142
  };
6116
6143
  };
6117
- }>)[];
6144
+ }>>[];
6118
6145
  }, {
6119
6146
  id?: string;
6120
6147
  amount?: string;
@@ -6137,7 +6164,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
6137
6164
  size: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
6138
6165
  invoice_id: z.ZodOptional<z.ZodString>;
6139
6166
  }, z.core.$loose>;
6140
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
6167
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
6141
6168
  session: {
6142
6169
  session: Record<string, any> & {
6143
6170
  id: string;
@@ -6159,7 +6186,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
6159
6186
  image?: string | null | undefined;
6160
6187
  };
6161
6188
  };
6162
- }>)[];
6189
+ }>>[];
6163
6190
  }, {
6164
6191
  data?: {
6165
6192
  id?: string;
@@ -6187,7 +6214,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
6187
6214
  }>;
6188
6215
  adminGetPayment: better_auth.StrictEndpoint<"/admin/streampay/payments/:id", {
6189
6216
  method: "GET";
6190
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
6217
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
6191
6218
  session: {
6192
6219
  session: Record<string, any> & {
6193
6220
  id: string;
@@ -6209,7 +6236,7 @@ declare const admin: (adminOptions?: AdminOptions) => (options: StreamPayOptions
6209
6236
  image?: string | null | undefined;
6210
6237
  };
6211
6238
  };
6212
- }>)[];
6239
+ }>>[];
6213
6240
  }, {
6214
6241
  id?: string;
6215
6242
  amount?: string;
@@ -6337,12 +6364,46 @@ declare const checkout: (checkoutOptions?: CheckoutOptions) => (options: StreamP
6337
6364
 
6338
6365
  interface PortalOptions {
6339
6366
  pageSize?: number;
6367
+ /** Server-side bridge for Stream's hosted portal API, which SDK 1.1.3 does not expose. */
6368
+ createSession?: (input: {
6369
+ organization_consumer_id: string;
6370
+ }) => Promise<{
6371
+ url: string;
6372
+ }>;
6340
6373
  }
6341
- declare const portal: ({ pageSize }?: PortalOptions) => (options: StreamPayOptions) => {
6374
+ declare const portal: ({ pageSize, createSession }?: PortalOptions) => (options: StreamPayOptions) => {
6342
6375
  endpoints: {
6376
+ portalSession: better_auth.StrictEndpoint<"/consumer/portal/session", {
6377
+ method: "POST";
6378
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
6379
+ session: {
6380
+ session: Record<string, any> & {
6381
+ id: string;
6382
+ createdAt: Date;
6383
+ updatedAt: Date;
6384
+ userId: string;
6385
+ expiresAt: Date;
6386
+ token: string;
6387
+ ipAddress?: string | null | undefined;
6388
+ userAgent?: string | null | undefined;
6389
+ };
6390
+ user: Record<string, any> & {
6391
+ id: string;
6392
+ createdAt: Date;
6393
+ updatedAt: Date;
6394
+ email: string;
6395
+ emailVerified: boolean;
6396
+ name: string;
6397
+ image?: string | null | undefined;
6398
+ };
6399
+ };
6400
+ }>>[];
6401
+ }, {
6402
+ url: string;
6403
+ }>;
6343
6404
  state: better_auth.StrictEndpoint<"/consumer/state", {
6344
6405
  method: "GET";
6345
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
6406
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
6346
6407
  session: {
6347
6408
  session: Record<string, any> & {
6348
6409
  id: string;
@@ -6364,7 +6425,7 @@ declare const portal: ({ pageSize }?: PortalOptions) => (options: StreamPayOptio
6364
6425
  image?: string | null | undefined;
6365
6426
  };
6366
6427
  };
6367
- }>)[];
6428
+ }>>[];
6368
6429
  }, {
6369
6430
  hasConsumer: boolean;
6370
6431
  consumer: null;
@@ -6411,7 +6472,7 @@ declare const portal: ({ pageSize }?: PortalOptions) => (options: StreamPayOptio
6411
6472
  }>;
6412
6473
  subscriptions: better_auth.StrictEndpoint<"/consumer/subscriptions/list", {
6413
6474
  method: "GET";
6414
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
6475
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
6415
6476
  session: {
6416
6477
  session: Record<string, any> & {
6417
6478
  id: string;
@@ -6433,8 +6494,15 @@ declare const portal: ({ pageSize }?: PortalOptions) => (options: StreamPayOptio
6433
6494
  image?: string | null | undefined;
6434
6495
  };
6435
6496
  };
6436
- }>)[];
6497
+ }>>[];
6498
+ query: z.ZodObject<{
6499
+ page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
6500
+ size: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
6501
+ }, z.core.$strip>;
6437
6502
  }, {
6503
+ hasConsumer: boolean;
6504
+ data: never[];
6505
+ } | {
6438
6506
  hasConsumer: boolean;
6439
6507
  data: {
6440
6508
  created_at?: string;
@@ -6581,7 +6649,7 @@ declare const portal: ({ pageSize }?: PortalOptions) => (options: StreamPayOptio
6581
6649
  home_currency_amount_actual?: string | null;
6582
6650
  exchange_rate_at_creation?: string | null;
6583
6651
  consumer_message?: string | null;
6584
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
6652
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
6585
6653
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
6586
6654
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
6587
6655
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -6653,10 +6721,18 @@ declare const portal: ({ pageSize }?: PortalOptions) => (options: StreamPayOptio
6653
6721
  readonly amount_in_smallest_unit?: number;
6654
6722
  readonly original_amount_in_smallest_unit?: number;
6655
6723
  }[];
6724
+ pagination: {
6725
+ total_count?: number;
6726
+ max_page?: number;
6727
+ current_page?: number;
6728
+ limit?: number;
6729
+ has_next_page?: boolean;
6730
+ has_previous_page?: boolean;
6731
+ } | undefined;
6656
6732
  }>;
6657
6733
  invoices: better_auth.StrictEndpoint<"/consumer/invoices/list", {
6658
6734
  method: "GET";
6659
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
6735
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
6660
6736
  session: {
6661
6737
  session: Record<string, any> & {
6662
6738
  id: string;
@@ -6678,8 +6754,15 @@ declare const portal: ({ pageSize }?: PortalOptions) => (options: StreamPayOptio
6678
6754
  image?: string | null | undefined;
6679
6755
  };
6680
6756
  };
6681
- }>)[];
6757
+ }>>[];
6758
+ query: z.ZodObject<{
6759
+ page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
6760
+ size: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
6761
+ }, z.core.$strip>;
6682
6762
  }, {
6763
+ hasConsumer: boolean;
6764
+ data: never[];
6765
+ } | {
6683
6766
  hasConsumer: boolean;
6684
6767
  data: {
6685
6768
  created_at?: string;
@@ -6716,7 +6799,7 @@ declare const portal: ({ pageSize }?: PortalOptions) => (options: StreamPayOptio
6716
6799
  home_currency_amount_actual?: string | null;
6717
6800
  exchange_rate_at_creation?: string | null;
6718
6801
  consumer_message?: string | null;
6719
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
6802
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
6720
6803
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
6721
6804
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
6722
6805
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -6785,6 +6868,14 @@ declare const portal: ({ pageSize }?: PortalOptions) => (options: StreamPayOptio
6785
6868
  remaining_amount_in_smallest_unit?: number | null;
6786
6869
  readonly paid_amount_in_smallest_unit?: number;
6787
6870
  }[];
6871
+ pagination: {
6872
+ total_count?: number;
6873
+ max_page?: number;
6874
+ current_page?: number;
6875
+ limit?: number;
6876
+ has_next_page?: boolean;
6877
+ has_previous_page?: boolean;
6878
+ } | undefined;
6788
6879
  }>;
6789
6880
  };
6790
6881
  };
@@ -6797,6 +6888,7 @@ interface WebhookHandlers {
6797
6888
  onPaymentFailed?: WebhookHandler<"PAYMENT_FAILED", "PAYMENT">;
6798
6889
  onPaymentCanceled?: WebhookHandler<"PAYMENT_CANCELED", "PAYMENT">;
6799
6890
  onPaymentRefunded?: WebhookHandler<"PAYMENT_REFUNDED", "PAYMENT">;
6891
+ onPaymentPartiallyRefunded?: WebhookHandler<"PAYMENT_PARTIALLY_REFUNDED", "PAYMENT">;
6800
6892
  onPaymentMarkedAsPaid?: WebhookHandler<"PAYMENT_MARKED_AS_PAID", "PAYMENT">;
6801
6893
  onInvoiceCreated?: WebhookHandler<"INVOICE_CREATED", "INVOICE">;
6802
6894
  onInvoiceSent?: WebhookHandler<"INVOICE_SENT", "INVOICE">;
@@ -6811,6 +6903,7 @@ interface WebhookHandlers {
6811
6903
  onSubscriptionCanceled?: WebhookHandler<"SUBSCRIPTION_CANCELED", "SUBSCRIPTION">;
6812
6904
  onSubscriptionFrozen?: WebhookHandler<"SUBSCRIPTION_FROZEN", "SUBSCRIPTION">;
6813
6905
  onSubscriptionCycleRenewalFailed?: WebhookHandler<"SUBSCRIPTION_CYCLE_RENEWAL_FAILED", "SUBSCRIPTION">;
6906
+ onSubscriptionCycleRenewedSuccessfully?: WebhookHandler<"SUBSCRIPTION_CYCLE_RENEWED_SUCCESSFULLY", "SUBSCRIPTION">;
6814
6907
  onSubscriptionCancelAtPeriodEnd?: WebhookHandler<"SUBSCRIPTION_CANCEL_AT_PERIOD_END", "SUBSCRIPTION">;
6815
6908
  onSubscriptionFreezeNow?: WebhookHandler<"SUBSCRIPTION_FREEZE_NOW", "SUBSCRIPTION">;
6816
6909
  onSubscriptionUnfreezeNow?: WebhookHandler<"SUBSCRIPTION_UNFREEZE_NOW", "SUBSCRIPTION">;
@@ -6828,8 +6921,11 @@ declare function dispatchWebhook(payload: StreamPayWebhookEnvelope, handlers: We
6828
6921
  interface WebhooksOptions extends WebhookHandlers {
6829
6922
  secret: string | readonly string[];
6830
6923
  toleranceSeconds?: number;
6924
+ /** Persist and deduplicate callback deliveries. Requires the webhook inbox migration. */
6925
+ deduplicate?: boolean;
6831
6926
  }
6832
6927
  declare const webhooks: (webhooksOptions: WebhooksOptions) => (_options: StreamPayOptions, registry?: StreamPayPluginRegistry) => {
6928
+ schema: {};
6833
6929
  endpoints: {
6834
6930
  streampayWebhooks: better_auth.StrictEndpoint<"/streampay/webhooks", {
6835
6931
  method: "POST";
@@ -6843,10 +6939,13 @@ declare const webhooks: (webhooksOptions: WebhooksOptions) => (_options: StreamP
6843
6939
  };
6844
6940
  };
6845
6941
 
6846
- type StreamPayListConsumersParams = PaginationParams & {
6942
+ type StreamPayPaginationParams = PaginationParams & {
6943
+ limit?: number;
6944
+ };
6945
+ type StreamPayListConsumersParams = StreamPayPaginationParams & {
6847
6946
  search_term?: string | null;
6848
6947
  };
6849
- type StreamPayListSubscriptionsParams = PaginationParams & {
6948
+ type StreamPayListSubscriptionsParams = StreamPayPaginationParams & {
6850
6949
  organization_consumer_id?: string | null;
6851
6950
  statuses?: string[];
6852
6951
  latest_invoice_is_paid?: boolean;
@@ -6864,7 +6963,7 @@ type StreamPayListSubscriptionsParams = PaginationParams & {
6864
6963
  sort_field?: string;
6865
6964
  sort_direction?: string;
6866
6965
  };
6867
- type StreamPayListInvoicesParams = PaginationParams & {
6966
+ type StreamPayListInvoicesParams = StreamPayPaginationParams & {
6868
6967
  organization_consumer_id?: string | null;
6869
6968
  subscription_id?: string | null;
6870
6969
  include_payments?: boolean;
@@ -6890,17 +6989,17 @@ interface StreamPayClient {
6890
6989
  updateConsumer(consumerId: string, input: ConsumerUpdate): Promise<ConsumerResponse>;
6891
6990
  deleteConsumer(consumerId: string): Promise<void>;
6892
6991
  createPaymentLink(input: CreatePaymentLinkDto): Promise<PaymentLinkDetailed>;
6893
- listPaymentLinks(params?: PaginationParams): Promise<PaymentLinkListResponse>;
6992
+ listPaymentLinks(params?: StreamPayPaginationParams): Promise<PaymentLinkListResponse>;
6894
6993
  getPaymentLink(paymentLinkId: string): Promise<PaymentLinkDetailed>;
6895
6994
  updatePaymentLinkStatus?(paymentLinkId: string, input: UpdatePaymentLinkStatusDto): Promise<PaymentLinkDetailed>;
6896
6995
  getPaymentUrl(link: PaymentLinkDetailed): string | null;
6897
6996
  createProduct(input: ProductCreate): Promise<ProductDto>;
6898
- listProducts(params?: PaginationParams): Promise<ProductListResponse>;
6997
+ listProducts(params?: StreamPayPaginationParams): Promise<ProductListResponse>;
6899
6998
  getProduct(productId: string): Promise<ProductDto>;
6900
6999
  updateProduct(productId: string, input: ProductUpdate): Promise<ProductDto>;
6901
7000
  deleteProduct(productId: string): Promise<void>;
6902
7001
  createCoupon(input: CouponCreate): Promise<CouponDetailed>;
6903
- listCoupons(params?: PaginationParams): Promise<CouponListResponse>;
7002
+ listCoupons(params?: StreamPayPaginationParams): Promise<CouponListResponse>;
6904
7003
  getCoupon(couponId: string): Promise<CouponDetailed>;
6905
7004
  updateCoupon(couponId: string, input: CouponUpdate): Promise<CouponDetailed>;
6906
7005
  deleteCoupon(couponId: string): Promise<void>;
@@ -6920,6 +7019,7 @@ interface StreamPayClient {
6920
7019
  listPayments(params?: {
6921
7020
  page?: number;
6922
7021
  size?: number;
7022
+ limit?: number;
6923
7023
  invoice_id?: string;
6924
7024
  }): Promise<PaymentListResponse>;
6925
7025
  getPayment(paymentId: string): Promise<PaymentResponse>;
@@ -6974,7 +7074,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
6974
7074
  page: zod.ZodOptional<zod.ZodCoercedNumber<unknown>>;
6975
7075
  size: zod.ZodOptional<zod.ZodCoercedNumber<unknown>>;
6976
7076
  }, zod_v4_core.$loose>;
6977
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7077
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
6978
7078
  session: {
6979
7079
  session: Record<string, any> & {
6980
7080
  id: string;
@@ -6996,7 +7096,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
6996
7096
  image?: string | null | undefined;
6997
7097
  };
6998
7098
  };
6999
- }>)[];
7099
+ }>>[];
7000
7100
  }, {
7001
7101
  items: WebhookEventRow[];
7002
7102
  total: number;
@@ -7005,7 +7105,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7005
7105
  }>;
7006
7106
  adminGetWebhookEvent: better_auth.StrictEndpoint<"/admin/streampay/webhook-events/:eventId", {
7007
7107
  method: "GET";
7008
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7108
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7009
7109
  session: {
7010
7110
  session: Record<string, any> & {
7011
7111
  id: string;
@@ -7027,12 +7127,12 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7027
7127
  image?: string | null | undefined;
7028
7128
  };
7029
7129
  };
7030
- }>)[];
7130
+ }>>[];
7031
7131
  }, {}>;
7032
7132
  adminReplayWebhookEvent: better_auth.StrictEndpoint<"/admin/streampay/webhook-events/:eventId/replay", {
7033
7133
  method: "POST";
7034
7134
  disableBody: true;
7035
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7135
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7036
7136
  session: {
7037
7137
  session: Record<string, any> & {
7038
7138
  id: string;
@@ -7054,7 +7154,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7054
7154
  image?: string | null | undefined;
7055
7155
  };
7056
7156
  };
7057
- }>)[];
7157
+ }>>[];
7058
7158
  }, {
7059
7159
  replayed: true;
7060
7160
  eventId: string;
@@ -7062,7 +7162,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7062
7162
  adminDiscardWebhookEvent: better_auth.StrictEndpoint<"/admin/streampay/webhook-events/:eventId", {
7063
7163
  method: "DELETE";
7064
7164
  disableBody: true;
7065
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7165
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7066
7166
  session: {
7067
7167
  session: Record<string, any> & {
7068
7168
  id: string;
@@ -7084,7 +7184,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7084
7184
  image?: string | null | undefined;
7085
7185
  };
7086
7186
  };
7087
- }>)[];
7187
+ }>>[];
7088
7188
  }, {
7089
7189
  discarded: boolean;
7090
7190
  eventId: string;
@@ -7095,7 +7195,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7095
7195
  page: zod.ZodOptional<zod.ZodCoercedNumber<unknown>>;
7096
7196
  size: zod.ZodOptional<zod.ZodCoercedNumber<unknown>>;
7097
7197
  }, zod_v4_core.$loose>;
7098
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7198
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7099
7199
  session: {
7100
7200
  session: Record<string, any> & {
7101
7201
  id: string;
@@ -7117,7 +7217,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7117
7217
  image?: string | null | undefined;
7118
7218
  };
7119
7219
  };
7120
- }>)[];
7220
+ }>>[];
7121
7221
  }, {
7122
7222
  data?: {
7123
7223
  created_at?: string;
@@ -7254,7 +7354,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7254
7354
  }>;
7255
7355
  adminGetPaymentLink: better_auth.StrictEndpoint<"/admin/streampay/payment-links/:id", {
7256
7356
  method: "GET";
7257
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7357
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7258
7358
  session: {
7259
7359
  session: Record<string, any> & {
7260
7360
  id: string;
@@ -7276,7 +7376,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7276
7376
  image?: string | null | undefined;
7277
7377
  };
7278
7378
  };
7279
- }>)[];
7379
+ }>>[];
7280
7380
  }, {
7281
7381
  created_at?: string;
7282
7382
  updated_at?: string | null;
@@ -7416,7 +7516,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7416
7516
  is_percentage: boolean;
7417
7517
  is_active: boolean;
7418
7518
  }>;
7419
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7519
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7420
7520
  session: {
7421
7521
  session: Record<string, any> & {
7422
7522
  id: string;
@@ -7438,7 +7538,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7438
7538
  image?: string | null | undefined;
7439
7539
  };
7440
7540
  };
7441
- }>)[];
7541
+ }>>[];
7442
7542
  }, {
7443
7543
  created_at?: string;
7444
7544
  updated_at?: string | null;
@@ -7456,7 +7556,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7456
7556
  page: zod.ZodOptional<zod.ZodCoercedNumber<unknown>>;
7457
7557
  size: zod.ZodOptional<zod.ZodCoercedNumber<unknown>>;
7458
7558
  }, zod_v4_core.$loose>;
7459
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7559
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7460
7560
  session: {
7461
7561
  session: Record<string, any> & {
7462
7562
  id: string;
@@ -7478,7 +7578,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7478
7578
  image?: string | null | undefined;
7479
7579
  };
7480
7580
  };
7481
- }>)[];
7581
+ }>>[];
7482
7582
  }, {
7483
7583
  data?: {
7484
7584
  created_at?: string;
@@ -7502,7 +7602,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7502
7602
  }>;
7503
7603
  adminGetCoupon: better_auth.StrictEndpoint<"/admin/streampay/coupons/:id", {
7504
7604
  method: "GET";
7505
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7605
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7506
7606
  session: {
7507
7607
  session: Record<string, any> & {
7508
7608
  id: string;
@@ -7524,7 +7624,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7524
7624
  image?: string | null | undefined;
7525
7625
  };
7526
7626
  };
7527
- }>)[];
7627
+ }>>[];
7528
7628
  }, {
7529
7629
  created_at?: string;
7530
7630
  updated_at?: string | null;
@@ -7551,7 +7651,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7551
7651
  is_percentage?: boolean | null;
7552
7652
  is_active?: boolean | null;
7553
7653
  }>;
7554
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7654
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7555
7655
  session: {
7556
7656
  session: Record<string, any> & {
7557
7657
  id: string;
@@ -7573,7 +7673,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7573
7673
  image?: string | null | undefined;
7574
7674
  };
7575
7675
  };
7576
- }>)[];
7676
+ }>>[];
7577
7677
  }, {
7578
7678
  created_at?: string;
7579
7679
  updated_at?: string | null;
@@ -7588,7 +7688,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7588
7688
  adminDeleteCoupon: better_auth.StrictEndpoint<"/admin/streampay/coupons/:id", {
7589
7689
  method: "DELETE";
7590
7690
  disableBody: true;
7591
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7691
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7592
7692
  session: {
7593
7693
  session: Record<string, any> & {
7594
7694
  id: string;
@@ -7610,7 +7710,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7610
7710
  image?: string | null | undefined;
7611
7711
  };
7612
7712
  };
7613
- }>)[];
7713
+ }>>[];
7614
7714
  }, {
7615
7715
  deleted: boolean;
7616
7716
  }>;
@@ -7649,7 +7749,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7649
7749
  is_price_exempt_from_vat?: boolean | null;
7650
7750
  is_price_inclusive_of_vat?: boolean | null;
7651
7751
  }>;
7652
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7752
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7653
7753
  session: {
7654
7754
  session: Record<string, any> & {
7655
7755
  id: string;
@@ -7671,7 +7771,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7671
7771
  image?: string | null | undefined;
7672
7772
  };
7673
7773
  };
7674
- }>)[];
7774
+ }>>[];
7675
7775
  }, {
7676
7776
  created_at?: string;
7677
7777
  updated_at?: string | null;
@@ -7707,7 +7807,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7707
7807
  page: zod.ZodOptional<zod.ZodCoercedNumber<unknown>>;
7708
7808
  size: zod.ZodOptional<zod.ZodCoercedNumber<unknown>>;
7709
7809
  }, zod_v4_core.$loose>;
7710
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7810
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7711
7811
  session: {
7712
7812
  session: Record<string, any> & {
7713
7813
  id: string;
@@ -7729,7 +7829,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7729
7829
  image?: string | null | undefined;
7730
7830
  };
7731
7831
  };
7732
- }>)[];
7832
+ }>>[];
7733
7833
  }, {
7734
7834
  data?: {
7735
7835
  created_at?: string;
@@ -7771,7 +7871,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7771
7871
  }>;
7772
7872
  adminGetProduct: better_auth.StrictEndpoint<"/admin/streampay/products/:id", {
7773
7873
  method: "GET";
7774
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7874
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7775
7875
  session: {
7776
7876
  session: Record<string, any> & {
7777
7877
  id: string;
@@ -7793,7 +7893,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7793
7893
  image?: string | null | undefined;
7794
7894
  };
7795
7895
  };
7796
- }>)[];
7896
+ }>>[];
7797
7897
  }, {
7798
7898
  created_at?: string;
7799
7899
  updated_at?: string | null;
@@ -7858,7 +7958,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7858
7958
  is_price_exempt_from_vat?: boolean | null;
7859
7959
  is_price_inclusive_of_vat?: boolean | null;
7860
7960
  }>;
7861
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7961
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7862
7962
  session: {
7863
7963
  session: Record<string, any> & {
7864
7964
  id: string;
@@ -7880,7 +7980,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7880
7980
  image?: string | null | undefined;
7881
7981
  };
7882
7982
  };
7883
- }>)[];
7983
+ }>>[];
7884
7984
  }, {
7885
7985
  created_at?: string;
7886
7986
  updated_at?: string | null;
@@ -7913,7 +8013,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7913
8013
  adminDeleteProduct: better_auth.StrictEndpoint<"/admin/streampay/products/:id", {
7914
8014
  method: "DELETE";
7915
8015
  disableBody: true;
7916
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
8016
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7917
8017
  session: {
7918
8018
  session: Record<string, any> & {
7919
8019
  id: string;
@@ -7935,7 +8035,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7935
8035
  image?: string | null | undefined;
7936
8036
  };
7937
8037
  };
7938
- }>)[];
8038
+ }>>[];
7939
8039
  }, {
7940
8040
  deleted: boolean;
7941
8041
  }>;
@@ -7945,7 +8045,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7945
8045
  page: zod.ZodOptional<zod.ZodCoercedNumber<unknown>>;
7946
8046
  size: zod.ZodOptional<zod.ZodCoercedNumber<unknown>>;
7947
8047
  }, zod_v4_core.$loose>;
7948
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
8048
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
7949
8049
  session: {
7950
8050
  session: Record<string, any> & {
7951
8051
  id: string;
@@ -7967,7 +8067,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
7967
8067
  image?: string | null | undefined;
7968
8068
  };
7969
8069
  };
7970
- }>)[];
8070
+ }>>[];
7971
8071
  }, {
7972
8072
  data?: {
7973
8073
  created_at?: string;
@@ -8004,7 +8104,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
8004
8104
  home_currency_amount_actual?: string | null;
8005
8105
  exchange_rate_at_creation?: string | null;
8006
8106
  consumer_message?: string | null;
8007
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
8107
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
8008
8108
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
8009
8109
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
8010
8110
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -8084,7 +8184,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
8084
8184
  }>;
8085
8185
  adminGetInvoice: better_auth.StrictEndpoint<"/admin/streampay/invoices/:id", {
8086
8186
  method: "GET";
8087
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
8187
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
8088
8188
  session: {
8089
8189
  session: Record<string, any> & {
8090
8190
  id: string;
@@ -8106,7 +8206,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
8106
8206
  image?: string | null | undefined;
8107
8207
  };
8108
8208
  };
8109
- }>)[];
8209
+ }>>[];
8110
8210
  }, {
8111
8211
  created_at?: string;
8112
8212
  updated_at?: string | null;
@@ -8142,7 +8242,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
8142
8242
  home_currency_amount_actual?: string | null;
8143
8243
  exchange_rate_at_creation?: string | null;
8144
8244
  consumer_message?: string | null;
8145
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
8245
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
8146
8246
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
8147
8247
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
8148
8248
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -8403,7 +8503,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
8403
8503
  home_currency_amount_actual?: string | null;
8404
8504
  exchange_rate_at_creation?: string | null;
8405
8505
  consumer_message?: string | null;
8406
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
8506
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
8407
8507
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
8408
8508
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
8409
8509
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -8502,7 +8602,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
8502
8602
  size: zod.ZodOptional<zod.ZodCoercedNumber<unknown>>;
8503
8603
  search_term: zod.ZodOptional<zod.ZodString>;
8504
8604
  }, zod_v4_core.$loose>;
8505
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
8605
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
8506
8606
  session: {
8507
8607
  session: Record<string, any> & {
8508
8608
  id: string;
@@ -8524,7 +8624,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
8524
8624
  image?: string | null | undefined;
8525
8625
  };
8526
8626
  };
8527
- }>)[];
8627
+ }>>[];
8528
8628
  }, {
8529
8629
  data?: {
8530
8630
  id?: string;
@@ -8575,7 +8675,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
8575
8675
  }>;
8576
8676
  adminGetConsumer: better_auth.StrictEndpoint<"/admin/streampay/consumers/:id", {
8577
8677
  method: "GET";
8578
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
8678
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
8579
8679
  session: {
8580
8680
  session: Record<string, any> & {
8581
8681
  id: string;
@@ -8597,7 +8697,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
8597
8697
  image?: string | null | undefined;
8598
8698
  };
8599
8699
  };
8600
- }>)[];
8700
+ }>>[];
8601
8701
  }, {
8602
8702
  id?: string;
8603
8703
  name?: string;
@@ -8679,7 +8779,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
8679
8779
  vat_number?: string | null;
8680
8780
  commercial_registration?: string | null;
8681
8781
  }>;
8682
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
8782
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
8683
8783
  session: {
8684
8784
  session: Record<string, any> & {
8685
8785
  id: string;
@@ -8701,7 +8801,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
8701
8801
  image?: string | null | undefined;
8702
8802
  };
8703
8803
  };
8704
- }>)[];
8804
+ }>>[];
8705
8805
  }, {
8706
8806
  id?: string;
8707
8807
  name?: string;
@@ -8743,7 +8843,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
8743
8843
  adminDeleteConsumer: better_auth.StrictEndpoint<"/admin/streampay/consumers/:id", {
8744
8844
  method: "DELETE";
8745
8845
  disableBody: true;
8746
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
8846
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
8747
8847
  session: {
8748
8848
  session: Record<string, any> & {
8749
8849
  id: string;
@@ -8765,7 +8865,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
8765
8865
  image?: string | null | undefined;
8766
8866
  };
8767
8867
  };
8768
- }>)[];
8868
+ }>>[];
8769
8869
  }, {
8770
8870
  deleted: boolean;
8771
8871
  }>;
@@ -8820,7 +8920,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
8820
8920
  currency: "SAR" | "USD" | "EUR" | "GBP" | "AED" | "BHD" | "KWD" | "OMR" | "QAR";
8821
8921
  trial: boolean;
8822
8922
  }>;
8823
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
8923
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
8824
8924
  session: {
8825
8925
  session: Record<string, any> & {
8826
8926
  id: string;
@@ -8842,7 +8942,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
8842
8942
  image?: string | null | undefined;
8843
8943
  };
8844
8944
  };
8845
- }>)[];
8945
+ }>>[];
8846
8946
  }, {
8847
8947
  created_at?: string;
8848
8948
  updated_at?: string | null;
@@ -8988,7 +9088,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
8988
9088
  home_currency_amount_actual?: string | null;
8989
9089
  exchange_rate_at_creation?: string | null;
8990
9090
  consumer_message?: string | null;
8991
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
9091
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
8992
9092
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
8993
9093
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
8994
9094
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -9105,7 +9205,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
9105
9205
  recurring_interval_count?: number | null;
9106
9206
  exclude_coupons_if_installments?: boolean | null;
9107
9207
  }>;
9108
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
9208
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
9109
9209
  session: {
9110
9210
  session: Record<string, any> & {
9111
9211
  id: string;
@@ -9127,7 +9227,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
9127
9227
  image?: string | null | undefined;
9128
9228
  };
9129
9229
  };
9130
- }>)[];
9230
+ }>>[];
9131
9231
  }, {
9132
9232
  created_at?: string;
9133
9233
  updated_at?: string | null;
@@ -9273,7 +9373,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
9273
9373
  home_currency_amount_actual?: string | null;
9274
9374
  exchange_rate_at_creation?: string | null;
9275
9375
  consumer_message?: string | null;
9276
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
9376
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
9277
9377
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
9278
9378
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
9279
9379
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -9351,7 +9451,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
9351
9451
  page: zod.ZodOptional<zod.ZodCoercedNumber<unknown>>;
9352
9452
  size: zod.ZodOptional<zod.ZodCoercedNumber<unknown>>;
9353
9453
  }, zod_v4_core.$loose>;
9354
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
9454
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
9355
9455
  session: {
9356
9456
  session: Record<string, any> & {
9357
9457
  id: string;
@@ -9373,7 +9473,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
9373
9473
  image?: string | null | undefined;
9374
9474
  };
9375
9475
  };
9376
- }>)[];
9476
+ }>>[];
9377
9477
  }, {
9378
9478
  data?: {
9379
9479
  created_at?: string;
@@ -9520,7 +9620,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
9520
9620
  home_currency_amount_actual?: string | null;
9521
9621
  exchange_rate_at_creation?: string | null;
9522
9622
  consumer_message?: string | null;
9523
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
9623
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
9524
9624
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
9525
9625
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
9526
9626
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -9603,7 +9703,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
9603
9703
  }>;
9604
9704
  adminGetSubscription: better_auth.StrictEndpoint<"/admin/streampay/subscriptions/:id", {
9605
9705
  method: "GET";
9606
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
9706
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
9607
9707
  session: {
9608
9708
  session: Record<string, any> & {
9609
9709
  id: string;
@@ -9625,7 +9725,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
9625
9725
  image?: string | null | undefined;
9626
9726
  };
9627
9727
  };
9628
- }>)[];
9728
+ }>>[];
9629
9729
  }, {
9630
9730
  created_at?: string;
9631
9731
  updated_at?: string | null;
@@ -9771,7 +9871,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
9771
9871
  home_currency_amount_actual?: string | null;
9772
9872
  exchange_rate_at_creation?: string | null;
9773
9873
  consumer_message?: string | null;
9774
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
9874
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
9775
9875
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
9776
9876
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
9777
9877
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -9850,7 +9950,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
9850
9950
  }, {
9851
9951
  cancel_related_invoices: boolean;
9852
9952
  }>;
9853
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
9953
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
9854
9954
  session: {
9855
9955
  session: Record<string, any> & {
9856
9956
  id: string;
@@ -9872,7 +9972,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
9872
9972
  image?: string | null | undefined;
9873
9973
  };
9874
9974
  };
9875
- }>)[];
9975
+ }>>[];
9876
9976
  }, {
9877
9977
  created_at?: string;
9878
9978
  updated_at?: string | null;
@@ -10018,7 +10118,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10018
10118
  home_currency_amount_actual?: string | null;
10019
10119
  exchange_rate_at_creation?: string | null;
10020
10120
  consumer_message?: string | null;
10021
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
10121
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
10022
10122
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
10023
10123
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
10024
10124
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -10101,7 +10201,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10101
10201
  freeze_end_datetime?: string | null;
10102
10202
  notes?: string | null;
10103
10203
  }>;
10104
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
10204
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
10105
10205
  session: {
10106
10206
  session: Record<string, any> & {
10107
10207
  id: string;
@@ -10123,7 +10223,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10123
10223
  image?: string | null | undefined;
10124
10224
  };
10125
10225
  };
10126
- }>)[];
10226
+ }>>[];
10127
10227
  }, {
10128
10228
  created_at?: string;
10129
10229
  updated_at?: string | null;
@@ -10137,7 +10237,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10137
10237
  }>;
10138
10238
  adminListSubscriptionFreezes: better_auth.StrictEndpoint<"/admin/streampay/subscriptions/:id/freeze", {
10139
10239
  method: "GET";
10140
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
10240
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
10141
10241
  session: {
10142
10242
  session: Record<string, any> & {
10143
10243
  id: string;
@@ -10159,7 +10259,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10159
10259
  image?: string | null | undefined;
10160
10260
  };
10161
10261
  };
10162
- }>)[];
10262
+ }>>[];
10163
10263
  }, {
10164
10264
  data?: {
10165
10265
  created_at?: string;
@@ -10192,7 +10292,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10192
10292
  freeze_end_datetime: string | null;
10193
10293
  notes?: string | null;
10194
10294
  }>;
10195
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
10295
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
10196
10296
  session: {
10197
10297
  session: Record<string, any> & {
10198
10298
  id: string;
@@ -10214,7 +10314,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10214
10314
  image?: string | null | undefined;
10215
10315
  };
10216
10316
  };
10217
- }>)[];
10317
+ }>>[];
10218
10318
  }, {
10219
10319
  created_at?: string;
10220
10320
  updated_at?: string | null;
@@ -10229,7 +10329,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10229
10329
  adminDeleteSubscriptionFreeze: better_auth.StrictEndpoint<"/admin/streampay/subscriptions/:id/freeze/:freezeId", {
10230
10330
  method: "DELETE";
10231
10331
  disableBody: true;
10232
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
10332
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
10233
10333
  session: {
10234
10334
  session: Record<string, any> & {
10235
10335
  id: string;
@@ -10251,7 +10351,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10251
10351
  image?: string | null | undefined;
10252
10352
  };
10253
10353
  };
10254
- }>)[];
10354
+ }>>[];
10255
10355
  }, {
10256
10356
  deleted: boolean;
10257
10357
  }>;
@@ -10266,7 +10366,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10266
10366
  refund_note?: string | null;
10267
10367
  allow_refund_multiple_related_payments: boolean;
10268
10368
  }>;
10269
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
10369
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
10270
10370
  session: {
10271
10371
  session: Record<string, any> & {
10272
10372
  id: string;
@@ -10288,7 +10388,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10288
10388
  image?: string | null | undefined;
10289
10389
  };
10290
10390
  };
10291
- }>)[];
10391
+ }>>[];
10292
10392
  }, {
10293
10393
  id?: string;
10294
10394
  amount?: string;
@@ -10311,7 +10411,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10311
10411
  size: zod.ZodOptional<zod.ZodCoercedNumber<unknown>>;
10312
10412
  invoice_id: zod.ZodOptional<zod.ZodString>;
10313
10413
  }, zod_v4_core.$loose>;
10314
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
10414
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
10315
10415
  session: {
10316
10416
  session: Record<string, any> & {
10317
10417
  id: string;
@@ -10333,7 +10433,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10333
10433
  image?: string | null | undefined;
10334
10434
  };
10335
10435
  };
10336
- }>)[];
10436
+ }>>[];
10337
10437
  }, {
10338
10438
  data?: {
10339
10439
  id?: string;
@@ -10361,7 +10461,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10361
10461
  }>;
10362
10462
  adminGetPayment: better_auth.StrictEndpoint<"/admin/streampay/payments/:id", {
10363
10463
  method: "GET";
10364
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
10464
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
10365
10465
  session: {
10366
10466
  session: Record<string, any> & {
10367
10467
  id: string;
@@ -10383,7 +10483,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10383
10483
  image?: string | null | undefined;
10384
10484
  };
10385
10485
  };
10386
- }>)[];
10486
+ }>>[];
10387
10487
  }, {
10388
10488
  id?: string;
10389
10489
  amount?: string;
@@ -10425,9 +10525,37 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10425
10525
  redirect: boolean;
10426
10526
  }>;
10427
10527
  } & {
10528
+ portalSession: better_auth.StrictEndpoint<"/consumer/portal/session", {
10529
+ method: "POST";
10530
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
10531
+ session: {
10532
+ session: Record<string, any> & {
10533
+ id: string;
10534
+ createdAt: Date;
10535
+ updatedAt: Date;
10536
+ userId: string;
10537
+ expiresAt: Date;
10538
+ token: string;
10539
+ ipAddress?: string | null | undefined;
10540
+ userAgent?: string | null | undefined;
10541
+ };
10542
+ user: Record<string, any> & {
10543
+ id: string;
10544
+ createdAt: Date;
10545
+ updatedAt: Date;
10546
+ email: string;
10547
+ emailVerified: boolean;
10548
+ name: string;
10549
+ image?: string | null | undefined;
10550
+ };
10551
+ };
10552
+ }>>[];
10553
+ }, {
10554
+ url: string;
10555
+ }>;
10428
10556
  state: better_auth.StrictEndpoint<"/consumer/state", {
10429
10557
  method: "GET";
10430
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
10558
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
10431
10559
  session: {
10432
10560
  session: Record<string, any> & {
10433
10561
  id: string;
@@ -10449,7 +10577,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10449
10577
  image?: string | null | undefined;
10450
10578
  };
10451
10579
  };
10452
- }>)[];
10580
+ }>>[];
10453
10581
  }, {
10454
10582
  hasConsumer: boolean;
10455
10583
  consumer: null;
@@ -10496,7 +10624,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10496
10624
  }>;
10497
10625
  subscriptions: better_auth.StrictEndpoint<"/consumer/subscriptions/list", {
10498
10626
  method: "GET";
10499
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
10627
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
10500
10628
  session: {
10501
10629
  session: Record<string, any> & {
10502
10630
  id: string;
@@ -10518,8 +10646,15 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10518
10646
  image?: string | null | undefined;
10519
10647
  };
10520
10648
  };
10521
- }>)[];
10649
+ }>>[];
10650
+ query: zod.ZodObject<{
10651
+ page: zod.ZodOptional<zod.ZodCoercedNumber<unknown>>;
10652
+ size: zod.ZodOptional<zod.ZodCoercedNumber<unknown>>;
10653
+ }, zod_v4_core.$strip>;
10522
10654
  }, {
10655
+ hasConsumer: boolean;
10656
+ data: never[];
10657
+ } | {
10523
10658
  hasConsumer: boolean;
10524
10659
  data: {
10525
10660
  created_at?: string;
@@ -10666,7 +10801,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10666
10801
  home_currency_amount_actual?: string | null;
10667
10802
  exchange_rate_at_creation?: string | null;
10668
10803
  consumer_message?: string | null;
10669
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
10804
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
10670
10805
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
10671
10806
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
10672
10807
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -10738,10 +10873,18 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10738
10873
  readonly amount_in_smallest_unit?: number;
10739
10874
  readonly original_amount_in_smallest_unit?: number;
10740
10875
  }[];
10876
+ pagination: {
10877
+ total_count?: number;
10878
+ max_page?: number;
10879
+ current_page?: number;
10880
+ limit?: number;
10881
+ has_next_page?: boolean;
10882
+ has_previous_page?: boolean;
10883
+ } | undefined;
10741
10884
  }>;
10742
10885
  invoices: better_auth.StrictEndpoint<"/consumer/invoices/list", {
10743
10886
  method: "GET";
10744
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
10887
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
10745
10888
  session: {
10746
10889
  session: Record<string, any> & {
10747
10890
  id: string;
@@ -10763,8 +10906,15 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10763
10906
  image?: string | null | undefined;
10764
10907
  };
10765
10908
  };
10766
- }>)[];
10909
+ }>>[];
10910
+ query: zod.ZodObject<{
10911
+ page: zod.ZodOptional<zod.ZodCoercedNumber<unknown>>;
10912
+ size: zod.ZodOptional<zod.ZodCoercedNumber<unknown>>;
10913
+ }, zod_v4_core.$strip>;
10767
10914
  }, {
10915
+ hasConsumer: boolean;
10916
+ data: never[];
10917
+ } | {
10768
10918
  hasConsumer: boolean;
10769
10919
  data: {
10770
10920
  created_at?: string;
@@ -10801,7 +10951,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10801
10951
  home_currency_amount_actual?: string | null;
10802
10952
  exchange_rate_at_creation?: string | null;
10803
10953
  consumer_message?: string | null;
10804
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
10954
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
10805
10955
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
10806
10956
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
10807
10957
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -10870,6 +11020,14 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10870
11020
  remaining_amount_in_smallest_unit?: number | null;
10871
11021
  readonly paid_amount_in_smallest_unit?: number;
10872
11022
  }[];
11023
+ pagination: {
11024
+ total_count?: number;
11025
+ max_page?: number;
11026
+ current_page?: number;
11027
+ limit?: number;
11028
+ has_next_page?: boolean;
11029
+ has_previous_page?: boolean;
11030
+ } | undefined;
10873
11031
  }>;
10874
11032
  } & {
10875
11033
  upgradeSubscription: better_auth.StrictEndpoint<"/subscription/upgrade", {
@@ -10886,7 +11044,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10886
11044
  successUrl: zod.ZodOptional<zod.ZodString>;
10887
11045
  failureUrl: zod.ZodOptional<zod.ZodString>;
10888
11046
  }, zod_v4_core.$strict>;
10889
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
11047
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
10890
11048
  session: {
10891
11049
  session: Record<string, any> & {
10892
11050
  id: string;
@@ -10908,7 +11066,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10908
11066
  image?: string | null | undefined;
10909
11067
  };
10910
11068
  };
10911
- }>)[];
11069
+ }>>[];
10912
11070
  }, {
10913
11071
  subscriptionId: string;
10914
11072
  url: string;
@@ -10923,7 +11081,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10923
11081
  query: zod.ZodObject<{
10924
11082
  subscriptionId: zod.ZodString;
10925
11083
  }, zod_v4_core.$strip>;
10926
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
11084
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
10927
11085
  session: {
10928
11086
  session: Record<string, any> & {
10929
11087
  id: string;
@@ -10945,9 +11103,9 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10945
11103
  image?: string | null | undefined;
10946
11104
  };
10947
11105
  };
10948
- }>)[];
11106
+ }>>[];
10949
11107
  }, {
10950
- subscription: Subscription;
11108
+ subscription: Subscription | null;
10951
11109
  synced: boolean;
10952
11110
  }>;
10953
11111
  cancelSubscription: better_auth.StrictEndpoint<"/subscription/cancel", {
@@ -10957,7 +11115,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10957
11115
  cancelRelatedInvoices: zod.ZodOptional<zod.ZodBoolean>;
10958
11116
  cancelAtPeriodEnd: zod.ZodOptional<zod.ZodBoolean>;
10959
11117
  }, zod_v4_core.$strip>;
10960
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
11118
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
10961
11119
  session: {
10962
11120
  session: Record<string, any> & {
10963
11121
  id: string;
@@ -10979,7 +11137,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
10979
11137
  image?: string | null | undefined;
10980
11138
  };
10981
11139
  };
10982
- }>)[];
11140
+ }>>[];
10983
11141
  }, {
10984
11142
  created_at?: string;
10985
11143
  updated_at?: string | null;
@@ -11125,7 +11283,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
11125
11283
  home_currency_amount_actual?: string | null;
11126
11284
  exchange_rate_at_creation?: string | null;
11127
11285
  consumer_message?: string | null;
11128
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
11286
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
11129
11287
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
11130
11288
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
11131
11289
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -11204,7 +11362,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
11204
11362
  plan: zod.ZodString;
11205
11363
  seats: zod.ZodOptional<zod.ZodNumber>;
11206
11364
  }, zod_v4_core.$strict>;
11207
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
11365
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
11208
11366
  session: {
11209
11367
  session: Record<string, any> & {
11210
11368
  id: string;
@@ -11226,7 +11384,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
11226
11384
  image?: string | null | undefined;
11227
11385
  };
11228
11386
  };
11229
- }>)[];
11387
+ }>>[];
11230
11388
  }, {
11231
11389
  mode: string;
11232
11390
  subscriptionId: string;
@@ -11459,7 +11617,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
11459
11617
  home_currency_amount_actual?: string | null;
11460
11618
  exchange_rate_at_creation?: string | null;
11461
11619
  consumer_message?: string | null;
11462
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
11620
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
11463
11621
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
11464
11622
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
11465
11623
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -11539,7 +11697,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
11539
11697
  subscriptionId: zod.ZodString;
11540
11698
  seats: zod.ZodNumber;
11541
11699
  }, zod_v4_core.$strict>;
11542
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
11700
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
11543
11701
  session: {
11544
11702
  session: Record<string, any> & {
11545
11703
  id: string;
@@ -11561,7 +11719,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
11561
11719
  image?: string | null | undefined;
11562
11720
  };
11563
11721
  };
11564
- }>)[];
11722
+ }>>[];
11565
11723
  }, {
11566
11724
  mode: string;
11567
11725
  subscriptionId: string;
@@ -11799,7 +11957,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
11799
11957
  home_currency_amount_actual?: string | null;
11800
11958
  exchange_rate_at_creation?: string | null;
11801
11959
  consumer_message?: string | null;
11802
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
11960
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
11803
11961
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
11804
11962
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
11805
11963
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -11878,7 +12036,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
11878
12036
  body: zod.ZodObject<{
11879
12037
  subscriptionId: zod.ZodString;
11880
12038
  }, zod_v4_core.$strip>;
11881
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
12039
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
11882
12040
  session: {
11883
12041
  session: Record<string, any> & {
11884
12042
  id: string;
@@ -11900,7 +12058,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
11900
12058
  image?: string | null | undefined;
11901
12059
  };
11902
12060
  };
11903
- }>)[];
12061
+ }>>[];
11904
12062
  }, {
11905
12063
  canceled: boolean;
11906
12064
  reused: boolean;
@@ -12049,7 +12207,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
12049
12207
  home_currency_amount_actual?: string | null;
12050
12208
  exchange_rate_at_creation?: string | null;
12051
12209
  consumer_message?: string | null;
12052
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
12210
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
12053
12211
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
12054
12212
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
12055
12213
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -12127,7 +12285,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
12127
12285
  body: zod.ZodObject<{
12128
12286
  subscriptionId: zod.ZodString;
12129
12287
  }, zod_v4_core.$strip>;
12130
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
12288
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
12131
12289
  session: {
12132
12290
  session: Record<string, any> & {
12133
12291
  id: string;
@@ -12149,7 +12307,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
12149
12307
  image?: string | null | undefined;
12150
12308
  };
12151
12309
  };
12152
- }>)[];
12310
+ }>>[];
12153
12311
  }, {
12154
12312
  canceled: boolean;
12155
12313
  reused: boolean;
@@ -12298,7 +12456,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
12298
12456
  home_currency_amount_actual?: string | null;
12299
12457
  exchange_rate_at_creation?: string | null;
12300
12458
  consumer_message?: string | null;
12301
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
12459
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
12302
12460
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
12303
12461
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
12304
12462
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -12376,7 +12534,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
12376
12534
  body: zod.ZodObject<{
12377
12535
  subscriptionId: zod.ZodString;
12378
12536
  }, zod_v4_core.$strip>;
12379
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
12537
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
12380
12538
  session: {
12381
12539
  session: Record<string, any> & {
12382
12540
  id: string;
@@ -12398,7 +12556,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
12398
12556
  image?: string | null | undefined;
12399
12557
  };
12400
12558
  };
12401
- }>)[];
12559
+ }>>[];
12402
12560
  }, {
12403
12561
  uncanceled: boolean;
12404
12562
  subscription: {
@@ -12546,7 +12704,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
12546
12704
  home_currency_amount_actual?: string | null;
12547
12705
  exchange_rate_at_creation?: string | null;
12548
12706
  consumer_message?: string | null;
12549
- status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "DRAFT" | "SENT" | "REJECTED" | "COMPLETED";
12707
+ status?: "CREATED" | "ACCEPTED" | "EXPIRED" | "CANCELED" | "COMPLETED" | "DRAFT" | "SENT" | "REJECTED";
12550
12708
  payment_method?: "OPENBANKING" | "PAYMENTGATEWAY";
12551
12709
  allowed_payment_flow?: "ALL" | "AUTO" | "MANUAL";
12552
12710
  current_payment_flow?: "ALL" | "AUTO" | "MANUAL";
@@ -12627,7 +12785,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
12627
12785
  freezeEndDatetime: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
12628
12786
  notes: zod.ZodOptional<zod.ZodString>;
12629
12787
  }, zod_v4_core.$strip>;
12630
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
12788
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
12631
12789
  session: {
12632
12790
  session: Record<string, any> & {
12633
12791
  id: string;
@@ -12649,7 +12807,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
12649
12807
  image?: string | null | undefined;
12650
12808
  };
12651
12809
  };
12652
- }>)[];
12810
+ }>>[];
12653
12811
  }, {
12654
12812
  created_at?: string;
12655
12813
  updated_at?: string | null;
@@ -12666,7 +12824,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
12666
12824
  body: zod.ZodObject<{
12667
12825
  subscriptionId: zod.ZodString;
12668
12826
  }, zod_v4_core.$strip>;
12669
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
12827
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
12670
12828
  session: {
12671
12829
  session: Record<string, any> & {
12672
12830
  id: string;
@@ -12688,7 +12846,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
12688
12846
  image?: string | null | undefined;
12689
12847
  };
12690
12848
  };
12691
- }>)[];
12849
+ }>>[];
12692
12850
  }, {
12693
12851
  unfrozen: boolean;
12694
12852
  }>;
@@ -12698,7 +12856,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
12698
12856
  subscriptionId: zod.ZodString;
12699
12857
  freezeId: zod.ZodString;
12700
12858
  }, zod_v4_core.$strip>;
12701
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
12859
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
12702
12860
  session: {
12703
12861
  session: Record<string, any> & {
12704
12862
  id: string;
@@ -12720,7 +12878,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
12720
12878
  image?: string | null | undefined;
12721
12879
  };
12722
12880
  };
12723
- }>)[];
12881
+ }>>[];
12724
12882
  }, {
12725
12883
  canceled: boolean;
12726
12884
  freezeId: string;
@@ -12736,7 +12894,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
12736
12894
  organization: "organization";
12737
12895
  }>>;
12738
12896
  }, zod_v4_core.$strip>>;
12739
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
12897
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
12740
12898
  session: {
12741
12899
  session: Record<string, any> & {
12742
12900
  id: string;
@@ -12758,7 +12916,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
12758
12916
  image?: string | null | undefined;
12759
12917
  };
12760
12918
  };
12761
- }>)[];
12919
+ }>>[];
12762
12920
  }, {
12763
12921
  seats: number;
12764
12922
  plan: StreamPayPlanLike | null;
@@ -12769,6 +12927,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
12769
12927
  streampaySubscriptionId: string | null;
12770
12928
  streampayConsumerId: string | null;
12771
12929
  streampayPaymentLinkId: string | null;
12930
+ catalogMapped?: boolean | null;
12772
12931
  planVersion: string | null;
12773
12932
  productId: string | null;
12774
12933
  group: string | null;
@@ -12783,6 +12942,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
12783
12942
  periodStart: Date | null;
12784
12943
  periodEnd: Date | null;
12785
12944
  currentCycleNumber: number | null;
12945
+ renewalCallbackEventId?: string | null;
12786
12946
  trialStart: Date | null;
12787
12947
  trialEnd: Date | null;
12788
12948
  cancelAtPeriodEnd: boolean;
@@ -12813,7 +12973,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
12813
12973
  organization: "organization";
12814
12974
  }>>;
12815
12975
  }, zod_v4_core.$strip>>;
12816
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
12976
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
12817
12977
  session: {
12818
12978
  session: Record<string, any> & {
12819
12979
  id: string;
@@ -12835,7 +12995,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
12835
12995
  image?: string | null | undefined;
12836
12996
  };
12837
12997
  };
12838
- }>)[];
12998
+ }>>[];
12839
12999
  }, {
12840
13000
  seats: number;
12841
13001
  plan: StreamPayPlanLike | null;
@@ -12846,6 +13006,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
12846
13006
  streampaySubscriptionId: string | null;
12847
13007
  streampayConsumerId: string | null;
12848
13008
  streampayPaymentLinkId: string | null;
13009
+ catalogMapped?: boolean | null;
12849
13010
  planVersion: string | null;
12850
13011
  productId: string | null;
12851
13012
  group: string | null;
@@ -12860,6 +13021,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
12860
13021
  periodStart: Date | null;
12861
13022
  periodEnd: Date | null;
12862
13023
  currentCycleNumber: number | null;
13024
+ renewalCallbackEventId?: string | null;
12863
13025
  trialStart: Date | null;
12864
13026
  trialEnd: Date | null;
12865
13027
  cancelAtPeriodEnd: boolean;
@@ -12891,7 +13053,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
12891
13053
  organization: "organization";
12892
13054
  }>>;
12893
13055
  }, zod_v4_core.$strip>;
12894
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
13056
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
12895
13057
  session: {
12896
13058
  session: Record<string, any> & {
12897
13059
  id: string;
@@ -12913,7 +13075,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
12913
13075
  image?: string | null | undefined;
12914
13076
  };
12915
13077
  };
12916
- }>)[];
13078
+ }>>[];
12917
13079
  }, {
12918
13080
  hasFeature: boolean;
12919
13081
  }>;
@@ -12930,7 +13092,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
12930
13092
  organization: "organization";
12931
13093
  }>>;
12932
13094
  }, zod_v4_core.$strip>;
12933
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
13095
+ use: better_auth.Middleware<better_auth.MiddlewareOptions, (inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
12934
13096
  session: {
12935
13097
  session: Record<string, any> & {
12936
13098
  id: string;
@@ -12952,7 +13114,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
12952
13114
  image?: string | null | undefined;
12953
13115
  };
12954
13116
  };
12955
- }>)[];
13117
+ }>>[];
12956
13118
  }, {
12957
13119
  allowed: boolean;
12958
13120
  limit: number;