Commit Graph

240 Commits (f13694fd1300514e219122296a4f621581e93808)

Author SHA1 Message Date
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
Agusti Fernandez Pardo be200cd076 fix: userId not 0 for fixing /me endpoint 2022-09-07 18:18:43 +02:00
Agusti Fernandez Pardo 3caee6c697 fix: removes daily-event-reference endpoints and types 2022-09-06 19:04:16 +02:00
Agusti Fernandez Pardo 12fe6af995 feat: adds license check 2022-08-04 19:54:25 +02:00
zomars 60c2f73607 Migrates EE code 2022-07-28 13:51:20 -06:00
zomars 159792831a New import 2022-07-22 20:32:10 -06:00
Agusti Fernandez Pardo aa12f893e8 fix: users pagination remove min/max as its a string not a number, also add new env var to example 2022-07-14 19:44:24 +02:00
Agusti Fernandez Pardo b2f3242a8e Merge branch 'main' into production 2022-07-12 20:35:10 +02:00
Agusti Fernandez Pardo 6971ba249f fix: add optional to pagination query's 2022-07-08 21:47:31 +02:00
Agusti Fernandez Pardo c8829fc08b fix: rename pageNumber to page 2022-07-08 20:19:51 +02:00
Agusti Fernandez Pardo 530752147e fix: use zod schema for parsing page query param 2022-07-08 20:15:25 +02:00
Agusti Fernandez Pardo f93cb48d4d fix: query partial type 2022-07-07 18:56:27 +02:00
Agusti Fernandez Pardo 9b5c7c5120 fix: remove unused import 2022-07-05 20:13:13 +02:00
Agusti Fernandez Pardo a63b623a7d feat: teamId availability in API 2022-07-05 20:12:14 +02:00
Agusti Fernandez Pardo be2647790c feat: refactor teams and add team availability 2022-06-30 00:01:14 +02:00
Agusti Fernandez Pardo f85b00507a fix: add type import for NextApiRequest 2022-06-24 00:47:27 +02:00
zomars 3c32bc8528 Update customPrisma.ts 2022-06-23 16:42:47 -06:00
Omar López bfe27057a0
Update lib/constants.ts 2022-06-23 16:40:01 -06:00
Agusti Fernandez Pardo 61c82eb197 fix: address issues raised in preview PR 2022-06-24 00:26:40 +02:00
Agusti Fernandez Pardo 04b9b71310 fix: userId not, id remove templates stall 2022-06-24 00:09:23 +02:00
Agusti Fernandez Pardo aa64f32378 fix set headers error by adding missing return 2022-06-23 23:20:07 +02:00
Agusti Fernandez Pardo c3996221e1 fix: don't require apiKey if already using customPrisma with calcom license key 2022-06-23 19:16:12 +02:00
Agusti Fernandez Pardo b6729d8b82 fix custom prisma works 2022-06-22 05:49:24 +02:00
Agusti Fernandez Pardo 6e78bf15f0 feat: databaseUrl customPrisma 2022-06-21 23:02:43 +02:00
Agusti Fernandez Pardo 4626b3dffa fix: 2022-06-20 02:29:18 +02:00
Agusti Fernandez Pardo 60688e2e91 fix: make isAdmin require req.prisma too 2022-06-18 03:03:13 +02:00
Agusti Fernandez Pardo 5b28e9ec1c fix: main merging issues 2022-06-18 02:16:15 +02:00
Agusti Fernandez Pardo 6e68671c2a fix: merge w main 2022-06-18 01:52:37 +02:00
Agusti Fernandez Pardo 374a6e087a feat: remove datacredentials, move to deployment.databaseUrl 2022-06-17 23:23:28 +02:00
Agusti Fernandez Pardo 2682db8fcd fix: remove user metadta from validations 2022-06-16 23:38:36 +02:00
Agusti Fernandez Pardo 11f3d411b3 fix: rename users id to users userId to easier availability sharing _get endpoint 2022-06-16 00:18:40 +02:00
Agusti Fernandez Pardo 26f861d0d0
Merge pull request #107 from calcom/feat/admin-events
Feat: Add admin enpoints for event-types, bookings, attendees
2022-06-15 21:58:31 +02:00
Agusti Fernandez Pardo 1d2e5f07ef feat: admin endpoints for bookings 2022-06-15 21:10:19 +02:00
Agusti Fernandez Pardo ed1bc8015a feat: initial isAdmin work for events and attendees 2022-06-15 20:43:35 +02:00
Agusti Fernandez Pardo 1e80a83b1f add session to req 2022-06-14 23:57:38 +02:00
zomars ae9c33ddbe Makes user create/update body strict 2022-06-14 14:44:09 -06:00