enhancementgood first issueintegrationnew-featurenew-integration
Metriche repository
- Star
- (1930 stelle)
- Metriche merge PR
- (Metriche PR in attesa)
Descrizione
Description
Add Box integration to sync cloud storage data including files, folders, collaborations, comments, and metadata into CORE.
Reference Implementations
Existing Integrations (use as templates)
integrations/google-docs/- Similar document/cloud storage systemintegrations/notion/- Content management integrationintegrations/slack/- For reference
Required Files Structure
integrations/box/
├── src/
│ ├── index.ts # Main entry, OAuth spec
│ ├── schedule.ts # Sync logic
│ ├── utils.ts # Box API utilities
│ ├── account-create.ts # OAuth setup
│ └── create-activity.ts # Activity formatting
├── package.json
├── tsup.config.ts
└── README.md
Box API Integration
OAuth Setup
- Supports OAuth 2.0, JSON Web Token (JWT), Client Credentials, and App Token authentication
- OAuth 2.0 recommended for user-facing integrations
- Developer Console available for app management
- Base URL:
https://api.box.com/2.0 - Developer docs: https://developer.box.com/
Key Endpoints
GET /files/{id}- Get file infoGET /folders/{id}- Get folder infoGET /folders/{id}/items- List folder itemsPOST /files/content- Upload fileGET /files/{id}/comments- Get file commentsGET /collaborations- List collaborationsGET /events- Get user/enterprise eventsGET /search- Search contentGET /metadata_templates- Get metadata templatesGET /users- List users
Events to Track
- Files - File uploaded, downloaded, previewed, shared, moved, deleted, versioned
- Folders - Folder created, renamed, moved, shared, deleted
- Collaborations - Collaborator added, removed, role changed
- Comments - Comment added, edited, deleted on files
- Metadata - Metadata applied, updated, removed
Implementation Tasks
- Set up basic integration structure following
integrations/github/src/index.tspattern - Implement OAuth 2.0 flow in
account-create.ts - Create API utilities in
utils.tsfor Box Platform API calls - Implement sync logic in
schedule.tsfor files, folders, and events - Convert file/folder events to CORE activity format
- Add error handling and rate limiting
- Create integration documentation
- Add to
integrations/README.md
Technical Notes
- Multiple authentication methods available (OAuth 2.0, JWT, Client Credentials, App Token)
- Box Events API provides enterprise-wide event stream for audit and sync
- SDKs available for multiple languages
- Box CLI available for scripting and automation
- Box UI Elements available for embedded experiences
- Legal holds and retention policies supported for compliance use cases
Resources
Labels
enhancement, integration, new-feature