clhq-dynamodb-module 1.1.0-alpha.90
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/dist/app.module.d.ts +2 -0
- package/dist/app.module.js +88 -0
- package/dist/common/enums/index.d.ts +1 -0
- package/dist/common/enums/index.js +17 -0
- package/dist/common/enums/project-enums.d.ts +13 -0
- package/dist/common/enums/project-enums.js +18 -0
- package/dist/common/user.controller.d.ts +12 -0
- package/dist/common/user.controller.js +102 -0
- package/dist/dbservice/dynamodb-base.service.d.ts +23 -0
- package/dist/dbservice/dynamodb-base.service.js +105 -0
- package/dist/dbservice/index.d.ts +4 -0
- package/dist/dbservice/index.js +20 -0
- package/dist/dbservice/projects.service.d.ts +5 -0
- package/dist/dbservice/projects.service.js +25 -0
- package/dist/dbservice/users.service.d.ts +5 -0
- package/dist/dbservice/users.service.js +25 -0
- package/dist/dbservice/workspaces.service.d.ts +5 -0
- package/dist/dbservice/workspaces.service.js +25 -0
- package/dist/entities/ai-usage.entity.d.ts +16 -0
- package/dist/entities/ai-usage.entity.js +71 -0
- package/dist/entities/asset.entity.d.ts +59 -0
- package/dist/entities/asset.entity.js +185 -0
- package/dist/entities/auth.entity.d.ts +10 -0
- package/dist/entities/auth.entity.js +9 -0
- package/dist/entities/clip-effect.entity.d.ts +9 -0
- package/dist/entities/clip-effect.entity.js +53 -0
- package/dist/entities/clip.entity.d.ts +44 -0
- package/dist/entities/clip.entity.js +114 -0
- package/dist/entities/comment.entity.d.ts +18 -0
- package/dist/entities/comment.entity.js +83 -0
- package/dist/entities/common.entity.d.ts +21 -0
- package/dist/entities/common.entity.js +27 -0
- package/dist/entities/credit-transaction.entity.d.ts +15 -0
- package/dist/entities/credit-transaction.entity.js +66 -0
- package/dist/entities/editor-project.entity.d.ts +48 -0
- package/dist/entities/editor-project.entity.js +226 -0
- package/dist/entities/effect.entity.d.ts +22 -0
- package/dist/entities/effect.entity.js +87 -0
- package/dist/entities/index.d.ts +28 -0
- package/dist/entities/index.js +44 -0
- package/dist/entities/invite.entity.d.ts +17 -0
- package/dist/entities/invite.entity.js +73 -0
- package/dist/entities/keyframe.entity.d.ts +18 -0
- package/dist/entities/keyframe.entity.js +73 -0
- package/dist/entities/payment-transaction.entity.d.ts +40 -0
- package/dist/entities/payment-transaction.entity.js +138 -0
- package/dist/entities/payment.entity.d.ts +24 -0
- package/dist/entities/payment.entity.js +89 -0
- package/dist/entities/plan.entity.d.ts +13 -0
- package/dist/entities/plan.entity.js +77 -0
- package/dist/entities/project-version.entity.d.ts +11 -0
- package/dist/entities/project-version.entity.js +66 -0
- package/dist/entities/project.entity.d.ts +48 -0
- package/dist/entities/project.entity.js +175 -0
- package/dist/entities/reward-rule.entity.d.ts +15 -0
- package/dist/entities/reward-rule.entity.js +67 -0
- package/dist/entities/stripe-webhook-event.entity.d.ts +9 -0
- package/dist/entities/stripe-webhook-event.entity.js +54 -0
- package/dist/entities/subscription-plan.entity.d.ts +37 -0
- package/dist/entities/subscription-plan.entity.js +197 -0
- package/dist/entities/subscription-usage.entity.d.ts +15 -0
- package/dist/entities/subscription-usage.entity.js +83 -0
- package/dist/entities/timeline.entity.d.ts +8 -0
- package/dist/entities/timeline.entity.js +48 -0
- package/dist/entities/track.entity.d.ts +20 -0
- package/dist/entities/track.entity.js +81 -0
- package/dist/entities/user-onboarding-response.entity.d.ts +8 -0
- package/dist/entities/user-onboarding-response.entity.js +48 -0
- package/dist/entities/user-profile.entity.d.ts +51 -0
- package/dist/entities/user-profile.entity.js +200 -0
- package/dist/entities/user-subscription.entity.d.ts +44 -0
- package/dist/entities/user-subscription.entity.js +160 -0
- package/dist/entities/user.entity.d.ts +32 -0
- package/dist/entities/user.entity.js +133 -0
- package/dist/entities/workspace-member.entity.d.ts +8 -0
- package/dist/entities/workspace-member.entity.js +49 -0
- package/dist/entities/workspace.entity.d.ts +9 -0
- package/dist/entities/workspace.entity.js +54 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +22 -0
- package/dist/main.d.ts +1 -0
- package/dist/main.js +10 -0
- package/dist/repositories/asset.repository.d.ts +15 -0
- package/dist/repositories/asset.repository.js +101 -0
- package/dist/repositories/base.repository.d.ts +31 -0
- package/dist/repositories/base.repository.js +172 -0
- package/dist/repositories/clip-effect.repository.d.ts +9 -0
- package/dist/repositories/clip-effect.repository.js +49 -0
- package/dist/repositories/clip.repository.d.ts +13 -0
- package/dist/repositories/clip.repository.js +101 -0
- package/dist/repositories/comment.repository.d.ts +12 -0
- package/dist/repositories/comment.repository.js +92 -0
- package/dist/repositories/editor-project.repository.d.ts +26 -0
- package/dist/repositories/editor-project.repository.js +107 -0
- package/dist/repositories/effect.repository.d.ts +10 -0
- package/dist/repositories/effect.repository.js +59 -0
- package/dist/repositories/index.d.ts +21 -0
- package/dist/repositories/index.js +37 -0
- package/dist/repositories/keyframe.repository.d.ts +9 -0
- package/dist/repositories/keyframe.repository.js +49 -0
- package/dist/repositories/payment-transaction.repository.d.ts +13 -0
- package/dist/repositories/payment-transaction.repository.js +123 -0
- package/dist/repositories/project-version.repository.d.ts +9 -0
- package/dist/repositories/project-version.repository.js +51 -0
- package/dist/repositories/project.repository.d.ts +17 -0
- package/dist/repositories/project.repository.js +132 -0
- package/dist/repositories/reward-rule.repository.d.ts +13 -0
- package/dist/repositories/reward-rule.repository.js +84 -0
- package/dist/repositories/subscription-plan.repository.d.ts +11 -0
- package/dist/repositories/subscription-plan.repository.js +49 -0
- package/dist/repositories/subscription-usage.repository.d.ts +12 -0
- package/dist/repositories/subscription-usage.repository.js +68 -0
- package/dist/repositories/timeline.repository.d.ts +9 -0
- package/dist/repositories/timeline.repository.js +53 -0
- package/dist/repositories/track.repository.d.ts +13 -0
- package/dist/repositories/track.repository.js +61 -0
- package/dist/repositories/user-onboarding-response.repository.d.ts +11 -0
- package/dist/repositories/user-onboarding-response.repository.js +58 -0
- package/dist/repositories/user-profile.repository.d.ts +18 -0
- package/dist/repositories/user-profile.repository.js +62 -0
- package/dist/repositories/user-subscription.repository.d.ts +13 -0
- package/dist/repositories/user-subscription.repository.js +52 -0
- package/dist/repositories/user.repository.d.ts +20 -0
- package/dist/repositories/user.repository.js +94 -0
- package/dist/repositories/workspace-member.repository.d.ts +10 -0
- package/dist/repositories/workspace-member.repository.js +37 -0
- package/dist/repositories/workspace.repository.d.ts +10 -0
- package/dist/repositories/workspace.repository.js +45 -0
- package/package.json +63 -0
- package/readme.entity.implementation.md +1560 -0
|
@@ -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.Timeline = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
class Timeline {
|
|
15
|
+
id;
|
|
16
|
+
projectId;
|
|
17
|
+
name = 'Main Timeline';
|
|
18
|
+
durationMs = 0;
|
|
19
|
+
createdAt;
|
|
20
|
+
updatedAt;
|
|
21
|
+
}
|
|
22
|
+
exports.Timeline = Timeline;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, class_validator_1.IsString)(),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], Timeline.prototype, "id", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, class_validator_1.IsString)(),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], Timeline.prototype, "projectId", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_validator_1.IsString)(),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], Timeline.prototype, "name", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, class_validator_1.IsNumber)(),
|
|
37
|
+
__metadata("design:type", Number)
|
|
38
|
+
], Timeline.prototype, "durationMs", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, class_validator_1.IsString)(),
|
|
41
|
+
(0, class_validator_1.IsOptional)(),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], Timeline.prototype, "createdAt", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, class_validator_1.IsString)(),
|
|
46
|
+
(0, class_validator_1.IsOptional)(),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], Timeline.prototype, "updatedAt", void 0);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare enum TrackType {
|
|
2
|
+
VIDEO = "video",
|
|
3
|
+
AUDIO = "audio",
|
|
4
|
+
SUBTITLE = "subtitle",
|
|
5
|
+
OVERLAY = "overlay",
|
|
6
|
+
TEXT = "text"
|
|
7
|
+
}
|
|
8
|
+
export declare class Track {
|
|
9
|
+
id: string;
|
|
10
|
+
timelineId: string;
|
|
11
|
+
trackType: TrackType;
|
|
12
|
+
name?: string;
|
|
13
|
+
orderIndex: number;
|
|
14
|
+
isLocked: boolean;
|
|
15
|
+
isMuted: boolean;
|
|
16
|
+
isVisible: boolean;
|
|
17
|
+
height: number;
|
|
18
|
+
color: string;
|
|
19
|
+
createdAt?: string;
|
|
20
|
+
}
|
|
@@ -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.Track = exports.TrackType = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
var TrackType;
|
|
15
|
+
(function (TrackType) {
|
|
16
|
+
TrackType["VIDEO"] = "video";
|
|
17
|
+
TrackType["AUDIO"] = "audio";
|
|
18
|
+
TrackType["SUBTITLE"] = "subtitle";
|
|
19
|
+
TrackType["OVERLAY"] = "overlay";
|
|
20
|
+
TrackType["TEXT"] = "text";
|
|
21
|
+
})(TrackType || (exports.TrackType = TrackType = {}));
|
|
22
|
+
class Track {
|
|
23
|
+
id;
|
|
24
|
+
timelineId;
|
|
25
|
+
trackType;
|
|
26
|
+
name;
|
|
27
|
+
orderIndex;
|
|
28
|
+
isLocked = false;
|
|
29
|
+
isMuted = false;
|
|
30
|
+
isVisible = true;
|
|
31
|
+
height = 60;
|
|
32
|
+
color = '#4A90E2';
|
|
33
|
+
createdAt;
|
|
34
|
+
}
|
|
35
|
+
exports.Track = Track;
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, class_validator_1.IsString)(),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], Track.prototype, "id", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, class_validator_1.IsString)(),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], Track.prototype, "timelineId", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, class_validator_1.IsEnum)(TrackType),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], Track.prototype, "trackType", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, class_validator_1.IsString)(),
|
|
50
|
+
(0, class_validator_1.IsOptional)(),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], Track.prototype, "name", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, class_validator_1.IsNumber)(),
|
|
55
|
+
__metadata("design:type", Number)
|
|
56
|
+
], Track.prototype, "orderIndex", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, class_validator_1.IsBoolean)(),
|
|
59
|
+
__metadata("design:type", Boolean)
|
|
60
|
+
], Track.prototype, "isLocked", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, class_validator_1.IsBoolean)(),
|
|
63
|
+
__metadata("design:type", Boolean)
|
|
64
|
+
], Track.prototype, "isMuted", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, class_validator_1.IsBoolean)(),
|
|
67
|
+
__metadata("design:type", Boolean)
|
|
68
|
+
], Track.prototype, "isVisible", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, class_validator_1.IsNumber)(),
|
|
71
|
+
__metadata("design:type", Number)
|
|
72
|
+
], Track.prototype, "height", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, class_validator_1.IsString)(),
|
|
75
|
+
__metadata("design:type", String)
|
|
76
|
+
], Track.prototype, "color", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
(0, class_validator_1.IsString)(),
|
|
79
|
+
(0, class_validator_1.IsOptional)(),
|
|
80
|
+
__metadata("design:type", String)
|
|
81
|
+
], Track.prototype, "createdAt", void 0);
|
|
@@ -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.UserOnboardingResponse = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
class UserOnboardingResponse {
|
|
15
|
+
id;
|
|
16
|
+
userId;
|
|
17
|
+
questionKey;
|
|
18
|
+
responseValue;
|
|
19
|
+
createdAt;
|
|
20
|
+
updatedAt;
|
|
21
|
+
}
|
|
22
|
+
exports.UserOnboardingResponse = UserOnboardingResponse;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, class_validator_1.IsString)(),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], UserOnboardingResponse.prototype, "id", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, class_validator_1.IsString)(),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], UserOnboardingResponse.prototype, "userId", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_validator_1.IsString)(),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], UserOnboardingResponse.prototype, "questionKey", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, class_validator_1.IsObject)(),
|
|
37
|
+
__metadata("design:type", Object)
|
|
38
|
+
], UserOnboardingResponse.prototype, "responseValue", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, class_validator_1.IsString)(),
|
|
41
|
+
(0, class_validator_1.IsOptional)(),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], UserOnboardingResponse.prototype, "createdAt", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, class_validator_1.IsString)(),
|
|
46
|
+
(0, class_validator_1.IsOptional)(),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], UserOnboardingResponse.prototype, "updatedAt", void 0);
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export interface NotificationPreferences {
|
|
2
|
+
email: boolean;
|
|
3
|
+
push: boolean;
|
|
4
|
+
marketing: boolean;
|
|
5
|
+
projectUpdates: boolean;
|
|
6
|
+
storageWarnings: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface ExportPreferences {
|
|
9
|
+
defaultFormat: 'mp4' | 'mov' | 'avi' | 'webm';
|
|
10
|
+
defaultQuality: '720p' | '1080p' | '4K';
|
|
11
|
+
defaultFrameRate: 24 | 30 | 60;
|
|
12
|
+
watermark: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface WorkspacePreferences {
|
|
15
|
+
theme: 'light' | 'dark' | 'auto';
|
|
16
|
+
language: string;
|
|
17
|
+
timezone: string;
|
|
18
|
+
autoSave: boolean;
|
|
19
|
+
gridSnap: boolean;
|
|
20
|
+
}
|
|
21
|
+
export declare class UserProfile {
|
|
22
|
+
id: string;
|
|
23
|
+
userId: string;
|
|
24
|
+
firstName?: string;
|
|
25
|
+
lastName?: string;
|
|
26
|
+
displayName?: string;
|
|
27
|
+
bio?: string;
|
|
28
|
+
avatarUrl?: string;
|
|
29
|
+
phoneNumber?: string;
|
|
30
|
+
website?: string;
|
|
31
|
+
company?: string;
|
|
32
|
+
address?: string;
|
|
33
|
+
city?: string;
|
|
34
|
+
state?: string;
|
|
35
|
+
country?: string;
|
|
36
|
+
postalCode?: string;
|
|
37
|
+
storageUsed: number;
|
|
38
|
+
storageLimit: number;
|
|
39
|
+
notificationPreferences?: NotificationPreferences;
|
|
40
|
+
exportPreferences?: ExportPreferences;
|
|
41
|
+
workspacePreferences?: WorkspacePreferences;
|
|
42
|
+
linkedinUrl?: string;
|
|
43
|
+
twitterUrl?: string;
|
|
44
|
+
youtubeUrl?: string;
|
|
45
|
+
language: string;
|
|
46
|
+
timezone: string;
|
|
47
|
+
marketingOptIn: boolean;
|
|
48
|
+
createdAt: string;
|
|
49
|
+
updatedAt: string;
|
|
50
|
+
constructor();
|
|
51
|
+
}
|
|
@@ -0,0 +1,200 @@
|
|
|
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.UserProfile = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
class UserProfile {
|
|
15
|
+
id;
|
|
16
|
+
userId;
|
|
17
|
+
firstName;
|
|
18
|
+
lastName;
|
|
19
|
+
displayName;
|
|
20
|
+
bio;
|
|
21
|
+
avatarUrl;
|
|
22
|
+
phoneNumber;
|
|
23
|
+
website;
|
|
24
|
+
company;
|
|
25
|
+
address;
|
|
26
|
+
city;
|
|
27
|
+
state;
|
|
28
|
+
country;
|
|
29
|
+
postalCode;
|
|
30
|
+
storageUsed = 0;
|
|
31
|
+
storageLimit = 5368709120;
|
|
32
|
+
notificationPreferences;
|
|
33
|
+
exportPreferences;
|
|
34
|
+
workspacePreferences;
|
|
35
|
+
linkedinUrl;
|
|
36
|
+
twitterUrl;
|
|
37
|
+
youtubeUrl;
|
|
38
|
+
language = 'en';
|
|
39
|
+
timezone = 'UTC';
|
|
40
|
+
marketingOptIn = false;
|
|
41
|
+
createdAt;
|
|
42
|
+
updatedAt;
|
|
43
|
+
constructor() {
|
|
44
|
+
const now = new Date().toISOString();
|
|
45
|
+
this.createdAt = now;
|
|
46
|
+
this.updatedAt = now;
|
|
47
|
+
this.notificationPreferences = {
|
|
48
|
+
email: true,
|
|
49
|
+
push: true,
|
|
50
|
+
marketing: false,
|
|
51
|
+
projectUpdates: true,
|
|
52
|
+
storageWarnings: true,
|
|
53
|
+
};
|
|
54
|
+
this.exportPreferences = {
|
|
55
|
+
defaultFormat: 'mp4',
|
|
56
|
+
defaultQuality: '1080p',
|
|
57
|
+
defaultFrameRate: 30,
|
|
58
|
+
watermark: false,
|
|
59
|
+
};
|
|
60
|
+
this.workspacePreferences = {
|
|
61
|
+
theme: 'light',
|
|
62
|
+
language: 'en',
|
|
63
|
+
timezone: 'UTC',
|
|
64
|
+
autoSave: true,
|
|
65
|
+
gridSnap: true,
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
exports.UserProfile = UserProfile;
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, class_validator_1.IsString)(),
|
|
72
|
+
__metadata("design:type", String)
|
|
73
|
+
], UserProfile.prototype, "id", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, class_validator_1.IsString)(),
|
|
76
|
+
__metadata("design:type", String)
|
|
77
|
+
], UserProfile.prototype, "userId", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
(0, class_validator_1.IsString)(),
|
|
80
|
+
(0, class_validator_1.IsOptional)(),
|
|
81
|
+
__metadata("design:type", String)
|
|
82
|
+
], UserProfile.prototype, "firstName", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, class_validator_1.IsString)(),
|
|
85
|
+
(0, class_validator_1.IsOptional)(),
|
|
86
|
+
__metadata("design:type", String)
|
|
87
|
+
], UserProfile.prototype, "lastName", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
(0, class_validator_1.IsString)(),
|
|
90
|
+
(0, class_validator_1.IsOptional)(),
|
|
91
|
+
__metadata("design:type", String)
|
|
92
|
+
], UserProfile.prototype, "displayName", void 0);
|
|
93
|
+
__decorate([
|
|
94
|
+
(0, class_validator_1.IsString)(),
|
|
95
|
+
(0, class_validator_1.IsOptional)(),
|
|
96
|
+
__metadata("design:type", String)
|
|
97
|
+
], UserProfile.prototype, "bio", void 0);
|
|
98
|
+
__decorate([
|
|
99
|
+
(0, class_validator_1.IsString)(),
|
|
100
|
+
(0, class_validator_1.IsOptional)(),
|
|
101
|
+
__metadata("design:type", String)
|
|
102
|
+
], UserProfile.prototype, "avatarUrl", void 0);
|
|
103
|
+
__decorate([
|
|
104
|
+
(0, class_validator_1.IsString)(),
|
|
105
|
+
(0, class_validator_1.IsOptional)(),
|
|
106
|
+
__metadata("design:type", String)
|
|
107
|
+
], UserProfile.prototype, "phoneNumber", void 0);
|
|
108
|
+
__decorate([
|
|
109
|
+
(0, class_validator_1.IsString)(),
|
|
110
|
+
(0, class_validator_1.IsOptional)(),
|
|
111
|
+
__metadata("design:type", String)
|
|
112
|
+
], UserProfile.prototype, "website", void 0);
|
|
113
|
+
__decorate([
|
|
114
|
+
(0, class_validator_1.IsString)(),
|
|
115
|
+
(0, class_validator_1.IsOptional)(),
|
|
116
|
+
__metadata("design:type", String)
|
|
117
|
+
], UserProfile.prototype, "company", void 0);
|
|
118
|
+
__decorate([
|
|
119
|
+
(0, class_validator_1.IsString)(),
|
|
120
|
+
(0, class_validator_1.IsOptional)(),
|
|
121
|
+
__metadata("design:type", String)
|
|
122
|
+
], UserProfile.prototype, "address", void 0);
|
|
123
|
+
__decorate([
|
|
124
|
+
(0, class_validator_1.IsString)(),
|
|
125
|
+
(0, class_validator_1.IsOptional)(),
|
|
126
|
+
__metadata("design:type", String)
|
|
127
|
+
], UserProfile.prototype, "city", void 0);
|
|
128
|
+
__decorate([
|
|
129
|
+
(0, class_validator_1.IsString)(),
|
|
130
|
+
(0, class_validator_1.IsOptional)(),
|
|
131
|
+
__metadata("design:type", String)
|
|
132
|
+
], UserProfile.prototype, "state", void 0);
|
|
133
|
+
__decorate([
|
|
134
|
+
(0, class_validator_1.IsString)(),
|
|
135
|
+
(0, class_validator_1.IsOptional)(),
|
|
136
|
+
__metadata("design:type", String)
|
|
137
|
+
], UserProfile.prototype, "country", void 0);
|
|
138
|
+
__decorate([
|
|
139
|
+
(0, class_validator_1.IsString)(),
|
|
140
|
+
(0, class_validator_1.IsOptional)(),
|
|
141
|
+
__metadata("design:type", String)
|
|
142
|
+
], UserProfile.prototype, "postalCode", void 0);
|
|
143
|
+
__decorate([
|
|
144
|
+
(0, class_validator_1.IsNumber)(),
|
|
145
|
+
__metadata("design:type", Number)
|
|
146
|
+
], UserProfile.prototype, "storageUsed", void 0);
|
|
147
|
+
__decorate([
|
|
148
|
+
(0, class_validator_1.IsNumber)(),
|
|
149
|
+
__metadata("design:type", Number)
|
|
150
|
+
], UserProfile.prototype, "storageLimit", void 0);
|
|
151
|
+
__decorate([
|
|
152
|
+
(0, class_validator_1.IsObject)(),
|
|
153
|
+
(0, class_validator_1.IsOptional)(),
|
|
154
|
+
__metadata("design:type", Object)
|
|
155
|
+
], UserProfile.prototype, "notificationPreferences", void 0);
|
|
156
|
+
__decorate([
|
|
157
|
+
(0, class_validator_1.IsObject)(),
|
|
158
|
+
(0, class_validator_1.IsOptional)(),
|
|
159
|
+
__metadata("design:type", Object)
|
|
160
|
+
], UserProfile.prototype, "exportPreferences", void 0);
|
|
161
|
+
__decorate([
|
|
162
|
+
(0, class_validator_1.IsObject)(),
|
|
163
|
+
(0, class_validator_1.IsOptional)(),
|
|
164
|
+
__metadata("design:type", Object)
|
|
165
|
+
], UserProfile.prototype, "workspacePreferences", void 0);
|
|
166
|
+
__decorate([
|
|
167
|
+
(0, class_validator_1.IsString)(),
|
|
168
|
+
(0, class_validator_1.IsOptional)(),
|
|
169
|
+
__metadata("design:type", String)
|
|
170
|
+
], UserProfile.prototype, "linkedinUrl", void 0);
|
|
171
|
+
__decorate([
|
|
172
|
+
(0, class_validator_1.IsString)(),
|
|
173
|
+
(0, class_validator_1.IsOptional)(),
|
|
174
|
+
__metadata("design:type", String)
|
|
175
|
+
], UserProfile.prototype, "twitterUrl", void 0);
|
|
176
|
+
__decorate([
|
|
177
|
+
(0, class_validator_1.IsString)(),
|
|
178
|
+
(0, class_validator_1.IsOptional)(),
|
|
179
|
+
__metadata("design:type", String)
|
|
180
|
+
], UserProfile.prototype, "youtubeUrl", void 0);
|
|
181
|
+
__decorate([
|
|
182
|
+
(0, class_validator_1.IsString)(),
|
|
183
|
+
__metadata("design:type", String)
|
|
184
|
+
], UserProfile.prototype, "language", void 0);
|
|
185
|
+
__decorate([
|
|
186
|
+
(0, class_validator_1.IsString)(),
|
|
187
|
+
__metadata("design:type", String)
|
|
188
|
+
], UserProfile.prototype, "timezone", void 0);
|
|
189
|
+
__decorate([
|
|
190
|
+
(0, class_validator_1.IsBoolean)(),
|
|
191
|
+
__metadata("design:type", Boolean)
|
|
192
|
+
], UserProfile.prototype, "marketingOptIn", void 0);
|
|
193
|
+
__decorate([
|
|
194
|
+
(0, class_validator_1.IsString)(),
|
|
195
|
+
__metadata("design:type", String)
|
|
196
|
+
], UserProfile.prototype, "createdAt", void 0);
|
|
197
|
+
__decorate([
|
|
198
|
+
(0, class_validator_1.IsString)(),
|
|
199
|
+
__metadata("design:type", String)
|
|
200
|
+
], UserProfile.prototype, "updatedAt", void 0);
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export declare enum SubscriptionStatus {
|
|
2
|
+
ACTIVE = "active",
|
|
3
|
+
CANCELLED = "cancelled",
|
|
4
|
+
EXPIRED = "expired",
|
|
5
|
+
SUSPENDED = "suspended",
|
|
6
|
+
TRIAL = "trial",
|
|
7
|
+
PAST_DUE = "past_due",
|
|
8
|
+
UNPAID = "unpaid"
|
|
9
|
+
}
|
|
10
|
+
export declare enum BillingCycle {
|
|
11
|
+
MONTHLY = "monthly",
|
|
12
|
+
YEARLY = "yearly"
|
|
13
|
+
}
|
|
14
|
+
export declare enum CancelReason {
|
|
15
|
+
USER_REQUEST = "user_request",
|
|
16
|
+
PAYMENT_FAILED = "payment_failed",
|
|
17
|
+
FRAUD = "fraud",
|
|
18
|
+
DOWNGRADE = "downgrade",
|
|
19
|
+
OTHER = "other"
|
|
20
|
+
}
|
|
21
|
+
export declare class UserSubscription {
|
|
22
|
+
id: string;
|
|
23
|
+
userId: string;
|
|
24
|
+
planId: string;
|
|
25
|
+
status: SubscriptionStatus;
|
|
26
|
+
billingCycle: BillingCycle;
|
|
27
|
+
amountPaid: number;
|
|
28
|
+
currency: string;
|
|
29
|
+
startedAt: string;
|
|
30
|
+
currentPeriodStart: string;
|
|
31
|
+
currentPeriodEnd: string;
|
|
32
|
+
cancelledAt?: string;
|
|
33
|
+
expiresAt?: string;
|
|
34
|
+
trialEndsAt?: string;
|
|
35
|
+
stripeSubscriptionId?: string;
|
|
36
|
+
stripeCustomerId?: string;
|
|
37
|
+
paymentMethodId?: string;
|
|
38
|
+
cancelReason?: CancelReason;
|
|
39
|
+
cancelFeedback?: string;
|
|
40
|
+
cancelledBy?: string;
|
|
41
|
+
autoRenew: boolean;
|
|
42
|
+
createdAt?: string;
|
|
43
|
+
updatedAt?: string;
|
|
44
|
+
}
|
|
@@ -0,0 +1,160 @@
|
|
|
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.UserSubscription = exports.CancelReason = exports.BillingCycle = exports.SubscriptionStatus = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
var SubscriptionStatus;
|
|
15
|
+
(function (SubscriptionStatus) {
|
|
16
|
+
SubscriptionStatus["ACTIVE"] = "active";
|
|
17
|
+
SubscriptionStatus["CANCELLED"] = "cancelled";
|
|
18
|
+
SubscriptionStatus["EXPIRED"] = "expired";
|
|
19
|
+
SubscriptionStatus["SUSPENDED"] = "suspended";
|
|
20
|
+
SubscriptionStatus["TRIAL"] = "trial";
|
|
21
|
+
SubscriptionStatus["PAST_DUE"] = "past_due";
|
|
22
|
+
SubscriptionStatus["UNPAID"] = "unpaid";
|
|
23
|
+
})(SubscriptionStatus || (exports.SubscriptionStatus = SubscriptionStatus = {}));
|
|
24
|
+
var BillingCycle;
|
|
25
|
+
(function (BillingCycle) {
|
|
26
|
+
BillingCycle["MONTHLY"] = "monthly";
|
|
27
|
+
BillingCycle["YEARLY"] = "yearly";
|
|
28
|
+
})(BillingCycle || (exports.BillingCycle = BillingCycle = {}));
|
|
29
|
+
var CancelReason;
|
|
30
|
+
(function (CancelReason) {
|
|
31
|
+
CancelReason["USER_REQUEST"] = "user_request";
|
|
32
|
+
CancelReason["PAYMENT_FAILED"] = "payment_failed";
|
|
33
|
+
CancelReason["FRAUD"] = "fraud";
|
|
34
|
+
CancelReason["DOWNGRADE"] = "downgrade";
|
|
35
|
+
CancelReason["OTHER"] = "other";
|
|
36
|
+
})(CancelReason || (exports.CancelReason = CancelReason = {}));
|
|
37
|
+
class UserSubscription {
|
|
38
|
+
id;
|
|
39
|
+
userId;
|
|
40
|
+
planId;
|
|
41
|
+
status;
|
|
42
|
+
billingCycle;
|
|
43
|
+
amountPaid;
|
|
44
|
+
currency = 'USD';
|
|
45
|
+
startedAt;
|
|
46
|
+
currentPeriodStart;
|
|
47
|
+
currentPeriodEnd;
|
|
48
|
+
cancelledAt;
|
|
49
|
+
expiresAt;
|
|
50
|
+
trialEndsAt;
|
|
51
|
+
stripeSubscriptionId;
|
|
52
|
+
stripeCustomerId;
|
|
53
|
+
paymentMethodId;
|
|
54
|
+
cancelReason;
|
|
55
|
+
cancelFeedback;
|
|
56
|
+
cancelledBy;
|
|
57
|
+
autoRenew = true;
|
|
58
|
+
createdAt;
|
|
59
|
+
updatedAt;
|
|
60
|
+
}
|
|
61
|
+
exports.UserSubscription = UserSubscription;
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, class_validator_1.IsString)(),
|
|
64
|
+
__metadata("design:type", String)
|
|
65
|
+
], UserSubscription.prototype, "id", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, class_validator_1.IsString)(),
|
|
68
|
+
__metadata("design:type", String)
|
|
69
|
+
], UserSubscription.prototype, "userId", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, class_validator_1.IsString)(),
|
|
72
|
+
__metadata("design:type", String)
|
|
73
|
+
], UserSubscription.prototype, "planId", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, class_validator_1.IsEnum)(SubscriptionStatus),
|
|
76
|
+
__metadata("design:type", String)
|
|
77
|
+
], UserSubscription.prototype, "status", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
(0, class_validator_1.IsEnum)(BillingCycle),
|
|
80
|
+
__metadata("design:type", String)
|
|
81
|
+
], UserSubscription.prototype, "billingCycle", void 0);
|
|
82
|
+
__decorate([
|
|
83
|
+
(0, class_validator_1.IsNumber)(),
|
|
84
|
+
__metadata("design:type", Number)
|
|
85
|
+
], UserSubscription.prototype, "amountPaid", void 0);
|
|
86
|
+
__decorate([
|
|
87
|
+
(0, class_validator_1.IsString)(),
|
|
88
|
+
__metadata("design:type", String)
|
|
89
|
+
], UserSubscription.prototype, "currency", void 0);
|
|
90
|
+
__decorate([
|
|
91
|
+
(0, class_validator_1.IsString)(),
|
|
92
|
+
__metadata("design:type", String)
|
|
93
|
+
], UserSubscription.prototype, "startedAt", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
(0, class_validator_1.IsString)(),
|
|
96
|
+
__metadata("design:type", String)
|
|
97
|
+
], UserSubscription.prototype, "currentPeriodStart", void 0);
|
|
98
|
+
__decorate([
|
|
99
|
+
(0, class_validator_1.IsString)(),
|
|
100
|
+
__metadata("design:type", String)
|
|
101
|
+
], UserSubscription.prototype, "currentPeriodEnd", void 0);
|
|
102
|
+
__decorate([
|
|
103
|
+
(0, class_validator_1.IsString)(),
|
|
104
|
+
(0, class_validator_1.IsOptional)(),
|
|
105
|
+
__metadata("design:type", String)
|
|
106
|
+
], UserSubscription.prototype, "cancelledAt", void 0);
|
|
107
|
+
__decorate([
|
|
108
|
+
(0, class_validator_1.IsString)(),
|
|
109
|
+
(0, class_validator_1.IsOptional)(),
|
|
110
|
+
__metadata("design:type", String)
|
|
111
|
+
], UserSubscription.prototype, "expiresAt", void 0);
|
|
112
|
+
__decorate([
|
|
113
|
+
(0, class_validator_1.IsString)(),
|
|
114
|
+
(0, class_validator_1.IsOptional)(),
|
|
115
|
+
__metadata("design:type", String)
|
|
116
|
+
], UserSubscription.prototype, "trialEndsAt", void 0);
|
|
117
|
+
__decorate([
|
|
118
|
+
(0, class_validator_1.IsString)(),
|
|
119
|
+
(0, class_validator_1.IsOptional)(),
|
|
120
|
+
__metadata("design:type", String)
|
|
121
|
+
], UserSubscription.prototype, "stripeSubscriptionId", void 0);
|
|
122
|
+
__decorate([
|
|
123
|
+
(0, class_validator_1.IsString)(),
|
|
124
|
+
(0, class_validator_1.IsOptional)(),
|
|
125
|
+
__metadata("design:type", String)
|
|
126
|
+
], UserSubscription.prototype, "stripeCustomerId", void 0);
|
|
127
|
+
__decorate([
|
|
128
|
+
(0, class_validator_1.IsString)(),
|
|
129
|
+
(0, class_validator_1.IsOptional)(),
|
|
130
|
+
__metadata("design:type", String)
|
|
131
|
+
], UserSubscription.prototype, "paymentMethodId", void 0);
|
|
132
|
+
__decorate([
|
|
133
|
+
(0, class_validator_1.IsEnum)(CancelReason),
|
|
134
|
+
(0, class_validator_1.IsOptional)(),
|
|
135
|
+
__metadata("design:type", String)
|
|
136
|
+
], UserSubscription.prototype, "cancelReason", void 0);
|
|
137
|
+
__decorate([
|
|
138
|
+
(0, class_validator_1.IsString)(),
|
|
139
|
+
(0, class_validator_1.IsOptional)(),
|
|
140
|
+
__metadata("design:type", String)
|
|
141
|
+
], UserSubscription.prototype, "cancelFeedback", void 0);
|
|
142
|
+
__decorate([
|
|
143
|
+
(0, class_validator_1.IsString)(),
|
|
144
|
+
(0, class_validator_1.IsOptional)(),
|
|
145
|
+
__metadata("design:type", String)
|
|
146
|
+
], UserSubscription.prototype, "cancelledBy", void 0);
|
|
147
|
+
__decorate([
|
|
148
|
+
(0, class_validator_1.IsBoolean)(),
|
|
149
|
+
__metadata("design:type", Boolean)
|
|
150
|
+
], UserSubscription.prototype, "autoRenew", void 0);
|
|
151
|
+
__decorate([
|
|
152
|
+
(0, class_validator_1.IsString)(),
|
|
153
|
+
(0, class_validator_1.IsOptional)(),
|
|
154
|
+
__metadata("design:type", String)
|
|
155
|
+
], UserSubscription.prototype, "createdAt", void 0);
|
|
156
|
+
__decorate([
|
|
157
|
+
(0, class_validator_1.IsString)(),
|
|
158
|
+
(0, class_validator_1.IsOptional)(),
|
|
159
|
+
__metadata("design:type", String)
|
|
160
|
+
], UserSubscription.prototype, "updatedAt", void 0);
|