Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
danicc097 committed Aug 29, 2024
1 parent d7b73fb commit e7aba21
Show file tree
Hide file tree
Showing 19 changed files with 429 additions and 328 deletions.
4 changes: 4 additions & 0 deletions .vscode/anySchema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": true
}
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,9 @@
"files.associations": {
"*.sql": "postgres"
},
"redoclyOpenAPI.trace.server": "off",
"yaml.schemas": {
"https://raw.githubusercontent.com/docker/cli/master/cli/compose/schema/data/config_schema_v3.8.json": "*compose*.yml",
".vscode/openapi-schema.json": "./openapi.yaml"
},
}
2 changes: 2 additions & 0 deletions bin/project
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,8 @@ x.install-tools() {
"go install github.com/maxbrunsfeld/counterfeiter/v6@latest"
"go install google.golang.org/protobuf/cmd/[email protected]"
"go install google.golang.org/grpc/cmd/[email protected]"
# vacuum lint openapi.exploded.yaml -ed
"go install github.com/daveshanley/vacuum@latest"
)
for command in "${commands[@]}"; do
$command &
Expand Down
12 changes: 0 additions & 12 deletions e2e/client/gen/model/anyValue.ts

This file was deleted.

1 change: 0 additions & 1 deletion e2e/client/gen/model/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*/

