Skip to content

Commit 3b47eb5

Browse files
authored
fix: kind export operations type (#2030)
1 parent d1d64f7 commit 3b47eb5

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

src/containers/Operations/constants.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ export const BASE_COLUMNS = [
3232
];
3333

3434
export const OPERATION_KINDS: {value: OperationKind; content: string}[] = [
35-
{value: 'export', content: i18n('kind_export')},
35+
{value: 'export/s3', content: i18n('kind_export_s3')},
36+
{value: 'export/yt', content: i18n('kind_export_yt')},
3637
{value: 'ss/backgrounds', content: i18n('kind_ssBackgrounds')},
3738
{value: 'buildindex', content: i18n('kind_buildIndex')},
3839
];

src/containers/Operations/i18n/en.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"pleaceholder_search": "Search operations",
55
"placeholder_kind": "Select operation kind",
66
"kind_ssBackgrounds": "SS/Backgrounds",
7-
"kind_export": "Export",
7+
"kind_export_s3": "Export/S3",
8+
"kind_export_yt": "Export/YT",
89
"kind_buildIndex": "Build Index",
910

1011
"column_operationId": "Operation ID",

src/containers/Operations/useOperationsQueryParams.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ import {z} from 'zod';
33

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

6-
const operationKindSchema = z.enum(['ss/backgrounds', 'export', 'buildindex']).catch('buildindex');
6+
const operationKindSchema = z
7+
.enum(['ss/backgrounds', 'export/s3', 'export/yt', 'buildindex'])
8+
.catch('buildindex');
79

810
export function useOperationsQueryParams() {
911
const [queryParams, setQueryParams] = useQueryParams({

src/types/api/operations.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,13 @@ export interface TOperationList {
113113
next_page_token?: string;
114114
}
115115

116-
export type OperationKind = 'ss/backgrounds' | 'import' | 'export' | 'buildindex' | 'scriptexec';
116+
export type OperationKind =
117+
| 'ss/backgrounds'
118+
| 'import'
119+
| 'export/s3'
120+
| 'export/yt'
121+
| 'buildindex'
122+
| 'scriptexec';
117123

118124
export interface OperationListRequestParams {
119125
database: string;

0 commit comments

Comments
 (0)