@nlabs/reaktor 0.5.4 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/README.md +7 -7
  2. package/lib/actions/conversations.js +68 -69
  3. package/lib/actions/dynamodb.js +22 -33
  4. package/lib/actions/email.js +32 -30
  5. package/lib/actions/files.js +39 -58
  6. package/lib/actions/groups.js +33 -28
  7. package/lib/actions/images.js +71 -82
  8. package/lib/actions/index.js +54 -37
  9. package/lib/actions/ios.js +21 -40
  10. package/lib/actions/locations.js +25 -22
  11. package/lib/actions/messages.js +31 -45
  12. package/lib/actions/notifications.js +13 -20
  13. package/lib/actions/payments.js +40 -52
  14. package/lib/actions/posts.js +68 -48
  15. package/lib/actions/reactions.js +29 -52
  16. package/lib/actions/s3.js +21 -18
  17. package/lib/actions/search.js +26 -40
  18. package/lib/actions/sms.js +24 -21
  19. package/lib/actions/statistics.js +14 -21
  20. package/lib/actions/subscription.js +27 -24
  21. package/lib/actions/tags.js +49 -56
  22. package/lib/actions/users.js +92 -106
  23. package/lib/actions/websockets.js +28 -41
  24. package/lib/config.js +21 -18
  25. package/lib/index.js +24 -22
  26. package/lib/lambdas/actions/websockets.js +21 -45
  27. package/lib/lambdas/authorizer.js +16 -24
  28. package/lib/lambdas/connection.js +18 -43
  29. package/lib/lambdas/utils/message.js +20 -17
  30. package/lib/lambdas/utils/websocket.js +33 -25
  31. package/lib/templates/email/layout.js +16 -9
  32. package/lib/templates/email/passwordForgot.js +16 -9
  33. package/lib/templates/email/passwordRecovery.js +16 -9
  34. package/lib/templates/email/verifyEmail.js +16 -9
  35. package/lib/templates/email/welcome.js +16 -9
  36. package/lib/templates/sms/passwordForgot.js +16 -9
  37. package/lib/templates/sms/passwordRecovery.js +16 -9
  38. package/lib/templates/sms/verifyEmail.js +16 -9
  39. package/lib/templates/sms/verifyPhone.js +16 -9
  40. package/lib/templates/sms/welcome.js +16 -9
  41. package/lib/types/apps.js +14 -5
  42. package/lib/types/arangodb.js +14 -5
  43. package/lib/types/auth.js +14 -5
  44. package/lib/types/connections.js +14 -5
  45. package/lib/types/conversations.js +14 -5
  46. package/lib/types/email.js +14 -5
  47. package/lib/types/files.js +14 -5
  48. package/lib/types/google.js +14 -5
  49. package/lib/types/groups.js +14 -5
  50. package/lib/types/images.js +14 -5
  51. package/lib/types/index.js +50 -35
  52. package/lib/types/locations.js +14 -5
  53. package/lib/types/messages.js +14 -5
  54. package/lib/types/notifications.js +14 -5
  55. package/lib/types/payments.js +14 -5
  56. package/lib/types/posts.js +14 -5
  57. package/lib/types/statistics.js +14 -5
  58. package/lib/types/tags.js +14 -5
  59. package/lib/types/users.js +14 -5
  60. package/lib/types/websocket.js +14 -5
  61. package/lib/utils/analytics.js +24 -44
  62. package/lib/utils/arangodb.js +15 -22
  63. package/lib/utils/auth.js +22 -36
  64. package/lib/utils/graphql.js +20 -17
  65. package/lib/utils/index.js +26 -23
  66. package/lib/utils/objects.js +22 -19
  67. package/lib/utils/session.js +20 -17
  68. package/package.json +31 -33
  69. package/.eslintrc +0 -18
  70. package/lib/actions/conversations.d.ts +0 -14
  71. package/lib/actions/dynamodb.d.ts +0 -8
  72. package/lib/actions/email.d.ts +0 -7
  73. package/lib/actions/files.d.ts +0 -16
  74. package/lib/actions/groups.d.ts +0 -14
  75. package/lib/actions/images.d.ts +0 -22
  76. package/lib/actions/index.d.ts +0 -20
  77. package/lib/actions/ios.d.ts +0 -7
  78. package/lib/actions/locations.d.ts +0 -3
  79. package/lib/actions/messages.d.ts +0 -13
  80. package/lib/actions/notifications.d.ts +0 -5
  81. package/lib/actions/payments.d.ts +0 -10
  82. package/lib/actions/posts.d.ts +0 -19
  83. package/lib/actions/reactions.d.ts +0 -30
  84. package/lib/actions/s3.d.ts +0 -7
  85. package/lib/actions/search.d.ts +0 -3
  86. package/lib/actions/sms.d.ts +0 -3
  87. package/lib/actions/statistics.d.ts +0 -2
  88. package/lib/actions/subscription.d.ts +0 -7
  89. package/lib/actions/tags.d.ts +0 -26
  90. package/lib/actions/users.d.ts +0 -44
  91. package/lib/actions/websockets.d.ts +0 -6
  92. package/lib/config.d.ts +0 -20
  93. package/lib/index.d.ts +0 -5
  94. package/lib/lambdas/actions/websockets.d.ts +0 -6
  95. package/lib/lambdas/authorizer.d.ts +0 -20
  96. package/lib/lambdas/connection.d.ts +0 -12
  97. package/lib/lambdas/utils/message.d.ts +0 -1
  98. package/lib/lambdas/utils/websocket.d.ts +0 -7
  99. package/lib/templates/email/layout.d.ts +0 -2
  100. package/lib/templates/email/passwordForgot.d.ts +0 -2
  101. package/lib/templates/email/passwordRecovery.d.ts +0 -2
  102. package/lib/templates/email/verifyEmail.d.ts +0 -2
  103. package/lib/templates/email/welcome.d.ts +0 -2
  104. package/lib/templates/sms/passwordForgot.d.ts +0 -2
  105. package/lib/templates/sms/passwordRecovery.d.ts +0 -2
  106. package/lib/templates/sms/verifyEmail.d.ts +0 -2
  107. package/lib/templates/sms/verifyPhone.d.ts +0 -2
  108. package/lib/templates/sms/welcome.d.ts +0 -2
  109. package/lib/types/apps.d.ts +0 -44
  110. package/lib/types/arangodb.d.ts +0 -17
  111. package/lib/types/auth.d.ts +0 -7
  112. package/lib/types/connections.d.ts +0 -8
  113. package/lib/types/conversations.d.ts +0 -11
  114. package/lib/types/email.d.ts +0 -12
  115. package/lib/types/files.d.ts +0 -26
  116. package/lib/types/google.d.ts +0 -27
  117. package/lib/types/groups.d.ts +0 -22
  118. package/lib/types/images.d.ts +0 -42
  119. package/lib/types/index.d.ts +0 -18
  120. package/lib/types/locations.d.ts +0 -20
  121. package/lib/types/messages.d.ts +0 -27
  122. package/lib/types/notifications.d.ts +0 -19
  123. package/lib/types/payments.d.ts +0 -115
  124. package/lib/types/posts.d.ts +0 -47
  125. package/lib/types/statistics.d.ts +0 -3
  126. package/lib/types/tags.d.ts +0 -15
  127. package/lib/types/users.d.ts +0 -80
  128. package/lib/types/websocket.d.ts +0 -14
  129. package/lib/utils/analytics.d.ts +0 -14
  130. package/lib/utils/arangodb.d.ts +0 -9
  131. package/lib/utils/auth.d.ts +0 -5
  132. package/lib/utils/graphql.d.ts +0 -1
  133. package/lib/utils/index.d.ts +0 -6
  134. package/lib/utils/objects.d.ts +0 -3
  135. package/lib/utils/session.d.ts +0 -18
