Ship loyalty club and form builder so production pull gets the new screens.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-06 13:50:05 +03:30
co-authored by Cursor
parent 175f1fa440
commit 820c0780d8
21 changed files with 3658 additions and 893 deletions
+111
View File
@@ -1,5 +1,8 @@
import { Type } from 'class-transformer';
import {
ArrayMinSize,
IsArray,
IsBoolean,
IsInt,
IsNumber,
IsOptional,
@@ -58,3 +61,111 @@ export class AdjustLoyaltyPointsDto {
@MaxLength(200)
reason?: string;
}
export class BulkAdjustLoyaltyDto {
@IsArray()
@ArrayMinSize(1)
@IsString({ each: true })
personIds!: string[];
@Type(() => Number)
@IsNumber()
delta!: number;
@IsOptional()
@IsString()
@MaxLength(200)
reason?: string;
}
export class LoyaltyMessageDto {
@IsArray()
@ArrayMinSize(1)
@IsString({ each: true })
personIds!: string[];
@IsString()
@MinLength(2)
@MaxLength(500)
text!: string;
}
export class UpdateLoyaltySettingsDto {
@IsOptional()
@IsBoolean()
enabled?: boolean;
@IsOptional()
@Type(() => Number)
@IsInt()
@Min(0)
welcomePoints?: number;
@IsOptional()
@IsBoolean()
notifyOnAdjust?: boolean;
}
export class CreateLoyaltyRewardDto {
@IsString()
@MinLength(2)
@MaxLength(80)
name!: string;
@IsOptional()
@ValidateIf((_, v) => v !== '' && v != null)
@IsString()
@MaxLength(240)
description?: string | null;
@Type(() => Number)
@IsInt()
@Min(1)
pointsCost!: number;
@IsOptional()
@IsBoolean()
isActive?: boolean;
@IsOptional()
@ValidateIf((_, v) => v !== '' && v != null)
@IsString()
@MaxLength(32)
color?: string | null;
}
export class UpdateLoyaltyRewardDto {
@IsOptional()
@IsString()
@MinLength(2)
@MaxLength(80)
name?: string;
@IsOptional()
@ValidateIf((_, v) => v !== '' && v != null)
@IsString()
@MaxLength(240)
description?: string | null;
@IsOptional()
@Type(() => Number)
@IsInt()
@Min(1)
pointsCost?: number;
@IsOptional()
@IsBoolean()
isActive?: boolean;
@IsOptional()
@ValidateIf((_, v) => v !== '' && v != null)
@IsString()
@MaxLength(32)
color?: string | null;
}
export class RedeemLoyaltyRewardDto {
@IsString()
@MinLength(1)
personId!: string;
}