Skip to content

feat(connectors): add API client for connector management#190

Open
Paveltarno wants to merge 1 commit intopavelta-connectors-1from
pavelta-connectors-api-client
Open

feat(connectors): add API client for connector management#190
Paveltarno wants to merge 1 commit intopavelta-connectors-1from
pavelta-connectors-api-client

Conversation

@Paveltarno
Copy link
Contributor

@Paveltarno Paveltarno commented Feb 4, 2026

Note

Description

This PR adds API client methods for managing OAuth connectors in the Base44 CLI. It introduces four new API functions (listConnectors, syncConnector, getOAuthStatus, removeConnector) along with updated Zod response schemas for validation. The implementation follows the project's established patterns for API error handling and schema validation.

Related Issue

None

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Other (please describe):

Changes Made

  • Created src/core/resources/connector/api.ts with four new API client methods:
    • listConnectors(): Fetches all connectors for the current app
    • syncConnector(): Syncs a connector with specified scopes
    • getOAuthStatus(): Polls OAuth authorization status for a connection
    • removeConnector(): Removes a connector integration
  • Added corresponding Zod schemas for API responses: SyncConnectorResponseSchema, OAuthStatusResponseSchema, RemoveConnectorResponseSchema
  • Added new types: OAuthPollingStatus, SyncConnectorResponse, OAuthStatusResponse, RemoveConnectorResponse
  • Removed verbose comments from schema definitions for cleaner code
  • Exported API functions from connector/index.ts
  • Updated connectorResource push method (still throws error pending OAuth flow implementation)

Testing

  • I have tested these changes locally
  • I have added/updated tests as needed
  • All tests pass (npm test)

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (if applicable)
  • My changes generate no new warnings
  • I have updated AGENTS.md if I made architectural changes

Additional Notes

This PR lays the groundwork for OAuth connector management commands. The actual push implementation for connectors will be added in a follow-up task once the full OAuth flow is ready. All API methods follow the project's standard error handling patterns using ApiError.fromHttpError() and Zod schema validation.


🤖 Generated by Claude | 2026-02-04 11:30 UTC

Add API client methods for OAuth connector operations:
- listConnectors: list all connectors for current app
- syncConnector: sync connector with exact scope matching
- getOAuthStatus: poll OAuth authorization status
- removeConnector: remove a connector integration

Also update response schemas and clean up verbose comments.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

🚀 Package Preview Available!


Install this PR's preview build with npm:

npm i @base44-preview/cli@0.0.28-pr.190.9cbec15

Prefer not to change any import paths? Install using npm alias so your code still imports base44:

npm i "base44@npm:@base44-preview/cli@0.0.28-pr.190.9cbec15"

Or add it to your package.json dependencies:

{
  "dependencies": {
    "base44": "npm:@base44-preview/cli@0.0.28-pr.190.9cbec15"
  }
}

Preview published to npm registry — try new features instantly!

@claude
Copy link

claude bot commented Feb 4, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@kfirstri kfirstri moved this from Backlog to In progress in CLI Development Feb 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

1 participant