Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: lint and format #416

Merged
merged 1 commit into from
Aug 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
}
Loading