@epilot/pricing-client 3.33.1 → 3.34.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.json CHANGED
@@ -3317,6 +3317,51 @@
3317
3317
  ],
3318
3318
  "description": "\n| status | description |\n|-------------|-------|\n| `draft` | ​​Starting state for all orders, at this point we can still edit the order |\n| `quote` | The order is in a quoting phase, bound to an expiration date |\n| `placed` | The order has been paid and can now be fulfilled (shipped, delivered, complete) or canceled |\n| `cancelled` | The order has been cancelled |\n| `completed` | The order is now closed and finalized |\n"
3319
3319
  },
3320
+ "BasePriceItemCommon": {
3321
+ "description": "Represents the common keys in BasePriceItem and BasePriceItemDto",
3322
+ "type": "object",
3323
+ "properties": {
3324
+ "metadata": {
3325
+ "$ref": "#/components/schemas/MetaData"
3326
+ },
3327
+ "quantity": {
3328
+ "type": "integer",
3329
+ "description": "The quantity of products being purchased."
3330
+ },
3331
+ "product_id": {
3332
+ "type": "string",
3333
+ "description": "The id of the product."
3334
+ },
3335
+ "price_id": {
3336
+ "type": "string",
3337
+ "description": "The id of the price."
3338
+ },
3339
+ "is_composite_price": {
3340
+ "description": "The flag for prices that contain price components.",
3341
+ "type": "boolean"
3342
+ },
3343
+ "description": {
3344
+ "type": "string",
3345
+ "description": "An arbitrary string attached to the price item. Often useful for displaying to users. Defaults to product name."
3346
+ },
3347
+ "price_mappings": {
3348
+ "description": "Price mapping information required to compute totals",
3349
+ "$ref": "#/components/schemas/PriceInputMappings"
3350
+ },
3351
+ "is_tax_inclusive": {
3352
+ "type": "boolean",
3353
+ "description": "Specifies whether the price is considered `inclusive` of taxes or not."
3354
+ },
3355
+ "_product": {
3356
+ "description": "The snapshot of the product.",
3357
+ "allOf": [
3358
+ {
3359
+ "$ref": "#/components/schemas/Product"
3360
+ }
3361
+ ]
3362
+ }
3363
+ }
3364
+ },
3320
3365
  "PriceItemsDto": {
3321
3366
  "description": "A valid set of product prices, quantities, (discounts) and taxes from a client.",
3322
3367
  "type": "array",
@@ -3334,18 +3379,12 @@
3334
3379
  "BasePriceItemDto": {
3335
3380
  "description": "Represents a valid base price item from a client.",
3336
3381
  "type": "object",
3382
+ "allOf": [
3383
+ {
3384
+ "$ref": "#/components/schemas/BasePriceItemCommon"
3385
+ }
3386
+ ],
3337
3387
  "properties": {
3338
- "metadata": {
3339
- "$ref": "#/components/schemas/MetaData"
3340
- },
3341
- "quantity": {
3342
- "type": "integer",
3343
- "description": "The quantity of products being purchased."
3344
- },
3345
- "price_mappings": {
3346
- "description": "Price mapping information required to compute totals",
3347
- "$ref": "#/components/schemas/PriceInputMappings"
3348
- },
3349
3388
  "external_fees_mappings": {
3350
3389
  "description": "External fees mapping information required to compute totals, for some pricing models",
3351
3390
  "$ref": "#/components/schemas/ExternalFeeMappings"
@@ -3354,17 +3393,14 @@
3354
3393
  "description": "External fees metadata information required to compute totals, for some pricing models",
3355
3394
  "$ref": "#/components/schemas/ExternalFeeMetadata"
3356
3395
  },
3357
- "description": {
3358
- "type": "string",
3359
- "description": "An arbitrary string attached to the price item. Often useful for displaying to users. Defaults to product name."
3360
- },
3361
- "product_id": {
3362
- "type": "string",
3363
- "description": "The id of the product."
3364
- },
3365
- "price_id": {
3366
- "type": "string",
3367
- "description": "The id of the price."
3396
+ "coupon_ids": {
3397
+ "type": "array",
3398
+ "description": "The ids of the coupons applicable to the price item",
3399
+ "readOnly": true,
3400
+ "items": {
3401
+ "type": "string",
3402
+ "description": "The id of the coupon"
3403
+ }
3368
3404
  },
3369
3405
  "taxes": {
3370
3406
  "type": "array",
@@ -3390,18 +3426,6 @@
3390
3426
  ]
3391
3427
  }
3392
3428
  },
3393
- "is_composite_price": {
3394
- "description": "The flag for prices that contain price components.",
3395
- "type": "boolean"
3396
- },
3397
- "_product": {
3398
- "description": "The snapshot of the product.",
3399
- "allOf": [
3400
- {
3401
- "$ref": "#/components/schemas/Product"
3402
- }
3403
- ]
3404
- },
3405
3429
  "_coupons": {
3406
3430
  "type": "array",
3407
3431
  "description": "The coupons applicable to the price item",
@@ -3413,10 +3437,6 @@
3413
3437
  }
3414
3438
  ]
3415
3439
  }
