Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 952015b

Browse files
committed
chore: remove unused exports
1 parent acb2dd3 commit 952015b

File tree

68 files changed

+102
-112
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+102
-112
lines changed

site/src/api/api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2554,7 +2554,7 @@ interface ClientApi extends ApiMethods {
25542554
getAxiosInstance: () => AxiosInstance;
25552555
}
25562556

2557-
export class Api extends ApiMethods implements ClientApi {
2557+
class Api extends ApiMethods implements ClientApi {
25582558
constructor() {
25592559
const scopedAxiosInstance = getConfiguredAxiosInstance();
25602560
super(scopedAxiosInstance);

site/src/api/errors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export const isApiError = (err: unknown): err is ApiError => {
3131
);
3232
};
3333

34-
export const isApiErrorResponse = (err: unknown): err is ApiErrorResponse => {
34+
const isApiErrorResponse = (err: unknown): err is ApiErrorResponse => {
3535
return (
3636
typeof err === "object" &&
3737
err !== null &&

site/src/api/queries/authCheck.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { API } from "api/api";
22
import type { AuthorizationRequest } from "api/typesGenerated";
33

4-
export const AUTHORIZATION_KEY = "authorization";
4+
const AUTHORIZATION_KEY = "authorization";
55

66
export const getAuthorizationKey = (req: AuthorizationRequest) =>
77
[AUTHORIZATION_KEY, req] as const;

site/src/api/queries/groups.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ type GroupSortOrder = "asc" | "desc";
1010

1111
export const groupsQueryKey = ["groups"];
1212

13-
export const groups = () => {
13+
const groups = () => {
1414
return {
1515
queryKey: groupsQueryKey,
1616
queryFn: () => API.getGroups(),
@@ -60,7 +60,7 @@ export function groupsByUserIdInOrganization(organization: string) {
6060
} satisfies UseQueryOptions<Group[], unknown, GroupsByUserId>;
6161
}
6262

63-
export function selectGroupsByUserId(groups: Group[]): GroupsByUserId {
63+
function selectGroupsByUserId(groups: Group[]): GroupsByUserId {
6464
// Sorting here means that nothing has to be sorted for the individual
6565
// user arrays later
6666
const sorted = sortGroupsByName(groups, "asc");
@@ -163,7 +163,7 @@ export const removeMember = (queryClient: QueryClient) => {
163163
};
164164
};
165165

166-
export const invalidateGroup = (
166+
const invalidateGroup = (
167167
queryClient: QueryClient,
168168
organization: string,
169169
groupId: string,
@@ -176,7 +176,7 @@ export const invalidateGroup = (
176176
queryClient.invalidateQueries(getGroupQueryKey(organization, groupId)),
177177
]);
178178

179-
export function sortGroupsByName<T extends Group>(
179+
function sortGroupsByName<T extends Group>(
180180
groups: readonly T[],
181181
order: GroupSortOrder,
182182
) {

site/src/api/queries/idpsync.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ import { API } from "api/api";
22
import type { OrganizationSyncSettings } from "api/typesGenerated";
33
import type { QueryClient } from "react-query";
44

5-
export const getOrganizationIdpSyncSettingsKey = () => [
6-
"organizationIdpSyncSettings",
7-
];
5+
const getOrganizationIdpSyncSettingsKey = () => ["organizationIdpSyncSettings"];
86

97
export const patchOrganizationSyncSettings = (queryClient: QueryClient) => {
108
return {

site/src/api/queries/organizations.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -181,20 +181,20 @@ export const provisionerDaemons = (
181181
};
182182
};
183183

184-
export const getProvisionerDaemonGroupsKey = (organization: string) => [
184+
const getProvisionerDaemonGroupsKey = (organization: string) => [
185185
"organization",
186186
organization,
187187
"provisionerDaemons",
188188
];
189189

190-
export const provisionerDaemonGroups = (organization: string) => {
190+
const provisionerDaemonGroups = (organization: string) => {
191191
return {
192192
queryKey: getProvisionerDaemonGroupsKey(organization),
193193
queryFn: () => API.getProvisionerDaemonGroupsByOrganization(organization),
194194
};
195195
};
196196

197-
export const getGroupIdpSyncSettingsKey = (organization: string) => [
197+
const getGroupIdpSyncSettingsKey = (organization: string) => [
198198
"organizations",
199199
organization,
200200
"groupIdpSyncSettings",
@@ -219,7 +219,7 @@ export const patchGroupSyncSettings = (
219219
};
220220
};
221221

222-
export const getRoleIdpSyncSettingsKey = (organization: string) => [
222+
const getRoleIdpSyncSettingsKey = (organization: string) => [
223223
"organizations",
224224
organization,
225225
"roleIdpSyncSettings",
@@ -349,7 +349,7 @@ export const workspacePermissionsByOrganization = (
349349
};
350350
};
351351

352-
export const getOrganizationIdpSyncClaimFieldValuesKey = (
352+
const getOrganizationIdpSyncClaimFieldValuesKey = (
353353
organization: string,
354354
field: string,
355355
) => [organization, "idpSync", "fieldValues", field];

site/src/api/queries/settings.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type {
55
} from "api/typesGenerated";
66
import type { QueryClient, QueryOptions } from "react-query";
77

8-
export const userQuietHoursScheduleKey = (userId: string) => [
8+
const userQuietHoursScheduleKey = (userId: string) => [
99
"settings",
1010
userId,
1111
"quietHours",

site/src/api/queries/templates.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import type { MutationOptions, QueryClient, QueryOptions } from "react-query";
1313
import { delay } from "utils/delay";
1414
import { getTemplateVersionFiles } from "utils/templateVersion";
1515

16-
export const templateKey = (templateId: string) => ["template", templateId];
16+
const templateKey = (templateId: string) => ["template", templateId];
1717

1818
export const template = (templateId: string): QueryOptions<Template> => {
1919
return {
@@ -56,7 +56,7 @@ const getTemplatesByOrganizationQueryKey = (
5656
options?: GetTemplatesOptions,
5757
) => [organization, "templates", options?.deprecated];
5858

59-
export const templatesByOrganization = (
59+
const templatesByOrganization = (
6060
organization: string,
6161
options: GetTemplatesOptions = {},
6262
) => {
@@ -209,7 +209,7 @@ export const templaceACLAvailable = (
209209
};
210210
};
211211

212-
export const templateVersionExternalAuthKey = (versionId: string) => [
212+
const templateVersionExternalAuthKey = (versionId: string) => [
213213
"templateVersion",
214214
versionId,
215215
"externalAuth",

site/src/api/queries/workspaceBuilds.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import type {
66
} from "api/typesGenerated";
77
import type { QueryOptions, UseInfiniteQueryOptions } from "react-query";
88

9-
export function workspaceBuildParametersKey(workspaceBuildId: string) {
9+
function workspaceBuildParametersKey(workspaceBuildId: string) {
1010
return ["workspaceBuilds", workspaceBuildId, "parameters"] as const;
1111
}
1212

site/src/api/queries/workspaces.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ async function findMatchWorkspace(q: string): Promise<Workspace | undefined> {
133133
}
134134
}
135135

136-
export function workspacesKey(config: WorkspacesRequest = {}) {
136+
function workspacesKey(config: WorkspacesRequest = {}) {
137137
const { q, limit } = config;
138138
return ["workspaces", { q, limit }] as const;
139139
}

0 commit comments

Comments
 (0)