Skip to content

feat: Templates endpoint (public templates)#55

Merged
Patrik Simek (patriksimek) merged 19 commits intomainfrom
feat/templates
Apr 25, 2026
Merged

feat: Templates endpoint (public templates)#55
Patrik Simek (patriksimek) merged 19 commits intomainfrom
feat/templates

Conversation

@JanKulhavy
Copy link
Copy Markdown
Contributor

@JanKulhavy JanKulhavy commented Apr 18, 2026

Adds a new public Templates API surface to the SDK (list/get/blueprint by URL slug) and exposes it via MCP tools, with mocked unit tests plus live integration tests.

JanKulhavy and others added 9 commits April 16, 2026 17:12
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Use direct property access pattern instead of destructuring
in listPublic method. Improve JSDoc on list and listPublic.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove conditional expect calls in integration tests to satisfy
jest/no-conditional-expect. Apply prettier formatting.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Public templates use URL slugs (e.g. "12289-add-webhook-data-to-a-google-sheet"),
not numeric IDs, so the private getBlueprint endpoint returns 404 for them.
Add dedicated methods hitting /templates/public/:templateUrl and
/templates/public/:templateUrl/blueprint plus matching MCP tools.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove the private-template surface (Template/list/get/getBlueprint
addressable by numeric ID) and rename the public variants
(TemplatePublic/listPublic/getPublic/getPublicBlueprint) to the base
names. Tests, mocks, MCP tools, index exports, and the live smoke
script are updated to match.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@JanKulhavy JanKulhavy requested a review from a team as a code owner April 18, 2026 10:08
Copilot AI review requested due to automatic review settings April 18, 2026 10:08
Second CLI arg is now a comma-separated list of app identifiers
forwarded as templates.list({ usedApps }). Example:
  node scripts/test-templates.mjs webhook google-sheets

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new public Templates API surface to the SDK (list/get/blueprint by URL slug) and exposes it via MCP tools, with mocked unit tests plus live integration tests.

Changes:

  • Introduce Templates endpoint (list, get, getBlueprint) and export associated types.
  • Register 3 MCP tools: templates_list, templates_get, templates_get-blueprint.
  • Add unit test coverage with JSON fixtures plus new live integration tests and a local smoke script.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
test/templates.spec.ts Adds mocked unit tests for templates list/get/blueprint.
test/templates.integration.test.ts Adds live API integration tests for templates endpoints.
test/mocks/templates/list.json Mock response fixture for listing public templates.
test/mocks/templates/get.json Mock response fixture for fetching a single public template.
test/mocks/templates/blueprint.json Mock fixture for blueprint payload shape returned by the API.
src/mcp.ts Registers the new templates MCP tool module.
src/make.ts Wires make.templates into the main SDK entrypoint.
src/index.ts Exports template-related types from the package entrypoint.
src/endpoints/templates.ts Implements the Templates endpoint and its types.
src/endpoints/templates.mcp.ts Implements MCP tool wrappers for templates endpoints.
scripts/test-templates.mjs Adds a local smoke script to exercise the new endpoint against live API.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread test/public-templates.integration.test.ts
Comment thread test/mocks/public-templates/blueprint.json
Comment thread src/endpoints/templates.ts Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/endpoints/public-templates.mcp.ts Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread test/public-templates.integration.test.ts Outdated
Comment thread test/public-templates.integration.test.ts Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@patriksimek Patrik Simek (patriksimek) merged commit 1c190cd into main Apr 25, 2026
4 checks passed
@patriksimek Patrik Simek (patriksimek) deleted the feat/templates branch April 25, 2026 19:15
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.

3 participants