@epilot/pricing-client 3.47.9-alpha.5 → 3.47.9-alpha.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/openapi.d.ts CHANGED
@@ -1086,14 +1086,9 @@ declare namespace Components {
1086
1086
  };
1087
1087
  external_fees_mappings?: /**
1088
1088
  * example:
1089
- * [
1090
- * {
1091
- * "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
1092
- * "frequency_unit": "weekly",
1093
- * "amount_total": 1000,
1094
- * "amount_total_decimal": "10.00"
1095
- * }
1096
- * ]
1089
+ * {
1090
+ * "$ref": "#/components/examples/external-fee-mappings/value"
1091
+ * }
1097
1092
  */
1098
1093
  ExternalFeeMappings;
1099
1094
  external_fees_metadata?: ExternalFeeMetadata;
@@ -1375,30 +1370,7 @@ declare namespace Components {
1375
1370
  * The coupon entity
1376
1371
  * example:
1377
1372
  * {
1378
- * "_id": "123e4567-e89b-12d3-a456-426614174000",
1379
- * "_schema": "coupon",
1380
- * "_org": "org_12345",
1381
- * "_created_at": "2024-01-15T10:00:00.000Z",
1382
- * "_updated_at": "2024-01-20T12:00:00.000Z",
1383
- * "_title": "Sample Coupon",
1384
- * "name": "Sample Coupon",
1385
- * "type": "fixed",
1386
- * "fixed_value": 555,
1387
- * "fixed_value_currency": "USD",
1388
- * "fixed_value_decimal": "5.55",
1389
- * "active": true,
1390
- * "prices": {
1391
- * "$relation": [
1392
- * {
1393
- * "entity_id": "abc12345-def6-7890-gh12-ijklmnopqrst",
1394
- * "_tags": [
1395
- * "discount",
1396
- * "special"
1397
- * ],
1398
- * "_schema": "price"
1399
- * }
1400
- * ]
1401
- * }
1373
+ * "$ref": "#/components/examples/coupon-without-promo-codes/value"
1402
1374
  * }
1403
1375
  */
1404
1376
  Coupon)[];
@@ -1954,14 +1926,9 @@ declare namespace Components {
1954
1926
  };
1955
1927
  external_fees_mappings?: /**
1956
1928
  * example:
1957
- * [
1958
- * {
1959
- * "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
1960
- * "frequency_unit": "weekly",
1961
- * "amount_total": 1000,
1962
- * "amount_total_decimal": "10.00"
1963
- * }
1964
- * ]
1929
+ * {
1930
+ * "$ref": "#/components/examples/external-fee-mappings/value"
1931
+ * }
1965
1932
  */
1966
1933
  ExternalFeeMappings;
1967
1934
  external_fees_metadata?: ExternalFeeMetadata;
