@epilot/sdk 2.18.30 → 2.18.31

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 (126) hide show
  1. package/definitions/pricing-runtime.json +1 -1
  2. package/definitions/pricing.json +1733 -59
  3. package/dist/apis/access-token.cjs +6 -6
  4. package/dist/apis/access-token.js +1 -1
  5. package/dist/apis/address-suggestions.cjs +6 -6
  6. package/dist/apis/address-suggestions.js +1 -1
  7. package/dist/apis/address.cjs +6 -6
  8. package/dist/apis/address.js +1 -1
  9. package/dist/apis/ai-agents.cjs +6 -6
  10. package/dist/apis/ai-agents.js +1 -1
  11. package/dist/apis/app.cjs +6 -6
  12. package/dist/apis/app.js +1 -1
  13. package/dist/apis/audit-logs.cjs +6 -6
  14. package/dist/apis/audit-logs.js +1 -1
  15. package/dist/apis/automation.cjs +6 -6
  16. package/dist/apis/automation.js +1 -1
  17. package/dist/apis/billing.cjs +6 -6
  18. package/dist/apis/billing.js +1 -1
  19. package/dist/apis/blueprint-manifest.cjs +6 -6
  20. package/dist/apis/blueprint-manifest.js +1 -1
  21. package/dist/apis/calendar.cjs +6 -6
  22. package/dist/apis/calendar.js +1 -1
  23. package/dist/apis/configuration-hub.cjs +6 -6
  24. package/dist/apis/configuration-hub.js +1 -1
  25. package/dist/apis/consent.cjs +6 -6
  26. package/dist/apis/consent.js +1 -1
  27. package/dist/apis/customer-portal.cjs +6 -6
  28. package/dist/apis/customer-portal.js +1 -1
  29. package/dist/apis/dashboard.cjs +6 -6
  30. package/dist/apis/dashboard.js +1 -1
  31. package/dist/apis/data-governance.cjs +6 -6
  32. package/dist/apis/data-governance.js +1 -1
  33. package/dist/apis/deduplication.cjs +6 -6
  34. package/dist/apis/deduplication.js +1 -1
  35. package/dist/apis/design.cjs +6 -6
  36. package/dist/apis/design.js +1 -1
  37. package/dist/apis/document.cjs +6 -6
  38. package/dist/apis/document.js +1 -1
  39. package/dist/apis/email-settings.cjs +6 -6
  40. package/dist/apis/email-settings.js +1 -1
  41. package/dist/apis/email-template.cjs +6 -6
  42. package/dist/apis/email-template.js +1 -1
  43. package/dist/apis/entity-mapping.cjs +6 -6
  44. package/dist/apis/entity-mapping.js +1 -1
  45. package/dist/apis/entity.cjs +6 -6
  46. package/dist/apis/entity.js +1 -1
  47. package/dist/apis/environments.cjs +6 -6
  48. package/dist/apis/environments.js +1 -1
  49. package/dist/apis/event-catalog.cjs +6 -6
  50. package/dist/apis/event-catalog.js +1 -1
  51. package/dist/apis/file.cjs +6 -6
  52. package/dist/apis/file.js +1 -1
  53. package/dist/apis/iban.cjs +6 -6
  54. package/dist/apis/iban.js +1 -1
  55. package/dist/apis/integration-toolkit.cjs +6 -6
  56. package/dist/apis/integration-toolkit.js +1 -1
  57. package/dist/apis/journey.cjs +6 -6
  58. package/dist/apis/journey.js +1 -1
  59. package/dist/apis/kanban.cjs +6 -6
  60. package/dist/apis/kanban.js +1 -1
  61. package/dist/apis/message.cjs +6 -6
  62. package/dist/apis/message.js +1 -1
  63. package/dist/apis/metering.cjs +6 -6
  64. package/dist/apis/metering.js +1 -1
  65. package/dist/apis/notes.cjs +6 -6
  66. package/dist/apis/notes.js +1 -1
  67. package/dist/apis/notification.cjs +6 -6
  68. package/dist/apis/notification.js +1 -1
  69. package/dist/apis/organization.cjs +6 -6
  70. package/dist/apis/organization.js +1 -1
  71. package/dist/apis/partner-directory.cjs +6 -6
  72. package/dist/apis/partner-directory.js +1 -1
  73. package/dist/apis/permissions.cjs +6 -6
  74. package/dist/apis/permissions.js +1 -1
  75. package/dist/apis/pricing-tier.cjs +6 -6
  76. package/dist/apis/pricing-tier.js +1 -1
  77. package/dist/apis/pricing.cjs +8 -8
  78. package/dist/apis/pricing.d.cts +2 -2
  79. package/dist/apis/pricing.d.ts +2 -2
  80. package/dist/apis/pricing.js +2 -2
  81. package/dist/apis/purpose.cjs +6 -6
  82. package/dist/apis/purpose.js +1 -1
  83. package/dist/apis/query.cjs +6 -6
  84. package/dist/apis/query.js +1 -1
  85. package/dist/apis/sandbox.cjs +6 -6
  86. package/dist/apis/sandbox.js +1 -1
  87. package/dist/apis/sharing.cjs +6 -6
  88. package/dist/apis/sharing.js +1 -1
  89. package/dist/apis/snapshot.cjs +6 -6
  90. package/dist/apis/snapshot.js +1 -1
  91. package/dist/apis/submission.cjs +6 -6
  92. package/dist/apis/submission.js +1 -1
  93. package/dist/apis/target.cjs +6 -6
  94. package/dist/apis/target.js +1 -1
  95. package/dist/apis/targeting.cjs +6 -6
  96. package/dist/apis/targeting.js +1 -1
  97. package/dist/apis/template-variables.cjs +6 -6
  98. package/dist/apis/template-variables.js +1 -1
  99. package/dist/apis/user.cjs +6 -6
  100. package/dist/apis/user.js +1 -1
  101. package/dist/apis/validation-rules.cjs +6 -6
  102. package/dist/apis/validation-rules.js +1 -1
  103. package/dist/apis/webhooks.cjs +6 -6
  104. package/dist/apis/webhooks.js +1 -1
  105. package/dist/apis/workflow-definition.cjs +6 -6
  106. package/dist/apis/workflow-definition.js +1 -1
  107. package/dist/apis/workflow.cjs +6 -6
  108. package/dist/apis/workflow.js +1 -1
  109. package/dist/{chunk-SH4WTF3U.cjs → chunk-JZBUH4RD.cjs} +2 -2
  110. package/dist/{chunk-63BFJKWV.js → chunk-OHYTCUUB.js} +1 -1
  111. package/dist/{chunk-VFIPZC47.js → chunk-RKEGU6OW.js} +2 -2
  112. package/dist/{chunk-KP7H52BF.cjs → chunk-UKHR33EL.cjs} +1 -1
  113. package/dist/index.cjs +10 -10
  114. package/dist/index.d.cts +1 -1
  115. package/dist/index.d.ts +1 -1
  116. package/dist/index.js +2 -2
  117. package/dist/pricing-HQ75T2TF.js +7 -0
  118. package/dist/pricing-HTU5XPZE.cjs +7 -0
  119. package/dist/{pricing-runtime-2YKEJJMZ.js → pricing-runtime-AT27C3BP.js} +1 -1
  120. package/dist/{pricing-runtime-XDCOKL47.cjs → pricing-runtime-PFVTRERK.cjs} +2 -2
  121. package/dist/{pricing.d-C95oaAtN.d.cts → pricing.d-D6HCZpbI.d.cts} +2218 -83
  122. package/dist/{pricing.d-C95oaAtN.d.ts → pricing.d-D6HCZpbI.d.ts} +2218 -83
  123. package/docs/pricing.md +1050 -22
  124. package/package.json +1 -1
  125. package/dist/pricing-5GBNQOLX.cjs +0 -7
  126. package/dist/pricing-YJHJTRJS.js +0 -7
