* fix: use userId as ratelimit identifier
Using raw api keys as identifiers is problematic because they are logged
and are accessible via Unkey's UI.
My first idea was to use the api key's primary key, which would solve
this just fine. But after looking at the implementation it seemed easier
to use the user's id, which is what most people are interested in
limiting, not the actual keys. Also the userId was already passed in the
requests context, which made it easier. Sean confirmed that ratelimiting
the user, not their keys made more sense, so here we are.
* Update rateLimitApiKey.ts
* Update rateLimitApiKey.ts
* Fix tests
* Fix tests
---------
Co-authored-by: Benny Joo <sldisek783@gmail.com>
Co-authored-by: Joe Au-Yeung <j.auyeung419@gmail.com>
* add delete to redis service
* auto lock + tests
* changes to autolock in api/book call
* remove log clutter
* add detection in api v1
* tpye changes
* throw error and add tests for API
* add response logic on locked + tests
* type response properly i hope?
* type fix
* add tests for counter not existing + redis errors
* remove IP - add sentry to track
* rename symbol
* fix type error
* fix tests
* remove sentry call spy
* fix type on sentry setUser call
---------
Co-authored-by: Alex van Andel <me@alexvanandel.com>
* feat: split name booking field in v2
* fix: booker atom handle split name
* fix: after and before start dates bookings filter
* chore: bump platform libraries
* chore: save progress
* feat: support phone based booking using API v2
* chore: change name of the variable
* fix: update event types and booking fields for improved validation and new properties
- Updated imports in input and output event types services to use the correct library version.
- Added new `avatarUrl` and `successRedirectUrl` properties to the Swagger documentation for user and booking schemas.
- Enhanced booking fields validation by changing the `required` property to a boolean type.
- Improved descriptions and examples in the OpenAPI specifications for better clarity.
- Refactored booking fields input and output classes to include new properties and ensure proper validation.
* fix: booking with phone number
* test: add event type update test
* test: add test for creating booking
* chore: update unit test
* fix: tests
* fix: add turbo
* chore: remove emial
* refactor: make email optional and move it to service
* fix: test
* chore: bump platform-libraries
* fix: e2e test
---------
Co-authored-by: supalarry <laurisskraucis@gmail.com>
* feat: allow title,notes,reschedule reason inputs
* refactor: v2 event type default booking fields as in web app
* wip: input validation
* input field validation
* fix: tests
* chore: bump libraries
* remove change in docs
* fix input type
* chore: ensure additional notes at the end
* fixup! Merge branch 'main' into lauris/cal-4932-platform-refactor-default-booking-fields
---------
Co-authored-by: Morgan Vernay <morgan@cal.com>
Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>
* first version of ooo calibration
* decrease precision when checking for full day event
Co-authored-by: Alex van Andel <me@alexvanandel.com>
* improve variable naming
* don't include hosts created after OOO
* fix failing tests
* fix all tests
* add test for ooo calibration
* first implementation to fix full day busy event reaching the current month
* allow mutiple day events
* make getAvailabilityWithTimeZones optional
* fix type error
* fix type errors
* fix tests
* fix type error
* fix test
* code clean up
* remove time adjustment from map
* code clean up
* fix tests
* getAllCalendars -> this.getAllCalendars
* fix typo
* extract mergeOverlappingRanges
* code improvements from feedback
* fix getCalIdsWithTimeZone
---------
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
Co-authored-by: Alex van Andel <me@alexvanandel.com>
Co-authored-by: Benny Joo <sldisek783@gmail.com>
* Add email domain array
* Create numbered email domain object
* Check email domain
* Rename function
* Add tests
* Frontend enable skip ownership check if free email domain
* Backend ignore adding ownership to return records if free email domain check is enabled
* feat: Only require confirmation for free email domains (#17917)
* Add requiresConfirmationForFreeEmail to db
* Add option to event type settings
* Get requiresConfirmationForFreeEmail for event type page
* Include requiresConfirmationForFreeEmail in fetching event type
* Pass bookerEmail to `getRequiresConfirmationFlags`
* Add free email domain check to `determineRequiresConfirmation`
* Add `requiresConfirmationForFreeEmail` to types
* Add severity to Watchlist table
* Add migration for watchlist severity
* Add `getEmailDomainInWatchlist` method to watchlist repository
* Use watchlist repository to check for free email domain
* Mock watchlist repository in test
* Update test
* Rename method
* Add severity to blocked list
* Move check free email domain to async
* Type checks
* Adjust for promise returned
* Fix tests
* Fix
* Fix tests
* refactor: make dateFrom and dateTo required
* refactor: make dateFrom and dateTo required
* refactor: useCalendarsBusyTimes enabled only if dateFrom & dateTo passed
* refactor: ApiAuthStrategy return isSystemAdmin and define returned type
* refactor: use ApiAuthGuardUser instead of GetUserReturnType
* regenerate docs
* feat: v2 teams event-types endpoints
* refactor: rely on teams event types service and repository
* finish mergin main into this branch
* test: teams event types
* refactor: move teams event types output from org to teams folder
* refactor: move teams event types output from org to teams folder
* chore: finish merge main
* refactor: logger name and unused import
* chore: finish main merge
---------
Co-authored-by: Somay Chauhan <somaychauhan98@gmail.com>
* feat: teams endpoints
* refactor: organization teams reuse team types
* refactor: move team specific functions out of organizations-teams.repository
* supporting files
* regenerate docs
* feat: stripe service to generate team creation checkout
* refactor: request payment when creating a team
* fix: tests
* fix env
* driveby: event type name and email booking fields
* finish merge main
* feat: added office 365 video to conferencing atoms
* added documentation for conferencing atoms
* added props table to the documentation
---------
Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>
* chore: add successRedirectUrl to event-types api v2
* chore: add successRedirectUrl to event-types api v2 patch
* chore: add successRedirectUrl to event-types api v2 patch
* refactor: store default booking fields when creating event
* Revert "refactor: store default booking fields when creating event"
This reverts commit 78b7c4eda2be61420b4410bc80a3d77b5557a967.
* refactor: v2 return default booking fields if they are null
* test: v2 returning default booking fields if they are null
* chore: platform-libraries export getBookingFieldsWithSystemFields
* added api/v2 for zoom connect
* Update conferencing.controller.ts
* fix: added api for ConferencingAppsViewPlatformWrapper
* type fixes
* added getBulkEventTypes api for bulk-update default location
* added bulk-update-to-default-location
* fix:bulk-update-to-default-location
* invalidated
* fixed returnTo and onErrorReturnTo
* make logos work for conferencing atoms
* smalll improvements
* fixup
* share common types
* type fix, and fixed a typo
* fix: type-error
* fix: json.parse(json.parse())
* fix: invalidate query
* fix: removing app throws error in the main app
* undo platform-libraries-1.2.3
* update platform-libraries version
---------
Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>