@epilot/pricing-client 2.0.1 → 2.1.2
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/definition.js +1 -1
- package/dist/openapi.d.ts +290 -78
- package/dist/openapi.json +187 -44
- package/package.json +2 -2
package/dist/openapi.d.ts
CHANGED
|
@@ -21,47 +21,47 @@ declare namespace Components {
|
|
|
21
21
|
/**
|
|
22
22
|
* The first line of the address. Typically the street address or PO Box number.
|
|
23
23
|
*/
|
|
24
|
-
street?: string;
|
|
24
|
+
street?: string | null;
|
|
25
25
|
/**
|
|
26
26
|
* The second line of the address. Typically the number of the apartment, suite, or unit.
|
|
27
27
|
*/
|
|
28
|
-
street_number?: string;
|
|
28
|
+
street_number?: string | null;
|
|
29
29
|
/**
|
|
30
30
|
* The postal code for the address.
|
|
31
31
|
*/
|
|
32
|
-
postal_code?: string;
|
|
32
|
+
postal_code?: string | null;
|
|
33
33
|
/**
|
|
34
34
|
* The name of the city, district, village, or town.
|
|
35
35
|
*/
|
|
36
|
-
city?: string;
|
|
36
|
+
city?: string | null;
|
|
37
37
|
/**
|
|
38
38
|
* The two-letter code for the country of the address.
|
|
39
39
|
*/
|
|
40
|
-
country?: string;
|
|
40
|
+
country?: string | null;
|
|
41
41
|
/**
|
|
42
42
|
* An additional description for the address
|
|
43
43
|
*/
|
|
44
|
-
additional_info?: string;
|
|
44
|
+
additional_info?: string | null;
|
|
45
45
|
/**
|
|
46
46
|
* the company name, usually used as extra delivery instructions
|
|
47
47
|
*/
|
|
48
|
-
company_name?: string;
|
|
48
|
+
company_name?: string | null;
|
|
49
49
|
/**
|
|
50
50
|
* the first name of the recipient, usually used as extra delivery instructions
|
|
51
51
|
*/
|
|
52
|
-
first_name?: string;
|
|
52
|
+
first_name?: string | null;
|
|
53
53
|
/**
|
|
54
54
|
* the last name of the recipient, usually used as extra delivery instructions
|
|
55
55
|
*/
|
|
56
|
-
last_name?: string;
|
|
56
|
+
last_name?: string | null;
|
|
57
57
|
/**
|
|
58
58
|
* the salutation of the recipient, usually used as extra delivery instructions
|
|
59
59
|
*/
|
|
60
|
-
salutation?: string;
|
|
60
|
+
salutation?: string | null;
|
|
61
61
|
/**
|
|
62
62
|
* the title of the recipient, usually used as extra delivery instructions
|
|
63
63
|
*/
|
|
64
|
-
title?: string;
|
|
64
|
+
title?: string | null;
|
|
65
65
|
}
|
|
66
66
|
/**
|
|
67
67
|
* Availability check request payload
|
|
@@ -353,6 +353,240 @@ declare namespace Components {
|
|
|
353
353
|
* The checkout mode for the cart checkout.
|
|
354
354
|
*/
|
|
355
355
|
export type CheckoutMode = "create_order" | "create_invoice" | "create_quote";
|
|
356
|
+
/**
|
|
357
|
+
* The price entity schema for dynamic pricing
|
|
358
|
+
* example:
|
|
359
|
+
* {
|
|
360
|
+
* "$ref": "#/components/examples/composite-price"
|
|
361
|
+
* }
|
|
362
|
+
*/
|
|
363
|
+
export interface CompositePrice {
|
|
364
|
+
[name: string]: any;
|
|
365
|
+
/**
|
|
366
|
+
* Whether the price can be used for new purchases.
|
|
367
|
+
*/
|
|
368
|
+
active?: boolean;
|
|
369
|
+
/**
|
|
370
|
+
* A brief description of the price.
|
|
371
|
+
*/
|
|
372
|
+
description?: string;
|
|
373
|
+
/**
|
|
374
|
+
* A set of [price](/api/pricing#tag/simple_price_schema) components that define the composite price.
|
|
375
|
+
*/
|
|
376
|
+
price_components?: {
|
|
377
|
+
$relation?: PriceComponentRelation[];
|
|
378
|
+
};
|
|
379
|
+
/**
|
|
380
|
+
* Three-letter ISO currency code, in lowercase.
|
|
381
|
+
*/
|
|
382
|
+
unit_amount_currency?: /* Three-letter ISO currency code, in lowercase. */ /**
|
|
383
|
+
* Three-letter ISO currency code, in lowercase. Must be a supported currency.
|
|
384
|
+
* ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
|
|
385
|
+
*
|
|
386
|
+
* example:
|
|
387
|
+
* EUR
|
|
388
|
+
*/
|
|
389
|
+
Currency;
|
|
390
|
+
/**
|
|
391
|
+
* The price creation date
|
|
392
|
+
*/
|
|
393
|
+
_created_at?: string;
|
|
394
|
+
/**
|
|
395
|
+
* The price id
|
|
396
|
+
*/
|
|
397
|
+
_id?: string;
|
|
398
|
+
/**
|
|
399
|
+
* The price autogenerated title
|
|
400
|
+
*/
|
|
401
|
+
_title?: string;
|
|
402
|
+
/**
|
|
403
|
+
* The price last update date
|
|
404
|
+
*/
|
|
405
|
+
_updated_at?: string;
|
|
406
|
+
/**
|
|
407
|
+
* The organization id the price belongs to
|
|
408
|
+
*/
|
|
409
|
+
_org_id?: string;
|
|
410
|
+
/**
|
|
411
|
+
* An arbitrary set of tags attached to the composite price
|
|
412
|
+
*/
|
|
413
|
+
_tags?: string[];
|
|
414
|
+
}
|
|
415
|
+
/**
|
|
416
|
+
* Represents a composite price input to the pricing library.
|
|
417
|
+
* example:
|
|
418
|
+
* {
|
|
419
|
+
* "$ref": "#/components/examples/price-item"
|
|
420
|
+
* }
|
|
421
|
+
*/
|
|
422
|
+
export interface CompositePriceItem {
|
|
423
|
+
/**
|
|
424
|
+
* price item id
|
|
425
|
+
*/
|
|
426
|
+
id?: string;
|
|
427
|
+
metadata?: /* A set of key-value pairs used to store meta data information about an entity. */ MetaData;
|
|
428
|
+
/**
|
|
429
|
+
* The unit amount value
|
|
430
|
+
*/
|
|
431
|
+
unit_amount?: number;
|
|
432
|
+
/**
|
|
433
|
+
* Total before any (discounts or) taxes are applied.
|
|
434
|
+
*/
|
|
435
|
+
amount_subtotal?: number;
|
|
436
|
+
/**
|
|
437
|
+
* Net unit amount without taxes or discounts.
|
|
438
|
+
*/
|
|
439
|
+
unit_amount_net?: number;
|
|
440
|
+
/**
|
|
441
|
+
* The unit amount in cents to be charged, represented as a decimal string with at most 12 decimal places.
|
|
442
|
+
*/
|
|
443
|
+
unit_amount_decimal?: string;
|
|
444
|
+
/**
|
|
445
|
+
* Total after (discounts and) taxes.
|
|
446
|
+
*/
|
|
447
|
+
amount_total?: number;
|
|
448
|
+
currency?: /**
|
|
449
|
+
* Three-letter ISO currency code, in lowercase. Must be a supported currency.
|
|
450
|
+
* ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
|
|
451
|
+
*
|
|
452
|
+
* example:
|
|
453
|
+
* EUR
|
|
454
|
+
*/
|
|
455
|
+
Currency;
|
|
456
|
+
/**
|
|
457
|
+
* An arbitrary string attached to the price item. Often useful for displaying to users. Defaults to product name.
|
|
458
|
+
*/
|
|
459
|
+
description?: string;
|
|
460
|
+
/**
|
|
461
|
+
* The quantity of products being purchased.
|
|
462
|
+
*/
|
|
463
|
+
quantity?: number;
|
|
464
|
+
/**
|
|
465
|
+
* The id of the product.
|
|
466
|
+
*/
|
|
467
|
+
product_id?: string;
|
|
468
|
+
/**
|
|
469
|
+
* The id of the price.
|
|
470
|
+
*/
|
|
471
|
+
price_id?: string;
|
|
472
|
+
/**
|
|
473
|
+
* The flag for prices that contain price components.
|
|
474
|
+
*/
|
|
475
|
+
is_composite_price?: boolean;
|
|
476
|
+
/**
|
|
477
|
+
* The price snapshot data.
|
|
478
|
+
*/
|
|
479
|
+
_price?: /* The price snapshot data. */ /**
|
|
480
|
+
* The price entity schema for simple pricing
|
|
481
|
+
* example:
|
|
482
|
+
* {
|
|
483
|
+
* "$ref": "#/components/examples/price"
|
|
484
|
+
* }
|
|
485
|
+
*/
|
|
486
|
+
Price | /**
|
|
487
|
+
* The price entity schema for dynamic pricing
|
|
488
|
+
* example:
|
|
489
|
+
* {
|
|
490
|
+
* "$ref": "#/components/examples/composite-price"
|
|
491
|
+
* }
|
|
492
|
+
*/
|
|
493
|
+
CompositePrice;
|
|
494
|
+
/**
|
|
495
|
+
* The product snapshot data.
|
|
496
|
+
*/
|
|
497
|
+
_product?: /* The product snapshot data. */ /**
|
|
498
|
+
* The product entity
|
|
499
|
+
* example:
|
|
500
|
+
* {
|
|
501
|
+
* "$ref": "#/components/examples/product"
|
|
502
|
+
* }
|
|
503
|
+
*/
|
|
504
|
+
Product;
|
|
505
|
+
/**
|
|
506
|
+
* The taxes applied to the price item.
|
|
507
|
+
*/
|
|
508
|
+
taxes?: (/* A tax amount associated with a specific tax rate. */ TaxAmount)[];
|
|
509
|
+
/**
|
|
510
|
+
* The sum of amounts of the price items by recurrence.
|
|
511
|
+
*/
|
|
512
|
+
recurrences?: (/* An amount associated with a specific recurrence. */ RecurrenceAmount)[];
|
|
513
|
+
/**
|
|
514
|
+
* Contains price item configurations, per price component, when the main price item is a [composite price](/api/pricing#tag/dynamic_price_schema).
|
|
515
|
+
*/
|
|
516
|
+
item_components?: /**
|
|
517
|
+
* Represents a price item
|
|
518
|
+
* example:
|
|
519
|
+
* {
|
|
520
|
+
* "$ref": "#/components/examples/price-item"
|
|
521
|
+
* }
|
|
522
|
+
*/
|
|
523
|
+
PriceItem[];
|
|
524
|
+
}
|
|
525
|
+
/**
|
|
526
|
+
* Represents a composite price input to the pricing library.
|
|
527
|
+
*/
|
|
528
|
+
export interface CompositePriceItemDto {
|
|
529
|
+
metadata?: /* A set of key-value pairs used to store meta data information about an entity. */ MetaData;
|
|
530
|
+
/**
|
|
531
|
+
* The quantity of products being purchased.
|
|
532
|
+
*/
|
|
533
|
+
quantity?: number;
|
|
534
|
+
/**
|
|
535
|
+
* An arbitrary string attached to the price item. Often useful for displaying to users. Defaults to product name.
|
|
536
|
+
*/
|
|
537
|
+
description?: string;
|
|
538
|
+
/**
|
|
539
|
+
* The id of the product.
|
|
540
|
+
*/
|
|
541
|
+
product_id?: string;
|
|
542
|
+
/**
|
|
543
|
+
* The id of the price.
|
|
544
|
+
*/
|
|
545
|
+
price_id?: string;
|
|
546
|
+
/**
|
|
547
|
+
* The unit amount value
|
|
548
|
+
*/
|
|
549
|
+
unit_amount?: number;
|
|
550
|
+
/**
|
|
551
|
+
* The unit amount in cents to be charged, represented as a decimal string with at most 12 decimal places.
|
|
552
|
+
*/
|
|
553
|
+
unit_amount_decimal?: string;
|
|
554
|
+
/**
|
|
555
|
+
* The taxes applied to the price item.
|
|
556
|
+
*/
|
|
557
|
+
taxes?: (/* A valid tax rate from a client. */ TaxAmountDto)[];
|
|
558
|
+
/**
|
|
559
|
+
* The taxes applied to the price item.
|
|
560
|
+
*/
|
|
561
|
+
recurrences?: (/* An amount associated with a specific recurrence. */ RecurrenceAmountDto)[];
|
|
562
|
+
_price?: /**
|
|
563
|
+
* The price entity schema for simple pricing
|
|
564
|
+
* example:
|
|
565
|
+
* {
|
|
566
|
+
* "$ref": "#/components/examples/price"
|
|
567
|
+
* }
|
|
568
|
+
*/
|
|
569
|
+
Price | /**
|
|
570
|
+
* The price entity schema for dynamic pricing
|
|
571
|
+
* example:
|
|
572
|
+
* {
|
|
573
|
+
* "$ref": "#/components/examples/composite-price"
|
|
574
|
+
* }
|
|
575
|
+
*/
|
|
576
|
+
CompositePrice;
|
|
577
|
+
_product?: /**
|
|
578
|
+
* The product entity
|
|
579
|
+
* example:
|
|
580
|
+
* {
|
|
581
|
+
* "$ref": "#/components/examples/product"
|
|
582
|
+
* }
|
|
583
|
+
*/
|
|
584
|
+
Product;
|
|
585
|
+
/**
|
|
586
|
+
* Contains price item configurations, per price component, when the main price item is a [composite price](/api/pricing#tag/dynamic_price_schema).
|
|
587
|
+
*/
|
|
588
|
+
item_components?: /* Represents a valid price item from a client. */ PriceItemDto[];
|
|
589
|
+
}
|
|
356
590
|
/**
|
|
357
591
|
* Three-letter ISO currency code, in lowercase. Must be a supported currency.
|
|
358
592
|
* ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
|
|
@@ -971,54 +1205,6 @@ declare namespace Components {
|
|
|
971
1205
|
*/
|
|
972
1206
|
_tags?: string[];
|
|
973
1207
|
}
|
|
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
1208
|
export interface PriceComponentRelation {
|
|
1023
1209
|
/**
|
|
1024
1210
|
* The id of the price component
|
|
@@ -1030,8 +1216,16 @@ declare namespace Components {
|
|
|
1030
1216
|
*
|
|
1031
1217
|
*/
|
|
1032
1218
|
quantity?: number;
|
|
1219
|
+
item?: /**
|
|
1220
|
+
* The price entity schema for simple pricing
|
|
1221
|
+
* example:
|
|
1222
|
+
* {
|
|
1223
|
+
* "$ref": "#/components/examples/price"
|
|
1224
|
+
* }
|
|
1225
|
+
*/
|
|
1226
|
+
Price;
|
|
1033
1227
|
/**
|
|
1034
|
-
* An arbitrary set of tags attached to the
|
|
1228
|
+
* An arbitrary set of tags attached to the composite price - component relation
|
|
1035
1229
|
*/
|
|
1036
1230
|
_tags?: string[];
|
|
1037
1231
|
}
|
|
@@ -1039,7 +1233,7 @@ declare namespace Components {
|
|
|
1039
1233
|
* Represents a price item
|
|
1040
1234
|
* example:
|
|
1041
1235
|
* {
|
|
1042
|
-
* "$ref": "#/components/examples/
|
|
1236
|
+
* "$ref": "#/components/examples/price-item"
|
|
1043
1237
|
* }
|
|
1044
1238
|
*/
|
|
1045
1239
|
export interface PriceItem {
|
|
@@ -1048,10 +1242,6 @@ declare namespace Components {
|
|
|
1048
1242
|
*/
|
|
1049
1243
|
id?: string;
|
|
1050
1244
|
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[];
|
|
1055
1245
|
/**
|
|
1056
1246
|
* The unit amount value
|
|
1057
1247
|
*/
|
|
@@ -1064,6 +1254,10 @@ declare namespace Components {
|
|
|
1064
1254
|
* Net unit amount without taxes or discounts.
|
|
1065
1255
|
*/
|
|
1066
1256
|
unit_amount_net?: number;
|
|
1257
|
+
/**
|
|
1258
|
+
* The unit amount in cents to be charged, represented as a decimal string with at most 12 decimal places.
|
|
1259
|
+
*/
|
|
1260
|
+
unit_amount_decimal?: string;
|
|
1067
1261
|
/**
|
|
1068
1262
|
* Total after (discounts and) taxes.
|
|
1069
1263
|
*/
|
|
@@ -1092,6 +1286,10 @@ declare namespace Components {
|
|
|
1092
1286
|
* The id of the price.
|
|
1093
1287
|
*/
|
|
1094
1288
|
price_id?: string;
|
|
1289
|
+
/**
|
|
1290
|
+
* The flag for prices that contain price components.
|
|
1291
|
+
*/
|
|
1292
|
+
is_composite_price?: boolean;
|
|
1095
1293
|
/**
|
|
1096
1294
|
* The price snapshot data.
|
|
1097
1295
|
*/
|
|
@@ -1102,7 +1300,14 @@ declare namespace Components {
|
|
|
1102
1300
|
* "$ref": "#/components/examples/price"
|
|
1103
1301
|
* }
|
|
1104
1302
|
*/
|
|
1105
|
-
Price
|
|
1303
|
+
Price | /**
|
|
1304
|
+
* The price entity schema for dynamic pricing
|
|
1305
|
+
* example:
|
|
1306
|
+
* {
|
|
1307
|
+
* "$ref": "#/components/examples/composite-price"
|
|
1308
|
+
* }
|
|
1309
|
+
*/
|
|
1310
|
+
CompositePrice;
|
|
1106
1311
|
/**
|
|
1107
1312
|
* The product snapshot data.
|
|
1108
1313
|
*/
|
|
@@ -1123,14 +1328,6 @@ declare namespace Components {
|
|
|
1123
1328
|
*/
|
|
1124
1329
|
recurrences?: (/* An amount associated with a specific recurrence. */ RecurrenceAmount)[];
|
|
1125
1330
|
}
|
|
1126
|
-
export type PriceItemComponent = /**
|
|
1127
|
-
* Represents a price item
|
|
1128
|
-
* example:
|
|
1129
|
-
* {
|
|
1130
|
-
* "$ref": "#/components/examples/order-with-simple-prices"
|
|
1131
|
-
* }
|
|
1132
|
-
*/
|
|
1133
|
-
PriceItem;
|
|
1134
1331
|
/**
|
|
1135
1332
|
* Represents a valid price item from a client.
|
|
1136
1333
|
*/
|
|
@@ -1152,6 +1349,14 @@ declare namespace Components {
|
|
|
1152
1349
|
* The id of the price.
|
|
1153
1350
|
*/
|
|
1154
1351
|
price_id?: string;
|
|
1352
|
+
/**
|
|
1353
|
+
* The unit amount value
|
|
1354
|
+
*/
|
|
1355
|
+
unit_amount?: number;
|
|
1356
|
+
/**
|
|
1357
|
+
* The unit amount in cents to be charged, represented as a decimal string with at most 12 decimal places.
|
|
1358
|
+
*/
|
|
1359
|
+
unit_amount_decimal?: string;
|
|
1155
1360
|
/**
|
|
1156
1361
|
* The taxes applied to the price item.
|
|
1157
1362
|
*/
|
|
@@ -1187,10 +1392,17 @@ declare namespace Components {
|
|
|
1187
1392
|
* Represents a price item
|
|
1188
1393
|
* example:
|
|
1189
1394
|
* {
|
|
1190
|
-
* "$ref": "#/components/examples/
|
|
1395
|
+
* "$ref": "#/components/examples/price-item"
|
|
1191
1396
|
* }
|
|
1192
1397
|
*/
|
|
1193
|
-
PriceItem
|
|
1398
|
+
PriceItem | /**
|
|
1399
|
+
* Represents a composite price input to the pricing library.
|
|
1400
|
+
* example:
|
|
1401
|
+
* {
|
|
1402
|
+
* "$ref": "#/components/examples/price-item"
|
|
1403
|
+
* }
|
|
1404
|
+
*/
|
|
1405
|
+
CompositePriceItem)[];
|
|
1194
1406
|
/**
|
|
1195
1407
|
* A valid set of product prices, quantities, (discounts) and taxes from a client.
|
|
1196
1408
|
*/
|
|
@@ -1203,7 +1415,7 @@ declare namespace Components {
|
|
|
1203
1415
|
* Represents a price item
|
|
1204
1416
|
* example:
|
|
1205
1417
|
* {
|
|
1206
|
-
* "$ref": "#/components/examples/
|
|
1418
|
+
* "$ref": "#/components/examples/price-item"
|
|
1207
1419
|
* }
|
|
1208
1420
|
*/
|
|
1209
1421
|
PriceItem)[];
|
|
@@ -1272,7 +1484,7 @@ declare namespace Components {
|
|
|
1272
1484
|
$relation?: EntityRelation[];
|
|
1273
1485
|
};
|
|
1274
1486
|
/**
|
|
1275
|
-
* A set of [prices](/api/pricing#tag/simple_price_schema) or [
|
|
1487
|
+
* A set of [prices](/api/pricing#tag/simple_price_schema) or [composite prices](/api/pricing#tag/dynamic_price_schema) for the current product.
|
|
1276
1488
|
*/
|
|
1277
1489
|
price_options?: {
|
|
1278
1490
|
$relation?: EntityRelation[];
|