@ehrenkind/shopify-lib 0.7.0 → 0.7.2

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/index.d.ts CHANGED
@@ -3,18 +3,20 @@ import z from 'zod';
3
3
  /**
4
4
  * Deletes a customer from Shopify by their ID.
5
5
  * @param customerId - The customer ID (GID string, e.g., "gid://shopify/Customer/123")
6
+ * @param retries - Number of retries on transient errors. Defaults to 1; idempotent — re-delete is a no-op.
6
7
  * @returns The deleted customer ID, or null if not found
7
8
  * @throws ShopifyUserError if Shopify returns user errors
8
9
  */
9
- declare function deleteCustomerById(customerId: string): Promise<string | undefined>;
10
+ declare function deleteCustomerById(customerId: string, retries?: number): Promise<string | undefined>;
10
11
 
11
12
  /**
12
13
  * Deletes files from Shopify by their IDs.
13
14
  * @param fileIds - Array of file IDs to delete (e.g., "gid://shopify/MediaImage/123")
15
+ * @param retries - Number of retries on transient errors. Defaults to 1.
14
16
  * @returns Array of successfully deleted file IDs
15
17
  * @throws ShopifyUserError if Shopify returns user errors
16
18
  */
17
- declare function deleteFilesByIds(fileIds: string[]): Promise<string[]>;
19
+ declare function deleteFilesByIds(fileIds: string[], retries?: number): Promise<string[]>;
18
20
 
19
21
  /**
20
22
  * Creates a file in Shopify from an external URL.
@@ -22,6 +24,7 @@ declare function deleteFilesByIds(fileIds: string[]): Promise<string[]>;
22
24
  * @param url - The HTTPS URL of the file to upload (must be publicly accessible)
23
25
  * @param altText - Alt text description for accessibility
24
26
  * @param filename - The filename to use in Shopify
27
+ * @param retries - Number of retries on transient errors. Defaults to 0; fileCreate is not idempotent, so a retry after a successful-but-lost response would create a duplicate file.
25
28
  * @returns Promise resolving to the created file ID
26
29
  * @throws {Error} When the URL doesn't start with https://
27
30
  * @throws {ShopifyUserError} When the mutation fails
@@ -33,7 +36,7 @@ declare function deleteFilesByIds(fileIds: string[]): Promise<string[]>;
33
36
  * 'product-image.png'
34
37
  * )
35
38
  */
36
- declare function createFile(url: string, altText: string, filename: string): Promise<string>;
39
+ declare function createFile(url: string, altText: string, filename: string, retries?: number): Promise<string>;
37
40
 
38
41
  type MetaobjectFieldDefinition$1 = {
39
42
  key: string;
@@ -62,6 +65,7 @@ type CreateMetaobjectDefinitionResult = {
62
65
  * Creates a metaobject definition in Shopify.
63
66
  *
64
67
  * @param input - The metaobject definition input
68
+ * @param retries - Number of retries on transient errors. Defaults to 0; not retried by default to avoid duplicate definition creation.
65
69
  * @returns Promise resolving to the created metaobject definition
66
70
  * @throws {ShopifyUserError} When the mutation fails
67
71
  * @throws {Error} When GraphQL errors occur
@@ -77,7 +81,7 @@ type CreateMetaobjectDefinitionResult = {
77
81
  * ],
78
82
  * })
79
83
  */
80
- declare function createMetaobjectDefinition(input: CreateMetaobjectDefinitionInput): Promise<CreateMetaobjectDefinitionResult>;
84
+ declare function createMetaobjectDefinition(input: CreateMetaobjectDefinitionInput, retries?: number): Promise<CreateMetaobjectDefinitionResult>;
81
85
 
82
86
  type FulfillmentLineItem$1 = {
83
87
  id: number | bigint | string;
@@ -97,6 +101,7 @@ type CreateFulfillmentResult = {
97
101
  * @param fulfillmentOrderId - The fulfillment order ID (numeric, bigint, or GID string)
98
102
  * @param fulfillmentOrderLineItems - Line items to fulfill with their quantities
99
103
  * @param options - Optional tracking and notification settings
104
+ * @param retries - Number of retries on transient errors. Defaults to 0; fulfillmentCreate is not idempotent — a retry after a successful-but-lost response would create a duplicate fulfillment, double-decrement inventory, and may trigger duplicate customer emails.
100
105
  * @returns Promise resolving to the created fulfillment
101
106
  * @throws {ShopifyUserError} When the mutation fails
102
107
  * @throws {Error} When GraphQL errors occur
@@ -120,7 +125,7 @@ declare function createFulfillment(fulfillmentOrderId: number | bigint | string,
120
125
  carrier?: string;
121
126
  trackingUrl?: string;
122
127
  notifyCustomer?: boolean;
123
- }): Promise<CreateFulfillmentResult>;
128
+ }, retries?: number): Promise<CreateFulfillmentResult>;
124
129
 
