@swell/apps-sdk 1.0.190 → 2.0.0-alpha.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.
- package/README.md +188 -254
- package/dist/backend.d.cts +81 -0
- package/dist/backend.d.ts +81 -0
- package/dist/backend.js +154 -0
- package/dist/browser-refusal.d.cts +1 -0
- package/dist/browser-refusal.d.ts +1 -0
- package/dist/browser-refusal.js +2 -0
- package/dist/context.d.cts +7 -0
- package/dist/context.d.ts +7 -0
- package/dist/context.js +29 -0
- package/dist/error.d.cts +23 -0
- package/dist/error.d.ts +23 -0
- package/dist/error.js +30 -0
- package/dist/guard.d.cts +1 -0
- package/dist/guard.d.ts +1 -0
- package/dist/guard.js +4 -0
- package/dist/index.d.cts +11 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +6 -20299
- package/dist/jwks.d.cts +1 -0
- package/dist/jwks.d.ts +1 -0
- package/dist/jwks.js +70 -0
- package/dist/request-context.d.cts +37 -0
- package/dist/request-context.d.ts +37 -0
- package/dist/request-context.js +99 -0
- package/dist/staff.d.cts +7 -0
- package/dist/staff.d.ts +7 -0
- package/dist/staff.js +7 -0
- package/dist/storefront.d.cts +28 -0
- package/dist/storefront.d.ts +28 -0
- package/dist/storefront.js +44 -0
- package/dist/version.d.cts +1 -0
- package/dist/version.d.ts +1 -0
- package/dist/version.js +2 -0
- package/dist/workflow.d.cts +1 -0
- package/dist/workflow.d.ts +1 -0
- package/dist/workflow.js +35 -0
- package/package.json +48 -63
- package/dist/index.cjs +0 -20547
- package/dist/index.cjs.map +0 -7
- package/dist/index.js.map +0 -7
- package/dist/index.mjs +0 -20404
- package/dist/index.mjs.map +0 -7
- package/dist/src/api.d.ts +0 -96
- package/dist/src/cache/cache.d.ts +0 -41
- package/dist/src/cache/cf-worker-kv-keyv-adapter.d.ts +0 -18
- package/dist/src/cache/constants.d.ts +0 -7
- package/dist/src/cache/content-cache.d.ts +0 -21
- package/dist/src/cache/html-cache/html-cache-backend.d.ts +0 -64
- package/dist/src/cache/html-cache/html-cache-factory.d.ts +0 -9
- package/dist/src/cache/html-cache/html-cache-kv.d.ts +0 -38
- package/dist/src/cache/html-cache/html-cache-worker.d.ts +0 -8
- package/dist/src/cache/html-cache/html-cache.d.ts +0 -120
- package/dist/src/cache/html-cache/index.d.ts +0 -4
- package/dist/src/cache/index.d.ts +0 -9
- package/dist/src/cache/kv-variety.d.ts +0 -10
- package/dist/src/cache/request-cache.d.ts +0 -4
- package/dist/src/cache/resource-cache.d.ts +0 -4
- package/dist/src/cache/theme-cache.d.ts +0 -4
- package/dist/src/cache/theme-file-cache.d.ts +0 -87
- package/dist/src/compatibility/drops/all_products.d.ts +0 -10
- package/dist/src/compatibility/drops/articles.d.ts +0 -10
- package/dist/src/compatibility/drops/blogs.d.ts +0 -10
- package/dist/src/compatibility/drops/collections.d.ts +0 -19
- package/dist/src/compatibility/drops/image-src.d.ts +0 -15
- package/dist/src/compatibility/drops/image.d.ts +0 -29
- package/dist/src/compatibility/drops/images.d.ts +0 -9
- package/dist/src/compatibility/drops/money.d.ts +0 -10
- package/dist/src/compatibility/drops/object-handles.d.ts +0 -6
- package/dist/src/compatibility/drops/pages.d.ts +0 -17
- package/dist/src/compatibility/drops/robots-rule.d.ts +0 -9
- package/dist/src/compatibility/drops/template.d.ts +0 -9
- package/dist/src/compatibility/shopify-configs.d.ts +0 -8
- package/dist/src/compatibility/shopify-fonts.d.ts +0 -1
- package/dist/src/compatibility/shopify-objects/address.d.ts +0 -7
- package/dist/src/compatibility/shopify-objects/article.d.ts +0 -7
- package/dist/src/compatibility/shopify-objects/blog.d.ts +0 -6
- package/dist/src/compatibility/shopify-objects/cart.d.ts +0 -6
- package/dist/src/compatibility/shopify-objects/collection.d.ts +0 -7
- package/dist/src/compatibility/shopify-objects/collections.d.ts +0 -6
- package/dist/src/compatibility/shopify-objects/content.d.ts +0 -12
- package/dist/src/compatibility/shopify-objects/currency.d.ts +0 -5
- package/dist/src/compatibility/shopify-objects/customer.d.ts +0 -6
- package/dist/src/compatibility/shopify-objects/filter.d.ts +0 -6
- package/dist/src/compatibility/shopify-objects/font.d.ts +0 -5
- package/dist/src/compatibility/shopify-objects/form.d.ts +0 -29
- package/dist/src/compatibility/shopify-objects/image.d.ts +0 -10
- package/dist/src/compatibility/shopify-objects/index.d.ts +0 -27
- package/dist/src/compatibility/shopify-objects/line_item.d.ts +0 -7
- package/dist/src/compatibility/shopify-objects/link.d.ts +0 -5
- package/dist/src/compatibility/shopify-objects/localization.d.ts +0 -5
- package/dist/src/compatibility/shopify-objects/media.d.ts +0 -9
- package/dist/src/compatibility/shopify-objects/money.d.ts +0 -3
- package/dist/src/compatibility/shopify-objects/order.d.ts +0 -11
- package/dist/src/compatibility/shopify-objects/page.d.ts +0 -5
- package/dist/src/compatibility/shopify-objects/paginate.d.ts +0 -5
- package/dist/src/compatibility/shopify-objects/predictive_search.d.ts +0 -5
- package/dist/src/compatibility/shopify-objects/product.d.ts +0 -9
- package/dist/src/compatibility/shopify-objects/recommendations.d.ts +0 -5
- package/dist/src/compatibility/shopify-objects/resource.d.ts +0 -27
- package/dist/src/compatibility/shopify-objects/search.d.ts +0 -5
- package/dist/src/compatibility/shopify-objects/shop.d.ts +0 -5
- package/dist/src/compatibility/shopify-objects/template.d.ts +0 -4
- package/dist/src/compatibility/shopify-objects/variant.d.ts +0 -6
- package/dist/src/compatibility/shopify.d.ts +0 -134
- package/dist/src/constants.d.ts +0 -598
- package/dist/src/content.d.ts +0 -8
- package/dist/src/easyblocks/config.d.ts +0 -152
- package/dist/src/easyblocks/index.d.ts +0 -2
- package/dist/src/easyblocks/utils.d.ts +0 -23
- package/dist/src/editor/resources.d.ts +0 -9
- package/dist/src/fonts.d.ts +0 -6
- package/dist/src/globals.d.ts +0 -7
- package/dist/src/index.d.ts +0 -16
- package/dist/src/liquid/color.d.ts +0 -33
- package/dist/src/liquid/drops/render.d.ts +0 -10
- package/dist/src/liquid/filters/asset_url.d.ts +0 -3
- package/dist/src/liquid/filters/brightness_difference.d.ts +0 -2
- package/dist/src/liquid/filters/color_brightness.d.ts +0 -2
- package/dist/src/liquid/filters/color_contrast.d.ts +0 -2
- package/dist/src/liquid/filters/color_darken.d.ts +0 -2
- package/dist/src/liquid/filters/color_desaturate.d.ts +0 -2
- package/dist/src/liquid/filters/color_difference.d.ts +0 -2
- package/dist/src/liquid/filters/color_extract.d.ts +0 -4
- package/dist/src/liquid/filters/color_lighten.d.ts +0 -2
- package/dist/src/liquid/filters/color_mix.d.ts +0 -2
- package/dist/src/liquid/filters/color_modify.d.ts +0 -3
- package/dist/src/liquid/filters/color_saturate.d.ts +0 -2
- package/dist/src/liquid/filters/color_to_hex.d.ts +0 -2
- package/dist/src/liquid/filters/color_to_hsl.d.ts +0 -2
- package/dist/src/liquid/filters/color_to_rgb.d.ts +0 -2
- package/dist/src/liquid/filters/date.d.ts +0 -7
- package/dist/src/liquid/filters/date_next_interval.d.ts +0 -3
- package/dist/src/liquid/filters/default_errors.d.ts +0 -3
- package/dist/src/liquid/filters/divided_by.d.ts +0 -2
- package/dist/src/liquid/filters/embedded_content.d.ts +0 -2
- package/dist/src/liquid/filters/escape.d.ts +0 -3
- package/dist/src/liquid/filters/font_face.d.ts +0 -2
- package/dist/src/liquid/filters/font_modify.d.ts +0 -3
- package/dist/src/liquid/filters/font_url.d.ts +0 -2
- package/dist/src/liquid/filters/format_address.d.ts +0 -6
- package/dist/src/liquid/filters/handleize.d.ts +0 -3
- package/dist/src/liquid/filters/image_tag.d.ts +0 -3
- package/dist/src/liquid/filters/image_url.d.ts +0 -8
- package/dist/src/liquid/filters/index.d.ts +0 -120
- package/dist/src/liquid/filters/inline_asset_content.d.ts +0 -2
- package/dist/src/liquid/filters/inline_editable.d.ts +0 -4
- package/dist/src/liquid/filters/json.d.ts +0 -3
- package/dist/src/liquid/filters/json_pretty.d.ts +0 -3
- package/dist/src/liquid/filters/locale_flag.d.ts +0 -2
- package/dist/src/liquid/filters/minus.d.ts +0 -2
- package/dist/src/liquid/filters/money.d.ts +0 -4
- package/dist/src/liquid/filters/money_with_currency.d.ts +0 -3
- package/dist/src/liquid/filters/money_without_currency.d.ts +0 -3
- package/dist/src/liquid/filters/money_without_trailing_zeros.d.ts +0 -3
- package/dist/src/liquid/filters/preload_tag.d.ts +0 -3
- package/dist/src/liquid/filters/script_tag.d.ts +0 -3
- package/dist/src/liquid/filters/shopify/asset_img_url.d.ts +0 -3
- package/dist/src/liquid/filters/shopify/default_pagination.d.ts +0 -3
- package/dist/src/liquid/filters/shopify/hex_to_rgba.d.ts +0 -2
- package/dist/src/liquid/filters/shopify/img_url.d.ts +0 -3
- package/dist/src/liquid/filters/shopify/item_count_for_variant.d.ts +0 -6
- package/dist/src/liquid/filters/shopify/payment_button.d.ts +0 -2
- package/dist/src/liquid/filters/shopify/payment_terms.d.ts +0 -2
- package/dist/src/liquid/filters/shopify/placeholder-svgs/index.d.ts +0 -5
- package/dist/src/liquid/filters/shopify/placeholder_svg_tag.d.ts +0 -3
- package/dist/src/liquid/filters/shopify/shopify_asset_url.d.ts +0 -3
- package/dist/src/liquid/filters/shopify/structured_data.d.ts +0 -3
- package/dist/src/liquid/filters/stylesheet_tag.d.ts +0 -3
- package/dist/src/liquid/filters/time_tag.d.ts +0 -2
- package/dist/src/liquid/filters/translate.d.ts +0 -3
- package/dist/src/liquid/filters/where.d.ts +0 -3
- package/dist/src/liquid/font.d.ts +0 -51
- package/dist/src/liquid/form.d.ts +0 -17
- package/dist/src/liquid/hash.d.ts +0 -5
- package/dist/src/liquid/index.d.ts +0 -52
- package/dist/src/liquid/operators.d.ts +0 -10
- package/dist/src/liquid/tags/assign.d.ts +0 -3
- package/dist/src/liquid/tags/case.d.ts +0 -3
- package/dist/src/liquid/tags/comment.d.ts +0 -3
- package/dist/src/liquid/tags/content_for.d.ts +0 -3
- package/dist/src/liquid/tags/doc.d.ts +0 -2
- package/dist/src/liquid/tags/for.d.ts +0 -3
- package/dist/src/liquid/tags/form.d.ts +0 -3
- package/dist/src/liquid/tags/if.d.ts +0 -4
- package/dist/src/liquid/tags/index.d.ts +0 -42
- package/dist/src/liquid/tags/inline_editable.d.ts +0 -3
- package/dist/src/liquid/tags/javascript.d.ts +0 -3
- package/dist/src/liquid/tags/layout.d.ts +0 -3
- package/dist/src/liquid/tags/paginate.d.ts +0 -3
- package/dist/src/liquid/tags/render.d.ts +0 -6
- package/dist/src/liquid/tags/section.d.ts +0 -3
- package/dist/src/liquid/tags/sections.d.ts +0 -3
- package/dist/src/liquid/tags/shopify/include.d.ts +0 -3
- package/dist/src/liquid/tags/shopify/schema.d.ts +0 -3
- package/dist/src/liquid/tags/style.d.ts +0 -3
- package/dist/src/liquid/tags/stylesheet.d.ts +0 -3
- package/dist/src/liquid/test-helpers.d.ts +0 -8
- package/dist/src/liquid/tokens/identifier-token.d.ts +0 -9
- package/dist/src/liquid/tokens/index.d.ts +0 -2
- package/dist/src/liquid/tokienizer.d.ts +0 -5
- package/dist/src/liquid/utils.d.ts +0 -45
- package/dist/src/menus.d.ts +0 -25
- package/dist/src/resources/account.d.ts +0 -6
- package/dist/src/resources/addresses.d.ts +0 -7
- package/dist/src/resources/blog.d.ts +0 -7
- package/dist/src/resources/blog_category.d.ts +0 -7
- package/dist/src/resources/cart.d.ts +0 -6
- package/dist/src/resources/categories.d.ts +0 -7
- package/dist/src/resources/category.d.ts +0 -7
- package/dist/src/resources/index.d.ts +0 -48
- package/dist/src/resources/order.d.ts +0 -7
- package/dist/src/resources/orders.d.ts +0 -7
- package/dist/src/resources/page.d.ts +0 -7
- package/dist/src/resources/predictive_search.d.ts +0 -6
- package/dist/src/resources/product.d.ts +0 -7
- package/dist/src/resources/product_helpers.d.ts +0 -21
- package/dist/src/resources/search.d.ts +0 -6
- package/dist/src/resources/subscription.d.ts +0 -7
- package/dist/src/resources/subscriptions.d.ts +0 -7
- package/dist/src/resources/swell_types.d.ts +0 -163
- package/dist/src/resources/variant.d.ts +0 -9
- package/dist/src/resources.d.ts +0 -113
- package/dist/src/theme/theme-loader.d.ts +0 -110
- package/dist/src/theme.d.ts +0 -204
- package/dist/src/utils/escape.d.ts +0 -1
- package/dist/src/utils/index.d.ts +0 -34
- package/dist/src/utils/kv-flavor.d.ts +0 -7
- package/dist/src/utils/logger.d.ts +0 -21
- package/dist/src/utils/md5.d.ts +0 -1
- package/dist/types/cloudflare.d.ts +0 -61
- package/dist/types/shopify.d.ts +0 -1035
- package/dist/types/swell.d.ts +0 -576
- package/types/index.d.ts +0 -4
- package/types/svg.d.ts +0 -4
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Drop } from 'liquidjs';
|
|
2
|
-
import type { ShopifyCompatibility } from '../shopify';
|
|
3
|
-
import type { ShopifyImage as ShopifyImageType } from 'types/shopify';
|
|
4
|
-
export default class ImagesDrop extends Drop {
|
|
5
|
-
#private;
|
|
6
|
-
constructor(instance: ShopifyCompatibility);
|
|
7
|
-
liquidMethodMissing(key: unknown): unknown;
|
|
8
|
-
getImage(name: string): ShopifyImageType;
|
|
9
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Drop } from 'liquidjs';
|
|
2
|
-
import type { ShopifyCurrency, ShopifyMoney } from 'types/shopify';
|
|
3
|
-
export default class MoneyDrop extends Drop implements ShopifyMoney {
|
|
4
|
-
value: number;
|
|
5
|
-
decimals: number;
|
|
6
|
-
currency: ShopifyCurrency;
|
|
7
|
-
constructor(value: number, decimals: number, currency: ShopifyCurrency);
|
|
8
|
-
valueOf(): number;
|
|
9
|
-
toFloat(): number;
|
|
10
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Drop } from 'liquidjs';
|
|
2
|
-
import { SwellStorefrontCollection } from '@/resources';
|
|
3
|
-
import { type ShopifyResource } from '../shopify-objects';
|
|
4
|
-
import type { ShopifyCompatibility } from '../shopify';
|
|
5
|
-
import type { ShopifyPageObject } from 'types/shopify';
|
|
6
|
-
declare class PagesDrop extends Drop {
|
|
7
|
-
#private;
|
|
8
|
-
constructor(instance: ShopifyCompatibility);
|
|
9
|
-
liquidMethodMissing(key: unknown): unknown;
|
|
10
|
-
getPage(slug: string): ShopifyResource<ShopifyPageObject>;
|
|
11
|
-
}
|
|
12
|
-
export default class Pages extends SwellStorefrontCollection<ShopifyPageObject> {
|
|
13
|
-
#private;
|
|
14
|
-
constructor(instance: ShopifyCompatibility);
|
|
15
|
-
toLiquid(): PagesDrop;
|
|
16
|
-
}
|
|
17
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Drop } from 'liquidjs';
|
|
2
|
-
import type { ShopifyRule } from 'types/shopify';
|
|
3
|
-
export default class RobotsRule extends Drop implements ShopifyRule {
|
|
4
|
-
directive: string;
|
|
5
|
-
value: string;
|
|
6
|
-
static from(directive: string, value: string): RobotsRule;
|
|
7
|
-
constructor(directive: string, value: string);
|
|
8
|
-
valueOf(): string;
|
|
9
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Drop } from 'liquidjs';
|
|
2
|
-
import type { ShopifyTemplate } from 'types/shopify';
|
|
3
|
-
export default class TemplateDrop extends Drop implements ShopifyTemplate {
|
|
4
|
-
name: ShopifyTemplate['name'];
|
|
5
|
-
directory?: string | undefined;
|
|
6
|
-
suffix?: string | undefined;
|
|
7
|
-
constructor(name: ShopifyTemplate['name'], directory?: string | undefined, suffix?: string | undefined);
|
|
8
|
-
valueOf(): "collection" | "product" | "password" | "cart" | "article" | "blog" | "page" | "404" | "list-collections" | "customers/account" | "customers/activate_account" | "customers/addresses" | "customers/login" | "customers/order" | "customers/register" | "customers/reset_password" | "gift_card" | "index" | "search";
|
|
9
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { ShopifySectionGroup, ShopifySectionSchema, ShopifySettingsData, ShopifySettingsSchema } from 'types/shopify';
|
|
2
|
-
import type { ThemeEditorConfigSchema, ThemePresetSchema, ThemeSectionSchemaData, ThemeSectionGroup, ThemeSettings } from 'types/swell';
|
|
3
|
-
export declare const SHOPIFY_TO_SWELL_SORTING: Record<string, string>;
|
|
4
|
-
export declare function convertShopifySettingsSchema(settingsSchema: ShopifySettingsSchema, locale: string): ThemeEditorConfigSchema;
|
|
5
|
-
export declare function convertShopifySettingsData(settingsData: ShopifySettingsData): ThemeSettings;
|
|
6
|
-
export declare function convertShopifySettingsPresets(settingsData: ShopifySettingsData): ThemePresetSchema[];
|
|
7
|
-
export declare function convertShopifySectionSchema(sectionSchema: ShopifySectionSchema, locale?: string): ThemeSectionSchemaData;
|
|
8
|
-
export declare function convertShopifySectionGroup(sectionGroup: ShopifySectionGroup, locale?: string): ThemeSectionGroup;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function shopifyFontToThemeFront(shopifyFontSetting: string | null): string | null;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { StorefrontResource } from '@/resources';
|
|
2
|
-
import { ShopifyResource } from './resource';
|
|
3
|
-
import type { ShopifyCompatibility } from '../shopify';
|
|
4
|
-
import type { SwellRecord } from 'types/swell';
|
|
5
|
-
import type { ShopifyAddress, ShopifyCountry } from 'types/shopify';
|
|
6
|
-
export default function ShopifyAddress(instance: ShopifyCompatibility, address: StorefrontResource | SwellRecord, account?: StorefrontResource | SwellRecord): ShopifyResource<ShopifyAddress>;
|
|
7
|
-
export declare function ShopifyCountry(_instance: ShopifyCompatibility, countryCode: string): ShopifyResource<ShopifyCountry>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { StorefrontResource } from '@/resources';
|
|
2
|
-
import { ShopifyResource } from './resource';
|
|
3
|
-
import type { ShopifyCompatibility } from '../shopify';
|
|
4
|
-
import type { SwellRecord } from 'types/swell';
|
|
5
|
-
import type { ShopifyArticle } from 'types/shopify';
|
|
6
|
-
export default function ShopifyArticle(instance: ShopifyCompatibility, blog: StorefrontResource | SwellRecord, blogCategory?: StorefrontResource | SwellRecord): ShopifyResource<ShopifyArticle>;
|
|
7
|
-
export declare function isLikeShopifyArticle(value: unknown): value is ShopifyArticle;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { StorefrontResource } from '@/resources';
|
|
2
|
-
import { ShopifyResource } from './resource';
|
|
3
|
-
import type { ShopifyCompatibility } from '../shopify';
|
|
4
|
-
import type { SwellRecord } from 'types/swell';
|
|
5
|
-
import type { ShopifyBlog } from 'types/shopify';
|
|
6
|
-
export default function ShopifyBlog(instance: ShopifyCompatibility, blogCategory: StorefrontResource | SwellRecord): ShopifyResource<ShopifyBlog>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { StorefrontResource } from '@/resources';
|
|
2
|
-
import { ShopifyResource } from './resource';
|
|
3
|
-
import type { ShopifyCompatibility } from '../shopify';
|
|
4
|
-
import type { SwellRecord } from 'types/swell';
|
|
5
|
-
import type { ShopifyCart } from 'types/shopify';
|
|
6
|
-
export default function ShopifyCart(instance: ShopifyCompatibility, cart: StorefrontResource | SwellRecord): ShopifyResource<ShopifyCart>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { StorefrontResource } from '@/resources';
|
|
2
|
-
import { ShopifyResource } from './resource';
|
|
3
|
-
import type { ShopifyCompatibility } from '../shopify';
|
|
4
|
-
import type { SwellCollection, SwellData, SwellRecord } from 'types/swell';
|
|
5
|
-
import type { ShopifyCollection } from 'types/shopify';
|
|
6
|
-
export default function ShopifyCollection(instance: ShopifyCompatibility, category: StorefrontResource | SwellRecord): ShopifyResource<ShopifyCollection>;
|
|
7
|
-
export declare function makeProductsCollectionResolve<T extends SwellData>(instance: ShopifyCompatibility, object: StorefrontResource | SwellRecord, mapper: (product: SwellData) => T): () => Promise<SwellCollection<T> | null | undefined>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { SwellStorefrontCollection } from '@/resources';
|
|
2
|
-
import type { ShopifyResource } from './resource';
|
|
3
|
-
import type { ShopifyCompatibility } from '../shopify';
|
|
4
|
-
import type { ShopifyCollection as ShopifyCollectionType } from 'types/shopify';
|
|
5
|
-
import type { SwellRecord } from 'types/swell';
|
|
6
|
-
export default function ShopifyCollections<T extends SwellRecord = SwellRecord>(instance: ShopifyCompatibility, categories: SwellStorefrontCollection<T>): SwellStorefrontCollection<ShopifyResource<ShopifyCollectionType>>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Drop } from 'liquidjs';
|
|
2
|
-
import type { SwellRecord } from 'types/swell';
|
|
3
|
-
import { StorefrontResource } from '@/resources';
|
|
4
|
-
export declare class ShopifySwellContent extends Drop {
|
|
5
|
-
content: Record<string, string>;
|
|
6
|
-
description: string;
|
|
7
|
-
constructor(product?: StorefrontResource | SwellRecord);
|
|
8
|
-
toString(): string;
|
|
9
|
-
toObject(): Record<string, string>;
|
|
10
|
-
toJSON(): Record<string, string>;
|
|
11
|
-
toLiquid(): Record<string, string>;
|
|
12
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { ShopifyCompatibility } from '../shopify';
|
|
2
|
-
import type { ShopifyCurrency } from 'types/shopify';
|
|
3
|
-
import type { SwellCurrency } from 'types/swell';
|
|
4
|
-
export default function ShopifyCurrency(instance: ShopifyCompatibility, currencyCode: string): ShopifyCurrency;
|
|
5
|
-
export declare function getSwellCurrency(instance: ShopifyCompatibility, currencyCode: string): SwellCurrency;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { StorefrontResource } from '@/resources';
|
|
2
|
-
import { ShopifyResource } from './resource';
|
|
3
|
-
import type { ShopifyCompatibility } from '../shopify';
|
|
4
|
-
import type { SwellRecord } from 'types/swell';
|
|
5
|
-
import type { ShopifyCustomer } from 'types/shopify';
|
|
6
|
-
export default function ShopifyCustomer(instance: ShopifyCompatibility, account: StorefrontResource | SwellRecord): ShopifyResource<ShopifyCustomer>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ShopifyResource } from './resource';
|
|
2
|
-
import type { ShopifyCompatibility } from '../shopify';
|
|
3
|
-
import type { SwellProductFilter, SwellProductFilterOption } from 'types/swell';
|
|
4
|
-
import type { ShopifyFilter, ShopifyFilterValue } from 'types/shopify';
|
|
5
|
-
export default function ShopifyFilter(instance: ShopifyCompatibility, filter: SwellProductFilter): ShopifyResource<ShopifyFilter>;
|
|
6
|
-
export declare function ShopifyFilterValue(instance: ShopifyCompatibility, filterOption: SwellProductFilterOption, filter: SwellProductFilter, paramSuffix?: string): ShopifyResource<ShopifyFilterValue>;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { ShopifyResource } from './resource';
|
|
2
|
-
import type { ThemeFont } from '@/liquid/font';
|
|
3
|
-
import type { ShopifyCompatibility } from '../shopify';
|
|
4
|
-
import type { ShopifyFont } from 'types/shopify';
|
|
5
|
-
export default function ShopifyFont(_instance: ShopifyCompatibility, font: ThemeFont): ShopifyResource<ShopifyFont>;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { ShopifyResource } from './resource';
|
|
2
|
-
import type { ThemeForm } from '@/liquid/form';
|
|
3
|
-
import type { ShopifyCompatibility } from '../shopify';
|
|
4
|
-
import type { ShopifyFormObject } from 'types/shopify';
|
|
5
|
-
export default function ShopifyForm(_instance: ShopifyCompatibility, form: ThemeForm): ShopifyResource<ShopifyFormObject>;
|
|
6
|
-
export declare class ShopifyFormError {
|
|
7
|
-
code: string;
|
|
8
|
-
message: string;
|
|
9
|
-
field_name: string;
|
|
10
|
-
field_label: string;
|
|
11
|
-
type: string;
|
|
12
|
-
constructor(error: any);
|
|
13
|
-
getShopifyErrorType(error: any): "email" | "password" | "form";
|
|
14
|
-
valueOf(): string;
|
|
15
|
-
toString(): string;
|
|
16
|
-
}
|
|
17
|
-
export declare class ShopifyFormErrors {
|
|
18
|
-
private errors;
|
|
19
|
-
private pointer;
|
|
20
|
-
messages: ShopifyFormErrorArrayByType;
|
|
21
|
-
translated_fields: ShopifyFormErrorArrayByType;
|
|
22
|
-
constructor(errors: any);
|
|
23
|
-
[Symbol.iterator](): Generator<any, void, unknown>;
|
|
24
|
-
some(callbackFn: any, thisArg?: any): boolean;
|
|
25
|
-
}
|
|
26
|
-
export declare class ShopifyFormErrorArrayByType {
|
|
27
|
-
values: any[];
|
|
28
|
-
constructor(errors: any, values: any);
|
|
29
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { StorefrontResource } from '@/resources';
|
|
2
|
-
import type { SwellData, SwellRecord } from 'types/swell';
|
|
3
|
-
import type { ShopifyImage } from 'types/shopify';
|
|
4
|
-
interface ShopifyImageOptions {
|
|
5
|
-
media_type?: 'image';
|
|
6
|
-
position?: number;
|
|
7
|
-
product_id?: number;
|
|
8
|
-
}
|
|
9
|
-
export default function ShopifyImage(image: SwellData, options?: ShopifyImageOptions, product?: StorefrontResource | SwellRecord, variant?: StorefrontResource | SwellRecord): ShopifyImage;
|
|
10
|
-
export {};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { ShopifyCompatibility } from '@/compatibility/shopify';
|
|
2
|
-
import type { ThemeFont } from '@/liquid/font';
|
|
3
|
-
import type { ThemeForm } from '@/liquid/form';
|
|
4
|
-
import ShopifyArticle from './article';
|
|
5
|
-
import ShopifyBlog from './blog';
|
|
6
|
-
import ShopifyCart from './cart';
|
|
7
|
-
import ShopifyCollection from './collection';
|
|
8
|
-
import ShopifyCollections from './collections';
|
|
9
|
-
import ShopifyCustomer from './customer';
|
|
10
|
-
import ShopifyFont from './font';
|
|
11
|
-
import ShopifyForm from './form';
|
|
12
|
-
import ShopifyLink from './link';
|
|
13
|
-
import ShopifyLocalization from './localization';
|
|
14
|
-
import ShopifyOrder from './order';
|
|
15
|
-
import ShopifyPaginate from './paginate';
|
|
16
|
-
import ShopifyPredictiveSearch from './predictive_search';
|
|
17
|
-
import ShopifyProduct from './product';
|
|
18
|
-
import ShopifyRecommendations from './recommendations';
|
|
19
|
-
import ShopifyPage from './page';
|
|
20
|
-
import { DeferredShopifyResource, ShopifyResource } from './resource';
|
|
21
|
-
import ShopifySearch from './search';
|
|
22
|
-
import ShopifyVariant from './variant';
|
|
23
|
-
import type { SwellMenu, SwellData } from '../../../types/swell';
|
|
24
|
-
export { DeferredShopifyResource, ShopifyResource, ShopifyArticle, ShopifyBlog, ShopifyCart, ShopifyCollection, ShopifyCollections, ShopifyCustomer, ShopifyFont, ShopifyForm, ShopifyOrder, ShopifyPaginate, ShopifyPredictiveSearch, ShopifyProduct, ShopifyRecommendations, ShopifyPage, ShopifyLink, ShopifyLocalization, ShopifySearch, ShopifyVariant, };
|
|
25
|
-
export declare function adaptShopifyMenuData(instance: ShopifyCompatibility, menu: SwellMenu): SwellData;
|
|
26
|
-
export declare function adaptShopifyFontData(instance: ShopifyCompatibility, font: ThemeFont): SwellData;
|
|
27
|
-
export declare function adaptShopifyFormData(instance: ShopifyCompatibility, form: ThemeForm): SwellData;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { StorefrontResource } from '@/resources';
|
|
2
|
-
import { ShopifyResource } from './resource';
|
|
3
|
-
import type { ShopifyCompatibility } from '../shopify';
|
|
4
|
-
import type { SwellData, SwellRecord } from 'types/swell';
|
|
5
|
-
import type { ShopifyLineItem } from 'types/shopify';
|
|
6
|
-
export default function ShopifyLineItem(instance: ShopifyCompatibility, item: StorefrontResource | SwellRecord, cart: StorefrontResource | SwellRecord, options?: SwellData): ShopifyResource<ShopifyLineItem>;
|
|
7
|
-
export declare function countItemQuantity(items: SwellData[], quantityField?: string): number;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { ShopifyResource } from './resource';
|
|
2
|
-
import type { ShopifyCompatibility } from '../shopify';
|
|
3
|
-
import type { SwellMenu, SwellMenuItem } from 'types/swell';
|
|
4
|
-
import type { ShopifyLink } from 'types/shopify';
|
|
5
|
-
export default function ShopifyLink(instance: ShopifyCompatibility, parent: SwellMenu | SwellMenuItem, menuItem: SwellMenuItem): ShopifyResource<ShopifyLink>;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { SwellData } from 'types/swell';
|
|
2
|
-
import type { ShopifyCompatibility } from '../shopify';
|
|
3
|
-
import type { ShopifyCountry, ShopifyLocalization } from 'types/shopify';
|
|
4
|
-
export default function ShopifyLocalization(instance: ShopifyCompatibility, store: SwellData, request: SwellData): ShopifyLocalization;
|
|
5
|
-
export declare function isLikeShopifyCountry(value: unknown): value is ShopifyCountry;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ShopifyResource } from './resource';
|
|
2
|
-
import type { SwellData } from 'types/swell';
|
|
3
|
-
import type { ShopifyMedia } from 'types/shopify';
|
|
4
|
-
interface ShopifyMediaOptions {
|
|
5
|
-
media_type?: ShopifyMedia['media_type'];
|
|
6
|
-
position?: ShopifyMedia['position'];
|
|
7
|
-
}
|
|
8
|
-
export default function ShopifyMedia(image: SwellData, options?: ShopifyMediaOptions): ShopifyResource<ShopifyMedia>;
|
|
9
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { StorefrontResource } from '@/resources';
|
|
2
|
-
import { ShopifyResource } from './resource';
|
|
3
|
-
import type { ShopifyCompatibility } from '../shopify';
|
|
4
|
-
import type { SwellData, SwellRecord } from 'types/swell';
|
|
5
|
-
import type { ShopifyOrder } from 'types/shopify';
|
|
6
|
-
export default function ShopifyOrder(instance: ShopifyCompatibility, order: StorefrontResource | SwellRecord, account?: StorefrontResource | SwellRecord): ShopifyResource<ShopifyOrder>;
|
|
7
|
-
export declare function shopifyFinancialStatus(order: SwellData): "unpaid" | "paid" | "authorized" | "partially_paid" | "partially_refunded" | "refunded";
|
|
8
|
-
export declare function shopifyFulfillmentStatus(order: SwellData): "complete" | "fulfilled" | "partial" | "restocked" | "unfulfilled";
|
|
9
|
-
export declare function shopifyFinancialStatusLabel(order: SwellData): string;
|
|
10
|
-
export declare function shopifyFulfillmentStatusLabel(order: SwellData): string;
|
|
11
|
-
export declare function refundDue(order: SwellData): any;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { ShopifyResource } from './resource';
|
|
2
|
-
import type { ShopifyCompatibility } from '../shopify';
|
|
3
|
-
import type { SwellData } from 'types/swell';
|
|
4
|
-
import type { ShopifyPageObject } from 'types/shopify';
|
|
5
|
-
export default function ShopifyPage(_instance: ShopifyCompatibility, page: SwellData): ShopifyResource<ShopifyPageObject>;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { ShopifyResource } from './resource';
|
|
2
|
-
import type { SwellStorefrontPagination } from '@/resources';
|
|
3
|
-
import type { ShopifyCompatibility } from '../shopify';
|
|
4
|
-
import type { ShopifyPaginate } from 'types/shopify';
|
|
5
|
-
export default function ShopifyPaginate(instance: ShopifyCompatibility, pagination: SwellStorefrontPagination): ShopifyResource<ShopifyPaginate>;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { ShopifyResource } from './resource';
|
|
2
|
-
import { StorefrontResource } from '@/resources';
|
|
3
|
-
import type { ShopifyCompatibility } from '../shopify';
|
|
4
|
-
import type { ShopifyPredictiveSearch } from 'types/shopify';
|
|
5
|
-
export default function ShopifyPredictiveSearch(instance: ShopifyCompatibility, search: StorefrontResource): ShopifyResource<ShopifyPredictiveSearch>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { StorefrontResource } from '@/resources';
|
|
2
|
-
import { ShopifyResource } from './resource';
|
|
3
|
-
import type { ShopifyCompatibility } from '../shopify';
|
|
4
|
-
import type { SwellRecord } from 'types/swell';
|
|
5
|
-
import type { ShopifyProduct, ShopifyProductOptionValue } from 'types/shopify';
|
|
6
|
-
export default function ShopifyProduct(instance: ShopifyCompatibility, product: StorefrontResource | SwellRecord): ShopifyResource<ShopifyProduct>;
|
|
7
|
-
export default function ShopifyProduct(instance: ShopifyCompatibility, product: StorefrontResource | SwellRecord, depth: number): ShopifyResource<ShopifyProduct> | null;
|
|
8
|
-
export declare function ShopifyProductOptionValue(values: ShopifyProductOptionValue): ShopifyResource<ShopifyProductOptionValue>;
|
|
9
|
-
export declare function isLikeShopifyProduct(value: unknown): value is ShopifyProduct;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { ShopifyResource } from './resource';
|
|
2
|
-
import type { ShopifyCompatibility } from '../shopify';
|
|
3
|
-
import type { SwellData } from 'types/swell';
|
|
4
|
-
import type { ShopifyRecommendations } from 'types/shopify';
|
|
5
|
-
export default function ShopifyRecommendations(instance: ShopifyCompatibility, product: SwellData): ShopifyResource<ShopifyRecommendations>;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { SwellData } from 'types/swell';
|
|
2
|
-
type DeferShopifyResource<T extends object> = {
|
|
3
|
-
[K in keyof T]: NonNullable<T[K]> extends Array<infer U> ? U extends object ? U[] | ShopifyResource<U>[] | DeferredShopifyResource<U[] | ShopifyResource<U>[]> : U[] | DeferredShopifyResource<U[]> : NonNullable<T[K]> extends object ? T[K] | ShopifyResource<NonNullable<T[K]>> | DeferredShopifyResource<T[K] | ShopifyResource<NonNullable<T[K]>>> : T[K] | DeferredShopifyResource<T[K]>;
|
|
4
|
-
};
|
|
5
|
-
export declare class ShopifyResource<T extends object> {
|
|
6
|
-
props: DeferShopifyResource<T>;
|
|
7
|
-
stringProp?: keyof T;
|
|
8
|
-
linkProps?: string[];
|
|
9
|
-
constructor(props: DeferShopifyResource<T>, stringProp?: keyof T, linkProps?: string[]);
|
|
10
|
-
valueOf(): this | DeferShopifyResource<T>[keyof T];
|
|
11
|
-
clone(): ShopifyResource<T>;
|
|
12
|
-
}
|
|
13
|
-
type AddProperties<T extends object> = T;
|
|
14
|
-
export interface ShopifyResource<T extends object> extends AddProperties<T> {
|
|
15
|
-
}
|
|
16
|
-
export declare class DeferredShopifyResource<T> {
|
|
17
|
-
private handler;
|
|
18
|
-
private result;
|
|
19
|
-
constructor(handler: () => Promise<T> | T);
|
|
20
|
-
resolve(): Promise<T | undefined>;
|
|
21
|
-
}
|
|
22
|
-
export declare function defer<T>(handler: () => Promise<T> | T): DeferredShopifyResource<T>;
|
|
23
|
-
export declare function isResolvable(asyncProp: unknown): boolean;
|
|
24
|
-
export declare function resolveAsyncProp<R extends SwellData>(asyncProp: unknown): Promise<R | R[] | null | undefined>;
|
|
25
|
-
export declare function handleDeferredProp<T, R extends SwellData>(asyncProp: unknown, handler: (...value: R[]) => T): Promise<T>;
|
|
26
|
-
export declare function deferWith<T, R extends SwellData = SwellData>(asyncProp: unknown, handler: (...value: R[]) => T): DeferredShopifyResource<T>;
|
|
27
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { ShopifyResource } from './resource';
|
|
2
|
-
import { StorefrontResource } from '@/resources';
|
|
3
|
-
import type { ShopifyCompatibility } from '../shopify';
|
|
4
|
-
import type { ShopifySearch } from 'types/shopify';
|
|
5
|
-
export default function ShopifySearch(instance: ShopifyCompatibility, search: StorefrontResource): ShopifyResource<ShopifySearch>;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { ShopifyResource } from './resource';
|
|
2
|
-
import { ShopifyCompatibility } from '../shopify';
|
|
3
|
-
import type { SwellData } from 'types/swell';
|
|
4
|
-
import type { ShopifyShop } from 'types/shopify';
|
|
5
|
-
export default function ShopifyShop(instance: ShopifyCompatibility, store: SwellData): ShopifyResource<ShopifyShop>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { StorefrontResource } from '@/resources';
|
|
2
|
-
import { ShopifyResource } from './resource';
|
|
3
|
-
import type { ShopifyCompatibility } from '../shopify';
|
|
4
|
-
import type { SwellRecord } from 'types/swell';
|
|
5
|
-
import type { ShopifyVariant } from 'types/shopify';
|
|
6
|
-
export default function ShopifyVariant(instance: ShopifyCompatibility, variant: StorefrontResource | SwellRecord, productIn?: StorefrontResource | SwellRecord, depth?: number): ShopifyResource<ShopifyVariant>;
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import { Swell } from '@/api';
|
|
2
|
-
import { ThemeFont } from '@/liquid/font';
|
|
3
|
-
import { ThemeForm } from '@/liquid/form';
|
|
4
|
-
import { SwellTheme } from '@/theme';
|
|
5
|
-
import type { ThemeGlobals, ThemeSettings, ThemePresetSchema, ThemeEditorConfigSchema, ThemeSectionSchemaData, ThemeSectionGroup, ThemeLocaleConfig, SwellData, SwellMenu, SwellAppShopifyCompatibilityConfig } from '../../types/swell';
|
|
6
|
-
import type { ShopifySettingsData, ShopifySettingsSchema, ShopifySectionSchema, ShopifySectionGroup, ShopifyPageResourceMap, ShopifyObjectResourceMap, ShopifyFormResourceMap, ShopifyQueryParamsMap } from '../../types/shopify';
|
|
7
|
-
/**
|
|
8
|
-
* This class is meant to be extended by a storefront app to provide compatibility with Shopify's Liquid
|
|
9
|
-
*/
|
|
10
|
-
export declare class ShopifyCompatibility {
|
|
11
|
-
theme: SwellTheme;
|
|
12
|
-
swell: Swell;
|
|
13
|
-
pageId?: string;
|
|
14
|
-
pageResourceMap: ShopifyPageResourceMap;
|
|
15
|
-
objectResourceMap: ShopifyObjectResourceMap;
|
|
16
|
-
formResourceMap: ShopifyFormResourceMap;
|
|
17
|
-
queryParamsMap: ShopifyQueryParamsMap;
|
|
18
|
-
shopifyCompatibilityConfig?: SwellAppShopifyCompatibilityConfig;
|
|
19
|
-
editorLocaleConfig?: Record<string, ThemeLocaleConfig | undefined>;
|
|
20
|
-
constructor(theme: SwellTheme);
|
|
21
|
-
initGlobals(globals: ThemeGlobals): void;
|
|
22
|
-
adaptGlobals(globals: Partial<ThemeGlobals>, prevGlobals: ThemeGlobals): void;
|
|
23
|
-
/**
|
|
24
|
-
* Extracts values from the form according to the passed settings config
|
|
25
|
-
*
|
|
26
|
-
* @input
|
|
27
|
-
* ```js
|
|
28
|
-
* form = {
|
|
29
|
-
* field1: { value: 'value1' },
|
|
30
|
-
* field2: { value: 'value2' },
|
|
31
|
-
* field3: { value: null },
|
|
32
|
-
* extra: { value: 'value3' },
|
|
33
|
-
* }
|
|
34
|
-
* config = {
|
|
35
|
-
* current: {
|
|
36
|
-
* field1: 'old1',
|
|
37
|
-
* field2: 'old2',
|
|
38
|
-
* field3: 'old3',
|
|
39
|
-
* field4: 'old4',
|
|
40
|
-
* },
|
|
41
|
-
* presets: {},
|
|
42
|
-
* }
|
|
43
|
-
* ```
|
|
44
|
-
*
|
|
45
|
-
* @output
|
|
46
|
-
* ```js
|
|
47
|
-
* return {
|
|
48
|
-
* current: {
|
|
49
|
-
* field1: 'value1',
|
|
50
|
-
* field2: 'value2',
|
|
51
|
-
* field3: 'old3',
|
|
52
|
-
* field4: 'old4',
|
|
53
|
-
* },
|
|
54
|
-
* presets: {},
|
|
55
|
-
* }
|
|
56
|
-
* ```
|
|
57
|
-
*/
|
|
58
|
-
adaptSettings(form: Record<string, {
|
|
59
|
-
value: unknown;
|
|
60
|
-
} | undefined>, config: ShopifySettingsData): {
|
|
61
|
-
current: ThemeSettings;
|
|
62
|
-
presets: Record<string, import("../../types/shopify").ShopifySettingsDataPreset>;
|
|
63
|
-
platform_customizations: {
|
|
64
|
-
custom_css: any[];
|
|
65
|
-
};
|
|
66
|
-
} | {
|
|
67
|
-
current: string;
|
|
68
|
-
presets: {
|
|
69
|
-
[x: string]: ThemeSettings | import("../../types/shopify").ShopifySettingsDataPreset;
|
|
70
|
-
};
|
|
71
|
-
platform_customizations: {
|
|
72
|
-
custom_css: any[];
|
|
73
|
-
};
|
|
74
|
-
};
|
|
75
|
-
adaptPageData(pageData: SwellData): void;
|
|
76
|
-
adaptObjectData(objectData: SwellData): void;
|
|
77
|
-
adaptQueryParams(): void;
|
|
78
|
-
getAdaptedFormType(shopifyType: string): string | undefined;
|
|
79
|
-
getAdaptedFormClientParams(formType: string, scope: SwellData, arg?: any): Promise<SwellData | undefined>;
|
|
80
|
-
getAdaptedFormClientHtml(formType: string, scope: SwellData, arg?: any): Promise<string | undefined>;
|
|
81
|
-
getAdaptedFormServerParams(formType: string, context: SwellData): Promise<SwellData | undefined>;
|
|
82
|
-
getAdaptedFormServerResponse(formType: string, context: SwellData): Promise<SwellData | undefined>;
|
|
83
|
-
getShopData(store: SwellData): {};
|
|
84
|
-
getContentForHeader(): string;
|
|
85
|
-
getMenuData(menu: SwellMenu): SwellData;
|
|
86
|
-
getFontData(font: ThemeFont): SwellData;
|
|
87
|
-
getFormData(form: ThemeForm): SwellData;
|
|
88
|
-
getFontFromShopifySetting(fontSetting: string): string | null;
|
|
89
|
-
getThemeConfig(settingsData: ShopifySettingsData): ThemeSettings;
|
|
90
|
-
getPresetsConfig(settingsData: ShopifySettingsData): ThemePresetSchema[];
|
|
91
|
-
getEditorConfig(settingsSchema: ShopifySettingsSchema): ThemeEditorConfigSchema;
|
|
92
|
-
getSectionConfigSchema(sectionSchema: ShopifySectionSchema): ThemeSectionSchemaData;
|
|
93
|
-
getSectionGroup(sectionGroup: ShopifySectionGroup): ThemeSectionGroup;
|
|
94
|
-
getEditorLocaleConfig(theme: SwellTheme, localeCode: string): Promise<ThemeLocaleConfig>;
|
|
95
|
-
renderSchemaTranslations<T>(theme: SwellTheme, schema: T, localeCode?: string): Promise<T>;
|
|
96
|
-
renderSchemaTranslationValue<T>(theme: SwellTheme, schemaValue: T, localeCode: string, localeConfigs: Record<string, ThemeLocaleConfig>): T;
|
|
97
|
-
getPageType(pageId: string): string;
|
|
98
|
-
getPageRouteUrl(pageId: string): string;
|
|
99
|
-
getPageRoutes(): {
|
|
100
|
-
account_addresses_url: string;
|
|
101
|
-
account_login_url: string;
|
|
102
|
-
account_logout_url: string;
|
|
103
|
-
account_recover_url: string;
|
|
104
|
-
account_register_url: string;
|
|
105
|
-
account_url: string;
|
|
106
|
-
all_products_collection_url: string;
|
|
107
|
-
cart_add_url: string;
|
|
108
|
-
cart_change_url: string;
|
|
109
|
-
cart_clear_url: string;
|
|
110
|
-
cart_update_url: string;
|
|
111
|
-
cart_url: string;
|
|
112
|
-
collections_url: string;
|
|
113
|
-
predictive_search_url: string;
|
|
114
|
-
product_recommendations_url: string;
|
|
115
|
-
root_url: string;
|
|
116
|
-
search_url: string;
|
|
117
|
-
};
|
|
118
|
-
getLocalizationObject(store: SwellData, request: SwellData): import("../../types/shopify").ShopifyLocalization;
|
|
119
|
-
getAdaptedPageUrl(url: string): string | undefined;
|
|
120
|
-
getThemeFilePath(type: string, name: string): string;
|
|
121
|
-
getPageResourceMap(): ShopifyPageResourceMap;
|
|
122
|
-
getObjectResourceMap(): ShopifyObjectResourceMap;
|
|
123
|
-
getFormResourceMap(): ShopifyFormResourceMap;
|
|
124
|
-
getQueryParamsMap(): ShopifyQueryParamsMap;
|
|
125
|
-
getCompatibilityFeatures(): Record<string, boolean> | undefined;
|
|
126
|
-
supportsSwellPrices(): boolean;
|
|
127
|
-
supportsSwellVariants(): boolean;
|
|
128
|
-
toShopifyPrice<T>(amount: T): number | T;
|
|
129
|
-
fromShopifyPrice(amount: number): number;
|
|
130
|
-
isScriptFormActionUrl(url: string): boolean;
|
|
131
|
-
isScriptUrl(url: string): boolean;
|
|
132
|
-
needRedirectToPageStart(formId: string): boolean;
|
|
133
|
-
isCheckoutForm(formId: string): boolean;
|
|
134
|
-
}
|