@7365admin1/core 3.53.3 → 3.53.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/CHANGELOG.md +20 -0
- package/dist/index.d.ts +127 -1
- package/dist/index.js +24 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/test/sp-approvals-console-gate.test.mjs +117 -0
package/dist/index.mjs
CHANGED
|
@@ -85380,6 +85380,11 @@ function useServiceProviderInviteController() {
|
|
|
85380
85380
|
}
|
|
85381
85381
|
async function approvals(req, res, next) {
|
|
85382
85382
|
try {
|
|
85383
|
+
await requireConsolePermission(
|
|
85384
|
+
req,
|
|
85385
|
+
"sp-approvals",
|
|
85386
|
+
"see-all-sp-approvals"
|
|
85387
|
+
);
|
|
85383
85388
|
const schema2 = Joi143.object({
|
|
85384
85389
|
status: Joi143.string().valid(
|
|
85385
85390
|
"awaiting-approval",
|
|
@@ -85406,6 +85411,11 @@ function useServiceProviderInviteController() {
|
|
|
85406
85411
|
}
|
|
85407
85412
|
async function pendingApprovalCount(req, res, next) {
|
|
85408
85413
|
try {
|
|
85414
|
+
await requireConsolePermission(
|
|
85415
|
+
req,
|
|
85416
|
+
"sp-approvals",
|
|
85417
|
+
"see-all-sp-approvals"
|
|
85418
|
+
);
|
|
85409
85419
|
res.json(await approvalCount({ userId: callerId5(req) }));
|
|
85410
85420
|
} catch (error) {
|
|
85411
85421
|
next(error);
|
|
@@ -85413,6 +85423,7 @@ function useServiceProviderInviteController() {
|
|
|
85413
85423
|
}
|
|
85414
85424
|
async function approve(req, res, next) {
|
|
85415
85425
|
try {
|
|
85426
|
+
await requireConsolePermission(req, "sp-approvals", "approve-sp");
|
|
85416
85427
|
res.json(await _approve({ id: inviteId(req), userId: callerId5(req) }));
|
|
85417
85428
|
} catch (error) {
|
|
85418
85429
|
logger198.log({ level: "error", message: `${error.message}` });
|
|
@@ -85421,6 +85432,7 @@ function useServiceProviderInviteController() {
|
|
|
85421
85432
|
}
|
|
85422
85433
|
async function reject(req, res, next) {
|
|
85423
85434
|
try {
|
|
85435
|
+
await requireConsolePermission(req, "sp-approvals", "reject-sp");
|
|
85424
85436
|
const { error, value } = Joi143.object({
|
|
85425
85437
|
reason: Joi143.string().trim().min(1).max(1e3).required()
|
|
85426
85438
|
}).validate(req.body ?? {});
|
|
@@ -92228,6 +92240,7 @@ export {
|
|
|
92228
92240
|
CLIENT_ACTIONS,
|
|
92229
92241
|
CLOCK_DRIFT_WARN_SECONDS,
|
|
92230
92242
|
CONSOLE_AUDIT_LABELS,
|
|
92243
|
+
CONSOLE_PERMISSIONS,
|
|
92231
92244
|
CONTRACTOR_TYPE_LABELS,
|
|
92232
92245
|
CURRENT_TIME_ENDPOINT,
|
|
92233
92246
|
CameraType,
|
|
@@ -92440,6 +92453,9 @@ export {
|
|
|
92440
92453
|
chatSchema,
|
|
92441
92454
|
clampPtzSpeed,
|
|
92442
92455
|
clockDriftSeconds,
|
|
92456
|
+
consoleRoleAllows,
|
|
92457
|
+
consoleRoleAllowsAll,
|
|
92458
|
+
consoleSpellings,
|
|
92443
92459
|
console_audit_namespace_collection,
|
|
92444
92460
|
createManpowerRemarksDaily,
|
|
92445
92461
|
customerSchema,
|
|
@@ -92539,6 +92555,8 @@ export {
|
|
|
92539
92555
|
relayForRecorder,
|
|
92540
92556
|
remarksSchema,
|
|
92541
92557
|
renderPagePdf,
|
|
92558
|
+
requireConsolePermission,
|
|
92559
|
+
requirePlatformStaff,
|
|
92542
92560
|
resetCameraTransports,
|
|
92543
92561
|
residentAppModuleKeys,
|
|
92544
92562
|
residentFormEntry,
|