@nlabs/reaktor 1.6.3 → 1.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.
- package/LICENSE +74 -201
- package/README.md +48 -16
- package/lib/actions/analytics.d.ts +10 -0
- package/lib/actions/analytics.js +539 -0
- package/lib/actions/apps.js +2 -2
- package/lib/actions/connections.js +1 -1
- package/lib/actions/content.js +2 -2
- package/lib/actions/conversations.js +2 -2
- package/lib/actions/crm.d.ts +11 -1
- package/lib/actions/crm.js +443 -13
- package/lib/actions/crud.js +2 -2
- package/lib/actions/dynamodb.d.ts +1 -1
- package/lib/actions/dynamodb.js +2 -2
- package/lib/actions/email.d.ts +1 -1
- package/lib/actions/email.js +2 -2
- package/lib/actions/files.js +2 -2
- package/lib/actions/flags.d.ts +6 -0
- package/lib/actions/flags.js +147 -0
- package/lib/actions/groups.js +2 -2
- package/lib/actions/images.d.ts +1 -1
- package/lib/actions/images.js +2 -2
- package/lib/actions/index.d.ts +3 -2
- package/lib/actions/index.js +4 -3
- package/lib/actions/ios.js +1 -1
- package/lib/actions/locations.js +2 -2
- package/lib/actions/messages.js +2 -2
- package/lib/actions/notifications.d.ts +1 -1
- package/lib/actions/notifications.js +2 -2
- package/lib/actions/payments.d.ts +3 -3
- package/lib/actions/payments.js +144 -189
- package/lib/actions/personas.js +1 -1
- package/lib/actions/posts.d.ts +0 -4
- package/lib/actions/posts.js +2 -4
- package/lib/actions/query.js +2 -2
- package/lib/actions/reactions.js +2 -2
- package/lib/actions/rum.js +148 -45
- package/lib/actions/s3.d.ts +1 -1
- package/lib/actions/s3.js +2 -2
- package/lib/actions/search.js +2 -2
- package/lib/actions/sms.js +2 -2
- package/lib/actions/statistics.js +2 -2
- package/lib/actions/subscriptions.js +2 -2
- package/lib/actions/tags.js +2 -2
- package/lib/actions/users.d.ts +4 -1
- package/lib/actions/users.js +85 -11
- package/lib/actions/videos.js +2 -2
- package/lib/adapters/arangoAdapter.js +1 -1
- package/lib/adapters/contentAdapter.js +2 -2
- package/lib/adapters/fileAdapter.js +1 -1
- package/lib/adapters/imageAdapter.js +1 -1
- package/lib/adapters/index.js +1 -1
- package/lib/adapters/messageAdapter.js +1 -1
- package/lib/adapters/postAdapter.js +1 -1
- package/lib/adapters/reaktorAdapter.js +1 -1
- package/lib/adapters/tagAdapter.d.ts +0 -1
- package/lib/adapters/tagAdapter.js +1 -2
- package/lib/adapters/userAdapter.d.ts +0 -1
- package/lib/adapters/userAdapter.js +1 -2
- package/lib/config.js +8 -2
- package/lib/constants/collections.d.ts +17 -1
- package/lib/constants/collections.js +18 -2
- package/lib/handlers/graphqlHandler.d.ts +2 -2
- package/lib/handlers/graphqlHandler.js +2 -19
- package/lib/index.d.ts +4 -2
- package/lib/index.js +4 -3
- package/lib/lambdas/actions/websockets.js +2 -2
- package/lib/lambdas/authorizer.js +2 -2
- package/lib/lambdas/connection.js +2 -2
- package/lib/lambdas/utils/message.js +2 -2
- package/lib/lambdas/utils/websocket.d.ts +1 -1
- package/lib/lambdas/utils/websocket.js +2 -2
- package/lib/mocks/conversation.js +1 -1
- package/lib/mocks/file.js +1 -1
- package/lib/mocks/group.js +1 -1
- package/lib/mocks/image.js +1 -1
- package/lib/mocks/post.js +1 -1
- package/lib/mocks/tag.js +1 -1
- package/lib/mocks/user.js +1 -1
- package/lib/mocks/video.js +1 -1
- package/lib/mutations/analytics/analytics.d.ts +1 -0
- package/lib/mutations/analytics/analytics.js +35 -0
- package/lib/mutations/content/content.js +2 -2
- package/lib/mutations/crm/crm.js +57 -11
- package/lib/mutations/events/events.js +2 -2
- package/lib/mutations/flags/flags.d.ts +1 -0
- package/lib/mutations/flags/flags.js +33 -0
- package/lib/mutations/groups/groups.js +2 -2
- package/lib/mutations/images/images.js +2 -2
- package/lib/mutations/index.d.ts +3 -1
- package/lib/mutations/index.js +13 -3
- package/lib/mutations/locations/locations.js +2 -2
- package/lib/mutations/messages/messages.js +2 -2
- package/lib/mutations/personas/personas.js +2 -2
- package/lib/mutations/posts/posts.js +2 -2
- package/lib/mutations/reactions/reactions.js +2 -2
- package/lib/mutations/rum/rum.js +2 -2
- package/lib/mutations/statistics/statistics.js +2 -2
- package/lib/mutations/subscriptions/subscriptions.js +2 -2
- package/lib/mutations/tags/tags.js +2 -2
- package/lib/mutations/users/users.js +30 -17
- package/lib/mutations/videos/videos.js +2 -2
- package/lib/objectTypes/analytics.d.ts +8 -0
- package/lib/objectTypes/analytics.js +147 -0
- package/lib/objectTypes/app.js +2 -2
- package/lib/objectTypes/bankAccount.js +2 -2
- package/lib/objectTypes/connection.js +2 -2
- package/lib/objectTypes/content.js +2 -2
- package/lib/objectTypes/conversation.js +2 -2
- package/lib/objectTypes/creditCard.js +2 -2
- package/lib/objectTypes/crm.d.ts +5 -0
- package/lib/objectTypes/crm.js +68 -2
- package/lib/objectTypes/document.js +1 -1
- package/lib/objectTypes/error.js +2 -2
- package/lib/objectTypes/event.js +2 -2
- package/lib/objectTypes/external.js +2 -2
- package/lib/objectTypes/file.js +2 -2
- package/lib/objectTypes/filter.js +2 -2
- package/lib/objectTypes/flag.d.ts +1 -0
- package/lib/objectTypes/flag.js +35 -0
- package/lib/objectTypes/group.js +2 -2
- package/lib/objectTypes/iapSubscription.js +2 -2
- package/lib/objectTypes/image.d.ts +1 -1
- package/lib/objectTypes/image.js +2 -2
- package/lib/objectTypes/index.d.ts +2 -0
- package/lib/objectTypes/index.js +3 -1
- package/lib/objectTypes/location.js +2 -2
- package/lib/objectTypes/message.js +2 -2
- package/lib/objectTypes/passcode.js +2 -2
- package/lib/objectTypes/persona.js +2 -2
- package/lib/objectTypes/plan.js +2 -2
- package/lib/objectTypes/post.js +2 -2
- package/lib/objectTypes/query.js +2 -2
- package/lib/objectTypes/reaction.js +2 -2
- package/lib/objectTypes/relation.js +2 -2
- package/lib/objectTypes/rum.js +4 -4
- package/lib/objectTypes/search.js +2 -2
- package/lib/objectTypes/statistics.js +2 -2
- package/lib/objectTypes/subscription.js +2 -2
- package/lib/objectTypes/tag.js +2 -2
- package/lib/objectTypes/user.js +10 -2
- package/lib/objectTypes/video.d.ts +1 -1
- package/lib/objectTypes/video.js +2 -2
- package/lib/queries/analytics/analytics.d.ts +1 -0
- package/lib/queries/analytics/analytics.js +41 -0
- package/lib/queries/content/content.js +2 -2
- package/lib/queries/crm/crm.js +52 -13
- package/lib/queries/events/events.js +2 -2
- package/lib/queries/flags/flags.d.ts +1 -0
- package/lib/queries/flags/flags.js +16 -0
- package/lib/queries/groups/groups.js +2 -2
- package/lib/queries/images/images.js +2 -2
- package/lib/queries/index.d.ts +3 -1
- package/lib/queries/index.js +13 -3
- package/lib/queries/locations/locations.js +2 -2
- package/lib/queries/messages/messages.js +1 -1
- package/lib/queries/personas/personas.js +2 -2
- package/lib/queries/posts/posts.js +2 -2
- package/lib/queries/query/query.js +2 -2
- package/lib/queries/reactions/reactions.js +2 -2
- package/lib/queries/statistics/statistics.js +2 -2
- package/lib/queries/subscriptions/subscriptions.js +1 -1
- package/lib/queries/tags/tags.js +2 -2
- package/lib/queries/users/users.js +2 -2
- package/lib/queries/videos/videos.js +2 -2
- package/lib/templates/email/layout.js +1 -1
- package/lib/templates/email/passwordForgot.js +1 -1
- package/lib/templates/email/passwordRecovery.js +1 -1
- package/lib/templates/email/verifyEmail.js +1 -1
- package/lib/templates/email/welcome.js +1 -1
- package/lib/templates/sms/passwordForgot.js +1 -1
- package/lib/templates/sms/passwordRecovery.js +1 -1
- package/lib/templates/sms/verifyEmail.js +1 -1
- package/lib/templates/sms/verifyPhone.js +1 -1
- package/lib/templates/sms/welcome.js +1 -1
- package/lib/types/analytics.types.d.ts +92 -0
- package/lib/types/analytics.types.js +6 -0
- package/lib/types/apps.types.d.ts +1 -1
- package/lib/types/apps.types.js +2 -2
- package/lib/types/arangodb.types.d.ts +2 -2
- package/lib/types/arangodb.types.js +2 -2
- package/lib/types/auth.types.d.ts +4 -1
- package/lib/types/auth.types.js +2 -2
- package/lib/types/connections.types.d.ts +1 -1
- package/lib/types/connections.types.js +2 -2
- package/lib/types/content.types.d.ts +1 -1
- package/lib/types/content.types.js +2 -2
- package/lib/types/conversations.types.d.ts +1 -1
- package/lib/types/conversations.types.js +2 -2
- package/lib/types/crm.types.d.ts +58 -2
- package/lib/types/crm.types.js +2 -2
- package/lib/types/email.types.d.ts +1 -1
- package/lib/types/email.types.js +2 -2
- package/lib/types/error.types.js +1 -1
- package/lib/types/files.types.d.ts +1 -1
- package/lib/types/files.types.js +2 -2
- package/lib/types/flags.types.d.ts +28 -0
- package/lib/types/flags.types.js +3 -0
- package/lib/types/google.types.d.ts +1 -1
- package/lib/types/google.types.js +2 -2
- package/lib/types/groups.types.d.ts +1 -1
- package/lib/types/groups.types.js +2 -2
- package/lib/types/images.types.d.ts +1 -1
- package/lib/types/images.types.js +2 -2
- package/lib/types/index.d.ts +3 -1
- package/lib/types/index.js +4 -2
- package/lib/types/locations.types.d.ts +1 -1
- package/lib/types/locations.types.js +2 -2
- package/lib/types/messages.types.d.ts +1 -1
- package/lib/types/messages.types.js +2 -2
- package/lib/types/notifications.types.d.ts +1 -1
- package/lib/types/notifications.types.js +2 -2
- package/lib/types/payments.types.d.ts +4 -1
- package/lib/types/payments.types.js +2 -2
- package/lib/types/personas.types.js +1 -1
- package/lib/types/posts.types.d.ts +1 -1
- package/lib/types/posts.types.js +2 -2
- package/lib/types/rum.types.d.ts +3 -3
- package/lib/types/rum.types.js +2 -2
- package/lib/types/statistics.types.js +1 -1
- package/lib/types/tags.types.d.ts +1 -1
- package/lib/types/tags.types.js +2 -2
- package/lib/types/users.types.d.ts +2 -1
- package/lib/types/users.types.js +2 -2
- package/lib/types/videos.types.d.ts +1 -1
- package/lib/types/videos.types.js +2 -2
- package/lib/types/websockets.types.d.ts +1 -1
- package/lib/types/websockets.types.js +2 -2
- package/lib/upload.js +4 -9
- package/lib/utils/adapterUtils.d.ts +1 -1
- package/lib/utils/adapterUtils.js +2 -2
- package/lib/utils/analyticsUtils.d.ts +1 -1
- package/lib/utils/analyticsUtils.js +2 -2
- package/lib/utils/appContext.d.ts +2 -0
- package/lib/utils/appContext.js +10 -0
- package/lib/utils/aqlHelpers.d.ts +1 -1
- package/lib/utils/aqlHelpers.js +2 -2
- package/lib/utils/arangodbUtils.d.ts +9 -1
- package/lib/utils/arangodbUtils.js +10 -2
- package/lib/utils/authUtils.js +2 -2
- package/lib/utils/awsUtils.js +2 -2
- package/lib/utils/collectionRegistry.d.ts +1 -1
- package/lib/utils/collectionRegistry.js +17 -2
- package/lib/utils/contextUtils.d.ts +2 -2
- package/lib/utils/contextUtils.js +2 -2
- package/lib/utils/dbI18n.example.d.ts +1 -1
- package/lib/utils/dbI18n.example.js +2 -2
- package/lib/utils/dbI18n.js +2 -2
- package/lib/utils/googleTranslate.d.ts +1 -1
- package/lib/utils/googleTranslate.js +2 -2
- package/lib/utils/graphqlUtils.d.ts +2 -0
- package/lib/utils/graphqlUtils.js +1 -1
- package/lib/utils/imageUtils.js +1 -1
- package/lib/utils/index.d.ts +1 -1
- package/lib/utils/index.js +2 -2
- package/lib/utils/languageDetection.js +1 -1
- package/lib/utils/localeUtils.d.ts +1 -1
- package/lib/utils/localeUtils.example.d.ts +1 -1
- package/lib/utils/localeUtils.example.js +2 -2
- package/lib/utils/localeUtils.js +2 -2
- package/lib/utils/middlewareUtils.js +1 -1
- package/lib/utils/queryBuilder.d.ts +1 -1
- package/lib/utils/queryBuilder.js +2 -2
- package/lib/utils/schemaUtils.js +1 -1
- package/lib/utils/sessionUtils.d.ts +4 -0
- package/lib/utils/sessionUtils.js +2 -2
- package/lib/utils/stripeUtils.d.ts +1 -1
- package/lib/utils/stripeUtils.js +2 -2
- package/lib/utils/templateUtils.js +1 -1
- package/lib/utils/testUtils.js +2 -2
- package/lib/utils/translationQueue.d.ts +1 -1
- package/lib/utils/translationQueue.example.d.ts +1 -1
- package/lib/utils/translationQueue.example.js +2 -2
- package/lib/utils/translationQueue.js +2 -2
- package/lib/videoProcessing.js +1 -1
- package/package.json +49 -86
- package/lib/actions/websockets.d.ts +0 -20
- package/lib/actions/websockets.js +0 -164
- package/lib/mocks/nlabs.png +0 -0
package/LICENSE
CHANGED
|
@@ -1,201 +1,74 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
-
(except as stated in this section) patent license to make, have made,
|
|
77
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
-
where such license applies only to those patent claims licensable
|
|
79
|
-
by such Contributor that are necessarily infringed by their
|
|
80
|
-
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
-
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
-
institute patent litigation against any entity (including a
|
|
83
|
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
-
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
-
or contributory patent infringement, then any patent licenses
|
|
86
|
-
granted to You under this License for that Work shall terminate
|
|
87
|
-
as of the date such litigation is filed.
|
|
88
|
-
|
|
89
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
-
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
-
modifications, and in Source or Object form, provided that You
|
|
92
|
-
meet the following conditions:
|
|
93
|
-
|
|
94
|
-
(a) You must give any other recipients of the Work or
|
|
95
|
-
Derivative Works a copy of this License; and
|
|
96
|
-
|
|
97
|
-
(b) You must cause any modified files to carry prominent notices
|
|
98
|
-
stating that You changed the files; and
|
|
99
|
-
|
|
100
|
-
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
-
that You distribute, all copyright, patent, trademark, and
|
|
102
|
-
attribution notices from the Source form of the Work,
|
|
103
|
-
excluding those notices that do not pertain to any part of
|
|
104
|
-
the Derivative Works; and
|
|
105
|
-
|
|
106
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
-
distribution, then any Derivative Works that You distribute must
|
|
108
|
-
include a readable copy of the attribution notices contained
|
|
109
|
-
within such NOTICE file, excluding those notices that do not
|
|
110
|
-
pertain to any part of the Derivative Works, in at least one
|
|
111
|
-
of the following places: within a NOTICE text file distributed
|
|
112
|
-
as part of the Derivative Works; within the Source form or
|
|
113
|
-
documentation, if provided along with the Derivative Works; or,
|
|
114
|
-
within a display generated by the Derivative Works, if and
|
|
115
|
-
wherever such third-party notices normally appear. The contents
|
|
116
|
-
of the NOTICE file are for informational purposes only and
|
|
117
|
-
do not modify the License. You may add Your own attribution
|
|
118
|
-
notices within Derivative Works that You distribute, alongside
|
|
119
|
-
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
-
that such additional attribution notices cannot be construed
|
|
121
|
-
as modifying the License.
|
|
122
|
-
|
|
123
|
-
You may add Your own copyright statement to Your modifications and
|
|
124
|
-
may provide additional or different license terms and conditions
|
|
125
|
-
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
-
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
-
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
-
the conditions stated in this License.
|
|
129
|
-
|
|
130
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
-
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
-
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
-
this License, without any additional terms or conditions.
|
|
134
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
-
the terms of any separate license agreement you may have executed
|
|
136
|
-
with Licensor regarding such Contributions.
|
|
137
|
-
|
|
138
|
-
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
-
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
-
except as required for reasonable and customary use in describing the
|
|
141
|
-
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
-
|
|
143
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
-
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
-
implied, including, without limitation, any warranties or conditions
|
|
148
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
-
appropriateness of using or redistributing the Work and assume any
|
|
151
|
-
risks associated with Your exercise of permissions under this License.
|
|
152
|
-
|
|
153
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
-
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
-
unless required by applicable law (such as deliberate and grossly
|
|
156
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
-
liable to You for damages, including any direct, indirect, special,
|
|
158
|
-
incidental, or consequential damages of any character arising as a
|
|
159
|
-
result of this License or out of the use or inability to use the
|
|
160
|
-
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
-
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
-
other commercial damages or losses), even if such Contributor
|
|
163
|
-
has been advised of the possibility of such damages.
|
|
164
|
-
|
|
165
|
-
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
-
or other liability obligations and/or rights consistent with this
|
|
169
|
-
License. However, in accepting such obligations, You may act only
|
|
170
|
-
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
-
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
-
defend, and hold each Contributor harmless for any liability
|
|
173
|
-
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
-
of your accepting any such warranty or additional liability.
|
|
175
|
-
|
|
176
|
-
END OF TERMS AND CONDITIONS
|
|
177
|
-
|
|
178
|
-
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
-
|
|
180
|
-
To apply the Apache License to your work, attach the following
|
|
181
|
-
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
-
replaced with your own identifying information. (Don't include
|
|
183
|
-
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
-
comment syntax for the file format. We also recommend that a
|
|
185
|
-
file or class name and description of purpose be included on the
|
|
186
|
-
same "printed page" as the copyright notice for easier
|
|
187
|
-
identification within third-party archives.
|
|
188
|
-
|
|
189
|
-
Copyright [yyyy] [name of copyright owner]
|
|
190
|
-
|
|
191
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
-
you may not use this file except in compliance with the License.
|
|
193
|
-
You may obtain a copy of the License at
|
|
194
|
-
|
|
195
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
-
|
|
197
|
-
Unless required by applicable law or agreed to in writing, software
|
|
198
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
-
See the License for the specific language governing permissions and
|
|
201
|
-
limitations under the License.
|
|
1
|
+
REAKTOR COMMERCIAL LICENSE
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2019-Present Nitrogen Labs, Inc. All rights reserved.
|
|
4
|
+
|
|
5
|
+
This software and its associated source code, object code, documentation, and
|
|
6
|
+
other materials (collectively, the "Software") are proprietary to Nitrogen
|
|
7
|
+
Labs, Inc. ("Nitrogen Labs").
|
|
8
|
+
|
|
9
|
+
1. COMMERCIAL AGREEMENT REQUIRED
|
|
10
|
+
|
|
11
|
+
Use of the Software requires a valid written commercial license, subscription,
|
|
12
|
+
order form, or other agreement with Nitrogen Labs (the "Commercial
|
|
13
|
+
Agreement"). Possession of or access to the Software does not itself grant any
|
|
14
|
+
license or other rights.
|
|
15
|
+
|
|
16
|
+
2. LICENSE GRANT
|
|
17
|
+
|
|
18
|
+
Subject to payment of all applicable fees and continued compliance with the
|
|
19
|
+
Commercial Agreement, Nitrogen Labs grants the licensee a limited,
|
|
20
|
+
non-exclusive, non-transferable, non-sublicensable right, during the term of
|
|
21
|
+
the Commercial Agreement, to install and use the Software internally only for
|
|
22
|
+
the purposes and within the scope expressly authorized by that agreement.
|
|
23
|
+
|
|
24
|
+
3. RESTRICTIONS
|
|
25
|
+
|
|
26
|
+
Except where expressly authorized by the Commercial Agreement or required by
|
|
27
|
+
applicable law, the licensee may not copy, modify, adapt, translate, publish,
|
|
28
|
+
distribute, sublicense, sell, rent, lease, provide as a service, reverse
|
|
29
|
+
engineer, decompile, disassemble, or otherwise attempt to derive the source or
|
|
30
|
+
underlying ideas of the Software. The licensee may not remove or alter any
|
|
31
|
+
copyright, trademark, or proprietary notice.
|
|
32
|
+
|
|
33
|
+
4. OWNERSHIP
|
|
34
|
+
|
|
35
|
+
Nitrogen Labs and its licensors retain all right, title, and interest in and to
|
|
36
|
+
the Software, including all intellectual-property rights. No rights are granted
|
|
37
|
+
except those expressly stated in the Commercial Agreement and this license.
|
|
38
|
+
|
|
39
|
+
5. THIRD-PARTY SOFTWARE
|
|
40
|
+
|
|
41
|
+
Third-party components included with or used by the Software remain subject to
|
|
42
|
+
their respective license terms. Those terms apply only to the corresponding
|
|
43
|
+
third-party components and do not license the Software as a whole.
|
|
44
|
+
|
|
45
|
+
6. TERMINATION
|
|
46
|
+
|
|
47
|
+
The license terminates automatically when the Commercial Agreement expires or
|
|
48
|
+
terminates, or upon a material breach of these terms. Upon termination, the
|
|
49
|
+
licensee must stop using and destroy all copies of the Software, except where
|
|
50
|
+
retention is required by law.
|
|
51
|
+
|
|
52
|
+
7. DISCLAIMER
|
|
53
|
+
|
|
54
|
+
EXCEPT AS EXPRESSLY PROVIDED IN THE COMMERCIAL AGREEMENT, THE SOFTWARE IS
|
|
55
|
+
PROVIDED "AS IS" WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
|
|
56
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND
|
|
57
|
+
NON-INFRINGEMENT.
|
|
58
|
+
|
|
59
|
+
8. LIMITATION OF LIABILITY
|
|
60
|
+
|
|
61
|
+
TO THE MAXIMUM EXTENT PERMITTED BY LAW, NITROGEN LABS WILL NOT BE LIABLE FOR
|
|
62
|
+
INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, EXEMPLARY, OR PUNITIVE DAMAGES,
|
|
63
|
+
OR FOR LOST PROFITS, REVENUE, DATA, OR BUSINESS OPPORTUNITIES, ARISING FROM OR
|
|
64
|
+
RELATED TO THE SOFTWARE. ANY ADDITIONAL LIMITATIONS OR REMEDIES ARE GOVERNED BY
|
|
65
|
+
THE COMMERCIAL AGREEMENT.
|
|
66
|
+
|
|
67
|
+
9. ORDER OF PRECEDENCE
|
|
68
|
+
|
|
69
|
+
If these terms conflict with a signed Commercial Agreement, the signed
|
|
70
|
+
Commercial Agreement controls. No purchase order or other unilateral terms
|
|
71
|
+
modify this license unless expressly accepted in writing by Nitrogen Labs.
|
|
72
|
+
|
|
73
|
+
Use without a valid Commercial Agreement is prohibited. Contact Nitrogen Labs
|
|
74
|
+
through https://nitrogenlabs.com to obtain commercial licensing rights.
|
package/README.md
CHANGED
|
@@ -3,6 +3,11 @@ Reaktor
|
|
|
3
3
|
|
|
4
4
|
A powerful GraphQL API framework built with TypeScript, ArangoDB, and AWS Lambda. Reaktor provides a complete backend solution for social platforms with user management, posts, messaging, reactions, and more.
|
|
5
5
|
|
|
6
|
+
[](https://www.npmjs.com/package/@nlabs/reaktor)
|
|
7
|
+
[](https://www.npmjs.com/package/@nlabs/reaktor)
|
|
8
|
+
[](https://reaktor.nitrogenx.co)
|
|
9
|
+
[](https://reaktor.io)
|
|
10
|
+
|
|
6
11
|
## Features
|
|
7
12
|
|
|
8
13
|
- **GraphQL API** - Built with graphql-compose for type-safe schema composition
|
|
@@ -14,6 +19,8 @@ A powerful GraphQL API framework built with TypeScript, ArangoDB, and AWS Lambda
|
|
|
14
19
|
- **AWS Lambda Ready** - Serverless deployment support
|
|
15
20
|
- **Comprehensive Testing** - Jest-based testing with utilities
|
|
16
21
|
- **Internationalization** - Database-driven i18n system
|
|
22
|
+
- **Feature flags** - Code-owned boolean and fixed-choice flags with database overrides ([guide](./docs/FEATURE_FLAGS.md))
|
|
23
|
+
- **Secure billing setup** - Stripe-hosted card collection without raw card data passing through Reaktor ([guide](./docs/BILLING.md))
|
|
17
24
|
|
|
18
25
|
Peer Dependencies
|
|
19
26
|
----------------
|
|
@@ -184,7 +191,7 @@ The public `rum.track` mutation sanitizes GothamJS journey events and sends them
|
|
|
184
191
|
- `AWS_REGION` - AWS region containing the CloudWatch RUM app monitors.
|
|
185
192
|
- `AWS_RUM_APP_MONITORS` - JSON object mapping each public application ID to its CloudWatch RUM app-monitor UUID. Values may also be objects with `id`, `name`, `version`, `domain`, and optional resource-policy `alias` fields.
|
|
186
193
|
|
|
187
|
-
The Lambda or server role must allow `rum:PutRumEvents` for the configured app monitors. The same mapping can be supplied programmatically at `aws.rum.appMonitors` using `Config.set()`.
|
|
194
|
+
The Lambda or server role must allow `rum:PutRumEvents` for the configured app monitors. APIs that create tagged monitors must also allow `rum:CreateAppMonitor`, `rum:GetAppMonitor`, `rum:GetAppMonitorData`, and `rum:TagResource`. The same mapping can be supplied programmatically at `aws.rum.appMonitors` using `Config.set()`.
|
|
188
195
|
|
|
189
196
|
Each event includes its sanitized public `appId` in the event details and as the `applicationId` metadata attribute so CloudWatch RUM filters, Logs Insights, and custom dashboards can filter shared-monitor data. Use a separate app monitor per application when AWS-native metrics and access boundaries must remain isolated.
|
|
190
197
|
|
|
@@ -460,13 +467,9 @@ export const addPost = async (context: ApiContext, input: PostInputType): Promis
|
|
|
460
467
|
};
|
|
461
468
|
```
|
|
462
469
|
|
|
463
|
-
##
|
|
464
|
-
|
|
465
|
-
### From Old to New Structure
|
|
470
|
+
## Query Guidelines
|
|
466
471
|
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
**Old way (manual query building):**
|
|
472
|
+
**Avoid manual query building:**
|
|
470
473
|
```typescript
|
|
471
474
|
// Manual string concatenation (avoid this)
|
|
472
475
|
const aqlQry = `FOR p IN posts
|
|
@@ -474,7 +477,7 @@ const aqlQry = `FOR p IN posts
|
|
|
474
477
|
RETURN p`;
|
|
475
478
|
```
|
|
476
479
|
|
|
477
|
-
**
|
|
480
|
+
**Use parameterized queries:**
|
|
478
481
|
```typescript
|
|
479
482
|
// Use AQL template literals for safety
|
|
480
483
|
import {aql} from 'arangojs';
|
|
@@ -500,10 +503,6 @@ const results = await getPostsByLatest(context, {
|
|
|
500
503
|
});
|
|
501
504
|
```
|
|
502
505
|
|
|
503
|
-
### Breaking Changes
|
|
504
|
-
|
|
505
|
-
**None!** All existing functions maintain backward compatibility. The refactoring improves internal structure without changing public APIs.
|
|
506
|
-
|
|
507
506
|
### Best Practices
|
|
508
507
|
|
|
509
508
|
1. **Use parameterized queries**: Always use `aql` template literals
|
|
@@ -576,10 +575,36 @@ describe('User Actions', () => {
|
|
|
576
575
|
|
|
577
576
|
See [Test Utilities Guide](./TEST_UTILITIES_GUIDE.md) for detailed documentation on test helpers.
|
|
578
577
|
|
|
578
|
+
## Releases
|
|
579
|
+
|
|
580
|
+
Releases are automated from Conventional Commit messages when files under
|
|
581
|
+
`packages/reaktor` change on `main`:
|
|
582
|
+
|
|
583
|
+
- `fix:` creates a patch release.
|
|
584
|
+
- `feat:` creates a minor release.
|
|
585
|
+
- `feat!:` or a `BREAKING CHANGE:` footer creates a major release.
|
|
586
|
+
- Other commit types do not create a release by default.
|
|
587
|
+
|
|
588
|
+
Release Please opens a version and changelog pull request. Merging that pull
|
|
589
|
+
request creates the GitHub release and publishes `@nlabs/reaktor` to npm after
|
|
590
|
+
the package test, lint, build, and declaration checks pass. The repository must
|
|
591
|
+
provide an `NPM_TOKEN` Actions secret with publish access to the private package.
|
|
592
|
+
|
|
579
593
|
## Available Action Functions
|
|
580
594
|
|
|
581
595
|
All action functions have been refactored for better modularity and maintainability. Common patterns are now extracted into shared utilities.
|
|
582
596
|
|
|
597
|
+
### Secure billing
|
|
598
|
+
|
|
599
|
+
Use Stripe Checkout to save a card without sending its number, expiration date, or security code through Reaktor. The signed-in user's flow is:
|
|
600
|
+
|
|
601
|
+
1. Call `users.createBillingSetupSession(returnUrl)`.
|
|
602
|
+
2. Redirect the browser to the returned Stripe Checkout URL.
|
|
603
|
+
3. After Stripe returns with `billing=success`, call `users.completeBillingSetupSession(sessionId)` using the returned `session_id`.
|
|
604
|
+
4. Use `users.deleteBillingCard` if the customer removes the saved card.
|
|
605
|
+
|
|
606
|
+
Set `STRIPE_RETURN_URL_ORIGINS` to the comma-separated HTTPS origins allowed to receive Stripe redirects. See the [secure billing guide](./docs/BILLING.md) for complete GraphQL examples, local-development rules, errors, and migration instructions for the removed `addCreditCard` and `saveUserBillingCard` APIs.
|
|
607
|
+
|
|
583
608
|
### Posts
|
|
584
609
|
|
|
585
610
|
```typescript
|
|
@@ -880,7 +905,7 @@ const handler = createGraphqlHandler({
|
|
|
880
905
|
context: {}
|
|
881
906
|
});
|
|
882
907
|
|
|
883
|
-
// Use in an AWS Lambda
|
|
908
|
+
// Use in an AWS Lambda connected to API Gateway HTTP API (payload v2)
|
|
884
909
|
export const lambdaHandler = async (event) => {
|
|
885
910
|
return await handler(event);
|
|
886
911
|
};
|
|
@@ -914,8 +939,7 @@ const handler = createGraphqlHandler({
|
|
|
914
939
|
- You can customize context by passing initial values with `createGraphqlHandler({context})`.
|
|
915
940
|
|
|
916
941
|
#### Typical Integration
|
|
917
|
-
-
|
|
918
|
-
- For Express: call the handler with the request event object.
|
|
942
|
+
- Export the handler from AWS Lambda and wire it to API Gateway HTTP API payload v2 events.
|
|
919
943
|
|
|
920
944
|
See [`src/handlers/graphqlHandler.ts`](./src/handlers/graphqlHandler.ts) for implementation details.
|
|
921
945
|
|
|
@@ -948,6 +972,12 @@ Below is a list of available functions for each main action group. These can be
|
|
|
948
972
|
- getActiveUserCount
|
|
949
973
|
- getUserByToken
|
|
950
974
|
|
|
975
|
+
### Payments
|
|
976
|
+
- completeBillingSetupSession
|
|
977
|
+
- createBillingSetupSession
|
|
978
|
+
- deleteUserBillingCard
|
|
979
|
+
- upgradeUserToPlus
|
|
980
|
+
|
|
951
981
|
### Groups
|
|
952
982
|
- getGroupList
|
|
953
983
|
- getGroupListByUser
|
|
@@ -1418,4 +1448,6 @@ For comprehensive guides and detailed documentation, see:
|
|
|
1418
1448
|
|
|
1419
1449
|
## License
|
|
1420
1450
|
|
|
1421
|
-
|
|
1451
|
+
Reaktor is proprietary commercial software. A valid commercial agreement with
|
|
1452
|
+
Nitrogen Labs, Inc. is required to use, copy, modify, or distribute this
|
|
1453
|
+
package. See [LICENSE](./LICENSE) for the governing terms.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AnalyticsConfigurationType, AnalyticsDashboardType, AnalyticsType, CreateAnalyticsMonitorInputType } from '../types/analytics.types.js';
|
|
2
|
+
import type { ApiContext } from '../types/auth.types.js';
|
|
3
|
+
export declare const getAnalyticsByAppId: (context: ApiContext, appIdInput: string) => Promise<AnalyticsType | null>;
|
|
4
|
+
export declare const getAnalyticsConfiguration: (context: ApiContext, appIdInput: string) => Promise<AnalyticsConfigurationType | null>;
|
|
5
|
+
export declare const getAnalyticsById: (context: ApiContext, analyticsIdInput: string) => Promise<AnalyticsType | null>;
|
|
6
|
+
export declare const createAnalyticsMonitor: (context: ApiContext, input: CreateAnalyticsMonitorInputType) => Promise<AnalyticsType>;
|
|
7
|
+
export declare const regenerateAnalyticsId: (context: ApiContext, analyticsIdInput: string) => Promise<AnalyticsType>;
|
|
8
|
+
export declare const getAvailableAnalytics: (context: ApiContext) => Promise<AnalyticsType[]>;
|
|
9
|
+
export declare const setAnalyticsAccess: (context: ApiContext, analyticsIdInput: string, userIdsInput: readonly string[]) => Promise<AnalyticsType>;
|
|
10
|
+
export declare const getAnalyticsDashboard: (context: ApiContext, analyticsIdInput: string, rangeDaysInput: number) => Promise<AnalyticsDashboardType>;
|