@doswiftly/storefront-sdk 19.1.0 → 20.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +119 -0
- package/dist/core/auth/session-events.d.ts +6 -9
- package/dist/core/auth/session-events.d.ts.map +1 -1
- package/dist/core/auth/session-events.js +6 -9
- package/dist/core/cart/cart-client.d.ts +39 -2
- package/dist/core/cart/cart-client.d.ts.map +1 -1
- package/dist/core/cart/cart-client.js +53 -3
- package/dist/core/cart/cart-recovery.d.ts +41 -71
- package/dist/core/cart/cart-recovery.d.ts.map +1 -1
- package/dist/core/cart/cart-recovery.js +37 -95
- package/dist/core/cart/cookie-config.d.ts +29 -3
- package/dist/core/cart/cookie-config.d.ts.map +1 -1
- package/dist/core/cart/cookie-config.js +35 -3
- package/dist/core/generated/operation-types.d.ts +268 -4
- package/dist/core/generated/operation-types.d.ts.map +1 -1
- package/dist/core/generated/operation-types.js +8 -0
- package/dist/core/index.d.ts +3 -2
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +3 -2
- package/dist/core/middleware/cart-secret.d.ts +43 -0
- package/dist/core/middleware/cart-secret.d.ts.map +1 -0
- package/dist/core/middleware/cart-secret.js +55 -0
- package/dist/core/middleware/session-retry.d.ts +2 -2
- package/dist/core/middleware/session-retry.js +2 -2
- package/dist/core/operations/cart.d.ts +23 -0
- package/dist/core/operations/cart.d.ts.map +1 -1
- package/dist/core/operations/cart.js +71 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/react/cookies.d.ts +6 -0
- package/dist/react/cookies.d.ts.map +1 -1
- package/dist/react/cookies.js +23 -4
- package/dist/react/hooks/use-cart-manager.d.ts +20 -13
- package/dist/react/hooks/use-cart-manager.d.ts.map +1 -1
- package/dist/react/hooks/use-cart-manager.js +14 -12
- package/dist/react/hooks/use-logout.d.ts +7 -5
- package/dist/react/hooks/use-logout.d.ts.map +1 -1
- package/dist/react/hooks/use-logout.js +37 -7
- package/dist/react/providers/cart-manager-provider.d.ts +3 -0
- package/dist/react/providers/cart-manager-provider.d.ts.map +1 -1
- package/dist/react/providers/storefront-client-provider.d.ts.map +1 -1
- package/dist/react/providers/storefront-client-provider.js +6 -0
- package/dist/react/server/cookie-readers.d.ts +20 -0
- package/dist/react/server/cookie-readers.d.ts.map +1 -1
- package/dist/react/server/cookie-readers.js +22 -1
- package/dist/react/server/index.d.ts +2 -1
- package/dist/react/server/index.d.ts.map +1 -1
- package/dist/react/server/index.js +4 -1
- package/dist/react/stores/cart.context.d.ts +5 -0
- package/dist/react/stores/cart.context.d.ts.map +1 -1
- package/dist/react/stores/cart.context.js +5 -0
- package/dist/react/stores/cart.store.d.ts +6 -0
- package/dist/react/stores/cart.store.d.ts.map +1 -1
- package/dist/react/stores/cart.store.js +6 -0
- package/package.json +1 -1
|
@@ -254,6 +254,8 @@ export type AvailableShippingMethod = {
|
|
|
254
254
|
isFree: Scalars['Boolean']['output'];
|
|
255
255
|
/** Display name of the method (e.g. "DPD Standard"). */
|
|
256
256
|
name: Scalars['String']['output'];
|
|
257
|
+
/** Pickup-point selection config — present only for pickup methods (deliveryType LOCKER / PICKUP_POINT) whose carrier exposes a public pickup mechanism. Null for HOME delivery and when the merchant has not configured the carrier's public widget token. Carries only browser-safe data (e.g. the InPost Geowidget public token), never the carrier API secret. */
|
|
258
|
+
pickupConfig?: Maybe<ShippingPickupConfig>;
|
|
257
259
|
/** Cost of the method for the current cart (in the buyer preferred currency). */
|
|
258
260
|
price: Money;
|
|
259
261
|
/** Merchant-configured display position — lower values come first in the picker. */
|
|
@@ -647,8 +649,6 @@ export type CartBuyerIdentity = {
|
|
|
647
649
|
export type CartBuyerIdentityInput = {
|
|
648
650
|
/** Buyer country (ISO 3166-1 alpha-2). Hint for currency, tax and shipping eligibility before an address is set. */
|
|
649
651
|
countryCode?: InputMaybe<CountryCode>;
|
|
650
|
-
/** ID of a signed-in customer that owns this cart. Pass to bind a guest cart to a customer record. */
|
|
651
|
-
customerId?: InputMaybe<Scalars['ID']['input']>;
|
|
652
652
|
/** Buyer email address. Persisted to the order at checkout completion. */
|
|
653
653
|
email?: InputMaybe<Scalars['String']['input']>;
|
|
654
654
|
/** Buyer preferred language (ISO 639-1). Used for the order confirmation email and localised content. */
|
|
@@ -727,6 +727,8 @@ export type CartCreateInput = {
|
|
|
727
727
|
export type CartCreatePayload = {
|
|
728
728
|
/** The created cart on success; null when `userErrors` is non-empty. */
|
|
729
729
|
cart?: Maybe<Cart>;
|
|
730
|
+
/** One-time cart access secret, returned only here on creation. The SDK persists it for you; if you call the API directly, store it immediately — it cannot be retrieved again. */
|
|
731
|
+
secret?: Maybe<Scalars['String']['output']>;
|
|
730
732
|
/** Business / validation errors. Each entry carries a stable `code` (e.g. `CART_NOT_FOUND`, `NOT_ENOUGH_IN_STOCK`, `INVALID_MERCHANDISE_LINE`) — branch on `code`, never on `message`. */
|
|
731
733
|
userErrors: Array<UserError>;
|
|
732
734
|
/** Non-fatal advisories (informational only; the mutation itself succeeded). */
|
|
@@ -752,6 +754,14 @@ export type CartDiscountCodesUpdatePayload = {
|
|
|
752
754
|
/** Non-fatal advisories — the mutation itself succeeded. */
|
|
753
755
|
warnings: Array<CartWarning>;
|
|
754
756
|
};
|
|
757
|
+
export type CartDowngradeOnLogoutPayload = {
|
|
758
|
+
/** The downgraded cart on success — same id and secret (no rotation), with the customer association, contact details, addresses and payment selection cleared but line items kept. Null when `userErrors` is non-empty. */
|
|
759
|
+
cart?: Maybe<Cart>;
|
|
760
|
+
/** Business / validation errors carrying a stable `CartErrorCode` in `code` (e.g. `CART_NOT_FOUND`). */
|
|
761
|
+
userErrors: Array<UserError>;
|
|
762
|
+
/** Non-fatal advisories — the mutation itself succeeded. */
|
|
763
|
+
warnings: Array<CartWarning>;
|
|
764
|
+
};
|
|
755
765
|
export type CartLine = {
|
|
756
766
|
/** Typed configurator selections filled in by the buyer (snapshot from add-to-cart). Validated server-side against the product attribute definition; carries any pricing surcharge. */
|
|
757
767
|
attributeSelections: Array<AttributeSelection>;
|
|
@@ -832,12 +842,30 @@ export type CartLineUpdateInput = {
|
|
|
832
842
|
/** New quantity. Use 0 to remove the line from the cart. */
|
|
833
843
|
quantity: Scalars['Int']['input'];
|
|
834
844
|
};
|
|
845
|
+
export type CartMergePayload = {
|
|
846
|
+
/** The merged cart on success — it keeps the same id and secret as the guest cart passed in, so the stored cart-id cookie stays valid. Null when `userErrors` is non-empty. */
|
|
847
|
+
cart?: Maybe<Cart>;
|
|
848
|
+
/** Business / validation errors carrying a stable `CartErrorCode` in `code` — e.g. `CART_NOT_FOUND`, `CART_CURRENCY_MISMATCH`, `CART_MERGE_REQUIRES_AUTH`. */
|
|
849
|
+
userErrors: Array<UserError>;
|
|
850
|
+
/** Non-fatal advisories — the mutation itself succeeded. */
|
|
851
|
+
warnings: Array<CartWarning>;
|
|
852
|
+
};
|
|
835
853
|
export type CartRecommendations = {
|
|
836
854
|
/** Products frequently bought together with cart items */
|
|
837
855
|
frequentlyBoughtTogether: Array<ProductRecommendation>;
|
|
838
856
|
/** Products to consider adding */
|
|
839
857
|
youMayAlsoLike: Array<ProductRecommendation>;
|
|
840
858
|
};
|
|
859
|
+
export type CartRecoveryRedeemPayload = {
|
|
860
|
+
/** The recovered cart on success. Null when `userErrors` is non-empty (invalid / expired link). */
|
|
861
|
+
cart?: Maybe<Cart>;
|
|
862
|
+
/** The NEW cart access secret, returned only here on a successful redemption (the link rotates the secret). Persist it immediately — it cannot be retrieved again; the previous secret no longer works. */
|
|
863
|
+
secret?: Maybe<Scalars['String']['output']>;
|
|
864
|
+
/** Business / validation errors carrying a stable `CartErrorCode` in `code` — `CART_RECOVERY_LINK_EXPIRED` / `CART_RECOVERY_LINK_INVALID` (bad or expired link), `CART_NOT_FOUND` (the cart is gone or already completed — create a fresh one) or `CART_RECOVERY_REDEEM_FAILED` (unexpected failure). No cart content is exposed on failure. */
|
|
865
|
+
userErrors: Array<UserError>;
|
|
866
|
+
/** Non-fatal advisories — the mutation itself succeeded. */
|
|
867
|
+
warnings: Array<CartWarning>;
|
|
868
|
+
};
|
|
841
869
|
export type CartRemoveGiftCardInput = {
|
|
842
870
|
/** ID of the cart to update. */
|
|
843
871
|
cartId: Scalars['ID']['input'];
|
|
@@ -997,6 +1025,7 @@ export type CartWarning = {
|
|
|
997
1025
|
target: Scalars['String']['output'];
|
|
998
1026
|
};
|
|
999
1027
|
export declare const CartWarningCode: {
|
|
1028
|
+
readonly DiscountCodeNotApplicable: "DISCOUNT_CODE_NOT_APPLICABLE";
|
|
1000
1029
|
readonly MerchandiseNotAvailable: "MERCHANDISE_NOT_AVAILABLE";
|
|
1001
1030
|
readonly MerchandiseNotEnoughStock: "MERCHANDISE_NOT_ENOUGH_STOCK";
|
|
1002
1031
|
readonly PaymentsAmountRegionMismatch: "PAYMENTS_AMOUNT_REGION_MISMATCH";
|
|
@@ -1587,6 +1616,7 @@ export declare const DiscountErrorCode: {
|
|
|
1587
1616
|
readonly Inactive: "INACTIVE";
|
|
1588
1617
|
readonly MinimumOrderNotMet: "MINIMUM_ORDER_NOT_MET";
|
|
1589
1618
|
readonly MinimumQuantityNotMet: "MINIMUM_QUANTITY_NOT_MET";
|
|
1619
|
+
readonly NotApplicableToCart: "NOT_APPLICABLE_TO_CART";
|
|
1590
1620
|
readonly NotFound: "NOT_FOUND";
|
|
1591
1621
|
readonly NotStarted: "NOT_STARTED";
|
|
1592
1622
|
readonly ShopNotFound: "SHOP_NOT_FOUND";
|
|
@@ -2253,6 +2283,12 @@ export type Mutation = {
|
|
|
2253
2283
|
cartCreate: CartCreatePayload;
|
|
2254
2284
|
/** Replace (not merge) the list of discount codes on the cart. Pass an empty array to clear all codes. Rate-limited to 10 requests per minute per IP+shop. */
|
|
2255
2285
|
cartDiscountCodesUpdate: CartDiscountCodesUpdatePayload;
|
|
2286
|
+
/** Downgrade a cart to guest on logout — clears the customer association, contact details, addresses and payment selection, but keeps the line items, discount codes, selected shipping method, currency and notes. The cart id and secret are unchanged (no rotation), so the stored cart-id stays valid and the buyer keeps their items as a guest. Call from the logout flow (with the cart secret) before tearing down the auth session; the next person on a shared device then sees none of the previous buyer's data. */
|
|
2287
|
+
cartDowngradeOnLogout: CartDowngradeOnLogoutPayload;
|
|
2288
|
+
/** Merge a guest cart into the signed-in customer's existing cart on login. Call right after authenticating, passing the guest cart id (its secret travels in the cart credential header). Line quantities are summed per variant and the buyer's in-session checkout fields win. The returned cart keeps the SAME id and secret as the guest cart, so the stored cart-id stays valid. Requires authentication (`CART_MERGE_REQUIRES_AUTH` otherwise); refuses carts in different currencies (`CART_CURRENCY_MISMATCH`). */
|
|
2289
|
+
cartMerge: CartMergePayload;
|
|
2290
|
+
/** Redeem a signed cart recovery link (from an abandoned-cart email). Pass the token from the link; on success the cart is recovered and its access secret is ROTATED — the NEW secret is returned once in `secret` (persist it; the previous one no longer works), and the SDK sets the cart-id cookie to the recovered cart. Buyer self-service: the merchant sends the link, never takes over the cart. Returns `CART_RECOVERY_LINK_EXPIRED` / `CART_RECOVERY_LINK_INVALID` for a bad link (no cart content is exposed) and `CART_NOT_FOUND` when the cart no longer exists. */
|
|
2291
|
+
cartRecoveryRedeem: CartRecoveryRedeemPayload;
|
|
2256
2292
|
/** Remove a previously applied gift card from the cart by its `CartAppliedGiftCard.id`. The storefront never has to handle the full gift card code on the client. */
|
|
2257
2293
|
cartRemoveGiftCard: CartRemoveGiftCardPayload;
|
|
2258
2294
|
/** Remove one or more lines from the cart by `CartLine.id`. Equivalent to `cartUpdateLines` with `quantity: 0` but lets the storefront express the intent explicitly. */
|
|
@@ -2343,6 +2379,8 @@ export type Order = Node & {
|
|
|
2343
2379
|
cancelledAt?: Maybe<Scalars['DateTime']['output']>;
|
|
2344
2380
|
/** When the order was confirmed (e.g. payment authorised / approved). Null until confirmation. */
|
|
2345
2381
|
confirmedAt?: Maybe<Scalars['DateTime']['output']>;
|
|
2382
|
+
/** Per-code discount allocations on the order (parity with `Cart.discountAllocations`). One entry per code that reduced the price; empty when no discount applied. The sum of `amount` equals the order-level discount. */
|
|
2383
|
+
discountAllocations: Array<OrderDiscountAllocation>;
|
|
2346
2384
|
/** When the order expired (e.g. pending payment timed out). Null when not expired. */
|
|
2347
2385
|
expiredAt?: Maybe<Scalars['DateTime']['output']>;
|
|
2348
2386
|
/** Fulfillment progress (UNFULFILLED, PARTIALLY_FULFILLED, FULFILLED, IN_TRANSIT, DELIVERED, PARTIALLY_RETURNED, RETURNED, LOST). */
|
|
@@ -2380,6 +2418,12 @@ export type OrderConnection = {
|
|
|
2380
2418
|
/** Total orders count */
|
|
2381
2419
|
totalCount: Scalars['Int']['output'];
|
|
2382
2420
|
};
|
|
2421
|
+
export type OrderDiscountAllocation = {
|
|
2422
|
+
/** Amount discounted by this code on the order, in the order currency. */
|
|
2423
|
+
amount: Money;
|
|
2424
|
+
/** The discount code that produced this allocation. */
|
|
2425
|
+
discountCode: Scalars['String']['output'];
|
|
2426
|
+
};
|
|
2383
2427
|
export type OrderEdge = {
|
|
2384
2428
|
/** Cursor */
|
|
2385
2429
|
cursor: Scalars['String']['output'];
|
|
@@ -2637,6 +2681,13 @@ export type PickupPointInput = {
|
|
|
2637
2681
|
/** Courier network code (e.g. inpost, orlen, dpd) */
|
|
2638
2682
|
provider: Scalars['String']['input'];
|
|
2639
2683
|
};
|
|
2684
|
+
export declare const PickupSelectionMode: {
|
|
2685
|
+
/** No browser widget — query points server-side (by city / postal code) and render your own list. `widgetToken` / `scriptUrl` are null for this mode. */
|
|
2686
|
+
readonly Search: "SEARCH";
|
|
2687
|
+
/** Render the carrier map widget (e.g. InPost Geowidget) initialised with `pickupConfig.widgetToken` + `pickupConfig.scriptUrl`. The buyer picks a point on the map. */
|
|
2688
|
+
readonly Widget: "WIDGET";
|
|
2689
|
+
};
|
|
2690
|
+
export type PickupSelectionMode = typeof PickupSelectionMode[keyof typeof PickupSelectionMode];
|
|
2640
2691
|
export type PointsEstimate = {
|
|
2641
2692
|
/** Base points to earn */
|
|
2642
2693
|
basePoints: Scalars['Int']['output'];
|
|
@@ -3456,6 +3507,16 @@ export type ShippingCarrier = {
|
|
|
3456
3507
|
/** Carrier service code as configured by the merchant (e.g. "inpost_paczkomat"). Useful when integrating carrier widgets. */
|
|
3457
3508
|
serviceCode?: Maybe<Scalars['String']['output']>;
|
|
3458
3509
|
};
|
|
3510
|
+
export type ShippingPickupConfig = {
|
|
3511
|
+
/** Carrier code this config belongs to (e.g. "inpost"). Matches `carrier.serviceCode`'s provider. */
|
|
3512
|
+
provider: Scalars['String']['output'];
|
|
3513
|
+
/** CDN URL of the carrier widget script to load before rendering the map. Null for SEARCH mode. */
|
|
3514
|
+
scriptUrl?: Maybe<Scalars['String']['output']>;
|
|
3515
|
+
/** How to let the buyer pick a point — WIDGET (carrier map) or SEARCH (server-side point lookup). */
|
|
3516
|
+
selectionMode: PickupSelectionMode;
|
|
3517
|
+
/** PUBLIC widget token used to initialise the carrier map (InPost Geowidget domain-scoped token). Never the carrier API secret. Null for SEARCH mode and when the merchant has not configured the public token (do not render the map — offer SEARCH or hide the method). */
|
|
3518
|
+
widgetToken?: Maybe<Scalars['String']['output']>;
|
|
3519
|
+
};
|
|
3459
3520
|
export type Shop = {
|
|
3460
3521
|
/** Shop physical address */
|
|
3461
3522
|
address?: Maybe<ShopAddress>;
|
|
@@ -3980,6 +4041,7 @@ export type CartAvailableShippingMethodsQuery = {
|
|
|
3980
4041
|
cart?: Maybe<(Pick<Cart, 'id' | 'requiresShipping'> & {
|
|
3981
4042
|
availableShippingMethods: {
|
|
3982
4043
|
methods: Array<(Pick<AvailableShippingMethod, 'id' | 'name' | 'description' | 'deliveryType' | 'isFree' | 'sortOrder'> & {
|
|
4044
|
+
pickupConfig?: Maybe<Pick<ShippingPickupConfig, 'provider' | 'selectionMode' | 'widgetToken' | 'scriptUrl'>>;
|
|
3983
4045
|
carrier?: Maybe<(Pick<ShippingCarrier, 'id' | 'name' | 'serviceCode'> & {
|
|
3984
4046
|
logo?: Maybe<Pick<Image, 'id' | 'url' | 'altText' | 'width' | 'height' | 'thumbhash'>>;
|
|
3985
4047
|
})>;
|
|
@@ -4079,6 +4141,9 @@ export type CartCompleteMutation = {
|
|
|
4079
4141
|
shippingAddress?: Maybe<(Pick<MailingAddress, 'id' | 'firstName' | 'lastName' | 'name' | 'company' | 'streetLine1' | 'streetLine2' | 'city' | 'state' | 'stateCode' | 'country' | 'countryCode' | 'postalCode' | 'phone' | 'isDefault' | 'taxId' | 'vatNumber'> & {
|
|
4080
4142
|
pickupPoint?: Maybe<Pick<PickupPoint, 'provider' | 'pointId' | 'name' | 'address'>>;
|
|
4081
4143
|
})>;
|
|
4144
|
+
discountAllocations: Array<(Pick<OrderDiscountAllocation, 'discountCode'> & {
|
|
4145
|
+
amount: Pick<Money, 'amount' | 'currencyCode'>;
|
|
4146
|
+
})>;
|
|
4082
4147
|
})>;
|
|
4083
4148
|
userErrors: Array<Pick<UserError, 'message' | 'code' | 'field'>>;
|
|
4084
4149
|
warnings: Array<Pick<CartWarning, 'message' | 'code' | 'target'>>;
|
|
@@ -4088,7 +4153,7 @@ export type CartCreateMutationVariables = Exact<{
|
|
|
4088
4153
|
input?: InputMaybe<CartCreateInput>;
|
|
4089
4154
|
}>;
|
|
4090
4155
|
export type CartCreateMutation = {
|
|
4091
|
-
cartCreate: {
|
|
4156
|
+
cartCreate: (Pick<CartCreatePayload, 'secret'> & {
|
|
4092
4157
|
cart?: Maybe<(Pick<Cart, 'id' | 'checkoutUrl' | 'totalQuantity' | 'note' | 'email' | 'phone' | 'selectedPaymentInstrument' | 'requiresShipping' | 'createdAt' | 'updatedAt' | 'status'> & {
|
|
4093
4158
|
cost: {
|
|
4094
4159
|
total: Pick<Money, 'amount' | 'currencyCode'>;
|
|
@@ -4146,7 +4211,7 @@ export type CartCreateMutation = {
|
|
|
4146
4211
|
})>;
|
|
4147
4212
|
userErrors: Array<Pick<UserError, 'message' | 'code' | 'field'>>;
|
|
4148
4213
|
warnings: Array<Pick<CartWarning, 'message' | 'code' | 'target'>>;
|
|
4149
|
-
};
|
|
4214
|
+
});
|
|
4150
4215
|
};
|
|
4151
4216
|
export type CartDiscountCodesUpdateMutationVariables = Exact<{
|
|
4152
4217
|
id: Scalars['ID']['input'];
|
|
@@ -4213,6 +4278,134 @@ export type CartDiscountCodesUpdateMutation = {
|
|
|
4213
4278
|
warnings: Array<Pick<CartWarning, 'message' | 'code' | 'target'>>;
|
|
4214
4279
|
};
|
|
4215
4280
|
};
|
|
4281
|
+
export type CartDowngradeOnLogoutMutationVariables = Exact<{
|
|
4282
|
+
cartId: Scalars['ID']['input'];
|
|
4283
|
+
}>;
|
|
4284
|
+
export type CartDowngradeOnLogoutMutation = {
|
|
4285
|
+
cartDowngradeOnLogout: {
|
|
4286
|
+
cart?: Maybe<(Pick<Cart, 'id' | 'checkoutUrl' | 'totalQuantity' | 'note' | 'email' | 'phone' | 'selectedPaymentInstrument' | 'requiresShipping' | 'createdAt' | 'updatedAt' | 'status'> & {
|
|
4287
|
+
cost: {
|
|
4288
|
+
total: Pick<Money, 'amount' | 'currencyCode'>;
|
|
4289
|
+
subtotal: Pick<Money, 'amount' | 'currencyCode'>;
|
|
4290
|
+
totalTax?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
|
|
4291
|
+
totalDuty?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
|
|
4292
|
+
checkoutCharge?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
|
|
4293
|
+
totalDiscount: Pick<Money, 'amount' | 'currencyCode'>;
|
|
4294
|
+
totalShipping?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
|
|
4295
|
+
};
|
|
4296
|
+
lines: (Pick<CartLineConnection, 'totalCount'> & {
|
|
4297
|
+
nodes: Array<(Pick<CartLine, 'id' | 'quantity' | 'productId' | 'productTitle' | 'productHandle' | 'productType' | 'requiresShipping'> & {
|
|
4298
|
+
variant: (Pick<ProductVariant, 'id' | 'title' | 'sku' | 'isAvailable' | 'availableStock' | 'barcode' | 'sortOrder'> & {
|
|
4299
|
+
price: Pick<Money, 'amount' | 'currencyCode'>;
|
|
4300
|
+
compareAtPrice?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
|
|
4301
|
+
image?: Maybe<Pick<Image, 'id' | 'url' | 'altText' | 'width' | 'height' | 'thumbhash'>>;
|
|
4302
|
+
selectedOptions: Array<Pick<SelectedOption, 'name' | 'value'>>;
|
|
4303
|
+
weight?: Maybe<Pick<Weight, 'value' | 'unit'>>;
|
|
4304
|
+
});
|
|
4305
|
+
cost: {
|
|
4306
|
+
pricePerUnit: Pick<Money, 'amount' | 'currencyCode'>;
|
|
4307
|
+
subtotal: Pick<Money, 'amount' | 'currencyCode'>;
|
|
4308
|
+
total: Pick<Money, 'amount' | 'currencyCode'>;
|
|
4309
|
+
compareAtPricePerUnit?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
|
|
4310
|
+
};
|
|
4311
|
+
attributes: Array<Pick<Attribute, 'key' | 'value'>>;
|
|
4312
|
+
attributeSelections: Array<Pick<AttributeSelection, 'attributeDefinitionId' | 'attributeName' | 'type' | 'fillingMode' | 'billingMode' | 'optionId' | 'optionLabel' | 'optionIds' | 'textValue' | 'surchargeAmount' | 'surchargeType' | 'taxClassId' | 'linkedVariantId'>>;
|
|
4313
|
+
giftCardRecipient?: Maybe<Pick<GiftCardLineRecipient, 'recipientEmail' | 'recipientName' | 'message'>>;
|
|
4314
|
+
})>;
|
|
4315
|
+
pageInfo: Pick<PageInfo, 'hasNextPage' | 'hasPreviousPage' | 'startCursor' | 'endCursor'>;
|
|
4316
|
+
});
|
|
4317
|
+
buyerIdentity?: Maybe<Pick<CartBuyerIdentity, 'email' | 'phone' | 'countryCode'>>;
|
|
4318
|
+
discountCodes: Array<Pick<CartDiscountCode, 'code' | 'isApplicable'>>;
|
|
4319
|
+
discountAllocations: Array<(Pick<CartDiscountAllocation, 'discountCode'> & {
|
|
4320
|
+
amount: Pick<Money, 'amount' | 'currencyCode'>;
|
|
4321
|
+
})>;
|
|
4322
|
+
attributes: Array<Pick<CartAttribute, 'key' | 'value'>>;
|
|
4323
|
+
shippingAddress?: Maybe<(Pick<MailingAddress, 'id' | 'firstName' | 'lastName' | 'name' | 'company' | 'streetLine1' | 'streetLine2' | 'city' | 'state' | 'stateCode' | 'country' | 'countryCode' | 'postalCode' | 'phone' | 'isDefault' | 'taxId' | 'vatNumber'> & {
|
|
4324
|
+
pickupPoint?: Maybe<Pick<PickupPoint, 'provider' | 'pointId' | 'name' | 'address'>>;
|
|
4325
|
+
})>;
|
|
4326
|
+
billingAddress?: Maybe<(Pick<MailingAddress, 'id' | 'firstName' | 'lastName' | 'name' | 'company' | 'streetLine1' | 'streetLine2' | 'city' | 'state' | 'stateCode' | 'country' | 'countryCode' | 'postalCode' | 'phone' | 'isDefault' | 'taxId' | 'vatNumber'> & {
|
|
4327
|
+
pickupPoint?: Maybe<Pick<PickupPoint, 'provider' | 'pointId' | 'name' | 'address'>>;
|
|
4328
|
+
})>;
|
|
4329
|
+
selectedShippingMethod?: Maybe<(Pick<CartShippingMethod, 'handle' | 'title'> & {
|
|
4330
|
+
price: Pick<Money, 'amount' | 'currencyCode'>;
|
|
4331
|
+
})>;
|
|
4332
|
+
selectedPaymentMethod?: Maybe<(Pick<PaymentMethod, 'id' | 'name' | 'provider' | 'type' | 'description' | 'isDefault' | 'supportedCurrencies' | 'position'> & {
|
|
4333
|
+
icon?: Maybe<Pick<Image, 'id' | 'url' | 'altText' | 'width' | 'height' | 'thumbhash'>>;
|
|
4334
|
+
})>;
|
|
4335
|
+
appliedGiftCards: Array<(Pick<CartAppliedGiftCard, 'id' | 'maskedCode' | 'lastCharacters'> & {
|
|
4336
|
+
appliedAmount: Pick<Money, 'amount' | 'currencyCode'>;
|
|
4337
|
+
remainingBalance: Pick<Money, 'amount' | 'currencyCode'>;
|
|
4338
|
+
})>;
|
|
4339
|
+
completedOrder?: Maybe<Pick<Order, 'id' | 'orderNumber' | 'accessToken' | 'status' | 'paymentStatus' | 'fulfillmentStatus'>>;
|
|
4340
|
+
})>;
|
|
4341
|
+
userErrors: Array<Pick<UserError, 'message' | 'code' | 'field'>>;
|
|
4342
|
+
warnings: Array<Pick<CartWarning, 'message' | 'code' | 'target'>>;
|
|
4343
|
+
};
|
|
4344
|
+
};
|
|
4345
|
+
export type CartMergeMutationVariables = Exact<{
|
|
4346
|
+
guestCartId: Scalars['ID']['input'];
|
|
4347
|
+
}>;
|
|
4348
|
+
export type CartMergeMutation = {
|
|
4349
|
+
cartMerge: {
|
|
4350
|
+
cart?: Maybe<(Pick<Cart, 'id' | 'checkoutUrl' | 'totalQuantity' | 'note' | 'email' | 'phone' | 'selectedPaymentInstrument' | 'requiresShipping' | 'createdAt' | 'updatedAt' | 'status'> & {
|
|
4351
|
+
cost: {
|
|
4352
|
+
total: Pick<Money, 'amount' | 'currencyCode'>;
|
|
4353
|
+
subtotal: Pick<Money, 'amount' | 'currencyCode'>;
|
|
4354
|
+
totalTax?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
|
|
4355
|
+
totalDuty?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
|
|
4356
|
+
checkoutCharge?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
|
|
4357
|
+
totalDiscount: Pick<Money, 'amount' | 'currencyCode'>;
|
|
4358
|
+
totalShipping?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
|
|
4359
|
+
};
|
|
4360
|
+
lines: (Pick<CartLineConnection, 'totalCount'> & {
|
|
4361
|
+
nodes: Array<(Pick<CartLine, 'id' | 'quantity' | 'productId' | 'productTitle' | 'productHandle' | 'productType' | 'requiresShipping'> & {
|
|
4362
|
+
variant: (Pick<ProductVariant, 'id' | 'title' | 'sku' | 'isAvailable' | 'availableStock' | 'barcode' | 'sortOrder'> & {
|
|
4363
|
+
price: Pick<Money, 'amount' | 'currencyCode'>;
|
|
4364
|
+
compareAtPrice?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
|
|
4365
|
+
image?: Maybe<Pick<Image, 'id' | 'url' | 'altText' | 'width' | 'height' | 'thumbhash'>>;
|
|
4366
|
+
selectedOptions: Array<Pick<SelectedOption, 'name' | 'value'>>;
|
|
4367
|
+
weight?: Maybe<Pick<Weight, 'value' | 'unit'>>;
|
|
4368
|
+
});
|
|
4369
|
+
cost: {
|
|
4370
|
+
pricePerUnit: Pick<Money, 'amount' | 'currencyCode'>;
|
|
4371
|
+
subtotal: Pick<Money, 'amount' | 'currencyCode'>;
|
|
4372
|
+
total: Pick<Money, 'amount' | 'currencyCode'>;
|
|
4373
|
+
compareAtPricePerUnit?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
|
|
4374
|
+
};
|
|
4375
|
+
attributes: Array<Pick<Attribute, 'key' | 'value'>>;
|
|
4376
|
+
attributeSelections: Array<Pick<AttributeSelection, 'attributeDefinitionId' | 'attributeName' | 'type' | 'fillingMode' | 'billingMode' | 'optionId' | 'optionLabel' | 'optionIds' | 'textValue' | 'surchargeAmount' | 'surchargeType' | 'taxClassId' | 'linkedVariantId'>>;
|
|
4377
|
+
giftCardRecipient?: Maybe<Pick<GiftCardLineRecipient, 'recipientEmail' | 'recipientName' | 'message'>>;
|
|
4378
|
+
})>;
|
|
4379
|
+
pageInfo: Pick<PageInfo, 'hasNextPage' | 'hasPreviousPage' | 'startCursor' | 'endCursor'>;
|
|
4380
|
+
});
|
|
4381
|
+
buyerIdentity?: Maybe<Pick<CartBuyerIdentity, 'email' | 'phone' | 'countryCode'>>;
|
|
4382
|
+
discountCodes: Array<Pick<CartDiscountCode, 'code' | 'isApplicable'>>;
|
|
4383
|
+
discountAllocations: Array<(Pick<CartDiscountAllocation, 'discountCode'> & {
|
|
4384
|
+
amount: Pick<Money, 'amount' | 'currencyCode'>;
|
|
4385
|
+
})>;
|
|
4386
|
+
attributes: Array<Pick<CartAttribute, 'key' | 'value'>>;
|
|
4387
|
+
shippingAddress?: Maybe<(Pick<MailingAddress, 'id' | 'firstName' | 'lastName' | 'name' | 'company' | 'streetLine1' | 'streetLine2' | 'city' | 'state' | 'stateCode' | 'country' | 'countryCode' | 'postalCode' | 'phone' | 'isDefault' | 'taxId' | 'vatNumber'> & {
|
|
4388
|
+
pickupPoint?: Maybe<Pick<PickupPoint, 'provider' | 'pointId' | 'name' | 'address'>>;
|
|
4389
|
+
})>;
|
|
4390
|
+
billingAddress?: Maybe<(Pick<MailingAddress, 'id' | 'firstName' | 'lastName' | 'name' | 'company' | 'streetLine1' | 'streetLine2' | 'city' | 'state' | 'stateCode' | 'country' | 'countryCode' | 'postalCode' | 'phone' | 'isDefault' | 'taxId' | 'vatNumber'> & {
|
|
4391
|
+
pickupPoint?: Maybe<Pick<PickupPoint, 'provider' | 'pointId' | 'name' | 'address'>>;
|
|
4392
|
+
})>;
|
|
4393
|
+
selectedShippingMethod?: Maybe<(Pick<CartShippingMethod, 'handle' | 'title'> & {
|
|
4394
|
+
price: Pick<Money, 'amount' | 'currencyCode'>;
|
|
4395
|
+
})>;
|
|
4396
|
+
selectedPaymentMethod?: Maybe<(Pick<PaymentMethod, 'id' | 'name' | 'provider' | 'type' | 'description' | 'isDefault' | 'supportedCurrencies' | 'position'> & {
|
|
4397
|
+
icon?: Maybe<Pick<Image, 'id' | 'url' | 'altText' | 'width' | 'height' | 'thumbhash'>>;
|
|
4398
|
+
})>;
|
|
4399
|
+
appliedGiftCards: Array<(Pick<CartAppliedGiftCard, 'id' | 'maskedCode' | 'lastCharacters'> & {
|
|
4400
|
+
appliedAmount: Pick<Money, 'amount' | 'currencyCode'>;
|
|
4401
|
+
remainingBalance: Pick<Money, 'amount' | 'currencyCode'>;
|
|
4402
|
+
})>;
|
|
4403
|
+
completedOrder?: Maybe<Pick<Order, 'id' | 'orderNumber' | 'accessToken' | 'status' | 'paymentStatus' | 'fulfillmentStatus'>>;
|
|
4404
|
+
})>;
|
|
4405
|
+
userErrors: Array<Pick<UserError, 'message' | 'code' | 'field'>>;
|
|
4406
|
+
warnings: Array<Pick<CartWarning, 'message' | 'code' | 'target'>>;
|
|
4407
|
+
};
|
|
4408
|
+
};
|
|
4216
4409
|
export type CartQueryVariables = Exact<{
|
|
4217
4410
|
id: Scalars['ID']['input'];
|
|
4218
4411
|
}>;
|
|
@@ -4273,6 +4466,70 @@ export type CartQuery = {
|
|
|
4273
4466
|
completedOrder?: Maybe<Pick<Order, 'id' | 'orderNumber' | 'accessToken' | 'status' | 'paymentStatus' | 'fulfillmentStatus'>>;
|
|
4274
4467
|
})>;
|
|
4275
4468
|
};
|
|
4469
|
+
export type CartRecoveryRedeemMutationVariables = Exact<{
|
|
4470
|
+
token: Scalars['String']['input'];
|
|
4471
|
+
}>;
|
|
4472
|
+
export type CartRecoveryRedeemMutation = {
|
|
4473
|
+
cartRecoveryRedeem: (Pick<CartRecoveryRedeemPayload, 'secret'> & {
|
|
4474
|
+
cart?: Maybe<(Pick<Cart, 'id' | 'checkoutUrl' | 'totalQuantity' | 'note' | 'email' | 'phone' | 'selectedPaymentInstrument' | 'requiresShipping' | 'createdAt' | 'updatedAt' | 'status'> & {
|
|
4475
|
+
cost: {
|
|
4476
|
+
total: Pick<Money, 'amount' | 'currencyCode'>;
|
|
4477
|
+
subtotal: Pick<Money, 'amount' | 'currencyCode'>;
|
|
4478
|
+
totalTax?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
|
|
4479
|
+
totalDuty?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
|
|
4480
|
+
checkoutCharge?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
|
|
4481
|
+
totalDiscount: Pick<Money, 'amount' | 'currencyCode'>;
|
|
4482
|
+
totalShipping?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
|
|
4483
|
+
};
|
|
4484
|
+
lines: (Pick<CartLineConnection, 'totalCount'> & {
|
|
4485
|
+
nodes: Array<(Pick<CartLine, 'id' | 'quantity' | 'productId' | 'productTitle' | 'productHandle' | 'productType' | 'requiresShipping'> & {
|
|
4486
|
+
variant: (Pick<ProductVariant, 'id' | 'title' | 'sku' | 'isAvailable' | 'availableStock' | 'barcode' | 'sortOrder'> & {
|
|
4487
|
+
price: Pick<Money, 'amount' | 'currencyCode'>;
|
|
4488
|
+
compareAtPrice?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
|
|
4489
|
+
image?: Maybe<Pick<Image, 'id' | 'url' | 'altText' | 'width' | 'height' | 'thumbhash'>>;
|
|
4490
|
+
selectedOptions: Array<Pick<SelectedOption, 'name' | 'value'>>;
|
|
4491
|
+
weight?: Maybe<Pick<Weight, 'value' | 'unit'>>;
|
|
4492
|
+
});
|
|
4493
|
+
cost: {
|
|
4494
|
+
pricePerUnit: Pick<Money, 'amount' | 'currencyCode'>;
|
|
4495
|
+
subtotal: Pick<Money, 'amount' | 'currencyCode'>;
|
|
4496
|
+
total: Pick<Money, 'amount' | 'currencyCode'>;
|
|
4497
|
+
compareAtPricePerUnit?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
|
|
4498
|
+
};
|
|
4499
|
+
attributes: Array<Pick<Attribute, 'key' | 'value'>>;
|
|
4500
|
+
attributeSelections: Array<Pick<AttributeSelection, 'attributeDefinitionId' | 'attributeName' | 'type' | 'fillingMode' | 'billingMode' | 'optionId' | 'optionLabel' | 'optionIds' | 'textValue' | 'surchargeAmount' | 'surchargeType' | 'taxClassId' | 'linkedVariantId'>>;
|
|
4501
|
+
giftCardRecipient?: Maybe<Pick<GiftCardLineRecipient, 'recipientEmail' | 'recipientName' | 'message'>>;
|
|
4502
|
+
})>;
|
|
4503
|
+
pageInfo: Pick<PageInfo, 'hasNextPage' | 'hasPreviousPage' | 'startCursor' | 'endCursor'>;
|
|
4504
|
+
});
|
|
4505
|
+
buyerIdentity?: Maybe<Pick<CartBuyerIdentity, 'email' | 'phone' | 'countryCode'>>;
|
|
4506
|
+
discountCodes: Array<Pick<CartDiscountCode, 'code' | 'isApplicable'>>;
|
|
4507
|
+
discountAllocations: Array<(Pick<CartDiscountAllocation, 'discountCode'> & {
|
|
4508
|
+
amount: Pick<Money, 'amount' | 'currencyCode'>;
|
|
4509
|
+
})>;
|
|
4510
|
+
attributes: Array<Pick<CartAttribute, 'key' | 'value'>>;
|
|
4511
|
+
shippingAddress?: Maybe<(Pick<MailingAddress, 'id' | 'firstName' | 'lastName' | 'name' | 'company' | 'streetLine1' | 'streetLine2' | 'city' | 'state' | 'stateCode' | 'country' | 'countryCode' | 'postalCode' | 'phone' | 'isDefault' | 'taxId' | 'vatNumber'> & {
|
|
4512
|
+
pickupPoint?: Maybe<Pick<PickupPoint, 'provider' | 'pointId' | 'name' | 'address'>>;
|
|
4513
|
+
})>;
|
|
4514
|
+
billingAddress?: Maybe<(Pick<MailingAddress, 'id' | 'firstName' | 'lastName' | 'name' | 'company' | 'streetLine1' | 'streetLine2' | 'city' | 'state' | 'stateCode' | 'country' | 'countryCode' | 'postalCode' | 'phone' | 'isDefault' | 'taxId' | 'vatNumber'> & {
|
|
4515
|
+
pickupPoint?: Maybe<Pick<PickupPoint, 'provider' | 'pointId' | 'name' | 'address'>>;
|
|
4516
|
+
})>;
|
|
4517
|
+
selectedShippingMethod?: Maybe<(Pick<CartShippingMethod, 'handle' | 'title'> & {
|
|
4518
|
+
price: Pick<Money, 'amount' | 'currencyCode'>;
|
|
4519
|
+
})>;
|
|
4520
|
+
selectedPaymentMethod?: Maybe<(Pick<PaymentMethod, 'id' | 'name' | 'provider' | 'type' | 'description' | 'isDefault' | 'supportedCurrencies' | 'position'> & {
|
|
4521
|
+
icon?: Maybe<Pick<Image, 'id' | 'url' | 'altText' | 'width' | 'height' | 'thumbhash'>>;
|
|
4522
|
+
})>;
|
|
4523
|
+
appliedGiftCards: Array<(Pick<CartAppliedGiftCard, 'id' | 'maskedCode' | 'lastCharacters'> & {
|
|
4524
|
+
appliedAmount: Pick<Money, 'amount' | 'currencyCode'>;
|
|
4525
|
+
remainingBalance: Pick<Money, 'amount' | 'currencyCode'>;
|
|
4526
|
+
})>;
|
|
4527
|
+
completedOrder?: Maybe<Pick<Order, 'id' | 'orderNumber' | 'accessToken' | 'status' | 'paymentStatus' | 'fulfillmentStatus'>>;
|
|
4528
|
+
})>;
|
|
4529
|
+
userErrors: Array<Pick<UserError, 'message' | 'code' | 'field'>>;
|
|
4530
|
+
warnings: Array<Pick<CartWarning, 'message' | 'code' | 'target'>>;
|
|
4531
|
+
});
|
|
4532
|
+
};
|
|
4276
4533
|
export type CartRemoveGiftCardMutationVariables = Exact<{
|
|
4277
4534
|
input: CartRemoveGiftCardInput;
|
|
4278
4535
|
}>;
|
|
@@ -5009,6 +5266,9 @@ export type OrderByTokenQuery = {
|
|
|
5009
5266
|
shippingAddress?: Maybe<(Pick<MailingAddress, 'id' | 'firstName' | 'lastName' | 'name' | 'company' | 'streetLine1' | 'streetLine2' | 'city' | 'state' | 'stateCode' | 'country' | 'countryCode' | 'postalCode' | 'phone' | 'isDefault' | 'taxId' | 'vatNumber'> & {
|
|
5010
5267
|
pickupPoint?: Maybe<Pick<PickupPoint, 'provider' | 'pointId' | 'name' | 'address'>>;
|
|
5011
5268
|
})>;
|
|
5269
|
+
discountAllocations: Array<(Pick<OrderDiscountAllocation, 'discountCode'> & {
|
|
5270
|
+
amount: Pick<Money, 'amount' | 'currencyCode'>;
|
|
5271
|
+
})>;
|
|
5012
5272
|
})>;
|
|
5013
5273
|
};
|
|
5014
5274
|
export type PaymentCreateMutationVariables = Exact<{
|
|
@@ -5227,6 +5487,7 @@ export type PageInfoFragment = Pick<PageInfo, 'hasNextPage' | 'hasPreviousPage'
|
|
|
5227
5487
|
export type UserErrorFragment = Pick<UserError, 'message' | 'code' | 'field'>;
|
|
5228
5488
|
export type CartWarningFragment = Pick<CartWarning, 'message' | 'code' | 'target'>;
|
|
5229
5489
|
export type AvailableShippingMethodFragment = (Pick<AvailableShippingMethod, 'id' | 'name' | 'description' | 'deliveryType' | 'isFree' | 'sortOrder'> & {
|
|
5490
|
+
pickupConfig?: Maybe<Pick<ShippingPickupConfig, 'provider' | 'selectionMode' | 'widgetToken' | 'scriptUrl'>>;
|
|
5230
5491
|
carrier?: Maybe<(Pick<ShippingCarrier, 'id' | 'name' | 'serviceCode'> & {
|
|
5231
5492
|
logo?: Maybe<Pick<Image, 'id' | 'url' | 'altText' | 'width' | 'height' | 'thumbhash'>>;
|
|
5232
5493
|
})>;
|
|
@@ -5257,6 +5518,9 @@ export type OrderFragment = (Pick<Order, 'id' | 'orderNumber' | 'accessToken' |
|
|
|
5257
5518
|
shippingAddress?: Maybe<(Pick<MailingAddress, 'id' | 'firstName' | 'lastName' | 'name' | 'company' | 'streetLine1' | 'streetLine2' | 'city' | 'state' | 'stateCode' | 'country' | 'countryCode' | 'postalCode' | 'phone' | 'isDefault' | 'taxId' | 'vatNumber'> & {
|
|
5258
5519
|
pickupPoint?: Maybe<Pick<PickupPoint, 'provider' | 'pointId' | 'name' | 'address'>>;
|
|
5259
5520
|
})>;
|
|
5521
|
+
discountAllocations: Array<(Pick<OrderDiscountAllocation, 'discountCode'> & {
|
|
5522
|
+
amount: Pick<Money, 'amount' | 'currencyCode'>;
|
|
5523
|
+
})>;
|
|
5260
5524
|
});
|
|
5261
5525
|
export type PaymentSessionFragment = Pick<PaymentSession, 'id' | 'orderId' | 'flow' | 'provider' | 'redirectUrl' | 'clientSecret' | 'status' | 'expiresAt'>;
|
|
5262
5526
|
export type PaymentWarningFragment = Pick<PaymentWarning, 'message' | 'code' | 'retryHint'>;
|