/**
* @fileoverview Internal definitions used in VdsClient
*
* @author anders.rejdebrant@spark-vision.com (Anders Rejdebrant)
*/
goog.provide('spv.vds.impl.IVdsProtocol');
goog.require('spv.ds.Config');
goog.require('spv.ds.ConfigLoadResult');
goog.require('spv.ds.FacebookShareData');
goog.require('spv.ds.FreshConfig');
goog.require('spv.ds.ImageResult');
goog.require('spv.ds.IntroPage');
goog.require('spv.ds.SessionStateUpdate');
goog.require('spv.ds.Summary');
goog.require('spv.ds.impl.GoalStateResolver');
goog.require('spv.ds.impl.SessionInitData');
goog.require('spv.vds.CCInputParam');
goog.require('spv.vds.CampaignCollection');
goog.require('spv.vds.CareCustomerOrderResult');
goog.require('spv.vds.ConfigQuickInfoResult');
goog.require('spv.vds.VolvoCarSpec');
goog.require('spv.vds.VolvoRetailer');
/**
* Server protocol interface
*
* @interface
*/
spv.vds.impl.IVdsProtocol = function() {};
/** METHODS FOR MANAGING VDS PRICES */
/**
* @param {string} session_id
* @param {function(spv.vds.VdsPriceMode)} on_success
* @param {function(Error)} on_failure
*/
spv.vds.impl.IVdsProtocol.prototype.sessionGetCurrentPriceMode = function(
session_id,
on_success,
on_failure) { };
/**
* @param {string} session_id
* @param {spv.vds.VdsPriceMode} price_mode
* @param {spv.vds.SendBopUpdateFlag} send_update
* @param {function(spv.ds.SessionStateUpdate, spv.ds.impl.AuxData)} on_state_update
* @param {function()} on_success
* @param {function(Error)} on_failure
*/
spv.vds.impl.IVdsProtocol.prototype.sessionSetPriceMode = function(
session_id,
price_mode,
send_update,
on_state_update,
on_success,
on_failure) { };
/**
* @param {string} session_id
* @param {string} config_name
* @param {function(spv.vds.ConfigQuickInfoResult)} on_success
* @param {function(Error)} on_failure
*/
spv.vds.impl.IVdsProtocol.prototype.getConfigQuickInfo = function(
session_id,
config_name,
on_success,
on_failure) {};
/**
* @param {function(Array.<spv.vds.VolvoRetailer>)} on_success
* @param {function(Error)} on_failure
*/
spv.vds.impl.IVdsProtocol.prototype.getRetailers = function(
on_success,
on_failure) {};
/**
* @param {string} session_id
* @param {function()} on_success
* @param {function(Error)} on_failure
*/
spv.vds.impl.IVdsProtocol.prototype.sessionEnablePrivateLeasing = function(
session_id,
on_success,
on_failure ) {};
/**
* @param {string} session_id
* @param {function()} on_success
* @param {function(Error)} on_failure
*/
spv.vds.impl.IVdsProtocol.prototype.sessionDisablePrivateLeasing = function(
session_id,
on_success,
on_failure ) {};
/**
* @param {string} session_id
* @param {function()} on_success
* @param {function(Error)} on_failure
*/
spv.vds.impl.IVdsProtocol.prototype.sessionDisableCCPrices = function(
session_id,
on_success,
on_failure ) {};
/**
* @param {string} session_id
* @param {function()} on_success
* @param {function(Error)} on_failure
*/
spv.vds.impl.IVdsProtocol.prototype.sessionEnableCCPrices = function(
session_id,
on_success,
on_failure ) {};
/**
* @param {string} session_id
* @param {Object.<string,Object>} input_params
* @param {spv.vds.SendBopUpdateFlag} send_update
* @param {function(spv.ds.SessionStateUpdate, spv.ds.impl.AuxData)} on_state_update
* @param {function(Object.<string,spv.vds.CCInputParam>)} on_success
* @param {function(Error)} on_failure
*/
spv.vds.impl.IVdsProtocol.prototype.sessionUpdateCCInputParams = function(
session_id,
input_params,
send_update,
on_state_update,
on_success,
on_failure ) {};
/**
* @param {spv.ds.Config} config
* @param {string} localization_id
* @param {function(spv.vds.VolvoCarSpec)} on_success
* @param {function(Error)} on_failure
*/
spv.vds.impl.IVdsProtocol.prototype.getSpecification = function(
config,
localization_id,
on_success,
on_failure) {};
/**
* @deprecated Newer versions of the backend has made this method session free. Use getCampaigns() instead.
* @param {string} session_id
* @param {string} feed_id
* @param {function(spv.vds.CampaignCollection)} on_success
* @param {function(Error)} on_failure
*/
spv.vds.impl.IVdsProtocol.prototype.sessionGetCampaigns = function(
session_id,
feed_id,
on_success,
on_failure) {};
/**
* @param {string} feed_id
* @param {function(spv.vds.CampaignCollection)} on_success
* @param {function(Error)} on_failure
*/
spv.vds.impl.IVdsProtocol.prototype.getCampaigns = function(
feed_id,
on_success,
on_failure) {};
/**
* @param {string} session_id
* @param {function(spv.ds.Loan)} on_success
* @param {function(Error)} on_failure
*/
spv.vds.impl.IVdsProtocol.prototype.sessionGetLoan = function(
session_id,
on_success,
on_failure) {};
/**
* @param {string} session_id
* @param {function(Object)} on_success
* @param {function(Error)} on_failure
*/
spv.vds.impl.IVdsProtocol.prototype.sessionGetLeasingParams = function(
session_id,
on_success,
on_failure) {};
/**
* @param {string} session_id
* @param {number} driving_distance
* @param {spv.vds.SendBopUpdateFlag} send_update
* @param {function(spv.ds.SessionStateUpdate, spv.ds.impl.AuxData)} on_state_update
* @param {function(Object)} on_success
* @param {function(Error)} on_failure
*/
spv.vds.impl.IVdsProtocol.prototype.sessionUpdateLeasingParams = function(
session_id,
driving_distance,
send_update,
on_state_update,
on_success,
on_failure) { };
/**
* @param {function(spv.vds.LeasingParams)} on_success
* @param {function(Error)} on_failure
*/
spv.vds.impl.IVdsProtocol.prototype.getAvailableLeasingParams = function(
on_success,
on_failure) { };
/**
* @param {string} session_id
* @param {spv.vds.SendBopUpdateFlag} send_update
* @param {function(spv.ds.SessionStateUpdate, spv.ds.impl.AuxData)} on_state_update
* @param {function(spv.ds.Loan)} on_success
* @param {function(Error)} on_failure
*/
spv.vds.impl.IVdsProtocol.prototype.sessionResetLoan = function(
session_id,
send_update,
on_state_update,
on_success,
on_failure) {};
/**
* @param {string} session_id
* @param {string} customer_first_name
* @param {string} customer_surname
* @param {string} customer_email
* @param {string} customer_phone
* @param {string} preferred_contact_time
* @param {string} preferred_contact_media
* @param {boolean} want_newsletter
* @param {boolean} want_summary_pdf
* @param {string} retailer_id
* @param {string} mail_link_url
* @param {function()} on_success
* @param {function(Error)} on_failure
*/
spv.vds.impl.IVdsProtocol.prototype.sessionSendMailToCustomerAndRetailer = function(
session_id,
customer_first_name,
customer_surname,
customer_email,
customer_phone,
preferred_contact_time,
preferred_contact_media,
want_newsletter,
want_summary_pdf,
retailer_id,
mail_link_url,
on_success,
on_failure ) {};
/**
* @param {string} session_id
* @param {string} customer_first_name
* @param {string} customer_surname
* @param {string} customer_email
* @param {string} customer_phone
* @param {string} retailer_id
* @param {function()} on_success
* @param {function(Error)} on_failure
*/
spv.vds.impl.IVdsProtocol.prototype.sessionSendToTacdis = function(
session_id,
customer_first_name,
customer_surname,
customer_email,
customer_phone,
retailer_id,
on_success,
on_failure) { };
/**
* @param {string} session_id
* @param {string} customer_first_name
* @param {string} customer_surname
* @param {string} customer_email
* @param {string} customer_phone
* @param {string} preferred_contact_time
* @param {string} preferred_contact_media
* @param {boolean} want_quote
* @param {boolean} want_newsletter
* @param {string} mail_link_url
* @param {string} retailer_id
* @param {function()} on_success
* @param {function(Error)} on_failure
*/
spv.vds.impl.IVdsProtocol.prototype.sessionSendCustomerMailAndTacdis = function(
session_id,
customer_first_name,
customer_surname,
customer_email,
customer_phone,
preferred_contact_time,
preferred_contact_media,
want_quote,
want_newsletter,
mail_link_url,
retailer_id,
on_success,
on_failure) { };
/**
* @param {string} session_id
* @param {string} customer_email
* @param {boolean} want_newsletter
* @param {boolean} want_summary_pdf
* @param {string} mail_link_url
* @param {function()} on_success
* @param {function(Error)} on_failure
*/
spv.vds.impl.IVdsProtocol.prototype.sessionSendMailToCustomer = function(
session_id,
customer_email,
want_newsletter,
want_summary_pdf,
mail_link_url,
on_success,
on_failure ) {};
/**
* @param {string} session_id
* @param {string} customer_first_name
* @param {string} customer_surname
* @param {string} customer_address
* @param {number} customer_zipcode
* @param {string} customer_city
* @param {string} customer_email
* @param {string} customer_phone
* @param {string} skype_name
* @param {string} preferred_contact_media
* @param {string} free_text
* @param {string} retailer_id
* @param {string} mail_link_url
* @param {function()} on_success
* @param {function(Error)} on_failure
*/
spv.vds.impl.IVdsProtocol.prototype.sessionSendVolvoCareMailToRetailer = function(
session_id,
customer_first_name,
customer_surname,
customer_address,
customer_zipcode,
customer_city,
customer_email,
customer_phone,
skype_name,
preferred_contact_media,
free_text,
retailer_id,
mail_link_url,
on_success,
on_failure) { };
/**
* @param {string} session_id
* @param {number} down_payment
* @param {number} interest_rate
* @param {number} number_of_months
* @param {spv.vds.SendBopUpdateFlag} send_update
* @param {function(spv.ds.SessionStateUpdate, spv.ds.impl.AuxData)} on_state_update
* @param {function(spv.ds.Loan)} on_success
* @param {function(Error)} on_failure
*/
spv.vds.impl.IVdsProtocol.prototype.sessionSetLoan = function(
session_id,
down_payment,
interest_rate,
number_of_months,
send_update,
on_state_update,
on_success,
on_failure) { };
/**
* @param {string} session_id
* @param {string} business_group_retailer_id
* @param {function()} on_success
* @param {function(Error)} on_failure
*/
spv.vds.impl.IVdsProtocol.prototype.sessionSetRetailerBusinessGroup = function (
session_id,
business_group_retailer_id,
on_success,
on_failure) { };
/**
* @param {string} session_id
* @param {string} template_name
* @param {string} retailer_id
* @param {function(string)} on_success
* @param {function(Error)} on_failure
*/
spv.vds.impl.IVdsProtocol.prototype.sessionGenerateRetailerHtmlForPdf = function(
session_id,
template_name,
retailer_id,
on_success,
on_failure) {};
/**
* @param {string} session_id
* @param {string} retid_delivery
* @param {string} retid_sales
* @param {string} customer_first_name
* @param {string} customer_last_name
* @param {string} customer_street_address
* @param {string} customer_city
* @param {string} customer_postal_code
* @param {string} customer_phone
* @param {string} customer_email
* @param {boolean} redirect
* @param {boolean} attachment
* @param {function(spv.vds.CareCustomerOrderResult)} on_success
* @param {function(Error)} on_failure
*/
spv.vds.impl.IVdsProtocol.prototype.sessionCareSendCustomerOrder = function(
session_id,
retid_delivery,
retid_sales,
customer_first_name,
customer_last_name,
customer_street_address,
customer_city,
customer_postal_code,
customer_phone,
customer_email,
redirect,
attachment,
on_success,
on_failure
){};