@epilot/pricing-client 3.53.5 → 3.53.7

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.
@@ -5,7 +5,7 @@
5
5
  * These types remain temporarily for backwards compatibility and will be
6
6
  * removed once all dependent code has been migrated.
7
7
  */
8
- import { Address, Amounts, Customer, MetaData, OrderStatus, PriceItems, PriceTier, TotalDetails } from './openapi';
8
+ import type { Address, Amounts, Customer, MetaData, OrderStatus, PriceItems, PriceTier, TotalDetails } from './openapi';
9
9
  export interface AvailabilityDate {
10
10
  /**
11
11
  * The availability interval start date
package/dist/client.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { Client } from './openapi';
1
+ import type { Client } from './openapi';
2
2
  export declare const getClient: () => Client;
3
3
  export declare const createClient: () => Client;
@@ -1 +1 @@
1
- (()=>{"use strict";var e={390:function(e,r,t){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});var n=i(t(466));r.default=n.default},466:e=>{e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"","version":""},"servers":[{"url":"https://pricing-api.sls.epilot.io"}],"paths":{"/v1/pricing:compute":{"post":{"operationId":"$calculatePricingDetails","requestBody":{"required":false,"content":{"application/json":{}}},"responses":{}}},"/v1/order":{"post":{"operationId":"createOrder","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/order/{id}":{"put":{"operationId":"putOrder","parameters":[{"in":"path","name":"id","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/public/cart:checkout":{"post":{"operationId":"$checkoutCart","parameters":[{"in":"header","name":"X-Ivy-Org-ID","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/public/catalog":{"post":{"operationId":"$searchCatalog","parameters":[{"in":"header","name":"X-Ivy-Org-ID"},{"in":"header","name":"Authorization"}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/catalog":{"post":{"operationId":"$privateSearchCatalog","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/public/validate-promo-codes":{"post":{"operationId":"$validatePromoCodes","parameters":[{"in":"header","name":"X-Ivy-Org-ID","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/public/availability:check":{"post":{"operationId":"$availabilityCheck","parameters":[{"in":"header","name":"X-Ivy-Org-ID","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/validate-availability/{id}":{"get":{"operationId":"$validateAvailabilityFile","parameters":[{"in":"path","name":"id","required":true},{"in":"header","name":"X-Epilot-Org-ID","required":true}],"responses":{}}},"/v1/public/historicMarketPrices":{"get":{"operationId":"$historicMarketPrices","parameters":[{"in":"query","name":"market","required":true},{"in":"query","name":"bidding_zone","required":true},{"in":"query","name":"frequency","required":true},{"in":"query","name":"from","required":true},{"in":"query","name":"to","required":true}],"responses":{}}},"/v1/public/averageMarketPrice":{"get":{"operationId":"$averageMarketPrice","parameters":[{"in":"query","name":"market","required":true},{"in":"query","name":"bidding_zone","required":true},{"in":"query","name":"from","required":true},{"in":"query","name":"to","required":true}],"responses":{}}},"/v1/public/integration/{integrationId}/products":{"post":{"operationId":"$searchExternalProducts","parameters":[{"in":"path","name":"integrationId","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/public/integration/{integrationId}/product-recommendations":{"post":{"operationId":"$searchExternalProductRecommendations","parameters":[{"in":"path","name":"integrationId","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/public/integration/{integrationId}/providers:search":{"post":{"operationId":"$searchProviders","parameters":[{"in":"header","name":"X-Epilot-Org-ID","required":true},{"in":"path","name":"integrationId","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/public/integration/{integrationId}/streets:search":{"post":{"operationId":"$searchStreets","parameters":[{"in":"header","name":"X-Epilot-Org-ID","required":true},{"in":"path","name":"integrationId","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/public/integration/{integrationId}/compute-price":{"post":{"operationId":"$computePrice","parameters":[{"in":"header","name":"X-Epilot-Org-ID","required":true},{"in":"path","name":"integrationId","required":true}],"requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/integration/{integrationId}/credentials":{"get":{"operationId":"$getCredentials","parameters":[{"in":"path","name":"integrationId","required":true}],"responses":{}}},"/v1/integration/{integrationId}/credentials:save":{"put":{"operationId":"$saveCredentials","parameters":[{"in":"path","name":"integrationId","required":true}],"requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/integration/{integrationId}/credentials:delete":{"delete":{"operationId":"$deleteCredentials","parameters":[{"in":"path","name":"integrationId","required":true}],"responses":{}}},"/v1/public/external-catalog/products":{"post":{"operationId":"$getExternalCatalogProducts","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/public/external-catalog/product-recommendations":{"post":{"operationId":"$getExternalCatalogProductRecommendations","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/public/product-recommendations":{"post":{"operationId":"$productRecommendations","parameters":[{"in":"header","name":"X-Ivy-Org-ID"}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}}},"components":{}}')}},r={},t=function t(i){var n=r[i];if(void 0!==n)return n.exports;var a=r[i]={exports:{}};return e[i].call(a.exports,a,a.exports,t),a.exports}(390),i=exports;for(var n in t)i[n]=t[n];t.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})();
1
+ (()=>{"use strict";var e={438(e,r,t){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});var a=i(t(466));r.default=a.default},466(e){e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"","version":""},"servers":[{"url":"https://pricing-api.sls.epilot.io"}],"paths":{"/v1/pricing:compute":{"post":{"operationId":"$calculatePricingDetails","requestBody":{"required":false,"content":{"application/json":{}}},"responses":{}}},"/v1/order":{"post":{"operationId":"createOrder","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/order/{id}":{"put":{"operationId":"putOrder","parameters":[{"in":"path","name":"id","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/public/cart:checkout":{"post":{"operationId":"$checkoutCart","parameters":[{"in":"header","name":"X-Ivy-Org-ID","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/public/catalog":{"post":{"operationId":"$searchCatalog","parameters":[{"in":"header","name":"X-Ivy-Org-ID"},{"in":"header","name":"Authorization"}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/catalog":{"post":{"operationId":"$privateSearchCatalog","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/public/validate-promo-codes":{"post":{"operationId":"$validatePromoCodes","parameters":[{"in":"header","name":"X-Ivy-Org-ID","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/public/availability:check":{"post":{"operationId":"$availabilityCheck","parameters":[{"in":"header","name":"X-Ivy-Org-ID","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/validate-availability/{id}":{"get":{"operationId":"$validateAvailabilityFile","parameters":[{"in":"path","name":"id","required":true},{"in":"header","name":"X-Epilot-Org-ID","required":true}],"responses":{}}},"/v1/public/historicMarketPrices":{"get":{"operationId":"$historicMarketPrices","parameters":[{"in":"query","name":"market","required":true},{"in":"query","name":"bidding_zone","required":true},{"in":"query","name":"frequency","required":true},{"in":"query","name":"from","required":true},{"in":"query","name":"to","required":true}],"responses":{}}},"/v1/public/averageMarketPrice":{"get":{"operationId":"$averageMarketPrice","parameters":[{"in":"query","name":"market","required":true},{"in":"query","name":"bidding_zone","required":true},{"in":"query","name":"from","required":true},{"in":"query","name":"to","required":true}],"responses":{}}},"/v1/public/integration/{integrationId}/products":{"post":{"operationId":"$searchExternalProducts","parameters":[{"in":"path","name":"integrationId","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/public/integration/{integrationId}/product-recommendations":{"post":{"operationId":"$searchExternalProductRecommendations","parameters":[{"in":"path","name":"integrationId","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/public/integration/{integrationId}/providers:search":{"post":{"operationId":"$searchProviders","parameters":[{"in":"header","name":"X-Epilot-Org-ID","required":true},{"in":"path","name":"integrationId","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/public/integration/{integrationId}/streets:search":{"post":{"operationId":"$searchStreets","parameters":[{"in":"header","name":"X-Epilot-Org-ID","required":true},{"in":"path","name":"integrationId","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/public/integration/{integrationId}/compute-price":{"post":{"operationId":"$computePrice","parameters":[{"in":"header","name":"X-Epilot-Org-ID","required":true},{"in":"path","name":"integrationId","required":true}],"requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/integration/{integrationId}/credentials":{"get":{"operationId":"$getCredentials","parameters":[{"in":"path","name":"integrationId","required":true}],"responses":{}}},"/v1/integration/{integrationId}/credentials:save":{"put":{"operationId":"$saveCredentials","parameters":[{"in":"path","name":"integrationId","required":true}],"requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/integration/{integrationId}/credentials:delete":{"delete":{"operationId":"$deleteCredentials","parameters":[{"in":"path","name":"integrationId","required":true}],"responses":{}}},"/v1/public/external-catalog/products":{"post":{"operationId":"$getExternalCatalogProducts","parameters":[{"in":"header","name":"x-epilot-org-id","required":false}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/public/external-catalog/product-recommendations":{"post":{"operationId":"$getExternalCatalogProductRecommendations","parameters":[{"in":"header","name":"x-epilot-org-id","required":false}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/public/product-recommendations":{"post":{"operationId":"$productRecommendations","parameters":[{"in":"header","name":"X-Ivy-Org-ID"}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}}},"components":{}}')}},r={},t=function t(i){var a=r[i];if(void 0!==a)return a.exports;var n=r[i]={exports:{}};return e[i].call(n.exports,n,n.exports,t),n.exports}(438),i=exports;for(var a in t)i[a]=t[a];t.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})();
@@ -379,6 +379,13 @@
379
379
  "/v1/public/external-catalog/products": {
380
380
  "post": {
381
381
  "operationId": "$getExternalCatalogProducts",
382
+ "parameters": [
383
+ {
384
+ "in": "header",
385
+ "name": "x-epilot-org-id",
386
+ "required": false
387
+ }
388
+ ],
382
389
  "requestBody": {
383
390
  "required": true,
384
391
  "content": {
@@ -391,6 +398,13 @@
391
398
  "/v1/public/external-catalog/product-recommendations": {
392
399
  "post": {
393
400
  "operationId": "$getExternalCatalogProductRecommendations",
401
+ "parameters": [
402
+ {
403
+ "in": "header",
404
+ "name": "x-epilot-org-id",
405
+ "required": false
406
+ }
407
+ ],
394
408
  "requestBody": {
395
409
  "required": true,
396
410
  "content": {
package/dist/openapi.d.ts CHANGED
@@ -1,5 +1,3 @@
1
- /* eslint-disable */
2
-
3
1
  import type {
4
2
  OpenAPIClient,
5
3
  Parameters,
@@ -6606,17 +6604,19 @@ declare namespace Components {
6606
6604
  */
6607
6605
  description?: string;
6608
6606
  /**
6609
- * Billing Account relation ID
6607
+ * Billing Account relation
6610
6608
  */
6611
- billing_account?: string;
6609
+ billing_account?: {
6610
+ [key: string]: any;
6611
+ };
6612
6612
  /**
6613
6613
  * Account Number
6614
6614
  */
6615
6615
  account_number?: string;
6616
6616
  /**
6617
- * Branch/commodity type
6617
+ * Branch/commodity type (e.g. power, gas, water, waste_water, district_heating, or any custom value)
6618
6618
  */
6619
- branch?: "power" | "gas" | "water" | "waste_water" | "district_heating";
6619
+ branch?: string;
6620
6620
  /**
6621
6621
  * Move In Date
6622
6622
  */
@@ -6636,7 +6636,7 @@ declare namespace Components {
6636
6636
  */
6637
6637
  delivery_address?: {
6638
6638
  [key: string]: any;
6639
- };
6639
+ }[];
6640
6640
  /**
6641
6641
  * Additional Addresses
6642
6642
  */
@@ -6662,7 +6662,9 @@ declare namespace Components {
6662
6662
  /**
6663
6663
  * Customer relation (contact or account)
6664
6664
  */
6665
- customer?: string[];
6665
+ customer?: {
6666
+ [key: string]: any;
6667
+ };
6666
6668
  /**
6667
6669
  * Order relation ID
6668
6670
  */
@@ -6711,28 +6713,21 @@ declare namespace Components {
6711
6713
  * Billing Due Day
6712
6714
  */
6713
6715
  billing_due_day?: number;
6714
- /**
6715
- * Installment Amount
6716
- */
6717
- installment_amount?: {
6718
- value?: number;
6719
- currency?: string;
6720
- };
6716
+ installment_amount?: number;
6721
6717
  /**
6722
6718
  * Balance
6723
6719
  */
6724
- balance?: {
6725
- value?: number;
6726
- currency?: string;
6727
- };
6720
+ balance?: number;
6728
6721
  /**
6729
6722
  * Meters relation
6730
6723
  */
6731
6724
  meters?: string[];
6732
6725
  /**
6733
- * Payment Details relation ID
6726
+ * Payment Details relation
6734
6727
  */
6735
- payment?: string;
6728
+ payment?: {
6729
+ [key: string]: any;
6730
+ };
6736
6731
  /**
6737
6732
  * Last Sync At
6738
6733
  */
@@ -6866,6 +6861,54 @@ declare namespace Components {
6866
6861
  */
6867
6862
  external_id?: string;
6868
6863
  };
6864
+ /**
6865
+ * Address to use for product availability checks. Include when the catalog should filter products by serviceable area (e.g. postal code coverage).
6866
+ *
6867
+ */
6868
+ availability_address?: {
6869
+ /**
6870
+ * Postal Code
6871
+ */
6872
+ postal_code?: string;
6873
+ /**
6874
+ * City
6875
+ */
6876
+ city?: string;
6877
+ /**
6878
+ * Street
6879
+ */
6880
+ street?: string;
6881
+ /**
6882
+ * Street Number
6883
+ */
6884
+ street_number?: string;
6885
+ /**
6886
+ * The journey target block of the availability address <step_index>/<block_name>
6887
+ */
6888
+ journey_target_block?: string;
6889
+ };
6890
+ /**
6891
+ * Variable inputs (e.g. energy or water consumption) extracted/provided by the portal so the external catalog service can compute amounts for variable prices.
6892
+ *
6893
+ */
6894
+ variable_inputs?: {
6895
+ /**
6896
+ * The value of the variable input
6897
+ */
6898
+ value?: number;
6899
+ /**
6900
+ * The unit of the variable input
6901
+ */
6902
+ unit?: string;
6903
+ /**
6904
+ * The frequency unit of the variable input
6905
+ */
6906
+ frequency_unit?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly" | "one_time";
6907
+ /**
6908
+ * The journey target block of the variable input <step_index>/<block_name>
6909
+ */
6910
+ journey_target_block?: string;
6911
+ }[];
6869
6912
  }
6870
6913
  /**
6871
6914
  * The meter type for power
@@ -10064,6 +10107,12 @@ declare namespace Paths {
10064
10107
  }
10065
10108
  }
10066
10109
  namespace $GetExternalCatalogProductRecommendations {
10110
+ export interface HeaderParameters {
10111
+ "x-epilot-org-id"?: Parameters.XEpilotOrgId;
10112
+ }
10113
+ namespace Parameters {
10114
+ export type XEpilotOrgId = string;
10115
+ }
10067
10116
  export type RequestBody = /**
10068
10117
  * The request payload for the external catalog service.
10069
10118
  * example:
@@ -10114,6 +10163,12 @@ declare namespace Paths {
10114
10163
  }
10115
10164
  }
10116
10165
  namespace $GetExternalCatalogProducts {
10166
+ export interface HeaderParameters {
10167
+ "x-epilot-org-id"?: Parameters.XEpilotOrgId;
10168
+ }
10169
+ namespace Parameters {
10170
+ export type XEpilotOrgId = string;
10171
+ }
10117
10172
  export type RequestBody = /**
10118
10173
  * The request payload for the external catalog service.
10119
10174
  * example:
@@ -11751,7 +11806,7 @@ export interface OperationMethods {
11751
11806
  * Returns the list of available external catalog products with computed prices based on a given context
11752
11807
  */
11753
11808
  '$getExternalCatalogProducts'(
11754
- parameters?: Parameters<UnknownParamsObject> | null,
11809
+ parameters?: Parameters<Paths.$GetExternalCatalogProducts.HeaderParameters> | null,
11755
11810
  data?: Paths.$GetExternalCatalogProducts.RequestBody,
11756
11811
  config?: AxiosRequestConfig
11757
11812
  ): OperationResponse<Paths.$GetExternalCatalogProducts.Responses.$200>
@@ -11761,7 +11816,7 @@ export interface OperationMethods {
11761
11816
  * Returns the list of available external catalog products recommendations based on a given context
11762
11817
  */
11763
11818
  '$getExternalCatalogProductRecommendations'(
11764
- parameters?: Parameters<UnknownParamsObject> | null,
11819
+ parameters?: Parameters<Paths.$GetExternalCatalogProductRecommendations.HeaderParameters> | null,
11765
11820
  data?: Paths.$GetExternalCatalogProductRecommendations.RequestBody,
11766
11821
  config?: AxiosRequestConfig
11767
11822
  ): OperationResponse<Paths.$GetExternalCatalogProductRecommendations.Responses.$200>
@@ -12024,7 +12079,7 @@ export interface PathsDictionary {
12024
12079
  * Returns the list of available external catalog products with computed prices based on a given context
12025
12080
  */
12026
12081
  'post'(
12027
- parameters?: Parameters<UnknownParamsObject> | null,
12082
+ parameters?: Parameters<Paths.$GetExternalCatalogProducts.HeaderParameters> | null,
12028
12083
  data?: Paths.$GetExternalCatalogProducts.RequestBody,
12029
12084
  config?: AxiosRequestConfig
12030
12085
  ): OperationResponse<Paths.$GetExternalCatalogProducts.Responses.$200>
@@ -12036,7 +12091,7 @@ export interface PathsDictionary {
12036
12091
  * Returns the list of available external catalog products recommendations based on a given context
12037
12092
  */
12038
12093
  'post'(
12039
- parameters?: Parameters<UnknownParamsObject> | null,
12094
+ parameters?: Parameters<Paths.$GetExternalCatalogProductRecommendations.HeaderParameters> | null,
12040
12095
  data?: Paths.$GetExternalCatalogProductRecommendations.RequestBody,
12041
12096
  config?: AxiosRequestConfig
12042
12097
  ): OperationResponse<Paths.$GetExternalCatalogProductRecommendations.Responses.$200>
package/dist/openapi.json CHANGED
@@ -2036,7 +2036,6 @@
2036
2036
  "unit_amount_gross_decimal": "25",
2037
2037
  "unit_amount_net": 25,
2038
2038
  "unit_amount_net_decimal": "25",
2039
- "billing_period": null,
2040
2039
  "type": "one_time",
2041
2040
  "taxes": [],
2042
2041
  "pricing_model": "per_unit",
@@ -2109,20 +2108,22 @@
2109
2108
  "amount_subtotal_decimal": "25",
2110
2109
  "amount_subtotal": 2500,
2111
2110
  "unit_amount": 25,
2112
- "unit_amount_gross": 29.75,
2111
+ "unit_amount_gross": 2975,
2113
2112
  "unit_amount_gross_decimal": "29.75",
2114
2113
  "unit_amount_net": 25,
2115
2114
  "unit_amount_net_decimal": "25",
2116
- "billing_period": null,
2117
2115
  "type": "one_time",
2118
2116
  "taxes": [
2119
2117
  {
2120
2118
  "tax": {
2121
- "_id": "tax-vat-19",
2122
- "name": "VAT",
2119
+ "_id": "24641e82-0690-4135-8b43-ef12a9b1c5dc",
2120
+ "_title": "VAT 19%",
2121
+ "_org": "728",
2122
+ "_schema": "tax",
2123
+ "_created_at": "2024-01-01T00:00:00.000Z",
2124
+ "_updated_at": "2024-01-01T00:00:00.000Z",
2123
2125
  "type": "VAT",
2124
- "rate": 19,
2125
- "region": "DE"
2126
+ "rate": 19
2126
2127
  },
2127
2128
  "amount": 475
2128
2129
  }
@@ -2140,15 +2141,16 @@
2140
2141
  "is_composite_price": false,
2141
2142
  "pricing_model": "per_unit",
2142
2143
  "price_display_in_journeys": "show_price",
2143
- "tax": [
2144
- {
2145
- "_id": "tax-vat-19",
2146
- "name": "VAT",
2147
- "type": "VAT",
2148
- "rate": 19,
2149
- "region": "DE"
2150
- }
2151
- ]
2144
+ "tax": {
2145
+ "_id": "24641e82-0690-4135-8b43-ef12a9b1c5dc",
2146
+ "_title": "VAT 19%",
2147
+ "_org": "728",
2148
+ "_schema": "tax",
2149
+ "_created_at": "2024-01-01T00:00:00.000Z",
2150
+ "_updated_at": "2024-01-01T00:00:00.000Z",
2151
+ "type": "VAT",
2152
+ "rate": 19
2153
+ }
2152
2154
  },
2153
2155
  "_product": {
2154
2156
  "_id": "product-93f857a4",
@@ -2168,11 +2170,14 @@
2168
2170
  "taxes": [
2169
2171
  {
2170
2172
  "tax": {
2171
- "_id": "tax-vat-19",
2172
- "name": "VAT",
2173
+ "_id": "24641e82-0690-4135-8b43-ef12a9b1c5dc",
2174
+ "_title": "VAT 19%",
2175
+ "_org": "728",
2176
+ "_schema": "tax",
2177
+ "_created_at": "2024-01-01T00:00:00.000Z",
2178
+ "_updated_at": "2024-01-01T00:00:00.000Z",
2173
2179
  "type": "VAT",
2174
- "rate": 19,
2175
- "region": "DE"
2180
+ "rate": 19
2176
2181
  },
2177
2182
  "amount": 475
2178
2183
  }
@@ -2722,6 +2727,17 @@
2722
2727
  "tags": [
2723
2728
  "External Catalog API"
2724
2729
  ],
2730
+ "parameters": [
2731
+ {
2732
+ "in": "header",
2733
+ "name": "x-epilot-org-id",
2734
+ "schema": {
2735
+ "type": "string"
2736
+ },
2737
+ "required": false,
2738
+ "description": "Organization ID (required when not using EpilotPublicAuth token)"
2739
+ }
2740
+ ],
2725
2741
  "requestBody": {
2726
2742
  "required": true,
2727
2743
  "content": {
@@ -2872,6 +2888,17 @@
2872
2888
  "tags": [
2873
2889
  "External Catalog API"
2874
2890
  ],
2891
+ "parameters": [
2892
+ {
2893
+ "in": "header",
2894
+ "name": "x-epilot-org-id",
2895
+ "schema": {
2896
+ "type": "string"
2897
+ },
2898
+ "required": false,
2899
+ "description": "Organization ID (required when not using EpilotPublicAuth token)"
2900
+ }
2901
+ ],
2875
2902
  "requestBody": {
2876
2903
  "required": true,
2877
2904
  "content": {
@@ -3003,7 +3030,6 @@
3003
3030
  "unit_amount_gross_decimal": "25",
3004
3031
  "unit_amount_net": 25,
3005
3032
  "unit_amount_net_decimal": "25",
3006
- "billing_period": null,
3007
3033
  "type": "one_time",
3008
3034
  "taxes": [],
3009
3035
  "pricing_model": "per_unit",
@@ -3076,20 +3102,22 @@
3076
3102
  "amount_subtotal_decimal": "25",
3077
3103
  "amount_subtotal": 2500,
3078
3104
  "unit_amount": 25,
3079
- "unit_amount_gross": 29.75,
3105
+ "unit_amount_gross": 2975,
3080
3106
  "unit_amount_gross_decimal": "29.75",
3081
3107
  "unit_amount_net": 25,
3082
3108
  "unit_amount_net_decimal": "25",
3083
- "billing_period": null,
3084
3109
  "type": "one_time",
3085
3110
  "taxes": [
3086
3111
  {
3087
3112
  "tax": {
3088
- "_id": "tax-vat-19",
3089
- "name": "VAT",
3113
+ "_id": "24641e82-0690-4135-8b43-ef12a9b1c5dc",
3114
+ "_title": "VAT 19%",
3115
+ "_org": "728",
3116
+ "_schema": "tax",
3117
+ "_created_at": "2024-01-01T00:00:00.000Z",
3118
+ "_updated_at": "2024-01-01T00:00:00.000Z",
3090
3119
  "type": "VAT",
3091
- "rate": 19,
3092
- "region": "DE"
3120
+ "rate": 19
3093
3121
  },
3094
3122
  "amount": 475
3095
3123
  }
@@ -3107,15 +3135,16 @@
3107
3135
  "is_composite_price": false,
3108
3136
  "pricing_model": "per_unit",
3109
3137
  "price_display_in_journeys": "show_price",
3110
- "tax": [
3111
- {
3112
- "_id": "tax-vat-19",
3113
- "name": "VAT",
3114
- "type": "VAT",
3115
- "rate": 19,
3116
- "region": "DE"
3117
- }
3118
- ]
3138
+ "tax": {
3139
+ "_id": "24641e82-0690-4135-8b43-ef12a9b1c5dc",
3140
+ "_title": "VAT 19%",
3141
+ "_org": "728",
3142
+ "_schema": "tax",
3143
+ "_created_at": "2024-01-01T00:00:00.000Z",
3144
+ "_updated_at": "2024-01-01T00:00:00.000Z",
3145
+ "type": "VAT",
3146
+ "rate": 19
3147
+ }
3119
3148
  },
3120
3149
  "_product": {
3121
3150
  "_id": "product-93f857a4",
@@ -3135,11 +3164,14 @@
3135
3164
  "taxes": [
3136
3165
  {
3137
3166
  "tax": {
3138
- "_id": "tax-vat-19",
3139
- "name": "VAT",
3167
+ "_id": "24641e82-0690-4135-8b43-ef12a9b1c5dc",
3168
+ "_title": "VAT 19%",
3169
+ "_org": "728",
3170
+ "_schema": "tax",
3171
+ "_created_at": "2024-01-01T00:00:00.000Z",
3172
+ "_updated_at": "2024-01-01T00:00:00.000Z",
3140
3173
  "type": "VAT",
3141
- "rate": 19,
3142
- "region": "DE"
3174
+ "rate": 19
3143
3175
  },
3144
3176
  "amount": 475
3145
3177
  }
@@ -9112,8 +9144,8 @@
9112
9144
  "description": "Description of the contract"
9113
9145
  },
9114
9146
  "billing_account": {
9115
- "type": "string",
9116
- "description": "Billing Account relation ID"
9147
+ "type": "object",
9148
+ "description": "Billing Account relation"
9117
9149
  },
9118
9150
  "account_number": {
9119
9151
  "type": "string",
@@ -9121,14 +9153,7 @@
9121
9153
  },
9122
9154
  "branch": {
9123
9155
  "type": "string",
9124
- "description": "Branch/commodity type",
9125
- "enum": [
9126
- "power",
9127
- "gas",
9128
- "water",
9129
- "waste_water",
9130
- "district_heating"
9131
- ]
9156
+ "description": "Branch/commodity type (e.g. power, gas, water, waste_water, district_heating, or any custom value)"
9132
9157
  },
9133
9158
  "move_in_date": {
9134
9159
  "type": "string",
@@ -9141,12 +9166,15 @@
9141
9166
  "description": "Move Out Date"
9142
9167
  },
9143
9168
  "billing_address": {
9144
- "type": "object",
9145
- "description": "Billing Address"
9169
+ "description": "Billing Address",
9170
+ "type": "object"
9146
9171
  },
9147
9172
  "delivery_address": {
9148
- "type": "object",
9149
- "description": "Delivery Address"
9173
+ "description": "Delivery Address",
9174
+ "type": "array",
9175
+ "items": {
9176
+ "type": "object"
9177
+ }
9150
9178
  },
9151
9179
  "additional_addresses": {
9152
9180
  "type": "array",
@@ -9175,11 +9203,8 @@
9175
9203
  "description": "End Date"
9176
9204
  },
9177
9205
  "customer": {
9178
- "type": "array",
9179
- "description": "Customer relation (contact or account)",
9180
- "items": {
9181
- "type": "string"
9182
- }
9206
+ "type": "object",
9207
+ "description": "Customer relation (contact or account)"
9183
9208
  },
9184
9209
  "order": {
9185
9210
  "type": "string",
@@ -9265,30 +9290,11 @@
9265
9290
  "description": "Billing Due Day"
9266
9291
  },
9267
9292
  "installment_amount": {
9268
- "type": "object",
9269
- "description": "Installment Amount",
9270
- "properties": {
9271
- "value": {
9272
- "type": "number"
9273
- },
9274
- "currency": {
9275
- "type": "string",
9276
- "default": "EUR"
9277
- }
9278
- }
9293
+ "type": "number"
9279
9294
  },
9280
9295
  "balance": {
9281
- "type": "object",
9282
- "description": "Balance",
9283
- "properties": {
9284
- "value": {
9285
- "type": "number"
9286
- },
9287
- "currency": {
9288
- "type": "string",
9289
- "default": "EUR"
9290
- }
9291
- }
9296
+ "type": "number",
9297
+ "description": "Balance"
9292
9298
  },
9293
9299
  "meters": {
9294
9300
  "type": "array",
@@ -9298,8 +9304,8 @@
9298
9304
  }
9299
9305
  },
9300
9306
  "payment": {
9301
- "type": "string",
9302
- "description": "Payment Details relation ID"
9307
+ "type": "object",
9308
+ "description": "Payment Details relation"
9303
9309
  },
9304
9310
  "last_sync_at": {
9305
9311
  "type": "string",
@@ -9507,6 +9513,65 @@
9507
9513
  "readOnly": true
9508
9514
  }
9509
9515
  }
9516
+ },
9517
+ "availability_address": {
9518
+ "type": "object",
9519
+ "description": "Address to use for product availability checks. Include when the catalog should filter products by serviceable area (e.g. postal code coverage).\n",
9520
+ "properties": {
9521
+ "postal_code": {
9522
+ "type": "string",
9523
+ "description": "Postal Code"
9524
+ },
9525
+ "city": {
9526
+ "type": "string",
9527
+ "description": "City"
9528
+ },
9529
+ "street": {
9530
+ "type": "string",
9531
+ "description": "Street"
9532
+ },
9533
+ "street_number": {
9534
+ "type": "string",
9535
+ "description": "Street Number"
9536
+ },
9537
+ "journey_target_block": {
9538
+ "type": "string",
9539
+ "description": "The journey target block of the availability address <step_index>/<block_name>"
9540
+ }
9541
+ }
9542
+ },
9543
+ "variable_inputs": {
9544
+ "type": "array",
9545
+ "description": "Variable inputs (e.g. energy or water consumption) extracted/provided by the portal so the external catalog service can compute amounts for variable prices.\n",
9546
+ "items": {
9547
+ "type": "object",
9548
+ "properties": {
9549
+ "value": {
9550
+ "type": "number",
9551
+ "description": "The value of the variable input"
9552
+ },
9553
+ "unit": {
9554
+ "type": "string",
9555
+ "description": "The unit of the variable input"
9556
+ },
9557
+ "frequency_unit": {
9558
+ "type": "string",
9559
+ "description": "The frequency unit of the variable input",
9560
+ "enum": [
9561
+ "weekly",
9562
+ "monthly",
9563
+ "every_quarter",
9564
+ "every_6_months",
9565
+ "yearly",
9566
+ "one_time"
9567
+ ]
9568
+ },
9569
+ "journey_target_block": {
9570
+ "type": "string",
9571
+ "description": "The journey target block of the variable input <step_index>/<block_name>"
9572
+ }
9573
+ }
9574
+ }
9510
9575
  }
9511
9576
  },
9512
9577
  "required": [
@@ -9858,6 +9923,11 @@
9858
9923
  {
9859
9924
  "tax": {
9860
9925
  "_id": "936db2a1-3748-45b6-bb9d-04943280ceeb",
9926
+ "_title": "VAT 23%",
9927
+ "_org": "728",
9928
+ "_schema": "tax",
9929
+ "_created_at": "2021-09-24T15:06:13.859Z",
9930
+ "_updated_at": "2021-09-24T15:06:13.859Z",
9861
9931
  "type": "VAT",
9862
9932
  "rate": 23
9863
9933
  },
@@ -9866,6 +9936,11 @@
9866
9936
  {
9867
9937
  "tax": {
9868
9938
  "_id": "936db2a1-3748-45b6-bb9d-04943280cee4",
9939
+ "_title": "VAT 7%",
9940
+ "_org": "728",
9941
+ "_schema": "tax",
9942
+ "_created_at": "2021-09-24T15:06:13.859Z",
9943
+ "_updated_at": "2021-09-24T15:06:13.859Z",
9869
9944
  "type": "VAT",
9870
9945
  "rate": 7
9871
9946
  },
package/package.json CHANGED
@@ -1,12 +1,15 @@
1
1
  {
2
2
  "name": "@epilot/pricing-client",
3
- "version": "3.53.5",
3
+ "version": "3.53.7",
4
4
  "description": "Client for epilot Pricing APIs",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "author": "epilot GmbH",
8
8
  "license": "MIT",
9
9
  "private": false,
10
+ "publishConfig": {
11
+ "access": "public"
12
+ },
10
13
  "repository": {
11
14
  "type": "git",
12
15
  "url": "git+https://github.com/epilot-dev/sdk-js.git",
@@ -22,16 +25,16 @@
22
25
  "pricing"
23
26
  ],
24
27
  "scripts": {
25
- "test": "jest",
28
+ "test": "vitest",
26
29
  "bundle-definition": "webpack",
27
30
  "openapi": "node ../../scripts/update-openapi.js https://docs.api.epilot.io/pricing-api.yaml",
28
31
  "openapi:local": "node ../../scripts/update-openapi.js ../../../pricing-api/lambda/ApiHandlerFunction/openapi.yml",
29
- "typegen": "openapi typegen src/openapi.json --client -b '/* eslint-disable */' > src/openapi.d.ts",
32
+ "typegen": "openapi typegen src/openapi.json --client > src/openapi.d.ts",
30
33
  "build": "tsc && npm run build:patch && npm run bundle-definition",
31
34
  "build:patch": "sed -i'' -e '/^__exportStar.*openapi.*$/d' dist/index.js",
32
35
  "build:watch": "npm run build && tsc -w",
33
36
  "prepublishOnly": "npm run typegen && npm run build",
34
- "lint": "pnpm exec eslint src"
37
+ "lint": "biome check src"
35
38
  },
36
39
  "files": [
37
40
  "*.js",
@@ -59,13 +62,10 @@
59
62
  "util": "^0.12.3"
60
63
  },
61
64
  "devDependencies": {
62
- "@types/jest": "^26.0.20",
63
65
  "axios": "^1.11.0",
64
66
  "copy-webpack-plugin": "^7.0.0",
65
- "jest": "^29.6.2",
66
67
  "json-loader": "^0.5.7",
67
- "openapicmd": "^2.7.0",
68
- "ts-jest": "^29.4.1",
68
+ "openapicmd": "^2.9.2",
69
69
  "ts-loader": "^8.0.14",
70
70
  "ts-node": "^10.9.1",
71
71
  "typescript": "^4.1.3",