my-typescript-library-rahul52us 1.5.3 → 1.5.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "my-typescript-library-rahul52us",
3
- "version": "1.5.3",
3
+ "version": "1.5.4",
4
4
  "description": "A reusable TypeScript utility library.",
5
5
  "main": "dist/server.js",
6
6
  "types": "dist/types/server.d.ts",
@@ -1422,7 +1422,7 @@ export async function getDocumentCountByLevelAndStatus(
1422
1422
  let filteredApprovals: any = [];
1423
1423
  if (level !== "admin") {
1424
1424
  filteredApprovals = approvals.filter((approval) => {
1425
- const maxLevel = parseInt(level.split("-")[1]);
1425
+ const maxLevel = parseInt(level?.split("-")[1]);
1426
1426
  const levelNumber = parseInt(approval.level.split("-")[1]);
1427
1427
  return levelNumber <= maxLevel;
1428
1428
  });
package/src/server.ts CHANGED
@@ -1,3 +1,4 @@
1
+
1
2
  export { getDefaultWorkflowFunction } from './services/workflow/workflow.service';
2
3
 
3
4
  export { createPendingApprovalFunction as createPendingApproval } from './services/document/document.services';
@@ -15,4 +16,5 @@ export { default as UserRole } from './routes/userrole.route';
15
16
  export { default as Document } from './routes/document.route';
16
17
  export { default as WorkFlow } from './routes/workflow.route';
17
18
  export { default as Form } from './routes/form.route';
18
-
19
+ export {default as DocumentModal} from './repository/schemas/document.schema'
20
+ export {default as WorkFlowModel} from './repository/schemas/workflow.schema'