0
0
Fork 0
mirror of https://github.com/renovatebot/renovate.git synced 2025-05-12 23:51:55 +00:00
renovatebot_renovate/lib/modules/platform/bitbucket-server/schema.ts

32 lines
709 B
TypeScript

import { z } from 'zod';
export const UserSchema = z.object({
displayName: z.string(),
emailAddress: z.string(),
});
export const Files = z.array(z.string());
export const Comment = z.object({
text: z.string(),
id: z.number(),
});
export type Comment = z.infer<typeof Comment>;
export const PullRequestCommentActivity = z.object({
action: z.literal('COMMENTED'),
commentAction: z.string(),
comment: Comment,
});
export type PullRequestCommentActivity = z.infer<
typeof PullRequestCommentActivity
>;
export const PullRequestActivity = z.union([
z.object({ action: z.string() }),
PullRequestCommentActivity,
]);
export type PullRequestActivity = z.infer<typeof PullRequestActivity>;