Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
27 changes: 27 additions & 0 deletions components/rippling/actions/get-user/get-user.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import rippling from "../../rippling.app.mjs";

export default {
key: "rippling-get-user",
name: "Get User",
description: "Retrieves a specific user from Rippling. [See the documentation](https://developer.rippling.com/documentation/rest-api/reference/get-users)",
version: "0.0.1",
type: "action",
props: {
rippling,
userId: {
propDefinition: [
rippling,
"userId",
],
},
},
async run({ $ }) {
const response = await this.rippling.getUser({
$,
userId: this.userId,
});

$.export("$summary", `Successfully retrieved user with ID: ${this.userId}`);
return response;
},
};
54 changes: 54 additions & 0 deletions components/rippling/actions/list-companies/list-companies.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import rippling from "../../rippling.app.mjs";

export default {
key: "rippling-list-companies",
name: "List Companies",
description: "Retrieves a list of all companies from Rippling. [See the documentation](https://developer.rippling.com/documentation/rest-api/reference/list-companies)",
version: "0.0.1",
type: "action",
props: {
rippling,
expand: {
propDefinition: [
rippling,
"expandCompanies",
],
},
orderBy: {
propDefinition: [
rippling,
"orderBy",
],
},
orderDirection: {
propDefinition: [
rippling,
"orderDirection",
],
},
maxResults: {
propDefinition: [
rippling,
"maxResults",
],
},
},
async run({ $ }) {
const response = await this.rippling.getPaginatedResources({
fn: this.rippling.listCompanies,
args: {
$,
params: {
order_by: `${this.orderBy} ${this.orderDirection}`,
...(this.expand && {
expand: this.expand.join(","),
}),
},
},
max: this.maxResults,
});

$.export("$summary", `Successfully retrieved ${response?.length || 0} companies`);
return response;
},
};
48 changes: 48 additions & 0 deletions components/rippling/actions/list-teams/list-teams.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import rippling from "../../rippling.app.mjs";

export default {
key: "rippling-list-teams",
name: "List Teams",
description: "Retrieves a list of all teams from Rippling. [See the documentation](https://developer.rippling.com/documentation/rest-api/reference/list-teams)",
version: "0.0.1",
type: "action",
props: {
rippling,
expand: {
propDefinition: [
rippling,
"expandTeams",
],
},
orderBy: {
propDefinition: [
rippling,
"orderBy",
],
},
maxResults: {
propDefinition: [
rippling,
"maxResults",
],
},
},
async run({ $ }) {
const response = await this.rippling.getPaginatedResources({
fn: this.rippling.listTeams,
args: {
$,
params: {
order_by: this.orderBy,
...(this.expand && {
expand: this.expand.join(","),
}),
},
},
max: this.maxResults,
});

$.export("$summary", `Successfully retrieved ${response?.length || 0} teams`);
return response;
},
};
63 changes: 63 additions & 0 deletions components/rippling/actions/list-workers/list-workers.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
import rippling from "../../rippling.app.mjs";

export default {
key: "rippling-list-workers",
name: "List Workers",
description: "Retrieves a list of all workers from Rippling. [See the documentation](https://developer.rippling.com/documentation/rest-api/reference/list-workers)",
version: "0.0.1",
type: "action",
props: {
rippling,
filter: {
propDefinition: [
rippling,
"filterWorkers",
],
},
expand: {
propDefinition: [
rippling,
"expandWorkers",
],
},
orderBy: {
propDefinition: [
rippling,
"orderBy",
],
},
orderDirection: {
propDefinition: [
rippling,
"orderDirection",
],
},
maxResults: {
propDefinition: [
rippling,
"maxResults",
],
},
},
async run({ $ }) {
const response = await this.rippling.getPaginatedResources({
fn: this.rippling.listWorkers,
args: {
$,
params: {
order_by: `${this.orderBy} ${this.orderDirection}`,
...(this.filter && {
filter: encodeURIComponent(this.filter),
}),
...(this.expand && {
expand: this.expand.join(","),
}),
},
},
max: this.maxResults,
});

$.export("$summary", `Successfully retrieved ${response?.length || 0} workers`);
return response;
},
};
7 changes: 5 additions & 2 deletions components/rippling/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/rippling",
"version": "0.0.1",
"version": "0.1.0",
"description": "Pipedream Rippling Components",
"main": "rippling.app.mjs",
"keywords": [
Expand All @@ -11,5 +11,8 @@
"author": "Pipedream <[email protected]> (https://pipedream.com/)",
"publishConfig": {
"access": "public"
},
"dependencies": {
"@pipedream/platform": "^3.1.0"
}
}
}
Loading
Loading