@@ -4,30 +4,33 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
- var __require = typeof require !== "undefined" ? require : (x) => {
9
- throw new Error('Dynamic require of "' + x + '" is not supported');
10
- };
11
7
  var __export = (target, all) => {
12
- __markAsModule(target);
13
8
  for (var name in all)
14
9
  __defProp(target, name, { get: all[name], enumerable: true });
15
10
  };
16
- var __reExport = (target, module2, desc) => {
17
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
18
- for (let key of __getOwnPropNames(module2))
19
- if (!__hasOwnProp.call(target, key) && key !== "default")
20
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
21
16
  }
22
- return target;
23
- };
24
- var __toModule = (module2) => {
25
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
17
+ return to;
26
18
  };
27
- __export(exports, {
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+ var graphql_exports = {};
29
+ __export(graphql_exports, {
28
30
  getGqlFields: () => getGqlFields
29
31
  });
30
- var import_graphql_fields = __toModule(require("graphql-fields"));
32
+ module.exports = __toCommonJS(graphql_exports);
33
+ var import_graphql_fields = __toESM(require("graphql-fields"));
31
34
  const getGqlFields = (info) => {
32
35
  const fields = (0, import_graphql_fields.default)(info) || {};
33
36
  const methodName = Object.keys(fields)[0];
@@ -40,4 +43,4 @@ const getGqlFields = (info) => {
40
43
  0 && (module.exports = {
41
44
  getGqlFields
42
45
  });
43
- //# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3JjL3V0aWxzL2dyYXBocWwudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImltcG9ydCBncmFwaHFsRmllbGRzIGZyb20gJ2dyYXBocWwtZmllbGRzJztcblxuZXhwb3J0IGNvbnN0IGdldEdxbEZpZWxkcyA9IChpbmZvKSA9PiB7XG4gIGNvbnN0IGZpZWxkcyA9IGdyYXBocWxGaWVsZHMoaW5mbykgfHwge307XG4gIGNvbnN0IG1ldGhvZE5hbWU6IHN0cmluZyA9IE9iamVjdC5rZXlzKGZpZWxkcylbMF07XG5cbiAgaWYobWV0aG9kTmFtZSkge1xuICAgIHJldHVybiBPYmplY3Qua2V5cyhmaWVsZHNbbWV0aG9kTmFtZV0pO1xuICB9XG5cbiAgcmV0dXJuIFtdO1xufTtcbiJdLAogICJtYXBwaW5ncyI6ICI7Ozs7Ozs7Ozs7Ozs7Ozs7Oz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V0FBTyxPQUFPLEtBQUssT0FBTyxVQUFVLENBQUM7QUFBQSxFQUN2QztBQUVBLFNBQU8sQ0FBQztBQUNWOyIsCiAgIm5hbWVzIjogWyJncmFwaHFsRmllbGRzIl0KfQo=
@@ -1,29 +1,32 @@
1
- var __create = Object.create;
2
1
  var __defProp = Object.defineProperty;
3
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
- var __require = typeof require !== "undefined" ? require : (x) => {
9
- throw new Error('Dynamic require of "' + x + '" is not supported');
10
- };
11
- var __reExport = (target, module2, desc) => {
12
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
13
- for (let key of __getOwnPropNames(module2))
14
- if (!__hasOwnProp.call(target, key) && key !== "default")
15
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from))
8
+ if (!__hasOwnProp.call(to, key) && key !== except)
9
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
10
  }
17
- return target;
18
- };
19
- var __toModule = (module2) => {
20
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
11
+ return to;
21
12
  };
22
- __markAsModule(exports);
23
- __reExport(exports, __toModule(require("./analytics")));
24
- __reExport(exports, __toModule(require("./arangodb")));
25
- __reExport(exports, __toModule(require("./auth")));
26
- __reExport(exports, __toModule(require("./graphql")));
27
- __reExport(exports, __toModule(require("./objects")));
28
- __reExport(exports, __toModule(require("./session")));
29
- //# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3JjL3V0aWxzL2luZGV4LnRzIl0sCiAgInNvdXJjZXNDb250ZW50IjogWyIvKipcbiAqIENvcHlyaWdodCAoYykgMjAxOS1QcmVzZW50LCBOaXRyb2dlbiBMYWJzLCBJbmMuXG4gKiBDb3B5cmlnaHRzIGxpY2Vuc2VkIHVuZGVyIHRoZSBNSVQgTGljZW5zZS4gU2VlIHRoZSBhY2NvbXBhbnlpbmcgTElDRU5TRSBmaWxlIGZvciB0ZXJtcy5cbiAqL1xuZXhwb3J0ICogZnJvbSAnLi9hbmFseXRpY3MnO1xuZXhwb3J0ICogZnJvbSAnLi9hcmFuZ29kYic7XG5leHBvcnQgKiBmcm9tICcuL2F1dGgnO1xuZXhwb3J0ICogZnJvbSAnLi9ncmFwaHFsJztcbmV4cG9ydCAqIGZyb20gJy4vb2JqZWN0cyc7XG5leHBvcnQgKiBmcm9tICcuL3Nlc3Npb24nO1xuIl0sCiAgIm1hcHBpbmdzIjogIjs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUE7QUFJQSxvQkFBYztBQUNkLG9CQUFjO0FBQ2Qsb0JBQWM7QUFDZCxvQkFBYztBQUNkLG9CQUFjO0FBQ2Qsb0JBQWM7IiwKICAibmFtZXMiOiBbXQp9Cg==
13
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var utils_exports = {};
16
+ module.exports = __toCommonJS(utils_exports);
17
+ __reExport(utils_exports, require("./analytics"), module.exports);
18
+ __reExport(utils_exports, require("./arangodb"), module.exports);
19
+ __reExport(utils_exports, require("./auth"), module.exports);
20
+ __reExport(utils_exports, require("./graphql"), module.exports);
21
+ __reExport(utils_exports, require("./objects"), module.exports);
22
+ __reExport(utils_exports, require("./session"), module.exports);
23
+ // Annotate the CommonJS export names for ESM import in node:
24
+ 0 && (module.exports = {
25
+ ...require("./analytics"),
26
+ ...require("./arangodb"),
27
+ ...require("./auth"),
28
+ ...require("./graphql"),
29
+ ...require("./objects"),
30
+ ...require("./session")
31
+ });
32
+ //# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3JjL3V0aWxzL2luZGV4LnRzIl0sCiAgInNvdXJjZXNDb250ZW50IjogWyIvKipcbiAqIENvcHlyaWdodCAoYykgMjAxOS1QcmVzZW50LCBOaXRyb2dlbiBMYWJzLCBJbmMuXG4gKiBDb3B5cmlnaHRzIGxpY2Vuc2VkIHVuZGVyIHRoZSBNSVQgTGljZW5zZS4gU2VlIHRoZSBhY2NvbXBhbnlpbmcgTElDRU5TRSBmaWxlIGZvciB0ZXJtcy5cbiAqL1xuZXhwb3J0ICogZnJvbSAnLi9hbmFseXRpY3MnO1xuZXhwb3J0ICogZnJvbSAnLi9hcmFuZ29kYic7XG5leHBvcnQgKiBmcm9tICcuL2F1dGgnO1xuZXhwb3J0ICogZnJvbSAnLi9ncmFwaHFsJztcbmV4cG9ydCAqIGZyb20gJy4vb2JqZWN0cyc7XG5leHBvcnQgKiBmcm9tICcuL3Nlc3Npb24nO1xuIl0sCiAgIm1hcHBpbmdzIjogIjs7Ozs7Ozs7Ozs7Ozs7QUFBQTtBQUFBO0FBSUEsMEJBQWMsd0JBSmQ7QUFLQSwwQkFBYyx1QkFMZDtBQU1BLDBCQUFjLG1CQU5kO0FBT0EsMEJBQWMsc0JBUGQ7QUFRQSwwQkFBYyxzQkFSZDtBQVNBLDBCQUFjLHNCQVRkOyIsCiAgIm5hbWVzIjogW10KfQo=
@@ -4,34 +4,37 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
- var __require = typeof require !== "undefined" ? require : (x) => {
9
- throw new Error('Dynamic require of "' + x + '" is not supported');
10
- };
11
7
  var __export = (target, all) => {
12
- __markAsModule(target);
13
8
  for (var name in all)
14
9
  __defProp(target, name, { get: all[name], enumerable: true });
15
10
  };
16
- var __reExport = (target, module2, desc) => {
17
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
18
- for (let key of __getOwnPropNames(module2))
19
- if (!__hasOwnProp.call(target, key) && key !== "default")
20
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
21
16
  }
22
- return target;
23
- };
24
- var __toModule = (module2) => {
25
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
17
+ return to;
26
18
  };
