clhq-postgres-module 1.1.0-alpha.91 → 1.1.0-alpha.93
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/entities/index.d.ts +1 -0
- package/dist/entities/index.js +1 -0
- package/dist/entities/video-filmstrip.entity.d.ts +29 -0
- package/dist/entities/video-filmstrip.entity.js +64 -0
- package/dist/repositories/index.d.ts +1 -0
- package/dist/repositories/index.js +3 -1
- package/dist/repositories/repository.module.js +2 -0
- package/dist/repositories/video-filmstrip.repository.d.ts +24 -0
- package/dist/repositories/video-filmstrip.repository.js +57 -0
- package/package.json +1 -1
package/dist/entities/index.d.ts
CHANGED
package/dist/entities/index.js
CHANGED
|
@@ -39,3 +39,4 @@ __exportStar(require("./effect.entity"), exports);
|
|
|
39
39
|
__exportStar(require("./video-transcode.entity"), exports);
|
|
40
40
|
__exportStar(require("./video-render.entity"), exports);
|
|
41
41
|
__exportStar(require("./video-subtitle.entity"), exports);
|
|
42
|
+
__exportStar(require("./video-filmstrip.entity"), exports);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export declare enum VideoFilmstripStatus {
|
|
2
|
+
NEW = "NEW",
|
|
3
|
+
PROCESSING = "PROCESSING",
|
|
4
|
+
SUCCESS = "SUCCESS",
|
|
5
|
+
ERROR = "ERROR"
|
|
6
|
+
}
|
|
7
|
+
export interface VideoFilmstripData {
|
|
8
|
+
spriteUrl?: string;
|
|
9
|
+
spriteKey?: string;
|
|
10
|
+
manifestUrl?: string;
|
|
11
|
+
manifestKey?: string;
|
|
12
|
+
frameWidth?: number;
|
|
13
|
+
frameHeight?: number;
|
|
14
|
+
frameInterval?: number;
|
|
15
|
+
totalFrames?: number;
|
|
16
|
+
framesPerRow?: number;
|
|
17
|
+
videoDuration?: number;
|
|
18
|
+
error?: string;
|
|
19
|
+
}
|
|
20
|
+
export declare class VideoFilmstrip {
|
|
21
|
+
id: string;
|
|
22
|
+
projectId: string;
|
|
23
|
+
videoS3Key: string;
|
|
24
|
+
status: VideoFilmstripStatus;
|
|
25
|
+
data: VideoFilmstripData;
|
|
26
|
+
queueStatus: string;
|
|
27
|
+
createdAt: Date;
|
|
28
|
+
updatedAt: Date;
|
|
29
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
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.VideoFilmstrip = exports.VideoFilmstripStatus = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
var VideoFilmstripStatus;
|
|
15
|
+
(function (VideoFilmstripStatus) {
|
|
16
|
+
VideoFilmstripStatus["NEW"] = "NEW";
|
|
17
|
+
VideoFilmstripStatus["PROCESSING"] = "PROCESSING";
|
|
18
|
+
VideoFilmstripStatus["SUCCESS"] = "SUCCESS";
|
|
19
|
+
VideoFilmstripStatus["ERROR"] = "ERROR";
|
|
20
|
+
})(VideoFilmstripStatus || (exports.VideoFilmstripStatus = VideoFilmstripStatus = {}));
|
|
21
|
+
let VideoFilmstrip = class VideoFilmstrip {
|
|
22
|
+
};
|
|
23
|
+
exports.VideoFilmstrip = VideoFilmstrip;
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, typeorm_1.PrimaryColumn)({ type: 'varchar', length: 255 }),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], VideoFilmstrip.prototype, "id", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.Column)({ name: 'project_id', type: 'varchar', length: 255, nullable: true }),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], VideoFilmstrip.prototype, "projectId", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.Column)({ name: 'video_s3_key', type: 'text', nullable: true }),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], VideoFilmstrip.prototype, "videoS3Key", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.Column)({
|
|
38
|
+
type: 'enum',
|
|
39
|
+
enum: VideoFilmstripStatus,
|
|
40
|
+
default: VideoFilmstripStatus.NEW,
|
|
41
|
+
}),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], VideoFilmstrip.prototype, "status", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typeorm_1.Column)({ type: 'jsonb', nullable: true }),
|
|
46
|
+
__metadata("design:type", Object)
|
|
47
|
+
], VideoFilmstrip.prototype, "data", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.Column)({ name: 'queue_status', type: 'varchar', length: 50, nullable: true }),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], VideoFilmstrip.prototype, "queueStatus", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.CreateDateColumn)({ name: 'created_at' }),
|
|
54
|
+
__metadata("design:type", Date)
|
|
55
|
+
], VideoFilmstrip.prototype, "createdAt", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, typeorm_1.UpdateDateColumn)({ name: 'updated_at' }),
|
|
58
|
+
__metadata("design:type", Date)
|
|
59
|
+
], VideoFilmstrip.prototype, "updatedAt", void 0);
|
|
60
|
+
exports.VideoFilmstrip = VideoFilmstrip = __decorate([
|
|
61
|
+
(0, typeorm_1.Entity)('video_filmstrips'),
|
|
62
|
+
(0, typeorm_1.Index)(['projectId']),
|
|
63
|
+
(0, typeorm_1.Index)(['status'])
|
|
64
|
+
], VideoFilmstrip);
|
|
@@ -21,3 +21,4 @@ export { AssetRepository } from './asset.repository';
|
|
|
21
21
|
export { EffectRepository } from './effect.repository';
|
|
22
22
|
export { VideoTranscodeRepository } from './video-transcode.repository';
|
|
23
23
|
export { VideoRenderRepository } from './video-render.repository';
|
|
24
|
+
export { VideoFilmstripRepository } from './video-filmstrip.repository';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.VideoRenderRepository = exports.VideoTranscodeRepository = exports.EffectRepository = exports.AssetRepository = exports.AiUsageRepository = exports.RewardRuleRepository = exports.CreditTransactionRepository = exports.StripeWebhookRepository = exports.PaymentTransactionRepository = exports.SubscriptionUsageRepository = exports.UserSubscriptionRepository = exports.PlanRepository = exports.SubscriptionPlanRepository = exports.CommentRepository = exports.EditorProjectRepository = exports.InviteRepository = exports.WorkspaceMemberRepository = exports.WorkspaceRepository = exports.AuthSessionRepository = exports.UserOnboardingRepository = exports.UserProfileRepository = exports.UserRepository = exports.BaseRepository = void 0;
|
|
3
|
+
exports.VideoFilmstripRepository = exports.VideoRenderRepository = exports.VideoTranscodeRepository = exports.EffectRepository = exports.AssetRepository = exports.AiUsageRepository = exports.RewardRuleRepository = exports.CreditTransactionRepository = exports.StripeWebhookRepository = exports.PaymentTransactionRepository = exports.SubscriptionUsageRepository = exports.UserSubscriptionRepository = exports.PlanRepository = exports.SubscriptionPlanRepository = exports.CommentRepository = exports.EditorProjectRepository = exports.InviteRepository = exports.WorkspaceMemberRepository = exports.WorkspaceRepository = exports.AuthSessionRepository = exports.UserOnboardingRepository = exports.UserProfileRepository = exports.UserRepository = exports.BaseRepository = void 0;
|
|
4
4
|
var base_repository_1 = require("./base.repository");
|
|
5
5
|
Object.defineProperty(exports, "BaseRepository", { enumerable: true, get: function () { return base_repository_1.BaseRepository; } });
|
|
6
6
|
var user_repository_1 = require("./user.repository");
|
|
@@ -47,3 +47,5 @@ var video_transcode_repository_1 = require("./video-transcode.repository");
|
|
|
47
47
|
Object.defineProperty(exports, "VideoTranscodeRepository", { enumerable: true, get: function () { return video_transcode_repository_1.VideoTranscodeRepository; } });
|
|
48
48
|
var video_render_repository_1 = require("./video-render.repository");
|
|
49
49
|
Object.defineProperty(exports, "VideoRenderRepository", { enumerable: true, get: function () { return video_render_repository_1.VideoRenderRepository; } });
|
|
50
|
+
var video_filmstrip_repository_1 = require("./video-filmstrip.repository");
|
|
51
|
+
Object.defineProperty(exports, "VideoFilmstripRepository", { enumerable: true, get: function () { return video_filmstrip_repository_1.VideoFilmstripRepository; } });
|
|
@@ -34,6 +34,7 @@ const repositories = [
|
|
|
34
34
|
_1.EffectRepository,
|
|
35
35
|
_1.VideoTranscodeRepository,
|
|
36
36
|
_1.VideoRenderRepository,
|
|
37
|
+
_1.VideoFilmstripRepository,
|
|
37
38
|
];
|
|
38
39
|
const entities = [
|
|
39
40
|
entities_1.User,
|
|
@@ -58,6 +59,7 @@ const entities = [
|
|
|
58
59
|
entities_1.Effect,
|
|
59
60
|
entities_1.VideoTranscode,
|
|
60
61
|
entities_1.VideoRender,
|
|
62
|
+
entities_1.VideoFilmstrip,
|
|
61
63
|
];
|
|
62
64
|
let RepositoryModule = class RepositoryModule {
|
|
63
65
|
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Repository } from 'typeorm';
|
|
2
|
+
import { BaseRepository } from './base.repository';
|
|
3
|
+
import { VideoFilmstrip, VideoFilmstripStatus, VideoFilmstripData } from '../entities/video-filmstrip.entity';
|
|
4
|
+
export declare class VideoFilmstripRepository extends BaseRepository<VideoFilmstrip> {
|
|
5
|
+
private readonly videoFilmstripRepository;
|
|
6
|
+
constructor(videoFilmstripRepository: Repository<VideoFilmstrip>);
|
|
7
|
+
findByProjectId(projectId: string): Promise<VideoFilmstrip[]>;
|
|
8
|
+
findByStatus(status: VideoFilmstripStatus): Promise<VideoFilmstrip[]>;
|
|
9
|
+
findByVideoS3Key(videoS3Key: string): Promise<VideoFilmstrip | null>;
|
|
10
|
+
updateFilmstrip(id: string, data: {
|
|
11
|
+
status?: VideoFilmstripStatus;
|
|
12
|
+
videoS3Key?: string;
|
|
13
|
+
data?: VideoFilmstripData;
|
|
14
|
+
queueStatus?: string;
|
|
15
|
+
}): Promise<VideoFilmstrip | null>;
|
|
16
|
+
createWithId(data: {
|
|
17
|
+
id: string;
|
|
18
|
+
projectId?: string;
|
|
19
|
+
videoS3Key?: string;
|
|
20
|
+
status?: VideoFilmstripStatus;
|
|
21
|
+
data?: VideoFilmstripData;
|
|
22
|
+
queueStatus?: string;
|
|
23
|
+
}): Promise<VideoFilmstrip>;
|
|
24
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.VideoFilmstripRepository = void 0;
|
|
16
|
+
const typeorm_1 = require("typeorm");
|
|
17
|
+
const common_1 = require("@nestjs/common");
|
|
18
|
+
const typeorm_2 = require("@nestjs/typeorm");
|
|
19
|
+
const base_repository_1 = require("./base.repository");
|
|
20
|
+
const video_filmstrip_entity_1 = require("../entities/video-filmstrip.entity");
|
|
21
|
+
let VideoFilmstripRepository = class VideoFilmstripRepository extends base_repository_1.BaseRepository {
|
|
22
|
+
constructor(videoFilmstripRepository) {
|
|
23
|
+
super(videoFilmstripRepository);
|
|
24
|
+
this.videoFilmstripRepository = videoFilmstripRepository;
|
|
25
|
+
}
|
|
26
|
+
async findByProjectId(projectId) {
|
|
27
|
+
return this.videoFilmstripRepository.find({
|
|
28
|
+
where: { projectId },
|
|
29
|
+
order: { createdAt: 'DESC' },
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
async findByStatus(status) {
|
|
33
|
+
return this.videoFilmstripRepository.find({
|
|
34
|
+
where: { status },
|
|
35
|
+
order: { createdAt: 'DESC' },
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
async findByVideoS3Key(videoS3Key) {
|
|
39
|
+
return this.videoFilmstripRepository.findOne({
|
|
40
|
+
where: { videoS3Key },
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
async updateFilmstrip(id, data) {
|
|
44
|
+
await this.videoFilmstripRepository.update(id, data);
|
|
45
|
+
return this.findById(id);
|
|
46
|
+
}
|
|
47
|
+
async createWithId(data) {
|
|
48
|
+
const entity = this.videoFilmstripRepository.create(data);
|
|
49
|
+
return this.videoFilmstripRepository.save(entity);
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
exports.VideoFilmstripRepository = VideoFilmstripRepository;
|
|
53
|
+
exports.VideoFilmstripRepository = VideoFilmstripRepository = __decorate([
|
|
54
|
+
(0, common_1.Injectable)(),
|
|
55
|
+
__param(0, (0, typeorm_2.InjectRepository)(video_filmstrip_entity_1.VideoFilmstrip)),
|
|
56
|
+
__metadata("design:paramtypes", [typeorm_1.Repository])
|
|
57
|
+
], VideoFilmstripRepository);
|