Skip to content

Commit cbc958e

Browse files
authored
chore: Dependencies updated (#127)
Depences updated to latest
2 parents 30f1c6c + c63076b commit cbc958e

File tree

16 files changed

+13189
-17850
lines changed

16 files changed

+13189
-17850
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
.env.development.local
1818
.env.test.local
1919
.env.production.local
20+
.env
2021

2122
npm-debug.log*
2223
yarn-debug.log*

package-lock.json

Lines changed: 11794 additions & 17824 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,20 @@
33
"version": "0.1.0",
44
"private": true,
55
"dependencies": {
6-
"@reduxjs/toolkit": "^1.9.2",
7-
"@testing-library/jest-dom": "^5.16.5",
8-
"@testing-library/react": "^13.4.0",
9-
"@testing-library/user-event": "^13.5.0",
10-
"eslint-config-prettier": "^8.6.0",
6+
"@reduxjs/toolkit": "^1.9.6",
7+
"@testing-library/jest-dom": "^6.1.3",
8+
"@testing-library/react": "^14.0.0",
9+
"@testing-library/user-event": "^14.5.1",
10+
"axios": "^1.6.2",
11+
"eslint-config-prettier": "^9.0.0",
1112
"react": "^18.2.0",
1213
"react-dom": "^18.2.0",
13-
"react-redux": "^8.0.5",
14-
"react-router-dom": "^6.8.0",
14+
"react-redux": "^8.1.3",
15+
"react-router-dom": "^6.16.0",
1516
"react-scripts": "^5.0.1",
16-
"react-simply-carousel": "^8.5.5",
17-
"web-vitals": "^3.1.1"
17+
"react-simply-carousel": "^9.0.4",
18+
"redux-thunk": "^3.1.0",
19+
"web-vitals": "^3.5.0"
1820
},
1921
"scripts": {
2022
"start": "react-scripts start",
@@ -50,19 +52,20 @@
5052
]
5153
},
5254
"devDependencies": {
53-
"@types/jest": "^29.4.0",
54-
"@types/node": "^18.11.19",
55-
"@types/react": "^18.0.27",
56-
"@types/react-dom": "^18.0.10",
57-
"@typescript-eslint/eslint-plugin": "^5.51.0",
58-
"@typescript-eslint/parser": "^5.51.0",
59-
"eslint": "^8.33.0",
60-
"eslint-plugin-prettier": "^4.2.1",
61-
"eslint-plugin-react": "^7.32.2",
55+
"@types/jest": "^29.5.5",
56+
"@types/node": "^20.8.0",
57+
"@types/react": "^18.2.24",
58+
"@types/react-dom": "^18.2.8",
59+
"@typescript-eslint/eslint-plugin": "^6.7.3",
60+
"@typescript-eslint/parser": "^6.7.3",
61+
"dotenv": "^16.3.1",
62+
"eslint": "^8.50.0",
63+
"eslint-plugin-prettier": "^5.0.0",
64+
"eslint-plugin-react": "^7.33.2",
6265
"eslint-plugin-react-hooks": "^4.6.0",
63-
"husky": "^8.0.0",
64-
"prettier": "^2.8.4",
65-
"sass": "^1.58.0",
66-
"typescript": "^4.9.5"
66+
"husky": "^8.0.3",
67+
"prettier": "^3.0.3",
68+
"sass": "^1.68.0",
69+
"typescript": "^5.2.2"
6770
}
6871
}

public/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="utf-8" />

src/app/api/file.ts

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import axios from 'axios';
2+
import { BACKEND_URL } from 'envConstants';
3+
4+
export const uploadIcon = async (
5+
authorizationToken: string,
6+
orgName: string,
7+
file: File
8+
) => {
9+
const url = BACKEND_URL + '/api/protected/file/upload/' + orgName;
10+
const formData = new FormData();
11+
formData.append('file', file);
12+
const respnse = await axios.post(url, formData, {
13+
headers: {
14+
Accept: 'application/json',
15+
Authorization: `Bearer ${authorizationToken}`,
16+
},
17+
});
18+
return respnse;
19+
};
20+
21+
export const getIcon = async (authorizationToken: string, orgName: string) => {
22+
const url = BACKEND_URL + '/api/protected/file/getIcon/' + orgName;
23+
const response = await axios.get(url, {
24+
headers: {
25+
Authorization: `Bearer ${authorizationToken}`,
26+
},
27+
});
28+
return response;
29+
};
30+
31+
export const deleteFile = async (
32+
authorizationToken: string,
33+
fileName: string
34+
) => {
35+
const url = BACKEND_URL + '/api/protected/file/delete?fileName=' + fileName;
36+
const respnse = await axios.delete(url, {
37+
headers: {
38+
Accept: 'application/json',
39+
Authorization: `Bearer ${authorizationToken}`,
40+
},
41+
});
42+
return respnse;
43+
};

src/app/api/login.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import axios from 'axios';
2+
import { BACKEND_URL } from 'envConstants';
3+
4+
export const login = async (code: string) => {
5+
const url = BACKEND_URL + '/api/auth/login';
6+
const respnse = await axios.post(
7+
url,
8+
{
9+
code: code,
10+
},
11+
{
12+
headers: {
13+
Accept: 'application/json',
14+
},
15+
}
16+
);
17+
18+
return respnse;
19+
};

src/app/api/organization.ts

