- All schemas have been rewritten to a relational model - All services have been rewritten to accommodate the new data model - Adds idempotency keys to core endpoints allowing you to retry requests with no additional side effects - Adds staged jobs to avoid putting jobs in the queue when transactions abort - Adds atomic transactions to all methods with access to the data layer Co-authored-by: Oliver Windall Juhl <oliver@mrbltech.com>
21 lines
544 B
JavaScript
21 lines
544 B
JavaScript
import Joi from "joi"
|
|
|
|
Joi.objectId = require("joi-objectid")(Joi)
|
|
|
|
Joi.address = () => {
|
|
return Joi.object().keys({
|
|
first_name: Joi.string().required(),
|
|
last_name: Joi.string().required(),
|
|
address_1: Joi.string().required(),
|
|
address_2: Joi.string().allow(null),
|
|
city: Joi.string().required(),
|
|
country_code: Joi.string().required(),
|
|
province: Joi.string().allow(null),
|
|
postal_code: Joi.string().required(),
|
|
phone: Joi.string().optional(),
|
|
metadata: Joi.object().allow(null),
|
|
})
|
|
}
|
|
|
|
export default Joi
|