@shware/purchase 5.1.0 → 5.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/dist/app-store/config.d.cts +1 -2
  2. package/dist/app-store/config.d.cts.map +1 -1
  3. package/dist/app-store/config.d.mts +1 -2
  4. package/dist/app-store/config.d.mts.map +1 -1
  5. package/dist/app-store/handler.d.cts +2 -3
  6. package/dist/app-store/handler.d.cts.map +1 -1
  7. package/dist/app-store/handler.d.mts +2 -3
  8. package/dist/app-store/handler.d.mts.map +1 -1
  9. package/dist/app-store/mapper.d.cts +2 -3
  10. package/dist/app-store/mapper.d.cts.map +1 -1
  11. package/dist/app-store/mapper.d.mts +2 -3
  12. package/dist/app-store/mapper.d.mts.map +1 -1
  13. package/dist/google-play/config.d.cts +1 -2
  14. package/dist/google-play/config.d.cts.map +1 -1
  15. package/dist/google-play/config.d.mts +1 -2
  16. package/dist/google-play/config.d.mts.map +1 -1
  17. package/dist/google-play/mapper.d.cts +4 -5
  18. package/dist/google-play/mapper.d.cts.map +1 -1
  19. package/dist/google-play/mapper.d.mts +4 -5
  20. package/dist/google-play/mapper.d.mts.map +1 -1
  21. package/dist/google-play/real-time-developer-notification.d.cts +16 -17
  22. package/dist/google-play/real-time-developer-notification.d.cts.map +1 -1
  23. package/dist/google-play/real-time-developer-notification.d.mts +16 -17
  24. package/dist/google-play/real-time-developer-notification.d.mts.map +1 -1
  25. package/dist/stripe/config.d.cts +3 -4
  26. package/dist/stripe/config.d.cts.map +1 -1
  27. package/dist/stripe/config.d.mts +3 -4
  28. package/dist/stripe/config.d.mts.map +1 -1
  29. package/dist/stripe/handler.d.cts +1 -2
  30. package/dist/stripe/handler.d.cts.map +1 -1
  31. package/dist/stripe/handler.d.mts +1 -2
  32. package/dist/stripe/handler.d.mts.map +1 -1
  33. package/dist/stripe/mapper.d.cts +22 -23
  34. package/dist/stripe/mapper.d.cts.map +1 -1
  35. package/dist/stripe/mapper.d.mts +22 -23
  36. package/dist/stripe/mapper.d.mts.map +1 -1
  37. package/dist/stripe/metadata.d.cts +1 -2
  38. package/dist/stripe/metadata.d.cts.map +1 -1
  39. package/dist/stripe/metadata.d.mts +1 -2
  40. package/dist/stripe/metadata.d.mts.map +1 -1
  41. package/dist/stripe/pending-checkout.d.cts +3 -4
  42. package/dist/stripe/pending-checkout.d.cts.map +1 -1
  43. package/dist/stripe/pending-checkout.d.mts +3 -4
  44. package/dist/stripe/pending-checkout.d.mts.map +1 -1
  45. package/dist/stripe/schema.d.cts +5 -5
  46. package/dist/stripe/schema.d.cts.map +1 -1
  47. package/dist/stripe/schema.d.mts +5 -5
  48. package/dist/stripe/schema.d.mts.map +1 -1
  49. package/dist/subscription/index.d.cts +12 -13
  50. package/dist/subscription/index.d.cts.map +1 -1
  51. package/dist/subscription/index.d.mts +12 -13
  52. package/dist/subscription/index.d.mts.map +1 -1
  53. package/dist/types.d.cts +2 -3
  54. package/dist/types.d.cts.map +1 -1
  55. package/dist/types.d.mts +2 -3
  56. package/dist/types.d.mts.map +1 -1
  57. package/package.json +6 -6
@@ -1,8 +1,8 @@
1
1
  import { CancellationDetails, SubscriptionStatus } from "../subscription/index.cjs";
2
2
  import { Stripe } from "stripe";
3
3
  //#region src/stripe/mapper.d.ts
