1.0.8 • Published 11 months ago
@assetval/conversation v1.0.8
Conversation
This is the Veritas Conversation / Message Schema workspace.
Installation
yarn add @assetval/conversation
Usage
As a Class (Front End)
import { Conversation, Message } from '@assetval/conversation';
const conversation = new Conversation({
});
const message = new Message({
body: 'Hello, World!',
});
As Schema (Back End)
import { ConversationSchema, Conversation } from '@assetval/conversation';
import { model } from 'mongoose';
export const ConversationModel = model<Conversation>('conversations', ConversationSchema);
As Validation (Back End)
import { ConversationValidationSchema } from '@assetval/conversation';
import { z } from 'zod';
import { MagikRoutes } from '../middleware/RouterManager.js';
const ProfileRoute = MagikRoutes.getRouter('/profile');
ProfileRoute.post('/updateConversation', {
auth: 'ensureAuthenticated',
validationSchema: z.object({
body: ConversationValidationSchema
}),
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)
- Yarn (Corepack / Node / ASDF)
- moonrepo
- git-chglog (ASDF)
Then run the following commands:
yarn install
1.0.8
11 months ago
1.0.7
11 months ago
1.0.6
11 months ago
1.0.4
11 months ago
1.0.3
11 months ago
1.0.2
11 months ago
1.0.1
11 months ago
1.0.0
11 months ago
0.2.6
11 months ago
0.2.5
11 months ago
0.2.4
11 months ago
0.2.3
11 months ago
0.2.2
11 months ago
0.0.6
11 months ago
0.0.5
11 months ago
0.0.4
11 months ago
0.0.3
11 months ago
0.0.2
11 months ago
0.0.1
11 months ago