Laravel AT Protocol Client (alpha & unstable)
3
fork

Configure Feed

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

Merge branch 'refs/heads/dev'

+674 -49
+15 -1
src/Data/Responses/Atproto/Repo/CreateRecordResponse.php
··· 2 2 3 3 namespace SocialDept\AtpClient\Data\Responses\Atproto\Repo; 4 4 5 + use Illuminate\Contracts\Support\Arrayable; 5 6 use SocialDept\AtpSchema\Generated\Com\Atproto\Repo\Defs\CommitMeta; 6 7 7 - class CreateRecordResponse 8 + /** 9 + * @implements Arrayable<string, mixed> 10 + */ 11 + class CreateRecordResponse implements Arrayable 8 12 { 9 13 public function __construct( 10 14 public readonly string $uri, ··· 21 25 commit: isset($data['commit']) ? CommitMeta::fromArray($data['commit']) : null, 22 26 validationStatus: $data['validationStatus'] ?? null, 23 27 ); 28 + } 29 + 30 + public function toArray(): array 31 + { 32 + return [ 33 + 'uri' => $this->uri, 34 + 'cid' => $this->cid, 35 + 'commit' => $this->commit?->toArray(), 36 + 'validationStatus' => $this->validationStatus, 37 + ]; 24 38 } 25 39 }
+12 -1
src/Data/Responses/Atproto/Repo/DeleteRecordResponse.php
··· 2 2 3 3 namespace SocialDept\AtpClient\Data\Responses\Atproto\Repo; 4 4 5 + use Illuminate\Contracts\Support\Arrayable; 5 6 use SocialDept\AtpSchema\Generated\Com\Atproto\Repo\Defs\CommitMeta; 6 7 7 - class DeleteRecordResponse 8 + /** 9 + * @implements Arrayable<string, mixed> 10 + */ 11 + class DeleteRecordResponse implements Arrayable 8 12 { 9 13 public function __construct( 10 14 public readonly ?CommitMeta $commit = null, ··· 15 19 return new self( 16 20 commit: isset($data['commit']) ? CommitMeta::fromArray($data['commit']) : null, 17 21 ); 22 + } 23 + 24 + public function toArray(): array 25 + { 26 + return [ 27 + 'commit' => $this->commit?->toArray(), 28 + ]; 18 29 } 19 30 }
+17 -1
src/Data/Responses/Atproto/Repo/DescribeRepoResponse.php
··· 2 2 3 3 namespace SocialDept\AtpClient\Data\Responses\Atproto\Repo; 4 4 5 - class DescribeRepoResponse 5 + use Illuminate\Contracts\Support\Arrayable; 6 + 7 + /** 8 + * @implements Arrayable<string, mixed> 9 + */ 10 + class DescribeRepoResponse implements Arrayable 6 11 { 7 12 /** 8 13 * @param array<string> $collections ··· 24 29 collections: $data['collections'] ?? [], 25 30 handleIsCorrect: $data['handleIsCorrect'], 26 31 ); 32 + } 33 + 34 + public function toArray(): array 35 + { 36 + return [ 37 + 'handle' => $this->handle, 38 + 'did' => $this->did, 39 + 'didDoc' => $this->didDoc, 40 + 'collections' => $this->collections, 41 + 'handleIsCorrect' => $this->handleIsCorrect, 42 + ]; 27 43 } 28 44 }
+15 -1
src/Data/Responses/Atproto/Repo/GetRecordResponse.php
··· 2 2 3 3 namespace SocialDept\AtpClient\Data\Responses\Atproto\Repo; 4 4 5 - class GetRecordResponse 5 + use Illuminate\Contracts\Support\Arrayable; 6 + 7 + /** 8 + * @implements Arrayable<string, mixed> 9 + */ 10 + class GetRecordResponse implements Arrayable 6 11 { 7 12 public function __construct( 8 13 public readonly string $uri, ··· 17 22 value: $data['value'], 18 23 cid: $data['cid'] ?? null, 19 24 ); 25 + } 26 + 27 + public function toArray(): array 28 + { 29 + return [ 30 + 'uri' => $this->uri, 31 + 'value' => $this->value, 32 + 'cid' => $this->cid, 33 + ]; 20 34 } 21 35 }
+13 -1
src/Data/Responses/Atproto/Repo/ListRecordsResponse.php
··· 2 2 3 3 namespace SocialDept\AtpClient\Data\Responses\Atproto\Repo; 4 4 5 + use Illuminate\Contracts\Support\Arrayable; 5 6 use Illuminate\Support\Collection; 6 7 7 - class ListRecordsResponse 8 + /** 9 + * @implements Arrayable<string, mixed> 10 + */ 11 + class ListRecordsResponse implements Arrayable 8 12 { 9 13 /** 10 14 * @param Collection<int, array{uri: string, cid: string, value: mixed}> $records ··· 20 24 records: collect($data['records'] ?? []), 21 25 cursor: $data['cursor'] ?? null, 22 26 ); 27 + } 28 + 29 + public function toArray(): array 30 + { 31 + return [ 32 + 'records' => $this->records->all(), 33 + 'cursor' => $this->cursor, 34 + ]; 23 35 } 24 36 }
+15 -1
src/Data/Responses/Atproto/Repo/PutRecordResponse.php
··· 2 2 3 3 namespace SocialDept\AtpClient\Data\Responses\Atproto\Repo; 4 4 5 + use Illuminate\Contracts\Support\Arrayable; 5 6 use SocialDept\AtpSchema\Generated\Com\Atproto\Repo\Defs\CommitMeta; 6 7 7 - class PutRecordResponse 8 + /** 9 + * @implements Arrayable<string, mixed> 10 + */ 11 + class PutRecordResponse implements Arrayable 8 12 { 9 13 public function __construct( 10 14 public readonly string $uri, ··· 21 25 commit: isset($data['commit']) ? CommitMeta::fromArray($data['commit']) : null, 22 26 validationStatus: $data['validationStatus'] ?? null, 23 27 ); 28 + } 29 + 30 + public function toArray(): array 31 + { 32 + return [ 33 + 'uri' => $this->uri, 34 + 'cid' => $this->cid, 35 + 'commit' => $this->commit?->toArray(), 36 + 'validationStatus' => $this->validationStatus, 37 + ]; 24 38 } 25 39 }
+18 -1
src/Data/Responses/Atproto/Server/DescribeServerResponse.php
··· 2 2 3 3 namespace SocialDept\AtpClient\Data\Responses\Atproto\Server; 4 4 5 - class DescribeServerResponse 5 + use Illuminate\Contracts\Support\Arrayable; 6 + 7 + /** 8 + * @implements Arrayable<string, mixed> 9 + */ 10 + class DescribeServerResponse implements Arrayable 6 11 { 7 12 /** 8 13 * @param array<string> $availableUserDomains ··· 26 31 links: $data['links'] ?? null, 27 32 contact: $data['contact'] ?? null, 28 33 ); 34 + } 35 + 36 + public function toArray(): array 37 + { 38 + return [ 39 + 'did' => $this->did, 40 + 'availableUserDomains' => $this->availableUserDomains, 41 + 'inviteCodeRequired' => $this->inviteCodeRequired, 42 + 'phoneVerificationRequired' => $this->phoneVerificationRequired, 43 + 'links' => $this->links, 44 + 'contact' => $this->contact, 45 + ]; 29 46 } 30 47 }
+20 -1
src/Data/Responses/Atproto/Server/GetSessionResponse.php
··· 2 2 3 3 namespace SocialDept\AtpClient\Data\Responses\Atproto\Server; 4 4 5 - class GetSessionResponse 5 + use Illuminate\Contracts\Support\Arrayable; 6 + 7 + /** 8 + * @implements Arrayable<string, mixed> 9 + */ 10 + class GetSessionResponse implements Arrayable 6 11 { 7 12 public function __construct( 8 13 public readonly string $handle, ··· 27 32 active: $data['active'] ?? null, 28 33 status: $data['status'] ?? null, 29 34 ); 35 + } 36 + 37 + public function toArray(): array 38 + { 39 + return [ 40 + 'handle' => $this->handle, 41 + 'did' => $this->did, 42 + 'email' => $this->email, 43 + 'emailConfirmed' => $this->emailConfirmed, 44 + 'emailAuthFactor' => $this->emailAuthFactor, 45 + 'didDoc' => $this->didDoc, 46 + 'active' => $this->active, 47 + 'status' => $this->status, 48 + ]; 30 49 } 31 50 }
+16 -1
src/Data/Responses/Atproto/Sync/GetRepoStatusResponse.php
··· 2 2 3 3 namespace SocialDept\AtpClient\Data\Responses\Atproto\Sync; 4 4 5 - class GetRepoStatusResponse 5 + use Illuminate\Contracts\Support\Arrayable; 6 + 7 + /** 8 + * @implements Arrayable<string, mixed> 9 + */ 10 + class GetRepoStatusResponse implements Arrayable 6 11 { 7 12 public function __construct( 8 13 public readonly string $did, ··· 19 24 status: $data['status'] ?? null, 20 25 rev: $data['rev'] ?? null, 21 26 ); 27 + } 28 + 29 + public function toArray(): array 30 + { 31 + return [ 32 + 'did' => $this->did, 33 + 'active' => $this->active, 34 + 'status' => $this->status, 35 + 'rev' => $this->rev, 36 + ]; 22 37 } 23 38 }
+14 -1
src/Data/Responses/Atproto/Sync/ListBlobsResponse.php
··· 2 2 3 3 namespace SocialDept\AtpClient\Data\Responses\Atproto\Sync; 4 4 5 - class ListBlobsResponse 5 + use Illuminate\Contracts\Support\Arrayable; 6 + 7 + /** 8 + * @implements Arrayable<string, mixed> 9 + */ 10 + class ListBlobsResponse implements Arrayable 6 11 { 7 12 /** 8 13 * @param array<string> $cids ··· 18 23 cids: $data['cids'] ?? [], 19 24 cursor: $data['cursor'] ?? null, 20 25 ); 26 + } 27 + 28 + public function toArray(): array 29 + { 30 + return [ 31 + 'cids' => $this->cids, 32 + 'cursor' => $this->cursor, 33 + ]; 21 34 } 22 35 }
+13 -1
src/Data/Responses/Atproto/Sync/ListReposResponse.php
··· 2 2 3 3 namespace SocialDept\AtpClient\Data\Responses\Atproto\Sync; 4 4 5 + use Illuminate\Contracts\Support\Arrayable; 5 6 use Illuminate\Support\Collection; 6 7 7 - class ListReposResponse 8 + /** 9 + * @implements Arrayable<string, mixed> 10 + */ 11 + class ListReposResponse implements Arrayable 8 12 { 9 13 /** 10 14 * @param Collection<int, array{did: string, head: string, rev: string, active?: bool, status?: string}> $repos ··· 20 24 repos: collect($data['repos'] ?? []), 21 25 cursor: $data['cursor'] ?? null, 22 26 ); 27 + } 28 + 29 + public function toArray(): array 30 + { 31 + return [ 32 + 'repos' => $this->repos->all(), 33 + 'cursor' => $this->cursor, 34 + ]; 23 35 } 24 36 }
+12 -1
src/Data/Responses/Bsky/Actor/GetProfilesResponse.php
··· 2 2 3 3 namespace SocialDept\AtpClient\Data\Responses\Bsky\Actor; 4 4 5 + use Illuminate\Contracts\Support\Arrayable; 5 6 use Illuminate\Support\Collection; 6 7 use SocialDept\AtpSchema\Generated\App\Bsky\Actor\Defs\ProfileViewDetailed; 7 8 8 - class GetProfilesResponse 9 + /** 10 + * @implements Arrayable<string, mixed> 11 + */ 12 + class GetProfilesResponse implements Arrayable 9 13 { 10 14 /** 11 15 * @param Collection<int, ProfileViewDetailed> $profiles ··· 21 25 fn (array $profile) => ProfileViewDetailed::fromArray($profile) 22 26 ), 23 27 ); 28 + } 29 + 30 + public function toArray(): array 31 + { 32 + return [ 33 + 'profiles' => $this->profiles->map(fn (ProfileViewDetailed $p) => $p->toArray())->all(), 34 + ]; 24 35 } 25 36 }
+13 -1
src/Data/Responses/Bsky/Actor/GetSuggestionsResponse.php
··· 2 2 3 3 namespace SocialDept\AtpClient\Data\Responses\Bsky\Actor; 4 4 5 + use Illuminate\Contracts\Support\Arrayable; 5 6 use Illuminate\Support\Collection; 6 7 use SocialDept\AtpSchema\Generated\App\Bsky\Actor\Defs\ProfileView; 7 8 8 - class GetSuggestionsResponse 9 + /** 10 + * @implements Arrayable<string, mixed> 11 + */ 12 + class GetSuggestionsResponse implements Arrayable 9 13 { 10 14 /** 11 15 * @param Collection<int, ProfileView> $actors ··· 23 27 ), 24 28 cursor: $data['cursor'] ?? null, 25 29 ); 30 + } 31 + 32 + public function toArray(): array 33 + { 34 + return [ 35 + 'actors' => $this->actors->map(fn (ProfileView $a) => $a->toArray())->all(), 36 + 'cursor' => $this->cursor, 37 + ]; 26 38 } 27 39 }
+13 -1
src/Data/Responses/Bsky/Actor/SearchActorsResponse.php
··· 2 2 3 3 namespace SocialDept\AtpClient\Data\Responses\Bsky\Actor; 4 4 5 + use Illuminate\Contracts\Support\Arrayable; 5 6 use Illuminate\Support\Collection; 6 7 use SocialDept\AtpSchema\Generated\App\Bsky\Actor\Defs\ProfileView; 7 8 8 - class SearchActorsResponse 9 + /** 10 + * @implements Arrayable<string, mixed> 11 + */ 12 + class SearchActorsResponse implements Arrayable 9 13 { 10 14 /** 11 15 * @param Collection<int, ProfileView> $actors ··· 23 27 ), 24 28 cursor: $data['cursor'] ?? null, 25 29 ); 30 + } 31 + 32 + public function toArray(): array 33 + { 34 + return [ 35 + 'actors' => $this->actors->map(fn (ProfileView $a) => $a->toArray())->all(), 36 + 'cursor' => $this->cursor, 37 + ]; 26 38 } 27 39 }
+12 -1
src/Data/Responses/Bsky/Actor/SearchActorsTypeaheadResponse.php
··· 2 2 3 3 namespace SocialDept\AtpClient\Data\Responses\Bsky\Actor; 4 4 5 + use Illuminate\Contracts\Support\Arrayable; 5 6 use Illuminate\Support\Collection; 6 7 use SocialDept\AtpSchema\Generated\App\Bsky\Actor\Defs\ProfileViewBasic; 7 8 8 - class SearchActorsTypeaheadResponse 9 + /** 10 + * @implements Arrayable<string, mixed> 11 + */ 12 + class SearchActorsTypeaheadResponse implements Arrayable 9 13 { 10 14 /** 11 15 * @param Collection<int, ProfileViewBasic> $actors ··· 21 25 fn (array $actor) => ProfileViewBasic::fromArray($actor) 22 26 ), 23 27 ); 28 + } 29 + 30 + public function toArray(): array 31 + { 32 + return [ 33 + 'actors' => $this->actors->map(fn (ProfileViewBasic $a) => $a->toArray())->all(), 34 + ]; 24 35 } 25 36 }
+15 -1
src/Data/Responses/Bsky/Feed/DescribeFeedGeneratorResponse.php
··· 2 2 3 3 namespace SocialDept\AtpClient\Data\Responses\Bsky\Feed; 4 4 5 - class DescribeFeedGeneratorResponse 5 + use Illuminate\Contracts\Support\Arrayable; 6 + 7 + /** 8 + * @implements Arrayable<string, mixed> 9 + */ 10 + class DescribeFeedGeneratorResponse implements Arrayable 6 11 { 7 12 /** 8 13 * @param array<array{uri: string}> $feeds ··· 20 25 feeds: $data['feeds'] ?? [], 21 26 links: $data['links'] ?? null, 22 27 ); 28 + } 29 + 30 + public function toArray(): array 31 + { 32 + return [ 33 + 'did' => $this->did, 34 + 'feeds' => $this->feeds, 35 + 'links' => $this->links, 36 + ]; 23 37 } 24 38 }
+13 -1
src/Data/Responses/Bsky/Feed/GetActorFeedsResponse.php
··· 2 2 3 3 namespace SocialDept\AtpClient\Data\Responses\Bsky\Feed; 4 4 5 + use Illuminate\Contracts\Support\Arrayable; 5 6 use Illuminate\Support\Collection; 6 7 use SocialDept\AtpSchema\Generated\App\Bsky\Feed\Defs\GeneratorView; 7 8 8 - class GetActorFeedsResponse 9 + /** 10 + * @implements Arrayable<string, mixed> 11 + */ 12 + class GetActorFeedsResponse implements Arrayable 9 13 { 10 14 /** 11 15 * @param Collection<int, GeneratorView> $feeds ··· 23 27 ), 24 28 cursor: $data['cursor'] ?? null, 25 29 ); 30 + } 31 + 32 + public function toArray(): array 33 + { 34 + return [ 35 + 'feeds' => $this->feeds->map(fn (GeneratorView $f) => $f->toArray())->all(), 36 + 'cursor' => $this->cursor, 37 + ]; 26 38 } 27 39 }
+13 -1
src/Data/Responses/Bsky/Feed/GetActorLikesResponse.php
··· 2 2 3 3 namespace SocialDept\AtpClient\Data\Responses\Bsky\Feed; 4 4 5 + use Illuminate\Contracts\Support\Arrayable; 5 6 use Illuminate\Support\Collection; 6 7 use SocialDept\AtpSchema\Generated\App\Bsky\Feed\Defs\FeedViewPost; 7 8 8 - class GetActorLikesResponse 9 + /** 10 + * @implements Arrayable<string, mixed> 11 + */ 12 + class GetActorLikesResponse implements Arrayable 9 13 { 10 14 /** 11 15 * @param Collection<int, FeedViewPost> $feed ··· 23 27 ), 24 28 cursor: $data['cursor'] ?? null, 25 29 ); 30 + } 31 + 32 + public function toArray(): array 33 + { 34 + return [ 35 + 'feed' => $this->feed->map(fn (FeedViewPost $p) => $p->toArray())->all(), 36 + 'cursor' => $this->cursor, 37 + ]; 26 38 } 27 39 }
+13 -1
src/Data/Responses/Bsky/Feed/GetAuthorFeedResponse.php
··· 2 2 3 3 namespace SocialDept\AtpClient\Data\Responses\Bsky\Feed; 4 4 5 + use Illuminate\Contracts\Support\Arrayable; 5 6 use Illuminate\Support\Collection; 6 7 use SocialDept\AtpSchema\Generated\App\Bsky\Feed\Defs\FeedViewPost; 7 8 8 - class GetAuthorFeedResponse 9 + /** 10 + * @implements Arrayable<string, mixed> 11 + */ 12 + class GetAuthorFeedResponse implements Arrayable 9 13 { 10 14 /** 11 15 * @param Collection<int, FeedViewPost> $feed ··· 23 27 ), 24 28 cursor: $data['cursor'] ?? null, 25 29 ); 30 + } 31 + 32 + public function toArray(): array 33 + { 34 + return [ 35 + 'feed' => $this->feed->map(fn (FeedViewPost $p) => $p->toArray())->all(), 36 + 'cursor' => $this->cursor, 37 + ]; 26 38 } 27 39 }
+14 -1
src/Data/Responses/Bsky/Feed/GetFeedGeneratorResponse.php
··· 2 2 3 3 namespace SocialDept\AtpClient\Data\Responses\Bsky\Feed; 4 4 5 + use Illuminate\Contracts\Support\Arrayable; 5 6 use SocialDept\AtpSchema\Generated\App\Bsky\Feed\Defs\GeneratorView; 6 7 7 - class GetFeedGeneratorResponse 8 + /** 9 + * @implements Arrayable<string, mixed> 10 + */ 11 + class GetFeedGeneratorResponse implements Arrayable 8 12 { 9 13 public function __construct( 10 14 public readonly GeneratorView $view, ··· 19 23 isOnline: $data['isOnline'], 20 24 isValid: $data['isValid'], 21 25 ); 26 + } 27 + 28 + public function toArray(): array 29 + { 30 + return [ 31 + 'view' => $this->view->toArray(), 32 + 'isOnline' => $this->isOnline, 33 + 'isValid' => $this->isValid, 34 + ]; 22 35 } 23 36 }
+12 -1
src/Data/Responses/Bsky/Feed/GetFeedGeneratorsResponse.php
··· 2 2 3 3 namespace SocialDept\AtpClient\Data\Responses\Bsky\Feed; 4 4 5 + use Illuminate\Contracts\Support\Arrayable; 5 6 use Illuminate\Support\Collection; 6 7 use SocialDept\AtpSchema\Generated\App\Bsky\Feed\Defs\GeneratorView; 7 8 8 - class GetFeedGeneratorsResponse 9 + /** 10 + * @implements Arrayable<string, mixed> 11 + */ 12 + class GetFeedGeneratorsResponse implements Arrayable 9 13 { 10 14 /** 11 15 * @param Collection<int, GeneratorView> $feeds ··· 21 25 fn (array $feed) => GeneratorView::fromArray($feed) 22 26 ), 23 27 ); 28 + } 29 + 30 + public function toArray(): array 31 + { 32 + return [ 33 + 'feeds' => $this->feeds->map(fn (GeneratorView $f) => $f->toArray())->all(), 34 + ]; 24 35 } 25 36 }
+13 -1
src/Data/Responses/Bsky/Feed/GetFeedResponse.php
··· 2 2 3 3 namespace SocialDept\AtpClient\Data\Responses\Bsky\Feed; 4 4 5 + use Illuminate\Contracts\Support\Arrayable; 5 6 use Illuminate\Support\Collection; 6 7 use SocialDept\AtpSchema\Generated\App\Bsky\Feed\Defs\FeedViewPost; 7 8 8 - class GetFeedResponse 9 + /** 10 + * @implements Arrayable<string, mixed> 11 + */ 12 + class GetFeedResponse implements Arrayable 9 13 { 10 14 /** 11 15 * @param Collection<int, FeedViewPost> $feed ··· 23 27 ), 24 28 cursor: $data['cursor'] ?? null, 25 29 ); 30 + } 31 + 32 + public function toArray(): array 33 + { 34 + return [ 35 + 'feed' => $this->feed->map(fn (FeedViewPost $p) => $p->toArray())->all(), 36 + 'cursor' => $this->cursor, 37 + ]; 26 38 } 27 39 }
+15 -1
src/Data/Responses/Bsky/Feed/GetLikesResponse.php
··· 2 2 3 3 namespace SocialDept\AtpClient\Data\Responses\Bsky\Feed; 4 4 5 + use Illuminate\Contracts\Support\Arrayable; 5 6 use Illuminate\Support\Collection; 6 7 use SocialDept\AtpSchema\Generated\App\Bsky\Feed\GetLikes\Like; 7 8 8 - class GetLikesResponse 9 + /** 10 + * @implements Arrayable<string, mixed> 11 + */ 12 + class GetLikesResponse implements Arrayable 9 13 { 10 14 /** 11 15 * @param Collection<int, Like> $likes ··· 27 31 cid: $data['cid'] ?? null, 28 32 cursor: $data['cursor'] ?? null, 29 33 ); 34 + } 35 + 36 + public function toArray(): array 37 + { 38 + return [ 39 + 'uri' => $this->uri, 40 + 'likes' => $this->likes->map(fn (Like $l) => $l->toArray())->all(), 41 + 'cid' => $this->cid, 42 + 'cursor' => $this->cursor, 43 + ]; 30 44 } 31 45 }
+13 -1
src/Data/Responses/Bsky/Feed/GetPostThreadResponse.php
··· 2 2 3 3 namespace SocialDept\AtpClient\Data\Responses\Bsky\Feed; 4 4 5 + use Illuminate\Contracts\Support\Arrayable; 5 6 use SocialDept\AtpSchema\Generated\App\Bsky\Feed\Defs\ThreadViewPost; 6 7 7 - class GetPostThreadResponse 8 + /** 9 + * @implements Arrayable<string, mixed> 10 + */ 11 + class GetPostThreadResponse implements Arrayable 8 12 { 9 13 public function __construct( 10 14 public readonly ThreadViewPost $thread, ··· 17 21 thread: ThreadViewPost::fromArray($data['thread']), 18 22 threadgate: $data['threadgate'] ?? null, 19 23 ); 24 + } 25 + 26 + public function toArray(): array 27 + { 28 + return [ 29 + 'thread' => $this->thread->toArray(), 30 + 'threadgate' => $this->threadgate, 31 + ]; 20 32 } 21 33 }
+12 -1
src/Data/Responses/Bsky/Feed/GetPostsResponse.php
··· 2 2 3 3 namespace SocialDept\AtpClient\Data\Responses\Bsky\Feed; 4 4 5 + use Illuminate\Contracts\Support\Arrayable; 5 6 use Illuminate\Support\Collection; 6 7 use SocialDept\AtpSchema\Generated\App\Bsky\Feed\Defs\PostView; 7 8 8 - class GetPostsResponse 9 + /** 10 + * @implements Arrayable<string, mixed> 11 + */ 12 + class GetPostsResponse implements Arrayable 9 13 { 10 14 /** 11 15 * @param Collection<int, PostView> $posts ··· 21 25 fn (array $post) => PostView::fromArray($post) 22 26 ), 23 27 ); 28 + } 29 + 30 + public function toArray(): array 31 + { 32 + return [ 33 + 'posts' => $this->posts->map(fn (PostView $p) => $p->toArray())->all(), 34 + ]; 24 35 } 25 36 }
+15 -1
src/Data/Responses/Bsky/Feed/GetQuotesResponse.php
··· 2 2 3 3 namespace SocialDept\AtpClient\Data\Responses\Bsky\Feed; 4 4 5 + use Illuminate\Contracts\Support\Arrayable; 5 6 use Illuminate\Support\Collection; 6 7 use SocialDept\AtpSchema\Generated\App\Bsky\Feed\Defs\PostView; 7 8 8 - class GetQuotesResponse 9 + /** 10 + * @implements Arrayable<string, mixed> 11 + */ 12 + class GetQuotesResponse implements Arrayable 9 13 { 10 14 /** 11 15 * @param Collection<int, PostView> $posts ··· 27 31 cid: $data['cid'] ?? null, 28 32 cursor: $data['cursor'] ?? null, 29 33 ); 34 + } 35 + 36 + public function toArray(): array 37 + { 38 + return [ 39 + 'uri' => $this->uri, 40 + 'posts' => $this->posts->map(fn (PostView $p) => $p->toArray())->all(), 41 + 'cid' => $this->cid, 42 + 'cursor' => $this->cursor, 43 + ]; 30 44 } 31 45 }
+15 -1
src/Data/Responses/Bsky/Feed/GetRepostedByResponse.php
··· 2 2 3 3 namespace SocialDept\AtpClient\Data\Responses\Bsky\Feed; 4 4 5 + use Illuminate\Contracts\Support\Arrayable; 5 6 use Illuminate\Support\Collection; 6 7 use SocialDept\AtpSchema\Generated\App\Bsky\Actor\Defs\ProfileView; 7 8 8 - class GetRepostedByResponse 9 + /** 10 + * @implements Arrayable<string, mixed> 11 + */ 12 + class GetRepostedByResponse implements Arrayable 9 13 { 10 14 /** 11 15 * @param Collection<int, ProfileView> $repostedBy ··· 27 31 cid: $data['cid'] ?? null, 28 32 cursor: $data['cursor'] ?? null, 29 33 ); 34 + } 35 + 36 + public function toArray(): array 37 + { 38 + return [ 39 + 'uri' => $this->uri, 40 + 'repostedBy' => $this->repostedBy->map(fn (ProfileView $p) => $p->toArray())->all(), 41 + 'cid' => $this->cid, 42 + 'cursor' => $this->cursor, 43 + ]; 30 44 } 31 45 }
+13 -1
src/Data/Responses/Bsky/Feed/GetSuggestedFeedsResponse.php
··· 2 2 3 3 namespace SocialDept\AtpClient\Data\Responses\Bsky\Feed; 4 4 5 + use Illuminate\Contracts\Support\Arrayable; 5 6 use Illuminate\Support\Collection; 6 7 use SocialDept\AtpSchema\Generated\App\Bsky\Feed\Defs\GeneratorView; 7 8 8 - class GetSuggestedFeedsResponse 9 + /** 10 + * @implements Arrayable<string, mixed> 11 + */ 12 + class GetSuggestedFeedsResponse implements Arrayable 9 13 { 10 14 /** 11 15 * @param Collection<int, GeneratorView> $feeds ··· 23 27 ), 24 28 cursor: $data['cursor'] ?? null, 25 29 ); 30 + } 31 + 32 + public function toArray(): array 33 + { 34 + return [ 35 + 'feeds' => $this->feeds->map(fn (GeneratorView $f) => $f->toArray())->all(), 36 + 'cursor' => $this->cursor, 37 + ]; 26 38 } 27 39 }
+13 -1
src/Data/Responses/Bsky/Feed/GetTimelineResponse.php
··· 2 2 3 3 namespace SocialDept\AtpClient\Data\Responses\Bsky\Feed; 4 4 5 + use Illuminate\Contracts\Support\Arrayable; 5 6 use Illuminate\Support\Collection; 6 7 use SocialDept\AtpSchema\Generated\App\Bsky\Feed\Defs\FeedViewPost; 7 8 8 - class GetTimelineResponse 9 + /** 10 + * @implements Arrayable<string, mixed> 11 + */ 12 + class GetTimelineResponse implements Arrayable 9 13 { 10 14 /** 11 15 * @param Collection<int, FeedViewPost> $feed ··· 23 27 ), 24 28 cursor: $data['cursor'] ?? null, 25 29 ); 30 + } 31 + 32 + public function toArray(): array 33 + { 34 + return [ 35 + 'feed' => $this->feed->map(fn (FeedViewPost $p) => $p->toArray())->all(), 36 + 'cursor' => $this->cursor, 37 + ]; 26 38 } 27 39 }
+14 -1
src/Data/Responses/Bsky/Feed/SearchPostsResponse.php
··· 2 2 3 3 namespace SocialDept\AtpClient\Data\Responses\Bsky\Feed; 4 4 5 + use Illuminate\Contracts\Support\Arrayable; 5 6 use Illuminate\Support\Collection; 6 7 use SocialDept\AtpSchema\Generated\App\Bsky\Feed\Defs\PostView; 7 8 8 - class SearchPostsResponse 9 + /** 10 + * @implements Arrayable<string, mixed> 11 + */ 12 + class SearchPostsResponse implements Arrayable 9 13 { 10 14 /** 11 15 * @param Collection<int, PostView> $posts ··· 25 29 cursor: $data['cursor'] ?? null, 26 30 hitsTotal: $data['hitsTotal'] ?? null, 27 31 ); 32 + } 33 + 34 + public function toArray(): array 35 + { 36 + return [ 37 + 'posts' => $this->posts->map(fn (PostView $p) => $p->toArray())->all(), 38 + 'cursor' => $this->cursor, 39 + 'hitsTotal' => $this->hitsTotal, 40 + ]; 28 41 } 29 42 }
+14 -1
src/Data/Responses/Bsky/Graph/GetFollowersResponse.php
··· 2 2 3 3 namespace SocialDept\AtpClient\Data\Responses\Bsky\Graph; 4 4 5 + use Illuminate\Contracts\Support\Arrayable; 5 6 use Illuminate\Support\Collection; 6 7 use SocialDept\AtpSchema\Generated\App\Bsky\Actor\Defs\ProfileView; 7 8 8 - class GetFollowersResponse 9 + /** 10 + * @implements Arrayable<string, mixed> 11 + */ 12 + class GetFollowersResponse implements Arrayable 9 13 { 10 14 /** 11 15 * @param Collection<int, ProfileView> $followers ··· 25 29 ), 26 30 cursor: $data['cursor'] ?? null, 27 31 ); 32 + } 33 + 34 + public function toArray(): array 35 + { 36 + return [ 37 + 'subject' => $this->subject->toArray(), 38 + 'followers' => $this->followers->map(fn (ProfileView $p) => $p->toArray())->all(), 39 + 'cursor' => $this->cursor, 40 + ]; 28 41 } 29 42 }
+14 -1
src/Data/Responses/Bsky/Graph/GetFollowsResponse.php
··· 2 2 3 3 namespace SocialDept\AtpClient\Data\Responses\Bsky\Graph; 4 4 5 + use Illuminate\Contracts\Support\Arrayable; 5 6 use Illuminate\Support\Collection; 6 7 use SocialDept\AtpSchema\Generated\App\Bsky\Actor\Defs\ProfileView; 7 8 8 - class GetFollowsResponse 9 + /** 10 + * @implements Arrayable<string, mixed> 11 + */ 12 + class GetFollowsResponse implements Arrayable 9 13 { 10 14 /** 11 15 * @param Collection<int, ProfileView> $follows ··· 25 29 ), 26 30 cursor: $data['cursor'] ?? null, 27 31 ); 32 + } 33 + 34 + public function toArray(): array 35 + { 36 + return [ 37 + 'subject' => $this->subject->toArray(), 38 + 'follows' => $this->follows->map(fn (ProfileView $p) => $p->toArray())->all(), 39 + 'cursor' => $this->cursor, 40 + ]; 28 41 } 29 42 }
+14 -1
src/Data/Responses/Bsky/Graph/GetKnownFollowersResponse.php
··· 2 2 3 3 namespace SocialDept\AtpClient\Data\Responses\Bsky\Graph; 4 4 5 + use Illuminate\Contracts\Support\Arrayable; 5 6 use Illuminate\Support\Collection; 6 7 use SocialDept\AtpSchema\Generated\App\Bsky\Actor\Defs\ProfileView; 7 8 8 - class GetKnownFollowersResponse 9 + /** 10 + * @implements Arrayable<string, mixed> 11 + */ 12 + class GetKnownFollowersResponse implements Arrayable 9 13 { 10 14 /** 11 15 * @param Collection<int, ProfileView> $followers ··· 25 29 ), 26 30 cursor: $data['cursor'] ?? null, 27 31 ); 32 + } 33 + 34 + public function toArray(): array 35 + { 36 + return [ 37 + 'subject' => $this->subject->toArray(), 38 + 'followers' => $this->followers->map(fn (ProfileView $p) => $p->toArray())->all(), 39 + 'cursor' => $this->cursor, 40 + ]; 28 41 } 29 42 }
+14 -1
src/Data/Responses/Bsky/Graph/GetListResponse.php
··· 2 2 3 3 namespace SocialDept\AtpClient\Data\Responses\Bsky\Graph; 4 4 5 + use Illuminate\Contracts\Support\Arrayable; 5 6 use Illuminate\Support\Collection; 6 7 use SocialDept\AtpSchema\Generated\App\Bsky\Graph\Defs\ListItemView; 7 8 use SocialDept\AtpSchema\Generated\App\Bsky\Graph\Defs\ListView; 8 9 9 - class GetListResponse 10 + /** 11 + * @implements Arrayable<string, mixed> 12 + */ 13 + class GetListResponse implements Arrayable 10 14 { 11 15 /** 12 16 * @param Collection<int, ListItemView> $items ··· 26 30 ), 27 31 cursor: $data['cursor'] ?? null, 28 32 ); 33 + } 34 + 35 + public function toArray(): array 36 + { 37 + return [ 38 + 'list' => $this->list->toArray(), 39 + 'items' => $this->items->map(fn (ListItemView $i) => $i->toArray())->all(), 40 + 'cursor' => $this->cursor, 41 + ]; 29 42 } 30 43 }
+13 -1
src/Data/Responses/Bsky/Graph/GetListsResponse.php
··· 2 2 3 3 namespace SocialDept\AtpClient\Data\Responses\Bsky\Graph; 4 4 5 + use Illuminate\Contracts\Support\Arrayable; 5 6 use Illuminate\Support\Collection; 6 7 use SocialDept\AtpSchema\Generated\App\Bsky\Graph\Defs\ListView; 7 8 8 - class GetListsResponse 9 + /** 10 + * @implements Arrayable<string, mixed> 11 + */ 12 + class GetListsResponse implements Arrayable 9 13 { 10 14 /** 11 15 * @param Collection<int, ListView> $lists ··· 23 27 ), 24 28 cursor: $data['cursor'] ?? null, 25 29 ); 30 + } 31 + 32 + public function toArray(): array 33 + { 34 + return [ 35 + 'lists' => $this->lists->map(fn (ListView $l) => $l->toArray())->all(), 36 + 'cursor' => $this->cursor, 37 + ]; 26 38 } 27 39 }
+13 -1
src/Data/Responses/Bsky/Graph/GetRelationshipsResponse.php
··· 2 2 3 3 namespace SocialDept\AtpClient\Data\Responses\Bsky\Graph; 4 4 5 + use Illuminate\Contracts\Support\Arrayable; 5 6 use Illuminate\Support\Collection; 6 7 7 - class GetRelationshipsResponse 8 + /** 9 + * @implements Arrayable<string, mixed> 10 + */ 11 + class GetRelationshipsResponse implements Arrayable 8 12 { 9 13 /** 10 14 * @param Collection<int, mixed> $relationships Collection of Relationship or NotFoundActor objects ··· 20 24 relationships: collect($data['relationships'] ?? []), 21 25 actor: $data['actor'] ?? null, 22 26 ); 27 + } 28 + 29 + public function toArray(): array 30 + { 31 + return [ 32 + 'relationships' => $this->relationships->all(), 33 + 'actor' => $this->actor, 34 + ]; 23 35 } 24 36 }
+12 -1
src/Data/Responses/Bsky/Graph/GetStarterPacksResponse.php
··· 2 2 3 3 namespace SocialDept\AtpClient\Data\Responses\Bsky\Graph; 4 4 5 + use Illuminate\Contracts\Support\Arrayable; 5 6 use Illuminate\Support\Collection; 6 7 use SocialDept\AtpSchema\Generated\App\Bsky\Graph\Defs\StarterPackViewBasic; 7 8 8 - class GetStarterPacksResponse 9 + /** 10 + * @implements Arrayable<string, mixed> 11 + */ 12 + class GetStarterPacksResponse implements Arrayable 9 13 { 10 14 /** 11 15 * @param Collection<int, StarterPackViewBasic> $starterPacks ··· 21 25 fn (array $pack) => StarterPackViewBasic::fromArray($pack) 22 26 ), 23 27 ); 28 + } 29 + 30 + public function toArray(): array 31 + { 32 + return [ 33 + 'starterPacks' => $this->starterPacks->map(fn (StarterPackViewBasic $p) => $p->toArray())->all(), 34 + ]; 24 35 } 25 36 }
+13 -1
src/Data/Responses/Bsky/Graph/GetSuggestedFollowsByActorResponse.php
··· 2 2 3 3 namespace SocialDept\AtpClient\Data\Responses\Bsky\Graph; 4 4 5 + use Illuminate\Contracts\Support\Arrayable; 5 6 use Illuminate\Support\Collection; 6 7 use SocialDept\AtpSchema\Generated\App\Bsky\Actor\Defs\ProfileView; 7 8 8 - class GetSuggestedFollowsByActorResponse 9 + /** 10 + * @implements Arrayable<string, mixed> 11 + */ 12 + class GetSuggestedFollowsByActorResponse implements Arrayable 9 13 { 10 14 /** 11 15 * @param Collection<int, ProfileView> $suggestions ··· 23 27 ), 24 28 isFallback: $data['isFallback'] ?? null, 25 29 ); 30 + } 31 + 32 + public function toArray(): array 33 + { 34 + return [ 35 + 'suggestions' => $this->suggestions->map(fn (ProfileView $p) => $p->toArray())->all(), 36 + 'isFallback' => $this->isFallback, 37 + ]; 26 38 } 27 39 }
+12 -1
src/Data/Responses/Bsky/Labeler/GetServicesResponse.php
··· 2 2 3 3 namespace SocialDept\AtpClient\Data\Responses\Bsky\Labeler; 4 4 5 + use Illuminate\Contracts\Support\Arrayable; 5 6 use Illuminate\Support\Collection; 6 7 use SocialDept\AtpSchema\Generated\App\Bsky\Labeler\Defs\LabelerView; 7 8 use SocialDept\AtpSchema\Generated\App\Bsky\Labeler\Defs\LabelerViewDetailed; 8 9 9 - class GetServicesResponse 10 + /** 11 + * @implements Arrayable<string, mixed> 12 + */ 13 + class GetServicesResponse implements Arrayable 10 14 { 11 15 /** 12 16 * @param Collection<int, LabelerView|LabelerViewDetailed> $views ··· 24 28 : LabelerView::fromArray($view) 25 29 ), 26 30 ); 31 + } 32 + 33 + public function toArray(): array 34 + { 35 + return [ 36 + 'views' => $this->views->map(fn (LabelerView|LabelerViewDetailed $v) => $v->toArray())->all(), 37 + ]; 27 38 } 28 39 }
+13 -1
src/Data/Responses/Chat/Convo/GetLogResponse.php
··· 2 2 3 3 namespace SocialDept\AtpClient\Data\Responses\Chat\Convo; 4 4 5 + use Illuminate\Contracts\Support\Arrayable; 5 6 use Illuminate\Support\Collection; 6 7 7 - class GetLogResponse 8 + /** 9 + * @implements Arrayable<string, mixed> 10 + */ 11 + class GetLogResponse implements Arrayable 8 12 { 9 13 /** 10 14 * @param Collection<int, mixed> $logs Collection of log event objects (LogBeginConvo, LogCreateMessage, etc.) ··· 20 24 logs: collect($data['logs'] ?? []), 21 25 cursor: $data['cursor'] ?? null, 22 26 ); 27 + } 28 + 29 + public function toArray(): array 30 + { 31 + return [ 32 + 'logs' => $this->logs->all(), 33 + 'cursor' => $this->cursor, 34 + ]; 23 35 } 24 36 }
+13 -1
src/Data/Responses/Chat/Convo/GetMessagesResponse.php
··· 2 2 3 3 namespace SocialDept\AtpClient\Data\Responses\Chat\Convo; 4 4 5 + use Illuminate\Contracts\Support\Arrayable; 5 6 use Illuminate\Support\Collection; 6 7 use SocialDept\AtpSchema\Generated\Chat\Bsky\Convo\Defs\DeletedMessageView; 7 8 use SocialDept\AtpSchema\Generated\Chat\Bsky\Convo\Defs\MessageView; 8 9 9 - class GetMessagesResponse 10 + /** 11 + * @implements Arrayable<string, mixed> 12 + */ 13 + class GetMessagesResponse implements Arrayable 10 14 { 11 15 /** 12 16 * @param Collection<int, MessageView|DeletedMessageView> $messages ··· 30 34 ), 31 35 cursor: $data['cursor'] ?? null, 32 36 ); 37 + } 38 + 39 + public function toArray(): array 40 + { 41 + return [ 42 + 'messages' => $this->messages->map(fn (MessageView|DeletedMessageView $m) => $m->toArray())->all(), 43 + 'cursor' => $this->cursor, 44 + ]; 33 45 } 34 46 }
+14 -1
src/Data/Responses/Chat/Convo/LeaveConvoResponse.php
··· 2 2 3 3 namespace SocialDept\AtpClient\Data\Responses\Chat\Convo; 4 4 5 - class LeaveConvoResponse 5 + use Illuminate\Contracts\Support\Arrayable; 6 + 7 + /** 8 + * @implements Arrayable<string, mixed> 9 + */ 10 + class LeaveConvoResponse implements Arrayable 6 11 { 7 12 public function __construct( 8 13 public readonly string $convoId, ··· 15 20 convoId: $data['convoId'], 16 21 rev: $data['rev'], 17 22 ); 23 + } 24 + 25 + public function toArray(): array 26 + { 27 + return [ 28 + 'convoId' => $this->convoId, 29 + 'rev' => $this->rev, 30 + ]; 18 31 } 19 32 }
+13 -1
src/Data/Responses/Chat/Convo/ListConvosResponse.php
··· 2 2 3 3 namespace SocialDept\AtpClient\Data\Responses\Chat\Convo; 4 4 5 + use Illuminate\Contracts\Support\Arrayable; 5 6 use Illuminate\Support\Collection; 6 7 use SocialDept\AtpSchema\Generated\Chat\Bsky\Convo\Defs\ConvoView; 7 8 8 - class ListConvosResponse 9 + /** 10 + * @implements Arrayable<string, mixed> 11 + */ 12 + class ListConvosResponse implements Arrayable 9 13 { 10 14 /** 11 15 * @param Collection<int, ConvoView> $convos ··· 23 27 ), 24 28 cursor: $data['cursor'] ?? null, 25 29 ); 30 + } 31 + 32 + public function toArray(): array 33 + { 34 + return [ 35 + 'convos' => $this->convos->map(fn (ConvoView $c) => $c->toArray())->all(), 36 + 'cursor' => $this->cursor, 37 + ]; 26 38 } 27 39 }
+12 -1
src/Data/Responses/Chat/Convo/SendMessageBatchResponse.php
··· 2 2 3 3 namespace SocialDept\AtpClient\Data\Responses\Chat\Convo; 4 4 5 + use Illuminate\Contracts\Support\Arrayable; 5 6 use Illuminate\Support\Collection; 6 7 use SocialDept\AtpSchema\Generated\Chat\Bsky\Convo\Defs\MessageView; 7 8 8 - class SendMessageBatchResponse 9 + /** 10 + * @implements Arrayable<string, mixed> 11 + */ 12 + class SendMessageBatchResponse implements Arrayable 9 13 { 10 14 /** 11 15 * @param Collection<int, MessageView> $items ··· 21 25 fn (array $item) => MessageView::fromArray($item) 22 26 ), 23 27 ); 28 + } 29 + 30 + public function toArray(): array 31 + { 32 + return [ 33 + 'items' => $this->items->map(fn (MessageView $m) => $m->toArray())->all(), 34 + ]; 24 35 } 25 36 }
+13 -1
src/Data/Responses/Ozone/Moderation/QueryEventsResponse.php
··· 2 2 3 3 namespace SocialDept\AtpClient\Data\Responses\Ozone\Moderation; 4 4 5 + use Illuminate\Contracts\Support\Arrayable; 5 6 use Illuminate\Support\Collection; 6 7 use SocialDept\AtpSchema\Generated\Tools\Ozone\Moderation\Defs\ModEventView; 7 8 8 - class QueryEventsResponse 9 + /** 10 + * @implements Arrayable<string, mixed> 11 + */ 12 + class QueryEventsResponse implements Arrayable 9 13 { 10 14 /** 11 15 * @param Collection<int, ModEventView> $events ··· 23 27 ), 24 28 cursor: $data['cursor'] ?? null, 25 29 ); 30 + } 31 + 32 + public function toArray(): array 33 + { 34 + return [ 35 + 'events' => $this->events->map(fn (ModEventView $e) => $e->toArray())->all(), 36 + 'cursor' => $this->cursor, 37 + ]; 26 38 } 27 39 }
+13 -1
src/Data/Responses/Ozone/Moderation/QueryStatusesResponse.php
··· 2 2 3 3 namespace SocialDept\AtpClient\Data\Responses\Ozone\Moderation; 4 4 5 + use Illuminate\Contracts\Support\Arrayable; 5 6 use Illuminate\Support\Collection; 6 7 use SocialDept\AtpSchema\Generated\Tools\Ozone\Moderation\Defs\SubjectStatusView; 7 8 8 - class QueryStatusesResponse 9 + /** 10 + * @implements Arrayable<string, mixed> 11 + */ 12 + class QueryStatusesResponse implements Arrayable 9 13 { 10 14 /** 11 15 * @param Collection<int, SubjectStatusView> $subjectStatuses ··· 23 27 ), 24 28 cursor: $data['cursor'] ?? null, 25 29 ); 30 + } 31 + 32 + public function toArray(): array 33 + { 34 + return [ 35 + 'subjectStatuses' => $this->subjectStatuses->map(fn (SubjectStatusView $s) => $s->toArray())->all(), 36 + 'cursor' => $this->cursor, 37 + ]; 26 38 } 27 39 }
+13 -1
src/Data/Responses/Ozone/Moderation/SearchReposResponse.php
··· 2 2 3 3 namespace SocialDept\AtpClient\Data\Responses\Ozone\Moderation; 4 4 5 + use Illuminate\Contracts\Support\Arrayable; 5 6 use Illuminate\Support\Collection; 6 7 use SocialDept\AtpSchema\Generated\Tools\Ozone\Moderation\Defs\RepoView; 7 8 8 - class SearchReposResponse 9 + /** 10 + * @implements Arrayable<string, mixed> 11 + */ 12 + class SearchReposResponse implements Arrayable 9 13 { 10 14 /** 11 15 * @param Collection<int, RepoView> $repos ··· 23 27 ), 24 28 cursor: $data['cursor'] ?? null, 25 29 ); 30 + } 31 + 32 + public function toArray(): array 33 + { 34 + return [ 35 + 'repos' => $this->repos->map(fn (RepoView $r) => $r->toArray())->all(), 36 + 'cursor' => $this->cursor, 37 + ]; 26 38 } 27 39 }
+17 -1
src/Data/Responses/Ozone/Server/GetConfigResponse.php
··· 2 2 3 3 namespace SocialDept\AtpClient\Data\Responses\Ozone\Server; 4 4 5 + use Illuminate\Contracts\Support\Arrayable; 5 6 use SocialDept\AtpSchema\Generated\Tools\Ozone\Server\GetConfig\ServiceConfig; 6 7 use SocialDept\AtpSchema\Generated\Tools\Ozone\Server\GetConfig\ViewerConfig; 7 8 8 - class GetConfigResponse 9 + /** 10 + * @implements Arrayable<string, mixed> 11 + */ 12 + class GetConfigResponse implements Arrayable 9 13 { 10 14 public function __construct( 11 15 public readonly ?ServiceConfig $appview = null, ··· 26 30 viewer: isset($data['viewer']) ? ViewerConfig::fromArray($data['viewer']) : null, 27 31 verifierDid: $data['verifierDid'] ?? null, 28 32 ); 33 + } 34 + 35 + public function toArray(): array 36 + { 37 + return [ 38 + 'appview' => $this->appview?->toArray(), 39 + 'pds' => $this->pds?->toArray(), 40 + 'blobDivert' => $this->blobDivert?->toArray(), 41 + 'chat' => $this->chat?->toArray(), 42 + 'viewer' => $this->viewer?->toArray(), 43 + 'verifierDid' => $this->verifierDid, 44 + ]; 29 45 } 30 46 }
+13 -1
src/Data/Responses/Ozone/Team/ListMembersResponse.php
··· 2 2 3 3 namespace SocialDept\AtpClient\Data\Responses\Ozone\Team; 4 4 5 + use Illuminate\Contracts\Support\Arrayable; 5 6 use Illuminate\Support\Collection; 6 7 7 - class ListMembersResponse 8 + /** 9 + * @implements Arrayable<string, mixed> 10 + */ 11 + class ListMembersResponse implements Arrayable 8 12 { 9 13 /** 10 14 * @param Collection<int, array<string, mixed>> $members Collection of team member objects ··· 20 24 members: collect($data['members'] ?? []), 21 25 cursor: $data['cursor'] ?? null, 22 26 ); 27 + } 28 + 29 + public function toArray(): array 30 + { 31 + return [ 32 + 'members' => $this->members->all(), 33 + 'cursor' => $this->cursor, 34 + ]; 23 35 } 24 36 }