Lines changed: 207 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,207 @@
1+
import axios from 'axios';
2+
import { BACKEND_URL } from 'envConstants';
3+
4+
export interface organizationBody {
5+
name: string;
6+
description: string;
7+
}
8+
9+
export const deleteOrg = async (
10+
authorizationToken: string,
11+
orgName: string
12+
) => {
13+
const url = BACKEND_URL + '/api/protected/org/delete/' + orgName;
14+
const respnse = await axios.delete(url, {
15+
headers: {
16+
Accept: 'application/json',
17+
Authorization: `Bearer ${authorizationToken}`,
18+
},
19+
});
20+
return respnse;
21+
};
22+
23+
export const addOrg = async (
24+
authorizationToken: string,
25+
org: organizationBody
26+
) => {
27+
const url = BACKEND_URL + '/api/protected/org/add';
28+
const respnse = await axios.post(url, org, {
29+
headers: {
30+
Accept: 'application/json',
31+
Authorization: `Bearer ${authorizationToken}`,
32+
},
33+
});
34+
return respnse;
35+
};
36+
37+
export const updateOrg = async (
38+
authorizationToken: string,
39+
orgName: string,
40+
org: organizationBody
41+
) => {
42+
const url = BACKEND_URL + '/api/protected/org/update/' + orgName;
43+
const response = await axios.put(url, org, {
44+
headers: {
45+
Accept: 'application/json',
46+
Authorization: `Bearer ${authorizationToken}`,
47+
},
48+
});
49+
50+
return response;
51+
};
52+
53+
export const addOrgMembers = async (
54+
authorizationToken: string,
55+
orgName: string,
56+
members: string[]
57+
) => {
58+
const url = BACKEND_URL + '/api/protected/org/addMembers/' + orgName;
59+
const respnse = await axios.post(
60+
url,
61+
{
62+
members: members,
63+
},
64+
{
65+
headers: {
66+
Accept: 'application/json',
67+
Authorization: `Bearer ${authorizationToken}`,
68+
},
69+
}
70+
);
71+
72+
return respnse;
73+
};
74+
75+
export const removeOrgMembers = async (
76+
authorizationToken: string,
77+
orgName: string,
78+
members: string[]
79+
) => {
80+
const url = BACKEND_URL + '/api/protected/org/removeMembers/' + orgName;
81+
const response = axios.delete(url, {
82+
headers: {
83+
Accept: 'application/json',
84+
Authorization: `Bearer ${authorizationToken}`,
85+
},
86+
data: {
87+
members: members,
88+
},
89+
});
90+
return response;
91+
};
92+
93+
export const changeOrgMembersStatus = async (
94+
authorizationToken: string,
95+
orgName: string,
96+
orgMemberStatus: { [key: string]: string }
97+
) => {
98+
const url = BACKEND_URL + '/api/protected/org/removeMembers/';
99+
const respnse = await axios.put(
100+
url,
101+
{
102+
orgMemberStatus: orgMemberStatus,
103+
},
104+
{
105+
headers: {
106+
Accept: 'application/json',
107+
Authorization: `Bearer ${authorizationToken}`,
108+
},
109+
}
110+
);
111+
112+
return respnse;
113+
};
114+
115+
export const setArcheiveStatus = async (
116+
authorizationToken: string,
117+
orgName: string,
118+
archeiveStatus: { [key: string]: boolean }
119+
) => {
120+
const url = BACKEND_URL + '/api/protected/org/setArcheiveStatus/' + orgName;
121+
const respnse = await axios.put(
122+
url,
123+
{
124+
archeiveStatus: archeiveStatus,
125+
},
126+
{
127+
headers: {
128+
Accept: 'application/json',
129+
Authorization: `Bearer ${authorizationToken}`,
130+
},
131+
}
132+
);
133+
return respnse;
134+
};
135+
136+
export const setBookmarkStatus = async (
137+
authorizationToken: string,
138+
orgName: string,
139+
bookmarkStatus: { [key: string]: boolean }
140+
) => {
141+
const url = BACKEND_URL + '/api/protected/org/setBookmarkStatus/' + orgName;
142+
const respnse = await axios.put(
143+
url,
144+
{
145+
bookmarkStatus: bookmarkStatus,
146+
},
147+
{
148+
headers: {
149+
Accept: 'application/json',
150+
Authorization: `Bearer ${authorizationToken}`,
151+
},
152+
}
153+
);
154+
155+
return respnse;
156+
};
157+
158+
export const getOrgMembers = async (
159+
authorizationToken: string,
160+
orgName: string
161+
) => {
162+
const url = BACKEND_URL + '/api/protected/org/getMembers/' + orgName;
163+
164+
const respnse = await axios.get(url, {
165+
headers: {
166+
Accept: 'application/json',
167+
Authorization: `Bearer ${authorizationToken}`,
168+
},
169+
});
170+
return respnse;
171+
};
172+
173+
export const getOrgProjects = async (
174+
authorizationToken: string,
175+
orgName: string
176+
) => {
177+
const url = BACKEND_URL + '/api/protected/org/getProjects/' + orgName;
178+
const respnse = await axios.get(url, {
179+
headers: {
180+
Accept: 'application/json',
181+
Authorization: `Bearer ${authorizationToken}`,
182+
},
183+
});
184+
return respnse;
185+
};
186+
187+
export const getOrg = async (authorizationToken: string, orgName: string) => {
188+
const url = BACKEND_URL + '/api/protected/org/getProjects/' + orgName;
189+
const respnse = await axios.get(url, {
190+
headers: {
191+
Accept: 'application/json',
192+
Authorization: `Bearer ${authorizationToken}`,
193+
},
194+
});
195+
return respnse;
196+
};
197+
198+
export const getAllOrgs = async (authorizationToken: string) => {
199+
const url = BACKEND_URL + '/api/protected/org/getAllOrg';
200+
const respnse = await axios.get(url, {
201+
headers: {
202+
Accept: 'application/json',
203+
Authorization: `Bearer ${authorizationToken}`,
204+
},
205+
});
206+
return respnse;
207+
};

0 commit comments

Comments
 (0)