Parse.Cloud.js 92 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701
  1. "use strict";
  2. var _node = require("parse/node");
  3. var triggers = _interopRequireWildcard(require("../triggers"));
  4. var _middlewares = require("../middlewares");
  5. function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
  6. function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
  7. 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; }
  8. 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; }
  9. 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; }
  10. function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
  11. 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); }
  12. const Config = require('../Config');
  13. function isParseObjectConstructor(object) {
  14. return typeof object === 'function' && Object.prototype.hasOwnProperty.call(object, 'className');
  15. }
  16. function validateValidator(validator) {
  17. if (!validator || typeof validator === 'function') {
  18. return;
  19. }
  20. const fieldOptions = {
  21. type: ['Any'],
  22. constant: [Boolean],
  23. default: ['Any'],
  24. options: [Array, 'function', 'Any'],
  25. required: [Boolean],
  26. error: [String]
  27. };
  28. const allowedKeys = {
  29. requireUser: [Boolean],
  30. requireAnyUserRoles: [Array, 'function'],
  31. requireAllUserRoles: [Array, 'function'],
  32. requireMaster: [Boolean],
  33. validateMasterKey: [Boolean],
  34. skipWithMasterKey: [Boolean],
  35. requireUserKeys: [Array, Object],
  36. fields: [Array, Object],
  37. rateLimit: [Object]
  38. };
  39. const getType = fn => {
  40. if (Array.isArray(fn)) {
  41. return 'array';
  42. }
  43. if (fn === 'Any' || fn === 'function') {
  44. return fn;
  45. }
  46. const type = typeof fn;
  47. if (typeof fn === 'function') {
  48. const match = fn && fn.toString().match(/^\s*function (\w+)/);
  49. return (match ? match[1] : 'function').toLowerCase();
  50. }
  51. return type;
  52. };
  53. const checkKey = (key, data, validatorParam) => {
  54. const parameter = data[key];
  55. if (!parameter) {
  56. throw `${key} is not a supported parameter for Cloud Function validations.`;
  57. }
  58. const types = parameter.map(type => getType(type));
  59. const type = getType(validatorParam);
  60. if (!types.includes(type) && !types.includes('Any')) {
  61. throw `Invalid type for Cloud Function validation key ${key}. Expected ${types.join('|')}, actual ${type}`;
  62. }
  63. };
  64. for (const key in validator) {
  65. checkKey(key, allowedKeys, validator[key]);
  66. if (key === 'fields' || key === 'requireUserKeys') {
  67. const values = validator[key];
  68. if (Array.isArray(values)) {
  69. continue;
  70. }
  71. for (const value in values) {
  72. const data = values[value];
  73. for (const subKey in data) {
  74. checkKey(subKey, fieldOptions, data[subKey]);
  75. }
  76. }
  77. }
  78. }
  79. }
  80. const getRoute = parseClass => {
  81. const route = {
  82. _User: 'users',
  83. _Session: 'sessions',
  84. '@File': 'files',
  85. '@Config': 'config'
  86. }[parseClass] || 'classes';
  87. if (parseClass === '@File') {
  88. return `/${route}/:id?(.*)`;
  89. }
  90. if (parseClass === '@Config') {
  91. return `/${route}`;
  92. }
  93. return `/${route}/${parseClass}/:id?(.*)`;
  94. };
  95. /** @namespace
  96. * @name Parse
  97. * @description The Parse SDK.
  98. * see [api docs](https://docs.parseplatform.org/js/api) and [guide](https://docs.parseplatform.org/js/guide)
  99. */
  100. /** @namespace
  101. * @name Parse.Cloud
  102. * @memberof Parse
  103. * @description The Parse Cloud Code SDK.
  104. */
  105. var ParseCloud = {};
  106. /**
  107. * Defines a Cloud Function.
  108. *
  109. * **Available in Cloud Code only.**
  110. *
  111. * ```
  112. * Parse.Cloud.define('functionName', (request) => {
  113. * // code here
  114. * }, (request) => {
  115. * // validation code here
  116. * });
  117. *
  118. * Parse.Cloud.define('functionName', (request) => {
  119. * // code here
  120. * }, { ...validationObject });
  121. * ```
  122. *
  123. * @static
  124. * @memberof Parse.Cloud
  125. * @param {String} name The name of the Cloud Function
  126. * @param {Function} data The Cloud Function to register. This function can be an async function and should take one parameter a {@link Parse.Cloud.FunctionRequest}.
  127. * @param {(Object|Function)} validator An optional function to help validating cloud code. This function can be an async function and should take one parameter a {@link Parse.Cloud.FunctionRequest}, or a {@link Parse.Cloud.ValidatorObject}.
  128. */
  129. ParseCloud.define = function (functionName, handler, validationHandler) {
  130. validateValidator(validationHandler);
  131. triggers.addFunction(functionName, handler, validationHandler, _node.Parse.applicationId);
  132. if (validationHandler && validationHandler.rateLimit) {
  133. (0, _middlewares.addRateLimit)(_objectSpread({
  134. requestPath: `/functions/${functionName}`
  135. }, validationHandler.rateLimit), _node.Parse.applicationId, true);
  136. }
  137. };
  138. /**
  139. * Defines a Background Job.
  140. *
  141. * **Available in Cloud Code only.**
  142. *
  143. * @method job
  144. * @name Parse.Cloud.job
  145. * @param {String} name The name of the Background Job
  146. * @param {Function} func The Background Job to register. This function can be async should take a single parameters a {@link Parse.Cloud.JobRequest}
  147. *
  148. */
  149. ParseCloud.job = function (functionName, handler) {
  150. triggers.addJob(functionName, handler, _node.Parse.applicationId);
  151. };
  152. /**
  153. *
  154. * Registers a before save function.
  155. *
  156. * **Available in Cloud Code only.**
  157. *
  158. * If you want to use beforeSave for a predefined class in the Parse JavaScript SDK (e.g. {@link Parse.User} or {@link Parse.File}), you should pass the class itself and not the String for arg1.
  159. *
  160. * ```
  161. * Parse.Cloud.beforeSave('MyCustomClass', (request) => {
  162. * // code here
  163. * }, (request) => {
  164. * // validation code here
  165. * });
  166. *
  167. * Parse.Cloud.beforeSave(Parse.User, (request) => {
  168. * // code here
  169. * }, { ...validationObject })
  170. * ```
  171. *
  172. * @method beforeSave
  173. * @name Parse.Cloud.beforeSave
  174. * @param {(String|Parse.Object)} arg1 The Parse.Object subclass to register the after save function for. This can instead be a String that is the className of the subclass.
  175. * @param {Function} func The function to run before a save. This function can be async and should take one parameter a {@link Parse.Cloud.TriggerRequest};
  176. * @param {(Object|Function)} validator An optional function to help validating cloud code. This function can be an async function and should take one parameter a {@link Parse.Cloud.TriggerRequest}, or a {@link Parse.Cloud.ValidatorObject}.
  177. */
  178. ParseCloud.beforeSave = function (parseClass, handler, validationHandler) {
  179. const className = triggers.getClassName(parseClass);
  180. validateValidator(validationHandler);
  181. triggers.addTrigger(triggers.Types.beforeSave, className, handler, _node.Parse.applicationId, validationHandler);
  182. if (validationHandler && validationHandler.rateLimit) {
  183. (0, _middlewares.addRateLimit)(_objectSpread({
  184. requestPath: getRoute(className),
  185. requestMethods: ['POST', 'PUT']
  186. }, validationHandler.rateLimit), _node.Parse.applicationId, true);
  187. }
  188. };
  189. /**
  190. * Registers a before delete function.
  191. *
  192. * **Available in Cloud Code only.**
  193. *
  194. * If you want to use beforeDelete for a predefined class in the Parse JavaScript SDK (e.g. {@link Parse.User} or {@link Parse.File}), you should pass the class itself and not the String for arg1.
  195. * ```
  196. * Parse.Cloud.beforeDelete('MyCustomClass', (request) => {
  197. * // code here
  198. * }, (request) => {
  199. * // validation code here
  200. * });
  201. *
  202. * Parse.Cloud.beforeDelete(Parse.User, (request) => {
  203. * // code here
  204. * }, { ...validationObject })
  205. *```
  206. *
  207. * @method beforeDelete
  208. * @name Parse.Cloud.beforeDelete
  209. * @param {(String|Parse.Object)} arg1 The Parse.Object subclass to register the before delete function for. This can instead be a String that is the className of the subclass.
  210. * @param {Function} func The function to run before a delete. This function can be async and should take one parameter, a {@link Parse.Cloud.TriggerRequest}.
  211. * @param {(Object|Function)} validator An optional function to help validating cloud code. This function can be an async function and should take one parameter a {@link Parse.Cloud.TriggerRequest}, or a {@link Parse.Cloud.ValidatorObject}.
  212. */
  213. ParseCloud.beforeDelete = function (parseClass, handler, validationHandler) {
  214. const className = triggers.getClassName(parseClass);
  215. validateValidator(validationHandler);
  216. triggers.addTrigger(triggers.Types.beforeDelete, className, handler, _node.Parse.applicationId, validationHandler);
  217. if (validationHandler && validationHandler.rateLimit) {
  218. (0, _middlewares.addRateLimit)(_objectSpread({
  219. requestPath: getRoute(className),
  220. requestMethods: 'DELETE'
  221. }, validationHandler.rateLimit), _node.Parse.applicationId, true);
  222. }
  223. };
  224. /**
  225. *
  226. * Registers the before login function.
  227. *
  228. * **Available in Cloud Code only.**
  229. *
  230. * This function provides further control
  231. * in validating a login attempt. Specifically,
  232. * it is triggered after a user enters
  233. * correct credentials (or other valid authData),
  234. * but prior to a session being generated.
  235. *
  236. * ```
  237. * Parse.Cloud.beforeLogin((request) => {
  238. * // code here
  239. * })
  240. *
  241. * ```
  242. *
  243. * @method beforeLogin
  244. * @name Parse.Cloud.beforeLogin
  245. * @param {Function} func The function to run before a login. This function can be async and should take one parameter a {@link Parse.Cloud.TriggerRequest};
  246. */
  247. ParseCloud.beforeLogin = function (handler, validationHandler) {
  248. let className = '_User';
  249. if (typeof handler === 'string' || isParseObjectConstructor(handler)) {
  250. // validation will occur downstream, this is to maintain internal
  251. // code consistency with the other hook types.
  252. className = triggers.getClassName(handler);
  253. handler = arguments[1];
  254. validationHandler = arguments.length >= 2 ? arguments[2] : null;
  255. }
  256. triggers.addTrigger(triggers.Types.beforeLogin, className, handler, _node.Parse.applicationId);
  257. if (validationHandler && validationHandler.rateLimit) {
  258. (0, _middlewares.addRateLimit)(_objectSpread({
  259. requestPath: `/login`,
  260. requestMethods: 'POST'
  261. }, validationHandler.rateLimit), _node.Parse.applicationId, true);
  262. }
  263. };
  264. /**
  265. *
  266. * Registers the after login function.
  267. *
  268. * **Available in Cloud Code only.**
  269. *
  270. * This function is triggered after a user logs in successfully,
  271. * and after a _Session object has been created.
  272. *
  273. * ```
  274. * Parse.Cloud.afterLogin((request) => {
  275. * // code here
  276. * });
  277. * ```
  278. *
  279. * @method afterLogin
  280. * @name Parse.Cloud.afterLogin
  281. * @param {Function} func The function to run after a login. This function can be async and should take one parameter a {@link Parse.Cloud.TriggerRequest};
  282. */
  283. ParseCloud.afterLogin = function (handler) {
  284. let className = '_User';
  285. if (typeof handler === 'string' || isParseObjectConstructor(handler)) {
  286. // validation will occur downstream, this is to maintain internal
  287. // code consistency with the other hook types.
  288. className = triggers.getClassName(handler);
  289. handler = arguments[1];
  290. }
  291. triggers.addTrigger(triggers.Types.afterLogin, className, handler, _node.Parse.applicationId);
  292. };
  293. /**
  294. *
  295. * Registers the after logout function.
  296. *
  297. * **Available in Cloud Code only.**
  298. *
  299. * This function is triggered after a user logs out.
  300. *
  301. * ```
  302. * Parse.Cloud.afterLogout((request) => {
  303. * // code here
  304. * });
  305. * ```
  306. *
  307. * @method afterLogout
  308. * @name Parse.Cloud.afterLogout
  309. * @param {Function} func The function to run after a logout. This function can be async and should take one parameter a {@link Parse.Cloud.TriggerRequest};
  310. */
  311. ParseCloud.afterLogout = function (handler) {
  312. let className = '_Session';
  313. if (typeof handler === 'string' || isParseObjectConstructor(handler)) {
  314. // validation will occur downstream, this is to maintain internal
  315. // code consistency with the other hook types.
  316. className = triggers.getClassName(handler);
  317. handler = arguments[1];
  318. }
  319. triggers.addTrigger(triggers.Types.afterLogout, className, handler, _node.Parse.applicationId);
  320. };
  321. /**
  322. * Registers an after save function.
  323. *
  324. * **Available in Cloud Code only.**
  325. *
  326. * If you want to use afterSave for a predefined class in the Parse JavaScript SDK (e.g. {@link Parse.User} or {@link Parse.File}), you should pass the class itself and not the String for arg1.
  327. *
  328. * ```
  329. * Parse.Cloud.afterSave('MyCustomClass', async function(request) {
  330. * // code here
  331. * }, (request) => {
  332. * // validation code here
  333. * });
  334. *
  335. * Parse.Cloud.afterSave(Parse.User, async function(request) {
  336. * // code here
  337. * }, { ...validationObject });
  338. * ```
  339. *
  340. * @method afterSave
  341. * @name Parse.Cloud.afterSave
  342. * @param {(String|Parse.Object)} arg1 The Parse.Object subclass to register the after save function for. This can instead be a String that is the className of the subclass.
  343. * @param {Function} func The function to run after a save. This function can be an async function and should take just one parameter, {@link Parse.Cloud.TriggerRequest}.
  344. * @param {(Object|Function)} validator An optional function to help validating cloud code. This function can be an async function and should take one parameter a {@link Parse.Cloud.TriggerRequest}, or a {@link Parse.Cloud.ValidatorObject}.
  345. */
  346. ParseCloud.afterSave = function (parseClass, handler, validationHandler) {
  347. const className = triggers.getClassName(parseClass);
  348. validateValidator(validationHandler);
  349. triggers.addTrigger(triggers.Types.afterSave, className, handler, _node.Parse.applicationId, validationHandler);
  350. };
  351. /**
  352. * Registers an after delete function.
  353. *
  354. * **Available in Cloud Code only.**
  355. *
  356. * If you want to use afterDelete for a predefined class in the Parse JavaScript SDK (e.g. {@link Parse.User} or {@link Parse.File}), you should pass the class itself and not the String for arg1.
  357. * ```
  358. * Parse.Cloud.afterDelete('MyCustomClass', async (request) => {
  359. * // code here
  360. * }, (request) => {
  361. * // validation code here
  362. * });
  363. *
  364. * Parse.Cloud.afterDelete(Parse.User, async (request) => {
  365. * // code here
  366. * }, { ...validationObject });
  367. *```
  368. *
  369. * @method afterDelete
  370. * @name Parse.Cloud.afterDelete
  371. * @param {(String|Parse.Object)} arg1 The Parse.Object subclass to register the after delete function for. This can instead be a String that is the className of the subclass.
  372. * @param {Function} func The function to run after a delete. This function can be async and should take just one parameter, {@link Parse.Cloud.TriggerRequest}.
  373. * @param {(Object|Function)} validator An optional function to help validating cloud code. This function can be an async function and should take one parameter a {@link Parse.Cloud.TriggerRequest}, or a {@link Parse.Cloud.ValidatorObject}.
  374. */
  375. ParseCloud.afterDelete = function (parseClass, handler, validationHandler) {
  376. const className = triggers.getClassName(parseClass);
  377. validateValidator(validationHandler);
  378. triggers.addTrigger(triggers.Types.afterDelete, className, handler, _node.Parse.applicationId, validationHandler);
  379. };
  380. /**
  381. * Registers a before find function.
  382. *
  383. * **Available in Cloud Code only.**
  384. *
  385. * If you want to use beforeFind for a predefined class in the Parse JavaScript SDK (e.g. {@link Parse.User} or {@link Parse.File}), you should pass the class itself and not the String for arg1.
  386. * ```
  387. * Parse.Cloud.beforeFind('MyCustomClass', async (request) => {
  388. * // code here
  389. * }, (request) => {
  390. * // validation code here
  391. * });
  392. *
  393. * Parse.Cloud.beforeFind(Parse.User, async (request) => {
  394. * // code here
  395. * }, { ...validationObject });
  396. *```
  397. *
  398. * @method beforeFind
  399. * @name Parse.Cloud.beforeFind
  400. * @param {(String|Parse.Object)} arg1 The Parse.Object subclass to register the before find function for. This can instead be a String that is the className of the subclass.
  401. * @param {Function} func The function to run before a find. This function can be async and should take just one parameter, {@link Parse.Cloud.BeforeFindRequest}.
  402. * @param {(Object|Function)} validator An optional function to help validating cloud code. This function can be an async function and should take one parameter a {@link Parse.Cloud.BeforeFindRequest}, or a {@link Parse.Cloud.ValidatorObject}.
  403. */
  404. ParseCloud.beforeFind = function (parseClass, handler, validationHandler) {
  405. const className = triggers.getClassName(parseClass);
  406. validateValidator(validationHandler);
  407. triggers.addTrigger(triggers.Types.beforeFind, className, handler, _node.Parse.applicationId, validationHandler);
  408. if (validationHandler && validationHandler.rateLimit) {
  409. (0, _middlewares.addRateLimit)(_objectSpread({
  410. requestPath: getRoute(className),
  411. requestMethods: 'GET'
  412. }, validationHandler.rateLimit), _node.Parse.applicationId, true);
  413. }
  414. };
  415. /**
  416. * Registers an after find function.
  417. *
  418. * **Available in Cloud Code only.**
  419. *
  420. * If you want to use afterFind for a predefined class in the Parse JavaScript SDK (e.g. {@link Parse.User} or {@link Parse.File}), you should pass the class itself and not the String for arg1.
  421. * ```
  422. * Parse.Cloud.afterFind('MyCustomClass', async (request) => {
  423. * // code here
  424. * }, (request) => {
  425. * // validation code here
  426. * });
  427. *
  428. * Parse.Cloud.afterFind(Parse.User, async (request) => {
  429. * // code here
  430. * }, { ...validationObject });
  431. *```
  432. *
  433. * @method afterFind
  434. * @name Parse.Cloud.afterFind
  435. * @param {(String|Parse.Object)} arg1 The Parse.Object subclass to register the after find function for. This can instead be a String that is the className of the subclass.
  436. * @param {Function} func The function to run before a find. This function can be async and should take just one parameter, {@link Parse.Cloud.AfterFindRequest}.
  437. * @param {(Object|Function)} validator An optional function to help validating cloud code. This function can be an async function and should take one parameter a {@link Parse.Cloud.AfterFindRequest}, or a {@link Parse.Cloud.ValidatorObject}.
  438. */
  439. ParseCloud.afterFind = function (parseClass, handler, validationHandler) {
  440. const className = triggers.getClassName(parseClass);
  441. validateValidator(validationHandler);
  442. triggers.addTrigger(triggers.Types.afterFind, className, handler, _node.Parse.applicationId, validationHandler);
  443. };
  444. /**
  445. * Registers a before live query server connect function.
  446. *
  447. * **Available in Cloud Code only.**
  448. *
  449. * ```
  450. * Parse.Cloud.beforeConnect(async (request) => {
  451. * // code here
  452. * }, (request) => {
  453. * // validation code here
  454. * });
  455. *
  456. * Parse.Cloud.beforeConnect(async (request) => {
  457. * // code here
  458. * }, { ...validationObject });
  459. *```
  460. *
  461. * @method beforeConnect
  462. * @name Parse.Cloud.beforeConnect
  463. * @param {Function} func The function to before connection is made. This function can be async and should take just one parameter, {@link Parse.Cloud.ConnectTriggerRequest}.
  464. * @param {(Object|Function)} validator An optional function to help validating cloud code. This function can be an async function and should take one parameter a {@link Parse.Cloud.ConnectTriggerRequest}, or a {@link Parse.Cloud.ValidatorObject}.
  465. */
  466. ParseCloud.beforeConnect = function (handler, validationHandler) {
  467. validateValidator(validationHandler);
  468. triggers.addConnectTrigger(triggers.Types.beforeConnect, handler, _node.Parse.applicationId, validationHandler);
  469. };
  470. /**
  471. * Sends an email through the Parse Server mail adapter.
  472. *
  473. * **Available in Cloud Code only.**
  474. * **Requires a mail adapter to be configured for Parse Server.**
  475. *
  476. * ```
  477. * Parse.Cloud.sendEmail({
  478. * from: 'Example <test@example.com>',
  479. * to: 'contact@example.com',
  480. * subject: 'Test email',
  481. * text: 'This email is a test.'
  482. * });
  483. *```
  484. *
  485. * @method sendEmail
  486. * @name Parse.Cloud.sendEmail
  487. * @param {Object} data The object of the mail data to send.
  488. */
  489. ParseCloud.sendEmail = function (data) {
  490. const config = Config.get(_node.Parse.applicationId);
  491. const emailAdapter = config.userController.adapter;
  492. if (!emailAdapter) {
  493. config.loggerController.error('Failed to send email because no mail adapter is configured for Parse Server.');
  494. return;
  495. }
  496. return emailAdapter.sendMail(data);
  497. };
  498. /**
  499. * Registers a before live query subscription function.
  500. *
  501. * **Available in Cloud Code only.**
  502. *
  503. * If you want to use beforeSubscribe for a predefined class in the Parse JavaScript SDK (e.g. {@link Parse.User} or {@link Parse.File}), you should pass the class itself and not the String for arg1.
  504. * ```
  505. * Parse.Cloud.beforeSubscribe('MyCustomClass', (request) => {
  506. * // code here
  507. * }, (request) => {
  508. * // validation code here
  509. * });
  510. *
  511. * Parse.Cloud.beforeSubscribe(Parse.User, (request) => {
  512. * // code here
  513. * }, { ...validationObject });
  514. *```
  515. *
  516. * @method beforeSubscribe
  517. * @name Parse.Cloud.beforeSubscribe
  518. * @param {(String|Parse.Object)} arg1 The Parse.Object subclass to register the before subscription function for. This can instead be a String that is the className of the subclass.
  519. * @param {Function} func The function to run before a subscription. This function can be async and should take one parameter, a {@link Parse.Cloud.TriggerRequest}.
  520. * @param {(Object|Function)} validator An optional function to help validating cloud code. This function can be an async function and should take one parameter a {@link Parse.Cloud.TriggerRequest}, or a {@link Parse.Cloud.ValidatorObject}.
  521. */
  522. ParseCloud.beforeSubscribe = function (parseClass, handler, validationHandler) {
  523. validateValidator(validationHandler);
  524. const className = triggers.getClassName(parseClass);
  525. triggers.addTrigger(triggers.Types.beforeSubscribe, className, handler, _node.Parse.applicationId, validationHandler);
  526. };
  527. ParseCloud.onLiveQueryEvent = function (handler) {
  528. triggers.addLiveQueryEventHandler(handler, _node.Parse.applicationId);
  529. };
  530. /**
  531. * Registers an after live query server event function.
  532. *
  533. * **Available in Cloud Code only.**
  534. *
  535. * ```
  536. * Parse.Cloud.afterLiveQueryEvent('MyCustomClass', (request) => {
  537. * // code here
  538. * }, (request) => {
  539. * // validation code here
  540. * });
  541. *
  542. * Parse.Cloud.afterLiveQueryEvent('MyCustomClass', (request) => {
  543. * // code here
  544. * }, { ...validationObject });
  545. *```
  546. *
  547. * @method afterLiveQueryEvent
  548. * @name Parse.Cloud.afterLiveQueryEvent
  549. * @param {(String|Parse.Object)} arg1 The Parse.Object subclass to register the after live query event function for. This can instead be a String that is the className of the subclass.
  550. * @param {Function} func The function to run after a live query event. This function can be async and should take one parameter, a {@link Parse.Cloud.LiveQueryEventTrigger}.
  551. * @param {(Object|Function)} validator An optional function to help validating cloud code. This function can be an async function and should take one parameter a {@link Parse.Cloud.LiveQueryEventTrigger}, or a {@link Parse.Cloud.ValidatorObject}.
  552. */
  553. ParseCloud.afterLiveQueryEvent = function (parseClass, handler, validationHandler) {
  554. const className = triggers.getClassName(parseClass);
  555. validateValidator(validationHandler);
  556. triggers.addTrigger(triggers.Types.afterEvent, className, handler, _node.Parse.applicationId, validationHandler);
  557. };
  558. ParseCloud._removeAllHooks = () => {
  559. triggers._unregisterAll();
  560. const config = Config.get(_node.Parse.applicationId);
  561. config === null || config === void 0 || config.unregisterRateLimiters();
  562. };
  563. ParseCloud.useMasterKey = () => {
  564. // eslint-disable-next-line
  565. console.warn('Parse.Cloud.useMasterKey is deprecated (and has no effect anymore) on parse-server, please refer to the cloud code migration notes: http://docs.parseplatform.org/parse-server/guide/#master-key-must-be-passed-explicitly');
  566. };
  567. module.exports = ParseCloud;
  568. /**
  569. * @interface Parse.Cloud.TriggerRequest
  570. * @property {String} installationId If set, the installationId triggering the request.
  571. * @property {Boolean} master If true, means the master key was used.
  572. * @property {Boolean} isChallenge If true, means the current request is originally triggered by an auth challenge.
  573. * @property {Parse.User} user If set, the user that made the request.
  574. * @property {Parse.Object} object The object triggering the hook.
  575. * @property {String} ip The IP address of the client making the request. To ensure retrieving the correct IP address, set the Parse Server option `trustProxy: true` if Parse Server runs behind a proxy server, for example behind a load balancer.
  576. * @property {Object} headers The original HTTP headers for the request.
  577. * @property {String} triggerName The name of the trigger (`beforeSave`, `afterSave`, ...)
  578. * @property {Object} log The current logger inside Parse Server.
  579. * @property {Parse.Object} original If set, the object, as currently stored.
  580. */
  581. /**
  582. * @interface Parse.Cloud.FileTriggerRequest
  583. * @property {String} installationId If set, the installationId triggering the request.
  584. * @property {Boolean} master If true, means the master key was used.
  585. * @property {Parse.User} user If set, the user that made the request.
  586. * @property {Parse.File} file The file that triggered the hook.
  587. * @property {Integer} fileSize The size of the file in bytes.
  588. * @property {Integer} contentLength The value from Content-Length header
  589. * @property {String} ip The IP address of the client making the request.
  590. * @property {Object} headers The original HTTP headers for the request.
  591. * @property {String} triggerName The name of the trigger (`beforeSave`, `afterSave`)
  592. * @property {Object} log The current logger inside Parse Server.
  593. */
  594. /**
  595. * @interface Parse.Cloud.ConnectTriggerRequest
  596. * @property {String} installationId If set, the installationId triggering the request.
  597. * @property {Boolean} useMasterKey If true, means the master key was used.
  598. * @property {Parse.User} user If set, the user that made the request.
  599. * @property {Integer} clients The number of clients connected.
  600. * @property {Integer} subscriptions The number of subscriptions connected.
  601. * @property {String} sessionToken If set, the session of the user that made the request.
  602. */
  603. /**
  604. * @interface Parse.Cloud.LiveQueryEventTrigger
  605. * @property {String} installationId If set, the installationId triggering the request.
  606. * @property {Boolean} useMasterKey If true, means the master key was used.
  607. * @property {Parse.User} user If set, the user that made the request.
  608. * @property {String} sessionToken If set, the session of the user that made the request.
  609. * @property {String} event The live query event that triggered the request.
  610. * @property {Parse.Object} object The object triggering the hook.
  611. * @property {Parse.Object} original If set, the object, as currently stored.
  612. * @property {Integer} clients The number of clients connected.
  613. * @property {Integer} subscriptions The number of subscriptions connected.
  614. * @property {Boolean} sendEvent If the LiveQuery event should be sent to the client. Set to false to prevent LiveQuery from pushing to the client.
  615. */
  616. /**
  617. * @interface Parse.Cloud.BeforeFindRequest
  618. * @property {String} installationId If set, the installationId triggering the request.
  619. * @property {Boolean} master If true, means the master key was used.
  620. * @property {Parse.User} user If set, the user that made the request.
  621. * @property {Parse.Query} query The query triggering the hook.
  622. * @property {String} ip The IP address of the client making the request.
  623. * @property {Object} headers The original HTTP headers for the request.
  624. * @property {String} triggerName The name of the trigger (`beforeSave`, `afterSave`, ...)
  625. * @property {Object} log The current logger inside Parse Server.
  626. * @property {Boolean} isGet wether the query a `get` or a `find`
  627. */
  628. /**
  629. * @interface Parse.Cloud.AfterFindRequest
  630. * @property {String} installationId If set, the installationId triggering the request.
  631. * @property {Boolean} master If true, means the master key was used.
  632. * @property {Parse.User} user If set, the user that made the request.
  633. * @property {Parse.Query} query The query triggering the hook.
  634. * @property {Array<Parse.Object>} results The results the query yielded.
  635. * @property {String} ip The IP address of the client making the request.
  636. * @property {Object} headers The original HTTP headers for the request.
  637. * @property {String} triggerName The name of the trigger (`beforeSave`, `afterSave`, ...)
  638. * @property {Object} log The current logger inside Parse Server.
  639. */
  640. /**
  641. * @interface Parse.Cloud.FunctionRequest
  642. * @property {String} installationId If set, the installationId triggering the request.
  643. * @property {Boolean} master If true, means the master key was used.
  644. * @property {Parse.User} user If set, the user that made the request.
  645. * @property {Object} params The params passed to the cloud function.
  646. */
  647. /**
  648. * @interface Parse.Cloud.JobRequest
  649. * @property {Object} params The params passed to the background job.
  650. * @property {function} message If message is called with a string argument, will update the current message to be stored in the job status.
  651. */
  652. /**
  653. * @interface Parse.Cloud.ValidatorObject
  654. * @property {Boolean} requireUser whether the cloud trigger requires a user.
  655. * @property {Boolean} requireMaster whether the cloud trigger requires a master key.
  656. * @property {Boolean} validateMasterKey whether the validator should run if masterKey is provided. Defaults to false.
  657. * @property {Boolean} skipWithMasterKey whether the cloud code function should be ignored using a masterKey.
  658. *
  659. * @property {Array<String>|Object} requireUserKeys If set, keys required on request.user to make the request.
  660. * @property {String} requireUserKeys.field If requireUserKeys is an object, name of field to validate on request user
  661. * @property {Array|function|Any} requireUserKeys.field.options array of options that the field can be, function to validate field, or single value. Throw an error if value is invalid.
  662. * @property {String} requireUserKeys.field.error custom error message if field is invalid.
  663. *
  664. * @property {Array<String>|function}requireAnyUserRoles If set, request.user has to be part of at least one roles name to make the request. If set to a function, function must return role names.
  665. * @property {Array<String>|function}requireAllUserRoles If set, request.user has to be part all roles name to make the request. If set to a function, function must return role names.
  666. *
  667. * @property {Object|Array<String>} fields if an array of strings, validator will look for keys in request.params, and throw if not provided. If Object, fields to validate. If the trigger is a cloud function, `request.params` will be validated, otherwise `request.object`.
  668. * @property {String} fields.field name of field to validate.
  669. * @property {String} fields.field.type expected type of data for field.
  670. * @property {Boolean} fields.field.constant whether the field can be modified on the object.
  671. * @property {Any} fields.field.default default value if field is `null`, or initial value `constant` is `true`.
  672. * @property {Array|function|Any} fields.field.options array of options that the field can be, function to validate field, or single value. Throw an error if value is invalid.
  673. * @property {String} fields.field.error custom error message if field is invalid.
  674. */
  675. //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfbm9kZSIsInJlcXVpcmUiLCJ0cmlnZ2VycyIsIl9pbnRlcm9wUmVxdWlyZVdpbGRjYXJkIiwiX21pZGRsZXdhcmVzIiwiX2dldFJlcXVpcmVXaWxkY2FyZENhY2hlIiwiZSIsIldlYWtNYXAiLCJyIiwidCIsIl9fZXNNb2R1bGUiLCJkZWZhdWx0IiwiaGFzIiwiZ2V0IiwibiIsIl9fcHJvdG9fXyIsImEiLCJPYmplY3QiLCJkZWZpbmVQcm9wZXJ0eSIsImdldE93blByb3BlcnR5RGVzY3JpcHRvciIsInUiLCJoYXNPd25Qcm9wZXJ0eSIsImNhbGwiLCJpIiwic2V0Iiwib3duS2V5cyIsImtleXMiLCJnZXRPd25Qcm9wZXJ0eVN5bWJvbHMiLCJvIiwiZmlsdGVyIiwiZW51bWVyYWJsZSIsInB1c2giLCJhcHBseSIsIl9vYmplY3RTcHJlYWQiLCJhcmd1bWVudHMiLCJsZW5ndGgiLCJm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