@scopieflows/app-gmail 0.11.0
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/README.md +7 -0
- package/package.json +32 -0
- package/src/i18n/ca.json +63 -0
- package/src/i18n/de.json +66 -0
- package/src/i18n/es.json +66 -0
- package/src/i18n/fr.json +66 -0
- package/src/i18n/hi.json +63 -0
- package/src/i18n/id.json +63 -0
- package/src/i18n/ja.json +66 -0
- package/src/i18n/nl.json +66 -0
- package/src/i18n/pt.json +66 -0
- package/src/i18n/ru.json +63 -0
- package/src/i18n/translation.json +66 -0
- package/src/i18n/vi.json +63 -0
- package/src/i18n/zh.json +66 -0
- package/src/index.d.ts +2 -0
- package/src/index.js +78 -0
- package/src/index.js.map +1 -0
- package/src/lib/actions/create-draft-reply-action.d.ts +10 -0
- package/src/lib/actions/create-draft-reply-action.js +262 -0
- package/src/lib/actions/create-draft-reply-action.js.map +1 -0
- package/src/lib/actions/get-mail-action.d.ts +3 -0
- package/src/lib/actions/get-mail-action.js +37 -0
- package/src/lib/actions/get-mail-action.js.map +1 -0
- package/src/lib/actions/get-thread-action.d.ts +5 -0
- package/src/lib/actions/get-thread-action.js +44 -0
- package/src/lib/actions/get-thread-action.js.map +1 -0
- package/src/lib/actions/reply-to-email-action.d.ts +9 -0
- package/src/lib/actions/reply-to-email-action.js +195 -0
- package/src/lib/actions/reply-to-email-action.js.map +1 -0
- package/src/lib/actions/request-approval-in-email.d.ts +11 -0
- package/src/lib/actions/request-approval-in-email.js +176 -0
- package/src/lib/actions/request-approval-in-email.js.map +1 -0
- package/src/lib/actions/search-email-action.d.ts +15 -0
- package/src/lib/actions/search-email-action.js +180 -0
- package/src/lib/actions/search-email-action.js.map +1 -0
- package/src/lib/actions/send-email-action.d.ts +14 -0
- package/src/lib/actions/send-email-action.js +191 -0
- package/src/lib/actions/send-email-action.js.map +1 -0
- package/src/lib/common/data.d.ts +131 -0
- package/src/lib/common/data.js +208 -0
- package/src/lib/common/data.js.map +1 -0
- package/src/lib/common/models.d.ts +85 -0
- package/src/lib/common/models.js +26 -0
- package/src/lib/common/models.js.map +1 -0
- package/src/lib/common/props.d.ts +11 -0
- package/src/lib/common/props.js +229 -0
- package/src/lib/common/props.js.map +1 -0
- package/src/lib/triggers/new-attachment.d.ts +171 -0
- package/src/lib/triggers/new-attachment.js +128 -0
- package/src/lib/triggers/new-attachment.js.map +1 -0
- package/src/lib/triggers/new-conversation.d.ts +46 -0
- package/src/lib/triggers/new-conversation.js +310 -0
- package/src/lib/triggers/new-conversation.js.map +1 -0
- package/src/lib/triggers/new-email.d.ts +27 -0
- package/src/lib/triggers/new-email.js +117 -0
- package/src/lib/triggers/new-email.js.map +1 -0
- package/src/lib/triggers/new-label.d.ts +2 -0
- package/src/lib/triggers/new-label.js +79 -0
- package/src/lib/triggers/new-label.js.map +1 -0
- package/src/lib/triggers/new-labeled-email.d.ts +62 -0
- package/src/lib/triggers/new-labeled-email.js +142 -0
- package/src/lib/triggers/new-labeled-email.js.map +1 -0
package/src/i18n/ru.json
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Gmail": "Gmail",
|
|
3
|
+
"Email service by Google": "Почтовый сервис от Google",
|
|
4
|
+
"Send Email": "Отправить письмо",
|
|
5
|
+
"Custom API Call": "Пользовательский вызов API",
|
|
6
|
+
"Send an email through a Gmail account": "Отправить письмо с помощью учетной записи Gmail",
|
|
7
|
+
"Make a custom API call to a specific endpoint": "Сделать пользовательский API вызов к определенной конечной точке",
|
|
8
|
+
"Receiver Email (To)": "Email получателя (для)",
|
|
9
|
+
"CC Email": "Копия E-mail",
|
|
10
|
+
"BCC Email": "Скрытая почта",
|
|
11
|
+
"Subject": "Тема",
|
|
12
|
+
"Body Type": "Тип тела",
|
|
13
|
+
"Body": "Тело",
|
|
14
|
+
"Reply-To Email": "Письмо для ответа",
|
|
15
|
+
"Sender Name": "Имя отправителя",
|
|
16
|
+
"Sender Email": "Email отправителя",
|
|
17
|
+
"Attachment": "Вложение",
|
|
18
|
+
"Attachment Name": "Название вложения",
|
|
19
|
+
"In reply to": "В ответ на",
|
|
20
|
+
"Create draft": "Создать черновик",
|
|
21
|
+
"Method": "Метод",
|
|
22
|
+
"Headers": "Заголовки",
|
|
23
|
+
"Query Parameters": "Параметры запроса",
|
|
24
|
+
"No Error on Failure": "Нет ошибок при ошибке",
|
|
25
|
+
"Timeout (in seconds)": "Таймаут (в секундах)",
|
|
26
|
+
"Body for the email you want to send": "Тело письма, которое вы хотите отправить",
|
|
27
|
+
"Email address to set as the \"Reply-To\" header": "Адрес электронной почты для указания заголовка \"Ответить-Кому\"",
|
|
28
|
+
"The address must be listed in your GMail account's settings": "Адрес должен быть указан в настройках учетной записи GMail",
|
|
29
|
+
"File to attach to the email you want to send": "Файл для прикрепления к электронной почте, которую вы хотите отправить",
|
|
30
|
+
"In case you want to change the name of the attachment": "В случае, если вы хотите изменить имя вложения",
|
|
31
|
+
"Reply to this Message-ID": "Ответить на это сообщение",
|
|
32
|
+
"Create draft without sending the actual email": "Создать черновик без отправки фактического письма",
|
|
33
|
+
"Authorization headers are injected automatically from your connection.": "Заголовки авторизации включаются автоматически из вашего соединения.",
|
|
34
|
+
"plain text": "простой текст",
|
|
35
|
+
"html": "html",
|
|
36
|
+
"GET": "ПОЛУЧИТЬ",
|
|
37
|
+
"POST": "ПОСТ",
|
|
38
|
+
"PATCH": "ПАТЧ",
|
|
39
|
+
"PUT": "ПОКУПИТЬ",
|
|
40
|
+
"DELETE": "УДАЛИТЬ",
|
|
41
|
+
"HEAD": "HEAD",
|
|
42
|
+
"New Email": "Новое письмо",
|
|
43
|
+
"New Labeled Email": "Новое письмо с меткой",
|
|
44
|
+
"Triggers when new mail is found in your Gmail inbox": "Включает при обнаружении нового письма в папке Gmail",
|
|
45
|
+
"Triggers when a label is added to an email": "Триггеры при добавлении метки к электронной почте",
|
|
46
|
+
"Email subject": "Тема письма",
|
|
47
|
+
"Email sender": "Отправитель письма",
|
|
48
|
+
"Email recipient": "Получатель электронной почты",
|
|
49
|
+
"Label": "Метка",
|
|
50
|
+
"Category": "Категория",
|
|
51
|
+
"The email subject": "Тема письма",
|
|
52
|
+
"Optional filteration, leave empty to filter based on the email sender": "Необязательная фильтрация, оставьте пустым для фильтрации по электронной почте",
|
|
53
|
+
"Optional filteration, leave empty to filter based on the email recipient": "Необязательный фильтр, оставьте пустым для фильтрации на основе email получателя",
|
|
54
|
+
"Optional filteration, leave unselected to filter based on the email label": "Необязательный фильтр, оставьте не выбранным для фильтрации на основе метки электронной почты",
|
|
55
|
+
"Optional filteration, leave unselected to filter based on the email category": "Необязательный фильтр, не выбран для фильтрации на основе категории электронной почты",
|
|
56
|
+
"Primary": "Первичный",
|
|
57
|
+
"Social": "Соцсети",
|
|
58
|
+
"Promotions": "Продвижение",
|
|
59
|
+
"Updates": "Обновления",
|
|
60
|
+
"Forums": "Форумы",
|
|
61
|
+
"Reservations": "Оговорки",
|
|
62
|
+
"Purchases": "Покупки"
|
|
63
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Email service by Google": "Email service by Google",
|
|
3
|
+
"Send Email": "Send Email",
|
|
4
|
+
"Custom API Call": "Custom API Call",
|
|
5
|
+
"Send an email through a Gmail account": "Send an email through a Gmail account",
|
|
6
|
+
"Make a custom API call to a specific endpoint": "Make a custom API call to a specific endpoint",
|
|
7
|
+
"Receiver Email (To)": "Receiver Email (To)",
|
|
8
|
+
"CC Email": "CC Email",
|
|
9
|
+
"BCC Email": "BCC Email",
|
|
10
|
+
"Subject": "Subject",
|
|
11
|
+
"Body Type": "Body Type",
|
|
12
|
+
"Body": "Body",
|
|
13
|
+
"Reply-To Email": "Reply-To Email",
|
|
14
|
+
"Sender Name": "Sender Name",
|
|
15
|
+
"Sender Email": "Sender Email",
|
|
16
|
+
"Attachments": "Attachments",
|
|
17
|
+
"In reply to": "In reply to",
|
|
18
|
+
"Create draft": "Create draft",
|
|
19
|
+
"Method": "Method",
|
|
20
|
+
"Headers": "Headers",
|
|
21
|
+
"Query Parameters": "Query Parameters",
|
|
22
|
+
"Response is Binary ?": "Response is Binary ?",
|
|
23
|
+
"No Error on Failure": "No Error on Failure",
|
|
24
|
+
"Timeout (in seconds)": "Timeout (in seconds)",
|
|
25
|
+
"Follow redirects": "Follow redirects",
|
|
26
|
+
"Body for the email you want to send": "Body for the email you want to send",
|
|
27
|
+
"Email address to set as the \"Reply-To\" header": "Email address to set as the \"Reply-To\" header",
|
|
28
|
+
"The address must be listed in your GMail account's settings": "The address must be listed in your GMail account's settings",
|
|
29
|
+
"Reply to this Message-ID": "Reply to this Message-ID",
|
|
30
|
+
"Create draft without sending the actual email": "Create draft without sending the actual email",
|
|
31
|
+
"Authorization headers are injected automatically from your connection.": "Authorization headers are injected automatically from your connection.",
|
|
32
|
+
"Enable for files like PDFs, images, etc.": "Enable for files like PDFs, images, etc.",
|
|
33
|
+
"plain text": "plain text",
|
|
34
|
+
"html": "html",
|
|
35
|
+
"GET": "GET",
|
|
36
|
+
"POST": "POST",
|
|
37
|
+
"PATCH": "PATCH",
|
|
38
|
+
"PUT": "PUT",
|
|
39
|
+
"DELETE": "DELETE",
|
|
40
|
+
"HEAD": "HEAD",
|
|
41
|
+
"None": "None",
|
|
42
|
+
"JSON": "JSON",
|
|
43
|
+
"Form Data": "Form Data",
|
|
44
|
+
"Raw": "Raw",
|
|
45
|
+
"New Email": "New Email",
|
|
46
|
+
"New Labeled Email": "New Labeled Email",
|
|
47
|
+
"Triggers when new mail is found in your Gmail inbox": "Triggers when new mail is found in your Gmail inbox",
|
|
48
|
+
"Triggers when a label is added to an email": "Triggers when a label is added to an email",
|
|
49
|
+
"Email subject": "Email subject",
|
|
50
|
+
"Email sender": "Email sender",
|
|
51
|
+
"Email recipient": "Email recipient",
|
|
52
|
+
"Label": "Label",
|
|
53
|
+
"Category": "Category",
|
|
54
|
+
"The email subject": "The email subject",
|
|
55
|
+
"Optional filteration, leave empty to filter based on the email sender": "Optional filteration, leave empty to filter based on the email sender",
|
|
56
|
+
"Optional filteration, leave empty to filter based on the email recipient": "Optional filteration, leave empty to filter based on the email recipient",
|
|
57
|
+
"Optional filteration, leave unselected to filter based on the email label": "Optional filteration, leave unselected to filter based on the email label",
|
|
58
|
+
"Optional filteration, leave unselected to filter based on the email category": "Optional filteration, leave unselected to filter based on the email category",
|
|
59
|
+
"Primary": "Primary",
|
|
60
|
+
"Social": "Social",
|
|
61
|
+
"Promotions": "Promotions",
|
|
62
|
+
"Updates": "Updates",
|
|
63
|
+
"Forums": "Forums",
|
|
64
|
+
"Reservations": "Reservations",
|
|
65
|
+
"Purchases": "Purchases"
|
|
66
|
+
}
|
package/src/i18n/vi.json
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Gmail": "Gmail",
|
|
3
|
+
"Email service by Google": "Email service by Google",
|
|
4
|
+
"Send Email": "Send Email",
|
|
5
|
+
"Custom API Call": "Custom API Call",
|
|
6
|
+
"Send an email through a Gmail account": "Send an email through a Gmail account",
|
|
7
|
+
"Make a custom API call to a specific endpoint": "Make a custom API call to a specific endpoint",
|
|
8
|
+
"Receiver Email (To)": "Receiver Email (To)",
|
|
9
|
+
"CC Email": "CC Email",
|
|
10
|
+
"BCC Email": "BCC Email",
|
|
11
|
+
"Subject": "Subject",
|
|
12
|
+
"Body Type": "Body Type",
|
|
13
|
+
"Body": "Body",
|
|
14
|
+
"Reply-To Email": "Reply-To Email",
|
|
15
|
+
"Sender Name": "Sender Name",
|
|
16
|
+
"Sender Email": "Sender Email",
|
|
17
|
+
"Attachment": "Attachment",
|
|
18
|
+
"Attachment Name": "Attachment Name",
|
|
19
|
+
"In reply to": "In reply to",
|
|
20
|
+
"Create draft": "Create draft",
|
|
21
|
+
"Method": "Method",
|
|
22
|
+
"Headers": "Headers",
|
|
23
|
+
"Query Parameters": "Query Parameters",
|
|
24
|
+
"No Error on Failure": "No Error on Failure",
|
|
25
|
+
"Timeout (in seconds)": "Timeout (in seconds)",
|
|
26
|
+
"Body for the email you want to send": "Body for the email you want to send",
|
|
27
|
+
"Email address to set as the \"Reply-To\" header": "Email address to set as the \"Reply-To\" header",
|
|
28
|
+
"The address must be listed in your GMail account's settings": "The address must be listed in your GMail account's settings",
|
|
29
|
+
"File to attach to the email you want to send": "File to attach to the email you want to send",
|
|
30
|
+
"In case you want to change the name of the attachment": "In case you want to change the name of the attachment",
|
|
31
|
+
"Reply to this Message-ID": "Reply to this Message-ID",
|
|
32
|
+
"Create draft without sending the actual email": "Create draft without sending the actual email",
|
|
33
|
+
"Authorization headers are injected automatically from your connection.": "Authorization headers are injected automatically from your connection.",
|
|
34
|
+
"plain text": "plain text",
|
|
35
|
+
"html": "html",
|
|
36
|
+
"GET": "GET",
|
|
37
|
+
"POST": "POST",
|
|
38
|
+
"PATCH": "PATCH",
|
|
39
|
+
"PUT": "PUT",
|
|
40
|
+
"DELETE": "DELETE",
|
|
41
|
+
"HEAD": "HEAD",
|
|
42
|
+
"New Email": "New Email",
|
|
43
|
+
"New Labeled Email": "New Labeled Email",
|
|
44
|
+
"Triggers when new mail is found in your Gmail inbox": "Triggers when new mail is found in your Gmail inbox",
|
|
45
|
+
"Triggers when a label is added to an email": "Triggers when a label is added to an email",
|
|
46
|
+
"Email subject": "Email subject",
|
|
47
|
+
"Email sender": "Email sender",
|
|
48
|
+
"Email recipient": "Email recipient",
|
|
49
|
+
"Label": "Label",
|
|
50
|
+
"Category": "Category",
|
|
51
|
+
"The email subject": "The email subject",
|
|
52
|
+
"Optional filteration, leave empty to filter based on the email sender": "Optional filteration, leave empty to filter based on the email sender",
|
|
53
|
+
"Optional filteration, leave empty to filter based on the email recipient": "Optional filteration, leave empty to filter based on the email recipient",
|
|
54
|
+
"Optional filteration, leave unselected to filter based on the email label": "Optional filteration, leave unselected to filter based on the email label",
|
|
55
|
+
"Optional filteration, leave unselected to filter based on the email category": "Optional filteration, leave unselected to filter based on the email category",
|
|
56
|
+
"Primary": "Primary",
|
|
57
|
+
"Social": "Social",
|
|
58
|
+
"Promotions": "Promotions",
|
|
59
|
+
"Updates": "Updates",
|
|
60
|
+
"Forums": "Forums",
|
|
61
|
+
"Reservations": "Reservations",
|
|
62
|
+
"Purchases": "Purchases"
|
|
63
|
+
}
|
package/src/i18n/zh.json
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Email service by Google": "Email service by Google",
|
|
3
|
+
"Send Email": "Send Email",
|
|
4
|
+
"Custom API Call": "自定义 API 呼叫",
|
|
5
|
+
"Send an email through a Gmail account": "Send an email through a Gmail account",
|
|
6
|
+
"Make a custom API call to a specific endpoint": "将一个自定义 API 调用到一个特定的终点",
|
|
7
|
+
"Receiver Email (To)": "Receiver Email (To)",
|
|
8
|
+
"CC Email": "CC Email",
|
|
9
|
+
"BCC Email": "BCC Email",
|
|
10
|
+
"Subject": "Subject",
|
|
11
|
+
"Body Type": "Body Type",
|
|
12
|
+
"Body": "正文内容",
|
|
13
|
+
"Reply-To Email": "Reply-To Email",
|
|
14
|
+
"Sender Name": "发件人姓名",
|
|
15
|
+
"Sender Email": "发件人电子邮件",
|
|
16
|
+
"Attachments": "Attachments",
|
|
17
|
+
"In reply to": "In reply to",
|
|
18
|
+
"Create draft": "Create draft",
|
|
19
|
+
"Method": "方法",
|
|
20
|
+
"Headers": "信头",
|
|
21
|
+
"Query Parameters": "查询参数",
|
|
22
|
+
"Response is Binary ?": "Response is Binary ?",
|
|
23
|
+
"No Error on Failure": "失败时没有错误",
|
|
24
|
+
"Timeout (in seconds)": "超时(秒)",
|
|
25
|
+
"Follow redirects": "Follow redirects",
|
|
26
|
+
"Body for the email you want to send": "Body for the email you want to send",
|
|
27
|
+
"Email address to set as the \"Reply-To\" header": "Email address to set as the \"Reply-To\" header",
|
|
28
|
+
"The address must be listed in your GMail account's settings": "The address must be listed in your GMail account's settings",
|
|
29
|
+
"Reply to this Message-ID": "Reply to this Message-ID",
|
|
30
|
+
"Create draft without sending the actual email": "Create draft without sending the actual email",
|
|
31
|
+
"Authorization headers are injected automatically from your connection.": "授权头自动从您的连接中注入。",
|
|
32
|
+
"Enable for files like PDFs, images, etc.": "Enable for files like PDFs, images, etc.",
|
|
33
|
+
"plain text": "plain text",
|
|
34
|
+
"html": "html",
|
|
35
|
+
"GET": "获取",
|
|
36
|
+
"POST": "帖子",
|
|
37
|
+
"PATCH": "PATCH",
|
|
38
|
+
"PUT": "弹出",
|
|
39
|
+
"DELETE": "删除",
|
|
40
|
+
"HEAD": "黑色",
|
|
41
|
+
"None": "无",
|
|
42
|
+
"JSON": "JSON",
|
|
43
|
+
"Form Data": "表单数据",
|
|
44
|
+
"Raw": "原始文件",
|
|
45
|
+
"New Email": "New Email",
|
|
46
|
+
"New Labeled Email": "New Labeled Email",
|
|
47
|
+
"Triggers when new mail is found in your Gmail inbox": "Triggers when new mail is found in your Gmail inbox",
|
|
48
|
+
"Triggers when a label is added to an email": "Triggers when a label is added to an email",
|
|
49
|
+
"Email subject": "Email subject",
|
|
50
|
+
"Email sender": "Email sender",
|
|
51
|
+
"Email recipient": "Email recipient",
|
|
52
|
+
"Label": "Label",
|
|
53
|
+
"Category": "Category",
|
|
54
|
+
"The email subject": "The email subject",
|
|
55
|
+
"Optional filteration, leave empty to filter based on the email sender": "Optional filteration, leave empty to filter based on the email sender",
|
|
56
|
+
"Optional filteration, leave empty to filter based on the email recipient": "Optional filteration, leave empty to filter based on the email recipient",
|
|
57
|
+
"Optional filteration, leave unselected to filter based on the email label": "Optional filteration, leave unselected to filter based on the email label",
|
|
58
|
+
"Optional filteration, leave unselected to filter based on the email category": "Optional filteration, leave unselected to filter based on the email category",
|
|
59
|
+
"Primary": "Primary",
|
|
60
|
+
"Social": "Social",
|
|
61
|
+
"Promotions": "Promotions",
|
|
62
|
+
"Updates": "Updates",
|
|
63
|
+
"Forums": "Forums",
|
|
64
|
+
"Reservations": "Reservations",
|
|
65
|
+
"Purchases": "Purchases"
|
|
66
|
+
}
|
package/src/index.d.ts
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const gmailAuth: import("@scopieflows/pieces-framework").OAuth2Property<import("@scopieflows/pieces-framework").OAuth2Props>;
|
|
2
|
+
export declare const gmail: import("@scopieflows/pieces-framework").Piece<import("@scopieflows/pieces-framework").OAuth2Property<import("@scopieflows/pieces-framework").OAuth2Props>>;
|
package/src/index.js
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.gmail = exports.gmailAuth = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_common_1 = require("@scopieflows/pieces-common");
|
|
6
|
+
const pieces_framework_1 = require("@scopieflows/pieces-framework");
|
|
7
|
+
const shared_1 = require("@scopieflows/shared");
|
|
8
|
+
const send_email_action_1 = require("./lib/actions/send-email-action");
|
|
9
|
+
const reply_to_email_action_1 = require("./lib/actions/reply-to-email-action");
|
|
10
|
+
const create_draft_reply_action_1 = require("./lib/actions/create-draft-reply-action");
|
|
11
|
+
const new_email_1 = require("./lib/triggers/new-email");
|
|
12
|
+
const new_labeled_email_1 = require("./lib/triggers/new-labeled-email");
|
|
13
|
+
const request_approval_in_email_1 = require("./lib/actions/request-approval-in-email");
|
|
14
|
+
const new_attachment_1 = require("./lib/triggers/new-attachment");
|
|
15
|
+
const new_label_1 = require("./lib/triggers/new-label");
|
|
16
|
+
const search_email_action_1 = require("./lib/actions/search-email-action");
|
|
17
|
+
const get_mail_action_1 = require("./lib/actions/get-mail-action");
|
|
18
|
+
exports.gmailAuth = pieces_framework_1.PieceAuth.OAuth2({
|
|
19
|
+
description: '',
|
|
20
|
+
authUrl: 'https://accounts.google.com/o/oauth2/auth',
|
|
21
|
+
tokenUrl: 'https://oauth2.googleapis.com/token',
|
|
22
|
+
required: true,
|
|
23
|
+
scope: [
|
|
24
|
+
'https://www.googleapis.com/auth/gmail.send',
|
|
25
|
+
'email',
|
|
26
|
+
'https://www.googleapis.com/auth/gmail.readonly',
|
|
27
|
+
'https://www.googleapis.com/auth/gmail.compose',
|
|
28
|
+
],
|
|
29
|
+
});
|
|
30
|
+
exports.gmail = (0, pieces_framework_1.createPiece)({
|
|
31
|
+
minimumSupportedRelease: '0.30.0',
|
|
32
|
+
logoUrl: '/pieces/gmail.png',
|
|
33
|
+
categories: [
|
|
34
|
+
shared_1.PieceCategory.COMMUNICATION,
|
|
35
|
+
shared_1.PieceCategory.BUSINESS_INTELLIGENCE,
|
|
36
|
+
],
|
|
37
|
+
actions: [
|
|
38
|
+
send_email_action_1.gmailSendEmailAction,
|
|
39
|
+
request_approval_in_email_1.requestApprovalInEmail,
|
|
40
|
+
reply_to_email_action_1.gmailReplyToEmailAction,
|
|
41
|
+
create_draft_reply_action_1.gmailCreateDraftReplyAction,
|
|
42
|
+
get_mail_action_1.gmailGetEmailAction,
|
|
43
|
+
search_email_action_1.gmailSearchMailAction,
|
|
44
|
+
(0, pieces_common_1.createCustomApiCallAction)({
|
|
45
|
+
baseUrl: () => 'https://gmail.googleapis.com/gmail/v1',
|
|
46
|
+
auth: exports.gmailAuth,
|
|
47
|
+
authMapping: (auth) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
48
|
+
return ({
|
|
49
|
+
Authorization: `Bearer ${auth.access_token}`,
|
|
50
|
+
});
|
|
51
|
+
}),
|
|
52
|
+
}),
|
|
53
|
+
],
|
|
54
|
+
displayName: 'Gmail',
|
|
55
|
+
description: 'Email service by Google',
|
|
56
|
+
authors: [
|
|
57
|
+
'kanarelo',
|
|
58
|
+
'abdullahranginwala',
|
|
59
|
+
'BastienMe',
|
|
60
|
+
'Salem-Alaa',
|
|
61
|
+
'kishanprmr',
|
|
62
|
+
'MoShizzle',
|
|
63
|
+
'AbdulTheActivePiecer',
|
|
64
|
+
'khaledmashaly',
|
|
65
|
+
'abuaboud',
|
|
66
|
+
'AdamSelene',
|
|
67
|
+
'sanket-a11y',
|
|
68
|
+
'onyedikachi-david',
|
|
69
|
+
],
|
|
70
|
+
triggers: [
|
|
71
|
+
new_email_1.gmailNewEmailTrigger,
|
|
72
|
+
new_labeled_email_1.gmailNewLabeledEmailTrigger,
|
|
73
|
+
new_attachment_1.gmailNewAttachmentTrigger,
|
|
74
|
+
new_label_1.gmailNewLabelTrigger,
|
|
75
|
+
],
|
|
76
|
+
auth: exports.gmailAuth,
|
|
77
|
+
});
|
|
78
|
+
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/pieces/community/gmail/src/index.ts"],"names":[],"mappings":";;;;AAAA,8DAAuE;AACvE,oEAIuC;AACvC,gDAAoD;AACpD,uEAAuE;AACvE,+EAA8E;AAC9E,uFAAsF;AACtF,wDAAgE;AAChE,wEAA+E;AAC/E,uFAAiF;AACjF,kEAA0E;AAC1E,wDAAgE;AAChE,2EAA0E;AAC1E,mEAAoE;AAEvD,QAAA,SAAS,GAAG,4BAAS,CAAC,MAAM,CAAC;IACxC,WAAW,EAAE,EAAE;IACf,OAAO,EAAE,2CAA2C;IACpD,QAAQ,EAAE,qCAAqC;IAC/C,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE;QACL,4CAA4C;QAC5C,OAAO;QACP,gDAAgD;QAChD,+CAA+C;KAChD;CACF,CAAC,CAAC;AAEU,QAAA,KAAK,GAAG,IAAA,8BAAW,EAAC;IAC/B,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,mBAAmB;IAC5B,UAAU,EAAE;QACV,sBAAa,CAAC,aAAa;QAC3B,sBAAa,CAAC,qBAAqB;KACpC;IACD,OAAO,EAAE;QACP,wCAAoB;QACpB,kDAAsB;QACtB,+CAAuB;QACvB,uDAA2B;QAC3B,qCAAmB;QACnB,2CAAqB;QACrB,IAAA,yCAAyB,EAAC;YACxB,OAAO,EAAE,GAAG,EAAE,CAAC,uCAAuC;YACtD,IAAI,EAAE,iBAAS;YACf,WAAW,EAAE,CAAO,IAAI,EAAE,EAAE;gBAAC,OAAA,CAAC;oBAC5B,aAAa,EAAE,UAAW,IAA4B,CAAC,YAAY,EAAE;iBACtE,CAAC,CAAA;cAAA;SACH,CAAC;KACH;IACD,WAAW,EAAE,OAAO;IACpB,WAAW,EAAE,yBAAyB;IAEtC,OAAO,EAAE;QACP,UAAU;QACV,oBAAoB;QACpB,WAAW;QACX,YAAY;QACZ,YAAY;QACZ,WAAW;QACX,sBAAsB;QACtB,eAAe;QACf,UAAU;QACV,YAAY;QACZ,aAAa;QACb,mBAAmB;KACpB;IACD,QAAQ,EAAE;QACR,gCAAoB;QACpB,+CAA2B;QAC3B,0CAAyB;QACzB,gCAAoB;KACrB;IACD,IAAI,EAAE,iBAAS;CAChB,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const gmailCreateDraftReplyAction: import("@scopieflows/pieces-framework").IAction<import("@scopieflows/pieces-framework").OAuth2Property<import("@scopieflows/pieces-framework").OAuth2Props>, {
|
|
2
|
+
message_id: import("@scopieflows/pieces-framework").DropdownProperty<string, true, import("@scopieflows/pieces-framework").OAuth2Property<import("@scopieflows/pieces-framework").OAuth2Props>>;
|
|
3
|
+
reply_type: import("@scopieflows/pieces-framework").StaticDropdownProperty<string, true>;
|
|
4
|
+
body_type: import("@scopieflows/pieces-framework").StaticDropdownProperty<string, true>;
|
|
5
|
+
body: import("@scopieflows/pieces-framework").LongTextProperty<false>;
|
|
6
|
+
include_original_message: import("@scopieflows/pieces-framework").CheckboxProperty<true>;
|
|
7
|
+
sender_name: import("@scopieflows/pieces-framework").ShortTextProperty<false>;
|
|
8
|
+
attachment: import("@scopieflows/pieces-framework").FileProperty<false>;
|
|
9
|
+
attachment_name: import("@scopieflows/pieces-framework").ShortTextProperty<false>;
|
|
10
|
+
}>;
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.gmailCreateDraftReplyAction = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@scopieflows/pieces-framework");
|
|
6
|
+
const mime_types_1 = tslib_1.__importDefault(require("mime-types"));
|
|
7
|
+
const mail_composer_1 = tslib_1.__importDefault(require("nodemailer/lib/mail-composer"));
|
|
8
|
+
const __1 = require("../../");
|
|
9
|
+
const googleapis_1 = require("googleapis");
|
|
10
|
+
const googleapis_common_1 = require("googleapis-common");
|
|
11
|
+
const props_1 = require("../common/props");
|
|
12
|
+
exports.gmailCreateDraftReplyAction = (0, pieces_framework_1.createAction)({
|
|
13
|
+
auth: __1.gmailAuth,
|
|
14
|
+
name: 'create_draft_reply',
|
|
15
|
+
description: 'Creates a draft reply to an existing email.',
|
|
16
|
+
displayName: 'Create Draft Reply',
|
|
17
|
+
props: {
|
|
18
|
+
message_id: props_1.GmailProps.message,
|
|
19
|
+
reply_type: pieces_framework_1.Property.StaticDropdown({
|
|
20
|
+
displayName: 'Reply Type',
|
|
21
|
+
description: 'Choose whether to reply to sender only or to all recipients',
|
|
22
|
+
required: true,
|
|
23
|
+
defaultValue: 'reply',
|
|
24
|
+
options: {
|
|
25
|
+
disabled: false,
|
|
26
|
+
options: [
|
|
27
|
+
{
|
|
28
|
+
label: 'Reply (to sender only)',
|
|
29
|
+
value: 'reply',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
label: 'Reply All (to all recipients)',
|
|
33
|
+
value: 'reply_all',
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
},
|
|
37
|
+
}),
|
|
38
|
+
body_type: pieces_framework_1.Property.StaticDropdown({
|
|
39
|
+
displayName: 'Body Type',
|
|
40
|
+
required: true,
|
|
41
|
+
defaultValue: 'plain_text',
|
|
42
|
+
options: {
|
|
43
|
+
disabled: false,
|
|
44
|
+
options: [
|
|
45
|
+
{
|
|
46
|
+
label: 'Plain text',
|
|
47
|
+
value: 'plain_text',
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
label: 'HTML',
|
|
51
|
+
value: 'html',
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
},
|
|
55
|
+
}),
|
|
56
|
+
body: pieces_framework_1.Property.LongText({
|
|
57
|
+
displayName: 'Draft Reply Body',
|
|
58
|
+
description: 'Your draft reply message content',
|
|
59
|
+
required: false,
|
|
60
|
+
}),
|
|
61
|
+
include_original_message: pieces_framework_1.Property.Checkbox({
|
|
62
|
+
displayName: 'Include Original Message',
|
|
63
|
+
description: 'Include the original message content in the draft reply',
|
|
64
|
+
required: true,
|
|
65
|
+
defaultValue: true,
|
|
66
|
+
}),
|
|
67
|
+
sender_name: pieces_framework_1.Property.ShortText({
|
|
68
|
+
displayName: 'Sender Name',
|
|
69
|
+
description: 'Optional sender name to display',
|
|
70
|
+
required: false,
|
|
71
|
+
}),
|
|
72
|
+
attachment: pieces_framework_1.Property.File({
|
|
73
|
+
displayName: 'Attachment',
|
|
74
|
+
description: 'Optional file to attach to your draft reply',
|
|
75
|
+
required: false,
|
|
76
|
+
}),
|
|
77
|
+
attachment_name: pieces_framework_1.Property.ShortText({
|
|
78
|
+
displayName: 'Attachment Name',
|
|
79
|
+
description: 'Custom name for the attachment',
|
|
80
|
+
required: false,
|
|
81
|
+
}),
|
|
82
|
+
},
|
|
83
|
+
run(context) {
|
|
84
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
85
|
+
var _a;
|
|
86
|
+
const authClient = new googleapis_common_1.OAuth2Client();
|
|
87
|
+
authClient.setCredentials(context.auth);
|
|
88
|
+
const gmail = googleapis_1.google.gmail({ version: 'v1', auth: authClient });
|
|
89
|
+
const originalMessage = yield gmail.users.messages.get({
|
|
90
|
+
userId: 'me',
|
|
91
|
+
id: context.propsValue.message_id,
|
|
92
|
+
format: 'full',
|
|
93
|
+
});
|
|
94
|
+
if (!originalMessage.data || !originalMessage.data.payload) {
|
|
95
|
+
throw new Error('Could not fetch original message details');
|
|
96
|
+
}
|
|
97
|
+
const headers = originalMessage.data.payload.headers || [];
|
|
98
|
+
const headerMap = headers.reduce((acc, header) => {
|
|
99
|
+
if (header.name && header.value) {
|
|
100
|
+
acc[header.name.toLowerCase()] = header.value;
|
|
101
|
+
}
|
|
102
|
+
return acc;
|
|
103
|
+
}, {});
|
|
104
|
+
const originalSubject = headerMap['subject'] || '';
|
|
105
|
+
const originalFrom = headerMap['from'] || '';
|
|
106
|
+
const originalTo = headerMap['to'] || '';
|
|
107
|
+
const originalCc = headerMap['cc'] || '';
|
|
108
|
+
const originalReplyTo = headerMap['reply-to'] || '';
|
|
109
|
+
const originalMessageId = headerMap['message-id'] || '';
|
|
110
|
+
const originalReferences = headerMap['references'] || '';
|
|
111
|
+
const originalDate = headerMap['date'] || '';
|
|
112
|
+
let originalMessageContent = '';
|
|
113
|
+
if (context.propsValue.include_original_message) {
|
|
114
|
+
try {
|
|
115
|
+
const { parseStream } = yield Promise.resolve().then(() => tslib_1.__importStar(require('../common/data')));
|
|
116
|
+
const originalMessageFull = yield gmail.users.messages.get({
|
|
117
|
+
userId: 'me',
|
|
118
|
+
id: context.propsValue.message_id,
|
|
119
|
+
format: 'raw',
|
|
120
|
+
});
|
|
121
|
+
if (originalMessageFull.data.raw) {
|
|
122
|
+
const rawMessage = Buffer.from(originalMessageFull.data.raw, 'base64').toString('utf-8');
|
|
123
|
+
const parsedMessage = yield parseStream(rawMessage);
|
|
124
|
+
let messageText = parsedMessage.text || '';
|
|
125
|
+
if (!messageText && parsedMessage.html) {
|
|
126
|
+
messageText = parsedMessage.html
|
|
127
|
+
.replace(/<[^>]*>/g, '')
|
|
128
|
+
.replace(/ /g, ' ')
|
|
129
|
+
.replace(/&/g, '&')
|
|
130
|
+
.replace(/</g, '<')
|
|
131
|
+
.replace(/>/g, '>');
|
|
132
|
+
}
|
|
133
|
+
if (messageText) {
|
|
134
|
+
const quotedLines = messageText
|
|
135
|
+
.split('\n')
|
|
136
|
+
.map((line) => `> ${line.trim()}`);
|
|
137
|
+
const senderInfo = `On ${originalDate}, ${originalFrom} wrote:`;
|
|
138
|
+
originalMessageContent = `${senderInfo}\n${quotedLines.join('\n')}`;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
catch (error) {
|
|
143
|
+
console.warn('Could not extract original message content for quoting:', error);
|
|
144
|
+
originalMessageContent = `On ${originalDate}, ${originalFrom} wrote:\n> [Original message content could not be parsed]`;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
const toRecipients = [];
|
|
148
|
+
const ccRecipients = [];
|
|
149
|
+
if (context.propsValue.reply_type === 'reply_all') {
|
|
150
|
+
const senderEmail = originalReplyTo || originalFrom;
|
|
151
|
+
if (senderEmail) {
|
|
152
|
+
toRecipients.push(senderEmail);
|
|
153
|
+
}
|
|
154
|
+
const currentUserEmail = (yield googleapis_1.google.oauth2({ version: 'v2', auth: authClient }).userinfo.get()).data.email;
|
|
155
|
+
if (originalTo) {
|
|
156
|
+
const toEmails = originalTo.split(',').map((email) => email.trim());
|
|
157
|
+
toRecipients.push(...toEmails.filter((email) => !email.includes(currentUserEmail || '')));
|
|
158
|
+
}
|
|
159
|
+
if (originalCc) {
|
|
160
|
+
const ccEmails = originalCc.split(',').map((email) => email.trim());
|
|
161
|
+
ccRecipients.push(...ccEmails.filter((email) => !email.includes(currentUserEmail || '')));
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
const senderEmail = originalReplyTo || originalFrom;
|
|
166
|
+
if (senderEmail) {
|
|
167
|
+
toRecipients.push(senderEmail);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
let replySubject = originalSubject;
|
|
171
|
+
if (!replySubject.toLowerCase().startsWith('re:')) {
|
|
172
|
+
replySubject = `Re: ${replySubject}`;
|
|
173
|
+
}
|
|
174
|
+
let referencesHeader = originalMessageId;
|
|
175
|
+
if (originalReferences) {
|
|
176
|
+
referencesHeader = `${originalReferences} ${originalMessageId}`;
|
|
177
|
+
}
|
|
178
|
+
const senderEmail = (yield googleapis_1.google.oauth2({ version: 'v2', auth: authClient }).userinfo.get()).data.email;
|
|
179
|
+
let draftBody = context.propsValue.body || '';
|
|
180
|
+
if (context.propsValue.include_original_message && originalMessageContent) {
|
|
181
|
+
const separator = context.propsValue.body_type === 'html'
|
|
182
|
+
? '<br><br>--- Original Message ---<br>'
|
|
183
|
+
: '\n\n--- Original Message ---\n';
|
|
184
|
+
const quotedContent = context.propsValue.body_type === 'html'
|
|
185
|
+
? originalMessageContent.replace(/\n/g, '<br>')
|
|
186
|
+
: originalMessageContent;
|
|
187
|
+
draftBody = draftBody
|
|
188
|
+
? `${draftBody}${separator}${quotedContent}`
|
|
189
|
+
: quotedContent;
|
|
190
|
+
}
|
|
191
|
+
const subjectBase64 = Buffer.from(replySubject).toString('base64');
|
|
192
|
+
const mailOptions = {
|
|
193
|
+
to: toRecipients.join(', '),
|
|
194
|
+
cc: ccRecipients.length > 0 ? ccRecipients.join(', ') : undefined,
|
|
195
|
+
subject: `=?UTF-8?B?${subjectBase64}?=`,
|
|
196
|
+
text: context.propsValue.body_type === 'plain_text' ? draftBody : undefined,
|
|
197
|
+
html: context.propsValue.body_type === 'html' ? draftBody : undefined,
|
|
198
|
+
attachments: [],
|
|
199
|
+
headers: [
|
|
200
|
+
{
|
|
201
|
+
key: 'In-Reply-To',
|
|
202
|
+
value: originalMessageId,
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
key: 'References',
|
|
206
|
+
value: referencesHeader,
|
|
207
|
+
},
|
|
208
|
+
],
|
|
209
|
+
};
|
|
210
|
+
if (senderEmail) {
|
|
211
|
+
mailOptions.from = context.propsValue.sender_name
|
|
212
|
+
? `${context.propsValue.sender_name} <${senderEmail}>`
|
|
213
|
+
: senderEmail;
|
|
214
|
+
}
|
|
215
|
+
if (context.propsValue.attachment) {
|
|
216
|
+
const lookupResult = mime_types_1.default.lookup(context.propsValue.attachment.extension || '');
|
|
217
|
+
const attachmentOption = [
|
|
218
|
+
{
|
|
219
|
+
filename: (_a = context.propsValue.attachment_name) !== null && _a !== void 0 ? _a : context.propsValue.attachment.filename,
|
|
220
|
+
content: context.propsValue.attachment.base64,
|
|
221
|
+
contentType: lookupResult || undefined,
|
|
222
|
+
encoding: 'base64',
|
|
223
|
+
},
|
|
224
|
+
];
|
|
225
|
+
mailOptions.attachments = attachmentOption;
|
|
226
|
+
}
|
|
227
|
+
const mail = new mail_composer_1.default(mailOptions).compile();
|
|
228
|
+
mail.keepBcc = true;
|
|
229
|
+
const mailBody = yield mail.build();
|
|
230
|
+
const encodedPayload = Buffer.from(mailBody)
|
|
231
|
+
.toString('base64')
|
|
232
|
+
.replace(/\+/g, '-')
|
|
233
|
+
.replace(/\//g, '_');
|
|
234
|
+
const draft = yield gmail.users.drafts.create({
|
|
235
|
+
userId: 'me',
|
|
236
|
+
requestBody: {
|
|
237
|
+
message: {
|
|
238
|
+
threadId: originalMessage.data.threadId || undefined,
|
|
239
|
+
raw: encodedPayload,
|
|
240
|
+
},
|
|
241
|
+
},
|
|
242
|
+
});
|
|
243
|
+
return Object.assign(Object.assign({}, draft.data), { originalMessage: {
|
|
244
|
+
id: context.propsValue.message_id,
|
|
245
|
+
subject: originalSubject,
|
|
246
|
+
from: originalFrom,
|
|
247
|
+
to: originalTo,
|
|
248
|
+
date: originalDate,
|
|
249
|
+
threadId: originalMessage.data.threadId,
|
|
250
|
+
}, draftDetails: {
|
|
251
|
+
replyType: context.propsValue.reply_type,
|
|
252
|
+
recipients: {
|
|
253
|
+
to: toRecipients,
|
|
254
|
+
cc: ccRecipients,
|
|
255
|
+
},
|
|
256
|
+
subject: replySubject,
|
|
257
|
+
includeOriginal: context.propsValue.include_original_message,
|
|
258
|
+
} });
|
|
259
|
+
});
|
|
260
|
+
},
|
|
261
|
+
});
|
|
262
|
+
//# sourceMappingURL=create-draft-reply-action.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-draft-reply-action.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/gmail/src/lib/actions/create-draft-reply-action.ts"],"names":[],"mappings":";;;;AAAA,oEAAuE;AACvE,oEAA8B;AAC9B,yFAAwD;AAExD,8BAAmC;AACnC,2CAAoC;AACpC,yDAAiD;AACjD,2CAA6C;AAEhC,QAAA,2BAA2B,GAAG,IAAA,+BAAY,EAAC;IACtD,IAAI,EAAE,aAAS;IACf,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EAAE,6CAA6C;IAC1D,WAAW,EAAE,oBAAoB;IACjC,KAAK,EAAE;QACL,UAAU,EAAE,kBAAU,CAAC,OAAO;QAC9B,UAAU,EAAE,2BAAQ,CAAC,cAAc,CAAC;YAClC,WAAW,EAAE,YAAY;YACzB,WAAW,EACT,6DAA6D;YAC/D,QAAQ,EAAE,IAAI;YACd,YAAY,EAAE,OAAO;YACrB,OAAO,EAAE;gBACP,QAAQ,EAAE,KAAK;gBACf,OAAO,EAAE;oBACP;wBACE,KAAK,EAAE,wBAAwB;wBAC/B,KAAK,EAAE,OAAO;qBACf;oBACD;wBACE,KAAK,EAAE,+BAA+B;wBACtC,KAAK,EAAE,WAAW;qBACnB;iBACF;aACF;SACF,CAAC;QACF,SAAS,EAAE,2BAAQ,CAAC,cAAc,CAAC;YACjC,WAAW,EAAE,WAAW;YACxB,QAAQ,EAAE,IAAI;YACd,YAAY,EAAE,YAAY;YAC1B,OAAO,EAAE;gBACP,QAAQ,EAAE,KAAK;gBACf,OAAO,EAAE;oBACP;wBACE,KAAK,EAAE,YAAY;wBACnB,KAAK,EAAE,YAAY;qBACpB;oBACD;wBACE,KAAK,EAAE,MAAM;wBACb,KAAK,EAAE,MAAM;qBACd;iBACF;aACF;SACF,CAAC;QACF,IAAI,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACtB,WAAW,EAAE,kBAAkB;YAC/B,WAAW,EAAE,kCAAkC;YAC/C,QAAQ,EAAE,K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