@issue-linker/core
Version:
Core library for issue-linker functionality
94 lines • 7.56 kB
TypeScript
import * as v from "valibot";
declare const IssueStatusSchema: v.PicklistSchema<["open", "closed"], undefined>;
export declare const IssueStatusFilterSchema: v.PicklistSchema<["all", "open", "closed"], undefined>;
export declare const CheckModeSchema: v.PicklistSchema<["default", "branch", "commit"], undefined>;
declare const ActionModeSchema: v.PicklistSchema<["validate-branch", "validate-pr-title", "validate-pr-body", "validate-commits", "custom"], undefined>;
declare const PullRequestCommitSchema: v.ObjectSchema<{
readonly sha: v.StringSchema<undefined>;
readonly message: v.StringSchema<undefined>;
readonly author: v.ObjectSchema<{
readonly name: v.StringSchema<undefined>;
readonly email: v.StringSchema<undefined>;
}, undefined>;
}, undefined>;
declare const IssueSchema: v.ObjectSchema<{
readonly number: v.NumberSchema<undefined>;
readonly state: v.PicklistSchema<["open", "closed"], undefined>;
readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
readonly body: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
}, undefined>;
declare const GitHubRepositorySchema: v.ObjectSchema<{
readonly owner: v.StringSchema<undefined>;
readonly repo: v.StringSchema<undefined>;
}, undefined>;
declare const GitHubIssueResultSchema: v.ObjectSchema<{
readonly found: v.BooleanSchema<undefined>;
readonly issue: v.OptionalSchema<v.ObjectSchema<{
readonly number: v.NumberSchema<undefined>;
readonly state: v.PicklistSchema<["open", "closed"], undefined>;
readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
readonly body: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
}, undefined>, undefined>;
readonly error: v.OptionalSchema<v.ObjectSchema<{
readonly type: v.PicklistSchema<["not-found", "unauthorized", "api-error", "network-error"], undefined>;
readonly message: v.StringSchema<undefined>;
}, undefined>, undefined>;
}, undefined>;
export declare const GetPullRequestCommitsArgsSchema: v.ObjectSchema<{
readonly repo: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "Invalid repository format. Expected 'owner/repo'">, v.MinLengthAction<string, 1, "Repository is required">]>;
readonly prNumber: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, "Pull request number must be positive">]>;
readonly githubToken: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
readonly hostname: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
}, undefined>;
export declare const CheckMessageArgsSchema: v.ObjectSchema<{
readonly text: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, "Text is required">]>;
readonly checkMode: v.OptionalSchema<v.PicklistSchema<["default", "branch", "commit"], undefined>, "default">;
readonly extract: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
readonly exclude: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
readonly issueStatus: v.OptionalSchema<v.PicklistSchema<["all", "open", "closed"], undefined>, "all">;
readonly repo: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "Invalid repository format. Expected 'owner/repo'">, v.MinLengthAction<string, 1, "Repository is required">]>, undefined>;
readonly actionMode: v.OptionalSchema<v.PicklistSchema<["validate-branch", "validate-pr-title", "validate-pr-body", "validate-commits", "custom"], undefined>, undefined>;
readonly githubToken: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
readonly hostname: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
}, undefined>;
export declare const CreateIssueCommentArgsSchema: v.ObjectSchema<{
readonly repo: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "Invalid repository format. Expected 'owner/repo'">, v.MinLengthAction<string, 1, "Repository is required">]>;
readonly issueNumber: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, "Issue number must be positive">]>;
readonly body: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, "Comment body is required">]>;
readonly githubToken: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
readonly hostname: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
}, undefined>;
export declare const CheckDuplicateCommentArgsSchema: v.ObjectSchema<{
readonly repo: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "Invalid repository format. Expected 'owner/repo'">, v.MinLengthAction<string, 1, "Repository is required">]>;
readonly issueNumber: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, "Issue number must be positive">]>;
readonly marker: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, "Marker is required">]>;
readonly githubToken: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
readonly hostname: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
}, undefined>;
export declare const CommentOnBranchIssuesArgsSchema: v.ObjectSchema<{
readonly repo: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "Invalid repository format. Expected 'owner/repo'">, v.MinLengthAction<string, 1, "Repository is required">]>;
readonly issueNumbers: v.SchemaWithPipe<readonly [v.ArraySchema<v.NumberSchema<undefined>, undefined>, v.MinLengthAction<number[], 1, "At least one issue number is required">]>;
readonly branchName: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, "Branch name is required">]>;
readonly githubToken: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
readonly hostname: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
}, undefined>;
export type IssueStatus = v.InferOutput<typeof IssueStatusSchema>;
export type IssueStatusFilter = v.InferOutput<typeof IssueStatusFilterSchema>;
export type CheckMode = v.InferOutput<typeof CheckModeSchema>;
export type ActionMode = v.InferOutput<typeof ActionModeSchema>;
export type PullRequestCommit = v.InferOutput<typeof PullRequestCommitSchema>;
export type Issue = v.InferOutput<typeof IssueSchema>;
export type GitHubRepository = v.InferOutput<typeof GitHubRepositorySchema>;
export type GitHubIssueResult = v.InferOutput<typeof GitHubIssueResultSchema>;
export type GetPullRequestCommitsArgs = v.InferInput<typeof GetPullRequestCommitsArgsSchema>;
export type CheckMessageArgs = v.InferInput<typeof CheckMessageArgsSchema>;
export type CreateIssueCommentArgs = v.InferInput<typeof CreateIssueCommentArgsSchema>;
export type CheckDuplicateCommentArgs = v.InferInput<typeof CheckDuplicateCommentArgsSchema>;
export type CommentOnBranchIssuesArgs = v.InferInput<typeof CommentOnBranchIssuesArgsSchema>;
export type ValidatedGetPullRequestCommitsArgs = v.InferOutput<typeof GetPullRequestCommitsArgsSchema>;
export type ValidatedCheckMessageArgs = v.InferOutput<typeof CheckMessageArgsSchema>;
export type ValidatedCreateIssueCommentArgs = v.InferOutput<typeof CreateIssueCommentArgsSchema>;
export type ValidatedCheckDuplicateCommentArgs = v.InferOutput<typeof CheckDuplicateCommentArgsSchema>;
export type ValidatedCommentOnBranchIssuesArgs = v.InferOutput<typeof CommentOnBranchIssuesArgsSchema>;
export {};
//# sourceMappingURL=validation-schemas.d.ts.map