@daouypkgs/commerce-shopify 0.0.241
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/README.md +1 -0
- package/dist/cart/use-add-item.d.ts +5 -0
- package/dist/cart/use-cart.d.ts +4 -0
- package/dist/cart/use-remove-item.d.ts +21 -0
- package/dist/cart/use-update-item.d.ts +30 -0
- package/dist/commerce-shopify.cjs.development.js +3691 -0
- package/dist/commerce-shopify.cjs.development.js.map +1 -0
- package/dist/commerce-shopify.cjs.production.min.js +2 -0
- package/dist/commerce-shopify.cjs.production.min.js.map +1 -0
- package/dist/commerce-shopify.esm.js +3679 -0
- package/dist/commerce-shopify.esm.js.map +1 -0
- package/dist/const.d.ts +4 -0
- package/dist/fetcher.d.ts +2 -0
- package/dist/graphql-config.d.ts +6 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +8 -0
- package/dist/product/use-product.d.ts +5 -0
- package/dist/product/use-search.d.ts +5 -0
- package/dist/provider.d.ts +74 -0
- package/dist/registerCommerceProvider.d.ts +12 -0
- package/dist/registerable.d.ts +6 -0
- package/dist/shopify-types.d.ts +5 -0
- package/dist/shopify.d.ts +5 -0
- package/dist/site/use-brands.d.ts +4 -0
- package/dist/site/use-categories.d.ts +4 -0
- package/dist/utils/cart-create.d.ts +3 -0
- package/dist/utils/colors.d.ts +1 -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/get-search-variables.d.ts +16 -0
- package/dist/utils/get-sort-variables.d.ts +2 -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 -0
- package/dist/utils/normalize.d.ts +6 -0
- package/dist/utils/queries/get-all-collections-query.d.ts +3 -0
- package/dist/utils/queries/get-all-product-vendors-query.d.ts +4 -0
- package/dist/utils/queries/get-all-products-query.d.ts +6 -0
- package/dist/utils/queries/get-cart-query.d.ts +3 -0
- package/dist/utils/queries/get-collection-products-query.d.ts +6 -0
- package/dist/utils/queries/get-collection-query.d.ts +5 -0
- package/dist/utils/queries/get-product-query.d.ts +6 -0
- package/dist/utils/throw-user-errors.d.ts +4 -0
- package/package.json +42 -0
package/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Daouy registration calls for shopify commerce provider
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { MutationHook } from "@daouypkgs/commerce";
|
|
2
|
+
import { CartType } from "@daouypkgs/commerce";
|
|
3
|
+
declare const _default: () => (input: CartType.CartItemBody) => CartType.Cart | Promise<CartType.Cart | undefined> | undefined;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const handler: MutationHook<CartType.AddItemHook>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { CartType, HookFetcherContext, MutationHookContext } from "@daouypkgs/commerce";
|
|
2
|
+
import type { ShopifyCart } from "../shopify-types";
|
|
3
|
+
import { RemoveFromCartMutation } from "../utils/graphql/gen/graphql";
|
|
4
|
+
export declare type RemoveItemFn<T = any> = T extends CartType.LineItem ? (input?: RemoveItemActionInput<T>) => Promise<ShopifyCart | null | undefined> : (input: RemoveItemActionInput<T>) => Promise<ShopifyCart | null>;
|
|
5
|
+
export declare type RemoveItemActionInput<T = any> = T extends CartType.LineItem ? Partial<CartType.RemoveItemHook["actionInput"]> : CartType.RemoveItemHook["actionInput"];
|
|
6
|
+
declare const _default: <T extends CartType.LineItem | undefined = undefined>(ctx?: {
|
|
7
|
+
item?: T | undefined;
|
|
8
|
+
}) => RemoveItemFn<T>;
|
|
9
|
+
export default _default;
|
|
10
|
+
export declare const handler: {
|
|
11
|
+
fetchOptions: {
|
|
12
|
+
query: string & import("@graphql-typed-document-node/core").DocumentTypeDecoration<RemoveFromCartMutation, import("../utils/graphql/gen/graphql").Exact<{
|
|
13
|
+
cartId: string;
|
|
14
|
+
lineIds: string | string[];
|
|
15
|
+
}>>;
|
|
16
|
+
};
|
|
17
|
+
fetcher({ input: { itemId }, options, fetch, }: HookFetcherContext<CartType.RemoveItemHook>): Promise<ShopifyCart | undefined>;
|
|
18
|
+
useHook: ({ fetch }: MutationHookContext<CartType.RemoveItemHook>) => <T extends CartType.LineItem | undefined = undefined>(ctx?: {
|
|
19
|
+
item?: T | undefined;
|
|
20
|
+
}) => RemoveItemFn<T>;
|
|
21
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { HookFetcherContext, MutationHookContext } from "@daouypkgs/commerce";
|
|
2
|
+
import { CartType } from "@daouypkgs/commerce";
|
|
3
|
+
import { EditCartItemsMutation } from "../utils/graphql/gen/graphql";
|
|
4
|
+
export declare type UpdateItemActionInput<T = any> = T extends CartType.LineItem ? Partial<CartType.UpdateItemHook["actionInput"]> : CartType.UpdateItemHook["actionInput"];
|
|
5
|
+
declare const _default: <T extends CartType.LineItem | undefined = undefined>(ctx?: {
|
|
6
|
+
item?: T | undefined;
|
|
7
|
+
wait?: number | undefined;
|
|
8
|
+
}) => ((input: UpdateItemActionInput<T>) => Promise<CartType.Cart | null | undefined>) & {
|
|
9
|
+
clear(): void;
|
|
10
|
+
} & {
|
|
11
|
+
flush(): void;
|
|
12
|
+
};
|
|
13
|
+
export default _default;
|
|
14
|
+
export declare const handler: {
|
|
15
|
+
fetchOptions: {
|
|
16
|
+
query: string & import("@graphql-typed-document-node/core").DocumentTypeDecoration<EditCartItemsMutation, import("../utils/graphql/gen/graphql").Exact<{
|
|
17
|
+
cartId: string;
|
|
18
|
+
lines: import("../utils/graphql/gen/graphql").CartLineUpdateInput | import("../utils/graphql/gen/graphql").CartLineUpdateInput[];
|
|
19
|
+
}>>;
|
|
20
|
+
};
|
|
21
|
+
fetcher({ input: { itemId, item }, options, fetch, }: HookFetcherContext<CartType.UpdateItemHook>): Promise<import("../shopify-types").ShopifyCart | undefined>;
|
|
22
|
+
useHook: ({ fetch }: MutationHookContext<CartType.UpdateItemHook>) => <T extends CartType.LineItem | undefined = undefined>(ctx?: {
|
|
23
|
+
item?: T | undefined;
|
|
24
|
+
wait?: number | undefined;
|
|
25
|
+
}) => ((input: UpdateItemActionInput<T>) => Promise<CartType.Cart | null | undefined>) & {
|
|
26
|
+
clear(): void;
|
|
27
|
+
} & {
|
|
28
|
+
flush(): void;
|
|
29
|
+
};
|
|
30
|
+
};
|