2026-04-18 02:00:09 +00:00
|
|
|
/**
|
|
|
|
|
* Generated by orval v8.5.3 🍺
|
|
|
|
|
* Do not edit manually.
|
|
|
|
|
* Api
|
2026-04-20 09:20:50 +00:00
|
|
|
* TeaBoy OS API specification
|
2026-04-18 02:00:09 +00:00
|
|
|
* OpenAPI spec version: 0.1.0
|
|
|
|
|
*/
|
|
|
|
|
export interface HealthStatus {
|
|
|
|
|
status: string;
|
|
|
|
|
}
|
2026-04-20 09:20:50 +00:00
|
|
|
|
|
|
|
|
export interface ErrorResponse {
|
|
|
|
|
error: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface SuccessResponse {
|
|
|
|
|
success: boolean;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface RegisterBody {
|
|
|
|
|
username: string;
|
|
|
|
|
email: string;
|
|
|
|
|
password: string;
|
|
|
|
|
/** @nullable */
|
|
|
|
|
displayNameAr?: string | null;
|
|
|
|
|
/** @nullable */
|
|
|
|
|
displayNameEn?: string | null;
|
|
|
|
|
preferredLanguage?: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface LoginBody {
|
|
|
|
|
username: string;
|
|
|
|
|
password: string;
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-20 16:28:50 +00:00
|
|
|
export interface ForgotPasswordBody {
|
|
|
|
|
/** Username or email */
|
|
|
|
|
identifier: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface ForgotPasswordResponse {
|
|
|
|
|
success: boolean;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface ResetPasswordBody {
|
|
|
|
|
token: string;
|
|
|
|
|
/** @minLength 6 */
|
|
|
|
|
newPassword: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface VerifyResetTokenBody {
|
|
|
|
|
token: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface AdminResetLinkResponse {
|
|
|
|
|
resetUrl: string;
|
|
|
|
|
expiresAt: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface VerifyResetTokenResponse {
|
|
|
|
|
valid: boolean;
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-20 09:20:50 +00:00
|
|
|
export interface UpdateLanguageBody {
|
|
|
|
|
language: string;
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-20 16:40:49 +00:00
|
|
|
/**
|
|
|
|
|
* Per-user home-screen clock style preference
|
|
|
|
|
*/
|
|
|
|
|
export type ClockStyle = (typeof ClockStyle)[keyof typeof ClockStyle];
|
|
|
|
|
|
|
|
|
|
export const ClockStyle = {
|
|
|
|
|
full: "full",
|
|
|
|
|
digital: "digital",
|
|
|
|
|
"digital-no-seconds": "digital-no-seconds",
|
|
|
|
|
analog: "analog",
|
|
|
|
|
minimal: "minimal",
|
|
|
|
|
} as const;
|
|
|
|
|
|
|
|
|
|
export interface UpdateClockStyleBody {
|
|
|
|
|
/** Clock style; pass null to clear and use the default */
|
|
|
|
|
clockStyle: ClockStyle | null;
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-21 07:16:50 +00:00
|
|
|
export interface UpdateClockHour12Body {
|
|
|
|
|
/**
|
|
|
|
|
* Whether to use 12-hour (AM/PM) clock format; null clears and uses the default (24-hour)
|
|
|
|
|
* @nullable
|
|
|
|
|
*/
|
|
|
|
|
clockHour12: boolean | null;
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-20 09:20:50 +00:00
|
|
|
export interface AuthUser {
|
|
|
|
|
id: number;
|
|
|
|
|
username: string;
|
|
|
|
|
email: string;
|
|
|
|
|
/** @nullable */
|
|
|
|
|
displayNameAr?: string | null;
|
|
|
|
|
/** @nullable */
|
|
|
|
|
displayNameEn?: string | null;
|
|
|
|
|
preferredLanguage: string;
|
2026-04-20 16:40:49 +00:00
|
|
|
clockStyle?: ClockStyle | null;
|
2026-04-20 09:20:50 +00:00
|
|
|
/** @nullable */
|
2026-04-21 07:16:50 +00:00
|
|
|
clockHour12?: boolean | null;
|
|
|
|
|
/** @nullable */
|
2026-04-20 09:20:50 +00:00
|
|
|
avatarUrl?: string | null;
|
|
|
|
|
isActive: boolean;
|
|
|
|
|
roles: string[];
|
|
|
|
|
createdAt: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface UserProfile {
|
|
|
|
|
id: number;
|
|
|
|
|
username: string;
|
|
|
|
|
email: string;
|
|
|
|
|
/** @nullable */
|
|
|
|
|
displayNameAr?: string | null;
|
|
|
|
|
/** @nullable */
|
|
|
|
|
displayNameEn?: string | null;
|
|
|
|
|
preferredLanguage: string;
|
2026-04-20 16:40:49 +00:00
|
|
|
clockStyle?: ClockStyle | null;
|
2026-04-20 09:20:50 +00:00
|
|
|
/** @nullable */
|
2026-04-21 07:16:50 +00:00
|
|
|
clockHour12?: boolean | null;
|
|
|
|
|
/** @nullable */
|
2026-04-20 09:20:50 +00:00
|
|
|
avatarUrl?: string | null;
|
|
|
|
|
isActive: boolean;
|
|
|
|
|
roles: string[];
|
|
|
|
|
createdAt: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface UpdateUserBody {
|
|
|
|
|
/** @nullable */
|
|
|
|
|
displayNameAr?: string | null;
|
|
|
|
|
/** @nullable */
|
|
|
|
|
displayNameEn?: string | null;
|
|
|
|
|
isActive?: boolean;
|
|
|
|
|
preferredLanguage?: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface App {
|
|
|
|
|
id: number;
|
|
|
|
|
slug: string;
|
|
|
|
|
nameAr: string;
|
|
|
|
|
nameEn: string;
|
|
|
|
|
/** @nullable */
|
|
|
|
|
descriptionAr?: string | null;
|
|
|
|
|
/** @nullable */
|
|
|
|
|
descriptionEn?: string | null;
|
|
|
|
|
iconName: string;
|
|
|
|
|
route: string;
|
|
|
|
|
color: string;
|
|
|
|
|
isActive: boolean;
|
|
|
|
|
isSystem: boolean;
|
|
|
|
|
sortOrder: number;
|
|
|
|
|
createdAt: string;
|
|
|
|
|
updatedAt: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface CreateAppBody {
|
|
|
|
|
slug: string;
|
|
|
|
|
nameAr: string;
|
|
|
|
|
nameEn: string;
|
|
|
|
|
/** @nullable */
|
|
|
|
|
descriptionAr?: string | null;
|
|
|
|
|
/** @nullable */
|
|
|
|
|
descriptionEn?: string | null;
|
|
|
|
|
iconName: string;
|
|
|
|
|
route: string;
|
|
|
|
|
color: string;
|
|
|
|
|
isActive?: boolean;
|
|
|
|
|
isSystem?: boolean;
|
|
|
|
|
sortOrder?: number;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface UpdateAppBody {
|
|
|
|
|
nameAr?: string;
|
|
|
|
|
nameEn?: string;
|
|
|
|
|
/** @nullable */
|
|
|
|
|
descriptionAr?: string | null;
|
|
|
|
|
/** @nullable */
|
|
|
|
|
descriptionEn?: string | null;
|
|
|
|
|
iconName?: string;
|
|
|
|
|
route?: string;
|
|
|
|
|
color?: string;
|
|
|
|
|
isActive?: boolean;
|
|
|
|
|
sortOrder?: number;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface Service {
|
|
|
|
|
id: number;
|
|
|
|
|
/** @nullable */
|
|
|
|
|
categoryId?: number | null;
|
|
|
|
|
nameAr: string;
|
|
|
|
|
nameEn: string;
|
|
|
|
|
/** @nullable */
|
|
|
|
|
descriptionAr?: string | null;
|
|
|
|
|
/** @nullable */
|
|
|
|
|
descriptionEn?: string | null;
|
|
|
|
|
/** @nullable */
|
|
|
|
|
imageUrl?: string | null;
|
|
|
|
|
/** @nullable */
|
|
|
|
|
price?: string | null;
|
|
|
|
|
isAvailable: boolean;
|
|
|
|
|
sortOrder: number;
|
|
|
|
|
createdAt: string;
|
|
|
|
|
updatedAt: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface CreateServiceBody {
|
|
|
|
|
/** @nullable */
|
|
|
|
|
categoryId?: number | null;
|
|
|
|
|
nameAr: string;
|
|
|
|
|
nameEn: string;
|
|
|
|
|
/** @nullable */
|
|
|
|
|
descriptionAr?: string | null;
|
|
|
|
|
/** @nullable */
|
|
|
|
|
descriptionEn?: string | null;
|
|
|
|
|
/** @nullable */
|
|
|
|
|
imageUrl?: string | null;
|
|
|
|
|
/** @nullable */
|
|
|
|
|
price?: string | null;
|
|
|
|
|
isAvailable?: boolean;
|
|
|
|
|
sortOrder?: number;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface UpdateServiceBody {
|
|
|
|
|
/** @nullable */
|
|
|
|
|
categoryId?: number | null;
|
|
|
|
|
nameAr?: string;
|
|
|
|
|
nameEn?: string;
|
|
|
|
|
/** @nullable */
|
|
|
|
|
descriptionAr?: string | null;
|
|
|
|
|
/** @nullable */
|
|
|
|
|
descriptionEn?: string | null;
|
|
|
|
|
/** @nullable */
|
|
|
|
|
imageUrl?: string | null;
|
|
|
|
|
/** @nullable */
|
|
|
|
|
price?: string | null;
|
|
|
|
|
isAvailable?: boolean;
|
|
|
|
|
sortOrder?: number;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface ServiceCategory {
|
|
|
|
|
id: number;
|
|
|
|
|
nameAr: string;
|
|
|
|
|
nameEn: string;
|
|
|
|
|
sortOrder: number;
|
|
|
|
|
createdAt: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface ParticipantInfo {
|
|
|
|
|
id: number;
|
|
|
|
|
username: string;
|
|
|
|
|
/** @nullable */
|
|
|
|
|
displayNameAr?: string | null;
|
|
|
|
|
/** @nullable */
|
|
|
|
|
displayNameEn?: string | null;
|
|
|
|
|
/** @nullable */
|
|
|
|
|
avatarUrl?: string | null;
|
|
|
|
|
isAdmin: boolean;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface MessageWithSender {
|
|
|
|
|
id: number;
|
|
|
|
|
conversationId: number;
|
|
|
|
|
senderId: number;
|
|
|
|
|
content: string;
|
|
|
|
|
sender: ParticipantInfo;
|
|
|
|
|
createdAt: string;
|
|
|
|
|
updatedAt: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface ConversationWithDetails {
|
|
|
|
|
id: number;
|
|
|
|
|
/** @nullable */
|
|
|
|
|
nameAr?: string | null;
|
|
|
|
|
/** @nullable */
|
|
|
|
|
nameEn?: string | null;
|
|
|
|
|
isGroup: boolean;
|
|
|
|
|
createdBy: number;
|
|
|
|
|
participants: ParticipantInfo[];
|
|
|
|
|
lastMessage?: MessageWithSender | null;
|
|
|
|
|
unreadCount: number;
|
|
|
|
|
createdAt: string;
|
|
|
|
|
updatedAt: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface CreateConversationBody {
|
|
|
|
|
participantIds: number[];
|
|
|
|
|
/** @nullable */
|
|
|
|
|
nameAr?: string | null;
|
|
|
|
|
/** @nullable */
|
|
|
|
|
nameEn?: string | null;
|
|
|
|
|
isGroup?: boolean;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface SendMessageBody {
|
|
|
|
|
content: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface Notification {
|
|
|
|
|
id: number;
|
|
|
|
|
userId: number;
|
|
|
|
|
titleAr: string;
|
|
|
|
|
titleEn: string;
|
|
|
|
|
/** @nullable */
|
|
|
|
|
bodyAr?: string | null;
|
|
|
|
|
/** @nullable */
|
|
|
|
|
bodyEn?: string | null;
|
|
|
|
|
type: string;
|
|
|
|
|
isRead: boolean;
|
|
|
|
|
/** @nullable */
|
|
|
|
|
relatedId?: number | null;
|
|
|
|
|
/** @nullable */
|
|
|
|
|
relatedType?: string | null;
|
|
|
|
|
createdAt: string;
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-20 11:06:15 +00:00
|
|
|
export interface AppSettings {
|
|
|
|
|
siteNameAr: string;
|
|
|
|
|
siteNameEn: string;
|
2026-04-20 11:33:06 +00:00
|
|
|
registrationOpen: boolean;
|
2026-04-20 12:28:25 +00:00
|
|
|
footerTextAr: string;
|
|
|
|
|
footerTextEn: string;
|
2026-04-20 11:06:15 +00:00
|
|
|
updatedAt?: string;
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-20 12:09:14 +00:00
|
|
|
export interface UpdateMyAppOrderBody {
|
|
|
|
|
/** App IDs in the desired display order */
|
|
|
|
|
order: number[];
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-20 11:06:15 +00:00
|
|
|
export interface UpdateAppSettingsBody {
|
|
|
|
|
/**
|
|
|
|
|
* @minLength 1
|
|
|
|
|
* @maxLength 200
|
|
|
|
|
*/
|
|
|
|
|
siteNameAr?: string;
|
|
|
|
|
/**
|
|
|
|
|
* @minLength 1
|
|
|
|
|
* @maxLength 200
|
|
|
|
|
*/
|
|
|
|
|
siteNameEn?: string;
|
2026-04-20 11:33:06 +00:00
|
|
|
registrationOpen?: boolean;
|
2026-04-20 12:28:25 +00:00
|
|
|
/**
|
|
|
|
|
* @minLength 1
|
|
|
|
|
* @maxLength 300
|
|
|
|
|
*/
|
|
|
|
|
footerTextAr?: string;
|
|
|
|
|
/**
|
|
|
|
|
* @minLength 1
|
|
|
|
|
* @maxLength 300
|
|
|
|
|
*/
|
|
|
|
|
footerTextEn?: string;
|
2026-04-20 11:06:15 +00:00
|
|
|
}
|
|
|
|
|
|
2026-04-20 10:55:11 +00:00
|
|
|
export interface RequestUploadUrlBody {
|
|
|
|
|
/** @minLength 1 */
|
|
|
|
|
name: string;
|
|
|
|
|
/** @minimum 1 */
|
|
|
|
|
size: number;
|
|
|
|
|
/** @minLength 1 */
|
|
|
|
|
contentType: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface RequestUploadUrlResponse {
|
|
|
|
|
uploadURL: string;
|
|
|
|
|
objectPath: string;
|
|
|
|
|
metadata?: RequestUploadUrlBody;
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-20 09:20:50 +00:00
|
|
|
export interface HomeStats {
|
|
|
|
|
totalApps: number;
|
|
|
|
|
totalServices: number;
|
|
|
|
|
unreadNotifications: number;
|
|
|
|
|
unreadMessages: number;
|
|
|
|
|
totalUsers: number;
|
|
|
|
|
}
|
2026-04-20 12:16:55 +00:00
|
|
|
|
2026-04-20 15:38:28 +00:00
|
|
|
export type AdminStatsRange =
|
|
|
|
|
(typeof AdminStatsRange)[keyof typeof AdminStatsRange];
|
|
|
|
|
|
|
|
|
|
export const AdminStatsRange = {
|
|
|
|
|
"7d": "7d",
|
|
|
|
|
"30d": "30d",
|
|
|
|
|
"90d": "90d",
|
2026-04-21 07:01:43 +00:00
|
|
|
custom: "custom",
|
2026-04-20 15:38:28 +00:00
|
|
|
} as const;
|
|
|
|
|
|
2026-04-20 12:16:55 +00:00
|
|
|
export type AdminStatsSignupsByDayItem = {
|
|
|
|
|
date: string;
|
|
|
|
|
count: number;
|
|
|
|
|
};
|
|
|
|
|
|
2026-04-20 15:16:19 +00:00
|
|
|
export type AdminStatsAppOpensByDayItem = {
|
|
|
|
|
date: string;
|
|
|
|
|
count: number;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export type AdminStatsServicesCreatedByDayItem = {
|
|
|
|
|
date: string;
|
|
|
|
|
count: number;
|
|
|
|
|
};
|
|
|
|
|
|
2026-04-21 06:11:28 +00:00
|
|
|
export interface TopAppItem {
|
|
|
|
|
appId: number;
|
|
|
|
|
slug: string;
|
|
|
|
|
nameAr: string;
|
|
|
|
|
nameEn: string;
|
|
|
|
|
iconName: string;
|
|
|
|
|
color: string;
|
|
|
|
|
count: number;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface TopUserItem {
|
|
|
|
|
userId: number;
|
|
|
|
|
username: string;
|
|
|
|
|
/** @nullable */
|
|
|
|
|
displayNameAr?: string | null;
|
|
|
|
|
/** @nullable */
|
|
|
|
|
displayNameEn?: string | null;
|
|
|
|
|
/** @nullable */
|
|
|
|
|
avatarUrl?: string | null;
|
|
|
|
|
count: number;
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-20 12:16:55 +00:00
|
|
|
export interface AdminStats {
|
2026-04-20 15:38:28 +00:00
|
|
|
range: AdminStatsRange;
|
|
|
|
|
rangeDays: number;
|
2026-04-21 07:01:43 +00:00
|
|
|
/** Start date (YYYY-MM-DD UTC) of the selected window */
|
|
|
|
|
rangeFrom?: string;
|
|
|
|
|
/** End date (YYYY-MM-DD UTC) of the selected window */
|
|
|
|
|
rangeTo?: string;
|
2026-04-20 15:38:28 +00:00
|
|
|
newUsersInRange: number;
|
|
|
|
|
newUsersPrevRange: number;
|
2026-04-20 12:16:55 +00:00
|
|
|
activeServices: number;
|
|
|
|
|
inactiveServices: number;
|
|
|
|
|
signupsByDay: AdminStatsSignupsByDayItem[];
|
2026-04-20 15:16:19 +00:00
|
|
|
appOpensByDay: AdminStatsAppOpensByDayItem[];
|
2026-04-20 15:38:28 +00:00
|
|
|
appOpensInRange: number;
|
|
|
|
|
appOpensPrevRange: number;
|
2026-04-20 15:16:19 +00:00
|
|
|
servicesCreatedByDay: AdminStatsServicesCreatedByDayItem[];
|
2026-04-20 15:38:28 +00:00
|
|
|
servicesCreatedInRange: number;
|
2026-04-21 06:11:28 +00:00
|
|
|
topApps: TopAppItem[];
|
|
|
|
|
mostActiveUsers: TopUserItem[];
|
2026-04-20 12:16:55 +00:00
|
|
|
}
|
2026-04-20 15:38:28 +00:00
|
|
|
|
|
|
|
|
export type GetAdminStatsParams = {
|
|
|
|
|
/**
|
2026-04-21 07:01:43 +00:00
|
|
|
* Time range for trend stats. Use "custom" with from/to.
|
2026-04-20 15:38:28 +00:00
|
|
|
*/
|
|
|
|
|
range?: GetAdminStatsRange;
|
2026-04-21 07:01:43 +00:00
|
|
|
/**
|
|
|
|
|
* Start date (inclusive, YYYY-MM-DD UTC) when range=custom
|
|
|
|
|
*/
|
|
|
|
|
from?: string;
|
|
|
|
|
/**
|
|
|
|
|
* End date (inclusive, YYYY-MM-DD UTC) when range=custom
|
|
|
|
|
*/
|
|
|
|
|
to?: string;
|
2026-04-20 15:38:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export type GetAdminStatsRange =
|
|
|
|
|
(typeof GetAdminStatsRange)[keyof typeof GetAdminStatsRange];
|
|
|
|
|
|
|
|
|
|
export const GetAdminStatsRange = {
|
|
|
|
|
"7d": "7d",
|
|
|
|
|
"30d": "30d",
|
|
|
|
|
"90d": "90d",
|
2026-04-21 07:01:43 +00:00
|
|
|
custom: "custom",
|
2026-04-20 15:38:28 +00:00
|
|
|
} as const;
|