@geins/core 0.5.0 → 0.5.1

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.
@@ -9,8 +9,6 @@ export declare class Channel {
9
9
  constructor(geinsSettings: GeinsSettings);
10
10
  private initApiClient;
11
11
  private initChannelService;
12
- static getInstance(geinsSettings: GeinsSettings): Channel;
13
- static destroy(): void;
14
12
  setKey(key: string, value: string): void;
15
13
  getKey(key: string): Promise<string>;
16
14
  private setChannel;
@@ -22,6 +22,11 @@ export interface CookieServiceConfig {
22
22
  * If `true`, the cookie will only be sent over secure connections.
23
23
  */
24
24
  secure?: boolean;
25
+ /**
26
+ * Controls whether the cookie is sent with cross-site requests.
27
+ * Defaults to `'lax'`.
28
+ */
29
+ sameSite?: 'strict' | 'lax' | 'none';
25
30
  /**
26
31
  * Sets the maximum age of the cookie in seconds.
27
32
  * Can be a number or a string representation of a number.
@@ -49,6 +54,7 @@ export declare class CookieService {
49
54
  private domain;
50
55
  private secure;
51
56
  private httpOnly;
57
+ private sameSite;
52
58
  private maxAge;
53
59
  private cookie;
54
60
  /**
@@ -14,12 +14,12 @@ export declare class GraphQLService extends BaseApiService {
14
14
  * @param options - The options for the GraphQL query.
15
15
  * @returns A promise that resolves to the query result or null if an error occurs.
16
16
  */
17
- query<T = any>(options: GraphQLQueryOptions): Promise<T | null>;
17
+ query<T = any>(options: GraphQLQueryOptions): Promise<T>;
18
18
  /**
19
19
  * Executes a GraphQL mutation with the provided options.
20
20
  * @param options - The options for the GraphQL mutation.
21
21
  * @returns A promise that resolves to the mutation result or null if an error occurs.
22
22
  */
23
- mutation<T = any>(options: GraphQLQueryOptions): Promise<T | null>;
23
+ mutation<T = any>(options: GraphQLQueryOptions): Promise<T>;
24
24
  protected parseResult(result: any): any;
25
25
  }
@@ -1,6 +1,11 @@
1
1
  /**
2
2
  * Decodes a JWT token and optionally verifies its signature.
3
3
  *
4
+ * **Security warning:** When called without `secretKey`, this function performs NO
5
+ * signature verification. The returned payload MUST NOT be trusted for authorization
6
+ * decisions unless the token has been independently verified by the issuing authority.
7
+ * Use the `secretKey` parameter or an external verification step before relying on claims.
8
+ *
4
9
  * @param token - The JWT token to decode.
5
10
  * @param secretKey - The secret key to verify the signature (optional).
6
11
  * @returns An object containing the decoded header and payload.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geins/core",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "main": "dist/index.cjs",
5
5
  "module": "dist/index.esm.js",
6
6
  "types": "dist/index.d.ts",