@codeguide/core 0.0.35 → 0.0.36
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/codeguide.ts +6 -0
- package/dist/codeguide.d.ts +3 -1
- package/dist/codeguide.js +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/services/data-management/data-management-service.d.ts +53 -0
- package/dist/services/data-management/data-management-service.js +66 -0
- package/dist/services/data-management/data-management-types.d.ts +149 -0
- package/dist/services/data-management/data-management-types.js +7 -0
- package/dist/services/data-management/index.d.ts +2 -0
- package/dist/services/data-management/index.js +20 -0
- package/dist/services/generation/generation-types.d.ts +29 -1
- package/dist/services/index.d.ts +4 -0
- package/dist/services/index.js +7 -1
- package/dist/services/projects/project-types.d.ts +61 -7
- package/dist/services/prompt-generations/index.d.ts +2 -0
- package/dist/services/prompt-generations/index.js +20 -0
- package/dist/services/prompt-generations/prompt-generations-service.d.ts +47 -0
- package/dist/services/prompt-generations/prompt-generations-service.js +58 -0
- package/dist/services/prompt-generations/prompt-generations-types.d.ts +94 -0
- package/dist/services/prompt-generations/prompt-generations-types.js +2 -0
- package/dist/services/usage/usage-types.d.ts +1 -0
- package/dist/services/users/user-service.d.ts +9 -1
- package/dist/services/users/user-service.js +10 -0
- package/dist/services/users/user-types.d.ts +14 -0
- package/index.ts +7 -0
- package/package.json +1 -1
- package/services/data-management/data-management-service.ts +74 -0
- package/services/data-management/data-management-types.ts +163 -0
- package/services/data-management/index.ts +2 -0
- package/services/generation/generation-types.ts +31 -1
- package/services/index.ts +4 -0
- package/services/projects/project-types.ts +61 -7
- package/services/prompt-generations/index.ts +2 -0
- package/services/prompt-generations/prompt-generations-service.ts +75 -0
- package/services/prompt-generations/prompt-generations-types.ts +101 -0
- package/services/usage/usage-types.ts +1 -0
- package/services/users/user-service.ts +15 -1
- package/services/users/user-types.ts +16 -0
package/codeguide.ts
CHANGED
|
@@ -21,6 +21,8 @@ import {
|
|
|
21
21
|
UserService,
|
|
22
22
|
StarterKitsService,
|
|
23
23
|
ChatService,
|
|
24
|
+
DataManagementService,
|
|
25
|
+
PromptGenerationsService,
|
|
24
26
|
} from './services'
|
|
25
27
|
import { APIServiceConfig, CodeGuideOptions } from './types'
|
|
26
28
|
|
|
@@ -39,6 +41,8 @@ export class CodeGuide {
|
|
|
39
41
|
public users: UserService
|
|
40
42
|
public starterKits: StarterKitsService
|
|
41
43
|
public chat: ChatService
|
|
44
|
+
public dataManagement: DataManagementService
|
|
45
|
+
public promptGenerations: PromptGenerationsService
|
|
42
46
|
private options: CodeGuideOptions
|
|
43
47
|
|
|
44
48
|
constructor(config: APIServiceConfig, options: CodeGuideOptions = {}) {
|
|
@@ -59,6 +63,8 @@ export class CodeGuide {
|
|
|
59
63
|
this.users = new UserService(config)
|
|
60
64
|
this.starterKits = new StarterKitsService(config)
|
|
61
65
|
this.chat = new ChatService(config)
|
|
66
|
+
this.dataManagement = new DataManagementService(config)
|
|
67
|
+
this.promptGenerations = new PromptGenerationsService(config)
|
|
62
68
|
}
|
|
63
69
|
|
|
64
70
|
// Convenience method for backward compatibility
|
package/dist/codeguide.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GenerationService, ProjectService, UsageService, RepositoryAnalysisService, TaskService, ApiKeyEnhancedService, SubscriptionService, CancellationFunnelService, CodespaceService, ExternalTokenService, SecurityKeysService, UserService, StarterKitsService, ChatService } from './services';
|
|
1
|
+
import { GenerationService, ProjectService, UsageService, RepositoryAnalysisService, TaskService, ApiKeyEnhancedService, SubscriptionService, CancellationFunnelService, CodespaceService, ExternalTokenService, SecurityKeysService, UserService, StarterKitsService, ChatService, DataManagementService, PromptGenerationsService } from './services';
|
|
2
2
|
import { APIServiceConfig, CodeGuideOptions } from './types';
|
|
3
3
|
export declare class CodeGuide {
|
|
4
4
|
generation: GenerationService;
|
|
@@ -15,6 +15,8 @@ export declare class CodeGuide {
|
|
|
15
15
|
users: UserService;
|
|
16
16
|
starterKits: StarterKitsService;
|
|
17
17
|
chat: ChatService;
|
|
18
|
+
dataManagement: DataManagementService;
|
|
19
|
+
promptGenerations: PromptGenerationsService;
|
|
18
20
|
private options;
|
|
19
21
|
constructor(config: APIServiceConfig, options?: CodeGuideOptions);
|
|
20
22
|
getGuidance(prompt: string): Promise<any>;
|
package/dist/codeguide.js
CHANGED
|
@@ -30,6 +30,8 @@ class CodeGuide {
|
|
|
30
30
|
this.users = new services_1.UserService(config);
|
|
31
31
|
this.starterKits = new services_1.StarterKitsService(config);
|
|
32
32
|
this.chat = new services_1.ChatService(config);
|
|
33
|
+
this.dataManagement = new services_1.DataManagementService(config);
|
|
34
|
+
this.promptGenerations = new services_1.PromptGenerationsService(config);
|
|
33
35
|
}
|
|
34
36
|
// Convenience method for backward compatibility
|
|
35
37
|
async getGuidance(prompt) {
|
package/dist/index.d.ts
CHANGED
|
@@ -5,3 +5,4 @@ export type { ConnectRepositoryRequest, ConnectRepositoryResponse, ProjectReposi
|
|
|
5
5
|
export type { CreateCodespaceTaskRequestV2 as CreateCodespaceTaskRequest, CreateCodespaceTaskResponseV2 as CreateCodespaceTaskResponse, CreateBackgroundCodespaceTaskRequest, CreateBackgroundCodespaceTaskResponse, ModelApiKey, Attachment, GetCodespaceTaskResponse, CodespaceTaskData, TechnicalDocument, GetProjectTasksByCodespaceResponse, } from './services/codespace/codespace-types';
|
|
6
6
|
export type { StoreExternalTokenRequest, StoreExternalTokenResponse, ListTokensQuery, ListTokensResponse, ValidateTokenRequest, ValidateTokenResponse, FindBestMatchRequest, FindBestMatchResponse, Platform, TokenType, } from './services/external-tokens/external-tokens-types';
|
|
7
7
|
export type { StarterKit, StarterKitMetadata, GetStarterKitsRequest, GetStarterKitsResponse, } from './services/starter-kits/starter-kits-types';
|
|
8
|
+
export type { DataStatsResponse, DeleteAllDataRequest, DeleteAllDataResponse, } from './services/data-management/data-management-types';
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { BaseService } from '../base/base-service';
|
|
2
|
+
import { DataStatsResponse, DeleteAllDataRequest, DeleteAllDataResponse, DataExportResponse } from './data-management-types';
|
|
3
|
+
export declare class DataManagementService extends BaseService {
|
|
4
|
+
/**
|
|
5
|
+
* Get comprehensive statistics of all user data
|
|
6
|
+
*
|
|
7
|
+
* Calls GET /data/stats to retrieve aggregate counts of:
|
|
8
|
+
* - Projects
|
|
9
|
+
* - Project documents
|
|
10
|
+
* - Project repositories
|
|
11
|
+
* - Project tasks
|
|
12
|
+
* - Task groups
|
|
13
|
+
* - Chat conversations
|
|
14
|
+
* - Chat messages
|
|
15
|
+
* - Codespace tasks
|
|
16
|
+
*
|
|
17
|
+
* @returns Promise resolving to DataStatsResponse with counts for each entity type
|
|
18
|
+
*/
|
|
19
|
+
getDataStats(): Promise<DataStatsResponse>;
|
|
20
|
+
/**
|
|
21
|
+
* Export all user data
|
|
22
|
+
*
|
|
23
|
+
* Calls GET /data/export to retrieve complete export of all user data.
|
|
24
|
+
* This includes all projects, documents, repositories, tasks, conversations,
|
|
25
|
+
* messages, and codespace tasks with their full details.
|
|
26
|
+
*
|
|
27
|
+
* Use this for:
|
|
28
|
+
* - Creating backups
|
|
29
|
+
* - Migrating data to another system
|
|
30
|
+
* - Data analysis
|
|
31
|
+
* - Compliance and auditing
|
|
32
|
+
*
|
|
33
|
+
* @returns Promise resolving to DataExportResponse with complete user data
|
|
34
|
+
*/
|
|
35
|
+
exportData(): Promise<DataExportResponse>;
|
|
36
|
+
/**
|
|
37
|
+
* Delete all user data with explicit confirmation
|
|
38
|
+
*
|
|
39
|
+
* Calls DELETE /data/all to perform bulk deletion of all user data.
|
|
40
|
+
* This operation requires confirmation to prevent accidental data loss.
|
|
41
|
+
*
|
|
42
|
+
* The deletion will affect:
|
|
43
|
+
* - All projects (including documents and repositories)
|
|
44
|
+
* - All task groups and project tasks
|
|
45
|
+
* - All chat conversations and messages
|
|
46
|
+
* - All codespace tasks
|
|
47
|
+
*
|
|
48
|
+
* @param request - DeleteAllDataRequest with confirm flag set to true
|
|
49
|
+
* @returns Promise resolving to DeleteAllDataResponse with deletion summary
|
|
50
|
+
* @throws Error if confirmation is not true
|
|
51
|
+
*/
|
|
52
|
+
deleteAllData(request: DeleteAllDataRequest): Promise<DeleteAllDataResponse>;
|
|
53
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DataManagementService = void 0;
|
|
4
|
+
const base_service_1 = require("../base/base-service");
|
|
5
|
+
class DataManagementService extends base_service_1.BaseService {
|
|
6
|
+
/**
|
|
7
|
+
* Get comprehensive statistics of all user data
|
|
8
|
+
*
|
|
9
|
+
* Calls GET /data/stats to retrieve aggregate counts of:
|
|
10
|
+
* - Projects
|
|
11
|
+
* - Project documents
|
|
12
|
+
* - Project repositories
|
|
13
|
+
* - Project tasks
|
|
14
|
+
* - Task groups
|
|
15
|
+
* - Chat conversations
|
|
16
|
+
* - Chat messages
|
|
17
|
+
* - Codespace tasks
|
|
18
|
+
*
|
|
19
|
+
* @returns Promise resolving to DataStatsResponse with counts for each entity type
|
|
20
|
+
*/
|
|
21
|
+
async getDataStats() {
|
|
22
|
+
return this.get('/data/stats');
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Export all user data
|
|
26
|
+
*
|
|
27
|
+
* Calls GET /data/export to retrieve complete export of all user data.
|
|
28
|
+
* This includes all projects, documents, repositories, tasks, conversations,
|
|
29
|
+
* messages, and codespace tasks with their full details.
|
|
30
|
+
*
|
|
31
|
+
* Use this for:
|
|
32
|
+
* - Creating backups
|
|
33
|
+
* - Migrating data to another system
|
|
34
|
+
* - Data analysis
|
|
35
|
+
* - Compliance and auditing
|
|
36
|
+
*
|
|
37
|
+
* @returns Promise resolving to DataExportResponse with complete user data
|
|
38
|
+
*/
|
|
39
|
+
async exportData() {
|
|
40
|
+
return this.get('/data/export');
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Delete all user data with explicit confirmation
|
|
44
|
+
*
|
|
45
|
+
* Calls DELETE /data/all to perform bulk deletion of all user data.
|
|
46
|
+
* This operation requires confirmation to prevent accidental data loss.
|
|
47
|
+
*
|
|
48
|
+
* The deletion will affect:
|
|
49
|
+
* - All projects (including documents and repositories)
|
|
50
|
+
* - All task groups and project tasks
|
|
51
|
+
* - All chat conversations and messages
|
|
52
|
+
* - All codespace tasks
|
|
53
|
+
*
|
|
54
|
+
* @param request - DeleteAllDataRequest with confirm flag set to true
|
|
55
|
+
* @returns Promise resolving to DeleteAllDataResponse with deletion summary
|
|
56
|
+
* @throws Error if confirmation is not true
|
|
57
|
+
*/
|
|
58
|
+
async deleteAllData(request) {
|
|
59
|
+
// Validate confirmation flag to prevent accidental deletion
|
|
60
|
+
if (!request.confirm) {
|
|
61
|
+
throw new Error('Confirmation required. Set confirm: true to delete all data. This action cannot be undone.');
|
|
62
|
+
}
|
|
63
|
+
return this.delete('/data/all');
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
exports.DataManagementService = DataManagementService;
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Data Management Service Types
|
|
3
|
+
*
|
|
4
|
+
* Provides interfaces for viewing data statistics and bulk deleting user data
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Response structure for GET /data/stats endpoint
|
|
8
|
+
* Contains aggregate counts of all user data across the platform
|
|
9
|
+
*/
|
|
10
|
+
export interface DataStatsResponse {
|
|
11
|
+
status: string;
|
|
12
|
+
data: DataStats;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Aggregate statistics for all user data entities
|
|
16
|
+
*/
|
|
17
|
+
export interface DataStats {
|
|
18
|
+
projects: number;
|
|
19
|
+
project_documents: number;
|
|
20
|
+
project_repositories: number;
|
|
21
|
+
project_tasks: number;
|
|
22
|
+
task_groups: number;
|
|
23
|
+
chat_conversations: number;
|
|
24
|
+
chat_messages: number;
|
|
25
|
+
codespace_tasks: number;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Request structure for DELETE /data/all endpoint
|
|
29
|
+
* Requires explicit confirmation to prevent accidental data loss
|
|
30
|
+
*/
|
|
31
|
+
export interface DeleteAllDataRequest {
|
|
32
|
+
confirm: boolean;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Response structure for DELETE /data/all endpoint
|
|
36
|
+
* Provides summary of deleted data counts
|
|
37
|
+
*/
|
|
38
|
+
export interface DeleteAllDataResponse {
|
|
39
|
+
status: string;
|
|
40
|
+
message: string;
|
|
41
|
+
deleted: DataStats;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Response structure for GET /data/export endpoint
|
|
45
|
+
* Contains complete export of all user data
|
|
46
|
+
*/
|
|
47
|
+
export interface DataExportResponse {
|
|
48
|
+
status: string;
|
|
49
|
+
exported_at: string;
|
|
50
|
+
user_id: string;
|
|
51
|
+
data: ExportedData;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Complete exported data containing all user entities
|
|
55
|
+
*/
|
|
56
|
+
export interface ExportedData {
|
|
57
|
+
projects: ExportedProject[];
|
|
58
|
+
project_documents: ExportedProjectDocument[];
|
|
59
|
+
project_repositories: ExportedProjectRepository[];
|
|
60
|
+
project_tasks: ExportedProjectTask[];
|
|
61
|
+
task_groups: ExportedTaskGroup[];
|
|
62
|
+
chat_conversations: ExportedChatConversation[];
|
|
63
|
+
chat_messages: ExportedChatMessage[];
|
|
64
|
+
codespace_tasks: ExportedCodespaceTask[];
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Exported project entity
|
|
68
|
+
*/
|
|
69
|
+
export interface ExportedProject {
|
|
70
|
+
id: string;
|
|
71
|
+
title: string;
|
|
72
|
+
description: string;
|
|
73
|
+
status: string;
|
|
74
|
+
user_id: string;
|
|
75
|
+
created_at: string;
|
|
76
|
+
updated_at: string;
|
|
77
|
+
project_outline?: Record<string, any>;
|
|
78
|
+
ai_questionaire?: Record<string, any>;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Exported project document entity
|
|
82
|
+
*/
|
|
83
|
+
export interface ExportedProjectDocument {
|
|
84
|
+
id: string;
|
|
85
|
+
project_id: string;
|
|
86
|
+
content: string;
|
|
87
|
+
custom_document_type: string;
|
|
88
|
+
is_current_version: boolean;
|
|
89
|
+
created_at: string;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Exported project repository entity
|
|
93
|
+
*/
|
|
94
|
+
export interface ExportedProjectRepository {
|
|
95
|
+
id: string;
|
|
96
|
+
project_id: string;
|
|
97
|
+
repo_url: string;
|
|
98
|
+
created_at: string;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Exported project task entity
|
|
102
|
+
*/
|
|
103
|
+
export interface ExportedProjectTask {
|
|
104
|
+
id: string;
|
|
105
|
+
project_id: string;
|
|
106
|
+
title: string;
|
|
107
|
+
status: string;
|
|
108
|
+
priority: string;
|
|
109
|
+
created_at: string;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Exported task group entity
|
|
113
|
+
*/
|
|
114
|
+
export interface ExportedTaskGroup {
|
|
115
|
+
id: string;
|
|
116
|
+
project_id: string;
|
|
117
|
+
name: string;
|
|
118
|
+
created_at: string;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Exported chat conversation entity
|
|
122
|
+
*/
|
|
123
|
+
export interface ExportedChatConversation {
|
|
124
|
+
id: string;
|
|
125
|
+
title: string;
|
|
126
|
+
model: string;
|
|
127
|
+
created_at: string;
|
|
128
|
+
last_message_at: string;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Exported chat message entity
|
|
132
|
+
*/
|
|
133
|
+
export interface ExportedChatMessage {
|
|
134
|
+
id: string;
|
|
135
|
+
conversation_id: string;
|
|
136
|
+
role: 'user' | 'assistant';
|
|
137
|
+
content: string;
|
|
138
|
+
token_count: number;
|
|
139
|
+
created_at: string;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Exported codespace task entity
|
|
143
|
+
*/
|
|
144
|
+
export interface ExportedCodespaceTask {
|
|
145
|
+
id: string;
|
|
146
|
+
project_id: string;
|
|
147
|
+
status: string;
|
|
148
|
+
created_at: string;
|
|
149
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.DataManagementService = void 0;
|
|
18
|
+
var data_management_service_1 = require("./data-management-service");
|
|
19
|
+
Object.defineProperty(exports, "DataManagementService", { enumerable: true, get: function () { return data_management_service_1.DataManagementService; } });
|
|
20
|
+
__exportStar(require("./data-management-types"), exports);
|
|
@@ -130,9 +130,37 @@ export interface GenerateAnswersResponse {
|
|
|
130
130
|
answer: string;
|
|
131
131
|
}>;
|
|
132
132
|
}
|
|
133
|
+
export type ProjectMode = 'prd_only' | 'full_application' | 'prototype' | 'mvp';
|
|
134
|
+
export interface ProjectOutline {
|
|
135
|
+
core_features: Array<{
|
|
136
|
+
id: number;
|
|
137
|
+
title: string;
|
|
138
|
+
description: string;
|
|
139
|
+
icon_key: string;
|
|
140
|
+
}>;
|
|
141
|
+
app_flow: Array<{
|
|
142
|
+
id: number;
|
|
143
|
+
title: string;
|
|
144
|
+
description: string;
|
|
145
|
+
}>;
|
|
146
|
+
tech_stack: Array<{
|
|
147
|
+
id: number;
|
|
148
|
+
type: string;
|
|
149
|
+
name: string;
|
|
150
|
+
icon_key: string;
|
|
151
|
+
}>;
|
|
152
|
+
document_types: Array<{
|
|
153
|
+
id: number;
|
|
154
|
+
name: string;
|
|
155
|
+
description: string;
|
|
156
|
+
}>;
|
|
157
|
+
is_generated: boolean;
|
|
158
|
+
project_mode: ProjectMode;
|
|
159
|
+
}
|
|
133
160
|
export interface GenerateProjectOutlineRequest {
|
|
134
161
|
description: string;
|
|
135
162
|
project_type: string;
|
|
163
|
+
project_mode?: ProjectMode;
|
|
136
164
|
title?: string;
|
|
137
165
|
selected_tools?: string[];
|
|
138
166
|
answers?: Record<string, any>;
|
|
@@ -140,7 +168,7 @@ export interface GenerateProjectOutlineRequest {
|
|
|
140
168
|
category_id?: string;
|
|
141
169
|
}
|
|
142
170
|
export interface GenerateProjectOutlineResponse {
|
|
143
|
-
|
|
171
|
+
project_outline: ProjectOutline;
|
|
144
172
|
project_id: string;
|
|
145
173
|
project_created: boolean;
|
|
146
174
|
}
|
package/dist/services/index.d.ts
CHANGED
|
@@ -14,6 +14,8 @@ export { UserService } from './users';
|
|
|
14
14
|
export { StarterKitsService } from './starter-kits';
|
|
15
15
|
export { StreamingService } from './streaming';
|
|
16
16
|
export { ChatService } from './chat';
|
|
17
|
+
export { DataManagementService } from './data-management';
|
|
18
|
+
export { PromptGenerationsService } from './prompt-generations';
|
|
17
19
|
export * from './generation';
|
|
18
20
|
export * from './projects';
|
|
19
21
|
export * from './usage';
|
|
@@ -29,3 +31,5 @@ export * from './users';
|
|
|
29
31
|
export * from './starter-kits';
|
|
30
32
|
export * from './streaming';
|
|
31
33
|
export * from './chat';
|
|
34
|
+
export * from './data-management';
|
|
35
|
+
export * from './prompt-generations';
|
package/dist/services/index.js
CHANGED
|
@@ -17,7 +17,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
17
17
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
18
|
};
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.ChatService = exports.StreamingService = exports.StarterKitsService = exports.UserService = exports.SecurityKeysService = exports.ExternalTokenService = exports.CodespaceService = exports.CancellationFunnelService = exports.SubscriptionService = exports.ApiKeyEnhancedService = exports.TaskService = exports.RepositoryAnalysisService = exports.UsageService = exports.ProjectService = exports.GenerationService = exports.BaseService = void 0;
|
|
20
|
+
exports.PromptGenerationsService = exports.DataManagementService = exports.ChatService = exports.StreamingService = exports.StarterKitsService = exports.UserService = exports.SecurityKeysService = exports.ExternalTokenService = exports.CodespaceService = exports.CancellationFunnelService = exports.SubscriptionService = exports.ApiKeyEnhancedService = exports.TaskService = exports.RepositoryAnalysisService = exports.UsageService = exports.ProjectService = exports.GenerationService = exports.BaseService = void 0;
|
|
21
21
|
const dotenv_1 = __importDefault(require("dotenv"));
|
|
22
22
|
const path_1 = __importDefault(require("path"));
|
|
23
23
|
// Load environment variables from project root
|
|
@@ -57,6 +57,10 @@ var streaming_1 = require("./streaming");
|
|
|
57
57
|
Object.defineProperty(exports, "StreamingService", { enumerable: true, get: function () { return streaming_1.StreamingService; } });
|
|
58
58
|
var chat_1 = require("./chat");
|
|
59
59
|
Object.defineProperty(exports, "ChatService", { enumerable: true, get: function () { return chat_1.ChatService; } });
|
|
60
|
+
var data_management_1 = require("./data-management");
|
|
61
|
+
Object.defineProperty(exports, "DataManagementService", { enumerable: true, get: function () { return data_management_1.DataManagementService; } });
|
|
62
|
+
var prompt_generations_1 = require("./prompt-generations");
|
|
63
|
+
Object.defineProperty(exports, "PromptGenerationsService", { enumerable: true, get: function () { return prompt_generations_1.PromptGenerationsService; } });
|
|
60
64
|
// Re-export all types for convenience
|
|
61
65
|
__exportStar(require("./generation"), exports);
|
|
62
66
|
__exportStar(require("./projects"), exports);
|
|
@@ -73,3 +77,5 @@ __exportStar(require("./users"), exports);
|
|
|
73
77
|
__exportStar(require("./starter-kits"), exports);
|
|
74
78
|
__exportStar(require("./streaming"), exports);
|
|
75
79
|
__exportStar(require("./chat"), exports);
|
|
80
|
+
__exportStar(require("./data-management"), exports);
|
|
81
|
+
__exportStar(require("./prompt-generations"), exports);
|
|
@@ -30,8 +30,26 @@ export interface Project {
|
|
|
30
30
|
};
|
|
31
31
|
tools_selected?: string[];
|
|
32
32
|
project_outline?: {
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
core_features?: Array<{
|
|
34
|
+
id?: number;
|
|
35
|
+
title?: string;
|
|
36
|
+
description?: string;
|
|
37
|
+
icon_key?: string;
|
|
38
|
+
}>;
|
|
39
|
+
app_flow?: Array<{
|
|
40
|
+
id?: number;
|
|
41
|
+
title?: string;
|
|
42
|
+
description?: string;
|
|
43
|
+
}>;
|
|
44
|
+
tech_stack?: Array<{
|
|
45
|
+
id?: number;
|
|
46
|
+
type?: string;
|
|
47
|
+
name?: string;
|
|
48
|
+
icon_key?: string;
|
|
49
|
+
}>;
|
|
50
|
+
document_types?: string[];
|
|
51
|
+
is_generated?: boolean;
|
|
52
|
+
project_mode?: 'prd_only' | 'full_application' | 'prototype' | 'mvp';
|
|
35
53
|
};
|
|
36
54
|
codie_tool_id?: string;
|
|
37
55
|
existing_project_repo_url?: string | null;
|
|
@@ -87,7 +105,7 @@ export interface StarterKitReference {
|
|
|
87
105
|
}
|
|
88
106
|
export interface CreateProjectRequest {
|
|
89
107
|
title?: string;
|
|
90
|
-
description
|
|
108
|
+
description?: string;
|
|
91
109
|
status?: 'prompt' | 'draft' | 'in_progress' | 'completed';
|
|
92
110
|
category_id?: string;
|
|
93
111
|
starter_kit_id?: string;
|
|
@@ -98,8 +116,26 @@ export interface CreateProjectRequest {
|
|
|
98
116
|
};
|
|
99
117
|
tools_selected?: string[];
|
|
100
118
|
project_outline?: {
|
|
101
|
-
|
|
102
|
-
|
|
119
|
+
core_features?: Array<{
|
|
120
|
+
id?: number;
|
|
121
|
+
title?: string;
|
|
122
|
+
description?: string;
|
|
123
|
+
icon_key?: string;
|
|
124
|
+
}>;
|
|
125
|
+
app_flow?: Array<{
|
|
126
|
+
id?: number;
|
|
127
|
+
title?: string;
|
|
128
|
+
description?: string;
|
|
129
|
+
}>;
|
|
130
|
+
tech_stack?: Array<{
|
|
131
|
+
id?: number;
|
|
132
|
+
type?: string;
|
|
133
|
+
name?: string;
|
|
134
|
+
icon_key?: string;
|
|
135
|
+
}>;
|
|
136
|
+
document_types?: string[];
|
|
137
|
+
is_generated?: boolean;
|
|
138
|
+
project_mode?: 'prd_only' | 'full_application' | 'prototype' | 'mvp';
|
|
103
139
|
};
|
|
104
140
|
codie_tool_id?: string;
|
|
105
141
|
existing_project_repo_url?: string;
|
|
@@ -117,8 +153,26 @@ export interface UpdateProjectRequest {
|
|
|
117
153
|
};
|
|
118
154
|
tools_selected?: string[];
|
|
119
155
|
project_outline?: {
|
|
120
|
-
|
|
121
|
-
|
|
156
|
+
core_features?: Array<{
|
|
157
|
+
id?: number;
|
|
158
|
+
title?: string;
|
|
159
|
+
description?: string;
|
|
160
|
+
icon_key?: string;
|
|
161
|
+
}>;
|
|
162
|
+
app_flow?: Array<{
|
|
163
|
+
id?: number;
|
|
164
|
+
title?: string;
|
|
165
|
+
description?: string;
|
|
166
|
+
}>;
|
|
167
|
+
tech_stack?: Array<{
|
|
168
|
+
id?: number;
|
|
169
|
+
type?: string;
|
|
170
|
+
name?: string;
|
|
171
|
+
icon_key?: string;
|
|
172
|
+
}>;
|
|
173
|
+
document_types?: string[];
|
|
174
|
+
is_generated?: boolean;
|
|
175
|
+
project_mode?: 'prd_only' | 'full_application' | 'prototype' | 'mvp';
|
|
122
176
|
};
|
|
123
177
|
codie_tool_id?: string;
|
|
124
178
|
existing_project_repo_url?: string;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.PromptGenerationsService = void 0;
|
|
18
|
+
var prompt_generations_service_1 = require("./prompt-generations-service");
|
|
19
|
+
Object.defineProperty(exports, "PromptGenerationsService", { enumerable: true, get: function () { return prompt_generations_service_1.PromptGenerationsService; } });
|
|
20
|
+
__exportStar(require("./prompt-generations-types"), exports);
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { BaseService } from '../base/base-service';
|
|
2
|
+
import { CreatePromptGenerationRequest, CreatePromptGenerationResponse, ListPromptGenerationsResponse, GetPromptGenerationResponse, DeletePromptGenerationResponse } from './prompt-generations-types';
|
|
3
|
+
export declare class PromptGenerationsService extends BaseService {
|
|
4
|
+
/**
|
|
5
|
+
* Create a new AI system prompt generation
|
|
6
|
+
*
|
|
7
|
+
* Generates a new AI system prompt based on user input using GPT-5.1.
|
|
8
|
+
*
|
|
9
|
+
* POST /prompt-generations/
|
|
10
|
+
*
|
|
11
|
+
* @param request - The prompt generation request parameters
|
|
12
|
+
* @returns Promise resolving to the created prompt generation data
|
|
13
|
+
*/
|
|
14
|
+
createPromptGeneration(request: CreatePromptGenerationRequest): Promise<CreatePromptGenerationResponse>;
|
|
15
|
+
/**
|
|
16
|
+
* List all prompt generations for the authenticated user
|
|
17
|
+
*
|
|
18
|
+
* Retrieves all prompt generations that belong to the current user.
|
|
19
|
+
*
|
|
20
|
+
* GET /prompt-generations/
|
|
21
|
+
*
|
|
22
|
+
* @returns Promise resolving to an array of prompt generations
|
|
23
|
+
*/
|
|
24
|
+
listPromptGenerations(): Promise<ListPromptGenerationsResponse>;
|
|
25
|
+
/**
|
|
26
|
+
* Get a specific prompt generation by ID
|
|
27
|
+
*
|
|
28
|
+
* Retrieves detailed information about a single prompt generation.
|
|
29
|
+
*
|
|
30
|
+
* GET /prompt-generations/{generation_id}
|
|
31
|
+
*
|
|
32
|
+
* @param generationId - The UUID of the prompt generation to retrieve
|
|
33
|
+
* @returns Promise resolving to the prompt generation data
|
|
34
|
+
*/
|
|
35
|
+
getPromptGeneration(generationId: string): Promise<GetPromptGenerationResponse>;
|
|
36
|
+
/**
|
|
37
|
+
* Delete a specific prompt generation by ID
|
|
38
|
+
*
|
|
39
|
+
* Permanently removes a prompt generation from the database.
|
|
40
|
+
*
|
|
41
|
+
* DELETE /prompt-generations/{generation_id}
|
|
42
|
+
*
|
|
43
|
+
* @param generationId - The UUID of the prompt generation to delete
|
|
44
|
+
* @returns Promise resolving to the deleted prompt generation data
|
|
45
|
+
*/
|
|
46
|
+
deletePromptGeneration(generationId: string): Promise<DeletePromptGenerationResponse>;
|
|
47
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PromptGenerationsService = void 0;
|
|
4
|
+
const base_service_1 = require("../base/base-service");
|
|
5
|
+
class PromptGenerationsService extends base_service_1.BaseService {
|
|
6
|
+
/**
|
|
7
|
+
* Create a new AI system prompt generation
|
|
8
|
+
*
|
|
9
|
+
* Generates a new AI system prompt based on user input using GPT-5.1.
|
|
10
|
+
*
|
|
11
|
+
* POST /prompt-generations/
|
|
12
|
+
*
|
|
13
|
+
* @param request - The prompt generation request parameters
|
|
14
|
+
* @returns Promise resolving to the created prompt generation data
|
|
15
|
+
*/
|
|
16
|
+
async createPromptGeneration(request) {
|
|
17
|
+
return this.post('/prompt-generations/', request);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* List all prompt generations for the authenticated user
|
|
21
|
+
*
|
|
22
|
+
* Retrieves all prompt generations that belong to the current user.
|
|
23
|
+
*
|
|
24
|
+
* GET /prompt-generations/
|
|
25
|
+
*
|
|
26
|
+
* @returns Promise resolving to an array of prompt generations
|
|
27
|
+
*/
|
|
28
|
+
async listPromptGenerations() {
|
|
29
|
+
return this.get('/prompt-generations/');
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Get a specific prompt generation by ID
|
|
33
|
+
*
|
|
34
|
+
* Retrieves detailed information about a single prompt generation.
|
|
35
|
+
*
|
|
36
|
+
* GET /prompt-generations/{generation_id}
|
|
37
|
+
*
|
|
38
|
+
* @param generationId - The UUID of the prompt generation to retrieve
|
|
39
|
+
* @returns Promise resolving to the prompt generation data
|
|
40
|
+
*/
|
|
41
|
+
async getPromptGeneration(generationId) {
|
|
42
|
+
return this.get(`/prompt-generations/${generationId}`);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Delete a specific prompt generation by ID
|
|
46
|
+
*
|
|
47
|
+
* Permanently removes a prompt generation from the database.
|
|
48
|
+
*
|
|
49
|
+
* DELETE /prompt-generations/{generation_id}
|
|
50
|
+
*
|
|
51
|
+
* @param generationId - The UUID of the prompt generation to delete
|
|
52
|
+
* @returns Promise resolving to the deleted prompt generation data
|
|
53
|
+
*/
|
|
54
|
+
async deletePromptGeneration(generationId) {
|
|
55
|
+
return this.delete(`/prompt-generations/${generationId}`);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
exports.PromptGenerationsService = PromptGenerationsService;
|