1.1.0 • Published 4 months ago

@atcute/lexicon-community v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

@atcute/lexicon-community

Lexicon Community (community.lexicon.*) schema definitions

usage

import { CommunityLexiconCalendarEvent } from '@atcute/lexicon-community';
import { is } from '@atcute/lexicons';

const record: CommunityLexiconCalendarEvent.Main = {
	$type: 'community.lexicon.calendar.event',
	name: 'DoD Stammtisch May 2025',
	description: 'The last Stammtisch before @protocol.berlin v2',
	status: 'community.lexicon.calendar.event#scheduled',
	mode: 'community.lexicon.calendar.event#inperson',
	startsAt: '2025-05-21T17:00:00.000Z',
	createdAt: '2025-05-14T23:13:18.129Z',
	locations: [
		{
			$type: 'community.lexicon.location.address',
			name: '@c-base.org',
			country: 'DE',
			locality: 'Berlin',
			region: 'Berlin',
			street: 'Rungestrasse 20',
			postalCode: '10179',
		},
	],
};

is(CommunityLexiconCalendarEvent.mainSchema, record);
// -> true

with @atcute/client

pick either one of these 3 options to register the ambient declarations

// tsconfig.json
{
	"compilerOptions": {
		"types": ["@atcute/lexicon-community"],
	},
}
// env.d.ts
/// <reference types="@atcute/lexicon-community" />
// index.ts
import type {} from '@atcute/lexicon-community';

now all the XRPC operations should be visible in the client

1.1.0

4 months ago

1.0.1

5 months ago