3416
- },
3417
- "is_tax_inclusive": {
3418
- "type": "boolean",
3419
- "description": "Specifies whether the price is considered `inclusive` of taxes or not."
3420
3440
  }
3421
3441
  }
3422
3442
  },
@@ -3797,6 +3817,9 @@
3797
3817
  "allOf": [
3798
3818
  {
3799
3819
  "$ref": "#/components/schemas/Amounts"
3820
+ },
3821
+ {
3822
+ "$ref": "#/components/schemas/BasePriceItemCommon"
3800
3823
  }
3801
3824
  ],
3802
3825
  "properties": {
@@ -3805,14 +3828,26 @@
3805
3828
  "description": "price item id",
3806
3829
  "readOnly": true
3807
3830
  },
3808
- "metadata": {
3809
- "$ref": "#/components/schemas/MetaData"
3810
- },
3811
3831
  "unit_amount": {
3812
3832
  "type": "integer",
3813
3833
  "description": "The unit amount value",
3814
3834
  "readOnly": true
3815
3835
  },
3836
+ "unit_amount_decimal": {
3837
+ "description": "The unit amount in cents to be charged, represented as a decimal string with at most 12 decimal places.",
3838
+ "type": "string",
3839
+ "readOnly": true
3840
+ },
3841
+ "unit_discount_amount": {
3842
+ "type": "integer",
3843
+ "description": "The discount amount applied for each unit",
3844
+ "readOnly": true
3845
+ },
3846
+ "unit_discount_amount_decimal": {
3847
+ "type": "string",
3848
+ "description": "The discount amount applied for each unit represented as a decimal string",
3849
+ "readOnly": true
3850
+ },
3816
3851
  "unit_amount_gross": {
3817
3852
  "type": "integer",
3818
3853
  "description": "The unit gross amount value.",
@@ -3823,10 +3858,6 @@
3823
3858
  "description": "The unit gross amount value.",
3824
3859
  "readOnly": true
3825
3860
  },
3826
- "amount_tax": {
3827
- "type": "integer",
3828
- "description": "Total tax amount for this line item."
3829
- },
3830
3861
  "unit_amount_net": {
3831
3862
  "type": "integer",
3832
3863
  "description": "Net unit amount without taxes or discounts.",
@@ -3837,32 +3868,22 @@
3837
3868
  "description": "Net unit amount without taxes or discounts.",
3838
3869
  "readOnly": true
3839
3870
  },
