Commit Graph

706 Commits (e0619d383ab976f0ddf8d92b97ade894f343ccce)

Author SHA1 Message Date
zomars e0619d383a Sync package.json 2022-11-04 12:14:54 -07:00
Omar López d1bbaef5c6
Refactor membership endpoints (#204)
refs #175

Co-authored-by: Alex van Andel <me@alexvanandel.com>
2022-10-21 13:54:28 -06:00
zomars d93fd26a1e Removed unused methods middleware 2022-10-21 13:30:09 -06:00
zomars 6522600c42 Add missing bodyUserId 2022-10-21 12:55:35 -06:00
zomars 7617cd43e1 Patching bodyUserId requests 2022-10-21 12:55:15 -06:00
Alex van Andel b30995456c Bring back @calcom/ui 2022-10-21 14:13:19 +01:00
Alex van Andel 9448e67ed0
Added status: true to booking model (#203) 2022-10-21 14:04:20 +01:00
Alex van Andel adfada993e
Remove the Signup from /api and remove @calcom/ui dep (#201)
Also adds missing dependencies
2022-10-21 13:19:31 +01:00
Alex van Andel dee0f6a415
Remove GET /availabilities (#188)
Follows-up on earlier discussions about the relationships of
/availabilities and /schedules.

`GET /schedules/:id` returns a schedule with associated availabilities
in the `availabilities` property. It gives more context and less
consumer work to perform GET actions using this endpoint. Other
endpoints of this collection do make sense.

Proposing also to rename the /availabilities collection to
/availability; given after this it always involves one and only one
/availability record in CRUD.
2022-10-21 00:58:20 +01:00
Leo Giovanetti debc8dbafb
Using abstracted booking cancellation (#191)
Implemented `DELETE /booking/:uid` as well as `DELETE
/booking/:uid/cancel` based on abstracted cancellation logic from
webapp.

PR dependant on https://github.com/calcom/cal.com/pull/5105

Co-authored-by: Alex van Andel <me@alexvanandel.com>
2022-10-21 00:49:57 +01:00
Omar López f66ed50ecb
Selected Calendars endpoints refactor (#193)
refs #175
2022-10-20 11:35:02 -06:00
Alex van Andel 109377b65c
Returns bookings in response where user is attending (#196) 2022-10-20 18:27:24 +01:00
Alex van Andel f4d52b88a4
Changed req to query to allow passing in userId, not session (#197) 2022-10-20 18:27:01 +01:00
Alex van Andel 1f9be423ad
Set start and endTime to iso8601 (#198) 2022-10-20 18:26:43 +01:00
Alex van Andel ecd20d63c9
Added attendees & user (#192) 2022-10-19 19:35:34 +01:00
Omar López 03d5f51ceb
Refactor/webhooks (#186)
refs #175
2022-10-19 12:26:12 -06:00
Alex van Andel ce2df7641f
Feature/additional fields (#189)
Added timeZone, attendees.(email, name, timeZone, locale), user.(email,
name, timeZone, locale) & metadata
2022-10-19 17:03:54 +01:00
zomars 07b011424f Formatting 2022-10-15 10:54:22 -06:00
zomars 00bd908916 Fixes permission errors 2022-10-14 17:41:28 -06:00
zomars 37fa76315a Allow to update booking description 2022-10-14 15:52:17 -06:00
zomars 25d3d12319 Adds custom inputs to eventTypes responses 2022-10-14 15:52:09 -06:00
zomars 11ffdccb4a Removes locale altogehter
@see https://github.com/vercel/next.js/issues/29000
2022-10-14 13:26:30 -06:00
zomars 7708ee83a1 Locale fixes 2022-10-14 13:16:46 -06:00
zomars d38015c737 Locale fixes 2022-10-14 13:02:53 -06:00
zomars ad35d3a5cd Linting 2022-10-14 12:57:50 -06:00
zomars 9c35ff2d2e Locale fixes 2022-10-14 11:42:31 -06:00
zomars ccf0a40b67 Misc fixes 2022-10-14 11:42:05 -06:00
Omar López e3fa0e546b
Refactor schedule endpoints (#185) 2022-10-13 14:54:38 -06:00
zomars 31610dd178 Adds missing description field to patch 2022-10-13 13:39:04 -06:00
Omar López 6ba70a7259
Refactor/custom inputs (#184)
refs #175 

To be merged after #183
2022-10-13 12:30:48 -06:00
Omar López 8c24c5c714
Refactor/booking logic (#183)
refs #175 

Reuses the same logic for creating bookings from the web app.

Co-authored-by: Leo Giovanetti <hello@leog.me>
2022-10-13 12:29:30 -06:00
Omar López f13694fd13
Refactors event-types endpoints (#181)
refs #175
2022-10-11 14:14:03 -06:00
zomars 4ba0395efa Permission fixes 2022-10-11 14:09:22 -06:00
Hariom Balhara 7aeb247b1a
Delete unused file. If needed import from @calcom/core (#156) 2022-10-11 15:36:18 +01:00
Alex van Andel a506c7da33
Refactor + fix userIds filter (#179)
This fix means a behaviour change to GET calls. Instead of a JSON
payload, instead a filter param has been added to the URL itself. GET
payloads are very unexpected in API designs, even though supported.

* Todo write tests (with postman?)
* Turn isAdmin logic into common middleware

```bash
curl "http://localhost:3002/v1/schedules?apiKey=...&userId=2"
```

```bash
curl "http://localhost:3002/v1/schedules?apiKey=..." \
  -d '{"name":"Hello", "userId": 2}' \
  -H 'Content-Type: application/json'
```
2022-10-11 15:33:25 +01:00
Omar López da61841525
Refactors booking references endpoints (#180)
refs #175
2022-10-11 15:25:57 +01:00
zomars 88332fb2ab Refactors teams 2022-10-10 20:25:47 -06:00
zomars c03144c343 Fixed major flaw with authMiddleware
authMiddleware should not use defaultResponder directly as it will catch thrown error and we need those errors to prevent running the rest of the code.
2022-10-10 20:23:08 -06:00
zomars a35454bb68 Me cleanup 2022-10-10 18:02:36 -06:00
Omar López 18e96e2a47
Refactors availabilities endpoints (#177)
refs #175
2022-10-10 09:42:15 -06:00
Omar López cb9ce8a8c5
Merge pull request #176 from calcom/refactor/attendees
Refactors attendees' endpoints
2022-10-07 16:08:09 -06:00
zomars d4a2b8e791 Refactors attendees' endpoints 2022-10-07 13:08:25 -06:00
Omar López 85890a6acb
Merge pull request #172 from calcom/fix/invalid-eventtypeid
Recurring event booking: invalid eventTypeId
2022-10-07 10:59:14 -06:00
Syed Ali Shahbaz f5d953ef1c
Hotfix/schedule (#174)
* Allows empty call

An authorized API call by a non-admin user with empty body will still fetch his data now

* Adds missing return
2022-10-07 15:33:04 +05:30
Joe Au-Yeung d68ce5e72f
Admin privileges for /availabilities endpoint (#169)
* List other user's availabilities

* /availabilityId methods for other users

* Add return statements

* Accept userId single value or array

* Add zod schema checks

* Filter for schedules only with an availability

* Adds safeParsing of JSON before safeParsing of zod

* Removed console log

* Adds safe JSON parsing before .safeParse

* Allow API call without necessarily passing userId

Allow `/availabilities` call by a regular user without having to pass their userId to make it work

Co-authored-by: Syed Ali Shahbaz <52925846+alishaz-polymath@users.noreply.github.com>
2022-10-07 15:26:02 +05:30
Syed Ali Shahbaz 0abf286785
Merge pull request #168 from calcom/create-schedule-with-availability
Admin privileges for /schedules
2022-10-07 10:23:41 +02:00
Syed Ali Shahbaz 628306793d
Prettier fix :/ 2022-10-07 13:47:46 +05:30
Syed Ali Shahbaz b05b6e48e7
Fixes another typo 2022-10-07 13:41:17 +05:30
Syed Ali Shahbaz 8eaad0c1c6
fixed typo 2022-10-07 13:34:02 +05:30
Syed Ali Shahbaz 9a65c547dc
Adds missing return after res 2022-10-07 13:24:55 +05:30