@bacano/sdk 1.0.1 → 1.1.8

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 (72) hide show
  1. package/README.md +439 -18
  2. package/STOREFRONT_CLARITY.md +140 -0
  3. package/STOREFRONT_CONSTRUCTION.md +105 -0
  4. package/STOREFRONT_LEADS.md +130 -0
  5. package/STOREFRONT_LEGAL.md +66 -0
  6. package/STOREFRONT_MARKETING.md +291 -0
  7. package/STOREFRONT_PERFORMANCE.md +304 -0
  8. package/STOREFRONT_PREVIEW.md +499 -0
  9. package/STOREFRONT_PRODUCT_SPECIFICATIONS.md +127 -0
  10. package/STOREFRONT_VOLUME_PRICING.md +131 -0
  11. package/client.d.ts +8 -1
  12. package/errors.d.ts +9 -1
  13. package/graphql.cjs +266 -3
  14. package/graphql.d.ts +2 -2
  15. package/graphql.js +266 -3
  16. package/index.cjs +2035 -255
  17. package/index.d.ts +8 -6
  18. package/index.js +2035 -255
  19. package/marketing/attribution.d.ts +53 -0
  20. package/marketing/clarity.d.ts +3 -0
  21. package/marketing/domain.d.ts +1 -0
  22. package/marketing/ga4.d.ts +2 -0
  23. package/marketing/index.d.ts +5 -0
  24. package/marketing/runtime.d.ts +2 -0
  25. package/marketing/sanitize.d.ts +2 -0
  26. package/marketing/types.d.ts +111 -0
  27. package/media.d.ts +45 -2
  28. package/modules/auth.d.ts +3 -2
  29. package/modules/availability.d.ts +2 -2
  30. package/modules/cart-errors.d.ts +2 -0
  31. package/modules/cart-session.d.ts +2 -2
  32. package/modules/cart.d.ts +4 -3
  33. package/modules/catalog.d.ts +15 -3
  34. package/modules/content.d.ts +2 -2
  35. package/modules/marketing.d.ts +5 -0
  36. package/modules/orders.d.ts +2 -2
  37. package/modules/profile.d.ts +1 -1
  38. package/modules/static-catalog.d.ts +13 -0
  39. package/modules/website.d.ts +7 -1
  40. package/package.json +14 -3
  41. package/react/context-registry.d.ts +9 -0
  42. package/react/context.d.ts +1 -1
  43. package/react/hooks.d.ts +24 -2
  44. package/react/marketing-context.d.ts +3 -0
  45. package/react/marketing-provider.d.ts +10 -0
  46. package/react/preview/cache.d.ts +23 -0
  47. package/react/preview/context.d.ts +5 -0
  48. package/react/preview/navigation.d.ts +9 -0
  49. package/react/preview/provider.d.ts +3 -0
  50. package/react/preview/shell.d.ts +3 -0
  51. package/react/preview/toolbar.d.ts +3 -0
  52. package/react/preview/types.d.ts +60 -0
  53. package/react/preview.cjs +742 -0
  54. package/react/preview.d.ts +14 -0
  55. package/react/preview.js +730 -0
  56. package/react/website-gate.d.ts +22 -0
  57. package/react.cjs +3893 -1795
  58. package/react.d.ts +8 -4
  59. package/react.js +3891 -1789
  60. package/skills/bacano-web/SKILL.md +116 -0
  61. package/skills/bacano-web/agents/openai.yaml +4 -0
  62. package/skills/bacano-web/references/architecture-runtime.md +109 -0
  63. package/skills/bacano-web/references/common.md +92 -0
  64. package/skills/bacano-web/references/informational.md +39 -0
  65. package/skills/bacano-web/references/report.md +70 -0
  66. package/skills/bacano-web/references/storefront.md +116 -0
  67. package/skills/bacano-web/scripts/audit-http.mjs +284 -0
  68. package/skills/bacano-web/scripts/cli.mjs +222 -0
  69. package/skills/bacano-web/scripts/postinstall.mjs +8 -0
  70. package/transport/documents.d.ts +23 -18
  71. package/transport/graphql.d.ts +13 -1
  72. package/types.d.ts +338 -0
@@ -1,6 +1,6 @@
1
1
  export declare const RESOLVE_WEBSITE_BY_SLUG = "\n query ResolveWebsiteBySlug($slug: String!) {\n websites(\n where: { slug: { _eq: $slug }, is_active: { _eq: true } }\n limit: 1\n ) {\n id\n company_id\n chain_id\n name\n slug\n domain\n config\n }\n }\n";
