Skip to content

Commit

Permalink
test 6
Browse files Browse the repository at this point in the history
  • Loading branch information
KostiantynFandeliuk committed Dec 6, 2024
1 parent 8c2ae06 commit bdd031b
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*! Copyright 2024 Adobe
All Rights Reserved. */
import{h as O}from"./network-error.js";import{f as s,h as E}from"./fetch-graphql.js";import{R as f}from"./fragments.js";import{G as _}from"./getGuestOrder.graphql.js";import{events as a}from"@dropins/tools/event-bus.js";import{b as I}from"./transform-customer-orders-returns.js";const T=`
import{h as O}from"./network-error.js";import{f as s,h as E}from"./fetch-graphql.js";import{R as f}from"./fragments.js";import{G as a}from"./getGuestOrder.graphql.js";import{events as _}from"@dropins/tools/event-bus.js";import{b as l}from"./transform-customer-orders-returns.js";const I=`
mutation REORDER_ITEMS_MUTATION($orderNumber: String!) {
reorderItems(orderNumber: $orderNumber) {
cart {
Expand All @@ -17,15 +17,15 @@ mutation REORDER_ITEMS_MUTATION($orderNumber: String!) {
}
}
}
`,S=async o=>await s(T,{method:"POST",variables:{orderNumber:o}}).then(e=>{var i,n,m,c,u,R;if((i=e.errors)!=null&&i.length)return E(e.errors);const t=!!((c=(m=(n=e==null?void 0:e.data)==null?void 0:n.reorderItems)==null?void 0:m.cart)!=null&&c.itemsV2.items.length),r=((R=(u=e==null?void 0:e.data)==null?void 0:u.reorderItems)==null?void 0:R.userInputErrors)??[];return{success:t,userInputErrors:r}}).catch(O),l=`
`,S=async i=>await s(I,{method:"POST",variables:{orderNumber:i}}).then(e=>{var t,o,c,m,u,R;if((t=e.errors)!=null&&t.length)return E(e.errors);const n=!!((m=(c=(o=e==null?void 0:e.data)==null?void 0:o.reorderItems)==null?void 0:c.cart)!=null&&m.itemsV2.items.length),r=((R=(u=e==null?void 0:e.data)==null?void 0:u.reorderItems)==null?void 0:R.userInputErrors)??[];return{success:n,userInputErrors:r}}).catch(O),T=`
mutation CONFIRM_RETURN_GUEST_ORDER($input: ConfirmReturnInput!) {
confirmReturn(input: $input) {
return {
...OrderReturn
}
}
}
${f}`,$=async(o,e)=>await s(l,{method:"POST",variables:{input:{orderId:o,confirmationKey:e}}}).then(t=>{var r;return(r=t.errors)!=null&&r.length?E(t.errors):t.data}).catch(O),d=`
${f}`,$=async(i,e)=>{const n={orderId:i,confirmationKey:e};return alert(n),await s(T,{method:"POST",variables:{input:n}}).then(r=>{var t;return(t=r.errors)!=null&&t.length?E(r.errors):r.data}).catch(O)},d=`
mutation CONFIRM_CANCEL_ORDER_MUTATION(
$orderId: ID!,
$confirmationKey: String!
Expand All @@ -43,5 +43,5 @@ ${f}`,$=async(o,e)=>await s(l,{method:"POST",variables:{input:{orderId:o,confirm
}
}
}
${_}
`,g=async(o,e)=>s(d,{variables:{orderId:o,confirmationKey:e}}).then(async({errors:t,data:r})=>{var m,c,u,R;const i=[...(m=r==null?void 0:r.confirmCancelOrder)!=null&&m.errorV2?[(c=r==null?void 0:r.confirmCancelOrder)==null?void 0:c.errorV2]:[],...t??[]];let n=null;return(u=r==null?void 0:r.confirmCancelOrder)!=null&&u.order&&(n=I((R=r==null?void 0:r.confirmCancelOrder)==null?void 0:R.order),a.emit("order/data",n)),i.length>0?E(i):n});export{$ as a,g as c,S as r};
${a}
`,g=async(i,e)=>s(d,{variables:{orderId:i,confirmationKey:e}}).then(async({errors:n,data:r})=>{var c,m,u,R;const t=[...(c=r==null?void 0:r.confirmCancelOrder)!=null&&c.errorV2?[(m=r==null?void 0:r.confirmCancelOrder)==null?void 0:m.errorV2]:[],...n??[]];let o=null;return(u=r==null?void 0:r.confirmCancelOrder)!=null&&u.order&&(o=l((R=r==null?void 0:r.confirmCancelOrder)==null?void 0:R.order),_.emit("order/data",o)),t.length>0?E(t):o});export{$ as a,g as c,S as r};

0 comments on commit bdd031b

Please sign in to comment.