From c7b2d0c4053c77660dd6688e663725107c4df0e8 Mon Sep 17 00:00:00 2001 From: stdpi Date: Mon, 27 May 2024 23:45:08 +0700 Subject: [PATCH] bump(client): 1.0.1 -> 1.0.2 feat: model construction for blogpage, etc --- blog/models.ts | 14 ++++++++++++++ index.ts | 3 +++ package.json | 2 +- tsconfig.json | 2 +- 4 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 blog/models.ts diff --git a/blog/models.ts b/blog/models.ts new file mode 100644 index 0000000..985a259 --- /dev/null +++ b/blog/models.ts @@ -0,0 +1,14 @@ +import { Model, Context } from ".."; + +const blogPageFields = ["date", "thumb", "intro", "body"]; + +export const BlogPage = (ctx: Context) => + new Model< + typeof blogPageFields, + { + date: Date; + thumb: string; + intro: string; + body: string; + } + >(ctx, "blog.BlogPage"); diff --git a/index.ts b/index.ts index eaf781b..f7d4283 100644 --- a/index.ts +++ b/index.ts @@ -66,3 +66,6 @@ export class Model> { return fetch(this.requestBuilder(options)).then((ok) => ok.json()); } } + +import { BlogPage } from "./blog/models"; +export { BlogPage }; diff --git a/package.json b/package.json index 15b14dd..24aae76 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@team-fuho/wt", - "version": "1.0.1", + "version": "1.0.2", "description": "", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/tsconfig.json b/tsconfig.json index cd60539..96d692c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,5 +6,5 @@ "outDir": "./dist" }, "include": ["**/*"], - "exclude": ["**/*.spec.ts"] + "exclude": ["**/*.spec.ts", "dist/**/*"] }