@thescaffold/ntx-apps-polylog 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 (246) hide show
  1. package/README.md +1 -0
  2. package/api/channel/channel.controller.d.ts +26 -0
  3. package/api/channel/channel.controller.js +49 -0
  4. package/api/channel/channel.controller.js.map +1 -0
  5. package/api/channel/channel.module.d.ts +2 -0
  6. package/api/channel/channel.module.js +30 -0
  7. package/api/channel/channel.module.js.map +1 -0
  8. package/api/channel/channel.service.d.ts +17 -0
  9. package/api/channel/channel.service.js +46 -0
  10. package/api/channel/channel.service.js.map +1 -0
  11. package/api/channel/dto/create-channel.dto.d.ts +14 -0
  12. package/api/channel/dto/create-channel.dto.js +79 -0
  13. package/api/channel/dto/create-channel.dto.js.map +1 -0
  14. package/api/channel/dto/update-channel.dto.d.ts +14 -0
  15. package/api/channel/dto/update-channel.dto.js +81 -0
  16. package/api/channel/dto/update-channel.dto.js.map +1 -0
  17. package/api/channel/entities/channel.entity.d.ts +20 -0
  18. package/api/channel/entities/channel.entity.js +126 -0
  19. package/api/channel/entities/channel.entity.js.map +1 -0
  20. package/api/channel/index.d.ts +6 -0
  21. package/api/channel/index.js +23 -0
  22. package/api/channel/index.js.map +1 -0
  23. package/api/event/dto/create-event.dto.d.ts +12 -0
  24. package/api/event/dto/create-event.dto.js +62 -0
  25. package/api/event/dto/create-event.dto.js.map +1 -0
  26. package/api/event/dto/update-event.dto.d.ts +12 -0
  27. package/api/event/dto/update-event.dto.js +68 -0
  28. package/api/event/dto/update-event.dto.js.map +1 -0
  29. package/api/event/entities/event.entity.d.ts +17 -0
  30. package/api/event/entities/event.entity.js +76 -0
  31. package/api/event/entities/event.entity.js.map +1 -0
  32. package/api/event/event.controller.d.ts +31 -0
  33. package/api/event/event.controller.js +77 -0
  34. package/api/event/event.controller.js.map +1 -0
  35. package/api/event/event.module.d.ts +4 -0
  36. package/api/event/event.module.js +33 -0
  37. package/api/event/event.module.js.map +1 -0
  38. package/api/event/event.service.d.ts +17 -0
  39. package/api/event/event.service.js +46 -0
  40. package/api/event/event.service.js.map +1 -0
  41. package/api/event/index.d.ts +6 -0
  42. package/api/event/index.js +23 -0
  43. package/api/event/index.js.map +1 -0
  44. package/api/event-log/dto/create-event-log.dto.d.ts +8 -0
  45. package/api/event-log/dto/create-event-log.dto.js +48 -0
  46. package/api/event-log/dto/create-event-log.dto.js.map +1 -0
  47. package/api/event-log/dto/update-event-log.dto.d.ts +8 -0
  48. package/api/event-log/dto/update-event-log.dto.js +49 -0
  49. package/api/event-log/dto/update-event-log.dto.js.map +1 -0
  50. package/api/event-log/entities/event-log.entity.d.ts +11 -0
  51. package/api/event-log/entities/event-log.entity.js +54 -0
  52. package/api/event-log/entities/event-log.entity.js.map +1 -0
  53. package/api/event-log/event-log.controller.d.ts +28 -0
  54. package/api/event-log/event-log.controller.js +66 -0
  55. package/api/event-log/event-log.controller.js.map +1 -0
  56. package/api/event-log/event-log.module.d.ts +4 -0
  57. package/api/event-log/event-log.module.js +33 -0
  58. package/api/event-log/event-log.module.js.map +1 -0
  59. package/api/event-log/event-log.service.d.ts +17 -0
  60. package/api/event-log/event-log.service.js +48 -0
  61. package/api/event-log/event-log.service.js.map +1 -0
  62. package/api/event-log/index.d.ts +6 -0
  63. package/api/event-log/index.js +23 -0
  64. package/api/event-log/index.js.map +1 -0
  65. package/api/sink/dto/create-sink.dto.d.ts +13 -0
  66. package/api/sink/dto/create-sink.dto.js +71 -0
  67. package/api/sink/dto/create-sink.dto.js.map +1 -0
  68. package/api/sink/dto/update-sink.dto.d.ts +12 -0
  69. package/api/sink/dto/update-sink.dto.js +68 -0
  70. package/api/sink/dto/update-sink.dto.js.map +1 -0
  71. package/api/sink/entities/sink.entity.d.ts +19 -0
  72. package/api/sink/entities/sink.entity.js +135 -0
  73. package/api/sink/entities/sink.entity.js.map +1 -0
  74. package/api/sink/index.d.ts +6 -0
  75. package/api/sink/index.js +23 -0
  76. package/api/sink/index.js.map +1 -0
  77. package/api/sink/sink.controller.d.ts +25 -0
  78. package/api/sink/sink.controller.js +47 -0
  79. package/api/sink/sink.controller.js.map +1 -0
  80. package/api/sink/sink.module.d.ts +2 -0
  81. package/api/sink/sink.module.js +27 -0
  82. package/api/sink/sink.module.js.map +1 -0
  83. package/api/sink/sink.service.d.ts +17 -0
  84. package/api/sink/sink.service.js +46 -0
  85. package/api/sink/sink.service.js.map +1 -0
  86. package/api/sink-type/dto/create-sink-type.dto.d.ts +14 -0
  87. package/api/sink-type/dto/create-sink-type.dto.js +79 -0
  88. package/api/sink-type/dto/create-sink-type.dto.js.map +1 -0
  89. package/api/sink-type/dto/update-sink-type.dto.d.ts +14 -0
  90. package/api/sink-type/dto/update-sink-type.dto.js +81 -0
  91. package/api/sink-type/dto/update-sink-type.dto.js.map +1 -0
  92. package/api/sink-type/entities/sink-type.entity.d.ts +16 -0
  93. package/api/sink-type/entities/sink-type.entity.js +80 -0
  94. package/api/sink-type/entities/sink-type.entity.js.map +1 -0
  95. package/api/sink-type/index.d.ts +6 -0
  96. package/api/sink-type/index.js +23 -0
  97. package/api/sink-type/index.js.map +1 -0
  98. package/api/sink-type/sink-type.controller.d.ts +21 -0
  99. package/api/sink-type/sink-type.controller.js +40 -0
  100. package/api/sink-type/sink-type.controller.js.map +1 -0
  101. package/api/sink-type/sink-type.module.d.ts +2 -0
  102. package/api/sink-type/sink-type.module.js +27 -0
  103. package/api/sink-type/sink-type.module.js.map +1 -0
  104. package/api/sink-type/sink-type.service.d.ts +13 -0
  105. package/api/sink-type/sink-type.service.js +46 -0
  106. package/api/sink-type/sink-type.service.js.map +1 -0
  107. package/api/source/dto/create-source.dto.d.ts +12 -0
  108. package/api/source/dto/create-source.dto.js +65 -0
  109. package/api/source/dto/create-source.dto.js.map +1 -0
  110. package/api/source/dto/update-source.dto.d.ts +12 -0
  111. package/api/source/dto/update-source.dto.js +68 -0
  112. package/api/source/dto/update-source.dto.js.map +1 -0
  113. package/api/source/entities/source.entity.d.ts +19 -0
  114. package/api/source/entities/source.entity.js +83 -0
  115. package/api/source/entities/source.entity.js.map +1 -0
  116. package/api/source/index.d.ts +6 -0
  117. package/api/source/index.js +23 -0
  118. package/api/source/index.js.map +1 -0
  119. package/api/source/source.controller.d.ts +24 -0
  120. package/api/source/source.controller.js +46 -0
  121. package/api/source/source.controller.js.map +1 -0
  122. package/api/source/source.module.d.ts +2 -0
  123. package/api/source/source.module.js +30 -0
  124. package/api/source/source.module.js.map +1 -0
  125. package/api/source/source.service.d.ts +17 -0
  126. package/api/source/source.service.js +46 -0
  127. package/api/source/source.service.js.map +1 -0
  128. package/api/source-type/dto/create-source-type.dto.d.ts +14 -0
  129. package/api/source-type/dto/create-source-type.dto.js +79 -0
  130. package/api/source-type/dto/create-source-type.dto.js.map +1 -0
  131. package/api/source-type/dto/update-source-type.dto.d.ts +14 -0
  132. package/api/source-type/dto/update-source-type.dto.js +81 -0
  133. package/api/source-type/dto/update-source-type.dto.js.map +1 -0
  134. package/api/source-type/entities/source-type.entity.d.ts +16 -0
  135. package/api/source-type/entities/source-type.entity.js +80 -0
  136. package/api/source-type/entities/source-type.entity.js.map +1 -0
  137. package/api/source-type/index.d.ts +6 -0
  138. package/api/source-type/index.js +23 -0
  139. package/api/source-type/index.js.map +1 -0
  140. package/api/source-type/source-type.controller.d.ts +21 -0
  141. package/api/source-type/source-type.controller.js +40 -0
  142. package/api/source-type/source-type.controller.js.map +1 -0
  143. package/api/source-type/source-type.module.d.ts +2 -0
  144. package/api/source-type/source-type.module.js +27 -0
  145. package/api/source-type/source-type.module.js.map +1 -0
  146. package/api/source-type/source-type.service.d.ts +13 -0
  147. package/api/source-type/source-type.service.js +46 -0
  148. package/api/source-type/source-type.service.js.map +1 -0
  149. package/app.config.d.ts +38 -0
  150. package/app.config.js +48 -0
  151. package/app.config.js.map +1 -0
  152. package/app.controller.d.ts +133 -0
  153. package/app.controller.js +265 -0
  154. package/app.controller.js.map +1 -0
  155. package/app.dto.d.ts +66 -0
  156. package/app.dto.js +288 -0
  157. package/app.dto.js.map +1 -0
  158. package/app.module.d.ts +2 -0
  159. package/app.module.js +74 -0
  160. package/app.module.js.map +1 -0
  161. package/app.service.d.ts +34 -0
  162. package/app.service.js +330 -0
  163. package/app.service.js.map +1 -0
  164. package/index.d.ts +31 -0
  165. package/index.js +80 -0
  166. package/index.js.map +1 -0
  167. package/migrations/1750186475187-Channels.d.ts +5 -0
  168. package/migrations/1750186475187-Channels.js +48 -0
  169. package/migrations/1750186475187-Channels.js.map +1 -0
  170. package/migrations/1750186475261-EventLogs.d.ts +5 -0
  171. package/migrations/1750186475261-EventLogs.js +33 -0
  172. package/migrations/1750186475261-EventLogs.js.map +1 -0
  173. package/migrations/1750186475329-Events.d.ts +5 -0
  174. package/migrations/1750186475329-Events.js +47 -0
  175. package/migrations/1750186475329-Events.js.map +1 -0
  176. package/migrations/1750186475466-Sinks.d.ts +5 -0
  177. package/migrations/1750186475466-Sinks.js +46 -0
  178. package/migrations/1750186475466-Sinks.js.map +1 -0
  179. package/migrations/1750186475532-SinkTypes.d.ts +5 -0
  180. package/migrations/1750186475532-SinkTypes.js +39 -0
  181. package/migrations/1750186475532-SinkTypes.js.map +1 -0
  182. package/migrations/1750186475601-Sources.d.ts +5 -0
  183. package/migrations/1750186475601-Sources.js +46 -0
  184. package/migrations/1750186475601-Sources.js.map +1 -0
  185. package/migrations/1750186475675-SourceTypes.d.ts +5 -0
  186. package/migrations/1750186475675-SourceTypes.js +39 -0
  187. package/migrations/1750186475675-SourceTypes.js.map +1 -0
  188. package/migrations/1750186762829-SourceTypeData.d.ts +5 -0
  189. package/migrations/1750186762829-SourceTypeData.js +85 -0
  190. package/migrations/1750186762829-SourceTypeData.js.map +1 -0
  191. package/migrations/1750186762911-SinkTypeData.d.ts +5 -0
  192. package/migrations/1750186762911-SinkTypeData.js +34 -0
  193. package/migrations/1750186762911-SinkTypeData.js.map +1 -0
  194. package/migrations/1750186762995-SinkData.d.ts +5 -0
  195. package/migrations/1750186762995-SinkData.js +34 -0
  196. package/migrations/1750186762995-SinkData.js.map +1 -0
  197. package/migrations/1750186763062-ChannelData.d.ts +5 -0
  198. package/migrations/1750186763062-ChannelData.js +43 -0
  199. package/migrations/1750186763062-ChannelData.js.map +1 -0
  200. package/migrations/1750186763130-SourceData.d.ts +5 -0
  201. package/migrations/1750186763130-SourceData.js +29 -0
  202. package/migrations/1750186763130-SourceData.js.map +1 -0
  203. package/migrations/index.d.ts +2 -0
  204. package/migrations/index.js +30 -0
  205. package/migrations/index.js.map +1 -0
  206. package/package.json +18 -0
  207. package/pkg/middleware/auth.middleware.d.ts +13 -0
  208. package/pkg/middleware/auth.middleware.js +70 -0
  209. package/pkg/middleware/auth.middleware.js.map +1 -0
  210. package/pkg/pipeline/index.d.ts +3 -0
  211. package/pkg/pipeline/index.js +20 -0
  212. package/pkg/pipeline/index.js.map +1 -0
  213. package/pkg/pipeline/pipeline.module.d.ts +2 -0
  214. package/pkg/pipeline/pipeline.module.js +33 -0
  215. package/pkg/pipeline/pipeline.module.js.map +1 -0
  216. package/pkg/pipeline/pipeline.service.d.ts +40 -0
  217. package/pkg/pipeline/pipeline.service.js +203 -0
  218. package/pkg/pipeline/pipeline.service.js.map +1 -0
  219. package/pkg/pipeline/xformer.service.d.ts +3 -0
  220. package/pkg/pipeline/xformer.service.js +19 -0
  221. package/pkg/pipeline/xformer.service.js.map +1 -0
  222. package/pkg/sinks/at.sms.sink.d.ts +4 -0
  223. package/pkg/sinks/at.sms.sink.js +18 -0
  224. package/pkg/sinks/at.sms.sink.js.map +1 -0
  225. package/pkg/sinks/form.sink.d.ts +7 -0
  226. package/pkg/sinks/form.sink.js +26 -0
  227. package/pkg/sinks/form.sink.js.map +1 -0
  228. package/pkg/sinks/index.d.ts +7 -0
  229. package/pkg/sinks/index.js +18 -0
  230. package/pkg/sinks/index.js.map +1 -0
  231. package/pkg/sinks/mailchimp.email.sink.d.ts +8 -0
  232. package/pkg/sinks/mailchimp.email.sink.js +40 -0
  233. package/pkg/sinks/mailchimp.email.sink.js.map +1 -0
  234. package/pkg/sinks/mailgun.email.sink.d.ts +8 -0
  235. package/pkg/sinks/mailgun.email.sink.js +40 -0
  236. package/pkg/sinks/mailgun.email.sink.js.map +1 -0
  237. package/pkg/sinks/sendgrid.email.sink.d.ts +8 -0
  238. package/pkg/sinks/sendgrid.email.sink.js +49 -0
  239. package/pkg/sinks/sendgrid.email.sink.js.map +1 -0
  240. package/pkg/sinks/sink.contract.d.ts +10 -0
  241. package/pkg/sinks/sink.contract.js +3 -0
  242. package/pkg/sinks/sink.contract.js.map +1 -0
  243. package/pkg/sinks/webhook.sink.d.ts +9 -0
  244. package/pkg/sinks/webhook.sink.js +67 -0
  245. package/pkg/sinks/webhook.sink.js.map +1 -0
  246. package/tsconfig.lib.tsbuildinfo +1 -0
