1.0.8 • Published 2 years ago
@assetval/conversation v1.0.8
Conversation
This is the Veritas Conversation / Message Schema workspace.
Installation
yarn add @assetval/conversationUsage
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 install1.0.8
2 years ago
1.0.7
2 years ago
1.0.6
2 years ago
1.0.4
2 years ago
1.0.3
2 years ago
1.0.2
2 years ago
1.0.1
2 years ago
1.0.0
2 years ago
0.2.6
2 years ago
0.2.5
2 years ago
0.2.4
2 years ago
0.2.3
2 years ago
0.2.2
2 years ago
0.0.6
2 years ago
0.0.5
2 years ago
0.0.4
2 years ago
0.0.3
2 years ago
0.0.2
2 years ago
0.0.1
2 years ago