2
- export declare const GET_PRODUCTS = "\n query GetProducts(\n $companyId: uuid!\n $chainId: uuid!\n $websiteId: uuid!\n $limit: Int = 20\n $offset: Int = 0\n $where: products_bool_exp = {}\n $orderBy: [products_order_by!] = [{ name: asc }]\n ) {\n products(\n where: {\n _and: [\n { company_id: { _eq: $companyId } }\n {\n product_website_publications: {\n website_id: { _eq: $websiteId }\n is_visible: { _eq: true }\n }\n }\n {\n chain_products: {\n chain_id: { _eq: $chainId }\n is_enabled: { _eq: true }\n status: { _eq: active }\n }\n }\n $where\n ]\n }\n limit: $limit\n offset: $offset\n order_by: $orderBy\n ) {\n id\n name\n description\n long_description\n slug\n seo_title\n seo_description\n seo_image_file_id\n category\n subcategory\n color\n measurement_unit\n created_at\n updated_at\n brand {\n id\n name\n }\n seo_image_file {\n mimeType\n name\n }\n product_variants(\n where: { is_disabled: { _eq: false } }\n order_by: { order: asc }\n ) {\n id\n sku\n barcode\n order\n weight\n depth\n height\n length\n product_variant_prices(\n where: {\n price_type: { _in: [CLIENT, SALE, WHOLESALE, WHOLESALE_2] }\n _or: [\n { chain_id: { _eq: $chainId } }\n { chain_id: { _is_null: true } }\n ]\n }\n ) {\n id\n price\n price_type\n chain_id\n }\n product_variant_attributes(order_by: { order: asc }) {\n id\n value\n order\n attribute_value {\n id\n code\n sort_order\n metadata\n }\n attribute {\n id\n name\n }\n }\n }\n product_media(order_by: { order: asc }) {\n id\n file_id\n order\n file {\n mimeType\n name\n }\n }\n product_related_products(\n where: {\n related_product: {\n chain_products: {\n chain_id: { _eq: $chainId }\n is_enabled: { _eq: true }\n status: { _eq: active }\n }\n }\n }\n order_by: { sort_order: asc }\n ) {\n id\n related_product_id\n display_label\n sort_order\n related_product {\n id\n slug\n name\n sku\n product_media(\n where: { file: { mimeType: { _ilike: \"image/%\" } } }\n order_by: { order: asc }\n limit: 1\n ) {\n id\n file_id\n order\n file {\n mimeType\n name\n }\n }\n }\n }\n product_attributes {\n id\n value\n attribute_value {\n id\n code\n sort_order\n metadata\n }\n attribute {\n id\n name\n }\n }\n }\n catalog_attribute_lists(\n where: { company_id: { _eq: $companyId }, status: { _eq: published } }\n order_by: { updated_at: desc }\n ) {\n id\n key\n name\n description\n status\n items(\n where: { is_visible: { _eq: true } }\n order_by: [{ sort_order: asc }, { public_label: asc }]\n ) {\n id\n attribute_id\n public_label\n public_slug\n sort_order\n attribute {\n id\n name\n type\n }\n values(\n where: { is_visible: { _eq: true } }\n order_by: [{ sort_order: asc }, { public_label: asc }]\n ) {\n id\n attribute_value_id\n public_label\n public_slug\n sort_order\n attribute_value {\n id\n code\n metadata\n }\n }\n }\n }\n }\n";
3
- export declare const GET_PRODUCT_BY_PK = "\n query GetProductByPk(\n $productId: uuid!\n $companyId: uuid!\n $chainId: uuid!\n $websiteId: uuid!\n ) {\n products(\n where: {\n id: { _eq: $productId }\n company_id: { _eq: $companyId }\n product_website_publications: {\n website_id: { _eq: $websiteId }\n is_visible: { _eq: true }\n }\n chain_products: {\n chain_id: { _eq: $chainId }\n is_enabled: { _eq: true }\n status: { _eq: active }\n }\n }\n limit: 1\n ) {\n id\n name\n description\n long_description\n slug\n seo_title\n seo_description\n seo_image_file_id\n category\n subcategory\n color\n measurement_unit\n created_at\n updated_at\n brand {\n id\n name\n }\n seo_image_file {\n mimeType\n name\n }\n product_variants(\n where: { is_disabled: { _eq: false } }\n order_by: { order: asc }\n ) {\n id\n sku\n barcode\n order\n weight\n depth\n height\n length\n product_variant_prices(\n where: {\n price_type: { _in: [CLIENT, SALE, WHOLESALE, WHOLESALE_2] }\n _or: [\n { chain_id: { _eq: $chainId } }\n { chain_id: { _is_null: true } }\n ]\n }\n ) {\n id\n price\n price_type\n chain_id\n }\n product_variant_attributes(order_by: { order: asc }) {\n id\n value\n order\n attribute_value {\n id\n code\n sort_order\n metadata\n }\n attribute {\n id\n name\n }\n }\n }\n product_media(order_by: { order: asc }) {\n id\n file_id\n order\n file {\n mimeType\n name\n }\n }\n product_related_products(\n where: {\n related_product: {\n chain_products: {\n chain_id: { _eq: $chainId }\n is_enabled: { _eq: true }\n status: { _eq: active }\n }\n }\n }\n order_by: { sort_order: asc }\n ) {\n id\n related_product_id\n display_label\n sort_order\n related_product {\n id\n slug\n name\n sku\n product_media(\n where: { file: { mimeType: { _ilike: \"image/%\" } } }\n order_by: { order: asc }\n limit: 1\n ) {\n id\n file_id\n order\n file {\n mimeType\n name\n }\n }\n }\n }\n product_attributes {\n id\n value\n attribute_value {\n id\n code\n sort_order\n metadata\n }\n attribute {\n id\n name\n }\n }\n }\n catalog_attribute_lists(\n where: { company_id: { _eq: $companyId }, status: { _eq: published } }\n order_by: { updated_at: desc }\n ) {\n id\n key\n name\n description\n status\n items(\n where: { is_visible: { _eq: true } }\n order_by: [{ sort_order: asc }, { public_label: asc }]\n ) {\n id\n attribute_id\n public_label\n public_slug\n sort_order\n attribute {\n id\n name\n type\n }\n values(\n where: { is_visible: { _eq: true } }\n order_by: [{ sort_order: asc }, { public_label: asc }]\n ) {\n id\n attribute_value_id\n public_label\n public_slug\n sort_order\n attribute_value {\n id\n code\n metadata\n }\n }\n }\n }\n }\n";
2
+ export declare const GET_PRODUCTS = "\n query GetProducts(\n $companyId: uuid!\n $chainId: uuid!\n $websiteId: uuid!\n $limit: Int = 20\n $offset: Int = 0\n $where: products_bool_exp = {}\n $orderBy: [products_order_by!] = [{ name: asc }]\n ) {\n products(\n where: {\n _and: [\n { company_id: { _eq: $companyId } }\n {\n product_website_publications: {\n website_id: { _eq: $websiteId }\n is_visible: { _eq: true }\n }\n }\n {\n chain_products: {\n chain_id: { _eq: $chainId }\n is_enabled: { _eq: true }\n status: { _eq: active }\n }\n }\n $where\n ]\n }\n limit: $limit\n offset: $offset\n order_by: $orderBy\n ) {\n id\n name\n description\n long_description\n slug\n seo_title\n seo_description\n seo_image_file_id\n category\n subcategory\n color\n measurement_unit\n created_at\n updated_at\n brand {\n id\n name\n }\n seo_image_file {\n mimeType\n name\n }\n product_variants(\n where: { is_disabled: { _eq: false } }\n order_by: { order: asc }\n ) {\n id\n sku\n barcode\n order\n weight\n depth\n height\n length\n product_variant_prices(\n where: {\n price_type: { _in: [CLIENT, SALE, WHOLESALE, WHOLESALE_2] }\n _or: [\n { chain_id: { _eq: $chainId } }\n { chain_id: { _is_null: true } }\n ]\n }\n ) {\n id\n price\n price_type\n chain_id\n }\n product_variant_attributes(order_by: { order: asc }) {\n id\n value\n order\n attribute_value {\n id\n code\n sort_order\n metadata\n }\n attribute {\n id\n name\n }\n }\n }\n product_media(order_by: { order: asc }) {\n id\n file_id\n order\n file {\n mimeType\n name\n }\n }\n product_related_products(\n where: {\n related_product: {\n chain_products: {\n chain_id: { _eq: $chainId }\n is_enabled: { _eq: true }\n status: { _eq: active }\n }\n }\n }\n order_by: { sort_order: asc }\n ) {\n id\n related_product_id\n sort_order\n related_product {\n id\n slug\n name\n sku\n product_media(\n where: { file: { mimeType: { _ilike: \"image/%\" } } }\n order_by: { order: asc }\n limit: 1\n ) {\n id\n file_id\n order\n file {\n mimeType\n name\n }\n }\n }\n }\n product_option_group_members(limit: 1) {\n group {\n id\n display_title\n members(\n where: {\n product: {\n product_website_publications: {\n website_id: { _eq: $websiteId }\n is_visible: { _eq: true }\n }\n chain_products: {\n chain_id: { _eq: $chainId }\n is_enabled: { _eq: true }\n status: { _eq: active }\n }\n }\n }\n order_by: { sort_order: asc }\n ) {\n id\n product_id\n display_label\n sort_order\n product {\n id\n slug\n name\n sku\n product_media(\n where: { file: { mimeType: { _ilike: \"image/%\" } } }\n order_by: { order: asc }\n limit: 1\n ) {\n id\n file_id\n order\n file {\n mimeType\n name\n }\n }\n }\n }\n }\n }\n product_attributes {\n id\n value\n attribute_value {\n id\n code\n sort_order\n metadata\n }\n attribute {\n id\n name\n }\n }\n }\n catalog_attribute_lists(\n where: { company_id: { _eq: $companyId }, status: { _eq: published } }\n order_by: { updated_at: desc }\n ) {\n id\n key\n name\n description\n status\n items(\n where: { is_visible: { _eq: true } }\n order_by: [{ sort_order: asc }, { public_label: asc }]\n ) {\n id\n attribute_id\n public_label\n public_slug\n sort_order\n attribute {\n id\n name\n type\n }\n values(\n where: { is_visible: { _eq: true } }\n order_by: [{ sort_order: asc }, { public_label: asc }]\n ) {\n id\n attribute_value_id\n public_label\n public_slug\n sort_order\n attribute_value {\n id\n code\n metadata\n }\n }\n }\n }\n }\n";
3
+ export declare const GET_PRODUCT_BY_PK = "\n query GetProductByPk(\n $productId: uuid!\n $companyId: uuid!\n $chainId: uuid!\n $websiteId: uuid!\n ) {\n products(\n where: {\n id: { _eq: $productId }\n company_id: { _eq: $companyId }\n product_website_publications: {\n website_id: { _eq: $websiteId }\n is_visible: { _eq: true }\n }\n chain_products: {\n chain_id: { _eq: $chainId }\n is_enabled: { _eq: true }\n status: { _eq: active }\n }\n }\n limit: 1\n ) {\n id\n product_option_group_members(limit: 1) {\n group {\n id\n display_title\n members(\n where: {\n product: {\n product_website_publications: {\n website_id: { _eq: $websiteId }\n is_visible: { _eq: true }\n }\n chain_products: {\n chain_id: { _eq: $chainId }\n is_enabled: { _eq: true }\n status: { _eq: active }\n }\n }\n }\n order_by: { sort_order: asc }\n ) {\n id\n product_id\n display_label\n sort_order\n product {\n id\n slug\n name\n sku\n product_media(\n where: { file: { mimeType: { _ilike: \"image/%\" } } }\n order_by: { order: asc }\n limit: 1\n ) {\n id\n file_id\n order\n file {\n mimeType\n name\n }\n }\n }\n }\n }\n }\n name\n description\n long_description\n slug\n seo_title\n seo_description\n seo_image_file_id\n category\n subcategory\n color\n measurement_unit\n created_at\n updated_at\n brand {\n id\n name\n }\n seo_image_file {\n mimeType\n name\n }\n product_variants(\n where: { is_disabled: { _eq: false } }\n order_by: { order: asc }\n ) {\n id\n sku\n barcode\n order\n weight\n depth\n height\n length\n product_variant_prices(\n where: {\n price_type: { _in: [CLIENT, SALE, WHOLESALE, WHOLESALE_2] }\n _or: [\n { chain_id: { _eq: $chainId } }\n { chain_id: { _is_null: true } }\n ]\n }\n ) {\n id\n price\n price_type\n chain_id\n }\n product_variant_attributes(order_by: { order: asc }) {\n id\n value\n order\n attribute_value {\n id\n code\n sort_order\n metadata\n }\n attribute {\n id\n name\n }\n }\n }\n product_media(order_by: { order: asc }) {\n id\n file_id\n order\n file {\n mimeType\n name\n }\n }\n product_related_products(\n where: {\n related_product: {\n chain_products: {\n chain_id: { _eq: $chainId }\n is_enabled: { _eq: true }\n status: { _eq: active }\n }\n }\n }\n order_by: { sort_order: asc }\n ) {\n id\n related_product_id\n sort_order\n related_product {\n id\n slug\n name\n sku\n product_media(\n where: { file: { mimeType: { _ilike: \"image/%\" } } }\n order_by: { order: asc }\n limit: 1\n ) {\n id\n file_id\n order\n file {\n mimeType\n name\n }\n }\n }\n }\n product_attributes {\n id\n value\n attribute_value {\n id\n code\n sort_order\n metadata\n }\n attribute {\n id\n name\n }\n }\n }\n catalog_attribute_lists(\n where: { company_id: { _eq: $companyId }, status: { _eq: published } }\n order_by: { updated_at: desc }\n ) {\n id\n key\n name\n description\n status\n items(\n where: { is_visible: { _eq: true } }\n order_by: [{ sort_order: asc }, { public_label: asc }]\n ) {\n id\n attribute_id\n public_label\n public_slug\n sort_order\n attribute {\n id\n name\n type\n }\n values(\n where: { is_visible: { _eq: true } }\n order_by: [{ sort_order: asc }, { public_label: asc }]\n ) {\n id\n attribute_value_id\n public_label\n public_slug\n sort_order\n attribute_value {\n id\n code\n metadata\n }\n }\n }\n }\n }\n";
4
4
  export declare const GET_PRODUCT_BY_SLUG: string;
