@ehrenkind/shopify-lib 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -8205,7 +8205,7 @@ type FulfillmentOrderInternationalDuties = {
8205
8205
  *
8206
8206
  * 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.
8207
8207
  */
8208
- type FulfillmentOrderLineItem = Node & {
8208
+ type FulfillmentOrderLineItem$1 = Node & {
8209
8209
  __typename?: 'FulfillmentOrderLineItem';
8210
8210
  /** The financial summary for the Fulfillment Order's Line Items. */
8211
8211
  financialSummaries: Array<FulfillmentOrderLineItemFinancialSummary>;
@@ -8249,7 +8249,7 @@ type FulfillmentOrderLineItemConnection = {
8249
8249
  /** The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. */
8250
8250
  edges: Array<FulfillmentOrderLineItemEdge>;
8251
8251
  /** A list of nodes that are contained in FulfillmentOrderLineItemEdge. 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. */
8252
- nodes: Array<FulfillmentOrderLineItem>;
8252
+ nodes: Array<FulfillmentOrderLineItem$1>;
8253
8253
  /** An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. */
8254
8254
  pageInfo: PageInfo;
8255
8255
  };
@@ -8259,7 +8259,7 @@ type FulfillmentOrderLineItemEdge = {
8259
8259
  /** The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). */
8260
8260
  cursor: Scalars['String']['output'];
8261
8261
  /** The item at the end of FulfillmentOrderLineItemEdge. */
8262
- node: FulfillmentOrderLineItem;
8262
+ node: FulfillmentOrderLineItem$1;
8263
8263
  };
8264
8264
  /** The financial details of a fulfillment order line item. */
8265
8265
  type FulfillmentOrderLineItemFinancialSummary = {
@@ -19825,7 +19825,7 @@ type FulfillmentOrdersByOrderIdQuery = {
19825
19825
  node: (Pick<FulfillmentOrder$1, 'id' | 'status'> & {
19826
19826
  lineItems: {
19827
19827
  edges: Array<{
19828
- node: (Pick<FulfillmentOrderLineItem, 'id' | 'remainingQuantity' | 'totalQuantity'> & {
19828
+ node: (Pick<FulfillmentOrderLineItem$1, 'id' | 'remainingQuantity' | 'totalQuantity'> & {
19829
19829
  lineItem: Pick<LineItem, 'id'>;
19830
19830
  });
19831
19831
  }>;
@@ -20175,7 +20175,7 @@ type AllProductVariantsQuery = {
20175
20175
  productVariants: {
20176
20176
  edges: Array<{
20177
20177
  node: (Pick<ProductVariant$1, 'id' | 'legacyResourceId' | 'sku' | 'barcode' | 'inventoryQuantity' | 'price' | 'title'> & {
20178
- product: (Pick<Product, 'status' | 'title' | 'description' | 'handle' | 'onlineStoreUrl'> & {
20178
+ product: (Pick<Product, 'status' | 'title' | 'description' | 'handle' | 'onlineStoreUrl' | 'combinedListingRole'> & {
20179
20179
  featuredImage?: Maybe<Pick<Image, 'url'>>;
20180
20180
  });
20181
20181
  });
@@ -20701,6 +20701,7 @@ declare const ProductVariantSchema: z.ZodObject<{
20701
20701
  description: z.ZodString;
20702
20702
  imageUrl: z.ZodNullable<z.ZodString>;
20703
20703
  inventoryQuantity: z.ZodNumber;
20704
+ combinedListingRole: z.ZodNullable<z.ZodEnum<["PARENT", "CHILD"]>>;
20704
20705
  }, "strip", z.ZodTypeAny, {
20705
20706
  status: "ACTIVE" | "ARCHIVED" | "DRAFT";
20706
20707
  url: string | null;
@@ -20711,6 +20712,7 @@ declare const ProductVariantSchema: z.ZodObject<{
20711
20712
  inventoryQuantity: number;
20712
20713
  price: string;
20713
20714
  title: string;
20715
+ combinedListingRole: "CHILD" | "PARENT" | null;
20714
20716
  imageUrl: string | null;
20715
20717
  }, {
20716
20718
  status: "ACTIVE" | "ARCHIVED" | "DRAFT";
@@ -20722,6 +20724,7 @@ declare const ProductVariantSchema: z.ZodObject<{
20722
20724
  inventoryQuantity: number;
20723
20725
  price: string;
20724
20726
  title: string;
20727
+ combinedListingRole: "CHILD" | "PARENT" | null;
20725
20728
  imageUrl: string | null;
20726
20729
  }>;
20727
20730
  type ProductVariant = z.infer<typeof ProductVariantSchema>;
@@ -20761,6 +20764,7 @@ declare function getFulfillmentById(id: string | number | bigint): Promise<Fulfi
20761
20764
 
20762
20765
  type FulfillmentOrderEdge = NonNullable<FulfillmentOrdersByOrderIdQuery['order']>['fulfillmentOrders']['edges'][number];
20763
20766
  type FulfillmentOrder = FulfillmentOrderEdge['node'];
20767
+ type FulfillmentOrderLineItem = FulfillmentOrder['lineItems']['edges'][number]['node'];
20764
20768
  /**
20765
20769
  * Retrieves all fulfillment orders for a given Shopify order.
20766
20770
  * Returns an empty array if no order is found or if the order has no fulfillment orders.
@@ -20850,4 +20854,4 @@ type Metaobject = NonNullable<MetaobjectByHandleQuery['metaobjectByHandle']>;
20850
20854
  */
20851
20855
  declare function getMetaobjectByHandle(handle: MetaobjectHandleInput): Promise<Metaobject | undefined>;
20852
20856
 
20853
- 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 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 };
20857
+ export { type BulkUpdateProductVariantsResult, type CalculateRefundLineItem, type CalculateRefundOptions, type CreateFulfillmentResult, type CreateMetaobjectDefinitionInput, type CreateMetaobjectDefinitionResult, type CreateRefundLineItem, type CreateRefundOptions, type CreateRefundResult, type CreateRefundTransaction, type Customer, type CustomerSegmentMember, type CustomerSegmentMembersResult, type Fulfillment, type FulfillmentLineItem$1 as FulfillmentLineItem, type FulfillmentOrder, type FulfillmentOrderLineItem, type FulfillmentTrackingIds, type FullOrder, type FullOrderByName, type LeanOrder, type LeanOrderByName, type LeanProductVariant, type LeanProductVariantsOptions, type Metaobject, type MetaobjectFieldDefinition$1 as MetaobjectFieldDefinition, type MetaobjectHandleInput, type OrderCancellationInfo, type OrderPaymentDetails, type OrderPreview, type ProductVariant, type ProductVariantBySku, type ProductVariantsBySkusOptions, type RefundMoney, type SegmentAttributeStatistics, ShopifyUserError, type ShopifyUserErrorDetail, type SuggestedRefund, type UpdateFulfillmentTrackingResult, type UpsertMetaobjectInput, type UpsertMetaobjectResult, type VariantUpdateInput, bulkUpdateProductVariants, calculateRefund, cancelOrderById, createFile, createFulfillment, createMetaobjectDefinition, createRefund, deleteCustomerById, deleteFilesByIds, getAllProductVariants, getCustomerSegmentMembers, getCustomersByEmail, getFulfillmentById, getFulfillmentOrdersByOrderId, getFulfillmentTrackingIds, getLeanProductVariants, getMetaobjectByHandle, getOrderById, getOrderByName, getOrderCancellationInfoByName, getOrderPaymentDetailsById, getOrdersByCustomerId, getProductVariantsBySkus, parseGid, updateFulfillmentTracking, upsertMetaobject };
package/dist/index.d.ts CHANGED
@@ -8205,7 +8205,7 @@ type FulfillmentOrderInternationalDuties = {
8205
8205
  *
8206
8206
  * 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.
8207
8207
  */
8208
- type FulfillmentOrderLineItem = Node & {
8208
+ type FulfillmentOrderLineItem$1 = Node & {
8209
8209
  __typename?: 'FulfillmentOrderLineItem';
8210
8210
  /** The financial summary for the Fulfillment Order's Line Items. */
8211
8211
  financialSummaries: Array<FulfillmentOrderLineItemFinancialSummary>;
@@ -8249,7 +8249,7 @@ type FulfillmentOrderLineItemConnection = {
8249
8249
  /** The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. */
8250
8250
  edges: Array<FulfillmentOrderLineItemEdge>;
8251
8251
  /** A list of nodes that are contained in FulfillmentOrderLineItemEdge. 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. */
8252
- nodes: Array<FulfillmentOrderLineItem>;
8252
+ nodes: Array<FulfillmentOrderLineItem$1>;
8253
8253
  /** An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. */
8254
8254
  pageInfo: PageInfo;
8255
8255
  };
@@ -8259,7 +8259,7 @@ type FulfillmentOrderLineItemEdge = {
8259
8259
  /** The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). */
8260
8260
  cursor: Scalars['String']['output'];
8261
8261
  /** The item at the end of FulfillmentOrderLineItemEdge. */
8262
- node: FulfillmentOrderLineItem;
8262
+ node: FulfillmentOrderLineItem$1;
8263
8263
  };
8264
8264
  /** The financial details of a fulfillment order line item. */
8265
8265
  type FulfillmentOrderLineItemFinancialSummary = {
@@ -19825,7 +19825,7 @@ type FulfillmentOrdersByOrderIdQuery = {
19825
19825
  node: (Pick<FulfillmentOrder$1, 'id' | 'status'> & {
19826
19826
  lineItems: {
19827
19827
  edges: Array<{
19828
- node: (Pick<FulfillmentOrderLineItem, 'id' | 'remainingQuantity' | 'totalQuantity'> & {
19828
+ node: (Pick<FulfillmentOrderLineItem$1, 'id' | 'remainingQuantity' | 'totalQuantity'> & {
19829
19829
  lineItem: Pick<LineItem, 'id'>;
19830
19830
  });
19831
19831
  }>;
@@ -20175,7 +20175,7 @@ type AllProductVariantsQuery = {
20175
20175
  productVariants: {
20176
20176
  edges: Array<{
20177
20177
  node: (Pick<ProductVariant$1, 'id' | 'legacyResourceId' | 'sku' | 'barcode' | 'inventoryQuantity' | 'price' | 'title'> & {
20178
- product: (Pick<Product, 'status' | 'title' | 'description' | 'handle' | 'onlineStoreUrl'> & {
20178
+ product: (Pick<Product, 'status' | 'title' | 'description' | 'handle' | 'onlineStoreUrl' | 'combinedListingRole'> & {
20179
20179
  featuredImage?: Maybe<Pick<Image, 'url'>>;
20180
20180
  });
20181
20181
  });
@@ -20701,6 +20701,7 @@ declare const ProductVariantSchema: z.ZodObject<{
20701
20701
  description: z.ZodString;
20702
20702
  imageUrl: z.ZodNullable<z.ZodString>;
20703
20703
  inventoryQuantity: z.ZodNumber;
20704
+ combinedListingRole: z.ZodNullable<z.ZodEnum<["PARENT", "CHILD"]>>;
20704
20705
  }, "strip", z.ZodTypeAny, {
20705
20706
  status: "ACTIVE" | "ARCHIVED" | "DRAFT";
20706
20707
  url: string | null;
@@ -20711,6 +20712,7 @@ declare const ProductVariantSchema: z.ZodObject<{
20711
20712
  inventoryQuantity: number;
20712
20713
  price: string;
20713
20714
  title: string;
20715
+ combinedListingRole: "CHILD" | "PARENT" | null;
20714
20716
  imageUrl: string | null;
20715
20717
  }, {
20716
20718
  status: "ACTIVE" | "ARCHIVED" | "DRAFT";
@@ -20722,6 +20724,7 @@ declare const ProductVariantSchema: z.ZodObject<{
20722
20724
  inventoryQuantity: number;
20723
20725
  price: string;
20724
20726
  title: string;
20727
+ combinedListingRole: "CHILD" | "PARENT" | null;
20725
20728
  imageUrl: string | null;
20726
20729
  }>;
20727
20730
  type ProductVariant = z.infer<typeof ProductVariantSchema>;
@@ -20761,6 +20764,7 @@ declare function getFulfillmentById(id: string | number | bigint): Promise<Fulfi
20761
20764
 
20762
20765
  type FulfillmentOrderEdge = NonNullable<FulfillmentOrdersByOrderIdQuery['order']>['fulfillmentOrders']['edges'][number];
20763
20766
  type FulfillmentOrder = FulfillmentOrderEdge['node'];
20767
+ type FulfillmentOrderLineItem = FulfillmentOrder['lineItems']['edges'][number]['node'];
20764
20768
  /**
20765
20769
  * Retrieves all fulfillment orders for a given Shopify order.
20766
20770
  * Returns an empty array if no order is found or if the order has no fulfillment orders.
@@ -20850,4 +20854,4 @@ type Metaobject = NonNullable<MetaobjectByHandleQuery['metaobjectByHandle']>;
20850
20854
  */
20851
20855
  declare function getMetaobjectByHandle(handle: MetaobjectHandleInput): Promise<Metaobject | undefined>;
20852
20856
 
20853
- 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 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 };
20857
+ export { type BulkUpdateProductVariantsResult, type CalculateRefundLineItem, type CalculateRefundOptions, type CreateFulfillmentResult, type CreateMetaobjectDefinitionInput, type CreateMetaobjectDefinitionResult, type CreateRefundLineItem, type CreateRefundOptions, type CreateRefundResult, type CreateRefundTransaction, type Customer, type CustomerSegmentMember, type CustomerSegmentMembersResult, type Fulfillment, type FulfillmentLineItem$1 as FulfillmentLineItem, type FulfillmentOrder, type FulfillmentOrderLineItem, type FulfillmentTrackingIds, type FullOrder, type FullOrderByName, type LeanOrder, type LeanOrderByName, type LeanProductVariant, type LeanProductVariantsOptions, type Metaobject, type MetaobjectFieldDefinition$1 as MetaobjectFieldDefinition, type MetaobjectHandleInput, type OrderCancellationInfo, type OrderPaymentDetails, type OrderPreview, type ProductVariant, type ProductVariantBySku, type ProductVariantsBySkusOptions, type RefundMoney, type SegmentAttributeStatistics, ShopifyUserError, type ShopifyUserErrorDetail, type SuggestedRefund, type UpdateFulfillmentTrackingResult, type UpsertMetaobjectInput, type UpsertMetaobjectResult, type VariantUpdateInput, bulkUpdateProductVariants, calculateRefund, cancelOrderById, createFile, createFulfillment, createMetaobjectDefinition, createRefund, deleteCustomerById, deleteFilesByIds, getAllProductVariants, getCustomerSegmentMembers, getCustomersByEmail, getFulfillmentById, getFulfillmentOrdersByOrderId, getFulfillmentTrackingIds, getLeanProductVariants, getMetaobjectByHandle, getOrderById, getOrderByName, getOrderCancellationInfoByName, getOrderPaymentDetailsById, getOrdersByCustomerId, getProductVariantsBySkus, parseGid, updateFulfillmentTracking, upsertMetaobject };
package/dist/index.mjs CHANGED
@@ -2020,6 +2020,7 @@ var queryAllProductVariants = gql`#graphql
2020
2020
  description
2021
2021
  handle
2022
2022
  onlineStoreUrl
2023
+ combinedListingRole
2023
2024
  featuredImage {
2024
2025
  url
2025
2026
  }
@@ -2045,7 +2046,8 @@ var ProductVariantSchema = z7.object({
2045
2046
  handle: z7.string(),
2046
2047
  description: z7.string(),
2047
2048
  imageUrl: z7.string().nullable(),
2048
- inventoryQuantity: z7.number()
2049
+ inventoryQuantity: z7.number(),
2050
+ combinedListingRole: z7.enum(["PARENT", "CHILD"]).nullable()
2049
2051
  });
2050
2052
  var GetAllProductVariantsReturn = z7.array(ProductVariantSchema);
2051
2053
  async function getAllProductVariants() {
@@ -2083,7 +2085,8 @@ async function getAllProductVariants() {
2083
2085
  handle: v.product.handle,
2084
2086
  description: v.product.description,
2085
2087
  imageUrl: v.product.featuredImage?.url ?? null,
2086
- inventoryQuantity: v.inventoryQuantity ?? 0
2088
+ inventoryQuantity: v.inventoryQuantity ?? 0,
2089
+ combinedListingRole: v.product.combinedListingRole ?? null
2087
2090
  };
2088
2091
  });
2089
2092
  return await returnOutputParsed(allVariants, GetAllProductVariantsReturn);