@epilot/pricing-client 3.41.0 → 3.43.0-alpha.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.
@@ -1 +1 @@
1
- (()=>{"use strict";var e={914: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 a=i(t(240));r.default=a.default},240: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/integration/{integrationId}/external-catalog":{"post":{"operationId":"$searchExternalCatalog","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":{}}}},"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}(914),i=exports;for(var a in t)i[a]=t[a];t.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})();
1
+ (()=>{"use strict";var e={914: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 a=i(t(240));r.default=a.default},240: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":"from","required":true},{"in":"query","name":"to","required":true},{"in":"query","name":"frequency","required":true}],"responses":{}}},"/v1/public/averageMarketPrice":{"get":{"operationId":"$averageMarketPrice","parameters":[{"in":"query","name":"market","required":true},{"in":"query","name":"interval","required":true}],"responses":{}}},"/v1/public/integration/{integrationId}/external-catalog":{"post":{"operationId":"$searchExternalCatalog","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":{}}}},"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}(914),i=exports;for(var a in t)i[a]=t[a];t.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})();
@@ -162,6 +162,52 @@
162
162
  "responses": {}
163
163
  }
164
164
  },
165
+ "/v1/public/historicMarketPrices": {
166
+ "get": {
167
+ "operationId": "$historicMarketPrices",
168
+ "parameters": [
169
+ {
170
+ "in": "query",
171
+ "name": "market",
172
+ "required": true
173
+ },
174
+ {
175
+ "in": "query",
176
+ "name": "from",
177
+ "required": true
178
+ },
179
+ {
180
+ "in": "query",
181
+ "name": "to",
182
+ "required": true
183
+ },
184
+ {
185
+ "in": "query",
186
+ "name": "frequency",
187
+ "required": true
188
+ }
189
+ ],
190
+ "responses": {}
191
+ }
192
+ },
193
+ "/v1/public/averageMarketPrice": {
194
+ "get": {
195
+ "operationId": "$averageMarketPrice",
196
+ "parameters": [
197
+ {
198
+ "in": "query",
199
+ "name": "market",
200
+ "required": true
201
+ },
202
+ {
203
+ "in": "query",
204
+ "name": "interval",
205
+ "required": true
206
+ }
207
+ ],
208
+ "responses": {}
209
+ }
210
+ },
165
211
  "/v1/public/integration/{integrationId}/external-catalog": {
166
212
  "post": {
167
213
  "operationId": "$searchExternalCatalog",
package/dist/openapi.d.ts CHANGED
@@ -2219,9 +2219,17 @@ declare namespace Components {
2219
2219
  */
2220
2220
  static?: /* The computed price components */ ComputedPriceComponents;
2221
2221
  /**
2222
- * The variable price breakdown
2222
+ * The variable price breakdown (day and night)
2223
2223
  */
2224
2224
  variable?: /* The computed price components */ ComputedPriceComponents;
2225
+ /**
2226
+ * The variable price breakdown for the day period
2227
+ */
2228
+ variable_ht?: /* The computed price components */ ComputedPriceComponents;
2229
+ /**
2230
+ * The variable price breakdown for the night period
2231
+ */
2232
+ variable_nt?: /* The computed price components */ ComputedPriceComponents;
2225
2233
  }
2226
2234
  /**
2227
2235
  * The computed price components
@@ -3125,6 +3133,7 @@ declare namespace Components {
3125
3133
  *
3126
3134
  */
3127
3135
  PaymentMethod[];
3136
+ redeemed_promos?: RedeemedPromo[];
3128
3137
  _tags?: string[];
3129
3138
  }
3130
3139
  /**
@@ -4809,6 +4818,46 @@ declare namespace Components {
4809
4818
  [key: string]: any;
4810
4819
  };
4811
4820
  }
4821
+ export interface RedeemedPromo {
4822
+ /**
4823
+ * The promocode inserted by the customer to redeem the promotion
4824
+ */
4825
+ code?: string;
4826
+ /**
4827
+ * The coupons that got redeemed with received the code
4828
+ */
4829
+ coupons?: /**
4830
+ * The coupon configuration
4831
+ * example:
4832
+ * {
4833
+ * "_id": "123e4567-e89b-12d3-a456-426614174000",
4834
+ * "_schema": "coupon",
4835
+ * "_org": "org_12345",
4836
+ * "_created_at": "2024-01-15T10:00:00.000Z",
4837
+ * "_updated_at": "2024-01-20T12:00:00.000Z",
4838
+ * "_title": "Sample Coupon",
4839
+ * "name": "Sample Coupon",
4840
+ * "type": "fixed",
4841
+ * "fixed_value": 555,
4842
+ * "fixed_value_currency": "USD",
4843
+ * "fixed_value_decimal": "5.55",
4844
+ * "active": true,
4845
+ * "prices": {
4846
+ * "$relation": [
4847
+ * {
4848
+ * "entity_id": "abc12345-def6-7890-gh12-ijklmnopqrst",
4849
+ * "_tags": [
4850
+ * "discount",
4851
+ * "special"
4852
+ * ],
4853
+ * "_schema": "price"
4854
+ * }
4855
+ * ]
4856
+ * }
4857
+ * }
4858
+ */
4859
+ CouponWithoutPromoCodes[];
4860
+ }
4812
4861
  export type SalesTax = "nontaxable" | "reduced" | "standard";
