Files
cozsweet-frontend-nextjs/src/data/services/dto/auth/refresh_token_request.ts
T
admin 661e417619 refactor(data): consolidate data layer under services namespace
- Move src/data/{api,dto,schemas} directories to src/data/services/*
- Update all relative imports across the codebase to reference new paths
- Use CSS color tokens for splash button gradient in splash-button.module.css
- Add responsive sizes attribute to splash background image
- Add JSDoc documentation to splash-background component referencing original Dart implementation
2026-06-09 16:44:05 +08:00

31 lines
796 B
TypeScript

/**
* 刷新 Token 请求 DTO
*/
import {
RefreshTokenRequestSchema,
type RefreshTokenRequestInput,
type RefreshTokenRequestData,
} from "@/data/services/schemas/auth/refresh_token_request";
export class RefreshTokenRequest {
declare readonly refreshToken: string;
private constructor(input: RefreshTokenRequestInput) {
const data = RefreshTokenRequestSchema.parse(input);
Object.assign(this, data);
Object.freeze(this);
}
static from(input: RefreshTokenRequestInput): RefreshTokenRequest {
return new RefreshTokenRequest(input);
}
static fromJson(json: unknown): RefreshTokenRequest {
return RefreshTokenRequest.from(json as RefreshTokenRequestInput);
}
toJson(): RefreshTokenRequestData {
return RefreshTokenRequestSchema.parse(this);
}
}