From 3a770b9ceada6321e9d92ff9fb40094eaf5461f3 Mon Sep 17 00:00:00 2001 From: GTFalcao Date: Sun, 5 Jan 2025 20:08:47 -0300 Subject: [PATCH 01/16] pnpm --- pnpm-lock.yaml | 36 ++++++++++++------------------------ 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e8f2c9f055fba..531f752f339b5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -216,8 +216,7 @@ importers: components/acelle_mail: {} - components/acronis_cyber_protect_cloud: - specifiers: {} + components/acronis_cyber_protect_cloud: {} components/action_builder: {} @@ -1006,8 +1005,7 @@ importers: specifier: ^9.0.1 version: 9.0.1 - components/azure_storage: - specifiers: {} + components/azure_storage: {} components/backblaze: {} @@ -1186,8 +1184,7 @@ importers: specifier: ^0.0.4 version: 0.0.4 - components/bitdefender_gravityzone: - specifiers: {} + components/bitdefender_gravityzone: {} components/bitport: {} @@ -2562,8 +2559,7 @@ importers: specifier: ^2.1.0 version: 2.1.0 - components/demandbase: - specifiers: {} + components/demandbase: {} components/demio: dependencies: @@ -3159,8 +3155,7 @@ importers: specifier: ^4.0.0 version: 4.0.1 - components/elevio: - specifiers: {} + components/elevio: {} components/elmah_io: dependencies: @@ -4496,8 +4491,7 @@ importers: specifier: ^1.5.1 version: 1.6.6 - components/goto_meeting: - specifiers: {} + components/goto_meeting: {} components/gotowebinar: dependencies: @@ -8317,8 +8311,7 @@ importers: specifier: ^1.1.1 version: 1.6.6 - components/ragie: - specifiers: {} + components/ragie: {} components/railsr: {} @@ -8452,8 +8445,7 @@ importers: specifier: ^1.5.1 version: 1.6.6 - components/recruiterflow: - specifiers: {} + components/recruiterflow: {} components/recruitis: dependencies: @@ -8512,8 +8504,7 @@ importers: specifier: ^1.3.0 version: 1.6.6 - components/refiner: - specifiers: {} + components/refiner: {} components/reflect: dependencies: @@ -11048,8 +11039,7 @@ importers: specifier: ^6.2.13 version: 6.2.13 - components/typefully: - specifiers: {} + components/typefully: {} components/typless: {} @@ -11574,8 +11564,7 @@ importers: components/weworkbook: {} - components/what_are_those: - specifiers: {} + components/what_are_those: {} components/whatconverts: {} @@ -11684,8 +11673,7 @@ importers: specifier: ^1.6.5 version: 1.6.6 - components/wolfram_alpha: - specifiers: {} + components/wolfram_alpha: {} components/wonderchat: {} From ef4fa060158b0589761774b3ce27e94c20aa5637 Mon Sep 17 00:00:00 2001 From: GTFalcao Date: Mon, 6 Jan 2025 03:13:38 -0300 Subject: [PATCH 02/16] Description standardizing and improvements --- .../actions/create-card/create-card.mjs | 17 ++++---- components/basecamp/basecamp.app.mjs | 42 +++++++++---------- components/basecamp/package.json | 4 +- 3 files changed, 32 insertions(+), 31 deletions(-) diff --git a/components/basecamp/actions/create-card/create-card.mjs b/components/basecamp/actions/create-card/create-card.mjs index 5cd5933a136db..6fd2cdbe73537 100644 --- a/components/basecamp/actions/create-card/create-card.mjs +++ b/components/basecamp/actions/create-card/create-card.mjs @@ -3,7 +3,7 @@ import app from "../../basecamp.app.mjs"; export default { key: "basecamp-create-card", name: "Create a Card", - description: "Creates a card in the select column. [See the documentation](https://github.com/basecamp/bc3-api/blob/master/sections/card_table_cards.md#create-a-card)", + description: "Creates a card in a selected column. [See the documentation](https://github.com/basecamp/bc3-api/blob/master/sections/card_table_cards.md#create-a-card)", type: "action", version: "0.1.0", props: { @@ -51,25 +51,26 @@ export default { title: { type: "string", label: "Title", - description: "Title of the card", + description: "The title of the new card.", }, content: { type: "string", label: "Content", - description: "Content of the card", + description: "The content of the card. [See the documentation](https://github.com/basecamp/bc3-api/blob/master/sections/card_table_cards.md#create-a-card) for information on using HTML tags.", optional: true, }, dueOn: { type: "string", - label: "Due on", - description: "Due date (ISO 8601) of the card, e.g.: `2023-12-12`", + label: "Due On", + description: "Due date (ISO 8601) of the card (e.g. `2023-12-12`).", optional: true, }, notify: { type: "boolean", - label: "Notify", - description: "Whether to notify assignees. Defaults to false", + label: "Notify Assignees", + description: "Whether to notify assignees.", optional: true, + default: false, }, }, async run({ $ }) { @@ -96,7 +97,7 @@ export default { }, }); - $.export("$summary", `Successfully created card with ID ${card.id}`); + $.export("$summary", `Successfully created card (ID: ${card.id}}`); return card; }, }; diff --git a/components/basecamp/basecamp.app.mjs b/components/basecamp/basecamp.app.mjs index 8a8e69ffa5701..a92a9ed9f2917 100644 --- a/components/basecamp/basecamp.app.mjs +++ b/components/basecamp/basecamp.app.mjs @@ -7,8 +7,8 @@ export default { propDefinitions: { accountId: { type: "string", - label: "Account Id", - description: "The ID of the account.", + label: "Account ID", + description: "Select an account or provide an account ID.", async options() { const accounts = await this.getAccounts({}); return accounts.map(({ @@ -22,8 +22,8 @@ export default { }, projectId: { type: "string", - label: "Project Id", - description: "The ID of the project.", + label: "Project ID", + description: "Select a project or provide a project ID.", async options({ accountId, page, }) { @@ -44,8 +44,8 @@ export default { }, messageBoardId: { type: "string", - label: "Message Board Id", - description: "The ID of the message board.", + label: "Message Board ID", + description: "Select a message board or provide a message board ID.", async options({ accountId, projectId, @@ -66,8 +66,8 @@ export default { }, recordingId: { type: "string", - label: "Recording Id", - description: "The ID of the recording.", + label: "Recording ID", + description: "Select a recording or provide a recording ID.", async options({ accountId, projectId, @@ -104,7 +104,7 @@ export default { peopleIds: { type: "string[]", label: "People", - description: "An array of all people visible to the current user.", + description: "One or more people visible to the current user.", async options({ accountId, projectId, @@ -129,8 +129,8 @@ export default { }, todoSetId: { type: "string", - label: "Todo Set Id", - description: "The ID of the todo set.", + label: "To-do Set Id", + description: "Select a to-do set or provide a to-do set ID.", async options({ accountId, projectId, @@ -151,8 +151,8 @@ export default { }, campfireId: { type: "string", - label: "Campfire Id", - description: "The ID of the campfire.", + label: "Campfire ID", + description: "Select a campfire or provide a campfire ID.", async options({ accountId, projectId, @@ -173,8 +173,8 @@ export default { }, todoListId: { type: "string", - label: "Todo List Id", - description: "The ID of the todo list.", + label: "To-do List Id", + description: "The ID of the to-do list.", async options({ accountId, projectId, @@ -201,7 +201,7 @@ export default { }, messageTypeId: { type: "string", - label: "Message Types", + label: "Message Type", description: "Select a type for the message.", async options({ accountId, @@ -222,8 +222,8 @@ export default { }, cardTableId: { type: "string", - label: "Card Table Id", - description: "The card table ID", + label: "Card Table ID", + description: "Select a card table or provide a card table ID.", async options({ accountId, projectId, }) { @@ -242,7 +242,7 @@ export default { columnId: { type: "string", label: "Column ID", - description: "The column ID", + description: "Select a column or provide a column ID.", async options({ accountId, projectId, cardTableId, }) { @@ -261,8 +261,8 @@ export default { }, botId: { type: "string", - label: "Chat Bot ID", - description: "The ID of the chatbot to send message from", + label: "Chatbot ID", + description: "Select a chatbot to send the message from.", async options({ accountId, projectId, campfireId, }) { diff --git a/components/basecamp/package.json b/components/basecamp/package.json index cec010c0eeee5..8a26422c19622 100644 --- a/components/basecamp/package.json +++ b/components/basecamp/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/basecamp", - "version": "0.1.5", + "version": "0.2.0", "description": "Pipedream Basecamp Components", "main": "basecamp.app.js", "keywords": [ @@ -14,6 +14,6 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^1.2.1" + "@pipedream/platform": "^3.0.3" } } From 74f2de70d841f7fada2ab406edd458e407c66e0a Mon Sep 17 00:00:00 2001 From: GTFalcao Date: Mon, 6 Jan 2025 03:20:13 -0300 Subject: [PATCH 03/16] pnpm --- pnpm-lock.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 531f752f339b5..e0a614be4e974 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1040,8 +1040,8 @@ importers: components/basecamp: dependencies: '@pipedream/platform': - specifier: ^1.2.1 - version: 1.6.6 + specifier: ^3.0.3 + version: 3.0.3 components/baselinker: dependencies: From 8c192a106528d7388d0fecbcf74927388b50ab0f Mon Sep 17 00:00:00 2001 From: GTFalcao Date: Mon, 6 Jan 2025 03:23:38 -0300 Subject: [PATCH 04/16] Reusing common props --- components/basecamp/actions/common/common.mjs | 22 +++++++++++++++++++ .../create-campfire-chatbot-message.mjs | 20 +++-------------- .../create-campfire-message.mjs | 20 +++-------------- .../actions/create-card/create-card.mjs | 20 +++-------------- .../actions/create-comment/create-comment.mjs | 22 ++++--------------- .../actions/create-message/create-message.mjs | 20 +++-------------- .../create-todo-item/create-todo-item.mjs | 20 +++-------------- 7 files changed, 41 insertions(+), 103 deletions(-) create mode 100644 components/basecamp/actions/common/common.mjs diff --git a/components/basecamp/actions/common/common.mjs b/components/basecamp/actions/common/common.mjs new file mode 100644 index 0000000000000..8209ed663a622 --- /dev/null +++ b/components/basecamp/actions/common/common.mjs @@ -0,0 +1,22 @@ +import app from "../../basecamp.app.mjs"; + +export default { + props: { + app, + accountId: { + propDefinition: [ + app, + "accountId", + ], + }, + projectId: { + propDefinition: [ + app, + "projectId", + ({ accountId }) => ({ + accountId, + }), + ], + }, + }, +}; diff --git a/components/basecamp/actions/create-campfire-chatbot-message/create-campfire-chatbot-message.mjs b/components/basecamp/actions/create-campfire-chatbot-message/create-campfire-chatbot-message.mjs index 5d0a5033dd4dd..7065e0aa5034c 100644 --- a/components/basecamp/actions/create-campfire-chatbot-message/create-campfire-chatbot-message.mjs +++ b/components/basecamp/actions/create-campfire-chatbot-message/create-campfire-chatbot-message.mjs @@ -1,28 +1,14 @@ import app from "../../basecamp.app.mjs"; +import common from "../common/common.mjs"; export default { key: "basecamp-create-campfire-chatbot-message", name: "Create Campfire Chatbot Message", description: "Creates a line in the Campfire for a Basecamp Chatbot. [See the documentation](https://github.com/basecamp/bc3-api/blob/master/sections/chatbots.md#create-a-line)", type: "action", - version: "0.0.3", + version: "0.0.4", props: { - app, - accountId: { - propDefinition: [ - app, - "accountId", - ], - }, - projectId: { - propDefinition: [ - app, - "projectId", - ({ accountId }) => ({ - accountId, - }), - ], - }, + ...common.props, campfireId: { propDefinition: [ app, diff --git a/components/basecamp/actions/create-campfire-message/create-campfire-message.mjs b/components/basecamp/actions/create-campfire-message/create-campfire-message.mjs index 8e7822858ad7f..5ce15ae3ef7ca 100644 --- a/components/basecamp/actions/create-campfire-message/create-campfire-message.mjs +++ b/components/basecamp/actions/create-campfire-message/create-campfire-message.mjs @@ -1,28 +1,14 @@ import app from "../../basecamp.app.mjs"; +import common from "../common/common.mjs"; export default { key: "basecamp-create-campfire-message", name: "Create Campfire Message", description: "Creates a line in the Campfire for the selected project. [See the docs here](https://github.com/basecamp/bc3-api/blob/master/sections/campfires.md#create-a-campfire-line)", type: "action", - version: "0.0.7", + version: "0.0.8", props: { - app, - accountId: { - propDefinition: [ - app, - "accountId", - ], - }, - projectId: { - propDefinition: [ - app, - "projectId", - ({ accountId }) => ({ - accountId, - }), - ], - }, + ...common.props, campfireId: { propDefinition: [ app, diff --git a/components/basecamp/actions/create-card/create-card.mjs b/components/basecamp/actions/create-card/create-card.mjs index 6fd2cdbe73537..be5d65a10dcce 100644 --- a/components/basecamp/actions/create-card/create-card.mjs +++ b/components/basecamp/actions/create-card/create-card.mjs @@ -1,28 +1,14 @@ import app from "../../basecamp.app.mjs"; +import common from "../common/common.mjs"; export default { key: "basecamp-create-card", name: "Create a Card", description: "Creates a card in a selected column. [See the documentation](https://github.com/basecamp/bc3-api/blob/master/sections/card_table_cards.md#create-a-card)", type: "action", - version: "0.1.0", + version: "0.1.1", props: { - app, - accountId: { - propDefinition: [ - app, - "accountId", - ], - }, - projectId: { - propDefinition: [ - app, - "projectId", - ({ accountId }) => ({ - accountId, - }), - ], - }, + ...common.props, cardTableId: { propDefinition: [ app, diff --git a/components/basecamp/actions/create-comment/create-comment.mjs b/components/basecamp/actions/create-comment/create-comment.mjs index ffc7620b0a7bd..a3af01d742ba8 100644 --- a/components/basecamp/actions/create-comment/create-comment.mjs +++ b/components/basecamp/actions/create-comment/create-comment.mjs @@ -1,28 +1,14 @@ import app from "../../basecamp.app.mjs"; +import common from "../common/common.mjs"; export default { key: "basecamp-create-comment", name: "Create a Comment", - description: "Publishes a comment to the select recording. [See the docs here](https://github.com/basecamp/bc3-api/blob/master/sections/comments.md#create-a-comment)", + description: "Publishes a comment to the select recording. [See the documentation](https://github.com/basecamp/bc3-api/blob/master/sections/comments.md#create-a-comment)", type: "action", - version: "0.0.7", + version: "0.0.8", props: { - app, - accountId: { - propDefinition: [ - app, - "accountId", - ], - }, - projectId: { - propDefinition: [ - app, - "projectId", - ({ accountId }) => ({ - accountId, - }), - ], - }, + ...common.props, recordingType: { propDefinition: [ app, diff --git a/components/basecamp/actions/create-message/create-message.mjs b/components/basecamp/actions/create-message/create-message.mjs index 2e900e75248bc..4bc2713afad37 100644 --- a/components/basecamp/actions/create-message/create-message.mjs +++ b/components/basecamp/actions/create-message/create-message.mjs @@ -1,28 +1,14 @@ import app from "../../basecamp.app.mjs"; +import common from "../common/common.mjs"; export default { key: "basecamp-create-message", name: "Create Message", description: "Publishes a message in the project and message board selected. [See the docs here](https://github.com/basecamp/bc3-api/blob/master/sections/messages.md#create-a-message)", type: "action", - version: "0.0.7", + version: "0.0.8", props: { - app, - accountId: { - propDefinition: [ - app, - "accountId", - ], - }, - projectId: { - propDefinition: [ - app, - "projectId", - ({ accountId }) => ({ - accountId, - }), - ], - }, + ...common.props, messageBoardId: { propDefinition: [ app, diff --git a/components/basecamp/actions/create-todo-item/create-todo-item.mjs b/components/basecamp/actions/create-todo-item/create-todo-item.mjs index 48eb5e112d155..fd41017f18337 100644 --- a/components/basecamp/actions/create-todo-item/create-todo-item.mjs +++ b/components/basecamp/actions/create-todo-item/create-todo-item.mjs @@ -1,28 +1,14 @@ import app from "../../basecamp.app.mjs"; +import common from "../common/common.mjs"; export default { key: "basecamp-create-todo-item", name: "Create Todo Item", description: "Creates a todo in the project and message board selected. [See the docs here](https://github.com/basecamp/bc3-api/blob/master/sections/todos.md#create-a-to-do)", type: "action", - version: "0.0.7", + version: "0.0.8", props: { - app, - accountId: { - propDefinition: [ - app, - "accountId", - ], - }, - projectId: { - propDefinition: [ - app, - "projectId", - ({ accountId }) => ({ - accountId, - }), - ], - }, + ...common.props, todoSetId: { propDefinition: [ app, From fd3f7a5a0e2cb773b2dc356643bcd82fffb120a7 Mon Sep 17 00:00:00 2001 From: GTFalcao Date: Mon, 6 Jan 2025 04:49:28 -0300 Subject: [PATCH 05/16] Improvements --- .../basecamp/actions/create-comment/create-comment.mjs | 6 +++--- .../basecamp/actions/create-message/create-message.mjs | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/components/basecamp/actions/create-comment/create-comment.mjs b/components/basecamp/actions/create-comment/create-comment.mjs index a3af01d742ba8..b07d77d758a37 100644 --- a/components/basecamp/actions/create-comment/create-comment.mjs +++ b/components/basecamp/actions/create-comment/create-comment.mjs @@ -4,7 +4,7 @@ import common from "../common/common.mjs"; export default { key: "basecamp-create-comment", name: "Create a Comment", - description: "Publishes a comment to the select recording. [See the documentation](https://github.com/basecamp/bc3-api/blob/master/sections/comments.md#create-a-comment)", + description: "Creates a comment in a selected recording. [See the documentation](https://github.com/basecamp/bc3-api/blob/master/sections/comments.md#create-a-comment)", type: "action", version: "0.0.8", props: { @@ -33,7 +33,7 @@ export default { content: { type: "string", label: "Content", - description: "The body of the comment. See [Rich text guide](https://github.com/basecamp/bc3-api/blob/master/sections/rich_text.md) for what HTML tags are allowed.", + description: "The body of the comment. [See the documentation](https://github.com/basecamp/bc3-api/blob/master/sections/comments.md#create-a-comment) for information on using HTML tags.", }, }, async run({ $ }) { @@ -54,7 +54,7 @@ export default { }, }); - $.export("$summary", `Successfully posted comment with ID ${comment.id}`); + $.export("$summary", `Successfully posted comment (ID: ${comment.id})`); return comment; }, }; diff --git a/components/basecamp/actions/create-message/create-message.mjs b/components/basecamp/actions/create-message/create-message.mjs index 4bc2713afad37..975e9033b6f42 100644 --- a/components/basecamp/actions/create-message/create-message.mjs +++ b/components/basecamp/actions/create-message/create-message.mjs @@ -4,7 +4,7 @@ import common from "../common/common.mjs"; export default { key: "basecamp-create-message", name: "Create Message", - description: "Publishes a message in the project and message board selected. [See the docs here](https://github.com/basecamp/bc3-api/blob/master/sections/messages.md#create-a-message)", + description: "Creates a message in a selected message board. [See the documentation](https://github.com/basecamp/bc3-api/blob/master/sections/messages.md#create-a-message)", type: "action", version: "0.0.8", props: { @@ -30,7 +30,7 @@ export default { content: { type: "string", label: "Content", - description: "The body of the message. See [Rich text guide](https://github.com/basecamp/bc3-api/blob/master/sections/rich_text.md) for what HTML tags are allowed.", + description: "The body of the message. [See the documentation](https://github.com/basecamp/bc3-api/blob/master/sections/messages.md#create-a-message) for information on using HTML tags.", optional: true, }, messageTypeId: { @@ -71,7 +71,7 @@ export default { }, }); - $.export("$summary", `Successfully posted message with ID ${message.id}`); + $.export("$summary", `Successfully posted message (ID: ${message.id})`); return message; }, }; From cd877c2704e8f90572de269c0ff2d417c6f0b853 Mon Sep 17 00:00:00 2001 From: GTFalcao Date: Mon, 6 Jan 2025 05:03:01 -0300 Subject: [PATCH 06/16] More description improvements and standardizing --- .../actions/create-card/create-card.mjs | 2 +- .../create-todo-item/create-todo-item.mjs | 22 +++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/components/basecamp/actions/create-card/create-card.mjs b/components/basecamp/actions/create-card/create-card.mjs index be5d65a10dcce..c1b81b0c8a673 100644 --- a/components/basecamp/actions/create-card/create-card.mjs +++ b/components/basecamp/actions/create-card/create-card.mjs @@ -48,7 +48,7 @@ export default { dueOn: { type: "string", label: "Due On", - description: "Due date (ISO 8601) of the card (e.g. `2023-12-12`).", + description: "The due date of the card, in `YYYY-MM-DD` format.", optional: true, }, notify: { diff --git a/components/basecamp/actions/create-todo-item/create-todo-item.mjs b/components/basecamp/actions/create-todo-item/create-todo-item.mjs index fd41017f18337..5ae50785fa8e3 100644 --- a/components/basecamp/actions/create-todo-item/create-todo-item.mjs +++ b/components/basecamp/actions/create-todo-item/create-todo-item.mjs @@ -3,8 +3,8 @@ import common from "../common/common.mjs"; export default { key: "basecamp-create-todo-item", - name: "Create Todo Item", - description: "Creates a todo in the project and message board selected. [See the docs here](https://github.com/basecamp/bc3-api/blob/master/sections/todos.md#create-a-to-do)", + name: "Create To-do Item", + description: "Creates a to-do item in a selected to-do list. [See the documentation](https://github.com/basecamp/bc3-api/blob/master/sections/todos.md#create-a-to-do)", type: "action", version: "0.0.8", props: { @@ -39,13 +39,13 @@ export default { }, content: { type: "string", - label: "Content", - description: "The title of the todo item.", + label: "Title (Content)", + description: "The title of the to-do item.", }, description: { type: "string", label: "Description", - description: "Containing information about the to-do. See [Rich text guide](https://github.com/basecamp/bc3-api/blob/master/sections/rich_text.md) for what HTML tags are allowed.", + description: "Description of the item. [See the documentation](https://github.com/basecamp/bc3-api/blob/master/sections/todos.md#create-a-to-do) for information on using HTML tags.", optional: true, }, assigneeIds: { @@ -61,19 +61,19 @@ export default { }), ], label: "Assignee", - description: "An array of people that will be assigned to this to-do.", + description: "One or more people to be assigned to this item.", optional: true, }, dueOn: { type: "string", - label: "Due on", - description: "A date when the to-do should be completed. format: `yyyy-mm-dd`.", + label: "Due On", + description: "The due date when the item should be completed, in `YYYY-MM-DD` format.`", optional: true, }, startsOn: { type: "string", - label: "Starts on", - description: "Allows the to-do to run from this date to the due date. format: `yyyy-mm-dd`.", + label: "Starts On", + description: "The start date, in `YYYY-MM-DD` format. Allows the item to run from this date to the `Due Date`.", optional: true, }, }, @@ -103,7 +103,7 @@ export default { }, }); - $.export("$summary", `Successfully created todo with ID ${todo.id}`); + $.export("$summary", `Successfully created to-do (ID: ${todo.id})`); return todo; }, }; From de4393b235e6bc0963208dda6e4ee4338bd90abf Mon Sep 17 00:00:00 2001 From: GTFalcao Date: Mon, 6 Jan 2025 05:05:08 -0300 Subject: [PATCH 07/16] Adjustments --- .../create-campfire-chatbot-message.mjs | 6 +++--- .../create-campfire-message/create-campfire-message.mjs | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/components/basecamp/actions/create-campfire-chatbot-message/create-campfire-chatbot-message.mjs b/components/basecamp/actions/create-campfire-chatbot-message/create-campfire-chatbot-message.mjs index 7065e0aa5034c..878af66af2c9d 100644 --- a/components/basecamp/actions/create-campfire-chatbot-message/create-campfire-chatbot-message.mjs +++ b/components/basecamp/actions/create-campfire-chatbot-message/create-campfire-chatbot-message.mjs @@ -4,7 +4,7 @@ import common from "../common/common.mjs"; export default { key: "basecamp-create-campfire-chatbot-message", name: "Create Campfire Chatbot Message", - description: "Creates a line in the Campfire for a Basecamp Chatbot. [See the documentation](https://github.com/basecamp/bc3-api/blob/master/sections/chatbots.md#create-a-line)", + description: "Creates a line in a Campfire for a Basecamp Chatbot. [See the documentation](https://github.com/basecamp/bc3-api/blob/master/sections/chatbots.md#create-a-line)", type: "action", version: "0.0.4", props: { @@ -40,7 +40,7 @@ export default { content: { type: "string", label: "Content", - description: "The plain text body for the Campfire line.", + description: "The plain text body for the Campfire message.", }, }, async run({ $ }) { @@ -70,7 +70,7 @@ export default { }, }); - $.export("$summary", "Successfully posted campfire chatbot message."); + $.export("$summary", "Successfully posted campfire chatbot message"); return message; }, }; diff --git a/components/basecamp/actions/create-campfire-message/create-campfire-message.mjs b/components/basecamp/actions/create-campfire-message/create-campfire-message.mjs index 5ce15ae3ef7ca..f17d7d2898081 100644 --- a/components/basecamp/actions/create-campfire-message/create-campfire-message.mjs +++ b/components/basecamp/actions/create-campfire-message/create-campfire-message.mjs @@ -4,7 +4,7 @@ import common from "../common/common.mjs"; export default { key: "basecamp-create-campfire-message", name: "Create Campfire Message", - description: "Creates a line in the Campfire for the selected project. [See the docs here](https://github.com/basecamp/bc3-api/blob/master/sections/campfires.md#create-a-campfire-line)", + description: "Creates a line in a selected Campfire. [See the documentation](https://github.com/basecamp/bc3-api/blob/master/sections/campfires.md#create-a-campfire-line)", type: "action", version: "0.0.8", props: { @@ -25,7 +25,7 @@ export default { content: { type: "string", label: "Content", - description: "The plain text body for the Campfire line.", + description: "The plain text body for the Campfire message.", }, }, async run({ $ }) { @@ -46,7 +46,7 @@ export default { }, }); - $.export("$summary", `Successfully posted campfire message with ID ${message.id}`); + $.export("$summary", `Successfully created campfire message (ID: ${message.id})`); return message; }, }; From 55779a943fb5702227a3138dc304e2be719bc980 Mon Sep 17 00:00:00 2001 From: GTFalcao Date: Mon, 6 Jan 2025 17:39:37 -0300 Subject: [PATCH 08/16] Adjustments --- .../create-campfire-chatbot-message.mjs | 2 +- .../actions/create-campfire-message/create-campfire-message.mjs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/basecamp/actions/create-campfire-chatbot-message/create-campfire-chatbot-message.mjs b/components/basecamp/actions/create-campfire-chatbot-message/create-campfire-chatbot-message.mjs index 878af66af2c9d..3a0498c42f8dd 100644 --- a/components/basecamp/actions/create-campfire-chatbot-message/create-campfire-chatbot-message.mjs +++ b/components/basecamp/actions/create-campfire-chatbot-message/create-campfire-chatbot-message.mjs @@ -4,7 +4,7 @@ import common from "../common/common.mjs"; export default { key: "basecamp-create-campfire-chatbot-message", name: "Create Campfire Chatbot Message", - description: "Creates a line in a Campfire for a Basecamp Chatbot. [See the documentation](https://github.com/basecamp/bc3-api/blob/master/sections/chatbots.md#create-a-line)", + description: "Creates a message in a Campfire for a Basecamp Chatbot. [See the documentation](https://github.com/basecamp/bc3-api/blob/master/sections/chatbots.md#create-a-line)", type: "action", version: "0.0.4", props: { diff --git a/components/basecamp/actions/create-campfire-message/create-campfire-message.mjs b/components/basecamp/actions/create-campfire-message/create-campfire-message.mjs index f17d7d2898081..25a2ae71ad8e6 100644 --- a/components/basecamp/actions/create-campfire-message/create-campfire-message.mjs +++ b/components/basecamp/actions/create-campfire-message/create-campfire-message.mjs @@ -4,7 +4,7 @@ import common from "../common/common.mjs"; export default { key: "basecamp-create-campfire-message", name: "Create Campfire Message", - description: "Creates a line in a selected Campfire. [See the documentation](https://github.com/basecamp/bc3-api/blob/master/sections/campfires.md#create-a-campfire-line)", + description: "Creates a message in a selected Campfire. [See the documentation](https://github.com/basecamp/bc3-api/blob/master/sections/campfires.md#create-a-campfire-line)", type: "action", version: "0.0.8", props: { From 5bcde2f4b2f70557a9133db47a6809a533e45856 Mon Sep 17 00:00:00 2001 From: GTFalcao Date: Tue, 7 Jan 2025 01:03:27 -0300 Subject: [PATCH 09/16] API method standardization --- components/basecamp/basecamp.app.mjs | 85 ++++++++++++++-------------- 1 file changed, 43 insertions(+), 42 deletions(-) diff --git a/components/basecamp/basecamp.app.mjs b/components/basecamp/basecamp.app.mjs index a92a9ed9f2917..83d1e57db0d76 100644 --- a/components/basecamp/basecamp.app.mjs +++ b/components/basecamp/basecamp.app.mjs @@ -319,50 +319,52 @@ export default { async getProjects(args = {}) { return this.makeRequest({ path: "/projects.json", - accountId: args.accountId, ...args, }); }, - async getPeople(args = {}) { + async getPeople({ + projectId, ...args + } = {}) { return this.makeRequest({ - path: `/projects/${args.projectId}/people.json`, - accountId: args.accountId, + path: `/projects/${projectId}/people.json`, ...args, }); }, - async getMessageTypes(args = {}) { + async getMessageTypes({ + projectId, ...args + } = {}) { return this.makeRequest({ - path: `/buckets/${args.projectId}/categories.json`, - accountId: args.accountId, + path: `/buckets/${projectId}/categories.json`, ...args, }); }, - async getProject(args = {}) { + async getProject({ + projectId, ...args + } = {}) { return this.makeRequest({ - path: `/projects/${args.projectId}.json`, - accountId: args.accountId, + path: `/projects/${projectId}.json`, ...args, }); }, async getRecordings(args = {}) { return this.makeRequest({ path: "/projects/recordings.json", - accountId: args.accountId, ...args, }); }, - async getTodoLists(args = {}) { + async getTodoLists({ + projectId, todoSetId, ...args + } = {}) { return this.makeRequest({ - path: `/buckets/${args.projectId}/todosets/${args.todoSetId}/todolists.json`, - accountId: args.accountId, + path: `/buckets/${projectId}/todosets/${todoSetId}/todolists.json`, ...args, }); }, - async createMessage(args = {}) { + async createMessage({ + projectId, messageBoardId, ...args + } = {}) { return this.makeRequest({ - $: args.$, - accountId: args.accountId, - path: `/buckets/${args.projectId}/message_boards/${args.messageBoardId}/messages.json`, + path: `/buckets/${projectId}/message_boards/${messageBoardId}/messages.json`, method: "post", ...args, }); @@ -376,55 +378,56 @@ export default { ...args, }); }, - async createCampfireMessage(args = {}) { + async createCampfireMessage({ + projectId, campfireId, ...args + } = {}) { return this.makeRequest({ - $: args.$, - accountId: args.accountId, - path: `/buckets/${args.projectId}/chats/${args.campfireId}/lines.json`, + path: `/buckets/${projectId}/chats/${campfireId}/lines.json`, method: "post", ...args, }); }, - async createComment(args = {}) { + async createComment({ + projectId, recordingId, ...args + } = {}) { return this.makeRequest({ - $: args.$, - accountId: args.accountId, - path: `/buckets/${args.projectId}/recordings/${args.recordingId}/comments.json`, + path: `/buckets/${projectId}/recordings/${recordingId}/comments.json`, method: "post", ...args, }); }, - async createTodoItem(args = {}) { + async createTodoItem({ + projectId, todoListId, ...args + } = {}) { return this.makeRequest({ - $: args.$, - accountId: args.accountId, - path: `/buckets/${args.projectId}/todolists/${args.todoListId}/todos.json`, + path: `/buckets/${projectId}/todolists/${todoListId}/todos.json`, method: "post", ...args, }); }, - async createWebhook(args = {}) { + async createWebhook({ + projectId, ...args + } = {}) { return this.makeRequest({ - path: `/buckets/${args.projectId}/webhooks.json`, - accountId: args.accountId, + path: `/buckets/${projectId}/webhooks.json`, method: "post", ...args, }); }, - async deleteWebhook(args = {}) { + async deleteWebhook({ + projectId, webhookId, ...args + } = {}) { return this.makeRequest({ - path: `/buckets/${args.projectId}/webhooks/${args.webhookId}.json`, - accountId: args.accountId, + path: `/buckets/${projectId}/webhooks/${webhookId}.json`, method: "delete", ...args, }); }, getCardTable({ - accountId, projectId, cardTableId, ...args + projectId, cardTableId, ...args }) { return this.makeRequest({ path: `/buckets/${projectId}/card_tables/${cardTableId}.json`, - accountId, ...args, }); }, @@ -449,20 +452,18 @@ export default { return lists; }, getChatbot({ - accountId, projectId, campfireId, botId, ...args + projectId, campfireId, botId, ...args }) { return this.makeRequest({ path: `/buckets/${projectId}/chats/${campfireId}/integrations/${botId}.json`, - accountId, ...args, }); }, listChatbots({ - accountId, projectId, campfireId, ...args + projectId, campfireId, ...args }) { return this.makeRequest({ path: `/buckets/${projectId}/chats/${campfireId}/integrations.json`, - accountId, ...args, }); }, From e10a9ce5a4fa549fe556ceb323d9f9daed2db505 Mon Sep 17 00:00:00 2001 From: GTFalcao Date: Tue, 7 Jan 2025 02:28:42 -0300 Subject: [PATCH 10/16] Source description updates and standardization --- .../new-comment-created/new-comment-created.mjs | 4 ++-- .../new-event-by-webhook-type.mjs | 10 +++++----- .../new-message-created/new-message-created.mjs | 4 ++-- .../new-to-do-item-created/new-to-do-item-created.mjs | 2 +- .../new-to-do-item-status/new-to-do-item-status.mjs | 6 +++--- .../new-to-do-list-created/new-to-do-list-created.mjs | 4 ++-- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/components/basecamp/sources/new-comment-created/new-comment-created.mjs b/components/basecamp/sources/new-comment-created/new-comment-created.mjs index 01c8ef97d68fb..8d06f31736da5 100644 --- a/components/basecamp/sources/new-comment-created/new-comment-created.mjs +++ b/components/basecamp/sources/new-comment-created/new-comment-created.mjs @@ -4,8 +4,8 @@ export default { ...common, key: "basecamp-new-comment-created", name: "New Comment Created (Instant)", - description: "Emit new event when a comment is created. [See the docs here](https://github.com/basecamp/bc3-api/blob/master/sections/webhooks.md#create-a-webhook)", - version: "0.0.7", + description: "Emit new event when a comment is created. [See the documentation]https://github.com/basecamp/bc3-api/blob/master/sections/webhooks.md#webhooks)", + version: "0.0.8", dedupe: "unique", type: "source", methods: { diff --git a/components/basecamp/sources/new-event-by-webhook-type/new-event-by-webhook-type.mjs b/components/basecamp/sources/new-event-by-webhook-type/new-event-by-webhook-type.mjs index 5629e6e535470..c1ad9127c9c56 100644 --- a/components/basecamp/sources/new-event-by-webhook-type/new-event-by-webhook-type.mjs +++ b/components/basecamp/sources/new-event-by-webhook-type/new-event-by-webhook-type.mjs @@ -4,17 +4,17 @@ import common from "../common/webhook.mjs"; export default { ...common, key: "basecamp-new-event-by-webhook-type", - name: "New Event By Webhook Type (Instant)", - description: "Emit new event based on the selected webhook type. [See the docs here](https://github.com/basecamp/bc3-api/blob/master/sections/webhooks.md#create-a-webhook)", - version: "0.0.7", + name: "New Webhook Event (Instant)", + description: "Emit events of one or more selected types. [See the documentation]https://github.com/basecamp/bc3-api/blob/master/sections/webhooks.md#webhooks)", + version: "0.0.8", dedupe: "unique", type: "source", props: { ...common.props, webhookTypes: { type: "string[]", - label: "Webhook Types", - description: "Select types of webhook for listening.", + label: "Event Types", + description: "Select the types of events to be emitted. [See the documentation](https://github.com/basecamp/bc3-api/blob/master/sections/webhooks.md#webhooks) for more information.", options: constants.WEBHOOK_TYPE_OPTS, }, }, diff --git a/components/basecamp/sources/new-message-created/new-message-created.mjs b/components/basecamp/sources/new-message-created/new-message-created.mjs index 67a104dc9e323..96c2063ae95b8 100644 --- a/components/basecamp/sources/new-message-created/new-message-created.mjs +++ b/components/basecamp/sources/new-message-created/new-message-created.mjs @@ -4,8 +4,8 @@ export default { ...common, key: "basecamp-new-message-created", name: "New Message Created (Instant)", - description: "Emit new event when a message is created. [See the docs here](https://github.com/basecamp/bc3-api/blob/master/sections/webhooks.md#create-a-webhook)", - version: "0.0.7", + description: "Emit new event when a message is created. [See the documentation]https://github.com/basecamp/bc3-api/blob/master/sections/webhooks.md#webhooks)", + version: "0.0.8", dedupe: "unique", type: "source", methods: { diff --git a/components/basecamp/sources/new-to-do-item-created/new-to-do-item-created.mjs b/components/basecamp/sources/new-to-do-item-created/new-to-do-item-created.mjs index 24e11bf18aea0..9d302f0912bae 100644 --- a/components/basecamp/sources/new-to-do-item-created/new-to-do-item-created.mjs +++ b/components/basecamp/sources/new-to-do-item-created/new-to-do-item-created.mjs @@ -4,7 +4,7 @@ export default { ...common, key: "basecamp-new-to-do-item-created", name: "New To-Do Item Created (Instant)", - description: "Emit new event when a to-do item is created. [See the docs here](https://github.com/basecamp/bc3-api/blob/master/sections/webhooks.md#create-a-webhook)", + description: "Emit new event when a to-do item is created. [See the documentation]https://github.com/basecamp/bc3-api/blob/master/sections/webhooks.md#webhooks)", version: "0.0.7", dedupe: "unique", type: "source", diff --git a/components/basecamp/sources/new-to-do-item-status/new-to-do-item-status.mjs b/components/basecamp/sources/new-to-do-item-status/new-to-do-item-status.mjs index d37bc9304bbd0..1a81b2145be87 100644 --- a/components/basecamp/sources/new-to-do-item-status/new-to-do-item-status.mjs +++ b/components/basecamp/sources/new-to-do-item-status/new-to-do-item-status.mjs @@ -3,9 +3,9 @@ import common from "../common/webhook.mjs"; export default { ...common, key: "basecamp-new-to-do-item-status", - name: "New To-Do Item Status (Instant)", - description: "Emit new event when a to-do item status changes. [See the docs here](https://github.com/basecamp/bc3-api/blob/master/sections/webhooks.md#create-a-webhook)", - version: "0.0.7", + name: "New To-Do Item Completed Or Uncompleted (Instant)", + description: "Emit new event when a to-do item's status changes. [See the documentation]https://github.com/basecamp/bc3-api/blob/master/sections/webhooks.md#webhooks)", + version: "0.0.8", dedupe: "unique", type: "source", methods: { diff --git a/components/basecamp/sources/new-to-do-list-created/new-to-do-list-created.mjs b/components/basecamp/sources/new-to-do-list-created/new-to-do-list-created.mjs index 392a32904b61d..8f0aad38c7346 100644 --- a/components/basecamp/sources/new-to-do-list-created/new-to-do-list-created.mjs +++ b/components/basecamp/sources/new-to-do-list-created/new-to-do-list-created.mjs @@ -4,8 +4,8 @@ export default { ...common, key: "basecamp-new-to-do-list-created", name: "New To-Do List Created (Instant)", - description: "Emit new event when a to-do list is created. [See the docs here](https://github.com/basecamp/bc3-api/blob/master/sections/webhooks.md#create-a-webhook)", - version: "0.0.7", + description: "Emit new event when a to-do list is created. [See the documentation]https://github.com/basecamp/bc3-api/blob/master/sections/webhooks.md#webhooks)", + version: "0.0.8", dedupe: "unique", type: "source", methods: { From 253e37afcfb09b6b0cca46c298c0a6d9f553518d Mon Sep 17 00:00:00 2001 From: GTFalcao Date: Tue, 7 Jan 2025 02:59:56 -0300 Subject: [PATCH 11/16] Reusing common props for sources --- .../create-campfire-chatbot-message.mjs | 2 +- .../create-campfire-message.mjs | 2 +- .../actions/create-card/create-card.mjs | 2 +- .../actions/create-comment/create-comment.mjs | 2 +- .../actions/create-message/create-message.mjs | 2 +- .../create-todo-item/create-todo-item.mjs | 2 +- .../basecamp/{actions => }/common/common.mjs | 2 +- components/basecamp/sources/common/base.mjs | 19 ++----------------- .../new-to-do-item-status.mjs | 2 +- 9 files changed, 10 insertions(+), 25 deletions(-) rename components/basecamp/{actions => }/common/common.mjs (87%) diff --git a/components/basecamp/actions/create-campfire-chatbot-message/create-campfire-chatbot-message.mjs b/components/basecamp/actions/create-campfire-chatbot-message/create-campfire-chatbot-message.mjs index 3a0498c42f8dd..02e74803d211e 100644 --- a/components/basecamp/actions/create-campfire-chatbot-message/create-campfire-chatbot-message.mjs +++ b/components/basecamp/actions/create-campfire-chatbot-message/create-campfire-chatbot-message.mjs @@ -1,5 +1,5 @@ import app from "../../basecamp.app.mjs"; -import common from "../common/common.mjs"; +import common from "../../common/common.mjs"; export default { key: "basecamp-create-campfire-chatbot-message", diff --git a/components/basecamp/actions/create-campfire-message/create-campfire-message.mjs b/components/basecamp/actions/create-campfire-message/create-campfire-message.mjs index 25a2ae71ad8e6..7eaba8634f5a5 100644 --- a/components/basecamp/actions/create-campfire-message/create-campfire-message.mjs +++ b/components/basecamp/actions/create-campfire-message/create-campfire-message.mjs @@ -1,5 +1,5 @@ import app from "../../basecamp.app.mjs"; -import common from "../common/common.mjs"; +import common from "../../common/common.mjs"; export default { key: "basecamp-create-campfire-message", diff --git a/components/basecamp/actions/create-card/create-card.mjs b/components/basecamp/actions/create-card/create-card.mjs index c1b81b0c8a673..9c45cb38179ad 100644 --- a/components/basecamp/actions/create-card/create-card.mjs +++ b/components/basecamp/actions/create-card/create-card.mjs @@ -1,5 +1,5 @@ import app from "../../basecamp.app.mjs"; -import common from "../common/common.mjs"; +import common from "../../common/common.mjs"; export default { key: "basecamp-create-card", diff --git a/components/basecamp/actions/create-comment/create-comment.mjs b/components/basecamp/actions/create-comment/create-comment.mjs index b07d77d758a37..68ca80fc3c8e7 100644 --- a/components/basecamp/actions/create-comment/create-comment.mjs +++ b/components/basecamp/actions/create-comment/create-comment.mjs @@ -1,5 +1,5 @@ import app from "../../basecamp.app.mjs"; -import common from "../common/common.mjs"; +import common from "../../common/common.mjs"; export default { key: "basecamp-create-comment", diff --git a/components/basecamp/actions/create-message/create-message.mjs b/components/basecamp/actions/create-message/create-message.mjs index 975e9033b6f42..8032fec26a95c 100644 --- a/components/basecamp/actions/create-message/create-message.mjs +++ b/components/basecamp/actions/create-message/create-message.mjs @@ -1,5 +1,5 @@ import app from "../../basecamp.app.mjs"; -import common from "../common/common.mjs"; +import common from "../../common/common.mjs"; export default { key: "basecamp-create-message", diff --git a/components/basecamp/actions/create-todo-item/create-todo-item.mjs b/components/basecamp/actions/create-todo-item/create-todo-item.mjs index 5ae50785fa8e3..823298c52f24b 100644 --- a/components/basecamp/actions/create-todo-item/create-todo-item.mjs +++ b/components/basecamp/actions/create-todo-item/create-todo-item.mjs @@ -1,5 +1,5 @@ import app from "../../basecamp.app.mjs"; -import common from "../common/common.mjs"; +import common from "../../common/common.mjs"; export default { key: "basecamp-create-todo-item", diff --git a/components/basecamp/actions/common/common.mjs b/components/basecamp/common/common.mjs similarity index 87% rename from components/basecamp/actions/common/common.mjs rename to components/basecamp/common/common.mjs index 8209ed663a622..9f085539225bd 100644 --- a/components/basecamp/actions/common/common.mjs +++ b/components/basecamp/common/common.mjs @@ -1,4 +1,4 @@ -import app from "../../basecamp.app.mjs"; +import app from "../basecamp.app.mjs"; export default { props: { diff --git a/components/basecamp/sources/common/base.mjs b/components/basecamp/sources/common/base.mjs index 32198290098a8..d918b070a45f1 100644 --- a/components/basecamp/sources/common/base.mjs +++ b/components/basecamp/sources/common/base.mjs @@ -1,24 +1,9 @@ -import app from "../../basecamp.app.mjs"; +import common from "../../common/common.mjs"; export default { props: { - app, + ...common.props, db: "$.service.db", - accountId: { - propDefinition: [ - app, - "accountId", - ], - }, - projectId: { - propDefinition: [ - app, - "projectId", - ({ accountId }) => ({ - accountId, - }), - ], - }, }, methods: { getWebhookTypes() { diff --git a/components/basecamp/sources/new-to-do-item-status/new-to-do-item-status.mjs b/components/basecamp/sources/new-to-do-item-status/new-to-do-item-status.mjs index 1a81b2145be87..3a6a58b68f8d9 100644 --- a/components/basecamp/sources/new-to-do-item-status/new-to-do-item-status.mjs +++ b/components/basecamp/sources/new-to-do-item-status/new-to-do-item-status.mjs @@ -3,7 +3,7 @@ import common from "../common/webhook.mjs"; export default { ...common, key: "basecamp-new-to-do-item-status", - name: "New To-Do Item Completed Or Uncompleted (Instant)", + name: "To-Do Item Completed Or Uncompleted (Instant)", description: "Emit new event when a to-do item's status changes. [See the documentation]https://github.com/basecamp/bc3-api/blob/master/sections/webhooks.md#webhooks)", version: "0.0.8", dedupe: "unique", From 976ad4885e77bebf668b594554563c0b66fb126a Mon Sep 17 00:00:00 2001 From: GTFalcao Date: Tue, 7 Jan 2025 19:20:07 -0300 Subject: [PATCH 12/16] Version bump and markdown syntax fixes --- .../sources/new-comment-created/new-comment-created.mjs | 2 +- .../new-event-by-webhook-type/new-event-by-webhook-type.mjs | 2 +- .../sources/new-message-created/new-message-created.mjs | 2 +- .../sources/new-to-do-item-created/new-to-do-item-created.mjs | 4 ++-- .../sources/new-to-do-item-status/new-to-do-item-status.mjs | 2 +- .../sources/new-to-do-list-created/new-to-do-list-created.mjs | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/components/basecamp/sources/new-comment-created/new-comment-created.mjs b/components/basecamp/sources/new-comment-created/new-comment-created.mjs index 8d06f31736da5..f08766258c687 100644 --- a/components/basecamp/sources/new-comment-created/new-comment-created.mjs +++ b/components/basecamp/sources/new-comment-created/new-comment-created.mjs @@ -4,7 +4,7 @@ export default { ...common, key: "basecamp-new-comment-created", name: "New Comment Created (Instant)", - description: "Emit new event when a comment is created. [See the documentation]https://github.com/basecamp/bc3-api/blob/master/sections/webhooks.md#webhooks)", + description: "Emit new event when a comment is created. [See the documentation](https://github.com/basecamp/bc3-api/blob/master/sections/webhooks.md#webhooks)", version: "0.0.8", dedupe: "unique", type: "source", diff --git a/components/basecamp/sources/new-event-by-webhook-type/new-event-by-webhook-type.mjs b/components/basecamp/sources/new-event-by-webhook-type/new-event-by-webhook-type.mjs index c1ad9127c9c56..051152ac4862f 100644 --- a/components/basecamp/sources/new-event-by-webhook-type/new-event-by-webhook-type.mjs +++ b/components/basecamp/sources/new-event-by-webhook-type/new-event-by-webhook-type.mjs @@ -5,7 +5,7 @@ export default { ...common, key: "basecamp-new-event-by-webhook-type", name: "New Webhook Event (Instant)", - description: "Emit events of one or more selected types. [See the documentation]https://github.com/basecamp/bc3-api/blob/master/sections/webhooks.md#webhooks)", + description: "Emit events of one or more selected types. [See the documentation](https://github.com/basecamp/bc3-api/blob/master/sections/webhooks.md#webhooks)", version: "0.0.8", dedupe: "unique", type: "source", diff --git a/components/basecamp/sources/new-message-created/new-message-created.mjs b/components/basecamp/sources/new-message-created/new-message-created.mjs index 96c2063ae95b8..d3dbab19d20f3 100644 --- a/components/basecamp/sources/new-message-created/new-message-created.mjs +++ b/components/basecamp/sources/new-message-created/new-message-created.mjs @@ -4,7 +4,7 @@ export default { ...common, key: "basecamp-new-message-created", name: "New Message Created (Instant)", - description: "Emit new event when a message is created. [See the documentation]https://github.com/basecamp/bc3-api/blob/master/sections/webhooks.md#webhooks)", + description: "Emit new event when a message is created. [See the documentation](https://github.com/basecamp/bc3-api/blob/master/sections/webhooks.md#webhooks)", version: "0.0.8", dedupe: "unique", type: "source", diff --git a/components/basecamp/sources/new-to-do-item-created/new-to-do-item-created.mjs b/components/basecamp/sources/new-to-do-item-created/new-to-do-item-created.mjs index 9d302f0912bae..ad7d4c1754d99 100644 --- a/components/basecamp/sources/new-to-do-item-created/new-to-do-item-created.mjs +++ b/components/basecamp/sources/new-to-do-item-created/new-to-do-item-created.mjs @@ -4,8 +4,8 @@ export default { ...common, key: "basecamp-new-to-do-item-created", name: "New To-Do Item Created (Instant)", - description: "Emit new event when a to-do item is created. [See the documentation]https://github.com/basecamp/bc3-api/blob/master/sections/webhooks.md#webhooks)", - version: "0.0.7", + description: "Emit new event when a to-do item is created. [See the documentation](https://github.com/basecamp/bc3-api/blob/master/sections/webhooks.md#webhooks)", + version: "0.0.8", dedupe: "unique", type: "source", methods: { diff --git a/components/basecamp/sources/new-to-do-item-status/new-to-do-item-status.mjs b/components/basecamp/sources/new-to-do-item-status/new-to-do-item-status.mjs index 3a6a58b68f8d9..390bb291f0b75 100644 --- a/components/basecamp/sources/new-to-do-item-status/new-to-do-item-status.mjs +++ b/components/basecamp/sources/new-to-do-item-status/new-to-do-item-status.mjs @@ -4,7 +4,7 @@ export default { ...common, key: "basecamp-new-to-do-item-status", name: "To-Do Item Completed Or Uncompleted (Instant)", - description: "Emit new event when a to-do item's status changes. [See the documentation]https://github.com/basecamp/bc3-api/blob/master/sections/webhooks.md#webhooks)", + description: "Emit new event when a to-do item's status changes. [See the documentation](https://github.com/basecamp/bc3-api/blob/master/sections/webhooks.md#webhooks)", version: "0.0.8", dedupe: "unique", type: "source", diff --git a/components/basecamp/sources/new-to-do-list-created/new-to-do-list-created.mjs b/components/basecamp/sources/new-to-do-list-created/new-to-do-list-created.mjs index 8f0aad38c7346..2658c79e8d54a 100644 --- a/components/basecamp/sources/new-to-do-list-created/new-to-do-list-created.mjs +++ b/components/basecamp/sources/new-to-do-list-created/new-to-do-list-created.mjs @@ -4,7 +4,7 @@ export default { ...common, key: "basecamp-new-to-do-list-created", name: "New To-Do List Created (Instant)", - description: "Emit new event when a to-do list is created. [See the documentation]https://github.com/basecamp/bc3-api/blob/master/sections/webhooks.md#webhooks)", + description: "Emit new event when a to-do list is created. [See the documentation](https://github.com/basecamp/bc3-api/blob/master/sections/webhooks.md#webhooks)", version: "0.0.8", dedupe: "unique", type: "source", From c622aff54e098d4f1b4c5bc65554cd9d26c92b5c Mon Sep 17 00:00:00 2001 From: GTFalcao Date: Tue, 7 Jan 2025 19:21:02 -0300 Subject: [PATCH 13/16] Summary fix --- components/basecamp/actions/create-card/create-card.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/basecamp/actions/create-card/create-card.mjs b/components/basecamp/actions/create-card/create-card.mjs index 9c45cb38179ad..353e06e7a138d 100644 --- a/components/basecamp/actions/create-card/create-card.mjs +++ b/components/basecamp/actions/create-card/create-card.mjs @@ -83,7 +83,7 @@ export default { }, }); - $.export("$summary", `Successfully created card (ID: ${card.id}}`); + $.export("$summary", `Successfully created card (ID: ${card.id})`); return card; }, }; From f5fc90078a689c91b120bb2dd1d69ed0d2d76f63 Mon Sep 17 00:00:00 2001 From: GTFalcao Date: Wed, 8 Jan 2025 20:11:05 -0300 Subject: [PATCH 14/16] Adjusting action export --- .../create-campfire-chatbot-message.mjs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/basecamp/actions/create-campfire-chatbot-message/create-campfire-chatbot-message.mjs b/components/basecamp/actions/create-campfire-chatbot-message/create-campfire-chatbot-message.mjs index 02e74803d211e..a6d2602132b18 100644 --- a/components/basecamp/actions/create-campfire-chatbot-message/create-campfire-chatbot-message.mjs +++ b/components/basecamp/actions/create-campfire-chatbot-message/create-campfire-chatbot-message.mjs @@ -71,6 +71,8 @@ export default { }); $.export("$summary", "Successfully posted campfire chatbot message"); - return message; + return message ?? { + content, + }; }, }; From 9c63ee76c6f0df6438771d3bbd3832b18b222269 Mon Sep 17 00:00:00 2001 From: GTFalcao Date: Thu, 9 Jan 2025 01:02:57 -0300 Subject: [PATCH 15/16] Adding card selection to 'create comment' --- .../actions/create-comment/create-comment.mjs | 56 ++++++++++++++++++- components/basecamp/basecamp.app.mjs | 40 ++++++++++--- 2 files changed, 84 insertions(+), 12 deletions(-) diff --git a/components/basecamp/actions/create-comment/create-comment.mjs b/components/basecamp/actions/create-comment/create-comment.mjs index 68ca80fc3c8e7..721ed21a1c789 100644 --- a/components/basecamp/actions/create-comment/create-comment.mjs +++ b/components/basecamp/actions/create-comment/create-comment.mjs @@ -6,14 +6,22 @@ export default { name: "Create a Comment", description: "Creates a comment in a selected recording. [See the documentation](https://github.com/basecamp/bc3-api/blob/master/sections/comments.md#create-a-comment)", type: "action", - version: "0.0.8", + version: "0.1.0", props: { ...common.props, + recordingTypeAlert: { + type: "alert", + alertType: "info", + content: `You can select either a **Recording** (by selecting the recording type) or a **Card** (by selecting the card table and column) to create the comment on. +\\ +If both are specified, the **Card** will take precedence.`, + }, recordingType: { propDefinition: [ app, "recordingType", ], + optional: true, }, recordingId: { propDefinition: [ @@ -29,6 +37,49 @@ export default { recordingType, }), ], + optional: true, + }, + cardTableId: { + propDefinition: [ + app, + "cardTableId", + ({ + accountId, projectId, + }) => ({ + accountId, + projectId, + }), + ], + optional: true, + }, + columnId: { + propDefinition: [ + app, + "columnId", + ({ + accountId, projectId, cardTableId, + }) => ({ + accountId, + projectId, + cardTableId, + }), + ], + optional: true, + }, + cardId: { + propDefinition: [ + app, + "cardId", + ({ + accountId, projectId, cardTableId, columnId, + }) => ({ + accountId, + projectId, + cardTableId, + columnId, + }), + ], + optional: true, }, content: { type: "string", @@ -40,7 +91,6 @@ export default { const { accountId, projectId, - recordingId, content, } = this; @@ -48,7 +98,7 @@ export default { $, accountId, projectId, - recordingId, + recordingId: this.cardId ?? this.recordingId, data: { content, }, diff --git a/components/basecamp/basecamp.app.mjs b/components/basecamp/basecamp.app.mjs index 83d1e57db0d76..28b8a48392746 100644 --- a/components/basecamp/basecamp.app.mjs +++ b/components/basecamp/basecamp.app.mjs @@ -241,8 +241,8 @@ export default { }, columnId: { type: "string", - label: "Column ID", - description: "Select a column or provide a column ID.", + label: "Card Column ID", + description: "Select a card column or provide a column ID.", async options({ accountId, projectId, cardTableId, }) { @@ -259,6 +259,26 @@ export default { })); }, }, + cardId: { + type: "string", + label: "Card ID", + description: "Select a card or provide a card ID.", + async options({ + accountId, projectId, columnId, + }) { + const cards = await this.getCards({ + accountId, + projectId, + columnId, + }); + return cards.map(({ + id: value, title: label, + }) => ({ + value, + label, + })); + }, + }, botId: { type: "string", label: "Chatbot ID", @@ -441,15 +461,17 @@ export default { const cardTables = dock.filter(({ name }) => name === "kanban_board"); return cardTables; }, - async getColumns({ - accountId, projectId, cardTableId, + async getColumns(args) { + const { lists } = await this.getCardTable(args); + return lists; + }, + async getCards({ + projectId, columnId, ...args }) { - const { lists } = await this.getCardTable({ - accountId, - projectId, - cardTableId: cardTableId, + return this.makeRequest({ + path: `/buckets/${projectId}/card_tables/lists/${columnId}/cards.json`, + ...args, }); - return lists; }, getChatbot({ projectId, campfireId, botId, ...args From b6ac56cbadf4047a0cb54ba0005e0e0eec37b639 Mon Sep 17 00:00:00 2001 From: GTFalcao Date: Fri, 10 Jan 2025 16:08:10 -0300 Subject: [PATCH 16/16] pnpm-lock --- pnpm-lock.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d637514b06879..ba71ead05668a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -24744,22 +24744,22 @@ packages: superagent@3.8.1: resolution: {integrity: sha512-VMBFLYgFuRdfeNQSMLbxGSLfmXL/xc+OO+BZp41Za/NRDBet/BNbkRJrYzCUu0u4GU0i/ml2dtT8b9qgkw9z6Q==} engines: {node: '>= 4.0'} - deprecated: Please upgrade to v7.0.2+ of superagent. We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing. See the releases tab for more information at . + deprecated: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net superagent@4.1.0: resolution: {integrity: sha512-FT3QLMasz0YyCd4uIi5HNe+3t/onxMyEho7C3PSqmti3Twgy2rXT4fmkTz6wRL6bTF4uzPcfkUCa8u4JWHw8Ag==} engines: {node: '>= 6.0'} - deprecated: Please upgrade to v7.0.2+ of superagent. We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing. See the releases tab for more information at . + deprecated: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net superagent@5.3.1: resolution: {integrity: sha512-wjJ/MoTid2/RuGCOFtlacyGNxN9QLMgcpYLDQlWFIhhdJ93kNscFonGvrpAHSCVjRVj++DGCglocF7Aej1KHvQ==} engines: {node: '>= 7.0.0'} - deprecated: Please upgrade to v7.0.2+ of superagent. We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing. See the releases tab for more information at . + deprecated: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net superagent@7.1.6: resolution: {integrity: sha512-gZkVCQR1gy/oUXr+kxJMLDjla434KmSOKbx5iGD30Ql+AkJQ/YlPKECJy2nhqOsHLjGHzoDTXNSjhnvWhzKk7g==} engines: {node: '>=6.4.0 <13 || >=14'} - deprecated: Please downgrade to v7.1.5 if you need IE/ActiveXObject support OR upgrade to v8.0.0 as we no longer support IE and published an incorrect patch version (see https://github.com/visionmedia/superagent/issues/1731) + deprecated: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net supports-color@2.0.0: resolution: {integrity: sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==}