@coveo/quantic 3.29.2 → 3.29.3-pre.17da6cf64e
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/force-app/main/default/classes/InsightController.cls +1 -1
- package/force-app/main/default/classes/RecommendationsController.cls +1 -1
- package/force-app/main/default/staticresources/coveoheadless/case-assist/headless.js +10 -8
- package/force-app/main/default/staticresources/coveoheadless/definitions/utils/jwt-utils.d.ts +17 -0
- package/force-app/main/default/staticresources/coveoheadless/headless.js +12 -10
- package/force-app/main/default/staticresources/coveoheadless/insight/headless.js +11 -9
- package/force-app/main/default/staticresources/coveoheadless/recommendation/headless.js +9 -7
- package/package.json +2 -2
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface JWTPayload {
|
|
2
|
+
exp?: number;
|
|
3
|
+
[key: string]: unknown;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Parses a JWT token and returns its payload
|
|
7
|
+
* @param token - The JWT token to parse
|
|
8
|
+
* @returns The parsed JWT payload or null if invalid
|
|
9
|
+
*/
|
|
10
|
+
export declare function parseJWT(token?: string): JWTPayload | null;
|
|
11
|
+
/**
|
|
12
|
+
* Checks if a JWT token should be renewed (expired or will expire soon)
|
|
13
|
+
* @param token - The JWT token to check
|
|
14
|
+
* @param bufferSeconds - Buffer time in seconds before expiration to consider token as needing renewal
|
|
15
|
+
* @returns true if the token should be renewed (expired or expiring within buffer time), false otherwise
|
|
16
|
+
*/
|
|
17
|
+
export declare function shouldRenewJWT(token?: string, bufferSeconds?: number): boolean;
|