@epilot/pricing-client 1.12.3 → 1.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/openapi.d.ts CHANGED
@@ -11,13 +11,6 @@ declare namespace Components {
11
11
  namespace Schemas {
12
12
  export interface Address {
13
13
  [name: string]: any;
14
- /**
15
- * example:
16
- * [
17
- * "billing"
18
- * ]
19
- */
20
- _tags?: string[];
21
14
  /**
22
15
  * The first line of the address. Typically the street address or PO Box number.
23
16
  */
@@ -43,101 +36,7 @@ declare namespace Components {
43
36
  */
44
37
  additional_info?: string;
45
38
  }
46
- /**
47
- * Availability check request payload
48
- */
49
- export interface AvailabilityCheckParams {
50
- /**
51
- * Products to check availability
52
- */
53
- products: string[];
54
- filters: /* Availability filters dimensions */ AvailabilityFilters;
55
- }
56
- export interface AvailabilityDate {
57
- /**
58
- * The availability interval start date
59
- * example:
60
- * 2017-07-21
61
- */
62
- available_start_date?: string; // date
63
- /**
64
- * The availability interval end date
65
- * example:
66
- * 2017-07-21
67
- */
68
- available_end_date?: string; // date
69
- }
70
- /**
71
- * Availability filters dimensions
72
- */
73
- export interface AvailabilityFilters {
74
- location: AvailabilityLocation;
75
- /**
76
- * A value to be matched against the availability window (start & end date)
77
- * example:
78
- * 2017-07-21
79
- */
80
- available_date?: string; // date
81
- }
82
- export interface AvailabilityLocation {
83
- /**
84
- * The first line of the address. Typically the street address or PO Box number.
85
- */
86
- street?: string;
87
- /**
88
- * The second line of the address. Typically the number of the apartment, suite, or unit.
89
- */
90
- street_number?: string;
91
- /**
92
- * The postal code for the address.
93
- */
94
- postal_code?: string;
95
- /**
96
- * The name of the city, district, village, or town.
97
- */
98
- city?: string;
99
- /**
100
- * The name of the country.
101
- */
102
- country?: string;
103
- }
104
- /**
105
- * The availability check result payload
106
- * example:
107
- * {
108
- * "available_products": [],
109
- * "check_results": [
110
- * {
111
- * "product_id": "my-product-id-123-1",
112
- * "matching_hits": 0
113
- * },
114
- * {
115
- * "product_id": "my-product-id-123-2",
116
- * "matching_hits": 0
117
- * }
118
- * ]
119
- * }
120
- */
121
- export interface AvailabilityResult {
122
- available_products: string[];
123
- /**
124
- * The check result details
125
- */
126
- check_results?: {
127
- product_id: string;
128
- /**
129
- * The number of rules matched
130
- */
131
- matching_hits?: number;
132
- /**
133
- * A set of matching errors when checking availability
134
- */
135
- matching_error?: {
136
- [name: string]: any;
137
- };
138
- }[];
139
- }
140
- export type BillingPeriod = "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly" | "one_time";
39
+ export type BillingPeriod = "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly";
141
40
  /**
142
41
  * Supports shopping for products and services until ready for checkout.
143
42
  */
@@ -183,20 +82,6 @@ declare namespace Components {
183
82
  customer?: Customer;
184
83
  billing_address?: Address;
185
84
  delivery_address?: Address;
186
- /**
187
- * type of source, e.g. journey or manual
188
- * example:
189
- * journey
190
- */
191
- source_type?: string;
192
- /**
193
- * identifier for source e.g. journey ID
194
- * example:
195
- * ce99875f-fba9-4fe2-a8f9-afaf52059051
196
- */
197
- source_id?: string;
198
- source?: /* Order Source */ OrderSource;
199
- additional_addresses?: Address[];
200
85
  payment_method?: /**
201
86
  * A PaymentMethod represent your customer's payment instruments.
202
87
  *
@@ -207,14 +92,6 @@ declare namespace Components {
207
92
  * An array of file IDs, already upload into the File API, that are related with this cart
208
93
  */
209
94
  files?: string[];
210
- status?: /* The order status */ OrderStatus;
211
- tags?: string[];
212
- journey_data?: {
213
- [name: string]: any;
214
- };
215
- consents?: {
216
- [name: string]: any;
217
- };
218
95
  }
219
96
  /**
220
97
  * A catalog search payload
@@ -223,25 +100,14 @@ declare namespace Components {
223
100
  * "q": "_id:1233432 OR _id:123432454 OR _id:23445433",
224
101
  * "sort": "description ASC",
225
102
  * "from": 0,
226
- * "size": 200,
227
- * "availability": {
228
- * "location": {
229
- * "postal_code": "57008,",
230
- * "city": "Cologne,",
231
- * "street": "Media Park,",
232
- * "street_number": "8a"
233
- * },
234
- * "available_date": {
235
- * "value": "2022-05-01"
236
- * }
237
- * }
103
+ * "size": 200
238
104
  * }
239
105
  */
240
106
  export interface CatalogSearch {
241
107
  /**
242
108
  * The query to perform using lucene query syntax.
243
109
  */
244
- q: string;
110
+ q?: string;
245
111
  /**
246
112
  * The sort expression to sort the results.
247
113
  */
@@ -255,10 +121,9 @@ declare namespace Components {
255
121
  */
256
122
  size?: number;
257
123
  /**
258
- * When true, enables entity hydration to resolve nested $relation references in-place.
124
+ * A list of additional fields to expand on the search results, such as non-indexed fields.
259
125
  */
260
- hydrate?: boolean;
261
- availability?: /* Availability filters dimensions */ AvailabilityFilters;
126
+ expand?: string[];
262
127
  }
263
128
  /**
264
129
  * The query result payload
@@ -305,8 +170,6 @@ declare namespace Components {
305
170
  * Three-letter ISO currency code, in lowercase. Must be a supported currency.
306
171
  * ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
307
172
  *
308
- * example:
309
- * EUR
310
173
  */
311
174
  export type Currency = string;
312
175
  export interface Customer {
@@ -320,36 +183,12 @@ declare namespace Components {
320
183
  email?: string;
321
184
  phone?: string;
322
185
  }
323
- export interface EntityRelation {
324
- [name: string]: any;
325
- entity_id?: string;
326
- _tags?: string[];
327
- }
328
186
  export interface Error {
329
187
  /**
330
188
  * Error message
331
189
  */
332
190
  message: string;
333
191
  }
334
- export interface File {
335
- [name: string]: any;
336
- _id: string;
337
- filename: string;
338
- mime_type: string;
339
- versions: {
340
- [name: string]: any;
341
- s3ref: {
342
- bucket: string;
343
- key: string;
344
- };
345
- }[];
346
- _schema: string;
347
- _org: string;
348
- _created_at: string; // date-time
349
- _updated_at: string; // date-time
350
- _title?: string;
351
- $relation?: EntityRelation;
352
- }
353
192
  /**
354
193
  * A set of key-value pairs.
355
194
  */
@@ -390,38 +229,8 @@ declare namespace Components {
390
229
  _id?: string;
391
230
  _created_at?: string;
392
231
  _updated_at?: string;
393
- /**
394
- * type of source, e.g. journey or manual
395
- * example:
396
- * journey
397
- */
398
- source_type?: string;
399
- /**
400
- * identifier for source e.g. journey ID
401
- * example:
402
- * ce99875f-fba9-4fe2-a8f9-afaf52059051
403
- */
404
- source_id?: string;
405
- source?: /* Order Source */ OpportunitySource;
406
232
  _tags?: string[];
407
233
  }
408
- /**
409
- * Order Source
410
- */
411
- export interface OpportunitySource {
412
- /**
413
- * Link path for the source
414
- * example:
415
- * /app/v2/journey-builder/editor/db7f6940-994b-11ec-a46d-9f1824ff2939
416
- */
417
- http?: string;
418
- /**
419
- * Title for the source
420
- * example:
421
- * Journey: PH Journey
422
- */
423
- title?: string;
424
- }
425
234
  /**
426
235
  * The order entity
427
236
  */
@@ -435,20 +244,10 @@ declare namespace Components {
435
244
  * The cart id that originated or is associated with the order
436
245
  */
437
246
  cart_id?: string;
438
- status?: /* The order status */ OrderStatus;
439
247
  /**
440
- * type of source, e.g. journey or manual
441
- * example:
442
- * journey
248
+ * The order status
443
249
  */
444
- source_type?: string;
445
- /**
446
- * identifier for source e.g. journey ID
447
- * example:
448
- * ce99875f-fba9-4fe2-a8f9-afaf52059051
449
- */
450
- source_id?: string;
451
- source?: /* Order Source */ OrderSource;
250
+ status?: "draft" | "quote" | "open" | "paid" | "shipped" | "delivered" | "complete";
452
251
  metadata?: /* A set of key-value pairs. */ MetaData;
453
252
  billing_first_name?: string;
454
253
  billing_last_name?: string;
@@ -461,8 +260,6 @@ declare namespace Components {
461
260
  * Three-letter ISO currency code, in lowercase. Must be a supported currency.
462
261
  * ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
463
262
  *
464
- * example:
465
- * EUR
466
263
  */
467
264
  Currency;
468
265
  delivery_address?: Address[];
@@ -494,45 +291,6 @@ declare namespace Components {
494
291
  _updated_at?: string;
495
292
  _tags?: string[];
496
293
  }
497
- /**
498
- * Order Entity Payload
499
- */
500
- export interface OrderPayload {
501
- status?: /* The order status */ OrderStatus;
502
- line_items?: /* Tracks a set of product prices, quantities, (discounts) and taxes. */ PriceItems;
503
- /**
504
- * type of source, e.g. journey or manual
505
- * example:
506
- * journey
507
- */
508
- source_type?: string;
509
- currency?: /**
510
- * Three-letter ISO currency code, in lowercase. Must be a supported currency.
511
- * ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
512
- *
513
- * example:
514
- * EUR
515
- */
516
- Currency;
517
- /**
518
- * The id of an existing contact.
519
- */
520
- contact?: string;
521
- billing_first_name?: string;
522
- billing_last_name?: string;
523
- billing_company_name?: string;
524
- billing_vat?: string;
525
- billing_email?: string;
526
- billing_phone?: string;
527
- billing_address?: Address[];
528
- delivery_address?: Address[];
529
- payment_method?: /**
530
- * A PaymentMethod represent your customer's payment instruments.
531
- *
532
- */
533
- PaymentMethod[];
534
- _tags?: string[];
535
- }
536
294
  /**
537
295
  * An order relation reference
538
296
  */
@@ -543,27 +301,6 @@ declare namespace Components {
543
301
  entity_id?: string;
544
302
  _tags?: string[];
545
303
  }
546
- /**
547
- * Order Source
548
- */
549
- export interface OrderSource {
550
- /**
551
- * Link path for the source
552
- * example:
553
- * /app/v2/journey-builder/editor/db7f6940-994b-11ec-a46d-9f1824ff2939
554
- */
555
- http?: string;
556
- /**
557
- * Title for the source
558
- * example:
559
- * Journey: PH Journey
560
- */
561
- title?: string;
562
- }
563
- /**
564
- * The order status
565
- */
566
- export type OrderStatus = "draft" | "quote" | "placed" | "cancelled" | "completed";
567
304
  /**
568
305
  * A PaymentMethod represent your customer's payment instruments.
569
306
  *
@@ -588,7 +325,7 @@ declare namespace Components {
588
325
  active?: boolean;
589
326
  billing_scheme?: "Per Unit";
590
327
  description?: string;
591
- sales_tax?: SalesTax;
328
+ sales_tax?: SalexTax;
592
329
  tax_behavior?: "inclusive" | "exclusive";
593
330
  tiers_mode?: "Standard";
594
331
  type?: "one_time" | "recurring";
@@ -599,8 +336,6 @@ declare namespace Components {
599
336
  * Three-letter ISO currency code, in lowercase. Must be a supported currency.
600
337
  * ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
601
338
  *
602
- * example:
603
- * EUR
604
339
  */
605
340
  Currency;
606
341
  billing_duration_amount?: number;
@@ -633,10 +368,6 @@ declare namespace Components {
633
368
  * Total before any (discounts or) taxes are applied.
634
369
  */
635
370
  amount_subtotal?: number;
636
- /**
637
- * Net unit amount without taxes.
638
- */
639
- unit_amount_net?: number;
640
371
  /**
641
372
  * Total after (discounts and) taxes.
642
373
  */
@@ -645,8 +376,6 @@ declare namespace Components {
645
376
  * Three-letter ISO currency code, in lowercase. Must be a supported currency.
646
377
  * ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
647
378
  *
648
- * example:
649
- * EUR
650
379
  */
651
380
  Currency;
652
381
  /**
@@ -706,10 +435,6 @@ declare namespace Components {
706
435
  */
707
436
  recurrences?: (/* An amount associated with a specific recurrence. */ RecurrenceAmountDto)[];
708
437
  _price?: /* The price configuration */ Price;
709
- /**
710
- * The product linked to the price item.
711
- */
712
- _product?: /* The product configuration */ Product;
713
438
  }
714
439
  /**
715
440
  * Tracks a set of product prices, quantities, (discounts) and taxes.
@@ -744,7 +469,6 @@ declare namespace Components {
744
469
  name?: string;
745
470
  _id?: string;
746
471
  _title?: string;
747
- _availability_files?: File[];
748
472
  }
749
473
  /**
750
474
  * An amount associated with a specific recurrence.
@@ -796,7 +520,7 @@ declare namespace Components {
796
520
  */
797
521
  amount_tax?: number;
798
522
  }
799
- export type SalesTax = "nontaxable" | "reduced" | "standard";
523
+ export type SalexTax = "nontaxable" | "reduced" | "standard";
800
524
  /**
801
525
  * the tax configuration
802
526
  */
@@ -869,60 +593,56 @@ declare namespace Components {
869
593
  }
870
594
  }
871
595
  declare namespace Paths {
872
- namespace $AvailabilityCheck {
596
+ namespace $CheckoutCart {
873
597
  export interface HeaderParameters {
874
598
  "X-Ivy-Org-ID": Parameters.XIvyOrgID;
875
599
  }
876
600
  namespace Parameters {
877
601
  export type XIvyOrgID = string;
878
602
  }
879
- export type RequestBody = /* Availability check request payload */ Components.Schemas.AvailabilityCheckParams;
603
+ export type RequestBody = /* The cart checkout request payload */ Components.Schemas.CheckoutCart;
880
604
  namespace Responses {
881
- export type $200 = /**
882
- * The availability check result payload
883
- * example:
884
- * {
885
- * "available_products": [],
886
- * "check_results": [
887
- * {
888
- * "product_id": "my-product-id-123-1",
889
- * "matching_hits": 0
890
- * },
891
- * {
892
- * "product_id": "my-product-id-123-2",
893
- * "matching_hits": 0
894
- * }
895
- * ]
896
- * }
897
- */
898
- Components.Schemas.AvailabilityResult;
605
+ export type $200 = /* The cart checkout result */ Components.Schemas.CheckoutCartResult;
899
606
  export type $400 = Components.Schemas.Error;
900
607
  }
901
608
  }
902
- namespace $CheckoutCart {
609
+ namespace $CreateOpportunity {
903
610
  export interface HeaderParameters {
904
611
  "X-Ivy-Org-ID": Parameters.XIvyOrgID;
905
612
  }
906
613
  namespace Parameters {
907
614
  export type XIvyOrgID = string;
908
615
  }
909
- export type RequestBody = /* The cart checkout request payload */ Components.Schemas.CheckoutCart;
616
+ export type RequestBody = /* The opportunity entity */ Components.Schemas.Opportunity;
910
617
  namespace Responses {
911
- export type $200 = /* The cart checkout result */ Components.Schemas.CheckoutCartResult;
618
+ export type $201 = /* The opportunity entity */ Components.Schemas.Opportunity;
912
619
  export type $400 = Components.Schemas.Error;
913
620
  }
914
621
  }
915
- namespace $CreateOpportunity {
916
- export interface HeaderParameters {
917
- "X-Ivy-Org-ID": Parameters.XIvyOrgID;
622
+ namespace $DeleteCart {
623
+ namespace Parameters {
624
+ export type CartId = string;
625
+ }
626
+ export interface PathParameters {
627
+ "cart-id": Parameters.CartId;
918
628
  }
629
+ namespace Responses {
630
+ export type $200 = /* Supports shopping for products and services until ready for checkout. */ Components.Schemas.Cart;
631
+ export type $400 = Components.Schemas.Error;
632
+ }
633
+ }
634
+ namespace $GetCart {
919
635
  namespace Parameters {
920
- export type XIvyOrgID = string;
636
+ export type CartId = string;
637
+ }
638
+ export interface PathParameters {
639
+ "cart-id": Parameters.CartId;
921
640
  }
922
- export type RequestBody = /* The opportunity entity */ Components.Schemas.Opportunity;
923
641
  namespace Responses {
924
- export type $201 = /* The opportunity entity */ Components.Schemas.Opportunity;
642
+ export type $200 = /* Supports shopping for products and services until ready for checkout. */ Components.Schemas.Cart;
925
643
  export type $400 = Components.Schemas.Error;
644
+ export interface $404 {
645
+ }
926
646
  }
927
647
  }
928
648
  namespace $SearchCatalog {
@@ -939,18 +659,7 @@ declare namespace Paths {
939
659
  * "q": "_id:1233432 OR _id:123432454 OR _id:23445433",
940
660
  * "sort": "description ASC",
941
661
  * "from": 0,
942
- * "size": 200,
943
- * "availability": {
944
- * "location": {
945
- * "postal_code": "57008,",
946
- * "city": "Cologne,",
947
- * "street": "Media Park,",
948
- * "street_number": "8a"
949
- * },
950
- * "available_date": {
951
- * "value": "2022-05-01"
952
- * }
953
- * }
662
+ * "size": 200
954
663
  * }
955
664
  */
956
665
  Components.Schemas.CatalogSearch;
@@ -976,23 +685,25 @@ declare namespace Paths {
976
685
  export type $400 = Components.Schemas.Error;
977
686
  }
978
687
  }
979
- namespace CreateOrder {
980
- export type RequestBody = /* Order Entity Payload */ Components.Schemas.OrderPayload;
981
- namespace Responses {
982
- export type $201 = /* The order entity */ Components.Schemas.Order;
983
- export type $400 = Components.Schemas.Error;
688
+ namespace $UpsertCart {
689
+ export interface HeaderParameters {
690
+ "X-Ivy-Org-ID": Parameters.XIvyOrgID;
984
691
  }
985
- }
986
- namespace PutOrder {
987
692
  namespace Parameters {
988
- export type Id = string;
693
+ export type XIvyOrgID = string;
989
694
  }
990
- export interface PathParameters {
991
- id: Parameters.Id;
695
+ export type RequestBody = /* A valid cart payload from a client. */ Components.Schemas.CartDto;
696
+ namespace Responses {
697
+ export type $200 = /* Supports shopping for products and services until ready for checkout. */ Components.Schemas.Cart;
698
+ export type $201 = /* Supports shopping for products and services until ready for checkout. */ Components.Schemas.Cart;
699
+ export type $400 = Components.Schemas.Error;
992
700
  }
993
- export type RequestBody = /* Order Entity Payload */ Components.Schemas.OrderPayload;
701
+ }
702
+ namespace $UpsertOrder {
703
+ export type RequestBody = /* The order entity */ Components.Schemas.Order;
994
704
  namespace Responses {
995
705
  export type $200 = /* The order entity */ Components.Schemas.Order;
706
+ export type $201 = /* The order entity */ Components.Schemas.Order;
996
707
  export type $400 = Components.Schemas.Error;
997
708
  }
998
709
  }
@@ -1000,25 +711,15 @@ declare namespace Paths {
1000
711
 
1001
712
  export interface OperationMethods {
1002
713
  /**
1003
- * createOrder - createOrder
1004
- *
1005
- * Create an order
1006
- */
1007
- 'createOrder'(
1008
- parameters?: Parameters<UnknownParamsObject> | null,
1009
- data?: Paths.CreateOrder.RequestBody,
1010
- config?: AxiosRequestConfig
1011
- ): OperationResponse<Paths.CreateOrder.Responses.$201>
1012
- /**
1013
- * putOrder - putOrder
714
+ * $upsertCart - upsertCart
1014
715
  *
1015
- * Update an existing Order
716
+ * Creates a new cart or updates an existing one.
1016
717
  */
1017
- 'putOrder'(
1018
- parameters?: Parameters<Paths.PutOrder.PathParameters> | null,
1019
- data?: Paths.PutOrder.RequestBody,
718
+ '$upsertCart'(
719
+ parameters?: Parameters<Paths.$UpsertCart.HeaderParameters> | null,
720
+ data?: Paths.$UpsertCart.RequestBody,
1020
721
  config?: AxiosRequestConfig
1021
- ): OperationResponse<Paths.PutOrder.Responses.$200>
722
+ ): OperationResponse<Paths.$UpsertCart.Responses.$200 | Paths.$UpsertCart.Responses.$201>
1022
723
  /**
1023
724
  * $checkoutCart - checkoutCart
1024
725
  *
@@ -1040,6 +741,44 @@ export interface OperationMethods {
1040
741
  data?: Paths.$CheckoutCart.RequestBody,
1041
742
  config?: AxiosRequestConfig
1042
743
  ): OperationResponse<Paths.$CheckoutCart.Responses.$200>
744
+ /**
745
+ * $getCart - getCart
746
+ *
747
+ * Retrieves a cart by id.
748
+ */
749
+ '$getCart'(
750
+ parameters?: Parameters<Paths.$GetCart.PathParameters> | null,
751
+ data?: any,
752
+ config?: AxiosRequestConfig
753
+ ): OperationResponse<Paths.$GetCart.Responses.$200>
754
+ /**
755
+ * $deleteCart - deleteCart
756
+ *
757
+ * Deletes the Cart specified and returns its content.
758
+ */
759
+ '$deleteCart'(
760
+ parameters?: Parameters<Paths.$DeleteCart.PathParameters> | null,
761
+ data?: any,
762
+ config?: AxiosRequestConfig
763
+ ): OperationResponse<Paths.$DeleteCart.Responses.$200>
764
+ /**
765
+ * $upsertOrder - upsertOrder
766
+ *
767
+ * Creates a new order or updates an existing one. During the creation of an order, an unique customer-readable `order_number` will be generated.
768
+ * The `order_number` can be used to universally identify an order within epilot platform.
769
+ *
770
+ * The upsert operation is idempotent, meaning that multiple calls will have effect just once. Calling the upsert multiple times will not duplicate the items on an order.
771
+ *
772
+ * When the the `cart_id` payload field is specified, the cart items are appended to the existing order items, or replaced in-place if they belong to the same `cart_id`.
773
+ *
774
+ * On multiple updates with the same `cart_id` the line items linked with that `cart_id` (`order.line_items[]?.metadata.cart_id`) are removed and re-added.
775
+ *
776
+ */
777
+ '$upsertOrder'(
778
+ parameters?: Parameters<UnknownParamsObject> | null,
779
+ data?: Paths.$UpsertOrder.RequestBody,
780
+ config?: AxiosRequestConfig
781
+ ): OperationResponse<Paths.$UpsertOrder.Responses.$200 | Paths.$UpsertOrder.Responses.$201>
1043
782
  /**
1044
783
  * $searchCatalog - searchCatalog
1045
784
  *
@@ -1050,20 +789,10 @@ export interface OperationMethods {
1050
789
  data?: Paths.$SearchCatalog.RequestBody,
1051
790
  config?: AxiosRequestConfig
1052
791
  ): OperationResponse<Paths.$SearchCatalog.Responses.$200>
1053
- /**
1054
- * $availabilityCheck - availabilityCheck
1055
- *
1056
- * The availability check endpoint
1057
- */
1058
- '$availabilityCheck'(
1059
- parameters?: Parameters<Paths.$AvailabilityCheck.HeaderParameters> | null,
1060
- data?: Paths.$AvailabilityCheck.RequestBody,
1061
- config?: AxiosRequestConfig
1062
- ): OperationResponse<Paths.$AvailabilityCheck.Responses.$200>
1063
792
  /**
1064
793
  * $createOpportunity - createOpportunity
1065
794
  *
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.
795
+ * Creates a new opportunity. During the creation of an opportunity, an unique customer-readable `opportunity_number` will be generated.
1067
796
  * The `opportunity_number` can be used to universally identify an opportunity within epilot platform.
1068
797
  *
1069
798
  */
@@ -1075,29 +804,17 @@ export interface OperationMethods {
1075
804
  }
1076
805
 
1077
806
  export interface PathsDictionary {
1078
- ['/v1/order']: {
1079
- /**
1080
- * createOrder - createOrder
1081
- *
1082
- * Create an order
1083
- */
1084
- 'post'(
1085
- parameters?: Parameters<UnknownParamsObject> | null,
1086
- data?: Paths.CreateOrder.RequestBody,
1087
- config?: AxiosRequestConfig
1088
- ): OperationResponse<Paths.CreateOrder.Responses.$201>
1089
- }
1090
- ['/v1/order/{id}']: {
807
+ ['/v1/public/cart']: {
1091
808
  /**
1092
- * putOrder - putOrder
809
+ * $upsertCart - upsertCart
1093
810
  *
1094
- * Update an existing Order
811
+ * Creates a new cart or updates an existing one.
1095
812
  */
1096
813
  'put'(
1097
- parameters?: Parameters<Paths.PutOrder.PathParameters> | null,
1098
- data?: Paths.PutOrder.RequestBody,
814
+ parameters?: Parameters<Paths.$UpsertCart.HeaderParameters> | null,
815
+ data?: Paths.$UpsertCart.RequestBody,
1099
816
  config?: AxiosRequestConfig
1100
- ): OperationResponse<Paths.PutOrder.Responses.$200>
817
+ ): OperationResponse<Paths.$UpsertCart.Responses.$200 | Paths.$UpsertCart.Responses.$201>
1101
818
  }
1102
819
  ['/v1/public/cart:checkout']: {
1103
820
  /**
@@ -1122,6 +839,48 @@ export interface PathsDictionary {
1122
839
  config?: AxiosRequestConfig
1123
840
  ): OperationResponse<Paths.$CheckoutCart.Responses.$200>
1124
841
  }
842
+ ['/v1/cart/{cart-id}']: {
843
+ /**
844
+ * $getCart - getCart
845
+ *
846
+ * Retrieves a cart by id.
847
+ */
848
+ 'get'(
849
+ parameters?: Parameters<Paths.$GetCart.PathParameters> | null,
850
+ data?: any,
851
+ config?: AxiosRequestConfig
852
+ ): OperationResponse<Paths.$GetCart.Responses.$200>
853
+ /**
854
+ * $deleteCart - deleteCart
855
+ *
856
+ * Deletes the Cart specified and returns its content.
857
+ */
858
+ 'delete'(
859
+ parameters?: Parameters<Paths.$DeleteCart.PathParameters> | null,
860
+ data?: any,
861
+ config?: AxiosRequestConfig
862
+ ): OperationResponse<Paths.$DeleteCart.Responses.$200>
863
+ }
864
+ ['/v1/order']: {
865
+ /**
866
+ * $upsertOrder - upsertOrder
867
+ *
868
+ * Creates a new order or updates an existing one. During the creation of an order, an unique customer-readable `order_number` will be generated.
869
+ * The `order_number` can be used to universally identify an order within epilot platform.
870
+ *
871
+ * The upsert operation is idempotent, meaning that multiple calls will have effect just once. Calling the upsert multiple times will not duplicate the items on an order.
872
+ *
873
+ * When the the `cart_id` payload field is specified, the cart items are appended to the existing order items, or replaced in-place if they belong to the same `cart_id`.
874
+ *
875
+ * On multiple updates with the same `cart_id` the line items linked with that `cart_id` (`order.line_items[]?.metadata.cart_id`) are removed and re-added.
876
+ *
877
+ */
878
+ 'put'(
879
+ parameters?: Parameters<UnknownParamsObject> | null,
880
+ data?: Paths.$UpsertOrder.RequestBody,
881
+ config?: AxiosRequestConfig
882
+ ): OperationResponse<Paths.$UpsertOrder.Responses.$200 | Paths.$UpsertOrder.Responses.$201>
883
+ }
1125
884
  ['/v1/public/catalog']: {
1126
885
  /**
1127
886
  * $searchCatalog - searchCatalog
@@ -1134,23 +893,11 @@ export interface PathsDictionary {
1134
893
  config?: AxiosRequestConfig
1135
894
  ): OperationResponse<Paths.$SearchCatalog.Responses.$200>
1136
895
  }
1137
- ['/v1/public/availability:check']: {
1138
- /**
1139
- * $availabilityCheck - availabilityCheck
1140
- *
1141
- * The availability check endpoint
1142
- */
1143
- 'post'(
1144
- parameters?: Parameters<Paths.$AvailabilityCheck.HeaderParameters> | null,
1145
- data?: Paths.$AvailabilityCheck.RequestBody,
1146
- config?: AxiosRequestConfig
1147
- ): OperationResponse<Paths.$AvailabilityCheck.Responses.$200>
1148
- }
1149
896
  ['/v1/public/opportunity']: {
1150
897
  /**
1151
898
  * $createOpportunity - createOpportunity
1152
899
  *
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.
900
+ * Creates a new opportunity. During the creation of an opportunity, an unique customer-readable `opportunity_number` will be generated.
1154
901
  * The `opportunity_number` can be used to universally identify an opportunity within epilot platform.
1155
902
  *
1156
903
  */