@epilot/pricing-client 3.26.0 → 3.27.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
@@ -215,7 +215,7 @@ declare namespace Components {
215
215
  /**
216
216
  * The unit gross amount value.
217
217
  */
218
- unit_amount_gross_decimal?: number;
218
+ unit_amount_gross_decimal?: string;
219
219
  /**
220
220
  * Total tax amount for this line item.
221
221
  */
@@ -608,18 +608,7 @@ declare namespace Components {
608
608
  * "q": "_id:1233432 OR _id:123432454 OR _id:23445433",
609
609
  * "sort": "description ASC",
610
610
  * "from": 0,
611
- * "size": 200,
612
- * "availability": {
613
- * "location": {
614
- * "postal_code": "57008,",
615
- * "city": "Cologne,",
616
- * "street": "Media Park,",
617
- * "street_number": "8a"
618
- * },
619
- * "available_date": {
620
- * "value": "2022-05-01"
621
- * }
622
- * }
611
+ * "size": 200
623
612
  * }
624
613
  */
625
614
  export interface CatalogSearch {
@@ -817,7 +806,7 @@ declare namespace Components {
817
806
  /**
818
807
  * The unit gross amount value.
819
808
  */
820
- unit_amount_gross_decimal?: number;
809
+ unit_amount_gross_decimal?: string;
821
810
  /**
822
811
  * Total tax amount for this line item.
823
812
  */
@@ -1094,6 +1083,10 @@ declare namespace Components {
1094
1083
  * Contains price item configurations, per price component, when the main price item is a [composite price](/api/pricing#tag/dynamic_price_schema).
1095
1084
  */
1096
1085
  item_components?: /* Represents a price input to the pricing library. */ PriceItemDto[];
1086
+ /**
1087
+ * The ids of the price components that should be selected for the price calculation.
1088
+ */
1089
+ selected_price_component_ids?: string[];
1097
1090
  _price?: /**
1098
1091
  * The price entity schema for dynamic pricing
1099
1092
  * example:
@@ -1402,6 +1395,14 @@ declare namespace Components {
1402
1395
  }
1403
1396
  export type IntegrationCredentialsResult = /* The basic auth credentials */ BasicAuthCredentials;
1404
1397
  export type IntegrationId = "enet" | "getag";
1398
+ /**
1399
+ * Describes how to compute the markup per period. Either `per_unit`, `tiered_volume` or `tiered_flatfee`.
1400
+ * - `per_unit` indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity
1401
+ * - `tiered_volume` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unitary price for all purchased units.
1402
+ * - `tiered_flatfee` While similar to tiered_volume, tiered flat fee charges for the same price (flat) for the entire range instead using the unit price to multiply the quantity.
1403
+ *
1404
+ */
1405
+ export type MarkupPricingModel = "per_unit" | "tiered_volume" | "tiered_flatfee";
1405
1406
  /**
1406
1407
  * A set of key-value pairs used to store meta data information about an entity.
1407
1408
  */
@@ -2038,6 +2039,20 @@ declare namespace Components {
2038
2039
  }
2039
2040
  export interface PriceGetAg {
2040
2041
  category: string;
2042
+ markup_pricing_model?: /**
2043
+ * Describes how to compute the markup per period. Either `per_unit`, `tiered_volume` or `tiered_flatfee`.
2044
+ * - `per_unit` indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity
2045
+ * - `tiered_volume` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unitary price for all purchased units.
2046
+ * - `tiered_flatfee` While similar to tiered_volume, tiered flat fee charges for the same price (flat) for the entire range instead using the unit price to multiply the quantity.
2047
+ *
2048
+ */
2049
+ MarkupPricingModel;
2050
+ type?: TypeGetAg;
2051
+ /**
2052
+ * Defines an array of tiers. Each tier has an upper bound, an unit amount and a flat fee.
2053
+ *
2054
+ */
2055
+ markup_tiers?: PriceTier[];
2041
2056
  markup_amount: number;
2042
2057
  markup_amount_decimal: string;
2043
2058
  markup_amount_net?: number;
@@ -2138,7 +2153,7 @@ declare namespace Components {
2138
2153
  /**
2139
2154
  * The unit gross amount value.
2140
2155
  */
2141
- unit_amount_gross_decimal?: number;
2156
+ unit_amount_gross_decimal?: string;
2142
2157
  /**
2143
2158
  * Total tax amount for this line item.
2144
2159
  */
@@ -2249,7 +2264,7 @@ declare namespace Components {
2249
2264
  * The price billing period.
2250
2265
  */
2251
2266
  billing_period?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly";
2252
- /**
2267
+ pricing_model: /**
2253
2268
  * Describes how to compute the price per period. Either `per_unit`, `tiered_graduated` or `tiered_volume`.
2254
2269
  * - `per_unit` indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity
2255
2270
  * - `tiered_graduated` indicates that the unit pricing will be computed using tiers attribute. The customer pays the price per unit in every range their purchase rises through.
@@ -2258,7 +2273,7 @@ declare namespace Components {
2258
2273
  * - `external_getag` indicates that the price is influenced by aquisition fees provided by GetAG.
2259
2274
  *
2260
2275
  */
2261
- pricing_model: "per_unit" | "tiered_graduated" | "tiered_volume" | "tiered_flatfee" | "external_getag";
2276
+ PricingModel;
2262
2277
  tiers_details?: TierDetails[];
2263
2278
  get_ag?: PriceGetAg;
2264
2279
  }
@@ -2727,6 +2742,16 @@ declare namespace Components {
2727
2742
  */
2728
2743
  Currency;
2729
2744
  }
2745
+ /**
2746
+ * Describes how to compute the price per period. Either `per_unit`, `tiered_graduated` or `tiered_volume`.
2747
+ * - `per_unit` indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity
2748
+ * - `tiered_graduated` indicates that the unit pricing will be computed using tiers attribute. The customer pays the price per unit in every range their purchase rises through.
2749
+ * - `tiered_volume` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.
2750
+ * - `tiered_flatfee` While similar to tiered_volume, tiered flat fee charges for the same price (flat) for the entire range instead using the unit price to multiply the quantity.
2751
+ * - `external_getag` indicates that the price is influenced by aquisition fees provided by GetAG.
2752
+ *
2753
+ */
2754
+ export type PricingModel = "per_unit" | "tiered_graduated" | "tiered_volume" | "tiered_flatfee" | "external_getag";
2730
2755
  /**
2731
2756
  * The product entity
2732
2757
  * example:
@@ -3204,6 +3229,7 @@ declare namespace Components {
3204
3229
  recurrencesByTax?: (/* An amount associated with a specific recurrence. */ RecurrenceAmountWithTax)[];
3205
3230
  };
3206
3231
  }
3232
+ export type TypeGetAg = "base_price" | "work_price";
3207
3233
  /**
3208
3234
  * The availability rule error
3209
3235
  */
@@ -3372,18 +3398,7 @@ declare namespace Paths {
3372
3398
  * "q": "_id:1233432 OR _id:123432454 OR _id:23445433",
3373
3399
  * "sort": "description ASC",
3374
3400
  * "from": 0,
3375
- * "size": 200,
3376
- * "availability": {
3377
- * "location": {
3378
- * "postal_code": "57008,",
3379
- * "city": "Cologne,",
3380
- * "street": "Media Park,",
3381
- * "street_number": "8a"
3382
- * },
3383
- * "available_date": {
3384
- * "value": "2022-05-01"
3385
- * }
3386
- * }
3401
+ * "size": 200
3387
3402
  * }
3388
3403
  */
3389
3404
  Components.Schemas.CatalogSearch;
@@ -3425,7 +3440,7 @@ declare namespace Paths {
3425
3440
  }
3426
3441
  namespace $SearchCatalog {
3427
3442
  export interface HeaderParameters {
3428
- "X-Ivy-Org-ID": Parameters.XIvyOrgID;
3443
+ "X-Ivy-Org-ID"?: Parameters.XIvyOrgID;
3429
3444
  Authorization?: Parameters.Authorization;
3430
3445
  }
3431
3446
  namespace Parameters {
@@ -3439,18 +3454,7 @@ declare namespace Paths {
3439
3454
  * "q": "_id:1233432 OR _id:123432454 OR _id:23445433",
3440
3455
  * "sort": "description ASC",
3441
3456
  * "from": 0,
3442
- * "size": 200,
3443
- * "availability": {
3444
- * "location": {
3445
- * "postal_code": "57008,",
3446
- * "city": "Cologne,",
3447
- * "street": "Media Park,",
3448
- * "street_number": "8a"
3449
- * },
3450
- * "available_date": {
3451
- * "value": "2022-05-01"
3452
- * }
3453
- * }
3457
+ * "size": 200
3454
3458
  * }
3455
3459
  */
3456
3460
  Components.Schemas.CatalogSearch;
package/dist/openapi.json CHANGED
@@ -495,7 +495,12 @@
495
495
  "description": "Checkouts a cart and executes the specified checkout `mode` process.\n\nA Checkout implicitly finalizes the provided cart (if not transient from a fast-checkout) and behaves in one of the following modes:\n- `create_order` (**default**): the payment happens at a later date or managed by 3rd-party CRM (SAP)\n- `create_invoice`: the payment happens on the online checkout (paypal, stripe, adyen)\n- `create_quote`: the checkout represents a price quote request\n\nFast checkout is also supported, by passing the Cart contents directly.\nWhen a fast checkout is performed the cart is considered transient and there is no cart persistance.\n\nIf the checkout `mode` is omitted, the `mode` will default to `create_order`.\n",
496
496
  "operationId": "$checkoutCart",
497
497
  "summary": "checkoutCart",
498
- "security": [],
498
+ "security": [
499
+ {},
500
+ {
501
+ "EpilotPublicAuth": []
502
+ }
503
+ ],
499
504
  "tags": [
500
505
  "Cart API"
501
506
  ],
@@ -559,7 +564,12 @@
559
564
  "description": "Provides a querying functionalities over products and prices of the Catalog for a given organization.",
560
565
  "operationId": "$searchCatalog",
561
566
  "summary": "searchCatalog",
562
- "security": [],
567
+ "security": [
568
+ {},
569
+ {
570
+ "EpilotPublicAuth": []
571
+ }
572
+ ],
563
573
  "tags": [
564
574
  "Catalog API"
565
575
  ],
@@ -568,10 +578,10 @@
568
578
  "in": "header",
569
579
  "name": "X-Ivy-Org-ID",
570
580
  "description": "The target Organization Id represented by the caller",
581
+ "example": 739224,
571
582
  "schema": {
572
583
  "type": "string"
573
- },
574
- "required": true
584
+ }
575
585
  },
576
586
  {
577
587
  "in": "header",
@@ -663,7 +673,12 @@
663
673
  "description": "The availability check endpoint",
664
674
  "operationId": "$availabilityCheck",
665
675
  "summary": "availabilityCheck",
666
- "security": [],
676
+ "security": [
677
+ {},
678
+ {
679
+ "EpilotPublicAuth": []
680
+ }
681
+ ],
667
682
  "tags": [
668
683
  "Availability API"
669
684
  ],
@@ -859,7 +874,12 @@
859
874
  "post": {
860
875
  "description": "Returns the list of providers available based on a given location",
861
876
  "operationId": "$searchProviders",
862
- "security": [],
877
+ "security": [
878
+ {},
879
+ {
880
+ "EpilotPublicAuth": []
881
+ }
882
+ ],
863
883
  "parameters": [
864
884
  {
865
885
  "in": "header",
@@ -967,7 +987,12 @@
967
987
  "post": {
968
988
  "description": "Returns the list of streets available for a given postal code and city",
969
989
  "operationId": "$searchStreets",
970
- "security": [],
990
+ "security": [
991
+ {},
992
+ {
993
+ "EpilotPublicAuth": []
994
+ }
995
+ ],
971
996
  "parameters": [
972
997
  {
973
998
  "in": "header",
@@ -1062,7 +1087,12 @@
1062
1087
  "post": {
1063
1088
  "description": "Returns the price for a given product type based on location and consumption",
1064
1089
  "operationId": "$computePrice",
1065
- "security": [],
1090
+ "security": [
1091
+ {},
1092
+ {
1093
+ "EpilotPublicAuth": []
1094
+ }
1095
+ ],
1066
1096
  "parameters": [
1067
1097
  {
1068
1098
  "in": "header",
@@ -1330,7 +1360,12 @@
1330
1360
  "description": "This API is Deprecated. Please use the Entity API or Submission API to create opportunities.\n\nEnables the creation of a new opportunity. During the creation of an opportunity, an unique customer-readable `opportunity_number` will be generated.\nThe `opportunity_number` can be used to universally identify an opportunity within epilot platform.\n",
1331
1361
  "operationId": "$createOpportunity",
1332
1362
  "summary": "createOpportunity",
1333
- "security": [],
1363
+ "security": [
1364
+ {},
1365
+ {
1366
+ "EpilotPublicAuth": []
1367
+ }
1368
+ ],
1334
1369
  "tags": [
1335
1370
  "Deprecated"
1336
1371
  ],
@@ -1422,6 +1457,12 @@
1422
1457
  "type": "http",
1423
1458
  "scheme": "bearer",
1424
1459
  "description": "Epilot Bearer Token"
1460
+ },
1461
+ "EpilotPublicAuth": {
1462
+ "type": "http",
1463
+ "scheme": "bearer",
1464
+ "description": "Epilot Public Access Bearer Token",
1465
+ "bearerFormat": "JWT"
1425
1466
  }
1426
1467
  },
1427
1468
  "schemas": {
@@ -2499,18 +2540,7 @@
2499
2540
  "q": "_id:1233432 OR _id:123432454 OR _id:23445433",
2500
2541
  "sort": "description ASC",
2501
2542
  "from": 0,
2502
- "size": 200,
2503
- "availability": {
2504
- "location": {
2505
- "postal_code": "57008,",
2506
- "city": "Cologne,",
2507
- "street": "Media Park,",
2508
- "street_number": "8a"
2509
- },
2510
- "available_date": {
2511
- "value": "2022-05-01"
2512
- }
2513
- }
2543
+ "size": 200
2514
2544
  },
2515
2545
  "required": [
2516
2546
  "q"
@@ -3294,6 +3324,14 @@
3294
3324
  "$ref": "#/components/schemas/PriceItemDto"
3295
3325
  }
3296
3326
  },
3327
+ "selected_price_component_ids": {
3328
+ "type": "array",
3329
+ "description": "The ids of the price components that should be selected for the price calculation.",
3330
+ "items": {
3331
+ "type": "string",
3332
+ "description": "The id of the price component"
3333
+ }
3334
+ },
3297
3335
  "_price": {
3298
3336
  "$ref": "#/components/schemas/CompositePrice"
3299
3337
  }
@@ -3602,7 +3640,7 @@
3602
3640
  "readOnly": true
3603
3641
  },
3604
3642
  "unit_amount_gross_decimal": {
3605
- "type": "integer",
3643
+ "type": "string",
3606
3644
  "description": "The unit gross amount value.",
3607
3645
  "readOnly": true
3608
3646
  },
@@ -3752,15 +3790,7 @@
3752
3790
  ]
3753
3791
  },
3754
3792
  "pricing_model": {
3755
- "type": "string",
3756
- "description": "Describes how to compute the price per period. Either `per_unit`, `tiered_graduated` or `tiered_volume`.\n- `per_unit` indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity\n- `tiered_graduated` indicates that the unit pricing will be computed using tiers attribute. The customer pays the price per unit in every range their purchase rises through.\n- `tiered_volume` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.\n- `tiered_flatfee` While similar to tiered_volume, tiered flat fee charges for the same price (flat) for the entire range instead using the unit price to multiply the quantity.\n- `external_getag` indicates that the price is influenced by aquisition fees provided by GetAG.\n",
3757
- "enum": [
3758
- "per_unit",
3759
- "tiered_graduated",
3760
- "tiered_volume",
3761
- "tiered_flatfee",
3762
- "external_getag"
3763
- ]
3793
+ "$ref": "#/components/schemas/PricingModel"
3764
3794
  },
3765
3795
  "tiers_details": {
3766
3796
  "type": "array",
@@ -4512,12 +4542,52 @@
4512
4542
  "on_request"
4513
4543
  ]
4514
4544
  },
4545
+ "PricingModel": {
4546
+ "type": "string",
4547
+ "description": "Describes how to compute the price per period. Either `per_unit`, `tiered_graduated` or `tiered_volume`.\n- `per_unit` indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity\n- `tiered_graduated` indicates that the unit pricing will be computed using tiers attribute. The customer pays the price per unit in every range their purchase rises through.\n- `tiered_volume` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.\n- `tiered_flatfee` While similar to tiered_volume, tiered flat fee charges for the same price (flat) for the entire range instead using the unit price to multiply the quantity.\n- `external_getag` indicates that the price is influenced by aquisition fees provided by GetAG.\n",
4548
+ "enum": [
4549
+ "per_unit",
4550
+ "tiered_graduated",
4551
+ "tiered_volume",
4552
+ "tiered_flatfee",
4553
+ "external_getag"
4554
+ ]
4555
+ },
4556
+ "MarkupPricingModel": {
4557
+ "type": "string",
4558
+ "description": "Describes how to compute the markup per period. Either `per_unit`, `tiered_volume` or `tiered_flatfee`.\n- `per_unit` indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity\n- `tiered_volume` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unitary price for all purchased units.\n- `tiered_flatfee` While similar to tiered_volume, tiered flat fee charges for the same price (flat) for the entire range instead using the unit price to multiply the quantity.\n",
4559
+ "enum": [
4560
+ "per_unit",
4561
+ "tiered_volume",
4562
+ "tiered_flatfee"
4563
+ ]
4564
+ },
4565
+ "TypeGetAg": {
4566
+ "type": "string",
4567
+ "enum": [
4568
+ "base_price",
4569
+ "work_price"
4570
+ ]
4571
+ },
4515
4572
  "PriceGetAg": {
4516
4573
  "type": "object",
4517
4574
  "properties": {
4518
4575
  "category": {
4519
4576
  "type": "string"
4520
4577
  },
4578
+ "markup_pricing_model": {
4579
+ "$ref": "#/components/schemas/MarkupPricingModel"
4580
+ },
4581
+ "type": {
4582
+ "$ref": "#/components/schemas/TypeGetAg"
4583
+ },
4584
+ "markup_tiers": {
4585
+ "description": "Defines an array of tiers. Each tier has an upper bound, an unit amount and a flat fee.\n",
4586
+ "type": "array",
4587
+ "items": {
4588
+ "$ref": "#/components/schemas/PriceTier"
4589
+ }
4590
+ },
4521
4591
  "markup_amount": {
4522
4592
  "type": "number"
4523
4593
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/pricing-client",
3
- "version": "3.26.0",
3
+ "version": "3.27.0",
4
4
  "description": "Client for epilot Pricing APIs",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",