av6-core 1.7.16 → 1.7.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -528,6 +528,14 @@ declare enum ApprovalStatus {
528
528
  REJECTED = 3,
529
529
  CANCELLED = 4
530
530
  }
531
+ declare enum FlowType {
532
+ STATUS = 0,
533
+ CO_PAY = 1,
534
+ INDIVIDUAL_DISCOUNT = 2,
535
+ OVERALL_DISCOUNT = 3,
536
+ SPECIAL_DISCOUNT = 4,
537
+ REFUND = 5
538
+ }
531
539
  type StepType = "MIN_MAX" | "NORMAL";
532
540
  type ApprovalStep = {
533
541
  id?: number;
@@ -544,6 +552,18 @@ type ApprovalStep = {
544
552
  createdAt?: Date | string;
545
553
  updatedAt?: Date | string;
546
554
  };
555
+ type ApproverMapping = {
556
+ id?: number;
557
+ staffId?: number | null;
558
+ stepId: number;
559
+ ccId: number;
560
+ roleId?: number | null;
561
+ isActive?: boolean;
562
+ createdBy?: number | null;
563
+ updatedBy?: number | null;
564
+ createdAt?: Date | string;
565
+ updatedAt?: Date | string;
566
+ };
547
567
  type ApprovalInstance = {
548
568
  id?: number;
549
569
  flowId: number;
@@ -561,6 +581,28 @@ type ApprovalInstance = {
561
581
  createdAt?: Date | string;
562
582
  updatedAt?: Date | string;
563
583
  };
584
+ type ApprovalFlow = {
585
+ name: string;
586
+ id: number;
587
+ subjectType: string;
588
+ service: string;
589
+ isActive: boolean;
590
+ createdBy: number | null;
591
+ updatedBy: number | null;
592
+ createdAt: Date;
593
+ updatedAt: Date;
594
+ flowType: FlowType;
595
+ };
596
+ type ApprovalAction = {
597
+ id: number;
598
+ isActive: boolean;
599
+ level: number;
600
+ instanceId: number;
601
+ actedBy: number;
602
+ statusAfter: ApprovalStatus;
603
+ comment: string | null;
604
+ actedAt: Date;
605
+ };
564
606
  type LevelReadyEvt = {
565
607
  instanceId: number;
566
608
  subjectType: string;
@@ -583,6 +625,24 @@ declare global {
583
625
  "approval:REJECTED": (i: ApprovalInstance) => void;
584
626
  }
585
627
  }
628
+ interface CreateApprovalFlow {
629
+ subjectType: string;
630
+ name: string;
631
+ }
632
+ interface UpdateApprovalFlow extends CreateApprovalFlow {
633
+ id: number;
634
+ }
635
+ interface IApprovalStep {
636
+ id?: number;
637
+ flowId: number;
638
+ subjectType: string;
639
+ }
640
+ type FlowWithStepsResponse = ApprovalFlow & {
641
+ steps: ApprovalStep[];
642
+ };
643
+ interface FlowWithSelectedStepResponse extends ApprovalFlow {
644
+ step: ApprovalStep | null;
645
+ }
586
646
  interface ActInput {
587
647
  instanceId: number;
588
648
  approverId: number;
@@ -590,6 +650,16 @@ interface ActInput {
590
650
  ccId: number;
591
651
  comment?: string;
592
652
  }
653
+ interface RawFlowWithSelectedStepResponse {
654
+ flowId: number;
655
+ stepId: number;
656
+ level: number;
657
+ minAmount: number;
658
+ maxAmount: number;
659
+ stepType: string;
660
+ ccId: number;
661
+ service: string;
662
+ }
593
663
  interface StartFlowReq {
594
664
  service: string;
595
665
  subjectType: string;
@@ -600,6 +670,126 @@ interface StartFlowReq {
600
670
  level?: number;
601
671
  extra?: Record<string, string | number | boolean | null>;
602
672
  }
673
+ interface NotificationEvent {
674
+ instanceId: number;
675
+ subjectType: string;
676
+ service: string;
677
+ subjectId: number;
678
+ level: number;
679
+ ccId: number;
680
+ approvers: ApproverMapping[];
681
+ }
682
+ interface CommonApproveReq {
683
+ service: string;
684
+ subjectType: string;
685
+ id: number;
686
+ comment?: string;
687
+ ccId: number;
688
+ approverId: number;
689
+ approveType: "APPROVE" | "REJECT";
690
+ }
691
+ interface CommonGetApprovalActionReq {
692
+ service: string;
693
+ subjectType: string;
694
+ id: number;
695
+ }
696
+ interface GetPendingApprovalReq {
697
+ service: string;
698
+ ccId: number;
699
+ staffId: number;
700
+ }
701
+ interface IParentConfigJSON {
702
+ tableName: string;
703
+ approvedAt?: string;
704
+ approvedBy?: string;
705
+ approvalNote?: string;
706
+ status?: string;
707
+ refundAmount?: string;
708
+ discountType?: string;
709
+ discountValue?: string;
710
+ discountAmount?: string;
711
+ totalCopaymentAmount?: string;
712
+ isApproved?: string;
713
+ paymentStatus?: string;
714
+ }
715
+ interface IParentConfigData {
716
+ approvedAt?: string | null;
717
+ approvedBy?: string | null;
718
+ approvalNote?: string | null;
719
+ status?: string | null;
720
+ refundAmount?: number | null;
721
+ discountType?: string | null;
722
+ discountValue?: number | null;
723
+ discountAmount?: number | null;
724
+ totalCopaymentAmount?: number | null;
725
+ isApproved?: string | null;
726
+ paymentStatus?: string | null;
727
+ }
728
+ interface IChildConfigJSON {
729
+ tableName: string;
730
+ discountType?: string;
731
+ discountValue?: string;
732
+ discountAmount?: string;
733
+ copayValue?: string;
734
+ copayType?: string;
735
+ copayAmount?: string;
736
+ coPayModificationStatus?: string;
737
+ }
738
+ interface IChildConfigData {
739
+ discountType?: string | null;
740
+ discountValue?: number | null;
741
+ discountAmount?: number | null;
742
+ copayValue?: number | null;
743
+ copayType?: string | null;
744
+ copayAmount?: number | null;
745
+ coPayModificationStatus?: string | null;
746
+ }
747
+ interface ICommonApprovalUpdate {
748
+ id: number;
749
+ flowType: FlowType;
750
+ status?: string | null;
751
+ approvedAt?: string | null;
752
+ approvedBy?: string | null;
753
+ approvalNote?: string | null;
754
+ refundAmount?: number | null;
755
+ }
756
+ interface EventInstance {
757
+ subjectType: string;
758
+ service: string;
759
+ instanceId: number;
760
+ flowType: FlowType;
761
+ subjectId: number;
762
+ approverId: number;
763
+ step: ApprovalStep;
764
+ comment?: string;
765
+ }
766
+ interface ApprovalInstanceByUser {
767
+ id: number;
768
+ flowId: number;
769
+ subjectType: string;
770
+ service: string;
771
+ subjectId: number;
772
+ refNo: number;
773
+ currentStepId: number;
774
+ netTotal: number;
775
+ status: ApprovalStatus;
776
+ createdBy: string;
777
+ createdAt: Date;
778
+ level: number;
779
+ flowType: FlowType;
780
+ flowName: string;
781
+ extra?: string | null;
782
+ }
783
+ interface ApprovalActionDto extends Omit<ApprovalAction, "actedBy"> {
784
+ actedByDetails: EmployeeCache | null;
785
+ }
786
+ interface GetMyApprovalFlow extends Omit<CommonFilterWithDate, "sortBy"> {
787
+ staffId: number;
788
+ ccId: number;
789
+ service: string;
790
+ status?: ApprovalStatus[];
791
+ flowType?: FlowType;
792
+ }
603
793
  interface ApprovalDeps {
604
794
  helpers: Helpers;
605
795
  logger: winston.Logger;
@@ -621,6 +811,10 @@ declare class ApprovalService {
621
811
  private assertPermission;
622
812
  }
623
813
 
814
+ declare const approvalRepository: (helpers: Helpers) => {
815
+ findMatchingFlow(tx: PrismaClient | Prisma.TransactionClient, type: string, service: string, ccId: number, netTotal: number, level?: number): Promise<RawFlowWithSelectedStepResponse | null>;
816
+ };
817
+
624
818
  declare function customOmit<T extends object, K extends keyof T>(obj: T, keys: K[]): {
625
819
  rest: Omit<T, K>;
626
820
  omitted: Pick<T, K>;
@@ -814,4 +1008,4 @@ declare class AuditProxy<Module extends string = "OPD" | "PROCEDURE" | "GENERAL_
814
1008
  createAuditedService<T extends object>(serviceName: string, service: T): T;
815
1009
  }
816
1010
 
817
- export { ApprovalService, type AuditContext, type AuditContextProvider, AuditCore, type AuditLogPayload, AuditLogger, AuditProxy, type BulkAtomicResult, type BulkConfig, type BulkConflictConfig, type BulkOnConflict, type CacheAdapter, type CalculationRes, type ColValue, type CommonCreateRequestRepository, type CommonExcelRequest, type CommonFilterRequest, type CommonFilterWithDate, type CommonServiceResponse, type CommonUpdateRequestRepository, type Config, type Context, type CreateUINConfigRequest, type CrudContext, type CrudDelegate, type DataType, type DeepMerge, type DeleteParams, type DeleteRequestRepository, type Deps, type DropdownRequest, type DropdownRequestService, type DtoFromMapping, type DtoNullOnMissing, type DynamicCreateInput, type DynamicCrudConfig, type DynamicShortCode, type DynamicUpdateInput, type EmitPayload, type EmployeeCache, type ExcelConfig, type ExportExcel, type ExportExcelRequestService, type FetchRequest, type FetchRequestRepository, type FieldConfig, type FieldRules, type FieldType, type FixedMap, type FixedSearchRequest, type FixedSearchRequestService, type Helpers, type ImportExcel, type ImportExcelRequestService, type LockUnlockParams, type LockUnlockRequestRepository, type LogicNode, type Mapper, type MergeAll, type NewFixedSearchRequest, type NewFixedSearchRequestService, type NewSearchRequest, NotificationEmitter, type Op, type PaginatedResponse, type PathToSelectWithSelect, type PathValue, type PathsToSelectWithSelect, type Presence, type Recipient, type RelationConfig, type RelationStrategy, type RelationWriteConfig, type SearchRequest, type SearchRequestService, type ServiceCacheAdapter, type SingleValidationMapping, type SourcePath, type Store, type ToggleActive, type TxClient, type UINConfigDTO, type UINPreviewRequest, type UINSegment, type UINSegmentType, type UIN_RESET_POLICY, type UinDeps, type UnionToIntersection, type UniqueConfig, type UpdateConfigByCodeInput, type UpdateStatusRequestRepository, type UpdateUINConfigRequest, type ValidationErrorItem, commonService, convertArrayPatternToEachBlocksGeneric, customOmit, findDifferences, formatDatesDeep, fromTimestampToSqlDatetime, getDynamicValue, getNestedValue, getNestedValueV2, getPattern, interpolate, objectTo2DArray, renderEmailTemplate, renderTemplate, toNumberOrNull, toUINConfigDTO, uinConfigService, type updateStatusParams };
1011
+ export { type ActInput, type ApprovalAction, type ApprovalActionDto, type ApprovalDeps, type ApprovalFlow, type ApprovalInstance, type ApprovalInstanceByUser, ApprovalService, ApprovalStatus, type ApprovalStep, type ApproverMapping, type AuditContext, type AuditContextProvider, AuditCore, type AuditLogPayload, AuditLogger, AuditProxy, type BulkAtomicResult, type BulkConfig, type BulkConflictConfig, type BulkOnConflict, type CacheAdapter, type CalculationRes, type ColValue, type CommonApproveReq, type CommonCreateRequestRepository, type CommonExcelRequest, type CommonFilterRequest, type CommonFilterWithDate, type CommonGetApprovalActionReq, type CommonServiceResponse, type CommonUpdateRequestRepository, type Config, type Context, type CreateApprovalFlow, type CreateUINConfigRequest, type CrudContext, type CrudDelegate, type DataType, type DeepMerge, type DeleteParams, type DeleteRequestRepository, type Deps, type DropdownRequest, type DropdownRequestService, type DtoFromMapping, type DtoNullOnMissing, type DynamicCreateInput, type DynamicCrudConfig, type DynamicShortCode, type DynamicUpdateInput, type EmitPayload, type EmployeeCache, type EventInstance, type ExcelConfig, type ExportExcel, type ExportExcelRequestService, type FetchRequest, type FetchRequestRepository, type FieldConfig, type FieldRules, type FieldType, type FixedMap, type FixedSearchRequest, type FixedSearchRequestService, FlowType, type FlowWithSelectedStepResponse, type FlowWithStepsResponse, type GetMyApprovalFlow, type GetPendingApprovalReq, type Helpers, type IApprovalStep, type IChildConfigData, type IChildConfigJSON, type ICommonApprovalUpdate, type IParentConfigData, type IParentConfigJSON, type ImportExcel, type ImportExcelRequestService, type LevelDoneEvt, type LevelReadyEvt, type LockUnlockParams, type LockUnlockRequestRepository, type LogicNode, type Mapper, type MergeAll, type NewFixedSearchRequest, type NewFixedSearchRequestService, type NewSearchRequest, NotificationEmitter, type NotificationEvent, type Op, type PaginatedResponse, type PathToSelectWithSelect, type PathValue, type PathsToSelectWithSelect, type Presence, type PrismaTransactionClient, type RawFlowWithSelectedStepResponse, type Recipient, type RelationConfig, type RelationStrategy, type RelationWriteConfig, type SearchRequest, type SearchRequestService, type ServiceCacheAdapter, type SingleValidationMapping, type SourcePath, type StartFlowReq, type StepType, type Store, type ToggleActive, type TxClient, type UINConfigDTO, type UINPreviewRequest, type UINSegment, type UINSegmentType, type UIN_RESET_POLICY, type UinDeps, type UnionToIntersection, type UniqueConfig, type UpdateApprovalFlow, type UpdateConfigByCodeInput, type UpdateStatusRequestRepository, type UpdateUINConfigRequest, type ValidationErrorItem, approvalRepository, commonService, convertArrayPatternToEachBlocksGeneric, customOmit, findDifferences, formatDatesDeep, fromTimestampToSqlDatetime, getDynamicValue, getNestedValue, getNestedValueV2, getPattern, interpolate, objectTo2DArray, renderEmailTemplate, renderTemplate, toNumberOrNull, toUINConfigDTO, uinConfigService, type updateStatusParams };
package/dist/index.d.ts CHANGED
@@ -528,6 +528,14 @@ declare enum ApprovalStatus {
528
528
  REJECTED = 3,
529
529
  CANCELLED = 4
530
530
  }
531
+ declare enum FlowType {
532
+ STATUS = 0,
533
+ CO_PAY = 1,
534
+ INDIVIDUAL_DISCOUNT = 2,
535
+ OVERALL_DISCOUNT = 3,
536
+ SPECIAL_DISCOUNT = 4,
537
+ REFUND = 5
538
+ }
531
539
  type StepType = "MIN_MAX" | "NORMAL";
532
540
  type ApprovalStep = {
533
541
  id?: number;
@@ -544,6 +552,18 @@ type ApprovalStep = {
544
552
  createdAt?: Date | string;
545
553
  updatedAt?: Date | string;
546
554
  };
555
+ type ApproverMapping = {
556
+ id?: number;
557
+ staffId?: number | null;
558
+ stepId: number;
559
+ ccId: number;
560
+ roleId?: number | null;
561
+ isActive?: boolean;
562
+ createdBy?: number | null;
563
+ updatedBy?: number | null;
564
+ createdAt?: Date | string;
565
+ updatedAt?: Date | string;
566
+ };
547
567
  type ApprovalInstance = {
548
568
  id?: number;
549
569
  flowId: number;
@@ -561,6 +581,28 @@ type ApprovalInstance = {
561
581
  createdAt?: Date | string;
562
582
  updatedAt?: Date | string;
563
583
  };
584
+ type ApprovalFlow = {
585
+ name: string;
586
+ id: number;
587
+ subjectType: string;
588
+ service: string;
589
+ isActive: boolean;
590
+ createdBy: number | null;
591
+ updatedBy: number | null;
592
+ createdAt: Date;
593
+ updatedAt: Date;
594
+ flowType: FlowType;
595
+ };
596
+ type ApprovalAction = {
597
+ id: number;
598
+ isActive: boolean;
599
+ level: number;
600
+ instanceId: number;
601
+ actedBy: number;
602
+ statusAfter: ApprovalStatus;
603
+ comment: string | null;
604
+ actedAt: Date;
605
+ };
564
606
  type LevelReadyEvt = {
565
607
  instanceId: number;
566
608
  subjectType: string;
@@ -583,6 +625,24 @@ declare global {
583
625
  "approval:REJECTED": (i: ApprovalInstance) => void;
584
626
  }
585
627
  }
628
+ interface CreateApprovalFlow {
629
+ subjectType: string;
630
+ name: string;
631
+ }
632
+ interface UpdateApprovalFlow extends CreateApprovalFlow {
633
+ id: number;
634
+ }
635
+ interface IApprovalStep {
636
+ id?: number;
637
+ flowId: number;
638
+ subjectType: string;
639
+ }
640
+ type FlowWithStepsResponse = ApprovalFlow & {
641
+ steps: ApprovalStep[];
642
+ };
643
+ interface FlowWithSelectedStepResponse extends ApprovalFlow {
644
+ step: ApprovalStep | null;
645
+ }
586
646
  interface ActInput {
587
647
  instanceId: number;
588
648
  approverId: number;
@@ -590,6 +650,16 @@ interface ActInput {
590
650
  ccId: number;
591
651
  comment?: string;
592
652
  }
653
+ interface RawFlowWithSelectedStepResponse {
654
+ flowId: number;
655
+ stepId: number;
656
+ level: number;
657
+ minAmount: number;
658
+ maxAmount: number;
659
+ stepType: string;
660
+ ccId: number;
661
+ service: string;
662
+ }
593
663
  interface StartFlowReq {
594
664
  service: string;
595
665
  subjectType: string;
@@ -600,6 +670,126 @@ interface StartFlowReq {
600
670
  level?: number;
601
671
  extra?: Record<string, string | number | boolean | null>;
602
672
  }
673
+ interface NotificationEvent {
674
+ instanceId: number;
675
+ subjectType: string;
676
+ service: string;
677
+ subjectId: number;
678
+ level: number;
679
+ ccId: number;
680
+ approvers: ApproverMapping[];
681
+ }
682
+ interface CommonApproveReq {
683
+ service: string;
684
+ subjectType: string;
685
+ id: number;
686
+ comment?: string;
687
+ ccId: number;
688
+ approverId: number;
689
+ approveType: "APPROVE" | "REJECT";
690
+ }
691
+ interface CommonGetApprovalActionReq {
692
+ service: string;
693
+ subjectType: string;
694
+ id: number;
695
+ }
696
+ interface GetPendingApprovalReq {
697
+ service: string;
698
+ ccId: number;
699
+ staffId: number;
700
+ }
701
+ interface IParentConfigJSON {
702
+ tableName: string;
703
+ approvedAt?: string;
704
+ approvedBy?: string;
705
+ approvalNote?: string;
706
+ status?: string;
707
+ refundAmount?: string;
708
+ discountType?: string;
709
+ discountValue?: string;
710
+ discountAmount?: string;
711
+ totalCopaymentAmount?: string;
712
+ isApproved?: string;
713
+ paymentStatus?: string;
714
+ }
715
+ interface IParentConfigData {
716
+ approvedAt?: string | null;
717
+ approvedBy?: string | null;
718
+ approvalNote?: string | null;
719
+ status?: string | null;
720
+ refundAmount?: number | null;
721
+ discountType?: string | null;
722
+ discountValue?: number | null;
723
+ discountAmount?: number | null;
724
+ totalCopaymentAmount?: number | null;
725
+ isApproved?: string | null;
726
+ paymentStatus?: string | null;
727
+ }
728
+ interface IChildConfigJSON {
729
+ tableName: string;
730
+ discountType?: string;
731
+ discountValue?: string;
732
+ discountAmount?: string;
733
+ copayValue?: string;
734
+ copayType?: string;
735
+ copayAmount?: string;
736
+ coPayModificationStatus?: string;
737
+ }
738
+ interface IChildConfigData {
739
+ discountType?: string | null;
740
+ discountValue?: number | null;
741
+ discountAmount?: number | null;
742
+ copayValue?: number | null;
743
+ copayType?: string | null;
744
+ copayAmount?: number | null;
745
+ coPayModificationStatus?: string | null;
746
+ }
747
+ interface ICommonApprovalUpdate {
748
+ id: number;
749
+ flowType: FlowType;
750
+ status?: string | null;
751
+ approvedAt?: string | null;
752
+ approvedBy?: string | null;
753
+ approvalNote?: string | null;
754
+ refundAmount?: number | null;
755
+ }
756
+ interface EventInstance {
757
+ subjectType: string;
758
+ service: string;
759
+ instanceId: number;
760
+ flowType: FlowType;
761
+ subjectId: number;
762
+ approverId: number;
763
+ step: ApprovalStep;
764
+ comment?: string;
765
+ }
766
+ interface ApprovalInstanceByUser {
767
+ id: number;
768
+ flowId: number;
769
+ subjectType: string;
770
+ service: string;
771
+ subjectId: number;
772
+ refNo: number;
773
+ currentStepId: number;
774
+ netTotal: number;
775
+ status: ApprovalStatus;
776
+ createdBy: string;
777
+ createdAt: Date;
778
+ level: number;
779
+ flowType: FlowType;
780
+ flowName: string;
781
+ extra?: string | null;
782
+ }
783
+ interface ApprovalActionDto extends Omit<ApprovalAction, "actedBy"> {
784
+ actedByDetails: EmployeeCache | null;
785
+ }
786
+ interface GetMyApprovalFlow extends Omit<CommonFilterWithDate, "sortBy"> {
787
+ staffId: number;
788
+ ccId: number;
789
+ service: string;
790
+ status?: ApprovalStatus[];
791
+ flowType?: FlowType;
792
+ }
603
793
  interface ApprovalDeps {
604
794
  helpers: Helpers;
605
795
  logger: winston.Logger;
@@ -621,6 +811,10 @@ declare class ApprovalService {
621
811
  private assertPermission;
622
812
  }
623
813
 
814
+ declare const approvalRepository: (helpers: Helpers) => {
815
+ findMatchingFlow(tx: PrismaClient | Prisma.TransactionClient, type: string, service: string, ccId: number, netTotal: number, level?: number): Promise<RawFlowWithSelectedStepResponse | null>;
816
+ };
817
+
624
818
  declare function customOmit<T extends object, K extends keyof T>(obj: T, keys: K[]): {
625
819
  rest: Omit<T, K>;
626
820
  omitted: Pick<T, K>;
@@ -814,4 +1008,4 @@ declare class AuditProxy<Module extends string = "OPD" | "PROCEDURE" | "GENERAL_
814
1008
  createAuditedService<T extends object>(serviceName: string, service: T): T;
815
1009
  }
816
1010
 
817
- export { ApprovalService, type AuditContext, type AuditContextProvider, AuditCore, type AuditLogPayload, AuditLogger, AuditProxy, type BulkAtomicResult, type BulkConfig, type BulkConflictConfig, type BulkOnConflict, type CacheAdapter, type CalculationRes, type ColValue, type CommonCreateRequestRepository, type CommonExcelRequest, type CommonFilterRequest, type CommonFilterWithDate, type CommonServiceResponse, type CommonUpdateRequestRepository, type Config, type Context, type CreateUINConfigRequest, type CrudContext, type CrudDelegate, type DataType, type DeepMerge, type DeleteParams, type DeleteRequestRepository, type Deps, type DropdownRequest, type DropdownRequestService, type DtoFromMapping, type DtoNullOnMissing, type DynamicCreateInput, type DynamicCrudConfig, type DynamicShortCode, type DynamicUpdateInput, type EmitPayload, type EmployeeCache, type ExcelConfig, type ExportExcel, type ExportExcelRequestService, type FetchRequest, type FetchRequestRepository, type FieldConfig, type FieldRules, type FieldType, type FixedMap, type FixedSearchRequest, type FixedSearchRequestService, type Helpers, type ImportExcel, type ImportExcelRequestService, type LockUnlockParams, type LockUnlockRequestRepository, type LogicNode, type Mapper, type MergeAll, type NewFixedSearchRequest, type NewFixedSearchRequestService, type NewSearchRequest, NotificationEmitter, type Op, type PaginatedResponse, type PathToSelectWithSelect, type PathValue, type PathsToSelectWithSelect, type Presence, type Recipient, type RelationConfig, type RelationStrategy, type RelationWriteConfig, type SearchRequest, type SearchRequestService, type ServiceCacheAdapter, type SingleValidationMapping, type SourcePath, type Store, type ToggleActive, type TxClient, type UINConfigDTO, type UINPreviewRequest, type UINSegment, type UINSegmentType, type UIN_RESET_POLICY, type UinDeps, type UnionToIntersection, type UniqueConfig, type UpdateConfigByCodeInput, type UpdateStatusRequestRepository, type UpdateUINConfigRequest, type ValidationErrorItem, commonService, convertArrayPatternToEachBlocksGeneric, customOmit, findDifferences, formatDatesDeep, fromTimestampToSqlDatetime, getDynamicValue, getNestedValue, getNestedValueV2, getPattern, interpolate, objectTo2DArray, renderEmailTemplate, renderTemplate, toNumberOrNull, toUINConfigDTO, uinConfigService, type updateStatusParams };
1011
+ export { type ActInput, type ApprovalAction, type ApprovalActionDto, type ApprovalDeps, type ApprovalFlow, type ApprovalInstance, type ApprovalInstanceByUser, ApprovalService, ApprovalStatus, type ApprovalStep, type ApproverMapping, type AuditContext, type AuditContextProvider, AuditCore, type AuditLogPayload, AuditLogger, AuditProxy, type BulkAtomicResult, type BulkConfig, type BulkConflictConfig, type BulkOnConflict, type CacheAdapter, type CalculationRes, type ColValue, type CommonApproveReq, type CommonCreateRequestRepository, type CommonExcelRequest, type CommonFilterRequest, type CommonFilterWithDate, type CommonGetApprovalActionReq, type CommonServiceResponse, type CommonUpdateRequestRepository, type Config, type Context, type CreateApprovalFlow, type CreateUINConfigRequest, type CrudContext, type CrudDelegate, type DataType, type DeepMerge, type DeleteParams, type DeleteRequestRepository, type Deps, type DropdownRequest, type DropdownRequestService, type DtoFromMapping, type DtoNullOnMissing, type DynamicCreateInput, type DynamicCrudConfig, type DynamicShortCode, type DynamicUpdateInput, type EmitPayload, type EmployeeCache, type EventInstance, type ExcelConfig, type ExportExcel, type ExportExcelRequestService, type FetchRequest, type FetchRequestRepository, type FieldConfig, type FieldRules, type FieldType, type FixedMap, type FixedSearchRequest, type FixedSearchRequestService, FlowType, type FlowWithSelectedStepResponse, type FlowWithStepsResponse, type GetMyApprovalFlow, type GetPendingApprovalReq, type Helpers, type IApprovalStep, type IChildConfigData, type IChildConfigJSON, type ICommonApprovalUpdate, type IParentConfigData, type IParentConfigJSON, type ImportExcel, type ImportExcelRequestService, type LevelDoneEvt, type LevelReadyEvt, type LockUnlockParams, type LockUnlockRequestRepository, type LogicNode, type Mapper, type MergeAll, type NewFixedSearchRequest, type NewFixedSearchRequestService, type NewSearchRequest, NotificationEmitter, type NotificationEvent, type Op, type PaginatedResponse, type PathToSelectWithSelect, type PathValue, type PathsToSelectWithSelect, type Presence, type PrismaTransactionClient, type RawFlowWithSelectedStepResponse, type Recipient, type RelationConfig, type RelationStrategy, type RelationWriteConfig, type SearchRequest, type SearchRequestService, type ServiceCacheAdapter, type SingleValidationMapping, type SourcePath, type StartFlowReq, type StepType, type Store, type ToggleActive, type TxClient, type UINConfigDTO, type UINPreviewRequest, type UINSegment, type UINSegmentType, type UIN_RESET_POLICY, type UinDeps, type UnionToIntersection, type UniqueConfig, type UpdateApprovalFlow, type UpdateConfigByCodeInput, type UpdateStatusRequestRepository, type UpdateUINConfigRequest, type ValidationErrorItem, approvalRepository, commonService, convertArrayPatternToEachBlocksGeneric, customOmit, findDifferences, formatDatesDeep, fromTimestampToSqlDatetime, getDynamicValue, getNestedValue, getNestedValueV2, getPattern, interpolate, objectTo2DArray, renderEmailTemplate, renderTemplate, toNumberOrNull, toUINConfigDTO, uinConfigService, type updateStatusParams };
package/dist/index.js CHANGED
@@ -31,10 +31,13 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
31
31
  var index_exports = {};
32
32
  __export(index_exports, {
33
33
  ApprovalService: () => ApprovalService,
34
+ ApprovalStatus: () => ApprovalStatus,
34
35
  AuditCore: () => AuditCore,
35
36
  AuditLogger: () => AuditLogger,
36
37
  AuditProxy: () => AuditProxy,
38
+ FlowType: () => FlowType,
37
39
  NotificationEmitter: () => NotificationEmitter,
40
+ approvalRepository: () => approvalRepository,
38
41
  commonService: () => commonService,
39
42
  convertArrayPatternToEachBlocksGeneric: () => convertArrayPatternToEachBlocksGeneric,
40
43
  customOmit: () => customOmit,
@@ -2333,6 +2336,25 @@ var approvalRepository = (helpers) => {
2333
2336
  };
2334
2337
  };
2335
2338
 
2339
+ // src/types/approval.type.ts
2340
+ var ApprovalStatus = /* @__PURE__ */ ((ApprovalStatus2) => {
2341
+ ApprovalStatus2[ApprovalStatus2["PENDING"] = 0] = "PENDING";
2342
+ ApprovalStatus2[ApprovalStatus2["PARTIALLY_APPROVED"] = 1] = "PARTIALLY_APPROVED";
2343
+ ApprovalStatus2[ApprovalStatus2["APPROVED"] = 2] = "APPROVED";
2344
+ ApprovalStatus2[ApprovalStatus2["REJECTED"] = 3] = "REJECTED";
2345
+ ApprovalStatus2[ApprovalStatus2["CANCELLED"] = 4] = "CANCELLED";
2346
+ return ApprovalStatus2;
2347
+ })(ApprovalStatus || {});
2348
+ var FlowType = /* @__PURE__ */ ((FlowType3) => {
2349
+ FlowType3[FlowType3["STATUS"] = 0] = "STATUS";
2350
+ FlowType3[FlowType3["CO_PAY"] = 1] = "CO_PAY";
2351
+ FlowType3[FlowType3["INDIVIDUAL_DISCOUNT"] = 2] = "INDIVIDUAL_DISCOUNT";
2352
+ FlowType3[FlowType3["OVERALL_DISCOUNT"] = 3] = "OVERALL_DISCOUNT";
2353
+ FlowType3[FlowType3["SPECIAL_DISCOUNT"] = 4] = "SPECIAL_DISCOUNT";
2354
+ FlowType3[FlowType3["REFUND"] = 5] = "REFUND";
2355
+ return FlowType3;
2356
+ })(FlowType || {});
2357
+
2336
2358
  // src/services/approval.service.ts
2337
2359
  var ApprovalService = class {
2338
2360
  constructor(deps) {
@@ -4585,10 +4607,13 @@ var AuditProxy = class {
4585
4607
  // Annotate the CommonJS export names for ESM import in node:
4586
4608
  0 && (module.exports = {
4587
4609
  ApprovalService,
4610
+ ApprovalStatus,
4588
4611
  AuditCore,
4589
4612
  AuditLogger,
4590
4613
  AuditProxy,
4614
+ FlowType,
4591
4615
  NotificationEmitter,
4616
+ approvalRepository,
4592
4617
  commonService,
4593
4618
  convertArrayPatternToEachBlocksGeneric,
4594
4619
  customOmit,
package/dist/index.mjs CHANGED
@@ -2276,6 +2276,25 @@ var approvalRepository = (helpers) => {
2276
2276
  };
2277
2277
  };
2278
2278
 
2279
+ // src/types/approval.type.ts
2280
+ var ApprovalStatus = /* @__PURE__ */ ((ApprovalStatus2) => {
2281
+ ApprovalStatus2[ApprovalStatus2["PENDING"] = 0] = "PENDING";
2282
+ ApprovalStatus2[ApprovalStatus2["PARTIALLY_APPROVED"] = 1] = "PARTIALLY_APPROVED";
2283
+ ApprovalStatus2[ApprovalStatus2["APPROVED"] = 2] = "APPROVED";
2284
+ ApprovalStatus2[ApprovalStatus2["REJECTED"] = 3] = "REJECTED";
2285
+ ApprovalStatus2[ApprovalStatus2["CANCELLED"] = 4] = "CANCELLED";
2286
+ return ApprovalStatus2;
2287
+ })(ApprovalStatus || {});
2288
+ var FlowType = /* @__PURE__ */ ((FlowType3) => {
2289
+ FlowType3[FlowType3["STATUS"] = 0] = "STATUS";
2290
+ FlowType3[FlowType3["CO_PAY"] = 1] = "CO_PAY";
2291
+ FlowType3[FlowType3["INDIVIDUAL_DISCOUNT"] = 2] = "INDIVIDUAL_DISCOUNT";
2292
+ FlowType3[FlowType3["OVERALL_DISCOUNT"] = 3] = "OVERALL_DISCOUNT";
2293
+ FlowType3[FlowType3["SPECIAL_DISCOUNT"] = 4] = "SPECIAL_DISCOUNT";
2294
+ FlowType3[FlowType3["REFUND"] = 5] = "REFUND";
2295
+ return FlowType3;
2296
+ })(FlowType || {});
2297
+
2279
2298
  // src/services/approval.service.ts
2280
2299
  var ApprovalService = class {
2281
2300
  constructor(deps) {
@@ -4527,10 +4546,13 @@ var AuditProxy = class {
4527
4546
  };
4528
4547
  export {
4529
4548
  ApprovalService,
4549
+ ApprovalStatus,
4530
4550
  AuditCore,
4531
4551
  AuditLogger,
4532
4552
  AuditProxy,
4553
+ FlowType,
4533
4554
  NotificationEmitter,
4555
+ approvalRepository,
4534
4556
  commonService,
4535
4557
  convertArrayPatternToEachBlocksGeneric,
4536
4558
  customOmit,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "av6-core",
3
- "version": "1.7.16",
3
+ "version": "1.7.17",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",