@atproto/pds 0.4.59 → 0.4.60

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/dist/api/app/bsky/actor/getProfile.d.ts.map +1 -1
  3. package/dist/api/app/bsky/actor/getProfile.js +2 -9
  4. package/dist/api/app/bsky/actor/getProfile.js.map +1 -1
  5. package/dist/api/app/bsky/actor/getProfiles.d.ts.map +1 -1
  6. package/dist/api/app/bsky/actor/getProfiles.js +2 -6
  7. package/dist/api/app/bsky/actor/getProfiles.js.map +1 -1
  8. package/dist/api/app/bsky/feed/getActorLikes.d.ts.map +1 -1
  9. package/dist/api/app/bsky/feed/getActorLikes.js +2 -9
  10. package/dist/api/app/bsky/feed/getActorLikes.js.map +1 -1
  11. package/dist/api/app/bsky/feed/getAuthorFeed.d.ts.map +1 -1
  12. package/dist/api/app/bsky/feed/getAuthorFeed.js +2 -9
  13. package/dist/api/app/bsky/feed/getAuthorFeed.js.map +1 -1
  14. package/dist/api/app/bsky/feed/getFeed.d.ts.map +1 -1
  15. package/dist/api/app/bsky/feed/getFeed.js +2 -1
  16. package/dist/api/app/bsky/feed/getFeed.js.map +1 -1
  17. package/dist/api/app/bsky/feed/getPostThread.d.ts.map +1 -1
  18. package/dist/api/app/bsky/feed/getPostThread.js +12 -14
  19. package/dist/api/app/bsky/feed/getPostThread.js.map +1 -1
  20. package/dist/api/app/bsky/feed/getTimeline.d.ts.map +1 -1
  21. package/dist/api/app/bsky/feed/getTimeline.js +2 -6
  22. package/dist/api/app/bsky/feed/getTimeline.js.map +1 -1
  23. package/dist/api/com/atproto/repo/getRecord.js +1 -1
  24. package/dist/api/com/atproto/repo/getRecord.js.map +1 -1
  25. package/dist/api/com/atproto/server/requestPasswordReset.js +1 -1
  26. package/dist/api/com/atproto/server/requestPasswordReset.js.map +1 -1
  27. package/dist/config/config.d.ts +9 -0
  28. package/dist/config/config.d.ts.map +1 -1
  29. package/dist/config/config.js +10 -1
  30. package/dist/config/config.js.map +1 -1
  31. package/dist/config/env.d.ts +6 -1
  32. package/dist/config/env.d.ts.map +1 -1
  33. package/dist/config/env.js +8 -1
  34. package/dist/config/env.js.map +1 -1
  35. package/dist/context.d.ts +6 -2
  36. package/dist/context.d.ts.map +1 -1
  37. package/dist/context.js +55 -11
  38. package/dist/context.js.map +1 -1
  39. package/dist/index.d.ts.map +1 -1
  40. package/dist/index.js +1 -0
  41. package/dist/index.js.map +1 -1
  42. package/dist/lexicon/lexicons.d.ts +33 -0
  43. package/dist/lexicon/lexicons.d.ts.map +1 -1
  44. package/dist/lexicon/lexicons.js +42 -3
  45. package/dist/lexicon/lexicons.js.map +1 -1
  46. package/dist/lexicon/types/app/bsky/actor/defs.d.ts +2 -0
  47. package/dist/lexicon/types/app/bsky/actor/defs.d.ts.map +1 -1
  48. package/dist/lexicon/types/app/bsky/actor/defs.js.map +1 -1
  49. package/dist/lexicon/types/app/bsky/actor/profile.d.ts +1 -0
  50. package/dist/lexicon/types/app/bsky/actor/profile.d.ts.map +1 -1
  51. package/dist/lexicon/types/app/bsky/actor/profile.js.map +1 -1
  52. package/dist/lexicon/types/app/bsky/feed/defs.d.ts +13 -2
  53. package/dist/lexicon/types/app/bsky/feed/defs.d.ts.map +1 -1
  54. package/dist/lexicon/types/app/bsky/feed/defs.js +21 -1
  55. package/dist/lexicon/types/app/bsky/feed/defs.js.map +1 -1
  56. package/dist/lexicon/types/app/bsky/feed/getAuthorFeed.d.ts +1 -0
  57. package/dist/lexicon/types/app/bsky/feed/getAuthorFeed.d.ts.map +1 -1
  58. package/dist/lexicon/types/app/bsky/graph/getSuggestedFollowsByActor.d.ts +2 -0
  59. package/dist/lexicon/types/app/bsky/graph/getSuggestedFollowsByActor.d.ts.map +1 -1
  60. package/dist/lexicon/types/app/bsky/unspecced/getSuggestionsSkeleton.d.ts +2 -0
  61. package/dist/lexicon/types/app/bsky/unspecced/getSuggestionsSkeleton.d.ts.map +1 -1
  62. package/dist/mailer/index.d.ts +1 -1
  63. package/dist/mailer/index.d.ts.map +1 -1
  64. package/dist/mailer/index.js.map +1 -1
  65. package/dist/mailer/templates/confirm-email.js +1 -1
  66. package/dist/mailer/templates/confirm-email.js.map +2 -2
  67. package/dist/mailer/templates/delete-account.js +1 -1
  68. package/dist/mailer/templates/delete-account.js.map +2 -2
  69. package/dist/mailer/templates/plc-operation.js +1 -1
  70. package/dist/mailer/templates/plc-operation.js.map +2 -2
  71. package/dist/mailer/templates/reset-password.js +1 -1
  72. package/dist/mailer/templates/reset-password.js.map +2 -2
  73. package/dist/mailer/templates/update-email.js +1 -1
  74. package/dist/mailer/templates/update-email.js.map +2 -2
  75. package/dist/pipethrough.d.ts +26 -26
  76. package/dist/pipethrough.d.ts.map +1 -1
  77. package/dist/pipethrough.js +328 -228
  78. package/dist/pipethrough.js.map +1 -1
  79. package/dist/read-after-write/util.d.ts +13 -5
  80. package/dist/read-after-write/util.d.ts.map +1 -1
  81. package/dist/read-after-write/util.js +37 -22
  82. package/dist/read-after-write/util.js.map +1 -1
  83. package/package.json +16 -15
  84. package/src/api/app/bsky/actor/getProfile.ts +3 -17
  85. package/src/api/app/bsky/actor/getProfiles.ts +3 -15
  86. package/src/api/app/bsky/feed/getActorLikes.ts +3 -19
  87. package/src/api/app/bsky/feed/getAuthorFeed.ts +3 -17
  88. package/src/api/app/bsky/feed/getFeed.ts +3 -1
  89. package/src/api/app/bsky/feed/getPostThread.ts +16 -23
  90. package/src/api/app/bsky/feed/getTimeline.ts +3 -14
  91. package/src/api/com/atproto/repo/getRecord.ts +1 -1
  92. package/src/api/com/atproto/server/requestPasswordReset.ts +1 -1
  93. package/src/config/config.ts +21 -1
  94. package/src/config/env.ts +20 -2
  95. package/src/context.ts +62 -17
  96. package/src/index.ts +1 -0
  97. package/src/lexicon/lexicons.ts +44 -3
  98. package/src/lexicon/types/app/bsky/actor/defs.ts +2 -0
  99. package/src/lexicon/types/app/bsky/actor/profile.ts +1 -0
  100. package/src/lexicon/types/app/bsky/feed/defs.ts +38 -2
  101. package/src/lexicon/types/app/bsky/feed/getAuthorFeed.ts +1 -0
  102. package/src/lexicon/types/app/bsky/graph/getSuggestedFollowsByActor.ts +2 -0
  103. package/src/lexicon/types/app/bsky/unspecced/getSuggestionsSkeleton.ts +2 -0
  104. package/src/mailer/index.ts +1 -1
  105. package/src/mailer/templates/confirm-email.hbs +106 -336
  106. package/src/mailer/templates/delete-account.hbs +110 -346
  107. package/src/mailer/templates/plc-operation.hbs +107 -338
  108. package/src/mailer/templates/reset-password.d.ts +1 -1
  109. package/src/mailer/templates/reset-password.hbs +108 -344
  110. package/src/mailer/templates/update-email.hbs +107 -337
  111. package/src/pipethrough.ts +489 -233
  112. package/src/read-after-write/util.ts +58 -32
  113. package/tests/account-deletion.test.ts +1 -1
  114. package/tests/account.test.ts +2 -2
  115. package/tests/email-confirmation.test.ts +2 -2
  116. package/tests/plc-operations.test.ts +1 -1
  117. package/tests/proxied/proxy-catchall.test.ts +255 -0
  118. package/tests/proxied/proxy-header.test.ts +31 -1
