@struktoai/mirage-core
Version:
A Unified Virtual Filesystem For AI Agents
132 lines • 4.01 kB
TypeScript
import type { JsonObject } from '../../types.ts';
interface NormalizedTeamState {
state_id: string | null;
state_name: string | null;
type: string | null;
}
export declare function normalizeTeam(team: JsonObject): {
team_id: string | null;
team_key: string | null;
team_name: string | null;
name: string | null;
description: string | null;
timezone: string | null;
updated_at: string | null;
states: NormalizedTeamState[];
};
export declare function normalizeUser(user: JsonObject): {
user_id: string | null;
name: string | null;
display_name: string | null;
email: string | null;
is_active: boolean | null;
is_admin: boolean | null;
updated_at: string | null;
url: string | null;
};
export declare function normalizeIssue(issue: JsonObject): {
issue_id: string | null;
issue_key: string | null;
title: string | null;
description: string;
team_id: string | null;
team_key: string | null;
team_name: string | null;
project_id: string | null;
project_name: string | null;
cycle_id: string | null;
cycle_name: string | null;
cycle_number: number | null;
state_id: string | null;
state_name: string | null;
assignee_id: string | null;
assignee_email: string | null;
assignee_name: string | null;
creator_id: string | null;
creator_email: string | null;
creator_name: string | null;
priority: number | null;
label_ids: (string | null)[];
label_names: (string | null)[];
created_at: string | null;
updated_at: string | null;
url: string | null;
};
export declare function normalizeComment(comment: JsonObject, issueId: string, issueKey: string | null): {
comment_id: string | null;
issue_id: string;
issue_key: string | null;
user_id: string | null;
user_email: string | null;
user_name: string | null;
body: string;
created_at: string | null;
updated_at: string | null;
url: string | null;
};
export interface NormalizeProjectContext {
teamId: string;
teamKey: string | null;
teamName: string | null;
issues: ReturnType<typeof projectIssueRows>;
}
export declare function normalizeProject(project: JsonObject, ctx: NormalizeProjectContext): {
project_id: string | null;
team_id: string;
team_key: string | null;
team_name: string | null;
name: string | null;
description: string | null;
state: string | null;
lead_id: string | null;
updated_at: string | null;
url: string | null;
issue_count: number;
issues: {
issue_id: string | null;
issue_key: string | null;
title: string | null;
state_id: string | null;
state_name: string | null;
url: string | null;
}[];
};
export declare function normalizeCycle(cycle: JsonObject, teamId: string): {
cycle_id: string | null;
team_id: string;
name: string | null;
number: number | null;
starts_at: string | null;
ends_at: string | null;
updated_at: string | null;
url: string | null;
};
export declare function normalizeLabel(label: JsonObject): {
label_id: string | null;
name: string | null;
color: string | null;
};
export declare function normalizeDocument(document: JsonObject): {
document_id: string | null;
title: string | null;
content: string;
project_id: string | null;
project_name: string | null;
creator_id: string | null;
creator_name: string | null;
creator_email: string | null;
created_at: string | null;
updated_at: string | null;
url: string | null;
};
export declare function projectIssueRows(issues: readonly JsonObject[], projectId: string | null): {
issue_id: string | null;
issue_key: string | null;
title: string | null;
state_id: string | null;
state_name: string | null;
url: string | null;
}[];
export declare const SEARCHED_FIELDS: ReadonlySet<string>;
export {};
//# sourceMappingURL=normalize.d.ts.map