@plasmicpkgs/commerce-shopify 0.0.75 → 0.0.76
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-update-item.d.ts +13 -6
- package/dist/commerce-shopify.cjs.development.js +3 -3
- 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 +3 -3
- package/dist/commerce-shopify.esm.js.map +1 -1
- package/dist/provider.d.ts +5 -2
- package/package.json +4 -3
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
export declare type UpdateItemActionInput<T = any> = T extends LineItem ? Partial<UpdateItemHook['actionInput']> : UpdateItemHook['actionInput'];
|
|
1
|
+
import type { HookFetcherContext, MutationHookContext } from "@plasmicpkgs/commerce";
|
|
2
|
+
import type { LineItem, UpdateItemHook } from "../types/cart";
|
|
3
|
+
export declare type UpdateItemActionInput<T = any> = T extends LineItem ? Partial<UpdateItemHook["actionInput"]> : UpdateItemHook["actionInput"];
|
|
5
4
|
declare const _default: <T extends import("@plasmicpkgs/commerce/dist/types/cart").LineItem | undefined = undefined>(ctx?: {
|
|
6
5
|
item?: T | undefined;
|
|
7
6
|
wait?: number | undefined;
|
|
8
|
-
}) =>
|
|
7
|
+
}) => ((input: UpdateItemActionInput<T>) => Promise<import("@plasmicpkgs/commerce/dist/types/cart").Cart | null | undefined>) & {
|
|
8
|
+
clear(): void;
|
|
9
|
+
} & {
|
|
10
|
+
flush(): void;
|
|
11
|
+
};
|
|
9
12
|
export default _default;
|
|
10
13
|
export declare const handler: {
|
|
11
14
|
fetchOptions: {
|
|
@@ -15,5 +18,9 @@ export declare const handler: {
|
|
|
15
18
|
useHook: ({ fetch }: MutationHookContext<UpdateItemHook>) => <T extends import("@plasmicpkgs/commerce/dist/types/cart").LineItem | undefined = undefined>(ctx?: {
|
|
16
19
|
item?: T | undefined;
|
|
17
20
|
wait?: number | undefined;
|
|
18
|
-
}) =>
|
|
21
|
+
}) => ((input: UpdateItemActionInput<T>) => Promise<import("@plasmicpkgs/commerce/dist/types/cart").Cart | null | undefined>) & {
|
|
22
|
+
clear(): void;
|
|
23
|
+
} & {
|
|
24
|
+
flush(): void;
|
|
25
|
+
};
|
|
19
26
|
};
|
|
@@ -9,7 +9,7 @@ var React = require('react');
|
|
|
9
9
|
var React__default = _interopDefault(React);
|
|
10
10
|
var commerce = require('@plasmicpkgs/commerce');
|
|
11
11
|
var Cookies = _interopDefault(require('js-cookie'));
|
|
12
|
-
var debounce = _interopDefault(require('
|
|
12
|
+
var debounce = _interopDefault(require('debounce'));
|
|
13
13
|
|
|
14
14
|
/*
|
|
15
15
|
Forked from https://github.com/vercel/commerce/tree/main/packages/shopify/src
|
|
@@ -2055,7 +2055,7 @@ var handler$5 = {
|
|
|
2055
2055
|
}
|
|
2056
2056
|
|
|
2057
2057
|
throw new commerce.ValidationError({
|
|
2058
|
-
message:
|
|
2058
|
+
message: "The item quantity has to be a valid integer"
|
|
2059
2059
|
});
|
|
2060
2060
|
|
|
2061
2061
|
case 8:
|
|
@@ -2117,7 +2117,7 @@ var handler$5 = {
|
|
|
2117
2117
|
}
|
|
2118
2118
|
|
|
2119
2119
|
throw new commerce.ValidationError({
|
|
2120
|
-
message:
|
|
2120
|
+
message: "Invalid input used for this operation"
|
|
2121
2121
|
});
|
|
2122
2122
|
|
|
2123
2123
|
case 5:
|