5
5
  export declare const GET_PRODUCT_SEO_ENTRIES = "\n query GetProductSeoEntries(\n $companyId: uuid!\n $chainId: uuid!\n $websiteId: uuid!\n $limit: Int!\n $offset: Int!\n ) {\n products(\n where: {\n company_id: { _eq: $companyId }\n slug: { _is_null: false }\n product_website_publications: {\n website_id: { _eq: $websiteId }\n is_visible: { _eq: true }\n }\n chain_products: {\n chain_id: { _eq: $chainId }\n is_enabled: { _eq: true }\n status: { _eq: active }\n }\n }\n limit: $limit\n offset: $offset\n order_by: [{ updated_at: desc }, { created_at: desc }]\n ) {\n id\n name\n slug\n seo_title\n seo_description\n seo_image_file_id\n category\n subcategory\n created_at\n updated_at\n seo_image_file {\n mimeType\n name\n }\n product_media(\n where: { file: { mimeType: { _ilike: \"image/%\" } } }\n order_by: { order: asc }\n limit: 1\n ) {\n id\n file_id\n order\n file {\n mimeType\n name\n }\n }\n product_variants(\n where: { is_disabled: { _eq: false } }\n order_by: { order: asc }\n ) {\n id\n product_variant_prices(\n where: {\n price_type: { _in: [CLIENT, SALE, WHOLESALE, WHOLESALE_2] }\n _or: [\n { chain_id: { _eq: $chainId } }\n { chain_id: { _is_null: true } }\n ]\n }\n ) {\n id\n price\n price_type\n chain_id\n }\n }\n }\n }\n";
6
6
  export declare const GET_CATEGORIES = "\n query GetCategories {\n product_categories {\n name\n description\n product_subcategories {\n id\n name\n description\n }\n }\n }\n";
@@ -9,16 +9,19 @@ export declare const GET_CATALOG_ATTRIBUTE_LIST = "\n query GetCatalogAttribute
9
9
  export declare const GET_CONTEXTUAL_CATALOG_ATTRIBUTE_LIST = "\n mutation GetContextualCatalogAttributeList(\n $websiteId: uuid!\n $key: String!\n $onlyApplicable: Boolean\n $filters: WebsiteCatalogFiltersInput\n ) {\n websiteGetAttributeList(\n website_id: $websiteId\n key: $key\n only_applicable: $onlyApplicable\n filters: $filters\n ) {\n success\n errors\n list {\n id\n key\n name\n description\n status\n items {\n id\n attribute_id\n attribute_name\n attribute_type\n public_label\n public_slug\n sort_order\n values {\n id\n attribute_value_id\n code\n public_label\n public_slug\n sort_order\n metadata\n }\n }\n }\n }\n }\n";
10
10
  export declare const WEBSITE_GET_CATALOG_PAGE = "\n mutation WebsiteGetCatalogPage(\n $websiteId: uuid!\n $categoryListKey: String!\n $attributeListKey: String!\n $filters: WebsiteCatalogPageFiltersInput\n $include: WebsiteCatalogPageIncludeInput\n ) {\n result: websiteGetCatalogPage(\n website_id: $websiteId\n category_list_key: $categoryListKey\n attribute_list_key: $attributeListKey\n filters: $filters\n include: $include\n ) {\n success\n products\n category_list\n attribute_list\n filters\n brands\n pagination\n applied_filters\n debug\n errors\n }\n }\n";
11
11
  export declare const WEBSITE_GET_PRODUCT_RECOMMENDATIONS = "\n mutation WebsiteGetProductRecommendations(\n $websiteId: uuid!\n $productId: uuid!\n $limit: Int\n ) {\n result: websiteGetProductRecommendations(\n website_id: $websiteId\n product_id: $productId\n limit: $limit\n ) {\n success\n products\n strategy\n errors\n }\n }\n";
12
+ export declare const WEBSITE_GET_PRODUCT_SPECIFICATIONS = "\n mutation WebsiteGetProductSpecifications(\n $websiteId: uuid!\n $productIds: [uuid!]!\n ) {\n result: websiteGetProductSpecifications(\n website_id: $websiteId\n product_ids: $productIds\n ) {\n success\n specifications\n errors\n }\n }\n";
12
13
  export declare const GET_BRANDS = "\n query GetBrands($companyId: uuid!, $chainId: uuid!) {\n brands(\n where: {\n company_id: { _eq: $companyId }\n products: {\n chain_products: {\n chain_id: { _eq: $chainId }\n is_enabled: { _eq: true }\n status: { _eq: active }\n }\n }\n }\n order_by: { name: asc }\n ) {\n id\n name\n }\n }\n";
13
14
  export declare const WEBSITE_GET_CONTENT = "\n mutation WebsiteGetContent(\n $websiteId: uuid!\n $key: String\n $categoryKey: String\n $tag: String\n $locale: String\n ) {\n result: websiteGetContent(\n website_id: $websiteId\n key: $key\n category_key: $categoryKey\n tag: $tag\n locale: $locale\n ) {\n success\n errors\n entries {\n \n id\n key\n category_key\n name\n locale\n status\n tags\n content_json\n resolved_fields\n published_at\n updated_at\n content_type {\n id\n key\n name\n kind\n }\n\n }\n }\n }\n";
14
15
  export declare const WEBSITE_GET_PRODUCT_CONTENT = "\n mutation WebsiteGetProductContent(\n $websiteId: uuid!\n $productId: uuid!\n $locale: String\n ) {\n result: websiteGetProductContent(\n website_id: $websiteId\n product_id: $productId\n locale: $locale\n ) {\n success\n errors\n blocks {\n id\n product_id\n locale\n content_json\n resolved_fields\n sort_order\n updated_at\n content_type {\n id\n key\n name\n kind\n }\n }\n }\n }\n";
