-2
src/Client/Records/FollowRecordClient.php
-2
src/Client/Records/FollowRecordClient.php
···
31
31
];
32
32
33
33
return $this->atp->atproto->repo->createRecord(
34
-
repo: $this->atp->client->session()->did(),
35
34
collection: BskyGraph::Follow,
36
35
record: $record
37
36
);
···
47
46
public function delete(string $rkey): DeleteRecordResponse
48
47
{
49
48
return $this->atp->atproto->repo->deleteRecord(
50
-
repo: $this->atp->client->session()->did(),
51
49
collection: BskyGraph::Follow,
52
50
rkey: $rkey
53
51
);
-2
src/Client/Records/LikeRecordClient.php
-2
src/Client/Records/LikeRecordClient.php
···
32
32
];
33
33
34
34
return $this->atp->atproto->repo->createRecord(
35
-
repo: $this->atp->client->session()->did(),
36
35
collection: BskyFeed::Like,
37
36
record: $record
38
37
);
···
48
47
public function delete(string $rkey): DeleteRecordResponse
49
48
{
50
49
return $this->atp->atproto->repo->deleteRecord(
51
-
repo: $this->atp->client->session()->did(),
52
50
collection: BskyFeed::Like,
53
51
rkey: $rkey
54
52
);
+1
-7
src/Client/Records/PostRecordClient.php
+1
-7
src/Client/Records/PostRecordClient.php
···
77
77
}
78
78
79
79
return $this->atp->atproto->repo->createRecord(
80
-
repo: $this->atp->client->session()->did(),
81
80
collection: BskyFeed::Post,
82
81
record: $record
83
82
);
···
98
97
}
99
98
100
99
return $this->atp->atproto->repo->putRecord(
101
-
repo: $this->atp->client->session()->did(),
102
100
collection: BskyFeed::Post,
103
101
rkey: $rkey,
104
102
record: $record
···
115
113
public function delete(string $rkey): DeleteRecordResponse
116
114
{
117
115
return $this->atp->atproto->repo->deleteRecord(
118
-
repo: $this->atp->client->session()->did(),
119
116
collection: BskyFeed::Post,
120
117
rkey: $rkey
121
118
);
···
136
133
cid: $cid
137
134
);
138
135
139
-
return Record::fromArray(
140
-
data: $response->toArray(),
141
-
transformer: fn($value) => PostView::fromArray($response->value)
142
-
);
136
+
return Record::fromArrayRaw($response->toArray());
143
137
}
144
138
145
139
}
-1
src/Client/Records/ProfileRecordClient.php
-1
src/Client/Records/ProfileRecordClient.php
+3
-3
src/Client/Requests/Atproto/RepoRequestClient.php
+3
-3
src/Client/Requests/Atproto/RepoRequestClient.php
···
32
32
*/
33
33
#[ScopedEndpoint(Scope::TransitionGeneric, description: 'Create records in repository')]
34
34
public function createRecord(
35
-
string $repo,
36
35
string|BackedEnum $collection,
37
36
array $record,
38
37
?string $rkey = null,
39
38
bool $validate = true,
40
39
?string $swapCommit = null
41
40
): CreateRecordResponse {
41
+
$repo = $this->atp->client->session()->did();
42
42
$collection = $collection instanceof BackedEnum ? $collection->value : $collection;
43
43
$this->checkCollectionScope($collection, 'create');
44
44
···
62
62
*/
63
63
#[ScopedEndpoint(Scope::TransitionGeneric, description: 'Delete records from repository')]
64
64
public function deleteRecord(
65
-
string $repo,
66
65
string|BackedEnum $collection,
67
66
string $rkey,
68
67
?string $swapRecord = null,
69
68
?string $swapCommit = null
70
69
): DeleteRecordResponse {
70
+
$repo = $this->atp->client->session()->did();
71
71
$collection = $collection instanceof BackedEnum ? $collection->value : $collection;
72
72
$this->checkCollectionScope($collection, 'delete');
73
73
···
91
91
*/
92
92
#[ScopedEndpoint(Scope::TransitionGeneric, description: 'Update records in repository')]
93
93
public function putRecord(
94
-
string $repo,
95
94
string|BackedEnum $collection,
96
95
string $rkey,
97
96
array $record,
···
99
98
?string $swapRecord = null,
100
99
?string $swapCommit = null
101
100
): PutRecordResponse {
101
+
$repo = $this->atp->client->session()->did();
102
102
$collection = $collection instanceof BackedEnum ? $collection->value : $collection;
103
103
$this->checkCollectionScope($collection, 'update');
104
104
+1
-1
src/Client/Requests/Bsky/ActorRequestClient.php
+1
-1
src/Client/Requests/Bsky/ActorRequestClient.php
+4
-1
src/Client/Requests/Chat/ActorRequestClient.php
+4
-1
src/Client/Requests/Chat/ActorRequestClient.php
···
4
4
5
5
use SocialDept\AtpClient\Attributes\ScopedEndpoint;
6
6
use SocialDept\AtpClient\Client\Requests\Request;
7
+
use SocialDept\AtpClient\Data\Responses\EmptyResponse;
7
8
use SocialDept\AtpClient\Enums\Nsid\ChatActor;
8
9
use SocialDept\AtpClient\Enums\Scope;
9
10
use SocialDept\AtpClient\Http\Response;
···
48
49
* @see https://docs.bsky.app/docs/api/chat-bsky-actor-delete-account
49
50
*/
50
51
#[ScopedEndpoint(Scope::TransitionChat, granular: 'rpc:chat.bsky.actor.deleteAccount')]
51
-
public function deleteAccount(): void
52
+
public function deleteAccount(): EmptyResponse
52
53
{
53
54
$this->atp->client->post(
54
55
endpoint: ChatActor::DeleteAccount
55
56
);
57
+
58
+
return new EmptyResponse;
56
59
}
57
60
}