38 lines
1.4 KiB
TypeScript
38 lines
1.4 KiB
TypeScript
// Module ID: 500
|
|
// Function ID: 501
|
|
// Name: buildQosTokenFromDerivedData
|
|
// Dependencies: [501, 3, 14198, 1224, 2]
|
|
// Exports: buildQosToken
|
|
|
|
// Module 500 (buildQosTokenFromDerivedData)
|
|
import timestampDefault from "timestamp" /* 3 */;
|
|
import defineProperty from "defineProperty" /* 14198 */;
|
|
import closure_2 from "initialize" /* 501 */;
|
|
|
|
require = arg1;
|
|
function buildQosTokenFromDerivedData(derivedQosData, isActive) {
|
|
let derived;
|
|
const ClientProvidedQosData = defineProperty.ClientProvidedQosData;
|
|
let clientProvided = { isActive };
|
|
clientProvided = ClientProvidedQosData.create(clientProvided);
|
|
if (null != derivedQosData) {
|
|
try {
|
|
let tmp2Result = tmp2(1224);
|
|
derived = tmp2Result.b64ToProto(tmp2(14198).DerivedQosData, derivedQosData);
|
|
} catch (tmp5) {
|
|
const _HermesInternal = HermesInternal;
|
|
logger.warn("Failed to decode derived QOS data: " + tmp5);
|
|
}
|
|
}
|
|
tmp2Result = tmp2(1224);
|
|
const QosToken = tmp2(14198).QosToken;
|
|
return tmp2Result.protoToB64(defineProperty.QosToken, QosToken.create({ clientProvided, derived }));
|
|
}
|
|
let closure_3 = new timestampDefault("QOS");
|
|
const tmp2 = new timestampDefault("QOS");
|
|
const result = require("set").fileFinishedImporting("modules/gateway/qos/QosToken.tsx");
|
|
|
|
export { buildQosTokenFromDerivedData };
|
|
export const buildQosToken = function buildQosToken(userId, isUserActive) {
|
|
return buildQosTokenFromDerivedData(forUser.getForUser(userId), isUserActive);
|
|
};
|