Skip to content
Merged
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
Expand Up @@ -10,7 +10,12 @@ export default defineAction({
description:
"Create or update a Data Store Record [See docs here](https://api.niftyimages.com/)",
key: "niftyimages-add-data-store-record",
version: "0.0.1",
version: "0.0.2",
annotations: {
destructiveHint: true,
openWorldHint: true,
readOnlyHint: false,
},
type: "action",
props: {
niftyimages,
Expand All @@ -34,7 +39,9 @@ export default defineAction({
try {
fields = await this.niftyimages.getDataStoreFields(apiKey);
} catch (err) {
throw new ConfigurationError("Error fetching data - please check the **API Key**.");
throw new ConfigurationError(`Error fetching data - please check the **API Key**.

\`${err.message}\``);
}
const newPropNames = [];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ export default defineAction({
description:
"Create or update a Data Store Record [See docs here](https://api.niftyimages.com/)",
key: "niftyimages-update-timer-target-date",
version: "0.0.1",
version: "0.0.2",
annotations: {
destructiveHint: true,
openWorldHint: true,
readOnlyHint: false,
},
type: "action",
props: {
niftyimages,
Expand Down
2 changes: 1 addition & 1 deletion components/niftyimages/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/niftyimages",
"version": "0.0.5",
"version": "0.0.6",
"description": "Pipedream NiftyImages Components",
"main": "dist/app/niftyimages.app.mjs",
"keywords": [
Expand Down
7 changes: 6 additions & 1 deletion components/ninox/actions/create-record/create-record.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ import { defineAction } from "@pipedream/types";

export default defineAction({
name: "Create Record",
version: "0.0.1",
version: "0.0.2",
annotations: {
destructiveHint: true,
openWorldHint: true,
readOnlyHint: false,
},
key: "ninox-create-record",
description: "Creates a record. [See docs here](https://docs.ninox.com/en/api/private-cloud-apis#create-update-multiple-records-with-post)",
type: "action",
Expand Down
7 changes: 6 additions & 1 deletion components/ninox/actions/update-record/update-record.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ import { defineAction } from "@pipedream/types";

export default defineAction({
name: "Update Record",
version: "0.0.1",
version: "0.0.2",
annotations: {
destructiveHint: true,
openWorldHint: true,
readOnlyHint: false,
},
key: "ninox-update-record",
description: "Updates a record. [See docs here](https://docs.ninox.com/en/api/private-cloud-apis#create-update-multiple-records-with-post)",
type: "action",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
import onfleet from "../../app/onfleet.app";
import {
clearObj, prepareData
clearObj, prepareData,
} from "../common/utils";

export default {
key: "onfleet-create-pickup-dropoff-task",
name: "Create Linked Pickup & Dropoff Tasks",
description: "Create a pickup task and dropoff task linked with each other. [See the docs here](https://docs.onfleet.com/reference/create-task)",
type: "action",
version: "0.0.1",
version: "0.0.2",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: false,
},
props: {
onfleet,
merchant: {
Expand Down Expand Up @@ -320,8 +325,8 @@ export default {
address: dropoffAddress,
};

let pickupResponse = <any>{};
let dropoffResponse = <any>{};
let pickupResponse: { id?: string } = {};
let dropoffResponse: { id?: string } = {};
Comment on lines +328 to +329
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Optional id property could be undefined.

The type annotation { id?: string } marks id as optional, but the code accesses pickupResponse.id and dropoffResponse.id on lines 339, 343, 350, and 354 without null checks. If the API returns a response without an id, this will cause the string interpolations to display "undefined".

Consider either:

  1. Making id required if the API always returns it:
-    let pickupResponse: { id?: string } = {};
-    let dropoffResponse: { id?: string } = {};
+    let pickupResponse: { id: string } = {} as { id: string };
+    let dropoffResponse: { id: string } = {} as { id: string };
  1. Or add null checks before accessing the property:
     summary = `A new pickup task with id ${pickupResponse.id} was successfully created, then a new dropff task with id ${dropoffResponse.id} was successfully created!`;

Should handle the case where id might be undefined.

📝 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
let pickupResponse: { id?: string } = {};
let dropoffResponse: { id?: string } = {};
let pickupResponse: { id: string } = {} as { id: string };
let dropoffResponse: { id: string } = {} as { id: string };
🤖 Prompt for AI Agents
In
components/onfleet/actions/create-pickup-dropoff-task/create-pickup-dropoff-task.ts
around lines 328-329, the variables pickupResponse and dropoffResponse are typed
as { id?: string } but their .id values are accessed on lines 339, 343, 350 and
354 without checks; change the type to { id: string } if the API always returns
id, or if not guaranteed, add runtime null checks (or a guard/early throw/log)
before any string interpolation/use so you never interpolate "undefined" —
update the declaration or add if (!pickupResponse.id) / if (!dropoffResponse.id)
handling (with a clear error or fallback) and adjust subsequent code to use the
guarded value.

let response = {};
let summary = "";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
import onfleet from "../../app/onfleet.app";
import {
clearObj, prepareData
clearObj, prepareData,
} from "../common/utils";

export default {
key: "onfleet-create-task-template",
name: "Create Task (Template Use)",
description: "Creates a single task. Used for simple templates only. [See the docs here](https://docs.onfleet.com/reference/create-task)",
type: "action",
version: "0.0.1",
version: "0.0.2",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: false,
},
props: {
onfleet,
merchant: {
Expand Down
9 changes: 7 additions & 2 deletions components/onfleet/actions/create-task/create-task.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
import onfleet from "../../app/onfleet.app";
import {
clearObj, prepareData
clearObj, prepareData,
} from "../common/utils";

export default {
key: "onfleet-create-task",
name: "Create New Task",
description: "Create a new task. [See the docs here](https://docs.onfleet.com/reference/create-task)",
type: "action",
version: "0.0.1",
version: "0.0.2",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: false,
},
props: {
onfleet,
merchant: {
Expand Down
2 changes: 1 addition & 1 deletion components/onfleet/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/onfleet",
"version": "0.1.1",
"version": "0.1.2",
"description": "Pipedream Onfleet Components",
"main": "dist/app/onfleet.app.mjs",
"keywords": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ import app from "../../app/persistiq.app";

export default defineAction({
key: "persistiq-add-do-not-contact-domain",
version: "0.0.1",
version: "0.0.2",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: false,
},
name: "Add Do Not Contact Domain",
description: "Creates a new DNC domain. [See docs here](https://apidocs.persistiq.com/#create-dnc-domain)",
type: "action",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ import app from "../../app/persistiq.app";

export default defineAction({
key: "persistiq-add-prospect-to-campaign",
version: "0.0.1",
version: "0.0.2",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: false,
},
name: "Add Prospect To Campaign",
description: "Adds prospect to a campaign. [See docs here](https://apidocs.persistiq.com/#add-lead-to-a-campaign)",
type: "action",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ import app from "../../app/persistiq.app";

export default defineAction({
key: "persistiq-create-or-update-prospect",
version: "0.0.1",
version: "0.0.2",
annotations: {
destructiveHint: true,
openWorldHint: true,
readOnlyHint: false,
},
name: "Create Or Update Prospect",
description: "Creates a prospect. Updates if there is already a prospect with the given `email`. [See docs here](https://apidocs.persistiq.com/#create-leads)",
type: "action",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ export default defineAction({
name: "Screenshot Tweet",
description: "With the Pikaso API you can automate creating screenshots from tweets. [See the docs](https://pikaso.me/api) for more information",
key: "pikaso-screenshot-tweet",
version: "0.0.1",
version: "0.0.2",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: false,
},
type: "action",
props: {
app,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ export default defineAction({
name: "Create Requirement",
description: `Create a requirement [See docs here](${DOCS.createRequirement})`,
key: "practitest-create-requirement",
version: "0.0.1",
version: "0.0.2",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: false,
},
type: "action",
props: {
practitest,
Expand Down
11 changes: 9 additions & 2 deletions components/practitest/actions/create-run/create-run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ export default defineAction({
name: "Create Run",
description: `Create a run [See docs here](${DOCS.createRun})`,
key: "practitest-create-run",
version: "0.0.1",
version: "0.0.2",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: false,
},
Comment on lines +13 to +18
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

🧩 Analysis chain

LGTM! Annotations appropriately describe a create operation.

The annotations correctly characterize this action:

  • destructiveHint: false appropriately indicates that creating a run doesn't delete existing data
  • readOnlyHint: false correctly reflects that this is a write operation
  • openWorldHint: true indicates Practitest API interaction

To ensure consistency across the PR, consider verifying that similar operations have similar annotation values. Run the following script to check for any inconsistencies:


🏁 Script executed:

#!/bin/bash
# Description: Check annotation patterns across all modified action files

# Find all actions with annotations and group by operation type
echo "=== Create/Import actions with annotations ==="
rg -A3 'name:.*"(Create|Import)' --type=ts -g '**/actions/**/*.ts' | rg -A3 'annotations:'

echo -e "\n=== Delete actions with annotations ==="
rg -A3 'name:.*"Delete' --type=ts -g '**/actions/**/*.ts' | rg -A3 'annotations:'

echo -e "\n=== Get/List/Retrieve/Search actions with annotations ==="
rg -A3 'name:.*"(Get|List|Retrieve|Search)' --type=ts -g '**/actions/**/*.ts' | rg -A3 'annotations:'

Length of output: 7738


Align annotation usage across actions
create-run.ts adds openWorldHint and readOnlyHint, but other actions only define destructiveHint. Ensure all action metadata uses the same set of hints—either include all three fields everywhere or remove the extras here.

🤖 Prompt for AI Agents
In components/practitest/actions/create-run/create-run.ts around lines 13 to 18,
the action metadata includes annotations openWorldHint and readOnlyHint in
addition to destructiveHint, which is inconsistent with other actions; update
this file so its annotations match the project's standard (either add the
missing fields to other actions or remove openWorldHint and readOnlyHint here).
Modify the annotations object to contain exactly the same hint set used across
actions (most likely only destructiveHint) and ensure formatting and types
remain consistent with the other action files.

type: "action",
props: {
practitest,
Expand Down Expand Up @@ -113,7 +118,9 @@ export default defineAction({
};
} catch (err) {
throw new ConfigurationError(
`**JSON parse error** - check if the \`${prop}\` prop is a valid JSON-stringified object`,
`**JSON parse error** - check if the \`${prop}\` prop is a valid JSON-stringified object

\`${err.message}\``,
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion components/practitest/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/practitest",
"version": "0.0.3",
"version": "0.0.4",
"description": "Pipedream PractiTest Components",
"main": "dist/app/practitest.app.mjs",
"keywords": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ export default defineAction({
description:
"Churn a subscription [See docs here](https://profitwellapiv2.docs.apiary.io/#/reference/manually-added-customers/updating-subscriptions/churn-a-subscription)",
key: "profitwell-churn-subscription",
version: "0.0.1",
version: "0.0.2",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: false,
},
type: "action",
props: {
profitwell,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ export default defineAction({
description:
"Create a subscription [See docs here](https://profitwellapiv2.docs.apiary.io/#/reference/manually-added-customers/creating-subscriptions/create-a-subscription)",
key: "profitwell-create-subscription",
version: "0.0.1",
version: "0.0.2",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: false,
},
type: "action",
props: {
profitwell,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ export default defineAction({
description:
"Get data for a customer [See docs here](https://profitwellapiv2.docs.apiary.io/#/reference/customers/retrieving-a-customer-by-id)",
key: "profitwell-get-customer-info",
version: "0.0.1",
version: "0.0.2",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: true,
},
type: "action",
props: {
profitwell,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ export default defineAction({
description:
"Upgrade/downgrade a subscription [See docs here](https://profitwellapiv2.docs.apiary.io/#/reference/manually-added-customers/updating-subscriptions/upgrade-downgrade-a-subscription)",
key: "profitwell-update-subscription",
version: "0.0.1",
version: "0.0.2",
annotations: {
destructiveHint: true,
openWorldHint: true,
readOnlyHint: false,
},
type: "action",
props: {
profitwell,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ export default defineAction({
description:
"Verify an email address [See docs here](http://docs.quickemailverification.com/email-verification-api/verify-an-email-address)",
key: "quickemailverification-verify-email-address",
version: "0.0.1",
version: "0.0.2",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: true,
},
type: "action",
props: {
quickemailverification,
Expand Down
7 changes: 6 additions & 1 deletion components/raven_tools/actions/add-keyword/add-keyword.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ export default defineAction({
name: "Add Keyword",
description: `Add a keyword to a domain [See docs here](${DOCS})`,
key: "raven_tools-add-keyword",
version: "0.0.1",
version: "0.0.2",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: false,
},
type: "action",
props: {
app,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ export default defineAction({
description:
"Add an invite request [See docs here](https://documenter.getpostman.com/view/4975691/TzzGFYg3#f417c9ce-2376-495c-85c3-bdcfc204eee2)",
key: "repuso-add-invite-request",
version: "0.0.1",
version: "0.0.2",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: false,
},
type: "action",
props: {
repuso,
Expand Down
7 changes: 6 additions & 1 deletion components/resend/actions/retrieve-email/retrieve-email.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ export default defineAction({
description:
"Retrieve a single email [See the documentation](https://resend.com/docs/api-reference/emails/retrieve-email)",
key: "resend-retrieve-email",
version: "0.0.1",
version: "0.0.2",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: true,
},
type: "action",
props: {
app,
Expand Down
7 changes: 6 additions & 1 deletion components/resend/actions/send-email/send-email.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ export default defineAction({
description:
"Send an email [See the documentation](https://resend.com/docs/api-reference/emails/send-email)",
key: "resend-send-email",
version: "0.0.2",
version: "0.0.3",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: false,
},
type: "action",
props: {
app,
Expand Down
Loading
Loading