@vyro-x/vehicle-order-types
Advanced tools
Comparing version 0.5.0 to 0.6.0
@@ -1,79 +0,1 @@ | ||
export type PricingConfigV1 = { | ||
version?: 'v1'; | ||
base: number; | ||
onRoadCosts: Array<{ | ||
name: string; | ||
value: number; | ||
}>; | ||
totalAfterOnRoadCosts: number; | ||
}; | ||
export declare enum DutiablePricingCode { | ||
Accessories = "accessories", | ||
DealerDelivery = "dealer-delivery", | ||
Interior = "interior", | ||
Paint = "paint", | ||
Tax = "tax", | ||
Discount = "discount", | ||
UpgradesPack = "upgrades-pack", | ||
Variant = "variant", | ||
VehiclePrice = "vehicle-price", | ||
WallCharger = "wall-charger", | ||
Wheels = "wheels", | ||
Other = "other" | ||
} | ||
export declare enum OnRoadPricingCode { | ||
Ctp = "ctp", | ||
LicencePlate = "licence-plate", | ||
LuxuryCarTax = "luxury-car-tax", | ||
Mai = "mai", | ||
Registration = "registration", | ||
StampDuty = "stamp-duty", | ||
Transfer = "transfer", | ||
OnRoadCosts = "on-road-costs", | ||
Other = "other" | ||
} | ||
export declare enum AdditionalPricingCode { | ||
Discount = "discount", | ||
Freight = "freight", | ||
VehicleSourcing = "vyro-sourcing", | ||
VyroLifetimeMembership = "vyro-lifetime-membership", | ||
VyroSourcingAndFacilitation = "vyro-sourcing-and-facilitation", | ||
Accessories = "accessories", | ||
Other = "other" | ||
} | ||
export type PricingCode = DutiablePricingCode | OnRoadPricingCode | AdditionalPricingCode; | ||
export type PricingLineItem<T> = { | ||
code: T; | ||
value: number; | ||
label?: string; | ||
description?: string; | ||
productVariantId?: string; | ||
}; | ||
export type PricingConfigV2 = { | ||
version: 'v2'; | ||
/** | ||
* The breakdown of the vehicle costs | ||
*/ | ||
lineItems: { | ||
dutiable: Array<PricingLineItem<DutiablePricingCode>>; | ||
onRoad: Array<PricingLineItem<OnRoadPricingCode>>; | ||
additional: Array<PricingLineItem<AdditionalPricingCode>>; | ||
}; | ||
/** | ||
* The total cost of the vehicle after on road costs and taxes | ||
*/ | ||
driveAwayPrice: number; | ||
/** | ||
* Variable pricing (aka Price on Application or POA) | ||
* | ||
* Means the pricing here is the base price and the vehicle will be custom-built to order | ||
*/ | ||
isVariable?: boolean; | ||
/** | ||
* The vehicle price excludes govt. charges which may be applied on top of the price | ||
* | ||
* This is used to indicate that the price does not include on-road costs, as on-road costs are often specific to the customer's location and buying situation | ||
*/ | ||
isExclOnRoads?: boolean; | ||
}; | ||
export type PricingConfig = PricingConfigV1 | PricingConfigV2; | ||
export * from '@vyro-x/pricing-client'; |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.AdditionalPricingCode = exports.OnRoadPricingCode = exports.DutiablePricingCode = void 0; | ||
var DutiablePricingCode; | ||
(function (DutiablePricingCode) { | ||
DutiablePricingCode["Accessories"] = "accessories"; | ||
DutiablePricingCode["DealerDelivery"] = "dealer-delivery"; | ||
DutiablePricingCode["Interior"] = "interior"; | ||
DutiablePricingCode["Paint"] = "paint"; | ||
DutiablePricingCode["Tax"] = "tax"; | ||
DutiablePricingCode["Discount"] = "discount"; | ||
DutiablePricingCode["UpgradesPack"] = "upgrades-pack"; | ||
DutiablePricingCode["Variant"] = "variant"; | ||
DutiablePricingCode["VehiclePrice"] = "vehicle-price"; | ||
DutiablePricingCode["WallCharger"] = "wall-charger"; | ||
DutiablePricingCode["Wheels"] = "wheels"; | ||
DutiablePricingCode["Other"] = "other"; | ||
})(DutiablePricingCode = exports.DutiablePricingCode || (exports.DutiablePricingCode = {})); | ||
var OnRoadPricingCode; | ||
(function (OnRoadPricingCode) { | ||
OnRoadPricingCode["Ctp"] = "ctp"; | ||
OnRoadPricingCode["LicencePlate"] = "licence-plate"; | ||
OnRoadPricingCode["LuxuryCarTax"] = "luxury-car-tax"; | ||
OnRoadPricingCode["Mai"] = "mai"; | ||
OnRoadPricingCode["Registration"] = "registration"; | ||
OnRoadPricingCode["StampDuty"] = "stamp-duty"; | ||
OnRoadPricingCode["Transfer"] = "transfer"; | ||
OnRoadPricingCode["OnRoadCosts"] = "on-road-costs"; | ||
OnRoadPricingCode["Other"] = "other"; | ||
})(OnRoadPricingCode = exports.OnRoadPricingCode || (exports.OnRoadPricingCode = {})); | ||
var AdditionalPricingCode; | ||
(function (AdditionalPricingCode) { | ||
AdditionalPricingCode["Discount"] = "discount"; | ||
AdditionalPricingCode["Freight"] = "freight"; | ||
AdditionalPricingCode["VehicleSourcing"] = "vyro-sourcing"; | ||
AdditionalPricingCode["VyroLifetimeMembership"] = "vyro-lifetime-membership"; | ||
AdditionalPricingCode["VyroSourcingAndFacilitation"] = "vyro-sourcing-and-facilitation"; | ||
AdditionalPricingCode["Accessories"] = "accessories"; | ||
AdditionalPricingCode["Other"] = "other"; | ||
})(AdditionalPricingCode = exports.AdditionalPricingCode || (exports.AdditionalPricingCode = {})); | ||
__exportStar(require("@vyro-x/pricing-client"), exports); |
{ | ||
"name": "@vyro-x/vehicle-order-types", | ||
"description": "Type definitions for Vyro vehicle_orders that are outside of what Hasura provides", | ||
"version": "0.5.0", | ||
"version": "0.6.0", | ||
"main": "lib/index.js", | ||
@@ -23,4 +23,5 @@ "types": "lib/index.d.ts", | ||
"dependencies": { | ||
"@vyro-x/pricing-client": "^0.0.6", | ||
"axios": "0.27.2" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7593
2
177
+ Added@vyro-x/pricing-client@0.0.6(transitive)
+ Added@vyro-x/vehicle-order-types@0.2.1(transitive)
+ Addeddayjs@1.11.13(transitive)
+ Addedlodash@4.17.21(transitive)