export * from './activityResponse'
export * from './anyValue'
export * from './cacheDemoWorkItemResponse'
export * from './cacheDemoWorkItemResponseMetadata'
export * from './createActivityRequest'
Expand Down
13 changes: 0 additions & 13 deletions frontend/src/client-validator/gen/decoders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ import {
WorkItemBase,
PaginationFilterPrimitive,
PaginationFilterArray,
AnyValue,
PaginationFilter,
Pagination,
PaginationItems,
Expand Down Expand Up @@ -937,18 +936,6 @@ export const PaginationFilterArrayDecoder: Decoder<PaginationFilterArray> = {
return validateJson(json, schema, PaginationFilterArrayDecoder.definitionName)
},
}
export const AnyValueDecoder: Decoder<AnyValue> = {
definitionName: 'AnyValue',
schemaRef: '#/definitions/AnyValue',

decode(json: unknown): AnyValue {
const schema = ajv.getSchema(AnyValueDecoder.schemaRef)
if (!schema) {
throw new Error(`Schema ${AnyValueDecoder.definitionName} not found`)
}
return validateJson(json, schema, AnyValueDecoder.definitionName)
},
}
export const PaginationFilterDecoder: Decoder<PaginationFilter> = {
definitionName: 'PaginationFilter',
schemaRef: '#/definitions/PaginationFilter',
Expand Down
6 changes: 0 additions & 6 deletions frontend/src/client-validator/gen/dereferenced-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -5782,9 +5782,6 @@
"filterMode"
]
},
"AnyValue": {
"description": "represents any value, including `null`"
},
"PaginationFilter": {
"oneOf": [
{
Expand Down Expand Up @@ -13169,9 +13166,6 @@
"filterMode"
]
},
"AnyValue": {
"description": "represents any value, including `null`"
},
"PaginationFilter": {
"oneOf": [
{
Expand Down
2 changes: 0 additions & 2 deletions frontend/src/client-validator/gen/meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ import {
WorkItemBase,
PaginationFilterPrimitive,
PaginationFilterArray,
AnyValue,
PaginationFilter,
Pagination,
PaginationItems,
Expand Down Expand Up @@ -232,7 +231,6 @@ export const schemaDefinitions = {
'#/definitions/PaginationFilterPrimitive',
),
PaginationFilterArray: info<PaginationFilterArray>('PaginationFilterArray', '#/definitions/PaginationFilterArray'),
AnyValue: info<AnyValue>('AnyValue', '#/definitions/AnyValue'),
PaginationFilter: info<PaginationFilter>('PaginationFilter', '#/definitions/PaginationFilter'),
Pagination: info<Pagination>('Pagination', '#/definitions/Pagination'),
PaginationItems: info<PaginationItems>('PaginationItems', '#/definitions/PaginationItems'),
Expand Down
4 changes: 0 additions & 4 deletions frontend/src/client-validator/gen/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -541,10 +541,6 @@ export interface PaginationFilterArray {
filterMode: PaginationFilterModes
value?: (string | null)[] | null
}
/**
* represents any value, including `null`
*/
export interface AnyValue {}
export interface Pagination {
filter?: PaginationFilter
sort?: Direction
Expand Down
6 changes: 0 additions & 6 deletions frontend/src/client-validator/gen/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2077,9 +2077,6 @@
"filterMode"
]
},
"AnyValue": {
"description": "represents any value, including `null`"
},
"PaginationFilter": {
"oneOf": [
{
Expand Down Expand Up @@ -3044,9 +3041,6 @@
"PaginationFilterArray": {
"$ref": "#/definitions/PaginationFilterArray"
},
"AnyValue": {
"$ref": "#/definitions/AnyValue"
},
"PaginationFilter": {
"$ref": "#/definitions/PaginationFilter"
},
Expand Down
14 changes: 0 additions & 14 deletions frontend/src/gen/model/anyValue.ts

This file was deleted.

1 change: 0 additions & 1 deletion frontend/src/gen/model/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import type * as EntityIDs from 'src/gen/entity-ids'
*/

export * from './activityResponse';
export * from './anyValue';
export * from './cacheDemoWorkItemResponse';
export * from './cacheDemoWorkItemResponseMetadata';
export * from './createActivityRequest';
Expand Down
24 changes: 12 additions & 12 deletions frontend/src/gen/user/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export const getGetCurrentUserQueryKey = () => {
}


export const getGetCurrentUserInfiniteQueryOptions = <TData = Awaited<ReturnType<typeof getCurrentUser>>, TError = ErrorType<unknown>>( options?: { query?:UseInfiniteQueryOptions<Awaited<ReturnType<typeof getCurrentUser>>, TError, TData>, request?: SecondParameter<typeof customInstance>}
export const getGetCurrentUserInfiniteQueryOptions = <TData = Awaited<ReturnType<typeof getCurrentUser>>, TError = ErrorType<void | HTTPError>>( options?: { query?:UseInfiniteQueryOptions<Awaited<ReturnType<typeof getCurrentUser>>, TError, TData>, request?: SecondParameter<typeof customInstance>}
) => {

const {query: queryOptions, request: requestOptions} = options ?? {};
Expand All @@ -179,12 +179,12 @@ const {query: queryOptions, request: requestOptions} = options ?? {};
}

export type GetCurrentUserInfiniteQueryResult = NonNullable<Awaited<ReturnType<typeof getCurrentUser>>>
export type GetCurrentUserInfiniteQueryError = ErrorType<unknown>
export type GetCurrentUserInfiniteQueryError = ErrorType<void | HTTPError>

/**
* @summary returns the logged in user
*/
export const useGetCurrentUserInfinite = <TData = Awaited<ReturnType<typeof getCurrentUser>>, TError = ErrorType<unknown>>(
export const useGetCurrentUserInfinite = <TData = Awaited<ReturnType<typeof getCurrentUser>>, TError = ErrorType<void | HTTPError>>(
options?: { query?:UseInfiniteQueryOptions<Awaited<ReturnType<typeof getCurrentUser>>, TError, TData>, request?: SecondParameter<typeof customInstance>}

): UseInfiniteQueryResult<TData, TError> & { queryKey: QueryKey } => {
Expand All @@ -200,7 +200,7 @@ export const useGetCurrentUserInfinite = <TData = Awaited<ReturnType<typeof getC



export const getGetCurrentUserQueryOptions = <TData = Awaited<ReturnType<typeof getCurrentUser>>, TError = ErrorType<unknown>>( options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getCurrentUser>>, TError, TData>, request?: SecondParameter<typeof customInstance>}
export const getGetCurrentUserQueryOptions = <TData = Awaited<ReturnType<typeof getCurrentUser>>, TError = ErrorType<void | HTTPError>>( options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getCurrentUser>>, TError, TData>, request?: SecondParameter<typeof customInstance>}
) => {

const {query: queryOptions, request: requestOptions} = options ?? {};
Expand All @@ -219,12 +219,12 @@ const {query: queryOptions, request: requestOptions} = options ?? {};
}

export type GetCurrentUserQueryResult = NonNullable<Awaited<ReturnType<typeof getCurrentUser>>>
export type GetCurrentUserQueryError = ErrorType<unknown>
export type GetCurrentUserQueryError = ErrorType<void | HTTPError>

/**
* @summary returns the logged in user
*/
export const useGetCurrentUser = <TData = Awaited<ReturnType<typeof getCurrentUser>>, TError = ErrorType<unknown>>(
export const useGetCurrentUser = <TData = Awaited<ReturnType<typeof getCurrentUser>>, TError = ErrorType<void | HTTPError>>(
options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getCurrentUser>>, TError, TData>, request?: SecondParameter<typeof customInstance>}

): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
Expand Down Expand Up @@ -259,7 +259,7 @@ export const updateUserAuthorization = (



export const getUpdateUserAuthorizationMutationOptions = <TError = ErrorType<unknown>,
export const getUpdateUserAuthorizationMutationOptions = <TError = ErrorType<void | HTTPError>,
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof updateUserAuthorization>>, TError,{id: string;data: UpdateUserAuthRequest}, TContext>, request?: SecondParameter<typeof customInstance>}
): UseMutationOptions<Awaited<ReturnType<typeof updateUserAuthorization>>, TError,{id: string;data: UpdateUserAuthRequest}, TContext> => {
const {mutation: mutationOptions, request: requestOptions} = options ?? {};
Expand All @@ -280,12 +280,12 @@ const {mutation: mutationOptions, request: requestOptions} = options ?? {};

export type UpdateUserAuthorizationMutationResult = NonNullable<Awaited<ReturnType<typeof updateUserAuthorization>>>
export type UpdateUserAuthorizationMutationBody = UpdateUserAuthRequest
export type UpdateUserAuthorizationMutationError = ErrorType<unknown>
export type UpdateUserAuthorizationMutationError = ErrorType<void | HTTPError>

/**
* @summary updates user role and scopes by id
*/
export const useUpdateUserAuthorization = <TError = ErrorType<unknown>,
export const useUpdateUserAuthorization = <TError = ErrorType<void | HTTPError>,
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof updateUserAuthorization>>, TError,{id: string;data: UpdateUserAuthRequest}, TContext>, request?: SecondParameter<typeof customInstance>}
): UseMutationResult<
Awaited<ReturnType<typeof updateUserAuthorization>>,
Expand Down Expand Up @@ -372,7 +372,7 @@ export const updateUser = (



export const getUpdateUserMutationOptions = <TError = ErrorType<unknown>,
export const getUpdateUserMutationOptions = <TError = ErrorType<void | HTTPError>,
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof updateUser>>, TError,{id: string;data: UpdateUserRequest}, TContext>, request?: SecondParameter<typeof customInstance>}
): UseMutationOptions<Awaited<ReturnType<typeof updateUser>>, TError,{id: string;data: UpdateUserRequest}, TContext> => {
const {mutation: mutationOptions, request: requestOptions} = options ?? {};
Expand All @@ -393,12 +393,12 @@ const {mutation: mutationOptions, request: requestOptions} = options ?? {};

export type UpdateUserMutationResult = NonNullable<Awaited<ReturnType<typeof updateUser>>>
export type UpdateUserMutationBody = UpdateUserRequest
export type UpdateUserMutationError = ErrorType<unknown>
export type UpdateUserMutationError = ErrorType<void | HTTPError>

/**
* @summary updates the user by id
*/
export const useUpdateUser = <TError = ErrorType<unknown>,
export const useUpdateUser = <TError = ErrorType<void | HTTPError>,
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof updateUser>>, TError,{id: string;data: UpdateUserRequest}, TContext>, request?: SecondParameter<typeof customInstance>}
): UseMutationResult<
Awaited<ReturnType<typeof updateUser>>,
Expand Down
32 changes: 30 additions & 2 deletions frontend/src/types/schema.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -698,8 +698,6 @@ export interface components {
filterMode: components["schemas"]["PaginationFilterModes"];
value?: ((string | null)[]) | null;
};
/** @description represents any value, including `null` */
AnyValue: Record<string, unknown> | null;
PaginationFilter: components["schemas"]["PaginationFilterPrimitive"] | components["schemas"]["PaginationFilterArray"];
Pagination: {
filter?: components["schemas"]["PaginationFilter"];
Expand Down Expand Up @@ -1663,6 +1661,16 @@ export interface operations {
"application/json": components["schemas"]["UserResponse"];
};
};
/** @description Unauthenticated */
401: never;
/** @description Unauthorized */
403: never;
/** @description Error response */
"4XX": {
content: {
"application/json": components["schemas"]["HTTPError"];
};
};
};
};
/** updates user role and scopes by id */
Expand All @@ -1685,6 +1693,16 @@ export interface operations {
responses: {
/** @description User auth updated successfully. */
204: never;
/** @description Unauthenticated */
401: never;
/** @description Unauthorized */
403: never;
/** @description Error response */
"4XX": {
content: {
"application/json": components["schemas"]["HTTPError"];
};
};
};
};
/** deletes the user by id */
Expand Down Expand Up @@ -1737,6 +1755,16 @@ export interface operations {
"application/json": components["schemas"]["UserResponse"];
};
};
/** @description Unauthenticated */
401: never;
/** @description Unauthorized */
403: never;
/** @description Error response */
"4XX": {
content: {
"application/json": components["schemas"]["HTTPError"];
};
};
};
};
/** creates initial data (teams, tags...) for a new project */
Expand Down
Loading

0 comments on commit e7aba21

Please sign in to comment.