@anker-in/campaign-ui 0.5.12 → 0.5.14
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/components/credits/context/provider.d.ts +1 -1
- package/dist/cjs/components/credits/context/provider.js.map +1 -1
- package/dist/cjs/helpers/index.d.ts +2 -2
- package/dist/esm/components/credits/context/provider.d.ts +1 -1
- package/dist/esm/components/credits/context/provider.js.map +1 -1
- package/dist/esm/helpers/index.d.ts +2 -2
- package/package.json +19 -19
- package/src/components/credits/context/provider.tsx +1 -1
- package/dist/cjs/components/credits/context/hooks/useSendEmailValidation.d.ts +0 -1
- package/dist/cjs/components/credits/context/hooks/useSendEmailValidation.js +0 -2
- package/dist/cjs/components/credits/context/hooks/useSendEmailValidation.js.map +0 -7
- package/dist/cjs/components/credits/context/hooks/useSubscriptions.d.ts +0 -5
- package/dist/cjs/components/credits/context/hooks/useSubscriptions.js +0 -2
- package/dist/cjs/components/credits/context/hooks/useSubscriptions.js.map +0 -7
- package/dist/cjs/components/credits/modal/MyRewardsModal.d.ts +0 -32
- package/dist/cjs/components/credits/modal/MyRewardsModal.js +0 -2
- package/dist/cjs/components/credits/modal/MyRewardsModal.js.map +0 -7
- package/dist/cjs/helpers/track.d.ts +0 -15
- package/dist/cjs/helpers/track.js +0 -2
- package/dist/cjs/helpers/track.js.map +0 -7
- package/dist/cjs/index.css +0 -2
- package/dist/cjs/index.css.map +0 -7
- package/dist/cjs/shopify/context/ShopifyProvider.d.ts +0 -10
- package/dist/cjs/shopify/fetchers/create-cart.d.ts +0 -13
- package/dist/cjs/shopify/fetchers/get-products-by-handles.d.ts +0 -7
- package/dist/cjs/shopify/fetchers/index.d.ts +0 -2
- package/dist/cjs/shopify/fragments/article.d.ts +0 -2
- package/dist/cjs/shopify/fragments/blog.d.ts +0 -1
- package/dist/cjs/shopify/fragments/cart.d.ts +0 -1
- package/dist/cjs/shopify/fragments/collection.d.ts +0 -1
- package/dist/cjs/shopify/fragments/image.d.ts +0 -1
- package/dist/cjs/shopify/fragments/index.d.ts +0 -11
- package/dist/cjs/shopify/fragments/metafields.d.ts +0 -2
- package/dist/cjs/shopify/fragments/page-info.d.ts +0 -1
- package/dist/cjs/shopify/fragments/page.d.ts +0 -1
- package/dist/cjs/shopify/fragments/product.d.ts +0 -1
- package/dist/cjs/shopify/fragments/seo.d.ts +0 -1
- package/dist/cjs/shopify/fragments/variant.d.ts +0 -1
- package/dist/cjs/shopify/gql/fragment-masking.d.ts +0 -15
- package/dist/cjs/shopify/gql/gql.d.ts +0 -87
- package/dist/cjs/shopify/gql/graphql.d.ts +0 -7669
- package/dist/cjs/shopify/gql/index.d.ts +0 -3
- package/dist/cjs/shopify/hooks/index.d.ts +0 -2
- package/dist/cjs/shopify/hooks/useCreateCart.d.ts +0 -2
- package/dist/cjs/shopify/hooks/useProductsByHandles.d.ts +0 -4
- package/dist/cjs/shopify/mutations/create-cart.d.ts +0 -1
- package/dist/cjs/shopify/queries/get-product-by-handles.d.ts +0 -1
- package/dist/cjs/shopify/queries/index.d.ts +0 -1
- package/dist/cjs/shopify/src/index.d.ts +0 -5
- package/dist/cjs/shopify/tsup.config.d.ts +0 -2
- package/dist/cjs/shopify/types/article.d.ts +0 -48
- package/dist/cjs/shopify/types/cart.d.ts +0 -173
- package/dist/cjs/shopify/types/checkout.d.ts +0 -42
- package/dist/cjs/shopify/types/collection.d.ts +0 -122
- package/dist/cjs/shopify/types/common.d.ts +0 -42
- package/dist/cjs/shopify/types/config.d.ts +0 -12
- package/dist/cjs/shopify/types/customer.d.ts +0 -30
- package/dist/cjs/shopify/types/fetcher.d.ts +0 -38
- package/dist/cjs/shopify/types/index.d.ts +0 -10
- package/dist/cjs/shopify/types/page.d.ts +0 -33
- package/dist/cjs/shopify/types/product.d.ts +0 -174
- package/dist/cjs/shopify/types/search.d.ts +0 -54
- package/dist/cjs/shopify/types/site.d.ts +0 -33
- package/dist/cjs/shopify/types/type-helper.d.ts +0 -5
- package/dist/cjs/shopify/utils/colors.d.ts +0 -3
- package/dist/cjs/shopify/utils/const.d.ts +0 -76
- package/dist/cjs/shopify/utils/cookie.d.ts +0 -15
- package/dist/cjs/shopify/utils/errors.d.ts +0 -38
- package/dist/cjs/shopify/utils/fetch-graphql-api.d.ts +0 -19
- package/dist/cjs/shopify/utils/handle-fetch-response.d.ts +0 -5
- package/dist/cjs/shopify/utils/helper.d.ts +0 -28
- package/dist/cjs/shopify/utils/normalize/cart.d.ts +0 -7
- package/dist/cjs/shopify/utils/normalize/customer.d.ts +0 -3
- package/dist/cjs/shopify/utils/normalize/index.d.ts +0 -2
- package/dist/cjs/shopify/utils/normalize/metafield.d.ts +0 -5
- package/dist/cjs/shopify/utils/normalize/product.d.ts +0 -16
- package/dist/cjs/shopify/utils/store.d.ts +0 -2
- package/dist/cjs/shopify/utils/type-helper.d.ts +0 -5
- package/dist/cjs/tsconfig.tsbuildinfo +0 -1
- package/dist/esm/components/credits/context/hooks/useSendEmailValidation.d.ts +0 -1
- package/dist/esm/components/credits/context/hooks/useSendEmailValidation.js +0 -2
- package/dist/esm/components/credits/context/hooks/useSendEmailValidation.js.map +0 -7
- package/dist/esm/components/credits/context/hooks/useSubscriptions.d.ts +0 -5
- package/dist/esm/components/credits/context/hooks/useSubscriptions.js +0 -2
- package/dist/esm/components/credits/context/hooks/useSubscriptions.js.map +0 -7
- package/dist/esm/components/credits/modal/MyRewardsModal.d.ts +0 -32
- package/dist/esm/components/credits/modal/MyRewardsModal.js +0 -2
- package/dist/esm/components/credits/modal/MyRewardsModal.js.map +0 -7
- package/dist/esm/helpers/track.d.ts +0 -15
- package/dist/esm/helpers/track.js +0 -2
- package/dist/esm/helpers/track.js.map +0 -7
- package/dist/esm/index.css +0 -2
- package/dist/esm/index.css.map +0 -7
- package/dist/esm/shopify/context/ShopifyProvider.d.ts +0 -10
- package/dist/esm/shopify/fetchers/create-cart.d.ts +0 -13
- package/dist/esm/shopify/fetchers/get-products-by-handles.d.ts +0 -7
- package/dist/esm/shopify/fetchers/index.d.ts +0 -2
- package/dist/esm/shopify/fragments/article.d.ts +0 -2
- package/dist/esm/shopify/fragments/blog.d.ts +0 -1
- package/dist/esm/shopify/fragments/cart.d.ts +0 -1
- package/dist/esm/shopify/fragments/collection.d.ts +0 -1
- package/dist/esm/shopify/fragments/image.d.ts +0 -1
- package/dist/esm/shopify/fragments/index.d.ts +0 -11
- package/dist/esm/shopify/fragments/metafields.d.ts +0 -2
- package/dist/esm/shopify/fragments/page-info.d.ts +0 -1
- package/dist/esm/shopify/fragments/page.d.ts +0 -1
- package/dist/esm/shopify/fragments/product.d.ts +0 -1
- package/dist/esm/shopify/fragments/seo.d.ts +0 -1
- package/dist/esm/shopify/fragments/variant.d.ts +0 -1
- package/dist/esm/shopify/gql/fragment-masking.d.ts +0 -15
- package/dist/esm/shopify/gql/gql.d.ts +0 -87
- package/dist/esm/shopify/gql/graphql.d.ts +0 -7669
- package/dist/esm/shopify/gql/index.d.ts +0 -3
- package/dist/esm/shopify/hooks/index.d.ts +0 -2
- package/dist/esm/shopify/hooks/useCreateCart.d.ts +0 -2
- package/dist/esm/shopify/hooks/useProductsByHandles.d.ts +0 -4
- package/dist/esm/shopify/mutations/create-cart.d.ts +0 -1
- package/dist/esm/shopify/queries/get-product-by-handles.d.ts +0 -1
- package/dist/esm/shopify/queries/index.d.ts +0 -1
- package/dist/esm/shopify/src/index.d.ts +0 -5
- package/dist/esm/shopify/tsup.config.d.ts +0 -2
- package/dist/esm/shopify/types/article.d.ts +0 -48
- package/dist/esm/shopify/types/cart.d.ts +0 -173
- package/dist/esm/shopify/types/checkout.d.ts +0 -42
- package/dist/esm/shopify/types/collection.d.ts +0 -122
- package/dist/esm/shopify/types/common.d.ts +0 -42
- package/dist/esm/shopify/types/config.d.ts +0 -12
- package/dist/esm/shopify/types/customer.d.ts +0 -30
- package/dist/esm/shopify/types/fetcher.d.ts +0 -38
- package/dist/esm/shopify/types/index.d.ts +0 -10
- package/dist/esm/shopify/types/page.d.ts +0 -33
- package/dist/esm/shopify/types/product.d.ts +0 -174
- package/dist/esm/shopify/types/search.d.ts +0 -54
- package/dist/esm/shopify/types/site.d.ts +0 -33
- package/dist/esm/shopify/types/type-helper.d.ts +0 -5
- package/dist/esm/shopify/utils/colors.d.ts +0 -3
- package/dist/esm/shopify/utils/const.d.ts +0 -76
- package/dist/esm/shopify/utils/cookie.d.ts +0 -15
- package/dist/esm/shopify/utils/errors.d.ts +0 -38
- package/dist/esm/shopify/utils/fetch-graphql-api.d.ts +0 -19
- package/dist/esm/shopify/utils/handle-fetch-response.d.ts +0 -5
- package/dist/esm/shopify/utils/helper.d.ts +0 -28
- package/dist/esm/shopify/utils/normalize/cart.d.ts +0 -7
- package/dist/esm/shopify/utils/normalize/customer.d.ts +0 -3
- package/dist/esm/shopify/utils/normalize/index.d.ts +0 -2
- package/dist/esm/shopify/utils/normalize/metafield.d.ts +0 -5
- package/dist/esm/shopify/utils/normalize/product.d.ts +0 -16
- package/dist/esm/shopify/utils/store.d.ts +0 -2
- package/dist/esm/shopify/utils/type-helper.d.ts +0 -5
- package/dist/esm/tsconfig.tsbuildinfo +0 -1
- /package/dist/cjs/components/credits/creditsBenefits/{benefitItem.d.ts → BenefitItem.d.ts} +0 -0
- /package/dist/cjs/components/credits/creditsBenefits/{benefitItem.js → BenefitItem.js} +0 -0
- /package/dist/cjs/components/credits/creditsBenefits/{benefitItem.js.map → BenefitItem.js.map} +0 -0
- /package/dist/cjs/components/credits/creditsBenefits/{iconInfo.d.ts → IconInfo.d.ts} +0 -0
- /package/dist/cjs/components/credits/creditsBenefits/{iconInfo.js → IconInfo.js} +0 -0
- /package/dist/cjs/components/credits/creditsBenefits/{iconInfo.js.map → IconInfo.js.map} +0 -0
- /package/dist/cjs/components/credits/modal/{activitiesModal.d.ts → ActivitiesModal.d.ts} +0 -0
- /package/dist/cjs/components/credits/modal/{activitiesModal.js → ActivitiesModal.js} +0 -0
- /package/dist/cjs/components/credits/modal/{activitiesModal.js.map → ActivitiesModal.js.map} +0 -0
- /package/dist/cjs/components/credits/modal/{creditsUploadReceiptModal.d.ts → CreditsUploadReceiptModal.d.ts} +0 -0
- /package/dist/cjs/components/credits/modal/{creditsUploadReceiptModal.js → CreditsUploadReceiptModal.js} +0 -0
- /package/dist/cjs/components/credits/modal/{creditsUploadReceiptModal.js.map → CreditsUploadReceiptModal.js.map} +0 -0
- /package/dist/cjs/components/credits/modal/{loadingDots.d.ts → LoadingDots.d.ts} +0 -0
- /package/dist/cjs/components/credits/modal/{loadingDots.js → LoadingDots.js} +0 -0
- /package/dist/cjs/components/credits/modal/{loadingDots.js.map → LoadingDots.js.map} +0 -0
- /package/dist/cjs/components/credits/modal/{modalContainer.d.ts → ModalContainer.d.ts} +0 -0
- /package/dist/cjs/components/credits/modal/{modalContainer.js → ModalContainer.js} +0 -0
- /package/dist/cjs/components/credits/modal/{modalContainer.js.map → ModalContainer.js.map} +0 -0
- /package/dist/cjs/components/credits/modal/{rulesModal.d.ts → RulesModal.d.ts} +0 -0
- /package/dist/cjs/components/credits/modal/{rulesModal.js → RulesModal.js} +0 -0
- /package/dist/cjs/components/credits/modal/{rulesModal.js.map → RulesModal.js.map} +0 -0
- /package/dist/cjs/components/credits/modal/{subscribeModal.d.ts → SubscribeModal.d.ts} +0 -0
- /package/dist/cjs/components/credits/modal/{subscribeModal.js → SubscribeModal.js} +0 -0
- /package/dist/cjs/components/credits/modal/{subscribeModal.js.map → SubscribeModal.js.map} +0 -0
- /package/dist/cjs/components/credits/modal/{tip.d.ts → Tip.d.ts} +0 -0
- /package/dist/cjs/components/credits/modal/{tip.js → Tip.js} +0 -0
- /package/dist/cjs/components/credits/modal/{tip.js.map → Tip.js.map} +0 -0
- /package/dist/cjs/templates/{credits.d.ts → Credits.d.ts} +0 -0
- /package/dist/cjs/templates/{credits.js → Credits.js} +0 -0
- /package/dist/cjs/templates/{credits.js.map → Credits.js.map} +0 -0
- /package/dist/esm/components/credits/creditsBenefits/{benefitItem.d.ts → BenefitItem.d.ts} +0 -0
- /package/dist/esm/components/credits/creditsBenefits/{benefitItem.js → BenefitItem.js} +0 -0
- /package/dist/esm/components/credits/creditsBenefits/{benefitItem.js.map → BenefitItem.js.map} +0 -0
- /package/dist/esm/components/credits/creditsBenefits/{iconInfo.d.ts → IconInfo.d.ts} +0 -0
- /package/dist/esm/components/credits/creditsBenefits/{iconInfo.js → IconInfo.js} +0 -0
- /package/dist/esm/components/credits/creditsBenefits/{iconInfo.js.map → IconInfo.js.map} +0 -0
- /package/dist/esm/components/credits/modal/{activitiesModal.d.ts → ActivitiesModal.d.ts} +0 -0
- /package/dist/esm/components/credits/modal/{activitiesModal.js → ActivitiesModal.js} +0 -0
- /package/dist/esm/components/credits/modal/{activitiesModal.js.map → ActivitiesModal.js.map} +0 -0
- /package/dist/esm/components/credits/modal/{creditsUploadReceiptModal.d.ts → CreditsUploadReceiptModal.d.ts} +0 -0
- /package/dist/esm/components/credits/modal/{creditsUploadReceiptModal.js → CreditsUploadReceiptModal.js} +0 -0
- /package/dist/esm/components/credits/modal/{creditsUploadReceiptModal.js.map → CreditsUploadReceiptModal.js.map} +0 -0
- /package/dist/esm/components/credits/modal/{loadingDots.d.ts → LoadingDots.d.ts} +0 -0
- /package/dist/esm/components/credits/modal/{loadingDots.js → LoadingDots.js} +0 -0
- /package/dist/esm/components/credits/modal/{loadingDots.js.map → LoadingDots.js.map} +0 -0
- /package/dist/esm/components/credits/modal/{modalContainer.d.ts → ModalContainer.d.ts} +0 -0
- /package/dist/esm/components/credits/modal/{modalContainer.js → ModalContainer.js} +0 -0
- /package/dist/esm/components/credits/modal/{modalContainer.js.map → ModalContainer.js.map} +0 -0
- /package/dist/esm/components/credits/modal/{rulesModal.d.ts → RulesModal.d.ts} +0 -0
- /package/dist/esm/components/credits/modal/{rulesModal.js → RulesModal.js} +0 -0
- /package/dist/esm/components/credits/modal/{rulesModal.js.map → RulesModal.js.map} +0 -0
- /package/dist/esm/components/credits/modal/{subscribeModal.d.ts → SubscribeModal.d.ts} +0 -0
- /package/dist/esm/components/credits/modal/{subscribeModal.js → SubscribeModal.js} +0 -0
- /package/dist/esm/components/credits/modal/{subscribeModal.js.map → SubscribeModal.js.map} +0 -0
- /package/dist/esm/components/credits/modal/{tip.d.ts → Tip.d.ts} +0 -0
- /package/dist/esm/components/credits/modal/{tip.js → Tip.js} +0 -0
- /package/dist/esm/components/credits/modal/{tip.js.map → Tip.js.map} +0 -0
- /package/dist/esm/templates/{credits.d.ts → Credits.d.ts} +0 -0
- /package/dist/esm/templates/{credits.js → Credits.js} +0 -0
- /package/dist/esm/templates/{credits.js.map → Credits.js.map} +0 -0
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { GetProductsMetafieldQueryRoot } from '../fetchers/get-products-by-handles';
|
|
2
|
-
import { ShopifyHookOptions } from '../types/fetcher';
|
|
3
|
-
import { GetProductsByHandlesReq } from '../fetchers/get-products-by-handles';
|
|
4
|
-
export declare function useProductsByHandles({ handles, metafieldIdentifiers, }: ShopifyHookOptions<GetProductsByHandlesReq, GetProductsMetafieldQueryRoot>): import("swr").SWRResponse<import("src").Product[], any, any>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const createCartMutation: string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const getProductsByHandlesQuery: (handles: string[]) => string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { getProductsByHandlesQuery } from './get-product-by-handles';
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { Article, ArticleEdge } from '../gql';
|
|
2
|
-
export type ArticleResponse = {
|
|
3
|
-
blog: {
|
|
4
|
-
title: string;
|
|
5
|
-
seo: string;
|
|
6
|
-
article: Article;
|
|
7
|
-
articles: {
|
|
8
|
-
edges: ArticleEdge[];
|
|
9
|
-
pageInfo: {
|
|
10
|
-
hasNextPage: boolean;
|
|
11
|
-
hasPreviousPage: boolean;
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
handle: string;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
export type ArticleImage = {
|
|
18
|
-
url: string;
|
|
19
|
-
alt?: string;
|
|
20
|
-
};
|
|
21
|
-
export type ArticleTypes = {
|
|
22
|
-
article: Article;
|
|
23
|
-
metafields: any;
|
|
24
|
-
};
|
|
25
|
-
export type ArticleQuery = {
|
|
26
|
-
locale: string;
|
|
27
|
-
blog: string;
|
|
28
|
-
slug: string;
|
|
29
|
-
};
|
|
30
|
-
export type GetArticleOperation = {
|
|
31
|
-
data: {
|
|
32
|
-
blog_article?: ArticleTypes;
|
|
33
|
-
error?: string;
|
|
34
|
-
};
|
|
35
|
-
variables: {
|
|
36
|
-
blog: string;
|
|
37
|
-
slug: string;
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
export type GetAllArticleOperation<T extends ArticleTypes = ArticleTypes> = {
|
|
41
|
-
data: {
|
|
42
|
-
articles: T['article'][];
|
|
43
|
-
};
|
|
44
|
-
variables: {
|
|
45
|
-
first?: number;
|
|
46
|
-
after?: string;
|
|
47
|
-
};
|
|
48
|
-
};
|
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
import { ProductVariant, Product } from '../types/product';
|
|
2
|
-
import { Cart as ShopifyCart } from '../gql';
|
|
3
|
-
import { Discount } from './common';
|
|
4
|
-
import { CustomerAddress } from './customer';
|
|
5
|
-
export type Attributes = {
|
|
6
|
-
key: string;
|
|
7
|
-
value: string;
|
|
8
|
-
}[];
|
|
9
|
-
export type ShopifyCartOperation = {
|
|
10
|
-
cart: ShopifyCart;
|
|
11
|
-
variables: {
|
|
12
|
-
cartId: string;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
export type ShopifyCreateCartOperation = {
|
|
16
|
-
cartCreate: {
|
|
17
|
-
cart: Cart;
|
|
18
|
-
};
|
|
19
|
-
variables: {
|
|
20
|
-
buyerIdentity?: any;
|
|
21
|
-
lines: {
|
|
22
|
-
merchandiseId: string;
|
|
23
|
-
quantity: number;
|
|
24
|
-
attributes?: any;
|
|
25
|
-
}[];
|
|
26
|
-
attributes?: {};
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
export type ShopifyAddToCartOperation = {
|
|
30
|
-
cartLinesAdd: {
|
|
31
|
-
cart: ShopifyCart;
|
|
32
|
-
};
|
|
33
|
-
variables: {
|
|
34
|
-
cartId: string;
|
|
35
|
-
buyerIdentity?: any;
|
|
36
|
-
lines: {
|
|
37
|
-
merchandiseId: string;
|
|
38
|
-
quantity: number;
|
|
39
|
-
attributes?: any;
|
|
40
|
-
}[];
|
|
41
|
-
attributes?: {};
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
export type ShopifyRemoveFromCartOperation = {
|
|
45
|
-
cartLinesRemove: {
|
|
46
|
-
cart: ShopifyCart;
|
|
47
|
-
};
|
|
48
|
-
variables: {
|
|
49
|
-
cartId: string;
|
|
50
|
-
lineIds: string[];
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
export type ShopifyUpdateCartOperation = {
|
|
54
|
-
cartLinesUpdate: {
|
|
55
|
-
cart: ShopifyCart;
|
|
56
|
-
};
|
|
57
|
-
variables: {
|
|
58
|
-
cartId: string;
|
|
59
|
-
lines: {
|
|
60
|
-
id: string;
|
|
61
|
-
merchandiseId?: string;
|
|
62
|
-
quantity?: number;
|
|
63
|
-
attributes?: any;
|
|
64
|
-
}[];
|
|
65
|
-
attributes?: any;
|
|
66
|
-
};
|
|
67
|
-
};
|
|
68
|
-
export type ShopifyCodesUpdateCartOperation = {
|
|
69
|
-
cartDiscountCodesUpdate: {
|
|
70
|
-
cart: ShopifyCart;
|
|
71
|
-
};
|
|
72
|
-
variables: {
|
|
73
|
-
cartId: string;
|
|
74
|
-
discountCodes: string[];
|
|
75
|
-
};
|
|
76
|
-
};
|
|
77
|
-
export type CartAttributesUpdateOperation = {
|
|
78
|
-
cartAttributesUpdate: {
|
|
79
|
-
cart: ShopifyCart;
|
|
80
|
-
};
|
|
81
|
-
variables: {
|
|
82
|
-
cartId: string;
|
|
83
|
-
attributes: any;
|
|
84
|
-
};
|
|
85
|
-
};
|
|
86
|
-
export type InputArribute = {
|
|
87
|
-
key?: string;
|
|
88
|
-
value?: string;
|
|
89
|
-
};
|
|
90
|
-
export type subInputValue = {
|
|
91
|
-
[key: string]: string;
|
|
92
|
-
};
|
|
93
|
-
export type InputLineItem = {
|
|
94
|
-
merchandiseId: string;
|
|
95
|
-
quantity: number;
|
|
96
|
-
attributes: any;
|
|
97
|
-
buyerIdentity?: any;
|
|
98
|
-
sellingPlanId?: string;
|
|
99
|
-
};
|
|
100
|
-
export type SelectedOption = {
|
|
101
|
-
id?: string;
|
|
102
|
-
name: string;
|
|
103
|
-
value: string;
|
|
104
|
-
};
|
|
105
|
-
export type LineItem = {
|
|
106
|
-
id: string;
|
|
107
|
-
variantId: string;
|
|
108
|
-
productId: string;
|
|
109
|
-
name: string;
|
|
110
|
-
quantity: number;
|
|
111
|
-
discounts: Discount[];
|
|
112
|
-
path: string;
|
|
113
|
-
variant: ProductVariant;
|
|
114
|
-
totalAmount: number;
|
|
115
|
-
subtotalAmount: number;
|
|
116
|
-
options?: SelectedOption[];
|
|
117
|
-
discountAllocations?: DiscountAllocations[];
|
|
118
|
-
product?: Product;
|
|
119
|
-
customAttributes?: any;
|
|
120
|
-
attributes?: any;
|
|
121
|
-
sellingPlan?: string;
|
|
122
|
-
};
|
|
123
|
-
export type Discounts = {
|
|
124
|
-
applicable: boolean;
|
|
125
|
-
code: string;
|
|
126
|
-
};
|
|
127
|
-
export type DiscountAllocations = {
|
|
128
|
-
amount: number;
|
|
129
|
-
code: string;
|
|
130
|
-
};
|
|
131
|
-
export type EstimatedCost = {
|
|
132
|
-
amount: string;
|
|
133
|
-
currencyCode: string;
|
|
134
|
-
};
|
|
135
|
-
export type SelectedDeliveryOption = {
|
|
136
|
-
code: string;
|
|
137
|
-
estimatedCost: EstimatedCost;
|
|
138
|
-
handle: string;
|
|
139
|
-
title: string;
|
|
140
|
-
};
|
|
141
|
-
export type DeliveryGroups = {
|
|
142
|
-
deliveryAddress: CustomerAddress;
|
|
143
|
-
deliveryOptions: any;
|
|
144
|
-
id: string;
|
|
145
|
-
selectedDeliveryOption?: any;
|
|
146
|
-
};
|
|
147
|
-
export type Cart = {
|
|
148
|
-
id: string;
|
|
149
|
-
customerId?: string;
|
|
150
|
-
email?: string;
|
|
151
|
-
createdAt: string;
|
|
152
|
-
currency: {
|
|
153
|
-
code: string;
|
|
154
|
-
};
|
|
155
|
-
taxesIncluded?: boolean;
|
|
156
|
-
lineItems: LineItem[];
|
|
157
|
-
totalLineItemsDiscount?: number;
|
|
158
|
-
orderDiscounts?: number;
|
|
159
|
-
lineItemsSubtotalPrice: number;
|
|
160
|
-
subtotalPrice: number;
|
|
161
|
-
totalPrice: number;
|
|
162
|
-
totalTaxAmount: number;
|
|
163
|
-
discountCodes: Discounts[];
|
|
164
|
-
discountAllocations?: DiscountAllocations[];
|
|
165
|
-
discounts?: Discount[];
|
|
166
|
-
url?: string;
|
|
167
|
-
ready: boolean;
|
|
168
|
-
orderStatusUrl?: any;
|
|
169
|
-
customAttributes?: any;
|
|
170
|
-
buyerIdentity?: any;
|
|
171
|
-
deliveryAmount?: number;
|
|
172
|
-
deliveryGroups?: DeliveryGroups[];
|
|
173
|
-
};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
export type ShopifyGetCheckoutOperation = {
|
|
2
|
-
node: {
|
|
3
|
-
id: string;
|
|
4
|
-
webUrl: string;
|
|
5
|
-
completedAt: string;
|
|
6
|
-
};
|
|
7
|
-
variables: {
|
|
8
|
-
checkoutId: string;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
export type ShopifyCreateCheckoutOperation = {
|
|
12
|
-
checkoutCreate: {
|
|
13
|
-
checkout: {
|
|
14
|
-
id: string;
|
|
15
|
-
webUrl: string;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
variables: {
|
|
19
|
-
customAttributes?: any;
|
|
20
|
-
lineItems: {
|
|
21
|
-
variantId: string;
|
|
22
|
-
quantity: number;
|
|
23
|
-
customAttributes?: any;
|
|
24
|
-
}[];
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
export type ShopifyCheckoutDiscountApplyOperation = {
|
|
28
|
-
checkoutDiscountCodeApplyV2: {
|
|
29
|
-
checkout: {
|
|
30
|
-
id: string;
|
|
31
|
-
webUrl: string;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
variables: {
|
|
35
|
-
checkoutId: string;
|
|
36
|
-
discountCode: string;
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
export type Checkout = {
|
|
40
|
-
id?: string;
|
|
41
|
-
webUrl?: string;
|
|
42
|
-
};
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import { ProductTypes } from './product';
|
|
2
|
-
import { Collection, Image, Maybe } from '../gql';
|
|
3
|
-
export type CollectionsMetafield = {
|
|
4
|
-
[key: string]: string[];
|
|
5
|
-
};
|
|
6
|
-
export type FilterPriceTxt = {
|
|
7
|
-
text: string;
|
|
8
|
-
gte: string;
|
|
9
|
-
lte: string;
|
|
10
|
-
};
|
|
11
|
-
export type FiltersPairMetafield = {
|
|
12
|
-
collections: {
|
|
13
|
-
[key: string]: {
|
|
14
|
-
filter_params: string[];
|
|
15
|
-
price?: [number[]];
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
filters_label: {
|
|
19
|
-
[key: string]: any;
|
|
20
|
-
};
|
|
21
|
-
cabletype?: {
|
|
22
|
-
[key: string]: any;
|
|
23
|
-
};
|
|
24
|
-
length?: {
|
|
25
|
-
[key: string]: any;
|
|
26
|
-
};
|
|
27
|
-
videoports?: {
|
|
28
|
-
[key: string]: any;
|
|
29
|
-
};
|
|
30
|
-
datatransferspeed?: {
|
|
31
|
-
[key: string]: any;
|
|
32
|
-
};
|
|
33
|
-
connectivity?: {
|
|
34
|
-
[key: string]: any;
|
|
35
|
-
};
|
|
36
|
-
numberofports?: {
|
|
37
|
-
[key: string]: any;
|
|
38
|
-
};
|
|
39
|
-
porttype?: {
|
|
40
|
-
[key: string]: any;
|
|
41
|
-
};
|
|
42
|
-
numberofdevicespowered?: {
|
|
43
|
-
[key: string]: any;
|
|
44
|
-
};
|
|
45
|
-
chargingtechnology?: {
|
|
46
|
-
[key: string]: any;
|
|
47
|
-
};
|
|
48
|
-
capacity?: {
|
|
49
|
-
[key: string]: any;
|
|
50
|
-
};
|
|
51
|
-
product_type: {
|
|
52
|
-
[key: string]: any;
|
|
53
|
-
};
|
|
54
|
-
price: FilterPriceTxt;
|
|
55
|
-
filter_txt: {
|
|
56
|
-
[key: string]: any;
|
|
57
|
-
};
|
|
58
|
-
[key: string]: any;
|
|
59
|
-
};
|
|
60
|
-
export type FiltersPair = {
|
|
61
|
-
label: string;
|
|
62
|
-
value: string;
|
|
63
|
-
options: Array<{
|
|
64
|
-
value: string;
|
|
65
|
-
label: string;
|
|
66
|
-
}>;
|
|
67
|
-
};
|
|
68
|
-
export type CategoryImage = {
|
|
69
|
-
url: string;
|
|
70
|
-
alt?: string;
|
|
71
|
-
};
|
|
72
|
-
export type Category<T extends ProductTypes = ProductTypes> = {
|
|
73
|
-
id: string;
|
|
74
|
-
name: string;
|
|
75
|
-
slug: string;
|
|
76
|
-
path: string;
|
|
77
|
-
description?: string;
|
|
78
|
-
descriptionHtml?: string;
|
|
79
|
-
image?: Maybe<Image>;
|
|
80
|
-
products?: T['product'][];
|
|
81
|
-
filters?: any;
|
|
82
|
-
pageInfo?: any;
|
|
83
|
-
seo?: any;
|
|
84
|
-
initData?: any;
|
|
85
|
-
metafields?: {
|
|
86
|
-
[key: string]: any;
|
|
87
|
-
};
|
|
88
|
-
};
|
|
89
|
-
export type CategoryTypes = {
|
|
90
|
-
collection: Category;
|
|
91
|
-
};
|
|
92
|
-
export type GetCollectionOperation<T extends CategoryTypes = CategoryTypes> = {
|
|
93
|
-
collectionByHandle: Collection;
|
|
94
|
-
variables: {
|
|
95
|
-
handle?: string;
|
|
96
|
-
first?: number;
|
|
97
|
-
after?: string;
|
|
98
|
-
last?: string;
|
|
99
|
-
before?: string;
|
|
100
|
-
reverse?: boolean;
|
|
101
|
-
sortKey?: string;
|
|
102
|
-
filters?: any;
|
|
103
|
-
};
|
|
104
|
-
};
|
|
105
|
-
export type CollectionQuery = {
|
|
106
|
-
locale?: string;
|
|
107
|
-
handle?: string;
|
|
108
|
-
queryArgument?: {
|
|
109
|
-
first?: number;
|
|
110
|
-
after?: string;
|
|
111
|
-
last?: string;
|
|
112
|
-
before?: string;
|
|
113
|
-
reverse?: boolean;
|
|
114
|
-
sortKey?: string;
|
|
115
|
-
filters?: any;
|
|
116
|
-
};
|
|
117
|
-
};
|
|
118
|
-
export type PriceLabel = {
|
|
119
|
-
text: string;
|
|
120
|
-
gte: string;
|
|
121
|
-
lte: string;
|
|
122
|
-
};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
export type Discount = {
|
|
2
|
-
value?: number;
|
|
3
|
-
percentage?: number;
|
|
4
|
-
amount?: number;
|
|
5
|
-
currencyCode?: string;
|
|
6
|
-
};
|
|
7
|
-
export type Measurement = {
|
|
8
|
-
value: number;
|
|
9
|
-
unit: 'KILOGRAMS' | 'GRAMS' | 'POUNDS' | 'OUNCES';
|
|
10
|
-
};
|
|
11
|
-
export type Image = {
|
|
12
|
-
url: string;
|
|
13
|
-
altText?: string;
|
|
14
|
-
width?: number;
|
|
15
|
-
height?: number;
|
|
16
|
-
};
|
|
17
|
-
export type Maybe<T> = T | null;
|
|
18
|
-
export type ExtractVariables<T> = T extends {
|
|
19
|
-
variables?: object;
|
|
20
|
-
} ? T['variables'] : undefined;
|
|
21
|
-
export interface CommerceAPIFetchOptions<T> {
|
|
22
|
-
variables?: ExtractVariables<T>;
|
|
23
|
-
preview?: boolean;
|
|
24
|
-
}
|
|
25
|
-
export type Connection<T> = {
|
|
26
|
-
edges: Array<Edge<T>>;
|
|
27
|
-
};
|
|
28
|
-
export type Edge<T> = {
|
|
29
|
-
node: T;
|
|
30
|
-
};
|
|
31
|
-
export type Menu = {
|
|
32
|
-
title: string;
|
|
33
|
-
path: string;
|
|
34
|
-
};
|
|
35
|
-
export type Money = {
|
|
36
|
-
amount: string;
|
|
37
|
-
currencyCode: string;
|
|
38
|
-
};
|
|
39
|
-
export type SEO = {
|
|
40
|
-
title: string;
|
|
41
|
-
description: string;
|
|
42
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export type SiteConfig = {
|
|
2
|
-
locale: string;
|
|
3
|
-
metafieldsNamespace: string;
|
|
4
|
-
cartIdCookieName: string;
|
|
5
|
-
brand: string;
|
|
6
|
-
appName: string;
|
|
7
|
-
};
|
|
8
|
-
export type ShopifyConfig = {
|
|
9
|
-
storefrontToken: string;
|
|
10
|
-
storeDomain: string;
|
|
11
|
-
};
|
|
12
|
-
export type ShopifyContextValue = SiteConfig & ShopifyConfig;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export interface GetCustomerQueryResponse {
|
|
2
|
-
}
|
|
3
|
-
export type CustomerAddress = {
|
|
4
|
-
id: string;
|
|
5
|
-
firstName: string;
|
|
6
|
-
lastName: string;
|
|
7
|
-
address1: string;
|
|
8
|
-
address2: string;
|
|
9
|
-
city: string;
|
|
10
|
-
province: string;
|
|
11
|
-
provinceCode: string;
|
|
12
|
-
countryCodeV2: string;
|
|
13
|
-
phone: string;
|
|
14
|
-
zip: string;
|
|
15
|
-
};
|
|
16
|
-
export type Customer = {
|
|
17
|
-
id: string;
|
|
18
|
-
firstName?: string;
|
|
19
|
-
lastName?: string;
|
|
20
|
-
displayName?: string;
|
|
21
|
-
email: string;
|
|
22
|
-
phone?: string;
|
|
23
|
-
tags?: string[];
|
|
24
|
-
acceptsMarketing?: boolean;
|
|
25
|
-
createdAt?: string;
|
|
26
|
-
orders: {
|
|
27
|
-
id: string;
|
|
28
|
-
}[];
|
|
29
|
-
defaultAddress?: CustomerAddress;
|
|
30
|
-
};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { HasMetafieldsIdentifier } from '../gql';
|
|
2
|
-
import { PartialRecord } from './type-helper';
|
|
3
|
-
import { SWRMutationResponse } from 'swr/mutation';
|
|
4
|
-
import { ShopifyConfig } from './config';
|
|
5
|
-
type RequestBasicParams = {
|
|
6
|
-
query?: string;
|
|
7
|
-
config: ShopifyConfig;
|
|
8
|
-
};
|
|
9
|
-
export declare enum HasMetafieldQueryRoot {
|
|
10
|
-
Product = "product",
|
|
11
|
-
Variant = "variant",
|
|
12
|
-
Page = "page",
|
|
13
|
-
Article = "article",
|
|
14
|
-
Blog = "blog",
|
|
15
|
-
Collection = "collection",
|
|
16
|
-
Shop = "shop",
|
|
17
|
-
Cart = "cart",
|
|
18
|
-
Customer = "customer",
|
|
19
|
-
Location = "location",
|
|
20
|
-
Market = "market",
|
|
21
|
-
Order = "order"
|
|
22
|
-
}
|
|
23
|
-
export type ConstructMetafieldIdentifiersQueryInput<Roots extends HasMetafieldQueryRoot> = Partial<Record<Roots, HasMetafieldsIdentifier[]>>;
|
|
24
|
-
type RequestWithOptions<T, M extends HasMetafieldQueryRoot> = RequestBasicParams & {
|
|
25
|
-
options: T & {
|
|
26
|
-
metafieldIdentifiers?: PartialRecord<M, HasMetafieldsIdentifier[]>;
|
|
27
|
-
metafieldsNamespace: string;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
export type ShopifyFetcherVariables<T, M extends HasMetafieldQueryRoot> = M extends HasMetafieldQueryRoot ? T & PartialRecord<`${M}MetafieldIdentifiers`, HasMetafieldsIdentifier[]> : T;
|
|
31
|
-
export type ShopifyFetcher<Data = Record<string, any>, Req = undefined, Metafields extends HasMetafieldQueryRoot = HasMetafieldQueryRoot> = (req: Req extends Record<string, any> ? RequestWithOptions<Req, Metafields> : RequestBasicParams) => Promise<Data>;
|
|
32
|
-
export type ShopifyHookOptions<T, M extends HasMetafieldQueryRoot> = {
|
|
33
|
-
locale?: string;
|
|
34
|
-
query?: string;
|
|
35
|
-
metafieldIdentifiers?: PartialRecord<M, HasMetafieldsIdentifier[]>;
|
|
36
|
-
} & T;
|
|
37
|
-
export type ShopifyMutationHook<Req, Metafields extends HasMetafieldQueryRoot> = (options: ShopifyHookOptions<Req, Metafields>) => SWRMutationResponse;
|
|
38
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export * from './common';
|
|
2
|
-
export * from './cart';
|
|
3
|
-
export * from './checkout';
|
|
4
|
-
export * from './page';
|
|
5
|
-
export * from './product';
|
|
6
|
-
export * from './site';
|
|
7
|
-
export * from './collection';
|
|
8
|
-
export * from './search';
|
|
9
|
-
export * from './article';
|
|
10
|
-
export * from './customer';
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
export type Page = {
|
|
2
|
-
id: string;
|
|
3
|
-
handle: string;
|
|
4
|
-
name: string;
|
|
5
|
-
path?: string;
|
|
6
|
-
body: string;
|
|
7
|
-
is_visible?: boolean;
|
|
8
|
-
sort_order?: number;
|
|
9
|
-
url?: string;
|
|
10
|
-
seo?: any;
|
|
11
|
-
metafields?: {
|
|
12
|
-
[key: string]: any;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
export type PageTypes = {
|
|
16
|
-
page: Page;
|
|
17
|
-
};
|
|
18
|
-
export type GetAllPagesOperation<T extends PageTypes = PageTypes> = {
|
|
19
|
-
data: {
|
|
20
|
-
pages: T['page'][];
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
export type GetPageOperation<T extends PageTypes = PageTypes> = {
|
|
24
|
-
data: {
|
|
25
|
-
page?: T['page'];
|
|
26
|
-
metafields?: {
|
|
27
|
-
[key: string]: any;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
variables: {
|
|
31
|
-
id: string;
|
|
32
|
-
};
|
|
33
|
-
};
|