@assetval/vendor
v0.0.3
Published
AssetVal's vendor workspace
Downloads
8
Readme
Vendor
This is the Veritas Vendor Schema workspace.
Installation
yarn add @assetval/vendor
Usage
As a Class (Front End)
import { Vendor } from '@assetval/vendor';
const vendor = new Vendor();
As Schema (Back End)
import { {Vendor}Schema, Vendor } from '@assetval/vendor';
import { Model } from 'mongoose';
export const {Vendor}Model = model<Vendor>('{vendor}es', {Vendor}Schema);
As Validation (Back End)
import { {Vendor}ValidationSchema } from '@assetval/vendor';
import { z } from 'zod';
import { MagikRoutes } from '../middleware/RouterManager.js';
const ProfileRoute = MagikRoutes.getRouter('/profile');
ProfileRoute.post('/updateVendor', {
auth: 'ensureAuthenticated',
validationSchema: z.object({
body: {Vendor}ValidationSchema
}),
route: async (req, res): Promise<void> => {
// Do something
}
});
License
MIT
Authors
Contributing
Download the Schema repository and make sure you have the following installed:
- asdf
- NodeJS (ASDF)
- PNPM (Corepack / Node / ASDF)
- NX
Then run the following commands:
pnpm install