@ehrenkind/shopify-lib 0.7.1 → 0.7.4
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.cjs +174 -76
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +329 -104
- package/dist/index.d.ts +329 -104
- package/dist/index.mjs +173 -76
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.d.cts
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. */
|
|
@@ -1633,6 +1642,8 @@ type ChannelInformation = Node & {
|
|
|
1633
1642
|
channelDefinition?: Maybe<ChannelDefinition>;
|
|
1634
1643
|
/** The unique ID for the channel. */
|
|
1635
1644
|
channelId: Scalars['ID']['output'];
|
|
1645
|
+
/** The publishing destination display name or channel name. */
|
|
1646
|
+
displayName?: Maybe<Scalars['String']['output']>;
|
|
1636
1647
|
/** A globally-unique ID. */
|
|
1637
1648
|
id: Scalars['ID']['output'];
|
|
1638
1649
|
};
|
|
@@ -3439,6 +3450,18 @@ declare enum CurrencyCode {
|
|
|
3439
3450
|
/** Zambian Kwacha (ZMW). */
|
|
3440
3451
|
Zmw = "ZMW"
|
|
3441
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
|
+
};
|
|
3442
3465
|
/** Currency formats configured for the merchant. These formats are available to use within Liquid. */
|
|
3443
3466
|
type CurrencyFormats = {
|
|
3444
3467
|
__typename?: 'CurrencyFormats';
|
|
@@ -3460,6 +3483,8 @@ type CurrencySetting = {
|
|
|
3460
3483
|
currencyName: Scalars['String']['output'];
|
|
3461
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. */
|
|
3462
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']>;
|
|
3463
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. */
|
|
3464
3489
|
rateUpdatedAt?: Maybe<Scalars['DateTime']['output']>;
|
|
3465
3490
|
};
|
|
@@ -6944,6 +6969,8 @@ type DraftOrderPlatformDiscount = {
|
|
|
6944
6969
|
* @deprecated Use `discountClasses` instead.
|
|
6945
6970
|
*/
|
|
6946
6971
|
discountClass: DiscountClass;
|
|
6972
|
+
/** The discount classes. */
|
|
6973
|
+
discountClasses: Array<DiscountClass>;
|
|
6947
6974
|
/** The discount node for the platform discount. */
|
|
6948
6975
|
discountNode?: Maybe<DiscountNode>;
|
|
6949
6976
|
/** The ID of the discount. */
|
|
@@ -7073,6 +7100,18 @@ type ExchangeLineItem = Node & {
|
|
|
7073
7100
|
* @deprecated Use `lineItems` instead.
|
|
7074
7101
|
*/
|
|
7075
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']>;
|
|
7076
7115
|
};
|
|
7077
7116
|
/** An auto-generated type for paginating through multiple ExchangeLineItems. */
|
|
7078
7117
|
type ExchangeLineItemConnection = {
|
|
@@ -9140,6 +9179,12 @@ type Image = HasMetafields & {
|
|
|
9140
9179
|
* @deprecated Use `url` instead.
|
|
9141
9180
|
*/
|
|
9142
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']>;
|
|
9143
9188
|
/**
|
|
9144
9189
|
* The location of the transformed image as a URL.
|
|
9145
9190
|
*
|
|
@@ -9420,6 +9465,12 @@ type InventoryScheduledChangeEdge = {
|
|
|
9420
9465
|
/** The item at the end of InventoryScheduledChangeEdge. */
|
|
9421
9466
|
node: InventoryScheduledChange;
|
|
9422
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
|
+
};
|
|
9423
9474
|
/**
|
|
9424
9475
|
* Interoperability metadata for types that directly correspond to a REST Admin API resource.
|
|
9425
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.
|
|
@@ -9647,6 +9698,8 @@ type LineItemGroup = Node & {
|
|
|
9647
9698
|
customAttributes: Array<Attribute>;
|
|
9648
9699
|
/** A globally-unique ID. */
|
|
9649
9700
|
id: Scalars['ID']['output'];
|
|
9701
|
+
/** ID of the product of the line item group. */
|
|
9702
|
+
productId?: Maybe<Scalars['ID']['output']>;
|
|
9650
9703
|
/** Quantity of the line item group on the order. */
|
|
9651
9704
|
quantity: Scalars['Int']['output'];
|
|
9652
9705
|
/** Title of the line item group. */
|
|
@@ -10370,6 +10423,8 @@ type MarketCurrencySettings = {
|
|
|
10370
10423
|
* in the market's base currency.
|
|
10371
10424
|
*/
|
|
10372
10425
|
localCurrencies: Scalars['Boolean']['output'];
|
|
10426
|
+
/** Whether or not rounding is enabled on multi-currency prices. */
|
|
10427
|
+
roundingEnabled: Scalars['Boolean']['output'];
|
|
10373
10428
|
};
|
|
10374
10429
|
/** An auto-generated type which holds one Market and a cursor during pagination. */
|
|
10375
10430
|
type MarketEdge = {
|
|
@@ -10997,28 +11052,9 @@ type MetafieldAccess = {
|
|
|
10997
11052
|
admin?: Maybe<MetafieldAdminAccess>;
|
|
10998
11053
|
/** The access permitted on the Customer Account API. */
|
|
10999
11054
|
customerAccount: MetafieldCustomerAccountAccess;
|
|
11000
|
-
/**
|
|
11001
|
-
* The explicit grants for this metafield definition, superseding the default admin access
|
|
11002
|
-
* for the specified grantees.
|
|
11003
|
-
* @deprecated Explicit grants are [deprecated](https://shopify.dev/changelog/deprecating-explicit-access-grants-for-app-owned-metafields).
|
|
11004
|
-
* This will be removed in 2025-07.
|
|
11005
|
-
*/
|
|
11006
|
-
grants: Array<MetafieldAccessGrant>;
|
|
11007
11055
|
/** The access permitted on the Storefront API. */
|
|
11008
11056
|
storefront?: Maybe<MetafieldStorefrontAccess>;
|
|
11009
11057
|
};
|
|
11010
|
-
/**
|
|
11011
|
-
* An explicit access grant for the metafields under this definition.
|
|
11012
|
-
*
|
|
11013
|
-
* Explicit grants are [deprecated](https://shopify.dev/changelog/deprecating-explicit-access-grants-for-app-owned-metafields).
|
|
11014
|
-
*/
|
|
11015
|
-
type MetafieldAccessGrant = {
|
|
11016
|
-
__typename?: 'MetafieldAccessGrant';
|
|
11017
|
-
/** The level of access the grantee has. */
|
|
11018
|
-
access: MetafieldGrantAccessLevel;
|
|
11019
|
-
/** The grantee being granted access. */
|
|
11020
|
-
grantee: Scalars['String']['output'];
|
|
11021
|
-
};
|
|
11022
11058
|
/** Metafield access permissions for the Admin API. */
|
|
11023
11059
|
declare enum MetafieldAdminAccess {
|
|
11024
11060
|
/** The merchant has read-only access. No other apps have access. */
|
|
@@ -11285,13 +11321,6 @@ type MetafieldEdge = {
|
|
|
11285
11321
|
/** The item at the end of MetafieldEdge. */
|
|
11286
11322
|
node: Metafield;
|
|
11287
11323
|
};
|
|
11288
|
-
/** Possible access levels for explicit metafield access grants. */
|
|
11289
|
-
declare enum MetafieldGrantAccessLevel {
|
|
11290
|
-
/** Read metafield access. */
|
|
11291
|
-
Read = "READ",
|
|
11292
|
-
/** Read and write metafield access. */
|
|
11293
|
-
ReadWrite = "READ_WRITE"
|
|
11294
|
-
}
|
|
11295
11324
|
/**
|
|
11296
11325
|
* The input fields to use to create or update a metafield through a mutation on the owning resource.
|
|
11297
11326
|
* An alternative way to create or update a metafield is by using the
|
|
@@ -12036,6 +12065,13 @@ type MoneyBag = {
|
|
|
12036
12065
|
/** Amount in shop currency. */
|
|
12037
12066
|
shopMoney: MoneyV2;
|
|
12038
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
|
+
};
|
|
12039
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. */
|
|
12040
12076
|
type MoneyV2 = {
|
|
12041
12077
|
__typename?: 'MoneyV2';
|
|
@@ -12401,6 +12437,8 @@ type Order = CommentEventSubject & HasEvents & HasLocalizationExtensions & HasLo
|
|
|
12401
12437
|
* Commonly used for special delivery instructions, gift messages, or internal processing notes.
|
|
12402
12438
|
*/
|
|
12403
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'];
|
|
12404
12442
|
/**
|
|
12405
12443
|
* The total amount of all additional fees, such as import fees or taxes, that were applied when an order was created.
|
|
12406
12444
|
* Returns `null` if additional fees aren't applicable.
|
|
@@ -12836,7 +12874,15 @@ declare enum OrderCancelUserErrorCode {
|
|
|
12836
12874
|
/** The record with the ID used as the input value couldn't be found. */
|
|
12837
12875
|
NotFound = "NOT_FOUND",
|
|
12838
12876
|
/** An order refund was requested but the user does not have the refund_orders permission. */
|
|
12839
|
-
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"
|
|
12840
12886
|
}
|
|
12841
12887
|
/** Details about the order cancellation. */
|
|
12842
12888
|
type OrderCancellation = {
|
|
@@ -13068,6 +13114,10 @@ type OrderTransaction = Node & {
|
|
|
13068
13114
|
authorizationExpiresAt?: Maybe<Scalars['DateTime']['output']>;
|
|
13069
13115
|
/** Date and time when the transaction was created. */
|
|
13070
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>;
|
|
13071
13121
|
/** A standardized error code, independent of the payment provider. */
|
|
13072
13122
|
errorCode?: Maybe<OrderTransactionErrorCode>;
|
|
13073
13123
|
/** The transaction fees charged on the order transaction. Only present for Shopify Payments transactions. */
|
|
@@ -13080,6 +13130,8 @@ type OrderTransaction = Node & {
|
|
|
13080
13130
|
id: Scalars['ID']['output'];
|
|
13081
13131
|
/** The kind of transaction. */
|
|
13082
13132
|
kind: OrderTransactionKind;
|
|
13133
|
+
/** The physical location where the transaction was processed. */
|
|
13134
|
+
location?: Maybe<Location>;
|
|
13083
13135
|
/** Whether the transaction is processed by manual payment gateway. */
|
|
13084
13136
|
manualPaymentGateway: Scalars['Boolean']['output'];
|
|
13085
13137
|
/** Whether the transaction can be manually captured. */
|
|
@@ -13384,7 +13436,7 @@ type PaymentCustomization = HasMetafieldDefinitions & HasMetafields & Node & {
|
|
|
13384
13436
|
title: Scalars['String']['output'];
|
|
13385
13437
|
};
|
|
13386
13438
|
/** Payment details related to a transaction. */
|
|
13387
|
-
type PaymentDetails = CardPaymentDetails | LocalPaymentMethodsPaymentDetails | ShopPayInstallmentsPaymentDetails;
|
|
13439
|
+
type PaymentDetails = CardPaymentDetails | LocalPaymentMethodsPaymentDetails | PaypalWalletPaymentDetails | ShopPayInstallmentsPaymentDetails;
|
|
13388
13440
|
/** All possible instrument outputs for Payment Mandates. */
|
|
13389
13441
|
type PaymentInstrument = VaultCreditCard | VaultPaypalBillingAgreement;
|
|
13390
13442
|
/**
|
|
@@ -13536,6 +13588,18 @@ declare enum PaypalExpressSubscriptionsGatewayStatus {
|
|
|
13536
13588
|
/** The status is pending. */
|
|
13537
13589
|
Pending = "PENDING"
|
|
13538
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
|
+
};
|
|
13539
13603
|
/**
|
|
13540
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.
|
|
13541
13605
|
*
|
|
@@ -13863,6 +13927,18 @@ type Product = HasEvents & HasMetafieldDefinitions & HasMetafields & HasPublishe
|
|
|
13863
13927
|
* @deprecated Use `category` instead.
|
|
13864
13928
|
*/
|
|
13865
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;
|
|
13866
13942
|
/**
|
|
13867
13943
|
* A list of the channels where the product is published.
|
|
13868
13944
|
* @deprecated Use `resourcePublications` instead.
|
|
@@ -14153,6 +14229,38 @@ type ProductCompareAtPriceRange = {
|
|
|
14153
14229
|
/** The lowest variant's compare-at price. */
|
|
14154
14230
|
minVariantCompareAtPrice: MoneyV2;
|
|
14155
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
|
+
};
|
|
14156
14264
|
/** An auto-generated type for paginating through multiple Products. */
|
|
14157
14265
|
type ProductConnection = {
|
|
14158
14266
|
__typename?: 'ProductConnection';
|
|
@@ -14399,6 +14507,8 @@ type ProductVariant$1 = HasEvents & HasMetafieldDefinitions & HasMetafields & Ha
|
|
|
14399
14507
|
price: Scalars['Money']['output'];
|
|
14400
14508
|
/** The product that this variant belongs to. */
|
|
14401
14509
|
product: Product;
|
|
14510
|
+
/** A list of products that have product variants that contain this variant as a product component. */
|
|
14511
|
+
productParents: ProductConnection;
|
|
14402
14512
|
/** A list of the product variant components. */
|
|
14403
14513
|
productVariantComponents: ProductVariantComponentConnection;
|
|
14404
14514
|
/**
|
|
@@ -14424,6 +14534,8 @@ type ProductVariant$1 = HasEvents & HasMetafieldDefinitions & HasMetafields & Ha
|
|
|
14424
14534
|
sellingPlanGroups: SellingPlanGroupConnection;
|
|
14425
14535
|
/** Count of selling plan groups associated with the product variant. */
|
|
14426
14536
|
sellingPlanGroupsCount?: Maybe<Count>;
|
|
14537
|
+
/** Whether to show the unit price for this product variant. */
|
|
14538
|
+
showUnitPrice: Scalars['Boolean']['output'];
|
|
14427
14539
|
/**
|
|
14428
14540
|
* A case-sensitive identifier for the product variant in the shop.
|
|
14429
14541
|
* Required in order to connect to a fulfillment service.
|
|
@@ -14447,6 +14559,8 @@ type ProductVariant$1 = HasEvents & HasMetafieldDefinitions & HasMetafields & Ha
|
|
|
14447
14559
|
title: Scalars['String']['output'];
|
|
14448
14560
|
/** The published translations associated with the resource. */
|
|
14449
14561
|
translations: Array<Translation>;
|
|
14562
|
+
/** The unit price value for the variant based on the variant measurement. */
|
|
14563
|
+
unitPrice?: Maybe<MoneyV2>;
|
|
14450
14564
|
/** The unit price measurement for the variant. */
|
|
14451
14565
|
unitPriceMeasurement?: Maybe<UnitPriceMeasurement>;
|
|
14452
14566
|
/** The date and time (ISO 8601 format) when the product variant was last modified. */
|
|
@@ -14509,6 +14623,8 @@ type ProductVariantContextualPricing = {
|
|
|
14509
14623
|
quantityPriceBreaks: QuantityPriceBreakConnection;
|
|
14510
14624
|
/** The quantity rule applied for a given context. */
|
|
14511
14625
|
quantityRule: QuantityRule;
|
|
14626
|
+
/** The unit price value for the given context based on the variant measurement. */
|
|
14627
|
+
unitPrice?: Maybe<MoneyV2>;
|
|
14512
14628
|
};
|
|
14513
14629
|
/** An auto-generated type which holds one ProductVariant and a cursor during pagination. */
|
|
14514
14630
|
type ProductVariantEdge = {
|
|
@@ -14585,10 +14701,14 @@ type ProductVariantsBulkInput = {
|
|
|
14585
14701
|
* omitted from channels that don't support bundles.
|
|
14586
14702
|
*/
|
|
14587
14703
|
requiresComponents?: InputMaybe<Scalars['Boolean']['input']>;
|
|
14704
|
+
/** Whether the unit price should be shown for this product variant. */
|
|
14705
|
+
showUnitPrice?: InputMaybe<Scalars['Boolean']['input']>;
|
|
14588
14706
|
/** The tax code associated with the variant. */
|
|
14589
14707
|
taxCode?: InputMaybe<Scalars['String']['input']>;
|
|
14590
14708
|
/** Whether the variant is taxable. */
|
|
14591
14709
|
taxable?: InputMaybe<Scalars['Boolean']['input']>;
|
|
14710
|
+
/** The unit price measurement for the product variant. */
|
|
14711
|
+
unitPriceMeasurement?: InputMaybe<UnitPriceMeasurementInput>;
|
|
14592
14712
|
};
|
|
14593
14713
|
/** Error codes for failed variant bulk update mutations. */
|
|
14594
14714
|
type ProductVariantsBulkUpdateUserError = DisplayableError & {
|
|
@@ -15016,6 +15136,8 @@ type RefundEdge = {
|
|
|
15016
15136
|
};
|
|
15017
15137
|
/** The input fields to create a refund. */
|
|
15018
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']>;
|
|
15019
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. */
|
|
15020
15142
|
currency?: InputMaybe<CurrencyCode>;
|
|
15021
15143
|
/** An optional reason for a discrepancy between calculated and actual refund amounts. */
|
|
@@ -15030,6 +15152,8 @@ type RefundInput = {
|
|
|
15030
15152
|
refundDuties?: InputMaybe<Array<RefundDutyInput>>;
|
|
15031
15153
|
/** A list of line items to refund. */
|
|
15032
15154
|
refundLineItems?: InputMaybe<Array<RefundLineItemInput>>;
|
|
15155
|
+
/** A list of instructions to process the financial outcome of the refund. */
|
|
15156
|
+
refundMethods?: InputMaybe<Array<RefundMethodInput>>;
|
|
15033
15157
|
/** The input fields that are required to reimburse shipping costs. */
|
|
15034
15158
|
shipping?: InputMaybe<ShippingRefundInput>;
|
|
15035
15159
|
/** A list of transactions involved in the refund. */
|
|
@@ -15116,6 +15240,21 @@ declare enum RefundLineItemRestockType {
|
|
|
15116
15240
|
/** The refund line item was returned. Use this when restocking line items that were fulfilled. */
|
|
15117
15241
|
Return = "RETURN"
|
|
15118
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
|
+
};
|
|
15119
15258
|
/** A shipping line item that's included in a refund. */
|
|
15120
15259
|
type RefundShippingLine = Node & {
|
|
15121
15260
|
__typename?: 'RefundShippingLine';
|
|
@@ -15365,6 +15504,10 @@ type RestrictedForResource = {
|
|
|
15365
15504
|
*/
|
|
15366
15505
|
type Return = Node & {
|
|
15367
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'];
|
|
15368
15511
|
/** Additional information about the declined return. */
|
|
15369
15512
|
decline?: Maybe<ReturnDecline>;
|
|
15370
15513
|
/** The exchange line items attached to the return. */
|
|
@@ -15377,6 +15520,8 @@ type Return = Node & {
|
|
|
15377
15520
|
order: Order;
|
|
15378
15521
|
/** The list of refunds associated with the return. */
|
|
15379
15522
|
refunds: RefundConnection;
|
|
15523
|
+
/** The date and time when the return was approved. */
|
|
15524
|
+
requestApprovedAt?: Maybe<Scalars['DateTime']['output']>;
|
|
15380
15525
|
/** The return line items attached to the return. */
|
|
15381
15526
|
returnLineItems: ReturnLineItemTypeConnection;
|
|
15382
15527
|
/** The return shipping fees for the return. */
|
|
@@ -15385,6 +15530,8 @@ type Return = Node & {
|
|
|
15385
15530
|
reverseFulfillmentOrders: ReverseFulfillmentOrderConnection;
|
|
15386
15531
|
/** The status of the return. */
|
|
15387
15532
|
status: ReturnStatus;
|
|
15533
|
+
/** A suggested financial outcome for the return. */
|
|
15534
|
+
suggestedFinancialOutcome?: Maybe<SuggestedReturnFinancialOutcome>;
|
|
15388
15535
|
/**
|
|
15389
15536
|
* A suggested refund for the return.
|
|
15390
15537
|
* @deprecated Use `suggestedFinancialOutcome` instead.
|
|
@@ -15437,6 +15584,10 @@ type ReturnLineItemType = {
|
|
|
15437
15584
|
customerNote?: Maybe<Scalars['String']['output']>;
|
|
15438
15585
|
/** A globally-unique ID. */
|
|
15439
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'];
|
|
15440
15591
|
/** The quantity being returned. */
|
|
15441
15592
|
quantity: Scalars['Int']['output'];
|
|
15442
15593
|
/** The quantity that can be refunded. */
|
|
@@ -15447,6 +15598,8 @@ type ReturnLineItemType = {
|
|
|
15447
15598
|
returnReason: ReturnReason;
|
|
15448
15599
|
/** Additional information about the reason for the return. Maximum length: 255 characters. */
|
|
15449
15600
|
returnReasonNote: Scalars['String']['output'];
|
|
15601
|
+
/** The quantity that has't been processed. */
|
|
15602
|
+
unprocessedQuantity: Scalars['Int']['output'];
|
|
15450
15603
|
};
|
|
15451
15604
|
/** An auto-generated type for paginating through multiple ReturnLineItemTypes. */
|
|
15452
15605
|
type ReturnLineItemTypeConnection = {
|
|
@@ -15466,6 +15619,8 @@ type ReturnLineItemTypeEdge = {
|
|
|
15466
15619
|
/** The item at the end of ReturnLineItemTypeEdge. */
|
|
15467
15620
|
node: ReturnLineItemType;
|
|
15468
15621
|
};
|
|
15622
|
+
/** The financial transfer details for the return outcome. */
|
|
15623
|
+
type ReturnOutcomeFinancialTransfer = InvoiceReturnOutcome | RefundReturnOutcome;
|
|
15469
15624
|
/** The reason for returning the return line item. */
|
|
15470
15625
|
declare enum ReturnReason {
|
|
15471
15626
|
/** The item is returned because the buyer did not like the color. Displays as **Color**. */
|
|
@@ -15640,6 +15795,8 @@ type ReverseFulfillmentOrderConnection = {
|
|
|
15640
15795
|
/** The details of the arrangement of an item. */
|
|
15641
15796
|
type ReverseFulfillmentOrderDisposition = Node & {
|
|
15642
15797
|
__typename?: 'ReverseFulfillmentOrderDisposition';
|
|
15798
|
+
/** The date and time when the disposition was created. */
|
|
15799
|
+
createdAt: Scalars['DateTime']['output'];
|
|
15643
15800
|
/** A globally-unique ID. */
|
|
15644
15801
|
id: Scalars['ID']['output'];
|
|
15645
15802
|
/** The location where the disposition occurred. */
|
|
@@ -16554,7 +16711,7 @@ type ShippingRefundInput = {
|
|
|
16554
16711
|
*
|
|
16555
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.
|
|
16556
16713
|
*/
|
|
16557
|
-
type Shop = HasMetafields & HasPublishedTranslations & Node & {
|
|
16714
|
+
type Shop = HasMetafieldDefinitions & HasMetafields & HasPublishedTranslations & Node & {
|
|
16558
16715
|
__typename?: 'Shop';
|
|
16559
16716
|
/** Account owner information. */
|
|
16560
16717
|
accountOwner: StaffMember;
|
|
@@ -16704,6 +16861,11 @@ type Shop = HasMetafields & HasPublishedTranslations & Node & {
|
|
|
16704
16861
|
* for the purposes of adding and storing additional information.
|
|
16705
16862
|
*/
|
|
16706
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;
|
|
16707
16869
|
/**
|
|
16708
16870
|
* A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data)
|
|
16709
16871
|
* that a merchant associates with a Shopify resource.
|
|
@@ -17047,6 +17209,8 @@ type ShopPlan = {
|
|
|
17047
17209
|
displayName: Scalars['String']['output'];
|
|
17048
17210
|
/** Whether the shop is a partner development shop for testing purposes. */
|
|
17049
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'];
|
|
17050
17214
|
/** Whether the shop has a Shopify Plus subscription. */
|
|
17051
17215
|
shopifyPlus: Scalars['Boolean']['output'];
|
|
17052
17216
|
};
|
|
@@ -18177,6 +18341,13 @@ type StoreCreditAccountTransactionEdge = {
|
|
|
18177
18341
|
};
|
|
18178
18342
|
/** The origin of a store credit account transaction. */
|
|
18179
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
|
+
};
|
|
18180
18351
|
/** The event that caused the store credit account transaction. */
|
|
18181
18352
|
declare enum StoreCreditSystemEvent {
|
|
18182
18353
|
/** An adjustment was made to the store credit account. */
|
|
@@ -18597,7 +18768,7 @@ type SubscriptionDeliveryMethod = SubscriptionDeliveryMethodLocalDelivery | Subs
|
|
|
18597
18768
|
type SubscriptionDeliveryMethodLocalDelivery = {
|
|
18598
18769
|
__typename?: 'SubscriptionDeliveryMethodLocalDelivery';
|
|
18599
18770
|
/** The address to deliver to. */
|
|
18600
|
-
address:
|
|
18771
|
+
address: MailingAddress;
|
|
18601
18772
|
/** The details of the local delivery method to use. */
|
|
18602
18773
|
localDeliveryOption: SubscriptionDeliveryMethodLocalDeliveryOption;
|
|
18603
18774
|
};
|
|
@@ -18644,7 +18815,7 @@ type SubscriptionDeliveryMethodPickupOption = {
|
|
|
18644
18815
|
type SubscriptionDeliveryMethodShipping = {
|
|
18645
18816
|
__typename?: 'SubscriptionDeliveryMethodShipping';
|
|
18646
18817
|
/** The address to ship to. */
|
|
18647
|
-
address:
|
|
18818
|
+
address: MailingAddress;
|
|
18648
18819
|
/** The details of the shipping method to use. */
|
|
18649
18820
|
shippingOption: SubscriptionDeliveryMethodShippingOption;
|
|
18650
18821
|
};
|
|
@@ -18817,44 +18988,6 @@ type SubscriptionLineEdge = {
|
|
|
18817
18988
|
/** The item at the end of SubscriptionLineEdge. */
|
|
18818
18989
|
node: SubscriptionLine;
|
|
18819
18990
|
};
|
|
18820
|
-
/** Represents a Mailing Address on a Subscription. */
|
|
18821
|
-
type SubscriptionMailingAddress = {
|
|
18822
|
-
__typename?: 'SubscriptionMailingAddress';
|
|
18823
|
-
/** The first line of the address. Typically the street address or PO Box number. */
|
|
18824
|
-
address1?: Maybe<Scalars['String']['output']>;
|
|
18825
|
-
/** The second line of the address. Typically the number of the apartment, suite, or unit. */
|
|
18826
|
-
address2?: Maybe<Scalars['String']['output']>;
|
|
18827
|
-
/** The name of the city, district, village, or town. */
|
|
18828
|
-
city?: Maybe<Scalars['String']['output']>;
|
|
18829
|
-
/** The name of the customer's company or organization. */
|
|
18830
|
-
company?: Maybe<Scalars['String']['output']>;
|
|
18831
|
-
/** The name of the country. */
|
|
18832
|
-
country?: Maybe<Scalars['String']['output']>;
|
|
18833
|
-
/**
|
|
18834
|
-
* The two-letter code for the country of the address.
|
|
18835
|
-
*
|
|
18836
|
-
* For example, US.
|
|
18837
|
-
*/
|
|
18838
|
-
countryCode?: Maybe<CountryCode>;
|
|
18839
|
-
/** The first name of the customer. */
|
|
18840
|
-
firstName?: Maybe<Scalars['String']['output']>;
|
|
18841
|
-
/** The last name of the customer. */
|
|
18842
|
-
lastName?: Maybe<Scalars['String']['output']>;
|
|
18843
|
-
/** The full name of the customer, based on firstName and lastName. */
|
|
18844
|
-
name?: Maybe<Scalars['String']['output']>;
|
|
18845
|
-
/** A unique phone number for the customer. Formatted using E.164 standard. For example, _+16135551111_. */
|
|
18846
|
-
phone?: Maybe<Scalars['String']['output']>;
|
|
18847
|
-
/** The region of the address, such as the province, state, or district. */
|
|
18848
|
-
province?: Maybe<Scalars['String']['output']>;
|
|
18849
|
-
/**
|
|
18850
|
-
* The alphanumeric code for the region.
|
|
18851
|
-
*
|
|
18852
|
-
* For example, ON.
|
|
18853
|
-
*/
|
|
18854
|
-
provinceCode?: Maybe<Scalars['String']['output']>;
|
|
18855
|
-
/** The zip or postal code of the address. */
|
|
18856
|
-
zip?: Maybe<Scalars['String']['output']>;
|
|
18857
|
-
};
|
|
18858
18991
|
/** Custom subscription discount. */
|
|
18859
18992
|
type SubscriptionManualDiscount = {
|
|
18860
18993
|
__typename?: 'SubscriptionManualDiscount';
|
|
@@ -18979,6 +19112,8 @@ type SuggestedRefund$1 = {
|
|
|
18979
19112
|
subtotal: Scalars['Money']['output'];
|
|
18980
19113
|
/** The sum of all the prices of the line items being refunded in shop and presentment currencies. */
|
|
18981
19114
|
subtotalSet: MoneyBag;
|
|
19115
|
+
/** A list of suggested refund methods. */
|
|
19116
|
+
suggestedRefundMethods: Array<SuggestedRefundMethod>;
|
|
18982
19117
|
/** A list of suggested order transactions. */
|
|
18983
19118
|
suggestedTransactions: Array<SuggestedOrderTransaction>;
|
|
18984
19119
|
/** The total cart discount amount that was applied to all line items in this refund. */
|
|
@@ -18993,6 +19128,35 @@ type SuggestedRefund$1 = {
|
|
|
18993
19128
|
*/
|
|
18994
19129
|
totalTaxes: Scalars['Money']['output'];
|
|
18995
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
|
+
};
|
|
18996
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. */
|
|
18997
19161
|
type SuggestedReturnRefund = {
|
|
18998
19162
|
__typename?: 'SuggestedReturnRefund';
|
|
@@ -19369,12 +19533,27 @@ type UnitPriceMeasurement = {
|
|
|
19369
19533
|
/** The reference value for the unit price measurement. */
|
|
19370
19534
|
referenceValue: Scalars['Int']['output'];
|
|
19371
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
|
+
};
|
|
19372
19547
|
/** The accepted types of unit of measurement. */
|
|
19373
19548
|
declare enum UnitPriceMeasurementMeasuredType {
|
|
19374
19549
|
/** Unit of measurements representing areas. */
|
|
19375
19550
|
Area = "AREA",
|
|
19551
|
+
/** Unit of measurements representing counts. */
|
|
19552
|
+
Count = "COUNT",
|
|
19376
19553
|
/** Unit of measurements representing lengths. */
|
|
19377
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",
|
|
19378
19557
|
/** Unit of measurements representing volumes. */
|
|
19379
19558
|
Volume = "VOLUME",
|
|
19380
19559
|
/** Unit of measurements representing weights. */
|
|
@@ -19386,12 +19565,26 @@ declare enum UnitPriceMeasurementMeasuredUnit {
|
|
|
19386
19565
|
Cl = "CL",
|
|
19387
19566
|
/** 100 centimeters equals 1 meter. */
|
|
19388
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",
|
|
19389
19574
|
/** Metric system unit of weight. */
|
|
19390
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",
|
|
19391
19582
|
/** 1 kilogram equals 1000 grams. */
|
|
19392
19583
|
Kg = "KG",
|
|
19393
19584
|
/** Metric system unit of volume. */
|
|
19394
19585
|
L = "L",
|
|
19586
|
+
/** Imperial system unit of weight. */
|
|
19587
|
+
Lb = "LB",
|
|
19395
19588
|
/** Metric system unit of length. */
|
|
19396
19589
|
M = "M",
|
|
19397
19590
|
/** Metric system unit of area. */
|
|
@@ -19403,7 +19596,17 @@ declare enum UnitPriceMeasurementMeasuredUnit {
|
|
|
19403
19596
|
/** 1000 milliliters equals 1 liter. */
|
|
19404
19597
|
Ml = "ML",
|
|
19405
19598
|
/** 1000 millimeters equals 1 meter. */
|
|
19406
|
-
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"
|
|
19407
19610
|
}
|
|
19408
19611
|
/** Systems of weights and measures. */
|
|
19409
19612
|
declare enum UnitSystem {
|
|
@@ -19611,6 +19814,7 @@ type CreateRefundResult = {
|
|
|
19611
19814
|
*
|
|
19612
19815
|
* @param orderId - The order ID (numeric, bigint, or GID string)
|
|
19613
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.
|
|
19614
19818
|
* @returns Promise resolving to the created refund
|
|
19615
19819
|
* @throws {ShopifyUserError} When the mutation fails
|
|
19616
19820
|
* @throws {Error} When GraphQL errors occur
|
|
@@ -19628,7 +19832,7 @@ type CreateRefundResult = {
|
|
|
19628
19832
|
* ]
|
|
19629
19833
|
* })
|
|
19630
19834
|
*/
|
|
19631
|
-
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>;
|
|
19632
19836
|
|
|
19633
19837
|
type VariantUpdateInput = Omit<ProductVariantsBulkInput, 'id'> & {
|
|
19634
19838
|
id: string;
|
|
@@ -19642,10 +19846,11 @@ type BulkUpdateProductVariantsResult = {
|
|
|
19642
19846
|
*
|
|
19643
19847
|
* @param productId - The product GID
|
|
19644
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.
|
|
19645
19850
|
* @returns Array of updated variants with id and sku
|
|
19646
19851
|
* @throws {ShopifyUserError} When the mutation fails
|
|
19647
19852
|
*/
|
|
19648
|
-
declare function bulkUpdateProductVariants(productId: string, variants: VariantUpdateInput[]): Promise<BulkUpdateProductVariantsResult[]>;
|
|
19853
|
+
declare function bulkUpdateProductVariants(productId: string, variants: VariantUpdateInput[], retries?: number): Promise<BulkUpdateProductVariantsResult[]>;
|
|
19649
19854
|
|
|
19650
19855
|
type UpsertMetaobjectInput = {
|
|
19651
19856
|
type: string;
|
|
@@ -19665,11 +19870,12 @@ type UpsertMetaobjectResult = {
|
|
|
19665
19870
|
* Creates or updates a metaobject in Shopify based on its type and handle.
|
|
19666
19871
|
*
|
|
19667
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.
|
|
19668
19874
|
* @returns The created/updated metaobject
|
|
19669
19875
|
* @throws {ShopifyUserError} When the upsert fails due to validation errors
|
|
19670
19876
|
* @throws {Error} When GraphQL errors occur or no metaobject is returned
|
|
19671
19877
|
*/
|
|
19672
|
-
declare function upsertMetaobject(input: UpsertMetaobjectInput): Promise<UpsertMetaobjectResult>;
|
|
19878
|
+
declare function upsertMetaobject(input: UpsertMetaobjectInput, retries?: number): Promise<UpsertMetaobjectResult>;
|
|
19673
19879
|
|
|
19674
19880
|
type CustomerDeleteMutationVariables = Exact<{
|
|
19675
19881
|
input: CustomerDeleteInput;
|
|
@@ -20144,6 +20350,7 @@ type OrderPaymentDetailsByIdQuery = {
|
|
|
20144
20350
|
transactions: Array<(Pick<OrderTransaction, 'createdAt' | 'gateway' | 'formattedGateway' | 'kind' | 'paymentId'> & {
|
|
20145
20351
|
amountSet: {
|
|
20146
20352
|
shopMoney: Pick<MoneyV2, 'amount' | 'currencyCode'>;
|
|
20353
|
+
presentmentMoney: Pick<MoneyV2, 'amount' | 'currencyCode'>;
|
|
20147
20354
|
};
|
|
20148
20355
|
})>;
|
|
20149
20356
|
}>;
|
|
@@ -20277,7 +20484,7 @@ interface GeneratedQueryTypes {
|
|
|
20277
20484
|
return: OrderCancellationInfoByNameQuery;
|
|
20278
20485
|
variables: OrderCancellationInfoByNameQueryVariables;
|
|
20279
20486
|
};
|
|
20280
|
-
"#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": {
|
|
20281
20488
|
return: OrderPaymentDetailsByIdQuery;
|
|
20282
20489
|
variables: OrderPaymentDetailsByIdQueryVariables;
|
|
20283
20490
|
};
|
|
@@ -20331,7 +20538,7 @@ interface GeneratedMutationTypes {
|
|
|
20331
20538
|
return: UpsertMetaobjectMutation;
|
|
20332
20539
|
variables: UpsertMetaobjectMutationVariables;
|
|
20333
20540
|
};
|
|
20334
|
-
"#graphql\n mutation orderCancel($orderId: ID!) {\n orderCancel(\n orderId: $orderId\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": {
|
|
20335
20542
|
return: OrderCancelMutation;
|
|
20336
20543
|
variables: OrderCancelMutationVariables;
|
|
20337
20544
|
};
|
|
@@ -20375,10 +20582,12 @@ interface CalculateRefundOptions {
|
|
|
20375
20582
|
*
|
|
20376
20583
|
* @param orderId - The order ID (numeric, bigint, or GID string)
|
|
20377
20584
|
* @param options - Options for the refund calculation
|
|
20585
|
+
* @param retries - Number of retries on transient errors. Defaults to 3.
|
|
20378
20586
|
* @returns The suggested refund or undefined
|
|
20379
20587
|
*/
|
|
20380
|
-
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>;
|
|
20381
20589
|
|
|
20590
|
+
declare function isRetryableError(error: unknown): boolean;
|
|
20382
20591
|
interface ShopifyUserErrorDetail {
|
|
20383
20592
|
code?: string | null;
|
|
20384
20593
|
field?: string[] | null;
|
|
@@ -20532,9 +20741,11 @@ declare const GetLeanOrderByIdReturn: z.ZodObject<{
|
|
|
20532
20741
|
}>;
|
|
20533
20742
|
type LeanOrder = z.infer<typeof GetLeanOrderByIdReturn> | undefined;
|
|
20534
20743
|
type FullOrder = NonNullable<OrderByIdFullQuery['order']>;
|
|
20535
|
-
|
|
20536
|
-
declare function getOrderById(id: number | bigint,
|
|
20537
|
-
declare function getOrderById(id: number | bigint, detailLevel: '
|
|
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>;
|
|
20538
20749
|
|
|
20539
20750
|
declare const GetLeanOrderByNameReturn: z.ZodObject<{
|
|
20540
20751
|
id: z.ZodString;
|
|
@@ -20601,9 +20812,11 @@ declare const GetLeanOrderByNameReturn: z.ZodObject<{
|
|
|
20601
20812
|
}>;
|
|
20602
20813
|
type LeanOrderByName = z.infer<typeof GetLeanOrderByNameReturn> | undefined;
|
|
20603
20814
|
type FullOrderByName = NonNullable<NonNullable<OrdersByNameFullQuery['orders']>['edges'][number]['node']> | undefined;
|
|
20604
|
-
|
|
20605
|
-
declare function getOrderByName(orderName: string,
|
|
20606
|
-
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>;
|
|
20607
20820
|
|
|
20608
20821
|
type OrderCancellationInfo = NonNullable<OrderCancellationInfoByNameQuery['orders']['edges'][number]['node']>;
|
|
20609
20822
|
/**
|
|
@@ -20611,10 +20824,11 @@ type OrderCancellationInfo = NonNullable<OrderCancellationInfoByNameQuery['order
|
|
|
20611
20824
|
* Returns undefined if no order is found with the specified name.
|
|
20612
20825
|
*
|
|
20613
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.
|
|
20614
20828
|
* @returns {Promise<OrderCancellationInfo | undefined>} A promise that resolves to the order cancellation info or undefined if not found.
|
|
20615
20829
|
* @throws {Error} If the GraphQL query fails or if the response structure is invalid.
|
|
20616
20830
|
*/
|
|
20617
|
-
declare function getOrderCancellationInfoByName(orderName: string): Promise<OrderCancellationInfo | undefined>;
|
|
20831
|
+
declare function getOrderCancellationInfoByName(orderName: string, retries?: number): Promise<OrderCancellationInfo | undefined>;
|
|
20618
20832
|
|
|
20619
20833
|
declare const GetLeanProductVariantsReturn: z.ZodArray<z.ZodObject<{
|
|
20620
20834
|
productId: z.ZodString;
|
|
@@ -20651,10 +20865,11 @@ type LeanProductVariantsOptions = {
|
|
|
20651
20865
|
* @param {string[]} [skus] - An optional array of SKUs to filter by. If provided, only variants matching these SKUs will be fetched.
|
|
20652
20866
|
* @param {LeanProductVariantsOptions} [options] - Optional settings.
|
|
20653
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.
|
|
20654
20869
|
* @returns {Promise<LeanProductVariant[]>} A promise that resolves to an array of lean product variant data.
|
|
20655
20870
|
* @throws {Error} If the GraphQL query fails, returns no data, or if the `productVariants` field is missing in the response.
|
|
20656
20871
|
*/
|
|
20657
|
-
declare function getLeanProductVariants(skus?: string[], options?: LeanProductVariantsOptions): Promise<LeanProductVariant[]>;
|
|
20872
|
+
declare function getLeanProductVariants(skus?: string[], options?: LeanProductVariantsOptions, retries?: number): Promise<LeanProductVariant[]>;
|
|
20658
20873
|
|
|
20659
20874
|
declare const GetProductVariantsBySkusReturn: z.ZodArray<z.ZodObject<{
|
|
20660
20875
|
productId: z.ZodString;
|
|
@@ -20690,10 +20905,11 @@ type ProductVariantsBySkusOptions = {
|
|
|
20690
20905
|
* @param {string[]} skus - Array of SKUs to filter by.
|
|
20691
20906
|
* @param {ProductVariantsBySkusOptions} [options] - Optional settings.
|
|
20692
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.
|
|
20693
20909
|
* @returns {Promise<ProductVariantBySku[]>} A promise that resolves to an array of product variant data.
|
|
20694
20910
|
* @throws {Error} If the GraphQL query fails or returns no data.
|
|
20695
20911
|
*/
|
|
20696
|
-
declare function getProductVariantsBySkus(skus: string[], options?: ProductVariantsBySkusOptions): Promise<ProductVariantBySku[]>;
|
|
20912
|
+
declare function getProductVariantsBySkus(skus: string[], options?: ProductVariantsBySkusOptions, retries?: number): Promise<ProductVariantBySku[]>;
|
|
20697
20913
|
|
|
20698
20914
|
declare const ProductVariantSchema: z.ZodObject<{
|
|
20699
20915
|
status: z.ZodEnum<["ACTIVE", "ARCHIVED", "DRAFT"]>;
|
|
@@ -20740,10 +20956,11 @@ type ProductVariant = z.infer<typeof ProductVariantSchema>;
|
|
|
20740
20956
|
* Each variant includes product info with combined title (product + variant title
|
|
20741
20957
|
* when variant title is not "Default Title"), URL with variant ID, and inventory data.
|
|
20742
20958
|
*
|
|
20959
|
+
* @param {number} retries - Number of retries on transient errors. Defaults to 3.
|
|
20743
20960
|
* @returns {Promise<ProductVariant[]>} A promise that resolves to an array of product variants.
|
|
20744
20961
|
* @throws {Error} If the GraphQL query fails or if the response is missing expected data.
|
|
20745
20962
|
*/
|
|
20746
|
-
declare function getAllProductVariants(): Promise<ProductVariant[]>;
|
|
20963
|
+
declare function getAllProductVariants(retries?: number): Promise<ProductVariant[]>;
|
|
20747
20964
|
|
|
20748
20965
|
type OrderPaymentDetails = NonNullable<OrderPaymentDetailsByIdQuery['order']>;
|
|
20749
20966
|
/**
|
|
@@ -20751,10 +20968,11 @@ type OrderPaymentDetails = NonNullable<OrderPaymentDetailsByIdQuery['order']>;
|
|
|
20751
20968
|
* Returns undefined if no order is found with the specified ID.
|
|
20752
20969
|
*
|
|
20753
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.
|
|
20754
20972
|
* @returns {Promise<OrderPaymentDetails | undefined>} A promise that resolves to the order payment data or undefined if not found.
|
|
20755
20973
|
* @throws {Error} If the GraphQL query fails.
|
|
20756
20974
|
*/
|
|
20757
|
-
declare function getOrderPaymentDetailsById(id: bigint): Promise<OrderPaymentDetails | undefined>;
|
|
20975
|
+
declare function getOrderPaymentDetailsById(id: bigint, retries?: number): Promise<OrderPaymentDetails | undefined>;
|
|
20758
20976
|
|
|
20759
20977
|
type Fulfillment = NonNullable<FulfillmentByIdQuery['fulfillment']>;
|
|
20760
20978
|
/**
|
|
@@ -20762,10 +20980,11 @@ type Fulfillment = NonNullable<FulfillmentByIdQuery['fulfillment']>;
|
|
|
20762
20980
|
* Returns undefined if no fulfillment is found with the specified ID.
|
|
20763
20981
|
*
|
|
20764
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.
|
|
20765
20984
|
* @returns {Promise<Fulfillment | undefined>} A promise that resolves to the fulfillment data or undefined if not found.
|
|
20766
20985
|
* @throws {Error} If the GraphQL query fails or if the response structure is invalid.
|
|
20767
20986
|
*/
|
|
20768
|
-
declare function getFulfillmentById(id: string | number | bigint): Promise<Fulfillment | undefined>;
|
|
20987
|
+
declare function getFulfillmentById(id: string | number | bigint, retries?: number): Promise<Fulfillment | undefined>;
|
|
20769
20988
|
|
|
20770
20989
|
type FulfillmentOrderEdge = NonNullable<FulfillmentOrdersByOrderIdQuery['order']>['fulfillmentOrders']['edges'][number];
|
|
20771
20990
|
type FulfillmentOrder = FulfillmentOrderEdge['node'];
|
|
@@ -20775,10 +20994,11 @@ type FulfillmentOrderLineItem = FulfillmentOrder['lineItems']['edges'][number]['
|
|
|
20775
20994
|
* Returns an empty array if no order is found or if the order has no fulfillment orders.
|
|
20776
20995
|
*
|
|
20777
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.
|
|
20778
20998
|
* @returns {Promise<FulfillmentOrder[]>} A promise that resolves to an array of fulfillment orders.
|
|
20779
20999
|
* @throws {Error} If the GraphQL query fails or if the response structure is invalid.
|
|
20780
21000
|
*/
|
|
20781
|
-
declare function getFulfillmentOrdersByOrderId(orderId: string | number | bigint): Promise<FulfillmentOrder[]>;
|
|
21001
|
+
declare function getFulfillmentOrdersByOrderId(orderId: string | number | bigint, retries?: number): Promise<FulfillmentOrder[]>;
|
|
20782
21002
|
|
|
20783
21003
|
type FulfillmentTrackingIds = {
|
|
20784
21004
|
trackingNumbers: string[];
|
|
@@ -20789,10 +21009,11 @@ type FulfillmentTrackingIds = {
|
|
|
20789
21009
|
* Returns the tracking numbers and the tracking company.
|
|
20790
21010
|
*
|
|
20791
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.
|
|
20792
21013
|
* @returns {Promise<FulfillmentTrackingIds | undefined>} A promise that resolves to the tracking info or undefined if fulfillment not found.
|
|
20793
21014
|
* @throws {Error} If the GraphQL query fails.
|
|
20794
21015
|
*/
|
|
20795
|
-
declare function getFulfillmentTrackingIds(id: string | number | bigint): Promise<FulfillmentTrackingIds | undefined>;
|
|
21016
|
+
declare function getFulfillmentTrackingIds(id: string | number | bigint, retries?: number): Promise<FulfillmentTrackingIds | undefined>;
|
|
20796
21017
|
|
|
20797
21018
|
type Customer = CustomersByEmailQuery['customers']['edges'][number]['node'];
|
|
20798
21019
|
/**
|
|
@@ -20801,10 +21022,11 @@ type Customer = CustomersByEmailQuery['customers']['edges'][number]['node'];
|
|
|
20801
21022
|
*
|
|
20802
21023
|
* @param {string} email - The email address to search for.
|
|
20803
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.
|
|
20804
21026
|
* @returns {Promise<Customer[]>} A promise that resolves to an array of customers.
|
|
20805
21027
|
* @throws {Error} If the GraphQL query fails or if the response structure is invalid.
|
|
20806
21028
|
*/
|
|
20807
|
-
declare function getCustomersByEmail(email: string, limit?: number): Promise<Customer[]>;
|
|
21029
|
+
declare function getCustomersByEmail(email: string, limit?: number, retries?: number): Promise<Customer[]>;
|
|
20808
21030
|
|
|
20809
21031
|
type CustomerSegmentMember = CustomerSegmentMembersWithStatisticsQuery['customerSegmentMembers']['edges'][number]['node'];
|
|
20810
21032
|
type SegmentAttributeStatistics = CustomerSegmentMembersWithStatisticsQuery['customerSegmentMembers']['statistics']['attributeStatistics'];
|
|
@@ -20822,10 +21044,11 @@ interface CustomerSegmentMembersResult {
|
|
|
20822
21044
|
* @param {string} query - The segment query filter string (e.g., "customer_account_status = 'ENABLED'").
|
|
20823
21045
|
* @param {string} statisticsAttributeName - Attribute name for statistics (e.g., "amount_spent").
|
|
20824
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.
|
|
20825
21048
|
* @returns {Promise<CustomerSegmentMembersResult>} Members with statistics.
|
|
20826
21049
|
* @throws {Error} If the GraphQL query fails.
|
|
20827
21050
|
*/
|
|
20828
|
-
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>;
|
|
20829
21052
|
|
|
20830
21053
|
type CustomerOrders = NonNullable<OrdersByCustomerIdQuery['customer']>['orders'];
|
|
20831
21054
|
type OrderPreview = CustomerOrders['edges'][number]['node'];
|
|
@@ -20835,10 +21058,11 @@ type OrderPreview = CustomerOrders['edges'][number]['node'];
|
|
|
20835
21058
|
*
|
|
20836
21059
|
* @param {number | bigint} customerId - The numerical Shopify customer ID.
|
|
20837
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.
|
|
20838
21062
|
* @returns {Promise<OrderPreview[]>} A promise that resolves to an array of order previews.
|
|
20839
21063
|
* @throws {Error} If the GraphQL query fails.
|
|
20840
21064
|
*/
|
|
20841
|
-
declare function getOrdersByCustomerId(customerId: number | bigint, limit?: number): Promise<OrderPreview[]>;
|
|
21065
|
+
declare function getOrdersByCustomerId(customerId: number | bigint, limit?: number, retries?: number): Promise<OrderPreview[]>;
|
|
20842
21066
|
|
|
20843
21067
|
/**
|
|
20844
21068
|
* Extract numeric ID from a Shopify GID string.
|
|
@@ -20855,8 +21079,9 @@ type Metaobject = NonNullable<MetaobjectByHandleQuery['metaobjectByHandle']>;
|
|
|
20855
21079
|
* Returns undefined if no metaobject is found with the specified type and handle.
|
|
20856
21080
|
*
|
|
20857
21081
|
* @param handle - The handle input containing type and handle
|
|
21082
|
+
* @param retries - Number of retries on transient errors. Defaults to 3.
|
|
20858
21083
|
* @returns A promise that resolves to the metaobject data or undefined if not found.
|
|
20859
21084
|
*/
|
|
20860
|
-
declare function getMetaobjectByHandle(handle: MetaobjectHandleInput): Promise<Metaobject | undefined>;
|
|
21085
|
+
declare function getMetaobjectByHandle(handle: MetaobjectHandleInput, retries?: number): Promise<Metaobject | undefined>;
|
|
20861
21086
|
|
|
20862
|
-
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 };
|