Commit Graph

198 Commits

Author SHA1 Message Date
Nate Kelley 7cf8b10c07
Added void type 2025-08-02 21:30:26 -06:00
Nate Kelley a4f960ff13
Update scheams for get list 2025-08-02 20:35:34 -06:00
Nate Kelley 7b3975c4ae
update schemas 2025-08-02 20:15:48 -06:00
Nate Kelley 13d814e980
Merge branch 'staging' into devin/BUS-1605-1754181219 2025-08-02 19:32:58 -06:00
Devin AI 884f5b7392 fix: use z.any() type casting to avoid TypeScript inference limits
- Replace ReportElementsSchema with z.any() cast to ReportElements type
- Avoid complex Zod schema inference that exceeds TypeScript serialization limits
- Maintain type safety through explicit type annotations while fixing CI compilation

Co-Authored-By: nate@buster.so <nate@buster.so>
2025-08-03 01:28:11 +00:00
Devin AI c3657493f3 fix: restructure report schemas to avoid TypeScript inference limits
- Use BaseReportSchema.extend() pattern to break down complex type inference
- Separate content field extension to avoid 'type exceeds maximum length' errors
- Maintain same API contract while fixing CI compilation issues

Co-Authored-By: nate@buster.so <nate@buster.so>
2025-08-03 01:26:50 +00:00
Devin AI abc801f10b feat: implement reports API endpoints for BUS-1605
- Add Report schema extending ReportElements with metadata fields
- Create GET /api/v2/reports endpoint with pagination
- Create PUT /api/v2/reports/:id endpoint for updates
- Use stubbed data responses following established patterns
- Follow modular route structure and Zod-first validation

Co-Authored-By: nate@buster.so <nate@buster.so>
2025-08-03 00:38:50 +00:00
Nate Kelley 5a501d9630
Finalized floating toolbars 2025-08-02 17:20:37 -06:00
Nate Kelley f51a599f3d
finalized highlighter 2025-08-02 17:12:33 -06:00
Nate Kelley 6502d9487d
finalized toolist 2025-08-02 16:49:01 -06:00
Nate Kelley 3d726438fb
custom colors in dropdown 2025-08-02 16:22:17 -06:00
Nate Kelley 0778c8db4e
update elements to support date 2025-08-02 15:49:52 -06:00
Nate Kelley b8b39b3d93
finalized equation 2025-08-02 14:04:37 -06:00
Nate Kelley 1f8cdd1677
media embed element 2025-08-02 13:16:06 -06:00
Nate Kelley 76c87fb47c
update nodes 2025-08-02 11:54:42 -06:00
Nate Kelley a406e46ee8
Add additional components 2025-08-01 21:12:59 -06:00
Nate Kelley 2c9abed9bc
Update list dynamics 2025-08-01 20:33:23 -06:00
Nate Kelley d46688bc5b
Added additional plugins 2025-07-29 15:48:01 -06:00
Nate Kelley be3e8b7adf
add a common markdown parser to server 2025-07-29 14:57:19 -06:00
Nate Kelley b6a8fa9eac
Update report-elements.ts 2025-07-29 13:59:19 -06:00
Nate Kelley 991fbc799f
Update example-markdown.md 2025-07-29 13:30:35 -06:00
Nate Kelley 2c250f0a02
validation updates 2025-07-29 13:26:25 -06:00
Nate Kelley 7f328f39bf
make draggable blocks better 2025-07-29 12:47:09 -06:00
dal 2e04af1785
fix: address additional critical PR review comments
- Fixed permission hierarchy: full_access (5) now correctly ranks higher than viewer (3)
- Removed 'querier' role from admin permission check as it was too permissive
- Added organizationId parameter to dashboard access checks to prevent unauthorized access
- Fixed public dashboard expiry date check to verify dates are in the future
- Added cycle detection for collection permissions to prevent infinite recursion
- Fixed bulk remove permissions to correctly filter by identityIds array
- Updated date comparison to use ISO string format for PostgreSQL timestamp columns

