Parse and validate AT Protocol Lexicons with DTO generation for Laravel
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Remove `List` lexicon data class

-63
-63
src/Generated/App/Bsky/Graph/List.php
··· 1 - <?php 2 - 3 - namespace SocialDept\Schema\Generated\App\Bsky\Graph; 4 - 5 - use Carbon\Carbon; 6 - use SocialDept\Schema\Data\BlobReference; 7 - use SocialDept\Schema\Data\Data; 8 - use SocialDept\Schema\Generated\App\Bsky\Richtext\Facet; 9 - use SocialDept\Schema\Support\UnionHelper; 10 - 11 - /** 12 - * Lexicon: app.bsky.graph.list 13 - * Type: record 14 - */ 15 - class List extends Data 16 - { 17 - 18 - /** 19 - * @param ListPurpose $purpose Defines the purpose of the list (aka, moderation-oriented or curration-oriented) 20 - * @param string $name Display name for list; can not be empty. 21 - */ 22 - public function __construct( 23 - public readonly ListPurpose $purpose, 24 - public readonly string $name, 25 - public readonly Carbon $createdAt, 26 - public readonly ?string $description = null, 27 - public readonly ?array $descriptionFacets = null, 28 - public readonly ?BlobReference $avatar = null, 29 - public readonly mixed $labels = null 30 - ) { 31 - } 32 - 33 - /** 34 - * Get the lexicon NSID for this data type. 35 - * 36 - * @return string 37 - */ 38 - public static function getLexicon(): string 39 - { 40 - return 'app.bsky.graph.list'; 41 - } 42 - 43 - 44 - /** 45 - * Create an instance from an array. 46 - * 47 - * @param array $data The data array 48 - * @return static 49 - */ 50 - public static function fromArray(array $data): static 51 - { 52 - return new static( 53 - purpose: Defs::fromArray($data['purpose']), 54 - name: $data['name'], 55 - createdAt: Carbon::parse($data['createdAt']), 56 - description: $data['description'] ?? null, 57 - descriptionFacets: isset($data['descriptionFacets']) ? array_map(fn ($item) => Facet::fromArray($item), $data['descriptionFacets']) : [], 58 - avatar: $data['avatar'] ?? null, 59 - labels: isset($data['labels']) ? UnionHelper::validateOpenUnion($data['labels']) : null 60 - ); 61 - } 62 - 63 - }