@nlabs/reaktor 0.1.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 (154) hide show
  1. package/.vscode/extensions.json +15 -0
  2. package/.vscode/settings.json +82 -0
  3. package/README.md +211 -0
  4. package/index.d.ts +1 -0
  5. package/index.js +5 -0
  6. package/lex.config.js +4 -0
  7. package/lib/config.d.ts +21 -0
  8. package/lib/config.js +127 -0
  9. package/lib/data/conversations.d.ts +6 -0
  10. package/lib/data/conversations.js +201 -0
  11. package/lib/data/dynamodb.d.ts +8 -0
  12. package/lib/data/dynamodb.js +139 -0
  13. package/lib/data/email.d.ts +7 -0
  14. package/lib/data/email.js +164 -0
  15. package/lib/data/files.d.ts +16 -0
  16. package/lib/data/files.js +407 -0
  17. package/lib/data/groups.d.ts +13 -0
  18. package/lib/data/groups.js +354 -0
  19. package/lib/data/images.d.ts +12 -0
  20. package/lib/data/images.js +668 -0
  21. package/lib/data/index.d.ts +19 -0
  22. package/lib/data/index.js +24 -0
  23. package/lib/data/ios.d.ts +6 -0
  24. package/lib/data/ios.js +302 -0
  25. package/lib/data/locations.d.ts +3 -0
  26. package/lib/data/locations.js +132 -0
  27. package/lib/data/messages.d.ts +9 -0
  28. package/lib/data/messages.js +248 -0
  29. package/lib/data/notifications.d.ts +5 -0
  30. package/lib/data/notifications.js +42 -0
  31. package/lib/data/payments.d.ts +11 -0
  32. package/lib/data/payments.js +748 -0
  33. package/lib/data/posts.d.ts +14 -0
  34. package/lib/data/posts.js +458 -0
  35. package/lib/data/reactions.d.ts +6 -0
  36. package/lib/data/reactions.js +218 -0
  37. package/lib/data/s3.d.ts +6 -0
  38. package/lib/data/s3.js +103 -0
  39. package/lib/data/search.d.ts +3 -0
  40. package/lib/data/search.js +98 -0
  41. package/lib/data/sms.d.ts +3 -0
  42. package/lib/data/sms.js +59 -0
  43. package/lib/data/subscription.d.ts +7 -0
  44. package/lib/data/subscription.js +284 -0
  45. package/lib/data/tags.d.ts +14 -0
  46. package/lib/data/tags.js +304 -0
  47. package/lib/data/users.d.ts +12 -0
  48. package/lib/data/users.js +312 -0
  49. package/lib/index.d.ts +3 -0
  50. package/lib/index.js +8 -0
  51. package/lib/types/apps.d.ts +44 -0
  52. package/lib/types/apps.js +2 -0
  53. package/lib/types/arangodb.d.ts +17 -0
  54. package/lib/types/arangodb.js +2 -0
  55. package/lib/types/auth.d.ts +9 -0
  56. package/lib/types/auth.js +2 -0
  57. package/lib/types/conversations.d.ts +6 -0
  58. package/lib/types/conversations.js +2 -0
  59. package/lib/types/email.d.ts +12 -0
  60. package/lib/types/email.js +2 -0
  61. package/lib/types/files.d.ts +28 -0
  62. package/lib/types/files.js +2 -0
  63. package/lib/types/google.d.ts +27 -0
  64. package/lib/types/google.js +2 -0
  65. package/lib/types/groups.d.ts +22 -0
  66. package/lib/types/groups.js +2 -0
  67. package/lib/types/images.d.ts +25 -0
  68. package/lib/types/images.js +2 -0
  69. package/lib/types/index.d.ts +17 -0
  70. package/lib/types/index.js +22 -0
  71. package/lib/types/locations.d.ts +21 -0
  72. package/lib/types/locations.js +2 -0
  73. package/lib/types/messages.d.ts +12 -0
  74. package/lib/types/messages.js +2 -0
  75. package/lib/types/notifications.d.ts +19 -0
  76. package/lib/types/notifications.js +2 -0
  77. package/lib/types/payments.d.ts +119 -0
  78. package/lib/types/payments.js +2 -0
  79. package/lib/types/posts.d.ts +20 -0
  80. package/lib/types/posts.js +2 -0
  81. package/lib/types/reactions.d.ts +4 -0
  82. package/lib/types/reactions.js +2 -0
  83. package/lib/types/tags.d.ts +10 -0
  84. package/lib/types/tags.js +2 -0
  85. package/lib/types/users.d.ts +78 -0
  86. package/lib/types/users.js +2 -0
  87. package/lib/utils/analytics.d.ts +3 -0
  88. package/lib/utils/analytics.js +47 -0
  89. package/lib/utils/arangodb.d.ts +9 -0
  90. package/lib/utils/arangodb.js +98 -0
  91. package/lib/utils/auth.d.ts +2 -0
  92. package/lib/utils/auth.js +43 -0
  93. package/lib/utils/index.d.ts +5 -0
  94. package/lib/utils/index.js +10 -0
  95. package/lib/utils/objects.d.ts +3 -0
  96. package/lib/utils/objects.js +34 -0
  97. package/lib/utils/redis.d.ts +1 -0
  98. package/lib/utils/redis.js +15 -0
  99. package/package.json +75 -0
  100. package/src/config.ts +121 -0
  101. package/src/data/conversations.ts +183 -0
  102. package/src/data/dynamodb.ts +157 -0
  103. package/src/data/email.ts +164 -0
  104. package/src/data/files.ts +352 -0
  105. package/src/data/groups.ts +308 -0
  106. package/src/data/images.ts +606 -0
  107. package/src/data/index.ts +23 -0
  108. package/src/data/ios.ts +249 -0
  109. package/src/data/locations.ts +114 -0
  110. package/src/data/messages.ts +237 -0
  111. package/src/data/notifications.ts +48 -0
  112. package/src/data/payments.ts +675 -0
  113. package/src/data/posts.ts +508 -0
  114. package/src/data/reactions.ts +186 -0
  115. package/src/data/s3.ts +117 -0
  116. package/src/data/search.ts +74 -0
  117. package/src/data/sms.ts +60 -0
  118. package/src/data/subscription.ts +228 -0
  119. package/src/data/tags.ts +230 -0
  120. package/src/data/users.ts +256 -0
  121. package/src/index.ts +7 -0
  122. package/src/types/apps.ts +57 -0
  123. package/src/types/arangodb.ts +23 -0
  124. package/src/types/auth.ts +19 -0
  125. package/src/types/conversations.ts +11 -0
  126. package/src/types/email.ts +17 -0
  127. package/src/types/files.ts +33 -0
  128. package/src/types/google.ts +37 -0
  129. package/src/types/groups.ts +28 -0
  130. package/src/types/images.ts +33 -0
  131. package/src/types/index.ts +21 -0
  132. package/src/types/locations.ts +25 -0
  133. package/src/types/messages.ts +16 -0
  134. package/src/types/notifications.ts +26 -0
  135. package/src/types/payments.ts +134 -0
  136. package/src/types/posts.ts +25 -0
  137. package/src/types/reactions.ts +8 -0
  138. package/src/types/tags.ts +14 -0
  139. package/src/types/users.ts +89 -0
  140. package/src/utils/analytics.ts +41 -0
  141. package/src/utils/arangodb.ts +100 -0
  142. package/src/utils/auth.ts +28 -0
  143. package/src/utils/index.ts +9 -0
  144. package/src/utils/objects.ts +34 -0
  145. package/src/utils/redis.ts +17 -0
  146. package/templates/email/layout.html +279 -0
  147. package/templates/email/passwordForgot.html +15 -0
  148. package/templates/email/passwordRecovery.html +12 -0
  149. package/templates/email/verifyEmail.html +15 -0
  150. package/templates/sms/passwordForgot.txt +1 -0
  151. package/templates/sms/passwordRecovery.txt +1 -0
  152. package/templates/sms/verifyEmail.txt +1 -0
  153. package/templates/sms/verifyPhone.txt +1 -0
  154. package/tsconfig.json +45 -0
