2025-01-07 02:29:29 +08:00
|
|
|
export enum BusterAppRoutes {
|
|
|
|
APP_ROOT = '/app',
|
2025-03-01 06:02:54 +08:00
|
|
|
APP_HOME = '/app/home',
|
2025-01-07 02:29:29 +08:00
|
|
|
APP_COLLECTIONS = '/app/collections',
|
|
|
|
APP_COLLECTIONS_ID = '/app/collections/:collectionId',
|
2025-02-01 06:21:50 +08:00
|
|
|
APP_COLLECTIONS_ID_METRICS_ID = '/app/collections/:collectionId/metrics/:metricId',
|
|
|
|
APP_METRIC = '/app/metrics',
|
|
|
|
APP_METRIC_ID = '/app/metrics/:metricId',
|
2025-01-07 02:29:29 +08:00
|
|
|
APP_DASHBOARDS = '/app/dashboards',
|
|
|
|
APP_DASHBOARD_ID = '/app/dashboards/:dashboardId',
|
2025-02-01 06:21:50 +08:00
|
|
|
APP_DASHBOARD_METRICS = '/app/dashboards/:dashboardId/metrics',
|
|
|
|
APP_DASHBOARD_METRICS_ID = '/app/dashboards/:dashboardId/metrics/:metricId',
|
2025-01-07 02:29:29 +08:00
|
|
|
APP_LOGS = '/app/logs',
|
|
|
|
APP_DATASETS = '/app/datasets',
|
|
|
|
APP_DATASETS_ID = '/app/datasets/:datasetId',
|
2025-01-28 06:48:29 +08:00
|
|
|
|
2025-01-07 02:29:29 +08:00
|
|
|
APP_DATASETS_ID_OVERVIEW = '/app/datasets/:datasetId/overview',
|
2025-01-18 11:20:47 +08:00
|
|
|
APP_DATASETS_ID_PERMISSIONS_OVERVIEW = '/app/datasets/:datasetId/permissions/overview',
|
|
|
|
APP_DATASETS_ID_PERMISSIONS_PERMISSION_GROUPS = '/app/datasets/:datasetId/permissions/permission-groups',
|
|
|
|
APP_DATASETS_ID_PERMISSIONS_USERS = '/app/datasets/:datasetId/permissions/users',
|
|
|
|
APP_DATASETS_ID_PERMISSIONS_DATASET_GROUPS = '/app/datasets/:datasetId/permissions/dataset-groups',
|
2025-01-10 03:04:57 +08:00
|
|
|
APP_DATASETS_ID_EDITOR = '/app/datasets/:datasetId/editor',
|
2025-01-07 02:29:29 +08:00
|
|
|
APP_TERMS = '/app/terms',
|
|
|
|
APP_TERMS_ID = '/app/terms/:termId',
|
2025-01-28 06:48:29 +08:00
|
|
|
|
|
|
|
//NEW CHAT
|
2025-02-13 02:01:54 +08:00
|
|
|
APP_CHAT = '/app/chats',
|
|
|
|
APP_CHAT_ID = '/app/chats/:chatId',
|
|
|
|
APP_CHAT_ID_REASONING_ID = '/app/chats/:chatId/reasoning/:messageId',
|
|
|
|
APP_CHAT_ID_METRIC_ID = '/app/chats/:chatId/metric/:metricId',
|
|
|
|
APP_CHAT_ID_COLLECTION_ID = '/app/chats/:chatId/collection/:collectionId',
|
|
|
|
APP_CHAT_ID_DASHBOARD_ID = '/app/chats/:chatId/dashboard/:dashboardId',
|
|
|
|
APP_CHAT_ID_DATASET_ID = '/app/chats/:chatId/dataset/:datasetId',
|
|
|
|
APP_CHAT_ID_TERM_ID = '/app/chats/:chatId/term/:termId',
|
|
|
|
APP_CHAT_ID_VALUE_ID = '/app/chats/:chatId/value/:valueId',
|
2025-01-28 06:48:29 +08:00
|
|
|
APP_VALUE_ID = '/app/value/:valueId',
|
2025-01-07 02:29:29 +08:00
|
|
|
NEW_USER = '/app/new-user'
|
|
|
|
}
|
|
|
|
|
|
|
|
export type BusterAppRoutesWithArgs = {
|
|
|
|
[BusterAppRoutes.APP_ROOT]: { route: BusterAppRoutes.APP_ROOT };
|
2025-03-01 06:02:54 +08:00
|
|
|
[BusterAppRoutes.APP_HOME]: { route: BusterAppRoutes.APP_HOME };
|
2025-01-07 02:29:29 +08:00
|
|
|
[BusterAppRoutes.APP_COLLECTIONS]: { route: BusterAppRoutes.APP_COLLECTIONS };
|
|
|
|
[BusterAppRoutes.APP_COLLECTIONS_ID]: {
|
|
|
|
route: BusterAppRoutes.APP_COLLECTIONS_ID;
|
|
|
|
collectionId: string;
|
|
|
|
};
|
2025-02-01 06:21:50 +08:00
|
|
|
[BusterAppRoutes.APP_METRIC]: { route: BusterAppRoutes.APP_METRIC };
|
|
|
|
[BusterAppRoutes.APP_METRIC_ID]: { route: BusterAppRoutes.APP_METRIC_ID; metricId: string };
|
2025-01-07 02:29:29 +08:00
|
|
|
[BusterAppRoutes.APP_DASHBOARDS]: { route: BusterAppRoutes.APP_DASHBOARDS };
|
|
|
|
[BusterAppRoutes.APP_DASHBOARD_ID]: {
|
|
|
|
route: BusterAppRoutes.APP_DASHBOARD_ID;
|
|
|
|
dashboardId: string;
|
|
|
|
};
|
2025-02-01 06:21:50 +08:00
|
|
|
[BusterAppRoutes.APP_DASHBOARD_METRICS]: {
|
|
|
|
route: BusterAppRoutes.APP_DASHBOARD_METRICS;
|
2025-01-07 02:29:29 +08:00
|
|
|
dashboardId: string;
|
|
|
|
};
|
2025-02-01 06:21:50 +08:00
|
|
|
[BusterAppRoutes.APP_DASHBOARD_METRICS_ID]: {
|
|
|
|
route: BusterAppRoutes.APP_DASHBOARD_METRICS_ID;
|
2025-01-07 02:29:29 +08:00
|
|
|
dashboardId: string;
|
2025-02-01 06:21:50 +08:00
|
|
|
metricId: string;
|
2025-01-07 02:29:29 +08:00
|
|
|
};
|
|
|
|
[BusterAppRoutes.APP_DATASETS]: { route: BusterAppRoutes.APP_DATASETS };
|
|
|
|
[BusterAppRoutes.APP_TERMS]: { route: BusterAppRoutes.APP_TERMS };
|
|
|
|
[BusterAppRoutes.APP_DATASETS_ID]: { route: BusterAppRoutes.APP_DATASETS_ID; datasetId: string };
|
|
|
|
[BusterAppRoutes.APP_LOGS]: { route: BusterAppRoutes.APP_LOGS };
|
|
|
|
[BusterAppRoutes.APP_TERMS_ID]: { route: BusterAppRoutes.APP_TERMS_ID; termId: string };
|
|
|
|
[BusterAppRoutes.APP_DATASETS_ID_OVERVIEW]: {
|
|
|
|
route: BusterAppRoutes.APP_DATASETS_ID_OVERVIEW;
|
|
|
|
datasetId: string;
|
|
|
|
};
|
2025-01-18 11:20:47 +08:00
|
|
|
[BusterAppRoutes.APP_DATASETS_ID_PERMISSIONS_OVERVIEW]: {
|
|
|
|
route: BusterAppRoutes.APP_DATASETS_ID_PERMISSIONS_OVERVIEW;
|
|
|
|
datasetId: string;
|
|
|
|
};
|
|
|
|
[BusterAppRoutes.APP_DATASETS_ID_PERMISSIONS_PERMISSION_GROUPS]: {
|
|
|
|
route: BusterAppRoutes.APP_DATASETS_ID_PERMISSIONS_PERMISSION_GROUPS;
|
|
|
|
datasetId: string;
|
|
|
|
};
|
|
|
|
[BusterAppRoutes.APP_DATASETS_ID_PERMISSIONS_USERS]: {
|
|
|
|
route: BusterAppRoutes.APP_DATASETS_ID_PERMISSIONS_USERS;
|
|
|
|
datasetId: string;
|
|
|
|
};
|
|
|
|
[BusterAppRoutes.APP_DATASETS_ID_PERMISSIONS_DATASET_GROUPS]: {
|
|
|
|
route: BusterAppRoutes.APP_DATASETS_ID_PERMISSIONS_DATASET_GROUPS;
|
|
|
|
datasetId: string;
|
|
|
|
};
|
2025-01-10 03:04:57 +08:00
|
|
|
[BusterAppRoutes.APP_DATASETS_ID_EDITOR]: {
|
|
|
|
route: BusterAppRoutes.APP_DATASETS_ID_EDITOR;
|
2025-01-07 02:29:29 +08:00
|
|
|
datasetId: string;
|
|
|
|
};
|
2025-02-01 06:21:50 +08:00
|
|
|
[BusterAppRoutes.APP_COLLECTIONS_ID_METRICS_ID]: {
|
|
|
|
route: BusterAppRoutes.APP_COLLECTIONS_ID_METRICS_ID;
|
2025-01-07 02:29:29 +08:00
|
|
|
collectionId: string;
|
2025-02-01 06:21:50 +08:00
|
|
|
metricId: string;
|
2025-01-07 02:29:29 +08:00
|
|
|
};
|
|
|
|
[BusterAppRoutes.NEW_USER]: { route: BusterAppRoutes.NEW_USER };
|
2025-02-13 02:01:54 +08:00
|
|
|
[BusterAppRoutes.APP_CHAT]: { route: BusterAppRoutes.APP_CHAT };
|
2025-01-28 06:48:29 +08:00
|
|
|
[BusterAppRoutes.APP_CHAT_ID]: { route: BusterAppRoutes.APP_CHAT_ID; chatId: string };
|
2025-02-08 13:24:18 +08:00
|
|
|
[BusterAppRoutes.APP_CHAT_ID_REASONING_ID]: {
|
|
|
|
route: BusterAppRoutes.APP_CHAT_ID_REASONING_ID;
|
2025-02-08 10:45:48 +08:00
|
|
|
chatId: string;
|
2025-02-08 13:24:18 +08:00
|
|
|
messageId: string;
|
2025-02-08 10:45:48 +08:00
|
|
|
};
|
2025-01-28 06:48:29 +08:00
|
|
|
[BusterAppRoutes.APP_CHAT_ID_METRIC_ID]: {
|
|
|
|
route: BusterAppRoutes.APP_CHAT_ID_METRIC_ID;
|
|
|
|
chatId: string;
|
|
|
|
metricId: string;
|
|
|
|
};
|
|
|
|
[BusterAppRoutes.APP_CHAT_ID_COLLECTION_ID]: {
|
|
|
|
route: BusterAppRoutes.APP_CHAT_ID_COLLECTION_ID;
|
|
|
|
chatId: string;
|
|
|
|
collectionId: string;
|
|
|
|
};
|
|
|
|
[BusterAppRoutes.APP_CHAT_ID_DASHBOARD_ID]: {
|
|
|
|
route: BusterAppRoutes.APP_CHAT_ID_DASHBOARD_ID;
|
|
|
|
chatId: string;
|
|
|
|
dashboardId: string;
|
|
|
|
};
|
|
|
|
[BusterAppRoutes.APP_CHAT_ID_DATASET_ID]: {
|
|
|
|
route: BusterAppRoutes.APP_CHAT_ID_DATASET_ID;
|
|
|
|
chatId: string;
|
|
|
|
datasetId: string;
|
|
|
|
};
|
|
|
|
[BusterAppRoutes.APP_CHAT_ID_TERM_ID]: {
|
|
|
|
route: BusterAppRoutes.APP_CHAT_ID_TERM_ID;
|
|
|
|
chatId: string;
|
|
|
|
termId: string;
|
|
|
|
};
|
|
|
|
[BusterAppRoutes.APP_CHAT_ID_VALUE_ID]: {
|
|
|
|
route: BusterAppRoutes.APP_CHAT_ID_VALUE_ID;
|
|
|
|
chatId: string;
|
|
|
|
valueId: string;
|
|
|
|
};
|
2025-01-28 07:23:08 +08:00
|
|
|
[BusterAppRoutes.APP_METRIC_ID]: { route: BusterAppRoutes.APP_METRIC_ID; metricId: string };
|
|
|
|
[BusterAppRoutes.APP_VALUE_ID]: { route: BusterAppRoutes.APP_VALUE_ID; valueId: string };
|
2025-01-07 02:29:29 +08:00
|
|
|
};
|