Parse and validate AT Protocol Lexicons with DTO generation for Laravel
1<?php
2
3namespace SocialDept\AtpSchema\Contracts;
4
5use SocialDept\AtpSchema\Data\LexiconDocument;
6
7interface SchemaRepository
8{
9 /**
10 * Find schema by NSID.
11 */
12 public function find(string $nsid): ?LexiconDocument;
13
14 /**
15 * Load schema from multiple sources.
16 */
17 public function load(string $nsid): LexiconDocument;
18
19 /**
20 * Check if schema exists.
21 */
22 public function exists(string $nsid): bool;
23
24 /**
25 * Get all available schema NSIDs.
26 *
27 * @return array<string>
28 */
29 public function all(): array;
30
31 /**
32 * Clear cached schemas.
33 */
34 public function clearCache(?string $nsid = null): void;
35}