@shopify/hydrogen 2024.10.0 → 2025.1.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/dist/customer-account-api-types.d.ts +69 -24
- package/dist/customer-account.schema.json +1 -1
- package/dist/development/index.cjs +146 -81
- package/dist/development/index.cjs.map +1 -1
- package/dist/development/index.js +133 -84
- package/dist/development/index.js.map +1 -1
- package/dist/production/index.cjs +117 -101
- package/dist/production/index.cjs.map +1 -1
- package/dist/production/index.d.cts +36 -29
- package/dist/production/index.d.ts +36 -29
- package/dist/production/index.js +62 -62
- package/dist/production/index.js.map +1 -1
- package/dist/storefront-api-types.d.ts +641 -127
- package/dist/storefront.schema.json +1 -1
- package/dist/vite/{chunk-FYY4S45W.js → chunk-X5BGIDLF.js} +1 -1
- package/dist/vite/compat-date.js +1 -1
- package/dist/vite/plugin.d.ts +3 -3
- package/dist/vite/plugin.js +1 -1
- package/package.json +10 -5
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THIS FILE IS AUTO-GENERATED, DO NOT EDIT
|
|
3
|
-
* Based on Customer Account API
|
|
3
|
+
* Based on Customer Account API 2025-01
|
|
4
4
|
* If changes need to happen to the types defined in this file, then generally the Storefront API needs to update. After it's updated, you can run `npm run graphql-types`.
|
|
5
5
|
* Except custom Scalars, which are defined in the `codegen.ts` file
|
|
6
6
|
*/
|
|
@@ -422,7 +422,10 @@ export type Checkout = Node & {
|
|
|
422
422
|
shippingDiscountAllocations: Array<DiscountAllocation>;
|
|
423
423
|
/** The selected shipping rate, transitioned to a `shipping_line` object. */
|
|
424
424
|
shippingLine?: Maybe<ShippingRate>;
|
|
425
|
-
/**
|
|
425
|
+
/**
|
|
426
|
+
* The configuration values used to initialize a Shop Pay checkout.
|
|
427
|
+
* @deprecated This field is deprecated and will be removed in the future.
|
|
428
|
+
*/
|
|
426
429
|
shopPayConfiguration?: Maybe<ShopPayConfiguration>;
|
|
427
430
|
/** The price at checkout before duties, shipping, and taxes. */
|
|
428
431
|
subtotalPrice: MoneyV2;
|
|
@@ -2849,7 +2852,7 @@ export type DraftOrderLineItemConnection = {
|
|
|
2849
2852
|
/** The discount information for the draft order line item. */
|
|
2850
2853
|
export type DraftOrderLineItemDiscountInformation = {
|
|
2851
2854
|
__typename?: 'DraftOrderLineItemDiscountInformation';
|
|
2852
|
-
/** The
|
|
2855
|
+
/** The discount's name that displays to merchants in the Shopify admin and to customers. */
|
|
2853
2856
|
title?: Maybe<Scalars['String']['output']>;
|
|
2854
2857
|
/** The total discount applied to the line item. */
|
|
2855
2858
|
totalDiscount: MoneyV2;
|
|
@@ -3454,6 +3457,8 @@ export type LineItem = Node & {
|
|
|
3454
3457
|
discountInformation: Array<LineItemDiscountInformation>;
|
|
3455
3458
|
/** Whether the line item represents the purchase of a gift card. */
|
|
3456
3459
|
giftCard: Scalars['Boolean']['output'];
|
|
3460
|
+
/** The line item group associated to the line item. */
|
|
3461
|
+
group?: Maybe<LineItemGroup>;
|
|
3457
3462
|
/** The title of the line item group associated with the line item. */
|
|
3458
3463
|
groupTitle?: Maybe<Scalars['String']['output']>;
|
|
3459
3464
|
/** A globally-unique ID. */
|
|
@@ -3575,7 +3580,7 @@ export type LineItemDiscountInformation = {
|
|
|
3575
3580
|
__typename?: 'LineItemDiscountInformation';
|
|
3576
3581
|
/** The value of the applied discount. */
|
|
3577
3582
|
discountValue: MoneyV2;
|
|
3578
|
-
/** The
|
|
3583
|
+
/** The discount's name that displays to merchants in the Shopify admin and to customers. */
|
|
3579
3584
|
title?: Maybe<Scalars['String']['output']>;
|
|
3580
3585
|
};
|
|
3581
3586
|
|
|
@@ -3588,6 +3593,25 @@ export type LineItemEdge = {
|
|
|
3588
3593
|
node: LineItem;
|
|
3589
3594
|
};
|
|
3590
3595
|
|
|
3596
|
+
/** A line item group to which a line item belongs to. */
|
|
3597
|
+
export type LineItemGroup = Node & {
|
|
3598
|
+
__typename?: 'LineItemGroup';
|
|
3599
|
+
/** The total price of the line item group, calculated by aggregating the current total price of its line item components. */
|
|
3600
|
+
currentTotalPrice?: Maybe<MoneyV2>;
|
|
3601
|
+
/** The discount information for the line item group. */
|
|
3602
|
+
discountInformation?: Maybe<Array<LineItemDiscountInformation>>;
|
|
3603
|
+
/** A globally-unique ID. */
|
|
3604
|
+
id: Scalars['ID']['output'];
|
|
3605
|
+
/** The image of the line item group variant or the product image if the variant has no image. */
|
|
3606
|
+
image?: Maybe<Image>;
|
|
3607
|
+
/** The number of line item groups ordered. */
|
|
3608
|
+
quantity: Scalars['Int']['output'];
|
|
3609
|
+
/** The title of the line item group. */
|
|
3610
|
+
title: Scalars['String']['output'];
|
|
3611
|
+
/** The total price of the line item group, calculated by aggregating the total price before discounts of its line item components. */
|
|
3612
|
+
totalPriceBeforeDiscounts?: Maybe<MoneyV2>;
|
|
3613
|
+
};
|
|
3614
|
+
|
|
3591
3615
|
/** The selling plan for a line item. */
|
|
3592
3616
|
export type LineItemSellingPlan = {
|
|
3593
3617
|
__typename?: 'LineItemSellingPlan';
|
|
@@ -3788,7 +3812,7 @@ export type MetafieldsSetInput = {
|
|
|
3788
3812
|
compareDigest?: InputMaybe<Scalars['String']['input']>;
|
|
3789
3813
|
/**
|
|
3790
3814
|
* The unique identifier for a metafield within its namespace.
|
|
3791
|
-
* Must be
|
|
3815
|
+
* Must be 2-64 characters long and can contain alphanumeric, hyphen, and underscore characters.
|
|
3792
3816
|
*/
|
|
3793
3817
|
key: Scalars['String']['input'];
|
|
3794
3818
|
/**
|
|
@@ -3931,7 +3955,7 @@ export type Mutation = {
|
|
|
3931
3955
|
*
|
|
3932
3956
|
* This operation is atomic, meaning no changes are persisted if an error is encountered.
|
|
3933
3957
|
*
|
|
3934
|
-
* As of `2024-
|
|
3958
|
+
* As of `2024-07`, this operation supports compare-and-set functionality to better handle concurrent requests.
|
|
3935
3959
|
* If `compareDigest` is set for any metafield, the mutation will only set that metafield if the persisted metafield value matches the digest used on `compareDigest`.
|
|
3936
3960
|
* If the metafield doesn't exist yet, but you want to guarantee that the operation will run in a safe manner, set `compareDigest` to `null`.
|
|
3937
3961
|
* The `compareDigest` value can be acquired by querying the metafield object and selecting `compareDigest` as a field.
|
|
@@ -3956,13 +3980,14 @@ export type Mutation = {
|
|
|
3956
3980
|
/**
|
|
3957
3981
|
* Exchanges the Customer Access Token, provided in the Authorization header, into a Storefront Customer Access Token.
|
|
3958
3982
|
* Renew this token each time you update the Customer Access Token found in the Authorization header.
|
|
3983
|
+
* @deprecated The `storefrontCustomerAccessTokenCreate` is deprecated and will be removed in a future version. Please see [the changelog](https://shopify.dev/changelog/deprecation-of-storefrontcustomeraccesstokencreate-mutation) for more information.
|
|
3959
3984
|
*/
|
|
3960
3985
|
storefrontCustomerAccessTokenCreate?: Maybe<StorefrontCustomerAccessTokenCreatePayload>;
|
|
3961
3986
|
/** Skips a Subscription Billing Cycle. */
|
|
3962
3987
|
subscriptionBillingCycleSkip?: Maybe<SubscriptionBillingCycleSkipPayload>;
|
|
3963
3988
|
/** Unskips a Subscription Billing Cycle. */
|
|
3964
3989
|
subscriptionBillingCycleUnskip?: Maybe<SubscriptionBillingCycleUnskipPayload>;
|
|
3965
|
-
/** Activates a Subscription Contract. */
|
|
3990
|
+
/** Activates a Subscription Contract. Contract status must be either active, paused, or failed. */
|
|
3966
3991
|
subscriptionContractActivate?: Maybe<SubscriptionContractActivatePayload>;
|
|
3967
3992
|
/** Cancels a Subscription Contract. */
|
|
3968
3993
|
subscriptionContractCancel?: Maybe<SubscriptionContractCancelPayload>;
|
|
@@ -4321,6 +4346,8 @@ export type Order = HasMetafields &
|
|
|
4321
4346
|
soldInformation: OrderSoldInformation;
|
|
4322
4347
|
/** The unique URL for the status page of the order. */
|
|
4323
4348
|
statusPageUrl: Scalars['URL']['output'];
|
|
4349
|
+
/** The customer Subscription Contracts associated with the order. */
|
|
4350
|
+
subscriptionContracts?: Maybe<SubscriptionContractConnection>;
|
|
4324
4351
|
/** The price of the order before duties, shipping, and taxes. */
|
|
4325
4352
|
subtotal?: Maybe<MoneyV2>;
|
|
4326
4353
|
/** The price of the order before order-level discounts, duties, shipping. It includes taxes in tax-inclusive orders. */
|
|
@@ -4345,6 +4372,8 @@ export type Order = HasMetafields &
|
|
|
4345
4372
|
totalTip?: Maybe<MoneyV2>;
|
|
4346
4373
|
/** A list of transactions associated with the order. */
|
|
4347
4374
|
transactions: Array<OrderTransaction>;
|
|
4375
|
+
/** The date and time when the order was last updated. */
|
|
4376
|
+
updatedAt: Scalars['DateTime']['output'];
|
|
4348
4377
|
};
|
|
4349
4378
|
|
|
4350
4379
|
/** A customer’s completed request to purchase one or more products from a shop. Apps using the Customer Account API must meet the protected customer data [requirements](https://shopify.dev/docs/apps/launch/protected-customer-data). */
|
|
@@ -4411,6 +4440,17 @@ export type OrderReturnsArgs = {
|
|
|
4411
4440
|
sortKey?: InputMaybe<ReturnSortKeys>;
|
|
4412
4441
|
};
|
|
4413
4442
|
|
|
4443
|
+
/** A customer’s completed request to purchase one or more products from a shop. Apps using the Customer Account API must meet the protected customer data [requirements](https://shopify.dev/docs/apps/launch/protected-customer-data). */
|
|
4444
|
+
export type OrderSubscriptionContractsArgs = {
|
|
4445
|
+
after?: InputMaybe<Scalars['String']['input']>;
|
|
4446
|
+
before?: InputMaybe<Scalars['String']['input']>;
|
|
4447
|
+
first?: InputMaybe<Scalars['Int']['input']>;
|
|
4448
|
+
last?: InputMaybe<Scalars['Int']['input']>;
|
|
4449
|
+
query?: InputMaybe<Scalars['String']['input']>;
|
|
4450
|
+
reverse?: InputMaybe<Scalars['Boolean']['input']>;
|
|
4451
|
+
sortKey?: InputMaybe<SubscriptionContractsSortKeys>;
|
|
4452
|
+
};
|
|
4453
|
+
|
|
4414
4454
|
/**
|
|
4415
4455
|
* The possible order action types for a
|
|
4416
4456
|
* [sales agreement](https://shopify.dev/api/admin-graphql/latest/interfaces/salesagreement).
|
|
@@ -4461,7 +4501,7 @@ export type OrderAllDiscounts = {
|
|
|
4461
4501
|
discountValue: MoneyV2;
|
|
4462
4502
|
/** The type of line to which the discount applies. */
|
|
4463
4503
|
targetType: DiscountApplicationTargetType;
|
|
4464
|
-
/** The
|
|
4504
|
+
/** The discount's name that displays to merchants in the Shopify admin and to customers. */
|
|
4465
4505
|
title?: Maybe<Scalars['String']['output']>;
|
|
4466
4506
|
};
|
|
4467
4507
|
|
|
@@ -5035,7 +5075,10 @@ export type PaymentInstrumentWalletType =
|
|
|
5035
5075
|
/** A single payment schedule defined in the payment terms. */
|
|
5036
5076
|
export type PaymentSchedule = Node & {
|
|
5037
5077
|
__typename?: 'PaymentSchedule';
|
|
5038
|
-
/**
|
|
5078
|
+
/**
|
|
5079
|
+
* The amount owed for this payment schedule.
|
|
5080
|
+
* @deprecated Use `totalBalance` instead.
|
|
5081
|
+
*/
|
|
5039
5082
|
amount: MoneyV2;
|
|
5040
5083
|
/** Whether the payment has been completed. */
|
|
5041
5084
|
completed: Scalars['Boolean']['output'];
|
|
@@ -5473,7 +5516,9 @@ export type QueryRootUiExtensionMetafieldsArgs = {
|
|
|
5473
5516
|
|
|
5474
5517
|
/** This acts as the public, top-level API from which all queries start. */
|
|
5475
5518
|
export type QueryRootUiExtensionSessionTokenArgs = {
|
|
5476
|
-
|
|
5519
|
+
appId?: InputMaybe<Scalars['ID']['input']>;
|
|
5520
|
+
extensionActivationId?: InputMaybe<Scalars['ID']['input']>;
|
|
5521
|
+
id?: InputMaybe<Scalars['ID']['input']>;
|
|
5477
5522
|
};
|
|
5478
5523
|
|
|
5479
5524
|
/** The record of refunds issued to a customer. */
|
|
@@ -5571,9 +5616,9 @@ export type RequestedLineItemInput = {
|
|
|
5571
5616
|
* Maximum length: 300 characters.
|
|
5572
5617
|
*/
|
|
5573
5618
|
customerNote?: InputMaybe<Scalars['String']['input']>;
|
|
5574
|
-
/** The ID of the line item that
|
|
5619
|
+
/** The ID of the line item that the customer wants to return. */
|
|
5575
5620
|
lineItemId: Scalars['ID']['input'];
|
|
5576
|
-
/** The quantity of the item that
|
|
5621
|
+
/** The quantity of the line item that the customer wants to return. */
|
|
5577
5622
|
quantity: Scalars['Int']['input'];
|
|
5578
5623
|
/** The reason for returning the item. */
|
|
5579
5624
|
returnReason: ReturnReason;
|
|
@@ -5629,7 +5674,7 @@ export type Return = Node & {
|
|
|
5629
5674
|
closedAt?: Maybe<Scalars['DateTime']['output']>;
|
|
5630
5675
|
/** The date when the return was created. */
|
|
5631
5676
|
createdAt?: Maybe<Scalars['DateTime']['output']>;
|
|
5632
|
-
/** The additional details about the declined return. */
|
|
5677
|
+
/** The additional details about why the merchant declined the return request. */
|
|
5633
5678
|
decline?: Maybe<ReturnDecline>;
|
|
5634
5679
|
/** A globally-unique ID. */
|
|
5635
5680
|
id: Scalars['ID']['output'];
|
|
@@ -5701,12 +5746,12 @@ export type ReturnConnection = {
|
|
|
5701
5746
|
pageInfo: PageInfo;
|
|
5702
5747
|
};
|
|
5703
5748
|
|
|
5704
|
-
/** The
|
|
5749
|
+
/** The merchant's reason for declining the customer's return request. */
|
|
5705
5750
|
export type ReturnDecline = {
|
|
5706
5751
|
__typename?: 'ReturnDecline';
|
|
5707
|
-
/** The
|
|
5752
|
+
/** The merchant's message to the customer explaining why their return request was declined. */
|
|
5708
5753
|
note?: Maybe<Scalars['String']['output']>;
|
|
5709
|
-
/** The reason
|
|
5754
|
+
/** The reason the return request was declined. */
|
|
5710
5755
|
reason: ReturnDeclineReason;
|
|
5711
5756
|
};
|
|
5712
5757
|
|
|
@@ -5781,16 +5826,16 @@ export type ReturnErrorCode =
|
|
|
5781
5826
|
/** The input value is the wrong length. */
|
|
5782
5827
|
| 'WRONG_LENGTH';
|
|
5783
5828
|
|
|
5784
|
-
/** A line item that
|
|
5829
|
+
/** A line item that has been returned. */
|
|
5785
5830
|
export type ReturnLineItem = Node & {
|
|
5786
5831
|
__typename?: 'ReturnLineItem';
|
|
5787
5832
|
/** A globally-unique ID. */
|
|
5788
5833
|
id: Scalars['ID']['output'];
|
|
5789
|
-
/** The
|
|
5834
|
+
/** The related line item that has been returned. */
|
|
5790
5835
|
lineItem: LineItem;
|
|
5791
|
-
/** The
|
|
5836
|
+
/** The line item quantity that has been returned. */
|
|
5792
5837
|
quantity: Scalars['Int']['output'];
|
|
5793
|
-
/** The reason
|
|
5838
|
+
/** The reason the line item quantity was returned. */
|
|
5794
5839
|
returnReason: ReturnReason;
|
|
5795
5840
|
};
|
|
5796
5841
|
|
|
@@ -5865,9 +5910,9 @@ export type ReturnStatus =
|
|
|
5865
5910
|
/** The supported reason for returning a line item. */
|
|
5866
5911
|
export type ReturnSupportedReason = {
|
|
5867
5912
|
__typename?: 'ReturnSupportedReason';
|
|
5868
|
-
/** The
|
|
5913
|
+
/** The standardized return reason (e.g. `DEFECTIVE` or `UNWANTED`) for returning the line item. */
|
|
5869
5914
|
reason: ReturnReason;
|
|
5870
|
-
/** The
|
|
5915
|
+
/** The localized, display text for the return reason. */
|
|
5871
5916
|
title: Scalars['String']['output'];
|
|
5872
5917
|
};
|
|
5873
5918
|
|
|
@@ -7001,7 +7046,7 @@ export type SubscriptionDeliveryMethodPickupOption = {
|
|
|
7001
7046
|
__typename?: 'SubscriptionDeliveryMethodPickupOption';
|
|
7002
7047
|
/** The details displayed to the customer to describe the pickup option. */
|
|
7003
7048
|
description?: Maybe<Scalars['String']['output']>;
|
|
7004
|
-
/** The
|
|
7049
|
+
/** The address where the customer will pick up the merchandise. */
|
|
7005
7050
|
pickupAddress: PickupAddress;
|
|
7006
7051
|
/** The presentment title of the pickup option. */
|
|
7007
7052
|
presentmentTitle?: Maybe<Scalars['String']['output']>;
|
|
@@ -7214,7 +7259,7 @@ export type SubscriptionPickupOption = {
|
|
|
7214
7259
|
locationId: Scalars['ID']['output'];
|
|
7215
7260
|
/** Whether a phone number is required for the pickup option. */
|
|
7216
7261
|
phoneRequired: Scalars['Boolean']['output'];
|
|
7217
|
-
/** The
|
|
7262
|
+
/** The address where the customer will pick up the merchandise. */
|
|
7218
7263
|
pickupAddress: PickupAddress;
|
|
7219
7264
|
/** The estimated amount of time it takes for the pickup to be ready. For example, "Usually ready in 24 hours". */
|
|
7220
7265
|
pickupTime: Scalars['String']['output'];
|