@epilot/pricing-client 3.26.1 → 3.27.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/openapi.d.ts CHANGED
@@ -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 {
@@ -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
  */
@@ -1995,6 +1996,7 @@ declare namespace Components {
1995
1996
  * The unit of measurement used for display purposes and possibly for calculations when the price is variable.
1996
1997
  */
1997
1998
  unit?: /* The unit of measurement used for display purposes and possibly for calculations when the price is variable. */ ("kw" | "kwh" | "m" | "m2" | "l" | "cubic-meter" | "cubic-meter-h" | "ls" | "a" | "kva" | "w" | "wp" | "kwp") | string;
1999
+ get_ag?: PriceGetAg;
1998
2000
  /**
1999
2001
  * The price creation date
2000
2002
  */
@@ -2038,6 +2040,20 @@ declare namespace Components {
2038
2040
  }
2039
2041
  export interface PriceGetAg {
2040
2042
  category: string;
2043
+ markup_pricing_model?: /**
2044
+ * Describes how to compute the markup per period. Either `per_unit`, `tiered_volume` or `tiered_flatfee`.
2045
+ * - `per_unit` indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity
2046
+ * - `tiered_volume` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unitary price for all purchased units.
2047
+ * - `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.
2048
+ *
2049
+ */
2050
+ MarkupPricingModel;
2051
+ type?: TypeGetAg;
2052
+ /**
2053
+ * Defines an array of tiers. Each tier has an upper bound, an unit amount and a flat fee.
2054
+ *
2055
+ */
2056
+ markup_tiers?: PriceTier[];
2041
2057
  markup_amount: number;
2042
2058
  markup_amount_decimal: string;
2043
2059
  markup_amount_net?: number;
@@ -2249,7 +2265,7 @@ declare namespace Components {
2249
2265
  * The price billing period.
2250
2266
  */
2251
2267
  billing_period?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly";
2252
- /**
2268
+ pricing_model: /**
2253
2269
  * Describes how to compute the price per period. Either `per_unit`, `tiered_graduated` or `tiered_volume`.
2254
2270
  * - `per_unit` indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity
2255
2271
  * - `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 +2274,7 @@ declare namespace Components {
2258
2274
  * - `external_getag` indicates that the price is influenced by aquisition fees provided by GetAG.
2259
2275
  *
2260
2276
  */
2261
- pricing_model: "per_unit" | "tiered_graduated" | "tiered_volume" | "tiered_flatfee" | "external_getag";
2277
+ PricingModel;
2262
2278
  tiers_details?: TierDetails[];
2263
2279
  get_ag?: PriceGetAg;
2264
2280
  }
@@ -2609,6 +2625,7 @@ declare namespace Components {
2609
2625
  * The unit of measurement used for display purposes and possibly for calculations when the price is variable.
2610
2626
  */
2611
2627
  unit?: /* The unit of measurement used for display purposes and possibly for calculations when the price is variable. */ ("kw" | "kwh" | "m" | "m2" | "l" | "cubic-meter" | "cubic-meter-h" | "ls" | "a" | "kva" | "w" | "wp" | "kwp") | string;
2628
+ get_ag?: PriceGetAg;
2612
2629
  /**
2613
2630
  * The price creation date
2614
2631
  */
@@ -2727,6 +2744,16 @@ declare namespace Components {
2727
2744
  */
2728
2745
  Currency;
2729
2746
  }
2747
+ /**
2748
+ * Describes how to compute the price per period. Either `per_unit`, `tiered_graduated` or `tiered_volume`.
2749
+ * - `per_unit` indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity
2750
+ * - `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.
2751
+ * - `tiered_volume` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.
2752
+ * - `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.
2753
+ * - `external_getag` indicates that the price is influenced by aquisition fees provided by GetAG.
2754
+ *
2755
+ */
2756
+ export type PricingModel = "per_unit" | "tiered_graduated" | "tiered_volume" | "tiered_flatfee" | "external_getag";
2730
2757
  /**
2731
2758
  * The product entity
2732
2759
  * example:
@@ -3204,6 +3231,7 @@ declare namespace Components {
3204
3231
  recurrencesByTax?: (/* An amount associated with a specific recurrence. */ RecurrenceAmountWithTax)[];
3205
3232
  };
3206
3233
  }
3234
+ export type TypeGetAg = "base_price" | "work_price";
3207
3235
  /**
3208
3236
  * The availability rule error
3209
3237
  */
@@ -3372,18 +3400,7 @@ declare namespace Paths {
3372
3400
  * "q": "_id:1233432 OR _id:123432454 OR _id:23445433",
3373
3401
  * "sort": "description ASC",
3374
3402
  * "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
- * }
3403
+ * "size": 200
3387
3404
  * }