15
- export declare const CHECK_AVAILABILITY = "\n query CheckAvailability($variantIds: [uuid!]!, $chainId: uuid!) {\n websiteProductAvailability(\n product_variant_ids: $variantIds\n chain_id: $chainId\n ) {\n product_variant_id\n in_stock\n label\n }\n }\n";
16
- export declare const CREATE_CART = "\n mutation CreateCart(\n $websiteId: uuid!\n $cartToken: String\n $contact: WebsiteGuestContactInput\n $fulfillmentFamily: String\n ) {\n websiteCreateCart(\n website_id: $websiteId\n cart_token: $cartToken\n contact: $contact\n fulfillment_family: $fulfillmentFamily\n ) {\n success\n order_id\n cart_token\n cart {\n id\n status\n discount\n tax\n total_without_tax\n total_with_tax\n total_with_discount\n created_at\n updated_at\n items {\n id\n product_variant_id\n quantity\n product_variant {\n id\n sku\n product {\n id\n name\n }\n prices {\n id\n price\n price_type\n chain_id\n }\n }\n }\n }\n errors\n }\n }\n";
17
- export declare const GET_CART = "\n mutation GetCart($orderId: uuid!, $cartToken: String!) {\n websiteGetCart(order_id: $orderId, cart_token: $cartToken) {\n success\n order_id\n cart_token\n cart {\n id\n status\n discount\n tax\n total_without_tax\n total_with_tax\n total_with_discount\n created_at\n updated_at\n items {\n id\n product_variant_id\n quantity\n product_variant {\n id\n sku\n product {\n id\n name\n }\n prices {\n id\n price\n price_type\n chain_id\n }\n }\n }\n }\n errors\n }\n }\n";
18
- export declare const START_GUEST_CHECKOUT = "\n mutation StartGuestCheckout(\n $websiteId: uuid!\n $cartToken: String\n $contact: WebsiteGuestContactInput!\n $items: [WebsiteCheckoutItemInput!]!\n $fulfillmentFamily: String\n ) {\n websiteStartGuestCheckout(\n website_id: $websiteId\n cart_token: $cartToken\n contact: $contact\n items: $items\n fulfillment_family: $fulfillmentFamily\n ) {\n success\n order_id\n cart_token\n cart {\n id\n status\n discount\n tax\n total_without_tax\n total_with_tax\n total_with_discount\n created_at\n updated_at\n items {\n id\n product_variant_id\n quantity\n product_variant {\n id\n sku\n product {\n id\n name\n }\n prices {\n id\n price\n price_type\n chain_id\n }\n }\n }\n }\n errors\n }\n }\n";
19
- export declare const SET_CART_ITEM = "\n mutation SetCartItem(\n $orderId: uuid!\n $cartToken: String!\n $variantId: uuid!\n $quantity: numeric!\n ) {\n websiteSetCartItem(\n order_id: $orderId\n cart_token: $cartToken\n product_variant_id: $variantId\n quantity: $quantity\n ) {\n success\n order_id\n cart_token\n cart {\n id\n status\n discount\n tax\n total_without_tax\n total_with_tax\n total_with_discount\n created_at\n updated_at\n items {\n id\n product_variant_id\n quantity\n product_variant {\n id\n sku\n product {\n id\n name\n }\n prices {\n id\n price\n price_type\n chain_id\n }\n }\n }\n }\n errors\n }\n }\n";
20
- export declare const REMOVE_CART_ITEM = "\n mutation RemoveCartItem(\n $orderId: uuid!\n $cartToken: String!\n $itemId: uuid!\n ) {\n websiteRemoveCartItem(\n order_id: $orderId\n cart_token: $cartToken\n item_id: $itemId\n ) {\n success\n order_id\n cart_token\n cart {\n id\n status\n discount\n tax\n total_without_tax\n total_with_tax\n total_with_discount\n created_at\n updated_at\n items {\n id\n product_variant_id\n quantity\n product_variant {\n id\n sku\n product {\n id\n name\n }\n prices {\n id\n price\n price_type\n chain_id\n }\n }\n }\n }\n errors\n }\n }\n";
21
- export declare const CHECKOUT = "\n mutation Checkout(\n $orderId: uuid!\n $cartToken: String!\n $contact: WebsiteGuestContactInput!\n $fulfillmentFamily: String\n $address: WebsiteAddressInput\n $shippingQuoteId: uuid\n $paymentMode: String\n $paymentMethodId: uuid\n $buyerAccountOptIn: Boolean\n $initialPayment: WebsiteInitialPaymentInput\n ) {\n websiteCheckout(\n order_id: $orderId\n cart_token: $cartToken\n contact: $contact\n fulfillment_family: $fulfillmentFamily\n address: $address\n shipping_quote_id: $shippingQuoteId\n payment_mode: $paymentMode\n payment_method_id: $paymentMethodId\n buyer_account_opt_in: $buyerAccountOptIn\n initial_payment: $initialPayment\n ) {\n success\n order_id\n order_number\n payment_method_id\n public_order_token\n requires_payment_session\n buyer_account_invitation_requested\n errors\n }\n }\n";
16
+ export declare const CHECK_AVAILABILITY = "\n query CheckAvailability(\n $variantIds: [uuid!]!\n $chainId: uuid!\n $websiteId: uuid\n ) {\n websiteProductAvailability(\n product_variant_ids: $variantIds\n chain_id: $chainId\n website_id: $websiteId\n ) {\n product_variant_id\n in_stock\n label\n max_purchasable_quantity\n }\n }\n";
17
+ export declare const GET_PRODUCT_LIVE_STATE = "\n query GetProductLiveState(\n $variantIds: [uuid!]!\n $companyId: uuid!\n $chainId: uuid!\n $websiteId: uuid!\n ) {\n product_variants(\n where: {\n id: { _in: $variantIds }\n is_disabled: { _eq: false }\n product: {\n company_id: { _eq: $companyId }\n product_website_publications: {\n website_id: { _eq: $websiteId }\n is_visible: { _eq: true }\n }\n chain_products: {\n chain_id: { _eq: $chainId }\n is_enabled: { _eq: true }\n status: { _eq: active }\n }\n }\n }\n ) {\n id\n product_variant_prices(\n where: {\n price_type: { _in: [CLIENT, SALE, WHOLESALE, WHOLESALE_2] }\n _or: [\n { chain_id: { _eq: $chainId } }\n { chain_id: { _is_null: true } }\n ]\n }\n ) {\n id\n price\n price_type\n chain_id\n }\n }\n websiteProductAvailability(\n product_variant_ids: $variantIds\n chain_id: $chainId\n website_id: $websiteId\n ) {\n product_variant_id\n in_stock\n label\n max_purchasable_quantity\n }\n }\n";
18
+ export declare const CREATE_CART = "\n mutation CreateCart(\n $websiteId: uuid!\n $cartToken: String\n $contact: WebsiteGuestContactInput\n $fulfillmentFamily: String\n ) {\n websiteCreateCart(\n website_id: $websiteId\n cart_token: $cartToken\n contact: $contact\n fulfillment_family: $fulfillmentFamily\n ) {\n success\n order_id\n cart_token\n cart {\n id\n status\n discount\n tax\n total_without_tax\n total_with_tax\n total_with_discount\n created_at\n updated_at\n volume_pricing {\n enabled\n eligibleQuantity\n appliedPriceType\n appliedMinQuantity\n nextPriceType\n nextMinQuantity\n remainingQuantity\n totalSavings\n }\n items {\n id\n product_variant_id\n quantity\n unit_price\n line_total\n base_unit_price\n unit_savings\n line_savings\n volume_pricing_eligible\n resolved_price_type\n volume_pricing_min_quantity\n product_variant {\n id\n sku\n product {\n id\n name\n }\n prices {\n id\n price\n price_type\n chain_id\n }\n }\n }\n }\n errors\n }\n }\n";
19
+ export declare const GET_CART = "\n mutation GetCart($orderId: uuid!, $cartToken: String!) {\n websiteGetCart(order_id: $orderId, cart_token: $cartToken) {\n success\n order_id\n cart_token\n cart {\n id\n status\n discount\n tax\n total_without_tax\n total_with_tax\n total_with_discount\n created_at\n updated_at\n volume_pricing {\n enabled\n eligibleQuantity\n appliedPriceType\n appliedMinQuantity\n nextPriceType\n nextMinQuantity\n remainingQuantity\n totalSavings\n }\n items {\n id\n product_variant_id\n quantity\n unit_price\n line_total\n base_unit_price\n unit_savings\n line_savings\n volume_pricing_eligible\n resolved_price_type\n volume_pricing_min_quantity\n product_variant {\n id\n sku\n product {\n id\n name\n }\n prices {\n id\n price\n price_type\n chain_id\n }\n }\n }\n }\n errors\n }\n }\n";
20
+ export declare const START_GUEST_CHECKOUT = "\n mutation StartGuestCheckout(\n $websiteId: uuid!\n $cartToken: String\n $contact: WebsiteGuestContactInput!\n $items: [WebsiteCheckoutItemInput!]!\n $fulfillmentFamily: String\n $marketingAttribution: WebsiteMarketingAttributionInput\n ) {\n websiteStartGuestCheckout(\n website_id: $websiteId\n cart_token: $cartToken\n contact: $contact\n items: $items\n fulfillment_family: $fulfillmentFamily\n marketing_attribution: $marketingAttribution\n ) {\n success\n order_id\n cart_token\n cart {\n id\n status\n discount\n tax\n total_without_tax\n total_with_tax\n total_with_discount\n created_at\n updated_at\n volume_pricing {\n enabled\n eligibleQuantity\n appliedPriceType\n appliedMinQuantity\n nextPriceType\n nextMinQuantity\n remainingQuantity\n totalSavings\n }\n items {\n id\n product_variant_id\n quantity\n unit_price\n line_total\n base_unit_price\n unit_savings\n line_savings\n volume_pricing_eligible\n resolved_price_type\n volume_pricing_min_quantity\n product_variant {\n id\n sku\n product {\n id\n name\n }\n prices {\n id\n price\n price_type\n chain_id\n }\n }\n }\n }\n errors\n }\n }\n";
21
+ export declare const SET_CART_ITEM = "\n mutation SetCartItem(\n $orderId: uuid!\n $cartToken: String!\n $variantId: uuid!\n $quantity: numeric!\n ) {\n websiteSetCartItem(\n order_id: $orderId\n cart_token: $cartToken\n product_variant_id: $variantId\n quantity: $quantity\n ) {\n success\n order_id\n cart_token\n cart {\n id\n status\n discount\n tax\n total_without_tax\n total_with_tax\n total_with_discount\n created_at\n updated_at\n volume_pricing {\n enabled\n eligibleQuantity\n appliedPriceType\n appliedMinQuantity\n nextPriceType\n nextMinQuantity\n remainingQuantity\n totalSavings\n }\n items {\n id\n product_variant_id\n quantity\n unit_price\n line_total\n base_unit_price\n unit_savings\n line_savings\n volume_pricing_eligible\n resolved_price_type\n volume_pricing_min_quantity\n product_variant {\n id\n sku\n product {\n id\n name\n }\n prices {\n id\n price\n price_type\n chain_id\n }\n }\n }\n }\n errors\n }\n }\n";
22
+ export declare const REMOVE_CART_ITEM = "\n mutation RemoveCartItem(\n $orderId: uuid!\n $cartToken: String!\n $itemId: uuid!\n ) {\n websiteRemoveCartItem(\n order_id: $orderId\n cart_token: $cartToken\n item_id: $itemId\n ) {\n success\n order_id\n cart_token\n cart {\n id\n status\n discount\n tax\n total_without_tax\n total_with_tax\n total_with_discount\n created_at\n updated_at\n volume_pricing {\n enabled\n eligibleQuantity\n appliedPriceType\n appliedMinQuantity\n nextPriceType\n nextMinQuantity\n remainingQuantity\n totalSavings\n }\n items {\n id\n product_variant_id\n quantity\n unit_price\n line_total\n base_unit_price\n unit_savings\n line_savings\n volume_pricing_eligible\n resolved_price_type\n volume_pricing_min_quantity\n product_variant {\n id\n sku\n product {\n id\n name\n }\n prices {\n id\n price\n price_type\n chain_id\n }\n }\n }\n }\n errors\n }\n }\n";
23
+ export declare const DISCARD_CART = "\n mutation DiscardCart($orderId: uuid!, $cartToken: String!) {\n websiteDiscardCart(order_id: $orderId, cart_token: $cartToken) {\n success\n order_id\n website_cart_status\n errors\n }\n }\n";
24
+ export declare const CHECKOUT = "\n mutation Checkout(\n $orderId: uuid!\n $cartToken: String!\n $contact: WebsiteGuestContactInput!\n $fulfillmentFamily: String\n $address: WebsiteAddressInput\n $shippingQuoteId: uuid\n $paymentMode: String\n $paymentMethodId: uuid\n $buyerAccountOptIn: Boolean\n $initialPayment: WebsiteInitialPaymentInput\n $marketingAttribution: WebsiteMarketingAttributionInput\n $advertisingConsent: WebsiteAdvertisingConsentInput\n ) {\n websiteCheckout(\n order_id: $orderId\n cart_token: $cartToken\n contact: $contact\n fulfillment_family: $fulfillmentFamily\n address: $address\n shipping_quote_id: $shippingQuoteId\n payment_mode: $paymentMode\n payment_method_id: $paymentMethodId\n buyer_account_opt_in: $buyerAccountOptIn\n initial_payment: $initialPayment\n marketing_attribution: $marketingAttribution\n advertising_consent: $advertisingConsent\n ) {\n success\n order_id\n order_number\n payment_method_id\n public_order_token\n requires_payment_session\n buyer_account_invitation_requested\n errors\n }\n }\n";
22
25
  export declare const GET_LOCATION_OPTIONS = "\n mutation GetLocationOptions($websiteId: uuid!) {\n websiteGetLocationOptions(website_id: $websiteId) {\n success\n country_code\n departments {\n department_id\n department_name\n department_code\n municipalities {\n municipality_id\n municipality_name\n municipality_code\n department_id\n department_code\n }\n }\n errors\n }\n }\n";
23
26
  export declare const GET_DELIVERY_OPTIONS = "\n mutation GetDeliveryOptions($websiteId: uuid!) {\n websiteGetDeliveryOptions(website_id: $websiteId) {\n success\n delivery_options {\n id\n fulfillment_family\n label\n description\n is_enabled\n pickup_info {\n label\n address\n schedule\n notes\n }\n }\n errors\n }\n }\n";