3840
- "unit_amount_decimal": {
3841
- "description": "The unit amount in cents to be charged, represented as a decimal string with at most 12 decimal places.",
3842
- "type": "string"
3843
- },
3844
- "currency": {
3845
- "$ref": "#/components/schemas/Currency"
3846
- },
3847
- "description": {
3848
- "type": "string",
3849
- "description": "An arbitrary string attached to the price item. Often useful for displaying to users. Defaults to product name."
3850
- },
3851
- "quantity": {
3871
+ "unit_discount_amount_net": {
3852
3872
  "type": "integer",
3853
- "description": "The quantity of products being purchased."
3873
+ "description": "The net discount amount applied for each unit",
3874
+ "readOnly": true
3854
3875
  },
3855
- "product_id": {
3876
+ "unit_discount_amount_net_decimal": {
3856
3877
  "type": "string",
3857
- "description": "The id of the product."
3878
+ "description": "The net discount amount applied for each unit represented as a decimal string",
3879
+ "readOnly": true
3858
3880
  },
3859
- "price_id": {
3860
- "type": "string",
3861
- "description": "The id of the price."
3881
+ "amount_tax": {
3882
+ "type": "integer",
3883
+ "description": "Total tax amount for this line item."
3862
3884
  },
3863
- "is_composite_price": {
3864
- "description": "The flag for prices that contain price components.",
3865
- "type": "boolean"
3885
+ "currency": {
3886
+ "$ref": "#/components/schemas/Currency"
3866
3887
  },
3867
3888
  "_price": {
3868
3889
  "description": "The price snapshot data.",
@@ -3875,9 +3896,6 @@
3875
3896
  }
3876
3897
  ]
3877
3898
  },
3878
- "_product": {
3879
- "$ref": "#/components/schemas/Product"
3880
- },
3881
3899
  "taxes": {
3882
3900
  "type": "array",
3883
3901
  "description": "The taxes applied to the price item.",
@@ -3902,17 +3920,9 @@
3902
3920
  ]
3903
3921
  }
3904
3922
  },
3905
- "price_mappings": {
3906
- "description": "Price mapping information required to compute totals",
3907
- "$ref": "#/components/schemas/PriceInputMappings"
3908
- },
3909
3923
  "on_request_approved": {
3910
3924
  "type": "boolean",
3911
3925
  "description": "When set to true on a `_price` displayed as OnRequest (`show_as_on_request: 'on_request'`) this flag means the price has been approved and can now be displayed to the customer. This flag is only valid for prices shown as 'on_request'."
3912
- },
3913
- "is_tax_inclusive": {
3914
- "type": "boolean",
3915
- "description": "Specifies whether the price is considered `inclusive` of taxes or not."
3916
3926
  }
3917
3927
  }
3918
3928
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/pricing-client",
3
- "version": "3.33.1",
3
+ "version": "3.34.0",
4
4
  "description": "Client for epilot Pricing APIs",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -27,7 +27,7 @@
27
27
  "openapi:local": "npx openapicmd read --json ../../../pricing-api/lambda/ApiHandlerFunction/openapi.yml > ./src/openapi.json",
28
28
  "typegen": "openapi typegen src/openapi.json --client -b '/* eslint-disable */' > src/openapi.d.ts",
29
29
  "build": "tsc && npm run build:patch && npm run bundle-definition",
30
- "build:patch": "sed -i '/^__exportStar.*openapi.*$/d' dist/index.js",
30
+ "build:patch": "sed -i'' -e '/^__exportStar.*openapi.*$/d' dist/index.js",
31
31
  "build:watch": "npm run build && tsc -w",
32
32
  "prepublishOnly": "npm run typegen && npm run build",
33
33
  "lint": "../../node_modules/eslint/bin/eslint.js src"
@@ -71,5 +71,5 @@
71
71
  "webpack": "^5.18.0",
72
72
  "webpack-cli": "^4.4.0"
73
73
  },
74
- "gitHead": "cb7e6acc938eb178e531c19834ea8bd0d6445e6f"
74
+ "gitHead": "39426e86cfb320fa3227dc03f60ee6a10848e7c7"
75
75
  }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2022 epilot GmbH
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.