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
@@ -0,0 +1,63 @@
import app from "../../rocketskip.app.mjs";

export default {
key: "rocketskip-skip-trace-property",
name: "Skip Trace Property",
description: "Send a property to get phone numbers for the property owner. [See the documentation](https://docs.rocketskip.com/api-reference/endpoint/post)",
version: "0.0.1",
type: "action",
props: {
app,
streetAddress: {
propDefinition: [
app,
"streetAddress",
],
},
city: {
propDefinition: [
app,
"city",
],
},
state: {
propDefinition: [
app,
"state",
],
},
zipCode: {
propDefinition: [
app,
"zipCode",
],
},
firstName: {
propDefinition: [
app,
"firstName",
],
},
lastName: {
propDefinition: [
app,
"lastName",
],
},
},
async run({ $ }) {
const response = await this.app.skipTraceProperty({
$,
data: {
street_address: this.streetAddress,
city: this.city,
state: this.state,
zip_code: this.zipCode,
first_name: this.firstName,
last_name: this.lastName,
},
});
$.export("$summary", "Successfully sent the request and retrieved " + response.result.length + " resultts");
return response;
},
};
7 changes: 5 additions & 2 deletions components/rocketskip/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/rocketskip",
"version": "0.0.1",
"version": "0.1.0",
"description": "Pipedream RocketSkip Components",
"main": "rocketskip.app.mjs",
"keywords": [
Expand All @@ -11,5 +11,8 @@
"author": "Pipedream <support@pipedream.com> (https://pipedream.com/)",
"publishConfig": {
"access": "public"
},
"dependencies": {
"@pipedream/platform": "^3.1.0"
}
}
}
68 changes: 63 additions & 5 deletions components/rocketskip/rocketskip.app.mjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,69 @@
import { axios } from "@pipedream/platform";

export default {
type: "app",
app: "rocketskip",
propDefinitions: {},
propDefinitions: {
streetAddress: {
type: "string",
label: "Street Address",
description: "Street address of the property, i.e.: `44 Montgomery St`",
},
city: {
type: "string",
label: "City",
description: "City of the property, i.e.: `San Francisco`",
},
state: {
type: "string",
label: "State",
description: "State of the property, i.e.: `CA`",
},
zipCode: {
type: "string",
label: "Zip Code",
description: "Postal code of the property, i.e.: `94108`",
},
firstName: {
type: "string",
label: "First Name",
description: "First name of the property owner",
optional: true,
},
lastName: {
type: "string",
label: "Last Name",
description: "Last name of the property owner",
optional: true,
},
},
methods: {
// this.$auth contains connected account data
authKeys() {
console.log(Object.keys(this.$auth));
_baseUrl() {
return "https://api.rocketskip.com/api/v1";
},
async _makeRequest(opts = {}) {
const {
$ = this,
path,
headers,
...otherOpts
} = opts;
return axios($, {
...otherOpts,
url: this._baseUrl() + path,
headers: {
Authorization: `Bearer ${this.$auth.oauth_access_token}`,
...headers,
},
});
},

async skipTraceProperty(args = {}) {
return this._makeRequest({
path: "/property/skiptrace",
method: "post",
...args,
});
},
},
};
};
12 changes: 7 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading