Skip to content

Commit 8eb3d7a

Browse files
authored
Add image and source keys (#475)
1 parent c9fdefe commit 8eb3d7a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/types/addon.ts

+4
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ export const author = z.object({
1717

1818
export type Author = z.infer<typeof author>;
1919

20+
const urlType = z.string().url();
21+
2022
export const common = z.object({
2123
// Should be in RDNN format
2224
id,
@@ -31,6 +33,8 @@ export const common = z.object({
3133
})
3234
.optional(),
3335
license: z.string(),
36+
image: z.union([urlType, urlType.array().nonempty()]).optional(),
37+
source: urlType.optional(),
3438
});
3539

3640
export type Common = z.infer<typeof common>;

0 commit comments

Comments
 (0)