Skip to content

Commit 2732b0e

Browse files
authored
Merge branch 'master' into configure-filesync-for-zohocrm
2 parents 4a664e6 + d001247 commit 2732b0e

File tree

251 files changed

+2280
-989
lines changed

Some content is hidden

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

251 files changed

+2280
-989
lines changed

components/akeneo/actions/create-a-new-product-media-file/create-a-new-product-media-file.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import FormData from "form-data";
77
export default {
88
type: "action",
99
key: "akeneo-create-a-new-product-media-file",
10-
version: "0.1.0",
10+
version: "0.1.1",
1111
name: "Create A New Product Media File",
1212
description: "Allows you to create a new media file and associate it to an attribute value of a given product or product model. [See the docs](https://api.akeneo.com/api-reference.html#post_media_files)",
1313
props: {

components/akeneo/akeneo.app.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export default {
5151
params: {
5252
limit: PAGE_SIZE,
5353
page,
54-
search: {
54+
search: JSON.stringify({
5555
type: [
5656
{
5757
operator: "IN",
@@ -60,7 +60,7 @@ export default {
6060
],
6161
},
6262
],
63-
},
63+
}),
6464
},
6565
});
6666
return resp?._embedded?.items?.map((attribute) => attribute.code) || [];

components/akeneo/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/akeneo",
3-
"version": "0.1.0",
3+
"version": "0.1.1",
44
"description": "Pipedream Akeneo Components",
55
"main": "akeneo.app.mjs",
66
"keywords": [

components/avosms/avosms.app.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ export default {
88
console.log(Object.keys(this.$auth));
99
},
1010
},
11-
};
11+
};
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: "tettra",
3+
app: "chattermill",
64
propDefinitions: {},
75
methods: {
86
// this.$auth contains connected account data
97
authKeys() {
108
console.log(Object.keys(this.$auth));
119
},
1210
},
13-
});
11+
};
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "@pipedream/chattermill",
3+
"version": "0.0.1",
4+
"description": "Pipedream Chattermill Components",
5+
"main": "chattermill.app.mjs",
6+
"keywords": [
7+
"pipedream",
8+
"chattermill"
9+
],
10+
"homepage": "https://pipedream.com/apps/chattermill",
11+
"author": "Pipedream <[email protected]> (https://pipedream.com/)",
12+
"publishConfig": {
13+
"access": "public"
14+
}
15+
}

components/deepsource/deepsource.app.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ export default {
88
console.log(Object.keys(this.$auth));
99
},
1010
},
11-
};
11+
};

components/discord_bot/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/discord_bot",
3-
"version": "0.6.1",
3+
"version": "0.6.2",
44
"description": "Pipedream Discord_bot Components",
55
"main": "discord_bot.app.mjs",
66
"keywords": [

components/discord_bot/sources/common.mjs renamed to components/discord_bot/sources/common/common.mjs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import common from "../common.mjs";
2-
import constants from "../common/constants.mjs";
1+
import common from "../../common.mjs";
2+
import constants from "../../common/constants.mjs";
33

44
export default {
55
...common,
@@ -17,5 +17,16 @@ export default {
1717
_setLastMemberID(memberID) {
1818
this.db.set(constants.LAST_MEMBER_ID, memberID);
1919
},
20+
_getBotId() {
21+
return this.db.get("botId");
22+
},
23+
_setBotId(botId) {
24+
this.db.set("botId", botId);
25+
},
26+
getBotProfile() {
27+
return this.discord._makeRequest({
28+
path: "/users/@me",
29+
});
30+
},
2031
},
2132
};

components/discord_bot/sources/new-forum-thread-message/new-forum-thread-message.mjs

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform";
22
import maxBy from "lodash.maxby";
33
import constants from "../../common/constants.mjs";
4-
import common from "../common.mjs";
4+
import common from "../common/common.mjs";
55
import sampleEmit from "./test-event.mjs";
66

77
export default {
@@ -10,7 +10,7 @@ export default {
1010
name: "New Forum Thread Message",
1111
description: "Emit new event for each forum thread message posted. Note that your bot must have the `MESSAGE_CONTENT` privilege intent to see the message content. [See the documentation](https://discord.com/developers/docs/topics/gateway#message-content-intent).",
1212
type: "source",
13-
version: "0.0.4",
13+
version: "0.0.5",
1414
dedupe: "unique", // Dedupe events based on the Discord message ID
1515
props: {
1616
...common.props,
@@ -35,6 +35,20 @@ export default {
3535
label: "Forum Id",
3636
description: "Select the forum you want to watch.",
3737
},
38+
ignoreBotMessages: {
39+
type: "boolean",
40+
label: "Ignore Bot Messages",
41+
description: "Set to `true` to only emit messages NOT from the configured Discord bot",
42+
optional: true,
43+
},
44+
},
45+
hooks: {
46+
async deploy() {
47+
if (this.ignoreBotMessages) {
48+
const { id } = await this.getBotProfile();
49+
this._setBotId(id);
50+
}
51+
},
3852
},
3953
methods: {
4054
...common.methods,
@@ -47,6 +61,9 @@ export default {
4761
async run({ $ }) {
4862
// We store a cursor to the last message ID
4963
let lastMessageIDs = this._getLastMessageIDs();
64+
const botId = this.ignoreBotMessages
65+
? this._getBotId()
66+
: null;
5067

5168
const { threads } = await this.discord.listThreads({
5269
$,
@@ -113,6 +130,10 @@ export default {
113130
continue;
114131
}
115132

133+
if (botId) {
134+
messages = messages.filter((message) => message.author.id !== botId);
135+
}
136+
116137
console.log(`${messages.length} new messages in thread ${channelId}`);
117138

118139
messages = await Promise.all(messages.map(async (message) => ({

0 commit comments

Comments
 (0)