feed-common 1.1.0 → 1.1.1
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/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
## [1.1.1](https://github.com/advertikon/package-maxify-feed-common/compare/v1.1.0...v1.1.1) (2024-02-12)
|
2
|
+
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
* fix shopify types ([0482e82](https://github.com/advertikon/package-maxify-feed-common/commit/0482e82a5b02eb7cfa4f7b16abce1fb95e4210c5))
|
7
|
+
|
1
8
|
# [1.1.0](https://github.com/advertikon/package-maxify-feed-common/compare/v1.0.3...v1.1.0) (2024-02-11)
|
2
9
|
|
3
10
|
|
@@ -1,17 +1,17 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
type ShopifyCollection =
|
9
|
-
type ShopifyProductVariant = Variant & {
|
1
|
+
import { RestResources } from '@shopify/shopify-api/rest/admin/2023-07';
|
2
|
+
type GetInstanceType<T extends keyof RestResources> = InstanceType<RestResources[T]>;
|
3
|
+
type ShopifyRecurringCharge = GetInstanceType<'RecurringApplicationCharge'>;
|
4
|
+
type ShopifyShop = GetInstanceType<'Shop'>;
|
5
|
+
type ShopifyWebhook = GetInstanceType<'Webhook'>;
|
6
|
+
type ShopifyCustomCollection = GetInstanceType<'CustomCollection'>;
|
7
|
+
type ShopifySmartCollection = GetInstanceType<'SmartCollection'>;
|
8
|
+
type ShopifyCollection = ShopifyCustomCollection | ShopifySmartCollection;
|
9
|
+
type ShopifyProductVariant = GetInstanceType<'Variant'> & {
|
10
10
|
images: {
|
11
11
|
variant_ids?: number[];
|
12
12
|
}[];
|
13
13
|
};
|
14
|
-
type ShopifyProduct = Product & {
|
14
|
+
type ShopifyProduct = GetInstanceType<'Product'> & {
|
15
15
|
variants: ShopifyProductVariant[];
|
16
16
|
};
|
17
17
|
export type WebhookHeader = {
|
@@ -32,5 +32,5 @@ export type WebhookHeader = {
|
|
32
32
|
'x-shopify-triggered-at': string;
|
33
33
|
'x-shopify-webhook-id': string;
|
34
34
|
};
|
35
|
-
export {
|
35
|
+
export { ShopifyShop, ShopifyProduct, ShopifyWebhook, ShopifyCustomCollection, ShopifySmartCollection, ShopifyCollection, ShopifyRecurringCharge, };
|
36
36
|
//# sourceMappingURL=shopify.types.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"shopify.types.d.ts","sourceRoot":"","sources":["../../src/types/shopify.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"shopify.types.d.ts","sourceRoot":"","sources":["../../src/types/shopify.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AAExE,KAAK,eAAe,CAAC,CAAC,SAAS,MAAM,aAAa,IAAI,YAAY,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;AAErF,KAAK,sBAAsB,GAAG,eAAe,CAAC,4BAA4B,CAAC,CAAC;AAC5E,KAAK,WAAW,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;AAC3C,KAAK,cAAc,GAAG,eAAe,CAAC,SAAS,CAAC,CAAC;AACjD,KAAK,uBAAuB,GAAG,eAAe,CAAC,kBAAkB,CAAC,CAAC;AACnE,KAAK,sBAAsB,GAAG,eAAe,CAAC,iBAAiB,CAAC,CAAC;AACjE,KAAK,iBAAiB,GAAG,uBAAuB,GAAG,sBAAsB,CAAC;AAC1E,KAAK,qBAAqB,GAAG,eAAe,CAAC,SAAS,CAAC,GAAG;IACxD,MAAM,EAAE;QAAE,WAAW,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,EAAE,CAAC;CACtC,CAAC;AACF,KAAK,cAAc,GAAG,eAAe,CAAC,SAAS,CAAC,GAAG;IACjD,QAAQ,EAAE,qBAAqB,EAAE,CAAC;CACnC,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,MAAM,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,iBAAiB,EAAE,MAAM,CAAC;IAC1B,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,uBAAuB,EAAE,MAAM,CAAC;IAChC,uBAAuB,EAAE,MAAM,CAAC;IAChC,sBAAsB,EAAE,MAAM,CAAC;IAC/B,uBAAuB,EAAE,MAAM,CAAC;IAChC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,wBAAwB,EAAE,MAAM,CAAC;IACjC,sBAAsB,EAAE,MAAM,CAAC;CAChC,CAAC;AAEF,OAAO,EACL,WAAW,EACX,cAAc,EACd,cAAc,EACd,uBAAuB,EACvB,sBAAsB,EACtB,iBAAiB,EACjB,sBAAsB,GACvB,CAAC"}
|
@@ -1,7 +1,2 @@
|
|
1
|
-
|
2
|
-
import { Webhook } from '@shopify/shopify-api/rest/admin/2023-07/webhook';
|
3
|
-
import { CustomCollection } from '@shopify/shopify-api/rest/admin/2023-07/custom_collection';
|
4
|
-
import { SmartCollection } from '@shopify/shopify-api/rest/admin/2023-07/smart_collection';
|
5
|
-
import { RecurringApplicationCharge } from '@shopify/shopify-api/rest/admin/2023-07/recurring_application_charge';
|
6
|
-
export { Shop as ShopifyShop, Webhook as ShopifyWebhook, CustomCollection as ShopifyCustomCollection, SmartCollection as ShopifySmartCollection, RecurringApplicationCharge as ShopifyRecurringCharge, };
|
1
|
+
export {};
|
7
2
|
//# sourceMappingURL=shopify.types.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"shopify.types.js","sourceRoot":"","sources":["../../src/types/shopify.types.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"shopify.types.js","sourceRoot":"","sources":["../../src/types/shopify.types.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
@@ -1,40 +1,45 @@
|
|
1
|
-
import {
|
2
|
-
import { Variant } from '@shopify/shopify-api/rest/admin/2023-07/variant';
|
3
|
-
import { Shop } from '@shopify/shopify-api/rest/admin/2023-07/shop';
|
4
|
-
import { Webhook } from '@shopify/shopify-api/rest/admin/2023-07/webhook';
|
5
|
-
import { CustomCollection } from '@shopify/shopify-api/rest/admin/2023-07/custom_collection';
|
6
|
-
import { SmartCollection } from '@shopify/shopify-api/rest/admin/2023-07/smart_collection';
|
7
|
-
import { RecurringApplicationCharge } from '@shopify/shopify-api/rest/admin/2023-07/recurring_application_charge';
|
1
|
+
import { RestResources } from '@shopify/shopify-api/rest/admin/2023-07';
|
8
2
|
|
9
|
-
type
|
10
|
-
|
11
|
-
type
|
3
|
+
type GetInstanceType<T extends keyof RestResources> = InstanceType<RestResources[T]>;
|
4
|
+
|
5
|
+
type ShopifyRecurringCharge = GetInstanceType<'RecurringApplicationCharge'>;
|
6
|
+
type ShopifyShop = GetInstanceType<'Shop'>;
|
7
|
+
type ShopifyWebhook = GetInstanceType<'Webhook'>;
|
8
|
+
type ShopifyCustomCollection = GetInstanceType<'CustomCollection'>;
|
9
|
+
type ShopifySmartCollection = GetInstanceType<'SmartCollection'>;
|
10
|
+
type ShopifyCollection = ShopifyCustomCollection | ShopifySmartCollection;
|
11
|
+
type ShopifyProductVariant = GetInstanceType<'Variant'> & {
|
12
|
+
images: { variant_ids?: number[] }[];
|
13
|
+
};
|
14
|
+
type ShopifyProduct = GetInstanceType<'Product'> & {
|
15
|
+
variants: ShopifyProductVariant[];
|
16
|
+
};
|
12
17
|
|
13
18
|
export type WebhookHeader = {
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
19
|
+
host: string;
|
20
|
+
'user-agent': string;
|
21
|
+
'content-length': string;
|
22
|
+
accept: string;
|
23
|
+
'accept-encoding': string;
|
24
|
+
'content-type': string;
|
25
|
+
'x-forwarded-for': string;
|
26
|
+
'x-forwarded-host': string;
|
27
|
+
'x-forwarded-proto': string;
|
28
|
+
'x-shopify-api-version': string;
|
29
|
+
'x-shopify-hmac-sha256': string;
|
30
|
+
'x-shopify-product-id': string;
|
31
|
+
'x-shopify-shop-domain': string;
|
32
|
+
'x-shopify-topic': string;
|
33
|
+
'x-shopify-triggered-at': string;
|
34
|
+
'x-shopify-webhook-id': string;
|
30
35
|
};
|
31
36
|
|
32
37
|
export {
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
38
|
+
ShopifyShop,
|
39
|
+
ShopifyProduct,
|
40
|
+
ShopifyWebhook,
|
41
|
+
ShopifyCustomCollection,
|
42
|
+
ShopifySmartCollection,
|
43
|
+
ShopifyCollection,
|
44
|
+
ShopifyRecurringCharge,
|
40
45
|
};
|