Repository URL to install this package:
|
Version:
1.1.3 ▾
|
import Config from './config';
import IntroPageConfig from './introPageConfig';
export declare namespace interfaces {
interface Configuration {
title: string;
disable_build: boolean;
small_desc: string;
price_text: string;
image_config: ImageConfiguration;
link_config: LinkConfiguration;
}
interface GroupExtra {
Ipad: IpadGroupAuxiliary;
[index: string]: any;
}
interface Groups {
icon_name: string;
short_desc: string;
long_desc: string;
header: string;
configs: Configuration[];
group_extras: GroupExtra;
banner_images: Image[];
}
interface Image {
path: string;
platform: string;
}
interface ImageConfiguration {
frame: number;
enc_type: string;
data: string;
}
interface IpadGroupAuxiliary {
Images: Image[];
}
interface IpadMiscAuxiliary {
intro_text: string;
background_image: string;
}
interface LinkConfiguration {
enc_type: string;
data: string;
}
interface Root {
groups: Groups[];
intro_page_extras: RootExtra;
source_checksum: string;
}
interface RootExtra {
Ipad: IpadMiscAuxiliary;
[index: string]: any;
}
interface BipAttemptActivated {
attempt_result_code: 'ACTIVATED';
bop: OutBop;
}
interface BipAttemptMultipleResolvers {
attempt_result_code: 'MULTIPLE_RESOLVERS';
multiple_resolvers: OutResolvers[];
resolvers_text: string;
}
interface BipAttemptResolvers {
attempt_result_code: 'RESOLVERS';
resolvers: OutResolvers;
resolvers_text: string;
}
type BipAttempt = BipAttemptActivated | BipAttemptMultipleResolvers | BipAttemptResolvers;
interface BumpMenu {
id: string;
name: string;
short_text: string;
}
interface Bump {
version: string;
items: BumpItem[];
menus: BumpMenu[];
series: BumpSerie[];
gui_url: string;
icon_url: string;
composed_url: string;
readmore_content_url: string;
summary_content_url: string;
reset_time_sec: number;
initial_serie: string;
initial_frame: number;
category: string;
}
interface BumpItem {
id: string;
name: string;
information: string;
short_text: string;
medium_text: string;
long_text: string;
campaign_text: string;
}
interface BumpSerie {
id: string;
model_id: string;
index: number;
first_frame: number;
last_frame: number;
frames_order: number[];
extension: string;
image_width: number;
image_output_width: number;
image_height: number;
image_output_height: number;
}
interface Campaign {
/** This property contains the original data from the campaign feed. */
external_values: any;
/** Input config used to validate this campaign */
input_config: Config;
/** Extra information for this campaign */
item_short_texts: {
[index: string]: string;
};
/**
* Output/result config from validation
*
* If the input_config and output_config is not identical the server
* could not load this campaign properly and the campaign should not be
* presented to the user.
*/
output_config: Config;
}
interface CampaignCollection {
/**
* This array can contain campaigns if there are any validated campaigns
* available for the requested campaign feed.
*/
campaigns: Campaign[];
/**
* This property can contain information from internal server errors for
* debugging and logging.
*/
error: string;
/**
* The server is currently working on validating refreshed campaign data.
*
* Updating the campaign collections can take a significant amount of time
* due to the need to test load campaigns to assure compatibility with the
* currently available content data. To avoid timing out the connection this
* property will be set instead to indicate to the client that a refresh is
* recommended within a minute or two.
*
* The typical usage for this propery is for the GUI to display a loading
* indicator until refreshed campaign data can be retrieved.
*/
is_being_refreshed: boolean;
/** Timestamp for last refresh */
refreshed: string;
}
interface ConfigBop {
bops: OutBop[];
result_code: string;
}
interface ConfigInfoImage {
ReferenceKey: string;
Url: string;
}
/**
* Holds a serialized configuration state of dynamic encoding.
*/
interface ConfigLoadResult {
/** A configuration was fully loaded */
complete_success: boolean;
/** There were some warnings */
warnings?: string;
}
interface ConfigQuickInfo {
config_name: string;
date_created: string;
engine: string;
model: string;
model_variant: string;
}
interface ConfigQuickInfoResult {
result: ConfigQuickInfo[];
}
interface Disclaimer {
/** Tells if there's an active disclaimer or not. */
active: boolean;
/** The very informative text of the disclaimer. */
text: string;
}
/**
* The data contained in this class is generated by DsClient and should not be
* explicitly constructed by the user.
*
* This struct holds information on how to present a price.
* It includes the currency and the price value and where the currency symbol
* should be placed (pre/postfix).
* If use_text is true then it's expected to display the 'text' property instead
* of the price.
*
* Legacy: Only a text with a pre-formatted price was used before the addition of
* this datastructure.
* Please inquire about backend-plugin support if this struct is used to replace
* the deprecated string properties in an established client. Existing plugins
* may not properly populate it.
*/
interface DisplayPrice {
currency_is_prefixed: boolean;
currency_symbol: string;
decimals: number;
price_value: number;
text: string;
use_text: boolean;
}
interface FacebookShareData {
caption: string;
description: string;
link: string;
message: string;
name: string;
picture: string;
}
interface FreshConfig {
checksum: string;
img_url: string;
items: string[];
meta: {
[index: string]: string;
};
name: string;
timestamp: number;
}
interface GuiPath {
items: GuiPathItem[];
}
interface GuiPathItem {
id: string;
short_text: string;
}
/**
* This data structure holds all parameters used in image requests. The default values initialized by the
* constructor are not recommended, the context should provide a factory function for default construction.
*
* The image compose process goes as follows.
*
* 1. Image is rendered to it's native resolution
* 2. Image is scaled according to scaled_width and scaled_height
* 3. Image is cropped according to cropped_width and cropped_height
* 4. Image is auto cropped if auto_crop is set
* 5. Image is saved
*
* Note that a "0" in scaled_width, scaled_height, cropped_width or cropped_height means that it will use
* the "native/source" value for that dimension. If auto_crop is set however, and exactly one of scaled_width
* or scaled_height is set to "0", the "0" will be replaced with a value that keeps the source aspect ratio.
*/
interface ImageParams {
/** Automatically crops the image of all bordering "empty" pixels */
auto_crop: boolean;
/** Specifies the color of the background. Should be a hexadecimal string representing the color. */
bg_color_hex: string;
/** Distribution of the cropped pixels along the X axis (0 = Crop right, 0.5 = Equal, 1 = Crop left) */
crop_x_ratio: number;
/** Distribution of the cropped pixels along the Y axis (0 = Crop bottom, 0.5 = Equal, 1 = Crop top) */
crop_y_ratio: number;
/** Height of image after crop */
cropped_height: number;
/** Width of image after crop */
cropped_width: number;
/** Type of image (png or jpg) */
file_type: 'png' | 'jpg';
/** Index for the frame/angle */
frame: number;
/** Keep aspect ratio (set any of scaled_width or scaled_height in order for it to have any effect) */
keep_aspect_ratio: boolean;
/** The only items that should contribute to the image */
only_use: string[];
/** The only item groups that should contribute to the image */
only_use_groups: string[];
/** Height that the rendered image should be scaled to */
scaled_height: number;
/** Width that the rendered image should be scaled to */
scaled_width: number;
/** Name of the series to be used (EXTERIOR or INTERIOR in most cases) */
serie_name: 'INTERIOR' | 'EXTERIOR';
/** Items that should not contribute to the image (S-TENT is often set here) */
skip: string[];
/** Itemgroups that should not contribute to the image */
skip_groups: string[];
/** Use HD material */
use_hd: boolean;
}
interface ImageResult {
image_url: string;
}
/**
* Information about the image serie for the current configuration
*/
interface ImageSerieInfo {
first_frame: number;
frames_order: number[];
image_height: number;
image_output_height: number;
image_output_width: number;
image_width: number;
index: number;
last_frame: number;
model_id: string;
name: string;
}
interface IntroPage {
groups: IntroPageGroup[];
intro_page_extras: any[];
source_checksum?: string;
}
interface IntroPageGroup {
banner_images: IntroPageImage[];
configs: IntroPageConfig[];
group_extras: any[];
header: string;
icon_name: string;
long_desc: string;
short_desc: string;
}
interface IntroPageImage {
path: string;
platform: string;
}
interface ItemResources {
has_readmore: boolean;
icon: string;
name: string;
short_text: string;
}
interface ItemState {
selected: boolean;
visible: boolean;
}
interface ItemSummary {
item_id: string;
item_text: string;
/** Please refer to the DisplayPrice documentation. */
item_price: DisplayPrice;
/** @deprecated Use the item_price {DisplayPrice} property instead. */
item_price_text: string;
menu_id: string;
menu_text: string;
gui_paths: GuiPath[];
/** Untyped extra data that has to be intepreted at run time. */
aux_data: {
[index: string]: string;
};
}
interface LeasingOutput {
available_driving_distances: number[];
available_leasing_durations: number[];
financing_type: string;
bop: OutBop;
driving_distance: number;
payment_periods: number;
down_payment_percent: number;
interest_rate: number;
car_price: number;
units: LeasingUnits;
prices: LeasingPrices;
price_result_status: LeasingPriceResultStatus;
}
interface LeasingUnits {
payment_periods_unit: string;
down_payment_percent_unit: string;
interest_rate_unit: string;
car_price_unit: string;
total_cost_unit: string;
loan_cost_unit: string;
residual_value_unit: string;
service_cost_unit: string;
insurance_cost_unit: string;
}
interface LeasingPrices {
total_cost: number;
loan_cost: number;
residual_value: number;
service_cost: number;
insurance_cost: number;
}
interface Loan {
arrangement_fee: number;
currency: string;
currency_monthly: string;
currency_position: string;
down_payment: number;
down_payment_ratio_max: number;
down_payment_ratio_min: number;
interest_rate: number;
interest_rate_max: number;
interest_rate_min: number;
invoice_fee: number;
monthly_loan_price: number;
number_of_months: number;
number_of_months_max: number;
number_of_months_min: number;
total_purchase_price: number;
}
interface MenuItem {
category: string;
disabled: boolean;
gui_group: string;
has_long_text: boolean;
icon: string;
id: string;
image: string;
loan?: number;
long_text: string;
medium_text: string;
movie: string;
music: string;
price: DisplayPrice;
price_text: string;
selected: boolean;
short_text: string;
swf: string;
visible: boolean;
}
interface MenuNode {
children: MenuNode[];
id: string;
node_type: 'ITEM' | 'MENU' | 'SEPARATOR' | 'SUBGROUP';
}
interface OutBop {
active_item: string;
active_menu: string;
aux_carrier: any;
category: string;
complex_subscriptions: OutBopUpdate[];
frame: number;
group_id: string;
image_filename: string;
is_reversed: boolean;
is_summary: boolean;
is_wrap: boolean;
mask_filename: string;
menu_tree: MenuNode;
model_id: string;
serie: number;
subscriptions: OutBopSubscription[];
summaries: OutBopSummary[];
summary_images: string[];
total_price: DisplayPrice;
total_price_text: string;
updates: OutBopUpdate[];
}
interface OutBopSubscription {
id: string;
}
interface OutBopSummary {
aux_carrier: any;
gui_paths: GuiPath[];
item_id: string;
item_price: DisplayPrice;
item_price_text: string;
item_text: string;
menu_id: string;
menu_text: string;
}
interface OutBopUpdate {
aux_carrier: any;
background_image: string;
category: string;
detail_text: string;
disabled: boolean;
gui_group: string;
has_readmore: boolean;
icon: string;
id: string;
image: string;
information: string;
movie: string;
music: string;
name: string;
price: DisplayPrice;
price_text: string;
selectable: boolean;
selected: boolean;
short_text: string;
swf: string;
visible: boolean;
}
interface OutResolvers {
trigger_items: OutBopUpdate[];
deactivated_items: OutBopUpdate[];
}
interface PresentationStructure {
filter: string;
items: {
[index: string]: ItemState;
};
nodes: {
[index: string]: string[];
};
query: PresentationStructureQuery;
}
interface PresentationStructureQueryOptions {
exclude_empty_groups?: boolean;
only_selected?: boolean;
only_visible?: boolean;
}
interface PresentationStructureQuery {
options: PresentationStructureQueryOptions;
path_regex: string;
}
interface PriceModeResult {
bop: OutBop;
current_price_mode: VDSPriceMode;
result_code: SetPriceModeResultCode;
}
interface PublicConfigInfo {
ConfigStorageAux: {
[index: string]: string;
};
Description: string;
Guid: string;
Images: ConfigInfoImage[];
}
interface ReadMoreResource {
attachment: boolean;
attachment_link_text: string;
auto_play?: boolean;
bitrate_bitps?: number;
file_size: number;
height?: number;
media_group: string;
media_index: number;
media_tag: string;
path: string;
resource_type: string;
start_time_ms?: number;
width?: number;
}
interface SavedConfig {
name: string;
configs: {
[index: string]: Config;
};
}
/**
* If the ServiceInfo.has_message is true, then the message must be displayed
* before initializing the client.
* If blocking_dialog is true then the client shouldn't be allowed to start at all.
* This is usually in the case of maintanence.
*/
interface ServiceInfo {
blocking_dialog: boolean;
has_message: boolean;
message: string;
service_url: string;
}
interface SessionInitData {
session_id: string;
bumps: Bump[];
intro_page: IntroPage;
}
interface SessionStateUpdate {
active_item: string;
active_menu: string;
category: string;
complex_subscriptions: MenuItem[];
frame: number;
group_id: string;
image_filename: string;
is_reversed: boolean;
is_wrap: boolean;
loan?: Loan;
mask_filename: string;
menu_items: MenuItem[];
menu_tree: MenuNode;
model_id: string;
serie: number;
subscription_ids: string[];
total_price: DisplayPrice;
total_price_text: string;
}
/**
* Represents one configuration change suggestion. Suggestions are generated when the configurator logic
* engine finds relevant alternatives to the requested goal state. This object is instantiated by
* DsClient and should not be constructed by caller code.
*/
interface Suggestion {
/**
* This is the data needed by the current implementation and it is expected to change in type and content
* over time as the suggestion capabilities improve. Caller code of DsClient should not inspect or modify
* this member.
*
* Only the internals of spv.ds.DsClient should use this member.
*/
internal_data: string[];
/**
* Items in this array will be added to the configuration if this suggestion is activated on the related
* configuration.
*
* This member can safely be inspected and used by GUI code.
*/
items_to_add: MenuItem[];
/**
* Items in this array will be removed from the configuration if this suggestion is activated on the related
* configuration.
*
* This member can safely be inspected and used by GUI code.
*/
items_to_remove: MenuItem[];
}
interface Summary {
item_summaries: ItemSummary[];
}
interface UserConfigInfo {
config_storage_aux: {
[index: string]: string;
};
description: string;
id: number;
image_urls: {
[index: string]: string;
};
name: string;
timestamp: string;
user_storage_aux: {
[index: string]: string;
};
}
interface VolvoCarSpec {
cis_car_spec: string;
items: VolvoCarSpecItem[];
price_currency_sign?: string;
price_localization_id?: string;
technical_data: VolvoCarSpecTechData[];
total_price: number;
}
interface VolvoCarSpecItem {
activation_type: string;
cis_id: string;
ds_id: string;
item_type: string;
price: number;
properties: {
[index: string]: any;
};
}
interface VolvoCarSpecTechData {
name: string;
value: any;
}
interface VolvoRetailer {
address_2: string;
center_district: string;
company_email: string;
country: string;
district: string;
fax: string;
home_page: string;
id: string;
latitude: string;
longitude: string;
mail_address: string;
mail_post_number: string;
mail_post_town: string;
name: string;
new_cars_email: string;
new_contact_email: string;
occupation: string;
phone: string;
region: string;
structure_type: string;
used_cars_email: string;
visit_address: string;
visit_post_number: string;
visit_post_town: string;
}
type VDSPriceMode = 'None' | 'Loan' | 'CompanyCars' | 'VolvoCare';
type SetPriceModeResultCode = 'SUCCESS' | 'FAILED' | 'CONFIG_CHANGE';
type LeasingPriceResultStatus = 'Success' | 'LeasingValuesMissing';
type BopReadMoreMode = 'AVAILABILITY_FLAG' | 'FULL_TEXT';
type SendBopUpdateFlag = 'Always' | 'Never' | 'IfNeeded';
}