This repository has been archived by the owner on Dec 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- downgrate vite version (postcss bug vitejs/vite#7717)
- Loading branch information
Showing
100 changed files
with
10,709 additions
and
15,201 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import {gql} from "@apollo/client"; | ||
|
||
export const GET_EVENT_QUERY = gql` | ||
query getEvent($id: String!) { | ||
event(id: $id) { | ||
id | ||
title | ||
subtitle | ||
author { | ||
nickname | ||
} | ||
timeFrame { | ||
startDate | ||
} | ||
theme { | ||
primaryColor | ||
image | ||
} | ||
} | ||
} | ||
`; | ||
|
||
export interface EventData { | ||
id: string | ||
title: string | ||
subtitle: string | ||
author: { | ||
id: string | ||
nickname: string | ||
} | ||
timeFrame: { | ||
startDate: string | ||
} | ||
theme: { | ||
primaryColor: string | ||
image: string | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import {gql} from "@apollo/client"; | ||
import {EventData} from "./EventDataQuery"; | ||
|
||
export const GET_EVENTS_LIST_QUERY = gql` | ||
query getEventsList($page: Int, $size: Int) { | ||
events(page: $page, size: $size) { | ||
id | ||
title | ||
subtitle | ||
author { | ||
nickname | ||
} | ||
timeFrame { | ||
startDate | ||
} | ||
theme { | ||
primaryColor | ||
image | ||
} | ||
} | ||
} | ||
`; | ||
|
||
export interface EventListQueryVars { | ||
page: number, | ||
size: number, | ||
} | ||
|
||
export interface EventListQueryData { | ||
events: EventData[] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,172 @@ | ||
input AddressRequestInput { | ||
city: String! | ||
coordinates: CoordinatesRequestInput | ||
place: String! | ||
} | ||
|
||
type AddressResponse { | ||
city: String! | ||
coordinates: CoordinatesResponse | ||
place: String! | ||
} | ||
|
||
input ContactRequestInput { | ||
github: String | ||
linkedin: String | ||
mail: String | ||
twitter: String | ||
} | ||
|
||
type ContactResponse { | ||
github: String | ||
linkedin: String | ||
mail: String | ||
twitter: String | ||
} | ||
|
||
input CoordinatesRequestInput { | ||
latitude: Float! | ||
longitude: Float! | ||
} | ||
|
||
type CoordinatesResponse { | ||
latitude: Float! | ||
longitude: Float! | ||
} | ||
|
||
input EventRequestInput { | ||
address: AddressRequestInput | ||
subtitle: String | ||
tags: [TagRequestInput!]! | ||
timeFrame: TimeFrameRequestInput! | ||
title: String! | ||
} | ||
|
||
type EventResponse { | ||
address: AddressResponse | ||
authorId: String! | ||
createDate: Instant! | ||
id: String! | ||
subtitle: String | ||
tags: [TagResponse!]! | ||
theme: ThemeResponse! | ||
timeFrame: TimeFrameResponse! | ||
title: String! | ||
updateDate: Instant! | ||
|
||
# Event creator | ||
author: UserResponse! | ||
|
||
# Is event followed by current user | ||
isFollowed: Boolean! | ||
} | ||
|
||
input EventThemeRequestInput { | ||
primaryColor: String | ||
secondaryColor: String | ||
} | ||
|
||
# ISO date-time | ||
scalar Instant | ||
|
||
type Mutation { | ||
# Creates tag | ||
createTag(request: TagCreateRequestInput!): TagResponse! | ||
|
||
# Appends new tags to followed list | ||
followTags(request: [TagRequestInput!]!): [TagResponse!]! | ||
|
||
# Removes tags from followed list | ||
unfollowTags(request: [TagRequestInput!]!): Boolean! | ||
|
||
# Create event with request | ||
createEvent(request: EventRequestInput!): EventResponse! | ||
|
||
# Delete event by id | ||
deleteEvent(id: String!): Boolean! | ||
|
||
# Follow event by id | ||
followEvent(id: String!): Boolean! | ||
|
||
# Replace event data with new data (PUT equivalent) | ||
replaceEvent(id: String!, request: EventRequestInput!): EventResponse! | ||
|
||
# Replace event theme with new one (PUT equivalent) | ||
replaceEventTheme( | ||
id: String! | ||
request: EventThemeRequestInput! | ||
): EventResponse! | ||
|
||
# Unfollow event by id | ||
unfollowEvent(id: String!): Boolean! | ||
|
||
# Replace user data with new data (PUT equivalent) | ||
replaceMyUser(request: UserRequestInput!): UserResponse! | ||
} | ||
|
||
type Query { | ||
# Get tags followed by user (paged) | ||
followedTags(page: Int, size: Int): [TagResponse!]! | ||
|
||
# Get tag by id | ||
tag(id: String!): TagResponse | ||
|
||
# Get all tags paged | ||
tags(page: Int, size: Int): [TagResponse!]! | ||
|
||
# Get single event by its id | ||
event(id: String!): EventResponse | ||
|
||
# Get all events paged | ||
events(page: Int, size: Int): [EventResponse!]! | ||
|
||
# Get user by id | ||
user(id: String!): UserResponse | ||
|
||
# Get all users paged | ||
users(page: Int, size: Int): [UserResponse!]! | ||
} | ||
|
||
input TagCreateRequestInput { | ||
name: String! | ||
} | ||
|
||
input TagRequestInput { | ||
id: String! | ||
} | ||
|
||
type TagResponse { | ||
id: String! | ||
name: String! | ||
} | ||
|
||
type ThemeResponse { | ||
image: String | ||
primaryColor: String | ||
secondaryColor: String | ||
} | ||
|
||
input TimeFrameRequestInput { | ||
finishDate: Instant | ||
startDate: Instant! | ||
} | ||
|
||
type TimeFrameResponse { | ||
finishDate: Instant | ||
startDate: Instant! | ||
} | ||
|
||
input UserRequestInput { | ||
contact: ContactRequestInput! | ||
description: String | ||
nickname: String! | ||
} | ||
|
||
type UserResponse { | ||
contact: ContactResponse! | ||
createDate: Instant! | ||
description: String | ||
id: String! | ||
nickname: String! | ||
updateDate: Instant! | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import {UserResponse} from "../user/UserResponse.interface"; | ||
|
||
export interface AuthResponse { | ||
username: string | ||
|
||
roles: string[] | ||
|
||
accessToken: string | ||
refreshToken: string | ||
tokenType: string | ||
expiresIn: number | ||
|
||
user: UserResponse | ||
|
||
properties: { | ||
isInitialized: boolean | ||
} | ||
} |
4 changes: 2 additions & 2 deletions
4
src/common/auth/service/jwtData.interface.ts → src/api/rest/auth/DecodedJwt.interface.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
|
||
export interface JwtData { | ||
export interface DecodedJwt { | ||
id: string; | ||
nickname: string; | ||
|
||
exp: number; // expire | ||
iat: number; | ||
iss: string; // service name | ||
iss: string; // api name | ||
roles: string[], | ||
sub: string; | ||
} |
4 changes: 2 additions & 2 deletions
4
src/common/models/ProvidersList.ts → src/api/rest/auth/oauth/Provider.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
|
||
enum ProvidersList { | ||
enum Provider { | ||
github = 'github', | ||
githubDev = 'devgithub' | ||
} | ||
|
||
export default ProvidersList; | ||
export default Provider; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import {AxiosInstance} from "axios"; | ||
import {UserResponse} from "./UserResponse.interface"; | ||
|
||
export const getMe = (axios: AxiosInstance): Promise<UserResponse> => | ||
axios.get<UserResponse>('/api/v1/users/@me') | ||
.then(res => res.data); | ||
|
||
export const getById = (axios: AxiosInstance, id: string): Promise<UserResponse> => | ||
axios.get<UserResponse>(`/api/v1/users/${id}`) | ||
.then(res => res.data); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
export interface UserResponse { | ||
id: string | ||
nickname: string | ||
description?: string | ||
contact: { | ||
github?: string | ||
linkedin?: string | ||
mail?: string | ||
twitter?: string | ||
} | ||
createDate: string | ||
updateDate: string | ||
} |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.