Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: v2 slots new version #18758

Open
wants to merge 41 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
55c3862
refactor: version old slots
supalarry Jan 20, 2025
b7d46cb
feat: init new slots endpoints
supalarry Jan 20, 2025
fa12c90
chore: range format
supalarry Jan 20, 2025
49a9f0e
fix: duratin
supalarry Jan 20, 2025
2080f3d
fix: duratin
supalarry Jan 20, 2025
5f54ca4
test: slot releaseAt
supalarry Jan 20, 2025
b827e4b
refactor: reserve slot response
supalarry Jan 20, 2025
f57d53c
refactor variable name
supalarry Jan 20, 2025
463118f
docs: have new slots controller in docs
supalarry Jan 21, 2025
ca180f5
feat: crud for slots reservations
supalarry Jan 21, 2025
4865c63
refactor: use exclude all for response
supalarry Jan 21, 2025
fff2435
docs
supalarry Jan 21, 2025
dfb2f84
chore: slots input service
supalarry Jan 21, 2025
cc361d0
refactor mini
supalarry Jan 21, 2025
8d8fc1f
refactor: remove unused imports
supalarry Jan 21, 2025
24b5c2c
Merge branch 'main' into lauris/cal-5052-platform-refactor-v2-slots
supalarry Jan 21, 2025
7de7d33
Merge branch 'main' into lauris/cal-5052-platform-refactor-v2-slots
supalarry Jan 22, 2025
5c53b24
docs
supalarry Jan 22, 2025
727e8f9
handle orgSlug for dynamic events
supalarry Jan 22, 2025
e70ef3e
refactor: correct name
supalarry Jan 22, 2025
26cae43
docs
supalarry Jan 22, 2025
2f80a35
Merge branch 'main' into lauris/cal-5052-platform-refactor-v2-slots
supalarry Jan 23, 2025
613d442
add optional organizationSlug to BySlug search
supalarry Jan 23, 2025
dde8dd0
Merge branch 'main' into lauris/cal-5052-platform-refactor-v2-slots
supalarry Jan 23, 2025
00a3486
Merge branch 'main' into lauris/cal-5052-platform-refactor-v2-slots
supalarry Jan 23, 2025
fdd1530
refactor: slot output format
supalarry Jan 24, 2025
2df966a
Merge branch 'main' into lauris/cal-5052-platform-refactor-v2-slots
supalarry Jan 24, 2025
f3c2d1d
refactor: return seated slot info
supalarry Jan 24, 2025
ff09e18
docs
supalarry Jan 24, 2025
233ccf1
rename functions
supalarry Jan 24, 2025
6a132bc
refactor: slots seated response
supalarry Jan 24, 2025
96de393
Merge branch 'main' into lauris/cal-5052-platform-refactor-v2-slots
supalarry Jan 24, 2025
599d431
Merge branch 'main' into lauris/cal-5052-platform-refactor-v2-slots
supalarry Jan 24, 2025
25e4bfd
Merge branch 'main' into lauris/cal-5052-platform-refactor-v2-slots
supalarry Jan 27, 2025
a714f2a
Merge branch 'main' into lauris/cal-5052-platform-refactor-v2-slots
supalarry Jan 27, 2025
be7db0c
Merge branch 'main' into lauris/cal-5052-platform-refactor-v2-slots
supalarry Feb 4, 2025
4e6ee60
Merge branch 'main' into lauris/cal-5052-platform-refactor-v2-slots
supalarry Feb 7, 2025
8083059
fix: handle same username in org and non org
supalarry Feb 7, 2025
b4fadd9
refactor: test format
supalarry Feb 7, 2025
0de579b
fix: allow reservationDuration only for authed requests
supalarry Feb 7, 2025
3328ce5
Merge branch 'main' into lauris/cal-5052-platform-refactor-v2-slots
supalarry Feb 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
docs: have new slots controller in docs
  • Loading branch information
