@swishapp/sdk 0.60.0-beta.1 → 0.60.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.
@@ -0,0 +1,9 @@
1
+ export type * from "@swishapp/api-client";
2
+ export type * from "./ajax-api/ajax-api-client";
3
+ export type { EventName } from "./events/event-bus";
4
+ export type * from "./storefront-api/storefront-api-client";
5
+ export type * from "./intents/types";
6
+ export { SwishApp } from "./swish";
7
+ export type { Ref, SwishUiElement } from "./swish-ui/swish-ui-element";
8
+ export type { Toast, ToastManager, UnsaveAlertSubmitData, ListSelectSubmitData, VariantSelectSubmitData, UnsaveAlertOptions, ListSelectOptions, VariantSelectOptions, QuickBuySubmitData, QuickBuyOptions, } from "./swish-ui/swish-ui-utils";
9
+ export type { ShopBridge } from "./utils/shop-bridge";
@@ -1,10 +1,10 @@
1
1
  import { SwishApp } from "../swish";
2
- import { IntentOptionsWithDefaults } from "./intents";
2
+ import { IntentOptions } from "./intents";
3
3
  import { Intent, IntentEventBus, IntentResponse } from "./types";
4
4
  export declare abstract class IntentHandler<T extends Intent = Intent> {
5
5
  protected readonly swish: SwishApp;
6
6
  protected readonly eventBus: IntentEventBus;
7
- protected readonly options: IntentOptionsWithDefaults;
8
- constructor(swish: SwishApp, eventBus: IntentEventBus, options: IntentOptionsWithDefaults);
7
+ protected readonly options: IntentOptions;
8
+ constructor(swish: SwishApp, eventBus: IntentEventBus, options: IntentOptions);
9
9
  abstract invoke(intent: T): Promise<IntentResponse<T>>;
10
10
  }
@@ -1,9 +1,9 @@
1
- import type { SwishApp } from "../swish";
2
- import type { IntentOptionsWithDefaults } from "./intents";
3
- import type { Intent, IntentResponse } from "./types";
1
+ import { SwishApp } from "../swish";
2
+ import { IntentOptions } from "./intents";
3
+ import { Intent, IntentResponse } from "./types";
4
4
  export declare abstract class IntentHook<T extends Intent = Intent> {
5
5
  protected readonly swish: SwishApp;
6
- protected readonly options: IntentOptionsWithDefaults;
7
- constructor(swish: SwishApp, options: IntentOptionsWithDefaults);
6
+ protected readonly options: IntentOptions;
7
+ constructor(swish: SwishApp, options: IntentOptions);
8
8
  abstract invoke(respomse: IntentResponse<T>): Promise<void>;
9
9
  }
@@ -1,29 +1,16 @@
1
1
  import { SwishApp } from "../swish";
2
2
  import { Intent, IntentActivity, IntentQuery, IntentQueryWithParams, IntentResponse } from "./types";
3
3
  export interface IntentOptions {
4
- save?: {
5
- requireVariant?: boolean;
6
- showToast?: boolean;
7
- };
8
- edit?: {
9
- showToast?: boolean;
10
- };
11
- unsave?: {
12
- requireConfirmation?: boolean;
13
- openEditor?: boolean;
14
- showToast?: boolean;
15
- };
4
+ allowSaveWithoutVariant?: boolean;
5
+ deleteSavedItemsWithoutEdit?: boolean;
6
+ showToastAfterSave?: boolean;
7
+ showToastAfterDelete?: boolean;
16
8
  }
