@swell/apps-sdk 1.0.143 → 1.0.144
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/README.md +1 -1
- package/dist/index.cjs +51 -19
- package/dist/index.cjs.map +2 -2
- package/dist/index.js +51 -19
- package/dist/index.js.map +2 -2
- package/dist/index.mjs +51 -19
- package/dist/index.mjs.map +2 -2
- package/dist/src/api.d.ts +1 -1
- package/dist/src/cache/cache.d.ts +1 -1
- package/dist/src/theme.d.ts +2 -1
- package/package.json +1 -1
package/dist/src/api.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ export declare class Swell {
|
|
|
31
31
|
* Fetches a resource.
|
|
32
32
|
* First attempts to fetch from cache.
|
|
33
33
|
*/
|
|
34
|
-
getCachedResource<T>(key: string, args: unknown[], handler: () => T | Promise<T
|
|
34
|
+
getCachedResource<T>(key: string, args: unknown[], handler: () => T | Promise<T>, isCacheble?: boolean): Promise<T | undefined>;
|
|
35
35
|
getAppSettings(): Promise<SwellData>;
|
|
36
36
|
getStorefrontSettings(force?: boolean): Promise<SwellData>;
|
|
37
37
|
getStorefrontMenus(): SwellMenu[];
|
|
@@ -18,7 +18,7 @@ export declare class Cache {
|
|
|
18
18
|
*
|
|
19
19
|
* This will always return the cached value immediately if exists
|
|
20
20
|
*/
|
|
21
|
-
fetchSWR<T>(key: string, fetchFn: () => T | Promise<T>, ttl?: number): Promise<T>;
|
|
21
|
+
fetchSWR<T>(key: string, fetchFn: () => T | Promise<T>, ttl?: number, isCacheble?: boolean): Promise<T>;
|
|
22
22
|
get<T>(key: string): Promise<T | undefined>;
|
|
23
23
|
set<T>(key: string, value: T, ttl?: number): Promise<T>;
|
|
24
24
|
flush(key: string): Promise<void>;
|
package/dist/src/theme.d.ts
CHANGED
|
@@ -37,6 +37,7 @@ export declare class SwellTheme {
|
|
|
37
37
|
menus: Record<string, SwellMenu | undefined>;
|
|
38
38
|
geo: SwellSettingsGeo;
|
|
39
39
|
configs: ThemeConfigs;
|
|
40
|
+
storefrontSettings: SwellData;
|
|
40
41
|
}>;
|
|
41
42
|
resolvePageData(store: SwellData, configs: ThemeConfigs, pageId?: string, altTemplate?: string): Promise<{
|
|
42
43
|
settings: ThemeSettings;
|
|
@@ -46,7 +47,7 @@ export declare class SwellTheme {
|
|
|
46
47
|
account: SwellStorefrontSingleton | null;
|
|
47
48
|
customer?: SwellStorefrontSingleton | null;
|
|
48
49
|
}>;
|
|
49
|
-
fetchSingletonResourceCached<R>(key: string, handler: () => Promise<R>, defaultValue: () => R | Promise<R
|
|
50
|
+
fetchSingletonResourceCached<R>(key: string, handler: () => Promise<R>, defaultValue: () => R | Promise<R>, isCacheble?: boolean): Promise<R | undefined>;
|
|
50
51
|
fetchCart(): Promise<StorefrontResource>;
|
|
51
52
|
fetchAccount(): Promise<StorefrontResource | null>;
|
|
52
53
|
getFormConfig(formType: string): ThemeFormConfig | undefined;
|