2016-08-07 12:58:20 +00:00
|
|
|
"use strict";
|
2016-08-12 03:56:40 +00:00
|
|
|
const smartsocket_classes_socketfunction_1 = require("./smartsocket.classes.socketfunction");
|
|
|
|
const smartsocket_classes_socketrequest_1 = require("./smartsocket.classes.socketrequest");
|
2016-08-09 09:42:21 +00:00
|
|
|
const smartsocket_classes_socketrole_1 = require("./smartsocket.classes.socketrole");
|
2016-08-12 03:56:40 +00:00
|
|
|
// SocketFunction helpers
|
|
|
|
exports.getSocketFunctionByName = (functionNameArg) => {
|
|
|
|
return smartsocket_classes_socketfunction_1.allSocketFunctions.find((socketFunctionArg) => { return socketFunctionArg.name === functionNameArg; });
|
|
|
|
};
|
|
|
|
// SocketRequest helpers
|
|
|
|
/**
|
|
|
|
* get corresponding Socketrequest instance by shortId
|
|
|
|
*/
|
|
|
|
exports.getSocketRequestById = (shortIdArg, requestSide) => {
|
|
|
|
return smartsocket_classes_socketrequest_1.allSocketRequests.find((socketRequestArg) => { return socketRequestArg.shortid === shortIdArg; });
|
|
|
|
};
|
2016-08-09 09:42:21 +00:00
|
|
|
// SocketRole helpers
|
2016-08-12 03:56:40 +00:00
|
|
|
/**
|
|
|
|
* get corresponding SocketRole instance by name
|
|
|
|
*/
|
|
|
|
exports.getSocketRoleByName = (socketRoleNameArg) => {
|
2016-08-09 09:42:21 +00:00
|
|
|
return smartsocket_classes_socketrole_1.allSocketRoles.find((socketRoleArg) => { return socketRoleArg.name === socketRoleNameArg; });
|
2016-08-07 16:59:39 +00:00
|
|
|
};
|
2016-08-12 03:56:40 +00:00
|
|
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRzb2NrZXQuaGVscGVycy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3NtYXJ0c29ja2V0LmhlbHBlcnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUlBLHFEQUFtRCxzQ0FBc0MsQ0FBQ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