@betterstore/react 0.2.5 → 0.2.8

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/.prettierignore CHANGED
@@ -1,3 +1,3 @@
1
- node_modules
2
- dist
1
+ node_modules
2
+ dist
3
3
  pnpm-lock.yaml
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @betterstore/sdk
2
2
 
3
+ ## 0.2.8
4
+
5
+ ### Patch Changes
6
+
7
+ - bug fix, tailwind bug
8
+
9
+ ## 0.2.7
10
+
11
+ ### Patch Changes
12
+
13
+ - bug fixes
14
+
15
+ ## 0.2.6
16
+
17
+ ### Patch Changes
18
+
19
+ - bug fixes
20
+
3
21
  ## 0.2.5
4
22
 
5
23
  ### Patch Changes
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 Better Store
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Better Store
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -3,6 +3,7 @@ import type { CheckoutFormData } from "./checkout-schema";
3
3
  interface CheckoutFormProps {
4
4
  checkoutId: string;
5
5
  onComplete?: (data: CheckoutFormData) => void;
6
+ cancelUrl: string;
6
7
  }
7
- export default function CheckoutForm({ checkoutId, onComplete, }: CheckoutFormProps): React.JSX.Element;
8
+ export default function CheckoutForm({ checkoutId, onComplete, cancelUrl, }: CheckoutFormProps): React.JSX.Element;
8
9
  export {};
@@ -43,22 +43,6 @@ export declare const shippingMethodSchema: z.ZodObject<{
43
43
  }, {
44
44
  method: "economy" | "standard";
45
45
  }>;
46
- export declare const paymentMethodSchema: z.ZodObject<{
47
- cardNumber: z.ZodString;
48
- expiryDate: z.ZodString;
49
- cvv: z.ZodString;
50
- nameOnCard: z.ZodString;
51
- }, "strip", z.ZodTypeAny, {
52
- cardNumber: string;
53
- expiryDate: string;
54
- cvv: string;
55
- nameOnCard: string;
56
- }, {
57
- cardNumber: string;
58
- expiryDate: string;
59
- cvv: string;
60
- nameOnCard: string;
61
- }>;
62
46
  export declare const checkoutSchema: z.ZodObject<{
63
47
  customer: z.ZodObject<{
64
48
  email: z.ZodString;
@@ -104,22 +88,6 @@ export declare const checkoutSchema: z.ZodObject<{
104
88
  }, {
105
89
  method: "economy" | "standard";
106
90
  }>;
107
- payment: z.ZodObject<{
108
- cardNumber: z.ZodString;
109
- expiryDate: z.ZodString;
110
- cvv: z.ZodString;
111
- nameOnCard: z.ZodString;
112
- }, "strip", z.ZodTypeAny, {
113
- cardNumber: string;
114
- expiryDate: string;
115
- cvv: string;
116
- nameOnCard: string;
117
- }, {
118
- cardNumber: string;
119
- expiryDate: string;
120
- cvv: string;
121
- nameOnCard: string;
122
- }>;
123
91
  }, "strip", z.ZodTypeAny, {
124
92
  customer: {
125
93
  email: string;
@@ -137,12 +105,6 @@ export declare const checkoutSchema: z.ZodObject<{
137
105
  shipping: {
138
106
  method: "economy" | "standard";
139
107
  };
140
- payment: {
141
- cardNumber: string;
142
- expiryDate: string;
143
- cvv: string;
144
- nameOnCard: string;
145
- };
146
108
  }, {
147
109
  customer: {
148
110
  email: string;
@@ -160,14 +122,7 @@ export declare const checkoutSchema: z.ZodObject<{
160
122
  shipping: {
161
123
  method: "economy" | "standard";
162
124
  };
163
- payment: {
164
- cardNumber: string;
165
- expiryDate: string;
166
- cvv: string;
167
- nameOnCard: string;
168
- };
169
125
  }>;
170
126
  export type CheckoutFormData = z.infer<typeof checkoutSchema>;
171
127
  export type CustomerFormData = z.infer<typeof customerSchema>;
172
128
  export type ShippingMethodFormData = z.infer<typeof shippingMethodSchema>;
173
- export type PaymentMethodFormData = z.infer<typeof paymentMethodSchema>;
@@ -1,6 +1,8 @@
1
1
  import React from "react";
2
- declare function CheckoutEmbed({ checkoutId }: {
2
+ declare function CheckoutEmbed({ checkoutId, cancelUrl, successUrl, }: {
3
3
  checkoutId: string;
4
+ cancelUrl: string;
5
+ successUrl: string;
4
6
  }): React.JSX.Element;
5
7
  declare const _default: React.MemoExoticComponent<typeof CheckoutEmbed>;
6
8
  export default _default;
@@ -1,13 +1,12 @@
1
1
  import React from "react";
2
- import { type PaymentMethodFormData } from "../checkout-schema";
3
2
  interface PaymentFormProps {
4
- initialData?: PaymentMethodFormData;
5
- onSubmit: (data: PaymentMethodFormData) => void;
3
+ paymentSecret: string | null;
4
+ onSubmit: (data: any) => void;
6
5
  onBack: () => void;
7
6
  contactEmail: string;
8
7
  shippingAddress: string;
9
8
  shippingMethod: string;
10
9
  shippingPrice: string;
11
10
  }
12
- export default function PaymentForm({ initialData, onSubmit, onBack, contactEmail, shippingAddress, shippingMethod, shippingPrice, }: PaymentFormProps): React.JSX.Element;
11
+ export default function PaymentForm({ paymentSecret, onSubmit, onBack, contactEmail, shippingAddress, shippingMethod, shippingPrice, }: PaymentFormProps): React.JSX.Element;
13
12
  export {};