Skip to content

Commit 2b23bbe

Browse files
Merge branch 'master' into mcp/returnista
2 parents 53ec92e + 00f82e1 commit 2b23bbe

748 files changed

Lines changed: 23659 additions & 5064 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.coderabbit.yaml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,20 @@ reviews:
1919
Review this file against the Pipedream component model described in
2020
.github/pipedream-component-guidelines.md.
2121
22-
- Verify the `version` field is incremented from its previous value and the bump
23-
follows semantic versioning (see the Versioning section of the guidelines):
24-
new components start at `0.0.1`; bug fixes and non-breaking refactors → patch;
25-
new optional props or backwards-compatible additions → minor; removed/renamed props
26-
or breaking behavior changes → major; flag any PR where the version was not bumped
27-
or where the bump level seems inconsistent with the scope of the change
22+
- Only flag a missing version bump when the component's own behavior, interface, or
23+
implementation changed — do not flag components that are only transitively touched
24+
by a shared-file change (e.g. a new constant added to a constants file) with no
25+
effect on the component itself. When a bump is required, verify it is incremented
26+
from its previous value and follows semantic versioning (see the Versioning section
27+
of the guidelines): new components start at `0.0.1`; bug fixes and non-breaking
28+
refactors → patch; new optional props or backwards-compatible additions → minor;
29+
removed/renamed props or breaking behavior changes → major; a patch bump added
30+
solely to satisfy the CI version check is always acceptable and should not be flagged
2831
- Verify the app's `package.json` version is also bumped by the same or greater
2932
semver segment as the component change
30-
- All prop names, method names, and local variables must use camelCase; API request
31-
parameter names follow the API's own convention and are the only exception
33+
- All prop names, method names, and local variables must use camelCase; module-level
34+
constants use UPPER_SNAKE_CASE; API request parameter names follow the API's own
35+
convention and are the only exception
3236
- Props used in more than one component must be defined in the app file's
3337
`propDefinitions` and referenced via `propDefinition` — flag any inline prop
3438
definition that duplicates one already in the app file

