@faststore/api 2.0.65-alpha.0 → 2.0.73-alpha.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.
@@ -402,6 +402,14 @@ export declare type QueryShippingArgs = {
402
402
  items: Array<IShippingItem>;
403
403
  postalCode: Scalars['String'];
404
404
  };
405
+ /** Search result. */
406
+ export declare type SearchMetadata = {
407
+ __typename?: 'SearchMetadata';
408
+ /** Indicates if the search term was misspelled. */
409
+ isTermMisspelled: Scalars['Boolean'];
410
+ /** Logical operator used to run the search. */
411
+ logicalOperator: Scalars['String'];
412
+ };
405
413
  /** Shipping Simulation information. */
406
414
  export declare type ShippingData = {
407
415
  __typename?: 'ShippingData';
@@ -834,6 +842,8 @@ export declare type StoreSearchResult = {
834
842
  __typename?: 'StoreSearchResult';
835
843
  /** Array of search result facets. */
836
844
  facets: Array<StoreFacet>;
845
+ /** Search result metadata. Additional data can be used to send analytics events. */
846
+ metadata?: Maybe<SearchMetadata>;
837
847
  /** Search result products. */
838
848
  products: StoreProductConnection;
839
849
  /** Search result suggestions. */
@@ -1622,7 +1622,7 @@ const Query = {
1622
1622
  term,
1623
1623
  selectedFacets
1624
1624
  }, ctx) => {
1625
- var _selectedFacets$flatM;
1625
+ var _query, _selectedFacets$flatM;
1626
1626
  // Insert channel in context for later usage
1627
1627
  const channel = findChannel(selectedFacets);
1628
1628
  const locale = findLocale(selectedFacets);
@@ -1654,11 +1654,15 @@ const Query = {
1654
1654
  const searchArgs = {
1655
1655
  page: Math.ceil(after / first),
1656
1656
  count: first,
1657
- query,
1657
+ query: (_query = query) != null ? _query : undefined,
1658
1658
  sort: SORT_MAP[sort != null ? sort : 'score_desc'],
1659
1659
  selectedFacets: (_selectedFacets$flatM = selectedFacets == null ? void 0 : selectedFacets.flatMap(transformSelectedFacet)) != null ? _selectedFacets$flatM : []
1660
1660
  };
1661
- return searchArgs;
1661
+ const productSearchPromise = ctx.clients.search.products(searchArgs);
1662
+ return {
1663
+ searchArgs,
1664
+ productSearchPromise
1665
+ };
1662
1666
  },
1663
1667
  allProducts: async (_, {
1664
1668
  first,
@@ -1775,12 +1779,15 @@ const StoreReview = {
1775
1779
 
1776
1780
  const isRootFacet = facet => facet.key === 'category-1';
1777
1781
  const StoreSearchResult = {
1778
- suggestions: async (searchArgs, _, ctx) => {
1782
+ suggestions: async (root, _, ctx) => {
1779
1783
  const {
1780
1784
  clients: {
1781
1785
  search
1782
1786
  }
1783
1787
  } = ctx;
1788
+ const {
1789
+ searchArgs
1790
+ } = root;
1784
1791
  // If there's no search query, suggest the most popular searches.
1785
1792
  if (!searchArgs.query) {
1786
1793
  const topSearches = await search.topSearches();
@@ -1792,9 +1799,11 @@ const StoreSearchResult = {
1792
1799
  products: []
1793
1800
  };
1794
1801
  }
1795
- const terms = await search.suggestedTerms(searchArgs);
1796
- const products = await search.products(searchArgs);
1797
- const skus = products.products.map(product => {
1802
+ const {
1803
+ productSearchPromise
1804
+ } = root;
1805
+ const [terms, productSearchResult] = await Promise.all([search.suggestedTerms(searchArgs), productSearchPromise]);
1806
+ const skus = productSearchResult.products.map(product => {
1798
1807
  const [maybeSku] = product.items;
1799
1808
  return maybeSku && enhanceSku(maybeSku, product);
1800
1809
  }).filter(sku => !!sku);
@@ -1809,38 +1818,21 @@ const StoreSearchResult = {
1809
1818
  products: skus
1810
1819
  };
1811
1820
  },
1812
- products: async (searchArgs, _, ctx) => {
1813
- const {
1814
- clients: {
1815
- search,
1816
- sp
1817
- }
1818
- } = ctx;
1819
- const products = await search.products(searchArgs);
1820
- // Raise event on search's analytics API when performing
1821
- // a full text search.
1822
- if (searchArgs.query) {
1823
- var _products$correction$, _products$correction;
1824
- sp.sendEvent({
1825
- type: 'search.query',
1826
- text: searchArgs.query,
1827
- misspelled: (_products$correction$ = (_products$correction = products.correction) == null ? void 0 : _products$correction.misspelled) != null ? _products$correction$ : false,
1828
- match: products.recordsFiltered,
1829
- operator: products.operator,
1830
- locale: ctx.storage.locale
1831
- }).catch(console.error);
1832
- }
1833
- const skus = products.products.map(product => {
1821
+ products: async ({
1822
+ productSearchPromise
1823
+ }) => {
1824
+ const productSearchResult = await productSearchPromise;
1825
+ const skus = productSearchResult.products.map(product => {
1834
1826
  const [maybeSku] = product.items;
1835
1827
  return maybeSku && enhanceSku(maybeSku, product);
1836
1828
  }).filter(sku => !!sku);
1837
1829
  return {
1838
1830
  pageInfo: {
1839
- hasNextPage: products.pagination.after.length > 0,
1840
- hasPreviousPage: products.pagination.before.length > 0,
1831
+ hasNextPage: productSearchResult.pagination.after.length > 0,
1832
+ hasPreviousPage: productSearchResult.pagination.before.length > 0,
1841
1833
  startCursor: '0',
1842
- endCursor: products.recordsFiltered.toString(),
1843
- totalCount: products.recordsFiltered
1834
+ endCursor: productSearchResult.recordsFiltered.toString(),
1835
+ totalCount: productSearchResult.recordsFiltered
1844
1836
  },
1845
1837
  edges: skus.map((sku, index) => ({
1846
1838
  node: sku,
@@ -1848,7 +1840,9 @@ const StoreSearchResult = {
1848
1840
  }))
1849
1841
  };
1850
1842
  },
1851
- facets: async (searchArgs, _, ctx) => {
1843
+ facets: async ({
1844
+ searchArgs
1845
+ }, _, ctx) => {
1852
1846
  const {
1853
1847
  clients: {
1854
1848
  search: is
@@ -1863,6 +1857,20 @@ const StoreSearchResult = {
1863
1857
  // Remove root facet on category pages
1864
1858
  .filter(facet => !isCollectionPage || !isRootFacet(facet));
1865
1859
  return filteredFacets;
1860
+ },
1861
+ metadata: async ({
1862
+ searchArgs,
1863
+ productSearchPromise
1864
+ }) => {
1865
+ var _productSearchResult$, _productSearchResult$2;
1866
+ if (!searchArgs.query) {
1867
+ return null;
1868
+ }
1869
+ const productSearchResult = await productSearchPromise;
1870
+ return {
1871
+ isTermMisspelled: (_productSearchResult$ = (_productSearchResult$2 = productSearchResult.correction) == null ? void 0 : _productSearchResult$2.misspelled) != null ? _productSearchResult$ : false,
1872
+ logicalOperator: productSearchResult.operator
1873
+ };
1866
1874
  }
1867
1875
  };
1868
1876
 
@@ -2178,8 +2186,8 @@ var doc$j = {"kind":"Document","definitions":[{"kind":"ObjectTypeDefinition","de
2178
2186
  var doc$k = {"kind":"Document","definitions":[{"kind":"ObjectTypeDefinition","description":{"kind":"StringValue","value":"Properties that can be associated with products and products groups.","block":true},"name":{"kind":"Name","value":"StorePropertyValue"},"interfaces":[],"directives":[],"fields":[{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Property id. This propert changes according to the content of the object.","block":true},"name":{"kind":"Name","value":"propertyID"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Property value. May hold a string or the string representation of an object.","block":true},"name":{"kind":"Name","value":"value"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ObjectOrString"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Property name.","block":true},"name":{"kind":"Name","value":"name"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Specifies the nature of the value","block":true},"name":{"kind":"Name","value":"valueReference"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]}]},{"kind":"InputObjectTypeDefinition","name":{"kind":"Name","value":"IStorePropertyValue"},"directives":[],"fields":[{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Property id. This propert changes according to the content of the object.","block":true},"name":{"kind":"Name","value":"propertyID"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}},"directives":[]},{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Property value. May hold a string or the string representation of an object.","block":true},"name":{"kind":"Name","value":"value"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ObjectOrString"}}},"directives":[]},{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Property name.","block":true},"name":{"kind":"Name","value":"name"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]},{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Specifies the nature of the value","block":true},"name":{"kind":"Name","value":"valueReference"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]}]}],"loc":{"start":0,"end":825}};
2179
2187
  doc$k.loc.source = {"body":"\"\"\"\nProperties that can be associated with products and products groups.\n\"\"\"\ntype StorePropertyValue {\n \"\"\"\n Property id. This propert changes according to the content of the object.\n \"\"\"\n propertyID: String!\n \"\"\"\n Property value. May hold a string or the string representation of an object.\n \"\"\"\n value: ObjectOrString!\n \"\"\"\n Property name.\n \"\"\"\n name: String!\n \"\"\"\n Specifies the nature of the value\n \"\"\"\n valueReference: String!\n}\n\ninput IStorePropertyValue {\n \"\"\"\n Property id. This propert changes according to the content of the object.\n \"\"\"\n propertyID: String\n \"\"\"\n Property value. May hold a string or the string representation of an object.\n \"\"\"\n value: ObjectOrString!\n \"\"\"\n Property name.\n \"\"\"\n name: String!\n \"\"\"\n Specifies the nature of the value\n \"\"\"\n valueReference: String!\n}\n","name":"GraphQL request","locationOffset":{"line":1,"column":1}};
2180
2188
 
2181
- var doc$l = {"kind":"Document","definitions":[{"kind":"ObjectTypeDefinition","description":{"kind":"StringValue","value":"Each product edge contains a `node`, with product information, and a `cursor`, that can be used as a reference for pagination.","block":true},"name":{"kind":"Name","value":"StoreProductEdge"},"interfaces":[],"directives":[],"fields":[{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Each product node contains the information of a product returned by the query.","block":true},"name":{"kind":"Name","value":"node"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreProduct"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Product cursor. Used as pagination reference.","block":true},"name":{"kind":"Name","value":"cursor"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]}]},{"kind":"ObjectTypeDefinition","description":{"kind":"StringValue","value":"Product connections, including pagination information and products returned by the query.","block":true},"name":{"kind":"Name","value":"StoreProductConnection"},"interfaces":[],"directives":[],"fields":[{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Product pagination information.","block":true},"name":{"kind":"Name","value":"pageInfo"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StorePageInfo"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Array with product connection edges, each containing a product and a corresponding cursor.","block":true},"name":{"kind":"Name","value":"edges"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreProductEdge"}}}}},"directives":[]}]},{"kind":"ObjectTypeDefinition","description":{"kind":"StringValue","value":"Each collection edge contains a `node`, with product collection information, and a `cursor`, that can be used as a reference for pagination.","block":true},"name":{"kind":"Name","value":"StoreCollectionEdge"},"interfaces":[],"directives":[],"fields":[{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Each collection node contains the information of a product collection returned by the query.","block":true},"name":{"kind":"Name","value":"node"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreCollection"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Collection cursor. Used as pagination reference.","block":true},"name":{"kind":"Name","value":"cursor"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]}]},{"kind":"ObjectTypeDefinition","description":{"kind":"StringValue","value":"Collection connections, including pagination information and collections returned by the query.","block":true},"name":{"kind":"Name","value":"StoreCollectionConnection"},"interfaces":[],"directives":[],"fields":[{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Collection pagination information.","block":true},"name":{"kind":"Name","value":"pageInfo"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StorePageInfo"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Array with collection connection page edges, each containing a collection and a corresponding cursor..","block":true},"name":{"kind":"Name","value":"edges"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreCollectionEdge"}}}}},"directives":[]}]},{"kind":"EnumTypeDefinition","description":{"kind":"StringValue","value":"Product search results sorting options.","block":true},"name":{"kind":"Name","value":"StoreSort"},"directives":[],"values":[{"kind":"EnumValueDefinition","description":{"kind":"StringValue","value":"Sort by price, from highest to lowest.","block":true},"name":{"kind":"Name","value":"price_desc"},"directives":[]},{"kind":"EnumValueDefinition","description":{"kind":"StringValue","value":"Sort by price, from lowest to highest.","block":true},"name":{"kind":"Name","value":"price_asc"},"directives":[]},{"kind":"EnumValueDefinition","description":{"kind":"StringValue","value":"Sort by orders, from highest to lowest.","block":true},"name":{"kind":"Name","value":"orders_desc"},"directives":[]},{"kind":"EnumValueDefinition","description":{"kind":"StringValue","value":"Sort by name, in reverse alphabetical order.","block":true},"name":{"kind":"Name","value":"name_desc"},"directives":[]},{"kind":"EnumValueDefinition","description":{"kind":"StringValue","value":"Sort by name, in alphabetical order.","block":true},"name":{"kind":"Name","value":"name_asc"},"directives":[]},{"kind":"EnumValueDefinition","description":{"kind":"StringValue","value":"Sort by release date, from highest to lowest.","block":true},"name":{"kind":"Name","value":"release_desc"},"directives":[]},{"kind":"EnumValueDefinition","description":{"kind":"StringValue","value":"Sort by discount value, from highest to lowest.","block":true},"name":{"kind":"Name","value":"discount_desc"},"directives":[]},{"kind":"EnumValueDefinition","description":{"kind":"StringValue","value":"Sort by product score, from highest to lowest.","block":true},"name":{"kind":"Name","value":"score_desc"},"directives":[]}]},{"kind":"InputObjectTypeDefinition","description":{"kind":"StringValue","value":"Selected search facet input.","block":true},"name":{"kind":"Name","value":"IStoreSelectedFacet"},"directives":[],"fields":[{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Selected search facet key.","block":true},"name":{"kind":"Name","value":"key"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]},{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Selected search facet value.","block":true},"name":{"kind":"Name","value":"value"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]}]},{"kind":"EnumTypeDefinition","description":{"kind":"StringValue","value":"Search facet type.","block":true},"name":{"kind":"Name","value":"StoreFacetType"},"directives":[],"values":[{"kind":"EnumValueDefinition","description":{"kind":"StringValue","value":"Indicates boolean search facet.","block":true},"name":{"kind":"Name","value":"BOOLEAN"},"directives":[]},{"kind":"EnumValueDefinition","description":{"kind":"StringValue","value":"Indicates range type search facet.","block":true},"name":{"kind":"Name","value":"RANGE"},"directives":[]}]},{"kind":"ObjectTypeDefinition","description":{"kind":"StringValue","value":"Suggestion term.","block":true},"name":{"kind":"Name","value":"StoreSuggestionTerm"},"interfaces":[],"directives":[],"fields":[{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"The term.","block":true},"name":{"kind":"Name","value":"value"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Its occurrences count.","block":true},"name":{"kind":"Name","value":"count"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},"directives":[]}]},{"kind":"ObjectTypeDefinition","description":{"kind":"StringValue","value":"Suggestions information.","block":true},"name":{"kind":"Name","value":"StoreSuggestions"},"interfaces":[],"directives":[],"fields":[{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Array with suggestion terms.","block":true},"name":{"kind":"Name","value":"terms"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreSuggestionTerm"}}}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Array with suggestion products' information.","block":true},"name":{"kind":"Name","value":"products"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreProduct"}}}}},"directives":[]}]},{"kind":"ObjectTypeDefinition","description":{"kind":"StringValue","value":"Search result.","block":true},"name":{"kind":"Name","value":"StoreSearchResult"},"interfaces":[],"directives":[],"fields":[{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Search result products.","block":true},"name":{"kind":"Name","value":"products"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreProductConnection"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Array of search result facets.","block":true},"name":{"kind":"Name","value":"facets"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreFacet"}}}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Search result suggestions.","block":true},"name":{"kind":"Name","value":"suggestions"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreSuggestions"}}},"directives":[]}]},{"kind":"ObjectTypeDefinition","name":{"kind":"Name","value":"Query"},"interfaces":[],"directives":[],"fields":[{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Returns the details of a product based on the specified locator.","block":true},"name":{"kind":"Name","value":"product"},"arguments":[{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"An array of selected search facets.","block":true},"name":{"kind":"Name","value":"locator"},"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"IStoreSelectedFacet"}}}}},"directives":[]}],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreProduct"}}},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"cacheControl"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"scope"},"value":{"kind":"StringValue","value":"public","block":false}},{"kind":"Argument","name":{"kind":"Name","value":"sMaxAge"},"value":{"kind":"IntValue","value":"120"}},{"kind":"Argument","name":{"kind":"Name","value":"staleWhileRevalidate"},"value":{"kind":"IntValue","value":"3600"}}]}]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Returns the details of a collection based on the collection slug.","block":true},"name":{"kind":"Name","value":"collection"},"arguments":[{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Collection slug.","block":true},"name":{"kind":"Name","value":"slug"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]}],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreCollection"}}},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"cacheControl"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"scope"},"value":{"kind":"StringValue","value":"public","block":false}},{"kind":"Argument","name":{"kind":"Name","value":"sMaxAge"},"value":{"kind":"IntValue","value":"120"}},{"kind":"Argument","name":{"kind":"Name","value":"staleWhileRevalidate"},"value":{"kind":"IntValue","value":"3600"}}]}]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Returns the result of a product, facet, or suggestion search.","block":true},"name":{"kind":"Name","value":"search"},"arguments":[{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Search pagination argument, indicating how many results should be returned from the complete result list.","block":true},"name":{"kind":"Name","value":"first"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},"directives":[]},{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Search pagination argument, indicating the cursor corresponding with the item after which the results should be fetched.","block":true},"name":{"kind":"Name","value":"after"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}},"directives":[]},{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Search results sorting mode.","block":true},"name":{"kind":"Name","value":"sort"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreSort"}},"defaultValue":{"kind":"EnumValue","value":"score_desc"},"directives":[]},{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Search term.","block":true},"name":{"kind":"Name","value":"term"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}},"defaultValue":{"kind":"StringValue","value":"","block":false},"directives":[]},{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Array of selected search facets.","block":true},"name":{"kind":"Name","value":"selectedFacets"},"type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"IStoreSelectedFacet"}}}},"directives":[]}],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreSearchResult"}}},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"cacheControl"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"scope"},"value":{"kind":"StringValue","value":"public","block":false}},{"kind":"Argument","name":{"kind":"Name","value":"sMaxAge"},"value":{"kind":"IntValue","value":"120"}},{"kind":"Argument","name":{"kind":"Name","value":"staleWhileRevalidate"},"value":{"kind":"IntValue","value":"3600"}}]}]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Returns information about all products.","block":true},"name":{"kind":"Name","value":"allProducts"},"arguments":[{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Product pagination argument, indicating how many items should be returned from the complete result list.","block":true},"name":{"kind":"Name","value":"first"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},"directives":[]},{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Product pagination argument, indicating the cursor corresponding with the item after which the items should be fetched.","block":true},"name":{"kind":"Name","value":"after"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}},"directives":[]}],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreProductConnection"}}},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"cacheControl"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"scope"},"value":{"kind":"StringValue","value":"public","block":false}},{"kind":"Argument","name":{"kind":"Name","value":"sMaxAge"},"value":{"kind":"IntValue","value":"120"}},{"kind":"Argument","name":{"kind":"Name","value":"staleWhileRevalidate"},"value":{"kind":"IntValue","value":"3600"}}]}]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Returns information about all collections.","block":true},"name":{"kind":"Name","value":"allCollections"},"arguments":[{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Collection pagination argument, indicating how many items should be returned from the complete result list.","block":true},"name":{"kind":"Name","value":"first"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},"directives":[]},{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Collection pagination argument, indicating the cursor corresponding with the item after which the items should be fetched.","block":true},"name":{"kind":"Name","value":"after"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}},"directives":[]}],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreCollectionConnection"}}},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"cacheControl"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"scope"},"value":{"kind":"StringValue","value":"public","block":false}},{"kind":"Argument","name":{"kind":"Name","value":"sMaxAge"},"value":{"kind":"IntValue","value":"120"}},{"kind":"Argument","name":{"kind":"Name","value":"staleWhileRevalidate"},"value":{"kind":"IntValue","value":"3600"}}]}]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Returns information about shipping simulation.","block":true},"name":{"kind":"Name","value":"shipping"},"arguments":[{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"List of SKU products","block":true},"name":{"kind":"Name","value":"items"},"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"IShippingItem"}}}}},"directives":[]},{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Postal code to freight calculator","block":true},"name":{"kind":"Name","value":"postalCode"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]},{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Country of postal code","block":true},"name":{"kind":"Name","value":"country"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]}],"type":{"kind":"NamedType","name":{"kind":"Name","value":"ShippingData"}},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"cacheControl"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"scope"},"value":{"kind":"StringValue","value":"public","block":false}},{"kind":"Argument","name":{"kind":"Name","value":"sMaxAge"},"value":{"kind":"IntValue","value":"120"}},{"kind":"Argument","name":{"kind":"Name","value":"staleWhileRevalidate"},"value":{"kind":"IntValue","value":"3600"}}]}]}]}],"loc":{"start":0,"end":5680}};
2182
- doc$l.loc.source = {"body":"\"\"\"\nEach product edge contains a `node`, with product information, and a `cursor`, that can be used as a reference for pagination.\n\"\"\"\ntype StoreProductEdge {\n \"\"\"\n Each product node contains the information of a product returned by the query.\n \"\"\"\n node: StoreProduct!\n \"\"\"\n Product cursor. Used as pagination reference.\n \"\"\"\n cursor: String!\n}\n\n\"\"\"\nProduct connections, including pagination information and products returned by the query.\n\"\"\"\ntype StoreProductConnection {\n \"\"\"\n Product pagination information.\n \"\"\"\n pageInfo: StorePageInfo!\n \"\"\"\n Array with product connection edges, each containing a product and a corresponding cursor.\n \"\"\"\n edges: [StoreProductEdge!]!\n}\n\n\"\"\"\nEach collection edge contains a `node`, with product collection information, and a `cursor`, that can be used as a reference for pagination.\n\"\"\"\ntype StoreCollectionEdge {\n \"\"\"\n Each collection node contains the information of a product collection returned by the query.\n \"\"\"\n node: StoreCollection!\n \"\"\"\n Collection cursor. Used as pagination reference.\n \"\"\"\n cursor: String!\n}\n\n\"\"\"\nCollection connections, including pagination information and collections returned by the query.\n\"\"\"\ntype StoreCollectionConnection {\n \"\"\"\n Collection pagination information.\n \"\"\"\n pageInfo: StorePageInfo!\n \"\"\"\n Array with collection connection page edges, each containing a collection and a corresponding cursor..\n \"\"\"\n edges: [StoreCollectionEdge!]!\n}\n\n\"\"\"\nProduct search results sorting options.\n\"\"\"\nenum StoreSort {\n \"\"\"\n Sort by price, from highest to lowest.\n \"\"\"\n price_desc\n \"\"\"\n Sort by price, from lowest to highest.\n \"\"\"\n price_asc\n \"\"\"\n Sort by orders, from highest to lowest.\n \"\"\"\n orders_desc\n \"\"\"\n Sort by name, in reverse alphabetical order.\n \"\"\"\n name_desc\n \"\"\"\n Sort by name, in alphabetical order.\n \"\"\"\n name_asc\n \"\"\"\n Sort by release date, from highest to lowest.\n \"\"\"\n release_desc\n \"\"\"\n Sort by discount value, from highest to lowest.\n \"\"\"\n discount_desc\n \"\"\"\n Sort by product score, from highest to lowest.\n \"\"\"\n score_desc\n}\n\n\"\"\"\nSelected search facet input.\n\"\"\"\ninput IStoreSelectedFacet {\n \"\"\"\n Selected search facet key.\n \"\"\"\n key: String!\n \"\"\"\n Selected search facet value.\n \"\"\"\n value: String!\n}\n\n\"\"\"\nSearch facet type.\n\"\"\"\nenum StoreFacetType {\n \"\"\"\n Indicates boolean search facet.\n \"\"\"\n BOOLEAN\n \"\"\"\n Indicates range type search facet.\n \"\"\"\n RANGE\n}\n\n\"\"\"\nSuggestion term.\n\"\"\"\ntype StoreSuggestionTerm {\n \"\"\"\n The term.\n \"\"\"\n value: String!\n \"\"\"\n Its occurrences count.\n \"\"\"\n count: Int!\n}\n\n\"\"\"\nSuggestions information.\n\"\"\"\ntype StoreSuggestions {\n \"\"\"\n Array with suggestion terms.\n \"\"\"\n terms: [StoreSuggestionTerm!]!\n \"\"\"\n Array with suggestion products' information.\n \"\"\"\n products: [StoreProduct!]!\n}\n\n\"\"\"\nSearch result.\n\"\"\"\ntype StoreSearchResult {\n \"\"\"\n Search result products.\n \"\"\"\n products: StoreProductConnection!\n \"\"\"\n Array of search result facets.\n \"\"\"\n facets: [StoreFacet!]!\n \"\"\"\n Search result suggestions.\n \"\"\"\n suggestions: StoreSuggestions!\n}\n\ntype Query {\n \"\"\"\n Returns the details of a product based on the specified locator.\n \"\"\"\n product(\n \"\"\"\n An array of selected search facets.\n \"\"\"\n locator: [IStoreSelectedFacet!]!\n ): StoreProduct!\n @cacheControl(scope: \"public\", sMaxAge: 120, staleWhileRevalidate: 3600)\n\n \"\"\"\n Returns the details of a collection based on the collection slug.\n \"\"\"\n collection(\n \"\"\"\n Collection slug.\n \"\"\"\n slug: String!\n ): StoreCollection!\n @cacheControl(scope: \"public\", sMaxAge: 120, staleWhileRevalidate: 3600)\n\n \"\"\"\n Returns the result of a product, facet, or suggestion search.\n \"\"\"\n search(\n \"\"\"\n Search pagination argument, indicating how many results should be returned from the complete result list.\n \"\"\"\n first: Int!\n \"\"\"\n Search pagination argument, indicating the cursor corresponding with the item after which the results should be fetched.\n \"\"\"\n after: String\n \"\"\"\n Search results sorting mode.\n \"\"\"\n sort: StoreSort = score_desc\n \"\"\"\n Search term.\n \"\"\"\n term: String = \"\"\n \"\"\"\n Array of selected search facets.\n \"\"\"\n selectedFacets: [IStoreSelectedFacet!]\n ): StoreSearchResult!\n @cacheControl(scope: \"public\", sMaxAge: 120, staleWhileRevalidate: 3600)\n\n \"\"\"\n Returns information about all products.\n \"\"\"\n allProducts(\n \"\"\"\n Product pagination argument, indicating how many items should be returned from the complete result list.\n \"\"\"\n first: Int!\n \"\"\"\n Product pagination argument, indicating the cursor corresponding with the item after which the items should be fetched.\n \"\"\"\n after: String\n ): StoreProductConnection!\n @cacheControl(scope: \"public\", sMaxAge: 120, staleWhileRevalidate: 3600)\n\n \"\"\"\n Returns information about all collections.\n \"\"\"\n allCollections(\n \"\"\"\n Collection pagination argument, indicating how many items should be returned from the complete result list.\n \"\"\"\n first: Int!\n \"\"\"\n Collection pagination argument, indicating the cursor corresponding with the item after which the items should be fetched.\n \"\"\"\n after: String\n ): StoreCollectionConnection!\n @cacheControl(scope: \"public\", sMaxAge: 120, staleWhileRevalidate: 3600)\n\n \"\"\"\n Returns information about shipping simulation.\n \"\"\"\n shipping(\n \"\"\"\n List of SKU products\n \"\"\"\n items: [IShippingItem!]!\n \"\"\"\n Postal code to freight calculator\n \"\"\"\n postalCode: String!\n \"\"\"\n Country of postal code\n \"\"\"\n country: String!\n ): ShippingData\n @cacheControl(scope: \"public\", sMaxAge: 120, staleWhileRevalidate: 3600)\n}\n","name":"GraphQL request","locationOffset":{"line":1,"column":1}};
2189
+ var doc$l = {"kind":"Document","definitions":[{"kind":"ObjectTypeDefinition","description":{"kind":"StringValue","value":"Each product edge contains a `node`, with product information, and a `cursor`, that can be used as a reference for pagination.","block":true},"name":{"kind":"Name","value":"StoreProductEdge"},"interfaces":[],"directives":[],"fields":[{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Each product node contains the information of a product returned by the query.","block":true},"name":{"kind":"Name","value":"node"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreProduct"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Product cursor. Used as pagination reference.","block":true},"name":{"kind":"Name","value":"cursor"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]}]},{"kind":"ObjectTypeDefinition","description":{"kind":"StringValue","value":"Product connections, including pagination information and products returned by the query.","block":true},"name":{"kind":"Name","value":"StoreProductConnection"},"interfaces":[],"directives":[],"fields":[{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Product pagination information.","block":true},"name":{"kind":"Name","value":"pageInfo"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StorePageInfo"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Array with product connection edges, each containing a product and a corresponding cursor.","block":true},"name":{"kind":"Name","value":"edges"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreProductEdge"}}}}},"directives":[]}]},{"kind":"ObjectTypeDefinition","description":{"kind":"StringValue","value":"Each collection edge contains a `node`, with product collection information, and a `cursor`, that can be used as a reference for pagination.","block":true},"name":{"kind":"Name","value":"StoreCollectionEdge"},"interfaces":[],"directives":[],"fields":[{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Each collection node contains the information of a product collection returned by the query.","block":true},"name":{"kind":"Name","value":"node"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreCollection"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Collection cursor. Used as pagination reference.","block":true},"name":{"kind":"Name","value":"cursor"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]}]},{"kind":"ObjectTypeDefinition","description":{"kind":"StringValue","value":"Collection connections, including pagination information and collections returned by the query.","block":true},"name":{"kind":"Name","value":"StoreCollectionConnection"},"interfaces":[],"directives":[],"fields":[{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Collection pagination information.","block":true},"name":{"kind":"Name","value":"pageInfo"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StorePageInfo"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Array with collection connection page edges, each containing a collection and a corresponding cursor..","block":true},"name":{"kind":"Name","value":"edges"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreCollectionEdge"}}}}},"directives":[]}]},{"kind":"EnumTypeDefinition","description":{"kind":"StringValue","value":"Product search results sorting options.","block":true},"name":{"kind":"Name","value":"StoreSort"},"directives":[],"values":[{"kind":"EnumValueDefinition","description":{"kind":"StringValue","value":"Sort by price, from highest to lowest.","block":true},"name":{"kind":"Name","value":"price_desc"},"directives":[]},{"kind":"EnumValueDefinition","description":{"kind":"StringValue","value":"Sort by price, from lowest to highest.","block":true},"name":{"kind":"Name","value":"price_asc"},"directives":[]},{"kind":"EnumValueDefinition","description":{"kind":"StringValue","value":"Sort by orders, from highest to lowest.","block":true},"name":{"kind":"Name","value":"orders_desc"},"directives":[]},{"kind":"EnumValueDefinition","description":{"kind":"StringValue","value":"Sort by name, in reverse alphabetical order.","block":true},"name":{"kind":"Name","value":"name_desc"},"directives":[]},{"kind":"EnumValueDefinition","description":{"kind":"StringValue","value":"Sort by name, in alphabetical order.","block":true},"name":{"kind":"Name","value":"name_asc"},"directives":[]},{"kind":"EnumValueDefinition","description":{"kind":"StringValue","value":"Sort by release date, from highest to lowest.","block":true},"name":{"kind":"Name","value":"release_desc"},"directives":[]},{"kind":"EnumValueDefinition","description":{"kind":"StringValue","value":"Sort by discount value, from highest to lowest.","block":true},"name":{"kind":"Name","value":"discount_desc"},"directives":[]},{"kind":"EnumValueDefinition","description":{"kind":"StringValue","value":"Sort by product score, from highest to lowest.","block":true},"name":{"kind":"Name","value":"score_desc"},"directives":[]}]},{"kind":"InputObjectTypeDefinition","description":{"kind":"StringValue","value":"Selected search facet input.","block":true},"name":{"kind":"Name","value":"IStoreSelectedFacet"},"directives":[],"fields":[{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Selected search facet key.","block":true},"name":{"kind":"Name","value":"key"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]},{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Selected search facet value.","block":true},"name":{"kind":"Name","value":"value"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]}]},{"kind":"EnumTypeDefinition","description":{"kind":"StringValue","value":"Search facet type.","block":true},"name":{"kind":"Name","value":"StoreFacetType"},"directives":[],"values":[{"kind":"EnumValueDefinition","description":{"kind":"StringValue","value":"Indicates boolean search facet.","block":true},"name":{"kind":"Name","value":"BOOLEAN"},"directives":[]},{"kind":"EnumValueDefinition","description":{"kind":"StringValue","value":"Indicates range type search facet.","block":true},"name":{"kind":"Name","value":"RANGE"},"directives":[]}]},{"kind":"ObjectTypeDefinition","description":{"kind":"StringValue","value":"Suggestion term.","block":true},"name":{"kind":"Name","value":"StoreSuggestionTerm"},"interfaces":[],"directives":[],"fields":[{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"The term.","block":true},"name":{"kind":"Name","value":"value"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Its occurrences count.","block":true},"name":{"kind":"Name","value":"count"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},"directives":[]}]},{"kind":"ObjectTypeDefinition","description":{"kind":"StringValue","value":"Suggestions information.","block":true},"name":{"kind":"Name","value":"StoreSuggestions"},"interfaces":[],"directives":[],"fields":[{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Array with suggestion terms.","block":true},"name":{"kind":"Name","value":"terms"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreSuggestionTerm"}}}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Array with suggestion products' information.","block":true},"name":{"kind":"Name","value":"products"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreProduct"}}}}},"directives":[]}]},{"kind":"ObjectTypeDefinition","description":{"kind":"StringValue","value":"Search result.","block":true},"name":{"kind":"Name","value":"SearchMetadata"},"interfaces":[],"directives":[],"fields":[{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Indicates if the search term was misspelled.","block":true},"name":{"kind":"Name","value":"isTermMisspelled"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Logical operator used to run the search.","block":true},"name":{"kind":"Name","value":"logicalOperator"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]}]},{"kind":"ObjectTypeDefinition","description":{"kind":"StringValue","value":"Search result.","block":true},"name":{"kind":"Name","value":"StoreSearchResult"},"interfaces":[],"directives":[],"fields":[{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Search result products.","block":true},"name":{"kind":"Name","value":"products"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreProductConnection"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Array of search result facets.","block":true},"name":{"kind":"Name","value":"facets"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreFacet"}}}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Search result suggestions.","block":true},"name":{"kind":"Name","value":"suggestions"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreSuggestions"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Search result metadata. Additional data can be used to send analytics events.","block":true},"name":{"kind":"Name","value":"metadata"},"arguments":[],"type":{"kind":"NamedType","name":{"kind":"Name","value":"SearchMetadata"}},"directives":[]}]},{"kind":"ObjectTypeDefinition","name":{"kind":"Name","value":"Query"},"interfaces":[],"directives":[],"fields":[{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Returns the details of a product based on the specified locator.","block":true},"name":{"kind":"Name","value":"product"},"arguments":[{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"An array of selected search facets.","block":true},"name":{"kind":"Name","value":"locator"},"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"IStoreSelectedFacet"}}}}},"directives":[]}],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreProduct"}}},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"cacheControl"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"scope"},"value":{"kind":"StringValue","value":"public","block":false}},{"kind":"Argument","name":{"kind":"Name","value":"sMaxAge"},"value":{"kind":"IntValue","value":"120"}},{"kind":"Argument","name":{"kind":"Name","value":"staleWhileRevalidate"},"value":{"kind":"IntValue","value":"3600"}}]}]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Returns the details of a collection based on the collection slug.","block":true},"name":{"kind":"Name","value":"collection"},"arguments":[{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Collection slug.","block":true},"name":{"kind":"Name","value":"slug"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]}],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreCollection"}}},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"cacheControl"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"scope"},"value":{"kind":"StringValue","value":"public","block":false}},{"kind":"Argument","name":{"kind":"Name","value":"sMaxAge"},"value":{"kind":"IntValue","value":"120"}},{"kind":"Argument","name":{"kind":"Name","value":"staleWhileRevalidate"},"value":{"kind":"IntValue","value":"3600"}}]}]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Returns the result of a product, facet, or suggestion search.","block":true},"name":{"kind":"Name","value":"search"},"arguments":[{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Search pagination argument, indicating how many results should be returned from the complete result list.","block":true},"name":{"kind":"Name","value":"first"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},"directives":[]},{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Search pagination argument, indicating the cursor corresponding with the item after which the results should be fetched.","block":true},"name":{"kind":"Name","value":"after"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}},"directives":[]},{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Search results sorting mode.","block":true},"name":{"kind":"Name","value":"sort"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreSort"}},"defaultValue":{"kind":"EnumValue","value":"score_desc"},"directives":[]},{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Search term.","block":true},"name":{"kind":"Name","value":"term"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}},"defaultValue":{"kind":"StringValue","value":"","block":false},"directives":[]},{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Array of selected search facets.","block":true},"name":{"kind":"Name","value":"selectedFacets"},"type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"IStoreSelectedFacet"}}}},"directives":[]}],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreSearchResult"}}},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"cacheControl"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"scope"},"value":{"kind":"StringValue","value":"public","block":false}},{"kind":"Argument","name":{"kind":"Name","value":"sMaxAge"},"value":{"kind":"IntValue","value":"120"}},{"kind":"Argument","name":{"kind":"Name","value":"staleWhileRevalidate"},"value":{"kind":"IntValue","value":"3600"}}]}]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Returns information about all products.","block":true},"name":{"kind":"Name","value":"allProducts"},"arguments":[{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Product pagination argument, indicating how many items should be returned from the complete result list.","block":true},"name":{"kind":"Name","value":"first"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},"directives":[]},{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Product pagination argument, indicating the cursor corresponding with the item after which the items should be fetched.","block":true},"name":{"kind":"Name","value":"after"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}},"directives":[]}],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreProductConnection"}}},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"cacheControl"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"scope"},"value":{"kind":"StringValue","value":"public","block":false}},{"kind":"Argument","name":{"kind":"Name","value":"sMaxAge"},"value":{"kind":"IntValue","value":"120"}},{"kind":"Argument","name":{"kind":"Name","value":"staleWhileRevalidate"},"value":{"kind":"IntValue","value":"3600"}}]}]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Returns information about all collections.","block":true},"name":{"kind":"Name","value":"allCollections"},"arguments":[{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Collection pagination argument, indicating how many items should be returned from the complete result list.","block":true},"name":{"kind":"Name","value":"first"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},"directives":[]},{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Collection pagination argument, indicating the cursor corresponding with the item after which the items should be fetched.","block":true},"name":{"kind":"Name","value":"after"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}},"directives":[]}],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreCollectionConnection"}}},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"cacheControl"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"scope"},"value":{"kind":"StringValue","value":"public","block":false}},{"kind":"Argument","name":{"kind":"Name","value":"sMaxAge"},"value":{"kind":"IntValue","value":"120"}},{"kind":"Argument","name":{"kind":"Name","value":"staleWhileRevalidate"},"value":{"kind":"IntValue","value":"3600"}}]}]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Returns information about shipping simulation.","block":true},"name":{"kind":"Name","value":"shipping"},"arguments":[{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"List of SKU products","block":true},"name":{"kind":"Name","value":"items"},"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"IShippingItem"}}}}},"directives":[]},{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Postal code to freight calculator","block":true},"name":{"kind":"Name","value":"postalCode"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]},{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Country of postal code","block":true},"name":{"kind":"Name","value":"country"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]}],"type":{"kind":"NamedType","name":{"kind":"Name","value":"ShippingData"}},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"cacheControl"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"scope"},"value":{"kind":"StringValue","value":"public","block":false}},{"kind":"Argument","name":{"kind":"Name","value":"sMaxAge"},"value":{"kind":"IntValue","value":"120"}},{"kind":"Argument","name":{"kind":"Name","value":"staleWhileRevalidate"},"value":{"kind":"IntValue","value":"3600"}}]}]}]}],"loc":{"start":0,"end":6017}};
2190
+ doc$l.loc.source = {"body":"\"\"\"\nEach product edge contains a `node`, with product information, and a `cursor`, that can be used as a reference for pagination.\n\"\"\"\ntype StoreProductEdge {\n \"\"\"\n Each product node contains the information of a product returned by the query.\n \"\"\"\n node: StoreProduct!\n \"\"\"\n Product cursor. Used as pagination reference.\n \"\"\"\n cursor: String!\n}\n\n\"\"\"\nProduct connections, including pagination information and products returned by the query.\n\"\"\"\ntype StoreProductConnection {\n \"\"\"\n Product pagination information.\n \"\"\"\n pageInfo: StorePageInfo!\n \"\"\"\n Array with product connection edges, each containing a product and a corresponding cursor.\n \"\"\"\n edges: [StoreProductEdge!]!\n}\n\n\"\"\"\nEach collection edge contains a `node`, with product collection information, and a `cursor`, that can be used as a reference for pagination.\n\"\"\"\ntype StoreCollectionEdge {\n \"\"\"\n Each collection node contains the information of a product collection returned by the query.\n \"\"\"\n node: StoreCollection!\n \"\"\"\n Collection cursor. Used as pagination reference.\n \"\"\"\n cursor: String!\n}\n\n\"\"\"\nCollection connections, including pagination information and collections returned by the query.\n\"\"\"\ntype StoreCollectionConnection {\n \"\"\"\n Collection pagination information.\n \"\"\"\n pageInfo: StorePageInfo!\n \"\"\"\n Array with collection connection page edges, each containing a collection and a corresponding cursor..\n \"\"\"\n edges: [StoreCollectionEdge!]!\n}\n\n\"\"\"\nProduct search results sorting options.\n\"\"\"\nenum StoreSort {\n \"\"\"\n Sort by price, from highest to lowest.\n \"\"\"\n price_desc\n \"\"\"\n Sort by price, from lowest to highest.\n \"\"\"\n price_asc\n \"\"\"\n Sort by orders, from highest to lowest.\n \"\"\"\n orders_desc\n \"\"\"\n Sort by name, in reverse alphabetical order.\n \"\"\"\n name_desc\n \"\"\"\n Sort by name, in alphabetical order.\n \"\"\"\n name_asc\n \"\"\"\n Sort by release date, from highest to lowest.\n \"\"\"\n release_desc\n \"\"\"\n Sort by discount value, from highest to lowest.\n \"\"\"\n discount_desc\n \"\"\"\n Sort by product score, from highest to lowest.\n \"\"\"\n score_desc\n}\n\n\"\"\"\nSelected search facet input.\n\"\"\"\ninput IStoreSelectedFacet {\n \"\"\"\n Selected search facet key.\n \"\"\"\n key: String!\n \"\"\"\n Selected search facet value.\n \"\"\"\n value: String!\n}\n\n\"\"\"\nSearch facet type.\n\"\"\"\nenum StoreFacetType {\n \"\"\"\n Indicates boolean search facet.\n \"\"\"\n BOOLEAN\n \"\"\"\n Indicates range type search facet.\n \"\"\"\n RANGE\n}\n\n\"\"\"\nSuggestion term.\n\"\"\"\ntype StoreSuggestionTerm {\n \"\"\"\n The term.\n \"\"\"\n value: String!\n \"\"\"\n Its occurrences count.\n \"\"\"\n count: Int!\n}\n\n\"\"\"\nSuggestions information.\n\"\"\"\ntype StoreSuggestions {\n \"\"\"\n Array with suggestion terms.\n \"\"\"\n terms: [StoreSuggestionTerm!]!\n \"\"\"\n Array with suggestion products' information.\n \"\"\"\n products: [StoreProduct!]!\n}\n\n\"\"\"\nSearch result.\n\"\"\"\ntype SearchMetadata {\n \"\"\"\n Indicates if the search term was misspelled.\n \"\"\"\n isTermMisspelled: Boolean!\n \"\"\"\n Logical operator used to run the search.\n \"\"\"\n logicalOperator: String!\n}\n\n\"\"\"\nSearch result.\n\"\"\"\ntype StoreSearchResult {\n \"\"\"\n Search result products.\n \"\"\"\n products: StoreProductConnection!\n \"\"\"\n Array of search result facets.\n \"\"\"\n facets: [StoreFacet!]!\n \"\"\"\n Search result suggestions.\n \"\"\"\n suggestions: StoreSuggestions!\n \"\"\"\n Search result metadata. Additional data can be used to send analytics events.\n \"\"\"\n metadata: SearchMetadata\n}\n\ntype Query {\n \"\"\"\n Returns the details of a product based on the specified locator.\n \"\"\"\n product(\n \"\"\"\n An array of selected search facets.\n \"\"\"\n locator: [IStoreSelectedFacet!]!\n ): StoreProduct!\n @cacheControl(scope: \"public\", sMaxAge: 120, staleWhileRevalidate: 3600)\n\n \"\"\"\n Returns the details of a collection based on the collection slug.\n \"\"\"\n collection(\n \"\"\"\n Collection slug.\n \"\"\"\n slug: String!\n ): StoreCollection!\n @cacheControl(scope: \"public\", sMaxAge: 120, staleWhileRevalidate: 3600)\n\n \"\"\"\n Returns the result of a product, facet, or suggestion search.\n \"\"\"\n search(\n \"\"\"\n Search pagination argument, indicating how many results should be returned from the complete result list.\n \"\"\"\n first: Int!\n \"\"\"\n Search pagination argument, indicating the cursor corresponding with the item after which the results should be fetched.\n \"\"\"\n after: String\n \"\"\"\n Search results sorting mode.\n \"\"\"\n sort: StoreSort = score_desc\n \"\"\"\n Search term.\n \"\"\"\n term: String = \"\"\n \"\"\"\n Array of selected search facets.\n \"\"\"\n selectedFacets: [IStoreSelectedFacet!]\n ): StoreSearchResult!\n @cacheControl(scope: \"public\", sMaxAge: 120, staleWhileRevalidate: 3600)\n\n \"\"\"\n Returns information about all products.\n \"\"\"\n allProducts(\n \"\"\"\n Product pagination argument, indicating how many items should be returned from the complete result list.\n \"\"\"\n first: Int!\n \"\"\"\n Product pagination argument, indicating the cursor corresponding with the item after which the items should be fetched.\n \"\"\"\n after: String\n ): StoreProductConnection!\n @cacheControl(scope: \"public\", sMaxAge: 120, staleWhileRevalidate: 3600)\n\n \"\"\"\n Returns information about all collections.\n \"\"\"\n allCollections(\n \"\"\"\n Collection pagination argument, indicating how many items should be returned from the complete result list.\n \"\"\"\n first: Int!\n \"\"\"\n Collection pagination argument, indicating the cursor corresponding with the item after which the items should be fetched.\n \"\"\"\n after: String\n ): StoreCollectionConnection!\n @cacheControl(scope: \"public\", sMaxAge: 120, staleWhileRevalidate: 3600)\n\n \"\"\"\n Returns information about shipping simulation.\n \"\"\"\n shipping(\n \"\"\"\n List of SKU products\n \"\"\"\n items: [IShippingItem!]!\n \"\"\"\n Postal code to freight calculator\n \"\"\"\n postalCode: String!\n \"\"\"\n Country of postal code\n \"\"\"\n country: String!\n ): ShippingData\n @cacheControl(scope: \"public\", sMaxAge: 120, staleWhileRevalidate: 3600)\n}\n","name":"GraphQL request","locationOffset":{"line":1,"column":1}};
2183
2191
 
2184
2192
  var doc$m = {"kind":"Document","definitions":[{"kind":"ObjectTypeDefinition","description":{"kind":"StringValue","value":"Information of a given review rating.","block":true},"name":{"kind":"Name","value":"StoreReviewRating"},"interfaces":[],"directives":[],"fields":[{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Rating value.","block":true},"name":{"kind":"Name","value":"ratingValue"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Best rating value.","block":true},"name":{"kind":"Name","value":"bestRating"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}},"directives":[]}]},{"kind":"ObjectTypeDefinition","description":{"kind":"StringValue","value":"Information of a given review.","block":true},"name":{"kind":"Name","value":"StoreReview"},"interfaces":[],"directives":[],"fields":[{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Review rating information.","block":true},"name":{"kind":"Name","value":"reviewRating"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreReviewRating"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Review author.","block":true},"name":{"kind":"Name","value":"author"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreAuthor"}}},"directives":[]}]}],"loc":{"start":0,"end":366}};
2185
2193
  doc$m.loc.source = {"body":"\"\"\"\nInformation of a given review rating.\n\"\"\"\ntype StoreReviewRating {\n \"\"\"\n Rating value.\n \"\"\"\n ratingValue: Float!\n \"\"\"\n Best rating value.\n \"\"\"\n bestRating: Float!\n}\n\n\"\"\"\nInformation of a given review.\n\"\"\"\ntype StoreReview {\n \"\"\"\n Review rating information.\n \"\"\"\n reviewRating: StoreReviewRating!\n \"\"\"\n Review author.\n \"\"\"\n author: StoreAuthor!\n}\n","name":"GraphQL request","locationOffset":{"line":1,"column":1}};