hey-pharmacist-ecommerce 1.1.29 → 1.1.30
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/dist/index.d.mts +10734 -1256
- package/dist/index.d.ts +10734 -1256
- package/dist/index.js +2741 -295
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2686 -296
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/hooks/useStoreCapabilities.ts +87 -0
- package/src/index.ts +4 -0
- package/src/lib/Apis/apis/auth-api.ts +19 -7
- package/src/lib/Apis/apis/categories-api.ts +97 -0
- package/src/lib/Apis/apis/products-api.ts +97 -0
- package/src/lib/Apis/apis/shipping-api.ts +105 -0
- package/src/lib/Apis/apis/stores-api.ts +356 -0
- package/src/lib/Apis/apis/sub-categories-api.ts +97 -0
- package/src/lib/Apis/apis/users-api.ts +8 -8
- package/src/lib/Apis/models/address-created-request.ts +0 -12
- package/src/lib/Apis/models/address.ts +0 -12
- package/src/lib/Apis/models/api-key-info-dto.ts +49 -0
- package/src/lib/Apis/models/create-address-dto.ts +0 -12
- package/src/lib/Apis/models/create-discount-dto.ts +0 -8
- package/src/lib/Apis/models/create-store-address-dto.ts +0 -12
- package/src/lib/Apis/models/create-store-dto-settings.ts +51 -0
- package/src/lib/Apis/models/create-store-dto.ts +7 -0
- package/src/lib/Apis/models/create-variant-dto.ts +0 -6
- package/src/lib/Apis/models/discount.ts +0 -8
- package/src/lib/Apis/models/index.ts +11 -0
- package/src/lib/Apis/models/populated-discount.ts +0 -8
- package/src/lib/Apis/models/product-variant.ts +0 -6
- package/src/lib/Apis/models/reorder-categories-dto.ts +27 -0
- package/src/lib/Apis/models/reorder-products-dto.ts +49 -0
- package/src/lib/Apis/models/reorder-products-success-response-dto.ts +33 -0
- package/src/lib/Apis/models/reorder-subcategories-dto.ts +33 -0
- package/src/lib/Apis/models/reorder-success-response-dto.ts +33 -0
- package/src/lib/Apis/models/shipment-with-order.ts +18 -0
- package/src/lib/Apis/models/shipment.ts +18 -0
- package/src/lib/Apis/models/store-api-keys-response-dto.ts +34 -0
- package/src/lib/Apis/models/store-capabilities-dto.ts +63 -0
- package/src/lib/Apis/models/store-entity.ts +7 -0
- package/src/lib/Apis/models/store.ts +7 -0
- package/src/lib/Apis/models/update-address-dto.ts +0 -12
- package/src/lib/Apis/models/update-api-keys-dto.ts +39 -0
- package/src/lib/Apis/models/update-discount-dto.ts +0 -8
- package/src/lib/Apis/models/update-manual-shipment-status-dto.ts +47 -0
- package/src/lib/Apis/models/update-store-dto.ts +7 -0
- package/src/lib/Apis/models/update-variant-dto.ts +0 -6
- package/src/screens/CheckoutScreen.tsx +363 -278
- package/src/screens/ResetPasswordScreen.tsx +10 -4
|
@@ -69,7 +69,14 @@ export function ResetPasswordScreen() {
|
|
|
69
69
|
setStatus(null);
|
|
70
70
|
try {
|
|
71
71
|
const authApi = new AuthApi(AXIOS_CONFIG);
|
|
72
|
-
|
|
72
|
+
if (!storeId) {
|
|
73
|
+
setStatus({
|
|
74
|
+
type: 'error',
|
|
75
|
+
message: 'Store ID is missing. Please use the link from your email.',
|
|
76
|
+
});
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
await authApi.resetPassword(data.newPassword, token, storeId);
|
|
73
80
|
setStatus({
|
|
74
81
|
type: 'success',
|
|
75
82
|
message: 'Password reset successfully! Redirecting to login...',
|
|
@@ -117,11 +124,10 @@ export function ResetPasswordScreen() {
|
|
|
117
124
|
>
|
|
118
125
|
{status && (
|
|
119
126
|
<div
|
|
120
|
-
className={`flex items-start gap-2 rounded-2xl border px-4 py-3 text-sm ${
|
|
121
|
-
status.type === 'success'
|
|
127
|
+
className={`flex items-start gap-2 rounded-2xl border px-4 py-3 text-sm ${status.type === 'success'
|
|
122
128
|
? 'border-green-200 bg-green-50 text-green-800'
|
|
123
129
|
: 'border-red-200 bg-red-50 text-red-700'
|
|
124
|
-
|
|
130
|
+
}`}
|
|
125
131
|
>
|
|
126
132
|
<span className="mt-[2px] text-base">{status.type === 'success' ? '✔' : '!'}</span>
|
|
127
133
|
<span>{status.message}</span>
|