package/src/context.ts CHANGED
@@ -1,23 +1,28 @@
1
1
  import assert from 'node:assert'
2
+ import * as undici from 'undici'
2
3
  import * as nodemailer from 'nodemailer'
3
4
  import { Redis } from 'ioredis'
4
5
  import * as plc from '@did-plc/lib'
6
+ import {
7
+ Fetch,
8
+ isUnicastIp,
9
+ loggedFetch,
10
+ safeFetchWrap,
11
+ unicastLookup,
12
+ } from '@atproto-labs/fetch-node'
5
13
  import * as crypto from '@atproto/crypto'
6
14
  import { IdResolver } from '@atproto/identity'
7
15
  import { AtpAgent } from '@atproto/api'
8
16
  import { KmsKeypair, S3BlobStore } from '@atproto/aws'
17
+ import { JoseKey, OAuthVerifier } from '@atproto/oauth-provider'
18
+ import { BlobStore } from '@atproto/repo'
9
19
  import {
10
20
  RateLimiter,
11
21
  RateLimiterCreator,
12
22
  RateLimiterOpts,
13
23
  createServiceAuthHeaders,
24
+ createServiceJwt,
14
25
  } from '@atproto/xrpc-server'
15
- import {
16
- JoseKey,
17
- Fetch,
18
- safeFetchWrap,
19
- OAuthVerifier,
20
- } from '@atproto/oauth-provider'
21
26
 