27
- __export(exports, {
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+ var objects_exports = {};
29
+ __export(objects_exports, {
28
30
  defaultObject: () => defaultObject,
29
31
  lowerCaseKeys: () => lowerCaseKeys,
30
32
  toQueryString: () => toQueryString
31
33
  });
32
- var import_cloneDeep = __toModule(require("lodash/cloneDeep"));
33
- var import_isPlainObject = __toModule(require("lodash/isPlainObject"));
34
- var import_mapValues = __toModule(require("lodash/mapValues"));
34
+ module.exports = __toCommonJS(objects_exports);
35
+ var import_cloneDeep = __toESM(require("lodash/cloneDeep"));
36
+ var import_isPlainObject = __toESM(require("lodash/isPlainObject"));
37
+ var import_mapValues = __toESM(require("lodash/mapValues"));
35
38
  const defaultObject = (item) => item || {};
36
39
  const lowerCaseKeys = (obj = {}) => {
37
40
  const newObj = (0, import_cloneDeep.default)(obj);
@@ -53,4 +56,4 @@ const toQueryString = (json = {}) => Object.keys(json).map((key) => `${encodeURI
53
56
  lowerCaseKeys,
54
57
  toQueryString
55
58
  });
56
- //# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3JjL3V0aWxzL29iamVjdHMudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbIi8qKlxuICogQ29weXJpZ2h0IChjKSAyMDE5LVByZXNlbnQsIE5pdHJvZ2VuIExhYnMsIEluYy5cbiAqIENvcHlyaWdodHMgbGljZW5zZWQgdW5kZXIgdGhlIE1JVCBMaWNlbnNlLiBTZWUgdGhlIGFjY29tcGFueWluZyBMSUNFTlNFIGZpbGUgZm9yIHRlcm1zLlxuICovXG5pbXBvcnQgY2xvbmVEZWVwIGZyb20gJ2xvZGFzaC9jbG9uZURlZXAnO1xuaW1wb3J0IGlzUGxhaW5PYmplY3QgZnJvbSAnbG9kYXNoL2lzUGxhaW5PYmplY3QnO1xuaW1wb3J0IG1hcFZhbHVlcyBmcm9tICdsb2Rhc2gvbWFwVmFsdWVzJztcblxuZXhwb3J0IGNvbnN0IGRlZmF1bHRPYmplY3QgPSAoaXRlbTogb2JqZWN0KTogYW55ID0+IGl0ZW0gfHwge307XG5cbmV4cG9ydC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E9BQU87QUFDTCxxQkFBZTtBQUFBLElBQ2pCO0FBRUEsV0FBTyxJQUFJLFlBQVksQ0FBQyxJQUFJO0FBQUEsRUFDOUIsQ0FBQztBQUVELFNBQU87QUFDVDtBQUVPLE1BQU0sZ0JBQWdCLENBQUMsT0FBWSxDQUFDLE1BQWMsT0FDdEQsS0FBSyxJQUFJLEVBQ1QsSUFBSSxDQUFDLFFBQWdCLEdBQUcsbUJBQW1CLEdBQUcsQ0FBQyxJQUFJLG1CQUFtQixLQUFLLEdBQUcsQ0FBQyxDQUFDLEVBQUUsRUFDbEYsS0FBSyxHQUFHOyIsCiAgIm5hbWVzIjogWyJjbG9uZURlZXAiLCAibWFwVmFsdWVzIiwgImlzUGxhaW5PYmplY3QiXQp9Cg==
@@ -4,31 +4,34 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
- var __require = typeof require !== "undefined" ? require : (x) => {
9
- throw new Error('Dynamic require of "' + x + '" is not supported');
10
- };
11
7
  var __export = (target, all) => {
12
- __markAsModule(target);
13
8
  for (var name in all)
14
9
  __defProp(target, name, { get: all[name], enumerable: true });
15
10
  };
16
- var __reExport = (target, module2, desc) => {
17
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
18
- for (let key of __getOwnPropNames(module2))
19
- if (!__hasOwnProp.call(target, key) && key !== "default")
20
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
21
16
  }
22
- return target;
23
- };
24
- var __toModule = (module2) => {
25
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
17
+ return to;
26
18
  };
27
- __export(exports, {
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+ var session_exports = {};
29
+ __export(session_exports, {
28
30
  getSession: () => getSession,
29
31
  setSession: () => setSession
30
32
  });
31
- var import_jsonwebtoken = __toModule(require("jsonwebtoken"));
33
+ module.exports = __toCommonJS(session_exports);
34
+ var import_jsonwebtoken = __toESM(require("jsonwebtoken"));
32
35
  const setSession = (session) => import_jsonwebtoken.default.sign(session, process.env.SESSION_SECRET);
33
36
  const getSession = (token) => {
34
37
  try {
@@ -42,4 +45,4 @@ const getSession = (token) => {
42
45
  getSession,
43
46
  setSession
44
47
  });
45
- //# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3JjL3V0aWxzL3Nlc3Npb24udHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImltcG9ydCBqd3QgZnJvbSAnanNvbndlYnRva2VuJztcblxuZXhwb3J0IGludGVyZmFjZSBTZXNzaW9uIHtcbiAgcmVhZG9ubHkgZXJyb3JzPzogc3RyaW5nW107XG4gIHJlYWRvbmx5IGV4cD86IG51bWJlcjtcbiAgcmVhZG9ubHkgaWF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52LlNFU1NJT05fU0VDUkVUKTtcbiAgfSBjYXRjaChlcnJvcikge1xuICAgIHJldHVybiB7ZXJyb3JzOiBbZXJyb3IubWVzc2FnZV19O1xuICB9XG59O1xuIl0sCiAgIm1hcHBpbmdzIjogIjs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUEsMEJBQWdCO0FBcUJULE1BQU0sYUFBYSxDQUFDLFlBQTZCLG9CQUFBQSxRQUFJLEtBQUssU0FBUyxRQUFRLElBQUksY0FBYztBQUU3RixNQUFNLGFBQWEsQ0FBQyxVQUFrQjtBQUMzQyxNQUFJO0FBQ0YsV0FBTyxvQkFBQUEsUUFBSSxPQUFPLE9BQU8sUUFBUSxJQUFJLGNBQWM7QUFBQSxFQUNyRCxTQUFRLE9BQU87QUFDYixXQUFPLEVBQUMsUUFBUSxDQUFDLE1BQU0sT0FBTyxFQUFDO0FBQUEsRUFDakM7QUFDRjsiLAogICJuYW1lcyI6IFsiand0Il0KfQo=
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nlabs/reaktor",
3
- "version": "0.5.4",
3
+ "version": "0.8.0",
4
4
  "description": "Reaktor",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib/index.js",
@@ -26,7 +26,7 @@
26
26
  "url": "https://github.com/nitrogenlabs/reaktor-api/issues"
27
27
  },
28
28
  "scripts": {
29
- "build": "lex compile -r",
29
+ "build": "lex compile --remove",
30
30
  "clean": "lex clean",
31
31
  "lint": "eslint ./src --ext .ts,.tsx",
32
32
  "prepublishOnly": "npm run build",
@@ -36,51 +36,49 @@
36
36
  "publish:patch": "npm version patch && npm run publish:tags && npm publish",
37
37
  "publish:tags": "git push --tags && git push origin HEAD",
38
38
  "test": "stage=test jest",
39
- "update": "lex update -i",
40
- "watch": "lex compile -r -w"
39
+ "update": "lex update --interactive",
40
+ "watch": "lex compile --remove --watch"
41
41
  },
42
42
  "dependencies": {
43
- "@nlabs/arkhamjs": "^3.22.0",
44
- "@nlabs/rip-hunter": "^2.5.2",
45
- "@nlabs/utils": "^1.4.1",
46
- "apn": "^2.2.0",
47
- "arangojs": "^7.5.0",
48
- "aws-sdk": "^2.991.0",
43
+ "@nlabs/arkhamjs": "^3.26.2",
44
+ "@nlabs/rip-hunter": "^2.6.4",
45
+ "@nlabs/utils": "^1.4.4",
46
+ "apn": "^2.0.0",
47
+ "arangojs": "^8.8.0",
48
+ "aws-sdk": "^2.1580.0",
49
49
  "child_process": "^1.0.2",
50
- "core-js": "^3.18.0",
51
- "file-type": "^16.5.3",
52
- "gm": "^1.23.1",
53
- "google-libphonenumber": "^3.2.23",
54
- "googleapis": "^87.0.0",
55
- "graphql": "^15.6.0",
50
+ "core-js": "^3.36.1",
51
+ "file-type": "^19.0.0",
52
+ "gm": "^1.25.0",
53
+ "google-libphonenumber": "^3.2.34",
54
+ "googleapis": "^134.0.0",
55
+ "graphql": "^16.8.1",
56
56
  "graphql-fields": "^2.0.3",
57
- "jsonwebtoken": "^8.5.1",
57
+ "jsonwebtoken": "^9.0.2",
58
58
  "lodash": "^4.17.21",
59
- "luxon": "^2.0.2",
60
- "mime-types": "^2.1.32",
59
+ "luxon": "^3.4.4",
60
+ "mime-types": "^2.1.35",
61
61
  "net": "^1.0.2",
62
- "node-yelp": "^0.0.2",
62
+ "node-yelp": "^0.0.3",
63
63
  "numeral": "^2.0.6",
64
- "sanitize-html": "^2.5.1",
64
+ "sanitize-html": "^2.12.1",
65
65
  "spawn-sync": "^2.0.0",
66
- "stripe": "^8.176.0",
66
+ "stripe": "^14.21.0",
67
67
  "tls": "0.0.1",
68
68
  "to": "^0.2.9",
69
- "twilio": "^3.67.2",
70
69
  "typed-promisify": "^0.4.0",
71
- "universal-analytics": "^0.4.23",
72
- "update": "^0.7.4"
70
+ "universal-analytics": "^0.5.3"
73
71
  },
74
72
  "devDependencies": {
75
- "@types/history": "^4.7.9",
76
- "@types/jest": "^27.0.2",
77
- "@types/luxon": "^2.0.4",
78
- "@types/node": "^16.9.4",
73
+ "@types/history": "^4.7.11",
74
+ "@types/jest": "^29.5.12",
75
+ "@types/luxon": "^3.4.2",
76
+ "@types/node": "^20.11.30",
79
77
  "@types/stripe": "^8.0.416",
80
78
  "@types/twilio": "^3.19.2",
81
- "eslint": "^7.32.0",
82
- "eslint-config-styleguidejs": "^1.5.3",
83
- "graphql-tools": "^8.2.0",
84
- "typescript": "^4.4.3"
79
+ "eslint": "^8.57.0",
80
+ "eslint-config-styleguidejs": "^3.2.1",
81
+ "graphql-tools": "^9.0.1",
82
+ "typescript": "^5.4.2"
85
83
  }
86
84
  }
package/.eslintrc DELETED
@@ -1,18 +0,0 @@
1
- {
2
- "extends": [
3
- "styleguidejs/typescript"
4
- ],
5
- "rules": {
6
- "import/no-extraneous-dependencies": [
7
- "error",
8
- {
9
- "devDependencies": [
10
- "**/*.test.js",
11
- "**/*.spec.js",
12
- "**/*.js",
13
- "tasks/*.ts"
14
- ]
15
- }
16
- ]
17
- }
18
- }
@@ -1,14 +0,0 @@
1
- import { ConnectionType, ConversationType } from '../types';
2
- import { ApiContext } from '../types/auth';
3
- export declare const getConversations: (context: ApiContext, { from, to }: {
4
- from: any;
5
- to: any;
6
- }) => Promise<ConversationType[]>;
7
- export declare const getDirectConversation: (context: ApiContext, fromId: string, toId: string) => Promise<ConversationType>;
8
- export declare const getConnectionUsers: (context: ApiContext, conversationId: string, includeAll?: boolean, isDirect?: boolean) => Promise<ConnectionType[]>;
9
- export declare const getConversationUsers: (context: ApiContext, conversationId: string, includeAll?: boolean, isDirect?: boolean) => Promise<ConversationType[]>;
10
- export declare const getDirectConversationOld: (context: ApiContext, userId: string) => Promise<ConversationType>;
11
- export declare const getConversation: (context: ApiContext, convoId: string) => Promise<ConversationType>;
12
- export declare const updateConversation: (context: ApiContext, conversation: any) => Promise<ConversationType>;
13
- export declare const addUserToConversation: (context: ApiContext, convoId: string, userId: string) => Promise<any>;
14
- export declare const deleteUserFromConversation: (context: ApiContext, convoId: string, userId: string) => Promise<any>;
@@ -1,8 +0,0 @@
1
- import { BatchWriteItemInput, BatchWriteItemOutput, DeleteItemInput, DeleteItemOutput, GetItemInput, GetItemOutput, PutItemInput, PutItemOutput, QueryInput, QueryOutput, UpdateItemInput, UpdateItemOutput } from 'aws-sdk/clients/dynamodb';
2
- export declare const dynamoGet: (params: GetItemInput) => Promise<GetItemOutput>;
3
- export declare const parseDynamo: (results: QueryOutput) => any[];
4
- export declare const dynamoGetList: (params: QueryInput, index: any) => Promise<GetItemOutput[]>;
5
- export declare const dynamoPut: (params: PutItemInput) => Promise<PutItemOutput>;
6
- export declare const dynamoUpdate: (params: UpdateItemInput) => Promise<UpdateItemOutput>;
7
- export declare const dynamoPutList: (params: BatchWriteItemInput) => Promise<BatchWriteItemOutput>;
8
- export declare const dynamoDel: (params: DeleteItemInput) => Promise<DeleteItemOutput>;
@@ -1,7 +0,0 @@
1
- import { SendEmailRequest, SendEmailResponse } from 'aws-sdk/clients/ses';
2
- import { AppType } from '../types/apps';
3
- import { EmailType } from '../types/email';
4
- export declare const appTemplate: (app: AppType, message?: string, vars?: {}) => string;
5
- export declare const sesSend: (params: SendEmailRequest) => Promise<SendEmailResponse>;
6
- export declare const sendEmail: (params: EmailType) => Promise<boolean>;
7
- export declare const sendTemplate: (templateName: string, emailParams: EmailType) => Promise<boolean>;
@@ -1,16 +0,0 @@
1
- /// <reference types="node" />
2
- import { Database } from 'arangojs';
3
- import { ApiContext } from '../types/auth';
4
- import { FileType } from '../types/files';
5
- export declare const addFile: (context: ApiContext, item?: FileType) => Promise<FileType>;
6
- export declare const getGiphyTrends: (context: ApiContext, limit?: number) => Promise<any[]>;
7
- export declare const getGiphySearch: (context: ApiContext, query: string, limit?: number) => Promise<any[]>;
8
- export declare const getYouTubeTrends: (context: ApiContext, limit?: number) => Promise<any[]>;
9
- export declare const getYouTubeSearch: (context: ApiContext, query: string, limit?: number) => Promise<any[]>;
10
- export declare const getPathUserFiles: (userId: string, filename: string) => string;
11
- export declare const getUrlUserFiles: (userId: string, filename: string, dir?: string, type?: string) => string;
12
- export declare const createFile: (db: Database, file: FileType) => Promise<FileType>;
13
- export declare const linkFiles: (db: Database, files: FileType[], postId: string) => Promise<any>;
14
- export declare const updateFiles: (db: Database, postId: string, files: FileType[]) => Promise<any>;
15
- export declare const encodeBase64: (buffer: Buffer) => string;
16
- export declare const decodeBase64: (dataString: string) => object;
@@ -1,14 +0,0 @@
1
- import { Database } from 'arangojs';
2
- import { ApiContext } from '../types/auth';
3
- import { GroupEdgeType, GroupType, GroupUser } from '../types/groups';
4
- export declare const getGroupList: (context: ApiContext, from: number, to: number) => Promise<GroupType[]>;
5
- export declare const getGroupListByUser: (context: ApiContext, from: number, to: number) => Promise<GroupType[]>;
6
- export declare const getGroupListByTags: (context: ApiContext, tags: string[], from: number, to: number) => Promise<GroupType[]>;
7
- export declare const getGroup: (context: ApiContext, itemId: string) => Promise<GroupType>;
8
- export declare const getGroupDetails: (context: ApiContext, groupId: string) => Promise<GroupType>;
9
- export declare const createGroupEdge: (database: Database, userId: string, groupId: string) => Promise<GroupEdgeType>;
10
- export declare const addGroup: (context: ApiContext, item?: GroupType) => Promise<GroupType>;
11
- export declare const updateGroup: (context: ApiContext, item?: GroupType) => Promise<GroupType>;
12
- export declare const deleteGroup: (context: ApiContext, itemId: string) => Promise<GroupType>;
13
- export declare const getGroupsByReaction: (context: ApiContext, reaction: string) => Promise<GroupType[]>;
14
- export declare const isGrouped: (database: Database, userId: string, groupId: string) => Promise<GroupUser>;
@@ -1,22 +0,0 @@
1
- /// <reference types="node" />
2
- import { PutObjectRequest } from 'aws-sdk/clients/s3';
3
- import { ApiContext, ArangoDBLimit, ImageEdgeType, ImageOptions, ImageType, ImageUrlData } from '../types';
4
- export declare const parseImageOptions: (options?: ImageOptions) => {
5
- limit: ArangoDBLimit;
6
- type: string;
7
- };
8
- export declare const getImageOptional: (fields?: string[]) => any;
9
- export declare const getImagesByUser: (context: ApiContext, userId: string, from: number, to: number) => Promise<ImageType[]>;
10
- export declare const getImageCountByItem: (context: ApiContext, itemId: string) => Promise<number>;
11
- export declare const getImagesByItem: (context: ApiContext, itemId: string, options?: ImageOptions) => Promise<ImageType[]>;
12
- export declare const getImagesByGroup: (context: ApiContext, params: any) => Promise<ImageType[]>;
13
- export declare const getImagesByReactions: (context: ApiContext, reactions?: string[], options?: ImageOptions) => Promise<ImageType[]>;
14
- export declare const getImage: (context: ApiContext, id: string) => Promise<ImageType>;
15
- export declare const getPathUserImages: (userId: string, imageId: string, type: string, dir?: string) => string;
16
- export declare const getAppImageUrl: (data: ImageUrlData) => string;
17
- export declare const getUserImageUrl: (data: ImageUrlData) => string;
18
- export declare const resizeSaveImage: (context: ApiContext, imageId: string, buffer: Buffer, type?: string, s3Options?: PutObjectRequest) => Promise<ImageType>;
19
- export declare const addImage: (context: ApiContext, image: ImageType, s3Options?: PutObjectRequest) => Promise<ImageType>;
20
- export declare const addImageEdge: (context: ApiContext, imageEdge: ImageEdgeType) => Promise<object>;
21
- export declare const updateImage: (context: ApiContext, image: ImageType, s3Options?: PutObjectRequest) => Promise<ImageType>;
22
- export declare const deleteImage: (context: ApiContext, imageId: string) => Promise<ImageType>;
@@ -1,20 +0,0 @@
1
- export * from './conversations';
2
- export * from './dynamodb';
3
- export * from './email';
4
- export * from './files';
5
- export * from './groups';
6
- export * from './images';
7
- export * from './ios';
8
- export * from './locations';
9
- export * from './messages';
10
- export * from './notifications';
11
- export * from './payments';
12
- export * from './posts';
13
- export * from './reactions';
14
- export * from './s3';
15
- export * from './search';
16
- export * from './sms';
17
- export * from './subscription';
18
- export * from './tags';
19
- export * from './users';
20
- export * from './websockets';
@@ -1,7 +0,0 @@
1
- import { Database } from 'arangojs';
2
- import { ApiContext, PaymentIOSInAppError, PaymentIOSSubscriptionUpdate, PaymentSubscription } from '../types';
3
- export declare const getIosInAppError: (statusCode: string) => PaymentIOSInAppError;
4
- export declare const iosSubscriptionUpdate: (database: Database, subscriptionUpdate: PaymentIOSSubscriptionUpdate) => Promise<void>;
5
- export declare const getIosSubscription: (context: ApiContext) => Promise<PaymentSubscription>;
6
- export declare const addIosInApp: (context: ApiContext, subscription: PaymentSubscription) => Promise<PaymentSubscription>;
7
- export declare const getIosInApp: (context: ApiContext) => Promise<PaymentSubscription>;
@@ -1,3 +0,0 @@
1
- import { ApiContext } from '../types/auth';
2
- import { LocationType } from '../types/locations';
3
- export declare const addLocation: (context: ApiContext, location: LocationType) => Promise<LocationType>;
@@ -1,13 +0,0 @@
1
- import { Database } from 'arangojs';
2
- import { ApiContext } from '../types/auth';
3
- import { MessageInputType, MessageType } from '../types/messages';
4
- export declare const getMessages: (context: ApiContext, conversationId: string, { from, to }: {
5
- from: any;
6
- to: any;
7
- }) => Promise<MessageType[]>;
8
- export declare const updateMessage: (context: ApiContext, message: MessageInputType) => Promise<MessageType>;
9
- export declare const saveMessage: (context: ApiContext, messageId: string, conversationId: string) => Promise<MessageType>;
10
- export declare const unsaveMessage: (context: ApiContext, messageId: string, conversationId: string) => Promise<MessageType>;
11
- export declare const deleteMessage: (context: ApiContext, messageId: string, conversationId: string) => Promise<MessageType>;
12
- export declare const getMessage: (data: MessageType) => MessageType;
13
- export declare const cleanMessages: (database: Database) => Promise<number>;
@@ -1,5 +0,0 @@
1
- import { Provider, Responses } from 'apn';
2
- import { NotificationType } from '../types/notifications';
3
- export declare const getApnProvider: () => Provider;
4
- export declare const pushNotification: (deviceTokens: string[], note: NotificationType) => Promise<Responses>;
5
- export declare const clearBadges: (deviceTokens: string[]) => Promise<Responses>;
@@ -1,10 +0,0 @@
1
- import { ApiContext, PaymentBankAccount, PaymentCardType, PaymentCharge, PaymentTransfer, User } from '../types';
2
- export declare const addCustomerAccount: (context: ApiContext) => Promise<boolean>;
3
- export declare const addBankAccount: (context: ApiContext, bankAccount: PaymentBankAccount) => Promise<boolean>;
4
- export declare const addCreditCard: (context: ApiContext, card: PaymentCardType) => Promise<User>;
5
- export declare const updateCreditCard: (context: ApiContext, card: PaymentCardType) => Promise<PaymentCardType>;
6
- export declare const getCreditCards: (context: ApiContext) => Promise<PaymentCardType[]>;
7
- export declare const deleteCreditCard: (context: ApiContext, cardId: string) => Promise<boolean>;
8
- export declare const deleteBankAccount: (context: ApiContext, bankId: string) => Promise<boolean>;
9
- export declare const createPaymentTransfer: (context: ApiContext, transfer: PaymentTransfer) => Promise<PaymentTransfer>;
10
- export declare const createPaymentHold: (context: ApiContext, payment: PaymentCharge) => Promise<PaymentCharge>;
@@ -1,19 +0,0 @@
1
- import { Database } from 'arangojs';
2
- import { ApiContext, FileType, PostInputType, PostOptions, PostType } from '../types';
3
- export declare const parsePostOptions: (options?: PostOptions) => {
4
- latitude: number;
5
- limit: import("../types").ArangoDBLimit;
6
- longitude: number;
7
- type: string;
8
- };
9
- export declare const getPostOptional: (fields: string[], sessionId: string) => any;
10
- export declare const getPost: (context: ApiContext, itemId: string, options: PostOptions) => Promise<Partial<PostType>>;
11
- export declare const getPostsByReactions: (context: ApiContext, reactions?: string[], options?: PostOptions) => Promise<PostType[]>;
12
- export declare const getPostsByTags: (context: ApiContext, tags?: string[], options?: PostOptions) => Promise<PostType[]>;
13
- export declare const getPostsByUser: (context: ApiContext, userId: string, options?: PostOptions) => Promise<PostType[]>;
14
- export declare const getPostComments: (context: ApiContext, itemId: string, options?: PostOptions) => Promise<PostType[]>;
15
- export declare const addPost: (context: ApiContext, post: PostInputType) => Promise<PostType>;
16
- export declare const updatePost: (context: ApiContext, post: PostInputType) => Promise<PostType>;
17
- export declare const deletePost: (context: ApiContext, postId: string) => Promise<PostType>;
18
- export declare const cleanPosts: (database: Database) => Promise<number>;
19
- export declare const createPostEdge: (db: Database, file: FileType, postId: string) => Promise<FileType>;
@@ -1,30 +0,0 @@
1
- import { ApiContext, AppCollectionTypes, User, UserReactionQuery } from '../types';
2
- export declare type ReactionDirection = 'INBOUND' | 'OUTBOUND';
3
- export interface Reaction {
4
- readonly _from?: string;
5
- readonly _key?: string;
6
- readonly _to?: string;
7
- readonly added?: number;
8
- readonly count?: number;
9
- readonly id?: string;
10
- readonly name?: string;
11
- readonly type?: AppCollectionTypes;
12
- readonly value?: string;
13
- }
14
- export interface ReactionOptions {
15
- readonly from?: number;
16
- readonly to?: number;
17
- }
18
- export declare const parseReactionOptions: (options?: ReactionOptions) => {
19
- limit: import("../types").ArangoDBLimit;
20
- };
21
- export declare const addReaction: (context: ApiContext, itemId: string, reaction?: Reaction, allowDuplicate?: boolean) => Promise<Reaction>;
22
- export declare const deleteReaction: (context: ApiContext, reactionId: string) => Promise<Reaction>;
23
- export declare const deleteReactionByItem: (context: ApiContext, itemId: string, reactionName: string) => Promise<Reaction>;
24
- export declare const updateReaction: (context: ApiContext, reaction?: Reaction) => Promise<Reaction>;
25
- export declare const getReactionCount: (context: ApiContext, itemId: string, reactionName: string) => Promise<Reaction>;
26
- export declare const getReactionCountByUser: (context: ApiContext, itemId: string, itemType: string, reactionName: string) => Promise<Reaction[]>;
27
- export declare const getGroupUsersByReaction: (context: ApiContext, params?: UserReactionQuery) => Promise<User[]>;
28
- export declare const getReactionsByItem: (context: ApiContext, itemId: string, reactionName: string, options: ReactionOptions) => Promise<User[]>;
29
- export declare const getItemsByReaction: (context: ApiContext, itemId: string, reactionName: string, options: ReactionOptions) => Promise<Reaction[]>;
30
- export declare const hasReaction: (context: ApiContext, itemId: string, reactionName: string, direction?: ReactionDirection) => Promise<boolean>;
@@ -1,7 +0,0 @@
1
- import { DeleteObjectOutput, DeleteObjectRequest, DeleteObjectsOutput, DeleteObjectsRequest, GetObjectOutput, GetObjectRequest, HeadObjectOutput, HeadObjectRequest, PutObjectOutput, PutObjectRequest } from 'aws-sdk/clients/s3';
2
- export declare const s3Get: (params: GetObjectRequest) => Promise<GetObjectOutput>;
3
- export declare const s3Head: (params: HeadObjectRequest) => Promise<HeadObjectOutput>;
4
- export declare const s3Put: (params: PutObjectRequest) => Promise<PutObjectOutput>;
5
- export declare const s3Delete: (params: DeleteObjectRequest) => Promise<DeleteObjectOutput>;
6
- export declare const s3DeleteList: (params: DeleteObjectsRequest) => Promise<DeleteObjectsOutput>;
7
- export declare const s3GetSignedUrl: (params?: any) => string;
@@ -1,3 +0,0 @@
1
- import { ApiContext } from '../types/auth';
2
- import { User } from '../types/users';
3
- export declare const getSearchList: (context: ApiContext, query: string, from: number, to: number) => Promise<User[]>;
@@ -1,3 +0,0 @@
1
- import { SMSParamsType } from '../types/notifications';
2
- export declare const sendSms: (params: SMSParamsType) => any;
3
- export declare const sendSmsTemplate: (templateName: string, smsParams: SMSParamsType) => Promise<boolean>;
@@ -1,2 +0,0 @@
1
- import { ApiContext, StatisticsType } from '../types';
2
- export declare const getGlobalStatistics: (context: ApiContext) => Promise<Partial<StatisticsType>>;