Skip to content

Commit 6d149ac

Browse files
committed
updated generated file
linting changes fix reschedule names
1 parent 4f262df commit 6d149ac

3 files changed

Lines changed: 5 additions & 113 deletions

File tree

src/components/calendar-overview.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use client'
22

3-
import { useCallback, useEffect, useRef, useState } from 'react'
3+
import { useEffect, useRef, useState } from 'react'
44
import {
55
format,
66
startOfWeek,
@@ -70,10 +70,6 @@ export function CalendarOverview() {
7070

7171
const viewportRef = useRef<HTMLDivElement>(null)
7272

73-
const closeCreateEventDialogOpen = useCallback(() => {
74-
setIsCreateEventOpen(false)
75-
}, [setIsCreateEventOpen])
76-
7773
useEffect(() => {
7874
if (viewportRef.current) {
7975
const el = viewportRef.current

src/components/reschedule-requests.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,14 @@ export function RescheduleRequests() {
6565

6666
const getRescheduleRequests = async () => {
6767
const response = await slotifyClient.GetAPIRescheduleRequestsMe()
68-
const requests : RescheduleRequest[] = []
68+
const requests: RescheduleRequest[] = []
6969
response.pending.forEach((request: RescheduleRequest) => {
7070
requests.push(request)
7171
})
7272
response.responses.forEach((request: RescheduleRequest) => {
7373
requests.push(request)
7474
})
75-
75+
7676
setmyRequests(requests)
7777
}
7878

@@ -348,8 +348,8 @@ export function RescheduleRequests() {
348348
<div className='space-y-3'>
349349
<div>
350350
<h4 className='font-medium leading-none'>
351-
{request.newMeeting?.title
352-
? request.newMeeting.title
351+
{fullRequests[request.request_id]
352+
? fullRequests[request.request_id]!.oldEvent.subject
353353
: '(No name)'}
354354
</h4>
355355
<p className='text-sm text-muted-foreground mt-1'>

src/types/client.ts

Lines changed: 0 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ type ReschedulingRequestOldMeeting = {
2323
meetingStartTime: string;
2424
timeRangeStart: string;
2525
timeRangeEnd: string;
26-
meetingStartTime: string;
27-
timeRangeStart: string;
28-
timeRangeEnd: string;
2926
};
3027
type ReschedulingRequestNewMeeting = {
3128
title: string;
@@ -261,7 +258,6 @@ const CalendarEvent: z.ZodType<CalendarEvent> = z
261258
webLink: z.string().optional(),
262259
})
263260
.passthrough();
264-
const User: z.ZodType<User> = z
265261
const User: z.ZodType<User> = z
266262
.object({
267263
id: z.number().int(),
@@ -438,13 +434,6 @@ const ReschedulingCheckBodySchema: z.ZodType<ReschedulingCheckBodySchema> = z
438434
.passthrough();
439435
const ReschedulingRequestOldMeeting: z.ZodType<ReschedulingRequestOldMeeting> =
440436
z
441-
.object({
442-
msftMeetingID: z.string(),
443-
meetingId: z.number().int(),
444-
meetingStartTime: z.string().datetime({ offset: true }),
445-
timeRangeStart: z.string().datetime({ offset: true }),
446-
timeRangeEnd: z.string().datetime({ offset: true }),
447-
})
448437
.object({
449438
msftMeetingID: z.string(),
450439
meetingId: z.number().int(),
@@ -1433,83 +1422,6 @@ const endpoints = makeApi([
14331422
},
14341423
],
14351424
},
1436-
{
1437-
method: "get",
1438-
path: "/api/reschedule/request/:requestID/close",
1439-
alias: "GetAPIRescheduleRequestRequestIDClose",
1440-
requestFormat: "json",
1441-
parameters: [
1442-
{
1443-
name: "requestID",
1444-
type: "Path",
1445-
schema: z.number().int(),
1446-
},
1447-
],
1448-
response: z.string(),
1449-
errors: [
1450-
{
1451-
status: 400,
1452-
description: `Bad request`,
1453-
schema: z.void(),
1454-
},
1455-
{
1456-
status: 401,
1457-
description: `Access token is missing or invalid`,
1458-
schema: z.void(),
1459-
},
1460-
{
1461-
status: 500,
1462-
description: `Something went wrong internally`,
1463-
schema: z.string(),
1464-
},
1465-
{
1466-
status: 502,
1467-
description: `Something went wrong with an external API`,
1468-
schema: z.string(),
1469-
},
1470-
],
1471-
},
1472-
{
1473-
method: "post",
1474-
path: "/api/reschedule/request/:requestID/complete",
1475-
alias: "PostAPIRescheduleRequestRequestIDComplete",
1476-
requestFormat: "json",
1477-
parameters: [
1478-
{
1479-
name: "body",
1480-
type: "Body",
1481-
schema: CalendarEvent,
1482-
},
1483-
{
1484-
name: "requestID",
1485-
type: "Path",
1486-
schema: z.number().int(),
1487-
},
1488-
],
1489-
response: CalendarEvent,
1490-
errors: [
1491-
{
1492-
status: 400,
1493-
description: `Bad request`,
1494-
schema: z.void(),
1495-
},
1496-
{
1497-
status: 401,
1498-
description: `Access token is missing or invalid`,
1499-
schema: z.void(),
1500-
},
1501-
{
1502-
status: 500,
1503-
description: `Something went wrong internally`,
1504-
schema: z.string(),
1505-
},
1506-
{
1507-
status: 502,
1508-
description: `Something went wrong with an external API`,
1509-
schema: z.string(),
1510-
},
1511-
],
1512-
},
15131425
{
15141426
method: "patch",
15151427
path: "/api/reschedule/request/:requestID/reject",
@@ -1613,12 +1525,6 @@ const endpoints = makeApi([
16131525
path: "/api/reschedule/requests/me",
16141526
alias: "GetAPIRescheduleRequestsMe",
16151527
requestFormat: "json",
1616-
response: z
1617-
.object({
1618-
pending: z.array(RescheduleRequest),
1619-
responses: z.array(RescheduleRequest),
1620-
})
1621-
.passthrough(),
16221528
response: z
16231529
.object({
16241530
pending: z.array(RescheduleRequest),
@@ -1901,16 +1807,6 @@ const endpoints = makeApi([
19011807
type: "Query",
19021808
schema: z.string().optional(),
19031809
},
1904-
{
1905-
name: "name",
1906-
type: "Query",
1907-
schema: z.string().optional(),
1908-
},
1909-
{
1910-
name: "email",
1911-
type: "Query",
1912-
schema: z.string().optional(),
1913-
},
19141810
],
19151811
response: UsersAndPagination,
19161812
errors: [

0 commit comments

Comments
 (0)