av6-core 2.0.0 → 2.0.2

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
@@ -611,6 +611,9 @@ type ApprovalAction = {
611
611
  comment: string | null;
612
612
  actedAt: Date;
613
613
  };
614
+ type ApprovalActionWithInstance = ApprovalAction & {
615
+ approvalInstance: ApprovalInstance | null;
616
+ };
614
617
  type LevelReadyEvt = {
615
618
  instanceId: number;
616
619
  subjectType: string;
@@ -820,7 +823,7 @@ declare class ApprovalService {
820
823
  private emitEvents;
821
824
  private assertPermission;
822
825
  getAllApprovalFlow(input: GetMyApprovalFlow): Promise<PaginatedResponse<ApprovalInstanceByUser>>;
823
- getApprovalActDetailsBySubjectId(subjectId: number, subjectType: string, service: string): Promise<ApprovalAction[]>;
826
+ getApprovalActDetailsBySubjectId(subjectId: number, subjectType: string, service: string): Promise<ApprovalActionWithInstance[]>;
824
827
  commonStatusUpdate(config: IParentConfigJSON, data: ICommonApprovalUpdate): Promise<void>;
825
828
  commonParentChildUpdate(config: IParentConfigJSON, childConfig: IChildConfigJSON | null, inst: EventInstance): Promise<void>;
826
829
  }
@@ -1036,4 +1039,4 @@ declare class AuditProxy<Module extends string = "OPD" | "PROCEDURE" | "GENERAL_
1036
1039
  createAuditedService<T extends object>(serviceName: string, service: T): T;
1037
1040
  }
1038
1041
 
1039
- export { type ActInput, ActionMode, 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, generateHashForAuth, generateMd5, getDynamicValue, getNestedValue, getNestedValueV2, getPattern, interpolate, objectTo2DArray, renderEmailTemplate, renderTemplate, toNumberOrNull, toUINConfigDTO, uinConfigService, type updateStatusParams };
1042
+ export { type ActInput, ActionMode, type ApprovalAction, type ApprovalActionDto, type ApprovalActionWithInstance, 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, generateHashForAuth, generateMd5, getDynamicValue, getNestedValue, getNestedValueV2, getPattern, interpolate, objectTo2DArray, renderEmailTemplate, renderTemplate, toNumberOrNull, toUINConfigDTO, uinConfigService, type updateStatusParams };
package/dist/index.d.ts CHANGED
@@ -611,6 +611,9 @@ type ApprovalAction = {
611
611
  comment: string | null;
612
612
  actedAt: Date;
613
613
  };
614
+ type ApprovalActionWithInstance = ApprovalAction & {
615
+ approvalInstance: ApprovalInstance | null;
616
+ };
614
617
  type LevelReadyEvt = {
615
618
  instanceId: number;
616
619
  subjectType: string;
@@ -820,7 +823,7 @@ declare class ApprovalService {
820
823
  private emitEvents;
821
824
  private assertPermission;
822
825
  getAllApprovalFlow(input: GetMyApprovalFlow): Promise<PaginatedResponse<ApprovalInstanceByUser>>;
823
- getApprovalActDetailsBySubjectId(subjectId: number, subjectType: string, service: string): Promise<ApprovalAction[]>;
826
+ getApprovalActDetailsBySubjectId(subjectId: number, subjectType: string, service: string): Promise<ApprovalActionWithInstance[]>;
824
827
  commonStatusUpdate(config: IParentConfigJSON, data: ICommonApprovalUpdate): Promise<void>;
825
828
  commonParentChildUpdate(config: IParentConfigJSON, childConfig: IChildConfigJSON | null, inst: EventInstance): Promise<void>;
826
829
  }
@@ -1036,4 +1039,4 @@ declare class AuditProxy<Module extends string = "OPD" | "PROCEDURE" | "GENERAL_
1036
1039
  createAuditedService<T extends object>(serviceName: string, service: T): T;
1037
1040
  }
1038
1041
 
1039
- export { type ActInput, ActionMode, 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, generateHashForAuth, generateMd5, getDynamicValue, getNestedValue, getNestedValueV2, getPattern, interpolate, objectTo2DArray, renderEmailTemplate, renderTemplate, toNumberOrNull, toUINConfigDTO, uinConfigService, type updateStatusParams };
1042
+ export { type ActInput, ActionMode, type ApprovalAction, type ApprovalActionDto, type ApprovalActionWithInstance, 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, generateHashForAuth, generateMd5, getDynamicValue, getNestedValue, getNestedValueV2, getPattern, interpolate, objectTo2DArray, renderEmailTemplate, renderTemplate, toNumberOrNull, toUINConfigDTO, uinConfigService, type updateStatusParams };
package/dist/index.js CHANGED
@@ -2317,6 +2317,21 @@ var commonService = (serviceDeps) => {
2317
2317
  };
