Files
immich/server/src/dtos/license.dto.ts
Zack Pollard 3b37b70626 feat(server): user and server license endpoints (#10682)
* feat: user license endpoints

* feat: server license endpoints

* chore: pr feedback

* chore: add more test cases

* chore: add prod license public keys

* chore: open-api generation
2024-07-01 17:43:16 +00:00

17 lines
331 B
TypeScript

import { IsNotEmpty, IsString, Matches } from 'class-validator';
export class LicenseKeyDto {
@IsString()
@IsNotEmpty()
@Matches(/IM(SV|CL)(-[\dA-Za-z]{4}){8}/)
licenseKey!: string;
@IsString()
@IsNotEmpty()
activationKey!: string;
}
export class LicenseResponseDto extends LicenseKeyDto {
activatedAt!: Date;
}