feat(connectors): add getConnection({ connectorId }) overload for BYO_SHARED#160
feat(connectors): add getConnection({ connectorId }) overload for BYO_SHARED#160cowchimp wants to merge 4 commits into
Conversation
|
Claude finished @cowchimp's task —— View job PR Review: Add getConnection({ connectorId }) overload for BYO_SHAREDSummaryThis PR adds support for workspace-registered connectors by introducing a new overload for the Code Quality and Best Practices ✅Strengths:
Minor suggestions:
Potential Bugs or Issues
|
🚀 Package Preview Available!Install this PR's preview build with npm: npm i @base44-preview/[email protected]Prefer not to change any import paths? Install using npm alias so your code still imports npm i "@base44/sdk@npm:@base44-preview/[email protected]"Or add it to your {
"dependencies": {
"@base44/sdk": "npm:@base44-preview/[email protected]"
}
}
Preview published to npm registry — try new features instantly! |
…_SHARED
Backend functions can now retrieve the OAuth access token + connection config
for a workspace-registered connector (backed by an OrganizationConnector that
the app builder consented to) via a new overload on getConnection:
await base44.asServiceRole.connectors.getConnection({ connectorId: "..." });
Existing string-arg callers are unchanged — they continue to resolve to the
platform-SHARED path. The overload dispatches on argument shape (string vs
object) and hits a new server route
GET /apps/{app_id}/external-auth/tokens/by-connector/{connector_id}
for the workspace-connector lookup.
|
Claude finished @cowchimp's task —— View job PR Review: Add getConnection({ connectorId }) overload for BYO_SHAREDSummaryThis PR adds support for workspace-registered connectors by introducing a new overload for the Code Quality and Best Practices ✅Strengths:
Minor suggestions:
Potential Bugs or Issues
|
The fallthrough error mentioned only the integration-type form, which is misleading when the caller passed a malformed object argument.
|
Claude finished @cowchimp's task —— View job PR Review: Add getConnection({ connectorId }) overload for BYO_SHAREDSummaryThis PR introduces a new overload for the Code Quality and Best Practices ✅Strengths:
Areas for improvement:
Potential Bugs or Issues
|
Replaces the second getConnection overload (object arg with connectorId) with a dedicated method. Reviewer preferred a separate function over overloading the existing API. await base44.asServiceRole.connectors.getWorkspaceConnection(connectorId);
|
Claude finished @cowchimp's task —— View job PR Review: Add getWorkspaceConnection for BYO_SHARED connectorsSummaryThis PR adds support for workspace-registered connectors by introducing a new Code Quality and Best Practices ✅Strengths:
Areas for improvement:
Potential Bugs or Issues ✅The implementation looks solid. Previous reviews raised concerns about:
No new bugs or issues identified in the current implementation. Performance Considerations ✅
Security Concerns 🔒Input validation:
Authorization:
Test Coverage ✅Well covered:
Consider adding:
Architecture DecisionThe refactor from overload to separate method is a good architectural choice:
Overall AssessmentThis is a well-implemented feature that extends the SDK's connector capabilities. The refactor to a separate Todo List:
|
Updates getWorkspaceConnection to hit
/apps/{app_id}/external-auth/tokens/connectors/{connector_id}
instead of the previous /by-connector/{connector_id} path.
|
Claude finished @cowchimp's task —— View job PR Review: Add getWorkspaceConnection for BYO_SHARED connectorsSummaryThis PR adds support for workspace-registered connectors by introducing a new Code Quality and Best Practices ✅Strengths:
Areas for improvement:
Potential Bugs or Issues ✅The implementation appears solid. Previous concerns have been addressed:
No new bugs identified in the current implementation. Performance Considerations ✅
Security Concerns 🔒Input validation:
Authorization:
Test Coverage ✅Well covered:
Consider adding:
Architecture DecisionThe refactor from overload to separate method is a good architectural choice:
Overall AssessmentThis is a well-implemented feature that extends the SDK's connector capabilities. The refactor to a separate Todo List:
|
Backend functions can now retrieve the OAuth access token + connection config for a workspace-registered connector (backed by an OrganizationConnector that the app builder consented to) via a new overload on getConnection:
Existing string-arg callers are unchanged — they continue to resolve to the platform-SHARED path. The overload dispatches on argument shape (string vs object) and hits a new server route
GET /apps/{app_id}/external-auth/tokens/by-connector/{connector_id}for the workspace-connector lookup.