package/docs/pricing.md CHANGED
@@ -64,9 +64,47 @@ const { data } = await pricingClient.$calculatePricingDetails(...)
64
64
  **Product Recommendations API**
65
65
  - [`$productRecommendations`](#$productrecommendations)
66
66
 
67
+ **Conditional Pricing API**
68
+ - [`$getConditionSets`](#$getconditionsets)
69
+ - [`$resolveConditionalEntity`](#$resolveconditionalentity)
70
+ - [`$createConditionalVariant`](#$createconditionalvariant)
71
+ - [`$getActiveConditionalVariantVersion`](#$getactiveconditionalvariantversion)
72
+ - [`$replaceActiveConditionalVariantVersion`](#$replaceactiveconditionalvariantversion)
73
+ - [`$patchActiveConditionalVariantVersion`](#$patchactiveconditionalvariantversion)
74
+ - [`$deleteConditionalVariant`](#$deleteconditionalvariant)
75
+ - [`$appendConditionalVariantVersion`](#$appendconditionalvariantversion)
76
+ - [`$getConditionalVariantVersion`](#$getconditionalvariantversion)
77
+ - [`$replaceConditionalVariantVersion`](#$replaceconditionalvariantversion)
78
+ - [`$patchConditionalVariantVersion`](#$patchconditionalvariantversion)
79
+ - [`$deleteConditionalVariantVersion`](#$deleteconditionalvariantversion)
80
+
67
81
  **Schemas**
68
82
  - [`IntegrationId`](#integrationid)
83
+ - [`ConditionalEntitySlug`](#conditionalentityslug)
84
+ - [`ConditionType`](#conditiontype)
85
+ - [`ConditionDefinition`](#conditiondefinition)
86
+ - [`ConditionSet`](#conditionset)
87
+ - [`ConditionSetCatalog`](#conditionsetcatalog)
69
88
  - [`ConditionalPricingErrorCode`](#conditionalpricingerrorcode)
89
+ - [`ResolveConditionalEntityRequest`](#resolveconditionalentityrequest)
90
+ - [`ResolveContext`](#resolvecontext)
91
+ - [`ResolveOptions`](#resolveoptions)
92
+ - [`ResolvedVariants`](#resolvedvariants)
93
+ - [`ResolvedVariant`](#resolvedvariant)
94
+ - [`CreateVariantRequest`](#createvariantrequest)
95
+ - [`VariantConditions`](#variantconditions)
96
+ - [`PinnedConditions`](#pinnedconditions)
97
+ - [`VariantValues`](#variantvalues)
98
+ - [`CreatedVariant`](#createdvariant)
99
+ - [`VariantWriteWarning`](#variantwritewarning)
100
+ - [`DeletedVariant`](#deletedvariant)
101
+ - [`VariantVersion`](#variantversion)
102
+ - [`WrittenVariantVersion`](#writtenvariantversion)
103
+ - [`DeletedVariantVersion`](#deletedvariantversion)
104
+ - [`VersionWriteWarning`](#versionwritewarning)
105
+ - [`AppendVersionRequest`](#appendversionrequest)
106
+ - [`ReplaceVersionRequest`](#replaceversionrequest)
107
+ - [`PatchVersionRequest`](#patchversionrequest)
70
108
  - [`Error`](#error)
71
109
  - [`ConditionalPricingError`](#conditionalpricingerror)
72
110
  - [`Product`](#product)
@@ -219,7 +257,7 @@ const { data } = await pricingClient.$calculatePricingDetails(...)
219
257
 
220
258
  ### `$calculatePricingDetails`
221
259
 
222
- calculatePricingDetails
260
+ Computes a set of pricing details that can be persisted on an entity with the pricing capability enabled, e.g: Orders or Contracts.
223
261
 
224
262
  `POST /v1/pricing:compute`
225
263
 
@@ -760,7 +798,7 @@ const { data } = await client.putOrder(
760
798
 
761
799
  ### `$checkoutCart`
762
800
 
763
- checkoutCart
801
+ Checkouts a cart and executes the specified checkout `mode` process.
764
802
 
765
803
  `POST /v1/public/cart:checkout`
766
804
 
@@ -865,7 +903,7 @@ const { data } = await client.$checkoutCart(
865
903
 
866
904
  ### `$searchCatalog`
867
905
 
868
- searchCatalog
906
+ Provides a querying functionalities over products and prices of the Catalog for a given organization.
869
907
 
870
908
  `POST /v1/public/catalog`
871
909
 
@@ -909,7 +947,7 @@ const { data } = await client.$searchCatalog(
909
947
 
910
948
  ### `$privateSearchCatalog`
911
949
 
912
- privateSearchCatalog
950
+ Provides a querying functionalities over products and prices of the Catalog for a given organization.
913
951
 
914
952
  `POST /v1/catalog`
915
953
 
@@ -950,7 +988,7 @@ const { data } = await client.$privateSearchCatalog(
950
988
 
951
989
  ### `$validatePromoCodes`
952
990
 
953
- validatePromoCodes
991
+ Validate a list of promo codes against a list of coupons
954
992
 
955
993
  `POST /v1/public/validate-promo-codes`
956
994
 
@@ -1003,7 +1041,7 @@ const { data } = await client.$validatePromoCodes(
1003
1041
 
1004
1042
  ### `$availabilityCheck`
1005
1043
 
1006
- availabilityCheck
1044
+ The availability check endpoint
1007
1045
 
1008
1046
  `POST /v1/public/availability:check`
1009
1047
 
@@ -1053,7 +1091,7 @@ const { data } = await client.$availabilityCheck(
1053
1091
 
1054
1092
  ### `$validateAvailabilityFile`
1055
1093
 
1056
- validateAvailabilityFile
1094
+ Validates an availability file, it returns an array of errors if the file is invalid
1057
1095
 
1058
1096
  `GET /v1/validate-availability/{id}`
1059
1097
 
@@ -1081,7 +1119,7 @@ const { data } = await client.$validateAvailabilityFile({
1081
1119
 
1082
1120
  ### `$historicMarketPrices`
1083
1121
 
1084
- historicMarketPrices
1122
+ Get a series of historic energy prices for a given time period, market and bidding zone.
1085
1123
 
1086
1124
  `GET /v1/public/historicMarketPrices`
1087
1125
 
@@ -1119,7 +1157,7 @@ const { data } = await client.$historicMarketPrices({
1119
1157
 
1120
1158
  ### `$averageMarketPrice`
1121
1159
 
1122
- averageMarketPrice
1160
+ Get the average energy prices for a given time period, market and bidding zone.
1123
1161
 
1124
1162
  `GET /v1/public/averageMarketPrice`
1125
1163
 
@@ -1158,7 +1196,7 @@ const { data } = await client.$averageMarketPrice({
1158
1196
 
1159
1197
  ### `$searchExternalProducts`
1160
1198
 
1161
- searchExternalProducts
1199
+ Returns the list of available products with computed prices based on a given context and for a given org integration.
1162
1200
 
1163
1201
  `POST /v1/public/integration/{integrationId}/products`
1164
1202
 
@@ -1217,7 +1255,7 @@ const { data } = await client.$searchExternalProducts(
1217
1255
 
1218
1256
  ### `$searchExternalProductRecommendations`
1219
1257
 
1220
- searchExternalProductRecommendations
1258
+ Returns the list of available product recommendations with computed prices based on a given context and for a given org integration.
1221
1259
 
1222
1260
  `POST /v1/public/integration/{integrationId}/product-recommendations`
1223
1261
 
@@ -1292,7 +1330,7 @@ const { data } = await client.$searchExternalProductRecommendations(
1292
1330
 
1293
1331
  ### `$searchProviders`
1294
1332
 
1295
- searchProviders
1333
+ Returns the list of providers available based on a given location
1296
1334
 
1297
1335
  `POST /v1/public/integration/{integrationId}/providers:search`
1298
1336
 
@@ -1358,7 +1396,7 @@ const { data } = await client.$searchProviders(
1358
1396
 
1359
1397
  ### `$searchStreets`
1360
1398
 
1361
- searchStreets
1399
+ Returns the list of streets available for a given postal code and city
1362
1400
 
1363
1401
  `POST /v1/public/integration/{integrationId}/streets:search`
1364
1402
 
@@ -1392,7 +1430,7 @@ const { data } = await client.$searchStreets(
1392
1430
 
1393
1431
  ### `$computePrice`
1394
1432
 
1395
- calculatePricingDetails
1433
+ Returns the price for a given product type based on location and consumption
1396
1434
 
1397
1435
  `POST /v1/public/integration/{integrationId}/compute-price`
1398
1436
 
@@ -1455,7 +1493,7 @@ const { data } = await client.$computePrice(
1455
1493
 
1456
1494
  ### `$getCredentials`
1457
1495
 
1458
- getCredentials
1496
+ Gets the credentials for a given integration / organization
1459
1497
 
1460
1498
  `GET /v1/integration/{integrationId}/credentials`
1461
1499
 
@@ -1478,7 +1516,7 @@ const { data } = await client.$getCredentials({
1478
1516
 
1479
1517
  ### `$saveCredentials`
1480
1518
 
1481
- saveCredentials
1519
+ Saves the credentials for a given integration / organization
1482
1520
 
1483
1521
  `PUT /v1/integration/{integrationId}/credentials:save`
1484
1522
 
@@ -1495,7 +1533,7 @@ const { data } = await client.$saveCredentials(
1495
1533
 
1496
1534
  ### `$deleteCredentials`
1497
1535
 
1498
- deleteCredentials
1536
+ Delete the credentials for a given integration / organization
1499
1537
 
1500
1538
  `DELETE /v1/integration/{integrationId}/credentials:delete`
1501
1539
 
@@ -1509,7 +1547,7 @@ const { data } = await client.$deleteCredentials({
1509
1547
 
1510
1548
  ### `$getExternalCatalogProducts`
1511
1549
 
1512
- getExternalCatalogProducts
1550
+ Returns the list of available external catalog products with computed prices based on a given context
1513
1551
 
1514
1552
  `POST /v1/public/external-catalog/products`
1515
1553
 
@@ -1577,7 +1615,7 @@ const { data } = await client.$getExternalCatalogProducts(
1577
1615
 
1578
1616
  ### `$getExternalCatalogProductRecommendations`
1579
1617
 
1580
- getExternalCatalogProductRecommendations
1618
+ Returns the list of available external catalog products recommendations based on a given context
1581
1619
 
1582
1620
  `POST /v1/public/external-catalog/product-recommendations`
1583
1621
 
@@ -1661,7 +1699,7 @@ const { data } = await client.$getExternalCatalogProductRecommendations(
1661
1699
 
1662
1700
  ### `$productRecommendations`
1663
1701
 
1664
- productRecommendations
1702
+ Get a list of product recommendations based on the search parameters.
1665
1703
 
1666
1704
  `POST /v1/public/product-recommendations`
1667
1705
 
@@ -1777,6 +1815,630 @@ const { data } = await client.$productRecommendations(
1777
1815
 
1778
1816
  ---
1779
1817
 
1818
+ ### `$getConditionSets`
1819
+
1820
+ Returns the condition sets built in for one conditional entity type: the situations a
1821
+ conditional Product, Price or Coupon is commonly varied by, ready to be copied into that
1822
+ schema's `conditions` arr
1823
+
1824
+ `GET /v1/conditional-pricing/{slug}/condition-sets`
1825
+
1826
+ ```ts
1827
+ const { data } = await client.$getConditionSets({
1828
+ slug: 'example',
1829
+ })
1830
+ ```
1831
+
1832
+ <details>
1833
+ <summary>Response</summary>
1834
+
1835
+ ```json
1836
+ {
1837
+ "results": [
1838
+ {
1839
+ "id": "delivery_area",
1840
+ "label": "Delivery Area",
1841
+ "description": "string",
1842
+ "conditions": [
1843
+ {
1844
+ "name": "postal_code",
1845
+ "label": "Postal Code",
1846
+ "type": "string",
1847
+ "options": ["private", "commercial"],
1848
+ "allow_any": false,
1849
+ "format": "zipcode"
1850
+ }
1851
+ ]
1852
+ }
1853
+ ]
1854
+ }
1855
+ ```
1856
+
1857
+ </details>
1858
+
1859
+ ---
1860
+
1861
+ ### `$resolveConditionalEntity`
1862
+
1863
+ Resolves which of a conditional entity's variants apply to a situation, and returns each one
1864
+ composed: the base entity overlaid with the values of the version in effect at `as_of`.
1865
+
1866
+ `POST /v1/conditional-pricing:resolve`
1867
+
1868
+ ```ts
1869
+ const { data } = await client.$resolveConditionalEntity(
1870
+ null,
1871
+ {
1872
+ schema: 'product',
1873
+ entity_id: 'price-sp26d1yo',
1874
+ context: {
1875
+ postal_code: '46045',
1876
+ consumption: {
1877
+ lt: 5000
1878
+ }
1879
+ },
1880
+ as_of: '2027-03-15T00:00:00Z',
1881
+ options: {
1882
+ resolve_one: false
1883
+ }
1884
+ },
1885
+ )
1886
+ ```
1887
+
1888
+ <details>
1889
+ <summary>Response</summary>
1890
+
1891
+ ```json
1892
+ {
1893
+ "results": [
1894
+ {
1895
+ "_id": "price-sp26d1yo",
1896
+ "_variant_id": "var-46045",
1897
+ "_version_valid_from": "2027-01-01T00:00:00.000Z",
1898
+ "_conditions": {
1899
+ "postal_code": "46045",
1900
+ "default": false
1901
+ }
1902
+ }
1903
+ ]
1904
+ }
1905
+ ```
1906
+
1907
+ </details>
1908
+
1909
+ ---
1910
+
1911
+ ### `$createConditionalVariant`
1912
+
1913
+ Creates one variant of a conditional entity, together with the first version carrying its
1914
+ values. Never two calls: a variant that existed without a version would be an entity holding
1915
+ a condition tuple
1916
+
1917
+ `POST /v1/conditional-pricing/{slug}/entities/{entity_id}/variants`
1918
+
1919
+ ```ts
1920
+ const { data } = await client.$createConditionalVariant(
1921
+ {
1922
+ slug: 'example',
1923
+ entity_id: 'example',
1924
+ },
1925
+ {
1926
+ conditions: {
1927
+ postal_code: '46045'
1928
+ },
1929
+ default: false,
1930
+ valid_from: '2027-01-01T00:00:00Z',
1931
+ values: {
1932
+ unit_amount: 2499,
1933
+ unit_amount_decimal: '24.99'
1934
+ }
1935
+ },
1936
+ )
1937
+ ```
1938
+
1939
+ <details>
1940
+ <summary>Response</summary>
1941
+
1942
+ ```json
1943
+ {
1944
+ "variant_id": "var-46045",
1945
+ "entity_id": "price-sp26d1yo",
1946
+ "schema": "product",
1947
+ "conditions": {
1948
+ "postal_code": "46045",
1949
+ "default": false
1950
+ },
1951
+ "valid_from": "2027-01-01T00:00:00.000Z",
1952
+ "values": {
1953
+ "unit_amount": 2499,
1954
+ "unit_amount_decimal": "24.99"
1955
+ },
1956
+ "_created_at": "string",
1957
+ "_updated_at": "string",
1958
+ "_revision": 0,
1959
+ "warnings": [
1960
+ {
1961
+ "code": "VARIANT_COUNT_APPROACHING_CAP",
1962
+ "message": "string",
1963
+ "variant_count": 0,
1964
+ "cap": 0
1965
+ }
1966
+ ]
1967
+ }
1968
+ ```
1969
+
1970
+ </details>
1971
+
1972
+ ---
1973
+
1974
+ ### `$getActiveConditionalVariantVersion`
1975
+
1976
+ Returns the version of this variant that is currently in effect — the one with the latest
1977
+ `valid_from` at or before now.
1978
+
1979
+ `GET /v1/conditional-pricing/{slug}/entities/{entity_id}/variants/{variant_id}`
1980
+
1981
+ ```ts
1982
+ const { data } = await client.$getActiveConditionalVariantVersion({
1983
+ slug: 'example',
1984
+ entity_id: 'example',
1985
+ variant_id: 'example',
1986
+ })
1987
+ ```
1988
+
1989
+ <details>
1990
+ <summary>Response</summary>
1991
+
1992
+ ```json
1993
+ {
1994
+ "variant_id": "var-46045",
1995
+ "entity_id": "price-sp26d1yo",
1996
+ "schema": "product",
1997
+ "conditions": {
1998
+ "postal_code": "46045",
1999
+ "default": false
2000
+ },
2001
+ "valid_from": "2027-01-01T00:00:00.000Z",
2002
+ "values": {
2003
+ "unit_amount": 2499,
2004
+ "unit_amount_decimal": "24.99"
2005
+ },
2006
+ "_created_at": "string",
2007
+ "_updated_at": "string",
2008
+ "_revision": 3
2009
+ }
2010
+ ```
2011
+
2012
+ </details>
2013
+
2014
+ ---
2015
+
2016
+ ### `$replaceActiveConditionalVariantVersion`
2017
+
2018
+ Replaces the values of the version currently in effect, wholesale.
2019
+
2020
+ `PUT /v1/conditional-pricing/{slug}/entities/{entity_id}/variants/{variant_id}`
2021
+
2022
+ ```ts
2023
+ const { data } = await client.$replaceActiveConditionalVariantVersion(
2024
+ {
2025
+ slug: 'example',
2026
+ entity_id: 'example',
2027
+ variant_id: 'example',
2028
+ },
2029
+ {
2030
+ values: {
2031
+ unit_amount: 2499,
2032
+ unit_amount_decimal: '24.99'
2033
+ },
2034
+ _revision: 3,
2035
+ valid_from: 'string',
2036
+ conditions: {
2037
+ postal_code: '46045'
2038
+ }
2039
+ },
2040
+ )
2041
+ ```
2042
+
2043
+ <details>
2044
+ <summary>Response</summary>
2045
+
2046
+ ```json
2047
+ {
2048
+ "variant_id": "var-46045",
2049
+ "entity_id": "price-sp26d1yo",
2050
+ "schema": "product",
2051
+ "conditions": {
2052
+ "postal_code": "46045",
2053
+ "default": false
2054
+ },
2055
+ "valid_from": "2027-01-01T00:00:00.000Z",
2056
+ "values": {
2057
+ "unit_amount": 2499,
2058
+ "unit_amount_decimal": "24.99"
2059
+ },
2060
+ "_created_at": "string",
2061
+ "_updated_at": "string",
2062
+ "_revision": 3,
2063
+ "warnings": [
2064
+ {
2065
+ "code": "ACTIVE_VERSION_REPLACED",
2066
+ "message": "string",
2067
+ "valid_from": "2026-08-01T00:00:00.000Z",
2068
+ "active_valid_from": "2026-01-01T00:00:00.000Z"
2069
+ }
2070
+ ]
2071
+ }
2072
+ ```
2073
+
2074
+ </details>
2075
+
2076
+ ---
2077
+
2078
+ ### `$patchActiveConditionalVariantVersion`
2079
+
2080
+ Changes only the fields it names on the version currently in effect.
2081
+
2082
+ `PATCH /v1/conditional-pricing/{slug}/entities/{entity_id}/variants/{variant_id}`
2083
+
2084
+ ```ts
2085
+ const { data } = await client.$patchActiveConditionalVariantVersion(
2086
+ {
2087
+ slug: 'example',
2088
+ entity_id: 'example',
2089
+ variant_id: 'example',
2090
+ },
2091
+ {
2092
+ values: {
2093
+ unit_amount: 2499,
2094
+ unit_amount_decimal: '24.99'
2095
+ },
2096
+ _revision: 3,
2097
+ valid_from: 'string',
2098
+ conditions: {
2099
+ postal_code: '46045'
2100
+ }
2101
+ },
2102
+ )
2103
+ ```
2104
+
2105
+ <details>
2106
+ <summary>Response</summary>
2107
+
2108
+ ```json
2109
+ {
2110
+ "variant_id": "var-46045",
2111
+ "entity_id": "price-sp26d1yo",
2112
+ "schema": "product",
2113
+ "conditions": {
2114
+ "postal_code": "46045",
2115
+ "default": false
2116
+ },
2117
+ "valid_from": "2027-01-01T00:00:00.000Z",
2118
+ "values": {
2119
+ "unit_amount": 2499,
2120
+ "unit_amount_decimal": "24.99"
2121
+ },
2122
+ "_created_at": "string",
2123
+ "_updated_at": "string",
2124
+ "_revision": 3,
2125
+ "warnings": [
2126
+ {
2127
+ "code": "ACTIVE_VERSION_REPLACED",
2128
+ "message": "string",
2129
+ "valid_from": "2026-08-01T00:00:00.000Z",
2130
+ "active_valid_from": "2026-01-01T00:00:00.000Z"
2131
+ }
2132
+ ]
2133
+ }
2134
+ ```
2135
+
2136
+ </details>
2137
+
2138
+ ---
2139
+
2140
+ ### `$deleteConditionalVariant`
2141
+
2142
+ Removes one variant of a conditional entity: the condition tuple it holds, its registration
2143
+ in the search index, and every version it accumulated.
2144
+
2145
+ `DELETE /v1/conditional-pricing/{slug}/entities/{entity_id}/variants/{variant_id}`
2146
+
2147
+ ```ts
2148
+ const { data } = await client.$deleteConditionalVariant({
2149
+ slug: 'example',
2150
+ entity_id: 'example',
2151
+ variant_id: 'example',
2152
+ })
2153
+ ```
2154
+
2155
+ <details>
2156
+ <summary>Response</summary>
2157
+
2158
+ ```json
2159
+ {
2160
+ "variant_id": "var-46045",
2161
+ "entity_id": "price-sp26d1yo",
2162
+ "schema": "product",
2163
+ "tuple_released": true,
2164
+ "versions_deleted": 0
2165
+ }
2166
+ ```
2167
+
2168
+ </details>
2169
+
2170
+ ---
2171
+
2172
+ ### `$appendConditionalVariantVersion`
2173
+
2174
+ Appends a version to a variant: a new set of values taking effect at its own instant.
2175
+
2176
+ `POST /v1/conditional-pricing/{slug}/entities/{entity_id}/variants/{variant_id}/versions`
2177
+
2178
+ ```ts
2179
+ const { data } = await client.$appendConditionalVariantVersion(
2180
+ {
2181
+ slug: 'example',
2182
+ entity_id: 'example',
2183
+ variant_id: 'example',
2184
+ },
2185
+ {
2186
+ valid_from: '2027-01-01T00:00:00Z',
2187
+ values: {
2188
+ unit_amount: 2499,
2189
+ unit_amount_decimal: '24.99'
2190
+ },
2191
+ conditions: {
2192
+ postal_code: '46045'
2193
+ }
2194
+ },
2195
+ )
2196
+ ```
2197
+
2198
+ <details>
2199
+ <summary>Response</summary>
2200
+
2201
+ ```json
2202
+ {
2203
+ "variant_id": "var-46045",
2204
+ "entity_id": "price-sp26d1yo",
2205
+ "schema": "product",
2206
+ "conditions": {
2207
+ "postal_code": "46045",
2208
+ "default": false
2209
+ },
2210
+ "valid_from": "2027-01-01T00:00:00.000Z",
2211
+ "values": {
2212
+ "unit_amount": 2499,
2213
+ "unit_amount_decimal": "24.99"
2214
+ },
2215
+ "_created_at": "string",
2216
+ "_updated_at": "string",
2217
+ "_revision": 3,
2218
+ "warnings": [
2219
+ {
2220
+ "code": "ACTIVE_VERSION_REPLACED",
2221
+ "message": "string",
2222
+ "valid_from": "2026-08-01T00:00:00.000Z",
2223
+ "active_valid_from": "2026-01-01T00:00:00.000Z"
2224
+ }
2225
+ ]
2226
+ }
2227
+ ```
2228
+
2229
+ </details>
2230
+
2231
+ ---
2232
+
2233
+ ### `$getConditionalVariantVersion`
2234
+
2235
+ Returns one specific version of a variant, by the instant it takes effect — what a form editing
2236
+ that version loads.
2237
+
2238
+ `GET /v1/conditional-pricing/{slug}/entities/{entity_id}/variants/{variant_id}/versions/{valid_from}`
2239
+
2240
+ ```ts
2241
+ const { data } = await client.$getConditionalVariantVersion({
2242
+ slug: 'example',
2243
+ entity_id: 'example',
2244
+ variant_id: 'example',
2245
+ valid_from: 'example',
2246
+ })
2247
+ ```
2248
+
2249
+ <details>
2250
+ <summary>Response</summary>
2251
+
2252
+ ```json
2253
+ {
2254
+ "variant_id": "var-46045",
2255
+ "entity_id": "price-sp26d1yo",
2256
+ "schema": "product",
2257
+ "conditions": {
2258
+ "postal_code": "46045",
2259
+ "default": false
2260
+ },
2261
+ "valid_from": "2027-01-01T00:00:00.000Z",
2262
+ "values": {
2263
+ "unit_amount": 2499,
2264
+ "unit_amount_decimal": "24.99"
2265
+ },
2266
+ "_created_at": "string",
2267
+ "_updated_at": "string",
2268
+ "_revision": 3
2269
+ }
2270
+ ```
2271
+
2272
+ </details>
2273
+
2274
+ ---
2275
+
2276
+ ### `$replaceConditionalVariantVersion`
2277
+
2278
+ Replaces one version's values wholesale, addressed by its `valid_from`.
2279
+
2280
+ `PUT /v1/conditional-pricing/{slug}/entities/{entity_id}/variants/{variant_id}/versions/{valid_from}`
2281
+
2282
+ ```ts
2283
+ const { data } = await client.$replaceConditionalVariantVersion(
2284
+ {
2285
+ slug: 'example',
2286
+ entity_id: 'example',
2287
+ variant_id: 'example',
2288
+ valid_from: 'example',
2289
+ },
2290
+ {
2291
+ values: {
2292
+ unit_amount: 2499,
2293
+ unit_amount_decimal: '24.99'
2294
+ },
2295
+ _revision: 3,
2296
+ valid_from: 'string',
2297
+ conditions: {
2298
+ postal_code: '46045'
2299
+ }
2300
+ },
2301
+ )
2302
+ ```
2303
+
2304
+ <details>
2305
+ <summary>Response</summary>
2306
+
2307
+ ```json
2308
+ {
2309
+ "variant_id": "var-46045",
2310
+ "entity_id": "price-sp26d1yo",
2311
+ "schema": "product",
2312
+ "conditions": {
2313
+ "postal_code": "46045",
2314
+ "default": false
2315
+ },
2316
+ "valid_from": "2027-01-01T00:00:00.000Z",
2317
+ "values": {
2318
+ "unit_amount": 2499,
2319
+ "unit_amount_decimal": "24.99"
2320
+ },
2321
+ "_created_at": "string",
2322
+ "_updated_at": "string",
2323
+ "_revision": 3,
2324
+ "warnings": [
2325
+ {
2326
+ "code": "ACTIVE_VERSION_REPLACED",
2327
+ "message": "string",
2328
+ "valid_from": "2026-08-01T00:00:00.000Z",
2329
+ "active_valid_from": "2026-01-01T00:00:00.000Z"
2330
+ }
2331
+ ]
2332
+ }
2333
+ ```
2334
+
2335
+ </details>
2336
+
2337
+ ---
2338
+
2339
+ ### `$patchConditionalVariantVersion`
2340
+
2341
+ Changes only the fields it names on one version, addressed by its `valid_from`.
2342
+
2343
+ `PATCH /v1/conditional-pricing/{slug}/entities/{entity_id}/variants/{variant_id}/versions/{valid_from}`
2344
+
2345
+ ```ts
2346
+ const { data } = await client.$patchConditionalVariantVersion(
2347
+ {
2348
+ slug: 'example',
2349
+ entity_id: 'example',
2350
+ variant_id: 'example',
2351
+ valid_from: 'example',
2352
+ },
2353
+ {
2354
+ values: {
2355
+ unit_amount: 2499,
2356
+ unit_amount_decimal: '24.99'
2357
+ },
2358
+ _revision: 3,
2359
+ valid_from: 'string',
2360
+ conditions: {
2361
+ postal_code: '46045'
2362
+ }
2363
+ },
2364
+ )
2365
+ ```
2366
+
2367
+ <details>
2368
+ <summary>Response</summary>
2369
+
2370
+ ```json
2371
+ {
2372
+ "variant_id": "var-46045",
2373
+ "entity_id": "price-sp26d1yo",
2374
+ "schema": "product",
2375
+ "conditions": {
2376
+ "postal_code": "46045",
2377
+ "default": false
2378
+ },
2379
+ "valid_from": "2027-01-01T00:00:00.000Z",
2380
+ "values": {
2381
+ "unit_amount": 2499,
2382
+ "unit_amount_decimal": "24.99"
2383
+ },
2384
+ "_created_at": "string",
2385
+ "_updated_at": "string",
2386
+ "_revision": 3,
2387
+ "warnings": [
2388
+ {
2389
+ "code": "ACTIVE_VERSION_REPLACED",
2390
+ "message": "string",
2391
+ "valid_from": "2026-08-01T00:00:00.000Z",
2392
+ "active_valid_from": "2026-01-01T00:00:00.000Z"
2393
+ }
2394
+ ]
2395
+ }
2396
+ ```
2397
+
2398
+ </details>
2399
+
2400
+ ---
2401
+
2402
+ ### `$deleteConditionalVariantVersion`
2403
+
2404
+ Removes one version of a variant.
2405
+
2406
+ `DELETE /v1/conditional-pricing/{slug}/entities/{entity_id}/variants/{variant_id}/versions/{valid_from}`
2407
+
2408
+ ```ts
2409
+ const { data } = await client.$deleteConditionalVariantVersion({
2410
+ slug: 'example',
2411
+ entity_id: 'example',
2412
+ variant_id: 'example',
2413
+ valid_from: 'example',
2414
+ _revision: 1,
2415
+ })
2416
+ ```
2417
+
2418
+ <details>
2419
+ <summary>Response</summary>
2420
+
2421
+ ```json
2422
+ {
2423
+ "variant_id": "var-46045",
2424
+ "entity_id": "price-sp26d1yo",
2425
+ "schema": "product",
2426
+ "valid_from": "2027-01-01T00:00:00.000Z",
2427
+ "warnings": [
2428
+ {
2429
+ "code": "ACTIVE_VERSION_REPLACED",
2430
+ "message": "string",
2431
+ "valid_from": "2026-08-01T00:00:00.000Z",
2432
+ "active_valid_from": "2026-01-01T00:00:00.000Z"
2433
+ }
2434
+ ]
2435
+ }
2436
+ ```
2437
+
2438
+ </details>
2439
+
2440
+ ---
2441
+
1780
2442
  ## Schemas
1781
2443
 
1782
2444
  ### `IntegrationId`
@@ -1785,6 +2447,93 @@ const { data } = await client.$productRecommendations(
1785
2447
  type IntegrationId = "getag" | "external-catalog"
1786
2448
  ```
1787
2449
 
2450
+ ### `ConditionalEntitySlug`
2451
+
2452
+ Schema slug of an entity type that can be conditional — the `{slug}` of every
2453
+ conditional-pricing route.
2454
+
2455
+
2456
+ ```ts
2457
+ type ConditionalEntitySlug = "product" | "price" | "coupon"
2458
+ ```
2459
+
2460
+ ### `ConditionType`
2461
+
2462
+ The kind of value a condition holds, which decides how a variant's pinned value is matched
2463
+ against a resolve context.
2464
+
2465
+ - `string`: an arbitrary string, matched exactly and case-sensitively
2466
+ - `number`: a numeric value
2467
+ - `date`: a single date
2468
+ - `daterange`: a window with a from and an until timestamp;
2469
+
2470
+ ```ts
2471
+ type ConditionType = "string" | "number" | "date" | "daterange" | "boolean" | "select" | "location"
2472
+ ```
2473
+
2474
+ ### `ConditionDefinition`
2475
+
2476
+ One condition dimension, in the shape a schema's `conditions` array holds it — copy it in
2477
+ verbatim.
2478
+
2479
+
2480
+ ```ts
2481
+ type ConditionDefinition = {
2482
+ name: string
2483
+ label: string
2484
+ type: "string" | "number" | "date" | "daterange" | "boolean" | "select" | "location"
2485
+ options?: Array<string | {
2486
+ value: string
2487
+ title?: string
2488
+ }>
2489
+ allow_any?: boolean
2490
+ format?: "zipcode" | "zipcode + town"
2491
+ }
2492
+ ```
2493
+
2494
+ ### `ConditionSet`
2495
+
2496
+ A named bundle of condition definitions, built in for one entity type.
2497
+
2498
+ ```ts
2499
+ type ConditionSet = {
2500
+ id: string
2501
+ label: string
2502
+ description: string
2503
+ conditions: Array<{
2504
+ name: string
2505
+ label: string
2506
+ type: "string" | "number" | "date" | "daterange" | "boolean" | "select" | "location"
2507
+ options?: Array<string | {
2508
+ value: { ... }
2509
+ title?: { ... }
2510
+ }>
2511
+ allow_any?: boolean
2512
+ format?: "zipcode" | "zipcode + town"
2513
+ }>
2514
+ }
2515
+ ```
2516
+
2517
+ ### `ConditionSetCatalog`
2518
+
2519
+ ```ts
2520
+ type ConditionSetCatalog = {
2521
+ results: Array<{
2522
+ id: string
2523
+ label: string
2524
+ description: string
2525
+ conditions: Array<{
2526
+ name: { ... }
2527
+ label: { ... }
2528
+ type: { ... }
2529
+ options?: { ... }
2530
+ allow_any?: { ... }
2531
+ format?: { ... }
2532
+ }>
2533
+ }>
2534
+ }
2535
+ ```
2536
+
1788
2537
  ### `ConditionalPricingErrorCode`
1789
2538
 
1790
2539
  Machine-readable failure mode of a conditional-pricing operation, allowing clients
@@ -1794,7 +2543,286 @@ to branch on the kind of failure instead of parsing the error message.
1794
2543
  - `AMBIGUOUS_RESOLUTION` (409): several variants match the given con
1795
2544
 
1796
2545
  ```ts
1797
- type ConditionalPricingErrorCode = "NOT_FOUND" | "AMBIGUOUS_RESOLUTION" | "TUPLE_CONFLICT" | "VERSION_CONFLICT" | "SUPERSEDED_VERSION" | "CONDITION_UNDEFINED" | "OPERATOR_UNSUPPORTED" | "CONTEXT_FORMAT_INVALID" | "TOO_MANY_MATCHES" | "WRITE_CONFLICT"
2546
+ type ConditionalPricingErrorCode = "NOT_FOUND" | "AMBIGUOUS_RESOLUTION" | "TUPLE_CONFLICT" | "VERSION_CONFLICT" | "CONDITION_UNDEFINED" | "OPERATOR_UNSUPPORTED" | "CONTEXT_FORMAT_INVALID" | "CONDITION_VALUE_INVALID" | "TOO_MANY_MATCHES" | "WRITE_CONFLICT"
2547
+ ```
2548
+
2549
+ ### `ResolveConditionalEntityRequest`
2550
+
2551
+ ```ts
2552
+ type ResolveConditionalEntityRequest = {
2553
+ schema: "product" | "price" | "coupon"
2554
+ entity_id: string
2555
+ context?: Record<string, unknown>
2556
+ as_of?: string
2557
+ options?: {
2558
+ resolve_one?: boolean
2559
+ }
2560
+ }
2561
+ ```
2562
+
2563
+ ### `ResolveContext`
2564
+
2565
+ The situation to resolve for: a flat map keyed by condition name, as the entity's schema
2566
+ declares them. A condition left out of the map is not a wildcard — it matches only variants
2567
+ that leave that condition unpinned.
2568
+
2569
+ Each value is either an exact value, typed by its condition, or a single-operator
2570
+
2571
+ ```ts
2572
+ type ResolveContext = Record<string, unknown>
2573
+ ```
2574
+
2575
+ ### `ResolveOptions`
2576
+
2577
+ ```ts
2578
+ type ResolveOptions = {
2579
+ resolve_one?: boolean
2580
+ }
2581
+ ```
2582
+
2583
+ ### `ResolvedVariants`
2584
+
2585
+ ```ts
2586
+ type ResolvedVariants = {
2587
+ results: Array<{
2588
+ _id: string
2589
+ _variant_id: string
2590
+ _version_valid_from: string
2591
+ _conditions: {
2592
+ default: { ... }
2593
+ }
2594
+ }>
2595
+ }
2596
+ ```
2597
+
2598
+ ### `ResolvedVariant`
2599
+
2600
+ The entity as this variant leaves it — every attribute of a plain entity read, with the
2601
+ applicable version's overrides applied — plus the discriminators saying where the numbers
2602
+ came from.
2603
+
2604
+
2605
+ ```ts
2606
+ type ResolvedVariant = {
2607
+ _id: string
2608
+ _variant_id: string
2609
+ _version_valid_from: string
2610
+ _conditions: {
2611
+ default: boolean
2612
+ }
2613
+ }
2614
+ ```
2615
+
2616
+ ### `CreateVariantRequest`
2617
+
2618
+ ```ts
2619
+ type CreateVariantRequest = {
2620
+ conditions?: Record<string, unknown>
2621
+ default?: boolean
2622
+ valid_from?: string
2623
+ values: Record<string, unknown>
2624
+ }
2625
+ ```
2626
+
2627
+ ### `VariantConditions`
2628
+
2629
+ A variant's pinned conditions as a reader sees them: the pins the schema declares, plus a
2630
+ boolean `default` saying whether this is the entity's fallback.
2631
+
2632
+ `default` is always present and always a boolean, so a client can branch on "did I get the
2633
+ fallback?" without knowing how one is stored. The rese
2634
+
2635
+ ```ts
2636
+ type VariantConditions = {
2637
+ default: boolean
2638
+ }
2639
+ ```
2640
+
2641
+ ### `PinnedConditions`
2642
+
2643
+ The situation this variant applies to: a flat map keyed by condition name, as the entity's
2644
+ schema declares them. A condition left out is a wildcard — the variant applies whatever the
2645
+ context says for it, which is what makes adding a condition to a schema non-breaking for the
2646
+ variants that already ex
2647
+
2648
+ ```ts
2649
+ type PinnedConditions = Record<string, unknown>
2650
+ ```
2651
+
2652
+ ### `VariantValues`
2653
+
2654
+ The attribute values this version overrides on the base entity, keyed by attribute name.
2655
+
2656
+ Only attributes currently declaring `overridable_attribute` are applied. Metadata fields
2657
+ (anything underscore-prefixed), readonly attributes, hidden attributes and non-overridable
2658
+ attributes present here are ig
2659
+
2660
+ ```ts
2661
+ type VariantValues = Record<string, unknown>
2662
+ ```
2663
+
2664
+ ### `CreatedVariant`
2665
+
2666
+ ```ts
2667
+ type CreatedVariant = {
2668
+ variant_id: string
2669
+ entity_id: string
2670
+ schema: "product" | "price" | "coupon"
2671
+ conditions: {
2672
+ default: boolean
2673
+ }
2674
+ valid_from: string
2675
+ values: Record<string, unknown>
2676
+ _created_at?: string
2677
+ _updated_at?: string
2678
+ _revision?: number
2679
+ warnings: Array<{
2680
+ code: "VARIANT_COUNT_APPROACHING_CAP"
2681
+ message: string
2682
+ variant_count?: number
2683
+ cap?: number
2684
+ }>
2685
+ }
2686
+ ```
2687
+
2688
+ ### `VariantWriteWarning`
2689
+
2690
+ ```ts
2691
+ type VariantWriteWarning = {
2692
+ code: "VARIANT_COUNT_APPROACHING_CAP"
2693
+ message: string
2694
+ variant_count?: number
2695
+ cap?: number
2696
+ }
2697
+ ```
2698
+
2699
+ ### `DeletedVariant`
2700
+
2701
+ ```ts
2702
+ type DeletedVariant = {
2703
+ variant_id: string
2704
+ entity_id: string
2705
+ schema: "product" | "price" | "coupon"
2706
+ tuple_released: boolean
2707
+ versions_deleted: number
2708
+ }
2709
+ ```
2710
+
2711
+ ### `VariantVersion`
2712
+
2713
+ One version of one variant: the attribute overrides it carries, the instant it takes effect,
2714
+ and the variant it belongs to.
2715
+
2716
+ These are the version's **own** overrides, not the base entity overlaid with them — this is
2717
+ what an editing screen loads and saves, and what it edits is the overrides. Composi
2718
+
2719
+ ```ts
2720
+ type VariantVersion = {
2721
+ variant_id: string
2722
+ entity_id: string
2723
+ schema: "product" | "price" | "coupon"
2724
+ conditions: {
2725
+ default: boolean
2726
+ }
2727
+ valid_from: string
2728
+ values: Record<string, unknown>
2729
+ _created_at?: string
2730
+ _updated_at?: string
2731
+ _revision?: number
2732
+ }
2733
+ ```
2734
+
2735
+ ### `WrittenVariantVersion`
2736
+
2737
+ A version as a write left it, together with anything the write moved.
2738
+
2739
+
2740
+ ```ts
2741
+ type WrittenVariantVersion = {
2742
+ variant_id: string
2743
+ entity_id: string
2744
+ schema: "product" | "price" | "coupon"
2745
+ conditions: {
2746
+ default: boolean
2747
+ }
2748
+ valid_from: string
2749
+ values: Record<string, unknown>
2750
+ _created_at?: string
2751
+ _updated_at?: string
2752
+ _revision?: number
2753
+ warnings: Array<{
2754
+ code: "ACTIVE_VERSION_REPLACED" | "SUPERSEDED_VERSION_WRITTEN"
2755
+ message: string
2756
+ valid_from: string
2757
+ active_valid_from?: string
2758
+ }>
2759
+ }
2760
+ ```
2761
+
2762
+ ### `DeletedVariantVersion`
2763
+
2764
+ ```ts
2765
+ type DeletedVariantVersion = {
2766
+ variant_id: string
2767
+ entity_id: string
2768
+ schema: "product" | "price" | "coupon"
2769
+ valid_from: string
2770
+ warnings: Array<{
2771
+ code: "ACTIVE_VERSION_REPLACED" | "SUPERSEDED_VERSION_WRITTEN"
2772
+ message: string
2773
+ valid_from: string
2774
+ active_valid_from?: string
2775
+ }>
2776
+ }
2777
+ ```
2778
+
2779
+ ### `VersionWriteWarning`
2780
+
2781
+ Something a version write moved. A version write is never refused for being late — backdating a
2782
+ version, and editing or deleting one that has already been superseded, are both accepted — so
2783
+ what a caller gets instead is a warning naming exactly what changed. One write can carry both
2784
+ codes.
2785
+
2786
+
2787
+ ```ts
2788
+ type VersionWriteWarning = {
2789
+ code: "ACTIVE_VERSION_REPLACED" | "SUPERSEDED_VERSION_WRITTEN"
2790
+ message: string
2791
+ valid_from: string
2792
+ active_valid_from?: string
2793
+ }
2794
+ ```
2795
+
2796
+ ### `AppendVersionRequest`
2797
+
2798
+ ```ts
2799
+ type AppendVersionRequest = {
2800
+ valid_from?: string
2801
+ values: Record<string, unknown>
2802
+ conditions?: Record<string, unknown>
2803
+ }
2804
+ ```
2805
+
2806
+ ### `ReplaceVersionRequest`
2807
+
2808
+ ```ts
2809
+ type ReplaceVersionRequest = {
2810
+ values: Record<string, unknown>
2811
+ _revision: number
2812
+ valid_from?: string
2813
+ conditions?: Record<string, unknown>
2814
+ }
2815
+ ```
2816
+
2817
+ ### `PatchVersionRequest`
2818
+
2819
+ ```ts
2820
+ type PatchVersionRequest = {
2821
+ values: Record<string, unknown>
2822
+ _revision: number
2823
+ valid_from?: string
2824
+ conditions?: Record<string, unknown>
2825
+ }
1798
2826
  ```
1799
2827
 
1800
2828
  ### `Error`
@@ -1820,7 +2848,7 @@ type ConditionalPricingError = {
1820
2848
  status?: number
1821
2849
  cause?: string
1822
2850
  error?: string
1823
- code?: "NOT_FOUND" | "AMBIGUOUS_RESOLUTION" | "TUPLE_CONFLICT" | "VERSION_CONFLICT" | "SUPERSEDED_VERSION" | "CONDITION_UNDEFINED" | "OPERATOR_UNSUPPORTED" | "CONTEXT_FORMAT_INVALID" | "TOO_MANY_MATCHES" | "WRITE_CONFLICT"
2851
+ code?: "NOT_FOUND" | "AMBIGUOUS_RESOLUTION" | "TUPLE_CONFLICT" | "VERSION_CONFLICT" | "CONDITION_UNDEFINED" | "OPERATOR_UNSUPPORTED" | "CONTEXT_FORMAT_INVALID" | "CONDITION_VALUE_INVALID" | "TOO_MANY_MATCHES" | "WRITE_CONFLICT"
1824
2852
  details?: Record<string, unknown>
1825
2853
  }
1826
2854
  ```