Skip to content

docs(connectors): document getWorkspaceConnection#238

Open
wixysam wants to merge 1 commit into
mainfrom
docs-workspace-connection
Open

docs(connectors): document getWorkspaceConnection#238
wixysam wants to merge 1 commit into
mainfrom
docs-workspace-connection

Conversation

@wixysam

@wixysam wixysam commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

What

Documents the getWorkspaceConnection method in the connectors module. It retrieves a shared OAuth token by workspace-connector ID, which is how connectors backed by your own OAuth app registered in Workspace Settings (such as Databricks and Snowflake) are accessed.

Changes (JSDoc in src/modules/connectors.types.ts)

  • Rewrote the getWorkspaceConnection JSDoc to match its siblings: connectionConfig explanation, cross-links to getConnection and getCurrentAppUserConnection, and a Snowflake example.
  • Documented where the connectorId comes from (the connector's settings page in Workspace Settings).
  • Split the Shared connectors intro into platform connectors (integration type → getConnection) and workspace-registered connectors (connector ID → getWorkspaceConnection).
  • Added a note in getConnection pointing developers with a workspace-registered connector to getWorkspaceConnection.
  • Updated the Available connectors table intro to cover all three retrieval methods.

Verification

Ran npm run create-docs and previewed the generated page in mintlify dev; all cross-links resolve and the example renders as a titled code tab. Docs PR: base44-dev/mintlify-docs docs-workspace-connection.

🤖 Generated with Claude Code

Document the getWorkspaceConnection method for retrieving a shared OAuth
token by workspace-connector ID, used by connectors backed by your own
OAuth app registered in Workspace Settings such as Databricks and
Snowflake.

- Rewrite the method JSDoc: connectionConfig explanation, cross-links to
  getConnection and getCurrentAppUserConnection, and a Snowflake example.
- Explain where the connectorId comes from (Workspace Settings).
- Split the "Shared connectors" intro into platform vs workspace-
  registered connectors.
- Point getConnection at getWorkspaceConnection for workspace-registered
  connectors.
- Note the retrieval methods in the Available connectors table.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@claude

claude Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Claude finished @wixysam's task —— View job


PR Review: docs(connectors): document getWorkspaceConnection

  • Read changed file & diff
  • Review documentation quality
  • Post feedback

This is a documentation-only change (JSDoc in src/modules/connectors.types.ts). No runtime code, so performance/security/test-coverage concerns are largely N/A. The change is well-executed. Feedback below.


Strengths

  • Consistency. The rewritten getWorkspaceConnection JSDoc (connectors.types.ts:276-297) now mirrors its siblings: connectionConfig explanation, a runnable example, and cross-links via {@linkcode}. Good alignment with getConnection and getCurrentAppUserConnection.
  • Clear conceptual split. Breaking "Shared connectors" into Platform connectors vs Workspace-registered connectors (connectors.types.ts:65-68) resolves a real ambiguity — same shared token, different lookup key. The reasoning ("they differ only in how you identify the connector in code") is precise.
  • Discoverability. The added note in getConnection (connectors.types.ts:218) and the updated "Available connectors" intro (connectors.types.ts:83) route developers to the right method for all three retrieval paths.
  • Better example. The new Snowflake example uses a realistic host built from connectionConfig?.subdomain, which ties directly into the connectionConfig explanation.

Minor suggestions (non-blocking)

  1. Anchor link target. getWorkspaceConnection JSDoc links to [workspace-registered connector](#shared-connectors) (connectors.types.ts:276). That anchor points to the section header, not the specific bullet. This matches how getConnection links to #shared-connectors too, so it's consistent — just flagging that the reader lands on the section top rather than the exact bullet. Fine to leave as-is.

  2. Example host formatting. In the Snowflake example, connectionConfig?.subdomain is interpolated directly into the URL (connectors.types.ts:292). Sibling examples (getConnection, getCurrentAppUserConnection) first extract const subdomain = connectionConfig?.subdomain; before use. Consider matching that pattern for full consistency — but the inline form is also clear.

  3. Dropped OrganizationConnector detail. The old JSDoc mentioned the ID is the OrganizationConnector database ID. The new copy ("found on the connector's settings page in Workspace Settings") is more user-facing and better for docs; just confirming the implementation-detail removal was intentional (it reads as a deliberate improvement).

Verification note

The PR body states npm run create-docs + mintlify dev preview passed and cross-links resolve. Since this only touches JSDoc comments (no type/signature changes), there is no build or test risk here.

Verdict: Clean, well-written docs improvement. LGTM. ✅

--- • docs-workspace-connection

@github-actions

Copy link
Copy Markdown

🚀 Package Preview Available!


Install this PR's preview build with npm:

npm i @base44-preview/sdk@0.8.40-pr.238.591b34c

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

npm i "@base44/sdk@npm:@base44-preview/sdk@0.8.40-pr.238.591b34c"

Or add it to your package.json dependencies:

{
  "dependencies": {
    "@base44/sdk": "npm:@base44-preview/sdk@0.8.40-pr.238.591b34c"
  }
}

Preview published to npm registry — try new features instantly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant