Skip to content

Commit 4626bc6

Browse files
authored
Merge branch 'master' into issue-14716
2 parents c64e310 + 685bb65 commit 4626bc6

File tree

230 files changed

+5359
-2670
lines changed

Some content is hidden

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

230 files changed

+5359
-2670
lines changed
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
import { defineApp } from "@pipedream/types";
2-
3-
export default defineApp({
1+
export default {
42
type: "app",
5-
app: "ortto",
3+
app: "domo",
64
propDefinitions: {},
75
methods: {
86
// this.$auth contains connected account data
97
authKeys() {
108
console.log(Object.keys(this.$auth));
119
},
1210
},
13-
});
11+
};

components/domo/package.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "@pipedream/domo",
3+
"version": "0.0.1",
4+
"description": "Pipedream Domo Components",
5+
"main": "domo.app.mjs",
6+
"keywords": [
7+
"pipedream",
8+
"domo"
9+
],
10+
"homepage": "https://pipedream.com/apps/domo",
11+
"author": "Pipedream <[email protected]> (https://pipedream.com/)",
12+
"publishConfig": {
13+
"access": "public"
14+
}
15+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import app from "../../epsy.app.mjs";
2+
3+
export default {
4+
key: "epsy-email-lookup",
5+
name: "Email Lookup",
6+
description: "Request a lookup for the provided email. [See the documentation](https://irbis.espysys.com/developer/)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
app,
11+
value: {
12+
propDefinition: [
13+
app,
14+
"value",
15+
],
16+
},
17+
},
18+
19+
async run({ $ }) {
20+
const response = await this.app.emailLookup({
21+
$,
22+
data: {
23+
value: this.value,
24+
lookupId: 67,
25+
},
26+
});
27+
$.export("$summary", `Successfully sent request. Use the ID to get the results: '${response.id}'`);
28+
29+
return response;
30+
},
31+
};
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import app from "../../epsy.app.mjs";
2+
3+
export default {
4+
key: "epsy-get-lookup-results",
5+
name: "Get Lookup Results",
6+
description: "Get the results of the lookup with the provided ID. [See the documentation](https://irbis.espysys.com/developer/)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
app,
11+
value: {
12+
propDefinition: [
13+
app,
14+
"value",
15+
],
16+
},
17+
searchId: {
18+
propDefinition: [
19+
app,
20+
"searchId",
21+
],
22+
},
23+
},
24+
25+
async run({ $ }) {
26+
const response = await this.app.getLookupResults({
27+
$,
28+
searchId: this.searchId,
29+
data: {
30+
value: this.value,
31+
},
32+
params: {
33+
key: `${this.app.$auth.api_key}`,
34+
},
35+
});
36+
$.export("$summary", `Successfully retrieved the details of the request with ID: '${this.searchId}'`);
37+
return response;
38+
},
39+
};
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import app from "../../epsy.app.mjs";
2+
3+
export default {
4+
key: "epsy-name-lookup",
5+
name: "Name Lookup",
6+
description: "Request a lookup for the provided name. [See the documentation](https://irbis.espysys.com/developer/)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
app,
11+
value: {
12+
propDefinition: [
13+
app,
14+
"value",
15+
],
16+
},
17+
},
18+
19+
async run({ $ }) {
20+
const response = await this.app.nameLookup({
21+
$,
22+
data: {
23+
value: this.value,
24+
lookupId: 149,
25+
},
26+
});
27+
$.export("$summary", `Successfully sent request. Use the ID to get the results: '${response.id}'`);
28+
return response;
29+
},
30+
};

components/epsy/epsy.app.mjs

