@ehrenkind/shopify-lib 0.0.6 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -34
- package/dist/generated-api-types/2025-04/admin.generated.d.ts +209 -0
- package/dist/generated-api-types/2025-04/admin.generated.d.ts.map +1 -0
- package/dist/generated-api-types/2025-04/admin.generated.js +5 -0
- package/dist/generated-api-types/2025-04/admin.generated.js.map +1 -0
- package/dist/generated-api-types/2025-04/admin.types.d.ts +60044 -0
- package/dist/generated-api-types/2025-04/admin.types.d.ts.map +1 -0
- package/dist/generated-api-types/2025-04/admin.types.js +11451 -0
- package/dist/generated-api-types/2025-04/admin.types.js.map +1 -0
- package/dist/index.cjs +96 -37
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +168 -49
- package/dist/index.d.ts +5 -18816
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +95 -37
- package/dist/index.mjs.map +1 -1
- package/dist/mutations/customers/deleteCustomerById.d.ts +4 -0
- package/dist/mutations/customers/deleteCustomerById.d.ts.map +1 -0
- package/dist/mutations/customers/deleteCustomerById.js +38 -0
- package/dist/mutations/customers/deleteCustomerById.js.map +1 -0
- package/dist/mutations/customers/deleteCustomerById.mock.d.ts +4 -0
- package/dist/mutations/customers/deleteCustomerById.mock.d.ts.map +1 -0
- package/dist/mutations/customers/deleteCustomerById.mock.js +8 -0
- package/dist/mutations/customers/deleteCustomerById.mock.js.map +1 -0
- package/dist/mutations/customers/deleteCustomerById.test.d.ts +2 -0
- package/dist/mutations/customers/deleteCustomerById.test.d.ts.map +1 -0
- package/dist/mutations/customers/deleteCustomerById.test.js +10 -0
- package/dist/mutations/customers/deleteCustomerById.test.js.map +1 -0
- package/dist/mutations/productVariantsBulkUpdate/connectMetaObjectToProductVariant.d.ts +4 -0
- package/dist/mutations/productVariantsBulkUpdate/connectMetaObjectToProductVariant.d.ts.map +1 -0
- package/dist/mutations/productVariantsBulkUpdate/connectMetaObjectToProductVariant.js +56 -0
- package/dist/mutations/productVariantsBulkUpdate/connectMetaObjectToProductVariant.js.map +1 -0
- package/dist/mutations/productVariantsBulkUpdate/connectMetaObjectToProductVariant.mock.d.ts +3 -0
- package/dist/mutations/productVariantsBulkUpdate/connectMetaObjectToProductVariant.mock.d.ts.map +1 -0
- package/dist/mutations/productVariantsBulkUpdate/connectMetaObjectToProductVariant.mock.js +11 -0
- package/dist/mutations/productVariantsBulkUpdate/connectMetaObjectToProductVariant.mock.js.map +1 -0
- package/dist/mutations/productVariantsBulkUpdate/connectMetaObjectToProductVariant.test.d.ts +2 -0
- package/dist/mutations/productVariantsBulkUpdate/connectMetaObjectToProductVariant.test.d.ts.map +1 -0
- package/dist/mutations/productVariantsBulkUpdate/connectMetaObjectToProductVariant.test.js +11 -0
- package/dist/mutations/productVariantsBulkUpdate/connectMetaObjectToProductVariant.test.js.map +1 -0
- package/dist/queries/orders/getOrderByName.d.ts +72 -0
- package/dist/queries/orders/getOrderByName.d.ts.map +1 -0
- package/dist/queries/orders/getOrderByName.js +117 -0
- package/dist/queries/orders/getOrderByName.js.map +1 -0
- package/dist/queries/orders/getOrderByName.mock.d.ts +21 -0
- package/dist/queries/orders/getOrderByName.mock.d.ts.map +1 -0
- package/dist/queries/orders/getOrderByName.mock.js +55 -0
- package/dist/queries/orders/getOrderByName.mock.js.map +1 -0
- package/dist/queries/orders/getOrderByName.queries.d.ts +3 -0
- package/dist/queries/orders/getOrderByName.queries.d.ts.map +1 -0
- package/dist/queries/orders/getOrderByName.queries.js +335 -0
- package/dist/queries/orders/getOrderByName.queries.js.map +1 -0
- package/dist/queries/orders/getOrderByName.test.d.ts +2 -0
- package/dist/queries/orders/getOrderByName.test.d.ts.map +1 -0
- package/dist/queries/orders/getOrderByName.test.js +28 -0
- package/dist/queries/orders/getOrderByName.test.js.map +1 -0
- package/dist/queries/orders/getOrderPaymentDetails.d.ts +130 -0
- package/dist/queries/orders/getOrderPaymentDetails.d.ts.map +1 -0
- package/dist/queries/orders/getOrderPaymentDetails.js +45 -0
- package/dist/queries/orders/getOrderPaymentDetails.js.map +1 -0
- package/dist/queries/orders/getOrderPaymentDetails.queries.d.ts +2 -0
- package/dist/queries/orders/getOrderPaymentDetails.queries.d.ts.map +1 -0
- package/dist/queries/orders/getOrderPaymentDetails.queries.js +21 -0
- package/dist/queries/orders/getOrderPaymentDetails.queries.js.map +1 -0
- package/dist/queries/productVariants/getLeanProductVariants.d.ts +33 -0
- package/dist/queries/productVariants/getLeanProductVariants.d.ts.map +1 -0
- package/dist/queries/productVariants/getLeanProductVariants.js +81 -0
- package/dist/queries/productVariants/getLeanProductVariants.js.map +1 -0
- package/dist/queries/productVariants/getLeanProductVariants.mock.d.ts +3 -0
- package/dist/queries/productVariants/getLeanProductVariants.mock.d.ts.map +1 -0
- package/dist/queries/productVariants/getLeanProductVariants.mock.js +33 -0
- package/dist/queries/productVariants/getLeanProductVariants.mock.js.map +1 -0
- package/dist/queries/productVariants/getLeanProductVariants.test.d.ts +2 -0
- package/dist/queries/productVariants/getLeanProductVariants.test.d.ts.map +1 -0
- package/dist/queries/productVariants/getLeanProductVariants.test.js +38 -0
- package/dist/queries/productVariants/getLeanProductVariants.test.js.map +1 -0
- package/dist/utils/logger.d.ts +11 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +50 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/mswHandlers.d.ts +2 -0
- package/dist/utils/mswHandlers.d.ts.map +1 -0
- package/dist/utils/mswHandlers.js +41 -0
- package/dist/utils/mswHandlers.js.map +1 -0
- package/dist/utils/shopifyClient.d.ts +6 -0
- package/dist/utils/shopifyClient.d.ts.map +1 -0
- package/dist/utils/shopifyClient.js +82 -0
- package/dist/utils/shopifyClient.js.map +1 -0
- package/dist/utils/shopifyClient.mock.d.ts +3 -0
- package/dist/utils/shopifyClient.mock.d.ts.map +1 -0
- package/dist/utils/shopifyClient.mock.js +19 -0
- package/dist/utils/shopifyClient.mock.js.map +1 -0
- package/dist/utils/shopifyClient.test.d.ts +2 -0
- package/dist/utils/shopifyClient.test.d.ts.map +1 -0
- package/dist/utils/shopifyClient.test.js +27 -0
- package/dist/utils/shopifyClient.test.js.map +1 -0
- package/dist/utils/shopifyFetch.d.ts +24 -0
- package/dist/utils/shopifyFetch.d.ts.map +1 -0
- package/dist/utils/shopifyFetch.js +67 -0
- package/dist/utils/shopifyFetch.js.map +1 -0
- package/dist/utils/shopifyFetch.test.d.ts +2 -0
- package/dist/utils/shopifyFetch.test.d.ts.map +1 -0
- package/dist/utils/shopifyFetch.test.js +17 -0
- package/dist/utils/shopifyFetch.test.js.map +1 -0
- package/dist/utils/test-setup.d.ts +2 -0
- package/dist/utils/test-setup.d.ts.map +1 -0
- package/dist/utils/test-setup.js +13 -0
- package/dist/utils/test-setup.js.map +1 -0
- package/dist/utils/zod.d.ts +3 -0
- package/dist/utils/zod.d.ts.map +1 -0
- package/dist/utils/zod.js +19 -0
- package/dist/utils/zod.js.map +1 -0
- package/package.json +3 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import z from 'zod';
|
|
2
2
|
|
|
3
|
+
declare const DeleteCustomerByIdReturn: z.ZodNullable<z.ZodString>;
|
|
4
|
+
declare function deleteCustomerById(customerId: string): Promise<z.infer<typeof DeleteCustomerByIdReturn>>;
|
|
5
|
+
|
|
3
6
|
type Maybe<T> = T | null;
|
|
4
7
|
type InputMaybe<T> = Maybe<T>;
|
|
5
8
|
type Exact<T extends {
|
|
@@ -3557,6 +3560,21 @@ type CustomerCreditCardBillingAddress = {
|
|
|
3557
3560
|
/** The zip or postal code of the address. */
|
|
3558
3561
|
zip?: Maybe<Scalars['String']['output']>;
|
|
3559
3562
|
};
|
|
3563
|
+
/** The input fields to delete a customer. */
|
|
3564
|
+
type CustomerDeleteInput = {
|
|
3565
|
+
/** The ID of the customer to delete. */
|
|
3566
|
+
id: Scalars['ID']['input'];
|
|
3567
|
+
};
|
|
3568
|
+
/** Return type for `customerDelete` mutation. */
|
|
3569
|
+
type CustomerDeletePayload = {
|
|
3570
|
+
__typename?: 'CustomerDeletePayload';
|
|
3571
|
+
/** The ID of the deleted customer. */
|
|
3572
|
+
deletedCustomerId?: Maybe<Scalars['ID']['output']>;
|
|
3573
|
+
/** The shop of the deleted customer. */
|
|
3574
|
+
shop: Shop;
|
|
3575
|
+
/** The list of errors that occurred from executing the mutation. */
|
|
3576
|
+
userErrors: Array<UserError>;
|
|
3577
|
+
};
|
|
3560
3578
|
/** An auto-generated type which holds one Customer and a cursor during pagination. */
|
|
3561
3579
|
type CustomerEdge = {
|
|
3562
3580
|
__typename?: 'CustomerEdge';
|
|
@@ -7121,11 +7139,11 @@ type FinancialSummaryDiscountApplication = {
|
|
|
7121
7139
|
targetType: DiscountApplicationTargetType;
|
|
7122
7140
|
};
|
|
7123
7141
|
/**
|
|
7124
|
-
*
|
|
7125
|
-
*
|
|
7126
|
-
*
|
|
7127
|
-
*
|
|
7128
|
-
*
|
|
7142
|
+
* A shipment of one or more items from an [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order). Tracks which [`LineItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/LineItem) objects ship, their quantities, and the shipment's tracking information.
|
|
7143
|
+
*
|
|
7144
|
+
* Includes tracking details such as the carrier, tracking numbers, and URLs. The fulfillment connects to both the original order and any associated [`FulfillmentOrder`](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentOrder) objects. [`FulfillmentEvent`](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentEvent) objects record milestones throughout the shipment lifecycle, from creation through delivery.
|
|
7145
|
+
*
|
|
7146
|
+
* Multiple fulfillments can exist for a single order when items either ship separately or from different locations.
|
|
7129
7147
|
*/
|
|
7130
7148
|
type Fulfillment = LegacyInteroperability & Node & {
|
|
7131
7149
|
__typename?: 'Fulfillment';
|
|
@@ -7228,7 +7246,11 @@ type FulfillmentEdge = {
|
|
|
7228
7246
|
/** The item at the end of FulfillmentEdge. */
|
|
7229
7247
|
node: Fulfillment;
|
|
7230
7248
|
};
|
|
7231
|
-
/**
|
|
7249
|
+
/**
|
|
7250
|
+
* A tracking event that records the status and location of a fulfillment at a specific point in time. Each event captures details such as the [status](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentEvent#field-FulfillmentEvent.fields.status) (for example, in transit, out for delivery, delivered) and any [messages](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentEvent#field-FulfillmentEvent.fields.message) associated with the event.
|
|
7251
|
+
*
|
|
7252
|
+
* Fulfillment events provide a chronological history of a package's journey from shipment to delivery. They include timestamps, geographic coordinates, and estimated delivery dates to track fulfillment progress.
|
|
7253
|
+
*/
|
|
7232
7254
|
type FulfillmentEvent = Node & {
|
|
7233
7255
|
__typename?: 'FulfillmentEvent';
|
|
7234
7256
|
/** The street address where this fulfillment event occurred. */
|
|
@@ -7339,7 +7361,11 @@ declare enum FulfillmentHoldReason {
|
|
|
7339
7361
|
/** The fulfillment hold is applied because of an unknown delivery date. */
|
|
7340
7362
|
UnknownDeliveryDate = "UNKNOWN_DELIVERY_DATE"
|
|
7341
7363
|
}
|
|
7342
|
-
/**
|
|
7364
|
+
/**
|
|
7365
|
+
* A line item from an [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) that's included in a [`Fulfillment`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Fulfillment). Links the fulfillment to specific items from the original order, tracking how many units were fulfilled.
|
|
7366
|
+
*
|
|
7367
|
+
* > Note: The discounted total excludes order-level discounts, showing only line-item specific discount amounts.
|
|
7368
|
+
*/
|
|
7343
7369
|
type FulfillmentLineItem = Node & {
|
|
7344
7370
|
__typename?: 'FulfillmentLineItem';
|
|
7345
7371
|
/**
|
|
@@ -7755,7 +7781,11 @@ type FulfillmentOrderInternationalDuties = {
|
|
|
7755
7781
|
/** The method of duties payment. Example values: `DDP`, `DAP`. */
|
|
7756
7782
|
incoterm: Scalars['String']['output'];
|
|
7757
7783
|
};
|
|
7758
|
-
/**
|
|
7784
|
+
/**
|
|
7785
|
+
* Associates an order line item with the quantities that require fulfillment as part of a fulfillment order. Each Fulfillment Order Line Item object tracks the total quantity to fulfill and the remaining quantity yet to be fulfilled, along with details about the line item being fulfilled and pricing information.
|
|
7786
|
+
*
|
|
7787
|
+
* The line item provides additional fulfillment data including whether the item requires shipping. Financial summaries show pricing details with discounts applied, while warning messages alert merchants to any issues that might affect fulfillment.
|
|
7788
|
+
*/
|
|
7759
7789
|
type FulfillmentOrderLineItem = Node & {
|
|
7760
7790
|
__typename?: 'FulfillmentOrderLineItem';
|
|
7761
7791
|
/** The financial summary for the Fulfillment Order's Line Items. */
|
|
@@ -8092,6 +8122,7 @@ type FulfillmentService = {
|
|
|
8092
8122
|
* Whether the fulfillment service can stock inventory alongside other locations.
|
|
8093
8123
|
* @deprecated Fulfillment services are all migrating to permit SKU sharing.
|
|
8094
8124
|
* Setting permits SKU sharing to false [is no longer supported](https://shopify.dev/changelog/setting-permitsskusharing-argument-to-false-when-creating-a-fulfillment-service-returns-an-error).
|
|
8125
|
+
* As of API version `2026-04` this field will be removed.
|
|
8095
8126
|
*
|
|
8096
8127
|
*/
|
|
8097
8128
|
permitsSkuSharing: Scalars['Boolean']['output'];
|
|
@@ -9299,9 +9330,9 @@ declare enum LocalizedFieldPurpose {
|
|
|
9299
9330
|
Tax = "TAX"
|
|
9300
9331
|
}
|
|
9301
9332
|
/**
|
|
9302
|
-
*
|
|
9303
|
-
*
|
|
9304
|
-
* local delivery
|
|
9333
|
+
* A physical location where merchants store and fulfill inventory. Locations include retail stores, warehouses, popups, dropshippers, or other places where inventory is managed or stocked.
|
|
9334
|
+
*
|
|
9335
|
+
* Active locations can fulfill online orders when configured with shipping rates, local pickup, or local delivery options. Locations track inventory quantities for [products](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) and process [order](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) fulfillment. Third-party apps using [`FulfillmentService`](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentService) can create and manage their own locations.
|
|
9305
9336
|
*/
|
|
9306
9337
|
type Location = HasMetafieldDefinitions & HasMetafields & LegacyInteroperability & Node & {
|
|
9307
9338
|
__typename?: 'Location';
|
|
@@ -12110,7 +12141,10 @@ type OrderTransaction = Node & {
|
|
|
12110
12141
|
* @deprecated Use `amountSet` instead.
|
|
12111
12142
|
*/
|
|
12112
12143
|
amountV2: MoneyV2;
|
|
12113
|
-
/**
|
|
12144
|
+
/**
|
|
12145
|
+
* Authorization code associated with the transaction.
|
|
12146
|
+
* @deprecated Use `paymentId` instead.
|
|
12147
|
+
*/
|
|
12114
12148
|
authorizationCode?: Maybe<Scalars['String']['output']>;
|
|
12115
12149
|
/** The time when the authorization expires. This field is available only to stores on a Shopify Plus plan. */
|
|
12116
12150
|
authorizationExpiresAt?: Maybe<Scalars['DateTime']['output']>;
|
|
@@ -12570,13 +12604,11 @@ declare enum PaypalExpressSubscriptionsGatewayStatus {
|
|
|
12570
12604
|
Pending = "PENDING"
|
|
12571
12605
|
}
|
|
12572
12606
|
/**
|
|
12573
|
-
*
|
|
12574
|
-
* You can use price lists to specify either fixed prices or adjusted relative prices that
|
|
12575
|
-
* override initial product variant prices. Price lists are applied to customers
|
|
12576
|
-
* using context rules, which determine price list eligibility.
|
|
12607
|
+
* 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.
|
|
12577
12608
|
*
|
|
12578
|
-
*
|
|
12579
|
-
*
|
|
12609
|
+
* Each price list associates with a [`Catalog`](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Catalog) to determine which customers see the pricing. The catalog's context rules control when the price list applies, such as for specific markets, company locations, or apps.
|
|
12610
|
+
*
|
|
12611
|
+
* Learn how to [support different pricing models](https://shopify.dev/docs/apps/build/markets/build-catalog).
|
|
12580
12612
|
*/
|
|
12581
12613
|
type PriceList = Node & {
|
|
12582
12614
|
__typename?: 'PriceList';
|
|
@@ -12649,8 +12681,9 @@ type PriceListParent = {
|
|
|
12649
12681
|
settings: PriceListAdjustmentSettings;
|
|
12650
12682
|
};
|
|
12651
12683
|
/**
|
|
12652
|
-
*
|
|
12653
|
-
*
|
|
12684
|
+
* Pricing for a [`ProductVariant`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) on a [`PriceList`](https://shopify.dev/docs/api/admin-graphql/latest/objects/PriceList). Represents the variant's price, compare-at price, and whether the price is fixed or calculated using percentage-based adjustments. The [`PriceListPriceOriginType`](https://shopify.dev/docs/api/admin-graphql/latest/enums/PriceListPriceOriginType) distinguishes between prices set directly on the price list (fixed) and prices calculated using the price list's adjustment configuration (relative).
|
|
12685
|
+
*
|
|
12686
|
+
* Learn more about [building catalogs with different pricing models](https://shopify.dev/docs/apps/build/markets/build-catalog).
|
|
12654
12687
|
*/
|
|
12655
12688
|
type PriceListPrice = {
|
|
12656
12689
|
__typename?: 'PriceListPrice';
|
|
@@ -13992,7 +14025,11 @@ type RefundEdge = {
|
|
|
13992
14025
|
/** The item at the end of RefundEdge. */
|
|
13993
14026
|
node: Refund;
|
|
13994
14027
|
};
|
|
13995
|
-
/**
|
|
14028
|
+
/**
|
|
14029
|
+
* A [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) or [`ProductVariant`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) being refunded from an order. Each refund line item tracks the quantity, pricing, and restocking details for items returned to the merchant.
|
|
14030
|
+
*
|
|
14031
|
+
* The refund line item links to the original [`LineItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/LineItem) from the [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) and includes financial information such as the refunded price, subtotal, and taxes in both shop and presentment currencies. The [`restockType`](https://shopify.dev/docs/api/admin-graphql/latest/objects/RefundLineItem#field-RefundLineItem.fields.restockType) field indicates whether and how the merchant restocks the returned items to inventory, while the [`location`](https://shopify.dev/docs/api/admin-graphql/latest/objects/RefundLineItem#field-RefundLineItem.fields.location) field specifies where restocking occurs.
|
|
14032
|
+
*/
|
|
13996
14033
|
type RefundLineItem = {
|
|
13997
14034
|
__typename?: 'RefundLineItem';
|
|
13998
14035
|
/** A globally-unique ID. */
|
|
@@ -15365,7 +15402,7 @@ declare enum ShippingDiscountClass {
|
|
|
15365
15402
|
/** Combined as a shipping discount. */
|
|
15366
15403
|
Shipping = "SHIPPING"
|
|
15367
15404
|
}
|
|
15368
|
-
/**
|
|
15405
|
+
/** The shipping method that customers select for an order. Includes pricing details, carrier information, and any applied discounts or taxes. */
|
|
15369
15406
|
type ShippingLine = {
|
|
15370
15407
|
__typename?: 'ShippingLine';
|
|
15371
15408
|
/**
|
|
@@ -15470,7 +15507,11 @@ type ShippingRefund = {
|
|
|
15470
15507
|
/** The monetary value of the tax allocated to shipping fees to be refunded in shop and presentment currencies. */
|
|
15471
15508
|
taxSet: MoneyBag;
|
|
15472
15509
|
};
|
|
15473
|
-
/**
|
|
15510
|
+
/**
|
|
15511
|
+
* The central configuration and settings hub for a Shopify store. Access business information, operational preferences, feature availability, and store-wide settings that control how the shop operates.
|
|
15512
|
+
*
|
|
15513
|
+
* 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.
|
|
15514
|
+
*/
|
|
15474
15515
|
type Shop = HasMetafields & HasPublishedTranslations & Node & {
|
|
15475
15516
|
__typename?: 'Shop';
|
|
15476
15517
|
/** Account owner information. */
|
|
@@ -15954,7 +15995,7 @@ type ShopPayInstallmentsPaymentDetails = BasePaymentDetails & {
|
|
|
15954
15995
|
/** The name of payment method used by the buyer. */
|
|
15955
15996
|
paymentMethodName?: Maybe<Scalars['String']['output']>;
|
|
15956
15997
|
};
|
|
15957
|
-
/** The billing plan
|
|
15998
|
+
/** The shop's billing plan and subscription details. Indicates the plan tier (such as Basic, Advanced, or Plus), whether the shop has a Shopify Plus subscription, and if it's a dev store for testing. */
|
|
15958
15999
|
type ShopPlan = {
|
|
15959
16000
|
__typename?: 'ShopPlan';
|
|
15960
16001
|
/**
|
|
@@ -18067,7 +18108,11 @@ declare enum TaxExemption {
|
|
|
18067
18108
|
/** This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Wyoming. */
|
|
18068
18109
|
UsWyResellerExemption = "US_WY_RESELLER_EXEMPTION"
|
|
18069
18110
|
}
|
|
18070
|
-
/**
|
|
18111
|
+
/**
|
|
18112
|
+
* A tax applied to a [`LineItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/LineItem) or [`ShippingLine`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ShippingLine). Includes the tax amount, rate, title, and whether the channel that submitted the tax is liable for remitting it.
|
|
18113
|
+
*
|
|
18114
|
+
* The tax amount in both shop and presentment currencies after applying discounts. Includes information about the tax rate, whether the channel is liable for remitting the tax, and other tax-related details.
|
|
18115
|
+
*/
|
|
18071
18116
|
type TaxLine = {
|
|
18072
18117
|
__typename?: 'TaxLine';
|
|
18073
18118
|
/** Whether the channel that submitted the tax line is liable for remitting. A value of null indicates unknown liability for this tax line. */
|
|
@@ -18452,6 +18497,14 @@ declare enum WeightUnit {
|
|
|
18452
18497
|
Pounds = "POUNDS"
|
|
18453
18498
|
}
|
|
18454
18499
|
|
|
18500
|
+
type CustomerDeleteMutationVariables = Exact<{
|
|
18501
|
+
input: CustomerDeleteInput;
|
|
18502
|
+
}>;
|
|
18503
|
+
type CustomerDeleteMutation = {
|
|
18504
|
+
customerDelete?: Maybe<(Pick<CustomerDeletePayload, 'deletedCustomerId'> & {
|
|
18505
|
+
userErrors: Array<Pick<UserError, 'field' | 'message'>>;
|
|
18506
|
+
})>;
|
|
18507
|
+
};
|
|
18455
18508
|
type ConnectMetaObjectToProductVariantMutationVariables = Exact<{
|
|
18456
18509
|
productId: Scalars['ID']['input'];
|
|
18457
18510
|
variantId: Scalars['ID']['input'];
|
|
@@ -18464,14 +18517,6 @@ type ConnectMetaObjectToProductVariantMutation = {
|
|
|
18464
18517
|
userErrors: Array<Pick<ProductVariantsBulkUpdateUserError, 'field' | 'message'>>;
|
|
18465
18518
|
}>;
|
|
18466
18519
|
};
|
|
18467
|
-
type OrderPaymentDetailsByIdQueryVariables = Exact<{
|
|
18468
|
-
id: Scalars['ID']['input'];
|
|
18469
|
-
}>;
|
|
18470
|
-
type OrderPaymentDetailsByIdQuery = {
|
|
18471
|
-
order?: Maybe<{
|
|
18472
|
-
transactions: Array<Pick<OrderTransaction, 'createdAt' | 'gateway' | 'formattedGateway' | 'kind' | 'paymentId'>>;
|
|
18473
|
-
}>;
|
|
18474
|
-
};
|
|
18475
18520
|
type OrdersByNameQueryVariables = Exact<{
|
|
18476
18521
|
first: Scalars['Int']['input'];
|
|
18477
18522
|
queryFilter: Scalars['String']['input'];
|
|
@@ -18582,6 +18627,18 @@ type OrdersByNameFullQuery = {
|
|
|
18582
18627
|
pageInfo: Pick<PageInfo, 'hasNextPage' | 'endCursor'>;
|
|
18583
18628
|
};
|
|
18584
18629
|
};
|
|
18630
|
+
type OrderPaymentDetailsByIdQueryVariables = Exact<{
|
|
18631
|
+
id: Scalars['ID']['input'];
|
|
18632
|
+
}>;
|
|
18633
|
+
type OrderPaymentDetailsByIdQuery = {
|
|
18634
|
+
order?: Maybe<{
|
|
18635
|
+
transactions: Array<(Pick<OrderTransaction, 'createdAt' | 'gateway' | 'formattedGateway' | 'kind' | 'paymentId'> & {
|
|
18636
|
+
amountSet: {
|
|
18637
|
+
shopMoney: Pick<MoneyV2, 'amount' | 'currencyCode'>;
|
|
18638
|
+
};
|
|
18639
|
+
})>;
|
|
18640
|
+
}>;
|
|
18641
|
+
};
|
|
18585
18642
|
type LeanProductVariantsQueryVariables = Exact<{
|
|
18586
18643
|
first: Scalars['Int']['input'];
|
|
18587
18644
|
after?: InputMaybe<Scalars['String']['input']>;
|
|
@@ -18608,10 +18665,6 @@ type ProductHandlesQuery = {
|
|
|
18608
18665
|
};
|
|
18609
18666
|
};
|
|
18610
18667
|
interface GeneratedQueryTypes {
|
|
18611
|
-
"#graphql\n query orderPaymentDetailsById($id: ID!) {\n order(id: $id) {\n transactions {\n createdAt\n gateway\n formattedGateway\n kind\n paymentId\n }\n }\n }\n": {
|
|
18612
|
-
return: OrderPaymentDetailsByIdQuery;
|
|
18613
|
-
variables: OrderPaymentDetailsByIdQueryVariables;
|
|
18614
|
-
};
|
|
18615
18668
|
"#graphql\n query ordersByName($first: Int!, $queryFilter: String!) {\n orders(first: $first, query: $queryFilter) {\n edges {\n node {\n id\n name\n createdAt\n updatedAt\n totalPriceSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n customer {\n id\n lastName\n defaultEmailAddress {\n emailAddress\n }\n displayName\n firstName\n }\n displayFinancialStatus\n displayFulfillmentStatus\n }\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n": {
|
|
18616
18669
|
return: OrdersByNameQuery;
|
|
18617
18670
|
variables: OrdersByNameQueryVariables;
|
|
@@ -18620,6 +18673,10 @@ interface GeneratedQueryTypes {
|
|
|
18620
18673
|
return: OrdersByNameFullQuery;
|
|
18621
18674
|
variables: OrdersByNameFullQueryVariables;
|
|
18622
18675
|
};
|
|
18676
|
+
"#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": {
|
|
18677
|
+
return: OrderPaymentDetailsByIdQuery;
|
|
18678
|
+
variables: OrderPaymentDetailsByIdQueryVariables;
|
|
18679
|
+
};
|
|
18623
18680
|
"#graphql\n query leanProductVariants($first: Int!, $after: String, $queryFilter: String) {\n productVariants(first: $first, after: $after, query: $queryFilter) {\n edges {\n node { \n id\n title\n sku\n product {\n id\n title\n }\n }\n }\n pageInfo { \n hasNextPage\n endCursor\n }\n }\n }\n ": {
|
|
18624
18681
|
return: LeanProductVariantsQuery;
|
|
18625
18682
|
variables: LeanProductVariantsQueryVariables;
|
|
@@ -18630,6 +18687,10 @@ interface GeneratedQueryTypes {
|
|
|
18630
18687
|
};
|
|
18631
18688
|
}
|
|
18632
18689
|
interface GeneratedMutationTypes {
|
|
18690
|
+
"#graphql\n mutation customerDelete($input: CustomerDeleteInput!) {\n customerDelete(input: $input) {\n deletedCustomerId\n userErrors {\n field\n message\n }\n }\n }\n ": {
|
|
18691
|
+
return: CustomerDeleteMutation;
|
|
18692
|
+
variables: CustomerDeleteMutationVariables;
|
|
18693
|
+
};
|
|
18633
18694
|
"#graphql\n mutation connectMetaObjectToProductVariant($productId: ID!, $variantId: ID!, $metaObjectId: String!, $metaObjectKey: String!) {\n productVariantsBulkUpdate(\n productId: $productId\n variants: [\n {\n id: $variantId\n metafields: [\n {\n namespace: \"custom\"\n key: $metaObjectKey\n value: $metaObjectId\n type: \"metaobject_reference\"\n }\n ]\n }\n ] \n ) {\n productVariants { \n id\n }\n userErrors {\n field\n message\n }\n }\n }\n ": {
|
|
18634
18695
|
return: ConnectMetaObjectToProductVariantMutation;
|
|
18635
18696
|
variables: ConnectMetaObjectToProductVariantMutationVariables;
|
|
@@ -18652,11 +18713,11 @@ declare const GetLeanOrderByNameReturn: z.ZodNullable<z.ZodObject<{
|
|
|
18652
18713
|
amount: z.ZodString;
|
|
18653
18714
|
currencyCode: z.ZodString;
|
|
18654
18715
|
}, "strip", z.ZodTypeAny, {
|
|
18655
|
-
amount: string;
|
|
18656
18716
|
currencyCode: string;
|
|
18657
|
-
}, {
|
|
18658
18717
|
amount: string;
|
|
18718
|
+
}, {
|
|
18659
18719
|
currencyCode: string;
|
|
18720
|
+
amount: string;
|
|
18660
18721
|
}>;
|
|
18661
18722
|
customer: z.ZodNullable<z.ZodObject<{
|
|
18662
18723
|
id: z.ZodString;
|
|
@@ -18684,8 +18745,8 @@ declare const GetLeanOrderByNameReturn: z.ZodNullable<z.ZodObject<{
|
|
|
18684
18745
|
emailAddress: string | null;
|
|
18685
18746
|
} | null;
|
|
18686
18747
|
totalPrice: {
|
|
18687
|
-
amount: string;
|
|
18688
18748
|
currencyCode: string;
|
|
18749
|
+
amount: string;
|
|
18689
18750
|
};
|
|
18690
18751
|
fulfillmentStatus: string | null;
|
|
18691
18752
|
financialStatus: string | null;
|
|
@@ -18700,8 +18761,8 @@ declare const GetLeanOrderByNameReturn: z.ZodNullable<z.ZodObject<{
|
|
|
18700
18761
|
emailAddress: string | null;
|
|
18701
18762
|
} | null;
|
|
18702
18763
|
totalPrice: {
|
|
18703
|
-
amount: string;
|
|
18704
18764
|
currencyCode: string;
|
|
18765
|
+
amount: string;
|
|
18705
18766
|
};
|
|
18706
18767
|
fulfillmentStatus: string | null;
|
|
18707
18768
|
financialStatus: string | null;
|
|
@@ -18743,9 +18804,31 @@ type GetLeanProductVariantsReturnType = z.infer<typeof GetLeanProductVariantsRet
|
|
|
18743
18804
|
*/
|
|
18744
18805
|
declare function getLeanProductVariants(skus?: string[]): Promise<GetLeanProductVariantsReturnType>;
|
|
18745
18806
|
|
|
18746
|
-
declare const
|
|
18807
|
+
declare const GetOrderPaymentDetailsByIdReturn: z.ZodObject<{
|
|
18747
18808
|
order: z.ZodObject<{
|
|
18748
18809
|
transactions: z.ZodArray<z.ZodObject<{
|
|
18810
|
+
amountSet: z.ZodObject<{
|
|
18811
|
+
shopMoney: z.ZodObject<{
|
|
18812
|
+
amount: z.ZodString;
|
|
18813
|
+
currencyCode: z.ZodString;
|
|
18814
|
+
}, "strip", z.ZodTypeAny, {
|
|
18815
|
+
currencyCode: string;
|
|
18816
|
+
amount: string;
|
|
18817
|
+
}, {
|
|
18818
|
+
currencyCode: string;
|
|
18819
|
+
amount: string;
|
|
18820
|
+
}>;
|
|
18821
|
+
}, "strip", z.ZodTypeAny, {
|
|
18822
|
+
shopMoney: {
|
|
18823
|
+
currencyCode: string;
|
|
18824
|
+
amount: string;
|
|
18825
|
+
};
|
|
18826
|
+
}, {
|
|
18827
|
+
shopMoney: {
|
|
18828
|
+
currencyCode: string;
|
|
18829
|
+
amount: string;
|
|
18830
|
+
};
|
|
18831
|
+
}>;
|
|
18749
18832
|
createdAt: z.ZodString;
|
|
18750
18833
|
gateway: z.ZodString;
|
|
18751
18834
|
formattedGateway: z.ZodString;
|
|
@@ -18757,12 +18840,24 @@ declare const GetOrderPaymentDetailsByNameReturn: z.ZodObject<{
|
|
|
18757
18840
|
formattedGateway: string;
|
|
18758
18841
|
kind: string;
|
|
18759
18842
|
paymentId: string;
|
|
18843
|
+
amountSet: {
|
|
18844
|
+
shopMoney: {
|
|
18845
|
+
currencyCode: string;
|
|
18846
|
+
amount: string;
|
|
18847
|
+
};
|
|
18848
|
+
};
|
|
18760
18849
|
}, {
|
|
18761
18850
|
createdAt: string;
|
|
18762
18851
|
gateway: string;
|
|
18763
18852
|
formattedGateway: string;
|
|
18764
18853
|
kind: string;
|
|
18765
18854
|
paymentId: string;
|
|
18855
|
+
amountSet: {
|
|
18856
|
+
shopMoney: {
|
|
18857
|
+
currencyCode: string;
|
|
18858
|
+
amount: string;
|
|
18859
|
+
};
|
|
18860
|
+
};
|
|
18766
18861
|
}>, "many">;
|
|
18767
18862
|
}, "strip", z.ZodTypeAny, {
|
|
18768
18863
|
transactions: {
|
|
@@ -18771,6 +18866,12 @@ declare const GetOrderPaymentDetailsByNameReturn: z.ZodObject<{
|
|
|
18771
18866
|
formattedGateway: string;
|
|
18772
18867
|
kind: string;
|
|
18773
18868
|
paymentId: string;
|
|
18869
|
+
amountSet: {
|
|
18870
|
+
shopMoney: {
|
|
18871
|
+
currencyCode: string;
|
|
18872
|
+
amount: string;
|
|
18873
|
+
};
|
|
18874
|
+
};
|
|
18774
18875
|
}[];
|
|
18775
18876
|
}, {
|
|
18776
18877
|
transactions: {
|
|
@@ -18779,6 +18880,12 @@ declare const GetOrderPaymentDetailsByNameReturn: z.ZodObject<{
|
|
|
18779
18880
|
formattedGateway: string;
|
|
18780
18881
|
kind: string;
|
|
18781
18882
|
paymentId: string;
|
|
18883
|
+
amountSet: {
|
|
18884
|
+
shopMoney: {
|
|
18885
|
+
currencyCode: string;
|
|
18886
|
+
amount: string;
|
|
18887
|
+
};
|
|
18888
|
+
};
|
|
18782
18889
|
}[];
|
|
18783
18890
|
}>;
|
|
18784
18891
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -18789,6 +18896,12 @@ declare const GetOrderPaymentDetailsByNameReturn: z.ZodObject<{
|
|
|
18789
18896
|
formattedGateway: string;
|
|
18790
18897
|
kind: string;
|
|
18791
18898
|
paymentId: string;
|
|
18899
|
+
amountSet: {
|
|
18900
|
+
shopMoney: {
|
|
18901
|
+
currencyCode: string;
|
|
18902
|
+
amount: string;
|
|
18903
|
+
};
|
|
18904
|
+
};
|
|
18792
18905
|
}[];
|
|
18793
18906
|
};
|
|
18794
18907
|
}, {
|
|
@@ -18799,18 +18912,24 @@ declare const GetOrderPaymentDetailsByNameReturn: z.ZodObject<{
|
|
|
18799
18912
|
formattedGateway: string;
|
|
18800
18913
|
kind: string;
|
|
18801
18914
|
paymentId: string;
|
|
18915
|
+
amountSet: {
|
|
18916
|
+
shopMoney: {
|
|
18917
|
+
currencyCode: string;
|
|
18918
|
+
amount: string;
|
|
18919
|
+
};
|
|
18920
|
+
};
|
|
18802
18921
|
}[];
|
|
18803
18922
|
};
|
|
18804
18923
|
}>;
|
|
18805
|
-
type
|
|
18924
|
+
type GetOrderPaymentDetailsByIdReturnType = z.infer<typeof GetOrderPaymentDetailsByIdReturn>;
|
|
18806
18925
|
/**
|
|
18807
|
-
* Retrieves a single order from Shopify by its
|
|
18808
|
-
* Returns null if no order is found with the specified
|
|
18926
|
+
* Retrieves payment details for a single order from Shopify by its ID.
|
|
18927
|
+
* Returns null if no order is found with the specified ID.
|
|
18809
18928
|
*
|
|
18810
|
-
* @param {bigint} id - The numerical Shopify order
|
|
18811
|
-
* @returns {Promise<
|
|
18929
|
+
* @param {bigint} id - The numerical Shopify order ID (e.g., 12345678n).
|
|
18930
|
+
* @returns {Promise<GetOrderPaymentDetailsByIdReturnType | null>} A promise that resolves to the order payment data or null if not found.
|
|
18812
18931
|
* @throws {Error} If the GraphQL query fails or if the response structure is invalid.
|
|
18813
18932
|
*/
|
|
18814
|
-
declare function getOrderPaymentDetailsById(id: bigint): Promise<
|
|
18933
|
+
declare function getOrderPaymentDetailsById(id: bigint): Promise<GetOrderPaymentDetailsByIdReturnType | null>;
|
|
18815
18934
|
|
|
18816
|
-
export { getLeanProductVariants, getOrderByName, getOrderPaymentDetailsById };
|
|
18935
|
+
export { deleteCustomerById, getLeanProductVariants, getOrderByName, getOrderPaymentDetailsById };
|