22
27
  import { ServerConfig, ServerSecrets } from './config'
23
28
  import { PdsOAuthProvider } from './oauth/provider'
@@ -29,7 +34,6 @@ import {
29
34
  import { fetchLogger } from './logger'
30
35
  import { ServerMailer } from './mailer'
31
36
  import { ModerationMailer } from './mailer/moderation'
32
- import { BlobStore } from '@atproto/repo'
33
37
  import { AccountManager } from './account-manager'
34
38
  import { Sequencer } from './sequencer'
35
39
  import { BackgroundQueue } from './background'
@@ -59,6 +63,7 @@ export type AppContextOptions = {
59
63
  moderationAgent?: AtpAgent
60
64
  reportingAgent?: AtpAgent
61
65
  entrywayAgent?: AtpAgent
66
+ proxyAgent: undici.Agent
62
67
  safeFetch: Fetch
63
68
  authProvider?: PdsOAuthProvider
64
69
  authVerifier: AuthVerifier
@@ -85,6 +90,7 @@ export class AppContext {
85
90
  public moderationAgent: AtpAgent | undefined
86
91
  public reportingAgent: AtpAgent | undefined
87
92
  public entrywayAgent: AtpAgent | undefined
93
+ public proxyAgent: undici.Agent
88
94
  public safeFetch: Fetch
89
95
  public authVerifier: AuthVerifier
90
96
  public authProvider?: PdsOAuthProvider
@@ -110,6 +116,7 @@ export class AppContext {
110
116
  this.moderationAgent = opts.moderationAgent
111
117
  this.reportingAgent = opts.reportingAgent
112
118
  this.entrywayAgent = opts.entrywayAgent
119
+ this.proxyAgent = opts.proxyAgent
113
120
  this.safeFetch = opts.safeFetch
114
121
  this.authVerifier = opts.authVerifier
115
122
  this.authProvider = opts.authProvider
@@ -256,20 +263,47 @@ export class AppContext {
256
263
  appviewCdnUrlPattern: cfg.bskyAppView?.cdnUrlPattern,
257
264
  })
258
265
 
266
+ // An agent for performing HTTP requests based on user provided URLs.
267
+ const proxyAgent = new undici.Agent({
268
+ allowH2: cfg.proxy.allowHTTP2, // This is experimental
269
+ headersTimeout: cfg.proxy.headersTimeout,
270
+ maxResponseSize: cfg.proxy.maxResponseSize,
271
+ bodyTimeout: cfg.proxy.bodyTimeout,
272
+ factory: cfg.proxy.disableSsrfProtection
273
+ ? undefined
274
+ : (origin, opts) => {
275
+ const { protocol, hostname } =
276
+ origin instanceof URL ? origin : new URL(origin)
277
+ if (protocol !== 'https:') {
278
+ throw new Error(`Forbidden protocol "${protocol}"`)
279
+ }
280
+ if (isUnicastIp(hostname) === false) {
281
+ throw new Error('Hostname resolved to non-unicast address')
282
+ }
283
+ return new undici.Pool(origin, opts)
284
+ },
285
+ connect: {
286
+ lookup: cfg.proxy.disableSsrfProtection ? undefined : unicastLookup,
287
+ },
288
+ })
289
+
259
290
  // A fetch() function that protects against SSRF attacks, large responses &
260
291
  // known bad domains. This function can safely be used to fetch user
261
292
  // provided URLs (unless "disableSsrfProtection" is true, of course).
262
- const safeFetch = safeFetchWrap({
263
- allowHttp: cfg.fetch.disableSsrfProtection,
264
- responseMaxSize: 512 * 1024, // 512kB
265
- ssrfProtection: !cfg.fetch.disableSsrfProtection,
266
- fetch: async (input, init) => {
267
- const request = input instanceof Request ? input : null
268
- const method = init?.method ?? request?.method ?? 'GET'
269
- const uri = request?.url ?? String(input)
270
- fetchLogger.debug({ method, uri }, 'fetch')
271
- return globalThis.fetch(input, init)
293
+ const safeFetch = loggedFetch({
294
+ fetch: safeFetchWrap({
295
+ // Using globalThis.fetch allows safeFetchWrap to use keep-alive. See
296
+ // unicastFetchWrap().
297
+ fetch: globalThis.fetch,
298
+ allowIpHost: false,
299
+ responseMaxSize: cfg.fetch.maxResponseSize,
300
+ ssrfProtection: !cfg.fetch.disableSsrfProtection,
301
+ }),
302
+ logRequest: ({ method, url }) => {
303
+ fetchLogger.debug({ method, uri: url }, 'fetch')
272
304
  },
305
+ logResponse: false,
306
+ logError: false,
273
307
  })
274
308
 
275
309
  const authProvider = cfg.oauth.provider
@@ -333,6 +367,7 @@ export class AppContext {
333
367
  moderationAgent,
334
368
  reportingAgent,
335
369
  entrywayAgent,
370
+ proxyAgent,
336
371
  safeFetch,
337
372
  authVerifier,
338
373
  authProvider,
@@ -356,6 +391,16 @@ export class AppContext {
356
391
  keypair,
357
392
  })
358
393
  }
394
+
395
+ async serviceAuthJwt(did: string, aud: string, lxm: string) {
396
+ const keypair = await this.actorStore.keypair(did)
397
+ return createServiceJwt({
398
+ iss: did,
399
+ aud,
400
+ lxm,
401
+ keypair,
402
+ })
403
+ }
359
404
  }
360
405
 
361
406
  export default AppContext
package/src/index.ts CHANGED
@@ -127,6 +127,7 @@ export class PDS {
127
127
  await this.ctx.backgroundQueue.destroy()
128
128
  await this.ctx.accountManager.close()
129
129
  await this.ctx.redisScratch?.quit()
130
+ await this.ctx.proxyAgent.destroy()
130
131
  clearInterval(this.dbStatsInterval)
131
132
  clearInterval(this.sequencerStatsInterval)
132
133
  }
@@ -4190,6 +4190,10 @@ export const schemaDict = {
4190
4190
  ref: 'lex:com.atproto.label.defs#label',
4191
4191
  },
4192
4192
  },
4193
+ pinnedPost: {
4194
+ type: 'ref',
4195
+ ref: 'lex:com.atproto.repo.strongRef',
4196
+ },
4193
4197
  },
4194
4198
  },
4195
4199
  profileAssociated: {
@@ -4812,6 +4816,10 @@ export const schemaDict = {
4812
4816
  type: 'ref',
4813
4817
  ref: 'lex:com.atproto.repo.strongRef',
4814
4818
  },
4819
+ pinnedPost: {
4820
+ type: 'ref',
4821
+ ref: 'lex:com.atproto.repo.strongRef',
4822
+ },
4815
4823
  createdAt: {
4816
4824
  type: 'string',
4817
4825
  format: 'datetime',
@@ -5468,6 +5476,9 @@ export const schemaDict = {
5468
5476
  embeddingDisabled: {
5469
5477
  type: 'boolean',
5470
5478
  },
5479
+ pinned: {
5480
+ type: 'boolean',
5481
+ },
5471
5482
  },
5472
5483
  },
5473
5484
  feedViewPost: {
@@ -5484,7 +5495,10 @@ export const schemaDict = {
5484
5495
  },
5485
5496
  reason: {
5486
5497
  type: 'union',
5487
- refs: ['lex:app.bsky.feed.defs#reasonRepost'],
5498
+ refs: [
5499
+ 'lex:app.bsky.feed.defs#reasonRepost',
5500
+ 'lex:app.bsky.feed.defs#reasonPin',
5501
+ ],
5488
5502
  },
5489
5503
  feedContext: {
5490
5504
  type: 'string',
@@ -5536,6 +5550,10 @@ export const schemaDict = {
5536
5550
  },
5537
5551
  },
5538
5552
  },
5553
+ reasonPin: {
5554
+ type: 'object',
5555
+ properties: {},
5556
+ },
5539
5557
  threadViewPost: {
5540
5558
  type: 'object',
5541
5559
  required: ['post'],
@@ -5693,7 +5711,10 @@ export const schemaDict = {
5693
5711
  },
5694
5712
  reason: {
5695
5713
  type: 'union',
5696
- refs: ['lex:app.bsky.feed.defs#skeletonReasonRepost'],
5714
+ refs: [
5715
+ 'lex:app.bsky.feed.defs#skeletonReasonRepost',
5716
+ 'lex:app.bsky.feed.defs#skeletonReasonPin',
5717
+ ],
5697
5718
  },
5698
5719
  feedContext: {
5699
5720
  type: 'string',
@@ -5713,6 +5734,10 @@ export const schemaDict = {
5713
5734
  },
5714
5735
  },
5715
5736
  },
5737
+ skeletonReasonPin: {
5738
+ type: 'object',
5739
+ properties: {},
5740
+ },
5716
5741
  threadgateView: {
5717
5742
  type: 'object',
5718
5743
  properties: {
@@ -6078,6 +6103,10 @@ export const schemaDict = {
6078
6103
  ],
6079
6104
  default: 'posts_with_replies',
6080
6105
  },
6106
+ includePins: {
6107
+ type: 'boolean',
6108
+ default: false,
6109
+ },
6081
6110
  },
6082
6111
  },
6083
6112
  output: {
@@ -7162,7 +7191,7 @@ export const schemaDict = {
7162
7191
  type: 'record',
7163
7192
  key: 'tid',
7164
7193
  description:
7165
- "Record defining interaction gating rules for a thread (aka, reply controls). The record key (rkey) of the threadgate record must match the record key of the thread's root post, and that record must be in the same repository..",
7194
+ "Record defining interaction gating rules for a thread (aka, reply controls). The record key (rkey) of the threadgate record must match the record key of the thread's root post, and that record must be in the same repository.",
7166
7195
  record: {
7167
7196
  type: 'object',
7168
7197
  required: ['post', 'createdAt'],
@@ -8236,6 +8265,12 @@ export const schemaDict = {
8236
8265
  ref: 'lex:app.bsky.actor.defs#profileView',
8237
8266
  },
8238
8267
  },
8268
+ isFallback: {
8269
+ type: 'boolean',
8270
+ description:
8271
+ 'If true, response has fallen-back to generic results, and is not scoped using relativeToDid',
8272
+ default: false,
8273
+ },
8239
8274
  },
8240
8275
  },
8241
8276
  },
