@epilot/pricing-client 1.13.3 → 2.0.1

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
@@ -181,7 +181,7 @@ declare namespace Components {
181
181
  customer?: Customer;
182
182
  billing_address?: Address;
183
183
  delivery_address?: Address;
184
- metadata?: /* A set of key-value pairs. */ MetaData;
184
+ metadata?: /* A set of key-value pairs used to store meta data information about an entity. */ MetaData;
185
185
  line_items?: /* Tracks a set of product prices, quantities, (discounts) and taxes. */ PriceItems;
186
186
  /**
187
187
  * Total of all items before (discounts or) taxes are applied.
@@ -199,7 +199,7 @@ declare namespace Components {
199
199
  * A valid cart payload from a client.
200
200
  */
201
201
  export interface CartDto {
202
- metadata?: /* A set of key-value pairs. */ MetaData;
202
+ metadata?: /* A set of key-value pairs used to store meta data information about an entity. */ MetaData;
203
203
  customer?: Customer;
204
204
  billing_address?: Address;
205
205
  delivery_address?: Address;
@@ -215,7 +215,7 @@ declare namespace Components {
215
215
  * ce99875f-fba9-4fe2-a8f9-afaf52059051
216
216
  */
217
217
  source_id?: string;
218
- source?: /* Order Source */ OrderSource;
218
+ source?: /* The order generation source */ OrderSource;
219
219
  additional_addresses?: Address[];
220
220
  payment_method?: /**
221
221
  * A PaymentMethod represent your customer's payment instruments.
@@ -227,7 +227,18 @@ declare namespace Components {
227
227
  * An array of file IDs, already upload into the File API, that are related with this cart
228
228
  */
229
229
  files?: string[];
230
- status?: /* The order status */ OrderStatus;
230
+ status?: /**
231
+ *
232
+ * | status | description |
233
+ * |-------------|-------|
234
+ * | `draft` | ​​Starting state for all orders, at this point we can still edit the order |
235
+ * | `quote` | The order is in a quoting phase, bound to an expiration date |
236
+ * | `placed` | The order has been paid and can now be fulfilled (shipped, delivered, complete) or canceled |
237
+ * | `cancelled` | The order has been cancelled |
238
+ * | `completed` | The order is now closed and finalized |
239
+ *
240
+ */
241
+ OrderStatus;
231
242
  tags?: string[];
232
243
  journey_data?: {
233
244
  [name: string]: any;
@@ -302,7 +313,21 @@ declare namespace Components {
302
313
  * The number os results returned.
303
314
  */
304
315
  hits?: number;
305
- results?: (/* The product configuration */ Product | /* The price configuration */ Price)[];
316
+ results?: (/**
317
+ * The product entity
318
+ * example:
319
+ * {
320
+ * "$ref": "#/components/examples/product"
321
+ * }
322
+ */
323
+ Product | /**
324
+ * The price entity schema for simple pricing
325
+ * example:
326
+ * {
327
+ * "$ref": "#/components/examples/price"
328
+ * }
329
+ */
330
+ Price)[];
306
331
  }
307
332
  /**
308
333
  * The cart checkout request payload
@@ -315,7 +340,14 @@ declare namespace Components {
315
340
  * The cart checkout result
316
341
  */
317
342
  export interface CheckoutCartResult {
318
- order?: /* The order entity */ Order;
343
+ order?: /**
344
+ * The order entity
345
+ * example:
346
+ * {
347
+ * "$ref": "#/components/examples/order-with-simple-prices"
348
+ * }
349
+ */
350
+ Order;
319
351
  }
320
352
  /**
321
353
  * The checkout mode for the cart checkout.
@@ -371,7 +403,7 @@ declare namespace Components {
371
403
  $relation?: EntityRelation;
372
404
  }
373
405
  /**
374
- * A set of key-value pairs.
406
+ * A set of key-value pairs used to store meta data information about an entity.
375
407
  */
376
408
  export type MetaData = ({
377
409
  /**
@@ -385,6 +417,10 @@ declare namespace Components {
385
417
  })[];
386
418
  /**
387
419
  * The opportunity entity
420
+ * example:
421
+ * {
422
+ * "$ref": "#/components/examples/opportunity"
423
+ * }
388
424
  */
389
425
  export interface Opportunity {
390
426
  [name: string]: any;
@@ -392,41 +428,157 @@ declare namespace Components {
392
428
  * The opportunity id number for the customer (autogenerated if left blank)
393
429
  */
394
430
  opportunity_number?: string;
431
+ /**
432
+ * The opportunity title for the opportunity
433
+ */
434
+ opportunity_title?: string;
395
435
  /**
396
436
  * A description to frame this opportunity within its sales process
397
437
  */
398
438
  description?: string;
399
439
  /**
400
- * The opportunity status
440
+ * The opportunity status (defined by the opportunity workflow)
441
+ */
442
+ status?: string;
443
+ /**
444
+ * The expiration date
445
+ */
446
+ due_date?: string;
447
+ /**
448
+ * The opportunity assignees
449
+ */
450
+ assignee?: {
451
+ id?: string;
452
+ email?: string;
453
+ display_name?: string;
454
+ token?: string;
455
+ image_uri?: string;
456
+ organization_id?: string;
457
+ department?: string;
458
+ preferred_language?: string;
459
+ status?: string;
460
+ phone?: string;
461
+ email_notification_settings?: {
462
+ [key: string]: any;
463
+ };
464
+ is_signature_enabled?: boolean;
465
+ created_at?: string;
466
+ }[];
467
+ /**
468
+ * A list of customers related with the opportunity
469
+ */
470
+ customer?: {
471
+ $relation?: EntityRelation[];
472
+ };
473
+ /**
474
+ * A set of dates associated with the opportunity
475
+ */
476
+ dates?: ({
477
+ /**
478
+ * The date tags
479
+ */
480
+ _tags?: string[];
481
+ /**
482
+ * The date value
483
+ */
484
+ value?: string;
485
+ })[];
486
+ /**
487
+ * The billing address
488
+ */
489
+ billing_address?: {
490
+ /**
491
+ * The relation from which a field is being referenced
492
+ */
493
+ $relation_ref?: ({
494
+ /**
495
+ * The id of the referenced entity
496
+ */
497
+ entity_id?: string;
498
+ /**
499
+ * The path to the target attribute being referenced
500
+ */
501
+ path?: string;
502
+ })[];
503
+ };
504
+ /**
505
+ * The delivery address
506
+ */
507
+ delivery_address?: {
508
+ /**
509
+ * The relation from which a field is being referenced
510
+ */
511
+ $relation_ref?: ({
512
+ /**
513
+ * The id of the referenced entity
514
+ */
515
+ entity_id?: string;
516
+ /**
517
+ * The path to the target attribute being referenced
518
+ */
519
+ path?: string;
520
+ })[];
521
+ };
522
+ /**
523
+ * A list of additional addresses
524
+ */
525
+ address?: {
526
+ /**
527
+ * The relation from which a field is being referenced
528
+ */
529
+ $relation_ref?: ({
530
+ /**
531
+ * The id of the referenced entity
532
+ */
533
+ entity_id?: string;
534
+ /**
535
+ * The path to the target attribute being referenced
536
+ */
537
+ path?: string;
538
+ })[];
539
+ };
540
+ /**
541
+ * The order relations items, representing quotes or orders associated with the opportunity
401
542
  */
402
- status?: "lead" | "qualification" | "validation" | "offering" | "supply" | "approval" | "operations" | "complete";
403
- items?: /* The order entity */ Order[] | {
543
+ items?: {
404
544
  $relation?: /* An order relation reference */ OrderRelation[];
405
545
  };
406
546
  /**
407
547
  * Organization Id the order belongs to
408
548
  */
409
549
  _org_id?: string;
550
+ /**
551
+ * The opportunity id
552
+ */
410
553
  _id?: string;
554
+ /**
555
+ * The opportunity creation date
556
+ */
411
557
  _created_at?: string;
558
+ /**
559
+ * The opportunity last update date
560
+ */
412
561
  _updated_at?: string;
413
562
  /**
414
- * type of source, e.g. journey or manual
563
+ * Type of source, e.g. journey or manual
415
564
  * example:
416
565
  * journey
417
566
  */
418
567
  source_type?: string;
419
568
  /**
420
- * identifier for source e.g. journey ID
569
+ * Identifier for source e.g. journey ID
421
570
  * example:
422
571
  * ce99875f-fba9-4fe2-a8f9-afaf52059051
423
572
  */
424
573
  source_id?: string;
425
- source?: /* Order Source */ OpportunitySource;
574
+ source?: /* The opportunity generation source */ OpportunitySource;
575
+ /**
576
+ * An arbitrary set of tags attached to the opportunity
577
+ */
426
578
  _tags?: string[];
427
579
  }
428
580
  /**
429
- * Order Source
581
+ * The opportunity generation source
430
582
  */
431
583
  export interface OpportunitySource {
432
584
  /**
@@ -444,40 +596,85 @@ declare namespace Components {
444
596
  }
445
597
  /**
446
598
  * The order entity
599
+ * example:
600
+ * {
601
+ * "$ref": "#/components/examples/order-with-simple-prices"
602
+ * }
447
603
  */
448
604
  export interface Order {
449
605
  [name: string]: any;
450
606
  /**
451
- * The order id number for the customer
607
+ * The order number (customer facing)
452
608
  */
453
609
  order_number?: string;
454
610
  /**
455
- * The cart id that originated or is associated with the order
611
+ * The cart id that originated or is associated with the this order
456
612
  */
457
613
  cart_id?: string;
458
- status?: /* The order status */ OrderStatus;
614
+ status?: /**
615
+ *
616
+ * | status | description |
617
+ * |-------------|-------|
618
+ * | `draft` | ​​Starting state for all orders, at this point we can still edit the order |
619
+ * | `quote` | The order is in a quoting phase, bound to an expiration date |
620
+ * | `placed` | The order has been paid and can now be fulfilled (shipped, delivered, complete) or canceled |
621
+ * | `cancelled` | The order has been cancelled |
622
+ * | `completed` | The order is now closed and finalized |
623
+ *
624
+ */
625
+ OrderStatus;
459
626
  /**
460
- * type of source, e.g. journey or manual
627
+ * Type of source, e.g. journey or manual
461
628
  * example:
462
629
  * journey
463
630
  */
464
631
  source_type?: string;
465
632
  /**
466
- * identifier for source e.g. journey ID
633
+ * Identifier for source e.g. journey ID
467
634
  * example:
468
635
  * ce99875f-fba9-4fe2-a8f9-afaf52059051
469
636
  */
470
637
  source_id?: string;
471
- source?: /* Order Source */ OrderSource;
472
- metadata?: /* A set of key-value pairs. */ MetaData;
638
+ source?: /* The order generation source */ OrderSource;
639
+ metadata?: /* A set of key-value pairs used to store meta data information about an entity. */ MetaData;
640
+ /**
641
+ * A list of customers related with the opportunity
642
+ */
643
+ customer?: {
644
+ $relation?: EntityRelation[];
645
+ };
646
+ /**
647
+ * The billing contact first name
648
+ */
473
649
  billing_first_name?: string;
650
+ /**
651
+ * The billing contact last name
652
+ */
474
653
  billing_last_name?: string;
654
+ /**
655
+ * The billing account name
656
+ */
475
657
  billing_company_name?: string;
658
+ /**
659
+ * The billing account VAT
660
+ */
476
661
  billing_vat?: string;
662
+ /**
663
+ * The billing email
664
+ */
477
665
  billing_email?: string;
666
+ /**
667
+ * The billing phone
668
+ */
478
669
  billing_phone?: string;
670
+ /**
671
+ * The billing address
672
+ */
479
673
  billing_address?: Address[];
480
- currency?: /**
674
+ /**
675
+ * The order main currency
676
+ */
677
+ currency?: /* The order main currency */ /**
481
678
  * Three-letter ISO currency code, in lowercase. Must be a supported currency.
482
679
  * ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
483
680
  *
@@ -485,16 +682,18 @@ declare namespace Components {
485
682
  * EUR
486
683
  */
487
684
  Currency;
685
+ /**
686
+ * The delivery address
687
+ */
488
688
  delivery_address?: Address[];
689
+ /**
690
+ * The payment method details for the order
691
+ */
489
692
  payment_method?: /**
490
693
  * A PaymentMethod represent your customer's payment instruments.
491
694
  *
492
695
  */
493
696
  PaymentMethod[];
494
- /**
495
- * The id of an existing contact.
496
- */
497
- contact?: string;
498
697
  line_items?: /* Tracks a set of product prices, quantities, (discounts) and taxes. */ PriceItems;
499
698
  /**
500
699
  * Total of all items before (discounts or) taxes are applied.
@@ -509,16 +708,39 @@ declare namespace Components {
509
708
  * Organization Id the order belongs to
510
709
  */
511
710
  _org_id?: string;
711
+ /**
712
+ * The order id
713
+ */
512
714
  _id?: string;
715
+ /**
716
+ * The order creation date
717
+ */
513
718
  _created_at?: string;
719
+ /**
720
+ * The order last update date
721
+ */
514
722
  _updated_at?: string;
723
+ /**
724
+ * An arbitrary set of tags attached to the order
725
+ */
515
726
  _tags?: string[];
516
727
  }
517
728
  /**
518
729
  * Order Entity Payload
519
730
  */
520
731
  export interface OrderPayload {
521
- status?: /* The order status */ OrderStatus;
732
+ status?: /**
733
+ *
734
+ * | status | description |
735
+ * |-------------|-------|
736
+ * | `draft` | ​​Starting state for all orders, at this point we can still edit the order |
737
+ * | `quote` | The order is in a quoting phase, bound to an expiration date |
738
+ * | `placed` | The order has been paid and can now be fulfilled (shipped, delivered, complete) or canceled |
739
+ * | `cancelled` | The order has been cancelled |
740
+ * | `completed` | The order is now closed and finalized |
741
+ *
742
+ */
743
+ OrderStatus;
522
744
  line_items?: /* Tracks a set of product prices, quantities, (discounts) and taxes. */ PriceItems;
523
745
  /**
524
746
  * type of source, e.g. journey or manual
@@ -564,7 +786,7 @@ declare namespace Components {
564
786
  _tags?: string[];
565
787
  }
566
788
  /**
567
- * Order Source
789
+ * The order generation source
568
790
  */
569
791
  export interface OrderSource {
570
792
  /**
@@ -581,7 +803,15 @@ declare namespace Components {
581
803
  title?: string;
582
804
  }
583
805
  /**
584
- * The order status
806
+ *
807
+ * | status | description |
808
+ * |-------------|-------|
809
+ * | `draft` | ​​Starting state for all orders, at this point we can still edit the order |
810
+ * | `quote` | The order is in a quoting phase, bound to an expiration date |
811
+ * | `placed` | The order has been paid and can now be fulfilled (shipped, delivered, complete) or canceled |
812
+ * | `cancelled` | The order has been cancelled |
813
+ * | `completed` | The order is now closed and finalized |
814
+ *
585
815
  */
586
816
  export type OrderStatus = "draft" | "quote" | "placed" | "cancelled" | "completed";
587
817
  /**
@@ -601,21 +831,78 @@ declare namespace Components {
601
831
  };
602
832
  }
603
833
  /**
604
- * The price configuration
834
+ * The price entity schema for simple pricing
835
+ * example:
836
+ * {
837
+ * "$ref": "#/components/examples/price"
838
+ * }
605
839
  */
606
840
  export interface Price {
607
841
  [name: string]: any;
842
+ /**
843
+ * Whether the price can be used for new purchases.
844
+ */
608
845
  active?: boolean;
609
- billing_scheme?: "Per Unit";
846
+ /**
847
+ * Describes how to compute the price per period. Either `per_unit` or `tiered`.
848
+ * - `per_unit` indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity
849
+ * - `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the tiers and tiers_mode attributes.
850
+ *
851
+ * ⚠️ Tiered pricing is **not supported** yet.
852
+ *
853
+ */
854
+ billing_scheme?: "per_unit";
855
+ /**
856
+ * A brief description of the price.
857
+ */
610
858
  description?: string;
611
- sales_tax?: SalesTax;
859
+ /**
860
+ * The default tax rate applicable to the product.
861
+ * This field is deprecated, use the new `tax` attribute.
862
+ *
863
+ */
864
+ sales_tax?: /**
865
+ * The default tax rate applicable to the product.
866
+ * This field is deprecated, use the new `tax` attribute.
867
+ *
868
+ */
869
+ SalesTax;
870
+ /**
871
+ * The default tax rate applied to the price
872
+ */
873
+ tax?: {
874
+ $relation?: EntityRelation[];
875
+ };
876
+ /**
877
+ * Specifies whether the price is considered `inclusive` of taxes or `exclusive` of taxes.
878
+ * One of `inclusive`, `exclusive`, or `unspecified`.
879
+ *
880
+ */
612
881
  tax_behavior?: "inclusive" | "exclusive";
613
- tiers_mode?: "Standard";
882
+ /**
883
+ * Defines the tiered pricing type of the price.
884
+ */
885
+ tiers_mode?: "standard";
886
+ /**
887
+ * One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.
888
+ */
614
889
  type?: "one_time" | "recurring";
615
- billing_period?: BillingPeriod;
890
+ /**
891
+ * For recurring prices `billing_period` defines the default extent of the recurrence.
892
+ */
893
+ billing_period?: /* For recurring prices `billing_period` defines the default extent of the recurrence. */ BillingPeriod;
894
+ /**
895
+ * The unit amount in cents to be charged, represented as a whole integer if possible.
896
+ */
616
897
  unit_amount?: number;
898
+ /**
899
+ * The unit amount in cents to be charged, represented as a decimal string with at most 12 decimal places.
900
+ */
617
901
  unit_amount_decimal?: string;
618
- unit_amount_currency?: /**
902
+ /**
903
+ * Three-letter ISO currency code, in lowercase.
904
+ */
905
+ unit_amount_currency?: /* Three-letter ISO currency code, in lowercase. */ /**
619
906
  * Three-letter ISO currency code, in lowercase. Must be a supported currency.
620
907
  * ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
621
908
  *
@@ -623,28 +910,148 @@ declare namespace Components {
623
910
  * EUR
624
911
  */
625
912
  Currency;
913
+ /**
914
+ * Defines the way the price amount is display in epilot journeys.
915
+ */
916
+ price_display_in_journeys?: "show_price" | "show_as_starting_price" | "show_as_on_request";
917
+ /**
918
+ * The billing period duration
919
+ */
626
920
  billing_duration_amount?: number;
921
+ /**
922
+ * The billing period duration unit
923
+ */
627
924
  billing_duration_unit?: "weeks" | "months" | "years";
925
+ /**
926
+ * The notice period duration
927
+ */
628
928
  notice_time_amount?: number;
929
+ /**
930
+ * The notice period duration unit
931
+ */
629
932
  notice_time_unit?: "weeks" | "months" | "years";
933
+ /**
934
+ * The termination period duration
935
+ */
630
936
  termination_time_amount?: number;
937
+ /**
938
+ * The termination period duration unit
939
+ */
631
940
  termination_time_unit?: "weeks" | "months" | "years";
941
+ /**
942
+ * The renewal period duration
943
+ */
632
944
  renewal_duration_amount?: number;
945
+ /**
946
+ * The renewal period duration unit
947
+ */
633
948
  renewal_duration_unit?: "weeks" | "months" | "years";
949
+ /**
950
+ * The price creation date
951
+ */
634
952
  _created_at?: string;
953
+ /**
954
+ * The price id
955
+ */
635
956
  _id?: string;
957
+ /**
958
+ * The price autogenerated title
959
+ */
636
960
  _title?: string;
961
+ /**
962
+ * The price last update date
963
+ */
964
+ _updated_at?: string;
965
+ /**
966
+ * The organization id the price belongs to
967
+ */
968
+ _org_id?: string;
969
+ /**
970
+ * An arbitrary set of tags attached to the price
971
+ */
972
+ _tags?: string[];
973
+ }
974
+ /**
975
+ * The price entity schema for dynamic pricing
976
+ * example:
977
+ * {
978
+ * "$ref": "#/components/examples/price-bundle"
979
+ * }
980
+ */
981
+ export interface PriceBundle {
982
+ [name: string]: any;
983
+ /**
984
+ * Whether the price can be used for new purchases.
985
+ */
986
+ active?: boolean;
987
+ /**
988
+ * A brief description of the price.
989
+ */
990
+ description?: string;
991
+ /**
992
+ * A set of [price](/api/pricing#tag/simple_price_schema) components that define the price bundle.
993
+ */
994
+ price_components?: {
995
+ $relation?: PriceComponentRelation[];
996
+ };
997
+ /**
998
+ * The price creation date
999
+ */
1000
+ _created_at?: string;
1001
+ /**
1002
+ * The price id
1003
+ */
1004
+ _id?: string;
1005
+ /**
1006
+ * The price autogenerated title
1007
+ */
1008
+ _title?: string;
1009
+ /**
1010
+ * The price last update date
1011
+ */
637
1012
  _updated_at?: string;
1013
+ /**
1014
+ * The organization id the price belongs to
1015
+ */
1016
+ _org_id?: string;
1017
+ /**
1018
+ * An arbitrary set of tags attached to the price bundle
1019
+ */
1020
+ _tags?: string[];
1021
+ }
1022
+ export interface PriceComponentRelation {
1023
+ /**
1024
+ * The id of the price component
1025
+ */
1026
+ entity_id?: string;
1027
+ /**
1028
+ * By default, the quantity is set to 1, when greater than 1 this value is used as a multiplicative factor.
1029
+ * E.g: 16 x Solar Modules - Premium price.
1030
+ *
1031
+ */
1032
+ quantity?: number;
1033
+ /**
1034
+ * An arbitrary set of tags attached to the bundle - component relation
1035
+ */
1036
+ _tags?: string[];
638
1037
  }
639
1038
  /**
640
1039
  * Represents a price item
1040
+ * example:
1041
+ * {
1042
+ * "$ref": "#/components/examples/order-with-simple-prices"
1043
+ * }
641
1044
  */
642
1045
  export interface PriceItem {
643
1046
  /**
644
1047
  * price item id
645
1048
  */
646
1049
  id?: string;
647
- metadata?: /* A set of key-value pairs. */ MetaData;
1050
+ metadata?: /* A set of key-value pairs used to store meta data information about an entity. */ MetaData;
1051
+ /**
1052
+ * Contains price item configurations, per price component, when the main price item is a [price bundle](/api/pricing#tag/dynamic_price_schema).
1053
+ */
1054
+ item_components?: PriceItemComponent[];
648
1055
  /**
649
1056
  * The unit amount value
650
1057
  */
@@ -654,7 +1061,7 @@ declare namespace Components {
654
1061
  */
655
1062
  amount_subtotal?: number;
656
1063
  /**
657
- * Net unit amount without taxes.
1064
+ * Net unit amount without taxes or discounts.
658
1065
  */
659
1066
  unit_amount_net?: number;
660
1067
  /**
@@ -685,8 +1092,28 @@ declare namespace Components {
685
1092
  * The id of the price.
686
1093
  */
687
1094
  price_id?: string;
688
- _price?: /* The price configuration */ Price;
689
- _product?: /* The product configuration */ Product;
1095
+ /**
1096
+ * The price snapshot data.
1097
+ */
1098
+ _price?: /* The price snapshot data. */ /**
1099
+ * The price entity schema for simple pricing
1100
+ * example:
1101
+ * {
1102
+ * "$ref": "#/components/examples/price"
1103
+ * }
1104
+ */
1105
+ Price;
1106
+ /**
1107
+ * The product snapshot data.
1108
+ */
1109
+ _product?: /* The product snapshot data. */ /**
1110
+ * The product entity
1111
+ * example:
1112
+ * {
1113
+ * "$ref": "#/components/examples/product"
1114
+ * }
1115
+ */
1116
+ Product;
690
1117
  /**
691
1118
  * The taxes applied to the price item.
692
1119
  */
@@ -696,11 +1123,19 @@ declare namespace Components {
696
1123
  */
697
1124
  recurrences?: (/* An amount associated with a specific recurrence. */ RecurrenceAmount)[];
698
1125
  }
1126
+ export type PriceItemComponent = /**
1127
+ * Represents a price item
1128
+ * example:
1129
+ * {
1130
+ * "$ref": "#/components/examples/order-with-simple-prices"
1131
+ * }
1132
+ */
1133
+ PriceItem;
699
1134
  /**
700
1135
  * Represents a valid price item from a client.
701
1136
  */
702
1137
  export interface PriceItemDto {
703
- metadata?: /* A set of key-value pairs. */ MetaData;
1138
+ metadata?: /* A set of key-value pairs used to store meta data information about an entity. */ MetaData;
704
1139
  /**
705
1140
  * The quantity of products being purchased.
706
1141
  */
@@ -725,16 +1160,37 @@ declare namespace Components {
725
1160
  * The taxes applied to the price item.
726
1161
  */
727
1162
  recurrences?: (/* An amount associated with a specific recurrence. */ RecurrenceAmountDto)[];
728
- _price?: /* The price configuration */ Price;
1163
+ _price?: /**
1164
+ * The price entity schema for simple pricing
1165
+ * example:
1166
+ * {
1167
+ * "$ref": "#/components/examples/price"
1168
+ * }
1169
+ */
1170
+ Price;
729
1171
  /**
730
1172
  * The product linked to the price item.
731
1173
  */
732
- _product?: /* The product configuration */ Product;
1174
+ _product?: /**
1175
+ * The product entity
1176
+ * example:
1177
+ * {
1178
+ * "$ref": "#/components/examples/product"
1179
+ * }
1180
+ */
1181
+ Product;
733
1182
  }
734
1183
  /**
735
1184
  * Tracks a set of product prices, quantities, (discounts) and taxes.
736
1185
  */
737
- export type PriceItems = (/* Represents a price item */ PriceItem)[];
1186
+ export type PriceItems = (/**
1187
+ * Represents a price item
1188
+ * example:
1189
+ * {
1190
+ * "$ref": "#/components/examples/order-with-simple-prices"
1191
+ * }
1192
+ */
1193
+ PriceItem)[];
738
1194
  /**
739
1195
  * A valid set of product prices, quantities, (discounts) and taxes from a client.
740
1196
  */
@@ -743,7 +1199,14 @@ declare namespace Components {
743
1199
  * The result from the calculation of a set of price items.
744
1200
  */
745
1201
  export interface PricingDetails {
746
- items?: (/* Represents a price item */ PriceItem)[];
1202
+ items?: (/**
1203
+ * Represents a price item
1204
+ * example:
1205
+ * {
1206
+ * "$ref": "#/components/examples/order-with-simple-prices"
1207
+ * }
1208
+ */
1209
+ PriceItem)[];
747
1210
  /**
748
1211
  * Total of all items before (discounts or) taxes are applied.
749
1212
  */
@@ -755,16 +1218,91 @@ declare namespace Components {
755
1218
  total_details?: /* The total details with tax (and discount) aggregated totals. */ TotalDetails;
756
1219
  }
757
1220
  /**
758
- * The product configuration
1221
+ * The product entity
1222
+ * example:
1223
+ * {
1224
+ * "$ref": "#/components/examples/product"
1225
+ * }
759
1226
  */
760
1227
  export interface Product {
761
1228
  [name: string]: any;
1229
+ /**
1230
+ * The product code
1231
+ */
762
1232
  code?: string;
763
- type?: "Product" | "Service";
1233
+ /**
1234
+ * The type of Product:
1235
+ *
1236
+ * | type | description |
1237
+ * |----| ----|
1238
+ * | `product` | Represents a physical good |
1239
+ * | `service` | Represents a service or virtual product |
1240
+ *
1241
+ */
1242
+ type?: "product" | "service";
1243
+ /**
1244
+ * The product main name
1245
+ */
764
1246
  name?: string;
1247
+ feature?: {
1248
+ /**
1249
+ * An arbitrary set of tags attached to a feature
1250
+ */
1251
+ _tags?: string[];
1252
+ feature?: string;
1253
+ }[];
1254
+ /**
1255
+ * Stores references to products that can be cross sold with the current product.
1256
+ */
1257
+ cross_sellable_products?: {
1258
+ $relation?: EntityRelation[];
1259
+ };
1260
+ /**
1261
+ * Stores references to a set of file images of the product
1262
+ */
1263
+ product_images?: {
1264
+ $relation?: EntityRelation[];
1265
+ };
1266
+ /**
1267
+ * Stores references to a set of files downloadable from the product.
1268
+ * e.g: tech specifications, quality control sheets, privacy policy agreements
1269
+ *
1270
+ */
1271
+ product_downloads?: {
1272
+ $relation?: EntityRelation[];
1273
+ };
1274
+ /**
1275
+ * A set of [prices](/api/pricing#tag/simple_price_schema) or [price bundles](/api/pricing#tag/dynamic_price_schema) for the current product.
1276
+ */
1277
+ price_options?: {
1278
+ $relation?: EntityRelation[];
1279
+ };
1280
+ /**
1281
+ * Stores references to the availability files that define where this product is available.
1282
+ * These files are used when interacting with products via epilot Journeys, thought the AvailabilityCheck block.
1283
+ *
1284
+ */
1285
+ _availability_files?: File[];
1286
+ /**
1287
+ * The product id
1288
+ */
765
1289
  _id?: string;
1290
+ /**
1291
+ * The autogenerated product title
1292
+ */
766
1293
  _title?: string;
767
- _availability_files?: File[];
1294
+ /**
1295
+ * The organization id the product belongs to
1296
+ */
1297
+ _org_id?: string;
1298
+ /**
1299
+ * The product creation date
1300
+ */
1301
+ _created_at?: string;
1302
+ /**
1303
+ * The product last update date
1304
+ */
1305
+ _updated_at?: string;
768
1306
  }
769
1307
  /**
770
1308
  * An amount associated with a specific recurrence.
@@ -939,9 +1477,23 @@ declare namespace Paths {
939
1477
  namespace Parameters {
940
1478
  export type XIvyOrgID = string;
941
1479
  }
942
- export type RequestBody = /* The opportunity entity */ Components.Schemas.Opportunity;
1480
+ export type RequestBody = /**
1481
+ * The opportunity entity
1482
+ * example:
1483
+ * {
1484
+ * "$ref": "#/components/examples/opportunity"
1485
+ * }
1486
+ */
1487
+ Components.Schemas.Opportunity;
943
1488
  namespace Responses {
944
- export type $201 = /* The opportunity entity */ Components.Schemas.Opportunity;
1489
+ export type $201 = /**
1490
+ * The opportunity entity
1491
+ * example:
1492
+ * {
1493
+ * "$ref": "#/components/examples/opportunity"
1494
+ * }
1495
+ */
1496
+ Components.Schemas.Opportunity;
945
1497
  export type $400 = Components.Schemas.Error;
946
1498
  }
947
1499
  }
@@ -999,7 +1551,14 @@ declare namespace Paths {
999
1551
  namespace CreateOrder {
1000
1552
  export type RequestBody = /* Order Entity Payload */ Components.Schemas.OrderPayload;
1001
1553
  namespace Responses {
1002
- export type $201 = /* The order entity */ Components.Schemas.Order;
1554
+ export type $201 = /**
1555
+ * The order entity
1556
+ * example:
1557
+ * {
1558
+ * "$ref": "#/components/examples/order-with-simple-prices"
1559
+ * }
1560
+ */
1561
+ Components.Schemas.Order;
1003
1562
  export type $400 = Components.Schemas.Error;
1004
1563
  }
1005
1564
  }
@@ -1012,7 +1571,14 @@ declare namespace Paths {
1012
1571
  }
1013
1572
  export type RequestBody = /* Order Entity Payload */ Components.Schemas.OrderPayload;
1014
1573
  namespace Responses {
1015
- export type $200 = /* The order entity */ Components.Schemas.Order;
1574
+ export type $200 = /**
1575
+ * The order entity
1576
+ * example:
1577
+ * {
1578
+ * "$ref": "#/components/examples/order-with-simple-prices"
1579
+ * }
1580
+ */
1581
+ Components.Schemas.Order;
1016
1582
  export type $400 = Components.Schemas.Error;
1017
1583
  }
1018
1584
  }
@@ -1083,7 +1649,9 @@ export interface OperationMethods {
1083
1649
  /**
1084
1650
  * $createOpportunity - createOpportunity
1085
1651
  *
1086
- * This API is Deprecated. Please use the Entity API or Submission API to create opportunities. Creates a new opportunity. During the creation of an opportunity, an unique customer-readable `opportunity_number` will be generated.
1652
+ * This API is Deprecated. Please use the Entity API or Submission API to create opportunities.
1653
+ *
1654
+ * Enables the creation of a new opportunity. During the creation of an opportunity, an unique customer-readable `opportunity_number` will be generated.
1087
1655
  * The `opportunity_number` can be used to universally identify an opportunity within epilot platform.
1088
1656
  *
1089
1657
  */
@@ -1170,7 +1738,9 @@ export interface PathsDictionary {
1170
1738
  /**
1171
1739
  * $createOpportunity - createOpportunity
1172
1740
  *
1173
- * This API is Deprecated. Please use the Entity API or Submission API to create opportunities. Creates a new opportunity. During the creation of an opportunity, an unique customer-readable `opportunity_number` will be generated.
1741
+ * This API is Deprecated. Please use the Entity API or Submission API to create opportunities.
1742
+ *
1743
+ * Enables the creation of a new opportunity. During the creation of an opportunity, an unique customer-readable `opportunity_number` will be generated.
1174
1744
  * The `opportunity_number` can be used to universally identify an opportunity within epilot platform.
1175
1745
  *
1176
1746
  */