From a5b677befb55f860dfad013c3123220304e3f3f0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 13 Apr 2026 02:08:55 +0000 Subject: [PATCH 1/5] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 3d19128a..1ee5069c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 47 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/imagekit-inc%2Fimagekit-70c42eda2bee929830b2537f758400a58dded1f1ef5686a286e2469c35a041a0.yml openapi_spec_hash: cdaeed824e91657b45092765cf55eb42 -config_hash: e3c2679d25f6235381dfb11962fbf3d9 +config_hash: 83967503e501e4199b4042d0d0f2b615 From 352ec15b82f69fa56005e12eb53af84e6397d12e Mon Sep 17 00:00:00 2001 From: Manu Chaudhary Date: Mon, 13 Apr 2026 08:04:23 +0530 Subject: [PATCH 2/5] chore: remove webhook signature verification example from README --- README.md | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/README.md b/README.md index fd8899f7..76bb808c 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,6 @@ If you are looking to integrate file uploads in browsers, use one of our [fronte - [Using Raw parameter for custom transformations](#using-raw-parameter-for-custom-transformations) - [Authentication parameters for client-side uploads](#authentication-parameters-for-client-side-uploads) - [Webhook verification](#webhook-verification) - - [Verifying webhook signatures](#verifying-webhook-signatures) - [Handling errors](#handling-errors) - [Retries](#retries) - [Timeouts](#timeouts) @@ -353,35 +352,6 @@ These authentication parameters can be used in client-side upload forms to secur The ImageKit SDK provides utilities to verify webhook signatures for secure event handling. This ensures that webhook requests are actually coming from ImageKit and haven't been tampered with. -### Verifying webhook signatures - -```ts -import ImageKit from '@imagekit/nodejs'; - -const client = new ImageKit({ - privateKey: process.env['IMAGEKIT_PRIVATE_KEY'], - webhookSecret: process.env['IMAGEKIT_WEBHOOK_SECRET'], // Required for webhook verification -}); - -try { - // Verify and unwrap webhook payload - const event = client.webhooks.unwrap( - webhookBody, // Raw webhook payload (string) - { - headers: webhookHeaders, // Request headers containing signature - }, - ); - - console.log('Webhook signature is valid'); - console.log('Event type:', event.type); - console.log('Event data:', event.data); - // Process the webhook event -} catch (error) { - console.log('Invalid webhook signature or malformed payload'); - // Reject the request -} -``` - For detailed information about webhook setup, signature verification, and handling different webhook events, refer to the [ImageKit webhook documentation](https://imagekit.io/docs/webhooks#verify-webhook-signature). ## Handling errors From c424b949a56ff4b4486cd694c073615e5293bcc3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 13 Apr 2026 15:23:57 +0000 Subject: [PATCH 3/5] chore: fix example snippet imports --- packages/mcp-server/src/local-docs-search.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/mcp-server/src/local-docs-search.ts b/packages/mcp-server/src/local-docs-search.ts index 5388085b..a838265b 100644 --- a/packages/mcp-server/src/local-docs-search.ts +++ b/packages/mcp-server/src/local-docs-search.ts @@ -381,7 +381,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [ typescript: { method: 'client.files.upload', example: - "import ImageKit from '@imagekit/nodejs';\n\nconst client = new ImageKit({\n privateKey: process.env['IMAGEKIT_PRIVATE_KEY'], // This is the default and can be omitted\n password: process.env['OPTIONAL_IMAGEKIT_IGNORES_THIS'], // This is the default and can be omitted\n});\n\nconst response = await client.files.upload({\n file: fs.createReadStream('path/to/file'),\n fileName: 'fileName',\n});\n\nconsole.log(response.videoCodec);", + "import fs from 'fs';\nimport ImageKit from '@imagekit/nodejs';\n\nconst client = new ImageKit({\n privateKey: process.env['IMAGEKIT_PRIVATE_KEY'], // This is the default and can be omitted\n password: process.env['OPTIONAL_IMAGEKIT_IGNORES_THIS'], // This is the default and can be omitted\n});\n\nconst response = await client.files.upload({\n file: fs.createReadStream('path/to/file'),\n fileName: 'fileName',\n});\n\nconsole.log(response.videoCodec);", }, }, }, @@ -2955,7 +2955,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [ typescript: { method: 'client.beta.v2.files.upload', example: - "import ImageKit from '@imagekit/nodejs';\n\nconst client = new ImageKit({\n privateKey: process.env['IMAGEKIT_PRIVATE_KEY'], // This is the default and can be omitted\n password: process.env['OPTIONAL_IMAGEKIT_IGNORES_THIS'], // This is the default and can be omitted\n});\n\nconst response = await client.beta.v2.files.upload({\n file: fs.createReadStream('path/to/file'),\n fileName: 'fileName',\n});\n\nconsole.log(response.videoCodec);", + "import fs from 'fs';\nimport ImageKit from '@imagekit/nodejs';\n\nconst client = new ImageKit({\n privateKey: process.env['IMAGEKIT_PRIVATE_KEY'], // This is the default and can be omitted\n password: process.env['OPTIONAL_IMAGEKIT_IGNORES_THIS'], // This is the default and can be omitted\n});\n\nconst response = await client.beta.v2.files.upload({\n file: fs.createReadStream('path/to/file'),\n fileName: 'fileName',\n});\n\nconsole.log(response.videoCodec);", }, }, }, From 1967acf48ab8aae241680a623fc311da6c2cfd6a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 13 Apr 2026 17:46:34 +0000 Subject: [PATCH 4/5] chore: update CLI documentation --- packages/mcp-server/src/local-docs-search.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mcp-server/src/local-docs-search.ts b/packages/mcp-server/src/local-docs-search.ts index a838265b..4db1f540 100644 --- a/packages/mcp-server/src/local-docs-search.ts +++ b/packages/mcp-server/src/local-docs-search.ts @@ -3095,7 +3095,7 @@ const EMBEDDED_READMES: { language: string; content: string }[] = [ { language: 'cli', content: - "# Image Kit CLI\n\nThe official CLI for the [Image Kit REST API](https://imagekit.io/docs/api-reference).\n\n## Installation\n\n### Installing with Go\n\nTo test or install the CLI locally, you need [Go](https://go.dev/doc/install) version 1.22 or later installed.\n\n~~~sh\ngo install 'github.com/stainless-sdks/imagekit-cli/cmd/imagekit@latest'\n~~~\n\nOnce you have run `go install`, the binary is placed in your Go bin directory:\n\n- **Default location**: `$HOME/go/bin` (or `$GOPATH/bin` if GOPATH is set)\n- **Check your path**: Run `go env GOPATH` to see the base directory\n\nIf commands aren't found after installation, add the Go bin directory to your PATH:\n\n~~~sh\n# Add to your shell profile (.zshrc, .bashrc, etc.)\nexport PATH=\"$PATH:$(go env GOPATH)/bin\"\n~~~\n\n### Running Locally\n\nAfter cloning the git repository for this project, you can use the\n`scripts/run` script to run the tool locally:\n\n~~~sh\n./scripts/run args...\n~~~\n\n## Usage\n\nThe CLI follows a resource-based command structure:\n\n~~~sh\nimagekit [resource] [flags...]\n~~~\n\n~~~sh\nimagekit files upload \\\n --private-key 'My Private Key' \\\n --password 'My Password' \\\n --file 'Example data' \\\n --file-name file-name.jpg\n~~~\n\nFor details about specific commands, use the `--help` flag.\n\n### Environment variables\n\n| Environment variable | Description | Required | Default value |\n| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------------- |\n| `IMAGEKIT_PRIVATE_KEY` | Your ImageKit private API key (starts with `private_`).\nYou can find this in the [ImageKit dashboard](https://imagekit.io/dashboard/developer/api-keys).\n | yes | |\n| `OPTIONAL_IMAGEKIT_IGNORES_THIS` | ImageKit uses your API key as username and ignores the password. \nThe SDK sets a dummy value. You can ignore this field.\n | no | `\"do_not_set\"` |\n| `IMAGEKIT_WEBHOOK_SECRET` | Your ImageKit webhook secret for verifying webhook signatures (starts with `whsec_`).\nYou can find this in the [ImageKit dashboard](https://imagekit.io/dashboard/developer/webhooks).\nOnly required if you're using webhooks.\n | no | `null` |\n\n### Global flags\n\n- `--private-key` - Your ImageKit private API key (starts with `private_`).\nYou can find this in the [ImageKit dashboard](https://imagekit.io/dashboard/developer/api-keys).\n (can also be set with `IMAGEKIT_PRIVATE_KEY` env var)\n- `--password` - ImageKit uses your API key as username and ignores the password. \nThe SDK sets a dummy value. You can ignore this field.\n (can also be set with `OPTIONAL_IMAGEKIT_IGNORES_THIS` env var)\n- `--webhook-secret` - Your ImageKit webhook secret for verifying webhook signatures (starts with `whsec_`).\nYou can find this in the [ImageKit dashboard](https://imagekit.io/dashboard/developer/webhooks).\nOnly required if you're using webhooks.\n (can also be set with `IMAGEKIT_WEBHOOK_SECRET` env var)\n- `--help` - Show command line usage\n- `--debug` - Enable debug logging (includes HTTP request/response details)\n- `--version`, `-v` - Show the CLI version\n- `--base-url` - Use a custom API backend URL\n- `--format` - Change the output format (`auto`, `explore`, `json`, `jsonl`, `pretty`, `raw`, `yaml`)\n- `--format-error` - Change the output format for errors (`auto`, `explore`, `json`, `jsonl`, `pretty`, `raw`, `yaml`)\n- `--transform` - Transform the data output using [GJSON syntax](https://github.com/tidwall/gjson/blob/master/SYNTAX.md)\n- `--transform-error` - Transform the error output using [GJSON syntax](https://github.com/tidwall/gjson/blob/master/SYNTAX.md)\n\n### Passing files as arguments\n\nTo pass files to your API, you can use the `@myfile.ext` syntax:\n\n~~~bash\nimagekit --arg @abe.jpg\n~~~\n\nFiles can also be passed inside JSON or YAML blobs:\n\n~~~bash\nimagekit --arg '{image: \"@abe.jpg\"}'\n# Equivalent:\nimagekit < --username '\\@abe'\n~~~\n\n#### Explicit encoding\n\nFor JSON endpoints, the CLI tool does filetype sniffing to determine whether the\nfile contents should be sent as a string literal (for plain text files) or as a\nbase64-encoded string literal (for binary files). If you need to explicitly send\nthe file as either plain text or base64-encoded data, you can use\n`@file://myfile.txt` (for string encoding) or `@data://myfile.dat` (for\nbase64-encoding). Note that absolute paths will begin with `@file://` or\n`@data://`, followed by a third `/` (for example, `@file:///tmp/file.txt`).\n\n~~~bash\nimagekit --arg @data://file.txt\n~~~\n", + "# Image Kit CLI\n\nThe official CLI for the [Image Kit REST API](https://imagekit.io/docs/api-reference).\n\n## Installation\n\n### Installing with Go\n\nTo test or install the CLI locally, you need [Go](https://go.dev/doc/install) version 1.22 or later installed.\n\n~~~sh\ngo install 'github.com/stainless-sdks/imagekit-cli/cmd/imagekit@latest'\n~~~\n\nOnce you have run `go install`, the binary is placed in your Go bin directory:\n\n- **Default location**: `$HOME/go/bin` (or `$GOPATH/bin` if GOPATH is set)\n- **Check your path**: Run `go env GOPATH` to see the base directory\n\nIf commands aren't found after installation, add the Go bin directory to your PATH:\n\n~~~sh\n# Add to your shell profile (.zshrc, .bashrc, etc.)\nexport PATH=\"$PATH:$(go env GOPATH)/bin\"\n~~~\n\n### Running Locally\n\nAfter cloning the git repository for this project, you can use the\n`scripts/run` script to run the tool locally:\n\n~~~sh\n./scripts/run args...\n~~~\n\n## Usage\n\nThe CLI follows a resource-based command structure:\n\n~~~sh\nimagekit [resource] [flags...]\n~~~\n\n~~~sh\nimagekit files upload \\\n --private-key 'My Private Key' \\\n --password 'My Password' \\\n --file 'Example data' \\\n --file-name file-name.jpg\n~~~\n\nFor details about specific commands, use the `--help` flag.\n\n### Environment variables\n\n| Environment variable | Description | Required | Default value |\n| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------------- |\n| `IMAGEKIT_PRIVATE_KEY` | Your ImageKit private API key (starts with `private_`).\nYou can find this in the [ImageKit dashboard](https://imagekit.io/dashboard/developer/api-keys).\n | yes | |\n| `OPTIONAL_IMAGEKIT_IGNORES_THIS` | ImageKit uses your API key as username and ignores the password. \nThe SDK sets a dummy value. You can ignore this field.\n | no | `\"do_not_set\"` |\n| `IMAGEKIT_WEBHOOK_SECRET` | Your ImageKit webhook secret for verifying webhook signatures (starts with `whsec_`).\nYou can find this in the [ImageKit dashboard](https://imagekit.io/dashboard/developer/webhooks).\nOnly required if you're using webhooks.\n | no | `null` |\n\n### Global flags\n\n- `--private-key` - Your ImageKit private API key (starts with `private_`).\nYou can find this in the [ImageKit dashboard](https://imagekit.io/dashboard/developer/api-keys).\n (can also be set with `IMAGEKIT_PRIVATE_KEY` env var)\n- `--password` - ImageKit uses your API key as username and ignores the password. \nThe SDK sets a dummy value. You can ignore this field.\n (can also be set with `OPTIONAL_IMAGEKIT_IGNORES_THIS` env var)\n- `--webhook-secret` - Your ImageKit webhook secret for verifying webhook signatures (starts with `whsec_`).\nYou can find this in the [ImageKit dashboard](https://imagekit.io/dashboard/developer/webhooks).\nOnly required if you're using webhooks.\n (can also be set with `IMAGEKIT_WEBHOOK_SECRET` env var)\n- `--help` - Show command line usage\n- `--debug` - Enable debug logging (includes HTTP request/response details)\n- `--version`, `-v` - Show the CLI version\n- `--base-url` - Use a custom API backend URL\n- `--format` - Change the output format (`auto`, `explore`, `json`, `jsonl`, `pretty`, `raw`, `yaml`)\n- `--format-error` - Change the output format for errors (`auto`, `explore`, `json`, `jsonl`, `pretty`, `raw`, `yaml`)\n- `--transform` - Transform the data output using [GJSON syntax](https://github.com/tidwall/gjson/blob/master/SYNTAX.md)\n- `--transform-error` - Transform the error output using [GJSON syntax](https://github.com/tidwall/gjson/blob/master/SYNTAX.md)\n\n### Passing files as arguments\n\nTo pass files to your API, you can use the `@myfile.ext` syntax:\n\n~~~bash\nimagekit --arg @abe.jpg\n~~~\n\nFiles can also be passed inside JSON or YAML blobs:\n\n~~~bash\nimagekit --arg '{image: \"@abe.jpg\"}'\n# Equivalent:\nimagekit < --username '\\@abe'\n~~~\n\n#### Explicit encoding\n\nFor JSON endpoints, the CLI tool does filetype sniffing to determine whether the\nfile contents should be sent as a string literal (for plain text files) or as a\nbase64-encoded string literal (for binary files). If you need to explicitly send\nthe file as either plain text or base64-encoded data, you can use\n`@file://myfile.txt` (for string encoding) or `@data://myfile.dat` (for\nbase64-encoding). Note that absolute paths will begin with `@file://` or\n`@data://`, followed by a third `/` (for example, `@file:///tmp/file.txt`).\n\n~~~bash\nimagekit --arg @data://file.txt\n~~~\n\n## Linking different Go SDK versions\n\nYou can link the CLI against a different version of the Image Kit Go SDK\nfor development purposes using the `./scripts/link` script.\n\nTo link to a specific version from a repository (version can be a branch,\ngit tag, or commit hash):\n\n~~~bash\n./scripts/link github.com/org/repo@version\n~~~\n\nTo link to a local copy of the SDK:\n\n~~~bash\n./scripts/link ../path/to/imagekit-go\n~~~\n\nIf you run the link script without any arguments, it will default to `../imagekit-go`.\n", }, { language: 'php', From 76114cfee445cda1f9bbf4c76364665f3ccaddbc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 13 Apr 2026 17:46:57 +0000 Subject: [PATCH 5/5] release: 7.5.1 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 10 ++++++++++ package.json | 2 +- packages/mcp-server/manifest.json | 2 +- packages/mcp-server/package.json | 2 +- packages/mcp-server/src/server.ts | 2 +- src/version.ts | 2 +- 7 files changed, 16 insertions(+), 6 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index cd52c1e8..fbde66cb 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "7.5.0" + ".": "7.5.1" } diff --git a/CHANGELOG.md b/CHANGELOG.md index b4b4aa46..59f90722 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## 7.5.1 (2026-04-13) + +Full Changelog: [v7.5.0...v7.5.1](https://github.com/imagekit-developer/imagekit-nodejs/compare/v7.5.0...v7.5.1) + +### Chores + +* fix example snippet imports ([c424b94](https://github.com/imagekit-developer/imagekit-nodejs/commit/c424b949a56ff4b4486cd694c073615e5293bcc3)) +* remove webhook signature verification example from README ([352ec15](https://github.com/imagekit-developer/imagekit-nodejs/commit/352ec15b82f69fa56005e12eb53af84e6397d12e)) +* update CLI documentation ([1967acf](https://github.com/imagekit-developer/imagekit-nodejs/commit/1967acf48ab8aae241680a623fc311da6c2cfd6a)) + ## 7.5.0 (2026-04-13) Full Changelog: [v7.4.0...v7.5.0](https://github.com/imagekit-developer/imagekit-nodejs/compare/v7.4.0...v7.5.0) diff --git a/package.json b/package.json index 10029643..9fcd0b74 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@imagekit/nodejs", - "version": "7.5.0", + "version": "7.5.1", "description": "Offical NodeJS SDK for ImageKit.io integration", "author": "Image Kit ", "types": "dist/index.d.ts", diff --git a/packages/mcp-server/manifest.json b/packages/mcp-server/manifest.json index c9dbefa4..f3c2e7d1 100644 --- a/packages/mcp-server/manifest.json +++ b/packages/mcp-server/manifest.json @@ -1,7 +1,7 @@ { "dxt_version": "0.2", "name": "@imagekit/api-mcp", - "version": "7.5.0", + "version": "7.5.1", "description": "The official MCP Server for the Image Kit API", "author": { "name": "Image Kit", diff --git a/packages/mcp-server/package.json b/packages/mcp-server/package.json index d3b791d3..048697cc 100644 --- a/packages/mcp-server/package.json +++ b/packages/mcp-server/package.json @@ -1,6 +1,6 @@ { "name": "@imagekit/api-mcp", - "version": "7.5.0", + "version": "7.5.1", "description": "The official MCP Server for the Image Kit API", "author": "Image Kit ", "types": "dist/index.d.ts", diff --git a/packages/mcp-server/src/server.ts b/packages/mcp-server/src/server.ts index 4668d948..48f57a18 100644 --- a/packages/mcp-server/src/server.ts +++ b/packages/mcp-server/src/server.ts @@ -28,7 +28,7 @@ export const newMcpServer = async ({ new McpServer( { name: 'imagekit_nodejs_api', - version: '7.5.0', + version: '7.5.1', }, { instructions: await getInstructions({ stainlessApiKey, customInstructionsPath }), diff --git a/src/version.ts b/src/version.ts index 662d85ef..da1d7af5 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '7.5.0'; // x-release-please-version +export const VERSION = '7.5.1'; // x-release-please-version