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
2 changes: 1 addition & 1 deletion components/frontapp/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/frontapp",
"version": "0.8.1",
"version": "0.8.2",
"description": "Pipedream Frontapp Components",
"main": "frontapp.app.mjs",
"keywords": [
Expand Down
8 changes: 6 additions & 2 deletions components/frontapp/sources/common/base.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,17 @@ export default {
if (filterFn) {
responseArray.sort((a, b) => b.created_at - a.created_at);
}
this._setLastTs(this._getEmit(responseArray[0]).ts);
this._setLastTs(this._getEmit(responseArray[0])?.ts ?? 0);
}

for (const item of responseArray.reverse()) {
const emit = this._getEmit(item);
if (!emit) {
continue;
}
this.$emit(
item,
this._getEmit(item),
emit,
);
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
key: "frontapp-new-conversation-created",
name: "New Conversation Created",
description: "Emit new event when a conversation is created. [See the documentation](https://dev.frontapp.com/reference/list-conversations)",
version: "0.0.3",
version: "0.0.4",
type: "source",
dedupe: "unique",
methods: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default {
key: "frontapp-new-conversation-state-change",
name: "New Conversation State Change",
description: "Emit new event when a conversation reaches a specific state. [See the documentation](https://dev.frontapp.com/reference/list-events)",
version: "0.0.5",
version: "0.0.6",
type: "source",
dedupe: "unique",
props: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
key: "frontapp-new-conversation-tag",
name: "New Conversation Tag",
description: "Emit new event when a conversation is tagged with a specific tag or any tag. [See the documentation](https://dev.frontapp.com/reference/events)",
version: "0.0.5",
version: "0.0.6",
type: "source",
dedupe: "unique",
props: {
Expand All @@ -24,9 +24,8 @@ export default {
_getFunction() {
return this.frontapp.listEvents;
},
_getParams(lastTs) {
_getParams() {
return {
"q[after]": lastTs,
"q[types]": [
"tag",
],
Expand All @@ -39,11 +38,19 @@ export default {
if (item.type === "tag" && tagIdsArray.includes(item.target?.data?.id)) {
return {
id: item.id,
summary: `New conversation with id: "${item.id}" was tagged as '${item.target?.data?.name}'!`,
ts: Date.parse(item.created_at),
summary: `Conversation with ID: "${item.id}" was tagged as '${item.target?.data?.name}'!`,
ts: (Math.floor(item.emitted_at / 1000)) * 1000,
};
}
},
},
hooks: {
async deploy() {
await this.startEvent(10, (item, lastTs) => item.emitted_at > lastTs);
},
},
async run() {
await this.startEvent(0, (item, lastTs) => item.emitted_at > lastTs);
},
sampleEmit,
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
key: "frontapp-new-message-template-created",
name: "New Message Template Created",
description: "Emit new event when a message template is created. [See the documentation](https://dev.frontapp.com/reference/list-message-templates)",
version: "0.0.3",
version: "0.0.4",
type: "source",
dedupe: "unique",
methods: {
Expand Down
Loading