better-auth-streampay 2.0.0 → 2.1.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, 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, PaymentRefundRequest, SubscriptionUpdate, ConsumerCreate, ConsumerResponse, PaginationParams, ConsumerListResponse, ConsumerUpdate, PaymentLinkDetailed, PaymentLinkListResponse, UpdatePaymentLinkStatusDto, ProductCreate, ProductDto, ProductListResponse, ProductUpdate, CouponCreate, CouponDetailed, CouponListResponse, CouponUpdate, SubscriptionCreate, SubscriptionListResponse, SubscriptionCancel, FreezeSubscriptionCreateRequest, FreezeSubscriptionBase, FreezeListResponse, FreezeSubscriptionUpdateRequest, InvoiceListResponse, InvoiceDetailed, PaymentListResponse, PaymentResponse } from '@streamsdk/typescript';
3
3
  import * as better_auth from 'better-auth';
4
4
  import { GenericEndpointContext, User, UnionToIntersection } from 'better-auth';
5
5
  import * as zod from 'zod';
@@ -17,6 +17,8 @@ declare const $ERROR_CODES: {
17
17
  NOT_FOUND: ErrorCodeEntry<"NOT_FOUND">;
18
18
  VALIDATION_ERROR: ErrorCodeEntry<"VALIDATION_ERROR">;
19
19
  CONSUMER_DUPLICATE: ErrorCodeEntry<"CONSUMER_DUPLICATE">;
20
+ STREAMPAY_CONSUMER_LINK_CONFLICT: ErrorCodeEntry<"STREAMPAY_CONSUMER_LINK_CONFLICT">;
21
+ STREAMPAY_CONSUMER_LINK_WRITE_FAILED: ErrorCodeEntry<"STREAMPAY_CONSUMER_LINK_WRITE_FAILED">;
20
22
  CONSUMER_HAS_ONGOING_ACTIVITY: ErrorCodeEntry<"CONSUMER_HAS_ONGOING_ACTIVITY">;
21
23
  INVOICE_INVALID_STATE: ErrorCodeEntry<"INVOICE_INVALID_STATE">;
22
24
  PAYMENT_DUPLICATE: ErrorCodeEntry<"PAYMENT_DUPLICATE">;
@@ -28,6 +30,7 @@ declare const $ERROR_CODES: {
28
30
  PAYMENT_METHOD_INVALID: ErrorCodeEntry<"PAYMENT_METHOD_INVALID">;
29
31
  PRODUCT_LOCKED: ErrorCodeEntry<"PRODUCT_LOCKED">;
30
32
  COUPON_LOCKED: ErrorCodeEntry<"COUPON_LOCKED">;
33
+ CHECKOUT_CLIENT_FIELDS_FORBIDDEN: ErrorCodeEntry<"CHECKOUT_CLIENT_FIELDS_FORBIDDEN">;
31
34
  SUBSCRIPTION_NOT_FOUND: ErrorCodeEntry<"SUBSCRIPTION_NOT_FOUND">;
32
35
  SUBSCRIPTION_PLAN_NOT_FOUND: ErrorCodeEntry<"SUBSCRIPTION_PLAN_NOT_FOUND">;
33
36
  SUBSCRIPTION_ALREADY_ACTIVE: ErrorCodeEntry<"SUBSCRIPTION_ALREADY_ACTIVE">;
@@ -5601,6 +5604,36 @@ interface StreamPayCustomFieldsSchema {
5601
5604
  properties: Record<string, StreamPayCustomFieldDefinition>;
5602
5605
  required?: string[];
5603
5606
  }
5607
+ type CheckoutUser = User & StreamPaySessionUser & Record<string, unknown>;
5608
+ interface CheckoutResolutionContext {
5609
+ /** Resolved Better Auth user, including app-defined user fields. */
5610
+ user: CheckoutUser | null;
5611
+ /** Validated but untrusted client input. */
5612
+ body: CheckoutParams;
5613
+ }
5614
+ interface CheckoutOverrides {
5615
+ products?: Array<{
5616
+ productId: string;
5617
+ quantity?: number;
5618
+ }>;
5619
+ name?: string;
5620
+ description?: string;
5621
+ successUrl?: string;
5622
+ failureUrl?: string;
5623
+ maxNumberOfPayments?: number;
5624
+ validUntil?: string;
5625
+ couponIds?: string[];
5626
+ metadata?: Record<string, string | number | boolean>;
5627
+ referenceId?: string;
5628
+ }
5629
+ interface CheckoutCreatedContext {
5630
+ user: CheckoutUser | null;
5631
+ referenceId?: string;
5632
+ paymentLinkId: string;
5633
+ url: string;
5634
+ /** The exact payload sent to StreamPay. */
5635
+ payload: CreatePaymentLinkDto;
5636
+ }
5604
5637
  interface CheckoutOptions {
5605
5638
  products?: StreamPayProduct[] | (() => Promise<StreamPayProduct[]>);
5606
5639
  successUrl?: string;
@@ -5609,6 +5642,17 @@ interface CheckoutOptions {
5609
5642
  contactInformationType?: "EMAIL" | "PHONE";
5610
5643
  currency?: CreatePaymentLinkDto["currency"];
5611
5644
  customFields?: StreamPayCustomFieldsSchema;
5645
+ /**
5646
+ * Derive checkout fields on the server for each request. When configured, the
5647
+ * client may only send `referenceId` and `redirect`; all payment fields must be
5648
+ * returned here.
5649
+ */
5650
+ resolveCheckout?: (data: CheckoutResolutionContext, ctx: GenericEndpointContext) => Promise<CheckoutOverrides> | CheckoutOverrides;
5651
+ /**
5652
+ * Persist app state after link creation and before the response is returned.
5653
+ * A thrown error aborts checkout and triggers best-effort link deactivation.
5654
+ */
5655
+ onCheckoutCreated?: (data: CheckoutCreatedContext, ctx: GenericEndpointContext) => Promise<void> | void;
5612
5656
  }
5613
5657
  declare const CheckoutBody: z.ZodObject<{
5614
5658
  products: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
@@ -6214,6 +6258,7 @@ interface StreamPayClient {
6214
6258
  createPaymentLink(input: CreatePaymentLinkDto): Promise<PaymentLinkDetailed>;
6215
6259
  listPaymentLinks(params?: PaginationParams): Promise<PaymentLinkListResponse>;
6216
6260
  getPaymentLink(paymentLinkId: string): Promise<PaymentLinkDetailed>;
6261
+ updatePaymentLinkStatus?(paymentLinkId: string, input: UpdatePaymentLinkStatusDto): Promise<PaymentLinkDetailed>;
6217
6262
  getPaymentUrl(link: PaymentLinkDetailed): string | null;
6218
6263
  createProduct(input: ProductCreate): Promise<ProductDto>;
6219
6264
  listProducts(params?: PaginationParams): Promise<ProductListResponse>;
@@ -11696,6 +11741,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
11696
11741
  type: "string";
11697
11742
  required: false;
11698
11743
  input: false;
11744
+ unique: true;
11699
11745
  };
11700
11746
  };
11701
11747
  };
@@ -11724,4 +11770,4 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
11724
11770
  };
11725
11771
  };
