@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.
- package/README.md +1 -0
- package/api/channel/channel.controller.d.ts +26 -0
- package/api/channel/channel.controller.js +49 -0
- package/api/channel/channel.controller.js.map +1 -0
- package/api/channel/channel.module.d.ts +2 -0
- package/api/channel/channel.module.js +30 -0
- package/api/channel/channel.module.js.map +1 -0
- package/api/channel/channel.service.d.ts +17 -0
- package/api/channel/channel.service.js +46 -0
- package/api/channel/channel.service.js.map +1 -0
- package/api/channel/dto/create-channel.dto.d.ts +14 -0
- package/api/channel/dto/create-channel.dto.js +79 -0
- package/api/channel/dto/create-channel.dto.js.map +1 -0
- package/api/channel/dto/update-channel.dto.d.ts +14 -0
- package/api/channel/dto/update-channel.dto.js +81 -0
- package/api/channel/dto/update-channel.dto.js.map +1 -0
- package/api/channel/entities/channel.entity.d.ts +20 -0
- package/api/channel/entities/channel.entity.js +126 -0
- package/api/channel/entities/channel.entity.js.map +1 -0
- package/api/channel/index.d.ts +6 -0
- package/api/channel/index.js +23 -0
- package/api/channel/index.js.map +1 -0
- package/api/event/dto/create-event.dto.d.ts +12 -0
- package/api/event/dto/create-event.dto.js +62 -0
- package/api/event/dto/create-event.dto.js.map +1 -0
- package/api/event/dto/update-event.dto.d.ts +12 -0
- package/api/event/dto/update-event.dto.js +68 -0
- package/api/event/dto/update-event.dto.js.map +1 -0
- package/api/event/entities/event.entity.d.ts +17 -0
- package/api/event/entities/event.entity.js +76 -0
- package/api/event/entities/event.entity.js.map +1 -0
- package/api/event/event.controller.d.ts +31 -0
- package/api/event/event.controller.js +77 -0
- package/api/event/event.controller.js.map +1 -0
- package/api/event/event.module.d.ts +4 -0
- package/api/event/event.module.js +33 -0
- package/api/event/event.module.js.map +1 -0
- package/api/event/event.service.d.ts +17 -0
- package/api/event/event.service.js +46 -0
- package/api/event/event.service.js.map +1 -0
- package/api/event/index.d.ts +6 -0
- package/api/event/index.js +23 -0
- package/api/event/index.js.map +1 -0
- package/api/event-log/dto/create-event-log.dto.d.ts +8 -0
- package/api/event-log/dto/create-event-log.dto.js +48 -0
- package/api/event-log/dto/create-event-log.dto.js.map +1 -0
- package/api/event-log/dto/update-event-log.dto.d.ts +8 -0
- package/api/event-log/dto/update-event-log.dto.js +49 -0
- package/api/event-log/dto/update-event-log.dto.js.map +1 -0
- package/api/event-log/entities/event-log.entity.d.ts +11 -0
- package/api/event-log/entities/event-log.entity.js +54 -0
- package/api/event-log/entities/event-log.entity.js.map +1 -0
- package/api/event-log/event-log.controller.d.ts +28 -0
- package/api/event-log/event-log.controller.js +66 -0
- package/api/event-log/event-log.controller.js.map +1 -0
- package/api/event-log/event-log.module.d.ts +4 -0
- package/api/event-log/event-log.module.js +33 -0
- package/api/event-log/event-log.module.js.map +1 -0
- package/api/event-log/event-log.service.d.ts +17 -0
- package/api/event-log/event-log.service.js +48 -0
- package/api/event-log/event-log.service.js.map +1 -0
- package/api/event-log/index.d.ts +6 -0
- package/api/event-log/index.js +23 -0
- package/api/event-log/index.js.map +1 -0
- package/api/sink/dto/create-sink.dto.d.ts +13 -0
- package/api/sink/dto/create-sink.dto.js +71 -0
- package/api/sink/dto/create-sink.dto.js.map +1 -0
- package/api/sink/dto/update-sink.dto.d.ts +12 -0
- package/api/sink/dto/update-sink.dto.js +68 -0
- package/api/sink/dto/update-sink.dto.js.map +1 -0
- package/api/sink/entities/sink.entity.d.ts +19 -0
- package/api/sink/entities/sink.entity.js +135 -0
- package/api/sink/entities/sink.entity.js.map +1 -0
- package/api/sink/index.d.ts +6 -0
- package/api/sink/index.js +23 -0
- package/api/sink/index.js.map +1 -0
- package/api/sink/sink.controller.d.ts +25 -0
- package/api/sink/sink.controller.js +47 -0
- package/api/sink/sink.controller.js.map +1 -0
- package/api/sink/sink.module.d.ts +2 -0
- package/api/sink/sink.module.js +27 -0
- package/api/sink/sink.module.js.map +1 -0
- package/api/sink/sink.service.d.ts +17 -0
- package/api/sink/sink.service.js +46 -0
- package/api/sink/sink.service.js.map +1 -0
- package/api/sink-type/dto/create-sink-type.dto.d.ts +14 -0
- package/api/sink-type/dto/create-sink-type.dto.js +79 -0
- package/api/sink-type/dto/create-sink-type.dto.js.map +1 -0
- package/api/sink-type/dto/update-sink-type.dto.d.ts +14 -0
- package/api/sink-type/dto/update-sink-type.dto.js +81 -0
- package/api/sink-type/dto/update-sink-type.dto.js.map +1 -0
- package/api/sink-type/entities/sink-type.entity.d.ts +16 -0
- package/api/sink-type/entities/sink-type.entity.js +80 -0
- package/api/sink-type/entities/sink-type.entity.js.map +1 -0
- package/api/sink-type/index.d.ts +6 -0
- package/api/sink-type/index.js +23 -0
- package/api/sink-type/index.js.map +1 -0
- package/api/sink-type/sink-type.controller.d.ts +21 -0
- package/api/sink-type/sink-type.controller.js +40 -0
- package/api/sink-type/sink-type.controller.js.map +1 -0
- package/api/sink-type/sink-type.module.d.ts +2 -0
- package/api/sink-type/sink-type.module.js +27 -0
- package/api/sink-type/sink-type.module.js.map +1 -0
- package/api/sink-type/sink-type.service.d.ts +13 -0
- package/api/sink-type/sink-type.service.js +46 -0
- package/api/sink-type/sink-type.service.js.map +1 -0
- package/api/source/dto/create-source.dto.d.ts +12 -0
- package/api/source/dto/create-source.dto.js +65 -0
- package/api/source/dto/create-source.dto.js.map +1 -0
- package/api/source/dto/update-source.dto.d.ts +12 -0
- package/api/source/dto/update-source.dto.js +68 -0
- package/api/source/dto/update-source.dto.js.map +1 -0
- package/api/source/entities/source.entity.d.ts +19 -0
- package/api/source/entities/source.entity.js +83 -0
- package/api/source/entities/source.entity.js.map +1 -0
- package/api/source/index.d.ts +6 -0
- package/api/source/index.js +23 -0
- package/api/source/index.js.map +1 -0
- package/api/source/source.controller.d.ts +24 -0
- package/api/source/source.controller.js +46 -0
- package/api/source/source.controller.js.map +1 -0
- package/api/source/source.module.d.ts +2 -0
- package/api/source/source.module.js +30 -0
- package/api/source/source.module.js.map +1 -0
- package/api/source/source.service.d.ts +17 -0
- package/api/source/source.service.js +46 -0
- package/api/source/source.service.js.map +1 -0
- package/api/source-type/dto/create-source-type.dto.d.ts +14 -0
- package/api/source-type/dto/create-source-type.dto.js +79 -0
- package/api/source-type/dto/create-source-type.dto.js.map +1 -0
- package/api/source-type/dto/update-source-type.dto.d.ts +14 -0
- package/api/source-type/dto/update-source-type.dto.js +81 -0
- package/api/source-type/dto/update-source-type.dto.js.map +1 -0
- package/api/source-type/entities/source-type.entity.d.ts +16 -0
- package/api/source-type/entities/source-type.entity.js +80 -0
- package/api/source-type/entities/source-type.entity.js.map +1 -0
- package/api/source-type/index.d.ts +6 -0
- package/api/source-type/index.js +23 -0
- package/api/source-type/index.js.map +1 -0
- package/api/source-type/source-type.controller.d.ts +21 -0
- package/api/source-type/source-type.controller.js +40 -0
- package/api/source-type/source-type.controller.js.map +1 -0
- package/api/source-type/source-type.module.d.ts +2 -0
- package/api/source-type/source-type.module.js +27 -0
- package/api/source-type/source-type.module.js.map +1 -0
- package/api/source-type/source-type.service.d.ts +13 -0
- package/api/source-type/source-type.service.js +46 -0
- package/api/source-type/source-type.service.js.map +1 -0
- package/app.config.d.ts +38 -0
- package/app.config.js +48 -0
- package/app.config.js.map +1 -0
- package/app.controller.d.ts +133 -0
- package/app.controller.js +265 -0
- package/app.controller.js.map +1 -0
- package/app.dto.d.ts +66 -0
- package/app.dto.js +288 -0
- package/app.dto.js.map +1 -0
- package/app.module.d.ts +2 -0
- package/app.module.js +74 -0
- package/app.module.js.map +1 -0
- package/app.service.d.ts +34 -0
- package/app.service.js +330 -0
- package/app.service.js.map +1 -0
- package/index.d.ts +31 -0
- package/index.js +80 -0
- package/index.js.map +1 -0
- package/migrations/1750186475187-Channels.d.ts +5 -0
- package/migrations/1750186475187-Channels.js +48 -0
- package/migrations/1750186475187-Channels.js.map +1 -0
- package/migrations/1750186475261-EventLogs.d.ts +5 -0
- package/migrations/1750186475261-EventLogs.js +33 -0
- package/migrations/1750186475261-EventLogs.js.map +1 -0
- package/migrations/1750186475329-Events.d.ts +5 -0
- package/migrations/1750186475329-Events.js +47 -0
- package/migrations/1750186475329-Events.js.map +1 -0
- package/migrations/1750186475466-Sinks.d.ts +5 -0
- package/migrations/1750186475466-Sinks.js +46 -0
- package/migrations/1750186475466-Sinks.js.map +1 -0
- package/migrations/1750186475532-SinkTypes.d.ts +5 -0
- package/migrations/1750186475532-SinkTypes.js +39 -0
- package/migrations/1750186475532-SinkTypes.js.map +1 -0
- package/migrations/1750186475601-Sources.d.ts +5 -0
- package/migrations/1750186475601-Sources.js +46 -0
- package/migrations/1750186475601-Sources.js.map +1 -0
- package/migrations/1750186475675-SourceTypes.d.ts +5 -0
- package/migrations/1750186475675-SourceTypes.js +39 -0
- package/migrations/1750186475675-SourceTypes.js.map +1 -0
- package/migrations/1750186762829-SourceTypeData.d.ts +5 -0
- package/migrations/1750186762829-SourceTypeData.js +85 -0
- package/migrations/1750186762829-SourceTypeData.js.map +1 -0
- package/migrations/1750186762911-SinkTypeData.d.ts +5 -0
- package/migrations/1750186762911-SinkTypeData.js +34 -0
- package/migrations/1750186762911-SinkTypeData.js.map +1 -0
- package/migrations/1750186762995-SinkData.d.ts +5 -0
- package/migrations/1750186762995-SinkData.js +34 -0
- package/migrations/1750186762995-SinkData.js.map +1 -0
- package/migrations/1750186763062-ChannelData.d.ts +5 -0
- package/migrations/1750186763062-ChannelData.js +43 -0
- package/migrations/1750186763062-ChannelData.js.map +1 -0
- package/migrations/1750186763130-SourceData.d.ts +5 -0
- package/migrations/1750186763130-SourceData.js +29 -0
- package/migrations/1750186763130-SourceData.js.map +1 -0
- package/migrations/index.d.ts +2 -0
- package/migrations/index.js +30 -0
- package/migrations/index.js.map +1 -0
- package/package.json +18 -0
- package/pkg/middleware/auth.middleware.d.ts +13 -0
- package/pkg/middleware/auth.middleware.js +70 -0
- package/pkg/middleware/auth.middleware.js.map +1 -0
- package/pkg/pipeline/index.d.ts +3 -0
- package/pkg/pipeline/index.js +20 -0
- package/pkg/pipeline/index.js.map +1 -0
- package/pkg/pipeline/pipeline.module.d.ts +2 -0
- package/pkg/pipeline/pipeline.module.js +33 -0
- package/pkg/pipeline/pipeline.module.js.map +1 -0
- package/pkg/pipeline/pipeline.service.d.ts +40 -0
- package/pkg/pipeline/pipeline.service.js +203 -0
- package/pkg/pipeline/pipeline.service.js.map +1 -0
- package/pkg/pipeline/xformer.service.d.ts +3 -0
- package/pkg/pipeline/xformer.service.js +19 -0
- package/pkg/pipeline/xformer.service.js.map +1 -0
- package/pkg/sinks/at.sms.sink.d.ts +4 -0
- package/pkg/sinks/at.sms.sink.js +18 -0
- package/pkg/sinks/at.sms.sink.js.map +1 -0
- package/pkg/sinks/form.sink.d.ts +7 -0
- package/pkg/sinks/form.sink.js +26 -0
- package/pkg/sinks/form.sink.js.map +1 -0
- package/pkg/sinks/index.d.ts +7 -0
- package/pkg/sinks/index.js +18 -0
- package/pkg/sinks/index.js.map +1 -0
- package/pkg/sinks/mailchimp.email.sink.d.ts +8 -0
- package/pkg/sinks/mailchimp.email.sink.js +40 -0
- package/pkg/sinks/mailchimp.email.sink.js.map +1 -0
- package/pkg/sinks/mailgun.email.sink.d.ts +8 -0
- package/pkg/sinks/mailgun.email.sink.js +40 -0
- package/pkg/sinks/mailgun.email.sink.js.map +1 -0
- package/pkg/sinks/sendgrid.email.sink.d.ts +8 -0
- package/pkg/sinks/sendgrid.email.sink.js +49 -0
- package/pkg/sinks/sendgrid.email.sink.js.map +1 -0
- package/pkg/sinks/sink.contract.d.ts +10 -0
- package/pkg/sinks/sink.contract.js +3 -0
- package/pkg/sinks/sink.contract.js.map +1 -0
- package/pkg/sinks/webhook.sink.d.ts +9 -0
- package/pkg/sinks/webhook.sink.js +67 -0
- package/pkg/sinks/webhook.sink.js.map +1 -0
- package/tsconfig.lib.tsbuildinfo +1 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Sinks1750186475466 = void 0;
|
|
4
|
+
class Sinks1750186475466 {
|
|
5
|
+
async up(queryRunner) {
|
|
6
|
+
await queryRunner.query(`
|
|
7
|
+
CREATE TABLE \`PolylogSinks\` (
|
|
8
|
+
\`id\` char(36) NOT NULL,
|
|
9
|
+
\`createdAt\` datetime(6) DEFAULT NULL,
|
|
10
|
+
\`updatedAt\` datetime(6) DEFAULT NULL,
|
|
11
|
+
\`deletedAt\` datetime(6) DEFAULT NULL,
|
|
12
|
+
\`userId\` char(36) NOT NULL,
|
|
13
|
+
\`clientId\` char(36) NOT NULL,
|
|
14
|
+
\`workspaceId\` char(36) NOT NULL,
|
|
15
|
+
\`category\` varchar(52) NOT NULL,
|
|
16
|
+
\`key\` varchar(52) DEFAULT NULL,
|
|
17
|
+
\`visibility\` varchar(52) DEFAULT NULL,
|
|
18
|
+
\`typeId\` char(36) NOT NULL,
|
|
19
|
+
\`name\` varchar(255) NOT NULL,
|
|
20
|
+
\`desc\` varchar(255) DEFAULT NULL,
|
|
21
|
+
\`meta\` json DEFAULT NULL,
|
|
22
|
+
\`status\` varchar(52) DEFAULT NULL,
|
|
23
|
+
PRIMARY KEY (\`id\`),
|
|
24
|
+
KEY \`IDX_f98a367674e85f08ae65f3addd\` (\`createdAt\`),
|
|
25
|
+
KEY \`IDX_63768d99ce3d17d087391bd6dd\` (\`updatedAt\`),
|
|
26
|
+
KEY \`IDX_52c36d92e7d7646c4834765cb5\` (\`deletedAt\`),
|
|
27
|
+
KEY \`IDX_b77ae323d0e00db6a826ea703e\` (\`userId\`),
|
|
28
|
+
KEY \`IDX_cad9201797756795578717093f\` (\`clientId\`),
|
|
29
|
+
KEY \`IDX_5f7564961f7a240033eb7241af\` (\`workspaceId\`),
|
|
30
|
+
KEY \`IDX_9cacc8cee1e8aca20b8050bb46\` (\`category\`),
|
|
31
|
+
KEY \`IDX_cd5e02d210349b7cdb62c6280c\` (\`key\`),
|
|
32
|
+
KEY \`IDX_79925de1a536ad72f42c7b1372\` (\`visibility\`),
|
|
33
|
+
KEY \`IDX_d2dbbc5aa55d818e4364cdd0d5\` (\`typeId\`),
|
|
34
|
+
KEY \`IDX_9c74a8ba7fdb8c241335ea306b\` (\`name\`),
|
|
35
|
+
KEY \`IDX_84a82774280e2b4ea37df8662e\` (\`status\`)
|
|
36
|
+
);
|
|
37
|
+
`);
|
|
38
|
+
}
|
|
39
|
+
async down(queryRunner) {
|
|
40
|
+
await queryRunner.query(`
|
|
41
|
+
DROP TABLE IF EXISTS \`PolylogSinks\`;
|
|
42
|
+
`);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.Sinks1750186475466 = Sinks1750186475466;
|
|
46
|
+
//# sourceMappingURL=1750186475466-Sinks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1750186475466-Sinks.js","sourceRoot":"","sources":["../../../../libs/polylog/src/migrations/1750186475466-Sinks.ts"],"names":[],"mappings":";;;AAEA,MAAa,kBAAkB;IACtB,KAAK,CAAC,EAAE,CAAC,WAAwB;QACtC,MAAM,WAAW,CAAC,KAAK,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA+BvB,CAAC,CAAC;IACL,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,WAAwB;QACxC,MAAM,WAAW,CAAC,KAAK,CAAC;;KAEvB,CAAC,CAAC;IACL,CAAC;CACF;AAzCD,gDAyCC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SinkTypes1750186475532 = void 0;
|
|
4
|
+
class SinkTypes1750186475532 {
|
|
5
|
+
async up(queryRunner) {
|
|
6
|
+
await queryRunner.query(`
|
|
7
|
+
CREATE TABLE \`PolylogSinkTypes\` (
|
|
8
|
+
\`id\` char(36) NOT NULL,
|
|
9
|
+
\`createdAt\` datetime(6) DEFAULT NULL,
|
|
10
|
+
\`updatedAt\` datetime(6) DEFAULT NULL,
|
|
11
|
+
\`deletedAt\` datetime(6) DEFAULT NULL,
|
|
12
|
+
\`category\` varchar(52) NOT NULL,
|
|
13
|
+
\`key\` varchar(52) DEFAULT NULL,
|
|
14
|
+
\`visibility\` varchar(52) DEFAULT NULL,
|
|
15
|
+
\`name\` varchar(255) NOT NULL,
|
|
16
|
+
\`desc\` varchar(255) DEFAULT NULL,
|
|
17
|
+
\`detail\` text,
|
|
18
|
+
\`thumbnailUrl\` varchar(255) DEFAULT NULL,
|
|
19
|
+
\`bannerUrl\` varchar(255) DEFAULT NULL,
|
|
20
|
+
\`tags\` json DEFAULT NULL,
|
|
21
|
+
\`meta\` json DEFAULT NULL,
|
|
22
|
+
PRIMARY KEY (\`id\`),
|
|
23
|
+
KEY \`IDX_49d991d682309d92d75307665f\` (\`createdAt\`),
|
|
24
|
+
KEY \`IDX_c5316eba4159318c327bc1b732\` (\`updatedAt\`),
|
|
25
|
+
KEY \`IDX_df0ae82c007abe4aa229583e27\` (\`deletedAt\`),
|
|
26
|
+
KEY \`IDX_ced6cb05a07c1c9e22a2006b88\` (\`category\`),
|
|
27
|
+
KEY \`IDX_f81b56e80c9bced4b86cb6d5c2\` (\`key\`),
|
|
28
|
+
KEY \`IDX_c089038e4c9fcedb6c51057fb9\` (\`visibility\`)
|
|
29
|
+
);
|
|
30
|
+
`);
|
|
31
|
+
}
|
|
32
|
+
async down(queryRunner) {
|
|
33
|
+
await queryRunner.query(`
|
|
34
|
+
DROP TABLE IF EXISTS \`PolylogSinkTypes\`;
|
|
35
|
+
`);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.SinkTypes1750186475532 = SinkTypes1750186475532;
|
|
39
|
+
//# sourceMappingURL=1750186475532-SinkTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1750186475532-SinkTypes.js","sourceRoot":"","sources":["../../../../libs/polylog/src/migrations/1750186475532-SinkTypes.ts"],"names":[],"mappings":";;;AAEA,MAAa,sBAAsB;IAC1B,KAAK,CAAC,EAAE,CAAC,WAAwB;QACtC,MAAM,WAAW,CAAC,KAAK,CAAC;;;;;;;;;;;;;;;;;;;;;;;;KAwBvB,CAAC,CAAC;IACL,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,WAAwB;QACxC,MAAM,WAAW,CAAC,KAAK,CAAC;;KAEvB,CAAC,CAAC;IACL,CAAC;CACF;AAlCD,wDAkCC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Sources1750186475601 = void 0;
|
|
4
|
+
class Sources1750186475601 {
|
|
5
|
+
async up(queryRunner) {
|
|
6
|
+
await queryRunner.query(`
|
|
7
|
+
CREATE TABLE \`PolylogSources\` (
|
|
8
|
+
\`id\` char(36) NOT NULL,
|
|
9
|
+
\`createdAt\` datetime(6) DEFAULT NULL,
|
|
10
|
+
\`updatedAt\` datetime(6) DEFAULT NULL,
|
|
11
|
+
\`deletedAt\` datetime(6) DEFAULT NULL,
|
|
12
|
+
\`userId\` char(36) NOT NULL,
|
|
13
|
+
\`clientId\` char(36) NOT NULL,
|
|
14
|
+
\`workspaceId\` char(36) NOT NULL,
|
|
15
|
+
\`category\` varchar(52) NOT NULL,
|
|
16
|
+
\`key\` varchar(52) DEFAULT NULL,
|
|
17
|
+
\`visibility\` varchar(52) DEFAULT NULL,
|
|
18
|
+
\`typeId\` char(36) NOT NULL,
|
|
19
|
+
\`name\` varchar(255) NOT NULL,
|
|
20
|
+
\`desc\` varchar(255) DEFAULT NULL,
|
|
21
|
+
\`meta\` json DEFAULT NULL,
|
|
22
|
+
\`status\` varchar(52) DEFAULT NULL,
|
|
23
|
+
PRIMARY KEY (\`id\`),
|
|
24
|
+
KEY \`IDX_aa47d0ee121a980bb5987f71ba\` (\`createdAt\`),
|
|
25
|
+
KEY \`IDX_4fc37a2c6f44b3faf042988180\` (\`updatedAt\`),
|
|
26
|
+
KEY \`IDX_a1c610c57a62c4b940ff3fb5b1\` (\`deletedAt\`),
|
|
27
|
+
KEY \`IDX_4cf1580f0a736745ec153a7c3d\` (\`userId\`),
|
|
28
|
+
KEY \`IDX_23ee08af56808d05487d3d6c39\` (\`clientId\`),
|
|
29
|
+
KEY \`IDX_8a845a5d4bafa687b490d6847c\` (\`workspaceId\`),
|
|
30
|
+
KEY \`IDX_4d2e41dfc4d2bd010b1d802619\` (\`category\`),
|
|
31
|
+
KEY \`IDX_096cf477666ed008dce5e4e1e5\` (\`key\`),
|
|
32
|
+
KEY \`IDX_9579b7f3bb787b6d94dd3121d3\` (\`visibility\`),
|
|
33
|
+
KEY \`IDX_095dd792e7fc9a88253ac52a96\` (\`typeId\`),
|
|
34
|
+
KEY \`IDX_04328d13e7e9f8d31827095c57\` (\`name\`),
|
|
35
|
+
KEY \`IDX_212d9eb1b37793f531e60b8a42\` (\`status\`)
|
|
36
|
+
);
|
|
37
|
+
`);
|
|
38
|
+
}
|
|
39
|
+
async down(queryRunner) {
|
|
40
|
+
await queryRunner.query(`
|
|
41
|
+
DROP TABLE IF EXISTS \`PolylogSources\`;
|
|
42
|
+
`);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.Sources1750186475601 = Sources1750186475601;
|
|
46
|
+
//# sourceMappingURL=1750186475601-Sources.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1750186475601-Sources.js","sourceRoot":"","sources":["../../../../libs/polylog/src/migrations/1750186475601-Sources.ts"],"names":[],"mappings":";;;AAEA,MAAa,oBAAoB;IACxB,KAAK,CAAC,EAAE,CAAC,WAAwB;QACtC,MAAM,WAAW,CAAC,KAAK,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA+BvB,CAAC,CAAC;IACL,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,WAAwB;QACxC,MAAM,WAAW,CAAC,KAAK,CAAC;;KAEvB,CAAC,CAAC;IACL,CAAC;CACF;AAzCD,oDAyCC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SourceTypes1750186475675 = void 0;
|
|
4
|
+
class SourceTypes1750186475675 {
|
|
5
|
+
async up(queryRunner) {
|
|
6
|
+
await queryRunner.query(`
|
|
7
|
+
CREATE TABLE \`PolylogSourceTypes\` (
|
|
8
|
+
\`id\` char(36) NOT NULL,
|
|
9
|
+
\`createdAt\` datetime(6) DEFAULT NULL,
|
|
10
|
+
\`updatedAt\` datetime(6) DEFAULT NULL,
|
|
11
|
+
\`deletedAt\` datetime(6) DEFAULT NULL,
|
|
12
|
+
\`category\` varchar(52) NOT NULL,
|
|
13
|
+
\`key\` varchar(52) DEFAULT NULL,
|
|
14
|
+
\`visibility\` varchar(52) DEFAULT NULL,
|
|
15
|
+
\`name\` varchar(255) NOT NULL,
|
|
16
|
+
\`desc\` varchar(255) DEFAULT NULL,
|
|
17
|
+
\`detail\` text,
|
|
18
|
+
\`thumbnailUrl\` varchar(255) DEFAULT NULL,
|
|
19
|
+
\`bannerUrl\` varchar(255) DEFAULT NULL,
|
|
20
|
+
\`tags\` json DEFAULT NULL,
|
|
21
|
+
\`meta\` json DEFAULT NULL,
|
|
22
|
+
PRIMARY KEY (\`id\`),
|
|
23
|
+
KEY \`IDX_c1c29ee4557932a0a9cf852f38\` (\`createdAt\`),
|
|
24
|
+
KEY \`IDX_5f02b8dba726bfb9ac3fdcf39b\` (\`updatedAt\`),
|
|
25
|
+
KEY \`IDX_701d5f7bab18892514e2bdaf92\` (\`deletedAt\`),
|
|
26
|
+
KEY \`IDX_949c7c1dfb888854563071ddcc\` (\`category\`),
|
|
27
|
+
KEY \`IDX_9206f87179491e344fef6a0c66\` (\`key\`),
|
|
28
|
+
KEY \`IDX_10530bfe95099cc8c063cbaeef\` (\`visibility\`)
|
|
29
|
+
);
|
|
30
|
+
`);
|
|
31
|
+
}
|
|
32
|
+
async down(queryRunner) {
|
|
33
|
+
await queryRunner.query(`
|
|
34
|
+
DROP TABLE IF EXISTS \`PolylogSourceTypes\`;
|
|
35
|
+
`);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.SourceTypes1750186475675 = SourceTypes1750186475675;
|
|
39
|
+
//# sourceMappingURL=1750186475675-SourceTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1750186475675-SourceTypes.js","sourceRoot":"","sources":["../../../../libs/polylog/src/migrations/1750186475675-SourceTypes.ts"],"names":[],"mappings":";;;AAEA,MAAa,wBAAwB;IAC5B,KAAK,CAAC,EAAE,CAAC,WAAwB;QACtC,MAAM,WAAW,CAAC,KAAK,CAAC;;;;;;;;;;;;;;;;;;;;;;;;KAwBvB,CAAC,CAAC;IACL,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,WAAwB;QACxC,MAAM,WAAW,CAAC,KAAK,CAAC;;KAEvB,CAAC,CAAC;IACL,CAAC;CACF;AAlCD,4DAkCC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SourceTypeData1750186762829 = void 0;
|
|
4
|
+
class SourceTypeData1750186762829 {
|
|
5
|
+
async up(queryRunner) {
|
|
6
|
+
await queryRunner.query(`
|
|
7
|
+
INSERT INTO \`PolylogSourceTypes\` (\`id\`, \`category\`, \`key\`, \`visibility\`, \`name\`, \`tags\`) VALUES
|
|
8
|
+
-- Devices
|
|
9
|
+
('773769ca-08eb-4f32-9245-4492e293786c', 'Devices', 'android', NULL, 'Android', '["Devices"]'),
|
|
10
|
+
('654857f2-f341-4b35-a3c9-84b1698df458', 'Devices', 'ios', NULL, 'iOS', '["Devices"]'),
|
|
11
|
+
('b2657c69-86fa-4f68-bec7-8a2d69de100f', 'Devices', 'web', NULL, 'Web', '["Devices"]'),
|
|
12
|
+
('2f7c7fef-41a3-4425-90c3-88233f63dbc1', 'Devices', 'server', NULL, 'Server', '["Devices"]'),
|
|
13
|
+
|
|
14
|
+
-- Language
|
|
15
|
+
('4cf7e0c6-ad42-449f-ad59-d55a7b9ff6cd', 'Language', 'javascript', NULL, 'Javascript', '["Language"]'),
|
|
16
|
+
('3b583696-5d77-4bd2-af2f-340efe1d6999', 'Language', 'node', NULL, 'Node', '["Language"]'),
|
|
17
|
+
('3a9d1556-bce7-44d3-a778-9f059bce14de', 'Language', 'php', NULL, 'PHP', '["Language"]'),
|
|
18
|
+
('20c36128-f31f-4d17-b7af-92857a84969f', 'Language', 'python', NULL, 'Python', '["Language"]'),
|
|
19
|
+
('da68d080-ab71-4aed-9173-4ee9b7235caf', 'Language', 'java', NULL, 'Java', '["Language"]'),
|
|
20
|
+
('94b85afd-4ee1-4060-b74f-04d51aacc8cb', 'Language', 'ruby', NULL, 'Ruby', '["Language"]'),
|
|
21
|
+
('d6836ec5-d239-480d-b660-df13f6aef24b', 'Language', 'rust', NULL, 'Rust', '["Language"]'),
|
|
22
|
+
('1a5d30ac-a967-4a94-8ace-357c5237f3ca', 'Language', '.net', NULL, '.Net', '["Language"]'),
|
|
23
|
+
('38d1f00a-cfbf-47e2-9888-6869adf77499', 'Language', 'dart', NULL, 'Dart', '["Language"]'),
|
|
24
|
+
('e1a24e6c-b1b6-40cb-96b2-5fd87c5314af', 'Language', 'go', NULL, 'Go', '["Language"]'),
|
|
25
|
+
|
|
26
|
+
-- Framework
|
|
27
|
+
('05b38353-0a94-4e7f-91ba-383d9240b627', 'Framework', 'angular', NULL, 'Angular', '["Framework"]'),
|
|
28
|
+
('b43972ce-429e-4c81-8770-32e83a657537', 'Framework', 'react', NULL, 'React', '["Framework"]'),
|
|
29
|
+
('f74655e8-ad12-4f93-b8ab-17664a458271', 'Framework', 'vue', NULL, 'Vue', '["Framework"]'),
|
|
30
|
+
('fc06b6dc-b65a-4ff5-944d-85544e6a35a9', 'Framework', 'react native', NULL, 'React Native', '["Framework"]'),
|
|
31
|
+
('2051b68e-b202-4df8-ae25-867b8723d4fe', 'Framework', 'flutter', NULL, 'Flutter', '["Framework"]'),
|
|
32
|
+
('f250016a-04c5-4464-9d2d-668a33a02b4a', 'Framework', 'laravel', NULL, 'Laravel', '["Framework"]'),
|
|
33
|
+
('27ef5d26-9f99-45a2-ade3-af8117d07785', 'Framework', 'django', NULL, 'Django', '["Framework"]'),
|
|
34
|
+
('37f332c1-ed2d-42d9-bd4f-b13979716958', 'Framework', 'nestjs', NULL, 'NestJs', '["Framework"]'),
|
|
35
|
+
('9c016b6b-090b-4af0-9798-548abbc48636', 'Framework', 'expressjs', NULL, 'ExpressJs', '["Framework"]'),
|
|
36
|
+
('8b05edfd-ccfa-428b-a214-3305b3dddb2d', 'Framework', 'springboot', NULL, 'Springboot', '["Framework"]'),
|
|
37
|
+
|
|
38
|
+
-- Others
|
|
39
|
+
('71659a72-feca-4e77-a1f3-3b236a296485', 'Others', 'internal', 'Private', 'Internal', '["Others"]'),
|
|
40
|
+
('62b423fe-9394-4733-be66-c0df39d56a15', 'Others', 'others', NULL, 'Others', '["Others"]');
|
|
41
|
+
`);
|
|
42
|
+
}
|
|
43
|
+
async down(queryRunner) {
|
|
44
|
+
await queryRunner.query(`
|
|
45
|
+
DELETE FROM \`PolylogSourceTypes\`
|
|
46
|
+
WHERE \`id\` IN (
|
|
47
|
+
-- Devices
|
|
48
|
+
'773769ca-08eb-4f32-9245-4492e293786c'
|
|
49
|
+
'654857f2-f341-4b35-a3c9-84b1698df458'
|
|
50
|
+
'b2657c69-86fa-4f68-bec7-8a2d69de100f'
|
|
51
|
+
'2f7c7fef-41a3-4425-90c3-88233f63dbc1'
|
|
52
|
+
|
|
53
|
+
-- Language
|
|
54
|
+
'4cf7e0c6-ad42-449f-ad59-d55a7b9ff6cd',
|
|
55
|
+
'3b583696-5d77-4bd2-af2f-340efe1d6999',
|
|
56
|
+
'3a9d1556-bce7-44d3-a778-9f059bce14de',
|
|
57
|
+
'20c36128-f31f-4d17-b7af-92857a84969f',
|
|
58
|
+
'da68d080-ab71-4aed-9173-4ee9b7235caf',
|
|
59
|
+
'94b85afd-4ee1-4060-b74f-04d51aacc8cb',
|
|
60
|
+
'd6836ec5-d239-480d-b660-df13f6aef24b',
|
|
61
|
+
'1a5d30ac-a967-4a94-8ace-357c5237f3ca',
|
|
62
|
+
'38d1f00a-cfbf-47e2-9888-6869adf77499',
|
|
63
|
+
'e1a24e6c-b1b6-40cb-96b2-5fd87c5314af',
|
|
64
|
+
|
|
65
|
+
-- Framework
|
|
66
|
+
'05b38353-0a94-4e7f-91ba-383d9240b627',
|
|
67
|
+
'b43972ce-429e-4c81-8770-32e83a657537',
|
|
68
|
+
'f74655e8-ad12-4f93-b8ab-17664a458271',
|
|
69
|
+
'fc06b6dc-b65a-4ff5-944d-85544e6a35a9',
|
|
70
|
+
'2051b68e-b202-4df8-ae25-867b8723d4fe',
|
|
71
|
+
'f250016a-04c5-4464-9d2d-668a33a02b4a',
|
|
72
|
+
'27ef5d26-9f99-45a2-ade3-af8117d07785',
|
|
73
|
+
'37f332c1-ed2d-42d9-bd4f-b13979716958',
|
|
74
|
+
'9c016b6b-090b-4af0-9798-548abbc48636',
|
|
75
|
+
'8b05edfd-ccfa-428b-a214-3305b3dddb2d',
|
|
76
|
+
|
|
77
|
+
-- Others
|
|
78
|
+
'71659a72-feca-4e77-a1f3-3b236a296485',
|
|
79
|
+
'62b423fe-9394-4733-be66-c0df39d56a15'
|
|
80
|
+
);
|
|
81
|
+
`);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
exports.SourceTypeData1750186762829 = SourceTypeData1750186762829;
|
|
85
|
+
//# sourceMappingURL=1750186762829-SourceTypeData.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1750186762829-SourceTypeData.js","sourceRoot":"","sources":["../../../../libs/polylog/src/migrations/1750186762829-SourceTypeData.ts"],"names":[],"mappings":";;;AAEA,MAAa,2BAA2B;IAC/B,KAAK,CAAC,EAAE,CAAC,WAAwB;QACtC,MAAM,WAAW,CAAC,KAAK,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAmCvB,CAAC,CAAC;IACL,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,WAAwB;QACxC,MAAM,WAAW,CAAC,KAAK,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAqCvB,CAAC,CAAC;IACL,CAAC;CACF;AAhFD,kEAgFC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SinkTypeData1750186762911 = void 0;
|
|
4
|
+
class SinkTypeData1750186762911 {
|
|
5
|
+
async up(queryRunner) {
|
|
6
|
+
await queryRunner.query(`
|
|
7
|
+
INSERT INTO \`PolylogSinkTypes\` (\`id\`, \`category\`, \`key\`, \`visibility\`, \`name\`, \`tags\`) VALUES
|
|
8
|
+
-- Job
|
|
9
|
+
('878b6ae2-d17c-4e6a-b0c8-6bad4760db79', 'event', 'job', NULL, 'Job', '["Event", "Job"]'),
|
|
10
|
+
|
|
11
|
+
-- Webhook
|
|
12
|
+
('87fb18f4-75a0-4ba5-916a-427e340ca39c', 'event', 'webhook', NULL, 'Webhook', '["Event", "Others", "Others", "Log", "Message", "Others", "Job", "Webhook"]'),
|
|
13
|
+
|
|
14
|
+
-- Internal
|
|
15
|
+
('e3349085-3059-42f1-bb83-83655d536c98', 'event', 'internal', 'private', 'Internal', '["Event", "Others"]'),
|
|
16
|
+
|
|
17
|
+
-- *
|
|
18
|
+
('f83b161c-782e-46b2-8104-0c26298af8b1', 'event', '*', 'private', '*', '["Event", "Others"]');
|
|
19
|
+
`);
|
|
20
|
+
}
|
|
21
|
+
async down(queryRunner) {
|
|
22
|
+
await queryRunner.query(`
|
|
23
|
+
DELETE FROM \`PolylogSinkTypes\`
|
|
24
|
+
WHERE \`id\` IN (
|
|
25
|
+
'878b6ae2-d17c-4e6a-b0c8-6bad4760db79',
|
|
26
|
+
'87fb18f4-75a0-4ba5-916a-427e340ca39c',
|
|
27
|
+
'e3349085-3059-42f1-bb83-83655d536c98',
|
|
28
|
+
'f83b161c-782e-46b2-8104-0c26298af8b1'
|
|
29
|
+
);
|
|
30
|
+
`);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.SinkTypeData1750186762911 = SinkTypeData1750186762911;
|
|
34
|
+
//# sourceMappingURL=1750186762911-SinkTypeData.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1750186762911-SinkTypeData.js","sourceRoot":"","sources":["../../../../libs/polylog/src/migrations/1750186762911-SinkTypeData.ts"],"names":[],"mappings":";;;AAEA,MAAa,yBAAyB;IAC7B,KAAK,CAAC,EAAE,CAAC,WAAwB;QACtC,MAAM,WAAW,CAAC,KAAK,CAAC;;;;;;;;;;;;;KAavB,CAAC,CAAC;IACL,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,WAAwB;QACxC,MAAM,WAAW,CAAC,KAAK,CAAC;;;;;;;;KAQvB,CAAC,CAAC;IACL,CAAC;CACF;AA7BD,8DA6BC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SinkData1750186762995 = void 0;
|
|
4
|
+
class SinkData1750186762995 {
|
|
5
|
+
async up(queryRunner) {
|
|
6
|
+
await queryRunner.query(`
|
|
7
|
+
INSERT INTO \`PolylogSinks\` (\`id\`, \`userId\`, \`clientId\`, \`workspaceId\`, \`typeId\`, \`category\`, \`key\`, \`name\`, \`desc\`, \`meta\`)
|
|
8
|
+
VALUES (
|
|
9
|
+
'842d690c-def5-452b-9c6e-4ef5e5baa8fd',
|
|
10
|
+
'c93cd3f3-5538-4020-9329-da7bddcff4c7',
|
|
11
|
+
'localhost',
|
|
12
|
+
'23b9b543-2240-493b-88b3-4c8478941d92',
|
|
13
|
+
'87fb18f4-75a0-4ba5-916a-427e340ca39c', -- Webhook Sink Type ID
|
|
14
|
+
'event',
|
|
15
|
+
'apps_polylog',
|
|
16
|
+
'apps/polylog',
|
|
17
|
+
'Primary event sink',
|
|
18
|
+
JSON_OBJECT(
|
|
19
|
+
'method', 'POST',
|
|
20
|
+
'url', '{{{BASE_URL}}}/apps/polylog/subscription/ingest',
|
|
21
|
+
'payloadType', 'event'
|
|
22
|
+
)
|
|
23
|
+
);
|
|
24
|
+
`);
|
|
25
|
+
}
|
|
26
|
+
async down(queryRunner) {
|
|
27
|
+
await queryRunner.query(`
|
|
28
|
+
DELETE FROM \`PolylogSinks\`
|
|
29
|
+
WHERE \`id\` = '842d690c-def5-452b-9c6e-4ef5e5baa8fd';
|
|
30
|
+
`);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.SinkData1750186762995 = SinkData1750186762995;
|
|
34
|
+
//# sourceMappingURL=1750186762995-SinkData.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1750186762995-SinkData.js","sourceRoot":"","sources":["../../../../libs/polylog/src/migrations/1750186762995-SinkData.ts"],"names":[],"mappings":";;;AAEA,MAAa,qBAAqB;IACzB,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;;;KAGvB,CAAC,CAAC;IACL,CAAC;CACF;AA7BD,sDA6BC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ChannelData1750186763062 = void 0;
|
|
4
|
+
class ChannelData1750186763062 {
|
|
5
|
+
async up(queryRunner) {
|
|
6
|
+
await queryRunner.query(`
|
|
7
|
+
INSERT INTO \`PolylogChannels\` (\`id\`, \`userId\`, \`clientId\`, \`workspaceId\`, \`sourceId\`, \`sinkId\`, \`type\`, \`category\`)
|
|
8
|
+
VALUES
|
|
9
|
+
(
|
|
10
|
+
'ee6274dc-743c-4d88-9cf3-80a7941123d4',
|
|
11
|
+
'c93cd3f3-5538-4020-9329-da7bddcff4c7',
|
|
12
|
+
'localhost',
|
|
13
|
+
'23b9b543-2240-493b-88b3-4c8478941d92',
|
|
14
|
+
'*',
|
|
15
|
+
'842d690c-def5-452b-9c6e-4ef5e5baa8fd',
|
|
16
|
+
'apps.polylog.source.register',
|
|
17
|
+
'event'
|
|
18
|
+
),
|
|
19
|
+
(
|
|
20
|
+
'a59b4c27-b964-4e75-9741-c5834db05409',
|
|
21
|
+
'c93cd3f3-5538-4020-9329-da7bddcff4c7',
|
|
22
|
+
'localhost',
|
|
23
|
+
'23b9b543-2240-493b-88b3-4c8478941d92',
|
|
24
|
+
'*',
|
|
25
|
+
'842d690c-def5-452b-9c6e-4ef5e5baa8fd',
|
|
26
|
+
'apps.polylog.sink.register',
|
|
27
|
+
'event'
|
|
28
|
+
);
|
|
29
|
+
`);
|
|
30
|
+
}
|
|
31
|
+
async down(queryRunner) {
|
|
32
|
+
await queryRunner.query(`
|
|
33
|
+
DELETE FROM \`PolylogChannels\`
|
|
34
|
+
WHERE \`sinkId\` = '842d690c-def5-452b-9c6e-4ef5e5baa8fd'
|
|
35
|
+
AND \`type\` IN (
|
|
36
|
+
'apps.polylog.source.register',
|
|
37
|
+
'apps.polylog.sink.register'
|
|
38
|
+
);
|
|
39
|
+
`);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.ChannelData1750186763062 = ChannelData1750186763062;
|
|
43
|
+
//# sourceMappingURL=1750186763062-ChannelData.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1750186763062-ChannelData.js","sourceRoot":"","sources":["../../../../libs/polylog/src/migrations/1750186763062-ChannelData.ts"],"names":[],"mappings":";;;AAEA,MAAa,wBAAwB;IAC5B,KAAK,CAAC,EAAE,CAAC,WAAwB;QACtC,MAAM,WAAW,CAAC,KAAK,CAAC;;;;;;;;;;;;;;;;;;;;;;;KAuBvB,CAAC,CAAC;IACL,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,WAAwB;QACxC,MAAM,WAAW,CAAC,KAAK,CAAC;;;;;;;KAOvB,CAAC,CAAC;IACL,CAAC;CACF;AAtCD,4DAsCC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SourceData1750186763130 = void 0;
|
|
4
|
+
class SourceData1750186763130 {
|
|
5
|
+
async up(queryRunner) {
|
|
6
|
+
await queryRunner.query(`
|
|
7
|
+
INSERT INTO \`PolylogSources\` (\`id\`, \`userId\`, \`clientId\`, \`workspaceId\`, \`category\`, \`typeId\`, \`key\`, \`name\`, \`desc\`)
|
|
8
|
+
VALUES (
|
|
9
|
+
'ee9250c1-ba4c-4107-89dd-f36f427c90d2',
|
|
10
|
+
'c93cd3f3-5538-4020-9329-da7bddcff4c7',
|
|
11
|
+
'localhost',
|
|
12
|
+
'23b9b543-2240-493b-88b3-4c8478941d92',
|
|
13
|
+
'event',
|
|
14
|
+
'3b583696-5d77-4bd2-af2f-340efe1d6999',
|
|
15
|
+
'apps_polylog',
|
|
16
|
+
'apps/polylog',
|
|
17
|
+
'Primary event source'
|
|
18
|
+
);
|
|
19
|
+
`);
|
|
20
|
+
}
|
|
21
|
+
async down(queryRunner) {
|
|
22
|
+
await queryRunner.query(`
|
|
23
|
+
DELETE FROM \`PolylogSources\`
|
|
24
|
+
WHERE \`id\` = 'ee9250c1-ba4c-4107-89dd-f36f427c90d2';
|
|
25
|
+
`);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.SourceData1750186763130 = SourceData1750186763130;
|
|
29
|
+
//# sourceMappingURL=1750186763130-SourceData.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1750186763130-SourceData.js","sourceRoot":"","sources":["../../../../libs/polylog/src/migrations/1750186763130-SourceData.ts"],"names":[],"mappings":";;;AAEA,MAAa,uBAAuB;IAC3B,KAAK,CAAC,EAAE,CAAC,WAAwB;QACtC,MAAM,WAAW,CAAC,KAAK,CAAC;;;;;;;;;;;;;GAazB,CAAC,CAAC;IACH,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,WAAwB;QACxC,MAAM,WAAW,CAAC,KAAK,CAAC;;;KAGvB,CAAC,CAAC;IACL,CAAC;CACF;AAxBD,0DAwBC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.migrations = void 0;
|
|
4
|
+
const _1750186475187_Channels_1 = require("./1750186475187-Channels");
|
|
5
|
+
const _1750186475261_EventLogs_1 = require("./1750186475261-EventLogs");
|
|
6
|
+
const _1750186475329_Events_1 = require("./1750186475329-Events");
|
|
7
|
+
const _1750186475466_Sinks_1 = require("./1750186475466-Sinks");
|
|
8
|
+
const _1750186475532_SinkTypes_1 = require("./1750186475532-SinkTypes");
|
|
9
|
+
const _1750186475601_Sources_1 = require("./1750186475601-Sources");
|
|
10
|
+
const _1750186475675_SourceTypes_1 = require("./1750186475675-SourceTypes");
|
|
11
|
+
const _1750186762829_SourceTypeData_1 = require("./1750186762829-SourceTypeData");
|
|
12
|
+
const _1750186762911_SinkTypeData_1 = require("./1750186762911-SinkTypeData");
|
|
13
|
+
const _1750186762995_SinkData_1 = require("./1750186762995-SinkData");
|
|
14
|
+
const _1750186763062_ChannelData_1 = require("./1750186763062-ChannelData");
|
|
15
|
+
const _1750186763130_SourceData_1 = require("./1750186763130-SourceData");
|
|
16
|
+
exports.migrations = [
|
|
17
|
+
_1750186475187_Channels_1.Channels1750186475187,
|
|
18
|
+
_1750186475261_EventLogs_1.EventLogs1750186475261,
|
|
19
|
+
_1750186475329_Events_1.Events1750186475329,
|
|
20
|
+
_1750186475466_Sinks_1.Sinks1750186475466,
|
|
21
|
+
_1750186475532_SinkTypes_1.SinkTypes1750186475532,
|
|
22
|
+
_1750186475601_Sources_1.Sources1750186475601,
|
|
23
|
+
_1750186475675_SourceTypes_1.SourceTypes1750186475675,
|
|
24
|
+
_1750186762829_SourceTypeData_1.SourceTypeData1750186762829,
|
|
25
|
+
_1750186762911_SinkTypeData_1.SinkTypeData1750186762911,
|
|
26
|
+
_1750186762995_SinkData_1.SinkData1750186762995,
|
|
27
|
+
_1750186763062_ChannelData_1.ChannelData1750186763062,
|
|
28
|
+
_1750186763130_SourceData_1.SourceData1750186763130,
|
|
29
|
+
];
|
|
30
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/polylog/src/migrations/index.ts"],"names":[],"mappings":";;;AAAA,sEAAiE;AACjE,wEAAmE;AACnE,kEAA6D;AAC7D,gEAA2D;AAC3D,wEAAmE;AACnE,oEAA+D;AAC/D,4EAAuE;AACvE,kFAA6E;AAC7E,8EAAyE;AACzE,sEAAiE;AACjE,4EAAuE;AACvE,0EAAqE;AAExD,QAAA,UAAU,GAAG;IACxB,+CAAqB;IACrB,iDAAsB;IACtB,2CAAmB;IACnB,yCAAkB;IAClB,iDAAsB;IACtB,6CAAoB;IACpB,qDAAwB;IACxB,2DAA2B;IAC3B,uDAAyB;IACzB,+CAAqB;IACrB,qDAAwB;IACxB,mDAAuB;CACxB,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@thescaffold/ntx-apps-polylog",
|
|
3
|
+
"version": "0.0.10",
|
|
4
|
+
"dependencies": {
|
|
5
|
+
"@nestjs/axios": "^3.0.2",
|
|
6
|
+
"@nestjs/common": "^10.3.9",
|
|
7
|
+
"@nestjs/config": "^3.2.2",
|
|
8
|
+
"@nestjs/core": "^10.3.9",
|
|
9
|
+
"@thescaffold/jsx-polylog": "*"
|
|
10
|
+
},
|
|
11
|
+
"sideEffects": false,
|
|
12
|
+
"typings": "index.d.ts",
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"default": "./index.js"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { NestMiddleware } from '@nestjs/common';
|
|
2
|
+
import { ConfigService } from '@nestjs/config';
|
|
3
|
+
import { CacheService, PlatformService, QuickHttpService, TrackerService } from '@thescaffold/ntx-core';
|
|
4
|
+
export declare class AuthMiddleware implements NestMiddleware {
|
|
5
|
+
private readonly trackerService;
|
|
6
|
+
private readonly configService;
|
|
7
|
+
private readonly quickHttpService;
|
|
8
|
+
private readonly platformService;
|
|
9
|
+
private readonly cacheService;
|
|
10
|
+
exemptedDomains: string[];
|
|
11
|
+
constructor(trackerService: TrackerService, configService: ConfigService, quickHttpService: QuickHttpService, platformService: PlatformService, cacheService: CacheService);
|
|
12
|
+
use(req: any, res: any, next: () => void): Promise<void>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
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.AuthMiddleware = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const config_1 = require("@nestjs/config");
|
|
15
|
+
const ntx_core_1 = require("@thescaffold/ntx-core");
|
|
16
|
+
let AuthMiddleware = class AuthMiddleware {
|
|
17
|
+
constructor(trackerService, configService, quickHttpService, platformService, cacheService) {
|
|
18
|
+
this.trackerService = trackerService;
|
|
19
|
+
this.configService = configService;
|
|
20
|
+
this.quickHttpService = quickHttpService;
|
|
21
|
+
this.platformService = platformService;
|
|
22
|
+
this.cacheService = cacheService;
|
|
23
|
+
this.exemptedDomains = [
|
|
24
|
+
'localhost',
|
|
25
|
+
'127.0.0.1',
|
|
26
|
+
'form.origi.ne',
|
|
27
|
+
`form.${this.configService.get('APP_URL')}`,
|
|
28
|
+
];
|
|
29
|
+
}
|
|
30
|
+
async use(req, res, next) {
|
|
31
|
+
var _a, _b, _c, _d;
|
|
32
|
+
if (((_a = req === null || req === void 0 ? void 0 : req.method) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === 'options') {
|
|
33
|
+
return (0, ntx_core_1.rawResponse)(this.trackerService, this.configService, req, res, common_1.HttpStatus.NO_CONTENT);
|
|
34
|
+
}
|
|
35
|
+
const url = (_c = (_b = req.headers) === null || _b === void 0 ? void 0 : _b.referer) !== null && _c !== void 0 ? _c : (_d = req.headers) === null || _d === void 0 ? void 0 : _d.origin;
|
|
36
|
+
var parsedURL = new URL(url);
|
|
37
|
+
if (this.exemptedDomains.includes(parsedURL.hostname)) {
|
|
38
|
+
return next();
|
|
39
|
+
}
|
|
40
|
+
const authorization = req.headers['authorization'];
|
|
41
|
+
if (!authorization) {
|
|
42
|
+
return (0, ntx_core_1.rawResponse)(this.trackerService, this.configService, req, res, common_1.HttpStatus.BAD_REQUEST, 'error', 'Ingest', 'Provide an authorization token in the header of your request');
|
|
43
|
+
}
|
|
44
|
+
const callback = async () => {
|
|
45
|
+
const [status, message, data] = await this.platformService.apps.identity.post.verifyToken(authorization);
|
|
46
|
+
return data;
|
|
47
|
+
};
|
|
48
|
+
const { data: { user, client, workspace, roles, permissions, scope }, } = await this.cacheService.cache((0, ntx_core_1.generateHmac)({ authorization }), callback, 1000 * 60 * 60);
|
|
49
|
+
if (!user.id || !client.id || !workspace.id) {
|
|
50
|
+
return (0, ntx_core_1.rawResponse)(this.trackerService, this.configService, req, res, common_1.HttpStatus.BAD_REQUEST, 'error', 'Ingest', 'Invalid authorization token in the header of your request');
|
|
51
|
+
}
|
|
52
|
+
req.headers['x-ntx-user'] = (0, ntx_core_1.toBase64)(JSON.stringify(user));
|
|
53
|
+
req.headers['x-ntx-user-id'] = user.id;
|
|
54
|
+
req.headers['x-ntx-client'] = (0, ntx_core_1.toBase64)(JSON.stringify(client));
|
|
55
|
+
req.headers['x-ntx-client-id'] = client.id;
|
|
56
|
+
req.headers['x-ntx-workspace'] = (0, ntx_core_1.toBase64)(JSON.stringify(workspace));
|
|
57
|
+
req.headers['x-ntx-workspace-id'] = workspace.id;
|
|
58
|
+
return next();
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
exports.AuthMiddleware = AuthMiddleware;
|
|
62
|
+
exports.AuthMiddleware = AuthMiddleware = __decorate([
|
|
63
|
+
(0, common_1.Injectable)(),
|
|
64
|
+
__metadata("design:paramtypes", [ntx_core_1.TrackerService,
|
|
65
|
+
config_1.ConfigService,
|
|
66
|
+
ntx_core_1.QuickHttpService,
|
|
67
|
+
ntx_core_1.PlatformService,
|
|
68
|
+
ntx_core_1.CacheService])
|
|
69
|
+
], AuthMiddleware);
|
|
70
|
+
//# sourceMappingURL=auth.middleware.js.map
|