@codeguide/core 0.0.28 → 0.0.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/__tests__/services/codespace/codespace-v2.test.ts +53 -0
- package/__tests__/services/usage/usage-service.test.ts +458 -104
- package/codeguide.ts +3 -0
- package/dist/codeguide.d.ts +2 -1
- package/dist/codeguide.js +1 -0
- package/dist/index.d.ts +4 -3
- package/dist/services/base/base-service.d.ts +21 -0
- package/dist/services/base/base-service.js +114 -0
- package/dist/services/codespace/codespace-service.d.ts +64 -1
- package/dist/services/codespace/codespace-service.js +272 -0
- package/dist/services/codespace/codespace-types.d.ts +213 -12
- package/dist/services/codespace/index.d.ts +1 -1
- package/dist/services/index.d.ts +2 -0
- package/dist/services/index.js +4 -1
- package/dist/services/projects/project-types.d.ts +66 -32
- package/dist/services/starter-kits/index.d.ts +2 -0
- package/dist/services/starter-kits/index.js +20 -0
- package/dist/services/starter-kits/starter-kits-service.d.ts +13 -0
- package/dist/services/starter-kits/starter-kits-service.js +27 -0
- package/dist/services/starter-kits/starter-kits-types.d.ts +34 -0
- package/dist/services/starter-kits/starter-kits-types.js +2 -0
- package/dist/services/subscriptions/subscription-service.d.ts +11 -1
- package/dist/services/subscriptions/subscription-service.js +14 -0
- package/dist/services/tasks/task-service.d.ts +2 -1
- package/dist/services/tasks/task-service.js +8 -0
- package/dist/services/tasks/task-types.d.ts +26 -7
- package/dist/services/usage/usage-service.d.ts +5 -2
- package/dist/services/usage/usage-service.js +58 -9
- package/dist/services/usage/usage-types.d.ts +157 -34
- package/dist/types.d.ts +18 -2
- package/docs/.vitepress/README.md +51 -0
- package/docs/.vitepress/config.ts +139 -0
- package/docs/.vitepress/theme/custom.css +80 -0
- package/docs/.vitepress/theme/index.ts +13 -0
- package/docs/.vitepress/tsconfig.json +19 -0
- package/docs/QUICKSTART.md +77 -0
- package/docs/README.md +134 -0
- package/docs/README_SETUP.md +46 -0
- package/docs/authentication.md +351 -0
- package/docs/codeguide-client.md +350 -0
- package/docs/codespace-models.md +1004 -0
- package/docs/codespace-service.md +444 -0
- package/docs/index.md +135 -0
- package/docs/package.json +14 -0
- package/docs/projects-service.md +688 -0
- package/docs/security-keys-service.md +773 -0
- package/docs/starter-kits-service.md +249 -0
- package/docs/task-service.md +955 -0
- package/docs/testsprite_tests/TC001_Homepage_Load_and_Hero_Section_Display.py +70 -0
- package/docs/testsprite_tests/TC002_Sidebar_Navigation_ExpandCollapse_Functionality.py +73 -0
- package/docs/testsprite_tests/TC003_Full_Text_Local_Search_with_Keyboard_Shortcut.py +90 -0
- package/docs/testsprite_tests/TC004_Dark_Mode_Toggle_and_Persistence.py +73 -0
- package/docs/testsprite_tests/TC005_Mobile_Responsiveness_and_Touch_Navigation.py +113 -0
- package/docs/testsprite_tests/TC006_GitHub_Integration_Edit_this_page_Links.py +73 -0
- package/docs/testsprite_tests/TC007_Syntax_Highlighting_and_Code_Copy_Functionality.py +73 -0
- package/docs/testsprite_tests/TC008_Auto_Generated_Table_of_Contents_Accuracy.py +73 -0
- package/docs/testsprite_tests/TC009_SEO_and_Content_Discoverability_Verification.py +73 -0
- package/docs/testsprite_tests/TC010_Accessibility_Compliance_WCAG_AA.py +73 -0
- package/docs/testsprite_tests/TC011_Local_Development_Workflow_Build_and_Hot_Reload.py +74 -0
- package/docs/testsprite_tests/TC012_Performance_Metrics_Compliance.py +73 -0
- package/docs/testsprite_tests/standard_prd.json +122 -0
- package/docs/testsprite_tests/testsprite-mcp-test-report.html +2508 -0
- package/docs/testsprite_tests/testsprite-mcp-test-report.md +273 -0
- package/docs/testsprite_tests/testsprite_frontend_test_plan.json +390 -0
- package/docs/usage-service.md +291 -1
- package/index.ts +11 -3
- package/package.json +17 -2
- package/plans/CODESPACE_LOGS_STREAMING_GUIDE.md +320 -0
- package/plans/CODESPACE_TASK_LOGS_API_COMPLETE_GUIDE.md +821 -0
- package/services/base/base-service.ts +130 -0
- package/services/codespace/codespace-service.ts +359 -0
- package/services/codespace/codespace-types.ts +295 -13
- package/services/codespace/index.ts +21 -1
- package/services/index.ts +2 -0
- package/services/projects/README.md +107 -34
- package/services/projects/project-types.ts +69 -32
- package/services/starter-kits/index.ts +2 -0
- package/services/starter-kits/starter-kits-service.ts +33 -0
- package/services/starter-kits/starter-kits-types.ts +38 -0
- package/services/subscriptions/subscription-service.ts +23 -5
- package/services/tasks/task-service.ts +10 -0
- package/services/tasks/task-types.ts +29 -7
- package/services/usage/usage-service.ts +59 -10
- package/services/usage/usage-types.ts +186 -36
- package/types.ts +22 -2
|
@@ -93,11 +93,17 @@ export interface TechnicalDocument {
|
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
+
export interface TaskMetadata {
|
|
97
|
+
job_id?: string
|
|
98
|
+
completed_at?: string
|
|
99
|
+
processing_duration_ms?: number
|
|
100
|
+
}
|
|
101
|
+
|
|
96
102
|
export interface CodespaceTaskData {
|
|
97
103
|
id: string
|
|
98
104
|
codespace_task_id: string | null
|
|
99
105
|
project_id: string
|
|
100
|
-
project_repository_id: string
|
|
106
|
+
project_repository_id: string | null
|
|
101
107
|
user_id: string
|
|
102
108
|
status: string
|
|
103
109
|
progress: string
|
|
@@ -115,14 +121,18 @@ export interface CodespaceTaskData {
|
|
|
115
121
|
work_completed_at: string | null
|
|
116
122
|
estimated_completion_time: string | null
|
|
117
123
|
ai_implementation_plan: string | null
|
|
118
|
-
metadata:
|
|
124
|
+
metadata: TaskMetadata | null
|
|
119
125
|
model_id: string | null
|
|
120
126
|
execution_mode: string
|
|
121
127
|
context_data: any
|
|
122
|
-
final_report_popup_state:
|
|
128
|
+
final_report_popup_state: 'not_ready' | 'open' | 'closed'
|
|
123
129
|
technical_document: TechnicalDocument | null
|
|
124
|
-
|
|
125
|
-
|
|
130
|
+
ai_questionnaire: Record<string, string> | null
|
|
131
|
+
model: TaskModel | null
|
|
132
|
+
task_models: TaskModelEntry[]
|
|
133
|
+
docs_url: string | null
|
|
134
|
+
github_token: string | null
|
|
135
|
+
attachments: TaskAttachment[] | null
|
|
126
136
|
}
|
|
127
137
|
|
|
128
138
|
export interface GetCodespaceTaskResponse {
|
|
@@ -130,11 +140,31 @@ export interface GetCodespaceTaskResponse {
|
|
|
130
140
|
data: CodespaceTaskData
|
|
131
141
|
}
|
|
132
142
|
|
|
133
|
-
|
|
143
|
+
// Codespace Project Task interface for the response structure
|
|
144
|
+
export interface CodespaceProjectTask {
|
|
145
|
+
id: string
|
|
146
|
+
title: string
|
|
147
|
+
description: string
|
|
148
|
+
details: string
|
|
149
|
+
status: string
|
|
150
|
+
test_strategy: string
|
|
151
|
+
priority: string
|
|
152
|
+
ordinal: number
|
|
153
|
+
task_group_id: string
|
|
154
|
+
parent_task_id: string
|
|
155
|
+
ai_result: string
|
|
156
|
+
created_at: string
|
|
157
|
+
user_id: string
|
|
158
|
+
subtasks: CodespaceProjectTask[]
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export interface CodespaceProjectTaskListResponse {
|
|
134
162
|
status: string
|
|
135
|
-
data:
|
|
163
|
+
data: CodespaceProjectTask[]
|
|
136
164
|
}
|
|
137
165
|
|
|
166
|
+
export interface GetProjectTasksByCodespaceResponse extends CodespaceProjectTaskListResponse {}
|
|
167
|
+
|
|
138
168
|
export interface CreateBackgroundCodespaceTaskRequest extends CreateCodespaceTaskRequestV2 {}
|
|
139
169
|
|
|
140
170
|
export interface CreateBackgroundCodespaceTaskResponse extends CreateCodespaceTaskResponseV2 {}
|
|
@@ -150,12 +180,7 @@ export interface GetCodespaceTasksByProjectRequest {
|
|
|
150
180
|
}
|
|
151
181
|
|
|
152
182
|
// Response for getting codespace tasks by project
|
|
153
|
-
export interface GetCodespaceTasksByProjectResponse {
|
|
154
|
-
status: string
|
|
155
|
-
data: CodespaceTaskData[]
|
|
156
|
-
total_count: number
|
|
157
|
-
message: string
|
|
158
|
-
}
|
|
183
|
+
export interface GetCodespaceTasksByProjectResponse extends GetCodespaceTasksCommonResponse {}
|
|
159
184
|
|
|
160
185
|
// Response for getting detailed codespace task with relations
|
|
161
186
|
export interface CodespaceTaskDetailedResponse {
|
|
@@ -248,3 +273,260 @@ export type CodespaceModelsError =
|
|
|
248
273
|
| CodespaceModelNotFoundError
|
|
249
274
|
| AuthenticationRequiredError
|
|
250
275
|
| CodespaceModelsFetchError
|
|
276
|
+
|
|
277
|
+
// ============================================================================
|
|
278
|
+
// Codespace Tasks with Model Information Types
|
|
279
|
+
// ============================================================================
|
|
280
|
+
|
|
281
|
+
export interface AttachmentResponse {
|
|
282
|
+
id: string
|
|
283
|
+
filename: string
|
|
284
|
+
file_data: string
|
|
285
|
+
mime_type: string
|
|
286
|
+
file_size: number
|
|
287
|
+
description?: string
|
|
288
|
+
created_at: string
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
export interface CodespaceTaskModelInDB {
|
|
292
|
+
id: string
|
|
293
|
+
created_at: string
|
|
294
|
+
codespace_task_id: string
|
|
295
|
+
model_id: string
|
|
296
|
+
model_name?: string
|
|
297
|
+
model_key?: string
|
|
298
|
+
provider_id?: string
|
|
299
|
+
provider_name?: string
|
|
300
|
+
execution_mode?: string
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
export interface CodespaceTasksListResponse extends GetCodespaceTasksCommonResponse {}
|
|
304
|
+
|
|
305
|
+
// Common response interface for all paginated codespace task lists
|
|
306
|
+
export interface GetCodespaceTasksCommonResponse {
|
|
307
|
+
status: string
|
|
308
|
+
data: CodespaceTaskData[]
|
|
309
|
+
total_count: number
|
|
310
|
+
message: string
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
// ============================================================================
|
|
315
|
+
// GET /codespace/tasks Endpoint Types
|
|
316
|
+
// ============================================================================
|
|
317
|
+
|
|
318
|
+
// Request parameters for getting codespace tasks
|
|
319
|
+
export interface GetCodespaceTasksRequest {
|
|
320
|
+
task_status?: 'completed' | 'in_progress' | 'failed'
|
|
321
|
+
project_id?: string
|
|
322
|
+
limit?: number
|
|
323
|
+
offset?: number
|
|
324
|
+
sort_by?: 'created_at' | 'updated_at' | 'status' | 'title'
|
|
325
|
+
sort_order?: 'asc' | 'desc'
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
// Attachment data structure for task response
|
|
329
|
+
export interface TaskAttachment {
|
|
330
|
+
id: string
|
|
331
|
+
codespace_task_id: string
|
|
332
|
+
filename: string
|
|
333
|
+
file_url: string
|
|
334
|
+
file_type: string
|
|
335
|
+
file_size: number
|
|
336
|
+
created_at: string
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
// Model information for task response
|
|
340
|
+
export interface TaskModel {
|
|
341
|
+
id: string
|
|
342
|
+
created_at: string
|
|
343
|
+
key: string
|
|
344
|
+
name: string
|
|
345
|
+
provider_id: string
|
|
346
|
+
base_url: string | null
|
|
347
|
+
completion_base_url: string | null
|
|
348
|
+
execution_mode: string
|
|
349
|
+
logo_src: string | null
|
|
350
|
+
provider: {
|
|
351
|
+
id: string
|
|
352
|
+
created_at: string
|
|
353
|
+
name: string
|
|
354
|
+
key: string
|
|
355
|
+
logo_src: string | null
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
// Task model junction table entry
|
|
360
|
+
export interface TaskModelEntry {
|
|
361
|
+
id: string
|
|
362
|
+
codespace_task_id: string
|
|
363
|
+
codespace_model_id: string
|
|
364
|
+
created_at: string
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
// Main task data structure for /codespace/tasks response
|
|
368
|
+
// Uses the same CodespaceTaskData interface defined above
|
|
369
|
+
|
|
370
|
+
// Response for GET /codespace/tasks endpoint
|
|
371
|
+
export interface GetCodespaceTasksResponse extends GetCodespaceTasksCommonResponse {}
|
|
372
|
+
|
|
373
|
+
// ============================================================================
|
|
374
|
+
// GET /tasks/by-codespace-id/{codespace_task_id} Endpoint Types
|
|
375
|
+
// ============================================================================
|
|
376
|
+
|
|
377
|
+
// Request parameters for GET /tasks/by-codespace-id/{codespace_task_id} endpoint
|
|
378
|
+
export interface GetTasksByCodespaceIdRequest {
|
|
379
|
+
codespace_task_id: string
|
|
380
|
+
limit?: number // Maximum number of tasks to return (default: 50, max: 100)
|
|
381
|
+
offset?: number // Number of tasks to skip for pagination (default: 0)
|
|
382
|
+
sort_by?: 'created_at' | 'updated_at' | 'status' | 'title' // Field to sort by (default: created_at)
|
|
383
|
+
sort_order?: 'asc' | 'desc' // Sort order (default: desc)
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
// Response for GET /tasks/by-codespace-id/{codespace_task_id} endpoint
|
|
387
|
+
export interface GetTasksByCodespaceIdResponse {
|
|
388
|
+
status: string
|
|
389
|
+
data: CodespaceTaskData[]
|
|
390
|
+
total_count: number
|
|
391
|
+
message: string
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
// ============================================================================
|
|
395
|
+
// Final Report Popup State Types
|
|
396
|
+
// ============================================================================
|
|
397
|
+
|
|
398
|
+
export interface UpdateFinalReportPopupStateRequest {
|
|
399
|
+
final_report_popup_state: 'not_ready' | 'open' | 'closed'
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
export interface UpdateFinalReportPopupStateResponse {
|
|
403
|
+
status: string
|
|
404
|
+
message: string
|
|
405
|
+
codespace_task_id: string
|
|
406
|
+
final_report_popup_state: 'not_ready' | 'open' | 'closed'
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
// ============================================================================
|
|
410
|
+
// Codespace Task Logs Types
|
|
411
|
+
// ============================================================================
|
|
412
|
+
|
|
413
|
+
// Log type union for type safety
|
|
414
|
+
export type CodespaceLogType = 'thinking' | 'coding' | 'info' | 'error' | 'success'
|
|
415
|
+
|
|
416
|
+
// Single log entry structure
|
|
417
|
+
export interface CodespaceTaskLog {
|
|
418
|
+
id: string
|
|
419
|
+
codespace_task_id: string
|
|
420
|
+
step_name: string
|
|
421
|
+
log_type: CodespaceLogType
|
|
422
|
+
message: string
|
|
423
|
+
created_at: string // ISO timestamp
|
|
424
|
+
progress_percentage?: number // 0-100
|
|
425
|
+
metadata?: Record<string, any>
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
// Request parameters for getting paginated logs
|
|
429
|
+
export interface GetCodespaceTaskLogsRequest {
|
|
430
|
+
codespace_task_id: string
|
|
431
|
+
limit?: number // 1-500, default: 50
|
|
432
|
+
offset?: number // default: 0
|
|
433
|
+
log_type?: CodespaceLogType // Filter by log type
|
|
434
|
+
step_name?: string // Filter by step name (partial matching)
|
|
435
|
+
search?: string // Search in message content
|
|
436
|
+
sort_by?: 'created_at' | 'step_name' | 'log_type' // Sort field, default: created_at
|
|
437
|
+
sort_order?: 'asc' | 'desc' // Sort order, default: desc
|
|
438
|
+
since?: string // Get logs after timestamp (ISO format)
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
// Response for paginated logs request
|
|
442
|
+
export interface CodespaceTaskLogsResponse {
|
|
443
|
+
status: string
|
|
444
|
+
data: CodespaceTaskLog[]
|
|
445
|
+
total_count: number
|
|
446
|
+
has_more: boolean
|
|
447
|
+
next_offset?: number
|
|
448
|
+
message: string
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
// Request parameters for streaming logs
|
|
452
|
+
export interface StreamCodespaceTaskLogsRequest {
|
|
453
|
+
codespace_task_id: string
|
|
454
|
+
since?: string // Start from timestamp (ISO format)
|
|
455
|
+
timeout?: number // Stream timeout in seconds (30-1800, default: 300)
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
// Event types for streaming (for TypeScript interfaces)
|
|
459
|
+
export interface StreamLogEvent {
|
|
460
|
+
event: 'log'
|
|
461
|
+
data: CodespaceTaskLog
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
export interface StreamHeartbeatEvent {
|
|
465
|
+
event: 'heartbeat'
|
|
466
|
+
data: {
|
|
467
|
+
timestamp: string
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
export interface StreamCompleteEvent {
|
|
472
|
+
event: 'complete'
|
|
473
|
+
data: {
|
|
474
|
+
message: string
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
export interface StreamTimeoutEvent {
|
|
479
|
+
event: 'timeout'
|
|
480
|
+
data: {
|
|
481
|
+
message: string
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
export interface StreamErrorEvent {
|
|
486
|
+
event: 'error'
|
|
487
|
+
data: {
|
|
488
|
+
error: string
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
// Union type for all possible stream events
|
|
493
|
+
export type CodespaceLogStreamEvent =
|
|
494
|
+
| StreamLogEvent
|
|
495
|
+
| StreamHeartbeatEvent
|
|
496
|
+
| StreamCompleteEvent
|
|
497
|
+
| StreamTimeoutEvent
|
|
498
|
+
| StreamErrorEvent
|
|
499
|
+
|
|
500
|
+
// ============================================================================
|
|
501
|
+
// Project Summary Endpoint Types
|
|
502
|
+
// ============================================================================
|
|
503
|
+
|
|
504
|
+
// Request parameters for project codespace summary
|
|
505
|
+
export interface GetCodespaceProjectSummaryRequest {
|
|
506
|
+
project_id: string
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
// Status summary interface
|
|
510
|
+
export interface CodespaceStatusSummary {
|
|
511
|
+
pending: number
|
|
512
|
+
in_progress: number
|
|
513
|
+
completed: number
|
|
514
|
+
failed: number
|
|
515
|
+
blocked: number
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
// Response data structure for project summary
|
|
519
|
+
export interface CodespaceProjectSummaryData {
|
|
520
|
+
project_id: string
|
|
521
|
+
total_codespace_tasks: number
|
|
522
|
+
status_summary: CodespaceStatusSummary
|
|
523
|
+
latest_task_created_at: string
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
// Response for project codespace summary endpoint
|
|
527
|
+
export interface GetCodespaceProjectSummaryResponse {
|
|
528
|
+
status: string
|
|
529
|
+
data: CodespaceProjectSummaryData
|
|
530
|
+
message: string
|
|
531
|
+
}
|
|
532
|
+
|
|
@@ -13,6 +13,8 @@ export type {
|
|
|
13
13
|
CodespaceTaskData,
|
|
14
14
|
TechnicalDocument,
|
|
15
15
|
GetProjectTasksByCodespaceResponse,
|
|
16
|
+
CodespaceProjectTask,
|
|
17
|
+
CodespaceProjectTaskListResponse,
|
|
16
18
|
CodespaceQuestionnaireRequest,
|
|
17
19
|
CodespaceQuestionnaireResponse,
|
|
18
20
|
// Codespace Models Types
|
|
@@ -25,5 +27,23 @@ export type {
|
|
|
25
27
|
GetLLMModelProvidersResponse,
|
|
26
28
|
GetLLMModelProviderResponse,
|
|
27
29
|
GetModelsByProviderResponse,
|
|
28
|
-
CodespaceModelsError
|
|
30
|
+
CodespaceModelsError,
|
|
31
|
+
// Final Report Popup State Types
|
|
32
|
+
UpdateFinalReportPopupStateRequest,
|
|
33
|
+
UpdateFinalReportPopupStateResponse,
|
|
34
|
+
// Codespace Task Logs Types
|
|
35
|
+
GetCodespaceTaskLogsRequest,
|
|
36
|
+
CodespaceTaskLogsResponse,
|
|
37
|
+
StreamCodespaceTaskLogsRequest,
|
|
38
|
+
CodespaceTaskLog,
|
|
39
|
+
CodespaceLogType,
|
|
40
|
+
CodespaceLogStreamEvent,
|
|
41
|
+
// GET /tasks/by-codespace-id Types
|
|
42
|
+
GetTasksByCodespaceIdRequest,
|
|
43
|
+
GetTasksByCodespaceIdResponse,
|
|
44
|
+
// Project Summary Types
|
|
45
|
+
GetCodespaceProjectSummaryRequest,
|
|
46
|
+
GetCodespaceProjectSummaryResponse,
|
|
47
|
+
CodespaceStatusSummary,
|
|
48
|
+
CodespaceProjectSummaryData
|
|
29
49
|
} from './codespace-types'
|
package/services/index.ts
CHANGED
|
@@ -20,6 +20,7 @@ export { CodespaceService } from './codespace'
|
|
|
20
20
|
export { ExternalTokenService } from './external-tokens'
|
|
21
21
|
export { SecurityKeysService } from './security-keys'
|
|
22
22
|
export { UserService } from './users'
|
|
23
|
+
export { StarterKitsService } from './starter-kits'
|
|
23
24
|
|
|
24
25
|
// Re-export all types for convenience
|
|
25
26
|
export * from './generation'
|
|
@@ -34,3 +35,4 @@ export * from './codespace'
|
|
|
34
35
|
export * from './external-tokens'
|
|
35
36
|
export * from './security-keys'
|
|
36
37
|
export * from './users'
|
|
38
|
+
export * from './starter-kits'
|
|
@@ -72,14 +72,20 @@ interface PaginatedProjectsRequest {
|
|
|
72
72
|
```typescript
|
|
73
73
|
interface ProjectRepository {
|
|
74
74
|
id: string
|
|
75
|
-
|
|
75
|
+
name: string
|
|
76
76
|
repo_url: string
|
|
77
77
|
branch: string
|
|
78
|
+
project_id: string
|
|
79
|
+
user_id: string
|
|
80
|
+
files_processed: number
|
|
81
|
+
total_characters: number
|
|
82
|
+
total_lines: number
|
|
83
|
+
total_files_found: number
|
|
84
|
+
total_directories: number
|
|
78
85
|
author: string
|
|
79
|
-
|
|
80
|
-
|
|
86
|
+
estimated_tokens: number
|
|
87
|
+
estimated_size_bytes: number
|
|
81
88
|
created_at: string
|
|
82
|
-
updated_at: string
|
|
83
89
|
}
|
|
84
90
|
```
|
|
85
91
|
|
|
@@ -90,18 +96,29 @@ interface Project {
|
|
|
90
96
|
id: string
|
|
91
97
|
title: string
|
|
92
98
|
description: string
|
|
93
|
-
|
|
99
|
+
status: string
|
|
100
|
+
category_id: string
|
|
101
|
+
starter_kit_id?: string
|
|
102
|
+
ai_questionaire?: {
|
|
103
|
+
experience_level?: string
|
|
104
|
+
timeline?: string
|
|
105
|
+
team_size?: number
|
|
106
|
+
}
|
|
107
|
+
tools_selected?: string[]
|
|
108
|
+
project_outline?: {
|
|
109
|
+
features?: string[]
|
|
110
|
+
architecture?: string
|
|
111
|
+
}
|
|
112
|
+
codie_tool_id?: string
|
|
113
|
+
existing_project_repo_url?: string | null
|
|
94
114
|
created_at: string
|
|
95
115
|
updated_at: string
|
|
116
|
+
user_id: string
|
|
96
117
|
project_documents: ProjectDocument[]
|
|
97
|
-
project_repositories: ProjectRepository[] // Added for repository information
|
|
98
118
|
category?: Category
|
|
119
|
+
starter_kit?: StarterKitReference
|
|
99
120
|
codie_tool?: CodieTool
|
|
100
|
-
|
|
101
|
-
status?: string
|
|
102
|
-
tools_selected?: string[]
|
|
103
|
-
ai_questionaire?: Record<string, any>
|
|
104
|
-
project_outline?: Record<string, any>
|
|
121
|
+
project_repositories: ProjectRepository[]
|
|
105
122
|
}
|
|
106
123
|
```
|
|
107
124
|
|
|
@@ -171,33 +188,89 @@ const isProjectInFilteredResults = updatedProjects.some(
|
|
|
171
188
|
|
|
172
189
|
## Response Format
|
|
173
190
|
|
|
174
|
-
The API response includes project data with repository information:
|
|
191
|
+
The API response includes comprehensive project data with repository information, categories, starter kits, and codie tools:
|
|
175
192
|
|
|
176
193
|
```json
|
|
177
194
|
{
|
|
178
195
|
"status": "success",
|
|
179
|
-
"data":
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
196
|
+
"data": {
|
|
197
|
+
"id": "550e8400-e29b-41d4-a716-446655440000",
|
|
198
|
+
"title": "E-commerce Platform",
|
|
199
|
+
"description": "A full-stack e-commerce platform with React and Node.js",
|
|
200
|
+
"status": "in_progress",
|
|
201
|
+
"category_id": "cat_123",
|
|
202
|
+
"starter_kit_id": "starter_456",
|
|
203
|
+
"ai_questionaire": {
|
|
204
|
+
"experience_level": "intermediate",
|
|
205
|
+
"timeline": "3 months",
|
|
206
|
+
"team_size": 2
|
|
207
|
+
},
|
|
208
|
+
"tools_selected": ["react", "nodejs", "postgresql", "docker"],
|
|
209
|
+
"project_outline": {
|
|
210
|
+
"features": ["user authentication", "product catalog", "shopping cart", "payment integration"],
|
|
211
|
+
"architecture": "microservices"
|
|
212
|
+
},
|
|
213
|
+
"codie_tool_id": "tool_789",
|
|
214
|
+
"existing_project_repo_url": null,
|
|
215
|
+
"created_at": "2023-10-01T10:00:00Z",
|
|
216
|
+
"updated_at": "2023-10-15T14:30:00Z",
|
|
217
|
+
"user_id": "user_abc123",
|
|
218
|
+
"project_documents": [
|
|
219
|
+
{
|
|
220
|
+
"id": "doc_111",
|
|
221
|
+
"project_id": "550e8400-e29b-41d4-a716-446655440000",
|
|
222
|
+
"user_id": "user_abc123",
|
|
223
|
+
"title": "API Documentation",
|
|
224
|
+
"document_type": "api",
|
|
225
|
+
"description": "REST API endpoints documentation",
|
|
226
|
+
"content": "## API Documentation\n\n### Authentication\n...",
|
|
227
|
+
"custom_document_type": "api_docs",
|
|
228
|
+
"last_action": "document_creation",
|
|
229
|
+
"is_current_version": true,
|
|
230
|
+
"status": "completed",
|
|
231
|
+
"created_at": "2023-10-05T09:00:00Z",
|
|
232
|
+
"updated_at": "2023-10-05T09:00:00Z"
|
|
233
|
+
}
|
|
234
|
+
],
|
|
235
|
+
"category": {
|
|
236
|
+
"id": "cat_123",
|
|
237
|
+
"name": "Web Development",
|
|
238
|
+
"description": "Full-stack web application projects"
|
|
239
|
+
},
|
|
240
|
+
"starter_kit": {
|
|
241
|
+
"id": "starter_456",
|
|
242
|
+
"name": "React E-commerce Starter",
|
|
243
|
+
"description": "A complete e-commerce starter kit with React, Node.js, and PostgreSQL"
|
|
244
|
+
},
|
|
245
|
+
"codie_tool": {
|
|
246
|
+
"id": "tool_789",
|
|
247
|
+
"name": "Code Generator Pro",
|
|
248
|
+
"description": "AI-powered code generation tool",
|
|
249
|
+
"type": "code_generator",
|
|
250
|
+
"api_endpoint": "https://api.example.com/generate",
|
|
251
|
+
"created_at": "2023-09-01T00:00:00Z",
|
|
252
|
+
"updated_at": "2023-09-15T12:00:00Z"
|
|
253
|
+
},
|
|
254
|
+
"project_repositories": [
|
|
255
|
+
{
|
|
256
|
+
"id": "repo_333",
|
|
257
|
+
"name": "ecommerce-platform",
|
|
258
|
+
"repo_url": "https://github.com/user/ecommerce-platform",
|
|
259
|
+
"branch": "main",
|
|
260
|
+
"project_id": "550e8400-e29b-41d4-a716-446655440000",
|
|
261
|
+
"user_id": "user_abc123",
|
|
262
|
+
"files_processed": 150,
|
|
263
|
+
"total_characters": 125000,
|
|
264
|
+
"total_lines": 4500,
|
|
265
|
+
"total_files_found": 180,
|
|
266
|
+
"total_directories": 25,
|
|
267
|
+
"author": "John Doe",
|
|
268
|
+
"estimated_tokens": 150000,
|
|
269
|
+
"estimated_size_bytes": 512000,
|
|
270
|
+
"created_at": "2023-10-02T11:00:00Z"
|
|
271
|
+
}
|
|
272
|
+
]
|
|
273
|
+
}
|
|
201
274
|
}
|
|
202
275
|
```
|
|
203
276
|
|