@shware/purchase 1.7.0 → 1.8.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/schema.ts"],"sourcesContent":["import {\n _default,\n enum as _enum,\n gte,\n int,\n maxLength,\n nullable,\n object,\n optional,\n type output,\n string,\n url,\n} from 'zod/mini';\n\nexport const cancellationDetailsSchema = object({\n comment: optional(nullable(string().check(maxLength(1024)))),\n feedback: optional(\n nullable(\n _enum([\n 'customer_service',\n 'low_quality',\n 'missing_features',\n 'switched_service',\n 'too_complex',\n 'too_expensive',\n 'unused',\n 'other',\n ])\n )\n ),\n resubscribeIntent: optional(nullable(_enum(['maybe', 'no', 'yes']))),\n});\n\nexport function createCheckoutSessionSchema(productIds: string[]) {\n return object({\n quantity: _default(int().check(gte(1)), 1),\n productId: _enum(productIds),\n cancelUrl: optional(url()),\n successUrl: optional(url()),\n });\n}\n\nexport interface CancellationDetails extends output<typeof cancellationDetailsSchema> {\n reason?: 'cancellation_requested' | 'payment_disputed' | 'payment_failed' | null;\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;AAAA;AAAA;AAAA;AAAA;AAAA,kBAYO;AAEA,IAAM,gCAA4B,oBAAO;AAAA,EAC9C,aAAS,0BAAS,0BAAS,oBAAO,EAAE,UAAM,uBAAU,IAAI,CAAC,CAAC,CAAC;AAAA,EAC3D,cAAU;AAAA,QACR;AAAA,UACE,YAAAA,MAAM;AAAA,QACJ;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EACA,uBAAmB,0BAAS,0BAAS,YAAAA,MAAM,CAAC,SAAS,MAAM,KAAK,CAAC,CAAC,CAAC;AACrE,CAAC;AAEM,SAAS,4BAA4B,YAAsB;AAChE,aAAO,oBAAO;AAAA,IACZ,cAAU,0BAAS,iBAAI,EAAE,UAAM,iBAAI,CAAC,CAAC,GAAG,CAAC;AAAA,IACzC,eAAW,YAAAA,MAAM,UAAU;AAAA,IAC3B,eAAW,0BAAS,iBAAI,CAAC;AAAA,IACzB,gBAAY,0BAAS,iBAAI,CAAC;AAAA,EAC5B,CAAC;AACH;","names":["_enum"]}
1
+ {"version":3,"sources":["../../src/stripe/schema.ts"],"sourcesContent":["import type { Stripe } from 'stripe';\nimport {\n _default,\n enum as _enum,\n gte,\n int,\n maxLength,\n nullable,\n object,\n optional,\n type output,\n string,\n url,\n} from 'zod/mini';\n\nexport const cancellationDetailsSchema = object({\n comment: optional(nullable(string().check(maxLength(1024)))),\n feedback: optional(\n nullable(\n _enum([\n 'customer_service',\n 'low_quality',\n 'missing_features',\n 'switched_service',\n 'too_complex',\n 'too_expensive',\n 'unused',\n 'other',\n ])\n )\n ),\n resubscribeIntent: optional(nullable(_enum(['maybe', 'no', 'yes']))),\n});\n\nexport function createCheckoutSessionSchema(productIds: string[]) {\n return object({\n quantity: _default(int().check(gte(1)), 1),\n productId: _enum(productIds),\n cancelUrl: optional(url()),\n successUrl: optional(url()),\n });\n}\n\nexport interface CancellationDetails extends output<typeof cancellationDetailsSchema> {\n reason?: Stripe.Subscription.CancellationDetails.Reason | null;\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;AAAA;AAAA;AAAA;AAAA;AACA,kBAYO;AAEA,IAAM,gCAA4B,oBAAO;AAAA,EAC9C,aAAS,0BAAS,0BAAS,oBAAO,EAAE,UAAM,uBAAU,IAAI,CAAC,CAAC,CAAC;AAAA,EAC3D,cAAU;AAAA,QACR;AAAA,UACE,YAAAA,MAAM;AAAA,QACJ;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EACA,uBAAmB,0BAAS,0BAAS,YAAAA,MAAM,CAAC,SAAS,MAAM,KAAK,CAAC,CAAC,CAAC;AACrE,CAAC;AAEM,SAAS,4BAA4B,YAAsB;AAChE,aAAO,oBAAO;AAAA,IACZ,cAAU,0BAAS,iBAAI,EAAE,UAAM,iBAAI,CAAC,CAAC,GAAG,CAAC;AAAA,IACzC,eAAW,YAAAA,MAAM,UAAU;AAAA,IAC3B,eAAW,0BAAS,iBAAI,CAAC;AAAA,IACzB,gBAAY,0BAAS,iBAAI,CAAC;AAAA,EAC5B,CAAC;AACH;","names":["_enum"]}
@@ -1,6 +1,7 @@
1
1
  import * as zod_v4_core from 'zod/v4/core';
2
2
  import * as zod_mini from 'zod/mini';
3
3
  import { output } from 'zod/mini';
4
+ import { Stripe } from 'stripe';
4
5
 
5
6
  declare const cancellationDetailsSchema: zod_mini.ZodMiniObject<{
6
7
  comment: zod_mini.ZodMiniOptional<zod_mini.ZodMiniNullable<zod_mini.ZodMiniString<string>>>;
@@ -29,7 +30,7 @@ declare function createCheckoutSessionSchema(productIds: string[]): zod_mini.Zod
29
30
  successUrl: zod_mini.ZodMiniOptional<zod_mini.ZodMiniURL>;
30
31
  }, zod_v4_core.$strip>;
31
32
  interface CancellationDetails extends output<typeof cancellationDetailsSchema> {
32
- reason?: 'cancellation_requested' | 'payment_disputed' | 'payment_failed' | null;
33
+ reason?: Stripe.Subscription.CancellationDetails.Reason | null;
33
34
  }
34
35
  interface CreateCheckoutSessionDTO {
35
36
  productId: string;
@@ -1,6 +1,7 @@
1
1
  import * as zod_v4_core from 'zod/v4/core';
2
2
  import * as zod_mini from 'zod/mini';
3
3
  import { output } from 'zod/mini';
4
+ import { Stripe } from 'stripe';
4
5
 
5
6
  declare const cancellationDetailsSchema: zod_mini.ZodMiniObject<{
6
7
  comment: zod_mini.ZodMiniOptional<zod_mini.ZodMiniNullable<zod_mini.ZodMiniString<string>>>;
@@ -29,7 +30,7 @@ declare function createCheckoutSessionSchema(productIds: string[]): zod_mini.Zod
29
30
  successUrl: zod_mini.ZodMiniOptional<zod_mini.ZodMiniURL>;
30
31
  }, zod_v4_core.$strip>;
31
32
  interface CancellationDetails extends output<typeof cancellationDetailsSchema> {
32
- reason?: 'cancellation_requested' | 'payment_disputed' | 'payment_failed' | null;
33
+ reason?: Stripe.Subscription.CancellationDetails.Reason | null;
33
34
  }
34
35
  interface CreateCheckoutSessionDTO {
35
36
  productId: string;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/stripe/schema.ts"],"sourcesContent":["import {\n _default,\n enum as _enum,\n gte,\n int,\n maxLength,\n nullable,\n object,\n optional,\n type output,\n string,\n url,\n} from 'zod/mini';\n\nexport const cancellationDetailsSchema = object({\n comment: optional(nullable(string().check(maxLength(1024)))),\n feedback: optional(\n nullable(\n _enum([\n 'customer_service',\n 'low_quality',\n 'missing_features',\n 'switched_service',\n 'too_complex',\n 'too_expensive',\n 'unused',\n 'other',\n ])\n )\n ),\n resubscribeIntent: optional(nullable(_enum(['maybe', 'no', 'yes']))),\n});\n\nexport function createCheckoutSessionSchema(productIds: string[]) {\n return object({\n quantity: _default(int().check(gte(1)), 1),\n productId: _enum(productIds),\n cancelUrl: optional(url()),\n successUrl: optional(url()),\n });\n}\n\nexport interface CancellationDetails extends output<typeof cancellationDetailsSchema> {\n reason?: 'cancellation_requested' | 'payment_disputed' | 'payment_failed' | null;\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,EACE;AAAA,EACA,QAAQ;AAAA,EACR;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,OACK;AAEA,IAAM,4BAA4B,OAAO;AAAA,EAC9C,SAAS,SAAS,SAAS,OAAO,EAAE,MAAM,UAAU,IAAI,CAAC,CAAC,CAAC;AAAA,EAC3D,UAAU;AAAA,IACR;AAAA,MACE,MAAM;AAAA,QACJ;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EACA,mBAAmB,SAAS,SAAS,MAAM,CAAC,SAAS,MAAM,KAAK,CAAC,CAAC,CAAC;AACrE,CAAC;AAEM,SAAS,4BAA4B,YAAsB;AAChE,SAAO,OAAO;AAAA,IACZ,UAAU,SAAS,IAAI,EAAE,MAAM,IAAI,CAAC,CAAC,GAAG,CAAC;AAAA,IACzC,WAAW,MAAM,UAAU;AAAA,IAC3B,WAAW,SAAS,IAAI,CAAC;AAAA,IACzB,YAAY,SAAS,IAAI,CAAC;AAAA,EAC5B,CAAC;AACH;","names":[]}
1
+ {"version":3,"sources":["../../src/stripe/schema.ts"],"sourcesContent":["import type { Stripe } from 'stripe';\nimport {\n _default,\n enum as _enum,\n gte,\n int,\n maxLength,\n nullable,\n object,\n optional,\n type output,\n string,\n url,\n} from 'zod/mini';\n\nexport const cancellationDetailsSchema = object({\n comment: optional(nullable(string().check(maxLength(1024)))),\n feedback: optional(\n nullable(\n _enum([\n 'customer_service',\n 'low_quality',\n 'missing_features',\n 'switched_service',\n 'too_complex',\n 'too_expensive',\n 'unused',\n 'other',\n ])\n )\n ),\n resubscribeIntent: optional(nullable(_enum(['maybe', 'no', 'yes']))),\n});\n\nexport function createCheckoutSessionSchema(productIds: string[]) {\n return object({\n quantity: _default(int().check(gte(1)), 1),\n productId: _enum(productIds),\n cancelUrl: optional(url()),\n successUrl: optional(url()),\n });\n}\n\nexport interface CancellationDetails extends output<typeof cancellationDetailsSchema> {\n reason?: Stripe.Subscription.CancellationDetails.Reason | null;\n}\n\nexport interface CreateCheckoutSessionDTO {\n productId: string;\n cancelUrl?: string;\n successUrl?: `${string}session_id={CHECKOUT_SESSION_ID}${string}`;\n}\n"],"mappings":";AACA;AAAA,EACE;AAAA,EACA,QAAQ;AAAA,EACR;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,OACK;AAEA,IAAM,4BAA4B,OAAO;AAAA,EAC9C,SAAS,SAAS,SAAS,OAAO,EAAE,MAAM,UAAU,IAAI,CAAC,CAAC,CAAC;AAAA,EAC3D,UAAU;AAAA,IACR;AAAA,MACE,MAAM;AAAA,QACJ;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EACA,mBAAmB,SAAS,SAAS,MAAM,CAAC,SAAS,MAAM,KAAK,CAAC,CAAC,CAAC;AACrE,CAAC;AAEM,SAAS,4BAA4B,YAAsB;AAChE,SAAO,OAAO;AAAA,IACZ,UAAU,SAAS,IAAI,EAAE,MAAM,IAAI,CAAC,CAAC,GAAG,CAAC;AAAA,IACzC,WAAW,MAAM,UAAU;AAAA,IAC3B,WAAW,SAAS,IAAI,CAAC;AAAA,IACzB,YAAY,SAAS,IAAI,CAAC;AAAA,EAC5B,CAAC;AACH;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shware/purchase",
3
- "version": "1.7.0",
3
+ "version": "1.8.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -50,7 +50,7 @@
50
50
  "@repo/typescript-config": "0.0.0"
51
51
  },
52
52
  "peerDependencies": {
53
- "stripe": "^21"
53
+ "stripe": "^22"
54
54
  },
55
55
  "peerDependenciesMeta": {
56
56
  "stripe": {