@swishapp/sdk 0.120.0 → 0.121.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/dom/dom-utils.d.ts +1 -0
- package/dist/events/event-bus.d.ts +1 -1
- package/dist/intents/handlers/edit-item-lists-handler.d.ts +3 -3
- package/dist/intents/handlers/edit-item-variant-handler.d.ts +3 -3
- package/dist/intents/handlers/{open-quick-buy-handler.d.ts → initiate-quick-buy-handler.d.ts} +5 -5
- package/dist/intents/handlers/save-item-handler.d.ts +3 -3
- package/dist/intents/handlers/view-home-handler.d.ts +6 -0
- package/dist/intents/handlers/view-list-detail-page-menu-handler.d.ts +11 -0
- package/dist/intents/handlers/{open-list-handler.d.ts → view-list-handler.d.ts} +5 -5
- package/dist/intents/handlers/{open-list-menu-handler.d.ts → view-list-menu-handler.d.ts} +5 -5
- package/dist/intents/handlers/view-lists-handler.d.ts +6 -0
- package/dist/intents/handlers/view-notifications-handler.d.ts +6 -0
- package/dist/intents/handlers/{open-order-handler.d.ts → view-order-handler.d.ts} +5 -5
- package/dist/intents/handlers/view-order-menu-handler.d.ts +11 -0
- package/dist/intents/handlers/view-orders-handler.d.ts +6 -0
- package/dist/intents/handlers/{open-product-handler.d.ts → view-product-handler.d.ts} +5 -5
- package/dist/intents/handlers/view-profile-handler.d.ts +6 -0
- package/dist/intents/handlers/view-saves-handler.d.ts +6 -0
- package/dist/intents/hooks/after-view-home-hook.d.ts +5 -0
- package/dist/intents/intents.d.ts +16 -1
- package/dist/intents/types.d.ts +41 -45
- package/dist/options/swish-options.d.ts +2 -1
- package/dist/options/types.d.ts +36 -2
- package/dist/query/client.d.ts +2 -0
- package/dist/query/index.d.ts +18 -0
- package/dist/query/invalidation.d.ts +6 -0
- package/dist/query/keys.d.ts +16 -0
- package/dist/query/persistence.d.ts +13 -0
- package/dist/query/storage-key.d.ts +4 -0
- package/dist/state/declarative-state.d.ts +2 -0
- package/dist/state/item-context-signal.d.ts +1 -1
- package/dist/state/item-context-source.d.ts +2 -0
- package/dist/state/item-state-signal.d.ts +1 -0
- package/dist/state/swish-query-signals.d.ts +1 -1
- package/dist/state/tanstack-query-signal.d.ts +14 -0
- package/dist/storefront-api/queries/fragments.d.ts +0 -1
- package/dist/storefront-api/queries/index.d.ts +0 -2
- package/dist/storefront-api/storefront-api-client.d.ts +0 -5
- package/dist/storefront-api/types/storefront.generated.d.ts +0 -50
- package/dist/swish-api/swish-api-auth.d.ts +2 -1
- package/dist/swish-api/swish-api-client.d.ts +1 -1
- package/dist/swish-ui/swish-ui.d.ts +5 -3
- package/dist/swish-ui/types.d.ts +1 -0
- package/dist/swish.d.ts +6 -2
- package/dist/swish.js +24 -77
- package/package.json +2 -1
- package/dist/intents/handlers/open-home-handler.d.ts +0 -6
- package/dist/intents/handlers/open-list-detail-page-menu-handler.d.ts +0 -11
- package/dist/intents/handlers/open-lists-handler.d.ts +0 -6
- package/dist/intents/handlers/open-notifications-handler.d.ts +0 -6
- package/dist/intents/handlers/open-order-menu-handler.d.ts +0 -11
- package/dist/intents/handlers/open-orders-handler.d.ts +0 -6
- package/dist/intents/handlers/open-profile-handler.d.ts +0 -6
- package/dist/intents/handlers/open-saves-handler.d.ts +0 -6
- package/dist/intents/handlers/open-sign-in-handler.d.ts +0 -11
- package/dist/intents/hooks/after-open-home-hook.d.ts +0 -5
- package/dist/storefront-api/load-save-intent-data.d.ts +0 -13
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swishapp/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.121.0",
|
|
4
4
|
"description": "JS SDK for Swish.",
|
|
5
5
|
"author": "Swish",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"@preact/signals-core": "^1.13.0",
|
|
14
14
|
"@shopify/graphql-client": "^1.4.1",
|
|
15
15
|
"@shopify/storefront-api-client": "^1.0.9",
|
|
16
|
+
"@tanstack/query-core": "5.90.20",
|
|
16
17
|
"dataloader": "^2.2.3",
|
|
17
18
|
"valibot": "^1.2.0",
|
|
18
19
|
"@swishapp/api-client": "0.43.0"
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { IntentHandler } from "../intent-handler";
|
|
2
|
-
import { IntentResponse, SuccessIntentResponse } from "../types";
|
|
3
|
-
export type OpenHomeSuccessResponse = SuccessIntentResponse<void>;
|
|
4
|
-
export declare class OpenHomeHandler extends IntentHandler<"open:home"> {
|
|
5
|
-
invoke(data?: void): Promise<IntentResponse<"open:home">>;
|
|
6
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as v from "valibot";
|
|
2
|
-
import { IntentHandler } from "../intent-handler";
|
|
3
|
-
import { IntentResponse, SuccessIntentResponse } from "../types";
|
|
4
|
-
export declare const OpenListDetailPageMenuIntentDataSchema: v.ObjectSchema<{
|
|
5
|
-
readonly listId: v.StringSchema<undefined>;
|
|
6
|
-
}, undefined>;
|
|
7
|
-
export type OpenListDetailPageMenuIntentData = v.InferInput<typeof OpenListDetailPageMenuIntentDataSchema>;
|
|
8
|
-
export type OpenListDetailPageMenuSuccessResponse = SuccessIntentResponse<void>;
|
|
9
|
-
export declare class OpenListDetailPageMenuHandler extends IntentHandler<"open:list-detail-page-menu"> {
|
|
10
|
-
invoke(data: OpenListDetailPageMenuIntentData): Promise<IntentResponse<"open:list-detail-page-menu">>;
|
|
11
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { IntentHandler } from "../intent-handler";
|
|
2
|
-
import { IntentResponse, SuccessIntentResponse } from "../types";
|
|
3
|
-
export type OpenListsSuccessResponse = SuccessIntentResponse<void>;
|
|
4
|
-
export declare class OpenListsHandler extends IntentHandler<"open:lists"> {
|
|
5
|
-
invoke(data?: void): Promise<IntentResponse<"open:lists">>;
|
|
6
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { IntentHandler } from "../intent-handler";
|
|
2
|
-
import { IntentResponse, SuccessIntentResponse } from "../types";
|
|
3
|
-
export type OpenNotificationsSuccessResponse = SuccessIntentResponse<void>;
|
|
4
|
-
export declare class OpenNotificationsHandler extends IntentHandler<"open:notifications"> {
|
|
5
|
-
invoke(data?: void): Promise<IntentResponse<"open:notifications">>;
|
|
6
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as v from "valibot";
|
|
2
|
-
import { IntentHandler } from "../intent-handler";
|
|
3
|
-
import { IntentResponse, SuccessIntentResponse } from "../types";
|
|
4
|
-
export declare const OpenOrderMenuIntentDataSchema: v.ObjectSchema<{
|
|
5
|
-
readonly orderId: v.StringSchema<undefined>;
|
|
6
|
-
}, undefined>;
|
|
7
|
-
export type OpenOrderMenuIntentData = v.InferInput<typeof OpenOrderMenuIntentDataSchema>;
|
|
8
|
-
export type OpenOrderMenuSuccessResponse = SuccessIntentResponse<void>;
|
|
9
|
-
export declare class OpenOrderMenuHandler extends IntentHandler<"open:order-menu"> {
|
|
10
|
-
invoke(data: OpenOrderMenuIntentData): Promise<IntentResponse<"open:order-menu">>;
|
|
11
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { IntentHandler } from "../intent-handler";
|
|
2
|
-
import { IntentResponse, SuccessIntentResponse } from "../types";
|
|
3
|
-
export type OpenOrdersSuccessResponse = SuccessIntentResponse<void>;
|
|
4
|
-
export declare class OpenOrdersHandler extends IntentHandler<"open:orders"> {
|
|
5
|
-
invoke(data?: void): Promise<IntentResponse<"open:orders">>;
|
|
6
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { IntentHandler } from "../intent-handler";
|
|
2
|
-
import { IntentResponse, SuccessIntentResponse } from "../types";
|
|
3
|
-
export type OpenProfileSuccessResponse = SuccessIntentResponse<void>;
|
|
4
|
-
export declare class OpenProfileHandler extends IntentHandler<"open:profile"> {
|
|
5
|
-
invoke(data?: void): Promise<IntentResponse<"open:profile">>;
|
|
6
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { IntentHandler } from "../intent-handler";
|
|
2
|
-
import { IntentResponse, SuccessIntentResponse } from "../types";
|
|
3
|
-
export type OpenSavesSuccessResponse = SuccessIntentResponse<void>;
|
|
4
|
-
export declare class OpenSavesHandler extends IntentHandler<"open:saves"> {
|
|
5
|
-
invoke(data?: void): Promise<IntentResponse<"open:saves">>;
|
|
6
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as v from "valibot";
|
|
2
|
-
import { IntentHandler } from "../intent-handler";
|
|
3
|
-
import { IntentResponse, SuccessIntentResponse } from "../types";
|
|
4
|
-
export declare const OpenSignInIntentDataSchema: v.ObjectSchema<{
|
|
5
|
-
readonly returnTo: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
6
|
-
}, undefined>;
|
|
7
|
-
export type OpenSignInIntentData = v.InferInput<typeof OpenSignInIntentDataSchema>;
|
|
8
|
-
export type OpenSignInSuccessResponse = SuccessIntentResponse<void>;
|
|
9
|
-
export declare class OpenSignInHandler extends IntentHandler<"open:sign-in"> {
|
|
10
|
-
invoke(data: OpenSignInIntentData | undefined): Promise<IntentResponse<"open:sign-in">>;
|
|
11
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { StorefrontApiClient } from "./storefront-api-client";
|
|
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<{
|
|
11
|
-
data: GetSaveIntentDataQuery | GetSaveIntentDataWithVariantQuery | undefined;
|
|
12
|
-
errors: import("@shopify/graphql-client").ResponseErrors | null;
|
|
13
|
-
}>;
|