handy online tools for AT Protocol boat.kelinci.net
atproto bluesky atcute typescript solidjs
20
fork

Configure Feed

Select the types of activity you want to include in your feed.

refactor: some type changes

Mary 64d014f3 97eed392

+5 -11
+5 -11
src/api/types/plc.ts
··· 1 1 import * as v from 'valibot'; 2 2 3 - import { didKeyString, didString, handleString, serviceUrlString } from './strings'; 3 + import { didKeyString, didString, handleString, serviceUrlString, urlString } from './strings'; 4 4 5 5 export const legacyGenesisOp = v.object({ 6 6 type: v.literal('create'), ··· 22 22 23 23 export const service = v.object({ 24 24 type: v.string(), 25 - endpoint: v.pipe(v.string(), v.url()), 25 + endpoint: urlString, 26 26 }); 27 27 export type Service = v.InferOutput<typeof service>; 28 28 ··· 36 36 v.check((v) => new Set(v).size === v.length, `must contain unique keys`), 37 37 ), 38 38 verificationMethods: v.record(v.string(), didKeyString), 39 - alsoKnownAs: v.array(v.pipe(v.string(), v.url())), 40 - services: v.record( 41 - v.string(), 42 - v.object({ 43 - type: v.string(), 44 - endpoint: v.pipe(v.string(), v.url()), 45 - }), 46 - ), 39 + alsoKnownAs: v.array(urlString), 40 + services: v.record(v.string(), service), 47 41 }); 48 42 export type PlcUpdateOp = v.InferOutput<typeof updateOp>; 49 43 ··· 86 80 }), 87 81 v.object({ 88 82 type: v.string(), 89 - endpoint: v.pipe(v.string(), v.url()), 83 + endpoint: urlString, 90 84 }), 91 85 ]), 92 86 ),