Skip to content

Commit f8dfe96

Browse files
committed
updates
1 parent 88b62d4 commit f8dfe96

File tree

9 files changed

+57
-29
lines changed

9 files changed

+57
-29
lines changed

components/jira/actions/add-multiple-attachments-to-issue/add-multiple-attachments-to-issue.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export default {
2626
],
2727
},
2828
files: {
29-
type: "string",
29+
type: "string[]",
3030
label: "File Paths or URLs",
3131
description: "Provide either an array of file URLs or paths to files in the /tmp directory (for example, /tmp/myFile.pdf).",
3232
},
@@ -41,7 +41,7 @@ export default {
4141
stream, metadata,
4242
} = await getFileStreamAndMetadata(file);
4343

44-
data .append("file", stream, {
44+
data.append("file", stream, {
4545
contentType: metadata.contentType,
4646
knownLength: metadata.size,
4747
filename: metadata.name,

components/speechace/actions/score-scripted-recording/score-scripted-recording.mjs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import speechace from "../../speechace.app.mjs";
22
import FormData from "form-data";
3-
import { getFileStreamAndMetadata } from "@pipedream/platform";
3+
import {
4+
getFileStreamAndMetadata, ConfigurationError,
5+
} from "@pipedream/platform";
46

57
export default {
68
key: "speechace-score-scripted-recording",
@@ -66,6 +68,9 @@ export default {
6668
data,
6769
headers: data.getHeaders(),
6870
});
71+
if (response.status === "error") {
72+
throw new ConfigurationError(response.detail_message);
73+
}
6974
$.export("$summary", `Scored scripted recording for audio file: ${this.filePath}`);
7075
return response;
7176
},

components/speechace/actions/transcribe-and-score-recording/transcribe-and-score-recording.mjs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import speechace from "../../speechace.app.mjs";
22
import FormData from "form-data";
3-
import { getFileStreamAndMetadata } from "@pipedream/platform";
3+
import {
4+
getFileStreamAndMetadata, ConfigurationError,
5+
} from "@pipedream/platform";
46

57
export default {
68
key: "speechace-transcribe-and-score-recording",
@@ -58,6 +60,9 @@ export default {
5860
data,
5961
headers: data.getHeaders(),
6062
});
63+
if (response.status === "error") {
64+
throw new ConfigurationError(response.detail_message);
65+
}
6166
$.export("$summary", `Transcription and scoring completed for audio file: ${this.filePath}`);
6267
return response;
6368
},

components/spotlightr/actions/create-video/create-video.mjs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,7 @@ export default {
108108
...preparedData,
109109
});
110110

111-
$.export("$summary", `A new video with ${response.data
112-
? `URL: ${response.data}`
113-
: `Id: ${response}`} was successfully created!`);
111+
$.export("$summary", "New video successfully created!");
114112
return response.data || response;
115113
},
116114
};

