@epilot/pricing-client 3.51.3 → 3.52.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={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}/products-recommendation":{"post":{"operationId":"$searchExternalProductsRecommendation","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/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={330: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}/products-recommendation":{"post":{"operationId":"$searchExternalProductsRecommendation","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/products-recommendation":{"post":{"operationId":"$getExternalCatalogProductsRecommendation","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}(330),i=exports;for(var n in t)i[n]=t[n];t.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})();
@@ -388,6 +388,18 @@
388
388
  "responses": {}
389
389
  }
390
390
  },
391
+ "/v1/public/external-catalog/products-recommendation": {
392
+ "post": {
393
+ "operationId": "$getExternalCatalogProductsRecommendation",
394
+ "requestBody": {
395
+ "required": true,
396
+ "content": {
397
+ "application/json": {}
398
+ }
399
+ },
400
+ "responses": {}
401
+ }
402
+ },
391
403
  "/v1/public/product-recommendations": {
392
404
  "post": {
393
405
  "operationId": "$productRecommendations",
package/dist/openapi.d.ts CHANGED
@@ -164,7 +164,7 @@ declare namespace Components {
164
164
  country?: string;
165
165
  }
166
166
  /**
167
- * The availability check result payload
167
+ * The product availability check result payload
168
168
  * example:
169
169
  * {
170
170
  * "available_products": [],
@@ -4534,15 +4534,15 @@ declare namespace Components {
4534
4534
  * example:
4535
4535
  * 1234567890
4536
4536
  */
4537
- appId?: string;
4537
+ appId: string;
4538
4538
  /**
4539
4539
  * The component id.
4540
4540
  * example:
4541
4541
  * 1234567890
4542
4542
  */
4543
- componentId?: string;
4543
+ componentId: string;
4544
4544
  /**
4545
- * The hook id.
4545
+ * The hook id. If not provided, the first valid hook will be used.
4546
4546
  * example:
4547
4547
  * 1234567890
4548
4548
  */
@@ -4551,42 +4551,8 @@ declare namespace Components {
4551
4551
  }
4552
4552
  /**
4553
4553
  * The request payload for the external catalog service with a custom context. E.g. for requests from the Portal.
4554
- * example:
4555
- * {
4556
- * "config": {
4557
- * "appId": "1234567890",
4558
- * "componentId": "1234567890",
4559
- * "hookId": "1234567890"
4560
- * },
4561
- * "origin": "custom",
4562
- * "context": {
4563
- * "user_id": "user-12345",
4564
- * "session_id": "session-67890",
4565
- * "custom_context_key": "custom_context_value"
4566
- * }
4567
- * }
4568
4554
  */
4569
4555
  export interface ExternalCatalogCustomRequest {
4570
- config?: {
4571
- /**
4572
- * The app id.
4573
- * example:
4574
- * 1234567890
4575
- */
4576
- appId?: string;
4577
- /**
4578
- * The component id.
4579
- * example:
4580
- * 1234567890
4581
- */
4582
- componentId?: string;
4583
- /**
4584
- * The hook id.
4585
- * example:
4586
- * 1234567890
4587
- */
4588
- hookId?: string;
4589
- };
4590
4556
  /**
4591
4557
  * The origin of the request.
4592
4558
  * example:
@@ -4611,6 +4577,18 @@ declare namespace Components {
4611
4577
  }
4612
4578
  /**
4613
4579
  * The request payload for the external catalog service with a journey context.
4580
+ */
4581
+ export interface ExternalCatalogJourneyRequest {
4582
+ /**
4583
+ * The origin of the request.
4584
+ * example:
4585
+ * journey
4586
+ */
4587
+ origin: "journey";
4588
+ context: JourneyContext;
4589
+ }
4590
+ /**
4591
+ * The request payload for the external catalog service.
4614
4592
  * example:
4615
4593
  * {
4616
4594
  * "config": {
@@ -4651,40 +4629,29 @@ declare namespace Components {
4651
4629
  * }
4652
4630
  * }
4653
4631
  */
4654
- export interface ExternalCatalogJourneyRequest {
4632
+ export type ExternalCatalogRequest = {
4655
4633
  config?: {
4656
4634
  /**
4657
4635
  * The app id.
4658
4636
  * example:
4659
4637
  * 1234567890
4660
4638
  */
4661
- appId?: string;
4639
+ appId: string;
4662
4640
  /**
4663
4641
  * The component id.
4664
4642
  * example:
4665
4643
  * 1234567890
4666
4644
  */
4667
- componentId?: string;
4645
+ componentId: string;
4668
4646
  /**
4669
- * The hook id.
4647
+ * The hook id. If not provided, the first valid hook will be used.
4670
4648
  * example:
4671
4649
  * 1234567890
4672
4650
  */
4673
4651
  hookId?: string;
4674
4652
  };
4675
- /**
4676
- * The origin of the request.
4677
- * example:
4678
- * journey
4679
- */
4680
- origin: "journey";
4681
- context: JourneyContext;
4682
- }
4683
- /**
4653
+ } & (/**
4684
4654
  * The request payload for the external catalog service.
4685
- */
4686
- export type ExternalCatalogRequest = /* The request payload for the external catalog service. */ /**
4687
- * The request payload for the external catalog service with a journey context.
4688
4655
  * example:
4689
4656
  * {
4690
4657
  * "config": {
@@ -4725,24 +4692,7 @@ declare namespace Components {
4725
4692
  * }
4726
4693
  * }
4727
4694
  */
4728
- ExternalCatalogJourneyRequest | /**
4729
- * The request payload for the external catalog service with a custom context. E.g. for requests from the Portal.
4730
- * example:
4731
- * {
4732
- * "config": {
4733
- * "appId": "1234567890",
4734
- * "componentId": "1234567890",
4735
- * "hookId": "1234567890"
4736
- * },
4737
- * "origin": "custom",
4738
- * "context": {
4739
- * "user_id": "user-12345",
4740
- * "session_id": "session-67890",
4741
- * "custom_context_key": "custom_context_value"
4742
- * }
4743
- * }
4744
- */
4745
- ExternalCatalogCustomRequest;
4695
+ /* The request payload for the external catalog service with a journey context. */ ExternalCatalogJourneyRequest | /* The request payload for the external catalog service with a custom context. E.g. for requests from the Portal. */ ExternalCatalogCustomRequest);
4746
4696
  /**
4747
4697
  * example:
4748
4698
  * {
@@ -5486,9 +5436,11 @@ declare namespace Components {
5486
5436
  base_url?: string;
5487
5437
  }
5488
5438
  export interface Offer {
5489
- product_id?: string;
5490
- price_id?: string;
5491
5439
  target_id?: string;
5440
+ items?: {
5441
+ price_id: string;
5442
+ product_id: string;
5443
+ }[];
5492
5444
  }
5493
5445
  /**
5494
5446
  * The opportunity entity
@@ -8983,6 +8935,7 @@ declare namespace Components {
8983
8935
  * The contract id to be used as source for the recommendation
8984
8936
  */
8985
8937
  contract_id?: string;
8938
+ filters?: /* Availability filters dimensions */ AvailabilityFilters;
8986
8939
  }
8987
8940
  /**
8988
8941
  * example:
@@ -9639,7 +9592,7 @@ declare namespace Paths {
9639
9592
  export type RequestBody = /* Availability check request payload */ Components.Schemas.AvailabilityCheckParams;
9640
9593
  namespace Responses {
9641
9594
  export type $200 = /**
9642
- * The availability check result payload
9595
+ * The product availability check result payload
9643
9596
  * example:
9644
9597
  * {
9645
9598
  * "available_products": [],
@@ -9745,13 +9698,105 @@ declare namespace Paths {
9745
9698
  }
9746
9699
  }
9747
9700
  namespace $GetExternalCatalogProducts {
9748
- export type RequestBody = /* The request payload for the external catalog service. */ Components.Schemas.ExternalCatalogRequest;
9701
+ export type RequestBody = /**
9702
+ * The request payload for the external catalog service.
9703
+ * example:
9704
+ * {
9705
+ * "config": {
9706
+ * "appId": "1234567890",
9707
+ * "componentId": "1234567890",
9708
+ * "hookId": "1234567890"
9709
+ * },
9710
+ * "origin": "journey",
9711
+ * "context": {
9712
+ * "journey_id": "8d0a2235-97ce-42d0-88a3-e374634ca44e",
9713
+ * "entity_id": "9e1b3346-a8df-53e1-99b4-f485745db55f",
9714
+ * "journey_name": "Product Selection Journey",
9715
+ * "journey_tags": [
9716
+ * "electricity",
9717
+ * "residential"
9718
+ * ],
9719
+ * "journey_url_params": {
9720
+ * "utm_source": "google",
9721
+ * "utm_campaign": "spring2024"
9722
+ * },
9723
+ * "current_step_name": "Product Selection",
9724
+ * "current_block_name": "Energy Products",
9725
+ * "steps_data": [
9726
+ * {
9727
+ * "step_name": "Address Information",
9728
+ * "step_index": 0,
9729
+ * "blocks": {
9730
+ * "Adresse": {
9731
+ * "countryCode": "DE",
9732
+ * "city": "Koblenz",
9733
+ * "zipCode": "56068",
9734
+ * "streetName": "Am Alten Hospital",
9735
+ * "houseNumber": "123"
9736
+ * }
9737
+ * }
9738
+ * }
9739
+ * ]
9740
+ * }
9741
+ * }
9742
+ */
9743
+ Components.Schemas.ExternalCatalogRequest;
9749
9744
  namespace Responses {
9750
9745
  export type $200 = Components.Schemas.SearchExternalCatalogResult;
9751
9746
  export type $400 = Components.Schemas.Error;
9752
9747
  export type $403 = Components.Schemas.Error;
9753
9748
  }
9754
9749
  }
9750
+ namespace $GetExternalCatalogProductsRecommendation {
9751
+ export type RequestBody = /**
9752
+ * The request payload for the external catalog service.
9753
+ * example:
9754
+ * {
9755
+ * "config": {
9756
+ * "appId": "1234567890",
9757
+ * "componentId": "1234567890",
9758
+ * "hookId": "1234567890"
9759
+ * },
9760
+ * "origin": "journey",
9761
+ * "context": {
9762
+ * "journey_id": "8d0a2235-97ce-42d0-88a3-e374634ca44e",
9763
+ * "entity_id": "9e1b3346-a8df-53e1-99b4-f485745db55f",
9764
+ * "journey_name": "Product Selection Journey",
9765
+ * "journey_tags": [
9766
+ * "electricity",
9767
+ * "residential"
9768
+ * ],
9769
+ * "journey_url_params": {
9770
+ * "utm_source": "google",
9771
+ * "utm_campaign": "spring2024"
9772
+ * },
9773
+ * "current_step_name": "Product Selection",
9774
+ * "current_block_name": "Energy Products",
9775
+ * "steps_data": [
9776
+ * {
9777
+ * "step_name": "Address Information",
9778
+ * "step_index": 0,
9779
+ * "blocks": {
9780
+ * "Adresse": {
9781
+ * "countryCode": "DE",
9782
+ * "city": "Koblenz",
9783
+ * "zipCode": "56068",
9784
+ * "streetName": "Am Alten Hospital",
9785
+ * "houseNumber": "123"
9786
+ * }
9787
+ * }
9788
+ * }
9789
+ * ]
9790
+ * }
9791
+ * }
9792
+ */
9793
+ Components.Schemas.ExternalCatalogRequest;
9794
+ namespace Responses {
9795
+ export type $200 = Components.Schemas.SearchExternalCatalogRecommendationsResult;
9796
+ export type $400 = Components.Schemas.Error;
9797
+ export type $403 = Components.Schemas.Error;
9798
+ }
9799
+ }
9755
9800
  namespace $HistoricMarketPrices {
9756
9801
  namespace Parameters {
9757
9802
  export type BiddingZone = /* The bidding zone for a spot market price. */ Components.Schemas.SpotMarketBiddingZone;
@@ -11343,6 +11388,16 @@ export interface OperationMethods {
11343
11388
  data?: Paths.$GetExternalCatalogProducts.RequestBody,
11344
11389
  config?: AxiosRequestConfig
11345
11390
  ): OperationResponse<Paths.$GetExternalCatalogProducts.Responses.$200>
11391
+ /**
11392
+ * $getExternalCatalogProductsRecommendation - getExternalCatalogProductsRecommendation
11393
+ *
11394
+ * Returns the list of available external catalog products recommendations based on a given context
11395
+ */
11396
+ '$getExternalCatalogProductsRecommendation'(
11397
+ parameters?: Parameters<UnknownParamsObject> | null,
11398
+ data?: Paths.$GetExternalCatalogProductsRecommendation.RequestBody,
11399
+ config?: AxiosRequestConfig
11400
+ ): OperationResponse<Paths.$GetExternalCatalogProductsRecommendation.Responses.$200>
11346
11401
  /**
11347
11402
  * $productRecommendations - productRecommendations
11348
11403
  *
@@ -11607,6 +11662,18 @@ export interface PathsDictionary {
11607
11662
  config?: AxiosRequestConfig
11608
11663
  ): OperationResponse<Paths.$GetExternalCatalogProducts.Responses.$200>
11609
11664
  }
11665
+ ['/v1/public/external-catalog/products-recommendation']: {
11666
+ /**
11667
+ * $getExternalCatalogProductsRecommendation - getExternalCatalogProductsRecommendation
11668
+ *
11669
+ * Returns the list of available external catalog products recommendations based on a given context
11670
+ */
11671
+ 'post'(
11672
+ parameters?: Parameters<UnknownParamsObject> | null,
11673
+ data?: Paths.$GetExternalCatalogProductsRecommendation.RequestBody,
11674
+ config?: AxiosRequestConfig
11675
+ ): OperationResponse<Paths.$GetExternalCatalogProductsRecommendation.Responses.$200>
11676
+ }
11610
11677
  ['/v1/public/product-recommendations']: {
11611
11678
  /**
11612
11679
  * $productRecommendations - productRecommendations
package/dist/openapi.json CHANGED
@@ -1330,22 +1330,6 @@
1330
1330
  }
1331
1331
  }
1332
1332
  }
1333
- },
1334
- "Check availability with location & available date dimension": {
1335
- "value": {
1336
- "products": [
1337
- "cd75456a-30e4-4912-95be-e743d5ea175b"
1338
- ],
1339
- "filters": {
1340
- "location": {
1341
- "postal_code": "57008",
1342
- "city": "Cologne",
1343
- "street": "Media Park",
1344
- "street_number": "8a"
1345
- },
1346
- "available_date": "2022-05-01"
1347
- }
1348
- }
1349
1333
  }
1350
1334
  }
1351
1335
  }
@@ -2854,6 +2838,339 @@
2854
2838
  }
2855
2839
  }
2856
2840
  },
2841
+ "/v1/public/external-catalog/products-recommendation": {
2842
+ "post": {
2843
+ "description": "Returns the list of available external catalog products recommendations based on a given context",
2844
+ "operationId": "$getExternalCatalogProductsRecommendation",
2845
+ "security": [
2846
+ {},
2847
+ {
2848
+ "EpilotPublicAuth": []
2849
+ }
2850
+ ],
2851
+ "summary": "getExternalCatalogProductsRecommendation",
2852
+ "tags": [
2853
+ "External Catalog API"
2854
+ ],
2855
+ "requestBody": {
2856
+ "required": true,
2857
+ "content": {
2858
+ "application/json": {
2859
+ "schema": {
2860
+ "$ref": "#/components/schemas/ExternalCatalogRequest"
2861
+ }
2862
+ }
2863
+ }
2864
+ },
2865
+ "responses": {
2866
+ "200": {
2867
+ "description": "The available products response payload",
2868
+ "content": {
2869
+ "application/json": {
2870
+ "schema": {
2871
+ "$ref": "#/components/schemas/SearchExternalCatalogRecommendationsResult"
2872
+ },
2873
+ "examples": {
2874
+ "External catalog recommendations": {
2875
+ "value": {
2876
+ "source": {
2877
+ "pricing_details": {
2878
+ "items": [
2879
+ {
2880
+ "_id": "price-12312414",
2881
+ "price_id": "price-12312414",
2882
+ "product_id": "product-12312414",
2883
+ "is_composite_price": true,
2884
+ "description": "Home Energy Package Composite",
2885
+ "item_components": [
2886
+ {
2887
+ "_id": "price-12312414-component-0",
2888
+ "price_id": "price-12312414-component-0",
2889
+ "product_id": "product-12312414",
2890
+ "description": "Working Price",
2891
+ "is_tax_inclusive": true,
2892
+ "amount_total_decimal": "50",
2893
+ "amount_total": 5000,
2894
+ "amount_subtotal_decimal": "50",
2895
+ "amount_subtotal": 5000,
2896
+ "unit_amount": 5,
2897
+ "unit_amount_gross": 5,
2898
+ "unit_amount_gross_decimal": "0.05",
2899
+ "unit_amount_net": 5,
2900
+ "unit_amount_net_decimal": "0.05",
2901
+ "billing_period": "monthly",
2902
+ "type": "recurring",
2903
+ "taxes": [],
2904
+ "pricing_model": "per_unit",
2905
+ "quantity": 1,
2906
+ "_price": {
2907
+ "_id": "price-12312414-component-0",
2908
+ "unit_amount_currency": "EUR",
2909
+ "description": "Working Price",
2910
+ "is_tax_inclusive": true,
2911
+ "unit_amount": 5,
2912
+ "unit_amount_decimal": "0.05",
2913
+ "unit": "kWh",
2914
+ "billing_period": "monthly",
2915
+ "type": "recurring",
2916
+ "billing_duration_amount": 24,
2917
+ "billing_duration_unit": "months",
2918
+ "notice_time_amount": 3,
2919
+ "notice_time_unit": "months",
2920
+ "termination_time_amount": 3,
2921
+ "termination_time_unit": "months",
2922
+ "renewal_duration_amount": 12,
2923
+ "renewal_duration_unit": "months",
2924
+ "active": true,
2925
+ "is_composite_price": false,
2926
+ "variable_price": true,
2927
+ "pricing_model": "per_unit",
2928
+ "price_display_in_journeys": "show_price"
2929
+ },
2930
+ "_product": {
2931
+ "_id": "product-12312414",
2932
+ "name": "Home Energy Package",
2933
+ "description": "Composite home energy solution with solar panels and battery"
2934
+ }
2935
+ }
2936
+ ]
2937
+ }
2938
+ ],
2939
+ "currency": "EUR",
2940
+ "amount_subtotal": 5000,
2941
+ "amount_total": 5000,
2942
+ "amount_tax": 0,
2943
+ "total_details": {
2944
+ "amount_tax": 0,
2945
+ "breakdown": {
2946
+ "taxes": [],
2947
+ "recurrences": [
2948
+ {
2949
+ "type": "recurring",
2950
+ "billing_period": "monthly",
2951
+ "amount_total": 5000,
2952
+ "amount_total_decimal": "50.00",
2953
+ "amount_subtotal": 5000,
2954
+ "amount_subtotal_decimal": "50.00",
2955
+ "amount_tax": 0
2956
+ }
2957
+ ]
2958
+ }
2959
+ }
2960
+ },
2961
+ "_meta": {
2962
+ "signature": "abc123",
2963
+ "timestamp": 1712049221642
2964
+ }
2965
+ },
2966
+ "offers": [
2967
+ {
2968
+ "pricing_details": {
2969
+ "items": [
2970
+ {
2971
+ "_id": "price-999857a4",
2972
+ "price_id": "price-999857a4",
2973
+ "product_id": "product-999857a4",
2974
+ "is_composite_price": false,
2975
+ "description": "Single Price",
2976
+ "is_tax_inclusive": true,
2977
+ "amount_total_decimal": "25",
2978
+ "amount_total": 2500,
2979
+ "amount_subtotal_decimal": "25",
2980
+ "amount_subtotal": 2500,
2981
+ "unit_amount": 25,
2982
+ "unit_amount_gross": 25,
2983
+ "unit_amount_gross_decimal": "25",
2984
+ "unit_amount_net": 25,
2985
+ "unit_amount_net_decimal": "25",
2986
+ "billing_period": null,
2987
+ "type": "one_time",
2988
+ "taxes": [],
2989
+ "pricing_model": "per_unit",
2990
+ "quantity": 1,
2991
+ "_price": {
2992
+ "_id": "price-999857a4",
2993
+ "unit_amount_currency": "EUR",
2994
+ "description": "Single Price",
2995
+ "is_tax_inclusive": true,
2996
+ "unit_amount": 25,
2997
+ "unit_amount_decimal": "25",
2998
+ "billing_duration_amount": 24,
2999
+ "billing_duration_unit": "months",
3000
+ "notice_time_amount": 3,
3001
+ "notice_time_unit": "months",
3002
+ "termination_time_amount": 3,
3003
+ "termination_time_unit": "months",
3004
+ "renewal_duration_amount": 12,
3005
+ "renewal_duration_unit": "months",
3006
+ "active": true,
3007
+ "is_composite_price": false,
3008
+ "pricing_model": "per_unit",
3009
+ "price_display_in_journeys": "show_price"
3010
+ },
3011
+ "_product": {
3012
+ "_id": "product-999857a4",
3013
+ "name": "Solar Panel X2",
3014
+ "description": "High-efficiency solar panel for residential use"
3015
+ }
3016
+ }
3017
+ ]
3018
+ },
3019
+ "currency": "EUR",
3020
+ "amount_subtotal": 2500,
3021
+ "amount_total": 2500,
3022
+ "amount_tax": 0,
3023
+ "total_details": {
3024
+ "amount_tax": 0,
3025
+ "breakdown": {
3026
+ "taxes": [],
3027
+ "recurrences": [
3028
+ {
3029
+ "type": "one_time",
3030
+ "amount_total": 2500,
3031
+ "amount_total_decimal": "25.00",
3032
+ "amount_subtotal": 2500,
3033
+ "amount_subtotal_decimal": "25.00",
3034
+ "amount_tax": 0
3035
+ }
3036
+ ]
3037
+ }
3038
+ },
3039
+ "_meta": {
3040
+ "signature": "def456",
3041
+ "timestamp": 1712049221643
3042
+ }
3043
+ },
3044
+ {
3045
+ "pricing_details": {
3046
+ "items": [
3047
+ {
3048
+ "_id": "price-93f857a4",
3049
+ "price_id": "price-93f857a4",
3050
+ "product_id": "product-93f857a4",
3051
+ "is_composite_price": false,
3052
+ "description": "Single Price",
3053
+ "is_tax_inclusive": false,
3054
+ "amount_total_decimal": "29.75",
3055
+ "amount_total": 2975,
3056
+ "amount_subtotal_decimal": "25",
3057
+ "amount_subtotal": 2500,
3058
+ "unit_amount": 25,
3059
+ "unit_amount_gross": 29.75,
3060
+ "unit_amount_gross_decimal": "29.75",
3061
+ "unit_amount_net": 25,
3062
+ "unit_amount_net_decimal": "25",
3063
+ "billing_period": null,
3064
+ "type": "one_time",
3065
+ "taxes": [
3066
+ {
3067
+ "tax": {
3068
+ "_id": "tax-vat-19",
3069
+ "name": "VAT",
3070
+ "type": "VAT",
3071
+ "rate": 19,
3072
+ "region": "DE"
3073
+ },
3074
+ "amount": 475
3075
+ }
3076
+ ],
3077
+ "pricing_model": "per_unit",
3078
+ "quantity": 1,
3079
+ "_price": {
3080
+ "_id": "price-93f857a4",
3081
+ "unit_amount_currency": "EUR",
3082
+ "description": "Single Price",
3083
+ "is_tax_inclusive": false,
3084
+ "unit_amount": 25,
3085
+ "unit_amount_decimal": "25",
3086
+ "active": true,
3087
+ "is_composite_price": false,
3088
+ "pricing_model": "per_unit",
3089
+ "price_display_in_journeys": "show_price",
3090
+ "tax": [
3091
+ {
3092
+ "_id": "tax-vat-19",
3093
+ "name": "VAT",
3094
+ "type": "VAT",
3095
+ "rate": 19,
3096
+ "region": "DE"
3097
+ }
3098
+ ]
3099
+ },
3100
+ "_product": {
3101
+ "_id": "product-93f857a4",
3102
+ "name": "Solar Panel X3",
3103
+ "description": "New generation of high-efficiency solar panel for residential use"
3104
+ }
3105
+ }
3106
+ ]
3107
+ },
3108
+ "currency": "EUR",
3109
+ "amount_subtotal": 2500,
3110
+ "amount_total": 2975,
3111
+ "amount_tax": 475,
3112
+ "total_details": {
3113
+ "amount_tax": 475,
3114
+ "breakdown": {
3115
+ "taxes": [
3116
+ {
3117
+ "tax": {
3118
+ "_id": "tax-vat-19",
3119
+ "name": "VAT",
3120
+ "type": "VAT",
3121
+ "rate": 19,
3122
+ "region": "DE"
3123
+ },
3124
+ "amount": 475
3125
+ }
3126
+ ],
3127
+ "recurrences": [
3128
+ {
3129
+ "type": "one_time",
3130
+ "amount_total": 2975,
3131
+ "amount_total_decimal": "29.75",
3132
+ "amount_subtotal": 2500,
3133
+ "amount_subtotal_decimal": "25.00",
3134
+ "amount_tax": 475
3135
+ }
3136
+ ]
3137
+ }
3138
+ },
3139
+ "_meta": {
3140
+ "signature": "ghi789",
3141
+ "timestamp": 1712049221644
3142
+ }
3143
+ }
3144
+ ]
3145
+ }
3146
+ }
3147
+ }
3148
+ }
3149
+ }
3150
+ },
3151
+ "400": {
3152
+ "description": "Invalid payload",
3153
+ "content": {
3154
+ "application/json": {
3155
+ "schema": {
3156
+ "$ref": "#/components/schemas/Error"
3157
+ }
3158
+ }
3159
+ }
3160
+ },
3161
+ "403": {
3162
+ "description": "Forbidden, no credentials found for the given integration / organization",
3163
+ "content": {
3164
+ "application/json": {
3165
+ "schema": {
3166
+ "$ref": "#/components/schemas/Error"
3167
+ }
3168
+ }
3169
+ }
3170
+ }
3171
+ }
3172
+ }
3173
+ },
2857
3174
  "/v1/public/product-recommendations": {
2858
3175
  "post": {
2859
3176
  "description": "Get a list of product recommendations based on the search parameters.",
@@ -2889,10 +3206,23 @@
2889
3206
  "Search product recommendations by id": {
2890
3207
  "value": {
2891
3208
  "product_recommendation_ids": [
2892
- "bae8d40a-0093-483a-b4f9-3653800b6781"
3209
+ "22c134b7-8dd8-4872-a5c1-8fc6dd4ac2ee"
2893
3210
  ]
2894
3211
  }
2895
3212
  },
3213
+ "Search product recommendations by id with location filter": {
3214
+ "value": {
3215
+ "product_recommendation_ids": [
3216
+ "22c134b7-8dd8-4872-a5c1-8fc6dd4ac2ee"
3217
+ ],
3218
+ "filters": {
3219
+ "location": {
3220
+ "postal_code": "50670",
3221
+ "city": "Köln"
3222
+ }
3223
+ }
3224
+ }
3225
+ },
2896
3226
  "Search product recommendations by source product and price": {
2897
3227
  "value": {
2898
3228
  "catalog_item": {
@@ -5253,7 +5583,7 @@
5253
5583
  ]
5254
5584
  },
5255
5585
  "AvailabilityResult": {
5256
- "description": "The availability check result payload",
5586
+ "description": "The product availability check result payload",
5257
5587
  "type": "object",
5258
5588
  "properties": {
5259
5589
  "available_products": {
@@ -8437,12 +8767,19 @@
8437
8767
  },
8438
8768
  "ExternalCatalogRequest": {
8439
8769
  "description": "The request payload for the external catalog service.",
8440
- "oneOf": [
8770
+ "allOf": [
8441
8771
  {
8442
- "$ref": "#/components/schemas/ExternalCatalogJourneyRequest"
8772
+ "$ref": "#/components/schemas/ExternalCatalogConfigurationRequest"
8443
8773
  },
8444
8774
  {
8445
- "$ref": "#/components/schemas/ExternalCatalogCustomRequest"
8775
+ "oneOf": [
8776
+ {
8777
+ "$ref": "#/components/schemas/ExternalCatalogJourneyRequest"
8778
+ },
8779
+ {
8780
+ "$ref": "#/components/schemas/ExternalCatalogCustomRequest"
8781
+ }
8782
+ ]
8446
8783
  }
8447
8784
  ],
8448
8785
  "discriminator": {
@@ -8451,6 +8788,44 @@
8451
8788
  "journey": "#/components/schemas/ExternalCatalogJourneyRequest",
8452
8789
  "custom": "#/components/schemas/ExternalCatalogCustomRequest"
8453
8790
  }
8791
+ },
8792
+ "example": {
8793
+ "config": {
8794
+ "appId": "1234567890",
8795
+ "componentId": "1234567890",
8796
+ "hookId": "1234567890"
8797
+ },
8798
+ "origin": "journey",
8799
+ "context": {
8800
+ "journey_id": "8d0a2235-97ce-42d0-88a3-e374634ca44e",
8801
+ "entity_id": "9e1b3346-a8df-53e1-99b4-f485745db55f",
8802
+ "journey_name": "Product Selection Journey",
8803
+ "journey_tags": [
8804
+ "electricity",
8805
+ "residential"
8806
+ ],
8807
+ "journey_url_params": {
8808
+ "utm_source": "google",
8809
+ "utm_campaign": "spring2024"
8810
+ },
8811
+ "current_step_name": "Product Selection",
8812
+ "current_block_name": "Energy Products",
8813
+ "steps_data": [
8814
+ {
8815
+ "step_name": "Address Information",
8816
+ "step_index": 0,
8817
+ "blocks": {
8818
+ "Adresse": {
8819
+ "countryCode": "DE",
8820
+ "city": "Koblenz",
8821
+ "zipCode": "56068",
8822
+ "streetName": "Am Alten Hospital",
8823
+ "houseNumber": "123"
8824
+ }
8825
+ }
8826
+ }
8827
+ ]
8828
+ }
8454
8829
  }
8455
8830
  },
8456
8831
  "ExternalCatalogConfigurationRequest": {
@@ -8472,10 +8847,14 @@
8472
8847
  },
8473
8848
  "hookId": {
8474
8849
  "type": "string",
8475
- "description": "The hook id.",
8850
+ "description": "The hook id. If not provided, the first valid hook will be used.",
8476
8851
  "example": "1234567890"
8477
8852
  }
8478
- }
8853
+ },
8854
+ "required": [
8855
+ "appId",
8856
+ "componentId"
8857
+ ]
8479
8858
  }
8480
8859
  },
8481
8860
  "example": {
@@ -8487,102 +8866,45 @@
8487
8866
  }
8488
8867
  },
8489
8868
  "ExternalCatalogJourneyRequest": {
8490
- "allOf": [
8491
- {
8492
- "$ref": "#/components/schemas/ExternalCatalogConfigurationRequest"
8493
- },
8494
- {
8495
- "type": "object",
8496
- "description": "The request payload for the external catalog service with a journey context.",
8497
- "properties": {
8498
- "origin": {
8499
- "type": "string",
8500
- "description": "The origin of the request.",
8501
- "enum": [
8502
- "journey"
8503
- ],
8504
- "example": "journey"
8505
- },
8506
- "context": {
8507
- "$ref": "#/components/schemas/JourneyContext"
8508
- }
8509
- },
8510
- "additionalProperties": false,
8511
- "required": [
8512
- "origin",
8513
- "context"
8869
+ "type": "object",
8870
+ "description": "The request payload for the external catalog service with a journey context.",
8871
+ "properties": {
8872
+ "origin": {
8873
+ "type": "string",
8874
+ "description": "The origin of the request.",
8875
+ "enum": [
8876
+ "journey"
8514
8877
  ],
8515
- "example": {
8516
- "origin": "journey",
8517
- "context": {
8518
- "journey_id": "8d0a2235-97ce-42d0-88a3-e374634ca44e",
8519
- "entity_id": "9e1b3346-a8df-53e1-99b4-f485745db55f",
8520
- "journey_name": "Product Selection Journey",
8521
- "journey_tags": [
8522
- "electricity",
8523
- "residential"
8524
- ],
8525
- "journey_url_params": {
8526
- "utm_source": "google",
8527
- "utm_campaign": "spring2024"
8528
- },
8529
- "current_step_name": "Product Selection",
8530
- "current_block_name": "Energy Products",
8531
- "steps_data": [
8532
- {
8533
- "step_name": "Address Information",
8534
- "step_index": 0,
8535
- "blocks": {
8536
- "Adresse": {
8537
- "countryCode": "DE",
8538
- "city": "Koblenz",
8539
- "zipCode": "56068",
8540
- "streetName": "Am Alten Hospital",
8541
- "houseNumber": "123"
8542
- }
8543
- }
8544
- }
8545
- ]
8546
- }
8547
- }
8878
+ "example": "journey"
8879
+ },
8880
+ "context": {
8881
+ "$ref": "#/components/schemas/JourneyContext"
8548
8882
  }
8883
+ },
8884
+ "required": [
8885
+ "origin",
8886
+ "context"
8549
8887
  ]
8550
8888
  },
8551
8889
  "ExternalCatalogCustomRequest": {
8552
- "allOf": [
8553
- {
8554
- "$ref": "#/components/schemas/ExternalCatalogConfigurationRequest"
8555
- },
8556
- {
8557
- "type": "object",
8558
- "description": "The request payload for the external catalog service with a custom context. E.g. for requests from the Portal.",
8559
- "properties": {
8560
- "origin": {
8561
- "type": "string",
8562
- "description": "The origin of the request.",
8563
- "enum": [
8564
- "custom"
8565
- ],
8566
- "example": "custom"
8567
- },
8568
- "context": {
8569
- "$ref": "#/components/schemas/CustomContext"
8570
- }
8571
- },
8572
- "additionalProperties": false,
8573
- "required": [
8574
- "origin",
8575
- "context"
8890
+ "type": "object",
8891
+ "description": "The request payload for the external catalog service with a custom context. E.g. for requests from the Portal.",
8892
+ "properties": {
8893
+ "origin": {
8894
+ "type": "string",
8895
+ "description": "The origin of the request.",
8896
+ "enum": [
8897
+ "custom"
8576
8898
  ],
8577
- "example": {
8578
- "origin": "custom",
8579
- "context": {
8580
- "user_id": "user-12345",
8581
- "session_id": "session-67890",
8582
- "custom_context_key": "custom_context_value"
8583
- }
8584
- }
8899
+ "example": "custom"
8900
+ },
8901
+ "context": {
8902
+ "$ref": "#/components/schemas/CustomContext"
8585
8903
  }
8904
+ },
8905
+ "required": [
8906
+ "origin",
8907
+ "context"
8586
8908
  ]
8587
8909
  },
8588
8910
  "CustomContext": {
@@ -8761,6 +9083,9 @@
8761
9083
  "contract_id": {
8762
9084
  "type": "string",
8763
9085
  "description": "The contract id to be used as source for the recommendation"
9086
+ },
9087
+ "filters": {
9088
+ "$ref": "#/components/schemas/AvailabilityFilters"
8764
9089
  }
8765
9090
  }
8766
9091
  },
@@ -8787,14 +9112,26 @@
8787
9112
  "Offer": {
8788
9113
  "type": "object",
8789
9114
  "properties": {
8790
- "product_id": {
8791
- "type": "string"
8792
- },
8793
- "price_id": {
8794
- "type": "string"
8795
- },
8796
9115
  "target_id": {
8797
9116
  "type": "string"
9117
+ },
9118
+ "items": {
9119
+ "type": "array",
9120
+ "items": {
9121
+ "type": "object",
9122
+ "properties": {
9123
+ "price_id": {
9124
+ "type": "string"
9125
+ },
9126
+ "product_id": {
9127
+ "type": "string"
9128
+ }
9129
+ },
9130
+ "required": [
9131
+ "price_id",
9132
+ "product_id"
9133
+ ]
9134
+ }
8798
9135
  }
8799
9136
  }
8800
9137
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/pricing-client",
3
- "version": "3.51.3",
3
+ "version": "3.52.0",
4
4
  "description": "Client for epilot Pricing APIs",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",