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

stacklok / codegate-ui / 12832410853

17 Jan 2025 03:52PM CUT coverage: 66.018% (+0.4%) from 65.582%
12832410853

Pull #104

github

web-flow
Merge 6c98391c2 into 8ba7d369a
Pull Request #104: feat: add pagination for alerts table

223 of 416 branches covered (53.61%)

Branch coverage included in aggregate %.

40 of 42 new or added lines in 5 files covered. (95.24%)

455 of 611 relevant lines covered (74.47%)

59.37 hits per line

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

43.24
/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
  GetMessagesDashboardMessagesGetError,
10
  GetMessagesDashboardMessagesGetResponse,
11
  GetAlertsDashboardAlertsGetError,
12
  GetAlertsDashboardAlertsGetResponse,
13
  StreamSseDashboardAlertsNotificationGetError,
14
  StreamSseDashboardAlertsNotificationGetResponse,
15
  VersionCheckDashboardVersionGetError,
16
  VersionCheckDashboardVersionGetResponse,
17
  V1ListWorkspacesError,
18
  V1ListWorkspacesResponse,
19
  V1CreateWorkspaceData,
20
  V1CreateWorkspaceError,
21
  V1CreateWorkspaceResponse,
22
  V1ListActiveWorkspacesError,
23
  V1ListActiveWorkspacesResponse,
24
  V1ActivateWorkspaceData,
25
  V1ActivateWorkspaceError,
26
  V1ActivateWorkspaceResponse,
27
  V1DeleteWorkspaceData,
28
  V1DeleteWorkspaceError,
29
  V1DeleteWorkspaceResponse,
30
} from "./types.gen";
31

32
export const client = createClient(createConfig());
11✔
33

34
/**
35
 * Get Messages
36
 * Get all the messages from the database and return them as a list of conversations.
37
 */
38
export const getMessagesDashboardMessagesGet = <
11✔
39
  ThrowOnError extends boolean = false,
40
>(
41
  options?: OptionsLegacyParser<unknown, ThrowOnError>,
42
) => {
43
  return (options?.client ?? client).get<
2✔
44
    GetMessagesDashboardMessagesGetResponse,
45
    GetMessagesDashboardMessagesGetError,
46
    ThrowOnError
47
  >({
48
    ...options,
49
    url: "/dashboard/messages",
50
  });
51
};
52

53
/**
54
 * Get Alerts
55
 * Get all the messages from the database and return them as a list of conversations.
56
 */
57
export const getAlertsDashboardAlertsGet = <
11✔
58
  ThrowOnError extends boolean = false,
59
>(
60
  options?: OptionsLegacyParser<unknown, ThrowOnError>,
61
) => {
62
  return (options?.client ?? client).get<
9✔
63
    GetAlertsDashboardAlertsGetResponse,
64
    GetAlertsDashboardAlertsGetError,
65
    ThrowOnError
66
  >({
67
    ...options,
68
    url: "/dashboard/alerts",
69
  });
70
};
71

72
/**
73
 * Stream Sse
74
 * Send alerts event
75
 */
76
export const streamSseDashboardAlertsNotificationGet = <
11✔
77
  ThrowOnError extends boolean = false,
78
>(
79
  options?: OptionsLegacyParser<unknown, ThrowOnError>,
80
) => {
81
  return (options?.client ?? client).get<
×
82
    StreamSseDashboardAlertsNotificationGetResponse,
83
    StreamSseDashboardAlertsNotificationGetError,
84
    ThrowOnError
85
  >({
86
    ...options,
87
    url: "/dashboard/alerts_notification",
88
  });
89
};
90

91
/**
92
 * Version Check
93
 */
94
export const versionCheckDashboardVersionGet = <
11✔
95
  ThrowOnError extends boolean = false,
96
>(
97
  options?: OptionsLegacyParser<unknown, ThrowOnError>,
98
) => {
99
  return (options?.client ?? client).get<
×
100
    VersionCheckDashboardVersionGetResponse,
101
    VersionCheckDashboardVersionGetError,
102
    ThrowOnError
103
  >({
104
    ...options,
105
    url: "/dashboard/version",
106
  });
107
};
108

109
/**
110
 * List Workspaces
111
 * List all workspaces.
112
 */
113
export const v1ListWorkspaces = <ThrowOnError extends boolean = false>(
11✔
114
  options?: OptionsLegacyParser<unknown, ThrowOnError>,
115
) => {
116
  return (options?.client ?? client).get<
×
117
    V1ListWorkspacesResponse,
118
    V1ListWorkspacesError,
119
    ThrowOnError
120
  >({
121
    ...options,
122
    url: "/api/v1/workspaces",
123
  });
124
};
125

126
/**
127
 * Create Workspace
128
 * Create a new workspace.
129
 */
130
export const v1CreateWorkspace = <ThrowOnError extends boolean = false>(
11✔
131
  options: OptionsLegacyParser<V1CreateWorkspaceData, ThrowOnError>,
132
) => {
133
  return (options?.client ?? client).post<
×
134
    V1CreateWorkspaceResponse,
135
    V1CreateWorkspaceError,
136
    ThrowOnError
137
  >({
138
    ...options,
139
    url: "/api/v1/workspaces",
140
  });
141
};
142

143
/**
144
 * List Active Workspaces
145
 * List all active workspaces.
146
 *
147
 * In it's current form, this function will only return one workspace. That is,
148
 * the globally active workspace.
149
 */
150
export const v1ListActiveWorkspaces = <ThrowOnError extends boolean = false>(
11✔
151
  options?: OptionsLegacyParser<unknown, ThrowOnError>,
152
) => {
153
  return (options?.client ?? client).get<
×
154
    V1ListActiveWorkspacesResponse,
155
    V1ListActiveWorkspacesError,
156
    ThrowOnError
157
  >({
158
    ...options,
159
    url: "/api/v1/workspaces/active",
160
  });
161
};
162

163
/**
164
 * Activate Workspace
165
 * Activate a workspace by name.
166
 */
167
export const v1ActivateWorkspace = <ThrowOnError extends boolean = false>(
11✔
168
  options: OptionsLegacyParser<V1ActivateWorkspaceData, ThrowOnError>,
169
) => {
170
  return (options?.client ?? client).post<
×
171
    V1ActivateWorkspaceResponse,
172
    V1ActivateWorkspaceError,
173
    ThrowOnError
174
  >({
175
    ...options,
176
    url: "/api/v1/workspaces/active",
177
  });
178
};
179

180
/**
181
 * Delete Workspace
182
 * Delete a workspace by name.
183
 */
184
export const v1DeleteWorkspace = <ThrowOnError extends boolean = false>(
11✔
185
  options: OptionsLegacyParser<V1DeleteWorkspaceData, ThrowOnError>,
186
) => {
187
  return (options?.client ?? client).delete<
×
188
    V1DeleteWorkspaceResponse,
189
    V1DeleteWorkspaceError,
190
    ThrowOnError
191
  >({
192
    ...options,
193
    url: "/api/v1/workspaces/{workspace_name}",
194
  });
195
};
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