@atproto/api 0.12.16 → 0.12.18-next.0
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/CHANGELOG.md +6 -0
- package/dist/client/index.d.ts +42 -0
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +103 -5
- package/dist/client/index.js.map +1 -1
- package/dist/client/lexicons.d.ts +395 -0
- package/dist/client/lexicons.d.ts.map +1 -1
- package/dist/client/lexicons.js +400 -0
- package/dist/client/lexicons.js.map +1 -1
- package/dist/client/types/app/bsky/actor/defs.d.ts +4 -0
- package/dist/client/types/app/bsky/actor/defs.d.ts.map +1 -1
- package/dist/client/types/app/bsky/actor/defs.js.map +1 -1
- package/dist/client/types/app/bsky/actor/profile.d.ts +3 -0
- package/dist/client/types/app/bsky/actor/profile.d.ts.map +1 -1
- package/dist/client/types/app/bsky/actor/profile.js.map +1 -1
- package/dist/client/types/app/bsky/graph/defs.d.ts +37 -1
- package/dist/client/types/app/bsky/graph/defs.d.ts.map +1 -1
- package/dist/client/types/app/bsky/graph/defs.js +23 -1
- package/dist/client/types/app/bsky/graph/defs.js.map +1 -1
- package/dist/client/types/app/bsky/graph/getActorStarterPacks.d.ts +26 -0
- package/dist/client/types/app/bsky/graph/getActorStarterPacks.d.ts.map +1 -0
- package/dist/client/types/app/bsky/graph/getActorStarterPacks.js +14 -0
- package/dist/client/types/app/bsky/graph/getActorStarterPacks.js.map +1 -0
- package/dist/client/types/app/bsky/graph/getStarterPack.d.ts +24 -0
- package/dist/client/types/app/bsky/graph/getStarterPack.d.ts.map +1 -0
- package/dist/client/types/app/bsky/graph/getStarterPack.js +14 -0
- package/dist/client/types/app/bsky/graph/getStarterPack.js.map +1 -0
- package/dist/client/types/app/bsky/graph/starterpack.d.ts +25 -0
- package/dist/client/types/app/bsky/graph/starterpack.d.ts.map +1 -0
- package/dist/client/types/app/bsky/graph/starterpack.js +27 -0
- package/dist/client/types/app/bsky/graph/starterpack.js.map +1 -0
- package/dist/client/types/com/atproto/admin/searchAccounts.d.ts +26 -0
- package/dist/client/types/com/atproto/admin/searchAccounts.d.ts.map +1 -0
- package/dist/client/types/com/atproto/admin/searchAccounts.js +14 -0
- package/dist/client/types/com/atproto/admin/searchAccounts.js.map +1 -0
- package/dist/client/types/tools/ozone/server/getConfig.d.ts +38 -0
- package/dist/client/types/tools/ozone/server/getConfig.d.ts.map +1 -0
- package/dist/client/types/tools/ozone/server/getConfig.js +36 -0
- package/dist/client/types/tools/ozone/server/getConfig.js.map +1 -0
- package/package.json +3 -3
- package/src/client/index.ts +132 -0
- package/src/client/lexicons.ts +402 -0
- package/src/client/types/app/bsky/actor/defs.ts +4 -0
- package/src/client/types/app/bsky/actor/profile.ts +3 -0
- package/src/client/types/app/bsky/graph/defs.ts +59 -0
- package/src/client/types/app/bsky/graph/getActorStarterPacks.ts +39 -0
- package/src/client/types/app/bsky/graph/getStarterPack.ts +37 -0
- package/src/client/types/app/bsky/graph/starterpack.ts +50 -0
- package/src/client/types/com/atproto/admin/searchAccounts.ts +39 -0
- package/src/client/types/tools/ozone/server/getConfig.ts +75 -0
package/src/client/index.ts
CHANGED
|
@@ -16,6 +16,7 @@ import * as ComAtprotoAdminGetAccountInfo from './types/com/atproto/admin/getAcc
|
|
|
16
16
|
import * as ComAtprotoAdminGetAccountInfos from './types/com/atproto/admin/getAccountInfos'
|
|
17
17
|
import * as ComAtprotoAdminGetInviteCodes from './types/com/atproto/admin/getInviteCodes'
|
|
18
18
|
import * as ComAtprotoAdminGetSubjectStatus from './types/com/atproto/admin/getSubjectStatus'
|
|
19
|
+
import * as ComAtprotoAdminSearchAccounts from './types/com/atproto/admin/searchAccounts'
|
|
19
20
|
import * as ComAtprotoAdminSendEmail from './types/com/atproto/admin/sendEmail'
|
|
20
21
|
import * as ComAtprotoAdminUpdateAccountEmail from './types/com/atproto/admin/updateAccountEmail'
|
|
21
22
|
import * as ComAtprotoAdminUpdateAccountHandle from './types/com/atproto/admin/updateAccountHandle'
|
|
@@ -124,6 +125,7 @@ import * as AppBskyFeedThreadgate from './types/app/bsky/feed/threadgate'
|
|
|
124
125
|
import * as AppBskyGraphBlock from './types/app/bsky/graph/block'
|
|
125
126
|
import * as AppBskyGraphDefs from './types/app/bsky/graph/defs'
|
|
126
127
|
import * as AppBskyGraphFollow from './types/app/bsky/graph/follow'
|
|
128
|
+
import * as AppBskyGraphGetActorStarterPacks from './types/app/bsky/graph/getActorStarterPacks'
|
|
127
129
|
import * as AppBskyGraphGetBlocks from './types/app/bsky/graph/getBlocks'
|
|
128
130
|
import * as AppBskyGraphGetFollowers from './types/app/bsky/graph/getFollowers'
|
|
129
131
|
import * as AppBskyGraphGetFollows from './types/app/bsky/graph/getFollows'
|
|
@@ -133,12 +135,14 @@ import * as AppBskyGraphGetListMutes from './types/app/bsky/graph/getListMutes'
|
|
|
133
135
|
import * as AppBskyGraphGetLists from './types/app/bsky/graph/getLists'
|
|
134
136
|
import * as AppBskyGraphGetMutes from './types/app/bsky/graph/getMutes'
|
|
135
137
|
import * as AppBskyGraphGetRelationships from './types/app/bsky/graph/getRelationships'
|
|
138
|
+
import * as AppBskyGraphGetStarterPack from './types/app/bsky/graph/getStarterPack'
|
|
136
139
|
import * as AppBskyGraphGetSuggestedFollowsByActor from './types/app/bsky/graph/getSuggestedFollowsByActor'
|
|
137
140
|
import * as AppBskyGraphList from './types/app/bsky/graph/list'
|
|
138
141
|
import * as AppBskyGraphListblock from './types/app/bsky/graph/listblock'
|
|
139
142
|
import * as AppBskyGraphListitem from './types/app/bsky/graph/listitem'
|
|
140
143
|
import * as AppBskyGraphMuteActor from './types/app/bsky/graph/muteActor'
|
|
141
144
|
import * as AppBskyGraphMuteActorList from './types/app/bsky/graph/muteActorList'
|
|
145
|
+
import * as AppBskyGraphStarterpack from './types/app/bsky/graph/starterpack'
|
|
142
146
|
import * as AppBskyGraphUnmuteActor from './types/app/bsky/graph/unmuteActor'
|
|
143
147
|
import * as AppBskyGraphUnmuteActorList from './types/app/bsky/graph/unmuteActorList'
|
|
144
148
|
import * as AppBskyLabelerDefs from './types/app/bsky/labeler/defs'
|
|
@@ -188,6 +192,7 @@ import * as ToolsOzoneModerationGetRepo from './types/tools/ozone/moderation/get
|
|
|
188
192
|
import * as ToolsOzoneModerationQueryEvents from './types/tools/ozone/moderation/queryEvents'
|
|
189
193
|
import * as ToolsOzoneModerationQueryStatuses from './types/tools/ozone/moderation/queryStatuses'
|
|
190
194
|
import * as ToolsOzoneModerationSearchRepos from './types/tools/ozone/moderation/searchRepos'
|
|
195
|
+
import * as ToolsOzoneServerGetConfig from './types/tools/ozone/server/getConfig'
|
|
191
196
|
|
|
192
197
|
export * as ComAtprotoAdminDefs from './types/com/atproto/admin/defs'
|
|
193
198
|
export * as ComAtprotoAdminDeleteAccount from './types/com/atproto/admin/deleteAccount'
|
|
@@ -198,6 +203,7 @@ export * as ComAtprotoAdminGetAccountInfo from './types/com/atproto/admin/getAcc
|
|
|
198
203
|
export * as ComAtprotoAdminGetAccountInfos from './types/com/atproto/admin/getAccountInfos'
|
|
199
204
|
export * as ComAtprotoAdminGetInviteCodes from './types/com/atproto/admin/getInviteCodes'
|
|
200
205
|
export * as ComAtprotoAdminGetSubjectStatus from './types/com/atproto/admin/getSubjectStatus'
|
|
206
|
+
export * as ComAtprotoAdminSearchAccounts from './types/com/atproto/admin/searchAccounts'
|
|
201
207
|
export * as ComAtprotoAdminSendEmail from './types/com/atproto/admin/sendEmail'
|
|
202
208
|
export * as ComAtprotoAdminUpdateAccountEmail from './types/com/atproto/admin/updateAccountEmail'
|
|
203
209
|
export * as ComAtprotoAdminUpdateAccountHandle from './types/com/atproto/admin/updateAccountHandle'
|
|
@@ -306,6 +312,7 @@ export * as AppBskyFeedThreadgate from './types/app/bsky/feed/threadgate'
|
|
|
306
312
|
export * as AppBskyGraphBlock from './types/app/bsky/graph/block'
|
|
307
313
|
export * as AppBskyGraphDefs from './types/app/bsky/graph/defs'
|
|
308
314
|
export * as AppBskyGraphFollow from './types/app/bsky/graph/follow'
|
|
315
|
+
export * as AppBskyGraphGetActorStarterPacks from './types/app/bsky/graph/getActorStarterPacks'
|
|
309
316
|
export * as AppBskyGraphGetBlocks from './types/app/bsky/graph/getBlocks'
|
|
310
317
|
export * as AppBskyGraphGetFollowers from './types/app/bsky/graph/getFollowers'
|
|
311
318
|
export * as AppBskyGraphGetFollows from './types/app/bsky/graph/getFollows'
|
|
@@ -315,12 +322,14 @@ export * as AppBskyGraphGetListMutes from './types/app/bsky/graph/getListMutes'
|
|
|
315
322
|
export * as AppBskyGraphGetLists from './types/app/bsky/graph/getLists'
|
|
316
323
|
export * as AppBskyGraphGetMutes from './types/app/bsky/graph/getMutes'
|
|
317
324
|
export * as AppBskyGraphGetRelationships from './types/app/bsky/graph/getRelationships'
|
|
325
|
+
export * as AppBskyGraphGetStarterPack from './types/app/bsky/graph/getStarterPack'
|
|
318
326
|
export * as AppBskyGraphGetSuggestedFollowsByActor from './types/app/bsky/graph/getSuggestedFollowsByActor'
|
|
319
327
|
export * as AppBskyGraphList from './types/app/bsky/graph/list'
|
|
320
328
|
export * as AppBskyGraphListblock from './types/app/bsky/graph/listblock'
|
|
321
329
|
export * as AppBskyGraphListitem from './types/app/bsky/graph/listitem'
|
|
322
330
|
export * as AppBskyGraphMuteActor from './types/app/bsky/graph/muteActor'
|
|
323
331
|
export * as AppBskyGraphMuteActorList from './types/app/bsky/graph/muteActorList'
|
|
332
|
+
export * as AppBskyGraphStarterpack from './types/app/bsky/graph/starterpack'
|
|
324
333
|
export * as AppBskyGraphUnmuteActor from './types/app/bsky/graph/unmuteActor'
|
|
325
334
|
export * as AppBskyGraphUnmuteActorList from './types/app/bsky/graph/unmuteActorList'
|
|
326
335
|
export * as AppBskyLabelerDefs from './types/app/bsky/labeler/defs'
|
|
@@ -370,6 +379,7 @@ export * as ToolsOzoneModerationGetRepo from './types/tools/ozone/moderation/get
|
|
|
370
379
|
export * as ToolsOzoneModerationQueryEvents from './types/tools/ozone/moderation/queryEvents'
|
|
371
380
|
export * as ToolsOzoneModerationQueryStatuses from './types/tools/ozone/moderation/queryStatuses'
|
|
372
381
|
export * as ToolsOzoneModerationSearchRepos from './types/tools/ozone/moderation/searchRepos'
|
|
382
|
+
export * as ToolsOzoneServerGetConfig from './types/tools/ozone/server/getConfig'
|
|
373
383
|
|
|
374
384
|
export const COM_ATPROTO_MODERATION = {
|
|
375
385
|
DefsReasonSpam: 'com.atproto.moderation.defs#reasonSpam',
|
|
@@ -397,6 +407,7 @@ export const APP_BSKY_FEED = {
|
|
|
397
407
|
export const APP_BSKY_GRAPH = {
|
|
398
408
|
DefsModlist: 'app.bsky.graph.defs#modlist',
|
|
399
409
|
DefsCuratelist: 'app.bsky.graph.defs#curatelist',
|
|
410
|
+
DefsReferencelist: 'app.bsky.graph.defs#referencelist',
|
|
400
411
|
}
|
|
401
412
|
export const TOOLS_OZONE_MODERATION = {
|
|
402
413
|
DefsReviewOpen: 'tools.ozone.moderation.defs#reviewOpen',
|
|
@@ -568,6 +579,17 @@ export class ComAtprotoAdminNS {
|
|
|
568
579
|
})
|
|
569
580
|
}
|
|
570
581
|
|
|
582
|
+
searchAccounts(
|
|
583
|
+
params?: ComAtprotoAdminSearchAccounts.QueryParams,
|
|
584
|
+
opts?: ComAtprotoAdminSearchAccounts.CallOptions,
|
|
585
|
+
): Promise<ComAtprotoAdminSearchAccounts.Response> {
|
|
586
|
+
return this._service.xrpc
|
|
587
|
+
.call('com.atproto.admin.searchAccounts', params, undefined, opts)
|
|
588
|
+
.catch((e) => {
|
|
589
|
+
throw ComAtprotoAdminSearchAccounts.toKnownErr(e)
|
|
590
|
+
})
|
|
591
|
+
}
|
|
592
|
+
|
|
571
593
|
sendEmail(
|
|
572
594
|
data?: ComAtprotoAdminSendEmail.InputSchema,
|
|
573
595
|
opts?: ComAtprotoAdminSendEmail.CallOptions,
|
|
@@ -2039,6 +2061,7 @@ export class AppBskyGraphNS {
|
|
|
2039
2061
|
list: ListRecord
|
|
2040
2062
|
listblock: ListblockRecord
|
|
2041
2063
|
listitem: ListitemRecord
|
|
2064
|
+
starterpack: StarterpackRecord
|
|
2042
2065
|
|
|
2043
2066
|
constructor(service: AtpServiceClient) {
|
|
2044
2067
|
this._service = service
|
|
@@ -2047,6 +2070,18 @@ export class AppBskyGraphNS {
|
|
|
2047
2070
|
this.list = new ListRecord(service)
|
|
2048
2071
|
this.listblock = new ListblockRecord(service)
|
|
2049
2072
|
this.listitem = new ListitemRecord(service)
|
|
2073
|
+
this.starterpack = new StarterpackRecord(service)
|
|
2074
|
+
}
|
|
2075
|
+
|
|
2076
|
+
getActorStarterPacks(
|
|
2077
|
+
params?: AppBskyGraphGetActorStarterPacks.QueryParams,
|
|
2078
|
+
opts?: AppBskyGraphGetActorStarterPacks.CallOptions,
|
|
2079
|
+
): Promise<AppBskyGraphGetActorStarterPacks.Response> {
|
|
2080
|
+
return this._service.xrpc
|
|
2081
|
+
.call('app.bsky.graph.getActorStarterPacks', params, undefined, opts)
|
|
2082
|
+
.catch((e) => {
|
|
2083
|
+
throw AppBskyGraphGetActorStarterPacks.toKnownErr(e)
|
|
2084
|
+
})
|
|
2050
2085
|
}
|
|
2051
2086
|
|
|
2052
2087
|
getBlocks(
|
|
@@ -2148,6 +2183,17 @@ export class AppBskyGraphNS {
|
|
|
2148
2183
|
})
|
|
2149
2184
|
}
|
|
2150
2185
|
|
|
2186
|
+
getStarterPack(
|
|
2187
|
+
params?: AppBskyGraphGetStarterPack.QueryParams,
|
|
2188
|
+
opts?: AppBskyGraphGetStarterPack.CallOptions,
|
|
2189
|
+
): Promise<AppBskyGraphGetStarterPack.Response> {
|
|
2190
|
+
return this._service.xrpc
|
|
2191
|
+
.call('app.bsky.graph.getStarterPack', params, undefined, opts)
|
|
2192
|
+
.catch((e) => {
|
|
2193
|
+
throw AppBskyGraphGetStarterPack.toKnownErr(e)
|
|
2194
|
+
})
|
|
2195
|
+
}
|
|
2196
|
+
|
|
2151
2197
|
getSuggestedFollowsByActor(
|
|
2152
2198
|
params?: AppBskyGraphGetSuggestedFollowsByActor.QueryParams,
|
|
2153
2199
|
opts?: AppBskyGraphGetSuggestedFollowsByActor.CallOptions,
|
|
@@ -2518,6 +2564,71 @@ export class ListitemRecord {
|
|
|
2518
2564
|
}
|
|
2519
2565
|
}
|
|
2520
2566
|
|
|
2567
|
+
export class StarterpackRecord {
|
|
2568
|
+
_service: AtpServiceClient
|
|
2569
|
+
|
|
2570
|
+
constructor(service: AtpServiceClient) {
|
|
2571
|
+
this._service = service
|
|
2572
|
+
}
|
|
2573
|
+
|
|
2574
|
+
async list(
|
|
2575
|
+
params: Omit<ComAtprotoRepoListRecords.QueryParams, 'collection'>,
|
|
2576
|
+
): Promise<{
|
|
2577
|
+
cursor?: string
|
|
2578
|
+
records: { uri: string; value: AppBskyGraphStarterpack.Record }[]
|
|
2579
|
+
}> {
|
|
2580
|
+
const res = await this._service.xrpc.call('com.atproto.repo.listRecords', {
|
|
2581
|
+
collection: 'app.bsky.graph.starterpack',
|
|
2582
|
+
...params,
|
|
2583
|
+
})
|
|
2584
|
+
return res.data
|
|
2585
|
+
}
|
|
2586
|
+
|
|
2587
|
+
async get(
|
|
2588
|
+
params: Omit<ComAtprotoRepoGetRecord.QueryParams, 'collection'>,
|
|
2589
|
+
): Promise<{
|
|
2590
|
+
uri: string
|
|
2591
|
+
cid: string
|
|
2592
|
+
value: AppBskyGraphStarterpack.Record
|
|
2593
|
+
}> {
|
|
2594
|
+
const res = await this._service.xrpc.call('com.atproto.repo.getRecord', {
|
|
2595
|
+
collection: 'app.bsky.graph.starterpack',
|
|
2596
|
+
...params,
|
|
2597
|
+
})
|
|
2598
|
+
return res.data
|
|
2599
|
+
}
|
|
2600
|
+
|
|
2601
|
+
async create(
|
|
2602
|
+
params: Omit<
|
|
2603
|
+
ComAtprotoRepoCreateRecord.InputSchema,
|
|
2604
|
+
'collection' | 'record'
|
|
2605
|
+
>,
|
|
2606
|
+
record: AppBskyGraphStarterpack.Record,
|
|
2607
|
+
headers?: Record<string, string>,
|
|
2608
|
+
): Promise<{ uri: string; cid: string }> {
|
|
2609
|
+
record.$type = 'app.bsky.graph.starterpack'
|
|
2610
|
+
const res = await this._service.xrpc.call(
|
|
2611
|
+
'com.atproto.repo.createRecord',
|
|
2612
|
+
undefined,
|
|
2613
|
+
{ collection: 'app.bsky.graph.starterpack', ...params, record },
|
|
2614
|
+
{ encoding: 'application/json', headers },
|
|
2615
|
+
)
|
|
2616
|
+
return res.data
|
|
2617
|
+
}
|
|
2618
|
+
|
|
2619
|
+
async delete(
|
|
2620
|
+
params: Omit<ComAtprotoRepoDeleteRecord.InputSchema, 'collection'>,
|
|
2621
|
+
headers?: Record<string, string>,
|
|
2622
|
+
): Promise<void> {
|
|
2623
|
+
await this._service.xrpc.call(
|
|
2624
|
+
'com.atproto.repo.deleteRecord',
|
|
2625
|
+
undefined,
|
|
2626
|
+
{ collection: 'app.bsky.graph.starterpack', ...params },
|
|
2627
|
+
{ headers },
|
|
2628
|
+
)
|
|
2629
|
+
}
|
|
2630
|
+
}
|
|
2631
|
+
|
|
2521
2632
|
export class AppBskyLabelerNS {
|
|
2522
2633
|
_service: AtpServiceClient
|
|
2523
2634
|
service: ServiceRecord
|
|
@@ -3063,11 +3174,13 @@ export class ToolsOzoneNS {
|
|
|
3063
3174
|
_service: AtpServiceClient
|
|
3064
3175
|
communication: ToolsOzoneCommunicationNS
|
|
3065
3176
|
moderation: ToolsOzoneModerationNS
|
|
3177
|
+
server: ToolsOzoneServerNS
|
|
3066
3178
|
|
|
3067
3179
|
constructor(service: AtpServiceClient) {
|
|
3068
3180
|
this._service = service
|
|
3069
3181
|
this.communication = new ToolsOzoneCommunicationNS(service)
|
|
3070
3182
|
this.moderation = new ToolsOzoneModerationNS(service)
|
|
3183
|
+
this.server = new ToolsOzoneServerNS(service)
|
|
3071
3184
|
}
|
|
3072
3185
|
}
|
|
3073
3186
|
|
|
@@ -3207,3 +3320,22 @@ export class ToolsOzoneModerationNS {
|
|
|
3207
3320
|
})
|
|
3208
3321
|
}
|
|
3209
3322
|
}
|
|
3323
|
+
|
|
3324
|
+
export class ToolsOzoneServerNS {
|
|
3325
|
+
_service: AtpServiceClient
|
|
3326
|
+
|
|
3327
|
+
constructor(service: AtpServiceClient) {
|
|
3328
|
+
this._service = service
|
|
3329
|
+
}
|
|
3330
|
+
|
|
3331
|
+
getConfig(
|
|
3332
|
+
params?: ToolsOzoneServerGetConfig.QueryParams,
|
|
3333
|
+
opts?: ToolsOzoneServerGetConfig.CallOptions,
|
|
3334
|
+
): Promise<ToolsOzoneServerGetConfig.Response> {
|
|
3335
|
+
return this._service.xrpc
|
|
3336
|
+
.call('tools.ozone.server.getConfig', params, undefined, opts)
|
|
3337
|
+
.catch((e) => {
|
|
3338
|
+
throw ToolsOzoneServerGetConfig.toKnownErr(e)
|
|
3339
|
+
})
|
|
3340
|
+
}
|
|
3341
|
+
}
|