@timardex/cluemart-shared 1.7.33 → 1.7.36
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/auth/index.cjs +1 -0
- package/dist/auth/index.cjs.map +1 -1
- package/dist/auth/index.d.mts +1 -1
- package/dist/auth/index.d.ts +1 -1
- package/dist/auth/index.mjs +1 -0
- package/dist/auth/index.mjs.map +1 -1
- package/dist/{chunk-DJQMVUPX.mjs → chunk-QOPOOOS7.mjs} +3 -3
- package/dist/{chunk-DJQMVUPX.mjs.map → chunk-QOPOOOS7.mjs.map} +1 -1
- package/dist/graphql/index.cjs +2 -2
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.mjs +1 -1
- package/dist/hooks/index.cjs +8 -4
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.mjs +7 -3
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/graphql/index.mjs
CHANGED
package/dist/hooks/index.cjs
CHANGED
|
@@ -5697,8 +5697,8 @@ var UPDATE_COUPON_MUTATION = import_client79.gql`
|
|
|
5697
5697
|
${COUPON}
|
|
5698
5698
|
`;
|
|
5699
5699
|
var DELETE_COUPON_MUTATION = import_client79.gql`
|
|
5700
|
-
mutation deleteCoupon($
|
|
5701
|
-
deleteCoupon(
|
|
5700
|
+
mutation deleteCoupon($couponDocumentId: ID!, $couponId: ID!) {
|
|
5701
|
+
deleteCoupon(couponDocumentId: $couponDocumentId, couponId: $couponId) {
|
|
5702
5702
|
data
|
|
5703
5703
|
message
|
|
5704
5704
|
}
|
|
@@ -5939,8 +5939,12 @@ var appSettingsSchema = yup9.object({
|
|
|
5939
5939
|
// src/yupSchema/coupon.ts
|
|
5940
5940
|
var yup10 = __toESM(require("yup"));
|
|
5941
5941
|
var couponPurchaseOptionSchema = yup10.object().shape({
|
|
5942
|
-
buy: yup10.number().transform((_, originalValue) => toOptionalNumber(originalValue)).label("
|
|
5943
|
-
get: yup10.number().transform((_, originalValue) => toOptionalNumber(originalValue)).label("
|
|
5942
|
+
buy: yup10.number().transform((_, originalValue) => toOptionalNumber(originalValue)).label("How many do they need to buy?").typeError("Buy must be a number").integer("Buy must be a whole number").min(1, "Buy must be at least 1").required("Buy is required"),
|
|
5943
|
+
get: yup10.number().transform((_, originalValue) => toOptionalNumber(originalValue)).label("How many do they get?").typeError("Get must be a number").integer("Get must be a whole number").min(1, "Get must be at least 1").required("Get is required").test("get-less-than-buy", "Get must be less than Buy", function(value) {
|
|
5944
|
+
const { buy } = this.parent;
|
|
5945
|
+
if (value === void 0 || buy === void 0) return true;
|
|
5946
|
+
return value < buy;
|
|
5947
|
+
}),
|
|
5944
5948
|
type: yup10.mixed().oneOf(["PURCHASE" /* PURCHASE */], "Type must be PURCHASE").required("Type is required"),
|
|
5945
5949
|
unit: yup10.string().label("Unit").trim().required("Unit is required")
|
|
5946
5950
|
});
|