Commit Graph

8 Commits

Author SHA1 Message Date
Aswin V fde514123b
Pagination View fixes for DSync User/Group Lists (#2572)
* Handle pagination query params correctly and set response header for pageToken

* Support for pageToken

* Revert tokenmap change for and add comment

* Exclude `log_webhook_events` checkbox while creating

* `pageToken` handling for WebhookLogs

* `pageToken` handling in API route

* Fix unit tests

* Fix test

* Update tokenmap using effect
2024-04-15 11:01:32 +01:00
Kiran K f7cf763cbc
Request handler middleware for API routes (#2403)
* Add error class and update API handlers

* Refactor admin API handlers

* Fix error constructor parameter order

* Add defaultHandler to API endpoints

* Keep the handler name

* Fix error status code in defaultHandler and ApiError

* Fix the status code

* Improve conditional logic

* Small tweak

---------

Co-authored-by: Aswin V <vaswin91@gmail.com>
2024-03-14 14:51:16 +00:00
Kiran K 07a5f8a46d
Google Directory API Integration (#1158)
* Add Google Group API

* Restructure the Group interface

* Rename the methods

* wip

* temp change

* Revert the changes

* Fix the groups from Google

* wip fetch users

* Skip directory check

* Convert to SCIM schema

* Updates to users sync

* Fix the unit test

* Rename folder and merge the files

* add raw to the user payload

* Fix the unit tests

* Optimize the Group sync create ops

* Reorder import

* Remove unused imports

* Add type safety to SCIM Schema

* Fix the users and groups update

* try fixing unit tests

* Fix the file extension

* Delete groups that are not in the directory anymore

* Fix the group update

* Compare and find the delete users

* Add and update group members

* cleanup the test

* Fix the test (temp)

* dont throw error

* Add secondary index if the directory type is `google`

* Rename the file

* wip

* Export functions inline

* Hide the SCIM endpoint and token for non-scim provider

* Update the `dsync` option key to allow multiple providers

* Restructure the folders

* Update folder structure

* Cleanup

* Revert the callback changes

* Fix the type

* Fix the type

* Fix existing unit tests

* add callback

* Fix the internal callback

* Fix the method call

* merge the type files

* add console.info for testing

* Fix the Google OAuth client usage

* Reactor the update method

* Handle no users or group cases

* Refactor the sync method

* Fix the pagination

* Cleanup

* Finish the pagination

* Fix the unit tests

* Fix the lint errors

* Fix the build issues

* Pass directory id to the method

* Pass directoryId while fetching

* apply changes to the UI

* display the Google auth URL

* Fix the type

* add unit tests

* add unit test for syncing users

* add unit tests

* Pass operation to SCIM payload

* unit tests wip 1

* updated

* Test the events deleted

* Test group.user_added events

* Finish the tests

* Revert and cleanup

* update map.js

* Revert

* update the e2e test

* Cleanup

* Revert

* label tweak

* Remove unused import

* Protect the cron job using apiKey

---------

Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com>
2023-06-15 14:31:38 +01:00
Kiran K 842ff50268
Add Playwright test for `/api/v1/` and `/api/scim/` endpoints (#816)
* Update config

* add the test cases for /api/v1/connections

* Fix the strategyChecker, add metadataUrl to the condition

* add the test cases for /api/v1/connections

* update /api/v1/connections

* Update the SSO connections tests

* Rename the test file

* update the tests

* should be able to check if a connection exists

* add the tests for directory sync APIs

* rstructure the tests folder

* add tests wip

* Fix the API tests

* Fix the sso connections tests

* Refactor the connections list

* restructure the /api/v1/connections APIs

* restructure the /api/v1/directory-sync tests

* add the tests for /api/scim/v2.0/

* update the tests

* wip

* fixes the api testing

* allow adding multiple directory connections for the same tenant and product

* update the tests

* update the unit tests

* improved the integration tests

* cleanup the api tests

* add tests for SCIM APIs

* fix the globalSetup

* update the tests for SCIM endpoints

* add the remaining tests

* fix the bug with fetching resource by invalid ID

* cleanup

* fix the tests

* update the tenant name

* typescript types cleanup

* directory sync API updates

* standardize the /api/v1/directory-sync

* update the directories.test.ts

* remove unused methods

* filter the users and groups by directoryId

* improve the SCIM request handling

* fix the e2e tests

* fix the e2e tests

* attempt to fix the api tests

* fix the api testing

* move the files to helpers

* add pagination for directory groups

* API - delete a directory by id

* delete the directory after the tests

* remove the members array from the group info
2023-01-17 10:07:14 +00:00
Kiran K eb80fb5297
Use middleware to validate the API requests (#792)
* Update

* Validate the API routes in the middleware

* Validate the setuplink token by calling the API

* Tweaks

* unAuthorizedResponse method now accept a message

* Update middleware

* Cleanup

* Update message

* Removed CheckSession - Not needed anymore

* Updates to API authentication middleware

* Updates to API authentication middleware

* Remove the use of checkSession from retraced admin APIs

Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com>
2023-01-06 23:37:08 +00:00
Kiran K 4e10d501ea
Standardize the setup link feature (#784)
* Tweaks to NewSetupLink

* Standardize the setup link feature

* Fix the connection APIs

* Standardize the Setup Link + Directory sync

* Tweaks to components

* Move the directory listing to a components

* Tweaks to connectons

* Updates connections page

* Make variable naming consistent

* Standardize the page export

* Remove unnecessary named export from API handler
2022-12-29 19:01:50 +05:30
Kiran K da7fffdafd
Fix pagination and other UI issues (#781)
* Update

* Fix the sidebar active state

* Add back button to the missing pages

* Use the translation keys

* Fix the type

* Remove old pagination component

* Fix the pagination for SSO connections

* Change the extension to .ts

* Add pagination to the directories listing

* Add the space between the buttons

* Add pagination for SAML Federation Apps

* Add missing pagination

* Fix the back buttons

* Add the pagination for webhook events

* Tweaks

* Fix the issue

* Fix the tests

* Fix the failing tests

* Fix the failing tests

* added hover state for table rows

* aligned SAML federation page with rest

* optimised imports from heroicons

Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com>
2022-12-28 16:29:45 +00:00
Kiran K 2d3e117992
Align Directory Sync with SSO Connections when it comes to SSR/CSR (#766)
* API to list the directories

* Add the API to get the directory info

* Add missing APIs

* Use useDirectory hook

* Fix the link active condition

* Update
2022-12-27 17:56:36 +05:30