Skip to content

Commit d961f2e

Browse files
authored
New Components - rippling (#17049)
* new components * pnpm-lock.yaml * pnpm-lock.yaml * updates * update
1 parent b497fc1 commit d961f2e

File tree

8 files changed

+549
-16
lines changed

8 files changed

+549
-16
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import rippling from "../../rippling.app.mjs";
2+
3+
export default {
4+
key: "rippling-get-user",
5+
name: "Get User",
6+
description: "Retrieves a specific user from Rippling. [See the documentation](https://developer.rippling.com/documentation/rest-api/reference/get-users)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
rippling,
11+
userId: {
12+
propDefinition: [
13+
rippling,
14+
"userId",
15+
],
16+
},
17+
},
18+
async run({ $ }) {
19+
const response = await this.rippling.getUser({
20+
$,
21+
userId: this.userId,
22+
});
23+
24+
$.export("$summary", `Successfully retrieved user with ID: ${this.userId}`);
25+
return response;
26+
},
27+
};
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
import rippling from "../../rippling.app.mjs";
2+
3+
export default {
4+
key: "rippling-list-companies",
5+
name: "List Companies",
6+
description: "Retrieves a list of all companies from Rippling. [See the documentation](https://developer.rippling.com/documentation/rest-api/reference/list-companies)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
rippling,
11+
expand: {
12+
propDefinition: [
13+
rippling,
14+
"expandCompanies",
15+
],
16+
},
17+
orderBy: {
18+
propDefinition: [
19+
rippling,
20+
"orderBy",
21+
],
22+
},
23+
orderDirection: {
24+
propDefinition: [
25+
rippling,
26+
"orderDirection",
27+
],
28+
},
29+
maxResults: {
30+
propDefinition: [
31+
rippling,
32+
"maxResults",
33+
],
34+
},
35+
},
36+
async run({ $ }) {
37+
const response = await this.rippling.getPaginatedResources({
38+
fn: this.rippling.listCompanies,
39+
args: {
40+
$,
41+
params: {
42+
order_by: `${this.orderBy} ${this.orderDirection}`,
43+
...(this.expand && {
44+
expand: this.expand.join(","),
45+
}),
46+
},
47+
},
48+
max: this.maxResults,
49+
});
50+
51+
$.export("$summary", `Successfully retrieved ${response?.length || 0} companies`);
52+
return response;
53+
},
54+
};
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
import rippling from "../../rippling.app.mjs";
2+
3+
export default {
4+
key: "rippling-list-teams",
5+
name: "List Teams",
6+
description: "Retrieves a list of all teams from Rippling. [See the documentation](https://developer.rippling.com/documentation/rest-api/reference/list-teams)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
rippling,
11+
expand: {
12+
propDefinition: [
13+
rippling,
14+
"expandTeams",
15+
],
16+
},
17+
orderBy: {
18+
propDefinition: [
19+
rippling,
20+
"orderBy",
21+
],
22+
},
23+
maxResults: {
24+
propDefinition: [
25+
rippling,
26+
"maxResults",
27+
],
28+
},
29+
},
30+
async run({ $ }) {
31+
const response = await this.rippling.getPaginatedResources({
32+
fn: this.rippling.listTeams,
33+
args: {
34+
$,
35+
params: {
36+
order_by: this.orderBy,
37+
...(this.expand && {
38+
expand: this.expand.join(","),
39+
}),
40+
},
41+
},
42+
max: this.maxResults,
43+
});
44+
45+
$.export("$summary", `Successfully retrieved ${response?.length || 0} teams`);
46+
return response;
47+
},
48+
};
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
import rippling from "../../rippling.app.mjs";
2+
3+
export default {
4+
key: "rippling-list-workers",
5+
name: "List Workers",
6+
description: "Retrieves a list of all workers from Rippling. [See the documentation](https://developer.rippling.com/documentation/rest-api/reference/list-workers)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
rippling,
11+
filter: {
12+
propDefinition: [
13+
rippling,
14+
"filterWorkers",
15+
],
16+
},
17+
expand: {
18+
propDefinition: [
19+
rippling,
20+
"expandWorkers",
21+
],
22+
},
23+
orderBy: {
24+
propDefinition: [
25+
rippling,
26+
"orderBy",
27+
],
28+
},
29+
orderDirection: {
30+
propDefinition: [
31+
rippling,
32+
"orderDirection",
33+
],
34+
},
35+
maxResults: {
36+
propDefinition: [
37+
rippling,
38+
"maxResults",
39+
],
40+
},
41+
},
42+
async run({ $ }) {
43+
const response = await this.rippling.getPaginatedResources({
44+
fn: this.rippling.listWorkers,
45+
args: {
46+
$,
47+
params: {
48+
order_by: `${this.orderBy} ${this.orderDirection}`,
49+
...(this.filter && {
50+
filter: this.filter,
51+
}),
52+
...(this.expand && {
53+
expand: this.expand.join(","),
54+
}),
55+
},
56+
},
57+
max: this.maxResults,
58+
});
59+
60+
$.export("$summary", `Successfully retrieved ${response?.length || 0} workers`);
61+
return response;
62+
},
63+
};

components/rippling/package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/rippling",
3-
"version": "0.0.1",
3+
"version": "0.1.0",
44
"description": "Pipedream Rippling Components",
55
"main": "rippling.app.mjs",
66
"keywords": [
@@ -11,5 +11,8 @@
1111
"author": "Pipedream <[email protected]> (https://pipedream.com/)",
1212
"publishConfig": {
1313
"access": "public"
14+
},
15+
"dependencies": {
16+
"@pipedream/platform": "^3.1.0"
1417
}
15-
}
18+
}

0 commit comments

Comments
 (0)