@epilot/pricing-client 3.7.1 → 3.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/client.d.ts CHANGED
File without changes
package/dist/client.js CHANGED
File without changes
File without changes
@@ -1 +1 @@
1
- !function(e,r){for(var t in r)e[t]=r[t];r.__esModule&&Object.defineProperty(e,"__esModule",{value:!0})}(exports,(()=>{"use strict";var e={914:function(e,r,t){var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});var a=o(t(946));r.default=a.default},946:e=>{e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"","version":""},"servers":[{"url":"https://pricing-api.sls.epilot.io"}],"paths":{"/v1/order":{"post":{"operationId":"createOrder","requestBody":{"required":true,"content":{"application/json":{}}}}},"/v1/order/{id}":{"put":{"operationId":"putOrder","parameters":[{"in":"path","name":"id","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}}}},"/v1/public/cart:checkout":{"post":{"operationId":"$checkoutCart","parameters":[{"in":"header","name":"X-Ivy-Org-ID","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}}}},"/v1/public/catalog":{"post":{"operationId":"$searchCatalog","parameters":[{"in":"header","name":"X-Ivy-Org-ID","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}}}},"/v1/public/availability:check":{"post":{"operationId":"$availabilityCheck","parameters":[{"in":"header","name":"X-Ivy-Org-ID","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}}}},"/v1/public/opportunity":{"post":{"deprecated":true,"operationId":"$createOpportunity","parameters":[{"in":"header","name":"X-Ivy-Org-ID","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}}}}},"components":{}}')}},r={};return function t(o){if(r[o])return r[o].exports;var a=r[o]={exports:{}};return e[o].call(a.exports,a,a.exports,t),a.exports}(914)})());
1
+ !function(e,r){for(var t in r)e[t]=r[t];r.__esModule&&Object.defineProperty(e,"__esModule",{value:!0})}(exports,(()=>{"use strict";var e={914:function(e,r,t){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});var i=a(t(946));r.default=i.default},946:e=>{e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"","version":""},"servers":[{"url":"https://pricing-api.sls.epilot.io"}],"paths":{"/v1/order":{"post":{"operationId":"createOrder","requestBody":{"required":true,"content":{"application/json":{}}}}},"/v1/order/{id}":{"put":{"operationId":"putOrder","parameters":[{"in":"path","name":"id","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}}}},"/v1/public/cart:checkout":{"post":{"operationId":"$checkoutCart","parameters":[{"in":"header","name":"X-Ivy-Org-ID","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}}}},"/v1/public/catalog":{"post":{"operationId":"$searchCatalog","parameters":[{"in":"header","name":"X-Ivy-Org-ID","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}}}},"/v1/public/availability:check":{"post":{"operationId":"$availabilityCheck","parameters":[{"in":"header","name":"X-Ivy-Org-ID","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}}}},"/v1/validate-availability/{id}":{"get":{"operationId":"$validateAvailabilityFile","parameters":[{"in":"path","name":"id","required":true},{"in":"header","name":"X-Epilot-Org-ID","required":true}]}},"/v1/public/opportunity":{"post":{"deprecated":true,"operationId":"$createOpportunity","parameters":[{"in":"header","name":"X-Ivy-Org-ID","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}}}}},"components":{}}')}},r={};return function t(a){if(r[a])return r[a].exports;var i=r[a]={exports:{}};return e[a].call(i.exports,i,i.exports,t),i.exports}(914)})());
package/dist/index.d.ts CHANGED
File without changes
package/dist/index.js CHANGED
File without changes
@@ -93,6 +93,23 @@
93
93
  }
94
94
  }
95
95
  },
96
+ "/v1/validate-availability/{id}": {
97
+ "get": {
98
+ "operationId": "$validateAvailabilityFile",
99
+ "parameters": [
100
+ {
101
+ "in": "path",
102
+ "name": "id",
103
+ "required": true
104
+ },
105
+ {
106
+ "in": "header",
107
+ "name": "X-Epilot-Org-ID",
108
+ "required": true
109
+ }
110
+ ]
111
+ }
112
+ },
96
113
  "/v1/public/opportunity": {
97
114
  "post": {
98
115
  "deprecated": true,
package/dist/openapi.d.ts CHANGED
@@ -168,7 +168,7 @@ declare namespace Components {
168
168
  /**
169
169
  * price item id
170
170
  */
171
- id?: string;
171
+ _id?: string;
172
172
  metadata?: /* A set of key-value pairs used to store meta data information about an entity. */ MetaData;
173
173
  /**
174
174
  * The unit amount value
@@ -252,6 +252,29 @@ declare namespace Components {
252
252
  * The sum of amounts of the price items by recurrence.
253
253
  */
254
254
  recurrences?: (/* An amount associated with a specific recurrence. */ RecurrenceAmount)[];
255
+ /**
256
+ * Price mapping information required to compute totals
257
+ */
258
+ price_mappings?: /**
259
+ * example:
260
+ * [
261
+ * {
262
+ * "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
263
+ * "frequency_unit": "weekly",
264
+ * "value": 1000.245,
265
+ * "name": "avg consumption",
266
+ * "metadata": {
267
+ * "journey_title": "energy journey",
268
+ * "step_name": "avg consumption picker"
269
+ * }
270
+ * }
271
+ * ]
272
+ */
273
+ PriceInputMappings;
274
+ /**
275
+ * When set to true on a `_price` displayed as OnRequest (`show_as_on_request: 'on_request'`) this flag means the price has been approved and can now be displayed to the customer. This flag is only valid for prices shown as 'on_request'.
276
+ */
277
+ on_request_approved?: boolean;
255
278
  }
256
279
  /**
257
280
  * Represents a valid base price item from a client.
@@ -262,6 +285,25 @@ declare namespace Components {
262
285
  * The quantity of products being purchased.
263
286
  */
264
287
  quantity?: number;
288
+ /**
289
+ * Price mapping information required to compute totals
290
+ */
291
+ price_mappings?: /**
292
+ * example:
293
+ * [
294
+ * {
295
+ * "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
296
+ * "frequency_unit": "weekly",
297
+ * "value": 1000.245,
298
+ * "name": "avg consumption",
299
+ * "metadata": {
300
+ * "journey_title": "energy journey",
301
+ * "step_name": "avg consumption picker"
302
+ * }
303
+ * }
304
+ * ]
305
+ */
306
+ PriceInputMappings;
265
307
  /**
266
308
  * An arbitrary string attached to the price item. Often useful for displaying to users. Defaults to product name.
267
309
  */
@@ -651,7 +693,7 @@ declare namespace Components {
651
693
  /**
652
694
  * price item id
653
695
  */
654
- id?: string;
696
+ _id?: string;
655
697
  metadata?: /* A set of key-value pairs used to store meta data information about an entity. */ MetaData;
656
698
  /**
657
699
  * The unit amount value
@@ -735,6 +777,26 @@ declare namespace Components {
735
777
  * The sum of amounts of the price items by recurrence.
736
778
  */
737
779
  recurrences?: (/* An amount associated with a specific recurrence. */ RecurrenceAmount)[];
780
+ price_mappings?: /**
781
+ * example:
782
+ * [
783
+ * {
784
+ * "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
785
+ * "frequency_unit": "weekly",
786
+ * "value": 1000.245,
787
+ * "name": "avg consumption",
788
+ * "metadata": {
789
+ * "journey_title": "energy journey",
790
+ * "step_name": "avg consumption picker"
791
+ * }
792
+ * }
793
+ * ]
794
+ */
795
+ PriceInputMappings;
796
+ /**
797
+ * When set to true on a `_price` displayed as OnRequest (`show_as_on_request: 'on_request'`) this flag means the price has been approved and can now be displayed to the customer. This flag is only valid for prices shown as 'on_request'.
798
+ */
799
+ on_request_approved?: boolean;
738
800
  /**
739
801
  * Contains price item configurations, per price component, when the main price item is a [composite price](/api/pricing#tag/dynamic_price_schema).
740
802
  */
@@ -746,6 +808,7 @@ declare namespace Components {
746
808
  * }
747
809
  */
748
810
  PriceItem[];
811
+ total_details?: /* The total details with tax (and discount) aggregated totals. */ TotalDetails;
749
812
  }
750
813
  /**
751
814
  * Represents a composite price input to the pricing library.
@@ -756,6 +819,22 @@ declare namespace Components {
756
819
  * The quantity of products being purchased.
757
820
  */
758
821
  quantity?: number;
822
+ price_mappings?: /**
823
+ * example:
824
+ * [
825
+ * {
826
+ * "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
827
+ * "frequency_unit": "weekly",
828
+ * "value": 1000.245,
829
+ * "name": "avg consumption",
830
+ * "metadata": {
831
+ * "journey_title": "energy journey",
832
+ * "step_name": "avg consumption picker"
833
+ * }
834
+ * }
835
+ * ]
836
+ */
837
+ PriceInputMappings;
759
838
  /**
760
839
  * An arbitrary string attached to the price item. Often useful for displaying to users. Defaults to product name.
761
840
  */
@@ -1319,7 +1398,7 @@ declare namespace Components {
1319
1398
  *
1320
1399
  */
1321
1400
  OrderStatus;
1322
- line_items?: /* Tracks a set of product prices, quantities, (discounts) and taxes. */ PriceItems;
1401
+ line_items?: /* A valid set of product prices, quantities, (discounts) and taxes from a client. */ PriceItemsDto;
1323
1402
  /**
1324
1403
  * type of source, e.g. journey or manual
1325
1404
  * example:
@@ -1426,18 +1505,27 @@ declare namespace Components {
1426
1505
  */
1427
1506
  is_composite_price?: boolean;
1428
1507
  /**
1429
- * Describes how to compute the price per period. Either `per_unit` or `tiered`.
1508
+ * Describes how to compute the price per period. Either `per_unit`, `tiered_graduated` or `tiered_volume`.
1430
1509
  * - `per_unit` indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity
1431
- * - `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the tiers and tiers_mode attributes.
1510
+ * - `tiered_graduated` indicates that the unit pricing will be computed using tiers attribute. The customer pays the price per unit in every range their purchase rises through.
1511
+ * - `tiered_volume` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.
1512
+ * - `tiered_flatfee` While similar to tiered_volume, tiered flat fee charges for the same price (flat) for the entire range instead using the unit price to multiply the quantity.
1432
1513
  *
1433
- * ⚠️ Tiered pricing is **not supported** yet.
1514
+ */
1515
+ pricing_model: "per_unit" | "tiered_graduated" | "tiered_volume" | "tiered_flatfee";
1516
+ /**
1517
+ * Defines an array of tiers. Each tier has an upper bound, an unit amount and a flat fee.
1434
1518
  *
1435
1519
  */
1436
- billing_scheme?: "per_unit";
1520
+ tiers?: PriceTier[];
1437
1521
  /**
1438
1522
  * A brief description of the price.
1439
1523
  */
1440
1524
  description?: string;
1525
+ /**
1526
+ * A detailed description of the price. This is shown on the order document and order table.
1527
+ */
1528
+ long_description?: string;
1441
1529
  /**
1442
1530
  * The default tax rate applicable to the product.
1443
1531
  * This field is deprecated, use the new `tax` attribute.
@@ -1461,7 +1549,6 @@ declare namespace Components {
1461
1549
  * "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
1462
1550
  * "type": "VAT",
1463
1551
  * "description": "Tax description",
1464
- * "behavior": "Exclusive",
1465
1552
  * "active": "true",
1466
1553
  * "region": "DE",
1467
1554
  * "region_label": "Germany",
@@ -1477,15 +1564,9 @@ declare namespace Components {
1477
1564
  */
1478
1565
  Tax[];
1479
1566
  /**
1480
- * Specifies whether the price is considered `inclusive` of taxes or `exclusive` of taxes.
1481
- * One of `inclusive`, `exclusive`, or `unspecified`.
1482
- *
1483
- */
1484
- tax_behavior?: "inclusive" | "exclusive";
1485
- /**
1486
- * Defines the tiered pricing type of the price.
1567
+ * Specifies whether the price is considered `inclusive` of taxes or not.
1487
1568
  */
1488
- tiers_mode?: "standard";
1569
+ is_tax_inclusive?: boolean;
1489
1570
  /**
1490
1571
  * One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.
1491
1572
  */
@@ -1556,7 +1637,7 @@ declare namespace Components {
1556
1637
  /**
1557
1638
  * The unit of measurement used for display purposes and possibly for calculations when the price is variable.
1558
1639
  */
1559
- unit?: /* The unit of measurement used for display purposes and possibly for calculations when the price is variable. */ ("kw" | "kwh" | "m" | "m2" | "l") | string;
1640
+ unit?: /* The unit of measurement used for display purposes and possibly for calculations when the price is variable. */ ("kw" | "kwh" | "m" | "m2" | "l" | "cubic-meter" | "cubic-meter-h" | "ls" | "a" | "kva" | "w" | "wp" | "kwp") | string;
1560
1641
  /**
1561
1642
  * The price creation date
1562
1643
  */
@@ -1598,6 +1679,57 @@ declare namespace Components {
1598
1679
  */
1599
1680
  _tags?: string[];
1600
1681
  }
1682
+ /**
1683
+ * example:
1684
+ * {
1685
+ * "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
1686
+ * "frequency_unit": "weekly",
1687
+ * "value": 1000.245,
1688
+ * "name": "avg consumption",
1689
+ * "metadata": {
1690
+ * "journey_title": "energy journey",
1691
+ * "step_name": "avg consumption picker"
1692
+ * }
1693
+ * }
1694
+ */
1695
+ export interface PriceInputMapping {
1696
+ price_id?: string;
1697
+ frequency_unit?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly" | "one_time";
1698
+ name?: string;
1699
+ value?: number;
1700
+ metadata?: {
1701
+ [name: string]: string;
1702
+ };
1703
+ }
1704
+ /**
1705
+ * example:
1706
+ * [
1707
+ * {
1708
+ * "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
1709
+ * "frequency_unit": "weekly",
1710
+ * "value": 1000.245,
1711
+ * "name": "avg consumption",
1712
+ * "metadata": {
1713
+ * "journey_title": "energy journey",
1714
+ * "step_name": "avg consumption picker"
1715
+ * }
1716
+ * }
1717
+ * ]
1718
+ */
1719
+ export type PriceInputMappings = /**
1720
+ * example:
1721
+ * {
1722
+ * "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
1723
+ * "frequency_unit": "weekly",
1724
+ * "value": 1000.245,
1725
+ * "name": "avg consumption",
1726
+ * "metadata": {
1727
+ * "journey_title": "energy journey",
1728
+ * "step_name": "avg consumption picker"
1729
+ * }
1730
+ * }
1731
+ */
1732
+ PriceInputMapping[];
1601
1733
  /**
1602
1734
  * Represents a price item
1603
1735
  * example:
@@ -1609,7 +1741,7 @@ declare namespace Components {
1609
1741
  /**
1610
1742
  * price item id
1611
1743
  */
1612
- id?: string;
1744
+ _id?: string;
1613
1745
  metadata?: /* A set of key-value pairs used to store meta data information about an entity. */ MetaData;
1614
1746
  /**
1615
1747
  * The unit amount value
@@ -1693,14 +1825,39 @@ declare namespace Components {
1693
1825
  * The sum of amounts of the price items by recurrence.
1694
1826
  */
1695
1827
  recurrences?: (/* An amount associated with a specific recurrence. */ RecurrenceAmount)[];
1828
+ price_mappings?: /**
1829
+ * example:
1830
+ * [
1831
+ * {
1832
+ * "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
1833
+ * "frequency_unit": "weekly",
1834
+ * "value": 1000.245,
1835
+ * "name": "avg consumption",
1836
+ * "metadata": {
1837
+ * "journey_title": "energy journey",
1838
+ * "step_name": "avg consumption picker"
1839
+ * }
1840
+ * }
1841
+ * ]
1842
+ */
1843
+ PriceInputMappings;
1844
+ /**
1845
+ * When set to true on a `_price` displayed as OnRequest (`show_as_on_request: 'on_request'`) this flag means the price has been approved and can now be displayed to the customer. This flag is only valid for prices shown as 'on_request'.
1846
+ */
1847
+ on_request_approved?: boolean;
1696
1848
  /**
1697
1849
  * One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.
1698
1850
  */
1699
1851
  type?: "one_time" | "recurring";
1700
1852
  /**
1701
- * When set to true on a `_price` displayed as OnRequest (`show_as_on_request: 'on_request'`) this flag means the price has been approved and can now be displayed to the customer. This flag is only valid for prices shown as 'on_request'.
1853
+ * Describes how to compute the price per period. Either `per_unit`, `tiered_graduated` or `tiered_volume`.
1854
+ * - `per_unit` indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity
1855
+ * - `tiered_graduated` indicates that the unit pricing will be computed using tiers attribute. The customer pays the price per unit in every range their purchase rises through.
1856
+ * - `tiered_volume` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.
1857
+ * - `tiered_flatfee` While similar to tiered_volume, tiered flat fee charges for the same price (flat) for the entire range instead using the unit price to multiply the quantity.
1858
+ *
1702
1859
  */
1703
- on_request_approved?: boolean;
1860
+ pricing_model: "per_unit" | "tiered_graduated" | "tiered_volume" | "tiered_flatfee";
1704
1861
  }
1705
1862
  /**
1706
1863
  * Represents a price input to the pricing library.
@@ -1711,6 +1868,22 @@ declare namespace Components {
1711
1868
  * The quantity of products being purchased.
1712
1869
  */
1713
1870
  quantity?: number;
1871
+ price_mappings?: /**
1872
+ * example:
1873
+ * [
1874
+ * {
1875
+ * "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
1876
+ * "frequency_unit": "weekly",
1877
+ * "value": 1000.245,
1878
+ * "name": "avg consumption",
1879
+ * "metadata": {
1880
+ * "journey_title": "energy journey",
1881
+ * "step_name": "avg consumption picker"
1882
+ * }
1883
+ * }
1884
+ * ]
1885
+ */
1886
+ PriceInputMappings;
1714
1887
  /**
1715
1888
  * An arbitrary string attached to the price item. Often useful for displaying to users. Defaults to product name.
1716
1889
  */
@@ -1830,10 +2003,27 @@ declare namespace Components {
1830
2003
  * The unit amount value
1831
2004
  */
1832
2005
  unit_amount?: number;
2006
+ unit_amount_currency?: /**
2007
+ * Three-letter ISO currency code, in lowercase. Must be a supported currency.
2008
+ * ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
2009
+ *
2010
+ * example:
2011
+ * EUR
2012
+ */
2013
+ Currency;
1833
2014
  /**
1834
2015
  * The unit amount in cents to be charged, represented as a decimal string with at most 12 decimal places.
1835
2016
  */
1836
2017
  unit_amount_decimal?: string;
2018
+ /**
2019
+ * Describes how to compute the price per period. Either `per_unit`, `tiered_graduated` or `tiered_volume`.
2020
+ * - `per_unit` indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity
2021
+ * - `tiered_graduated` indicates that the unit pricing will be computed using tiers attribute. The customer pays the price per unit in every range their purchase rises through.
2022
+ * - `tiered_volume` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.
2023
+ * - `tiered_flatfee` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.
2024
+ *
2025
+ */
2026
+ pricing_model: "per_unit" | "tiered_graduated" | "tiered_volume" | "tiered_flatfee";
1837
2027
  /**
1838
2028
  * The snapshot of the price linked to the price item.
1839
2029
  * example:
@@ -1852,18 +2042,27 @@ declare namespace Components {
1852
2042
  */
1853
2043
  is_composite_price?: boolean;
1854
2044
  /**
1855
- * Describes how to compute the price per period. Either `per_unit` or `tiered`.
2045
+ * Describes how to compute the price per period. Either `per_unit`, `tiered_graduated` or `tiered_volume`.
1856
2046
  * - `per_unit` indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity
1857
- * - `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the tiers and tiers_mode attributes.
2047
+ * - `tiered_graduated` indicates that the unit pricing will be computed using tiers attribute. The customer pays the price per unit in every range their purchase rises through.
2048
+ * - `tiered_volume` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.
2049
+ * - `tiered_flatfee` While similar to tiered_volume, tiered flat fee charges for the same price (flat) for the entire range instead using the unit price to multiply the quantity.
1858
2050
  *
1859
- * ⚠️ Tiered pricing is **not supported** yet.
2051
+ */
2052
+ pricing_model: "per_unit" | "tiered_graduated" | "tiered_volume" | "tiered_flatfee";
2053
+ /**
2054
+ * Defines an array of tiers. Each tier has an upper bound, an unit amount and a flat fee.
1860
2055
  *
1861
2056
  */
1862
- billing_scheme?: "per_unit";
2057
+ tiers?: PriceTier[];
1863
2058
  /**
1864
2059
  * A brief description of the price.
1865
2060
  */
1866
2061
  description?: string;
2062
+ /**
2063
+ * A detailed description of the price. This is shown on the order document and order table.
2064
+ */
2065
+ long_description?: string;
1867
2066
  /**
1868
2067
  * The default tax rate applicable to the product.
1869
2068
  * This field is deprecated, use the new `tax` attribute.
@@ -1887,7 +2086,6 @@ declare namespace Components {
1887
2086
  * "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
1888
2087
  * "type": "VAT",
1889
2088
  * "description": "Tax description",
1890
- * "behavior": "Exclusive",
1891
2089
  * "active": "true",
1892
2090
  * "region": "DE",
1893
2091
  * "region_label": "Germany",
@@ -1903,15 +2101,9 @@ declare namespace Components {
1903
2101
  */
1904
2102
  Tax[];
1905
2103
  /**
1906
- * Specifies whether the price is considered `inclusive` of taxes or `exclusive` of taxes.
1907
- * One of `inclusive`, `exclusive`, or `unspecified`.
1908
- *
2104
+ * Specifies whether the price is considered `inclusive` of taxes or not.
1909
2105
  */
1910
- tax_behavior?: "inclusive" | "exclusive";
1911
- /**
1912
- * Defines the tiered pricing type of the price.
1913
- */
1914
- tiers_mode?: "standard";
2106
+ is_tax_inclusive?: boolean;
1915
2107
  /**
1916
2108
  * One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.
1917
2109
  */
@@ -1982,7 +2174,7 @@ declare namespace Components {
1982
2174
  /**
1983
2175
  * The unit of measurement used for display purposes and possibly for calculations when the price is variable.
1984
2176
  */
1985
- unit?: /* The unit of measurement used for display purposes and possibly for calculations when the price is variable. */ ("kw" | "kwh" | "m" | "m2" | "l") | string;
2177
+ unit?: /* The unit of measurement used for display purposes and possibly for calculations when the price is variable. */ ("kw" | "kwh" | "m" | "m2" | "l" | "cubic-meter" | "cubic-meter-h" | "ls" | "a" | "kva" | "w" | "wp" | "kwp") | string;
1986
2178
  /**
1987
2179
  * The price creation date
1988
2180
  */
@@ -2030,7 +2222,16 @@ declare namespace Components {
2030
2222
  /**
2031
2223
  * A valid set of product prices, quantities, (discounts) and taxes from a client.
2032
2224
  */
2033
- export type PriceItemsDto = (/* Represents a price input to the pricing library. */ PriceItemDto)[];
2225
+ export type PriceItemsDto = (/* Represents a price input to the pricing library. */ PriceItemDto | /* Represents a composite price input to the pricing library. */ CompositePriceItemDto)[];
2226
+ export interface PriceTier {
2227
+ up_to?: number | null;
2228
+ flat_fee_amount?: number;
2229
+ flat_fee_amount_decimal?: string;
2230
+ unit_amount?: number;
2231
+ unit_amount_decimal?: string;
2232
+ display_mode?: PriceTierDisplayMode;
2233
+ }
2234
+ export type PriceTierDisplayMode = "hidden" | "on_request";
2034
2235
  /**
2035
2236
  * The result from the calculation of a set of price items.
2036
2237
  */
@@ -2042,7 +2243,14 @@ declare namespace Components {
2042
2243
  * "$ref": "#/components/examples/price-item"
2043
2244
  * }
2044
2245
  */
2045
- PriceItem)[];
2246
+ PriceItem | /**
2247
+ * Represents a composite price input to the pricing library.
2248
+ * example:
2249
+ * {
2250
+ * "$ref": "#/components/examples/price-item"
2251
+ * }
2252
+ */
2253
+ CompositePriceItem)[];
2046
2254
  /**
2047
2255
  * Total of all items before (discounts or) taxes are applied.
2048
2256
  */
@@ -2198,7 +2406,6 @@ declare namespace Components {
2198
2406
  * "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
2199
2407
  * "type": "VAT",
2200
2408
  * "description": "Tax description",
2201
- * "behavior": "Exclusive",
2202
2409
  * "active": "true",
2203
2410
  * "region": "DE",
2204
2411
  * "region_label": "Germany",
@@ -2230,7 +2437,6 @@ declare namespace Components {
2230
2437
  type: "VAT" | "GST" | "Custom";
2231
2438
  description?: string;
2232
2439
  rate: number;
2233
- behavior: "Exclusive" | "Inclusive" | "exclusive" | "inclusive";
2234
2440
  active?: boolean;
2235
2441
  region?: string;
2236
2442
  region_label?: string;
@@ -2265,7 +2471,6 @@ declare namespace Components {
2265
2471
  * "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
2266
2472
  * "type": "VAT",
2267
2473
  * "description": "Tax description",
2268
- * "behavior": "Exclusive",
2269
2474
  * "active": "true",
2270
2475
  * "region": "DE",
2271
2476
  * "region_label": "Germany",
@@ -2316,7 +2521,6 @@ declare namespace Components {
2316
2521
  * "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
2317
2522
  * "type": "VAT",
2318
2523
  * "description": "Tax description",
2319
- * "behavior": "Exclusive",
2320
2524
  * "active": "true",
2321
2525
  * "region": "DE",
2322
2526
  * "region_label": "Germany",
@@ -2363,6 +2567,45 @@ declare namespace Components {
2363
2567
  recurrences?: (/* An amount associated with a specific recurrence. */ RecurrenceAmount)[];
2364
2568
  };
2365
2569
  }
2570
+ /**
2571
+ * The availability rule error
2572
+ */
2573
+ export interface ValidateAvailabilityFileError {
2574
+ /**
2575
+ * The line number where the error was found
2576
+ */
2577
+ line?: number;
2578
+ /**
2579
+ * The error message
2580
+ */
2581
+ msg: string;
2582
+ }
2583
+ /**
2584
+ * The availability map file result payload
2585
+ * example:
2586
+ * {
2587
+ * "rules_parsed_count": 8,
2588
+ * "errors": [
2589
+ * "File must be UTF-8 encoded",
2590
+ * "Error on line 3 - street_number must be of type number",
2591
+ * "Error on line 6 - start_date cant be greater than end_date"
2592
+ * ]
2593
+ * }
2594
+ */
2595
+ export interface ValidateAvailabilityFileResult {
2596
+ /**
2597
+ * The status of the validation
2598
+ */
2599
+ status: "success" | "error";
2600
+ /**
2601
+ * The number of rules successfully parsed
2602
+ */
2603
+ rules_parsed_count: number;
2604
+ /**
2605
+ * The errors found on the file
2606
+ */
2607
+ errors: /* The availability rule error */ ValidateAvailabilityFileError[];
2608
+ }
2366
2609
  }
2367
2610
  }
2368
2611
  declare namespace Paths {
@@ -2487,6 +2730,34 @@ declare namespace Paths {
2487
2730
  export type $400 = Components.Schemas.Error;
2488
2731
  }
2489
2732
  }
2733
+ namespace $ValidateAvailabilityFile {
2734
+ export interface HeaderParameters {
2735
+ "X-Epilot-Org-ID": Parameters.XEpilotOrgID;
2736
+ }
2737
+ namespace Parameters {
2738
+ export type Id = string;
2739
+ export type XEpilotOrgID = string;
2740
+ }
2741
+ export interface PathParameters {
2742
+ id: Parameters.Id;
2743
+ }
2744
+ namespace Responses {
2745
+ export type $200 = /**
2746
+ * The availability map file result payload
2747
+ * example:
2748
+ * {
2749
+ * "rules_parsed_count": 8,
2750
+ * "errors": [
2751
+ * "File must be UTF-8 encoded",
2752
+ * "Error on line 3 - street_number must be of type number",
2753
+ * "Error on line 6 - start_date cant be greater than end_date"
2754
+ * ]
2755
+ * }
2756
+ */
2757
+ Components.Schemas.ValidateAvailabilityFileResult;
2758
+ export type $400 = Components.Schemas.Error;
2759
+ }
2760
+ }
2490
2761
  namespace CreateOrder {
2491
2762
  export type RequestBody = /* Order Entity Payload */ Components.Schemas.OrderPayload;
2492
2763
  namespace Responses {
@@ -2585,6 +2856,16 @@ export interface OperationMethods {
2585
2856
  data?: Paths.$AvailabilityCheck.RequestBody,
2586
2857
  config?: AxiosRequestConfig
2587
2858
  ): OperationResponse<Paths.$AvailabilityCheck.Responses.$200>
2859
+ /**
2860
+ * $validateAvailabilityFile - validateAvailabilityFile
2861
+ *
2862
+ * Validates an availability file, it returns an array of errors if the file is invalid
2863
+ */
2864
+ '$validateAvailabilityFile'(
2865
+ parameters?: Parameters<Paths.$ValidateAvailabilityFile.PathParameters & Paths.$ValidateAvailabilityFile.HeaderParameters> | null,
2866
+ data?: any,
2867
+ config?: AxiosRequestConfig
2868
+ ): OperationResponse<Paths.$ValidateAvailabilityFile.Responses.$200>
2588
2869
  /**
2589
2870
  * $createOpportunity - createOpportunity
2590
2871
  *
@@ -2673,6 +2954,18 @@ export interface PathsDictionary {
2673
2954
  config?: AxiosRequestConfig
2674
2955
  ): OperationResponse<Paths.$AvailabilityCheck.Responses.$200>
2675
2956
  }
2957
+ ['/v1/validate-availability/{id}']: {
2958
+ /**
2959
+ * $validateAvailabilityFile - validateAvailabilityFile
2960
+ *
2961
+ * Validates an availability file, it returns an array of errors if the file is invalid
2962
+ */
2963
+ 'get'(
2964
+ parameters?: Parameters<Paths.$ValidateAvailabilityFile.PathParameters & Paths.$ValidateAvailabilityFile.HeaderParameters> | null,
2965
+ data?: any,
2966
+ config?: AxiosRequestConfig
2967
+ ): OperationResponse<Paths.$ValidateAvailabilityFile.Responses.$200>
2968
+ }
2676
2969
  ['/v1/public/opportunity']: {
2677
2970
  /**
2678
2971
  * $createOpportunity - createOpportunity