decord/source/modules/payments/OrderActionCreators.tsx

104 lines
3.2 KiB
TypeScript
Raw Normal View History

2026-07-24 07:16:23 +00:00
// Module ID: 5625
2026-07-27 11:26:19 +00:00
// Function ID: 48014
2026-07-20 16:05:17 +00:00
// Name: _callSuper
2026-07-25 08:10:48 +00:00
// Dependencies: [5, 7, 6, 15, 17, 18, 653, 3, 3799, 507, 3792, 2]
2026-07-20 16:05:17 +00:00
// Exports: fetchOrderEntitlements, getOrder, signOrder
2026-07-24 07:16:23 +00:00
// Module 5625 (_callSuper)
2026-07-23 10:11:24 +00:00
import _inherits from "_inherits";
import timestamp from "timestamp";
import ME from "ME";
import _possibleConstructorReturn from "_possibleConstructorReturn";
import _getPrototypeOf from "_getPrototypeOf";
import closure_7 from "_inherits";
import { Endpoints } from "ME";
import importDefaultResult from "_possibleConstructorReturn";
import tmp4 from "_isNativeReflectConstruct";
import tmp5 from "_isNativeReflectConstruct";
const require = arg1;
2026-07-20 16:05:17 +00:00
function _callSuper(arg0, arg1, arg2) {
let items = arg2;
const obj = callback3(arg1);
if (_isNativeReflectConstruct()) {
if (!items) {
items = [];
}
let constructResult = Reflect.construct(obj, items, callback3(arg0).constructor);
} else {
constructResult = obj.apply(arg0, items);
}
2026-07-23 10:11:24 +00:00
return _possibleConstructorReturn(arg0, constructResult);
2026-07-20 16:05:17 +00:00
}
function _isNativeReflectConstruct() {
let closure_0 = !valueOf.call(Reflect.construct(Boolean, [], () => {
}));
function _isNativeReflectConstruct() {
return closure_0;
}
const result = _isNativeReflectConstruct();
}
async function _signOrder(arg0, arg1) {
2026-07-23 10:11:24 +00:00
let iter = (function*(orderId) {
2026-07-20 16:05:17 +00:00
let expectedRevision;
let loadId;
({ expectedRevision, loadId } = orderId);
yield undefined;
let obj = {};
if (null != expectedRevision) {
obj.expected_revision = expectedRevision;
}
2026-07-23 10:11:24 +00:00
const HTTP = outer2_0(outer2_1[9]).HTTP;
obj = { url: outer2_8.ORDER_SIGN(orderId.orderId), body: obj };
2026-07-20 16:05:17 +00:00
let tmp3;
if (null != loadId) {
if ("" !== loadId) {
obj = { load_id: loadId };
tmp3 = obj;
}
}
obj.context = tmp3;
obj.rejectWithError = true;
const tmp5 = yield HTTP.post(obj);
if (null == tmp5.body) {
const _Error = Error;
const error = new Error("Invalid sign order response");
throw error;
} else {
return tmp5.body;
}
2026-07-23 10:11:24 +00:00
})();
iter.next();
return iter;
2026-07-20 16:05:17 +00:00
}
async function _getOrder(arg0, arg1) {
2026-07-23 10:11:24 +00:00
const HTTP = outer2_0(outer2_1[9]).HTTP;
const body = yield HTTP.get({ url: outer2_8.ORDER_GET(arg0), rejectWithError: true }).body;
2026-07-20 16:05:17 +00:00
let tmp = body;
if (!body) {
tmp = null;
}
return tmp;
}
async function _fetchOrderEntitlements(arg0, arg1) {
2026-07-23 10:11:24 +00:00
const HTTP = outer2_0(outer2_1[9]).HTTP;
const tmp = yield HTTP.get({ url: outer2_8.ORDER_ENTITLEMENTS(arg0), rejectWithError: false });
2026-07-20 16:05:17 +00:00
return null != tmp.body ? tmp.body : [];
}
importDefaultResult = new importDefaultResult("OrderActionCreators");
2026-07-23 10:11:24 +00:00
let closure_10 = tmp4;
let result = require("_classCallCheck").fileFinishedImporting("modules/payments/OrderActionCreators.tsx");
2026-07-20 16:05:17 +00:00
export const OrderSigningFailedWithConstraintsError = tmp4;
export const OrderProcessingPendingError = tmp5;
export const signOrder = function signOrder(arg0) {
return _signOrder(...arguments);
};
2026-07-23 10:11:24 +00:00
export const getOrder = function getOrder(outer1_0) {
2026-07-20 16:05:17 +00:00
return _getOrder(...arguments);
};
export const fetchOrderEntitlements = function fetchOrderEntitlements(id) {
return _fetchOrderEntitlements(...arguments);
};