From a9f2ed91879d85d69c6123109070a11aa8c1c813 Mon Sep 17 00:00:00 2001 From: Kar Rui Lau Date: Fri, 2 Aug 2024 15:46:38 +0800 Subject: [PATCH] fix: lint and format (#416) --- .../studio/prisma/generated/generatedEnums.ts | 26 +-- .../studio/prisma/generated/generatedTypes.ts | 192 +++++++++--------- 2 files changed, 110 insertions(+), 108 deletions(-) diff --git a/apps/studio/prisma/generated/generatedEnums.ts b/apps/studio/prisma/generated/generatedEnums.ts index db2053dcf6..341006ab58 100644 --- a/apps/studio/prisma/generated/generatedEnums.ts +++ b/apps/studio/prisma/generated/generatedEnums.ts @@ -1,16 +1,16 @@ export const ResourceState = { - Draft: "Draft", - Published: "Published" -} as const; -export type ResourceState = (typeof ResourceState)[keyof typeof ResourceState]; + Draft: "Draft", + Published: "Published", +} as const +export type ResourceState = (typeof ResourceState)[keyof typeof ResourceState] export const ResourceType = { - Page: "Page", - Folder: "Folder" -} as const; -export type ResourceType = (typeof ResourceType)[keyof typeof ResourceType]; + Page: "Page", + Folder: "Folder", +} as const +export type ResourceType = (typeof ResourceType)[keyof typeof ResourceType] export const RoleType = { - Admin: "Admin", - Editor: "Editor", - Publisher: "Publisher" -} as const; -export type RoleType = (typeof RoleType)[keyof typeof RoleType]; + Admin: "Admin", + Editor: "Editor", + Publisher: "Publisher", +} as const +export type RoleType = (typeof RoleType)[keyof typeof RoleType] diff --git a/apps/studio/prisma/generated/generatedTypes.ts b/apps/studio/prisma/generated/generatedTypes.ts index 73a4451860..200c827b92 100644 --- a/apps/studio/prisma/generated/generatedTypes.ts +++ b/apps/studio/prisma/generated/generatedTypes.ts @@ -1,97 +1,99 @@ -import type { ColumnType, GeneratedAlways } from "kysely"; -export type Generated = T extends ColumnType - ? ColumnType - : ColumnType; -export type Timestamp = ColumnType; +import type { ColumnType, GeneratedAlways } from "kysely" -import type { ResourceState, ResourceType, RoleType } from "./generatedEnums"; +import type { ResourceState, ResourceType, RoleType } from "./generatedEnums" -export type Blob = { - id: GeneratedAlways; - /** - * @kyselyType(PrismaJson.BlobJsonContent) - * [BlobJsonContent] - */ - content: PrismaJson.BlobJsonContent; -}; -export type Footer = { - id: GeneratedAlways; - siteId: number; - /** - * @kyselyType(PrismaJson.FooterJsonContent) - * [FooterJsonContent] - */ - content: PrismaJson.FooterJsonContent; -}; -export type Navbar = { - id: GeneratedAlways; - siteId: number; - /** - * @kyselyType(PrismaJson.NavbarJsonContent) - * [NavbarJsonContent] - */ - content: PrismaJson.NavbarJsonContent; -}; -export type Permission = { - id: GeneratedAlways; - resourceId: string; - userId: string; - role: RoleType; -}; -export type Resource = { - id: GeneratedAlways; - title: string; - permalink: string; - siteId: number; - parentId: string | null; - publishedVersionId: string | null; - draftBlobId: string | null; - state: Generated; - type: ResourceType; -}; -export type Site = { - id: GeneratedAlways; - name: string; - /** - * @kyselyType(PrismaJson.SiteJsonConfig) - * [SiteJsonConfig] - */ - config: PrismaJson.SiteJsonConfig; -}; -export type SiteMember = { - userId: string; - siteId: number; -}; -export type User = { - id: string; - name: string; - email: string; - phone: string; - preferredName: string | null; -}; -export type VerificationToken = { - identifier: string; - token: string; - attempts: Generated; - expires: Timestamp; -}; -export type Version = { - id: GeneratedAlways; - versionNum: number; - resourceId: string; - blobId: string; - publishedAt: Generated; - publishedBy: string; -}; -export type DB = { - Blob: Blob; - Footer: Footer; - Navbar: Navbar; - Permission: Permission; - Resource: Resource; - Site: Site; - SiteMember: SiteMember; - User: User; - VerificationToken: VerificationToken; - Version: Version; -}; +export type Generated = + T extends ColumnType + ? ColumnType + : ColumnType +export type Timestamp = ColumnType + +export interface Blob { + id: GeneratedAlways + /** + * @kyselyType(PrismaJson.BlobJsonContent) + * [BlobJsonContent] + */ + content: PrismaJson.BlobJsonContent +} +export interface Footer { + id: GeneratedAlways + siteId: number + /** + * @kyselyType(PrismaJson.FooterJsonContent) + * [FooterJsonContent] + */ + content: PrismaJson.FooterJsonContent +} +export interface Navbar { + id: GeneratedAlways + siteId: number + /** + * @kyselyType(PrismaJson.NavbarJsonContent) + * [NavbarJsonContent] + */ + content: PrismaJson.NavbarJsonContent +} +export interface Permission { + id: GeneratedAlways + resourceId: string + userId: string + role: RoleType +} +export interface Resource { + id: GeneratedAlways + title: string + permalink: string + siteId: number + parentId: string | null + publishedVersionId: string | null + draftBlobId: string | null + state: Generated + type: ResourceType +} +export interface Site { + id: GeneratedAlways + name: string + /** + * @kyselyType(PrismaJson.SiteJsonConfig) + * [SiteJsonConfig] + */ + config: PrismaJson.SiteJsonConfig +} +export interface SiteMember { + userId: string + siteId: number +} +export interface User { + id: string + name: string + email: string + phone: string + preferredName: string | null +} +export interface VerificationToken { + identifier: string + token: string + attempts: Generated + expires: Timestamp +} +export interface Version { + id: GeneratedAlways + versionNum: number + resourceId: string + blobId: string + publishedAt: Generated + publishedBy: string +} +export interface DB { + Blob: Blob + Footer: Footer + Navbar: Navbar + Permission: Permission + Resource: Resource + Site: Site + SiteMember: SiteMember + User: User + VerificationToken: VerificationToken + Version: Version +}