dt-common-device
Version:
A secure and robust device management library for IoT applications
17 lines (16 loc) • 652 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.JobUtils = void 0;
class JobUtils {
static extractConnectionDetails(options) {
const { connectionId, connectionProvider: provider, microservice, } = options?.queueOptions ?? {};
if (!connectionId)
throw new Error("Connection ID not found in options");
if (!provider)
throw new Error("Connection provider not found in options");
if (!microservice)
throw new Error("Microservice not found in options");
return { connectionId, provider, microservice };
}
}
exports.JobUtils = JobUtils;