@nathapp/na-cli 1.0.8 → 1.0.10

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 (163) hide show
  1. package/dist/templates/db-schema/.gitlab-ci.yml +139 -0
  2. package/dist/templates/db-schema/Makefile +885 -0
  3. package/dist/templates/k8s-deployment/.gitlab-ci.yml +158 -0
  4. package/dist/templates/k8s-deployment/Makefile +233 -0
  5. package/dist/templates/k8s-deployment/resources/charts/mysql/charts/mysql-install/script/Makefile +12 -0
  6. package/dist/templates/k8s-deployment/resources/charts/redis/charts/redis-install/script/Makefile +8 -0
  7. package/dist/templates/k8s-deployment/services/charts/hooks/charts/pre-delete-rsc/script/Makefile +56 -0
  8. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-cypress/Makefile +9 -0
  9. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/script/Makefile +14 -0
  10. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/tests/_t-0100-readiness-liveness.ts +84 -0
  11. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/tests/hub.ts +372 -0
  12. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/tests/individual-contact.ts +158 -0
  13. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/tests/individual-contract.ts +328 -0
  14. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/tests/individual-kyc.ts +304 -0
  15. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/tests/individual-onboard-app.ts +823 -0
  16. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/tests/individual-onboard-web.ts +493 -0
  17. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/tests/individual-profile.ts +277 -0
  18. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/tests/individual-whitelist.ts +133 -0
  19. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/tests/t-0200-start.ts +172 -0
  20. package/dist/templates/nestjs-api/.dockerignore +9 -0
  21. package/dist/templates/nestjs-api/.env +35 -0
  22. package/dist/templates/nestjs-api/.env.local +5 -29
  23. package/dist/templates/nestjs-api/.gitlab-ci.yml +180 -0
  24. package/dist/templates/nestjs-api/.nvmrc +1 -0
  25. package/dist/templates/nestjs-api/.prettierrc +4 -0
  26. package/dist/templates/nestjs-api/Makefile +95 -0
  27. package/dist/templates/nestjs-api/README.md +15 -0
  28. package/dist/templates/nestjs-api/nest-cli.json +10 -0
  29. package/dist/templates/nestjs-api/ormconfig.ts +16 -0
  30. package/dist/templates/nestjs-api/package.json +9 -9
  31. package/dist/templates/nestjs-api/src/app.controller.spec.ts +24 -0
  32. package/dist/templates/nestjs-api/src/app.controller.ts +27 -0
  33. package/dist/templates/nestjs-api/src/app.module.ts +33 -0
  34. package/dist/templates/nestjs-api/src/app.service.ts +27 -0
  35. package/dist/templates/nestjs-api/src/main.ts +31 -0
  36. package/dist/templates/nestjs-api/test/app.e2e-spec.ts +47 -0
  37. package/dist/templates/nestjs-api/tsconfig.build.json +5 -0
  38. package/dist/templates/nestjs-api/tsconfig.json +28 -0
  39. package/dist/templates/nestjs-api/tsconfig.spec.json +9 -0
  40. package/dist/templates/nestjs-library/.gitlab-ci.yml +134 -0
  41. package/dist/templates/nestjs-library/.nvmrc +1 -0
  42. package/dist/templates/nestjs-library/.prettierrc +6 -0
  43. package/dist/templates/nestjs-library/Makefile +60 -0
  44. package/dist/templates/nestjs-library/lib/index.ts +2 -0
  45. package/dist/templates/nestjs-library/test/app/controller/hello.controller.spec.ts +20 -0
  46. package/dist/templates/nestjs-library/test/app/controller/hello.controller.ts +7 -0
  47. package/dist/templates/nestjs-library/tsconfig.build.json +8 -0
  48. package/dist/templates/nestjs-library/tsconfig.json +21 -0
  49. package/dist/templates/nestjs-library/tsconfig.spec.json +9 -0
  50. package/dist/templates/ts-library/.dockerignore +2 -0
  51. package/dist/templates/ts-library/.eslintrc.js +24 -0
  52. package/dist/templates/ts-library/.gitlab-ci.yml +136 -0
  53. package/dist/templates/ts-library/.prettierrc +6 -0
  54. package/dist/templates/ts-library/Makefile +58 -0
  55. package/dist/templates/ts-library/index.ts +1 -0
  56. package/dist/templates/ts-library/lib/index.ts +1 -0
  57. package/dist/templates/ts-library/lib/samples/index.ts +5 -0
  58. package/dist/templates/ts-library/lib/samples/samples-function.ts +3 -0
  59. package/dist/templates/ts-library/test/sample.e2e-spec.ts +10 -0
  60. package/dist/templates/ts-library/tsconfig.build.json +4 -0
  61. package/dist/templates/ts-library/tsconfig.json +18 -0
  62. package/dist/templates/turbo-nestjs-vuexy/.dockerignore +2 -0
  63. package/dist/templates/turbo-nestjs-vuexy/.gitignore-rename +40 -0
  64. package/dist/templates/turbo-nestjs-vuexy/.npmrc-rename +0 -0
  65. package/dist/templates/turbo-nestjs-vuexy/Makefile +48 -0
  66. package/dist/templates/vuexy-portal/.dockerignore +2 -0
  67. package/dist/templates/vuexy-portal/.env +1 -0
  68. package/dist/templates/vuexy-portal/.gitlab-ci.yml +233 -0
  69. package/dist/templates/vuexy-portal/.npmrc-rename +2 -0
  70. package/dist/templates/vuexy-portal/.nvmrc +1 -0
  71. package/dist/templates/vuexy-portal/Makefile +55 -0
  72. package/dist/templates/vuexy-portal/src/@core/composable/createUrl.ts +20 -0
  73. package/dist/templates/vuexy-portal/src/@core/composable/useCookie.ts +43 -0
  74. package/dist/templates/vuexy-portal/src/@core/composable/useGenerateImageVariant.ts +25 -0
  75. package/dist/templates/vuexy-portal/src/@core/composable/useResponsiveSidebar.ts +29 -0
  76. package/dist/templates/vuexy-portal/src/@core/composable/useSkins.ts +42 -0
  77. package/dist/templates/vuexy-portal/src/@core/enums.ts +21 -0
  78. package/dist/templates/vuexy-portal/src/@core/index.ts +43 -0
  79. package/dist/templates/vuexy-portal/src/@core/initCore.ts +93 -0
  80. package/dist/templates/vuexy-portal/src/@core/libs/apex-chart/apexCharConfig.ts +701 -0
  81. package/dist/templates/vuexy-portal/src/@core/libs/chartjs/chartjsConfig.ts +372 -0
  82. package/dist/templates/vuexy-portal/src/@core/libs/chartjs/components/BarChart.ts +58 -0
  83. package/dist/templates/vuexy-portal/src/@core/libs/chartjs/components/BubbleChart.ts +58 -0
  84. package/dist/templates/vuexy-portal/src/@core/libs/chartjs/components/DoughnutChart.ts +58 -0
  85. package/dist/templates/vuexy-portal/src/@core/libs/chartjs/components/LineChart.ts +58 -0
  86. package/dist/templates/vuexy-portal/src/@core/libs/chartjs/components/PolarAreaChart.ts +58 -0
  87. package/dist/templates/vuexy-portal/src/@core/libs/chartjs/components/RadarChart.ts +58 -0
  88. package/dist/templates/vuexy-portal/src/@core/libs/chartjs/components/ScatterChart.ts +58 -0
  89. package/dist/templates/vuexy-portal/src/@core/stores/config.ts +80 -0
  90. package/dist/templates/vuexy-portal/src/@core/types.ts +49 -0
  91. package/dist/templates/vuexy-portal/src/@core/utils/formatters.ts +48 -0
  92. package/dist/templates/vuexy-portal/src/@core/utils/helpers.ts +32 -0
  93. package/dist/templates/vuexy-portal/src/@core/utils/plugins.ts +53 -0
  94. package/dist/templates/vuexy-portal/src/@core/utils/validators.ts +105 -0
  95. package/dist/templates/vuexy-portal/src/@core/utils/vuetify.ts +13 -0
  96. package/dist/templates/vuexy-portal/src/@custom/composables/toasts.ts +45 -0
  97. package/dist/templates/vuexy-portal/src/@custom/composables/validator.ts +160 -0
  98. package/dist/templates/vuexy-portal/src/@custom/enums/index.ts +0 -0
  99. package/dist/templates/vuexy-portal/src/@custom/types/common.ts +17 -0
  100. package/dist/templates/vuexy-portal/src/@custom/types/index.ts +0 -0
  101. package/dist/templates/vuexy-portal/src/@custom/types/pagination.ts +19 -0
  102. package/dist/templates/vuexy-portal/src/@custom/types/user.ts +5 -0
  103. package/dist/templates/vuexy-portal/src/@custom/utils/formatters.ts +83 -0
  104. package/dist/templates/vuexy-portal/src/@custom/utils/index.ts +0 -0
  105. package/dist/templates/vuexy-portal/src/@custom/utils/validators.ts +51 -0
  106. package/dist/templates/vuexy-portal/src/@layouts/components.ts +11 -0
  107. package/dist/templates/vuexy-portal/src/@layouts/config.ts +43 -0
  108. package/dist/templates/vuexy-portal/src/@layouts/enums.ts +27 -0
  109. package/dist/templates/vuexy-portal/src/@layouts/index.ts +49 -0
  110. package/dist/templates/vuexy-portal/src/@layouts/plugins/casl.ts +48 -0
  111. package/dist/templates/vuexy-portal/src/@layouts/stores/config.ts +115 -0
  112. package/dist/templates/vuexy-portal/src/@layouts/symbols.ts +1 -0
  113. package/dist/templates/vuexy-portal/src/@layouts/types.ts +126 -0
  114. package/dist/templates/vuexy-portal/src/@layouts/utils.ts +180 -0
  115. package/dist/templates/vuexy-portal/src/api/api.ts +1 -0
  116. package/dist/templates/vuexy-portal/src/api/commonApi.ts +25 -0
  117. package/dist/templates/vuexy-portal/src/api/index.ts +58 -0
  118. package/dist/templates/vuexy-portal/src/api/requestInterceptor.ts +21 -0
  119. package/dist/templates/vuexy-portal/src/api/responseInterceptor.ts +52 -0
  120. package/dist/templates/vuexy-portal/src/api/types.ts +14 -0
  121. package/dist/templates/vuexy-portal/src/api/useApi.ts +68 -0
  122. package/dist/templates/vuexy-portal/src/api/useFetchApi.ts +41 -0
  123. package/dist/templates/vuexy-portal/src/api/userApi.ts +11 -0
  124. package/dist/templates/vuexy-portal/src/composables/useApiFetch.ts +48 -0
  125. package/dist/templates/vuexy-portal/src/composables/useJwt.ts +108 -0
  126. package/dist/templates/vuexy-portal/src/main.ts +17 -0
  127. package/dist/templates/vuexy-portal/src/navigation/horizontal/index.ts +5 -0
  128. package/dist/templates/vuexy-portal/src/navigation/index.ts +7 -0
  129. package/dist/templates/vuexy-portal/src/navigation/vertical/index.ts +5 -0
  130. package/dist/templates/vuexy-portal/src/plugins/1.router/additional-routes.ts +23 -0
  131. package/dist/templates/vuexy-portal/src/plugins/1.router/guards.ts +50 -0
  132. package/dist/templates/vuexy-portal/src/plugins/1.router/index.ts +45 -0
  133. package/dist/templates/vuexy-portal/src/plugins/2.pinia.ts +8 -0
  134. package/dist/templates/vuexy-portal/src/plugins/casl/ability.ts +10 -0
  135. package/dist/templates/vuexy-portal/src/plugins/casl/composables/useAbility.ts +4 -0
  136. package/dist/templates/vuexy-portal/src/plugins/casl/index.ts +14 -0
  137. package/dist/templates/vuexy-portal/src/plugins/i18n/index.ts +29 -0
  138. package/dist/templates/vuexy-portal/src/plugins/iconify/build-icons.ts +299 -0
  139. package/dist/templates/vuexy-portal/src/plugins/iconify/index.ts +5 -0
  140. package/dist/templates/vuexy-portal/src/plugins/layouts.ts +13 -0
  141. package/dist/templates/vuexy-portal/src/plugins/toast/index.ts +9 -0
  142. package/dist/templates/vuexy-portal/src/plugins/vuetify/defaults.ts +192 -0
  143. package/dist/templates/vuexy-portal/src/plugins/vuetify/icons.ts +84 -0
  144. package/dist/templates/vuexy-portal/src/plugins/vuetify/index.ts +47 -0
  145. package/dist/templates/vuexy-portal/src/plugins/vuetify/theme.ts +155 -0
  146. package/dist/templates/vuexy-portal/src/plugins/webfontloader.ts +19 -0
  147. package/dist/templates/vuexy-portal/src/stores/auth.ts +22 -0
  148. package/dist/templates/vuexy-portal/src/stores/common.ts +41 -0
  149. package/dist/templates/vuexy-portal/src/stores/index.ts +0 -0
  150. package/dist/templates/vuexy-portal/src/utils/constants.ts +3 -0
  151. package/dist/templates/vuexy-portal/src/utils/paginationMeta.ts +10 -0
  152. package/dist/templates/vuexy-portal/themeConfig.ts +66 -0
  153. package/dist/templates/vuexy-portal/tsconfig.json +86 -0
  154. package/dist/templates/vuexy-portal/vite.config.ts +111 -0
  155. package/dist/utils/jwt-keys.js +26 -0
  156. package/dist/utils/jwt-keys.js.map +1 -0
  157. package/dist/utils/template.js +4 -1
  158. package/dist/utils/template.js.map +1 -1
  159. package/package.json +4 -1
  160. package/alias-script.sh +0 -30
  161. package/bunfig.toml +0 -3
  162. package/nax/config.json +0 -23
  163. package/nax/features/enhancements/prd.json +0 -61
