Module 158317

968 characters · in 66fcd3a46b1f0423.js
Dependencies
Required by (2)
Lazily required by (0)none
Lazily requires (0)none
Source Raw
function(e,t,r){r.d(t,{FY:()=>s,Ub:()=>c,j2:()=>o,pI:()=>d});var n=r(636537),a=r(136857),l=r(626584);r(739508);var i=r(652215);new l.A("OrderActionCreators");class s extends a.Ay{order;constructor(e){super("Order signing failed due to unsatisfied constraints"),this.order=e}}class o extends a.Ay{constructor(){super("Order signed but entitlements not yet visible after polling")}}async function c(e){let t,{orderId:r,expectedRevision:a,loadId:l}=e,o={};null!=a&&(o.expected_revision=a);try{t=await n.Bo.post({url:i.Rsh.ORDER_SIGN(r),body:o,context:null!=l&&""!==l?{load_id:l}:void 0,rejectWithError:!0})}catch(e){var c;if(e instanceof n.oh&&400===e.status&&null!=(c=e.body)&&"object"==typeof c&&"id"in c&&"status"in c)throw new s(e.body);throw e}if(null==t.body)throw Error("Invalid sign order response");return t.body}async function d(e){try{let t=await n.Bo.get({url:i.Rsh.ORDER_ENTITLEMENTS(e),rejectWithError:!1});return null!=t.body?t.body:[]}catch(e){return[]}}}