@shware/purchase 5.1.0 → 5.2.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.
- package/README.md +341 -0
- package/dist/app-store/config.d.cts +2 -2
- package/dist/app-store/config.d.cts.map +1 -1
- package/dist/app-store/config.d.mts +2 -2
- package/dist/app-store/config.d.mts.map +1 -1
- package/dist/app-store/handler.d.cts +3 -3
- package/dist/app-store/handler.d.cts.map +1 -1
- package/dist/app-store/handler.d.mts +3 -3
- package/dist/app-store/handler.d.mts.map +1 -1
- package/dist/app-store/mapper.d.cts +2 -3
- package/dist/app-store/mapper.d.cts.map +1 -1
- package/dist/app-store/mapper.d.mts +2 -3
- package/dist/app-store/mapper.d.mts.map +1 -1
- package/dist/google-play/config.d.cts +2 -2
- package/dist/google-play/config.d.cts.map +1 -1
- package/dist/google-play/config.d.mts +2 -2
- package/dist/google-play/config.d.mts.map +1 -1
- package/dist/google-play/mapper.d.cts +4 -5
- package/dist/google-play/mapper.d.cts.map +1 -1
- package/dist/google-play/mapper.d.mts +4 -5
- package/dist/google-play/mapper.d.mts.map +1 -1
- package/dist/google-play/real-time-developer-notification.d.cts +16 -17
- package/dist/google-play/real-time-developer-notification.d.cts.map +1 -1
- package/dist/google-play/real-time-developer-notification.d.mts +16 -17
- package/dist/google-play/real-time-developer-notification.d.mts.map +1 -1
- package/dist/stripe/config.d.cts +4 -4
- package/dist/stripe/config.d.cts.map +1 -1
- package/dist/stripe/config.d.mts +4 -4
- package/dist/stripe/config.d.mts.map +1 -1
- package/dist/stripe/handler.d.cts +2 -2
- package/dist/stripe/handler.d.cts.map +1 -1
- package/dist/stripe/handler.d.mts +2 -2
- package/dist/stripe/handler.d.mts.map +1 -1
- package/dist/stripe/mapper.d.cts +22 -23
- package/dist/stripe/mapper.d.cts.map +1 -1
- package/dist/stripe/mapper.d.mts +22 -23
- package/dist/stripe/mapper.d.mts.map +1 -1
- package/dist/stripe/metadata.d.cts +1 -2
- package/dist/stripe/metadata.d.cts.map +1 -1
- package/dist/stripe/metadata.d.mts +1 -2
- package/dist/stripe/metadata.d.mts.map +1 -1
- package/dist/stripe/pending-checkout.d.cts +3 -4
- package/dist/stripe/pending-checkout.d.cts.map +1 -1
- package/dist/stripe/pending-checkout.d.mts +3 -4
- package/dist/stripe/pending-checkout.d.mts.map +1 -1
- package/dist/stripe/schema.d.cts +5 -5
- package/dist/stripe/schema.d.cts.map +1 -1
- package/dist/stripe/schema.d.mts +5 -5
- package/dist/stripe/schema.d.mts.map +1 -1
- package/dist/subscription/index.d.cts +12 -13
- package/dist/subscription/index.d.cts.map +1 -1
- package/dist/subscription/index.d.mts +12 -13
- package/dist/subscription/index.d.mts.map +1 -1
- package/dist/types.d.cts +2 -3
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.mts +2 -3
- package/dist/types.d.mts.map +1 -1
- package/package.json +9 -7
|
@@ -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":";;;;;;;;;;;;;;;;;;;
|
|
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":";;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"pending-checkout.d.mts","names":[],"sources":["../../src/stripe/pending-checkout.ts"],"mappings":";;;;;;;;;;;;;;;;;;;wBAwDgB,mBAAmB;;wBAOnB;;wBAQA,sBAAsB"}
|
package/dist/stripe/schema.d.cts
CHANGED
|
@@ -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").
|
|
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 {
|
|
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":";;;
|
|
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"}
|
package/dist/stripe/schema.d.mts
CHANGED
|
@@ -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").
|
|
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 {
|
|
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":";;;
|
|
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":";
|
|
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":";
|
|
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
|
package/dist/types.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.cts","names":[],"sources":["../src/types.ts"],"mappings":";;
|
|
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
|
package/dist/types.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.mts","names":[],"sources":["../src/types.ts"],"mappings":";;
|
|
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.
|
|
3
|
+
"version": "5.2.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -56,20 +56,22 @@
|
|
|
56
56
|
"access": "public"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@shware/utils": "^1.6.
|
|
59
|
+
"@shware/utils": "^1.6.3",
|
|
60
60
|
"@types/ms": "^2.1.0",
|
|
61
|
-
"ms": "^2.1.3"
|
|
62
|
-
"zod": "^4.4.3"
|
|
61
|
+
"ms": "^2.1.3"
|
|
63
62
|
},
|
|
64
63
|
"devDependencies": {
|
|
65
64
|
"@repo/typescript-config": "0.0.0",
|
|
66
|
-
"@types/node": "^26.
|
|
65
|
+
"@types/node": "^26.6.5",
|
|
66
|
+
"stripe": "^23.0.0",
|
|
67
67
|
"typescript": "^7.0.2",
|
|
68
|
-
"vitest": "^
|
|
68
|
+
"vitest": "^5.0.5",
|
|
69
|
+
"zod": "^4.6.7"
|
|
69
70
|
},
|
|
70
71
|
"peerDependencies": {
|
|
71
72
|
"@apple/app-store-server-library": "^3.1.0",
|
|
72
|
-
"stripe": "^22.
|
|
73
|
+
"stripe": "^22.6.2 || ^23.0.0",
|
|
74
|
+
"zod": "^4.6.5"
|
|
73
75
|
},
|
|
74
76
|
"peerDependenciesMeta": {
|
|
75
77
|
"@apple/app-store-server-library": {
|