11726
11772
 
11727
- export { $ERROR_CODES as $, type AdminOptions as A, type StreamPayPaymentEventType as B, CheckoutBody as C, DEFAULT_ACCESS_STATUSES as D, type ErrorCodeEntry as E, type FeatureKey as F, type StreamPayPaymentLinkEventType as G, type StreamPayPlan as H, type StreamPayPlanLike as I, type StreamPayPlugin as J, type StreamPayPluginRegistry as K, type LimitCheckResult as L, type StreamPayPlugins as M, type StreamPayProduct as N, type StreamPaySubscriptionEventType as O, PLAN_NAME_METADATA_KEY as P, type StreamPayWebhookData as Q, REFERENCE_ID_METADATA_KEY as R, type StreamPayErrorCode as S, type StreamPayWebhookEnvelope as T, type StreamPayWebhookPayload as U, type Subscription as V, type SubscriptionBillingStatus as W, type SubscriptionCallback as X, type SubscriptionCallbackData as Y, type SubscriptionCallbacks as Z, type SubscriptionReferenceType as _, type StreamPayClient as a, type SubscriptionStatus as a0, type SubscriptionsOptions as a1, type SyncContext as a2, type TrialEligibilityContext as a3, type WebhookEnvelopeHandler as a4, type WebhookHandler as a5, type WebhookHandlers as a6, type WebhookSyncFailure as a7, type WebhooksOptions as a8, admin as a9, checkLimit as aa, checkout as ab, classifyWebhookFailure as ac, dispatchWebhook as ad, hasFeature as ae, hasSubscriptionAccess as af, isKnownStreamPayWebhookPayload as ag, isStreamPayWebhookEnvelope as ah, mapToErrorCode as ai, portal as aj, subscriptionSlotKey as ak, subscriptions as al, syncWebhookPayload as am, webhooks as an, type AuthorizeReferenceContext as b, type CheckoutOptions as c, type CheckoutParams as d, type ClaimExistingConsumerBy as e, type ClaimExistingConsumerIdentifier as f, type ConsumerCreateOverrides as g, type PluginAdapter as h, type PortalOptions as i, REFERENCE_TYPE_METADATA_KEY as j, type ResolvedPlans as k, STREAMPAY_EVENT_TYPES as l, STREAMPAY_INVOICE_EVENT_TYPES as m, STREAMPAY_PAYMENT_EVENT_TYPES as n, STREAMPAY_PAYMENT_LINK_EVENT_TYPES as o, STREAMPAY_SUBSCRIPTION_EVENT_TYPES as p, SUBSCRIPTION_ROW_ID_METADATA_KEY as q, type StreamPayCustomFieldDefinition as r, streampay as s, type StreamPayCustomFieldsSchema as t, type StreamPayEndpoints as u, type StreamPayEntityType as v, type StreamPayEventType as w, type StreamPayHookContext as x, type StreamPayInvoiceEventType as y, type StreamPayOptions as z };
11773
+ export { $ERROR_CODES as $, type AdminOptions as A, type StreamPayHookContext as B, CheckoutBody as C, DEFAULT_ACCESS_STATUSES as D, type ErrorCodeEntry as E, type FeatureKey as F, type StreamPayInvoiceEventType as G, type StreamPayOptions as H, type StreamPayPaymentEventType as I, type StreamPayPaymentLinkEventType as J, type StreamPayPlan as K, type LimitCheckResult as L, type StreamPayPlanLike as M, type StreamPayPlugin as N, type StreamPayPluginRegistry as O, PLAN_NAME_METADATA_KEY as P, type StreamPayPlugins as Q, REFERENCE_ID_METADATA_KEY as R, type StreamPayErrorCode as S, type StreamPayProduct as T, type StreamPaySubscriptionEventType as U, type StreamPayWebhookData as V, type StreamPayWebhookEnvelope as W, type StreamPayWebhookPayload as X, type Subscription as Y, type SubscriptionBillingStatus as Z, type SubscriptionCallback as _, type StreamPayClient as a, type SubscriptionCallbackData as a0, type SubscriptionCallbacks as a1, type SubscriptionReferenceType as a2, type SubscriptionStatus as a3, type SubscriptionsOptions as a4, type SyncContext as a5, type TrialEligibilityContext as a6, type WebhookEnvelopeHandler as a7, type WebhookHandler as a8, type WebhookHandlers as a9, type WebhookSyncFailure as aa, type WebhooksOptions as ab, admin as ac, checkLimit as ad, checkout as ae, classifyWebhookFailure as af, dispatchWebhook as ag, hasFeature as ah, hasSubscriptionAccess as ai, isKnownStreamPayWebhookPayload as aj, isStreamPayWebhookEnvelope as ak, mapToErrorCode as al, portal as am, subscriptionSlotKey as an, subscriptions as ao, syncWebhookPayload as ap, webhooks as aq, type AuthorizeReferenceContext as b, type CheckoutCreatedContext as c, type CheckoutOptions as d, type CheckoutOverrides as e, type CheckoutParams as f, type CheckoutResolutionContext as g, type ClaimExistingConsumerBy as h, type ClaimExistingConsumerIdentifier as i, type ConsumerCreateOverrides as j, type PluginAdapter as k, type PortalOptions as l, REFERENCE_TYPE_METADATA_KEY as m, type ResolvedPlans as n, STREAMPAY_EVENT_TYPES as o, STREAMPAY_INVOICE_EVENT_TYPES as p, STREAMPAY_PAYMENT_EVENT_TYPES as q, STREAMPAY_PAYMENT_LINK_EVENT_TYPES as r, streampay as s, STREAMPAY_SUBSCRIPTION_EVENT_TYPES as t, SUBSCRIPTION_ROW_ID_METADATA_KEY as u, type StreamPayCustomFieldDefinition as v, type StreamPayCustomFieldsSchema as w, type StreamPayEndpoints as x, type StreamPayEntityType as y, type StreamPayEventType as z };
@@ -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, 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, PaymentRefundRequest, SubscriptionUpdate, ConsumerCreate, ConsumerResponse, PaginationParams, ConsumerListResponse, ConsumerUpdate, PaymentLinkDetailed, PaymentLinkListResponse, UpdatePaymentLinkStatusDto, ProductCreate, ProductDto, ProductListResponse, ProductUpdate, CouponCreate, CouponDetailed, CouponListResponse, CouponUpdate, SubscriptionCreate, SubscriptionListResponse, SubscriptionCancel, FreezeSubscriptionCreateRequest, FreezeSubscriptionBase, FreezeListResponse, FreezeSubscriptionUpdateRequest, InvoiceListResponse, InvoiceDetailed, PaymentListResponse, PaymentResponse } from '@streamsdk/typescript';
3
3
  import * as better_auth from 'better-auth';
