Skip to content

feat: add SDK app icon and visibility tools#59

Merged
Patrik Simek (patriksimek) merged 6 commits into
integromat:mainfrom
MAKESEB:fix/sdk-app-icon-visibility-tools
Jun 2, 2026
Merged

feat: add SDK app icon and visibility tools#59
Patrik Simek (patriksimek) merged 6 commits into
integromat:mainfrom
MAKESEB:fix/sdk-app-icon-visibility-tools

Conversation

@MAKESEB
Copy link
Copy Markdown
Contributor

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.

Summary:
- Add SDK app icon upload/download methods and tools
- Add app public/private visibility methods and tools
- Add module public/private visibility methods and tools
- Support raw binary request bodies and ArrayBuffer responses in make ts
- Add unit tests for icon and visibility operations

Copilot AI review requested due to automatic review settings May 29, 2026 09:33
@MAKESEB Sebastian Mertens Make (MAKESEB) requested a review from a team as a code owner May 29, 2026 09:33
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 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 accept Uint8Array/ArrayBuffer bodies and an explicit responseType (json | text | arrayBuffer).
  • Add setIcon/getIcon and makePublic/makePrivate to SDKApps, plus makePublic/makePrivate to SDKModules, with matching MakeTool entries (including PNG validation in the icon tools).
  • Update the test fetch mock to surface binary request bodies as ArrayBuffer and 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.

Comment thread src/endpoints/sdk/apps.tools.ts Outdated
Comment thread src/endpoints/sdk/modules.tools.ts Outdated
Comment thread src/endpoints/sdk/apps.ts Outdated
Comment thread src/make.ts
Comment thread src/make.ts Outdated
- 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.
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 9 out of 9 changed files in this pull request and generated 8 comments.

Comment thread src/make.ts
Comment thread test/test.utils.ts
Comment thread src/endpoints/sdk/modules.tools.ts
Comment thread src/endpoints/sdk/modules.tools.ts
Comment thread src/endpoints/sdk/apps.tools.ts
Comment thread src/endpoints/sdk/apps.tools.ts
Comment thread src/endpoints/sdk/apps.tools.ts
Comment thread src/endpoints/sdk/apps.tools.ts
@patriksimek Patrik Simek (patriksimek) merged commit ab749c3 into integromat:main Jun 2, 2026
4 checks passed
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