2318
2318
  };
2319
2319
 
2320
+ // src/config/axiosClient.config.ts
2321
+ var import_axios2 = __toESM(require("axios"));
2322
+ var externalInterceptor = () => {
2323
+ const randomNumber = Math.floor(Math.random() * 1e6);
2324
+ const hash = generateHashForAuth(randomNumber.toString());
2325
+ return import_axios2.default.create({
2326
+ headers: {
2327
+ "Content-Type": "application/json",
2328
+ "client-key": hash,
2329
+ "client-id": randomNumber.toString()
2330
+ },
2331
+ validateStatus: () => true
2332
+ });
2333
+ };
2334
+
2320
2335
  // src/types/approval.type.ts
2321
2336
  var ApprovalStatus = /* @__PURE__ */ ((ApprovalStatus2) => {
2322
2337
  ApprovalStatus2["PENDING"] = "PENDING";
@@ -2478,6 +2493,9 @@ var approvalRepository = (deps) => {
2478
2493
  service
2479
2494
  },
2480
2495
  isActive: true
2496
+ },
2497
+ include: {
2498
+ approvalInstance: true
2481
2499
  }
2482
2500
  });
2483
2501
  },
@@ -2577,21 +2595,6 @@ var approvalRepository = (deps) => {
2577
2595
  };
2578
2596
  };
2579
2597
 
2580
- // src/config/axiosClient.config.ts
2581
- var import_axios2 = __toESM(require("axios"));
2582
- var externalInterceptor = () => {
2583
- const randomNumber = Math.floor(Math.random() * 1e6);
2584
- const hash = generateHashForAuth(randomNumber.toString());
2585
- return import_axios2.default.create({
2586
- headers: {
2587
- "Content-Type": "application/json",
2588
- "client-key": hash,
2589
- "client-id": randomNumber.toString()
2590
- },
2591
- validateStatus: () => true
2592
- });
2593
- };
2594
-
2595
2598
  // src/services/approval.service.ts
2596
2599
  var ApprovalService = class {
2597
2600
  constructor(deps) {
package/dist/index.mjs CHANGED
@@ -2254,6 +2254,21 @@ var commonService = (serviceDeps) => {
2254
2254
  };
2255
2255
  };
2256
2256
 
2257
+ // src/config/axiosClient.config.ts
2258
+ import axios2 from "axios";
2259
+ var externalInterceptor = () => {
2260
+ const randomNumber = Math.floor(Math.random() * 1e6);
2261
+ const hash = generateHashForAuth(randomNumber.toString());
2262
+ return axios2.create({
2263
+ headers: {
2264
+ "Content-Type": "application/json",
2265
+ "client-key": hash,
2266
+ "client-id": randomNumber.toString()
2267
+ },
2268
+ validateStatus: () => true
2269
+ });
2270
+ };
2271
+
2257
2272
  // src/types/approval.type.ts
2258
2273
  var ApprovalStatus = /* @__PURE__ */ ((ApprovalStatus2) => {
2259
2274
  ApprovalStatus2["PENDING"] = "PENDING";
@@ -2415,6 +2430,9 @@ var approvalRepository = (deps) => {
2415
2430
  service
2416
2431
  },
2417
2432
  isActive: true
2433
+ },
2434
+ include: {
2435
+ approvalInstance: true
2418
2436
  }
2419
2437
  });
2420
2438
  },
@@ -2514,21 +2532,6 @@ var approvalRepository = (deps) => {
2514
2532
  };
2515
2533
  };
2516
2534
 
2517
- // src/config/axiosClient.config.ts
2518
- import axios2 from "axios";
2519
- var externalInterceptor = () => {
2520
- const randomNumber = Math.floor(Math.random() * 1e6);
2521
- const hash = generateHashForAuth(randomNumber.toString());
2522
- return axios2.create({
2523
- headers: {
2524
- "Content-Type": "application/json",
2525
- "client-key": hash,
2526
- "client-id": randomNumber.toString()
2527
- },
2528
- validateStatus: () => true
2529
- });
2530
- };
2531
-
2532
2535
  // src/services/approval.service.ts
2533
2536
  var ApprovalService = class {
2534
2537
  constructor(deps) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "av6-core",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",