metis-desk/modules/companies/src/common/folder-mappings.ts
David 0a34ddf752 feat: add local identity management features and UI components
- Implement folder account options helper for filtering access items based on person ID and date.
- Create FolderAccessAccountField component for selecting accounts with profile integration.
- Develop AssetLocalIdentities component for managing local identities associated with assets.
- Introduce LocalIdentityOwner component to display and manage local identity ownership.
- Add LocalIdentityEditor for creating, associating, and retiring local identities.
- Implement local identity API for fetching and executing local identity commands.
- Create tests for local identity UI components to ensure functionality and correctness.
- Add NetworkShareOptions class for structured and paginated SMB selection.
- Introduce NetworkShareAddress component for displaying and copying network share addresses.
- Create RemoteOptionList and RemoteOptionPicker components for remote option selection with pagination and search.
- Add tests for RemoteOptionList to validate rendering and behavior under various states.
2026-10-21 12:37:59 +02:00

43 lines
1.2 KiB
TypeScript

import { z } from "zod/v4";
import { FolderMappingInputSchema } from "../api/domain/folder-mapping-values";
export type { FolderMappingInput } from "../api/domain/folder-mapping-values";
export {
FOLDER_STATE_TRANSITIONS,
FolderMappingInputSchema,
} from "../api/domain/folder-mapping-values";
export const SaveFolderMappingRequestSchema = z.strictObject({
values: FolderMappingInputSchema,
expectedRevisionId: z.uuid().optional(),
});
export const FolderMappingSchema = z.strictObject({
id: z.uuid(),
companyId: z.uuid(),
values: FolderMappingInputSchema,
needsReview: z.boolean(),
permissionsCovered: z.boolean(),
accessAccountCoverage: z.enum(["unknown", "covered", "not-covered"]),
history: z
.array(
z.strictObject({
id: z.uuid(),
actorId: z.uuid(),
actorName: z.string().min(1),
recordedAt: z.iso.datetime(),
values: FolderMappingInputSchema,
})
)
.min(1),
});
export const FolderMappingsResponseSchema = z.strictObject({
mappings: z.array(FolderMappingSchema),
});
export const FolderMappingResponseSchema = z.strictObject({ mapping: FolderMappingSchema });
export type FolderMappingDTO = z.infer<typeof FolderMappingSchema>;