feat(connectors): add API client for connector management#190
Merged
Paveltarno merged 1 commit intopavelta-connectors-1from Feb 8, 2026
Merged
feat(connectors): add API client for connector management#190Paveltarno merged 1 commit intopavelta-connectors-1from
Paveltarno merged 1 commit intopavelta-connectors-1from
Conversation
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>
Contributor
🚀 Package Preview Available!Install this PR's preview build with npm: npm i @base44-preview/cli@0.0.28-pr.190.9cbec15Prefer not to change any import paths? Install using npm alias so your code still imports npm i "base44@npm:@base44-preview/cli@0.0.28-pr.190.9cbec15"Or add it to your {
"dependencies": {
"base44": "npm:@base44-preview/cli@0.0.28-pr.190.9cbec15"
}
}
Preview published to npm registry — try new features instantly! |
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
6 tasks
Paveltarno
added a commit
that referenced
this pull request
Feb 8, 2026
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>
Paveltarno
added a commit
that referenced
this pull request
Feb 10, 2026
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>
Paveltarno
added a commit
that referenced
this pull request
Feb 11, 2026
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>
Paveltarno
added a commit
that referenced
this pull request
Feb 12, 2026
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>
Paveltarno
added a commit
that referenced
this pull request
Feb 12, 2026
* feat(connectors): add OAuth connector resource schemas and file parsing Add connector resource module supporting 12 OAuth providers: googlecalendar, googledrive, gmail, googlesheets, googledocs, googleslides, slack, notion, salesforce, hubspot, linkedin, tiktok. - Zod discriminated union schema with type discriminator per provider - JSDoc links to official OAuth scope documentation for each provider - JSONC file reading with validation (filename must match type field) - API response schemas for upstream connector state - Unit tests with fixtures for valid, invalid, and mismatched connectors Part of: #184 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat(connectors): add API client for connector management (#190) 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> * feat(connectors): implement push logic for syncing connectors (#191) * feat(connectors): implement push logic for syncing connectors Add pushConnectors function that: - Syncs all local connectors via /sync endpoint - Removes upstream-only connectors not in local config - Returns typed results (synced, removed, needs_oauth, error) Includes unit tests covering all scenarios. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat(connectors): add OAuth flow handling with browser redirect and polling (#192) * feat(connectors): add OAuth flow handling with browser redirect and polling Add runOAuthFlow function that: - Opens OAuth redirect URL in browser - Polls getOAuthStatus until ACTIVE or FAILED - Returns PENDING on timeout (5 minutes) Uses p-wait-for TimeoutError for robust timeout detection. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * connectors: base44 connectors push (#194) * final connector work sofi 1 * scopes --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> * chore: add .worktrees to .gitignore Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * fix(connectors): make scopes optional for Notion provider (#213) * feat(connectors): support arbitrary OAuth providers Change provider field from closed enum to flexible union that accepts both known providers (googlecalendar, notion, slack, etc.) and any arbitrary provider string. This enables users to configure custom OAuth providers without waiting for first-class Base44 support. Schema changes: - Add GenericConnectorSchema for arbitrary provider types - Update ConnectorResourceSchema to union of specific + generic schemas - Update IntegrationTypeSchema to accept known enum OR any non-empty string - Only reject empty strings Test coverage: - Verify known providers continue to work - Verify arbitrary providers are accepted - Verify empty strings are rejected - All 137 tests passing Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * review fixes * lint * remove push messages * notion is optional * minor changes * tsc + lint * more lint * knip * fix async point * Address PR review feedback - Use .transform() for camelCase on response schemas - Rename setResponseToResult → getConnectorSyncResult - Add flow comments in pushConnectors - Extract assertNoDuplicateConnectors helper - Improve CLI push command (early exit, ticks, try/catch, description) - Remove .optional() from guaranteed API response fields - Clean up formatting and unused types Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Fix E2E tests: default null for optional connector response fields The mock handler now defaults error/error_message/other_user_email to null, matching the real API behavior after removing .optional() from the Zod schema. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * copy * Remove schema validation tests from connectors spec Schemas are self-documenting; matches pattern of other core/ tests which only test business logic. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Changes Made
src/core/resources/connector/api.tswith four new API client methods:listConnectors(): Fetches all connectors for the current appsyncConnector(): Syncs a connector with specified scopesgetOAuthStatus(): Polls OAuth authorization status for a connectionremoveConnector(): Removes a connector integrationSyncConnectorResponseSchema,OAuthStatusResponseSchema,RemoveConnectorResponseSchemaOAuthPollingStatus,SyncConnectorResponse,OAuthStatusResponse,RemoveConnectorResponseconnector/index.tsconnectorResourcepush method (still throws error pending OAuth flow implementation)Testing
npm test)Checklist
Additional Notes
This PR lays the groundwork for OAuth connector management commands. The actual
pushimplementation 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 usingApiError.fromHttpError()and Zod schema validation.🤖 Generated by Claude | 2026-02-04 11:30 UTC