Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import app from "../../aircall.app.mjs";

export default {
name: "Retrieve Transcription",
description: "Retrieves AI-generated transcription for a specific Aircall call. [See the docs here](https://developer.aircall.io/api-references/#retrieve-a-transcription)",
Copy link
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

Consider documenting the AI Assist prerequisite.

The PR objectives note that "AI Assist add-on must be enabled on the Aircall account" for this feature to work. Consider adding this requirement to the description to help users understand prerequisites upfront.

🔎 Suggested description enhancement:
-    description: "Retrieves AI-generated transcription for a specific Aircall call. [See the docs here](https://developer.aircall.io/api-references/#retrieve-a-transcription)",
+    description: "Retrieves AI-generated transcription for a specific Aircall call. Requires the AI Assist add-on to be enabled on your Aircall account. [See the docs here](https://developer.aircall.io/api-references/#retrieve-a-transcription)",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
description: "Retrieves AI-generated transcription for a specific Aircall call. [See the docs here](https://developer.aircall.io/api-references/#retrieve-a-transcription)",
description: "Retrieves AI-generated transcription for a specific Aircall call. Requires the AI Assist add-on to be enabled on your Aircall account. [See the docs here](https://developer.aircall.io/api-references/#retrieve-a-transcription)",
🤖 Prompt for AI Agents
In components/aircall/actions/retrieve-transcription/retrieve-transcription.mjs
around line 5, the action description omits the prerequisite that the Aircall
account must have the AI Assist add-on enabled; update the description string to
explicitly state that AI Assist must be enabled on the Aircall account for this
feature to work, phrasing it succinctly (e.g., append "Requires the Aircall AI
Assist add-on to be enabled on the account.") and keep the existing docs link
intact.

key: "aircall-retrieve-transcription",
version: "0.0.1",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: true,
},
type: "action",
props: {
app,
call: {
propDefinition: [
app,
"call",
],
},
},
async run({ $ }) {
const { transcription } = await this.app.retrieveTranscription(this.call, $);

$.export("$summary", `Successfully retrieved transcription with ID ${transcription.id}`);

return transcription;
},
};
6 changes: 6 additions & 0 deletions components/aircall/aircall.app.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -149,5 +149,11 @@ export default {
},
});
},
async retrieveTranscription(id, $) {
return this._makeRequest({
path: `calls/${id}/transcription`,
$,
});
},
},
};