Skip to content

Commit 2e04834

Browse files
Update type definitions for GitHub, GitLab, and design schemes
1 parent 71595d8 commit 2e04834

6 files changed

Lines changed: 213 additions & 3 deletions

File tree

app/types/GitHub.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,24 @@ export interface GitHubUserResponse {
1313
}
1414

1515
export interface GitHubRepoInfo {
16+
id: number;
1617
name: string;
1718
full_name: string;
1819
html_url: string;
20+
clone_url: string;
1921
description: string;
2022
stargazers_count: number;
2123
forks_count: number;
24+
watchers_count: number;
2225
default_branch: string;
2326
updated_at: string;
2427
language: string;
2528
languages_url: string;
2629
private?: boolean;
2730
topics?: string[];
31+
fork?: boolean;
32+
archived?: boolean;
33+
size?: number;
2834
}
2935

3036
export interface GitHubContent {
@@ -92,6 +98,14 @@ export interface GitHubStats {
9298
recentActivity: GitHubEvent[];
9399
languages: GitHubLanguageStats;
94100
totalGists: number;
101+
publicRepos: number;
102+
privateRepos: number;
103+
stars: number;
104+
forks: number;
105+
followers: number;
106+
publicGists: number;
107+
privateGists: number;
108+
lastUpdated: string;
95109
}
96110

97111
export interface GitHubConnection {

app/types/GitLab.ts

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
// GitLab API Response Types
2+
export interface GitLabUserResponse {
3+
id: number;
4+
username: string;
5+
name: string;
6+
avatar_url: string;
7+
web_url: string;
8+
created_at: string;
9+
bio: string;
10+
public_repos: number;
11+
followers: number;
12+
following: number;
13+
}
14+
15+
export interface GitLabProjectInfo {
16+
id: number;
17+
name: string;
18+
path_with_namespace: string;
19+
description: string;
20+
http_url_to_repo: string;
21+
star_count: number;
22+
forks_count: number;
23+
updated_at: string;
24+
default_branch: string;
25+
visibility: string;
26+
}
27+
28+
export interface GitLabGroupInfo {
29+
id: number;
30+
name: string;
31+
web_url: string;
32+
avatar_url: string;
33+
}
34+
35+
export interface GitLabEvent {
36+
id: number;
37+
action_name: string;
38+
project_id: number;
39+
project: {
40+
name: string;
41+
path_with_namespace: string;
42+
};
43+
created_at: string;
44+
}
45+
46+
export interface GitLabStats {
47+
projects: GitLabProjectInfo[];
48+
recentActivity: GitLabEvent[];
49+
totalSnippets: number;
50+
publicProjects: number;
51+
privateProjects: number;
52+
stars: number;
53+
forks: number;
54+
followers: number;
55+
snippets: number;
56+
groups: GitLabGroupInfo[];
57+
lastUpdated: string;
58+
}
59+
60+
export interface GitLabConnection {
61+
user: GitLabUserResponse | null;
62+
token: string;
63+
tokenType: 'personal-access-token' | 'oauth';
64+
stats?: GitLabStats;
65+
rateLimit?: {
66+
limit: number;
67+
remaining: number;
68+
reset: number;
69+
};
70+
gitlabUrl?: string;
71+
}
72+
73+
export interface GitLabProjectResponse {
74+
id: number;
75+
name: string;
76+
path_with_namespace: string;
77+
description: string;
78+
web_url: string;
79+
http_url_to_repo: string;
80+
star_count: number;
81+
forks_count: number;
82+
updated_at: string;
83+
default_branch: string;
84+
visibility: string;
85+
owner: {
86+
id: number;
87+
username: string;
88+
name: string;
89+
};
90+
}
91+
92+
export interface GitLabCommitAction {
93+
action: 'create' | 'update' | 'delete';
94+
file_path: string;
95+
content?: string;
96+
encoding?: 'text' | 'base64';
97+
}
98+
99+
export interface GitLabCommitRequest {
100+
branch: string;
101+
commit_message: string;
102+
actions: GitLabCommitAction[];
103+
}

app/types/actions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { Change } from 'diff';
22

3-
export type ActionType = 'file' | 'shell' | 'supabase' | 'start' | 'build';
3+
export type ActionType = 'file' | 'shell' | 'supabase';
44

55
export interface BaseAction {
66
content: string;

app/types/artifact.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// eslint-disable-next-line @typescript-eslint/naming-convention
2-
export interface codinitArticactData {
1+
export interface CodinitArtifactData {
32
id: string;
43
title: string;
54
type?: string | undefined;

app/types/design-scheme.ts

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
export interface DesignScheme {
2+
palette: { [key: string]: string }; // Changed from string[] to object
3+
features: string[];
4+
font: string[];
5+
}
6+
7+
export const defaultDesignScheme: DesignScheme = {
8+
palette: {
9+
primary: '#9E7FFF',
10+
secondary: '#38bdf8',
11+
accent: '#f472b6',
12+
background: '#171717',
13+
surface: '#262626',
14+
text: '#FFFFFF',
15+
textSecondary: '#A3A3A3',
16+
border: '#2F2F2F',
17+
success: '#10b981',
18+
warning: '#f59e0b',
19+
error: '#ef4444',
20+
},
21+
features: ['rounded'],
22+
font: ['sans-serif'],
23+
};
24+
25+
export const paletteRoles = [
26+
{
27+
key: 'primary',
28+
label: 'Primary',
29+
description: 'Main brand color - use for primary buttons, active links, and key interactive elements',
30+
},
31+
{
32+
key: 'secondary',
33+
label: 'Secondary',
34+
description: 'Supporting brand color - use for secondary buttons, inactive states, and complementary elements',
35+
},
36+
{
37+
key: 'accent',
38+
label: 'Accent',
39+
description: 'Highlight color - use for badges, notifications, focus states, and call-to-action elements',
40+
},
41+
{
42+
key: 'background',
43+
label: 'Background',
44+
description: 'Page backdrop - use for the main application/website background behind all content',
45+
},
46+
{
47+
key: 'surface',
48+
label: 'Surface',
49+
description: 'Elevated content areas - use for cards, modals, dropdowns, and panels that sit above the background',
50+
},
51+
{ key: 'text', label: 'Text', description: 'Primary text - use for headings, body text, and main readable content' },
52+
{
53+
key: 'textSecondary',
54+
label: 'Text Secondary',
55+
description: 'Muted text - use for captions, placeholders, timestamps, and less important information',
56+
},
57+
{
58+
key: 'border',
59+
label: 'Border',
60+
description: 'Separators - use for input borders, dividers, table lines, and element outlines',
61+
},
62+
{
63+
key: 'success',
64+
label: 'Success',
65+
description: 'Positive feedback - use for success messages, completed states, and positive indicators',
66+
},
67+
{
68+
key: 'warning',
69+
label: 'Warning',
70+
description: 'Caution alerts - use for warning messages, pending states, and attention-needed indicators',
71+
},
72+
{
73+
key: 'error',
74+
label: 'Error',
75+
description: 'Error states - use for error messages, failed states, and destructive action indicators',
76+
},
77+
];
78+
79+
export const designFeatures = [
80+
{ key: 'rounded', label: 'Rounded Corners' },
81+
{ key: 'border', label: 'Subtle Border' },
82+
{ key: 'gradient', label: 'Gradient Accent' },
83+
{ key: 'shadow', label: 'Soft Shadow' },
84+
{ key: 'frosted-glass', label: 'Frosted Glass' },
85+
];
86+
87+
export const designFonts = [
88+
{ key: 'sans-serif', label: 'Sans Serif', preview: 'Aa' },
89+
{ key: 'serif', label: 'Serif', preview: 'Aa' },
90+
{ key: 'monospace', label: 'Monospace', preview: 'Aa' },
91+
{ key: 'cursive', label: 'Cursive', preview: 'Aa' },
92+
{ key: 'fantasy', label: 'Fantasy', preview: 'Aa' },
93+
];

app/types/model.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export type ProviderInfo = {
1717
export interface IProviderSetting {
1818
enabled?: boolean;
1919
baseUrl?: string;
20+
OPENAI_LIKE_API_MODELS?: string;
2021
}
2122

2223
export type IProviderConfig = ProviderInfo & {

0 commit comments

Comments
 (0)