@ancon/wildcat-utils 1.50.9 → 1.50.10

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 y=require("./isWalletTopUpCheckoutItem.js"),I=require("./isGiftCardCheckoutItem.js");require("@ancon/wildcat-types");function i(u,a){const{product:r,quantity:n,modifications:p,upsellGroupId:l,totalPriceInclTax:s,addOnProducts:c,itemType:d}=u;if(y(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:s.amount},metaData:e,quantity:n,modifications:[],addOnProducts:[],itemType:d}}if(I(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:s.amount},metaData:e,quantity:n,modifications:[],addOnProducts:[],itemType:d}}return{variantId:r.variantId,quantity:n,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})),addOnProducts:c.map(e=>({quantity:e.quantity,freeAmount:e.addOnFreeAmount,variantId:e.product.variantId,unitQuantity:e.quantity,addOnGroupId:e.addOnGroupId})),upsellGroupId:l,itemType:d}}module.exports=i;
1
+ "use strict";const y=require("./isWalletTopUpCheckoutItem.js"),I=require("./isGiftCardCheckoutItem.js");require("@ancon/wildcat-types");function i(u,a){const{product:r,quantity:n,modifications:p,upsellGroupId:l,totalPriceInclTax:d,addOnProducts:c,itemType:s}=u;if(y(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:d.amount},metaData:e,quantity:n,modifications:[],addOnProducts:[],itemType:s}}if(I(u)){let e=null;if(a){const t=a;e=JSON.stringify({draftGiftCardId:t.draftGiftCardId,amount:t.amount,email:t.email,externalPurchase:t.externalPurchase,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:d.amount},metaData:e,quantity:n,modifications:[],addOnProducts:[],itemType:s}}return{variantId:r.variantId,quantity:n,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})),addOnProducts:c.map(e=>({quantity:e.quantity,freeAmount:e.addOnFreeAmount,variantId:e.product.variantId,unitQuantity:e.quantity,addOnGroupId:e.addOnGroupId})),upsellGroupId:l,itemType:s}}module.exports=i;
@@ -39,6 +39,7 @@ function v(u, a) {
39
39
  draftGiftCardId: t.draftGiftCardId,
40
40
  amount: t.amount,
41
41
  email: t.email,
42
+ externalPurchase: t.externalPurchase,
42
43
  greetingMessage: t.greetingMessage,
43
44
  id: t.id,
44
45
  receivedBy: t.receivedBy,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ancon/wildcat-utils",
3
- "version": "1.50.9",
3
+ "version": "1.50.10",
4
4
  "private": false,
5
5
  "main": "index.js",
6
6
  "module": "index.mjs",