@nlabs/reaktor 0.10.1 → 0.10.5

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 (494) hide show
  1. package/coverage/actions/index.html +21 -36
  2. package/coverage/actions/notifications.ts.html +223 -0
  3. package/coverage/actions/posts.ts.html +2356 -0
  4. package/coverage/adapters/arangoAdapter.ts.html +170 -20
  5. package/coverage/adapters/fileAdapter.ts.html +445 -0
  6. package/coverage/adapters/index.html +72 -42
  7. package/coverage/adapters/postAdapter.ts.html +436 -0
  8. package/coverage/adapters/reaktorAdapter.ts.html +201 -18
  9. package/coverage/adapters/tagAdapter.ts.html +274 -25
  10. package/coverage/adapters/userAdapter.ts.html +829 -0
  11. package/coverage/analyticsUtils.ts.html +286 -0
  12. package/coverage/block-navigation.js +1 -1
  13. package/coverage/config.ts.html +766 -0
  14. package/coverage/index.html +83 -53
  15. package/coverage/mocks/group.ts.html +5 -5
  16. package/coverage/mocks/image.ts.html +18 -12
  17. package/coverage/mocks/index.html +37 -7
  18. package/coverage/mocks/post.ts.html +8 -8
  19. package/coverage/mocks/tag.ts.html +2 -2
  20. package/coverage/mocks/user.ts.html +18 -15
  21. package/coverage/sorter.js +21 -7
  22. package/coverage/testUtils.ts.html +1309 -0
  23. package/coverage/translationQueue.ts.html +592 -0
  24. package/coverage/types/error.types.ts.html +148 -0
  25. package/coverage/types/index.html +2 -2
  26. package/coverage/utils/adapterUtils.ts.html +39 -27
  27. package/coverage/utils/analyticsUtils.ts.html +35 -41
  28. package/coverage/utils/authUtils.ts.html +328 -0
  29. package/coverage/utils/dbI18n.ts.html +280 -0
  30. package/coverage/utils/googleTranslate.ts.html +385 -0
  31. package/coverage/utils/index.html +29 -44
  32. package/coverage/utils/localeUtils.ts.html +193 -0
  33. package/coverage/utils/sessionUtils.ts.html +211 -0
  34. package/coverage/utils/testUtils.ts.html +1309 -0
  35. package/lex.config.mjs +34 -0
  36. package/lib/actions/apps.d.ts +25 -0
  37. package/lib/actions/connections.d.ts +5 -0
  38. package/lib/actions/content.d.ts +13 -0
  39. package/lib/actions/conversations.d.ts +16 -0
  40. package/lib/actions/dynamodb.d.ts +12 -0
  41. package/lib/actions/email.d.ts +8 -0
  42. package/lib/actions/files.d.ts +19 -0
  43. package/lib/actions/groups.d.ts +13 -0
  44. package/lib/actions/images.d.ts +33 -0
  45. package/lib/actions/index.d.ts +28 -0
  46. package/lib/actions/ios.d.ts +7 -0
  47. package/lib/actions/locations.d.ts +6 -0
  48. package/lib/actions/messages.d.ts +13 -0
  49. package/lib/actions/notifications.d.ts +9 -0
  50. package/lib/actions/payments.d.ts +12 -0
  51. package/lib/actions/posts.d.ts +25 -0
  52. package/lib/actions/profiles.d.ts +4 -0
  53. package/lib/actions/reactions.d.ts +32 -0
  54. package/lib/actions/s3.d.ts +11 -0
  55. package/lib/actions/search.d.ts +3 -0
  56. package/lib/actions/sms.d.ts +2 -0
  57. package/lib/actions/statistics.d.ts +4 -0
  58. package/lib/actions/subscriptions.d.ts +7 -0
  59. package/lib/actions/tags.d.ts +34 -0
  60. package/lib/actions/users.d.ts +73 -0
  61. package/lib/actions/videos.d.ts +25 -0
  62. package/lib/actions/websockets.d.ts +20 -0
  63. package/lib/adapters/arangoAdapter.d.ts +8 -0
  64. package/lib/adapters/contentAdapter.d.ts +8 -0
  65. package/lib/adapters/fileAdapter.d.ts +9 -0
  66. package/lib/adapters/imageAdapter.d.ts +8 -0
  67. package/lib/adapters/index.d.ts +9 -0
  68. package/lib/adapters/messageAdapter.d.ts +8 -0
  69. package/lib/adapters/postAdapter.d.ts +8 -0
  70. package/lib/adapters/reaktorAdapter.d.ts +16 -0
  71. package/lib/adapters/tagAdapter.d.ts +9 -0
  72. package/lib/adapters/userAdapter.d.ts +13 -0
  73. package/lib/config.d.ts +57 -0
  74. package/lib/handlers/graphqlHandler.d.ts +4 -0
  75. package/lib/index.d.ts +19 -0
  76. package/lib/lambdas/actions/websockets.d.ts +7 -0
  77. package/lib/lambdas/authorizer.d.ts +20 -0
  78. package/lib/lambdas/connection.d.ts +12 -0
  79. package/lib/lambdas/utils/message.d.ts +1 -0
  80. package/lib/lambdas/utils/websocket.d.ts +7 -0
  81. package/lib/mocks/conversation.d.ts +8 -0
  82. package/lib/mocks/file.d.ts +11 -0
  83. package/lib/mocks/group.d.ts +17 -0
  84. package/lib/mocks/image.d.ts +3 -0
  85. package/lib/mocks/post.d.ts +38 -0
  86. package/lib/mocks/tag.d.ts +2 -0
  87. package/lib/mocks/user.d.ts +4 -0
  88. package/lib/mocks/video.d.ts +3 -0
  89. package/lib/mutations/content.d.ts +2 -0
  90. package/lib/mutations/index.d.ts +11 -0
  91. package/lib/mutations/locations.d.ts +2 -0
  92. package/lib/mutations/messages.d.ts +2 -0
  93. package/lib/mutations/posts.d.ts +2 -0
  94. package/lib/mutations/profiles.d.ts +2 -0
  95. package/lib/mutations/reactions.d.ts +2 -0
  96. package/lib/mutations/statistics.d.ts +2 -0
  97. package/lib/mutations/subscriptions.d.ts +2 -0
  98. package/lib/mutations/tags.d.ts +2 -0
  99. package/lib/mutations/users.d.ts +1 -0
  100. package/lib/objectTypes/app.d.ts +3 -0
  101. package/lib/objectTypes/bankAccount.d.ts +1 -0
  102. package/lib/objectTypes/connection.d.ts +1 -0
  103. package/lib/objectTypes/content.d.ts +2 -0
  104. package/lib/objectTypes/conversation.d.ts +2 -0
  105. package/lib/objectTypes/creditCard.d.ts +1 -0
  106. package/lib/objectTypes/document.d.ts +1 -0
  107. package/lib/objectTypes/error.d.ts +1 -0
  108. package/lib/objectTypes/external.d.ts +1 -0
  109. package/lib/objectTypes/file.d.ts +2 -0
  110. package/lib/objectTypes/filter.d.ts +1 -0
  111. package/lib/objectTypes/group.d.ts +3 -0
  112. package/lib/objectTypes/iapSubscription.d.ts +1 -0
  113. package/lib/objectTypes/image.d.ts +6 -0
  114. package/lib/objectTypes/index.d.ts +26 -0
  115. package/lib/objectTypes/location.d.ts +2 -0
  116. package/lib/objectTypes/message.d.ts +2 -0
  117. package/lib/objectTypes/passcode.d.ts +1 -0
  118. package/lib/objectTypes/plan.d.ts +2 -0
  119. package/lib/objectTypes/post.d.ts +2 -0
  120. package/lib/objectTypes/profile.d.ts +3 -0
  121. package/lib/objectTypes/reaction.d.ts +2 -0
  122. package/lib/objectTypes/relation.d.ts +1 -0
  123. package/lib/objectTypes/search.d.ts +1 -0
  124. package/lib/objectTypes/statistics.d.ts +1 -0
  125. package/lib/objectTypes/subscription.d.ts +2 -0
  126. package/lib/objectTypes/tag.d.ts +2 -0
  127. package/lib/objectTypes/user.d.ts +4 -0
  128. package/lib/queries/content.d.ts +2 -0
  129. package/lib/queries/index.d.ts +10 -0
  130. package/lib/queries/locations.d.ts +2 -0
  131. package/lib/queries/messages.d.ts +2 -0
  132. package/lib/queries/posts.d.ts +2 -0
  133. package/lib/queries/reactions.d.ts +2 -0
  134. package/lib/queries/statistics.d.ts +2 -0
  135. package/lib/queries/subscriptions.d.ts +2 -0
  136. package/lib/queries/tags.d.ts +2 -0
  137. package/lib/queries/users.d.ts +1 -0
  138. package/lib/templates/email/layout.d.ts +2 -0
  139. package/lib/templates/email/passwordForgot.d.ts +2 -0
  140. package/lib/templates/email/passwordRecovery.d.ts +2 -0
  141. package/lib/templates/email/verifyEmail.d.ts +2 -0
  142. package/lib/templates/email/welcome.d.ts +2 -0
  143. package/lib/templates/sms/passwordForgot.d.ts +2 -0
  144. package/lib/templates/sms/passwordRecovery.d.ts +2 -0
  145. package/lib/templates/sms/verifyEmail.d.ts +2 -0
  146. package/lib/templates/sms/verifyPhone.d.ts +2 -0
  147. package/lib/templates/sms/welcome.d.ts +2 -0
  148. package/lib/types/apps.types.d.ts +50 -0
  149. package/lib/types/arangodb.types.d.ts +38 -0
  150. package/lib/types/auth.types.d.ts +15 -0
  151. package/lib/types/connections.types.d.ts +9 -0
  152. package/lib/types/content.types.d.ts +31 -0
  153. package/lib/types/conversations.types.d.ts +31 -0
  154. package/lib/types/email.types.d.ts +17 -0
  155. package/lib/types/error.types.d.ts +21 -0
  156. package/lib/types/files.types.d.ts +27 -0
  157. package/lib/types/google.types.d.ts +33 -0
  158. package/lib/types/groups.types.d.ts +22 -0
  159. package/lib/types/images.types.d.ts +56 -0
  160. package/lib/types/index.d.ts +27 -0
  161. package/lib/types/locations.types.d.ts +22 -0
  162. package/lib/types/messages.types.d.ts +20 -0
  163. package/lib/types/notifications.types.d.ts +23 -0
  164. package/lib/types/payments.types.d.ts +113 -0
  165. package/lib/types/posts.types.d.ts +32 -0
  166. package/lib/types/profiles.types.d.ts +20 -0
  167. package/lib/types/statistics.types.d.ts +3 -0
  168. package/lib/types/tags.types.d.ts +19 -0
  169. package/lib/types/users.types.d.ts +110 -0
  170. package/lib/types/videos.types.d.ts +46 -0
  171. package/lib/types/websockets.types.d.ts +22 -0
  172. package/lib/utils/adapterUtils.d.ts +5 -0
  173. package/lib/utils/analyticsUtils.d.ts +25 -0
  174. package/lib/utils/arangodbUtils.d.ts +70 -0
  175. package/lib/utils/authUtils.d.ts +23 -0
  176. package/lib/utils/contextUtils.d.ts +3 -0
  177. package/lib/utils/dbI18n.d.ts +10 -0
  178. package/lib/utils/dbI18n.example.d.ts +20 -0
  179. package/lib/utils/googleTranslate.d.ts +6 -0
  180. package/lib/utils/graphqlUtils.d.ts +10 -0
  181. package/lib/utils/index.d.ts +18 -0
  182. package/lib/utils/languageDetection.d.ts +8 -0
  183. package/lib/utils/localeUtils.d.ts +11 -0
  184. package/lib/utils/localeUtils.example.d.ts +5 -0
  185. package/lib/utils/middlewareUtils.d.ts +2 -0
  186. package/lib/utils/sessionUtils.d.ts +18 -0
  187. package/lib/utils/stripeUtils.d.ts +7 -0
  188. package/lib/utils/templateUtils.d.ts +3 -0
  189. package/lib/utils/testUtils.d.ts +95 -0
  190. package/lib/utils/translationQueue.d.ts +29 -0
  191. package/lib/utils/translationQueue.example.d.ts +33 -0
  192. package/package.json +28 -28
  193. package/tsconfig.build.json +21 -0
  194. package/tsconfig.lint.json +33 -0
  195. package/tsconfig.test.json +31 -0
  196. package/dist/actions/apps.js +0 -242
  197. package/dist/actions/connections.js +0 -90
  198. package/dist/actions/conversations.js +0 -350
  199. package/dist/actions/dynamodb.js +0 -150
  200. package/dist/actions/email.js +0 -152
  201. package/dist/actions/files.js +0 -283
  202. package/dist/actions/groups.js +0 -292
  203. package/dist/actions/images.js +0 -735
  204. package/dist/actions/index.js +0 -66
  205. package/dist/actions/ios.js +0 -164
  206. package/dist/actions/locations.js +0 -122
  207. package/dist/actions/messages.js +0 -208
  208. package/dist/actions/notifications.js +0 -59
  209. package/dist/actions/payments.js +0 -497
  210. package/dist/actions/personas.js +0 -110
  211. package/dist/actions/posts.js +0 -595
  212. package/dist/actions/reactions.js +0 -322
  213. package/dist/actions/s3.js +0 -133
  214. package/dist/actions/search.js +0 -90
  215. package/dist/actions/sms.js +0 -108
  216. package/dist/actions/statistics.js +0 -62
  217. package/dist/actions/subscription.js +0 -220
  218. package/dist/actions/tags.js +0 -292
  219. package/dist/actions/users.js +0 -784
  220. package/dist/actions/websockets.js +0 -174
  221. package/dist/adapters/arangoAdapter.js +0 -46
  222. package/dist/adapters/fileAdapter.js +0 -76
  223. package/dist/adapters/imageAdapter.js +0 -40
  224. package/dist/adapters/messageAdapter.js +0 -49
  225. package/dist/adapters/postAdapter.js +0 -70
  226. package/dist/adapters/reaktorAdapter.js +0 -44
  227. package/dist/adapters/tagAdapter.js +0 -50
  228. package/dist/adapters/userAdapter.js +0 -115
  229. package/dist/config.js +0 -125
  230. package/dist/index.js +0 -66
  231. package/dist/lambdas/actions/websockets.js +0 -132
  232. package/dist/lambdas/authorizer.js +0 -67
  233. package/dist/lambdas/connection.js +0 -91
  234. package/dist/lambdas/utils/message.js +0 -42
  235. package/dist/lambdas/utils/websocket.js +0 -105
  236. package/dist/mocks/conversation.js +0 -35
  237. package/dist/mocks/file.js +0 -38
  238. package/dist/mocks/group.js +0 -47
  239. package/dist/mocks/image.js +0 -44
  240. package/dist/mocks/nlabs.png +0 -0
  241. package/dist/mocks/post.js +0 -55
  242. package/dist/mocks/tag.js +0 -37
  243. package/dist/mocks/user.js +0 -88
  244. package/dist/mutations/index.js +0 -26
  245. package/dist/mutations/locations.js +0 -44
  246. package/dist/mutations/messages.js +0 -86
  247. package/dist/mutations/personas.js +0 -100
  248. package/dist/mutations/posts.js +0 -53
  249. package/dist/mutations/reactions.js +0 -51
  250. package/dist/mutations/statistics.js +0 -39
  251. package/dist/mutations/subscriptions.js +0 -56
  252. package/dist/mutations/tags.js +0 -120
  253. package/dist/mutations/users.js +0 -116
  254. package/dist/objectTypes/app.js +0 -173
  255. package/dist/objectTypes/bankAccount.js +0 -76
  256. package/dist/objectTypes/connection.js +0 -48
  257. package/dist/objectTypes/conversation.js +0 -77
  258. package/dist/objectTypes/creditCard.js +0 -86
  259. package/dist/objectTypes/document.js +0 -46
  260. package/dist/objectTypes/error.js +0 -46
  261. package/dist/objectTypes/external.js +0 -74
  262. package/dist/objectTypes/file.js +0 -100
  263. package/dist/objectTypes/filter.js +0 -43
  264. package/dist/objectTypes/group.js +0 -123
  265. package/dist/objectTypes/iapSubscription.js +0 -40
  266. package/dist/objectTypes/image.js +0 -129
  267. package/dist/objectTypes/index.js +0 -68
  268. package/dist/objectTypes/location.js +0 -109
  269. package/dist/objectTypes/message.js +0 -96
  270. package/dist/objectTypes/passcode.js +0 -42
  271. package/dist/objectTypes/persona.js +0 -87
  272. package/dist/objectTypes/plan.js +0 -95
  273. package/dist/objectTypes/post.js +0 -125
  274. package/dist/objectTypes/reaction.js +0 -61
  275. package/dist/objectTypes/relation.js +0 -49
  276. package/dist/objectTypes/search.js +0 -72
  277. package/dist/objectTypes/statistics.js +0 -39
  278. package/dist/objectTypes/subscription.js +0 -117
  279. package/dist/objectTypes/tag.js +0 -65
  280. package/dist/objectTypes/user.js +0 -144
  281. package/dist/queries/index.js +0 -33
  282. package/dist/queries/locations.js +0 -45
  283. package/dist/queries/messages.js +0 -52
  284. package/dist/queries/posts.js +0 -154
  285. package/dist/queries/reactions.js +0 -56
  286. package/dist/queries/statistics.js +0 -39
  287. package/dist/queries/subscriptions.js +0 -44
  288. package/dist/queries/tags.js +0 -75
  289. package/dist/queries/users.js +0 -64
  290. package/dist/templates/email/layout.js +0 -302
  291. package/dist/templates/email/passwordForgot.js +0 -38
  292. package/dist/templates/email/passwordRecovery.js +0 -35
  293. package/dist/templates/email/verifyEmail.js +0 -38
  294. package/dist/templates/email/welcome.js +0 -38
  295. package/dist/templates/sms/passwordForgot.js +0 -24
  296. package/dist/templates/sms/passwordRecovery.js +0 -24
  297. package/dist/templates/sms/verifyEmail.js +0 -24
  298. package/dist/templates/sms/verifyPhone.js +0 -24
  299. package/dist/templates/sms/welcome.js +0 -24
  300. package/dist/types/apps.js +0 -32
  301. package/dist/types/arangodb.js +0 -16
  302. package/dist/types/auth.js +0 -16
  303. package/dist/types/connections.js +0 -16
  304. package/dist/types/conversations.js +0 -16
  305. package/dist/types/email.js +0 -16
  306. package/dist/types/error.js +0 -44
  307. package/dist/types/files.js +0 -16
  308. package/dist/types/google.js +0 -16
  309. package/dist/types/groups.js +0 -16
  310. package/dist/types/images.js +0 -16
  311. package/dist/types/index.js +0 -60
  312. package/dist/types/locations.js +0 -16
  313. package/dist/types/messages.js +0 -16
  314. package/dist/types/notifications.js +0 -16
  315. package/dist/types/payments.js +0 -16
  316. package/dist/types/personas.js +0 -16
  317. package/dist/types/posts.js +0 -16
  318. package/dist/types/statistics.js +0 -16
  319. package/dist/types/tags.js +0 -16
  320. package/dist/types/users.js +0 -16
  321. package/dist/types/websockets.js +0 -16
  322. package/dist/utils/adapterUtils.js +0 -45
  323. package/dist/utils/analyticsUtils.js +0 -72
  324. package/dist/utils/arangodbUtils.js +0 -165
  325. package/dist/utils/auth.js +0 -57
  326. package/dist/utils/index.js +0 -30
  327. package/dist/utils/session.js +0 -60
  328. package/jest.config.js +0 -17
  329. package/jest.setup.js +0 -36
  330. package/lex.config.cjs +0 -13
  331. package/lib/actions/apps.js +0 -20
  332. package/lib/actions/connections.js +0 -7
  333. package/lib/actions/content.js +0 -17
  334. package/lib/actions/conversations.js +0 -33
  335. package/lib/actions/dynamodb.js +0 -2
  336. package/lib/actions/email.js +0 -2
  337. package/lib/actions/files.js +0 -5
  338. package/lib/actions/groups.js +0 -52
  339. package/lib/actions/images.js +0 -66
  340. package/lib/actions/index.js +0 -2
  341. package/lib/actions/ios.js +0 -11
  342. package/lib/actions/locations.js +0 -7
  343. package/lib/actions/messages.js +0 -33
  344. package/lib/actions/notifications.js +0 -2
  345. package/lib/actions/payments.js +0 -32
  346. package/lib/actions/posts.js +0 -143
  347. package/lib/actions/profiles.js +0 -8
  348. package/lib/actions/reactions.js +0 -35
  349. package/lib/actions/s3.js +0 -2
  350. package/lib/actions/search.js +0 -5
  351. package/lib/actions/sms.js +0 -2
  352. package/lib/actions/statistics.js +0 -8
  353. package/lib/actions/subscriptions.js +0 -12
  354. package/lib/actions/tags.js +0 -24
  355. package/lib/actions/users.js +0 -84
  356. package/lib/actions/websockets.js +0 -30
  357. package/lib/adapters/arangoAdapter.js +0 -2
  358. package/lib/adapters/contentAdapter.js +0 -2
  359. package/lib/adapters/fileAdapter.js +0 -2
  360. package/lib/adapters/imageAdapter.js +0 -2
  361. package/lib/adapters/messageAdapter.js +0 -2
  362. package/lib/adapters/postAdapter.js +0 -2
  363. package/lib/adapters/reaktorAdapter.js +0 -2
  364. package/lib/adapters/tagAdapter.js +0 -2
  365. package/lib/adapters/userAdapter.js +0 -2
  366. package/lib/config.js +0 -2
  367. package/lib/handlers/graphqlHandler.js +0 -2
  368. package/lib/index.js +0 -2
  369. package/lib/lambdas/actions/websockets.js +0 -30
  370. package/lib/lambdas/authorizer.js +0 -2
  371. package/lib/lambdas/connection.js +0 -2
  372. package/lib/lambdas/utils/message.js +0 -2
  373. package/lib/lambdas/utils/websocket.js +0 -2
  374. package/lib/mocks/conversation.js +0 -2
  375. package/lib/mocks/file.js +0 -2
  376. package/lib/mocks/group.js +0 -2
  377. package/lib/mocks/image.js +0 -2
  378. package/lib/mocks/post.js +0 -2
  379. package/lib/mocks/tag.js +0 -2
  380. package/lib/mocks/user.js +0 -2
  381. package/lib/mutations/index.js +0 -2
  382. package/lib/mutations/locations.integration.js +0 -2
  383. package/lib/mutations/locations.js +0 -2
  384. package/lib/mutations/messages.integration.js +0 -2
  385. package/lib/mutations/messages.js +0 -2
  386. package/lib/mutations/posts.integration.js +0 -2
  387. package/lib/mutations/posts.js +0 -2
  388. package/lib/mutations/profiles.integration.js +0 -2
  389. package/lib/mutations/profiles.js +0 -2
  390. package/lib/mutations/reactions.integration.js +0 -2
  391. package/lib/mutations/reactions.js +0 -2
  392. package/lib/mutations/statistics.integration.js +0 -2
  393. package/lib/mutations/statistics.js +0 -2
  394. package/lib/mutations/subscriptions.integration.js +0 -2
  395. package/lib/mutations/subscriptions.js +0 -2
  396. package/lib/mutations/tags.integration.js +0 -2
  397. package/lib/mutations/tags.js +0 -2
  398. package/lib/mutations/users.integration.js +0 -2
  399. package/lib/mutations/users.js +0 -2
  400. package/lib/objectTypes/app.js +0 -2
  401. package/lib/objectTypes/bankAccount.js +0 -2
  402. package/lib/objectTypes/connection.js +0 -2
  403. package/lib/objectTypes/conversation.js +0 -2
  404. package/lib/objectTypes/creditCard.js +0 -2
  405. package/lib/objectTypes/document.js +0 -2
  406. package/lib/objectTypes/error.js +0 -2
  407. package/lib/objectTypes/external.js +0 -2
  408. package/lib/objectTypes/file.js +0 -2
  409. package/lib/objectTypes/filter.js +0 -2
  410. package/lib/objectTypes/group.js +0 -2
  411. package/lib/objectTypes/iapSubscription.js +0 -2
  412. package/lib/objectTypes/image.js +0 -2
  413. package/lib/objectTypes/index.js +0 -2
  414. package/lib/objectTypes/location.js +0 -2
  415. package/lib/objectTypes/message.js +0 -2
  416. package/lib/objectTypes/passcode.js +0 -2
  417. package/lib/objectTypes/plan.js +0 -2
  418. package/lib/objectTypes/post.js +0 -2
  419. package/lib/objectTypes/profile.js +0 -2
  420. package/lib/objectTypes/reaction.js +0 -2
  421. package/lib/objectTypes/relation.js +0 -2
  422. package/lib/objectTypes/search.js +0 -2
  423. package/lib/objectTypes/statistics.js +0 -2
  424. package/lib/objectTypes/subscription.js +0 -2
  425. package/lib/objectTypes/tag.js +0 -2
  426. package/lib/objectTypes/user.js +0 -2
  427. package/lib/queries/index.js +0 -2
  428. package/lib/queries/locations.integration.js +0 -2
  429. package/lib/queries/locations.js +0 -2
  430. package/lib/queries/messages.integration.js +0 -2
  431. package/lib/queries/messages.js +0 -2
  432. package/lib/queries/posts.integration.js +0 -2
  433. package/lib/queries/posts.js +0 -2
  434. package/lib/queries/reactions.integration.js +0 -2
  435. package/lib/queries/reactions.js +0 -2
  436. package/lib/queries/statistics.js +0 -2
  437. package/lib/queries/subscriptions.js +0 -2
  438. package/lib/queries/tags.integration.js +0 -2
  439. package/lib/queries/tags.js +0 -2
  440. package/lib/queries/users.integration.js +0 -2
  441. package/lib/queries/users.js +0 -2
  442. package/lib/templates/email/layout.js +0 -280
  443. package/lib/templates/email/passwordForgot.js +0 -16
  444. package/lib/templates/email/passwordRecovery.js +0 -13
  445. package/lib/templates/email/verifyEmail.js +0 -16
  446. package/lib/templates/email/welcome.js +0 -16
  447. package/lib/templates/sms/passwordForgot.js +0 -2
  448. package/lib/templates/sms/passwordRecovery.js +0 -2
  449. package/lib/templates/sms/verifyEmail.js +0 -2
  450. package/lib/templates/sms/verifyPhone.js +0 -2
  451. package/lib/templates/sms/welcome.js +0 -2
  452. package/lib/types/apps.types.js +0 -2
  453. package/lib/types/arangodb.types.js +0 -1
  454. package/lib/types/auth.types.js +0 -1
  455. package/lib/types/connections.types.js +0 -1
  456. package/lib/types/content.types.js +0 -1
  457. package/lib/types/conversations.types.js +0 -1
  458. package/lib/types/email.types.js +0 -1
  459. package/lib/types/error.types.js +0 -2
  460. package/lib/types/files.types.js +0 -1
  461. package/lib/types/google.types.js +0 -1
  462. package/lib/types/groups.types.js +0 -1
  463. package/lib/types/images.types.js +0 -1
  464. package/lib/types/index.js +0 -2
  465. package/lib/types/locations.types.js +0 -1
  466. package/lib/types/messages.types.js +0 -1
  467. package/lib/types/notifications.types.js +0 -1
  468. package/lib/types/payments.types.js +0 -1
  469. package/lib/types/posts.types.js +0 -1
  470. package/lib/types/profiles.types.js +0 -1
  471. package/lib/types/statistics.types.js +0 -1
  472. package/lib/types/tags.types.js +0 -1
  473. package/lib/types/users.types.js +0 -1
  474. package/lib/types/websockets.types.js +0 -1
  475. package/lib/utils/adapterUtils.js +0 -2
  476. package/lib/utils/analyticsUtils.js +0 -2
  477. package/lib/utils/arangodbUtils.js +0 -7
  478. package/lib/utils/authUtils.js +0 -2
  479. package/lib/utils/contextUtils.js +0 -2
  480. package/lib/utils/dbI18n.example.js +0 -6
  481. package/lib/utils/dbI18n.js +0 -2
  482. package/lib/utils/googleTranslate.js +0 -2
  483. package/lib/utils/graphqlUtils.js +0 -2
  484. package/lib/utils/index.js +0 -2
  485. package/lib/utils/languageDetection.js +0 -2
  486. package/lib/utils/localeUtils.example.js +0 -2
  487. package/lib/utils/localeUtils.js +0 -2
  488. package/lib/utils/middlewareUtils.js +0 -2
  489. package/lib/utils/sessionUtils.js +0 -2
  490. package/lib/utils/stripeUtils.js +0 -2
  491. package/lib/utils/templateUtils.js +0 -2
  492. package/lib/utils/testUtils.js +0 -2
  493. package/lib/utils/translationQueue.example.js +0 -2
  494. package/lib/utils/translationQueue.js +0 -2