17
- export type IntentOptionsWithDefaults = {
18
- save: Required<NonNullable<IntentOptions["save"]>>;
19
- edit: Required<NonNullable<IntentOptions["edit"]>>;
20
- unsave: Required<NonNullable<IntentOptions["unsave"]>>;
21
- };
22
9
  export declare class Intents {
23
10
  private readonly swish;
24
11
  private readonly eventBus;
25
12
  private readonly options;
26
- constructor(swish: SwishApp, options?: IntentOptions);
13
+ constructor(swish: SwishApp, options: IntentOptions);
27
14
  publishAnalyticsEvent(event: string, data: Record<string, any>): void;
28
15
  invoke<T extends Intent>(intent: T): Promise<IntentActivity<T>>;
29
16
  listen(intent: Pick<Intent, "action" | "type">, callback: (response: IntentResponse) => void): () => void;
@@ -2,4 +2,3 @@ export { signal, effect, computed } from "@preact/signals-core";
2
2
  export * from "./item-context-signal";
3
3
  export * from "./item-state-signal";
4
4
  export * from "./item-count-signal";
5
- export * from "./swish-query-signals";
@@ -1,6 +1,6 @@
1
1
  import { StorefrontApiClient, StorefrontApiResponse } from "./storefront-api-client";
2
2
  import type { GetProductCardDataQuery, GetProductCardDataWithVariantQuery } from "./types/storefront.generated";
3
- import type { CountryCode, HasMetafieldsIdentifier, LanguageCode } from "./types/storefront.types";
3
+ import type { HasMetafieldsIdentifier } from "./types/storefront.types";
4
4
  export type LoadProductCardDataResponse = StorefrontApiResponse<GetProductCardDataQuery | GetProductCardDataWithVariantQuery>;
5
5
  export type { GetProductCardDataQueryVariables } from "./types/storefront.generated";
6
6
  export interface LoadProductCardDataArgs {
@@ -8,10 +8,8 @@ export interface LoadProductCardDataArgs {
8
8
  variantId?: string;
9
9
  productMetafields?: HasMetafieldsIdentifier[];
10
10
  variantMetafields?: HasMetafieldsIdentifier[];
11
- country: CountryCode;
12
- language: LanguageCode;
13
11
  }
14
- export declare const loadProductCardData: (client: StorefrontApiClient, { productId, variantId, productMetafields, variantMetafields, country, language, }: LoadProductCardDataArgs) => Promise<{
12
+ export declare const loadProductCardData: (client: StorefrontApiClient, { productId, variantId, productMetafields, variantMetafields, }: LoadProductCardDataArgs) => Promise<{
15
13
  data: GetProductCardDataQuery | GetProductCardDataWithVariantQuery | undefined;
16
14
  errors: import("@shopify/graphql-client").ResponseErrors | null;
17
15
  }>;
@@ -1,6 +1,6 @@
1
1
  import { StorefrontApiClient, StorefrontApiResponse } from "./storefront-api-client";
2
2
  import type { GetProductDetailDataQuery, GetProductDetailDataWithVariantQuery } from "./types/storefront.generated";
3
- import type { CountryCode, HasMetafieldsIdentifier, LanguageCode } from "./types/storefront.types";
3
+ import type { HasMetafieldsIdentifier } from "./types/storefront.types";
4
4
  export type LoadProductDetailDataResponse = StorefrontApiResponse<GetProductDetailDataQuery | GetProductDetailDataWithVariantQuery>;
5
5
  export type { GetProductDetailDataQueryVariables } from "./types/storefront.generated";
6
6
  export interface LoadProductDetailDataArgs {
@@ -8,10 +8,8 @@ export interface LoadProductDetailDataArgs {
8
8
  variantId?: string;
9
9
  productMetafields?: HasMetafieldsIdentifier[];
10
10
  variantMetafields?: HasMetafieldsIdentifier[];
11
- country: CountryCode;
12
- language: LanguageCode;
13
11
  }
14
- export declare const loadProductDetailData: (client: StorefrontApiClient, { productId, variantId, productMetafields, variantMetafields, country, language, }: LoadProductDetailDataArgs) => Promise<{
12
+ export declare const loadProductDetailData: (client: StorefrontApiClient, { productId, variantId, productMetafields, variantMetafields, }: LoadProductDetailDataArgs) => Promise<{
15
13
  data: GetProductDetailDataQuery | GetProductDetailDataWithVariantQuery | undefined;
16
14
  errors: import("@shopify/graphql-client").ResponseErrors | null;
17
15
  }>;
@@ -1,5 +1,4 @@
1
1
  import { StorefrontApiClient, StorefrontApiResponse } from "./storefront-api-client";
2
- import type { CountryCode, LanguageCode } from "./types/storefront.types";
3
2
  export type LoadProductImagesResponse = StorefrontApiResponse<{
4
3
  id: string;
5
4
  altText: string;
@@ -11,10 +10,8 @@ export interface LoadProductImagesArgs {
11
10
  productId: number;
12
11
  variantId?: number | null;
13
12
  }[];
14
- country: CountryCode;
15
- language: LanguageCode;
16
13
  }
17
- export declare const loadProductImages: (client: StorefrontApiClient, { items, country, language }: LoadProductImagesArgs) => Promise<{
14
+ export declare const loadProductImages: (client: StorefrontApiClient, { items }: LoadProductImagesArgs) => Promise<{
18
15
  data: (Pick<import("./types/storefront.types").Image, "id" | "altText" | "url" | "thumbhash"> | undefined)[];
19
16
  error: null;
20
17
  } | {
@@ -1,16 +1,13 @@
1
1
  import { StorefrontApiClient, StorefrontApiResponse } from "./storefront-api-client";
2
2
  import type { GetProductOptionsQuery, GetProductOptionsWithVariantQuery } from "./types/storefront.generated";
3
- import type { CountryCode, LanguageCode } from "./types/storefront.types";
4
3
  export type LoadProductOptionsResponse = StorefrontApiResponse<GetProductOptionsQuery | GetProductOptionsWithVariantQuery>;
5
4
  export type { GetProductOptionsQueryVariables } from "./types/storefront.generated";
6
5
  export interface LoadProductOptionsArgs {
7
6
  productId?: string;
8
7
  variantId?: string;
9
8
  productHandle?: string;
10
- country: CountryCode;
11
- language: LanguageCode;
12
9
  }
13
- export declare const loadProductOptions: (client: StorefrontApiClient, { productId, productHandle, variantId, country, language, }: LoadProductOptionsArgs) => Promise<{
10
+ export declare const loadProductOptions: (client: StorefrontApiClient, { productId, productHandle, variantId }: LoadProductOptionsArgs) => Promise<{
14
11
  data: GetProductOptionsQuery | GetProductOptionsWithVariantQuery | undefined;
15
12
  errors: import("@shopify/graphql-client").ResponseErrors | null;
16
13
  }>;
@@ -1,5 +1,5 @@
1
1
  import { StorefrontApiClient, StorefrontApiResponse } from "./storefront-api-client";
2
- import type { CountryCode, HasMetafieldsIdentifier, LanguageCode, Product, ProductRecommendationIntent } from "./types/storefront.types";
2
+ import type { HasMetafieldsIdentifier, Product, ProductRecommendationIntent } from "./types/storefront.types";
3
3
  export type LoadProductRecommendationsResponse = StorefrontApiResponse<{
4
4
  productRecommendations?: Product[] | null;
5
5
  }>;
@@ -8,10 +8,8 @@ export interface LoadProductRecommendationsArgs {
8
8
  productHandle?: string;
9
9
  intent?: ProductRecommendationIntent;
10
10
  productMetafields?: HasMetafieldsIdentifier[];
11
- country: CountryCode;
12
- language: LanguageCode;
13
11
  }
14
- export declare const loadProductRecommendations: (client: StorefrontApiClient, { productId, productHandle, intent, productMetafields, country, language, }: LoadProductRecommendationsArgs) => Promise<{
12
+ export declare const loadProductRecommendations: (client: StorefrontApiClient, { productId, productHandle, intent, productMetafields, }: LoadProductRecommendationsArgs) => Promise<{
15
13
  data: {
16
14
  productRecommendations?: Product[] | null;
17
15
  } | undefined;
@@ -1,13 +1,12 @@
1
1
  import { StorefrontApiClient } from "./storefront-api-client";
2
2
  import type { GetSaveIntentDataQuery, GetSaveIntentDataWithVariantQuery } from "./types/storefront.generated";
3
- import { CountryCode, LanguageCode } from "./types/storefront.types";
4
- export type LoadSaveIntentDataArgs = {
5
- productId: string;
6
- variantId?: string;
7
- country: CountryCode;
8
- language: LanguageCode;
9
- };
10
- export declare const loadSaveIntentData: (client: StorefrontApiClient, { productId, variantId, country, language }: LoadSaveIntentDataArgs) => Promise<{
3
+ import * as v from "valibot";
4
+ export declare const LoadSaveIntentDataSchema: v.ObjectSchema<{
5
+ readonly productId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TransformAction<string, string>]>;
6
+ readonly variantId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TransformAction<string, string>]>, undefined>;
7
+ }, undefined>;
8
+ export type LoadSaveIntentDataArgs = v.InferOutput<typeof LoadSaveIntentDataSchema>;
9
+ export declare const loadSaveIntentData: (client: StorefrontApiClient, args: LoadSaveIntentDataArgs) => Promise<{
11
10
  data: GetSaveIntentDataQuery | GetSaveIntentDataWithVariantQuery | undefined;
12
11
  errors: import("@shopify/graphql-client").ResponseErrors | null;
13
12
  }>;
@@ -1,16 +1,14 @@
1
1
  import { StorefrontApiClient, StorefrontApiResponse } from "./storefront-api-client";
2
+ import type { SelectedOptionInput } from "./types/storefront.types";
2
3
  import type { GetSelectedVariantQuery } from "./types/storefront.generated";
3
- import type { CountryCode, LanguageCode, SelectedOptionInput } from "./types/storefront.types";
4
4
  export type LoadSelectedVariantResponse = StorefrontApiResponse<GetSelectedVariantQuery>;
5
5
  export type { GetSelectedVariantQueryVariables } from "./types/storefront.generated";
6
6
  export interface LoadSelectedVariantArgs {
7
7
  productId?: string;
8
8
  productHandle?: string;
9
9
  selectedOptions: SelectedOptionInput[];
10
- country: CountryCode;
11
- language: LanguageCode;
12
10
  }
13
- export declare const loadSelectedVariant: (client: StorefrontApiClient, { productId, productHandle, selectedOptions, country, language, }: LoadSelectedVariantArgs) => Promise<{
11
+ export declare const loadSelectedVariant: (client: StorefrontApiClient, { productId, productHandle, selectedOptions }: LoadSelectedVariantArgs) => Promise<{
14
12
  data: GetSelectedVariantQuery | undefined;
15
13
  errors: import("@shopify/graphql-client").ResponseErrors | null;
16
14
  }>;
@@ -7,7 +7,6 @@ import { LoadProductOptionsArgs } from "./load-product-options";
7
7
  import { LoadProductRecommendationsArgs } from "./load-product-recommendations";
8
8
  import { LoadSaveIntentDataArgs } from "./load-save-intent-data";
9
9
  import { LoadSelectedVariantArgs } from "./load-selected-variant";
10
- import { StorefrontContext } from "../types";
11
10
  export * from "./load-product-card-data";
12
11
  export * from "./load-product-options";
13
12
  export * from "./load-product-recommendations";
@@ -18,7 +17,7 @@ export interface StorefrontApiResponse<TData> {
18
17
  errors: ResponseErrors;
19
18
  }
20
19
  export declare const API_VERSION = "2025-07";
21
- export interface StorefrontApiOptions {
20
+ export interface StorefrontConfig {
22
21
  storeDomain: string;
23
22
  accessToken: string;
24
23
  }
@@ -26,38 +25,36 @@ export declare class StorefrontApiClient {
26
25
  private client;
27
26
  private readonly shortCache;
28
27
  private readonly longCache;
29
- private readonly options;
30
- private readonly context;
31
- constructor(options: StorefrontApiOptions, context: StorefrontContext);
28
+ constructor(config: StorefrontConfig);
32
29
  fetch(input: string | URL | Request, init?: RequestInit): Promise<Response>;
33
30
  query: <TData, TVariables extends Record<string, unknown>>(query: string, variables: TVariables) => Promise<{
34
31
  data: (TData extends undefined ? any : TData) | undefined;
35
32
  errors: ResponseErrors | null;
36
33
  }>;
37
- loadProductOptions: (args: Omit<LoadProductOptionsArgs, "country" | "language">) => Promise<{
34
+ loadProductOptions: (args: LoadProductOptionsArgs) => Promise<{
38
35
  data: import("./storefront-api-client").GetProductOptionsQuery | import("./storefront-api-client").GetProductOptionsWithVariantQuery | undefined;
39
36
  errors: ResponseErrors | null;
40
37
  }>;
41
- loadSelectedVariant: (args: Omit<LoadSelectedVariantArgs, "country" | "language">) => Promise<{
38
+ loadSelectedVariant: (args: LoadSelectedVariantArgs) => Promise<{
42
39
  data: import("./storefront-api-client").GetSelectedVariantQuery | undefined;
43
40
  errors: ResponseErrors | null;
44
41
  }>;
45
- loadProductCardData: (args: Omit<LoadProductCardDataArgs, "country" | "language">) => Promise<{
42
+ loadProductCardData: (args: LoadProductCardDataArgs) => Promise<{
46
43
  data: import("./storefront-api-client").GetProductCardDataQuery | import("./storefront-api-client").GetProductCardDataWithVariantQuery | undefined;
47
44
  errors: ResponseErrors | null;
48
45
  }>;
49
- loadProductDetailData: (args: Omit<LoadProductDetailDataArgs, "country" | "language">) => Promise<{
46
+ loadProductDetailData: (args: LoadProductDetailDataArgs) => Promise<{
50
47
  data: import("./storefront-api-client").GetProductDetailDataQuery | import("./storefront-api-client").GetProductDetailDataWithVariantQuery | undefined;
51
48
  errors: ResponseErrors | null;
52
49
  }>;
53
- loadProductImages: (args: Omit<LoadProductImagesArgs, "country" | "language">) => Promise<{
50
+ loadProductImages: (args: LoadProductImagesArgs) => Promise<{
54
51
  data: (Pick<import("./types/storefront.types").Image, "id" | "altText" | "url" | "thumbhash"> | undefined)[];
55
52
  error: null;
56
53
  } | {
57
54
  data: null;
58
55
  error: Error;
59
56
  }>;
60
- loadProductRecommendations: (args: Omit<LoadProductRecommendationsArgs, "country" | "language">) => Promise<{
57
+ loadProductRecommendations: (args: LoadProductRecommendationsArgs) => Promise<{
61
58
  data: {
62
59
  productRecommendations?: import("./types/storefront.types").Product[] | null;
63
60
  } | undefined;
@@ -67,7 +64,7 @@ export declare class StorefrontApiClient {
67
64
  data: import("./storefront-api-client").GetProductIdByHandleQuery | undefined;
68
65
  errors: ResponseErrors | null;
69
66
  }>;
70
- loadSaveIntentData: (args: Omit<LoadSaveIntentDataArgs, "country" | "language">) => Promise<{
67
+ loadSaveIntentData: (args: LoadSaveIntentDataArgs) => Promise<{
71
68
  data: import("./storefront-api-client").GetSaveIntentDataQuery | import("./storefront-api-client").GetSaveIntentDataWithVariantQuery | undefined;
72
69
  errors: ResponseErrors | null;
73
70
  }>;
@@ -1,7 +1,13 @@
1
- import { ApiResponse, Item, ItemControllerFindData, ItemDetail, ListControllerFindData, ListDetail, PaginatedApiResponse, SwishClientConfig } from "@swishapp/api-client";
1
+ import { ApiResponse, Item, ItemControllerFindData, ItemDetail, ListControllerFindData, ListDetail, PaginatedApiResponse, SwishClientConfig, OrderDto, OrdersControllerFindData, OrderDetailDto } from "@swishapp/api-client";
2
2
  export interface SwishApiConfig extends SwishClientConfig {
3
3
  proxyMode?: boolean;
4
4
  customerId?: string;
5
+ loadProfile?: () => string | undefined;
6
+ storeProfile?: (profile: string) => void;
7
+ deleteProfile?: () => void;
8
+ loadAuthToken?: () => string | undefined;
9
+ storeAuthToken?: (token: string) => void;
10
+ deleteAuthToken?: () => void;
5
11
  responseInterceptor?: (response: Response, request: Request) => Promise<void> | void;
6
12
  }
7
13
  export declare class SwishApi {
@@ -35,6 +41,10 @@ export declare class SwishApi {
35
41
  addItemsToList: (listId: string, itemIds: import("@swishapp/api-client").AddItemsToListInput["itemIds"]) => Promise<ApiResponse<ListDetail>>;
36
42
  removeItemFromList: (listId: string, itemId: string) => Promise<ApiResponse<unknown>>;
37
43
  };
44
+ get orders(): {
45
+ list: (query?: OrdersControllerFindData["query"]) => Promise<PaginatedApiResponse<OrderDto>>;
46
+ findById: (orderId: number) => Promise<ApiResponse<OrderDetailDto>>;
47
+ };
38
48
  get profiles(): {
39
49
  customerAccountsVersion: () => Promise<ApiResponse<import("@swishapp/api-client").AccountsVersionResult>>;
40
50
  createToken: (body?: import("@swishapp/api-client").CreateProfileTokenInput, options?: {
@@ -1,11 +1,9 @@
1
1
  export interface Ref<T> {
2
2
  current: T;
3
3
  }
4
- declare const BaseElement: typeof HTMLElement;
5
- export declare class SwishUiElement extends BaseElement {
4
+ export declare class SwishUiElement extends HTMLElement {
6
5
  constructor();
7
6
  private componentRef;
8
7
  getComponentRef: <TComponent = unknown>() => Ref<TComponent>;
9
8
  setComponentRef: <TComponent = unknown>(ref: Ref<TComponent>) => void;
10
9
  }
11
- export {};
@@ -1,4 +1,4 @@
1
- import type { StorefrontContext, SwishUiManifest, SwishUiOptions } from "../types";
1
+ import type { SwishUiManifest, SwishUiOptions } from "../types";
2
2
  import type { ShopBridge } from "../utils/shop-bridge";
3
3
  import type { Ref, SwishUiElement } from "./swish-ui-element";
4
4
  import { Item, ItemDetail, List } from "@swishapp/api-client";
@@ -19,7 +19,7 @@ export interface Toast {
19
19
  onClick?: () => void;
20
20
  };
21
21
  }
22
- export declare const setConfig: (context: StorefrontContext, uiOptions?: SwishUiOptions) => void;
22
+ export declare const setConfig: (opts: SwishUiOptions) => void;
23
23
  export declare const hideModal: (element: string | HTMLElement) => Promise<void>;
24
24
  export declare const showModal: (element: string | HTMLElement) => Promise<void>;
25
25
  export interface SignInOptions {
package/dist/swish.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { SwishOptions } from "./types";
1
+ import type { SwishAppOptions, SwishEmbedData } from "./types";
2
2
  import { AjaxApiClient } from "./ajax-api/ajax-api-client";
3
3
  import { createElementLocator, createLocationObserver } from "./dom/dom-utils";
4
4
  import { EventBus } from "./events/event-bus";
@@ -7,7 +7,8 @@ import { computed, effect, signal } from "./state";
7
7
  import { StorefrontApiClient } from "./storefront-api/storefront-api-client";
8
8
  import { SwishApi } from "./swish-api/swish-api-client";
9
9
  export declare const VERSION: string;
10
- export declare const createSwish: (options: SwishOptions) => Promise<SwishApp>;
10
+ export declare const swishEmbedData: SwishEmbedData;
11
+ export declare const swishApp: (options: SwishAppOptions) => Promise<SwishApp>;
11
12
  export declare class SwishApp {
12
13
  private readonly swishApi;
13
14
  private readonly swishApiPublisher;
@@ -17,7 +18,7 @@ export declare class SwishApp {
17
18
  private readonly options;
18
19
  readonly events: EventBus;
19
20
  readonly intents: Intents;
20
- constructor(options: SwishOptions);
21
+ constructor(options: SwishAppOptions);
21
22
  get customer(): {
22
23
  id: string | null;
23
24
  email: string | null;
@@ -26,11 +27,11 @@ export declare class SwishApp {
26
27
  b2b: boolean | null;
27
28
  };
28
29
  get localization(): {
29
- country: import("./storefront-api/types/storefront.types").CountryCode;
30
- language: import("./storefront-api/types/storefront.types").LanguageCode;
31
- market: string;
30
+ country: string;
31
+ language: string;
32
+ market: number;
32
33
  };
33
- get routes(): {
34
+ get shopifyRoutes(): {
34
35
  accountUrl: string;
35
36
  accountLoginUrl: string;
36
37
  rootUrl: string;
@@ -44,8 +45,8 @@ export declare class SwishApp {
44
45
  showModal: (element: string | HTMLElement) => Promise<void>;
45
46
  initShopBridge: ({ onShopModalOpen, }: {
46
47
  onShopModalOpen: () => void;
47
- }) => Promise<import("./swish").ShopBridge>;
48
- showToast: (toast: import("./swish").Toast) => Promise<void>;
48
+ }) => Promise<import(".").ShopBridge>;
49
+ showToast: (toast: import(".").Toast) => Promise<void>;
49
50
  initListDetailPage: (options: import("./swish-ui/swish-ui-utils").ListDetailPageOptions, refElement: HTMLElement) => Promise<void>;
50
51
  };
51
52
  readonly dom: {
@@ -74,10 +75,10 @@ export declare class SwishApp {
74
75
  loading: boolean;
75
76
  error: import("@swishapp/api-client").ApiError | null;
76
77
  }>;
77
- swishQuery: <TResponse extends import("@swishapp/api-client").ApiResponse<any> | import("@swishapp/api-client").PaginatedApiResponse<any>, TVariables>(fetch: import("./state").FetchFn<TResponse, TVariables>, options?: {
78
+ swishQuery: <TResponse extends import("@swishapp/api-client").ApiResponse<any> | import("@swishapp/api-client").PaginatedApiResponse<any>, TVariables>(fetch: import("./state/swish-query-signals").FetchFn<TResponse, TVariables>, options?: {
78
79
  variables?: import("@preact/signals-core").Signal<TVariables>;
79
80
  skip?: import("@preact/signals-core").Signal<boolean>;
80
- refetch?: import("./swish").EventName[];
81
+ refetch?: import(".").EventName[];
81
82
  }) => {
82
83
  data: import("@preact/signals-core").Signal<(TResponse extends {
83
84
  data: infer D;
@@ -92,12 +93,3 @@ export declare class SwishApp {
92
93
  computed: typeof computed;
93
94
  };
94
95
  }
95
- export type * from "./types";
96
- export type * from "@swishapp/api-client";
97
- export type * from "./ajax-api/ajax-api-client";
98
- export type { EventName } from "./events/event-bus";
99
- export type * from "./storefront-api/storefront-api-client";
100
- export type * from "./intents/types";
101
- export type { Ref, SwishUiElement } from "./swish-ui/swish-ui-element";
102
- export type { Toast, ToastManager, UnsaveAlertSubmitData, ListSelectSubmitData, VariantSelectSubmitData, UnsaveAlertOptions, ListSelectOptions, VariantSelectOptions, QuickBuySubmitData, QuickBuyOptions, } from "./swish-ui/swish-ui-utils";
103
- export type { ShopBridge } from "./utils/shop-bridge";