@atproto/api 0.0.8 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -6
- package/dist/agent.d.ts +22 -0
- package/dist/client/index.d.ts +63 -61
- package/dist/client/lexicons.d.ts +237 -23
- package/dist/client/types/app/bsky/actor/getProfiles.d.ts +19 -0
- package/dist/client/types/app/bsky/actor/getSuggestions.d.ts +0 -7
- package/dist/client/types/app/bsky/actor/profile.d.ts +25 -0
- package/dist/client/types/com/atproto/admin/blob.d.ts +37 -0
- package/dist/client/types/com/atproto/admin/moderationAction.d.ts +13 -2
- package/dist/client/types/com/atproto/admin/record.d.ts +5 -2
- package/dist/client/types/com/atproto/admin/repo.d.ts +2 -2
- package/dist/client/types/com/atproto/admin/takeModerationAction.d.ts +5 -1
- package/dist/client/types/com/atproto/sync/getRepo.d.ts +2 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +623 -253
- package/dist/index.js.map +4 -4
- package/dist/types.d.ts +33 -0
- package/package.json +1 -1
- package/src/agent.ts +305 -0
- package/src/client/index.ts +75 -63
- package/src/client/lexicons.ts +281 -38
- package/src/client/types/app/bsky/actor/getProfiles.ts +35 -0
- package/src/client/types/app/bsky/actor/getSuggestions.ts +0 -18
- package/src/client/types/app/bsky/actor/profile.ts +45 -0
- package/src/client/types/com/atproto/admin/blob.ts +84 -0
- package/src/client/types/com/atproto/admin/moderationAction.ts +29 -10
- package/src/client/types/com/atproto/admin/record.ts +5 -2
- package/src/client/types/com/atproto/admin/repo.ts +2 -2
- package/src/client/types/com/atproto/admin/takeModerationAction.ts +8 -0
- package/src/client/types/com/atproto/sync/getRepo.ts +4 -2
- package/src/index.ts +3 -3
- package/src/types.ts +71 -0
- package/tests/_util.ts +26 -0
- package/tests/agent.test.ts +391 -0
- package/tests/errors.test.ts +4 -8
- package/tsconfig.build.tsbuildinfo +1 -1
- package/src/session.ts +0 -194
- package/tests/session.test.ts +0 -239
package/README.md
CHANGED
|
@@ -3,12 +3,50 @@
|
|
|
3
3
|
## Usage
|
|
4
4
|
|
|
5
5
|
```typescript
|
|
6
|
-
import
|
|
6
|
+
import AtpAgent from '@atproto/api'
|
|
7
7
|
|
|
8
|
-
const
|
|
8
|
+
const agent = new AtpAgent({service: 'https://example.com'})
|
|
9
9
|
|
|
10
|
+
// provide a custom fetch implementation (shouldnt be needed in node or the browser)
|
|
11
|
+
import {AtpAgentFetchHeaders, AtpAgentFetchHandlerResponse} from '@atproto/api'
|
|
12
|
+
AtpAgent.configure({
|
|
13
|
+
async fetch(
|
|
14
|
+
httpUri: string,
|
|
15
|
+
httpMethod: string,
|
|
16
|
+
httpHeaders: AtpAgentFetchHeaders,
|
|
17
|
+
httpReqBody: any,
|
|
18
|
+
): Promise<AtpAgentFetchHandlerResponse> {
|
|
19
|
+
// insert definition here...
|
|
20
|
+
return {status: 200, /*...*/}
|
|
21
|
+
}
|
|
22
|
+
})
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Session management
|
|
26
|
+
|
|
27
|
+
```typescript
|
|
28
|
+
import AtpAgent, {AtpSessionEvent, AtpSessionData} from '@atproto/api'
|
|
29
|
+
const agent = new AtpAgent({
|
|
30
|
+
service: 'https://example.com',
|
|
31
|
+
persistSession: (evt: AtpSessionEvent, sess?: AtpSessionData) {
|
|
32
|
+
// store the session-data for reuse
|
|
33
|
+
}
|
|
34
|
+
})
|
|
35
|
+
|
|
36
|
+
await agent.login({identifier: 'alice@mail.com', password: 'hunter2'})
|
|
37
|
+
await agent.resumeSession(savedSessionData)
|
|
38
|
+
await agent.createAccount({
|
|
39
|
+
email: 'alice@mail.com',
|
|
40
|
+
password: 'hunter2',
|
|
41
|
+
handle: 'alice.example.com'
|
|
42
|
+
})
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### API calls
|
|
46
|
+
|
|
47
|
+
```typescript
|
|
10
48
|
// xrpc methods
|
|
11
|
-
const res1 = await
|
|
49
|
+
const res1 = await agent.api.com.atproto.repo.createRecord(
|
|
12
50
|
{
|
|
13
51
|
did: alice.did,
|
|
14
52
|
collection: 'app.bsky.feed.post',
|
|
@@ -19,14 +57,14 @@ const res1 = await client.com.atproto.repo.createRecord(
|
|
|
19
57
|
}
|
|
20
58
|
}
|
|
21
59
|
)
|
|
22
|
-
const res2 = await
|
|
60
|
+
const res2 = await agent.api.com.atproto.repo.listRecords({did: alice.did, type: 'app.bsky.feed.post'})
|
|
23
61
|
|
|
24
62
|
// repo record methods
|
|
25
|
-
const res3 = await
|
|
63
|
+
const res3 = await agent.api.app.bsky.feed.post.create({did: alice.did}, {
|
|
26
64
|
text: 'Hello, world!',
|
|
27
65
|
createdAt: (new Date()).toISOString()
|
|
28
66
|
})
|
|
29
|
-
const res4 = await
|
|
67
|
+
const res4 = await agent.api.app.bsky.feed.post.list({did: alice.did})
|
|
30
68
|
```
|
|
31
69
|
|
|
32
70
|
## License
|
package/dist/agent.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { AtpServiceClient, ComAtprotoAccountCreate, ComAtprotoSessionCreate, ComAtprotoSessionGet } from './client';
|
|
2
|
+
import { AtpSessionData, AtpAgentCreateAccountOpts, AtpAgentLoginOpts, AptAgentFetchHandler, AtpAgentGlobalOpts, AtpPersistSessionHandler, AtpAgentOpts } from './types';
|
|
3
|
+
export declare class AtpAgent {
|
|
4
|
+
service: URL;
|
|
5
|
+
api: AtpServiceClient;
|
|
6
|
+
session?: AtpSessionData;
|
|
7
|
+
private _baseClient;
|
|
8
|
+
private _persistSession?;
|
|
9
|
+
private _refreshSessionPromise;
|
|
10
|
+
static fetch: AptAgentFetchHandler | undefined;
|
|
11
|
+
static configure(opts: AtpAgentGlobalOpts): void;
|
|
12
|
+
constructor(opts: AtpAgentOpts);
|
|
13
|
+
get hasSession(): boolean;
|
|
14
|
+
setPersistSessionHandler(handler?: AtpPersistSessionHandler): void;
|
|
15
|
+
createAccount(opts: AtpAgentCreateAccountOpts): Promise<ComAtprotoAccountCreate.Response>;
|
|
16
|
+
login(opts: AtpAgentLoginOpts): Promise<ComAtprotoSessionCreate.Response>;
|
|
17
|
+
resumeSession(session: AtpSessionData): Promise<ComAtprotoSessionGet.Response>;
|
|
18
|
+
private _addAuthHeader;
|
|
19
|
+
private _fetch;
|
|
20
|
+
private _refreshSession;
|
|
21
|
+
private _refreshSessionInner;
|
|
22
|
+
}
|
package/dist/client/index.d.ts
CHANGED
|
@@ -37,6 +37,7 @@ import * as ComAtprotoSyncGetHead from './types/com/atproto/sync/getHead';
|
|
|
37
37
|
import * as ComAtprotoSyncGetRecord from './types/com/atproto/sync/getRecord';
|
|
38
38
|
import * as ComAtprotoSyncGetRepo from './types/com/atproto/sync/getRepo';
|
|
39
39
|
import * as AppBskyActorGetProfile from './types/app/bsky/actor/getProfile';
|
|
40
|
+
import * as AppBskyActorGetProfiles from './types/app/bsky/actor/getProfiles';
|
|
40
41
|
import * as AppBskyActorGetSuggestions from './types/app/bsky/actor/getSuggestions';
|
|
41
42
|
import * as AppBskyActorProfile from './types/app/bsky/actor/profile';
|
|
42
43
|
import * as AppBskyActorSearch from './types/app/bsky/actor/search';
|
|
@@ -70,6 +71,7 @@ export * as ComAtprotoAccountGet from './types/com/atproto/account/get';
|
|
|
70
71
|
export * as ComAtprotoAccountRequestDelete from './types/com/atproto/account/requestDelete';
|
|
71
72
|
export * as ComAtprotoAccountRequestPasswordReset from './types/com/atproto/account/requestPasswordReset';
|
|
72
73
|
export * as ComAtprotoAccountResetPassword from './types/com/atproto/account/resetPassword';
|
|
74
|
+
export * as ComAtprotoAdminBlob from './types/com/atproto/admin/blob';
|
|
73
75
|
export * as ComAtprotoAdminGetModerationAction from './types/com/atproto/admin/getModerationAction';
|
|
74
76
|
export * as ComAtprotoAdminGetModerationActions from './types/com/atproto/admin/getModerationActions';
|
|
75
77
|
export * as ComAtprotoAdminGetModerationReport from './types/com/atproto/admin/getModerationReport';
|
|
@@ -110,6 +112,7 @@ export * as ComAtprotoSyncGetHead from './types/com/atproto/sync/getHead';
|
|
|
110
112
|
export * as ComAtprotoSyncGetRecord from './types/com/atproto/sync/getRecord';
|
|
111
113
|
export * as ComAtprotoSyncGetRepo from './types/com/atproto/sync/getRepo';
|
|
112
114
|
export * as AppBskyActorGetProfile from './types/app/bsky/actor/getProfile';
|
|
115
|
+
export * as AppBskyActorGetProfiles from './types/app/bsky/actor/getProfiles';
|
|
113
116
|
export * as AppBskyActorGetSuggestions from './types/app/bsky/actor/getSuggestions';
|
|
114
117
|
export * as AppBskyActorProfile from './types/app/bsky/actor/profile';
|
|
115
118
|
export * as AppBskyActorRef from './types/app/bsky/actor/ref';
|
|
@@ -160,28 +163,26 @@ export declare const APP_BSKY_GRAPH: {
|
|
|
160
163
|
export declare const APP_BSKY_SYSTEM: {
|
|
161
164
|
ActorUser: string;
|
|
162
165
|
};
|
|
163
|
-
export declare class
|
|
166
|
+
export declare class AtpBaseClient {
|
|
164
167
|
xrpc: XrpcClient;
|
|
165
168
|
constructor();
|
|
166
|
-
service(serviceUri: string | URL):
|
|
169
|
+
service(serviceUri: string | URL): AtpServiceClient;
|
|
167
170
|
}
|
|
168
|
-
declare
|
|
169
|
-
|
|
170
|
-
export declare class ServiceClient {
|
|
171
|
-
_baseClient: Client;
|
|
171
|
+
export declare class AtpServiceClient {
|
|
172
|
+
_baseClient: AtpBaseClient;
|
|
172
173
|
xrpc: XrpcServiceClient;
|
|
173
174
|
com: ComNS;
|
|
174
175
|
app: AppNS;
|
|
175
|
-
constructor(baseClient:
|
|
176
|
+
constructor(baseClient: AtpBaseClient, xrpcService: XrpcServiceClient);
|
|
176
177
|
setHeader(key: string, value: string): void;
|
|
177
178
|
}
|
|
178
179
|
export declare class ComNS {
|
|
179
|
-
_service:
|
|
180
|
+
_service: AtpServiceClient;
|
|
180
181
|
atproto: AtprotoNS;
|
|
181
|
-
constructor(service:
|
|
182
|
+
constructor(service: AtpServiceClient);
|
|
182
183
|
}
|
|
183
184
|
export declare class AtprotoNS {
|
|
184
|
-
_service:
|
|
185
|
+
_service: AtpServiceClient;
|
|
185
186
|
account: AccountNS;
|
|
186
187
|
admin: AdminNS;
|
|
187
188
|
blob: BlobNS;
|
|
@@ -191,11 +192,11 @@ export declare class AtprotoNS {
|
|
|
191
192
|
server: ServerNS;
|
|
192
193
|
session: SessionNS;
|
|
193
194
|
sync: SyncNS;
|
|
194
|
-
constructor(service:
|
|
195
|
+
constructor(service: AtpServiceClient);
|
|
195
196
|
}
|
|
196
197
|
export declare class AccountNS {
|
|
197
|
-
_service:
|
|
198
|
-
constructor(service:
|
|
198
|
+
_service: AtpServiceClient;
|
|
199
|
+
constructor(service: AtpServiceClient);
|
|
199
200
|
create(data?: ComAtprotoAccountCreate.InputSchema, opts?: ComAtprotoAccountCreate.CallOptions): Promise<ComAtprotoAccountCreate.Response>;
|
|
200
201
|
createInviteCode(data?: ComAtprotoAccountCreateInviteCode.InputSchema, opts?: ComAtprotoAccountCreateInviteCode.CallOptions): Promise<ComAtprotoAccountCreateInviteCode.Response>;
|
|
201
202
|
delete(data?: ComAtprotoAccountDelete.InputSchema, opts?: ComAtprotoAccountDelete.CallOptions): Promise<ComAtprotoAccountDelete.Response>;
|
|
@@ -205,8 +206,8 @@ export declare class AccountNS {
|
|
|
205
206
|
resetPassword(data?: ComAtprotoAccountResetPassword.InputSchema, opts?: ComAtprotoAccountResetPassword.CallOptions): Promise<ComAtprotoAccountResetPassword.Response>;
|
|
206
207
|
}
|
|
207
208
|
export declare class AdminNS {
|
|
208
|
-
_service:
|
|
209
|
-
constructor(service:
|
|
209
|
+
_service: AtpServiceClient;
|
|
210
|
+
constructor(service: AtpServiceClient);
|
|
210
211
|
getModerationAction(params?: ComAtprotoAdminGetModerationAction.QueryParams, opts?: ComAtprotoAdminGetModerationAction.CallOptions): Promise<ComAtprotoAdminGetModerationAction.Response>;
|
|
211
212
|
getModerationActions(params?: ComAtprotoAdminGetModerationActions.QueryParams, opts?: ComAtprotoAdminGetModerationActions.CallOptions): Promise<ComAtprotoAdminGetModerationActions.Response>;
|
|
212
213
|
getModerationReport(params?: ComAtprotoAdminGetModerationReport.QueryParams, opts?: ComAtprotoAdminGetModerationReport.CallOptions): Promise<ComAtprotoAdminGetModerationReport.Response>;
|
|
@@ -219,18 +220,18 @@ export declare class AdminNS {
|
|
|
219
220
|
takeModerationAction(data?: ComAtprotoAdminTakeModerationAction.InputSchema, opts?: ComAtprotoAdminTakeModerationAction.CallOptions): Promise<ComAtprotoAdminTakeModerationAction.Response>;
|
|
220
221
|
}
|
|
221
222
|
export declare class BlobNS {
|
|
222
|
-
_service:
|
|
223
|
-
constructor(service:
|
|
223
|
+
_service: AtpServiceClient;
|
|
224
|
+
constructor(service: AtpServiceClient);
|
|
224
225
|
upload(data?: ComAtprotoBlobUpload.InputSchema, opts?: ComAtprotoBlobUpload.CallOptions): Promise<ComAtprotoBlobUpload.Response>;
|
|
225
226
|
}
|
|
226
227
|
export declare class HandleNS {
|
|
227
|
-
_service:
|
|
228
|
-
constructor(service:
|
|
228
|
+
_service: AtpServiceClient;
|
|
229
|
+
constructor(service: AtpServiceClient);
|
|
229
230
|
resolve(params?: ComAtprotoHandleResolve.QueryParams, opts?: ComAtprotoHandleResolve.CallOptions): Promise<ComAtprotoHandleResolve.Response>;
|
|
230
231
|
}
|
|
231
232
|
export declare class RepoNS {
|
|
232
|
-
_service:
|
|
233
|
-
constructor(service:
|
|
233
|
+
_service: AtpServiceClient;
|
|
234
|
+
constructor(service: AtpServiceClient);
|
|
234
235
|
batchWrite(data?: ComAtprotoRepoBatchWrite.InputSchema, opts?: ComAtprotoRepoBatchWrite.CallOptions): Promise<ComAtprotoRepoBatchWrite.Response>;
|
|
235
236
|
createRecord(data?: ComAtprotoRepoCreateRecord.InputSchema, opts?: ComAtprotoRepoCreateRecord.CallOptions): Promise<ComAtprotoRepoCreateRecord.Response>;
|
|
236
237
|
deleteRecord(data?: ComAtprotoRepoDeleteRecord.InputSchema, opts?: ComAtprotoRepoDeleteRecord.CallOptions): Promise<ComAtprotoRepoDeleteRecord.Response>;
|
|
@@ -240,26 +241,26 @@ export declare class RepoNS {
|
|
|
240
241
|
putRecord(data?: ComAtprotoRepoPutRecord.InputSchema, opts?: ComAtprotoRepoPutRecord.CallOptions): Promise<ComAtprotoRepoPutRecord.Response>;
|
|
241
242
|
}
|
|
242
243
|
export declare class ReportNS {
|
|
243
|
-
_service:
|
|
244
|
-
constructor(service:
|
|
244
|
+
_service: AtpServiceClient;
|
|
245
|
+
constructor(service: AtpServiceClient);
|
|
245
246
|
create(data?: ComAtprotoReportCreate.InputSchema, opts?: ComAtprotoReportCreate.CallOptions): Promise<ComAtprotoReportCreate.Response>;
|
|
246
247
|
}
|
|
247
248
|
export declare class ServerNS {
|
|
248
|
-
_service:
|
|
249
|
-
constructor(service:
|
|
249
|
+
_service: AtpServiceClient;
|
|
250
|
+
constructor(service: AtpServiceClient);
|
|
250
251
|
getAccountsConfig(params?: ComAtprotoServerGetAccountsConfig.QueryParams, opts?: ComAtprotoServerGetAccountsConfig.CallOptions): Promise<ComAtprotoServerGetAccountsConfig.Response>;
|
|
251
252
|
}
|
|
252
253
|
export declare class SessionNS {
|
|
253
|
-
_service:
|
|
254
|
-
constructor(service:
|
|
254
|
+
_service: AtpServiceClient;
|
|
255
|
+
constructor(service: AtpServiceClient);
|
|
255
256
|
create(data?: ComAtprotoSessionCreate.InputSchema, opts?: ComAtprotoSessionCreate.CallOptions): Promise<ComAtprotoSessionCreate.Response>;
|
|
256
257
|
delete(data?: ComAtprotoSessionDelete.InputSchema, opts?: ComAtprotoSessionDelete.CallOptions): Promise<ComAtprotoSessionDelete.Response>;
|
|
257
258
|
get(params?: ComAtprotoSessionGet.QueryParams, opts?: ComAtprotoSessionGet.CallOptions): Promise<ComAtprotoSessionGet.Response>;
|
|
258
259
|
refresh(data?: ComAtprotoSessionRefresh.InputSchema, opts?: ComAtprotoSessionRefresh.CallOptions): Promise<ComAtprotoSessionRefresh.Response>;
|
|
259
260
|
}
|
|
260
261
|
export declare class SyncNS {
|
|
261
|
-
_service:
|
|
262
|
-
constructor(service:
|
|
262
|
+
_service: AtpServiceClient;
|
|
263
|
+
constructor(service: AtpServiceClient);
|
|
263
264
|
getCheckout(params?: ComAtprotoSyncGetCheckout.QueryParams, opts?: ComAtprotoSyncGetCheckout.CallOptions): Promise<ComAtprotoSyncGetCheckout.Response>;
|
|
264
265
|
getCommitPath(params?: ComAtprotoSyncGetCommitPath.QueryParams, opts?: ComAtprotoSyncGetCommitPath.CallOptions): Promise<ComAtprotoSyncGetCommitPath.Response>;
|
|
265
266
|
getHead(params?: ComAtprotoSyncGetHead.QueryParams, opts?: ComAtprotoSyncGetHead.CallOptions): Promise<ComAtprotoSyncGetHead.Response>;
|
|
@@ -267,33 +268,34 @@ export declare class SyncNS {
|
|
|
267
268
|
getRepo(params?: ComAtprotoSyncGetRepo.QueryParams, opts?: ComAtprotoSyncGetRepo.CallOptions): Promise<ComAtprotoSyncGetRepo.Response>;
|
|
268
269
|
}
|
|
269
270
|
export declare class AppNS {
|
|
270
|
-
_service:
|
|
271
|
+
_service: AtpServiceClient;
|
|
271
272
|
bsky: BskyNS;
|
|
272
|
-
constructor(service:
|
|
273
|
+
constructor(service: AtpServiceClient);
|
|
273
274
|
}
|
|
274
275
|
export declare class BskyNS {
|
|
275
|
-
_service:
|
|
276
|
+
_service: AtpServiceClient;
|
|
276
277
|
actor: ActorNS;
|
|
277
278
|
embed: EmbedNS;
|
|
278
279
|
feed: FeedNS;
|
|
279
280
|
graph: GraphNS;
|
|
280
281
|
notification: NotificationNS;
|
|
281
282
|
system: SystemNS;
|
|
282
|
-
constructor(service:
|
|
283
|
+
constructor(service: AtpServiceClient);
|
|
283
284
|
}
|
|
284
285
|
export declare class ActorNS {
|
|
285
|
-
_service:
|
|
286
|
+
_service: AtpServiceClient;
|
|
286
287
|
profile: ProfileRecord;
|
|
287
|
-
constructor(service:
|
|
288
|
+
constructor(service: AtpServiceClient);
|
|
288
289
|
getProfile(params?: AppBskyActorGetProfile.QueryParams, opts?: AppBskyActorGetProfile.CallOptions): Promise<AppBskyActorGetProfile.Response>;
|
|
290
|
+
getProfiles(params?: AppBskyActorGetProfiles.QueryParams, opts?: AppBskyActorGetProfiles.CallOptions): Promise<AppBskyActorGetProfiles.Response>;
|
|
289
291
|
getSuggestions(params?: AppBskyActorGetSuggestions.QueryParams, opts?: AppBskyActorGetSuggestions.CallOptions): Promise<AppBskyActorGetSuggestions.Response>;
|
|
290
292
|
search(params?: AppBskyActorSearch.QueryParams, opts?: AppBskyActorSearch.CallOptions): Promise<AppBskyActorSearch.Response>;
|
|
291
293
|
searchTypeahead(params?: AppBskyActorSearchTypeahead.QueryParams, opts?: AppBskyActorSearchTypeahead.CallOptions): Promise<AppBskyActorSearchTypeahead.Response>;
|
|
292
294
|
updateProfile(data?: AppBskyActorUpdateProfile.InputSchema, opts?: AppBskyActorUpdateProfile.CallOptions): Promise<AppBskyActorUpdateProfile.Response>;
|
|
293
295
|
}
|
|
294
296
|
export declare class ProfileRecord {
|
|
295
|
-
_service:
|
|
296
|
-
constructor(service:
|
|
297
|
+
_service: AtpServiceClient;
|
|
298
|
+
constructor(service: AtpServiceClient);
|
|
297
299
|
list(params: Omit<ComAtprotoRepoListRecords.QueryParams, 'collection'>): Promise<{
|
|
298
300
|
cursor?: string;
|
|
299
301
|
records: {
|
|
@@ -313,15 +315,15 @@ export declare class ProfileRecord {
|
|
|
313
315
|
delete(params: Omit<ComAtprotoRepoDeleteRecord.InputSchema, 'collection'>, headers?: Record<string, string>): Promise<void>;
|
|
314
316
|
}
|
|
315
317
|
export declare class EmbedNS {
|
|
316
|
-
_service:
|
|
317
|
-
constructor(service:
|
|
318
|
+
_service: AtpServiceClient;
|
|
319
|
+
constructor(service: AtpServiceClient);
|
|
318
320
|
}
|
|
319
321
|
export declare class FeedNS {
|
|
320
|
-
_service:
|
|
322
|
+
_service: AtpServiceClient;
|
|
321
323
|
post: PostRecord;
|
|
322
324
|
repost: RepostRecord;
|
|
323
325
|
vote: VoteRecord;
|
|
324
|
-
constructor(service:
|
|
326
|
+
constructor(service: AtpServiceClient);
|
|
325
327
|
getAuthorFeed(params?: AppBskyFeedGetAuthorFeed.QueryParams, opts?: AppBskyFeedGetAuthorFeed.CallOptions): Promise<AppBskyFeedGetAuthorFeed.Response>;
|
|
326
328
|
getPostThread(params?: AppBskyFeedGetPostThread.QueryParams, opts?: AppBskyFeedGetPostThread.CallOptions): Promise<AppBskyFeedGetPostThread.Response>;
|
|
327
329
|
getRepostedBy(params?: AppBskyFeedGetRepostedBy.QueryParams, opts?: AppBskyFeedGetRepostedBy.CallOptions): Promise<AppBskyFeedGetRepostedBy.Response>;
|
|
@@ -330,8 +332,8 @@ export declare class FeedNS {
|
|
|
330
332
|
setVote(data?: AppBskyFeedSetVote.InputSchema, opts?: AppBskyFeedSetVote.CallOptions): Promise<AppBskyFeedSetVote.Response>;
|
|
331
333
|
}
|
|
332
334
|
export declare class PostRecord {
|
|
333
|
-
_service:
|
|
334
|
-
constructor(service:
|
|
335
|
+
_service: AtpServiceClient;
|
|
336
|
+
constructor(service: AtpServiceClient);
|
|
335
337
|
list(params: Omit<ComAtprotoRepoListRecords.QueryParams, 'collection'>): Promise<{
|
|
336
338
|
cursor?: string;
|
|
337
339
|
records: {
|
|
@@ -351,8 +353,8 @@ export declare class PostRecord {
|
|
|
351
353
|
delete(params: Omit<ComAtprotoRepoDeleteRecord.InputSchema, 'collection'>, headers?: Record<string, string>): Promise<void>;
|
|
352
354
|
}
|
|
353
355
|
export declare class RepostRecord {
|
|
354
|
-
_service:
|
|
355
|
-
constructor(service:
|
|
356
|
+
_service: AtpServiceClient;
|
|
357
|
+
constructor(service: AtpServiceClient);
|
|
356
358
|
list(params: Omit<ComAtprotoRepoListRecords.QueryParams, 'collection'>): Promise<{
|
|
357
359
|
cursor?: string;
|
|
358
360
|
records: {
|
|
@@ -372,8 +374,8 @@ export declare class RepostRecord {
|
|
|
372
374
|
delete(params: Omit<ComAtprotoRepoDeleteRecord.InputSchema, 'collection'>, headers?: Record<string, string>): Promise<void>;
|
|
373
375
|
}
|
|
374
376
|
export declare class VoteRecord {
|
|
375
|
-
_service:
|
|
376
|
-
constructor(service:
|
|
377
|
+
_service: AtpServiceClient;
|
|
378
|
+
constructor(service: AtpServiceClient);
|
|
377
379
|
list(params: Omit<ComAtprotoRepoListRecords.QueryParams, 'collection'>): Promise<{
|
|
378
380
|
cursor?: string;
|
|
379
381
|
records: {
|
|
@@ -393,11 +395,11 @@ export declare class VoteRecord {
|
|
|
393
395
|
delete(params: Omit<ComAtprotoRepoDeleteRecord.InputSchema, 'collection'>, headers?: Record<string, string>): Promise<void>;
|
|
394
396
|
}
|
|
395
397
|
export declare class GraphNS {
|
|
396
|
-
_service:
|
|
398
|
+
_service: AtpServiceClient;
|
|
397
399
|
assertion: AssertionRecord;
|
|
398
400
|
confirmation: ConfirmationRecord;
|
|
399
401
|
follow: FollowRecord;
|
|
400
|
-
constructor(service:
|
|
402
|
+
constructor(service: AtpServiceClient);
|
|
401
403
|
getFollowers(params?: AppBskyGraphGetFollowers.QueryParams, opts?: AppBskyGraphGetFollowers.CallOptions): Promise<AppBskyGraphGetFollowers.Response>;
|
|
402
404
|
getFollows(params?: AppBskyGraphGetFollows.QueryParams, opts?: AppBskyGraphGetFollows.CallOptions): Promise<AppBskyGraphGetFollows.Response>;
|
|
403
405
|
getMutes(params?: AppBskyGraphGetMutes.QueryParams, opts?: AppBskyGraphGetMutes.CallOptions): Promise<AppBskyGraphGetMutes.Response>;
|
|
@@ -405,8 +407,8 @@ export declare class GraphNS {
|
|
|
405
407
|
unmute(data?: AppBskyGraphUnmute.InputSchema, opts?: AppBskyGraphUnmute.CallOptions): Promise<AppBskyGraphUnmute.Response>;
|
|
406
408
|
}
|
|
407
409
|
export declare class AssertionRecord {
|
|
408
|
-
_service:
|
|
409
|
-
constructor(service:
|
|
410
|
+
_service: AtpServiceClient;
|
|
411
|
+
constructor(service: AtpServiceClient);
|
|
410
412
|
list(params: Omit<ComAtprotoRepoListRecords.QueryParams, 'collection'>): Promise<{
|
|
411
413
|
cursor?: string;
|
|
412
414
|
records: {
|
|
@@ -426,8 +428,8 @@ export declare class AssertionRecord {
|
|
|
426
428
|
delete(params: Omit<ComAtprotoRepoDeleteRecord.InputSchema, 'collection'>, headers?: Record<string, string>): Promise<void>;
|
|
427
429
|
}
|
|
428
430
|
export declare class ConfirmationRecord {
|
|
429
|
-
_service:
|
|
430
|
-
constructor(service:
|
|
431
|
+
_service: AtpServiceClient;
|
|
432
|
+
constructor(service: AtpServiceClient);
|
|
431
433
|
list(params: Omit<ComAtprotoRepoListRecords.QueryParams, 'collection'>): Promise<{
|
|
432
434
|
cursor?: string;
|
|
433
435
|
records: {
|
|
@@ -447,8 +449,8 @@ export declare class ConfirmationRecord {
|
|
|
447
449
|
delete(params: Omit<ComAtprotoRepoDeleteRecord.InputSchema, 'collection'>, headers?: Record<string, string>): Promise<void>;
|
|
448
450
|
}
|
|
449
451
|
export declare class FollowRecord {
|
|
450
|
-
_service:
|
|
451
|
-
constructor(service:
|
|
452
|
+
_service: AtpServiceClient;
|
|
453
|
+
constructor(service: AtpServiceClient);
|
|
452
454
|
list(params: Omit<ComAtprotoRepoListRecords.QueryParams, 'collection'>): Promise<{
|
|
453
455
|
cursor?: string;
|
|
454
456
|
records: {
|
|
@@ -468,20 +470,20 @@ export declare class FollowRecord {
|
|
|
468
470
|
delete(params: Omit<ComAtprotoRepoDeleteRecord.InputSchema, 'collection'>, headers?: Record<string, string>): Promise<void>;
|
|
469
471
|
}
|
|
470
472
|
export declare class NotificationNS {
|
|
471
|
-
_service:
|
|
472
|
-
constructor(service:
|
|
473
|
+
_service: AtpServiceClient;
|
|
474
|
+
constructor(service: AtpServiceClient);
|
|
473
475
|
getCount(params?: AppBskyNotificationGetCount.QueryParams, opts?: AppBskyNotificationGetCount.CallOptions): Promise<AppBskyNotificationGetCount.Response>;
|
|
474
476
|
list(params?: AppBskyNotificationList.QueryParams, opts?: AppBskyNotificationList.CallOptions): Promise<AppBskyNotificationList.Response>;
|
|
475
477
|
updateSeen(data?: AppBskyNotificationUpdateSeen.InputSchema, opts?: AppBskyNotificationUpdateSeen.CallOptions): Promise<AppBskyNotificationUpdateSeen.Response>;
|
|
476
478
|
}
|
|
477
479
|
export declare class SystemNS {
|
|
478
|
-
_service:
|
|
480
|
+
_service: AtpServiceClient;
|
|
479
481
|
declaration: DeclarationRecord;
|
|
480
|
-
constructor(service:
|
|
482
|
+
constructor(service: AtpServiceClient);
|
|
481
483
|
}
|
|
482
484
|
export declare class DeclarationRecord {
|
|
483
|
-
_service:
|
|
484
|
-
constructor(service:
|
|
485
|
+
_service: AtpServiceClient;
|
|
486
|
+
constructor(service: AtpServiceClient);
|
|
485
487
|
list(params: Omit<ComAtprotoRepoListRecords.QueryParams, 'collection'>): Promise<{
|
|
486
488
|
cursor?: string;
|
|
487
489
|
records: {
|