@sixtyninecommerce/admin 0.10.0 → 0.12.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.
Files changed (302) hide show
  1. package/README.md +5772 -118
  2. package/dist/auth/index.d.ts +7 -1
  3. package/dist/auth/index.js +8 -1
  4. package/dist/catalog/assets.d.ts +120 -8
  5. package/dist/catalog/assets.js +98 -12
  6. package/dist/catalog/collections.d.ts +279 -14
  7. package/dist/catalog/collections.js +246 -15
  8. package/dist/catalog/documents.d.ts +142 -0
  9. package/dist/catalog/documents.js +114 -0
  10. package/dist/catalog/index.d.ts +54 -6
  11. package/dist/catalog/index.js +10 -1
  12. package/dist/catalog/metadata.d.ts +244 -0
  13. package/dist/catalog/metadata.js +220 -0
  14. package/dist/catalog/products.d.ts +159 -19
  15. package/dist/catalog/products.js +88 -13
  16. package/dist/catalog/properties.d.ts +140 -14
  17. package/dist/catalog/properties.js +65 -1
  18. package/dist/catalog/recommendations.d.ts +288 -0
  19. package/dist/catalog/recommendations.js +237 -0
  20. package/dist/catalog/reviews.d.ts +381 -0
  21. package/dist/catalog/reviews.js +325 -0
  22. package/dist/catalog/types.d.ts +17 -1
  23. package/dist/catalog/types.js +10 -0
  24. package/dist/catalog/variant-find.d.ts +136 -0
  25. package/dist/catalog/variant-find.js +239 -0
  26. package/dist/catalog/variants.d.ts +293 -26
  27. package/dist/catalog/variants.js +164 -7
  28. package/dist/catalog/visibility.d.ts +38 -7
  29. package/dist/catalog/visibility.js +19 -1
  30. package/dist/client.d.ts +121 -9
  31. package/dist/client.js +53 -14
  32. package/dist/content/assets.d.ts +285 -0
  33. package/dist/content/assets.js +181 -0
  34. package/dist/content/forms.d.ts +332 -1
  35. package/dist/content/forms.js +140 -4
  36. package/dist/content/items.d.ts +292 -0
  37. package/dist/content/items.js +170 -0
  38. package/dist/content/menus.d.ts +254 -0
  39. package/dist/content/menus.js +70 -0
  40. package/dist/content/strings.d.ts +137 -0
  41. package/dist/content/strings.js +82 -0
  42. package/dist/content/types.d.ts +282 -0
  43. package/dist/content/types.js +100 -0
  44. package/dist/customers/age-verification.d.ts +66 -0
  45. package/dist/customers/age-verification.js +79 -0
  46. package/dist/customers/credit.d.ts +263 -0
  47. package/dist/customers/credit.js +244 -0
  48. package/dist/customers/delivery-preferences.d.ts +120 -0
  49. package/dist/customers/delivery-preferences.js +97 -0
  50. package/dist/customers/delivery-terms.d.ts +44 -0
  51. package/dist/customers/delivery-terms.js +32 -0
  52. package/dist/customers/groups.d.ts +207 -0
  53. package/dist/customers/groups.js +438 -0
  54. package/dist/customers/index.d.ts +462 -37
  55. package/dist/customers/index.js +317 -40
  56. package/dist/customers/invitation-status.d.ts +57 -0
  57. package/dist/customers/invitation-status.js +21 -0
  58. package/dist/customers/notes.d.ts +67 -0
  59. package/dist/customers/notes.js +51 -0
  60. package/dist/customers/notification-recipients.d.ts +97 -0
  61. package/dist/customers/notification-recipients.js +84 -0
  62. package/dist/customers/saved-lists.d.ts +42 -0
  63. package/dist/customers/saved-lists.js +61 -0
  64. package/dist/customers/vat.d.ts +83 -0
  65. package/dist/customers/vat.js +46 -0
  66. package/dist/customers/wire.d.ts +20 -0
  67. package/dist/customers/wire.js +35 -0
  68. package/dist/documents/ar.d.ts +307 -0
  69. package/dist/documents/ar.js +254 -0
  70. package/dist/documents/emails.d.ts +150 -0
  71. package/dist/documents/emails.js +220 -0
  72. package/dist/documents/index.d.ts +744 -21
  73. package/dist/documents/index.js +438 -24
  74. package/dist/documents/pdf.d.ts +2 -0
  75. package/dist/documents/pdf.js +11 -0
  76. package/dist/fulfillments/create.d.ts +167 -0
  77. package/dist/fulfillments/create.js +216 -0
  78. package/dist/fulfillments/index.d.ts +163 -11
  79. package/dist/fulfillments/index.js +135 -6
  80. package/dist/fulfillments/payment-policy.d.ts +64 -0
  81. package/dist/fulfillments/payment-policy.js +140 -0
  82. package/dist/fulfillments/warehouse.d.ts +724 -0
  83. package/dist/fulfillments/warehouse.js +914 -0
  84. package/dist/geo/index.d.ts +119 -0
  85. package/dist/geo/index.js +107 -0
  86. package/dist/index.d.ts +147 -39
  87. package/dist/index.js +51 -12
  88. package/dist/integrations/afas-actions.d.ts +234 -0
  89. package/dist/integrations/afas-actions.js +310 -0
  90. package/dist/integrations/afas-types.d.ts +483 -0
  91. package/dist/integrations/afas-types.js +5 -0
  92. package/dist/integrations/afas.d.ts +234 -0
  93. package/dist/integrations/afas.js +290 -0
  94. package/dist/integrations/connections.d.ts +103 -0
  95. package/dist/integrations/connections.js +55 -0
  96. package/dist/integrations/esp.d.ts +313 -0
  97. package/dist/integrations/esp.js +169 -0
  98. package/dist/integrations/exact-online-types.d.ts +965 -0
  99. package/dist/integrations/exact-online-types.js +6 -0
  100. package/dist/integrations/exact-online.d.ts +784 -0
  101. package/dist/integrations/exact-online.js +1089 -0
  102. package/dist/integrations/index.d.ts +44 -3
  103. package/dist/integrations/index.js +23 -3
  104. package/dist/integrations/pipeline-discoveries.d.ts +65 -0
  105. package/dist/integrations/pipeline-discoveries.js +65 -0
  106. package/dist/integrations/pipeline-keys.d.ts +13 -0
  107. package/dist/integrations/pipeline-keys.js +22 -0
  108. package/dist/integrations/pipeline-runs.d.ts +119 -0
  109. package/dist/integrations/pipeline-runs.js +87 -0
  110. package/dist/integrations/pipelines.d.ts +87 -15
  111. package/dist/integrations/pipelines.js +41 -22
  112. package/dist/integrations/price-import.d.ts +223 -0
  113. package/dist/integrations/price-import.js +124 -0
  114. package/dist/integrations/types.d.ts +367 -3
  115. package/dist/integrations/types.js +4 -3
  116. package/dist/locations/index.d.ts +66 -0
  117. package/dist/locations/index.js +31 -0
  118. package/dist/meta/index.d.ts +172 -0
  119. package/dist/metafields/index.d.ts +8 -1
  120. package/dist/metafields/index.js +10 -0
  121. package/dist/orders/cancel-with-money.d.ts +237 -0
  122. package/dist/orders/cancel-with-money.js +155 -0
  123. package/dist/orders/commit-edit.d.ts +23 -1
  124. package/dist/orders/commit-edit.js +19 -2
  125. package/dist/orders/deposit-policy.d.ts +3 -1
  126. package/dist/orders/drafts.d.ts +800 -0
  127. package/dist/orders/drafts.js +771 -0
  128. package/dist/orders/fields.d.ts +245 -0
  129. package/dist/orders/fields.js +188 -0
  130. package/dist/orders/get.d.ts +29 -19
  131. package/dist/orders/get.js +17 -8
  132. package/dist/orders/index.d.ts +66 -15
  133. package/dist/orders/index.js +25 -2
  134. package/dist/orders/lifecycle.d.ts +128 -0
  135. package/dist/orders/lifecycle.js +158 -0
  136. package/dist/orders/line-price-preview.d.ts +7 -2
  137. package/dist/orders/list.d.ts +243 -0
  138. package/dist/orders/list.js +487 -0
  139. package/dist/orders/manual-discounts.d.ts +13 -5
  140. package/dist/orders/manual-pricing.d.ts +5 -0
  141. package/dist/orders/money-view.d.ts +149 -0
  142. package/dist/orders/money-view.js +99 -0
  143. package/dist/orders/order-entry.d.ts +20 -7
  144. package/dist/orders/plan-edit.d.ts +34 -2
  145. package/dist/orders/plan-edit.js +112 -11
  146. package/dist/orders/settings.d.ts +201 -0
  147. package/dist/orders/settings.js +325 -0
  148. package/dist/orders/status.d.ts +159 -13
  149. package/dist/orders/status.js +21 -0
  150. package/dist/orders/surcharges.d.ts +20 -1
  151. package/dist/orders/surcharges.js +37 -11
  152. package/dist/payments/account-credit.d.ts +46 -0
  153. package/dist/payments/account-credit.js +42 -0
  154. package/dist/payments/ar.d.ts +292 -0
  155. package/dist/payments/ar.js +223 -0
  156. package/dist/payments/connected-account.d.ts +47 -0
  157. package/dist/payments/connected-account.js +61 -0
  158. package/dist/payments/credit-noted-fields.d.ts +19 -0
  159. package/dist/payments/credit-noted-fields.js +69 -0
  160. package/dist/payments/customer-consent.d.ts +30 -0
  161. package/dist/payments/customer-consent.js +49 -0
  162. package/dist/payments/index.d.ts +340 -19
  163. package/dist/payments/index.js +151 -1
  164. package/dist/payments/methods.d.ts +303 -8
  165. package/dist/payments/methods.js +337 -7
  166. package/dist/payments/mollie-methods.d.ts +159 -0
  167. package/dist/payments/mollie-methods.js +141 -0
  168. package/dist/payments/payment-links.d.ts +180 -0
  169. package/dist/payments/payment-links.js +97 -0
  170. package/dist/payments/provider-keys.d.ts +150 -0
  171. package/dist/payments/provider-keys.js +118 -0
  172. package/dist/payments/providers.d.ts +86 -11
  173. package/dist/payments/providers.js +29 -0
  174. package/dist/payments/requests.d.ts +147 -0
  175. package/dist/payments/requests.js +93 -0
  176. package/dist/payments/store-credit-fields.d.ts +15 -0
  177. package/dist/payments/store-credit-fields.js +51 -0
  178. package/dist/pickups/index.d.ts +106 -0
  179. package/dist/pickups/index.js +108 -0
  180. package/dist/platform/channels.d.ts +132 -0
  181. package/dist/platform/channels.js +128 -0
  182. package/dist/platform/email-gateways.d.ts +165 -0
  183. package/dist/platform/email-gateways.js +78 -0
  184. package/dist/platform/geo.d.ts +123 -0
  185. package/dist/platform/geo.js +144 -0
  186. package/dist/platform/tax.d.ts +162 -0
  187. package/dist/platform/tax.js +169 -0
  188. package/dist/pos/anomalies.d.ts +158 -0
  189. package/dist/pos/anomalies.js +64 -0
  190. package/dist/pos/assisted-selling.d.ts +79 -0
  191. package/dist/pos/assisted-selling.js +38 -0
  192. package/dist/pos/exchanges.d.ts +108 -0
  193. package/dist/pos/exchanges.js +22 -0
  194. package/dist/pos/gift-cards.d.ts +135 -0
  195. package/dist/pos/gift-cards.js +47 -0
  196. package/dist/pos/index.d.ts +2370 -58
  197. package/dist/pos/index.js +854 -7
  198. package/dist/pos/no-receipt.d.ts +94 -0
  199. package/dist/pos/no-receipt.js +25 -0
  200. package/dist/pos/offline-sales.d.ts +228 -0
  201. package/dist/pos/offline-sales.js +170 -0
  202. package/dist/pos/pay-by-link.d.ts +143 -0
  203. package/dist/pos/pay-by-link.js +57 -0
  204. package/dist/pos/quick-keys.d.ts +103 -0
  205. package/dist/pos/quick-keys.js +45 -0
  206. package/dist/pos/reports.d.ts +360 -0
  207. package/dist/pos/reports.js +62 -0
  208. package/dist/pos/returns.d.ts +244 -0
  209. package/dist/pos/returns.js +83 -0
  210. package/dist/pricing/bulk-coupons.d.ts +139 -0
  211. package/dist/pricing/bulk-coupons.js +112 -0
  212. package/dist/pricing/index.d.ts +174 -4
  213. package/dist/pricing/index.js +174 -1
  214. package/dist/pricing/price-lists.d.ts +606 -0
  215. package/dist/pricing/price-lists.js +600 -0
  216. package/dist/purchasing/alerts.d.ts +104 -0
  217. package/dist/purchasing/alerts.js +88 -0
  218. package/dist/purchasing/backorders.d.ts +61 -0
  219. package/dist/purchasing/backorders.js +92 -0
  220. package/dist/purchasing/cost.d.ts +110 -0
  221. package/dist/purchasing/cost.js +86 -0
  222. package/dist/purchasing/index.d.ts +54 -0
  223. package/dist/purchasing/index.js +24 -0
  224. package/dist/purchasing/links.d.ts +263 -0
  225. package/dist/purchasing/links.js +192 -0
  226. package/dist/purchasing/purchase-orders.d.ts +551 -0
  227. package/dist/purchasing/purchase-orders.js +491 -0
  228. package/dist/purchasing/receipts.d.ts +396 -0
  229. package/dist/purchasing/receipts.js +287 -0
  230. package/dist/purchasing/replenishment.d.ts +281 -0
  231. package/dist/purchasing/replenishment.js +240 -0
  232. package/dist/purchasing/returns.d.ts +273 -0
  233. package/dist/purchasing/returns.js +229 -0
  234. package/dist/purchasing/settings.d.ts +152 -0
  235. package/dist/purchasing/settings.js +181 -0
  236. package/dist/purchasing/suppliers.d.ts +476 -0
  237. package/dist/purchasing/suppliers.js +438 -0
  238. package/dist/quotes/index.d.ts +518 -0
  239. package/dist/quotes/index.js +439 -0
  240. package/dist/reports/index.d.ts +71 -8
  241. package/dist/reports/index.js +74 -11
  242. package/dist/returns/index.d.ts +675 -21
  243. package/dist/returns/index.js +756 -11
  244. package/dist/search/index.d.ts +76 -1
  245. package/dist/search/index.js +63 -0
  246. package/dist/seo/config.d.ts +128 -0
  247. package/dist/seo/config.js +95 -0
  248. package/dist/seo/redirects.d.ts +125 -0
  249. package/dist/seo/redirects.js +60 -1
  250. package/dist/seo/settings.d.ts +147 -0
  251. package/dist/seo/settings.js +209 -0
  252. package/dist/shipping/definitions.d.ts +29 -0
  253. package/dist/shipping/definitions.js +47 -0
  254. package/dist/shipping/fulfillment-profiles.d.ts +174 -0
  255. package/dist/shipping/fulfillment-profiles.js +104 -0
  256. package/dist/shipping/hendriks.d.ts +97 -0
  257. package/dist/shipping/hendriks.js +50 -0
  258. package/dist/shipping/index.d.ts +54 -0
  259. package/dist/shipping/index.js +27 -0
  260. package/dist/shipping/methods.d.ts +205 -0
  261. package/dist/shipping/methods.js +240 -0
  262. package/dist/shipping/myparcel.d.ts +668 -0
  263. package/dist/shipping/myparcel.js +466 -0
  264. package/dist/shipping/parcel-count-suggestion.d.ts +2 -0
  265. package/dist/shipping/parcel-rule.d.ts +6 -5
  266. package/dist/shipping/parcel-rule.js +21 -23
  267. package/dist/shipping/rate-tables.d.ts +324 -0
  268. package/dist/shipping/rate-tables.js +390 -0
  269. package/dist/shipping/ship-to-countries.d.ts +75 -0
  270. package/dist/shipping/ship-to-countries.js +47 -0
  271. package/dist/stock/by-location.d.ts +86 -0
  272. package/dist/stock/by-location.js +94 -0
  273. package/dist/stock/index.d.ts +18 -4
  274. package/dist/stock/index.js +7 -0
  275. package/dist/stock/locations.d.ts +144 -0
  276. package/dist/stock/locations.js +168 -0
  277. package/dist/stock/settings.d.ts +106 -0
  278. package/dist/stock/settings.js +103 -0
  279. package/dist/stock/transfers.d.ts +386 -52
  280. package/dist/stock/transfers.js +222 -17
  281. package/dist/stored-value/index.d.ts +312 -11
  282. package/dist/stored-value/index.js +223 -4
  283. package/dist/subscriptions/index.d.ts +682 -0
  284. package/dist/subscriptions/index.js +815 -0
  285. package/dist/tax/display-policy.d.ts +105 -0
  286. package/dist/tax/display-policy.js +84 -0
  287. package/dist/tax/index.d.ts +79 -1
  288. package/dist/tax/index.js +52 -0
  289. package/dist/tenant/email-style.d.ts +102 -0
  290. package/dist/tenant/email-style.js +72 -0
  291. package/dist/tenant/email-templates.d.ts +287 -0
  292. package/dist/tenant/email-templates.js +271 -0
  293. package/dist/tenant/notifications.d.ts +23 -17
  294. package/dist/tenant/settings-sources.d.ts +1 -1
  295. package/dist/tenant/time-zone.d.ts +17 -0
  296. package/dist/tenant/time-zone.js +11 -0
  297. package/dist/types.d.ts +50 -3
  298. package/dist/users/index.d.ts +3 -0
  299. package/dist/users/index.js +2 -0
  300. package/dist/users/warehouses.d.ts +50 -0
  301. package/dist/users/warehouses.js +51 -0
  302. package/package.json +2 -2
