@atproto/bsky 0.0.199 → 0.0.200
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 +12 -0
- package/dist/api/app/bsky/contact/dismissMatch.d.ts +4 -0
- package/dist/api/app/bsky/contact/dismissMatch.d.ts.map +1 -0
- package/dist/api/app/bsky/contact/dismissMatch.js +23 -0
- package/dist/api/app/bsky/contact/dismissMatch.js.map +1 -0
- package/dist/api/app/bsky/contact/getMatches.d.ts +4 -0
- package/dist/api/app/bsky/contact/getMatches.d.ts.map +1 -0
- package/dist/api/app/bsky/contact/getMatches.js +59 -0
- package/dist/api/app/bsky/contact/getMatches.js.map +1 -0
- package/dist/api/app/bsky/contact/getSyncStatus.d.ts +4 -0
- package/dist/api/app/bsky/contact/getSyncStatus.d.ts.map +1 -0
- package/dist/api/app/bsky/contact/getSyncStatus.js +32 -0
- package/dist/api/app/bsky/contact/getSyncStatus.js.map +1 -0
- package/dist/api/app/bsky/contact/importContacts.d.ts +4 -0
- package/dist/api/app/bsky/contact/importContacts.d.ts.map +1 -0
- package/dist/api/app/bsky/contact/importContacts.js +62 -0
- package/dist/api/app/bsky/contact/importContacts.js.map +1 -0
- package/dist/api/app/bsky/contact/removeData.d.ts +4 -0
- package/dist/api/app/bsky/contact/removeData.d.ts.map +1 -0
- package/dist/api/app/bsky/contact/removeData.js +22 -0
- package/dist/api/app/bsky/contact/removeData.js.map +1 -0
- package/dist/api/app/bsky/contact/startPhoneVerification.d.ts +4 -0
- package/dist/api/app/bsky/contact/startPhoneVerification.d.ts.map +1 -0
- package/dist/api/app/bsky/contact/startPhoneVerification.js +23 -0
- package/dist/api/app/bsky/contact/startPhoneVerification.js.map +1 -0
- package/dist/api/app/bsky/contact/util.d.ts +6 -0
- package/dist/api/app/bsky/contact/util.d.ts.map +1 -0
- package/dist/api/app/bsky/contact/util.js +10 -0
- package/dist/api/app/bsky/contact/util.js.map +1 -0
- package/dist/api/app/bsky/contact/verifyPhone.d.ts +4 -0
- package/dist/api/app/bsky/contact/verifyPhone.d.ts.map +1 -0
- package/dist/api/app/bsky/contact/verifyPhone.js +26 -0
- package/dist/api/app/bsky/contact/verifyPhone.js.map +1 -0
- package/dist/api/app/bsky/graph/getRelationships.d.ts.map +1 -1
- package/dist/api/app/bsky/graph/getRelationships.js +4 -0
- package/dist/api/app/bsky/graph/getRelationships.js.map +1 -1
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +14 -0
- package/dist/api/index.js.map +1 -1
- package/dist/config.d.ts +8 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +21 -0
- package/dist/config.js.map +1 -1
- package/dist/context.d.ts +3 -0
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +3 -0
- package/dist/context.js.map +1 -1
- package/dist/hydration/actor.js +1 -1
- package/dist/hydration/actor.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/dist/lexicon/index.d.ts +19 -0
- package/dist/lexicon/index.d.ts.map +1 -1
- package/dist/lexicon/index.js +48 -1
- package/dist/lexicon/index.js.map +1 -1
- package/dist/lexicon/lexicons.d.ts +664 -0
- package/dist/lexicon/lexicons.d.ts.map +1 -1
- package/dist/lexicon/lexicons.js +354 -0
- package/dist/lexicon/lexicons.js.map +1 -1
- package/dist/lexicon/types/app/bsky/contact/defs.d.ts +24 -0
- package/dist/lexicon/types/app/bsky/contact/defs.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/contact/defs.js +25 -0
- package/dist/lexicon/types/app/bsky/contact/defs.js.map +1 -0
- package/dist/lexicon/types/app/bsky/contact/dismissMatch.d.ts +25 -0
- package/dist/lexicon/types/app/bsky/contact/dismissMatch.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/contact/dismissMatch.js +7 -0
- package/dist/lexicon/types/app/bsky/contact/dismissMatch.js.map +1 -0
- package/dist/lexicon/types/app/bsky/contact/getMatches.d.ts +25 -0
- package/dist/lexicon/types/app/bsky/contact/getMatches.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/contact/getMatches.js +7 -0
- package/dist/lexicon/types/app/bsky/contact/getMatches.js.map +1 -0
- package/dist/lexicon/types/app/bsky/contact/getSyncStatus.d.ts +21 -0
- package/dist/lexicon/types/app/bsky/contact/getSyncStatus.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/contact/getSyncStatus.js +7 -0
- package/dist/lexicon/types/app/bsky/contact/getSyncStatus.js.map +1 -0
- package/dist/lexicon/types/app/bsky/contact/importContacts.d.ts +30 -0
- package/dist/lexicon/types/app/bsky/contact/importContacts.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/contact/importContacts.js +7 -0
- package/dist/lexicon/types/app/bsky/contact/importContacts.js.map +1 -0
- package/dist/lexicon/types/app/bsky/contact/removeData.d.ts +23 -0
- package/dist/lexicon/types/app/bsky/contact/removeData.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/contact/removeData.js +7 -0
- package/dist/lexicon/types/app/bsky/contact/removeData.js.map +1 -0
- package/dist/lexicon/types/app/bsky/contact/startPhoneVerification.d.ts +25 -0
- package/dist/lexicon/types/app/bsky/contact/startPhoneVerification.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/contact/startPhoneVerification.js +7 -0
- package/dist/lexicon/types/app/bsky/contact/startPhoneVerification.js.map +1 -0
- package/dist/lexicon/types/app/bsky/contact/verifyPhone.d.ts +29 -0
- package/dist/lexicon/types/app/bsky/contact/verifyPhone.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/contact/verifyPhone.js +7 -0
- package/dist/lexicon/types/app/bsky/contact/verifyPhone.js.map +1 -0
- package/dist/lexicon/types/app/bsky/graph/defs.d.ts +8 -0
- package/dist/lexicon/types/app/bsky/graph/defs.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/graph/defs.js.map +1 -1
- package/dist/proto/bsky_pb.d.ts +0 -4
- package/dist/proto/bsky_pb.d.ts.map +1 -1
- package/dist/proto/bsky_pb.js +0 -10
- package/dist/proto/bsky_pb.js.map +1 -1
- package/dist/proto/rolodex_connect.d.ts +83 -0
- package/dist/proto/rolodex_connect.d.ts.map +1 -0
- package/dist/proto/rolodex_connect.js +90 -0
- package/dist/proto/rolodex_connect.js.map +1 -0
- package/dist/proto/rolodex_pb.d.ts +363 -0
- package/dist/proto/rolodex_pb.d.ts.map +1 -0
- package/dist/proto/rolodex_pb.js +1032 -0
- package/dist/proto/rolodex_pb.js.map +1 -0
- package/dist/rolodex.d.ts +9 -0
- package/dist/rolodex.d.ts.map +1 -0
- package/dist/rolodex.js +25 -0
- package/dist/rolodex.js.map +1 -0
- package/package.json +13 -13
- package/proto/rolodex.proto +116 -0
- package/src/api/app/bsky/contact/dismissMatch.ts +24 -0
- package/src/api/app/bsky/contact/getMatches.ts +111 -0
- package/src/api/app/bsky/contact/getSyncStatus.ts +35 -0
- package/src/api/app/bsky/contact/importContacts.ts +118 -0
- package/src/api/app/bsky/contact/removeData.ts +23 -0
- package/src/api/app/bsky/contact/startPhoneVerification.ts +24 -0
- package/src/api/app/bsky/contact/util.ts +13 -0
- package/src/api/app/bsky/contact/verifyPhone.ts +27 -0
- package/src/api/app/bsky/graph/getRelationships.ts +4 -0
- package/src/api/index.ts +14 -0
- package/src/config.ts +27 -0
- package/src/context.ts +6 -0
- package/src/hydration/actor.ts +1 -1
- package/src/index.ts +13 -0
- package/src/lexicon/index.ts +101 -0
- package/src/lexicon/lexicons.ts +375 -0
- package/src/lexicon/types/app/bsky/contact/defs.ts +52 -0
- package/src/lexicon/types/app/bsky/contact/dismissMatch.ts +43 -0
- package/src/lexicon/types/app/bsky/contact/getMatches.ts +43 -0
- package/src/lexicon/types/app/bsky/contact/getSyncStatus.ts +39 -0
- package/src/lexicon/types/app/bsky/contact/importContacts.ts +49 -0
- package/src/lexicon/types/app/bsky/contact/removeData.ts +40 -0
- package/src/lexicon/types/app/bsky/contact/startPhoneVerification.ts +43 -0
- package/src/lexicon/types/app/bsky/contact/verifyPhone.ts +48 -0
- package/src/lexicon/types/app/bsky/graph/defs.ts +8 -0
- package/src/proto/bsky_pb.ts +0 -6
- package/src/proto/rolodex_connect.ts +89 -0
- package/src/proto/rolodex_pb.ts +746 -0
- package/src/rolodex.ts +42 -0
- package/tests/views/__snapshots__/profile.test.ts.snap +103 -0
- package/tests/views/profile.test.ts +39 -0
- package/tsconfig.build.tsbuildinfo +1 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { MethodNotImplementedError } from '@atproto/xrpc-server'
|
|
2
|
+
import { AppContext } from '../../../..'
|
|
3
|
+
import { RolodexClient } from '../../../../rolodex'
|
|
4
|
+
|
|
5
|
+
export function assertRolodexOrThrowUnimplemented(
|
|
6
|
+
ctx: AppContext,
|
|
7
|
+
): asserts ctx is AppContext & { rolodexClient: RolodexClient } {
|
|
8
|
+
if (!ctx.rolodexClient) {
|
|
9
|
+
throw new MethodNotImplementedError(
|
|
10
|
+
'This service is not configured to support contact imports.',
|
|
11
|
+
)
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { AppContext } from '../../../../context'
|
|
2
|
+
import { Server } from '../../../../lexicon'
|
|
3
|
+
import { assertRolodexOrThrowUnimplemented } from './util'
|
|
4
|
+
|
|
5
|
+
export default function (server: Server, ctx: AppContext) {
|
|
6
|
+
server.app.bsky.contact.verifyPhone({
|
|
7
|
+
auth: ctx.authVerifier.standard,
|
|
8
|
+
handler: async ({ auth, input }) => {
|
|
9
|
+
assertRolodexOrThrowUnimplemented(ctx)
|
|
10
|
+
|
|
11
|
+
const actor = auth.credentials.iss
|
|
12
|
+
// TODO: Error handling.
|
|
13
|
+
const res = await ctx.rolodexClient.verifyPhone({
|
|
14
|
+
actor,
|
|
15
|
+
verificationCode: input.body.code,
|
|
16
|
+
phone: input.body.phone,
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
return {
|
|
20
|
+
encoding: 'application/json',
|
|
21
|
+
body: {
|
|
22
|
+
token: res.token,
|
|
23
|
+
},
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
})
|
|
27
|
+
}
|
|
@@ -26,6 +26,10 @@ export default function (server: Server, ctx: AppContext) {
|
|
|
26
26
|
did,
|
|
27
27
|
following: subject.following,
|
|
28
28
|
followedBy: subject.followedBy,
|
|
29
|
+
blocking: subject.blocking,
|
|
30
|
+
blockedBy: subject.blockedBy,
|
|
31
|
+
blockingByList: subject.blockingByList,
|
|
32
|
+
blockedByList: subject.blockedByList,
|
|
29
33
|
}
|
|
30
34
|
: {
|
|
31
35
|
$type: 'app.bsky.graph.defs#notFoundActor',
|
package/src/api/index.ts
CHANGED
|
@@ -11,6 +11,13 @@ import aaGetState from './app/bsky/ageassurance/getState'
|
|
|
11
11
|
import createBookmark from './app/bsky/bookmark/createBookmark'
|
|
12
12
|
import deleteBookmark from './app/bsky/bookmark/deleteBookmark'
|
|
13
13
|
import getBookmarks from './app/bsky/bookmark/getBookmarks'
|
|
14
|
+
import dismissMatch from './app/bsky/contact/dismissMatch'
|
|
15
|
+
import getMatches from './app/bsky/contact/getMatches'
|
|
16
|
+
import getSyncStatus from './app/bsky/contact/getSyncStatus'
|
|
17
|
+
import importContacts from './app/bsky/contact/importContacts'
|
|
18
|
+
import removeData from './app/bsky/contact/removeData'
|
|
19
|
+
import startPhoneVerification from './app/bsky/contact/startPhoneVerification'
|
|
20
|
+
import verifyPhone from './app/bsky/contact/verifyPhone'
|
|
14
21
|
import getActorFeeds from './app/bsky/feed/getActorFeeds'
|
|
15
22
|
import getActorLikes from './app/bsky/feed/getActorLikes'
|
|
16
23
|
import getAuthorFeed from './app/bsky/feed/getAuthorFeed'
|
|
@@ -94,6 +101,13 @@ export default function (server: Server, ctx: AppContext) {
|
|
|
94
101
|
createBookmark(server, ctx)
|
|
95
102
|
deleteBookmark(server, ctx)
|
|
96
103
|
getBookmarks(server, ctx)
|
|
104
|
+
dismissMatch(server, ctx)
|
|
105
|
+
getMatches(server, ctx)
|
|
106
|
+
getSyncStatus(server, ctx)
|
|
107
|
+
importContacts(server, ctx)
|
|
108
|
+
removeData(server, ctx)
|
|
109
|
+
startPhoneVerification(server, ctx)
|
|
110
|
+
verifyPhone(server, ctx)
|
|
97
111
|
getActorFeeds(server, ctx)
|
|
98
112
|
getSuggestedFeeds(server, ctx)
|
|
99
113
|
getAuthorFeed(server, ctx)
|
package/src/config.ts
CHANGED
|
@@ -55,6 +55,10 @@ export interface ServerConfigValues {
|
|
|
55
55
|
courierApiKey?: string
|
|
56
56
|
courierHttpVersion?: '1.1' | '2'
|
|
57
57
|
courierIgnoreBadTls?: boolean
|
|
58
|
+
rolodexUrl?: string
|
|
59
|
+
rolodexApiKey?: string
|
|
60
|
+
rolodexHttpVersion?: '1.1' | '2'
|
|
61
|
+
rolodexIgnoreBadTls?: boolean
|
|
58
62
|
searchUrl?: string
|
|
59
63
|
searchTagsHide: Set<string>
|
|
60
64
|
suggestionsUrl?: string
|
|
@@ -186,6 +190,12 @@ export class ServerConfig {
|
|
|
186
190
|
const courierIgnoreBadTls =
|
|
187
191
|
process.env.BSKY_COURIER_IGNORE_BAD_TLS === 'true'
|
|
188
192
|
assert(courierHttpVersion === '1.1' || courierHttpVersion === '2')
|
|
193
|
+
const rolodexUrl = process.env.BSKY_ROLODEX_URL || undefined
|
|
194
|
+
const rolodexApiKey = process.env.BSKY_ROLODEX_API_KEY || undefined
|
|
195
|
+
const rolodexHttpVersion = process.env.BSKY_ROLODEX_HTTP_VERSION || '2'
|
|
196
|
+
const rolodexIgnoreBadTls =
|
|
197
|
+
process.env.BSKY_ROLODEX_IGNORE_BAD_TLS === 'true'
|
|
198
|
+
assert(rolodexHttpVersion === '1.1' || rolodexHttpVersion === '2')
|
|
189
199
|
const blobRateLimitBypassKey =
|
|
190
200
|
process.env.BSKY_BLOB_RATE_LIMIT_BYPASS_KEY || undefined
|
|
191
201
|
// single domain would be e.g. "mypds.com", subdomains are supported with a leading dot e.g. ".mypds.com"
|
|
@@ -347,6 +357,10 @@ export class ServerConfig {
|
|
|
347
357
|
courierApiKey,
|
|
348
358
|
courierHttpVersion,
|
|
349
359
|
courierIgnoreBadTls,
|
|
360
|
+
rolodexUrl,
|
|
361
|
+
rolodexApiKey,
|
|
362
|
+
rolodexHttpVersion,
|
|
363
|
+
rolodexIgnoreBadTls,
|
|
350
364
|
blobRateLimitBypassKey,
|
|
351
365
|
blobRateLimitBypassHostname,
|
|
352
366
|
adminPasswords,
|
|
@@ -470,6 +484,19 @@ export class ServerConfig {
|
|
|
470
484
|
return this.cfg.courierIgnoreBadTls
|
|
471
485
|
}
|
|
472
486
|
|
|
487
|
+
get rolodexUrl() {
|
|
488
|
+
return this.cfg.rolodexUrl
|
|
489
|
+
}
|
|
490
|
+
get rolodexApiKey() {
|
|
491
|
+
return this.cfg.rolodexApiKey
|
|
492
|
+
}
|
|
493
|
+
get rolodexHttpVersion() {
|
|
494
|
+
return this.cfg.rolodexHttpVersion
|
|
495
|
+
}
|
|
496
|
+
get rolodexIgnoreBadTls() {
|
|
497
|
+
return this.cfg.rolodexIgnoreBadTls
|
|
498
|
+
}
|
|
499
|
+
|
|
473
500
|
get searchUrl() {
|
|
474
501
|
return this.cfg.searchUrl
|
|
475
502
|
}
|
package/src/context.ts
CHANGED
|
@@ -14,6 +14,7 @@ import { FeatureGates } from './feature-gates'
|
|
|
14
14
|
import { Hydrator } from './hydration/hydrator'
|
|
15
15
|
import { KwsClient } from './kws'
|
|
16
16
|
import { httpLogger as log } from './logger'
|
|
17
|
+
import { RolodexClient } from './rolodex'
|
|
17
18
|
import { StashClient } from './stash'
|
|
18
19
|
import {
|
|
19
20
|
ParsedLabelers,
|
|
@@ -39,6 +40,7 @@ export class AppContext {
|
|
|
39
40
|
bsyncClient: BsyncClient
|
|
40
41
|
stashClient: StashClient
|
|
41
42
|
courierClient: CourierClient | undefined
|
|
43
|
+
rolodexClient: RolodexClient | undefined
|
|
42
44
|
authVerifier: AuthVerifier
|
|
43
45
|
featureGates: FeatureGates
|
|
44
46
|
blobDispatcher: Dispatcher
|
|
@@ -106,6 +108,10 @@ export class AppContext {
|
|
|
106
108
|
return this.opts.courierClient
|
|
107
109
|
}
|
|
108
110
|
|
|
111
|
+
get rolodexClient(): RolodexClient | undefined {
|
|
112
|
+
return this.opts.rolodexClient
|
|
113
|
+
}
|
|
114
|
+
|
|
109
115
|
get authVerifier(): AuthVerifier {
|
|
110
116
|
return this.opts.authVerifier
|
|
111
117
|
}
|
package/src/hydration/actor.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -30,6 +30,7 @@ import { ImageUriBuilder } from './image/uri'
|
|
|
30
30
|
import { createKwsClient } from './kws'
|
|
31
31
|
import { createServer } from './lexicon'
|
|
32
32
|
import { loggerMiddleware } from './logger'
|
|
33
|
+
import { authWithApiKey as rolodexAuth, createRolodexClient } from './rolodex'
|
|
33
34
|
import { createStashClient } from './stash'
|
|
34
35
|
import { Views } from './views'
|
|
35
36
|
import { VideoUriBuilder } from './views/util'
|
|
@@ -156,6 +157,17 @@ export class BskyAppView {
|
|
|
156
157
|
})
|
|
157
158
|
: undefined
|
|
158
159
|
|
|
160
|
+
const rolodexClient = config.rolodexUrl
|
|
161
|
+
? createRolodexClient({
|
|
162
|
+
baseUrl: config.rolodexUrl,
|
|
163
|
+
httpVersion: config.rolodexHttpVersion ?? '2',
|
|
164
|
+
nodeOptions: { rejectUnauthorized: !config.rolodexIgnoreBadTls },
|
|
165
|
+
interceptors: config.rolodexApiKey
|
|
166
|
+
? [rolodexAuth(config.rolodexApiKey)]
|
|
167
|
+
: [],
|
|
168
|
+
})
|
|
169
|
+
: undefined
|
|
170
|
+
|
|
159
171
|
const kwsClient = config.kws ? createKwsClient(config.kws) : undefined
|
|
160
172
|
|
|
161
173
|
const entrywayJwtPublicKey = config.entrywayJwtPublicKeyHex
|
|
@@ -191,6 +203,7 @@ export class BskyAppView {
|
|
|
191
203
|
bsyncClient,
|
|
192
204
|
stashClient,
|
|
193
205
|
courierClient,
|
|
206
|
+
rolodexClient,
|
|
194
207
|
authVerifier,
|
|
195
208
|
featureGates,
|
|
196
209
|
blobDispatcher,
|
package/src/lexicon/index.ts
CHANGED
|
@@ -23,6 +23,13 @@ import * as AppBskyAgeassuranceGetState from './types/app/bsky/ageassurance/getS
|
|
|
23
23
|
import * as AppBskyBookmarkCreateBookmark from './types/app/bsky/bookmark/createBookmark.js'
|
|
24
24
|
import * as AppBskyBookmarkDeleteBookmark from './types/app/bsky/bookmark/deleteBookmark.js'
|
|
25
25
|
import * as AppBskyBookmarkGetBookmarks from './types/app/bsky/bookmark/getBookmarks.js'
|
|
26
|
+
import * as AppBskyContactDismissMatch from './types/app/bsky/contact/dismissMatch.js'
|
|
27
|
+
import * as AppBskyContactGetMatches from './types/app/bsky/contact/getMatches.js'
|
|
28
|
+
import * as AppBskyContactGetSyncStatus from './types/app/bsky/contact/getSyncStatus.js'
|
|
29
|
+
import * as AppBskyContactImportContacts from './types/app/bsky/contact/importContacts.js'
|
|
30
|
+
import * as AppBskyContactRemoveData from './types/app/bsky/contact/removeData.js'
|
|
31
|
+
import * as AppBskyContactStartPhoneVerification from './types/app/bsky/contact/startPhoneVerification.js'
|
|
32
|
+
import * as AppBskyContactVerifyPhone from './types/app/bsky/contact/verifyPhone.js'
|
|
26
33
|
import * as AppBskyFeedDescribeFeedGenerator from './types/app/bsky/feed/describeFeedGenerator.js'
|
|
27
34
|
import * as AppBskyFeedGetActorFeeds from './types/app/bsky/feed/getActorFeeds.js'
|
|
28
35
|
import * as AppBskyFeedGetActorLikes from './types/app/bsky/feed/getActorLikes.js'
|
|
@@ -276,6 +283,7 @@ export class AppBskyNS {
|
|
|
276
283
|
actor: AppBskyActorNS
|
|
277
284
|
ageassurance: AppBskyAgeassuranceNS
|
|
278
285
|
bookmark: AppBskyBookmarkNS
|
|
286
|
+
contact: AppBskyContactNS
|
|
279
287
|
embed: AppBskyEmbedNS
|
|
280
288
|
feed: AppBskyFeedNS
|
|
281
289
|
graph: AppBskyGraphNS
|
|
@@ -290,6 +298,7 @@ export class AppBskyNS {
|
|
|
290
298
|
this.actor = new AppBskyActorNS(server)
|
|
291
299
|
this.ageassurance = new AppBskyAgeassuranceNS(server)
|
|
292
300
|
this.bookmark = new AppBskyBookmarkNS(server)
|
|
301
|
+
this.contact = new AppBskyContactNS(server)
|
|
293
302
|
this.embed = new AppBskyEmbedNS(server)
|
|
294
303
|
this.feed = new AppBskyFeedNS(server)
|
|
295
304
|
this.graph = new AppBskyGraphNS(server)
|
|
@@ -481,6 +490,98 @@ export class AppBskyBookmarkNS {
|
|
|
481
490
|
}
|
|
482
491
|
}
|
|
483
492
|
|
|
493
|
+
export class AppBskyContactNS {
|
|
494
|
+
_server: Server
|
|
495
|
+
|
|
496
|
+
constructor(server: Server) {
|
|
497
|
+
this._server = server
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
dismissMatch<A extends Auth = void>(
|
|
501
|
+
cfg: MethodConfigOrHandler<
|
|
502
|
+
A,
|
|
503
|
+
AppBskyContactDismissMatch.QueryParams,
|
|
504
|
+
AppBskyContactDismissMatch.HandlerInput,
|
|
505
|
+
AppBskyContactDismissMatch.HandlerOutput
|
|
506
|
+
>,
|
|
507
|
+
) {
|
|
508
|
+
const nsid = 'app.bsky.contact.dismissMatch' // @ts-ignore
|
|
509
|
+
return this._server.xrpc.method(nsid, cfg)
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
getMatches<A extends Auth = void>(
|
|
513
|
+
cfg: MethodConfigOrHandler<
|
|
514
|
+
A,
|
|
515
|
+
AppBskyContactGetMatches.QueryParams,
|
|
516
|
+
AppBskyContactGetMatches.HandlerInput,
|
|
517
|
+
AppBskyContactGetMatches.HandlerOutput
|
|
518
|
+
>,
|
|
519
|
+
) {
|
|
520
|
+
const nsid = 'app.bsky.contact.getMatches' // @ts-ignore
|
|
521
|
+
return this._server.xrpc.method(nsid, cfg)
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
getSyncStatus<A extends Auth = void>(
|
|
525
|
+
cfg: MethodConfigOrHandler<
|
|
526
|
+
A,
|
|
527
|
+
AppBskyContactGetSyncStatus.QueryParams,
|
|
528
|
+
AppBskyContactGetSyncStatus.HandlerInput,
|
|
529
|
+
AppBskyContactGetSyncStatus.HandlerOutput
|
|
530
|
+
>,
|
|
531
|
+
) {
|
|
532
|
+
const nsid = 'app.bsky.contact.getSyncStatus' // @ts-ignore
|
|
533
|
+
return this._server.xrpc.method(nsid, cfg)
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
importContacts<A extends Auth = void>(
|
|
537
|
+
cfg: MethodConfigOrHandler<
|
|
538
|
+
A,
|
|
539
|
+
AppBskyContactImportContacts.QueryParams,
|
|
540
|
+
AppBskyContactImportContacts.HandlerInput,
|
|
541
|
+
AppBskyContactImportContacts.HandlerOutput
|
|
542
|
+
>,
|
|
543
|
+
) {
|
|
544
|
+
const nsid = 'app.bsky.contact.importContacts' // @ts-ignore
|
|
545
|
+
return this._server.xrpc.method(nsid, cfg)
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
removeData<A extends Auth = void>(
|
|
549
|
+
cfg: MethodConfigOrHandler<
|
|
550
|
+
A,
|
|
551
|
+
AppBskyContactRemoveData.QueryParams,
|
|
552
|
+
AppBskyContactRemoveData.HandlerInput,
|
|
553
|
+
AppBskyContactRemoveData.HandlerOutput
|
|
554
|
+
>,
|
|
555
|
+
) {
|
|
556
|
+
const nsid = 'app.bsky.contact.removeData' // @ts-ignore
|
|
557
|
+
return this._server.xrpc.method(nsid, cfg)
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
startPhoneVerification<A extends Auth = void>(
|
|
561
|
+
cfg: MethodConfigOrHandler<
|
|
562
|
+
A,
|
|
563
|
+
AppBskyContactStartPhoneVerification.QueryParams,
|
|
564
|
+
AppBskyContactStartPhoneVerification.HandlerInput,
|
|
565
|
+
AppBskyContactStartPhoneVerification.HandlerOutput
|
|
566
|
+
>,
|
|
567
|
+
) {
|
|
568
|
+
const nsid = 'app.bsky.contact.startPhoneVerification' // @ts-ignore
|
|
569
|
+
return this._server.xrpc.method(nsid, cfg)
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
verifyPhone<A extends Auth = void>(
|
|
573
|
+
cfg: MethodConfigOrHandler<
|
|
574
|
+
A,
|
|
575
|
+
AppBskyContactVerifyPhone.QueryParams,
|
|
576
|
+
AppBskyContactVerifyPhone.HandlerInput,
|
|
577
|
+
AppBskyContactVerifyPhone.HandlerOutput
|
|
578
|
+
>,
|
|
579
|
+
) {
|
|
580
|
+
const nsid = 'app.bsky.contact.verifyPhone' // @ts-ignore
|
|
581
|
+
return this._server.xrpc.method(nsid, cfg)
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
|
|
484
585
|
export class AppBskyEmbedNS {
|
|
485
586
|
_server: Server
|
|
486
587
|
|