• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stacklok / codegate-ui / 12949002354

24 Jan 2025 11:46AM CUT coverage: 71.054% (+1.8%) from 69.253%
12949002354

Pull #185

github

web-flow
Merge ce98c6cc8 into 646ed5a6b
Pull Request #185: feat: implement hard delete for workspaces

334 of 576 branches covered (57.99%)

Branch coverage included in aggregate %.

94 of 115 new or added lines in 18 files covered. (81.74%)

2 existing lines in 2 files now uncovered.

724 of 913 relevant lines covered (79.3%)

65.31 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

86.15
/src/api/generated/sdk.gen.ts
1
// This file is auto-generated by @hey-api/openapi-ts
2

3
import {
4
  createClient,
5
  createConfig,
6
  type OptionsLegacyParser,
7
} from "@hey-api/client-fetch";
8
import type {
9
  HealthCheckHealthGetError,
10
  HealthCheckHealthGetResponse,
11
  V1ListWorkspacesError,
12
  V1ListWorkspacesResponse,
13
  V1CreateWorkspaceData,
14
  V1CreateWorkspaceError,
15
  V1CreateWorkspaceResponse,
16
  V1ListActiveWorkspacesError,
17
  V1ListActiveWorkspacesResponse,
18
  V1ActivateWorkspaceData,
19
  V1ActivateWorkspaceError,
20
  V1ActivateWorkspaceResponse,
21
  V1DeleteWorkspaceData,
22
  V1DeleteWorkspaceError,
23
  V1DeleteWorkspaceResponse,
24
  V1ListArchivedWorkspacesError,
25
  V1ListArchivedWorkspacesResponse,
26
  V1RecoverWorkspaceData,
27
  V1RecoverWorkspaceError,
28
  V1RecoverWorkspaceResponse,
29
  V1HardDeleteWorkspaceData,
30
  V1HardDeleteWorkspaceError,
31
  V1HardDeleteWorkspaceResponse,
32
  V1GetWorkspaceAlertsData,
33
  V1GetWorkspaceAlertsError,
34
  V1GetWorkspaceAlertsResponse,
35
  V1GetWorkspaceMessagesData,
36
  V1GetWorkspaceMessagesError,
37
  V1GetWorkspaceMessagesResponse,
38
  V1GetWorkspaceCustomInstructionsData,
39
  V1GetWorkspaceCustomInstructionsError,
40
  V1GetWorkspaceCustomInstructionsResponse,
41
  V1SetWorkspaceCustomInstructionsData,
42
  V1SetWorkspaceCustomInstructionsError,
43
  V1SetWorkspaceCustomInstructionsResponse,
44
  V1DeleteWorkspaceCustomInstructionsData,
45
  V1DeleteWorkspaceCustomInstructionsError,
46
  V1DeleteWorkspaceCustomInstructionsResponse,
47
  V1StreamSseError,
48
  V1StreamSseResponse,
49
  V1VersionCheckError,
50
  V1VersionCheckResponse,
51
} from "./types.gen";
52

53
export const client = createClient(createConfig());
18✔
54

55
/**
56
 * Health Check
57
 */
58
export const healthCheckHealthGet = <ThrowOnError extends boolean = false>(
18✔
59
  options?: OptionsLegacyParser<unknown, ThrowOnError>,
60
) => {
61
  return (options?.client ?? client).get<
16✔
62
    HealthCheckHealthGetResponse,
63
    HealthCheckHealthGetError,
64
    ThrowOnError
65
  >({
66
    ...options,
67
    url: "/health",
68
  });
69
};
70

71
/**
72
 * List Workspaces
73
 * List all workspaces.
74
 */
75
export const v1ListWorkspaces = <ThrowOnError extends boolean = false>(
18✔
76
  options?: OptionsLegacyParser<unknown, ThrowOnError>,
77
) => {
78
  return (options?.client ?? client).get<
8✔
79
    V1ListWorkspacesResponse,
80
    V1ListWorkspacesError,
81
    ThrowOnError
82
  >({
83
    ...options,
84
    url: "/api/v1/workspaces",
85
  });
86
};
87

88
/**
89
 * Create Workspace
90
 * Create a new workspace.
91
 */
