@lana-commerce/core 14.0.0-alpha.24 → 14.0.0-alpha.25
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/CHANGELOG.md +1 -1
- package/cjs/json/mutator.js +3 -3
- package/cjs/variantPriceCommerce.js +7 -7
- package/esm/json/mutator.js +3 -3
- package/esm/variantPriceCommerce.js +7 -7
- package/package.json +2 -2
- package/types/graphql/types.d.ts +1 -1
- package/types/json/commerceTypes.d.ts +112 -112
- package/types/json/mutator.d.ts +3 -3
- package/types/json/storefrontTypes.d.ts +5 -5
- package/types/variantPriceCommerce.d.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -11,7 +11,7 @@ This project adheres to [Semantic Versioning][semantic versioning].
|
|
|
11
11
|
- OAuth APIs of "customer" module were changed in backwards incompatible way. To delete oauth provider you need to specify its type. This is due to the fact that you can connect multiple providers now.
|
|
12
12
|
- Do not export "parseFormat" from "formatToJSX".
|
|
13
13
|
- Use new data format for "slate" module. Bringing "slate" lib based editor up to date with upstream.
|
|
14
|
-
- New variant pricing model using
|
|
14
|
+
- New variant pricing model using price lists.
|
|
15
15
|
|
|
16
16
|
### Minor Changes
|
|
17
17
|
|
package/cjs/json/mutator.js
CHANGED
|
@@ -415,9 +415,9 @@ class Mutator {
|
|
|
415
415
|
const uid = q.unID();
|
|
416
416
|
q.push(uid, { shopID, country, req: null });
|
|
417
417
|
});
|
|
418
|
-
this.
|
|
419
|
-
this.
|
|
420
|
-
this.
|
|
418
|
+
this.priceList = batchShopIDAndReqCreator(this, "priceList", plur("price list(s) created"), (ctx) => (0, commerce_js_1.request)(ctx, `POST:price_lists.json`));
|
|
419
|
+
this.priceListModify = batchShopIDAndReqModifier(this, "priceListModify", plur("price list(s) modified"), (ctx) => (0, commerce_js_1.request)(ctx, `POST:price_lists.json`));
|
|
420
|
+
this.priceListDelete = batchShopIDAndIDDeletor(this, "priceListDelete", plur("price list(s) deleted"), (ctx) => (0, commerce_js_1.request)(ctx, `DELETE:price_lists.json`));
|
|
421
421
|
this.returnReason = batchShopIDAndReqCreator(this, "returnReason", plur("return reason(s) created"), (ctx) => (0, commerce_js_1.request)(ctx, `POST:return_reasons.json`));
|
|
422
422
|
this.returnReasonModify = batchShopIDAndReqModifier(this, "returnReasonModify", plur("return reason(s) modified"), (ctx) => (0, commerce_js_1.request)(ctx, `POST:return_reasons.json`));
|
|
423
423
|
this.returnReasonDelete = batchShopIDAndIDDeletor(this, "returnReasonDelete", plur("return reason(s) deleted"), (ctx) => (0, commerce_js_1.request)(ctx, `DELETE:return_reasons.json`));
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.variantPriceInfo = variantPriceInfo;
|
|
4
4
|
const variantPrice_js_1 = require("./variantPrice.js");
|
|
5
|
-
function
|
|
6
|
-
const po = v.pricing_overrides.find((po) => { var _a; return ((_a = po.
|
|
5
|
+
function pricingForPriceListID(v, prID) {
|
|
6
|
+
const po = v.pricing_overrides.find((po) => { var _a; return ((_a = po.price_list) === null || _a === void 0 ? void 0 : _a.id) === prID; });
|
|
7
7
|
return po
|
|
8
8
|
? {
|
|
9
9
|
pricing: {
|
|
@@ -26,12 +26,12 @@ function pricingForPricingRuleID(v, prID) {
|
|
|
26
26
|
match: false,
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
|
-
function variantLikeToStorefrontVariantPricer(v,
|
|
30
|
-
const current =
|
|
31
|
-
const previous = displayPriceDifference && current.match ?
|
|
29
|
+
function variantLikeToStorefrontVariantPricer(v, priceListID, parentPriceListID, displayPriceDifference) {
|
|
30
|
+
const current = pricingForPriceListID(v, priceListID);
|
|
31
|
+
const previous = displayPriceDifference && current.match ? pricingForPriceListID(v, parentPriceListID) : null;
|
|
32
32
|
return Object.assign(Object.assign({}, current.pricing), { previous_pricing: (previous === null || previous === void 0 ? void 0 : previous.pricing) || null });
|
|
33
33
|
}
|
|
34
|
-
function variantPriceInfo(env, variant,
|
|
35
|
-
const v = variantLikeToStorefrontVariantPricer(variant,
|
|
34
|
+
function variantPriceInfo(env, variant, priceListID, parentPriceListID, displayPriceDifference) {
|
|
35
|
+
const v = variantLikeToStorefrontVariantPricer(variant, priceListID, parentPriceListID, displayPriceDifference);
|
|
36
36
|
return (0, variantPrice_js_1.variantPriceInfo)(env, v);
|
|
37
37
|
}
|
package/esm/json/mutator.js
CHANGED
|
@@ -424,9 +424,9 @@ export class Mutator {
|
|
|
424
424
|
const uid = q.unID();
|
|
425
425
|
q.push(uid, { shopID, country, req: null });
|
|
426
426
|
});
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
427
|
+
priceList = batchShopIDAndReqCreator(this, "priceList", plur("price list(s) created"), (ctx) => request(ctx, `POST:price_lists.json`));
|
|
428
|
+
priceListModify = batchShopIDAndReqModifier(this, "priceListModify", plur("price list(s) modified"), (ctx) => request(ctx, `POST:price_lists.json`));
|
|
429
|
+
priceListDelete = batchShopIDAndIDDeletor(this, "priceListDelete", plur("price list(s) deleted"), (ctx) => request(ctx, `DELETE:price_lists.json`));
|
|
430
430
|
returnReason = batchShopIDAndReqCreator(this, "returnReason", plur("return reason(s) created"), (ctx) => request(ctx, `POST:return_reasons.json`));
|
|
431
431
|
returnReasonModify = batchShopIDAndReqModifier(this, "returnReasonModify", plur("return reason(s) modified"), (ctx) => request(ctx, `POST:return_reasons.json`));
|
|
432
432
|
returnReasonDelete = batchShopIDAndIDDeletor(this, "returnReasonDelete", plur("return reason(s) deleted"), (ctx) => request(ctx, `DELETE:return_reasons.json`));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { variantPriceInfo as storefrontVariantPriceInfo } from "./variantPrice.js";
|
|
2
|
-
function
|
|
3
|
-
const po = v.pricing_overrides.find((po) => po.
|
|
2
|
+
function pricingForPriceListID(v, prID) {
|
|
3
|
+
const po = v.pricing_overrides.find((po) => po.price_list?.id === prID);
|
|
4
4
|
return po
|
|
5
5
|
? {
|
|
6
6
|
pricing: {
|
|
@@ -23,15 +23,15 @@ function pricingForPricingRuleID(v, prID) {
|
|
|
23
23
|
match: false,
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
|
-
function variantLikeToStorefrontVariantPricer(v,
|
|
27
|
-
const current =
|
|
28
|
-
const previous = displayPriceDifference && current.match ?
|
|
26
|
+
function variantLikeToStorefrontVariantPricer(v, priceListID, parentPriceListID, displayPriceDifference) {
|
|
27
|
+
const current = pricingForPriceListID(v, priceListID);
|
|
28
|
+
const previous = displayPriceDifference && current.match ? pricingForPriceListID(v, parentPriceListID) : null;
|
|
29
29
|
return {
|
|
30
30
|
...current.pricing,
|
|
31
31
|
previous_pricing: previous?.pricing || null,
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
|
-
export function variantPriceInfo(env, variant,
|
|
35
|
-
const v = variantLikeToStorefrontVariantPricer(variant,
|
|
34
|
+
export function variantPriceInfo(env, variant, priceListID, parentPriceListID, displayPriceDifference) {
|
|
35
|
+
const v = variantLikeToStorefrontVariantPricer(variant, priceListID, parentPriceListID, displayPriceDifference);
|
|
36
36
|
return storefrontVariantPriceInfo(env, v);
|
|
37
37
|
}
|
package/package.json
CHANGED
package/types/graphql/types.d.ts
CHANGED
|
@@ -136,7 +136,7 @@ export type ReturnPolicyReturnFee = "cost_of_label" | "fixed_amount" | "free" |
|
|
|
136
136
|
export type ReturnReasonType = "arrived_damaged" | "arrived_too_late" | "custom_reason_1" | "custom_reason_10" | "custom_reason_11" | "custom_reason_12" | "custom_reason_13" | "custom_reason_14" | "custom_reason_15" | "custom_reason_16" | "custom_reason_17" | "custom_reason_18" | "custom_reason_19" | "custom_reason_2" | "custom_reason_20" | "custom_reason_21" | "custom_reason_22" | "custom_reason_23" | "custom_reason_24" | "custom_reason_25" | "custom_reason_26" | "custom_reason_27" | "custom_reason_28" | "custom_reason_29" | "custom_reason_3" | "custom_reason_30" | "custom_reason_4" | "custom_reason_5" | "custom_reason_6" | "custom_reason_7" | "custom_reason_8" | "custom_reason_9" | "different_from_description" | "found_lower_price" | "item_didnt_fit" | "item_was_defective" | "no_longer_needed" | "not_satisfied_with_quality" | "other_reason" | "wrong_item_received";
|
|
137
137
|
export type ReturnState = "approved" | "inspected" | "received" | "refunded" | "rejected" | "request";
|
|
138
138
|
export type ReverseLogistics = "custom" | "generate_label" | "no_label";
|
|
139
|
-
export type SearchOp = "and" | "eq" | "ge" | "gt" | "le" | "lt" | "ne" | "
|
|
139
|
+
export type SearchOp = "and" | "eq" | "ge" | "gt" | "le" | "lt" | "ne" | "or";
|
|
140
140
|
export interface SearchOption {
|
|
141
141
|
boolean?: boolean | null;
|
|
142
142
|
context?: string | null;
|
|
@@ -2796,13 +2796,13 @@ export interface LineItemFieldCreate {
|
|
|
2796
2796
|
type: ProductFieldType;
|
|
2797
2797
|
value: string;
|
|
2798
2798
|
}
|
|
2799
|
-
export interface
|
|
2800
|
-
/** Whether price difference should be displayed when this
|
|
2799
|
+
export interface MatchingPriceLists {
|
|
2800
|
+
/** Whether price difference should be displayed when this price list matches */
|
|
2801
2801
|
display_price_difference: boolean;
|
|
2802
|
-
/** Unique
|
|
2803
|
-
|
|
2804
|
-
/** Unique
|
|
2805
|
-
|
|
2802
|
+
/** Unique price list identifier. See also: [Unique Identifiers](/overview/concepts/unique-identifiers) */
|
|
2803
|
+
parent_price_list_id: string;
|
|
2804
|
+
/** Unique price list identifier. See also: [Unique Identifiers](/overview/concepts/unique-identifiers) */
|
|
2805
|
+
price_list_id: string;
|
|
2806
2806
|
}
|
|
2807
2807
|
export interface MediaFile {
|
|
2808
2808
|
/** The media file itself */
|
|
@@ -2938,9 +2938,9 @@ export interface MinVariantPricing {
|
|
|
2938
2938
|
min_currency_prices: Array<MinCurrencyPrice>;
|
|
2939
2939
|
/** Minimum price of all product variants for given customer group */
|
|
2940
2940
|
min_price: number;
|
|
2941
|
-
|
|
2941
|
+
price_list?: {
|
|
2942
2942
|
id: string;
|
|
2943
|
-
} |
|
|
2943
|
+
} | PriceList | null;
|
|
2944
2944
|
}
|
|
2945
2945
|
export interface Note {
|
|
2946
2946
|
/** The date and time when the note was created */
|
|
@@ -4001,14 +4001,14 @@ export interface OrderLineItemDetail {
|
|
|
4001
4001
|
managed: boolean;
|
|
4002
4002
|
/** Original price (depends on price source, e.g. could be price before sale price was applied) */
|
|
4003
4003
|
original_price: number;
|
|
4004
|
-
/** Unique
|
|
4005
|
-
|
|
4004
|
+
/** Unique price list identifier. See also: [Unique Identifiers](/overview/concepts/unique-identifiers) */
|
|
4005
|
+
parent_price_list_id: string;
|
|
4006
4006
|
/** Price of the line item */
|
|
4007
4007
|
price: number;
|
|
4008
|
+
/** Unique price list identifier. See also: [Unique Identifiers](/overview/concepts/unique-identifiers) */
|
|
4009
|
+
price_list_id: string;
|
|
4008
4010
|
/** Where the price of the line item comes from */
|
|
4009
4011
|
price_source: string;
|
|
4010
|
-
/** Unique pricing rule identifier. See also: [Unique Identifiers](/overview/concepts/unique-identifiers) */
|
|
4011
|
-
pricing_rule_id: string;
|
|
4012
4012
|
tax: TaxDetail | null;
|
|
4013
4013
|
/** Tax exclusive price of the line item */
|
|
4014
4014
|
tax_excl_price: number;
|
|
@@ -4576,65 +4576,65 @@ export interface PlanPreview {
|
|
|
4576
4576
|
/** Unique plan identifier. See also: [Unique Identifiers](/overview/concepts/unique-identifiers) */
|
|
4577
4577
|
plan_id: string;
|
|
4578
4578
|
}
|
|
4579
|
-
export interface
|
|
4580
|
-
/** Customer
|
|
4581
|
-
|
|
4579
|
+
export interface PriceList {
|
|
4580
|
+
/** Customer groups to match against */
|
|
4581
|
+
customer_groups: Array<{
|
|
4582
4582
|
id: string;
|
|
4583
|
-
} | CustomerGroup | null;
|
|
4583
|
+
} | CustomerGroup | null> | null;
|
|
4584
4584
|
/** Date range to match against */
|
|
4585
4585
|
date_range: DateRange | null;
|
|
4586
|
-
/** Whether price difference should be displayed when this
|
|
4586
|
+
/** Whether price difference should be displayed when this price list matches */
|
|
4587
4587
|
display_price_difference: boolean;
|
|
4588
|
-
/** Unique
|
|
4588
|
+
/** Unique price list identifier. See also: [Unique Identifiers](/overview/concepts/unique-identifiers) */
|
|
4589
4589
|
id: string;
|
|
4590
|
-
/** Name of the
|
|
4590
|
+
/** Name of the price list */
|
|
4591
4591
|
name: string;
|
|
4592
|
-
/** Parent
|
|
4593
|
-
|
|
4592
|
+
/** Parent price list to derive original price from */
|
|
4593
|
+
parent_price_list?: {
|
|
4594
4594
|
id: string;
|
|
4595
|
-
} |
|
|
4595
|
+
} | PriceList | null;
|
|
4596
4596
|
/** Priority of the rule (rule with higher priority is to be evaluated first) */
|
|
4597
4597
|
priority: number;
|
|
4598
|
-
/** Sales
|
|
4599
|
-
|
|
4598
|
+
/** Sales channels to match against */
|
|
4599
|
+
sales_channels: Array<{
|
|
4600
4600
|
id: string;
|
|
4601
|
-
} | SalesChannel | null;
|
|
4601
|
+
} | SalesChannel | null> | null;
|
|
4602
4602
|
}
|
|
4603
|
-
export interface
|
|
4604
|
-
/**
|
|
4605
|
-
|
|
4603
|
+
export interface PriceListCreate {
|
|
4604
|
+
/** Customer group IDs to match against */
|
|
4605
|
+
customer_group_ids?: Array<string> | null;
|
|
4606
4606
|
/** Date range to match against */
|
|
4607
4607
|
date_range?: DateRangeCreate | null;
|
|
4608
|
-
/** Whether price difference should be displayed when this
|
|
4608
|
+
/** Whether price difference should be displayed when this price list matches */
|
|
4609
4609
|
display_price_difference?: boolean | null;
|
|
4610
|
-
/** Name of the
|
|
4610
|
+
/** Name of the price list */
|
|
4611
4611
|
name: string;
|
|
4612
|
-
/** Unique
|
|
4613
|
-
|
|
4612
|
+
/** Unique price list identifier. See also: [Unique Identifiers](/overview/concepts/unique-identifiers) */
|
|
4613
|
+
parent_price_list_id?: string | null;
|
|
4614
4614
|
/** Priority of the rule (rule with higher priority is to be evaluated first) */
|
|
4615
4615
|
priority?: number | null;
|
|
4616
|
-
/**
|
|
4617
|
-
|
|
4616
|
+
/** Sales channel IDs to match against */
|
|
4617
|
+
sales_channel_ids?: Array<string> | null;
|
|
4618
4618
|
}
|
|
4619
|
-
export interface
|
|
4619
|
+
export interface PriceListHistory {
|
|
4620
4620
|
/** The timestamp for this history record */
|
|
4621
4621
|
date: string;
|
|
4622
|
-
|
|
4622
|
+
price_lists: Array<PriceList>;
|
|
4623
4623
|
}
|
|
4624
|
-
export interface
|
|
4625
|
-
/**
|
|
4626
|
-
|
|
4624
|
+
export interface PriceListModify {
|
|
4625
|
+
/** Customer group IDs to match against */
|
|
4626
|
+
customer_group_ids?: Array<string> | null;
|
|
4627
4627
|
date_range?: DateRangeCreate | null;
|
|
4628
|
-
/** Whether price difference should be displayed when this
|
|
4628
|
+
/** Whether price difference should be displayed when this price list matches */
|
|
4629
4629
|
display_price_difference?: boolean | null;
|
|
4630
|
-
/** Name of the
|
|
4630
|
+
/** Name of the price list */
|
|
4631
4631
|
name?: string | null;
|
|
4632
|
-
/** Unique
|
|
4633
|
-
|
|
4632
|
+
/** Unique price list identifier. See also: [Unique Identifiers](/overview/concepts/unique-identifiers) */
|
|
4633
|
+
parent_price_list_id?: string | null;
|
|
4634
4634
|
/** Priority of the rule (rule with higher priority is to be evaluated first) */
|
|
4635
4635
|
priority?: number | null;
|
|
4636
|
-
/**
|
|
4637
|
-
|
|
4636
|
+
/** Sales channel IDs to match against */
|
|
4637
|
+
sales_channel_ids?: Array<string> | null;
|
|
4638
4638
|
}
|
|
4639
4639
|
export interface Product {
|
|
4640
4640
|
/** Cached product analytics data, far from realtime (updated every N hours) */
|
|
@@ -4691,7 +4691,7 @@ export interface Product {
|
|
|
4691
4691
|
min_inventory_count: number;
|
|
4692
4692
|
/** Minimum price of all product variants */
|
|
4693
4693
|
min_price: number;
|
|
4694
|
-
/** Minimum pricing overrides per
|
|
4694
|
+
/** Minimum pricing overrides per price list of all variants */
|
|
4695
4695
|
min_pricing_overrides: Array<MinVariantPricing>;
|
|
4696
4696
|
/** Minimum amount of items customer must order to buy a product */
|
|
4697
4697
|
minimum_quantity: number | null;
|
|
@@ -6714,7 +6714,7 @@ export type SearchContentBlocksSortBy = "created_at" | "title" | "updated_at";
|
|
|
6714
6714
|
export type SearchCustomerInventorySortBy = "created_at";
|
|
6715
6715
|
export type SearchCustomersSortBy = "created_at" | "email" | "last_order" | "name" | "order_count" | "total_spent" | "updated_at";
|
|
6716
6716
|
export type SearchFilesSortBy = "created_at" | "mime" | "name" | "size";
|
|
6717
|
-
export type SearchOp = "and" | "eq" | "ge" | "gt" | "le" | "lt" | "ne" | "
|
|
6717
|
+
export type SearchOp = "and" | "eq" | "ge" | "gt" | "le" | "lt" | "ne" | "or";
|
|
6718
6718
|
export interface SearchOption {
|
|
6719
6719
|
/** Value of the option (if boolean) */
|
|
6720
6720
|
boolean?: boolean | null;
|
|
@@ -8800,10 +8800,10 @@ export interface VariantPricing {
|
|
|
8800
8800
|
map_price: number;
|
|
8801
8801
|
/** The price of the product variant */
|
|
8802
8802
|
price: number;
|
|
8803
|
-
/** The price is applied when this
|
|
8804
|
-
|
|
8803
|
+
/** The price is applied when this price list matches */
|
|
8804
|
+
price_list?: {
|
|
8805
8805
|
id: string;
|
|
8806
|
-
} |
|
|
8806
|
+
} | PriceList | null;
|
|
8807
8807
|
/** The retail cost of the product variant */
|
|
8808
8808
|
retail_price: number;
|
|
8809
8809
|
tiered_pricing: TieredPricing | null;
|
|
@@ -8815,8 +8815,8 @@ export interface VariantPricingCreate {
|
|
|
8815
8815
|
map_price?: number | null;
|
|
8816
8816
|
/** The price of the product variant */
|
|
8817
8817
|
price?: number | null;
|
|
8818
|
-
/** Unique
|
|
8819
|
-
|
|
8818
|
+
/** Unique price list identifier. See also: [Unique Identifiers](/overview/concepts/unique-identifiers) */
|
|
8819
|
+
price_list_id: string;
|
|
8820
8820
|
/** The retail cost of the product variant */
|
|
8821
8821
|
retail_price?: number | null;
|
|
8822
8822
|
tiered_pricing?: TieredPricingCreate | null;
|
|
@@ -9501,15 +9501,15 @@ export interface PaymentMethodExpansionMap {
|
|
|
9501
9501
|
"credit_card.address_country_info"?: true;
|
|
9502
9502
|
"credit_card.address_state_info"?: true;
|
|
9503
9503
|
}
|
|
9504
|
-
export interface
|
|
9505
|
-
|
|
9506
|
-
|
|
9507
|
-
|
|
9504
|
+
export interface PriceListExpansionMap {
|
|
9505
|
+
customer_groups?: true;
|
|
9506
|
+
parent_price_list?: true | PriceListExpansionMap;
|
|
9507
|
+
sales_channels?: true;
|
|
9508
9508
|
}
|
|
9509
|
-
export interface
|
|
9510
|
-
"
|
|
9511
|
-
"
|
|
9512
|
-
"
|
|
9509
|
+
export interface PriceListHistoryExpansionMap {
|
|
9510
|
+
"price_lists.customer_groups"?: true;
|
|
9511
|
+
"price_lists.parent_price_list"?: true | PriceListExpansionMap;
|
|
9512
|
+
"price_lists.sales_channels"?: true;
|
|
9513
9513
|
}
|
|
9514
9514
|
export interface ProductExpansionMap {
|
|
9515
9515
|
"average_scores.review_dimension"?: true;
|
|
@@ -9523,7 +9523,7 @@ export interface ProductExpansionMap {
|
|
|
9523
9523
|
"custom_field_objects.products"?: true | ProductExpansionMap;
|
|
9524
9524
|
"custom_field_objects.variants"?: true | ProductVariantExpansionMap;
|
|
9525
9525
|
field_set?: true;
|
|
9526
|
-
"min_pricing_overrides.
|
|
9526
|
+
"min_pricing_overrides.price_list"?: true | PriceListExpansionMap;
|
|
9527
9527
|
review_dimension_set?: true | ReviewDimensionSetExpansionMap;
|
|
9528
9528
|
sales_channels?: true;
|
|
9529
9529
|
"survey_answers_summary.survey_question"?: true;
|
|
@@ -9544,7 +9544,7 @@ export interface ProductPageExpansionMap {
|
|
|
9544
9544
|
"items.custom_field_objects.products"?: true | ProductExpansionMap;
|
|
9545
9545
|
"items.custom_field_objects.variants"?: true | ProductVariantExpansionMap;
|
|
9546
9546
|
"items.field_set"?: true;
|
|
9547
|
-
"items.min_pricing_overrides.
|
|
9547
|
+
"items.min_pricing_overrides.price_list"?: true | PriceListExpansionMap;
|
|
9548
9548
|
"items.review_dimension_set"?: true | ReviewDimensionSetExpansionMap;
|
|
9549
9549
|
"items.sales_channels"?: true;
|
|
9550
9550
|
"items.survey_answers_summary.survey_question"?: true;
|
|
@@ -9639,7 +9639,7 @@ export interface ProductVariantExpansionMap {
|
|
|
9639
9639
|
"linked_media_files.thumbnail_file"?: true | FileExpansionMap;
|
|
9640
9640
|
"media_files.file"?: true | FileExpansionMap;
|
|
9641
9641
|
"media_files.thumbnail_file"?: true | FileExpansionMap;
|
|
9642
|
-
"pricing_overrides.
|
|
9642
|
+
"pricing_overrides.price_list"?: true | PriceListExpansionMap;
|
|
9643
9643
|
product?: true | ProductExpansionMap;
|
|
9644
9644
|
"suppliers.inventory_location"?: true | InventoryLocationExpansionMap;
|
|
9645
9645
|
"suppliers.supplier"?: true | SupplierExpansionMap;
|
|
@@ -9653,7 +9653,7 @@ export interface ProductVariantPageExpansionMap {
|
|
|
9653
9653
|
"items.linked_media_files.thumbnail_file"?: true | FileExpansionMap;
|
|
9654
9654
|
"items.media_files.file"?: true | FileExpansionMap;
|
|
9655
9655
|
"items.media_files.thumbnail_file"?: true | FileExpansionMap;
|
|
9656
|
-
"items.pricing_overrides.
|
|
9656
|
+
"items.pricing_overrides.price_list"?: true | PriceListExpansionMap;
|
|
9657
9657
|
"items.product"?: true | ProductExpansionMap;
|
|
9658
9658
|
"items.suppliers.inventory_location"?: true | InventoryLocationExpansionMap;
|
|
9659
9659
|
"items.suppliers.supplier"?: true | SupplierExpansionMap;
|
|
@@ -12123,12 +12123,12 @@ export interface EndpointOrdersPay extends Endpoint<EndpointOrdersPay, Order> {
|
|
|
12123
12123
|
expand(v: OrderExpansionMap): EndpointOrdersPay;
|
|
12124
12124
|
extract(v: Extractor<Order>): EndpointOrdersPay;
|
|
12125
12125
|
}
|
|
12126
|
-
export interface
|
|
12126
|
+
export interface EndpointOrdersPriceLists extends Endpoint<EndpointOrdersPriceLists, MatchingPriceLists> {
|
|
12127
12127
|
/** Unique order identifier. See also: [Unique Identifiers](/overview/concepts/unique-identifiers) */
|
|
12128
|
-
order_id(v: string):
|
|
12128
|
+
order_id(v: string): EndpointOrdersPriceLists;
|
|
12129
12129
|
/** Unique shop identifier. See also: [Unique Identifiers](/overview/concepts/unique-identifiers) */
|
|
12130
|
-
shop_id(v: string):
|
|
12131
|
-
extract(v: Extractor<
|
|
12130
|
+
shop_id(v: string): EndpointOrdersPriceLists;
|
|
12131
|
+
extract(v: Extractor<MatchingPriceLists>): EndpointOrdersPriceLists;
|
|
12132
12132
|
}
|
|
12133
12133
|
export interface EndpointOrdersRefund extends Endpoint<EndpointOrdersRefund, Order> {
|
|
12134
12134
|
/** Output filtering */
|
|
@@ -12294,59 +12294,59 @@ export interface EndpointPlanPreview extends Endpoint<EndpointPlanPreview, Invoi
|
|
|
12294
12294
|
data(v: PlanPreview): EndpointPlanPreview;
|
|
12295
12295
|
extract(v: Extractor<Invoice>): EndpointPlanPreview;
|
|
12296
12296
|
}
|
|
12297
|
-
export interface
|
|
12298
|
-
/** List of
|
|
12299
|
-
ids(v: Array<string>):
|
|
12297
|
+
export interface EndpointPriceListsDelete extends Endpoint<EndpointPriceListsDelete, void> {
|
|
12298
|
+
/** List of price list ids. See also: [Unique Identifiers](/overview/concepts/unique-identifiers) */
|
|
12299
|
+
ids(v: Array<string>): EndpointPriceListsDelete;
|
|
12300
12300
|
/** Unique shop identifier. See also: [Unique Identifiers](/overview/concepts/unique-identifiers) */
|
|
12301
|
-
shop_id(v: string):
|
|
12301
|
+
shop_id(v: string): EndpointPriceListsDelete;
|
|
12302
12302
|
}
|
|
12303
|
-
export interface
|
|
12303
|
+
export interface EndpointPriceLists extends Endpoint<EndpointPriceLists, Array<PriceList>> {
|
|
12304
12304
|
/** Output filtering */
|
|
12305
|
-
fields(v: Array<string>):
|
|
12306
|
-
/** List of
|
|
12307
|
-
ids(v: Array<string>):
|
|
12305
|
+
fields(v: Array<string>): EndpointPriceLists;
|
|
12306
|
+
/** List of price list ids. See also: [Unique Identifiers](/overview/concepts/unique-identifiers) */
|
|
12307
|
+
ids(v: Array<string>): EndpointPriceLists;
|
|
12308
12308
|
/** When asking for multiple items, allow returning less than was asked (in case some are missing) */
|
|
12309
|
-
loose(v: boolean):
|
|
12309
|
+
loose(v: boolean): EndpointPriceLists;
|
|
12310
12310
|
/** Unique shop identifier. See also: [Unique Identifiers](/overview/concepts/unique-identifiers) */
|
|
12311
|
-
shop_id(v: string):
|
|
12312
|
-
expand(v:
|
|
12313
|
-
extract(v: Extractor<Array<
|
|
12311
|
+
shop_id(v: string): EndpointPriceLists;
|
|
12312
|
+
expand(v: PriceListExpansionMap): EndpointPriceLists;
|
|
12313
|
+
extract(v: Extractor<Array<PriceList>>): EndpointPriceLists;
|
|
12314
12314
|
}
|
|
12315
|
-
export interface
|
|
12315
|
+
export interface EndpointPriceListsCreate extends Endpoint<EndpointPriceListsCreate, Array<PriceList>> {
|
|
12316
12316
|
/** Output filtering */
|
|
12317
|
-
fields(v: Array<string>):
|
|
12318
|
-
/** List of
|
|
12319
|
-
ids(v: Array<string>):
|
|
12317
|
+
fields(v: Array<string>): EndpointPriceListsCreate;
|
|
12318
|
+
/** List of price list ids. See also: [Unique Identifiers](/overview/concepts/unique-identifiers) */
|
|
12319
|
+
ids(v: Array<string>): EndpointPriceListsModify;
|
|
12320
12320
|
/** Unique shop identifier. See also: [Unique Identifiers](/overview/concepts/unique-identifiers) */
|
|
12321
|
-
shop_id(v: string):
|
|
12322
|
-
data(v: Array<
|
|
12323
|
-
expand(v:
|
|
12324
|
-
extract(v: Extractor<Array<
|
|
12321
|
+
shop_id(v: string): EndpointPriceListsCreate;
|
|
12322
|
+
data(v: Array<PriceListCreate>): EndpointPriceListsCreate;
|
|
12323
|
+
expand(v: PriceListExpansionMap): EndpointPriceListsCreate;
|
|
12324
|
+
extract(v: Extractor<Array<PriceList>>): EndpointPriceListsCreate;
|
|
12325
12325
|
}
|
|
12326
|
-
export interface
|
|
12326
|
+
export interface EndpointPriceListsModify extends Endpoint<EndpointPriceListsModify, Array<PriceList>> {
|
|
12327
12327
|
/** Output filtering */
|
|
12328
|
-
fields(v: Array<string>):
|
|
12328
|
+
fields(v: Array<string>): EndpointPriceListsModify;
|
|
12329
12329
|
/** Unique shop identifier. See also: [Unique Identifiers](/overview/concepts/unique-identifiers) */
|
|
12330
|
-
shop_id(v: string):
|
|
12331
|
-
data(v: Array<
|
|
12332
|
-
expand(v:
|
|
12333
|
-
extract(v: Extractor<Array<
|
|
12330
|
+
shop_id(v: string): EndpointPriceListsModify;
|
|
12331
|
+
data(v: Array<PriceListModify>): EndpointPriceListsModify;
|
|
12332
|
+
expand(v: PriceListExpansionMap): EndpointPriceListsModify;
|
|
12333
|
+
extract(v: Extractor<Array<PriceList>>): EndpointPriceListsModify;
|
|
12334
12334
|
}
|
|
12335
|
-
export interface
|
|
12336
|
-
from(v: string):
|
|
12335
|
+
export interface EndpointPriceListsHistory extends Endpoint<EndpointPriceListsHistory, Array<PriceListHistory>> {
|
|
12336
|
+
from(v: string): EndpointPriceListsHistory;
|
|
12337
12337
|
/** Unique shop identifier. See also: [Unique Identifiers](/overview/concepts/unique-identifiers) */
|
|
12338
|
-
shop_id(v: string):
|
|
12339
|
-
to(v: string):
|
|
12340
|
-
expand(v:
|
|
12341
|
-
extract(v: Extractor<Array<
|
|
12338
|
+
shop_id(v: string): EndpointPriceListsHistory;
|
|
12339
|
+
to(v: string): EndpointPriceListsHistory;
|
|
12340
|
+
expand(v: PriceListHistoryExpansionMap): EndpointPriceListsHistory;
|
|
12341
|
+
extract(v: Extractor<Array<PriceListHistory>>): EndpointPriceListsHistory;
|
|
12342
12342
|
}
|
|
12343
|
-
export interface
|
|
12344
|
-
customer_group_id(v: string):
|
|
12345
|
-
sales_channel_id(v: string):
|
|
12343
|
+
export interface EndpointPriceListsLookup extends Endpoint<EndpointPriceListsLookup, Array<PriceList>> {
|
|
12344
|
+
customer_group_id(v: string): EndpointPriceListsLookup;
|
|
12345
|
+
sales_channel_id(v: string): EndpointPriceListsLookup;
|
|
12346
12346
|
/** Unique shop identifier. See also: [Unique Identifiers](/overview/concepts/unique-identifiers) */
|
|
12347
|
-
shop_id(v: string):
|
|
12348
|
-
expand(v:
|
|
12349
|
-
extract(v: Extractor<Array<
|
|
12347
|
+
shop_id(v: string): EndpointPriceListsLookup;
|
|
12348
|
+
expand(v: PriceListExpansionMap): EndpointPriceListsLookup;
|
|
12349
|
+
extract(v: Extractor<Array<PriceList>>): EndpointPriceListsLookup;
|
|
12350
12350
|
}
|
|
12351
12351
|
export interface EndpointProductFieldSetsDelete extends Endpoint<EndpointProductFieldSetsDelete, void> {
|
|
12352
12352
|
/** List of product field set ids. See also: [Unique Identifiers](/overview/concepts/unique-identifiers) */
|
|
@@ -15522,7 +15522,7 @@ export interface ReqFunction {
|
|
|
15522
15522
|
(ctx: Context, v: "POST:orders/override.json"): EndpointOrdersOverride;
|
|
15523
15523
|
(ctx: Context, v: "GET:orders/page.json"): EndpointOrdersPage;
|
|
15524
15524
|
(ctx: Context, v: "POST:orders/pay.json"): EndpointOrdersPay;
|
|
15525
|
-
(ctx: Context, v: "GET:orders/
|
|
15525
|
+
(ctx: Context, v: "GET:orders/price_lists.json"): EndpointOrdersPriceLists;
|
|
15526
15526
|
(ctx: Context, v: "POST:orders/refund.json"): EndpointOrdersRefund;
|
|
15527
15527
|
(ctx: Context, v: "POST:orders/reserve.json"): EndpointOrdersReserve;
|
|
15528
15528
|
(ctx: Context, v: "POST:orders/restock.json"): EndpointOrdersRestock;
|
|
@@ -15539,11 +15539,11 @@ export interface ReqFunction {
|
|
|
15539
15539
|
(ctx: Context, v: "GET:plan.json"): EndpointPlan;
|
|
15540
15540
|
(ctx: Context, v: "POST:plan.json"): EndpointPlanCreate;
|
|
15541
15541
|
(ctx: Context, v: "POST:plan/preview.json"): EndpointPlanPreview;
|
|
15542
|
-
(ctx: Context, v: "DELETE:
|
|
15543
|
-
(ctx: Context, v: "GET:
|
|
15544
|
-
(ctx: Context, v: "POST:
|
|
15545
|
-
(ctx: Context, v: "GET:
|
|
15546
|
-
(ctx: Context, v: "GET:
|
|
15542
|
+
(ctx: Context, v: "DELETE:price_lists.json"): EndpointPriceListsDelete;
|
|
15543
|
+
(ctx: Context, v: "GET:price_lists.json"): EndpointPriceLists;
|
|
15544
|
+
(ctx: Context, v: "POST:price_lists.json"): EndpointPriceListsCreate;
|
|
15545
|
+
(ctx: Context, v: "GET:price_lists/history.json"): EndpointPriceListsHistory;
|
|
15546
|
+
(ctx: Context, v: "GET:price_lists/lookup.json"): EndpointPriceListsLookup;
|
|
15547
15547
|
(ctx: Context, v: "DELETE:product_field_sets.json"): EndpointProductFieldSetsDelete;
|
|
15548
15548
|
(ctx: Context, v: "GET:product_field_sets.json"): EndpointProductFieldSets;
|
|
15549
15549
|
(ctx: Context, v: "POST:product_field_sets.json"): EndpointProductFieldSetsCreate;
|
package/types/json/mutator.d.ts
CHANGED
|
@@ -104,9 +104,9 @@ export declare class Mutator {
|
|
|
104
104
|
taxRuleModify: (shopID: string, id: string, req: import("./commerceTypes.js").TaxRuleModify) => void;
|
|
105
105
|
taxRuleDelete: (shopID: string, id: string) => void;
|
|
106
106
|
taxRulesAddDefault: (shopID: string, country: string) => void;
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
107
|
+
priceList: (shopID: string, req: import("./commerceTypes.js").PriceListCreate) => string;
|
|
108
|
+
priceListModify: (shopID: string, id: string, req: import("./commerceTypes.js").PriceListModify) => void;
|
|
109
|
+
priceListDelete: (shopID: string, id: string) => void;
|
|
110
110
|
returnReason: (shopID: string, req: import("./commerceTypes.js").ReturnReasonCreate) => string;
|
|
111
111
|
returnReasonModify: (shopID: string, id: string, req: import("./commerceTypes.js").ReturnReasonModify) => void;
|
|
112
112
|
returnReasonDelete: (shopID: string, id: string) => void;
|
|
@@ -894,14 +894,14 @@ export interface OrderLineItemDetail {
|
|
|
894
894
|
managed: boolean;
|
|
895
895
|
/** Original price (depends on price source, e.g. could be price before sale price was applied) */
|
|
896
896
|
original_price: number;
|
|
897
|
-
/** Unique
|
|
898
|
-
|
|
897
|
+
/** Unique price list identifier. See also: [Unique Identifiers](/overview/concepts/unique-identifiers) */
|
|
898
|
+
parent_price_list_id: string;
|
|
899
899
|
/** Price of the line item */
|
|
900
900
|
price: number;
|
|
901
|
+
/** Unique price list identifier. See also: [Unique Identifiers](/overview/concepts/unique-identifiers) */
|
|
902
|
+
price_list_id: string;
|
|
901
903
|
/** Where the price of the line item comes from */
|
|
902
904
|
price_source: string;
|
|
903
|
-
/** Unique pricing rule identifier. See also: [Unique Identifiers](/overview/concepts/unique-identifiers) */
|
|
904
|
-
pricing_rule_id: string;
|
|
905
905
|
tax: TaxDetail | null;
|
|
906
906
|
/** Tax exclusive price of the line item */
|
|
907
907
|
tax_excl_price: number;
|
|
@@ -1265,7 +1265,7 @@ export interface ReviewImagePage {
|
|
|
1265
1265
|
last_key: string;
|
|
1266
1266
|
}
|
|
1267
1267
|
export type RoundTaxAt = "jurisdiction" | "line_item" | "order";
|
|
1268
|
-
export type SearchOp = "and" | "eq" | "ge" | "gt" | "le" | "lt" | "ne" | "
|
|
1268
|
+
export type SearchOp = "and" | "eq" | "ge" | "gt" | "le" | "lt" | "ne" | "or";
|
|
1269
1269
|
export interface SearchOption {
|
|
1270
1270
|
/** Value of the option (if boolean) */
|
|
1271
1271
|
boolean?: boolean | null;
|
|
@@ -13,9 +13,9 @@ export interface VariantLike {
|
|
|
13
13
|
retail_price: number;
|
|
14
14
|
tiered_pricing: TieredPricingFragment | null;
|
|
15
15
|
pricing_overrides: (VariantPricing & {
|
|
16
|
-
|
|
16
|
+
price_list: {
|
|
17
17
|
id: string;
|
|
18
18
|
} | null;
|
|
19
19
|
})[];
|
|
20
20
|
}
|
|
21
|
-
export declare function variantPriceInfo(env: VariantPriceInfoEnv, variant: VariantLike,
|
|
21
|
+
export declare function variantPriceInfo(env: VariantPriceInfoEnv, variant: VariantLike, priceListID: string, parentPriceListID: string, displayPriceDifference: boolean): PriceInfo;
|