@swishapp/sdk 0.146.1-unstable.20260908112659 → 0.147.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/intents/intents.d.ts +2 -1
- package/dist/options/swish-options.d.ts +7 -2
- package/dist/swish.js +21 -21
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type IntentOptionsInput } from "../options/swish-options";
|
|
1
2
|
import { SwishApp } from "../swish";
|
|
2
3
|
import { SwishUi } from "../swish-ui/swish-ui";
|
|
3
4
|
import type { PreviewOptions, Product, ProductVariant } from "../types";
|
|
@@ -77,7 +78,7 @@ export declare class Intents {
|
|
|
77
78
|
private _invoking;
|
|
78
79
|
private readonly announced;
|
|
79
80
|
constructor(swish: SwishApp, ui: SwishUi);
|
|
80
|
-
applyPreview(preview:
|
|
81
|
+
applyPreview(preview: IntentOptionsInput | null | undefined): void;
|
|
81
82
|
applyFeaturesPreview(preview: PreviewOptions["features"]): void;
|
|
82
83
|
initHandlers(): {
|
|
83
84
|
"create:cart-line": CreateCartLineHandler;
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import type { LanguageCode as I18nLanguageCode } from "@swishapp/i18n";
|
|
2
2
|
import type { PlacementSpec } from "../dom/create-placement";
|
|
3
|
-
import { IntentOptions } from "../intents/intents";
|
|
3
|
+
import type { IntentOptions } from "../intents/intents";
|
|
4
4
|
import { StorefrontApiOptions } from "../swish";
|
|
5
5
|
import { type DefaultView } from "./schemas";
|
|
6
6
|
import type { AuthOptions, DrawerSectionInput, FeaturesOptions, HomeSectionInput, ListDetailPageSectionInput, ListDetailSectionInput, ListsSectionInput, MetafieldOptions, NotificationsSectionInput, OrderDetailSectionInput, OrdersSectionInput, ProductDetailSectionInput, ProfileSectionInput, SavesSectionInput, StorefrontContext, SwishOptions, TransformOptions, UiDesignOptions } from "./types";
|
|
7
|
+
export type IntentOptionsInput = {
|
|
8
|
+
[K in keyof IntentOptions]?: Partial<IntentOptions[K]>;
|
|
9
|
+
};
|
|
10
|
+
export declare const DEFAULT_INTENT_OPTIONS: IntentOptions;
|
|
11
|
+
export declare const resolveIntentOptions: (input: IntentOptionsInput | null | undefined, base?: IntentOptions) => IntentOptions;
|
|
7
12
|
export type SwishOptionsInput = {
|
|
8
13
|
storefront: StorefrontApiOptions;
|
|
9
14
|
context: StorefrontContext;
|
|
@@ -12,7 +17,7 @@ export type SwishOptionsInput = {
|
|
|
12
17
|
features?: Partial<FeaturesOptions>;
|
|
13
18
|
metafields?: MetafieldOptions;
|
|
14
19
|
transforms?: TransformOptions;
|
|
15
|
-
intents?:
|
|
20
|
+
intents?: IntentOptionsInput;
|
|
16
21
|
placements?: PlacementSpec[];
|
|
17
22
|
ui?: Partial<UiOptions>;
|
|
18
23
|
customiser?: {
|