@meerkapp/wms-contracts 0.2.0-beta.14 → 0.2.0-beta.16
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.cjs +20 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -22
- package/dist/index.d.ts +16 -22
- package/dist/index.js +19 -17
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1477,6 +1477,7 @@ __export(index_exports, {
|
|
|
1477
1477
|
TransactionIsolationLevelSchema: () => TransactionIsolationLevelSchema,
|
|
1478
1478
|
UpdateEmployeeSchema: () => UpdateEmployeeSchema,
|
|
1479
1479
|
UpdateOrganizationSchema: () => UpdateOrganizationSchema,
|
|
1480
|
+
UpdateOwnPasswordSchema: () => UpdateOwnPasswordSchema,
|
|
1480
1481
|
UpdateOwnProfileSchema: () => UpdateOwnProfileSchema,
|
|
1481
1482
|
UpdateRoleSchema: () => UpdateRoleSchema,
|
|
1482
1483
|
UpdateWarehouseSchema: () => UpdateWarehouseSchema,
|
|
@@ -11974,17 +11975,21 @@ var ALL_PERMISSIONS = [
|
|
|
11974
11975
|
"warehouse:create",
|
|
11975
11976
|
"warehouse:update",
|
|
11976
11977
|
"locality:create",
|
|
11977
|
-
|
|
11978
|
+
// employee management
|
|
11978
11979
|
"employee:create",
|
|
11979
|
-
"employee:update",
|
|
11980
|
-
"employee:
|
|
11981
|
-
"employee:
|
|
11982
|
-
"employee:
|
|
11983
|
-
"employee:
|
|
11980
|
+
"employee:update:info",
|
|
11981
|
+
"employee:update:warehouse",
|
|
11982
|
+
"employee:update:roles",
|
|
11983
|
+
"employee:update:email",
|
|
11984
|
+
"employee:update:password",
|
|
11985
|
+
"employee:toggle:active",
|
|
11986
|
+
"employee:update:avatar",
|
|
11987
|
+
// own profile
|
|
11988
|
+
"employee:update:own:info",
|
|
11984
11989
|
"employee:update:own:email",
|
|
11985
11990
|
"employee:update:own:password",
|
|
11986
11991
|
"employee:update:own:avatar",
|
|
11987
|
-
|
|
11992
|
+
// role management
|
|
11988
11993
|
"role:create",
|
|
11989
11994
|
"role:update"
|
|
11990
11995
|
];
|
|
@@ -12036,6 +12041,7 @@ var CountrySchema = CountryModelSchema.omit({ localities: true }).extend({ updat
|
|
|
12036
12041
|
var import_zod7 = require("zod");
|
|
12037
12042
|
var EmployeeRoleSchema = EmployeeRoleModelSchema.omit({ assignments: true, permissions: true }).extend({ id: import_zod7.z.number(), updatedAt: import_zod7.z.string() });
|
|
12038
12043
|
var EmployeeSchema = EmployeeModelSchema.omit({ password: true, warehouse: true, roleAssignments: true }).extend({
|
|
12044
|
+
avatarUrl: import_zod7.z.string().nullable(),
|
|
12039
12045
|
phone: import_zod7.z.string().nullable(),
|
|
12040
12046
|
lastSeen: import_zod7.z.string().nullable(),
|
|
12041
12047
|
updatedAt: import_zod7.z.string(),
|
|
@@ -12068,16 +12074,12 @@ var UpdateOwnProfileSchema = import_zod7.z.object({
|
|
|
12068
12074
|
firstName: import_zod7.z.string().min(1).optional(),
|
|
12069
12075
|
lastName: import_zod7.z.string().min(1).optional(),
|
|
12070
12076
|
phone: import_zod7.z.string().min(7).max(20).nullable().optional(),
|
|
12071
|
-
email: import_zod7.z.string().email().optional()
|
|
12072
|
-
|
|
12073
|
-
|
|
12074
|
-
|
|
12075
|
-
(
|
|
12076
|
-
|
|
12077
|
-
return true;
|
|
12078
|
-
},
|
|
12079
|
-
{ message: "currentPassword is required when changing password", path: ["currentPassword"] }
|
|
12080
|
-
);
|
|
12077
|
+
email: import_zod7.z.string().email().optional()
|
|
12078
|
+
});
|
|
12079
|
+
var UpdateOwnPasswordSchema = import_zod7.z.object({
|
|
12080
|
+
currentPassword: import_zod7.z.string().min(1),
|
|
12081
|
+
newPassword: import_zod7.z.string().min(8)
|
|
12082
|
+
});
|
|
12081
12083
|
|
|
12082
12084
|
// src/modules/role/index.ts
|
|
12083
12085
|
var import_zod8 = require("zod");
|
|
@@ -13551,6 +13553,7 @@ var UpdateRoleSchema = import_zod8.z.object({
|
|
|
13551
13553
|
TransactionIsolationLevelSchema,
|
|
13552
13554
|
UpdateEmployeeSchema,
|
|
13553
13555
|
UpdateOrganizationSchema,
|
|
13556
|
+
UpdateOwnPasswordSchema,
|
|
13554
13557
|
UpdateOwnProfileSchema,
|
|
13555
13558
|
UpdateRoleSchema,
|
|
13556
13559
|
UpdateWarehouseSchema,
|