4
4
  import { GenericEndpointContext, User, UnionToIntersection } from 'better-auth';
5
5
  import * as zod from 'zod';
@@ -17,6 +17,8 @@ declare const $ERROR_CODES: {
17
17
  NOT_FOUND: ErrorCodeEntry<"NOT_FOUND">;
18
18
  VALIDATION_ERROR: ErrorCodeEntry<"VALIDATION_ERROR">;
19
19
  CONSUMER_DUPLICATE: ErrorCodeEntry<"CONSUMER_DUPLICATE">;
20
+ STREAMPAY_CONSUMER_LINK_CONFLICT: ErrorCodeEntry<"STREAMPAY_CONSUMER_LINK_CONFLICT">;
21
+ STREAMPAY_CONSUMER_LINK_WRITE_FAILED: ErrorCodeEntry<"STREAMPAY_CONSUMER_LINK_WRITE_FAILED">;
20
22
  CONSUMER_HAS_ONGOING_ACTIVITY: ErrorCodeEntry<"CONSUMER_HAS_ONGOING_ACTIVITY">;
21
23
  INVOICE_INVALID_STATE: ErrorCodeEntry<"INVOICE_INVALID_STATE">;
22
24
  PAYMENT_DUPLICATE: ErrorCodeEntry<"PAYMENT_DUPLICATE">;
@@ -28,6 +30,7 @@ declare const $ERROR_CODES: {
28
30
  PAYMENT_METHOD_INVALID: ErrorCodeEntry<"PAYMENT_METHOD_INVALID">;
29
31
  PRODUCT_LOCKED: ErrorCodeEntry<"PRODUCT_LOCKED">;
30
32
  COUPON_LOCKED: ErrorCodeEntry<"COUPON_LOCKED">;
33
+ CHECKOUT_CLIENT_FIELDS_FORBIDDEN: ErrorCodeEntry<"CHECKOUT_CLIENT_FIELDS_FORBIDDEN">;
31
34
  SUBSCRIPTION_NOT_FOUND: ErrorCodeEntry<"SUBSCRIPTION_NOT_FOUND">;
32
35
  SUBSCRIPTION_PLAN_NOT_FOUND: ErrorCodeEntry<"SUBSCRIPTION_PLAN_NOT_FOUND">;
33
36
  SUBSCRIPTION_ALREADY_ACTIVE: ErrorCodeEntry<"SUBSCRIPTION_ALREADY_ACTIVE">;
@@ -5601,6 +5604,36 @@ interface StreamPayCustomFieldsSchema {
5601
5604
  properties: Record<string, StreamPayCustomFieldDefinition>;
5602
5605
  required?: string[];
5603
5606
  }
5607
+ type CheckoutUser = User & StreamPaySessionUser & Record<string, unknown>;
5608
+ interface CheckoutResolutionContext {
5609
+ /** Resolved Better Auth user, including app-defined user fields. */
5610
+ user: CheckoutUser | null;
5611
+ /** Validated but untrusted client input. */
5612
+ body: CheckoutParams;
5613
+ }
5614
+ interface CheckoutOverrides {
5615
+ products?: Array<{
5616
+ productId: string;
5617
+ quantity?: number;
5618
+ }>;
5619
+ name?: string;
5620
+ description?: string;
5621
+ successUrl?: string;
5622
+ failureUrl?: string;
5623
+ maxNumberOfPayments?: number;
5624
+ validUntil?: string;
5625
+ couponIds?: string[];
5626
+ metadata?: Record<string, string | number | boolean>;
5627
+ referenceId?: string;
5628
+ }
5629
+ interface CheckoutCreatedContext {
5630
+ user: CheckoutUser | null;
5631
+ referenceId?: string;
5632
+ paymentLinkId: string;
5633
+ url: string;
5634
+ /** The exact payload sent to StreamPay. */
5635
+ payload: CreatePaymentLinkDto;
5636
+ }
5604
5637
  interface CheckoutOptions {
5605
5638
  products?: StreamPayProduct[] | (() => Promise<StreamPayProduct[]>);
5606
5639
  successUrl?: string;
@@ -5609,6 +5642,17 @@ interface CheckoutOptions {
5609
5642
  contactInformationType?: "EMAIL" | "PHONE";
5610
5643
  currency?: CreatePaymentLinkDto["currency"];
5611
5644
  customFields?: StreamPayCustomFieldsSchema;
5645
+ /**
5646
+ * Derive checkout fields on the server for each request. When configured, the
5647
+ * client may only send `referenceId` and `redirect`; all payment fields must be
5648
+ * returned here.
5649
+ */
5650
+ resolveCheckout?: (data: CheckoutResolutionContext, ctx: GenericEndpointContext) => Promise<CheckoutOverrides> | CheckoutOverrides;
5651
+ /**
5652
+ * Persist app state after link creation and before the response is returned.
5653
+ * A thrown error aborts checkout and triggers best-effort link deactivation.
5654
+ */
5655
+ onCheckoutCreated?: (data: CheckoutCreatedContext, ctx: GenericEndpointContext) => Promise<void> | void;
5612
5656
  }
5613
5657
  declare const CheckoutBody: z.ZodObject<{
5614
5658
  products: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
@@ -6214,6 +6258,7 @@ interface StreamPayClient {
6214
6258
  createPaymentLink(input: CreatePaymentLinkDto): Promise<PaymentLinkDetailed>;
6215
6259
  listPaymentLinks(params?: PaginationParams): Promise<PaymentLinkListResponse>;
6216
6260
  getPaymentLink(paymentLinkId: string): Promise<PaymentLinkDetailed>;
6261
+ updatePaymentLinkStatus?(paymentLinkId: string, input: UpdatePaymentLinkStatusDto): Promise<PaymentLinkDetailed>;
6217
6262
  getPaymentUrl(link: PaymentLinkDetailed): string | null;
6218
6263
  createProduct(input: ProductCreate): Promise<ProductDto>;
6219
6264
  listProducts(params?: PaginationParams): Promise<ProductListResponse>;
@@ -11696,6 +11741,7 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
11696
11741
  type: "string";
11697
11742
  required: false;
11698
11743
  input: false;
11744
+ unique: true;
11699
11745
  };
11700
11746
  };
11701
11747
  };
@@ -11724,4 +11770,4 @@ declare const streampay: <O extends StreamPayOptions>(options: O) => {
11724
11770
  };
11725
11771
  };
11726
11772
 
11727
- export { $ERROR_CODES as $, type AdminOptions as A, type StreamPayPaymentEventType as B, CheckoutBody as C, DEFAULT_ACCESS_STATUSES as D, type ErrorCodeEntry as E, type FeatureKey as F, type StreamPayPaymentLinkEventType as G, type StreamPayPlan as H, type StreamPayPlanLike as I, type StreamPayPlugin as J, type StreamPayPluginRegistry as K, type LimitCheckResult as L, type StreamPayPlugins as M, type StreamPayProduct as N, type StreamPaySubscriptionEventType as O, PLAN_NAME_METADATA_KEY as P, type StreamPayWebhookData as Q, REFERENCE_ID_METADATA_KEY as R, type StreamPayErrorCode as S, type StreamPayWebhookEnvelope as T, type StreamPayWebhookPayload as U, type Subscription as V, type SubscriptionBillingStatus as W, type SubscriptionCallback as X, type SubscriptionCallbackData as Y, type SubscriptionCallbacks as Z, type SubscriptionReferenceType as _, type StreamPayClient as a, type SubscriptionStatus as a0, type SubscriptionsOptions as a1, type SyncContext as a2, type TrialEligibilityContext as a3, type WebhookEnvelopeHandler as a4, type WebhookHandler as a5, type WebhookHandlers as a6, type WebhookSyncFailure as a7, type WebhooksOptions as a8, admin as a9, checkLimit as aa, checkout as ab, classifyWebhookFailure as ac, dispatchWebhook as ad, hasFeature as ae, hasSubscriptionAccess as af, isKnownStreamPayWebhookPayload as ag, isStreamPayWebhookEnvelope as ah, mapToErrorCode as ai, portal as aj, subscriptionSlotKey as ak, subscriptions as al, syncWebhookPayload as am, webhooks as an, type AuthorizeReferenceContext as b, type CheckoutOptions as c, type CheckoutParams as d, type ClaimExistingConsumerBy as e, type ClaimExistingConsumerIdentifier as f, type ConsumerCreateOverrides as g, type PluginAdapter as h, type PortalOptions as i, REFERENCE_TYPE_METADATA_KEY as j, type ResolvedPlans as k, STREAMPAY_EVENT_TYPES as l, STREAMPAY_INVOICE_EVENT_TYPES as m, STREAMPAY_PAYMENT_EVENT_TYPES as n, STREAMPAY_PAYMENT_LINK_EVENT_TYPES as o, STREAMPAY_SUBSCRIPTION_EVENT_TYPES as p, SUBSCRIPTION_ROW_ID_METADATA_KEY as q, type StreamPayCustomFieldDefinition as r, streampay as s, type StreamPayCustomFieldsSchema as t, type StreamPayEndpoints as u, type StreamPayEntityType as v, type StreamPayEventType as w, type StreamPayHookContext as x, type StreamPayInvoiceEventType as y, type StreamPayOptions as z };
11773
+ export { $ERROR_CODES as $, type AdminOptions as A, type StreamPayHookContext as B, CheckoutBody as C, DEFAULT_ACCESS_STATUSES as D, type ErrorCodeEntry as E, type FeatureKey as F, type StreamPayInvoiceEventType as G, type StreamPayOptions as H, type StreamPayPaymentEventType as I, type StreamPayPaymentLinkEventType as J, type StreamPayPlan as K, type LimitCheckResult as L, type StreamPayPlanLike as M, type StreamPayPlugin as N, type StreamPayPluginRegistry as O, PLAN_NAME_METADATA_KEY as P, type StreamPayPlugins as Q, REFERENCE_ID_METADATA_KEY as R, type StreamPayErrorCode as S, type StreamPayProduct as T, type StreamPaySubscriptionEventType as U, type StreamPayWebhookData as V, type StreamPayWebhookEnvelope as W, type StreamPayWebhookPayload as X, type Subscription as Y, type SubscriptionBillingStatus as Z, type SubscriptionCallback as _, type StreamPayClient as a, type SubscriptionCallbackData as a0, type SubscriptionCallbacks as a1, type SubscriptionReferenceType as a2, type SubscriptionStatus as a3, type SubscriptionsOptions as a4, type SyncContext as a5, type TrialEligibilityContext as a6, type WebhookEnvelopeHandler as a7, type WebhookHandler as a8, type WebhookHandlers as a9, type WebhookSyncFailure as aa, type WebhooksOptions as ab, admin as ac, checkLimit as ad, checkout as ae, classifyWebhookFailure as af, dispatchWebhook as ag, hasFeature as ah, hasSubscriptionAccess as ai, isKnownStreamPayWebhookPayload as aj, isStreamPayWebhookEnvelope as ak, mapToErrorCode as al, portal as am, subscriptionSlotKey as an, subscriptions as ao, syncWebhookPayload as ap, webhooks as aq, type AuthorizeReferenceContext as b, type CheckoutCreatedContext as c, type CheckoutOptions as d, type CheckoutOverrides as e, type CheckoutParams as f, type CheckoutResolutionContext as g, type ClaimExistingConsumerBy as h, type ClaimExistingConsumerIdentifier as i, type ConsumerCreateOverrides as j, type PluginAdapter as k, type PortalOptions as l, REFERENCE_TYPE_METADATA_KEY as m, type ResolvedPlans as n, STREAMPAY_EVENT_TYPES as o, STREAMPAY_INVOICE_EVENT_TYPES as p, STREAMPAY_PAYMENT_EVENT_TYPES as q, STREAMPAY_PAYMENT_LINK_EVENT_TYPES as r, streampay as s, STREAMPAY_SUBSCRIPTION_EVENT_TYPES as t, SUBSCRIPTION_ROW_ID_METADATA_KEY as u, type StreamPayCustomFieldDefinition as v, type StreamPayCustomFieldsSchema as w, type StreamPayEndpoints as x, type StreamPayEntityType as y, type StreamPayEventType as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "better-auth-streampay",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "description": "Community Better Auth plugin for StreamPay with consumers, checkout, portal, subscriptions, and signed webhooks. Not affiliated with Stream.",
5
5
  "license": "MIT",
6
6
  "type": "module",