@@ -0,0 +1,606 @@
1
+ /**
2
+ * Price lists (headless spec §9.2 `pricing`: "price lists"; W10-14): a store's B2B price lists,
3
+ * their entries (what each target costs), who they are assigned to, the order rules they carry,
4
+ * and enabling, disabling or deleting many at once.
5
+ *
6
+ * - **Money** is integer MINOR UNITS of the store's DEFAULT currency, unless an entry's
7
+ * `currencyCode` names another; an entry with no `currencyCode` applies in the default
8
+ * currency only. Its basis differs per figure:
9
+ * - a `fixed_price` / `fixed_amount` entry: the store's price basis (gross on a tax-inclusive
10
+ * store, net on a tax-exclusive one);
11
+ * - a list's order minimum (`minOrderAmount`): its own `minOrderAmountBasis`, `net` or
12
+ * `gross`, and `gross` when omitted, whatever the store's basis;
13
+ * - an order rule's money (a `min_order_total` threshold, a `fixed_amount` discount): the
14
+ * store's price basis, as the dashboard labels it (USER DECISION N7, 2026-10-13).
15
+ * Percentages are basis points (`1000` = 10 %).
16
+ * - **Order rules apply** (USER DECISION N1). A customer a list reaches gets the single best rule
17
+ * their order meets (the most money off), as one line-level discount named "Order discount" in
18
+ * the order's language. Only the most specific level of lists with rules decides (contract →
19
+ * customer → group → store-wide); lists at that level are compared together. A total threshold
20
+ * reads the goods at the customer's own prices before any other discount, in the store's price
21
+ * basis, leaving out shipping, fees, gift cards and stated-price lines (imports, accepted
22
+ * quotes, till manager prices); a quantity threshold counts the units of those same lines.
23
+ * Money converts into the order's currency at the order's rate (no rate: no discount). Drafts,
24
+ * storefront carts and till sales with a customer get it; quote, import and subscription
25
+ * orders never do. A placed order keeps the rule SET it was placed with: an edit takes the
26
+ * discount off below the threshold and gives it above it, and later rule changes never reach
27
+ * it. The order minimum is checked before this discount. `orderRulesCombineWithPromotions`
28
+ * (off by default): on, the discount and the store's coupons and promotions add up; off, a
29
+ * coupon or promotion on the order wins and the list's rules step aside for that order.
30
+ * - **Times** are ISO-8601 instants in UTC (`startsAt`, `endsAt`).
31
+ * - **A list locked to an order** (an order's one-time discount, read as `Order.priceList`) is
32
+ * never answered here: `get` answers `null`, and every write refuses it
33
+ * `PRICE_LIST_LOCKED_TO_ORDER` (`BusinessRuleError`, 422). Change it from its order
34
+ * (`orders.setOneTimeDiscounts`).
35
+ * - **Organizations:** a price list is the store's own row; a workspace's lists price only the
36
+ * workspace.
37
+ *
38
+ * Permissions: reads need `ReadCatalog`, writes `UpdateCatalog` (deleting too, as the engine's
39
+ * single door asks). The names behind assignments also need `ReadCustomer` (a customer) or
40
+ * `ReadCustomer`/`ReadCustomerGroup` (a group); without it the name is `null` and the id stays.
41
+ */
42
+ import { type Page, type Transport } from '@sixtyninecommerce/core';
43
+ import type { Call, ListOptions } from '../types.js';
44
+ export type PriceListDiscountType = 'fixed_price' | 'percentage' | 'fixed_amount' | 'chain';
45
+ export type PriceListTargetType = 'variant' | 'product' | 'collection' | 'facet_value';
46
+ export type PriceListOrderRuleDiscountType = 'percentage' | 'fixed_amount';
47
+ export type PriceListOrderRuleConditionType = 'min_order_total' | 'min_order_quantity';
48
+ /** Which total `minOrderAmount` is compared in: tax-exclusive (`net`) or tax-inclusive. */
49
+ export type PriceListMinOrderAmountBasis = 'net' | 'gross';
50
+ /**
51
+ * What a list search matches the term against:
52
+ * - `all` (the default): every facet below;
53
+ * - `name`: the list's own name and description;
54
+ * - `sku`: lists pricing a variant whose SKU STARTS WITH the term;
55
+ * - `product`: lists pricing a product or variant whose name contains the term;
56
+ * - `customer`: lists assigned to a matching customer, directly or through a group holding them
57
+ * (or a group whose name matches).
58
+ * `sku` and `product` reach a list through variant, product, collection and facet-value entries
59
+ * alike. A list that prices everything (a default discount, or assigned to every customer) is
60
+ * never matched: it would answer every search.
61
+ */
62
+ export declare const PRICE_LIST_SEARCH_MODES: readonly ["all", "name", "sku", "product", "customer"];
63
+ export type PriceListSearchMode = (typeof PRICE_LIST_SEARCH_MODES)[number];
64
+ /** What an entries search matches: the entry's own label, or (`sku`) every entry pricing the SKU. */
65
+ export declare const PRICE_LIST_ENTRY_SEARCH_MODES: readonly ["all", "sku"];
66
+ export type PriceListEntrySearchMode = (typeof PRICE_LIST_ENTRY_SEARCH_MODES)[number];
67
+ /** The engine's `adminListQueryLimit`: a larger page of lists is refused. */
68
+ export declare const MAX_PRICE_LIST_LIST_TAKE = 1000;
69
+ /** The largest page of entries the engine answers. */
70
+ export declare const MAX_PRICE_LIST_ENTRY_TAKE = 200;
71
+ /** How many entries `entries.export` answers at most; `total` still counts every match. */
72
+ export declare const MAX_PRICE_LIST_ENTRY_EXPORT = 10000;
73
+ /** How many lists one `bulk` call may name. */
74
+ export declare const MAX_BULK_PRICE_LISTS = 100;
75
+ /** A search term shorter than this is ignored by the engine: the whole list answers. */
76
+ export declare const PRICE_LIST_SEARCH_MIN_TERM_LENGTH = 2;
77
+ /** How many entries `forCustomer` answers per list at most (`entriesTake`). */
78
+ export declare const MAX_CUSTOMER_PRICE_LIST_ENTRIES = 100;
79
+ /** One reason a list appeared in a search. */
80
+ export interface PriceListSearchMatch {
81
+ /** `name`, `variant`, `product`, `collection`, `facet_value`, `customer` or `customer_group`. */
82
+ kind: string;
83
+ /** The matched thing, as the merchant would recognise it (SKU, product name, customer name…). */
84
+ label: string;
85
+ }
86
+ /** A customer group a list is assigned to. */
87
+ export interface PriceListAssignmentGroup {
88
+ id: string;
89
+ name: string;
90
+ }
91
+ /** A customer a list is assigned to. */
92
+ export interface PriceListAssignmentCustomer {
93
+ id: string;
94
+ firstName: string;
95
+ lastName: string;
96
+ emailAddress: string;
97
+ /**
98
+ * The company of the default billing address, else of the default shipping address, else of
99
+ * the first address that names one; `null` when none does.
100
+ */
101
+ company: string | null;
102
+ /**
103
+ * Set when the caller's customer-data level blanked fields of this customer (an app installation
104
+ * below `customerData: full`): `""` and `null` then mean "not granted".
105
+ */
106
+ redacted?: true;
107
+ }
108
+ /** Who a list applies to: one customer group or one customer, by id. */
109
+ export interface PriceListAssignmentRef {
110
+ id: string;
111
+ priceListId: string;
112
+ /** Exactly one of the two is set. */
113
+ customerGroupId: string | null;
114
+ customerId: string | null;
115
+ }
116
+ /** An assignment with the name behind it, as `get`, `create`, `update` and `assign` answer it. */
117
+ export interface PriceListAssignment extends PriceListAssignmentRef {
118
+ /**
119
+ * The group, when the assignment names one this store holds and the caller may read customer
120
+ * groups (`ReadCustomer` or `ReadCustomerGroup`); otherwise `null` (`customerGroupId` still
121
+ * names it).
122
+ */
123
+ customerGroup: PriceListAssignmentGroup | null;
124
+ /**
125
+ * The customer, when the assignment names one this store holds (not deleted) and the caller may
126
+ * read customers (`ReadCustomer`); otherwise `null` (`customerId` still names them).
127
+ */
128
+ customer: PriceListAssignmentCustomer | null;
129
+ /** ISO-8601 UTC. */
130
+ createdAt: string;
131
+ /** ISO-8601 UTC. */
132
+ updatedAt: string;
133
+ }
134
+ /** A list's own fields. */
135
+ export interface PriceListFields {
136
+ id: string;
137
+ name: string;
138
+ description: string | null;
139
+ /** A contract list outranks every customer, group and channel-wide list. */
140
+ isContract: boolean;
141
+ /** Higher first, within the list's rank (contract → customer → group → channel-wide). */
142
+ priority: number;
143
+ /** A blanket discount on everything the list does not price otherwise, in basis points. */
144
+ defaultDiscountBps: number | null;
145
+ /** ISO-8601 UTC; `null`: from always. */
146
+ startsAt: string | null;
147
+ /** ISO-8601 UTC; `null`: for ever. */
148
+ endsAt: string | null;
149
+ enabled: boolean;
150
+ /** The list applies to every customer of the store, signed in or not. */
151
+ appliesToAllCustomers: boolean;
152
+ /** Invoice payment terms in days (0-365); `null`: the customer's own. */
153
+ paymentTermsDays: number | null;
154
+ /** An ERP payment-condition code instead of days (never both). */
155
+ paymentTermsCode: string | null;
156
+ /** The order minimum, in minor units compared in `minOrderAmountBasis`; `null`: none. */
157
+ minOrderAmount: number | null;
158
+ minOrderAmountBasis: PriceListMinOrderAmountBasis;
159
+ /** The fewest items an order may hold; `null`: none. */
160
+ minOrderQuantity: number | null;
161
+ /**
162
+ * May this list's order-rule discount be combined with the store's coupons and other
163
+ * promotions? Off (the default): a coupon or another promotion on the order wins, and the
164
+ * order-rule discount is dropped for that order (see **Order rules apply** in the module
165
+ * header).
166
+ */
167
+ orderRulesCombineWithPromotions: boolean;
168
+ /** ISO-8601 UTC. */
169
+ createdAt: string;
170
+ /** ISO-8601 UTC. */
171
+ updatedAt: string;
172
+ }
173
+ /** A list with its assignments and the names behind them. */
174
+ export interface PriceList extends PriceListFields {
175
+ assignments: PriceListAssignment[];
176
+ }
177
+ /** One list as `list` answers it: its assignments by id, and why a search matched it. */
178
+ export interface PriceListListItem extends PriceListFields {
179
+ assignments: PriceListAssignmentRef[];
180
+ /** Why the list matched the search, capped for display; empty outside a search. */
181
+ searchMatches: PriceListSearchMatch[];
182
+ /** How many reasons there were before the cap (`>= searchMatches.length`); 0 outside a search. */
183
+ searchMatchCount: number;
184
+ /**
185
+ * Set when the caller's customer-data level withheld a match label that names a customer (an
186
+ * app below `customerData: full`).
187
+ */
188
+ redacted?: true;
189
+ }
190
+ export interface PriceListListOptions extends ListOptions {
191
+ /** Lists to skip, 0 when omitted. Not together with `after`. */
192
+ skip?: number;
193
+ /** Lists per page, 1 to {@link MAX_PRICE_LIST_LIST_TAKE}; `limit`, else 25, when omitted. */
194
+ take?: number;
195
+ /** Find lists by what they contain (see {@link PriceListSearchMode}); trimmed. */
196
+ search?: string;
197
+ /** `all` when omitted. */
198
+ searchMode?: PriceListSearchMode;
199
+ /** Only the lists assigned to one customer or one customer group (see {@link PriceListAssignedTo}). */
200
+ assignedTo?: PriceListAssignedTo;
201
+ }
202
+ /**
203
+ * The lists an assignment names for ONE target: a customer (assigned to them directly, never
204
+ * through one of their groups) or a customer group; plus, with `includeChannelWide`, the store's
205
+ * lists for every customer. Assignment state only: a disabled or out-of-window list is listed
206
+ * too. What applies to a customer now, through their groups as well, is
207
+ * {@link PricingPriceListsModule.forCustomer}.
208
+ */
209
+ export type PriceListAssignedTo = {
210
+ customerId: string;
211
+ customerGroupId?: never;
212
+ includeChannelWide?: boolean;
213
+ } | {
214
+ customerGroupId: string;
215
+ customerId?: never;
216
+ includeChannelWide?: boolean;
217
+ };
218
+ /**
219
+ * How a list reaches a customer, strongest first: assigned to them (`customer`), to one of their
220
+ * groups (`group`), or to every customer of the store (`channel`).
221
+ */
222
+ export type CustomerPriceListAssignmentType = 'customer' | 'group' | 'channel';
223
+ /** One list that applies to a customer, as {@link PricingPriceListsModule.forCustomer} answers it. */
224
+ export interface CustomerPriceList {
225
+ /** The list's own fields (its assignments are read with `get`). */
226
+ priceList: PriceListFields;
227
+ /** One of {@link CustomerPriceListAssignmentType}; a later engine may add a kind. */
228
+ assignmentType: CustomerPriceListAssignmentType | (string & {});
229
+ /**
230
+ * The list's first entries (`entriesTake`), ordered and labelled as `entries.list` answers
231
+ * them; `total` counts every entry, so `items.length < total` says the list was cut.
232
+ */
233
+ entries: {
234
+ items: PriceListEntry[];
235
+ total: number;
236
+ };
237
+ /** Its order rules, lowest condition first. How they apply: **Order rules apply** (module header). */
238
+ orderRules: PriceListOrderRule[];
239
+ }
240
+ export interface CustomerPriceListsOptions extends Call {
241
+ /** Entries per list, 1 to {@link MAX_CUSTOMER_PRICE_LIST_ENTRIES}; that maximum when omitted. */
242
+ entriesTake?: number;
243
+ }
244
+ export interface CreatePriceListInput {
245
+ name: string;
246
+ description?: string | null;
247
+ isContract?: boolean;
248
+ priority?: number;
249
+ defaultDiscountBps?: number | null;
250
+ startsAt?: string | null;
251
+ endsAt?: string | null;
252
+ /** On when omitted. */
253
+ enabled?: boolean;
254
+ appliesToAllCustomers?: boolean;
255
+ paymentTermsDays?: number | null;
256
+ paymentTermsCode?: string | null;
257
+ minOrderAmount?: number | null;
258
+ /** `gross` when omitted. */
259
+ minOrderAmountBasis?: PriceListMinOrderAmountBasis;
260
+ minOrderQuantity?: number | null;
261
+ /** Off when omitted on create; an update that omits it keeps it. */
262
+ orderRulesCombineWithPromotions?: boolean;
263
+ }
264
+ /** A PATCH: an absent field keeps what the list has; `null` clears a field that may be empty. */
265
+ export type UpdatePriceListInput = Partial<CreatePriceListInput>;
266
+ /** Who to assign a list to: exactly one of the two. */
267
+ export type AssignPriceListTarget = {
268
+ customerGroupId: string;
269
+ } | {
270
+ customerId: string;
271
+ };
272
+ export interface PriceListEntry {
273
+ id: string;
274
+ priceListId: string;
275
+ discountType: PriceListDiscountType;
276
+ targetType: PriceListTargetType;
277
+ variantId: string | null;
278
+ productId: string | null;
279
+ collectionId: string | null;
280
+ facetValueId: string | null;
281
+ /**
282
+ * Minor units for `fixed_price` and `fixed_amount`, basis points for `percentage`; `null` for a
283
+ * `chain` (see `chainValues`).
284
+ */
285
+ discountValue: number | null;
286
+ /** A chain discount's percentages, applied one after another, in basis points. */
287
+ chainValues: number[] | null;
288
+ /** The entry applies from this quantity on (a volume tier); 1 by default. */
289
+ minQuantity: number;
290
+ /** The currency a money entry is in; `null`: the store's default currency only. */
291
+ currencyCode: string | null;
292
+ /** A variant entry's label (product and variant name); `null` for other targets. */
293
+ variantName: string | null;
294
+ variantSku: string | null;
295
+ /** A product, collection or facet value entry's label; `null` for a variant. */
296
+ targetName: string | null;
297
+ /** ISO-8601 UTC. */
298
+ createdAt: string;
299
+ /** ISO-8601 UTC. */
300
+ updatedAt: string;
301
+ }
302
+ /** An entry as `entries.bulkSet` answers it: without labels, which would cost a read per row. */
303
+ export type PriceListEntryWrite = Omit<PriceListEntry, 'variantName' | 'variantSku' | 'targetName'>;
304
+ /** What the entries of one list can be narrowed by. Several combine with AND. */
305
+ export interface PriceListEntryFilter {
306
+ targetType?: PriceListTargetType;
307
+ /** Free text; trimmed, and ignored below {@link PRICE_LIST_SEARCH_MIN_TERM_LENGTH}. */
308
+ search?: string;
309
+ /** `all` when omitted. */
310
+ searchMode?: PriceListEntrySearchMode;
311
+ /** Entries pricing one of these collections OR one of `facetValueIds` (one which-target group). */
312
+ collectionIds?: readonly string[];
313
+ facetValueIds?: readonly string[];
314
+ }
315
+ export interface PriceListEntryListOptions extends ListOptions, PriceListEntryFilter {
316
+ /** Entries to skip, 0 when omitted. Not together with `after`. */
317
+ skip?: number;
318
+ /** Entries per page, 1 to {@link MAX_PRICE_LIST_ENTRY_TAKE}; `limit`, else 50, when omitted. */
319
+ take?: number;
320
+ }
321
+ export interface SetPriceListEntryInput {
322
+ discountType: PriceListDiscountType;
323
+ targetType: PriceListTargetType;
324
+ /** The target of a `variant` entry; the other three likewise for their type. */
325
+ variantId?: string;
326
+ productId?: string;
327
+ collectionId?: string;
328
+ facetValueId?: string;
329
+ discountValue?: number;
330
+ chainValues?: number[];
331
+ /** 1 when omitted. */
332
+ minQuantity?: number;
333
+ /** The store's default currency when omitted. */
334
+ currencyCode?: string;
335
+ }
336
+ /** One filter chip: what it filters by, its label, and how many entries it covers. */
337
+ export interface PriceListEntryFacetCount {
338
+ id: string;
339
+ label: string;
340
+ count: number;
341
+ }
342
+ /** Counts for an entries filter row, scoped to the search term only (never to a chip). */
343
+ export interface PriceListEntryFacets {
344
+ /** Always the four target types, zero counts included. */
345
+ targetTypes: PriceListEntryFacetCount[];
346
+ collections: PriceListEntryFacetCount[];
347
+ facetValues: PriceListEntryFacetCount[];
348
+ /** Entries matching the term, before any chip or type filter. */
349
+ total: number;
350
+ }
351
+ export interface PriceListOrderRule {
352
+ id: string;
353
+ priceListId: string;
354
+ discountType: PriceListOrderRuleDiscountType;
355
+ conditionType: PriceListOrderRuleConditionType;
356
+ /** Minor units for `min_order_total`, an item count for `min_order_quantity`. */
357
+ conditionValue: number;
358
+ /** Basis points for `percentage`, minor units for `fixed_amount`. */
359
+ discountValue: number;
360
+ /** ISO-8601 UTC. */
361
+ createdAt: string;
362
+ /** ISO-8601 UTC. */
363
+ updatedAt: string;
364
+ }
365
+ export interface SetPriceListOrderRuleInput {
366
+ discountType: PriceListOrderRuleDiscountType;
367
+ conditionType: PriceListOrderRuleConditionType;
368
+ conditionValue: number;
369
+ discountValue: number;
370
+ }
371
+ export type PriceListBulkAction = 'ENABLE' | 'DISABLE' | 'DELETE';
372
+ export declare const PRICE_LIST_BULK_ACTIONS: readonly PriceListBulkAction[];
373
+ export interface PriceListBulkInput {
374
+ action: PriceListBulkAction;
375
+ /** 1 to {@link MAX_BULK_PRICE_LISTS} lists of the store, each named once. */
376
+ priceListIds: readonly string[];
377
+ }
378
+ /** One list's outcome in a `bulk` call. */
379
+ export interface PriceListBulkOutcome {
380
+ id: string;
381
+ /** `OK`, or `FAILED` (a string on the wire: read anything else as not done). */
382
+ status: 'OK' | 'FAILED' | (string & {});
383
+ /**
384
+ * When FAILED: the single door's own code: `ENTITY_NOT_FOUND` (no such list in this store),
385
+ * `PRICE_LIST_LOCKED_TO_ORDER`, …; `INTERNAL_SERVER_ERROR` for a fault the engine logged.
386
+ */
387
+ code: string | null;
388
+ /** When FAILED: the door's sentence. */
389
+ message: string | null;
390
+ }
391
+ export interface PricingPriceListEntriesModule {
392
+ /**
393
+ * One page of a list's entries, as the engine orders them (target type, then label), each with
394
+ * its label. `total` counts every match. A list the store does not hold, or one locked to an
395
+ * order, answers an empty page.
396
+ *
397
+ * @effect read
398
+ * @permission ReadCatalog
399
+ */
400
+ list(priceListId: string, options?: PriceListEntryListOptions): Promise<Page<PriceListEntry>>;
401
+ /**
402
+ * Every entry matching `filter`, up to {@link MAX_PRICE_LIST_ENTRY_EXPORT}, in one call (for a
403
+ * file export). `total` counts every match, so `items.length < total` says the export was cut.
404
+ *
405
+ * @effect read
406
+ * @permission ReadCatalog
407
+ */
408
+ export(priceListId: string, filter?: PriceListEntryFilter, options?: Call): Promise<{
409
+ items: PriceListEntry[];
410
+ total: number;
411
+ }>;
412
+ /**
413
+ * The counts for a filter row, for the search term only (a chip never narrows its own count).
414
+ * A list the store does not hold answers zero counts.
415
+ *
416
+ * @effect read
417
+ * @permission ReadCatalog
418
+ */
419
+ facets(priceListId: string, search?: {
420
+ search?: string;
421
+ searchMode?: PriceListEntrySearchMode;
422
+ }, options?: Call): Promise<PriceListEntryFacets>;
423
+ /**
424
+ * Add an entry, or change the one with the same target, minimum quantity and currency, and
425
+ * answer it with its label. The target must be the store's (`ENTITY_NOT_FOUND` otherwise, the
426
+ * same as an unknown id); an entry naming no target of its type, or an unknown type, is refused
427
+ * `PRICE_LIST_ENTRY_INVALID` (400) with `details` naming the field.
428
+ *
429
+ * @effect write
430
+ * @permission UpdateCatalog
431
+ */
432
+ set(priceListId: string, input: SetPriceListEntryInput, options?: Call): Promise<PriceListEntry>;
433
+ /**
434
+ * {@link set} for many entries in ONE transaction: one refused entry writes none of them.
435
+ * Answers the entries without labels (see {@link PriceListEntryWrite}).
436
+ *
437
+ * @effect write
438
+ * @permission UpdateCatalog
439
+ */
440
+ bulkSet(priceListId: string, entries: readonly SetPriceListEntryInput[], options?: Call): Promise<PriceListEntryWrite[]>;
441
+ /**
442
+ * Delete one entry: the price it gave goes back to the next list or the catalogue price.
443
+ * `ENTITY_NOT_FOUND` for an entry the store does not hold.
444
+ *
445
+ * @effect destructive
446
+ * @permission UpdateCatalog
447
+ */
448
+ remove(entryId: string, options?: Call): Promise<void>;
449
+ }
450
+ export interface PricingPriceListOrderRulesModule {
451
+ /**
452
+ * A list's order rules (an order-level discount from a total or a quantity), lowest condition
453
+ * first. `[]` for a list the store does not hold. How they apply: **Order rules apply** in the
454
+ * module header.
455
+ *
456
+ * @effect read
457
+ * @permission ReadCatalog
458
+ */
459
+ list(priceListId: string, options?: Call): Promise<PriceListOrderRule[]>;
460
+ /**
461
+ * ADD an order rule to a list and answer it (a list may hold several; remove one with
462
+ * {@link remove}). From then on it discounts the qualifying orders of the list's customers
463
+ * (module header); a placed order keeps the rules it was placed with.
464
+ * Refused `PRICE_LIST_ORDER_RULE_INVALID` (400), `details` naming every offending field: a
465
+ * `discountType` or `conditionType` the engine does not know, a value that is not a whole
466
+ * number, a negative `conditionValue` or one past its bound (1,000,000.00 for a total, 1,000,000
467
+ * items for a quantity), a `discountValue` below 1, a percentage above 10,000 basis points
468
+ * (100 %), or a fixed amount past 1,000,000.00. Nothing is saved. A value that is not a whole
469
+ * number or does not fit 32 bits (which GraphQL's `Int` would refuse uncoded) is refused the same
470
+ * way before anything is sent. Also `ENTITY_NOT_FOUND` and `PRICE_LIST_LOCKED_TO_ORDER`.
471
+ *
472
+ * @effect write
473
+ * @permission UpdateCatalog
474
+ */
475
+ set(priceListId: string, input: SetPriceListOrderRuleInput, options?: Call): Promise<PriceListOrderRule>;
476
+ /**
477
+ * Delete one order rule. `ENTITY_NOT_FOUND` for a rule the store does not hold.
478
+ *
479
+ * @effect destructive
480
+ * @permission UpdateCatalog
481
+ */
482
+ remove(ruleId: string, options?: Call): Promise<void>;
483
+ }
484
+ export interface PricingPriceListsModule {
485
+ /**
486
+ * One page of the store's lists, highest priority first (newest first within one priority),
487
+ * each with its assignments by id. With `search`, the lists matching it (see
488
+ * {@link PriceListSearchMode}) and why (`searchMatches`); with `assignedTo`, only the lists
489
+ * assigned to that customer or group (see {@link PriceListAssignedTo}).
490
+ *
491
+ * Refused before anything is sent: `INVALID_PRICE_LIST_LIST_OPTIONS` (`ValidationError`, 400)
492
+ * for a `take` outside 1 to {@link MAX_PRICE_LIST_LIST_TAKE}, a negative `skip`, or an
493
+ * `assignedTo` naming not exactly one of `customerId` and `customerGroupId`. The engine refuses
494
+ * the same with the same code. `assignedTo` needs an engine with `PriceListListOptions.filter`.
495
+ *
496
+ * @effect read
497
+ * @permission ReadCatalog
498
+ */
499
+ list(options?: PriceListListOptions): Promise<Page<PriceListListItem>>;
500
+ /**
501
+ * The lists that apply to a customer of the store NOW, IN THE ORDER the price-list pricing
502
+ * tries them for each line: contracts first, then assigned to the customer, through one of
503
+ * their groups, to every customer; then higher priority first. Lists of one standing (same
504
+ * contract flag, assignment and priority) are tried together and the lower price wins per line,
505
+ * an equal price going to the lower list id; they are listed by id. Only enabled lists inside their
506
+ * date window, every list of the store considered; never an order's one-time discount (read
507
+ * that as `Order.priceList`). Each comes with its first entries and its order rules. The
508
+ * engine ranks them with the function its pricing uses, so a client never re-derives it.
509
+ *
510
+ * Refused: `ENTITY_NOT_FOUND` (`NotFoundError`, 404) for a customer the store does not hold
511
+ * (another store's, a deleted one, an unknown id: one answer); `FORBIDDEN` without
512
+ * `ReadCustomer`; `INVALID_PRICE_LIST_LIST_OPTIONS` (400) for an `entriesTake` outside 1 to
513
+ * {@link MAX_CUSTOMER_PRICE_LIST_ENTRIES}, before anything is sent. Needs an engine with
514
+ * `customerPriceLists`.
515
+ *
516
+ * @effect read
517
+ * @permission ReadCatalog
518
+ * @permission ReadCustomer
519
+ */
520
+ forCustomer(customerId: string, options?: CustomerPriceListsOptions): Promise<CustomerPriceList[]>;
521
+ /**
522
+ * One list with its assignments and the names behind them, read in one call; `null` for a list
523
+ * the store does not hold or one locked to an order.
524
+ *
525
+ * @effect read
526
+ * @permission ReadCatalog
527
+ */
528
+ get(id: string, options?: Call): Promise<PriceList | null>;
529
+ /**
530
+ * Create a list. Refused: payment terms the engine does not accept (`PAYMENT_TERMS_INVALID`,
531
+ * 400, `details` naming the field) and an order minimum it does not accept
532
+ * (`ORDER_MINIMUM_INVALID`, 400).
533
+ *
534
+ * @effect write
535
+ * @permission UpdateCatalog
536
+ */
537
+ create(input: CreatePriceListInput, options?: Call): Promise<PriceList>;
538
+ /**
539
+ * Change a list (a PATCH). Refused as {@link create}, plus `ENTITY_NOT_FOUND` for a list the
540
+ * store does not hold and `PRICE_LIST_LOCKED_TO_ORDER`.
541
+ *
542
+ * @effect write
543
+ * @permission UpdateCatalog
544
+ */
545
+ update(id: string, input: UpdatePriceListInput, options?: Call): Promise<PriceList>;
546
+ /**
547
+ * Delete a list with its assignments, entries and order rules: its customers pay what the next
548
+ * list or the catalogue says. `ENTITY_NOT_FOUND`, `PRICE_LIST_LOCKED_TO_ORDER`.
549
+ *
550
+ * @effect destructive
551
+ * @permission UpdateCatalog
552
+ */
553
+ delete(id: string, options?: Call): Promise<void>;
554
+ /**
555
+ * Assign a list to a customer group or a customer of the store, and answer the assignment with
556
+ * the name behind it. Refused: another store's (or an unknown) customer or group
557
+ * (`ENTITY_NOT_FOUND`), the same target twice (`USER_INPUT_ERROR`, naming the list),
558
+ * `PRICE_LIST_LOCKED_TO_ORDER`.
559
+ *
560
+ * @effect write
561
+ * @permission UpdateCatalog
562
+ */
563
+ assign(priceListId: string, target: AssignPriceListTarget, options?: Call): Promise<PriceListAssignment>;
564
+ /**
565
+ * Remove an assignment: its customers stop getting the list's prices.
566
+ * `ENTITY_NOT_FOUND` for an assignment the store does not hold.
567
+ *
568
+ * @effect destructive
569
+ * @permission UpdateCatalog
570
+ */
571
+ unassign(assignmentId: string, options?: Call): Promise<void>;
572
+ /**
573
+ * Enable, disable or delete many lists in one call. Each list goes through its single door's
574
+ * rules in a transaction of its own and is reported on its own, in the order named: a refused
575
+ * list (`ENTITY_NOT_FOUND`, `PRICE_LIST_LOCKED_TO_ORDER`) changes nothing, and the others still
576
+ * go through. A selection of no list, more than {@link MAX_BULK_PRICE_LISTS} or a list named
577
+ * twice is refused `BULK_ACTION_INPUT_INVALID` (400) before anything is sent. Not keyed: a
578
+ * repeat enables or disables again, and deletes nothing twice (`ENTITY_NOT_FOUND`).
579
+ *
580
+ * @effect destructive
581
+ * @permission UpdateCatalog
582
+ */
583
+ bulk(input: PriceListBulkInput, options?: Call): Promise<PriceListBulkOutcome[]>;
584
+ entries: PricingPriceListEntriesModule;
585
+ orderRules: PricingPriceListOrderRulesModule;
586
+ }
587
+ /** A list as `get`, `create` and `update` read it: with its assignments' names. */
588
+ export declare const PRICE_LIST_FIELDS = "\n \n id\n name\n description\n isContract\n priority\n defaultDiscountBps\n startsAt\n endsAt\n enabled\n appliesToAllCustomers\n paymentTermsDays\n paymentTermsCode\n minOrderAmount\n minOrderAmountBasis\n minOrderQuantity\n orderRulesCombineWithPromotions\n createdAt\n updatedAt\n\n assignments { \n id\n priceListId\n customerGroupId\n customerId\n customerGroup {\n id\n name\n }\n customer {\n id\n firstName\n lastName\n emailAddress\n company\n }\n createdAt\n updatedAt\n }\n";
589
+ export declare const PRICE_LISTS_QUERY = "\n query PriceLists($options: PriceListListOptions) {\n priceLists(options: $options) {\n items {\n \n id\n name\n description\n isContract\n priority\n defaultDiscountBps\n startsAt\n endsAt\n enabled\n appliesToAllCustomers\n paymentTermsDays\n paymentTermsCode\n minOrderAmount\n minOrderAmountBasis\n minOrderQuantity\n orderRulesCombineWithPromotions\n createdAt\n updatedAt\n\n assignments {\n id\n priceListId\n customerGroupId\n customerId\n }\n searchMatches {\n kind\n label\n }\n searchMatchCount\n }\n totalItems\n }\n }\n";
590
+ export declare const PRICE_LIST_QUERY = "\n query PriceList($id: ID!) {\n priceList(id: $id) { \n \n id\n name\n description\n isContract\n priority\n defaultDiscountBps\n startsAt\n endsAt\n enabled\n appliesToAllCustomers\n paymentTermsDays\n paymentTermsCode\n minOrderAmount\n minOrderAmountBasis\n minOrderQuantity\n orderRulesCombineWithPromotions\n createdAt\n updatedAt\n\n assignments { \n id\n priceListId\n customerGroupId\n customerId\n customerGroup {\n id\n name\n }\n customer {\n id\n firstName\n lastName\n emailAddress\n company\n }\n createdAt\n updatedAt\n }\n }\n }\n";
591
+ export declare const CREATE_PRICE_LIST_MUTATION = "\n mutation CreatePriceList($input: CreatePriceListInput!) {\n createPriceList(input: $input) { \n \n id\n name\n description\n isContract\n priority\n defaultDiscountBps\n startsAt\n endsAt\n enabled\n appliesToAllCustomers\n paymentTermsDays\n paymentTermsCode\n minOrderAmount\n minOrderAmountBasis\n minOrderQuantity\n orderRulesCombineWithPromotions\n createdAt\n updatedAt\n\n assignments { \n id\n priceListId\n customerGroupId\n customerId\n customerGroup {\n id\n name\n }\n customer {\n id\n firstName\n lastName\n emailAddress\n company\n }\n createdAt\n updatedAt\n }\n }\n }\n";
592
+ export declare const UPDATE_PRICE_LIST_MUTATION = "\n mutation UpdatePriceList($id: ID!, $input: UpdatePriceListInput!) {\n updatePriceList(id: $id, input: $input) { \n \n id\n name\n description\n isContract\n priority\n defaultDiscountBps\n startsAt\n endsAt\n enabled\n appliesToAllCustomers\n paymentTermsDays\n paymentTermsCode\n minOrderAmount\n minOrderAmountBasis\n minOrderQuantity\n orderRulesCombineWithPromotions\n createdAt\n updatedAt\n\n assignments { \n id\n priceListId\n customerGroupId\n customerId\n customerGroup {\n id\n name\n }\n customer {\n id\n firstName\n lastName\n emailAddress\n company\n }\n createdAt\n updatedAt\n }\n }\n }\n";
593
+ export declare const DELETE_PRICE_LIST_MUTATION = "\n mutation DeletePriceList($id: ID!) {\n deletePriceList(id: $id) { \n result\n message\n }\n }\n";
594
+ export declare const ASSIGN_PRICE_LIST_MUTATION = "\n mutation AssignPriceList($priceListId: ID!, $input: AssignPriceListInput!) {\n assignPriceList(priceListId: $priceListId, input: $input) { \n id\n priceListId\n customerGroupId\n customerId\n customerGroup {\n id\n name\n }\n customer {\n id\n firstName\n lastName\n emailAddress\n company\n }\n createdAt\n updatedAt\n }\n }\n";
595
+ export declare const UNASSIGN_PRICE_LIST_MUTATION = "\n mutation UnassignPriceList($assignmentId: ID!) {\n unassignPriceList(assignmentId: $assignmentId) { \n result\n message\n }\n }\n";
596
+ export declare const BULK_PRICE_LIST_ACTION_MUTATION = "\n mutation BulkPriceListAction($input: BulkPriceListActionInput!) {\n bulkPriceListAction(input: $input) {\n items {\n id\n status\n code\n message\n }\n }\n }\n";
597
+ export declare const PRICE_LIST_ENTRIES_QUERY = "\n query PriceListEntries($priceListId: ID!, $options: PriceListEntryListOptions) {\n priceListEntries(priceListId: $priceListId, options: $options) {\n items { \n \n id\n priceListId\n discountType\n targetType\n variantId\n productId\n collectionId\n facetValueId\n discountValue\n chainValues\n minQuantity\n currencyCode\n createdAt\n updatedAt\n\n variantName\n variantSku\n targetName\n }\n totalItems\n }\n }\n";
598
+ export declare const PRICE_LIST_ENTRY_FACETS_QUERY = "\n query PriceListEntryFacets($priceListId: ID!, $search: String, $searchMode: String) {\n priceListEntryFacets(priceListId: $priceListId, search: $search, searchMode: $searchMode) {\n targetTypes { id label count }\n collections { id label count }\n facetValues { id label count }\n total\n }\n }\n";
599
+ export declare const SET_PRICE_LIST_ENTRY_MUTATION = "\n mutation SetPriceListEntry($priceListId: ID!, $input: SetPriceListEntryInput!) {\n setPriceListEntry(priceListId: $priceListId, input: $input) { \n \n id\n priceListId\n discountType\n targetType\n variantId\n productId\n collectionId\n facetValueId\n discountValue\n chainValues\n minQuantity\n currencyCode\n createdAt\n updatedAt\n\n variantName\n variantSku\n targetName\n }\n }\n";
600
+ export declare const BULK_SET_PRICE_LIST_ENTRIES_MUTATION = "\n mutation BulkSetPriceListEntries($priceListId: ID!, $entries: [SetPriceListEntryInput!]!) {\n bulkSetPriceListEntries(priceListId: $priceListId, entries: $entries) {\n \n id\n priceListId\n discountType\n targetType\n variantId\n productId\n collectionId\n facetValueId\n discountValue\n chainValues\n minQuantity\n currencyCode\n createdAt\n updatedAt\n\n }\n }\n";
601
+ export declare const REMOVE_PRICE_LIST_ENTRY_MUTATION = "\n mutation RemovePriceListEntry($id: ID!) {\n removePriceListEntry(id: $id) { \n result\n message\n }\n }\n";
602
+ export declare const PRICE_LIST_ORDER_RULES_QUERY = "\n query PriceListOrderRules($priceListId: ID!) {\n priceListOrderRules(priceListId: $priceListId) { \n id\n priceListId\n discountType\n conditionType\n conditionValue\n discountValue\n createdAt\n updatedAt\n }\n }\n";
603
+ export declare const SET_PRICE_LIST_ORDER_RULE_MUTATION = "\n mutation SetPriceListOrderRule($priceListId: ID!, $input: SetPriceListOrderRuleInput!) {\n setPriceListOrderRule(priceListId: $priceListId, input: $input) { \n id\n priceListId\n discountType\n conditionType\n conditionValue\n discountValue\n createdAt\n updatedAt\n }\n }\n";
604
+ export declare const REMOVE_PRICE_LIST_ORDER_RULE_MUTATION = "\n mutation RemovePriceListOrderRule($id: ID!) {\n removePriceListOrderRule(id: $id) { \n result\n message\n }\n }\n";
605
+ export declare const CUSTOMER_PRICE_LISTS_QUERY = "\n query CustomerPriceLists($customerId: ID!, $options: CustomerPriceListsOptions) {\n customerPriceLists(customerId: $customerId, options: $options) {\n priceList { \n id\n name\n description\n isContract\n priority\n defaultDiscountBps\n startsAt\n endsAt\n enabled\n appliesToAllCustomers\n paymentTermsDays\n paymentTermsCode\n minOrderAmount\n minOrderAmountBasis\n minOrderQuantity\n orderRulesCombineWithPromotions\n createdAt\n updatedAt\n }\n assignmentType\n entries {\n items { \n \n id\n priceListId\n discountType\n targetType\n variantId\n productId\n collectionId\n facetValueId\n discountValue\n chainValues\n minQuantity\n currencyCode\n createdAt\n updatedAt\n\n variantName\n variantSku\n targetName\n }\n totalItems\n }\n orderRules { \n id\n priceListId\n discountType\n conditionType\n conditionValue\n discountValue\n createdAt\n updatedAt\n }\n }\n }\n";
606
+ export declare function createPricingPriceListsModule(transport: Transport): PricingPriceListsModule;