@@ -0,0 +1,279 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
6
+ <title>[appName]</title>
7
+ <link type="text/css" rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:400,700"/>
8
+ <style type="text/css">
9
+ .ExternalClass,
10
+ .ExternalClass p,
11
+ .ExternalClass span,
12
+ .ExternalClass font,
13
+ .ExternalClass td,
14
+ .ExternalClass div {
15
+ line-height: 100%;
16
+ }
17
+
18
+ body, img, div, p, ul, li, span, strong, a {
19
+ margin: 0;
20
+ padding: 0;
21
+ }
22
+
23
+ table {
24
+ border-spacing: 0;
25
+ }
26
+
27
+ table td {
28
+ border-collapse: collapse;
29
+ }
30
+
31
+ body {
32
+ color: #000;
33
+ font-family: 'Open Sans', sans-serif, Arial, Helvetica;
34
+ font-size: 14px;
35
+ line-height: 1;
36
+ background-color: #EAEAEA;
37
+ width: 100% !important;
38
+ -webkit-text-size-adjust: none;
39
+ -ms-text-size-adjust: none;
40
+ }
41
+
42
+ a,
43
+ a:link,
44
+ a:hover,
45
+ a[href^="tel"], a[href^="sms"] {
46
+ color: #000;
47
+ outline: none;
48
+ text-decoration: none !important;
49
+ }
50
+
51
+ a {
52
+ border: none !important;
53
+ outline: none !important;
54
+ }
55
+
56
+ a[href^="tel"], a[href^="sms"] {
57
+ pointer-events: none;
58
+ cursor: default;
59
+ }
60
+
61
+ .mobile_link a[href^="tel"],
62
+ .mobile_link a[href^="sms"] {
63
+ text-decoration: default;
64
+ color: #000 !important;
65
+ pointer-events: auto;
66
+ cursor: default;
67
+ }
68
+
69
+ img {
70
+ border: none;
71
+ outline: none;
72
+ text-decoration: none;
73
+ height: auto;
74
+ max-width: 100%;
75
+ }
76
+
77
+ table {
78
+ border-collapse: collapse;
79
+ mso-table-lspace: 0pt;
80
+ mso-table-rspace: 0pt;
81
+ }
82
+
83
+ tr,
84
+ td {
85
+ margin: 0;
86
+ padding: 0;
87
+ }
88
+
89
+ @media only screen and (max-width: 799px) {
90
+ table[class="Externalmain"] {
91
+ width: 100% !important;
92
+ }
93
+ }
94
+
95
+ @media only screen and (max-width: 499px) {
96
+ table[class="ExternalClass"] {
97
+ width: 100% !important;
98
+ }
99
+ }
100
+ </style>
101
+ </head>
102
+
103
+ <body text="#333333" link="#9d470a" bgcolor="#EAEAEA" alink="#9d470a" yahoo="fix" style="width:100% !important; color:#ffffff; font-family: 'Open Sans', Arial, Helvetica, sans-serif; font-size:12px; line-height:1;">
104
+ <table width="100%" class="Externalmain" cellspacing="0" cellpadding="0" border="0" align="center">
105
+ <tr>
106
+ <td>
107
+ <table width="600" cellspacing="0" cellpadding="0" border="0" align="center" class="ExternalClass">
108
+ <tr>
109
+ <td>
110
+ <table width="100%" cellspacing="0" cellpadding="0" border="0" align="center">
111
+ <tr>
112
+ <td>
113
+ <table width="100%" cellspacing="0" cellpadding="0" border="0" align="center">
114
+ <tr>
115
+ <td>
116
+ <table width="100%" cellspacing="0" cellpadding="0" border="0">
117
+ <tr>
118
+ <td height="35" style="background:#000000;">
119
+ <img width="1" height="1" title="" alt="" src="https://box.reaktor.io/images/email/spacer.png"/>
120
+ </td>
121
+ </tr>
122
+ <tr>
123
+ <td align="center" style="background:#000000;">
124
+ <img width="130" height="130" title="" alt="" src="https://box.reaktor.io/apps/[appId]/images/email/logo.png"/>
125
+ </td>
126
+ </tr>
127
+ <tr>
128
+ <td height="30" style="background:#000000;">
129
+ <img width="1" height="1" title="" alt="" src="https://box.reaktor.io/images/email/spacer.png"/>
130
+ </td>
131
+ </tr>
132
+ <tr>
133
+ <td>
134
+ <table width="100%" cellspacing="0" cellpadding="0" border="0" style="text-align: center;background: #ffffff;">
135
+ <tr>
136
+ <td height="50">
137
+ <img width="1" height="1" border="0" src="https://box.reaktor.io/images/email/spacer.png" alt="" title=""/>
138
+ </td>
139
+ </tr>
140
+ <tr>
141
+ <td width="100%" style="font-family: 'Open Sans', Arial, Helvetica, sans-serif; color: #77737b; font-size: 14px; letter-spacing: 1px; text-transform: uppercase;">
142
+ [subTitle]
143
+ </td>
144
+ </tr>
145
+ <tr>
146
+ <td height="15">
147
+ <img width="1" height="1" border="0" src="https://box.reaktor.io/images/email/spacer.png" alt="" title=""/>
148
+ </td>
149
+ </tr>
150
+ <tr>
151
+ <td align="center">
152
+ <img width="56" height="1" border="0" src="https://box.reaktor.io/images/email/border.png" alt="" title=""/>
153
+ </td>
154
+ </tr>
155
+ <tr>
156
+ <td height="15">
157
+ <img width="1" height="1" border="0" src="https://box.reaktor.io/images/email/spacer.png" alt="" title=""/>
158
+ </td>
159
+ </tr>
160
+ <tr>
161
+ <td width="100%" style="font-family: 'Open Sans', Arial, Helvetica, sans-serif; color: #1e1c20; font-size: 30px; letter-spacing: 3px; text-transform: uppercase; font-weight: bold;">
162
+ [title]
163
+ </td>
164
+ </tr>
165
+ <tr>
166
+ <td height="30">
167
+ <img width="1" height="1" border="0" src="https://box.reaktor.io/images/email/spacer.png" alt="" title=""/>
168
+ </td>
169
+ </tr>
170
+ </table>
171
+ </td>
172
+ </tr>
173
+ <tr>
174
+ <td>
175
+ <table width="100%" cellspacing="0" cellpadding="0" border="0" style="color: #000000; text-align: center;background: #ffffff;">
176
+ <tr>
177
+ <td width="30">
178
+ <img width="1" height="1" border="0" src="https://box.reaktor.io/images/email/spacer.png" alt="" title=""/>
179
+ </td>
180
+ <td>
181
+ [message]
182
+ </td>
183
+ <td width="30">
184
+ <img width="1" height="1" border="0" src="https://box.reaktor.io/images/email/spacer.png" alt="" title=""/>
185
+ </td>
186
+ </tr>
187
+ </table>
188
+ </td>
189
+ </tr>
190
+ </table>
191
+ </td>
192
+ </tr>
193
+ </table>
194
+ </td>
195
+ </tr>
196
+ <tr>
197
+ <td>
198
+ <table width="100%" cellspacing="0" cellpadding="0" border="0" style="background: #000000;">
199
+ <tr>
200
+ <td height="20">
201
+ <img width="1" height="1" border="0" title="" alt="" src="https://box.reaktor.io/images/email/spacer.png"/>
202
+ </td>
203
+ </tr>
204
+ <tr>
205
+ <td>
206
+ <table width="100%" cellspacing="0" cellpadding="0" border="0">
207
+ <tr>
208
+ <td align="center" width="89">
209
+ <a href="#">
210
+ <img width="90" height="30" border="0" title="" alt="[appName]" src="https://box.reaktor.io/apps/[appId]/images/email/logo-txt.png"/>
211
+ </a>
212
+ </td>
213
+ </tr>
214
+ </table>
215
+ </td>
216
+ </tr>
217
+ <tr>
218
+ <td height="20">
219
+ <img width="1" height="1" border="0" title="" alt="" src="https://box.reaktor.io/images/email/spacer.png"/>
220
+ </td>
221
+ </tr>
222
+ </table>
223
+ </td>
224
+ </tr>
225
+ <tr>
226
+ <td height="23">
227
+ <img width="1" height="1" border="0" title="" alt="" src="https://box.reaktor.io/images/email/spacer.png"/>
228
+ </td>
229
+ </tr>
230
+ <tr>
231
+ <td align="center">
232
+ <table cellspacing="0" cellpadding="0" border="0" align="center">
233
+ <tr>
234
+ [links]
235
+ </tr>
236
+ </table>
237
+ </td>
238
+ </tr>
239
+ <tr>
240
+ <td>
241
+ <table width="100%" cellspacing="0" cellpadding="0" border="0" style="text-align: center;">
242
+ <tr>
243
+ <td height="30">
244
+ <img width="1" height="1" border="0" title="" alt="" src="https://box.reaktor.io/images/email/spacer.png"/>
245
+ </td>
246
+ </tr>
247
+ <tr>
248
+ <td style="font-family: 'Open Sans', Arial, Helvetica, sans-serif; color: #333;font-size: 12px;">
249
+ To stop receiving these emails
250
+ <a style="font-size: 12px; font-family: 'Open Sans', Arial, Helvetica, sans-serif; color: #333; text-decoration: underline;" href="#"> unsubscribe</a>.
251
+ </td>
252
+ </tr>
253
+ <tr>
254
+ <td height="13">
255
+ <img width="1" height="1" border="0" title="" alt="" src="https://box.reaktor.io/images/email/spacer.png"/>
256
+ </td>
257
+ </tr>
258
+ <tr>
259
+ <td style="font-family: 'Open Sans', Arial, Helvetica, sans-serif; color: #333; font-size: 12px;">
260
+ Powered by <a style="color: #333;" href="https://reaktor.io">Reaktor.io</a>
261
+ </td>
262
+ </tr>
263
+ <tr>
264
+ <td height="35">
265
+ <img width="1" height="1" border="0" title="" alt="" src="https://box.reaktor.io/images/email/spacer.png"/>
266
+ </td>
267
+ </tr>
268
+ </table>
269
+ </td>
270
+ </tr>
271
+ </table>
272
+ </td>
273
+ </tr>
274
+ </table>
275
+ </td>
276
+ </tr>
277
+ </table>
278
+ </body>
279
+ </html>
@@ -0,0 +1,15 @@
1
+ <table width="100%" cellspacing="0" cellpadding="0" border="0">
2
+ <tr>
3
+ <td style="font-family: 'Open Sans', Arial, Helvetica, sans-serif; color: #000; font-size: 16px; line-height: 24px;">
4
+ <p>[appName] password reset code: <strong>[resetCode]</strong></p>
5
+ <p style="font-size: 12px; line-height: 18px; color: #77737b">
6
+ <em>Please use the code above to reset your password. It will expire after 15 minutes.</em>
7
+ </p>
8
+ </td>
9
+ </tr>
10
+ <tr>
11
+ <td height="60">
12
+ <img width="1" height="1" title="" alt="" src="https://box.reaktor.io/images/email/spacer.png"/>
13
+ </td>
14
+ </tr>
15
+ </table>
@@ -0,0 +1,12 @@
1
+ <table width="100%" cellspacing="0" cellpadding="0" border="0">
2
+ <tr>
3
+ <td style="font-family: 'Open Sans', Arial, Helvetica, sans-serif; color: #77737b; font-size: 14px; line-height: 24px;">
4
+ Your password has been sucessfully updated!
5
+ </td>
6
+ </tr>
7
+ <tr>
8
+ <td height="63">
9
+ <img width="1" height="1" title="" alt="" src="https://box.reaktor.io/images/email/spacer.gif"/>
10
+ </td>
11
+ </tr>
12
+ </table>
@@ -0,0 +1,15 @@
1
+ <table width="100%" cellspacing="0" cellpadding="0" border="0">
2
+ <tr>
3
+ <td style="font-family: 'Open Sans', Arial, Helvetica, sans-serif; color: #77737b; font-size: 14px;">
4
+ <p style="font-size: 14px; line-height: 26px;">[appName] email verification code: [emailCode]</p>
5
+ <span style="font-size: 12px; line-height: 18px;">
6
+ Please use the code above to verify your email address.
7
+ </span>
8
+ </td>
9
+ </tr>
10
+ <tr>
11
+ <td height="63">
12
+ <img width="1" height="1" title="" alt="" src="https://box.reaktor.io/images/email/spacer.gif"/>
13
+ </td>
14
+ </tr>
15
+ </table>
@@ -0,0 +1 @@
1
+ [appName] password reset code: [resetCode]
@@ -0,0 +1 @@
1
+ Your password for [appName] has been successfully changed.
@@ -0,0 +1 @@
1
+ Email verification code is: [emailCode]
@@ -0,0 +1 @@
1
+ Phone verification code is: [phoneCode]
package/tsconfig.json ADDED
@@ -0,0 +1,45 @@
1
+ {
2
+ "compileOnSave": false,
3
+ "compilerOptions": {
4
+ "allowSyntheticDefaultImports": true,
5
+ "baseUrl": "src",
6
+ "declaration": false,
7
+ "emitDecoratorMetadata": true,
8
+ "esModuleInterop": true,
9
+ "experimentalDecorators": true,
10
+ "inlineSourceMap": true,
11
+ "lib": [
12
+ "dom",
13
+ "es2015",
14
+ "es5",
15
+ "es6",
16
+ "es7",
17
+ "esnext"
18
+ ],
19
+ "moduleResolution": "node",
20
+ "noImplicitReturns": true,
21
+ "noImplicitThis": true,
22
+ "noStrictGenericChecks": true,
23
+ "noUnusedLocals": true,
24
+ "outDir": "./build",
25
+ "removeComments": true,
26
+ "skipLibCheck": true,
27
+ "target": "es5",
28
+ "typeRoots": [
29
+ "node_modules/@types"
30
+ ],
31
+ "types": [
32
+ "jest",
33
+ "node"
34
+ ]
35
+ },
36
+ "exclude": [
37
+ "node_modules",
38
+ "node_modules_custom",
39
+ "LambdaFunc"
40
+ ],
41
+ "include": [
42
+ "src/**/*.ts*",
43
+ "src/*.ts*"
44
+ ]
45
+ }