@@ -9192,6 +9227,12 @@ export const schemaDict = {
9192
9227
  ref: 'lex:app.bsky.unspecced.defs#skeletonSearchActor',
9193
9228
  },
9194
9229
  },
9230
+ relativeToDid: {
9231
+ type: 'string',
9232
+ format: 'did',
9233
+ description:
9234
+ 'DID of the account these suggestions are relative to. If this is returned undefined, suggestions are based on the viewer.',
9235
+ },
9195
9236
  },
9196
9237
  },
9197
9238
  },
@@ -7,6 +7,7 @@ import { isObj, hasProp } from '../../../../util'
7
7
  import { CID } from 'multiformats/cid'
8
8
  import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs'
9
9
  import * as AppBskyGraphDefs from '../graph/defs'
10
+ import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef'
10
11
 
11
12
  export interface ProfileViewBasic {
12
13
  did: string
@@ -74,6 +75,7 @@ export interface ProfileViewDetailed {
74
75
  createdAt?: string
75
76
  viewer?: ViewerState
76
77
  labels?: ComAtprotoLabelDefs.Label[]
78
+ pinnedPost?: ComAtprotoRepoStrongRef.Main
77
79
  [k: string]: unknown
78
80
  }
79
81
 
@@ -20,6 +20,7 @@ export interface Record {
20
20
  | ComAtprotoLabelDefs.SelfLabels
21
21
  | { $type: string; [k: string]: unknown }
22
22
  joinedViaStarterPack?: ComAtprotoRepoStrongRef.Main
23
+ pinnedPost?: ComAtprotoRepoStrongRef.Main
23
24
  createdAt?: string
24
25
  [k: string]: unknown
25
26
  }
@@ -55,6 +55,7 @@ export interface ViewerState {
55
55
  threadMuted?: boolean
56
56
  replyDisabled?: boolean
57
57
  embeddingDisabled?: boolean
58
+ pinned?: boolean
58
59
  [k: string]: unknown
59
60
  }
60
61
 
@@ -73,7 +74,7 @@ export function validateViewerState(v: unknown): ValidationResult {
73
74
  export interface FeedViewPost {
74
75
  post: PostView
75
76
  reply?: ReplyRef
76
- reason?: ReasonRepost | { $type: string; [k: string]: unknown }
77
+ reason?: ReasonRepost | ReasonPin | { $type: string; [k: string]: unknown }
77
78
  /** Context provided by feed generator that may be passed back alongside interactions. */
78
79
  feedContext?: string
79
80
  [k: string]: unknown
@@ -134,6 +135,22 @@ export function validateReasonRepost(v: unknown): ValidationResult {
134
135
  return lexicons.validate('app.bsky.feed.defs#reasonRepost', v)
135
136
  }
136
137
 
138
+ export interface ReasonPin {
139
+ [k: string]: unknown
140
+ }
141
+
142
+ export function isReasonPin(v: unknown): v is ReasonPin {
143
+ return (
144
+ isObj(v) &&
145
+ hasProp(v, '$type') &&
146
+ v.$type === 'app.bsky.feed.defs#reasonPin'
147
+ )
148
+ }
149
+
150
+ export function validateReasonPin(v: unknown): ValidationResult {
151
+ return lexicons.validate('app.bsky.feed.defs#reasonPin', v)
152
+ }
153
+
137
154
  export interface ThreadViewPost {
138
155
  post: PostView
139
156
  parent?:
@@ -265,7 +282,10 @@ export function validateGeneratorViewerState(v: unknown): ValidationResult {
265
282
 
266
283
  export interface SkeletonFeedPost {
267
284
  post: string
268
- reason?: SkeletonReasonRepost | { $type: string; [k: string]: unknown }
285
+ reason?:
286
+ | SkeletonReasonRepost
287
+ | SkeletonReasonPin
288
+ | { $type: string; [k: string]: unknown }
269
289
  /** Context that will be passed through to client and may be passed to feed generator back alongside interactions. */
270
290
  feedContext?: string
271
291
  [k: string]: unknown
@@ -300,6 +320,22 @@ export function validateSkeletonReasonRepost(v: unknown): ValidationResult {
300
320
  return lexicons.validate('app.bsky.feed.defs#skeletonReasonRepost', v)
301
321
  }
302
322
 
323
+ export interface SkeletonReasonPin {
324
+ [k: string]: unknown
325
+ }
326
+
327
+ export function isSkeletonReasonPin(v: unknown): v is SkeletonReasonPin {
328
+ return (
329
+ isObj(v) &&
330
+ hasProp(v, '$type') &&
331
+ v.$type === 'app.bsky.feed.defs#skeletonReasonPin'
332
+ )
333
+ }
334
+
335
+ export function validateSkeletonReasonPin(v: unknown): ValidationResult {
336
+ return lexicons.validate('app.bsky.feed.defs#skeletonReasonPin', v)
337
+ }
338
+
303
339
  export interface ThreadgateView {
304
340
  uri?: string
305
341
  cid?: string
@@ -20,6 +20,7 @@ export interface QueryParams {
20
20
  | 'posts_with_media'
21
21
  | 'posts_and_author_threads'
22
22
  | (string & {})
23
+ includePins: boolean
23
24
  }
24
25
 
25
26
  export type InputSchema = undefined
@@ -17,6 +17,8 @@ export type InputSchema = undefined
17
17
 
18
18
  export interface OutputSchema {
19
19
  suggestions: AppBskyActorDefs.ProfileView[]
20
+ /** If true, response has fallen-back to generic results, and is not scoped using relativeToDid */
21
+ isFallback?: boolean
20
22
  [k: string]: unknown
21
23
  }
22
24
 
@@ -23,6 +23,8 @@ export type InputSchema = undefined
23
23
  export interface OutputSchema {
24
24
  cursor?: string
25
25
  actors: AppBskyUnspeccedDefs.SkeletonSearchActor[]
26
+ /** DID of the account these suggestions are relative to. If this is returned undefined, suggestions are based on the viewer. */
27
+ relativeToDid?: string
26
28
  [k: string]: unknown
27
29
  }
28
30
 
@@ -21,7 +21,7 @@ export class ServerMailer {
21
21
  }
22
22
 
23
23
  async sendResetPassword(
24
- params: { identifier: string; token: string },
24
+ params: { handle: string; token: string },
25
25
  mailOpts: Mail.Options,
26
26
  ) {
27
27
  return this.sendTemplate('resetPassword', params, {