Skip to content

Commit

Permalink
Merge pull request #543 from Onlineberatung/feat/VIC-786-advice-seeke…
Browse files Browse the repository at this point in the history
…r-books-meeting

feat: vic-786 advice seeker books meeting
  • Loading branch information
Soarecos authored Jul 22, 2022
2 parents 530d01e + bb3b58a commit 658089a
Show file tree
Hide file tree
Showing 58 changed files with 2,257 additions and 356 deletions.
87 changes: 51 additions & 36 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"@draft-js-plugins/linkify": "4.2.1",
"@draft-js-plugins/static-toolbar": "4.1.3",
"@jitsi/react-sdk": "^1.0.0",
"@calcom/embed-snippet": "^1.0.1",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.4",
"@stomp/stompjs": "6.1.0",
"@svgr/webpack": "^6.2.0",
Expand Down
19 changes: 19 additions & 0 deletions src/api/apiAppointmentServiceSet.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { config } from '../resources/scripts/config';
import { FETCH_METHODS, fetchData } from './fetchData';

export const apiAppointmentServiceSet = async (
content: object,
sessionId: number
): Promise<void> => {
const appointmentSuccessfullySetMessage = {
...content,
messageType: 'APPOINTMENT_SET'
};
const url = config.endpoints.appointmentBaseNew(sessionId);
return fetchData({
url,
rcValidation: true,
method: FETCH_METHODS.POST,
bodyData: JSON.stringify(appointmentSuccessfullySetMessage)
});
};
13 changes: 13 additions & 0 deletions src/api/apiGetApiAppointmentServiceEventTypes.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { config } from '../resources/scripts/config';
import { fetchData, FETCH_METHODS } from './fetchData';

export const getCounselorAppointmentLink = async (
userId: string
): Promise<{ slug: string }> => {
const url = config.endpoints.appointmentServiceEventTypes(userId);

return fetchData({
url,
method: FETCH_METHODS.GET
});
};
13 changes: 13 additions & 0 deletions src/api/apiGetAppointmentServiceTeam.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { config } from '../resources/scripts/config';
import { fetchData, FETCH_METHODS } from './fetchData';
//TODO Andre: same here regarding renaming and frontend-theme
export const getTeamAppointmentLink = async (
agencyId: number
): Promise<{ slug: string }> => {
const url = config.endpoints.appointmentServiceMeetingLink(agencyId);

return fetchData({
url,
method: FETCH_METHODS.GET
});
};
15 changes: 15 additions & 0 deletions src/api/apiGetAppointmentsServiceBookingEventsByUserId.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { BookingEventsInterface } from '../globalState/interfaces/BookingDataInterface';
import { config } from '../resources/scripts/config';
import { fetchData, FETCH_METHODS } from './fetchData';

export const apiAppointmentsServiceBookingEventsByAskerId = async (
userId: string
): Promise<BookingEventsInterface[]> => {
const url =
config.endpoints.appointmentsServiceBookingEventsByUserId(userId);

return fetchData({
url,
method: FETCH_METHODS.GET
});
};
14 changes: 14 additions & 0 deletions src/api/apiGetConsultantAppointments.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { BookingEventsInterface } from '../globalState/interfaces/BookingDataInterface';
import { config } from '../resources/scripts/config';
import { fetchData, FETCH_METHODS } from './fetchData';

export const apiGetConsultantAppointments = async (
userId: string
): Promise<BookingEventsInterface[]> => {
const url = config.endpoints.appointmentsServiceConsultantBookings(userId);

return fetchData({
url,
method: FETCH_METHODS.GET
});
};
5 changes: 4 additions & 1 deletion src/api/apiSendAliasMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ export enum ALIAS_MESSAGE_TYPES {
VIDEOCALL = 'VIDEOCALL',
USER_MUTED = 'USER_MUTED',
USER_UNMUTED = 'USER_UNMUTED',
MASTER_KEY_LOST = 'MASTER_KEY_LOST'
MASTER_KEY_LOST = 'MASTER_KEY_LOST',
APPOINTMENT_SET = 'APPOINTMENT_SET',
APPOINTMENT_CANCELLED = 'APPOINTMENT_CANCELLED',
APPOINTMENT_RESCHEDULED = 'APPOINTMENT_RESCHEDULED'
}

interface AliasMessageParams {
Expand Down
3 changes: 3 additions & 0 deletions src/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ export * from './apiGetConsultantSessionList';
export * from './apiGetConsultantStatistics';
export * from './apiGetConsultingType';
export * from './apiGetConsultingTypes';
export * from './apiGetAppointmentServiceTeam';
export * from './apiGetApiAppointmentServiceEventTypes';
export * from './apiGetAppointmentsServiceBookingEventsByUserId';
export * from './apiGetGroupChatInfo';
export * from './apiGetGroupMembers';
export * from './apiGetMonitoring';
Expand Down
Loading

0 comments on commit 658089a

Please sign in to comment.