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.
Files changed (60) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +158 -1
  3. package/dist/ai/enrich.d.ts +93 -0
  4. package/dist/ai/enrich.js +25 -0
  5. package/dist/checkout.js +5 -114
  6. package/dist/{chunk-2KBOKOAD.mjs → chunk-2MF53V33.js} +32 -13
  7. package/dist/{chunk-BWKBRM2Z.mjs → chunk-CN7L3BHG.js} +12 -1
  8. package/dist/chunk-CXUCPK6X.js +460 -0
  9. package/dist/{chunk-QCTICSBE.mjs → chunk-MOBWPEY4.js} +29 -7
  10. package/dist/chunk-ROH545KI.js +274 -0
  11. package/dist/{chunk-QL5OUZGP.mjs → chunk-RR6YTQWP.js} +0 -1
  12. package/dist/{chunk-O4BPIIQ6.mjs → chunk-V52MFQZE.js} +11 -281
  13. package/dist/{chunk-WTK5HUFI.mjs → chunk-VPPCOJC3.js} +13 -435
  14. package/dist/collections.d.ts +2 -1
  15. package/dist/collections.js +7 -539
  16. package/dist/index.d.ts +28 -87
  17. package/dist/index.js +109 -2597
  18. package/dist/products.d.ts +2 -1
  19. package/dist/products.js +7 -1205
  20. package/dist/store.d.ts +53 -1
  21. package/dist/store.js +8 -697
  22. package/dist/{store-CJVUz2Yb.d.ts → types-luPg5O08.d.ts} +1 -208
  23. package/dist/utils/detect-country.d.ts +32 -0
  24. package/dist/utils/detect-country.js +6 -0
  25. package/dist/utils/func.d.ts +61 -0
  26. package/dist/utils/func.js +24 -0
  27. package/dist/utils/rate-limit.d.ts +5 -0
  28. package/dist/utils/rate-limit.js +7 -200
  29. package/package.json +21 -10
  30. package/dist/checkout.d.mts +0 -31
  31. package/dist/checkout.js.map +0 -1
  32. package/dist/checkout.mjs +0 -7
  33. package/dist/checkout.mjs.map +0 -1
  34. package/dist/chunk-2KBOKOAD.mjs.map +0 -1
  35. package/dist/chunk-BWKBRM2Z.mjs.map +0 -1
  36. package/dist/chunk-O4BPIIQ6.mjs.map +0 -1
  37. package/dist/chunk-QCTICSBE.mjs.map +0 -1
  38. package/dist/chunk-QL5OUZGP.mjs.map +0 -1
  39. package/dist/chunk-WTK5HUFI.mjs.map +0 -1
  40. package/dist/collections.d.mts +0 -64
  41. package/dist/collections.js.map +0 -1
  42. package/dist/collections.mjs +0 -9
  43. package/dist/collections.mjs.map +0 -1
  44. package/dist/index.d.mts +0 -233
  45. package/dist/index.js.map +0 -1
  46. package/dist/index.mjs +0 -702
  47. package/dist/index.mjs.map +0 -1
  48. package/dist/products.d.mts +0 -63
  49. package/dist/products.js.map +0 -1
  50. package/dist/products.mjs +0 -9
  51. package/dist/products.mjs.map +0 -1
  52. package/dist/store-CJVUz2Yb.d.mts +0 -608
  53. package/dist/store.d.mts +0 -1
  54. package/dist/store.js.map +0 -1
  55. package/dist/store.mjs +0 -9
  56. package/dist/store.mjs.map +0 -1
  57. package/dist/utils/rate-limit.d.mts +0 -25
  58. package/dist/utils/rate-limit.js.map +0 -1
  59. package/dist/utils/rate-limit.mjs +0 -11
  60. package/dist/utils/rate-limit.mjs.map +0 -1
package/dist/store.d.ts CHANGED
@@ -1 +1,53 @@
1
- export { g as StoreInfo, a as StoreOperations, T as createStoreOperations } from './store-CJVUz2Yb.js';
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 };