@thescaffold/ntx-apps-bridge 0.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 (291) hide show
  1. package/README.md +1 -0
  2. package/api/attribute/attribute.controller.d.ts +24 -0
  3. package/api/attribute/attribute.controller.js +43 -0
  4. package/api/attribute/attribute.controller.js.map +1 -0
  5. package/api/attribute/attribute.module.d.ts +2 -0
  6. package/api/attribute/attribute.module.js +27 -0
  7. package/api/attribute/attribute.module.js.map +1 -0
  8. package/api/attribute/attribute.service.d.ts +21 -0
  9. package/api/attribute/attribute.service.js +85 -0
  10. package/api/attribute/attribute.service.js.map +1 -0
  11. package/api/attribute/dto/create-attribute.dto.d.ts +8 -0
  12. package/api/attribute/dto/create-attribute.dto.js +48 -0
  13. package/api/attribute/dto/create-attribute.dto.js.map +1 -0
  14. package/api/attribute/dto/update-attribute.dto.d.ts +8 -0
  15. package/api/attribute/dto/update-attribute.dto.js +49 -0
  16. package/api/attribute/dto/update-attribute.dto.js.map +1 -0
  17. package/api/attribute/entities/attribute.entity.d.ts +12 -0
  18. package/api/attribute/entities/attribute.entity.js +62 -0
  19. package/api/attribute/entities/attribute.entity.js.map +1 -0
  20. package/api/attribute/index.d.ts +6 -0
  21. package/api/attribute/index.js +23 -0
  22. package/api/attribute/index.js.map +1 -0
  23. package/api/datacenter/datacenter.controller.d.ts +68 -0
  24. package/api/datacenter/datacenter.controller.js +146 -0
  25. package/api/datacenter/datacenter.controller.js.map +1 -0
  26. package/api/datacenter/datacenter.module.d.ts +2 -0
  27. package/api/datacenter/datacenter.module.js +40 -0
  28. package/api/datacenter/datacenter.module.js.map +1 -0
  29. package/api/datacenter/datacenter.service.d.ts +17 -0
  30. package/api/datacenter/datacenter.service.js +54 -0
  31. package/api/datacenter/datacenter.service.js.map +1 -0
  32. package/api/datacenter/dto/create-datacenter.dto.d.ts +33 -0
  33. package/api/datacenter/dto/create-datacenter.dto.js +160 -0
  34. package/api/datacenter/dto/create-datacenter.dto.js.map +1 -0
  35. package/api/datacenter/dto/update-datacenter.dto.d.ts +3 -0
  36. package/api/datacenter/dto/update-datacenter.dto.js +8 -0
  37. package/api/datacenter/dto/update-datacenter.dto.js.map +1 -0
  38. package/api/datacenter/entities/datacenter.entity.d.ts +23 -0
  39. package/api/datacenter/entities/datacenter.entity.js +96 -0
  40. package/api/datacenter/entities/datacenter.entity.js.map +1 -0
  41. package/api/datacenter/index.d.ts +6 -0
  42. package/api/datacenter/index.js +23 -0
  43. package/api/datacenter/index.js.map +1 -0
  44. package/api/license/dto/create-license.dto.d.ts +8 -0
  45. package/api/license/dto/create-license.dto.js +49 -0
  46. package/api/license/dto/create-license.dto.js.map +1 -0
  47. package/api/license/dto/update-license.dto.d.ts +8 -0
  48. package/api/license/dto/update-license.dto.js +49 -0
  49. package/api/license/dto/update-license.dto.js.map +1 -0
  50. package/api/license/entities/license.entity.d.ts +15 -0
  51. package/api/license/entities/license.entity.js +83 -0
  52. package/api/license/entities/license.entity.js.map +1 -0
  53. package/api/license/index.d.ts +6 -0
  54. package/api/license/index.js +23 -0
  55. package/api/license/index.js.map +1 -0
  56. package/api/license/license.controller.d.ts +20 -0
  57. package/api/license/license.controller.js +41 -0
  58. package/api/license/license.controller.js.map +1 -0
  59. package/api/license/license.module.d.ts +2 -0
  60. package/api/license/license.module.js +27 -0
  61. package/api/license/license.module.js.map +1 -0
  62. package/api/license/license.service.d.ts +17 -0
  63. package/api/license/license.service.js +48 -0
  64. package/api/license/license.service.js.map +1 -0
  65. package/api/license-type/dto/create-license-type.dto.d.ts +14 -0
  66. package/api/license-type/dto/create-license-type.dto.js +87 -0
  67. package/api/license-type/dto/create-license-type.dto.js.map +1 -0
  68. package/api/license-type/dto/update-license-type.dto.d.ts +14 -0
  69. package/api/license-type/dto/update-license-type.dto.js +90 -0
  70. package/api/license-type/dto/update-license-type.dto.js.map +1 -0
  71. package/api/license-type/entities/license-type.entity.d.ts +17 -0
  72. package/api/license-type/entities/license-type.entity.js +130 -0
  73. package/api/license-type/entities/license-type.entity.js.map +1 -0
  74. package/api/license-type/index.d.ts +6 -0
  75. package/api/license-type/index.js +23 -0
  76. package/api/license-type/index.js.map +1 -0
  77. package/api/license-type/license-type.controller.d.ts +28 -0
  78. package/api/license-type/license-type.controller.js +83 -0
  79. package/api/license-type/license-type.controller.js.map +1 -0
  80. package/api/license-type/license-type.module.d.ts +2 -0
  81. package/api/license-type/license-type.module.js +30 -0
  82. package/api/license-type/license-type.module.js.map +1 -0
  83. package/api/license-type/license-type.service.d.ts +13 -0
  84. package/api/license-type/license-type.service.js +46 -0
  85. package/api/license-type/license-type.service.js.map +1 -0
  86. package/api/plan/dto/create-plan.dto.d.ts +8 -0
  87. package/api/plan/dto/create-plan.dto.js +49 -0
  88. package/api/plan/dto/create-plan.dto.js.map +1 -0
  89. package/api/plan/dto/update-plan.dto.d.ts +8 -0
  90. package/api/plan/dto/update-plan.dto.js +49 -0
  91. package/api/plan/dto/update-plan.dto.js.map +1 -0
  92. package/api/plan/entities/plan.entity.d.ts +11 -0
  93. package/api/plan/entities/plan.entity.js +57 -0
  94. package/api/plan/entities/plan.entity.js.map +1 -0
  95. package/api/plan/index.d.ts +6 -0
  96. package/api/plan/index.js +23 -0
  97. package/api/plan/index.js.map +1 -0
  98. package/api/plan/plan.controller.d.ts +20 -0
  99. package/api/plan/plan.controller.js +41 -0
  100. package/api/plan/plan.controller.js.map +1 -0
  101. package/api/plan/plan.module.d.ts +2 -0
  102. package/api/plan/plan.module.js +27 -0
  103. package/api/plan/plan.module.js.map +1 -0
  104. package/api/plan/plan.service.d.ts +17 -0
  105. package/api/plan/plan.service.js +50 -0
  106. package/api/plan/plan.service.js.map +1 -0
  107. package/api/plan-type/dto/create-plan-type.dto.d.ts +15 -0
  108. package/api/plan-type/dto/create-plan-type.dto.js +92 -0
  109. package/api/plan-type/dto/create-plan-type.dto.js.map +1 -0
  110. package/api/plan-type/dto/update-plan-type.dto.d.ts +15 -0
  111. package/api/plan-type/dto/update-plan-type.dto.js +96 -0
  112. package/api/plan-type/dto/update-plan-type.dto.js.map +1 -0
  113. package/api/plan-type/entities/plan-type.entity.d.ts +20 -0
  114. package/api/plan-type/entities/plan-type.entity.js +140 -0
  115. package/api/plan-type/entities/plan-type.entity.js.map +1 -0
  116. package/api/plan-type/index.d.ts +6 -0
  117. package/api/plan-type/index.js +23 -0
  118. package/api/plan-type/index.js.map +1 -0
  119. package/api/plan-type/plan-type.controller.d.ts +25 -0
  120. package/api/plan-type/plan-type.controller.js +49 -0
  121. package/api/plan-type/plan-type.controller.js.map +1 -0
  122. package/api/plan-type/plan-type.module.d.ts +2 -0
  123. package/api/plan-type/plan-type.module.js +30 -0
  124. package/api/plan-type/plan-type.module.js.map +1 -0
  125. package/api/plan-type/plan-type.service.d.ts +17 -0
  126. package/api/plan-type/plan-type.service.js +48 -0
  127. package/api/plan-type/plan-type.service.js.map +1 -0
  128. package/api/preference/dto/create-preference.dto.d.ts +8 -0
  129. package/api/preference/dto/create-preference.dto.js +48 -0
  130. package/api/preference/dto/create-preference.dto.js.map +1 -0
  131. package/api/preference/dto/update-preference.dto.d.ts +8 -0
  132. package/api/preference/dto/update-preference.dto.js +49 -0
  133. package/api/preference/dto/update-preference.dto.js.map +1 -0
  134. package/api/preference/entities/preference.entity.d.ts +12 -0
  135. package/api/preference/entities/preference.entity.js +62 -0
  136. package/api/preference/entities/preference.entity.js.map +1 -0
  137. package/api/preference/index.d.ts +6 -0
  138. package/api/preference/index.js +23 -0
  139. package/api/preference/index.js.map +1 -0
  140. package/api/preference/preference.controller.d.ts +24 -0
  141. package/api/preference/preference.controller.js +43 -0
  142. package/api/preference/preference.controller.js.map +1 -0
  143. package/api/preference/preference.module.d.ts +2 -0
  144. package/api/preference/preference.module.js +27 -0
  145. package/api/preference/preference.module.js.map +1 -0
  146. package/api/preference/preference.service.d.ts +21 -0
  147. package/api/preference/preference.service.js +83 -0
  148. package/api/preference/preference.service.js.map +1 -0
  149. package/api/server/dto/create-server.dto.d.ts +7 -0
  150. package/api/server/dto/create-server.dto.js +45 -0
  151. package/api/server/dto/create-server.dto.js.map +1 -0
  152. package/api/server/dto/update-server.dto.d.ts +7 -0
  153. package/api/server/dto/update-server.dto.js +48 -0
  154. package/api/server/dto/update-server.dto.js.map +1 -0
  155. package/api/server/entities/server.entity.d.ts +10 -0
  156. package/api/server/entities/server.entity.js +55 -0
  157. package/api/server/entities/server.entity.js.map +1 -0
  158. package/api/server/index.d.ts +5 -0
  159. package/api/server/index.js +22 -0
  160. package/api/server/index.js.map +1 -0
  161. package/api/server/server.controller.d.ts +23 -0
  162. package/api/server/server.controller.js +41 -0
  163. package/api/server/server.controller.js.map +1 -0
  164. package/api/server/server.module.d.ts +2 -0
  165. package/api/server/server.module.js +30 -0
  166. package/api/server/server.module.js.map +1 -0
  167. package/api/server/server.service.d.ts +17 -0
  168. package/api/server/server.service.js +48 -0
  169. package/api/server/server.service.js.map +1 -0
  170. package/api/user/dto/create-user.dto.d.ts +7 -0
  171. package/api/user/dto/create-user.dto.js +40 -0
  172. package/api/user/dto/create-user.dto.js.map +1 -0
  173. package/api/user/dto/update-user.dto.d.ts +7 -0
  174. package/api/user/dto/update-user.dto.js +40 -0
  175. package/api/user/dto/update-user.dto.js.map +1 -0
  176. package/api/user/entities/user.entity.d.ts +16 -0
  177. package/api/user/entities/user.entity.js +81 -0
  178. package/api/user/entities/user.entity.js.map +1 -0
  179. package/api/user/index.d.ts +5 -0
  180. package/api/user/index.js +22 -0
  181. package/api/user/index.js.map +1 -0
  182. package/api/user/user.controller.d.ts +22 -0
  183. package/api/user/user.controller.js +40 -0
  184. package/api/user/user.controller.js.map +1 -0
  185. package/api/user/user.module.d.ts +2 -0
  186. package/api/user/user.module.js +27 -0
  187. package/api/user/user.module.js.map +1 -0
  188. package/api/user/user.service.d.ts +17 -0
  189. package/api/user/user.service.js +48 -0
  190. package/api/user/user.service.js.map +1 -0
  191. package/api/webhook/dto/create-webhook.dto.d.ts +7 -0
  192. package/api/webhook/dto/create-webhook.dto.js +45 -0
  193. package/api/webhook/dto/create-webhook.dto.js.map +1 -0
  194. package/api/webhook/dto/update-webhook.dto.d.ts +7 -0
  195. package/api/webhook/dto/update-webhook.dto.js +48 -0
  196. package/api/webhook/dto/update-webhook.dto.js.map +1 -0
  197. package/api/webhook/entities/webhook.entity.d.ts +12 -0
  198. package/api/webhook/entities/webhook.entity.js +59 -0
  199. package/api/webhook/entities/webhook.entity.js.map +1 -0
  200. package/api/webhook/index.d.ts +6 -0
  201. package/api/webhook/index.js +23 -0
  202. package/api/webhook/index.js.map +1 -0
  203. package/api/webhook/webhook.controller.d.ts +24 -0
  204. package/api/webhook/webhook.controller.js +43 -0
  205. package/api/webhook/webhook.controller.js.map +1 -0
  206. package/api/webhook/webhook.module.d.ts +2 -0
  207. package/api/webhook/webhook.module.js +30 -0
  208. package/api/webhook/webhook.module.js.map +1 -0
  209. package/api/webhook/webhook.service.d.ts +17 -0
  210. package/api/webhook/webhook.service.js +48 -0
  211. package/api/webhook/webhook.service.js.map +1 -0
  212. package/api/webhook-log/dto/create-webhook-log.dto.d.ts +9 -0
  213. package/api/webhook-log/dto/create-webhook-log.dto.js +56 -0
  214. package/api/webhook-log/dto/create-webhook-log.dto.js.map +1 -0
  215. package/api/webhook-log/dto/update-webhook-log.dto.d.ts +9 -0
  216. package/api/webhook-log/dto/update-webhook-log.dto.js +60 -0
  217. package/api/webhook-log/dto/update-webhook-log.dto.js.map +1 -0
  218. package/api/webhook-log/entities/webhook-log.entity.d.ts +11 -0
  219. package/api/webhook-log/entities/webhook-log.entity.js +57 -0
  220. package/api/webhook-log/entities/webhook-log.entity.js.map +1 -0
  221. package/api/webhook-log/index.d.ts +6 -0
  222. package/api/webhook-log/index.js +23 -0
  223. package/api/webhook-log/index.js.map +1 -0
  224. package/api/webhook-log/webhook-log.controller.d.ts +19 -0
  225. package/api/webhook-log/webhook-log.controller.js +40 -0
  226. package/api/webhook-log/webhook-log.controller.js.map +1 -0
  227. package/api/webhook-log/webhook-log.module.d.ts +2 -0
  228. package/api/webhook-log/webhook-log.module.js +27 -0
  229. package/api/webhook-log/webhook-log.module.js.map +1 -0
  230. package/api/webhook-log/webhook-log.service.d.ts +17 -0
  231. package/api/webhook-log/webhook-log.service.js +48 -0
  232. package/api/webhook-log/webhook-log.service.js.map +1 -0
  233. package/app.config.d.ts +45 -0
  234. package/app.config.js +70 -0
  235. package/app.config.js.map +1 -0
  236. package/app.controller.d.ts +31 -0
  237. package/app.controller.js +128 -0
  238. package/app.controller.js.map +1 -0
  239. package/app.dto.d.ts +0 -0
  240. package/app.dto.js +1 -0
  241. package/app.dto.js.map +1 -0
  242. package/app.module.d.ts +2 -0
  243. package/app.module.js +96 -0
  244. package/app.module.js.map +1 -0
  245. package/app.service.d.ts +3 -0
  246. package/app.service.js +20 -0
  247. package/app.service.js.map +1 -0
  248. package/index.d.ts +29 -0
  249. package/index.js +68 -0
  250. package/index.js.map +1 -0
  251. package/migrations/1760356231511-BridgeAttribute.d.ts +5 -0
  252. package/migrations/1760356231511-BridgeAttribute.js +33 -0
  253. package/migrations/1760356231511-BridgeAttribute.js.map +1 -0
  254. package/migrations/1760356231581-BridgeDatacenter.d.ts +5 -0
  255. package/migrations/1760356231581-BridgeDatacenter.js +36 -0
  256. package/migrations/1760356231581-BridgeDatacenter.js.map +1 -0
  257. package/migrations/1760356231653-BridgeLicense.d.ts +5 -0
  258. package/migrations/1760356231653-BridgeLicense.js +37 -0
  259. package/migrations/1760356231653-BridgeLicense.js.map +1 -0
  260. package/migrations/1760356231723-BridgeLicenseType.d.ts +5 -0
  261. package/migrations/1760356231723-BridgeLicenseType.js +44 -0
  262. package/migrations/1760356231723-BridgeLicenseType.js.map +1 -0
  263. package/migrations/1760356231827-BridgePlan.d.ts +5 -0
  264. package/migrations/1760356231827-BridgePlan.js +30 -0
  265. package/migrations/1760356231827-BridgePlan.js.map +1 -0
  266. package/migrations/1760356231972-BridgePlanType.d.ts +5 -0
  267. package/migrations/1760356231972-BridgePlanType.js +47 -0
  268. package/migrations/1760356231972-BridgePlanType.js.map +1 -0
  269. package/migrations/1760356232047-BridgePreference.d.ts +5 -0
  270. package/migrations/1760356232047-BridgePreference.js +33 -0
  271. package/migrations/1760356232047-BridgePreference.js.map +1 -0
  272. package/migrations/1760356232120-BridgeServer.d.ts +5 -0
  273. package/migrations/1760356232120-BridgeServer.js +33 -0
  274. package/migrations/1760356232120-BridgeServer.js.map +1 -0
  275. package/migrations/1760356232195-BridgeUser.d.ts +5 -0
  276. package/migrations/1760356232195-BridgeUser.js +34 -0
  277. package/migrations/1760356232195-BridgeUser.js.map +1 -0
  278. package/migrations/1760356232265-BridgeWebhook.d.ts +5 -0
  279. package/migrations/1760356232265-BridgeWebhook.js +32 -0
  280. package/migrations/1760356232265-BridgeWebhook.js.map +1 -0
  281. package/migrations/1760356232333-BridgeWebhookLog.d.ts +5 -0
  282. package/migrations/1760356232333-BridgeWebhookLog.js +29 -0
  283. package/migrations/1760356232333-BridgeWebhookLog.js.map +1 -0
  284. package/migrations/1760357588527-BridgeLicenseTypeData.d.ts +5 -0
  285. package/migrations/1760357588527-BridgeLicenseTypeData.js +262 -0
  286. package/migrations/1760357588527-BridgeLicenseTypeData.js.map +1 -0
  287. package/migrations/index.d.ts +2 -0
  288. package/migrations/index.js +30 -0
  289. package/migrations/index.js.map +1 -0
  290. package/package.json +18 -0
  291. package/tsconfig.lib.tsbuildinfo +1 -0
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ var _a, _b, _c;
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.WebhookLogService = void 0;
17
+ const common_1 = require("@nestjs/common");
18
+ const config_1 = require("@nestjs/config");
19
+ const core_1 = require("@nestjs/core");
20
+ const ntx_core_1 = require("@thescaffold/ntx-core");
21
+ const webhook_log_entity_1 = require("./entities/webhook-log.entity");
22
+ let WebhookLogService = class WebhookLogService extends ntx_core_1.BaseRepository {
23
+ constructor(request, trackerService, configService, languageService, mediaService) {
24
+ super(request, webhook_log_entity_1.WebhookLog);
25
+ this.trackerService = trackerService;
26
+ this.configService = configService;
27
+ this.languageService = languageService;
28
+ this.mediaService = mediaService;
29
+ this[_a] = [{ 'webhook.userId': 'user.id' }];
30
+ this[_b] = [
31
+ { 'webhook.workspaceId': 'workspace.id' },
32
+ ];
33
+ this[_c] = [];
34
+ }
35
+ };
36
+ exports.WebhookLogService = WebhookLogService;
37
+ _a = ntx_core_1.PermissionScopeType.Self;
38
+ _b = ntx_core_1.PermissionScopeType.Workspace;
39
+ _c = ntx_core_1.PermissionScopeType.Global;
40
+ exports.WebhookLogService = WebhookLogService = __decorate([
41
+ (0, common_1.Injectable)({ scope: common_1.Scope.REQUEST }),
42
+ __param(0, (0, common_1.Inject)(core_1.REQUEST)),
43
+ __metadata("design:paramtypes", [Object, ntx_core_1.TrackerService,
44
+ config_1.ConfigService,
45
+ ntx_core_1.LanguageService,
46
+ ntx_core_1.MediaService])
47
+ ], WebhookLogService);
48
+ //# sourceMappingURL=webhook-log.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhook-log.service.js","sourceRoot":"","sources":["../../../../../libs/bridge/src/api/webhook-log/webhook-log.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAA2D;AAC3D,2CAA+C;AAC/C,uCAAuC;AACvC,oDAM+B;AAC/B,sEAA2D;AAGpD,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,yBAA0B;IAS/D,YACmB,OAAY,EACV,cAA8B,EAC9B,aAA4B,EAC5B,eAAgC,EAChC,YAA0B;QAE7C,KAAK,CAAC,OAAO,EAAE,+BAAU,CAAC,CAAC;QALR,mBAAc,GAAd,cAAc,CAAgB;QAC9B,kBAAa,GAAb,aAAa,CAAe;QAC5B,oBAAe,GAAf,eAAe,CAAiB;QAChC,iBAAY,GAAZ,YAAY,CAAc;QAbrC,QAA0B,GAAG,CAAC,EAAE,gBAAgB,EAAE,SAAS,EAAE,CAAC,CAAC;QAE/D,QAA+B,GAAG;YAC1C,EAAE,qBAAqB,EAAE,cAAc,EAAE;SAC1C,CAAC;QAEQ,QAA4B,GAAG,EAAE,CAAC;IAU5C,CAAC;CACF,CAAA;AAlBY,8CAAiB;KACjB,8BAAmB,CAAC,IAAI;KAExB,8BAAmB,CAAC,SAAS;KAI7B,8BAAmB,CAAC,MAAM;4BAP1B,iBAAiB;IAD7B,IAAA,mBAAU,EAAC,EAAE,KAAK,EAAE,cAAK,CAAC,OAAO,EAAE,CAAC;IAWhC,WAAA,IAAA,eAAM,EAAC,cAAO,CAAC,CAAA;6CACmB,yBAAc;QACf,sBAAa;QACX,0BAAe;QAClB,uBAAY;GAdpC,iBAAiB,CAkB7B"}
@@ -0,0 +1,45 @@
1
+ export declare const entityTense: {
2
+ create: string;
3
+ read_one: string;
4
+ read_many: string;
5
+ read: string;
6
+ update: string;
7
+ delete: string;
8
+ };
9
+ export declare const descriptionsFn: {
10
+ default: (entityName: string, action: string, meta: any) => string;
11
+ invite: {
12
+ create: (entityName: string, action: string, meta: any) => string;
13
+ update: (entityName: string, action: string, meta: any) => string;
14
+ delete: (entityName: string, action: string, meta: any) => string;
15
+ };
16
+ workspace: {
17
+ create: (entityName: string, action: string, meta: any) => string;
18
+ update: (entityName: string, action: string, meta: any) => string;
19
+ delete: (entityName: string, action: string, meta: any) => string;
20
+ };
21
+ };
22
+ export declare const descriptions: (entityName: string, action: string) => any;
23
+ export declare enum LogActionType {
24
+ Create = "create",
25
+ Read = "read",
26
+ Update = "update",
27
+ Delete = "delete"
28
+ }
29
+ export declare enum UserAttributeKeyType {
30
+ }
31
+ export declare enum UserAttributeType {
32
+ }
33
+ export declare enum DatacenterPreferenceKeyType {
34
+ }
35
+ export declare const ProtectedUserAttributeType: any[];
36
+ export declare enum DatacenterPreferenceType {
37
+ Default = "default"
38
+ }
39
+ export declare enum UserRefType {
40
+ }
41
+ export declare enum DatacenterStatusType {
42
+ Pending = "pending",
43
+ Failed = "failed",
44
+ Success = "success"
45
+ }
package/app.config.js ADDED
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DatacenterStatusType = exports.UserRefType = exports.DatacenterPreferenceType = exports.ProtectedUserAttributeType = exports.DatacenterPreferenceKeyType = exports.UserAttributeType = exports.UserAttributeKeyType = exports.LogActionType = exports.descriptions = exports.descriptionsFn = exports.entityTense = void 0;
4
+ const ntx_core_1 = require("@thescaffold/ntx-core");
5
+ exports.entityTense = {
6
+ create: 'created',
7
+ read_one: 'read',
8
+ read_many: 'read',
9
+ read: 'read',
10
+ update: 'updated',
11
+ delete: 'removed',
12
+ };
13
+ exports.descriptionsFn = {
14
+ default: (entityName, action, meta) => {
15
+ return ['create', 'update', 'delete'].includes(action)
16
+ ? `${(0, ntx_core_1.titleCase)(entityName)} was ${exports.entityTense[action].toLowerCase()}`
17
+ : null;
18
+ },
19
+ invite: {
20
+ create: (entityName, action, meta) => `Invite sent to ${meta.ref} via ${meta.type}`,
21
+ update: (entityName, action, meta) => `Invite to ${meta.ref} via ${meta.type} has been updated`,
22
+ delete: (entityName, action, meta) => `Invite to ${meta.ref} via ${meta.type} has been remove, you can invite new members to your workspace`,
23
+ },
24
+ workspace: {
25
+ create: (entityName, action, meta) => (meta === null || meta === void 0 ? void 0 : meta.desc)
26
+ ? `A new workspace was created: ${meta.name}, ${meta.name}`
27
+ : `You did not add a description for your new workspace (${meta.name}), you can add it later`,
28
+ update: (entityName, action, meta) => `Workspace was updated`,
29
+ delete: (entityName, action, meta) => `Workspace was remove permanently`,
30
+ },
31
+ };
32
+ const descriptions = (entityName, action) => {
33
+ return exports.descriptionsFn &&
34
+ exports.descriptionsFn[entityName] &&
35
+ exports.descriptionsFn[entityName][action]
36
+ ? exports.descriptionsFn[entityName][action]
37
+ : exports.descriptionsFn.default;
38
+ };
39
+ exports.descriptions = descriptions;
40
+ var LogActionType;
41
+ (function (LogActionType) {
42
+ LogActionType["Create"] = "create";
43
+ LogActionType["Read"] = "read";
44
+ LogActionType["Update"] = "update";
45
+ LogActionType["Delete"] = "delete";
46
+ })(LogActionType || (exports.LogActionType = LogActionType = {}));
47
+ var UserAttributeKeyType;
48
+ (function (UserAttributeKeyType) {
49
+ })(UserAttributeKeyType || (exports.UserAttributeKeyType = UserAttributeKeyType = {}));
50
+ var UserAttributeType;
51
+ (function (UserAttributeType) {
52
+ })(UserAttributeType || (exports.UserAttributeType = UserAttributeType = {}));
53
+ var DatacenterPreferenceKeyType;
54
+ (function (DatacenterPreferenceKeyType) {
55
+ })(DatacenterPreferenceKeyType || (exports.DatacenterPreferenceKeyType = DatacenterPreferenceKeyType = {}));
56
+ exports.ProtectedUserAttributeType = [];
57
+ var DatacenterPreferenceType;
58
+ (function (DatacenterPreferenceType) {
59
+ DatacenterPreferenceType["Default"] = "default";
60
+ })(DatacenterPreferenceType || (exports.DatacenterPreferenceType = DatacenterPreferenceType = {}));
61
+ var UserRefType;
62
+ (function (UserRefType) {
63
+ })(UserRefType || (exports.UserRefType = UserRefType = {}));
64
+ var DatacenterStatusType;
65
+ (function (DatacenterStatusType) {
66
+ DatacenterStatusType["Pending"] = "pending";
67
+ DatacenterStatusType["Failed"] = "failed";
68
+ DatacenterStatusType["Success"] = "success";
69
+ })(DatacenterStatusType || (exports.DatacenterStatusType = DatacenterStatusType = {}));
70
+ //# sourceMappingURL=app.config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app.config.js","sourceRoot":"","sources":["../../../libs/bridge/src/app.config.ts"],"names":[],"mappings":";;;AAAA,oDAAkD;AAErC,QAAA,WAAW,GAAG;IACzB,MAAM,EAAE,SAAS;IACjB,QAAQ,EAAE,MAAM;IAChB,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,SAAS;IACjB,MAAM,EAAE,SAAS;CAClB,CAAC;AAEW,QAAA,cAAc,GAAG;IAC5B,OAAO,EAAE,CAAC,UAAkB,EAAE,MAAc,EAAE,IAAS,EAAE,EAAE;QACzD,OAAO,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC;YACpD,CAAC,CAAC,GAAG,IAAA,oBAAS,EAAC,UAAU,CAAC,QAAQ,mBAAW,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,EAAE;YACrE,CAAC,CAAC,IAAI,CAAC;IACX,CAAC;IACD,MAAM,EAAE;QACN,MAAM,EAAE,CAAC,UAAkB,EAAE,MAAc,EAAE,IAAS,EAAE,EAAE,CACxD,kBAAkB,IAAI,CAAC,GAAG,QAAQ,IAAI,CAAC,IAAI,EAAE;QAI/C,MAAM,EAAE,CAAC,UAAkB,EAAE,MAAc,EAAE,IAAS,EAAE,EAAE,CACxD,aAAa,IAAI,CAAC,GAAG,QAAQ,IAAI,CAAC,IAAI,mBAAmB;QAC3D,MAAM,EAAE,CAAC,UAAkB,EAAE,MAAc,EAAE,IAAS,EAAE,EAAE,CACxD,aAAa,IAAI,CAAC,GAAG,QAAQ,IAAI,CAAC,IAAI,gEAAgE;KACzG;IACD,SAAS,EAAE;QACT,MAAM,EAAE,CAAC,UAAkB,EAAE,MAAc,EAAE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;AACrB,CAAC,EAFW,wBAAwB,wCAAxB,wBAAwB,QAEnC;AAED,IAAY,WAAc;AAA1B,WAAY,WAAW;AAAE,CAAC,EAAd,WAAW,2BAAX,WAAW,QAAG;AAE1B,IAAY,oBAIX;AAJD,WAAY,oBAAoB;IAC9B,2CAAmB,CAAA;IACnB,yCAAiB,CAAA;IACjB,2CAAmB,CAAA;AACrB,CAAC,EAJW,oBAAoB,oCAApB,oBAAoB,QAI/B"}
@@ -0,0 +1,31 @@
1
+ import { Item, LanguageService, MediaService, SyncService, TrackerService } from '@thescaffold/ntx-core';
2
+ import { DatacenterService } from './api/datacenter';
3
+ import { LicenseService } from './api/license';
4
+ import { LicenseTypeService } from './api/license-type';
5
+ import { AppService } from './app.service';
6
+ declare const AppController_base: import("@nestjs/common").Type<import("@thescaffold/ntx-core").AppControllerContract>;
7
+ export declare class AppController extends AppController_base {
8
+ protected readonly languageService: LanguageService;
9
+ protected readonly mediaService: MediaService;
10
+ protected readonly syncService: SyncService;
11
+ private readonly appService;
12
+ private readonly datacenterService;
13
+ private readonly licenseService;
14
+ private readonly licenseTypeService;
15
+ private readonly trackerService;
16
+ subscriptions: {
17
+ 'apps.bridge.license.register': (item: Item) => Promise<void>;
18
+ 'apps.capital.payment.pay': (item: Item) => Promise<void>;
19
+ };
20
+ constructor(languageService: LanguageService, mediaService: MediaService, syncService: SyncService, appService: AppService, datacenterService: DatacenterService, licenseService: LicenseService, licenseTypeService: LicenseTypeService, trackerService: TrackerService);
21
+ getHello(context: any): Promise<{
22
+ status: string;
23
+ title: string;
24
+ message: string;
25
+ data: any;
26
+ meta: any;
27
+ raw: string;
28
+ headers: any;
29
+ }>;
30
+ }
31
+ export {};
@@ -0,0 +1,128 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.AppController = void 0;
16
+ const common_1 = require("@nestjs/common");
17
+ const ntx_core_1 = require("@thescaffold/ntx-core");
18
+ const datacenter_1 = require("./api/datacenter");
19
+ const license_1 = require("./api/license");
20
+ const license_type_1 = require("./api/license-type");
21
+ const app_config_1 = require("./app.config");
22
+ const app_service_1 = require("./app.service");
23
+ let AppController = class AppController extends (0, ntx_core_1.AppControllerFactory)() {
24
+ constructor(languageService, mediaService, syncService, appService, datacenterService, licenseService, licenseTypeService, trackerService) {
25
+ super();
26
+ this.languageService = languageService;
27
+ this.mediaService = mediaService;
28
+ this.syncService = syncService;
29
+ this.appService = appService;
30
+ this.datacenterService = datacenterService;
31
+ this.licenseService = licenseService;
32
+ this.licenseTypeService = licenseTypeService;
33
+ this.trackerService = trackerService;
34
+ this.subscriptions = {
35
+ 'apps.bridge.license.register': async (item) => {
36
+ const { payload } = item;
37
+ const payloads = Array.isArray(payload) ? payload : [payload];
38
+ for (let index = 0; index < payloads.length; index++) {
39
+ const payload = payloads[index];
40
+ const { key, name, desc, detail, type, currency, daily, weekly, monthly, yearly, meta, } = payload;
41
+ await this.licenseTypeService.withContext({}).updateOrCreate({
42
+ key,
43
+ name,
44
+ }, {
45
+ desc,
46
+ detail,
47
+ type,
48
+ currency,
49
+ daily,
50
+ weekly,
51
+ monthly,
52
+ yearly,
53
+ meta,
54
+ });
55
+ }
56
+ },
57
+ 'apps.capital.payment.pay': async (item) => {
58
+ const { source, payload } = item;
59
+ const { status, type: _, plan, payment } = payload;
60
+ const { workspaceId, clientId, userId, amount, currency, meta } = payment;
61
+ const { type, datacenterId, context } = meta;
62
+ if (!['apps.bridge.datacenter.pay'].includes(type)) {
63
+ return;
64
+ }
65
+ const datacenter = await this.datacenterService.withContext({}).findOne({
66
+ where: [{ id: datacenterId }],
67
+ });
68
+ if (status != true) {
69
+ await this.datacenterService.withContext({}).update(datacenter.id, {
70
+ status: app_config_1.DatacenterStatusType.Failed,
71
+ });
72
+ }
73
+ let license = await this.licenseService.withContext(context).findOne({
74
+ where: [{ datacenter: { id: datacenter.id } }],
75
+ });
76
+ if (license) {
77
+ license = await this.licenseService.withContext(context).save({
78
+ typeId: datacenter.meta.licenseType.id,
79
+ periodType: ntx_core_1.PeriodType.MONTHLY,
80
+ token: null,
81
+ startAt: ntx_core_1.time.utc().now().toDate(),
82
+ renewedAt: ntx_core_1.time.utc().now().toDate(),
83
+ expiredAt: ntx_core_1.time.utc().now().add(1, 'month').toDate(),
84
+ });
85
+ }
86
+ await this.datacenterService.withContext(context).update({
87
+ id: datacenter.id,
88
+ }, {
89
+ licenseId: license.id,
90
+ status: app_config_1.DatacenterStatusType.Success,
91
+ });
92
+ this.trackerService.message('apps.identity.attribute.update', {
93
+ type: 'activity',
94
+ key: 'datacenters',
95
+ value: '1',
96
+ action: 'add',
97
+ userId,
98
+ clientId,
99
+ workspaceId,
100
+ });
101
+ },
102
+ };
103
+ }
104
+ async getHello(context) {
105
+ const { preference } = context;
106
+ return (0, ntx_core_1.success)(this.appService.getHello());
107
+ }
108
+ };
109
+ exports.AppController = AppController;
110
+ __decorate([
111
+ (0, common_1.Get)(),
112
+ __param(0, (0, ntx_core_1.GetContext)()),
113
+ __metadata("design:type", Function),
114
+ __metadata("design:paramtypes", [Object]),
115
+ __metadata("design:returntype", Promise)
116
+ ], AppController.prototype, "getHello", null);
117
+ exports.AppController = AppController = __decorate([
118
+ (0, common_1.Controller)(),
119
+ __metadata("design:paramtypes", [ntx_core_1.LanguageService,
120
+ ntx_core_1.MediaService,
121
+ ntx_core_1.SyncService,
122
+ app_service_1.AppService,
123
+ datacenter_1.DatacenterService,
124
+ license_1.LicenseService,
125
+ license_type_1.LicenseTypeService,
126
+ ntx_core_1.TrackerService])
127
+ ], AppController);
128
+ //# sourceMappingURL=app.controller.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app.controller.js","sourceRoot":"","sources":["../../../libs/bridge/src/app.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAiD;AACjD,oDAW+B;AAC/B,iDAAqD;AACrD,2CAA+C;AAC/C,qDAAwD;AACxD,6CAAoD;AACpD,+CAA2C;AAGpC,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,IAAA,+BAAoB,GAAE;IAmGvD,YACqB,eAAgC,EAChC,YAA0B,EAC1B,WAAwB,EAC1B,UAAsB,EACtB,iBAAoC,EACpC,cAA8B,EAC9B,kBAAsC,EACtC,cAA8B;QAE/C,KAAK,EAAE,CAAC;QATW,oBAAe,GAAf,eAAe,CAAiB;QAChC,iBAAY,GAAZ,YAAY,CAAc;QAC1B,gBAAW,GAAX,WAAW,CAAa;QAC1B,eAAU,GAAV,UAAU,CAAY;QACtB,sBAAiB,GAAjB,iBAAiB,CAAmB;QACpC,mBAAc,GAAd,cAAc,CAAgB;QAC9B,uBAAkB,GAAlB,kBAAkB,CAAoB;QACtC,mBAAc,GAAd,cAAc,CAAgB;QA1GjD,kBAAa,GAAG;YACd,8BAA8B,EAAE,KAAK,EAAE,IAAU,EAAE,EAAE;gBACnD,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;gBACzB,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;gBAE9D,KAAK,IAAI,KAAK,G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F,CAAC;gBAEF,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,gCAAgC,EAAE;oBAC5D,IAAI,EAAE,UAAU;oBAChB,GAAG,EAAE,aAAa;oBAClB,KAAK,EAAE,GAAG;oBACV,MAAM,EAAE,KAAK;oBACb,MAAM;oBACN,QAAQ;oBACR,WAAW;iBACZ,CAAC,CAAC;YACL,CAAC;SACF,CAAC;IAaF,CAAC;IAGK,AAAN,KAAK,CAAC,QAAQ,CAAe,OAAY;QACvC,MAAM,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;QAC/B,OAAO,IAAA,kBAAO,EAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC7C,CAAC;CACF,CAAA;AArHY,sCAAa;AAiHlB;IADL,IAAA,YAAG,GAAE;IACU,WAAA,IAAA,qBAAU,GAAE,CAAA;;;;6CAG3B;wBApHU,aAAa;IADzB,IAAA,mBAAU,GAAE;qCAqG2B,0BAAe;QAClB,uBAAY;QACb,sBAAW;QACd,wBAAU;QACH,8BAAiB;QACpB,wBAAc;QACV,iCAAkB;QACtB,yBAAc;GA3GtC,aAAa,CAqHzB"}
package/app.dto.d.ts ADDED
File without changes
package/app.dto.js ADDED
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=app.dto.js.map
package/app.dto.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app.dto.js","sourceRoot":"","sources":["../../../libs/bridge/src/app.dto.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export declare class AppModule {
2
+ }
package/app.module.js ADDED
@@ -0,0 +1,96 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.AppModule = void 0;
10
+ const common_1 = require("@nestjs/common");
11
+ const core_1 = require("@nestjs/core");
12
+ const ntx_core_1 = require("@thescaffold/ntx-core");
13
+ const attribute_1 = require("./api/attribute");
14
+ const datacenter_1 = require("./api/datacenter");
15
+ const license_1 = require("./api/license");
16
+ const license_type_1 = require("./api/license-type");
17
+ const plan_1 = require("./api/plan");
18
+ const plan_type_1 = require("./api/plan-type");
19
+ const preference_1 = require("./api/preference");
20
+ const server_module_1 = require("./api/server/server.module");
21
+ const user_1 = require("./api/user");
22
+ const webhook_1 = require("./api/webhook");
23
+ const webhook_log_1 = require("./api/webhook-log");
24
+ const app_controller_1 = require("./app.controller");
25
+ const app_service_1 = require("./app.service");
26
+ let AppModule = class AppModule {
27
+ };
28
+ exports.AppModule = AppModule;
29
+ exports.AppModule = AppModule = __decorate([
30
+ (0, common_1.Module)({
31
+ imports: [
32
+ ntx_core_1.ServicesModule,
33
+ attribute_1.AttributeModule,
34
+ datacenter_1.DatacenterModule,
35
+ license_1.LicenseModule,
36
+ license_type_1.LicenseTypeModule,
37
+ plan_1.PlanModule,
38
+ plan_type_1.PlanTypeModule,
39
+ preference_1.PreferenceModule,
40
+ server_module_1.ServerModule,
41
+ user_1.UserModule,
42
+ webhook_1.WebhookModule,
43
+ webhook_log_1.WebhookLogModule,
44
+ core_1.RouterModule.register([
45
+ {
46
+ path: 'apps/bridge',
47
+ module: attribute_1.AttributeModule,
48
+ },
49
+ {
50
+ path: 'apps/bridge',
51
+ module: datacenter_1.DatacenterModule,
52
+ },
53
+ {
54
+ path: 'apps/bridge',
55
+ module: license_1.LicenseModule,
56
+ },
57
+ {
58
+ path: 'apps/bridge',
59
+ module: license_type_1.LicenseTypeModule,
60
+ },
61
+ {
62
+ path: 'apps/bridge',
63
+ module: plan_1.PlanModule,
64
+ },
65
+ {
66
+ path: 'apps/bridge',
67
+ module: plan_type_1.PlanTypeModule,
68
+ },
69
+ {
70
+ path: 'apps/bridge',
71
+ module: preference_1.PreferenceModule,
72
+ },
73
+ {
74
+ path: 'apps/bridge',
75
+ module: server_module_1.ServerModule,
76
+ },
77
+ {
78
+ path: 'apps/bridge',
79
+ module: user_1.UserModule,
80
+ },
81
+ {
82
+ path: 'apps/bridge',
83
+ module: webhook_1.WebhookModule,
84
+ },
85
+ {
86
+ path: 'apps/bridge',
87
+ module: webhook_log_1.WebhookLogModule,
88
+ },
89
+ ]),
90
+ ],
91
+ controllers: [app_controller_1.AppController],
92
+ providers: [app_service_1.AppService],
93
+ exports: [app_service_1.AppService],
94
+ })
95
+ ], AppModule);
96
+ //# sourceMappingURL=app.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app.module.js","sourceRoot":"","sources":["../../../libs/bridge/src/app.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,uCAA4C;AAC5C,oDAAuD;AACvD,+CAAkD;AAClD,iDAAoD;AACpD,2CAA8C;AAC9C,qDAAuD;AACvD,qCAAwC;AACxC,+CAAiD;AACjD,iDAAoD;AACpD,8DAA0D;AAC1D,qCAAwC;AACxC,2CAA8C;AAC9C,mDAAqD;AACrD,qDAAiD;AACjD,+CAA2C;AAoEpC,IAAM,SAAS,GAAf,MAAM,SAAS;CAAG,CAAA;AAAZ,8BAAS;oBAAT,SAAS;IAlErB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,yBAAc;YAEd,2BAAe;YACf,6BAAgB;YAChB,uBAAa;YACb,gCAAiB;YACjB,iBAAU;YACV,0BAAc;YACd,6BAAgB;YAChB,4BAAY;YACZ,iBAAU;YACV,uBAAa;YACb,8BAAgB;YAChB,mBAAY,CAAC,QAAQ,CAAC;gBACpB;oBACE,IAAI,EAAE,aAAa;oBACnB,MAAM,EAAE,2BAAe;iBACxB;gBACD;oBACE,IAAI,EAAE,aAAa;oBACnB,MAAM,EAAE,6BAAgB;iBACzB;gBACD;oBACE,IAAI,EAAE,aAAa;oBACnB,MAAM,EAAE,uBAAa;iBACtB;gBACD;oBACE,IAAI,EAAE,aAAa;oBACnB,MAAM,EAAE,gCAAiB;iBAC1B;gBACD;oBACE,IAAI,EAAE,aAAa;oBACnB,MAAM,EAAE,iBAAU;iBACnB;gBACD;oBACE,IAAI,EAAE,aAAa;oBACnB,MAAM,EAAE,0BAAc;iBACvB;gBACD;oBACE,IAAI,EAAE,aAAa;oBACnB,MAAM,EAAE,6BAAgB;iBACzB;gBACD;oBACE,IAAI,EAAE,aAAa;oBACnB,MAAM,EAAE,4BAAY;iBACrB;gBACD;oBACE,IAAI,EAAE,aAAa;oBACnB,MAAM,EAAE,iBAAU;iBACnB;gBACD;oBACE,IAAI,EAAE,aAAa;oBACnB,MAAM,EAAE,uBAAa;iBACtB;gBACD;oBACE,IAAI,EAAE,aAAa;oBACnB,MAAM,EAAE,8BAAgB;iBACzB;aACF,CAAC;SACH;QACD,WAAW,EAAE,CAAC,8BAAa,CAAC;QAC5B,SAAS,EAAE,CAAC,wBAAU,CAAC;QACvB,OAAO,EAAE,CAAC,wBAAU,CAAC;KACtB,CAAC;GACW,SAAS,CAAG"}
@@ -0,0 +1,3 @@
1
+ export declare class AppService {
2
+ getHello(): string;
3
+ }
package/app.service.js ADDED
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.AppService = void 0;
10
+ const common_1 = require("@nestjs/common");
11
+ let AppService = class AppService {
12
+ getHello() {
13
+ return 'Hello World!';
14
+ }
15
+ };
16
+ exports.AppService = AppService;
17
+ exports.AppService = AppService = __decorate([
18
+ (0, common_1.Injectable)()
19
+ ], AppService);
20
+ //# sourceMappingURL=app.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app.service.js","sourceRoot":"","sources":["../../../libs/bridge/src/app.service.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4C;AAGrC,IAAM,UAAU,GAAhB,MAAM,UAAU;IACrB,QAAQ;QACN,OAAO,cAAc,CAAC;IACxB,CAAC;CACF,CAAA;AAJY,gCAAU;qBAAV,UAAU;IADtB,IAAA,mBAAU,GAAE;GACA,UAAU,CAItB"}
package/index.d.ts ADDED
@@ -0,0 +1,29 @@
1
+ import { Attribute } from './api/attribute/entities/attribute.entity';
2
+ import { Datacenter } from './api/datacenter/entities/datacenter.entity';
3
+ import { LicenseType } from './api/license-type/entities/license-type.entity';
4
+ import { License } from './api/license/entities/license.entity';
5
+ import { Plan } from './api/plan/entities/plan.entity';
6
+ import { Preference } from './api/preference/entities/preference.entity';
7
+ import { Server } from './api/server/entities/server.entity';
8
+ import { User } from './api/user/entities/user.entity';
9
+ import { WebhookLog } from './api/webhook-log';
10
+ import { Webhook } from './api/webhook/entities/webhook.entity';
11
+ export * from './app.config';
12
+ export * from './app.module';
13
+ export * from './app.service';
14
+ export * from './migrations';
15
+ export declare const name = "bridge";
16
+ export declare const defaultRolesNPermissions: {
17
+ guest: any[];
18
+ member: string[];
19
+ admin: string[];
20
+ global_member: string[];
21
+ global_admin: string[];
22
+ };
23
+ export declare const entities: (typeof Attribute | typeof User | typeof Plan | typeof Datacenter | typeof Preference | typeof Server | typeof WebhookLog | typeof Webhook | typeof License | typeof LicenseType)[];
24
+ export declare const messages: {};
25
+ export declare const unsafeEventList: any[];
26
+ export declare const subscriptions: string[];
27
+ export declare const paths: string[];
28
+ export declare const jobs: any[];
29
+ export declare const crons: any[];
package/index.js ADDED
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.crons = exports.jobs = exports.paths = exports.subscriptions = exports.unsafeEventList = exports.messages = exports.entities = exports.defaultRolesNPermissions = exports.name = void 0;
18
+ const ntx_core_1 = require("@thescaffold/ntx-core");
19
+ const attribute_entity_1 = require("./api/attribute/entities/attribute.entity");
20
+ const datacenter_entity_1 = require("./api/datacenter/entities/datacenter.entity");
21
+ const license_type_entity_1 = require("./api/license-type/entities/license-type.entity");
22
+ const license_entity_1 = require("./api/license/entities/license.entity");
23
+ const plan_type_entity_1 = require("./api/plan-type/entities/plan-type.entity");
24
+ const plan_entity_1 = require("./api/plan/entities/plan.entity");
25
+ const preference_entity_1 = require("./api/preference/entities/preference.entity");
26
+ const server_entity_1 = require("./api/server/entities/server.entity");
27
+ const user_entity_1 = require("./api/user/entities/user.entity");
28
+ const webhook_log_1 = require("./api/webhook-log");
29
+ const webhook_entity_1 = require("./api/webhook/entities/webhook.entity");
30
+ __exportStar(require("./app.config"), exports);
31
+ __exportStar(require("./app.module"), exports);
32
+ __exportStar(require("./app.service"), exports);
33
+ __exportStar(require("./migrations"), exports);
34
+ exports.name = 'bridge';
35
+ exports.defaultRolesNPermissions = {
36
+ [ntx_core_1.DefaultRoleTypeName.Guest]: [],
37
+ [ntx_core_1.DefaultRoleTypeName.Member]: [
38
+ 'member:create:apps:bridge:*:*:workspace',
39
+ 'member:update:apps:bridge:*:*:self',
40
+ 'member:read:apps:bridge:*:*:workspace',
41
+ 'member:delete:apps:bridge:*:*:self',
42
+ ],
43
+ [ntx_core_1.DefaultRoleTypeName.Admin]: ['admin:*:apps:bridge:*:*:workspace'],
44
+ [ntx_core_1.DefaultRoleTypeName.GlobalMember]: [
45
+ 'global-member:*:apps:bridge:*:*:global',
46
+ ],
47
+ [ntx_core_1.DefaultRoleTypeName.GlobalAdmin]: ['global-admin:*:apps:bridge:*:*:global'],
48
+ };
49
+ exports.entities = [
50
+ attribute_entity_1.Attribute,
51
+ datacenter_entity_1.Datacenter,
52
+ license_entity_1.License,
53
+ license_type_entity_1.LicenseType,
54
+ plan_entity_1.Plan,
55
+ plan_type_entity_1.PlanType,
56
+ preference_entity_1.Preference,
57
+ server_entity_1.Server,
58
+ user_entity_1.User,
59
+ webhook_entity_1.Webhook,
60
+ webhook_log_1.WebhookLog,
61
+ ];
62
+ exports.messages = {};
63
+ exports.unsafeEventList = [];
64
+ exports.subscriptions = ['apps.capital.payment.pay'];
65
+ exports.paths = [`translations/en/ntx/apps/${exports.name}.yaml`];
66
+ exports.jobs = [];
67
+ exports.crons = [];
68
+ //# sourceMappingURL=index.js.map
package/index.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../libs/bridge/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,oDAA4D;AAC5D,gFAAsE;AACtE,mFAAyE;AACzE,yFAA8E;AAC9E,0EAAgE;AAChE,gFAAqE;AACrE,iEAAuD;AACvD,mFAAyE;AACzE,uEAA6D;AAC7D,iEAAuD;AACvD,mDAA+C;AAC/C,0EAAgE;AAEhE,+CAA6B;AAC7B,+CAA6B;AAC7B,gDAA8B;AAC9B,+CAA6B;AAEhB,QAAA,IAAI,GAAG,QAAQ,CAAC;AAEhB,QAAA,wBAAwB,GAAG;IACtC,CAAC,8BAAmB,CAAC,KAAK,CAAC,EAAE,EAAE;IAC/B,CAAC,8BAAmB,CAAC,MAAM,CAAC,EAAE;QAC5B,yCAAyC;QACzC,oCAAoC;QACpC,uCAAuC;QACvC,oCAAoC;KACrC;IACD,CAAC,8BAAmB,CAAC,KAAK,CAAC,EAAE,CAAC,mCAAmC,CAAC;IAClE,CAAC,8BAAmB,CAAC,YAAY,CAAC,EAAE;QAClC,wCAAwC;KACzC;IACD,CAAC,8BAAmB,CAAC,WAAW,CAAC,EAAE,CAAC,uCAAuC,CAAC;CAC7E,CAAC;AAEW,QAAA,QAAQ,GAAG;IACtB,4BAAS;IACT,8BAAU;IACV,wBAAO;IACP,iCAAW;IACX,kBAAI;IACJ,2BAAQ;IACR,8BAAU;IACV,sBAAM;IACN,kBAAI;IACJ,wBAAO;IACP,wBAAU;CACX,CAAC;AAEW,QAAA,QAAQ,GAAG,EAAE,CAAC;AAEd,QAAA,eAAe,GAAG,EAAE,CAAC;AAErB,QAAA,aAAa,GAAG,CAAC,0BAA0B,CAAC,CAAC;AAE7C,QAAA,KAAK,GAAG,CAAC,4BAA4B,YAAI,OAAO,CAAC,CAAC;AAElD,QAAA,IAAI,GAAG,EAAE,CAAC;AAEV,QAAA,KAAK,GAAG,EAAE,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { MigrationInterface, QueryRunner } from 'typeorm';
2
+ export declare class BridgeAttribute1760356231511 implements MigrationInterface {
3
+ up(queryRunner: QueryRunner): Promise<void>;
4
+ down(queryRunner: QueryRunner): Promise<void>;
5
+ }
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BridgeAttribute1760356231511 = void 0;
4
+ class BridgeAttribute1760356231511 {
5
+ async up(queryRunner) {
6
+ await queryRunner.query(`
7
+ CREATE TABLE \`BridgeAttributes\` (
8
+ \`id\` varchar(255) NOT NULL,
9
+ \`createdAt\` datetime(6) DEFAULT NULL,
10
+ \`updatedAt\` datetime(6) DEFAULT NULL,
11
+ \`deletedAt\` datetime(6) DEFAULT NULL,
12
+ \`userId\` varchar(36) NOT NULL,
13
+ \`key\` varchar(52) NOT NULL,
14
+ \`value\` varchar(255) DEFAULT NULL,
15
+ \`type\` varchar(26) DEFAULT NULL,
16
+ \`meta\` json DEFAULT NULL,
17
+ \`status\` varchar(26) DEFAULT NULL,
18
+ PRIMARY KEY (\`id\`),
19
+ KEY \`IDX_aa51aff93d9713800e0b5b0dab\` (\`userId\`),
20
+ KEY \`IDX_b44c1d03ab689a6089522d51a4\` (\`key\`),
21
+ KEY \`IDX_06dbcfb14256fa35937a3f2253\` (\`type\`),
22
+ KEY \`IDX_e85609a8072c870f256283ab5c\` (\`status\`)
23
+ );
24
+ `);
25
+ }
26
+ async down(queryRunner) {
27
+ await queryRunner.query(`
28
+ DROP TABLE IF EXISTS \`BridgeAttributes\`;
29
+ `);
30
+ }
31
+ }
32
+ exports.BridgeAttribute1760356231511 = BridgeAttribute1760356231511;
33
+ //# sourceMappingURL=1760356231511-BridgeAttribute.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1760356231511-BridgeAttribute.js","sourceRoot":"","sources":["../../../../libs/bridge/src/migrations/1760356231511-BridgeAttribute.ts"],"names":[],"mappings":";;;AAEA,MAAa,4BAA4B;IAChC,KAAK,CAAC,EAAE,CAAC,WAAwB;QACtC,MAAM,WAAW,CAAC,KAAK,CAAC;;;;;;;;;;;;;;;;;;KAkBvB,CAAC,CAAC;IACL,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,WAAwB;QACxC,MAAM,WAAW,CAAC,KAAK,CAAC;;KAEvB,CAAC,CAAC;IACL,CAAC;CACF;AA5BD,oEA4BC"}
@@ -0,0 +1,5 @@
1
+ import { MigrationInterface, QueryRunner } from 'typeorm';
2
+ export declare class BridgeDatacenter1760356231581 implements MigrationInterface {
3
+ up(queryRunner: QueryRunner): Promise<void>;
4
+ down(queryRunner: QueryRunner): Promise<void>;
5
+ }