@atproto/bsky 0.0.245 → 0.0.247

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.
Files changed (51) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/api/app/bsky/feed/searchPostsV2.d.ts.map +1 -1
  3. package/dist/api/app/bsky/feed/searchPostsV2.js +3 -0
  4. package/dist/api/app/bsky/feed/searchPostsV2.js.map +1 -1
  5. package/dist/auth-verifier.d.ts +18 -13
  6. package/dist/auth-verifier.d.ts.map +1 -1
  7. package/dist/auth-verifier.js +9 -2
  8. package/dist/auth-verifier.js.map +1 -1
  9. package/dist/config.d.ts +7 -7
  10. package/dist/config.d.ts.map +1 -1
  11. package/dist/config.js +4 -1
  12. package/dist/config.js.map +1 -1
  13. package/dist/lexicons/app/bsky/feed/searchPostsV2.defs.d.ts +4 -4
  14. package/dist/lexicons/app/bsky/feed/searchPostsV2.defs.d.ts.map +1 -1
  15. package/dist/lexicons/app/bsky/feed/searchPostsV2.defs.js +2 -1
  16. package/dist/lexicons/app/bsky/feed/searchPostsV2.defs.js.map +1 -1
  17. package/package.json +8 -8
  18. package/src/api/app/bsky/feed/searchPostsV2.ts +4 -1
  19. package/src/auth-verifier.ts +28 -18
  20. package/src/config.ts +8 -5
  21. package/tests/data-plane/subscription.test.ts +2 -1
  22. package/tests/data-plane/thread-mutes.test.ts +3 -2
  23. package/tests/feed-generation.test.ts +2 -1
  24. package/tests/label-hydration.test.ts +6 -5
  25. package/tests/query-labels.test.ts +5 -4
  26. package/tests/seed/feed-hidden-replies.ts +3 -2
  27. package/tests/seed/get-suggested-starter-packs.ts +3 -2
  28. package/tests/seed/get-trends.ts +3 -2
  29. package/tests/seed/known-followers.ts +2 -1
  30. package/tests/seed/postgates.ts +3 -2
  31. package/tests/views/account-deactivation.test.ts +2 -1
  32. package/tests/views/actor-likes.test.ts +4 -3
  33. package/tests/views/author-feed.test.ts +6 -5
  34. package/tests/views/block-lists.test.ts +8 -7
  35. package/tests/views/blocks.test.ts +5 -4
  36. package/tests/views/bookmarks.test.ts +5 -4
  37. package/tests/views/feed-hidden-replies.test.ts +5 -4
  38. package/tests/views/feed-view-post.test.ts +5 -4
  39. package/tests/views/get-suggested-onboarding-users.test.ts +3 -2
  40. package/tests/views/internal-actor.test.ts +2 -1
  41. package/tests/views/known-followers.test.ts +2 -1
  42. package/tests/views/labeler-service.test.ts +4 -3
  43. package/tests/views/likes.test.ts +5 -4
  44. package/tests/views/list-feed.test.ts +7 -4
  45. package/tests/views/mute-lists.test.ts +22 -11
  46. package/tests/views/mutes.test.ts +24 -10
  47. package/tests/views/notifications.test.ts +15 -14
  48. package/tests/views/post-search.test.ts +4 -3
  49. package/tests/views/profile.test.ts +12 -8
  50. package/tests/views/quotes.test.ts +5 -4
  51. package/tests/views/thread.test.ts +4 -3
@@ -1,8 +1,9 @@
1
1
  import { SeedClient, TestNetwork, TestNetworkNoAppView } from '@atproto/dev-env'
2
+ import type { HandleString } from '@atproto/syntax'
2
3
 
