Add Instagram-style social features and Postman collections
هذا الالتزام موجود في:
@@ -7,6 +7,7 @@ import {
|
||||
IsMongoId,
|
||||
IsNumber,
|
||||
IsOptional,
|
||||
IsBoolean,
|
||||
IsString,
|
||||
IsUrl,
|
||||
Length,
|
||||
@@ -82,6 +83,24 @@ export class UpdatePostDto {
|
||||
@IsUrl({ require_tld: false }, { each: true })
|
||||
imageUrls?: string[];
|
||||
|
||||
@ApiPropertyOptional({ type: [String], description: 'Caption per carousel image, matched by order' })
|
||||
@IsOptional()
|
||||
@Transform(toStringArray)
|
||||
@IsArray()
|
||||
@ArrayMaxSize(10)
|
||||
@IsString({ each: true })
|
||||
@Length(0, 300, { each: true })
|
||||
imageCaptions?: string[];
|
||||
|
||||
@ApiPropertyOptional({ type: [String], description: 'Alt text per carousel image, matched by order' })
|
||||
@IsOptional()
|
||||
@Transform(toStringArray)
|
||||
@IsArray()
|
||||
@ArrayMaxSize(10)
|
||||
@IsString({ each: true })
|
||||
@Length(0, 300, { each: true })
|
||||
imageAltTexts?: string[];
|
||||
|
||||
@ApiPropertyOptional({ type: [String], description: 'Set tagged user ids (max 20)' })
|
||||
@IsOptional()
|
||||
@Transform(toStringArray)
|
||||
@@ -90,6 +109,14 @@ export class UpdatePostDto {
|
||||
@IsMongoId({ each: true })
|
||||
taggedUserIds?: string[];
|
||||
|
||||
@ApiPropertyOptional({ type: [String], description: 'Collaborator user ids (max 5)' })
|
||||
@IsOptional()
|
||||
@Transform(toStringArray)
|
||||
@IsArray()
|
||||
@ArrayMaxSize(5)
|
||||
@IsMongoId({ each: true })
|
||||
collaboratorIds?: string[];
|
||||
|
||||
@ApiPropertyOptional({ type: [String], description: 'Set mention usernames like rami_sabry (max 30)' })
|
||||
@IsOptional()
|
||||
@Transform(toStringArray)
|
||||
@@ -123,4 +150,14 @@ export class UpdatePostDto {
|
||||
@IsOptional()
|
||||
@IsEnum(PostVisibility)
|
||||
visibility?: PostVisibility;
|
||||
|
||||
@ApiPropertyOptional()
|
||||
@IsOptional()
|
||||
@IsBoolean()
|
||||
commentsDisabled?: boolean;
|
||||
|
||||
@ApiPropertyOptional()
|
||||
@IsOptional()
|
||||
@IsBoolean()
|
||||
commentsFollowersOnly?: boolean;
|
||||
}
|
||||
|
||||
المرجع في مشكلة جديدة
حظر مستخدم