@anker-in/lib 1.1.0-beta.3 → 1.1.0-beta.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/.turbo/turbo-test.log +1 -1
- package/dist/cart/const.d.ts +6 -0
- package/dist/cart/const.d.ts.map +1 -0
- package/dist/cart/context/index.d.ts +47 -0
- package/dist/cart/context/index.d.ts.map +1 -0
- package/dist/cart/hooks/basic/useAddToCart.d.ts +30 -0
- package/dist/cart/hooks/basic/useAddToCart.d.ts.map +1 -0
- package/dist/cart/hooks/basic/useApplyCartCodes.d.ts +11 -0
- package/dist/cart/hooks/basic/useApplyCartCodes.d.ts.map +1 -0
- package/dist/cart/hooks/basic/useBuyNow.d.ts +21 -0
- package/dist/cart/hooks/basic/useBuyNow.d.ts.map +1 -0
- package/dist/cart/hooks/basic/useCreateCart.d.ts +7 -0
- package/dist/cart/hooks/basic/useCreateCart.d.ts.map +1 -0
- package/dist/cart/hooks/basic/useRemoveCartCodes.d.ts +11 -0
- package/dist/cart/hooks/basic/useRemoveCartCodes.d.ts.map +1 -0
- package/dist/cart/hooks/basic/useRemoveCartLines.d.ts +11 -0
- package/dist/cart/hooks/basic/useRemoveCartLines.d.ts.map +1 -0
- package/dist/cart/hooks/basic/useUpdateCartAttributes.d.ts +8 -0
- package/dist/cart/hooks/basic/useUpdateCartAttributes.d.ts.map +1 -0
- package/dist/cart/hooks/basic/useUpdateCartBuyerIdentity.d.ts +8 -0
- package/dist/cart/hooks/basic/useUpdateCartBuyerIdentity.d.ts.map +1 -0
- package/dist/cart/hooks/basic/useUpdateCartLines.d.ts +8 -0
- package/dist/cart/hooks/basic/useUpdateCartLines.d.ts.map +1 -0
- package/dist/cart/hooks/feature/useCalcAutoFreeGift.d.ts +10 -0
- package/dist/cart/hooks/feature/useCalcAutoFreeGift.d.ts.map +1 -0
- package/dist/cart/hooks/feature/useCalcOrderDiscount.d.ts +21 -0
- package/dist/cart/hooks/feature/useCalcOrderDiscount.d.ts.map +1 -0
- package/dist/cart/hooks/feature/useCartAttributes.d.ts +10 -0
- package/dist/cart/hooks/feature/useCartAttributes.d.ts.map +1 -0
- package/dist/cart/hooks/feature/useCartItemQuantityLimit.d.ts +19 -0
- package/dist/cart/hooks/feature/useCartItemQuantityLimit.d.ts.map +1 -0
- package/dist/cart/hooks/feature/useScriptAutoFreeGift.d.ts +37 -0
- package/dist/cart/hooks/feature/useScriptAutoFreeGift.d.ts.map +1 -0
- package/dist/cart/hooks/feature/useUpdateLineCodeAmountAttributes.d.ts +9 -0
- package/dist/cart/hooks/feature/useUpdateLineCodeAmountAttributes.d.ts.map +1 -0
- package/dist/cart/index.d.ts +6 -0
- package/dist/cart/index.d.ts.map +1 -0
- package/dist/cart/track/fbq.d.ts +14 -0
- package/dist/cart/track/fbq.d.ts.map +1 -0
- package/dist/cart/track/gtm.d.ts +26 -0
- package/dist/cart/track/gtm.d.ts.map +1 -0
- package/dist/cart/types/autoFreeGift.d.ts +135 -0
- package/dist/cart/types/autoFreeGift.d.ts.map +1 -0
- package/dist/cart/types/index.d.ts +24 -0
- package/dist/cart/types/index.d.ts.map +1 -0
- package/dist/cart/types/orderDiscount.d.ts +35 -0
- package/dist/cart/types/orderDiscount.d.ts.map +1 -0
- package/dist/cart/types/priceDiscount.d.ts +20 -0
- package/dist/cart/types/priceDiscount.d.ts.map +1 -0
- package/dist/cart/utils/autoFreeGift.d.ts +21 -0
- package/dist/cart/utils/autoFreeGift.d.ts.map +1 -0
- package/dist/cart/utils/index.d.ts +4 -0
- package/dist/cart/utils/index.d.ts.map +1 -0
- package/dist/context/HeadlessProvider.d.ts +10 -0
- package/dist/context/HeadlessProvider.d.ts.map +1 -0
- package/dist/context/config.d.ts +11 -0
- package/dist/context/config.d.ts.map +1 -0
- package/dist/context/index.d.ts +3 -0
- package/dist/context/index.d.ts.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/registration/hooks/index.d.ts +4 -0
- package/dist/registration/hooks/index.d.ts.map +1 -0
- package/dist/registration/hooks/useEmailValidation.d.ts +17 -0
- package/dist/registration/hooks/useEmailValidation.d.ts.map +1 -0
- package/dist/registration/hooks/useSendEmailValidation.d.ts +9 -0
- package/dist/registration/hooks/useSendEmailValidation.d.ts.map +1 -0
- package/dist/registration/hooks/useSubscriptions.d.ts +15 -0
- package/dist/registration/hooks/useSubscriptions.d.ts.map +1 -0
- package/dist/registration/index.d.ts +2 -0
- package/dist/registration/index.d.ts.map +1 -0
- package/dist/shopify/fetchers/add-cart-lines.d.ts +12 -0
- package/dist/shopify/fetchers/add-cart-lines.d.ts.map +1 -0
- package/dist/shopify/fetchers/create-cart.d.ts +13 -0
- package/dist/shopify/fetchers/create-cart.d.ts.map +1 -0
- package/dist/shopify/fetchers/get-cart.d.ts +16 -0
- package/dist/shopify/fetchers/get-cart.d.ts.map +1 -0
- package/dist/shopify/fetchers/get-products-by-handles.d.ts +15 -0
- package/dist/shopify/fetchers/get-products-by-handles.d.ts.map +1 -0
- package/dist/shopify/fetchers/index.d.ts +12 -0
- package/dist/shopify/fetchers/index.d.ts.map +1 -0
- package/dist/shopify/fetchers/remove-cart-lines.d.ts +12 -0
- package/dist/shopify/fetchers/remove-cart-lines.d.ts.map +1 -0
- package/dist/shopify/fetchers/update-cart-attributes.d.ts +12 -0
- package/dist/shopify/fetchers/update-cart-attributes.d.ts.map +1 -0
- package/dist/shopify/fetchers/update-cart-buyer-identity.d.ts +12 -0
- package/dist/shopify/fetchers/update-cart-buyer-identity.d.ts.map +1 -0
- package/dist/shopify/fetchers/update-cart-codes.d.ts +12 -0
- package/dist/shopify/fetchers/update-cart-codes.d.ts.map +1 -0
- package/dist/shopify/fetchers/update-cart-lines.d.ts +12 -0
- package/dist/shopify/fetchers/update-cart-lines.d.ts.map +1 -0
- package/dist/shopify/fragments/article.d.ts +3 -0
- package/dist/shopify/fragments/article.d.ts.map +1 -0
- package/dist/shopify/fragments/blog.d.ts +2 -0
- package/dist/shopify/fragments/blog.d.ts.map +1 -0
- package/dist/shopify/fragments/cart.d.ts +2 -0
- package/dist/shopify/fragments/cart.d.ts.map +1 -0
- package/dist/shopify/fragments/collection.d.ts +2 -0
- package/dist/shopify/fragments/collection.d.ts.map +1 -0
- package/dist/shopify/fragments/image.d.ts +2 -0
- package/dist/shopify/fragments/image.d.ts.map +1 -0
- package/dist/shopify/fragments/index.d.ts +12 -0
- package/dist/shopify/fragments/index.d.ts.map +1 -0
- package/dist/shopify/fragments/metafields.d.ts +3 -0
- package/dist/shopify/fragments/metafields.d.ts.map +1 -0
- package/dist/shopify/fragments/page-info.d.ts +2 -0
- package/dist/shopify/fragments/page-info.d.ts.map +1 -0
- package/dist/shopify/fragments/page.d.ts +2 -0
- package/dist/shopify/fragments/page.d.ts.map +1 -0
- package/dist/shopify/fragments/product.d.ts +2 -0
- package/dist/shopify/fragments/product.d.ts.map +1 -0
- package/dist/shopify/fragments/seo.d.ts +2 -0
- package/dist/shopify/fragments/seo.d.ts.map +1 -0
- package/dist/shopify/fragments/variant.d.ts +2 -0
- package/dist/shopify/fragments/variant.d.ts.map +1 -0
- package/dist/shopify/gql/fragment-masking.d.ts +16 -0
- package/dist/shopify/gql/fragment-masking.d.ts.map +1 -0
- package/dist/shopify/gql/gql.d.ts +88 -0
- package/dist/shopify/gql/gql.d.ts.map +1 -0
- package/dist/shopify/gql/graphql.d.ts +7670 -0
- package/dist/shopify/gql/graphql.d.ts.map +1 -0
- package/dist/shopify/gql/index.d.ts +4 -0
- package/dist/shopify/gql/index.d.ts.map +1 -0
- package/dist/shopify/hooks/index.d.ts +2 -0
- package/dist/shopify/hooks/index.d.ts.map +1 -0
- package/dist/shopify/hooks/useProductsByHandles.d.ts +5 -0
- package/dist/shopify/hooks/useProductsByHandles.d.ts.map +1 -0
- package/dist/shopify/index.d.ts +6 -0
- package/dist/shopify/index.d.ts.map +1 -0
- package/dist/shopify/mutations/add-cart-lines.d.ts +2 -0
- package/dist/shopify/mutations/add-cart-lines.d.ts.map +1 -0
- package/dist/shopify/mutations/create-cart.d.ts +2 -0
- package/dist/shopify/mutations/create-cart.d.ts.map +1 -0
- package/dist/shopify/mutations/remove-cart-items.d.ts +2 -0
- package/dist/shopify/mutations/remove-cart-items.d.ts.map +1 -0
- package/dist/shopify/mutations/update-cart-attributes.d.ts +2 -0
- package/dist/shopify/mutations/update-cart-attributes.d.ts.map +1 -0
- package/dist/shopify/mutations/update-cart-buyer-identity.d.ts +2 -0
- package/dist/shopify/mutations/update-cart-buyer-identity.d.ts.map +1 -0
- package/dist/shopify/mutations/update-cart-discount-code.d.ts +2 -0
- package/dist/shopify/mutations/update-cart-discount-code.d.ts.map +1 -0
- package/dist/shopify/mutations/update-cart-items.d.ts +2 -0
- package/dist/shopify/mutations/update-cart-items.d.ts.map +1 -0
- package/dist/shopify/queries/get-cart.d.ts +2 -0
- package/dist/shopify/queries/get-cart.d.ts.map +1 -0
- package/dist/shopify/queries/get-product-by-handles.d.ts +2 -0
- package/dist/shopify/queries/get-product-by-handles.d.ts.map +1 -0
- package/dist/shopify/queries/index.d.ts +2 -0
- package/dist/shopify/queries/index.d.ts.map +1 -0
- package/dist/shopify/types/article.d.ts +49 -0
- package/dist/shopify/types/article.d.ts.map +1 -0
- package/dist/shopify/types/cart.d.ts +175 -0
- package/dist/shopify/types/cart.d.ts.map +1 -0
- package/dist/shopify/types/checkout.d.ts +43 -0
- package/dist/shopify/types/checkout.d.ts.map +1 -0
- package/dist/shopify/types/collection.d.ts +123 -0
- package/dist/shopify/types/collection.d.ts.map +1 -0
- package/dist/shopify/types/common.d.ts +43 -0
- package/dist/shopify/types/common.d.ts.map +1 -0
- package/dist/shopify/types/config.d.ts +13 -0
- package/dist/shopify/types/config.d.ts.map +1 -0
- package/dist/shopify/types/customer.d.ts +31 -0
- package/dist/shopify/types/customer.d.ts.map +1 -0
- package/dist/shopify/types/fetcher.d.ts +44 -0
- package/dist/shopify/types/fetcher.d.ts.map +1 -0
- package/dist/shopify/types/index.d.ts +12 -0
- package/dist/shopify/types/index.d.ts.map +1 -0
- package/dist/shopify/types/page.d.ts +34 -0
- package/dist/shopify/types/page.d.ts.map +1 -0
- package/dist/shopify/types/product.d.ts +175 -0
- package/dist/shopify/types/product.d.ts.map +1 -0
- package/dist/shopify/types/search.d.ts +55 -0
- package/dist/shopify/types/search.d.ts.map +1 -0
- package/dist/shopify/types/site.d.ts +34 -0
- package/dist/shopify/types/site.d.ts.map +1 -0
- package/dist/shopify/types/type-helper.d.ts +6 -0
- package/dist/shopify/types/type-helper.d.ts.map +1 -0
- package/dist/shopify/utils/colors.d.ts +4 -0
- package/dist/shopify/utils/colors.d.ts.map +1 -0
- package/dist/shopify/utils/const.d.ts +77 -0
- package/dist/shopify/utils/const.d.ts.map +1 -0
- package/dist/shopify/utils/cookie.d.ts +16 -0
- package/dist/shopify/utils/cookie.d.ts.map +1 -0
- package/dist/shopify/utils/errors.d.ts +39 -0
- package/dist/shopify/utils/errors.d.ts.map +1 -0
- package/dist/shopify/utils/fetch-graphql-api.d.ts +20 -0
- package/dist/shopify/utils/fetch-graphql-api.d.ts.map +1 -0
- package/dist/shopify/utils/handle-fetch-response.d.ts +6 -0
- package/dist/shopify/utils/handle-fetch-response.d.ts.map +1 -0
- package/dist/shopify/utils/helper.d.ts +29 -0
- package/dist/shopify/utils/helper.d.ts.map +1 -0
- package/dist/shopify/utils/normalize/cart.d.ts +8 -0
- package/dist/shopify/utils/normalize/cart.d.ts.map +1 -0
- package/dist/shopify/utils/normalize/customer.d.ts +4 -0
- package/dist/shopify/utils/normalize/customer.d.ts.map +1 -0
- package/dist/shopify/utils/normalize/index.d.ts +3 -0
- package/dist/shopify/utils/normalize/index.d.ts.map +1 -0
- package/dist/shopify/utils/normalize/metafield.d.ts +6 -0
- package/dist/shopify/utils/normalize/metafield.d.ts.map +1 -0
- package/dist/shopify/utils/normalize/product.d.ts +17 -0
- package/dist/shopify/utils/normalize/product.d.ts.map +1 -0
- package/dist/shopify/utils/store.d.ts +3 -0
- package/dist/shopify/utils/store.d.ts.map +1 -0
- package/dist/shopify/utils/type-helper.d.ts +6 -0
- package/dist/shopify/utils/type-helper.d.ts.map +1 -0
- package/dist/utils/classnames.d.ts +3 -0
- package/dist/utils/classnames.d.ts.map +1 -0
- package/dist/utils/fetcher/fetchResponse.d.ts +14 -0
- package/dist/utils/fetcher/fetchResponse.d.ts.map +1 -0
- package/dist/utils/fetcher/fetcher.d.ts +2 -0
- package/dist/utils/fetcher/fetcher.d.ts.map +1 -0
- package/dist/utils/fetcher/index.d.ts +3 -0
- package/dist/utils/fetcher/index.d.ts.map +1 -0
- package/dist/utils/index.d.ts +5 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/track.d.ts +16 -0
- package/dist/utils/track.d.ts.map +1 -0
- package/dist/utils/useCountDown.d.ts +6 -0
- package/dist/utils/useCountDown.d.ts.map +1 -0
- package/package.json +6 -7
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { RuleCondition } from './autoFreeGift';
|
|
2
|
+
export declare enum DiscountType {
|
|
3
|
+
PERCENTAGE = 1,// 百分比折扣
|
|
4
|
+
FIXED_AMOUNT = 2,// 固定金额折扣
|
|
5
|
+
REDUCE_PRICE = 3
|
|
6
|
+
}
|
|
7
|
+
export declare enum BasePriceType {
|
|
8
|
+
ORIGIN_PRICE = 1,// 原价
|
|
9
|
+
MIN_DISCOUNTED_PRICE = 2
|
|
10
|
+
}
|
|
11
|
+
export type TieredDiscount = {
|
|
12
|
+
amount: number;
|
|
13
|
+
discount: number;
|
|
14
|
+
discount_type: DiscountType;
|
|
15
|
+
};
|
|
16
|
+
export type OrderDiscountConfig = {
|
|
17
|
+
rule_id: number;
|
|
18
|
+
rule_type: number;
|
|
19
|
+
rule_conditions?: RuleCondition[];
|
|
20
|
+
result_detail: {
|
|
21
|
+
main_product: {
|
|
22
|
+
variant_list: Array<{
|
|
23
|
+
variant_id: string;
|
|
24
|
+
sku: string;
|
|
25
|
+
handle: string;
|
|
26
|
+
}>;
|
|
27
|
+
all_store_variant: boolean;
|
|
28
|
+
};
|
|
29
|
+
order_discount_conf: {
|
|
30
|
+
base_price: BasePriceType;
|
|
31
|
+
tiered_discounts: TieredDiscount[];
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=orderDiscount.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orderDiscount.d.ts","sourceRoot":"","sources":["../../../src/cart/types/orderDiscount.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAE9C,oBAAY,YAAY;IACtB,UAAU,IAAI,CAAE,QAAQ;IACxB,YAAY,IAAI,CAAE,SAAS;IAC3B,YAAY,IAAI;CACjB;AAED,oBAAY,aAAa;IACvB,YAAY,IAAI,CAAE,KAAK;IACvB,oBAAoB,IAAI;CACzB;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,aAAa,EAAE,YAAY,CAAA;CAC5B,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,eAAe,CAAC,EAAE,aAAa,EAAE,CAAA;IACjC,aAAa,EAAE;QACb,YAAY,EAAE;YACZ,YAAY,EAAE,KAAK,CAAC;gBAClB,UAAU,EAAE,MAAM,CAAA;gBAClB,GAAG,EAAE,MAAM,CAAA;gBACX,MAAM,EAAE,MAAM,CAAA;aACf,CAAC,CAAA;YACF,iBAAiB,EAAE,OAAO,CAAA;SAC3B,CAAA;QACD,mBAAmB,EAAE;YACnB,UAAU,EAAE,aAAa,CAAA;YACzB,gBAAgB,EAAE,cAAc,EAAE,CAAA;SACnC,CAAA;KACF,CAAA;CACF,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare enum DiscountType {
|
|
2
|
+
PERCENTAGE = 1,// 百分比折扣
|
|
3
|
+
FIXED_AMOUNT = 2
|
|
4
|
+
}
|
|
5
|
+
export declare enum BasePriceType {
|
|
6
|
+
MIN_DISCOUNTED_PRICE = 1,// 最低折扣价
|
|
7
|
+
MIN_TOTAL_PRICE = 2
|
|
8
|
+
}
|
|
9
|
+
export type PriceDiscountConfig = {
|
|
10
|
+
rule_id: number;
|
|
11
|
+
rule_type: number;
|
|
12
|
+
discount_type: DiscountType;
|
|
13
|
+
discount_value: number;
|
|
14
|
+
base_price_type: BasePriceType;
|
|
15
|
+
applicable_products: Array<{
|
|
16
|
+
product_id: string;
|
|
17
|
+
variant_id?: string;
|
|
18
|
+
}>;
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=priceDiscount.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"priceDiscount.d.ts","sourceRoot":"","sources":["../../../src/cart/types/priceDiscount.ts"],"names":[],"mappings":"AAAA,oBAAY,YAAY;IACtB,UAAU,IAAI,CAAE,QAAQ;IACxB,YAAY,IAAI;CACjB;AAED,oBAAY,aAAa;IACvB,oBAAoB,IAAI,CAAE,QAAQ;IAClC,eAAe,IAAI;CACpB;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,aAAa,EAAE,YAAY,CAAA;IAC3B,cAAc,EAAE,MAAM,CAAA;IACtB,eAAe,EAAE,aAAa,CAAA;IAC9B,mBAAmB,EAAE,KAAK,CAAC;QACzB,UAAU,EAAE,MAAM,CAAA;QAClB,UAAU,CAAC,EAAE,MAAM,CAAA;KACpB,CAAC,CAAA;CACH,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { AutoFreeGiftMainProduct, RuleCondition, FormattedGift } from '../types/autoFreeGift';
|
|
2
|
+
import { UseScriptAutoFreeGiftResult } from '../hooks/feature/useScriptAutoFreeGift';
|
|
3
|
+
import { Product } from '../../shopify/types';
|
|
4
|
+
export declare const getMatchedMainProductSubTotal: (cartData: any, variant_list: AutoFreeGiftMainProduct["variant_id_list"], main_product: AutoFreeGiftMainProduct) => any;
|
|
5
|
+
export declare const getDiscountEnvAttributeValue: (attributes?: {
|
|
6
|
+
key: string;
|
|
7
|
+
value: string;
|
|
8
|
+
}[]) => any;
|
|
9
|
+
export declare const safeParseJson: (str: string) => any;
|
|
10
|
+
export declare function preCheck(rule_conditions: RuleCondition[], userTags: string[], currentDealsTypes: string[]): boolean;
|
|
11
|
+
export declare const formatScriptAutoFreeGift: ({ scriptAutoFreeGiftResult, gradient_gifts, locale, }: {
|
|
12
|
+
scriptAutoFreeGiftResult: UseScriptAutoFreeGiftResult;
|
|
13
|
+
gradient_gifts: any;
|
|
14
|
+
locale: string;
|
|
15
|
+
}) => any[];
|
|
16
|
+
export declare const formatFunctionAutoFreeGift: ({ qualifyingGift, giftProductsResult, locale, }: {
|
|
17
|
+
locale: string;
|
|
18
|
+
qualifyingGift?: FormattedGift | null;
|
|
19
|
+
giftProductsResult?: Product[] | [];
|
|
20
|
+
}) => any[];
|
|
21
|
+
//# sourceMappingURL=autoFreeGift.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autoFreeGift.d.ts","sourceRoot":"","sources":["../../../src/cart/utils/autoFreeGift.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAkB,aAAa,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAG7G,OAAO,EAAE,2BAA2B,EAAE,MAAM,wCAAwC,CAAA;AAGpF,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAG7C,eAAO,MAAM,6BAA6B,GACxC,UAAU,GAAG,EACb,cAAc,uBAAuB,CAAC,iBAAiB,CAAC,EACxD,cAAc,uBAAuB,QAsBtC,CAAA;AAED,eAAO,MAAM,4BAA4B,GAEvC,aAAY;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EAAO,QAMlD,CAAA;AAED,eAAO,MAAM,aAAa,GAAI,KAAK,MAAM,QAMxC,CAAA;AAgCD,wBAAgB,QAAQ,CAAC,eAAe,EAAE,aAAa,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,iBAAiB,EAAE,MAAM,EAAE,GAAG,OAAO,CAoBnH;AAQD,eAAO,MAAM,wBAAwB,GAAI,uDAItC;IACD,wBAAwB,EAAE,2BAA2B,CAAA;IACrD,cAAc,EAAE,GAAG,CAAA;IACnB,MAAM,EAAE,MAAM,CAAA;CACf,UAgGA,CAAA;AAQD,eAAO,MAAM,0BAA0B,GAAI,iDAIxC;IACD,MAAM,EAAE,MAAM,CAAA;IACd,cAAc,CAAC,EAAE,aAAa,GAAG,IAAI,CAAA;IACrC,kBAAkB,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAA;CACpC,UAgEA,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cart/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAE1C,eAAO,MAAM,iBAAiB,GAAI,eAAe,UAAU,EAAE,eAAe,UAAU,YAmBrF,CAAA;AAED,eAAO,MAAM,QAAQ,QAAO,MAAM,CAAC,MAAM,EAAE,MAAM,CAWhD,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { HeadlessConfig } from './config';
|
|
3
|
+
interface HeadlessProviderProps {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
headlessConfig: HeadlessConfig;
|
|
6
|
+
}
|
|
7
|
+
export declare const HeadlessProvider: ({ children, headlessConfig }: HeadlessProviderProps) => JSX.Element;
|
|
8
|
+
export declare const useHeadlessContext: () => HeadlessConfig;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=HeadlessProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeadlessProvider.d.ts","sourceRoot":"","sources":["../../src/context/HeadlessProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsC,SAAS,EAAE,MAAM,OAAO,CAAA;AAErE,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAIzC,UAAU,qBAAqB;IAC7B,QAAQ,EAAE,SAAS,CAAA;IACnB,cAAc,EAAE,cAAc,CAAA;CAC/B;AAED,eAAO,MAAM,gBAAgB,GAAI,8BAA8B,qBAAqB,KAAG,GAAG,CAAC,OAU1F,CAAA;AAED,eAAO,MAAM,kBAAkB,QAAO,cAMrC,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type HeadlessConfig = {
|
|
2
|
+
storefrontToken: string;
|
|
3
|
+
storeDomain: string;
|
|
4
|
+
locale: string;
|
|
5
|
+
comboMetafieldsNamespace: string;
|
|
6
|
+
cartIdCookieName: string;
|
|
7
|
+
brand: string;
|
|
8
|
+
appName: string;
|
|
9
|
+
passportUrl: string;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/context/config.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG;IAC3B,eAAe,EAAE,MAAM,CAAA;IACvB,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,MAAM,CAAA;IACd,wBAAwB,EAAE,MAAM,CAAA;IAChC,gBAAgB,EAAE,MAAM,CAAA;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,MAAM,CAAA;CACpB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/context/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,UAAU,CAAA"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AAEzB,cAAc,WAAW,CAAA;AAEzB,cAAc,QAAQ,CAAA;AAEtB,cAAc,SAAS,CAAA;AAEvB,cAAc,gBAAgB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/registration/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAA;AACxC,cAAc,sBAAsB,CAAA;AACpC,cAAc,oBAAoB,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SWRMutationConfiguration } from 'swr/mutation';
|
|
2
|
+
export declare const useEmailValidation: (config?: SWRMutationConfiguration<any, {
|
|
3
|
+
type: "responseError";
|
|
4
|
+
data: any;
|
|
5
|
+
response: any;
|
|
6
|
+
}, string, {
|
|
7
|
+
token: string;
|
|
8
|
+
code: string;
|
|
9
|
+
}>) => import("swr/mutation").SWRMutationResponse<any, {
|
|
10
|
+
type: "responseError";
|
|
11
|
+
data: any;
|
|
12
|
+
response: any;
|
|
13
|
+
}, string, {
|
|
14
|
+
token: string;
|
|
15
|
+
code: string;
|
|
16
|
+
}>;
|
|
17
|
+
//# sourceMappingURL=useEmailValidation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useEmailValidation.d.ts","sourceRoot":"","sources":["../../../src/registration/hooks/useEmailValidation.ts"],"names":[],"mappings":"AAAA,OAAuB,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAA;AAIvE,eAAO,MAAM,kBAAkB,GAC7B,SAAS,wBAAwB,CAC/B,GAAG,EACH;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,IAAI,EAAE,GAAG,CAAC;IAAC,QAAQ,EAAE,GAAG,CAAA;CAAE,EACnD,MAAM,EACN;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAChC;UAHS,eAAe;UAAQ,GAAG;cAAY,GAAG;;WAExC,MAAM;UAAQ,MAAM;EAkBhC,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type SWRMutationResponse } from 'swr/mutation';
|
|
2
|
+
export type RequestData = {
|
|
3
|
+
email: string;
|
|
4
|
+
data: any;
|
|
5
|
+
};
|
|
6
|
+
export declare function useSendEmailValidation(): SWRMutationResponse<any, any, string, {
|
|
7
|
+
email: string;
|
|
8
|
+
} & any>;
|
|
9
|
+
//# sourceMappingURL=useSendEmailValidation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSendEmailValidation.d.ts","sourceRoot":"","sources":["../../../src/registration/hooks/useSendEmailValidation.ts"],"names":[],"mappings":"AAAA,OAAuB,EAAE,KAAK,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAKvE,MAAM,MAAM,WAAW,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,GAAG,CAAA;CAAE,CAAA;AAEtD,wBAAgB,sBAAsB,IAAI,mBAAmB,CAAC,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,GAAG,CAAC,CAavG"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SWRResponse } from 'swr';
|
|
2
|
+
export interface Subscription {
|
|
3
|
+
preference: {
|
|
4
|
+
subscribe: boolean;
|
|
5
|
+
brand: string;
|
|
6
|
+
}[];
|
|
7
|
+
}
|
|
8
|
+
export type SubscriptionApiResponse = {
|
|
9
|
+
data: Subscription;
|
|
10
|
+
};
|
|
11
|
+
export type FetchSubscriptionResponse = SWRResponse<Subscription>;
|
|
12
|
+
export declare function useSubscriptions({ email }: {
|
|
13
|
+
email?: string;
|
|
14
|
+
}): FetchSubscriptionResponse;
|
|
15
|
+
//# sourceMappingURL=useSubscriptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSubscriptions.d.ts","sourceRoot":"","sources":["../../../src/registration/hooks/useSubscriptions.ts"],"names":[],"mappings":"AAAA,OAAe,EAAE,WAAW,EAAE,MAAM,KAAK,CAAA;AAKzC,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE;QACV,SAAS,EAAE,OAAO,CAAA;QAClB,KAAK,EAAE,MAAM,CAAA;KACd,EAAE,CAAA;CACJ;AAED,MAAM,MAAM,uBAAuB,GAAG;IAAE,IAAI,EAAE,YAAY,CAAA;CAAE,CAAA;AAC5D,MAAM,MAAM,yBAAyB,GAAG,WAAW,CAAC,YAAY,CAAC,CAAA;AAEjE,wBAAgB,gBAAgB,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,yBAAyB,CAoBzF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/registration/index.ts"],"names":[],"mappings":"AACA,cAAc,SAAS,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MutationCartLinesAddArgs } from '../gql';
|
|
2
|
+
import type { Cart } from '../types/cart';
|
|
3
|
+
import { ShopifyFetcher } from '../types/fetcher';
|
|
4
|
+
/**
|
|
5
|
+
* Adds cart lines to the Shopify cart.
|
|
6
|
+
*
|
|
7
|
+
* @param options - The options for adding cart lines.
|
|
8
|
+
* @param config - The store configuration.
|
|
9
|
+
* @returns The updated cart or undefined if the cart could not be updated.
|
|
10
|
+
*/
|
|
11
|
+
export declare const addCartLines: ShopifyFetcher<Cart | undefined, MutationCartLinesAddArgs>;
|
|
12
|
+
//# sourceMappingURL=add-cart-lines.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-cart-lines.d.ts","sourceRoot":"","sources":["../../../src/shopify/fetchers/add-cart-lines.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,wBAAwB,EAAE,MAAM,QAAQ,CAAA;AAEtE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAKjD;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,EAAE,cAAc,CAAC,IAAI,GAAG,SAAS,EAAE,wBAAwB,CAqCnF,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CartInput } from '../gql';
|
|
2
|
+
import type { Cart } from '../types/cart';
|
|
3
|
+
import { ShopifyFetcher } from '../types/fetcher';
|
|
4
|
+
import { GetCartMetafieldQueryRoot } from './get-cart';
|
|
5
|
+
/**
|
|
6
|
+
* Creates a cart using the Shopify API.
|
|
7
|
+
*
|
|
8
|
+
* @param options - The options for the cart.
|
|
9
|
+
* @param config - The store configuration.
|
|
10
|
+
* @returns The created cart or undefined if the cart creation fails.
|
|
11
|
+
*/
|
|
12
|
+
export declare const createCart: ShopifyFetcher<Cart | undefined, CartInput, GetCartMetafieldQueryRoot>;
|
|
13
|
+
//# sourceMappingURL=create-cart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-cart.d.ts","sourceRoot":"","sources":["../../../src/shopify/fetchers/create-cart.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,SAAS,EAAE,MAAM,QAAQ,CAAA;AAErD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAGjD,OAAO,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAA;AAGtD;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,EAAE,cAAc,CAAC,IAAI,GAAG,SAAS,EAAE,SAAS,EAAE,yBAAyB,CA0B7F,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { GetCartQueryVariables } from '../gql';
|
|
2
|
+
import type { Cart as ExportCart } from '../types/cart';
|
|
3
|
+
import { HasMetafieldQueryRoot, metafieldIdentifiersGroup, ShopifyFetcher } from '../types/fetcher';
|
|
4
|
+
export type GetCartMetafieldQueryRoot = HasMetafieldQueryRoot.Product | HasMetafieldQueryRoot.Variant;
|
|
5
|
+
export type GetCartReq = {
|
|
6
|
+
cartId: string;
|
|
7
|
+
} & metafieldIdentifiersGroup<GetCartMetafieldQueryRoot>;
|
|
8
|
+
/**
|
|
9
|
+
* Fetches the cart from Shopify.
|
|
10
|
+
*
|
|
11
|
+
* @param options - The options for fetching the cart.
|
|
12
|
+
* @param config - The store configuration.
|
|
13
|
+
* @returns The fetched cart or undefined if not found.
|
|
14
|
+
*/
|
|
15
|
+
export declare const getCart: ShopifyFetcher<ExportCart | undefined, GetCartQueryVariables, GetCartMetafieldQueryRoot>;
|
|
16
|
+
//# sourceMappingURL=get-cart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-cart.d.ts","sourceRoot":"","sources":["../../../src/shopify/fetchers/get-cart.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,qBAAqB,EAAE,MAAM,QAAQ,CAAA;AACpD,OAAO,KAAK,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,eAAe,CAAA;AACvD,OAAO,EACL,qBAAqB,EACrB,yBAAyB,EACzB,cAAc,EAEf,MAAM,kBAAkB,CAAA;AAMzB,MAAM,MAAM,yBAAyB,GAAG,qBAAqB,CAAC,OAAO,GAAG,qBAAqB,CAAC,OAAO,CAAA;AAErG,MAAM,MAAM,UAAU,GAAG;IACvB,MAAM,EAAE,MAAM,CAAA;CACf,GAAG,yBAAyB,CAAC,yBAAyB,CAAC,CAAA;AAExD;;;;;;GAMG;AACH,eAAO,MAAM,OAAO,EAAE,cAAc,CAAC,UAAU,GAAG,SAAS,EAAE,qBAAqB,EAAE,yBAAyB,CAqB1G,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { HasMetafieldQueryRoot, ShopifyFetcher } from '../types/fetcher';
|
|
2
|
+
import { Product } from '../types/product';
|
|
3
|
+
export type GetProductsMetafieldQueryRoot = HasMetafieldQueryRoot.Product | HasMetafieldQueryRoot.Variant;
|
|
4
|
+
export type GetProductsByHandlesReq = {
|
|
5
|
+
handles: string[];
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Gets products by their handles.
|
|
9
|
+
*
|
|
10
|
+
* @param options - The options for getting products.
|
|
11
|
+
* @param config - The store configuration.
|
|
12
|
+
* @returns An array of products.
|
|
13
|
+
*/
|
|
14
|
+
export declare const getProductsByHandles: ShopifyFetcher<Product[], GetProductsByHandlesReq, GetProductsMetafieldQueryRoot>;
|
|
15
|
+
//# sourceMappingURL=get-products-by-handles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-products-by-handles.d.ts","sourceRoot":"","sources":["../../../src/shopify/fetchers/get-products-by-handles.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAA2B,MAAM,kBAAkB,CAAA;AACjG,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAE1C,MAAM,MAAM,6BAA6B,GAAG,qBAAqB,CAAC,OAAO,GAAG,qBAAqB,CAAC,OAAO,CAAA;AAEzG,MAAM,MAAM,uBAAuB,GAAG;IACpC,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,EAAE,cAAc,CAC/C,OAAO,EAAE,EACT,uBAAuB,EACvB,6BAA6B,CAuB9B,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { getProductsByHandles } from './get-products-by-handles';
|
|
2
|
+
export { addCartLines } from './add-cart-lines';
|
|
3
|
+
export { createCart } from './create-cart';
|
|
4
|
+
export { removeCartLines } from './remove-cart-lines';
|
|
5
|
+
export { updateCartAttributes } from './update-cart-attributes';
|
|
6
|
+
export { updateCartBuyerIdentity } from './update-cart-buyer-identity';
|
|
7
|
+
export { updateCartLines } from './update-cart-lines';
|
|
8
|
+
export { updateCartCodes } from './update-cart-codes';
|
|
9
|
+
export { getCart } from './get-cart';
|
|
10
|
+
export type { GetProductsByHandlesReq, GetProductsMetafieldQueryRoot } from './get-products-by-handles';
|
|
11
|
+
export type { GetCartReq, GetCartMetafieldQueryRoot } from './get-cart';
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shopify/fetchers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAC/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAA;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAEpC,YAAY,EAAE,uBAAuB,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAA;AACvG,YAAY,EAAE,UAAU,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MutationCartLinesRemoveArgs } from '../gql';
|
|
2
|
+
import type { Cart as ExportCart } from '../types/cart';
|
|
3
|
+
import { ShopifyFetcher } from '../types/fetcher';
|
|
4
|
+
/**
|
|
5
|
+
* Removes cart lines from the Shopify API.
|
|
6
|
+
*
|
|
7
|
+
* @param options - The options for removing cart lines.
|
|
8
|
+
* @param config - The store configuration.
|
|
9
|
+
* @returns The normalized cart after removing the cart lines, or undefined if the operation fails.
|
|
10
|
+
*/
|
|
11
|
+
export declare const removeCartLines: ShopifyFetcher<ExportCart | undefined, MutationCartLinesRemoveArgs>;
|
|
12
|
+
//# sourceMappingURL=remove-cart-lines.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remove-cart-lines.d.ts","sourceRoot":"","sources":["../../../src/shopify/fetchers/remove-cart-lines.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,2BAA2B,EAAE,MAAM,QAAQ,CAAA;AAE1D,OAAO,KAAK,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,eAAe,CAAA;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAIjD;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,EAAE,cAAc,CAAC,UAAU,GAAG,SAAS,EAAE,2BAA2B,CAgB/F,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MutationCartAttributesUpdateArgs } from '../gql';
|
|
2
|
+
import type { Cart as ExportCart } from '../types/cart';
|
|
3
|
+
import { ShopifyFetcher } from '../types/fetcher';
|
|
4
|
+
/**
|
|
5
|
+
* Updates the attributes of a cart.
|
|
6
|
+
*
|
|
7
|
+
* @param options - The options for updating the cart attributes.
|
|
8
|
+
* @param config - The store configuration.
|
|
9
|
+
* @returns The updated cart or undefined if the update was unsuccessful.
|
|
10
|
+
*/
|
|
11
|
+
export declare const updateCartAttributes: ShopifyFetcher<ExportCart | undefined, MutationCartAttributesUpdateArgs>;
|
|
12
|
+
//# sourceMappingURL=update-cart-attributes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-cart-attributes.d.ts","sourceRoot":"","sources":["../../../src/shopify/fetchers/update-cart-attributes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,gCAAgC,EAAE,MAAM,QAAQ,CAAA;AAC/D,OAAO,KAAK,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,eAAe,CAAA;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAKjD;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,EAAE,cAAc,CAAC,UAAU,GAAG,SAAS,EAAE,gCAAgC,CAcvG,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MutationCartBuyerIdentityUpdateArgs } from '../gql';
|
|
2
|
+
import type { Cart as ExportCart } from '../types/cart';
|
|
3
|
+
import { ShopifyFetcher } from '../types/fetcher';
|
|
4
|
+
/**
|
|
5
|
+
* Updates the buyer identity of a cart.
|
|
6
|
+
*
|
|
7
|
+
* @param options - The options for updating the cart buyer identity.
|
|
8
|
+
* @param config - The store configuration.
|
|
9
|
+
* @returns The updated cart or undefined if the update was unsuccessful.
|
|
10
|
+
*/
|
|
11
|
+
export declare const updateCartBuyerIdentity: ShopifyFetcher<ExportCart | undefined, MutationCartBuyerIdentityUpdateArgs>;
|
|
12
|
+
//# sourceMappingURL=update-cart-buyer-identity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-cart-buyer-identity.d.ts","sourceRoot":"","sources":["../../../src/shopify/fetchers/update-cart-buyer-identity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,mCAAmC,EAAE,MAAM,QAAQ,CAAA;AAClE,OAAO,KAAK,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,eAAe,CAAA;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAKjD;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,EAAE,cAAc,CAAC,UAAU,GAAG,SAAS,EAAE,mCAAmC,CAiB7G,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MutationCartDiscountCodesUpdateArgs } from '../gql';
|
|
2
|
+
import type { Cart as ExportCart } from '../types/cart';
|
|
3
|
+
import { ShopifyFetcher } from '../types/fetcher';
|
|
4
|
+
/**
|
|
5
|
+
* Updates the discount codes for a cart in the Shopify API.
|
|
6
|
+
*
|
|
7
|
+
* @param options - The options for updating the cart discount codes.
|
|
8
|
+
* @param config - The store configuration.
|
|
9
|
+
* @returns The updated cart or undefined if the update was unsuccessful.
|
|
10
|
+
*/
|
|
11
|
+
export declare const updateCartCodes: ShopifyFetcher<ExportCart | undefined, MutationCartDiscountCodesUpdateArgs>;
|
|
12
|
+
//# sourceMappingURL=update-cart-codes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-cart-codes.d.ts","sourceRoot":"","sources":["../../../src/shopify/fetchers/update-cart-codes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,mCAAmC,EAAE,MAAM,QAAQ,CAAA;AAClE,OAAO,KAAK,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,eAAe,CAAA;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAKjD;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,EAAE,cAAc,CAAC,UAAU,GAAG,SAAS,EAAE,mCAAmC,CAiBrG,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MutationCartLinesUpdateArgs } from '../gql';
|
|
2
|
+
import type { Cart as ExportCart } from '../types/cart';
|
|
3
|
+
import { ShopifyFetcher } from '../types/fetcher';
|
|
4
|
+
/**
|
|
5
|
+
* Updates the cart lines in the Shopify API.
|
|
6
|
+
*
|
|
7
|
+
* @param options - The options for updating the cart lines.
|
|
8
|
+
* @param config - The store configuration.
|
|
9
|
+
* @returns The updated cart or undefined if the update was unsuccessful.
|
|
10
|
+
*/
|
|
11
|
+
export declare const updateCartLines: ShopifyFetcher<ExportCart | undefined, MutationCartLinesUpdateArgs>;
|
|
12
|
+
//# sourceMappingURL=update-cart-lines.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-cart-lines.d.ts","sourceRoot":"","sources":["../../../src/shopify/fetchers/update-cart-lines.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,2BAA2B,EAAE,MAAM,QAAQ,CAAA;AAC1D,OAAO,KAAK,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,eAAe,CAAA;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAKjD;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,EAAE,cAAc,CAAC,UAAU,GAAG,SAAS,EAAE,2BAA2B,CA2B/F,CAAA"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const articleFragment = "\n fragment article on Article {\n id\n handle\n title\n seo {\n ...seo\n }\n image {\n ...image\n }\n tags\n publishedAt\n content\n contentHtml\n excerpt\n excerptHtml\n authorV2 {\n bio\n email\n firstName\n lastName\n name\n }\n }\n";
|
|
2
|
+
export declare const articleWithoutContentFragment = "\n fragment article on Article {\n id\n handle\n title\n seo {\n ...seo\n }\n image {\n ...image\n }\n tags\n publishedAt\n excerpt\n excerptHtml\n authorV2 {\n bio\n email\n firstName\n lastName\n name\n }\n }\n";
|
|
3
|
+
//# sourceMappingURL=article.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"article.d.ts","sourceRoot":"","sources":["../../../src/shopify/fragments/article.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,mUAyB3B,CAAA;AAED,eAAO,MAAM,6BAA6B,qSAuBzC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blog.d.ts","sourceRoot":"","sources":["../../../src/shopify/fragments/blog.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,sGASxB,CAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const cartFragment = "\n fragment cart on Cart {\n id\n totalQuantity\n updatedAt\n createdAt\n checkoutUrl\n note\n attributes {\n key\n value\n }\n cost {\n checkoutChargeAmount {\n amount\n currencyCode\n }\n subtotalAmount {\n amount\n currencyCode\n }\n totalAmount {\n amount\n currencyCode\n }\n totalTaxAmount {\n amount\n currencyCode\n }\n totalDutyAmount {\n amount\n currencyCode\n }\n totalAmountEstimated\n totalTaxAmountEstimated\n totalDutyAmountEstimated\n subtotalAmountEstimated\n }\n buyerIdentity {\n email\n customer {\n email\n id\n }\n deliveryAddressPreferences {\n ... on MailingAddress {\n address1\n address2\n city\n country\n zip\n }\n }\n }\n discountCodes {\n applicable\n code\n }\n discountAllocations {\n ... on CartCodeDiscountAllocation {\n code\n discountedAmount {\n amount\n currencyCode\n }\n }\n ... on CartAutomaticDiscountAllocation {\n title\n discountedAmount {\n amount\n currencyCode\n }\n }\n ... on CartCustomDiscountAllocation {\n title\n discountedAmount {\n amount\n currencyCode\n }\n }\n }\n deliveryGroups(first: 10) {\n nodes {\n deliveryAddress {\n address1\n address2\n city\n country\n zip\n }\n }\n }\n lines(first: 100) {\n edges {\n node {\n id\n quantity\n discountAllocations {\n ... on CartCodeDiscountAllocation {\n code\n discountedAmount {\n amount\n currencyCode\n }\n }\n ... on CartAutomaticDiscountAllocation {\n title\n discountedAmount {\n amount\n currencyCode\n }\n }\n ... on CartCustomDiscountAllocation {\n title\n discountedAmount {\n amount\n currencyCode\n }\n }\n }\n attributes {\n key\n value\n }\n cost {\n amountPerQuantity {\n amount\n currencyCode\n }\n compareAtAmountPerQuantity {\n amount\n currencyCode\n }\n subtotalAmount {\n amount\n currencyCode\n }\n totalAmount {\n amount\n currencyCode\n }\n }\n merchandise {\n ... on ProductVariant {\n id\n sku\n title\n quantityAvailable\n currentlyNotInStock\n availableForSale\n barcode\n weight\n selectedOptions {\n name\n value\n }\n image {\n ...image\n }\n price {\n amount\n currencyCode\n }\n compareAtPrice {\n amount\n currencyCode\n }\n metafields(identifiers: $variantMetafieldIdentifiers) {\n ...metafield\n }\n product {\n ...product\n metafields(identifiers: $productMetafieldIdentifiers) {\n ...metafield\n }\n }\n }\n }\n }\n }\n }\n totalQuantity\n }\n \n fragment product on Product {\n id\n handle\n availableForSale\n title\n description\n descriptionHtml\n options {\n id\n name\n values\n }\n productType\n priceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n compareAtPriceRange {\n minVariantPrice {\n amount\n currencyCode\n }\n }\n featuredImage {\n ...image\n }\n images(first: 250) {\n nodes {\n ...image\n }\n }\n media(first: 250) {\n nodes {\n id\n mediaContentType\n presentation {\n id\n }\n ... on Video {\n id\n sources {\n format\n height\n mimeType\n url\n width\n }\n }\n ... on MediaImage {\n id\n image {\n altText\n url\n }\n }\n }\n }\n seo {\n ...seo\n }\n tags\n updatedAt\n }\n\n \n fragment seo on SEO {\n description\n title\n }\n\n \n fragment image on Image {\n url\n altText\n width\n height\n }\n\n \n fragment metafield on Metafield {\n value\n type\n description\n namespace\n key\n }\n\n";
|
|
2
|
+
//# sourceMappingURL=cart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cart.d.ts","sourceRoot":"","sources":["../../../src/shopify/fragments/cart.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,YAAY,ipKA2LxB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collection.d.ts","sourceRoot":"","sources":["../../../src/shopify/fragments/collection.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,4LAc9B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../src/shopify/fragments/image.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,sFAOzB,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from './article';
|
|
2
|
+
export * from './blog';
|
|
3
|
+
export * from './collection';
|
|
4
|
+
export * from './cart';
|
|
5
|
+
export * from './image';
|
|
6
|
+
export * from './metafields';
|
|
7
|
+
export * from './page-info';
|
|
8
|
+
export * from './product';
|
|
9
|
+
export * from './seo';
|
|
10
|
+
export * from './variant';
|
|
11
|
+
export * from './page';
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shopify/fragments/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,QAAQ,CAAA;AACtB,cAAc,cAAc,CAAA;AAC5B,cAAc,QAAQ,CAAA;AACtB,cAAc,SAAS,CAAA;AACvB,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,cAAc,OAAO,CAAA;AACrB,cAAc,WAAW,CAAA;AACzB,cAAc,QAAQ,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metafields.d.ts","sourceRoot":"","sources":["../../../src/shopify/fragments/metafields.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,+GAQ7B,CAAA;AAED,eAAO,MAAM,oBAAoB,2DAMhC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-info.d.ts","sourceRoot":"","sources":["../../../src/shopify/fragments/page-info.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,qHAO5B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../src/shopify/fragments/page.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,2IAWxB,CAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const productFragment = "\n fragment product on Product {\n id\n handle\n availableForSale\n title\n description\n descriptionHtml\n options {\n id\n name\n values\n }\n productType\n priceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n compareAtPriceRange {\n minVariantPrice {\n amount\n currencyCode\n }\n }\n featuredImage {\n ...image\n }\n images(first: 250) {\n nodes {\n ...image\n }\n }\n media(first: 250) {\n nodes {\n id\n mediaContentType\n presentation {\n id\n }\n ... on Video {\n id\n sources {\n format\n height\n mimeType\n url\n width\n }\n }\n ... on MediaImage {\n id\n image {\n altText\n url\n }\n }\n }\n }\n seo {\n ...seo\n }\n tags\n updatedAt\n }\n";
|
|
2
|
+
//# sourceMappingURL=product.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"product.d.ts","sourceRoot":"","sources":["../../../src/shopify/fragments/product.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,slCAsE3B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"seo.d.ts","sourceRoot":"","sources":["../../../src/shopify/fragments/seo.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,iEAKvB,CAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const variantFragment = "\n fragment variant on ProductVariant {\n id\n sku\n title\n requiresShipping\n quantityAvailable\n currentlyNotInStock\n availableForSale\n barcode\n quantityAvailable\n weight\n selectedOptions {\n name\n value\n }\n image {\n ...image\n }\n price {\n amount\n currencyCode\n }\n compareAtPrice {\n amount\n currencyCode\n }\n }\n";
|
|
2
|
+
//# sourceMappingURL=variant.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"variant.d.ts","sourceRoot":"","sources":["../../../src/shopify/fragments/variant.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,4aA4B3B,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ResultOf, DocumentTypeDecoration, TypedDocumentNode } from '@graphql-typed-document-node/core';
|
|
2
|
+
import { Incremental } from './graphql';
|
|
3
|
+
export type FragmentType<TDocumentType extends DocumentTypeDecoration<any, any>> = TDocumentType extends DocumentTypeDecoration<infer TType, any> ? [TType] extends [{
|
|
4
|
+
' $fragmentName'?: infer TKey;
|
|
5
|
+
}] ? TKey extends string ? {
|
|
6
|
+
' $fragmentRefs'?: {
|
|
7
|
+
[key in TKey]: TType;
|
|
8
|
+
};
|
|
9
|
+
} : never : never : never;
|
|
10
|
+
export declare function useFragment<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: FragmentType<DocumentTypeDecoration<TType, any>>): TType;
|
|
11
|
+
export declare function useFragment<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: FragmentType<DocumentTypeDecoration<TType, any>> | null | undefined): TType | null | undefined;
|
|
12
|
+
export declare function useFragment<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>>): ReadonlyArray<TType>;
|
|
13
|
+
export declare function useFragment<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>> | null | undefined): ReadonlyArray<TType> | null | undefined;
|
|
14
|
+
export declare function makeFragmentData<F extends DocumentTypeDecoration<any, any>, FT extends ResultOf<F>>(data: FT, _fragment: F): FragmentType<F>;
|
|
15
|
+
export declare function isFragmentReady<TQuery, TFrag>(queryNode: DocumentTypeDecoration<TQuery, any>, fragmentNode: TypedDocumentNode<TFrag>, data: FragmentType<TypedDocumentNode<Incremental<TFrag>, any>> | null | undefined): data is FragmentType<typeof fragmentNode>;
|
|
16
|
+
//# sourceMappingURL=fragment-masking.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fragment-masking.d.ts","sourceRoot":"","sources":["../../../src/shopify/gql/fragment-masking.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,sBAAsB,EACtB,iBAAiB,EAClB,MAAM,mCAAmC,CAAA;AAE1C,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAEvC,MAAM,MAAM,YAAY,CACtB,aAAa,SAAS,sBAAsB,CAAC,GAAG,EAAE,GAAG,CAAC,IACpD,aAAa,SAAS,sBAAsB,CAAC,MAAM,KAAK,EAAE,GAAG,CAAC,GAC9D,CAAC,KAAK,CAAC,SAAS,CAAC;IAAE,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAA;CAAE,CAAC,GACjD,IAAI,SAAS,MAAM,GACjB;IAAE,gBAAgB,CAAC,EAAE;SAAG,GAAG,IAAI,IAAI,GAAG,KAAK;KAAE,CAAA;CAAE,GAC/C,KAAK,GACP,KAAK,GACP,KAAK,CAAA;AAGT,wBAAgB,WAAW,CAAC,KAAK,EAC/B,aAAa,EAAE,sBAAsB,CAAC,KAAK,EAAE,GAAG,CAAC,EACjD,YAAY,EAAE,YAAY,CAAC,sBAAsB,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,GAC7D,KAAK,CAAA;AAER,wBAAgB,WAAW,CAAC,KAAK,EAC/B,aAAa,EAAE,sBAAsB,CAAC,KAAK,EAAE,GAAG,CAAC,EACjD,YAAY,EACR,YAAY,CAAC,sBAAsB,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,GAChD,IAAI,GACJ,SAAS,GACZ,KAAK,GAAG,IAAI,GAAG,SAAS,CAAA;AAE3B,wBAAgB,WAAW,CAAC,KAAK,EAC/B,aAAa,EAAE,sBAAsB,CAAC,KAAK,EAAE,GAAG,CAAC,EACjD,YAAY,EAAE,aAAa,CAAC,YAAY,CAAC,sBAAsB,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,GAC5E,aAAa,CAAC,KAAK,CAAC,CAAA;AAEvB,wBAAgB,WAAW,CAAC,KAAK,EAC/B,aAAa,EAAE,sBAAsB,CAAC,KAAK,EAAE,GAAG,CAAC,EACjD,YAAY,EACR,aAAa,CAAC,YAAY,CAAC,sBAAsB,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,GAC/D,IAAI,GACJ,SAAS,GACZ,aAAa,CAAC,KAAK,CAAC,GAAG,IAAI,GAAG,SAAS,CAAA;AAY1C,wBAAgB,gBAAgB,CAC9B,CAAC,SAAS,sBAAsB,CAAC,GAAG,EAAE,GAAG,CAAC,EAC1C,EAAE,SAAS,QAAQ,CAAC,CAAC,CAAC,EACtB,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC,CAEzC;AACD,wBAAgB,eAAe,CAAC,MAAM,EAAE,KAAK,EAC3C,SAAS,EAAE,sBAAsB,CAAC,MAAM,EAAE,GAAG,CAAC,EAC9C,YAAY,EAAE,iBAAiB,CAAC,KAAK,CAAC,EACtC,IAAI,EACA,YAAY,CAAC,iBAAiB,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE,GAAG,CAAC,CAAC,GACxD,IAAI,GACJ,SAAS,GACZ,IAAI,IAAI,YAAY,CAAC,OAAO,YAAY,CAAC,CAgB3C"}
|