// ----------------------------------------------------------------------------- // Enum Typedefs // ----------------------------------------------------------------------------- /** * Our lovely store chains * @typedef {"lat" | "s5a" | "o5a" | "bay"} Banner */ /** * Possible types of customers * @typedef {"guest" | "registered" | "employee"} CustomerType */ /** * Enum describing the possible responses * @typedef {"reject" | "review" | "accept"} RecommendationCode */ // ----------------------------------------------------------------------------- // Model Typedefs // ----------------------------------------------------------------------------- /** * Envelope data * @typedef {Object} AdditionalData * @property {string} inAuthId */ /** * General address model * @typedef {Object} Address * @property {string} name * @property {string} streetLineOne * @property {string} [streetLineTwo] * @property {string} city * @property {string} state * @property {string} zip * @property {string} country */ /** * A customer's complete credit card information * @typedef {Object} CreditCard * @property {string} nameOnCard * @property {Address} billingAddress * @property {string} cardType * @property {string} cardNumber * @property {number} authorizedAmount * @property {number} fullAmount * @property {string} expiryDate MM-YY that the credit card expires * @property {string} authCode CVV code on the back of the card * @property {number} responseCode * @property {number} [merchantId] * @property {string} [registerNumber] * @property {string} transactionNumber * @property {string} avsResponse Address Verification System response, Codes are available here: https://www.chasepaymentech.com/address_verification_service.html */ /** * Customer model * @typedef {Object} Customer * @property {CustomerType} customerType * @property {string} accountId * @property {string} creationDate * @property {string} firstName * @property {string} lastName * @property {string} emailAddress */ /** * Response model to OMS containing the transaction they've sent and the decision we've made * @typedef {Object} DbRecord * @property {string} transactionId * @property {string} [lastModifiedDate] * @property {string} [createdDate] Date this record was first created within the database * @property {Transaction} transaction * @property {Decision} decision */ /** * Defines decision information * @typedef {Object} Decision * @property {string} transactionId * @property {RecommendationCode} recommendationCode * @property {string} [crossReference] * @property {string} [rulesTripped] * @property {number} totalScore * @property {string} [remarks] */ /** * Error response model * @typedef {Object} Error * @property {string} message Error description message * @property {string} error Error code */ /** * Single item * @typedef {Object} Item * @property {number} svsNumber Product style number (parent number) * @property {number} skuNumber HBC internally generated number for items (alias SKN) * @property {number} [upcNumber] The number on the barcode that could be used across different retailers * @property {number} [classNumber] Signifies business category of an item (pants, tops, shirts, etc.) * @property {string} [color] * @property {string} [size] * @property {string} currentStatus * @property {number} department * @property {string} [signOnDelivery] * @property {boolean} [giftWrapped] * @property {number} [costAmount] * @property {number} [marginAmount] * @property {string} description * @property {number} price Price of single item * @property {number} extendedPrice Total price of all items ordered * @property {number} quantity * @property {number} groupNumber * @property {Address} shippingAddress * @property {string} shippingMethod * @property {string} shippingCountry */ /** * Promotion model * @typedef {Object} Promo * @property {string} promotionCode * @property {number} promotionAmount Dollar amount discounted by the promotion */ /** * Defines data expected to come in from OMS describing a transaction * @typedef {Object} Transaction * @property {string} orderId * @property {string} groupId * @property {number} orderTotal * @property {number} shippingCost * @property {string} currencyCode * @property {number} storeNumber * @property {string} [salesRep] * @property {string} [lastModifiedDate] * @property {Banner} banner * @property {CreditCard} creditCard * @property {Promo[]} [promos] * @property {Item[]} items * @property {string} [ipAddress] * @property {string} source Order source (web, store, etc) * @property {Customer} customer * @property {AdditionalData} [additionalData] Additional `envelope` data sent through our system to f-s, should include InAuthId */ // ----------------------------------------------------------------------------- // Union Typedefs // -----------------------------------------------------------------------------