92
export const v1CreateWorkspace = <ThrowOnError extends boolean = false>(
18✔
93
  options: OptionsLegacyParser<V1CreateWorkspaceData, ThrowOnError>,
94
) => {
95
  return (options?.client ?? client).post<
4✔
96
    V1CreateWorkspaceResponse,
97
    V1CreateWorkspaceError,
98
    ThrowOnError
99
  >({
100
    ...options,
101
    url: "/api/v1/workspaces",
102
  });
103
};
104

105
/**
106
 * List Active Workspaces
107
 * List all active workspaces.
108
 *
109
 * In it's current form, this function will only return one workspace. That is,
110
 * the globally active workspace.
111
 */
112
export const v1ListActiveWorkspaces = <ThrowOnError extends boolean = false>(
18✔
113
  options?: OptionsLegacyParser<unknown, ThrowOnError>,
114
) => {
115
  return (options?.client ?? client).get<
38✔
116
    V1ListActiveWorkspacesResponse,
117
    V1ListActiveWorkspacesError,
118
    ThrowOnError
119
  >({
120
    ...options,
121
    url: "/api/v1/workspaces/active",
122
  });
123
};
124

125
/**
126
 * Activate Workspace
127
 * Activate a workspace by name.
128
 */
129
export const v1ActivateWorkspace = <ThrowOnError extends boolean = false>(
18✔
130
  options: OptionsLegacyParser<V1ActivateWorkspaceData, ThrowOnError>,
131
) => {
132
  return (options?.client ?? client).post<
2✔
133
    V1ActivateWorkspaceResponse,
134
    V1ActivateWorkspaceError,
135
    ThrowOnError
136
  >({
137
    ...options,
138
    url: "/api/v1/workspaces/active",
139
  });
140
};
141

142
/**
143
 * Delete Workspace
144
 * Delete a workspace by name.
145
 */
146
export const v1DeleteWorkspace = <ThrowOnError extends boolean = false>(
18✔
147
  options: OptionsLegacyParser<V1DeleteWorkspaceData, ThrowOnError>,
148
) => {
149
  return (options?.client ?? client).delete<
2✔
150
    V1DeleteWorkspaceResponse,
151
    V1DeleteWorkspaceError,
152
    ThrowOnError
153
  >({
154
    ...options,
155
    url: "/api/v1/workspaces/{workspace_name}",
156
  });
157
};
158

159
/**
160
 * List Archived Workspaces
161
 * List all archived workspaces.
162
 */
163
export const v1ListArchivedWorkspaces = <ThrowOnError extends boolean = false>(
18✔
164
  options?: OptionsLegacyParser<unknown, ThrowOnError>,
165
) => {
166
  return (options?.client ?? client).get<
11✔
167
    V1ListArchivedWorkspacesResponse,
168
    V1ListArchivedWorkspacesError,
169
    ThrowOnError
170
  >({
171
    ...options,
172
    url: "/api/v1/workspaces/archive",
173
  });
174
};
175

176
/**
177
 * Recover Workspace
178
 * Recover an archived workspace by name.
179
 */
180
export const v1RecoverWorkspace = <ThrowOnError extends boolean = false>(
18✔
181
  options: OptionsLegacyParser<V1RecoverWorkspaceData, ThrowOnError>,
182
) => {
183
  return (options?.client ?? client).post<
2✔
184
    V1RecoverWorkspaceResponse,
185
    V1RecoverWorkspaceError,
186
    ThrowOnError
187
  >({
188
    ...options,
189
    url: "/api/v1/workspaces/archive/{workspace_name}/recover",
190
  });
191
};
192

193
/**
194
 * Hard Delete Workspace
195
 * Hard delete an archived workspace by name.
196
 */
197
export const v1HardDeleteWorkspace = <ThrowOnError extends boolean = false>(
18✔
198
  options: OptionsLegacyParser<V1HardDeleteWorkspaceData, ThrowOnError>,
199
) => {
200
  return (options?.client ?? client).delete<
2✔
201
    V1HardDeleteWorkspaceResponse,
202
    V1HardDeleteWorkspaceError,
203
    ThrowOnError
204
  >({
205
    ...options,
206
    url: "/api/v1/workspaces/archive/{workspace_name}",
207
  });
208
};
209

210
/**
211
 * Get Workspace Alerts
212
 * Get alerts for a workspace.
213
 */
