@atproto/api 0.9.7 → 0.10.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 +16 -0
- package/dist/bsky-agent.d.ts +6 -1
- package/dist/client/index.d.ts +30 -9
- package/dist/client/lexicons.d.ts +449 -110
- package/dist/client/types/app/bsky/actor/defs.d.ts +20 -0
- package/dist/client/types/com/atproto/admin/defs.d.ts +9 -0
- package/dist/client/types/com/atproto/admin/emitModerationEvent.d.ts +1 -1
- package/dist/client/types/com/atproto/admin/queryModerationEvents.d.ts +2 -0
- package/dist/client/types/com/atproto/admin/queryModerationStatuses.d.ts +2 -0
- package/dist/client/types/com/atproto/identity/getRecommendedDidCredentials.d.ts +20 -0
- package/dist/client/types/com/atproto/{temp/pushBlob.d.ts → identity/requestPlcOperationSignature.d.ts} +1 -3
- package/dist/client/types/com/atproto/identity/signPlcOperation.d.ts +26 -0
- package/dist/client/types/com/atproto/identity/submitPlcOperation.d.ts +17 -0
- package/dist/client/types/com/atproto/{temp → repo}/importRepo.d.ts +0 -2
- package/dist/client/types/com/atproto/repo/listMissingBlobs.d.ts +28 -0
- package/dist/client/types/com/atproto/server/activateAccount.d.ts +13 -0
- package/dist/client/types/com/atproto/server/checkAccountStatus.d.ts +25 -0
- package/dist/client/types/com/atproto/server/deactivateAccount.d.ts +17 -0
- package/dist/client/types/com/atproto/server/describeServer.d.ts +1 -0
- package/dist/client/types/com/atproto/server/getServiceAuth.d.ts +18 -0
- package/dist/client/types/com/atproto/sync/subscribeRepos.d.ts +8 -0
- package/dist/index.js +1068 -549
- package/dist/index.js.map +3 -3
- package/dist/types.d.ts +3 -0
- package/package.json +2 -2
- package/src/bsky-agent.ts +136 -0
- package/src/client/index.ts +140 -39
- package/src/client/lexicons.ts +491 -138
- package/src/client/types/app/bsky/actor/defs.ts +59 -0
- package/src/client/types/app/bsky/feed/post.ts +1 -1
- package/src/client/types/com/atproto/admin/defs.ts +24 -0
- package/src/client/types/com/atproto/admin/emitModerationEvent.ts +1 -0
- package/src/client/types/com/atproto/admin/queryModerationEvents.ts +4 -0
- package/src/client/types/com/atproto/admin/queryModerationStatuses.ts +2 -0
- package/src/client/types/com/atproto/identity/getRecommendedDidCredentials.ts +37 -0
- package/src/client/types/com/atproto/identity/requestPlcOperationSignature.ts +28 -0
- package/src/client/types/com/atproto/identity/signPlcOperation.ts +44 -0
- package/src/client/types/com/atproto/{temp/pushBlob.ts → identity/submitPlcOperation.ts} +6 -6
- package/src/client/types/com/atproto/{temp → repo}/importRepo.ts +1 -5
- package/src/client/types/com/atproto/repo/listMissingBlobs.ts +55 -0
- package/src/client/types/com/atproto/server/activateAccount.ts +28 -0
- package/src/client/types/com/atproto/server/checkAccountStatus.ts +41 -0
- package/src/client/types/com/atproto/server/deactivateAccount.ts +33 -0
- package/src/client/types/com/atproto/server/describeServer.ts +1 -0
- package/src/client/types/com/atproto/server/getServiceAuth.ts +36 -0
- package/src/client/types/com/atproto/sync/subscribeRepos.ts +23 -3
- package/src/types.ts +3 -0
- package/tests/agent.test.ts +1 -0
- package/tests/bsky-agent.test.ts +183 -0
- package/dist/client/types/com/atproto/temp/transferAccount.d.ts +0 -48
- package/src/client/types/com/atproto/temp/transferAccount.ts +0 -92
package/dist/types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AppBskyActorDefs } from './client';
|
|
1
2
|
import { LabelPreference } from './moderation/types';
|
|
2
3
|
export type AtpSessionEvent = 'create' | 'create-failed' | 'update' | 'expired' | 'network-error';
|
|
3
4
|
export interface AtpSessionData {
|
|
@@ -56,5 +57,7 @@ export interface BskyPreferences {
|
|
|
56
57
|
contentLabels: Record<string, BskyLabelPreference>;
|
|
57
58
|
birthDate: Date | undefined;
|
|
58
59
|
interests: BskyInterestsPreference;
|
|
60
|
+
mutedWords: AppBskyActorDefs.MutedWord[];
|
|
61
|
+
hiddenPosts: string[];
|
|
59
62
|
}
|
|
60
63
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atproto/api",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Client library for atproto and Bluesky",
|
|
6
6
|
"keywords": [
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"common-tags": "^1.8.2",
|
|
30
30
|
"@atproto/lex-cli": "^0.3.0",
|
|
31
|
-
"@atproto/dev-env": "^0.2.
|
|
31
|
+
"@atproto/dev-env": "^0.2.32"
|
|
32
32
|
},
|
|
33
33
|
"scripts": {
|
|
34
34
|
"codegen": "pnpm docgen && node ./scripts/generate-code.mjs && lex gen-api ./src/client ../../lexicons/com/atproto/*/* ../../lexicons/app/bsky/*/*",
|
package/src/bsky-agent.ts
CHANGED
|
@@ -327,6 +327,8 @@ export class BskyAgent extends AtpAgent {
|
|
|
327
327
|
interests: {
|
|
328
328
|
tags: [],
|
|
329
329
|
},
|
|
330
|
+
mutedWords: [],
|
|
331
|
+
hiddenPosts: [],
|
|
330
332
|
}
|
|
331
333
|
const res = await this.app.bsky.actor.getPreferences({})
|
|
332
334
|
for (const pref of res.data.preferences) {
|
|
@@ -380,6 +382,20 @@ export class BskyAgent extends AtpAgent {
|
|
|
380
382
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
381
383
|
const { $type, ...v } = pref
|
|
382
384
|
prefs.interests = { ...prefs.interests, ...v }
|
|
385
|
+
} else if (
|
|
386
|
+
AppBskyActorDefs.isMutedWordsPref(pref) &&
|
|
387
|
+
AppBskyActorDefs.validateMutedWordsPref(pref).success
|
|
388
|
+
) {
|
|
389
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
390
|
+
const { $type, ...v } = pref
|
|
391
|
+
prefs.mutedWords = v.items
|
|
392
|
+
} else if (
|
|
393
|
+
AppBskyActorDefs.isHiddenPostsPref(pref) &&
|
|
394
|
+
AppBskyActorDefs.validateHiddenPostsPref(pref).success
|
|
395
|
+
) {
|
|
396
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
397
|
+
const { $type, ...v } = pref
|
|
398
|
+
prefs.hiddenPosts = v.items
|
|
383
399
|
}
|
|
384
400
|
}
|
|
385
401
|
return prefs
|
|
@@ -548,6 +564,26 @@ export class BskyAgent extends AtpAgent {
|
|
|
548
564
|
.concat([{ ...pref, $type: 'app.bsky.actor.defs#interestsPref' }])
|
|
549
565
|
})
|
|
550
566
|
}
|
|
567
|
+
|
|
568
|
+
async upsertMutedWords(mutedWords: AppBskyActorDefs.MutedWord[]) {
|
|
569
|
+
await updateMutedWords(this, mutedWords, 'upsert')
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
async updateMutedWord(mutedWord: AppBskyActorDefs.MutedWord) {
|
|
573
|
+
await updateMutedWords(this, [mutedWord], 'update')
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
async removeMutedWord(mutedWord: AppBskyActorDefs.MutedWord) {
|
|
577
|
+
await updateMutedWords(this, [mutedWord], 'remove')
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
async hidePost(postUri: string) {
|
|
581
|
+
await updateHiddenPost(this, postUri, 'hide')
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
async unhidePost(postUri: string) {
|
|
585
|
+
await updateHiddenPost(this, postUri, 'unhide')
|
|
586
|
+
}
|
|
551
587
|
}
|
|
552
588
|
|
|
553
589
|
/**
|
|
@@ -609,3 +645,103 @@ async function updateFeedPreferences(
|
|
|
609
645
|
})
|
|
610
646
|
return res
|
|
611
647
|
}
|
|
648
|
+
|
|
649
|
+
/**
|
|
650
|
+
* A helper specifically for updating muted words preferences
|
|
651
|
+
*/
|
|
652
|
+
async function updateMutedWords(
|
|
653
|
+
agent: BskyAgent,
|
|
654
|
+
mutedWords: AppBskyActorDefs.MutedWord[],
|
|
655
|
+
action: 'upsert' | 'update' | 'remove',
|
|
656
|
+
) {
|
|
657
|
+
const sanitizeMutedWord = (word: AppBskyActorDefs.MutedWord) => ({
|
|
658
|
+
value: word.value.replace(/^#/, ''),
|
|
659
|
+
targets: word.targets,
|
|
660
|
+
})
|
|
661
|
+
|
|
662
|
+
await updatePreferences(agent, (prefs: AppBskyActorDefs.Preferences) => {
|
|
663
|
+
let mutedWordsPref = prefs.findLast(
|
|
664
|
+
(pref) =>
|
|
665
|
+
AppBskyActorDefs.isMutedWordsPref(pref) &&
|
|
666
|
+
AppBskyActorDefs.validateMutedWordsPref(pref).success,
|
|
667
|
+
)
|
|
668
|
+
|
|
669
|
+
if (mutedWordsPref && AppBskyActorDefs.isMutedWordsPref(mutedWordsPref)) {
|
|
670
|
+
if (action === 'upsert' || action === 'update') {
|
|
671
|
+
for (const newItem of mutedWords) {
|
|
672
|
+
let foundMatch = false
|
|
673
|
+
|
|
674
|
+
for (const existingItem of mutedWordsPref.items) {
|
|
675
|
+
if (existingItem.value === newItem.value) {
|
|
676
|
+
existingItem.targets =
|
|
677
|
+
action === 'upsert'
|
|
678
|
+
? Array.from(
|
|
679
|
+
new Set([...existingItem.targets, ...newItem.targets]),
|
|
680
|
+
)
|
|
681
|
+
: newItem.targets
|
|
682
|
+
foundMatch = true
|
|
683
|
+
break
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
if (action === 'upsert' && !foundMatch) {
|
|
688
|
+
mutedWordsPref.items.push(sanitizeMutedWord(newItem))
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
} else if (action === 'remove') {
|
|
692
|
+
for (const word of mutedWords) {
|
|
693
|
+
for (let i = 0; i < mutedWordsPref.items.length; i++) {
|
|
694
|
+
const existing = mutedWordsPref.items[i]
|
|
695
|
+
if (existing.value === sanitizeMutedWord(word).value) {
|
|
696
|
+
mutedWordsPref.items.splice(i, 1)
|
|
697
|
+
break
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
} else {
|
|
703
|
+
// if the pref doesn't exist, create it
|
|
704
|
+
if (action === 'upsert') {
|
|
705
|
+
mutedWordsPref = {
|
|
706
|
+
items: mutedWords.map(sanitizeMutedWord),
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
return prefs
|
|
712
|
+
.filter((p) => !AppBskyActorDefs.isMutedWordsPref(p))
|
|
713
|
+
.concat([
|
|
714
|
+
{ ...mutedWordsPref, $type: 'app.bsky.actor.defs#mutedWordsPref' },
|
|
715
|
+
])
|
|
716
|
+
})
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
async function updateHiddenPost(
|
|
720
|
+
agent: BskyAgent,
|
|
721
|
+
postUri: string,
|
|
722
|
+
action: 'hide' | 'unhide',
|
|
723
|
+
) {
|
|
724
|
+
await updatePreferences(agent, (prefs: AppBskyActorDefs.Preferences) => {
|
|
725
|
+
let pref = prefs.findLast(
|
|
726
|
+
(pref) =>
|
|
727
|
+
AppBskyActorDefs.isHiddenPostsPref(pref) &&
|
|
728
|
+
AppBskyActorDefs.validateHiddenPostsPref(pref).success,
|
|
729
|
+
)
|
|
730
|
+
if (pref && AppBskyActorDefs.isHiddenPostsPref(pref)) {
|
|
731
|
+
pref.items =
|
|
732
|
+
action === 'hide'
|
|
733
|
+
? Array.from(new Set([...pref.items, postUri]))
|
|
734
|
+
: pref.items.filter((uri) => uri !== postUri)
|
|
735
|
+
} else {
|
|
736
|
+
if (action === 'hide') {
|
|
737
|
+
pref = {
|
|
738
|
+
$type: 'app.bsky.actor.defs#hiddenPostsPref',
|
|
739
|
+
items: [postUri],
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
return prefs
|
|
744
|
+
.filter((p) => !AppBskyActorDefs.isInterestsPref(p))
|
|
745
|
+
.concat([{ ...pref, $type: 'app.bsky.actor.defs#hiddenPostsPref' }])
|
|
746
|
+
})
|
|
747
|
+
}
|
package/src/client/index.ts
CHANGED
|
@@ -31,7 +31,11 @@ import * as ComAtprotoAdminUpdateAccountEmail from './types/com/atproto/admin/up
|
|
|
31
31
|
import * as ComAtprotoAdminUpdateAccountHandle from './types/com/atproto/admin/updateAccountHandle'
|
|
32
32
|
import * as ComAtprotoAdminUpdateCommunicationTemplate from './types/com/atproto/admin/updateCommunicationTemplate'
|
|
33
33
|
import * as ComAtprotoAdminUpdateSubjectStatus from './types/com/atproto/admin/updateSubjectStatus'
|
|
34
|
+
import * as ComAtprotoIdentityGetRecommendedDidCredentials from './types/com/atproto/identity/getRecommendedDidCredentials'
|
|
35
|
+
import * as ComAtprotoIdentityRequestPlcOperationSignature from './types/com/atproto/identity/requestPlcOperationSignature'
|
|
34
36
|
import * as ComAtprotoIdentityResolveHandle from './types/com/atproto/identity/resolveHandle'
|
|
37
|
+
import * as ComAtprotoIdentitySignPlcOperation from './types/com/atproto/identity/signPlcOperation'
|
|
38
|
+
import * as ComAtprotoIdentitySubmitPlcOperation from './types/com/atproto/identity/submitPlcOperation'
|
|
35
39
|
import * as ComAtprotoIdentityUpdateHandle from './types/com/atproto/identity/updateHandle'
|
|
36
40
|
import * as ComAtprotoLabelDefs from './types/com/atproto/label/defs'
|
|
37
41
|
import * as ComAtprotoLabelQueryLabels from './types/com/atproto/label/queryLabels'
|
|
@@ -43,21 +47,27 @@ import * as ComAtprotoRepoCreateRecord from './types/com/atproto/repo/createReco
|
|
|
43
47
|
import * as ComAtprotoRepoDeleteRecord from './types/com/atproto/repo/deleteRecord'
|
|
44
48
|
import * as ComAtprotoRepoDescribeRepo from './types/com/atproto/repo/describeRepo'
|
|
45
49
|
import * as ComAtprotoRepoGetRecord from './types/com/atproto/repo/getRecord'
|
|
50
|
+
import * as ComAtprotoRepoImportRepo from './types/com/atproto/repo/importRepo'
|
|
51
|
+
import * as ComAtprotoRepoListMissingBlobs from './types/com/atproto/repo/listMissingBlobs'
|
|
46
52
|
import * as ComAtprotoRepoListRecords from './types/com/atproto/repo/listRecords'
|
|
47
53
|
import * as ComAtprotoRepoPutRecord from './types/com/atproto/repo/putRecord'
|
|
48
54
|
import * as ComAtprotoRepoStrongRef from './types/com/atproto/repo/strongRef'
|
|
49
55
|
import * as ComAtprotoRepoUploadBlob from './types/com/atproto/repo/uploadBlob'
|
|
56
|
+
import * as ComAtprotoServerActivateAccount from './types/com/atproto/server/activateAccount'
|
|
57
|
+
import * as ComAtprotoServerCheckAccountStatus from './types/com/atproto/server/checkAccountStatus'
|
|
50
58
|
import * as ComAtprotoServerConfirmEmail from './types/com/atproto/server/confirmEmail'
|
|
51
59
|
import * as ComAtprotoServerCreateAccount from './types/com/atproto/server/createAccount'
|
|
52
60
|
import * as ComAtprotoServerCreateAppPassword from './types/com/atproto/server/createAppPassword'
|
|
53
61
|
import * as ComAtprotoServerCreateInviteCode from './types/com/atproto/server/createInviteCode'
|
|
54
62
|
import * as ComAtprotoServerCreateInviteCodes from './types/com/atproto/server/createInviteCodes'
|
|
55
63
|
import * as ComAtprotoServerCreateSession from './types/com/atproto/server/createSession'
|
|
64
|
+
import * as ComAtprotoServerDeactivateAccount from './types/com/atproto/server/deactivateAccount'
|
|
56
65
|
import * as ComAtprotoServerDefs from './types/com/atproto/server/defs'
|
|
57
66
|
import * as ComAtprotoServerDeleteAccount from './types/com/atproto/server/deleteAccount'
|
|
58
67
|
import * as ComAtprotoServerDeleteSession from './types/com/atproto/server/deleteSession'
|
|
59
68
|
import * as ComAtprotoServerDescribeServer from './types/com/atproto/server/describeServer'
|
|
60
69
|
import * as ComAtprotoServerGetAccountInviteCodes from './types/com/atproto/server/getAccountInviteCodes'
|
|
70
|
+
import * as ComAtprotoServerGetServiceAuth from './types/com/atproto/server/getServiceAuth'
|
|
61
71
|
import * as ComAtprotoServerGetSession from './types/com/atproto/server/getSession'
|
|
62
72
|
import * as ComAtprotoServerListAppPasswords from './types/com/atproto/server/listAppPasswords'
|
|
63
73
|
import * as ComAtprotoServerRefreshSession from './types/com/atproto/server/refreshSession'
|
|
@@ -83,10 +93,7 @@ import * as ComAtprotoSyncRequestCrawl from './types/com/atproto/sync/requestCra
|
|
|
83
93
|
import * as ComAtprotoSyncSubscribeRepos from './types/com/atproto/sync/subscribeRepos'
|
|
84
94
|
import * as ComAtprotoTempCheckSignupQueue from './types/com/atproto/temp/checkSignupQueue'
|
|
85
95
|
import * as ComAtprotoTempFetchLabels from './types/com/atproto/temp/fetchLabels'
|
|
86
|
-
import * as ComAtprotoTempImportRepo from './types/com/atproto/temp/importRepo'
|
|
87
|
-
import * as ComAtprotoTempPushBlob from './types/com/atproto/temp/pushBlob'
|
|
88
96
|
import * as ComAtprotoTempRequestPhoneVerification from './types/com/atproto/temp/requestPhoneVerification'
|
|
89
|
-
import * as ComAtprotoTempTransferAccount from './types/com/atproto/temp/transferAccount'
|
|
90
97
|
import * as AppBskyActorDefs from './types/app/bsky/actor/defs'
|
|
91
98
|
import * as AppBskyActorGetPreferences from './types/app/bsky/actor/getPreferences'
|
|
92
99
|
import * as AppBskyActorGetProfile from './types/app/bsky/actor/getProfile'
|
|
@@ -177,7 +184,11 @@ export * as ComAtprotoAdminUpdateAccountEmail from './types/com/atproto/admin/up
|
|
|
177
184
|
export * as ComAtprotoAdminUpdateAccountHandle from './types/com/atproto/admin/updateAccountHandle'
|
|
178
185
|
export * as ComAtprotoAdminUpdateCommunicationTemplate from './types/com/atproto/admin/updateCommunicationTemplate'
|
|
179
186
|
export * as ComAtprotoAdminUpdateSubjectStatus from './types/com/atproto/admin/updateSubjectStatus'
|
|
187
|
+
export * as ComAtprotoIdentityGetRecommendedDidCredentials from './types/com/atproto/identity/getRecommendedDidCredentials'
|
|
188
|
+
export * as ComAtprotoIdentityRequestPlcOperationSignature from './types/com/atproto/identity/requestPlcOperationSignature'
|
|
180
189
|
export * as ComAtprotoIdentityResolveHandle from './types/com/atproto/identity/resolveHandle'
|
|
190
|
+
export * as ComAtprotoIdentitySignPlcOperation from './types/com/atproto/identity/signPlcOperation'
|
|
191
|
+
export * as ComAtprotoIdentitySubmitPlcOperation from './types/com/atproto/identity/submitPlcOperation'
|
|
181
192
|
export * as ComAtprotoIdentityUpdateHandle from './types/com/atproto/identity/updateHandle'
|
|
182
193
|
export * as ComAtprotoLabelDefs from './types/com/atproto/label/defs'
|
|
183
194
|
export * as ComAtprotoLabelQueryLabels from './types/com/atproto/label/queryLabels'
|
|
@@ -189,21 +200,27 @@ export * as ComAtprotoRepoCreateRecord from './types/com/atproto/repo/createReco
|
|
|
189
200
|
export * as ComAtprotoRepoDeleteRecord from './types/com/atproto/repo/deleteRecord'
|
|
190
201
|
export * as ComAtprotoRepoDescribeRepo from './types/com/atproto/repo/describeRepo'
|
|
191
202
|
export * as ComAtprotoRepoGetRecord from './types/com/atproto/repo/getRecord'
|
|
203
|
+
export * as ComAtprotoRepoImportRepo from './types/com/atproto/repo/importRepo'
|
|
204
|
+
export * as ComAtprotoRepoListMissingBlobs from './types/com/atproto/repo/listMissingBlobs'
|
|
192
205
|
export * as ComAtprotoRepoListRecords from './types/com/atproto/repo/listRecords'
|
|
193
206
|
export * as ComAtprotoRepoPutRecord from './types/com/atproto/repo/putRecord'
|
|
194
207
|
export * as ComAtprotoRepoStrongRef from './types/com/atproto/repo/strongRef'
|
|
195
208
|
export * as ComAtprotoRepoUploadBlob from './types/com/atproto/repo/uploadBlob'
|
|
209
|
+
export * as ComAtprotoServerActivateAccount from './types/com/atproto/server/activateAccount'
|
|
210
|
+
export * as ComAtprotoServerCheckAccountStatus from './types/com/atproto/server/checkAccountStatus'
|
|
196
211
|
export * as ComAtprotoServerConfirmEmail from './types/com/atproto/server/confirmEmail'
|
|
197
212
|
export * as ComAtprotoServerCreateAccount from './types/com/atproto/server/createAccount'
|
|
198
213
|
export * as ComAtprotoServerCreateAppPassword from './types/com/atproto/server/createAppPassword'
|
|
199
214
|
export * as ComAtprotoServerCreateInviteCode from './types/com/atproto/server/createInviteCode'
|
|
200
215
|
export * as ComAtprotoServerCreateInviteCodes from './types/com/atproto/server/createInviteCodes'
|
|
201
216
|
export * as ComAtprotoServerCreateSession from './types/com/atproto/server/createSession'
|
|
217
|
+
export * as ComAtprotoServerDeactivateAccount from './types/com/atproto/server/deactivateAccount'
|
|
202
218
|
export * as ComAtprotoServerDefs from './types/com/atproto/server/defs'
|
|
203
219
|
export * as ComAtprotoServerDeleteAccount from './types/com/atproto/server/deleteAccount'
|
|
204
220
|
export * as ComAtprotoServerDeleteSession from './types/com/atproto/server/deleteSession'
|
|
205
221
|
export * as ComAtprotoServerDescribeServer from './types/com/atproto/server/describeServer'
|
|
206
222
|
export * as ComAtprotoServerGetAccountInviteCodes from './types/com/atproto/server/getAccountInviteCodes'
|
|
223
|
+
export * as ComAtprotoServerGetServiceAuth from './types/com/atproto/server/getServiceAuth'
|
|
207
224
|
export * as ComAtprotoServerGetSession from './types/com/atproto/server/getSession'
|
|
208
225
|
export * as ComAtprotoServerListAppPasswords from './types/com/atproto/server/listAppPasswords'
|
|
209
226
|
export * as ComAtprotoServerRefreshSession from './types/com/atproto/server/refreshSession'
|
|
@@ -229,10 +246,7 @@ export * as ComAtprotoSyncRequestCrawl from './types/com/atproto/sync/requestCra
|
|
|
229
246
|
export * as ComAtprotoSyncSubscribeRepos from './types/com/atproto/sync/subscribeRepos'
|
|
230
247
|
export * as ComAtprotoTempCheckSignupQueue from './types/com/atproto/temp/checkSignupQueue'
|
|
231
248
|
export * as ComAtprotoTempFetchLabels from './types/com/atproto/temp/fetchLabels'
|
|
232
|
-
export * as ComAtprotoTempImportRepo from './types/com/atproto/temp/importRepo'
|
|
233
|
-
export * as ComAtprotoTempPushBlob from './types/com/atproto/temp/pushBlob'
|
|
234
249
|
export * as ComAtprotoTempRequestPhoneVerification from './types/com/atproto/temp/requestPhoneVerification'
|
|
235
|
-
export * as ComAtprotoTempTransferAccount from './types/com/atproto/temp/transferAccount'
|
|
236
250
|
export * as AppBskyActorDefs from './types/app/bsky/actor/defs'
|
|
237
251
|
export * as AppBskyActorGetPreferences from './types/app/bsky/actor/getPreferences'
|
|
238
252
|
export * as AppBskyActorGetProfile from './types/app/bsky/actor/getProfile'
|
|
@@ -675,6 +689,38 @@ export class ComAtprotoIdentityNS {
|
|
|
675
689
|
this._service = service
|
|
676
690
|
}
|
|
677
691
|
|
|
692
|
+
getRecommendedDidCredentials(
|
|
693
|
+
params?: ComAtprotoIdentityGetRecommendedDidCredentials.QueryParams,
|
|
694
|
+
opts?: ComAtprotoIdentityGetRecommendedDidCredentials.CallOptions,
|
|
695
|
+
): Promise<ComAtprotoIdentityGetRecommendedDidCredentials.Response> {
|
|
696
|
+
return this._service.xrpc
|
|
697
|
+
.call(
|
|
698
|
+
'com.atproto.identity.getRecommendedDidCredentials',
|
|
699
|
+
params,
|
|
700
|
+
undefined,
|
|
701
|
+
opts,
|
|
702
|
+
)
|
|
703
|
+
.catch((e) => {
|
|
704
|
+
throw ComAtprotoIdentityGetRecommendedDidCredentials.toKnownErr(e)
|
|
705
|
+
})
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
requestPlcOperationSignature(
|
|
709
|
+
data?: ComAtprotoIdentityRequestPlcOperationSignature.InputSchema,
|
|
710
|
+
opts?: ComAtprotoIdentityRequestPlcOperationSignature.CallOptions,
|
|
711
|
+
): Promise<ComAtprotoIdentityRequestPlcOperationSignature.Response> {
|
|
712
|
+
return this._service.xrpc
|
|
713
|
+
.call(
|
|
714
|
+
'com.atproto.identity.requestPlcOperationSignature',
|
|
715
|
+
opts?.qp,
|
|
716
|
+
data,
|
|
717
|
+
opts,
|
|
718
|
+
)
|
|
719
|
+
.catch((e) => {
|
|
720
|
+
throw ComAtprotoIdentityRequestPlcOperationSignature.toKnownErr(e)
|
|
721
|
+
})
|
|
722
|
+
}
|
|
723
|
+
|
|
678
724
|
resolveHandle(
|
|
679
725
|
params?: ComAtprotoIdentityResolveHandle.QueryParams,
|
|
680
726
|
opts?: ComAtprotoIdentityResolveHandle.CallOptions,
|
|
@@ -686,6 +732,28 @@ export class ComAtprotoIdentityNS {
|
|
|
686
732
|
})
|
|
687
733
|
}
|
|
688
734
|
|
|
735
|
+
signPlcOperation(
|
|
736
|
+
data?: ComAtprotoIdentitySignPlcOperation.InputSchema,
|
|
737
|
+
opts?: ComAtprotoIdentitySignPlcOperation.CallOptions,
|
|
738
|
+
): Promise<ComAtprotoIdentitySignPlcOperation.Response> {
|
|
739
|
+
return this._service.xrpc
|
|
740
|
+
.call('com.atproto.identity.signPlcOperation', opts?.qp, data, opts)
|
|
741
|
+
.catch((e) => {
|
|
742
|
+
throw ComAtprotoIdentitySignPlcOperation.toKnownErr(e)
|
|
743
|
+
})
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
submitPlcOperation(
|
|
747
|
+
data?: ComAtprotoIdentitySubmitPlcOperation.InputSchema,
|
|
748
|
+
opts?: ComAtprotoIdentitySubmitPlcOperation.CallOptions,
|
|
749
|
+
): Promise<ComAtprotoIdentitySubmitPlcOperation.Response> {
|
|
750
|
+
return this._service.xrpc
|
|
751
|
+
.call('com.atproto.identity.submitPlcOperation', opts?.qp, data, opts)
|
|
752
|
+
.catch((e) => {
|
|
753
|
+
throw ComAtprotoIdentitySubmitPlcOperation.toKnownErr(e)
|
|
754
|
+
})
|
|
755
|
+
}
|
|
756
|
+
|
|
689
757
|
updateHandle(
|
|
690
758
|
data?: ComAtprotoIdentityUpdateHandle.InputSchema,
|
|
691
759
|
opts?: ComAtprotoIdentityUpdateHandle.CallOptions,
|
|
@@ -798,6 +866,28 @@ export class ComAtprotoRepoNS {
|
|
|
798
866
|
})
|
|
799
867
|
}
|
|
800
868
|
|
|
869
|
+
importRepo(
|
|
870
|
+
data?: ComAtprotoRepoImportRepo.InputSchema,
|
|
871
|
+
opts?: ComAtprotoRepoImportRepo.CallOptions,
|
|
872
|
+
): Promise<ComAtprotoRepoImportRepo.Response> {
|
|
873
|
+
return this._service.xrpc
|
|
874
|
+
.call('com.atproto.repo.importRepo', opts?.qp, data, opts)
|
|
875
|
+
.catch((e) => {
|
|
876
|
+
throw ComAtprotoRepoImportRepo.toKnownErr(e)
|
|
877
|
+
})
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
listMissingBlobs(
|
|
881
|
+
params?: ComAtprotoRepoListMissingBlobs.QueryParams,
|
|
882
|
+
opts?: ComAtprotoRepoListMissingBlobs.CallOptions,
|
|
883
|
+
): Promise<ComAtprotoRepoListMissingBlobs.Response> {
|
|
884
|
+
return this._service.xrpc
|
|
885
|
+
.call('com.atproto.repo.listMissingBlobs', params, undefined, opts)
|
|
886
|
+
.catch((e) => {
|
|
887
|
+
throw ComAtprotoRepoListMissingBlobs.toKnownErr(e)
|
|
888
|
+
})
|
|
889
|
+
}
|
|
890
|
+
|
|
801
891
|
listRecords(
|
|
802
892
|
params?: ComAtprotoRepoListRecords.QueryParams,
|
|
803
893
|
opts?: ComAtprotoRepoListRecords.CallOptions,
|
|
@@ -839,6 +929,28 @@ export class ComAtprotoServerNS {
|
|
|
839
929
|
this._service = service
|
|
840
930
|
}
|
|
841
931
|
|
|
932
|
+
activateAccount(
|
|
933
|
+
data?: ComAtprotoServerActivateAccount.InputSchema,
|
|
934
|
+
opts?: ComAtprotoServerActivateAccount.CallOptions,
|
|
935
|
+
): Promise<ComAtprotoServerActivateAccount.Response> {
|
|
936
|
+
return this._service.xrpc
|
|
937
|
+
.call('com.atproto.server.activateAccount', opts?.qp, data, opts)
|
|
938
|
+
.catch((e) => {
|
|
939
|
+
throw ComAtprotoServerActivateAccount.toKnownErr(e)
|
|
940
|
+
})
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
checkAccountStatus(
|
|
944
|
+
params?: ComAtprotoServerCheckAccountStatus.QueryParams,
|
|
945
|
+
opts?: ComAtprotoServerCheckAccountStatus.CallOptions,
|
|
946
|
+
): Promise<ComAtprotoServerCheckAccountStatus.Response> {
|
|
947
|
+
return this._service.xrpc
|
|
948
|
+
.call('com.atproto.server.checkAccountStatus', params, undefined, opts)
|
|
949
|
+
.catch((e) => {
|
|
950
|
+
throw ComAtprotoServerCheckAccountStatus.toKnownErr(e)
|
|
951
|
+
})
|
|
952
|
+
}
|
|
953
|
+
|
|
842
954
|
confirmEmail(
|
|
843
955
|
data?: ComAtprotoServerConfirmEmail.InputSchema,
|
|
844
956
|
opts?: ComAtprotoServerConfirmEmail.CallOptions,
|
|
@@ -905,6 +1017,17 @@ export class ComAtprotoServerNS {
|
|
|
905
1017
|
})
|
|
906
1018
|
}
|
|
907
1019
|
|
|
1020
|
+
deactivateAccount(
|
|
1021
|
+
data?: ComAtprotoServerDeactivateAccount.InputSchema,
|
|
1022
|
+
opts?: ComAtprotoServerDeactivateAccount.CallOptions,
|
|
1023
|
+
): Promise<ComAtprotoServerDeactivateAccount.Response> {
|
|
1024
|
+
return this._service.xrpc
|
|
1025
|
+
.call('com.atproto.server.deactivateAccount', opts?.qp, data, opts)
|
|
1026
|
+
.catch((e) => {
|
|
1027
|
+
throw ComAtprotoServerDeactivateAccount.toKnownErr(e)
|
|
1028
|
+
})
|
|
1029
|
+
}
|
|
1030
|
+
|
|
908
1031
|
deleteAccount(
|
|
909
1032
|
data?: ComAtprotoServerDeleteAccount.InputSchema,
|
|
910
1033
|
opts?: ComAtprotoServerDeleteAccount.CallOptions,
|
|
@@ -949,6 +1072,17 @@ export class ComAtprotoServerNS {
|
|
|
949
1072
|
})
|
|
950
1073
|
}
|
|
951
1074
|
|
|
1075
|
+
getServiceAuth(
|
|
1076
|
+
params?: ComAtprotoServerGetServiceAuth.QueryParams,
|
|
1077
|
+
opts?: ComAtprotoServerGetServiceAuth.CallOptions,
|
|
1078
|
+
): Promise<ComAtprotoServerGetServiceAuth.Response> {
|
|
1079
|
+
return this._service.xrpc
|
|
1080
|
+
.call('com.atproto.server.getServiceAuth', params, undefined, opts)
|
|
1081
|
+
.catch((e) => {
|
|
1082
|
+
throw ComAtprotoServerGetServiceAuth.toKnownErr(e)
|
|
1083
|
+
})
|
|
1084
|
+
}
|
|
1085
|
+
|
|
952
1086
|
getSession(
|
|
953
1087
|
params?: ComAtprotoServerGetSession.QueryParams,
|
|
954
1088
|
opts?: ComAtprotoServerGetSession.CallOptions,
|
|
@@ -1229,28 +1363,6 @@ export class ComAtprotoTempNS {
|
|
|
1229
1363
|
})
|
|
1230
1364
|
}
|
|
1231
1365
|
|
|
1232
|
-
importRepo(
|
|
1233
|
-
data?: ComAtprotoTempImportRepo.InputSchema,
|
|
1234
|
-
opts?: ComAtprotoTempImportRepo.CallOptions,
|
|
1235
|
-
): Promise<ComAtprotoTempImportRepo.Response> {
|
|
1236
|
-
return this._service.xrpc
|
|
1237
|
-
.call('com.atproto.temp.importRepo', opts?.qp, data, opts)
|
|
1238
|
-
.catch((e) => {
|
|
1239
|
-
throw ComAtprotoTempImportRepo.toKnownErr(e)
|
|
1240
|
-
})
|
|
1241
|
-
}
|
|
1242
|
-
|
|
1243
|
-
pushBlob(
|
|
1244
|
-
data?: ComAtprotoTempPushBlob.InputSchema,
|
|
1245
|
-
opts?: ComAtprotoTempPushBlob.CallOptions,
|
|
1246
|
-
): Promise<ComAtprotoTempPushBlob.Response> {
|
|
1247
|
-
return this._service.xrpc
|
|
1248
|
-
.call('com.atproto.temp.pushBlob', opts?.qp, data, opts)
|
|
1249
|
-
.catch((e) => {
|
|
1250
|
-
throw ComAtprotoTempPushBlob.toKnownErr(e)
|
|
1251
|
-
})
|
|
1252
|
-
}
|
|
1253
|
-
|
|
1254
1366
|
requestPhoneVerification(
|
|
1255
1367
|
data?: ComAtprotoTempRequestPhoneVerification.InputSchema,
|
|
1256
1368
|
opts?: ComAtprotoTempRequestPhoneVerification.CallOptions,
|
|
@@ -1261,17 +1373,6 @@ export class ComAtprotoTempNS {
|
|
|
1261
1373
|
throw ComAtprotoTempRequestPhoneVerification.toKnownErr(e)
|
|
1262
1374
|
})
|
|
1263
1375
|
}
|
|
1264
|
-
|
|
1265
|
-
transferAccount(
|
|
1266
|
-
data?: ComAtprotoTempTransferAccount.InputSchema,
|
|
1267
|
-
opts?: ComAtprotoTempTransferAccount.CallOptions,
|
|
1268
|
-
): Promise<ComAtprotoTempTransferAccount.Response> {
|
|
1269
|
-
return this._service.xrpc
|
|
1270
|
-
.call('com.atproto.temp.transferAccount', opts?.qp, data, opts)
|
|
1271
|
-
.catch((e) => {
|
|
1272
|
-
throw ComAtprotoTempTransferAccount.toKnownErr(e)
|
|
1273
|
-
})
|
|
1274
|
-
}
|
|
1275
1376
|
}
|
|
1276
1377
|
|
|
1277
1378
|
export class AppNS {
|