feat: use json schema to get all announcements

This commit is contained in:
2025-12-23 14:22:44 -08:00
parent 5b99450b7c
commit 7dcb20f4e4
11 changed files with 415 additions and 134 deletions
+92 -34
View File
@@ -116,11 +116,11 @@ importers:
server:
dependencies:
'@anthropic-ai/sdk':
specifier: 0.56.0
version: 0.56.0
specifier: 0.71.2
version: 0.71.2(zod@3.25.76)
'@atproto/api':
specifier: 0.15.26
version: 0.15.26
specifier: 0.18.8
version: 0.18.8
'@fastify/cors':
specifier: 11.0.1
version: 11.0.1
@@ -137,8 +137,8 @@ importers:
specifier: 4.0.3
version: 4.0.3
twitter-api-v2:
specifier: 1.24.0
version: 1.24.0
specifier: 1.28.0
version: 1.28.0
devDependencies:
'@types/node':
specifier: 24.0.10
@@ -298,20 +298,35 @@ packages:
resolution: {integrity: sha512-SLCB8M8+VMg1cpCucnA1XWHGWqVSZtIWzmOdDOEu3eTFZMB+A0sGZ1ESO5MHDnqrNTXz3safMrWx9x4rMZSOqA==}
hasBin: true
'@atproto/api@0.15.26':
resolution: {integrity: sha512-AdXGjeCpLZiP9YMGi4YOdK1ayqkBhklmGfSG8UefqR6tTHth59PZvYs5KiwLnFhedt2Xljt3eUlhkn14Y48wEA==}
'@anthropic-ai/sdk@0.71.2':
resolution: {integrity: sha512-TGNDEUuEstk/DKu0/TflXAEt+p+p/WhTlFzEnoosvbaDU2LTjm42igSdlL0VijrKpWejtOKxX0b8A7uc+XiSAQ==}
hasBin: true
peerDependencies:
zod: ^3.25.0 || ^4.0.0
peerDependenciesMeta:
zod:
optional: true
'@atproto/common-web@0.4.2':
resolution: {integrity: sha512-vrXwGNoFGogodjQvJDxAeP3QbGtawgZute2ed1XdRO0wMixLk3qewtikZm06H259QDJVu6voKC5mubml+WgQUw==}
'@atproto/api@0.18.8':
resolution: {integrity: sha512-Qo3sGd1N5hdHTaEWUBgptvPkULt2SXnMcWRhveSyctSd/IQwTMyaIH6E62A1SU+8xBSN5QLpoUJNE7iSrYM2Zg==}
'@atproto/lexicon@0.4.12':
resolution: {integrity: sha512-fcEvEQ1GpQYF5igZ4IZjPWEoWVpsEF22L9RexxLS3ptfySXLflEyH384e7HITzO/73McDeaJx3lqHIuqn9ulnw==}
'@atproto/common-web@0.4.7':
resolution: {integrity: sha512-vjw2+81KPo2/SAbbARGn64Ln+6JTI0FTI4xk8if0ebBfDxFRmHb2oSN1y77hzNq/ybGHqA2mecfhS03pxC5+lg==}
'@atproto/syntax@0.4.0':
resolution: {integrity: sha512-b9y5ceHS8YKOfP3mdKmwAx5yVj9294UN7FG2XzP6V5aKUdFazEYRnR9m5n5ZQFKa3GNvz7de9guZCJ/sUTcOAA==}
'@atproto/lex-data@0.0.3':
resolution: {integrity: sha512-ivo1IpY/EX+RIpxPgCf4cPhQo5bfu4nrpa1vJCt8hCm9SfoonJkDFGa0n4SMw4JnXZoUcGcrJ46L+D8bH6GI2g==}
'@atproto/xrpc@0.7.1':
resolution: {integrity: sha512-ANHEzlskYlMEdH18m+Itp3a8d0pEJao2qoDybDoMupTnoeNkya4VKIaOgAi6ERQnqatBBZyn9asW+7rJmSt/8g==}
'@atproto/lex-json@0.0.3':
resolution: {integrity: sha512-ZVcY7XlRfdPYvQQ2WroKUepee0+NCovrSXgXURM3Xv+n5jflJCoczguROeRr8sN0xvT0ZbzMrDNHCUYKNnxcjw==}
'@atproto/lexicon@0.6.0':
resolution: {integrity: sha512-5veb8aD+J5M0qszLJ+73KSFsFrJBgAY/nM1TSAJvGY7fNc9ZAT+PSUlmIyrdye9YznAZ07yktalls/TwNV7cHQ==}
'@atproto/syntax@0.4.2':
resolution: {integrity: sha512-X9XSRPinBy/0VQ677j8VXlBsYSsUXaiqxWVpGGxJYsAhugdQRb0jqaVKJFtm6RskeNkV6y9xclSUi9UYG/COrA==}
'@atproto/xrpc@0.7.7':
resolution: {integrity: sha512-K1ZyO/BU8JNtXX5dmPp7b5UrkLMMqpsIa/Lrj5D3Su+j1Xwq1m6QJ2XJ1AgjEjkI1v4Muzm7klianLE6XGxtmA==}
'@babel/code-frame@7.27.1':
resolution: {integrity: sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==}
@@ -384,6 +399,10 @@ packages:
engines: {node: '>=6.0.0'}
hasBin: true
'@babel/runtime@7.28.4':
resolution: {integrity: sha512-Q/N6JNWvIvPnLDvjlE1OUBLPQHH6l3CltCEsHIujp45zQUSSh8K+gHnaEX45yAT1nyngnINhvWtzN+Nb9D8RAQ==}
engines: {node: '>=6.9.0'}
'@babel/template@7.27.2':
resolution: {integrity: sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==}
engines: {node: '>=6.9.0'}
@@ -3338,6 +3357,10 @@ packages:
json-schema-ref-resolver@2.0.1:
resolution: {integrity: sha512-HG0SIB9X4J8bwbxCbnd5FfPEbcXAJYTi1pBJeP/QPON+w8ovSME8iRG+ElHNxZNX2Qh6eYn1GdzJFS4cDFfx0Q==}
json-schema-to-ts@3.1.1:
resolution: {integrity: sha512-+DWg8jCJG2TEnpy7kOm/7/AxaYoaRbjVB4LFZLySZlWn8exGs3A4OLJR966cVvU26N7X9TWxl+Jsw7dzAqKT6g==}
engines: {node: '>=16'}
json-schema-traverse@0.4.1:
resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==}
@@ -4554,6 +4577,9 @@ packages:
resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==}
engines: {node: '>=0.6'}
ts-algebra@2.0.0:
resolution: {integrity: sha512-FPAhNPFMrkwz76P7cdjdmiShwMynZYN6SgOujD1urY4oNm80Ou9oMdmbR45LotcKOXoy7wSmHkRFE6Mxbrhefw==}
ts-api-utils@1.4.3:
resolution: {integrity: sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==}
engines: {node: '>=16'}
@@ -4622,8 +4648,8 @@ packages:
resolution: {integrity: sha512-kc8ZibdRcuWUG1pbYSBFWqmIjynlD8Lp7IB6U3vIzvOv9VG+6Sp8bzyeBWE3Oi8XV5KsQrznyRTBPvrf99E4mA==}
hasBin: true
twitter-api-v2@1.24.0:
resolution: {integrity: sha512-RDEiuNwnFirvf4c5f1sysgg0rfMQgekXgKt+/UdbNu+Bs5bJ1VbXkqKzdd2a2lPMlDVDbdGUoe2pOd4n25fFVQ==}
twitter-api-v2@1.28.0:
resolution: {integrity: sha512-VBmiAMylCEr94OChaHJ+0TBrOZNrduwWUe7QLoa/KdOdv1fNiToJ0xZGOrNKFd2B7jrAdAkfUW6yA5LuXYOYLQ==}
type-check@0.4.0:
resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==}
@@ -4691,6 +4717,9 @@ packages:
resolution: {integrity: sha512-gBLkYIlEnSp8pFbT64yFgGE6UIB9tAkhukC23PmMDCe5Nd+cRqKxSjw5y54MK2AZMgZfJWMaNE4nYUHgi1XEOw==}
engines: {node: '>=18.17'}
unicode-segmenter@0.14.4:
resolution: {integrity: sha512-pR5VCiCrLrKOL6FRW61jnk9+wyMtKKowq+jyFY9oc6uHbWKhDL4yVRiI4YZPksGMK72Pahh8m0cn/0JvbDDyJg==}
unique-filename@4.0.0:
resolution: {integrity: sha512-XSnEewXmQ+veP7xX2dS5Q4yZAvO40cBN2MWkJ7D/6sW4Dg6wYBNwM1Vrnz1FhH5AdeLIlUXRI9e28z1YZi71NQ==}
engines: {node: ^18.17.0 || >=20.5.0}
@@ -5179,37 +5208,55 @@ snapshots:
'@anthropic-ai/sdk@0.56.0': {}
'@atproto/api@0.15.26':
'@anthropic-ai/sdk@0.71.2(zod@3.25.76)':
dependencies:
'@atproto/common-web': 0.4.2
'@atproto/lexicon': 0.4.12
'@atproto/syntax': 0.4.0
'@atproto/xrpc': 0.7.1
json-schema-to-ts: 3.1.1
optionalDependencies:
zod: 3.25.76
'@atproto/api@0.18.8':
dependencies:
'@atproto/common-web': 0.4.7
'@atproto/lexicon': 0.6.0
'@atproto/syntax': 0.4.2
'@atproto/xrpc': 0.7.7
await-lock: 2.2.2
multiformats: 9.9.0
tlds: 1.259.0
zod: 3.25.76
'@atproto/common-web@0.4.2':
'@atproto/common-web@0.4.7':
dependencies:
graphemer: 1.4.0
multiformats: 9.9.0
uint8arrays: 3.0.0
'@atproto/lex-data': 0.0.3
'@atproto/lex-json': 0.0.3
zod: 3.25.76
'@atproto/lexicon@0.4.12':
'@atproto/lex-data@0.0.3':
dependencies:
'@atproto/common-web': 0.4.2
'@atproto/syntax': 0.4.0
'@atproto/syntax': 0.4.2
multiformats: 9.9.0
tslib: 2.8.1
uint8arrays: 3.0.0
unicode-segmenter: 0.14.4
'@atproto/lex-json@0.0.3':
dependencies:
'@atproto/lex-data': 0.0.3
tslib: 2.8.1
'@atproto/lexicon@0.6.0':
dependencies:
'@atproto/common-web': 0.4.7
'@atproto/syntax': 0.4.2
iso-datestring-validator: 2.2.2
multiformats: 9.9.0
zod: 3.25.76
'@atproto/syntax@0.4.0': {}
'@atproto/syntax@0.4.2': {}
'@atproto/xrpc@0.7.1':
'@atproto/xrpc@0.7.7':
dependencies:
'@atproto/lexicon': 0.4.12
'@atproto/lexicon': 0.6.0
zod: 3.25.76
'@babel/code-frame@7.27.1':
@@ -5355,6 +5402,8 @@ snapshots:
dependencies:
'@babel/types': 7.28.0
'@babel/runtime@7.28.4': {}
'@babel/template@7.27.2':
dependencies:
'@babel/code-frame': 7.27.1
@@ -8628,6 +8677,11 @@ snapshots:
dependencies:
dequal: 2.0.3
json-schema-to-ts@3.1.1:
dependencies:
'@babel/runtime': 7.28.4
ts-algebra: 2.0.0
json-schema-traverse@0.4.1: {}
json-schema-traverse@1.0.0: {}
@@ -10093,6 +10147,8 @@ snapshots:
toidentifier@1.0.1: {}
ts-algebra@2.0.0: {}
ts-api-utils@1.4.3(typescript@5.8.3):
dependencies:
typescript: 5.8.3
@@ -10157,7 +10213,7 @@ snapshots:
turbo-windows-64: 2.5.4
turbo-windows-arm64: 2.5.4
twitter-api-v2@1.24.0: {}
twitter-api-v2@1.28.0: {}
type-check@0.4.0:
dependencies:
@@ -10231,6 +10287,8 @@ snapshots:
undici@6.21.3: {}
unicode-segmenter@0.14.4: {}
unique-filename@4.0.0:
dependencies:
unique-slug: 5.0.0