feat: ticket system base implementation

This commit is contained in:
2026-06-19 01:19:01 +05:30
parent a18fff4d6f
commit 8c3d19a429
19 changed files with 1400 additions and 27 deletions

View File

@@ -55,4 +55,28 @@ export const API_ROUTES = {
MY_UPLOADS: '/biz/api/v1/videos/me',
RESULTS: (id: string) => `/biz/api/v1/results/${id}/completed`,
},
TICKETS: {
BASE: '/biz/api/v1/tickets',
DETAIL: (id: string) => `/biz/api/v1/tickets/${id}`,
ASSIGN: (id: string) => `/biz/api/v1/tickets/${id}/assign`,
START: (id: string) => `/biz/api/v1/tickets/${id}/start`,
SUBMIT_REPAIR: (id: string) => `/biz/api/v1/tickets/${id}/submit-repair`,
REVIEW: (id: string) => `/biz/api/v1/tickets/${id}/review`,
CLOSE: (id: string) => `/biz/api/v1/tickets/${id}/close`,
DETAIL_EVENTS_TOKEN: (id: string) =>
`/biz/api/v1/tickets/${id}/events/token`,
DETAIL_EVENTS: (id: string, token: string) =>
`/biz/api/v1/tickets/${id}/events?sse_token=${encodeURIComponent(token)}`,
ASSIGNABLE_USERS: '/biz/api/v1/tickets/assignable-users',
},
TICKET_EVENTS: {
TENANT_TOKEN: '/biz/api/v1/tenants/me/tickets/events/token',
TENANT: (token: string) =>
`/biz/api/v1/tenants/me/tickets/events?sse_token=${encodeURIComponent(
token,
)}`,
USER_TOKEN: '/biz/api/v1/users/me/events/token',
USER: (token: string) =>
`/biz/api/v1/users/me/events?sse_token=${encodeURIComponent(token)}`,
},
} as const;