prow-authority 3.6.3
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/.claude/settings.local.json +11 -0
- package/.dockerignore +11 -0
- package/.github/workflows/_deploy.yml +191 -0
- package/.github/workflows/deploy-dev.yml +30 -0
- package/.github/workflows/deploy-prod.yml +34 -0
- package/CLAUDE.md +114 -0
- package/Dockerfile +61 -0
- package/Dockerfile.dev +24 -0
- package/README.md +1 -0
- package/package.json +61 -0
- package/src/App.ts +40 -0
- package/src/helpers/api-error.ts +21 -0
- package/src/helpers/authority.ts +216 -0
- package/src/helpers/config.ts +4 -0
- package/src/helpers/holded.ts +105 -0
- package/src/helpers/mysql.ts +15 -0
- package/src/helpers/notifications.ts +55 -0
- package/src/helpers/random.ts +18 -0
- package/src/helpers/s3.ts +43 -0
- package/src/helpers/stripe.ts +8 -0
- package/src/index.ts +47 -0
- package/src/v1/common-types.ts +12 -0
- package/src/v1/controllers/admin/accounting-seat-controller.ts +148 -0
- package/src/v1/controllers/admin/billing-cycle-controller.ts +171 -0
- package/src/v1/controllers/admin/invoice-controller.ts +222 -0
- package/src/v1/controllers/admin/license-controller.ts +190 -0
- package/src/v1/controllers/admin/license-limit-controller.ts +160 -0
- package/src/v1/controllers/admin/notification-controller.ts +115 -0
- package/src/v1/controllers/admin/organization-controller.ts +210 -0
- package/src/v1/controllers/admin/organization-license-controller.ts +224 -0
- package/src/v1/controllers/admin/organization-license-limit-controller.ts +196 -0
- package/src/v1/controllers/admin/organization-usage-controller.ts +167 -0
- package/src/v1/controllers/admin/payment-method-controller.ts +173 -0
- package/src/v1/controllers/admin/policy-controller.ts +138 -0
- package/src/v1/controllers/admin/policy-version-controller.ts +143 -0
- package/src/v1/controllers/admin/schedule-controller.ts +181 -0
- package/src/v1/controllers/admin/service-controller.ts +206 -0
- package/src/v1/controllers/admin/service-notification-controller.ts +166 -0
- package/src/v1/controllers/admin/user-controller.ts +282 -0
- package/src/v1/controllers/admin/user-organization-controller.ts +172 -0
- package/src/v1/controllers/admin/user-policy-controller.ts +164 -0
- package/src/v1/controllers/auth/@deprecated oauth-controller.ts +191 -0
- package/src/v1/controllers/auth/identity-token-controller.ts +286 -0
- package/src/v1/controllers/auth/organization-token-controller.ts +277 -0
- package/src/v1/controllers/auth/temp-code-controller.ts +60 -0
- package/src/v1/controllers/billing/billing-controller.ts +805 -0
- package/src/v1/controllers/organizations/public-organization-controller.ts +1796 -0
- package/src/v1/controllers/policies/public-policy-controller.ts +68 -0
- package/src/v1/controllers/services/public-service-controller.ts +177 -0
- package/src/v1/controllers/services/service-controller.ts +474 -0
- package/src/v1/controllers/users/public-user-controller.ts +471 -0
- package/src/v1/daos/@deprecated auth-dao.ts +173 -0
- package/src/v1/daos/accounting-seat-dao.ts +111 -0
- package/src/v1/daos/billing-cycle-dao.ts +107 -0
- package/src/v1/daos/invoice-dao.ts +131 -0
- package/src/v1/daos/license-dao.ts +152 -0
- package/src/v1/daos/license-limit-dao.ts +120 -0
- package/src/v1/daos/organization-dao.ts +109 -0
- package/src/v1/daos/organization-license-dao.ts +117 -0
- package/src/v1/daos/organization-license-limit-dao.ts +157 -0
- package/src/v1/daos/organization-usage-dao.ts +115 -0
- package/src/v1/daos/payment-method-dao.ts +110 -0
- package/src/v1/daos/policy-dao.ts +105 -0
- package/src/v1/daos/policy-version-dao.ts +112 -0
- package/src/v1/daos/redis-dao.ts +38 -0
- package/src/v1/daos/schema.sql +462 -0
- package/src/v1/daos/service-dao.ts +118 -0
- package/src/v1/daos/service-notification-dao.ts +120 -0
- package/src/v1/daos/user-dao.ts +127 -0
- package/src/v1/daos/user-organization-dao.ts +123 -0
- package/src/v1/daos/user-policy-dao.ts +109 -0
- package/src/v1/middlewares/auth/identity-token-middleware.ts +51 -0
- package/src/v1/middlewares/auth/organization-token-middleware.ts +73 -0
- package/src/v1/middlewares/auth/service-token-middleware.ts +167 -0
- package/src/v1/middlewares/authority-middleware.ts +97 -0
- package/src/v1/middlewares/organizations/organization-middleware.ts +94 -0
- package/src/v1/middlewares/static/static-middleware.ts +41 -0
- package/src/v1/middlewares/users/user-middleware.ts +41 -0
- package/src/v1/routes/admin/accounting-seat-router.ts +89 -0
- package/src/v1/routes/admin/admin-router.ts +61 -0
- package/src/v1/routes/admin/billing-cycle-router.ts +89 -0
- package/src/v1/routes/admin/invoice-router.ts +89 -0
- package/src/v1/routes/admin/license-limit-router.ts +89 -0
- package/src/v1/routes/admin/license-router.ts +89 -0
- package/src/v1/routes/admin/notification-router.ts +61 -0
- package/src/v1/routes/admin/organization-license-limit-router.ts +89 -0
- package/src/v1/routes/admin/organization-license-router.ts +89 -0
- package/src/v1/routes/admin/organization-router.ts +89 -0
- package/src/v1/routes/admin/payment-method-router.ts +89 -0
- package/src/v1/routes/admin/policy-router.ts +89 -0
- package/src/v1/routes/admin/policy-version-router.ts +89 -0
- package/src/v1/routes/admin/schedule-router.ts +75 -0
- package/src/v1/routes/admin/service-notification-router.ts +98 -0
- package/src/v1/routes/admin/service-router.ts +89 -0
- package/src/v1/routes/admin/user-organization-router.ts +89 -0
- package/src/v1/routes/admin/user-policy-router.ts +89 -0
- package/src/v1/routes/admin/user-router.ts +89 -0
- package/src/v1/routes/auth/@deprecated auth-router.ts +199 -0
- package/src/v1/routes/auth/identity-token-router.ts +147 -0
- package/src/v1/routes/auth/organization-token-router.ts +70 -0
- package/src/v1/routes/billing/billing-router.ts +227 -0
- package/src/v1/routes/organizations/invoices-router.ts +48 -0
- package/src/v1/routes/organizations/payments-router.ts +104 -0
- package/src/v1/routes/organizations/public-organization-router.ts +319 -0
- package/src/v1/routes/organizations/users-router.ts +139 -0
- package/src/v1/routes/policies/public-policy-router.ts +50 -0
- package/src/v1/routes/services/public-service-router.ts +89 -0
- package/src/v1/routes/services/service-router.ts +197 -0
- package/src/v1/routes/users/public-user-router.ts +230 -0
- package/src/v1/routes/v1-router.ts +50 -0
- package/src/v1/schemas/admin/accounting-seat-schemas.ts +22 -0
- package/src/v1/schemas/admin/billing-cycle-schemas.ts +20 -0
- package/src/v1/schemas/admin/invoice-schemas.ts +41 -0
- package/src/v1/schemas/admin/license-limit-schemas.ts +25 -0
- package/src/v1/schemas/admin/license-schemas.ts +30 -0
- package/src/v1/schemas/admin/organization-license-limit-schemas.ts +29 -0
- package/src/v1/schemas/admin/organization-license-schemas.ts +43 -0
- package/src/v1/schemas/admin/organization-schemas.ts +67 -0
- package/src/v1/schemas/admin/organization-usage-schemas.ts +15 -0
- package/src/v1/schemas/admin/payment-method-schemas.ts +40 -0
- package/src/v1/schemas/admin/policy-schemas.ts +31 -0
- package/src/v1/schemas/admin/service-notification-schemas.ts +23 -0
- package/src/v1/schemas/admin/service-schemas.ts +56 -0
- package/src/v1/schemas/admin/user-organization-schemas.ts +24 -0
- package/src/v1/schemas/admin/user-policy-schemas.ts +17 -0
- package/src/v1/schemas/admin/user-schemas.ts +52 -0
- package/src/v1/schemas/auth/auth-schemas.ts +55 -0
- package/src/v1/schemas/billing/billing-schemas.ts +32 -0
- package/src/v1/schemas/organizations/public-organization-schemas.ts +77 -0
- package/src/v1/schemas/payments/payment-method-schemas.ts +0 -0
- package/src/v1/schemas/services/public-service-schemas.ts +5 -0
- package/src/v1/schemas/services/service-schemas.ts +27 -0
- package/src/v1/schemas/users/public-user-schemas.ts +73 -0
- package/src/v1/types/admin/accounting-seat-types.ts +16 -0
- package/src/v1/types/admin/billing-cycle-types.ts +14 -0
- package/src/v1/types/admin/invoice-types.ts +39 -0
- package/src/v1/types/admin/license-limit-types.ts +16 -0
- package/src/v1/types/admin/license-types.ts +29 -0
- package/src/v1/types/admin/organization-license-limit-types.ts +13 -0
- package/src/v1/types/admin/organization-license-types.ts +21 -0
- package/src/v1/types/admin/organization-types.ts +60 -0
- package/src/v1/types/admin/organization-usage-types.ts +17 -0
- package/src/v1/types/admin/payment-method-types.ts +30 -0
- package/src/v1/types/admin/policy-types.ts +9 -0
- package/src/v1/types/admin/policy-version-types.ts +12 -0
- package/src/v1/types/admin/service-notification-types.ts +20 -0
- package/src/v1/types/admin/service-types.ts +36 -0
- package/src/v1/types/admin/user-organization-types.ts +31 -0
- package/src/v1/types/admin/user-types.ts +44 -0
- package/src/v1/types/auth/@deprecated auth-types.ts +26 -0
- package/src/v1/types/auth/common-types.ts +7 -0
- package/src/v1/types/auth/confirmation-types.ts +5 -0
- package/src/v1/types/auth/identity-token-types.ts +8 -0
- package/src/v1/types/auth/organization-token-types.ts +23 -0
- package/src/v1/types/auth/otp-types.ts +12 -0
- package/src/v1/types/billing/billing-types.ts +37 -0
- package/src/v1/types/billing/ue-types.ts +29 -0
- package/src/v1/types/organizations/public-organization-types.ts +76 -0
- package/src/v1/types/policies/public-policy-types.ts +7 -0
- package/src/v1/types/services/public-service-types.ts +20 -0
- package/src/v1/types/services/service-types.ts +43 -0
- package/src/v1/types/users/public-user-types.ts +15 -0
- package/src/v1/types/users/user-policy-types.ts +11 -0
- package/static/error.html +55 -0
- package/static/grant.html +117 -0
- package/static/login.html +54 -0
- package/static/oauth-client-logo.webp +0 -0
- package/tsconfig.json +20 -0
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { Request, Response, Router } from 'express';
|
|
2
|
+
import httpcodes, { StatusCodes } from 'http-status-codes';
|
|
3
|
+
import APIError from '../../../helpers/api-error';
|
|
4
|
+
import { LicenseLimitNames } from '../../../helpers/authority';
|
|
5
|
+
import publicOrganizationController from '../../controllers/organizations/public-organization-controller';
|
|
6
|
+
import authorityMiddleware from '../../middlewares/authority-middleware';
|
|
7
|
+
import { Environment } from '../../types/auth/organization-token-types';
|
|
8
|
+
import organizationMiddleware from '../../middlewares/organizations/organization-middleware';
|
|
9
|
+
|
|
10
|
+
class UsersRouter {
|
|
11
|
+
router: Router;
|
|
12
|
+
|
|
13
|
+
constructor() {
|
|
14
|
+
this.router = Router();
|
|
15
|
+
this.init();
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
private readonly inviteUser = async (req: Request, res: Response) => {
|
|
19
|
+
try {
|
|
20
|
+
const response = await publicOrganizationController.inviteUser(req[`environment`], req.body);
|
|
21
|
+
res.json(response);
|
|
22
|
+
} catch (e) {
|
|
23
|
+
if (e instanceof APIError) {
|
|
24
|
+
res.status(e.code).json(e.data);
|
|
25
|
+
} else {
|
|
26
|
+
res.status(httpcodes.INTERNAL_SERVER_ERROR).json({ error: e.message || e });
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
private readonly getMe = async (req: Request, res: Response) => {
|
|
32
|
+
try {
|
|
33
|
+
const response = await publicOrganizationController.getMe(req[`environment`] as Environment);
|
|
34
|
+
res.json(response);
|
|
35
|
+
} catch (e) {
|
|
36
|
+
if (e instanceof APIError) {
|
|
37
|
+
res.status(e.code).json(e.data);
|
|
38
|
+
} else {
|
|
39
|
+
res.status(httpcodes.INTERNAL_SERVER_ERROR).json({ error: e.message || e });
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
private readonly updateMe = async (req: Request, res: Response) => {
|
|
45
|
+
try {
|
|
46
|
+
const response = await publicOrganizationController.updateMe(req[`environment`] as Environment, req.body);
|
|
47
|
+
res.json(response);
|
|
48
|
+
} catch (e) {
|
|
49
|
+
if (e instanceof APIError) {
|
|
50
|
+
res.status(e.code).json(e.data);
|
|
51
|
+
} else {
|
|
52
|
+
res.status(httpcodes.INTERNAL_SERVER_ERROR).json({ error: e.message || e });
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
private readonly getOwner = async (req: Request, res: Response) => {
|
|
58
|
+
try {
|
|
59
|
+
const response = await publicOrganizationController.getOwner(req[`environment`] as Environment);
|
|
60
|
+
res.json(response);
|
|
61
|
+
} catch (e) {
|
|
62
|
+
if (e instanceof APIError) {
|
|
63
|
+
res.status(e.code).json(e.data);
|
|
64
|
+
} else {
|
|
65
|
+
res.status(httpcodes.INTERNAL_SERVER_ERROR).json({ error: e.message || e });
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
private readonly getUsers = async (req: Request, res: Response) => {
|
|
71
|
+
try {
|
|
72
|
+
const response = await publicOrganizationController.getUsers(req[`environment`] as Environment, { all: req.query[`all`] === `true` });
|
|
73
|
+
res.json(response);
|
|
74
|
+
} catch (e) {
|
|
75
|
+
if (e instanceof APIError) {
|
|
76
|
+
res.status(e.code).json(e.data);
|
|
77
|
+
} else {
|
|
78
|
+
res.status(httpcodes.INTERNAL_SERVER_ERROR).json({ error: e.message || e });
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
private readonly updateUser = async (req: Request, res: Response) => {
|
|
84
|
+
try {
|
|
85
|
+
const response = await publicOrganizationController.updateUser(req[`environment`] as Environment, req.params[`uuid`], req.body);
|
|
86
|
+
res.json(response);
|
|
87
|
+
} catch (e) {
|
|
88
|
+
if (e instanceof APIError) {
|
|
89
|
+
res.status(e.code).json(e.data);
|
|
90
|
+
} else {
|
|
91
|
+
res.status(httpcodes.INTERNAL_SERVER_ERROR).json({ error: e.message || e });
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
private readonly deleteUser = async (req: Request, res: Response) => {
|
|
97
|
+
try {
|
|
98
|
+
await publicOrganizationController.deleteUser(req[`environment`] as Environment, req.params[`uuid`]);
|
|
99
|
+
res.status(StatusCodes.NO_CONTENT).json();
|
|
100
|
+
} catch (e) {
|
|
101
|
+
if (e instanceof APIError) {
|
|
102
|
+
res.status(e.code).json(e.data);
|
|
103
|
+
} else {
|
|
104
|
+
res.status(httpcodes.INTERNAL_SERVER_ERROR).json({ error: e.message || e });
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
private readonly invite = async (req: Request, res: Response) => {
|
|
110
|
+
try {
|
|
111
|
+
await publicOrganizationController.sendInvitation(req[`environment`] as Environment, req.params[`uuid`]);
|
|
112
|
+
res.status(StatusCodes.NO_CONTENT).json();
|
|
113
|
+
} catch (e) {
|
|
114
|
+
if (e instanceof APIError) {
|
|
115
|
+
res.status(e.code).json(e.data);
|
|
116
|
+
} else {
|
|
117
|
+
res.status(httpcodes.INTERNAL_SERVER_ERROR).json({ error: e.message || e });
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
private readonly init = () => {
|
|
123
|
+
this.router.get(`/me`, this.getMe);
|
|
124
|
+
this.router.patch(`/me`, this.updateMe);
|
|
125
|
+
this.router.get(`/owner`, this.getOwner);
|
|
126
|
+
this.router.get(``, this.getUsers);
|
|
127
|
+
|
|
128
|
+
// only licensed access to users
|
|
129
|
+
this.router.use(organizationMiddleware.admin, organizationMiddleware.active, authorityMiddleware.licensed);
|
|
130
|
+
|
|
131
|
+
this.router.post(``, authorityMiddleware.quota({ name: LicenseLimitNames.Seats, count: +1 }), this.inviteUser);
|
|
132
|
+
this.router.post(`/:uuid/invite`, this.invite);
|
|
133
|
+
this.router.patch(`/:uuid`, this.updateUser);
|
|
134
|
+
this.router.delete(`/:uuid`, authorityMiddleware.quota({ name: LicenseLimitNames.Seats, count: -1 }), this.deleteUser);
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
const usersRouter = (new UsersRouter()).router;
|
|
139
|
+
export default usersRouter;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Request, Response, Router } from 'express';
|
|
2
|
+
import httpcodes from 'http-status-codes';
|
|
3
|
+
import APIError from '../../../helpers/api-error';
|
|
4
|
+
import publicPolicyController from '../../controllers/policies/public-policy-controller';
|
|
5
|
+
|
|
6
|
+
class PublicPolicyRouter {
|
|
7
|
+
router: Router;
|
|
8
|
+
|
|
9
|
+
constructor() {
|
|
10
|
+
this.router = Router();
|
|
11
|
+
this.init();
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// get all active policies (public endpoint)
|
|
15
|
+
private readonly getActivePolicies = async (req: Request, res: Response) => {
|
|
16
|
+
try {
|
|
17
|
+
const response = await publicPolicyController.list();
|
|
18
|
+
res.json(response);
|
|
19
|
+
} catch (e) {
|
|
20
|
+
if (e instanceof APIError) {
|
|
21
|
+
res.status(e.code).json(e.data);
|
|
22
|
+
} else {
|
|
23
|
+
res.status(httpcodes.INTERNAL_SERVER_ERROR).json({ error: e.message || e });
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
// get a specific policy by id (public endpoint)
|
|
29
|
+
private readonly getPolicyById = async (req: Request, res: Response) => {
|
|
30
|
+
try {
|
|
31
|
+
const response = await publicPolicyController.get(req.params[`uuid`]);
|
|
32
|
+
res.json(response);
|
|
33
|
+
} catch (e) {
|
|
34
|
+
if (e instanceof APIError) {
|
|
35
|
+
res.status(e.code).json(e.data);
|
|
36
|
+
} else {
|
|
37
|
+
res.status(httpcodes.INTERNAL_SERVER_ERROR).json({ error: e.message || e });
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
private readonly init = () => {
|
|
43
|
+
// public endpoints
|
|
44
|
+
this.router.get(`/`, this.getActivePolicies);
|
|
45
|
+
this.router.get(`/:uuid`, this.getPolicyById);
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const publicPolicyRouter = (new PublicPolicyRouter()).router;
|
|
50
|
+
export default publicPolicyRouter;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { Request, Response, Router } from 'express';
|
|
2
|
+
import httpcodes from 'http-status-codes';
|
|
3
|
+
import APIError from '../../../helpers/api-error';
|
|
4
|
+
import publicServiceController from '../../controllers/services/public-service-controller';
|
|
5
|
+
|
|
6
|
+
class PublicServiceRouter {
|
|
7
|
+
router: Router;
|
|
8
|
+
|
|
9
|
+
constructor() {
|
|
10
|
+
this.router = Router();
|
|
11
|
+
this.init();
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
private readonly services = async (req: Request, res: Response) => {
|
|
15
|
+
try {
|
|
16
|
+
const response = await publicServiceController.services();
|
|
17
|
+
res.json(response);
|
|
18
|
+
} catch (e) {
|
|
19
|
+
if (e instanceof APIError) {
|
|
20
|
+
res.status(e.code).json(e.data);
|
|
21
|
+
} else {
|
|
22
|
+
res.status(httpcodes.INTERNAL_SERVER_ERROR).json({ error: e.message || e });
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
private readonly licenses = async (req: Request, res: Response) => {
|
|
28
|
+
try {
|
|
29
|
+
const response = await publicServiceController.licenses(req.params[`serviceUUID`], req.body);
|
|
30
|
+
res.json(response);
|
|
31
|
+
} catch (e) {
|
|
32
|
+
if (e instanceof APIError) {
|
|
33
|
+
res.status(e.code).json(e.data);
|
|
34
|
+
} else {
|
|
35
|
+
res.status(httpcodes.INTERNAL_SERVER_ERROR).json({ error: e.message || e });
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
private readonly license = async (req: Request, res: Response) => {
|
|
41
|
+
try {
|
|
42
|
+
const response = await publicServiceController.license(req.params[`serviceUUID`], req.params[`licenseUUID`]);
|
|
43
|
+
res.json(response);
|
|
44
|
+
} catch (e) {
|
|
45
|
+
if (e instanceof APIError) {
|
|
46
|
+
res.status(e.code).json(e.data);
|
|
47
|
+
} else {
|
|
48
|
+
res.status(httpcodes.INTERNAL_SERVER_ERROR).json({ error: e.message || e });
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
private readonly powerUps = async (req: Request, res: Response) => {
|
|
54
|
+
try {
|
|
55
|
+
const response = await publicServiceController.powerUps(req.params[`serviceUUID`], req.body);
|
|
56
|
+
res.json(response);
|
|
57
|
+
} catch (e) {
|
|
58
|
+
if (e instanceof APIError) {
|
|
59
|
+
res.status(e.code).json(e.data);
|
|
60
|
+
} else {
|
|
61
|
+
res.status(httpcodes.INTERNAL_SERVER_ERROR).json({ error: e.message || e });
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
private readonly powerUp = async (req: Request, res: Response) => {
|
|
67
|
+
try {
|
|
68
|
+
const response = await publicServiceController.powerUp(req.params[`serviceUUID`], req.params[`licenseUUID`]);
|
|
69
|
+
res.json(response);
|
|
70
|
+
} catch (e) {
|
|
71
|
+
if (e instanceof APIError) {
|
|
72
|
+
res.status(e.code).json(e.data);
|
|
73
|
+
} else {
|
|
74
|
+
res.status(httpcodes.INTERNAL_SERVER_ERROR).json({ error: e.message || e });
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
private readonly init = () => {
|
|
80
|
+
this.router.get(`/`, this.services);
|
|
81
|
+
this.router.post(`/:serviceUUID/licenses`, this.licenses);
|
|
82
|
+
this.router.get(`/:serviceUUID/licenses/:licenseUUID`, this.license);
|
|
83
|
+
this.router.post(`/:serviceUUID/power-ups`, this.powerUps);
|
|
84
|
+
this.router.get(`/:serviceUUID/power-ups/:licenseUUID`, this.powerUp);
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const publicServiceRouter = (new PublicServiceRouter()).router;
|
|
89
|
+
export default publicServiceRouter;
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import { Request, Response, Router } from 'express';
|
|
2
|
+
import httpcodes, { StatusCodes } from 'http-status-codes';
|
|
3
|
+
import APIError from '../../../helpers/api-error';
|
|
4
|
+
import serviceController from '../../controllers/services/service-controller';
|
|
5
|
+
import organizationTokenMiddleware from '../../middlewares/auth/organization-token-middleware';
|
|
6
|
+
import serviceTokenMiddleware from '../../middlewares/auth/service-token-middleware';
|
|
7
|
+
import { Environment } from '../../types/auth/organization-token-types';
|
|
8
|
+
import { ServiceEnvironment } from '../../types/services/service-types';
|
|
9
|
+
|
|
10
|
+
class ServiceRouter {
|
|
11
|
+
router: Router;
|
|
12
|
+
|
|
13
|
+
constructor() {
|
|
14
|
+
this.router = Router();
|
|
15
|
+
this.init();
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
private readonly token = async (req: Request, res: Response) => {
|
|
19
|
+
try {
|
|
20
|
+
await serviceTokenMiddleware.licenses(req[`service`], (req[`environment`] as Environment).organization);
|
|
21
|
+
res.json(req[`environment`]);
|
|
22
|
+
} catch (e) {
|
|
23
|
+
if (e instanceof APIError) {
|
|
24
|
+
res.status(e.code).json(e.data);
|
|
25
|
+
} else {
|
|
26
|
+
res.status(httpcodes.INTERNAL_SERVER_ERROR).json({ error: e.message || e });
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
private readonly service = async (req: Request, res: Response) => {
|
|
32
|
+
try {
|
|
33
|
+
res.json(req[`service`]);
|
|
34
|
+
} catch (e) {
|
|
35
|
+
if (e instanceof APIError) {
|
|
36
|
+
res.status(e.code).json(e.data);
|
|
37
|
+
} else {
|
|
38
|
+
res.status(httpcodes.INTERNAL_SERVER_ERROR).json({ error: e.message || e });
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
private readonly authorize = async (req: Request, res: Response) => {
|
|
44
|
+
try {
|
|
45
|
+
const response = await serviceController.authorize((req[`service-environment`] as ServiceEnvironment));
|
|
46
|
+
res.json(response);
|
|
47
|
+
} catch (e) {
|
|
48
|
+
if (e instanceof APIError) {
|
|
49
|
+
res.status(e.code).json(e.data);
|
|
50
|
+
} else {
|
|
51
|
+
res.status(httpcodes.INTERNAL_SERVER_ERROR).json({ error: e.message || e });
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
private readonly organization = async (req: Request, res: Response) => {
|
|
57
|
+
try {
|
|
58
|
+
const response = await serviceController.getOrganization((req[`service-environment`] as ServiceEnvironment));
|
|
59
|
+
res.json(response);
|
|
60
|
+
} catch (e) {
|
|
61
|
+
if (e instanceof APIError) {
|
|
62
|
+
res.status(e.code).json(e.data);
|
|
63
|
+
} else {
|
|
64
|
+
res.status(httpcodes.INTERNAL_SERVER_ERROR).json({ error: e.message || e });
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
private readonly organizationByUUID = async (req: Request, res: Response) => {
|
|
70
|
+
try {
|
|
71
|
+
const response = await serviceController.getOrganizationByUUID(req.params[`uuid`]);
|
|
72
|
+
res.json(response);
|
|
73
|
+
} catch (e) {
|
|
74
|
+
if (e instanceof APIError) {
|
|
75
|
+
res.status(e.code).json(e.data);
|
|
76
|
+
} else {
|
|
77
|
+
res.status(httpcodes.INTERNAL_SERVER_ERROR).json({ error: e.message || e });
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
private readonly userByUUID = async (req: Request, res: Response) => {
|
|
83
|
+
try {
|
|
84
|
+
const response = await serviceController.getUserByUUID(req.params[`uuid`]);
|
|
85
|
+
res.json(response);
|
|
86
|
+
} catch (e) {
|
|
87
|
+
if (e instanceof APIError) {
|
|
88
|
+
res.status(e.code).json(e.data);
|
|
89
|
+
} else {
|
|
90
|
+
res.status(httpcodes.INTERNAL_SERVER_ERROR).json({ error: e.message || e });
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
private readonly licenses = async (req: Request, res: Response) => {
|
|
96
|
+
try {
|
|
97
|
+
const response = await serviceController.getLicenses((req[`service-environment`] as ServiceEnvironment));
|
|
98
|
+
res.json(response);
|
|
99
|
+
} catch (e) {
|
|
100
|
+
if (e instanceof APIError) {
|
|
101
|
+
res.status(e.code).json(e.data);
|
|
102
|
+
} else {
|
|
103
|
+
res.status(httpcodes.INTERNAL_SERVER_ERROR).json({ error: e.message || e });
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
private readonly getQuota = async (req: Request, res: Response) => {
|
|
109
|
+
try {
|
|
110
|
+
const response = await serviceController.getQuota((req[`service-environment`] as ServiceEnvironment), req.query);
|
|
111
|
+
res.json(response);
|
|
112
|
+
} catch (e) {
|
|
113
|
+
if (e instanceof APIError) {
|
|
114
|
+
res.status(e.code).json(e.data);
|
|
115
|
+
} else {
|
|
116
|
+
res.status(httpcodes.INTERNAL_SERVER_ERROR).json({ error: e.message || e });
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
private readonly checkQuota = async (req: Request, res: Response) => {
|
|
122
|
+
try {
|
|
123
|
+
await serviceController.checkQuota((req[`service-environment`] as ServiceEnvironment));
|
|
124
|
+
res.status(StatusCodes.NO_CONTENT).json();
|
|
125
|
+
} catch (e) {
|
|
126
|
+
if (e instanceof APIError) {
|
|
127
|
+
res.status(e.code).json(e.data);
|
|
128
|
+
} else {
|
|
129
|
+
res.status(httpcodes.INTERNAL_SERVER_ERROR).json({ error: e.message || e });
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
private readonly validateQuotaUsage = async (req: Request, res: Response) => {
|
|
135
|
+
try {
|
|
136
|
+
const response = await serviceController.validateQuotaUsage((req[`service-environment`] as ServiceEnvironment), req.body);
|
|
137
|
+
res.json(response);
|
|
138
|
+
} catch (e) {
|
|
139
|
+
if (e instanceof APIError) {
|
|
140
|
+
res.status(e.code).json(e.data);
|
|
141
|
+
} else {
|
|
142
|
+
res.status(httpcodes.INTERNAL_SERVER_ERROR).json({ error: e.message || e });
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
private readonly registerQuotaUsage = async (req: Request, res: Response) => {
|
|
148
|
+
try {
|
|
149
|
+
await serviceController.registerQuotaUsage((req[`service-environment`] as ServiceEnvironment), req.body);
|
|
150
|
+
res.status(StatusCodes.NO_CONTENT).json();
|
|
151
|
+
} catch (e) {
|
|
152
|
+
if (e instanceof APIError) {
|
|
153
|
+
res.status(e.code).json(e.data);
|
|
154
|
+
} else {
|
|
155
|
+
res.status(httpcodes.INTERNAL_SERVER_ERROR).json({ error: e.message || e });
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
private readonly sendNotification = async (req: Request, res: Response) => {
|
|
161
|
+
try {
|
|
162
|
+
const response = await serviceController.sendNotification((req[`service-environment`] as ServiceEnvironment), req.body);
|
|
163
|
+
res.json(response);
|
|
164
|
+
} catch (e) {
|
|
165
|
+
if (e instanceof APIError) {
|
|
166
|
+
res.status(e.code).json(e.data);
|
|
167
|
+
} else {
|
|
168
|
+
res.status(httpcodes.INTERNAL_SERVER_ERROR).json({ error: e.message || e });
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
private readonly init = () => {
|
|
174
|
+
this.router.use(serviceTokenMiddleware.validate);
|
|
175
|
+
|
|
176
|
+
this.router.get(`/`, this.service);
|
|
177
|
+
this.router.get(`/token`, organizationTokenMiddleware.exists, organizationTokenMiddleware.validate, this.token);
|
|
178
|
+
|
|
179
|
+
this.router.get(`/organizations/:uuid`, this.organizationByUUID);
|
|
180
|
+
this.router.get(`/users/:uuid`, this.userByUUID);
|
|
181
|
+
|
|
182
|
+
this.router.use(serviceTokenMiddleware.organization);
|
|
183
|
+
this.router.post(`/authorize`, this.authorize);
|
|
184
|
+
this.router.get(`/organization`, this.organization);
|
|
185
|
+
this.router.get(`/licenses`, this.licenses);
|
|
186
|
+
|
|
187
|
+
this.router.get(`/quota`, this.getQuota);
|
|
188
|
+
this.router.patch(`/quota`, this.checkQuota);
|
|
189
|
+
this.router.post(`/quota/valid`, this.validateQuotaUsage);
|
|
190
|
+
this.router.post(`/quota`, this.registerQuotaUsage);
|
|
191
|
+
|
|
192
|
+
this.router.post(`/notifications/send`, this.sendNotification);
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
const serviceRouter = (new ServiceRouter()).router;
|
|
197
|
+
export default serviceRouter;
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
import { Request, Response, Router } from 'express';
|
|
2
|
+
import httpcodes, { StatusCodes } from 'http-status-codes';
|
|
3
|
+
import APIError from '../../../helpers/api-error';
|
|
4
|
+
import publicUserController from '../../controllers/users/public-user-controller';
|
|
5
|
+
import identityTokenMiddleware from '../../middlewares/auth/identity-token-middleware';
|
|
6
|
+
import authorityMiddleware from '../../middlewares/authority-middleware';
|
|
7
|
+
import userMiddleware from '../../middlewares/users/user-middleware';
|
|
8
|
+
import { CommunicationType, User } from '../../types/admin/user-types';
|
|
9
|
+
|
|
10
|
+
class PublicUserRouter {
|
|
11
|
+
router: Router;
|
|
12
|
+
|
|
13
|
+
constructor() {
|
|
14
|
+
this.router = Router();
|
|
15
|
+
this.init();
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
private readonly register = async (req: Request, res: Response) => {
|
|
19
|
+
try {
|
|
20
|
+
const response = await publicUserController.register(req.body, `confirmation` in req.query);
|
|
21
|
+
res.json(response);
|
|
22
|
+
} catch (e) {
|
|
23
|
+
if (e instanceof APIError) {
|
|
24
|
+
res.status(e.code).json(e.data);
|
|
25
|
+
} else {
|
|
26
|
+
res.status(httpcodes.INTERNAL_SERVER_ERROR).json({ error: e.message || e });
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
private readonly authority = async (req: Request, res: Response) => {
|
|
32
|
+
try {
|
|
33
|
+
const response = await publicUserController.authority(req.params[`uuid`]);
|
|
34
|
+
res.json(response);
|
|
35
|
+
} catch (e) {
|
|
36
|
+
if (e instanceof APIError) {
|
|
37
|
+
res.status(e.code).json(e.data);
|
|
38
|
+
} else {
|
|
39
|
+
res.status(httpcodes.INTERNAL_SERVER_ERROR).json({ error: e.message || e });
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
private readonly get = async (req: Request, res: Response) => {
|
|
45
|
+
try {
|
|
46
|
+
const response = await publicUserController.get(req[`user`] as User);
|
|
47
|
+
res.json(response);
|
|
48
|
+
} catch (e) {
|
|
49
|
+
if (e instanceof APIError) {
|
|
50
|
+
res.status(e.code).json(e.data);
|
|
51
|
+
} else {
|
|
52
|
+
res.status(httpcodes.INTERNAL_SERVER_ERROR).json({ error: e.message || e });
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
private readonly update = async (req: Request, res: Response) => {
|
|
58
|
+
try {
|
|
59
|
+
const response = await publicUserController.update((req[`user`] as User), req.body);
|
|
60
|
+
res.json(response);
|
|
61
|
+
} catch (e) {
|
|
62
|
+
if (e instanceof APIError) {
|
|
63
|
+
res.status(e.code).json(e.data);
|
|
64
|
+
} else {
|
|
65
|
+
res.status(httpcodes.INTERNAL_SERVER_ERROR).json({ error: e.message || e });
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
private readonly delete = async (req: Request, res: Response) => {
|
|
71
|
+
try {
|
|
72
|
+
await publicUserController.delete((req[`user`] as User));
|
|
73
|
+
res.status(StatusCodes.NO_CONTENT).json();
|
|
74
|
+
} catch (e) {
|
|
75
|
+
if (e instanceof APIError) {
|
|
76
|
+
res.status(e.code).json(e.data);
|
|
77
|
+
} else {
|
|
78
|
+
res.status(httpcodes.INTERNAL_SERVER_ERROR).json({ error: e.message || e });
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
private readonly information = async (req: Request, res: Response) => {
|
|
84
|
+
try {
|
|
85
|
+
const response = await publicUserController.getInformation((req[`user`] as User));
|
|
86
|
+
res.json(response);
|
|
87
|
+
} catch (e) {
|
|
88
|
+
if (e instanceof APIError) {
|
|
89
|
+
res.status(e.code).json(e.data);
|
|
90
|
+
} else {
|
|
91
|
+
res.status(httpcodes.INTERNAL_SERVER_ERROR).json({ error: e.message || e });
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
private readonly confirm = async (req: Request, res: Response) => {
|
|
97
|
+
try {
|
|
98
|
+
const response = await publicUserController.confirm(req[`user`], req.body);
|
|
99
|
+
res.json(response);
|
|
100
|
+
} catch (e) {
|
|
101
|
+
if (e instanceof APIError) {
|
|
102
|
+
res.status(e.code).json(e.data);
|
|
103
|
+
} else {
|
|
104
|
+
res.status(httpcodes.INTERNAL_SERVER_ERROR).json({ error: e.message || e });
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
private readonly requestConfirmation = async (req: Request, res: Response) => {
|
|
110
|
+
try {
|
|
111
|
+
await publicUserController.requestConfirmation(req[`user`]);
|
|
112
|
+
res.status(StatusCodes.NO_CONTENT).json();
|
|
113
|
+
} catch (e) {
|
|
114
|
+
if (e instanceof APIError) {
|
|
115
|
+
res.status(e.code).json(e.data);
|
|
116
|
+
} else {
|
|
117
|
+
res.status(httpcodes.INTERNAL_SERVER_ERROR).json({ error: e.message || e });
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
private readonly organizations = async (req: Request, res: Response) => {
|
|
123
|
+
try {
|
|
124
|
+
const response = await publicUserController.organizations(req[`user`]);
|
|
125
|
+
res.json(response);
|
|
126
|
+
} catch (e) {
|
|
127
|
+
if (e instanceof APIError) {
|
|
128
|
+
res.status(e.code).json(e.data);
|
|
129
|
+
} else {
|
|
130
|
+
res.status(httpcodes.INTERNAL_SERVER_ERROR).json({ error: e.message || e });
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
private readonly invite = async (req: Request, res: Response) => {
|
|
136
|
+
try {
|
|
137
|
+
await publicUserController.invite(req[`user`], req.params[`uuid`], req.body);
|
|
138
|
+
res.status(StatusCodes.NO_CONTENT).json();
|
|
139
|
+
} catch (e) {
|
|
140
|
+
if (e instanceof APIError) {
|
|
141
|
+
res.status(e.code).json(e.data);
|
|
142
|
+
} else {
|
|
143
|
+
res.status(httpcodes.INTERNAL_SERVER_ERROR).json({ error: e.message || e });
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
private readonly leave = async (req: Request, res: Response) => {
|
|
149
|
+
try {
|
|
150
|
+
await publicUserController.leave(req[`user`], req.params[`uuid`]);
|
|
151
|
+
res.status(StatusCodes.NO_CONTENT).json();
|
|
152
|
+
} catch (e) {
|
|
153
|
+
if (e instanceof APIError) {
|
|
154
|
+
res.status(e.code).json(e.data);
|
|
155
|
+
} else {
|
|
156
|
+
res.status(httpcodes.INTERNAL_SERVER_ERROR).json({ error: e.message || e });
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
// policy-related endpoints
|
|
162
|
+
private readonly getPendingUserPolicies = async (req: Request, res: Response) => {
|
|
163
|
+
try {
|
|
164
|
+
const response = await publicUserController.getPendingUserPolicies(req[`user`] as User);
|
|
165
|
+
res.json(response);
|
|
166
|
+
} catch (e) {
|
|
167
|
+
if (e instanceof APIError) {
|
|
168
|
+
res.status(e.code).json(e.data);
|
|
169
|
+
} else {
|
|
170
|
+
res.status(httpcodes.INTERNAL_SERVER_ERROR).json({ error: e.message || e });
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
private readonly acceptPolicies = async (req: Request, res: Response) => {
|
|
176
|
+
try {
|
|
177
|
+
await publicUserController.acceptPolicies(req[`user`] as User, req.body);
|
|
178
|
+
res.status(StatusCodes.NO_CONTENT).json();
|
|
179
|
+
} catch (e) {
|
|
180
|
+
if (e instanceof APIError) {
|
|
181
|
+
res.status(e.code).json(e.data);
|
|
182
|
+
} else {
|
|
183
|
+
res.status(httpcodes.INTERNAL_SERVER_ERROR).json({ error: e.message || e });
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
// communications endpoints
|
|
189
|
+
private readonly unsubscribeByToken = async (req: Request, res: Response) => {
|
|
190
|
+
try {
|
|
191
|
+
await publicUserController.unsubscribeByUuid(req.params[`uuid`], req.params[`type`] as CommunicationType);
|
|
192
|
+
res.status(httpcodes.NO_CONTENT).send();
|
|
193
|
+
} catch (e) {
|
|
194
|
+
if (e instanceof APIError) {
|
|
195
|
+
res.status(e.code).json(e.data);
|
|
196
|
+
} else {
|
|
197
|
+
res.status(httpcodes.INTERNAL_SERVER_ERROR).json({ error: e.message || e });
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
private readonly init = () => {
|
|
203
|
+
|
|
204
|
+
this.router.post(`/`, this.register);
|
|
205
|
+
this.router.delete(`/communications/:type/unsubscribe/:uuid`, this.unsubscribeByToken);
|
|
206
|
+
|
|
207
|
+
this.router.get(`/authority/:uuid`, authorityMiddleware.service, this.authority);
|
|
208
|
+
|
|
209
|
+
this.router.use(identityTokenMiddleware.exists, identityTokenMiddleware.validate);
|
|
210
|
+
this.router.get(`/`, this.get);
|
|
211
|
+
this.router.patch(`/`, this.update);
|
|
212
|
+
this.router.delete(`/`, this.delete);
|
|
213
|
+
|
|
214
|
+
this.router.get(`/information`, this.information);
|
|
215
|
+
|
|
216
|
+
this.router.post(`/confirm`, userMiddleware.pending, this.confirm);
|
|
217
|
+
this.router.patch(`/confirm`, userMiddleware.pending, this.requestConfirmation);
|
|
218
|
+
|
|
219
|
+
this.router.use(userMiddleware.active);
|
|
220
|
+
this.router.get(`/organizations`, this.organizations);
|
|
221
|
+
this.router.post(`/organizations/:uuid/invite`, this.invite);
|
|
222
|
+
this.router.delete(`/organizations/:uuid`, this.leave);
|
|
223
|
+
|
|
224
|
+
this.router.get(`/policies`, this.getPendingUserPolicies);
|
|
225
|
+
this.router.post(`/policies`, this.acceptPolicies);
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
const publicUserRouter = (new PublicUserRouter()).router;
|
|
230
|
+
export default publicUserRouter;
|