Deep-audit + build-out across all products to fully-usable state; all typecheck clean. - gitgram-web (99): wire Store feature to real endpoints, close 9 gaps - gitgram-backend (100): close 8 flow gaps, document infra-provisioning items - gitgram-mobile (90): fix API base-URL/path mismatch (404s) + copy proximity components into components/proximity wired to real screens; 15 gaps, +react-native-svg - aitm-core (95): wire natural-language CLI flow end-to-end; 11 gaps - aitm-api (97): fix teams metadata runtime bug; copy a2a-js server/client/grpc into src/a2a and wire A2A route; crates.io package search; 8 gaps - aitm-mcp (100): fix A2A client/server card mismatch; 9 gaps - aitm-website (95): build missing docs routes; 9 gaps Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
65 lines
1.9 KiB
TypeScript
65 lines
1.9 KiB
TypeScript
import api from './api';
|
|
|
|
export const githubService = {
|
|
getRepositories: async () => {
|
|
const response = await api.get('/github/repositories');
|
|
return response.data;
|
|
},
|
|
|
|
getUserProjects: async (page = 1, limit = 20) => {
|
|
const response = await api.get('/github/projects', {
|
|
params: { page, limit },
|
|
});
|
|
return response.data;
|
|
},
|
|
|
|
getProject: async (projectId: string) => {
|
|
const response = await api.get(`/github/projects/${projectId}`);
|
|
return response.data;
|
|
},
|
|
|
|
syncProject: async (projectId: string) => {
|
|
const response = await api.post(`/github/projects/${projectId}/sync`);
|
|
return response.data;
|
|
},
|
|
|
|
syncAllProjects: async () => {
|
|
const response = await api.post('/github/sync/all');
|
|
return response.data;
|
|
},
|
|
|
|
createProject: async (data: { owner: string; repo: string; description?: string; tags?: string[] }) => {
|
|
const response = await api.post('/github/projects', data);
|
|
return response.data;
|
|
},
|
|
|
|
updateProject: async (projectId: string, data: { description?: string; tags?: string[] }) => {
|
|
const response = await api.put(`/github/projects/${projectId}`, data);
|
|
return response.data;
|
|
},
|
|
|
|
searchProjects: async (query: string, page = 1, limit = 20) => {
|
|
const response = await api.get('/search/projects', {
|
|
params: { q: query, page, limit },
|
|
});
|
|
return response.data;
|
|
},
|
|
|
|
saveProject: async (projectId: string) => {
|
|
const response = await api.post(`/github/projects/${projectId}/save`);
|
|
return response.data;
|
|
},
|
|
|
|
getSavedProjects: async (page = 1, limit = 20) => {
|
|
const response = await api.get('/github/projects/saved', {
|
|
params: { page, limit },
|
|
});
|
|
return response.data;
|
|
},
|
|
|
|
getRepositoryContent: async (owner: string, repo: string, path: string = '') => {
|
|
const response = await api.get(`/github/repos/${owner}/${repo}/contents/${path}`);
|
|
return response.data;
|
|
},
|
|
};
|