Paul Frazee 2ed0c31254
Datetime validation fix ()
* Fix datetime validation (close )

* Fix lexicon publishing flow

* lexicon@0.0.3

* lexicon@0.0.4

* Fix xrpc publishing scripts

* xrpc@0.0.3

* api@0.0.6

* Update thread test snapshot
2023-01-03 16:37:31 -06:00
..
2023-01-03 16:37:31 -06:00
2023-01-03 16:37:31 -06:00
2023-01-03 16:37:31 -06:00
2022-12-01 12:26:18 -06:00
2023-01-03 16:37:31 -06:00
2023-01-03 16:37:31 -06:00

Lexicon

Lexicon is the semantic schemas & contracts system for ATP. This library provides definitions and APIs for ATP software.

npm install @atproto/lexicon

Usage

import { Lexicons } from '@atproto/lexicon'

// create your lexicons collection
const lex = new Lexicons()

// add lexicon documents
lex.add({
  lex: 1,
  id: 'com.example.post',
  defs: {
    // ...
  }
})

// validate
lex.assertValidRecord('com.example.record', {$type: 'com.example.record', ...})
lex.assertValidXrpcParams('com.example.query', {...})
lex.assertValidXrpcInput('com.example.procedure', {...})
lex.assertValidXrpcOutput('com.example.query', {...})