@shopify/shop-minis-platform 0.15.0 → 0.16.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.
- package/package.json +7 -7
- package/src/types/product.ts +7 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shopify/shop-minis-platform",
|
|
3
3
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.16.0",
|
|
5
5
|
"description": "Shared type definitions for Shop Minis Platform",
|
|
6
6
|
"main": "src/index.ts",
|
|
7
7
|
"exports": {
|
|
@@ -19,6 +19,11 @@
|
|
|
19
19
|
"README.md",
|
|
20
20
|
"LICENSE.txt"
|
|
21
21
|
],
|
|
22
|
+
"scripts": {
|
|
23
|
+
"test": "TZ=UTC jest",
|
|
24
|
+
"type-check": "tsc --noEmit",
|
|
25
|
+
"typecheck": "pnpm run type-check"
|
|
26
|
+
},
|
|
22
27
|
"dependencies": {},
|
|
23
28
|
"peerDependencies": {},
|
|
24
29
|
"devDependencies": {
|
|
@@ -29,10 +34,5 @@
|
|
|
29
34
|
"type": "git",
|
|
30
35
|
"url": "https://github.com/Shopify/shop-client.git",
|
|
31
36
|
"directory": "packages/minis/shop-minis-platform"
|
|
32
|
-
},
|
|
33
|
-
"scripts": {
|
|
34
|
-
"test": "TZ=UTC jest",
|
|
35
|
-
"type-check": "tsc --noEmit",
|
|
36
|
-
"typecheck": "pnpm run type-check"
|
|
37
37
|
}
|
|
38
|
-
}
|
|
38
|
+
}
|
package/src/types/product.ts
CHANGED
|
@@ -17,6 +17,13 @@ export interface ProductVariant {
|
|
|
17
17
|
id: string
|
|
18
18
|
title: string
|
|
19
19
|
isFavorited: boolean
|
|
20
|
+
/**
|
|
21
|
+
* Whether the variant can be purchased. When `false`, calls to add the variant
|
|
22
|
+
* to cart or buy it through the SDK will fail. UI should be gated on this flag.
|
|
23
|
+
* May be `undefined` if the variant was sourced from an API that does not
|
|
24
|
+
* expose stock state.
|
|
25
|
+
*/
|
|
26
|
+
availableForSale: boolean
|
|
20
27
|
image?: ProductImage | null
|
|
21
28
|
price: Money
|
|
22
29
|
compareAtPrice?: Money | null
|