Lines changed: 90 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,96 @@
1+
import { axios } from "@pipedream/platform";
2+
13
export default {
24
type: "app",
35
app: "epsy",
4-
propDefinitions: {},
6+
propDefinitions: {
7+
value: {
8+
type: "string",
9+
label: "Value",
10+
description: "Value to lookup",
11+
},
12+
searchId: {
13+
type: "string",
14+
label: "Search ID",
15+
description: "ID of the search",
16+
async options() {
17+
const response = await this.getSearchIds();
18+
const searchIds = response.list;
19+
return searchIds.map(({ id }) => ({
20+
value: id,
21+
}));
22+
},
23+
},
24+
},
525
methods: {
6-
// this.$auth contains connected account data
7-
authKeys() {
8-
console.log(Object.keys(this.$auth));
26+
_baseUrl() {
27+
return "https://irbis.espysys.com/api";
28+
},
29+
async _makeRequest(opts = {}) {
30+
const {
31+
$ = this,
32+
path,
33+
headers,
34+
data,
35+
...otherOpts
36+
} = opts;
37+
console.log("Request Options:", {
38+
url: this._baseUrl() + path,
39+
headers: {
40+
...headers,
41+
"accept": "application/json",
42+
"content-type": "application/json",
43+
},
44+
data: {
45+
...data,
46+
key: `${this.$auth.api_key}`,
47+
},
48+
...otherOpts,
49+
});
50+
return axios($, {
51+
...otherOpts,
52+
url: this._baseUrl() + path,
53+
headers: {
54+
...headers,
55+
"accept": "application/json",
56+
"content-type": "application/json",
57+
},
58+
data: {
59+
...data,
60+
key: `${this.$auth.api_key}`,
61+
},
62+
});
63+
},
64+
async emailLookup(args = {}) {
65+
return this._makeRequest({
66+
path: "/developer/combined_email",
67+
method: "post",
68+
...args,
69+
});
70+
},
71+
async nameLookup(args = {}) {
72+
return this._makeRequest({
73+
path: "/developer/combined_name",
74+
method: "post",
75+
...args,
76+
});
77+
},
78+
async getLookupResults({
79+
searchId, ...args
80+
}) {
81+
return this._makeRequest({
82+
path: `/request-monitor/api-usage/${searchId}`,
83+
...args,
84+
});
85+
},
86+
async getSearchIds(args = {}) {
87+
return this._makeRequest({
88+
path: "/request-monitor/api-usage",
89+
params: {
90+
key: `${this.$auth.api_key}`,
91+
},
92+
...args,
93+
});
994
},
1095
},
11-
};
96+
};

components/epsy/package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/epsy",
3-
"version": "0.0.1",
3+
"version": "0.1.0",
44
"description": "Pipedream Epsy Components",
55
"main": "epsy.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.0.3"
1417
}
15-
}
18+
}
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
import app from "../../google_gemini.app.mjs";
2+
import constants from "../../common/constants.mjs";
3+
4+
export default {
5+
props: {
6+
app,
7+
model: {
8+
propDefinition: [
9+
app,
10+
"model",
11+
() => ({
12+
filter: ({
13+
description,
14+
supportedGenerationMethods,
15+
}) => ![
16+
"discontinued",
17+
"deprecated",
18+
].some((keyword) => description.includes(keyword))
19+
&& supportedGenerationMethods?.includes(constants.MODEL_METHODS.GENERATE_CONTENT),
20+
}),
21+
],
22+
},
23+
},
24+
async additionalProps() {
25+
const {
26+
model,
27+
responseFormat,
28+
} = this;
29+
30+
const {
31+
outputTokenLimit,
32+
temperature,
33+
topP,
34+
topK,
35+
maxTemperature,
36+
} = await this.app.getModel({
37+
model,
38+
});
39+
40+
return {
41+
...(responseFormat && {
42+
responseSchema: {
43+
type: "string",
44+
label: "Response Schema",
45+
description: "Define the structure of the JSON response. Must be a valid JSON schema object. Leave empty to let Gemini determine the structure.",
46+
optional: true,
47+
},
48+
}),
49+
...(outputTokenLimit && {
50+
maxOutputTokens: {
51+
type: "integer",
52+
label: "Max Output Tokens",
53+
description: `The maximum number of tokens to generate in the response. Eg. \`${outputTokenLimit}\`.`,
54+
optional: true,
55+
max: outputTokenLimit,
56+
},
57+
}),
58+
...(temperature && {
59+
temperature: {
60+
type: "string",
61+
label: "Temperature",
62+
description: `Controls the randomness of the generated text. Lower values make the text more deterministic, while higher values make it more random. Eg. \`${temperature}\`.${maxTemperature
63+
? ` Where max temperature is \`${maxTemperature}\`.`
64+
: ""}`,
65+
optional: true,
66+
},
67+
}),
68+
...(topP && {
69+
topP: {
70+
type: "string",
71+
label: "Top P",
72+
description: `Controls the diversity of the generated text. Lower values make the text more deterministic, while higher values make it more random. Eg. \`${topP}\`.`,
73+
optional: true,
74+
},
75+
}),
76+
...(topK && {
77+
topK: {
78+
type: "integer",
79+
label: "Top K",
80+
description: `Controls the diversity of the generated text. Lower values make the text more deterministic, while higher values make it more random. Eg. \`${topK}\`.`,
81+
optional: true,
82+
},
83+
}),
84+
stopSequences: {
85+
type: "string[]",
86+
label: "Stop Sequences",
87+
description: "The set of character sequences (up to 5) that will stop output generation. If specified, the API will stop at the first appearance of a `stop_sequence`. The stop sequence will not be included as part of the response.",
88+
optional: true,
89+
},
90+
};
91+
},
92+
};

0 commit comments

Comments
 (0)