@picked/shopify 0.0.1-dev.1763596411740 → 0.0.1-dev.1764025609515
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/cjs/ajax-api/index.js +1 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/json-api/index.js +1 -0
- package/dist/cjs/plugins/shopify/index.js +1 -0
- package/dist/cjs/storefront-api/index.js +1 -0
- package/dist/cjs/utils/index.js +1 -1
- package/dist/esm/{api/ajax → ajax-api}/index.js +1 -1
- package/dist/esm/index.js +1 -17
- package/dist/esm/{api/json → json-api}/index.js +1 -1
- package/dist/esm/plugins/shopify/index.js +84 -0
- package/dist/esm/storefront-api/index.js +25 -0
- package/dist/esm/utils/index.js +1 -1
- package/dist/global-obj-C3yno2dx.js +16 -0
- package/dist/global-obj-LxWWNYl5.cjs +1 -0
- package/dist/picked-config-C4RxhhZr.cjs +1 -0
- package/dist/picked-config-D5je38JL.js +62 -0
- package/dist/request-Bu7DcKQ6.js +28 -0
- package/dist/request-CLkKzNzd.cjs +1 -0
- package/dist/types/ajax-api/index.d.ts +22 -0
- package/dist/types/ajax-api/index.d.ts.map +1 -0
- package/dist/types/ajax-api/types.d.ts +254 -0
- package/dist/types/ajax-api/types.d.ts.map +1 -0
- package/dist/types/index.d.ts +0 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/json-api/index.d.ts +8 -0
- package/dist/types/json-api/index.d.ts.map +1 -0
- package/dist/types/json-api/types.d.ts +66 -0
- package/dist/types/json-api/types.d.ts.map +1 -0
- package/dist/types/plugins/shopify/global-obj.d.ts +10 -0
- package/dist/types/plugins/shopify/global-obj.d.ts.map +1 -0
- package/dist/types/plugins/shopify/index.d.ts +5 -0
- package/dist/types/plugins/shopify/index.d.ts.map +1 -0
- package/dist/types/plugins/shopify/picked-config.d.ts +49 -0
- package/dist/types/plugins/shopify/picked-config.d.ts.map +1 -0
- package/dist/types/plugins/shopify/plugin.d.ts +3 -0
- package/dist/types/plugins/shopify/plugin.d.ts.map +1 -0
- package/dist/types/plugins/shopify/predicates.d.ts +42 -0
- package/dist/types/plugins/shopify/predicates.d.ts.map +1 -0
- package/dist/types/plugins/shopify/types.d.ts +106 -0
- package/dist/types/plugins/shopify/types.d.ts.map +1 -0
- package/dist/types/{storefront/storefront.d.ts → storefront-api/index.d.ts} +4 -4
- package/dist/types/storefront-api/index.d.ts.map +1 -0
- package/dist/types/storefront-api/types.d.ts +4 -0
- package/dist/types/storefront-api/types.d.ts.map +1 -0
- package/dist/types/types.d.ts +3 -316
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +24 -18
- package/dist/cjs/api/ajax/index.js +0 -1
- package/dist/cjs/api/json/index.js +0 -1
- package/dist/cjs/storefront/index.js +0 -1
- package/dist/esm/storefront/index.js +0 -23
- package/dist/request-BDvw_lN_.cjs +0 -1
- package/dist/request-CH-MjU8N.js +0 -27
- package/dist/types/api/ajax/ajax.d.ts +0 -22
- package/dist/types/api/ajax/ajax.d.ts.map +0 -1
- package/dist/types/api/ajax/index.d.ts +0 -2
- package/dist/types/api/ajax/index.d.ts.map +0 -1
- package/dist/types/api/json/index.d.ts +0 -2
- package/dist/types/api/json/index.d.ts.map +0 -1
- package/dist/types/api/json/json.d.ts +0 -8
- package/dist/types/api/json/json.d.ts.map +0 -1
- package/dist/types/storefront/index.d.ts +0 -2
- package/dist/types/storefront/index.d.ts.map +0 -1
- package/dist/types/storefront/storefront.d.ts.map +0 -1
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
export interface ShopifyJsonApiCollection {
|
|
2
|
+
id: number;
|
|
3
|
+
handle: string;
|
|
4
|
+
title: string;
|
|
5
|
+
updated_at: string;
|
|
6
|
+
published_at: string;
|
|
7
|
+
description: string;
|
|
8
|
+
products_count: number;
|
|
9
|
+
image: {
|
|
10
|
+
id: number;
|
|
11
|
+
created_at: string;
|
|
12
|
+
alt: string | null;
|
|
13
|
+
src: string;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export interface ShopifyJsonApiCollectionProduct {
|
|
17
|
+
id: number;
|
|
18
|
+
title: string;
|
|
19
|
+
body_html?: string;
|
|
20
|
+
vendor: string;
|
|
21
|
+
product_type: string;
|
|
22
|
+
created_at: string;
|
|
23
|
+
handle: string;
|
|
24
|
+
updated_at: string;
|
|
25
|
+
published_at: string;
|
|
26
|
+
tags: string[];
|
|
27
|
+
variants: ShopifyJsonApiCollectionProductVariant[];
|
|
28
|
+
images: ShopifyJsonApiCollectionProductImage[];
|
|
29
|
+
options: ShopifyJsonApiProductOption[];
|
|
30
|
+
}
|
|
31
|
+
export interface ShopifyJsonApiCollectionProductVariant {
|
|
32
|
+
id: number;
|
|
33
|
+
title: string;
|
|
34
|
+
option1: string;
|
|
35
|
+
option2: string;
|
|
36
|
+
option3: string | null;
|
|
37
|
+
sku: string;
|
|
38
|
+
requires_shipping: boolean;
|
|
39
|
+
taxable: boolean;
|
|
40
|
+
featured_image: string | null;
|
|
41
|
+
available: boolean;
|
|
42
|
+
price: string;
|
|
43
|
+
grams: number;
|
|
44
|
+
compare_at_price: string | null;
|
|
45
|
+
position: number;
|
|
46
|
+
product_id: number;
|
|
47
|
+
created_at: string;
|
|
48
|
+
updated_at: string;
|
|
49
|
+
}
|
|
50
|
+
export interface ShopifyJsonApiCollectionProductImage {
|
|
51
|
+
id: number;
|
|
52
|
+
position: number;
|
|
53
|
+
product_id: number;
|
|
54
|
+
created_at: string;
|
|
55
|
+
updated_at: string;
|
|
56
|
+
variant_ids: number[];
|
|
57
|
+
width: number;
|
|
58
|
+
height: number;
|
|
59
|
+
src: string;
|
|
60
|
+
}
|
|
61
|
+
export interface ShopifyJsonApiProductOption {
|
|
62
|
+
name: string;
|
|
63
|
+
position: number;
|
|
64
|
+
values: string[];
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../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IAClB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAA;IAC/B,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,oCAAoC;IACnD,EAAE,EAAE,MAAM,CAAA;IACV,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,WAAW,EAAE,MAAM,EAAE,CAAA;IACrB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,GAAG,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,WAAW,2BAA2B;IAC1C,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,EAAE,CAAA;CACjB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { EventPayload } from './types';
|
|
2
|
+
export declare function getShopify(): import('./types').Shopify;
|
|
3
|
+
export declare function supportsShopifyAnalytics(w: Window): w is Window & {
|
|
4
|
+
Shopify: {
|
|
5
|
+
analytics: {
|
|
6
|
+
publish: (event: string, payload: EventPayload) => void;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=global-obj.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"global-obj.d.ts","sourceRoot":"","sources":["../../../../src/plugins/shopify/global-obj.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAE3C,wBAAgB,UAAU,8BAQzB;AAED,wBAAgB,wBAAwB,CAAC,CAAC,EAAE,MAAM,GAAG,CAAC,IAAI,MAAM,GAAG;IACjE,OAAO,EAAE;QAAE,SAAS,EAAE;YAAE,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,KAAK,IAAI,CAAA;SAAE,CAAA;KAAE,CAAA;CACpF,CAEA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { shopifyPlugin } from './plugin';
|
|
2
|
+
export { getPickedConfig, getPickedConfigCollection, getPickedConfigCustomer, getPickedConfigExperiments, getPickedConfigFeatureExperiments, getPickedConfigProduct, getPickedConfigStorefrontApiToken, } from './picked-config';
|
|
3
|
+
export { getShopify } from './global-obj';
|
|
4
|
+
export type { PickedConfigCollection, PickedConfigCustomer, PickedConfigExperiment, PickedConfigProduct, PickedConfigProductCollection, PickedConfigProductVariant, Shopify, ShopifyPickedConfig, } from './types';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/shopify/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,OAAO,EACL,eAAe,EACf,yBAAyB,EACzB,uBAAuB,EACvB,0BAA0B,EAC1B,iCAAiC,EACjC,sBAAsB,EACtB,iCAAiC,GAClC,MAAM,iBAAiB,CAAA;AAExB,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,YAAY,EACV,sBAAsB,EACtB,oBAAoB,EACpB,sBAAsB,EACtB,mBAAmB,EACnB,6BAA6B,EAC7B,0BAA0B,EAC1B,OAAO,EACP,mBAAmB,GACpB,MAAM,SAAS,CAAA"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { CreateClientOptions } from '@picked/client';
|
|
2
|
+
import { MetafieldObject, PickedConfigExperiment, PickedConfigProduct, ShopifyPickedConfig } from './types';
|
|
3
|
+
export declare function getPickedConfig<P = PickedConfigProduct>(): Readonly<Partial<CreateClientOptions> & ShopifyPickedConfig<P>> | undefined;
|
|
4
|
+
export declare function getPickedConfigCustomer(): Partial<{
|
|
5
|
+
accepts_marketing: boolean;
|
|
6
|
+
email: string;
|
|
7
|
+
first_name: string | null;
|
|
8
|
+
has_account: boolean;
|
|
9
|
+
id: number;
|
|
10
|
+
last_name: string | null;
|
|
11
|
+
metafields: MetafieldObject;
|
|
12
|
+
orders_count: number;
|
|
13
|
+
phone: string | null;
|
|
14
|
+
tax_exempt: boolean;
|
|
15
|
+
}> | undefined;
|
|
16
|
+
export declare function getPickedConfigProduct<T = MetafieldObject>(): Partial<{
|
|
17
|
+
available: boolean;
|
|
18
|
+
collections: Partial<{
|
|
19
|
+
id: number;
|
|
20
|
+
}>[];
|
|
21
|
+
featured_image: string;
|
|
22
|
+
handle: string;
|
|
23
|
+
id: number;
|
|
24
|
+
metafields: T;
|
|
25
|
+
price: number;
|
|
26
|
+
tags: string[];
|
|
27
|
+
title: string;
|
|
28
|
+
type: string;
|
|
29
|
+
url: string;
|
|
30
|
+
variants: Partial<{
|
|
31
|
+
available: boolean;
|
|
32
|
+
title: string;
|
|
33
|
+
id: number;
|
|
34
|
+
price: number;
|
|
35
|
+
inventory_quantity: number;
|
|
36
|
+
option1: string;
|
|
37
|
+
}>[];
|
|
38
|
+
vendor: string;
|
|
39
|
+
}> | undefined;
|
|
40
|
+
export declare function getPickedConfigCollection(): Partial<{
|
|
41
|
+
title: string;
|
|
42
|
+
id: number;
|
|
43
|
+
handle: string;
|
|
44
|
+
metafields: MetafieldObject;
|
|
45
|
+
}> | undefined;
|
|
46
|
+
export declare function getPickedConfigExperiments(): PickedConfigExperiment[] | undefined;
|
|
47
|
+
export declare function getPickedConfigStorefrontApiToken(): string | undefined;
|
|
48
|
+
export declare function getPickedConfigFeatureExperiments(): CreateClientOptions['features'];
|
|
49
|
+
//# sourceMappingURL=picked-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"picked-config.d.ts","sourceRoot":"","sources":["../../../../src/plugins/shopify/picked-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AAEzD,OAAO,KAAK,EACV,eAAe,EACf,sBAAsB,EACtB,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,SAAS,CAAA;AAEhB,wBAAgB,eAAe,CAAC,CAAC,GAAG,mBAAmB,iFAStD;AAED,wBAAgB,uBAAuB;;;;;;;;;;;eAMtC;AAED,wBAAgB,sBAAsB,CAAC,CAAC,GAAG,eAAe;;;;;;;;;;;;;;;;;;;;;;;eAMzD;AAED,wBAAgB,yBAAyB;;;;;eAMxC;AAED,wBAAgB,0BAA0B,yCAMzC;AAED,wBAAgB,iCAAiC,uBAMhD;AAED,wBAAgB,iCAAiC,IAAI,mBAAmB,CAAC,UAAU,CAAC,CAkCnF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../src/plugins/shopify/plugin.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAU,MAAM,gBAAgB,CAAA;AAIpD,eAAO,MAAM,aAAa,QAAO,MA0BhC,CAAA"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { StateSnapshot } from '@picked/client';
|
|
2
|
+
export declare const evaluatePathname: (regexPattern: RegExp, location?: StateSnapshot["location"]) => boolean;
|
|
3
|
+
/**
|
|
4
|
+
* Evaluate handle from path using regex pattern
|
|
5
|
+
*
|
|
6
|
+
* @param regexPattern Regex pattern to extract handle
|
|
7
|
+
* @param location Location object containing pathname
|
|
8
|
+
* @returns handle string or undefined
|
|
9
|
+
*/
|
|
10
|
+
export declare const evaluateHandleByPath: (regexPattern: RegExp, location?: StateSnapshot["location"]) => string | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* Evaluate handle from pickedConfig based on type
|
|
13
|
+
*
|
|
14
|
+
* @param type page type: 'product' | 'collection'
|
|
15
|
+
* @returns handle string or undefined
|
|
16
|
+
*/
|
|
17
|
+
export declare const evaluateHandleByType: (type: "product" | "collection") => string | false;
|
|
18
|
+
interface PredicateArgs {
|
|
19
|
+
location?: StateSnapshot['location'];
|
|
20
|
+
}
|
|
21
|
+
export declare const shopifyPredicates: {
|
|
22
|
+
'is-page': ({ location }: PredicateArgs) => boolean;
|
|
23
|
+
'get-page-handle': ({ location }: PredicateArgs) => string | undefined;
|
|
24
|
+
'is-product-page': () => boolean;
|
|
25
|
+
'get-product-handle': () => string | false;
|
|
26
|
+
'is-collection-page': () => boolean;
|
|
27
|
+
'get-collection-handle': () => string | false;
|
|
28
|
+
'is-blog-page': ({ location }: PredicateArgs) => boolean;
|
|
29
|
+
'get-blog-handle': ({ location }: PredicateArgs) => string | undefined;
|
|
30
|
+
'is-article-page': ({ location }: PredicateArgs) => boolean;
|
|
31
|
+
'get-article-handle': ({ location }: PredicateArgs) => string | undefined;
|
|
32
|
+
'is-app-proxy-page': ({ location }: PredicateArgs) => boolean;
|
|
33
|
+
'get-app-proxy-handle': ({ location }: PredicateArgs) => string | undefined;
|
|
34
|
+
'is-account-page': ({ location }: PredicateArgs) => boolean;
|
|
35
|
+
'is-login-page': ({ location }: PredicateArgs) => boolean;
|
|
36
|
+
'is-register-page': ({ location }: PredicateArgs) => boolean;
|
|
37
|
+
'is-cart-page': ({ location }: PredicateArgs) => boolean;
|
|
38
|
+
'is-checkout-page': ({ location }: PredicateArgs) => boolean;
|
|
39
|
+
'is-homepage': ({ location }: PredicateArgs) => boolean;
|
|
40
|
+
};
|
|
41
|
+
export {};
|
|
42
|
+
//# sourceMappingURL=predicates.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"predicates.d.ts","sourceRoot":"","sources":["../../../../src/plugins/shopify/predicates.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAmBnD,eAAO,MAAM,gBAAgB,GAC3B,cAAc,MAAM,EACpB,WAAW,aAAa,CAAC,UAAU,CAAC,KACnC,OAMF,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,GAC/B,cAAc,MAAM,EACpB,WAAW,aAAa,CAAC,UAAU,CAAC,uBAQrC,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,GAAI,MAAM,SAAS,GAAG,YAAY,mBASlE,CAAA;AAED,UAAU,aAAa;IACrB,QAAQ,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,CAAA;CACrC;AAED,eAAO,MAAM,iBAAiB;8BAEF,aAAa;sCACL,aAAa;;;;;mCAQhB,aAAa;sCACV,aAAa;sCAEb,aAAa;yCACV,aAAa;wCAGd,aAAa;2CACV,aAAa;sCAGlB,aAAa;oCAEf,aAAa;uCACV,aAAa;mCAGjB,aAAa;uCAET,aAAa;kCAElB,aAAa;CAC5C,CAAA"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { CreateClientOptions } from '@picked/client';
|
|
2
|
+
declare global {
|
|
3
|
+
interface Window {
|
|
4
|
+
pickedConfig?: Readonly<Partial<CreateClientOptions> & ShopifyPickedConfig<PickedConfigProduct>>;
|
|
5
|
+
Shopify?: Shopify;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
export interface Shopify {
|
|
9
|
+
shop: string;
|
|
10
|
+
locale: string;
|
|
11
|
+
currency: {
|
|
12
|
+
active: string;
|
|
13
|
+
rate: string;
|
|
14
|
+
};
|
|
15
|
+
country: string;
|
|
16
|
+
theme: {
|
|
17
|
+
name: string;
|
|
18
|
+
id: number;
|
|
19
|
+
schema_name: string;
|
|
20
|
+
schema_version: string;
|
|
21
|
+
theme_store_id: number | null;
|
|
22
|
+
role: string;
|
|
23
|
+
handle: string;
|
|
24
|
+
style: {
|
|
25
|
+
id: number | null;
|
|
26
|
+
handle: string | null;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
routes: {
|
|
30
|
+
root: string;
|
|
31
|
+
};
|
|
32
|
+
PaymentButton: {
|
|
33
|
+
isStorefrontPortableWallets: boolean;
|
|
34
|
+
};
|
|
35
|
+
analytics?: {
|
|
36
|
+
publish?: (event: string, payload: EventPayload) => void;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export interface EventPayload {
|
|
40
|
+
[key: string]: string | number | boolean | null | undefined | EventPayload | Array<string | number | boolean | null | undefined | EventPayload>;
|
|
41
|
+
}
|
|
42
|
+
export interface PickedConfigExperiment {
|
|
43
|
+
enabled: boolean;
|
|
44
|
+
id: string;
|
|
45
|
+
name: string;
|
|
46
|
+
version: number;
|
|
47
|
+
weight: number;
|
|
48
|
+
}
|
|
49
|
+
export type PickedConfigCollection = Partial<{
|
|
50
|
+
title: string;
|
|
51
|
+
id: number;
|
|
52
|
+
handle: string;
|
|
53
|
+
metafields: MetafieldObject;
|
|
54
|
+
}>;
|
|
55
|
+
export type PickedConfigProductVariant = Partial<{
|
|
56
|
+
available: boolean;
|
|
57
|
+
title: string;
|
|
58
|
+
id: number;
|
|
59
|
+
price: number;
|
|
60
|
+
inventory_quantity: number;
|
|
61
|
+
option1: string;
|
|
62
|
+
}>;
|
|
63
|
+
export type PickedConfigProductCollection = Partial<{
|
|
64
|
+
id: number;
|
|
65
|
+
}>;
|
|
66
|
+
export type MetafieldValue = string | number | boolean | null | undefined;
|
|
67
|
+
export interface MetafieldObject {
|
|
68
|
+
[key: string]: MetafieldValue | MetafieldObject | MetafieldValue[] | MetafieldObject[];
|
|
69
|
+
}
|
|
70
|
+
export type PickedConfigProduct<T = MetafieldObject> = Partial<{
|
|
71
|
+
available: boolean;
|
|
72
|
+
collections: PickedConfigProductCollection[];
|
|
73
|
+
featured_image: string;
|
|
74
|
+
handle: string;
|
|
75
|
+
id: number;
|
|
76
|
+
metafields: T;
|
|
77
|
+
price: number;
|
|
78
|
+
tags: string[];
|
|
79
|
+
title: string;
|
|
80
|
+
type: string;
|
|
81
|
+
url: string;
|
|
82
|
+
variants: PickedConfigProductVariant[];
|
|
83
|
+
vendor: string;
|
|
84
|
+
}>;
|
|
85
|
+
export type PickedConfigCustomer = Partial<{
|
|
86
|
+
accepts_marketing: boolean;
|
|
87
|
+
email: string;
|
|
88
|
+
first_name: string | null;
|
|
89
|
+
has_account: boolean;
|
|
90
|
+
id: number;
|
|
91
|
+
last_name: string | null;
|
|
92
|
+
metafields: MetafieldObject;
|
|
93
|
+
orders_count: number;
|
|
94
|
+
phone: string | null;
|
|
95
|
+
tax_exempt: boolean;
|
|
96
|
+
}>;
|
|
97
|
+
export interface ShopifyPickedConfig<P = PickedConfigProduct> {
|
|
98
|
+
customer?: PickedConfigCustomer;
|
|
99
|
+
product?: P;
|
|
100
|
+
collection?: PickedConfigCollection;
|
|
101
|
+
experiments?: PickedConfigExperiment[];
|
|
102
|
+
storefront_api?: {
|
|
103
|
+
token?: string;
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/plugins/shopify/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AAEzD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,YAAY,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,mBAAmB,CAAC,GAAG,mBAAmB,CAAC,mBAAmB,CAAC,CAAC,CAAA;QAChG,OAAO,CAAC,EAAE,OAAO,CAAA;KAClB;CACF;AAED,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE;QACR,MAAM,EAAE,MAAM,CAAA;QACd,IAAI,EAAE,MAAM,CAAA;KACb,CAAA;IACD,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE;QACL,IAAI,EAAE,MAAM,CAAA;QACZ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CAAA;IAC3B,YAAY,EAAE,MAAM,CAAA;IACpB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,UAAU,EAAE,OAAO,CAAA;CACpB,CAAC,CAAA;AAEF,MAAM,WAAW,mBAAmB,CAAC,CAAC,GAAG,mBAAmB;IAC1D,QAAQ,CAAC,EAAE,oBAAoB,CAAA;IAC/B,OAAO,CAAC,EAAE,CAAC,CAAA;IACX,UAAU,CAAC,EAAE,sBAAsB,CAAA;IACnC,WAAW,CAAC,EAAE,sBAAsB,EAAE,CAAA;IACtC,cAAc,CAAC,EAAE;QACf,KAAK,CAAC,EAAE,MAAM,CAAA;KACf,CAAA;CACF"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createStorefrontApiClient as _createStorefrontApiClient } from '@shopify/storefront-api-client';
|
|
2
|
-
import {
|
|
2
|
+
import { ShopifyStorefrontApiClient } from './types';
|
|
3
3
|
declare global {
|
|
4
|
-
const client:
|
|
4
|
+
const client: ShopifyStorefrontApiClient | undefined;
|
|
5
5
|
}
|
|
6
6
|
export declare function createStorefrontApiClient(options: Pick<Parameters<typeof _createStorefrontApiClient>[0], 'apiVersion'>): import('@shopify/storefront-api-client').StorefrontApiClient;
|
|
7
|
-
export declare const getStorefrontApiClient: () =>
|
|
8
|
-
//# sourceMappingURL=
|
|
7
|
+
export declare const getStorefrontApiClient: () => ShopifyStorefrontApiClient;
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/storefront-api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,IAAI,0BAA0B,EAAE,MAAM,gCAAgC,CAAA;AAExG,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAA;AAEzD,OAAO,CAAC,MAAM,CAAC;IACb,MAAM,MAAM,EAAE,0BAA0B,GAAG,SAAS,CAAA;CACrD;AAED,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,IAAI,CAAC,UAAU,CAAC,OAAO,0BAA0B,CAAC,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,gEAiB9E;AAED,eAAO,MAAM,sBAAsB,kCAMlC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/storefront-api/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,0BAA0B;IACzC,OAAO,EAAE,CAAC,CAAC,EACT,KAAK,EAAE,MAAM,EACb,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAClC,OAAO,CAAC,EAAE,WAAW,KAClB,OAAO,CAAC,CAAC,CAAC,CAAA;CAChB"}
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,317 +1,4 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
handle: string;
|
|
5
|
-
description: string | null;
|
|
6
|
-
published_at: string;
|
|
7
|
-
created_at: string;
|
|
8
|
-
vendor: string;
|
|
9
|
-
type: string;
|
|
10
|
-
tags: string[];
|
|
11
|
-
price: number;
|
|
12
|
-
price_min: number;
|
|
13
|
-
price_max: number;
|
|
14
|
-
available: boolean;
|
|
15
|
-
price_varies: boolean;
|
|
16
|
-
compare_at_price: number | null;
|
|
17
|
-
compare_at_price_min: number;
|
|
18
|
-
compare_at_price_max: number;
|
|
19
|
-
compare_at_price_varies: boolean;
|
|
20
|
-
variants: ShopifyProductVariant[];
|
|
21
|
-
images: string[];
|
|
22
|
-
featured_image: string | null;
|
|
23
|
-
options: ShopifyProductOption[];
|
|
24
|
-
url: string;
|
|
25
|
-
media?: ShopifyProductMedia[];
|
|
26
|
-
requires_selling_plan: boolean;
|
|
27
|
-
selling_plan_groups: ShopifySellingPlanGroup[];
|
|
28
|
-
}
|
|
29
|
-
export interface ShopifyProductMedia {
|
|
30
|
-
alt: string | null;
|
|
31
|
-
id: number;
|
|
32
|
-
position: number;
|
|
33
|
-
preview_image: {
|
|
34
|
-
aspect_ratio: number;
|
|
35
|
-
height: number;
|
|
36
|
-
width: number;
|
|
37
|
-
src: string;
|
|
38
|
-
};
|
|
39
|
-
sources?: Array<{
|
|
40
|
-
format: string;
|
|
41
|
-
height: number;
|
|
42
|
-
mime_type: string;
|
|
43
|
-
url: string;
|
|
44
|
-
width: number;
|
|
45
|
-
}>;
|
|
46
|
-
aspect_ratio: number;
|
|
47
|
-
height: number;
|
|
48
|
-
media_type: string;
|
|
49
|
-
src: string;
|
|
50
|
-
width: number;
|
|
51
|
-
}
|
|
52
|
-
export interface ShopifyProductVariant {
|
|
53
|
-
id: number;
|
|
54
|
-
title: string;
|
|
55
|
-
options: string[];
|
|
56
|
-
option1: string | null;
|
|
57
|
-
option2: string | null;
|
|
58
|
-
option3: string | null;
|
|
59
|
-
price: number;
|
|
60
|
-
weight: number;
|
|
61
|
-
compare_at_price: number | null;
|
|
62
|
-
inventory_management: string;
|
|
63
|
-
inventory_quantity: number;
|
|
64
|
-
available: boolean;
|
|
65
|
-
sku: string | null;
|
|
66
|
-
requires_shipping: boolean;
|
|
67
|
-
taxable: boolean;
|
|
68
|
-
barcode: string | null;
|
|
69
|
-
name: string;
|
|
70
|
-
public_title: string | null;
|
|
71
|
-
quantity_rule: ShopifyQuantityRule;
|
|
72
|
-
quantity_price_breaks?: ShopifyProductVariantQuantityPriceBreak[];
|
|
73
|
-
requires_selling_plan: boolean;
|
|
74
|
-
selling_plan_allocations: ShopifySellingPlanAllocation[];
|
|
75
|
-
featured_image: string | null;
|
|
76
|
-
}
|
|
77
|
-
export interface ShopifyProductVariantQuantityPriceBreak {
|
|
78
|
-
quantity: number;
|
|
79
|
-
price: number;
|
|
80
|
-
}
|
|
81
|
-
export interface ShopifySellingPlanAllocation {
|
|
82
|
-
price_adjustments: Array<{
|
|
83
|
-
position: number;
|
|
84
|
-
price: number;
|
|
85
|
-
}>;
|
|
86
|
-
price: number;
|
|
87
|
-
compare_at_price: number;
|
|
88
|
-
per_delivery_price: number;
|
|
89
|
-
selling_plan_id: number;
|
|
90
|
-
selling_plan_group_id: string;
|
|
91
|
-
}
|
|
92
|
-
export interface ShopifyProductOption {
|
|
93
|
-
name: string;
|
|
94
|
-
position: number;
|
|
95
|
-
values: string[];
|
|
96
|
-
}
|
|
97
|
-
export interface ShopifySellingPlanGroup {
|
|
98
|
-
id: string;
|
|
99
|
-
name: string;
|
|
100
|
-
options: Array<{
|
|
101
|
-
name: string;
|
|
102
|
-
position: number;
|
|
103
|
-
values: string[];
|
|
104
|
-
}>;
|
|
105
|
-
selling_plans: ShopifySellingPlan[];
|
|
106
|
-
app_id: string;
|
|
107
|
-
}
|
|
108
|
-
export interface ShopifySellingPlan {
|
|
109
|
-
id: number;
|
|
110
|
-
name: string;
|
|
111
|
-
description: string | null;
|
|
112
|
-
options: Array<{
|
|
113
|
-
name: string;
|
|
114
|
-
position: number;
|
|
115
|
-
value: string;
|
|
116
|
-
}>;
|
|
117
|
-
recurring_deliveries: boolean;
|
|
118
|
-
price_adjustments: Array<{
|
|
119
|
-
order_count: number | null;
|
|
120
|
-
position: number;
|
|
121
|
-
value_type: string;
|
|
122
|
-
value: number;
|
|
123
|
-
}>;
|
|
124
|
-
}
|
|
125
|
-
export interface ShopifyQuantityRule {
|
|
126
|
-
min: number;
|
|
127
|
-
max: number | null;
|
|
128
|
-
increment: number;
|
|
129
|
-
}
|
|
130
|
-
export interface ShopifyShippingRate {
|
|
131
|
-
name: string;
|
|
132
|
-
price: string;
|
|
133
|
-
source: string;
|
|
134
|
-
delivery_range: string[];
|
|
135
|
-
delivery_days: number;
|
|
136
|
-
delivery_date: string | null;
|
|
137
|
-
currency: string;
|
|
138
|
-
}
|
|
139
|
-
export interface ShopifyCart {
|
|
140
|
-
token: string;
|
|
141
|
-
note: string | null;
|
|
142
|
-
attributes: Record<string, string>;
|
|
143
|
-
original_total_price: number;
|
|
144
|
-
total_price: number;
|
|
145
|
-
total_discount: number;
|
|
146
|
-
total_weight: number;
|
|
147
|
-
item_count: number;
|
|
148
|
-
items: ShopifyCartItem[];
|
|
149
|
-
requires_shipping: boolean;
|
|
150
|
-
currency: string;
|
|
151
|
-
items_subtotal_price: number;
|
|
152
|
-
cart_level_discount_applications: Array<ShopifyCartLevelDiscountApplication>;
|
|
153
|
-
}
|
|
154
|
-
export interface ShopifyCartLevelDiscountApplication {
|
|
155
|
-
type: string;
|
|
156
|
-
key?: string;
|
|
157
|
-
value: string;
|
|
158
|
-
value_type: string;
|
|
159
|
-
allocation_method?: string;
|
|
160
|
-
target_selection: string;
|
|
161
|
-
target_type: string;
|
|
162
|
-
title: string;
|
|
163
|
-
total_allocated_amount: number;
|
|
164
|
-
description?: string | null;
|
|
165
|
-
}
|
|
166
|
-
export interface ShopifyCartItem {
|
|
167
|
-
id: number;
|
|
168
|
-
quantity: number;
|
|
169
|
-
properties: Record<string, string> | null;
|
|
170
|
-
variant_id: number;
|
|
171
|
-
key: string;
|
|
172
|
-
title: string;
|
|
173
|
-
price: number;
|
|
174
|
-
original_price: number;
|
|
175
|
-
discounted_price: number;
|
|
176
|
-
line_price: number;
|
|
177
|
-
original_line_price: number;
|
|
178
|
-
total_discount: number;
|
|
179
|
-
discounts: Array<{
|
|
180
|
-
amount: number;
|
|
181
|
-
title: string;
|
|
182
|
-
}>;
|
|
183
|
-
sku: string | null;
|
|
184
|
-
grams: number;
|
|
185
|
-
vendor: string;
|
|
186
|
-
taxable: boolean;
|
|
187
|
-
product_id: number;
|
|
188
|
-
product_has_only_default_variant: boolean;
|
|
189
|
-
gift_card: boolean;
|
|
190
|
-
final_price: number;
|
|
191
|
-
final_line_price: number;
|
|
192
|
-
url: string;
|
|
193
|
-
featured_image: ShopifyImage | null;
|
|
194
|
-
image: string;
|
|
195
|
-
handle: string;
|
|
196
|
-
requires_shipping: boolean;
|
|
197
|
-
product_type: string;
|
|
198
|
-
product_title: string;
|
|
199
|
-
variant_title: string;
|
|
200
|
-
variant_options: string[];
|
|
201
|
-
options_with_values: Array<{
|
|
202
|
-
name: string;
|
|
203
|
-
value: string;
|
|
204
|
-
}>;
|
|
205
|
-
selling_plan_allocation?: Record<string, string>;
|
|
206
|
-
}
|
|
207
|
-
export interface ShopifyProductRecommendations {
|
|
208
|
-
intent: 'related' | 'complementary';
|
|
209
|
-
products: ShopifyProduct[];
|
|
210
|
-
}
|
|
211
|
-
export interface ShopifyPredictiveSearchResult {
|
|
212
|
-
resources: {
|
|
213
|
-
results: {
|
|
214
|
-
products: ShopifyPredictiveSearchProduct[];
|
|
215
|
-
};
|
|
216
|
-
};
|
|
217
|
-
}
|
|
218
|
-
export interface ShopifyPredictiveSearchProduct {
|
|
219
|
-
available: boolean;
|
|
220
|
-
body: string;
|
|
221
|
-
compare_at_price_max: number;
|
|
222
|
-
compare_at_price_min: number;
|
|
223
|
-
handle: string;
|
|
224
|
-
id: number;
|
|
225
|
-
image: string;
|
|
226
|
-
price: number;
|
|
227
|
-
price_max: number;
|
|
228
|
-
price_min: number;
|
|
229
|
-
tags: string[];
|
|
230
|
-
title: string;
|
|
231
|
-
type: string;
|
|
232
|
-
url: string;
|
|
233
|
-
variants: ShopifyPredictiveSearchVariant[];
|
|
234
|
-
vendor: string;
|
|
235
|
-
featured_image?: ShopifyImage | null;
|
|
236
|
-
}
|
|
237
|
-
export interface ShopifyPredictiveSearchVariant {
|
|
238
|
-
available: boolean;
|
|
239
|
-
compare_at_price: number | null;
|
|
240
|
-
id: number;
|
|
241
|
-
image: string;
|
|
242
|
-
price: number;
|
|
243
|
-
title: string;
|
|
244
|
-
url: string;
|
|
245
|
-
featured_image?: ShopifyImage | null;
|
|
246
|
-
}
|
|
247
|
-
export interface ShopifyImage {
|
|
248
|
-
alt: string;
|
|
249
|
-
aspect_ratio: number;
|
|
250
|
-
height: number;
|
|
251
|
-
url: string;
|
|
252
|
-
width: number;
|
|
253
|
-
}
|
|
254
|
-
export interface ShopifyCollection {
|
|
255
|
-
id: number;
|
|
256
|
-
handle: string;
|
|
257
|
-
title: string;
|
|
258
|
-
updated_at: string;
|
|
259
|
-
published_at: string;
|
|
260
|
-
description: string;
|
|
261
|
-
products_count: number;
|
|
262
|
-
image: {
|
|
263
|
-
id: number;
|
|
264
|
-
created_at: string;
|
|
265
|
-
alt: string | null;
|
|
266
|
-
src: string;
|
|
267
|
-
};
|
|
268
|
-
}
|
|
269
|
-
export interface ShopifyCollectionProduct {
|
|
270
|
-
id: number;
|
|
271
|
-
title: string;
|
|
272
|
-
body_html?: string;
|
|
273
|
-
vendor: string;
|
|
274
|
-
product_type: string;
|
|
275
|
-
created_at: string;
|
|
276
|
-
handle: string;
|
|
277
|
-
updated_at: string;
|
|
278
|
-
published_at: string;
|
|
279
|
-
tags: string[];
|
|
280
|
-
variants: ShopifyCollectionProductVariant[];
|
|
281
|
-
images: ShopifyCollectionProductImage[];
|
|
282
|
-
options: ShopifyProductOption[];
|
|
283
|
-
}
|
|
284
|
-
export interface ShopifyCollectionProductVariant {
|
|
285
|
-
id: number;
|
|
286
|
-
title: string;
|
|
287
|
-
option1: string;
|
|
288
|
-
option2: string;
|
|
289
|
-
option3: string | null;
|
|
290
|
-
sku: string;
|
|
291
|
-
requires_shipping: boolean;
|
|
292
|
-
taxable: boolean;
|
|
293
|
-
featured_image: string | null;
|
|
294
|
-
available: boolean;
|
|
295
|
-
price: string;
|
|
296
|
-
grams: number;
|
|
297
|
-
compare_at_price: string | null;
|
|
298
|
-
position: number;
|
|
299
|
-
product_id: number;
|
|
300
|
-
created_at: string;
|
|
301
|
-
updated_at: string;
|
|
302
|
-
}
|
|
303
|
-
export interface ShopifyCollectionProductImage {
|
|
304
|
-
id: number;
|
|
305
|
-
position: number;
|
|
306
|
-
product_id: number;
|
|
307
|
-
created_at: string;
|
|
308
|
-
updated_at: string;
|
|
309
|
-
variant_ids: number[];
|
|
310
|
-
width: number;
|
|
311
|
-
height: number;
|
|
312
|
-
src: string;
|
|
313
|
-
}
|
|
314
|
-
export interface StorefrontApiClient {
|
|
315
|
-
request: <T>(query: string, variables?: Record<string, object>, options?: RequestInit) => Promise<T>;
|
|
316
|
-
}
|
|
1
|
+
export type * from './ajax-api/types';
|
|
2
|
+
export type * from './json-api/types';
|
|
3
|
+
export type * from './storefront-api/types';
|
|
317
4
|
//# sourceMappingURL=types.d.ts.map
|