feature/IO-3357-Reynolds-and-Reynolds-DMS-API-Integration - Checkpoint - Remove old attempt at Reynolds Integration in favor of new library.
This commit is contained in:
1
server/rr/lib/index.cjs
Normal file
1
server/rr/lib/index.cjs
Normal file
File diff suppressed because one or more lines are too long
1
server/rr/lib/index.mjs
Normal file
1
server/rr/lib/index.mjs
Normal file
File diff suppressed because one or more lines are too long
3
server/rr/lib/types.cjs
Normal file
3
server/rr/lib/types.cjs
Normal file
@@ -0,0 +1,3 @@
|
||||
'use strict';
|
||||
// CJS access point for JSDoc typedefs
|
||||
module.exports = require('./types.js');
|
||||
144
server/rr/lib/types.js
Normal file
144
server/rr/lib/types.js
Normal file
@@ -0,0 +1,144 @@
|
||||
/**
|
||||
* @typedef {Object} RRClientConfig
|
||||
* @property {string} baseUrl Base URL of the Rome endpoint
|
||||
* @property {string} username WS-Security username
|
||||
* @property {string} password WS-Security password
|
||||
* @property {'Text'|'Digest'} [wssePasswordType] Password type (defaults to Text)
|
||||
* @property {number} [timeoutMs] Request timeout in milliseconds
|
||||
* @property {{max?: number}} [retries] Retry configuration
|
||||
* @property {{ info:Function, warn:Function, error:Function, debug:Function }} [logger] Custom logger implementation
|
||||
*/
|
||||
|
||||
/** Dealer/store routing (required each call). */
|
||||
export const _routingDoc = null;
|
||||
/**
|
||||
* @typedef {Object} Routing
|
||||
* @property {string} dealerNumber
|
||||
* @property {string} [storeNumber]
|
||||
* @property {string} [areaNumber]
|
||||
*/
|
||||
|
||||
/** Optional envelope overrides; BODId/CreationDateTime auto-generated if omitted. */
|
||||
export const _envelopeDoc = null;
|
||||
/**
|
||||
* @typedef {Object} EnvelopeOptions
|
||||
* @property {string} [bodId]
|
||||
* @property {string|Date} [creationDateTime]
|
||||
* @property {{ component?: string, task?: string, referenceId?: string }} [sender]
|
||||
*/
|
||||
|
||||
/** Per-call options */
|
||||
export const _callOptionsDoc = null;
|
||||
/**
|
||||
* @typedef {Object} CallOptions
|
||||
* @property {Routing} routing
|
||||
* @property {EnvelopeOptions} [envelope]
|
||||
*/
|
||||
|
||||
/** @template T @typedef {Object} RRResult { @property {boolean} success @property {T} [data] @property {any} parsed @property {{request:string,response:string}} xml @property {{transaction?:any,roRecord?:any}} [statusBlocks] @property {any} [applicationArea] } */
|
||||
|
||||
/** @typedef {Object} CombinedSearchName { @property {string} [fname] @property {string} [lname] @property {string} [mname] @property {string} [name] } */
|
||||
/** @typedef {Object} CombinedSearchQuery
|
||||
* @property {'phone'|'license'|'vin'|'name'|'nameRecId'|'stkNo'} kind Search kind (only one criterion allowed)
|
||||
* @property {string|number|{phone:string}} [phone] Phone number criterion
|
||||
* @property {string|number|{license:string}} [license] License plate criterion
|
||||
* @property {string|number|{vin:string}} [vin] VIN criterion
|
||||
* @property {CombinedSearchName} [name] Customer name criterion
|
||||
* @property {string|number|{custId:string}|{nameRecId:string}} [nameRecId] Name record ID criterion
|
||||
* @property {string|number|{stkNo:string}} [stkNo] Stock number criterion
|
||||
* @property {number} [maxResults] Max results (capped at 50)
|
||||
* @property {string} [make] Vehicle make filter
|
||||
* @property {string|number} [model] Vehicle model filter
|
||||
* @property {string|number} [year] Vehicle year filter
|
||||
} */
|
||||
/** @typedef {Object} CombinedSearchVehicleDetail { @property {string} [LicNo] } */
|
||||
/** @typedef {Object} CombinedSearchVehicle { @property {string} [Vin] @property {string} [VehicleMake] @property {string|number} [VehicleYr] @property {string} [MdlNo] @property {string} [ModelDesc] @property {string} [Carline] @property {string} [ExtClrDesc] @property {string} [IntClrDesc] @property {string} [MakeName] @property {CombinedSearchVehicleDetail} [VehicleDetail] } */
|
||||
/** @typedef {Object} CombinedSearchVehicleWarranty { @property {string} [ContractNumber] @property {string} [ExpirationDate] @property {string|number} [ExpirationMileage] } */
|
||||
/** @typedef {Object} CombinedSearchAdvisorContactInfo { @property {string|number} [NameRecId] } */
|
||||
/** @typedef {Object} CombinedSearchAdvisor { @property {CombinedSearchAdvisorContactInfo} [ContactInfo] } */
|
||||
/** @typedef {Object} CombinedSearchVehicleServInfo { @property {string|number} [CustomerNo] @property {string|number} [SalesmanNo] @property {string|number} [InServiceDate] @property {string|number} [Mileage] @property {string} [TeamCode] @property {CombinedSearchVehicleWarranty} [VehExtWarranty] @property {CombinedSearchAdvisor} [Advisor] @property {string[]} [VehServComments] } */
|
||||
/** @typedef {Object} CombinedSearchServVehicle { @property {CombinedSearchVehicle} [Vehicle] @property {CombinedSearchVehicleServInfo} [VehicleServInfo] } */
|
||||
/** @typedef {Object} CombinedSearchNameId { @property {string|number} [NameRecId] @property {'I'|'B'} [IBFlag] @property {Object} [IndName] @property {Object} [BusName] } */
|
||||
/** @typedef {Object} CombinedSearchNameContactId { @property {CombinedSearchNameId} [NameId] @property {Object[]} [Address] @property {Object[]} [ContactOptions] @property {Object[]} [Phone] @property {Object[]} [Email] } */
|
||||
/** @typedef {Object} CombinedSearchMessage { @property {string|number} [MessageNo] @property {string} [Text] } */
|
||||
/** @typedef {Object} CombinedSearchBlock { @property {CombinedSearchNameContactId} [NameContactId] @property {CombinedSearchServVehicle[]} [ServVehicle] @property {CombinedSearchMessage[]} [Message] } */
|
||||
|
||||
/** @typedef {Object} CustomerAddress { @property {'P'|'B'|'M'|'S'|'D'} [type] @property {string} line1 @property {string} [line2] @property {string} [city] @property {string} [state] @property {string} [postalCode] @property {string} [county] @property {string} [country] } */
|
||||
/** @typedef {Object} CustomerPhone { @property {'H'|'W'|'M'|'C'|'F'} [type] @property {string|number} number @property {string|number} [extension] } */
|
||||
/** @typedef {Object} CustomerEmail { @property {string} address } */
|
||||
/** @typedef {Object} CustomerBirthDate { @property {'P'|'S'} [type] @property {string} date } */
|
||||
/** @typedef {Object} CustomerSSN { @property {'P'|'S'} [type] @property {string} ssn } */
|
||||
/** @typedef {Object} CustomerDriver { @property {'P'|'S'} [type] @property {string} licenseNumber @property {string} [licenseState] @property {string} [licenseExpDate] } */
|
||||
/** @typedef {Object} CustomerChild { @property {string} name } */
|
||||
/** @typedef {Object} CustomerPersonal { @property {'M'|'F'|'U'} [gender] @property {string} [otherName] @property {string} [anniversaryDate] @property {string} [employerName] @property {string} [employerPhone] @property {string} [occupation] @property {string} [optOut] @property {string} [optOutUse] @property {CustomerBirthDate[]} [birthDates] @property {CustomerSSN[]} [ssns] @property {CustomerDriver} [driver] @property {CustomerChild[]} [children] } */
|
||||
/** @typedef {Object} CustomerDmsFollowup { @property {string} type @property {string} value } */
|
||||
/** @typedef {Object} CustomerDmsInfo { @property {string} [taxExemptNum] @property {string} [salesTerritory] @property {string} [deliveryRoute] @property {string} [salesmanNum] @property {string} [lastContactMethod] @property {CustomerDmsFollowup[]} [followups] } */
|
||||
/** @typedef {Object} InsertCustomerPayload
|
||||
* @property {'I'|'B'} [ibFlag] Individual/Business flag (auto-inferred if omitted)
|
||||
* @property {'R'|'W'|'I'|'Retail'|'Wholesale'|'Internal'} [customerType] Customer type
|
||||
* @property {string} [createdBy] Username or identifier creating the record
|
||||
* @property {string} [customerName] Business name (alias for lastName when business)
|
||||
* @property {string} [lastName] Last name or business name
|
||||
* @property {string} [firstName] First name (required for individuals)
|
||||
* @property {string} [midName] Middle name
|
||||
* @property {string} [salut] Salutation
|
||||
* @property {string} [suffix] Suffix
|
||||
* @property {CustomerAddress[]} [addresses] Addresses list (line1 required per address)
|
||||
* @property {CustomerPhone[]} [phones] Phone numbers list (number required per phone)
|
||||
* @property {CustomerEmail[]} [emails] Email list (first entry used)
|
||||
* @property {CustomerPersonal} [personal] Personal details
|
||||
* @property {CustomerDmsInfo} [dms] DMS-specific supplemental info
|
||||
*/
|
||||
/** @typedef {InsertCustomerPayload & { nameRecId: string|number }} UpdateCustomerPayload */
|
||||
/** @typedef {Object} CustomerResponseData { @property {string|undefined} dmsRecKey @property {string|undefined} status @property {string|undefined} statusCode } */
|
||||
|
||||
/** @typedef {Object} ServiceVehicleDetail { @property {string} [licNo] } */
|
||||
/** @typedef {Object} ServiceVehicleWarranty { @property {string} [contractNumber] @property {string} [expirationDate] @property {string|number} [expirationMileage] } */
|
||||
/** @typedef {Object} ServiceVehicleAdvisorContactInfo { @property {string|number} nameRecId } */
|
||||
/** @typedef {Object} ServiceVehicleServInfo { @property {string|number} customerNo @property {string|number} [salesmanNo] @property {string|number} [inServiceDate] @property {string|number} [mileage] @property {string} [teamCode] @property {ServiceVehicleWarranty} [vehExtWarranty] @property {{contactInfo?: ServiceVehicleAdvisorContactInfo}} [advisor] } */
|
||||
/** @typedef {Object} InsertServiceVehiclePayload { @property {string} vin @property {string} [modelDesc] @property {string} [carline] @property {string} [extClrDesc] @property {string} [intClrDesc] @property {string} [trimDesc] @property {string} [bodyStyle] @property {string} [engineDesc] @property {string} [transDesc] @property {string|number} [year] @property {string|number} [odometer] @property {string} [odometerUnits] @property {ServiceVehicleDetail} [vehicleDetail] @property {ServiceVehicleServInfo} vehicleServInfo } */
|
||||
/** @typedef {Object} ServiceVehicleResponseData { @property {string|undefined} status @property {string|undefined} statusCode } */
|
||||
|
||||
/** @typedef {Object} RepairOrderEstimate { @property {string|number} [parts] @property {string|number} [labor] @property {string|number} [total] @property {string} [estimateType] } */
|
||||
/** @typedef {Object} RepairOrderTax { @property {'All'|'Cust'|'Intr'|'Warr'} [payType] @property {string} [taxCode] @property {string|number} [txblGrossAmt] @property {string|number} [grossTaxAmt] } */
|
||||
/** @typedef {Object} RepairOrderLaborBill { @property {'All'|'Cust'|'Intr'|'Warr'} [payType] @property {string|number} [jobTotalHrs] @property {string|number} [billTime] @property {string|number} [billRate] } */
|
||||
/** @typedef {Object} RepairOrderLaborCCC { @property {string} [cause] @property {string} [complaint] @property {string} [correction] } */
|
||||
/** @typedef {Object} RepairOrderLaborAmount { @property {'All'|'Cust'|'Intr'|'Warr'} [payType] @property {string} [amtType] @property {string|number} [custPrice] @property {string|number} [totalAmt] } */
|
||||
/** @typedef {Object} RepairOrderLaborOp { @property {string} [opCode] @property {string|number} [jobNo] @property {'T'|'N'} [custTxblNtxblFlag] @property {'T'|'N'} [warrTxblNtxblFlag] @property {'T'|'N'} [intrTxblNtxblFlag] @property {string} [custPayTypeFlag] @property {string} [warrPayTypeFlag] @property {string} [intrPayTypeFlag] @property {string} [vlrCode] @property {RepairOrderLaborBill} [bill] @property {RepairOrderLaborCCC} [ccc] @property {RepairOrderLaborAmount} [amount] } */
|
||||
/** @typedef {Object} RepairOrderLabor { @property {RepairOrderLaborOp[]} [ops] } */
|
||||
/** @typedef {Object} RepairOrderPartLine { @property {string} [partNo] @property {string} [partNoDesc] @property {string|number} [partQty] @property {string|number} [sale] @property {string|number} [cost] @property {string} [addDeleteFlag] } */
|
||||
/** @typedef {Object} RepairOrderPartJob { @property {string} [opCode] @property {string|number} [jobNo] @property {RepairOrderPartLine[]} [lines] } */
|
||||
/** @typedef {Object} RepairOrderPart { @property {RepairOrderPartJob[]} [jobs] } */
|
||||
/** @typedef {Object} RepairOrderGGLineAmount { @property {'All'|'Cust'|'Intr'|'Warr'} [payType] @property {string} [amtType] @property {string|number} [custPrice] @property {string|number} [dlrCost] } */
|
||||
/** @typedef {Object} RepairOrderGGLine { @property {string} [breakOut] @property {'G'|'P'|'S'|'F'} [itemType] @property {string} [itemDesc] @property {string|number} [custQty] @property {string|number} [warrQty] @property {string|number} [intrQty] @property {'T'|'N'} [custTxblNtxblFlag] @property {'T'|'N'} [warrTxblNtxblFlag] @property {'T'|'N'} [intrTxblNtxblFlag] @property {string} [custPayTypeFlag] @property {string} [warrPayTypeFlag] @property {string} [intrPayTypeFlag] @property {RepairOrderGGLineAmount} [amount] } */
|
||||
/** @typedef {Object} RepairOrderGGOp { @property {string} [opCode] @property {string|number} [jobNo] @property {RepairOrderGGLine[]} [lines] } */
|
||||
/** @typedef {Object} RepairOrderGG { @property {string|number} [roNo] @property {RepairOrderGGOp[]} [ops] } */
|
||||
/** @typedef {Object} RepairOrderMiscLine { @property {string} [miscCode] @property {'T'|'N'} [custTxblNtxblFlag] @property {'T'|'N'} [warrTxblNtxblFlag] @property {'T'|'N'} [intrTxblNtxblFlag] @property {string} [custPayTypeFlag] @property {string} [warrPayTypeFlag] @property {string} [intrPayTypeFlag] @property {string|number} [codeAmt] } */
|
||||
/** @typedef {Object} RepairOrderMiscOp { @property {string} [opCode] @property {string|number} [jobNo] @property {RepairOrderMiscLine[]} [lines] } */
|
||||
/** @typedef {Object} RepairOrderMisc { @property {string|number} [roNo] @property {RepairOrderMiscOp[]} [ops] } */
|
||||
/** @typedef {Object} CreateRepairOrderPayload
|
||||
* @property {string|number} customerNo Customer number (CustNo)
|
||||
* @property {string|number} departmentType Department type (DeptType)
|
||||
* @property {string} vin Vehicle VIN (Vin)
|
||||
* @property {string|number} outsdRoNo External RO identifier
|
||||
* @property {string|number} [advisorNo] Advisor number
|
||||
* @property {string|number} [tagNo] Tag number
|
||||
* @property {string|number} [mileageIn] Mileage in value
|
||||
* @property {string} [roComment] Repair order comment
|
||||
* @property {RepairOrderEstimate} [estimate] Repair order estimate block
|
||||
* @property {RepairOrderTax} [tax] Tax block
|
||||
* @property {RepairOrderLabor} [rolabor] Labor operations
|
||||
* @property {RepairOrderPart} [ropart] Parts jobs/lines
|
||||
* @property {RepairOrderGG} [rogg] General goods lines
|
||||
* @property {RepairOrderMisc} [romisc] Miscellaneous charges
|
||||
*/
|
||||
/** @typedef {Object} UpdateRepairOrderPayload { @property {'Y'|'N'} finalUpdate @property {string|number} outsdRoNo @property {string|number} [roNo] @property {string|number} [customerNo] @property {string|number} [tagNo] @property {string|number} [departmentType] @property {string} [vin] @property {string|number} [mileageIn] @property {string|number} [mileageOut] @property {string} [roComment] @property {RepairOrderEstimate} [estimate] @property {RepairOrderTax} [tax] @property {RepairOrderLabor} [rolabor] @property {RepairOrderPart} [ropart] @property {RepairOrderGG} [rogg] @property {RepairOrderMisc} [romisc] } */
|
||||
/** @typedef {Object} RepairOrderData { @property {string|undefined} status @property {string|undefined} date @property {string|undefined} time @property {string|undefined} outsdRoNo @property {string|undefined} dmsRoNo @property {string|undefined} errorMessage } */
|
||||
|
||||
/** @typedef {Object} GetAdvisorsParams { @property {'S'|'P'|'B'|'SERVICE'|'PARTS'|'BODY'|'BODYSHOP'|'BODY SHOP'} department @property {string|number} [advisorNumber] @property {number} [maxResults] } */
|
||||
/** @typedef {Object} AdvisorRow { @property {string|number|undefined} advisorId @property {string|undefined} firstName @property {string|undefined} lastName @property {'S'|'P'|'B'|undefined} department } */
|
||||
/** @typedef {Object} GetPartsParams { @property {string|number} roNumber } */
|
||||
/** @typedef {Object} PartRow { @property {string|undefined} partNumber @property {string|undefined} partDescription @property {string|number|undefined} quantityOrdered @property {string|number|undefined} quantityShipped @property {string|number|undefined} price @property {string|number|undefined} cost @property {string|undefined} processedFlag @property {string|undefined} addOrDelete } */
|
||||
|
||||
// Marker exports (no runtime impact)
|
||||
export const _extendedTypesDoc = null;
|
||||
1035
server/rr/lib/types/types.d.ts
vendored
Normal file
1035
server/rr/lib/types/types.d.ts
vendored
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user