@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,62 @@
|
|
|
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.CreateEventDto = 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 CreateEventDto {
|
|
18
|
+
}
|
|
19
|
+
exports.CreateEventDto = CreateEventDto;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, class_validator_1.IsUUID)(),
|
|
22
|
+
(0, swagger_1.ApiProperty)(),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], CreateEventDto.prototype, "entityId", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_validator_1.IsEnum)(ntx_core_1.EventEntityType),
|
|
27
|
+
(0, swagger_1.ApiProperty)(),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], CreateEventDto.prototype, "entityName", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, class_validator_1.IsEnum)(ntx_core_1.CategoryType),
|
|
32
|
+
(0, swagger_1.ApiProperty)(),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], CreateEventDto.prototype, "category", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, class_validator_1.IsOptional)(),
|
|
37
|
+
(0, class_validator_1.IsString)(),
|
|
38
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], CreateEventDto.prototype, "type", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, class_validator_1.IsString)(),
|
|
43
|
+
(0, swagger_1.ApiProperty)(),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], CreateEventDto.prototype, "reference", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, class_validator_1.IsString)(),
|
|
48
|
+
(0, swagger_1.ApiProperty)(),
|
|
49
|
+
__metadata("design:type", String)
|
|
50
|
+
], CreateEventDto.prototype, "version", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, class_validator_1.IsObject)(),
|
|
53
|
+
(0, swagger_1.ApiProperty)(),
|
|
54
|
+
__metadata("design:type", Object)
|
|
55
|
+
], CreateEventDto.prototype, "payload", 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
|
+
], CreateEventDto.prototype, "status", void 0);
|
|
62
|
+
//# sourceMappingURL=create-event.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-event.dto.js","sourceRoot":"","sources":["../../../../../../libs/polylog/src/api/event/dto/create-event.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAmE;AACnE,oDAAsE;AACtE,qDAMyB;AACzB,oDAAsD;AAEtD,MAAa,cAAc;CAkC1B;AAlCD,wCAkCC;AA/BC;IAFC,IAAA,wBAAM,GAAE;IACR,IAAA,qBAAW,GAAE;;gDACG;AAIjB;IAFC,IAAA,wBAAM,EAAC,0BAAe,CAAC;IACvB,IAAA,qBAAW,GAAE;;kDACc;AAI5B;IAFC,IAAA,wBAAM,EAAC,uBAAY,CAAC;IACpB,IAAA,qBAAW,GAAE;;gDACS;AAKvB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,6BAAmB,GAAE;;4CACR;AAId;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,GAAE;;iDACI;AAIlB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,GAAE;;+CACE;AAIhB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,GAAE;;+CACD;AAKb;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;8CACG"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CategoryType, EventEntityType } from '@thescaffold/ntx-core';
|
|
2
|
+
import { EventStatusType } from '../../../app.config';
|
|
3
|
+
export declare class UpdateEventDto {
|
|
4
|
+
entityId?: string;
|
|
5
|
+
entityName?: EventEntityType;
|
|
6
|
+
category?: CategoryType;
|
|
7
|
+
type?: string;
|
|
8
|
+
reference?: string;
|
|
9
|
+
version?: string;
|
|
10
|
+
payload?: any;
|
|
11
|
+
status?: EventStatusType;
|
|
12
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
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.UpdateEventDto = 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 UpdateEventDto {
|
|
18
|
+
}
|
|
19
|
+
exports.UpdateEventDto = UpdateEventDto;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, class_validator_1.IsUUID)(),
|
|
22
|
+
(0, class_validator_1.IsOptional)(),
|
|
23
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], UpdateEventDto.prototype, "entityId", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, class_validator_1.IsEnum)(ntx_core_1.EventEntityType),
|
|
28
|
+
(0, class_validator_1.IsOptional)(),
|
|
29
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], UpdateEventDto.prototype, "entityName", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, class_validator_1.IsEnum)(ntx_core_1.CategoryType),
|
|
34
|
+
(0, class_validator_1.IsOptional)(),
|
|
35
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], UpdateEventDto.prototype, "category", 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
|
+
], UpdateEventDto.prototype, "type", 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
|
+
], UpdateEventDto.prototype, "reference", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, class_validator_1.IsOptional)(),
|
|
52
|
+
(0, class_validator_1.IsString)(),
|
|
53
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
54
|
+
__metadata("design:type", String)
|
|
55
|
+
], UpdateEventDto.prototype, "version", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, class_validator_1.IsOptional)(),
|
|
58
|
+
(0, class_validator_1.IsObject)(),
|
|
59
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
60
|
+
__metadata("design:type", Object)
|
|
61
|
+
], UpdateEventDto.prototype, "payload", 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
|
+
], UpdateEventDto.prototype, "status", void 0);
|
|
68
|
+
//# sourceMappingURL=update-event.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-event.dto.js","sourceRoot":"","sources":["../../../../../../libs/polylog/src/api/event/dto/update-event.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAsD;AACtD,oDAAsE;AACtE,qDAMyB;AACzB,oDAAsD;AAEtD,MAAa,cAAc;CAwC1B;AAxCD,wCAwCC;AApCC;IAHC,IAAA,wBAAM,GAAE;IACR,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;gDACJ;AAKlB;IAHC,IAAA,wBAAM,EAAC,0BAAe,CAAC;IACvB,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;kDACO;AAK7B;IAHC,IAAA,wBAAM,EAAC,uBAAY,CAAC;IACpB,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;gDACE;AAKxB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,6BAAmB,GAAE;;4CACR;AAKd;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,6BAAmB,GAAE;;iDACH;AAKnB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,6BAAmB,GAAE;;+CACL;AAKjB;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;;8CACG"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BaseEntity, CategoryType, EventEntityType } from '@thescaffold/ntx-core';
|
|
2
|
+
import { EventStatusType } from '../../../app.config';
|
|
3
|
+
import { EventLog } from '../../event-log/entities/event-log.entity';
|
|
4
|
+
export declare class Event extends BaseEntity {
|
|
5
|
+
userId: string;
|
|
6
|
+
clientId: string;
|
|
7
|
+
workspaceId: string;
|
|
8
|
+
entityId: string;
|
|
9
|
+
entityName: EventEntityType;
|
|
10
|
+
category: CategoryType;
|
|
11
|
+
type?: string;
|
|
12
|
+
reference: string;
|
|
13
|
+
version: string;
|
|
14
|
+
payload: any;
|
|
15
|
+
status?: EventStatusType;
|
|
16
|
+
logs?: EventLog[];
|
|
17
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
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.Event = 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 event_log_entity_1 = require("../../event-log/entities/event-log.entity");
|
|
17
|
+
let Event = class Event extends ntx_core_1.BaseEntity {
|
|
18
|
+
};
|
|
19
|
+
exports.Event = Event;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, typeorm_1.Column)('char', { name: 'userId', length: 36 }),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], Event.prototype, "userId", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, typeorm_1.Column)('char', { name: 'clientId', length: 36 }),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], Event.prototype, "clientId", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.Column)('char', { name: 'workspaceId', length: 36 }),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], Event.prototype, "workspaceId", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.Column)('char', { name: 'entityId', length: 36 }),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], Event.prototype, "entityId", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.Column)('varchar', { name: 'entity', length: 52 }),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], Event.prototype, "entityName", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typeorm_1.Column)('varchar', { name: 'category', length: 52 }),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], Event.prototype, "category", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typeorm_1.Column)('varchar', { name: 'type', length: 255, nullable: true }),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], Event.prototype, "type", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.Column)('varchar', { name: 'reference', length: 255 }),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], Event.prototype, "reference", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.Column)('char', { name: 'version', length: 36 }),
|
|
54
|
+
__metadata("design:type", String)
|
|
55
|
+
], Event.prototype, "version", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, typeorm_1.Column)('json', { name: 'payload' }),
|
|
58
|
+
__metadata("design:type", Object)
|
|
59
|
+
], Event.prototype, "payload", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, typeorm_1.Column)('varchar', { name: 'status', nullable: true, length: 52 }),
|
|
62
|
+
__metadata("design:type", String)
|
|
63
|
+
], Event.prototype, "status", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, typeorm_1.OneToMany)((type) => event_log_entity_1.EventLog, (eventLog) => eventLog.event),
|
|
66
|
+
__metadata("design:type", Array)
|
|
67
|
+
], Event.prototype, "logs", void 0);
|
|
68
|
+
exports.Event = Event = __decorate([
|
|
69
|
+
(0, typeorm_1.Entity)({
|
|
70
|
+
name: 'PolylogEvents',
|
|
71
|
+
orderBy: {
|
|
72
|
+
createdAt: 'DESC',
|
|
73
|
+
},
|
|
74
|
+
})
|
|
75
|
+
], Event);
|
|
76
|
+
//# sourceMappingURL=event.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event.entity.js","sourceRoot":"","sources":["../../../../../../libs/polylog/src/api/event/entities/event.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAI+B;AAC/B,qCAAoD;AACpD,oDAAsD;AACtD,gFAAqE;AAQ9D,IAAM,KAAK,GAAX,MAAM,KAAM,SAAQ,qBAAU;CAoCpC,CAAA;AApCY,sBAAK;AAEhB;IADC,IAAA,gBAAM,EAAC,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;;qCAChC;AAGf;IADC,IAAA,gBAAM,EAAC,MAAM,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;;uCAChC;AAGjB;IADC,IAAA,gBAAM,EAAC,MAAM,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;;0CAChC;AAGpB;IADC,IAAA,gBAAM,EAAC,MAAM,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;;uCAChC;AAGjB;IADC,IAAA,gBAAM,EAAC,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;;yCACtB;AAG5B;IADC,IAAA,gBAAM,EAAC,SAAS,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;;uCAC7B;AAGvB;IADC,IAAA,gBAAM,EAAC,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mCACnD;AAGd;IADC,IAAA,gBAAM,EAAC,SAAS,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;;wCACpC;AAGlB;IADC,IAAA,gBAAM,EAAC,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;;sCAChC;AAGhB;IADC,IAAA,gBAAM,EAAC,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;sCACvB;AAGb;IADC,IAAA,gBAAM,EAAC,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;;qCACzC;AAGzB;IADC,IAAA,mBAAS,EAAC,CAAC,IAAI,EAAE,EAAE,CAAC,2BAAQ,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC;;mCAC1C;gBAnCP,KAAK;IANjB,IAAA,gBAAM,EAAC;QACN,IAAI,EAAE,eAAe;QACrB,OAAO,EAAE;YACP,SAAS,EAAE,MAAM;SAClB;KACF,CAAC;GACW,KAAK,CAoCjB"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { LanguageService, MediaService } from '@thescaffold/ntx-core';
|
|
2
|
+
import { CreateEventDto } from './dto/create-event.dto';
|
|
3
|
+
import { UpdateEventDto } from './dto/update-event.dto';
|
|
4
|
+
import { Event } from './entities/event.entity';
|
|
5
|
+
import { EventService } from './event.service';
|
|
6
|
+
declare const EventController_base: import("@nestjs/common").Type<import("@thescaffold/ntx-core").CrudControllerContract<Event, CreateEventDto, UpdateEventDto>>;
|
|
7
|
+
export declare class EventController extends EventController_base {
|
|
8
|
+
private readonly eventService;
|
|
9
|
+
protected readonly languageService: LanguageService;
|
|
10
|
+
protected readonly mediaService: MediaService;
|
|
11
|
+
protected name: string;
|
|
12
|
+
protected searchable: any[];
|
|
13
|
+
protected service: EventService;
|
|
14
|
+
protected unique: (entity: Event) => any[];
|
|
15
|
+
protected morphRequest: (entity: Event) => Event;
|
|
16
|
+
protected morphs: {
|
|
17
|
+
beforeCreate: (payload: any, context: any) => Promise<any>;
|
|
18
|
+
};
|
|
19
|
+
protected hooks: {};
|
|
20
|
+
constructor(eventService: EventService, languageService: LanguageService, mediaService: MediaService);
|
|
21
|
+
dashboard(context: any, type?: string): Promise<{
|
|
22
|
+
status: string;
|
|
23
|
+
title: string;
|
|
24
|
+
message: string;
|
|
25
|
+
data: any;
|
|
26
|
+
meta: any;
|
|
27
|
+
raw: string;
|
|
28
|
+
headers: any;
|
|
29
|
+
}>;
|
|
30
|
+
}
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.EventController = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const ntx_core_1 = require("@thescaffold/ntx-core");
|
|
18
|
+
const app_config_1 = require("../../app.config");
|
|
19
|
+
const create_event_dto_1 = require("./dto/create-event.dto");
|
|
20
|
+
const update_event_dto_1 = require("./dto/update-event.dto");
|
|
21
|
+
const event_entity_1 = require("./entities/event.entity");
|
|
22
|
+
const event_service_1 = require("./event.service");
|
|
23
|
+
let EventController = class EventController extends (0, ntx_core_1.CrudControllerFactory)(create_event_dto_1.CreateEventDto, update_event_dto_1.UpdateEventDto, event_entity_1.Event) {
|
|
24
|
+
constructor(eventService, languageService, mediaService) {
|
|
25
|
+
super();
|
|
26
|
+
this.eventService = eventService;
|
|
27
|
+
this.languageService = languageService;
|
|
28
|
+
this.mediaService = mediaService;
|
|
29
|
+
this.name = 'event';
|
|
30
|
+
this.searchable = [];
|
|
31
|
+
this.service = this.eventService;
|
|
32
|
+
this.unique = (entity) => [];
|
|
33
|
+
this.morphRequest = (entity) => entity;
|
|
34
|
+
this.morphs = {
|
|
35
|
+
[ntx_core_1.CrudActionType.beforeCreate]: async (payload, context) => {
|
|
36
|
+
const { preference } = context;
|
|
37
|
+
const { user, client, workspace } = context;
|
|
38
|
+
return Object.assign(Object.assign({}, payload), { userId: user.id, clientId: client.id, workspaceId: workspace.id });
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
this.hooks = {};
|
|
42
|
+
}
|
|
43
|
+
async dashboard(context, type) {
|
|
44
|
+
const { preference } = context;
|
|
45
|
+
const completed = await this.eventService.withContext(context).count({
|
|
46
|
+
where: type
|
|
47
|
+
? [{ type, status: app_config_1.EventStatusType.Completed }]
|
|
48
|
+
: [{ status: app_config_1.EventStatusType.Completed }],
|
|
49
|
+
});
|
|
50
|
+
const inProgress = await this.eventService.withContext(context).count({
|
|
51
|
+
where: type
|
|
52
|
+
? [{ type, status: app_config_1.EventStatusType.InProgress }]
|
|
53
|
+
: [{ status: app_config_1.EventStatusType.InProgress }],
|
|
54
|
+
});
|
|
55
|
+
return (0, ntx_core_1.success)({
|
|
56
|
+
total: completed + inProgress,
|
|
57
|
+
completed,
|
|
58
|
+
inProgress,
|
|
59
|
+
}, this.translate('apps.polylog.event.title', null, preference), this.translate('apps.polylog.event.get.dashboard.success', null, preference));
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
exports.EventController = EventController;
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, common_1.Get)('dashboard'),
|
|
65
|
+
__param(0, (0, ntx_core_1.GetContext)()),
|
|
66
|
+
__param(1, (0, common_1.Query)('type')),
|
|
67
|
+
__metadata("design:type", Function),
|
|
68
|
+
__metadata("design:paramtypes", [Object, String]),
|
|
69
|
+
__metadata("design:returntype", Promise)
|
|
70
|
+
], EventController.prototype, "dashboard", null);
|
|
71
|
+
exports.EventController = EventController = __decorate([
|
|
72
|
+
(0, common_1.Controller)('event'),
|
|
73
|
+
__metadata("design:paramtypes", [event_service_1.EventService,
|
|
74
|
+
ntx_core_1.LanguageService,
|
|
75
|
+
ntx_core_1.MediaService])
|
|
76
|
+
], EventController);
|
|
77
|
+
//# sourceMappingURL=event.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event.controller.js","sourceRoot":"","sources":["../../../../../libs/polylog/src/api/event/event.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAwD;AACxD,oDAO+B;AAC/B,iDAAmD;AACnD,6DAAwD;AACxD,6DAAwD;AACxD,0DAAgD;AAChD,mDAA+C;AAGxC,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,IAAA,gCAAqB,EAIxD,iCAAc,EAAE,iCAAc,EAAE,oBAAK,CAAC;IAoBtC,YACmB,YAA0B,EACxB,eAAgC,EAChC,YAA0B;QAE7C,KAAK,EAAE,CAAC;QAJS,iBAAY,GAAZ,YAAY,CAAc;QACxB,oBAAe,GAAf,eAAe,CAAiB;QAChC,iBAAY,GAAZ,YAAY,CAAc;QAtBrC,SAAI,GAAG,OAAO,CAAC;QACf,eAAU,GAAG,EAAE,CAAC;QAChB,YAAO,GAAG,IAAI,CAAC,YAAY,CAAC;QAC5B,WAAM,GAAG,CAAC,MAAa,EAAE,EAAE,CAAC,EAAE,CAAC;QAC/B,iBAAY,GAAG,CAAC,MAAa,EAAE,EAAE,CAAC,MAAM,CAAC;QACzC,WAAM,GAAG;YACjB,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;gBAC5C,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;QACQ,UAAK,GAAG,EAAE,CAAC;IAQrB,CAAC;IAGK,AAAN,KAAK,CAAC,SAAS,CAAe,OAAY,EAAiB,IAAa;QACtE,MAAM,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;QAC/B,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC;YACnE,KAAK,EAAE,IAAI;gBACT,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,4BAAe,CAAC,SAAS,EAAE,CAAC;gBAC/C,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,4BAAe,CAAC,SAAS,EAAE,CAAC;SAC5C,CAAC,CAAC;QACH,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC;YACpE,KAAK,EAAE,IAAI;gBACT,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,4BAAe,CAAC,UAAU,EAAE,CAAC;gBAChD,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,4BAAe,CAAC,UAAU,EAAE,CAAC;SAC7C,CAAC,CAAC;QAEH,OAAO,IAAA,kBAAO,EACZ;YACE,KAAK,EAAE,SAAS,GAAG,UAAU;YAC7B,SAAS;YACT,UAAU;SACX,EACD,IAAI,CAAC,SAAS,CAAC,0BAA0B,EAAE,IAAI,EAAE,UAAU,CAAC,EAC5D,IAAI,CAAC,SAAS,CACZ,0CAA0C,EAC1C,IAAI,EACJ,UAAU,CACX,CACF,CAAC;IACJ,CAAC;CACF,CAAA;AA5DY,0CAAe;AAiCpB;IADL,IAAA,YAAG,EAAC,WAAW,CAAC;IACA,WAAA,IAAA,qBAAU,GAAE,CAAA;IAAgB,WAAA,IAAA,cAAK,EAAC,MAAM,CAAC,CAAA;;;;gDA0BzD;0BA3DU,eAAe;IAD3B,IAAA,mBAAU,EAAC,OAAO,CAAC;qCA0Be,4BAAY;QACP,0BAAe;QAClB,uBAAY;GA3BpC,eAAe,CA4D3B"}
|
|
@@ -0,0 +1,33 @@
|
|
|
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 EventModule_1;
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.EventModule = void 0;
|
|
11
|
+
const common_1 = require("@nestjs/common");
|
|
12
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
13
|
+
const ntx_core_1 = require("@thescaffold/ntx-core");
|
|
14
|
+
const event_entity_1 = require("./entities/event.entity");
|
|
15
|
+
const event_controller_1 = require("./event.controller");
|
|
16
|
+
const event_service_1 = require("./event.service");
|
|
17
|
+
let EventModule = EventModule_1 = class EventModule {
|
|
18
|
+
static register() {
|
|
19
|
+
return {
|
|
20
|
+
module: EventModule_1,
|
|
21
|
+
imports: [typeorm_1.TypeOrmModule.forFeature([event_entity_1.Event]), ntx_core_1.ServicesModule],
|
|
22
|
+
controllers: process.env.EDGE_SWITCH === 'on' ? [] : [event_controller_1.EventController],
|
|
23
|
+
providers: [event_service_1.EventService],
|
|
24
|
+
exports: [event_service_1.EventService],
|
|
25
|
+
global: true,
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
exports.EventModule = EventModule;
|
|
30
|
+
exports.EventModule = EventModule = EventModule_1 = __decorate([
|
|
31
|
+
(0, common_1.Module)({})
|
|
32
|
+
], EventModule);
|
|
33
|
+
//# sourceMappingURL=event.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event.module.js","sourceRoot":"","sources":["../../../../../libs/polylog/src/api/event/event.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAAuD;AACvD,6CAAgD;AAChD,oDAAuD;AACvD,0DAAgD;AAChD,yDAAqD;AACrD,mDAA+C;AAGxC,IAAM,WAAW,mBAAjB,MAAM,WAAW;IACtB,MAAM,CAAC,QAAQ;QACb,OAAO;YACL,MAAM,EAAE,aAAW;YACnB,OAAO,EAAE,CAAC,uBAAa,CAAC,UAAU,CAAC,CAAC,oBAAK,CAAC,CAAC,EAAE,yBAAc,CAAC;YAC5D,WAAW,EAAE,OAAO,CAAC,GAAG,CAAC,WAAW,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,kCAAe,CAAC;YACtE,SAAS,EAAE,CAAC,4BAAY,CAAC;YACzB,OAAO,EAAE,CAAC,4BAAY,CAAC;YACvB,MAAM,EAAE,IAAI;SACb,CAAC;IACJ,CAAC;CACF,CAAA;AAXY,kCAAW;sBAAX,WAAW;IADvB,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,WAAW,CAWvB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ConfigService } from '@nestjs/config';
|
|
2
|
+
import { BaseRepository, LanguageService, MediaService, PermissionScopeType, TrackerService } from '@thescaffold/ntx-core';
|
|
3
|
+
import { Event } from './entities/event.entity';
|
|
4
|
+
export declare class EventService extends BaseRepository<Event> {
|
|
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.EventService = 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 event_entity_1 = require("./entities/event.entity");
|
|
22
|
+
let EventService = class EventService extends ntx_core_1.BaseRepository {
|
|
23
|
+
constructor(request, trackerService, configService, languageService, mediaService) {
|
|
24
|
+
super(request, event_entity_1.Event);
|
|
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.EventService = EventService;
|
|
35
|
+
_a = ntx_core_1.PermissionScopeType.Self;
|
|
36
|
+
_b = ntx_core_1.PermissionScopeType.Workspace;
|
|
37
|
+
_c = ntx_core_1.PermissionScopeType.Global;
|
|
38
|
+
exports.EventService = EventService = __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
|
+
], EventService);
|
|
46
|
+
//# sourceMappingURL=event.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event.service.js","sourceRoot":"","sources":["../../../../../libs/polylog/src/api/event/event.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAA2D;AAC3D,2CAA+C;AAC/C,uCAAuC;AACvC,oDAM+B;AAC/B,0DAAgD;AAGzC,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,yBAAqB;IAOrD,YACmB,OAAY,EACV,cAA8B,EAC9B,aAA4B,EAC5B,eAAgC,EAChC,YAA0B;QAE7C,KAAK,CAAC,OAAO,EAAE,oBAAK,CAAC,CAAC;QALH,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,oCAAY;KACZ,8BAAmB,CAAC,IAAI;KAExB,8BAAmB,CAAC,SAAS;KAE7B,8BAAmB,CAAC,MAAM;uBAL1B,YAAY;IADxB,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,YAAY,CAgBxB"}
|
|
@@ -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-event.dto"), exports);
|
|
18
|
+
__exportStar(require("./dto/update-event.dto"), exports);
|
|
19
|
+
__exportStar(require("./entities/event.entity"), exports);
|
|
20
|
+
__exportStar(require("./event.controller"), exports);
|
|
21
|
+
__exportStar(require("./event.service"), exports);
|
|
22
|
+
__exportStar(require("./event.module"), exports);
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/polylog/src/api/event/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,yDAAuC;AACvC,0DAAwC;AACxC,qDAAmC;AACnC,kDAAgC;AAChC,iDAA+B"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.CreateEventLogDto = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const app_config_1 = require("../../../app.config");
|
|
16
|
+
class CreateEventLogDto {
|
|
17
|
+
}
|
|
18
|
+
exports.CreateEventLogDto = CreateEventLogDto;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, class_validator_1.IsUUID)(),
|
|
21
|
+
(0, swagger_1.ApiProperty)(),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], CreateEventLogDto.prototype, "eventId", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, class_validator_1.IsObject)(),
|
|
26
|
+
(0, class_validator_1.IsOptional)(),
|
|
27
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
28
|
+
__metadata("design:type", Object)
|
|
29
|
+
], CreateEventLogDto.prototype, "meta", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, class_validator_1.IsObject)(),
|
|
32
|
+
(0, class_validator_1.IsOptional)(),
|
|
33
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
34
|
+
__metadata("design:type", Object)
|
|
35
|
+
], CreateEventLogDto.prototype, "request", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, class_validator_1.IsObject)(),
|
|
38
|
+
(0, class_validator_1.IsOptional)(),
|
|
39
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
40
|
+
__metadata("design:type", Object)
|
|
41
|
+
], CreateEventLogDto.prototype, "response", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, class_validator_1.IsString)(),
|
|
44
|
+
(0, class_validator_1.IsOptional)(),
|
|
45
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], CreateEventLogDto.prototype, "status", void 0);
|
|
48
|
+
//# sourceMappingURL=create-event-log.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-event-log.dto.js","sourceRoot":"","sources":["../../../../../../libs/polylog/src/api/event-log/dto/create-event-log.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAmE;AACnE,qDAAyE;AACzE,oDAAyD;AAEzD,MAAa,iBAAiB;CAwB7B;AAxBD,8CAwBC;AArBC;IAFC,IAAA,wBAAM,GAAE;IACR,IAAA,qBAAW,GAAE;;kDACE;AAKhB;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;+CACX;AAKX;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;kDACR;AAKd;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;mDACP;AAKf;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;iDACM"}
|
|
@@ -0,0 +1,49 @@
|
|
|
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.UpdateEventLogDto = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const app_config_1 = require("../../../app.config");
|
|
16
|
+
class UpdateEventLogDto {
|
|
17
|
+
}
|
|
18
|
+
exports.UpdateEventLogDto = UpdateEventLogDto;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, class_validator_1.IsUUID)(),
|
|
21
|
+
(0, class_validator_1.IsOptional)(),
|
|
22
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], UpdateEventLogDto.prototype, "eventId", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_validator_1.IsObject)(),
|
|
27
|
+
(0, class_validator_1.IsOptional)(),
|
|
28
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
29
|
+
__metadata("design:type", Object)
|
|
30
|
+
], UpdateEventLogDto.prototype, "meta", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_validator_1.IsObject)(),
|
|
33
|
+
(0, class_validator_1.IsOptional)(),
|
|
34
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
35
|
+
__metadata("design:type", Object)
|
|
36
|
+
], UpdateEventLogDto.prototype, "request", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, class_validator_1.IsObject)(),
|
|
39
|
+
(0, class_validator_1.IsOptional)(),
|
|
40
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
41
|
+
__metadata("design:type", Object)
|
|
42
|
+
], UpdateEventLogDto.prototype, "response", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, class_validator_1.IsString)(),
|
|
45
|
+
(0, class_validator_1.IsOptional)(),
|
|
46
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], UpdateEventLogDto.prototype, "status", void 0);
|
|
49
|
+
//# sourceMappingURL=update-event-log.dto.js.map
|