125
130
  type UpdateFulfillmentTrackingResult = {
126
131
  trackingNumbers: string[];
@@ -133,6 +138,7 @@ type UpdateFulfillmentTrackingResult = {
133
138
  * @param fulfillmentId - The fulfillment ID (numeric, bigint, or GID string)
134
139
  * @param trackingNumber - The new tracking number to add
135
140
  * @param notifyCustomer - Whether to notify the customer (default: false)
141
+ * @param retries - Number of retries on transient errors. Defaults to 1.
136
142
  * @returns Promise resolving to the updated tracking info
137
143
  * @throws {ShopifyUserError} When the mutation fails
138
144
  * @throws {Error} When fulfillment not found or GraphQL errors occur
@@ -144,12 +150,13 @@ type UpdateFulfillmentTrackingResult = {
144
150
  * // Add tracking and notify customer (e.g., last item in order)
145
151
  * await updateFulfillmentTracking(123456789, 'TRACK456', true)
146
152
  */
147
- declare function updateFulfillmentTracking(fulfillmentId: number | bigint | string, trackingNumber: string, notifyCustomer?: boolean): Promise<UpdateFulfillmentTrackingResult>;
153
+ declare function updateFulfillmentTracking(fulfillmentId: number | bigint | string, trackingNumber: string, notifyCustomer?: boolean, retries?: number): Promise<UpdateFulfillmentTrackingResult>;
148
154
 
149
155
  /**
150
156
  * Cancel an order in Shopify.
151
157
  *
152
158
  * @param orderId - The order ID (numeric, bigint, or GID string)
159
+ * @param retries - Number of retries on transient errors. Defaults to 0; this is a destructive mutation and is not retried by default to avoid duplicate cancellations.
153
160
  * @returns Promise resolving to true on success
154
161
  * @throws {ShopifyUserError} When cancellation fails (e.g., ORDER_ALREADY_CANCELLED)
155
162
  *
@@ -167,7 +174,7 @@ declare function updateFulfillmentTracking(fulfillmentId: number | bigint | stri
167
174
  * }
168
175
  * }
169
176
  */
170
- declare function cancelOrderById(orderId: number | bigint | string): Promise<boolean>;
177
+ declare function cancelOrderById(orderId: number | bigint | string, retries?: number): Promise<boolean>;
171
178
 
172
179
  type Maybe<T> = T | null;
173
180
  type InputMaybe<T> = Maybe<T>;
@@ -1039,7 +1046,7 @@ type Article = HasEvents & HasMetafieldDefinitions & HasMetafields & HasPublishe
1039
1046
  body: Scalars['HTML']['output'];
1040
1047
  /** List of the article's comments. */
1041
1048
  comments: CommentConnection;
1042
- /** Count of comments. */
1049
+ /** Count of comments. Limited to a maximum of 10000 by default. */
1043
1050
  commentsCount?: Maybe<Count>;
1044
1051
  /** The date and time (ISO 8601 format) when the article was created. */
1045
1052
  createdAt: Scalars['DateTime']['output'];
@@ -1174,7 +1181,7 @@ type Blog = HasEvents & HasMetafieldDefinitions & HasMetafields & HasPublishedTr
1174
1181
  __typename?: 'Blog';
1175
1182
  /** List of the blog's articles. */
1176
1183
  articles: ArticleConnection;
1177
- /** Count of articles. */
1184
+ /** Count of articles. Limited to a maximum of 10000 by default. */
1178
1185
  articlesCount?: Maybe<Count>;
1179
1186
  /** Indicates whether readers can post comments to the blog and if comments are moderated or not. */
1180
1187
  commentPolicy: CommentPolicy;
@@ -1262,6 +1269,8 @@ type BusinessEntity = Node & {
1262
1269
  __typename?: 'BusinessEntity';
1263
1270
  /** The address of the merchant's Business Entity. */
1264
1271
  address: BusinessEntityAddress;
1272
+ /** Whether the Business Entity is archived from the shop. */
1273
+ archived: Scalars['Boolean']['output'];
1265
1274
  /** The name of the company associated with the merchant's Business Entity. */
1266
1275
  companyName?: Maybe<Scalars['String']['output']>;
1267
1276
  /** The display name of the merchant's Business Entity. */
@@ -1531,9 +1540,11 @@ declare enum CatalogStatus {
1531
1540
  Draft = "DRAFT"
1532
1541
  }
1533
1542
  /**
1534
- * An authenticated link to an external platform that supports syndication and optionally order ingestion, such as Facebook, Pinterest, an online store, or Point of Sale (POS).
1543
+ * A connection between a Shopify shop and an external selling platform that supports product syndication and optionally order ingestion. Each channel binds a merchant's account on a specific platform — such as Amazon, eBay, Google, or a point-of-sale system — to the shop, establishing the publishing destination for product feeds.
1535
1544
  *
1536
- * Each channel provides access to its underlying [`App`](https://shopify.dev/docs/api/admin-graphql/latest/objects/App), published products and collections, and [`Publication`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication) settings, as well as what features of the platform it supports such as [scheduled publishing](https://shopify.dev/docs/apps/build/sales-channels/scheduled-product-publishing). Use channels to manage where catalog items appear, track publication status across platforms, and control [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) visibility for different customer touchpoints.
1545
+ * Sales Channel applications use [`channelCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/channelCreate) to establish channels after merchant authentication, and can manage multiple channel connections per app. Each channel is bound to a channel specification that declares the platform's regional coverage, capabilities, and requirements.
1546
+ *
1547
+ * Use channels to manage where catalog items are syndicated, track publication status across platforms, and control [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) visibility for different selling destinations.
1537
1548
  */
1538
1549
  type Channel = Node & {
1539
1550
  __typename?: 'Channel';
@@ -1543,7 +1554,7 @@ type Channel = Node & {
1543
1554
  collectionPublicationsV3: ResourcePublicationConnection;
1544
1555
  /** The list of collections published to the channel. */
1545
1556
  collections: CollectionConnection;
1546
- /** The unique identifier for the channel. */
1557
+ /** A unique, human-readable identifier for the channel within the shop. Set during [`channelCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/channelCreate) or auto-generated from the specification handle and account ID. Use with [`channelByHandle`](https://shopify.dev/docs/api/admin-graphql/latest/queries/channelByHandle) for lookups. */
1547
1558
  handle: Scalars['String']['output'];
1548
1559
  /** Whether the collection is available to the channel. */
1549
1560
  hasCollection: Scalars['Boolean']['output'];
@@ -1631,6 +1642,8 @@ type ChannelInformation = Node & {
1631
1642
  channelDefinition?: Maybe<ChannelDefinition>;
1632
1643
  /** The unique ID for the channel. */
1633
1644
  channelId: Scalars['ID']['output'];
1645
+ /** The publishing destination display name or channel name. */
1646
+ displayName?: Maybe<Scalars['String']['output']>;
1634
1647
  /** A globally-unique ID. */
1635
1648
  id: Scalars['ID']['output'];
1636
1649
  };
@@ -3437,6 +3450,18 @@ declare enum CurrencyCode {
3437
3450
  /** Zambian Kwacha (ZMW). */
3438
3451
  Zmw = "ZMW"
3439
3452
  }
3453
+ /** Represents a currency exchange adjustment applied to an order transaction. */
3454
+ type CurrencyExchangeAdjustment = Node & {
3455
+ __typename?: 'CurrencyExchangeAdjustment';
3456
+ /** The adjustment amount in both shop and presentment currencies. */
3457
+ adjustment: MoneyV2;
3458
+ /** The final amount in both shop and presentment currencies after the adjustment. */
3459
+ finalAmountSet: MoneyV2;
3460
+ /** A globally-unique ID. */
3461
+ id: Scalars['ID']['output'];
3462
+ /** The original amount in both shop and presentment currencies before the adjustment. */
3463
+ originalAmountSet: MoneyV2;
3464
+ };
3440
3465
  /** Currency formats configured for the merchant. These formats are available to use within Liquid. */
3441
3466
  type CurrencyFormats = {
3442
3467
  __typename?: 'CurrencyFormats';
@@ -3458,6 +3483,8 @@ type CurrencySetting = {
3458
3483
  currencyName: Scalars['String']['output'];
3459
3484
  /** Whether the currency is enabled or not. An enabled currency setting is visible to buyers and allows orders to be generated with that currency as presentment. */
3460
3485
  enabled: Scalars['Boolean']['output'];
3486
+ /** The manual rate, if enabled, that applies to this currency when converting from shop currency. This rate is specific to the associated market's currency setting. */
3487
+ manualRate?: Maybe<Scalars['Decimal']['output']>;
3461
3488
  /** The date and time when the active exchange rate for the currency was last modified. It can be the automatic rate's creation date, or the manual rate's last updated at date if active. */
3462
3489
  rateUpdatedAt?: Maybe<Scalars['DateTime']['output']>;
3463
3490
  };
@@ -6942,6 +6969,8 @@ type DraftOrderPlatformDiscount = {
6942
6969
  * @deprecated Use `discountClasses` instead.
6943
6970
  */
6944
6971
  discountClass: DiscountClass;
6972
+ /** The discount classes. */
6973
+ discountClasses: Array<DiscountClass>;
6945
6974
  /** The discount node for the platform discount. */
6946
6975
  discountNode?: Maybe<DiscountNode>;
6947
6976
  /** The ID of the discount. */
@@ -7071,6 +7100,18 @@ type ExchangeLineItem = Node & {
7071
7100
  * @deprecated Use `lineItems` instead.
7072
7101
  */
7073
7102
  lineItem?: Maybe<LineItem>;
7103
+ /** The order line items for the exchange. */
7104
+ lineItems?: Maybe<Array<LineItem>>;
7105
+ /** The quantity of the exchange item that can be processed. */
7106
+ processableQuantity: Scalars['Int']['output'];
7107
+ /** The quantity of the exchange item that have been processed. */
7108
+ processedQuantity: Scalars['Int']['output'];
7109
+ /** The number of units ordered, including refunded and removed units. */
7110
+ quantity: Scalars['Int']['output'];
7111
+ /** The quantity of the exchange item that haven't been processed. */
7112
+ unprocessedQuantity: Scalars['Int']['output'];
7113
+ /** The ID of the variant at time of return creation. */
7114
+ variantId?: Maybe<Scalars['ID']['output']>;
7074
7115
  };
7075
7116
  /** An auto-generated type for paginating through multiple ExchangeLineItems. */
7076
7117
  type ExchangeLineItemConnection = {
@@ -9138,6 +9179,12 @@ type Image = HasMetafields & {
9138
9179
  * @deprecated Use `url` instead.
9139
9180
  */
9140
9181
  src: Scalars['URL']['output'];
9182
+ /**
9183
+ * The ThumbHash of the image.
9184
+ *
9185
+ * Useful to display placeholder images while the original image is loading.
9186
+ */
9187
+ thumbhash?: Maybe<Scalars['String']['output']>;
9141
9188
  /**
9142
9189
  * The location of the transformed image as a URL.
9143
9190
  *
@@ -9418,6 +9465,12 @@ type InventoryScheduledChangeEdge = {
9418
9465
  /** The item at the end of InventoryScheduledChangeEdge. */
9419
9466
  node: InventoryScheduledChange;
9420
9467
  };
9468
+ /** The financial transfer details for a return outcome that results in an invoice. */
9469
+ type InvoiceReturnOutcome = {
9470
+ __typename?: 'InvoiceReturnOutcome';
9471
+ /** The total monetary value to be invoiced in shop and presentment currencies. */
9472
+ amount: MoneyBag;
9473
+ };
9421
9474
  /**
9422
9475
  * Interoperability metadata for types that directly correspond to a REST Admin API resource.
9423
9476
  * For example, on the Product type, LegacyInteroperability returns metadata for the corresponding [Product object](https://shopify.dev/api/admin-graphql/latest/objects/product) in the REST Admin API.
@@ -9645,6 +9698,8 @@ type LineItemGroup = Node & {
9645
9698
  customAttributes: Array<Attribute>;
9646
9699
  /** A globally-unique ID. */
9647
9700
  id: Scalars['ID']['output'];
9701
+ /** ID of the product of the line item group. */
9702
+ productId?: Maybe<Scalars['ID']['output']>;
9648
9703
  /** Quantity of the line item group on the order. */
9649
9704
  quantity: Scalars['Int']['output'];
9650
9705
  /** Title of the line item group. */
@@ -10368,6 +10423,8 @@ type MarketCurrencySettings = {
10368
10423
  * in the market's base currency.
10369
10424
  */
10370
10425
  localCurrencies: Scalars['Boolean']['output'];
10426
+ /** Whether or not rounding is enabled on multi-currency prices. */
10427
+ roundingEnabled: Scalars['Boolean']['output'];
10371
10428
  };
10372
10429
  /** An auto-generated type which holds one Market and a cursor during pagination. */
10373
10430
  type MarketEdge = {
@@ -10995,28 +11052,9 @@ type MetafieldAccess = {
10995
11052
  admin?: Maybe<MetafieldAdminAccess>;
10996
11053
  /** The access permitted on the Customer Account API. */
10997
11054
  customerAccount: MetafieldCustomerAccountAccess;
10998
- /**
10999
- * The explicit grants for this metafield definition, superseding the default admin access
11000
- * for the specified grantees.
11001
- * @deprecated Explicit grants are [deprecated](https://shopify.dev/changelog/deprecating-explicit-access-grants-for-app-owned-metafields).
11002
- * This will be removed in 2025-07.
11003
- */
11004
- grants: Array<MetafieldAccessGrant>;
11005
11055
  /** The access permitted on the Storefront API. */
11006
11056
  storefront?: Maybe<MetafieldStorefrontAccess>;
11007
11057
  };
11008
- /**
11009
- * An explicit access grant for the metafields under this definition.
11010
- *
11011
- * Explicit grants are [deprecated](https://shopify.dev/changelog/deprecating-explicit-access-grants-for-app-owned-metafields).
11012
- */
11013
- type MetafieldAccessGrant = {
11014
- __typename?: 'MetafieldAccessGrant';
11015
- /** The level of access the grantee has. */
11016
- access: MetafieldGrantAccessLevel;
11017
- /** The grantee being granted access. */
11018
- grantee: Scalars['String']['output'];
11019
- };
11020
11058
  /** Metafield access permissions for the Admin API. */
11021
11059
  declare enum MetafieldAdminAccess {
11022
11060
  /** The merchant has read-only access. No other apps have access. */
@@ -11283,13 +11321,6 @@ type MetafieldEdge = {
11283
11321
  /** The item at the end of MetafieldEdge. */
11284
11322
  node: Metafield;
11285
11323
  };
11286
- /** Possible access levels for explicit metafield access grants. */
11287
- declare enum MetafieldGrantAccessLevel {
11288
- /** Read metafield access. */
11289
- Read = "READ",
11290
- /** Read and write metafield access. */
11291
- ReadWrite = "READ_WRITE"
11292
- }
11293
11324
  /**
11294
11325
  * The input fields to use to create or update a metafield through a mutation on the owning resource.
11295
11326
  * An alternative way to create or update a metafield is by using the
@@ -12034,6 +12065,13 @@ type MoneyBag = {
12034
12065
  /** Amount in shop currency. */
12035
12066
  shopMoney: MoneyV2;
12036
12067
  };
12068
+ /** The input fields for a monetary value with currency. */
12069
+ type MoneyInput = {
12070
+ /** Decimal money amount. */
12071
+ amount: Scalars['Decimal']['input'];
12072
+ /** Currency of the money. */
12073
+ currencyCode: CurrencyCode;
12074
+ };
12037
12075
  /** A precise monetary value and its associated currency. Combines a decimal amount with a three-letter currency code to express prices, costs, and other financial values throughout the API. For example, 12.99 USD. */
12038
12076
  type MoneyV2 = {
12039
12077
  __typename?: 'MoneyV2';
@@ -12399,6 +12437,8 @@ type Order = CommentEventSubject & HasEvents & HasLocalizationExtensions & HasLo
12399
12437
  * Commonly used for special delivery instructions, gift messages, or internal processing notes.
12400
12438
  */
12401
12439
  note?: Maybe<Scalars['String']['output']>;
12440
+ /** The order number used to generate the name using the store's configured order number prefix/suffix. This number isn't guaranteed to follow a consecutive integer sequence (e.g. 1, 2, 3..), nor is it guaranteed to be unique across multiple stores, or even for a single store. */
12441
+ number: Scalars['Int']['output'];
12402
12442
  /**
12403
12443
  * The total amount of all additional fees, such as import fees or taxes, that were applied when an order was created.
12404
12444
  * Returns `null` if additional fees aren't applicable.
@@ -12834,7 +12874,15 @@ declare enum OrderCancelUserErrorCode {
12834
12874
  /** The record with the ID used as the input value couldn't be found. */
12835
12875
  NotFound = "NOT_FOUND",
12836
12876
  /** An order refund was requested but the user does not have the refund_orders permission. */
12837
- NoRefundPermission = "NO_REFUND_PERMISSION"
12877
+ NoRefundPermission = "NO_REFUND_PERMISSION",
12878
+ /** An order refund was requested but the user does not have the refund_to_store_credit permission. */
12879
+ NoRefundToStoreCreditPermission = "NO_REFUND_TO_STORE_CREDIT_PERMISSION",
12880
+ /** A store credit order refund was requested but the order is a B2B order. */
12881
+ StoreCreditRefundB2BNotSupported = "STORE_CREDIT_REFUND_B2B_NOT_SUPPORTED",
12882
+ /** A store credit order refund was requested but the expiration date is in the past. */
12883
+ StoreCreditRefundExpirationInPast = "STORE_CREDIT_REFUND_EXPIRATION_IN_PAST",
12884
+ /** A store credit order refund was requested but the order has no customer. */
12885
+ StoreCreditRefundMissingCustomer = "STORE_CREDIT_REFUND_MISSING_CUSTOMER"
12838
12886
  }
12839
12887
  /** Details about the order cancellation. */
12840
12888
  type OrderCancellation = {
@@ -13066,6 +13114,10 @@ type OrderTransaction = Node & {
13066
13114
  authorizationExpiresAt?: Maybe<Scalars['DateTime']['output']>;
13067
13115
  /** Date and time when the transaction was created. */
13068
13116
  createdAt: Scalars['DateTime']['output'];
13117
+ /** An adjustment on the transaction showing the amount lost or gained due to fluctuations in the currency exchange rate. */
13118
+ currencyExchangeAdjustment?: Maybe<CurrencyExchangeAdjustment>;
13119
+ /** The Shopify Point of Sale device used to process the transaction. */
13120
+ device?: Maybe<PointOfSaleDevice>;
13069
13121
  /** A standardized error code, independent of the payment provider. */
13070
13122
  errorCode?: Maybe<OrderTransactionErrorCode>;
13071
13123
  /** The transaction fees charged on the order transaction. Only present for Shopify Payments transactions. */
@@ -13078,6 +13130,8 @@ type OrderTransaction = Node & {
13078
13130
  id: Scalars['ID']['output'];
13079
13131
  /** The kind of transaction. */
13080
13132
  kind: OrderTransactionKind;
13133
+ /** The physical location where the transaction was processed. */
13134
+ location?: Maybe<Location>;
13081
13135
  /** Whether the transaction is processed by manual payment gateway. */
13082
13136
  manualPaymentGateway: Scalars['Boolean']['output'];
13083
13137
  /** Whether the transaction can be manually captured. */
@@ -13382,7 +13436,7 @@ type PaymentCustomization = HasMetafieldDefinitions & HasMetafields & Node & {
13382
13436
  title: Scalars['String']['output'];
13383
13437
  };
13384
13438
  /** Payment details related to a transaction. */
13385
- type PaymentDetails = CardPaymentDetails | LocalPaymentMethodsPaymentDetails | ShopPayInstallmentsPaymentDetails;
13439
+ type PaymentDetails = CardPaymentDetails | LocalPaymentMethodsPaymentDetails | PaypalWalletPaymentDetails | ShopPayInstallmentsPaymentDetails;
13386
13440
  /** All possible instrument outputs for Payment Mandates. */
13387
13441
  type PaymentInstrument = VaultCreditCard | VaultPaypalBillingAgreement;
13388
13442
  /**
@@ -13534,6 +13588,18 @@ declare enum PaypalExpressSubscriptionsGatewayStatus {
13534
13588
  /** The status is pending. */
13535
13589
  Pending = "PENDING"
13536
13590
  }
13591
+ /** PayPal Wallet payment details related to a transaction. */
13592
+ type PaypalWalletPaymentDetails = BasePaymentDetails & {
13593
+ __typename?: 'PaypalWalletPaymentDetails';
13594
+ /** The name of payment method used by the buyer. */
13595
+ paymentMethodName?: Maybe<Scalars['String']['output']>;
13596
+ };
13597
+ /** Represents a mobile device that Shopify Point of Sale has been installed on. */
13598
+ type PointOfSaleDevice = Node & {
13599
+ __typename?: 'PointOfSaleDevice';
13600
+ /** A globally-unique ID. */
13601
+ id: Scalars['ID']['output'];
13602
+ };
13537
13603
  /**
13538
13604
  * A list that defines pricing for [product variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant). Price lists override default product prices with either fixed prices or percentage-based adjustments.
13539
13605
  *
@@ -13861,6 +13927,18 @@ type Product = HasEvents & HasMetafieldDefinitions & HasMetafields & HasPublishe
13861
13927
  * @deprecated Use `category` instead.
13862
13928
  */
13863
13929
  productCategory?: Maybe<ProductCategory>;
13930
+ /**
13931
+ * A list of products that contain at least one variant associated with
13932
+ * at least one of the current products' variants via group relationship.
13933
+ */
13934
+ productComponents: ProductComponentTypeConnection;
13935
+ /**
13936
+ * A count of unique products that contain at least one variant associated with
13937
+ * at least one of the current products' variants via group relationship.
13938
+ */
13939
+ productComponentsCount?: Maybe<Count>;
13940
+ /** A list of products that has a variant that contains any of this product's variants as a component. */
13941
+ productParents: ProductConnection;
13864
13942
  /**
13865
13943
  * A list of the channels where the product is published.
13866
13944
  * @deprecated Use `resourcePublications` instead.
@@ -14151,6 +14229,38 @@ type ProductCompareAtPriceRange = {
14151
14229
  /** The lowest variant's compare-at price. */
14152
14230
  minVariantCompareAtPrice: MoneyV2;
14153
14231
  };
14232
+ /** The product component information. */
14233
+ type ProductComponentType = {
14234
+ __typename?: 'ProductComponentType';
14235
+ /** The list of products' variants that are components. */
14236
+ componentVariants: ProductVariantConnection;
14237
+ /** The number of component variants for the product component. */
14238
+ componentVariantsCount?: Maybe<Count>;
14239
+ /** The list of products' variants that are not components. */
14240
+ nonComponentVariants: ProductVariantConnection;
14241
+ /** The number of non_components variants for the product component. */
14242
+ nonComponentVariantsCount?: Maybe<Count>;
14243
+ /** The product that's a component. */
14244
+ product: Product;
14245
+ };
14246
+ /** An auto-generated type for paginating through multiple ProductComponentTypes. */
14247
+ type ProductComponentTypeConnection = {
14248
+ __typename?: 'ProductComponentTypeConnection';
14249
+ /** The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. */
14250
+ edges: Array<ProductComponentTypeEdge>;
14251
+ /** A list of nodes that are contained in ProductComponentTypeEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. */
14252
+ nodes: Array<ProductComponentType>;
14253
+ /** An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. */
14254
+ pageInfo: PageInfo;
14255
+ };
14256
+ /** An auto-generated type which holds one ProductComponentType and a cursor during pagination. */
14257
+ type ProductComponentTypeEdge = {
14258
+ __typename?: 'ProductComponentTypeEdge';
14259
+ /** The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). */
14260
+ cursor: Scalars['String']['output'];
14261
+ /** The item at the end of ProductComponentTypeEdge. */
14262
+ node: ProductComponentType;
14263
+ };
14154
14264
  /** An auto-generated type for paginating through multiple Products. */
14155
14265
  type ProductConnection = {
14156
14266
  __typename?: 'ProductConnection';
@@ -14397,6 +14507,8 @@ type ProductVariant$1 = HasEvents & HasMetafieldDefinitions & HasMetafields & Ha
14397
14507
  price: Scalars['Money']['output'];
14398
14508
  /** The product that this variant belongs to. */
14399
14509
  product: Product;
14510
+ /** A list of products that have product variants that contain this variant as a product component. */
14511
+ productParents: ProductConnection;
14400
14512
  /** A list of the product variant components. */
14401
14513
  productVariantComponents: ProductVariantComponentConnection;
14402
14514
  /**
@@ -14422,6 +14534,8 @@ type ProductVariant$1 = HasEvents & HasMetafieldDefinitions & HasMetafields & Ha
14422
14534
  sellingPlanGroups: SellingPlanGroupConnection;
14423
14535
  /** Count of selling plan groups associated with the product variant. */
14424
14536
  sellingPlanGroupsCount?: Maybe<Count>;
14537
+ /** Whether to show the unit price for this product variant. */
14538
+ showUnitPrice: Scalars['Boolean']['output'];
14425
14539
  /**
14426
14540
  * A case-sensitive identifier for the product variant in the shop.
14427
14541
  * Required in order to connect to a fulfillment service.
@@ -14445,6 +14559,8 @@ type ProductVariant$1 = HasEvents & HasMetafieldDefinitions & HasMetafields & Ha
14445
14559
  title: Scalars['String']['output'];
14446
14560
  /** The published translations associated with the resource. */
14447
14561
  translations: Array<Translation>;
14562
+ /** The unit price value for the variant based on the variant measurement. */
14563
+ unitPrice?: Maybe<MoneyV2>;
14448
14564
  /** The unit price measurement for the variant. */
14449
14565
  unitPriceMeasurement?: Maybe<UnitPriceMeasurement>;
14450
14566
  /** The date and time (ISO 8601 format) when the product variant was last modified. */
@@ -14507,6 +14623,8 @@ type ProductVariantContextualPricing = {
14507
14623
  quantityPriceBreaks: QuantityPriceBreakConnection;
14508
14624
  /** The quantity rule applied for a given context. */
14509
14625
  quantityRule: QuantityRule;
14626
+ /** The unit price value for the given context based on the variant measurement. */
14627
+ unitPrice?: Maybe<MoneyV2>;
14510
14628
  };
14511
14629
  /** An auto-generated type which holds one ProductVariant and a cursor during pagination. */
14512
14630
  type ProductVariantEdge = {
@@ -14583,10 +14701,14 @@ type ProductVariantsBulkInput = {
14583
14701
  * omitted from channels that don't support bundles.
14584
14702
  */
14585
14703
  requiresComponents?: InputMaybe<Scalars['Boolean']['input']>;
14704
+ /** Whether the unit price should be shown for this product variant. */
14705
+ showUnitPrice?: InputMaybe<Scalars['Boolean']['input']>;
14586
14706
  /** The tax code associated with the variant. */
14587
14707
  taxCode?: InputMaybe<Scalars['String']['input']>;
14588
14708
  /** Whether the variant is taxable. */
14589
14709
  taxable?: InputMaybe<Scalars['Boolean']['input']>;
14710
+ /** The unit price measurement for the product variant. */
14711
+ unitPriceMeasurement?: InputMaybe<UnitPriceMeasurementInput>;
14590
14712
  };
14591
14713
  /** Error codes for failed variant bulk update mutations. */
14592
14714
  type ProductVariantsBulkUpdateUserError = DisplayableError & {
@@ -15014,6 +15136,8 @@ type RefundEdge = {
15014
15136
  };
15015
15137
  /** The input fields to create a refund. */
15016
15138
  type RefundInput = {
15139
+ /** Whether to allow the total refunded amount to surpass the amount paid for the order. */
15140
+ allowOverRefunding?: InputMaybe<Scalars['Boolean']['input']>;
15017
15141
  /** The currency that is used to refund the order. This must be the presentment currency, which is the currency used by the customer. This is a required field for orders where the currency and presentment currency differ. */
15018
15142
  currency?: InputMaybe<CurrencyCode>;
15019
15143
  /** An optional reason for a discrepancy between calculated and actual refund amounts. */
@@ -15028,6 +15152,8 @@ type RefundInput = {
15028
15152
  refundDuties?: InputMaybe<Array<RefundDutyInput>>;
15029
15153
  /** A list of line items to refund. */
15030
15154
  refundLineItems?: InputMaybe<Array<RefundLineItemInput>>;
15155
+ /** A list of instructions to process the financial outcome of the refund. */
15156
+ refundMethods?: InputMaybe<Array<RefundMethodInput>>;
15031
15157
  /** The input fields that are required to reimburse shipping costs. */
15032
15158
  shipping?: InputMaybe<ShippingRefundInput>;
15033
15159
  /** A list of transactions involved in the refund. */
@@ -15114,6 +15240,21 @@ declare enum RefundLineItemRestockType {
15114
15240
  /** The refund line item was returned. Use this when restocking line items that were fulfilled. */
15115
15241
  Return = "RETURN"
15116
15242
  }
15243
+ /** The input fields for processing the financial outcome of a refund. */
15244
+ type RefundMethodInput = {
15245
+ /** The details of the refund to store credit. */
15246
+ storeCreditRefund?: InputMaybe<StoreCreditRefundInput>;
15247
+ };
15248
+ /** The financial transfer details for a return outcome that results in a refund. */
15249
+ type RefundReturnOutcome = {
15250
+ __typename?: 'RefundReturnOutcome';
15251
+ /** The total monetary value to be refunded in shop and presentment currencies. */
15252
+ amount: MoneyBag;
15253
+ /** A list of suggested refund methods. */
15254
+ suggestedRefundMethods: Array<SuggestedRefundMethod>;
15255
+ /** A list of suggested order transactions. */
15256
+ suggestedTransactions: Array<SuggestedOrderTransaction>;
15257
+ };
15117
15258
  /** A shipping line item that's included in a refund. */
15118
15259
  type RefundShippingLine = Node & {
15119
15260
  __typename?: 'RefundShippingLine';
@@ -15363,6 +15504,10 @@ type RestrictedForResource = {
15363
15504
  */
15364
15505
  type Return = Node & {
15365
15506
  __typename?: 'Return';
15507
+ /** The date and time when the return was closed. */
15508
+ closedAt?: Maybe<Scalars['DateTime']['output']>;
15509
+ /** The date and time when the return was created. */
15510
+ createdAt: Scalars['DateTime']['output'];
15366
15511
  /** Additional information about the declined return. */
15367
15512
  decline?: Maybe<ReturnDecline>;
15368
15513
  /** The exchange line items attached to the return. */
@@ -15375,6 +15520,8 @@ type Return = Node & {
15375
15520
  order: Order;
15376
15521
  /** The list of refunds associated with the return. */
15377
15522
  refunds: RefundConnection;
15523
+ /** The date and time when the return was approved. */
15524
+ requestApprovedAt?: Maybe<Scalars['DateTime']['output']>;
15378
15525
  /** The return line items attached to the return. */
15379
15526
  returnLineItems: ReturnLineItemTypeConnection;
15380
15527
  /** The return shipping fees for the return. */
@@ -15383,6 +15530,8 @@ type Return = Node & {
15383
15530
  reverseFulfillmentOrders: ReverseFulfillmentOrderConnection;
15384
15531
  /** The status of the return. */
15385
15532
  status: ReturnStatus;
15533
+ /** A suggested financial outcome for the return. */
15534
+ suggestedFinancialOutcome?: Maybe<SuggestedReturnFinancialOutcome>;
15386
15535
  /**
15387
15536
  * A suggested refund for the return.
15388
15537
  * @deprecated Use `suggestedFinancialOutcome` instead.
@@ -15435,6 +15584,10 @@ type ReturnLineItemType = {
15435
15584
  customerNote?: Maybe<Scalars['String']['output']>;
15436
15585
  /** A globally-unique ID. */
15437
15586
  id: Scalars['ID']['output'];
15587
+ /** The quantity that can be processed. */
15588
+ processableQuantity: Scalars['Int']['output'];
15589
+ /** The quantity that has been processed. */
15590
+ processedQuantity: Scalars['Int']['output'];
15438
15591
  /** The quantity being returned. */
15439
15592
  quantity: Scalars['Int']['output'];
15440
15593
  /** The quantity that can be refunded. */
@@ -15445,6 +15598,8 @@ type ReturnLineItemType = {
15445
15598
  returnReason: ReturnReason;
15446
15599
  /** Additional information about the reason for the return. Maximum length: 255 characters. */
15447
15600
  returnReasonNote: Scalars['String']['output'];
15601
+ /** The quantity that has't been processed. */
15602
+ unprocessedQuantity: Scalars['Int']['output'];
15448
15603
  };
15449
15604
  /** An auto-generated type for paginating through multiple ReturnLineItemTypes. */
15450
15605
  type ReturnLineItemTypeConnection = {
@@ -15464,6 +15619,8 @@ type ReturnLineItemTypeEdge = {
15464
15619
  /** The item at the end of ReturnLineItemTypeEdge. */
15465
15620
  node: ReturnLineItemType;
15466
15621
  };
15622
+ /** The financial transfer details for the return outcome. */
15623
+ type ReturnOutcomeFinancialTransfer = InvoiceReturnOutcome | RefundReturnOutcome;
15467
15624
  /** The reason for returning the return line item. */
15468
15625
  declare enum ReturnReason {
15469
15626
  /** The item is returned because the buyer did not like the color. Displays as **Color**. */
@@ -15638,6 +15795,8 @@ type ReverseFulfillmentOrderConnection = {
15638
15795
  /** The details of the arrangement of an item. */
15639
15796
  type ReverseFulfillmentOrderDisposition = Node & {
15640
15797
  __typename?: 'ReverseFulfillmentOrderDisposition';
15798
+ /** The date and time when the disposition was created. */
15799
+ createdAt: Scalars['DateTime']['output'];
15641
15800
  /** A globally-unique ID. */
15642
15801
  id: Scalars['ID']['output'];
15643
15802
  /** The location where the disposition occurred. */
@@ -16552,7 +16711,7 @@ type ShippingRefundInput = {
16552
16711
  *
16553
16712
  * Includes core business details like the shop name, contact emails, billing address, and currency settings. The shop configuration determines customer account requirements, available sales channels, enabled features, payment settings, and policy documents. Also provides access to shop-level resources such as staff members, fulfillment services, navigation settings, and storefront access tokens.
16554
16713
  */
16555
- type Shop = HasMetafields & HasPublishedTranslations & Node & {
16714
+ type Shop = HasMetafieldDefinitions & HasMetafields & HasPublishedTranslations & Node & {
16556
16715
  __typename?: 'Shop';
16557
16716
  /** Account owner information. */
16558
16717
  accountOwner: StaffMember;
@@ -16702,6 +16861,11 @@ type Shop = HasMetafields & HasPublishedTranslations & Node & {
16702
16861
  * for the purposes of adding and storing additional information.
16703
16862
  */
16704
16863
  metafield?: Maybe<Metafield>;
16864
+ /**
16865
+ * List of metafield definitions.
16866
+ * @deprecated This field will be removed in a future version. Use `QueryRoot.metafieldDefinitions` instead.
16867
+ */
16868
+ metafieldDefinitions: MetafieldDefinitionConnection;
16705
16869
  /**
16706
16870
  * A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data)
16707
16871
  * that a merchant associates with a Shopify resource.
@@ -17045,6 +17209,8 @@ type ShopPlan = {
17045
17209
  displayName: Scalars['String']['output'];
17046
17210
  /** Whether the shop is a partner development shop for testing purposes. */
17047
17211
  partnerDevelopment: Scalars['Boolean']['output'];
17212
+ /** The public display name of the shop's billing plan. Possible values are: Advanced, Agentic, Agentic Enterprise, Basic, Development, Grow, Inactive, Lite, Other, Paused, Plus, Plus Trial, Retail, Shop Component, Shopify Finance, Staff Business, Starter, and Trial. */
17213
+ publicDisplayName: Scalars['String']['output'];
17048
17214
  /** Whether the shop has a Shopify Plus subscription. */
17049
17215
  shopifyPlus: Scalars['Boolean']['output'];
17050
17216
  };
@@ -17645,6 +17811,8 @@ declare enum ShopifyPaymentsTransactionType {
17645
17811
  ApplicationFeeRefund = "APPLICATION_FEE_REFUND",
17646
17812
  /** The balance_transfer_inbound transaction type. */
17647
17813
  BalanceTransferInbound = "BALANCE_TRANSFER_INBOUND",
17814
+ /** The balance_transfer_outbound transaction type. */
17815
+ BalanceTransferOutbound = "BALANCE_TRANSFER_OUTBOUND",
17648
17816
  /** The billing_debit transaction type. */
17649
17817
  BillingDebit = "BILLING_DEBIT",
17650
17818
  /** The billing_debit_reversal transaction type. */
@@ -18173,6 +18341,13 @@ type StoreCreditAccountTransactionEdge = {
18173
18341
  };
18174
18342
  /** The origin of a store credit account transaction. */
18175
18343
  type StoreCreditAccountTransactionOrigin = OrderTransaction;
18344
+ /** The input fields to process a refund to store credit. */
18345
+ type StoreCreditRefundInput = {
18346
+ /** The amount to be issued as store credit. */
18347
+ amount: MoneyInput;
18348
+ /** An optional expiration date for the store credit being issued. */
18349
+ expiresAt?: InputMaybe<Scalars['DateTime']['input']>;
18350
+ };
18176
18351
  /** The event that caused the store credit account transaction. */
18177
18352
  declare enum StoreCreditSystemEvent {
18178
18353
  /** An adjustment was made to the store credit account. */
@@ -18593,7 +18768,7 @@ type SubscriptionDeliveryMethod = SubscriptionDeliveryMethodLocalDelivery | Subs
18593
18768
  type SubscriptionDeliveryMethodLocalDelivery = {
18594
18769
  __typename?: 'SubscriptionDeliveryMethodLocalDelivery';
18595
18770
  /** The address to deliver to. */
18596
- address: SubscriptionMailingAddress;
18771
+ address: MailingAddress;
18597
18772
  /** The details of the local delivery method to use. */
18598
18773
  localDeliveryOption: SubscriptionDeliveryMethodLocalDeliveryOption;
18599
18774
  };
@@ -18640,7 +18815,7 @@ type SubscriptionDeliveryMethodPickupOption = {
18640
18815
  type SubscriptionDeliveryMethodShipping = {
18641
18816
  __typename?: 'SubscriptionDeliveryMethodShipping';
18642
18817
  /** The address to ship to. */
18643
- address: SubscriptionMailingAddress;
18818
+ address: MailingAddress;
18644
18819
  /** The details of the shipping method to use. */
18645
18820
  shippingOption: SubscriptionDeliveryMethodShippingOption;
18646
18821
  };
@@ -18813,44 +18988,6 @@ type SubscriptionLineEdge = {
18813
18988
  /** The item at the end of SubscriptionLineEdge. */
18814
18989
  node: SubscriptionLine;
18815
18990
  };
18816
- /** Represents a Mailing Address on a Subscription. */
18817
- type SubscriptionMailingAddress = {
18818
- __typename?: 'SubscriptionMailingAddress';
18819
- /** The first line of the address. Typically the street address or PO Box number. */
18820
- address1?: Maybe<Scalars['String']['output']>;
18821
- /** The second line of the address. Typically the number of the apartment, suite, or unit. */
18822
- address2?: Maybe<Scalars['String']['output']>;
18823
- /** The name of the city, district, village, or town. */
18824
- city?: Maybe<Scalars['String']['output']>;
18825
- /** The name of the customer's company or organization. */
18826
- company?: Maybe<Scalars['String']['output']>;
18827
- /** The name of the country. */
18828
- country?: Maybe<Scalars['String']['output']>;
18829
- /**
18830
- * The two-letter code for the country of the address.
18831
- *
18832
- * For example, US.
18833
- */
18834
- countryCode?: Maybe<CountryCode>;
18835
- /** The first name of the customer. */
18836
- firstName?: Maybe<Scalars['String']['output']>;
18837
- /** The last name of the customer. */
18838
- lastName?: Maybe<Scalars['String']['output']>;
18839
- /** The full name of the customer, based on firstName and lastName. */
18840
- name?: Maybe<Scalars['String']['output']>;
18841
- /** A unique phone number for the customer. Formatted using E.164 standard. For example, _+16135551111_. */
18842
- phone?: Maybe<Scalars['String']['output']>;
18843
- /** The region of the address, such as the province, state, or district. */
18844
- province?: Maybe<Scalars['String']['output']>;
18845
- /**
18846
- * The alphanumeric code for the region.
18847
- *
18848
- * For example, ON.
18849
- */
18850
- provinceCode?: Maybe<Scalars['String']['output']>;
18851
- /** The zip or postal code of the address. */
18852
- zip?: Maybe<Scalars['String']['output']>;
18853
- };
18854
18991
  /** Custom subscription discount. */
18855
18992
  type SubscriptionManualDiscount = {
18856
18993
  __typename?: 'SubscriptionManualDiscount';
@@ -18975,6 +19112,8 @@ type SuggestedRefund$1 = {
18975
19112
  subtotal: Scalars['Money']['output'];
18976
19113
  /** The sum of all the prices of the line items being refunded in shop and presentment currencies. */
18977
19114
  subtotalSet: MoneyBag;
19115
+ /** A list of suggested refund methods. */
19116
+ suggestedRefundMethods: Array<SuggestedRefundMethod>;
18978
19117
  /** A list of suggested order transactions. */
18979
19118
  suggestedTransactions: Array<SuggestedOrderTransaction>;
18980
19119
  /** The total cart discount amount that was applied to all line items in this refund. */
@@ -18989,6 +19128,35 @@ type SuggestedRefund$1 = {
18989
19128
  */
18990
19129
  totalTaxes: Scalars['Money']['output'];
18991
19130
  };
19131
+ /** Generic attributes of a suggested refund method. */
19132
+ type SuggestedRefundMethod = {
19133
+ /** The suggested amount to refund in shop and presentment currencies. */
19134
+ amount: MoneyBag;
19135
+ /** The maximum available amount to refund in shop and presentment currencies. */
19136
+ maximumRefundable: MoneyBag;
19137
+ };
19138
+ /** Represents a return financial outcome suggested by Shopify based on the items being reimbursed. You can then use the suggested outcome object to generate an actual refund or invoice for the return. */
19139
+ type SuggestedReturnFinancialOutcome = {
19140
+ __typename?: 'SuggestedReturnFinancialOutcome';
19141
+ /** The sum of all the discounted prices of the line items being refunded. */
19142
+ discountedSubtotal: MoneyBag;
19143
+ /** The financial transfer details for the return outcome. */
19144
+ financialTransfer?: Maybe<ReturnOutcomeFinancialTransfer>;
19145
+ /** The total monetary value available to refund in shop and presentment currencies. */
19146
+ maximumRefundable: MoneyBag;
19147
+ /** A list of duties to be refunded from the order. */
19148
+ refundDuties: Array<RefundDuty>;
19149
+ /** The shipping costs to be refunded from the order. */
19150
+ shipping: ShippingRefund;
19151
+ /** The sum of all the additional fees being refunded in shop and presentment currencies. The value must be positive. */
19152
+ totalAdditionalFees: MoneyBag;
19153
+ /** The total cart discount amount that was applied to all line items in this refund. */
19154
+ totalCartDiscountAmount: MoneyBag;
19155
+ /** The sum of all the duties being refunded from the order in shop and presentment currencies. The value must be positive. */
19156
+ totalDuties: MoneyBag;
19157
+ /** The sum of the taxes being refunded in shop and presentment currencies. The value must be positive. */
19158
+ totalTax: MoneyBag;
19159
+ };
18992
19160
  /** Represents a return refund suggested by Shopify based on the items being reimbursed. You can then use the suggested refund object to generate an actual refund for the return. */
18993
19161
  type SuggestedReturnRefund = {
18994
19162
  __typename?: 'SuggestedReturnRefund';
@@ -19365,12 +19533,27 @@ type UnitPriceMeasurement = {
19365
19533
  /** The reference value for the unit price measurement. */
19366
19534
  referenceValue: Scalars['Int']['output'];
19367
19535
  };
19536
+ /** The input fields for the measurement used to calculate a unit price for a product variant (e.g. $9.99 / 100ml). */
19537
+ type UnitPriceMeasurementInput = {
19538
+ /** The quantity unit for the unit price measurement. */
19539
+ quantityUnit?: InputMaybe<UnitPriceMeasurementMeasuredUnit>;
19540
+ /** The quantity value for the unit price measurement. */
19541
+ quantityValue?: InputMaybe<Scalars['Float']['input']>;
19542
+ /** The reference unit for the unit price measurement. */
19543
+ referenceUnit?: InputMaybe<UnitPriceMeasurementMeasuredUnit>;
19544
+ /** The reference value for the unit price measurement. */
19545
+ referenceValue?: InputMaybe<Scalars['Int']['input']>;
19546
+ };
19368
19547
  /** The accepted types of unit of measurement. */
19369
19548
  declare enum UnitPriceMeasurementMeasuredType {
19370
19549
  /** Unit of measurements representing areas. */
19371
19550
  Area = "AREA",
19551
+ /** Unit of measurements representing counts. */
19552
+ Count = "COUNT",
19372
19553
  /** Unit of measurements representing lengths. */
19373
19554
  Length = "LENGTH",
19555
+ /** The type of measurement is unknown. Upgrade to the latest version of the API to resolve this type. */
19556
+ Unknown = "UNKNOWN",
19374
19557
  /** Unit of measurements representing volumes. */
19375
19558
  Volume = "VOLUME",
19376
19559
  /** Unit of measurements representing weights. */
@@ -19382,12 +19565,26 @@ declare enum UnitPriceMeasurementMeasuredUnit {
19382
19565
  Cl = "CL",
19383
19566
  /** 100 centimeters equals 1 meter. */
19384
19567
  Cm = "CM",
19568
+ /** Imperial system unit of volume (U.S. customary unit). */
19569
+ Floz = "FLOZ",
19570
+ /** 1 foot equals 12 inches. */
19571
+ Ft = "FT",
19572
+ /** Imperial system unit of area. */
19573
+ Ft2 = "FT2",
19385
19574
  /** Metric system unit of weight. */
19386
19575
  G = "G",
19576
+ /** 1 gallon equals 128 fluid ounces (U.S. customary unit). */
19577
+ Gal = "GAL",
19578
+ /** Imperial system unit of length. */
19579
+ In = "IN",
19580
+ /** 1 item, a unit of count. */
19581
+ Item = "ITEM",
19387
19582
  /** 1 kilogram equals 1000 grams. */
19388
19583
  Kg = "KG",
19389
19584
  /** Metric system unit of volume. */
19390
19585
  L = "L",
19586
+ /** Imperial system unit of weight. */
19587
+ Lb = "LB",
19391
19588
  /** Metric system unit of length. */
19392
19589
  M = "M",
19393
19590
  /** Metric system unit of area. */
@@ -19399,7 +19596,17 @@ declare enum UnitPriceMeasurementMeasuredUnit {
19399
19596
  /** 1000 milliliters equals 1 liter. */
19400
19597
  Ml = "ML",
19401
19598
  /** 1000 millimeters equals 1 meter. */
19402
- Mm = "MM"
19599
+ Mm = "MM",
19600
+ /** 16 ounces equals 1 pound. */
19601
+ Oz = "OZ",
19602
+ /** 1 pint equals 16 fluid ounces (U.S. customary unit). */
19603
+ Pt = "PT",
19604
+ /** 1 quart equals 32 fluid ounces (U.S. customary unit). */
19605
+ Qt = "QT",
19606
+ /** The unit of measurement is unknown. Upgrade to the latest version of the API to resolve this unit. */
19607
+ Unknown = "UNKNOWN",
19608
+ /** 1 yard equals 36 inches. */
19609
+ Yd = "YD"
19403
19610
  }
19404
19611
  /** Systems of weights and measures. */
19405
19612
  declare enum UnitSystem {
@@ -19607,6 +19814,7 @@ type CreateRefundResult = {
19607
19814
  *
19608
19815
  * @param orderId - The order ID (numeric, bigint, or GID string)
19609
19816
  * @param options - Refund configuration options
19817
+ * @param retries - Number of retries on transient errors. Defaults to 0; refunds are not retried by default to avoid double refunds.
19610
19818
  * @returns Promise resolving to the created refund
19611
19819
  * @throws {ShopifyUserError} When the mutation fails
19612
19820
  * @throws {Error} When GraphQL errors occur
@@ -19624,7 +19832,7 @@ type CreateRefundResult = {
19624
19832
  * ]
19625
19833
  * })
19626
19834
  */
19627
- declare function createRefund(orderId: number | bigint | string, options?: CreateRefundOptions): Promise<CreateRefundResult>;
19835
+ declare function createRefund(orderId: number | bigint | string, options?: CreateRefundOptions, retries?: number): Promise<CreateRefundResult>;
19628
19836
 
19629
19837
  type VariantUpdateInput = Omit<ProductVariantsBulkInput, 'id'> & {
19630
19838
  id: string;
@@ -19638,10 +19846,11 @@ type BulkUpdateProductVariantsResult = {
19638
19846
  *
19639
19847
  * @param productId - The product GID
19640
19848
  * @param variants - Array of variant updates (id required, plus fields to update)
19849
+ * @param retries - Number of retries on transient errors. Defaults to 1; safe because update is idempotent for the same input.
19641
19850
  * @returns Array of updated variants with id and sku
19642
19851
  * @throws {ShopifyUserError} When the mutation fails
19643
19852
  */
19644
- declare function bulkUpdateProductVariants(productId: string, variants: VariantUpdateInput[]): Promise<BulkUpdateProductVariantsResult[]>;
19853
+ declare function bulkUpdateProductVariants(productId: string, variants: VariantUpdateInput[], retries?: number): Promise<BulkUpdateProductVariantsResult[]>;
19645
19854
 
19646
19855
  type UpsertMetaobjectInput = {
19647
19856
  type: string;
@@ -19661,11 +19870,12 @@ type UpsertMetaobjectResult = {
19661
19870
  * Creates or updates a metaobject in Shopify based on its type and handle.
19662
19871
  *
19663
19872
  * @param input - The metaobject type, handle, and fields
19873
+ * @param retries - Number of retries on transient errors. Defaults to 1; safe because upsert is idempotent on type+handle.
19664
19874
  * @returns The created/updated metaobject
19665
19875
  * @throws {ShopifyUserError} When the upsert fails due to validation errors
19666
19876
  * @throws {Error} When GraphQL errors occur or no metaobject is returned
19667
19877
  */
19668
- declare function upsertMetaobject(input: UpsertMetaobjectInput): Promise<UpsertMetaobjectResult>;
19878
+ declare function upsertMetaobject(input: UpsertMetaobjectInput, retries?: number): Promise<UpsertMetaobjectResult>;
19669
19879
 
19670
19880
  type CustomerDeleteMutationVariables = Exact<{
19671
19881
  input: CustomerDeleteInput;
@@ -19977,6 +20187,7 @@ type OrderByIdFullQuery = {
19977
20187
  shopMoney: Pick<MoneyV2, 'amount' | 'currencyCode'>;
19978
20188
  };
19979
20189
  image?: Maybe<Pick<Image, 'url' | 'width' | 'height' | 'altText'>>;
20190
+ lineItemGroup?: Maybe<Pick<LineItemGroup, 'id' | 'title' | 'quantity' | 'variantSku'>>;
19980
20191
  });
19981
20192
  }>;
19982
20193
  };
@@ -20139,6 +20350,7 @@ type OrderPaymentDetailsByIdQuery = {
20139
20350
  transactions: Array<(Pick<OrderTransaction, 'createdAt' | 'gateway' | 'formattedGateway' | 'kind' | 'paymentId'> & {
20140
20351
  amountSet: {
20141
20352
  shopMoney: Pick<MoneyV2, 'amount' | 'currencyCode'>;
20353
+ presentmentMoney: Pick<MoneyV2, 'amount' | 'currencyCode'>;
20142
20354
  };
20143
20355
  })>;
20144
20356
  }>;
@@ -20256,7 +20468,7 @@ interface GeneratedQueryTypes {
20256
20468
  return: OrderByIdQuery;
20257
20469
  variables: OrderByIdQueryVariables;
20258
20470
  };
20259
- "#graphql\n query orderByIdFull($id: ID!) {\n order(id: $id) {\n id\n name\n createdAt\n updatedAt\n processedAt\n closedAt\n cancelledAt\n cancelReason\n totalPriceSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n customer {\n id\n firstName\n lastName\n email\n phone\n }\n displayFinancialStatus\n displayFulfillmentStatus\n shippingAddress {\n firstName\n lastName\n address1\n address2\n city\n province\n country\n zip\n }\n billingAddress {\n firstName\n lastName\n address1\n address2\n city\n province\n country\n zip\n }\n lineItems(first: 100) {\n edges {\n node {\n id\n sku\n title\n variantTitle\n quantity\n customAttributes {\n key\n value\n }\n originalUnitPriceSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n vendor\n image {\n url\n width\n height\n altText\n }\n }\n }\n }\n fulfillments {\n id\n name\n totalQuantity\n status\n createdAt\n estimatedDeliveryAt\n deliveredAt\n trackingInfo {\n company\n number\n url\n }\n fulfillmentLineItems(first: 100) {\n edges {\n node {\n id\n quantity\n lineItem {\n id\n sku\n }\n }\n }\n }\n }\n shippingLine {\n originalPriceSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n }\n taxLines {\n priceSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n }\n totalDiscountsSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n discountCodes\n refunds {\n totalRefundedSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n }\n }\n }\n": {
20471
+ "#graphql\n query orderByIdFull($id: ID!) {\n order(id: $id) {\n id\n name\n createdAt\n updatedAt\n processedAt\n closedAt\n cancelledAt\n cancelReason\n totalPriceSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n customer {\n id\n firstName\n lastName\n email\n phone\n }\n displayFinancialStatus\n displayFulfillmentStatus\n shippingAddress {\n firstName\n lastName\n address1\n address2\n city\n province\n country\n zip\n }\n billingAddress {\n firstName\n lastName\n address1\n address2\n city\n province\n country\n zip\n }\n lineItems(first: 100) {\n edges {\n node {\n id\n sku\n title\n variantTitle\n quantity\n customAttributes {\n key\n value\n }\n originalUnitPriceSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n vendor\n image {\n url\n width\n height\n altText\n }\n lineItemGroup {\n id\n title\n quantity\n variantSku\n }\n }\n }\n }\n fulfillments {\n id\n name\n totalQuantity\n status\n createdAt\n estimatedDeliveryAt\n deliveredAt\n trackingInfo {\n company\n number\n url\n }\n fulfillmentLineItems(first: 100) {\n edges {\n node {\n id\n quantity\n lineItem {\n id\n sku\n }\n }\n }\n }\n }\n shippingLine {\n originalPriceSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n }\n taxLines {\n priceSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n }\n totalDiscountsSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n discountCodes\n refunds {\n totalRefundedSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n }\n }\n }\n": {
20260
20472
  return: OrderByIdFullQuery;
20261
20473
  variables: OrderByIdFullQueryVariables;
20262
20474
  };
@@ -20272,7 +20484,7 @@ interface GeneratedQueryTypes {
20272
20484
  return: OrderCancellationInfoByNameQuery;
20273
20485
  variables: OrderCancellationInfoByNameQueryVariables;
20274
20486
  };
20275
- "#graphql\n query orderPaymentDetailsById($id: ID!) {\n order(id: $id) {\n transactions {\n amountSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n createdAt\n gateway\n formattedGateway\n kind\n paymentId\n }\n }\n }\n": {
20487
+ "#graphql\n query orderPaymentDetailsById($id: ID!) {\n order(id: $id) {\n transactions {\n amountSet {\n shopMoney {\n amount\n currencyCode\n }\n presentmentMoney {\n amount\n currencyCode\n }\n }\n createdAt\n gateway\n formattedGateway\n kind\n paymentId\n }\n }\n }\n": {
20276
20488
  return: OrderPaymentDetailsByIdQuery;
20277
20489
  variables: OrderPaymentDetailsByIdQueryVariables;
20278
20490
  };
@@ -20280,7 +20492,7 @@ interface GeneratedQueryTypes {
20280
20492
  return: OrdersByCustomerIdQuery;
20281
20493
  variables: OrdersByCustomerIdQueryVariables;
20282
20494
  };
20283
- "#graphql\n query allProductVariants($first: Int!, $after: String) {\n productVariants(first: $first, after: $after) {\n edges {\n node {\n id\n legacyResourceId\n sku\n barcode\n inventoryQuantity\n price\n title\n product {\n status\n title\n description\n handle\n onlineStoreUrl\n featuredImage {\n url\n }\n }\n }\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n": {
20495
+ "#graphql\n query allProductVariants($first: Int!, $after: String) {\n productVariants(first: $first, after: $after) {\n edges {\n node {\n id\n legacyResourceId\n sku\n barcode\n inventoryQuantity\n price\n title\n product {\n status\n title\n description\n handle\n onlineStoreUrl\n combinedListingRole\n featuredImage {\n url\n }\n }\n }\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n": {
20284
20496
  return: AllProductVariantsQuery;
20285
20497
  variables: AllProductVariantsQueryVariables;
20286
20498
  };
@@ -20326,7 +20538,7 @@ interface GeneratedMutationTypes {
20326
20538
  return: UpsertMetaobjectMutation;
20327
20539
  variables: UpsertMetaobjectMutationVariables;
20328
20540
  };
20329
- "#graphql\n mutation orderCancel($orderId: ID!) {\n orderCancel(\n orderId: $orderId\n refund: true\n restock: false\n reason: CUSTOMER\n notifyCustomer: true\n ) {\n orderCancelUserErrors {\n code\n field\n message\n }\n }\n }\n": {
20541
+ "#graphql\n mutation orderCancel($orderId: ID!) {\n orderCancel(\n orderId: $orderId\n refundMethod: { originalPaymentMethodsRefund: true }\n restock: false\n reason: CUSTOMER\n notifyCustomer: true\n ) {\n orderCancelUserErrors {\n code\n field\n message\n }\n }\n }\n": {
20330
20542
  return: OrderCancelMutation;
20331
20543
  variables: OrderCancelMutationVariables;
20332
20544
  };
@@ -20370,10 +20582,12 @@ interface CalculateRefundOptions {
20370
20582
  *
20371
20583
  * @param orderId - The order ID (numeric, bigint, or GID string)
20372
20584
  * @param options - Options for the refund calculation
20585
+ * @param retries - Number of retries on transient errors. Defaults to 3.
20373
20586
  * @returns The suggested refund or undefined
20374
20587
  */
20375
- declare function calculateRefund(orderId: number | bigint | string, options?: CalculateRefundOptions): Promise<SuggestedRefund | undefined>;
20588
+ declare function calculateRefund(orderId: number | bigint | string, options?: CalculateRefundOptions, retries?: number): Promise<SuggestedRefund | undefined>;
20376
20589
 
20590
+ declare function isRetryableError(error: unknown): boolean;
20377
20591
  interface ShopifyUserErrorDetail {
20378
20592
  code?: string | null;
20379
20593
  field?: string[] | null;
@@ -20527,9 +20741,11 @@ declare const GetLeanOrderByIdReturn: z.ZodObject<{
20527
20741
  }>;
20528
20742
  type LeanOrder = z.infer<typeof GetLeanOrderByIdReturn> | undefined;
20529
20743
  type FullOrder = NonNullable<OrderByIdFullQuery['order']>;
20530
- declare function getOrderById(id: number | bigint): Promise<LeanOrder>;
20531
- declare function getOrderById(id: number | bigint, detailLevel: 'lean'): Promise<LeanOrder>;
20532
- declare function getOrderById(id: number | bigint, detailLevel: 'full'): Promise<FullOrder | undefined>;
20744
+ type OrderDetailLevel$1 = 'lean' | 'full';
20745
+ declare function getOrderById(id: number | bigint, retries?: number): Promise<LeanOrder>;
20746
+ declare function getOrderById(id: number | bigint, detailLevel: 'lean', retries?: number): Promise<LeanOrder>;
20747
+ declare function getOrderById(id: number | bigint, detailLevel: 'full', retries?: number): Promise<FullOrder | undefined>;
20748
+ declare function getOrderById(id: number | bigint, detailLevel: OrderDetailLevel$1, retries?: number): Promise<LeanOrder | FullOrder>;
20533
20749
 
20534
20750
  declare const GetLeanOrderByNameReturn: z.ZodObject<{
20535
20751
  id: z.ZodString;
@@ -20596,9 +20812,11 @@ declare const GetLeanOrderByNameReturn: z.ZodObject<{
20596
20812
  }>;
20597
20813
  type LeanOrderByName = z.infer<typeof GetLeanOrderByNameReturn> | undefined;
20598
20814
  type FullOrderByName = NonNullable<NonNullable<OrdersByNameFullQuery['orders']>['edges'][number]['node']> | undefined;
20599
- declare function getOrderByName(orderName: string, detailLevel: 'lean'): Promise<LeanOrderByName>;
20600
- declare function getOrderByName(orderName: string, detailLevel: 'full'): Promise<FullOrderByName>;
20601
- declare function getOrderByName(orderName: string): Promise<LeanOrderByName>;
20815
+ type OrderDetailLevel = 'lean' | 'full';
20816
+ declare function getOrderByName(orderName: string, retries?: number): Promise<LeanOrderByName>;
20817
+ declare function getOrderByName(orderName: string, detailLevel: 'lean', retries?: number): Promise<LeanOrderByName>;
20818
+ declare function getOrderByName(orderName: string, detailLevel: 'full', retries?: number): Promise<FullOrderByName>;
20819
+ declare function getOrderByName(orderName: string, detailLevel: OrderDetailLevel, retries?: number): Promise<LeanOrderByName | FullOrderByName>;
20602
20820
 
20603
20821
  type OrderCancellationInfo = NonNullable<OrderCancellationInfoByNameQuery['orders']['edges'][number]['node']>;
20604
20822
  /**
@@ -20606,10 +20824,11 @@ type OrderCancellationInfo = NonNullable<OrderCancellationInfoByNameQuery['order
20606
20824
  * Returns undefined if no order is found with the specified name.
20607
20825
  *
20608
20826
  * @param {string} orderName - The order name to search for (e.g., "B12345").
20827
+ * @param {number} retries - Number of retries on transient errors. Defaults to 3.
20609
20828
  * @returns {Promise<OrderCancellationInfo | undefined>} A promise that resolves to the order cancellation info or undefined if not found.
20610
20829
  * @throws {Error} If the GraphQL query fails or if the response structure is invalid.
20611
20830
  */
20612
- declare function getOrderCancellationInfoByName(orderName: string): Promise<OrderCancellationInfo | undefined>;
20831
+ declare function getOrderCancellationInfoByName(orderName: string, retries?: number): Promise<OrderCancellationInfo | undefined>;
20613
20832
 
20614
20833
  declare const GetLeanProductVariantsReturn: z.ZodArray<z.ZodObject<{
20615
20834
  productId: z.ZodString;
@@ -20646,10 +20865,11 @@ type LeanProductVariantsOptions = {
20646
20865
  * @param {string[]} [skus] - An optional array of SKUs to filter by. If provided, only variants matching these SKUs will be fetched.
20647
20866
  * @param {LeanProductVariantsOptions} [options] - Optional settings.
20648
20867
  * @param {boolean} [options.activeOnly=false] - If true, excludes ARCHIVED products at query level.
20868
+ * @param {number} retries - Number of retries on transient errors. Defaults to 3.
20649
20869
  * @returns {Promise<LeanProductVariant[]>} A promise that resolves to an array of lean product variant data.
20650
20870
  * @throws {Error} If the GraphQL query fails, returns no data, or if the `productVariants` field is missing in the response.
20651
20871
  */
20652
- declare function getLeanProductVariants(skus?: string[], options?: LeanProductVariantsOptions): Promise<LeanProductVariant[]>;
20872
+ declare function getLeanProductVariants(skus?: string[], options?: LeanProductVariantsOptions, retries?: number): Promise<LeanProductVariant[]>;
20653
20873
 
20654
20874
  declare const GetProductVariantsBySkusReturn: z.ZodArray<z.ZodObject<{
20655
20875
  productId: z.ZodString;
@@ -20685,10 +20905,11 @@ type ProductVariantsBySkusOptions = {
20685
20905
  * @param {string[]} skus - Array of SKUs to filter by.
20686
20906
  * @param {ProductVariantsBySkusOptions} [options] - Optional settings.
20687
20907
  * @param {boolean} [options.activeOnly=false] - If true, excludes ARCHIVED products at query level.
20908
+ * @param {number} retries - Number of retries on transient errors. Defaults to 3.
20688
20909
  * @returns {Promise<ProductVariantBySku[]>} A promise that resolves to an array of product variant data.
20689
20910
  * @throws {Error} If the GraphQL query fails or returns no data.
20690
20911
  */
20691
- declare function getProductVariantsBySkus(skus: string[], options?: ProductVariantsBySkusOptions): Promise<ProductVariantBySku[]>;
20912
+ declare function getProductVariantsBySkus(skus: string[], options?: ProductVariantsBySkusOptions, retries?: number): Promise<ProductVariantBySku[]>;
20692
20913
 
20693
20914
  declare const ProductVariantSchema: z.ZodObject<{
20694
20915
  status: z.ZodEnum<["ACTIVE", "ARCHIVED", "DRAFT"]>;
@@ -20735,10 +20956,11 @@ type ProductVariant = z.infer<typeof ProductVariantSchema>;
20735
20956
  * Each variant includes product info with combined title (product + variant title
20736
20957
  * when variant title is not "Default Title"), URL with variant ID, and inventory data.
20737
20958
  *
20959
+ * @param {number} retries - Number of retries on transient errors. Defaults to 3.
20738
20960
  * @returns {Promise<ProductVariant[]>} A promise that resolves to an array of product variants.
20739
20961
  * @throws {Error} If the GraphQL query fails or if the response is missing expected data.
20740
20962
  */
20741
- declare function getAllProductVariants(): Promise<ProductVariant[]>;
20963
+ declare function getAllProductVariants(retries?: number): Promise<ProductVariant[]>;
20742
20964
 
20743
20965
  type OrderPaymentDetails = NonNullable<OrderPaymentDetailsByIdQuery['order']>;
20744
20966
  /**
@@ -20746,10 +20968,11 @@ type OrderPaymentDetails = NonNullable<OrderPaymentDetailsByIdQuery['order']>;
20746
20968
  * Returns undefined if no order is found with the specified ID.
20747
20969
  *
20748
20970
  * @param {bigint} id - The numerical Shopify order ID (e.g., 12345678n).
20971
+ * @param {number} retries - Number of retries on transient errors. Defaults to 3.
20749
20972
  * @returns {Promise<OrderPaymentDetails | undefined>} A promise that resolves to the order payment data or undefined if not found.
20750
20973
  * @throws {Error} If the GraphQL query fails.
20751
20974
  */
20752
- declare function getOrderPaymentDetailsById(id: bigint): Promise<OrderPaymentDetails | undefined>;
20975
+ declare function getOrderPaymentDetailsById(id: bigint, retries?: number): Promise<OrderPaymentDetails | undefined>;
20753
20976
 
20754
20977
  type Fulfillment = NonNullable<FulfillmentByIdQuery['fulfillment']>;
20755
20978
  /**
@@ -20757,10 +20980,11 @@ type Fulfillment = NonNullable<FulfillmentByIdQuery['fulfillment']>;
20757
20980
  * Returns undefined if no fulfillment is found with the specified ID.
20758
20981
  *
20759
20982
  * @param {string | number | bigint} id - The Shopify fulfillment ID. Can be a GID string (e.g., "gid://shopify/Fulfillment/123456789") or a numeric ID (e.g., 123456789 or 123456789n).
20983
+ * @param {number} retries - Number of retries on transient errors. Defaults to 3.
20760
20984
  * @returns {Promise<Fulfillment | undefined>} A promise that resolves to the fulfillment data or undefined if not found.
20761
20985
  * @throws {Error} If the GraphQL query fails or if the response structure is invalid.
20762
20986
  */
20763
- declare function getFulfillmentById(id: string | number | bigint): Promise<Fulfillment | undefined>;
20987
+ declare function getFulfillmentById(id: string | number | bigint, retries?: number): Promise<Fulfillment | undefined>;
20764
20988
 
20765
20989
  type FulfillmentOrderEdge = NonNullable<FulfillmentOrdersByOrderIdQuery['order']>['fulfillmentOrders']['edges'][number];
20766
20990
  type FulfillmentOrder = FulfillmentOrderEdge['node'];
@@ -20770,10 +20994,11 @@ type FulfillmentOrderLineItem = FulfillmentOrder['lineItems']['edges'][number]['
20770
20994
  * Returns an empty array if no order is found or if the order has no fulfillment orders.
20771
20995
  *
20772
20996
  * @param {string | number | bigint} orderId - The Shopify order ID. Can be a GID string (e.g., "gid://shopify/Order/123456789") or a numeric ID (e.g., 123456789 or 123456789n).
20997
+ * @param {number} retries - Number of retries on transient errors. Defaults to 3.
20773
20998
  * @returns {Promise<FulfillmentOrder[]>} A promise that resolves to an array of fulfillment orders.
20774
20999
  * @throws {Error} If the GraphQL query fails or if the response structure is invalid.
20775
21000
  */
20776
- declare function getFulfillmentOrdersByOrderId(orderId: string | number | bigint): Promise<FulfillmentOrder[]>;
21001
+ declare function getFulfillmentOrdersByOrderId(orderId: string | number | bigint, retries?: number): Promise<FulfillmentOrder[]>;
20777
21002
 
20778
21003
  type FulfillmentTrackingIds = {
20779
21004
  trackingNumbers: string[];
@@ -20784,10 +21009,11 @@ type FulfillmentTrackingIds = {
20784
21009
  * Returns the tracking numbers and the tracking company.
20785
21010
  *
20786
21011
  * @param {string | number | bigint} id - The Shopify fulfillment ID. Can be a GID string (e.g., "gid://shopify/Fulfillment/123456789") or a numeric ID (e.g., 123456789 or 123456789n).
21012
+ * @param {number} retries - Number of retries on transient errors. Defaults to 3.
20787
21013
  * @returns {Promise<FulfillmentTrackingIds | undefined>} A promise that resolves to the tracking info or undefined if fulfillment not found.
20788
21014
  * @throws {Error} If the GraphQL query fails.
20789
21015
  */
20790
- declare function getFulfillmentTrackingIds(id: string | number | bigint): Promise<FulfillmentTrackingIds | undefined>;
21016
+ declare function getFulfillmentTrackingIds(id: string | number | bigint, retries?: number): Promise<FulfillmentTrackingIds | undefined>;
20791
21017
 
20792
21018
  type Customer = CustomersByEmailQuery['customers']['edges'][number]['node'];
20793
21019
  /**
@@ -20796,10 +21022,11 @@ type Customer = CustomersByEmailQuery['customers']['edges'][number]['node'];
20796
21022
  *
20797
21023
  * @param {string} email - The email address to search for.
20798
21024
  * @param {number} limit - Maximum number of customers to return. Defaults to 10.
21025
+ * @param {number} retries - Number of retries on transient errors. Defaults to 3.
20799
21026
  * @returns {Promise<Customer[]>} A promise that resolves to an array of customers.
20800
21027
  * @throws {Error} If the GraphQL query fails or if the response structure is invalid.
20801
21028
  */
20802
- declare function getCustomersByEmail(email: string, limit?: number): Promise<Customer[]>;
21029
+ declare function getCustomersByEmail(email: string, limit?: number, retries?: number): Promise<Customer[]>;
20803
21030
 
20804
21031
  type CustomerSegmentMember = CustomerSegmentMembersWithStatisticsQuery['customerSegmentMembers']['edges'][number]['node'];
20805
21032
  type SegmentAttributeStatistics = CustomerSegmentMembersWithStatisticsQuery['customerSegmentMembers']['statistics']['attributeStatistics'];
@@ -20817,10 +21044,11 @@ interface CustomerSegmentMembersResult {
20817
21044
  * @param {string} query - The segment query filter string (e.g., "customer_account_status = 'ENABLED'").
20818
21045
  * @param {string} statisticsAttributeName - Attribute name for statistics (e.g., "amount_spent").
20819
21046
  * @param {number} limit - Maximum number of members to return. Defaults to 250.
21047
+ * @param {number} retries - Number of retries on transient errors. Defaults to 3.
20820
21048
  * @returns {Promise<CustomerSegmentMembersResult>} Members with statistics.
20821
21049
  * @throws {Error} If the GraphQL query fails.
20822
21050
  */
20823
- declare function getCustomerSegmentMembers(query: string, statisticsAttributeName: string, limit?: number): Promise<CustomerSegmentMembersResult>;
21051
+ declare function getCustomerSegmentMembers(query: string, statisticsAttributeName: string, limit?: number, retries?: number): Promise<CustomerSegmentMembersResult>;
20824
21052
 
20825
21053
  type CustomerOrders = NonNullable<OrdersByCustomerIdQuery['customer']>['orders'];
20826
21054
  type OrderPreview = CustomerOrders['edges'][number]['node'];
@@ -20830,10 +21058,11 @@ type OrderPreview = CustomerOrders['edges'][number]['node'];
20830
21058
  *
20831
21059
  * @param {number | bigint} customerId - The numerical Shopify customer ID.
20832
21060
  * @param {number} limit - Maximum number of orders to return. Defaults to 250.
21061
+ * @param {number} retries - Number of retries on transient errors. Defaults to 3.
20833
21062
  * @returns {Promise<OrderPreview[]>} A promise that resolves to an array of order previews.
20834
21063
  * @throws {Error} If the GraphQL query fails.
20835
21064
  */
20836
- declare function getOrdersByCustomerId(customerId: number | bigint, limit?: number): Promise<OrderPreview[]>;
21065
+ declare function getOrdersByCustomerId(customerId: number | bigint, limit?: number, retries?: number): Promise<OrderPreview[]>;
20837
21066
 
20838
21067
  /**
20839
21068
  * Extract numeric ID from a Shopify GID string.
@@ -20850,8 +21079,9 @@ type Metaobject = NonNullable<MetaobjectByHandleQuery['metaobjectByHandle']>;
20850
21079
  * Returns undefined if no metaobject is found with the specified type and handle.
20851
21080
  *
20852
21081
  * @param handle - The handle input containing type and handle
21082
+ * @param retries - Number of retries on transient errors. Defaults to 3.
20853
21083
  * @returns A promise that resolves to the metaobject data or undefined if not found.
20854
21084
  */
20855
- declare function getMetaobjectByHandle(handle: MetaobjectHandleInput): Promise<Metaobject | undefined>;
21085
+ declare function getMetaobjectByHandle(handle: MetaobjectHandleInput, retries?: number): Promise<Metaobject | undefined>;
20856
21086
 
20857
- export { type BulkUpdateProductVariantsResult, type CalculateRefundLineItem, type CalculateRefundOptions, type CreateFulfillmentResult, type CreateMetaobjectDefinitionInput, type CreateMetaobjectDefinitionResult, type CreateRefundLineItem, type CreateRefundOptions, type CreateRefundResult, type CreateRefundTransaction, type Customer, type CustomerSegmentMember, type CustomerSegmentMembersResult, type Fulfillment, type FulfillmentLineItem$1 as FulfillmentLineItem, type FulfillmentOrder, type FulfillmentOrderLineItem, type FulfillmentTrackingIds, type FullOrder, type FullOrderByName, type LeanOrder, type LeanOrderByName, type LeanProductVariant, type LeanProductVariantsOptions, type Metaobject, type MetaobjectFieldDefinition$1 as MetaobjectFieldDefinition, type MetaobjectHandleInput, type OrderCancellationInfo, type OrderPaymentDetails, type OrderPreview, type ProductVariant, type ProductVariantBySku, type ProductVariantsBySkusOptions, type RefundMoney, type SegmentAttributeStatistics, ShopifyUserError, type ShopifyUserErrorDetail, type SuggestedRefund, type UpdateFulfillmentTrackingResult, type UpsertMetaobjectInput, type UpsertMetaobjectResult, type VariantUpdateInput, bulkUpdateProductVariants, calculateRefund, cancelOrderById, createFile, createFulfillment, createMetaobjectDefinition, createRefund, deleteCustomerById, deleteFilesByIds, getAllProductVariants, getCustomerSegmentMembers, getCustomersByEmail, getFulfillmentById, getFulfillmentOrdersByOrderId, getFulfillmentTrackingIds, getLeanProductVariants, getMetaobjectByHandle, getOrderById, getOrderByName, getOrderCancellationInfoByName, getOrderPaymentDetailsById, getOrdersByCustomerId, getProductVariantsBySkus, parseGid, updateFulfillmentTracking, upsertMetaobject };
21087
+ export { type BulkUpdateProductVariantsResult, type CalculateRefundLineItem, type CalculateRefundOptions, type CreateFulfillmentResult, type CreateMetaobjectDefinitionInput, type CreateMetaobjectDefinitionResult, type CreateRefundLineItem, type CreateRefundOptions, type CreateRefundResult, type CreateRefundTransaction, type Customer, type CustomerSegmentMember, type CustomerSegmentMembersResult, type Fulfillment, type FulfillmentLineItem$1 as FulfillmentLineItem, type FulfillmentOrder, type FulfillmentOrderLineItem, type FulfillmentTrackingIds, type FullOrder, type FullOrderByName, type LeanOrder, type LeanOrderByName, type LeanProductVariant, type LeanProductVariantsOptions, type Metaobject, type MetaobjectFieldDefinition$1 as MetaobjectFieldDefinition, type MetaobjectHandleInput, type OrderCancellationInfo, type OrderPaymentDetails, type OrderPreview, type ProductVariant, type ProductVariantBySku, type ProductVariantsBySkusOptions, type RefundMoney, type SegmentAttributeStatistics, ShopifyUserError, type ShopifyUserErrorDetail, type SuggestedRefund, type UpdateFulfillmentTrackingResult, type UpsertMetaobjectInput, type UpsertMetaobjectResult, type VariantUpdateInput, bulkUpdateProductVariants, calculateRefund, cancelOrderById, createFile, createFulfillment, createMetaobjectDefinition, createRefund, deleteCustomerById, deleteFilesByIds, getAllProductVariants, getCustomerSegmentMembers, getCustomersByEmail, getFulfillmentById, getFulfillmentOrdersByOrderId, getFulfillmentTrackingIds, getLeanProductVariants, getMetaobjectByHandle, getOrderById, getOrderByName, getOrderCancellationInfoByName, getOrderPaymentDetailsById, getOrdersByCustomerId, getProductVariantsBySkus, isRetryableError, parseGid, updateFulfillmentTracking, upsertMetaobject };