Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/containers/Operations/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ export const BASE_COLUMNS = [
];

export const OPERATION_KINDS: {value: OperationKind; content: string}[] = [
{value: 'export', content: i18n('kind_export')},
{value: 'export/s3', content: i18n('kind_export_s3')},
{value: 'export/yt', content: i18n('kind_export_yt')},
{value: 'ss/backgrounds', content: i18n('kind_ssBackgrounds')},
{value: 'buildindex', content: i18n('kind_buildIndex')},
];
3 changes: 2 additions & 1 deletion src/containers/Operations/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"pleaceholder_search": "Search operations",
"placeholder_kind": "Select operation kind",
"kind_ssBackgrounds": "SS/Backgrounds",
"kind_export": "Export",
"kind_export_s3": "Export/S3",
"kind_export_yt": "Export/YT",
"kind_buildIndex": "Build Index",

"column_operationId": "Operation ID",
Expand Down
4 changes: 3 additions & 1 deletion src/containers/Operations/useOperationsQueryParams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ import {z} from 'zod';

import type {OperationKind} from '../../types/api/operations';

const operationKindSchema = z.enum(['ss/backgrounds', 'export', 'buildindex']).catch('buildindex');
const operationKindSchema = z
.enum(['ss/backgrounds', 'export/s3', 'export/yt', 'buildindex'])
.catch('buildindex');

export function useOperationsQueryParams() {
const [queryParams, setQueryParams] = useQueryParams({
Expand Down
8 changes: 7 additions & 1 deletion src/types/api/operations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,13 @@ export interface TOperationList {
next_page_token?: string;
}

export type OperationKind = 'ss/backgrounds' | 'import' | 'export' | 'buildindex' | 'scriptexec';
export type OperationKind =
| 'ss/backgrounds'
| 'import'
| 'export/s3'
| 'export/yt'
| 'buildindex'
| 'scriptexec';

export interface OperationListRequestParams {
database: string;
Expand Down
Loading