开发者社区> 镜像站> NPM> ssb-gathering-schema
ssb-gathering-schema
JSON schemas and validation for secure scuttlebutt message types for gatherings
Last updated 2 years ago by mixmix .
AGPL-3.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install ssb-gathering-schema 
SYNC missed versions from official npm registry.

ssb-gathering-schema

Usage

var { isGathering, isGatheringUpdate, isAttendee } = require('ssb-gathering-schema')

isGathering(msg)
// => true

Schemas

schemas describe the content section of messages

gathering

{
  type: gathering,
  progenitor: MessageId  // (optional) the thing that spawned this gathering
  mentions: Array,       // (optional) people to notify
  recps: Array           // (optional) private recipients
}

mentions / recps entries each a FeedId, or a 'link' object: { link: FeedId, name: String}

gathering-update (type: about)

Updates to the details of a gathering are about messages with some / all of the following attributes. (everything but type and about are optional)

{
  type: 'about'
  about: MessageId,     // gathering
  title: String,        // (optional)
  description: String,  // (optional)
  location: String,     // (optional)
  startDateTime: {      // (optional)
    epoch: Integer,       // unix time
    tz: TimeZoneString,   // *
    bias: Integer         // * ?
    silent: Boolean       // * ?
  },
  image: {              // (optional)
    link: BlobId,
    name: String,
    size: Integer,
    type: MimeType
  },
  recps: Array          // (optional)
}

recps entries each a FeedId, or a 'link' object: { link: FeedId, name: String}

attendee (type: about)

{
  type: 'about',
  about: MessageId, // gathering
  attendee: {
    link: FeedId    // can be about another person!
    remove: true    // (optional)
  },
  recps: Array      // (optional)
}

recps entries each a FeedId, or a 'link' object: { link: FeedId, name: String}

Current Tags

  • 1.2.4                                ...           latest (2 years ago)

7 Versions

  • 1.2.4                                ...           2 years ago
  • 1.2.3                                ...           2 years ago
  • 1.2.2                                ...           2 years ago
  • 1.2.1                                ...           2 years ago
  • 1.2.0                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (3)
Dev Dependencies (4)