@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,135 @@
|
|
|
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.Sink = void 0;
|
|
13
|
+
const ntx_core_1 = require("@thescaffold/ntx-core");
|
|
14
|
+
const mustache_1 = require("mustache");
|
|
15
|
+
const typeorm_1 = require("typeorm");
|
|
16
|
+
const app_config_1 = require("../../../app.config");
|
|
17
|
+
const channel_entity_1 = require("../../channel/entities/channel.entity");
|
|
18
|
+
const sink_type_1 = require("../../sink-type");
|
|
19
|
+
let Sink = class Sink extends ntx_core_1.BaseEntity {
|
|
20
|
+
};
|
|
21
|
+
exports.Sink = Sink;
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, typeorm_1.Column)('char', {
|
|
24
|
+
name: 'userId',
|
|
25
|
+
length: 36,
|
|
26
|
+
transformer: {
|
|
27
|
+
to: (value) => value,
|
|
28
|
+
from: (value) => {
|
|
29
|
+
if (value && value.includes('{{')) {
|
|
30
|
+
return (0, mustache_1.render)(value, process.env);
|
|
31
|
+
}
|
|
32
|
+
return value;
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
}),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], Sink.prototype, "userId", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.Column)('varchar', {
|
|
40
|
+
name: 'clientId',
|
|
41
|
+
length: 52,
|
|
42
|
+
transformer: {
|
|
43
|
+
to: (value) => value,
|
|
44
|
+
from: (value) => {
|
|
45
|
+
if (value && value.includes('{{')) {
|
|
46
|
+
return (0, mustache_1.render)(value, process.env);
|
|
47
|
+
}
|
|
48
|
+
return value;
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
}),
|
|
52
|
+
__metadata("design:type", String)
|
|
53
|
+
], Sink.prototype, "clientId", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, typeorm_1.Column)('char', {
|
|
56
|
+
name: 'workspaceId',
|
|
57
|
+
length: 36,
|
|
58
|
+
transformer: {
|
|
59
|
+
to: (value) => value,
|
|
60
|
+
from: (value) => {
|
|
61
|
+
if (value && value.includes('{{')) {
|
|
62
|
+
return (0, mustache_1.render)(value, process.env);
|
|
63
|
+
}
|
|
64
|
+
return value;
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
}),
|
|
68
|
+
__metadata("design:type", String)
|
|
69
|
+
], Sink.prototype, "workspaceId", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, typeorm_1.Column)('varchar', { name: 'category', length: 52 }),
|
|
72
|
+
__metadata("design:type", String)
|
|
73
|
+
], Sink.prototype, "category", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, typeorm_1.Column)('varchar', { name: 'key', length: 52, nullable: true }),
|
|
76
|
+
__metadata("design:type", String)
|
|
77
|
+
], Sink.prototype, "key", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
(0, typeorm_1.Column)('varchar', { name: 'visibility', nullable: true, length: 52 }),
|
|
80
|
+
__metadata("design:type", String)
|
|
81
|
+
], Sink.prototype, "visibility", void 0);
|
|
82
|
+
__decorate([
|
|
83
|
+
(0, typeorm_1.Column)('char', { name: 'typeId', length: 36 }),
|
|
84
|
+
__metadata("design:type", String)
|
|
85
|
+
], Sink.prototype, "typeId", void 0);
|
|
86
|
+
__decorate([
|
|
87
|
+
(0, typeorm_1.ManyToOne)((type) => sink_type_1.SinkType, (sinkType) => sinkType.sinks, {
|
|
88
|
+
createForeignKeyConstraints: false,
|
|
89
|
+
}),
|
|
90
|
+
__metadata("design:type", sink_type_1.SinkType)
|
|
91
|
+
], Sink.prototype, "type", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
(0, typeorm_1.Column)('varchar', { name: 'name', length: 255 }),
|
|
94
|
+
__metadata("design:type", String)
|
|
95
|
+
], Sink.prototype, "name", void 0);
|
|
96
|
+
__decorate([
|
|
97
|
+
(0, typeorm_1.Column)('varchar', { name: 'desc', nullable: true, length: 255 }),
|
|
98
|
+
__metadata("design:type", String)
|
|
99
|
+
], Sink.prototype, "desc", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
(0, typeorm_1.Column)('json', {
|
|
102
|
+
name: 'meta',
|
|
103
|
+
nullable: true,
|
|
104
|
+
transformer: {
|
|
105
|
+
to: (value) => value,
|
|
106
|
+
from: (value) => {
|
|
107
|
+
if (value) {
|
|
108
|
+
const jsonValue = JSON.stringify(value);
|
|
109
|
+
if (jsonValue.includes('{{')) {
|
|
110
|
+
return JSON.parse((0, mustache_1.render)(jsonValue, process.env));
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
return value;
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
}),
|
|
117
|
+
__metadata("design:type", Object)
|
|
118
|
+
], Sink.prototype, "meta", void 0);
|
|
119
|
+
__decorate([
|
|
120
|
+
(0, typeorm_1.Column)('varchar', { name: 'status', nullable: true, length: 52 }),
|
|
121
|
+
__metadata("design:type", String)
|
|
122
|
+
], Sink.prototype, "status", void 0);
|
|
123
|
+
__decorate([
|
|
124
|
+
(0, typeorm_1.OneToMany)((type) => channel_entity_1.Channel, (channel) => channel.sink),
|
|
125
|
+
__metadata("design:type", Array)
|
|
126
|
+
], Sink.prototype, "channels", void 0);
|
|
127
|
+
exports.Sink = Sink = __decorate([
|
|
128
|
+
(0, typeorm_1.Entity)({
|
|
129
|
+
name: 'PolylogSinks',
|
|
130
|
+
orderBy: {
|
|
131
|
+
createdAt: 'DESC',
|
|
132
|
+
},
|
|
133
|
+
})
|
|
134
|
+
], Sink);
|
|
135
|
+
//# sourceMappingURL=sink.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sink.entity.js","sourceRoot":"","sources":["../../../../../../libs/polylog/src/api/sink/entities/sink.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiE;AACjE,uCAAkC;AAClC,qCAA+D;AAC/D,oDAAqD;AACrD,0EAAgE;AAChE,+CAA2C;AAQpC,IAAM,IAAI,GAAV,MAAM,IAAK,SAAQ,qBAAU;CA6FnC,CAAA;AA7FY,oBAAI;AAcf;IAbC,IAAA,gBAAM,EAAC,MAAM,EAAE;QACd,IAAI,EAAE,QAAQ;QACd,MAAM,EAAE,EAAE;QACV,WAAW,EAAE;YACX,EAAE,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,KAAK;YAC5B,IAAI,EAAE,CAAC,KAAa,EAAE,EAAE;gBACtB,IAAI,KAAK,IAAI,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;oBAClC,OAAO,IAAA,iBAAM,EAAC,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;gBACpC,CAAC;gBACD,OAAO,KAAK,CAAC;YACf,CAAC;SACF;KACF,CAAC;;oCACa;AAef;IAbC,IAAA,gBAAM,EAAC,SAAS,EAAE;QACjB,IAAI,EAAE,UAAU;QAChB,MAAM,EAAE,EAAE;QACV,WAAW,EAAE;YACX,EAAE,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,KAAK;YAC5B,IAAI,EAAE,CAAC,KAAa,EAAE,EAAE;gBACtB,IAAI,KAAK,IAAI,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;oBAClC,OAAO,IAAA,iBAAM,EAAC,KAAK,EAAE,OA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|
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-sink.dto"), exports);
|
|
18
|
+
__exportStar(require("./dto/update-sink.dto"), exports);
|
|
19
|
+
__exportStar(require("./entities/sink.entity"), exports);
|
|
20
|
+
__exportStar(require("./sink.controller"), exports);
|
|
21
|
+
__exportStar(require("./sink.service"), exports);
|
|
22
|
+
__exportStar(require("./sink.module"), exports);
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/polylog/src/api/sink/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,wDAAsC;AACtC,yDAAuC;AACvC,oDAAkC;AAClC,iDAA+B;AAC/B,gDAA8B"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { LanguageService, MediaService } from '@thescaffold/ntx-core';
|
|
2
|
+
import { CreateSinkDto } from './dto/create-sink.dto';
|
|
3
|
+
import { UpdateSinkDto } from './dto/update-sink.dto';
|
|
4
|
+
import { Sink } from './entities/sink.entity';
|
|
5
|
+
import { SinkService } from './sink.service';
|
|
6
|
+
declare const SinkController_base: import("@nestjs/common").Type<import("@thescaffold/ntx-core").CrudControllerContract<Sink, CreateSinkDto, UpdateSinkDto>>;
|
|
7
|
+
export declare class SinkController extends SinkController_base {
|
|
8
|
+
private readonly sinkService;
|
|
9
|
+
protected readonly languageService: LanguageService;
|
|
10
|
+
protected readonly mediaService: MediaService;
|
|
11
|
+
protected name: string;
|
|
12
|
+
protected searchable: string[];
|
|
13
|
+
protected service: SinkService;
|
|
14
|
+
protected unique: ({ workspaceId, name }: Sink) => {
|
|
15
|
+
workspaceId: string;
|
|
16
|
+
name: string;
|
|
17
|
+
}[];
|
|
18
|
+
protected morphRequest: (entity: Sink) => Sink;
|
|
19
|
+
protected morphs: {
|
|
20
|
+
beforeCreate: (payload: any, context: any) => Promise<any>;
|
|
21
|
+
};
|
|
22
|
+
protected hooks: {};
|
|
23
|
+
constructor(sinkService: SinkService, languageService: LanguageService, mediaService: MediaService);
|
|
24
|
+
}
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
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.SinkController = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const ntx_core_1 = require("@thescaffold/ntx-core");
|
|
15
|
+
const create_sink_dto_1 = require("./dto/create-sink.dto");
|
|
16
|
+
const update_sink_dto_1 = require("./dto/update-sink.dto");
|
|
17
|
+
const sink_entity_1 = require("./entities/sink.entity");
|
|
18
|
+
const sink_service_1 = require("./sink.service");
|
|
19
|
+
let SinkController = class SinkController extends (0, ntx_core_1.CrudControllerFactory)(create_sink_dto_1.CreateSinkDto, update_sink_dto_1.UpdateSinkDto, sink_entity_1.Sink) {
|
|
20
|
+
constructor(sinkService, languageService, mediaService) {
|
|
21
|
+
super();
|
|
22
|
+
this.sinkService = sinkService;
|
|
23
|
+
this.languageService = languageService;
|
|
24
|
+
this.mediaService = mediaService;
|
|
25
|
+
this.name = 'sink';
|
|
26
|
+
this.searchable = ['name', 'desc'];
|
|
27
|
+
this.service = this.sinkService;
|
|
28
|
+
this.unique = ({ workspaceId, name }) => [{ workspaceId, name }];
|
|
29
|
+
this.morphRequest = (entity) => entity;
|
|
30
|
+
this.morphs = {
|
|
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
|
+
this.hooks = {};
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
exports.SinkController = SinkController;
|
|
41
|
+
exports.SinkController = SinkController = __decorate([
|
|
42
|
+
(0, common_1.Controller)('sink'),
|
|
43
|
+
__metadata("design:paramtypes", [sink_service_1.SinkService,
|
|
44
|
+
ntx_core_1.LanguageService,
|
|
45
|
+
ntx_core_1.MediaService])
|
|
46
|
+
], SinkController);
|
|
47
|
+
//# sourceMappingURL=sink.controller.js.map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rB,CAAC;CACF,CAAA;AA/BY,wCAAc;yBAAd,cAAc;IAD1B,IAAA,mBAAU,EAAC,MAAM,CAAC;qCA0Be,0BAAW;QACL,0BAAe;QAClB,uBAAY;GA3BpC,cAAc,CA+B1B"}
|
|
@@ -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.SinkModule = 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 sink_entity_1 = require("./entities/sink.entity");
|
|
14
|
+
const sink_controller_1 = require("./sink.controller");
|
|
15
|
+
const sink_service_1 = require("./sink.service");
|
|
16
|
+
let SinkModule = class SinkModule {
|
|
17
|
+
};
|
|
18
|
+
exports.SinkModule = SinkModule;
|
|
19
|
+
exports.SinkModule = SinkModule = __decorate([
|
|
20
|
+
(0, common_1.Module)({
|
|
21
|
+
imports: [typeorm_1.TypeOrmModule.forFeature([sink_entity_1.Sink]), (0, common_1.forwardRef)(() => ntx_core_1.ServicesModule)],
|
|
22
|
+
controllers: [sink_controller_1.SinkController],
|
|
23
|
+
providers: [sink_service_1.SinkService],
|
|
24
|
+
exports: [sink_service_1.SinkService],
|
|
25
|
+
})
|
|
26
|
+
], SinkModule);
|
|
27
|
+
//# sourceMappingURL=sink.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sink.module.js","sourceRoot":"","sources":["../../../../../libs/polylog/src/api/sink/sink.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAoD;AACpD,6CAAgD;AAChD,oDAAuD;AACvD,wDAA8C;AAC9C,uDAAmD;AACnD,iDAA6C;AAQtC,IAAM,UAAU,GAAhB,MAAM,UAAU;CAAG,CAAA;AAAb,gCAAU;qBAAV,UAAU;IANtB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,uBAAa,CAAC,UAAU,CAAC,CAAC,kBAAI,CAAC,CAAC,EAAE,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,yBAAc,CAAC,CAAC;QAC7E,WAAW,EAAE,CAAC,gCAAc,CAAC;QAC7B,SAAS,EAAE,CAAC,0BAAW,CAAC;QACxB,OAAO,EAAE,CAAC,0BAAW,CAAC;KACvB,CAAC;GACW,UAAU,CAAG"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ConfigService } from '@nestjs/config';
|
|
2
|
+
import { BaseRepository, LanguageService, MediaService, PermissionScopeType, TrackerService } from '@thescaffold/ntx-core';
|
|
3
|
+
import { Sink } from './entities/sink.entity';
|
|
4
|
+
export declare class SinkService extends BaseRepository<Sink> {
|
|
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.SinkService = 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 sink_entity_1 = require("./entities/sink.entity");
|
|
22
|
+
let SinkService = class SinkService extends ntx_core_1.BaseRepository {
|
|
23
|
+
constructor(request, trackerService, configService, languageService, mediaService) {
|
|
24
|
+
super(request, sink_entity_1.Sink);
|
|
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.SinkService = SinkService;
|
|
35
|
+
_a = ntx_core_1.PermissionScopeType.Self;
|
|
36
|
+
_b = ntx_core_1.PermissionScopeType.Workspace;
|
|
37
|
+
_c = ntx_core_1.PermissionScopeType.Global;
|
|
38
|
+
exports.SinkService = SinkService = __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
|
+
], SinkService);
|
|
46
|
+
//# sourceMappingURL=sink.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sink.service.js","sourceRoot":"","sources":["../../../../../libs/polylog/src/api/sink/sink.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAA2D;AAC3D,2CAA+C;AAC/C,uCAAuC;AACvC,oDAM+B;AAC/B,wDAA8C;AAGvC,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,yBAAoB;IAOnD,YACmB,OAAY,EACV,cAA8B,EAC9B,aAA4B,EAC5B,eAAgC,EAChC,YAA0B;QAE7C,KAAK,CAAC,OAAO,EAAE,kBAAI,CAAC,CAAC;QALF,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,kCAAW;KACX,8BAAmB,CAAC,IAAI;KAExB,8BAAmB,CAAC,SAAS;KAE7B,8BAAmB,CAAC,MAAM;sBAL1B,WAAW;IADvB,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,WAAW,CAgBvB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CategoryType } from '@thescaffold/ntx-core';
|
|
2
|
+
import { VisibilityType } from '../../../app.config';
|
|
3
|
+
export declare class CreateSinkTypeDto {
|
|
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.CreateSinkTypeDto = 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 CreateSinkTypeDto {
|
|
18
|
+
}
|
|
19
|
+
exports.CreateSinkTypeDto = CreateSinkTypeDto;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, class_validator_1.IsEnum)(ntx_core_1.CategoryType),
|
|
22
|
+
(0, swagger_1.ApiProperty)(),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], CreateSinkTypeDto.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
|
+
], CreateSinkTypeDto.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
|
+
], CreateSinkTypeDto.prototype, "visibility", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, class_validator_1.IsString)(),
|
|
39
|
+
(0, swagger_1.ApiProperty)(),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], CreateSinkTypeDto.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
|
+
], CreateSinkTypeDto.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
|
+
], CreateSinkTypeDto.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
|
+
], CreateSinkTypeDto.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
|
+
], CreateSinkTypeDto.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
|
+
], CreateSinkTypeDto.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
|
+
], CreateSinkTypeDto.prototype, "meta", void 0);
|
|
79
|
+
//# sourceMappingURL=create-sink-type.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-sink-type.dto.js","sourceRoot":"","sources":["../../../../../../libs/polylog/src/api/sink-type/dto/create-sink-type.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAmE;AACnE,oDAAqD;AACrD,qDAMyB;AACzB,oDAAqD;AAErD,MAAa,iBAAiB;CAiD7B;AAjDD,8CAiDC;AA9CC;IAFC,IAAA,wBAAM,EAAC,uBAAY,CAAC;IACpB,IAAA,qBAAW,GAAE;;mDACS;AAKvB;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;8CACT;AAKb;IAHC,IAAA,wBAAM,EAAC,2BAAc,CAAC;IACtB,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;qDACM;AAI5B;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,GAAE;;+CACD;AAKb;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,6BAAmB,GAAE;;+CACR;AAKd;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;iDACN;AAKhB;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;uDACA;AAKtB;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;oDACH;AAMnB;IAJC,IAAA,yBAAO,GAAE;IACT,IAAA,0BAAQ,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IACxB,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;+CACN;AAKhB;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;+CACX"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CategoryType } from '@thescaffold/ntx-core';
|
|
2
|
+
import { VisibilityType } from '../../../app.config';
|
|
3
|
+
export declare class UpdateSinkTypeDto {
|
|
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.UpdateSinkTypeDto = 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 UpdateSinkTypeDto {
|
|
18
|
+
}
|
|
19
|
+
exports.UpdateSinkTypeDto = UpdateSinkTypeDto;
|
|
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
|
+
], UpdateSinkTypeDto.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
|
+
], UpdateSinkTypeDto.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
|
+
], UpdateSinkTypeDto.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
|
+
], UpdateSinkTypeDto.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
|
+
], UpdateSinkTypeDto.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
|
+
], UpdateSinkTypeDto.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
|
+
], UpdateSinkTypeDto.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
|
+
], UpdateSinkTypeDto.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
|
+
], UpdateSinkTypeDto.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
|
+
], UpdateSinkTypeDto.prototype, "meta", void 0);
|
|
81
|
+
//# sourceMappingURL=update-sink-type.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-sink-type.dto.js","sourceRoot":"","sources":["../../../../../../libs/polylog/src/api/sink-type/dto/update-sink-type.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAsD;AACtD,oDAAqD;AACrD,qDAMyB;AACzB,oDAAqD;AAErD,MAAa,iBAAiB;CAmD7B;AAnDD,8CAmDC;AA/CC;IAHC,IAAA,wBAAM,EAAC,uBAAY,CAAC;IACpB,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;mDACE;AAKxB;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;8CACT;AAKb;IAHC,IAAA,wBAAM,EAAC,2BAAc,CAAC;IACtB,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;qDACM;AAK5B;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,6BAAmB,GAAE;;+CACR;AAKd;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,6BAAmB,GAAE;;+CACR;AAKd;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;iDACN;AAKhB;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;uDACA;AAKtB;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;oDACH;AAMnB;IAJC,IAAA,yBAAO,GAAE;IACT,IAAA,0BAAQ,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IACxB,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;+CACN;AAKhB;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;+CACX"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BaseEntity, CategoryType } from '@thescaffold/ntx-core';
|
|
2
|
+
import { VisibilityType } from '../../../app.config';
|
|
3
|
+
import { Sink } from '../../sink/entities/sink.entity';
|
|
4
|
+
export declare class SinkType 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
|
+
sinks?: Sink[];
|
|
16
|
+
}
|