my-typescript-library-rahul52us 1.2.6 → 1.2.9
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/repository/schemas/accountdetails.schema.js +10 -1
- package/dist/repository/schemas/accountdetails.schema.js.map +1 -1
- package/dist/repository/schemas/accounts.schema.js +47 -17
- package/dist/repository/schemas/accounts.schema.js.map +1 -1
- package/dist/routes/accountdetails.route.js +4 -2
- package/dist/routes/accountdetails.route.js.map +1 -1
- package/dist/routes/document.route.js +5 -5
- package/dist/routes/document.route.js.map +1 -1
- package/dist/routes/fileSystem.route.js +2 -3
- package/dist/routes/fileSystem.route.js.map +1 -1
- package/dist/routes/form.route.js +6 -4
- package/dist/routes/form.route.js.map +1 -1
- package/dist/routes/notifications.route.js +10 -8
- package/dist/routes/notifications.route.js.map +1 -1
- package/dist/routes/org.route.js +4 -4
- package/dist/routes/org.route.js.map +1 -1
- package/dist/routes/user.route.js +12 -23
- package/dist/routes/user.route.js.map +1 -1
- package/dist/server.js +5 -4
- package/dist/server.js.map +1 -1
- package/dist/setupModal.js.map +1 -1
- package/dist/types/repository/schemas/accountdetails.schema.d.ts +2 -2
- package/dist/types/repository/schemas/accounts.schema.d.ts +11 -5
- package/dist/types/repository/user.repository.d.ts +1 -1
- package/dist/types/server.d.ts +2 -0
- package/dist/types/services/authentication/getuser.service.d.ts +4 -4
- package/dist/types/services/authentication/login.service.d.ts +6 -6
- package/dist/types/services/authentication/register.service.d.ts +1 -1
- package/dist/types/services/document/document.services.d.ts +1 -1
- package/dist/types/services/fileSystem/fileSystem.service.d.ts +2 -2
- package/dist/types/services/form/form.service.d.ts +4 -4
- package/dist/types/services/notifications/notifications.service.d.ts +8 -11
- package/dist/types/services/organisation/organisation.service.d.ts +5 -36
- package/dist/types/services/statement/accountdetails.service.d.ts +2 -2
- package/package.json +1 -1
- package/src/repository/schemas/accountdetails.schema.ts +14 -1
- package/src/repository/schemas/accounts.schema.ts +49 -24
- package/src/repository/user.repository.ts +1 -1
- package/src/routes/accountdetails.route.ts +4 -2
- package/src/routes/document.route.ts +5 -5
- package/src/routes/fileSystem.route.ts +2 -4
- package/src/routes/form.route.ts +6 -4
- package/src/routes/notifications.route.ts +10 -8
- package/src/routes/org.route.ts +4 -4
- package/src/routes/user.route.ts +24 -23
- package/src/server.ts +2 -3
- package/src/services/authentication/getuser.service.ts +4 -4
- package/src/services/authentication/login.service.ts +6 -6
- package/src/services/authentication/register.service.ts +1 -1
- package/src/services/document/document.services.ts +1 -1
- package/src/services/fileSystem/fileSystem.service.ts +2 -2
- package/src/services/form/form.service.ts +4 -4
- package/src/services/notifications/notifications.service.ts +8 -8
- package/src/services/organisation/organisation.service.ts +5 -5
- package/src/services/statement/accountdetails.service.ts +2 -2
- package/src/setupModal.ts +0 -1
|
@@ -27,7 +27,7 @@ interface UserRequest extends Request {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
//*Creating a function that is calling create job for creating a new job
|
|
30
|
-
export async function createNotificationsService(values: any) {
|
|
30
|
+
export async function createNotificationsService(values: any):Promise<any> {
|
|
31
31
|
try {
|
|
32
32
|
await createNotifications({
|
|
33
33
|
...values,
|
|
@@ -46,7 +46,7 @@ export async function createNotificationsService(values: any) {
|
|
|
46
46
|
export async function getUnreadNotificationsCountService(
|
|
47
47
|
req: UserRequest,
|
|
48
48
|
res: Response
|
|
49
|
-
) {
|
|
49
|
+
) :Promise<any>{
|
|
50
50
|
try {
|
|
51
51
|
const allNotifications = await getUnreadNotificationsCount({
|
|
52
52
|
_id: req.user._id,
|
|
@@ -60,7 +60,7 @@ export async function getUnreadNotificationsCountService(
|
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
export async function getReadNotificationsService(req: Request, res: Response) {
|
|
63
|
+
export async function getReadNotificationsService(req: Request, res: Response):Promise<any> {
|
|
64
64
|
try {
|
|
65
65
|
const readNotifications = await getReadNotifications(req);
|
|
66
66
|
return res.status(200).send(readNotifications);
|
|
@@ -71,7 +71,7 @@ export async function getReadNotificationsService(req: Request, res: Response) {
|
|
|
71
71
|
export async function getUnreadNotificationsService(
|
|
72
72
|
req: Request,
|
|
73
73
|
res: Response
|
|
74
|
-
) {
|
|
74
|
+
):Promise<any> {
|
|
75
75
|
try {
|
|
76
76
|
const unreadNotifications = await getUnreadNotifications(req);
|
|
77
77
|
return res.status(200).send(unreadNotifications);
|
|
@@ -83,7 +83,7 @@ export async function getUnreadNotificationsService(
|
|
|
83
83
|
export async function getAllNotificationsService(
|
|
84
84
|
req: UserRequest,
|
|
85
85
|
res: Response
|
|
86
|
-
) {
|
|
86
|
+
):Promise<any> {
|
|
87
87
|
try {
|
|
88
88
|
const allNotifications = await getAllNotifications(
|
|
89
89
|
{
|
|
@@ -99,7 +99,7 @@ export async function getAllNotificationsService(
|
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
export async function updateNotificationsService(req: Request, res: Response) {
|
|
102
|
+
export async function updateNotificationsService(req: Request, res: Response) :Promise<any>{
|
|
103
103
|
try {
|
|
104
104
|
const id = req.params.id;
|
|
105
105
|
const updates = req.body;
|
|
@@ -125,7 +125,7 @@ export async function updateNotificationsService(req: Request, res: Response) {
|
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
export async function deleteNotificationsService(req: Request, res: Response) {
|
|
128
|
+
export async function deleteNotificationsService(req: Request, res: Response) :Promise<any>{
|
|
129
129
|
try {
|
|
130
130
|
const id = req.params.id;
|
|
131
131
|
|
|
@@ -156,7 +156,7 @@ export async function deleteNotificationsService(req: Request, res: Response) {
|
|
|
156
156
|
export async function markAllNotificationsAsReadService(
|
|
157
157
|
req: UserRequest,
|
|
158
158
|
res: Response
|
|
159
|
-
) {
|
|
159
|
+
) :Promise<any>{
|
|
160
160
|
try {
|
|
161
161
|
const allAsRead = await markAllNotificationsAsRead(req.user._id);
|
|
162
162
|
return res.status(200).send(allAsRead);
|
|
@@ -116,7 +116,7 @@ export async function createOrganizationService(req: any, res: Response
|
|
|
116
116
|
// return res.status(400).json({ status: 'error', message: "Invoice couldn't be created, some error occured please contact sequelstring support" });
|
|
117
117
|
// }
|
|
118
118
|
|
|
119
|
-
export async function getOrgDetailsService(req: UserRequest, res: Response) {
|
|
119
|
+
export async function getOrgDetailsService(req: UserRequest, res: Response):Promise<any> {
|
|
120
120
|
try {
|
|
121
121
|
const orgId = req.user.company
|
|
122
122
|
var org_type = await findOrgById(orgId);
|
|
@@ -127,7 +127,7 @@ export async function getOrgDetailsService(req: UserRequest, res: Response) {
|
|
|
127
127
|
}
|
|
128
128
|
};
|
|
129
129
|
|
|
130
|
-
export async function findOrgDetailsService(req: UserRequest, res : Response){
|
|
130
|
+
export async function findOrgDetailsService(req: UserRequest, res : Response): Promise<any> {
|
|
131
131
|
try
|
|
132
132
|
{
|
|
133
133
|
const result = await findOrgDetails(req.user.company)
|
|
@@ -139,7 +139,7 @@ export async function findOrgDetailsService(req: UserRequest, res : Response){
|
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
-
export async function updateOrganisationHandler(req: UserRequest, res: Response): Promise<
|
|
142
|
+
export async function updateOrganisationHandler(req: UserRequest, res: Response): Promise<any> {
|
|
143
143
|
try {
|
|
144
144
|
const id = req.user.company;
|
|
145
145
|
const updates = req.body;
|
|
@@ -159,7 +159,7 @@ export async function updateOrganisationHandler(req: UserRequest, res: Response)
|
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
//*getting all the detils
|
|
162
|
-
export async function getOrganisationService(req: UserRequest, res: Response) {
|
|
162
|
+
export async function getOrganisationService(req: UserRequest, res: Response):Promise<any> {
|
|
163
163
|
try {
|
|
164
164
|
let { company, _id } = req.user;
|
|
165
165
|
let value = req.query.value as string || '';
|
|
@@ -174,7 +174,7 @@ export async function getOrganisationService(req: UserRequest, res: Response) {
|
|
|
174
174
|
}
|
|
175
175
|
};
|
|
176
176
|
|
|
177
|
-
export async function getComplainceCountService(req: UserRequest, res: Response) {
|
|
177
|
+
export async function getComplainceCountService(req: UserRequest, res: Response) : Promise<any> {
|
|
178
178
|
try {
|
|
179
179
|
let { company, _id } = req.user;
|
|
180
180
|
let value = req.query.value as string || '';
|
|
@@ -2,7 +2,7 @@ import { createAccount, getAccount } from "../../repository/accountdetails.repos
|
|
|
2
2
|
import { Request, Response } from 'express';
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
export async function createAccountService(req: Request, res: Response) {
|
|
5
|
+
export async function createAccountService(req: Request, res: Response) : Promise<any> {
|
|
6
6
|
try {
|
|
7
7
|
const data = req.body;
|
|
8
8
|
const statement = await createAccount(data);
|
|
@@ -12,7 +12,7 @@ export async function createAccountService(req: Request, res: Response) {
|
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
export async function getAccountService(req: Request, res: Response) {
|
|
15
|
+
export async function getAccountService(req: Request, res: Response): Promise<any> {
|
|
16
16
|
try {
|
|
17
17
|
let value = req.query.value as string || '';
|
|
18
18
|
let sort = req.query.sort as string || null;
|
package/src/setupModal.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// library/mongooseSetup.ts
|
|
2
2
|
import mongoose from "mongoose";
|
|
3
3
|
import { DocumentSchema } from "./repository/schemas/document.schema";
|
|
4
|
-
import workFlowSchema from "./repository/schemas/workflow.schema";
|
|
5
4
|
import { fileSystemSchema } from './repository/schemas/fileSystem.schema';
|
|
6
5
|
|
|
7
6
|
/**
|