3388
3405
  */
3389
3406
  Components.Schemas.CatalogSearch;
@@ -3425,7 +3442,7 @@ declare namespace Paths {
3425
3442
  }
3426
3443
  namespace $SearchCatalog {
3427
3444
  export interface HeaderParameters {
3428
- "X-Ivy-Org-ID": Parameters.XIvyOrgID;
3445
+ "X-Ivy-Org-ID"?: Parameters.XIvyOrgID;
3429
3446
  Authorization?: Parameters.Authorization;
3430
3447
  }
3431
3448
  namespace Parameters {
@@ -3439,18 +3456,7 @@ declare namespace Paths {
3439
3456
  * "q": "_id:1233432 OR _id:123432454 OR _id:23445433",
3440
3457
  * "sort": "description ASC",
3441
3458
  * "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
- * }
3459
+ * "size": 200
3454
3460
  * }
3455
3461
  */
3456
3462
  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": {
@@ -2194,6 +2235,9 @@
2194
2235
  }
2195
2236
  ]
2196
2237
  },
2238
+ "get_ag": {
2239
+ "$ref": "#/components/schemas/PriceGetAg"
2240
+ },
2197
2241
  "_created_at": {
2198
2242
  "description": "The price creation date",
2199
2243
  "type": "string"
@@ -2499,18 +2543,7 @@
2499
2543
  "q": "_id:1233432 OR _id:123432454 OR _id:23445433",
2500
2544
  "sort": "description ASC",
2501
2545
  "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
- }
2546
+ "size": 200
2514
2547
  },
2515
2548
  "required": [
2516
2549
  "q"
@@ -3294,6 +3327,14 @@
3294
3327
  "$ref": "#/components/schemas/PriceItemDto"
3295
3328
  }
3296
3329
  },
3330
+ "selected_price_component_ids": {
3331
+ "type": "array",
3332
+ "description": "The ids of the price components that should be selected for the price calculation.",
3333
+ "items": {
3334
+ "type": "string",
3335
+ "description": "The id of the price component"
3336
+ }
3337
+ },
3297
3338
  "_price": {
3298
3339
  "$ref": "#/components/schemas/CompositePrice"
3299
3340
  }
@@ -3752,15 +3793,7 @@
3752
3793
  ]
3753
3794
  },
3754
3795
  "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
- ]
3796
+ "$ref": "#/components/schemas/PricingModel"
3764
3797
  },
3765
3798
  "tiers_details": {
3766
3799
  "type": "array",
@@ -4512,12 +4545,52 @@
4512
4545
  "on_request"
4513
4546
  ]
4514
4547
  },
4548
+ "PricingModel": {
4549
+ "type": "string",
4550
+ "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",
4551
+ "enum": [
4552
+ "per_unit",
4553
+ "tiered_graduated",
4554
+ "tiered_volume",
4555
+ "tiered_flatfee",
4556
+ "external_getag"
4557
+ ]
4558
+ },
4559
+ "MarkupPricingModel": {
4560
+ "type": "string",
4561
+ "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",
4562
+ "enum": [
4563
+ "per_unit",
4564
+ "tiered_volume",
4565
+ "tiered_flatfee"
4566
+ ]
4567
+ },
4568
+ "TypeGetAg": {
4569
+ "type": "string",
4570
+ "enum": [
4571
+ "base_price",
4572
+ "work_price"
4573
+ ]
4574
+ },
4515
4575
  "PriceGetAg": {
4516
4576
  "type": "object",
4517
4577
  "properties": {
4518
4578
  "category": {
4519
4579
  "type": "string"
4520
4580
  },
4581
+ "markup_pricing_model": {
4582
+ "$ref": "#/components/schemas/MarkupPricingModel"
4583
+ },
4584
+ "type": {
4585
+ "$ref": "#/components/schemas/TypeGetAg"
4586
+ },
4587
+ "markup_tiers": {
4588
+ "description": "Defines an array of tiers. Each tier has an upper bound, an unit amount and a flat fee.\n",
4589
+ "type": "array",
4590
+ "items": {
4591
+ "$ref": "#/components/schemas/PriceTier"
4592
+ }
4593
+ },
4521
4594
  "markup_amount": {
4522
4595
  "type": "number"
4523
4596
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/pricing-client",
3
- "version": "3.26.1",
3
+ "version": "3.27.1",
4
4
  "description": "Client for epilot Pricing APIs",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",