@@ -0,0 +1,277 @@
1
+ 'use strict';
2
+
3
+ import { describe, it } from 'mocha';
4
+ import chai, { expect } from 'chai';
5
+ import chaihttp from 'chai-http';
6
+
7
+ import HubService, { User, challengeIt, goodRet, badRet, serviceUrl, mxwV1ServiceUrl, uploadOSS } from "./hub";
8
+ import { throwError, errors, describeError } from 'mxw-libs-errors';
9
+
10
+ chai.use(chaihttp);
11
+
12
+ let indent = " ";
13
+
14
+ export function profile(user: User, challenge: boolean) {
15
+ describe('Suite: Individual Profile: ' + user.code + " (" + user.email + ")", function () {
16
+ if (challenge) {
17
+ it("Get profile - challenge without JWT", function () {
18
+ let url = serviceUrl("/user/api");
19
+
20
+ return chai.request(url).get("/profile")
21
+ .type("application/json")
22
+ .set("Authorization", "Bearer ")
23
+ .then((res) => {
24
+ badRet(res, "InvalidHeader");
25
+ });
26
+ });
27
+ }
28
+
29
+ it("Get profile", function () {
30
+ let url = serviceUrl("/user/api");
31
+
32
+ return chai.request(url).get("/profile")
33
+ .type("application/json")
34
+ .set("Authorization", "Bearer " + user.jwt)
35
+ .then((res) => {
36
+ goodRet(res);
37
+ expect(res.body).have.property("data").property("userId").is.a("number").eq(user.id);
38
+ expect(res.body).have.property("data").property("email").is.a("string").eq(user.email);
39
+ expect(res.body).have.property("data").property("walletAddress").is.a("string").eq(user.wallet.address);
40
+ });
41
+ });
42
+
43
+ challengeIt("Update profile info", function (params) {
44
+ let url = serviceUrl("/user/api");
45
+
46
+ return chai.request(url).post("/set/profile")
47
+ .type("application/json")
48
+ .set("Authorization", "Bearer " + user.jwt)
49
+ .send(params)
50
+ .then((res) => {
51
+ badRet(res);
52
+ });
53
+ }, {
54
+ nickname: "",
55
+ dialCode: "",
56
+ mobileNo: "",
57
+ profileImg: "",
58
+ lang: "",
59
+ country: "",
60
+ public: "",
61
+ type: ""
62
+ }, challenge);
63
+
64
+ if (challenge) {
65
+ it("Update profile info - challenge without JWT", function () {
66
+ let url = serviceUrl("/user/api");
67
+
68
+ return chai.request(url).post("/set/profile")
69
+ .type("application/json")
70
+ .set("Authorization", "Bearer ")
71
+ .send({
72
+ nickname: user.code,
73
+ dialCode: null,
74
+ mobileNo: null,
75
+ lang: null,
76
+ country: null,
77
+ public: null,
78
+ type: null
79
+ })
80
+ .then((res) => {
81
+ badRet(res, "InvalidHeader");
82
+ });
83
+ });
84
+ }
85
+
86
+ it("Update profile info", function () {
87
+ let url = serviceUrl("/user/api");
88
+
89
+ return chai.request(url).post("/set/profile")
90
+ .type("application/json")
91
+ .set("Authorization", "Bearer " + user.jwt)
92
+ .send({
93
+ nickname: user.code,
94
+ dialCode: null,
95
+ mobileNo: null,
96
+ lang: null,
97
+ country: null,
98
+ public: null,
99
+ type: null
100
+ })
101
+ .then((res) => {
102
+ goodRet(res);
103
+ });
104
+ });
105
+
106
+ it("Verify profile", function () {
107
+ let url = serviceUrl("/user/api");
108
+
109
+ return chai.request(url).get("/profile")
110
+ .type("application/json")
111
+ .set("Authorization", "Bearer " + user.jwt)
112
+ .then((res) => {
113
+ goodRet(res);
114
+ expect(res.body).have.property("data").property("userId").is.a("number").eq(user.id);
115
+ expect(res.body).have.property("data").property("email").is.a("string").eq(user.email);
116
+ expect(res.body).have.property("data").property("walletAddress").is.a("string").eq(user.wallet.address);
117
+ expect(res.body).have.property("data").property("nickname").is.a("string").eq(user.code);
118
+ });
119
+ });
120
+ });
121
+ }
122
+
123
+ export function mainProfile(user: User, challenge: boolean) {
124
+ describe('Suite: Individual Main Profile: ' + user.code + " (" + user.email + ")", function () {
125
+ let profileImgUrl: string;
126
+
127
+ if (challenge) {
128
+ it("Get profile - challenge without JWT", function () {
129
+ let url = mxwV1ServiceUrl("/provider/account/v1");
130
+
131
+ return chai.request(url).get("/getProfile")
132
+ .type("application/json")
133
+ .set("Authorization", "Bearer ")
134
+ .then((res) => {
135
+ badRet(res, "InvalidHeader");
136
+ });
137
+ });
138
+ }
139
+
140
+ it("Get profile", function () {
141
+ let url = mxwV1ServiceUrl("/provider/account/v1");
142
+
143
+ return chai.request(url).get("/getProfile")
144
+ .type("application/json")
145
+ .set("Authorization", "Bearer " + user.mxwJwt)
146
+ .then((res) => {
147
+ goodRet(res);
148
+ expect(res.body).have.property("data").property("userID").is.a("number").is.eq(user.id);
149
+ expect(res.body).have.property("data").property("email").is.a("string").is.eq(user.email);
150
+ expect(res.body).have.property("data").property("nickName").is.a("string");
151
+ expect(res.body).have.property("data").property("walletAddr").is.a("string").is.eq(user.wallet.address);
152
+ });
153
+ });
154
+
155
+ challengeIt("Update profile", function (params) {
156
+ let url = mxwV1ServiceUrl("/provider/account/v1");
157
+
158
+ return chai.request(url).post("/setProfile")
159
+ .type("application/json")
160
+ .set("Authorization", "Bearer " + user.mxwJwt)
161
+ .send(params)
162
+ .then((res) => {
163
+ badRet(res);
164
+ });
165
+ }, {
166
+ alias: null,
167
+ country: "",
168
+ dialCode: null,
169
+ email: "",
170
+ lang: "",
171
+ mobileNo: null,
172
+ nickName: "",
173
+ profileImg: "",
174
+ public: null,
175
+ referralCode: null
176
+ }, challenge);
177
+
178
+ it("Update profile", function () {
179
+ return chai.request(mxwV1ServiceUrl("/provider/account/v1")).post("/setProfile")
180
+ .type("application/json")
181
+ .set("Authorization", "Bearer " + user.mxwJwt)
182
+ .send({
183
+ alias: null,
184
+ country: user.profile.country,
185
+ dialCode: null,
186
+ email: user.email,
187
+ lang: user.profile.language,
188
+ mobileNo: null,
189
+ nickName: user.username,
190
+ profileImg: "Believe me this is a real image url",
191
+ public: 0,
192
+ referralCode: null
193
+ })
194
+ .then((res) => {
195
+ goodRet(res);
196
+ });
197
+ });
198
+
199
+ it("Verify profile", function () {
200
+ let url = mxwV1ServiceUrl("/provider/account/v1");
201
+
202
+ return chai.request(url).get("/getProfile")
203
+ .type("application/json")
204
+ .set("Authorization", "Bearer " + user.mxwJwt)
205
+ .then((res) => {
206
+ goodRet(res);
207
+ expect(res.body).have.property("data").property("userID").is.a("number").is.eq(user.id);
208
+ expect(res.body).have.property("data").property("email").is.a("string").is.eq(user.email);
209
+ expect(res.body).have.property("data").property("nickName").is.a("string").is.eq(user.username);
210
+ expect(res.body).have.property("data").property("walletAddr").is.a("string").is.eq(user.wallet.address);
211
+ expect(res.body).have.property("data").property("country").is.a("string").is.eq(user.profile.country);
212
+ expect(res.body).have.property("data").property("lang").is.a("string").is.eq(user.profile.language);
213
+ expect(res.body).have.property("data").property("public").is.a("number");
214
+
215
+ if (res.body.data.profileImg) {
216
+ console.log("\x1b[33m%s", indent, "WARNING: This overwrite profile image bug is required to patch.", "\x1b[0m");
217
+ }
218
+ else {
219
+ // console.log("\x1b[33m%s", indent, "WARNING: Special error handler is required to remove.", "\x1b[0m");
220
+ }
221
+ });
222
+ });
223
+
224
+ if (challenge) {
225
+ it("Upload profile image - challenge without actionType", function () {
226
+ let url = mxwV1ServiceUrl("/provider/account/v1");
227
+ let params = {
228
+ actionType: ""
229
+ };
230
+
231
+ return uploadOSS(user, url, "/profilePreupload", params, __dirname + "/resources/profile.jpg", "image/png").then((readUrl) => {
232
+ throwError("SHOULD_NOT_REACH_HERE");
233
+ }).catch(error => {
234
+ let { code, message } = describeError(error);
235
+
236
+ if ("InvalidResponse" == code) {
237
+ console.log("\x1b[33m%s", indent, "WARNING: This error is required to patch.", code + ":", message, "\x1b[0m");
238
+ }
239
+ else {
240
+ console.log("\x1b[33m%s", indent, "WARNING: Special error handler is required to remove.", code, ":", message, "\x1b[0m");
241
+ }
242
+ });
243
+ });
244
+ }
245
+
246
+ it("Upload profile image", function () {
247
+ let url = mxwV1ServiceUrl("/provider/account/v1");
248
+ let params = {
249
+ actionType: "PROFILE"
250
+ };
251
+
252
+ return uploadOSS(user, url, "/profilePreupload", params, __dirname + "/resources/profile.jpg", "image/png").then((readUrl) => {
253
+ profileImgUrl = readUrl;
254
+ if (!HubService.Instance.silent) { console.log(indent, "Uploaded main profile image:", profileImgUrl) }
255
+ });
256
+ });
257
+
258
+ it("Verify profile image", function () {
259
+ let url = mxwV1ServiceUrl("/provider/account/v1");
260
+
261
+ return chai.request(url).get("/getProfile")
262
+ .type("application/json")
263
+ .set("Authorization", "Bearer " + user.mxwJwt)
264
+ .then((res) => {
265
+ goodRet(res);
266
+ expect(res.body).have.property("data").property("userID").is.a("number").is.eq(user.id);
267
+ expect(res.body).have.property("data").property("email").is.a("string").is.eq(user.email);
268
+ expect(res.body).have.property("data").property("nickName").is.a("string").is.eq(user.username);
269
+ expect(res.body).have.property("data").property("walletAddr").is.a("string").is.eq(user.wallet.address);
270
+ expect(res.body).have.property("data").property("profileImg").is.a("string").is.eq(profileImgUrl);
271
+ expect(res.body).have.property("data").property("country").is.a("string").is.eq(user.profile.country);
272
+ expect(res.body).have.property("data").property("lang").is.a("string").is.eq(user.profile.language);
273
+ expect(res.body).have.property("data").property("public").is.a("number");
274
+ });
275
+ });
276
+ });
277
+ }
@@ -0,0 +1,133 @@
1
+ 'use strict';
2
+
3
+ import { describe, it } from 'mocha';
4
+ import chai, { expect } from 'chai';
5
+ import chaihttp from 'chai-http';
6
+
7
+ import HubService, { User, goodRet, mxwServiceUrl, mxwV1ServiceUrl } from "./hub";
8
+ import { toUtf8Bytes, sortObject } from 'mxw-libs-utils';
9
+ import { utils, Wallet, auth } from 'mxw-sdk-js';
10
+ import { JsonRpcProvider } from 'mxw-sdk-js/dist/providers';
11
+ import { KYC_FLOW_ID, KYC_TYPE_ID } from './individual-kyc';
12
+
13
+ chai.use(chaihttp);
14
+
15
+ let indent = " ";
16
+
17
+ export function whitelist(user: User, idType: KYC_TYPE_ID, wallet: Wallet, challenge: boolean) {
18
+ describe('Suite: Whitelist Wallet: ' + user.code + " (" + wallet.address + ")", function () {
19
+ it("Get KYC info", function () {
20
+ return chai.request(mxwServiceUrl("/provider/kyc/v2"))
21
+ .get("/getKycInfo")
22
+ .type("application/json")
23
+ .set("Authorization", "Bearer " + user.mxwJwt)
24
+ .query({
25
+ kycId: user.kyc.kycId
26
+ })
27
+ .then((res) => {
28
+ goodRet(res);
29
+ expect(res.body).have.property("data").property("kycStatus").is.a("number");
30
+ user.kyc.status = res.body.data.kycStatus;
31
+ });
32
+ });
33
+
34
+ // it("Initialize Maxonrow user account", function () {
35
+ // let url = mxwServiceUrl("/user/api");
36
+
37
+ // return chai.request(url).post("/initUser")
38
+ // .type("application/json")
39
+ // .set("Authorization", "Bearer " + user.mxwJwt)
40
+ // .send({
41
+ // walletAddress: wallet.address
42
+ // }).then((res) => {
43
+ // console.log(res.body)
44
+ // goodRet(res);
45
+ // expect(res.body).have.property("data").have.property("walletId").is.a("number").greaterThan(0);
46
+ // });
47
+ // });
48
+
49
+ // it("Pre-check", function () {
50
+ // let url = mxwV1ServiceUrl("/provider/kyc-proxy/v1");
51
+
52
+ // return chai.request(url).post("/precheckEx")
53
+ // .type("application/json")
54
+ // .set("Authorization", "Bearer " + user.mxwJwt)
55
+ // .set("app-id", String(HubService.Instance.appId))
56
+ // .send({
57
+ // kycId: user.kyc.kycId,
58
+ // idType,
59
+ // country: user.profile.country,
60
+ // idNo: user.username
61
+ // })
62
+ // .then((res) => {
63
+ // console.log(res.body)
64
+ // goodRet(res);
65
+ // });
66
+ // });
67
+
68
+ it("Submit whitelist transaction", function () {
69
+ if (KYC_FLOW_ID.MANUAL == user.kyc.flow) {
70
+ expect(user.kyc.status).is.a("number").to.be.oneOf([10], "KYC is not submitted");
71
+ this.skip();
72
+ }
73
+
74
+ expect(user.kyc.status).is.a("number").to.be.oneOf([1, 18], "KYC is not approved");
75
+
76
+ return signTransaction(wallet, user.profile.country, String(user.kyc.idType), 0, user.profile.dob, { nonce: "0" }).then((tx) => {
77
+ return chai.request(mxwServiceUrl("/wallet/api")).post("/whitelistWallet")
78
+ .type("application/json")
79
+ .set("Authorization", "Bearer " + user.mxwJwt)
80
+ .send(tx).then((res) => {
81
+ console.log(res.body)
82
+ goodRet(res);
83
+ expect(res.body).have.property("data").property("transactionHash").is.a("string").lengthOf.greaterThan(0);
84
+
85
+ if (res.body.data.ret) {
86
+ console.log("\x1b[33m%s", indent, "WARNING: The response is required to patch.", "\x1b[0m");
87
+ }
88
+ else {
89
+ // console.log("\x1b[33m%s", indent, "WARNING: Special handler is required to remove.", "\x1b[0m");
90
+ }
91
+ return res.body.data.transactionHash;
92
+ }).then((txHash) => {
93
+ if (!HubService.Instance.silent) { console.log(indent, "Whitelisted:", wallet.address, "(" + txHash + ")") }
94
+ });
95
+ });
96
+ });
97
+ });
98
+ }
99
+
100
+ function signTransaction(wallet: Wallet, country?: string, idType?: string, idExpiry?: number, dob?: number, overrides?: any) {
101
+ return auth.Kyc.create(wallet.connect(new JsonRpcProvider("https://"))).then((kyc) => {
102
+ let seed = utils.sha256(toUtf8Bytes(JSON.stringify(sortObject({
103
+ juridical: ["", ""].sort(),
104
+ seed: utils.getHash(utils.randomBytes(32))
105
+ }))));
106
+
107
+ let kycAddress = kyc.getKycAddress({
108
+ country,
109
+ idType,
110
+ id: wallet.address,
111
+ idExpiry,
112
+ dob,
113
+ seed
114
+ });
115
+
116
+ let nonce = (overrides && overrides.nonce) ? overrides.nonce : "0";
117
+
118
+ return kyc.sign(kycAddress, { nonce }).then((tx) => {
119
+ expect(tx).have.property("kyc").property("from").is.a("string").is.eq(wallet.address);
120
+ expect(tx).have.property("kyc").property("kycAddress").is.a("string").lengthOf.greaterThan(0);
121
+ expect(tx).have.property("kyc").property("nonce").is.a("string").is.eq(nonce);
122
+ expect(tx).have.property("pub_key").property("type").is.a("string").lengthOf.greaterThan(0);
123
+ expect(tx).have.property("pub_key").property("value").is.a("string").lengthOf.greaterThan(0);
124
+ expect(tx).have.property("signature").is.a("string").lengthOf.greaterThan(0);
125
+
126
+ return {
127
+ transaction: tx,
128
+ seed,
129
+ publicKey: wallet.publicKey
130
+ };
131
+ });
132
+ });
133
+ }
@@ -0,0 +1,172 @@
1
+ 'use strict';
2
+
3
+ import { describe, it } from 'mocha';
4
+ import chai, { expect } from 'chai';
5
+ import chaihttp from 'chai-http';
6
+
7
+ import { hexlify } from 'mxw-libs-utils';
8
+ import { mxw, utils } from 'mxw-sdk-js';
9
+
10
+ import HubService, { User } from "./hub";
11
+ import { appOnboard, appReauth } from "./individual-onboard-app";
12
+ import { webOnboard, changePassword, webReauth } from "./individual-onboard-web";
13
+ import { profile, mainProfile } from "./individual-profile";
14
+ import { kycByType, KYC_FLOW_ID, KYC_TYPE_ID } from './individual-kyc';
15
+ import { whitelist } from './individual-whitelist';
16
+ import { createContract } from './individual-contract';
17
+ import { createContact } from './individual-contact';
18
+
19
+ chai.use(chaihttp);
20
+
21
+ let indent = " ";
22
+
23
+ describe('Suite: BDSS', function () {
24
+ it("Initialize", function () {
25
+ HubService.Instance.init(true);
26
+ if (!HubService.Instance.silent) { console.log(indent, "app id:", HubService.Instance.appId) }
27
+ });
28
+
29
+ it("Start", function () {
30
+ let infoList = [
31
+ {
32
+ code: "Ali",
33
+ username: "ali." + hexlify(utils.randomBytes(4)).substr(2),
34
+ password: utils.sha256(utils.toUtf8Bytes(hexlify(utils.randomBytes(5)).substr(2))),
35
+ domain: "hello-world.sh",
36
+ wallet: mxw.Wallet.createRandom(),
37
+ challenge: false,
38
+ firstRegisterOnWeb: false,
39
+ profile: {
40
+ language: "ms_MY",
41
+ gender: "M",
42
+ country: "MY",
43
+ dob: 20200101,
44
+ religion: "Islam",
45
+ address: {
46
+ value: "",
47
+ street: "1, Jalan " + hexlify(utils.randomBytes(1)).substr(2) + "/" + hexlify(utils.randomBytes(1)).substr(2) + ", Taman " + hexlify(utils.randomBytes(4)).substr(2),
48
+ postcode: "43000",
49
+ city: "Petaling Jaya",
50
+ state: "Selangor",
51
+ province: "",
52
+ country: "Malaysia"
53
+ }
54
+ },
55
+ kyc: {
56
+ idType: KYC_TYPE_ID.NATIONAL_ID,
57
+ flow: KYC_FLOW_ID.AUTO,
58
+ ocrAlter: false
59
+ }
60
+ },
61
+ {
62
+ code: "AhKao",
63
+ username: "ahkao." + hexlify(utils.randomBytes(4)).substr(2),
64
+ password: hexlify(utils.randomBytes(5)).substr(2),
65
+ domain: "hello-world.sh",
66
+ wallet: mxw.Wallet.createRandom(),
67
+ challenge: false,
68
+ firstRegisterOnWeb: true,
69
+ profile: {
70
+ language: "en_MY",
71
+ gender: "M",
72
+ country: "MY",
73
+ dob: 20200102,
74
+ religion: "Non-Islam",
75
+ address: {
76
+ value: "",
77
+ street: "2, Jalan " + hexlify(utils.randomBytes(1)).substr(2) + "/" + hexlify(utils.randomBytes(1)).substr(2) + ", Taman " + hexlify(utils.randomBytes(4)).substr(2),
78
+ postcode: "57000",
79
+ city: "Kuala Lumpur",
80
+ state: "Kuala Lumpur",
81
+ province: "",
82
+ country: "Malaysia"
83
+ }
84
+ },
85
+ kyc: {
86
+ idType: KYC_TYPE_ID.NATIONAL_ID,
87
+ flow: KYC_FLOW_ID.MANUAL,
88
+ ocrAlter: false
89
+ }
90
+ },
91
+ {
92
+ code: "Muthu",
93
+ username: "muthu." + hexlify(utils.randomBytes(4)).substr(2),
94
+ password: hexlify(utils.randomBytes(5)).substr(2),
95
+ domain: "hello-world.sh",
96
+ wallet: mxw.Wallet.createRandom(),
97
+ challenge: false,
98
+ firstRegisterOnWeb: false,
99
+ profile: {
100
+ language: "ms_MY",
101
+ gender: "M",
102
+ country: "MY",
103
+ dob: 20200103,
104
+ religion: "Non-Islam",
105
+ address: {
106
+ value: "",
107
+ street: "3, Jalan " + hexlify(utils.randomBytes(1)).substr(2) + "/" + hexlify(utils.randomBytes(1)).substr(2) + ", Taman " + hexlify(utils.randomBytes(4)).substr(2),
108
+ postcode: "57000",
109
+ city: "Kuala Lumpur",
110
+ state: "Kuala Lumpur",
111
+ province: "",
112
+ country: "Malaysia"
113
+ }
114
+ },
115
+ kyc: {
116
+ idType: KYC_TYPE_ID.NATIONAL_ID,
117
+ flow: KYC_FLOW_ID.AUTO,
118
+ ocrAlter: true
119
+ }
120
+ }
121
+ ];
122
+
123
+ for (let info of infoList) {
124
+ let user = new User(info.code);
125
+
126
+ user.username = info.username;
127
+ user.password = info.password;
128
+ user.domain = info.domain;
129
+ user.wallet = info.wallet;
130
+ user.loginWallet = mxw.Wallet.fromMnemonic(user.wallet.mnemonic, "m/44'/118'/0'/0/30000");
131
+ user.profile = info.profile;
132
+ user.profile.address.value = user.profile.address.street + " " + user.profile.address.city + " " +
133
+ user.profile.address.postcode + " " + user.profile.address.state + " " + user.profile.address.country
134
+ user.kyc = info.kyc;
135
+
136
+ HubService.Instance.users[user.code] = user;
137
+
138
+ if (info.firstRegisterOnWeb) {
139
+ webOnboard(user, info.challenge);
140
+ appOnboard(user, info.challenge);
141
+ }
142
+ else {
143
+ appOnboard(user, info.challenge);
144
+ webOnboard(user, info.challenge);
145
+ }
146
+ // changePassword(user, info.challenge);
147
+ // mainProfile(user, info.challenge);
148
+ // profile(user, info.challenge);
149
+ kycByType(user, info.kyc.idType, info.kyc.flow, info.challenge);
150
+
151
+ // webReauth(user, info.challenge);
152
+ // appReauth(user, info.challenge);
153
+
154
+ whitelist(user, info.kyc.idType, user.wallet, info.challenge);
155
+ // whitelist(user, info.kyc.idType, user.loginWallet, info.challenge);
156
+ }
157
+
158
+ for (let i = 0; infoList.length > i; i++) {
159
+ let info = infoList[i];
160
+ let user = HubService.Instance.users[info.code];
161
+ let others: User[] = [];
162
+
163
+ for (let a = 0; infoList.length > a; a++) {
164
+ if (a == i) continue;
165
+ others.push(HubService.Instance.users[infoList[a].code]);
166
+ }
167
+
168
+ createContact(user, user, false);
169
+ // createContract(user, user.wallet, others, false);
170
+ }
171
+ });
172
+ });
@@ -0,0 +1,9 @@
1
+ dist
2
+ node_modules
3
+ coverage
4
+
5
+ .tomg-config
6
+ generated
7
+ .pem
8
+ image-digest.txt
9
+ image-tag.txt
@@ -0,0 +1,35 @@
1
+ ## local/dev/development shows Swagger UI at /swagger-ui.html; start:prod sets production
2
+ ENV_NAME=local
3
+ SERVER_PORT=8080
4
+ # SERVER_USE_HELMET=false
5
+ # SERVER_USE_CORS=false
6
+ # SERVER_CORS_ORIGINS=/\.example\.com,http://localhost:5173
7
+ # SERVER_CORS_METHODS=GET,POST,PUT,DELETE,OPTIONS
8
+ # SERVER_CORS_HEADERS=Content-Type,Authorization, Accept, Origin, User-Agent, Cache-Control, Keep-Alive, X-Requested-With, lang
9
+
10
+ GLOBAL_PREFIX=/
11
+
12
+ ## JWT keys are deliberately empty here: never commit key material.
13
+ ## `na gen` writes a fresh key pair for this project into .env.local (gitignored).
14
+ ## For other environments, set them from the deployment's secrets (`make gen-keypair` creates a pair).
15
+ JWT_ACCESS_SECRET=
16
+ JWT_ACCESS_PRIVATEKEY=
17
+ JWT_ACCESS_PUBLICKEY=
18
+ JWT_ACCESS_PASSPHRASE=
19
+ ## for RSA use RS384, SECRET use HS384
20
+ JWT_ACCESS_ALGORITHM=RS256
21
+ JWT_ACCESS_EXPIRE=1h
22
+
23
+ ## only use on auth-api
24
+ # JWT_REFRESH_SECRET=
25
+ # JWT_REFRESH_PRIVATEKEY=
26
+ # JWT_REFRESH_PUBLICKEY=
27
+ # JWT_REFRESH_PASSPHRASE=
28
+ # ## for RSA use RS384, SECRET use HS384
29
+ # JWT_REFRESH_ALGORITHM=RS256
30
+ # JWT_REFRESH_EXPIRE=1d
31
+
32
+ #MONGO_URL=mongodb://root:password@127.0.0.1:27017/mongo?authSource=admin
33
+
34
+ ## used by the TypeORM CLI (ormconfig.ts): bun run migration:*
35
+ MYSQL_URL=mysql://root:password@127.0.0.1:3306/<%= projectName.replace(/-/g, '_') %>
@@ -1,29 +1,5 @@
1
- SERVER_PORT=8080
2
- # SERVER_USE_HELMET=false
3
- # SERVER_USE_CORS=false
4
- # SERVER_CORS_ORIGINS=/\.example\.com,http://localhost:5173
5
- # SERVER_CORS_METHODS=GET,POST,PUT,DELETE,OPTIONS
6
- # SERVER_CORS_HEADERS=Content-Type,Authorization, Accept, Origin, User-Agent, Cache-Control, Keep-Alive, X-Requested-With, lang
7
-
8
- GLOBAL_PREFIX=/
9
-
10
- JWT_ACCESS_SECRET=thisisasecret
11
- JWT_ACCESS_PRIVATEKEY="-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAv7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9BB5sX/L1+EKyzzonOvC\nCGocAWP/TwJvL0Hl6uAHcgcz8nWkL2hH/KimaIRg2CyZ4v6ALGS4lDLshzE4cFrd\nS8VZUxzydO+DKQB80KIs0c7wYvbh9DeRF8Z449q8xh0oms3hYebAOsRxjf8l5rO5\nNntIE2lM+PgKZ5h2OB1HQQKBgQCqSrjL9sPebyVq230AJk7wbyYY1vMSDFixE2p+\nzUrh9pkj6IzLXv8KMwu/4y7+n9/kEhqXxQ4ZejsGGu+x5n7bFjMabBa8V1Dun7fq\nOGWYJp2o0KFbEuuP31yAh2coONL2sGKZjmMi9D71hCs2FG67qwMmbhTeuex8+zUZ\nlOkwLwKBgA1Qf5JHX4GYnd6vbkdME2ltQBnNo83wjME/t8BWk75Sm7vUSXuEJu63\nSbxc9oF8hE44CVSTwoxQTnXzl28QXb0spZsLzbL6heXr4TQQEE+XxmvGN7byxfYv\ntfixUdU5UUIHRID3XZiApiukE/5lMYf3FmXtgeHq0J9ArgHbF1gd\n-----END RSA PRIVATE KEY-----\n"
12
- JWT_ACCESS_PUBLICKEY="-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAv7LDW5t44Z8GNoaTz1iF\n3YF7byIyE0as7Y/F58aFVWFhRC/GmGovJPgm3s6/gOCzxUWtP4URLjWDmGIs2MJe\nbt9GWbXF4Ou5O47DCta75up+ZrqPCoLVOEL1tNUUx/GW+Q/Dd4quiy1SWz7At/BD\nF1y5DUv34C/S3VMR5mxkli1kwqPKzw/ozrc2+JzmoQ0n355utcUVXsU/4ufZ9eQu\nSF2tUUOBZs2nlauYOixz/qrqg+j+3HoJBvmzMTIahXYFEGCjormc2E0kwdz5/0Zf\nYUbAogYH7GZIzXEOZvQedOD8s9JL90i/yEE4L14F3XJsfLo+Krgxz49LBU6KEaGz\nGwIDAQAB\n-----END PUBLIC KEY-----\n"
13
- JWT_ACCESS_PASSPHRASE=
14
- ## for RSA use RS384, SECRET use HS384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p5o8L4JYMR7eGZriFm7A4xBftyINV4W0ptvT\n/S0vOT0CjXrtdz9Adpj/dpkSSiCucCzKZOdm+DEuNT/WBG/GNCWfNiHZxC/qGPOJ\nKwIDAQAB\n-----END PUBLIC KEY-----\n"
22
- # JWT_REFRESH_PASSPHRASE=
23
- # ## for RSA use RS384, SECRET use HS384
24
- # JWT_REFRESH_ALGORITHM=RS256
25
- # JWT_REFRESH_EXPIRE=1d
26
-
27
- #MONGO_URL=mongodb://root:password@127.0.0.1:27017/mongo?authSource=admin
28
-
29
- #MYSQL_URL=mysql://root:password@127.0.0.1:3306/db?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT&pinGlobalTxToPhysicalConnection=true
1
+ ## Local overrides, gitignored. The JWT keys below were generated for this project
2
+ ## by `na gen`; they are dev-only. Never copy them into a deployed environment.
3
+ JWT_ACCESS_SECRET=<%= jwtAccessSecret %>
4
+ JWT_ACCESS_PRIVATEKEY="<%= jwtAccessPrivateKey %>"
5
+ JWT_ACCESS_PUBLICKEY="<%= jwtAccessPublicKey %>"