@ancon/wildcat-utils 1.46.0 → 1.46.1

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
- "use strict";const c=require("./isWalletTopUpCheckoutItem.js"),d=require("./isGiftCardCheckoutItem.js");require("@ancon/wildcat-types");function y(a,u){const{product:r,quantity:s,modifications:p,upsellGroupId:l,totalPriceInclTax:n}=a;if(c(a)){let e=null;if(u){const t=u;e=JSON.stringify({id:t.id,prepaidWalletNumber:t.prepaidWalletNumber})}return{productType:r.productType,variantType:r.variantType,price:{unitPrice:n.amount},metaData:e,quantity:s,modifications:[]}}if(d(a)){let e=null;if(u){const t=u;e=JSON.stringify({amount:t.amount,email:t.email,greetingMessage:t.greetingMessage,id:t.id,receivedBy:t.receivedBy,senderEmail:t.senderEmail,sendingBy:t.sendingBy,sms:t.sms})}return{productType:r.productType,variantType:r.variantType,price:{unitPrice:n.amount},metaData:e,quantity:s,modifications:[]}}return{variantId:r.variantId,quantity:s,modifications:p.map(e=>({modification:e.modification,ingredientId:e.ingredientId,quantity:e==null?void 0:e.quantity,freeAmount:e==null?void 0:e.freeAmount,addOnGroupId:(e==null?void 0:e.groupId)||void 0,replaceId:e.replaceId||void 0,description:e==null?void 0:e.description})),upsellGroupId:l}}module.exports=y;
1
+ "use strict";const l=require("./isWalletTopUpCheckoutItem.js"),c=require("./isGiftCardCheckoutItem.js");require("@ancon/wildcat-types");function I(u,a){const{product:r,quantity:s,modifications:p,upsellGroupId:d,totalPriceInclTax:n}=u;if(l(u)){let e=null;if(a){const t=a;e=JSON.stringify({id:t.id,prepaidWalletNumber:t.prepaidWalletNumber})}return{productType:r.productType,variantType:r.variantType,price:{unitPrice:n.amount},metaData:e,quantity:s,modifications:[]}}if(c(u)){let e=null;if(a){const t=a;e=JSON.stringify({draftGiftCardId:t.draftGiftCardId,amount:t.amount,email:t.email,greetingMessage:t.greetingMessage,id:t.id,receivedBy:t.receivedBy,senderEmail:t.senderEmail,sendingBy:t.sendingBy,sms:t.sms})}return{productType:r.productType,variantType:r.variantType,price:{unitPrice:n.amount},metaData:e,quantity:s,modifications:[]}}return{variantId:r.variantId,quantity:s,modifications:p.map(e=>({modification:e.modification,ingredientId:e.ingredientId,quantity:e==null?void 0:e.quantity,freeAmount:e==null?void 0:e.freeAmount,addOnGroupId:(e==null?void 0:e.groupId)||void 0,replaceId:e.replaceId||void 0,description:e==null?void 0:e.description})),upsellGroupId:d}}module.exports=I;
@@ -1,9 +1,9 @@
1
- import d from "./isWalletTopUpCheckoutItem.mjs";
2
- import y from "./isGiftCardCheckoutItem.mjs";
1
+ import l from "./isWalletTopUpCheckoutItem.mjs";
2
+ import I from "./isGiftCardCheckoutItem.mjs";
3
3
  import "@ancon/wildcat-types";
4
- function v(u, a) {
5
- const { product: r, quantity: p, modifications: s, upsellGroupId: l, totalPriceInclTax: n } = u;
6
- if (d(u)) {
4
+ function i(u, a) {
5
+ const { product: r, quantity: p, modifications: s, upsellGroupId: d, totalPriceInclTax: n } = u;
6
+ if (l(u)) {
7
7
  let e = null;
8
8
  if (a) {
9
9
  const t = a;
@@ -21,11 +21,12 @@ function v(u, a) {
21
21
  modifications: []
22
22
  };
23
23
  }
24
- if (y(u)) {
24
+ if (I(u)) {
25
25
  let e = null;
26
26
  if (a) {
27
27
  const t = a;
28
28
  e = JSON.stringify({
29
+ draftGiftCardId: t.draftGiftCardId,
29
30
  amount: t.amount,
30
31
  email: t.email,
31
32
  greetingMessage: t.greetingMessage,
@@ -57,9 +58,9 @@ function v(u, a) {
57
58
  replaceId: e.replaceId || void 0,
58
59
  description: e == null ? void 0 : e.description
59
60
  })),
60
- upsellGroupId: l
61
+ upsellGroupId: d
61
62
  };
62
63
  }
63
64
  export {
64
- v as default
65
+ i as default
65
66
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ancon/wildcat-utils",
3
- "version": "1.46.0",
3
+ "version": "1.46.1",
4
4
  "private": false,
5
5
  "main": "index.js",
6
6
  "module": "index.mjs",