@epilot/pricing-client 3.55.0 → 3.57.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/additional-types.d.ts +8 -4
- package/dist/definition.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/openapi-runtime.json +299 -0
- package/dist/openapi.d.ts +2250 -81
- package/dist/openapi.json +1900 -205
- package/dist/schema-model.d.ts +38 -0
- package/dist/schema-model.js +55 -0
- package/package.json +15 -16
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runtime companions for spec enums, for consumers that need the values and not
|
|
3
|
+
* just the union type.
|
|
4
|
+
*
|
|
5
|
+
* Suffixed `Values` because the spec type owns the bare name. That suffix is also
|
|
6
|
+
* the contract: `packages/epilot-sdk-v2/__tests__/models.test.ts` checks every
|
|
7
|
+
* `<SpecType>Values` map against `components.schemas.<SpecType>.enum`, so a member
|
|
8
|
+
* added to or removed from the spec fails the build rather than drifting silently.
|
|
9
|
+
*/
|
|
10
|
+
export declare const PricingModelValues: {
|
|
11
|
+
readonly perUnit: "per_unit";
|
|
12
|
+
readonly tieredGraduated: "tiered_graduated";
|
|
13
|
+
readonly tieredVolume: "tiered_volume";
|
|
14
|
+
readonly tieredFlatFee: "tiered_flatfee";
|
|
15
|
+
readonly dynamicTariff: "dynamic_tariff";
|
|
16
|
+
readonly externalGetAG: "external_getag";
|
|
17
|
+
};
|
|
18
|
+
export declare const MarkupPricingModelValues: {
|
|
19
|
+
readonly perUnit: "per_unit";
|
|
20
|
+
readonly tieredVolume: "tiered_volume";
|
|
21
|
+
readonly tieredFlatFee: "tiered_flatfee";
|
|
22
|
+
};
|
|
23
|
+
export declare const TypeGetAgValues: {
|
|
24
|
+
readonly basePrice: "base_price";
|
|
25
|
+
readonly workPrice: "work_price";
|
|
26
|
+
};
|
|
27
|
+
export declare const DynamicTariffModeValues: {
|
|
28
|
+
readonly dayAheadMarket: "day_ahead_market";
|
|
29
|
+
readonly manual: "manual";
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Entity attribute types a conditional pricing variant may override (`overridable_attribute`).
|
|
33
|
+
* An allowlist, so a new attribute type is never overridable by default. No pricing schema to
|
|
34
|
+
* `satisfies` against — `models.test.ts` checks these against the entity spec.
|
|
35
|
+
*/
|
|
36
|
+
export declare const OVERRIDABLE_ATTRIBUTE_TYPE_LIST: readonly ["string", "number", "currency", "boolean", "date", "datetime", "select", "radio", "multiselect", "checkbox", "country", "tags"];
|
|
37
|
+
/** `string`, not a literal union, so callers can test an unnarrowed `attribute.type`. */
|
|
38
|
+
export declare const OVERRIDABLE_ATTRIBUTE_TYPES: ReadonlySet<string>;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OVERRIDABLE_ATTRIBUTE_TYPES = exports.OVERRIDABLE_ATTRIBUTE_TYPE_LIST = exports.DynamicTariffModeValues = exports.TypeGetAgValues = exports.MarkupPricingModelValues = exports.PricingModelValues = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Runtime companions for spec enums, for consumers that need the values and not
|
|
6
|
+
* just the union type.
|
|
7
|
+
*
|
|
8
|
+
* Suffixed `Values` because the spec type owns the bare name. That suffix is also
|
|
9
|
+
* the contract: `packages/epilot-sdk-v2/__tests__/models.test.ts` checks every
|
|
10
|
+
* `<SpecType>Values` map against `components.schemas.<SpecType>.enum`, so a member
|
|
11
|
+
* added to or removed from the spec fails the build rather than drifting silently.
|
|
12
|
+
*/
|
|
13
|
+
exports.PricingModelValues = {
|
|
14
|
+
perUnit: 'per_unit',
|
|
15
|
+
tieredGraduated: 'tiered_graduated',
|
|
16
|
+
tieredVolume: 'tiered_volume',
|
|
17
|
+
tieredFlatFee: 'tiered_flatfee',
|
|
18
|
+
dynamicTariff: 'dynamic_tariff',
|
|
19
|
+
externalGetAG: 'external_getag',
|
|
20
|
+
};
|
|
21
|
+
exports.MarkupPricingModelValues = {
|
|
22
|
+
perUnit: 'per_unit',
|
|
23
|
+
tieredVolume: 'tiered_volume',
|
|
24
|
+
tieredFlatFee: 'tiered_flatfee',
|
|
25
|
+
};
|
|
26
|
+
exports.TypeGetAgValues = {
|
|
27
|
+
basePrice: 'base_price',
|
|
28
|
+
workPrice: 'work_price',
|
|
29
|
+
};
|
|
30
|
+
exports.DynamicTariffModeValues = {
|
|
31
|
+
dayAheadMarket: 'day_ahead_market',
|
|
32
|
+
manual: 'manual',
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Entity attribute types a conditional pricing variant may override (`overridable_attribute`).
|
|
36
|
+
* An allowlist, so a new attribute type is never overridable by default. No pricing schema to
|
|
37
|
+
* `satisfies` against — `models.test.ts` checks these against the entity spec.
|
|
38
|
+
*/
|
|
39
|
+
exports.OVERRIDABLE_ATTRIBUTE_TYPE_LIST = [
|
|
40
|
+
'string',
|
|
41
|
+
'number',
|
|
42
|
+
'currency',
|
|
43
|
+
'boolean',
|
|
44
|
+
'date',
|
|
45
|
+
'datetime',
|
|
46
|
+
'select',
|
|
47
|
+
'radio',
|
|
48
|
+
'multiselect',
|
|
49
|
+
'checkbox',
|
|
50
|
+
'country',
|
|
51
|
+
'tags',
|
|
52
|
+
];
|
|
53
|
+
/** `string`, not a literal union, so callers can test an unnarrowed `attribute.type`. */
|
|
54
|
+
exports.OVERRIDABLE_ATTRIBUTE_TYPES = new Set(exports.OVERRIDABLE_ATTRIBUTE_TYPE_LIST);
|
|
55
|
+
//# sourceMappingURL=schema-model.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epilot/pricing-client",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.57.0",
|
|
4
4
|
"description": "Client for epilot Pricing APIs",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -24,18 +24,6 @@
|
|
|
24
24
|
"cart",
|
|
25
25
|
"pricing"
|
|
26
26
|
],
|
|
27
|
-
"scripts": {
|
|
28
|
-
"test": "vitest",
|
|
29
|
-
"bundle-definition": "webpack",
|
|
30
|
-
"openapi": "node ../../scripts/update-openapi.js https://docs.api.epilot.io/pricing-api.yaml",
|
|
31
|
-
"openapi:local": "node ../../scripts/update-openapi.js ../../../pricing-api/lambda/ApiHandlerFunction/openapi.yml",
|
|
32
|
-
"typegen": "openapi typegen src/openapi.json --client > src/openapi.d.ts",
|
|
33
|
-
"build": "tsc && npm run build:patch && npm run bundle-definition",
|
|
34
|
-
"build:patch": "sed -i'' -e '/^__exportStar.*openapi.*$/d' dist/index.js",
|
|
35
|
-
"build:watch": "npm run build && tsc -w",
|
|
36
|
-
"prepublishOnly": "npm run typegen && npm run build",
|
|
37
|
-
"lint": "biome check src"
|
|
38
|
-
},
|
|
39
27
|
"files": [
|
|
40
28
|
"*.js",
|
|
41
29
|
"*.d.ts",
|
|
@@ -68,9 +56,20 @@
|
|
|
68
56
|
"openapicmd": "^2.9.2",
|
|
69
57
|
"ts-loader": "^8.0.14",
|
|
70
58
|
"ts-node": "^10.9.1",
|
|
71
|
-
"typescript": "^4.
|
|
59
|
+
"typescript": "^4.9.3",
|
|
72
60
|
"webpack": "^5.18.0",
|
|
73
61
|
"webpack-cli": "^4.4.0"
|
|
74
62
|
},
|
|
75
|
-
"gitHead": "39426e86cfb320fa3227dc03f60ee6a10848e7c7"
|
|
76
|
-
|
|
63
|
+
"gitHead": "39426e86cfb320fa3227dc03f60ee6a10848e7c7",
|
|
64
|
+
"scripts": {
|
|
65
|
+
"test": "vitest",
|
|
66
|
+
"bundle-definition": "webpack",
|
|
67
|
+
"openapi": "node ../../scripts/update-openapi.js https://docs.api.epilot.io/pricing-api.yaml",
|
|
68
|
+
"openapi:local": "node ../../scripts/update-openapi.js ../../../pricing-api/lambda/ApiHandlerFunction/openapi.yml",
|
|
69
|
+
"typegen": "openapi typegen src/openapi.json --client > src/openapi.d.ts",
|
|
70
|
+
"build": "tsc && npm run build:patch && npm run bundle-definition",
|
|
71
|
+
"build:patch": "sed -i'' -e '/^__exportStar.*openapi.*$/d' dist/index.js",
|
|
72
|
+
"build:watch": "npm run build && tsc -w",
|
|
73
|
+
"lint": "biome check src"
|
|
74
|
+
}
|
|
75
|
+
}
|