@epilot/pricing-client 3.27.7 → 3.28.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
@@ -1204,6 +1204,7 @@ declare namespace Components {
1204
1204
  * The type of energy to compute the price
1205
1205
  */
1206
1206
  type: "power";
1207
+ meter_type?: /* The meter type for power */ PowerMeterType;
1207
1208
  }
1208
1209
  export interface ComputePriceResult {
1209
1210
  /**
@@ -1921,6 +1922,10 @@ declare namespace Components {
1921
1922
  [name: string]: any;
1922
1923
  };
1923
1924
  }
1925
+ /**
1926
+ * The meter type for power
1927
+ */
1928
+ export type PowerMeterType = "classic" | "smart" | "digital";
1924
1929
  /**
1925
1930
  * The price entity schema for simple pricing
1926
1931
  * example:
@@ -2129,6 +2134,7 @@ declare namespace Components {
2129
2134
  tariff_type?: TariffTypeGetAg;
2130
2135
  consumption_type?: ConsumptionTypeGetAg;
2131
2136
  concession_type?: /* The concession type for gas */ GasConcessionType;
2137
+ meter_type?: /* The meter type for power */ PowerMeterType;
2132
2138
  /**
2133
2139
  * Defines an array of tiers. Each tier has an upper bound, an unit amount and a flat fee.
2134
2140
  *
@@ -3390,6 +3396,15 @@ declare namespace Paths {
3390
3396
  export type $400 = Components.Schemas.Error;
3391
3397
  }
3392
3398
  }
3399
+ namespace $CalculatePricingDetails {
3400
+ export interface RequestBody {
3401
+ line_items?: /* A valid set of product prices, quantities, (discounts) and taxes from a client. */ Components.Schemas.PriceItemsDto;
3402
+ }
3403
+ namespace Responses {
3404
+ export type $200 = /* The result from the calculation of a set of price items. */ Components.Schemas.PricingDetails;
3405
+ export type $400 = Components.Schemas.Error;
3406
+ }
3407
+ }
3393
3408
  namespace $CheckoutCart {
3394
3409
  export interface HeaderParameters {
3395
3410
  "X-Ivy-Org-ID": Parameters.XIvyOrgID;
@@ -3421,33 +3436,6 @@ declare namespace Paths {
3421
3436
  export type $403 = Components.Schemas.Error;
3422
3437
  }
3423
3438
  }
3424
- namespace $CreateOpportunity {
3425
- export interface HeaderParameters {
3426
- "X-Ivy-Org-ID": Parameters.XIvyOrgID;
3427
- }
3428
- namespace Parameters {
3429
- export type XIvyOrgID = string;
3430
- }
3431
- export type RequestBody = /**
3432
- * The opportunity entity
3433
- * example:
3434
- * {
3435
- * "$ref": "#/components/examples/opportunity"
3436
- * }
3437
- */
3438
- Components.Schemas.Opportunity;
3439
- namespace Responses {
3440
- export type $201 = /**
3441
- * The opportunity entity
3442
- * example:
3443
- * {
3444
- * "$ref": "#/components/examples/opportunity"
3445
- * }
3446
- */
3447
- Components.Schemas.Opportunity;
3448
- export type $400 = Components.Schemas.Error;
3449
- }
3450
- }
3451
3439
  namespace $DeleteCredentials {
3452
3440
  namespace Parameters {
3453
3441
  export type IntegrationId = Components.Schemas.IntegrationId;
@@ -3665,6 +3653,16 @@ declare namespace Paths {
3665
3653
  }
3666
3654
 
3667
3655
  export interface OperationMethods {
3656
+ /**
3657
+ * $calculatePricingDetails - calculatePricingDetails
3658
+ *
3659
+ * Compute price
3660
+ */
3661
+ '$calculatePricingDetails'(
3662
+ parameters?: Parameters<UnknownParamsObject> | null,
3663
+ data?: Paths.$CalculatePricingDetails.RequestBody,
3664
+ config?: AxiosRequestConfig
3665
+ ): OperationResponse<Paths.$CalculatePricingDetails.Responses.$200>
3668
3666
  /**
3669
3667
  * createOrder - createOrder
3670
3668
  *
@@ -3806,23 +3804,21 @@ export interface OperationMethods {
3806
3804
  data?: any,
3807
3805
  config?: AxiosRequestConfig
3808
3806
  ): OperationResponse<Paths.$DeleteCredentials.Responses.$204>
3809
- /**
3810
- * $createOpportunity - createOpportunity
3811
- *
3812
- * This API is Deprecated. Please use the Entity API or Submission API to create opportunities.
3813
- *
3814
- * Enables the creation of a new opportunity. During the creation of an opportunity, an unique customer-readable `opportunity_number` will be generated.
3815
- * The `opportunity_number` can be used to universally identify an opportunity within epilot platform.
3816
- *
3817
- */
3818
- '$createOpportunity'(
3819
- parameters?: Parameters<Paths.$CreateOpportunity.HeaderParameters> | null,
3820
- data?: Paths.$CreateOpportunity.RequestBody,
3821
- config?: AxiosRequestConfig
3822
- ): OperationResponse<Paths.$CreateOpportunity.Responses.$201>
3823
3807
  }
3824
3808
 
3825
3809
  export interface PathsDictionary {
3810
+ ['/v1/pricing:compute']: {
3811
+ /**
3812
+ * $calculatePricingDetails - calculatePricingDetails
3813
+ *
3814
+ * Compute price
3815
+ */
3816
+ 'post'(
3817
+ parameters?: Parameters<UnknownParamsObject> | null,
3818
+ data?: Paths.$CalculatePricingDetails.RequestBody,
3819
+ config?: AxiosRequestConfig
3820
+ ): OperationResponse<Paths.$CalculatePricingDetails.Responses.$200>
3821
+ }
3826
3822
  ['/v1/order']: {
3827
3823
  /**
3828
3824
  * createOrder - createOrder
@@ -3990,22 +3986,6 @@ export interface PathsDictionary {
3990
3986
  config?: AxiosRequestConfig
3991
3987
  ): OperationResponse<Paths.$DeleteCredentials.Responses.$204>
3992
3988
  }
3993
- ['/v1/public/opportunity']: {
3994
- /**
3995
- * $createOpportunity - createOpportunity
3996
- *
3997
- * This API is Deprecated. Please use the Entity API or Submission API to create opportunities.
3998
- *
3999
- * Enables the creation of a new opportunity. During the creation of an opportunity, an unique customer-readable `opportunity_number` will be generated.
4000
- * The `opportunity_number` can be used to universally identify an opportunity within epilot platform.
4001
- *
4002
- */
4003
- 'post'(
4004
- parameters?: Parameters<Paths.$CreateOpportunity.HeaderParameters> | null,
4005
- data?: Paths.$CreateOpportunity.RequestBody,
4006
- config?: AxiosRequestConfig
4007
- ): OperationResponse<Paths.$CreateOpportunity.Responses.$201>
4008
- }
4009
3989
  }
4010
3990
 
4011
3991
  export type Client = OpenAPIClient<OperationMethods, PathsDictionary>
package/dist/openapi.json CHANGED
@@ -111,6 +111,82 @@
111
111
  }
112
112
  ],
113
113
  "paths": {
114
+ "/v1/pricing:compute": {
115
+ "post": {
116
+ "description": "Compute price",
117
+ "summary": "calculatePricingDetails",
118
+ "operationId": "$calculatePricingDetails",
119
+ "tags": [
120
+ "Order API"
121
+ ],
122
+ "requestBody": {
123
+ "required": false,
124
+ "content": {
125
+ "application/json": {
126
+ "schema": {
127
+ "properties": {
128
+ "line_items": {
129
+ "$ref": "#/components/schemas/PriceItemsDto"
130
+ }
131
+ }
132
+ },
133
+ "examples": {
134
+ "Compute price": {
135
+ "value": {
136
+ "line_items": [
137
+ {
138
+ "product_id": "c5695fb5-f02d-4e46-9fb2-a36dc4e9876f",
139
+ "price_id": "396cb5f3-ea0b-4629-99ca-303661de5a9b",
140
+ "quantity": 2
141
+ },
142
+ {
143
+ "product_id": "c5695fb5-f02d-4e46-9fb2-a36dc4e9876f",
144
+ "price_id": "2abe0c6f-63ef-417b-8c85-5546359382d9",
145
+ "quantity": 1,
146
+ "price_mappings": [
147
+ {
148
+ "price_id": "2abe0c6f-63ef-417b-8c85-5546359382d9",
149
+ "frequency_unit": "one_time",
150
+ "value": 2,
151
+ "name": "Estimated consumption",
152
+ "metadata": {
153
+ "journey_title": "P&G",
154
+ "step_name": "Number Inputs"
155
+ }
156
+ }
157
+ ]
158
+ }
159
+ ]
160
+ }
161
+ }
162
+ }
163
+ }
164
+ }
165
+ },
166
+ "responses": {
167
+ "200": {
168
+ "description": "Pricing details result",
169
+ "content": {
170
+ "application/json": {
171
+ "schema": {
172
+ "$ref": "#/components/schemas/PricingDetails"
173
+ }
174
+ }
175
+ }
176
+ },
177
+ "400": {
178
+ "description": "Invalid payload",
179
+ "content": {
180
+ "application/json": {
181
+ "schema": {
182
+ "$ref": "#/components/schemas/Error"
183
+ }
184
+ }
185
+ }
186
+ }
187
+ }
188
+ }
189
+ },
114
190
  "/v1/order": {
115
191
  "post": {
116
192
  "description": "Create an order",
@@ -1353,102 +1429,6 @@
1353
1429
  }
1354
1430
  }
1355
1431
  }
1356
- },
1357
- "/v1/public/opportunity": {
1358
- "post": {
1359
- "deprecated": true,
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",
1361
- "operationId": "$createOpportunity",
1362
- "summary": "createOpportunity",
1363
- "security": [
1364
- {},
1365
- {
1366
- "EpilotPublicAuth": []
1367
- }
1368
- ],
1369
- "tags": [
1370
- "Deprecated"
1371
- ],
1372
- "parameters": [
1373
- {
1374
- "in": "header",
1375
- "name": "X-Ivy-Org-ID",
1376
- "description": "The target Organization Id represented by the caller",
1377
- "schema": {
1378
- "type": "string"
1379
- },
1380
- "required": true
1381
- }
1382
- ],
1383
- "requestBody": {
1384
- "required": true,
1385
- "content": {
1386
- "application/json": {
1387
- "schema": {
1388
- "$ref": "#/components/schemas/Opportunity"
1389
- },
1390
- "examples": {
1391
- "Opportunity containing one Order": {
1392
- "value": {
1393
- "billing_address": {
1394
- "street": "sdf",
1395
- "street_number": "1",
1396
- "city": "Berlin",
1397
- "postal_code": "12045",
1398
- "country": "de",
1399
- "additional_info": "adasd"
1400
- },
1401
- "delivery_address": {
1402
- "street": "sdf",
1403
- "street_number": "1",
1404
- "city": "Berlin",
1405
- "postal_code": "12045",
1406
- "country": "de",
1407
- "additional_info": "adasd"
1408
- },
1409
- "items": {
1410
- "$relation": [
1411
- {
1412
- "entity_id": "c8dbe8f3-28b6-4d77-aae8-47bc24a2532f",
1413
- "_tags": [
1414
- "journey"
1415
- ]
1416
- }
1417
- ]
1418
- },
1419
- "_tags": [
1420
- "journey",
1421
- "ORWNr4iCN"
1422
- ]
1423
- }
1424
- }
1425
- }
1426
- }
1427
- }
1428
- },
1429
- "responses": {
1430
- "201": {
1431
- "description": "The new Opportunity.",
1432
- "content": {
1433
- "application/json": {
1434
- "schema": {
1435
- "$ref": "#/components/schemas/Opportunity"
1436
- }
1437
- }
1438
- }
1439
- },
1440
- "400": {
1441
- "description": "Invalid payload",
1442
- "content": {
1443
- "application/json": {
1444
- "schema": {
1445
- "$ref": "#/components/schemas/Error"
1446
- }
1447
- }
1448
- }
1449
- }
1450
- }
1451
- }
1452
1432
  }
