Add new fields to extension models

- Added `id` field to `ExtPublish`
- Expanded `DBExtension` with multiple new properties:
  - `api_version`, `author_id`, `created_at`,
  - `downloads`, `icon`, `identifier`,
  - `long_description`, `name`,
  - `readme`, `short_description`,
  - and `tarball_size`
This commit is contained in:
Huakun Shen 2025-03-26 03:58:44 -04:00
parent 2b9df3106f
commit a147de0bb3
No known key found for this signature in database

View File

@ -53,6 +53,7 @@ export enum PublishStateEnum {
export const ExtensionPublishState = v.enum(PublishStateEnum) export const ExtensionPublishState = v.enum(PublishStateEnum)
export const ExtPublish = v.object({ export const ExtPublish = v.object({
id: v.number(),
name: v.string(), name: v.string(),
tarball_path: v.string(), tarball_path: v.string(),
created_at: v.date(), created_at: v.date(),
@ -73,4 +74,18 @@ export const ExtPublish = v.object({
}) })
export type ExtPublish = v.InferOutput<typeof ExtPublish> export type ExtPublish = v.InferOutput<typeof ExtPublish>
export const DBExtension = v.object({}) export const DBExtension = v.object({
api_version: v.string(),
author_id: v.nullable(v.string()),
created_at: v.string(),
downloads: v.number(),
icon: BaseIcon,
identifier: v.string(),
long_description: v.nullable(v.string()),
name: v.string(),
readme: v.nullable(v.string()),
short_description: v.string(),
tarball_size: v.nullable(v.number()),
version: v.string()
})
export type DBExtension = v.InferOutput<typeof DBExtension>