1.0.8 • Published 1 year ago

@assetval/conversation v1.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago

0.2.6

1 year ago

0.2.5

1 year ago

0.2.4

1 year ago

0.2.3

1 year ago

0.2.2

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago