@epilot/pricing-client 1.13.1 → 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
@@ -42,6 +42,26 @@ declare namespace Components {
42
42
  * An additional description for the address
43
43
  */
44
44
  additional_info?: string;
45
+ /**
46
+ * the company name, usually used as extra delivery instructions
47
+ */
48
+ company_name?: string;
49
+ /**
50
+ * the first name of the recipient, usually used as extra delivery instructions
51
+ */
52
+ first_name?: string;
53
+ /**
54
+ * the last name of the recipient, usually used as extra delivery instructions
55
+ */
56
+ last_name?: string;
57
+ /**
58
+ * the salutation of the recipient, usually used as extra delivery instructions
59
+ */
60
+ salutation?: string;
61
+ /**
62
+ * the title of the recipient, usually used as extra delivery instructions
63
+ */
64
+ title?: string;
45
65
  }
46
66
  /**
47
67
  * Availability check request payload
@@ -161,7 +181,7 @@ declare namespace Components {
161
181
  customer?: Customer;
162
182
  billing_address?: Address;
163
183
  delivery_address?: Address;
164
- 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;
165
185
  line_items?: /* Tracks a set of product prices, quantities, (discounts) and taxes. */ PriceItems;
166
186
  /**
167
187
  * Total of all items before (discounts or) taxes are applied.
@@ -179,7 +199,7 @@ declare namespace Components {
179
199
  * A valid cart payload from a client.
180
200
  */
