From 78ef154d5fbf1d81ae74cfe6b2d8901825cbd441 Mon Sep 17 00:00:00 2001 From: Michelle Bergeron Date: Tue, 30 Sep 2025 16:34:19 -0400 Subject: [PATCH 1/5] new components --- .../chat-with-assistant.mjs | 54 +++++++++++++++++ .../search-documentation.mjs | 60 +++++++++++++++++++ .../actions/trigger-update/trigger-update.mjs | 27 +++++++++ components/mintlify/mintlify.app.mjs | 56 +++++++++++++++-- components/mintlify/package.json | 7 ++- 5 files changed, 198 insertions(+), 6 deletions(-) create mode 100644 components/mintlify/actions/chat-with-assistant/chat-with-assistant.mjs create mode 100644 components/mintlify/actions/search-documentation/search-documentation.mjs create mode 100644 components/mintlify/actions/trigger-update/trigger-update.mjs diff --git a/components/mintlify/actions/chat-with-assistant/chat-with-assistant.mjs b/components/mintlify/actions/chat-with-assistant/chat-with-assistant.mjs new file mode 100644 index 0000000000000..f631a6b7469e2 --- /dev/null +++ b/components/mintlify/actions/chat-with-assistant/chat-with-assistant.mjs @@ -0,0 +1,54 @@ +import mintlify from "../../mintlify.app.mjs"; +import { v4 as uuidv4 } from "uuid"; + +export default { + key: "mintlify-chat-with-assistant", + name: "Chat with Assistant", + description: "Generates a response message from the assistant for the specified domain. [See the documentation](https://www.mintlify.com/docs/api-reference/assistant/create-assistant-message)", + version: "0.0.1", + type: "action", + props: { + mintlify, + domain: { + propDefinition: [ + mintlify, + "domain", + ], + }, + fp: { + type: "string", + label: "FP", + description: "Browser fingerprint or arbitrary string identifier. There may be future functionality which allows you to get the messages for a given fingerprint", + }, + message: { + type: "string", + label: "Message", + description: "The content of the message", + }, + }, + async run({ $ }) { + const response = await this.mintlify.chatWithAssistant({ + $, + domain: this.domain, + data: { + fp: this.fp, + messages: [ + { + id: uuidv4(), + role: "user", + content: this.message, + parts: [ + { + type: "text", + text: this.message, + }, + ], + }, + ], + }, + }); + + $.export("$summary", `Successfully sent message with ID ${response.id}`); + return response; + }, +}; diff --git a/components/mintlify/actions/search-documentation/search-documentation.mjs b/components/mintlify/actions/search-documentation/search-documentation.mjs new file mode 100644 index 0000000000000..b6a7b0b9e92f9 --- /dev/null +++ b/components/mintlify/actions/search-documentation/search-documentation.mjs @@ -0,0 +1,60 @@ +import mintlify from "../../mintlify.app.mjs"; + +export default { + key: "mintlify-search-documentation", + name: "Search Documentation", + description: "Perform semantic and keyword searches across your documentation. [See the documentation](https://www.mintlify.com/docs/api-reference/assistant/search)", + version: "0.0.1", + type: "action", + props: { + mintlify, + domain: { + propDefinition: [ + mintlify, + "domain", + ], + }, + query: { + type: "string", + label: "Search Query", + description: "The search query to execute against your documentation content", + }, + pageSize: { + type: "integer", + label: "Page Size", + description: "Number of search results to return. Defaults to 10 if not specified", + optional: true, + }, + version: { + type: "string", + label: "Version", + description: "Filter results by documentation version", + optional: true, + }, + language: { + type: "string", + label: "Language", + description: "Filter results by content language", + optional: true, + }, + }, + async run({ $ }) { + const response = await this.mintlify.searchDocumentation({ + $, + domain: this.domain, + data: { + query: this.query, + pageSize: this.pageSize, + filter: this.version || this.language + ? { + version: this.version, + language: this.language, + } + : undefined, + }, + }); + + $.export("$summary", `Found ${response.length} results`); + return response; + }, +}; diff --git a/components/mintlify/actions/trigger-update/trigger-update.mjs b/components/mintlify/actions/trigger-update/trigger-update.mjs new file mode 100644 index 0000000000000..00cc31158aa7a --- /dev/null +++ b/components/mintlify/actions/trigger-update/trigger-update.mjs @@ -0,0 +1,27 @@ +import mintlify from "../../mintlify.app.mjs"; + +export default { + key: "mintlify-trigger-update", + name: "Trigger Update", + description: "Trigger an update for a project. [See the documentation](https://www.mintlify.com/docs/api-reference/update/trigger)", + version: "0.0.1", + type: "action", + props: { + mintlify, + projectId: { + type: "string", + label: "Project ID", + description: "The ID of the project to trigger an update on. Can be retrieved from your dashboard.", + }, + }, + async run({ $ }) { + const response = await this.mintlify.triggerUpdate({ + projectId: this.projectId, + $, + }); + + $.export("$summary", `Successfully triggered an update for project ${this.projectId}`); + + return response; + }, +}; diff --git a/components/mintlify/mintlify.app.mjs b/components/mintlify/mintlify.app.mjs index 740ac34637ed3..6d30085541851 100644 --- a/components/mintlify/mintlify.app.mjs +++ b/components/mintlify/mintlify.app.mjs @@ -1,11 +1,59 @@ +import { axios } from "@pipedream/platform"; + export default { type: "app", app: "mintlify", - propDefinitions: {}, + propDefinitions: { + domain: { + type: "string", + label: "Domain", + description: "The domain identifier from your domain.mintlify.app URL. Can be found in the top left of your dashboard.", + }, + }, methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); + _baseUrl() { + return "https://api-dsc.mintlify.com/v1"; + }, + _makeRequest({ + $ = this, path, ...opts + }) { + return axios($, { + url: `${this._baseUrl()}${path}`, + headers: { + Authorization: `Bearer ${this.$auth.assistant_api_key}`, + }, + ...opts, + }); + }, + triggerUpdate({ + projectId, ...opts + }) { + return this._makeRequest({ + url: `https://api.mintlify.com/v1/project/update/${projectId}`, + method: "POST", + headers: { + Authorization: `Bearer ${this.$auth.admin_api_key}`, + }, + ...opts, + }); + }, + searchDocumentation({ + domain, ...opts + }) { + return this._makeRequest({ + path: `/search/${domain}`, + method: "POST", + ...opts, + }); + }, + chatWithAssistant({ + domain, ...opts + }) { + return this._makeRequest({ + path: `/assistant/${domain}/message`, + method: "POST", + ...opts, + }); }, }, }; diff --git a/components/mintlify/package.json b/components/mintlify/package.json index 251b70da1467b..f4b621fe71366 100644 --- a/components/mintlify/package.json +++ b/components/mintlify/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/mintlify", - "version": "0.0.1", + "version": "0.1.0", "description": "Pipedream Mintlify Components", "main": "mintlify.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.1.0" } -} \ No newline at end of file +} From 4d5d4a48db172a7397d857fbe05f43b2350f3029 Mon Sep 17 00:00:00 2001 From: Michelle Bergeron Date: Tue, 30 Sep 2025 16:35:17 -0400 Subject: [PATCH 2/5] update --- components/mintlify/package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/mintlify/package.json b/components/mintlify/package.json index f4b621fe71366..6ca064c5f5a64 100644 --- a/components/mintlify/package.json +++ b/components/mintlify/package.json @@ -13,6 +13,7 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^3.1.0" + "@pipedream/platform": "^3.1.0", + "uuid": "^13.0.0" } } From c51ec5edf5251b0486336e426921f4ef9854c5d9 Mon Sep 17 00:00:00 2001 From: Michelle Bergeron Date: Tue, 30 Sep 2025 16:35:54 -0400 Subject: [PATCH 3/5] pnpm-lock.yaml --- pnpm-lock.yaml | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2566e58986c87..aa7e38f7246d5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6797,8 +6797,7 @@ importers: components/humanloop: {} - components/humantic_ai: - specifiers: {} + components/humantic_ai: {} components/humor_api: dependencies: @@ -8976,7 +8975,14 @@ importers: components/minio: {} - components/mintlify: {} + components/mintlify: + dependencies: + '@pipedream/platform': + specifier: ^3.1.0 + version: 3.1.0 + uuid: + specifier: ^13.0.0 + version: 13.0.0 components/miro_custom_app: dependencies: @@ -12646,8 +12652,7 @@ importers: specifier: ^4.0.0 version: 4.0.1 - components/securityscorecard: - specifiers: {} + components/securityscorecard: {} components/securitytrails: dependencies: @@ -31896,6 +31901,10 @@ packages: resolution: {integrity: sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==} hasBin: true + uuid@13.0.0: + resolution: {integrity: sha512-XQegIaBTVUjSHliKqcnFqYypAd4S+WCYt5NIeRs6w/UAry7z8Y9j5ZwRRL4kzq9U3sD6v+85er9FvkEaBpji2w==} + hasBin: true + uuid@3.3.2: resolution: {integrity: sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==} deprecated: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. @@ -53507,6 +53516,8 @@ snapshots: uuid@11.1.0: {} + uuid@13.0.0: {} + uuid@3.3.2: {} uuid@3.3.3: {} From 476dd502749fdc878e1d289ea0f953871f8472b3 Mon Sep 17 00:00:00 2001 From: Michelle Bergeron Date: Wed, 1 Oct 2025 12:50:46 -0400 Subject: [PATCH 4/5] add annotations --- .../actions/chat-with-assistant/chat-with-assistant.mjs | 5 +++++ .../actions/search-documentation/search-documentation.mjs | 5 +++++ .../mintlify/actions/trigger-update/trigger-update.mjs | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/components/mintlify/actions/chat-with-assistant/chat-with-assistant.mjs b/components/mintlify/actions/chat-with-assistant/chat-with-assistant.mjs index f631a6b7469e2..e5b6cd8b9a4d6 100644 --- a/components/mintlify/actions/chat-with-assistant/chat-with-assistant.mjs +++ b/components/mintlify/actions/chat-with-assistant/chat-with-assistant.mjs @@ -7,6 +7,11 @@ export default { description: "Generates a response message from the assistant for the specified domain. [See the documentation](https://www.mintlify.com/docs/api-reference/assistant/create-assistant-message)", version: "0.0.1", type: "action", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, props: { mintlify, domain: { diff --git a/components/mintlify/actions/search-documentation/search-documentation.mjs b/components/mintlify/actions/search-documentation/search-documentation.mjs index b6a7b0b9e92f9..eda985106b6a8 100644 --- a/components/mintlify/actions/search-documentation/search-documentation.mjs +++ b/components/mintlify/actions/search-documentation/search-documentation.mjs @@ -6,6 +6,11 @@ export default { description: "Perform semantic and keyword searches across your documentation. [See the documentation](https://www.mintlify.com/docs/api-reference/assistant/search)", version: "0.0.1", type: "action", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, props: { mintlify, domain: { diff --git a/components/mintlify/actions/trigger-update/trigger-update.mjs b/components/mintlify/actions/trigger-update/trigger-update.mjs index 00cc31158aa7a..45cf4ef7ca341 100644 --- a/components/mintlify/actions/trigger-update/trigger-update.mjs +++ b/components/mintlify/actions/trigger-update/trigger-update.mjs @@ -6,6 +6,11 @@ export default { description: "Trigger an update for a project. [See the documentation](https://www.mintlify.com/docs/api-reference/update/trigger)", version: "0.0.1", type: "action", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: false, + }, props: { mintlify, projectId: { From 6abe53d4b10f398528ecfe3ab353521e9db926f2 Mon Sep 17 00:00:00 2001 From: Michelle Bergeron Date: Thu, 2 Oct 2025 11:00:41 -0400 Subject: [PATCH 5/5] update --- .../mintlify/actions/trigger-update/trigger-update.mjs | 8 +------- components/mintlify/mintlify.app.mjs | 6 ++---- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/components/mintlify/actions/trigger-update/trigger-update.mjs b/components/mintlify/actions/trigger-update/trigger-update.mjs index 45cf4ef7ca341..966e5dbaf97f7 100644 --- a/components/mintlify/actions/trigger-update/trigger-update.mjs +++ b/components/mintlify/actions/trigger-update/trigger-update.mjs @@ -13,19 +13,13 @@ export default { }, props: { mintlify, - projectId: { - type: "string", - label: "Project ID", - description: "The ID of the project to trigger an update on. Can be retrieved from your dashboard.", - }, }, async run({ $ }) { const response = await this.mintlify.triggerUpdate({ - projectId: this.projectId, $, }); - $.export("$summary", `Successfully triggered an update for project ${this.projectId}`); + $.export("$summary", `Successfully triggered an update for project ${this.mintlify.$auth.project_id}`); return response; }, diff --git a/components/mintlify/mintlify.app.mjs b/components/mintlify/mintlify.app.mjs index 6d30085541851..ff33c53101f57 100644 --- a/components/mintlify/mintlify.app.mjs +++ b/components/mintlify/mintlify.app.mjs @@ -25,11 +25,9 @@ export default { ...opts, }); }, - triggerUpdate({ - projectId, ...opts - }) { + triggerUpdate(opts = {}) { return this._makeRequest({ - url: `https://api.mintlify.com/v1/project/update/${projectId}`, + url: `https://api.mintlify.com/v1/project/update/${this.$auth.project_id}`, method: "POST", headers: { Authorization: `Bearer ${this.$auth.admin_api_key}`,