@grafikr/shopify-typescript 1.0.2 → 1.0.5

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/global/Shopify.ts CHANGED
@@ -2,6 +2,15 @@ import ProductJSON from '../type/Product';
2
2
  import ProductObject from '../type/object/Product';
3
3
 
4
4
  export default interface Shopify {
5
+ CountryProvinceSelector: (country_domid: string, province_domid: string, options?: {
6
+ hideElement: string
7
+ }) => void
8
+ postLink: (path: string, options?: {
9
+ method?: string
10
+ parameters?: object
11
+ }) => void
12
+ addListener: (target: HTMLElement, eventName: string, callback: CallableFunction) => void
13
+ setSelectorByValue: (selector: HTMLSelectElement, value: any) => number
5
14
  Image: {
6
15
  switchImage: CallableFunction
7
16
  getSizedImageUrl: (src: string, size: string) => string
@@ -12,7 +21,7 @@ export default interface Shopify {
12
21
  OptionSelectors: (selector: string, config: {
13
22
  product: ProductJSON | ProductObject
14
23
  onVariantSelected: CallableFunction
15
- enableHistoryState: boolean
24
+ enableHistoryState?: boolean
16
25
  }) => void
17
26
  OptionSelectorsFromDOM: FunctionConstructor
18
27
  loadFeatures: (features: any[], callback: CallableFunction) => void
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grafikr/shopify-typescript",
3
- "version": "1.0.2",
3
+ "version": "1.0.5",
4
4
  "license": "MIT",
5
5
  "scripts": {
6
6
  "lint": "node_modules/.bin/eslint . --ext .js,.ts",
@@ -9,9 +9,9 @@
9
9
  "devDependencies": {
10
10
  "@typescript-eslint/eslint-plugin": "^5.0.0",
11
11
  "@typescript-eslint/parser": "^5.0.0",
12
- "eslint": "^7.0.0",
13
- "eslint-config-airbnb-base": "^14.0.0",
14
- "eslint-config-airbnb-typescript": "^14.0.0",
12
+ "eslint": "^8.4.0",
13
+ "eslint-config-airbnb-base": "^15.0.0",
14
+ "eslint-config-airbnb-typescript": "^17.0.0",
15
15
  "eslint-plugin-import": "^2.0.0",
16
16
  "typescript": "^4.0.0"
17
17
  },
package/type/LineItem.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export default interface Item {
2
2
  id: number
3
- properties: { [key: string]: string | boolean } | null
3
+ properties: { [key: string]: any } | null
4
4
  quantity: number
5
5
  variant_id: number
6
6
  key: string
@@ -16,7 +16,7 @@ export default interface Variant {
16
16
  name: string
17
17
  public_title: string | null
18
18
  options: string[]
19
- price: number | null
19
+ price: number
20
20
  weight: number
21
21
  compare_at_price: number | null
22
22
  inventory_management: string
@@ -1,7 +1,7 @@
1
1
  import Item from './Item';
2
2
  import FeaturedImage from './FeaturedImage';
3
3
 
4
- export default interface Article extends Item{
4
+ export default interface Article extends Item {
5
5
  author: string
6
6
  image: string | null
7
7
  published_at: string