Commit Graph

275 Commits (d8d875cc0192694cd05fc446027030f63b67f67f)

Author SHA1 Message Date
Syed Ali Shahbaz 2a5688f2a6
Adds the ability to confirm a booking using API (#243)
Simply adds the ability to update the status of a booking (meant for
confirming a booking) using the API
Fixes: https://github.com/calcom/cal.com/issues/7121
2023-02-23 15:04:48 -07:00
zomars 42eb7041d4 New linting rules 2023-02-16 14:01:40 -07:00
Syed Ali Shahbaz f02cfc9990
Swagger definition general fixes (#237)
This PR addresses definition errors currently residing within our
swagger doc.
 
~DISCLAIMER: There is still an error for our DELETE booking call, as
open API standard doesn't expect the DELETE call to contain a request
body, but we are requiring it in the way it currently works. Perhaps we
should move those to Query Parameters instead. Thoughts @zomars @emrysal
?~

It was taken care of by @leog and the docs are now updated as per the
endpoint

<img width="247" alt="image"
src="https://user-images.githubusercontent.com/52925846/217799706-21b7c21d-696b-4e20-a682-c8a949694b61.png">
<img width="629" alt="image"
src="https://user-images.githubusercontent.com/52925846/217799842-c903c23a-0b0d-4208-a3e9-01a682eeff97.png">

---------

Co-authored-by: Leo Giovanetti <hello@leog.me>
Co-authored-by: Omar López <zomars@me.com>
2023-02-13 12:52:11 +00:00
zomars fdb45e3745 More tests 2023-02-08 19:56:41 -07:00
zomars 317e05511b Shared insntances test fix 2023-02-08 19:33:23 -07:00
zomars 0389ebfed5 Testing disconnect 2023-02-08 19:30:03 -07:00
zomars 0b2724124a Updated checkLicense 2023-02-08 10:56:00 -07:00
Omar López 992bdc0b54
Fixes paginated endpoints (#234)
- Passing an invalid number or 0 was causing trouble
2023-02-07 17:20:21 -07:00
zomars 9af022b663 Fix for multi-tenant users 2023-01-25 14:14:43 -07:00
Leo Giovanetti 6cec8620cb
Pagination issue fixed, total added (#227)
Fixes #217.
2023-01-18 12:49:31 -07:00
Udit Takkar 7aebdb8c96
fix: use schema from zod-utils (#225)
fixes:- https://secure.helpscout.net/conversation/2117165409/2395

How to test? 
Create an event type with custom inputs 
GET Request on /event-types end point


After:- 
<img width="1440" alt="Screenshot 2023-01-07 at 4 57 39 PM"
src="https://user-images.githubusercontent.com/53316345/211147930-1154f1ad-5309-4e9c-b2e0-164169717d47.png">

Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in>
2023-01-07 08:56:13 -07:00
Joe Au-Yeung 5d892df019
Allow seatsPerTimeSlot and seatsShowAttendees in event type calls (#216)
This PR allows `seatsPerTimeSlot` and `seatsShowAttendees` in event type
POST and PATCH calls
2022-12-15 15:36:09 -07:00
zomars 8b74f463f4 Needed for console 2022-12-08 15:00:06 -07:00
zomars 41d22c8ccb Fixes for console 2022-12-05 16:09:19 -07:00
zomars ae7c3e2d6a Removes unused cache 2022-12-05 14:16:58 -07:00
zomars b3443cd22d Revert fix 2022-12-02 18:39:30 -07:00
zomars e15f6abc9b Fixes 2022-12-02 15:22:56 -07:00
Omar López d35f27014e
Implements API key endpoint (#211)
This allow us to manage our API keys directly from the API itself.

User can:
- Create own API keys
- Edit own API keys (only the note field for now)
- Delete own API keys
- Get own API keys

Admin can:
- CRUD for any user
- Get all API keys
2022-11-29 15:06:23 -07:00
zomars 055699f612 Various import and type fixes 2022-11-25 06:58:21 -07:00
alannnc c016a4343d
added more endpoints and validations for publish-pay teams (#209)
## What does the PR do?

- Team billing via API

Just like the web project, we validate that team has stripe metadata
before converting requestedSlug to slug.

Co-authored-by: zomars <zomars@me.com>
2022-11-22 13:24:25 -07:00
Alex van Andel 51bc3d93c1
user: Add email and username, remove bufferTime,startTime,endTime (#202)
Co-authored-by: zomars <zomars@me.com>
2022-11-17 11:35:06 -07:00
Alex van Andel 0f5017010f Fix lint error 2022-11-07 14:48:32 +00: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
Alex van Andel 9448e67ed0
Added status: true to booking model (#203) 2022-10-21 14:04:20 +01:00
Omar López f66ed50ecb
Selected Calendars endpoints refactor (#193)
refs #175
2022-10-20 11:35:02 -06:00
Alex van Andel 1f9be423ad
Set start and endTime to iso8601 (#198) 2022-10-20 18:26:43 +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 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 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
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
Omar López 18e96e2a47
Refactors availabilities endpoints (#177)
refs #175
2022-10-10 09:42:15 -06:00
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 3bdebba21e
Adds meaningful response for the API caller 2022-10-07 13:12:57 +05:30
Syed Ali Shahbaz 12f54773f9
Adds safeParseJSON.ts file 2022-10-07 12:43:47 +05:30
Leo Giovanetti 2a05f15156
Recurring booking implementation (#167)
* Recurring booking implementation

* Tweaks to expected texts in tests

* Applied feedback

Co-authored-by: zomars <zomars@me.com>
2022-10-06 17:40:41 -03:00
Joe Au-Yeung da88beb1f5 Fix type errors 2022-10-06 15:06:07 -04:00
Joe Au-Yeung 2a7a111855 Safe parse for userId 2022-10-06 14:38:17 -04:00
Joe Au-Yeung a5413b40ab Add ability to get, post, and delete for other users if admin 2022-10-05 11:04:58 -04:00
Joe Au-Yeung 1adace1c0d Create new availability on new schedule 2022-10-05 09:56:27 -04:00