feed-common 1.27.0 → 1.28.0

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [1.28.0](https://github.com/advertikon/package-maxify-feed-common/compare/v1.27.0...v1.28.0) (2024-08-02)
2
+
3
+
4
+ ### Features
5
+
6
+ * change AppProduct type ([a8beee3](https://github.com/advertikon/package-maxify-feed-common/commit/a8beee3485474978ed87b7f03af5f86ad441da02))
7
+
1
8
  # [1.27.0](https://github.com/advertikon/package-maxify-feed-common/compare/v1.26.1...v1.27.0) (2024-08-01)
2
9
 
3
10
 
@@ -1,13 +1,17 @@
1
1
  import { GmcProductSyncStatus } from '../constants/google.constants.js';
2
2
  import { ProductSyncStatus } from '../constants/product.constants.js';
3
- import { ShopifyProductImage, ShopifyProductVariant } from './shopify.types.js';
3
+ import { ShopifyProductImage } from './shopify.types.js';
4
4
  export type AppProductStatus = 'active' | 'draft' | 'archived';
5
- export type AppProductVariant = Pick<ShopifyProductVariant, 'id' | 'title' | 'sku' | 'barcode' | 'image_id' | 'inventory_policy' | 'weight_unit' | 'requires_shipping'> & {
5
+ export type AppProductVariant = {
6
+ id: number;
7
+ title: string;
6
8
  price: number;
7
- compare_at_price: number | null;
8
- weight: number | null;
9
+ sku: string | null;
10
+ barcode: string | null;
9
11
  inventory_quantity: number;
10
- gmcProduct?: GmcProductId[];
12
+ inventory_policy: string;
13
+ compare_at_price: number | null;
14
+ gmcProduct?: GmcProductId;
11
15
  };
12
16
  export type GmcProductId = {
13
17
  id: string;
@@ -43,12 +47,8 @@ export type AppProduct = {
43
47
  _id: string;
44
48
  updated_at: string;
45
49
  variants: AppProductVariant[];
46
- images: {
47
- src: string;
48
- id: string;
49
- variant_ids: number[];
50
- position: number;
51
- }[];
50
+ featured_image: string;
51
+ images: string[];
52
52
  collections: AppCollection[];
53
53
  tags: string[];
54
54
  vendor: string;
@@ -1 +1 @@
1
- {"version":3,"file":"product.types.d.ts","sourceRoot":"","sources":["../../src/types/product.types.ts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AAE,oBAAoB,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "feed-common",
3
- "version": "1.27.0",
3
+ "version": "1.28.0",
4
4
  "description": "Maxify feed common library",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -1,20 +1,20 @@
1
1
  import { GmcProductSyncStatus } from '../constants/google.constants.js';
2
2
  import { ProductSyncStatus } from '../constants/product.constants.js';
3
- import { ShopifyProductImage, ShopifyProductVariant } from './shopify.types.js';
3
+ import { ShopifyProductImage } from './shopify.types.js';
4
4
 
5
5
  export type AppProductStatus = 'active' | 'draft' | 'archived';
6
6
 
7
- export type AppProductVariant =
8
- | Pick<
9
- ShopifyProductVariant,
10
- 'id' | 'title' | 'sku' | 'barcode' | 'image_id' | 'inventory_policy' | 'weight_unit' | 'requires_shipping'
11
- > & {
12
- price: number;
13
- compare_at_price: number | null;
14
- weight: number | null;
15
- inventory_quantity: number;
16
- gmcProduct?: GmcProductId[];
17
- };
7
+ export type AppProductVariant = {
8
+ id: number;
9
+ title: string;
10
+ price: number;
11
+ sku: string|null;
12
+ barcode: string|null;
13
+ inventory_quantity: number;
14
+ inventory_policy: string;
15
+ compare_at_price: number|null;
16
+ gmcProduct?: GmcProductId;
17
+ }
18
18
 
19
19
  export type GmcProductId = {
20
20
  id: string;
@@ -54,12 +54,8 @@ export type AppProduct = {
54
54
  _id: string;
55
55
  updated_at: string;
56
56
  variants: AppProductVariant[];
57
- images: {
58
- src: string;
59
- id: string;
60
- variant_ids: number[];
61
- position: number;
62
- }[];
57
+ featured_image: string;
58
+ images: string[];
63
59
  collections: AppCollection[];
64
60
  tags: string[];
65
61
  vendor: string;