@ehrenkind/shopify-lib 0.5.1 → 0.6.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.cjs +18 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +29 -8
- package/dist/index.d.ts +29 -8
- package/dist/index.mjs +18 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -41,6 +41,10 @@ type MetaobjectFieldDefinition$1 = {
|
|
|
41
41
|
type: string;
|
|
42
42
|
description?: string;
|
|
43
43
|
required?: boolean;
|
|
44
|
+
validations?: Array<{
|
|
45
|
+
name: string;
|
|
46
|
+
value: string;
|
|
47
|
+
}>;
|
|
44
48
|
};
|
|
45
49
|
type CreateMetaobjectDefinitionInput = {
|
|
46
50
|
type: string;
|
|
@@ -3839,9 +3843,13 @@ type CustomerEmailMarketingConsentState = {
|
|
|
3839
3843
|
};
|
|
3840
3844
|
/** The possible email marketing states for a customer. */
|
|
3841
3845
|
declare enum CustomerEmailMarketingState {
|
|
3842
|
-
/**
|
|
3846
|
+
/** This value is internally-set and read-only. */
|
|
3843
3847
|
Invalid = "INVALID",
|
|
3844
|
-
/**
|
|
3848
|
+
/**
|
|
3849
|
+
* Default state for customers who have never subscribed to email marketing.
|
|
3850
|
+
* This value cannot be set via the mutation; use UNSUBSCRIBED instead to indicate
|
|
3851
|
+
* a customer has opted out.
|
|
3852
|
+
*/
|
|
3845
3853
|
NotSubscribed = "NOT_SUBSCRIBED",
|
|
3846
3854
|
/** The customer is in the process of subscribing to email marketing. */
|
|
3847
3855
|
Pending = "PENDING",
|
|
@@ -9309,7 +9317,10 @@ type InventoryLevel = Node & {
|
|
|
9309
9317
|
* [name](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps#inventory-states).
|
|
9310
9318
|
*/
|
|
9311
9319
|
quantities: Array<InventoryQuantity>;
|
|
9312
|
-
/**
|
|
9320
|
+
/**
|
|
9321
|
+
* Scheduled changes for the requested quantity names.
|
|
9322
|
+
* @deprecated Scheduled changes will be phased out in a future version.
|
|
9323
|
+
*/
|
|
9313
9324
|
scheduledChanges: InventoryScheduledChangeConnection;
|
|
9314
9325
|
/** The date and time when the inventory level was updated. */
|
|
9315
9326
|
updatedAt: Scalars['DateTime']['output'];
|
|
@@ -11285,7 +11296,7 @@ declare enum MetafieldGrantAccessLevel {
|
|
|
11285
11296
|
* [metafieldsSet](https://shopify.dev/api/admin-graphql/latest/mutations/metafieldsSet) mutation.
|
|
11286
11297
|
*/
|
|
11287
11298
|
type MetafieldInput = {
|
|
11288
|
-
/** The unique ID of the metafield. Using `
|
|
11299
|
+
/** The unique ID of the metafield. Using `namespace` and `key` is preferred for creating and updating. */
|
|
11289
11300
|
id?: InputMaybe<Scalars['ID']['input']>;
|
|
11290
11301
|
/**
|
|
11291
11302
|
* The unique identifier for a metafield within its namespace.
|
|
@@ -16458,11 +16469,11 @@ type ShippingLine = {
|
|
|
16458
16469
|
/** Whether the shipping line has been removed. */
|
|
16459
16470
|
isRemoved: Scalars['Boolean']['output'];
|
|
16460
16471
|
/**
|
|
16461
|
-
* The
|
|
16472
|
+
* The shipping price without any discounts applied. If the parent order.taxesIncluded field is true, then this price includes taxes. Otherwise, this field is the pre-tax price.
|
|
16462
16473
|
* @deprecated Use `originalPriceSet` instead.
|
|
16463
16474
|
*/
|
|
16464
16475
|
originalPrice: MoneyV2;
|
|
16465
|
-
/** The
|
|
16476
|
+
/** The shipping price without any discounts applied. If the parent order.taxesIncluded field is true, then this price includes taxes. Otherwise, this field is the pre-tax price. */
|
|
16466
16477
|
originalPriceSet: MoneyBag;
|
|
16467
16478
|
/** The phone number at the shipping address. */
|
|
16468
16479
|
phone?: Maybe<Scalars['String']['output']>;
|
|
@@ -19898,9 +19909,19 @@ type SuggestedRefundQuery = {
|
|
|
19898
19909
|
maximumRefundableSet: {
|
|
19899
19910
|
shopMoney: Pick<MoneyV2, 'amount' | 'currencyCode'>;
|
|
19900
19911
|
};
|
|
19912
|
+
taxSet: {
|
|
19913
|
+
shopMoney: Pick<MoneyV2, 'amount' | 'currencyCode'>;
|
|
19914
|
+
};
|
|
19901
19915
|
};
|
|
19902
19916
|
refundLineItems: Array<(Pick<RefundLineItem, 'quantity' | 'restockType'> & {
|
|
19903
|
-
lineItem: Pick<LineItem, 'id' | 'sku' | 'title' | 'quantity'
|
|
19917
|
+
lineItem: (Pick<LineItem, 'id' | 'sku' | 'title' | 'quantity'> & {
|
|
19918
|
+
discountedUnitPriceSet: {
|
|
19919
|
+
shopMoney: Pick<MoneyV2, 'amount' | 'currencyCode'>;
|
|
19920
|
+
};
|
|
19921
|
+
totalDiscountSet: {
|
|
19922
|
+
shopMoney: Pick<MoneyV2, 'amount' | 'currencyCode'>;
|
|
19923
|
+
};
|
|
19924
|
+
});
|
|
19904
19925
|
priceSet: {
|
|
19905
19926
|
shopMoney: Pick<MoneyV2, 'amount' | 'currencyCode'>;
|
|
19906
19927
|
};
|
|
@@ -20227,7 +20248,7 @@ interface GeneratedQueryTypes {
|
|
|
20227
20248
|
return: MetaobjectByHandleQuery;
|
|
20228
20249
|
variables: MetaobjectByHandleQueryVariables;
|
|
20229
20250
|
};
|
|
20230
|
-
"#graphql\n query suggestedRefund(\n $orderId: ID!\n $refundLineItems: [RefundLineItemInput!]\n $refundShipping: Boolean\n $shippingAmount: Money\n $suggestFullRefund: Boolean\n ) {\n order(id: $orderId) {\n id\n name\n suggestedRefund(\n refundLineItems: $refundLineItems\n refundShipping: $refundShipping\n shippingAmount: $shippingAmount\n suggestFullRefund: $suggestFullRefund\n ) {\n amountSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n maximumRefundableSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n subtotalSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n totalTaxSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n discountedSubtotalSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n totalCartDiscountAmountSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n shipping {\n amountSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n maximumRefundableSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n }\n refundLineItems {\n lineItem {\n id\n sku\n title\n quantity\n }\n quantity\n priceSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n subtotalSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n totalTaxSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n restockType\n }\n suggestedTransactions {\n gateway\n kind\n amountSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n maximumRefundableSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n parentTransaction {\n id\n }\n }\n }\n }\n }\n": {
|
|
20251
|
+
"#graphql\n query suggestedRefund(\n $orderId: ID!\n $refundLineItems: [RefundLineItemInput!]\n $refundShipping: Boolean\n $shippingAmount: Money\n $suggestFullRefund: Boolean\n ) {\n order(id: $orderId) {\n id\n name\n suggestedRefund(\n refundLineItems: $refundLineItems\n refundShipping: $refundShipping\n shippingAmount: $shippingAmount\n suggestFullRefund: $suggestFullRefund\n ) {\n amountSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n maximumRefundableSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n subtotalSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n totalTaxSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n discountedSubtotalSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n totalCartDiscountAmountSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n shipping {\n amountSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n maximumRefundableSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n taxSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n }\n refundLineItems {\n lineItem {\n id\n sku\n title\n quantity\n discountedUnitPriceSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n totalDiscountSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n }\n quantity\n priceSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n subtotalSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n totalTaxSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n restockType\n }\n suggestedTransactions {\n gateway\n kind\n amountSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n maximumRefundableSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n parentTransaction {\n id\n }\n }\n }\n }\n }\n": {
|
|
20231
20252
|
return: SuggestedRefundQuery;
|
|
20232
20253
|
variables: SuggestedRefundQueryVariables;
|
|
20233
20254
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -41,6 +41,10 @@ type MetaobjectFieldDefinition$1 = {
|
|
|
41
41
|
type: string;
|
|
42
42
|
description?: string;
|
|
43
43
|
required?: boolean;
|
|
44
|
+
validations?: Array<{
|
|
45
|
+
name: string;
|
|
46
|
+
value: string;
|
|
47
|
+
}>;
|
|
44
48
|
};
|
|
45
49
|
type CreateMetaobjectDefinitionInput = {
|
|
46
50
|
type: string;
|
|
@@ -3839,9 +3843,13 @@ type CustomerEmailMarketingConsentState = {
|
|
|
3839
3843
|
};
|
|
3840
3844
|
/** The possible email marketing states for a customer. */
|
|
3841
3845
|
declare enum CustomerEmailMarketingState {
|
|
3842
|
-
/**
|
|
3846
|
+
/** This value is internally-set and read-only. */
|
|
3843
3847
|
Invalid = "INVALID",
|
|
3844
|
-
/**
|
|
3848
|
+
/**
|
|
3849
|
+
* Default state for customers who have never subscribed to email marketing.
|
|
3850
|
+
* This value cannot be set via the mutation; use UNSUBSCRIBED instead to indicate
|
|
3851
|
+
* a customer has opted out.
|
|
3852
|
+
*/
|
|
3845
3853
|
NotSubscribed = "NOT_SUBSCRIBED",
|
|
3846
3854
|
/** The customer is in the process of subscribing to email marketing. */
|
|
3847
3855
|
Pending = "PENDING",
|
|
@@ -9309,7 +9317,10 @@ type InventoryLevel = Node & {
|
|
|
9309
9317
|
* [name](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps#inventory-states).
|
|
9310
9318
|
*/
|
|
9311
9319
|
quantities: Array<InventoryQuantity>;
|
|
9312
|
-
/**
|
|
9320
|
+
/**
|
|
9321
|
+
* Scheduled changes for the requested quantity names.
|
|
9322
|
+
* @deprecated Scheduled changes will be phased out in a future version.
|
|
9323
|
+
*/
|
|
9313
9324
|
scheduledChanges: InventoryScheduledChangeConnection;
|
|
9314
9325
|
/** The date and time when the inventory level was updated. */
|
|
9315
9326
|
updatedAt: Scalars['DateTime']['output'];
|
|
@@ -11285,7 +11296,7 @@ declare enum MetafieldGrantAccessLevel {
|
|
|
11285
11296
|
* [metafieldsSet](https://shopify.dev/api/admin-graphql/latest/mutations/metafieldsSet) mutation.
|
|
11286
11297
|
*/
|
|
11287
11298
|
type MetafieldInput = {
|
|
11288
|
-
/** The unique ID of the metafield. Using `
|
|
11299
|
+
/** The unique ID of the metafield. Using `namespace` and `key` is preferred for creating and updating. */
|
|
11289
11300
|
id?: InputMaybe<Scalars['ID']['input']>;
|
|
11290
11301
|
/**
|
|
11291
11302
|
* The unique identifier for a metafield within its namespace.
|
|
@@ -16458,11 +16469,11 @@ type ShippingLine = {
|
|
|
16458
16469
|
/** Whether the shipping line has been removed. */
|
|
16459
16470
|
isRemoved: Scalars['Boolean']['output'];
|
|
16460
16471
|
/**
|
|
16461
|
-
* The
|
|
16472
|
+
* The shipping price without any discounts applied. If the parent order.taxesIncluded field is true, then this price includes taxes. Otherwise, this field is the pre-tax price.
|
|
16462
16473
|
* @deprecated Use `originalPriceSet` instead.
|
|
16463
16474
|
*/
|
|
16464
16475
|
originalPrice: MoneyV2;
|
|
16465
|
-
/** The
|
|
16476
|
+
/** The shipping price without any discounts applied. If the parent order.taxesIncluded field is true, then this price includes taxes. Otherwise, this field is the pre-tax price. */
|
|
16466
16477
|
originalPriceSet: MoneyBag;
|
|
16467
16478
|
/** The phone number at the shipping address. */
|
|
16468
16479
|
phone?: Maybe<Scalars['String']['output']>;
|
|
@@ -19898,9 +19909,19 @@ type SuggestedRefundQuery = {
|
|
|
19898
19909
|
maximumRefundableSet: {
|
|
19899
19910
|
shopMoney: Pick<MoneyV2, 'amount' | 'currencyCode'>;
|
|
19900
19911
|
};
|
|
19912
|
+
taxSet: {
|
|
19913
|
+
shopMoney: Pick<MoneyV2, 'amount' | 'currencyCode'>;
|
|
19914
|
+
};
|
|
19901
19915
|
};
|
|
19902
19916
|
refundLineItems: Array<(Pick<RefundLineItem, 'quantity' | 'restockType'> & {
|
|
19903
|
-
lineItem: Pick<LineItem, 'id' | 'sku' | 'title' | 'quantity'
|
|
19917
|
+
lineItem: (Pick<LineItem, 'id' | 'sku' | 'title' | 'quantity'> & {
|
|
19918
|
+
discountedUnitPriceSet: {
|
|
19919
|
+
shopMoney: Pick<MoneyV2, 'amount' | 'currencyCode'>;
|
|
19920
|
+
};
|
|
19921
|
+
totalDiscountSet: {
|
|
19922
|
+
shopMoney: Pick<MoneyV2, 'amount' | 'currencyCode'>;
|
|
19923
|
+
};
|
|
19924
|
+
});
|
|
19904
19925
|
priceSet: {
|
|
19905
19926
|
shopMoney: Pick<MoneyV2, 'amount' | 'currencyCode'>;
|
|
19906
19927
|
};
|
|
@@ -20227,7 +20248,7 @@ interface GeneratedQueryTypes {
|
|
|
20227
20248
|
return: MetaobjectByHandleQuery;
|
|
20228
20249
|
variables: MetaobjectByHandleQueryVariables;
|
|
20229
20250
|
};
|
|
20230
|
-
"#graphql\n query suggestedRefund(\n $orderId: ID!\n $refundLineItems: [RefundLineItemInput!]\n $refundShipping: Boolean\n $shippingAmount: Money\n $suggestFullRefund: Boolean\n ) {\n order(id: $orderId) {\n id\n name\n suggestedRefund(\n refundLineItems: $refundLineItems\n refundShipping: $refundShipping\n shippingAmount: $shippingAmount\n suggestFullRefund: $suggestFullRefund\n ) {\n amountSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n maximumRefundableSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n subtotalSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n totalTaxSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n discountedSubtotalSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n totalCartDiscountAmountSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n shipping {\n amountSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n maximumRefundableSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n }\n refundLineItems {\n lineItem {\n id\n sku\n title\n quantity\n }\n quantity\n priceSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n subtotalSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n totalTaxSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n restockType\n }\n suggestedTransactions {\n gateway\n kind\n amountSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n maximumRefundableSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n parentTransaction {\n id\n }\n }\n }\n }\n }\n": {
|
|
20251
|
+
"#graphql\n query suggestedRefund(\n $orderId: ID!\n $refundLineItems: [RefundLineItemInput!]\n $refundShipping: Boolean\n $shippingAmount: Money\n $suggestFullRefund: Boolean\n ) {\n order(id: $orderId) {\n id\n name\n suggestedRefund(\n refundLineItems: $refundLineItems\n refundShipping: $refundShipping\n shippingAmount: $shippingAmount\n suggestFullRefund: $suggestFullRefund\n ) {\n amountSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n maximumRefundableSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n subtotalSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n totalTaxSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n discountedSubtotalSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n totalCartDiscountAmountSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n shipping {\n amountSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n maximumRefundableSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n taxSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n }\n refundLineItems {\n lineItem {\n id\n sku\n title\n quantity\n discountedUnitPriceSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n totalDiscountSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n }\n quantity\n priceSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n subtotalSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n totalTaxSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n restockType\n }\n suggestedTransactions {\n gateway\n kind\n amountSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n maximumRefundableSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n parentTransaction {\n id\n }\n }\n }\n }\n }\n": {
|
|
20231
20252
|
return: SuggestedRefundQuery;
|
|
20232
20253
|
variables: SuggestedRefundQueryVariables;
|
|
20233
20254
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -925,6 +925,12 @@ var querySuggestedRefund = gql`#graphql
|
|
|
925
925
|
currencyCode
|
|
926
926
|
}
|
|
927
927
|
}
|
|
928
|
+
taxSet {
|
|
929
|
+
shopMoney {
|
|
930
|
+
amount
|
|
931
|
+
currencyCode
|
|
932
|
+
}
|
|
933
|
+
}
|
|
928
934
|
}
|
|
929
935
|
refundLineItems {
|
|
930
936
|
lineItem {
|
|
@@ -932,6 +938,18 @@ var querySuggestedRefund = gql`#graphql
|
|
|
932
938
|
sku
|
|
933
939
|
title
|
|
934
940
|
quantity
|
|
941
|
+
discountedUnitPriceSet {
|
|
942
|
+
shopMoney {
|
|
943
|
+
amount
|
|
944
|
+
currencyCode
|
|
945
|
+
}
|
|
946
|
+
}
|
|
947
|
+
totalDiscountSet {
|
|
948
|
+
shopMoney {
|
|
949
|
+
amount
|
|
950
|
+
currencyCode
|
|
951
|
+
}
|
|
952
|
+
}
|
|
935
953
|
}
|
|
936
954
|
quantity
|
|
937
955
|
priceSet {
|