Add Custom APIs endpoint status command and SDK support #33
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.
Summary
b2c scapi custom statusCLI command to view Custom API endpoint registration statusOAuthStrategy.withAdditionalScopes()for client-level scope injectionb2cplugin with Custom API development skill for building SCAPI Custom APIsChanges
SDK (
@salesforce/b2c-tooling-sdk)createCustomApisClient()- typed client for Custom APIs DX APIOAuthStrategy.withAdditionalScopes()- creates new strategy with merged scopestoOrganizationId(),toTenantId(),buildTenantScope()for SCAPI ID handlingspecs/custom-apis-v1.yamlwith generated typesCLI (
@salesforce/b2c-cli)b2c scapi custom status --tenant-id <ID>--status active|not_registered)--group-by type|site)--columns,--extended)--json)Plugins & Skills
b2c- B2C Commerce development skillsb2c-custom-api-developmentskill - comprehensive guide for building SCAPI Custom APIsb2c-cliplugin withb2c-scapi-customskill for the status commandDocumentation
docs/cli/custom-apis.mdplugins/b2c-cli/skills/b2c-scapi-custom/SKILL.md.claude/skills/api-client-development/SKILL.mdplugins/b2c/skills/b2c-custom-api-development/SKILL.mdDesign Highlights
Scope encapsulation: The SDK client internally handles OAuth scope requirements using
withAdditionalScopes(). CLI commands simply pass through the auth strategy without managing scopes, keeping auth concerns in the SDK layer.Skill separation: The
b2cplugin focuses on development practices (how to build Custom APIs), while theb2c-cliplugin focuses on CLI operations (how to use the commands). This allows agents to combine skills for a complete workflow.Test plan
pnpm --filter @salesforce/b2c-tooling-sdk run testpnpm --filter @salesforce/b2c-cli run testpnpm run build./cli scapi custom status --tenant-id <test-tenant>