@shware/purchase 0.0.6 → 0.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 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/stripe/index.ts"],"sourcesContent":["export {\n mapTime,\n mapStatus,\n mapCheckoutSession,\n minorUnits,\n price,\n type CheckoutSession,\n} from './mapper';\nexport {\n cancellationDetailsSchema,\n checkoutSessionSchema,\n type CancellationDetails,\n} from './schema';\nexport type { ProductId, PriceId, Config } from './types';\nexport { METADATA_KEYS } from './metadata';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAOO;AACP,oBAIO;AAEP,sBAA8B;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/stripe/index.ts"],"sourcesContent":["export {\n mapTime,\n mapStatus,\n mapCheckoutSession,\n minorUnits,\n price,\n type CheckoutSession,\n} from './mapper';\nexport {\n cancellationDetailsSchema,\n checkoutSessionSchema,\n type CancellationDetails,\n} from './schema';\nexport type { ProductId, PriceId, Config, CreateCheckoutSessionDTO } from './types';\nexport { METADATA_KEYS } from './metadata';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAOO;AACP,oBAIO;AAEP,sBAA8B;","names":[]}
|
package/dist/stripe/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { CheckoutSession, mapCheckoutSession, mapStatus, mapTime, minorUnits, price } from './mapper.cjs';
|
|
2
2
|
export { CancellationDetails, cancellationDetailsSchema, checkoutSessionSchema } from './schema.cjs';
|
|
3
|
-
export { Config, PriceId, ProductId } from './types.cjs';
|
|
3
|
+
export { Config, CreateCheckoutSessionDTO, PriceId, ProductId } from './types.cjs';
|
|
4
4
|
export { METADATA_KEYS } from './metadata.cjs';
|
|
5
5
|
import 'stripe';
|
|
6
6
|
import '../subscription/index.cjs';
|
package/dist/stripe/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { CheckoutSession, mapCheckoutSession, mapStatus, mapTime, minorUnits, price } from './mapper.js';
|
|
2
2
|
export { CancellationDetails, cancellationDetailsSchema, checkoutSessionSchema } from './schema.js';
|
|
3
|
-
export { Config, PriceId, ProductId } from './types.js';
|
|
3
|
+
export { Config, CreateCheckoutSessionDTO, PriceId, ProductId } from './types.js';
|
|
4
4
|
export { METADATA_KEYS } from './metadata.js';
|
|
5
5
|
import 'stripe';
|
|
6
6
|
import '../subscription/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/stripe/index.ts"],"sourcesContent":["export {\n mapTime,\n mapStatus,\n mapCheckoutSession,\n minorUnits,\n price,\n type CheckoutSession,\n} from './mapper';\nexport {\n cancellationDetailsSchema,\n checkoutSessionSchema,\n type CancellationDetails,\n} from './schema';\nexport type { ProductId, PriceId, Config } from './types';\nexport { METADATA_KEYS } from './metadata';\n"],"mappings":";AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OAEK;AAEP,SAAS,qBAAqB;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/stripe/index.ts"],"sourcesContent":["export {\n mapTime,\n mapStatus,\n mapCheckoutSession,\n minorUnits,\n price,\n type CheckoutSession,\n} from './mapper';\nexport {\n cancellationDetailsSchema,\n checkoutSessionSchema,\n type CancellationDetails,\n} from './schema';\nexport type { ProductId, PriceId, Config, CreateCheckoutSessionDTO } from './types';\nexport { METADATA_KEYS } from './metadata';\n"],"mappings":";AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OAEK;AAEP,SAAS,qBAAqB;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/stripe/types.ts"],"sourcesContent":["export type ProductId = Lowercase<string>;\nexport type PriceId = `price_${string}`;\n\nexport interface Config {\n returnUrl: string;\n cancelUrl: string;\n successUrl: `${string}
|
|
1
|
+
{"version":3,"sources":["../../src/stripe/types.ts"],"sourcesContent":["export type ProductId = Lowercase<string>;\nexport type PriceId = `price_${string}`;\n\nexport interface Config {\n returnUrl: string;\n cancelUrl: string;\n successUrl: `${string}session_id={CHECKOUT_SESSION_ID}${string}`;\n allowPromotionCodes: boolean;\n payments: Record<ProductId, PriceId>;\n subscriptions: Record<ProductId, PriceId>;\n}\n\nexport interface CreateCheckoutSessionDTO {\n productId: string;\n cancelUrl?: string;\n successUrl?: `${string}session_id={CHECKOUT_SESSION_ID}${string}`;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
package/dist/stripe/types.d.cts
CHANGED
|
@@ -3,10 +3,15 @@ type PriceId = `price_${string}`;
|
|
|
3
3
|
interface Config {
|
|
4
4
|
returnUrl: string;
|
|
5
5
|
cancelUrl: string;
|
|
6
|
-
successUrl: `${string}
|
|
6
|
+
successUrl: `${string}session_id={CHECKOUT_SESSION_ID}${string}`;
|
|
7
7
|
allowPromotionCodes: boolean;
|
|
8
8
|
payments: Record<ProductId, PriceId>;
|
|
9
9
|
subscriptions: Record<ProductId, PriceId>;
|
|
10
10
|
}
|
|
11
|
+
interface CreateCheckoutSessionDTO {
|
|
12
|
+
productId: string;
|
|
13
|
+
cancelUrl?: string;
|
|
14
|
+
successUrl?: `${string}session_id={CHECKOUT_SESSION_ID}${string}`;
|
|
15
|
+
}
|
|
11
16
|
|
|
12
|
-
export type { Config, PriceId, ProductId };
|
|
17
|
+
export type { Config, CreateCheckoutSessionDTO, PriceId, ProductId };
|
package/dist/stripe/types.d.ts
CHANGED
|
@@ -3,10 +3,15 @@ type PriceId = `price_${string}`;
|
|
|
3
3
|
interface Config {
|
|
4
4
|
returnUrl: string;
|
|
5
5
|
cancelUrl: string;
|
|
6
|
-
successUrl: `${string}
|
|
6
|
+
successUrl: `${string}session_id={CHECKOUT_SESSION_ID}${string}`;
|
|
7
7
|
allowPromotionCodes: boolean;
|
|
8
8
|
payments: Record<ProductId, PriceId>;
|
|
9
9
|
subscriptions: Record<ProductId, PriceId>;
|
|
10
10
|
}
|
|
11
|
+
interface CreateCheckoutSessionDTO {
|
|
12
|
+
productId: string;
|
|
13
|
+
cancelUrl?: string;
|
|
14
|
+
successUrl?: `${string}session_id={CHECKOUT_SESSION_ID}${string}`;
|
|
15
|
+
}
|
|
11
16
|
|
|
12
|
-
export type { Config, PriceId, ProductId };
|
|
17
|
+
export type { Config, CreateCheckoutSessionDTO, PriceId, ProductId };
|