4813
4862
  export type SaveIntegrationCredentialsParams = /* The basic auth credentials */ BasicAuthCredentials;
4814
4863
  export interface SearchExternalCatalogParams {
@@ -5153,6 +5202,41 @@ declare namespace Paths {
5153
5202
  export type $400 = Components.Schemas.Error;
5154
5203
  }
5155
5204
  }
5205
+ namespace $AverageMarketPrice {
5206
+ namespace Parameters {
5207
+ export type Interval = "previous_week" | "previous_month" | "previous_year";
5208
+ export type Market = "day_ahead";
5209
+ }
5210
+ export interface QueryParameters {
5211
+ market: Parameters.Market;
5212
+ interval: Parameters.Interval;
5213
+ }
5214
+ namespace Responses {
5215
+ export interface $200 {
5216
+ market?: "day_ahead";
5217
+ interval?: "previous_week" | "previous_month" | "previous_year";
5218
+ price?: {
5219
+ /**
5220
+ * ISO 8601 timestamp of the price record in UTC.
5221
+ */
5222
+ timestamp: string; // date-time
5223
+ /**
5224
+ * Cost in Cents, e.g. 123 for 12,3 Cents = 0.123€.
5225
+ * example:
5226
+ * 123
5227
+ */
5228
+ unit_amount: number;
5229
+ /**
5230
+ * Cost in decimal format, e.g. 0.123€.
5231
+ * example:
5232
+ * 0.123
5233
+ */
5234
+ unit_amount_decimal: string;
5235
+ };
5236
+ }
5237
+ export type $400 = Components.Schemas.Error;
5238
+ }
5239
+ }
5156
5240
  namespace $CalculatePricingDetails {
5157
5241
  export interface RequestBody {
5158
5242
  line_items?: /* A valid set of product prices, quantities, (discounts) and taxes from a client. */ Components.Schemas.PriceItemsDto;
@@ -5219,6 +5303,45 @@ declare namespace Paths {
5219
5303
  export type $404 = Components.Schemas.Error;
5220
5304
  }
5221
5305
  }
5306
+ namespace $HistoricMarketPrices {
5307
+ namespace Parameters {
5308
+ export type Frequency = "hourly" | "daily" | "monthly";
5309
+ export type From = string; // date
5310
+ export type Market = "day_ahead";
5311
+ export type To = string; // date
5312
+ }
5313
+ export interface QueryParameters {
5314
+ market: Parameters.Market;
5315
+ from: Parameters.From /* date */;
5316
+ to: Parameters.To /* date */;
5317
+ frequency: Parameters.Frequency;
5318
+ }
5319
+ namespace Responses {
5320
+ export interface $200 {
5321
+ market?: "day_ahead";
5322
+ frequency?: "hourly" | "daily" | "monthly";
5323
+ prices?: {
5324
+ /**
5325
+ * ISO 8601 timestamp of the price record in UTC.
5326
+ */
5327
+ timestamp: string; // date-time
5328
+ /**
5329
+ * Cost in cents, e.g. 123 for 12,3 Cents = 0.123€.
5330
+ * example:
5331
+ * 123
5332
+ */
5333
+ unit_amount: number;
5334
+ /**
5335
+ * Cost in decimal format, e.g. 0.123€.
5336
+ * example:
5337
+ * 0.123
5338
+ */
5339
+ unit_amount_decimal?: string;
5340
+ }[];
5341
+ }
5342
+ export type $400 = Components.Schemas.Error;
5343
+ }
5344
+ }
5222
5345
  namespace $PrivateSearchCatalog {
5223
5346
  export type RequestBody = /**
5224
5347
  * A catalog search payload
@@ -5388,6 +5511,12 @@ declare namespace Paths {
5388
5511
  }
5389
5512
  }
5390
5513
  namespace $ValidatePromoCodes {
5514
+ export interface HeaderParameters {
5515
+ "X-Ivy-Org-ID": Parameters.XIvyOrgID;
5516
+ }
5517
+ namespace Parameters {
5518
+ export type XIvyOrgID = string;
5519
+ }
5391
5520
  export interface RequestBody {
5392
5521
  /**
5393
5522
  * The list of coupon ids to unlock with promo codes
@@ -5517,7 +5646,7 @@ export interface OperationMethods {
5517
5646
  * Validate a list of promo codes against a list of coupons
5518
5647
  */
5519
5648
  '$validatePromoCodes'(
5520
- parameters?: Parameters<UnknownParamsObject> | null,
5649
+ parameters?: Parameters<Paths.$ValidatePromoCodes.HeaderParameters> | null,
5521
5650
  data?: Paths.$ValidatePromoCodes.RequestBody,
5522
5651
  config?: AxiosRequestConfig
5523
5652
  ): OperationResponse<Paths.$ValidatePromoCodes.Responses.$200>
@@ -5541,6 +5670,28 @@ export interface OperationMethods {
5541
5670
  data?: any,
5542
5671
  config?: AxiosRequestConfig
5543
5672
  ): OperationResponse<Paths.$ValidateAvailabilityFile.Responses.$200>
5673
+ /**
5674
+ * $historicMarketPrices - historicMarketPrices
5675
+ *
5676
+ * BETA: Get historic energy prices in a given time period
5677
+ *
5678
+ */
5679
+ '$historicMarketPrices'(
5680
+ parameters?: Parameters<Paths.$HistoricMarketPrices.QueryParameters> | null,
5681
+ data?: any,
5682
+ config?: AxiosRequestConfig
5683
+ ): OperationResponse<Paths.$HistoricMarketPrices.Responses.$200>
5684
+ /**
5685
+ * $averageMarketPrice - averageMarketPrice
5686
+ *
5687
+ * BETA: Get average energy prices in a given time period
5688
+ *
5689
+ */
5690
+ '$averageMarketPrice'(
5691
+ parameters?: Parameters<Paths.$AverageMarketPrice.QueryParameters> | null,
5692
+ data?: any,
5693
+ config?: AxiosRequestConfig
5694
+ ): OperationResponse<Paths.$AverageMarketPrice.Responses.$200>
5544
5695
  /**
5545
5696
  * $searchExternalCatalog - searchExternalCatalog
5546
5697
  *
@@ -5697,14 +5848,14 @@ export interface PathsDictionary {
5697
5848
  config?: AxiosRequestConfig
5698
5849
  ): OperationResponse<Paths.$PrivateSearchCatalog.Responses.$200>
5699
5850
  }
5700
- ['/v1/validate-promo-codes']: {
5851
+ ['/v1/public/validate-promo-codes']: {
5701
5852
  /**
5702
5853
  * $validatePromoCodes - validatePromoCodes
5703
5854
  *
5704
5855
  * Validate a list of promo codes against a list of coupons
5705
5856
  */
5706
5857
  'post'(
5707
- parameters?: Parameters<UnknownParamsObject> | null,
5858
+ parameters?: Parameters<Paths.$ValidatePromoCodes.HeaderParameters> | null,
5708
5859
  data?: Paths.$ValidatePromoCodes.RequestBody,
5709
5860
  config?: AxiosRequestConfig
5710
5861
  ): OperationResponse<Paths.$ValidatePromoCodes.Responses.$200>
@@ -5733,6 +5884,32 @@ export interface PathsDictionary {
5733
5884
  config?: AxiosRequestConfig
5734
5885
  ): OperationResponse<Paths.$ValidateAvailabilityFile.Responses.$200>
5735
5886
  }
5887
+ ['/v1/public/historicMarketPrices']: {
5888
+ /**
5889
+ * $historicMarketPrices - historicMarketPrices
5890
+ *
5891
+ * BETA: Get historic energy prices in a given time period
5892
+ *
5893
+ */
5894
+ 'get'(
5895
+ parameters?: Parameters<Paths.$HistoricMarketPrices.QueryParameters> | null,
5896
+ data?: any,
5897
+ config?: AxiosRequestConfig
5898
+ ): OperationResponse<Paths.$HistoricMarketPrices.Responses.$200>
5899
+ }
5900
+ ['/v1/public/averageMarketPrice']: {
5901
+ /**
5902
+ * $averageMarketPrice - averageMarketPrice
5903
+ *
5904
+ * BETA: Get average energy prices in a given time period
5905
+ *
5906
+ */
5907
+ 'get'(
5908
+ parameters?: Parameters<Paths.$AverageMarketPrice.QueryParameters> | null,
5909
+ data?: any,
5910
+ config?: AxiosRequestConfig
5911
+ ): OperationResponse<Paths.$AverageMarketPrice.Responses.$200>
5912
+ }
5736
5913
  ['/v1/public/integration/{integrationId}/external-catalog']: {
5737
5914
  /**
5738
5915
  * $searchExternalCatalog - searchExternalCatalog
@@ -5908,6 +6085,7 @@ export type Provider = Components.Schemas.Provider;
5908
6085
  export type RecurrenceAmount = Components.Schemas.RecurrenceAmount;
5909
6086
  export type RecurrenceAmountDto = Components.Schemas.RecurrenceAmountDto;
5910
6087
  export type RecurrenceAmountWithTax = Components.Schemas.RecurrenceAmountWithTax;
6088
+ export type RedeemedPromo = Components.Schemas.RedeemedPromo;
5911
6089
  export type SalesTax = Components.Schemas.SalesTax;
5912
6090
  export type SaveIntegrationCredentialsParams = Components.Schemas.SaveIntegrationCredentialsParams;
5913
6091
  export type SearchExternalCatalogParams = Components.Schemas.SearchExternalCatalogParams;
package/dist/openapi.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "openapi": "3.0.3",
3
3
  "info": {
4
4
  "title": "Pricing API",
5
- "description": "The `pricing-api` hub sets the foundations for the following Pricing APIs:\n\n### Order API\nThis api enables the management of orders in epilot 360, providing features such as:\n - Automatic calculation of totals and price breakdowns for taxes on the Order entity\n - Product and pricing data validation\n\n### Shopping Cart API\nUsed to interact with a cart during a customer's checkout session, providing:\n - An unified data model to model a Shopping Cart\n - Product and pricing data validation\n - Checkout a cart into an order or quote\n\n### Catalog API\nProvides a way to query the entire catalog of products and prices.\n\n### Availability API\nProvides endpoints for querying products availability by a set of predefined dimensions.\n\n### External Integrations API\nProvides endpoints for external integrations.\n",
5
+ "description": "The `pricing-api` hub sets the foundations for the following Pricing APIs:\n\n### Order API\nThis api enables the management of orders in epilot 360, providing features such as:\n - Automatic calculation of totals and price breakdowns for taxes on the Order entity\n - Product and pricing data validation\n\n### Shopping Cart API\nUsed to interact with a cart during a customer's checkout session, providing:\n - An unified data model to model a Shopping Cart\n - Product and pricing data validation\n - Checkout a cart into an order or quote\n\n### Catalog API\nProvides a way to query the entire catalog of products and prices.\n\n### Availability API\nProvides endpoints for querying products availability by a set of predefined dimensions.\n\n### Spot Market API\nProvides endpoints to fetch (historic) spot market price data.\n\n### External Integrations API\nProvides endpoints for external integrations.\n",
6
6
  "version": "1.0.0",
7
7
  "termsOfService": "https://epilot.cloud/agb",
8
8
  "contact": {
@@ -32,6 +32,10 @@
32
32
  "name": "Availability API",
33
33
  "description": "Provides endpoints for querying products availability by a set of predefined dimensions.\n"
34
34
  },
35
+ {
36
+ "name": "Spot Market API",
37
+ "description": "Proviodes endpoints to fetch (historic) spot market data.\n"
38
+ },
35
39
  {
36
40
  "name": "External Integrations API",
37
41
  "description": "Provides endpoints for external integrations.\n"
@@ -871,7 +875,7 @@
871
875
  }
872
876
  }
873
877
  },
874
- "/v1/validate-promo-codes": {
878
+ "/v1/public/validate-promo-codes": {
875
879
  "post": {
876
880
  "description": "Validate a list of promo codes against a list of coupons",
877
881
  "summary": "validatePromoCodes",
@@ -879,6 +883,22 @@
879
883
  "tags": [
880
884
  "Promo Codes API"
881
885
  ],
886
+ "security": [
887
+ {
888
+ "EpilotPublicAuth": []
889
+ }
890
+ ],
891
+ "parameters": [
892
+ {
893
+ "in": "header",
894
+ "name": "X-Ivy-Org-ID",
895
+ "description": "The target Organization Id represented by the caller",
896
+ "schema": {
897
+ "type": "string"
898
+ },
899
+ "required": true
900
+ }
901
+ ],
882
902
  "requestBody": {
883
903
  "required": true,
884
904
  "content": {
@@ -1171,6 +1191,240 @@
1171
1191
  }
1172
1192
  }
1173
1193
  },
1194
+ "/v1/public/historicMarketPrices": {
1195
+ "get": {
1196
+ "description": "BETA: Get historic energy prices in a given time period\n",
1197
+ "operationId": "$historicMarketPrices",
1198
+ "summary": "historicMarketPrices",
1199
+ "tags": [
1200
+ "Spot Market API"
1201
+ ],
1202
+ "security": [
1203
+ {
1204
+ "EpilotPublicAuth": []
1205
+ }
1206
+ ],
1207
+ "parameters": [
1208
+ {
1209
+ "in": "query",
1210
+ "name": "market",
1211
+ "schema": {
1212
+ "type": "string",
1213
+ "enum": [
1214
+ "day_ahead"
1215
+ ]
1216
+ },
1217
+ "required": true,
1218
+ "description": "Market to use. For now, only day ahead prices are supported."
1219
+ },
1220
+ {
1221
+ "in": "query",
1222
+ "name": "from",
1223
+ "schema": {
1224
+ "type": "string",
1225
+ "format": "date"
1226
+ },
1227
+ "required": true,
1228
+ "description": "Start date for price data (YYYY-MM-DDD)."
1229
+ },
1230
+ {
1231
+ "in": "query",
1232
+ "name": "to",
1233
+ "schema": {
1234
+ "type": "string",
1235
+ "format": "date"
1236
+ },
1237
+ "required": true,
1238
+ "description": "End date for price data (YYYY-MM-DDD)."
1239
+ },
1240
+ {
1241
+ "in": "query",
1242
+ "name": "frequency",
1243
+ "schema": {
1244
+ "type": "string",
1245
+ "enum": [
1246
+ "hourly",
1247
+ "daily",
1248
+ "monthly"
1249
+ ]
1250
+ },
1251
+ "required": true,
1252
+ "description": "Frequency of the price data points"
1253
+ }
1254
+ ],
1255
+ "responses": {
1256
+ "200": {
1257
+ "description": "Price data returned successfully.",
1258
+ "content": {
1259
+ "application/json": {
1260
+ "schema": {
1261
+ "type": "object",
1262
+ "properties": {
1263
+ "market": {
1264
+ "type": "string",
1265
+ "enum": [
1266
+ "day_ahead"
1267
+ ]
1268
+ },
1269
+ "frequency": {
1270
+ "type": "string",
1271
+ "enum": [
1272
+ "hourly",
1273
+ "daily",
1274
+ "monthly"
1275
+ ]
1276
+ },
1277
+ "prices": {
1278
+ "type": "array",
1279
+ "items": {
1280
+ "type": "object",
1281
+ "properties": {
1282
+ "timestamp": {
1283
+ "type": "string",
1284
+ "format": "date-time",
1285
+ "description": "ISO 8601 timestamp of the price record in UTC."
1286
+ },
1287
+ "unit_amount": {
1288
+ "type": "integer",
1289
+ "description": "Cost in cents, e.g. 123 for 12,3 Cents = 0.123€.",
1290
+ "example": 123
1291
+ },
1292
+ "unit_amount_decimal": {
1293
+ "type": "string",
1294
+ "description": "Cost in decimal format, e.g. 0.123€.",
1295
+ "example": "0.123"
1296
+ }
1297
+ },
1298
+ "required": [
1299
+ "timestamp",
1300
+ "unit_amount"
1301
+ ]
1302
+ }
1303
+ }
1304
+ }
1305
+ }
1306
+ }
1307
+ }
1308
+ },
1309
+ "400": {
1310
+ "description": "Invalid payload",
1311
+ "content": {
1312
+ "application/json": {
1313
+ "schema": {
1314
+ "$ref": "#/components/schemas/Error"
1315
+ }
1316
+ }
1317
+ }
1318
+ }
1319
+ }
1320
+ }
1321
+ },
1322
+ "/v1/public/averageMarketPrice": {
1323
+ "get": {
1324
+ "description": "BETA: Get average energy prices in a given time period\n",
1325
+ "operationId": "$averageMarketPrice",
1326
+ "summary": "averageMarketPrice",
1327
+ "tags": [
1328
+ "Spot Market API"
1329
+ ],
1330
+ "security": [
1331
+ {
1332
+ "EpilotPublicAuth": []
1333
+ }
1334
+ ],
1335
+ "parameters": [
1336
+ {
1337
+ "in": "query",
1338
+ "name": "market",
1339
+ "schema": {
1340
+ "type": "string",
1341
+ "enum": [
1342
+ "day_ahead"
1343
+ ]
1344
+ },
1345
+ "required": true,
1346
+ "description": "Market to use. For now, only day ahead prices are supported."
1347
+ },
1348
+ {
1349
+ "in": "query",
1350
+ "name": "interval",
1351
+ "schema": {
1352
+ "type": "string",
1353
+ "enum": [
1354
+ "previous_week",
1355
+ "previous_month",
1356
+ "previous_year"
1357
+ ]
1358
+ },
1359
+ "required": true,
1360
+ "description": "Interval for the average."
1361
+ }
1362
+ ],
1363
+ "responses": {
1364
+ "200": {
1365
+ "description": "Price data returned successfully.",
1366
+ "content": {
1367
+ "application/json": {
1368
+ "schema": {
1369
+ "type": "object",
1370
+ "properties": {
1371
+ "market": {
1372
+ "type": "string",
1373
+ "enum": [
1374
+ "day_ahead"
1375
+ ]
1376
+ },
1377
+ "interval": {
1378
+ "type": "string",
1379
+ "enum": [
1380
+ "previous_week",
1381
+ "previous_month",
1382
+ "previous_year"
1383
+ ]
1384
+ },
1385
+ "price": {
1386
+ "type": "object",
1387
+ "properties": {
1388
+ "timestamp": {
1389
+ "type": "string",
1390
+ "format": "date-time",
1391
+ "description": "ISO 8601 timestamp of the price record in UTC."
1392
+ },
1393
+ "unit_amount": {
1394
+ "type": "integer",
1395
+ "description": "Cost in Cents, e.g. 123 for 12,3 Cents = 0.123€.",
1396
+ "example": 123
1397
+ },
1398
+ "unit_amount_decimal": {
1399
+ "type": "string",
1400
+ "description": "Cost in decimal format, e.g. 0.123€.",
1401
+ "example": "0.123"
1402
+ }
1403
+ },
1404
+ "required": [
1405
+ "timestamp",
1406
+ "unit_amount",
1407
+ "unit_amount_decimal"
1408
+ ]
1409
+ }
1410
+ }
1411
+ }
1412
+ }
1413
+ }
1414
+ },
1415
+ "400": {
1416
+ "description": "Invalid payload",
1417
+ "content": {
1418
+ "application/json": {
1419
+ "schema": {
1420
+ "$ref": "#/components/schemas/Error"
1421
+ }
1422
+ }
1423
+ }
1424
+ }
1425
+ }
1426
+ }
1427
+ },
1174
1428
  "/v1/public/integration/{integrationId}/external-catalog": {
1175
1429
  "post": {
1176
1430
  "description": "Returns the list of available products (including computed prices) based on a given context.",
@@ -3246,7 +3500,15 @@
3246
3500
  "$ref": "#/components/schemas/ComputedPriceComponents"
3247
3501
  },
3248
3502
  "variable": {
3249
- "description": "The variable price breakdown",
3503
+ "description": "The variable price breakdown (day and night)",
3504
+ "$ref": "#/components/schemas/ComputedPriceComponents"
3505
+ },
3506
+ "variable_ht": {
3507
+ "description": "The variable price breakdown for the day period",
3508
+ "$ref": "#/components/schemas/ComputedPriceComponents"
3509
+ },
3510
+ "variable_nt": {
3511
+ "description": "The variable price breakdown for the night period",
3250
3512
  "$ref": "#/components/schemas/ComputedPriceComponents"
3251
3513
  }
3252
3514
  }
@@ -4035,6 +4297,12 @@
4035
4297
  "$ref": "#/components/schemas/PaymentMethod"
4036
4298
  }
4037
4299
  },
4300
+ "redeemed_promos": {
4301
+ "type": "array",
4302
+ "items": {
4303
+ "$ref": "#/components/schemas/RedeemedPromo"
4304
+ }
4305
+ },
4038
4306
  "_tags": {
4039
4307
  "type": "array",
4040
4308
  "items": {
@@ -5387,6 +5655,22 @@
5387
5655
  "usage_limit": 10
5388
5656
  }
5389
5657
  },
5658
+ "RedeemedPromo": {
5659
+ "type": "object",
5660
+ "properties": {
5661
+ "code": {
5662
+ "description": "The promocode inserted by the customer to redeem the promotion",
5663
+ "type": "string"
5664
+ },
5665
+ "coupons": {
5666
+ "description": "The coupons that got redeemed with received the code",
5667
+ "type": "array",
5668
+ "items": {
5669
+ "$ref": "#/components/schemas/CouponWithoutPromoCodes"
5670
+ }
5671
+ }
5672
+ }
5673
+ },
5390
5674
  "PriceTier": {
5391
5675
  "type": "object",
5392
5676
  "properties": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/pricing-client",
3
- "version": "3.41.0",
3
+ "version": "3.43.0-alpha.0",
4
4
  "description": "Client for epilot Pricing APIs",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",