package/lex.config.mjs ADDED
@@ -0,0 +1,34 @@
1
+ export default {
2
+ ai: {
3
+ maxTokens: 4000,
4
+ model: 'cursor-code',
5
+ provider: 'cursor',
6
+ temperature: 0.1
7
+ },
8
+ jest: {
9
+ testEnvironment: 'node',
10
+ extensionsToTreatAsEsm: ['.ts', '.tsx'],
11
+ injectGlobals: true,
12
+ moduleFileExtensions: ['ts', 'js', 'json'],
13
+ moduleNameMapper: {
14
+ '^(\\.{1,2}/.*)\\.js$': '$1'
15
+ },
16
+ globals: {
17
+ 'ts-jest': {
18
+ tsconfig: 'tsconfig.test.json',
19
+ useESM: true
20
+ }
21
+ }
22
+ },
23
+ outputPath: 'lib',
24
+ preset: 'node22',
25
+ targetEnvironment: 'node',
26
+ useTypescript: true,
27
+ typescript: {
28
+ configFile: 'tsconfig.build.json'
29
+ },
30
+ sourcePath: 'src',
31
+ sourcePattern: '**/*.ts',
32
+ excludePattern: '**/*.{test,spec,integration}.ts'
33
+ };
34
+
@@ -0,0 +1,25 @@
1
+ import type { AppType } from '../types/apps.types.js';
2
+ import type { ApiContext } from '../types/auth.types.js';
3
+ import type { UserType } from '../types/users.types.js';
4
+ export interface AppOptions {
5
+ readonly id?: string;
6
+ readonly key?: string;
7
+ readonly from?: number;
8
+ readonly name?: string;
9
+ readonly to?: number;
10
+ }
11
+ export declare const getAppOptional: (fields?: string[]) => any;
12
+ export declare const parseAppOptions: (options?: AppOptions) => {
13
+ limit: import("../index.js").ArangoDbLimit;
14
+ id?: string;
15
+ key?: string;
16
+ from?: number;
17
+ name?: string;
18
+ to?: number;
19
+ };
20
+ export declare const addApp: (context: ApiContext, app: AppType) => Promise<UserType>;
21
+ export declare const updateApp: (context: ApiContext, app: AppType) => Promise<AppType>;
22
+ export declare const deleteApp: (context: ApiContext, app: AppType) => Promise<AppType>;
23
+ export declare const deactivateApp: (context: ApiContext, app: AppType) => Promise<UserType>;
24
+ export declare const getApp: (context: ApiContext, options?: AppOptions) => Promise<AppType>;
25
+ export declare const getApps: (context: ApiContext, options?: AppOptions) => Promise<AppType[]>;
@@ -0,0 +1,5 @@
1
+ import type { ApiContext } from '../types/auth.types.js';
2
+ import type { ConnectionType } from '../types/connections.types.js';
3
+ export declare const addConnection: (context: ApiContext, fromType: string, fromId: string, toType: string, toId: string, value?: string) => Promise<boolean>;
4
+ export declare const getConnection: (context: ApiContext, fromType: string, fromId: string, toType: string, toId: string) => Promise<ConnectionType>;
5
+ export declare const deleteConnection: (context: ApiContext, fromType: string, fromId: string, toType: string, toId: string) => Promise<boolean>;
@@ -0,0 +1,13 @@
1
+ import type { ApiContext } from '../types/auth.types.js';
2
+ import type { ContentInputType, ContentOptions, ContentType, Locale } from '../types/content.types.js';
3
+ export declare const parseContentOptions: (options?: ContentOptions) => {
4
+ category: string;
5
+ isActive: boolean;
6
+ key: string;
7
+ locale: Locale;
8
+ };
9
+ export declare const getContent: (context: ApiContext, key: string, locale?: string) => Promise<ContentType | null>;
10
+ export declare const getContentWithFallback: (context: ApiContext, key: string, fallbackContent: string, locale?: Locale) => Promise<string>;
11
+ export declare const addContent: (context: ApiContext, contentInput: ContentInputType) => Promise<ContentType>;
12
+ export declare const updateContent: (context: ApiContext, contentInput: ContentInputType) => Promise<ContentType>;
13
+ export declare const searchContent: (context: ApiContext, options?: ContentOptions) => Promise<ContentType[]>;
@@ -0,0 +1,16 @@
1
+ import type { ArangoDbLimit } from '../types/arangodb.types.js';
2
+ import type { ApiContext } from '../types/auth.types.js';
3
+ import type { ConnectionType } from '../types/connections.types.js';
4
+ import type { ConversationOptions, ConversationType, ConversationUsersParams, DirectConversationParams, UpdateConversationUserParams } from '../types/conversations.types.js';
5
+ export declare const parseConversationOptions: (options?: ConversationOptions) => {
6
+ limit: ArangoDbLimit;
7
+ };
8
+ export declare const getConversations: (context: ApiContext, userId: string, options?: any) => Promise<ConversationType[]>;
9
+ export declare const getDirectConversation: (context: ApiContext, { fromId, toId, toUser }: DirectConversationParams) => Promise<ConversationType>;
10
+ export declare const addDirectConversation: (context: ApiContext, { fromId, toId, toUser }: DirectConversationParams) => Promise<ConversationType>;
11
+ export declare const getConnectionUsers: (context: ApiContext, { conversationId, includeAll, isDirect }: ConversationUsersParams) => Promise<ConnectionType[]>;
12
+ export declare const getConversationUsers: (context: ApiContext, { conversationId, includeAll, isDirect }: ConversationUsersParams) => Promise<ConversationType[]>;
13
+ export declare const getConversation: (context: ApiContext, conversationId: string) => Promise<ConversationType>;
14
+ export declare const updateConversation: (context: ApiContext, conversation: ConversationType) => Promise<ConversationType>;
15
+ export declare const addUserToConversation: (context: ApiContext, { conversationId, userId }: UpdateConversationUserParams) => Promise<ConversationType>;
16
+ export declare const deleteUserFromConversation: (context: ApiContext, { conversationId, userId }: UpdateConversationUserParams) => Promise<ConversationType>;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Copyright (c) 2019-Present, Nitrogen Labs, Inc.
3
+ * Copyrights licensed under the MIT License. See the accompanying LICENSE file for terms.
4
+ */
5
+ import { BatchWriteItemCommandInput, BatchWriteItemCommandOutput, DeleteItemCommandInput, DeleteItemCommandOutput, GetItemCommandInput, GetItemCommandOutput, PutItemCommandInput, PutItemCommandOutput, QueryCommandInput, QueryCommandOutput, UpdateItemCommandInput, UpdateItemCommandOutput } from '@aws-sdk/client-dynamodb';
6
+ export declare const dynamoGet: (params: GetItemCommandInput) => Promise<GetItemCommandOutput>;
7
+ export declare const parseDynamoList: (results: QueryCommandOutput) => any[];
8
+ export declare const dynamoGetList: (params: QueryCommandInput, startItem?: any) => Promise<GetItemCommandOutput[]>;
9
+ export declare const dynamoPut: (params: PutItemCommandInput) => Promise<PutItemCommandOutput>;
10
+ export declare const dynamoUpdate: (params: UpdateItemCommandInput) => Promise<UpdateItemCommandOutput>;
11
+ export declare const dynamoPutList: (params: BatchWriteItemCommandInput) => Promise<BatchWriteItemCommandOutput>;
12
+ export declare const dynamoDel: (params: DeleteItemCommandInput) => Promise<DeleteItemCommandOutput>;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Copyright (c) 2019-Present, Nitrogen Labs, Inc.
3
+ * Copyrights licensed under the MIT License. See the accompanying LICENSE file for terms.
4
+ */
5
+ import { SendEmailCommandInput, SendEmailCommandOutput } from '@aws-sdk/client-ses';
6
+ import { EmailType } from '../types/email.types.js';
7
+ export declare const sesSend: (params: SendEmailCommandInput) => Promise<SendEmailCommandOutput>;
8
+ export declare const sendEmail: (params: EmailType) => Promise<boolean>;
@@ -0,0 +1,19 @@
1
+ import { ApiContext } from '../types/auth.types.js';
2
+ import { FileType } from '../types/files.types.js';
3
+ import { ImageType } from '../types/images.types.js';
4
+ export declare const GIPHY_URL: string;
5
+ export declare const getYouTube: () => import("googleapis").youtube_v3.Youtube;
6
+ export declare const insertFile: (context: ApiContext, file: FileType) => Promise<any>;
7
+ export declare const upsertFile: (context: ApiContext, file: FileType) => Promise<FileType>;
8
+ export declare const uploadFile: (context: any, file: FileType, buffer: Buffer) => Promise<any>;
9
+ export declare const addFile: (context: ApiContext, file: FileType) => Promise<FileType>;
10
+ export declare const parseGiphyItem: (gifImage: any) => ImageType;
11
+ export declare const getGiphyTrends: (limit?: number) => Promise<ImageType[]>;
12
+ export declare const getGiphySearch: (query: string, limit?: number) => Promise<ImageType[]>;
13
+ export declare const getYouTubeTrends: (limit?: number) => Promise<any[]>;
14
+ export declare const getYouTubeSearch: (query: string, limit?: number) => Promise<any[]>;
15
+ export declare const getPathUserFiles: (userId: string, filename: string) => string;
16
+ export declare const linkFiles: (context: ApiContext, postDocId: string, files: FileType[]) => Promise<any>;
17
+ export declare const updateFiles: (context: ApiContext, postDocId: string, files: FileType[]) => Promise<any>;
18
+ export declare const encodeBase64: (buffer: Buffer) => string;
19
+ export declare const decodeBase64: (dataString: string) => any;
@@ -0,0 +1,13 @@
1
+ import { ApiContext } from '../types/auth.types.js';
2
+ import { GroupEdgeType, GroupType, GroupUser } from '../types/groups.types.js';
3
+ export declare const getGroupList: (context: ApiContext, from: number, to: number) => Promise<GroupType[]>;
4
+ export declare const getGroupListByUser: (context: ApiContext, from: number, to: number) => Promise<GroupType[]>;
5
+ export declare const getGroupListByTags: (context: ApiContext, tags: string[], from: number, to: number) => Promise<GroupType[]>;
6
+ export declare const getGroup: (context: ApiContext, itemId: string) => Promise<GroupType>;
7
+ export declare const getGroupDetails: (context: ApiContext, groupId: string) => Promise<GroupType>;
8
+ export declare const createGroupEdge: (context: ApiContext, userId: string, groupId: string) => Promise<GroupEdgeType>;
9
+ export declare const addGroup: (context: ApiContext, item: GroupType) => Promise<GroupType>;
10
+ export declare const updateGroup: (context: ApiContext, item: GroupType) => Promise<GroupType>;
11
+ export declare const deleteGroup: (context: ApiContext, itemId: string) => Promise<GroupType>;
12
+ export declare const getGroupsByReaction: (context: ApiContext, reaction: string) => Promise<GroupType[]>;
13
+ export declare const isGrouped: (context: ApiContext, userId: string, groupId: string) => Promise<GroupUser>;
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Copyright (c) 2019-Present, Nitrogen Labs, Inc.
3
+ * Copyrights licensed under the MIT License. See the accompanying LICENSE file for terms.
4
+ */
5
+ import { PutObjectCommandInput } from '@aws-sdk/client-s3';
6
+ import type { QueryFilter } from '../types/apps.types.js';
7
+ import type { ArangoDbLimit } from '../types/arangodb.types.js';
8
+ import type { ApiContext } from '../types/auth.types.js';
9
+ import type { ImageEdgeType, ImageOptions, ImageType, ImageUrlData } from '../types/images.types.js';
10
+ export declare const parseImageOptions: (options?: ImageOptions) => {
11
+ limit: ArangoDbLimit;
12
+ type: string;
13
+ };
14
+ export declare const getImageOptional: (fields?: string[]) => any;
15
+ export declare const getImagesByUser: (context: ApiContext, userId: string, from?: number, to?: number) => Promise<ImageType[]>;
16
+ export declare const getImageCountByItem: (context: ApiContext, itemId: string) => Promise<number>;
17
+ export declare const getImagesByItem: (context: ApiContext, itemId: string, options?: ImageOptions) => Promise<ImageType[]>;
18
+ export declare const getImagesByGroup: (context: ApiContext, params: {
19
+ filters: QueryFilter[];
20
+ groupId: string;
21
+ from: number;
22
+ to: number;
23
+ }) => Promise<ImageType[]>;
24
+ export declare const getImagesByReactions: (context: ApiContext, reactions?: string[], options?: ImageOptions) => Promise<ImageType[]>;
25
+ export declare const getImage: (context: ApiContext, imageId: string) => Promise<ImageType>;
26
+ export declare const getPathUserImages: (userId: string, imageId: string, imageType: string, dir?: string) => string;
27
+ export declare const getAppImageUrl: ({ bucket, directory, imageId, imageType, isThumb, type, typeId }: ImageUrlData) => string;
28
+ export declare const getImageUrl: ({ bucket, imageDir, imageId, imageType, isThumb, type, typeId, urlType }: ImageUrlData) => Promise<string>;
29
+ export declare const resizeSaveImage: (context: ApiContext, imageId: string, buffer: Buffer, fileType?: string, s3Options?: PutObjectCommandInput) => Promise<ImageType>;
30
+ export declare const addImage: (context: ApiContext, image: ImageType, s3Options?: PutObjectCommandInput) => Promise<ImageType>;
31
+ export declare const addImageEdge: (context: ApiContext, imageEdge: ImageEdgeType) => Promise<object>;
32
+ export declare const updateImage: (context: ApiContext, image: ImageType, s3Options?: PutObjectCommandInput) => Promise<ImageType>;
33
+ export declare const deleteImage: (context: ApiContext, imageId: string) => Promise<ImageType>;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Copyright (c) 2019-Present, Nitrogen Labs, Inc.
3
+ * Copyrights licensed under the MIT License. See the accompanying LICENSE file for terms.
4
+ */
5
+ export * from './apps.js';
6
+ export * from './connections.js';
7
+ export * from './conversations.js';
8
+ export * from './dynamodb.js';
9
+ export * from './email.js';
10
+ export * from './files.js';
11
+ export * from './groups.js';
12
+ export * from './images.js';
13
+ export * from './ios.js';
14
+ export * from './locations.js';
15
+ export * from './messages.js';
16
+ export * from './notifications.js';
17
+ export * from './payments.js';
18
+ export * from './posts.js';
19
+ export * from './reactions.js';
20
+ export * from './s3.js';
21
+ export * from './search.js';
22
+ export * from './sms.js';
23
+ export * from './statistics.js';
24
+ export * from './subscriptions.js';
25
+ export * from './tags.js';
26
+ export * from './users.js';
27
+ export * from './videos.js';
28
+ export * from './websockets.js';
@@ -0,0 +1,7 @@
1
+ import { ApiContext } from '../types/auth.types.js';
2
+ import { PaymentIOSInAppError, PaymentIOSSubscriptionUpdate, PaymentSubscription } from '../types/payments.types.js';
3
+ export declare const getIosInAppError: (statusCode: string) => PaymentIOSInAppError;
4
+ export declare const iosSubscriptionUpdate: (databaseName: string, 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>;
@@ -0,0 +1,6 @@
1
+ import { ApiContext } from '../types/auth.types.js';
2
+ import { GoogleMapsAddressType } from '../types/google.types.js';
3
+ import { LocationType } from '../types/locations.types.js';
4
+ export declare const getFieldVal: (addressComponents: GoogleMapsAddressType[], name: string) => string;
5
+ export declare const addLocation: (context: ApiContext, location: LocationType) => Promise<LocationType>;
6
+ export declare const getLocation: (context: ApiContext, locationId: string) => Promise<LocationType>;
@@ -0,0 +1,13 @@
1
+ import type { ApiContext } from '../types/auth.types.js';
2
+ import type { MessageInputType, MessageType } from '../types/messages.types.js';
3
+ export declare const getMessages: (context: ApiContext, conversationId: string, { from, to }: {
4
+ from: any;
5
+ to: any;
6
+ }) => Promise<MessageType[]>;
7
+ export declare const updateMessage: (context: ApiContext, message: MessageInputType) => Promise<MessageType>;
8
+ export declare const addMessage: (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: (context: ApiContext, messageId: string) => Promise<MessageType>;
13
+ export declare const cleanMessages: (databaseName: string) => Promise<number>;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Copyright (c) 2019-Present, Nitrogen Labs, Inc.
3
+ * Copyrights licensed under the MIT License. See the accompanying LICENSE file for terms.
4
+ */
5
+ import { Responses } from 'apn';
6
+ import type { NotificationType } from '../types/notifications.types.js';
7
+ export declare const getApnProvider: () => any;
8
+ export declare const pushNotification: (deviceTokens: string[], note: NotificationType) => Promise<Responses>;
9
+ export declare const clearBadges: (deviceTokens: string[]) => Promise<Responses>;
@@ -0,0 +1,12 @@
1
+ import { ApiContext } from '../types/auth.types.js';
2
+ import { PaymentBankAccount, PaymentCardType, PaymentCharge, PaymentTransfer } from '../types/payments.types.js';
3
+ import { UserType } from '../types/users.types.js';
4
+ export declare const addCustomerAccount: (context: ApiContext) => Promise<boolean>;
5
+ export declare const addBankAccount: (context: ApiContext, bankAccount: PaymentBankAccount) => Promise<boolean>;
6
+ export declare const addCreditCard: (context: ApiContext, card: PaymentCardType) => Promise<UserType>;
7
+ export declare const updateCreditCard: (context: ApiContext, card: PaymentCardType) => Promise<PaymentCardType>;
8
+ export declare const getCreditCards: (context: ApiContext) => Promise<PaymentCardType[]>;
9
+ export declare const deleteCreditCard: (context: ApiContext, cardId: string) => Promise<boolean>;
10
+ export declare const deleteBankAccount: (context: ApiContext, bankId: string) => Promise<boolean>;
11
+ export declare const createPaymentTransfer: (context: ApiContext, transfer: PaymentTransfer) => Promise<PaymentTransfer>;
12
+ export declare const createPaymentHold: (context: ApiContext, payment: PaymentCharge) => Promise<PaymentCharge>;
@@ -0,0 +1,25 @@
1
+ import type { ArangoDbLimit } from '../types/arangodb.types.js';
2
+ import type { ApiContext } from '../types/auth.types.js';
3
+ import type { FileType } from '../types/files.types.js';
4
+ import type { PostInputType, PostOptions, PostType } from '../types/posts.types.js';
5
+ export declare const parsePostOptions: (options?: PostOptions) => {
6
+ latitude: number;
7
+ limit: ArangoDbLimit;
8
+ longitude: number;
9
+ type: string;
10
+ };
11
+ export declare const getPostOptional: (fields?: string[], sessionId?: string) => {
12
+ objects: string[];
13
+ queries: string[];
14
+ };
15
+ export declare const getPost: (context: ApiContext, postId: string, options?: PostOptions) => Promise<PostType>;
16
+ export declare const getPostsByArea: (context: ApiContext, latitude: number, longitude: number, options?: PostOptions) => Promise<PostType[]>;
17
+ export declare const getPostsByLatest: (context: ApiContext, options?: PostOptions) => Promise<PostType[]>;
18
+ export declare const getPostsByReactions: (context: ApiContext, reactions?: string[], options?: PostOptions) => Promise<PostType[]>;
19
+ export declare const getPostsByTags: (context: ApiContext, tags?: string[], options?: PostOptions) => Promise<PostType[]>;
20
+ export declare const getPostsByUser: (context: ApiContext, userId: string, options?: PostOptions) => Promise<PostType[]>;
21
+ export declare const getPostComments: (context: ApiContext, postId: string, options?: PostOptions) => Promise<PostType[]>;
22
+ export declare const addPost: (context: ApiContext, { content, endDate, groupId, location, latitude, longitude, name, parentId, privacy, tags, startDate, type }: PostInputType) => Promise<PostType>;
23
+ export declare const updatePost: (context: ApiContext, post: PostInputType) => Promise<PostType>;
24
+ export declare const deletePost: (context: ApiContext, postDocId: string) => Promise<PostType>;
25
+ export declare const createPostEdge: (context: ApiContext, postDocId: string, itemDocId: string, edgeType?: string, props?: {}) => Promise<FileType>;
@@ -0,0 +1,4 @@
1
+ import type { ApiContext } from '../types/auth.types.js';
2
+ import type { ProfileType } from '../types/profiles.types.js';
3
+ export declare const addProfile: (context: ApiContext, profile: ProfileType) => Promise<ProfileType>;
4
+ export declare const updateProfile: (context: ApiContext, profile: ProfileType) => Promise<ProfileType>;
@@ -0,0 +1,32 @@
1
+ import type { ArangoDbCollection, ArangoDbLimit } from '../types/arangodb.types.js';
2
+ import type { ApiContext } from '../types/auth.types.js';
3
+ import type { UserReactionQuery, UserType } from '../types/users.types.js';
4
+ export type ReactionDirection = 'INBOUND' | 'OUTBOUND';
5
+ export interface Reaction {
6
+ readonly _from?: string;
7
+ readonly _key?: string;
8
+ readonly _to?: string;
9
+ readonly added?: number;
10
+ readonly count?: number;
11
+ readonly id?: string;
12
+ readonly name?: string;
13
+ readonly type?: ArangoDbCollection;
14
+ readonly value?: string;
15
+ }
16
+ export interface ReactionOptions {
17
+ readonly from?: number;
18
+ readonly to?: number;
19
+ }
20
+ export declare const parseReactionOptions: (options?: ReactionOptions) => {
21
+ limit: ArangoDbLimit;
22
+ };
23
+ export declare const addReaction: (context: ApiContext, itemId: string, reaction?: Reaction, allowDuplicate?: boolean) => Promise<Reaction>;
24
+ export declare const deleteReaction: (context: ApiContext, reactionId: string) => Promise<Reaction>;
25
+ export declare const deleteReactionByItem: (context: ApiContext, itemId: string, reactionName: string) => Promise<Reaction>;
26
+ export declare const updateReaction: (context: ApiContext, reaction?: Reaction) => Promise<Reaction>;
27
+ export declare const getReactionCount: (context: ApiContext, itemId: string, reactionName: string) => Promise<Reaction>;
28
+ export declare const getReactionCountByUser: (context: ApiContext, itemId: string, itemType: string, reactionName: string) => Promise<Reaction[]>;
29
+ export declare const getGroupUsersByReaction: (context: ApiContext, params?: UserReactionQuery) => Promise<UserType[]>;
30
+ export declare const getReactionsByItem: (context: ApiContext, itemId: string, reactionName: string, options: ReactionOptions) => Promise<UserType[]>;
31
+ export declare const getItemsByReaction: (context: ApiContext, itemId: string, reactionName: string, options: ReactionOptions) => Promise<Reaction[]>;
32
+ export declare const hasReaction: (context: ApiContext, itemId: string, reactionName: string, direction?: ReactionDirection) => Promise<boolean>;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Copyright (c) 2019-Present, Nitrogen Labs, Inc.
3
+ * Copyrights licensed under the MIT License. See the accompanying LICENSE file for terms.
4
+ */
5
+ import { DeleteObjectCommandInput, DeleteObjectCommandOutput, DeleteObjectsCommandInput, DeleteObjectsCommandOutput, GetObjectCommandInput, GetObjectCommandOutput, HeadObjectCommandInput, HeadObjectCommandOutput, PutObjectCommandInput, PutObjectCommandOutput } from '@aws-sdk/client-s3';
6
+ export declare const s3Get: (params: GetObjectCommandInput) => Promise<GetObjectCommandOutput>;
7
+ export declare const s3Head: (params: HeadObjectCommandInput) => Promise<HeadObjectCommandOutput>;
8
+ export declare const s3Put: (params: PutObjectCommandInput) => Promise<PutObjectCommandOutput>;
9
+ export declare const s3Delete: (params: DeleteObjectCommandInput) => Promise<DeleteObjectCommandOutput>;
10
+ export declare const s3DeleteList: (params: DeleteObjectsCommandInput) => Promise<DeleteObjectsCommandOutput>;
11
+ export declare const s3GetSignedUrl: (params?: any) => Promise<string>;
@@ -0,0 +1,3 @@
1
+ import type { ApiContext } from '../types/auth.types.js';
2
+ import type { UserType } from '../types/users.types.js';
3
+ export declare const getSearchList: (context: ApiContext, query: string, from: number, to: number) => Promise<UserType[]>;
@@ -0,0 +1,2 @@
1
+ import { SMSParamsType } from '../types/notifications.types.js';
2
+ export declare const sendSms: ({ context, text, user, variables }: SMSParamsType) => Promise<boolean>;
@@ -0,0 +1,4 @@
1
+ import type { ApiContext } from '../types/auth.types.js';
2
+ import type { StatisticsType } from '../types/statistics.types.js';
3
+ export declare const getGlobalStatistics: (context: ApiContext) => Promise<StatisticsType>;
4
+ export declare const updateGlobalStatistics: (context: ApiContext) => Promise<StatisticsType>;
@@ -0,0 +1,7 @@
1
+ import type { ApiContext } from '../types/auth.types.js';
2
+ import type { PaymentPlan, PaymentSubscription } from '../types/payments.types.js';
3
+ export declare const getPlanList: (context: ApiContext, from?: number, to?: number) => Promise<PaymentPlan[]>;
4
+ export declare const getSubscription: (context: ApiContext) => Promise<PaymentSubscription>;
5
+ export declare const addPlan: (context: ApiContext, item: PaymentPlan) => Promise<PaymentPlan>;
6
+ export declare const addSubscription: (context: ApiContext, item: any) => Promise<PaymentSubscription>;
7
+ export declare const deleteSubscription: (context: ApiContext) => Promise<boolean>;
@@ -0,0 +1,34 @@
1
+ import type { ApiContext } from '../types/auth.types.js';
2
+ import type { TagType } from '../types/tags.types.js';
3
+ export interface TagOptions {
4
+ readonly from?: number;
5
+ readonly search?: string;
6
+ readonly to?: number;
7
+ readonly userId?: string;
8
+ }
9
+ export declare const getTags: (context: ApiContext, options?: TagOptions) => Promise<TagType[]>;
10
+ export declare const getTagsByItem: (context: ApiContext, itemDocId: string, options?: TagOptions) => Promise<TagType[]>;
11
+ export declare const getTag: (context: ApiContext, tagId: string) => Promise<TagType>;
12
+ export declare const getTagsByName: (context: ApiContext, tagNames: string[]) => Promise<TagType[]>;
13
+ export declare const addTag: (context: ApiContext, tag: TagType) => Promise<TagType>;
14
+ export declare const addTagToItem: (context: ApiContext, { itemDocId, tagBy, tagDocId }: {
15
+ itemDocId: string;
16
+ tagBy?: string;
17
+ tagDocId: string;
18
+ }) => Promise<TagType>;
19
+ export declare const updateTag: (context: ApiContext, tag: TagType) => Promise<TagType>;
20
+ export declare const deleteTag: (context: ApiContext, tag: TagType) => Promise<TagType>;
21
+ export declare const deleteTagFromEdge: (context: ApiContext, { tagDocId, edgeDocId }: {
22
+ tagDocId: any;
23
+ edgeDocId: any;
24
+ }) => Promise<TagType>;
25
+ export declare const deleteTagFromItem: (context: ApiContext, { tagId, itemId, itemType }: {
26
+ tagId: any;
27
+ itemId: any;
28
+ itemType: any;
29
+ }) => Promise<boolean>;
30
+ export declare const extractTags: (content: string) => string[];
31
+ export declare const updateTagsInItem: (context: ApiContext, { itemDocId, tags }: {
32
+ itemDocId: any;
33
+ tags: any;
34
+ }) => Promise<TagType[]>;
@@ -0,0 +1,73 @@
1
+ import { type SessionError } from '../types/error.types.js';
2
+ import { type SessionToken } from '../utils/sessionUtils.js';
3
+ import type { ApiContext } from '../types/auth.types.js';
4
+ import type { UserInput, UserType } from '../types/users.types.js';
5
+ export interface UserOptions {
6
+ readonly from?: number;
7
+ readonly to?: number;
8
+ readonly username?: string;
9
+ }
10
+ export declare enum UserAccess {
11
+ DEACTIVATED = 0,
12
+ ACTIVE = 1,
13
+ PREMIUM = 2,
14
+ CONTENT_ADMIN = 3,
15
+ ADMIN = 4
16
+ }
17
+ export declare const createToken: (userId: string, username?: string, userAccess?: number, expiresInMinutes?: number) => SessionToken;
18
+ interface SelectAccumulator {
19
+ objects: string[];
20
+ queries: string[];
21
+ }
22
+ export declare const getUserOptional: (fields?: string[]) => SelectAccumulator;
23
+ export declare const parseUserOptions: (options?: UserOptions) => {
24
+ limit: import("../index.js").ArangoDbLimit;
25
+ from?: number;
26
+ to?: number;
27
+ username?: string;
28
+ };
29
+ export declare const addUser: (context: ApiContext, user: UserInput) => Promise<UserType | null>;
30
+ export declare const updateUser: (context: ApiContext, user: UserType) => Promise<UserType>;
31
+ export declare const forgotPassword: (context: ApiContext, { email, phone, username }: {
32
+ email: any;
33
+ phone: any;
34
+ username: any;
35
+ }) => Promise<boolean>;
36
+ export declare const resetPassword: (context: ApiContext, { code, password, type, username }: {
37
+ code: number;
38
+ password: string;
39
+ type: "phone" | "email";
40
+ username: string;
41
+ }) => Promise<boolean>;
42
+ export declare const confirmCode: (context: ApiContext, { code, type, value }: {
43
+ code: number;
44
+ type: "sms" | "email";
45
+ value: string;
46
+ }) => Promise<boolean>;
47
+ export declare const deleteUser: (context: ApiContext, user: UserType) => Promise<UserType>;
48
+ export declare const deactivateUser: (context: ApiContext, user: UserType) => Promise<UserType>;
49
+ export declare const getDisplayName: (user: UserType) => string;
50
+ export declare const getSessionUser: (context: ApiContext) => Promise<UserType>;
51
+ export declare const getUser: (context: ApiContext, user: UserType) => Promise<UserType>;
52
+ export declare const getUsers: (context: ApiContext, options?: UserOptions) => Promise<UserType[]>;
53
+ export declare const getUsersByReactions: (context: ApiContext, { reactions, username }: {
54
+ reactions?: string[];
55
+ username?: string;
56
+ }, options?: UserOptions) => Promise<UserType[]>;
57
+ export declare const getUsersByTags: (context: ApiContext, { tags, username }: {
58
+ tags: any;
59
+ username: any;
60
+ }, options?: UserOptions) => Promise<UserType[]>;
61
+ export declare const getUsersByLatest: (context: ApiContext, { username }: {
62
+ username: any;
63
+ }, options?: UserOptions) => Promise<UserType[]>;
64
+ export declare const getUsersByConnection: (context: ApiContext, { userId }: UserType, options?: UserOptions) => Promise<UserType[]>;
65
+ export declare const refreshSession: ({ expires, token }: {
66
+ expires: any;
67
+ token: any;
68
+ }) => SessionToken | SessionError;
69
+ export declare const signIn: (context: ApiContext, args: any) => Promise<SessionToken | null>;
70
+ export declare const signOut: (context: ApiContext) => Promise<boolean>;
71
+ export declare const getActiveUserCount: (context: ApiContext) => Promise<number>;
72
+ export declare const getUserByToken: (context: ApiContext, token: string) => Promise<UserType>;
73
+ export {};
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Copyright (c) 2019-Present, Nitrogen Labs, Inc.
3
+ * Copyrights licensed under the MIT License. See the accompanying LICENSE file for terms.
4
+ */
5
+ import { PutObjectCommandInput } from '@aws-sdk/client-s3';
6
+ import type { ArangoDbLimit } from '../types/arangodb.types.js';
7
+ import type { ApiContext } from '../types/auth.types.js';
8
+ import type { VideoEdgeType, VideoOptions, VideoType, VideoUrlData } from '../types/videos.types.js';
9
+ export declare const parseVideoOptions: (options?: VideoOptions) => {
10
+ limit: ArangoDbLimit;
11
+ type: string;
12
+ };
13
+ export declare const getVideoOptional: (fields?: string[]) => any;
14
+ export declare const getVideosByUser: (context: ApiContext, userId: string, from?: number, to?: number) => Promise<VideoType[]>;
15
+ export declare const getVideoCountByItem: (context: ApiContext, itemId: string) => Promise<number>;
16
+ export declare const getVideosByItem: (context: ApiContext, itemId: string, options?: VideoOptions) => Promise<VideoType[]>;
17
+ export declare const getVideo: (context: ApiContext, videoId: string) => Promise<VideoType>;
18
+ export declare const getPathUserVideos: (userId: string, videoId: string, videoType: string, dir?: string) => string;
19
+ export declare const getAppVideoUrl: ({ bucket, directory, isThumb, type, typeId, videoId }: VideoUrlData) => string;
20
+ export declare const getVideoUrl: ({ bucket, imageDir, videoDir, videoId, type, typeId, urlType }: any) => Promise<string>;
21
+ export declare const saveVideo: (context: ApiContext, videoId: string, buffer: Buffer, fileType?: string, s3Options?: PutObjectCommandInput) => Promise<VideoType>;
22
+ export declare const addVideo: (context: ApiContext, video: VideoType, s3Options?: PutObjectCommandInput) => Promise<VideoType>;
23
+ export declare const addVideoEdge: (context: ApiContext, videoEdge: VideoEdgeType) => Promise<object>;
24
+ export declare const updateVideo: (context: ApiContext, video: VideoType, s3Options?: PutObjectCommandInput) => Promise<VideoType>;
25
+ export declare const deleteVideo: (context: ApiContext, videoId: string) => Promise<VideoType>;
@@ -0,0 +1,20 @@
1
+ import { ApiContext } from '../types/auth.types.js';
2
+ import type { WebsocketConnection } from '../types/websockets.types.js';
3
+ export declare const addSocket: (socketId: string, token: string) => Promise<WebsocketConnection>;
4
+ export declare const getSocketByUser: (userId: string) => Promise<WebsocketConnection>;
5
+ export declare const getSocketById: (socketId: string) => Promise<any>;
6
+ export declare const getConnectionByConvo: (context: ApiContext, convoId: string) => Promise<any>;
7
+ export declare const removeSocket: (socketId: string) => Promise<WebsocketConnection>;
8
+ export interface WebSocketClientContext {
9
+ readonly requestContext?: {
10
+ readonly apiId: string;
11
+ readonly domainName: string;
12
+ readonly stage: string;
13
+ };
14
+ }
15
+ export declare class WebsocketClient {
16
+ client: any;
17
+ constructor(config?: any);
18
+ setupClient({ requestContext }: WebSocketClientContext): Promise<void>;
19
+ send(connection: any, payload: any): Promise<boolean>;
20
+ }
@@ -0,0 +1,8 @@
1
+ import { DocumentType } from '../types/arangodb.types.js';
2
+ export declare class ArangoValidationError extends Error {
3
+ field?: string;
4
+ constructor(message: string, field?: string);
5
+ }
6
+ export declare const validateDocumentInput: (doc: unknown) => DocumentType;
7
+ export declare const formatDocumentOutput: (doc: DocumentType) => DocumentType;
8
+ export declare const parseDocument: (doc: DocumentType) => DocumentType;
@@ -0,0 +1,8 @@
1
+ import { ContentInputType, ContentType } from '../types/content.types.js';
2
+ export declare class ContentValidationError extends Error {
3
+ field?: string;
4
+ constructor(message: string, field?: string);
5
+ }
6
+ export declare const parseContent: (content: ContentType) => ContentType;
7
+ export declare const parseContentInput: (content: ContentInputType) => ContentInputType;
8
+ export declare const parseContentFromDb: (content: ContentType) => ContentType;
@@ -0,0 +1,9 @@
1
+ import { FileType } from '../types/files.types.js';
2
+ export declare class FileValidationError extends Error {
3
+ field?: string;
4
+ constructor(message: string, field?: string);
5
+ }
6
+ export declare const validateFileInput: (file: unknown) => FileType;
7
+ export declare const formatFileOutput: (file: FileType) => FileType;
8
+ export declare const getFileType: (file: FileType) => string | undefined;
9
+ export declare const parseFile: (file: FileType) => FileType;
@@ -0,0 +1,8 @@
1
+ import type { ImageType } from '../types/images.types.js';
2
+ export declare class ImageValidationError extends Error {
3
+ field?: string;
4
+ constructor(message: string, field?: string);
5
+ }
6
+ export declare const validateImageInput: (image: unknown) => ImageType;
7
+ export declare const formatImageOutput: (image: ImageType) => ImageType;
8
+ export declare const parseImage: (image: ImageType) => ImageType;
@@ -0,0 +1,9 @@
1
+ export * from './arangoAdapter.js';
2
+ export * from './contentAdapter.js';
3
+ export * from './fileAdapter.js';
4
+ export * from './imageAdapter.js';
5
+ export * from './messageAdapter.js';
6
+ export * from './postAdapter.js';
7
+ export * from './reaktorAdapter.js';
8
+ export * from './tagAdapter.js';
9
+ export * from './userAdapter.js';
@@ -0,0 +1,8 @@
1
+ import type { MessageType } from '../types/messages.types.js';
2
+ export declare class MessageValidationError extends Error {
3
+ field?: string;
4
+ constructor(message: string, field?: string);
5
+ }
6
+ export declare const validateMessageInput: (message: unknown) => MessageType;
7
+ export declare const formatMessageOutput: (message: MessageType) => MessageType;
8
+ export declare const parseMessage: (message: MessageType) => MessageType;
@@ -0,0 +1,8 @@
1
+ import type { PostType } from '../types/posts.types.js';
2
+ export declare class PostValidationError extends Error {
3
+ field?: string;
4
+ constructor(message: string, field?: string);
5
+ }
6
+ export declare const validatePostInput: (post: unknown) => PostType;
7
+ export declare const formatPostOutput: (post: PostType) => PostType;
8
+ export declare const parsePost: (post: PostType) => PostType;