@@ -2233,30 +2200,7 @@ declare namespace Components {
2233
2200
  * The coupon entity
2234
2201
  * example:
2235
2202
  * {
2236
- * "_id": "123e4567-e89b-12d3-a456-426614174000",
2237
- * "_schema": "coupon",
2238
- * "_org": "org_12345",
2239
- * "_created_at": "2024-01-15T10:00:00.000Z",
2240
- * "_updated_at": "2024-01-20T12:00:00.000Z",
2241
- * "_title": "Sample Coupon",
2242
- * "name": "Sample Coupon",
2243
- * "type": "fixed",
2244
- * "fixed_value": 555,
2245
- * "fixed_value_currency": "USD",
2246
- * "fixed_value_decimal": "5.55",
2247
- * "active": true,
2248
- * "prices": {
2249
- * "$relation": [
2250
- * {
2251
- * "entity_id": "abc12345-def6-7890-gh12-ijklmnopqrst",
2252
- * "_tags": [
2253
- * "discount",
2254
- * "special"
2255
- * ],
2256
- * "_schema": "price"
2257
- * }
2258
- * ]
2259
- * }
2203
+ * "$ref": "#/components/examples/coupon-without-promo-codes/value"
2260
2204
  * }
2261
2205
  */
2262
2206
  export interface Coupon {
@@ -2335,10 +2279,7 @@ declare namespace Components {
2335
2279
  promo_codes?: /**
2336
2280
  * example:
2337
2281
  * {
2338
- * "id": "123e4567-e89b-12d3-a456-426614174000",
2339
- * "code": "123456",
2340
- * "has_usage_limit": true,
2341
- * "usage_limit": 10
2282
+ * "$ref": "#/components/examples/promo-code/value"
2342
2283
  * }
2343
2284
  */
2344
2285
  PromoCode[];
@@ -2417,30 +2358,7 @@ declare namespace Components {
2417
2358
  * The base for the coupon entity without promo codes
2418
2359
  * example:
2419
2360
  * {
2420
- * "_id": "123e4567-e89b-12d3-a456-426614174000",
2421
- * "_schema": "coupon",
2422
- * "_org": "org_12345",
2423
- * "_created_at": "2024-01-15T10:00:00.000Z",
2424
- * "_updated_at": "2024-01-20T12:00:00.000Z",
2425
- * "_title": "Sample Coupon",
2426
- * "name": "Sample Coupon",
2427
- * "type": "fixed",
2428
- * "fixed_value": 555,
2429
- * "fixed_value_currency": "USD",
2430
- * "fixed_value_decimal": "5.55",
2431
- * "active": true,
2432
- * "prices": {
2433
- * "$relation": [
2434
- * {
2435
- * "entity_id": "abc12345-def6-7890-gh12-ijklmnopqrst",
2436
- * "_tags": [
2437
- * "discount",
2438
- * "special"
2439
- * ],
2440
- * "_schema": "price"
2441
- * }
2442
- * ]
2443
- * }
2361
+ * "$ref": "#/components/examples/coupon-without-promo-codes/value"
2444
2362
  * }
2445
2363
  */
2446
2364
  export interface CouponWithoutPromoCodes {
@@ -2548,15 +2466,7 @@ declare namespace Components {
2548
2466
  /**
2549
2467
  * example:
2550
2468
  * {
2551
- * "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
2552
- * "_org": "123",
2553
- * "_schema": "contact",
2554
- * "_tags": [
2555
- * "example",
2556
- * "mock"
2557
- * ],
2558
- * "_created_at": "2021-02-09T12:41:43.662Z",
2559
- * "_updated_at": "2021-02-09T12:41:43.662Z"
2469
+ * "$ref": "#/components/examples/entity-item/value"
2560
2470
  * }
2561
2471
  */
2562
2472
  export interface EntityItem {
@@ -2603,10 +2513,7 @@ declare namespace Components {
2603
2513
  /**
2604
2514
  * example:
2605
2515
  * {
2606
- * "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
2607
- * "frequency_unit": "weekly",
2608
- * "amount_total": 1000,
2609
- * "amount_total_decimal": "10.00"
2516
+ * "$ref": "#/components/examples/external-fee-mapping/value"
2610
2517
  * }
2611
2518
  */
2612
2519
  export interface ExternalFeeMapping {
@@ -2617,22 +2524,14 @@ declare namespace Components {
2617
2524
  }
2618
2525
  /**
2619
2526
  * example:
2620
- * [
2621
- * {
2622
- * "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
2623
- * "frequency_unit": "weekly",
2624
- * "amount_total": 1000,
2625
- * "amount_total_decimal": "10.00"
2626
- * }
2627
- * ]
2527
+ * {
2528
+ * "$ref": "#/components/examples/external-fee-mappings/value"
2529
+ * }
2628
2530
  */
2629
2531
  export type ExternalFeeMappings = /**
2630
2532
  * example:
2631
2533
  * {
2632
- * "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
2633
- * "frequency_unit": "weekly",
2634
- * "amount_total": 1000,
2635
- * "amount_total_decimal": "10.00"
2534
+ * "$ref": "#/components/examples/external-fee-mapping/value"
2636
2535
  * }
2637
2536
  */
2638
2537
  ExternalFeeMapping[];
@@ -3126,6 +3025,11 @@ declare namespace Components {
3126
3025
  */
3127
3026
  base_url?: string;
3128
3027
  }
3028
+ export interface Offer {
3029
+ product_id?: string;
3030
+ price_id?: string;
3031
+ target_id?: string;
3032
+ }
3129
3033
  /**
3130
3034
  * The opportunity entity
3131
3035
  * example:
@@ -3652,20 +3556,7 @@ declare namespace Components {
3652
3556
  * the tax configuration
3653
3557
  * example:
3654
3558
  * {
3655
- * "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
3656
- * "type": "VAT",
3657
- * "description": "Tax description",
3658
- * "active": "true",
3659
- * "region": "DE",
3660
- * "region_label": "Germany",
3661
- * "_org": "123",
3662
- * "_schema": "tax",
3663
- * "_tags": [
3664
- * "example",
3665
- * "mock"
3666
- * ],
3667
- * "_created_at": "2021-02-09T12:41:43.662Z",
3668
- * "_updated_at": "2021-02-09T12:41:43.662Z"
3559
+ * "$ref": "#/components/examples/tax/value"
3669
3560
  * }
3670
3561
  */
3671
3562
  Tax[];
@@ -3867,14 +3758,7 @@ declare namespace Components {
3867
3758
  /**
3868
3759
  * example:
3869
3760
  * {
3870
- * "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
3871
- * "frequency_unit": "weekly",
3872
- * "value": 1000.245,
3873
- * "name": "avg consumption",
3874
- * "metadata": {
3875
- * "journey_title": "energy journey",
3876
- * "step_name": "avg consumption picker"
3877
- * }
3761
+ * "$ref": "#/components/examples/price-input-mapping/value"
3878
3762
  * }
3879
3763
  */
3880
3764
  export interface PriceInputMapping {
@@ -3904,14 +3788,7 @@ declare namespace Components {
3904
3788
  export type PriceInputMappings = /**
3905
3789
  * example:
3906
3790
  * {
3907
- * "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
3908
- * "frequency_unit": "weekly",
3909
- * "value": 1000.245,
3910
- * "name": "avg consumption",
3911
- * "metadata": {
3912
- * "journey_title": "energy journey",
3913
- * "step_name": "avg consumption picker"
3914
- * }
3791
+ * "$ref": "#/components/examples/price-input-mapping/value"
3915
3792
  * }
3916
3793
  */
3917
3794
  PriceInputMapping[];
@@ -4266,7 +4143,7 @@ declare namespace Components {
4266
4143
  /**
4267
4144
  * The price billing period.
4268
4145
  */
4269
- billing_period?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly";
4146
+ billing_period?: /* The price billing period. */ BillingPeriod;
4270
4147
  pricing_model: /**
4271
4148
  * Describes how to compute the price per period. Either `per_unit`, `tiered_graduated` or `tiered_volume`.
4272
4149
  * - `per_unit` indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity
@@ -4433,14 +4310,9 @@ declare namespace Components {
4433
4310
  };
4434
4311
  external_fees_mappings?: /**
4435
4312
  * example:
4436
- * [
4437
- * {
4438
- * "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
4439
- * "frequency_unit": "weekly",
4440
- * "amount_total": 1000,
4441
- * "amount_total_decimal": "10.00"
4442
- * }
4443
- * ]
4313
+ * {
4314
+ * "$ref": "#/components/examples/external-fee-mappings/value"
4315
+ * }
4444
4316
  */
4445
4317
  ExternalFeeMappings;
4446
4318
  external_fees_metadata?: ExternalFeeMetadata;
@@ -4469,7 +4341,7 @@ declare namespace Components {
4469
4341
  /**
4470
4342
  * The price billing period.
4471
4343
  */
4472
- billing_period?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly";
4344
+ billing_period?: /* The price billing period. */ BillingPeriod;
4473
4345
  /**
4474
4346
  * The unit amount value
4475
4347
  */
@@ -4598,20 +4470,7 @@ declare namespace Components {
4598
4470
  * the tax configuration
4599
4471
  * example:
4600
4472
  * {
4601
- * "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
4602
- * "type": "VAT",
4603
- * "description": "Tax description",
4604
- * "active": "true",
4605
- * "region": "DE",
4606
- * "region_label": "Germany",
4607
- * "_org": "123",
4608
- * "_schema": "tax",
4609
- * "_tags": [
4610
- * "example",
4611
- * "mock"
4612
- * ],
4613
- * "_created_at": "2021-02-09T12:41:43.662Z",
4614
- * "_updated_at": "2021-02-09T12:41:43.662Z"
4473
+ * "$ref": "#/components/examples/tax/value"
4615
4474
  * }
4616
4475
  */
4617
4476
  Tax[];
@@ -4945,10 +4804,80 @@ declare namespace Components {
4945
4804
  /**
4946
4805
  * example:
4947
4806
  * {
4948
- * "id": "123e4567-e89b-12d3-a456-426614174000",
4949
- * "code": "123456",
4950
- * "has_usage_limit": true,
4951
- * "usage_limit": 10
4807
+ * "$ref": "#/components/examples/entity-item/value"
4808
+ * }
4809
+ */
4810
+ export interface ProductRecommendation {
4811
+ _id: EntityId /* uuid */;
4812
+ /**
4813
+ * Title of entity
4814
+ */
4815
+ _title: string;
4816
+ /**
4817
+ * Organization Id the entity belongs to
4818
+ */
4819
+ _org: string;
4820
+ _schema: string;
4821
+ _tags?: string[];
4822
+ _created_at: string; // date-time
4823
+ _updated_at: string; // date-time
4824
+ /**
4825
+ * Price being used as source
4826
+ */
4827
+ source_price?: {
4828
+ $relation?: EntityRelation[];
4829
+ };
4830
+ /**
4831
+ * Product being used as source
4832
+ */
4833
+ source_product?: {
4834
+ $relation?: EntityRelation[];
4835
+ };
4836
+ /**
4837
+ * Type of product recommendation
4838
+ */
4839
+ type?: "change" | "cross-sell" | "up-sell";
4840
+ offer?: Offer[];
4841
+ }
4842
+ /**
4843
+ * Product recommendations request payload
4844
+ */
4845
+ export interface ProductRecommendationResponse {
4846
+ /**
4847
+ * The number os results returned.
4848
+ */
4849
+ hits?: number;
4850
+ results?: /**
4851
+ * example:
4852
+ * {
4853
+ * "$ref": "#/components/examples/entity-item/value"
4854
+ * }
4855
+ */
4856
+ ProductRecommendation[];
4857
+ }
4858
+ /**
4859
+ * Product recommendations request payload
4860
+ */
4861
+ export interface ProductRecommendationSearch {
4862
+ product_recommendation_ids?: string[];
4863
+ /**
4864
+ * The catalog item to be used as source for the recommendation
4865
+ */
4866
+ catalog_item?: {
4867
+ /**
4868
+ * Product id
4869
+ */
4870
+ product_id?: string;
4871
+ /**
4872
+ * Product id
4873
+ */
4874
+ price_id?: string;
4875
+ };
4876
+ }
4877
+ /**
4878
+ * example:
4879
+ * {
4880
+ * "$ref": "#/components/examples/promo-code/value"
4952
4881
  * }
4953
4882
  */
4954
4883
  export interface PromoCode {
@@ -4977,30 +4906,7 @@ declare namespace Components {
4977
4906
  * The base for the coupon entity without promo codes
4978
4907
  * example:
4979
4908
  * {
4980
- * "_id": "123e4567-e89b-12d3-a456-426614174000",
4981
- * "_schema": "coupon",
4982
- * "_org": "org_12345",
4983
- * "_created_at": "2024-01-15T10:00:00.000Z",
4984
- * "_updated_at": "2024-01-20T12:00:00.000Z",
4985
- * "_title": "Sample Coupon",
4986
- * "name": "Sample Coupon",
4987
- * "type": "fixed",
4988
- * "fixed_value": 555,
4989
- * "fixed_value_currency": "USD",
4990
- * "fixed_value_decimal": "5.55",
4991
- * "active": true,
4992
- * "prices": {
4993
- * "$relation": [
4994
- * {
4995
- * "entity_id": "abc12345-def6-7890-gh12-ijklmnopqrst",
4996
- * "_tags": [
4997
- * "discount",
4998
- * "special"
4999
- * ],
5000
- * "_schema": "price"
5001
- * }
5002
- * ]
5003
- * }
4909
+ * "$ref": "#/components/examples/coupon-without-promo-codes/value"
5004
4910
  * }
5005
4911
  */
5006
4912
  CouponWithoutPromoCodes[];
@@ -5085,7 +4991,7 @@ declare namespace Components {
5085
4991
  /**
5086
4992
  * The price billing period.
5087
4993
  */
5088
- billing_period?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly";
4994
+ billing_period?: /* The price billing period. */ BillingPeriod;
5089
4995
  /**
5090
4996
  * The unit gross amount value.
5091
4997
  */
@@ -5178,7 +5084,7 @@ declare namespace Components {
5178
5084
  /**
5179
5085
  * The price billing period.
5180
5086
  */
5181
- billing_period?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly";
5087
+ billing_period?: /* The price billing period. */ BillingPeriod;
5182
5088
  /**
5183
5089
  * The unit gross amount value.
5184
5090
  */
@@ -5203,7 +5109,7 @@ declare namespace Components {
5203
5109
  /**
5204
5110
  * The price billing period.
5205
5111
  */
5206
- billing_period?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly";
5112
+ billing_period?: /* The price billing period. */ BillingPeriod;
5207
5113
  /**
5208
5114
  * Total amount of items with same recurrence.
5209
5115
  */
@@ -5235,30 +5141,7 @@ declare namespace Components {
5235
5141
  * The base for the coupon entity without promo codes
5236
5142
  * example:
5237
5143
  * {
5238
- * "_id": "123e4567-e89b-12d3-a456-426614174000",
5239
- * "_schema": "coupon",
5240
- * "_org": "org_12345",
5241
- * "_created_at": "2024-01-15T10:00:00.000Z",
5242
- * "_updated_at": "2024-01-20T12:00:00.000Z",
5243
- * "_title": "Sample Coupon",
5244
- * "name": "Sample Coupon",
5245
- * "type": "fixed",
5246
- * "fixed_value": 555,
5247
- * "fixed_value_currency": "USD",
5248
- * "fixed_value_decimal": "5.55",
5249
- * "active": true,
5250
- * "prices": {
5251
- * "$relation": [
5252
- * {
5253
- * "entity_id": "abc12345-def6-7890-gh12-ijklmnopqrst",
5254
- * "_tags": [
5255
- * "discount",
5256
- * "special"
5257
- * ],
5258
- * "_schema": "price"
5259
- * }
5260
- * ]
5261
- * }
5144
+ * "$ref": "#/components/examples/coupon-without-promo-codes/value"
5262
5145
  * }
5263
5146
  */
5264
5147
  CouponWithoutPromoCodes[];
@@ -5360,20 +5243,7 @@ declare namespace Components {
5360
5243
  * the tax configuration
5361
5244
  * example:
5362
5245
  * {
5363
- * "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
5364
- * "type": "VAT",
5365
- * "description": "Tax description",
5366
- * "active": "true",
5367
- * "region": "DE",
5368
- * "region_label": "Germany",
5369
- * "_org": "123",
5370
- * "_schema": "tax",
5371
- * "_tags": [
5372
- * "example",
5373
- * "mock"
5374
- * ],
5375
- * "_created_at": "2021-02-09T12:41:43.662Z",
5376
- * "_updated_at": "2021-02-09T12:41:43.662Z"
5246
+ * "$ref": "#/components/examples/tax/value"
5377
5247
  * }
5378
5248
  */
5379
5249
  export interface Tax {
@@ -5425,20 +5295,7 @@ declare namespace Components {
5425
5295
  * the tax configuration
5426
5296
  * example:
5427
5297
  * {
5428
- * "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
5429
- * "type": "VAT",
5430
- * "description": "Tax description",
5431
- * "active": "true",
5432
- * "region": "DE",
5433
- * "region_label": "Germany",
5434
- * "_org": "123",
5435
- * "_schema": "tax",
5436
- * "_tags": [
5437
- * "example",
5438
- * "mock"
5439
- * ],
5440
- * "_created_at": "2021-02-09T12:41:43.662Z",
5441
- * "_updated_at": "2021-02-09T12:41:43.662Z"
5298
+ * "$ref": "#/components/examples/tax/value"
5442
5299
  * }
5443
5300
  */
5444
5301
  Tax;
@@ -5475,20 +5332,7 @@ declare namespace Components {
5475
5332
  * the tax configuration
5476
5333
  * example:
5477
5334
  * {
5478
- * "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
5479
- * "type": "VAT",
5480
- * "description": "Tax description",
5481
- * "active": "true",
5482
- * "region": "DE",
5483
- * "region_label": "Germany",
5484
- * "_org": "123",
5485
- * "_schema": "tax",
5486
- * "_tags": [
5487
- * "example",
5488
- * "mock"
5489
- * ],
5490
- * "_created_at": "2021-02-09T12:41:43.662Z",
5491
- * "_updated_at": "2021-02-09T12:41:43.662Z"
5335
+ * "$ref": "#/components/examples/tax/value"
5492
5336
  * }
5493
5337
  */
5494
5338
  Tax;
@@ -5758,6 +5602,19 @@ declare namespace Paths {
5758
5602
  export type $400 = Components.Schemas.Error;
5759
5603
  }
5760
5604
  }
5605
+ namespace $ProductRecommendations {
5606
+ export interface HeaderParameters {
5607
+ "X-Ivy-Org-ID"?: Parameters.XIvyOrgID;
5608
+ }
5609
+ namespace Parameters {
5610
+ export type XIvyOrgID = string;
5611
+ }
5612
+ export type RequestBody = /* Product recommendations request payload */ Components.Schemas.ProductRecommendationSearch;
5613
+ namespace Responses {
5614
+ export type $200 = /* Product recommendations request payload */ Components.Schemas.ProductRecommendationResponse;
5615
+ export type $400 = Components.Schemas.Error;
5616
+ }
5617
+ }
5761
5618
  namespace $SaveCredentials {
5762
5619
  namespace Parameters {
5763
5620
  export type IntegrationId = Components.Schemas.IntegrationId;
@@ -6142,6 +5999,16 @@ export interface OperationMethods {
6142
5999
  data?: any,
6143
6000
  config?: AxiosRequestConfig
6144
6001
  ): OperationResponse<Paths.$DeleteCredentials.Responses.$204>
6002
+ /**
6003
+ * $productRecommendations - productRecommendations
6004
+ *
6005
+ * Get a list of product recommendations based on the search parameters.
6006
+ */
6007
+ '$productRecommendations'(
6008
+ parameters?: Parameters<Paths.$ProductRecommendations.HeaderParameters> | null,
6009
+ data?: Paths.$ProductRecommendations.RequestBody,
6010
+ config?: AxiosRequestConfig
6011
+ ): OperationResponse<Paths.$ProductRecommendations.Responses.$200>
6145
6012
  }
6146
6013
 
6147
6014
  export interface PathsDictionary {
@@ -6372,6 +6239,18 @@ export interface PathsDictionary {
6372
6239
  config?: AxiosRequestConfig
6373
6240
  ): OperationResponse<Paths.$DeleteCredentials.Responses.$204>
6374
6241
  }
6242
+ ['/v1/public/product-recommendations']: {
6243
+ /**
6244
+ * $productRecommendations - productRecommendations
6245
+ *
6246
+ * Get a list of product recommendations based on the search parameters.
6247
+ */
6248
+ 'post'(
6249
+ parameters?: Parameters<Paths.$ProductRecommendations.HeaderParameters> | null,
6250
+ data?: Paths.$ProductRecommendations.RequestBody,
6251
+ config?: AxiosRequestConfig
6252
+ ): OperationResponse<Paths.$ProductRecommendations.Responses.$200>
6253
+ }
6375
6254
  }
6376
6255
 
6377
6256
  export type Client = OpenAPIClient<OperationMethods, PathsDictionary>
@@ -6444,6 +6323,7 @@ export type MetaData = Components.Schemas.MetaData;
6444
6323
  export type NonHydratedCompositePrice = Components.Schemas.NonHydratedCompositePrice;
6445
6324
  export type OAuthCredentials = Components.Schemas.OAuthCredentials;
6446
6325
  export type OAuthIntegration = Components.Schemas.OAuthIntegration;
6326
+ export type Offer = Components.Schemas.Offer;
6447
6327
  export type Opportunity = Components.Schemas.Opportunity;
6448
6328
  export type OpportunitySource = Components.Schemas.OpportunitySource;
6449
6329
  export type Order = Components.Schemas.Order;
@@ -6473,6 +6353,9 @@ export type PricingDetailsResponse = Components.Schemas.PricingDetailsResponse;
6473
6353
  export type PricingModel = Components.Schemas.PricingModel;
6474
6354
  export type Product = Components.Schemas.Product;
6475
6355
  export type ProductCategory = Components.Schemas.ProductCategory;
6356
+ export type ProductRecommendation = Components.Schemas.ProductRecommendation;
6357
+ export type ProductRecommendationResponse = Components.Schemas.ProductRecommendationResponse;
6358
+ export type ProductRecommendationSearch = Components.Schemas.ProductRecommendationSearch;
6476
6359
  export type PromoCode = Components.Schemas.PromoCode;
6477
6360
  export type PromoCodeValidationResponse = Components.Schemas.PromoCodeValidationResponse;
6478
6361
  export type Provider = Components.Schemas.Provider;
package/dist/openapi.json CHANGED
@@ -2211,6 +2211,133 @@
2211
2211
  }
2212
2212
  }
2213
2213
  }
2214
+ },
2215
+ "/v1/public/product-recommendations": {
2216
+ "post": {
2217
+ "description": "Get a list of product recommendations based on the search parameters.",
2218
+ "operationId": "$productRecommendations",
2219
+ "summary": "productRecommendations",
2220
+ "security": [
2221
+ {
2222
+ "EpilotPublicAuth": []
2223
+ }
2224
+ ],
2225
+ "tags": [
2226
+ "Product Recommendations API"
2227
+ ],
2228
+ "parameters": [
2229
+ {
2230
+ "in": "header",
2231
+ "name": "X-Ivy-Org-ID",
2232
+ "description": "The target Organization Id represented by the caller",
2233
+ "example": 739224,
2234
+ "schema": {
2235
+ "type": "string"
2236
+ }
2237
+ }
2238
+ ],
2239
+ "requestBody": {
2240
+ "required": true,
2241
+ "content": {
2242
+ "application/json": {
2243
+ "schema": {
2244
+ "$ref": "#/components/schemas/ProductRecommendationSearch"
2245
+ },
2246
+ "examples": {
2247
+ "Search product recommendations by id": {
2248
+ "value": {
2249
+ "product_recommendation_ids": [
2250
+ "bae8d40a-0093-483a-b4f9-3653800b6781"
2251
+ ]
2252
+ }
2253
+ },
2254
+ "Search product recommendations source product and price": {
2255
+ "value": {
2256
+ "catalog_item": {
2257
+ "product_id": "aa1ebf85-f36e-46ff-978c-ed948c646f12",
2258
+ "price_id": "4ecf9a61-a974-4594-bae2-bcb798f54d76"
2259
+ }
2260
+ }
2261
+ }
2262
+ }
2263
+ }
2264
+ }
2265
+ },
2266
+ "responses": {
2267
+ "200": {
2268
+ "description": "The product recommendations result",
2269
+ "content": {
2270
+ "application/json": {
2271
+ "schema": {
2272
+ "$ref": "#/components/schemas/ProductRecommendationResponse"
2273
+ },
2274
+ "examples": {
2275
+ "Product recommendations": {
2276
+ "value": {
2277
+ "hits": 1,
2278
+ "results": [
2279
+ {
2280
+ "_title": "Tarifwechsel 2025",
2281
+ "_created_at": "2025-01-29T15:46:41.014Z",
2282
+ "_updated_at": "2025-01-29T15:46:41.014Z",
2283
+ "name": "Tarifwechsel 2025",
2284
+ "type": "change",
2285
+ "source_product": {
2286
+ "$relation": [
2287
+ {
2288
+ "entity_id": "e2b12b54-d904-42b7-ac44-802d8ebaadf4"
2289
+ }
2290
+ ]
2291
+ },
2292
+ "source_price": {
2293
+ "$relation": [
2294
+ {
2295
+ "entity_id": "255877f3-f9c2-483e-9c71-89088c142bfc"
2296
+ }
2297
+ ]
2298
+ },
2299
+ "_schema": "product_recommendation",
2300
+ "offers": [
2301
+ {
2302
+ "target_id": "f9aa8757-505b-46bd-9310-605d64849565",
2303
+ "items": [
2304
+ {
2305
+ "product_id": "70ad8a08-46c2-473b-b1c5-8bccfb85e452",
2306
+ "price_id": "26c9c39d-db4a-4132-af2e-86ab5c7b156c"
2307
+ },
2308
+ {
2309
+ "product_id": "dd97a2a4-e48b-43c5-8717-7ac563c67e05",
2310
+ "price_id": "4ecf9a61-a974-4594-bae2-bcb798f54d76"
2311
+ },
2312
+ {
2313
+ "product_id": "aa1ebf85-f36e-46ff-978c-ed948c646f12",
2314
+ "price_id": "4ecf9a61-a974-4594-bae2-bcb798f54d76"
2315
+ }
2316
+ ]
2317
+ }
2318
+ ],
2319
+ "_id": "6d872912-ef8a-4815-b9db-01744c0828ac",
2320
+ "_org": "739224"
2321
+ }
2322
+ ]
2323
+ }
2324
+ }
2325
+ }
2326
+ }
2327
+ }
2328
+ },
2329
+ "400": {
2330
+ "description": "Invalid payload",
2331
+ "content": {
2332
+ "application/json": {
2333
+ "schema": {
2334
+ "$ref": "#/components/schemas/Error"
2335
+ }
2336
+ }
2337
+ }
2338
+ }
2339
+ }
2340
+ }
2214
2341
  }
2215
2342
  },
2216
2343
  "components": {
@@ -3254,14 +3381,7 @@
3254
3381
  }
3255
3382
  },
3256
3383
  "example": {
3257
- "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
3258
- "frequency_unit": "weekly",
3259
- "value": 1000.245,
3260
- "name": "avg consumption",
3261
- "metadata": {
3262
- "journey_title": "energy journey",
3263
- "step_name": "avg consumption picker"
3264
- }
3384
+ "$ref": "#/components/examples/price-input-mapping/value"
3265
3385
  }
3266
3386
  },
3267
3387
  "PriceConditions": {
@@ -3354,14 +3474,9 @@
3354
3474
  "items": {
3355
3475
  "$ref": "#/components/schemas/ExternalFeeMapping"
3356
3476
  },
3357
- "example": [
3358
- {
3359
- "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
3360
- "frequency_unit": "weekly",
3361
- "amount_total": 1000,
3362
- "amount_total_decimal": "10.00"
3363
- }
3364
- ]
3477
+ "example": {
3478
+ "$ref": "#/components/examples/external-fee-mappings/value"
3479
+ }
3365
3480
  },
3366
3481
  "ExternalFeeMapping": {
3367
3482
  "type": "object",
@@ -3388,10 +3503,7 @@
3388
3503
  }
3389
3504
  },
3390
3505
  "example": {
3391
- "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
3392
- "frequency_unit": "weekly",
3393
- "amount_total": 1000,
3394
- "amount_total_decimal": "10.00"
3506
+ "$ref": "#/components/examples/external-fee-mapping/value"
3395
3507
  }
3396
3508
  },
3397
3509
  "CatalogSearch": {
@@ -4562,14 +4674,11 @@
4562
4674
  ]
4563
4675
  },
4564
4676
  "billing_period": {
4565
- "type": "string",
4566
4677
  "description": "The price billing period.",
4567
- "enum": [
4568
- "weekly",
4569
- "monthly",
4570
- "every_quarter",
4571
- "every_6_months",
4572
- "yearly"
4678
+ "oneOf": [
4679
+ {
4680
+ "$ref": "#/components/schemas/BillingPeriod"
4681
+ }
4573
4682
  ]
4574
4683
  },
4575
4684
  "unit_amount": {
@@ -4731,14 +4840,11 @@
4731
4840
  "description": "The price type."
4732
4841
  },
4733
4842
  "billing_period": {
4734
- "type": "string",
4735
4843
  "description": "The price billing period.",
4736
- "enum": [
4737
- "weekly",
4738
- "monthly",
4739
- "every_quarter",
4740
- "every_6_months",
4741
- "yearly"
4844
+ "oneOf": [
4845
+ {
4846
+ "$ref": "#/components/schemas/BillingPeriod"
4847
+ }
4742
4848
  ]
4743
4849
  },
4744
4850
  "unit_amount_gross": {
@@ -5252,14 +5358,11 @@
5252
5358
  ]
5253
5359
  },
5254
5360
  "billing_period": {
5255
- "type": "string",
5256
5361
  "description": "The price billing period.",
5257
- "enum": [
5258
- "weekly",
5259
- "monthly",
5260
- "every_quarter",
5261
- "every_6_months",
5262
- "yearly"
5362
+ "oneOf": [
5363
+ {
5364
+ "$ref": "#/components/schemas/BillingPeriod"
5365
+ }
5263
5366
  ]
5264
5367
  },
5265
5368
  "pricing_model": {
@@ -5351,14 +5454,11 @@
5351
5454
  "description": "The price type."
5352
5455
  },
5353
5456
  "billing_period": {
5354
- "type": "string",
5355
5457
  "description": "The price billing period.",
5356
- "enum": [
5357
- "weekly",
5358
- "monthly",
5359
- "every_quarter",
5360
- "every_6_months",
5361
- "yearly"
5458
+ "oneOf": [
5459
+ {
5460
+ "$ref": "#/components/schemas/BillingPeriod"
5461
+ }
5362
5462
  ]
5363
5463
  },
5364
5464
  "unit_amount_gross": {
@@ -5421,14 +5521,11 @@
5421
5521
  "description": "The price type."
5422
5522
  },
5423
5523
  "billing_period": {
5424
- "type": "string",
5425
5524
  "description": "The price billing period.",
5426
- "enum": [
5427
- "weekly",
5428
- "monthly",
5429
- "every_quarter",
5430
- "every_6_months",
5431
- "yearly"
5525
+ "oneOf": [
5526
+ {
5527
+ "$ref": "#/components/schemas/BillingPeriod"
5528
+ }
5432
5529
  ]
5433
5530
  },
5434
5531
  "amount_total": {
@@ -5901,15 +5998,7 @@
5901
5998
  "_updated_at"
5902
5999
  ],
5903
6000
  "example": {
5904
- "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
5905
- "_org": "123",
5906
- "_schema": "contact",
5907
- "_tags": [
5908
- "example",
5909
- "mock"
5910
- ],
5911
- "_created_at": "2021-02-09T12:41:43.662Z",
5912
- "_updated_at": "2021-02-09T12:41:43.662Z"
6001
+ "$ref": "#/components/examples/entity-item/value"
5913
6002
  }
5914
6003
  },
5915
6004
  "EntityRelation": {
@@ -5996,20 +6085,7 @@
5996
6085
  }
5997
6086
  },
5998
6087
  "example": {
5999
- "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
6000
- "type": "VAT",
6001
- "description": "Tax description",
6002
- "active": "true",
6003
- "region": "DE",
6004
- "region_label": "Germany",
6005
- "_org": "123",
6006
- "_schema": "tax",
6007
- "_tags": [
6008
- "example",
6009
- "mock"
6010
- ],
6011
- "_created_at": "2021-02-09T12:41:43.662Z",
6012
- "_updated_at": "2021-02-09T12:41:43.662Z"
6088
+ "$ref": "#/components/examples/tax/value"
6013
6089
  }
6014
6090
  },
6015
6091
  "TaxBreakdownInfo": {
@@ -6182,30 +6258,7 @@
6182
6258
  }
6183
6259
  },
6184
6260
  "example": {
6185
- "_id": "123e4567-e89b-12d3-a456-426614174000",
6186
- "_schema": "coupon",
6187
- "_org": "org_12345",
6188
- "_created_at": "2024-01-15T10:00:00.000Z",
6189
- "_updated_at": "2024-01-20T12:00:00.000Z",
6190
- "_title": "Sample Coupon",
6191
- "name": "Sample Coupon",
6192
- "type": "fixed",
6193
- "fixed_value": 555,
6194
- "fixed_value_currency": "USD",
6195
- "fixed_value_decimal": "5.55",
6196
- "active": true,
6197
- "prices": {
6198
- "$relation": [
6199
- {
6200
- "entity_id": "abc12345-def6-7890-gh12-ijklmnopqrst",
6201
- "_tags": [
6202
- "discount",
6203
- "special"
6204
- ],
6205
- "_schema": "price"
6206
- }
6207
- ]
6208
- }
6261
+ "$ref": "#/components/examples/coupon-without-promo-codes/value"
6209
6262
  }
6210
6263
  },
6211
6264
  "Coupon": {
@@ -6266,10 +6319,7 @@
6266
6319
  }
6267
6320
  },
6268
6321
  "example": {
6269
- "id": "123e4567-e89b-12d3-a456-426614174000",
6270
- "code": "123456",
6271
- "has_usage_limit": true,
6272
- "usage_limit": 10
6322
+ "$ref": "#/components/examples/promo-code/value"
6273
6323
  }
6274
6324
  },
6275
6325
  "RedeemedPromo": {
@@ -6703,6 +6753,112 @@
6703
6753
  "pricing_details",
6704
6754
  "_meta"
6705
6755
  ]
6756
+ },
6757
+ "ProductRecommendationSearch": {
6758
+ "description": "Product recommendations request payload",
6759
+ "type": "object",
6760
+ "properties": {
6761
+ "product_recommendation_ids": {
6762
+ "type": "array",
6763
+ "items": {
6764
+ "type": "string",
6765
+ "description": "Product recommendation id"
6766
+ }
6767
+ },
6768
+ "catalog_item": {
6769
+ "type": "object",
6770
+ "description": "The catalog item to be used as source for the recommendation",
6771
+ "properties": {
6772
+ "product_id": {
6773
+ "type": "string",
6774
+ "description": "Product id"
6775
+ },
6776
+ "price_id": {
6777
+ "type": "string",
6778
+ "description": "Product id"
6779
+ }
6780
+ }
6781
+ }
6782
+ }
6783
+ },
6784
+ "ProductRecommendationResponse": {
6785
+ "description": "Product recommendations request payload",
6786
+ "type": "object",
6787
+ "properties": {
6788
+ "hits": {
6789
+ "type": "number",
6790
+ "description": "The number os results returned."
6791
+ },
6792
+ "results": {
6793
+ "type": "array",
6794
+ "items": {
6795
+ "$ref": "#/components/schemas/ProductRecommendation"
6796
+ }
6797
+ }
6798
+ }
6799
+ },
6800
+ "Offer": {
6801
+ "type": "object",
6802
+ "properties": {
6803
+ "product_id": {
6804
+ "type": "string"
6805
+ },
6806
+ "price_id": {
6807
+ "type": "string"
6808
+ },
6809
+ "target_id": {
6810
+ "type": "string"
6811
+ }
6812
+ }
6813
+ },
6814
+ "ProductRecommendation": {
6815
+ "allOf": [
6816
+ {
6817
+ "$ref": "#/components/schemas/EntityItem"
6818
+ }
6819
+ ],
6820
+ "type": "object",
6821
+ "properties": {
6822
+ "source_price": {
6823
+ "type": "object",
6824
+ "description": "Price being used as source",
6825
+ "properties": {
6826
+ "$relation": {
6827
+ "type": "array",
6828
+ "items": {
6829
+ "$ref": "#/components/schemas/EntityRelation"
6830
+ }
6831
+ }
6832
+ }
6833
+ },
6834
+ "source_product": {
6835
+ "type": "object",
6836
+ "description": "Product being used as source",
6837
+ "properties": {
6838
+ "$relation": {
6839
+ "type": "array",
6840
+ "items": {
6841
+ "$ref": "#/components/schemas/EntityRelation"
6842
+ }
6843
+ }
6844
+ }
6845
+ },
6846
+ "type": {
6847
+ "type": "string",
6848
+ "description": "Type of product recommendation",
6849
+ "enum": [
6850
+ "change",
6851
+ "cross-sell",
6852
+ "up-sell"
6853
+ ]
6854
+ },
6855
+ "offer": {
6856
+ "type": "array",
6857
+ "items": {
6858
+ "$ref": "#/components/schemas/Offer"
6859
+ }
6860
+ }
6861
+ }
6706
6862
  }
6707
6863
  },
6708
6864
  "examples": {
@@ -8299,6 +8455,100 @@
8299
8455
  }
8300
8456
  ]
8301
8457
  }
8458
+ },
8459
+ "entity-item": {
8460
+ "value": {
8461
+ "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
8462
+ "_org": "123",
8463
+ "_schema": "contact",
8464
+ "_tags": [
8465
+ "example",
8466
+ "mock"
8467
+ ],
8468
+ "_created_at": "2021-02-09T12:41:43.662Z",
8469
+ "_updated_at": "2021-02-09T12:41:43.662Z"
8470
+ }
8471
+ },
8472
+ "tax": {
8473
+ "value": {
8474
+ "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
8475
+ "type": "VAT",
8476
+ "description": "Tax description",
8477
+ "active": "true",
8478
+ "region": "DE",
8479
+ "region_label": "Germany",
8480
+ "_org": "123",
8481
+ "_schema": "tax",
8482
+ "_tags": [
8483
+ "example",
8484
+ "mock"
8485
+ ],
8486
+ "_created_at": "2021-02-09T12:41:43.662Z",
8487
+ "_updated_at": "2021-02-09T12:41:43.662Z"
8488
+ }
8489
+ },
8490
+ "coupon-without-promo-codes": {
8491
+ "value": {
8492
+ "_id": "123e4567-e89b-12d3-a456-426614174000",
8493
+ "_schema": "coupon",
8494
+ "_org": "org_12345",
8495
+ "_created_at": "2024-01-15T10:00:00.000Z",
8496
+ "_updated_at": "2024-01-20T12:00:00.000Z",
8497
+ "_title": "Sample Coupon",
8498
+ "name": "Sample Coupon",
8499
+ "type": "fixed",
8500
+ "fixed_value": 555,
8501
+ "fixed_value_currency": "USD",
8502
+ "fixed_value_decimal": "5.55",
8503
+ "active": true,
8504
+ "prices": {
8505
+ "$relation": [
8506
+ {
8507
+ "entity_id": "abc12345-def6-7890-gh12-ijklmnopqrst",
8508
+ "_tags": [
8509
+ "discount",
8510
+ "special"
8511
+ ],
8512
+ "_schema": "price"
8513
+ }
8514
+ ]
8515
+ }
8516
+ }
8517
+ },
8518
+ "promo-code": {
8519
+ "value": {
8520
+ "id": "123e4567-e89b-12d3-a456-426614174000",
8521
+ "code": "123456",
8522
+ "has_usage_limit": true,
8523
+ "usage_limit": 10
8524
+ }
8525
+ },
8526
+ "price-input-mapping": {
8527
+ "value": {
8528
+ "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
8529
+ "frequency_unit": "weekly",
8530
+ "value": 1000.245,
8531
+ "name": "avg consumption",
8532
+ "metadata": {
8533
+ "journey_title": "energy journey",
8534
+ "step_name": "avg consumption picker"
8535
+ }
8536
+ }
8537
+ },
8538
+ "external-fee-mapping": {
8539
+ "value": {
8540
+ "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
8541
+ "frequency_unit": "weekly",
8542
+ "amount_total": 1000,
8543
+ "amount_total_decimal": "10.00"
8544
+ }
8545
+ },
8546
+ "external-fee-mappings": {
8547
+ "value": [
8548
+ {
8549
+ "$ref": "#/components/examples/external-fee-mapping"
8550
+ }
8551
+ ]
8302
8552
  }
8303
8553
  }
8304
8554
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/pricing-client",
3
- "version": "3.47.9-alpha.5",
3
+ "version": "3.47.9-alpha.6",
4
4
  "description": "Client for epilot Pricing APIs",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",