@@ -0,0 +1,46 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.SourceController = void 0;
13
+ const common_1 = require("@nestjs/common");
14
+ const ntx_core_1 = require("@thescaffold/ntx-core");
15
+ const create_source_dto_1 = require("./dto/create-source.dto");
16
+ const update_source_dto_1 = require("./dto/update-source.dto");
17
+ const source_entity_1 = require("./entities/source.entity");
18
+ const source_service_1 = require("./source.service");
19
+ let SourceController = class SourceController extends (0, ntx_core_1.CrudControllerFactory)(create_source_dto_1.CreateSourceDto, update_source_dto_1.UpdateSourceDto, source_entity_1.Source) {
20
+ constructor(sourceService, languageService, mediaService) {
21
+ super();
22
+ this.sourceService = sourceService;
23
+ this.languageService = languageService;
24
+ this.mediaService = mediaService;
25
+ this.name = 'source';
26
+ this.searchable = ['name', 'desc'];
27
+ this.service = this.sourceService;
28
+ this.unique = ({ workspaceId, name }) => [{ workspaceId, name }];
29
+ this.morphRequest = (entity) => entity;
30
+ this.hooks = {
31
+ [ntx_core_1.CrudActionType.beforeCreate]: async (payload, context) => {
32
+ const { preference } = context;
33
+ const { user, client, workspace } = context;
34
+ return Object.assign(Object.assign({}, payload), { userId: user.id, clientId: client.id, workspaceId: workspace.id });
35
+ },
36
+ };
37
+ }
38
+ };
39
+ exports.SourceController = SourceController;
40
+ exports.SourceController = SourceController = __decorate([
41
+ (0, common_1.Controller)('source'),
42
+ __metadata("design:paramtypes", [source_service_1.SourceService,
43
+ ntx_core_1.LanguageService,
44
+ ntx_core_1.MediaService])
45
+ ], SourceController);
46
+ //# sourceMappingURL=source.controller.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source.controller.js","sourceRoot":"","sources":["../../../../../libs/polylog/src/api/source/source.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,oDAK+B;AAC/B,+DAA0D;AAC1D,+DAA0D;AAC1D,4DAAkD;AAClD,qDAAiD;AAG1C,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,IAAA,gCAAqB,EAIzD,mCAAe,EAAE,mCAAe,EAAE,sBAAM,CAAC;IAoBzC,YACmB,aAA4B,EAC1B,eAAgC,EAChC,YAA0B;QAE7C,KAAK,EAAE,CAAC;QAJS,kBAAa,GAAb,aAAa,CAAe;QAC1B,oBAAe,GAAf,eAAe,CAAiB;QAChC,iBAAY,GAAZ,YAAY,CAAc;QAtBrC,SAAI,GAAG,QAAQ,CAAC;QAChB,eAAU,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC9B,YAAO,GAAG,IAAI,CAAC,aAAa,CAAC;QAC7B,WAAM,GAAG,CAAC,EAAE,WAAW,EAAE,IAAI,EAAU,EAAE,EAAE,CAAC,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;QACpE,iBAAY,GAAG,CAAC,MAAc,EAAE,EAAE,CAAC,MAAM,CAAC;QAC1C,UAAK,GAAG;YAChB,CAAC,yBAAc,CAAC,YAAY,CAAC,EAAE,KAAK,EAAE,OAAY,EAAE,OAAY,EAAE,EAAE;gBAClE,MAAM,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;gBAC/B,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC;gBAE5C,uCACK,OAAO,KACV,MAAM,EAAE,IAAI,CAAC,EAAE,EACf,QAAQ,EAAE,MAAM,CAAC,EAAE,EACnB,WAAW,EAAE,SAAS,CAAC,EAAE,IACzB;YACJ,CAAC;SACF,CAAC;IAQF,CAAC;CACF,CAAA;AA/BY,4CAAgB;2BAAhB,gBAAgB;IAD5B,IAAA,mBAAU,EAAC,QAAQ,CAAC;qCA0Be,8BAAa;QACT,0BAAe;QAClB,uBAAY;GA3BpC,gBAAgB,CA+B5B"}
@@ -0,0 +1,2 @@
1
+ export declare class SourceModule {
2
+ }
@@ -0,0 +1,30 @@
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.SourceModule = void 0;
10
+ const common_1 = require("@nestjs/common");
11
+ const typeorm_1 = require("@nestjs/typeorm");
12
+ const ntx_core_1 = require("@thescaffold/ntx-core");
13
+ const source_entity_1 = require("./entities/source.entity");
14
+ const source_controller_1 = require("./source.controller");
15
+ const source_service_1 = require("./source.service");
16
+ let SourceModule = class SourceModule {
17
+ };
18
+ exports.SourceModule = SourceModule;
19
+ exports.SourceModule = SourceModule = __decorate([
20
+ (0, common_1.Module)({
21
+ imports: [
22
+ typeorm_1.TypeOrmModule.forFeature([source_entity_1.Source]),
23
+ (0, common_1.forwardRef)(() => ntx_core_1.ServicesModule),
24
+ ],
25
+ controllers: [source_controller_1.SourceController],
26
+ providers: [source_service_1.SourceService],
27
+ exports: [source_service_1.SourceService],
28
+ })
29
+ ], SourceModule);
30
+ //# sourceMappingURL=source.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source.module.js","sourceRoot":"","sources":["../../../../../libs/polylog/src/api/source/source.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAoD;AACpD,6CAAgD;AAChD,oDAAuD;AACvD,4DAAkD;AAClD,2DAAuD;AACvD,qDAAiD;AAW1C,IAAM,YAAY,GAAlB,MAAM,YAAY;CAAG,CAAA;AAAf,oCAAY;uBAAZ,YAAY;IATxB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,uBAAa,CAAC,UAAU,CAAC,CAAC,sBAAM,CAAC,CAAC;YAClC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,yBAAc,CAAC;SACjC;QACD,WAAW,EAAE,CAAC,oCAAgB,CAAC;QAC/B,SAAS,EAAE,CAAC,8BAAa,CAAC;QAC1B,OAAO,EAAE,CAAC,8BAAa,CAAC;KACzB,CAAC;GACW,YAAY,CAAG"}
@@ -0,0 +1,17 @@
1
+ import { ConfigService } from '@nestjs/config';
2
+ import { BaseRepository, LanguageService, MediaService, PermissionScopeType, TrackerService } from '@thescaffold/ntx-core';
3
+ import { Source } from './entities/source.entity';
4
+ export declare class SourceService extends BaseRepository<Source> {
5
+ protected readonly trackerService: TrackerService;
6
+ protected readonly configService: ConfigService;
7
+ protected readonly languageService: LanguageService;
8
+ protected readonly mediaService: MediaService;
9
+ protected [PermissionScopeType.Self]: {
10
+ userId: string;
11
+ }[];
12
+ protected [PermissionScopeType.Workspace]: {
13
+ workspaceId: string;
14
+ }[];
15
+ protected [PermissionScopeType.Global]: any[];
16
+ constructor(request: any, trackerService: TrackerService, configService: ConfigService, languageService: LanguageService, mediaService: MediaService);
17
+ }
@@ -0,0 +1,46 @@
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.SourceService = 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 source_entity_1 = require("./entities/source.entity");
22
+ let SourceService = class SourceService extends ntx_core_1.BaseRepository {
23
+ constructor(request, trackerService, configService, languageService, mediaService) {
24
+ super(request, source_entity_1.Source);
25
+ this.trackerService = trackerService;
26
+ this.configService = configService;
27
+ this.languageService = languageService;
28
+ this.mediaService = mediaService;
29
+ this[_a] = [{ userId: 'user.id' }];
30
+ this[_b] = [{ workspaceId: 'workspace.id' }];
31
+ this[_c] = [];
32
+ }
33
+ };
34
+ exports.SourceService = SourceService;
35
+ _a = ntx_core_1.PermissionScopeType.Self;
36
+ _b = ntx_core_1.PermissionScopeType.Workspace;
37
+ _c = ntx_core_1.PermissionScopeType.Global;
38
+ exports.SourceService = SourceService = __decorate([
39
+ (0, common_1.Injectable)({ scope: common_1.Scope.REQUEST }),
40
+ __param(0, (0, common_1.Inject)(core_1.REQUEST)),
41
+ __metadata("design:paramtypes", [Object, ntx_core_1.TrackerService,
42
+ config_1.ConfigService,
43
+ ntx_core_1.LanguageService,
44
+ ntx_core_1.MediaService])
45
+ ], SourceService);
46
+ //# sourceMappingURL=source.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source.service.js","sourceRoot":"","sources":["../../../../../libs/polylog/src/api/source/source.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAA2D;AAC3D,2CAA+C;AAC/C,uCAAuC;AACvC,oDAM+B;AAC/B,4DAAkD;AAG3C,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,yBAAsB;IAOvD,YACmB,OAAY,EACV,cAA8B,EAC9B,aAA4B,EAC5B,eAAgC,EAChC,YAA0B;QAE7C,KAAK,CAAC,OAAO,EAAE,sBAAM,CAAC,CAAC;QALJ,mBAAc,GAAd,cAAc,CAAgB;QAC9B,kBAAa,GAAb,aAAa,CAAe;QAC5B,oBAAe,GAAf,eAAe,CAAiB;QAChC,iBAAY,GAAZ,YAAY,CAAc;QAXrC,QAA0B,GAAG,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;QAErD,QAA+B,GAAG,CAAC,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC,CAAC;QAEpE,QAA4B,GAAG,EAAE,CAAC;IAU5C,CAAC;CACF,CAAA;AAhBY,sCAAa;KACb,8BAAmB,CAAC,IAAI;KAExB,8BAAmB,CAAC,SAAS;KAE7B,8BAAmB,CAAC,MAAM;wBAL1B,aAAa;IADzB,IAAA,mBAAU,EAAC,EAAE,KAAK,EAAE,cAAK,CAAC,OAAO,EAAE,CAAC;IAShC,WAAA,IAAA,eAAM,EAAC,cAAO,CAAC,CAAA;6CACmB,yBAAc;QACf,sBAAa;QACX,0BAAe;QAClB,uBAAY;GAZpC,aAAa,CAgBzB"}
@@ -0,0 +1,14 @@
1
+ import { CategoryType } from '@thescaffold/ntx-core';
2
+ import { VisibilityType } from '../../../app.config';
3
+ export declare class CreateSourceTypeDto {
4
+ category: CategoryType;
5
+ key?: string;
6
+ visibility?: VisibilityType;
7
+ name: string;
8
+ desc?: string;
9
+ detail?: string;
10
+ thumbnailUrl?: string;
11
+ bannerUrl?: string;
12
+ tags?: string[];
13
+ meta?: any;
14
+ }
@@ -0,0 +1,79 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.CreateSourceTypeDto = void 0;
13
+ const swagger_1 = require("@nestjs/swagger");
14
+ const ntx_core_1 = require("@thescaffold/ntx-core");
15
+ const class_validator_1 = require("class-validator");
16
+ const app_config_1 = require("../../../app.config");
17
+ class CreateSourceTypeDto {
18
+ }
19
+ exports.CreateSourceTypeDto = CreateSourceTypeDto;
20
+ __decorate([
21
+ (0, class_validator_1.IsEnum)(ntx_core_1.CategoryType),
22
+ (0, swagger_1.ApiProperty)(),
23
+ __metadata("design:type", String)
24
+ ], CreateSourceTypeDto.prototype, "category", void 0);
25
+ __decorate([
26
+ (0, class_validator_1.IsString)(),
27
+ (0, class_validator_1.IsOptional)(),
28
+ (0, swagger_1.ApiPropertyOptional)(),
29
+ __metadata("design:type", String)
30
+ ], CreateSourceTypeDto.prototype, "key", void 0);
31
+ __decorate([
32
+ (0, class_validator_1.IsEnum)(app_config_1.VisibilityType),
33
+ (0, class_validator_1.IsOptional)(),
34
+ (0, swagger_1.ApiPropertyOptional)(),
35
+ __metadata("design:type", String)
36
+ ], CreateSourceTypeDto.prototype, "visibility", void 0);
37
+ __decorate([
38
+ (0, class_validator_1.IsString)(),
39
+ (0, swagger_1.ApiProperty)(),
40
+ __metadata("design:type", String)
41
+ ], CreateSourceTypeDto.prototype, "name", void 0);
42
+ __decorate([
43
+ (0, class_validator_1.IsOptional)(),
44
+ (0, class_validator_1.IsString)(),
45
+ (0, swagger_1.ApiPropertyOptional)(),
46
+ __metadata("design:type", String)
47
+ ], CreateSourceTypeDto.prototype, "desc", void 0);
48
+ __decorate([
49
+ (0, class_validator_1.IsString)(),
50
+ (0, class_validator_1.IsOptional)(),
51
+ (0, swagger_1.ApiPropertyOptional)(),
52
+ __metadata("design:type", String)
53
+ ], CreateSourceTypeDto.prototype, "detail", void 0);
54
+ __decorate([
55
+ (0, class_validator_1.IsString)(),
56
+ (0, class_validator_1.IsOptional)(),
57
+ (0, swagger_1.ApiPropertyOptional)(),
58
+ __metadata("design:type", String)
59
+ ], CreateSourceTypeDto.prototype, "thumbnailUrl", void 0);
60
+ __decorate([
61
+ (0, class_validator_1.IsString)(),
62
+ (0, class_validator_1.IsOptional)(),
63
+ (0, swagger_1.ApiPropertyOptional)(),
64
+ __metadata("design:type", String)
65
+ ], CreateSourceTypeDto.prototype, "bannerUrl", void 0);
66
+ __decorate([
67
+ (0, class_validator_1.IsArray)(),
68
+ (0, class_validator_1.IsString)({ each: true }),
69
+ (0, class_validator_1.IsOptional)(),
70
+ (0, swagger_1.ApiPropertyOptional)(),
71
+ __metadata("design:type", Array)
72
+ ], CreateSourceTypeDto.prototype, "tags", void 0);
73
+ __decorate([
74
+ (0, class_validator_1.IsObject)(),
75
+ (0, class_validator_1.IsOptional)(),
76
+ (0, swagger_1.ApiPropertyOptional)(),
77
+ __metadata("design:type", Object)
78
+ ], CreateSourceTypeDto.prototype, "meta", void 0);
79
+ //# sourceMappingURL=create-source-type.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-source-type.dto.js","sourceRoot":"","sources":["../../../../../../libs/polylog/src/api/source-type/dto/create-source-type.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAmE;AACnE,oDAAqD;AACrD,qDAMyB;AACzB,oDAAqD;AAErD,MAAa,mBAAmB;CAiD/B;AAjDD,kDAiDC;AA9CC;IAFC,IAAA,wBAAM,EAAC,uBAAY,CAAC;IACpB,IAAA,qBAAW,GAAE;;qDACS;AAKvB;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;gDACT;AAKb;IAHC,IAAA,wBAAM,EAAC,2BAAc,CAAC;IACtB,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;uDACM;AAI5B;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,GAAE;;iDACD;AAKb;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,6BAAmB,GAAE;;iDACR;AAKd;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;mDACN;AAKhB;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;yDACA;AAKtB;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;sDACH;AAMnB;IAJC,IAAA,yBAAO,GAAE;IACT,IAAA,0BAAQ,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IACxB,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;iDACN;AAKhB;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;iDACX"}
@@ -0,0 +1,14 @@
1
+ import { CategoryType } from '@thescaffold/ntx-core';
2
+ import { VisibilityType } from '../../../app.config';
3
+ export declare class UpdateSourceTypeDto {
4
+ category?: CategoryType;
5
+ key?: string;
6
+ visibility?: VisibilityType;
7
+ name?: string;
8
+ desc?: string;
9
+ detail?: string;
10
+ thumbnailUrl?: string;
11
+ bannerUrl?: string;
12
+ tags?: string[];
13
+ meta?: any;
14
+ }
@@ -0,0 +1,81 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.UpdateSourceTypeDto = void 0;
13
+ const swagger_1 = require("@nestjs/swagger");
14
+ const ntx_core_1 = require("@thescaffold/ntx-core");
15
+ const class_validator_1 = require("class-validator");
16
+ const app_config_1 = require("../../../app.config");
17
+ class UpdateSourceTypeDto {
18
+ }
19
+ exports.UpdateSourceTypeDto = UpdateSourceTypeDto;
20
+ __decorate([
21
+ (0, class_validator_1.IsEnum)(ntx_core_1.CategoryType),
22
+ (0, class_validator_1.IsOptional)(),
23
+ (0, swagger_1.ApiPropertyOptional)(),
24
+ __metadata("design:type", String)
25
+ ], UpdateSourceTypeDto.prototype, "category", void 0);
26
+ __decorate([
27
+ (0, class_validator_1.IsString)(),
28
+ (0, class_validator_1.IsOptional)(),
29
+ (0, swagger_1.ApiPropertyOptional)(),
30
+ __metadata("design:type", String)
31
+ ], UpdateSourceTypeDto.prototype, "key", void 0);
32
+ __decorate([
33
+ (0, class_validator_1.IsEnum)(app_config_1.VisibilityType),
34
+ (0, class_validator_1.IsOptional)(),
35
+ (0, swagger_1.ApiPropertyOptional)(),
36
+ __metadata("design:type", String)
37
+ ], UpdateSourceTypeDto.prototype, "visibility", void 0);
38
+ __decorate([
39
+ (0, class_validator_1.IsOptional)(),
40
+ (0, class_validator_1.IsString)(),
41
+ (0, swagger_1.ApiPropertyOptional)(),
42
+ __metadata("design:type", String)
43
+ ], UpdateSourceTypeDto.prototype, "name", void 0);
44
+ __decorate([
45
+ (0, class_validator_1.IsOptional)(),
46
+ (0, class_validator_1.IsString)(),
47
+ (0, swagger_1.ApiPropertyOptional)(),
48
+ __metadata("design:type", String)
49
+ ], UpdateSourceTypeDto.prototype, "desc", void 0);
50
+ __decorate([
51
+ (0, class_validator_1.IsString)(),
52
+ (0, class_validator_1.IsOptional)(),
53
+ (0, swagger_1.ApiPropertyOptional)(),
54
+ __metadata("design:type", String)
55
+ ], UpdateSourceTypeDto.prototype, "detail", void 0);
56
+ __decorate([
57
+ (0, class_validator_1.IsString)(),
58
+ (0, class_validator_1.IsOptional)(),
59
+ (0, swagger_1.ApiPropertyOptional)(),
60
+ __metadata("design:type", String)
61
+ ], UpdateSourceTypeDto.prototype, "thumbnailUrl", void 0);
62
+ __decorate([
63
+ (0, class_validator_1.IsString)(),
64
+ (0, class_validator_1.IsOptional)(),
65
+ (0, swagger_1.ApiPropertyOptional)(),
66
+ __metadata("design:type", String)
67
+ ], UpdateSourceTypeDto.prototype, "bannerUrl", void 0);
68
+ __decorate([
69
+ (0, class_validator_1.IsArray)(),
70
+ (0, class_validator_1.IsString)({ each: true }),
71
+ (0, class_validator_1.IsOptional)(),
72
+ (0, swagger_1.ApiPropertyOptional)(),
73
+ __metadata("design:type", Array)
74
+ ], UpdateSourceTypeDto.prototype, "tags", void 0);
75
+ __decorate([
76
+ (0, class_validator_1.IsObject)(),
77
+ (0, class_validator_1.IsOptional)(),
78
+ (0, swagger_1.ApiPropertyOptional)(),
79
+ __metadata("design:type", Object)
80
+ ], UpdateSourceTypeDto.prototype, "meta", void 0);
81
+ //# sourceMappingURL=update-source-type.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-source-type.dto.js","sourceRoot":"","sources":["../../../../../../libs/polylog/src/api/source-type/dto/update-source-type.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAsD;AACtD,oDAAqD;AACrD,qDAMyB;AACzB,oDAAqD;AAErD,MAAa,mBAAmB;CAmD/B;AAnDD,kDAmDC;AA/CC;IAHC,IAAA,wBAAM,EAAC,uBAAY,CAAC;IACpB,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;qDACE;AAKxB;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;gDACT;AAKb;IAHC,IAAA,wBAAM,EAAC,2BAAc,CAAC;IACtB,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;uDACM;AAK5B;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,6BAAmB,GAAE;;iDACR;AAKd;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,6BAAmB,GAAE;;iDACR;AAKd;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;mDACN;AAKhB;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;yDACA;AAKtB;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;sDACH;AAMnB;IAJC,IAAA,yBAAO,GAAE;IACT,IAAA,0BAAQ,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IACxB,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;iDACN;AAKhB;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;iDACX"}
@@ -0,0 +1,16 @@
1
+ import { BaseEntity, CategoryType } from '@thescaffold/ntx-core';
2
+ import { VisibilityType } from '../../../app.config';
3
+ import { Source } from '../../source/entities/source.entity';
4
+ export declare class SourceType extends BaseEntity {
5
+ category: CategoryType;
6
+ key?: string;
7
+ visibility?: VisibilityType;
8
+ name: string;
9
+ desc?: string;
10
+ detail?: string;
11
+ thumbnailUrl?: string;
12
+ bannerUrl?: string;
13
+ tags?: string[];
14
+ meta?: any;
15
+ sources?: Source[];
16
+ }
@@ -0,0 +1,80 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.SourceType = void 0;
13
+ const ntx_core_1 = require("@thescaffold/ntx-core");
14
+ const typeorm_1 = require("typeorm");
15
+ const app_config_1 = require("../../../app.config");
16
+ const source_entity_1 = require("../../source/entities/source.entity");
17
+ let SourceType = class SourceType extends ntx_core_1.BaseEntity {
18
+ };
19
+ exports.SourceType = SourceType;
20
+ __decorate([
21
+ (0, typeorm_1.Column)('varchar', { name: 'category', length: 52 }),
22
+ __metadata("design:type", String)
23
+ ], SourceType.prototype, "category", void 0);
24
+ __decorate([
25
+ (0, typeorm_1.Column)('varchar', { name: 'key', length: 52, nullable: true }),
26
+ __metadata("design:type", String)
27
+ ], SourceType.prototype, "key", void 0);
28
+ __decorate([
29
+ (0, typeorm_1.Column)('varchar', { name: 'visibility', nullable: true, length: 52 }),
30
+ __metadata("design:type", String)
31
+ ], SourceType.prototype, "visibility", void 0);
32
+ __decorate([
33
+ (0, typeorm_1.Column)('varchar', { name: 'name', length: 255 }),
34
+ __metadata("design:type", String)
35
+ ], SourceType.prototype, "name", void 0);
36
+ __decorate([
37
+ (0, typeorm_1.Column)('varchar', { name: 'desc', nullable: true, length: 255 }),
38
+ __metadata("design:type", String)
39
+ ], SourceType.prototype, "desc", void 0);
40
+ __decorate([
41
+ (0, typeorm_1.Column)('text', { name: 'detail', nullable: true }),
42
+ __metadata("design:type", String)
43
+ ], SourceType.prototype, "detail", void 0);
44
+ __decorate([
45
+ (0, typeorm_1.Column)('varchar', {
46
+ name: 'thumbnailUrl',
47
+ length: 255,
48
+ nullable: true,
49
+ }),
50
+ __metadata("design:type", String)
51
+ ], SourceType.prototype, "thumbnailUrl", void 0);
52
+ __decorate([
53
+ (0, typeorm_1.Column)('varchar', {
54
+ name: 'bannerUrl',
55
+ length: 255,
56
+ nullable: true,
57
+ }),
58
+ __metadata("design:type", String)
59
+ ], SourceType.prototype, "bannerUrl", void 0);
60
+ __decorate([
61
+ (0, typeorm_1.Column)('json', { name: 'tags', nullable: true }),
62
+ __metadata("design:type", Array)
63
+ ], SourceType.prototype, "tags", void 0);
64
+ __decorate([
65
+ (0, typeorm_1.Column)('json', { name: 'meta', nullable: true }),
66
+ __metadata("design:type", Object)
67
+ ], SourceType.prototype, "meta", void 0);
68
+ __decorate([
69
+ (0, typeorm_1.OneToMany)((type) => source_entity_1.Source, (source) => source.type),
70
+ __metadata("design:type", Array)
71
+ ], SourceType.prototype, "sources", void 0);
72
+ exports.SourceType = SourceType = __decorate([
73
+ (0, typeorm_1.Entity)({
74
+ name: 'PolylogSourceTypes',
75
+ orderBy: {
76
+ createdAt: 'DESC',
77
+ },
78
+ })
79
+ ], SourceType);
80
+ //# sourceMappingURL=source-type.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source-type.entity.js","sourceRoot":"","sources":["../../../../../../libs/polylog/src/api/source-type/entities/source-type.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiE;AACjE,qCAAoD;AACpD,oDAAqD;AACrD,uEAA6D;AAQtD,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,qBAAU;CAyCzC,CAAA;AAzCY,gCAAU;AAErB;IADC,IAAA,gBAAM,EAAC,SAAS,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;;4CAC7B;AAGvB;IADC,IAAA,gBAAM,EAAC,SAAS,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uCAClD;AAGb;IADC,IAAA,gBAAM,EAAC,SAAS,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;;8CAC1C;AAG5B;IADC,IAAA,gBAAM,EAAC,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;;wCACpC;AAGb;IADC,IAAA,gBAAM,EAAC,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;;wCACnD;AAGd;IADC,IAAA,gBAAM,EAAC,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACnC;AAOhB;IALC,IAAA,gBAAM,EAAC,SAAS,EAAE;QACjB,IAAI,EAAE,cAAc;QACpB,MAAM,EAAE,GAAG;QACX,QAAQ,EAAE,IAAI;KACf,CAAC;;gDACoB;AAOtB;IALC,IAAA,gBAAM,EAAC,SAAS,EAAE;QACjB,IAAI,EAAE,WAAW;QACjB,MAAM,EAAE,GAAG;QACX,QAAQ,EAAE,IAAI;KACf,CAAC;;6CACiB;AAGnB;IADC,IAAA,gBAAM,EAAC,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wCACjC;AAGhB;IADC,IAAA,gBAAM,EAAC,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wCACtC;AAGX;IADC,IAAA,mBAAS,EAAC,CAAC,IAAI,EAAE,EAAE,CAAC,sBAAM,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC;;2CAClC;qBAxCR,UAAU;IANtB,IAAA,gBAAM,EAAC;QACN,IAAI,EAAE,oBAAoB;QAC1B,OAAO,EAAE;YACP,SAAS,EAAE,MAAM;SAClB;KACF,CAAC;GACW,UAAU,CAyCtB"}
@@ -0,0 +1,6 @@
1
+ export * from './dto/create-source-type.dto';
2
+ export * from './dto/update-source-type.dto';
3
+ export * from './entities/source-type.entity';
4
+ export * from './source-type.controller';
5
+ export * from './source-type.service';
6
+ export * from './source-type.module';
@@ -0,0 +1,23 @@
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
+ __exportStar(require("./dto/create-source-type.dto"), exports);
18
+ __exportStar(require("./dto/update-source-type.dto"), exports);
19
+ __exportStar(require("./entities/source-type.entity"), exports);
20
+ __exportStar(require("./source-type.controller"), exports);
21
+ __exportStar(require("./source-type.service"), exports);
22
+ __exportStar(require("./source-type.module"), exports);
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/polylog/src/api/source-type/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+DAA6C;AAC7C,+DAA6C;AAC7C,gEAA8C;AAC9C,2DAAyC;AACzC,wDAAsC;AACtC,uDAAqC"}
@@ -0,0 +1,21 @@
1
+ import { LanguageService, MediaService } from '@thescaffold/ntx-core';
2
+ import { CreateSourceTypeDto } from './dto/create-source-type.dto';
3
+ import { UpdateSourceTypeDto } from './dto/update-source-type.dto';
4
+ import { SourceType } from './entities/source-type.entity';
5
+ import { SourceTypeService } from './source-type.service';
6
+ declare const SourceTypeController_base: import("@nestjs/common").Type<import("@thescaffold/ntx-core").CrudControllerContract<SourceType, CreateSourceTypeDto, UpdateSourceTypeDto>>;
7
+ export declare class SourceTypeController extends SourceTypeController_base {
8
+ private readonly sourceTypeService;
9
+ protected readonly languageService: LanguageService;
10
+ protected readonly mediaService: MediaService;
11
+ protected name: string;
12
+ protected searchable: string[];
13
+ protected service: SourceTypeService;
14
+ protected unique: ({ name }: SourceType) => {
15
+ name: string;
16
+ }[];
17
+ protected morphRequest: (entity: SourceType) => SourceType;
18
+ protected hooks: {};
19
+ constructor(sourceTypeService: SourceTypeService, languageService: LanguageService, mediaService: MediaService);
20
+ }
21
+ export {};
@@ -0,0 +1,40 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.SourceTypeController = void 0;
13
+ const common_1 = require("@nestjs/common");
14
+ const ntx_core_1 = require("@thescaffold/ntx-core");
15
+ const create_source_type_dto_1 = require("./dto/create-source-type.dto");
16
+ const update_source_type_dto_1 = require("./dto/update-source-type.dto");
17
+ const source_type_entity_1 = require("./entities/source-type.entity");
18
+ const source_type_service_1 = require("./source-type.service");
19
+ let SourceTypeController = class SourceTypeController extends (0, ntx_core_1.CrudControllerFactory)(create_source_type_dto_1.CreateSourceTypeDto, update_source_type_dto_1.UpdateSourceTypeDto, source_type_entity_1.SourceType) {
20
+ constructor(sourceTypeService, languageService, mediaService) {
21
+ super();
22
+ this.sourceTypeService = sourceTypeService;
23
+ this.languageService = languageService;
24
+ this.mediaService = mediaService;
25
+ this.name = 'source group';
26
+ this.searchable = ['name', 'desc', 'tags'];
27
+ this.service = this.sourceTypeService;
28
+ this.unique = ({ name }) => [{ name }];
29
+ this.morphRequest = (entity) => entity;
30
+ this.hooks = {};
31
+ }
32
+ };
33
+ exports.SourceTypeController = SourceTypeController;
34
+ exports.SourceTypeController = SourceTypeController = __decorate([
35
+ (0, common_1.Controller)('source-type'),
36
+ __metadata("design:paramtypes", [source_type_service_1.SourceTypeService,
37
+ ntx_core_1.LanguageService,
38
+ ntx_core_1.MediaService])
39
+ ], SourceTypeController);
40
+ //# sourceMappingURL=source-type.controller.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source-type.controller.js","sourceRoot":"","sources":["../../../../../libs/polylog/src/api/source-type/source-type.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,oDAI+B;AAC/B,yEAAmE;AACnE,yEAAmE;AACnE,sEAA2D;AAC3D,+DAA0D;AAGnD,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,IAAA,gCAAqB,EAI7D,4CAAmB,EAAE,4CAAmB,EAAE,+BAAU,CAAC;IAQrD,YACmB,iBAAoC,EAClC,eAAgC,EAChC,YAA0B;QAE7C,KAAK,EAAE,CAAC;QAJS,sBAAiB,GAAjB,iBAAiB,CAAmB;QAClC,oBAAe,GAAf,eAAe,CAAiB;QAChC,iBAAY,GAAZ,YAAY,CAAc;QAVrC,SAAI,GAAG,cAAc,CAAC;QACtB,eAAU,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;QACtC,YAAO,GAAG,IAAI,CAAC,iBAAiB,CAAC;QACjC,WAAM,GAAG,CAAC,EAAE,IAAI,EAAc,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC;QAC9C,iBAAY,GAAG,CAAC,MAAkB,EAAE,EAAE,CAAC,MAAM,CAAC;QAC9C,UAAK,GAAG,EAAE,CAAC;IAQrB,CAAC;CACF,CAAA;AAnBY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,mBAAU,EAAC,aAAa,CAAC;qCAcc,uCAAiB;QACjB,0BAAe;QAClB,uBAAY;GAfpC,oBAAoB,CAmBhC"}
@@ -0,0 +1,2 @@
1
+ export declare class SourceTypeModule {
2
+ }
@@ -0,0 +1,27 @@
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.SourceTypeModule = void 0;
10
+ const common_1 = require("@nestjs/common");
11
+ const typeorm_1 = require("@nestjs/typeorm");
12
+ const ntx_core_1 = require("@thescaffold/ntx-core");
13
+ const source_type_entity_1 = require("./entities/source-type.entity");
14
+ const source_type_controller_1 = require("./source-type.controller");
15
+ const source_type_service_1 = require("./source-type.service");
16
+ let SourceTypeModule = class SourceTypeModule {
17
+ };
18
+ exports.SourceTypeModule = SourceTypeModule;
19
+ exports.SourceTypeModule = SourceTypeModule = __decorate([
20
+ (0, common_1.Module)({
21
+ imports: [typeorm_1.TypeOrmModule.forFeature([source_type_entity_1.SourceType]), ntx_core_1.ServicesModule],
22
+ controllers: [source_type_controller_1.SourceTypeController],
23
+ providers: [source_type_service_1.SourceTypeService],
24
+ exports: [source_type_service_1.SourceTypeService],
25
+ })
26
+ ], SourceTypeModule);
27
+ //# sourceMappingURL=source-type.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source-type.module.js","sourceRoot":"","sources":["../../../../../libs/polylog/src/api/source-type/source-type.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,6CAAgD;AAChD,oDAAuD;AACvD,sEAA2D;AAC3D,qEAAgE;AAChE,+DAA0D;AAQnD,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;CAAG,CAAA;AAAnB,4CAAgB;2BAAhB,gBAAgB;IAN5B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,uBAAa,CAAC,UAAU,CAAC,CAAC,+BAAU,CAAC,CAAC,EAAE,yBAAc,CAAC;QACjE,WAAW,EAAE,CAAC,6CAAoB,CAAC;QACnC,SAAS,EAAE,CAAC,uCAAiB,CAAC;QAC9B,OAAO,EAAE,CAAC,uCAAiB,CAAC;KAC7B,CAAC;GACW,gBAAgB,CAAG"}
@@ -0,0 +1,13 @@
1
+ import { ConfigService } from '@nestjs/config';
2
+ import { BaseRepository, LanguageService, MediaService, PermissionScopeType, TrackerService } from '@thescaffold/ntx-core';
3
+ import { SourceType } from './entities/source-type.entity';
4
+ export declare class SourceTypeService extends BaseRepository<SourceType> {
5
+ protected readonly trackerService: TrackerService;
6
+ protected readonly configService: ConfigService;
7
+ protected readonly languageService: LanguageService;
8
+ protected readonly mediaService: MediaService;
9
+ protected [PermissionScopeType.Self]: any[];
10
+ protected [PermissionScopeType.Workspace]: any[];
11
+ protected [PermissionScopeType.Global]: any[];
12
+ constructor(request: any, trackerService: TrackerService, configService: ConfigService, languageService: LanguageService, mediaService: MediaService);
13
+ }