@plasmicpkgs/commerce-shopify 0.0.214 → 0.0.216
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cart/use-add-item.d.ts +4 -4
- package/dist/cart/use-cart.d.ts +2 -3
- package/dist/cart/use-remove-item.d.ts +12 -8
- package/dist/cart/use-update-item.d.ts +12 -8
- package/dist/commerce-shopify.cjs.development.js +2863 -716
- package/dist/commerce-shopify.cjs.development.js.map +1 -1
- package/dist/commerce-shopify.cjs.production.min.js +1 -1
- package/dist/commerce-shopify.cjs.production.min.js.map +1 -1
- package/dist/commerce-shopify.esm.js +2864 -717
- package/dist/commerce-shopify.esm.js.map +1 -1
- package/dist/const.d.ts +1 -1
- package/dist/fetcher.d.ts +1 -1
- package/dist/graphql-config.d.ts +6 -0
- package/dist/product/use-product.d.ts +2 -5
- package/dist/product/use-search.d.ts +1 -9
- package/dist/provider.d.ts +19 -13
- package/dist/shopify-types.d.ts +5 -0
- package/dist/site/use-brands.d.ts +2 -3
- package/dist/site/use-categories.d.ts +2 -3
- package/dist/utils/cart-create.d.ts +3 -0
- package/dist/utils/fragments/cart.d.ts +1 -0
- package/dist/utils/fragments/collection.d.ts +1 -0
- package/dist/utils/fragments/image.d.ts +1 -0
- package/dist/utils/fragments/product-variant.d.ts +1 -0
- package/dist/utils/fragments/product.d.ts +1 -0
- package/dist/utils/fragments/seo.d.ts +1 -0
- package/dist/utils/get-cart-id.d.ts +1 -0
- package/dist/utils/graphql/gen/gql.d.ts +76 -0
- package/dist/utils/graphql/gen/graphql.d.ts +11114 -0
- package/dist/utils/graphql/gen/index.d.ts +1 -0
- package/dist/utils/mutations/cart.d.ts +15 -0
- package/dist/utils/mutations/customer-activate-by-url.d.ts +4 -2
- package/dist/utils/normalize.d.ts +6 -7
- package/dist/utils/queries/get-all-collections-query.d.ts +3 -2
- package/dist/utils/queries/get-all-product-vendors-query.d.ts +4 -2
- package/dist/utils/queries/get-all-products-query.d.ts +6 -3
- package/dist/utils/queries/get-cart-query.d.ts +3 -0
- package/dist/utils/queries/get-collection-products-query.d.ts +6 -2
- package/dist/utils/queries/get-collection-query.d.ts +5 -3
- package/dist/utils/queries/get-product-query.d.ts +6 -3
- package/dist/utils/throw-user-errors.d.ts +1 -2
- package/package.json +9 -6
- package/dist/cart/index.d.ts +0 -4
- package/dist/product/use-price.d.ts +0 -2
- package/dist/types/cart.d.ts +0 -25
- package/dist/types/checkout.d.ts +0 -1
- package/dist/types/common.d.ts +0 -1
- package/dist/types/customer.d.ts +0 -3
- package/dist/types/index.d.ts +0 -12
- package/dist/types/login.d.ts +0 -6
- package/dist/types/logout.d.ts +0 -1
- package/dist/types/page.d.ts +0 -8
- package/dist/types/product.d.ts +0 -1
- package/dist/types/signup.d.ts +0 -1
- package/dist/types/site.d.ts +0 -7
- package/dist/types/wishlist.d.ts +0 -1
- package/dist/utils/checkout-create.d.ts +0 -4
- package/dist/utils/checkout-to-cart.d.ts +0 -9
- package/dist/utils/customer-token.d.ts +0 -3
- package/dist/utils/get-brands.d.ts +0 -11
- package/dist/utils/get-categories.d.ts +0 -3
- package/dist/utils/get-checkout-id.d.ts +0 -2
- package/dist/utils/handle-account-activation.d.ts +0 -3
- package/dist/utils/handle-fetch-response.d.ts +0 -5
- package/dist/utils/handle-login.d.ts +0 -4
- package/dist/utils/index.d.ts +0 -9
- package/dist/utils/mutations/associate-customer-with-checkout.d.ts +0 -2
- package/dist/utils/mutations/checkout-create.d.ts +0 -2
- package/dist/utils/mutations/checkout-line-item-add.d.ts +0 -2
- package/dist/utils/mutations/checkout-line-item-remove.d.ts +0 -2
- package/dist/utils/mutations/checkout-line-item-update.d.ts +0 -2
- package/dist/utils/mutations/customer-access-token-create.d.ts +0 -2
- package/dist/utils/mutations/customer-access-token-delete.d.ts +0 -2
- package/dist/utils/mutations/customer-activate.d.ts +0 -2
- package/dist/utils/mutations/customer-create.d.ts +0 -2
- package/dist/utils/mutations/index.d.ts +0 -9
- package/dist/utils/queries/get-all-pages-query.d.ts +0 -2
- package/dist/utils/queries/get-all-products-paths-query.d.ts +0 -2
- package/dist/utils/queries/get-checkout-query.d.ts +0 -3
- package/dist/utils/queries/get-customer-id-query.d.ts +0 -2
- package/dist/utils/queries/get-customer-query.d.ts +0 -2
- package/dist/utils/queries/get-page-query.d.ts +0 -2
- package/dist/utils/queries/get-site-info-query.d.ts +0 -2
- package/dist/utils/queries/index.d.ts +0 -11
package/dist/const.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const SHOPIFY_CART_ID_COOKIE = "shopify_cartId";
|
|
2
2
|
export declare const SHOPIFY_CHECKOUT_URL_COOKIE = "shopify_checkoutUrl";
|
|
3
3
|
export declare const SHOPIFY_CUSTOMER_TOKEN_COOKIE = "shopify_customerToken";
|
|
4
4
|
export declare const SHOPIFY_COOKIE_EXPIRE = 30;
|
package/dist/fetcher.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Fetcher } from
|
|
1
|
+
import { Fetcher } from "@plasmicpkgs/commerce";
|
|
2
2
|
export declare const getFetcher: (storeDomain: string, accessToken: string) => Fetcher;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { CodegenConfig } from "@graphql-codegen/cli";
|
|
2
|
+
export declare const defaultStoreDomain = "next-js-store.myshopify.com";
|
|
3
|
+
export declare const defaultAccessToken = "ef7d41c7bf7e1c214074d0d3047bcd7b";
|
|
4
|
+
export declare const shopifyApiVersion = "2025-01";
|
|
5
|
+
declare const config: CodegenConfig;
|
|
6
|
+
export default config;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
export declare type GetProductInput = {
|
|
4
|
-
id?: string;
|
|
5
|
-
};
|
|
1
|
+
import type { GetProductHook } from "@plasmicpkgs/commerce";
|
|
2
|
+
import { SWRHook } from "@plasmicpkgs/commerce";
|
|
6
3
|
declare const _default;
|
|
7
4
|
export default _default;
|
|
8
5
|
export declare const handler: SWRHook<GetProductHook>;
|
|
@@ -1,13 +1,5 @@
|
|
|
1
|
-
import { SWRHook, UseSearch } from "@plasmicpkgs/commerce";
|
|
2
1
|
import type { SearchProductsHook } from "@plasmicpkgs/commerce";
|
|
3
|
-
|
|
4
|
-
search?: string;
|
|
5
|
-
categoryId?: number;
|
|
6
|
-
brandId?: number;
|
|
7
|
-
sort?: string;
|
|
8
|
-
locale?: string;
|
|
9
|
-
count?: number;
|
|
10
|
-
};
|
|
2
|
+
import { SWRHook, UseSearch } from "@plasmicpkgs/commerce";
|
|
11
3
|
declare const useSearchTyped: UseSearch<typeof handler>;
|
|
12
4
|
export default useSearchTyped;
|
|
13
5
|
export declare const handler: SWRHook<SearchProductsHook>;
|
package/dist/provider.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { handler as
|
|
3
|
-
import { handler as useCart } from
|
|
4
|
-
import { handler as
|
|
5
|
-
import { handler as useUpdateItem } from
|
|
6
|
-
import { handler as
|
|
7
|
-
import { handler as
|
|
8
|
-
import { handler as useBrands } from
|
|
9
|
-
import {
|
|
1
|
+
import { Fetcher } from "@plasmicpkgs/commerce";
|
|
2
|
+
import { handler as useAddItem } from "./cart/use-add-item";
|
|
3
|
+
import { handler as useCart } from "./cart/use-cart";
|
|
4
|
+
import { handler as useRemoveItem } from "./cart/use-remove-item";
|
|
5
|
+
import { handler as useUpdateItem } from "./cart/use-update-item";
|
|
6
|
+
import { handler as useProduct } from "./product/use-product";
|
|
7
|
+
import { handler as useSearch } from "./product/use-search";
|
|
8
|
+
import { handler as useBrands } from "./site/use-brands";
|
|
9
|
+
import { handler as useCategories } from "./site/use-categories";
|
|
10
10
|
export declare const getShopifyProvider: (storeDomain: string, accessToken: string) => {
|
|
11
11
|
locale: string;
|
|
12
12
|
cartCookie: string;
|
|
@@ -15,9 +15,12 @@ export declare const getShopifyProvider: (storeDomain: string, accessToken: stri
|
|
|
15
15
|
useAddItem: import("@plasmicpkgs/commerce").MutationHook<import("@plasmicpkgs/commerce/dist/types/cart").AddItemHook<import("@plasmicpkgs/commerce/dist/types/cart").CartTypes>>;
|
|
16
16
|
useUpdateItem: {
|
|
17
17
|
fetchOptions: {
|
|
18
|
-
query: string
|
|
18
|
+
query: string & import("@graphql-typed-document-node/core").DocumentTypeDecoration<import("./utils/graphql/gen/graphql").EditCartItemsMutation, import("./utils/graphql/gen/graphql").Exact<{
|
|
19
|
+
cartId: string;
|
|
20
|
+
lines: import("./utils/graphql/gen/graphql").CartLineUpdateInput | import("./utils/graphql/gen/graphql").CartLineUpdateInput[];
|
|
21
|
+
}>>;
|
|
19
22
|
};
|
|
20
|
-
fetcher({ input: { itemId, item }, options, fetch, }: import("@plasmicpkgs/commerce").HookFetcherContext<import("@plasmicpkgs/commerce/dist/types/cart").UpdateItemHook<import("@plasmicpkgs/commerce/dist/types/cart").CartTypes>>): Promise<import("./types
|
|
23
|
+
fetcher({ input: { itemId, item }, options, fetch, }: import("@plasmicpkgs/commerce").HookFetcherContext<import("@plasmicpkgs/commerce/dist/types/cart").UpdateItemHook<import("@plasmicpkgs/commerce/dist/types/cart").CartTypes>>): Promise<import("./shopify-types").ShopifyCart | undefined>;
|
|
21
24
|
useHook: ({ fetch }: import("@plasmicpkgs/commerce").MutationHookContext<import("@plasmicpkgs/commerce/dist/types/cart").UpdateItemHook<import("@plasmicpkgs/commerce/dist/types/cart").CartTypes>>) => <T extends import("@plasmicpkgs/commerce/dist/types/cart").LineItem | undefined = undefined>(ctx?: {
|
|
22
25
|
item?: T | undefined;
|
|
23
26
|
wait?: number | undefined;
|
|
@@ -29,9 +32,12 @@ export declare const getShopifyProvider: (storeDomain: string, accessToken: stri
|
|
|
29
32
|
};
|
|
30
33
|
useRemoveItem: {
|
|
31
34
|
fetchOptions: {
|
|
32
|
-
query: string
|
|
35
|
+
query: string & import("@graphql-typed-document-node/core").DocumentTypeDecoration<import("./utils/graphql/gen/graphql").RemoveFromCartMutation, import("./utils/graphql/gen/graphql").Exact<{
|
|
36
|
+
cartId: string;
|
|
37
|
+
lineIds: string | string[];
|
|
38
|
+
}>>;
|
|
33
39
|
};
|
|
34
|
-
fetcher({ input: { itemId }, options, fetch, }: import("@plasmicpkgs/commerce").HookFetcherContext<import("@plasmicpkgs/commerce/dist/types/cart").RemoveItemHook<import("@plasmicpkgs/commerce/dist/types/cart").CartTypes>>): Promise<import("./types
|
|
40
|
+
fetcher({ input: { itemId }, options, fetch, }: import("@plasmicpkgs/commerce").HookFetcherContext<import("@plasmicpkgs/commerce/dist/types/cart").RemoveItemHook<import("@plasmicpkgs/commerce/dist/types/cart").CartTypes>>): Promise<import("./shopify-types").ShopifyCart | undefined>;
|
|
35
41
|
useHook: ({ fetch }: import("@plasmicpkgs/commerce").MutationHookContext<import("@plasmicpkgs/commerce/dist/types/cart").RemoveItemHook<import("@plasmicpkgs/commerce/dist/types/cart").CartTypes>>) => <T_1 extends import("@plasmicpkgs/commerce/dist/types/cart").LineItem | undefined = undefined>(ctx?: {
|
|
36
42
|
item?: T_1 | undefined;
|
|
37
43
|
}) => import("./cart/use-remove-item").RemoveItemFn<T_1>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { SWRHook } from
|
|
2
|
-
import { GetBrandsHook } from "../types/site";
|
|
1
|
+
import { SiteTypes, SWRHook } from "@plasmicpkgs/commerce";
|
|
3
2
|
declare const _default;
|
|
4
3
|
export default _default;
|
|
5
|
-
export declare const handler: SWRHook<GetBrandsHook>;
|
|
4
|
+
export declare const handler: SWRHook<SiteTypes.GetBrandsHook>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { SWRHook } from "@plasmicpkgs/commerce";
|
|
2
|
-
import { GetCategoriesHook } from "../types/site";
|
|
1
|
+
import { SiteTypes, SWRHook } from "@plasmicpkgs/commerce";
|
|
3
2
|
declare const _default;
|
|
4
3
|
export default _default;
|
|
5
|
-
export declare const handler: SWRHook<GetCategoriesHook>;
|
|
4
|
+
export declare const handler: SWRHook<SiteTypes.GetCategoriesHook>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { FetcherOptions } from "@plasmicpkgs/commerce";
|
|
2
|
+
import { CartLineInput } from "./graphql/gen/graphql";
|
|
3
|
+
export declare const cartCreate: (fetch: <T = any, B = Body>(options: FetcherOptions<B>) => Promise<T>, lines: CartLineInput[]) => Promise<import("../shopify-types").ShopifyCart | undefined>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const cartFragment: import("../graphql/gen/graphql").TypedDocumentString<import("../graphql/gen/graphql").CartFragment, unknown>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const collectionFragment: import("../graphql/gen/graphql").TypedDocumentString<import("../graphql/gen/graphql").CollectionFragment, unknown>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const imageFragment: import("../graphql/gen/graphql").TypedDocumentString<import("../graphql/gen/graphql").ImageFragment, unknown>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const productVariantFragment: import("../graphql/gen/graphql").TypedDocumentString<import("../graphql/gen/graphql").ProductVariantFragment, unknown>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const productFragment: import("../graphql/gen/graphql").TypedDocumentString<import("../graphql/gen/graphql").ProductFragment, unknown>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const seoFragment: import("../graphql/gen/graphql").TypedDocumentString<import("../graphql/gen/graphql").SeoFragment, unknown>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getCartId: (id?: string | undefined) => string | undefined;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
3
|
+
*/
|
|
4
|
+
export declare function graphql(source: "\n fragment cart on Cart {\n id\n createdAt\n checkoutUrl\n cost {\n subtotalAmount {\n amount\n currencyCode\n }\n totalAmount {\n amount\n currencyCode\n }\n totalTaxAmount {\n amount\n currencyCode\n }\n }\n lines(first: 100) {\n edges {\n node {\n id\n quantity\n cost {\n totalAmount {\n amount\n currencyCode\n }\n }\n merchandise {\n ... on ProductVariant {\n ...productVariant\n product {\n ...product\n }\n }\n }\n }\n }\n }\n totalQuantity\n }\n"): typeof import("./graphql").CartFragmentDoc;
|
|
5
|
+
/**
|
|
6
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
7
|
+
*/
|
|
8
|
+
export declare function graphql(source: "\n fragment collection on Collection {\n id\n title\n handle\n image {\n ...image\n }\n }\n"): typeof import("./graphql").CollectionFragmentDoc;
|
|
9
|
+
/**
|
|
10
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
11
|
+
*/
|
|
12
|
+
export declare function graphql(source: "\n fragment image on Image {\n url\n altText\n width\n height\n }\n"): typeof import("./graphql").ImageFragmentDoc;
|
|
13
|
+
/**
|
|
14
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
15
|
+
*/
|
|
16
|
+
export declare function graphql(source: "\n fragment productVariant on ProductVariant {\n id\n sku\n title\n availableForSale\n requiresShipping\n selectedOptions {\n name\n value\n }\n image {\n ...image\n }\n price {\n amount\n currencyCode\n }\n compareAtPrice {\n amount\n currencyCode\n }\n }\n"): typeof import("./graphql").ProductVariantFragmentDoc;
|
|
17
|
+
/**
|
|
18
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
19
|
+
*/
|
|
20
|
+
export declare function graphql(source: "\n fragment product on Product {\n id\n handle\n availableForSale\n title\n productType\n description\n descriptionHtml\n options {\n id\n name\n values\n }\n priceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n variants(first: 250) {\n edges {\n node {\n ...productVariant\n }\n }\n }\n featuredImage {\n ...image\n }\n images(first: 20) {\n edges {\n node {\n ...image\n }\n }\n }\n seo {\n ...seo\n }\n tags\n updatedAt\n vendor\n }\n"): typeof import("./graphql").ProductFragmentDoc;
|
|
21
|
+
/**
|
|
22
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
23
|
+
*/
|
|
24
|
+
export declare function graphql(source: "\n fragment seo on SEO {\n description\n title\n }\n"): typeof import("./graphql").SeoFragmentDoc;
|
|
25
|
+
/**
|
|
26
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
27
|
+
*/
|
|
28
|
+
export declare function graphql(source: "\n mutation addToCart($cartId: ID!, $lines: [CartLineInput!]!) {\n cartLinesAdd(cartId: $cartId, lines: $lines) {\n cart {\n ...cart\n }\n }\n }\n"): typeof import("./graphql").AddToCartDocument;
|
|
29
|
+
/**
|
|
30
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
31
|
+
*/
|
|
32
|
+
export declare function graphql(source: "\n mutation createCart($lines: [CartLineInput!]) {\n cartCreate(input: { lines: $lines }) {\n cart {\n ...cart\n }\n }\n }\n"): typeof import("./graphql").CreateCartDocument;
|
|
33
|
+
/**
|
|
34
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
35
|
+
*/
|
|
36
|
+
export declare function graphql(source: "\n mutation editCartItems($cartId: ID!, $lines: [CartLineUpdateInput!]!) {\n cartLinesUpdate(cartId: $cartId, lines: $lines) {\n cart {\n ...cart\n }\n }\n }\n"): typeof import("./graphql").EditCartItemsDocument;
|
|
37
|
+
/**
|
|
38
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
39
|
+
*/
|
|
40
|
+
export declare function graphql(source: "\n mutation removeFromCart($cartId: ID!, $lineIds: [ID!]!) {\n cartLinesRemove(cartId: $cartId, lineIds: $lineIds) {\n cart {\n ...cart\n }\n }\n }\n"): typeof import("./graphql").RemoveFromCartDocument;
|
|
41
|
+
/**
|
|
42
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
43
|
+
*/
|
|
44
|
+
export declare function graphql(source: "\n mutation customerActivateByUrl($activationUrl: URL!, $password: String!) {\n customerActivateByUrl(activationUrl: $activationUrl, password: $password) {\n customer {\n id\n }\n customerAccessToken {\n accessToken\n expiresAt\n }\n customerUserErrors {\n code\n field\n message\n }\n }\n }\n"): typeof import("./graphql").CustomerActivateByUrlDocument;
|
|
45
|
+
/**
|
|
46
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
47
|
+
*/
|
|
48
|
+
export declare function graphql(source: "\n query getSiteCollections($first: Int!) {\n collections(first: $first) {\n edges {\n node {\n ...collection\n products(first: $first) {\n edges {\n node {\n id\n }\n }\n }\n }\n }\n }\n }\n"): typeof import("./graphql").GetSiteCollectionsDocument;
|
|
49
|
+
/**
|
|
50
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
51
|
+
*/
|
|
52
|
+
export declare function graphql(source: "\n query getAllProductVendors($first: Int = 250, $cursor: String) {\n products(first: $first, after: $cursor) {\n pageInfo {\n hasNextPage\n hasPreviousPage\n }\n edges {\n node {\n vendor\n }\n cursor\n }\n }\n }\n"): typeof import("./graphql").GetAllProductVendorsDocument;
|
|
53
|
+
/**
|
|
54
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
55
|
+
*/
|
|
56
|
+
export declare function graphql(source: '\n query getAllProducts(\n $first: Int = 250\n $query: String = ""\n $sortKey: ProductSortKeys = RELEVANCE\n $reverse: Boolean = false\n ) {\n products(\n first: $first\n sortKey: $sortKey\n reverse: $reverse\n query: $query\n ) {\n pageInfo {\n hasNextPage\n hasPreviousPage\n }\n edges {\n node {\n ...product\n }\n }\n }\n }\n'): typeof import("./graphql").GetAllProductsDocument;
|
|
57
|
+
/**
|
|
58
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
59
|
+
*/
|
|
60
|
+
export declare function graphql(source: "\n query getCart($cartId: ID!) {\n cart(id: $cartId) {\n ...cart\n }\n }\n"): typeof import("./graphql").GetCartDocument;
|
|
61
|
+
/**
|
|
62
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
63
|
+
*/
|
|
64
|
+
export declare function graphql(source: "\n query getProductsFromCollection(\n $categoryId: ID!\n $first: Int = 250\n $sortKey: ProductCollectionSortKeys = RELEVANCE\n $reverse: Boolean = false\n ) {\n node(id: $categoryId) {\n id\n ... on Collection {\n ...collection\n products(first: $first, sortKey: $sortKey, reverse: $reverse) {\n edges {\n node {\n ...product\n }\n }\n }\n }\n }\n }\n"): typeof import("./graphql").GetProductsFromCollectionDocument;
|
|
65
|
+
/**
|
|
66
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
67
|
+
*/
|
|
68
|
+
export declare function graphql(source: "\n query getSiteCollection($id: ID, $handle: String, $first: Int = 1) {\n collection(id: $id, handle: $handle) {\n ...collection\n products(first: $first) {\n edges {\n node {\n id\n }\n }\n }\n }\n }\n"): typeof import("./graphql").GetSiteCollectionDocument;
|
|
69
|
+
/**
|
|
70
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
71
|
+
*/
|
|
72
|
+
export declare function graphql(source: "\n query getProductBySlug($slug: String!) {\n productByHandle(handle: $slug) {\n ...product\n }\n }\n"): typeof import("./graphql").GetProductBySlugDocument;
|
|
73
|
+
/**
|
|
74
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
75
|
+
*/
|
|
76
|
+
export declare function graphql(source: "\n query getProductById($id: ID!) {\n product(id: $id) {\n ...product\n }\n }\n"): typeof import("./graphql").GetProductByIdDocument;
|