.github/pipedream-component-guidelines.md

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export default {
3535
key: "app-action-name", // globally unique; kebab-case; prefixed with app slug
3636
name: "Human Readable Name", // shown in UI and as the MCP tool name
3737
description: "...", // shown in UI and used as MCP tool documentation
38-
version: "0.0.1", // semantic versioning; must be incremented on every change
38+
version: "0.0.1", // semantic versioning; increment when the component's own behavior, interface, or implementation changes
3939
type: "action", // or "source"
4040
props: { ... }, // configuration inputs
4141
async run({ $ }) { ... }, // execution entry point (signature differs for sources)
@@ -49,8 +49,9 @@ values are **semantically correct**, not whether properties exist.
4949

5050
## Versioning
5151

52-
Every component has a `version` field that must be incremented on every change. New
53-
components always start at `0.0.1`. Follow semantic versioning:
52+
Every component has a `version` field that must be incremented whenever the component's
53+
own behavior, interface, or implementation changes. New components always start at
54+
`0.0.1`. Follow semantic versioning:
5455

5556
| Change type | Version segment | Examples |
5657
|---|---|---|
@@ -62,13 +63,36 @@ The app's `package.json` must also be bumped by the same or greater segment when
6263
component in that app changes — patch for patch, minor for minor (or higher), major for
6364
major (or higher).
6465

66+
### CI version check and false positives
67+
68+
A CI workflow flags components whose files — or whose shared dependency files — were
69+
modified without a corresponding version bump. This check is **advisory**: it is not
70+
required to pass for a PR to merge.
71+
72+
The check can produce false positives. For example, adding a new constant to a shared
73+
constants file does not affect existing consumers, so those components do not strictly
74+
need a version bump. In cases like this, a **patch bump is always acceptable** as a
75+
way to satisfy the workflow — reviewers should not block a PR solely because a component
76+
received a patch bump that was not otherwise necessary. Conversely, do not require
77+
authors to bump versions for components that are only transitively touched by a
78+
non-behavioral shared-file change; the CI warning is informational in those cases.
79+
6580
---
6681

6782
## Naming Conventions
6883

6984
All prop names, method names, and local variables must use **camelCase**. This applies
7085
throughout component files and app files alike.
7186

87+
Module-level constants (values that are fixed at import time and reused across the file)
88+
must use **`UPPER_SNAKE_CASE`**:
89+
90+
```javascript
91+
const DEFAULT_LIMIT = 100;
92+
const MAX_RETRIES = 3;
93+
const EVENT_TYPES = Object.freeze(["created", "updated", "deleted"]);
94+
```
95+
7296
The only exception is API request parameters — use whatever casing the API itself
7397
requires (often `snake_case` or `PascalCase`). Map prop values to API parameter names
7498
at the point of the request:
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
import apexverify from "../../apexverify.app.mjs";
2+
import {
3+
COUNTRY_OPTIONS,
4+
TARGET_AUDIENCE_OPTIONS,
5+
TARGET_MARKET_INDUSTRY_OPTIONS,
6+
TARGET_OBJECTIVE_OPTIONS,
7+
} from "../../common/constants.mjs";
8+
9+
export default {
10+
key: "apexverify-unit-verification",
11+
name: "ApexVerify - Email/Phone B2B Data Verification",
12+
description: "Verify a single email address or phone number using ApexVerify. [See the documentation](https://documentation.apexverify.com/api-reference/apex-verify-api/unit)",
13+
version: "0.0.1",
14+
type: "action",
15+
props: {
16+
apexverify,
17+
18+
type: {
19+
type: "string",
20+
label: "Data Type",
21+
description: "Which kind of contact data is being verified. Allowed values: `email` (verify an email address) or `phone` (verify a phone number). The value of `unit` must match this type — pass `email` here when `unit` is an email address, and `phone` when `unit` is a phone number.",
22+
options: [
23+
{
24+
label: "Email Address",
25+
value: "email",
26+
},
27+
{
28+
label: "Phone Number",
29+
value: "phone",
30+
},
31+
],
32+
},
33+
unit: {
34+
type: "string",
35+
label: "Email or Phone to Verify",
36+
description: "The single email address or phone number to verify. Format must match `type`: for `type=email`, pass a full RFC 5322 email like `jane.doe@example.com`. For `type=phone`, pass a number in E.164 format with the leading `+` and country code — e.g. `+14155552671` (US) or `+442071234567` (UK). Hyphens and spaces are tolerated but not required. Only one address/number per call.",
37+
},
38+
targetCountry: {
39+
type: "string",
40+
label: "Target Country",
41+
description: "Country against which the email or phone should be processed.",
42+
default: "US",
43+
options: COUNTRY_OPTIONS,
44+
},
45+
targetAudience: {
46+
type: "string",
47+
label: "Target Audience",
48+
description: "Optional target audience context for the verification. Accepted values include `1` for Agency / Consultants, `4` for Developers & Technical Leads, `8` for Founders & C-Level Executives, and `17` for Marketing & Sales Professionals.",
49+
optional: true,
50+
options: TARGET_AUDIENCE_OPTIONS,
51+
},
52+
targetMarketIndustry: {
53+
type: "string",
54+
label: "Target Market Industry",
55+
description: "Optional market industry context for the verification. Accepted values include `18` for Construction, `29` for Finance and Insurance, `42` for Health Care and Social Assistance, `46` for Information, and `91` for Retail Trade.",
56+
optional: true,
57+
options: TARGET_MARKET_INDUSTRY_OPTIONS,
58+
},
59+
targetObjective: {
60+
type: "string",
61+
label: "Target Objective",
62+
description: "Optional campaign or business objective context for the verification. Accepted values include `4` for Customer Acquisition / Sales, `6` for Lead Generation (Top/Mid-Funnel), `12` for Sales-Ready Leads, and `16` for Website / App Traffic Acquisition.",
63+
optional: true,
64+
options: TARGET_OBJECTIVE_OPTIONS,
65+
},
66+
useAccountCache: {
67+
type: "boolean",
68+
label: "Use Account Cache",
69+
description: "Use previous verification results from your ApexVerify account cache when available.",
70+
optional: true,
71+
default: true,
72+
},
73+
maxAccountCacheBackoff: {
74+
type: "integer",
75+
label: "Max Account Cache Backoff",
76+
description: "Maximum number of days to look back in account cache. Min: 1. Max: 180.",
77+
optional: true,
78+
default: 30,
79+
},
80+
useGlobalCache: {
81+
type: "boolean",
82+
label: "Use Global Cache",
83+
description: "Use anonymized global cache results when available.",
84+
optional: true,
85+
default: true,
86+
},
87+
maxGlobalCacheBackoff: {
88+
type: "integer",
89+
label: "Max Global Cache Backoff",
90+
description: "Maximum number of days to look back in global cache. Min: 1. Max: 180.",
91+
optional: true,
92+
default: 30,
93+
},
94+
},
95+
annotations: {
96+
openWorldHint: true,
97+
readOnlyHint: false,
98+
destructiveHint: false,
99+
},
100+
101+
async run({ $ }) {
102+
const payload = {
103+
type: this.type,
104+
target_country: this.targetCountry,
105+
unit: this.unit,
106+
target_audience: this.targetAudience,
107+
target_market_industry: this.targetMarketIndustry,
108+
target_objective: this.targetObjective,
109+
use_account_cache: this.useAccountCache,
110+
max_account_cache_backoff: this.maxAccountCacheBackoff,
111+
use_global_cache: this.useGlobalCache,
112+
max_global_cache_backoff: this.maxGlobalCacheBackoff,
113+
};
114+
115+
Object.keys(payload).forEach((key) => {
116+
if (payload[key] === "" || payload[key] === null || payload[key] === undefined) {
117+
delete payload[key];
118+
}
119+
});
120+
121+
const response = await this.apexverify.verifyUnit($, payload);
122+
123+
$.export("$summary", `Successfully verified ${this.type}`);
124+
125+
return response;
126+
},
127+
};
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
import { axios } from "@pipedream/platform";
2+
3+
export default {
4+
type: "app",
5+
app: "apexverify",
6+
propDefinitions: {},
7+
methods: {
8+
_baseUrl() {
9+
return "https://api.apexverify.com";
10+
},
11+
12+
_headers() {
13+
return {
14+
"X-API-Key": this.$auth.api_key,
15+
"Accept": "application/json",
16+
};
17+
},
18+
19+
async _makeRequest($, {
20+
method = "GET",
21+
path,
22+
data,
23+
params,
24+
headers = {},
25+
}) {
26+
return await axios($, {
27+
method,
28+
url: `${this._baseUrl()}${path}`,
29+
headers: {
30+
...this._headers(),
31+
...headers,
32+
},
33+
data,
34+
params,
35+
});
36+
},
37+
38+
async testConnection($) {
39+
return this._makeRequest($, {
40+
method: "GET",
41+
path: "/v1/account/credits",
42+
});
43+
},
44+
45+
async verifyUnit($, payload) {
46+
return this._makeRequest($, {
47+
method: "POST",
48+
path: "/v1/unit",
49+
headers: {
50+
"Content-Type": "application/json",
51+
},
52+
data: payload,
53+
});
54+
},
55+
},
56+
};

0 commit comments

Comments
 (0)