@comasoft/nestjs 0.0.97 → 0.1.2
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 +31 -0
- package/dist/aws/aws-s3.service.d.ts +17 -0
- package/dist/aws/aws-s3.service.js +158 -0
- package/dist/aws/aws.module.d.ts +2 -0
- package/dist/aws/aws.module.js +25 -0
- package/dist/aws/aws.service.d.ts +3 -0
- package/dist/aws/aws.service.js +21 -0
- package/dist/aws/constants/storage.constant.d.ts +4 -0
- package/dist/aws/constants/storage.constant.js +25 -0
- package/dist/aws/dto/create-s3-presigned.dto.d.ts +12 -0
- package/dist/aws/dto/create-s3-presigned.dto.js +78 -0
- package/dist/aws/dto/index.d.ts +2 -0
- package/dist/aws/dto/index.js +18 -0
- package/dist/aws/dto/response-s3-presigned.dto.d.ts +30 -0
- package/dist/aws/dto/response-s3-presigned.dto.js +110 -0
- package/dist/aws/index.d.ts +4 -0
- package/dist/aws/index.js +20 -0
- package/dist/aws/types/s3.interface.d.ts +14 -0
- package/dist/aws/types/s3.interface.js +2 -0
- package/dist/aws/types/storage.interface.d.ts +19 -0
- package/dist/aws/types/storage.interface.js +2 -0
- package/dist/category/category.module.d.ts +2 -0
- package/dist/category/category.module.js +23 -0
- package/dist/category/category.service.d.ts +13 -0
- package/dist/category/category.service.js +124 -0
- package/dist/category/dto/create-category.dto.d.ts +7 -0
- package/dist/category/dto/create-category.dto.js +34 -0
- package/dist/category/dto/delete-category.dto.d.ts +3 -0
- package/dist/category/dto/delete-category.dto.js +6 -0
- package/dist/category/dto/index.d.ts +5 -0
- package/dist/category/dto/index.js +21 -0
- package/dist/category/dto/response-categories.dto.d.ts +12 -0
- package/dist/category/dto/response-categories.dto.js +52 -0
- package/dist/category/dto/update-category-sort.dto.d.ts +9 -0
- package/dist/category/dto/update-category-sort.dto.js +33 -0
- package/dist/category/dto/update-category.dto.d.ts +6 -0
- package/dist/category/dto/update-category.dto.js +9 -0
- package/dist/category/index.d.ts +3 -0
- package/dist/category/index.js +19 -0
- package/dist/comment/comment.module.d.ts +2 -0
- package/dist/comment/comment.module.js +23 -0
- package/dist/comment/comment.service.d.ts +33 -0
- package/dist/comment/comment.service.js +240 -0
- package/dist/comment/dto/create-comment.dto.d.ts +7 -0
- package/dist/comment/dto/create-comment.dto.js +41 -0
- package/dist/comment/dto/index.d.ts +3 -0
- package/dist/comment/dto/index.js +19 -0
- package/dist/comment/dto/response-comment.dto.d.ts +26 -0
- package/dist/comment/dto/response-comment.dto.js +97 -0
- package/dist/comment/dto/update-comment.dto.d.ts +4 -0
- package/dist/comment/dto/update-comment.dto.js +22 -0
- package/dist/comment/index.d.ts +3 -0
- package/dist/comment/index.js +19 -0
- package/dist/database/entities/category.entity.d.ts +14 -0
- package/dist/database/entities/category.entity.js +70 -0
- package/dist/database/entities/comment.entity.d.ts +16 -0
- package/dist/database/entities/comment.entity.js +77 -0
- package/dist/database/entities/config.entity.d.ts +8 -0
- package/dist/database/entities/config.entity.js +44 -0
- package/dist/database/entities/file.entity.d.ts +20 -0
- package/dist/database/entities/file.entity.js +91 -0
- package/dist/database/entities/index.d.ts +10 -0
- package/dist/database/entities/index.js +26 -0
- package/dist/database/entities/like.entity.d.ts +10 -0
- package/dist/database/entities/like.entity.js +49 -0
- package/dist/database/entities/logs-audit.entity.d.ts +16 -0
- package/dist/database/entities/logs-audit.entity.js +72 -0
- package/dist/database/entities/logs-event.entity.d.ts +16 -0
- package/dist/database/entities/logs-event.entity.js +72 -0
- package/dist/database/entities/notification-recipient.entity.d.ts +19 -0
- package/dist/database/entities/notification-recipient.entity.js +74 -0
- package/dist/database/entities/notification.entity.d.ts +18 -0
- package/dist/database/entities/notification.entity.js +69 -0
- package/dist/database/entities/role.entity.d.ts +13 -0
- package/dist/database/entities/role.entity.js +54 -0
- package/dist/database/entities/roles.entity.d.ts +12 -0
- package/dist/database/entities/roles.entity.js +1 -0
- package/dist/decorators/auth.decorator.factory.d.ts +1 -1
- package/dist/decorators/auth.decorator.factory.js +23 -2
- package/dist/decorators/delete-columns.decorator.js +1 -33
- package/dist/decorators/patch-body.decorator.js +20 -12
- package/dist/decorators/soft-delete.decorator.js +1 -15
- package/dist/decorators/timestamps.decorator.js +5 -13
- package/dist/dto/file.dto.d.ts +18 -0
- package/dist/dto/file.dto.js +70 -0
- package/dist/dto/index.d.ts +2 -0
- package/dist/dto/index.js +2 -0
- package/dist/dto/response-uid.dto.d.ts +2 -0
- package/dist/dto/response-uid.dto.js +8 -0
- package/dist/dto/update-ids.dto.d.ts +6 -1
- package/dist/dto/update-ids.dto.js +24 -10
- package/dist/dto/update-sort.dto.d.ts +9 -0
- package/dist/dto/update-sort.dto.js +50 -0
- package/dist/enums.common.d.ts +23 -0
- package/dist/enums.common.js +28 -1
- package/dist/events/event-bus.module.d.ts +2 -0
- package/dist/events/event-bus.module.js +44 -0
- package/dist/events/index.d.ts +4 -0
- package/dist/events/index.js +20 -0
- package/dist/events/listeners/audit-event.listener.d.ts +9 -0
- package/dist/events/listeners/audit-event.listener.js +58 -0
- package/dist/events/listeners/index.d.ts +1 -0
- package/dist/events/listeners/index.js +17 -0
- package/dist/events/listeners/system-event.listener.d.ts +9 -0
- package/dist/events/listeners/system-event.listener.js +58 -0
- package/dist/events/services/event-logger.service.d.ts +5 -0
- package/dist/events/services/event-logger.service.js +34 -0
- package/dist/events/services/event-notification.service.d.ts +7 -0
- package/dist/events/services/event-notification.service.js +104 -0
- package/dist/events/services/event-storage.service.d.ts +11 -0
- package/dist/events/services/event-storage.service.js +79 -0
- package/dist/events/services/index.d.ts +4 -0
- package/dist/events/services/index.js +20 -0
- package/dist/events/services/token.service.d.ts +23 -0
- package/dist/events/services/token.service.js +88 -0
- package/dist/events/types/audit-events.type.d.ts +12 -0
- package/dist/events/types/audit-events.type.js +2 -0
- package/dist/events/types/index.d.ts +18 -0
- package/dist/events/types/index.js +17 -0
- package/dist/filters/http-exception.filter.d.ts +4 -0
- package/dist/filters/http-exception.filter.js +26 -4
- package/dist/guards/auth.guard.d.ts +3 -1
- package/dist/guards/auth.guard.js +33 -11
- package/dist/index.d.ts +20 -8
- package/dist/index.js +12 -0
- package/dist/library.module.d.ts +2 -0
- package/dist/library.module.js +20 -0
- package/dist/like/dto/create-like.dto.d.ts +7 -0
- package/dist/like/dto/create-like.dto.js +47 -0
- package/dist/like/dto/index.d.ts +2 -0
- package/dist/like/dto/index.js +18 -0
- package/dist/like/dto/response-like.dto.d.ts +19 -0
- package/dist/like/dto/response-like.dto.js +79 -0
- package/dist/like/index.d.ts +3 -0
- package/dist/like/index.js +19 -0
- package/dist/like/like.module.d.ts +2 -0
- package/dist/like/like.module.js +23 -0
- package/dist/like/like.service.d.ts +13 -0
- package/dist/like/like.service.js +155 -0
- package/dist/logger/index.d.ts +2 -0
- package/dist/logger/index.js +18 -0
- package/dist/logger/pino-options.d.ts +31 -0
- package/dist/logger/pino-options.js +77 -0
- package/dist/logger/pino-pretty-transport.d.ts +1 -0
- package/dist/logger/pino-pretty-transport.js +164 -0
- package/dist/modules/index.d.ts +1 -0
- package/dist/modules/index.js +1 -0
- package/dist/modules/redis.module.d.ts +9 -0
- package/dist/modules/redis.module.js +1 -0
- package/dist/notifications/index.d.ts +70 -0
- package/dist/notifications/index.js +18 -0
- package/dist/notifications/notification.module.d.ts +2 -0
- package/dist/notifications/notification.module.js +32 -0
- package/dist/notifications/services/email.service.d.ts +31 -0
- package/dist/notifications/services/email.service.js +69 -0
- package/dist/notifications/services/index.d.ts +7 -0
- package/dist/notifications/services/index.js +23 -0
- package/dist/notifications/services/kakao.service.d.ts +41 -0
- package/dist/notifications/services/kakao.service.js +94 -0
- package/dist/notifications/services/message-template.service.d.ts +15 -0
- package/dist/notifications/services/message-template.service.js +74 -0
- package/dist/notifications/services/notification-send.service.d.ts +30 -0
- package/dist/notifications/services/notification-send.service.js +146 -0
- package/dist/notifications/services/notification.service.d.ts +37 -0
- package/dist/notifications/services/notification.service.js +125 -0
- package/dist/notifications/services/slack.service.d.ts +11 -0
- package/dist/notifications/services/slack.service.js +53 -0
- package/dist/notifications/services/sms.service.d.ts +19 -0
- package/dist/notifications/services/sms.service.js +62 -0
- package/dist/redis/index.d.ts +2 -0
- package/dist/redis/index.js +18 -0
- package/dist/redis/redis-constraint.d.ts +1 -0
- package/dist/redis/redis-constraint.js +4 -0
- package/dist/redis/redis.module.d.ts +8 -0
- package/dist/redis/redis.module.js +62 -0
- package/dist/redis/redis.service.d.ts +12 -0
- package/dist/redis/redis.service.js +76 -0
- package/dist/role/dto/create-role.dto.d.ts +5 -0
- package/dist/role/dto/create-role.dto.js +41 -0
- package/dist/role/dto/index.d.ts +3 -0
- package/dist/role/dto/index.js +19 -0
- package/dist/role/dto/response-roles.dto.d.ts +15 -0
- package/dist/role/dto/response-roles.dto.js +62 -0
- package/dist/role/dto/update-role.dto.d.ts +6 -0
- package/dist/role/dto/update-role.dto.js +9 -0
- package/dist/role/index.d.ts +3 -0
- package/dist/role/index.js +19 -0
- package/dist/role/role.module.d.ts +2 -0
- package/dist/role/role.module.js +23 -0
- package/dist/role/role.service.d.ts +17 -0
- package/dist/role/role.service.js +144 -0
- package/dist/services/file.service.d.ts +55 -0
- package/dist/services/file.service.js +82 -0
- package/dist/services/index.d.ts +2 -0
- package/dist/services/index.js +18 -0
- package/dist/services/message-template.service.d.ts +15 -0
- package/dist/services/message-template.service.js +1 -0
- package/dist/services/permission-checker.service.d.ts +38 -0
- package/dist/services/permission-checker.service.js +65 -0
- package/dist/shared/error-codes.d.ts +5 -0
- package/dist/shared/error-codes.js +9 -0
- package/dist/utils/common.utils.d.ts +2 -0
- package/dist/utils/common.utils.js +11 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +1 -0
- package/dist/utils/object-diff.d.ts +1 -0
- package/dist/utils/object-diff.js +33 -0
- package/package.json +61 -16
- package/eslint.config.js +0 -31
- package/tsconfig.build.json +0 -19
- package/tsconfig.json +0 -18
|
@@ -0,0 +1,69 @@
|
|
|
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.Notification = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const enums_common_1 = require("../../enums.common");
|
|
15
|
+
const notification_recipient_entity_1 = require("./notification-recipient.entity");
|
|
16
|
+
class Relations {
|
|
17
|
+
}
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, typeorm_1.OneToMany)(() => notification_recipient_entity_1.NotificationRecipient, (recipient) => recipient.notification),
|
|
20
|
+
__metadata("design:type", Array)
|
|
21
|
+
], Relations.prototype, "recipients", void 0);
|
|
22
|
+
let Notification = class Notification extends Relations {
|
|
23
|
+
};
|
|
24
|
+
exports.Notification = Notification;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.PrimaryGeneratedColumn)(),
|
|
27
|
+
__metadata("design:type", Number)
|
|
28
|
+
], Notification.prototype, "id", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.Column)('varchar', { length: 25 }),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], Notification.prototype, "type", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.Column)('varchar', { length: 25 }),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], Notification.prototype, "template_key", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.Column)('enum', { enum: enums_common_1.NOTIFICATION_STATUS }),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], Notification.prototype, "status", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.Column)('varchar', { length: 25, nullable: true }),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], Notification.prototype, "sender", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.Column)('varchar', { length: 100, nullable: true }),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], Notification.prototype, "title", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typeorm_1.Column)('text', { nullable: true }),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], Notification.prototype, "content", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, typeorm_1.CreateDateColumn)({ type: 'timestamptz' }),
|
|
55
|
+
__metadata("design:type", Date)
|
|
56
|
+
], Notification.prototype, "created_at", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, typeorm_1.UpdateDateColumn)({ type: 'timestamptz' }),
|
|
59
|
+
__metadata("design:type", Date)
|
|
60
|
+
], Notification.prototype, "updated_at", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, typeorm_1.DeleteDateColumn)({ type: 'timestamptz' }),
|
|
63
|
+
__metadata("design:type", Date)
|
|
64
|
+
], Notification.prototype, "deleted_at", void 0);
|
|
65
|
+
exports.Notification = Notification = __decorate([
|
|
66
|
+
(0, typeorm_1.Entity)('notifications'),
|
|
67
|
+
(0, typeorm_1.Index)(['id'], { where: 'deleted_at IS NULL' }),
|
|
68
|
+
(0, typeorm_1.Index)(['status'])
|
|
69
|
+
], Notification);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare class Relations {
|
|
2
|
+
}
|
|
3
|
+
export declare class Role extends Relations {
|
|
4
|
+
id: number;
|
|
5
|
+
name: string;
|
|
6
|
+
description: string;
|
|
7
|
+
permissions: string[];
|
|
8
|
+
is_default: boolean;
|
|
9
|
+
is_system: boolean;
|
|
10
|
+
sort: number;
|
|
11
|
+
created_at: Date;
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,54 @@
|
|
|
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.Role = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
class Relations {
|
|
15
|
+
}
|
|
16
|
+
let Role = class Role extends Relations {
|
|
17
|
+
};
|
|
18
|
+
exports.Role = Role;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, typeorm_1.PrimaryGeneratedColumn)(),
|
|
21
|
+
__metadata("design:type", Number)
|
|
22
|
+
], Role.prototype, "id", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.Column)('varchar', { length: 100 }),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], Role.prototype, "name", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)('varchar', { length: 255, nullable: true }),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], Role.prototype, "description", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typeorm_1.Column)('jsonb', { nullable: true }),
|
|
33
|
+
__metadata("design:type", Array)
|
|
34
|
+
], Role.prototype, "permissions", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.Column)('boolean', { default: false, comment: '기본 권한 여부 (삭제불가)' }),
|
|
37
|
+
__metadata("design:type", Boolean)
|
|
38
|
+
], Role.prototype, "is_default", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typeorm_1.Column)('boolean', { default: false, comment: '시스템 권한 여부 (수정,삭제불가)' }),
|
|
41
|
+
__metadata("design:type", Boolean)
|
|
42
|
+
], Role.prototype, "is_system", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)('integer', { default: 0 }),
|
|
45
|
+
__metadata("design:type", Number)
|
|
46
|
+
], Role.prototype, "sort", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, typeorm_1.CreateDateColumn)({ type: 'timestamptz' }),
|
|
49
|
+
__metadata("design:type", Date)
|
|
50
|
+
], Role.prototype, "created_at", void 0);
|
|
51
|
+
exports.Role = Role = __decorate([
|
|
52
|
+
(0, typeorm_1.Entity)('roles'),
|
|
53
|
+
(0, typeorm_1.Index)(['name'])
|
|
54
|
+
], Role);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=this&&this.__decorate||function(e,t,o,n){var r,a=arguments.length,l=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,o,n);else for(var i=e.length-1;i>=0;i--)(r=e[i])&&(l=(a<3?r(l):a>3?r(t,o,l):r(t,o))||l);return a>3&&l&&Object.defineProperty(t,o,l),l},t=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(exports,"__esModule",{value:!0}),exports.Role=void 0;const o=require("typeorm");class Relations{}let n=class Role extends Relations{};exports.Role=n,e([(0,o.PrimaryGeneratedColumn)(),t("design:type",Number)],n.prototype,"id",void 0),e([(0,o.Column)("varchar",{length:100}),t("design:type",String)],n.prototype,"name",void 0),e([(0,o.Column)("jsonb",{nullable:!0}),t("design:type",Array)],n.prototype,"permissions",void 0),e([(0,o.Column)("boolean",{default:!1,comment:"기본 권한 여부 (삭제불가)"}),t("design:type",Boolean)],n.prototype,"is_default",void 0),e([(0,o.Column)("boolean",{default:!1,comment:"시스템 권한 여부 (수정,삭제불가)"}),t("design:type",Boolean)],n.prototype,"is_system",void 0),e([(0,o.Column)("integer",{default:0}),t("design:type",Number)],n.prototype,"sort",void 0),e([(0,o.CreateDateColumn)({type:"timestamptz"}),t("design:type",Date)],n.prototype,"created_at",void 0),exports.Role=n=e([(0,o.Entity)("roles"),(0,o.Index)(["name"])],n);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function createAuthDecorator<T extends Record<string, any>>(roleEnum: T): (...
|
|
1
|
+
export declare function createAuthDecorator<T extends Record<string, any>>(roleEnum: T): (...args: (Lowercase<keyof T & string> | string | string[])[]) => <TFunction extends Function, Y>(target: TFunction | object, propertyKey?: string | symbol, descriptor?: TypedPropertyDescriptor<Y>) => void;
|
|
@@ -6,7 +6,28 @@ const swagger_1 = require("@nestjs/swagger");
|
|
|
6
6
|
const auth_guard_1 = require("../guards/auth.guard");
|
|
7
7
|
const jwt_guard_1 = require("../guards/jwt.guard");
|
|
8
8
|
function createAuthDecorator(roleEnum) {
|
|
9
|
-
return function (...
|
|
10
|
-
|
|
9
|
+
return function (...args) {
|
|
10
|
+
const roles = [];
|
|
11
|
+
const permissions = [];
|
|
12
|
+
args.flat().forEach((arg) => {
|
|
13
|
+
if (typeof arg === 'string') {
|
|
14
|
+
if (arg.includes(':')) {
|
|
15
|
+
permissions.push(arg);
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
roles.push(arg);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
const decorators = [
|
|
23
|
+
(0, common_1.SetMetadata)('roles', roles),
|
|
24
|
+
(0, common_1.SetMetadata)('roleEnum', roleEnum),
|
|
25
|
+
(0, common_1.UseGuards)(jwt_guard_1.JwtAuthGuard, auth_guard_1.AuthGuard),
|
|
26
|
+
(0, swagger_1.ApiBearerAuth)('access_token'),
|
|
27
|
+
(0, swagger_1.ApiUnauthorizedResponse)({ description: 'Unauthorized' }),
|
|
28
|
+
];
|
|
29
|
+
if (permissions.length)
|
|
30
|
+
decorators.push((0, common_1.SetMetadata)('permissions', permissions));
|
|
31
|
+
return (0, common_1.applyDecorators)(...decorators);
|
|
11
32
|
};
|
|
12
33
|
}
|
|
@@ -1,33 +1 @@
|
|
|
1
|
-
"
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DeleteColumns = DeleteColumns;
|
|
4
|
-
const typeorm_1 = require("typeorm");
|
|
5
|
-
function DeleteColumns() {
|
|
6
|
-
return function (constructor) {
|
|
7
|
-
(0, typeorm_1.Column)({
|
|
8
|
-
type: 'boolean',
|
|
9
|
-
default: false,
|
|
10
|
-
})(constructor.prototype, 'is_deleted');
|
|
11
|
-
(0, typeorm_1.Column)({
|
|
12
|
-
type: 'int',
|
|
13
|
-
nullable: true,
|
|
14
|
-
})(constructor.prototype, 'deleted_by');
|
|
15
|
-
(0, typeorm_1.Column)({
|
|
16
|
-
type: 'timestamp',
|
|
17
|
-
precision: 3,
|
|
18
|
-
nullable: true,
|
|
19
|
-
})(constructor.prototype, 'deleted_at');
|
|
20
|
-
Object.defineProperty(constructor.prototype, 'deleted_by', {
|
|
21
|
-
set(value) {
|
|
22
|
-
this._deleted_by = value;
|
|
23
|
-
if (value !== null) {
|
|
24
|
-
this.is_deleted = true;
|
|
25
|
-
this.deleted_at = new Date();
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
get() {
|
|
29
|
-
return this._deleted_by;
|
|
30
|
-
},
|
|
31
|
-
});
|
|
32
|
-
};
|
|
33
|
-
}
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.DeleteColumns=function DeleteColumns(){return function(t){(0,e.Column)({type:"boolean",default:!1})(t.prototype,"is_deleted"),(0,e.Column)({type:"int",nullable:!0})(t.prototype,"deleted_by"),(0,e.Column)({type:"timestamp",precision:3,nullable:!0})(t.prototype,"deleted_at"),Object.defineProperty(t.prototype,"deleted_by",{set(e){this._deleted_by=e,null!==e&&(this.is_deleted=!0,this.deleted_at=new Date)},get(){return this._deleted_by}})}};const e=require("typeorm");
|
|
@@ -3,27 +3,35 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.PatchBody = PatchBody;
|
|
4
4
|
const common_1 = require("@nestjs/common");
|
|
5
5
|
const class_transformer_1 = require("class-transformer");
|
|
6
|
+
const class_validator_1 = require("class-validator");
|
|
6
7
|
function PatchBody(dtoClass) {
|
|
7
8
|
return (target, key, index) => {
|
|
8
9
|
(0, common_1.Body)()(target, key, index);
|
|
9
10
|
const originalMethod = (0, common_1.createParamDecorator)((data, ctx) => {
|
|
10
11
|
const request = ctx.switchToHttp().getRequest();
|
|
11
12
|
const body = request.body;
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
});
|
|
16
|
-
const correctKeys = Object.fromEntries(Object.entries(dtoInstance).filter(([_, v]) => v !== undefined));
|
|
17
|
-
if (Object.keys(correctKeys).length !== Object.keys(body).length) {
|
|
18
|
-
const invalidKeys = Object.keys(body).filter((key) => !Object.keys(correctKeys).includes(key));
|
|
19
|
-
if (invalidKeys.length > 0) {
|
|
20
|
-
throw new common_1.BadRequestException(`Invalid keys: ${invalidKeys.join(', ')}`);
|
|
21
|
-
}
|
|
13
|
+
const allowedKeys = dtoClass.keys;
|
|
14
|
+
if (!allowedKeys) {
|
|
15
|
+
throw new common_1.InternalServerErrorException('keys is not defined');
|
|
22
16
|
}
|
|
23
|
-
|
|
17
|
+
const bodyKeys = Object.keys(body);
|
|
18
|
+
const invalidKeys = bodyKeys.filter((key) => !allowedKeys.includes(key));
|
|
19
|
+
if (invalidKeys.length > 0) {
|
|
20
|
+
throw new common_1.BadRequestException(`Invalid keys: ${invalidKeys.join(', ')}`);
|
|
21
|
+
}
|
|
22
|
+
if (bodyKeys.length === 0) {
|
|
24
23
|
throw new common_1.BadRequestException('At least one field is required');
|
|
25
24
|
}
|
|
26
|
-
|
|
25
|
+
const dtoInstance = (0, class_transformer_1.plainToClass)(dtoClass, body, {
|
|
26
|
+
enableImplicitConversion: true,
|
|
27
|
+
});
|
|
28
|
+
const errors = (0, class_validator_1.validateSync)(dtoInstance, {
|
|
29
|
+
skipMissingProperties: true,
|
|
30
|
+
});
|
|
31
|
+
if (errors.length > 0) {
|
|
32
|
+
throw new common_1.BadRequestException(errors);
|
|
33
|
+
}
|
|
34
|
+
return dtoInstance;
|
|
27
35
|
});
|
|
28
36
|
originalMethod()(target, key, index);
|
|
29
37
|
};
|
|
@@ -5,20 +5,6 @@ const typeorm_1 = require("typeorm");
|
|
|
5
5
|
function SoftDelete() {
|
|
6
6
|
return function (constructor) {
|
|
7
7
|
const entity_name = constructor.name.toLowerCase();
|
|
8
|
-
(0, typeorm_1.
|
|
9
|
-
type: 'boolean',
|
|
10
|
-
default: false,
|
|
11
|
-
})(constructor.prototype, 'is_deleted');
|
|
12
|
-
(0, typeorm_1.Index)(`idx_${entity_name}_deleted_id`, ['is_deleted', 'id'])(constructor);
|
|
13
|
-
(0, typeorm_1.Column)({
|
|
14
|
-
type: 'int',
|
|
15
|
-
nullable: true,
|
|
16
|
-
unsigned: true,
|
|
17
|
-
})(constructor.prototype, 'deleted_by');
|
|
18
|
-
(0, typeorm_1.Column)({
|
|
19
|
-
type: 'timestamp',
|
|
20
|
-
precision: 3,
|
|
21
|
-
nullable: true,
|
|
22
|
-
})(constructor.prototype, 'deleted_at');
|
|
8
|
+
(0, typeorm_1.DeleteDateColumn)({ type: 'timestamptz', nullable: true })(constructor.prototype, 'deleted_at');
|
|
23
9
|
};
|
|
24
10
|
}
|
|
@@ -9,23 +9,15 @@ function Timestamps(options = {
|
|
|
9
9
|
return function (constructor) {
|
|
10
10
|
if (options.created_at !== false) {
|
|
11
11
|
(0, typeorm_1.CreateDateColumn)({
|
|
12
|
-
type: '
|
|
13
|
-
|
|
14
|
-
default: () => 'CURRENT_TIMESTAMP(3)',
|
|
12
|
+
type: 'timestamptz',
|
|
13
|
+
default: () => 'CURRENT_TIMESTAMP()',
|
|
15
14
|
})(constructor.prototype, 'created_at');
|
|
16
15
|
}
|
|
17
16
|
if (options.updated_at !== false) {
|
|
18
|
-
(0, typeorm_1.
|
|
19
|
-
type: '
|
|
20
|
-
|
|
21
|
-
default: null,
|
|
22
|
-
onUpdate: 'CURRENT_TIMESTAMP(3)',
|
|
23
|
-
nullable: true,
|
|
17
|
+
(0, typeorm_1.UpdateDateColumn)({
|
|
18
|
+
type: 'timestamptz',
|
|
19
|
+
default: () => 'CURRENT_TIMESTAMP()',
|
|
24
20
|
})(constructor.prototype, 'updated_at');
|
|
25
|
-
(0, typeorm_1.BeforeUpdate)()(constructor.prototype, 'updateDate');
|
|
26
|
-
constructor.prototype.updateDate = function () {
|
|
27
|
-
this.updated_at = new Date();
|
|
28
|
-
};
|
|
29
21
|
}
|
|
30
22
|
};
|
|
31
23
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare class FileMetaDto {
|
|
2
|
+
width?: number;
|
|
3
|
+
height?: number;
|
|
4
|
+
}
|
|
5
|
+
export declare class FileDto {
|
|
6
|
+
id: number;
|
|
7
|
+
original_name: string;
|
|
8
|
+
mime_type: string;
|
|
9
|
+
size: number;
|
|
10
|
+
full_url: string;
|
|
11
|
+
thumbnail_small: string;
|
|
12
|
+
thumbnail_medium: string;
|
|
13
|
+
meta: FileMetaDto;
|
|
14
|
+
}
|
|
15
|
+
declare const FileThumbnailDto_base: import("@nestjs/common").Type<Pick<FileDto, "thumbnail_small" | "thumbnail_medium">>;
|
|
16
|
+
export declare class FileThumbnailDto extends FileThumbnailDto_base {
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.FileThumbnailDto = exports.FileDto = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const class_transformer_1 = require("class-transformer");
|
|
15
|
+
class FileMetaDto {
|
|
16
|
+
}
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, class_transformer_1.Expose)(),
|
|
19
|
+
__metadata("design:type", Number)
|
|
20
|
+
], FileMetaDto.prototype, "width", void 0);
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, class_transformer_1.Expose)(),
|
|
23
|
+
__metadata("design:type", Number)
|
|
24
|
+
], FileMetaDto.prototype, "height", void 0);
|
|
25
|
+
class FileDto {
|
|
26
|
+
}
|
|
27
|
+
exports.FileDto = FileDto;
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, class_transformer_1.Expose)(),
|
|
30
|
+
__metadata("design:type", Number)
|
|
31
|
+
], FileDto.prototype, "id", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, class_transformer_1.Expose)(),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], FileDto.prototype, "original_name", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, class_transformer_1.Expose)(),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], FileDto.prototype, "mime_type", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, class_transformer_1.Expose)(),
|
|
42
|
+
__metadata("design:type", Number)
|
|
43
|
+
], FileDto.prototype, "size", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, class_transformer_1.Expose)(),
|
|
46
|
+
(0, class_transformer_1.Transform)(({ obj }) => `${process.env.CDN_URL || ''}/uploads/${obj.target}/${obj.path}/${obj.file_name}`),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], FileDto.prototype, "full_url", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, class_transformer_1.Expose)(),
|
|
51
|
+
(0, class_transformer_1.Transform)(({ obj }) => `${process.env.CDN_URL || ''}/thumbnails/${obj.target}/${obj.path}/sm/${obj.file_name}`),
|
|
52
|
+
__metadata("design:type", String)
|
|
53
|
+
], FileDto.prototype, "thumbnail_small", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, class_transformer_1.Expose)(),
|
|
56
|
+
(0, class_transformer_1.Transform)(({ obj }) => `${process.env.CDN_URL || ''}/thumbnails/${obj.target}/${obj.path}/md/${obj.file_name}`),
|
|
57
|
+
__metadata("design:type", String)
|
|
58
|
+
], FileDto.prototype, "thumbnail_medium", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, class_transformer_1.Expose)(),
|
|
61
|
+
(0, class_transformer_1.Type)(() => FileMetaDto),
|
|
62
|
+
(0, class_transformer_1.Transform)(({ obj }) => obj.meta),
|
|
63
|
+
__metadata("design:type", FileMetaDto)
|
|
64
|
+
], FileDto.prototype, "meta", void 0);
|
|
65
|
+
class FileThumbnailDto extends (0, swagger_1.PickType)(FileDto, [
|
|
66
|
+
'thumbnail_small',
|
|
67
|
+
'thumbnail_medium',
|
|
68
|
+
]) {
|
|
69
|
+
}
|
|
70
|
+
exports.FileThumbnailDto = FileThumbnailDto;
|
package/dist/dto/index.d.ts
CHANGED
package/dist/dto/index.js
CHANGED
|
@@ -21,4 +21,6 @@ __exportStar(require("./response-uid.dto"), exports);
|
|
|
21
21
|
__exportStar(require("./response-access-token.dto"), exports);
|
|
22
22
|
__exportStar(require("./custom-params.dto"), exports);
|
|
23
23
|
__exportStar(require("./update-ids.dto"), exports);
|
|
24
|
+
__exportStar(require("./update-sort.dto"), exports);
|
|
24
25
|
__exportStar(require("./remove-ids.dto"), exports);
|
|
26
|
+
__exportStar(require("./file.dto"), exports);
|
|
@@ -18,6 +18,10 @@ __decorate([
|
|
|
18
18
|
(0, class_transformer_1.Expose)(),
|
|
19
19
|
__metadata("design:type", String)
|
|
20
20
|
], ResponseUidDto.prototype, "uid", void 0);
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, class_transformer_1.Expose)(),
|
|
23
|
+
__metadata("design:type", Number)
|
|
24
|
+
], ResponseUidDto.prototype, "affected", void 0);
|
|
21
25
|
class ResponseUidsDto {
|
|
22
26
|
}
|
|
23
27
|
exports.ResponseUidsDto = ResponseUidsDto;
|
|
@@ -25,3 +29,7 @@ __decorate([
|
|
|
25
29
|
(0, class_transformer_1.Expose)(),
|
|
26
30
|
__metadata("design:type", Array)
|
|
27
31
|
], ResponseUidsDto.prototype, "uids", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, class_transformer_1.Expose)(),
|
|
34
|
+
__metadata("design:type", Number)
|
|
35
|
+
], ResponseUidsDto.prototype, "affected", void 0);
|
|
@@ -9,23 +9,37 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
13
|
-
const class_transformer_1 = require("class-transformer");
|
|
12
|
+
exports.UpdateUidsBaseDto = exports.UpdateIdsBaseDto = void 0;
|
|
14
13
|
const class_validator_1 = require("class-validator");
|
|
15
|
-
class
|
|
14
|
+
class UpdateIdsBaseDto {
|
|
16
15
|
}
|
|
17
|
-
exports.
|
|
16
|
+
exports.UpdateIdsBaseDto = UpdateIdsBaseDto;
|
|
18
17
|
__decorate([
|
|
19
|
-
(0, class_transformer_1.Expose)(),
|
|
20
18
|
(0, class_validator_1.IsArray)(),
|
|
21
19
|
(0, class_validator_1.IsNumber)({}, { each: true }),
|
|
22
20
|
__metadata("design:type", Array)
|
|
23
|
-
],
|
|
21
|
+
], UpdateIdsBaseDto.prototype, "ids", void 0);
|
|
24
22
|
__decorate([
|
|
25
|
-
(0,
|
|
23
|
+
(0, class_validator_1.IsString)(),
|
|
26
24
|
__metadata("design:type", String)
|
|
27
|
-
],
|
|
25
|
+
], UpdateIdsBaseDto.prototype, "field", void 0);
|
|
28
26
|
__decorate([
|
|
29
|
-
(0,
|
|
27
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
30
28
|
__metadata("design:type", Object)
|
|
31
|
-
],
|
|
29
|
+
], UpdateIdsBaseDto.prototype, "value", void 0);
|
|
30
|
+
class UpdateUidsBaseDto {
|
|
31
|
+
}
|
|
32
|
+
exports.UpdateUidsBaseDto = UpdateUidsBaseDto;
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, class_validator_1.IsArray)(),
|
|
35
|
+
(0, class_validator_1.IsString)({ each: true }),
|
|
36
|
+
__metadata("design:type", Array)
|
|
37
|
+
], UpdateUidsBaseDto.prototype, "uids", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, class_validator_1.IsString)(),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], UpdateUidsBaseDto.prototype, "field", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
44
|
+
__metadata("design:type", Object)
|
|
45
|
+
], UpdateUidsBaseDto.prototype, "value", void 0);
|
|
@@ -0,0 +1,50 @@
|
|
|
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.UpdateSortDto = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const class_transformer_1 = require("class-transformer");
|
|
15
|
+
const class_validator_1 = require("class-validator");
|
|
16
|
+
class SortDto {
|
|
17
|
+
}
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, swagger_1.ApiProperty)({ type: Number }),
|
|
20
|
+
(0, class_transformer_1.Expose)(),
|
|
21
|
+
(0, class_validator_1.IsOptional)(),
|
|
22
|
+
(0, class_validator_1.IsNumber)(),
|
|
23
|
+
__metadata("design:type", Number)
|
|
24
|
+
], SortDto.prototype, "id", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, swagger_1.ApiProperty)({ type: String }),
|
|
27
|
+
(0, class_transformer_1.Expose)(),
|
|
28
|
+
(0, class_validator_1.IsOptional)(),
|
|
29
|
+
(0, class_validator_1.IsString)(),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], SortDto.prototype, "uid", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, swagger_1.ApiProperty)({ type: Number }),
|
|
34
|
+
(0, class_transformer_1.Expose)(),
|
|
35
|
+
(0, class_validator_1.IsNumber)(),
|
|
36
|
+
__metadata("design:type", Number)
|
|
37
|
+
], SortDto.prototype, "sort", void 0);
|
|
38
|
+
class UpdateSortDto {
|
|
39
|
+
}
|
|
40
|
+
exports.UpdateSortDto = UpdateSortDto;
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, swagger_1.ApiProperty)({
|
|
43
|
+
type: [SortDto],
|
|
44
|
+
}),
|
|
45
|
+
(0, class_transformer_1.Expose)(),
|
|
46
|
+
(0, class_validator_1.IsArray)(),
|
|
47
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
48
|
+
(0, class_transformer_1.Type)(() => SortDto),
|
|
49
|
+
__metadata("design:type", Array)
|
|
50
|
+
], UpdateSortDto.prototype, "items", void 0);
|
package/dist/enums.common.d.ts
CHANGED
|
@@ -27,3 +27,26 @@ export declare enum DEVICE_TYPE {
|
|
|
27
27
|
MAC = "mac",
|
|
28
28
|
OTHER = "other"
|
|
29
29
|
}
|
|
30
|
+
export declare enum AUDIT_ACTION {
|
|
31
|
+
CREATE = "create",
|
|
32
|
+
READ = "read",
|
|
33
|
+
UPDATE = "update",
|
|
34
|
+
DELETE = "delete"
|
|
35
|
+
}
|
|
36
|
+
export declare enum FILE_STATUS {
|
|
37
|
+
PENDING = "pending",
|
|
38
|
+
COMPLETED = "completed",
|
|
39
|
+
FAILED = "failed",
|
|
40
|
+
DELETED = "deleted"
|
|
41
|
+
}
|
|
42
|
+
export declare enum NOTIFICATION_STATUS {
|
|
43
|
+
PENDING = "pending",
|
|
44
|
+
SENT = "sent",
|
|
45
|
+
READ = "read",
|
|
46
|
+
FAILED = "failed"
|
|
47
|
+
}
|
|
48
|
+
export declare enum LIKE_TYPE {
|
|
49
|
+
LIKE = "like",
|
|
50
|
+
DISLIKE = "dislike",
|
|
51
|
+
NONE = "none"
|
|
52
|
+
}
|
package/dist/enums.common.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DEVICE_TYPE = exports.MIME_TYPE = exports.FILE_TYPE = void 0;
|
|
3
|
+
exports.LIKE_TYPE = exports.NOTIFICATION_STATUS = exports.FILE_STATUS = exports.AUDIT_ACTION = exports.DEVICE_TYPE = exports.MIME_TYPE = exports.FILE_TYPE = void 0;
|
|
4
4
|
var FILE_TYPE;
|
|
5
5
|
(function (FILE_TYPE) {
|
|
6
6
|
FILE_TYPE["IMAGE"] = "IMAGE";
|
|
@@ -33,3 +33,30 @@ var DEVICE_TYPE;
|
|
|
33
33
|
DEVICE_TYPE["MAC"] = "mac";
|
|
34
34
|
DEVICE_TYPE["OTHER"] = "other";
|
|
35
35
|
})(DEVICE_TYPE || (exports.DEVICE_TYPE = DEVICE_TYPE = {}));
|
|
36
|
+
var AUDIT_ACTION;
|
|
37
|
+
(function (AUDIT_ACTION) {
|
|
38
|
+
AUDIT_ACTION["CREATE"] = "create";
|
|
39
|
+
AUDIT_ACTION["READ"] = "read";
|
|
40
|
+
AUDIT_ACTION["UPDATE"] = "update";
|
|
41
|
+
AUDIT_ACTION["DELETE"] = "delete";
|
|
42
|
+
})(AUDIT_ACTION || (exports.AUDIT_ACTION = AUDIT_ACTION = {}));
|
|
43
|
+
var FILE_STATUS;
|
|
44
|
+
(function (FILE_STATUS) {
|
|
45
|
+
FILE_STATUS["PENDING"] = "pending";
|
|
46
|
+
FILE_STATUS["COMPLETED"] = "completed";
|
|
47
|
+
FILE_STATUS["FAILED"] = "failed";
|
|
48
|
+
FILE_STATUS["DELETED"] = "deleted";
|
|
49
|
+
})(FILE_STATUS || (exports.FILE_STATUS = FILE_STATUS = {}));
|
|
50
|
+
var NOTIFICATION_STATUS;
|
|
51
|
+
(function (NOTIFICATION_STATUS) {
|
|
52
|
+
NOTIFICATION_STATUS["PENDING"] = "pending";
|
|
53
|
+
NOTIFICATION_STATUS["SENT"] = "sent";
|
|
54
|
+
NOTIFICATION_STATUS["READ"] = "read";
|
|
55
|
+
NOTIFICATION_STATUS["FAILED"] = "failed";
|
|
56
|
+
})(NOTIFICATION_STATUS || (exports.NOTIFICATION_STATUS = NOTIFICATION_STATUS = {}));
|
|
57
|
+
var LIKE_TYPE;
|
|
58
|
+
(function (LIKE_TYPE) {
|
|
59
|
+
LIKE_TYPE["LIKE"] = "like";
|
|
60
|
+
LIKE_TYPE["DISLIKE"] = "dislike";
|
|
61
|
+
LIKE_TYPE["NONE"] = "none";
|
|
62
|
+
})(LIKE_TYPE || (exports.LIKE_TYPE = LIKE_TYPE = {}));
|