diff --git a/dw/campaign/CouponStatusCodes.js b/dw/campaign/CouponStatusCodes.js index 8b06240..78ffa25 100644 --- a/dw/campaign/CouponStatusCodes.js +++ b/dw/campaign/CouponStatusCodes.js @@ -12,5 +12,4 @@ CouponStatusCodes.TIMEFRAME_REDEMPTION_LIMIT_EXCEEDED = 'TIMEFRAME_REDEMPTION_LI CouponStatusCodes.COUPON_ALREADY_IN_BASKET = 'COUPON_ALREADY_IN_BASKET'; CouponStatusCodes.APPLIED = 'APPLIED'; - module.exports = CouponStatusCodes; \ No newline at end of file diff --git a/dw/customer/AuthenticationStatus.js b/dw/customer/AuthenticationStatus.js new file mode 100644 index 0000000..eb738b5 --- /dev/null +++ b/dw/customer/AuthenticationStatus.js @@ -0,0 +1,26 @@ +const AuthenticationStatus = function() { + +} + +AuthenticationStatus.prototype.getCustomer = function getCustomer() { + +} + +AuthenticationStatus.prototype.getStatus = function getStatus() { + +} + +AuthenticationStatus.prototype.isAuthenticated = function isAuthenticated() { + +} + +Object.assign(AuthenticationStatus, { + AUTH_OK: "AUTH_OK", + ERROR_CUSTOMER_DISABLED: "ERROR_CUSTOMER_DISABLED", + ERROR_CUSTOMER_LOCKED: "ERROR_CUSTOMER_LOCKED", + ERROR_CUSTOMER_NOT_FOUND: "ERROR_CUSTOMER_NOT_FOUND", + ERROR_PASSWORD_EXPIRED: "ERROR_PASSWORD_EXPIRED", + ERROR_PASSWORD_MISMATCH: "ERROR_PASSWORD_MISMATCH", +}); + +module.exports = AuthenticationStatus; \ No newline at end of file diff --git a/dw/customer/Customer.js b/dw/customer/Customer.js index 52d4129..6833b96 100644 --- a/dw/customer/Customer.js +++ b/dw/customer/Customer.js @@ -1,5 +1,7 @@ var Customer = function(){}; +Customer.AuthenticationStatus = require('./AuthenticationStatus'); + Customer.prototype.isRegistered = function(){}; Customer.prototype.getID = function(){}; Customer.prototype.getCustomerGroups = function(){}; diff --git a/dw/customer/CustomerMgr.js b/dw/customer/CustomerMgr.js index 0db36b1..6194d8c 100644 --- a/dw/customer/CustomerMgr.js +++ b/dw/customer/CustomerMgr.js @@ -15,6 +15,12 @@ CustomerMgr.getExternallyAuthenticatedCustomerProfile = function(){}; CustomerMgr.loginExternallyAuthenticatedCustomer = function(){}; CustomerMgr.getCustomerByCustomerNumber = function(){}; CustomerMgr.createCustomer = function() {}; +CustomerMgr.authenticateCustomer = function() {}; +CustomerMgr.loginCustomer = function() {}; +CustomerMgr.getCustomerByLogin = function() {}; +CustomerMgr.isAcceptablePassword = function isAcceptablePassword() {}; +CustomerMgr.logoutCustomer = function logoutCustomer() {}; + CustomerMgr.prototype.customerGroups=null; CustomerMgr.prototype.profile=null; CustomerMgr.prototype.registeredCustomerCount=null; diff --git a/dw/system.js b/dw/system.js index 28de6f6..f19d0a4 100644 --- a/dw/system.js +++ b/dw/system.js @@ -11,4 +11,5 @@ exports.SitePreferences = require('./system/SitePreferences.js'); exports.Status = require('./system/Status.js'); exports.StatusItem = require('./system/StatusItem.js'); exports.System = require('./system/System.js'); +exports.Transaction = require('./system/Transaction.js'); exports.Logger = require('./system/Logger.js'); diff --git a/dw/system/Site.js b/dw/system/Site.js index aa96f6b..dea3993 100644 --- a/dw/system/Site.js +++ b/dw/system/Site.js @@ -33,4 +33,7 @@ Site.prototype.timezone=null; Site.prototype.timezoneOffset=null; Site.prototype.calendar=null; + +Site.current = new Site(); + module.exports = Site; \ No newline at end of file