supalarry committed Jan 21, 2025
commit 463118ff822ffed21b7f1a873c56b36bc6cde128
2 changes: 2 additions & 0 deletions apps/api/v2/src/ee/platform-endpoints-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { ProviderModule } from "@/ee/provider/provider.module";
import { SchedulesModule_2024_04_15 } from "@/ee/schedules/schedules_2024_04_15/schedules.module";
import { SchedulesModule_2024_06_11 } from "@/ee/schedules/schedules_2024_06_11/schedules.module";
import { SlotsModule_2024_04_15 } from "@/modules/slots/slots-2024-04-15/slots.module";
import { SlotsModule_2024_09_04 } from "@/modules/slots/slots-2024-09-04/slots.module";
import { TeamsEventTypesModule } from "@/modules/teams/event-types/teams-event-types.module";
import { TeamsMembershipsModule } from "@/modules/teams/memberships/teams-memberships.module";
import { TeamsModule } from "@/modules/teams/teams/teams.module";
Expand All @@ -30,6 +31,7 @@ import { Module } from "@nestjs/common";
BookingsModule_2024_08_13,
TeamsMembershipsModule,
SlotsModule_2024_04_15,
SlotsModule_2024_09_04,
TeamsModule,
],
})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { API_VERSIONS_VALUES } from "@/lib/api-versions";
import { SlotsOutputService_2024_04_15 } from "@/modules/slots/slots-2024-04-15/services/slots-output.service";
import { SlotsService_2024_04_15 } from "@/modules/slots/slots-2024-04-15/services/slots.service";
import { Query, Body, Controller, Get, Delete, Post, Req, Res } from "@nestjs/common";
import { ApiExcludeController as DocsExcludeController } from "@nestjs/swagger";
import { ApiTags as DocsTags, ApiCreatedResponse, ApiOkResponse, ApiOperation } from "@nestjs/swagger";
import { Response as ExpressResponse, Request as ExpressRequest } from "express";

Expand All @@ -20,7 +20,7 @@ import { ApiResponse, GetAvailableSlotsInput_2024_04_15 } from "@calcom/platform
path: "/v2/slots",
version: [VERSION_2024_04_15, VERSION_2024_06_11, VERSION_2024_06_14],
})
@DocsTags("Slots")
@DocsExcludeController(true)
export class SlotsController_2024_04_15 {
constructor(
private readonly slotsService: SlotsService_2024_04_15,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,26 +39,6 @@ export class SlotsController_2024_09_04 {
summary: "Reserve a slot",
description: "Prevent double booking by reserving a slot.",
})
@ApiHeader({
name: "cookie",
description:
"Contains the `uid` cookie representing the user's existing slot reservation. This cookie is optional and may not be present if the user hasn't reserved a slot yet.",
required: false,
example: "uid=12345-abcde-67890-fghij",
})
@DocsResponse({
status: 201,
description:
"Slot reservation was successful. A new `uid` cookie representing the reservation will be included in the response in addition to response body containing the uid.",
schema: {
example: {
status: "success",
data: {
uid: "98765-zyxwv-43210-qwerty",
},
},
},
})
async reserveSlot(
@Body() body: ReserveSlotInput_2024_09_04,
@Cookies("uid") uidCookie: string | undefined,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
import { ApiProperty } from "@nestjs/swagger";
import { Type } from "class-transformer";
import { ValidateNested } from "class-validator";
import { IsNotEmptyObject, ValidateNested } from "class-validator";

import {
ApiResponseWithoutData,
ReserveSlotOutput_2024_09_04 as ReserveSlotOutputType_2024_09_04,
} from "@calcom/platform-types";

export class ReserveSlotOutput_2024_09_04 extends ApiResponseWithoutData {
@ApiProperty({
type: ReserveSlotOutputType_2024_09_04,
})
@IsNotEmptyObject()
@ValidateNested()
@Type(() => ReserveSlotOutputType_2024_09_04)
data!: ReserveSlotOutputType_2024_09_04;
Expand Down
Loading