@activepieces/piece-slack 0.10.2 → 0.10.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +9 -8
- package/src/i18n/de.json +2 -0
- package/src/i18n/es.json +2 -0
- package/src/i18n/fr.json +2 -0
- package/src/i18n/ja.json +2 -0
- package/src/i18n/nl.json +2 -0
- package/src/i18n/pt.json +2 -0
- package/src/i18n/translation.json +2 -0
- package/src/i18n/zh.json +2 -0
- package/src/lib/actions/send-message-action.d.ts +1 -0
- package/src/lib/actions/send-message-action.js +8 -1
- package/src/lib/actions/send-message-action.js.map +1 -1
- package/src/lib/common/utils.d.ts +2 -1
- package/src/lib/common/utils.js +7 -3
- package/src/lib/common/utils.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@activepieces/piece-slack",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.4",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@ai-sdk/anthropic": "
|
|
6
|
-
"@ai-sdk/google": "
|
|
7
|
-
"@ai-sdk/openai": "
|
|
8
|
-
"@ai-sdk/
|
|
5
|
+
"@ai-sdk/anthropic": "2.0.3",
|
|
6
|
+
"@ai-sdk/google": "2.0.6",
|
|
7
|
+
"@ai-sdk/openai": "2.0.12",
|
|
8
|
+
"@ai-sdk/provider": "2.0.0",
|
|
9
|
+
"@ai-sdk/replicate": "1.0.3",
|
|
9
10
|
"@sinclair/typebox": "0.34.11",
|
|
10
11
|
"@slack/web-api": "7.9.0",
|
|
11
|
-
"ai": "
|
|
12
|
+
"ai": "5.0.12",
|
|
12
13
|
"axios": "1.8.3",
|
|
13
14
|
"axios-retry": "4.4.1",
|
|
14
15
|
"deepmerge-ts": "7.1.0",
|
|
@@ -18,9 +19,9 @@
|
|
|
18
19
|
"semver": "7.6.0",
|
|
19
20
|
"slackify-markdown": "4.4.0",
|
|
20
21
|
"zod": "3.25.76",
|
|
21
|
-
"@activepieces/pieces-common": "0.6.
|
|
22
|
+
"@activepieces/pieces-common": "0.6.7",
|
|
22
23
|
"@activepieces/pieces-framework": "0.18.3",
|
|
23
|
-
"@activepieces/shared": "0.18.
|
|
24
|
+
"@activepieces/shared": "0.18.5",
|
|
24
25
|
"tslib": "2.8.1"
|
|
25
26
|
},
|
|
26
27
|
"overrides": {
|
package/src/i18n/de.json
CHANGED
|
@@ -89,6 +89,7 @@
|
|
|
89
89
|
"Headers": "Kopfzeilen",
|
|
90
90
|
"Query Parameters": "Abfrageparameter",
|
|
91
91
|
"Body": "Körper",
|
|
92
|
+
"Response is Binary ?": "Antwort ist binär?",
|
|
92
93
|
"No Error on Failure": "Kein Fehler bei Fehler",
|
|
93
94
|
"Timeout (in seconds)": "Timeout (in Sekunden)",
|
|
94
95
|
"Use user token": "Benutzer-Token verwenden",
|
|
@@ -116,6 +117,7 @@
|
|
|
116
117
|
"Provide the ts (timestamp) value of the **parent** message to retrieve replies of this message. Do not use the ts value of the reply itself; use its parent instead. For example `1710304378.475129`.Alternatively, you can easily obtain the message link by clicking on the three dots next to the parent message and selecting the `Copy link` option.": "Geben Sie den ts (Zeitstempel) Wert der **Eltern** Nachricht an, um Antworten dieser Nachricht zu erhalten. Verwenden Sie nicht den ts Wert der Antwort selbst; verwenden Sie stattdessen den übergeordneten Wert. Zum Beispiel `1710304378.475129`. lternativ kannst du einfach den Nachrichtenlink erhalten, indem du auf die drei Punkte neben der übergeordneten Nachricht klickst und die Option `Link kopieren` auswählst.",
|
|
117
118
|
"Please provide the timestamp of the message you wish to retrieve, such as `1710304378.475129`. Alternatively, you can easily obtain the message link by clicking on the three dots next to the message and selecting the `Copy link` option.": "Bitte geben Sie den Zeitstempel der Nachricht an, die Sie abrufen möchten, wie zum Beispiel `1710304378.475129`. Alternativ kannst du einfach den Nachrichtenlink erhalten, indem du auf die drei Punkte neben der Nachricht klickst und die Option `Link kopieren` auswählst.",
|
|
118
119
|
"Authorization headers are injected automatically from your connection.": "Autorisierungs-Header werden automatisch von Ihrer Verbindung injiziert.",
|
|
120
|
+
"Enable for files like PDFs, images, etc..": "Aktivieren für Dateien wie PDFs, Bilder, etc..",
|
|
119
121
|
"Use user token instead of bot token": "Benutzer-Token statt Bot-Token verwenden",
|
|
120
122
|
"GET": "ERHALTEN",
|
|
121
123
|
"POST": "POST",
|
package/src/i18n/es.json
CHANGED
|
@@ -89,6 +89,7 @@
|
|
|
89
89
|
"Headers": "Encabezados",
|
|
90
90
|
"Query Parameters": "Parámetros de consulta",
|
|
91
91
|
"Body": "Cuerpo",
|
|
92
|
+
"Response is Binary ?": "¿Respuesta es binaria?",
|
|
92
93
|
"No Error on Failure": "No hay ningún error en fallo",
|
|
93
94
|
"Timeout (in seconds)": "Tiempo de espera (en segundos)",
|
|
94
95
|
"Use user token": "Usar token de usuario",
|
|
@@ -116,6 +117,7 @@
|
|
|
116
117
|
"Provide the ts (timestamp) value of the **parent** message to retrieve replies of this message. Do not use the ts value of the reply itself; use its parent instead. For example `1710304378.475129`.Alternatively, you can easily obtain the message link by clicking on the three dots next to the parent message and selecting the `Copy link` option.": "Proporciona el valor ts (timestamp) del mensaje **padre** para recuperar las respuestas de este mensaje. No utilice el valor ts de la respuesta en sí misma; utilice su padre en su lugar. Por ejemplo `1710304378.475129`. lternativamente, puede obtener fácilmente el enlace del mensaje haciendo clic en los tres puntos junto al mensaje padre y seleccionando la opción `Copy link`.",
|
|
117
118
|
"Please provide the timestamp of the message you wish to retrieve, such as `1710304378.475129`. Alternatively, you can easily obtain the message link by clicking on the three dots next to the message and selecting the `Copy link` option.": "Por favor proporcione la marca de tiempo del mensaje que desea recuperar, como `1710304378.475129`. Alternativamente, puede obtener fácilmente el enlace del mensaje haciendo clic en los tres puntos junto al mensaje y seleccionando la opción `Copy link`.",
|
|
118
119
|
"Authorization headers are injected automatically from your connection.": "Las cabeceras de autorización se inyectan automáticamente desde tu conexión.",
|
|
120
|
+
"Enable for files like PDFs, images, etc..": "Activar para archivos como PDFs, imágenes, etc.",
|
|
119
121
|
"Use user token instead of bot token": "Usar token de usuario en lugar del token de bot",
|
|
120
122
|
"GET": "RECOGER",
|
|
121
123
|
"POST": "POST",
|
package/src/i18n/fr.json
CHANGED
|
@@ -89,6 +89,7 @@
|
|
|
89
89
|
"Headers": "En-têtes",
|
|
90
90
|
"Query Parameters": "Paramètres de requête",
|
|
91
91
|
"Body": "Corps",
|
|
92
|
+
"Response is Binary ?": "La réponse est Binaire ?",
|
|
92
93
|
"No Error on Failure": "Aucune erreur en cas d'échec",
|
|
93
94
|
"Timeout (in seconds)": "Délai d'attente (en secondes)",
|
|
94
95
|
"Use user token": "Utiliser le jeton utilisateur",
|
|
@@ -116,6 +117,7 @@
|
|
|
116
117
|
"Provide the ts (timestamp) value of the **parent** message to retrieve replies of this message. Do not use the ts value of the reply itself; use its parent instead. For example `1710304378.475129`.Alternatively, you can easily obtain the message link by clicking on the three dots next to the parent message and selecting the `Copy link` option.": "Fournir la valeur ts (horodatage) du message **parent** pour récupérer les réponses de ce message. N'utilisez pas la valeur ts de la réponse elle-même; utilisez son parent à la place. Par exemple `1710304378.475129`. lternativement, vous pouvez facilement obtenir le lien de message en cliquant sur les trois points à côté du message parent et en sélectionnant l'option `Copier le lien`.",
|
|
117
118
|
"Please provide the timestamp of the message you wish to retrieve, such as `1710304378.475129`. Alternatively, you can easily obtain the message link by clicking on the three dots next to the message and selecting the `Copy link` option.": "Veuillez fournir l'horodatage du message que vous souhaitez récupérer, tel que `1710304378.475129`. Alternativement, vous pouvez facilement obtenir le lien du message en cliquant sur les trois points à côté du message et en sélectionnant l'option `Copier le lien`.",
|
|
118
119
|
"Authorization headers are injected automatically from your connection.": "Les en-têtes d'autorisation sont injectés automatiquement à partir de votre connexion.",
|
|
120
|
+
"Enable for files like PDFs, images, etc..": "Activer pour les fichiers comme les PDFs, les images, etc.",
|
|
119
121
|
"Use user token instead of bot token": "Utiliser le jeton utilisateur au lieu du jeton de bot",
|
|
120
122
|
"GET": "OBTENIR",
|
|
121
123
|
"POST": "POSTER",
|
package/src/i18n/ja.json
CHANGED
|
@@ -89,6 +89,7 @@
|
|
|
89
89
|
"Headers": "ヘッダー",
|
|
90
90
|
"Query Parameters": "クエリパラメータ",
|
|
91
91
|
"Body": "本文",
|
|
92
|
+
"Response is Binary ?": "応答はバイナリですか?",
|
|
92
93
|
"No Error on Failure": "失敗時にエラーはありません",
|
|
93
94
|
"Timeout (in seconds)": "タイムアウト(秒)",
|
|
94
95
|
"Use user token": "ユーザートークンを使用する",
|
|
@@ -116,6 +117,7 @@
|
|
|
116
117
|
"Provide the ts (timestamp) value of the **parent** message to retrieve replies of this message. Do not use the ts value of the reply itself; use its parent instead. For example `1710304378.475129`.Alternatively, you can easily obtain the message link by clicking on the three dots next to the parent message and selecting the `Copy link` option.": "このメッセージの返信を取得するために、**親** メッセージの ts (timestamp) 値を入力します。 返信自体のts値を使用しないでください。代わりに親を使用してください。 たとえば、`1710304378.475129` です。 親メッセージの横にある3つの点をクリックし、 `Copy link` オプションを選択することで、メッセージのリンクを簡単に取得できます。",
|
|
117
118
|
"Please provide the timestamp of the message you wish to retrieve, such as `1710304378.475129`. Alternatively, you can easily obtain the message link by clicking on the three dots next to the message and selecting the `Copy link` option.": "`1710304378.475129` など、取得したいメッセージのタイムスタンプを入力してください。 あるいは、メッセージの隣にある3つの点をクリックして、 `Copy link` オプションを選択することで、メッセージのリンクを簡単に取得できます。",
|
|
118
119
|
"Authorization headers are injected automatically from your connection.": "認証ヘッダは接続から自動的に注入されます。",
|
|
120
|
+
"Enable for files like PDFs, images, etc..": "PDF、画像などのファイルを有効にします。",
|
|
119
121
|
"Use user token instead of bot token": "ボットトークンの代わりにユーザートークンを使用する",
|
|
120
122
|
"GET": "取得",
|
|
121
123
|
"POST": "POST",
|
package/src/i18n/nl.json
CHANGED
|
@@ -89,6 +89,7 @@
|
|
|
89
89
|
"Headers": "Kopteksten",
|
|
90
90
|
"Query Parameters": "Query parameters",
|
|
91
91
|
"Body": "Lichaam",
|
|
92
|
+
"Response is Binary ?": "Antwoord is binair?",
|
|
92
93
|
"No Error on Failure": "Geen fout bij fout",
|
|
93
94
|
"Timeout (in seconds)": "Time-out (in seconden)",
|
|
94
95
|
"Use user token": "Gebruik gebruikerstoken",
|
|
@@ -116,6 +117,7 @@
|
|
|
116
117
|
"Provide the ts (timestamp) value of the **parent** message to retrieve replies of this message. Do not use the ts value of the reply itself; use its parent instead. For example `1710304378.475129`.Alternatively, you can easily obtain the message link by clicking on the three dots next to the parent message and selecting the `Copy link` option.": "Geef de ts (timestamp) waarde op van het **ouder** bericht om antwoorden van dit bericht op te halen. Gebruik niet de ts waarde van het antwoord zelf; gebruik in plaats daarvan het bovenliggende. Bijvoorbeeld `1710304378.475129`. vanzelfsprekend, je kunt gemakkelijk de berichtlink verkrijgen door op de drie punten naast het bovenliggende bericht te klikken en de optie 'Koppeling kopiëren' te selecteren.",
|
|
117
118
|
"Please provide the timestamp of the message you wish to retrieve, such as `1710304378.475129`. Alternatively, you can easily obtain the message link by clicking on the three dots next to the message and selecting the `Copy link` option.": "Geef de tijdstempel van het bericht dat je wilt ophalen, zoals `1710304378.475129`. U kunt ook gemakkelijk de berichtkoppeling verkrijgen door op de drie punten naast het bericht te klikken en de optie 'Koppeling kopiëren' te selecteren.",
|
|
118
119
|
"Authorization headers are injected automatically from your connection.": "Autorisatie headers worden automatisch geïnjecteerd vanuit uw verbinding.",
|
|
120
|
+
"Enable for files like PDFs, images, etc..": "Inschakelen voor bestanden zoals PDF's, afbeeldingen etc..",
|
|
119
121
|
"Use user token instead of bot token": "Gebruik gebruikerstoken in plaats van bot token",
|
|
120
122
|
"GET": "KRIJG",
|
|
121
123
|
"POST": "POSTE",
|
package/src/i18n/pt.json
CHANGED
|
@@ -89,6 +89,7 @@
|
|
|
89
89
|
"Headers": "Cabeçalhos",
|
|
90
90
|
"Query Parameters": "Parâmetros da consulta",
|
|
91
91
|
"Body": "Conteúdo",
|
|
92
|
+
"Response is Binary ?": "A resposta é binária ?",
|
|
92
93
|
"No Error on Failure": "Nenhum erro no Failure",
|
|
93
94
|
"Timeout (in seconds)": "Tempo limite (em segundos)",
|
|
94
95
|
"Use user token": "Usar token de usuário",
|
|
@@ -116,6 +117,7 @@
|
|
|
116
117
|
"Provide the ts (timestamp) value of the **parent** message to retrieve replies of this message. Do not use the ts value of the reply itself; use its parent instead. For example `1710304378.475129`.Alternatively, you can easily obtain the message link by clicking on the three dots next to the parent message and selecting the `Copy link` option.": "Indique o valor ts (timestamp) da mensagem **pai** para recuperar as respostas desta mensagem. Não use o valor de ts da própria resposta; use seu pai. Por exemplo, `1710304378.475129`. lternativamente, você pode facilmente obter o link da mensagem clicando nos três pontos ao lado da mensagem principal e selecionando a opção `Copiar link`.",
|
|
117
118
|
"Please provide the timestamp of the message you wish to retrieve, such as `1710304378.475129`. Alternatively, you can easily obtain the message link by clicking on the three dots next to the message and selecting the `Copy link` option.": "Por favor, forneça o carimbo de data da mensagem que você deseja recuperar, como `1710304378.475129`. Como alternativa, você pode facilmente obter o link da mensagem clicando nos três pontos ao lado da mensagem e selecionando a opção `Copiar link`.",
|
|
118
119
|
"Authorization headers are injected automatically from your connection.": "Os cabeçalhos de autorização são inseridos automaticamente a partir da sua conexão.",
|
|
120
|
+
"Enable for files like PDFs, images, etc..": "Habilitar para arquivos como PDFs, imagens, etc..",
|
|
119
121
|
"Use user token instead of bot token": "Usar token de usuário em vez do token de bot",
|
|
120
122
|
"GET": "OBTER",
|
|
121
123
|
"POST": "POSTAR",
|
|
@@ -89,6 +89,7 @@
|
|
|
89
89
|
"Headers": "Headers",
|
|
90
90
|
"Query Parameters": "Query Parameters",
|
|
91
91
|
"Body": "Body",
|
|
92
|
+
"Response is Binary ?": "Response is Binary ?",
|
|
92
93
|
"No Error on Failure": "No Error on Failure",
|
|
93
94
|
"Timeout (in seconds)": "Timeout (in seconds)",
|
|
94
95
|
"Use user token": "Use user token",
|
|
@@ -116,6 +117,7 @@
|
|
|
116
117
|
"Provide the ts (timestamp) value of the **parent** message to retrieve replies of this message. Do not use the ts value of the reply itself; use its parent instead. For example `1710304378.475129`.Alternatively, you can easily obtain the message link by clicking on the three dots next to the parent message and selecting the `Copy link` option.": "Provide the ts (timestamp) value of the **parent** message to retrieve replies of this message. Do not use the ts value of the reply itself; use its parent instead. For example `1710304378.475129`.Alternatively, you can easily obtain the message link by clicking on the three dots next to the parent message and selecting the `Copy link` option.",
|
|
117
118
|
"Please provide the timestamp of the message you wish to retrieve, such as `1710304378.475129`. Alternatively, you can easily obtain the message link by clicking on the three dots next to the message and selecting the `Copy link` option.": "Please provide the timestamp of the message you wish to retrieve, such as `1710304378.475129`. Alternatively, you can easily obtain the message link by clicking on the three dots next to the message and selecting the `Copy link` option.",
|
|
118
119
|
"Authorization headers are injected automatically from your connection.": "Authorization headers are injected automatically from your connection.",
|
|
120
|
+
"Enable for files like PDFs, images, etc..": "Enable for files like PDFs, images, etc..",
|
|
119
121
|
"Use user token instead of bot token": "Use user token instead of bot token",
|
|
120
122
|
"GET": "GET",
|
|
121
123
|
"POST": "POST",
|
package/src/i18n/zh.json
CHANGED
|
@@ -89,6 +89,7 @@
|
|
|
89
89
|
"Headers": "信頭",
|
|
90
90
|
"Query Parameters": "查詢參數",
|
|
91
91
|
"Body": "正文內容",
|
|
92
|
+
"Response is Binary ?": "Response is Binary ?",
|
|
92
93
|
"No Error on Failure": "失敗時沒有錯誤",
|
|
93
94
|
"Timeout (in seconds)": "超時(秒)",
|
|
94
95
|
"Use user token": "使用用戶令牌",
|
|
@@ -116,6 +117,7 @@
|
|
|
116
117
|
"Provide the ts (timestamp) value of the **parent** message to retrieve replies of this message. Do not use the ts value of the reply itself; use its parent instead. For example `1710304378.475129`.Alternatively, you can easily obtain the message link by clicking on the three dots next to the parent message and selecting the `Copy link` option.": "提供**父**消息的 ts (時間戳) 值以檢索這個消息的回覆。不要使用回覆本身的 ts 值;請使用其父值。例如 `1710304378.475129`。或者,您可以通過單擊父消息旁邊的三個點並選擇 `複製鏈接` 選項來輕鬆獲取消息鏈接。",
|
|
117
118
|
"Please provide the timestamp of the message you wish to retrieve, such as `1710304378.475129`. Alternatively, you can easily obtain the message link by clicking on the three dots next to the message and selecting the `Copy link` option.": "請提供您希望檢索的消息的時間戳,例如 `1710304378.475129`。或者,您可以通過單擊消息旁邊的三個點並選擇 `複製鏈接` 選項來輕鬆獲取消息鏈接。",
|
|
118
119
|
"Authorization headers are injected automatically from your connection.": "授權頭自動從您的連接中注入。",
|
|
120
|
+
"Enable for files like PDFs, images, etc..": "Enable for files like PDFs, images, etc..",
|
|
119
121
|
"Use user token instead of bot token": "使用用戶令牌而不是機器人令牌",
|
|
120
122
|
"GET": "GET",
|
|
121
123
|
"POST": "POST",
|
|
@@ -6,5 +6,6 @@ export declare const slackSendMessageAction: import("@activepieces/pieces-framew
|
|
|
6
6
|
profilePicture: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
7
7
|
file: import("@activepieces/pieces-framework").FileProperty<false>;
|
|
8
8
|
threadTs: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
9
|
+
replyBroadcast: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
9
10
|
blocks: import("@activepieces/pieces-framework").JsonProperty<false>;
|
|
10
11
|
}>;
|
|
@@ -26,12 +26,18 @@ exports.slackSendMessageAction = (0, pieces_framework_1.createAction)({
|
|
|
26
26
|
required: false,
|
|
27
27
|
}),
|
|
28
28
|
threadTs: props_1.threadTs,
|
|
29
|
+
replyBroadcast: pieces_framework_1.Property.Checkbox({
|
|
30
|
+
displayName: 'Broadcast reply to channel',
|
|
31
|
+
description: 'When replying to a thread, also make the message visible to everyone in the channel (only applicable when Thread Timestamp is provided)',
|
|
32
|
+
required: false,
|
|
33
|
+
defaultValue: false,
|
|
34
|
+
}),
|
|
29
35
|
blocks: props_1.blocks,
|
|
30
36
|
},
|
|
31
37
|
run(context) {
|
|
32
38
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
33
39
|
const token = context.auth.access_token;
|
|
34
|
-
const { text, channel, username, profilePicture, threadTs, file, blocks } = context.propsValue;
|
|
40
|
+
const { text, channel, username, profilePicture, threadTs, file, blocks, replyBroadcast } = context.propsValue;
|
|
35
41
|
const blockList = blocks ? [{ type: 'section', text: { type: 'mrkdwn', text } }, ...blocks] : undefined;
|
|
36
42
|
return (0, utils_1.slackSendMessage)({
|
|
37
43
|
token,
|
|
@@ -42,6 +48,7 @@ exports.slackSendMessageAction = (0, pieces_framework_1.createAction)({
|
|
|
42
48
|
threadTs: threadTs ? (0, utils_1.processMessageTimestamp)(threadTs) : undefined,
|
|
43
49
|
file,
|
|
44
50
|
blocks: blockList,
|
|
51
|
+
replyBroadcast,
|
|
45
52
|
});
|
|
46
53
|
});
|
|
47
54
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"send-message-action.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/slack/src/lib/actions/send-message-action.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,2CAOyB;AACzB,2CAA4E;AAC5E,8BAAmC;AAItB,QAAA,sBAAsB,GAAG,IAAA,+BAAY,EAAC;IACjD,IAAI,EAAE,aAAS;IACf,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE,2BAA2B;IACxC,WAAW,EAAE,2BAA2B;IACxC,KAAK,EAAE;QACL,IAAI,EAAE,+BAAuB;QAC7B,OAAO,EAAE,IAAA,oBAAY,EAAC,IAAI,CAAC;QAC3B,IAAI,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACtB,WAAW,EAAE,SAAS;YACtB,WAAW,EAAE,0BAA0B;YACvC,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,QAAQ,EAAR,gBAAQ;QACR,cAAc,EAAd,sBAAc;QACd,IAAI,EAAE,2BAAQ,CAAC,IAAI,CAAC;YAClB,WAAW,EAAE,YAAY;YACzB,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,QAAQ,EAAR,gBAAQ;QACR,MAAM,EAAN,cAAM;KACP;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC;YACxC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,QAAQ,EAAE,IAAI,
|
|
1
|
+
{"version":3,"file":"send-message-action.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/slack/src/lib/actions/send-message-action.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,2CAOyB;AACzB,2CAA4E;AAC5E,8BAAmC;AAItB,QAAA,sBAAsB,GAAG,IAAA,+BAAY,EAAC;IACjD,IAAI,EAAE,aAAS;IACf,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE,2BAA2B;IACxC,WAAW,EAAE,2BAA2B;IACxC,KAAK,EAAE;QACL,IAAI,EAAE,+BAAuB;QAC7B,OAAO,EAAE,IAAA,oBAAY,EAAC,IAAI,CAAC;QAC3B,IAAI,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACtB,WAAW,EAAE,SAAS;YACtB,WAAW,EAAE,0BAA0B;YACvC,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,QAAQ,EAAR,gBAAQ;QACR,cAAc,EAAd,sBAAc;QACd,IAAI,EAAE,2BAAQ,CAAC,IAAI,CAAC;YAClB,WAAW,EAAE,YAAY;YACzB,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,QAAQ,EAAR,gBAAQ;QACR,cAAc,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAChC,WAAW,EAAE,4BAA4B;YACzC,WAAW,EAAE,yIAAyI;YACtJ,QAAQ,EAAE,KAAK;YACf,YAAY,EAAE,KAAK;SACpB,CAAC;QACF,MAAM,EAAN,cAAM;KACP;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC;YACxC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,cAAc,EAAE,GACvF,OAAO,CAAC,UAAU,CAAC;YAErB,MAAM,SAAS,GAAG,MAAM,CAAC,CAAC,CAAA,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,EAAE,GAAI,MAA4C,CAAC,CAAC,CAAC,CAAA,SAAS,CAAA;YAE5I,OAAO,IAAA,wBAAgB,EAAC;gBACtB,KAAK;gBACL,IAAI;gBACJ,QAAQ;gBACR,cAAc;gBACd,cAAc,EAAE,OAAO;gBACvB,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,IAAA,+BAAuB,EAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS;gBAClE,IAAI;gBACJ,MAAM,EAAE,SAAS;gBACjB,cAAc;aACf,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApFile } from '@activepieces/pieces-framework';
|
|
2
|
-
export declare const slackSendMessage: ({ text, conversationId, username, profilePicture, blocks, threadTs, token, file, }: SlackSendMessageParams) => Promise<import("@slack/web-api").WebAPICallResult>;
|
|
2
|
+
export declare const slackSendMessage: ({ text, conversationId, username, profilePicture, blocks, threadTs, token, file, replyBroadcast, }: SlackSendMessageParams) => Promise<import("@slack/web-api").WebAPICallResult>;
|
|
3
3
|
type SlackSendMessageParams = {
|
|
4
4
|
token: string;
|
|
5
5
|
conversationId: string;
|
|
@@ -9,6 +9,7 @@ type SlackSendMessageParams = {
|
|
|
9
9
|
text: string;
|
|
10
10
|
file?: ApFile;
|
|
11
11
|
threadTs?: string;
|
|
12
|
+
replyBroadcast?: boolean;
|
|
12
13
|
};
|
|
13
14
|
export declare function processMessageTimestamp(input: string): string | undefined;
|
|
14
15
|
export declare function getFirstFiveOrAll(array: unknown[]): unknown[];
|
package/src/lib/common/utils.js
CHANGED
|
@@ -6,7 +6,7 @@ exports.getFirstFiveOrAll = getFirstFiveOrAll;
|
|
|
6
6
|
exports.parseCommand = parseCommand;
|
|
7
7
|
const tslib_1 = require("tslib");
|
|
8
8
|
const web_api_1 = require("@slack/web-api");
|
|
9
|
-
const slackSendMessage = (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ text, conversationId, username, profilePicture, blocks, threadTs, token, file, }) {
|
|
9
|
+
const slackSendMessage = (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ text, conversationId, username, profilePicture, blocks, threadTs, token, file, replyBroadcast, }) {
|
|
10
10
|
const client = new web_api_1.WebClient(token);
|
|
11
11
|
if (file) {
|
|
12
12
|
return yield client.files.uploadV2({
|
|
@@ -22,14 +22,18 @@ const slackSendMessage = (_a) => tslib_1.__awaiter(void 0, [_a], void 0, functio
|
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
24
|
else {
|
|
25
|
-
|
|
25
|
+
const messageParams = {
|
|
26
26
|
text,
|
|
27
27
|
channel: conversationId,
|
|
28
28
|
username,
|
|
29
29
|
icon_url: profilePicture,
|
|
30
30
|
blocks: blocks,
|
|
31
31
|
thread_ts: threadTs,
|
|
32
|
-
}
|
|
32
|
+
};
|
|
33
|
+
if (replyBroadcast) {
|
|
34
|
+
messageParams.reply_broadcast = replyBroadcast;
|
|
35
|
+
}
|
|
36
|
+
return yield client.chat.postMessage(messageParams);
|
|
33
37
|
}
|
|
34
38
|
});
|
|
35
39
|
exports.slackSendMessage = slackSendMessage;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/slack/src/lib/common/utils.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/slack/src/lib/common/utils.ts"],"names":[],"mappings":";;;AA0DA,0DAk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