24
27
  export declare const GET_SHIPPING_QUOTES = "\n mutation GetShippingQuotes(\n $websiteId: uuid!\n $orderId: uuid\n $cartToken: String\n $items: [WebsiteCheckoutItemInput!]\n $address: WebsiteAddressInput!\n ) {\n websiteGetShippingQuotes(\n website_id: $websiteId\n order_id: $orderId\n cart_token: $cartToken\n items: $items\n address: $address\n ) {\n success\n quotes {\n quote_id\n shipping_service_id\n label\n service_name\n base_amount\n amount\n currency\n collection_mode\n total_policy\n estimated_delivery\n free_shipping_eligible\n free_shipping_applied\n free_shipping_threshold\n free_shipping_remaining\n free_shipping_eligible_subtotal\n }\n errors\n }\n }\n";
@@ -42,8 +45,8 @@ export declare const GET_SEARCH_SUGGESTIONS = "\n query GetSearchSuggestions(\n
42
45
  /** All documents as a named record for the advanced graphql entry point */
43
46
  export declare const documents: {
44
47
  readonly RESOLVE_WEBSITE_BY_SLUG: "\n query ResolveWebsiteBySlug($slug: String!) {\n websites(\n where: { slug: { _eq: $slug }, is_active: { _eq: true } }\n limit: 1\n ) {\n id\n company_id\n chain_id\n name\n slug\n domain\n config\n }\n }\n";
45
- readonly GET_PRODUCTS: "\n query GetProducts(\n $companyId: uuid!\n $chainId: uuid!\n $websiteId: uuid!\n $limit: Int = 20\n $offset: Int = 0\n $where: products_bool_exp = {}\n $orderBy: [products_order_by!] = [{ name: asc }]\n ) {\n products(\n where: {\n _and: [\n { company_id: { _eq: $companyId } }\n {\n product_website_publications: {\n website_id: { _eq: $websiteId }\n is_visible: { _eq: true }\n }\n }\n {\n chain_products: {\n chain_id: { _eq: $chainId }\n is_enabled: { _eq: true }\n status: { _eq: active }\n }\n }\n $where\n ]\n }\n limit: $limit\n offset: $offset\n order_by: $orderBy\n ) {\n id\n name\n description\n long_description\n slug\n seo_title\n seo_description\n seo_image_file_id\n category\n subcategory\n color\n measurement_unit\n created_at\n updated_at\n brand {\n id\n name\n }\n seo_image_file {\n mimeType\n name\n }\n product_variants(\n where: { is_disabled: { _eq: false } }\n order_by: { order: asc }\n ) {\n id\n sku\n barcode\n order\n weight\n depth\n height\n length\n product_variant_prices(\n where: {\n price_type: { _in: [CLIENT, SALE, WHOLESALE, WHOLESALE_2] }\n _or: [\n { chain_id: { _eq: $chainId } }\n { chain_id: { _is_null: true } }\n ]\n }\n ) {\n id\n price\n price_type\n chain_id\n }\n product_variant_attributes(order_by: { order: asc }) {\n id\n value\n order\n attribute_value {\n id\n code\n sort_order\n metadata\n }\n attribute {\n id\n name\n }\n }\n }\n product_media(order_by: { order: asc }) {\n id\n file_id\n order\n file {\n mimeType\n name\n }\n }\n product_related_products(\n where: {\n related_product: {\n chain_products: {\n chain_id: { _eq: $chainId }\n is_enabled: { _eq: true }\n status: { _eq: active }\n }\n }\n }\n order_by: { sort_order: asc }\n ) {\n id\n related_product_id\n display_label\n sort_order\n related_product {\n id\n slug\n name\n sku\n product_media(\n where: { file: { mimeType: { _ilike: \"image/%\" } } }\n order_by: { order: asc }\n limit: 1\n ) {\n id\n file_id\n order\n file {\n mimeType\n name\n }\n }\n }\n }\n product_attributes {\n id\n value\n attribute_value {\n id\n code\n sort_order\n metadata\n }\n attribute {\n id\n name\n }\n }\n }\n catalog_attribute_lists(\n where: { company_id: { _eq: $companyId }, status: { _eq: published } }\n order_by: { updated_at: desc }\n ) {\n id\n key\n name\n description\n status\n items(\n where: { is_visible: { _eq: true } }\n order_by: [{ sort_order: asc }, { public_label: asc }]\n ) {\n id\n attribute_id\n public_label\n public_slug\n sort_order\n attribute {\n id\n name\n type\n }\n values(\n where: { is_visible: { _eq: true } }\n order_by: [{ sort_order: asc }, { public_label: asc }]\n ) {\n id\n attribute_value_id\n public_label\n public_slug\n sort_order\n attribute_value {\n id\n code\n metadata\n }\n }\n }\n }\n }\n";
46
- readonly GET_PRODUCT_BY_PK: "\n query GetProductByPk(\n $productId: uuid!\n $companyId: uuid!\n $chainId: uuid!\n $websiteId: uuid!\n ) {\n products(\n where: {\n id: { _eq: $productId }\n company_id: { _eq: $companyId }\n product_website_publications: {\n website_id: { _eq: $websiteId }\n is_visible: { _eq: true }\n }\n chain_products: {\n chain_id: { _eq: $chainId }\n is_enabled: { _eq: true }\n status: { _eq: active }\n }\n }\n limit: 1\n ) {\n id\n name\n description\n long_description\n slug\n seo_title\n seo_description\n seo_image_file_id\n category\n subcategory\n color\n measurement_unit\n created_at\n updated_at\n brand {\n id\n name\n }\n seo_image_file {\n mimeType\n name\n }\n product_variants(\n where: { is_disabled: { _eq: false } }\n order_by: { order: asc }\n ) {\n id\n sku\n barcode\n order\n weight\n depth\n height\n length\n product_variant_prices(\n where: {\n price_type: { _in: [CLIENT, SALE, WHOLESALE, WHOLESALE_2] }\n _or: [\n { chain_id: { _eq: $chainId } }\n { chain_id: { _is_null: true } }\n ]\n }\n ) {\n id\n price\n price_type\n chain_id\n }\n product_variant_attributes(order_by: { order: asc }) {\n id\n value\n order\n attribute_value {\n id\n code\n sort_order\n metadata\n }\n attribute {\n id\n name\n }\n }\n }\n product_media(order_by: { order: asc }) {\n id\n file_id\n order\n file {\n mimeType\n name\n }\n }\n product_related_products(\n where: {\n related_product: {\n chain_products: {\n chain_id: { _eq: $chainId }\n is_enabled: { _eq: true }\n status: { _eq: active }\n }\n }\n }\n order_by: { sort_order: asc }\n ) {\n id\n related_product_id\n display_label\n sort_order\n related_product {\n id\n slug\n name\n sku\n product_media(\n where: { file: { mimeType: { _ilike: \"image/%\" } } }\n order_by: { order: asc }\n limit: 1\n ) {\n id\n file_id\n order\n file {\n mimeType\n name\n }\n }\n }\n }\n product_attributes {\n id\n value\n attribute_value {\n id\n code\n sort_order\n metadata\n }\n attribute {\n id\n name\n }\n }\n }\n catalog_attribute_lists(\n where: { company_id: { _eq: $companyId }, status: { _eq: published } }\n order_by: { updated_at: desc }\n ) {\n id\n key\n name\n description\n status\n items(\n where: { is_visible: { _eq: true } }\n order_by: [{ sort_order: asc }, { public_label: asc }]\n ) {\n id\n attribute_id\n public_label\n public_slug\n sort_order\n attribute {\n id\n name\n type\n }\n values(\n where: { is_visible: { _eq: true } }\n order_by: [{ sort_order: asc }, { public_label: asc }]\n ) {\n id\n attribute_value_id\n public_label\n public_slug\n sort_order\n attribute_value {\n id\n code\n metadata\n }\n }\n }\n }\n }\n";
48
+ readonly GET_PRODUCTS: "\n query GetProducts(\n $companyId: uuid!\n $chainId: uuid!\n $websiteId: uuid!\n $limit: Int = 20\n $offset: Int = 0\n $where: products_bool_exp = {}\n $orderBy: [products_order_by!] = [{ name: asc }]\n ) {\n products(\n where: {\n _and: [\n { company_id: { _eq: $companyId } }\n {\n product_website_publications: {\n website_id: { _eq: $websiteId }\n is_visible: { _eq: true }\n }\n }\n {\n chain_products: {\n chain_id: { _eq: $chainId }\n is_enabled: { _eq: true }\n status: { _eq: active }\n }\n }\n $where\n ]\n }\n limit: $limit\n offset: $offset\n order_by: $orderBy\n ) {\n id\n name\n description\n long_description\n slug\n seo_title\n seo_description\n seo_image_file_id\n category\n subcategory\n color\n measurement_unit\n created_at\n updated_at\n brand {\n id\n name\n }\n seo_image_file {\n mimeType\n name\n }\n product_variants(\n where: { is_disabled: { _eq: false } }\n order_by: { order: asc }\n ) {\n id\n sku\n barcode\n order\n weight\n depth\n height\n length\n product_variant_prices(\n where: {\n price_type: { _in: [CLIENT, SALE, WHOLESALE, WHOLESALE_2] }\n _or: [\n { chain_id: { _eq: $chainId } }\n { chain_id: { _is_null: true } }\n ]\n }\n ) {\n id\n price\n price_type\n chain_id\n }\n product_variant_attributes(order_by: { order: asc }) {\n id\n value\n order\n attribute_value {\n id\n code\n sort_order\n metadata\n }\n attribute {\n id\n name\n }\n }\n }\n product_media(order_by: { order: asc }) {\n id\n file_id\n order\n file {\n mimeType\n name\n }\n }\n product_related_products(\n where: {\n related_product: {\n chain_products: {\n chain_id: { _eq: $chainId }\n is_enabled: { _eq: true }\n status: { _eq: active }\n }\n }\n }\n order_by: { sort_order: asc }\n ) {\n id\n related_product_id\n sort_order\n related_product {\n id\n slug\n name\n sku\n product_media(\n where: { file: { mimeType: { _ilike: \"image/%\" } } }\n order_by: { order: asc }\n limit: 1\n ) {\n id\n file_id\n order\n file {\n mimeType\n name\n }\n }\n }\n }\n product_option_group_members(limit: 1) {\n group {\n id\n display_title\n members(\n where: {\n product: {\n product_website_publications: {\n website_id: { _eq: $websiteId }\n is_visible: { _eq: true }\n }\n chain_products: {\n chain_id: { _eq: $chainId }\n is_enabled: { _eq: true }\n status: { _eq: active }\n }\n }\n }\n order_by: { sort_order: asc }\n ) {\n id\n product_id\n display_label\n sort_order\n product {\n id\n slug\n name\n sku\n product_media(\n where: { file: { mimeType: { _ilike: \"image/%\" } } }\n order_by: { order: asc }\n limit: 1\n ) {\n id\n file_id\n order\n file {\n mimeType\n name\n }\n }\n }\n }\n }\n }\n product_attributes {\n id\n value\n attribute_value {\n id\n code\n sort_order\n metadata\n }\n attribute {\n id\n name\n }\n }\n }\n catalog_attribute_lists(\n where: { company_id: { _eq: $companyId }, status: { _eq: published } }\n order_by: { updated_at: desc }\n ) {\n id\n key\n name\n description\n status\n items(\n where: { is_visible: { _eq: true } }\n order_by: [{ sort_order: asc }, { public_label: asc }]\n ) {\n id\n attribute_id\n public_label\n public_slug\n sort_order\n attribute {\n id\n name\n type\n }\n values(\n where: { is_visible: { _eq: true } }\n order_by: [{ sort_order: asc }, { public_label: asc }]\n ) {\n id\n attribute_value_id\n public_label\n public_slug\n sort_order\n attribute_value {\n id\n code\n metadata\n }\n }\n }\n }\n }\n";
49
+ readonly GET_PRODUCT_BY_PK: "\n query GetProductByPk(\n $productId: uuid!\n $companyId: uuid!\n $chainId: uuid!\n $websiteId: uuid!\n ) {\n products(\n where: {\n id: { _eq: $productId }\n company_id: { _eq: $companyId }\n product_website_publications: {\n website_id: { _eq: $websiteId }\n is_visible: { _eq: true }\n }\n chain_products: {\n chain_id: { _eq: $chainId }\n is_enabled: { _eq: true }\n status: { _eq: active }\n }\n }\n limit: 1\n ) {\n id\n product_option_group_members(limit: 1) {\n group {\n id\n display_title\n members(\n where: {\n product: {\n product_website_publications: {\n website_id: { _eq: $websiteId }\n is_visible: { _eq: true }\n }\n chain_products: {\n chain_id: { _eq: $chainId }\n is_enabled: { _eq: true }\n status: { _eq: active }\n }\n }\n }\n order_by: { sort_order: asc }\n ) {\n id\n product_id\n display_label\n sort_order\n product {\n id\n slug\n name\n sku\n product_media(\n where: { file: { mimeType: { _ilike: \"image/%\" } } }\n order_by: { order: asc }\n limit: 1\n ) {\n id\n file_id\n order\n file {\n mimeType\n name\n }\n }\n }\n }\n }\n }\n name\n description\n long_description\n slug\n seo_title\n seo_description\n seo_image_file_id\n category\n subcategory\n color\n measurement_unit\n created_at\n updated_at\n brand {\n id\n name\n }\n seo_image_file {\n mimeType\n name\n }\n product_variants(\n where: { is_disabled: { _eq: false } }\n order_by: { order: asc }\n ) {\n id\n sku\n barcode\n order\n weight\n depth\n height\n length\n product_variant_prices(\n where: {\n price_type: { _in: [CLIENT, SALE, WHOLESALE, WHOLESALE_2] }\n _or: [\n { chain_id: { _eq: $chainId } }\n { chain_id: { _is_null: true } }\n ]\n }\n ) {\n id\n price\n price_type\n chain_id\n }\n product_variant_attributes(order_by: { order: asc }) {\n id\n value\n order\n attribute_value {\n id\n code\n sort_order\n metadata\n }\n attribute {\n id\n name\n }\n }\n }\n product_media(order_by: { order: asc }) {\n id\n file_id\n order\n file {\n mimeType\n name\n }\n }\n product_related_products(\n where: {\n related_product: {\n chain_products: {\n chain_id: { _eq: $chainId }\n is_enabled: { _eq: true }\n status: { _eq: active }\n }\n }\n }\n order_by: { sort_order: asc }\n ) {\n id\n related_product_id\n sort_order\n related_product {\n id\n slug\n name\n sku\n product_media(\n where: { file: { mimeType: { _ilike: \"image/%\" } } }\n order_by: { order: asc }\n limit: 1\n ) {\n id\n file_id\n order\n file {\n mimeType\n name\n }\n }\n }\n }\n product_attributes {\n id\n value\n attribute_value {\n id\n code\n sort_order\n metadata\n }\n attribute {\n id\n name\n }\n }\n }\n catalog_attribute_lists(\n where: { company_id: { _eq: $companyId }, status: { _eq: published } }\n order_by: { updated_at: desc }\n ) {\n id\n key\n name\n description\n status\n items(\n where: { is_visible: { _eq: true } }\n order_by: [{ sort_order: asc }, { public_label: asc }]\n ) {\n id\n attribute_id\n public_label\n public_slug\n sort_order\n attribute {\n id\n name\n type\n }\n values(\n where: { is_visible: { _eq: true } }\n order_by: [{ sort_order: asc }, { public_label: asc }]\n ) {\n id\n attribute_value_id\n public_label\n public_slug\n sort_order\n attribute_value {\n id\n code\n metadata\n }\n }\n }\n }\n }\n";
47
50
  readonly GET_PRODUCT_BY_SLUG: string;
48
51
  readonly GET_PRODUCT_SEO_ENTRIES: "\n query GetProductSeoEntries(\n $companyId: uuid!\n $chainId: uuid!\n $websiteId: uuid!\n $limit: Int!\n $offset: Int!\n ) {\n products(\n where: {\n company_id: { _eq: $companyId }\n slug: { _is_null: false }\n product_website_publications: {\n website_id: { _eq: $websiteId }\n is_visible: { _eq: true }\n }\n chain_products: {\n chain_id: { _eq: $chainId }\n is_enabled: { _eq: true }\n status: { _eq: active }\n }\n }\n limit: $limit\n offset: $offset\n order_by: [{ updated_at: desc }, { created_at: desc }]\n ) {\n id\n name\n slug\n seo_title\n seo_description\n seo_image_file_id\n category\n subcategory\n created_at\n updated_at\n seo_image_file {\n mimeType\n name\n }\n product_media(\n where: { file: { mimeType: { _ilike: \"image/%\" } } }\n order_by: { order: asc }\n limit: 1\n ) {\n id\n file_id\n order\n file {\n mimeType\n name\n }\n }\n product_variants(\n where: { is_disabled: { _eq: false } }\n order_by: { order: asc }\n ) {\n id\n product_variant_prices(\n where: {\n price_type: { _in: [CLIENT, SALE, WHOLESALE, WHOLESALE_2] }\n _or: [\n { chain_id: { _eq: $chainId } }\n { chain_id: { _is_null: true } }\n ]\n }\n ) {\n id\n price\n price_type\n chain_id\n }\n }\n }\n }\n";
49
52
  readonly GET_CATEGORIES: "\n query GetCategories {\n product_categories {\n name\n description\n product_subcategories {\n id\n name\n description\n }\n }\n }\n";
@@ -53,17 +56,19 @@ export declare const documents: {
53
56
  readonly WEBSITE_GET_CATALOG_PAGE: "\n mutation WebsiteGetCatalogPage(\n $websiteId: uuid!\n $categoryListKey: String!\n $attributeListKey: String!\n $filters: WebsiteCatalogPageFiltersInput\n $include: WebsiteCatalogPageIncludeInput\n ) {\n result: websiteGetCatalogPage(\n website_id: $websiteId\n category_list_key: $categoryListKey\n attribute_list_key: $attributeListKey\n filters: $filters\n include: $include\n ) {\n success\n products\n category_list\n attribute_list\n filters\n brands\n pagination\n applied_filters\n debug\n errors\n }\n }\n";
54
57
  readonly WEBSITE_GET_PRODUCT_RECOMMENDATIONS: "\n mutation WebsiteGetProductRecommendations(\n $websiteId: uuid!\n $productId: uuid!\n $limit: Int\n ) {\n result: websiteGetProductRecommendations(\n website_id: $websiteId\n product_id: $productId\n limit: $limit\n ) {\n success\n products\n strategy\n errors\n }\n }\n";
55
58
  readonly GET_BRANDS: "\n query GetBrands($companyId: uuid!, $chainId: uuid!) {\n brands(\n where: {\n company_id: { _eq: $companyId }\n products: {\n chain_products: {\n chain_id: { _eq: $chainId }\n is_enabled: { _eq: true }\n status: { _eq: active }\n }\n }\n }\n order_by: { name: asc }\n ) {\n id\n name\n }\n }\n";
56
- readonly CHECK_AVAILABILITY: "\n query CheckAvailability($variantIds: [uuid!]!, $chainId: uuid!) {\n websiteProductAvailability(\n product_variant_ids: $variantIds\n chain_id: $chainId\n ) {\n product_variant_id\n in_stock\n label\n }\n }\n";
59
+ readonly CHECK_AVAILABILITY: "\n query CheckAvailability(\n $variantIds: [uuid!]!\n $chainId: uuid!\n $websiteId: uuid\n ) {\n websiteProductAvailability(\n product_variant_ids: $variantIds\n chain_id: $chainId\n website_id: $websiteId\n ) {\n product_variant_id\n in_stock\n label\n max_purchasable_quantity\n }\n }\n";
60
+ readonly GET_PRODUCT_LIVE_STATE: "\n query GetProductLiveState(\n $variantIds: [uuid!]!\n $companyId: uuid!\n $chainId: uuid!\n $websiteId: uuid!\n ) {\n product_variants(\n where: {\n id: { _in: $variantIds }\n is_disabled: { _eq: false }\n product: {\n company_id: { _eq: $companyId }\n product_website_publications: {\n website_id: { _eq: $websiteId }\n is_visible: { _eq: true }\n }\n chain_products: {\n chain_id: { _eq: $chainId }\n is_enabled: { _eq: true }\n status: { _eq: active }\n }\n }\n }\n ) {\n id\n product_variant_prices(\n where: {\n price_type: { _in: [CLIENT, SALE, WHOLESALE, WHOLESALE_2] }\n _or: [\n { chain_id: { _eq: $chainId } }\n { chain_id: { _is_null: true } }\n ]\n }\n ) {\n id\n price\n price_type\n chain_id\n }\n }\n websiteProductAvailability(\n product_variant_ids: $variantIds\n chain_id: $chainId\n website_id: $websiteId\n ) {\n product_variant_id\n in_stock\n label\n max_purchasable_quantity\n }\n }\n";
57
61
  readonly GET_PRODUCT_FILTERS: "\n query GetProductFilters(\n $companyId: uuid!\n $chainId: uuid!\n $where: products_bool_exp = {}\n $attributeListKey: String!\n ) {\n products(\n where: {\n _and: [\n { company_id: { _eq: $companyId } }\n {\n chain_products: {\n chain_id: { _eq: $chainId }\n is_enabled: { _eq: true }\n status: { _eq: active }\n }\n }\n $where\n ]\n }\n ) {\n id\n category\n subcategory\n color\n brand {\n id\n name\n }\n product_attributes {\n id\n value\n attribute_value {\n id\n code\n sort_order\n metadata\n }\n attribute {\n id\n name\n }\n }\n product_variants(where: { is_disabled: { _eq: false } }) {\n id\n product_variant_prices(\n where: {\n price_type: { _in: [CLIENT, SALE, WHOLESALE, WHOLESALE_2] }\n _or: [\n { chain_id: { _eq: $chainId } }\n { chain_id: { _is_null: true } }\n ]\n }\n ) {\n id\n price\n price_type\n chain_id\n }\n product_variant_attributes(order_by: { order: asc }) {\n id\n value\n order\n attribute_value {\n id\n code\n sort_order\n metadata\n }\n attribute {\n id\n name\n }\n }\n }\n }\n catalog_attribute_lists(\n where: {\n company_id: { _eq: $companyId }\n key: { _eq: $attributeListKey }\n status: { _eq: published }\n }\n limit: 1\n ) {\n id\n key\n name\n description\n status\n items(\n where: { is_visible: { _eq: true } }\n order_by: [{ sort_order: asc }, { public_label: asc }]\n ) {\n id\n attribute_id\n public_label\n public_slug\n sort_order\n attribute {\n id\n name\n type\n }\n values(\n where: { is_visible: { _eq: true } }\n order_by: [{ sort_order: asc }, { public_label: asc }]\n ) {\n id\n attribute_value_id\n public_label\n public_slug\n sort_order\n attribute_value {\n id\n code\n metadata\n }\n }\n }\n }\n }\n";
58
62
  readonly GET_SEARCH_SUGGESTIONS: "\n query GetSearchSuggestions(\n $companyId: uuid!\n $chainId: uuid!\n $term: String!\n $productLimit: Int = 5\n $brandLimit: Int = 3\n ) {\n products(\n where: {\n company_id: { _eq: $companyId }\n chain_products: {\n chain_id: { _eq: $chainId }\n is_enabled: { _eq: true }\n status: { _eq: active }\n }\n name: { _ilike: $term }\n }\n limit: $productLimit\n order_by: { name: asc }\n ) {\n id\n name\n }\n brands(\n where: {\n company_id: { _eq: $companyId }\n name: { _ilike: $term }\n products: {\n chain_products: {\n chain_id: { _eq: $chainId }\n is_enabled: { _eq: true }\n status: { _eq: active }\n }\n }\n }\n limit: $brandLimit\n order_by: { name: asc }\n ) {\n id\n name\n }\n }\n";
59
63
  readonly WEBSITE_GET_CONTENT: "\n mutation WebsiteGetContent(\n $websiteId: uuid!\n $key: String\n $categoryKey: String\n $tag: String\n $locale: String\n ) {\n result: websiteGetContent(\n website_id: $websiteId\n key: $key\n category_key: $categoryKey\n tag: $tag\n locale: $locale\n ) {\n success\n errors\n entries {\n \n id\n key\n category_key\n name\n locale\n status\n tags\n content_json\n resolved_fields\n published_at\n updated_at\n content_type {\n id\n key\n name\n kind\n }\n\n }\n }\n }\n";
60
64
  readonly WEBSITE_GET_PRODUCT_CONTENT: "\n mutation WebsiteGetProductContent(\n $websiteId: uuid!\n $productId: uuid!\n $locale: String\n ) {\n result: websiteGetProductContent(\n website_id: $websiteId\n product_id: $productId\n locale: $locale\n ) {\n success\n errors\n blocks {\n id\n product_id\n locale\n content_json\n resolved_fields\n sort_order\n updated_at\n content_type {\n id\n key\n name\n kind\n }\n }\n }\n }\n";
61
- readonly CREATE_CART: "\n mutation CreateCart(\n $websiteId: uuid!\n $cartToken: String\n $contact: WebsiteGuestContactInput\n $fulfillmentFamily: String\n ) {\n websiteCreateCart(\n website_id: $websiteId\n cart_token: $cartToken\n contact: $contact\n fulfillment_family: $fulfillmentFamily\n ) {\n success\n order_id\n cart_token\n cart {\n id\n status\n discount\n tax\n total_without_tax\n total_with_tax\n total_with_discount\n created_at\n updated_at\n items {\n id\n product_variant_id\n quantity\n product_variant {\n id\n sku\n product {\n id\n name\n }\n prices {\n id\n price\n price_type\n chain_id\n }\n }\n }\n }\n errors\n }\n }\n";
62
- readonly GET_CART: "\n mutation GetCart($orderId: uuid!, $cartToken: String!) {\n websiteGetCart(order_id: $orderId, cart_token: $cartToken) {\n success\n order_id\n cart_token\n cart {\n id\n status\n discount\n tax\n total_without_tax\n total_with_tax\n total_with_discount\n created_at\n updated_at\n items {\n id\n product_variant_id\n quantity\n product_variant {\n id\n sku\n product {\n id\n name\n }\n prices {\n id\n price\n price_type\n chain_id\n }\n }\n }\n }\n errors\n }\n }\n";
63
- readonly START_GUEST_CHECKOUT: "\n mutation StartGuestCheckout(\n $websiteId: uuid!\n $cartToken: String\n $contact: WebsiteGuestContactInput!\n $items: [WebsiteCheckoutItemInput!]!\n $fulfillmentFamily: String\n ) {\n websiteStartGuestCheckout(\n website_id: $websiteId\n cart_token: $cartToken\n contact: $contact\n items: $items\n fulfillment_family: $fulfillmentFamily\n ) {\n success\n order_id\n cart_token\n cart {\n id\n status\n discount\n tax\n total_without_tax\n total_with_tax\n total_with_discount\n created_at\n updated_at\n items {\n id\n product_variant_id\n quantity\n product_variant {\n id\n sku\n product {\n id\n name\n }\n prices {\n id\n price\n price_type\n chain_id\n }\n }\n }\n }\n errors\n }\n }\n";
64
- readonly SET_CART_ITEM: "\n mutation SetCartItem(\n $orderId: uuid!\n $cartToken: String!\n $variantId: uuid!\n $quantity: numeric!\n ) {\n websiteSetCartItem(\n order_id: $orderId\n cart_token: $cartToken\n product_variant_id: $variantId\n quantity: $quantity\n ) {\n success\n order_id\n cart_token\n cart {\n id\n status\n discount\n tax\n total_without_tax\n total_with_tax\n total_with_discount\n created_at\n updated_at\n items {\n id\n product_variant_id\n quantity\n product_variant {\n id\n sku\n product {\n id\n name\n }\n prices {\n id\n price\n price_type\n chain_id\n }\n }\n }\n }\n errors\n }\n }\n";
65
- readonly REMOVE_CART_ITEM: "\n mutation RemoveCartItem(\n $orderId: uuid!\n $cartToken: String!\n $itemId: uuid!\n ) {\n websiteRemoveCartItem(\n order_id: $orderId\n cart_token: $cartToken\n item_id: $itemId\n ) {\n success\n order_id\n cart_token\n cart {\n id\n status\n discount\n tax\n total_without_tax\n total_with_tax\n total_with_discount\n created_at\n updated_at\n items {\n id\n product_variant_id\n quantity\n product_variant {\n id\n sku\n product {\n id\n name\n }\n prices {\n id\n price\n price_type\n chain_id\n }\n }\n }\n }\n errors\n }\n }\n";
66
- readonly CHECKOUT: "\n mutation Checkout(\n $orderId: uuid!\n $cartToken: String!\n $contact: WebsiteGuestContactInput!\n $fulfillmentFamily: String\n $address: WebsiteAddressInput\n $shippingQuoteId: uuid\n $paymentMode: String\n $paymentMethodId: uuid\n $buyerAccountOptIn: Boolean\n $initialPayment: WebsiteInitialPaymentInput\n ) {\n websiteCheckout(\n order_id: $orderId\n cart_token: $cartToken\n contact: $contact\n fulfillment_family: $fulfillmentFamily\n address: $address\n shipping_quote_id: $shippingQuoteId\n payment_mode: $paymentMode\n payment_method_id: $paymentMethodId\n buyer_account_opt_in: $buyerAccountOptIn\n initial_payment: $initialPayment\n ) {\n success\n order_id\n order_number\n payment_method_id\n public_order_token\n requires_payment_session\n buyer_account_invitation_requested\n errors\n }\n }\n";
65
+ readonly CREATE_CART: "\n mutation CreateCart(\n $websiteId: uuid!\n $cartToken: String\n $contact: WebsiteGuestContactInput\n $fulfillmentFamily: String\n ) {\n websiteCreateCart(\n website_id: $websiteId\n cart_token: $cartToken\n contact: $contact\n fulfillment_family: $fulfillmentFamily\n ) {\n success\n order_id\n cart_token\n cart {\n id\n status\n discount\n tax\n total_without_tax\n total_with_tax\n total_with_discount\n created_at\n updated_at\n volume_pricing {\n enabled\n eligibleQuantity\n appliedPriceType\n appliedMinQuantity\n nextPriceType\n nextMinQuantity\n remainingQuantity\n totalSavings\n }\n items {\n id\n product_variant_id\n quantity\n unit_price\n line_total\n base_unit_price\n unit_savings\n line_savings\n volume_pricing_eligible\n resolved_price_type\n volume_pricing_min_quantity\n product_variant {\n id\n sku\n product {\n id\n name\n }\n prices {\n id\n price\n price_type\n chain_id\n }\n }\n }\n }\n errors\n }\n }\n";
66
+ readonly GET_CART: "\n mutation GetCart($orderId: uuid!, $cartToken: String!) {\n websiteGetCart(order_id: $orderId, cart_token: $cartToken) {\n success\n order_id\n cart_token\n cart {\n id\n status\n discount\n tax\n total_without_tax\n total_with_tax\n total_with_discount\n created_at\n updated_at\n volume_pricing {\n enabled\n eligibleQuantity\n appliedPriceType\n appliedMinQuantity\n nextPriceType\n nextMinQuantity\n remainingQuantity\n totalSavings\n }\n items {\n id\n product_variant_id\n quantity\n unit_price\n line_total\n base_unit_price\n unit_savings\n line_savings\n volume_pricing_eligible\n resolved_price_type\n volume_pricing_min_quantity\n product_variant {\n id\n sku\n product {\n id\n name\n }\n prices {\n id\n price\n price_type\n chain_id\n }\n }\n }\n }\n errors\n }\n }\n";
67
+ readonly START_GUEST_CHECKOUT: "\n mutation StartGuestCheckout(\n $websiteId: uuid!\n $cartToken: String\n $contact: WebsiteGuestContactInput!\n $items: [WebsiteCheckoutItemInput!]!\n $fulfillmentFamily: String\n $marketingAttribution: WebsiteMarketingAttributionInput\n ) {\n websiteStartGuestCheckout(\n website_id: $websiteId\n cart_token: $cartToken\n contact: $contact\n items: $items\n fulfillment_family: $fulfillmentFamily\n marketing_attribution: $marketingAttribution\n ) {\n success\n order_id\n cart_token\n cart {\n id\n status\n discount\n tax\n total_without_tax\n total_with_tax\n total_with_discount\n created_at\n updated_at\n volume_pricing {\n enabled\n eligibleQuantity\n appliedPriceType\n appliedMinQuantity\n nextPriceType\n nextMinQuantity\n remainingQuantity\n totalSavings\n }\n items {\n id\n product_variant_id\n quantity\n unit_price\n line_total\n base_unit_price\n unit_savings\n line_savings\n volume_pricing_eligible\n resolved_price_type\n volume_pricing_min_quantity\n product_variant {\n id\n sku\n product {\n id\n name\n }\n prices {\n id\n price\n price_type\n chain_id\n }\n }\n }\n }\n errors\n }\n }\n";
68
+ readonly SET_CART_ITEM: "\n mutation SetCartItem(\n $orderId: uuid!\n $cartToken: String!\n $variantId: uuid!\n $quantity: numeric!\n ) {\n websiteSetCartItem(\n order_id: $orderId\n cart_token: $cartToken\n product_variant_id: $variantId\n quantity: $quantity\n ) {\n success\n order_id\n cart_token\n cart {\n id\n status\n discount\n tax\n total_without_tax\n total_with_tax\n total_with_discount\n created_at\n updated_at\n volume_pricing {\n enabled\n eligibleQuantity\n appliedPriceType\n appliedMinQuantity\n nextPriceType\n nextMinQuantity\n remainingQuantity\n totalSavings\n }\n items {\n id\n product_variant_id\n quantity\n unit_price\n line_total\n base_unit_price\n unit_savings\n line_savings\n volume_pricing_eligible\n resolved_price_type\n volume_pricing_min_quantity\n product_variant {\n id\n sku\n product {\n id\n name\n }\n prices {\n id\n price\n price_type\n chain_id\n }\n }\n }\n }\n errors\n }\n }\n";
69
+ readonly REMOVE_CART_ITEM: "\n mutation RemoveCartItem(\n $orderId: uuid!\n $cartToken: String!\n $itemId: uuid!\n ) {\n websiteRemoveCartItem(\n order_id: $orderId\n cart_token: $cartToken\n item_id: $itemId\n ) {\n success\n order_id\n cart_token\n cart {\n id\n status\n discount\n tax\n total_without_tax\n total_with_tax\n total_with_discount\n created_at\n updated_at\n volume_pricing {\n enabled\n eligibleQuantity\n appliedPriceType\n appliedMinQuantity\n nextPriceType\n nextMinQuantity\n remainingQuantity\n totalSavings\n }\n items {\n id\n product_variant_id\n quantity\n unit_price\n line_total\n base_unit_price\n unit_savings\n line_savings\n volume_pricing_eligible\n resolved_price_type\n volume_pricing_min_quantity\n product_variant {\n id\n sku\n product {\n id\n name\n }\n prices {\n id\n price\n price_type\n chain_id\n }\n }\n }\n }\n errors\n }\n }\n";
70
+ readonly DISCARD_CART: "\n mutation DiscardCart($orderId: uuid!, $cartToken: String!) {\n websiteDiscardCart(order_id: $orderId, cart_token: $cartToken) {\n success\n order_id\n website_cart_status\n errors\n }\n }\n";
71
+ readonly CHECKOUT: "\n mutation Checkout(\n $orderId: uuid!\n $cartToken: String!\n $contact: WebsiteGuestContactInput!\n $fulfillmentFamily: String\n $address: WebsiteAddressInput\n $shippingQuoteId: uuid\n $paymentMode: String\n $paymentMethodId: uuid\n $buyerAccountOptIn: Boolean\n $initialPayment: WebsiteInitialPaymentInput\n $marketingAttribution: WebsiteMarketingAttributionInput\n $advertisingConsent: WebsiteAdvertisingConsentInput\n ) {\n websiteCheckout(\n order_id: $orderId\n cart_token: $cartToken\n contact: $contact\n fulfillment_family: $fulfillmentFamily\n address: $address\n shipping_quote_id: $shippingQuoteId\n payment_mode: $paymentMode\n payment_method_id: $paymentMethodId\n buyer_account_opt_in: $buyerAccountOptIn\n initial_payment: $initialPayment\n marketing_attribution: $marketingAttribution\n advertising_consent: $advertisingConsent\n ) {\n success\n order_id\n order_number\n payment_method_id\n public_order_token\n requires_payment_session\n buyer_account_invitation_requested\n errors\n }\n }\n";
67
72
  readonly GET_LOCATION_OPTIONS: "\n mutation GetLocationOptions($websiteId: uuid!) {\n websiteGetLocationOptions(website_id: $websiteId) {\n success\n country_code\n departments {\n department_id\n department_name\n department_code\n municipalities {\n municipality_id\n municipality_name\n municipality_code\n department_id\n department_code\n }\n }\n errors\n }\n }\n";
68
73
  readonly GET_DELIVERY_OPTIONS: "\n mutation GetDeliveryOptions($websiteId: uuid!) {\n websiteGetDeliveryOptions(website_id: $websiteId) {\n success\n delivery_options {\n id\n fulfillment_family\n label\n description\n is_enabled\n pickup_info {\n label\n address\n schedule\n notes\n }\n }\n errors\n }\n }\n";
69
74
  readonly GET_SHIPPING_POLICY: "\n mutation GetShippingPolicy($websiteId: uuid!) {\n websiteGetShippingPolicy(website_id: $websiteId) {\n success\n policy {\n free_shipping_enabled\n free_shipping_threshold\n currency\n }\n errors\n }\n }\n";
@@ -1,7 +1,19 @@
1
1
  export type RequestHeaders = Record<string, string>;
2
2
  export type RequestHeadersProvider = () => RequestHeaders | Promise<RequestHeaders>;
3
+ export interface GraphQLRetryOptions {
4
+ /** Total attempts, including the initial request. */
5
+ maxAttempts?: number;
6
+ /** Maximum cumulative wait accepted from the server. */
7
+ maxTotalWaitMs?: number;
8
+ /** Adds delay without ever retrying before Retry-After. */
9
+ jitterRatio?: number;
10
+ }
11
+ export interface GraphQLRequestOptions {
12
+ /** Disabled by default. Enable only for idempotent reads. */
13
+ retry?: GraphQLRetryOptions;
14
+ }
3
15
  /**
4
16
  * Minimal fetch-based GraphQL executor.
5
17
  * Zero dependencies — uses the native `fetch` API.
6
18
  */
7
- export declare function executeGraphQL<T = Record<string, unknown>>(url: string, query: string, variables?: Record<string, unknown>, headers?: RequestHeaders | RequestHeadersProvider): Promise<T>;
19
+ export declare function executeGraphQL<T = Record<string, unknown>>(url: string, query: string, variables?: Record<string, unknown>, headers?: RequestHeaders | RequestHeadersProvider, options?: GraphQLRequestOptions): Promise<T>;