@epilot/pricing-client 1.11.0 → 1.12.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.
@@ -0,0 +1,1043 @@
1
+ /* eslint-disable */
2
+ import type {
3
+ OpenAPIClient,
4
+ Parameters,
5
+ UnknownParamsObject,
6
+ OperationResponse,
7
+ AxiosRequestConfig,
8
+ } from 'openapi-client-axios';
9
+
10
+ declare namespace Components {
11
+ namespace Schemas {
12
+ export interface Address {
13
+ [name: string]: any;
14
+ /**
15
+ * The first line of the address. Typically the street address or PO Box number.
16
+ */
17
+ street?: string;
18
+ /**
19
+ * The second line of the address. Typically the number of the apartment, suite, or unit.
20
+ */
21
+ street_number?: string;
22
+ /**
23
+ * The postal code for the address.
24
+ */
25
+ postal_code?: string;
26
+ /**
27
+ * The name of the city, district, village, or town.
28
+ */
29
+ city?: string;
30
+ /**
31
+ * The two-letter code for the country of the address.
32
+ */
33
+ country?: string;
34
+ /**
35
+ * An additional description for the address
36
+ */
37
+ additional_info?: string;
38
+ }
39
+ /**
40
+ * Availability check request payload
41
+ */
42
+ export interface AvailabilityCheckParams {
43
+ /**
44
+ * Products to check availability
45
+ */
46
+ products: string[];
47
+ filters: /* Availability filters dimensions */ AvailabilityFilters;
48
+ }
49
+ export interface AvailabilityDate {
50
+ /**
51
+ * The availability interval start date
52
+ * example:
53
+ * 2017-07-21
54
+ */
55
+ available_start_date?: string; // date
56
+ /**
57
+ * The availability interval end date
58
+ * example:
59
+ * 2017-07-21
60
+ */
61
+ available_end_date?: string; // date
62
+ }
63
+ /**
64
+ * Availability filters dimensions
65
+ */
66
+ export interface AvailabilityFilters {
67
+ location: AvailabilityLocation;
68
+ /**
69
+ * A value to be matched against the availability window (start & end date)
70
+ * example:
71
+ * 2017-07-21
72
+ */
73
+ available_date?: string; // date
74
+ }
75
+ export interface AvailabilityLocation {
76
+ /**
77
+ * The first line of the address. Typically the street address or PO Box number.
78
+ */
79
+ street?: string;
80
+ /**
81
+ * The second line of the address. Typically the number of the apartment, suite, or unit.
82
+ */
83
+ street_number?: string;
84
+ /**
85
+ * The postal code for the address.
86
+ */
87
+ postal_code?: string;
88
+ /**
89
+ * The name of the city, district, village, or town.
90
+ */
91
+ city?: string;
92
+ /**
93
+ * The name of the country.
94
+ */
95
+ country?: string;
96
+ }
97
+ /**
98
+ * The availability check result payload
99
+ * example:
100
+ * {
101
+ * "available_products": [],
102
+ * "check_results": [
103
+ * {
104
+ * "product_id": "my-product-id-123-1",
105
+ * "matching_hits": 0
106
+ * },
107
+ * {
108
+ * "product_id": "my-product-id-123-2",
109
+ * "matching_hits": 0
110
+ * }
111
+ * ]
112
+ * }
113
+ */
114
+ export interface AvailabilityResult {
115
+ available_products: string[];
116
+ /**
117
+ * The check result details
118
+ */
119
+ check_results?: {
120
+ product_id: string;
121
+ /**
122
+ * The number of rules matched
123
+ */
124
+ matching_hits?: number;
125
+ /**
126
+ * A set of matching errors when checking availability
127
+ */
128
+ matching_error?: {
129
+ [name: string]: any;
130
+ };
131
+ }[];
132
+ }
133
+ export type BillingPeriod = "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly" | "one_time";
134
+ /**
135
+ * Supports shopping for products and services until ready for checkout.
136
+ */
137
+ export interface Cart {
138
+ /**
139
+ * The cart identifier
140
+ */
141
+ id?: string;
142
+ /**
143
+ * The user's Organization Id the cart belongs to
144
+ */
145
+ org_id?: string;
146
+ /**
147
+ * The status of the Cart:
148
+ * - open - the cart checkout is still in progress. Payment processing has not started
149
+ * - complete - the cart checkout is complete. Payment processing may still be in progress
150
+ * - expired - the cart checkout has expired. No further processing will occur
151
+ *
152
+ */
153
+ status?: "open" | "complete" | "expired";
154
+ customer?: Customer;
155
+ billing_address?: Address;
156
+ delivery_address?: Address;
157
+ metadata?: /* A set of key-value pairs. */ MetaData;
158
+ line_items?: /* Tracks a set of product prices, quantities, (discounts) and taxes. */ PriceItems;
159
+ /**
160
+ * Total of all items before (discounts or) taxes are applied.
161
+ */
162
+ amount_subtotal?: number;
163
+ /**
164
+ * Total of all items after (discounts and) taxes are applied.
165
+ */
166
+ amount_total?: number;
167
+ total_details?: /* The total details with tax (and discount) aggregated totals. */ TotalDetails;
168
+ created_at?: string; // date-time
169
+ updated_at?: string; // date-time
170
+ }
171
+ /**
172
+ * A valid cart payload from a client.
173
+ */
174
+ export interface CartDto {
175
+ metadata?: /* A set of key-value pairs. */ MetaData;
176
+ customer?: Customer;
177
+ billing_address?: Address;
178
+ delivery_address?: Address;
179
+ /**
180
+ * type of source, e.g. journey or manual
181
+ * example:
182
+ * journey
183
+ */
184
+ source_type?: string;
185
+ /**
186
+ * identifier for source e.g. journey ID
187
+ * example:
188
+ * ce99875f-fba9-4fe2-a8f9-afaf52059051
189
+ */
190
+ source_id?: string;
191
+ source?: /* Order Source */ OrderSource;
192
+ additional_addresses?: Address[];
193
+ payment_method?: /**
194
+ * A PaymentMethod represent your customer's payment instruments.
195
+ *
196
+ */
197
+ PaymentMethod;
198
+ line_items: /* A valid set of product prices, quantities, (discounts) and taxes from a client. */ PriceItemsDto;
199
+ /**
200
+ * An array of file IDs, already upload into the File API, that are related with this cart
201
+ */
202
+ files?: string[];
203
+ status?: /* The order status */ OrderStatus;
204
+ tags?: string[];
205
+ journey_data?: {
206
+ [name: string]: any;
207
+ };
208
+ consents?: {
209
+ [name: string]: any;
210
+ };
211
+ }
212
+ /**
213
+ * A catalog search payload
214
+ * example:
215
+ * {
216
+ * "q": "_id:1233432 OR _id:123432454 OR _id:23445433",
217
+ * "sort": "description ASC",
218
+ * "from": 0,
219
+ * "size": 200,
220
+ * "availability": {
221
+ * "location": {
222
+ * "postal_code": "57008,",
223
+ * "city": "Cologne,",
224
+ * "street": "Media Park,",
225
+ * "street_number": "8a"
226
+ * },
227
+ * "available_date": {
228
+ * "value": "2022-05-01"
229
+ * }
230
+ * }
231
+ * }
232
+ */
233
+ export interface CatalogSearch {
234
+ /**
235
+ * The query to perform using lucene query syntax.
236
+ */
237
+ q: string;
238
+ /**
239
+ * The sort expression to sort the results.
240
+ */
241
+ sort?: string;
242
+ /**
243
+ * The index from which to query, used for pagination purposes. Defaults to 0
244
+ */
245
+ from?: number;
246
+ /**
247
+ * The max size of the response, defaults to 2000.
248
+ */
249
+ size?: number;
250
+ /**
251
+ * When true, enables entity hydration to resolve nested $relation references in-place.
252
+ */
253
+ hydrate?: boolean;
254
+ availability?: /* Availability filters dimensions */ AvailabilityFilters;
255
+ }
256
+ /**
257
+ * The query result payload
258
+ * example:
259
+ * {
260
+ * "hits": 2,
261
+ * "results": [
262
+ * {
263
+ * "schema": "product",
264
+ * "description": "product a"
265
+ * },
266
+ * {
267
+ * "schema": "price",
268
+ * "unit_amount_decimal": "124.342343434"
269
+ * }
270
+ * ]
271
+ * }
272
+ */
273
+ export interface CatalogSearchResult {
274
+ /**
275
+ * The number os results returned.
276
+ */
277
+ hits?: number;
278
+ results?: (/* The product configuration */ Product | /* The price configuration */ Price)[];
279
+ }
280
+ /**
281
+ * The cart checkout request payload
282
+ */
283
+ export interface CheckoutCart {
284
+ cart?: string | /* A valid cart payload from a client. */ CartDto;
285
+ mode?: /* The checkout mode for the cart checkout. */ CheckoutMode;
286
+ }
287
+ /**
288
+ * The cart checkout result
289
+ */
290
+ export interface CheckoutCartResult {
291
+ order?: /* The order entity */ Order;
292
+ }
293
+ /**
294
+ * The checkout mode for the cart checkout.
295
+ */
296
+ export type CheckoutMode = "create_order" | "create_invoice" | "create_quote";
297
+ /**
298
+ * Three-letter ISO currency code, in lowercase. Must be a supported currency.
299
+ * ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
300
+ *
301
+ */
302
+ export type Currency = string;
303
+ export interface Customer {
304
+ first_name?: string;
305
+ last_name?: string;
306
+ company_name?: string;
307
+ vat_id?: string;
308
+ /**
309
+ * A valid email identifying the customer.
310
+ */
311
+ email?: string;
312
+ phone?: string;
313
+ }
314
+ export interface EntityRelation {
315
+ [name: string]: any;
316
+ entity_id?: string;
317
+ _tags?: string[];
318
+ }
319
+ export interface Error {
320
+ /**
321
+ * Error message
322
+ */
323
+ message: string;
324
+ }
325
+ export interface File {
326
+ [name: string]: any;
327
+ _id: string;
328
+ filename: string;
329
+ mime_type: string;
330
+ versions: {
331
+ [name: string]: any;
332
+ s3ref: {
333
+ bucket: string;
334
+ key: string;
335
+ };
336
+ }[];
337
+ _schema: string;
338
+ _org: string;
339
+ _created_at: string; // date-time
340
+ _updated_at: string; // date-time
341
+ _title?: string;
342
+ $relation?: EntityRelation;
343
+ }
344
+ /**
345
+ * A set of key-value pairs.
346
+ */
347
+ export type MetaData = ({
348
+ /**
349
+ * Item key
350
+ */
351
+ key?: string;
352
+ /**
353
+ * Item value
354
+ */
355
+ value?: string;
356
+ })[];
357
+ /**
358
+ * The opportunity entity
359
+ */
360
+ export interface Opportunity {
361
+ [name: string]: any;
362
+ /**
363
+ * The opportunity id number for the customer (autogenerated if left blank)
364
+ */
365
+ opportunity_number?: string;
366
+ /**
367
+ * A description to frame this opportunity within its sales process
368
+ */
369
+ description?: string;
370
+ /**
371
+ * The opportunity status
372
+ */
373
+ status?: "lead" | "qualification" | "validation" | "offering" | "supply" | "approval" | "operations" | "complete";
374
+ items?: /* The order entity */ Order[] | {
375
+ $relation?: /* An order relation reference */ OrderRelation[];
376
+ };
377
+ /**
378
+ * Organization Id the order belongs to
379
+ */
380
+ _org_id?: string;
381
+ _id?: string;
382
+ _created_at?: string;
383
+ _updated_at?: string;
384
+ /**
385
+ * type of source, e.g. journey or manual
386
+ * example:
387
+ * journey
388
+ */
389
+ source_type?: string;
390
+ /**
391
+ * identifier for source e.g. journey ID
392
+ * example:
393
+ * ce99875f-fba9-4fe2-a8f9-afaf52059051
394
+ */
395
+ source_id?: string;
396
+ source?: /* Order Source */ OpportunitySource;
397
+ _tags?: string[];
398
+ }
399
+ /**
400
+ * Order Source
401
+ */
402
+ export interface OpportunitySource {
403
+ /**
404
+ * Link path for the source
405
+ * example:
406
+ * /app/v2/journey-builder/editor/db7f6940-994b-11ec-a46d-9f1824ff2939
407
+ */
408
+ http?: string;
409
+ /**
410
+ * Title for the source
411
+ * example:
412
+ * Journey: PH Journey
413
+ */
414
+ title?: string;
415
+ }
416
+ /**
417
+ * The order entity
418
+ */
419
+ export interface Order {
420
+ [name: string]: any;
421
+ /**
422
+ * The order id number for the customer
423
+ */
424
+ order_number?: string;
425
+ /**
426
+ * The cart id that originated or is associated with the order
427
+ */
428
+ cart_id?: string;
429
+ status?: /* The order status */ OrderStatus;
430
+ /**
431
+ * type of source, e.g. journey or manual
432
+ * example:
433
+ * journey
434
+ */
435
+ source_type?: string;
436
+ /**
437
+ * identifier for source e.g. journey ID
438
+ * example:
439
+ * ce99875f-fba9-4fe2-a8f9-afaf52059051
440
+ */
441
+ source_id?: string;
442
+ source?: /* Order Source */ OrderSource;
443
+ metadata?: /* A set of key-value pairs. */ MetaData;
444
+ billing_first_name?: string;
445
+ billing_last_name?: string;
446
+ billing_company_name?: string;
447
+ billing_vat?: string;
448
+ billing_email?: string;
449
+ billing_phone?: string;
450
+ billing_address?: Address[];
451
+ currency?: /**
452
+ * Three-letter ISO currency code, in lowercase. Must be a supported currency.
453
+ * ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
454
+ *
455
+ */
456
+ Currency;
457
+ delivery_address?: Address[];
458
+ payment_method?: /**
459
+ * A PaymentMethod represent your customer's payment instruments.
460
+ *
461
+ */
462
+ PaymentMethod[];
463
+ /**
464
+ * The id of an existing contact.
465
+ */
466
+ contact?: string;
467
+ line_items?: /* Tracks a set of product prices, quantities, (discounts) and taxes. */ PriceItems;
468
+ /**
469
+ * Total of all items before (discounts or) taxes are applied.
470
+ */
471
+ amount_subtotal?: number;
472
+ /**
473
+ * Total of all items after (discounts and) taxes are applied.
474
+ */
475
+ amount_total?: number;
476
+ total_details?: /* The total details with tax (and discount) aggregated totals. */ TotalDetails;
477
+ /**
478
+ * Organization Id the order belongs to
479
+ */
480
+ _org_id?: string;
481
+ _id?: string;
482
+ _created_at?: string;
483
+ _updated_at?: string;
484
+ _tags?: string[];
485
+ }
486
+ /**
487
+ * An order relation reference
488
+ */
489
+ export interface OrderRelation {
490
+ /**
491
+ * The relation order id
492
+ */
493
+ entity_id?: string;
494
+ _tags?: string[];
495
+ }
496
+ /**
497
+ * Order Source
498
+ */
499
+ export interface OrderSource {
500
+ /**
501
+ * Link path for the source
502
+ * example:
503
+ * /app/v2/journey-builder/editor/db7f6940-994b-11ec-a46d-9f1824ff2939
504
+ */
505
+ http?: string;
506
+ /**
507
+ * Title for the source
508
+ * example:
509
+ * Journey: PH Journey
510
+ */
511
+ title?: string;
512
+ }
513
+ /**
514
+ * The order status
515
+ */
516
+ export type OrderStatus = "draft" | "quote" | "placed" | "cancelled" | "completed";
517
+ /**
518
+ * A PaymentMethod represent your customer's payment instruments.
519
+ *
520
+ */
521
+ export interface PaymentMethod {
522
+ /**
523
+ * The type of the PaymentMethod.
524
+ */
525
+ type?: string;
526
+ /**
527
+ * Contains relevant data associated with the payment method type.
528
+ */
529
+ details?: {
530
+ [name: string]: any;
531
+ };
532
+ }
533
+ /**
534
+ * The price configuration
535
+ */
536
+ export interface Price {
537
+ [name: string]: any;
538
+ active?: boolean;
539
+ billing_scheme?: "Per Unit";
540
+ description?: string;
541
+ sales_tax?: SalesTax;
542
+ tax_behavior?: "inclusive" | "exclusive";
543
+ tiers_mode?: "Standard";
544
+ type?: "one_time" | "recurring";
545
+ billing_period?: BillingPeriod;
546
+ unit_amount?: number;
547
+ unit_amount_decimal?: string;
548
+ unit_amount_currency?: /**
549
+ * Three-letter ISO currency code, in lowercase. Must be a supported currency.
550
+ * ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
551
+ *
552
+ */
553
+ Currency;
554
+ billing_duration_amount?: number;
555
+ billing_duration_unit?: "weeks" | "months" | "years";
556
+ notice_time_amount?: number;
557
+ notice_time_unit?: "weeks" | "months" | "years";
558
+ termination_time_amount?: number;
559
+ termination_time_unit?: "weeks" | "months" | "years";
560
+ renewal_duration_amount?: number;
561
+ renewal_duration_unit?: "weeks" | "months" | "years";
562
+ _created_at?: string;
563
+ _id?: string;
564
+ _title?: string;
565
+ _updated_at?: string;
566
+ }
567
+ /**
568
+ * Represents a price item
569
+ */
570
+ export interface PriceItem {
571
+ /**
572
+ * price item id
573
+ */
574
+ id?: string;
575
+ metadata?: /* A set of key-value pairs. */ MetaData;
576
+ /**
577
+ * The unit amount value
578
+ */
579
+ unit_amount?: number;
580
+ /**
581
+ * Total before any (discounts or) taxes are applied.
582
+ */
583
+ amount_subtotal?: number;
584
+ /**
585
+ * Total after (discounts and) taxes.
586
+ */
587
+ amount_total?: number;
588
+ currency?: /**
589
+ * Three-letter ISO currency code, in lowercase. Must be a supported currency.
590
+ * ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
591
+ *
592
+ */
593
+ Currency;
594
+ /**
595
+ * An arbitrary string attached to the price item. Often useful for displaying to users. Defaults to product name.
596
+ */
597
+ description?: string;
598
+ /**
599
+ * The quantity of products being purchased.
600
+ */
601
+ quantity?: number;
602
+ /**
603
+ * The id of the product.
604
+ */
605
+ product_id?: string;
606
+ /**
607
+ * The id of the price.
608
+ */
609
+ price_id?: string;
610
+ _price?: /* The price configuration */ Price;
611
+ _product?: /* The product configuration */ Product;
612
+ /**
613
+ * The taxes applied to the price item.
614
+ */
615
+ taxes?: (/* A tax amount associated with a specific tax rate. */ TaxAmount)[];
616
+ /**
617
+ * The sum of amounts of the price items by recurrence.
618
+ */
619
+ recurrences?: (/* An amount associated with a specific recurrence. */ RecurrenceAmount)[];
620
+ }
621
+ /**
622
+ * Represents a valid price item from a client.
623
+ */
624
+ export interface PriceItemDto {
625
+ metadata?: /* A set of key-value pairs. */ MetaData;
626
+ /**
627
+ * The quantity of products being purchased.
628
+ */
629
+ quantity?: number;
630
+ /**
631
+ * An arbitrary string attached to the price item. Often useful for displaying to users. Defaults to product name.
632
+ */
633
+ description?: string;
634
+ /**
635
+ * The id of the product.
636
+ */
637
+ product_id?: string;
638
+ /**
639
+ * The id of the price.
640
+ */
641
+ price_id?: string;
642
+ /**
643
+ * The taxes applied to the price item.
644
+ */
645
+ taxes?: (/* A valid tax rate from a client. */ TaxAmountDto)[];
646
+ /**
647
+ * The taxes applied to the price item.
648
+ */
649
+ recurrences?: (/* An amount associated with a specific recurrence. */ RecurrenceAmountDto)[];
650
+ _price?: /* The price configuration */ Price;
651
+ /**
652
+ * The product linked to the price item.
653
+ */
654
+ _product?: /* The product configuration */ Product;
655
+ }
656
+ /**
657
+ * Tracks a set of product prices, quantities, (discounts) and taxes.
658
+ */
659
+ export type PriceItems = (/* Represents a price item */ PriceItem)[];
660
+ /**
661
+ * A valid set of product prices, quantities, (discounts) and taxes from a client.
662
+ */
663
+ export type PriceItemsDto = (/* Represents a valid price item from a client. */ PriceItemDto)[];
664
+ /**
665
+ * The result from the calculation of a set of price items.
666
+ */
667
+ export interface PricingDetails {
668
+ items?: (/* Represents a price item */ PriceItem)[];
669
+ /**
670
+ * Total of all items before (discounts or) taxes are applied.
671
+ */
672
+ amount_subtotal?: number;
673
+ /**
674
+ * Total of all items after (discounts and) taxes are applied.
675
+ */
676
+ amount_total?: number;
677
+ total_details?: /* The total details with tax (and discount) aggregated totals. */ TotalDetails;
678
+ }
679
+ /**
680
+ * The product configuration
681
+ */
682
+ export interface Product {
683
+ [name: string]: any;
684
+ code?: string;
685
+ type?: "Product" | "Service";
686
+ name?: string;
687
+ _id?: string;
688
+ _title?: string;
689
+ _availability_files?: File[];
690
+ }
691
+ /**
692
+ * An amount associated with a specific recurrence.
693
+ */
694
+ export interface RecurrenceAmount {
695
+ /**
696
+ * The price type.
697
+ */
698
+ type: string;
699
+ /**
700
+ * The price billing period.
701
+ */
702
+ billing_period?: string;
703
+ /**
704
+ * Total of all items, with same recurrence, before (discounts or) taxes are applied.
705
+ */
706
+ amount_subtotal: number;
707
+ /**
708
+ * Total of all items, with same recurrence, after (discounts and) taxes are applied.
709
+ */
710
+ amount_total: number;
711
+ /**
712
+ * Total of all items taxes, with same recurrence.
713
+ */
714
+ amount_tax?: number;
715
+ }
716
+ /**
717
+ * An amount associated with a specific recurrence.
718
+ */
719
+ export interface RecurrenceAmountDto {
720
+ /**
721
+ * The price type.
722
+ */
723
+ type: string;
724
+ /**
725
+ * The price billing period.
726
+ */
727
+ billing_period?: string;
728
+ /**
729
+ * Total of all items, with same recurrence, before (discounts or) taxes are applied.
730
+ */
731
+ amount_subtotal: number;
732
+ /**
733
+ * Total of all items, with same recurrence, after (discounts and) taxes are applied.
734
+ */
735
+ amount_total: number;
736
+ /**
737
+ * Total of all items taxes, with same recurrence.
738
+ */
739
+ amount_tax?: number;
740
+ }
741
+ export type SalesTax = "nontaxable" | "reduced" | "standard";
742
+ /**
743
+ * the tax configuration
744
+ */
745
+ export interface Tax {
746
+ [name: string]: any;
747
+ type: "VAT" | "GST" | "Custom";
748
+ description?: string;
749
+ rate: number;
750
+ behavior: "Exclusive" | "Inclusive";
751
+ active?: boolean;
752
+ region?: string;
753
+ region_label?: string;
754
+ }
755
+ /**
756
+ * A tax amount associated with a specific tax rate.
757
+ */
758
+ export interface TaxAmount {
759
+ /**
760
+ * The tax amount.
761
+ */
762
+ amount?: number;
763
+ /**
764
+ * The tax rate applied.
765
+ */
766
+ rate?: string;
767
+ /**
768
+ * The tax applied.
769
+ */
770
+ tax?: /* The tax applied. */ /* the tax configuration */ Tax;
771
+ }
772
+ /**
773
+ * A valid tax rate from a client.
774
+ */
775
+ export interface TaxAmountDto {
776
+ /**
777
+ * The tax rate applied.
778
+ */
779
+ rate?: string;
780
+ /**
781
+ * The tax applied.
782
+ */
783
+ tax?: /* The tax applied. */ /* the tax configuration */ Tax;
784
+ }
785
+ /**
786
+ * The total details with tax (and discount) aggregated totals.
787
+ */
788
+ export interface TotalDetails {
789
+ /**
790
+ * This is the sum of all the price item shipping amounts.
791
+ */
792
+ amount_shipping?: number;
793
+ /**
794
+ * This is the sum of all the price item tax amounts.
795
+ */
796
+ amount_tax?: number;
797
+ /**
798
+ * Breakdown of individual tax (and discount) amounts that add up to the totals.
799
+ */
800
+ breakdown?: {
801
+ /**
802
+ * The aggregated price items tax amount per rate.
803
+ */
804
+ taxes?: (/* A tax amount associated with a specific tax rate. */ TaxAmount)[];
805
+ /**
806
+ * The aggregated price items tax amount per rate.
807
+ */
808
+ recurrences?: (/* An amount associated with a specific recurrence. */ RecurrenceAmount)[];
809
+ };
810
+ }
811
+ }
812
+ }
813
+ declare namespace Paths {
814
+ namespace $AvailabilityCheck {
815
+ export interface HeaderParameters {
816
+ "X-Ivy-Org-ID": Parameters.XIvyOrgID;
817
+ }
818
+ namespace Parameters {
819
+ export type XIvyOrgID = string;
820
+ }
821
+ export type RequestBody = /* Availability check request payload */ Components.Schemas.AvailabilityCheckParams;
822
+ namespace Responses {
823
+ export type $200 = /**
824
+ * The availability check result payload
825
+ * example:
826
+ * {
827
+ * "available_products": [],
828
+ * "check_results": [
829
+ * {
830
+ * "product_id": "my-product-id-123-1",
831
+ * "matching_hits": 0
832
+ * },
833
+ * {
834
+ * "product_id": "my-product-id-123-2",
835
+ * "matching_hits": 0
836
+ * }
837
+ * ]
838
+ * }
839
+ */
840
+ Components.Schemas.AvailabilityResult;
841
+ export type $400 = Components.Schemas.Error;
842
+ }
843
+ }
844
+ namespace $CheckoutCart {
845
+ export interface HeaderParameters {
846
+ "X-Ivy-Org-ID": Parameters.XIvyOrgID;
847
+ }
848
+ namespace Parameters {
849
+ export type XIvyOrgID = string;
850
+ }
851
+ export type RequestBody = /* The cart checkout request payload */ Components.Schemas.CheckoutCart;
852
+ namespace Responses {
853
+ export type $200 = /* The cart checkout result */ Components.Schemas.CheckoutCartResult;
854
+ export type $400 = Components.Schemas.Error;
855
+ }
856
+ }
857
+ namespace $CreateOpportunity {
858
+ export interface HeaderParameters {
859
+ "X-Ivy-Org-ID": Parameters.XIvyOrgID;
860
+ }
861
+ namespace Parameters {
862
+ export type XIvyOrgID = string;
863
+ }
864
+ export type RequestBody = /* The opportunity entity */ Components.Schemas.Opportunity;
865
+ namespace Responses {
866
+ export type $201 = /* The opportunity entity */ Components.Schemas.Opportunity;
867
+ export type $400 = Components.Schemas.Error;
868
+ }
869
+ }
870
+ namespace $SearchCatalog {
871
+ export interface HeaderParameters {
872
+ "X-Ivy-Org-ID": Parameters.XIvyOrgID;
873
+ }
874
+ namespace Parameters {
875
+ export type XIvyOrgID = string;
876
+ }
877
+ export type RequestBody = /**
878
+ * A catalog search payload
879
+ * example:
880
+ * {
881
+ * "q": "_id:1233432 OR _id:123432454 OR _id:23445433",
882
+ * "sort": "description ASC",
883
+ * "from": 0,
884
+ * "size": 200,
885
+ * "availability": {
886
+ * "location": {
887
+ * "postal_code": "57008,",
888
+ * "city": "Cologne,",
889
+ * "street": "Media Park,",
890
+ * "street_number": "8a"
891
+ * },
892
+ * "available_date": {
893
+ * "value": "2022-05-01"
894
+ * }
895
+ * }
896
+ * }
897
+ */
898
+ Components.Schemas.CatalogSearch;
899
+ namespace Responses {
900
+ export type $200 = /**
901
+ * The query result payload
902
+ * example:
903
+ * {
904
+ * "hits": 2,
905
+ * "results": [
906
+ * {
907
+ * "schema": "product",
908
+ * "description": "product a"
909
+ * },
910
+ * {
911
+ * "schema": "price",
912
+ * "unit_amount_decimal": "124.342343434"
913
+ * }
914
+ * ]
915
+ * }
916
+ */
917
+ Components.Schemas.CatalogSearchResult;
918
+ export type $400 = Components.Schemas.Error;
919
+ }
920
+ }
921
+ }
922
+
923
+ export interface OperationMethods {
924
+ /**
925
+ * $checkoutCart - checkoutCart
926
+ *
927
+ * Checkouts a cart and executes the specified checkout `mode` process.
928
+ *
929
+ * A Checkout implicitly finalizes the provided cart (if not transient from a fast-checkout) and behaves in one of the following modes:
930
+ * - `create_order` (**default**): the payment happens at a later date or managed by 3rd-party CRM (SAP)
931
+ * - `create_invoice`: the payment happens on the online checkout (paypal, stripe, adyen)
932
+ * - `create_quote`: the checkout represents a price quote request
933
+ *
934
+ * Fast checkout is also supported, by passing the Cart contents directly.
935
+ * When a fast checkout is performed the cart is considered transient and there is no cart persistance.
936
+ *
937
+ * If the checkout `mode` is omitted, the `mode` will default to `create_order`.
938
+ *
939
+ */
940
+ '$checkoutCart'(
941
+ parameters?: Parameters<Paths.$CheckoutCart.HeaderParameters> | null,
942
+ data?: Paths.$CheckoutCart.RequestBody,
943
+ config?: AxiosRequestConfig
944
+ ): OperationResponse<Paths.$CheckoutCart.Responses.$200>
945
+ /**
946
+ * $searchCatalog - searchCatalog
947
+ *
948
+ * Provides a querying functionalities over products and prices of the Catalog for a given organization.
949
+ */
950
+ '$searchCatalog'(
951
+ parameters?: Parameters<Paths.$SearchCatalog.HeaderParameters> | null,
952
+ data?: Paths.$SearchCatalog.RequestBody,
953
+ config?: AxiosRequestConfig
954
+ ): OperationResponse<Paths.$SearchCatalog.Responses.$200>
955
+ /**
956
+ * $availabilityCheck - availabilityCheck
957
+ *
958
+ * The availability check endpoint
959
+ */
960
+ '$availabilityCheck'(
961
+ parameters?: Parameters<Paths.$AvailabilityCheck.HeaderParameters> | null,
962
+ data?: Paths.$AvailabilityCheck.RequestBody,
963
+ config?: AxiosRequestConfig
964
+ ): OperationResponse<Paths.$AvailabilityCheck.Responses.$200>
965
+ /**
966
+ * $createOpportunity - createOpportunity
967
+ *
968
+ * Creates a new opportunity. During the creation of an opportunity, an unique customer-readable `opportunity_number` will be generated.
969
+ * The `opportunity_number` can be used to universally identify an opportunity within epilot platform.
970
+ *
971
+ */
972
+ '$createOpportunity'(
973
+ parameters?: Parameters<Paths.$CreateOpportunity.HeaderParameters> | null,
974
+ data?: Paths.$CreateOpportunity.RequestBody,
975
+ config?: AxiosRequestConfig
976
+ ): OperationResponse<Paths.$CreateOpportunity.Responses.$201>
977
+ }
978
+
979
+ export interface PathsDictionary {
980
+ ['/v1/public/cart:checkout']: {
981
+ /**
982
+ * $checkoutCart - checkoutCart
983
+ *
984
+ * Checkouts a cart and executes the specified checkout `mode` process.
985
+ *
986
+ * A Checkout implicitly finalizes the provided cart (if not transient from a fast-checkout) and behaves in one of the following modes:
987
+ * - `create_order` (**default**): the payment happens at a later date or managed by 3rd-party CRM (SAP)
988
+ * - `create_invoice`: the payment happens on the online checkout (paypal, stripe, adyen)
989
+ * - `create_quote`: the checkout represents a price quote request
990
+ *
991
+ * Fast checkout is also supported, by passing the Cart contents directly.
992
+ * When a fast checkout is performed the cart is considered transient and there is no cart persistance.
993
+ *
994
+ * If the checkout `mode` is omitted, the `mode` will default to `create_order`.
995
+ *
996
+ */
997
+ 'post'(
998
+ parameters?: Parameters<Paths.$CheckoutCart.HeaderParameters> | null,
999
+ data?: Paths.$CheckoutCart.RequestBody,
1000
+ config?: AxiosRequestConfig
1001
+ ): OperationResponse<Paths.$CheckoutCart.Responses.$200>
1002
+ }
1003
+ ['/v1/public/catalog']: {
1004
+ /**
1005
+ * $searchCatalog - searchCatalog
1006
+ *
1007
+ * Provides a querying functionalities over products and prices of the Catalog for a given organization.
1008
+ */
1009
+ 'post'(
1010
+ parameters?: Parameters<Paths.$SearchCatalog.HeaderParameters> | null,
1011
+ data?: Paths.$SearchCatalog.RequestBody,
1012
+ config?: AxiosRequestConfig
1013
+ ): OperationResponse<Paths.$SearchCatalog.Responses.$200>
1014
+ }
1015
+ ['/v1/public/availability:check']: {
1016
+ /**
1017
+ * $availabilityCheck - availabilityCheck
1018
+ *
1019
+ * The availability check endpoint
1020
+ */
1021
+ 'post'(
1022
+ parameters?: Parameters<Paths.$AvailabilityCheck.HeaderParameters> | null,
1023
+ data?: Paths.$AvailabilityCheck.RequestBody,
1024
+ config?: AxiosRequestConfig
1025
+ ): OperationResponse<Paths.$AvailabilityCheck.Responses.$200>
1026
+ }
1027
+ ['/v1/public/opportunity']: {
1028
+ /**
1029
+ * $createOpportunity - createOpportunity
1030
+ *
1031
+ * Creates a new opportunity. During the creation of an opportunity, an unique customer-readable `opportunity_number` will be generated.
1032
+ * The `opportunity_number` can be used to universally identify an opportunity within epilot platform.
1033
+ *
1034
+ */
1035
+ 'post'(
1036
+ parameters?: Parameters<Paths.$CreateOpportunity.HeaderParameters> | null,
1037
+ data?: Paths.$CreateOpportunity.RequestBody,
1038
+ config?: AxiosRequestConfig
1039
+ ): OperationResponse<Paths.$CreateOpportunity.Responses.$201>
1040
+ }
1041
+ }
1042
+
1043
+ export type Client = OpenAPIClient<OperationMethods, PathsDictionary>