Nullable ratelimit calcKey ()

* fix codegen

* re-codegen

* changeset
This commit is contained in:
Daniel Holmgren 2024-12-19 17:28:52 -06:00 committed by GitHub
parent 85a437800d
commit 672243a9ea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 13 additions and 8 deletions
.changeset
packages
bsky/src/lexicon
lex-cli/src/codegen
ozone/src/lexicon
pds/src/lexicon

@ -0,0 +1,5 @@
---
"@atproto/lex-cli": patch
---
Allow ratelimit calcKey to return null

@ -2177,13 +2177,13 @@ export class ChatBskyModerationNS {
type SharedRateLimitOpts<T> = {
name: string
calcKey?: (ctx: T) => string
calcKey?: (ctx: T) => string | null
calcPoints?: (ctx: T) => number
}
type RouteRateLimitOpts<T> = {
durationMs: number
points: number
calcKey?: (ctx: T) => string
calcKey?: (ctx: T) => string | null
calcPoints?: (ctx: T) => number
}
type HandlerOpts = { blobLimit?: number }

@ -180,7 +180,7 @@ const indexTs = (
typeParameters: [{ name: 'T' }],
type: `{
name: string
calcKey?: (ctx: T) => string
calcKey?: (ctx: T) => string | null
calcPoints?: (ctx: T) => number
}`,
})
@ -191,7 +191,7 @@ const indexTs = (
type: `{
durationMs: number
points: number
calcKey?: (ctx: T) => string
calcKey?: (ctx: T) => string | null
calcPoints?: (ctx: T) => number
}`,
})

@ -2638,13 +2638,13 @@ export class ToolsOzoneTeamNS {
type SharedRateLimitOpts<T> = {
name: string
calcKey?: (ctx: T) => string
calcKey?: (ctx: T) => string | null
calcPoints?: (ctx: T) => number
}
type RouteRateLimitOpts<T> = {
durationMs: number
points: number
calcKey?: (ctx: T) => string
calcKey?: (ctx: T) => string | null
calcPoints?: (ctx: T) => number
}
type HandlerOpts = { blobLimit?: number }

@ -2638,13 +2638,13 @@ export class ToolsOzoneTeamNS {
type SharedRateLimitOpts<T> = {
name: string
calcKey?: (ctx: T) => string
calcKey?: (ctx: T) => string | null
calcPoints?: (ctx: T) => number
}
type RouteRateLimitOpts<T> = {
durationMs: number
points: number
calcKey?: (ctx: T) => string
calcKey?: (ctx: T) => string | null
calcPoints?: (ctx: T) => number
}
type HandlerOpts = { blobLimit?: number }