shop-client 3.14.0 → 3.15.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/README.md +23 -22
- package/dist/ai/enrich.d.ts +24 -3
- package/dist/ai/enrich.mjs +9 -1
- package/dist/{chunk-GNIBTUEK.mjs → chunk-2W623LCW.mjs} +384 -206
- package/dist/{chunk-ZF4M6GMB.mjs → chunk-ESTBP7AD.mjs} +51 -26
- package/dist/{chunk-RLVH7LEG.mjs → chunk-OA76XD32.mjs} +143 -7
- package/dist/{chunk-554O5ED6.mjs → chunk-QCB3U4AO.mjs} +12 -1
- package/dist/collections.d.ts +3 -3
- package/dist/collections.mjs +1 -1
- package/dist/index.d.ts +20 -6
- package/dist/index.mjs +68 -10
- package/dist/products.d.ts +21 -4
- package/dist/products.mjs +1 -1
- package/dist/store.d.ts +19 -7
- package/dist/store.mjs +3 -3
- package/dist/{types-luPg5O08.d.ts → types-BRXamZMS.d.ts} +14 -1
- package/dist/utils/detect-country.d.ts +1 -1
- package/dist/utils/func.d.ts +1 -1
- package/package.json +1 -1
package/dist/store.d.ts
CHANGED
|
@@ -1,17 +1,20 @@
|
|
|
1
|
-
import { J as JsonLdEntry, d as CountryDetectionResult, f as CurrencyCode } from './types-
|
|
1
|
+
import { J as JsonLdEntry, d as CountryDetectionResult, f as CurrencyCode } from './types-BRXamZMS.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Store operations interface for managing store-related functionality.
|
|
5
5
|
* Provides methods to fetch comprehensive store information and metadata.
|
|
6
6
|
*/
|
|
7
|
-
interface
|
|
8
|
-
info(): Promise<
|
|
7
|
+
interface ShopOperations {
|
|
8
|
+
info(): Promise<ShopInfo>;
|
|
9
|
+
getMetaData(): Promise<OpenGraphMeta>;
|
|
10
|
+
getJsonLd(): Promise<JsonLdEntry[] | undefined>;
|
|
11
|
+
getHeaderLinks(): Promise<string[]>;
|
|
9
12
|
}
|
|
10
13
|
/**
|
|
11
14
|
* Comprehensive store information structure returned by the info method.
|
|
12
15
|
* Contains all metadata, branding, social links, and showcase content for a Shopify store.
|
|
13
16
|
*/
|
|
14
|
-
interface
|
|
17
|
+
interface ShopInfo {
|
|
15
18
|
name: string;
|
|
16
19
|
domain: string;
|
|
17
20
|
slug: string;
|
|
@@ -38,17 +41,26 @@ interface StoreInfo {
|
|
|
38
41
|
country: CountryDetectionResult["country"];
|
|
39
42
|
currency: CurrencyCode | null;
|
|
40
43
|
}
|
|
44
|
+
interface OpenGraphMeta {
|
|
45
|
+
siteName: string | null;
|
|
46
|
+
title: string | null;
|
|
47
|
+
description: string | null;
|
|
48
|
+
url: string | null;
|
|
49
|
+
type: string | null;
|
|
50
|
+
image: string | null;
|
|
51
|
+
imageSecureUrl: string | null;
|
|
52
|
+
}
|
|
41
53
|
/**
|
|
42
54
|
* Creates store operations for a ShopClient instance.
|
|
43
55
|
* @param context - ShopClient context containing necessary methods and properties for store operations
|
|
44
56
|
*/
|
|
45
|
-
declare function
|
|
57
|
+
declare function createShopOperations(context: {
|
|
46
58
|
baseUrl: string;
|
|
47
59
|
storeDomain: string;
|
|
48
60
|
validateProductExists: (handle: string) => Promise<boolean>;
|
|
49
61
|
validateCollectionExists: (handle: string) => Promise<boolean>;
|
|
50
62
|
validateLinksInBatches: <T>(items: T[], validator: (item: T) => Promise<boolean>, batchSize?: number) => Promise<T[]>;
|
|
51
63
|
handleFetchError: (error: unknown, context: string, url: string) => never;
|
|
52
|
-
}):
|
|
64
|
+
}): ShopOperations;
|
|
53
65
|
|
|
54
|
-
export { type
|
|
66
|
+
export { type OpenGraphMeta, type ShopInfo, type ShopOperations, createShopOperations };
|
package/dist/store.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./chunk-
|
|
2
|
+
createShopOperations
|
|
3
|
+
} from "./chunk-OA76XD32.mjs";
|
|
4
4
|
import "./chunk-D5MTUWFO.mjs";
|
|
5
5
|
import "./chunk-G7OCMGA6.mjs";
|
|
6
6
|
import "./chunk-U3RQRBXZ.mjs";
|
|
7
7
|
export {
|
|
8
|
-
|
|
8
|
+
createShopOperations
|
|
9
9
|
};
|
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
type OpenRouterConfig = {
|
|
2
|
+
apiKey?: string;
|
|
3
|
+
model?: string;
|
|
4
|
+
fallbackModels?: string[];
|
|
5
|
+
baseUrl?: string;
|
|
6
|
+
siteUrl?: string;
|
|
7
|
+
appTitle?: string;
|
|
8
|
+
offline?: boolean;
|
|
9
|
+
};
|
|
10
|
+
type SystemUserPrompt = {
|
|
11
|
+
system: string;
|
|
12
|
+
user: string;
|
|
13
|
+
};
|
|
1
14
|
/**
|
|
2
15
|
* Base timestamp fields used across Shopify entities.
|
|
3
16
|
*/
|
|
@@ -398,4 +411,4 @@ type SEOContent = {
|
|
|
398
411
|
};
|
|
399
412
|
type StoreTypeBreakdown = Partial<Record<"adult_male" | "adult_female" | "kid_male" | "kid_female" | "generic", Partial<Record<"clothing" | "beauty" | "accessories" | "home-decor" | "food-and-beverages", string[]>>>>;
|
|
400
413
|
|
|
401
|
-
export type { Collection as C, JsonLdEntry as J, LocalizedPricing as L, MetaTag as M, Product as P, ShopifyProduct as S, ShopifySingleProduct as a, ShopifyCollection as b, StoreTypeBreakdown as c, CountryDetectionResult as d, CountryScores as e, CurrencyCode as f, ProductImage as g, ProductOption as h, ProductVariant as i, ProductVariantImage as j, ProductClassification as k, SEOContent as l };
|
|
414
|
+
export type { Collection as C, JsonLdEntry as J, LocalizedPricing as L, MetaTag as M, OpenRouterConfig as O, Product as P, ShopifyProduct as S, ShopifySingleProduct as a, ShopifyCollection as b, StoreTypeBreakdown as c, CountryDetectionResult as d, CountryScores as e, CurrencyCode as f, ProductImage as g, ProductOption as h, ProductVariant as i, ProductVariantImage as j, ProductClassification as k, SEOContent as l, SystemUserPrompt as m };
|
package/dist/utils/func.d.ts
CHANGED