@ajayjbtickets/common 1.0.14 → 1.0.15
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 +3 -3
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -420,10 +420,10 @@ var JwtService = class {
|
|
|
420
420
|
);
|
|
421
421
|
return decoded;
|
|
422
422
|
}
|
|
423
|
-
static generatePayload(
|
|
423
|
+
static generatePayload(payload) {
|
|
424
424
|
return {
|
|
425
|
-
|
|
426
|
-
email:
|
|
425
|
+
id: payload.id,
|
|
426
|
+
email: payload.email
|
|
427
427
|
};
|
|
428
428
|
}
|
|
429
429
|
};
|
package/dist/index.d.cts
CHANGED
|
@@ -159,13 +159,13 @@ declare const schemaValidator: (type: ValidationSource, schema: ZodSchema) => (r
|
|
|
159
159
|
declare const verifyToken: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
160
160
|
|
|
161
161
|
interface JwtPayload {
|
|
162
|
-
|
|
162
|
+
id: string;
|
|
163
163
|
email: string;
|
|
164
164
|
}
|
|
165
165
|
declare class JwtService {
|
|
166
166
|
static sign(payload: string | Buffer | object, signOptions?: SignOptions): string;
|
|
167
167
|
static verify(token: string, verifyOptions?: VerifyOptions): string | jsonwebtoken.Jwt | jsonwebtoken.JwtPayload;
|
|
168
|
-
static generatePayload<T extends JwtPayload>(
|
|
168
|
+
static generatePayload<T extends JwtPayload>(payload: T): T;
|
|
169
169
|
}
|
|
170
170
|
|
|
171
171
|
declare class Password {
|
package/dist/index.d.ts
CHANGED
|
@@ -159,13 +159,13 @@ declare const schemaValidator: (type: ValidationSource, schema: ZodSchema) => (r
|
|
|
159
159
|
declare const verifyToken: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
160
160
|
|
|
161
161
|
interface JwtPayload {
|
|
162
|
-
|
|
162
|
+
id: string;
|
|
163
163
|
email: string;
|
|
164
164
|
}
|
|
165
165
|
declare class JwtService {
|
|
166
166
|
static sign(payload: string | Buffer | object, signOptions?: SignOptions): string;
|
|
167
167
|
static verify(token: string, verifyOptions?: VerifyOptions): string | jsonwebtoken.Jwt | jsonwebtoken.JwtPayload;
|
|
168
|
-
static generatePayload<T extends JwtPayload>(
|
|
168
|
+
static generatePayload<T extends JwtPayload>(payload: T): T;
|
|
169
169
|
}
|
|
170
170
|
|
|
171
171
|
declare class Password {
|
package/dist/index.js
CHANGED
|
@@ -354,10 +354,10 @@ var JwtService = class {
|
|
|
354
354
|
);
|
|
355
355
|
return decoded;
|
|
356
356
|
}
|
|
357
|
-
static generatePayload(
|
|
357
|
+
static generatePayload(payload) {
|
|
358
358
|
return {
|
|
359
|
-
|
|
360
|
-
email:
|
|
359
|
+
id: payload.id,
|
|
360
|
+
email: payload.email
|
|
361
361
|
};
|
|
362
362
|
}
|
|
363
363
|
};
|