Skip to content

Commit

Permalink
fix: lint and format (#416)
Browse files Browse the repository at this point in the history
  • Loading branch information
karrui authored Aug 2, 2024
1 parent 2162d67 commit a9f2ed9
Show file tree
Hide file tree
Showing 2 changed files with 110 additions and 108 deletions.
26 changes: 13 additions & 13 deletions apps/studio/prisma/generated/generatedEnums.ts
Original file line number Diff line number Diff line change
@@ -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]
192 changes: 97 additions & 95 deletions apps/studio/prisma/generated/generatedTypes.ts
Original file line number Diff line number Diff line change
@@ -1,97 +1,99 @@
import type { ColumnType, GeneratedAlways } from "kysely";
export type Generated<T> = T extends ColumnType<infer S, infer I, infer U>
? ColumnType<S, I | undefined, U>
: ColumnType<T, T | undefined, T>;
export type Timestamp = ColumnType<Date, Date | string, Date | string>;
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<string>;
/**
* @kyselyType(PrismaJson.BlobJsonContent)
* [BlobJsonContent]
*/
content: PrismaJson.BlobJsonContent;
};
export type Footer = {
id: GeneratedAlways<number>;
siteId: number;
/**
* @kyselyType(PrismaJson.FooterJsonContent)
* [FooterJsonContent]
*/
content: PrismaJson.FooterJsonContent;
};
export type Navbar = {
id: GeneratedAlways<number>;
siteId: number;
/**
* @kyselyType(PrismaJson.NavbarJsonContent)
* [NavbarJsonContent]
*/
content: PrismaJson.NavbarJsonContent;
};
export type Permission = {
id: GeneratedAlways<number>;
resourceId: string;
userId: string;
role: RoleType;
};
export type Resource = {
id: GeneratedAlways<string>;
title: string;
permalink: string;
siteId: number;
parentId: string | null;
publishedVersionId: string | null;
draftBlobId: string | null;
state: Generated<ResourceState | null>;
type: ResourceType;
};
export type Site = {
id: GeneratedAlways<number>;
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<number>;
expires: Timestamp;
};
export type Version = {
id: GeneratedAlways<string>;
versionNum: number;
resourceId: string;
blobId: string;
publishedAt: Generated<Timestamp>;
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> =
T extends ColumnType<infer S, infer I, infer U>
? ColumnType<S, I | undefined, U>
: ColumnType<T, T | undefined, T>
export type Timestamp = ColumnType<Date, Date | string, Date | string>

export interface Blob {
id: GeneratedAlways<string>
/**
* @kyselyType(PrismaJson.BlobJsonContent)
* [BlobJsonContent]
*/
content: PrismaJson.BlobJsonContent
}
export interface Footer {
id: GeneratedAlways<number>
siteId: number
/**
* @kyselyType(PrismaJson.FooterJsonContent)
* [FooterJsonContent]
*/
content: PrismaJson.FooterJsonContent
}
export interface Navbar {
id: GeneratedAlways<number>
siteId: number
/**
* @kyselyType(PrismaJson.NavbarJsonContent)
* [NavbarJsonContent]
*/
content: PrismaJson.NavbarJsonContent
}
export interface Permission {
id: GeneratedAlways<number>
resourceId: string
userId: string
role: RoleType
}
export interface Resource {
id: GeneratedAlways<string>
title: string
permalink: string
siteId: number
parentId: string | null
publishedVersionId: string | null
draftBlobId: string | null
state: Generated<ResourceState | null>
type: ResourceType
}
export interface Site {
id: GeneratedAlways<number>
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<number>
expires: Timestamp
}
export interface Version {
id: GeneratedAlways<string>
versionNum: number
resourceId: string
blobId: string
publishedAt: Generated<Timestamp>
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
}

0 comments on commit a9f2ed9

Please sign in to comment.