Some checks are pending
Bidi Control Character Guard / bidi-control-guard (push) Waiting to run
Circular Dependency Check / Check for new circular dependencies (push) Waiting to run
Citus Migration Smoke / Combined migrations on single-node Citus (push) Waiting to run
E2E Fresh Install Tests / fresh-install-e2e (push) Waiting to run
ext-v2 guardrails / Run ext-v2 guard and ESLint (push) Waiting to run
Integration Tests / Check for relevant changes (push) Waiting to run
Integration Tests / ${{ (github.event_name == 'schedule' || github.event.inputs.suite == 'full') && 'Full integration suite' || 'Tier-1 integration subset' }} (push) Blocked by required conditions
Mobile checks / Mobile lint + typecheck (push) Waiting to run
Mobile checks / Mobile unit tests (push) Waiting to run
Mobile checks / Mobile dependency audit (report) (push) Waiting to run
Mobile checks / Mobile reproducibility checks (push) Waiting to run
Secrets guard (env backups) / Ensure no tracked env backup files (push) Waiting to run
Temporal Readiness / fast-readiness (push) Waiting to run
Temporal Readiness / docker-parity (push) Waiting to run
TypeScript Type Check / Nx affected typecheck (push) Waiting to run
Unit Tests / Skipped-test budget (push) Waiting to run
Unit Tests / Nx affected unit tests (push) Waiting to run
Unit Tests / Server unit coverage (informational) (push) Waiting to run
Validate Tenant Management Schema / Check for relevant changes (push) Waiting to run
Validate Tenant Management Schema / Validate Tenant Management Schema (push) Blocked by required conditions
EE Workflows Build Guard / ee-workflows-build-guard (push) Waiting to run
Excluded: .git, node_modules, secrets/, compose.env, assemblyscript tgz Source: /opt/alga-psa on psa.joliet.tech
171 lines
3.4 KiB
TypeScript
171 lines
3.4 KiB
TypeScript
/**
|
|
* Interfaces for the Task Inbox system
|
|
*/
|
|
import { WorkflowTaskStatus } from './workflowTaskModel';
|
|
|
|
/**
|
|
* Task creation parameters
|
|
*/
|
|
export interface TaskCreationParams {
|
|
taskType: string;
|
|
title: string;
|
|
description?: string;
|
|
priority?: string;
|
|
dueDate?: string | Date;
|
|
assignTo?: {
|
|
roles?: string[];
|
|
users?: string[];
|
|
};
|
|
contextData?: Record<string, any>;
|
|
}
|
|
|
|
/**
|
|
* Task submission parameters
|
|
*/
|
|
export interface TaskSubmissionParams {
|
|
taskId: string;
|
|
formData: Record<string, any>;
|
|
comments?: string;
|
|
userId?: string;
|
|
}
|
|
|
|
/**
|
|
* Task query parameters
|
|
*/
|
|
export interface TaskQueryParams {
|
|
status?: WorkflowTaskStatus | WorkflowTaskStatus[];
|
|
priority?: string;
|
|
assignedToUser?: string;
|
|
assignedToRoles?: string[];
|
|
dueBefore?: string | Date;
|
|
dueAfter?: string | Date;
|
|
taskType?: string;
|
|
executionId?: string;
|
|
page?: number;
|
|
pageSize?: number;
|
|
}
|
|
|
|
/**
|
|
* Task query result
|
|
*/
|
|
export interface TaskQueryResult {
|
|
tasks: TaskDetails[];
|
|
total: number;
|
|
page: number;
|
|
pageSize: number;
|
|
totalPages: number;
|
|
}
|
|
|
|
/**
|
|
* Task details
|
|
*/
|
|
export interface TaskDetails {
|
|
taskId: string;
|
|
executionId: string;
|
|
title: string;
|
|
description?: string;
|
|
status: WorkflowTaskStatus;
|
|
priority: string;
|
|
dueDate?: string;
|
|
assignedRoles?: string[];
|
|
assignedUsers?: string[];
|
|
contextData?: Record<string, any>;
|
|
formId: string;
|
|
formSchema?: {
|
|
jsonSchema: Record<string, any>;
|
|
uiSchema?: Record<string, any>;
|
|
defaultValues?: Record<string, any>;
|
|
};
|
|
createdAt: string;
|
|
createdBy?: string;
|
|
claimedAt?: string;
|
|
claimedBy?: string;
|
|
completedAt?: string;
|
|
completedBy?: string;
|
|
responseData?: Record<string, any>;
|
|
}
|
|
|
|
/**
|
|
* Task history entry
|
|
*/
|
|
export interface TaskHistoryEntry {
|
|
historyId: string;
|
|
taskId: string;
|
|
action: string;
|
|
fromStatus?: string;
|
|
toStatus?: string;
|
|
userId?: string;
|
|
timestamp: string;
|
|
details?: Record<string, any>;
|
|
}
|
|
|
|
/**
|
|
* Task action result
|
|
*/
|
|
export interface TaskActionResult {
|
|
success: boolean;
|
|
taskId: string;
|
|
status: WorkflowTaskStatus;
|
|
message?: string;
|
|
error?: string;
|
|
}
|
|
|
|
/**
|
|
* Task event types
|
|
*/
|
|
export enum TaskEventType {
|
|
TASK_CREATED = 'task_created',
|
|
TASK_ASSIGNED = 'task_assigned',
|
|
TASK_CLAIMED = 'task_claimed',
|
|
TASK_UNCLAIMED = 'task_unclaimed',
|
|
TASK_COMPLETED = 'task_completed',
|
|
TASK_CANCELED = 'task_canceled',
|
|
TASK_EXPIRED = 'task_expired',
|
|
TASK_DISMISSED = 'task_dismissed'
|
|
}
|
|
|
|
/**
|
|
* Task event naming convention
|
|
*/
|
|
export const TaskEventNames = {
|
|
/**
|
|
* Generate task created event name
|
|
*/
|
|
taskCreated: (taskId: string) => `Task:${taskId}:Created`,
|
|
|
|
/**
|
|
* Generate task completed event name
|
|
*/
|
|
taskCompleted: (taskId: string) => `Task:${taskId}:Complete`,
|
|
|
|
/**
|
|
* Generate task claimed event name
|
|
*/
|
|
taskClaimed: (taskId: string) => `Task:${taskId}:Claimed`,
|
|
|
|
/**
|
|
* Generate task unclaimed event name
|
|
*/
|
|
taskUnclaimed: (taskId: string) => `Task:${taskId}:Unclaimed`,
|
|
|
|
/**
|
|
* Generate task canceled event name
|
|
*/
|
|
taskCanceled: (taskId: string) => `Task:${taskId}:Canceled`,
|
|
|
|
/**
|
|
* Generate task expired event name
|
|
*/
|
|
taskExpired: (taskId: string) => `Task:${taskId}:Expired`,
|
|
|
|
/**
|
|
* Generate task dismissed event name
|
|
*/
|
|
taskDismissed: (taskId: string) => `Task:${taskId}:Dismissed`,
|
|
|
|
/**
|
|
* Generate form submission event name
|
|
*/
|
|
formSubmitted: (formId: string) => `Form:${formId}:Submit`
|
|
};
|