@epilot/pricing-client 3.47.9-alpha.7 → 3.47.10

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
@@ -81,14 +81,6 @@ declare namespace Components {
81
81
  * Total of all items after (discounts and) taxes are applied, as a string with all the decimal places.
82
82
  */
83
83
  amount_total_decimal?: string;
84
- /**
85
- * The discount amount.
86
- */
87
- discount_amount?: number;
88
- /**
89
- * The discount amount as a string with all the decimal places.
90
- */
91
- discount_amount_decimal?: string;
92
84
  /**
93
85
  * The cashback amount.
94
86
  */
@@ -97,10 +89,7 @@ declare namespace Components {
97
89
  * The cashback amount as a string with all the decimal places.
98
90
  */
99
91
  cashback_amount_decimal?: string;
100
- /**
101
- * The cashback period, for now it's limited to either 0 months or 12 months
102
- */
103
- cashback_period?: "0" | "12";
92
+ cashback_period?: /* The cashback period, for now it's limited to either 0 months or 12 months */ CashbackPeriod;
104
93
  /**
105
94
  * Total amount after cashback is applied.
106
95
  */
@@ -109,6 +98,14 @@ declare namespace Components {
109
98
  * Total amount after cashback is applied as a string with all the decimal places.
110
99
  */
111
100
  after_cashback_amount_total_decimal?: string;
101
+ /**
102
+ * The discount amount.
103
+ */
104
+ discount_amount?: number;
105
+ /**
106
+ * The discount amount as a string with all the decimal places.
107
+ */
108
+ discount_amount_decimal?: string;
112
109
  /**
113
110
  * The discount percentage, if the applied coupon had a percentage type.
114
111
  */
@@ -254,36 +251,111 @@ declare namespace Components {
254
251
  _meta?: /* Signature meta data payload */ SignatureMeta;
255
252
  }
256
253
  /**
257
- * The coupon configuration
254
+ * The common properties for a composite price entity, without the price components
258
255
  * example:
259
256
  * {
260
- * "_id": "123e4567-e89b-12d3-a456-426614174000",
261
- * "_schema": "coupon",
262
- * "_org": "org_12345",
263
- * "_created_at": "2024-01-15T10:00:00.000Z",
264
- * "_updated_at": "2024-01-20T12:00:00.000Z",
265
- * "_title": "Sample Coupon",
266
- * "name": "Sample Coupon",
267
- * "type": "fixed",
268
- * "fixed_value": 555,
269
- * "fixed_value_currency": "USD",
270
- * "fixed_value_decimal": "5.55",
271
- * "active": true,
272
- * "prices": {
273
- * "$relation": [
274
- * {
275
- * "entity_id": "abc12345-def6-7890-gh12-ijklmnopqrst",
276
- * "_tags": [
277
- * "discount",
278
- * "special"
279
- * ],
280
- * "_schema": "price"
281
- * }
282
- * ]
283
- * }
257
+ * "$ref": "#/components/examples/composite-price"
284
258
  * }
285
259
  */
286
- export interface BaseCoupon {
260
+ export interface BaseCompositePrice {
261
+ [name: string]: any;
262
+ /**
263
+ * The billing period duration
264
+ */
265
+ billing_duration_amount?: number;
266
+ /**
267
+ * The billing period duration unit
268
+ */
269
+ billing_duration_unit?: "weeks" | "months" | "years";
270
+ /**
271
+ * The notice period duration
272
+ */
273
+ notice_time_amount?: number;
274
+ /**
275
+ * The notice period duration unit
276
+ */
277
+ notice_time_unit?: "weeks" | "months" | "years";
278
+ /**
279
+ * The termination period duration
280
+ */
281
+ termination_time_amount?: number;
282
+ /**
283
+ * The termination period duration unit
284
+ */
285
+ termination_time_unit?: "weeks" | "months" | "years";
286
+ /**
287
+ * The renewal period duration
288
+ */
289
+ renewal_duration_amount?: number;
290
+ /**
291
+ * The renewal period duration unit
292
+ */
293
+ renewal_duration_unit?: "weeks" | "months" | "years";
294
+ /**
295
+ * Whether the price can be used for new purchases.
296
+ */
297
+ active?: boolean;
298
+ /**
299
+ * A brief description of the price.
300
+ */
301
+ description?: string;
302
+ /**
303
+ * A set of [price](/api/pricing#tag/simple_price_schema) components that define the composite price.
304
+ */
305
+ price_components?: /* A set of [price](/api/pricing#tag/simple_price_schema) components that define the composite price. */ /**
306
+ * The price entity schema for simple pricing
307
+ * example:
308
+ * {
309
+ * "$ref": "#/components/examples/price"
310
+ * }
311
+ */
312
+ Price[] | {
313
+ $relation?: PriceComponentRelation[];
314
+ };
315
+ /**
316
+ * Three-letter ISO currency code, in lowercase.
317
+ */
318
+ unit_amount_currency?: /* Three-letter ISO currency code, in lowercase. */ /**
319
+ * Three-letter ISO currency code, in lowercase. Must be a supported currency.
320
+ * ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
321
+ *
322
+ * example:
323
+ * EUR
324
+ */
325
+ Currency;
326
+ /**
327
+ * The flag for prices that contain price components.
328
+ */
329
+ is_composite_price: true;
330
+ /**
331
+ * The price creation date
332
+ */
333
+ _created_at?: string;
334
+ /**
335
+ * The price id
336
+ */
337
+ _id?: string;
338
+ /**
339
+ * The price autogenerated title
340
+ */
341
+ _title?: string;
342
+ /**
343
+ * The price last update date
344
+ */
345
+ _updated_at?: string;
346
+ /**
347
+ * The organization id the price belongs to
348
+ */
349
+ _org_id?: string;
350
+ /**
351
+ * An arbitrary set of tags attached to the composite price
352
+ */
353
+ _tags?: string[];
354
+ }
355
+ /**
356
+ * The shared properties for the coupon entity and coupon item entity
357
+ */
358
+ export interface BaseCouponCommon {
287
359
  [name: string]: any;
288
360
  _id: EntityId /* uuid */;
289
361
  /**
@@ -309,8 +381,8 @@ declare namespace Components {
309
381
  _updated_at: string; // date-time
310
382
  name: string | null;
311
383
  description?: string | null;
312
- type?: "fixed" | "percentage";
313
- category?: "discount" | "cashback";
384
+ type: "fixed" | "percentage";
385
+ category: "discount" | "cashback";
314
386
  /**
315
387
  * Use if type is set to percentage. The percentage to be discounted, represented as a whole integer.
316
388
  */
@@ -334,28 +406,12 @@ declare namespace Components {
334
406
  * EUR
335
407
  */
336
408
  Currency;
337
- /**
338
- * The cashback period, for now it's limited to either 0 months or 12 months
339
- */
340
- cashback_period?: "0" | "12";
409
+ cashback_period?: /* The cashback period, for now it's limited to either 0 months or 12 months */ CashbackPeriod;
341
410
  active?: boolean;
342
411
  /**
343
412
  * Whether the coupon requires a promo code to be applied
344
413
  */
345
414
  requires_promo_code?: boolean;
346
- /**
347
- * The prices associated with the coupon. Will hold price entities if hydrated, relations otherwise.
348
- */
349
- prices?: /* The prices associated with the coupon. Will hold price entities if hydrated, relations otherwise. */ {
350
- $relation?: EntityRelation[];
351
- } | /**
352
- * The price entity schema for simple pricing
353
- * example:
354
- * {
355
- * "$ref": "#/components/examples/price"
356
- * }
357
- */
358
- Price[];
359
415
  }
360
416
  export interface BaseMarketPriceRecord {
361
417
  /**
@@ -403,14 +459,6 @@ declare namespace Components {
403
459
  * Total of all items after (discounts and) taxes are applied, as a string with all the decimal places.
404
460
  */
405
461
  amount_total_decimal?: string;
406
- /**
407
- * The discount amount.
408
- */
409
- discount_amount?: number;
410
- /**
411
- * The discount amount as a string with all the decimal places.
412
- */
413
- discount_amount_decimal?: string;
414
462
  /**
415
463
  * The cashback amount.
416
464
  */
@@ -419,10 +467,7 @@ declare namespace Components {
419
467
  * The cashback amount as a string with all the decimal places.
420
468
  */
421
469
  cashback_amount_decimal?: string;
422
- /**
423
- * The cashback period, for now it's limited to either 0 months or 12 months
424
- */
425
- cashback_period?: "0" | "12";
470
+ cashback_period?: /* The cashback period, for now it's limited to either 0 months or 12 months */ CashbackPeriod;
426
471
  /**
427
472
  * Total amount after cashback is applied.
428
473
  */
@@ -431,6 +476,14 @@ declare namespace Components {
431
476
  * Total amount after cashback is applied as a string with all the decimal places.
432
477
  */
433
478
  after_cashback_amount_total_decimal?: string;
479
+ /**
480
+ * The discount amount.
481
+ */
482
+ discount_amount?: number;
483
+ /**
484
+ * The discount amount as a string with all the decimal places.
485
+ */
486
+ discount_amount_decimal?: string;
434
487
  /**
435
488
  * The discount percentage, if the applied coupon had a percentage type.
436
489
  */
@@ -702,14 +755,7 @@ declare namespace Components {
702
755
  * "$ref": "#/components/examples/price"
703
756
  * }
704
757
  */
705
- Price | /**
706
- * The price entity schema for dynamic pricing
707
- * example:
708
- * {
709
- * "$ref": "#/components/examples/composite-price"
710
- * }
711
- */
712
- CompositePrice;
758
+ Price | /* The composite price entity */ CompositePrice;
713
759
  /**
714
760
  * The taxes applied to the price item.
715
761
  */
@@ -721,7 +767,7 @@ declare namespace Components {
721
767
  /**
722
768
  * The coupons applicable to the price item
723
769
  */
724
- _coupons?: (CouponItem)[];
770
+ _coupons?: (/* The shared properties for the coupon entity and coupon item entity */ CouponItem)[];
725
771
  /**
726
772
  * When set to true on a `_price` displayed as OnRequest (`show_as_on_request: 'on_request'`) this flag means the price has been approved and can now be displayed to the customer. This flag is only valid for prices shown as 'on_request'.
727
773
  */
@@ -1031,14 +1077,9 @@ declare namespace Components {
1031
1077
  };
1032
1078
  external_fees_mappings?: /**
1033
1079
  * example:
1034
- * [
1035
- * {
1036
- * "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
1037
- * "frequency_unit": "weekly",
1038
- * "amount_total": 1000,
1039
- * "amount_total_decimal": "10.00"
1040
- * }
1041
- * ]
1080
+ * {
1081
+ * "$ref": "#/components/examples/external-fee-mappings/value"
1082
+ * }
1042
1083
  */
1043
1084
  ExternalFeeMappings;
1044
1085
  external_fees_metadata?: ExternalFeeMetadata;
@@ -1059,7 +1100,7 @@ declare namespace Components {
1059
1100
  /**
1060
1101
  * The coupons applicable to the price item
1061
1102
  */
1062
- _coupons?: (CouponItem)[];
1103
+ _coupons?: (/* The shared properties for the coupon entity and coupon item entity */ CouponItem)[];
1063
1104
  }
1064
1105
  export interface BasicAuthCredentials {
1065
1106
  /**
@@ -1117,14 +1158,6 @@ declare namespace Components {
1117
1158
  * Total of all items after (discounts and) taxes are applied, as a string with all the decimal places.
1118
1159
  */
1119
1160
  amount_total_decimal?: string;
1120
- /**
1121
- * The discount amount.
1122
- */
1123
- discount_amount?: number;
1124
- /**
1125
- * The discount amount as a string with all the decimal places.
1126
- */
1127
- discount_amount_decimal?: string;
1128
1161
  /**
1129
1162
  * The cashback amount.
1130
1163
  */
@@ -1133,10 +1166,7 @@ declare namespace Components {
1133
1166
  * The cashback amount as a string with all the decimal places.
1134
1167
  */
1135
1168
  cashback_amount_decimal?: string;
1136
- /**
1137
- * The cashback period, for now it's limited to either 0 months or 12 months
1138
- */
1139
- cashback_period?: "0" | "12";
1169
+ cashback_period?: /* The cashback period, for now it's limited to either 0 months or 12 months */ CashbackPeriod;
1140
1170
  /**
1141
1171
  * Total amount after cashback is applied.
1142
1172
  */
@@ -1145,6 +1175,14 @@ declare namespace Components {
1145
1175
  * Total amount after cashback is applied as a string with all the decimal places.
1146
1176
  */
1147
1177
  after_cashback_amount_total_decimal?: string;
1178
+ /**
1179
+ * The discount amount.
1180
+ */
1181
+ discount_amount?: number;
1182
+ /**
1183
+ * The discount amount as a string with all the decimal places.
1184
+ */
1185
+ discount_amount_decimal?: string;
1148
1186
  /**
1149
1187
  * The discount percentage, if the applied coupon had a percentage type.
1150
1188
  */
@@ -1238,15 +1276,35 @@ declare namespace Components {
1238
1276
  * An amount associated with a specific cashback period.
1239
1277
  */
1240
1278
  export interface CashbackAmount {
1241
- /**
1242
- * The cashback period, for now it's limited to either 0 months or 12 months
1243
- */
1244
- cashback_period: "0" | "12";
1279
+ cashback_period: /* The cashback period, for now it's limited to either 0 months or 12 months */ CashbackPeriod;
1245
1280
  /**
1246
1281
  * The sum of all cashbacks for a specific cashback period
1247
1282
  */
1248
1283
  amount_total: number;
1249
1284
  }
1285
+ export interface CashbackAmounts {
1286
+ /**
1287
+ * The cashback amount.
1288
+ */
1289
+ cashback_amount?: number;
1290
+ /**
1291
+ * The cashback amount as a string with all the decimal places.
1292
+ */
1293
+ cashback_amount_decimal?: string;
1294
+ cashback_period?: /* The cashback period, for now it's limited to either 0 months or 12 months */ CashbackPeriod;
1295
+ /**
1296
+ * Total amount after cashback is applied.
1297
+ */
1298
+ after_cashback_amount_total?: number;
1299
+ /**
1300
+ * Total amount after cashback is applied as a string with all the decimal places.
1301
+ */
1302
+ after_cashback_amount_total_decimal?: string;
1303
+ }
1304
+ /**
1305
+ * The cashback period, for now it's limited to either 0 months or 12 months
1306
+ */
1307
+ export type CashbackPeriod = "0" | "12";
1250
1308
  /**
1251
1309
  * A catalog search payload
1252
1310
  * example:
@@ -1317,33 +1375,10 @@ declare namespace Components {
1317
1375
  * }
1318
1376
  */
1319
1377
  Price | /**
1320
- * The coupon configuration
1378
+ * The coupon entity
1321
1379
  * example:
1322
1380
  * {
1323
- * "_id": "123e4567-e89b-12d3-a456-426614174000",
1324
- * "_schema": "coupon",
1325
- * "_org": "org_12345",
1326
- * "_created_at": "2024-01-15T10:00:00.000Z",
1327
- * "_updated_at": "2024-01-20T12:00:00.000Z",
1328
- * "_title": "Sample Coupon",
1329
- * "name": "Sample Coupon",
1330
- * "type": "fixed",
1331
- * "fixed_value": 555,
1332
- * "fixed_value_currency": "USD",
1333
- * "fixed_value_decimal": "5.55",
1334
- * "active": true,
1335
- * "prices": {
1336
- * "$relation": [
1337
- * {
1338
- * "entity_id": "abc12345-def6-7890-gh12-ijklmnopqrst",
1339
- * "_tags": [
1340
- * "discount",
1341
- * "special"
1342
- * ],
1343
- * "_schema": "price"
1344
- * }
1345
- * ]
1346
- * }
1381
+ * "$ref": "#/components/examples/coupon-without-promo-codes/value"
1347
1382
  * }
1348
1383
  */
1349
1384
  Coupon)[];
@@ -1374,159 +1409,72 @@ declare namespace Components {
1374
1409
  */
1375
1410
  export type CheckoutMode = "create_order" | "create_invoice" | "create_quote";
1376
1411
  /**
1377
- * The price entity schema for dynamic pricing
1412
+ * The composite price entity
1413
+ */
1414
+ export type CompositePrice = /* The composite price entity */ /**
1415
+ * The composite price entity
1378
1416
  * example:
1379
1417
  * {
1380
1418
  * "$ref": "#/components/examples/composite-price"
1381
1419
  * }
1382
1420
  */
1383
- export interface CompositePrice {
1384
- [name: string]: any;
1421
+ NonHydratedCompositePrice | /**
1422
+ * The composite price entity
1423
+ * example:
1424
+ * {
1425
+ * "$ref": "#/components/examples/composite-price"
1426
+ * }
1427
+ */
1428
+ HydratedCompositePrice;
1429
+ /**
1430
+ * Represents a composite price input to the pricing library.
1431
+ * example:
1432
+ * {
1433
+ * "$ref": "#/components/examples/price-item/value"
1434
+ * }
1435
+ */
1436
+ export interface CompositePriceItem {
1385
1437
  /**
1386
- * The billing period duration
1438
+ * Total of all items before (discounts or) taxes are applied.
1387
1439
  */
1388
- billing_duration_amount?: number;
1440
+ amount_subtotal?: number;
1389
1441
  /**
1390
- * The billing period duration unit
1442
+ * Total of all items before (discounts or) taxes are applied, as a string with all the decimal places.
1391
1443
  */
1392
- billing_duration_unit?: "weeks" | "months" | "years";
1444
+ amount_subtotal_decimal?: string;
1393
1445
  /**
1394
- * The notice period duration
1446
+ * Total of all items after (discounts and) taxes are applied.
1395
1447
  */
1396
- notice_time_amount?: number;
1448
+ amount_total?: number;
1397
1449
  /**
1398
- * The notice period duration unit
1450
+ * Total of all items after (discounts and) taxes are applied, as a string with all the decimal places.
1399
1451
  */
1400
- notice_time_unit?: "weeks" | "months" | "years";
1452
+ amount_total_decimal?: string;
1401
1453
  /**
1402
- * The termination period duration
1454
+ * The cashback amount.
1403
1455
  */
1404
- termination_time_amount?: number;
1456
+ cashback_amount?: number;
1405
1457
  /**
1406
- * The termination period duration unit
1458
+ * The cashback amount as a string with all the decimal places.
1407
1459
  */
1408
- termination_time_unit?: "weeks" | "months" | "years";
1460
+ cashback_amount_decimal?: string;
1461
+ cashback_period?: /* The cashback period, for now it's limited to either 0 months or 12 months */ CashbackPeriod;
1409
1462
  /**
1410
- * The renewal period duration
1463
+ * Total amount after cashback is applied.
1411
1464
  */
1412
- renewal_duration_amount?: number;
1465
+ after_cashback_amount_total?: number;
1413
1466
  /**
1414
- * The renewal period duration unit
1467
+ * Total amount after cashback is applied as a string with all the decimal places.
1415
1468
  */
1416
- renewal_duration_unit?: "weeks" | "months" | "years";
1469
+ after_cashback_amount_total_decimal?: string;
1417
1470
  /**
1418
- * Whether the price can be used for new purchases.
1471
+ * The discount amount.
1419
1472
  */
1420
- active?: boolean;
1473
+ discount_amount?: number;
1421
1474
  /**
1422
- * A brief description of the price.
1423
- */
1424
- description?: string;
1425
- /**
1426
- * A set of [price](/api/pricing#tag/simple_price_schema) components that define the composite price.
1427
- */
1428
- price_components?: /* A set of [price](/api/pricing#tag/simple_price_schema) components that define the composite price. */ /**
1429
- * The price entity schema for simple pricing
1430
- * example:
1431
- * {
1432
- * "$ref": "#/components/examples/price"
1433
- * }
1434
- */
1435
- Price[] | {
1436
- $relation?: PriceComponentRelation[];
1437
- };
1438
- /**
1439
- * Three-letter ISO currency code, in lowercase.
1440
- */
1441
- unit_amount_currency?: /* Three-letter ISO currency code, in lowercase. */ /**
1442
- * Three-letter ISO currency code, in lowercase. Must be a supported currency.
1443
- * ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
1444
- *
1445
- * example:
1446
- * EUR
1447
- */
1448
- Currency;
1449
- /**
1450
- * The flag for prices that contain price components.
1451
- */
1452
- is_composite_price?: boolean;
1453
- /**
1454
- * The price creation date
1455
- */
1456
- _created_at?: string;
1457
- /**
1458
- * The price id
1459
- */
1460
- _id?: string;
1461
- /**
1462
- * The price autogenerated title
1463
- */
1464
- _title?: string;
1465
- /**
1466
- * The price last update date
1467
- */
1468
- _updated_at?: string;
1469
- /**
1470
- * The organization id the price belongs to
1471
- */
1472
- _org_id?: string;
1473
- /**
1474
- * An arbitrary set of tags attached to the composite price
1475
- */
1476
- _tags?: string[];
1477
- }
1478
- /**
1479
- * Represents a composite price input to the pricing library.
1480
- * example:
1481
- * {
1482
- * "$ref": "#/components/examples/price-item/value"
1483
- * }
1484
- */
1485
- export interface CompositePriceItem {
1486
- /**
1487
- * Total of all items before (discounts or) taxes are applied.
1488
- */
1489
- amount_subtotal?: number;
1490
- /**
1491
- * Total of all items before (discounts or) taxes are applied, as a string with all the decimal places.
1492
- */
1493
- amount_subtotal_decimal?: string;
1494
- /**
1495
- * Total of all items after (discounts and) taxes are applied.
1496
- */
1497
- amount_total?: number;
1498
- /**
1499
- * Total of all items after (discounts and) taxes are applied, as a string with all the decimal places.
1500
- */
1501
- amount_total_decimal?: string;
1502
- /**
1503
- * The discount amount.
1504
- */
1505
- discount_amount?: number;
1506
- /**
1507
- * The discount amount as a string with all the decimal places.
1475
+ * The discount amount as a string with all the decimal places.
1508
1476
  */
1509
1477
  discount_amount_decimal?: string;
1510
- /**
1511
- * The cashback amount.
1512
- */
1513
- cashback_amount?: number;
1514
- /**
1515
- * The cashback amount as a string with all the decimal places.
1516
- */
1517
- cashback_amount_decimal?: string;
1518
- /**
1519
- * The cashback period, for now it's limited to either 0 months or 12 months
1520
- */
1521
- cashback_period?: "0" | "12";
1522
- /**
1523
- * Total amount after cashback is applied.
1524
- */
1525
- after_cashback_amount_total?: number;
1526
- /**
1527
- * Total amount after cashback is applied as a string with all the decimal places.
1528
- */
1529
- after_cashback_amount_total_decimal?: string;
1530
1478
  /**
1531
1479
  * The discount percentage, if the applied coupon had a percentage type.
1532
1480
  */
@@ -1798,14 +1746,7 @@ declare namespace Components {
1798
1746
  * "$ref": "#/components/examples/price"
1799
1747
  * }
1800
1748
  */
1801
- Price | /**
1802
- * The price entity schema for dynamic pricing
1803
- * example:
1804
- * {
1805
- * "$ref": "#/components/examples/composite-price"
1806
- * }
1807
- */
1808
- CompositePrice;
1749
+ Price | /* The composite price entity */ CompositePrice;
1809
1750
  /**
1810
1751
  * The taxes applied to the price item.
1811
1752
  */
@@ -1815,13 +1756,90 @@ declare namespace Components {
1815
1756
  */
1816
1757
  recurrences?: (/* An amount associated with a specific recurrence. */ RecurrenceAmount)[];
1817
1758
  /**
1818
- * The coupons applicable to the price item
1759
+ * The coupons applicable to the composite price item + related (cashback) amounts
1819
1760
  */
1820
- _coupons?: (CouponItem)[];
1761
+ _coupons?: ({
1762
+ [name: string]: any;
1763
+ _id: EntityId /* uuid */;
1764
+ /**
1765
+ * The auto-generated title for the title
1766
+ */
1767
+ _title: string;
1768
+ /**
1769
+ * Organization Id the entity belongs to
1770
+ */
1771
+ _org: string;
1772
+ /**
1773
+ * The schema of the entity, for coupons it is always `coupon`
1774
+ */
1775
+ _schema: "coupon";
1776
+ _tags?: string[];
1777
+ /**
1778
+ * The creation date for the opportunity
1779
+ */
1780
+ _created_at: string; // date-time
1781
+ /**
1782
+ * The date the coupon was last updated
1783
+ */
1784
+ _updated_at: string; // date-time
1785
+ name: string | null;
1786
+ description?: string | null;
1787
+ type: "fixed" | "percentage";
1788
+ category: "discount" | "cashback";
1789
+ /**
1790
+ * Use if type is set to percentage. The percentage to be discounted, represented as a whole integer.
1791
+ */
1792
+ percentage_value?: string | null;
1793
+ /**
1794
+ * Use if type is set to fixed. The fixed amount in cents to be discounted, represented as a whole integer.
1795
+ */
1796
+ fixed_value?: number;
1797
+ /**
1798
+ * Use if type is set to fixed. The unit amount in cents to be discounted, represented as a decimal string with at most 12 decimal places.
1799
+ */
1800
+ fixed_value_decimal?: string;
1801
+ /**
1802
+ * Use if type is set to fixed. Three-letter ISO currency code, in lowercase.
1803
+ */
1804
+ fixed_value_currency?: /* Use if type is set to fixed. Three-letter ISO currency code, in lowercase. */ /**
1805
+ * Three-letter ISO currency code, in lowercase. Must be a supported currency.
1806
+ * ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
1807
+ *
1808
+ * example:
1809
+ * EUR
1810
+ */
1811
+ Currency;
1812
+ cashback_period?: /* The cashback period, for now it's limited to either 0 months or 12 months */ CashbackPeriod;
1813
+ active?: boolean;
1814
+ /**
1815
+ * Whether the coupon requires a promo code to be applied
1816
+ */
1817
+ requires_promo_code?: boolean;
1818
+ /**
1819
+ * The cashback amount.
1820
+ */
1821
+ cashback_amount?: number;
1822
+ /**
1823
+ * The cashback amount as a string with all the decimal places.
1824
+ */
1825
+ cashback_amount_decimal?: string;
1826
+ /**
1827
+ * Total amount after cashback is applied.
1828
+ */
1829
+ after_cashback_amount_total?: number;
1830
+ /**
1831
+ * Total amount after cashback is applied as a string with all the decimal places.
1832
+ */
1833
+ after_cashback_amount_total_decimal?: string;
1834
+ } & /* The shared properties for the coupon entity and coupon item entity */ (/* The shared properties for the coupon entity and coupon item entity */ CouponItem))[];
1821
1835
  /**
1822
1836
  * When set to true on a `_price` displayed as OnRequest (`show_as_on_request: 'on_request'`) this flag means the price has been approved and can now be displayed to the customer. This flag is only valid for prices shown as 'on_request'.
1823
1837
  */
1824
1838
  on_request_approved?: boolean;
1839
+ /**
1840
+ * The flag for prices that contain price components.
1841
+ */
1842
+ is_composite_price: true;
1825
1843
  /**
1826
1844
  * Contains price item configurations, per price component, when the main price item is a [composite price](/api/pricing#tag/dynamic_price_schema).
1827
1845
  */
@@ -1986,14 +2004,9 @@ declare namespace Components {
1986
2004
  };
1987
2005
  external_fees_mappings?: /**
1988
2006
  * example:
1989
- * [
1990
- * {
1991
- * "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
1992
- * "frequency_unit": "weekly",
1993
- * "amount_total": 1000,
1994
- * "amount_total_decimal": "10.00"
1995
- * }
1996
- * ]
2007
+ * {
2008
+ * "$ref": "#/components/examples/external-fee-mappings/value"
2009
+ * }
1997
2010
  */
1998
2011
  ExternalFeeMappings;
1999
2012
  external_fees_metadata?: ExternalFeeMetadata;
@@ -2014,11 +2027,11 @@ declare namespace Components {
2014
2027
  /**
2015
2028
  * The coupons applicable to the price item
2016
2029
  */
2017
- _coupons?: (CouponItem)[];
2030
+ _coupons?: (/* The shared properties for the coupon entity and coupon item entity */ CouponItem)[];
2018
2031
  /**
2019
2032
  * The flag for prices that contain price components.
2020
2033
  */
2021
- is_composite_price?: true;
2034
+ is_composite_price: true;
2022
2035
  /**
2023
2036
  * Contains price item configurations, per price component, when the main price item is a [composite price](/api/pricing#tag/dynamic_price_schema).
2024
2037
  */
@@ -2033,14 +2046,7 @@ declare namespace Components {
2033
2046
  price_component_coupon_ids?: {
2034
2047
  [name: string]: string[];
2035
2048
  };
2036
- _price?: /**
2037
- * The price entity schema for dynamic pricing
2038
- * example:
2039
- * {
2040
- * "$ref": "#/components/examples/composite-price"
2041
- * }
2042
- */
2043
- CompositePrice;
2049
+ _price?: /* The composite price entity */ CompositePrice;
2044
2050
  }
2045
2051
  /**
2046
2052
  * The compute price payload
@@ -2269,33 +2275,10 @@ declare namespace Components {
2269
2275
  }
2270
2276
  export type ConsumptionTypeGetAg = "household" | "heating_pump" | "night_storage_heating" | "night_storage_heating_common_meter";
2271
2277
  /**
2272
- * The coupon configuration
2278
+ * The coupon entity
2273
2279
  * example:
2274
2280
  * {
2275
- * "_id": "123e4567-e89b-12d3-a456-426614174000",
2276
- * "_schema": "coupon",
2277
- * "_org": "org_12345",
2278
- * "_created_at": "2024-01-15T10:00:00.000Z",
2279
- * "_updated_at": "2024-01-20T12:00:00.000Z",
2280
- * "_title": "Sample Coupon",
2281
- * "name": "Sample Coupon",
2282
- * "type": "fixed",
2283
- * "fixed_value": 555,
2284
- * "fixed_value_currency": "USD",
2285
- * "fixed_value_decimal": "5.55",
2286
- * "active": true,
2287
- * "prices": {
2288
- * "$relation": [
2289
- * {
2290
- * "entity_id": "abc12345-def6-7890-gh12-ijklmnopqrst",
2291
- * "_tags": [
2292
- * "discount",
2293
- * "special"
2294
- * ],
2295
- * "_schema": "price"
2296
- * }
2297
- * ]
2298
- * }
2281
+ * "$ref": "#/components/examples/coupon-without-promo-codes/value"
2299
2282
  * }
2300
2283
  */
2301
2284
  export interface Coupon {
@@ -2324,8 +2307,8 @@ declare namespace Components {
2324
2307
  _updated_at: string; // date-time
2325
2308
  name: string | null;
2326
2309
  description?: string | null;
2327
- type?: "fixed" | "percentage";
2328
- category?: "discount" | "cashback";
2310
+ type: "fixed" | "percentage";
2311
+ category: "discount" | "cashback";
2329
2312
  /**
2330
2313
  * Use if type is set to percentage. The percentage to be discounted, represented as a whole integer.
2331
2314
  */
@@ -2349,10 +2332,7 @@ declare namespace Components {
2349
2332
  * EUR
2350
2333
  */
2351
2334
  Currency;
2352
- /**
2353
- * The cashback period, for now it's limited to either 0 months or 12 months
2354
- */
2355
- cashback_period?: "0" | "12";
2335
+ cashback_period?: /* The cashback period, for now it's limited to either 0 months or 12 months */ CashbackPeriod;
2356
2336
  active?: boolean;
2357
2337
  /**
2358
2338
  * Whether the coupon requires a promo code to be applied
@@ -2374,10 +2354,7 @@ declare namespace Components {
2374
2354
  promo_codes?: /**
2375
2355
  * example:
2376
2356
  * {
2377
- * "id": "123e4567-e89b-12d3-a456-426614174000",
2378
- * "code": "123456",
2379
- * "has_usage_limit": true,
2380
- * "usage_limit": 10
2357
+ * "$ref": "#/components/examples/promo-code/value"
2381
2358
  * }
2382
2359
  */
2383
2360
  PromoCode[];
@@ -2388,16 +2365,20 @@ declare namespace Components {
2388
2365
  [name: string]: number;
2389
2366
  };
2390
2367
  }
2368
+ /**
2369
+ * The shared properties for the coupon entity and coupon item entity
2370
+ */
2391
2371
  export interface CouponItem {
2392
- _id?: EntityId /* uuid */;
2372
+ [name: string]: any;
2373
+ _id: EntityId /* uuid */;
2393
2374
  /**
2394
2375
  * The auto-generated title for the title
2395
2376
  */
2396
- _title?: string;
2377
+ _title: string;
2397
2378
  /**
2398
2379
  * Organization Id the entity belongs to
2399
2380
  */
2400
- _org?: string;
2381
+ _org: string;
2401
2382
  /**
2402
2383
  * The schema of the entity, for coupons it is always `coupon`
2403
2384
  */
@@ -2406,12 +2387,12 @@ declare namespace Components {
2406
2387
  /**
2407
2388
  * The creation date for the opportunity
2408
2389
  */
2409
- _created_at?: string; // date-time
2390
+ _created_at: string; // date-time
2410
2391
  /**
2411
2392
  * The date the coupon was last updated
2412
2393
  */
2413
- _updated_at?: string; // date-time
2414
- name?: string | null;
2394
+ _updated_at: string; // date-time
2395
+ name: string | null;
2415
2396
  description?: string | null;
2416
2397
  type: "fixed" | "percentage";
2417
2398
  category: "discount" | "cashback";
@@ -2438,10 +2419,7 @@ declare namespace Components {
2438
2419
  * EUR
2439
2420
  */
2440
2421
  Currency;
2441
- /**
2442
- * The cashback period, for now it's limited to either 0 months or 12 months
2443
- */
2444
- cashback_period?: "0" | "12";
2422
+ cashback_period?: /* The cashback period, for now it's limited to either 0 months or 12 months */ CashbackPeriod;
2445
2423
  active?: boolean;
2446
2424
  /**
2447
2425
  * Whether the coupon requires a promo code to be applied
@@ -2449,33 +2427,10 @@ declare namespace Components {
2449
2427
  requires_promo_code?: boolean;
2450
2428
  }
2451
2429
  /**
2452
- * The coupon configuration
2430
+ * The base for the coupon entity without promo codes
2453
2431
  * example:
2454
2432
  * {
2455
- * "_id": "123e4567-e89b-12d3-a456-426614174000",
2456
- * "_schema": "coupon",
2457
- * "_org": "org_12345",
2458
- * "_created_at": "2024-01-15T10:00:00.000Z",
2459
- * "_updated_at": "2024-01-20T12:00:00.000Z",
2460
- * "_title": "Sample Coupon",
2461
- * "name": "Sample Coupon",
2462
- * "type": "fixed",
2463
- * "fixed_value": 555,
2464
- * "fixed_value_currency": "USD",
2465
- * "fixed_value_decimal": "5.55",
2466
- * "active": true,
2467
- * "prices": {
2468
- * "$relation": [
2469
- * {
2470
- * "entity_id": "abc12345-def6-7890-gh12-ijklmnopqrst",
2471
- * "_tags": [
2472
- * "discount",
2473
- * "special"
2474
- * ],
2475
- * "_schema": "price"
2476
- * }
2477
- * ]
2478
- * }
2433
+ * "$ref": "#/components/examples/coupon-without-promo-codes/value"
2479
2434
  * }
2480
2435
  */
2481
2436
  export interface CouponWithoutPromoCodes {
@@ -2504,8 +2459,8 @@ declare namespace Components {
2504
2459
  _updated_at: string; // date-time
2505
2460
  name: string | null;
2506
2461
  description?: string | null;
2507
- type?: "fixed" | "percentage";
2508
- category?: "discount" | "cashback";
2462
+ type: "fixed" | "percentage";
2463
+ category: "discount" | "cashback";
2509
2464
  /**
2510
2465
  * Use if type is set to percentage. The percentage to be discounted, represented as a whole integer.
2511
2466
  */
@@ -2529,10 +2484,7 @@ declare namespace Components {
2529
2484
  * EUR
2530
2485
  */
2531
2486
  Currency;
2532
- /**
2533
- * The cashback period, for now it's limited to either 0 months or 12 months
2534
- */
2535
- cashback_period?: "0" | "12";
2487
+ cashback_period?: /* The cashback period, for now it's limited to either 0 months or 12 months */ CashbackPeriod;
2536
2488
  active?: boolean;
2537
2489
  /**
2538
2490
  * Whether the coupon requires a promo code to be applied
@@ -2571,6 +2523,28 @@ declare namespace Components {
2571
2523
  email?: string;
2572
2524
  phone?: string;
2573
2525
  }
2526
+ export interface DiscountAmounts {
2527
+ /**
2528
+ * The discount amount.
2529
+ */
2530
+ discount_amount?: number;
2531
+ /**
2532
+ * The discount amount as a string with all the decimal places.
2533
+ */
2534
+ discount_amount_decimal?: string;
2535
+ /**
2536
+ * The discount percentage, if the applied coupon had a percentage type.
2537
+ */
2538
+ discount_percentage?: number;
2539
+ /**
2540
+ * Total amount before discount is applied.
2541
+ */
2542
+ before_discount_amount_total?: number;
2543
+ /**
2544
+ * Total amount before discount is applied as a string with all the decimal places.
2545
+ */
2546
+ before_discount_amount_total_decimal?: string;
2547
+ }
2574
2548
  /**
2575
2549
  * The interval of the tariff if a spot market price is used as base.
2576
2550
  */
@@ -2583,15 +2557,7 @@ declare namespace Components {
2583
2557
  /**
2584
2558
  * example:
2585
2559
  * {
2586
- * "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
2587
- * "_org": "123",
2588
- * "_schema": "contact",
2589
- * "_tags": [
2590
- * "example",
2591
- * "mock"
2592
- * ],
2593
- * "_created_at": "2021-02-09T12:41:43.662Z",
2594
- * "_updated_at": "2021-02-09T12:41:43.662Z"
2560
+ * "$ref": "#/components/examples/entity-item/value"
2595
2561
  * }
2596
2562
  */
2597
2563
  export interface EntityItem {
@@ -2638,10 +2604,7 @@ declare namespace Components {
2638
2604
  /**
2639
2605
  * example:
2640
2606
  * {
2641
- * "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
2642
- * "frequency_unit": "weekly",
2643
- * "amount_total": 1000,
2644
- * "amount_total_decimal": "10.00"
2607
+ * "$ref": "#/components/examples/external-fee-mapping/value"
2645
2608
  * }
2646
2609
  */
2647
2610
  export interface ExternalFeeMapping {
@@ -2652,22 +2615,14 @@ declare namespace Components {
2652
2615
  }
2653
2616
  /**
2654
2617
  * example:
2655
- * [
2656
- * {
2657
- * "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
2658
- * "frequency_unit": "weekly",
2659
- * "amount_total": 1000,
2660
- * "amount_total_decimal": "10.00"
2661
- * }
2662
- * ]
2618
+ * {
2619
+ * "$ref": "#/components/examples/external-fee-mappings/value"
2620
+ * }
2663
2621
  */
2664
2622
  export type ExternalFeeMappings = /**
2665
2623
  * example:
2666
2624
  * {
2667
- * "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
2668
- * "frequency_unit": "weekly",
2669
- * "amount_total": 1000,
2670
- * "amount_total_decimal": "10.00"
2625
+ * "$ref": "#/components/examples/external-fee-mapping/value"
2671
2626
  * }
2672
2627
  */
2673
2628
  ExternalFeeMapping[];
@@ -2807,6 +2762,113 @@ declare namespace Components {
2807
2762
  bidding_zone: /* The bidding zone for a spot market price. */ SpotMarketBiddingZone;
2808
2763
  prices: /* A market price at a given point in time. */ HistoricMarketPriceRecord[];
2809
2764
  }
2765
+ /**
2766
+ * The composite price entity
2767
+ * example:
2768
+ * {
2769
+ * "$ref": "#/components/examples/composite-price"
2770
+ * }
2771
+ */
2772
+ export interface HydratedCompositePrice {
2773
+ [name: string]: any;
2774
+ /**
2775
+ * The billing period duration
2776
+ */
2777
+ billing_duration_amount?: number;
2778
+ /**
2779
+ * The billing period duration unit
2780
+ */
2781
+ billing_duration_unit?: "weeks" | "months" | "years";
2782
+ /**
2783
+ * The notice period duration
2784
+ */
2785
+ notice_time_amount?: number;
2786
+ /**
2787
+ * The notice period duration unit
2788
+ */
2789
+ notice_time_unit?: "weeks" | "months" | "years";
2790
+ /**
2791
+ * The termination period duration
2792
+ */
2793
+ termination_time_amount?: number;
2794
+ /**
2795
+ * The termination period duration unit
2796
+ */
2797
+ termination_time_unit?: "weeks" | "months" | "years";
2798
+ /**
2799
+ * The renewal period duration
2800
+ */
2801
+ renewal_duration_amount?: number;
2802
+ /**
2803
+ * The renewal period duration unit
2804
+ */
2805
+ renewal_duration_unit?: "weeks" | "months" | "years";
2806
+ /**
2807
+ * Whether the price can be used for new purchases.
2808
+ */
2809
+ active?: boolean;
2810
+ /**
2811
+ * A brief description of the price.
2812
+ */
2813
+ description?: string;
2814
+ /**
2815
+ * A set of [price](/api/pricing#tag/simple_price_schema) components that define the composite price.
2816
+ */
2817
+ price_components?: /* A set of [price](/api/pricing#tag/simple_price_schema) components that define the composite price. */ /**
2818
+ * The price entity schema for simple pricing
2819
+ * example:
2820
+ * {
2821
+ * "$ref": "#/components/examples/price"
2822
+ * }
2823
+ */
2824
+ Price[] | /**
2825
+ * The price entity schema for simple pricing
2826
+ * example:
2827
+ * {
2828
+ * "$ref": "#/components/examples/price"
2829
+ * }
2830
+ */
2831
+ Price[];
2832
+ /**
2833
+ * Three-letter ISO currency code, in lowercase.
2834
+ */
2835
+ unit_amount_currency?: /* Three-letter ISO currency code, in lowercase. */ /**
2836
+ * Three-letter ISO currency code, in lowercase. Must be a supported currency.
2837
+ * ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
2838
+ *
2839
+ * example:
2840
+ * EUR
2841
+ */
2842
+ Currency;
2843
+ /**
2844
+ * The flag for prices that contain price components.
2845
+ */
2846
+ is_composite_price: true;
2847
+ /**
2848
+ * The price creation date
2849
+ */
2850
+ _created_at?: string;
2851
+ /**
2852
+ * The price id
2853
+ */
2854
+ _id?: string;
2855
+ /**
2856
+ * The price autogenerated title
2857
+ */
2858
+ _title?: string;
2859
+ /**
2860
+ * The price last update date
2861
+ */
2862
+ _updated_at?: string;
2863
+ /**
2864
+ * The organization id the price belongs to
2865
+ */
2866
+ _org_id?: string;
2867
+ /**
2868
+ * An arbitrary set of tags attached to the composite price
2869
+ */
2870
+ _tags?: string[];
2871
+ }
2810
2872
  /**
2811
2873
  * The auth credentials for external integrations
2812
2874
  */
@@ -2819,86 +2881,183 @@ declare namespace Components {
2819
2881
  * example:
2820
2882
  * 8d0a2235-97ce-42d0-88a3-e374634ca44e
2821
2883
  */
2822
- journey_id: string;
2884
+ journey_id: string;
2885
+ /**
2886
+ * The name of the journey.
2887
+ * example:
2888
+ * journey name
2889
+ */
2890
+ journey_name: string;
2891
+ /**
2892
+ * The tags of the journey.
2893
+ */
2894
+ journey_tags?: string[];
2895
+ /**
2896
+ * The URL parameters of the journey.
2897
+ */
2898
+ journey_url_params?: {
2899
+ [name: string]: any;
2900
+ };
2901
+ /**
2902
+ * The name of the step where the products selection is happening.
2903
+ * example:
2904
+ * step name
2905
+ */
2906
+ current_step_name: string;
2907
+ /**
2908
+ * The name of the block where the products selection is happening.
2909
+ * example:
2910
+ * block name
2911
+ */
2912
+ current_block_name: string;
2913
+ /**
2914
+ * The steps of the journey.
2915
+ */
2916
+ steps_data: {
2917
+ /**
2918
+ * The name of the step.
2919
+ */
2920
+ step_name: string;
2921
+ /**
2922
+ * The index of the step.
2923
+ */
2924
+ step_index: number;
2925
+ /**
2926
+ * The data of the blocks.
2927
+ * example:
2928
+ * {
2929
+ * "Adresse": {
2930
+ * "countryCode": "DE",
2931
+ * "city": "Koblenz",
2932
+ * "zipCode": "56068",
2933
+ * "streetName": "Am Alten Hospital",
2934
+ * "houseNumber": "123"
2935
+ * }
2936
+ * }
2937
+ */
2938
+ blocks: {
2939
+ [name: string]: any;
2940
+ };
2941
+ }[];
2942
+ }
2943
+ /**
2944
+ * Describes how to compute the markup per period. Either `per_unit`, `tiered_volume` or `tiered_flatfee`.
2945
+ * - `per_unit` indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity
2946
+ * - `tiered_volume` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unitary price for all purchased units.
2947
+ * - `tiered_flatfee` While similar to tiered_volume, tiered flat fee charges for the same price (flat) for the entire range instead using the unit price to multiply the quantity.
2948
+ *
2949
+ */
2950
+ export type MarkupPricingModel = "per_unit" | "tiered_volume" | "tiered_flatfee";
2951
+ /**
2952
+ * A set of key-value pairs used to store meta data information about an entity.
2953
+ */
2954
+ export type MetaData = ({
2955
+ /**
2956
+ * Item key
2957
+ */
2958
+ key?: string;
2959
+ /**
2960
+ * Item value
2961
+ */
2962
+ value?: string;
2963
+ })[];
2964
+ /**
2965
+ * The composite price entity
2966
+ * example:
2967
+ * {
2968
+ * "$ref": "#/components/examples/composite-price"
2969
+ * }
2970
+ */
2971
+ export interface NonHydratedCompositePrice {
2972
+ [name: string]: any;
2973
+ /**
2974
+ * The billing period duration
2975
+ */
2976
+ billing_duration_amount?: number;
2977
+ /**
2978
+ * The billing period duration unit
2979
+ */
2980
+ billing_duration_unit?: "weeks" | "months" | "years";
2981
+ /**
2982
+ * The notice period duration
2983
+ */
2984
+ notice_time_amount?: number;
2985
+ /**
2986
+ * The notice period duration unit
2987
+ */
2988
+ notice_time_unit?: "weeks" | "months" | "years";
2989
+ /**
2990
+ * The termination period duration
2991
+ */
2992
+ termination_time_amount?: number;
2993
+ /**
2994
+ * The termination period duration unit
2995
+ */
2996
+ termination_time_unit?: "weeks" | "months" | "years";
2997
+ /**
2998
+ * The renewal period duration
2999
+ */
3000
+ renewal_duration_amount?: number;
3001
+ /**
3002
+ * The renewal period duration unit
3003
+ */
3004
+ renewal_duration_unit?: "weeks" | "months" | "years";
3005
+ /**
3006
+ * Whether the price can be used for new purchases.
3007
+ */
3008
+ active?: boolean;
3009
+ /**
3010
+ * A brief description of the price.
3011
+ */
3012
+ description?: string;
3013
+ /**
3014
+ * A set of [price](/api/pricing#tag/simple_price_schema) components that define the composite price.
3015
+ */
3016
+ price_components?: /* A set of [price](/api/pricing#tag/simple_price_schema) components that define the composite price. */ {
3017
+ $relation?: PriceComponentRelation[];
3018
+ } | {
3019
+ $relation?: PriceComponentRelation[];
3020
+ };
2823
3021
  /**
2824
- * The name of the journey.
3022
+ * Three-letter ISO currency code, in lowercase.
3023
+ */
3024
+ unit_amount_currency?: /* Three-letter ISO currency code, in lowercase. */ /**
3025
+ * Three-letter ISO currency code, in lowercase. Must be a supported currency.
3026
+ * ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
3027
+ *
2825
3028
  * example:
2826
- * journey name
3029
+ * EUR
2827
3030
  */
2828
- journey_name: string;
3031
+ Currency;
2829
3032
  /**
2830
- * The tags of the journey.
3033
+ * The flag for prices that contain price components.
2831
3034
  */
2832
- journey_tags?: string[];
3035
+ is_composite_price: true;
2833
3036
  /**
2834
- * The URL parameters of the journey.
3037
+ * The price creation date
2835
3038
  */
2836
- journey_url_params?: {
2837
- [name: string]: any;
2838
- };
3039
+ _created_at?: string;
2839
3040
  /**
2840
- * The name of the step where the products selection is happening.
2841
- * example:
2842
- * step name
3041
+ * The price id
2843
3042
  */
2844
- current_step_name: string;
3043
+ _id?: string;
2845
3044
  /**
2846
- * The name of the block where the products selection is happening.
2847
- * example:
2848
- * block name
3045
+ * The price autogenerated title
2849
3046
  */
2850
- current_block_name: string;
3047
+ _title?: string;
2851
3048
  /**
2852
- * The steps of the journey.
3049
+ * The price last update date
2853
3050
  */
2854
- steps_data: {
2855
- /**
2856
- * The name of the step.
2857
- */
2858
- step_name: string;
2859
- /**
2860
- * The index of the step.
2861
- */
2862
- step_index: number;
2863
- /**
2864
- * The data of the blocks.
2865
- * example:
2866
- * {
2867
- * "Adresse": {
2868
- * "countryCode": "DE",
2869
- * "city": "Koblenz",
2870
- * "zipCode": "56068",
2871
- * "streetName": "Am Alten Hospital",
2872
- * "houseNumber": "123"
2873
- * }
2874
- * }
2875
- */
2876
- blocks: {
2877
- [name: string]: any;
2878
- };
2879
- }[];
2880
- }
2881
- /**
2882
- * Describes how to compute the markup per period. Either `per_unit`, `tiered_volume` or `tiered_flatfee`.
2883
- * - `per_unit` indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity
2884
- * - `tiered_volume` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unitary price for all purchased units.
2885
- * - `tiered_flatfee` While similar to tiered_volume, tiered flat fee charges for the same price (flat) for the entire range instead using the unit price to multiply the quantity.
2886
- *
2887
- */
2888
- export type MarkupPricingModel = "per_unit" | "tiered_volume" | "tiered_flatfee";
2889
- /**
2890
- * A set of key-value pairs used to store meta data information about an entity.
2891
- */
2892
- export type MetaData = ({
3051
+ _updated_at?: string;
2893
3052
  /**
2894
- * Item key
3053
+ * The organization id the price belongs to
2895
3054
  */
2896
- key?: string;
3055
+ _org_id?: string;
2897
3056
  /**
2898
- * Item value
3057
+ * An arbitrary set of tags attached to the composite price
2899
3058
  */
2900
- value?: string;
2901
- })[];
3059
+ _tags?: string[];
3060
+ }
2902
3061
  export interface OAuthCredentials {
2903
3062
  /**
2904
3063
  * The OAuth client ID
@@ -2957,6 +3116,11 @@ declare namespace Components {
2957
3116
  */
2958
3117
  base_url?: string;
2959
3118
  }
3119
+ export interface Offer {
3120
+ product_id?: string;
3121
+ price_id?: string;
3122
+ target_id?: string;
3123
+ }
2960
3124
  /**
2961
3125
  * The opportunity entity
2962
3126
  * example:
@@ -3438,7 +3602,7 @@ declare namespace Components {
3438
3602
  /**
3439
3603
  * The flag for prices that contain price components.
3440
3604
  */
3441
- is_composite_price?: boolean;
3605
+ is_composite_price?: false;
3442
3606
  /**
3443
3607
  * Describes how to compute the price per period. Either `per_unit`, `tiered_graduated` or `tiered_volume`.
3444
3608
  * - `per_unit` indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity
@@ -3483,20 +3647,7 @@ declare namespace Components {
3483
3647
  * the tax configuration
3484
3648
  * example:
3485
3649
  * {
3486
- * "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
3487
- * "type": "VAT",
3488
- * "description": "Tax description",
3489
- * "active": "true",
3490
- * "region": "DE",
3491
- * "region_label": "Germany",
3492
- * "_org": "123",
3493
- * "_schema": "tax",
3494
- * "_tags": [
3495
- * "example",
3496
- * "mock"
3497
- * ],
3498
- * "_created_at": "2021-02-09T12:41:43.662Z",
3499
- * "_updated_at": "2021-02-09T12:41:43.662Z"
3650
+ * "$ref": "#/components/examples/tax/value"
3500
3651
  * }
3501
3652
  */
3502
3653
  Tax[];
@@ -3570,6 +3721,24 @@ declare namespace Components {
3570
3721
  */
3571
3722
  _tags?: string[];
3572
3723
  }
3724
+ export interface PriceAmounts {
3725
+ /**
3726
+ * Total of all items before (discounts or) taxes are applied.
3727
+ */
3728
+ amount_subtotal?: number;
3729
+ /**
3730
+ * Total of all items before (discounts or) taxes are applied, as a string with all the decimal places.
3731
+ */
3732
+ amount_subtotal_decimal?: string;
3733
+ /**
3734
+ * Total of all items after (discounts and) taxes are applied.
3735
+ */
3736
+ amount_total?: number;
3737
+ /**
3738
+ * Total of all items after (discounts and) taxes are applied, as a string with all the decimal places.
3739
+ */
3740
+ amount_total_decimal?: string;
3741
+ }
3573
3742
  export interface PriceComponentRelation {
3574
3743
  /**
3575
3744
  * The id of the price component
@@ -3698,14 +3867,7 @@ declare namespace Components {
3698
3867
  /**
3699
3868
  * example:
3700
3869
  * {
3701
- * "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
3702
- * "frequency_unit": "weekly",
3703
- * "value": 1000.245,
3704
- * "name": "avg consumption",
3705
- * "metadata": {
3706
- * "journey_title": "energy journey",
3707
- * "step_name": "avg consumption picker"
3708
- * }
3870
+ * "$ref": "#/components/examples/price-input-mapping/value"
3709
3871
  * }
3710
3872
  */
3711
3873
  export interface PriceInputMapping {
@@ -3735,14 +3897,7 @@ declare namespace Components {
3735
3897
  export type PriceInputMappings = /**
3736
3898
  * example:
3737
3899
  * {
3738
- * "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
3739
- * "frequency_unit": "weekly",
3740
- * "value": 1000.245,
3741
- * "name": "avg consumption",
3742
- * "metadata": {
3743
- * "journey_title": "energy journey",
3744
- * "step_name": "avg consumption picker"
3745
- * }
3900
+ * "$ref": "#/components/examples/price-input-mapping/value"
3746
3901
  * }
3747
3902
  */
3748
3903
  PriceInputMapping[];
@@ -3770,14 +3925,6 @@ declare namespace Components {
3770
3925
  * Total of all items after (discounts and) taxes are applied, as a string with all the decimal places.
3771
3926
  */
3772
3927
  amount_total_decimal?: string;
3773
- /**
3774
- * The discount amount.
3775
- */
3776
- discount_amount?: number;
3777
- /**
3778
- * The discount amount as a string with all the decimal places.
3779
- */
3780
- discount_amount_decimal?: string;
3781
3928
  /**
3782
3929
  * The cashback amount.
3783
3930
  */
@@ -3786,10 +3933,7 @@ declare namespace Components {
3786
3933
  * The cashback amount as a string with all the decimal places.
3787
3934
  */
3788
3935
  cashback_amount_decimal?: string;
3789
- /**
3790
- * The cashback period, for now it's limited to either 0 months or 12 months
3791
- */
3792
- cashback_period?: "0" | "12";
3936
+ cashback_period?: /* The cashback period, for now it's limited to either 0 months or 12 months */ CashbackPeriod;
3793
3937
  /**
3794
3938
  * Total amount after cashback is applied.
3795
3939
  */
@@ -3798,6 +3942,14 @@ declare namespace Components {
3798
3942
  * Total amount after cashback is applied as a string with all the decimal places.
3799
3943
  */
3800
3944
  after_cashback_amount_total_decimal?: string;
3945
+ /**
3946
+ * The discount amount.
3947
+ */
3948
+ discount_amount?: number;
3949
+ /**
3950
+ * The discount amount as a string with all the decimal places.
3951
+ */
3952
+ discount_amount_decimal?: string;
3801
3953
  /**
3802
3954
  * The discount percentage, if the applied coupon had a percentage type.
3803
3955
  */
@@ -4069,14 +4221,7 @@ declare namespace Components {
4069
4221
  * "$ref": "#/components/examples/price"
4070
4222
  * }
4071
4223
  */
4072
- Price | /**
4073
- * The price entity schema for dynamic pricing
4074
- * example:
4075
- * {
4076
- * "$ref": "#/components/examples/composite-price"
4077
- * }
4078
- */
4079
- CompositePrice;
4224
+ Price | /* The composite price entity */ CompositePrice;
4080
4225
  /**
4081
4226
  * The taxes applied to the price item.
4082
4227
  */
@@ -4088,7 +4233,7 @@ declare namespace Components {
4088
4233
  /**
4089
4234
  * The coupons applicable to the price item
4090
4235
  */
4091
- _coupons?: (CouponItem)[];
4236
+ _coupons?: (/* The shared properties for the coupon entity and coupon item entity */ CouponItem)[];
4092
4237
  /**
4093
4238
  * When set to true on a `_price` displayed as OnRequest (`show_as_on_request: 'on_request'`) this flag means the price has been approved and can now be displayed to the customer. This flag is only valid for prices shown as 'on_request'.
4094
4239
  */
@@ -4097,10 +4242,14 @@ declare namespace Components {
4097
4242
  * One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.
4098
4243
  */
4099
4244
  type?: "one_time" | "recurring";
4245
+ /**
4246
+ * The flag for prices that contain price components.
4247
+ */
4248
+ is_composite_price?: false;
4100
4249
  /**
4101
4250
  * The price billing period.
4102
4251
  */
4103
- billing_period?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly";
4252
+ billing_period?: /* The price billing period. */ BillingPeriod;
4104
4253
  pricing_model: /**
4105
4254
  * Describes how to compute the price per period. Either `per_unit`, `tiered_graduated` or `tiered_volume`.
4106
4255
  * - `per_unit` indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity
@@ -4267,14 +4416,9 @@ declare namespace Components {
4267
4416
  };
4268
4417
  external_fees_mappings?: /**
4269
4418
  * example:
4270
- * [
4271
- * {
4272
- * "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
4273
- * "frequency_unit": "weekly",
4274
- * "amount_total": 1000,
4275
- * "amount_total_decimal": "10.00"
4276
- * }
4277
- * ]
4419
+ * {
4420
+ * "$ref": "#/components/examples/external-fee-mappings/value"
4421
+ * }
4278
4422
  */
4279
4423
  ExternalFeeMappings;
4280
4424
  external_fees_metadata?: ExternalFeeMetadata;
@@ -4295,7 +4439,7 @@ declare namespace Components {
4295
4439
  /**
4296
4440
  * The coupons applicable to the price item
4297
4441
  */
4298
- _coupons?: (CouponItem)[];
4442
+ _coupons?: (/* The shared properties for the coupon entity and coupon item entity */ CouponItem)[];
4299
4443
  /**
4300
4444
  * One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.
4301
4445
  */
@@ -4303,7 +4447,7 @@ declare namespace Components {
4303
4447
  /**
4304
4448
  * The price billing period.
4305
4449
  */
4306
- billing_period?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly";
4450
+ billing_period?: /* The price billing period. */ BillingPeriod;
4307
4451
  /**
4308
4452
  * The unit amount value
4309
4453
  */
@@ -4387,7 +4531,7 @@ declare namespace Components {
4387
4531
  /**
4388
4532
  * The flag for prices that contain price components.
4389
4533
  */
4390
- is_composite_price?: boolean;
4534
+ is_composite_price?: false;
4391
4535
  /**
4392
4536
  * Describes how to compute the price per period. Either `per_unit`, `tiered_graduated` or `tiered_volume`.
4393
4537
  * - `per_unit` indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity
@@ -4432,20 +4576,7 @@ declare namespace Components {
4432
4576
  * the tax configuration
4433
4577
  * example:
4434
4578
  * {
4435
- * "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
4436
- * "type": "VAT",
4437
- * "description": "Tax description",
4438
- * "active": "true",
4439
- * "region": "DE",
4440
- * "region_label": "Germany",
4441
- * "_org": "123",
4442
- * "_schema": "tax",
4443
- * "_tags": [
4444
- * "example",
4445
- * "mock"
4446
- * ],
4447
- * "_created_at": "2021-02-09T12:41:43.662Z",
4448
- * "_updated_at": "2021-02-09T12:41:43.662Z"
4579
+ * "$ref": "#/components/examples/tax/value"
4449
4580
  * }
4450
4581
  */
4451
4582
  Tax[];
@@ -4520,7 +4651,7 @@ declare namespace Components {
4520
4651
  _tags?: string[];
4521
4652
  };
4522
4653
  }
4523
- export type PriceItemUnion = /* Represents a price input to the pricing library. */ PriceItemDto | /* Represents a composite price input to the pricing library. */ CompositePriceItemDto;
4654
+ export type PriceItemDtoUnion = /* Represents a price input to the pricing library. */ PriceItemDto | /* Represents a composite price input to the pricing library. */ CompositePriceItemDto;
4524
4655
  /**
4525
4656
  * Tracks a set of product prices, quantities, (discounts) and taxes.
4526
4657
  */
@@ -4542,7 +4673,7 @@ declare namespace Components {
4542
4673
  /**
4543
4674
  * A valid set of product prices, quantities, (discounts) and taxes from a client.
4544
4675
  */
4545
- export type PriceItemsDto = PriceItemUnion[];
4676
+ export type PriceItemsDto = PriceItemDtoUnion[];
4546
4677
  export interface PriceTier {
4547
4678
  up_to?: number | null;
4548
4679
  flat_fee_amount?: number;
@@ -4779,10 +4910,80 @@ declare namespace Components {
4779
4910
  /**
4780
4911
  * example:
4781
4912
  * {
4782
- * "id": "123e4567-e89b-12d3-a456-426614174000",
4783
- * "code": "123456",
4784
- * "has_usage_limit": true,
4785
- * "usage_limit": 10
4913
+ * "$ref": "#/components/examples/entity-item/value"
4914
+ * }
4915
+ */
4916
+ export interface ProductRecommendation {
4917
+ _id: EntityId /* uuid */;
4918
+ /**
4919
+ * Title of entity
4920
+ */
4921
+ _title: string;
4922
+ /**
4923
+ * Organization Id the entity belongs to
4924
+ */
4925
+ _org: string;
4926
+ _schema: string;
4927
+ _tags?: string[];
4928
+ _created_at: string; // date-time
4929
+ _updated_at: string; // date-time
4930
+ /**
4931
+ * Price being used as source
4932
+ */
4933
+ source_price?: {
4934
+ $relation?: EntityRelation[];
4935
+ };
4936
+ /**
4937
+ * Product being used as source
4938
+ */
4939
+ source_product?: {
4940
+ $relation?: EntityRelation[];
4941
+ };
4942
+ /**
4943
+ * Type of product recommendation
4944
+ */
4945
+ type?: "change" | "cross-sell" | "up-sell";
4946
+ offer?: Offer[];
4947
+ }
4948
+ /**
4949
+ * Product recommendations request payload
4950
+ */
4951
+ export interface ProductRecommendationResponse {
4952
+ /**
4953
+ * The number os results returned.
4954
+ */
4955
+ hits?: number;
4956
+ results?: /**
4957
+ * example:
4958
+ * {
4959
+ * "$ref": "#/components/examples/entity-item/value"
4960
+ * }
4961
+ */
4962
+ ProductRecommendation[];
4963
+ }
4964
+ /**
4965
+ * Product recommendations request payload
4966
+ */
4967
+ export interface ProductRecommendationSearch {
4968
+ product_recommendation_ids?: string[];
4969
+ /**
4970
+ * The catalog item to be used as source for the recommendation
4971
+ */
4972
+ catalog_item?: {
4973
+ /**
4974
+ * Product id
4975
+ */
4976
+ product_id?: string;
4977
+ /**
4978
+ * Product id
4979
+ */
4980
+ price_id?: string;
4981
+ };
4982
+ }
4983
+ /**
4984
+ * example:
4985
+ * {
4986
+ * "$ref": "#/components/examples/promo-code/value"
4786
4987
  * }
4787
4988
  */
4788
4989
  export interface PromoCode {
@@ -4808,36 +5009,13 @@ declare namespace Components {
4808
5009
  */
4809
5010
  export interface PromoCodeValidationResponse {
4810
5011
  matched_coupons?: /**
4811
- * The coupon configuration
5012
+ * The base for the coupon entity without promo codes
4812
5013
  * example:
4813
5014
  * {
4814
- * "_id": "123e4567-e89b-12d3-a456-426614174000",
4815
- * "_schema": "coupon",
4816
- * "_org": "org_12345",
4817
- * "_created_at": "2024-01-15T10:00:00.000Z",
4818
- * "_updated_at": "2024-01-20T12:00:00.000Z",
4819
- * "_title": "Sample Coupon",
4820
- * "name": "Sample Coupon",
4821
- * "type": "fixed",
4822
- * "fixed_value": 555,
4823
- * "fixed_value_currency": "USD",
4824
- * "fixed_value_decimal": "5.55",
4825
- * "active": true,
4826
- * "prices": {
4827
- * "$relation": [
4828
- * {
4829
- * "entity_id": "abc12345-def6-7890-gh12-ijklmnopqrst",
4830
- * "_tags": [
4831
- * "discount",
4832
- * "special"
4833
- * ],
4834
- * "_schema": "price"
4835
- * }
4836
- * ]
4837
- * }
5015
+ * "$ref": "#/components/examples/coupon-without-promo-codes/value"
4838
5016
  * }
4839
5017
  */
4840
- BaseCoupon[];
5018
+ CouponWithoutPromoCodes[];
4841
5019
  }
4842
5020
  /**
4843
5021
  * The provider entity
@@ -4872,14 +5050,6 @@ declare namespace Components {
4872
5050
  * Total of all items after (discounts and) taxes are applied, as a string with all the decimal places.
4873
5051
  */
4874
5052
  amount_total_decimal: string;
4875
- /**
4876
- * The discount amount.
4877
- */
4878
- discount_amount?: number;
4879
- /**
4880
- * The discount amount as a string with all the decimal places.
4881
- */
4882
- discount_amount_decimal?: string;
4883
5053
  /**
4884
5054
  * The cashback amount.
4885
5055
  */
@@ -4888,10 +5058,7 @@ declare namespace Components {
4888
5058
  * The cashback amount as a string with all the decimal places.
4889
5059
  */
4890
5060
  cashback_amount_decimal?: string;
4891
- /**
4892
- * The cashback period, for now it's limited to either 0 months or 12 months
4893
- */
4894
- cashback_period?: "0" | "12";
5061
+ cashback_period?: /* The cashback period, for now it's limited to either 0 months or 12 months */ CashbackPeriod;
4895
5062
  /**
4896
5063
  * Total amount after cashback is applied.
4897
5064
  */
@@ -4900,6 +5067,14 @@ declare namespace Components {
4900
5067
  * Total amount after cashback is applied as a string with all the decimal places.
4901
5068
  */
4902
5069
  after_cashback_amount_total_decimal?: string;
5070
+ /**
5071
+ * The discount amount.
5072
+ */
5073
+ discount_amount?: number;
5074
+ /**
5075
+ * The discount amount as a string with all the decimal places.
5076
+ */
5077
+ discount_amount_decimal?: string;
4903
5078
  /**
4904
5079
  * The discount percentage, if the applied coupon had a percentage type.
4905
5080
  */
@@ -4919,7 +5094,7 @@ declare namespace Components {
4919
5094
  /**
4920
5095
  * The price billing period.
4921
5096
  */
4922
- billing_period?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly";
5097
+ billing_period?: /* The price billing period. */ BillingPeriod;
4923
5098
  /**
4924
5099
  * The unit gross amount value.
4925
5100
  */
@@ -4965,14 +5140,6 @@ declare namespace Components {
4965
5140
  * Total of all items after (discounts and) taxes are applied, as a string with all the decimal places.
4966
5141
  */
4967
5142
  amount_total_decimal: string;
4968
- /**
4969
- * The discount amount.
4970
- */
4971
- discount_amount?: number;
4972
- /**
4973
- * The discount amount as a string with all the decimal places.
4974
- */
4975
- discount_amount_decimal?: string;
4976
5143
  /**
4977
5144
  * The cashback amount.
4978
5145
  */
@@ -4981,10 +5148,7 @@ declare namespace Components {
4981
5148
  * The cashback amount as a string with all the decimal places.
4982
5149
  */
4983
5150
  cashback_amount_decimal?: string;
4984
- /**
4985
- * The cashback period, for now it's limited to either 0 months or 12 months
4986
- */
4987
- cashback_period?: "0" | "12";
5151
+ cashback_period?: /* The cashback period, for now it's limited to either 0 months or 12 months */ CashbackPeriod;
4988
5152
  /**
4989
5153
  * Total amount after cashback is applied.
4990
5154
  */
@@ -4993,6 +5157,14 @@ declare namespace Components {
4993
5157
  * Total amount after cashback is applied as a string with all the decimal places.
4994
5158
  */
4995
5159
  after_cashback_amount_total_decimal?: string;
5160
+ /**
5161
+ * The discount amount.
5162
+ */
5163
+ discount_amount?: number;
5164
+ /**
5165
+ * The discount amount as a string with all the decimal places.
5166
+ */
5167
+ discount_amount_decimal?: string;
4996
5168
  /**
4997
5169
  * The discount percentage, if the applied coupon had a percentage type.
4998
5170
  */
@@ -5012,7 +5184,7 @@ declare namespace Components {
5012
5184
  /**
5013
5185
  * The price billing period.
5014
5186
  */
5015
- billing_period?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly";
5187
+ billing_period?: /* The price billing period. */ BillingPeriod;
5016
5188
  /**
5017
5189
  * The unit gross amount value.
5018
5190
  */
@@ -5037,7 +5209,7 @@ declare namespace Components {
5037
5209
  /**
5038
5210
  * The price billing period.
5039
5211
  */
5040
- billing_period?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly";
5212
+ billing_period?: /* The price billing period. */ BillingPeriod;
5041
5213
  /**
5042
5214
  * Total amount of items with same recurrence.
5043
5215
  */
@@ -5066,33 +5238,10 @@ declare namespace Components {
5066
5238
  * The coupons that got redeemed with received the code
5067
5239
  */
5068
5240
  coupons: /**
5069
- * The coupon configuration
5241
+ * The base for the coupon entity without promo codes
5070
5242
  * example:
5071
5243
  * {
5072
- * "_id": "123e4567-e89b-12d3-a456-426614174000",
5073
- * "_schema": "coupon",
5074
- * "_org": "org_12345",
5075
- * "_created_at": "2024-01-15T10:00:00.000Z",
5076
- * "_updated_at": "2024-01-20T12:00:00.000Z",
5077
- * "_title": "Sample Coupon",
5078
- * "name": "Sample Coupon",
5079
- * "type": "fixed",
5080
- * "fixed_value": 555,
5081
- * "fixed_value_currency": "USD",
5082
- * "fixed_value_decimal": "5.55",
5083
- * "active": true,
5084
- * "prices": {
5085
- * "$relation": [
5086
- * {
5087
- * "entity_id": "abc12345-def6-7890-gh12-ijklmnopqrst",
5088
- * "_tags": [
5089
- * "discount",
5090
- * "special"
5091
- * ],
5092
- * "_schema": "price"
5093
- * }
5094
- * ]
5095
- * }
5244
+ * "$ref": "#/components/examples/coupon-without-promo-codes/value"
5096
5245
  * }
5097
5246
  */
5098
5247
  CouponWithoutPromoCodes[];
@@ -5194,20 +5343,7 @@ declare namespace Components {
5194
5343
  * the tax configuration
5195
5344
  * example:
5196
5345
  * {
5197
- * "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
5198
- * "type": "VAT",
5199
- * "description": "Tax description",
5200
- * "active": "true",
5201
- * "region": "DE",
5202
- * "region_label": "Germany",
5203
- * "_org": "123",
5204
- * "_schema": "tax",
5205
- * "_tags": [
5206
- * "example",
5207
- * "mock"
5208
- * ],
5209
- * "_created_at": "2021-02-09T12:41:43.662Z",
5210
- * "_updated_at": "2021-02-09T12:41:43.662Z"
5346
+ * "$ref": "#/components/examples/tax/value"
5211
5347
  * }
5212
5348
  */
5213
5349
  export interface Tax {
@@ -5259,20 +5395,7 @@ declare namespace Components {
5259
5395
  * the tax configuration
5260
5396
  * example:
5261
5397
  * {
5262
- * "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
5263
- * "type": "VAT",
5264
- * "description": "Tax description",
5265
- * "active": "true",
5266
- * "region": "DE",
5267
- * "region_label": "Germany",
5268
- * "_org": "123",
5269
- * "_schema": "tax",
5270
- * "_tags": [
5271
- * "example",
5272
- * "mock"
5273
- * ],
5274
- * "_created_at": "2021-02-09T12:41:43.662Z",
5275
- * "_updated_at": "2021-02-09T12:41:43.662Z"
5398
+ * "$ref": "#/components/examples/tax/value"
5276
5399
  * }
5277
5400
  */
5278
5401
  Tax;
@@ -5309,20 +5432,7 @@ declare namespace Components {
5309
5432
  * the tax configuration
5310
5433
  * example:
5311
5434
  * {
5312
- * "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
5313
- * "type": "VAT",
5314
- * "description": "Tax description",
5315
- * "active": "true",
5316
- * "region": "DE",
5317
- * "region_label": "Germany",
5318
- * "_org": "123",
5319
- * "_schema": "tax",
5320
- * "_tags": [
5321
- * "example",
5322
- * "mock"
5323
- * ],
5324
- * "_created_at": "2021-02-09T12:41:43.662Z",
5325
- * "_updated_at": "2021-02-09T12:41:43.662Z"
5435
+ * "$ref": "#/components/examples/tax/value"
5326
5436
  * }
5327
5437
  */
5328
5438
  Tax;
@@ -5592,6 +5702,19 @@ declare namespace Paths {
5592
5702
  export type $400 = Components.Schemas.Error;
5593
5703
  }
5594
5704
  }
5705
+ namespace $ProductRecommendations {
5706
+ export interface HeaderParameters {
5707
+ "X-Ivy-Org-ID"?: Parameters.XIvyOrgID;
5708
+ }
5709
+ namespace Parameters {
5710
+ export type XIvyOrgID = string;
5711
+ }
5712
+ export type RequestBody = /* Product recommendations request payload */ Components.Schemas.ProductRecommendationSearch;
5713
+ namespace Responses {
5714
+ export type $200 = /* Product recommendations request payload */ Components.Schemas.ProductRecommendationResponse;
5715
+ export type $400 = Components.Schemas.Error;
5716
+ }
5717
+ }
5595
5718
  namespace $SaveCredentials {
5596
5719
  namespace Parameters {
5597
5720
  export type IntegrationId = Components.Schemas.IntegrationId;
@@ -5976,6 +6099,16 @@ export interface OperationMethods {
5976
6099
  data?: any,
5977
6100
  config?: AxiosRequestConfig
5978
6101
  ): OperationResponse<Paths.$DeleteCredentials.Responses.$204>
6102
+ /**
6103
+ * $productRecommendations - productRecommendations
6104
+ *
6105
+ * Get a list of product recommendations based on the search parameters.
6106
+ */
6107
+ '$productRecommendations'(
6108
+ parameters?: Parameters<Paths.$ProductRecommendations.HeaderParameters> | null,
6109
+ data?: Paths.$ProductRecommendations.RequestBody,
6110
+ config?: AxiosRequestConfig
6111
+ ): OperationResponse<Paths.$ProductRecommendations.Responses.$200>
5979
6112
  }
5980
6113
 
5981
6114
  export interface PathsDictionary {
@@ -6206,6 +6339,18 @@ export interface PathsDictionary {
6206
6339
  config?: AxiosRequestConfig
6207
6340
  ): OperationResponse<Paths.$DeleteCredentials.Responses.$204>
6208
6341
  }
6342
+ ['/v1/public/product-recommendations']: {
6343
+ /**
6344
+ * $productRecommendations - productRecommendations
6345
+ *
6346
+ * Get a list of product recommendations based on the search parameters.
6347
+ */
6348
+ 'post'(
6349
+ parameters?: Parameters<Paths.$ProductRecommendations.HeaderParameters> | null,
6350
+ data?: Paths.$ProductRecommendations.RequestBody,
6351
+ config?: AxiosRequestConfig
6352
+ ): OperationResponse<Paths.$ProductRecommendations.Responses.$200>
6353
+ }
6209
6354
  }
6210
6355
 
6211
6356
  export type Client = OpenAPIClient<OperationMethods, PathsDictionary>
@@ -6219,7 +6364,8 @@ export type AvailabilityLocation = Components.Schemas.AvailabilityLocation;
6219
6364
  export type AvailabilityResult = Components.Schemas.AvailabilityResult;
6220
6365
  export type AverageMarketPriceRecord = Components.Schemas.AverageMarketPriceRecord;
6221
6366
  export type AverageMarketPriceResult = Components.Schemas.AverageMarketPriceResult;
6222
- export type BaseCoupon = Components.Schemas.BaseCoupon;
6367
+ export type BaseCompositePrice = Components.Schemas.BaseCompositePrice;
6368
+ export type BaseCouponCommon = Components.Schemas.BaseCouponCommon;
6223
6369
  export type BaseMarketPriceRecord = Components.Schemas.BaseMarketPriceRecord;
6224
6370
  export type BasePriceItem = Components.Schemas.BasePriceItem;
6225
6371
  export type BasePriceItemCommon = Components.Schemas.BasePriceItemCommon;
@@ -6230,6 +6376,8 @@ export type BillingPeriod = Components.Schemas.BillingPeriod;
6230
6376
  export type Cart = Components.Schemas.Cart;
6231
6377
  export type CartDto = Components.Schemas.CartDto;
6232
6378
  export type CashbackAmount = Components.Schemas.CashbackAmount;
6379
+ export type CashbackAmounts = Components.Schemas.CashbackAmounts;
6380
+ export type CashbackPeriod = Components.Schemas.CashbackPeriod;
6233
6381
  export type CatalogSearch = Components.Schemas.CatalogSearch;
6234
6382
  export type CatalogSearchResult = Components.Schemas.CatalogSearchResult;
6235
6383
  export type CheckoutCart = Components.Schemas.CheckoutCart;
@@ -6252,6 +6400,7 @@ export type CouponItem = Components.Schemas.CouponItem;
6252
6400
  export type CouponWithoutPromoCodes = Components.Schemas.CouponWithoutPromoCodes;
6253
6401
  export type Currency = Components.Schemas.Currency;
6254
6402
  export type Customer = Components.Schemas.Customer;
6403
+ export type DiscountAmounts = Components.Schemas.DiscountAmounts;
6255
6404
  export type DynamicTariffInterval = Components.Schemas.DynamicTariffInterval;
6256
6405
  export type DynamicTariffMode = Components.Schemas.DynamicTariffMode;
6257
6406
  export type EntityId = Components.Schemas.EntityId;
@@ -6267,14 +6416,17 @@ export type File = Components.Schemas.File;
6267
6416
  export type GasConcessionType = Components.Schemas.GasConcessionType;
6268
6417
  export type HistoricMarketPriceRecord = Components.Schemas.HistoricMarketPriceRecord;
6269
6418
  export type HistoricMarketPricesResult = Components.Schemas.HistoricMarketPricesResult;
6419
+ export type HydratedCompositePrice = Components.Schemas.HydratedCompositePrice;
6270
6420
  export type IntegrationAuthCredentials = Components.Schemas.IntegrationAuthCredentials;
6271
6421
  export type IntegrationCredentialsResult = Components.Schemas.IntegrationCredentialsResult;
6272
6422
  export type IntegrationId = Components.Schemas.IntegrationId;
6273
6423
  export type JourneyContext = Components.Schemas.JourneyContext;
6274
6424
  export type MarkupPricingModel = Components.Schemas.MarkupPricingModel;
6275
6425
  export type MetaData = Components.Schemas.MetaData;
6426
+ export type NonHydratedCompositePrice = Components.Schemas.NonHydratedCompositePrice;
6276
6427
  export type OAuthCredentials = Components.Schemas.OAuthCredentials;
6277
6428
  export type OAuthIntegration = Components.Schemas.OAuthIntegration;
6429
+ export type Offer = Components.Schemas.Offer;
6278
6430
  export type Opportunity = Components.Schemas.Opportunity;
6279
6431
  export type OpportunitySource = Components.Schemas.OpportunitySource;
6280
6432
  export type Order = Components.Schemas.Order;
@@ -6285,6 +6437,7 @@ export type OrderStatus = Components.Schemas.OrderStatus;
6285
6437
  export type PaymentMethod = Components.Schemas.PaymentMethod;
6286
6438
  export type PowerMeterType = Components.Schemas.PowerMeterType;
6287
6439
  export type Price = Components.Schemas.Price;
6440
+ export type PriceAmounts = Components.Schemas.PriceAmounts;
6288
6441
  export type PriceComponentRelation = Components.Schemas.PriceComponentRelation;
6289
6442
  export type PriceConditions = Components.Schemas.PriceConditions;
6290
6443
  export type PriceDynamicTariff = Components.Schemas.PriceDynamicTariff;
@@ -6293,7 +6446,7 @@ export type PriceInputMapping = Components.Schemas.PriceInputMapping;
6293
6446
  export type PriceInputMappings = Components.Schemas.PriceInputMappings;
6294
6447
  export type PriceItem = Components.Schemas.PriceItem;
6295
6448
  export type PriceItemDto = Components.Schemas.PriceItemDto;
6296
- export type PriceItemUnion = Components.Schemas.PriceItemUnion;
6449
+ export type PriceItemDtoUnion = Components.Schemas.PriceItemDtoUnion;
6297
6450
  export type PriceItems = Components.Schemas.PriceItems;
6298
6451
  export type PriceItemsDto = Components.Schemas.PriceItemsDto;
6299
6452
  export type PriceTier = Components.Schemas.PriceTier;
@@ -6304,6 +6457,9 @@ export type PricingDetailsResponse = Components.Schemas.PricingDetailsResponse;
6304
6457
  export type PricingModel = Components.Schemas.PricingModel;
6305
6458
  export type Product = Components.Schemas.Product;
6306
6459
  export type ProductCategory = Components.Schemas.ProductCategory;
6460
+ export type ProductRecommendation = Components.Schemas.ProductRecommendation;
6461
+ export type ProductRecommendationResponse = Components.Schemas.ProductRecommendationResponse;
6462
+ export type ProductRecommendationSearch = Components.Schemas.ProductRecommendationSearch;
6307
6463
  export type PromoCode = Components.Schemas.PromoCode;
6308
6464
  export type PromoCodeValidationResponse = Components.Schemas.PromoCodeValidationResponse;
6309
6465
  export type Provider = Components.Schemas.Provider;