3
4
  export type User = {
4
5
  email: string
5
- handle: string
6
+ handle: HandleString
6
7
  password: string
7
8
  displayName: string
8
9
  description: string
@@ -1,10 +1,11 @@
1
1
  import { SeedClient, TestNetwork, TestNetworkNoAppView } from '@atproto/dev-env'
2
+ import type { DidString, HandleString } from '@atproto/syntax'
2
3
 
3
4
  export type User = {
4
5
  id: string
5
- did: string
6
+ did: DidString
6
7
  email: string
7
- handle: string
8
+ handle: HandleString
8
9
  password: string
9
10
  displayName: string
10
11
  description: string
@@ -1,13 +1,14 @@
1
1
  import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'vitest'
2
2
  import { AtpAgent, ids } from '@atproto/api'
3
3
  import { SeedClient, TestNetwork, basicSeed } from '@atproto/dev-env'
4
+ import type { DidString } from '@atproto/syntax'
4
5
 
5
6
  describe('bsky account deactivation', () => {
6
7
  let network: TestNetwork
7
8
  let agent: AtpAgent
8
9
  let sc: SeedClient
9
10
 
10
- let alice: string
11
+ let alice: DidString
11
12
 
12
13
  beforeAll(async () => {
13
14
  network = await TestNetwork.create({
@@ -1,6 +1,7 @@
1
1
  import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'vitest'
2
2
  import { AtUri, AtpAgent, ids } from '@atproto/api'
3
3
  import { SeedClient, TestNetwork, basicSeed } from '@atproto/dev-env'
4
+ import type { DidString } from '@atproto/syntax'
4
5
 
5
6
  describe('bsky actor likes feed views', () => {
6
7
  let network: TestNetwork
@@ -9,9 +10,9 @@ describe('bsky actor likes feed views', () => {
9
10
  let sc: SeedClient
10
11
 
11
12
  // account dids, for convenience
12
- let alice: string
13
- let bob: string
14
- let carol: string
13
+ let alice: DidString
14
+ let bob: DidString
15
+ let carol: DidString
15
16
 
16
17
  beforeAll(async () => {
17
18
  network = await TestNetwork.create({
@@ -14,6 +14,7 @@ import {
14
14
  ids,
15
15
  } from '@atproto/api'
16
16
  import { SeedClient, TestNetwork, authorFeedSeed } from '@atproto/dev-env'
17
+ import type { DidString } from '@atproto/syntax'
17
18
  import { uriToDid } from '../../src/util/uris.js'
18
19
  import {
19
20
  forSnapshot,
@@ -32,11 +33,11 @@ describe('pds author feed views', () => {
32
33
  let sc: SeedClient
33
34
 
34
35
  // account dids, for convenience
35
- let alice: string
36
- let bob: string
37
- let carol: string
38
- let dan: string
39
- let eve: string
36
+ let alice: DidString
37
+ let bob: DidString
38
+ let carol: DidString
39
+ let dan: DidString
40
+ let eve: DidString
40
41
 
41
42
  beforeAll(async () => {
42
43
  network = await TestNetwork.create({
@@ -1,6 +1,7 @@
1
1
  import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'vitest'
2
2
  import { AtUri, AtpAgent, ids } from '@atproto/api'
3
3
  import { RecordRef, SeedClient, TestNetwork, basicSeed } from '@atproto/dev-env'
4
+ import type { DidString } from '@atproto/syntax'
4
5
  import { forSnapshot } from '../_util.js'
5
6
 
6
7
  describe('pds views with blocking from block lists', () => {
@@ -10,10 +11,10 @@ describe('pds views with blocking from block lists', () => {
10
11
  let sc: SeedClient
11
12
  let aliceReplyToDan: { ref: RecordRef }
12
13
 
13
- let alice: string
14
- let bob: string
15
- let carol: string
16
- let dan: string
14
+ let alice: DidString
15
+ let bob: DidString
16
+ let carol: DidString
17
+ let dan: DidString
17
18
 
18
19
  beforeAll(async () => {
19
20
  network = await TestNetwork.create({
@@ -232,7 +233,7 @@ describe('pds views with blocking from block lists', () => {
232
233
  )
233
234
  expect(
234
235
  resDan.data.feed.some((post) =>
235
- [bob, carol].includes(post.post.author.did),
236
+ [bob, carol].includes(post.post.author.did as DidString),
236
237
  ),
237
238
  ).toBeFalsy()
238
239
  })
@@ -616,7 +617,7 @@ describe('pds views with blocking from block lists', () => {
616
617
  )
617
618
  expect(
618
619
  resDan.data.feed.some((post) =>
619
- [bob, carol].includes(post.post.author.did),
620
+ [bob, carol].includes(post.post.author.did as DidString),
620
621
  ),
621
622
  ).toBeTruthy()
622
623
  })
@@ -653,7 +654,7 @@ describe('pds views with blocking from block lists', () => {
653
654
  )
654
655
  expect(
655
656
  resDan.data.feed.some((post) =>
656
- [bob, carol].includes(post.post.author.did),
657
+ [bob, carol].includes(post.post.author.did as DidString),
657
658
  ),
658
659
  ).toBeTruthy()
659
660
  })
@@ -8,6 +8,7 @@ import {
8
8
  ids,
9
9
  } from '@atproto/api'
10
10
  import { RecordRef, SeedClient, TestNetwork, basicSeed } from '@atproto/dev-env'
11
+ import type { DidString } from '@atproto/syntax'
11
12
  import { assertIsThreadViewPost, forSnapshot } from '../_util.js'
12
13
 
13
14
  describe('pds views with blocking', () => {
@@ -19,10 +20,10 @@ describe('pds views with blocking', () => {
19
20
  let aliceReplyToDan: { ref: RecordRef }
20
21
  let carolReplyToDan: { ref: RecordRef }
21
22
 
22
- let alice: string
23
- let bob: string
24
- let carol: string
25
- let dan: string
23
+ let alice: DidString
24
+ let bob: DidString
25
+ let carol: DidString
26
+ let dan: DidString
26
27
  let danBlockUri: string
27
28
 
28
29
  beforeAll(async () => {
@@ -20,6 +20,7 @@ import {
20
20
  ids,
21
21
  } from '@atproto/api'
22
22
  import { RecordRef, SeedClient, TestNetwork, basicSeed } from '@atproto/dev-env'
23
+ import type { DidString } from '@atproto/syntax'
23
24
  import { forSnapshot, paginateAll } from '../_util.js'
24
25
 
25
26
  type Database = TestNetwork['bsky']['db']
@@ -31,10 +32,10 @@ describe('appview bookmarks views', () => {
31
32
  let db: Database
32
33
 
33
34
  // account dids, for convenience
34
- let alice: string
35
- let bob: string
36
- let carol: string
37
- let dan: string
35
+ let alice: DidString
36
+ let bob: DidString
37
+ let carol: DidString
38
+ let dan: DidString
38
39
 
39
40
  beforeAll(async () => {
40
41
  network = await TestNetwork.create({
@@ -1,6 +1,7 @@
1
1
  import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'vitest'
2
2
  import { AtpAgent, ids } from '@atproto/api'
3
3
  import { SeedClient, TestNetwork } from '@atproto/dev-env'
4
+ import type { DidString } from '@atproto/syntax'
4
5
  import { Users, feedHiddenRepliesSeed } from '../seed/feed-hidden-replies.js'
5
6
 
6
7
  describe('feed hidden replies', () => {
@@ -44,7 +45,7 @@ describe('feed hidden replies', () => {
44
45
  createdAt: new Date().toISOString(),
45
46
  hiddenReplies: [B.ref.uriStr],
46
47
  },
47
- sc.getHeaders(A.ref.uri.host),
48
+ sc.getHeaders(A.ref.uri.host as DidString),
48
49
  )
49
50
 
50
51
  await network.processAll()
@@ -87,7 +88,7 @@ describe('feed hidden replies', () => {
87
88
  createdAt: new Date().toISOString(),
88
89
  hiddenReplies: [B.ref.uriStr],
89
90
  },
90
- sc.getHeaders(A.ref.uri.host),
91
+ sc.getHeaders(A.ref.uri.host as DidString),
91
92
  )
92
93
 
93
94
  await network.processAll()
@@ -175,7 +176,7 @@ describe('feed hidden replies', () => {
175
176
  createdAt: new Date().toISOString(),
176
177
  hiddenReplies: [C.ref.uriStr],
177
178
  },
178
- sc.getHeaders(A.ref.uri.host),
179
+ sc.getHeaders(A.ref.uri.host as DidString),
179
180
  )
180
181
  await network.processAll()
181
182
  const D = await sc.reply(users.viewer.did, A.ref, C.ref, `D`)
@@ -234,7 +235,7 @@ describe('feed hidden replies', () => {
234
235
  repo: A.ref.uri.host,
235
236
  rkey: A.ref.uri.rkey,
236
237
  },
237
- sc.getHeaders(A.ref.uri.host),
238
+ sc.getHeaders(A.ref.uri.host as DidString),
238
239
  )
239
240
  await network.processAll()
240
241
  })
@@ -2,6 +2,7 @@ import assert from 'node:assert'
2
2
  import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'vitest'
3
3
  import { AppBskyFeedDefs, AtUri, AtpAgent, ids } from '@atproto/api'
4
4
  import { SeedClient, TestNetwork, basicSeed } from '@atproto/dev-env'
5
+ import type { DidString } from '@atproto/syntax'
5
6
 
6
7
  /**
7
8
  * The frontend computes feed slices for display using at-most one
@@ -23,10 +24,10 @@ describe('pds thread views', () => {
23
24
  let sc: SeedClient
24
25
 
25
26
  // account dids, for convenience
26
- let alice: string
27
- let bob: string
28
- let carol: string
29
- let dan: string
27
+ let alice: DidString
28
+ let bob: DidString
29
+ let carol: DidString
30
+ let dan: DidString
30
31
 
31
32
  beforeAll(async () => {
32
33
  network = await TestNetwork.create({
@@ -11,12 +11,13 @@ import {
11
11
  ids,
12
12
  } from '@atproto/api'
13
13
  import { SeedClient, TestNetwork } from '@atproto/dev-env'
14
+ import type { DidString, HandleString } from '@atproto/syntax'
14
15
 
15
16
  type User = {
16
17
  id: string
17
- did: string
18
+ did: DidString
18
19
  email: string
19
- handle: string
20
+ handle: HandleString
20
21
  password: string
21
22
  displayName: string
22
23
  description: string
@@ -1,6 +1,7 @@
1
1
  import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'vitest'
2
2
  import { AppBskyActorDefs, AtpAgent } from '@atproto/api'
3
3
  import { SeedClient, TestNetwork } from '@atproto/dev-env'
4
+ import type { DidString } from '@atproto/syntax'
4
5
  import { knownFollowersSeed } from '../seed/known-followers.js'
5
6
 
6
7
  describe('internal actor views', () => {
@@ -8,7 +9,7 @@ describe('internal actor views', () => {
8
9
  let pdsAgent: AtpAgent
9
10
  let seedClient: SeedClient
10
11
 
11
- let dids: Record<string, string>
12
+ let dids: Record<string, DidString>
12
13
 
13
14
  beforeAll(async () => {
14
15
  network = await TestNetwork.create({
@@ -1,6 +1,7 @@
1
1
  import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'vitest'
2
2
  import { AtpAgent, ids } from '@atproto/api'
3
3
  import { SeedClient, TestNetwork } from '@atproto/dev-env'
4
+ import type { DidString } from '@atproto/syntax'
4
5
  import { knownFollowersSeed } from '../seed/known-followers.js'
5
6
 
6
7
  describe('known followers (social proof)', () => {
@@ -9,7 +10,7 @@ describe('known followers (social proof)', () => {
9
10
  let pdsAgent: AtpAgent
10
11
  let seedClient: SeedClient
11
12
 
12
- let dids: Record<string, string>
13
+ let dids: Record<string, DidString>
13
14
 
14
15
  beforeAll(async () => {
15
16
  network = await TestNetwork.create({
@@ -8,6 +8,7 @@ import {
8
8
  ids,
9
9
  } from '@atproto/api'
10
10
  import { RecordRef, SeedClient, TestNetwork, basicSeed } from '@atproto/dev-env'
11
+ import type { DidString } from '@atproto/syntax'
11
12
  import { forSnapshot, stripViewerFromLabeler } from '../_util.js'
12
13
 
13
14
  describe('labeler service views', () => {
@@ -17,9 +18,9 @@ describe('labeler service views', () => {
17
18
  let sc: SeedClient
18
19
 
19
20
  // account dids, for convenience
20
- let alice: string
21
- let bob: string
22
- let carol: string
21
+ let alice: DidString
22
+ let bob: DidString
23
+ let carol: DidString
23
24
 
24
25
  let aliceService: RecordRef
25
26
 
@@ -1,6 +1,7 @@
1
1
  import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'vitest'
2
2
  import { AppBskyFeedGetLikes, AtpAgent, ids } from '@atproto/api'
3
3
  import { SeedClient, TestNetwork, likesSeed } from '@atproto/dev-env'
4
+ import type { DidString } from '@atproto/syntax'
4
5
  import {
5
6
  constantDate,
6
7
  forSnapshot,
@@ -14,10 +15,10 @@ describe('pds like views', () => {
14
15
  let sc: SeedClient
15
16
 
16
17
  // account dids, for convenience
17
- let alice: string
18
- let bob: string
19
- let carol: string
20
- let frankie: string
18
+ let alice: DidString
19
+ let bob: DidString
20
+ let carol: DidString
21
+ let frankie: DidString
21
22
 
22
23
  beforeAll(async () => {
23
24
  network = await TestNetwork.create({
@@ -1,6 +1,7 @@
1
1
  import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'vitest'
2
2
  import { AppBskyFeedGetListFeed, AtpAgent, ids } from '@atproto/api'
3
3
  import { RecordRef, SeedClient, TestNetwork, basicSeed } from '@atproto/dev-env'
4
+ import type { DidString } from '@atproto/syntax'
4
5
  import {
5
6
  forSnapshot,
6
7
  paginateAll,
@@ -14,9 +15,9 @@ describe('list feed views', () => {
14
15
  let sc: SeedClient
15
16
 
16
17
  // account dids, for convenience
17
- let alice: string
18
- let bob: string
19
- let carol: string
18
+ let alice: DidString
19
+ let bob: DidString
20
+ let carol: DidString
20
21
 
21
22
  let listRef: RecordRef
22
23
 
@@ -52,7 +53,9 @@ describe('list feed views', () => {
52
53
 
53
54
  // all posts are from alice or bob
54
55
  expect(
55
- res.data.feed.every((row) => [alice, bob].includes(row.post.author.did)),
56
+ res.data.feed.every((row) =>
57
+ [alice, bob].includes(row.post.author.did as DidString),
58
+ ),
56
59
  ).toBeTruthy()
57
60
  })
58
61
 
@@ -1,6 +1,7 @@
1
1
  import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'vitest'
2
2
  import { AtUri, AtpAgent, ids } from '@atproto/api'
3
3
  import { RecordRef, SeedClient, TestNetwork, basicSeed } from '@atproto/dev-env'
4
+ import type { DidString } from '@atproto/syntax'
4
5
  import { forSnapshot } from '../_util.js'
5
6
 
6
7
  describe('bsky views with mutes from mute lists', () => {
@@ -9,10 +10,10 @@ describe('bsky views with mutes from mute lists', () => {
9
10
  let pdsAgent: AtpAgent
10
11
  let sc: SeedClient
11
12
 
12
- let alice: string
13
- let bob: string
14
- let carol: string
15
- let dan: string
13
+ let alice: DidString
14
+ let bob: DidString
15
+ let carol: DidString
16
+ let dan: DidString
16
17
 
17
18
  beforeAll(async () => {
18
19
  network = await TestNetwork.create({
@@ -132,7 +133,9 @@ describe('bsky views with mutes from mute lists', () => {
132
133
  },
133
134
  )
134
135
  expect(
135
- res.data.feed.some((post) => [bob, carol].includes(post.post.author.did)),
136
+ res.data.feed.some((post) =>
137
+ [bob, carol].includes(post.post.author.did as DidString),
138
+ ),
136
139
  ).toBe(false)
137
140
  })
138
141
 
@@ -144,7 +147,9 @@ describe('bsky views with mutes from mute lists', () => {
144
147
  },
145
148
  )
146
149
  expect(
147
- res.data.feed.some((post) => [bob, carol].includes(post.post.author.did)),
150
+ res.data.feed.some((post) =>
151
+ [bob, carol].includes(post.post.author.did as DidString),
152
+ ),
148
153
  ).toBe(false)
149
154
  })
150
155
 
@@ -163,7 +168,9 @@ describe('bsky views with mutes from mute lists', () => {
163
168
  },
164
169
  )
165
170
  expect(
166
- res.data.feed.some((post) => [bob, carol].includes(post.post.author.did)),
171
+ res.data.feed.some((post) =>
172
+ [bob, carol].includes(post.post.author.did as DidString),
173
+ ),
167
174
  ).toBe(false)
168
175
  })
169
176
 
@@ -216,7 +223,7 @@ describe('bsky views with mutes from mute lists', () => {
216
223
  )
217
224
  expect(
218
225
  res.data.notifications.some((notif) =>
219
- [bob, carol].includes(notif.author.did),
226
+ [bob, carol].includes(notif.author.did as DidString),
220
227
  ),
221
228
  ).toBeFalsy()
222
229
  })
@@ -238,7 +245,7 @@ describe('bsky views with mutes from mute lists', () => {
238
245
  },
239
246
  )
240
247
  for (const actor of res.data.actors) {
241
- if ([bob, carol].includes(actor.did)) {
248
+ if ([bob, carol].includes(actor.did as DidString)) {
242
249
  expect(actor.viewer?.muted).toBe(true)
243
250
  expect(actor.viewer?.mutedByList?.uri).toEqual(listUri)
244
251
  } else {
@@ -468,7 +475,9 @@ describe('bsky views with mutes from mute lists', () => {
468
475
  },
469
476
  )
470
477
  expect(
471
- res.data.feed.some((post) => [bob, carol].includes(post.post.author.did)),
478
+ res.data.feed.some((post) =>
479
+ [bob, carol].includes(post.post.author.did as DidString),
480
+ ),
472
481
  ).toBeTruthy()
473
482
  })
474
483
 
@@ -490,7 +499,9 @@ describe('bsky views with mutes from mute lists', () => {
490
499
  },
491
500
  )
492
501
  expect(
493
- res.data.feed.some((post) => [bob, carol].includes(post.post.author.did)),
502
+ res.data.feed.some((post) =>
503
+ [bob, carol].includes(post.post.author.did as DidString),
504
+ ),
494
505
  ).toBeTruthy()
495
506
  })
496
507
  })
@@ -6,18 +6,23 @@ import {
6
6
  basicSeed,
7
7
  usersBulkSeed,
8
8
  } from '@atproto/dev-env'
9
+ import type {
10
+ AtIdentifierString,
11
+ DidString,
12
+ HandleString,
13
+ } from '@atproto/syntax'
9
14
  import { forSnapshot, paginateAll } from '../_util.js'
10
15
 
11
16
  describe('mute views', () => {
12
17
  let network: TestNetwork
13
18
  let agent: AtpAgent
14
19
  let sc: SeedClient
15
- let alice: string
16
- let bob: string
17
- let carol: string
18
- let dan: string
20
+ let alice: DidString
21
+ let bob: DidString
22
+ let carol: DidString
23
+ let dan: DidString
19
24
 
20
- let mutes: string[]
25
+ let mutes: AtIdentifierString[]
21
26
 
22
27
  beforeAll(async () => {
23
28
  network = await TestNetwork.create({
@@ -87,7 +92,9 @@ describe('mute views', () => {
87
92
  },
88
93
  )
89
94
  expect(
90
- res.data.feed.some((post) => [bob, carol].includes(post.post.author.did)),
95
+ res.data.feed.some((post) =>
96
+ [bob, carol].includes(post.post.author.did as DidString),
97
+ ),
91
98
  ).toBe(false)
92
99
  })
93
100
 
@@ -102,7 +109,9 @@ describe('mute views', () => {
102
109
  },
103
110
  )
104
111
  expect(
105
- res.data.feed.some((post) => [bob, carol].includes(post.post.author.did)),
112
+ res.data.feed.some((post) =>
113
+ [bob, carol].includes(post.post.author.did as DidString),
114
+ ),
106
115
  ).toBe(false)
107
116
  })
108
117
 
@@ -121,7 +130,9 @@ describe('mute views', () => {
121
130
  },
122
131
  )
123
132
  expect(
124
- res.data.feed.some((post) => [bob, carol].includes(post.post.author.did)),
133
+ res.data.feed.some((post) =>
134
+ [bob, carol].includes(post.post.author.did as DidString),
135
+ ),
125
136
  ).toBe(false)
126
137
  })
127
138
 
@@ -167,7 +178,7 @@ describe('mute views', () => {
167
178
  )
168
179
  expect(
169
180
  res.data.notifications.some((notif) =>
170
- [bob, carol].includes(notif.author.did),
181
+ [bob, carol].includes(notif.author.did as DidString),
171
182
  ),
172
183
  ).toBeFalsy()
173
184
  })
@@ -191,7 +202,10 @@ describe('mute views', () => {
191
202
  },
192
203
  )
193
204
  for (const actor of res.data.actors) {
194
- if (mutes.includes(actor.did) || mutes.includes(actor.handle)) {
205
+ if (
206
+ mutes.includes(actor.did as DidString) ||
207
+ mutes.includes(actor.handle as HandleString)
208
+ ) {
195
209
  expect(actor.viewer?.muted).toBe(true)
196
210
  } else {
197
211
  expect(actor.viewer?.muted).toBe(false)
@@ -23,6 +23,7 @@ import {
23
23
  basicSeed,
24
24
  seedThreadV2,
25
25
  } from '@atproto/dev-env'
26
+ import type { DidString } from '@atproto/syntax'
26
27
  import { delayCursor } from '../../src/api/app/bsky/notification/listNotifications.js'
27
28
  import { Namespaces } from '../../src/stash.js'
28
29
  import { forSnapshot, paginateAll } from '../_util.js'
@@ -38,15 +39,15 @@ describe('notification views', () => {
38
39
  let sc: SeedClient
39
40
 
40
41
  // account dids, for convenience
41
- let alice: string
42
- let bob: string
43
- let carol: string
44
- let dan: string
45
- let eve: string
46
- let fred: string
47
- let greg: string
48
- let han: string
49
- let blocked: string
42
+ let alice: DidString
43
+ let bob: DidString
44
+ let carol: DidString
45
+ let dan: DidString
46
+ let eve: DidString
47
+ let fred: DidString
48
+ let greg: DidString
49
+ let han: DidString
50
+ let blocked: DidString
50
51
 
51
52
  beforeAll(async () => {
52
53
  network = await TestNetwork.create({
@@ -853,7 +854,7 @@ describe('notification views', () => {
853
854
  let delayNetwork: TestNetwork
854
855
  let delayAgent: AtpAgent
855
856
  let delaySc: SeedClient
856
- let delayAlice: string
857
+ let delayAlice: DidString
857
858
 
858
859
  beforeAll(async () => {
859
860
  delayNetwork = await TestNetwork.create({
@@ -1252,7 +1253,7 @@ describe('notification views', () => {
1252
1253
  return profiles.sort((a, b) => (a.handle > b.handle ? 1 : -1))
1253
1254
  }
1254
1255
 
1255
- const declare = async (actor: string, value: string) => {
1256
+ const declare = async (actor: DidString, value: string) => {
1256
1257
  await pdsAgent.com.atproto.repo.createRecord(
1257
1258
  {
1258
1259
  repo: actor,
@@ -1267,8 +1268,8 @@ describe('notification views', () => {
1267
1268
  }
1268
1269
 
1269
1270
  const put = async (
1270
- actor: string,
1271
- subject: string,
1271
+ actor: DidString,
1272
+ subject: DidString,
1272
1273
  val: AppBskyNotificationDefs.ActivitySubscription,
1273
1274
  ) =>
1274
1275
  agent.app.bsky.notification.putActivitySubscription(
@@ -1285,7 +1286,7 @@ describe('notification views', () => {
1285
1286
  )
1286
1287
 
1287
1288
  const list = async (
1288
- actor: string,
1289
+ actor: DidString,
1289
1290
  params?: AppBskyNotificationListActivitySubscriptions.QueryParams,
1290
1291
  ) =>
1291
1292
  agent.app.bsky.notification.listActivitySubscriptions(params ?? {}, {
@@ -1,6 +1,7 @@
1
1
  import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'vitest'
2
2
  import { AppBskyFeedSearchPosts, AtpAgent, ids } from '@atproto/api'
3
3
  import { SeedClient, TestNetwork, basicSeed } from '@atproto/dev-env'
4
+ import type { DidString } from '@atproto/syntax'
4
5
  import { DatabaseSchema } from '../../src/index.js'
5
6
 
6
7
  const TAG_HIDE = 'hide'
@@ -17,9 +18,9 @@ describe('appview search', () => {
17
18
  let nonTaggedResults: string[]
18
19
 
19
20
  // account dids, for convenience
20
- let alice: string
21
- let bob: string
22
- let carol: string
21
+ let alice: DidString
22
+ let bob: DidString
23
+ let carol: DidString
23
24
 
24
25
  beforeAll(async () => {
25
26
  network = await TestNetwork.create({