feat: add SDK app icon and visibility tools#59
Merged
Patrik Simek (patriksimek) merged 6 commits intoJun 2, 2026
Merged
Conversation
Copilot started reviewing on behalf of
Sebastian Mertens Make (MAKESEB)
May 29, 2026 09:33
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Adds SDK-level support for app icon upload/download and for marking SDK apps and modules public/private, including the underlying transport changes required to send raw binary request bodies and receive ArrayBuffer responses. The new methods are surfaced both on the typed SDKApps / SDKModules clients and as MakeTool definitions consumable by downstream tools such as Make CLI.
Changes:
- Extend the core HTTP layer (
FetchOptions,prepareBody,handleResponse) to acceptUint8Array/ArrayBufferbodies and an explicitresponseType(json|text|arrayBuffer). - Add
setIcon/getIconandmakePublic/makePrivatetoSDKApps, plusmakePublic/makePrivatetoSDKModules, with matchingMakeToolentries (including PNG validation in the icon tools). - Update the test fetch mock to surface binary request bodies as
ArrayBufferand add unit tests covering icon upload/download and visibility toggles.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/types.ts | Widens FetchOptions.body to allow binary payloads and adds the responseType option. |
| src/make.ts | Threads responseType through fetch/handleResponse and lets prepareBody pass binary bodies through unchanged. |
| src/endpoints/sdk/apps.ts | Adds setIcon/getIcon and makePublic/makePrivate plus the SDKAppVisibilityResponse/IconUploadResponse types. |
| src/endpoints/sdk/apps.tools.ts | Adds icon and visibility MakeTools and a local PNG header parser. |
| src/endpoints/sdk/modules.ts | Adds makePublic/makePrivate and SDKModuleVisibilityResponse. |
| src/endpoints/sdk/modules.tools.ts | Adds matching module visibility MakeTools with a shared result shaper. |
| src/index.ts | Re-exports the new visibility response types. |
| test/test.utils.ts | Teaches mockFetch to expose binary request bodies as ArrayBuffer. |
| test/sdk/apps.spec.ts | Adds tests for icon upload/download and app visibility. |
| test/sdk/modules.spec.ts | Adds a test for module visibility toggles. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Accept/return base64 PNG data instead of filesystem paths, removing arbitrary file read/write and node:fs/path coupling from the tool layer - Move PNG + 512x512 validation into core setIcon (platform-neutral, no Node Buffer) so all callers are guarded, not just the tool - Drop allowNon512, sdkVersion, the imt-apps-sdk-version header and the contentType option; hardcode image/png - Return confirmation strings from set-icon and visibility tools, and a bare base64 string from get-icon, matching existing tool conventions - Make app/module visibility methods return void and remove the loose SDKAppVisibilityResponse / SDKModuleVisibilityResponse types
Replace the per-call responseType override with content-type detection in handleResponse (image/* and application/octet-stream -> ArrayBuffer), mirroring the binary classification already used for request bodies. getIcon no longer needs an explicit response type. Also deliver raw bytes from the mock harness so binary responses round-trip losslessly in tests, and assert the real PNG payload in the get-icon test.
Patrik Simek (patriksimek)
approved these changes
Jun 2, 2026
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.
Adds SDK support for app icon upload/download (check binary upload added) and app/module visibility actions, so generated consumers like Make CLI can expose these commands from SDK tool definitions.