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/dist/store.d.ts CHANGED
@@ -1,17 +1,20 @@
1
- import { J as JsonLdEntry, d as CountryDetectionResult, f as CurrencyCode } from './types-luPg5O08.js';
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 StoreOperations {
8
- info(): Promise<StoreInfo>;
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 StoreInfo {
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 createStoreOperations(context: {
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
- }): StoreOperations;
64
+ }): ShopOperations;
53
65
 
54
- export { type StoreInfo, type StoreOperations, createStoreOperations };
66
+ export { type OpenGraphMeta, type ShopInfo, type ShopOperations, createShopOperations };
package/dist/store.mjs CHANGED
@@ -1,9 +1,9 @@
1
1
  import {
2
- createStoreOperations
3
- } from "./chunk-RLVH7LEG.mjs";
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
- createStoreOperations
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 };
@@ -1,4 +1,4 @@
1
- import { d as CountryDetectionResult } from '../types-luPg5O08.js';
1
+ import { d as CountryDetectionResult } from '../types-BRXamZMS.js';
2
2
 
3
3
  /**
4
4
  * Detects the country of a Shopify store by analyzing various signals in the HTML content.
@@ -1,4 +1,4 @@
1
- import { f as CurrencyCode } from '../types-luPg5O08.js';
1
+ import { f as CurrencyCode } from '../types-BRXamZMS.js';
2
2
 
3
3
  declare function extractDomainWithoutSuffix(domain: string): string | null;
4
4
  declare function generateStoreSlug(domain: string): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shop-client",
3
- "version": "3.14.0",
3
+ "version": "3.15.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.mjs",
6
6
  "module": "./dist/index.mjs",