"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Types = void 0; exports._unregisterAll = _unregisterAll; exports.addConnectTrigger = addConnectTrigger; exports.addFunction = addFunction; exports.addJob = addJob; exports.addLiveQueryEventHandler = addLiveQueryEventHandler; exports.addTrigger = addTrigger; exports.getClassName = getClassName; exports.getFunction = getFunction; exports.getFunctionNames = getFunctionNames; exports.getJob = getJob; exports.getJobs = getJobs; exports.getRequestFileObject = getRequestFileObject; exports.getRequestObject = getRequestObject; exports.getRequestQueryObject = getRequestQueryObject; exports.getResponseObject = getResponseObject; exports.getTrigger = getTrigger; exports.getValidator = getValidator; exports.inflate = inflate; exports.maybeRunAfterFindTrigger = maybeRunAfterFindTrigger; exports.maybeRunFileTrigger = maybeRunFileTrigger; exports.maybeRunGlobalConfigTrigger = maybeRunGlobalConfigTrigger; exports.maybeRunQueryTrigger = maybeRunQueryTrigger; exports.maybeRunTrigger = maybeRunTrigger; exports.maybeRunValidator = maybeRunValidator; exports.removeFunction = removeFunction; exports.removeTrigger = removeTrigger; exports.resolveError = resolveError; exports.runLiveQueryEventHandlers = runLiveQueryEventHandlers; exports.runTrigger = runTrigger; exports.toJSONwithObjects = toJSONwithObjects; exports.triggerExists = triggerExists; var _node = _interopRequireDefault(require("parse/node")); var _logger = require("./logger"); function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; } function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } // triggers.js const Types = exports.Types = { beforeLogin: 'beforeLogin', afterLogin: 'afterLogin', afterLogout: 'afterLogout', beforeSave: 'beforeSave', afterSave: 'afterSave', beforeDelete: 'beforeDelete', afterDelete: 'afterDelete', beforeFind: 'beforeFind', afterFind: 'afterFind', beforeConnect: 'beforeConnect', beforeSubscribe: 'beforeSubscribe', afterEvent: 'afterEvent' }; const ConnectClassName = '@Connect'; const baseStore = function () { const Validators = Object.keys(Types).reduce(function (base, key) { base[key] = {}; return base; }, {}); const Functions = {}; const Jobs = {}; const LiveQuery = []; const Triggers = Object.keys(Types).reduce(function (base, key) { base[key] = {}; return base; }, {}); return Object.freeze({ Functions, Jobs, Validators, Triggers, LiveQuery }); }; function getClassName(parseClass) { if (parseClass && parseClass.className) { return parseClass.className; } if (parseClass && parseClass.name) { return parseClass.name.replace('Parse', '@'); } return parseClass; } function validateClassNameForTriggers(className, type) { if (type == Types.beforeSave && className === '_PushStatus') { // _PushStatus uses undocumented nested key increment ops // allowing beforeSave would mess up the objects big time // TODO: Allow proper documented way of using nested increment ops throw 'Only afterSave is allowed on _PushStatus'; } if ((type === Types.beforeLogin || type === Types.afterLogin) && className !== '_User') { // TODO: check if upstream code will handle `Error` instance rather // than this anti-pattern of throwing strings throw 'Only the _User class is allowed for the beforeLogin and afterLogin triggers'; } if (type === Types.afterLogout && className !== '_Session') { // TODO: check if upstream code will handle `Error` instance rather // than this anti-pattern of throwing strings throw 'Only the _Session class is allowed for the afterLogout trigger.'; } if (className === '_Session' && type !== Types.afterLogout) { // TODO: check if upstream code will handle `Error` instance rather // than this anti-pattern of throwing strings throw 'Only the afterLogout trigger is allowed for the _Session class.'; } return className; } const _triggerStore = {}; const Category = { Functions: 'Functions', Validators: 'Validators', Jobs: 'Jobs', Triggers: 'Triggers' }; function getStore(category, name, applicationId) { const invalidNameRegex = /['"`]/; if (invalidNameRegex.test(name)) { // Prevent a malicious user from injecting properties into the store return {}; } const path = name.split('.'); path.splice(-1); // remove last component applicationId = applicationId || _node.default.applicationId; _triggerStore[applicationId] = _triggerStore[applicationId] || baseStore(); let store = _triggerStore[applicationId][category]; for (const component of path) { store = store[component]; if (!store) { return {}; } } return store; } function add(category, name, handler, applicationId) { const lastComponent = name.split('.').splice(-1); const store = getStore(category, name, applicationId); if (store[lastComponent]) { _logger.logger.warn(`Warning: Duplicate cloud functions exist for ${lastComponent}. Only the last one will be used and the others will be ignored.`); } store[lastComponent] = handler; } function remove(category, name, applicationId) { const lastComponent = name.split('.').splice(-1); const store = getStore(category, name, applicationId); delete store[lastComponent]; } function get(category, name, applicationId) { const lastComponent = name.split('.').splice(-1); const store = getStore(category, name, applicationId); return store[lastComponent]; } function addFunction(functionName, handler, validationHandler, applicationId) { add(Category.Functions, functionName, handler, applicationId); add(Category.Validators, functionName, validationHandler, applicationId); } function addJob(jobName, handler, applicationId) { add(Category.Jobs, jobName, handler, applicationId); } function addTrigger(type, className, handler, applicationId, validationHandler) { validateClassNameForTriggers(className, type); add(Category.Triggers, `${type}.${className}`, handler, applicationId); add(Category.Validators, `${type}.${className}`, validationHandler, applicationId); } function addConnectTrigger(type, handler, applicationId, validationHandler) { add(Category.Triggers, `${type}.${ConnectClassName}`, handler, applicationId); add(Category.Validators, `${type}.${ConnectClassName}`, validationHandler, applicationId); } function addLiveQueryEventHandler(handler, applicationId) { applicationId = applicationId || _node.default.applicationId; _triggerStore[applicationId] = _triggerStore[applicationId] || baseStore(); _triggerStore[applicationId].LiveQuery.push(handler); } function removeFunction(functionName, applicationId) { remove(Category.Functions, functionName, applicationId); } function removeTrigger(type, className, applicationId) { remove(Category.Triggers, `${type}.${className}`, applicationId); } function _unregisterAll() { Object.keys(_triggerStore).forEach(appId => delete _triggerStore[appId]); } function toJSONwithObjects(object, className) { if (!object || !object.toJSON) { return {}; } const toJSON = object.toJSON(); const stateController = _node.default.CoreManager.getObjectStateController(); const [pending] = stateController.getPendingOps(object._getStateIdentifier()); for (const key in pending) { const val = object.get(key); if (!val || !val._toFullJSON) { toJSON[key] = val; continue; } toJSON[key] = val._toFullJSON(); } if (className) { toJSON.className = className; } return toJSON; } function getTrigger(className, triggerType, applicationId) { if (!applicationId) { throw 'Missing ApplicationID'; } return get(Category.Triggers, `${triggerType}.${className}`, applicationId); } async function runTrigger(trigger, name, request, auth) { if (!trigger) { return; } await maybeRunValidator(request, name, auth); if (request.skipWithMasterKey) { return; } return await trigger(request); } function triggerExists(className, type, applicationId) { return getTrigger(className, type, applicationId) != undefined; } function getFunction(functionName, applicationId) { return get(Category.Functions, functionName, applicationId); } function getFunctionNames(applicationId) { const store = _triggerStore[applicationId] && _triggerStore[applicationId][Category.Functions] || {}; const functionNames = []; const extractFunctionNames = (namespace, store) => { Object.keys(store).forEach(name => { const value = store[name]; if (namespace) { name = `${namespace}.${name}`; } if (typeof value === 'function') { functionNames.push(name); } else { extractFunctionNames(name, value); } }); }; extractFunctionNames(null, store); return functionNames; } function getJob(jobName, applicationId) { return get(Category.Jobs, jobName, applicationId); } function getJobs(applicationId) { var manager = _triggerStore[applicationId]; if (manager && manager.Jobs) { return manager.Jobs; } return undefined; } function getValidator(functionName, applicationId) { return get(Category.Validators, functionName, applicationId); } function getRequestObject(triggerType, auth, parseObject, originalParseObject, config, context) { const request = { triggerName: triggerType, object: parseObject, master: false, log: config.loggerController, headers: config.headers, ip: config.ip }; if (originalParseObject) { request.original = originalParseObject; } if (triggerType === Types.beforeSave || triggerType === Types.afterSave || triggerType === Types.beforeDelete || triggerType === Types.afterDelete || triggerType === Types.beforeLogin || triggerType === Types.afterLogin || triggerType === Types.afterFind) { // Set a copy of the context on the request object. request.context = Object.assign({}, context); } if (!auth) { return request; } if (auth.isMaster) { request['master'] = true; } if (auth.user) { request['user'] = auth.user; } if (auth.installationId) { request['installationId'] = auth.installationId; } return request; } function getRequestQueryObject(triggerType, auth, query, count, config, context, isGet) { isGet = !!isGet; var request = { triggerName: triggerType, query, master: false, count, log: config.loggerController, isGet, headers: config.headers, ip: config.ip, context: context || {} }; if (!auth) { return request; } if (auth.isMaster) { request['master'] = true; } if (auth.user) { request['user'] = auth.user; } if (auth.installationId) { request['installationId'] = auth.installationId; } return request; } // Creates the response object, and uses the request object to pass data // The API will call this with REST API formatted objects, this will // transform them to Parse.Object instances expected by Cloud Code. // Any changes made to the object in a beforeSave will be included. function getResponseObject(request, resolve, reject) { return { success: function (response) { if (request.triggerName === Types.afterFind) { if (!response) { response = request.objects; } response = response.map(object => { return toJSONwithObjects(object); }); return resolve(response); } // Use the JSON response if (response && typeof response === 'object' && !request.object.equals(response) && request.triggerName === Types.beforeSave) { return resolve(response); } if (response && typeof response === 'object' && request.triggerName === Types.afterSave) { return resolve(response); } if (request.triggerName === Types.afterSave) { return resolve(); } response = {}; if (request.triggerName === Types.beforeSave) { response['object'] = request.object._getSaveJSON(); response['object']['objectId'] = request.object.id; } return resolve(response); }, error: function (error) { const e = resolveError(error, { code: _node.default.Error.SCRIPT_FAILED, message: 'Script failed. Unknown error.' }); reject(e); } }; } function userIdForLog(auth) { return auth && auth.user ? auth.user.id : undefined; } function logTriggerAfterHook(triggerType, className, input, auth, logLevel) { if (logLevel === 'silent') { return; } const cleanInput = _logger.logger.truncateLogMessage(JSON.stringify(input)); _logger.logger[logLevel](`${triggerType} triggered for ${className} for user ${userIdForLog(auth)}:\n Input: ${cleanInput}`, { className, triggerType, user: userIdForLog(auth) }); } function logTriggerSuccessBeforeHook(triggerType, className, input, result, auth, logLevel) { if (logLevel === 'silent') { return; } const cleanInput = _logger.logger.truncateLogMessage(JSON.stringify(input)); const cleanResult = _logger.logger.truncateLogMessage(JSON.stringify(result)); _logger.logger[logLevel](`${triggerType} triggered for ${className} for user ${userIdForLog(auth)}:\n Input: ${cleanInput}\n Result: ${cleanResult}`, { className, triggerType, user: userIdForLog(auth) }); } function logTriggerErrorBeforeHook(triggerType, className, input, auth, error, logLevel) { if (logLevel === 'silent') { return; } const cleanInput = _logger.logger.truncateLogMessage(JSON.stringify(input)); _logger.logger[logLevel](`${triggerType} failed for ${className} for user ${userIdForLog(auth)}:\n Input: ${cleanInput}\n Error: ${JSON.stringify(error)}`, { className, triggerType, error, user: userIdForLog(auth) }); } function maybeRunAfterFindTrigger(triggerType, auth, className, objects, config, query, context) { return new Promise((resolve, reject) => { const trigger = getTrigger(className, triggerType, config.applicationId); if (!trigger) { return resolve(); } const request = getRequestObject(triggerType, auth, null, null, config, context); if (query) { request.query = query; } const { success, error } = getResponseObject(request, object => { resolve(object); }, error => { reject(error); }); logTriggerSuccessBeforeHook(triggerType, className, 'AfterFind', JSON.stringify(objects), auth, config.logLevels.triggerBeforeSuccess); request.objects = objects.map(object => { //setting the class name to transform into parse object object.className = className; return _node.default.Object.fromJSON(object); }); return Promise.resolve().then(() => { return maybeRunValidator(request, `${triggerType}.${className}`, auth); }).then(() => { if (request.skipWithMasterKey) { return request.objects; } const response = trigger(request); if (response && typeof response.then === 'function') { return response.then(results => { return results; }); } return response; }).then(success, error); }).then(results => { logTriggerAfterHook(triggerType, className, JSON.stringify(results), auth, config.logLevels.triggerAfter); return results; }); } function maybeRunQueryTrigger(triggerType, className, restWhere, restOptions, config, auth, context, isGet) { const trigger = getTrigger(className, triggerType, config.applicationId); if (!trigger) { return Promise.resolve({ restWhere, restOptions }); } const json = Object.assign({}, restOptions); json.where = restWhere; const parseQuery = new _node.default.Query(className); parseQuery.withJSON(json); let count = false; if (restOptions) { count = !!restOptions.count; } const requestObject = getRequestQueryObject(triggerType, auth, parseQuery, count, config, context, isGet); return Promise.resolve().then(() => { return maybeRunValidator(requestObject, `${triggerType}.${className}`, auth); }).then(() => { if (requestObject.skipWithMasterKey) { return requestObject.query; } return trigger(requestObject); }).then(result => { let queryResult = parseQuery; if (result && result instanceof _node.default.Query) { queryResult = result; } const jsonQuery = queryResult.toJSON(); if (jsonQuery.where) { restWhere = jsonQuery.where; } if (jsonQuery.limit) { restOptions = restOptions || {}; restOptions.limit = jsonQuery.limit; } if (jsonQuery.skip) { restOptions = restOptions || {}; restOptions.skip = jsonQuery.skip; } if (jsonQuery.include) { restOptions = restOptions || {}; restOptions.include = jsonQuery.include; } if (jsonQuery.excludeKeys) { restOptions = restOptions || {}; restOptions.excludeKeys = jsonQuery.excludeKeys; } if (jsonQuery.explain) { restOptions = restOptions || {}; restOptions.explain = jsonQuery.explain; } if (jsonQuery.keys) { restOptions = restOptions || {}; restOptions.keys = jsonQuery.keys; } if (jsonQuery.order) { restOptions = restOptions || {}; restOptions.order = jsonQuery.order; } if (jsonQuery.hint) { restOptions = restOptions || {}; restOptions.hint = jsonQuery.hint; } if (jsonQuery.comment) { restOptions = restOptions || {}; restOptions.comment = jsonQuery.comment; } if (requestObject.readPreference) { restOptions = restOptions || {}; restOptions.readPreference = requestObject.readPreference; } if (requestObject.includeReadPreference) { restOptions = restOptions || {}; restOptions.includeReadPreference = requestObject.includeReadPreference; } if (requestObject.subqueryReadPreference) { restOptions = restOptions || {}; restOptions.subqueryReadPreference = requestObject.subqueryReadPreference; } return { restWhere, restOptions }; }, err => { const error = resolveError(err, { code: _node.default.Error.SCRIPT_FAILED, message: 'Script failed. Unknown error.' }); throw error; }); } function resolveError(message, defaultOpts) { if (!defaultOpts) { defaultOpts = {}; } if (!message) { return new _node.default.Error(defaultOpts.code || _node.default.Error.SCRIPT_FAILED, defaultOpts.message || 'Script failed.'); } if (message instanceof _node.default.Error) { return message; } const code = defaultOpts.code || _node.default.Error.SCRIPT_FAILED; // If it's an error, mark it as a script failed if (typeof message === 'string') { return new _node.default.Error(code, message); } const error = new _node.default.Error(code, message.message || message); if (message instanceof Error) { error.stack = message.stack; } return error; } function maybeRunValidator(request, functionName, auth) { const theValidator = getValidator(functionName, _node.default.applicationId); if (!theValidator) { return; } if (typeof theValidator === 'object' && theValidator.skipWithMasterKey && request.master) { request.skipWithMasterKey = true; } return new Promise((resolve, reject) => { return Promise.resolve().then(() => { return typeof theValidator === 'object' ? builtInTriggerValidator(theValidator, request, auth) : theValidator(request); }).then(() => { resolve(); }).catch(e => { const error = resolveError(e, { code: _node.default.Error.VALIDATION_ERROR, message: 'Validation failed.' }); reject(error); }); }); } async function builtInTriggerValidator(options, request, auth) { if (request.master && !options.validateMasterKey) { return; } let reqUser = request.user; if (!reqUser && request.object && request.object.className === '_User' && !request.object.existed()) { reqUser = request.object; } if ((options.requireUser || options.requireAnyUserRoles || options.requireAllUserRoles) && !reqUser) { throw 'Validation failed. Please login to continue.'; } if (options.requireMaster && !request.master) { throw 'Validation failed. Master key is required to complete this request.'; } let params = request.params || {}; if (request.object) { params = request.object.toJSON(); } const requiredParam = key => { const value = params[key]; if (value == null) { throw `Validation failed. Please specify data for ${key}.`; } }; const validateOptions = async (opt, key, val) => { let opts = opt.options; if (typeof opts === 'function') { try { const result = await opts(val); if (!result && result != null) { throw opt.error || `Validation failed. Invalid value for ${key}.`; } } catch (e) { if (!e) { throw opt.error || `Validation failed. Invalid value for ${key}.`; } throw opt.error || e.message || e; } return; } if (!Array.isArray(opts)) { opts = [opt.options]; } if (!opts.includes(val)) { throw opt.error || `Validation failed. Invalid option for ${key}. Expected: ${opts.join(', ')}`; } }; const getType = fn => { const match = fn && fn.toString().match(/^\s*function (\w+)/); return (match ? match[1] : '').toLowerCase(); }; if (Array.isArray(options.fields)) { for (const key of options.fields) { requiredParam(key); } } else { const optionPromises = []; for (const key in options.fields) { const opt = options.fields[key]; let val = params[key]; if (typeof opt === 'string') { requiredParam(opt); } if (typeof opt === 'object') { if (opt.default != null && val == null) { val = opt.default; params[key] = val; if (request.object) { request.object.set(key, val); } } if (opt.constant && request.object) { if (request.original) { request.object.revert(key); } else if (opt.default != null) { request.object.set(key, opt.default); } } if (opt.required) { requiredParam(key); } const optional = !opt.required && val === undefined; if (!optional) { if (opt.type) { const type = getType(opt.type); const valType = Array.isArray(val) ? 'array' : typeof val; if (valType !== type) { throw `Validation failed. Invalid type for ${key}. Expected: ${type}`; } } if (opt.options) { optionPromises.push(validateOptions(opt, key, val)); } } } } await Promise.all(optionPromises); } let userRoles = options.requireAnyUserRoles; let requireAllRoles = options.requireAllUserRoles; const promises = [Promise.resolve(), Promise.resolve(), Promise.resolve()]; if (userRoles || requireAllRoles) { promises[0] = auth.getUserRoles(); } if (typeof userRoles === 'function') { promises[1] = userRoles(); } if (typeof requireAllRoles === 'function') { promises[2] = requireAllRoles(); } const [roles, resolvedUserRoles, resolvedRequireAll] = await Promise.all(promises); if (resolvedUserRoles && Array.isArray(resolvedUserRoles)) { userRoles = resolvedUserRoles; } if (resolvedRequireAll && Array.isArray(resolvedRequireAll)) { requireAllRoles = resolvedRequireAll; } if (userRoles) { const hasRole = userRoles.some(requiredRole => roles.includes(`role:${requiredRole}`)); if (!hasRole) { throw `Validation failed. User does not match the required roles.`; } } if (requireAllRoles) { for (const requiredRole of requireAllRoles) { if (!roles.includes(`role:${requiredRole}`)) { throw `Validation failed. User does not match all the required roles.`; } } } const userKeys = options.requireUserKeys || []; if (Array.isArray(userKeys)) { for (const key of userKeys) { if (!reqUser) { throw 'Please login to make this request.'; } if (reqUser.get(key) == null) { throw `Validation failed. Please set data for ${key} on your account.`; } } } else if (typeof userKeys === 'object') { const optionPromises = []; for (const key in options.requireUserKeys) { const opt = options.requireUserKeys[key]; if (opt.options) { optionPromises.push(validateOptions(opt, key, reqUser.get(key))); } } await Promise.all(optionPromises); } } // To be used as part of the promise chain when saving/deleting an object // Will resolve successfully if no trigger is configured // Resolves to an object, empty or containing an object key. A beforeSave // trigger will set the object key to the rest format object to save. // originalParseObject is optional, we only need that for before/afterSave functions function maybeRunTrigger(triggerType, auth, parseObject, originalParseObject, config, context) { if (!parseObject) { return Promise.resolve({}); } return new Promise(function (resolve, reject) { var trigger = getTrigger(parseObject.className, triggerType, config.applicationId); if (!trigger) return resolve(); var request = getRequestObject(triggerType, auth, parseObject, originalParseObject, config, context); var { success, error } = getResponseObject(request, object => { logTriggerSuccessBeforeHook(triggerType, parseObject.className, parseObject.toJSON(), object, auth, triggerType.startsWith('after') ? config.logLevels.triggerAfter : config.logLevels.triggerBeforeSuccess); if (triggerType === Types.beforeSave || triggerType === Types.afterSave || triggerType === Types.beforeDelete || triggerType === Types.afterDelete) { Object.assign(context, request.context); } resolve(object); }, error => { logTriggerErrorBeforeHook(triggerType, parseObject.className, parseObject.toJSON(), auth, error, config.logLevels.triggerBeforeError); reject(error); }); // AfterSave and afterDelete triggers can return a promise, which if they // do, needs to be resolved before this promise is resolved, // so trigger execution is synced with RestWrite.execute() call. // If triggers do not return a promise, they can run async code parallel // to the RestWrite.execute() call. return Promise.resolve().then(() => { return maybeRunValidator(request, `${triggerType}.${parseObject.className}`, auth); }).then(() => { if (request.skipWithMasterKey) { return Promise.resolve(); } const promise = trigger(request); if (triggerType === Types.afterSave || triggerType === Types.afterDelete || triggerType === Types.afterLogin) { logTriggerAfterHook(triggerType, parseObject.className, parseObject.toJSON(), auth, config.logLevels.triggerAfter); } // beforeSave is expected to return null (nothing) if (triggerType === Types.beforeSave) { if (promise && typeof promise.then === 'function') { return promise.then(response => { // response.object may come from express routing before hook if (response && response.object) { return response; } return null; }); } return null; } return promise; }).then(success, error); }); } // Converts a REST-format object to a Parse.Object // data is either className or an object function inflate(data, restObject) { var copy = typeof data == 'object' ? data : { className: data }; for (var key in restObject) { copy[key] = restObject[key]; } return _node.default.Object.fromJSON(copy); } function runLiveQueryEventHandlers(data, applicationId = _node.default.applicationId) { if (!_triggerStore || !_triggerStore[applicationId] || !_triggerStore[applicationId].LiveQuery) { return; } _triggerStore[applicationId].LiveQuery.forEach(handler => handler(data)); } function getRequestFileObject(triggerType, auth, fileObject, config) { const request = _objectSpread(_objectSpread({}, fileObject), {}, { triggerName: triggerType, master: false, log: config.loggerController, headers: config.headers, ip: config.ip }); if (!auth) { return request; } if (auth.isMaster) { request['master'] = true; } if (auth.user) { request['user'] = auth.user; } if (auth.installationId) { request['installationId'] = auth.installationId; } return request; } async function maybeRunFileTrigger(triggerType, fileObject, config, auth) { const FileClassName = getClassName(_node.default.File); const fileTrigger = getTrigger(FileClassName, triggerType, config.applicationId); if (typeof fileTrigger === 'function') { try { const request = getRequestFileObject(triggerType, auth, fileObject, config); await maybeRunValidator(request, `${triggerType}.${FileClassName}`, auth); if (request.skipWithMasterKey) { return fileObject; } const result = await fileTrigger(request); logTriggerSuccessBeforeHook(triggerType, 'Parse.File', _objectSpread(_objectSpread({}, fileObject.file.toJSON()), {}, { fileSize: fileObject.fileSize }), result, auth, config.logLevels.triggerBeforeSuccess); return result || fileObject; } catch (error) { logTriggerErrorBeforeHook(triggerType, 'Parse.File', _objectSpread(_objectSpread({}, fileObject.file.toJSON()), {}, { fileSize: fileObject.fileSize }), auth, error, config.logLevels.triggerBeforeError); throw error; } } return fileObject; } async function maybeRunGlobalConfigTrigger(triggerType, auth, configObject, originalConfigObject, config, context) { const GlobalConfigClassName = getClassName(_node.default.Config); const configTrigger = getTrigger(GlobalConfigClassName, triggerType, config.applicationId); if (typeof configTrigger === 'function') { try { const request = getRequestObject(triggerType, auth, configObject, originalConfigObject, config, context); await maybeRunValidator(request, `${triggerType}.${GlobalConfigClassName}`, auth); if (request.skipWithMasterKey) { return configObject; } const result = await configTrigger(request); logTriggerSuccessBeforeHook(triggerType, 'Parse.Config', configObject, result, auth, config.logLevels.triggerBeforeSuccess); return result || configObject; } catch (error) { logTriggerErrorBeforeHook(triggerType, 'Parse.Config', configObject, auth, error, config.logLevels.triggerBeforeError); throw error; } } return configObject; } //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6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AgICAgICByZXN0T3B0aW9ucyA9IHJlc3RPcHRpb25zIHx8IHt9O1xuICAgICAgICAgIHJlc3RPcHRpb25zLmV4Y2x1ZGVLZXlzID0ganNvblF1ZXJ5LmV4Y2x1ZGVLZXlzO1xuICAgICAgICB9XG4gICAgICAgIGlmIChqc29uUXVlcnkuZXhwbGFpbikge1xuICAgICAgICAgIHJlc3RPcHRpb25zID0gcmVzdE9wdGlvbnMgfHwge307XG4gICAgICAgICAgcmVzdE9wdGlvbnMuZXhwbGFpbiA9IGpzb25RdWVyeS5leHBsYWluO1xuICAgICAgICB9XG4gICAgICAgIGlmIChqc29uUXVlcnkua2V5cykge1xuICAgICAgICAgIHJlc3RPcHRpb25zID0gcmVzdE9wdGlvbnMgfHwge307XG4gICAgICAgICAgcmVzdE9wdGlvbnMua2V5cyA9IGpzb25RdWVyeS5rZXlzO1xuICAgICAgICB9XG4gICAgICAgIGlmIChqc29uUXVlcnkub3JkZXIpIHtcbiAgICAgICAgICByZXN0T3B0aW9ucyA9IHJlc3RPcHRpb25zIHx8IHt9O1xuICAgICAgICAgIHJlc3RPcHRpb25zLm9yZGVyID0ganNvblF1ZXJ5Lm9yZGVyO1xuICAgICAgICB9XG4gICAgICAgIGlmIChqc29uUXVlcnkuaGludCkge1xuICAgICAgICAgIHJlc3RPcHRpb25zID0gcmVzdE9wdGlvbnMgfHwge307XG4gICAgICAgICAgcmVzdE9wdGlvbnMuaGludCA9IGpzb25RdWVyeS5oaW50O1xuICAgICAgICB9XG4gICAgICAgIGlmIChqc29uUXVlcnkuY29tbWVudCkge1xuICAgICAgICAgIHJlc3RPcHRpb25zID0gcmVzdE9wdGlvbnMgfHwge307XG4gICAgICAgICAgcmVzdE9wdGlvbnMuY29tbWVudCA9IGpzb25RdWVyeS5jb21tZW50O1xuICAgICAgICB9XG4gICAgICAgIGlmIChyZXF1ZXN0T2JqZWN0LnJlYWRQcmVmZXJlbmNlKSB7XG4gICAgICAgICAgcmVzdE9wdGlvbnMgPSByZX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ZWZhdWx0ICE9IG51bGwpIHtcbiAgICAgICAgICAgIHJlcXVlc3Qub2JqZWN0LnNldChrZXksIG9wdC5kZWZhdWx0KTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG9wdC5yZXF1aXJlZCkge1xuICAgICAgICAgIHJlcXVpcmVkUGFyYW0oa2V5KTtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCBvcHRpb25hbCA9ICFvcHQucmVxdWlyZWQgJiYgdmFsID09PSB1bmRlZmluZWQ7XG4gICAgICAgIGlmICghb3B0aW9uYWwpIHtcbiAgICAgICAgICBpZiAob3B0LnR5cGUpIHtcbiAgICAgICAgICAgIGNvbnN0IHR5cGUgPSBnZXRUeXBlKG9wdC50eXBlKTtcbiAgICAgICAgICAgIGNvbnN0IHZhbFR5cGUgPSBBcnJheS5pc0FycmF5KHZhbCkgPyAnYXJyYXknIDogdHlwZW9mIHZhbDtcbiAgICAgICAgICAgIGlmICh2YWxUeXBlICE9PSB0eXBlKSB7XG4gICAgICAgICAgICAgIHRocm93IGBWYWxpZGF0aW9uIGZhaWxlZC4gSW52YWxpZCB0eXBlIGZvciAke2tleX0uIEV4cGVjdGVkOiAke3R5cGV9YDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKG9wdC5vcHRpb25zKSB7XG4gICAgICAgICAgICBvcHRpb25Qcm9taXNlcy5wdXNoKHZhbGlkYXRlT3B0aW9ucyhvcHQsIGtleSwgdmFsKSk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuICAgIGF3YWl0IFByb21pc2UuYWxsKG9wdGlvblByb21pc2VzKTtcbiAgfVxuICBsZXQgdXNlclJvbGVzID0gb3B0aW9ucy5yZXF1aXJlQW55VXNlclJvbGVzO1xuICBsZXQgcmVxdWlyZUFsbFJvbGVzID0gb3B0aW9ucy5yZXF1aXJlQWxsVXNlclJvbGVzO1xuICBjb25zdCBwcm9taXNlc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