@atproto/api 0.9.8 → 0.10.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/CHANGELOG.md +16 -0
- package/dist/bsky-agent.d.ts +6 -1
- package/dist/client/index.d.ts +33 -9
- package/dist/client/lexicons.d.ts +419 -110
- package/dist/client/types/app/bsky/actor/defs.d.ts +21 -1
- package/dist/client/types/com/atproto/admin/updateAccountPassword.d.ts +18 -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 +1028 -530
- 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 +153 -39
- package/src/client/lexicons.ts +460 -138
- package/src/client/types/app/bsky/actor/defs.ts +61 -0
- package/src/client/types/app/bsky/feed/post.ts +1 -1
- package/src/client/types/com/atproto/{temp/pushBlob.ts → admin/updateAccountPassword.ts} +6 -5
- 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/identity/submitPlcOperation.ts +32 -0
- 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.1",
|
|
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.33"
|
|
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
|
@@ -29,9 +29,14 @@ import * as ComAtprotoAdminSearchRepos from './types/com/atproto/admin/searchRep
|
|
|
29
29
|
import * as ComAtprotoAdminSendEmail from './types/com/atproto/admin/sendEmail'
|
|
30
30
|
import * as ComAtprotoAdminUpdateAccountEmail from './types/com/atproto/admin/updateAccountEmail'
|
|
31
31
|
import * as ComAtprotoAdminUpdateAccountHandle from './types/com/atproto/admin/updateAccountHandle'
|
|
32
|
+
import * as ComAtprotoAdminUpdateAccountPassword from './types/com/atproto/admin/updateAccountPassword'
|
|
32
33
|
import * as ComAtprotoAdminUpdateCommunicationTemplate from './types/com/atproto/admin/updateCommunicationTemplate'
|
|
33
34
|
import * as ComAtprotoAdminUpdateSubjectStatus from './types/com/atproto/admin/updateSubjectStatus'
|
|
35
|
+
import * as ComAtprotoIdentityGetRecommendedDidCredentials from './types/com/atproto/identity/getRecommendedDidCredentials'
|
|
36
|
+
import * as ComAtprotoIdentityRequestPlcOperationSignature from './types/com/atproto/identity/requestPlcOperationSignature'
|
|
34
37
|
import * as ComAtprotoIdentityResolveHandle from './types/com/atproto/identity/resolveHandle'
|
|
38
|
+
import * as ComAtprotoIdentitySignPlcOperation from './types/com/atproto/identity/signPlcOperation'
|
|
39
|
+
import * as ComAtprotoIdentitySubmitPlcOperation from './types/com/atproto/identity/submitPlcOperation'
|
|
35
40
|
import * as ComAtprotoIdentityUpdateHandle from './types/com/atproto/identity/updateHandle'
|
|
36
41
|
import * as ComAtprotoLabelDefs from './types/com/atproto/label/defs'
|
|
37
42
|
import * as ComAtprotoLabelQueryLabels from './types/com/atproto/label/queryLabels'
|
|
@@ -43,21 +48,27 @@ import * as ComAtprotoRepoCreateRecord from './types/com/atproto/repo/createReco
|
|
|
43
48
|
import * as ComAtprotoRepoDeleteRecord from './types/com/atproto/repo/deleteRecord'
|
|
44
49
|
import * as ComAtprotoRepoDescribeRepo from './types/com/atproto/repo/describeRepo'
|
|
45
50
|
import * as ComAtprotoRepoGetRecord from './types/com/atproto/repo/getRecord'
|
|
51
|
+
import * as ComAtprotoRepoImportRepo from './types/com/atproto/repo/importRepo'
|
|
52
|
+
import * as ComAtprotoRepoListMissingBlobs from './types/com/atproto/repo/listMissingBlobs'
|
|
46
53
|
import * as ComAtprotoRepoListRecords from './types/com/atproto/repo/listRecords'
|
|
47
54
|
import * as ComAtprotoRepoPutRecord from './types/com/atproto/repo/putRecord'
|
|
48
55
|
import * as ComAtprotoRepoStrongRef from './types/com/atproto/repo/strongRef'
|
|
49
56
|
import * as ComAtprotoRepoUploadBlob from './types/com/atproto/repo/uploadBlob'
|
|
57
|
+
import * as ComAtprotoServerActivateAccount from './types/com/atproto/server/activateAccount'
|
|
58
|
+
import * as ComAtprotoServerCheckAccountStatus from './types/com/atproto/server/checkAccountStatus'
|
|
50
59
|
import * as ComAtprotoServerConfirmEmail from './types/com/atproto/server/confirmEmail'
|
|
51
60
|
import * as ComAtprotoServerCreateAccount from './types/com/atproto/server/createAccount'
|
|
52
61
|
import * as ComAtprotoServerCreateAppPassword from './types/com/atproto/server/createAppPassword'
|
|
53
62
|
import * as ComAtprotoServerCreateInviteCode from './types/com/atproto/server/createInviteCode'
|
|
54
63
|
import * as ComAtprotoServerCreateInviteCodes from './types/com/atproto/server/createInviteCodes'
|
|
55
64
|
import * as ComAtprotoServerCreateSession from './types/com/atproto/server/createSession'
|
|
65
|
+
import * as ComAtprotoServerDeactivateAccount from './types/com/atproto/server/deactivateAccount'
|
|
56
66
|
import * as ComAtprotoServerDefs from './types/com/atproto/server/defs'
|
|
57
67
|
import * as ComAtprotoServerDeleteAccount from './types/com/atproto/server/deleteAccount'
|
|
58
68
|
import * as ComAtprotoServerDeleteSession from './types/com/atproto/server/deleteSession'
|
|
59
69
|
import * as ComAtprotoServerDescribeServer from './types/com/atproto/server/describeServer'
|
|
60
70
|
import * as ComAtprotoServerGetAccountInviteCodes from './types/com/atproto/server/getAccountInviteCodes'
|
|
71
|
+
import * as ComAtprotoServerGetServiceAuth from './types/com/atproto/server/getServiceAuth'
|
|
61
72
|
import * as ComAtprotoServerGetSession from './types/com/atproto/server/getSession'
|
|
62
73
|
import * as ComAtprotoServerListAppPasswords from './types/com/atproto/server/listAppPasswords'
|
|
63
74
|
import * as ComAtprotoServerRefreshSession from './types/com/atproto/server/refreshSession'
|
|
@@ -83,10 +94,7 @@ import * as ComAtprotoSyncRequestCrawl from './types/com/atproto/sync/requestCra
|
|
|
83
94
|
import * as ComAtprotoSyncSubscribeRepos from './types/com/atproto/sync/subscribeRepos'
|
|
84
95
|
import * as ComAtprotoTempCheckSignupQueue from './types/com/atproto/temp/checkSignupQueue'
|
|
85
96
|
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
97
|
import * as ComAtprotoTempRequestPhoneVerification from './types/com/atproto/temp/requestPhoneVerification'
|
|
89
|
-
import * as ComAtprotoTempTransferAccount from './types/com/atproto/temp/transferAccount'
|
|
90
98
|
import * as AppBskyActorDefs from './types/app/bsky/actor/defs'
|
|
91
99
|
import * as AppBskyActorGetPreferences from './types/app/bsky/actor/getPreferences'
|
|
92
100
|
import * as AppBskyActorGetProfile from './types/app/bsky/actor/getProfile'
|
|
@@ -175,9 +183,14 @@ export * as ComAtprotoAdminSearchRepos from './types/com/atproto/admin/searchRep
|
|
|
175
183
|
export * as ComAtprotoAdminSendEmail from './types/com/atproto/admin/sendEmail'
|
|
176
184
|
export * as ComAtprotoAdminUpdateAccountEmail from './types/com/atproto/admin/updateAccountEmail'
|
|
177
185
|
export * as ComAtprotoAdminUpdateAccountHandle from './types/com/atproto/admin/updateAccountHandle'
|
|
186
|
+
export * as ComAtprotoAdminUpdateAccountPassword from './types/com/atproto/admin/updateAccountPassword'
|
|
178
187
|
export * as ComAtprotoAdminUpdateCommunicationTemplate from './types/com/atproto/admin/updateCommunicationTemplate'
|
|
179
188
|
export * as ComAtprotoAdminUpdateSubjectStatus from './types/com/atproto/admin/updateSubjectStatus'
|
|
189
|
+
export * as ComAtprotoIdentityGetRecommendedDidCredentials from './types/com/atproto/identity/getRecommendedDidCredentials'
|
|
190
|
+
export * as ComAtprotoIdentityRequestPlcOperationSignature from './types/com/atproto/identity/requestPlcOperationSignature'
|
|
180
191
|
export * as ComAtprotoIdentityResolveHandle from './types/com/atproto/identity/resolveHandle'
|
|
192
|
+
export * as ComAtprotoIdentitySignPlcOperation from './types/com/atproto/identity/signPlcOperation'
|
|
193
|
+
export * as ComAtprotoIdentitySubmitPlcOperation from './types/com/atproto/identity/submitPlcOperation'
|
|
181
194
|
export * as ComAtprotoIdentityUpdateHandle from './types/com/atproto/identity/updateHandle'
|
|
182
195
|
export * as ComAtprotoLabelDefs from './types/com/atproto/label/defs'
|
|
183
196
|
export * as ComAtprotoLabelQueryLabels from './types/com/atproto/label/queryLabels'
|
|
@@ -189,21 +202,27 @@ export * as ComAtprotoRepoCreateRecord from './types/com/atproto/repo/createReco
|
|
|
189
202
|
export * as ComAtprotoRepoDeleteRecord from './types/com/atproto/repo/deleteRecord'
|
|
190
203
|
export * as ComAtprotoRepoDescribeRepo from './types/com/atproto/repo/describeRepo'
|
|
191
204
|
export * as ComAtprotoRepoGetRecord from './types/com/atproto/repo/getRecord'
|
|
205
|
+
export * as ComAtprotoRepoImportRepo from './types/com/atproto/repo/importRepo'
|
|
206
|
+
export * as ComAtprotoRepoListMissingBlobs from './types/com/atproto/repo/listMissingBlobs'
|
|
192
207
|
export * as ComAtprotoRepoListRecords from './types/com/atproto/repo/listRecords'
|
|
193
208
|
export * as ComAtprotoRepoPutRecord from './types/com/atproto/repo/putRecord'
|
|
194
209
|
export * as ComAtprotoRepoStrongRef from './types/com/atproto/repo/strongRef'
|
|
195
210
|
export * as ComAtprotoRepoUploadBlob from './types/com/atproto/repo/uploadBlob'
|
|
211
|
+
export * as ComAtprotoServerActivateAccount from './types/com/atproto/server/activateAccount'
|
|
212
|
+
export * as ComAtprotoServerCheckAccountStatus from './types/com/atproto/server/checkAccountStatus'
|
|
196
213
|
export * as ComAtprotoServerConfirmEmail from './types/com/atproto/server/confirmEmail'
|
|
197
214
|
export * as ComAtprotoServerCreateAccount from './types/com/atproto/server/createAccount'
|
|
198
215
|
export * as ComAtprotoServerCreateAppPassword from './types/com/atproto/server/createAppPassword'
|
|
199
216
|
export * as ComAtprotoServerCreateInviteCode from './types/com/atproto/server/createInviteCode'
|
|
200
217
|
export * as ComAtprotoServerCreateInviteCodes from './types/com/atproto/server/createInviteCodes'
|
|
201
218
|
export * as ComAtprotoServerCreateSession from './types/com/atproto/server/createSession'
|
|
219
|
+
export * as ComAtprotoServerDeactivateAccount from './types/com/atproto/server/deactivateAccount'
|
|
202
220
|
export * as ComAtprotoServerDefs from './types/com/atproto/server/defs'
|
|
203
221
|
export * as ComAtprotoServerDeleteAccount from './types/com/atproto/server/deleteAccount'
|
|
204
222
|
export * as ComAtprotoServerDeleteSession from './types/com/atproto/server/deleteSession'
|
|
205
223
|
export * as ComAtprotoServerDescribeServer from './types/com/atproto/server/describeServer'
|
|
206
224
|
export * as ComAtprotoServerGetAccountInviteCodes from './types/com/atproto/server/getAccountInviteCodes'
|
|
225
|
+
export * as ComAtprotoServerGetServiceAuth from './types/com/atproto/server/getServiceAuth'
|
|
207
226
|
export * as ComAtprotoServerGetSession from './types/com/atproto/server/getSession'
|
|
208
227
|
export * as ComAtprotoServerListAppPasswords from './types/com/atproto/server/listAppPasswords'
|
|
209
228
|
export * as ComAtprotoServerRefreshSession from './types/com/atproto/server/refreshSession'
|
|
@@ -229,10 +248,7 @@ export * as ComAtprotoSyncRequestCrawl from './types/com/atproto/sync/requestCra
|
|
|
229
248
|
export * as ComAtprotoSyncSubscribeRepos from './types/com/atproto/sync/subscribeRepos'
|
|
230
249
|
export * as ComAtprotoTempCheckSignupQueue from './types/com/atproto/temp/checkSignupQueue'
|
|
231
250
|
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
251
|
export * as ComAtprotoTempRequestPhoneVerification from './types/com/atproto/temp/requestPhoneVerification'
|
|
235
|
-
export * as ComAtprotoTempTransferAccount from './types/com/atproto/temp/transferAccount'
|
|
236
252
|
export * as AppBskyActorDefs from './types/app/bsky/actor/defs'
|
|
237
253
|
export * as AppBskyActorGetPreferences from './types/app/bsky/actor/getPreferences'
|
|
238
254
|
export * as AppBskyActorGetProfile from './types/app/bsky/actor/getProfile'
|
|
@@ -640,6 +656,17 @@ export class ComAtprotoAdminNS {
|
|
|
640
656
|
})
|
|
641
657
|
}
|
|
642
658
|
|
|
659
|
+
updateAccountPassword(
|
|
660
|
+
data?: ComAtprotoAdminUpdateAccountPassword.InputSchema,
|
|
661
|
+
opts?: ComAtprotoAdminUpdateAccountPassword.CallOptions,
|
|
662
|
+
): Promise<ComAtprotoAdminUpdateAccountPassword.Response> {
|
|
663
|
+
return this._service.xrpc
|
|
664
|
+
.call('com.atproto.admin.updateAccountPassword', opts?.qp, data, opts)
|
|
665
|
+
.catch((e) => {
|
|
666
|
+
throw ComAtprotoAdminUpdateAccountPassword.toKnownErr(e)
|
|
667
|
+
})
|
|
668
|
+
}
|
|
669
|
+
|
|
643
670
|
updateCommunicationTemplate(
|
|
644
671
|
data?: ComAtprotoAdminUpdateCommunicationTemplate.InputSchema,
|
|
645
672
|
opts?: ComAtprotoAdminUpdateCommunicationTemplate.CallOptions,
|
|
@@ -675,6 +702,38 @@ export class ComAtprotoIdentityNS {
|
|
|
675
702
|
this._service = service
|
|
676
703
|
}
|
|
677
704
|
|
|
705
|
+
getRecommendedDidCredentials(
|
|
706
|
+
params?: ComAtprotoIdentityGetRecommendedDidCredentials.QueryParams,
|
|
707
|
+
opts?: ComAtprotoIdentityGetRecommendedDidCredentials.CallOptions,
|
|
708
|
+
): Promise<ComAtprotoIdentityGetRecommendedDidCredentials.Response> {
|
|
709
|
+
return this._service.xrpc
|
|
710
|
+
.call(
|
|
711
|
+
'com.atproto.identity.getRecommendedDidCredentials',
|
|
712
|
+
params,
|
|
713
|
+
undefined,
|
|
714
|
+
opts,
|
|
715
|
+
)
|
|
716
|
+
.catch((e) => {
|
|
717
|
+
throw ComAtprotoIdentityGetRecommendedDidCredentials.toKnownErr(e)
|
|
718
|
+
})
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
requestPlcOperationSignature(
|
|
722
|
+
data?: ComAtprotoIdentityRequestPlcOperationSignature.InputSchema,
|
|
723
|
+
opts?: ComAtprotoIdentityRequestPlcOperationSignature.CallOptions,
|
|
724
|
+
): Promise<ComAtprotoIdentityRequestPlcOperationSignature.Response> {
|
|
725
|
+
return this._service.xrpc
|
|
726
|
+
.call(
|
|
727
|
+
'com.atproto.identity.requestPlcOperationSignature',
|
|
728
|
+
opts?.qp,
|
|
729
|
+
data,
|
|
730
|
+
opts,
|
|
731
|
+
)
|
|
732
|
+
.catch((e) => {
|
|
733
|
+
throw ComAtprotoIdentityRequestPlcOperationSignature.toKnownErr(e)
|
|
734
|
+
})
|
|
735
|
+
}
|
|
736
|
+
|
|
678
737
|
resolveHandle(
|
|
679
738
|
params?: ComAtprotoIdentityResolveHandle.QueryParams,
|
|
680
739
|
opts?: ComAtprotoIdentityResolveHandle.CallOptions,
|
|
@@ -686,6 +745,28 @@ export class ComAtprotoIdentityNS {
|
|
|
686
745
|
})
|
|
687
746
|
}
|
|
688
747
|
|
|
748
|
+
signPlcOperation(
|
|
749
|
+
data?: ComAtprotoIdentitySignPlcOperation.InputSchema,
|
|
750
|
+
opts?: ComAtprotoIdentitySignPlcOperation.CallOptions,
|
|
751
|
+
): Promise<ComAtprotoIdentitySignPlcOperation.Response> {
|
|
752
|
+
return this._service.xrpc
|
|
753
|
+
.call('com.atproto.identity.signPlcOperation', opts?.qp, data, opts)
|
|
754
|
+
.catch((e) => {
|
|
755
|
+
throw ComAtprotoIdentitySignPlcOperation.toKnownErr(e)
|
|
756
|
+
})
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
submitPlcOperation(
|
|
760
|
+
data?: ComAtprotoIdentitySubmitPlcOperation.InputSchema,
|
|
761
|
+
opts?: ComAtprotoIdentitySubmitPlcOperation.CallOptions,
|
|
762
|
+
): Promise<ComAtprotoIdentitySubmitPlcOperation.Response> {
|
|
763
|
+
return this._service.xrpc
|
|
764
|
+
.call('com.atproto.identity.submitPlcOperation', opts?.qp, data, opts)
|
|
765
|
+
.catch((e) => {
|
|
766
|
+
throw ComAtprotoIdentitySubmitPlcOperation.toKnownErr(e)
|
|
767
|
+
})
|
|
768
|
+
}
|
|
769
|
+
|
|
689
770
|
updateHandle(
|
|
690
771
|
data?: ComAtprotoIdentityUpdateHandle.InputSchema,
|
|
691
772
|
opts?: ComAtprotoIdentityUpdateHandle.CallOptions,
|
|
@@ -798,6 +879,28 @@ export class ComAtprotoRepoNS {
|
|
|
798
879
|
})
|
|
799
880
|
}
|
|
800
881
|
|
|
882
|
+
importRepo(
|
|
883
|
+
data?: ComAtprotoRepoImportRepo.InputSchema,
|
|
884
|
+
opts?: ComAtprotoRepoImportRepo.CallOptions,
|
|
885
|
+
): Promise<ComAtprotoRepoImportRepo.Response> {
|
|
886
|
+
return this._service.xrpc
|
|
887
|
+
.call('com.atproto.repo.importRepo', opts?.qp, data, opts)
|
|
888
|
+
.catch((e) => {
|
|
889
|
+
throw ComAtprotoRepoImportRepo.toKnownErr(e)
|
|
890
|
+
})
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
listMissingBlobs(
|
|
894
|
+
params?: ComAtprotoRepoListMissingBlobs.QueryParams,
|
|
895
|
+
opts?: ComAtprotoRepoListMissingBlobs.CallOptions,
|
|
896
|
+
): Promise<ComAtprotoRepoListMissingBlobs.Response> {
|
|
897
|
+
return this._service.xrpc
|
|
898
|
+
.call('com.atproto.repo.listMissingBlobs', params, undefined, opts)
|
|
899
|
+
.catch((e) => {
|
|
900
|
+
throw ComAtprotoRepoListMissingBlobs.toKnownErr(e)
|
|
901
|
+
})
|
|
902
|
+
}
|
|
903
|
+
|
|
801
904
|
listRecords(
|
|
802
905
|
params?: ComAtprotoRepoListRecords.QueryParams,
|
|
803
906
|
opts?: ComAtprotoRepoListRecords.CallOptions,
|
|
@@ -839,6 +942,28 @@ export class ComAtprotoServerNS {
|
|
|
839
942
|
this._service = service
|
|
840
943
|
}
|
|
841
944
|
|
|
945
|
+
activateAccount(
|
|
946
|
+
data?: ComAtprotoServerActivateAccount.InputSchema,
|
|
947
|
+
opts?: ComAtprotoServerActivateAccount.CallOptions,
|
|
948
|
+
): Promise<ComAtprotoServerActivateAccount.Response> {
|
|
949
|
+
return this._service.xrpc
|
|
950
|
+
.call('com.atproto.server.activateAccount', opts?.qp, data, opts)
|
|
951
|
+
.catch((e) => {
|
|
952
|
+
throw ComAtprotoServerActivateAccount.toKnownErr(e)
|
|
953
|
+
})
|
|
954
|
+
}
|
|
955
|
+
|
|
956
|
+
checkAccountStatus(
|
|
957
|
+
params?: ComAtprotoServerCheckAccountStatus.QueryParams,
|
|
958
|
+
opts?: ComAtprotoServerCheckAccountStatus.CallOptions,
|
|
959
|
+
): Promise<ComAtprotoServerCheckAccountStatus.Response> {
|
|
960
|
+
return this._service.xrpc
|
|
961
|
+
.call('com.atproto.server.checkAccountStatus', params, undefined, opts)
|
|
962
|
+
.catch((e) => {
|
|
963
|
+
throw ComAtprotoServerCheckAccountStatus.toKnownErr(e)
|
|
964
|
+
})
|
|
965
|
+
}
|
|
966
|
+
|
|
842
967
|
confirmEmail(
|
|
843
968
|
data?: ComAtprotoServerConfirmEmail.InputSchema,
|
|
844
969
|
opts?: ComAtprotoServerConfirmEmail.CallOptions,
|
|
@@ -905,6 +1030,17 @@ export class ComAtprotoServerNS {
|
|
|
905
1030
|
})
|
|
906
1031
|
}
|
|
907
1032
|
|
|
1033
|
+
deactivateAccount(
|
|
1034
|
+
data?: ComAtprotoServerDeactivateAccount.InputSchema,
|
|
1035
|
+
opts?: ComAtprotoServerDeactivateAccount.CallOptions,
|
|
1036
|
+
): Promise<ComAtprotoServerDeactivateAccount.Response> {
|
|
1037
|
+
return this._service.xrpc
|
|
1038
|
+
.call('com.atproto.server.deactivateAccount', opts?.qp, data, opts)
|
|
1039
|
+
.catch((e) => {
|
|
1040
|
+
throw ComAtprotoServerDeactivateAccount.toKnownErr(e)
|
|
1041
|
+
})
|
|
1042
|
+
}
|
|
1043
|
+
|
|
908
1044
|
deleteAccount(
|
|
909
1045
|
data?: ComAtprotoServerDeleteAccount.InputSchema,
|
|
910
1046
|
opts?: ComAtprotoServerDeleteAccount.CallOptions,
|
|
@@ -949,6 +1085,17 @@ export class ComAtprotoServerNS {
|
|
|
949
1085
|
})
|
|
950
1086
|
}
|
|
951
1087
|
|
|
1088
|
+
getServiceAuth(
|
|
1089
|
+
params?: ComAtprotoServerGetServiceAuth.QueryParams,
|
|
1090
|
+
opts?: ComAtprotoServerGetServiceAuth.CallOptions,
|
|
1091
|
+
): Promise<ComAtprotoServerGetServiceAuth.Response> {
|
|
1092
|
+
return this._service.xrpc
|
|
1093
|
+
.call('com.atproto.server.getServiceAuth', params, undefined, opts)
|
|
1094
|
+
.catch((e) => {
|
|
1095
|
+
throw ComAtprotoServerGetServiceAuth.toKnownErr(e)
|
|
1096
|
+
})
|
|
1097
|
+
}
|
|
1098
|
+
|
|
952
1099
|
getSession(
|
|
953
1100
|
params?: ComAtprotoServerGetSession.QueryParams,
|
|
954
1101
|
opts?: ComAtprotoServerGetSession.CallOptions,
|
|
@@ -1229,28 +1376,6 @@ export class ComAtprotoTempNS {
|
|
|
1229
1376
|
})
|
|
1230
1377
|
}
|
|
1231
1378
|
|
|
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
1379
|
requestPhoneVerification(
|
|
1255
1380
|
data?: ComAtprotoTempRequestPhoneVerification.InputSchema,
|
|
1256
1381
|
opts?: ComAtprotoTempRequestPhoneVerification.CallOptions,
|
|
@@ -1261,17 +1386,6 @@ export class ComAtprotoTempNS {
|
|
|
1261
1386
|
throw ComAtprotoTempRequestPhoneVerification.toKnownErr(e)
|
|
1262
1387
|
})
|
|
1263
1388
|
}
|
|
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
1389
|
}
|
|
1276
1390
|
|
|
1277
1391
|
export class AppNS {
|