@swell/apps-sdk 1.0.118 → 1.0.120
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 +40 -40
- package/dist/index.cjs.map +3 -3
- package/dist/index.js +40 -40
- package/dist/index.js.map +3 -3
- package/dist/index.mjs +40 -40
- package/dist/index.mjs.map +3 -3
- package/dist/src/compatibility/shopify-objects/index.d.ts +1 -1
- package/dist/src/compatibility/shopify-objects/resource.d.ts +2 -2
- package/dist/src/resources.d.ts +2 -2
- package/dist/src/theme.d.ts +1 -1
- package/dist/types/swell.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ShopifyCompatibility } from '@/compatibility/shopify';
|
|
1
|
+
import type { ShopifyCompatibility } from '@/compatibility/shopify';
|
|
2
2
|
import type { ThemeFont } from '@/liquid/font';
|
|
3
3
|
import type { ThemeForm } from '@/liquid/form';
|
|
4
4
|
import ShopifyArticle from './article';
|
|
@@ -2,10 +2,10 @@ import { ShopifyCompatibility } from '../shopify';
|
|
|
2
2
|
import type { SwellStorefrontCollection } from '@/resources';
|
|
3
3
|
import type { SwellData, SwellRecord } from 'types/swell';
|
|
4
4
|
export declare class ShopifyResource {
|
|
5
|
-
props: Record<string, unknown>;
|
|
5
|
+
props: Record<string | symbol, unknown>;
|
|
6
6
|
stringProp?: string;
|
|
7
7
|
linkProps?: string[];
|
|
8
|
-
constructor(props: Record<string, any>, stringProp?: string, linkProps?: string[]);
|
|
8
|
+
constructor(props: Record<string | symbol, any>, stringProp?: string, linkProps?: string[]);
|
|
9
9
|
valueOf(): unknown;
|
|
10
10
|
clone(): ShopifyResource;
|
|
11
11
|
}
|
package/dist/src/resources.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Swell } from './api';
|
|
2
2
|
import type { ShopifyCompatibility } from './compatibility/shopify';
|
|
3
|
-
import type { SwellData, SwellRecord, SwellCollection, InferSwellCollection, SwellCollectionPages, StorefrontResourceGetter } from '../types/swell';
|
|
3
|
+
import type { SwellData, SwellRecord, SwellCollection, InferSwellCollection, SwellCollectionPages, StorefrontResourceGetter, StorefrontCollectionGetter } from '../types/swell';
|
|
4
4
|
export declare const MAX_QUERY_PAGE_LIMIT = 100;
|
|
5
5
|
export declare const DEFAULT_QUERY_PAGE_LIMIT = 15;
|
|
6
6
|
export declare class StorefrontResource<T extends SwellData = SwellData> {
|
|
@@ -47,7 +47,7 @@ export declare class SwellStorefrontCollection<T extends SwellCollection = Swell
|
|
|
47
47
|
page_count?: number;
|
|
48
48
|
limit: number;
|
|
49
49
|
name?: string;
|
|
50
|
-
constructor(swell: Swell, collection: string, query?: SwellData, getter?:
|
|
50
|
+
constructor(swell: Swell, collection: string, query?: SwellData, getter?: StorefrontCollectionGetter<T>);
|
|
51
51
|
_getProxy(): SwellStorefrontCollection<T>;
|
|
52
52
|
_initQuery(query: SwellData): SwellData;
|
|
53
53
|
_defaultGetter(): StorefrontResourceGetter<T>;
|
package/dist/src/theme.d.ts
CHANGED
|
@@ -96,7 +96,7 @@ export declare class SwellTheme {
|
|
|
96
96
|
setCompatibilityConfigs(configs: ThemeConfigs): Promise<void>;
|
|
97
97
|
setCompatibilityData(pageData: SwellData): void;
|
|
98
98
|
getLocaleConfig(localeCode?: string, suffix?: string): Promise<ThemeLocaleConfig>;
|
|
99
|
-
resolveLookupSetting(setting: ThemeSettingFieldSchema, value:
|
|
99
|
+
resolveLookupSetting(setting: ThemeSettingFieldSchema, value: unknown): SwellData | SwellStorefrontRecord | SwellStorefrontCollection | null;
|
|
100
100
|
resolveLookupResource(collection: string, id: string): StorefrontResource<SwellRecord>;
|
|
101
101
|
resolveMenuSettings(): Promise<Record<string, SwellMenu | undefined>>;
|
|
102
102
|
resolveMenuSetting(value: string): SwellMenu | null;
|
package/dist/types/swell.d.ts
CHANGED
|
@@ -215,6 +215,7 @@ export interface SwellMenuItem {
|
|
|
215
215
|
}
|
|
216
216
|
export type QueryParams = import('qs').ParsedQs;
|
|
217
217
|
export type StorefrontResourceGetter<T extends SwellData = SwellData> = (this: SwellStorefrontResource<T>) => Promise<T | null> | T | null;
|
|
218
|
+
export type StorefrontCollectionGetter<T extends SwellCollection = SwellCollection> = (this: SwellStorefrontCollection<T>) => Promise<T | null> | T | null;
|
|
218
219
|
export interface ThemeSettings {
|
|
219
220
|
[key: string]: any;
|
|
220
221
|
}
|