codmir 0.4.1 → 0.6.1
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/README.md +116 -456
- package/dist/{chunk-EBO3CZXG.mjs → chunk-3RG5ZIWI.js} +1 -6
- package/dist/chunk-5XZIEJ3P.js +231 -0
- package/dist/chunk-BQMZNWYV.js +295 -0
- package/dist/context/index.js +9 -0
- package/dist/index.js +10046 -302
- package/dist/sync/index.js +7 -0
- package/package.json +55 -76
- package/LICENSE +0 -55
- package/dist/analyze-LULBI4ZC.mjs +0 -7
- package/dist/chunk-ASGAT3Z5.mjs +0 -756
- package/dist/chunk-GU32P57R.mjs +0 -343
- package/dist/cli/index.d.mts +0 -1
- package/dist/cli/index.d.ts +0 -1
- package/dist/cli/index.js +0 -2668
- package/dist/cli/index.mjs +0 -1533
- package/dist/index.d.mts +0 -295
- package/dist/index.d.ts +0 -295
- package/dist/index.mjs +0 -7
- package/dist/voice-agent/index.d.mts +0 -134
- package/dist/voice-agent/index.d.ts +0 -134
- package/dist/voice-agent/index.js +0 -220
- package/dist/voice-agent/index.mjs +0 -187
- package/dist/voice-daemon/index.d.mts +0 -354
- package/dist/voice-daemon/index.d.ts +0 -354
- package/dist/voice-daemon/index.js +0 -1089
- package/dist/voice-daemon/index.mjs +0 -1046
- package/runkit-example.js +0 -36
package/dist/index.d.mts
DELETED
|
@@ -1,295 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* codmir API Types
|
|
3
|
-
*/
|
|
4
|
-
type TicketStatus = 'BACKLOG' | 'TODO' | 'IN_PROGRESS' | 'DONE' | 'CANCELED' | 'OPEN';
|
|
5
|
-
type TicketPriority = 'LOW' | 'MEDIUM' | 'HIGH' | 'CRITICAL';
|
|
6
|
-
type TicketType = 'TASK' | 'BUG' | 'STORY' | 'EPIC' | 'FEATURE' | 'IMPROVEMENT';
|
|
7
|
-
type TestCasePriority = 'Low' | 'Medium' | 'High';
|
|
8
|
-
type TestCaseStatus = 'Not Started' | 'In Progress' | 'Passed' | 'Failed' | 'Blocked';
|
|
9
|
-
type TestCaseTemplate = 'steps' | 'text';
|
|
10
|
-
interface User {
|
|
11
|
-
id: string;
|
|
12
|
-
name: string | null;
|
|
13
|
-
email: string | null;
|
|
14
|
-
image?: string | null;
|
|
15
|
-
}
|
|
16
|
-
interface Ticket {
|
|
17
|
-
id: string;
|
|
18
|
-
title: string;
|
|
19
|
-
description: string | null;
|
|
20
|
-
status: TicketStatus;
|
|
21
|
-
priority: TicketPriority;
|
|
22
|
-
type?: TicketType | null;
|
|
23
|
-
assigneeId?: string | null;
|
|
24
|
-
assignee?: User | null;
|
|
25
|
-
reporterId?: string | null;
|
|
26
|
-
reporter?: User | null;
|
|
27
|
-
projectId: string;
|
|
28
|
-
workspaceId?: string | null;
|
|
29
|
-
organizationId?: string;
|
|
30
|
-
groupId?: string | null;
|
|
31
|
-
parentId?: string | null;
|
|
32
|
-
teamId?: string | null;
|
|
33
|
-
orderIndex?: number | null;
|
|
34
|
-
labels?: string | null;
|
|
35
|
-
due_date?: Date | null;
|
|
36
|
-
createdAt: Date;
|
|
37
|
-
updatedAt: Date;
|
|
38
|
-
}
|
|
39
|
-
interface CreateTicketInput {
|
|
40
|
-
title: string;
|
|
41
|
-
description?: string;
|
|
42
|
-
status?: TicketStatus | string;
|
|
43
|
-
priority?: TicketPriority | string;
|
|
44
|
-
type?: TicketType;
|
|
45
|
-
assigneeId?: string;
|
|
46
|
-
reporterId?: string;
|
|
47
|
-
groupId?: string;
|
|
48
|
-
parentId?: string;
|
|
49
|
-
teamId?: string;
|
|
50
|
-
labels?: string;
|
|
51
|
-
dueDate?: string;
|
|
52
|
-
order?: number;
|
|
53
|
-
customFields?: Record<string, any>;
|
|
54
|
-
}
|
|
55
|
-
interface UpdateTicketInput extends Partial<CreateTicketInput> {
|
|
56
|
-
id: string;
|
|
57
|
-
}
|
|
58
|
-
interface TestCaseStep {
|
|
59
|
-
action: string;
|
|
60
|
-
expected: string;
|
|
61
|
-
}
|
|
62
|
-
interface TestCase {
|
|
63
|
-
id: string;
|
|
64
|
-
ud?: number;
|
|
65
|
-
title: string;
|
|
66
|
-
status: TestCaseStatus;
|
|
67
|
-
priority: TestCasePriority;
|
|
68
|
-
suiteId: string | null;
|
|
69
|
-
suiteName?: string | null;
|
|
70
|
-
estimate?: string;
|
|
71
|
-
template?: TestCaseTemplate;
|
|
72
|
-
type?: string;
|
|
73
|
-
preconditions?: string;
|
|
74
|
-
steps?: TestCaseStep[];
|
|
75
|
-
stepsText?: string;
|
|
76
|
-
}
|
|
77
|
-
interface CreateTestCaseInput {
|
|
78
|
-
title: string;
|
|
79
|
-
suiteId: string;
|
|
80
|
-
template?: TestCaseTemplate;
|
|
81
|
-
type?: string;
|
|
82
|
-
priority?: TestCasePriority;
|
|
83
|
-
estimate?: string;
|
|
84
|
-
preconditions?: string;
|
|
85
|
-
steps?: TestCaseStep[];
|
|
86
|
-
stepsText?: string;
|
|
87
|
-
}
|
|
88
|
-
interface UpdateTestCaseInput extends Partial<CreateTestCaseInput> {
|
|
89
|
-
status?: TestCaseStatus;
|
|
90
|
-
}
|
|
91
|
-
interface TestRunArtifact {
|
|
92
|
-
label?: string;
|
|
93
|
-
type?: string;
|
|
94
|
-
url: string;
|
|
95
|
-
}
|
|
96
|
-
interface TestRunSummaryInput {
|
|
97
|
-
projectId: string;
|
|
98
|
-
sprintId?: string;
|
|
99
|
-
suite: string;
|
|
100
|
-
framework?: string;
|
|
101
|
-
passCount: number;
|
|
102
|
-
failCount: number;
|
|
103
|
-
flakyCount?: number;
|
|
104
|
-
durationMs?: number;
|
|
105
|
-
commitSha?: string;
|
|
106
|
-
releaseTrainId?: string;
|
|
107
|
-
artifacts?: TestRunArtifact[];
|
|
108
|
-
}
|
|
109
|
-
interface TestRunRecord extends TestRunSummaryInput {
|
|
110
|
-
id: string;
|
|
111
|
-
createdAt: string;
|
|
112
|
-
}
|
|
113
|
-
interface CoverageFeatureBreakdown {
|
|
114
|
-
name: string;
|
|
115
|
-
coverage: number;
|
|
116
|
-
risk?: string;
|
|
117
|
-
}
|
|
118
|
-
interface CoverageInsightRequest {
|
|
119
|
-
projectId: string;
|
|
120
|
-
sprintId?: string;
|
|
121
|
-
linesPct: number;
|
|
122
|
-
branchesPct?: number;
|
|
123
|
-
statementsPct?: number;
|
|
124
|
-
functionsPct?: number;
|
|
125
|
-
features?: CoverageFeatureBreakdown[];
|
|
126
|
-
}
|
|
127
|
-
interface CoverageSuggestedTest {
|
|
128
|
-
title: string;
|
|
129
|
-
reason?: string;
|
|
130
|
-
}
|
|
131
|
-
interface CoverageInsight extends CoverageInsightRequest {
|
|
132
|
-
id: string;
|
|
133
|
-
createdAt: string;
|
|
134
|
-
suggestedTests?: CoverageSuggestedTest[] | null;
|
|
135
|
-
}
|
|
136
|
-
interface ApiResponse<T> {
|
|
137
|
-
data?: T;
|
|
138
|
-
error?: string;
|
|
139
|
-
}
|
|
140
|
-
interface PaginatedResponse<T> {
|
|
141
|
-
data: T[];
|
|
142
|
-
total?: number;
|
|
143
|
-
page?: number;
|
|
144
|
-
pageSize?: number;
|
|
145
|
-
}
|
|
146
|
-
interface CodmirClientConfig {
|
|
147
|
-
apiKey?: string;
|
|
148
|
-
baseUrl?: string;
|
|
149
|
-
timeout?: number;
|
|
150
|
-
headers?: Record<string, string>;
|
|
151
|
-
}
|
|
152
|
-
declare class CodmirError extends Error {
|
|
153
|
-
statusCode?: number | undefined;
|
|
154
|
-
response?: any | undefined;
|
|
155
|
-
constructor(message: string, statusCode?: number | undefined, response?: any | undefined);
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
* Main codmir API Client
|
|
160
|
-
*
|
|
161
|
-
* @example
|
|
162
|
-
* ```typescript
|
|
163
|
-
* const client = new CodmirClient({
|
|
164
|
-
* apiKey: 'your-api-key',
|
|
165
|
-
* baseUrl: 'https://codmir.com'
|
|
166
|
-
* });
|
|
167
|
-
*
|
|
168
|
-
* // Create a ticket
|
|
169
|
-
* const ticket = await client.tickets.create('project-id', {
|
|
170
|
-
* title: 'New feature request',
|
|
171
|
-
* description: 'Add dark mode support',
|
|
172
|
-
* priority: 'HIGH'
|
|
173
|
-
* });
|
|
174
|
-
* ```
|
|
175
|
-
*/
|
|
176
|
-
declare class CodmirClient {
|
|
177
|
-
private readonly config;
|
|
178
|
-
readonly tickets: TicketsAPI;
|
|
179
|
-
readonly testCases: TestCasesAPI;
|
|
180
|
-
readonly testing: TestingAPI;
|
|
181
|
-
constructor(config: CodmirClientConfig);
|
|
182
|
-
/**
|
|
183
|
-
* Make an HTTP request to the codmir API
|
|
184
|
-
*/
|
|
185
|
-
private request;
|
|
186
|
-
private createError;
|
|
187
|
-
}
|
|
188
|
-
/**
|
|
189
|
-
* Tickets API
|
|
190
|
-
*/
|
|
191
|
-
declare class TicketsAPI {
|
|
192
|
-
private config;
|
|
193
|
-
constructor(config: Required<CodmirClientConfig>);
|
|
194
|
-
private request;
|
|
195
|
-
/**
|
|
196
|
-
* Create a ticket in a board
|
|
197
|
-
*
|
|
198
|
-
* @param projectId - The project ID
|
|
199
|
-
* @param boardId - The board ID
|
|
200
|
-
* @param data - Ticket data
|
|
201
|
-
*/
|
|
202
|
-
createInBoard(projectId: string, boardId: string, data: CreateTicketInput): Promise<Ticket>;
|
|
203
|
-
/**
|
|
204
|
-
* Create a ticket in a workspace
|
|
205
|
-
*
|
|
206
|
-
* @param projectId - The project ID
|
|
207
|
-
* @param workspaceId - The workspace ID
|
|
208
|
-
* @param data - Ticket data
|
|
209
|
-
*/
|
|
210
|
-
createInWorkspace(projectId: string, workspaceId: string, data: CreateTicketInput): Promise<Ticket>;
|
|
211
|
-
/**
|
|
212
|
-
* Alias for createInBoard - creates a ticket in a board
|
|
213
|
-
*/
|
|
214
|
-
create(projectId: string, boardId: string, data: CreateTicketInput): Promise<Ticket>;
|
|
215
|
-
}
|
|
216
|
-
/**
|
|
217
|
-
* Test Cases API
|
|
218
|
-
*/
|
|
219
|
-
declare class TestCasesAPI {
|
|
220
|
-
private config;
|
|
221
|
-
constructor(config: Required<CodmirClientConfig>);
|
|
222
|
-
private request;
|
|
223
|
-
/**
|
|
224
|
-
* List all test cases for a project
|
|
225
|
-
*
|
|
226
|
-
* @param projectId - The project ID
|
|
227
|
-
*/
|
|
228
|
-
list(projectId: string): Promise<TestCase[]>;
|
|
229
|
-
/**
|
|
230
|
-
* Get a specific test case by ID
|
|
231
|
-
*
|
|
232
|
-
* @param projectId - The project ID
|
|
233
|
-
* @param testCaseId - The test case ID (numeric UD)
|
|
234
|
-
*/
|
|
235
|
-
get(projectId: string, testCaseId: string | number): Promise<TestCase>;
|
|
236
|
-
/**
|
|
237
|
-
* Create a new test case
|
|
238
|
-
*
|
|
239
|
-
* @param projectId - The project ID
|
|
240
|
-
* @param data - Test case data
|
|
241
|
-
*/
|
|
242
|
-
create(projectId: string, data: CreateTestCaseInput): Promise<{
|
|
243
|
-
id: string;
|
|
244
|
-
title: string;
|
|
245
|
-
}>;
|
|
246
|
-
/**
|
|
247
|
-
* Update an existing test case
|
|
248
|
-
*
|
|
249
|
-
* @param projectId - The project ID
|
|
250
|
-
* @param testCaseId - The test case ID (numeric UD)
|
|
251
|
-
* @param data - Test case update data
|
|
252
|
-
*/
|
|
253
|
-
update(projectId: string, testCaseId: string | number, data: UpdateTestCaseInput): Promise<{
|
|
254
|
-
id: string;
|
|
255
|
-
title: string;
|
|
256
|
-
}>;
|
|
257
|
-
/**
|
|
258
|
-
* Delete a test case
|
|
259
|
-
*
|
|
260
|
-
* @param projectId - The project ID
|
|
261
|
-
* @param testCaseId - The test case ID (numeric UD)
|
|
262
|
-
*/
|
|
263
|
-
delete(projectId: string, testCaseId: string | number): Promise<void>;
|
|
264
|
-
}
|
|
265
|
-
declare class TestingAPI {
|
|
266
|
-
private config;
|
|
267
|
-
constructor(config: Required<CodmirClientConfig>);
|
|
268
|
-
private request;
|
|
269
|
-
submitTestRun(payload: TestRunSummaryInput): Promise<{
|
|
270
|
-
run: TestRunRecord;
|
|
271
|
-
summary: {
|
|
272
|
-
framework: string;
|
|
273
|
-
passRate: number;
|
|
274
|
-
totalDurationMs: number;
|
|
275
|
-
};
|
|
276
|
-
}>;
|
|
277
|
-
listTestRuns(projectId: string, options?: {
|
|
278
|
-
limit?: number;
|
|
279
|
-
suite?: string;
|
|
280
|
-
}): Promise<TestRunRecord[]>;
|
|
281
|
-
requestCoverageInsight(payload: CoverageInsightRequest): Promise<{
|
|
282
|
-
report: CoverageInsight;
|
|
283
|
-
insights: {
|
|
284
|
-
coverageGauge: number;
|
|
285
|
-
featureBreakdown?: CoverageInsightRequest['features'];
|
|
286
|
-
suggestedTests: {
|
|
287
|
-
title: string;
|
|
288
|
-
reason?: string;
|
|
289
|
-
}[];
|
|
290
|
-
};
|
|
291
|
-
}>;
|
|
292
|
-
listCoverageInsights(projectId: string, limit?: number): Promise<CoverageInsight[]>;
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
export { type ApiResponse, CodmirClient, type CodmirClientConfig, CodmirError, type CoverageFeatureBreakdown, type CoverageInsight, type CoverageInsightRequest, type CoverageSuggestedTest, type CreateTestCaseInput, type CreateTicketInput, type PaginatedResponse, type TestCase, type TestCasePriority, type TestCaseStatus, type TestCaseStep, type TestCaseTemplate, type TestRunArtifact, type TestRunRecord, type TestRunSummaryInput, type Ticket, type TicketPriority, type TicketStatus, type TicketType, type UpdateTestCaseInput, type UpdateTicketInput, type User };
|
package/dist/index.d.ts
DELETED
|
@@ -1,295 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* codmir API Types
|
|
3
|
-
*/
|
|
4
|
-
type TicketStatus = 'BACKLOG' | 'TODO' | 'IN_PROGRESS' | 'DONE' | 'CANCELED' | 'OPEN';
|
|
5
|
-
type TicketPriority = 'LOW' | 'MEDIUM' | 'HIGH' | 'CRITICAL';
|
|
6
|
-
type TicketType = 'TASK' | 'BUG' | 'STORY' | 'EPIC' | 'FEATURE' | 'IMPROVEMENT';
|
|
7
|
-
type TestCasePriority = 'Low' | 'Medium' | 'High';
|
|
8
|
-
type TestCaseStatus = 'Not Started' | 'In Progress' | 'Passed' | 'Failed' | 'Blocked';
|
|
9
|
-
type TestCaseTemplate = 'steps' | 'text';
|
|
10
|
-
interface User {
|
|
11
|
-
id: string;
|
|
12
|
-
name: string | null;
|
|
13
|
-
email: string | null;
|
|
14
|
-
image?: string | null;
|
|
15
|
-
}
|
|
16
|
-
interface Ticket {
|
|
17
|
-
id: string;
|
|
18
|
-
title: string;
|
|
19
|
-
description: string | null;
|
|
20
|
-
status: TicketStatus;
|
|
21
|
-
priority: TicketPriority;
|
|
22
|
-
type?: TicketType | null;
|
|
23
|
-
assigneeId?: string | null;
|
|
24
|
-
assignee?: User | null;
|
|
25
|
-
reporterId?: string | null;
|
|
26
|
-
reporter?: User | null;
|
|
27
|
-
projectId: string;
|
|
28
|
-
workspaceId?: string | null;
|
|
29
|
-
organizationId?: string;
|
|
30
|
-
groupId?: string | null;
|
|
31
|
-
parentId?: string | null;
|
|
32
|
-
teamId?: string | null;
|
|
33
|
-
orderIndex?: number | null;
|
|
34
|
-
labels?: string | null;
|
|
35
|
-
due_date?: Date | null;
|
|
36
|
-
createdAt: Date;
|
|
37
|
-
updatedAt: Date;
|
|
38
|
-
}
|
|
39
|
-
interface CreateTicketInput {
|
|
40
|
-
title: string;
|
|
41
|
-
description?: string;
|
|
42
|
-
status?: TicketStatus | string;
|
|
43
|
-
priority?: TicketPriority | string;
|
|
44
|
-
type?: TicketType;
|
|
45
|
-
assigneeId?: string;
|
|
46
|
-
reporterId?: string;
|
|
47
|
-
groupId?: string;
|
|
48
|
-
parentId?: string;
|
|
49
|
-
teamId?: string;
|
|
50
|
-
labels?: string;
|
|
51
|
-
dueDate?: string;
|
|
52
|
-
order?: number;
|
|
53
|
-
customFields?: Record<string, any>;
|
|
54
|
-
}
|
|
55
|
-
interface UpdateTicketInput extends Partial<CreateTicketInput> {
|
|
56
|
-
id: string;
|
|
57
|
-
}
|
|
58
|
-
interface TestCaseStep {
|
|
59
|
-
action: string;
|
|
60
|
-
expected: string;
|
|
61
|
-
}
|
|
62
|
-
interface TestCase {
|
|
63
|
-
id: string;
|
|
64
|
-
ud?: number;
|
|
65
|
-
title: string;
|
|
66
|
-
status: TestCaseStatus;
|
|
67
|
-
priority: TestCasePriority;
|
|
68
|
-
suiteId: string | null;
|
|
69
|
-
suiteName?: string | null;
|
|
70
|
-
estimate?: string;
|
|
71
|
-
template?: TestCaseTemplate;
|
|
72
|
-
type?: string;
|
|
73
|
-
preconditions?: string;
|
|
74
|
-
steps?: TestCaseStep[];
|
|
75
|
-
stepsText?: string;
|
|
76
|
-
}
|
|
77
|
-
interface CreateTestCaseInput {
|
|
78
|
-
title: string;
|
|
79
|
-
suiteId: string;
|
|
80
|
-
template?: TestCaseTemplate;
|
|
81
|
-
type?: string;
|
|
82
|
-
priority?: TestCasePriority;
|
|
83
|
-
estimate?: string;
|
|
84
|
-
preconditions?: string;
|
|
85
|
-
steps?: TestCaseStep[];
|
|
86
|
-
stepsText?: string;
|
|
87
|
-
}
|
|
88
|
-
interface UpdateTestCaseInput extends Partial<CreateTestCaseInput> {
|
|
89
|
-
status?: TestCaseStatus;
|
|
90
|
-
}
|
|
91
|
-
interface TestRunArtifact {
|
|
92
|
-
label?: string;
|
|
93
|
-
type?: string;
|
|
94
|
-
url: string;
|
|
95
|
-
}
|
|
96
|
-
interface TestRunSummaryInput {
|
|
97
|
-
projectId: string;
|
|
98
|
-
sprintId?: string;
|
|
99
|
-
suite: string;
|
|
100
|
-
framework?: string;
|
|
101
|
-
passCount: number;
|
|
102
|
-
failCount: number;
|
|
103
|
-
flakyCount?: number;
|
|
104
|
-
durationMs?: number;
|
|
105
|
-
commitSha?: string;
|
|
106
|
-
releaseTrainId?: string;
|
|
107
|
-
artifacts?: TestRunArtifact[];
|
|
108
|
-
}
|
|
109
|
-
interface TestRunRecord extends TestRunSummaryInput {
|
|
110
|
-
id: string;
|
|
111
|
-
createdAt: string;
|
|
112
|
-
}
|
|
113
|
-
interface CoverageFeatureBreakdown {
|
|
114
|
-
name: string;
|
|
115
|
-
coverage: number;
|
|
116
|
-
risk?: string;
|
|
117
|
-
}
|
|
118
|
-
interface CoverageInsightRequest {
|
|
119
|
-
projectId: string;
|
|
120
|
-
sprintId?: string;
|
|
121
|
-
linesPct: number;
|
|
122
|
-
branchesPct?: number;
|
|
123
|
-
statementsPct?: number;
|
|
124
|
-
functionsPct?: number;
|
|
125
|
-
features?: CoverageFeatureBreakdown[];
|
|
126
|
-
}
|
|
127
|
-
interface CoverageSuggestedTest {
|
|
128
|
-
title: string;
|
|
129
|
-
reason?: string;
|
|
130
|
-
}
|
|
131
|
-
interface CoverageInsight extends CoverageInsightRequest {
|
|
132
|
-
id: string;
|
|
133
|
-
createdAt: string;
|
|
134
|
-
suggestedTests?: CoverageSuggestedTest[] | null;
|
|
135
|
-
}
|
|
136
|
-
interface ApiResponse<T> {
|
|
137
|
-
data?: T;
|
|
138
|
-
error?: string;
|
|
139
|
-
}
|
|
140
|
-
interface PaginatedResponse<T> {
|
|
141
|
-
data: T[];
|
|
142
|
-
total?: number;
|
|
143
|
-
page?: number;
|
|
144
|
-
pageSize?: number;
|
|
145
|
-
}
|
|
146
|
-
interface CodmirClientConfig {
|
|
147
|
-
apiKey?: string;
|
|
148
|
-
baseUrl?: string;
|
|
149
|
-
timeout?: number;
|
|
150
|
-
headers?: Record<string, string>;
|
|
151
|
-
}
|
|
152
|
-
declare class CodmirError extends Error {
|
|
153
|
-
statusCode?: number | undefined;
|
|
154
|
-
response?: any | undefined;
|
|
155
|
-
constructor(message: string, statusCode?: number | undefined, response?: any | undefined);
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
* Main codmir API Client
|
|
160
|
-
*
|
|
161
|
-
* @example
|
|
162
|
-
* ```typescript
|
|
163
|
-
* const client = new CodmirClient({
|
|
164
|
-
* apiKey: 'your-api-key',
|
|
165
|
-
* baseUrl: 'https://codmir.com'
|
|
166
|
-
* });
|
|
167
|
-
*
|
|
168
|
-
* // Create a ticket
|
|
169
|
-
* const ticket = await client.tickets.create('project-id', {
|
|
170
|
-
* title: 'New feature request',
|
|
171
|
-
* description: 'Add dark mode support',
|
|
172
|
-
* priority: 'HIGH'
|
|
173
|
-
* });
|
|
174
|
-
* ```
|
|
175
|
-
*/
|
|
176
|
-
declare class CodmirClient {
|
|
177
|
-
private readonly config;
|
|
178
|
-
readonly tickets: TicketsAPI;
|
|
179
|
-
readonly testCases: TestCasesAPI;
|
|
180
|
-
readonly testing: TestingAPI;
|
|
181
|
-
constructor(config: CodmirClientConfig);
|
|
182
|
-
/**
|
|
183
|
-
* Make an HTTP request to the codmir API
|
|
184
|
-
*/
|
|
185
|
-
private request;
|
|
186
|
-
private createError;
|
|
187
|
-
}
|
|
188
|
-
/**
|
|
189
|
-
* Tickets API
|
|
190
|
-
*/
|
|
191
|
-
declare class TicketsAPI {
|
|
192
|
-
private config;
|
|
193
|
-
constructor(config: Required<CodmirClientConfig>);
|
|
194
|
-
private request;
|
|
195
|
-
/**
|
|
196
|
-
* Create a ticket in a board
|
|
197
|
-
*
|
|
198
|
-
* @param projectId - The project ID
|
|
199
|
-
* @param boardId - The board ID
|
|
200
|
-
* @param data - Ticket data
|
|
201
|
-
*/
|
|
202
|
-
createInBoard(projectId: string, boardId: string, data: CreateTicketInput): Promise<Ticket>;
|
|
203
|
-
/**
|
|
204
|
-
* Create a ticket in a workspace
|
|
205
|
-
*
|
|
206
|
-
* @param projectId - The project ID
|
|
207
|
-
* @param workspaceId - The workspace ID
|
|
208
|
-
* @param data - Ticket data
|
|
209
|
-
*/
|
|
210
|
-
createInWorkspace(projectId: string, workspaceId: string, data: CreateTicketInput): Promise<Ticket>;
|
|
211
|
-
/**
|
|
212
|
-
* Alias for createInBoard - creates a ticket in a board
|
|
213
|
-
*/
|
|
214
|
-
create(projectId: string, boardId: string, data: CreateTicketInput): Promise<Ticket>;
|
|
215
|
-
}
|
|
216
|
-
/**
|
|
217
|
-
* Test Cases API
|
|
218
|
-
*/
|
|
219
|
-
declare class TestCasesAPI {
|
|
220
|
-
private config;
|
|
221
|
-
constructor(config: Required<CodmirClientConfig>);
|
|
222
|
-
private request;
|
|
223
|
-
/**
|
|
224
|
-
* List all test cases for a project
|
|
225
|
-
*
|
|
226
|
-
* @param projectId - The project ID
|
|
227
|
-
*/
|
|
228
|
-
list(projectId: string): Promise<TestCase[]>;
|
|
229
|
-
/**
|
|
230
|
-
* Get a specific test case by ID
|
|
231
|
-
*
|
|
232
|
-
* @param projectId - The project ID
|
|
233
|
-
* @param testCaseId - The test case ID (numeric UD)
|
|
234
|
-
*/
|
|
235
|
-
get(projectId: string, testCaseId: string | number): Promise<TestCase>;
|
|
236
|
-
/**
|
|
237
|
-
* Create a new test case
|
|
238
|
-
*
|
|
239
|
-
* @param projectId - The project ID
|
|
240
|
-
* @param data - Test case data
|
|
241
|
-
*/
|
|
242
|
-
create(projectId: string, data: CreateTestCaseInput): Promise<{
|
|
243
|
-
id: string;
|
|
244
|
-
title: string;
|
|
245
|
-
}>;
|
|
246
|
-
/**
|
|
247
|
-
* Update an existing test case
|
|
248
|
-
*
|
|
249
|
-
* @param projectId - The project ID
|
|
250
|
-
* @param testCaseId - The test case ID (numeric UD)
|
|
251
|
-
* @param data - Test case update data
|
|
252
|
-
*/
|
|
253
|
-
update(projectId: string, testCaseId: string | number, data: UpdateTestCaseInput): Promise<{
|
|
254
|
-
id: string;
|
|
255
|
-
title: string;
|
|
256
|
-
}>;
|
|
257
|
-
/**
|
|
258
|
-
* Delete a test case
|
|
259
|
-
*
|
|
260
|
-
* @param projectId - The project ID
|
|
261
|
-
* @param testCaseId - The test case ID (numeric UD)
|
|
262
|
-
*/
|
|
263
|
-
delete(projectId: string, testCaseId: string | number): Promise<void>;
|
|
264
|
-
}
|
|
265
|
-
declare class TestingAPI {
|
|
266
|
-
private config;
|
|
267
|
-
constructor(config: Required<CodmirClientConfig>);
|
|
268
|
-
private request;
|
|
269
|
-
submitTestRun(payload: TestRunSummaryInput): Promise<{
|
|
270
|
-
run: TestRunRecord;
|
|
271
|
-
summary: {
|
|
272
|
-
framework: string;
|
|
273
|
-
passRate: number;
|
|
274
|
-
totalDurationMs: number;
|
|
275
|
-
};
|
|
276
|
-
}>;
|
|
277
|
-
listTestRuns(projectId: string, options?: {
|
|
278
|
-
limit?: number;
|
|
279
|
-
suite?: string;
|
|
280
|
-
}): Promise<TestRunRecord[]>;
|
|
281
|
-
requestCoverageInsight(payload: CoverageInsightRequest): Promise<{
|
|
282
|
-
report: CoverageInsight;
|
|
283
|
-
insights: {
|
|
284
|
-
coverageGauge: number;
|
|
285
|
-
featureBreakdown?: CoverageInsightRequest['features'];
|
|
286
|
-
suggestedTests: {
|
|
287
|
-
title: string;
|
|
288
|
-
reason?: string;
|
|
289
|
-
}[];
|
|
290
|
-
};
|
|
291
|
-
}>;
|
|
292
|
-
listCoverageInsights(projectId: string, limit?: number): Promise<CoverageInsight[]>;
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
export { type ApiResponse, CodmirClient, type CodmirClientConfig, CodmirError, type CoverageFeatureBreakdown, type CoverageInsight, type CoverageInsightRequest, type CoverageSuggestedTest, type CreateTestCaseInput, type CreateTicketInput, type PaginatedResponse, type TestCase, type TestCasePriority, type TestCaseStatus, type TestCaseStep, type TestCaseTemplate, type TestRunArtifact, type TestRunRecord, type TestRunSummaryInput, type Ticket, type TicketPriority, type TicketStatus, type TicketType, type UpdateTestCaseInput, type UpdateTicketInput, type User };
|