1
0
forked from Yara724/api

Fixed resend blame and claim sms start

This commit is contained in:
SepehrYahyaee
2026-05-30 16:18:11 +03:30
parent 7aada14551
commit 3b0db0d250
5 changed files with 87 additions and 45 deletions

View File

@@ -30,7 +30,12 @@ export const DEFAULT_CAR_BODY_ACCIDENT_MAX_AGE_DAYS = 7;
* default window (see {@link DEFAULT_MEDIA_LIMITS}) and an optional
* per-client override under `settings.media.<kind>`.
*/
export type MediaKind = "video" | "image" | "voice";
export type MediaKind =
| "video"
| "image"
| "voice"
| "chassisNumber"
| "carPlate";
export interface MediaLimits {
/** Inclusive lower bound. `0` allows any size from zero up. */
@@ -63,6 +68,14 @@ export const DEFAULT_MEDIA_LIMITS: Record<MediaKind, MediaLimits> = {
minBytes: DEFAULT_MEDIA_MIN_BYTES,
maxBytes: DEFAULT_MEDIA_MAX_BYTES,
},
carPlate: {
minBytes: DEFAULT_MEDIA_MIN_BYTES,
maxBytes: DEFAULT_MEDIA_MAX_BYTES,
},
chassisNumber: {
minBytes: DEFAULT_MEDIA_MIN_BYTES,
maxBytes: DEFAULT_MEDIA_MAX_BYTES,
},
};
/** Highest multer `fileSize` used on any route for each kind (policy cannot exceed this). */
@@ -70,6 +83,8 @@ export const MEDIA_ROUTE_MAX_BYTES: Record<MediaKind, number> = {
video: DEFAULT_MEDIA_MAX_BYTES,
image: DEFAULT_MEDIA_MAX_BYTES,
voice: DEFAULT_MEDIA_MAX_BYTES,
carPlate: DEFAULT_MEDIA_MAX_BYTES,
chassisNumber: DEFAULT_MEDIA_MAX_BYTES,
};
export const CAR_BODY_ACCIDENT_MAX_AGE_DAYS_MIN = 1;