1453
1433
  },
1454
1434
  "components": {
@@ -2809,6 +2789,9 @@
2809
2789
  "enum": [
2810
2790
  "power"
2811
2791
  ]
2792
+ },
2793
+ "meter_type": {
2794
+ "$ref": "#/components/schemas/PowerMeterType"
2812
2795
  }
2813
2796
  },
2814
2797
  "description": "The compute price payload for power"
@@ -2893,6 +2876,15 @@
2893
2876
  "special"
2894
2877
  ]
2895
2878
  },
2879
+ "PowerMeterType": {
2880
+ "type": "string",
2881
+ "description": "The meter type for power",
2882
+ "enum": [
2883
+ "classic",
2884
+ "smart",
2885
+ "digital"
2886
+ ]
2887
+ },
2896
2888
  "ComputedPriceBreakdown": {
2897
2889
  "type": "object",
2898
2890
  "description": "Price breakdown",
@@ -4672,6 +4664,13 @@
4672
4664
  }
4673
4665
  ]
4674
4666
  },
4667
+ "meter_type": {
4668
+ "oneOf": [
4669
+ {
4670
+ "$ref": "#/components/schemas/PowerMeterType"
4671
+ }
4672
+ ]
4673
+ },
4675
4674
  "markup_tiers": {
4676
4675
  "description": "Defines an array of tiers. Each tier has an upper bound, an unit amount and a flat fee.\n",
4677
4676
  "type": "array",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/pricing-client",
3
- "version": "3.27.7",
3
+ "version": "3.28.0",
4
4
  "description": "Client for epilot Pricing APIs",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",