ngx-t-workflow-typings
v1.0.2
Published
Typings and interfaces for the ngx-t-workflows library.
Readme
@ngx-t-workflows/shared-types
Typings and interfaces for the ngx-t-workflows library. Provides TypeScript interfaces, enums, and Joi schemas for workflow-related data structures and runtime validation.
Installation
npm install @ngx-t-workflows/shared-typesPeer Dependencies
ngx-t-forms-types^0.0.16rxjs^7.8.2
Usage
Interfaces and Types
import {
WorkflowModel,
ProcessStep,
DocumentWorkflowStep,
WorkFlowDocumentInterface,
WorkflowStepTypeEnum,
WorkflowStepStatus,
} from '@ngx-t-workflows/shared-types';Runtime Validation (Joi Schemas)
import {
validateProcessStep,
validateWorkflowModel,
validateWorkFlowDocument,
validateTaskSLAConfig,
validateITransactionTag,
} from '@ngx-t-workflows/shared-types';
const errors = validateProcessStep(stepData);
if (errors.length > 0) {
console.error('Validation failed:', errors);
}Schemas (for custom validation)
import {
processStepSchema,
workflowModelSchema,
workFlowDocumentSchema,
} from '@ngx-t-workflows/shared-types';
const { error, value } = processStepSchema.validate(data);Package Structure
| Path | Contents |
|------|----------|
| interfaces/Backend | Follow-up operations, escalation levels |
| interfaces/Config | NgxTWorkflowsConfig, element editor config |
| interfaces/Document | WorkFlowDocument, IRecentlyViewed |
| interfaces/DocumentSection | Document section configurations |
| interfaces/Diagram | Workflow diagram nodes, connections, state |
| interfaces/ProcessStep | ProcessStep, DocumentWorkflowStep, step types |
| interfaces/Schedule | Duration, WorkSchedule, TaskSLAConfig |
| interfaces/Tag | Transaction tags, metadata, assignments |
| interfaces/Workflow | WorkflowModel, WorkflowNodeData |
| schemas/* | Joi schemas and validate* helpers |
Development
npm install
npm run build
npm run typecheckPublishing
See PUBLISH-CHECKLIST.md for step-by-step publishing instructions. See RULES.md for versioning guidelines and security practices.
License
ISC