4
- declare function mapTime<T extends number | null>(stripeTimestampSeconds: T): T extends number ? string : null;
5
- type Price = {
4
+ export declare function mapTime<T extends number | null>(stripeTimestampSeconds: T): T extends number ? string : null;
5
+ export type Price = {
6
6
  id: string;
7
7
  type: Stripe.Price.Type;
8
8
  active: boolean;
@@ -12,8 +12,8 @@ type Price = {
12
12
  unit_amount_decimal: string | null;
13
13
  recurring: Stripe.Price.Recurring | null;
14
14
  };
15
- declare function mapPrice(price: Stripe.Price): Price;
16
- interface LineItem {
15
+ export declare function mapPrice(price: Stripe.Price): Price;
16
+ export interface LineItem {
17
17
  id: string;
18
18
  currency: string;
19
19
  quantity: number | null;
@@ -24,9 +24,9 @@ interface LineItem {
24
24
  amount_discount: number;
25
25
  price: Price | null;
26
26
  }
27
- declare function mapLineItem(item: Stripe.LineItem): LineItem;
28
- type PaymentStatus = Stripe.Checkout.Session.PaymentStatus;
29
- interface CheckoutSession {
27
+ export declare function mapLineItem(item: Stripe.LineItem): LineItem;
28
+ export type PaymentStatus = Stripe.Checkout.Session.PaymentStatus;
29
+ export interface CheckoutSession {
30
30
  id: string;
31
31
  url: string | null;
32
32
  coupon: string | undefined;
@@ -37,8 +37,8 @@ interface CheckoutSession {
37
37
  amount_total: number | null;
38
38
  line_items: LineItem[] | undefined;
39
39
  }
40
- declare function mapCheckoutSession(session: Stripe.Checkout.Session): CheckoutSession;
41
- declare function mapInvoice(i: Stripe.Invoice): {
40
+ export declare function mapCheckoutSession(session: Stripe.Checkout.Session): CheckoutSession;
41
+ export declare function mapInvoice(i: Stripe.Invoice): {
42
42
  id: string;
43
43
  number: string | null;
44
44
  total: number;
@@ -56,7 +56,7 @@ declare function mapInvoice(i: Stripe.Invoice): {
56
56
  period_start: number;
57
57
  period_end: number;
58
58
  };
59
- declare function mapPaymentIntent(intent: Stripe.PaymentIntent): {
59
+ export declare function mapPaymentIntent(intent: Stripe.PaymentIntent): {
60
60
  id: string;
61
61
  amount: number;
62
62
  amount_capturable: number;
@@ -67,7 +67,7 @@ declare function mapPaymentIntent(intent: Stripe.PaymentIntent): {
67
67
  status: Stripe.PaymentIntent.Status;
68
68
  created: number;
69
69
  };
70
- declare function mapCharge(charge: Stripe.Charge): {
70
+ export declare function mapCharge(charge: Stripe.Charge): {
71
71
  id: string;
72
72
  description: string | null;
73
73
  currency: string;
@@ -91,7 +91,7 @@ declare function mapCharge(charge: Stripe.Charge): {
91
91
  created: number;
92
92
  } | undefined;
93
93
  };
94
- type ProductPrice = {
94
+ export type ProductPrice = {
95
95
  id: string;
96
96
  type: Stripe.Price.Type;
97
97
  unit_amount: number;
@@ -103,11 +103,11 @@ type ProductPrice = {
103
103
  livemode: Stripe.Product['livemode'];
104
104
  };
105
105
  };
106
- declare function mapSubscriptionStatus(status: Stripe.Subscription.Status): SubscriptionStatus;
107
- declare const ZERO_DECIMAL_CURRENCIES: string[];
108
- declare function minorUnits(currency: string): 1 | 100;
109
- declare function price(value: number, currency: string): number;
110
- interface Item {
106
+ export declare function mapSubscriptionStatus(status: Stripe.Subscription.Status): SubscriptionStatus;
107
+ export declare const ZERO_DECIMAL_CURRENCIES: string[];
108
+ export declare function minorUnits(currency: string): 1 | 100;
109
+ export declare function price(value: number, currency: string): number;
110
+ export interface Item {
111
111
  item_id: string;
112
112
  item_name: string;
113
113
  affiliation?: 'Google Store' | (string & {});
@@ -127,7 +127,7 @@ interface Item {
127
127
  price?: number;
128
128
  quantity?: number;
129
129
  }
130
- interface PurchaseProperties {
130
+ export interface PurchaseProperties {
131
131
  currency: string;
132
132
  value: number;
133
133
  transaction_id: string;
@@ -136,21 +136,20 @@ interface PurchaseProperties {
136
136
  tax?: number;
137
137
  items?: Item[];
138
138
  }
139
- interface BeginCheckoutProperties {
139
+ export interface BeginCheckoutProperties {
140
140
  currency: string;
141
141
  value: number;
142
142
  coupon?: string;
143
143
  items: Item[];
144
144
  }
145
- declare function getPurchaseProperties(session: CheckoutSession): PurchaseProperties;
146
- declare function getBeginCheckoutProperties(p: ProductPrice): BeginCheckoutProperties;
145
+ export declare function getPurchaseProperties(session: CheckoutSession): PurchaseProperties;
146
+ export declare function getBeginCheckoutProperties(p: ProductPrice): BeginCheckoutProperties;
147
147
  /**
148
148
  * Stripe's `cancellation_details` in the shared shape. The object is present on every
149
149
  * subscription with all three fields null, so an active one maps to null rather than an empty
150
150
  * record. `reason` says who acted: `cancellation_requested` is the customer (or us on their
151
151
  * behalf), the payment reasons are Stripe ending it.
152
152
  */
153
- declare function mapCancellationDetails(subscription: Pick<Stripe.Subscription, 'cancellation_details'>): CancellationDetails | null;
153
+ export declare function mapCancellationDetails(subscription: Pick<Stripe.Subscription, 'cancellation_details'>): CancellationDetails | null;
154
154
  //#endregion
155
- export { BeginCheckoutProperties, CheckoutSession, Item, LineItem, PaymentStatus, Price, ProductPrice, PurchaseProperties, ZERO_DECIMAL_CURRENCIES, getBeginCheckoutProperties, getPurchaseProperties, mapCancellationDetails, mapCharge, mapCheckoutSession, mapInvoice, mapLineItem, mapPaymentIntent, mapPrice, mapSubscriptionStatus, mapTime, minorUnits, price };
156
155
  //# sourceMappingURL=mapper.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mapper.d.cts","names":[],"sources":["../../src/stripe/mapper.ts"],"mappings":";;;iBAQgB,QAAQ,yBACtB,wBAAwB,IACvB;KAKS;EACV;EACA,MAAM,OAAO,MAAM;EACnB;EACA,gBAAgB,OAAO,MAAM;EAC7B,UAAU,OAAO;EACjB;EACA;EACA,WAAW,OAAO,MAAM;;iBAGV,SAAS,OAAO,OAAO,QAAQ;UAa9B;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,OAAO;;iBAGO,YAAY,MAAM,OAAO,WAAW;KAoBxC,gBAAgB,OAAO,SAAS,QAAQ;UAMnC;EACf;EACA;EACA;EACA;EACA;EACA,gBAAgB;EAChB;EACA;EACA,YAAY;;iBAGE,mBAAmB,SAAS,OAAO,SAAS,UAAU;iBA0BtD,WAAW,GAAG,OAAO;EAEjC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,gBAAc,OAAA,QAAA;EACd;EACA;EACA;EACA,QAAM,OAAA,QAAA;EACN;EACA;EACA;;iBAIY,iBAAiB,QAAQ,OAAO;EAE5C;EACA;EACA;EACA;EACA;EACA;EACA;EACA,QAAM,OAAA,cAAA;EACN;;iBAIY,UAAU,QAAQ,OAAO;EAErC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,QAAM,OAAA,OAAA;EACN;EACA;;;;;;;;;;;;KAOQ;EACV;EACA,MAAM,OAAO,MAAM;EACnB;EACA,UAAU,OAAO;EACjB;IACE,IAAI,OAAO;IACX,MAAM,OAAO;IACb,aAAa,OAAO;IACpB,UAAU,OAAO;;;iBAIL,sBAAsB,QAAQ,OAAO,aAAa,SAAS;cAyB9D;iBAmBG,WAAW;iBAIX,MAAM,eAAe;UAIpB;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;UAGe;EACf;EACA;EACA;EACA;EACA;EACA;EACA,QAAQ;;UAGO;EACf;EACA;EACA;EACA,OAAO;;iBAqCO,sBAAsB,SAAS,kBAAkB;iBA2BjD,2BAA2B,GAAG,eAAe;;;;;;;iBAoB7C,uBACd,cAAc,KAAK,OAAO,wCACzB"}
1
+ {"version":3,"file":"mapper.d.cts","names":[],"sources":["../../src/stripe/mapper.ts"],"mappings":";;;wBAQgB,QAAQ,yBACtB,wBAAwB,IACvB;YAKS;EACV;EACA,MAAM,OAAO,MAAM;EACnB;EACA,gBAAgB,OAAO,MAAM;EAC7B,UAAU,OAAO;EACjB;EACA;EACA,WAAW,OAAO,MAAM;;wBAGV,SAAS,OAAO,OAAO,QAAQ;iBAa9B;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,OAAO;;wBAGO,YAAY,MAAM,OAAO,WAAW;YAoBxC,gBAAgB,OAAO,SAAS,QAAQ;iBAMnC;EACf;EACA;EACA;EACA;EACA;EACA,gBAAgB;EAChB;EACA;EACA,YAAY;;wBAGE,mBAAmB,SAAS,OAAO,SAAS,UAAU;wBA0BtD,WAAW,GAAG,OAAO;EAEjC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,gBAAc,OAAA,QAAA;EACd;EACA;EACA;EACA,QAAM,OAAA,QAAA;EACN;EACA;EACA;;wBAIY,iBAAiB,QAAQ,OAAO;EAE5C;EACA;EACA;EACA;EACA;EACA;EACA;EACA,QAAM,OAAA,cAAA;EACN;;wBAIY,UAAU,QAAQ,OAAO;EAErC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,QAAM,OAAA,OAAA;EACN;EACA;;;;;;;;;;;;YAOQ;EACV;EACA,MAAM,OAAO,MAAM;EACnB;EACA,UAAU,OAAO;EACjB;IACE,IAAI,OAAO;IACX,MAAM,OAAO;IACb,aAAa,OAAO;IACpB,UAAU,OAAO;;;wBAIL,sBAAsB,QAAQ,OAAO,aAAa,SAAS;qBAyB9D;wBAmBG,WAAW;wBAIX,MAAM,eAAe;iBAIpB;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;iBAGe;EACf;EACA;EACA;EACA;EACA;EACA;EACA,QAAQ;;iBAGO;EACf;EACA;EACA;EACA,OAAO;;wBAqCO,sBAAsB,SAAS,kBAAkB;wBA2BjD,2BAA2B,GAAG,eAAe;;;;;;;wBAoB7C,uBACd,cAAc,KAAK,OAAO,wCACzB"}
@@ -1,8 +1,8 @@
1
1
  import { CancellationDetails, SubscriptionStatus } from "../subscription/index.mjs";
2
2
  import { Stripe } from "stripe";
3
3
  //#region src/stripe/mapper.d.ts
4
- declare function mapTime<T extends number | null>(stripeTimestampSeconds: T): T extends number ? string : null;
5
- type Price = {
4
+ export declare function mapTime<T extends number | null>(stripeTimestampSeconds: T): T extends number ? string : null;
5
+ export type Price = {
6
6
  id: string;
7
7
  type: Stripe.Price.Type;
8
8
  active: boolean;
@@ -12,8 +12,8 @@ type Price = {
12
12
  unit_amount_decimal: string | null;
13
13
  recurring: Stripe.Price.Recurring | null;
14
14
  };
15
- declare function mapPrice(price: Stripe.Price): Price;
16
- interface LineItem {
15
+ export declare function mapPrice(price: Stripe.Price): Price;
16
+ export interface LineItem {
17
17
  id: string;
18
18
  currency: string;
19
19
  quantity: number | null;
@@ -24,9 +24,9 @@ interface LineItem {
24
24
  amount_discount: number;
25
25
  price: Price | null;
26
26
  }
27
- declare function mapLineItem(item: Stripe.LineItem): LineItem;
28
- type PaymentStatus = Stripe.Checkout.Session.PaymentStatus;
29
- interface CheckoutSession {
27
+ export declare function mapLineItem(item: Stripe.LineItem): LineItem;
28
+ export type PaymentStatus = Stripe.Checkout.Session.PaymentStatus;
29
+ export interface CheckoutSession {
30
30
  id: string;
31
31
  url: string | null;
32
32
  coupon: string | undefined;
@@ -37,8 +37,8 @@ interface CheckoutSession {
37
37
  amount_total: number | null;
38
38
  line_items: LineItem[] | undefined;
39
39
  }
40
- declare function mapCheckoutSession(session: Stripe.Checkout.Session): CheckoutSession;
41
- declare function mapInvoice(i: Stripe.Invoice): {
40
+ export declare function mapCheckoutSession(session: Stripe.Checkout.Session): CheckoutSession;
41
+ export declare function mapInvoice(i: Stripe.Invoice): {
42
42
  id: string;
43
43
  number: string | null;
44
44
  total: number;
@@ -56,7 +56,7 @@ declare function mapInvoice(i: Stripe.Invoice): {
56
56
  period_start: number;
57
57
  period_end: number;
58
58
  };
59
- declare function mapPaymentIntent(intent: Stripe.PaymentIntent): {
59
+ export declare function mapPaymentIntent(intent: Stripe.PaymentIntent): {
60
60
  id: string;
61
61
  amount: number;
62
62
  amount_capturable: number;
@@ -67,7 +67,7 @@ declare function mapPaymentIntent(intent: Stripe.PaymentIntent): {
67
67
  status: Stripe.PaymentIntent.Status;
68
68
  created: number;
69
69
  };
70
- declare function mapCharge(charge: Stripe.Charge): {
70
+ export declare function mapCharge(charge: Stripe.Charge): {
71
71
  id: string;
72
72
  description: string | null;
73
73
  currency: string;
@@ -91,7 +91,7 @@ declare function mapCharge(charge: Stripe.Charge): {
91
91
  created: number;
92
92
  } | undefined;
93
93
  };
94
- type ProductPrice = {
94
+ export type ProductPrice = {
95
95
  id: string;
96
96
  type: Stripe.Price.Type;
97
97
  unit_amount: number;
@@ -103,11 +103,11 @@ type ProductPrice = {
103
103
  livemode: Stripe.Product['livemode'];
104
104
  };
105
105
  };
106
- declare function mapSubscriptionStatus(status: Stripe.Subscription.Status): SubscriptionStatus;
107
- declare const ZERO_DECIMAL_CURRENCIES: string[];
108
- declare function minorUnits(currency: string): 1 | 100;
109
- declare function price(value: number, currency: string): number;
110
- interface Item {
106
+ export declare function mapSubscriptionStatus(status: Stripe.Subscription.Status): SubscriptionStatus;
107
+ export declare const ZERO_DECIMAL_CURRENCIES: string[];
108
+ export declare function minorUnits(currency: string): 1 | 100;
109
+ export declare function price(value: number, currency: string): number;
110
+ export interface Item {
111
111
  item_id: string;
112
112
  item_name: string;
113
113
  affiliation?: 'Google Store' | (string & {});
@@ -127,7 +127,7 @@ interface Item {
127
127
  price?: number;
128
128
  quantity?: number;
129
129
  }
130
- interface PurchaseProperties {
130
+ export interface PurchaseProperties {
131
131
  currency: string;
132
132
  value: number;
133
133
  transaction_id: string;
@@ -136,21 +136,20 @@ interface PurchaseProperties {
136
136
  tax?: number;
137
137
  items?: Item[];
138
138
  }
139
- interface BeginCheckoutProperties {
139
+ export interface BeginCheckoutProperties {
140
140
  currency: string;
141
141
  value: number;
142
142
  coupon?: string;
143
143
  items: Item[];
144
144
  }
145
- declare function getPurchaseProperties(session: CheckoutSession): PurchaseProperties;
146
- declare function getBeginCheckoutProperties(p: ProductPrice): BeginCheckoutProperties;
145
+ export declare function getPurchaseProperties(session: CheckoutSession): PurchaseProperties;
146
+ export declare function getBeginCheckoutProperties(p: ProductPrice): BeginCheckoutProperties;
147
147
  /**
148
148
  * Stripe's `cancellation_details` in the shared shape. The object is present on every
149
149
  * subscription with all three fields null, so an active one maps to null rather than an empty
150
150
  * record. `reason` says who acted: `cancellation_requested` is the customer (or us on their
151
151
  * behalf), the payment reasons are Stripe ending it.
152
152
  */
153
- declare function mapCancellationDetails(subscription: Pick<Stripe.Subscription, 'cancellation_details'>): CancellationDetails | null;
153
+ export declare function mapCancellationDetails(subscription: Pick<Stripe.Subscription, 'cancellation_details'>): CancellationDetails | null;
154
154
  //#endregion
155
- export { BeginCheckoutProperties, CheckoutSession, Item, LineItem, PaymentStatus, Price, ProductPrice, PurchaseProperties, ZERO_DECIMAL_CURRENCIES, getBeginCheckoutProperties, getPurchaseProperties, mapCancellationDetails, mapCharge, mapCheckoutSession, mapInvoice, mapLineItem, mapPaymentIntent, mapPrice, mapSubscriptionStatus, mapTime, minorUnits, price };
156
155
  //# sourceMappingURL=mapper.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mapper.d.mts","names":[],"sources":["../../src/stripe/mapper.ts"],"mappings":";;;iBAQgB,QAAQ,yBACtB,wBAAwB,IACvB;KAKS;EACV;EACA,MAAM,OAAO,MAAM;EACnB;EACA,gBAAgB,OAAO,MAAM;EAC7B,UAAU,OAAO;EACjB;EACA;EACA,WAAW,OAAO,MAAM;;iBAGV,SAAS,OAAO,OAAO,QAAQ;UAa9B;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,OAAO;;iBAGO,YAAY,MAAM,OAAO,WAAW;KAoBxC,gBAAgB,OAAO,SAAS,QAAQ;UAMnC;EACf;EACA;EACA;EACA;EACA;EACA,gBAAgB;EAChB;EACA;EACA,YAAY;;iBAGE,mBAAmB,SAAS,OAAO,SAAS,UAAU;iBA0BtD,WAAW,GAAG,OAAO;EAEjC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,gBAAc,OAAA,QAAA;EACd;EACA;EACA;EACA,QAAM,OAAA,QAAA;EACN;EACA;EACA;;iBAIY,iBAAiB,QAAQ,OAAO;EAE5C;EACA;EACA;EACA;EACA;EACA;EACA;EACA,QAAM,OAAA,cAAA;EACN;;iBAIY,UAAU,QAAQ,OAAO;EAErC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,QAAM,OAAA,OAAA;EACN;EACA;;;;;;;;;;;;KAOQ;EACV;EACA,MAAM,OAAO,MAAM;EACnB;EACA,UAAU,OAAO;EACjB;IACE,IAAI,OAAO;IACX,MAAM,OAAO;IACb,aAAa,OAAO;IACpB,UAAU,OAAO;;;iBAIL,sBAAsB,QAAQ,OAAO,aAAa,SAAS;cAyB9D;iBAmBG,WAAW;iBAIX,MAAM,eAAe;UAIpB;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;UAGe;EACf;EACA;EACA;EACA;EACA;EACA;EACA,QAAQ;;UAGO;EACf;EACA;EACA;EACA,OAAO;;iBAqCO,sBAAsB,SAAS,kBAAkB;iBA2BjD,2BAA2B,GAAG,eAAe;;;;;;;iBAoB7C,uBACd,cAAc,KAAK,OAAO,wCACzB"}
1
+ {"version":3,"file":"mapper.d.mts","names":[],"sources":["../../src/stripe/mapper.ts"],"mappings":";;;wBAQgB,QAAQ,yBACtB,wBAAwB,IACvB;YAKS;EACV;EACA,MAAM,OAAO,MAAM;EACnB;EACA,gBAAgB,OAAO,MAAM;EAC7B,UAAU,OAAO;EACjB;EACA;EACA,WAAW,OAAO,MAAM;;wBAGV,SAAS,OAAO,OAAO,QAAQ;iBAa9B;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,OAAO;;wBAGO,YAAY,MAAM,OAAO,WAAW;YAoBxC,gBAAgB,OAAO,SAAS,QAAQ;iBAMnC;EACf;EACA;EACA;EACA;EACA;EACA,gBAAgB;EAChB;EACA;EACA,YAAY;;wBAGE,mBAAmB,SAAS,OAAO,SAAS,UAAU;wBA0BtD,WAAW,GAAG,OAAO;EAEjC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,gBAAc,OAAA,QAAA;EACd;EACA;EACA;EACA,QAAM,OAAA,QAAA;EACN;EACA;EACA;;wBAIY,iBAAiB,QAAQ,OAAO;EAE5C;EACA;EACA;EACA;EACA;EACA;EACA;EACA,QAAM,OAAA,cAAA;EACN;;wBAIY,UAAU,QAAQ,OAAO;EAErC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,QAAM,OAAA,OAAA;EACN;EACA;;;;;;;;;;;;YAOQ;EACV;EACA,MAAM,OAAO,MAAM;EACnB;EACA,UAAU,OAAO;EACjB;IACE,IAAI,OAAO;IACX,MAAM,OAAO;IACb,aAAa,OAAO;IACpB,UAAU,OAAO;;;wBAIL,sBAAsB,QAAQ,OAAO,aAAa,SAAS;qBAyB9D;wBAmBG,WAAW;wBAIX,MAAM,eAAe;iBAIpB;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;iBAGe;EACf;EACA;EACA;EACA;EACA;EACA;EACA,QAAQ;;iBAGO;EACf;EACA;EACA;EACA,OAAO;;wBAqCO,sBAAsB,SAAS,kBAAkB;wBA2BjD,2BAA2B,GAAG,eAAe;;;;;;;wBAoB7C,uBACd,cAAc,KAAK,OAAO,wCACzB"}
@@ -1,5 +1,5 @@
1
1
  //#region src/stripe/metadata.d.ts
2
- declare const METADATA_KEYS: {
2
+ export declare const METADATA_KEYS: {
3
3
  readonly USER_ID: 'user_id';
4
4
  readonly USER_ACCOUNT_TOKEN: 'user_account_token';
5
5
  readonly PRODUCT_ID: 'product_id';
@@ -8,5 +8,4 @@ declare const METADATA_KEYS: {
8
8
  readonly CREDIT_EXPIRES_IN: 'credit_expires_in';
9
9
  };
10
10
  //#endregion
11
- export { METADATA_KEYS };
12
11
  //# sourceMappingURL=metadata.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"metadata.d.cts","names":[],"sources":["../../src/stripe/metadata.ts"],"mappings":";cAAa;WACX;WACA;WACA;WACA;WACA;WACA"}
1
+ {"version":3,"file":"metadata.d.cts","names":[],"sources":["../../src/stripe/metadata.ts"],"mappings":";qBAAa;WACX;WACA;WACA;WACA;WACA;WACA"}
@@ -1,5 +1,5 @@
1
1
  //#region src/stripe/metadata.d.ts
2
- declare const METADATA_KEYS: {
2
+ export declare const METADATA_KEYS: {
3
3
  readonly USER_ID: 'user_id';
4
4
  readonly USER_ACCOUNT_TOKEN: 'user_account_token';
5
5
  readonly PRODUCT_ID: 'product_id';
@@ -8,5 +8,4 @@ declare const METADATA_KEYS: {
8
8
  readonly CREDIT_EXPIRES_IN: 'credit_expires_in';
9
9
  };
10
10
  //#endregion
11
- export { METADATA_KEYS };
12
11
  //# sourceMappingURL=metadata.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"metadata.d.mts","names":[],"sources":["../../src/stripe/metadata.ts"],"mappings":";cAAa;WACX;WACA;WACA;WACA;WACA;WACA"}
1
+ {"version":3,"file":"metadata.d.mts","names":[],"sources":["../../src/stripe/metadata.ts"],"mappings":";qBAAa;WACX;WACA;WACA;WACA;WACA;WACA"}
@@ -17,11 +17,10 @@
17
17
  * before the first was reconciled — must not clobber each other.
18
18
  */
19
19
  /** Record a started checkout to retry confirmation on later. Dedupes by session id. */
20
- declare function addPendingCheckout(sessionId: string): void;
20
+ export declare function addPendingCheckout(sessionId: string): void;
21
21
  /** Fresh session ids awaiting confirmation. Persists the pruned list as a side effect. */
22
- declare function getPendingCheckouts(): string[];
22
+ export declare function getPendingCheckouts(): string[];
23
23
  /** Drop one session once it's confirmed (or known not to belong to this user). */
24
- declare function removePendingCheckout(sessionId: string): void;
24
+ export declare function removePendingCheckout(sessionId: string): void;
25
25
  //#endregion
26
- export { addPendingCheckout, getPendingCheckouts, removePendingCheckout };
27
26
  //# sourceMappingURL=pending-checkout.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pending-checkout.d.cts","names":[],"sources":["../../src/stripe/pending-checkout.ts"],"mappings":";;;;;;;;;;;;;;;;;;;iBAwDgB,mBAAmB;;iBAOnB;;iBAQA,sBAAsB"}
1
+ {"version":3,"file":"pending-checkout.d.cts","names":[],"sources":["../../src/stripe/pending-checkout.ts"],"mappings":";;;;;;;;;;;;;;;;;;;wBAwDgB,mBAAmB;;wBAOnB;;wBAQA,sBAAsB"}
@@ -17,11 +17,10 @@
17
17
  * before the first was reconciled — must not clobber each other.
18
18
  */
19
19
  /** Record a started checkout to retry confirmation on later. Dedupes by session id. */
20
- declare function addPendingCheckout(sessionId: string): void;
20
+ export declare function addPendingCheckout(sessionId: string): void;
21
21
  /** Fresh session ids awaiting confirmation. Persists the pruned list as a side effect. */
22
- declare function getPendingCheckouts(): string[];
22
+ export declare function getPendingCheckouts(): string[];
23
23
  /** Drop one session once it's confirmed (or known not to belong to this user). */
24
- declare function removePendingCheckout(sessionId: string): void;
24
+ export declare function removePendingCheckout(sessionId: string): void;
25
25
  //#endregion
26
- export { addPendingCheckout, getPendingCheckouts, removePendingCheckout };
27
26
  //# sourceMappingURL=pending-checkout.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pending-checkout.d.mts","names":[],"sources":["../../src/stripe/pending-checkout.ts"],"mappings":";;;;;;;;;;;;;;;;;;;iBAwDgB,mBAAmB;;iBAOnB;;iBAQA,sBAAsB"}
1
+ {"version":3,"file":"pending-checkout.d.mts","names":[],"sources":["../../src/stripe/pending-checkout.ts"],"mappings":";;;;;;;;;;;;;;;;;;;wBAwDgB,mBAAmB;;wBAOnB;;wBAQA,sBAAsB"}
@@ -1,7 +1,7 @@
1
1
  import { CancellationDetails } from "../subscription/index.cjs";
2
2
  //#region src/stripe/schema.d.ts
3
3
  /** What our own cancel dialog may send along with a cancellation (see `CancellationDetails`). */
4
- declare const cancellationDetailsSchema: import("zod/mini").ZodMiniObject<{
4
+ export declare const cancellationDetailsSchema: import("zod/mini").ZodMiniObject<{
5
5
  comment: import("zod/mini").ZodMiniOptional<import("zod/mini").ZodMiniNullable<import("zod/mini").ZodMiniString<string>>>;
6
6
  feedback: import("zod/mini").ZodMiniOptional<import("zod/mini").ZodMiniNullable<import("zod/mini").ZodMiniEnum<{
7
7
  customer_service: "customer_service";
@@ -19,19 +19,19 @@ declare const cancellationDetailsSchema: import("zod/mini").ZodMiniObject<{
19
19
  yes: "yes";
20
20
  }>>>;
21
21
  }, import("zod/v4/core").$strip>;
22
- declare function createCheckoutSessionSchema(productIds: string[]): import("zod/mini").ZodMiniObject<{
23
- quantity: import("zod/mini").ZodMiniDefault<import("zod/mini").ZodMiniNumberFormat>;
22
+ export declare function createCheckoutSessionSchema(productIds: string[]): import("zod/mini").ZodMiniObject<{
23
+ quantity: import("zod/mini").ZodMiniDefault<import("zod/mini").ZodMiniInt>;
24
24
  productId: import("zod/mini").ZodMiniEnum<{
25
25
  [x: string]: string;
26
26
  }>;
27
27
  cancelUrl: import("zod/mini").ZodMiniOptional<import("zod/mini").ZodMiniURL>;
28
28
  successUrl: import("zod/mini").ZodMiniOptional<import("zod/mini").ZodMiniURL>;
29
29
  }, import("zod/v4/core").$strip>;
30
- interface CreateCheckoutSessionDTO {
30
+ export interface CreateCheckoutSessionDTO {
31
31
  productId: string;
32
32
  cancelUrl?: string;
33
33
  successUrl?: `${string}session_id={CHECKOUT_SESSION_ID}${string}`;
34
34
  }
35
35
  //#endregion
36
- export { type CancellationDetails, CreateCheckoutSessionDTO, cancellationDetailsSchema, createCheckoutSessionSchema };
36
+ export type { CancellationDetails };
37
37
  //# sourceMappingURL=schema.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.cts","names":[],"sources":["../../src/stripe/schema.ts"],"mappings":";;;cAea,8CAAyB;;;;;;;;;;;;;;;;;yBAIpC;iBAEc,4BAA4B,0CAAoB;;;;;;;yBAO/D;UAMgB;EACf;EACA;EACA"}
1
+ {"version":3,"file":"schema.d.cts","names":[],"sources":["../../src/stripe/schema.ts"],"mappings":";;;qBAea,8CAAyB;;;;;;;;;;;;;;;;;yBAIpC;wBAEc,4BAA4B,0CAAoB;;;;;;;yBAO/D;iBAMgB;EACf;EACA;EACA"}
@@ -1,7 +1,7 @@
1
1
  import { CancellationDetails } from "../subscription/index.mjs";
2
2
  //#region src/stripe/schema.d.ts
3
3
  /** What our own cancel dialog may send along with a cancellation (see `CancellationDetails`). */
4
- declare const cancellationDetailsSchema: import("zod/mini").ZodMiniObject<{
4
+ export declare const cancellationDetailsSchema: import("zod/mini").ZodMiniObject<{
5
5
  comment: import("zod/mini").ZodMiniOptional<import("zod/mini").ZodMiniNullable<import("zod/mini").ZodMiniString<string>>>;
6
6
  feedback: import("zod/mini").ZodMiniOptional<import("zod/mini").ZodMiniNullable<import("zod/mini").ZodMiniEnum<{
7
7
  customer_service: "customer_service";
@@ -19,19 +19,19 @@ declare const cancellationDetailsSchema: import("zod/mini").ZodMiniObject<{
19
19
  yes: "yes";
20
20
  }>>>;
21
21
  }, import("zod/v4/core").$strip>;
22
- declare function createCheckoutSessionSchema(productIds: string[]): import("zod/mini").ZodMiniObject<{
23
- quantity: import("zod/mini").ZodMiniDefault<import("zod/mini").ZodMiniNumberFormat>;
22
+ export declare function createCheckoutSessionSchema(productIds: string[]): import("zod/mini").ZodMiniObject<{
23
+ quantity: import("zod/mini").ZodMiniDefault<import("zod/mini").ZodMiniInt>;
24
24
  productId: import("zod/mini").ZodMiniEnum<{
25
25
  [x: string]: string;
26
26
  }>;
27
27
  cancelUrl: import("zod/mini").ZodMiniOptional<import("zod/mini").ZodMiniURL>;
28
28
  successUrl: import("zod/mini").ZodMiniOptional<import("zod/mini").ZodMiniURL>;
29
29
  }, import("zod/v4/core").$strip>;
30
- interface CreateCheckoutSessionDTO {
30
+ export interface CreateCheckoutSessionDTO {
31
31
  productId: string;
32
32
  cancelUrl?: string;
33
33
  successUrl?: `${string}session_id={CHECKOUT_SESSION_ID}${string}`;
34
34
  }
35
35
  //#endregion
36
- export { type CancellationDetails, CreateCheckoutSessionDTO, cancellationDetailsSchema, createCheckoutSessionSchema };
36
+ export type { CancellationDetails };
37
37
  //# sourceMappingURL=schema.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.mts","names":[],"sources":["../../src/stripe/schema.ts"],"mappings":";;;cAea,8CAAyB;;;;;;;;;;;;;;;;;yBAIpC;iBAEc,4BAA4B,0CAAoB;;;;;;;yBAO/D;UAMgB;EACf;EACA;EACA"}
1
+ {"version":3,"file":"schema.d.mts","names":[],"sources":["../../src/stripe/schema.ts"],"mappings":";;;qBAea,8CAAyB;;;;;;;;;;;;;;;;;yBAIpC;wBAEc,4BAA4B,0CAAoB;;;;;;;yBAO/D;iBAMgB;EACf;EACA;EACA"}
@@ -1,13 +1,13 @@
1
1
  //#region src/subscription/index.d.ts
2
- declare const PLATFORMS: readonly ['APPLE', 'GOOGLE', 'STRIPE'];
3
- type Platform = (typeof PLATFORMS)[number];
2
+ export declare const PLATFORMS: readonly ['APPLE', 'GOOGLE', 'STRIPE'];
3
+ export type Platform = (typeof PLATFORMS)[number];
4
4
  /**
5
5
  * [Stripe Subscription Status](https://stripe.com/docs/api/subscriptions/object#subscription_object-status)
6
6
  * [Stripe Subscription Lifecycle](https://docs.stripe.com/billing/subscriptions/overview)
7
7
  *
8
8
  * provision product for customer when Status = TRIALING, ACTIVE, IN_GRACE_PERIOD
9
9
  */
10
- declare const SUBSCRIPTION_STATUSES: readonly [
10
+ export declare const SUBSCRIPTION_STATUSES: readonly [
11
11
  /**
12
12
  * The subscription is currently in a trial period and it’s safe to provision your product for
13
13
  * your customer. The subscription transitions automatically to active when the first payment
@@ -138,23 +138,23 @@ declare const SUBSCRIPTION_STATUSES: readonly [
138
138
  * Platform: Apple, Google
139
139
  * */
140
140
  'EXPIRED'];
141
- type SubscriptionStatus = (typeof SUBSCRIPTION_STATUSES)[number];
141
+ export type SubscriptionStatus = (typeof SUBSCRIPTION_STATUSES)[number];
142
142
  /** statuses where it is safe to provision your product for the customer */
143
- declare const AVAILABLE_STATUSES: readonly ["ACTIVE", "TRIALING", "IN_GRACE_PERIOD"];
143
+ export declare const AVAILABLE_STATUSES: readonly ["ACTIVE", "TRIALING", "IN_GRACE_PERIOD"];
144
144
  /** Who stopped the subscription from renewing. */
145
- declare const CANCELLATION_INITIATORS: readonly [
145
+ export declare const CANCELLATION_INITIATORS: readonly [
146
146
  /** The customer: the store's cancel flow, our own cancel dialog, or a declined price increase. */
147
147
  'user',
148
148
  /** The platform: a failed payment, a refund or revocation, a product no longer for sale. */
149
149
  'system',
150
150
  /** Us: a cancellation through the platform's API or console. */
151
151
  'developer'];
152
- type CancellationInitiator = (typeof CANCELLATION_INITIATORS)[number];
152
+ export type CancellationInitiator = (typeof CANCELLATION_INITIATORS)[number];
153
153
  /** What a cancel survey may report, whichever platform asked the question. */
154
- declare const CANCELLATION_FEEDBACKS: readonly ['customer_service', 'low_quality', 'missing_features', 'switched_service', 'too_complex', 'too_expensive', 'unused', 'other'];
155
- type CancellationFeedback = (typeof CANCELLATION_FEEDBACKS)[number];
156
- declare const RESUBSCRIBE_INTENTS: readonly ['maybe', 'no', 'yes'];
157
- type ResubscribeIntent = (typeof RESUBSCRIBE_INTENTS)[number];
154
+ export declare const CANCELLATION_FEEDBACKS: readonly ['customer_service', 'low_quality', 'missing_features', 'switched_service', 'too_complex', 'too_expensive', 'unused', 'other'];
155
+ export type CancellationFeedback = (typeof CANCELLATION_FEEDBACKS)[number];
156
+ export declare const RESUBSCRIBE_INTENTS: readonly ['maybe', 'no', 'yes'];
157
+ export type ResubscribeIntent = (typeof RESUBSCRIBE_INTENTS)[number];
158
158
  /**
159
159
  * Why a subscription stopped renewing, in one record shared by every platform. Every key is
160
160
  * optional and every value a string, so a platform may add what only it reports without a
@@ -169,7 +169,7 @@ type ResubscribeIntent = (typeof RESUBSCRIBE_INTENTS)[number];
169
169
  * - `comment`: free text the customer typed.
170
170
  * - `resubscribeIntent`: whether they said they would come back, when the cancel flow asked.
171
171
  */
172
- interface CancellationDetails {
172
+ export interface CancellationDetails {
173
173
  [key: string]: string | null | undefined;
174
174
  initiator?: CancellationInitiator | null;
175
175
  reason?: string | null;
@@ -178,5 +178,4 @@ interface CancellationDetails {
178
178
  resubscribeIntent?: ResubscribeIntent | null;
179
179
  }
180
180
  //#endregion
181
- export { AVAILABLE_STATUSES, CANCELLATION_FEEDBACKS, CANCELLATION_INITIATORS, CancellationDetails, CancellationFeedback, CancellationInitiator, PLATFORMS, Platform, RESUBSCRIBE_INTENTS, ResubscribeIntent, SUBSCRIPTION_STATUSES, SubscriptionStatus };
182
181
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../../src/subscription/index.ts"],"mappings":";cAAa;KAED,mBAAmB;;;;;;;cAQlB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAkJD,6BAA6B;;cAG5B;;cAOA;;;;;;;KASD,gCAAgC;;cAG/B;KAWD,+BAA+B;cAE9B;KAED,4BAA4B;;;;;;;;;;;;;;;UAgBvB;GACd;EACD,YAAY;EACZ;EACA,WAAW;EACX;EACA,oBAAoB"}
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../../src/subscription/index.ts"],"mappings":";qBAAa;YAED,mBAAmB;;;;;;;qBAQlB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAkJD,6BAA6B;;qBAG5B;;qBAOA;;;;;;;YASD,gCAAgC;;qBAG/B;YAWD,+BAA+B;qBAE9B;YAED,4BAA4B;;;;;;;;;;;;;;;iBAgBvB;GACd;EACD,YAAY;EACZ;EACA,WAAW;EACX;EACA,oBAAoB"}
@@ -1,13 +1,13 @@
1
1
  //#region src/subscription/index.d.ts
2
- declare const PLATFORMS: readonly ['APPLE', 'GOOGLE', 'STRIPE'];
3
- type Platform = (typeof PLATFORMS)[number];
2
+ export declare const PLATFORMS: readonly ['APPLE', 'GOOGLE', 'STRIPE'];
3
+ export type Platform = (typeof PLATFORMS)[number];
4
4
  /**
5
5
  * [Stripe Subscription Status](https://stripe.com/docs/api/subscriptions/object#subscription_object-status)
6
6
  * [Stripe Subscription Lifecycle](https://docs.stripe.com/billing/subscriptions/overview)
7
7
  *
8
8
  * provision product for customer when Status = TRIALING, ACTIVE, IN_GRACE_PERIOD
9
9
  */
10
- declare const SUBSCRIPTION_STATUSES: readonly [
10
+ export declare const SUBSCRIPTION_STATUSES: readonly [
11
11
  /**
12
12
  * The subscription is currently in a trial period and it’s safe to provision your product for
13
13
  * your customer. The subscription transitions automatically to active when the first payment
@@ -138,23 +138,23 @@ declare const SUBSCRIPTION_STATUSES: readonly [
138
138
  * Platform: Apple, Google
139
139
  * */
140
140
  'EXPIRED'];
141
- type SubscriptionStatus = (typeof SUBSCRIPTION_STATUSES)[number];
141
+ export type SubscriptionStatus = (typeof SUBSCRIPTION_STATUSES)[number];
142
142
  /** statuses where it is safe to provision your product for the customer */
143
- declare const AVAILABLE_STATUSES: readonly ["ACTIVE", "TRIALING", "IN_GRACE_PERIOD"];
143
+ export declare const AVAILABLE_STATUSES: readonly ["ACTIVE", "TRIALING", "IN_GRACE_PERIOD"];
144
144
  /** Who stopped the subscription from renewing. */
145
- declare const CANCELLATION_INITIATORS: readonly [
145
+ export declare const CANCELLATION_INITIATORS: readonly [
146
146
  /** The customer: the store's cancel flow, our own cancel dialog, or a declined price increase. */
147
147
  'user',
148
148
  /** The platform: a failed payment, a refund or revocation, a product no longer for sale. */
149
149
  'system',
150
150
  /** Us: a cancellation through the platform's API or console. */
151
151
  'developer'];
152
- type CancellationInitiator = (typeof CANCELLATION_INITIATORS)[number];
152
+ export type CancellationInitiator = (typeof CANCELLATION_INITIATORS)[number];
153
153
  /** What a cancel survey may report, whichever platform asked the question. */
154
- declare const CANCELLATION_FEEDBACKS: readonly ['customer_service', 'low_quality', 'missing_features', 'switched_service', 'too_complex', 'too_expensive', 'unused', 'other'];
155
- type CancellationFeedback = (typeof CANCELLATION_FEEDBACKS)[number];
156
- declare const RESUBSCRIBE_INTENTS: readonly ['maybe', 'no', 'yes'];
157
- type ResubscribeIntent = (typeof RESUBSCRIBE_INTENTS)[number];
154
+ export declare const CANCELLATION_FEEDBACKS: readonly ['customer_service', 'low_quality', 'missing_features', 'switched_service', 'too_complex', 'too_expensive', 'unused', 'other'];
155
+ export type CancellationFeedback = (typeof CANCELLATION_FEEDBACKS)[number];
156
+ export declare const RESUBSCRIBE_INTENTS: readonly ['maybe', 'no', 'yes'];
157
+ export type ResubscribeIntent = (typeof RESUBSCRIBE_INTENTS)[number];
158
158
  /**
159
159
  * Why a subscription stopped renewing, in one record shared by every platform. Every key is
160
160
  * optional and every value a string, so a platform may add what only it reports without a
@@ -169,7 +169,7 @@ type ResubscribeIntent = (typeof RESUBSCRIBE_INTENTS)[number];
169
169
  * - `comment`: free text the customer typed.
170
170
  * - `resubscribeIntent`: whether they said they would come back, when the cancel flow asked.
171
171
  */
172
- interface CancellationDetails {
172
+ export interface CancellationDetails {
173
173
  [key: string]: string | null | undefined;
174
174
  initiator?: CancellationInitiator | null;
175
175
  reason?: string | null;
@@ -178,5 +178,4 @@ interface CancellationDetails {
178
178
  resubscribeIntent?: ResubscribeIntent | null;
179
179
  }
180
180
  //#endregion
181
- export { AVAILABLE_STATUSES, CANCELLATION_FEEDBACKS, CANCELLATION_INITIATORS, CancellationDetails, CancellationFeedback, CancellationInitiator, PLATFORMS, Platform, RESUBSCRIBE_INTENTS, ResubscribeIntent, SUBSCRIPTION_STATUSES, SubscriptionStatus };
182
181
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../../src/subscription/index.ts"],"mappings":";cAAa;KAED,mBAAmB;;;;;;;cAQlB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAkJD,6BAA6B;;cAG5B;;cAOA;;;;;;;KASD,gCAAgC;;cAG/B;KAWD,+BAA+B;cAE9B;KAED,4BAA4B;;;;;;;;;;;;;;;UAgBvB;GACd;EACD,YAAY;EACZ;EACA,WAAW;EACX;EACA,oBAAoB"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../../src/subscription/index.ts"],"mappings":";qBAAa;YAED,mBAAmB;;;;;;;qBAQlB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAkJD,6BAA6B;;qBAG5B;;qBAOA;;;;;;;YASD,gCAAgC;;qBAG/B;YAWD,+BAA+B;qBAE9B;YAED,4BAA4B;;;;;;;;;;;;;;;iBAgBvB;GACd;EACD,YAAY;EACZ;EACA,WAAW;EACX;EACA,oBAAoB"}
package/dist/types.d.cts CHANGED
@@ -1,10 +1,9 @@
1
1
  import { StringValue } from "ms";
2
2
  //#region src/types.d.ts
3
- type Metadata = {
3
+ export type Metadata = {
4
4
  credits: number;
5
5
  expiresIn: StringValue;
6
6
  };
7
- type IsUnique<T extends readonly unknown[]> = T extends readonly [infer First, ...infer Rest] ? First extends Rest[number] ? false : IsUnique<Rest> : true;
7
+ export type IsUnique<T extends readonly unknown[]> = T extends readonly [infer First, ...infer Rest] ? First extends Rest[number] ? false : IsUnique<Rest> : true;
8
8
  //#endregion
9
- export { IsUnique, Metadata };
10
9
  //# sourceMappingURL=types.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.cts","names":[],"sources":["../src/types.ts"],"mappings":";;KAEY;EAAa;EAAiB,WAAW;;KAEzC,SAAS,gCAAgC,0BAA0B,gBAAgB,QAC3F,cAAc,uBAEZ,SAAS"}
1
+ {"version":3,"file":"types.d.cts","names":[],"sources":["../src/types.ts"],"mappings":";;YAEY;EAAa;EAAiB,WAAW;;YAEzC,SAAS,gCAAgC,0BAA0B,gBAAgB,QAC3F,cAAc,uBAEZ,SAAS"}
package/dist/types.d.mts CHANGED
@@ -1,10 +1,9 @@
1
1
  import { StringValue } from "ms";
2
2
  //#region src/types.d.ts
3
- type Metadata = {
3
+ export type Metadata = {
4
4
  credits: number;
5
5
  expiresIn: StringValue;
6
6
  };
7
- type IsUnique<T extends readonly unknown[]> = T extends readonly [infer First, ...infer Rest] ? First extends Rest[number] ? false : IsUnique<Rest> : true;
7
+ export type IsUnique<T extends readonly unknown[]> = T extends readonly [infer First, ...infer Rest] ? First extends Rest[number] ? false : IsUnique<Rest> : true;
8
8
  //#endregion
9
- export { IsUnique, Metadata };
10
9
  //# sourceMappingURL=types.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.mts","names":[],"sources":["../src/types.ts"],"mappings":";;KAEY;EAAa;EAAiB,WAAW;;KAEzC,SAAS,gCAAgC,0BAA0B,gBAAgB,QAC3F,cAAc,uBAEZ,SAAS"}
1
+ {"version":3,"file":"types.d.mts","names":[],"sources":["../src/types.ts"],"mappings":";;YAEY;EAAa;EAAiB,WAAW;;YAEzC,SAAS,gCAAgC,0BAA0B,gBAAgB,QAC3F,cAAc,uBAEZ,SAAS"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shware/purchase",
3
- "version": "5.1.0",
3
+ "version": "5.1.1",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -56,20 +56,20 @@
56
56
  "access": "public"
57
57
  },
58
58
  "dependencies": {
59
- "@shware/utils": "^1.6.1",
59
+ "@shware/utils": "^1.6.2",
60
60
  "@types/ms": "^2.1.0",
61
61
  "ms": "^2.1.3",
62
- "zod": "^4.4.3"
62
+ "zod": "^4.6.5"
63
63
  },
64
64
  "devDependencies": {
65
65
  "@repo/typescript-config": "0.0.0",
66
- "@types/node": "^26.3.0",
66
+ "@types/node": "^26.6.3",
67
67
  "typescript": "^7.0.2",
68
- "vitest": "^4.1.11"
68
+ "vitest": "^5.0.2"
69
69
  },
70
70
  "peerDependencies": {
71
71
  "@apple/app-store-server-library": "^3.1.0",
72
- "stripe": "^22.5.0"
72
+ "stripe": "^22.6.2"
73
73
  },
74
74
  "peerDependenciesMeta": {
75
75
  "@apple/app-store-server-library": {