@dgac/nmb2b-client
Version:
EUROCONTROL Network Manager B2B SOAP client
18 lines (16 loc) • 540 B
JavaScript
import { NMB2BError } from "./NMB2BError.mjs";
import { assert } from "./assert.mjs";
//#region src/utils/internals.ts
function injectSendTime(values) {
return {
sendTime: /* @__PURE__ */ new Date(),
...values
};
}
function assertOkReply(reply) {
assert(typeof reply === "object" && reply !== null && "status" in reply, `Invalid NM B2B Response:\n` + JSON.stringify(reply));
if (reply.status !== "OK") throw new NMB2BError({ reply });
}
//#endregion
export { assertOkReply, injectSendTime };
//# sourceMappingURL=internals.mjs.map