@rocketlink/crm-model 1.0.275 → 1.0.277
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.
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { USER_STATE } from "@/model/constants/user.constants";
|
|
2
|
-
import { Merchant } from "@/model/merchant.model";
|
|
3
2
|
export interface User {
|
|
4
3
|
id?: number;
|
|
5
4
|
name?: string;
|
|
@@ -7,9 +6,10 @@ export interface User {
|
|
|
7
6
|
plainPassword?: string;
|
|
8
7
|
email?: string;
|
|
9
8
|
status?: USER_STATE;
|
|
10
|
-
tenantId?: number;
|
|
11
9
|
roleId?: number;
|
|
12
|
-
|
|
10
|
+
tenantId?: number;
|
|
11
|
+
tenants?: number[];
|
|
12
|
+
merchants?: number[];
|
|
13
13
|
createdAt?: Date;
|
|
14
14
|
updatedAt?: Date;
|
|
15
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.model.d.ts","sourceRoot":"","sources":["../../src/model/user.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"user.model.d.ts","sourceRoot":"","sources":["../../src/model/user.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,kCAAkC,CAAC;AAE5D,MAAM,WAAW,IAAI;IACjB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC;CACpB"}
|
package/package.json
CHANGED
package/src/dtos/fastify.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FastifyReply, FastifyRequest, RouteGenericInterface } from "fastify";
|
|
2
2
|
import "@fastify/jwt";
|
|
3
3
|
import "@fastify/mysql";
|
|
4
4
|
|
|
5
5
|
declare module '@fastify/jwt' {
|
|
6
6
|
interface FastifyJWT {
|
|
7
|
-
payload:
|
|
8
|
-
user:
|
|
7
|
+
payload: AuthenticatedUser;
|
|
8
|
+
user: AuthenticatedUser;
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
|
package/src/model/fastify.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ import "@fastify/mysql";
|
|
|
4
4
|
|
|
5
5
|
declare module '@fastify/jwt' {
|
|
6
6
|
interface FastifyJWT {
|
|
7
|
-
payload: {
|
|
8
|
-
user: {
|
|
7
|
+
payload: { userId: number; email: string; tenantId?: number; roleId?: number; merchants?: number[] };
|
|
8
|
+
user: { userId: number; email: string; tenantId?: number; roleId?: number; merchants?: number[] };
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
|
package/src/model/user.model.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import {USER_STATE} from "@/model/constants/user.constants";
|
|
2
|
-
import {Merchant} from "@/model/merchant.model";
|
|
3
2
|
|
|
4
3
|
export interface User {
|
|
5
4
|
id?: number;
|
|
@@ -8,9 +7,10 @@ export interface User {
|
|
|
8
7
|
plainPassword?: string;
|
|
9
8
|
email?: string;
|
|
10
9
|
status?: USER_STATE;
|
|
11
|
-
tenantId?: number;
|
|
12
10
|
roleId?: number;
|
|
13
|
-
|
|
11
|
+
tenantId?: number;
|
|
12
|
+
tenants?: number[];
|
|
13
|
+
merchants?: number[];
|
|
14
14
|
createdAt?: Date;
|
|
15
15
|
updatedAt?: Date;
|
|
16
16
|
}
|