Skip to content

Comments

feat(stripe): supports stripe connector#251

Open
yardend-wix wants to merge 33 commits intomainfrom
task/stripe-connector
Open

feat(stripe): supports stripe connector#251
yardend-wix wants to merge 33 commits intomainfrom
task/stripe-connector

Conversation

@yardend-wix
Copy link

@yardend-wix yardend-wix commented Feb 16, 2026

Note

Description

Adds comprehensive support for Stripe as a connector type in the Base44 CLI. Stripe is handled as a special connector that uses a different provisioning flow than OAuth-based connectors, requiring dedicated API endpoints and synchronization logic. This implementation allows users to install, sync, and remove Stripe integrations through the connectors push, connectors pull, and deploy commands.

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

Core Infrastructure:

  • Added Stripe-specific API client methods (installStripe, getStripeStatus, removeStripe) in connector/api.ts
  • Created Stripe-specific Zod schemas (InstallStripeResponseSchema, StripeStatusResponseSchema, RemoveStripeResponseSchema)
  • Added STRIPE_CONNECTOR_TYPE constant and StripeSyncResult type to distinguish Stripe from OAuth connectors
  • Implemented pullAllConnectors() function that fetches both OAuth and Stripe connectors in parallel

Push/Pull Logic:

  • Extended pushConnectors() to handle both OAuth and Stripe connectors separately with appropriate sync logic
  • Modified writeConnectors() to accept ConnectorResource[] instead of raw API response format
  • Added conditional sync logic: install Stripe if local exists but remote doesn't, remove if remote exists but local doesn't, show synced if both exist
  • Implemented error handling for Stripe provisioning failures

CLI Commands:

  • Updated connectors push command to display Stripe provisioning results with claim URLs and dashboard links
  • Updated connectors pull command to fetch and save Stripe connector files
  • Enhanced deploy command to show Stripe provisioning output after deployment
  • Refactored type definitions to use discriminated unions (OAuthSyncResult, StripeSyncResult, SharedSyncResult)

Testing:

  • Added comprehensive test coverage for Stripe install, status check, and removal flows
  • Created test fixture with-stripe-connector for integration testing
  • Added API mock methods for all Stripe endpoints in Base44APIMock.ts
  • Added tests for OAuth + Stripe connector combinations

Utilities:

  • Added getConnectorsUrl() helper function to generate connector dashboard URLs

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

  • Stripe uses a different provisioning model than OAuth connectors: instead of redirect URLs and connection IDs, it returns a claim URL for account setup
  • The claim_url is optional in the API response and may be null for already-provisioned accounts
  • Error handling gracefully falls back when Stripe status checks fail (returns error only if local connector exists)
  • The implementation maintains backward compatibility with existing OAuth-based connectors

🤖 Generated by Claude | 2026-02-16 23:47 UTC

Paveltarno and others added 21 commits February 10, 2026 13:59
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>
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

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>
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
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>
Co-authored-by: Cursor <cursoragent@cursor.com>

# Conflicts:
#	.gitignore
#	src/cli/commands/connectors/push.ts
#	src/core/resources/connector/api.ts
#	src/core/resources/connector/config.ts
#	src/core/resources/connector/index.ts
#	src/core/resources/connector/push.ts
#	src/core/resources/connector/schema.ts
#	tests/cli/testkit/Base44APIMock.ts
#	tests/core/connectors.spec.ts
@github-actions
Copy link
Contributor

github-actions bot commented Feb 16, 2026

🚀 Package Preview Available!


Install this PR's preview build with npm:

npm i @base44-preview/cli@0.0.32-pr.251.6527707

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.32-pr.251.6527707"

Or add it to your package.json dependencies:

{
  "dependencies": {
    "base44": "npm:@base44-preview/cli@0.0.32-pr.251.6527707"
  }
}

Preview published to npm registry — try new features instantly!

@claude
Copy link

claude bot commented Feb 16, 2026

README check ran. 5 discrepancies found that need to be fixed:

  1. eject command is commented out but exists in code
  2. connectors pull command is missing from table
  3. connectors push command is missing from table
  4. types generate command is missing from table
  5. Multiple command descriptions don't match the code:
    • create: should be "Create a new Base44 project" (not "...from a template")
    • deploy: should be "Deploy all project resources (entities, functions, agents, connectors, and site)"
    • link: should be "Link a local project to a Base44 project (create new or link existing)"
    • logout: should be "Logout from current device" (not "Sign out and clear stored credentials")
    • whoami: should be "Display current authenticated user" (not "Display the current authenticated user")
    • agents pull/push: descriptions should include "(replaces all local/remote agent configs)"
    • entities push: should be "Push local entities to Base44" (not "...entity schemas...")

Please update README.md manually or re-run this check after granting write permissions.

@claude
Copy link

claude bot commented Feb 16, 2026

README check ran. 4 issue(s) found and applied: (1) Added missing eject command, (2) Added missing connectors pull command, (3) Added missing types generate command, (4) Fixed logout description to match code. README.md has been updated in this branch.

@claude
Copy link

claude bot commented Feb 16, 2026

README check ran. 8 issues found and applied: (1) Added 'eject' command to table, (2) Added 'connectors pull' command, (3) Added 'connectors push' command, (4) Added 'types generate' command, (5) Updated 'create' description, (6) Updated 'deploy' description, (7) Updated 'link' description, (8) Updated 'logout' and 'whoami' descriptions. README.md has been updated in this branch.

@claude
Copy link

claude bot commented Feb 16, 2026

README check ran. 4 issue(s) found and applied: added missing commands (eject, connectors pull/push, types generate) and updated command descriptions to match code. README.md has been updated in this branch.

@claude
Copy link

claude bot commented Feb 16, 2026

README check ran. 7 issues found and applied: (1) Updated 'create' description to match code, (2) Updated 'deploy' description with full resource list, (3) Uncommented and updated 'eject' command, (4) Updated 'link' description, (5) Updated 'logout' description to match code, (6) Added 'connectors pull' and 'connectors push' commands, (7) Added 'types generate' command, (8) Updated agent command descriptions with full details. README.md has been updated in this branch.

@claude
Copy link

claude bot commented Feb 16, 2026

README check ran. 7 issues found and applied: Added missing commands (eject, connectors pull, connectors push, types generate), updated command descriptions to match source code (create, deploy, link, logout, whoami, agents pull/push, entities push). README.md has been updated in this branch.

@claude
Copy link

claude bot commented Feb 16, 2026

README check ran. 5 issues found and applied: (1) added missing eject command, (2) added missing connectors pull/push commands, (3) added missing types generate command, (4) updated descriptions to match code exactly. README.md has been updated in this branch.

@claude
Copy link

claude bot commented Feb 16, 2026

README check ran. 6 issue(s) found and applied: added missing commands (logout, eject, connectors pull/push, types generate) and updated command descriptions to match code. README.md has been updated in this branch.

@claude
Copy link

claude bot commented Feb 16, 2026

README check ran. Found 7 issue(s) and applied fixes: Added missing eject, connectors pull, connectors push, and types generate commands; updated descriptions for create, deploy, link, logout, whoami, agents pull, and agents push to match the CLI code. README.md has been updated in this branch.

@kfirstri kfirstri moved this from Backlog to In progress in CLI Development Feb 18, 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.

2 participants