These fixes address critical security and logic issues identified in the PR review.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-29 12:28:58 -06:00
dal d078830a18
fix: address PR review comments for access control migration
- Fixed AssetTypeSchema to include all active asset types (excluding deprecated 'metric' and 'dashboard')
- Added missing 'restricted_querier' role to UserOrganizationRole type
- Fixed dataset access caching to store full result object including accessPath and userRole
- Updated count query to use SQL COUNT for better performance
- Fixed IdentityType consistency across dataset permissions
- Removed unused 'ne' import from list-asset-permissions.ts
- Updated comments to correctly reference 6 access paths instead of 5

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-29 12:28:52 -06:00
Nate Kelley ae2b21dcd9
update server markdown to platejs 2025-07-29 10:53:24 -06:00
Nate Kelley ad53f0ffe1
update code blocs 2025-07-28 22:19:11 -06:00
Nate Kelley 0ac9db4bf1
Added additional plugins 2025-07-28 20:14:37 -06:00
Nate Kelley d6ff3f8bcb
Add component level typesafety 2025-07-28 18:57:46 -06:00
dal 4bef4205f3
feat(access-controls): migrate Rust access control libraries to TypeScript
This PR migrates the Rust  and  libraries to TypeScript in the new  package.

## Changes

### New Access Controls Package
- Implemented complete asset permissions system with CRUD operations
- Added dataset permissions with all 5 access paths (admin, direct user, user→group, team→direct, team→group, org→default)
- Implemented cascading permissions (metrics inherit from dashboards/chats/collections)
- Added LRU caching to replace Redis (30-second TTL)
- Comprehensive test coverage (148 tests passing, 3 skipped pending createUser)

### Database Package Updates
- Fixed AssetType enum to include all 14 asset types
- Added missing database queries for permissions
- Fixed timestamp fields to use ISO strings
- Added getUserOrganizationsByUserId function
- Created organized query structure by table

### AI Package Updates
- Updated getPermissionedDatasets API calls to new format
- Changed property references from ymlFile to ymlContent
- Fixed all test mocks to match new API structure

### Trigger App Updates
- Updated to use new access controls API
- Fixed test mocks to match DatasetListResult structure
- Added proper type imports

### Server Shared Updates
- Added request/response types for access control endpoints
- Exported types for API consistency

## Testing
- All packages build successfully with turbo build:dry-run
- All tests pass with turbo test:unit
- Full type safety maintained throughout

## Migration Notes
- Drop-in replacement for Rust libraries
- Same permission model and roles
- Cache invalidation strategies implemented
- Soft delete pattern maintained

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-28 10:17:35 -06:00
dal 57dd2895d2
dry run for these two bad boys 2025-07-25 19:00:07 -06:00
Nate Kelley 5e6eb76f5b
move get asset types around 2025-07-24 17:41:36 -06:00
Nate Kelley b2cf1725fc
Merge branch 'staging' into devin/BUS-1494-1753276227 2025-07-24 17:21:04 -06:00
Nate Kelley af090d467e
fix tests 2025-07-23 22:53:54 -06:00
Nate Kelley 5eb43d0373
Add expanded threedot menu for menus 2025-07-23 22:33:16 -06:00
Nate Kelley df3533ffc7
pass in better props 2025-07-23 17:18:45 -06:00
Nate Kelley 503c9fafa4
response types update 2025-07-23 16:56:17 -06:00
Nate Kelley a11ce3bfd2
Update responses and requests 2025-07-23 16:35:14 -06:00
Nate Kelley 1ea1d6c97c
move around some types 2025-07-23 16:29:00 -06:00
Devin AI 5b40205275 Implement /api/v2/title endpoint for BUS-1494
- Add server-shared types for GetTitleRequest and GetTitleResponse with Zod validation
- Create database query functions for each asset type (chat, metric, collection, dashboard)
- Implement GET endpoint with zValidator middleware and exhaustive switch statement
- Add proper permission checks (publiclyAccessible OR organizationId match)
- Export new functions from database query index files
- Add title route to v2 API index
- Follow existing Hono API patterns with standardErrorHandler

