shop-client 3.8.2 → 3.9.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/LICENSE +1 -1
- package/README.md +158 -1
- package/dist/ai/enrich.d.ts +93 -0
- package/dist/ai/enrich.js +25 -0
- package/dist/checkout.js +5 -114
- package/dist/{chunk-2KBOKOAD.mjs → chunk-2MF53V33.js} +32 -13
- package/dist/{chunk-BWKBRM2Z.mjs → chunk-CN7L3BHG.js} +12 -1
- package/dist/chunk-CXUCPK6X.js +460 -0
- package/dist/{chunk-QCTICSBE.mjs → chunk-MOBWPEY4.js} +29 -7
- package/dist/chunk-ROH545KI.js +274 -0
- package/dist/{chunk-QL5OUZGP.mjs → chunk-RR6YTQWP.js} +0 -1
- package/dist/{chunk-O4BPIIQ6.mjs → chunk-V52MFQZE.js} +11 -281
- package/dist/{chunk-WTK5HUFI.mjs → chunk-VPPCOJC3.js} +13 -435
- package/dist/collections.d.ts +2 -1
- package/dist/collections.js +7 -539
- package/dist/index.d.ts +28 -87
- package/dist/index.js +109 -2597
- package/dist/products.d.ts +2 -1
- package/dist/products.js +7 -1205
- package/dist/store.d.ts +53 -1
- package/dist/store.js +8 -697
- package/dist/{store-CJVUz2Yb.d.ts → types-luPg5O08.d.ts} +1 -208
- package/dist/utils/detect-country.d.ts +32 -0
- package/dist/utils/detect-country.js +6 -0
- package/dist/utils/func.d.ts +61 -0
- package/dist/utils/func.js +24 -0
- package/dist/utils/rate-limit.d.ts +5 -0
- package/dist/utils/rate-limit.js +7 -200
- package/package.json +21 -10
- package/dist/checkout.d.mts +0 -31
- package/dist/checkout.js.map +0 -1
- package/dist/checkout.mjs +0 -7
- package/dist/checkout.mjs.map +0 -1
- package/dist/chunk-2KBOKOAD.mjs.map +0 -1
- package/dist/chunk-BWKBRM2Z.mjs.map +0 -1
- package/dist/chunk-O4BPIIQ6.mjs.map +0 -1
- package/dist/chunk-QCTICSBE.mjs.map +0 -1
- package/dist/chunk-QL5OUZGP.mjs.map +0 -1
- package/dist/chunk-WTK5HUFI.mjs.map +0 -1
- package/dist/collections.d.mts +0 -64
- package/dist/collections.js.map +0 -1
- package/dist/collections.mjs +0 -9
- package/dist/collections.mjs.map +0 -1
- package/dist/index.d.mts +0 -233
- package/dist/index.js.map +0 -1
- package/dist/index.mjs +0 -702
- package/dist/index.mjs.map +0 -1
- package/dist/products.d.mts +0 -63
- package/dist/products.js.map +0 -1
- package/dist/products.mjs +0 -9
- package/dist/products.mjs.map +0 -1
- package/dist/store-CJVUz2Yb.d.mts +0 -608
- package/dist/store.d.mts +0 -1
- package/dist/store.js.map +0 -1
- package/dist/store.mjs +0 -9
- package/dist/store.mjs.map +0 -1
- package/dist/utils/rate-limit.d.mts +0 -25
- package/dist/utils/rate-limit.js.map +0 -1
- package/dist/utils/rate-limit.mjs +0 -11
- package/dist/utils/rate-limit.mjs.map +0 -1
package/dist/store.d.ts
CHANGED
|
@@ -1 +1,53 @@
|
|
|
1
|
-
|
|
1
|
+
import { J as JsonLdEntry, d as CountryDetectionResult } from './types-luPg5O08.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Store operations interface for managing store-related functionality.
|
|
5
|
+
* Provides methods to fetch comprehensive store information and metadata.
|
|
6
|
+
*/
|
|
7
|
+
interface StoreOperations {
|
|
8
|
+
info(): Promise<StoreInfo>;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Comprehensive store information structure returned by the info method.
|
|
12
|
+
* Contains all metadata, branding, social links, and showcase content for a Shopify store.
|
|
13
|
+
*/
|
|
14
|
+
interface StoreInfo {
|
|
15
|
+
name: string;
|
|
16
|
+
domain: string;
|
|
17
|
+
slug: string;
|
|
18
|
+
title: string | null;
|
|
19
|
+
description: string | null;
|
|
20
|
+
logoUrl: string | null;
|
|
21
|
+
socialLinks: Record<string, string>;
|
|
22
|
+
contactLinks: {
|
|
23
|
+
tel: string | null;
|
|
24
|
+
email: string | null;
|
|
25
|
+
contactPage: string | null;
|
|
26
|
+
};
|
|
27
|
+
headerLinks: string[];
|
|
28
|
+
showcase: {
|
|
29
|
+
products: string[];
|
|
30
|
+
collections: string[];
|
|
31
|
+
};
|
|
32
|
+
jsonLdData: JsonLdEntry[] | undefined;
|
|
33
|
+
techProvider: {
|
|
34
|
+
name: string;
|
|
35
|
+
walletId: string | undefined;
|
|
36
|
+
subDomain: string | null;
|
|
37
|
+
};
|
|
38
|
+
country: CountryDetectionResult["country"];
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Creates store operations for a ShopClient instance.
|
|
42
|
+
* @param context - ShopClient context containing necessary methods and properties for store operations
|
|
43
|
+
*/
|
|
44
|
+
declare function createStoreOperations(context: {
|
|
45
|
+
baseUrl: string;
|
|
46
|
+
storeDomain: string;
|
|
47
|
+
validateProductExists: (handle: string) => Promise<boolean>;
|
|
48
|
+
validateCollectionExists: (handle: string) => Promise<boolean>;
|
|
49
|
+
validateLinksInBatches: <T>(items: T[], validator: (item: T) => Promise<boolean>, batchSize?: number) => Promise<T[]>;
|
|
50
|
+
handleFetchError: (error: unknown, context: string, url: string) => never;
|
|
51
|
+
}): StoreOperations;
|
|
52
|
+
|
|
53
|
+
export { type StoreInfo, type StoreOperations, createStoreOperations };
|