lml-main
Version:
This is now a mono repository published into many standalone packages.
23 lines • 1.22 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var redux_rx_http_1 = require("redux-rx-http");
exports.FETCH_COURIER_ACTION_BY_JOB_ID = redux_rx_http_1.createRxHttpActionTypes('FETCH_COURIER_ACTION_BY_JOB_ID');
exports.POST_COURIER_ACTION = redux_rx_http_1.createRxHttpActionTypes('POST_COURIER_ACTION');
exports.SET_COURIER_ACTION_BY_JOB_ID = 'SET_COURIER_ACTION_BY_JOB_ID';
exports.fetchCourierActionByJobId = function (jobRefId, args) {
return redux_rx_http_1.rxHttpGet(
// note this endpoint is not in v2 yet
"/v1/courieraction/job/" + jobRefId, exports.FETCH_COURIER_ACTION_BY_JOB_ID, {}, {
args: tslib_1.__assign({ jobRefId: jobRefId }, args),
});
};
exports.postCourierAction = function (courierAction, args) {
return redux_rx_http_1.rxHttpPost('/v2/courieraction', exports.POST_COURIER_ACTION, courierAction, {
args: tslib_1.__assign({ courierAction: courierAction }, args),
});
};
exports.setCourierActionByJobId = function (jobRefId, courierActions) {
return ({ type: exports.SET_COURIER_ACTION_BY_JOB_ID, jobRefId: jobRefId, courierActions: courierActions });
};
//# sourceMappingURL=courier-action.js.map