Co-Authored-By: nate@buster.so <nate@buster.so>
2025-07-23 13:14:58 +00:00
dal 97a8bb4c56
lint errors done & unit tests passing 2025-07-18 16:02:24 -06:00
Nate Kelley c5fe152bee
DEFAULT must defined colors 2025-07-18 15:38:55 -06:00
Nate Kelley 542795833a
use zod workspace in shared 2025-07-18 14:54:11 -06:00
Nate Kelley 84ba96ec74
tsx is a workspace package 2025-07-18 14:18:06 -06:00
Nate Kelley d134c06bb8
theme update is working 2025-07-18 13:42:10 -06:00
Nate Kelley 8988837248
stablize dictionary IDS 2025-07-18 12:48:22 -06:00
Nate Kelley 95e0c8d7b5
move currency around to dictionary 2025-07-18 12:37:03 -06:00
Nate Kelley 71b9843063
Merge pull request #544 from buster-so/devin/1752815489-hide-three-dot-menu
feat: add hideThreeDotMenu prop to conditionally show theme menu based on admin status
2025-07-18 11:30:22 -06:00
Nate Kelley 5f61995296
Fix linting errors 2025-07-18 10:48:49 -06:00
Nate Kelley 9048b6dad0
remove default colors from setter 2025-07-18 09:47:13 -06:00
dal 128d982244
fix: update server-shared tests to include new required fields
- Added workspace_sharing and workspace_member_count fields to all metric
  and share config test objects
- Removed references to 'canFilter' role which doesn't exist in the schema
- Fixed ShareRoleSchema test to only include valid roles

All tests in server-shared package now pass.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-18 09:24:56 -06:00
dal 3a43e21718
Merge remote-tracking branch 'origin/staging' into dallin/bus-1380-fix-unit-tests 2025-07-18 08:55:35 -06:00
dal a7e43c665e
fix unit tests 2025-07-18 00:04:28 -06:00
dal 51da02efbb
update package.json pass if no unit tests 2025-07-17 23:03:54 -06:00
dal ba61b6a3ea
Merge remote-tracking branch 'origin/staging' into dallin/bus-1380-fix-unit-tests 2025-07-17 22:31:32 -06:00
Nate Kelley 9f86f337ff
Merge branch 'staging' into dallin/bus-1419-enable-sharing-of-dashboards-or-collections-with-workspace 2025-07-17 22:13:53 -06:00
Nate Kelley 0a34db8989
revise front end to use shared components 2025-07-17 22:12:12 -06:00
Nate Kelley 70a5fd6ec0
Merge pull request #540 from buster-so/big-nate/bus-1424-default-color-palette-in-workspace-settings
Big nate/bus 1424 default color palette in workspace settings
2025-07-17 18:53:59 -06:00
Nate Kelley 10e37f07de
update all types to work better together 2025-07-17 18:51:45 -06:00
Nate Kelley 09e4b36bf5
add dictionaries for color schemes 2025-07-17 17:16:15 -06:00
dal cd8a50403f
Merge branch 'staging' into dallin/bus-1419-enable-sharing-of-dashboards-or-collections-with-workspace 2025-07-17 17:16:07 -06:00
dal b6cf6539ea
Merge branch 'origin/staging' into dallin/bus-1380-fix-unit-tests - Resolved conflicts in CLAUDE.md 2025-07-17 16:52:03 -06:00
Nate Kelley d2cd4fb173
create default them component 2025-07-17 16:24:46 -06:00
dal cc2dd7fa61
Enhance workspace member count integration across various handlers and components
- Introduced `count_workspace_members` utility function to retrieve the number of active users in a workspace.
- Updated chat, collection, dashboard, and metric handlers to include `workspace_member_count` in their responses.
- Modified relevant types to accommodate the new `workspace_member_count` field.
- Adjusted frontend components to display the number of workspace members in the ShareMenu and related UI elements.

These changes improve the visibility of workspace member information and enhance the overall user experience.
2025-07-17 16:21:14 -06:00
dal 4e2b6c235e
Refactor workspace sharing permissions across assets
- Updated the `WorkspaceSharing` enum to use camelCase for serialization.
- Introduced `workspace_permissions` field in update requests for chats, collections, dashboards, and metrics.
- Implemented handling of workspace sharing permissions in respective update handlers, allowing for setting and removing permissions.
- Adjusted frontend components and API interfaces to align with the new `workspace_sharing` naming convention.

