mirror of https://github.com/buster-so/buster.git
type updates
This commit is contained in:
parent
2c2bf74475
commit
aeaf7dbb57
|
@ -62,7 +62,8 @@ const dataMetadata: DataMetadata = {
|
|||
const MOCK_DATA: Required<BusterMetricData> = {
|
||||
data: mockData(),
|
||||
metricId: 'mock-metric-1',
|
||||
data_metadata: dataMetadata
|
||||
data_metadata: dataMetadata,
|
||||
has_more_records: false
|
||||
};
|
||||
|
||||
export const createMockData = (metricId: string): Required<BusterMetricData> => {
|
||||
|
|
|
@ -1,14 +1,18 @@
|
|||
import { z } from 'zod';
|
||||
import { OrganizationSchema } from '../organization/organization.types';
|
||||
import { OrganizationRoleSchema } from '../organization/roles.types';
|
||||
import { TeamSchema } from '../teams/teams.types';
|
||||
import { UserFavoriteSchema } from './favorites.types';
|
||||
import { UserSchema } from './users.types';
|
||||
import { z } from "zod";
|
||||
import { OrganizationSchema } from "../organization/organization.types";
|
||||
import { OrganizationRoleSchema } from "../organization/roles.types";
|
||||
import { TeamSchema } from "../teams/teams.types";
|
||||
import { UserFavoriteSchema } from "./favorites.types";
|
||||
import { UserSchema } from "./users.types";
|
||||
|
||||
const OrganizationUserSchema = OrganizationSchema.extend({
|
||||
role: OrganizationRoleSchema,
|
||||
});
|
||||
|
||||
export const UserResponseSchema = z.object({
|
||||
user: UserSchema,
|
||||
teams: z.array(TeamSchema),
|
||||
organizations: z.array(OrganizationSchema).nullable(),
|
||||
organizations: z.array(OrganizationUserSchema).nullable(),
|
||||
});
|
||||
|
||||
export const UserListResponseSchema = z.array(
|
||||
|
|
Loading…
Reference in New Issue