@epilot/pricing-client 3.47.9-alpha.2 → 3.47.9-alpha.4
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 +84 -15
- package/dist/openapi.json +25 -107
- package/package.json +1 -1
package/dist/openapi.d.ts
CHANGED
|
@@ -357,6 +357,70 @@ declare namespace Components {
|
|
|
357
357
|
*/
|
|
358
358
|
Price[];
|
|
359
359
|
}
|
|
360
|
+
/**
|
|
361
|
+
* The coupon configuration
|
|
362
|
+
*/
|
|
363
|
+
export interface BaseCouponCommon {
|
|
364
|
+
[name: string]: any;
|
|
365
|
+
_id: EntityId /* uuid */;
|
|
366
|
+
/**
|
|
367
|
+
* The auto-generated title for the title
|
|
368
|
+
*/
|
|
369
|
+
_title: string;
|
|
370
|
+
/**
|
|
371
|
+
* Organization Id the entity belongs to
|
|
372
|
+
*/
|
|
373
|
+
_org: string;
|
|
374
|
+
/**
|
|
375
|
+
* The schema of the entity, for coupons it is always `coupon`
|
|
376
|
+
*/
|
|
377
|
+
_schema: "coupon";
|
|
378
|
+
_tags?: string[];
|
|
379
|
+
/**
|
|
380
|
+
* The creation date for the opportunity
|
|
381
|
+
*/
|
|
382
|
+
_created_at: string; // date-time
|
|
383
|
+
/**
|
|
384
|
+
* The date the coupon was last updated
|
|
385
|
+
*/
|
|
386
|
+
_updated_at: string; // date-time
|
|
387
|
+
name: string | null;
|
|
388
|
+
description?: string | null;
|
|
389
|
+
type: "fixed" | "percentage";
|
|
390
|
+
category: "discount" | "cashback";
|
|
391
|
+
/**
|
|
392
|
+
* Use if type is set to percentage. The percentage to be discounted, represented as a whole integer.
|
|
393
|
+
*/
|
|
394
|
+
percentage_value?: string | null;
|
|
395
|
+
/**
|
|
396
|
+
* Use if type is set to fixed. The fixed amount in cents to be discounted, represented as a whole integer.
|
|
397
|
+
*/
|
|
398
|
+
fixed_value?: number;
|
|
399
|
+
/**
|
|
400
|
+
* Use if type is set to fixed. The unit amount in cents to be discounted, represented as a decimal string with at most 12 decimal places.
|
|
401
|
+
*/
|
|
402
|
+
fixed_value_decimal?: string;
|
|
403
|
+
/**
|
|
404
|
+
* Use if type is set to fixed. Three-letter ISO currency code, in lowercase.
|
|
405
|
+
*/
|
|
406
|
+
fixed_value_currency?: /* Use if type is set to fixed. Three-letter ISO currency code, in lowercase. */ /**
|
|
407
|
+
* Three-letter ISO currency code, in lowercase. Must be a supported currency.
|
|
408
|
+
* ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
|
|
409
|
+
*
|
|
410
|
+
* example:
|
|
411
|
+
* EUR
|
|
412
|
+
*/
|
|
413
|
+
Currency;
|
|
414
|
+
/**
|
|
415
|
+
* The cashback period, for now it's limited to either 0 months or 12 months
|
|
416
|
+
*/
|
|
417
|
+
cashback_period?: "0" | "12";
|
|
418
|
+
active?: boolean;
|
|
419
|
+
/**
|
|
420
|
+
* Whether the coupon requires a promo code to be applied
|
|
421
|
+
*/
|
|
422
|
+
requires_promo_code?: boolean;
|
|
423
|
+
}
|
|
360
424
|
export interface BaseMarketPriceRecord {
|
|
361
425
|
/**
|
|
362
426
|
* Cost in Cents, e.g. 12.3 for 12,3 Cents = 0.123€.
|
|
@@ -721,7 +785,7 @@ declare namespace Components {
|
|
|
721
785
|
/**
|
|
722
786
|
* The coupons applicable to the price item
|
|
723
787
|
*/
|
|
724
|
-
_coupons?: (CouponItem)[];
|
|
788
|
+
_coupons?: (/* The coupon configuration */ CouponItem)[];
|
|
725
789
|
/**
|
|
726
790
|
* 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'.
|
|
727
791
|
*/
|
|
@@ -1059,7 +1123,7 @@ declare namespace Components {
|
|
|
1059
1123
|
/**
|
|
1060
1124
|
* The coupons applicable to the price item
|
|
1061
1125
|
*/
|
|
1062
|
-
_coupons?: (CouponItem)[];
|
|
1126
|
+
_coupons?: (/* The coupon configuration */ CouponItem)[];
|
|
1063
1127
|
}
|
|
1064
1128
|
export interface BasicAuthCredentials {
|
|
1065
1129
|
/**
|
|
@@ -1449,7 +1513,7 @@ declare namespace Components {
|
|
|
1449
1513
|
/**
|
|
1450
1514
|
* The flag for prices that contain price components.
|
|
1451
1515
|
*/
|
|
1452
|
-
is_composite_price
|
|
1516
|
+
is_composite_price: true;
|
|
1453
1517
|
/**
|
|
1454
1518
|
* The price creation date
|
|
1455
1519
|
*/
|
|
@@ -1817,7 +1881,7 @@ declare namespace Components {
|
|
|
1817
1881
|
/**
|
|
1818
1882
|
* The coupons applicable to the price item
|
|
1819
1883
|
*/
|
|
1820
|
-
_coupons?: (CouponItem)[];
|
|
1884
|
+
_coupons?: (/* The coupon configuration */ CouponItem)[];
|
|
1821
1885
|
/**
|
|
1822
1886
|
* 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'.
|
|
1823
1887
|
*/
|
|
@@ -1825,7 +1889,7 @@ declare namespace Components {
|
|
|
1825
1889
|
/**
|
|
1826
1890
|
* The flag for prices that contain price components.
|
|
1827
1891
|
*/
|
|
1828
|
-
is_composite_price
|
|
1892
|
+
is_composite_price: true;
|
|
1829
1893
|
/**
|
|
1830
1894
|
* Contains price item configurations, per price component, when the main price item is a [composite price](/api/pricing#tag/dynamic_price_schema).
|
|
1831
1895
|
*/
|
|
@@ -2018,11 +2082,11 @@ declare namespace Components {
|
|
|
2018
2082
|
/**
|
|
2019
2083
|
* The coupons applicable to the price item
|
|
2020
2084
|
*/
|
|
2021
|
-
_coupons?: (CouponItem)[];
|
|
2085
|
+
_coupons?: (/* The coupon configuration */ CouponItem)[];
|
|
2022
2086
|
/**
|
|
2023
2087
|
* The flag for prices that contain price components.
|
|
2024
2088
|
*/
|
|
2025
|
-
is_composite_price
|
|
2089
|
+
is_composite_price: true;
|
|
2026
2090
|
/**
|
|
2027
2091
|
* Contains price item configurations, per price component, when the main price item is a [composite price](/api/pricing#tag/dynamic_price_schema).
|
|
2028
2092
|
*/
|
|
@@ -2392,16 +2456,20 @@ declare namespace Components {
|
|
|
2392
2456
|
[name: string]: number;
|
|
2393
2457
|
};
|
|
2394
2458
|
}
|
|
2459
|
+
/**
|
|
2460
|
+
* The coupon configuration
|
|
2461
|
+
*/
|
|
2395
2462
|
export interface CouponItem {
|
|
2396
|
-
|
|
2463
|
+
[name: string]: any;
|
|
2464
|
+
_id: EntityId /* uuid */;
|
|
2397
2465
|
/**
|
|
2398
2466
|
* The auto-generated title for the title
|
|
2399
2467
|
*/
|
|
2400
|
-
_title
|
|
2468
|
+
_title: string;
|
|
2401
2469
|
/**
|
|
2402
2470
|
* Organization Id the entity belongs to
|
|
2403
2471
|
*/
|
|
2404
|
-
_org
|
|
2472
|
+
_org: string;
|
|
2405
2473
|
/**
|
|
2406
2474
|
* The schema of the entity, for coupons it is always `coupon`
|
|
2407
2475
|
*/
|
|
@@ -2410,12 +2478,12 @@ declare namespace Components {
|
|
|
2410
2478
|
/**
|
|
2411
2479
|
* The creation date for the opportunity
|
|
2412
2480
|
*/
|
|
2413
|
-
_created_at
|
|
2481
|
+
_created_at: string; // date-time
|
|
2414
2482
|
/**
|
|
2415
2483
|
* The date the coupon was last updated
|
|
2416
2484
|
*/
|
|
2417
|
-
_updated_at
|
|
2418
|
-
name
|
|
2485
|
+
_updated_at: string; // date-time
|
|
2486
|
+
name: string | null;
|
|
2419
2487
|
description?: string | null;
|
|
2420
2488
|
type: "fixed" | "percentage";
|
|
2421
2489
|
category: "discount" | "cashback";
|
|
@@ -4092,7 +4160,7 @@ declare namespace Components {
|
|
|
4092
4160
|
/**
|
|
4093
4161
|
* The coupons applicable to the price item
|
|
4094
4162
|
*/
|
|
4095
|
-
_coupons?: (CouponItem)[];
|
|
4163
|
+
_coupons?: (/* The coupon configuration */ CouponItem)[];
|
|
4096
4164
|
/**
|
|
4097
4165
|
* 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'.
|
|
4098
4166
|
*/
|
|
@@ -4303,7 +4371,7 @@ declare namespace Components {
|
|
|
4303
4371
|
/**
|
|
4304
4372
|
* The coupons applicable to the price item
|
|
4305
4373
|
*/
|
|
4306
|
-
_coupons?: (CouponItem)[];
|
|
4374
|
+
_coupons?: (/* The coupon configuration */ CouponItem)[];
|
|
4307
4375
|
/**
|
|
4308
4376
|
* One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.
|
|
4309
4377
|
*/
|
|
@@ -6228,6 +6296,7 @@ export type AvailabilityResult = Components.Schemas.AvailabilityResult;
|
|
|
6228
6296
|
export type AverageMarketPriceRecord = Components.Schemas.AverageMarketPriceRecord;
|
|
6229
6297
|
export type AverageMarketPriceResult = Components.Schemas.AverageMarketPriceResult;
|
|
6230
6298
|
export type BaseCoupon = Components.Schemas.BaseCoupon;
|
|
6299
|
+
export type BaseCouponCommon = Components.Schemas.BaseCouponCommon;
|
|
6231
6300
|
export type BaseMarketPriceRecord = Components.Schemas.BaseMarketPriceRecord;
|
|
6232
6301
|
export type BasePriceItem = Components.Schemas.BasePriceItem;
|
|
6233
6302
|
export type BasePriceItemCommon = Components.Schemas.BasePriceItemCommon;
|
package/dist/openapi.json
CHANGED
|
@@ -3033,6 +3033,9 @@
|
|
|
3033
3033
|
},
|
|
3034
3034
|
"additionalProperties": true,
|
|
3035
3035
|
"readOnly": true,
|
|
3036
|
+
"required": [
|
|
3037
|
+
"is_composite_price"
|
|
3038
|
+
],
|
|
3036
3039
|
"properties": {
|
|
3037
3040
|
"active": {
|
|
3038
3041
|
"type": "boolean",
|
|
@@ -4571,6 +4574,9 @@
|
|
|
4571
4574
|
},
|
|
4572
4575
|
{
|
|
4573
4576
|
"type": "object",
|
|
4577
|
+
"required": [
|
|
4578
|
+
"is_composite_price"
|
|
4579
|
+
],
|
|
4574
4580
|
"properties": {
|
|
4575
4581
|
"is_composite_price": {
|
|
4576
4582
|
"description": "The flag for prices that contain price components.",
|
|
@@ -4878,6 +4884,9 @@
|
|
|
4878
4884
|
],
|
|
4879
4885
|
"description": "Represents a composite price input to the pricing library.",
|
|
4880
4886
|
"type": "object",
|
|
4887
|
+
"required": [
|
|
4888
|
+
"is_composite_price"
|
|
4889
|
+
],
|
|
4881
4890
|
"properties": {
|
|
4882
4891
|
"is_composite_price": {
|
|
4883
4892
|
"description": "The flag for prices that contain price components.",
|
|
@@ -5971,7 +5980,7 @@
|
|
|
5971
5980
|
}
|
|
5972
5981
|
}
|
|
5973
5982
|
},
|
|
5974
|
-
"
|
|
5983
|
+
"BaseCouponCommon": {
|
|
5975
5984
|
"type": "object",
|
|
5976
5985
|
"description": "The coupon configuration",
|
|
5977
5986
|
"additionalProperties": true,
|
|
@@ -6085,7 +6094,17 @@
|
|
|
6085
6094
|
"requires_promo_code": {
|
|
6086
6095
|
"type": "boolean",
|
|
6087
6096
|
"description": "Whether the coupon requires a promo code to be applied"
|
|
6088
|
-
}
|
|
6097
|
+
}
|
|
6098
|
+
}
|
|
6099
|
+
},
|
|
6100
|
+
"BaseCoupon": {
|
|
6101
|
+
"type": "object",
|
|
6102
|
+
"allOf": [
|
|
6103
|
+
{
|
|
6104
|
+
"$ref": "#/components/schemas/BaseCouponCommon"
|
|
6105
|
+
}
|
|
6106
|
+
],
|
|
6107
|
+
"properties": {
|
|
6089
6108
|
"prices": {
|
|
6090
6109
|
"description": "The prices associated with the coupon. Will hold price entities if hydrated, relations otherwise.",
|
|
6091
6110
|
"oneOf": [
|
|
@@ -6161,112 +6180,11 @@
|
|
|
6161
6180
|
},
|
|
6162
6181
|
"CouponItem": {
|
|
6163
6182
|
"type": "object",
|
|
6164
|
-
"
|
|
6165
|
-
|
|
6166
|
-
|
|
6167
|
-
"_schema"
|
|
6168
|
-
],
|
|
6169
|
-
"properties": {
|
|
6170
|
-
"_id": {
|
|
6171
|
-
"$ref": "#/components/schemas/EntityId",
|
|
6172
|
-
"readOnly": true
|
|
6173
|
-
},
|
|
6174
|
-
"_title": {
|
|
6175
|
-
"type": "string",
|
|
6176
|
-
"description": "The auto-generated title for the title",
|
|
6177
|
-
"readOnly": true
|
|
6178
|
-
},
|
|
6179
|
-
"_org": {
|
|
6180
|
-
"type": "string",
|
|
6181
|
-
"description": "Organization Id the entity belongs to",
|
|
6182
|
-
"readOnly": true
|
|
6183
|
-
},
|
|
6184
|
-
"_schema": {
|
|
6185
|
-
"type": "string",
|
|
6186
|
-
"enum": [
|
|
6187
|
-
"coupon"
|
|
6188
|
-
],
|
|
6189
|
-
"readOnly": true,
|
|
6190
|
-
"description": "The schema of the entity, for coupons it is always `coupon`"
|
|
6191
|
-
},
|
|
6192
|
-
"_tags": {
|
|
6193
|
-
"type": "array",
|
|
6194
|
-
"items": {
|
|
6195
|
-
"type": "string"
|
|
6196
|
-
}
|
|
6197
|
-
},
|
|
6198
|
-
"_created_at": {
|
|
6199
|
-
"type": "string",
|
|
6200
|
-
"format": "date-time",
|
|
6201
|
-
"readOnly": true,
|
|
6202
|
-
"description": "The creation date for the opportunity"
|
|
6203
|
-
},
|
|
6204
|
-
"_updated_at": {
|
|
6205
|
-
"type": "string",
|
|
6206
|
-
"format": "date-time",
|
|
6207
|
-
"readOnly": true,
|
|
6208
|
-
"description": "The date the coupon was last updated"
|
|
6209
|
-
},
|
|
6210
|
-
"name": {
|
|
6211
|
-
"type": "string",
|
|
6212
|
-
"nullable": true
|
|
6213
|
-
},
|
|
6214
|
-
"description": {
|
|
6215
|
-
"type": "string",
|
|
6216
|
-
"nullable": true
|
|
6217
|
-
},
|
|
6218
|
-
"type": {
|
|
6219
|
-
"type": "string",
|
|
6220
|
-
"enum": [
|
|
6221
|
-
"fixed",
|
|
6222
|
-
"percentage"
|
|
6223
|
-
]
|
|
6224
|
-
},
|
|
6225
|
-
"category": {
|
|
6226
|
-
"type": "string",
|
|
6227
|
-
"enum": [
|
|
6228
|
-
"discount",
|
|
6229
|
-
"cashback"
|
|
6230
|
-
]
|
|
6231
|
-
},
|
|
6232
|
-
"percentage_value": {
|
|
6233
|
-
"type": "string",
|
|
6234
|
-
"description": "Use if type is set to percentage. The percentage to be discounted, represented as a whole integer.",
|
|
6235
|
-
"nullable": true
|
|
6236
|
-
},
|
|
6237
|
-
"fixed_value": {
|
|
6238
|
-
"description": "Use if type is set to fixed. The fixed amount in cents to be discounted, represented as a whole integer.",
|
|
6239
|
-
"type": "number"
|
|
6240
|
-
},
|
|
6241
|
-
"fixed_value_decimal": {
|
|
6242
|
-
"description": "Use if type is set to fixed. The unit amount in cents to be discounted, represented as a decimal string with at most 12 decimal places.",
|
|
6243
|
-
"type": "string"
|
|
6244
|
-
},
|
|
6245
|
-
"fixed_value_currency": {
|
|
6246
|
-
"description": "Use if type is set to fixed. Three-letter ISO currency code, in lowercase.",
|
|
6247
|
-
"oneOf": [
|
|
6248
|
-
{
|
|
6249
|
-
"$ref": "#/components/schemas/Currency"
|
|
6250
|
-
}
|
|
6251
|
-
]
|
|
6252
|
-
},
|
|
6253
|
-
"cashback_period": {
|
|
6254
|
-
"type": "string",
|
|
6255
|
-
"description": "The cashback period, for now it's limited to either 0 months or 12 months",
|
|
6256
|
-
"enum": [
|
|
6257
|
-
"0",
|
|
6258
|
-
"12"
|
|
6259
|
-
],
|
|
6260
|
-
"nullable": true
|
|
6261
|
-
},
|
|
6262
|
-
"active": {
|
|
6263
|
-
"type": "boolean"
|
|
6264
|
-
},
|
|
6265
|
-
"requires_promo_code": {
|
|
6266
|
-
"type": "boolean",
|
|
6267
|
-
"description": "Whether the coupon requires a promo code to be applied"
|
|
6183
|
+
"allOf": [
|
|
6184
|
+
{
|
|
6185
|
+
"$ref": "#/components/schemas/BaseCouponCommon"
|
|
6268
6186
|
}
|
|
6269
|
-
|
|
6187
|
+
]
|
|
6270
6188
|
},
|
|
6271
6189
|
"CouponWithoutPromoCodes": {
|
|
6272
6190
|
"allOf": [
|