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,73 @@
|
|
|
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.Keyframe = exports.EasingType = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
var EasingType;
|
|
15
|
+
(function (EasingType) {
|
|
16
|
+
EasingType["LINEAR"] = "linear";
|
|
17
|
+
EasingType["EASE_IN"] = "ease-in";
|
|
18
|
+
EasingType["EASE_OUT"] = "ease-out";
|
|
19
|
+
EasingType["EASE_IN_OUT"] = "ease-in-out";
|
|
20
|
+
EasingType["BEZIER"] = "bezier";
|
|
21
|
+
})(EasingType || (exports.EasingType = EasingType = {}));
|
|
22
|
+
class Keyframe {
|
|
23
|
+
id;
|
|
24
|
+
clipId;
|
|
25
|
+
clipEffectId;
|
|
26
|
+
propertyName;
|
|
27
|
+
timeMs;
|
|
28
|
+
value;
|
|
29
|
+
easingType = EasingType.LINEAR;
|
|
30
|
+
bezierValues;
|
|
31
|
+
createdAt;
|
|
32
|
+
}
|
|
33
|
+
exports.Keyframe = Keyframe;
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, class_validator_1.IsString)(),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], Keyframe.prototype, "id", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, class_validator_1.IsString)(),
|
|
40
|
+
(0, class_validator_1.IsOptional)(),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], Keyframe.prototype, "clipId", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, class_validator_1.IsString)(),
|
|
45
|
+
(0, class_validator_1.IsOptional)(),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], Keyframe.prototype, "clipEffectId", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, class_validator_1.IsString)(),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], Keyframe.prototype, "propertyName", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, class_validator_1.IsNumber)(),
|
|
54
|
+
__metadata("design:type", Number)
|
|
55
|
+
], Keyframe.prototype, "timeMs", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, class_validator_1.IsObject)(),
|
|
58
|
+
__metadata("design:type", Object)
|
|
59
|
+
], Keyframe.prototype, "value", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, class_validator_1.IsEnum)(EasingType),
|
|
62
|
+
__metadata("design:type", String)
|
|
63
|
+
], Keyframe.prototype, "easingType", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, class_validator_1.IsArray)(),
|
|
66
|
+
(0, class_validator_1.IsOptional)(),
|
|
67
|
+
__metadata("design:type", Array)
|
|
68
|
+
], Keyframe.prototype, "bezierValues", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, class_validator_1.IsString)(),
|
|
71
|
+
(0, class_validator_1.IsOptional)(),
|
|
72
|
+
__metadata("design:type", String)
|
|
73
|
+
], Keyframe.prototype, "createdAt", void 0);
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export declare enum PaymentTransactionType {
|
|
2
|
+
PAYMENT = "payment",
|
|
3
|
+
REFUND = "refund",
|
|
4
|
+
CHARGEBACK = "chargeback",
|
|
5
|
+
CREDIT = "credit"
|
|
6
|
+
}
|
|
7
|
+
export declare enum TransactionStatus {
|
|
8
|
+
PENDING = "pending",
|
|
9
|
+
COMPLETED = "completed",
|
|
10
|
+
FAILED = "failed",
|
|
11
|
+
CANCELLED = "cancelled"
|
|
12
|
+
}
|
|
13
|
+
export declare class PaymentTransaction {
|
|
14
|
+
id: string;
|
|
15
|
+
userId: string;
|
|
16
|
+
subscriptionId?: string;
|
|
17
|
+
transactionType: PaymentTransactionType;
|
|
18
|
+
amount: number;
|
|
19
|
+
currency: string;
|
|
20
|
+
status: TransactionStatus;
|
|
21
|
+
stripePaymentIntentId?: string;
|
|
22
|
+
stripeInvoiceId?: string;
|
|
23
|
+
paymentMethodType?: string;
|
|
24
|
+
billingEmail?: string;
|
|
25
|
+
billingName?: string;
|
|
26
|
+
billingAddress?: {
|
|
27
|
+
line1?: string;
|
|
28
|
+
line2?: string;
|
|
29
|
+
city?: string;
|
|
30
|
+
state?: string;
|
|
31
|
+
postalCode?: string;
|
|
32
|
+
country?: string;
|
|
33
|
+
};
|
|
34
|
+
failureReason?: string;
|
|
35
|
+
failureCode?: string;
|
|
36
|
+
processedAt?: string;
|
|
37
|
+
createdAt?: string;
|
|
38
|
+
invoiceUrl?: string;
|
|
39
|
+
invoiceNumber?: string;
|
|
40
|
+
}
|
|
@@ -0,0 +1,138 @@
|
|
|
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.PaymentTransaction = exports.TransactionStatus = exports.PaymentTransactionType = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
var PaymentTransactionType;
|
|
15
|
+
(function (PaymentTransactionType) {
|
|
16
|
+
PaymentTransactionType["PAYMENT"] = "payment";
|
|
17
|
+
PaymentTransactionType["REFUND"] = "refund";
|
|
18
|
+
PaymentTransactionType["CHARGEBACK"] = "chargeback";
|
|
19
|
+
PaymentTransactionType["CREDIT"] = "credit";
|
|
20
|
+
})(PaymentTransactionType || (exports.PaymentTransactionType = PaymentTransactionType = {}));
|
|
21
|
+
var TransactionStatus;
|
|
22
|
+
(function (TransactionStatus) {
|
|
23
|
+
TransactionStatus["PENDING"] = "pending";
|
|
24
|
+
TransactionStatus["COMPLETED"] = "completed";
|
|
25
|
+
TransactionStatus["FAILED"] = "failed";
|
|
26
|
+
TransactionStatus["CANCELLED"] = "cancelled";
|
|
27
|
+
})(TransactionStatus || (exports.TransactionStatus = TransactionStatus = {}));
|
|
28
|
+
class PaymentTransaction {
|
|
29
|
+
id;
|
|
30
|
+
userId;
|
|
31
|
+
subscriptionId;
|
|
32
|
+
transactionType;
|
|
33
|
+
amount;
|
|
34
|
+
currency = 'USD';
|
|
35
|
+
status;
|
|
36
|
+
stripePaymentIntentId;
|
|
37
|
+
stripeInvoiceId;
|
|
38
|
+
paymentMethodType;
|
|
39
|
+
billingEmail;
|
|
40
|
+
billingName;
|
|
41
|
+
billingAddress;
|
|
42
|
+
failureReason;
|
|
43
|
+
failureCode;
|
|
44
|
+
processedAt;
|
|
45
|
+
createdAt;
|
|
46
|
+
invoiceUrl;
|
|
47
|
+
invoiceNumber;
|
|
48
|
+
}
|
|
49
|
+
exports.PaymentTransaction = PaymentTransaction;
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, class_validator_1.IsString)(),
|
|
52
|
+
__metadata("design:type", String)
|
|
53
|
+
], PaymentTransaction.prototype, "id", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, class_validator_1.IsString)(),
|
|
56
|
+
__metadata("design:type", String)
|
|
57
|
+
], PaymentTransaction.prototype, "userId", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, class_validator_1.IsString)(),
|
|
60
|
+
(0, class_validator_1.IsOptional)(),
|
|
61
|
+
__metadata("design:type", String)
|
|
62
|
+
], PaymentTransaction.prototype, "subscriptionId", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, class_validator_1.IsEnum)(PaymentTransactionType),
|
|
65
|
+
__metadata("design:type", String)
|
|
66
|
+
], PaymentTransaction.prototype, "transactionType", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, class_validator_1.IsNumber)(),
|
|
69
|
+
__metadata("design:type", Number)
|
|
70
|
+
], PaymentTransaction.prototype, "amount", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, class_validator_1.IsString)(),
|
|
73
|
+
__metadata("design:type", String)
|
|
74
|
+
], PaymentTransaction.prototype, "currency", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, class_validator_1.IsEnum)(TransactionStatus),
|
|
77
|
+
__metadata("design:type", String)
|
|
78
|
+
], PaymentTransaction.prototype, "status", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, class_validator_1.IsString)(),
|
|
81
|
+
(0, class_validator_1.IsOptional)(),
|
|
82
|
+
__metadata("design:type", String)
|
|
83
|
+
], PaymentTransaction.prototype, "stripePaymentIntentId", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, class_validator_1.IsString)(),
|
|
86
|
+
(0, class_validator_1.IsOptional)(),
|
|
87
|
+
__metadata("design:type", String)
|
|
88
|
+
], PaymentTransaction.prototype, "stripeInvoiceId", void 0);
|
|
89
|
+
__decorate([
|
|
90
|
+
(0, class_validator_1.IsString)(),
|
|
91
|
+
(0, class_validator_1.IsOptional)(),
|
|
92
|
+
__metadata("design:type", String)
|
|
93
|
+
], PaymentTransaction.prototype, "paymentMethodType", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
(0, class_validator_1.IsString)(),
|
|
96
|
+
(0, class_validator_1.IsOptional)(),
|
|
97
|
+
__metadata("design:type", String)
|
|
98
|
+
], PaymentTransaction.prototype, "billingEmail", void 0);
|
|
99
|
+
__decorate([
|
|
100
|
+
(0, class_validator_1.IsString)(),
|
|
101
|
+
(0, class_validator_1.IsOptional)(),
|
|
102
|
+
__metadata("design:type", String)
|
|
103
|
+
], PaymentTransaction.prototype, "billingName", void 0);
|
|
104
|
+
__decorate([
|
|
105
|
+
(0, class_validator_1.IsObject)(),
|
|
106
|
+
(0, class_validator_1.IsOptional)(),
|
|
107
|
+
__metadata("design:type", Object)
|
|
108
|
+
], PaymentTransaction.prototype, "billingAddress", void 0);
|
|
109
|
+
__decorate([
|
|
110
|
+
(0, class_validator_1.IsString)(),
|
|
111
|
+
(0, class_validator_1.IsOptional)(),
|
|
112
|
+
__metadata("design:type", String)
|
|
113
|
+
], PaymentTransaction.prototype, "failureReason", void 0);
|
|
114
|
+
__decorate([
|
|
115
|
+
(0, class_validator_1.IsString)(),
|
|
116
|
+
(0, class_validator_1.IsOptional)(),
|
|
117
|
+
__metadata("design:type", String)
|
|
118
|
+
], PaymentTransaction.prototype, "failureCode", void 0);
|
|
119
|
+
__decorate([
|
|
120
|
+
(0, class_validator_1.IsString)(),
|
|
121
|
+
(0, class_validator_1.IsOptional)(),
|
|
122
|
+
__metadata("design:type", String)
|
|
123
|
+
], PaymentTransaction.prototype, "processedAt", void 0);
|
|
124
|
+
__decorate([
|
|
125
|
+
(0, class_validator_1.IsString)(),
|
|
126
|
+
(0, class_validator_1.IsOptional)(),
|
|
127
|
+
__metadata("design:type", String)
|
|
128
|
+
], PaymentTransaction.prototype, "createdAt", void 0);
|
|
129
|
+
__decorate([
|
|
130
|
+
(0, class_validator_1.IsString)(),
|
|
131
|
+
(0, class_validator_1.IsOptional)(),
|
|
132
|
+
__metadata("design:type", String)
|
|
133
|
+
], PaymentTransaction.prototype, "invoiceUrl", void 0);
|
|
134
|
+
__decorate([
|
|
135
|
+
(0, class_validator_1.IsString)(),
|
|
136
|
+
(0, class_validator_1.IsOptional)(),
|
|
137
|
+
__metadata("design:type", String)
|
|
138
|
+
], PaymentTransaction.prototype, "invoiceNumber", void 0);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare enum PaymentStatus {
|
|
2
|
+
PENDING = "pending",
|
|
3
|
+
SUCCEEDED = "succeeded",
|
|
4
|
+
FAILED = "failed",
|
|
5
|
+
REFUNDED = "refunded"
|
|
6
|
+
}
|
|
7
|
+
export declare enum PaymentMethod {
|
|
8
|
+
CREDIT_CARD = "credit_card",
|
|
9
|
+
BANK_TRANSFER = "bank_transfer",
|
|
10
|
+
CREDITS = "credits"
|
|
11
|
+
}
|
|
12
|
+
export declare class Payment {
|
|
13
|
+
id: string;
|
|
14
|
+
userId: string;
|
|
15
|
+
subscriptionId?: string;
|
|
16
|
+
amount: number;
|
|
17
|
+
currency: string;
|
|
18
|
+
status: PaymentStatus;
|
|
19
|
+
method: PaymentMethod;
|
|
20
|
+
stripePaymentIntentId?: string;
|
|
21
|
+
stripeChargeId?: string;
|
|
22
|
+
createdAt?: string;
|
|
23
|
+
updatedAt?: string;
|
|
24
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
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.Payment = exports.PaymentMethod = exports.PaymentStatus = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
var PaymentStatus;
|
|
15
|
+
(function (PaymentStatus) {
|
|
16
|
+
PaymentStatus["PENDING"] = "pending";
|
|
17
|
+
PaymentStatus["SUCCEEDED"] = "succeeded";
|
|
18
|
+
PaymentStatus["FAILED"] = "failed";
|
|
19
|
+
PaymentStatus["REFUNDED"] = "refunded";
|
|
20
|
+
})(PaymentStatus || (exports.PaymentStatus = PaymentStatus = {}));
|
|
21
|
+
var PaymentMethod;
|
|
22
|
+
(function (PaymentMethod) {
|
|
23
|
+
PaymentMethod["CREDIT_CARD"] = "credit_card";
|
|
24
|
+
PaymentMethod["BANK_TRANSFER"] = "bank_transfer";
|
|
25
|
+
PaymentMethod["CREDITS"] = "credits";
|
|
26
|
+
})(PaymentMethod || (exports.PaymentMethod = PaymentMethod = {}));
|
|
27
|
+
class Payment {
|
|
28
|
+
id;
|
|
29
|
+
userId;
|
|
30
|
+
subscriptionId;
|
|
31
|
+
amount;
|
|
32
|
+
currency;
|
|
33
|
+
status;
|
|
34
|
+
method;
|
|
35
|
+
stripePaymentIntentId;
|
|
36
|
+
stripeChargeId;
|
|
37
|
+
createdAt;
|
|
38
|
+
updatedAt;
|
|
39
|
+
}
|
|
40
|
+
exports.Payment = Payment;
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, class_validator_1.IsString)(),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], Payment.prototype, "id", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, class_validator_1.IsString)(),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], Payment.prototype, "userId", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, class_validator_1.IsString)(),
|
|
51
|
+
(0, class_validator_1.IsOptional)(),
|
|
52
|
+
__metadata("design:type", String)
|
|
53
|
+
], Payment.prototype, "subscriptionId", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, class_validator_1.IsNumber)(),
|
|
56
|
+
__metadata("design:type", Number)
|
|
57
|
+
], Payment.prototype, "amount", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, class_validator_1.IsString)(),
|
|
60
|
+
__metadata("design:type", String)
|
|
61
|
+
], Payment.prototype, "currency", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, class_validator_1.IsEnum)(PaymentStatus),
|
|
64
|
+
__metadata("design:type", String)
|
|
65
|
+
], Payment.prototype, "status", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, class_validator_1.IsEnum)(PaymentMethod),
|
|
68
|
+
__metadata("design:type", String)
|
|
69
|
+
], Payment.prototype, "method", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, class_validator_1.IsString)(),
|
|
72
|
+
(0, class_validator_1.IsOptional)(),
|
|
73
|
+
__metadata("design:type", String)
|
|
74
|
+
], Payment.prototype, "stripePaymentIntentId", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, class_validator_1.IsString)(),
|
|
77
|
+
(0, class_validator_1.IsOptional)(),
|
|
78
|
+
__metadata("design:type", String)
|
|
79
|
+
], Payment.prototype, "stripeChargeId", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, class_validator_1.IsString)(),
|
|
82
|
+
(0, class_validator_1.IsOptional)(),
|
|
83
|
+
__metadata("design:type", String)
|
|
84
|
+
], Payment.prototype, "createdAt", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, class_validator_1.IsString)(),
|
|
87
|
+
(0, class_validator_1.IsOptional)(),
|
|
88
|
+
__metadata("design:type", String)
|
|
89
|
+
], Payment.prototype, "updatedAt", void 0);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare class Plan {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
price: number;
|
|
6
|
+
interval: 'monthly' | 'yearly';
|
|
7
|
+
stripeProductId?: string;
|
|
8
|
+
stripePriceId?: string;
|
|
9
|
+
isActive?: boolean;
|
|
10
|
+
aiCreditsPerDay?: number;
|
|
11
|
+
createdAt?: string;
|
|
12
|
+
updatedAt?: string;
|
|
13
|
+
}
|
|
@@ -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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Plan = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
class Plan {
|
|
15
|
+
id;
|
|
16
|
+
name;
|
|
17
|
+
description;
|
|
18
|
+
price;
|
|
19
|
+
interval;
|
|
20
|
+
stripeProductId;
|
|
21
|
+
stripePriceId;
|
|
22
|
+
isActive;
|
|
23
|
+
aiCreditsPerDay;
|
|
24
|
+
createdAt;
|
|
25
|
+
updatedAt;
|
|
26
|
+
}
|
|
27
|
+
exports.Plan = Plan;
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, class_validator_1.IsString)(),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], Plan.prototype, "id", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, class_validator_1.IsString)(),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], Plan.prototype, "name", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, class_validator_1.IsString)(),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], Plan.prototype, "description", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, class_validator_1.IsNumber)(),
|
|
42
|
+
__metadata("design:type", Number)
|
|
43
|
+
], Plan.prototype, "price", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, class_validator_1.IsString)(),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], Plan.prototype, "interval", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, class_validator_1.IsString)(),
|
|
50
|
+
(0, class_validator_1.IsOptional)(),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], Plan.prototype, "stripeProductId", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, class_validator_1.IsString)(),
|
|
55
|
+
(0, class_validator_1.IsOptional)(),
|
|
56
|
+
__metadata("design:type", String)
|
|
57
|
+
], Plan.prototype, "stripePriceId", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, class_validator_1.IsBoolean)(),
|
|
60
|
+
(0, class_validator_1.IsOptional)(),
|
|
61
|
+
__metadata("design:type", Boolean)
|
|
62
|
+
], Plan.prototype, "isActive", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, class_validator_1.IsNumber)(),
|
|
65
|
+
(0, class_validator_1.IsOptional)(),
|
|
66
|
+
__metadata("design:type", Number)
|
|
67
|
+
], Plan.prototype, "aiCreditsPerDay", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, class_validator_1.IsString)(),
|
|
70
|
+
(0, class_validator_1.IsOptional)(),
|
|
71
|
+
__metadata("design:type", String)
|
|
72
|
+
], Plan.prototype, "createdAt", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, class_validator_1.IsString)(),
|
|
75
|
+
(0, class_validator_1.IsOptional)(),
|
|
76
|
+
__metadata("design:type", String)
|
|
77
|
+
], Plan.prototype, "updatedAt", void 0);
|
|
@@ -0,0 +1,66 @@
|
|
|
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.ProjectVersion = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
class ProjectVersion {
|
|
15
|
+
id;
|
|
16
|
+
projectId;
|
|
17
|
+
versionNumber;
|
|
18
|
+
name;
|
|
19
|
+
description;
|
|
20
|
+
createdBy;
|
|
21
|
+
snapshotData;
|
|
22
|
+
fileSize;
|
|
23
|
+
createdAt;
|
|
24
|
+
}
|
|
25
|
+
exports.ProjectVersion = ProjectVersion;
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, class_validator_1.IsString)(),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], ProjectVersion.prototype, "id", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, class_validator_1.IsString)(),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], ProjectVersion.prototype, "projectId", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, class_validator_1.IsNumber)(),
|
|
36
|
+
__metadata("design:type", Number)
|
|
37
|
+
], ProjectVersion.prototype, "versionNumber", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, class_validator_1.IsString)(),
|
|
40
|
+
(0, class_validator_1.IsOptional)(),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], ProjectVersion.prototype, "name", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, class_validator_1.IsString)(),
|
|
45
|
+
(0, class_validator_1.IsOptional)(),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], ProjectVersion.prototype, "description", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, class_validator_1.IsString)(),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], ProjectVersion.prototype, "createdBy", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, class_validator_1.IsObject)(),
|
|
54
|
+
(0, class_validator_1.IsOptional)(),
|
|
55
|
+
__metadata("design:type", Object)
|
|
56
|
+
], ProjectVersion.prototype, "snapshotData", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, class_validator_1.IsNumber)(),
|
|
59
|
+
(0, class_validator_1.IsOptional)(),
|
|
60
|
+
__metadata("design:type", Number)
|
|
61
|
+
], ProjectVersion.prototype, "fileSize", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, class_validator_1.IsString)(),
|
|
64
|
+
(0, class_validator_1.IsOptional)(),
|
|
65
|
+
__metadata("design:type", String)
|
|
66
|
+
], ProjectVersion.prototype, "createdAt", void 0);
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export declare enum ProjectStatus {
|
|
2
|
+
DRAFT = "draft",
|
|
3
|
+
IN_PROGRESS = "in_progress",
|
|
4
|
+
RENDERING = "rendering",
|
|
5
|
+
COMPLETED = "completed",
|
|
6
|
+
FAILED = "failed",
|
|
7
|
+
ARCHIVED = "archived"
|
|
8
|
+
}
|
|
9
|
+
export declare enum ProjectVisibility {
|
|
10
|
+
PRIVATE = "private",
|
|
11
|
+
WORKSPACE = "workspace",
|
|
12
|
+
PUBLIC = "public"
|
|
13
|
+
}
|
|
14
|
+
export declare class Project {
|
|
15
|
+
id: string;
|
|
16
|
+
workspaceId: string;
|
|
17
|
+
ownerId: string;
|
|
18
|
+
name: string;
|
|
19
|
+
description?: string;
|
|
20
|
+
thumbnailUrl?: string;
|
|
21
|
+
durationMs: number;
|
|
22
|
+
fps: number;
|
|
23
|
+
resolutionWidth: number;
|
|
24
|
+
resolutionHeight: number;
|
|
25
|
+
backgroundColor: string;
|
|
26
|
+
aspectRatio: string;
|
|
27
|
+
status: ProjectStatus;
|
|
28
|
+
visibility: ProjectVisibility;
|
|
29
|
+
version: number;
|
|
30
|
+
isTemplate: boolean;
|
|
31
|
+
isFavorite: boolean;
|
|
32
|
+
collaboratorIds?: string[];
|
|
33
|
+
tags?: string[];
|
|
34
|
+
templateCategory?: string;
|
|
35
|
+
isPremiumTemplate: boolean;
|
|
36
|
+
templateUsageCount: number;
|
|
37
|
+
lastOpenedAt?: string;
|
|
38
|
+
lastEditedBy?: string;
|
|
39
|
+
createdAt?: string;
|
|
40
|
+
updatedAt?: string;
|
|
41
|
+
settings?: {
|
|
42
|
+
autoSave?: boolean;
|
|
43
|
+
gridSnap?: boolean;
|
|
44
|
+
showTimecode?: boolean;
|
|
45
|
+
previewQuality?: 'low' | 'medium' | 'high';
|
|
46
|
+
audioLevels?: boolean;
|
|
47
|
+
};
|
|
48
|
+
}
|