214
export const v1GetWorkspaceAlerts = <ThrowOnError extends boolean = false>(
18✔
215
  options: OptionsLegacyParser<V1GetWorkspaceAlertsData, ThrowOnError>,
216
) => {
217
  return (options?.client ?? client).get<
18✔
218
    V1GetWorkspaceAlertsResponse,
219
    V1GetWorkspaceAlertsError,
220
    ThrowOnError
221
  >({
222
    ...options,
223
    url: "/api/v1/workspaces/{workspace_name}/alerts",
224
  });
225
};
226

227
/**
228
 * Get Workspace Messages
229
 * Get messages for a workspace.
230
 */
231
export const v1GetWorkspaceMessages = <ThrowOnError extends boolean = false>(
18✔
232
  options: OptionsLegacyParser<V1GetWorkspaceMessagesData, ThrowOnError>,
233
) => {
234
  return (options?.client ?? client).get<
4✔
235
    V1GetWorkspaceMessagesResponse,
236
    V1GetWorkspaceMessagesError,
237
    ThrowOnError
238
  >({
239
    ...options,
240
    url: "/api/v1/workspaces/{workspace_name}/messages",
241
  });
242
};
243

244
/**
245
 * Get Workspace Custom Instructions
246
 * Get the custom instructions of a workspace.
247
 */
248
export const v1GetWorkspaceCustomInstructions = <
18✔
249
  ThrowOnError extends boolean = false,
250
>(
251
  options: OptionsLegacyParser<
252
    V1GetWorkspaceCustomInstructionsData,
253
    ThrowOnError
254
  >,
255
) => {
256
  return (options?.client ?? client).get<
5✔
257
    V1GetWorkspaceCustomInstructionsResponse,
258
    V1GetWorkspaceCustomInstructionsError,
259
    ThrowOnError
260
  >({
261
    ...options,
262
    url: "/api/v1/workspaces/{workspace_name}/custom-instructions",
263
  });
264
};
265

266
/**
267
 * Set Workspace Custom Instructions
268
 */
269
export const v1SetWorkspaceCustomInstructions = <
18✔
270
  ThrowOnError extends boolean = false,
271
>(
272
  options: OptionsLegacyParser<
273
    V1SetWorkspaceCustomInstructionsData,
274
    ThrowOnError
275
  >,
276
) => {
UNCOV
277
  return (options?.client ?? client).put<
×
278
    V1SetWorkspaceCustomInstructionsResponse,
279
    V1SetWorkspaceCustomInstructionsError,
280
    ThrowOnError
281
  >({
282
    ...options,
283
    url: "/api/v1/workspaces/{workspace_name}/custom-instructions",
284
  });
285
};
286

287
/**
288
 * Delete Workspace Custom Instructions
289
 */
290
export const v1DeleteWorkspaceCustomInstructions = <
18✔
291
  ThrowOnError extends boolean = false,
292
>(
293
  options: OptionsLegacyParser<
294
    V1DeleteWorkspaceCustomInstructionsData,
295
    ThrowOnError
296
  >,
297
) => {
298
  return (options?.client ?? client).delete<
×
299
    V1DeleteWorkspaceCustomInstructionsResponse,
300
    V1DeleteWorkspaceCustomInstructionsError,
301
    ThrowOnError
302
  >({
303
    ...options,
304
    url: "/api/v1/workspaces/{workspace_name}/custom-instructions",
305
  });
306
};
307

308
/**
309
 * Stream Sse
310
 * Send alerts event
311
 */
312
export const v1StreamSse = <ThrowOnError extends boolean = false>(
18✔
313
  options?: OptionsLegacyParser<unknown, ThrowOnError>,
314
) => {
315
  return (options?.client ?? client).get<
×
316
    V1StreamSseResponse,
317
    V1StreamSseError,
318
    ThrowOnError
319
  >({
320
    ...options,
321
    url: "/api/v1/alerts_notification",
322
  });
323
};
324

325
/**
326
 * Version Check
327
 */
328
export const v1VersionCheck = <ThrowOnError extends boolean = false>(
18✔
329
  options?: OptionsLegacyParser<unknown, ThrowOnError>,
330
) => {
331
  return (options?.client ?? client).get<
15✔
332
    V1VersionCheckResponse,
333
    V1VersionCheckError,
334
    ThrowOnError
335
  >({
336
    ...options,
337
    url: "/api/v1/version",
338
  });
339
};
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc