feat: add organization, user and Git repository resources - #5
Merged
Conversation
Add the resources and options needed to manage organizations from the SDK: - `fetch` option on the client configuration to use a custom `fetch` implementation for all requests - `organizations` (list/create/update) with `members`, `invitations`, `licenseKeys`, `teams` (incl. apps and members) and `gitConnections` (incl. repository and namespace browsing) - `apps.configurations` and `apps.repository` - `users.me()` - `jobs.getFailureSummary()` and `jobs.cancel()` Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Extends the Capawesome Cloud Node.js SDK with organization-, user-, and Git repository-related resources needed for the upcoming MCP server, and adds a configurable fetch implementation at the HTTP client level.
Changes:
- Add
client.organizations(with members, invitations, teams, license keys, git connections),client.users.me(), and new app sub-resources (apps.configurations,apps.repository). - Add
HttpClientOptions.fetchto allow consumers to supply a customfetchimplementation (defaulting toglobalThis.fetch). - Update README to document new resources/options and bump package version to
0.2.0(incl. lockfile).
Reviewed changes
Copilot reviewed 21 out of 22 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| test/resources.test.ts | Adds request-shape/path tests for nested organization/team endpoints, license key relations, repository linking, and job cancel. |
| test/http-client.test.ts | Adds coverage ensuring custom fetch is used instead of the global one. |
| src/types.ts | Introduces shared enums/types for organization roles and Git providers. |
| src/resources/users.ts | Adds UsersResource.me() and User response type. |
| src/resources/teams.ts | Adds TeamsResource with relation-inclusion options and nested .apps / .members. |
| src/resources/team-members.ts | Adds TeamMembersResource for team member assignments (list/create/delete). |
| src/resources/team-apps.ts | Adds TeamAppsResource for team app assignments (list/create/delete). |
| src/resources/repository.ts | Adds RepositoryResource for linking/unlinking an app’s Git repository. |
| src/resources/organizations.ts | Adds OrganizationsResource and wires organization sub-resources. |
| src/resources/members.ts | Adds MembersResource for organization members (list/delete). |
| src/resources/license-keys.ts | Adds LicenseKeysResource including relation expansion for packages. |
| src/resources/jobs.ts | Adds JobsResource.getFailureSummary() and JobsResource.cancel(). |
| src/resources/invitations.ts | Adds InvitationsResource for org invitations (list/create/delete). |
| src/resources/git-connections.ts | Adds GitConnectionsResource for connections plus repository/namespace listing. |
| src/resources/configurations.ts | Adds ConfigurationsResource for app configurations CRUD. |
| src/resources/apps.ts | Wires new app sub-resources (configurations, repository). |
| src/index.ts | Exports new resources and new shared types. |
| src/http-client.ts | Adds optional fetch override and routes all requests through it. |
| src/client.ts | Exposes client.organizations and client.users on the SDK client. |
| README.md | Documents the new resources and the fetch option; expands examples/resource list. |
| package.json | Bumps SDK version to 0.2.0. |
| package-lock.json | Updates lockfile version fields to 0.2.0. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Add `organizations.get()` for the new single organization endpoint and support including the assigned packages in `licenseKeys.get()`, matching the behavior of `licenseKeys.list()`. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Add `appConfigurationId` and `appConfigurationName` to the build creation options and allow filtering jobs by multiple statuses, which the API expects as a comma-separated list. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Resolve the `fetch` implementation before the first request and fail with a message naming the `fetch` option and the minimum runtime, instead of a `TypeError` from calling `undefined`. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Add the name-based alternatives the API already accepts so resources can be referenced by name instead of id: - `environments.list()` and `automations.list()` gain a `name` filter - automation create and update gain `appConfigurationId` and the name references `appCertificateName`, `appChannelName`, `appConfigurationName`, `appDestinationName` and `appEnvironmentName` Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Add a name alternative to the delete methods of channels, destinations, configurations, environments and certificates, whose collection endpoints accept a `name` query parameter. The id form is kept and takes precedence when both are provided. Also adds the previously missing environment delete method. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Add an optional exact `name` filter to `apps.list()` and `organizations.teams.list()`, alongside the existing fuzzy `query` filter. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Certificate names are unique per platform and type, and destination names per platform. When deleting by name, forward these discriminators so the delete targets exactly one row: - `certificates.delete` gains `platform` and `type` - `destinations.delete` gains `platform` The id form is unchanged and still takes precedence. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
robingenz
force-pushed
the
feat/mcp-server-support
branch
from
August 17, 2026 07:52
b2909ec to
2375a47
Compare
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.
What
Extends the SDK with the resources and options required by the upcoming Capawesome MCP server.
Client configuration
fetchoption (fetch?: typeof fetch), used for all requests and defaulting toglobalThis.fetch. This lets consumers plug in their ownfetchimplementation. The package stays dependency-free.New resources
client.organizations—list(),get(),create(),update().members—list(),delete().invitations—list(),create(),delete().licenseKeys—list(),get(),create(),update(),delete(),rotate().teams—list(),get(),create(),update(),delete()plus.appsand.members(list()/create()/delete()).gitConnections—list(),get(),create(),update(),delete(),listRepositories(),listNamespaces()client.apps.configurations—list(),get(),create(),update(),delete()client.apps.repository—get(),set(),delete()client.users—me()client.jobs— addedgetFailureSummary()andcancel()Other additions to existing resources
namefilters onapps.list(),organizations.teams.list(),apps.environments.list()andapps.automations.list().apps.builds.create()gainsappConfigurationId/appConfigurationName;apps.automationscreate/update gainappConfigurationIdand theapp*Namereference alternatives;jobs.list()accepts multiplestatusvalues.delete()by name (in addition to id) forapps.channels,apps.destinations,apps.configurations,apps.environmentsandapps.certificates; certificate/destination name-deletes takeplatform(andtype) discriminators so exactly one row is targeted.Response types follow the existing convention of exposing only the most relevant properties. Credentials accepted by the API (Git tokens/passwords, invitation tokens) are request-only and are not part of any response type.
Notes
client.organizations.get()andclient.organizations.licenseKeys.get()targetGET /v1/organizations/:organizationIdandGET /v1/organizations/:organizationId/license-keys/:licenseKeyId, which are being added in a parallel API pull request. They are the only methods here without a released endpoint yet.teams.update()resolves tovoidbecause the endpoint responds with204 No Content.includeApps,includeMembers,includePackages) instead of raw relation strings.0.1.2type declarations: no removed/renamed exports, no dropped or retyped params, no changed return types — only additions and widenings such asrequired → optionalandsingle → union). It is therefore released as a patch,0.1.3, under the repository'sbump-patch-for-minor-pre-majorRelease Please convention. The branch carries no version bump and noRelease-Asoverride, so Release Please derives0.1.3organically from thefeat/fixcommits. Nothing is published from this pull request.Testing
npm run lint,npm run typecheck,npm run build— passnpm test— 39 tests passPart of capawesome-team/roadmap#57
🤖 Generated with Claude Code