181
201
  export interface CartDto {
182
- 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;
183
203
  customer?: Customer;
184
204
  billing_address?: Address;
185
205
  delivery_address?: Address;
@@ -195,7 +215,7 @@ declare namespace Components {
195
215
  * ce99875f-fba9-4fe2-a8f9-afaf52059051
196
216
  */
197
217
  source_id?: string;
198
- source?: /* Order Source */ OrderSource;
218
+ source?: /* The order generation source */ OrderSource;
199
219
  additional_addresses?: Address[];
200
220
  payment_method?: /**
201
221
  * A PaymentMethod represent your customer's payment instruments.
@@ -207,7 +227,18 @@ declare namespace Components {
207
227
  * An array of file IDs, already upload into the File API, that are related with this cart
208
228
  */
209
229
  files?: string[];
210
- 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;
211
242
  tags?: string[];
212
243
  journey_data?: {
213
244
  [name: string]: any;
@@ -282,7 +313,21 @@ declare namespace Components {
282
313
  * The number os results returned.
283
314
  */
284
315
  hits?: number;
285
- 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)[];
286
331
  }
287
332
  /**
288
333
  * The cart checkout request payload
@@ -295,7 +340,14 @@ declare namespace Components {
295
340
  * The cart checkout result
296
341
  */
297
342
  export interface CheckoutCartResult {
298
- 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;
299
351
  }
300
352
  /**
301
353
  * The checkout mode for the cart checkout.
@@ -351,7 +403,7 @@ declare namespace Components {
351
403
  $relation?: EntityRelation;
352
404
  }
353
405
  /**
354
- * A set of key-value pairs.
406
+ * A set of key-value pairs used to store meta data information about an entity.
355
407
  */
356
408
  export type MetaData = ({
357
409
  /**
@@ -365,6 +417,10 @@ declare namespace Components {
365
417
  })[];
366
418
  /**
367
419
  * The opportunity entity
420
+ * example:
421
+ * {
422
+ * "$ref": "#/components/examples/opportunity"
423
+ * }
368
424
  */
369
425
  export interface Opportunity {
370
426
  [name: string]: any;
@@ -372,41 +428,157 @@ declare namespace Components {
372
428
  * The opportunity id number for the customer (autogenerated if left blank)
373
429
  */
374
430
  opportunity_number?: string;
431
+ /**
432
+ * The opportunity title for the opportunity
433
+ */
434
+ opportunity_title?: string;
375
435
  /**
376
436
  * A description to frame this opportunity within its sales process
377
437
  */
378
438
  description?: string;
379
439
  /**
380
- * 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
381
506
  */
382
- status?: "lead" | "qualification" | "validation" | "offering" | "supply" | "approval" | "operations" | "complete";
383
- items?: /* The order entity */ Order[] | {
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
542
+ */
543
+ items?: {
384
544
  $relation?: /* An order relation reference */ OrderRelation[];
385
545
  };
386
546
  /**
387
547
  * Organization Id the order belongs to
388
548
  */
389
549
  _org_id?: string;
550
+ /**
551
+ * The opportunity id
552
+ */
390
553
  _id?: string;
554
+ /**
555
+ * The opportunity creation date
556
+ */
391
557
  _created_at?: string;
558
+ /**
559
+ * The opportunity last update date
560
+ */
392
561
  _updated_at?: string;
393
562
  /**
394
- * type of source, e.g. journey or manual
563
+ * Type of source, e.g. journey or manual
395
564
  * example:
396
565
  * journey
397
566
  */
398
567
  source_type?: string;
399
568
  /**
400
- * identifier for source e.g. journey ID
569
+ * Identifier for source e.g. journey ID
401
570
  * example:
402
571
  * ce99875f-fba9-4fe2-a8f9-afaf52059051
403
572
  */
404
573
  source_id?: string;
405
- source?: /* Order Source */ OpportunitySource;
574
+ source?: /* The opportunity generation source */ OpportunitySource;
575
+ /**
576
+ * An arbitrary set of tags attached to the opportunity
577
+ */
406
578
  _tags?: string[];
407
579
  }
408
580
  /**
409
- * Order Source
581
+ * The opportunity generation source
410
582
  */
411
583
  export interface OpportunitySource {
412
584
  /**
@@ -424,40 +596,85 @@ declare namespace Components {
424
596
  }
425
597
  /**
426
598
  * The order entity
599
+ * example:
600
+ * {
601
+ * "$ref": "#/components/examples/order-with-simple-prices"
602
+ * }
427
603
  */
428
604
  export interface Order {
429
605
  [name: string]: any;
430
606
  /**
431
- * The order id number for the customer
607
+ * The order number (customer facing)
432
608
  */
433
609
  order_number?: string;
434
610
  /**
435
- * The cart id that originated or is associated with the order
611
+ * The cart id that originated or is associated with the this order
436
612
  */
437
613
  cart_id?: string;
438
- 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;
439
626
  /**
440
- * type of source, e.g. journey or manual
627
+ * Type of source, e.g. journey or manual
441
628
  * example:
442
629
  * journey
443
630
  */
444
631
  source_type?: string;
445
632
  /**
446
- * identifier for source e.g. journey ID
633
+ * Identifier for source e.g. journey ID
447
634
  * example:
448
635
  * ce99875f-fba9-4fe2-a8f9-afaf52059051
449
636
  */
450
637
  source_id?: string;
451
- source?: /* Order Source */ OrderSource;
452
- 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
+ */
453
649
  billing_first_name?: string;
650
+ /**
651
+ * The billing contact last name
652
+ */
454
653
  billing_last_name?: string;
654
+ /**
655
+ * The billing account name
656
+ */
455
657
  billing_company_name?: string;
658
+ /**
659
+ * The billing account VAT
660
+ */
456
661
  billing_vat?: string;
662
+ /**
663
+ * The billing email
664
+ */
457
665
  billing_email?: string;
666
+ /**
667
+ * The billing phone
668
+ */
458
669
  billing_phone?: string;
670
+ /**
671
+ * The billing address
672
+ */
459
673
  billing_address?: Address[];
460
- currency?: /**
674
+ /**
675
+ * The order main currency
676
+ */
677
+ currency?: /* The order main currency */ /**
461
678
  * Three-letter ISO currency code, in lowercase. Must be a supported currency.
462
679
  * ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
463
680
  *
@@ -465,16 +682,18 @@ declare namespace Components {
465
682
  * EUR
466
683
  */
467
684
  Currency;
685
+ /**
686
+ * The delivery address
687
+ */
468
688
  delivery_address?: Address[];
689
+ /**
690
+ * The payment method details for the order
691
+ */
469
692
  payment_method?: /**
470
693
  * A PaymentMethod represent your customer's payment instruments.
471
694
  *
472
695
  */
473
696
  PaymentMethod[];
474
- /**
475
- * The id of an existing contact.
476
- */
477
- contact?: string;
478
697
  line_items?: /* Tracks a set of product prices, quantities, (discounts) and taxes. */ PriceItems;
479
698
  /**
480
699
  * Total of all items before (discounts or) taxes are applied.
@@ -489,16 +708,39 @@ declare namespace Components {
489
708
  * Organization Id the order belongs to
490
709
  */
491
710
  _org_id?: string;
711
+ /**
712
+ * The order id
713
+ */
492
714
  _id?: string;
715
+ /**
716
+ * The order creation date
717
+ */
493
718
  _created_at?: string;
719
+ /**
720
+ * The order last update date
721
+ */
494
722
  _updated_at?: string;
723
+ /**
724
+ * An arbitrary set of tags attached to the order
725
+ */
495
726
  _tags?: string[];
496
727
  }
497
728
  /**
498
729
  * Order Entity Payload
499
730
  */
500
731
  export interface OrderPayload {
501
- 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;
502
744
  line_items?: /* Tracks a set of product prices, quantities, (discounts) and taxes. */ PriceItems;
503
745
  /**
504
746
  * type of source, e.g. journey or manual
@@ -544,7 +786,7 @@ declare namespace Components {
544
786
  _tags?: string[];
545
787
  }
546
788
  /**
547
- * Order Source
789
+ * The order generation source
548
790
  */
549
791
  export interface OrderSource {
550
792
  /**
@@ -561,7 +803,15 @@ declare namespace Components {
561
803
  title?: string;
562
804
  }
563
805
  /**
564
- * 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
+ *
565
815
  */
566
816
  export type OrderStatus = "draft" | "quote" | "placed" | "cancelled" | "completed";
567
817
  /**
@@ -581,21 +831,78 @@ declare namespace Components {
581
831
  };
582
832
  }
583
833
  /**
584
- * The price configuration
834
+ * The price entity schema for simple pricing
835
+ * example:
836
+ * {
837
+ * "$ref": "#/components/examples/price"
838
+ * }
585
839
  */
586
840
  export interface Price {
587
841
  [name: string]: any;
842
+ /**
843
+ * Whether the price can be used for new purchases.
844
+ */
588
845
  active?: boolean;
589
- 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
+ */
590
858
  description?: string;
591
- 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
+ */
592
881
  tax_behavior?: "inclusive" | "exclusive";
593
- 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
+ */
594
889
  type?: "one_time" | "recurring";
595
- 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
+ */
596
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
+ */
597
901
  unit_amount_decimal?: string;
598
- unit_amount_currency?: /**
902
+ /**
903
+ * Three-letter ISO currency code, in lowercase.
904
+ */
905
+ unit_amount_currency?: /* Three-letter ISO currency code, in lowercase. */ /**
599
906
  * Three-letter ISO currency code, in lowercase. Must be a supported currency.
600
907
  * ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
601
908
  *
@@ -603,28 +910,148 @@ declare namespace Components {
603
910
  * EUR
604
911
  */
605
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
+ */
606
920
  billing_duration_amount?: number;
921
+ /**
922
+ * The billing period duration unit
923
+ */
607
924
  billing_duration_unit?: "weeks" | "months" | "years";
925
+ /**
926
+ * The notice period duration
927
+ */
608
928
  notice_time_amount?: number;
929
+ /**
930
+ * The notice period duration unit
931
+ */
609
932
  notice_time_unit?: "weeks" | "months" | "years";
933
+ /**
934
+ * The termination period duration
935
+ */
610
936
  termination_time_amount?: number;
937
+ /**
938
+ * The termination period duration unit
939
+ */
611
940
  termination_time_unit?: "weeks" | "months" | "years";
941
+ /**
942
+ * The renewal period duration
943
+ */
612
944
  renewal_duration_amount?: number;
945
+ /**
946
+ * The renewal period duration unit
947
+ */
613
948
  renewal_duration_unit?: "weeks" | "months" | "years";
949
+ /**
950
+ * The price creation date
951
+ */
614
952
  _created_at?: string;
953
+ /**
954
+ * The price id
955
+ */
615
956
  _id?: string;
957
+ /**
958
+ * The price autogenerated title
959
+ */
616
960
  _title?: string;
961
+ /**
962
+ * The price last update date
963
+ */
617
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
+ */
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[];
618
1037
  }
619
1038
  /**
620
1039
  * Represents a price item
1040
+ * example:
1041
+ * {
1042
+ * "$ref": "#/components/examples/order-with-simple-prices"
1043
+ * }
621
1044
  */
622
1045
  export interface PriceItem {
623
1046
  /**
624
1047
  * price item id
625
1048
  */
626
1049
  id?: string;
627
- 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[];
628
1055
  /**
629
1056
  * The unit amount value
630
1057
  */
@@ -634,7 +1061,7 @@ declare namespace Components {
634
1061
  */
635
1062
  amount_subtotal?: number;
636
1063
  /**
637
- * Net unit amount without taxes.
1064
+ * Net unit amount without taxes or discounts.
638
1065
  */
639
1066
  unit_amount_net?: number;
640
1067
  /**
@@ -665,8 +1092,28 @@ declare namespace Components {
665
1092
  * The id of the price.
666
1093
  */
667
1094
  price_id?: string;
668
- _price?: /* The price configuration */ Price;
669
- _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;
670
1117
  /**
671
1118
  * The taxes applied to the price item.
672
1119
  */
@@ -676,11 +1123,19 @@ declare namespace Components {
676
1123
  */
677
1124
  recurrences?: (/* An amount associated with a specific recurrence. */ RecurrenceAmount)[];
678
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;
679
1134
  /**
680
1135
  * Represents a valid price item from a client.
681
1136
  */
682
1137
  export interface PriceItemDto {
683
- 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;
684
1139
  /**
685
1140
  * The quantity of products being purchased.
686
1141
  */
@@ -705,16 +1160,37 @@ declare namespace Components {
705
1160
  * The taxes applied to the price item.
706
1161
  */
707
1162
  recurrences?: (/* An amount associated with a specific recurrence. */ RecurrenceAmountDto)[];
708
- _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;
709
1171
  /**
710
1172
  * The product linked to the price item.
711
1173
  */
712
- _product?: /* The product configuration */ Product;
1174
+ _product?: /**
1175
+ * The product entity
1176
+ * example:
1177
+ * {
1178
+ * "$ref": "#/components/examples/product"
1179
+ * }
1180
+ */
1181
+ Product;
713
1182
  }
714
1183
  /**
715
1184
  * Tracks a set of product prices, quantities, (discounts) and taxes.
716
1185
  */
717
- 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)[];
718
1194
  /**
719
1195
  * A valid set of product prices, quantities, (discounts) and taxes from a client.
720
1196
  */
@@ -723,7 +1199,14 @@ declare namespace Components {
723
1199
  * The result from the calculation of a set of price items.
724
1200
  */
725
1201
  export interface PricingDetails {
726
- 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)[];
727
1210
  /**
728
1211
  * Total of all items before (discounts or) taxes are applied.
729
1212
  */
@@ -735,16 +1218,91 @@ declare namespace Components {
735
1218
  total_details?: /* The total details with tax (and discount) aggregated totals. */ TotalDetails;
736
1219
  }
737
1220
  /**
738
- * The product configuration
1221
+ * The product entity
1222
+ * example:
1223
+ * {
1224
+ * "$ref": "#/components/examples/product"
1225
+ * }
739
1226
  */
740
1227
  export interface Product {
741
1228
  [name: string]: any;
1229
+ /**
1230
+ * The product code
1231
+ */
742
1232
  code?: string;
743
- 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
+ */
744
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
+ */
745
1289
  _id?: string;
1290
+ /**
1291
+ * The autogenerated product title
1292
+ */
746
1293
  _title?: string;
747
- _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;
748
1306
  }
749
1307
  /**
750
1308
  * An amount associated with a specific recurrence.
@@ -919,9 +1477,23 @@ declare namespace Paths {
919
1477
  namespace Parameters {
920
1478
  export type XIvyOrgID = string;
921
1479
  }
922
- 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;
923
1488
  namespace Responses {
924
- 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;
925
1497
  export type $400 = Components.Schemas.Error;
926
1498
  }
927
1499
  }
@@ -979,7 +1551,14 @@ declare namespace Paths {
979
1551
  namespace CreateOrder {
980
1552
  export type RequestBody = /* Order Entity Payload */ Components.Schemas.OrderPayload;
981
1553
  namespace Responses {
982
- 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;
983
1562
  export type $400 = Components.Schemas.Error;
984
1563
  }
985
1564
  }
@@ -992,7 +1571,14 @@ declare namespace Paths {
992
1571
  }
993
1572
  export type RequestBody = /* Order Entity Payload */ Components.Schemas.OrderPayload;
994
1573
  namespace Responses {
995
- 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;
996
1582
  export type $400 = Components.Schemas.Error;
997
1583
  }
998
1584
  }
@@ -1063,7 +1649,9 @@ export interface OperationMethods {
1063
1649
  /**
1064
1650
  * $createOpportunity - createOpportunity
1065
1651
  *
1066
- * 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.
1067
1655
  * The `opportunity_number` can be used to universally identify an opportunity within epilot platform.
1068
1656
  *
1069
1657
  */
@@ -1150,7 +1738,9 @@ export interface PathsDictionary {
1150
1738
  /**
1151
1739
  * $createOpportunity - createOpportunity
1152
1740
  *
1153
- * 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.
1154
1744
  * The `opportunity_number` can be used to universally identify an opportunity within epilot platform.
1155
1745
  *
1156
1746
  */