@555platform/555-sdk-parser
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Build

555 Platform Message Format and Chat Message Format Typescript Parser

All of the Platform Message Format functions reside in PMF namespace and Chat Message Format functions are in CMF namespace.

Install and Use

npm i @555platform/555parser.ts -S

import { PMF, CMF } from '@555platform/555parser.ts';

PMF Namespace Functions

  • pmfBuilder(options: EnvelopeOptions, payload: object) - builds PMF message with specified payload
  • pmfParser(message: Envelope) - returns payload object
  • pmfNamespace(message: Envelope) - returns namespace in PMF Envelope

PMF Types

EnvelopeOptions = {
  auth: string;
  namespace: string;
  tid?: string;
  logLevel?: PmfLogLevels;
  ttl?: number;
};
Envelope = {
  auth: string;
  mid: string;
  namespace: string;
  tid: string;
  logLevel: PmfLogLevels;
  ttl: number;
  version: string;
  timestamp: Date;
  body: Object;
};

Readme

Keywords

none

Package Sidebar

Install

npm i @555platform/555-sdk-parser

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

4.96 MB

Total Files

41

Last publish

Collaborators

  • nijacomcast
  • dipenvshah
  • nija