feat: expand backend admin marketplace and scaling
فشلت بعض الفحوصات
/ deploy (push) Failing after 1m22s
فشلت بعض الفحوصات
/ deploy (push) Failing after 1m22s
هذا الالتزام موجود في:
@@ -1,6 +1,20 @@
|
||||
import { ApiPropertyOptional } from '@nestjs/swagger';
|
||||
import { IsEnum, IsOptional, IsString, IsUrl, Length } from 'class-validator';
|
||||
import { Transform } from 'class-transformer';
|
||||
import {
|
||||
ArrayMaxSize,
|
||||
IsArray,
|
||||
IsEnum,
|
||||
IsMongoId,
|
||||
IsNumber,
|
||||
IsOptional,
|
||||
IsString,
|
||||
IsUrl,
|
||||
Length,
|
||||
Max,
|
||||
Min,
|
||||
} from 'class-validator';
|
||||
import { PostVisibility } from '../../../common/enums/post-visibility.enum';
|
||||
import { toNumberArray, toStringArray } from '../../../common/utils/array-transform.util';
|
||||
|
||||
export class UpdatePostDto {
|
||||
@ApiPropertyOptional({ maxLength: 2200 })
|
||||
@@ -19,6 +33,92 @@ export class UpdatePostDto {
|
||||
@IsUrl({ require_tld: false })
|
||||
audioUrl?: string;
|
||||
|
||||
@ApiPropertyOptional({ description: 'Media duration in seconds for audio/video posts' })
|
||||
@IsOptional()
|
||||
@IsNumber()
|
||||
@Min(1)
|
||||
@Max(7200)
|
||||
durationSeconds?: number;
|
||||
|
||||
@ApiPropertyOptional({ description: 'Cover/thumbnail URL for audio/video posts' })
|
||||
@IsOptional()
|
||||
@IsUrl({ require_tld: false })
|
||||
thumbnailUrl?: string;
|
||||
|
||||
@ApiPropertyOptional({ description: 'Music style or genre for audio/video posts', maxLength: 80 })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@Length(0, 80)
|
||||
style?: string;
|
||||
|
||||
@ApiPropertyOptional({ description: 'Maqam name for audio/video posts', maxLength: 80 })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@Length(0, 80)
|
||||
maqam?: string;
|
||||
|
||||
@ApiPropertyOptional({ description: 'Rhythm signature like 6/8 for audio/video posts', maxLength: 40 })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@Length(0, 40)
|
||||
rhythmSignature?: string;
|
||||
|
||||
@ApiPropertyOptional({
|
||||
type: [Number],
|
||||
description: 'Optional waveform samples for audio posts only',
|
||||
})
|
||||
@IsOptional()
|
||||
@Transform(toNumberArray)
|
||||
@IsArray()
|
||||
@ArrayMaxSize(512)
|
||||
@IsNumber({}, { each: true })
|
||||
waveformPeaks?: number[];
|
||||
|
||||
@ApiPropertyOptional({ type: [String], description: 'Set image carousel URLs (max 10)' })
|
||||
@IsOptional()
|
||||
@Transform(toStringArray)
|
||||
@IsArray()
|
||||
@ArrayMaxSize(10)
|
||||
@IsUrl({ require_tld: false }, { each: true })
|
||||
imageUrls?: string[];
|
||||
|
||||
@ApiPropertyOptional({ type: [String], description: 'Set tagged user ids (max 20)' })
|
||||
@IsOptional()
|
||||
@Transform(toStringArray)
|
||||
@IsArray()
|
||||
@ArrayMaxSize(20)
|
||||
@IsMongoId({ each: true })
|
||||
taggedUserIds?: string[];
|
||||
|
||||
@ApiPropertyOptional({ type: [String], description: 'Set mention usernames like rami_sabry (max 30)' })
|
||||
@IsOptional()
|
||||
@Transform(toStringArray)
|
||||
@IsArray()
|
||||
@ArrayMaxSize(30)
|
||||
@IsString({ each: true })
|
||||
@Length(1, 30, { each: true })
|
||||
mentionUsernames?: string[];
|
||||
|
||||
@ApiPropertyOptional({ description: 'Post location text' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@Length(0, 120)
|
||||
location?: string;
|
||||
|
||||
@ApiPropertyOptional({ description: 'Post latitude' })
|
||||
@IsOptional()
|
||||
@IsNumber()
|
||||
@Min(-90)
|
||||
@Max(90)
|
||||
latitude?: number;
|
||||
|
||||
@ApiPropertyOptional({ description: 'Post longitude' })
|
||||
@IsOptional()
|
||||
@IsNumber()
|
||||
@Min(-180)
|
||||
@Max(180)
|
||||
longitude?: number;
|
||||
|
||||
@ApiPropertyOptional({ enum: PostVisibility })
|
||||
@IsOptional()
|
||||
@IsEnum(PostVisibility)
|
||||
|
||||
المرجع في مشكلة جديدة
حظر مستخدم