@geins/core 0.7.0 → 0.9.0
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/base/baseApiService.d.ts +10 -2
- package/dist/constants/storageKeys.d.ts +5 -5
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +1 -1
- package/package.json +1 -1
|
@@ -21,9 +21,17 @@ export declare abstract class BaseApiService {
|
|
|
21
21
|
destroy(): void;
|
|
22
22
|
/**
|
|
23
23
|
* Merges caller-provided variables with default languageId, marketId, and channelId from settings.
|
|
24
|
-
*
|
|
24
|
+
*
|
|
25
|
+
* Per-request overrides: if `vars` already contains `languageId`, `marketId`, or `channelId`
|
|
26
|
+
* those values are used as-is and the SDK-level settings are ignored for that field.
|
|
27
|
+
* This mirrors the shape of {@link RequestContext} and allows callers to pass a
|
|
28
|
+
* `RequestContext` object directly as part of `vars` to override locale/market on a
|
|
29
|
+
* per-request basis without reinitialising the SDK.
|
|
30
|
+
*
|
|
31
|
+
* @param vars - Variables to enrich with defaults. Pre-existing `languageId`, `marketId`,
|
|
32
|
+
* or `channelId` fields take precedence over the SDK-level settings.
|
|
25
33
|
* @returns The enriched variables object.
|
|
26
|
-
* @throws {GeinsError} If locale or market is missing
|
|
34
|
+
* @throws {GeinsError} If locale or market is missing from both `vars` and the SDK settings.
|
|
27
35
|
*/
|
|
28
36
|
protected createVariables(vars: Record<string, unknown>): Record<string, unknown>;
|
|
29
37
|
/**
|
|
@@ -22,12 +22,12 @@ export declare const CART_STORAGE_MAX_AGE: {
|
|
|
22
22
|
/** 7 days */
|
|
23
23
|
readonly DEFAULT: 604800;
|
|
24
24
|
};
|
|
25
|
-
/** Storage keys for
|
|
26
|
-
export declare const
|
|
27
|
-
readonly ITEMS: "geins-
|
|
25
|
+
/** Storage keys for lists session data. */
|
|
26
|
+
export declare const LISTS_STORAGE_KEYS: {
|
|
27
|
+
readonly ITEMS: "geins-lists";
|
|
28
28
|
};
|
|
29
|
-
/** Default max-age values (in seconds) for
|
|
30
|
-
export declare const
|
|
29
|
+
/** Default max-age values (in seconds) for lists storage entries. */
|
|
30
|
+
export declare const LISTS_STORAGE_MAX_AGE: {
|
|
31
31
|
/** 30 days */
|
|
32
32
|
readonly DEFAULT: 2592000;
|
|
33
33
|
};
|