components/testmonitor/actions/create-test-result/create-test-result.mjs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import testmonitor from "../../testmonitor.app.mjs";
88
export default {
99
key: "testmonitor-create-test-result",
1010
name: "Create Test Result",
11-
description: "Create a new test result. [See the docs here](https://docs.testmonitor.com/#tag/Test-Results/operation/PostTestResult)",
11+
description: "Create a new test result. [See the documentation](https://docs.testmonitor.com/#tag/Test-Results/operation/PostTestResult)",
1212
version: "0.0.2",
1313
type: "action",
1414
props: {
@@ -32,8 +32,11 @@ export default {
3232
propDefinition: [
3333
testmonitor,
3434
"testRunId",
35-
({ projectId }) => ({
35+
({
36+
projectId, testCaseId,
37+
}) => ({
3638
projectId,
39+
testCaseId,
3740
}),
3841
],
3942
},

components/testmonitor/testmonitor.app.mjs

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,22 @@ export default {
8080
label: "Test Run Id",
8181
description: "The test run identifier where this test result belongs to.",
8282
async options({
83-
page, projectId,
83+
page, projectId, testCaseId,
8484
}) {
85-
const { data } = await this.getTestRuns({
86-
page: page + 1,
87-
params: {
88-
project_id: projectId,
89-
},
90-
});
91-
return data.map(({
85+
let response;
86+
if (testCaseId) {
87+
response = await this.getTestRunsForTestCase({
88+
testCaseId,
89+
});
90+
} else {
91+
response = await this.getTestRuns({
92+
page: page + 1,
93+
params: {
94+
project_id: projectId,
95+
},
96+
});
97+
}
98+
return response.data.map(({
9299
id: value, name: label,
93100
}) => ({
94101
label,
@@ -208,6 +215,14 @@ export default {
208215
...opts,
209216
});
210217
},
218+
getTestRunsForTestCase({
219+
testCaseId, ...opts
220+
}) {
221+
return this._makeRequest({
222+
path: `test-case/${testCaseId}/test-runs`,
223+
...opts,
224+
});
225+
},
211226
getIssue({
212227
issueId, ...opts
213228
}) {

components/timetonic/actions/common/create-update-row.mjs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export default {
3838
for (const field of fields) {
3939
if (!field?.readOnly) {
4040
const id = `${field.id}`;
41-
props[id] = {
41+
props[`id_${id}`] = {
4242
type: constants.FIELD_TYPES[field.type] || "string",
4343
label: field.name,
4444
optional: this.isUpdate()
@@ -58,8 +58,8 @@ export default {
5858
value: `${id}`,
5959
label,
6060
})) || [];
61-
props[id].options = options;
62-
props[id].description = "The Row ID from the linked table to create a link to";
61+
props[`id_${id}`].options = options;
62+
props[`id_${id}`].description = "The Row ID from the linked table to create a link to";
6363
tableRows.forEach(({
6464
id: rowId, name,
6565
}) => {
@@ -71,7 +71,8 @@ export default {
7171
});
7272
}
7373
if (field.type === "file" || field.type === "files") {
74-
props[id].description = "Provide either a file URL or a path to a file in the /tmp directory (for example, /tmp/myFile.pdf).";
74+
props[`id_${id}`].type = "string[]";
75+
props[`id_${id}`].description = "Provide either a file URL or a path to a file in the /tmp directory (for example, /tmp/myFile.pdf).";
7576
props[`${id}_is_file`] = {
7677
type: "boolean",
7778
default: true,
@@ -128,21 +129,22 @@ export default {
128129
key,
129130
value,
130131
] of Object.entries(fields)) {
132+
const id = parseInt(key.split("_")[1], 10);
131133
if (key.includes("link_text") || key.includes("is_file")) {
132134
continue;
133135
}
134-
if (fields[`${key}_is_file`]) {
136+
if (fields[`${id}_is_file`]) {
135137
files.push({
136-
fieldId: key,
138+
fieldId: id,
137139
filePath: value,
138140
});
139141
continue;
140142
}
141-
fieldValues[+key] = fields[`${key}_${value}_link_text`]
143+
fieldValues[id] = fields[`${id}_${value}_link_text`]
142144
? [
143145
{
144146
row_id: +value,
145-
value: fields[`${key}_${value}_link_text`],
147+
value: fields[`${id}_${value}_link_text`],
146148
},
147149
]
148150
: value;

components/trello/actions/create-card/create-card.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ export default {
100100
app,
101101
"mimeType",
102102
],
103+
optional: true,
103104
},
104105
idCardSource: {
105106
propDefinition: [
@@ -246,7 +247,7 @@ export default {
246247
const {
247248
stream, metadata,
248249
} = await getFileStreamAndMetadata(file);
249-
form.append("file", stream, {
250+
form.append("fileSource", stream, {
250251
contentType: metadata.contentType,
251252
knownLength: metadata.size,
252253
filename: metadata.name,

components/zoho_workdrive/actions/upload-file/upload-file.mjs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,10 @@ export default {
6565
const override = this.overrideNameExist?.toString();
6666

6767
data.append("parent_id", this.parentId);
68-
if (this.filename)data.append("filename", this.filename);
69-
if (override)data.append("override-name-exist", override);
68+
if (this.filename) data.append("filename", this.filename);
69+
if (override) data.append("override-name-exist", override);
7070

7171
const response = await this.app.uploadFile({
72-
$,
7372
data,
7473
headers: {
7574
"Content-Type": `multipart/form-data; boundary=${data._boundary}`,

0 commit comments

Comments
 (0)