decentralised message store

refactor: refine at uri schema

serenity 5d6fae98 7d8da024

Changed files
+8 -1
src
lib
types
+8 -1
src/lib/types/atproto.ts
···
);
export type AtprotoHandle = z.infer<typeof atprotoHandleSchema>;
+
export const atUriAuthoritySchema = z.union([
+
didPlcSchema,
+
didWebSchema,
+
atprotoHandleSchema,
+
]);
+
export type AtUriAuthority = z.infer<typeof atUriAuthoritySchema>;
+
export const atUriSchema = z.object({
-
authority: z.union([didPlcSchema, didWebSchema, atprotoHandleSchema]),
+
authority: atUriAuthoritySchema,
collection: z.optional(nsidSchema),
rKey: z.optional(z.string()),
});