@epilot/pricing-client 3.19.0 → 3.21.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.
@@ -1 +1 @@
1
- (()=>{"use strict";var e={914:function(e,r,t){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});var a=i(t(240));r.default=a.default},240:e=>{e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"","version":""},"servers":[{"url":"https://pricing-api.sls.epilot.io"}],"paths":{"/v1/order":{"post":{"operationId":"createOrder","requestBody":{"required":true,"content":{"application/json":{}}}}},"/v1/order/{id}":{"put":{"operationId":"putOrder","parameters":[{"in":"path","name":"id","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}}}},"/v1/public/cart:checkout":{"post":{"operationId":"$checkoutCart","parameters":[{"in":"header","name":"X-Ivy-Org-ID","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}}}},"/v1/public/catalog":{"post":{"operationId":"$searchCatalog","parameters":[{"in":"header","name":"X-Ivy-Org-ID","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}}}},"/v1/public/availability:check":{"post":{"operationId":"$availabilityCheck","parameters":[{"in":"header","name":"X-Ivy-Org-ID","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}}}},"/v1/validate-availability/{id}":{"get":{"operationId":"$validateAvailabilityFile","parameters":[{"in":"path","name":"id","required":true},{"in":"header","name":"X-Epilot-Org-ID","required":true}]}},"/v1/public/integration/{integrationId}/providers:search":{"post":{"operationId":"$searchProviders","parameters":[{"in":"header","name":"X-Epilot-Org-ID","required":true},{"in":"path","name":"integrationId","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}}}},"/v1/public/integration/{integrationId}/streets:search":{"post":{"operationId":"$searchStreets","parameters":[{"in":"header","name":"X-Epilot-Org-ID","required":true},{"in":"path","name":"integrationId","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}}}},"/v1/public/integration/{integrationId}/compute-price":{"post":{"operationId":"$computePrice","parameters":[{"in":"header","name":"X-Epilot-Org-ID","required":true},{"in":"path","name":"integrationId","required":true}],"requestBody":{"content":{"application/json":{}}}}},"/v1/integration/{integrationId}/credentials":{"get":{"operationId":"$getCredentials","parameters":[{"in":"path","name":"integrationId","required":true}]}},"/v1/integration/{integrationId}/credentials:save":{"put":{"operationId":"$saveCredentials","parameters":[{"in":"path","name":"integrationId","required":true}],"requestBody":{"content":{"application/json":{}}}}},"/v1/integration/{integrationId}/credentials:delete":{"delete":{"operationId":"$deleteCredentials","parameters":[{"in":"path","name":"integrationId","required":true}]}},"/v1/public/opportunity":{"post":{"deprecated":true,"operationId":"$createOpportunity","parameters":[{"in":"header","name":"X-Ivy-Org-ID","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}}}}},"components":{}}')}},r={},t=function t(i){var a=r[i];if(void 0!==a)return a.exports;var n=r[i]={exports:{}};return e[i].call(n.exports,n,n.exports,t),n.exports}(914),i=exports;for(var a in t)i[a]=t[a];t.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})();
1
+ (()=>{"use strict";var e={914:function(e,t,r){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=i(r(240));t.default=a.default},240:e=>{e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"","version":""},"servers":[{"url":"https://pricing-api.sls.epilot.io"}],"paths":{"/v1/order":{"post":{"operationId":"createOrder","requestBody":{"required":true,"content":{"application/json":{}}}}},"/v1/order/{id}":{"put":{"operationId":"putOrder","parameters":[{"in":"path","name":"id","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}}}},"/v1/public/cart:checkout":{"post":{"operationId":"$checkoutCart","parameters":[{"in":"header","name":"X-Ivy-Org-ID","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}}}},"/v1/public/catalog":{"post":{"operationId":"$searchCatalog","parameters":[{"in":"header","name":"X-Ivy-Org-ID","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}}}},"/v1/catalog":{"post":{"operationId":"$privateSearchCatalog","requestBody":{"required":true,"content":{"application/json":{}}}}},"/v1/public/availability:check":{"post":{"operationId":"$availabilityCheck","parameters":[{"in":"header","name":"X-Ivy-Org-ID","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}}}},"/v1/validate-availability/{id}":{"get":{"operationId":"$validateAvailabilityFile","parameters":[{"in":"path","name":"id","required":true},{"in":"header","name":"X-Epilot-Org-ID","required":true}]}},"/v1/public/integration/{integrationId}/providers:search":{"post":{"operationId":"$searchProviders","parameters":[{"in":"header","name":"X-Epilot-Org-ID","required":true},{"in":"path","name":"integrationId","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}}}},"/v1/public/integration/{integrationId}/streets:search":{"post":{"operationId":"$searchStreets","parameters":[{"in":"header","name":"X-Epilot-Org-ID","required":true},{"in":"path","name":"integrationId","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}}}},"/v1/public/integration/{integrationId}/compute-price":{"post":{"operationId":"$computePrice","parameters":[{"in":"header","name":"X-Epilot-Org-ID","required":true},{"in":"path","name":"integrationId","required":true}],"requestBody":{"content":{"application/json":{}}}}},"/v1/integration/{integrationId}/credentials":{"get":{"operationId":"$getCredentials","parameters":[{"in":"path","name":"integrationId","required":true}]}},"/v1/integration/{integrationId}/credentials:save":{"put":{"operationId":"$saveCredentials","parameters":[{"in":"path","name":"integrationId","required":true}],"requestBody":{"content":{"application/json":{}}}}},"/v1/integration/{integrationId}/credentials:delete":{"delete":{"operationId":"$deleteCredentials","parameters":[{"in":"path","name":"integrationId","required":true}]}},"/v1/public/opportunity":{"post":{"deprecated":true,"operationId":"$createOpportunity","parameters":[{"in":"header","name":"X-Ivy-Org-ID","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}}}}},"components":{}}')}},t={},r=function r(i){var a=t[i];if(void 0!==a)return a.exports;var n=t[i]={exports:{}};return e[i].call(n.exports,n,n.exports,r),n.exports}(914),i=exports;for(var a in r)i[a]=r[a];r.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})();
@@ -75,6 +75,17 @@
75
75
  }
76
76
  }
77
77
  },
78
+ "/v1/catalog": {
79
+ "post": {
80
+ "operationId": "$privateSearchCatalog",
81
+ "requestBody": {
82
+ "required": true,
83
+ "content": {
84
+ "application/json": {}
85
+ }
86
+ }
87
+ }
88
+ },
78
89
  "/v1/public/availability:check": {
79
90
  "post": {
80
91
  "operationId": "$availabilityCheck",
package/dist/openapi.d.ts CHANGED
@@ -1691,9 +1691,10 @@ declare namespace Components {
1691
1691
  * - `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.
1692
1692
  * - `tiered_volume` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.
1693
1693
  * - `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.
1694
+ * - `external_getag` indicates that the price is influenced by aquisition fees provided by GetAG.
1694
1695
  *
1695
1696
  */
1696
- pricing_model: "per_unit" | "tiered_graduated" | "tiered_volume" | "tiered_flatfee";
1697
+ pricing_model: "per_unit" | "tiered_graduated" | "tiered_volume" | "tiered_flatfee" | "external_getag";
1697
1698
  /**
1698
1699
  * Defines an array of tiers. Each tier has an upper bound, an unit amount and a flat fee.
1699
1700
  *
@@ -2052,9 +2053,10 @@ declare namespace Components {
2052
2053
  * - `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.
2053
2054
  * - `tiered_volume` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.
2054
2055
  * - `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.
2056
+ * - `external_getag` indicates that the price is influenced by aquisition fees provided by GetAG.
2055
2057
  *
2056
2058
  */
2057
- pricing_model: "per_unit" | "tiered_graduated" | "tiered_volume" | "tiered_flatfee";
2059
+ pricing_model: "per_unit" | "tiered_graduated" | "tiered_volume" | "tiered_flatfee" | "external_getag";
2058
2060
  }
2059
2061
  /**
2060
2062
  * Represents a price input to the pricing library.
@@ -2226,9 +2228,10 @@ declare namespace Components {
2226
2228
  * - `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.
2227
2229
  * - `tiered_volume` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.
2228
2230
  * - `tiered_flatfee` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.
2231
+ * - `external_getag` indicates that the price is influenced by aquisition fees provided by GetAG.
2229
2232
  *
2230
2233
  */
2231
- pricing_model: "per_unit" | "tiered_graduated" | "tiered_volume" | "tiered_flatfee";
2234
+ pricing_model: "per_unit" | "tiered_graduated" | "tiered_volume" | "tiered_flatfee" | "external_getag";
2232
2235
  /**
2233
2236
  * The snapshot of the price linked to the price item.
2234
2237
  * example:
@@ -2252,9 +2255,10 @@ declare namespace Components {
2252
2255
  * - `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.
2253
2256
  * - `tiered_volume` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.
2254
2257
  * - `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.
2258
+ * - `external_getag` indicates that the price is influenced by aquisition fees provided by GetAG.
2255
2259
  *
2256
2260
  */
2257
- pricing_model: "per_unit" | "tiered_graduated" | "tiered_volume" | "tiered_flatfee";
2261
+ pricing_model: "per_unit" | "tiered_graduated" | "tiered_volume" | "tiered_flatfee" | "external_getag";
2258
2262
  /**
2259
2263
  * Defines an array of tiers. Each tier has an upper bound, an unit amount and a flat fee.
2260
2264
  *
@@ -3088,6 +3092,51 @@ declare namespace Paths {
3088
3092
  export type $404 = Components.Schemas.Error;
3089
3093
  }
3090
3094
  }
3095
+ namespace $PrivateSearchCatalog {
3096
+ export type RequestBody = /**
3097
+ * A catalog search payload
3098
+ * example:
3099
+ * {
3100
+ * "q": "_id:1233432 OR _id:123432454 OR _id:23445433",
3101
+ * "sort": "description ASC",
3102
+ * "from": 0,
3103
+ * "size": 200,
3104
+ * "availability": {
3105
+ * "location": {
3106
+ * "postal_code": "57008,",
3107
+ * "city": "Cologne,",
3108
+ * "street": "Media Park,",
3109
+ * "street_number": "8a"
3110
+ * },
3111
+ * "available_date": {
3112
+ * "value": "2022-05-01"
3113
+ * }
3114
+ * }
3115
+ * }
3116
+ */
3117
+ Components.Schemas.CatalogSearch;
3118
+ namespace Responses {
3119
+ export type $200 = /**
3120
+ * The query result payload
3121
+ * example:
3122
+ * {
3123
+ * "hits": 2,
3124
+ * "results": [
3125
+ * {
3126
+ * "schema": "product",
3127
+ * "description": "product a"
3128
+ * },
3129
+ * {
3130
+ * "schema": "price",
3131
+ * "unit_amount_decimal": "124.342343434"
3132
+ * }
3133
+ * ]
3134
+ * }
3135
+ */
3136
+ Components.Schemas.CatalogSearchResult;
3137
+ export type $400 = Components.Schemas.Error;
3138
+ }
3139
+ }
3091
3140
  namespace $SaveCredentials {
3092
3141
  namespace Parameters {
3093
3142
  export type IntegrationId = Components.Schemas.IntegrationId;
@@ -3305,6 +3354,16 @@ export interface OperationMethods {
3305
3354
  data?: Paths.$SearchCatalog.RequestBody,
3306
3355
  config?: AxiosRequestConfig
3307
3356
  ): OperationResponse<Paths.$SearchCatalog.Responses.$200>
3357
+ /**
3358
+ * $privateSearchCatalog - privateSearchCatalog
3359
+ *
3360
+ * Provides a querying functionalities over products and prices of the Catalog for a given organization.
3361
+ */
3362
+ '$privateSearchCatalog'(
3363
+ parameters?: Parameters<UnknownParamsObject> | null,
3364
+ data?: Paths.$PrivateSearchCatalog.RequestBody,
3365
+ config?: AxiosRequestConfig
3366
+ ): OperationResponse<Paths.$PrivateSearchCatalog.Responses.$200>
3308
3367
  /**
3309
3368
  * $availabilityCheck - availabilityCheck
3310
3369
  *
@@ -3461,6 +3520,18 @@ export interface PathsDictionary {
3461
3520
  config?: AxiosRequestConfig
3462
3521
  ): OperationResponse<Paths.$SearchCatalog.Responses.$200>
3463
3522
  }
3523
+ ['/v1/catalog']: {
3524
+ /**
3525
+ * $privateSearchCatalog - privateSearchCatalog
3526
+ *
3527
+ * Provides a querying functionalities over products and prices of the Catalog for a given organization.
3528
+ */
3529
+ 'post'(
3530
+ parameters?: Parameters<UnknownParamsObject> | null,
3531
+ data?: Paths.$PrivateSearchCatalog.RequestBody,
3532
+ config?: AxiosRequestConfig
3533
+ ): OperationResponse<Paths.$PrivateSearchCatalog.Responses.$200>
3534
+ }
3464
3535
  ['/v1/public/availability:check']: {
3465
3536
  /**
3466
3537
  * $availabilityCheck - availabilityCheck
package/dist/openapi.json CHANGED
@@ -608,6 +608,48 @@
608
608
  }
609
609
  }
610
610
  },
611
+ "/v1/catalog": {
612
+ "post": {
613
+ "description": "Provides a querying functionalities over products and prices of the Catalog for a given organization.",
614
+ "operationId": "$privateSearchCatalog",
615
+ "summary": "privateSearchCatalog",
616
+ "tags": [
617
+ "Catalog API"
618
+ ],
619
+ "requestBody": {
620
+ "required": true,
621
+ "content": {
622
+ "application/json": {
623
+ "schema": {
624
+ "$ref": "#/components/schemas/CatalogSearch"
625
+ }
626
+ }
627
+ }
628
+ },
629
+ "responses": {
630
+ "200": {
631
+ "description": "The search result",
632
+ "content": {
633
+ "application/json": {
634
+ "schema": {
635
+ "$ref": "#/components/schemas/CatalogSearchResult"
636
+ }
637
+ }
638
+ }
639
+ },
640
+ "400": {
641
+ "description": "Invalid payload",
642
+ "content": {
643
+ "application/json": {
644
+ "schema": {
645
+ "$ref": "#/components/schemas/Error"
646
+ }
647
+ }
648
+ }
649
+ }
650
+ }
651
+ }
652
+ },
611
653
  "/v1/public/availability:check": {
612
654
  "post": {
613
655
  "description": "The availability check endpoint",
@@ -1960,12 +2002,13 @@
1960
2002
  },
1961
2003
  "pricing_model": {
1962
2004
  "type": "string",
1963
- "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",
2005
+ "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",
1964
2006
  "enum": [
1965
2007
  "per_unit",
1966
2008
  "tiered_graduated",
1967
2009
  "tiered_volume",
1968
- "tiered_flatfee"
2010
+ "tiered_flatfee",
2011
+ "external_getag"
1969
2012
  ]
1970
2013
  },
1971
2014
  "tiers": {
@@ -3075,12 +3118,13 @@
3075
3118
  },
3076
3119
  "pricing_model": {
3077
3120
  "type": "string",
3078
- "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` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.\n",
3121
+ "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` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.\n- `external_getag` indicates that the price is influenced by aquisition fees provided by GetAG.\n",
3079
3122
  "enum": [
3080
3123
  "per_unit",
3081
3124
  "tiered_graduated",
3082
3125
  "tiered_volume",
3083
- "tiered_flatfee"
3126
+ "tiered_flatfee",
3127
+ "external_getag"
3084
3128
  ]
3085
3129
  },
3086
3130
  "_price": {
@@ -3542,12 +3586,13 @@
3542
3586
  },
3543
3587
  "pricing_model": {
3544
3588
  "type": "string",
3545
- "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",
3589
+ "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",
3546
3590
  "enum": [
3547
3591
  "per_unit",
3548
3592
  "tiered_graduated",
3549
3593
  "tiered_volume",
3550
- "tiered_flatfee"
3594
+ "tiered_flatfee",
3595
+ "external_getag"
3551
3596
  ]
3552
3597
  }
3553
3598
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/pricing-client",
3
- "version": "3.19.0",
3
+ "version": "3.21.0",
4
4
  "description": "Client for epilot Pricing APIs",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -24,7 +24,7 @@
24
24
  "test": "jest",
25
25
  "bundle-definition": "webpack",
26
26
  "openapi": "node ../../scripts/update-openapi.js https://docs.api.epilot.io/pricing-api.yaml",
27
- "openapi:local": "node ../../scripts/update-openapi.js ../../../pricing-api/lambda/ApiHandlerFunction/openapi.yml",
27
+ "openapi:local": "npx openapicmd read --json ../../../pricing-api/lambda/ApiHandlerFunction/openapi.yml > ./src/openapi.json",
28
28
  "typegen": "echo '/* eslint-disable */' > src/openapi.d.ts && typegen ./src/openapi.json >> src/openapi.d.ts",
29
29
  "build": "tsc && npm run bundle-definition",
30
30
  "build:watch": "npm run build && tsc -w",