@doswiftly/storefront-sdk 15.1.0 → 16.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.
@@ -484,6 +484,8 @@ export type Cart = Node & {
484
484
  buyerIdentity?: Maybe<CartBuyerIdentity>;
485
485
  /** Hosted checkout URL the storefront may redirect to as a fallback. The recommended flow is to drive checkout through SDK mutations (`cartSetShippingAddress`, `cartSelectShippingMethod`, `cartSelectPaymentMethod`, `cartComplete`). */
486
486
  checkoutUrl?: Maybe<Scalars['URL']['output']>;
487
+ /** The order that this cart converted into. Populated only when `status` is `CONVERTED` — null on every other status. Use this to render the order confirmation page (subtotals, accessToken for guest tracking) directly off the cart you already loaded, without a second `orderByToken` round-trip. */
488
+ completedOrder?: Maybe<Order>;
487
489
  /** Cost breakdown for the cart (subtotal, tax, shipping, discount, grand total). */
488
490
  cost: CartCost;
489
491
  /** When the cart was created (ISO 8601). */
@@ -512,6 +514,8 @@ export type Cart = Node & {
512
514
  selectedShippingMethod?: Maybe<CartShippingMethod>;
513
515
  /** Shipping address attached to the cart via `cartSetShippingAddress`. Null until set. */
514
516
  shippingAddress?: Maybe<MailingAddress>;
517
+ /** Lifecycle status — `ACTIVE` for the editable working cart, terminal otherwise. Check this on SSR before rendering the checkout form: a non-`ACTIVE` cart should redirect (typically to the order confirmation when `completedOrder` is populated) instead of presenting a form whose first mutation fails with `CartErrorCode.ALREADY_COMPLETED`. */
518
+ status: CartStatus;
515
519
  /** Sum of `quantity` across all lines — the badge number for the cart icon. */
516
520
  totalQuantity: Scalars['Int']['output'];
517
521
  /** When the cart was last modified (ISO 8601). */
@@ -869,6 +873,7 @@ export type CartShippingMethod = {
869
873
  /** Display title for the checkout summary (e.g. "DPD Standard, 2 days"). */
870
874
  title: Scalars['String']['output'];
871
875
  };
876
+ export type CartStatus = 'ABANDONED' | 'ACTIVE' | 'CONVERTED' | 'EXPIRED' | 'RECOVERED';
872
877
  export type CartUpdateAttributesPayload = {
873
878
  /** The updated cart on success. */
874
879
  cart?: Maybe<Cart>;
@@ -3205,13 +3210,15 @@ export type CartAddLinesMutationVariables = Exact<{
3205
3210
  }>;
3206
3211
  export type CartAddLinesMutation = {
3207
3212
  cartAddLines: {
3208
- cart?: Maybe<(Pick<Cart, 'id' | 'checkoutUrl' | 'totalQuantity' | 'note' | 'email' | 'phone' | 'requiresShipping' | 'createdAt' | 'updatedAt'> & {
3213
+ cart?: Maybe<(Pick<Cart, 'id' | 'checkoutUrl' | 'totalQuantity' | 'note' | 'email' | 'phone' | 'requiresShipping' | 'createdAt' | 'updatedAt' | 'status'> & {
3209
3214
  cost: {
3210
3215
  total: Pick<Money, 'amount' | 'currencyCode'>;
3211
3216
  subtotal: Pick<Money, 'amount' | 'currencyCode'>;
3212
3217
  totalTax?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
3213
3218
  totalDuty?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
3214
3219
  checkoutCharge?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
3220
+ totalDiscount: Pick<Money, 'amount' | 'currencyCode'>;
3221
+ totalShipping?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
3215
3222
  };
3216
3223
  lines: (Pick<CartLineConnection, 'totalCount'> & {
3217
3224
  nodes: Array<(Pick<CartLine, 'id' | 'quantity' | 'productId' | 'productTitle' | 'productHandle' | 'productType' | 'requiresShipping'> & {
@@ -3253,6 +3260,7 @@ export type CartAddLinesMutation = {
3253
3260
  appliedAmount: Pick<Money, 'amount' | 'currencyCode'>;
3254
3261
  remainingBalance: Pick<Money, 'amount' | 'currencyCode'>;
3255
3262
  })>;
3263
+ completedOrder?: Maybe<Pick<Order, 'id' | 'orderNumber' | 'accessToken' | 'status' | 'paymentStatus' | 'fulfillmentStatus'>>;
3256
3264
  })>;
3257
3265
  userErrors: Array<Pick<UserError, 'message' | 'code' | 'field'>>;
3258
3266
  warnings: Array<Pick<CartWarning, 'message' | 'code' | 'target'>>;
@@ -3263,13 +3271,15 @@ export type CartApplyGiftCardMutationVariables = Exact<{
3263
3271
  }>;
3264
3272
  export type CartApplyGiftCardMutation = {
3265
3273
  cartApplyGiftCard: {
3266
- cart?: Maybe<(Pick<Cart, 'id' | 'checkoutUrl' | 'totalQuantity' | 'note' | 'email' | 'phone' | 'requiresShipping' | 'createdAt' | 'updatedAt'> & {
3274
+ cart?: Maybe<(Pick<Cart, 'id' | 'checkoutUrl' | 'totalQuantity' | 'note' | 'email' | 'phone' | 'requiresShipping' | 'createdAt' | 'updatedAt' | 'status'> & {
3267
3275
  cost: {
3268
3276
  total: Pick<Money, 'amount' | 'currencyCode'>;
3269
3277
  subtotal: Pick<Money, 'amount' | 'currencyCode'>;
3270
3278
  totalTax?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
3271
3279
  totalDuty?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
3272
3280
  checkoutCharge?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
3281
+ totalDiscount: Pick<Money, 'amount' | 'currencyCode'>;
3282
+ totalShipping?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
3273
3283
  };
3274
3284
  lines: (Pick<CartLineConnection, 'totalCount'> & {
3275
3285
  nodes: Array<(Pick<CartLine, 'id' | 'quantity' | 'productId' | 'productTitle' | 'productHandle' | 'productType' | 'requiresShipping'> & {
@@ -3311,6 +3321,7 @@ export type CartApplyGiftCardMutation = {
3311
3321
  appliedAmount: Pick<Money, 'amount' | 'currencyCode'>;
3312
3322
  remainingBalance: Pick<Money, 'amount' | 'currencyCode'>;
3313
3323
  })>;
3324
+ completedOrder?: Maybe<Pick<Order, 'id' | 'orderNumber' | 'accessToken' | 'status' | 'paymentStatus' | 'fulfillmentStatus'>>;
3314
3325
  })>;
3315
3326
  userErrors: Array<Pick<UserError, 'message' | 'code' | 'field'>>;
3316
3327
  warnings: Array<Pick<CartWarning, 'message' | 'code' | 'target'>>;
@@ -3367,13 +3378,15 @@ export type CartCreateMutationVariables = Exact<{
3367
3378
  }>;
3368
3379
  export type CartCreateMutation = {
3369
3380
  cartCreate: {
3370
- cart?: Maybe<(Pick<Cart, 'id' | 'checkoutUrl' | 'totalQuantity' | 'note' | 'email' | 'phone' | 'requiresShipping' | 'createdAt' | 'updatedAt'> & {
3381
+ cart?: Maybe<(Pick<Cart, 'id' | 'checkoutUrl' | 'totalQuantity' | 'note' | 'email' | 'phone' | 'requiresShipping' | 'createdAt' | 'updatedAt' | 'status'> & {
3371
3382
  cost: {
3372
3383
  total: Pick<Money, 'amount' | 'currencyCode'>;
3373
3384
  subtotal: Pick<Money, 'amount' | 'currencyCode'>;
3374
3385
  totalTax?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
3375
3386
  totalDuty?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
3376
3387
  checkoutCharge?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
3388
+ totalDiscount: Pick<Money, 'amount' | 'currencyCode'>;
3389
+ totalShipping?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
3377
3390
  };
3378
3391
  lines: (Pick<CartLineConnection, 'totalCount'> & {
3379
3392
  nodes: Array<(Pick<CartLine, 'id' | 'quantity' | 'productId' | 'productTitle' | 'productHandle' | 'productType' | 'requiresShipping'> & {
@@ -3415,6 +3428,7 @@ export type CartCreateMutation = {
3415
3428
  appliedAmount: Pick<Money, 'amount' | 'currencyCode'>;
3416
3429
  remainingBalance: Pick<Money, 'amount' | 'currencyCode'>;
3417
3430
  })>;
3431
+ completedOrder?: Maybe<Pick<Order, 'id' | 'orderNumber' | 'accessToken' | 'status' | 'paymentStatus' | 'fulfillmentStatus'>>;
3418
3432
  })>;
3419
3433
  userErrors: Array<Pick<UserError, 'message' | 'code' | 'field'>>;
3420
3434
  warnings: Array<Pick<CartWarning, 'message' | 'code' | 'target'>>;
@@ -3426,13 +3440,15 @@ export type CartDiscountCodesUpdateMutationVariables = Exact<{
3426
3440
  }>;
3427
3441
  export type CartDiscountCodesUpdateMutation = {
3428
3442
  cartDiscountCodesUpdate: {
3429
- cart?: Maybe<(Pick<Cart, 'id' | 'checkoutUrl' | 'totalQuantity' | 'note' | 'email' | 'phone' | 'requiresShipping' | 'createdAt' | 'updatedAt'> & {
3443
+ cart?: Maybe<(Pick<Cart, 'id' | 'checkoutUrl' | 'totalQuantity' | 'note' | 'email' | 'phone' | 'requiresShipping' | 'createdAt' | 'updatedAt' | 'status'> & {
3430
3444
  cost: {
3431
3445
  total: Pick<Money, 'amount' | 'currencyCode'>;
3432
3446
  subtotal: Pick<Money, 'amount' | 'currencyCode'>;
3433
3447
  totalTax?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
3434
3448
  totalDuty?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
3435
3449
  checkoutCharge?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
3450
+ totalDiscount: Pick<Money, 'amount' | 'currencyCode'>;
3451
+ totalShipping?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
3436
3452
  };
3437
3453
  lines: (Pick<CartLineConnection, 'totalCount'> & {
3438
3454
  nodes: Array<(Pick<CartLine, 'id' | 'quantity' | 'productId' | 'productTitle' | 'productHandle' | 'productType' | 'requiresShipping'> & {
@@ -3474,6 +3490,7 @@ export type CartDiscountCodesUpdateMutation = {
3474
3490
  appliedAmount: Pick<Money, 'amount' | 'currencyCode'>;
3475
3491
  remainingBalance: Pick<Money, 'amount' | 'currencyCode'>;
3476
3492
  })>;
3493
+ completedOrder?: Maybe<Pick<Order, 'id' | 'orderNumber' | 'accessToken' | 'status' | 'paymentStatus' | 'fulfillmentStatus'>>;
3477
3494
  })>;
3478
3495
  userErrors: Array<Pick<UserError, 'message' | 'code' | 'field'>>;
3479
3496
  warnings: Array<Pick<CartWarning, 'message' | 'code' | 'target'>>;
@@ -3483,13 +3500,15 @@ export type CartQueryVariables = Exact<{
3483
3500
  id: Scalars['ID']['input'];
3484
3501
  }>;
3485
3502
  export type CartQuery = {
3486
- cart?: Maybe<(Pick<Cart, 'id' | 'checkoutUrl' | 'totalQuantity' | 'note' | 'email' | 'phone' | 'requiresShipping' | 'createdAt' | 'updatedAt'> & {
3503
+ cart?: Maybe<(Pick<Cart, 'id' | 'checkoutUrl' | 'totalQuantity' | 'note' | 'email' | 'phone' | 'requiresShipping' | 'createdAt' | 'updatedAt' | 'status'> & {
3487
3504
  cost: {
3488
3505
  total: Pick<Money, 'amount' | 'currencyCode'>;
3489
3506
  subtotal: Pick<Money, 'amount' | 'currencyCode'>;
3490
3507
  totalTax?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
3491
3508
  totalDuty?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
3492
3509
  checkoutCharge?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
3510
+ totalDiscount: Pick<Money, 'amount' | 'currencyCode'>;
3511
+ totalShipping?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
3493
3512
  };
3494
3513
  lines: (Pick<CartLineConnection, 'totalCount'> & {
3495
3514
  nodes: Array<(Pick<CartLine, 'id' | 'quantity' | 'productId' | 'productTitle' | 'productHandle' | 'productType' | 'requiresShipping'> & {
@@ -3531,6 +3550,7 @@ export type CartQuery = {
3531
3550
  appliedAmount: Pick<Money, 'amount' | 'currencyCode'>;
3532
3551
  remainingBalance: Pick<Money, 'amount' | 'currencyCode'>;
3533
3552
  })>;
3553
+ completedOrder?: Maybe<Pick<Order, 'id' | 'orderNumber' | 'accessToken' | 'status' | 'paymentStatus' | 'fulfillmentStatus'>>;
3534
3554
  })>;
3535
3555
  };
3536
3556
  export type CartRemoveGiftCardMutationVariables = Exact<{
@@ -3538,13 +3558,15 @@ export type CartRemoveGiftCardMutationVariables = Exact<{
3538
3558
  }>;
3539
3559
  export type CartRemoveGiftCardMutation = {
3540
3560
  cartRemoveGiftCard: {
3541
- cart?: Maybe<(Pick<Cart, 'id' | 'checkoutUrl' | 'totalQuantity' | 'note' | 'email' | 'phone' | 'requiresShipping' | 'createdAt' | 'updatedAt'> & {
3561
+ cart?: Maybe<(Pick<Cart, 'id' | 'checkoutUrl' | 'totalQuantity' | 'note' | 'email' | 'phone' | 'requiresShipping' | 'createdAt' | 'updatedAt' | 'status'> & {
3542
3562
  cost: {
3543
3563
  total: Pick<Money, 'amount' | 'currencyCode'>;
3544
3564
  subtotal: Pick<Money, 'amount' | 'currencyCode'>;
3545
3565
  totalTax?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
3546
3566
  totalDuty?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
3547
3567
  checkoutCharge?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
3568
+ totalDiscount: Pick<Money, 'amount' | 'currencyCode'>;
3569
+ totalShipping?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
3548
3570
  };
3549
3571
  lines: (Pick<CartLineConnection, 'totalCount'> & {
3550
3572
  nodes: Array<(Pick<CartLine, 'id' | 'quantity' | 'productId' | 'productTitle' | 'productHandle' | 'productType' | 'requiresShipping'> & {
@@ -3586,6 +3608,7 @@ export type CartRemoveGiftCardMutation = {
3586
3608
  appliedAmount: Pick<Money, 'amount' | 'currencyCode'>;
3587
3609
  remainingBalance: Pick<Money, 'amount' | 'currencyCode'>;
3588
3610
  })>;
3611
+ completedOrder?: Maybe<Pick<Order, 'id' | 'orderNumber' | 'accessToken' | 'status' | 'paymentStatus' | 'fulfillmentStatus'>>;
3589
3612
  })>;
3590
3613
  userErrors: Array<Pick<UserError, 'message' | 'code' | 'field'>>;
3591
3614
  warnings: Array<Pick<CartWarning, 'message' | 'code' | 'target'>>;
@@ -3597,13 +3620,15 @@ export type CartRemoveLinesMutationVariables = Exact<{
3597
3620
  }>;
3598
3621
  export type CartRemoveLinesMutation = {
3599
3622
  cartRemoveLines: {
3600
- cart?: Maybe<(Pick<Cart, 'id' | 'checkoutUrl' | 'totalQuantity' | 'note' | 'email' | 'phone' | 'requiresShipping' | 'createdAt' | 'updatedAt'> & {
3623
+ cart?: Maybe<(Pick<Cart, 'id' | 'checkoutUrl' | 'totalQuantity' | 'note' | 'email' | 'phone' | 'requiresShipping' | 'createdAt' | 'updatedAt' | 'status'> & {
3601
3624
  cost: {
3602
3625
  total: Pick<Money, 'amount' | 'currencyCode'>;
3603
3626
  subtotal: Pick<Money, 'amount' | 'currencyCode'>;
3604
3627
  totalTax?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
3605
3628
  totalDuty?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
3606
3629
  checkoutCharge?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
3630
+ totalDiscount: Pick<Money, 'amount' | 'currencyCode'>;
3631
+ totalShipping?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
3607
3632
  };
3608
3633
  lines: (Pick<CartLineConnection, 'totalCount'> & {
3609
3634
  nodes: Array<(Pick<CartLine, 'id' | 'quantity' | 'productId' | 'productTitle' | 'productHandle' | 'productType' | 'requiresShipping'> & {
@@ -3645,6 +3670,7 @@ export type CartRemoveLinesMutation = {
3645
3670
  appliedAmount: Pick<Money, 'amount' | 'currencyCode'>;
3646
3671
  remainingBalance: Pick<Money, 'amount' | 'currencyCode'>;
3647
3672
  })>;
3673
+ completedOrder?: Maybe<Pick<Order, 'id' | 'orderNumber' | 'accessToken' | 'status' | 'paymentStatus' | 'fulfillmentStatus'>>;
3648
3674
  })>;
3649
3675
  userErrors: Array<Pick<UserError, 'message' | 'code' | 'field'>>;
3650
3676
  warnings: Array<Pick<CartWarning, 'message' | 'code' | 'target'>>;
@@ -3655,13 +3681,15 @@ export type CartSelectPaymentMethodMutationVariables = Exact<{
3655
3681
  }>;
3656
3682
  export type CartSelectPaymentMethodMutation = {
3657
3683
  cartSelectPaymentMethod: {
3658
- cart?: Maybe<(Pick<Cart, 'id' | 'checkoutUrl' | 'totalQuantity' | 'note' | 'email' | 'phone' | 'requiresShipping' | 'createdAt' | 'updatedAt'> & {
3684
+ cart?: Maybe<(Pick<Cart, 'id' | 'checkoutUrl' | 'totalQuantity' | 'note' | 'email' | 'phone' | 'requiresShipping' | 'createdAt' | 'updatedAt' | 'status'> & {
3659
3685
  cost: {
3660
3686
  total: Pick<Money, 'amount' | 'currencyCode'>;
3661
3687
  subtotal: Pick<Money, 'amount' | 'currencyCode'>;
3662
3688
  totalTax?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
3663
3689
  totalDuty?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
3664
3690
  checkoutCharge?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
3691
+ totalDiscount: Pick<Money, 'amount' | 'currencyCode'>;
3692
+ totalShipping?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
3665
3693
  };
3666
3694
  lines: (Pick<CartLineConnection, 'totalCount'> & {
3667
3695
  nodes: Array<(Pick<CartLine, 'id' | 'quantity' | 'productId' | 'productTitle' | 'productHandle' | 'productType' | 'requiresShipping'> & {
@@ -3703,6 +3731,7 @@ export type CartSelectPaymentMethodMutation = {
3703
3731
  appliedAmount: Pick<Money, 'amount' | 'currencyCode'>;
3704
3732
  remainingBalance: Pick<Money, 'amount' | 'currencyCode'>;
3705
3733
  })>;
3734
+ completedOrder?: Maybe<Pick<Order, 'id' | 'orderNumber' | 'accessToken' | 'status' | 'paymentStatus' | 'fulfillmentStatus'>>;
3706
3735
  })>;
3707
3736
  userErrors: Array<Pick<UserError, 'message' | 'code' | 'field'>>;
3708
3737
  warnings: Array<Pick<CartWarning, 'message' | 'code' | 'target'>>;
@@ -3713,13 +3742,15 @@ export type CartSelectShippingMethodMutationVariables = Exact<{
3713
3742
  }>;
3714
3743
  export type CartSelectShippingMethodMutation = {
3715
3744
  cartSelectShippingMethod: {
3716
- cart?: Maybe<(Pick<Cart, 'id' | 'checkoutUrl' | 'totalQuantity' | 'note' | 'email' | 'phone' | 'requiresShipping' | 'createdAt' | 'updatedAt'> & {
3745
+ cart?: Maybe<(Pick<Cart, 'id' | 'checkoutUrl' | 'totalQuantity' | 'note' | 'email' | 'phone' | 'requiresShipping' | 'createdAt' | 'updatedAt' | 'status'> & {
3717
3746
  cost: {
3718
3747
  total: Pick<Money, 'amount' | 'currencyCode'>;
3719
3748
  subtotal: Pick<Money, 'amount' | 'currencyCode'>;
3720
3749
  totalTax?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
3721
3750
  totalDuty?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
3722
3751
  checkoutCharge?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
3752
+ totalDiscount: Pick<Money, 'amount' | 'currencyCode'>;
3753
+ totalShipping?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
3723
3754
  };
3724
3755
  lines: (Pick<CartLineConnection, 'totalCount'> & {
3725
3756
  nodes: Array<(Pick<CartLine, 'id' | 'quantity' | 'productId' | 'productTitle' | 'productHandle' | 'productType' | 'requiresShipping'> & {
@@ -3761,6 +3792,7 @@ export type CartSelectShippingMethodMutation = {
3761
3792
  appliedAmount: Pick<Money, 'amount' | 'currencyCode'>;
3762
3793
  remainingBalance: Pick<Money, 'amount' | 'currencyCode'>;
3763
3794
  })>;
3795
+ completedOrder?: Maybe<Pick<Order, 'id' | 'orderNumber' | 'accessToken' | 'status' | 'paymentStatus' | 'fulfillmentStatus'>>;
3764
3796
  })>;
3765
3797
  userErrors: Array<Pick<UserError, 'message' | 'code' | 'field'>>;
3766
3798
  warnings: Array<Pick<CartWarning, 'message' | 'code' | 'target'>>;
@@ -3771,13 +3803,15 @@ export type CartSetBillingAddressMutationVariables = Exact<{
3771
3803
  }>;
3772
3804
  export type CartSetBillingAddressMutation = {
3773
3805
  cartSetBillingAddress: {
3774
- cart?: Maybe<(Pick<Cart, 'id' | 'checkoutUrl' | 'totalQuantity' | 'note' | 'email' | 'phone' | 'requiresShipping' | 'createdAt' | 'updatedAt'> & {
3806
+ cart?: Maybe<(Pick<Cart, 'id' | 'checkoutUrl' | 'totalQuantity' | 'note' | 'email' | 'phone' | 'requiresShipping' | 'createdAt' | 'updatedAt' | 'status'> & {
3775
3807
  cost: {
3776
3808
  total: Pick<Money, 'amount' | 'currencyCode'>;
3777
3809
  subtotal: Pick<Money, 'amount' | 'currencyCode'>;
3778
3810
  totalTax?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
3779
3811
  totalDuty?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
3780
3812
  checkoutCharge?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
3813
+ totalDiscount: Pick<Money, 'amount' | 'currencyCode'>;
3814
+ totalShipping?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
3781
3815
  };
3782
3816
  lines: (Pick<CartLineConnection, 'totalCount'> & {
3783
3817
  nodes: Array<(Pick<CartLine, 'id' | 'quantity' | 'productId' | 'productTitle' | 'productHandle' | 'productType' | 'requiresShipping'> & {
@@ -3819,6 +3853,7 @@ export type CartSetBillingAddressMutation = {
3819
3853
  appliedAmount: Pick<Money, 'amount' | 'currencyCode'>;
3820
3854
  remainingBalance: Pick<Money, 'amount' | 'currencyCode'>;
3821
3855
  })>;
3856
+ completedOrder?: Maybe<Pick<Order, 'id' | 'orderNumber' | 'accessToken' | 'status' | 'paymentStatus' | 'fulfillmentStatus'>>;
3822
3857
  })>;
3823
3858
  userErrors: Array<Pick<UserError, 'message' | 'code' | 'field'>>;
3824
3859
  warnings: Array<Pick<CartWarning, 'message' | 'code' | 'target'>>;
@@ -3829,13 +3864,15 @@ export type CartSetShippingAddressMutationVariables = Exact<{
3829
3864
  }>;
3830
3865
  export type CartSetShippingAddressMutation = {
3831
3866
  cartSetShippingAddress: {
3832
- cart?: Maybe<(Pick<Cart, 'id' | 'checkoutUrl' | 'totalQuantity' | 'note' | 'email' | 'phone' | 'requiresShipping' | 'createdAt' | 'updatedAt'> & {
3867
+ cart?: Maybe<(Pick<Cart, 'id' | 'checkoutUrl' | 'totalQuantity' | 'note' | 'email' | 'phone' | 'requiresShipping' | 'createdAt' | 'updatedAt' | 'status'> & {
3833
3868
  cost: {
3834
3869
  total: Pick<Money, 'amount' | 'currencyCode'>;
3835
3870
  subtotal: Pick<Money, 'amount' | 'currencyCode'>;
3836
3871
  totalTax?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
3837
3872
  totalDuty?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
3838
3873
  checkoutCharge?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
3874
+ totalDiscount: Pick<Money, 'amount' | 'currencyCode'>;
3875
+ totalShipping?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
3839
3876
  };
3840
3877
  lines: (Pick<CartLineConnection, 'totalCount'> & {
3841
3878
  nodes: Array<(Pick<CartLine, 'id' | 'quantity' | 'productId' | 'productTitle' | 'productHandle' | 'productType' | 'requiresShipping'> & {
@@ -3877,6 +3914,7 @@ export type CartSetShippingAddressMutation = {
3877
3914
  appliedAmount: Pick<Money, 'amount' | 'currencyCode'>;
3878
3915
  remainingBalance: Pick<Money, 'amount' | 'currencyCode'>;
3879
3916
  })>;
3917
+ completedOrder?: Maybe<Pick<Order, 'id' | 'orderNumber' | 'accessToken' | 'status' | 'paymentStatus' | 'fulfillmentStatus'>>;
3880
3918
  })>;
3881
3919
  userErrors: Array<Pick<UserError, 'message' | 'code' | 'field'>>;
3882
3920
  warnings: Array<Pick<CartWarning, 'message' | 'code' | 'target'>>;
@@ -3888,13 +3926,15 @@ export type CartUpdateAttributesMutationVariables = Exact<{
3888
3926
  }>;
3889
3927
  export type CartUpdateAttributesMutation = {
3890
3928
  cartUpdateAttributes: {
3891
- cart?: Maybe<(Pick<Cart, 'id' | 'checkoutUrl' | 'totalQuantity' | 'note' | 'email' | 'phone' | 'requiresShipping' | 'createdAt' | 'updatedAt'> & {
3929
+ cart?: Maybe<(Pick<Cart, 'id' | 'checkoutUrl' | 'totalQuantity' | 'note' | 'email' | 'phone' | 'requiresShipping' | 'createdAt' | 'updatedAt' | 'status'> & {
3892
3930
  cost: {
3893
3931
  total: Pick<Money, 'amount' | 'currencyCode'>;
3894
3932
  subtotal: Pick<Money, 'amount' | 'currencyCode'>;
3895
3933
  totalTax?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
3896
3934
  totalDuty?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
3897
3935
  checkoutCharge?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
3936
+ totalDiscount: Pick<Money, 'amount' | 'currencyCode'>;
3937
+ totalShipping?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
3898
3938
  };
3899
3939
  lines: (Pick<CartLineConnection, 'totalCount'> & {
3900
3940
  nodes: Array<(Pick<CartLine, 'id' | 'quantity' | 'productId' | 'productTitle' | 'productHandle' | 'productType' | 'requiresShipping'> & {
@@ -3936,6 +3976,7 @@ export type CartUpdateAttributesMutation = {
3936
3976
  appliedAmount: Pick<Money, 'amount' | 'currencyCode'>;
3937
3977
  remainingBalance: Pick<Money, 'amount' | 'currencyCode'>;
3938
3978
  })>;
3979
+ completedOrder?: Maybe<Pick<Order, 'id' | 'orderNumber' | 'accessToken' | 'status' | 'paymentStatus' | 'fulfillmentStatus'>>;
3939
3980
  })>;
3940
3981
  userErrors: Array<Pick<UserError, 'message' | 'code' | 'field'>>;
3941
3982
  warnings: Array<Pick<CartWarning, 'message' | 'code' | 'target'>>;
@@ -3947,13 +3988,15 @@ export type CartUpdateBuyerIdentityMutationVariables = Exact<{
3947
3988
  }>;
3948
3989
  export type CartUpdateBuyerIdentityMutation = {
3949
3990
  cartUpdateBuyerIdentity: {
3950
- cart?: Maybe<(Pick<Cart, 'id' | 'checkoutUrl' | 'totalQuantity' | 'note' | 'email' | 'phone' | 'requiresShipping' | 'createdAt' | 'updatedAt'> & {
3991
+ cart?: Maybe<(Pick<Cart, 'id' | 'checkoutUrl' | 'totalQuantity' | 'note' | 'email' | 'phone' | 'requiresShipping' | 'createdAt' | 'updatedAt' | 'status'> & {
3951
3992
  cost: {
3952
3993
  total: Pick<Money, 'amount' | 'currencyCode'>;
3953
3994
  subtotal: Pick<Money, 'amount' | 'currencyCode'>;
3954
3995
  totalTax?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
3955
3996
  totalDuty?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
3956
3997
  checkoutCharge?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
3998
+ totalDiscount: Pick<Money, 'amount' | 'currencyCode'>;
3999
+ totalShipping?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
3957
4000
  };
3958
4001
  lines: (Pick<CartLineConnection, 'totalCount'> & {
3959
4002
  nodes: Array<(Pick<CartLine, 'id' | 'quantity' | 'productId' | 'productTitle' | 'productHandle' | 'productType' | 'requiresShipping'> & {
@@ -3995,6 +4038,7 @@ export type CartUpdateBuyerIdentityMutation = {
3995
4038
  appliedAmount: Pick<Money, 'amount' | 'currencyCode'>;
3996
4039
  remainingBalance: Pick<Money, 'amount' | 'currencyCode'>;
3997
4040
  })>;
4041
+ completedOrder?: Maybe<Pick<Order, 'id' | 'orderNumber' | 'accessToken' | 'status' | 'paymentStatus' | 'fulfillmentStatus'>>;
3998
4042
  })>;
3999
4043
  userErrors: Array<Pick<UserError, 'message' | 'code' | 'field'>>;
4000
4044
  warnings: Array<Pick<CartWarning, 'message' | 'code' | 'target'>>;
@@ -4005,13 +4049,15 @@ export type CartUpdateGiftCardRecipientMutationVariables = Exact<{
4005
4049
  }>;
4006
4050
  export type CartUpdateGiftCardRecipientMutation = {
4007
4051
  cartUpdateGiftCardRecipient: {
4008
- cart?: Maybe<(Pick<Cart, 'id' | 'checkoutUrl' | 'totalQuantity' | 'note' | 'email' | 'phone' | 'requiresShipping' | 'createdAt' | 'updatedAt'> & {
4052
+ cart?: Maybe<(Pick<Cart, 'id' | 'checkoutUrl' | 'totalQuantity' | 'note' | 'email' | 'phone' | 'requiresShipping' | 'createdAt' | 'updatedAt' | 'status'> & {
4009
4053
  cost: {
4010
4054
  total: Pick<Money, 'amount' | 'currencyCode'>;
4011
4055
  subtotal: Pick<Money, 'amount' | 'currencyCode'>;
4012
4056
  totalTax?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
4013
4057
  totalDuty?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
4014
4058
  checkoutCharge?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
4059
+ totalDiscount: Pick<Money, 'amount' | 'currencyCode'>;
4060
+ totalShipping?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
4015
4061
  };
4016
4062
  lines: (Pick<CartLineConnection, 'totalCount'> & {
4017
4063
  nodes: Array<(Pick<CartLine, 'id' | 'quantity' | 'productId' | 'productTitle' | 'productHandle' | 'productType' | 'requiresShipping'> & {
@@ -4053,6 +4099,7 @@ export type CartUpdateGiftCardRecipientMutation = {
4053
4099
  appliedAmount: Pick<Money, 'amount' | 'currencyCode'>;
4054
4100
  remainingBalance: Pick<Money, 'amount' | 'currencyCode'>;
4055
4101
  })>;
4102
+ completedOrder?: Maybe<Pick<Order, 'id' | 'orderNumber' | 'accessToken' | 'status' | 'paymentStatus' | 'fulfillmentStatus'>>;
4056
4103
  })>;
4057
4104
  userErrors: Array<Pick<UserError, 'message' | 'code' | 'field'>>;
4058
4105
  warnings: Array<Pick<CartWarning, 'message' | 'code' | 'target'>>;
@@ -4064,13 +4111,15 @@ export type CartUpdateLinesMutationVariables = Exact<{
4064
4111
  }>;
4065
4112
  export type CartUpdateLinesMutation = {
4066
4113
  cartUpdateLines: {
4067
- cart?: Maybe<(Pick<Cart, 'id' | 'checkoutUrl' | 'totalQuantity' | 'note' | 'email' | 'phone' | 'requiresShipping' | 'createdAt' | 'updatedAt'> & {
4114
+ cart?: Maybe<(Pick<Cart, 'id' | 'checkoutUrl' | 'totalQuantity' | 'note' | 'email' | 'phone' | 'requiresShipping' | 'createdAt' | 'updatedAt' | 'status'> & {
4068
4115
  cost: {
4069
4116
  total: Pick<Money, 'amount' | 'currencyCode'>;
4070
4117
  subtotal: Pick<Money, 'amount' | 'currencyCode'>;
4071
4118
  totalTax?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
4072
4119
  totalDuty?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
4073
4120
  checkoutCharge?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
4121
+ totalDiscount: Pick<Money, 'amount' | 'currencyCode'>;
4122
+ totalShipping?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
4074
4123
  };
4075
4124
  lines: (Pick<CartLineConnection, 'totalCount'> & {
4076
4125
  nodes: Array<(Pick<CartLine, 'id' | 'quantity' | 'productId' | 'productTitle' | 'productHandle' | 'productType' | 'requiresShipping'> & {
@@ -4112,6 +4161,7 @@ export type CartUpdateLinesMutation = {
4112
4161
  appliedAmount: Pick<Money, 'amount' | 'currencyCode'>;
4113
4162
  remainingBalance: Pick<Money, 'amount' | 'currencyCode'>;
4114
4163
  })>;
4164
+ completedOrder?: Maybe<Pick<Order, 'id' | 'orderNumber' | 'accessToken' | 'status' | 'paymentStatus' | 'fulfillmentStatus'>>;
4115
4165
  })>;
4116
4166
  userErrors: Array<Pick<UserError, 'message' | 'code' | 'field'>>;
4117
4167
  warnings: Array<Pick<CartWarning, 'message' | 'code' | 'target'>>;
@@ -4123,13 +4173,15 @@ export type CartUpdateNoteMutationVariables = Exact<{
4123
4173
  }>;
4124
4174
  export type CartUpdateNoteMutation = {
4125
4175
  cartUpdateNote: {
4126
- cart?: Maybe<(Pick<Cart, 'id' | 'checkoutUrl' | 'totalQuantity' | 'note' | 'email' | 'phone' | 'requiresShipping' | 'createdAt' | 'updatedAt'> & {
4176
+ cart?: Maybe<(Pick<Cart, 'id' | 'checkoutUrl' | 'totalQuantity' | 'note' | 'email' | 'phone' | 'requiresShipping' | 'createdAt' | 'updatedAt' | 'status'> & {
4127
4177
  cost: {
4128
4178
  total: Pick<Money, 'amount' | 'currencyCode'>;
4129
4179
  subtotal: Pick<Money, 'amount' | 'currencyCode'>;
4130
4180
  totalTax?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
4131
4181
  totalDuty?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
4132
4182
  checkoutCharge?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
4183
+ totalDiscount: Pick<Money, 'amount' | 'currencyCode'>;
4184
+ totalShipping?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
4133
4185
  };
4134
4186
  lines: (Pick<CartLineConnection, 'totalCount'> & {
4135
4187
  nodes: Array<(Pick<CartLine, 'id' | 'quantity' | 'productId' | 'productTitle' | 'productHandle' | 'productType' | 'requiresShipping'> & {
@@ -4171,6 +4223,7 @@ export type CartUpdateNoteMutation = {
4171
4223
  appliedAmount: Pick<Money, 'amount' | 'currencyCode'>;
4172
4224
  remainingBalance: Pick<Money, 'amount' | 'currencyCode'>;
4173
4225
  })>;
4226
+ completedOrder?: Maybe<Pick<Order, 'id' | 'orderNumber' | 'accessToken' | 'status' | 'paymentStatus' | 'fulfillmentStatus'>>;
4174
4227
  })>;
4175
4228
  userErrors: Array<Pick<UserError, 'message' | 'code' | 'field'>>;
4176
4229
  warnings: Array<Pick<CartWarning, 'message' | 'code' | 'target'>>;
@@ -4280,13 +4333,15 @@ export type AvailablePaymentMethodsFragment = {
4280
4333
  defaultMethod?: Maybe<Pick<PaymentMethod, 'id' | 'name' | 'provider' | 'type' | 'icon' | 'description' | 'isDefault' | 'supportedCurrencies' | 'position'>>;
4281
4334
  };
4282
4335
  export type PaymentMethodFragment = Pick<PaymentMethod, 'id' | 'name' | 'provider' | 'type' | 'icon' | 'description' | 'isDefault' | 'supportedCurrencies' | 'position'>;
4283
- export type CartFragment = (Pick<Cart, 'id' | 'checkoutUrl' | 'totalQuantity' | 'note' | 'email' | 'phone' | 'requiresShipping' | 'createdAt' | 'updatedAt'> & {
4336
+ export type CartFragment = (Pick<Cart, 'id' | 'checkoutUrl' | 'totalQuantity' | 'note' | 'email' | 'phone' | 'requiresShipping' | 'createdAt' | 'updatedAt' | 'status'> & {
4284
4337
  cost: {
4285
4338
  total: Pick<Money, 'amount' | 'currencyCode'>;
4286
4339
  subtotal: Pick<Money, 'amount' | 'currencyCode'>;
4287
4340
  totalTax?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
4288
4341
  totalDuty?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
4289
4342
  checkoutCharge?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
4343
+ totalDiscount: Pick<Money, 'amount' | 'currencyCode'>;
4344
+ totalShipping?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
4290
4345
  };
4291
4346
  lines: (Pick<CartLineConnection, 'totalCount'> & {
4292
4347
  nodes: Array<(Pick<CartLine, 'id' | 'quantity' | 'productId' | 'productTitle' | 'productHandle' | 'productType' | 'requiresShipping'> & {
@@ -4328,6 +4383,7 @@ export type CartFragment = (Pick<Cart, 'id' | 'checkoutUrl' | 'totalQuantity' |
4328
4383
  appliedAmount: Pick<Money, 'amount' | 'currencyCode'>;
4329
4384
  remainingBalance: Pick<Money, 'amount' | 'currencyCode'>;
4330
4385
  })>;
4386
+ completedOrder?: Maybe<Pick<Order, 'id' | 'orderNumber' | 'accessToken' | 'status' | 'paymentStatus' | 'fulfillmentStatus'>>;
4331
4387
  });
4332
4388
  export type CartCostFragment = {
4333
4389
  total: Pick<Money, 'amount' | 'currencyCode'>;
@@ -4335,6 +4391,8 @@ export type CartCostFragment = {
4335
4391
  totalTax?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
4336
4392
  totalDuty?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
4337
4393
  checkoutCharge?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
4394
+ totalDiscount: Pick<Money, 'amount' | 'currencyCode'>;
4395
+ totalShipping?: Maybe<Pick<Money, 'amount' | 'currencyCode'>>;
4338
4396
  };
4339
4397
  export type CartLineFragment = (Pick<CartLine, 'id' | 'quantity' | 'productId' | 'productTitle' | 'productHandle' | 'productType' | 'requiresShipping'> & {
4340
4398
  variant: (Pick<ProductVariant, 'id' | 'title' | 'sku' | 'isAvailable' | 'availableStock' | 'barcode' | 'sortOrder'> & {