Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
a9b3376
phase 1
lgestc May 7, 2026
8cbdd64
[Cases] Migrate configure client decoders from io-ts to zod (PR 4)
lgestc May 7, 2026
f13355b
[Cases] Migrate cases read-path client decoders from io-ts to zod (PR 5)
lgestc May 7, 2026
d7e2217
[Cases] Migrate cases write-path client decoders from io-ts to zod (P…
lgestc May 7, 2026
06a2d6d
[Cases] Migrate user_actions client decoders from io-ts to zod (PR 7)
lgestc May 7, 2026
57cbcc8
[Cases] Migrate attachments client decoders from io-ts to zod (PR 8)
lgestc May 7, 2026
7542bd7
[Cases] Migrate metrics + workflows decoders from io-ts to zod (PR 9)
lgestc May 7, 2026
55b90a3
[Cases] Migrate configure route decoders from io-ts to zod (PR 10)
lgestc May 7, 2026
71e7a16
[Cases] Migrate server SO/runtime types from io-ts to zod (PR 11)
lgestc May 7, 2026
b949b20
[Cases] Migrate attachment framework + SO migration from io-ts to zod…
lgestc May 7, 2026
0210301
[Cases] Migrate common/files type guard from io-ts to zod (PR 13)
lgestc May 7, 2026
61bbf92
[Cases] Migrate public components/forms from io-ts to zod (PR 14)
lgestc May 7, 2026
03dc57d
[Cases] Migrate public/api/decoders from io-ts to zod (Stage 3 PR 15)
lgestc May 7, 2026
ea888ab
[Cases] Migrate file attachment utils from io-ts to zod (Stage 3 PR 16)
lgestc May 7, 2026
60feccc
[Cases] Migrate attachments services from io-ts to zod (Stage 3 PR 17)
lgestc May 7, 2026
d332022
[Cases] Migrate user_actions type_guards from io-ts to zod (Stage 3 P…
lgestc May 7, 2026
de5e76b
[Cases] Migrate user_profiles service from io-ts to zod (Stage 3 PR 19)
lgestc May 7, 2026
f58bb4b
[Cases] Migrate route validators from io-ts to zod (Stage 3 PR 20)
lgestc May 7, 2026
0988edf
[Cases] Migrate server/common from io-ts to zod (Stage 3 PR 21)
lgestc May 7, 2026
adb05ad
[Cases] Migrate server/client/utils from io-ts to zod (Stage 3 PR 22)
lgestc May 7, 2026
51a10c2
[Cases] Migrate lifespan metrics from io-ts to zod (Stage 3 PR 23)
lgestc May 7, 2026
0b6bfb7
[Cases] Add missing type aliases to api_zod / domain_zod (PR 24a)
lgestc May 7, 2026
7dc4939
[Cases] Move zod-native template files into zod dirs (PR 24b)
lgestc May 7, 2026
4570daf
[Cases] Make zod files self-sufficient + nativeEnum status/severity (…
lgestc May 7, 2026
1fda62c
[Cases] Remove io-ts, rename zod schemas to canonical names (PR 24d)
lgestc May 8, 2026
23abe18
[Cases] Update inline snapshots for io-ts parity additions
lgestc May 8, 2026
5104358
Merge branch 'main' into tasks/replace-io-ts-in-cases-plugin
lgestc May 8, 2026
f30921d
Changes from node scripts/regenerate_moon_projects.js --update
kibanamachine May 8, 2026
fde6917
[Cases] Restore io-ts validator parity in zod schema helpers
lgestc May 8, 2026
e2e89f8
[Cases] Restore field-level jsdocs lost in io-ts → zod migration
lgestc May 8, 2026
9905dfc
[Cases] Add unit tests for top-level request zod schemas
lgestc May 8, 2026
ef674e0
Changes from node scripts/eslint_all_files --no-cache --fix
kibanamachine May 8, 2026
f8e711d
[Cases] Fix common→server import in new schema tests
lgestc May 8, 2026
b93c660
[Cases] Fix io-ts ref in cases_api_integration test
lgestc May 8, 2026
836631f
[Cases] Lint fixes for new schema tests
lgestc May 8, 2026
74119d2
Merge branch 'main' into tasks/replace-io-ts-in-cases-plugin
lgestc May 8, 2026
af90d1d
[Cases] Fix CommentUserActionWithoutIdsSchema payload variant
lgestc May 8, 2026
9b054a5
[Cases] Update invalid-features assertion for zod error format
lgestc May 8, 2026
950913f
Merge main into tasks/replace-io-ts-in-cases-plugin and fix CI failures
lgestc May 14, 2026
82355cd
[Cases] Fix type errors introduced by merge from main
lgestc May 14, 2026
ef384b6
test fixes
lgestc May 14, 2026
b0c7c07
[Cases] Fix FTR assertion for invalid features error message
lgestc May 14, 2026
a4a149d
[Cases] Restore unit tests for Zod schemas after io-ts removal
lgestc May 15, 2026
1a2c5c5
Merge branch 'main' into tasks/replace-io-ts-in-cases-plugin
lgestc May 15, 2026
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
2 changes: 0 additions & 2 deletions x-pack/platform/plugins/shared/cases/common/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@
*/

export * from './helpers';
export * from './runtime_types';
export * from './saved_object';

This file was deleted.

21 changes: 0 additions & 21 deletions x-pack/platform/plugins/shared/cases/common/api/saved_object.ts

This file was deleted.

22 changes: 7 additions & 15 deletions x-pack/platform/plugins/shared/cases/common/files/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import {
CaseFileMetadataForDeletionRt,
CaseFileMetadataForDeletionSchema,
constructFileKindIdByOwner,
constructFilesHttpOperationPrivilege,
constructOwnerFromFileKind,
Expand Down Expand Up @@ -65,30 +65,22 @@ describe('files index', () => {
});
});

describe('CaseFileMetadataForDeletionRt', () => {
describe('CaseFileMetadataForDeletionSchema', () => {
const defaultRequest = {
caseIds: ['case-id-1', 'case-id-2'],
};

it('has expected attributes in request', () => {
const query = CaseFileMetadataForDeletionRt.decode(defaultRequest);

expect(query).toStrictEqual({
_tag: 'Right',
right: defaultRequest,
});
it('parses expected attributes in request', () => {
expect(CaseFileMetadataForDeletionSchema.parse(defaultRequest)).toStrictEqual(defaultRequest);
});

it('removes foo:bar attributes from request', () => {
const query = CaseFileMetadataForDeletionRt.decode({
it('strips foo:bar attributes from request', () => {
const parsed = CaseFileMetadataForDeletionSchema.parse({
caseIds: ['case-id-1', 'case-id-2'],
foo: 'bar',
});

expect(query).toStrictEqual({
_tag: 'Right',
right: defaultRequest,
});
expect(parsed).toStrictEqual(defaultRequest);
});
});
});
8 changes: 4 additions & 4 deletions x-pack/platform/plugins/shared/cases/common/files/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import * as rt from 'io-ts';
import { z } from '@kbn/zod/v4';
import { isEmpty } from 'lodash';
import { OWNERS } from '../constants';
import type { HttpApiPrivilegeOperation, Owner } from '../constants/types';
Expand All @@ -14,11 +14,11 @@ import type { HttpApiPrivilegeOperation, Owner } from '../constants/types';
* This type is only used to validate for deletion, it does not check all the fields that should exist in the file
* metadata.
*/
export const CaseFileMetadataForDeletionRt = rt.strict({
caseIds: rt.array(rt.string),
export const CaseFileMetadataForDeletionSchema = z.object({
caseIds: z.array(z.string()),
});

export type CaseFileMetadataForDeletion = rt.TypeOf<typeof CaseFileMetadataForDeletionRt>;
export type CaseFileMetadataForDeletion = z.infer<typeof CaseFileMetadataForDeletionSchema>;

const FILE_KIND_DELIMITER = 'FilesCases';

Expand Down
2 changes: 1 addition & 1 deletion x-pack/platform/plugins/shared/cases/common/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export {

export type { AttachmentAttributes } from './types/domain';
export { ConnectorTypes, AttachmentType, ExternalReferenceStorageType } from './types/domain';
export { getCasesFromAlertsUrl, getCaseFindUserActionsUrl, throwErrors } from './api';
export { getCasesFromAlertsUrl, getCaseFindUserActionsUrl } from './api';
export { createUICapabilities, type CasesUiCapabilities } from './utils/capabilities';
export { getApiTags, type CasesApiTags } from './utils/api_tags';
export { CaseMetricsFeature } from './types/api';
Expand Down
Loading
Loading