feat(create-turbo): apply official-starter transform
This commit is contained in:
Vendored
+177
@@ -0,0 +1,177 @@
|
||||
/*
|
||||
* ==========================================
|
||||
* | GENERATED BY SUPAZOD |
|
||||
* ==========================================
|
||||
*/
|
||||
|
||||
import { z } from "zod";
|
||||
import * as generated from "./schemas";
|
||||
export type Json = z.infer<typeof generated.jsonSchema>;
|
||||
export type PublicApikeyRowSchema = z.infer<
|
||||
typeof generated.publicApikeyRowSchemaSchema
|
||||
>;
|
||||
export type PublicApikeyInsertSchema = z.infer<
|
||||
typeof generated.publicApikeyInsertSchemaSchema
|
||||
>;
|
||||
export type PublicApikeyUpdateSchema = z.infer<
|
||||
typeof generated.publicApikeyUpdateSchemaSchema
|
||||
>;
|
||||
export type PublicApikeyRelationshipsSchema = z.infer<
|
||||
typeof generated.publicApikeyRelationshipsSchemaSchema
|
||||
>;
|
||||
export type PublicCategoriesRowSchema = z.infer<
|
||||
typeof generated.publicCategoriesRowSchemaSchema
|
||||
>;
|
||||
export type PublicCategoriesInsertSchema = z.infer<
|
||||
typeof generated.publicCategoriesInsertSchemaSchema
|
||||
>;
|
||||
export type PublicCategoriesUpdateSchema = z.infer<
|
||||
typeof generated.publicCategoriesUpdateSchemaSchema
|
||||
>;
|
||||
export type PublicCategoriesRelationshipsSchema = z.infer<
|
||||
typeof generated.publicCategoriesRelationshipsSchemaSchema
|
||||
>;
|
||||
export type PublicColorsRowSchema = z.infer<
|
||||
typeof generated.publicColorsRowSchemaSchema
|
||||
>;
|
||||
export type PublicColorsInsertSchema = z.infer<
|
||||
typeof generated.publicColorsInsertSchemaSchema
|
||||
>;
|
||||
export type PublicColorsUpdateSchema = z.infer<
|
||||
typeof generated.publicColorsUpdateSchemaSchema
|
||||
>;
|
||||
export type PublicColorsRelationshipsSchema = z.infer<
|
||||
typeof generated.publicColorsRelationshipsSchemaSchema
|
||||
>;
|
||||
export type PublicDaysRowSchema = z.infer<
|
||||
typeof generated.publicDaysRowSchemaSchema
|
||||
>;
|
||||
export type PublicDaysInsertSchema = z.infer<
|
||||
typeof generated.publicDaysInsertSchemaSchema
|
||||
>;
|
||||
export type PublicDaysUpdateSchema = z.infer<
|
||||
typeof generated.publicDaysUpdateSchemaSchema
|
||||
>;
|
||||
export type PublicDaysRelationshipsSchema = z.infer<
|
||||
typeof generated.publicDaysRelationshipsSchemaSchema
|
||||
>;
|
||||
export type PublicHoursRowSchema = z.infer<
|
||||
typeof generated.publicHoursRowSchemaSchema
|
||||
>;
|
||||
export type PublicHoursInsertSchema = z.infer<
|
||||
typeof generated.publicHoursInsertSchemaSchema
|
||||
>;
|
||||
export type PublicHoursUpdateSchema = z.infer<
|
||||
typeof generated.publicHoursUpdateSchemaSchema
|
||||
>;
|
||||
export type PublicHoursRelationshipsSchema = z.infer<
|
||||
typeof generated.publicHoursRelationshipsSchemaSchema
|
||||
>;
|
||||
export type PublicMeasurementsRowSchema = z.infer<
|
||||
typeof generated.publicMeasurementsRowSchemaSchema
|
||||
>;
|
||||
export type PublicMeasurementsInsertSchema = z.infer<
|
||||
typeof generated.publicMeasurementsInsertSchemaSchema
|
||||
>;
|
||||
export type PublicMeasurementsUpdateSchema = z.infer<
|
||||
typeof generated.publicMeasurementsUpdateSchemaSchema
|
||||
>;
|
||||
export type PublicMeasurementsRelationshipsSchema = z.infer<
|
||||
typeof generated.publicMeasurementsRelationshipsSchemaSchema
|
||||
>;
|
||||
export type PublicMetricsRowSchema = z.infer<
|
||||
typeof generated.publicMetricsRowSchemaSchema
|
||||
>;
|
||||
export type PublicMetricsInsertSchema = z.infer<
|
||||
typeof generated.publicMetricsInsertSchemaSchema
|
||||
>;
|
||||
export type PublicMetricsUpdateSchema = z.infer<
|
||||
typeof generated.publicMetricsUpdateSchemaSchema
|
||||
>;
|
||||
export type PublicMetricsRelationshipsSchema = z.infer<
|
||||
typeof generated.publicMetricsRelationshipsSchemaSchema
|
||||
>;
|
||||
export type PublicSbCategoriesRowSchema = z.infer<
|
||||
typeof generated.publicSbCategoriesRowSchemaSchema
|
||||
>;
|
||||
export type PublicSbCategoriesInsertSchema = z.infer<
|
||||
typeof generated.publicSbCategoriesInsertSchemaSchema
|
||||
>;
|
||||
export type PublicSbCategoriesUpdateSchema = z.infer<
|
||||
typeof generated.publicSbCategoriesUpdateSchemaSchema
|
||||
>;
|
||||
export type PublicSbCategoriesRelationshipsSchema = z.infer<
|
||||
typeof generated.publicSbCategoriesRelationshipsSchemaSchema
|
||||
>;
|
||||
export type PublicSbColorsRowSchema = z.infer<
|
||||
typeof generated.publicSbColorsRowSchemaSchema
|
||||
>;
|
||||
export type PublicSbColorsInsertSchema = z.infer<
|
||||
typeof generated.publicSbColorsInsertSchemaSchema
|
||||
>;
|
||||
export type PublicSbColorsUpdateSchema = z.infer<
|
||||
typeof generated.publicSbColorsUpdateSchemaSchema
|
||||
>;
|
||||
export type PublicSbColorsRelationshipsSchema = z.infer<
|
||||
typeof generated.publicSbColorsRelationshipsSchemaSchema
|
||||
>;
|
||||
export type PublicSbDaysRowSchema = z.infer<
|
||||
typeof generated.publicSbDaysRowSchemaSchema
|
||||
>;
|
||||
export type PublicSbDaysInsertSchema = z.infer<
|
||||
typeof generated.publicSbDaysInsertSchemaSchema
|
||||
>;
|
||||
export type PublicSbDaysUpdateSchema = z.infer<
|
||||
typeof generated.publicSbDaysUpdateSchemaSchema
|
||||
>;
|
||||
export type PublicSbDaysRelationshipsSchema = z.infer<
|
||||
typeof generated.publicSbDaysRelationshipsSchemaSchema
|
||||
>;
|
||||
export type PublicSbHoursRowSchema = z.infer<
|
||||
typeof generated.publicSbHoursRowSchemaSchema
|
||||
>;
|
||||
export type PublicSbHoursInsertSchema = z.infer<
|
||||
typeof generated.publicSbHoursInsertSchemaSchema
|
||||
>;
|
||||
export type PublicSbHoursUpdateSchema = z.infer<
|
||||
typeof generated.publicSbHoursUpdateSchemaSchema
|
||||
>;
|
||||
export type PublicSbHoursRelationshipsSchema = z.infer<
|
||||
typeof generated.publicSbHoursRelationshipsSchemaSchema
|
||||
>;
|
||||
export type PublicSbMeasurementsRowSchema = z.infer<
|
||||
typeof generated.publicSbMeasurementsRowSchemaSchema
|
||||
>;
|
||||
export type PublicSbMeasurementsInsertSchema = z.infer<
|
||||
typeof generated.publicSbMeasurementsInsertSchemaSchema
|
||||
>;
|
||||
export type PublicSbMeasurementsUpdateSchema = z.infer<
|
||||
typeof generated.publicSbMeasurementsUpdateSchemaSchema
|
||||
>;
|
||||
export type PublicSbMeasurementsRelationshipsSchema = z.infer<
|
||||
typeof generated.publicSbMeasurementsRelationshipsSchemaSchema
|
||||
>;
|
||||
export type PublicSbMetricsRowSchema = z.infer<
|
||||
typeof generated.publicSbMetricsRowSchemaSchema
|
||||
>;
|
||||
export type PublicSbMetricsInsertSchema = z.infer<
|
||||
typeof generated.publicSbMetricsInsertSchemaSchema
|
||||
>;
|
||||
export type PublicSbMetricsUpdateSchema = z.infer<
|
||||
typeof generated.publicSbMetricsUpdateSchemaSchema
|
||||
>;
|
||||
export type PublicSbMetricsRelationshipsSchema = z.infer<
|
||||
typeof generated.publicSbMetricsRelationshipsSchemaSchema
|
||||
>;
|
||||
export type PublicUserRowSchema = z.infer<
|
||||
typeof generated.publicUserRowSchemaSchema
|
||||
>;
|
||||
export type PublicUserInsertSchema = z.infer<
|
||||
typeof generated.publicUserInsertSchemaSchema
|
||||
>;
|
||||
export type PublicUserUpdateSchema = z.infer<
|
||||
typeof generated.publicUserUpdateSchemaSchema
|
||||
>;
|
||||
export type PublicUserRelationshipsSchema = z.infer<
|
||||
typeof generated.publicUserRelationshipsSchemaSchema
|
||||
>;
|
||||
@@ -0,0 +1,549 @@
|
||||
/*
|
||||
* ==========================================
|
||||
* | GENERATED BY SUPAZOD |
|
||||
* ==========================================
|
||||
*/
|
||||
|
||||
import { z } from "zod";
|
||||
import { Json } from "./types";
|
||||
|
||||
export const jsonSchema: z.ZodSchema<Json> = z.lazy(() =>
|
||||
z
|
||||
.union([
|
||||
z.string(),
|
||||
z.number(),
|
||||
z.boolean(),
|
||||
z.record(z.union([jsonSchema, z.undefined()])),
|
||||
z.array(jsonSchema),
|
||||
])
|
||||
.nullable(),
|
||||
);
|
||||
|
||||
export const publicApikeyRowSchemaSchema = z.object({
|
||||
createdAt: z.string(),
|
||||
id: z.string(),
|
||||
keyHash: z.string(),
|
||||
keyId: z.string(),
|
||||
name: z.string(),
|
||||
userId: z.string().nullable(),
|
||||
});
|
||||
|
||||
export const publicApikeyInsertSchemaSchema = z.object({
|
||||
createdAt: z.string().optional(),
|
||||
id: z.string(),
|
||||
keyHash: z.string(),
|
||||
keyId: z.string(),
|
||||
name: z.string(),
|
||||
userId: z.string().optional().nullable(),
|
||||
});
|
||||
|
||||
export const publicApikeyUpdateSchemaSchema = z.object({
|
||||
createdAt: z.string().optional(),
|
||||
id: z.string().optional(),
|
||||
keyHash: z.string().optional(),
|
||||
keyId: z.string().optional(),
|
||||
name: z.string().optional(),
|
||||
userId: z.string().optional().nullable(),
|
||||
});
|
||||
|
||||
export const publicApikeyRelationshipsSchemaSchema = z.tuple([]);
|
||||
|
||||
export const publicCategoriesRowSchemaSchema = z.object({
|
||||
code: z.number(),
|
||||
colorId: z.string(),
|
||||
createdAt: z.string(),
|
||||
description: z.string().nullable(),
|
||||
id: z.string(),
|
||||
name: z.string(),
|
||||
parentId: z.string().nullable(),
|
||||
userId: z.string().nullable(),
|
||||
});
|
||||
|
||||
export const publicCategoriesInsertSchemaSchema = z.object({
|
||||
code: z.number(),
|
||||
colorId: z.string(),
|
||||
createdAt: z.string().optional(),
|
||||
description: z.string().optional().nullable(),
|
||||
id: z.string(),
|
||||
name: z.string(),
|
||||
parentId: z.string().optional().nullable(),
|
||||
userId: z.string().optional().nullable(),
|
||||
});
|
||||
|
||||
export const publicCategoriesUpdateSchemaSchema = z.object({
|
||||
code: z.number().optional(),
|
||||
colorId: z.string().optional(),
|
||||
createdAt: z.string().optional(),
|
||||
description: z.string().optional().nullable(),
|
||||
id: z.string().optional(),
|
||||
name: z.string().optional(),
|
||||
parentId: z.string().optional().nullable(),
|
||||
userId: z.string().optional().nullable(),
|
||||
});
|
||||
|
||||
export const publicCategoriesRelationshipsSchemaSchema = z.tuple([
|
||||
z.object({
|
||||
foreignKeyName: z.literal("category_colorId_color_id_fk"),
|
||||
columns: z.tuple([z.literal("colorId")]),
|
||||
isOneToOne: z.literal(false),
|
||||
referencedRelation: z.literal("colors"),
|
||||
referencedColumns: z.tuple([z.literal("id")]),
|
||||
}),
|
||||
z.object({
|
||||
foreignKeyName: z.literal("category_parentId_category_id_fk"),
|
||||
columns: z.tuple([z.literal("parentId")]),
|
||||
isOneToOne: z.literal(false),
|
||||
referencedRelation: z.literal("categories"),
|
||||
referencedColumns: z.tuple([z.literal("id")]),
|
||||
}),
|
||||
]);
|
||||
|
||||
export const publicColorsRowSchemaSchema = z.object({
|
||||
createdAt: z.string(),
|
||||
hexcode: z.string(),
|
||||
id: z.string(),
|
||||
inverse: z.string().nullable(),
|
||||
name: z.string(),
|
||||
userId: z.string().nullable(),
|
||||
});
|
||||
|
||||
export const publicColorsInsertSchemaSchema = z.object({
|
||||
createdAt: z.string().optional(),
|
||||
hexcode: z.string(),
|
||||
id: z.string(),
|
||||
inverse: z.string().optional().nullable(),
|
||||
name: z.string(),
|
||||
userId: z.string().optional().nullable(),
|
||||
});
|
||||
|
||||
export const publicColorsUpdateSchemaSchema = z.object({
|
||||
createdAt: z.string().optional(),
|
||||
hexcode: z.string().optional(),
|
||||
id: z.string().optional(),
|
||||
inverse: z.string().optional().nullable(),
|
||||
name: z.string().optional(),
|
||||
userId: z.string().optional().nullable(),
|
||||
});
|
||||
|
||||
export const publicColorsRelationshipsSchemaSchema = z.tuple([]);
|
||||
|
||||
export const publicDaysRowSchemaSchema = z.object({
|
||||
comment: z.string().nullable(),
|
||||
date: z.string(),
|
||||
id: z.string(),
|
||||
mood: z.number().nullable(),
|
||||
userId: z.string().nullable(),
|
||||
});
|
||||
|
||||
export const publicDaysInsertSchemaSchema = z.object({
|
||||
comment: z.string().optional().nullable(),
|
||||
date: z.string(),
|
||||
id: z.string(),
|
||||
mood: z.number().optional().nullable(),
|
||||
userId: z.string().optional().nullable(),
|
||||
});
|
||||
|
||||
export const publicDaysUpdateSchemaSchema = z.object({
|
||||
comment: z.string().optional().nullable(),
|
||||
date: z.string().optional(),
|
||||
id: z.string().optional(),
|
||||
mood: z.number().optional().nullable(),
|
||||
userId: z.string().optional().nullable(),
|
||||
});
|
||||
|
||||
export const publicDaysRelationshipsSchemaSchema = z.tuple([]);
|
||||
|
||||
export const publicHoursRowSchemaSchema = z.object({
|
||||
categoryId: z.string().nullable(),
|
||||
comment: z.string().nullable(),
|
||||
createdAt: z.string(),
|
||||
datetime: z.string().nullable(),
|
||||
dayId: z.string(),
|
||||
id: z.string(),
|
||||
userId: z.string().nullable(),
|
||||
});
|
||||
|
||||
export const publicHoursInsertSchemaSchema = z.object({
|
||||
categoryId: z.string().optional().nullable(),
|
||||
comment: z.string().optional().nullable(),
|
||||
createdAt: z.string().optional(),
|
||||
datetime: z.string().optional().nullable(),
|
||||
dayId: z.string(),
|
||||
id: z.string(),
|
||||
userId: z.string().optional().nullable(),
|
||||
});
|
||||
|
||||
export const publicHoursUpdateSchemaSchema = z.object({
|
||||
categoryId: z.string().optional().nullable(),
|
||||
comment: z.string().optional().nullable(),
|
||||
createdAt: z.string().optional(),
|
||||
datetime: z.string().optional().nullable(),
|
||||
dayId: z.string().optional(),
|
||||
id: z.string().optional(),
|
||||
userId: z.string().optional().nullable(),
|
||||
});
|
||||
|
||||
export const publicHoursRelationshipsSchemaSchema = z.tuple([
|
||||
z.object({
|
||||
foreignKeyName: z.literal("hour_categoryId_category_id_fk"),
|
||||
columns: z.tuple([z.literal("categoryId")]),
|
||||
isOneToOne: z.literal(false),
|
||||
referencedRelation: z.literal("categories"),
|
||||
referencedColumns: z.tuple([z.literal("id")]),
|
||||
}),
|
||||
z.object({
|
||||
foreignKeyName: z.literal("hour_dayId_day_id_fk"),
|
||||
columns: z.tuple([z.literal("dayId")]),
|
||||
isOneToOne: z.literal(false),
|
||||
referencedRelation: z.literal("days"),
|
||||
referencedColumns: z.tuple([z.literal("id")]),
|
||||
}),
|
||||
]);
|
||||
|
||||
export const publicMeasurementsRowSchemaSchema = z.object({
|
||||
createdAt: z.string(),
|
||||
dayId: z.string(),
|
||||
hourId: z.string().nullable(),
|
||||
id: z.string(),
|
||||
metricId: z.string(),
|
||||
userId: z.string().nullable(),
|
||||
value: z.string(),
|
||||
});
|
||||
|
||||
export const publicMeasurementsInsertSchemaSchema = z.object({
|
||||
createdAt: z.string().optional(),
|
||||
dayId: z.string(),
|
||||
hourId: z.string().optional().nullable(),
|
||||
id: z.string(),
|
||||
metricId: z.string(),
|
||||
userId: z.string().optional().nullable(),
|
||||
value: z.string(),
|
||||
});
|
||||
|
||||
export const publicMeasurementsUpdateSchemaSchema = z.object({
|
||||
createdAt: z.string().optional(),
|
||||
dayId: z.string().optional(),
|
||||
hourId: z.string().optional().nullable(),
|
||||
id: z.string().optional(),
|
||||
metricId: z.string().optional(),
|
||||
userId: z.string().optional().nullable(),
|
||||
value: z.string().optional(),
|
||||
});
|
||||
|
||||
export const publicMeasurementsRelationshipsSchemaSchema = z.tuple([
|
||||
z.object({
|
||||
foreignKeyName: z.literal("measurement_dayId_day_id_fk"),
|
||||
columns: z.tuple([z.literal("dayId")]),
|
||||
isOneToOne: z.literal(false),
|
||||
referencedRelation: z.literal("days"),
|
||||
referencedColumns: z.tuple([z.literal("id")]),
|
||||
}),
|
||||
z.object({
|
||||
foreignKeyName: z.literal("measurement_hourId_hour_id_fk"),
|
||||
columns: z.tuple([z.literal("hourId")]),
|
||||
isOneToOne: z.literal(false),
|
||||
referencedRelation: z.literal("hours"),
|
||||
referencedColumns: z.tuple([z.literal("id")]),
|
||||
}),
|
||||
z.object({
|
||||
foreignKeyName: z.literal("measurement_metricId_metric_id_fk"),
|
||||
columns: z.tuple([z.literal("metricId")]),
|
||||
isOneToOne: z.literal(false),
|
||||
referencedRelation: z.literal("metrics"),
|
||||
referencedColumns: z.tuple([z.literal("id")]),
|
||||
}),
|
||||
]);
|
||||
|
||||
export const publicMetricsRowSchemaSchema = z.object({
|
||||
createdAt: z.string(),
|
||||
description: z.string().nullable(),
|
||||
goal: z.number().nullable(),
|
||||
icon: z.string(),
|
||||
id: z.string(),
|
||||
name: z.string(),
|
||||
type: z.string(),
|
||||
unit: z.string().nullable(),
|
||||
userId: z.string().nullable(),
|
||||
});
|
||||
|
||||
export const publicMetricsInsertSchemaSchema = z.object({
|
||||
createdAt: z.string().optional(),
|
||||
description: z.string().optional().nullable(),
|
||||
goal: z.number().optional().nullable(),
|
||||
icon: z.string(),
|
||||
id: z.string(),
|
||||
name: z.string(),
|
||||
type: z.string(),
|
||||
unit: z.string().optional().nullable(),
|
||||
userId: z.string().optional().nullable(),
|
||||
});
|
||||
|
||||
export const publicMetricsUpdateSchemaSchema = z.object({
|
||||
createdAt: z.string().optional(),
|
||||
description: z.string().optional().nullable(),
|
||||
goal: z.number().optional().nullable(),
|
||||
icon: z.string().optional(),
|
||||
id: z.string().optional(),
|
||||
name: z.string().optional(),
|
||||
type: z.string().optional(),
|
||||
unit: z.string().optional().nullable(),
|
||||
userId: z.string().optional().nullable(),
|
||||
});
|
||||
|
||||
export const publicMetricsRelationshipsSchemaSchema = z.tuple([]);
|
||||
|
||||
export const publicSbCategoriesRowSchemaSchema = z.object({
|
||||
code: z.number(),
|
||||
colorId: z.number(),
|
||||
created_at: z.string(),
|
||||
id: z.number(),
|
||||
name: z.string(),
|
||||
userId: z.string(),
|
||||
});
|
||||
|
||||
export const publicSbCategoriesInsertSchemaSchema = z.object({
|
||||
code: z.number(),
|
||||
colorId: z.number(),
|
||||
created_at: z.string().optional(),
|
||||
id: z.number().optional(),
|
||||
name: z.string(),
|
||||
userId: z.string(),
|
||||
});
|
||||
|
||||
export const publicSbCategoriesUpdateSchemaSchema = z.object({
|
||||
code: z.number().optional(),
|
||||
colorId: z.number().optional(),
|
||||
created_at: z.string().optional(),
|
||||
id: z.number().optional(),
|
||||
name: z.string().optional(),
|
||||
userId: z.string().optional(),
|
||||
});
|
||||
|
||||
export const publicSbCategoriesRelationshipsSchemaSchema = z.tuple([
|
||||
z.object({
|
||||
foreignKeyName: z.literal("categories_colorId_fkey"),
|
||||
columns: z.tuple([z.literal("colorId")]),
|
||||
isOneToOne: z.literal(false),
|
||||
referencedRelation: z.literal("sb_colors"),
|
||||
referencedColumns: z.tuple([z.literal("id")]),
|
||||
}),
|
||||
]);
|
||||
|
||||
export const publicSbColorsRowSchemaSchema = z.object({
|
||||
hexcode: z.string(),
|
||||
id: z.number(),
|
||||
inverse: z.string(),
|
||||
name: z.string(),
|
||||
userId: z.string(),
|
||||
});
|
||||
|
||||
export const publicSbColorsInsertSchemaSchema = z.object({
|
||||
hexcode: z.string(),
|
||||
id: z.number().optional(),
|
||||
inverse: z.string(),
|
||||
name: z.string(),
|
||||
userId: z.string(),
|
||||
});
|
||||
|
||||
export const publicSbColorsUpdateSchemaSchema = z.object({
|
||||
hexcode: z.string().optional(),
|
||||
id: z.number().optional(),
|
||||
inverse: z.string().optional(),
|
||||
name: z.string().optional(),
|
||||
userId: z.string().optional(),
|
||||
});
|
||||
|
||||
export const publicSbColorsRelationshipsSchemaSchema = z.tuple([]);
|
||||
|
||||
export const publicSbDaysRowSchemaSchema = z.object({
|
||||
comment: z.string().nullable(),
|
||||
date: z.string(),
|
||||
id: z.number(),
|
||||
mood: z.number().nullable(),
|
||||
userId: z.string(),
|
||||
});
|
||||
|
||||
export const publicSbDaysInsertSchemaSchema = z.object({
|
||||
comment: z.string().optional().nullable(),
|
||||
date: z.string(),
|
||||
id: z.number().optional(),
|
||||
mood: z.number().optional().nullable(),
|
||||
userId: z.string(),
|
||||
});
|
||||
|
||||
export const publicSbDaysUpdateSchemaSchema = z.object({
|
||||
comment: z.string().optional().nullable(),
|
||||
date: z.string().optional(),
|
||||
id: z.number().optional(),
|
||||
mood: z.number().optional().nullable(),
|
||||
userId: z.string().optional(),
|
||||
});
|
||||
|
||||
export const publicSbDaysRelationshipsSchemaSchema = z.tuple([]);
|
||||
|
||||
export const publicSbHoursRowSchemaSchema = z.object({
|
||||
categoryId: z.number().nullable(),
|
||||
comment: z.string().nullable(),
|
||||
datetime: z.string(),
|
||||
dayId: z.number(),
|
||||
id: z.number(),
|
||||
userId: z.string().nullable(),
|
||||
});
|
||||
|
||||
export const publicSbHoursInsertSchemaSchema = z.object({
|
||||
categoryId: z.number().optional().nullable(),
|
||||
comment: z.string().optional().nullable(),
|
||||
datetime: z.string(),
|
||||
dayId: z.number(),
|
||||
id: z.number().optional(),
|
||||
userId: z.string().optional().nullable(),
|
||||
});
|
||||
|
||||
export const publicSbHoursUpdateSchemaSchema = z.object({
|
||||
categoryId: z.number().optional().nullable(),
|
||||
comment: z.string().optional().nullable(),
|
||||
datetime: z.string().optional(),
|
||||
dayId: z.number().optional(),
|
||||
id: z.number().optional(),
|
||||
userId: z.string().optional().nullable(),
|
||||
});
|
||||
|
||||
export const publicSbHoursRelationshipsSchemaSchema = z.tuple([
|
||||
z.object({
|
||||
foreignKeyName: z.literal("hours_dayId_fkey"),
|
||||
columns: z.tuple([z.literal("dayId")]),
|
||||
isOneToOne: z.literal(false),
|
||||
referencedRelation: z.literal("sb_days"),
|
||||
referencedColumns: z.tuple([z.literal("id")]),
|
||||
}),
|
||||
]);
|
||||
|
||||
export const publicSbMeasurementsRowSchemaSchema = z.object({
|
||||
created_at: z.string(),
|
||||
dayId: z.number().nullable(),
|
||||
hourId: z.number().nullable(),
|
||||
id: z.number(),
|
||||
metricId: z.number().nullable(),
|
||||
type: z.string(),
|
||||
userId: z.string().nullable(),
|
||||
value: z.string(),
|
||||
});
|
||||
|
||||
export const publicSbMeasurementsInsertSchemaSchema = z.object({
|
||||
created_at: z.string().optional(),
|
||||
dayId: z.number().optional().nullable(),
|
||||
hourId: z.number().optional().nullable(),
|
||||
id: z.number().optional(),
|
||||
metricId: z.number().optional().nullable(),
|
||||
type: z.string().optional(),
|
||||
userId: z.string().optional().nullable(),
|
||||
value: z.string(),
|
||||
});
|
||||
|
||||
export const publicSbMeasurementsUpdateSchemaSchema = z.object({
|
||||
created_at: z.string().optional(),
|
||||
dayId: z.number().optional().nullable(),
|
||||
hourId: z.number().optional().nullable(),
|
||||
id: z.number().optional(),
|
||||
metricId: z.number().optional().nullable(),
|
||||
type: z.string().optional(),
|
||||
userId: z.string().optional().nullable(),
|
||||
value: z.string().optional(),
|
||||
});
|
||||
|
||||
export const publicSbMeasurementsRelationshipsSchemaSchema = z.tuple([
|
||||
z.object({
|
||||
foreignKeyName: z.literal("measurements_dayId_fkey"),
|
||||
columns: z.tuple([z.literal("dayId")]),
|
||||
isOneToOne: z.literal(false),
|
||||
referencedRelation: z.literal("sb_days"),
|
||||
referencedColumns: z.tuple([z.literal("id")]),
|
||||
}),
|
||||
z.object({
|
||||
foreignKeyName: z.literal("measurements_hourId_fkey"),
|
||||
columns: z.tuple([z.literal("hourId")]),
|
||||
isOneToOne: z.literal(false),
|
||||
referencedRelation: z.literal("sb_hours"),
|
||||
referencedColumns: z.tuple([z.literal("id")]),
|
||||
}),
|
||||
z.object({
|
||||
foreignKeyName: z.literal("measurements_metricId_fkey"),
|
||||
columns: z.tuple([z.literal("metricId")]),
|
||||
isOneToOne: z.literal(false),
|
||||
referencedRelation: z.literal("sb_metrics"),
|
||||
referencedColumns: z.tuple([z.literal("id")]),
|
||||
}),
|
||||
]);
|
||||
|
||||
export const publicSbMetricsRowSchemaSchema = z.object({
|
||||
created_at: z.string(),
|
||||
description: z.string().nullable(),
|
||||
goal: z.number().nullable(),
|
||||
icon: z.string(),
|
||||
id: z.number(),
|
||||
name: z.string(),
|
||||
type: z.string(),
|
||||
unit: z.string().nullable(),
|
||||
userId: z.string(),
|
||||
});
|
||||
|
||||
export const publicSbMetricsInsertSchemaSchema = z.object({
|
||||
created_at: z.string().optional(),
|
||||
description: z.string().optional().nullable(),
|
||||
goal: z.number().optional().nullable(),
|
||||
icon: z.string(),
|
||||
id: z.number().optional(),
|
||||
name: z.string(),
|
||||
type: z.string(),
|
||||
unit: z.string().optional().nullable(),
|
||||
userId: z.string(),
|
||||
});
|
||||
|
||||
export const publicSbMetricsUpdateSchemaSchema = z.object({
|
||||
created_at: z.string().optional(),
|
||||
description: z.string().optional().nullable(),
|
||||
goal: z.number().optional().nullable(),
|
||||
icon: z.string().optional(),
|
||||
id: z.number().optional(),
|
||||
name: z.string().optional(),
|
||||
type: z.string().optional(),
|
||||
unit: z.string().optional().nullable(),
|
||||
userId: z.string().optional(),
|
||||
});
|
||||
|
||||
export const publicSbMetricsRelationshipsSchemaSchema = z.tuple([]);
|
||||
|
||||
export const publicUserRowSchemaSchema = z.object({
|
||||
email: z.string(),
|
||||
emailVerified: z.number().nullable(),
|
||||
id: z.string(),
|
||||
image: z.string().nullable(),
|
||||
name: z.string(),
|
||||
password: z.string().nullable(),
|
||||
role: z.string().nullable(),
|
||||
timezone: z.string(),
|
||||
});
|
||||
|
||||
export const publicUserInsertSchemaSchema = z.object({
|
||||
email: z.string(),
|
||||
emailVerified: z.number().optional().nullable(),
|
||||
id: z.string(),
|
||||
image: z.string().optional().nullable(),
|
||||
name: z.string(),
|
||||
password: z.string().optional().nullable(),
|
||||
role: z.string().optional().nullable(),
|
||||
timezone: z.string().optional(),
|
||||
});
|
||||
|
||||
export const publicUserUpdateSchemaSchema = z.object({
|
||||
email: z.string().optional(),
|
||||
emailVerified: z.number().optional().nullable(),
|
||||
id: z.string().optional(),
|
||||
image: z.string().optional().nullable(),
|
||||
name: z.string().optional(),
|
||||
password: z.string().optional().nullable(),
|
||||
role: z.string().optional().nullable(),
|
||||
timezone: z.string().optional(),
|
||||
});
|
||||
|
||||
export const publicUserRelationshipsSchemaSchema = z.tuple([]);
|
||||
@@ -0,0 +1,624 @@
|
||||
export type Json =
|
||||
| string
|
||||
| number
|
||||
| boolean
|
||||
| null
|
||||
| { [key: string]: Json | undefined }
|
||||
| Json[]
|
||||
|
||||
export type Database = {
|
||||
public: {
|
||||
Tables: {
|
||||
apiKey: {
|
||||
Row: {
|
||||
createdAt: string
|
||||
id: string
|
||||
keyHash: string
|
||||
keyId: string
|
||||
name: string
|
||||
userId: string | null
|
||||
}
|
||||
Insert: {
|
||||
createdAt?: string
|
||||
id: string
|
||||
keyHash: string
|
||||
keyId: string
|
||||
name: string
|
||||
userId?: string | null
|
||||
}
|
||||
Update: {
|
||||
createdAt?: string
|
||||
id?: string
|
||||
keyHash?: string
|
||||
keyId?: string
|
||||
name?: string
|
||||
userId?: string | null
|
||||
}
|
||||
Relationships: []
|
||||
}
|
||||
categories: {
|
||||
Row: {
|
||||
code: number
|
||||
colorId: string
|
||||
createdAt: string
|
||||
description: string | null
|
||||
id: string
|
||||
name: string
|
||||
parentId: string | null
|
||||
userId: string | null
|
||||
}
|
||||
Insert: {
|
||||
code: number
|
||||
colorId: string
|
||||
createdAt?: string
|
||||
description?: string | null
|
||||
id: string
|
||||
name: string
|
||||
parentId?: string | null
|
||||
userId?: string | null
|
||||
}
|
||||
Update: {
|
||||
code?: number
|
||||
colorId?: string
|
||||
createdAt?: string
|
||||
description?: string | null
|
||||
id?: string
|
||||
name?: string
|
||||
parentId?: string | null
|
||||
userId?: string | null
|
||||
}
|
||||
Relationships: [
|
||||
{
|
||||
foreignKeyName: "category_colorId_color_id_fk"
|
||||
columns: ["colorId"]
|
||||
isOneToOne: false
|
||||
referencedRelation: "colors"
|
||||
referencedColumns: ["id"]
|
||||
},
|
||||
{
|
||||
foreignKeyName: "category_parentId_category_id_fk"
|
||||
columns: ["parentId"]
|
||||
isOneToOne: false
|
||||
referencedRelation: "categories"
|
||||
referencedColumns: ["id"]
|
||||
},
|
||||
]
|
||||
}
|
||||
colors: {
|
||||
Row: {
|
||||
createdAt: string
|
||||
hexcode: string
|
||||
id: string
|
||||
inverse: string | null
|
||||
name: string
|
||||
userId: string | null
|
||||
}
|
||||
Insert: {
|
||||
createdAt?: string
|
||||
hexcode: string
|
||||
id: string
|
||||
inverse?: string | null
|
||||
name: string
|
||||
userId?: string | null
|
||||
}
|
||||
Update: {
|
||||
createdAt?: string
|
||||
hexcode?: string
|
||||
id?: string
|
||||
inverse?: string | null
|
||||
name?: string
|
||||
userId?: string | null
|
||||
}
|
||||
Relationships: []
|
||||
}
|
||||
days: {
|
||||
Row: {
|
||||
comment: string | null
|
||||
date: string
|
||||
id: string
|
||||
mood: number | null
|
||||
userId: string | null
|
||||
}
|
||||
Insert: {
|
||||
comment?: string | null
|
||||
date: string
|
||||
id: string
|
||||
mood?: number | null
|
||||
userId?: string | null
|
||||
}
|
||||
Update: {
|
||||
comment?: string | null
|
||||
date?: string
|
||||
id?: string
|
||||
mood?: number | null
|
||||
userId?: string | null
|
||||
}
|
||||
Relationships: []
|
||||
}
|
||||
hours: {
|
||||
Row: {
|
||||
categoryId: string | null
|
||||
comment: string | null
|
||||
createdAt: string
|
||||
datetime: string | null
|
||||
dayId: string
|
||||
id: string
|
||||
userId: string | null
|
||||
}
|
||||
Insert: {
|
||||
categoryId?: string | null
|
||||
comment?: string | null
|
||||
createdAt?: string
|
||||
datetime?: string | null
|
||||
dayId: string
|
||||
id: string
|
||||
userId?: string | null
|
||||
}
|
||||
Update: {
|
||||
categoryId?: string | null
|
||||
comment?: string | null
|
||||
createdAt?: string
|
||||
datetime?: string | null
|
||||
dayId?: string
|
||||
id?: string
|
||||
userId?: string | null
|
||||
}
|
||||
Relationships: [
|
||||
{
|
||||
foreignKeyName: "hour_categoryId_category_id_fk"
|
||||
columns: ["categoryId"]
|
||||
isOneToOne: false
|
||||
referencedRelation: "categories"
|
||||
referencedColumns: ["id"]
|
||||
},
|
||||
{
|
||||
foreignKeyName: "hour_dayId_day_id_fk"
|
||||
columns: ["dayId"]
|
||||
isOneToOne: false
|
||||
referencedRelation: "days"
|
||||
referencedColumns: ["id"]
|
||||
},
|
||||
]
|
||||
}
|
||||
measurements: {
|
||||
Row: {
|
||||
createdAt: string
|
||||
dayId: string
|
||||
hourId: string | null
|
||||
id: string
|
||||
metricId: string
|
||||
userId: string | null
|
||||
value: string
|
||||
}
|
||||
Insert: {
|
||||
createdAt?: string
|
||||
dayId: string
|
||||
hourId?: string | null
|
||||
id: string
|
||||
metricId: string
|
||||
userId?: string | null
|
||||
value: string
|
||||
}
|
||||
Update: {
|
||||
createdAt?: string
|
||||
dayId?: string
|
||||
hourId?: string | null
|
||||
id?: string
|
||||
metricId?: string
|
||||
userId?: string | null
|
||||
value?: string
|
||||
}
|
||||
Relationships: [
|
||||
{
|
||||
foreignKeyName: "measurement_dayId_day_id_fk"
|
||||
columns: ["dayId"]
|
||||
isOneToOne: false
|
||||
referencedRelation: "days"
|
||||
referencedColumns: ["id"]
|
||||
},
|
||||
{
|
||||
foreignKeyName: "measurement_hourId_hour_id_fk"
|
||||
columns: ["hourId"]
|
||||
isOneToOne: false
|
||||
referencedRelation: "hours"
|
||||
referencedColumns: ["id"]
|
||||
},
|
||||
{
|
||||
foreignKeyName: "measurement_metricId_metric_id_fk"
|
||||
columns: ["metricId"]
|
||||
isOneToOne: false
|
||||
referencedRelation: "metrics"
|
||||
referencedColumns: ["id"]
|
||||
},
|
||||
]
|
||||
}
|
||||
metrics: {
|
||||
Row: {
|
||||
createdAt: string
|
||||
description: string | null
|
||||
goal: number | null
|
||||
icon: string
|
||||
id: string
|
||||
name: string
|
||||
type: string
|
||||
unit: string | null
|
||||
userId: string | null
|
||||
}
|
||||
Insert: {
|
||||
createdAt?: string
|
||||
description?: string | null
|
||||
goal?: number | null
|
||||
icon: string
|
||||
id: string
|
||||
name: string
|
||||
type: string
|
||||
unit?: string | null
|
||||
userId?: string | null
|
||||
}
|
||||
Update: {
|
||||
createdAt?: string
|
||||
description?: string | null
|
||||
goal?: number | null
|
||||
icon?: string
|
||||
id?: string
|
||||
name?: string
|
||||
type?: string
|
||||
unit?: string | null
|
||||
userId?: string | null
|
||||
}
|
||||
Relationships: []
|
||||
}
|
||||
sb_categories: {
|
||||
Row: {
|
||||
code: number
|
||||
colorId: number
|
||||
created_at: string
|
||||
id: number
|
||||
name: string
|
||||
userId: string
|
||||
}
|
||||
Insert: {
|
||||
code: number
|
||||
colorId: number
|
||||
created_at?: string
|
||||
id?: number
|
||||
name: string
|
||||
userId: string
|
||||
}
|
||||
Update: {
|
||||
code?: number
|
||||
colorId?: number
|
||||
created_at?: string
|
||||
id?: number
|
||||
name?: string
|
||||
userId?: string
|
||||
}
|
||||
Relationships: [
|
||||
{
|
||||
foreignKeyName: "categories_colorId_fkey"
|
||||
columns: ["colorId"]
|
||||
isOneToOne: false
|
||||
referencedRelation: "sb_colors"
|
||||
referencedColumns: ["id"]
|
||||
},
|
||||
]
|
||||
}
|
||||
sb_colors: {
|
||||
Row: {
|
||||
hexcode: string
|
||||
id: number
|
||||
inverse: string
|
||||
name: string
|
||||
userId: string
|
||||
}
|
||||
Insert: {
|
||||
hexcode: string
|
||||
id?: number
|
||||
inverse: string
|
||||
name: string
|
||||
userId: string
|
||||
}
|
||||
Update: {
|
||||
hexcode?: string
|
||||
id?: number
|
||||
inverse?: string
|
||||
name?: string
|
||||
userId?: string
|
||||
}
|
||||
Relationships: []
|
||||
}
|
||||
sb_days: {
|
||||
Row: {
|
||||
comment: string | null
|
||||
date: string
|
||||
id: number
|
||||
mood: number | null
|
||||
userId: string
|
||||
}
|
||||
Insert: {
|
||||
comment?: string | null
|
||||
date: string
|
||||
id?: number
|
||||
mood?: number | null
|
||||
userId: string
|
||||
}
|
||||
Update: {
|
||||
comment?: string | null
|
||||
date?: string
|
||||
id?: number
|
||||
mood?: number | null
|
||||
userId?: string
|
||||
}
|
||||
Relationships: []
|
||||
}
|
||||
sb_hours: {
|
||||
Row: {
|
||||
categoryId: number | null
|
||||
comment: string | null
|
||||
datetime: string
|
||||
dayId: number
|
||||
id: number
|
||||
userId: string | null
|
||||
}
|
||||
Insert: {
|
||||
categoryId?: number | null
|
||||
comment?: string | null
|
||||
datetime: string
|
||||
dayId: number
|
||||
id?: number
|
||||
userId?: string | null
|
||||
}
|
||||
Update: {
|
||||
categoryId?: number | null
|
||||
comment?: string | null
|
||||
datetime?: string
|
||||
dayId?: number
|
||||
id?: number
|
||||
userId?: string | null
|
||||
}
|
||||
Relationships: [
|
||||
{
|
||||
foreignKeyName: "hours_dayId_fkey"
|
||||
columns: ["dayId"]
|
||||
isOneToOne: false
|
||||
referencedRelation: "sb_days"
|
||||
referencedColumns: ["id"]
|
||||
},
|
||||
]
|
||||
}
|
||||
sb_measurements: {
|
||||
Row: {
|
||||
created_at: string
|
||||
dayId: number | null
|
||||
hourId: number | null
|
||||
id: number
|
||||
metricId: number | null
|
||||
type: string
|
||||
userId: string | null
|
||||
value: string
|
||||
}
|
||||
Insert: {
|
||||
created_at?: string
|
||||
dayId?: number | null
|
||||
hourId?: number | null
|
||||
id?: number
|
||||
metricId?: number | null
|
||||
type?: string
|
||||
userId?: string | null
|
||||
value: string
|
||||
}
|
||||
Update: {
|
||||
created_at?: string
|
||||
dayId?: number | null
|
||||
hourId?: number | null
|
||||
id?: number
|
||||
metricId?: number | null
|
||||
type?: string
|
||||
userId?: string | null
|
||||
value?: string
|
||||
}
|
||||
Relationships: [
|
||||
{
|
||||
foreignKeyName: "measurements_dayId_fkey"
|
||||
columns: ["dayId"]
|
||||
isOneToOne: false
|
||||
referencedRelation: "sb_days"
|
||||
referencedColumns: ["id"]
|
||||
},
|
||||
{
|
||||
foreignKeyName: "measurements_hourId_fkey"
|
||||
columns: ["hourId"]
|
||||
isOneToOne: false
|
||||
referencedRelation: "sb_hours"
|
||||
referencedColumns: ["id"]
|
||||
},
|
||||
{
|
||||
foreignKeyName: "measurements_metricId_fkey"
|
||||
columns: ["metricId"]
|
||||
isOneToOne: false
|
||||
referencedRelation: "sb_metrics"
|
||||
referencedColumns: ["id"]
|
||||
},
|
||||
]
|
||||
}
|
||||
sb_metrics: {
|
||||
Row: {
|
||||
created_at: string
|
||||
description: string | null
|
||||
goal: number | null
|
||||
icon: string
|
||||
id: number
|
||||
name: string
|
||||
type: string
|
||||
unit: string | null
|
||||
userId: string
|
||||
}
|
||||
Insert: {
|
||||
created_at?: string
|
||||
description?: string | null
|
||||
goal?: number | null
|
||||
icon: string
|
||||
id?: number
|
||||
name: string
|
||||
type: string
|
||||
unit?: string | null
|
||||
userId: string
|
||||
}
|
||||
Update: {
|
||||
created_at?: string
|
||||
description?: string | null
|
||||
goal?: number | null
|
||||
icon?: string
|
||||
id?: number
|
||||
name?: string
|
||||
type?: string
|
||||
unit?: string | null
|
||||
userId?: string
|
||||
}
|
||||
Relationships: []
|
||||
}
|
||||
user: {
|
||||
Row: {
|
||||
email: string
|
||||
emailVerified: number | null
|
||||
id: string
|
||||
image: string | null
|
||||
name: string
|
||||
password: string | null
|
||||
role: string | null
|
||||
timezone: string
|
||||
}
|
||||
Insert: {
|
||||
email: string
|
||||
emailVerified?: number | null
|
||||
id: string
|
||||
image?: string | null
|
||||
name: string
|
||||
password?: string | null
|
||||
role?: string | null
|
||||
timezone?: string
|
||||
}
|
||||
Update: {
|
||||
email?: string
|
||||
emailVerified?: number | null
|
||||
id?: string
|
||||
image?: string | null
|
||||
name?: string
|
||||
password?: string | null
|
||||
role?: string | null
|
||||
timezone?: string
|
||||
}
|
||||
Relationships: []
|
||||
}
|
||||
}
|
||||
Views: {
|
||||
[_ in never]: never
|
||||
}
|
||||
Functions: {
|
||||
[_ in never]: never
|
||||
}
|
||||
Enums: {
|
||||
[_ in never]: never
|
||||
}
|
||||
CompositeTypes: {
|
||||
[_ in never]: never
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
type PublicSchema = Database[Extract<keyof Database, "public">]
|
||||
|
||||
export type Tables<
|
||||
PublicTableNameOrOptions extends
|
||||
| keyof (PublicSchema["Tables"] & PublicSchema["Views"])
|
||||
| { schema: keyof Database },
|
||||
TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
|
||||
? keyof (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
|
||||
Database[PublicTableNameOrOptions["schema"]]["Views"])
|
||||
: never = never,
|
||||
> = PublicTableNameOrOptions extends { schema: keyof Database }
|
||||
? (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
|
||||
Database[PublicTableNameOrOptions["schema"]]["Views"])[TableName] extends {
|
||||
Row: infer R
|
||||
}
|
||||
? R
|
||||
: never
|
||||
: PublicTableNameOrOptions extends keyof (PublicSchema["Tables"] &
|
||||
PublicSchema["Views"])
|
||||
? (PublicSchema["Tables"] &
|
||||
PublicSchema["Views"])[PublicTableNameOrOptions] extends {
|
||||
Row: infer R
|
||||
}
|
||||
? R
|
||||
: never
|
||||
: never
|
||||
|
||||
export type TablesInsert<
|
||||
PublicTableNameOrOptions extends
|
||||
| keyof PublicSchema["Tables"]
|
||||
| { schema: keyof Database },
|
||||
TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
|
||||
? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
|
||||
: never = never,
|
||||
> = PublicTableNameOrOptions extends { schema: keyof Database }
|
||||
? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
|
||||
Insert: infer I
|
||||
}
|
||||
? I
|
||||
: never
|
||||
: PublicTableNameOrOptions extends keyof PublicSchema["Tables"]
|
||||
? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
|
||||
Insert: infer I
|
||||
}
|
||||
? I
|
||||
: never
|
||||
: never
|
||||
|
||||
export type TablesUpdate<
|
||||
PublicTableNameOrOptions extends
|
||||
| keyof PublicSchema["Tables"]
|
||||
| { schema: keyof Database },
|
||||
TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
|
||||
? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
|
||||
: never = never,
|
||||
> = PublicTableNameOrOptions extends { schema: keyof Database }
|
||||
? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
|
||||
Update: infer U
|
||||
}
|
||||
? U
|
||||
: never
|
||||
: PublicTableNameOrOptions extends keyof PublicSchema["Tables"]
|
||||
? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
|
||||
Update: infer U
|
||||
}
|
||||
? U
|
||||
: never
|
||||
: never
|
||||
|
||||
export type Enums<
|
||||
PublicEnumNameOrOptions extends
|
||||
| keyof PublicSchema["Enums"]
|
||||
| { schema: keyof Database },
|
||||
EnumName extends PublicEnumNameOrOptions extends { schema: keyof Database }
|
||||
? keyof Database[PublicEnumNameOrOptions["schema"]]["Enums"]
|
||||
: never = never,
|
||||
> = PublicEnumNameOrOptions extends { schema: keyof Database }
|
||||
? Database[PublicEnumNameOrOptions["schema"]]["Enums"][EnumName]
|
||||
: PublicEnumNameOrOptions extends keyof PublicSchema["Enums"]
|
||||
? PublicSchema["Enums"][PublicEnumNameOrOptions]
|
||||
: never
|
||||
|
||||
export type CompositeTypes<
|
||||
PublicCompositeTypeNameOrOptions extends
|
||||
| keyof PublicSchema["CompositeTypes"]
|
||||
| { schema: keyof Database },
|
||||
CompositeTypeName extends PublicCompositeTypeNameOrOptions extends {
|
||||
schema: keyof Database
|
||||
}
|
||||
? keyof Database[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"]
|
||||
: never = never,
|
||||
> = PublicCompositeTypeNameOrOptions extends { schema: keyof Database }
|
||||
? Database[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"][CompositeTypeName]
|
||||
: PublicCompositeTypeNameOrOptions extends keyof PublicSchema["CompositeTypes"]
|
||||
? PublicSchema["CompositeTypes"][PublicCompositeTypeNameOrOptions]
|
||||
: never
|
||||
Reference in New Issue
Block a user