import type { Primitive } from '../types'; export type CaseStage = { entryTime: string; name: string; type: string; ID: string; transitionType: string; visited_status: string; links: { open: Link; }; }; export type CaseAction = { ID: string; type: string; actions: [ { ID: string; } ]; }; export type AssignmentInfo = { classID?: string; pzInsKey?: string; pyGUID?: string; }; export type CaseLink = { classID?: string; type?: string; dataRetrievalType?: string; pageClass?: string; label?: string; pyLabel?: string; pyURLContent?: string; }; export type CaseInfoContent = { [key: string]: AssignmentInfo[] | string | number | unknown[] | undefined; classID?: string; pyLabel?: string; pyID?: string; pyViewName?: string; pyViewContext?: string; pxUrgencyWork?: number; pxCreateOperator?: string; pxUpdateDateTime?: string; pxUpdateOperator?: string; pyStatusWork?: string; pxCreateDateTime?: string; pyCaseLinks?: CaseLink[]; }; export type CaseInfo = { ID?: string; activeActionID?: string; availableActions?: CaseAction[]; stageID?: string; stages?: [CaseStage]; parentCaseInfo?: CaseInfo; assignments?: Assignment[]; objectTypeID?: string; objectTypeName?: string; content?: CaseInfoContent; caseTypeID?: string; RedirectURL?: string; inlineViewType?: string; }; export interface RemoteCaseInfo extends CaseInfo { classID?: string; target?: string; containerItemID?: string; caseTypeID?: string; content: CaseInfoContent; } export type Assignment = { ID: string; canPerform?: string; actions?: [CaseAction]; }; type NavigationStep = { allow_jump: boolean; name: string; actionID: string; visited_status: string; ID: string; links?: { open: AssignmentLink; }; }; export type Navigation = { template: string; steps: NavigationStep[]; }; type ActionLinks = { open: AssignmentLink; }; type AvailableAction = { name: string; links: ActionLinks; ID: string; type: string; }; type AvailableProcesses = { name: string; links: ActionLinks; ID: string; type: string; }; type ConfirmationLinks = { getNextWork: Link; }; export type NestedValue = Primitive | NestedValue[] | { [key: string]: NestedValue; }; export type DataObjInResponseObj = { caseInfo?: { assignments?: Assignment[]; actionButtons?: ActionButtons; navigation?: Navigation; availableActions?: AvailableAction[]; confirmationLinks?: ConfirmationLinks; content?: CaseInfoContent; ID?: string; stages?: CaseStage[]; stageID?: string; caseTypeID?: string; insKey?: string; }; objectInfo?: { actionButtons?: ActionButtons; assignments?: Assignment[]; navigation?: Navigation; availableActions?: AvailableAction[]; confirmationLinks?: ConfirmationLinks; content?: { [key: string]: NestedValue; }; ID?: string; }; dataInfo?: { [key: string]: NestedValue; }; pyPortal?: string; nextAssignmentInfo?: object; caseMessages?: string[]; context_data?: { [key: string]: NestedValue; }; traditionalGadgetId?: string; }; export type DxAPIResponseObject = { /** contains caseInfo, objectInfo, DataPages data etc. */ data?: any; /** contains the view resources, contextData, components etc. */ uiResources?: any; /** contains next assignment information */ nextAssignmentInfo?: object; confirmationNote?: string; key?: string; confirmationLinks?: ConfirmationLinks; directUrlUpdation?: boolean; semanticURL?: string; flowName?: string; Errors?: NestedValue; }; export type ToastMessage = { caseID?: string; caseTypeID?: string; caseTypeName?: string; }; export type BlendedUICreateStageCompletedInfo = { caseId?: string; assignmentId?: string; caseType?: string; isSubmitFromBlendedUI?: boolean; }; export type ActionsOut = { type: string; payload: { [key: string]: NestedValue; }; }; export type ChainedData = { payload: { context: string; err: { response: { status: number; data: { displayButtonsOnErrors: { skipRoboticAutomation?: boolean; }; }; }; }; }; }; export type Headers = { etag: string; }; export type Response = { data?: { caseInfo?: CaseInfo; }; uiResources?: UiResources; nextAssignmentInfo?: object; }; export type UiResources = { root: { config: { name: string; }; }; resources: { views: Record; }; }; export type ChainedDataPayload = { context: string; err: { response: { status: number; data: { displayButtonsOnErrors: { skipRoboticAutomation?: boolean; }; }; }; }; }; export type JSActionQueryParams = { [key: string]: boolean | string; }; export type SecondaryButton = { actionID: string; jsAction: string; name: string; isErrorButton?: boolean; buttonType?: string; }; export type SecondaryButtons = SecondaryButton[]; export type DisplayButtonsOnErrors = [ { actionID: string; name: string; jsAction: string; buttonType: string; isErrorButton: boolean; } ]; export type ActionButtons = { secondary?: SecondaryButtons; main?: SecondaryButtons; } | undefined; export type AssignmentLink = { rel: string; href: string; type: string; title: string; }; export type AssignmentAction = { name: string; links: { save: AssignmentLink; open: AssignmentLink; }; ID: string; type: string; }; export type AssigneeInfo = { name: string; ID: string; type: string; }; export type ChildCaseAssignment = { instructions: string; canPerform: string; assigneeInfo: AssigneeInfo; processID: string; urgency: string; processName: string; isMultiStep: string; name: string; context: string; links: { open: AssignmentLink; }; ID: string; isChild?: boolean; actions: AssignmentAction[]; }; export type Link = { rel: string; href: string; type: string; title: string; }; export type Stage = { name: string; links: { open: Link; }; visited_status: string; ID: string; type: string; transitionType: string; }; export type ContextDataObj = { openCaseViewAfterCreate?: boolean; errors?: NestedValue; caseViewMode?: string; }; export type ActionPayloadDataObj = DataObjInResponseObj & { key?: string; flowName?: string; coreHeaders?: { debugInfo: { [key: string]: string; }; }; context_data: ContextDataObj; }; export interface Collaborator { ID: string; state: 'viewing' | 'editing'; } export type Actions = { availableActions: AvailableAction[]; availableProcesses: AvailableProcesses[]; }; export {};