This change enhances the consistency and usability of workspace sharing across different asset types.
2025-07-17 15:26:26 -06:00
dal d9f9182ab2
ui components and return the values 2025-07-17 14:51:53 -06:00
Devin AI 077d6de476 feat(slack): implement scope validation and re-installation flow for BUS-1435
- Create centralized OAuth scopes constants file
- Add scope validation to integration status check
- Update OAuth flow to handle re-installations while preserving user settings
- Add yellow 'Re-install Required' button to UI when scopes don't match
- Implement proper error handling and rollback logic for failed re-installations

Co-Authored-By: Dallin Bentley <dallinbentley98@gmail.com>
2025-07-17 19:54:49 +00:00
Nate Kelley 5dd7b20f25
fix broken linting 2025-07-17 13:18:32 -06:00
Nate Kelley b8de7a5c51
update rules 2025-07-17 13:12:11 -06:00
Nate Kelley 16045ced49
Added readme and other stuff for cursor 2025-07-17 12:56:42 -06:00
Nate Kelley 7b24d167b9
hex values checking before insert into database 2025-07-17 12:17:34 -06:00
Nate Kelley ee8cce71f8
Add additional error handling for endpoint 2025-07-17 12:06:57 -06:00
Nate Kelley e55632e074
initial commits for update org 2025-07-17 11:41:31 -06:00
Nate Kelley be6b510685
Merge branch 'staging' into big-nate/bus-1424-default-color-palette-in-workspace-settings 2025-07-17 10:51:17 -06:00
Nate Kelley f725ef9386
add avatar urls to the share 2025-07-17 10:50:49 -06:00
Nate Kelley 3bf3a324aa
equality check example 2025-07-17 10:25:53 -06:00
Nate Kelley 54feda404a
update type checking 2025-07-17 10:05:50 -06:00
Nate Kelley 06d8c1e568
Merge pull request #527 from buster-so/big-nate/bus-1420-add-searchable-menu-to-share-dropdowns
add searchable menu to share dropdowns
2025-07-16 23:48:44 -06:00
Nate Kelley 0be0744bd0
share update 2025-07-16 23:46:34 -06:00
Nate Kelley a24779d40f
Query request in line 2025-07-16 23:01:49 -06:00
dal da380485d9
added in the slack auto-sharing functionality 2025-07-16 16:54:09 -06:00
Nate Kelley bc5b0e4f84
update select 2025-07-16 14:48:33 -06:00
dal d4f216cb66
Merge remote-tracking branch 'origin/staging' into dallin/bus-1363-slack-agent-query-buster-from-slack-direct-query 2025-07-16 12:54:18 -06:00
Nate Kelley f11afec05a
query params update for cursor rules 2025-07-16 10:13:30 -06:00
Nate Kelley a032a966f8
make generic handler 2025-07-16 09:59:30 -06:00
Nate Kelley 0d01dfcb4c
array parter 2025-07-16 09:54:28 -06:00
Nate Kelley d9ed8b1423
finalize pagination endpoint 2025-07-16 09:25:51 -06:00
Nate Kelley fdf70abfb8
update database dev 2025-07-15 22:26:13 -06:00
Nate Kelley 094fc4c251
add pagination type responses 2025-07-15 17:23:32 -06:00
Nate Kelley fb0e79065f
udpate endpoint to accept more params 2025-07-15 16:54:18 -06:00
dal a751d22baa
initial slack challenge verification and receive messages 2025-07-14 16:08:01 -06:00
Nate Kelley 727e66a630
Fix files on lint 2025-07-14 14:30:07 -06:00
dal 69da316f6c
Merge remote-tracking branch 'origin/staging' into dallin/bus-1380-fix-unit-tests 2025-07-14 12:37:15 -06:00
dal 5a971dd8a1
fix on access-control tests 2025-07-14 11:01:53 -06:00
Nate Kelley 5352ae8f10
currency response 2025-07-14 09:41:25 -06:00
dal 2be9784516
Add unit and integration test scripts to package.json files across multiple packages 2025-07-14 09:11:20 -06:00
Nate Kelley 963bf6b2f2
fix all of the bugs 2025-07-12 22:14:08 -06:00
Nate Kelley 4810daef9f
Update packages/server-shared/src/type-utilities/index.ts
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2025-07-12 16:33:53 -06:00
Nate Kelley 5448af614a
lint fixes 👀 2025-07-12 16:32:47 -06:00
Nate Kelley aeaf7dbb57
type updates 2025-07-12 16:19:08 -06:00