@activepieces/piece-gmail 0.12.5 → 0.12.7

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.
Files changed (69) hide show
  1. package/package.json +7 -21
  2. package/src/index.js +217 -71
  3. package/src/index.d.ts +0 -6
  4. package/src/index.d.ts.map +0 -1
  5. package/src/index.js.map +0 -1
  6. package/src/lib/actions/create-draft-reply-action.d.ts +0 -17
  7. package/src/lib/actions/create-draft-reply-action.d.ts.map +0 -1
  8. package/src/lib/actions/create-draft-reply-action.js +0 -265
  9. package/src/lib/actions/create-draft-reply-action.js.map +0 -1
  10. package/src/lib/actions/get-mail-action.d.ts +0 -7
  11. package/src/lib/actions/get-mail-action.d.ts.map +0 -1
  12. package/src/lib/actions/get-mail-action.js +0 -40
  13. package/src/lib/actions/get-mail-action.js.map +0 -1
  14. package/src/lib/actions/get-thread-action.d.ts +0 -9
  15. package/src/lib/actions/get-thread-action.d.ts.map +0 -1
  16. package/src/lib/actions/get-thread-action.js +0 -44
  17. package/src/lib/actions/get-thread-action.js.map +0 -1
  18. package/src/lib/actions/reply-to-email-action.d.ts +0 -16
  19. package/src/lib/actions/reply-to-email-action.d.ts.map +0 -1
  20. package/src/lib/actions/reply-to-email-action.js +0 -198
  21. package/src/lib/actions/reply-to-email-action.js.map +0 -1
  22. package/src/lib/actions/request-approval-in-email.d.ts +0 -15
  23. package/src/lib/actions/request-approval-in-email.d.ts.map +0 -1
  24. package/src/lib/actions/request-approval-in-email.js +0 -175
  25. package/src/lib/actions/request-approval-in-email.js.map +0 -1
  26. package/src/lib/actions/search-email-action.d.ts +0 -22
  27. package/src/lib/actions/search-email-action.d.ts.map +0 -1
  28. package/src/lib/actions/search-email-action.js +0 -175
  29. package/src/lib/actions/search-email-action.js.map +0 -1
  30. package/src/lib/actions/send-email-action.d.ts +0 -18
  31. package/src/lib/actions/send-email-action.d.ts.map +0 -1
  32. package/src/lib/actions/send-email-action.js +0 -192
  33. package/src/lib/actions/send-email-action.js.map +0 -1
  34. package/src/lib/auth.d.ts +0 -12
  35. package/src/lib/auth.d.ts.map +0 -1
  36. package/src/lib/auth.js +0 -106
  37. package/src/lib/auth.js.map +0 -1
  38. package/src/lib/common/data.d.ts +0 -132
  39. package/src/lib/common/data.d.ts.map +0 -1
  40. package/src/lib/common/data.js +0 -209
  41. package/src/lib/common/data.js.map +0 -1
  42. package/src/lib/common/models.d.ts +0 -86
  43. package/src/lib/common/models.d.ts.map +0 -1
  44. package/src/lib/common/models.js +0 -26
  45. package/src/lib/common/models.js.map +0 -1
  46. package/src/lib/common/props.d.ts +0 -21
  47. package/src/lib/common/props.d.ts.map +0 -1
  48. package/src/lib/common/props.js +0 -226
  49. package/src/lib/common/props.js.map +0 -1
  50. package/src/lib/triggers/new-attachment.d.ts +0 -208
  51. package/src/lib/triggers/new-attachment.d.ts.map +0 -1
  52. package/src/lib/triggers/new-attachment.js +0 -142
  53. package/src/lib/triggers/new-attachment.js.map +0 -1
  54. package/src/lib/triggers/new-conversation.d.ts +0 -59
  55. package/src/lib/triggers/new-conversation.d.ts.map +0 -1
  56. package/src/lib/triggers/new-conversation.js +0 -306
  57. package/src/lib/triggers/new-conversation.js.map +0 -1
  58. package/src/lib/triggers/new-email.d.ts +0 -52
  59. package/src/lib/triggers/new-email.d.ts.map +0 -1
  60. package/src/lib/triggers/new-email.js +0 -131
  61. package/src/lib/triggers/new-email.js.map +0 -1
  62. package/src/lib/triggers/new-label.d.ts +0 -15
  63. package/src/lib/triggers/new-label.d.ts.map +0 -1
  64. package/src/lib/triggers/new-label.js +0 -78
  65. package/src/lib/triggers/new-label.js.map +0 -1
  66. package/src/lib/triggers/new-labeled-email.d.ts +0 -99
  67. package/src/lib/triggers/new-labeled-email.d.ts.map +0 -1
  68. package/src/lib/triggers/new-labeled-email.js +0 -141
  69. package/src/lib/triggers/new-labeled-email.js.map +0 -1
@@ -1,99 +0,0 @@
1
- import { TriggerStrategy } from '@activepieces/pieces-framework';
2
- export declare const gmailNewLabeledEmailTrigger: import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
3
- serviceAccount: import("@activepieces/pieces-framework").LongTextProperty<true>;
4
- userEmail: import("@activepieces/pieces-framework").ShortTextProperty<true>;
5
- }>)[], {
6
- label: {
7
- required: true;
8
- displayName: string;
9
- description?: string | undefined;
10
- auth: (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
11
- serviceAccount: import("@activepieces/pieces-framework").LongTextProperty<true>;
12
- userEmail: import("@activepieces/pieces-framework").ShortTextProperty<true>;
13
- }>)[];
14
- refreshers: string[];
15
- refreshOnSearch?: boolean;
16
- options: (propsValue: Record<string, unknown> & {
17
- auth?: import("@activepieces/shared").OAuth2ConnectionValueWithApp | import("@activepieces/shared").CustomAuthConnectionValue<import("@activepieces/pieces-framework").StaticPropsValue<{
18
- serviceAccount: import("@activepieces/pieces-framework").LongTextProperty<true>;
19
- userEmail: import("@activepieces/pieces-framework").ShortTextProperty<true>;
20
- }>> | undefined;
21
- }, ctx: import("@activepieces/pieces-framework").PropertyContext) => Promise<import("@activepieces/pieces-framework").DropdownState<import("../common/models").GmailLabel>>;
22
- valueSchema: import("../common/models").GmailLabel;
23
- type: import("@activepieces/pieces-framework").PropertyType.DROPDOWN;
24
- defaultValue?: unknown;
25
- };
26
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
27
- serviceAccount: import("@activepieces/pieces-framework").LongTextProperty<true>;
28
- userEmail: import("@activepieces/pieces-framework").ShortTextProperty<true>;
29
- }>)[], {
30
- label: {
31
- required: true;
32
- displayName: string;
33
- description?: string | undefined;
34
- auth: (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
35
- serviceAccount: import("@activepieces/pieces-framework").LongTextProperty<true>;
36
- userEmail: import("@activepieces/pieces-framework").ShortTextProperty<true>;
37
- }>)[];
38
- refreshers: string[];
39
- refreshOnSearch?: boolean;
40
- options: (propsValue: Record<string, unknown> & {
41
- auth?: import("@activepieces/shared").OAuth2ConnectionValueWithApp | import("@activepieces/shared").CustomAuthConnectionValue<import("@activepieces/pieces-framework").StaticPropsValue<{
42
- serviceAccount: import("@activepieces/pieces-framework").LongTextProperty<true>;
43
- userEmail: import("@activepieces/pieces-framework").ShortTextProperty<true>;
44
- }>> | undefined;
45
- }, ctx: import("@activepieces/pieces-framework").PropertyContext) => Promise<import("@activepieces/pieces-framework").DropdownState<import("../common/models").GmailLabel>>;
46
- valueSchema: import("../common/models").GmailLabel;
47
- type: import("@activepieces/pieces-framework").PropertyType.DROPDOWN;
48
- defaultValue?: unknown;
49
- };
50
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.MANUAL, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
51
- serviceAccount: import("@activepieces/pieces-framework").LongTextProperty<true>;
52
- userEmail: import("@activepieces/pieces-framework").ShortTextProperty<true>;
53
- }>)[], {
54
- label: {
55
- required: true;
56
- displayName: string;
57
- description?: string | undefined;
58
- auth: (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
59
- serviceAccount: import("@activepieces/pieces-framework").LongTextProperty<true>;
60
- userEmail: import("@activepieces/pieces-framework").ShortTextProperty<true>;
61
- }>)[];
62
- refreshers: string[];
63
- refreshOnSearch?: boolean;
64
- options: (propsValue: Record<string, unknown> & {
65
- auth?: import("@activepieces/shared").OAuth2ConnectionValueWithApp | import("@activepieces/shared").CustomAuthConnectionValue<import("@activepieces/pieces-framework").StaticPropsValue<{
66
- serviceAccount: import("@activepieces/pieces-framework").LongTextProperty<true>;
67
- userEmail: import("@activepieces/pieces-framework").ShortTextProperty<true>;
68
- }>> | undefined;
69
- }, ctx: import("@activepieces/pieces-framework").PropertyContext) => Promise<import("@activepieces/pieces-framework").DropdownState<import("../common/models").GmailLabel>>;
70
- valueSchema: import("../common/models").GmailLabel;
71
- type: import("@activepieces/pieces-framework").PropertyType.DROPDOWN;
72
- defaultValue?: unknown;
73
- };
74
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
75
- serviceAccount: import("@activepieces/pieces-framework").LongTextProperty<true>;
76
- userEmail: import("@activepieces/pieces-framework").ShortTextProperty<true>;
77
- }>)[], {
78
- label: {
79
- required: true;
80
- displayName: string;
81
- description?: string | undefined;
82
- auth: (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
83
- serviceAccount: import("@activepieces/pieces-framework").LongTextProperty<true>;
84
- userEmail: import("@activepieces/pieces-framework").ShortTextProperty<true>;
85
- }>)[];
86
- refreshers: string[];
87
- refreshOnSearch?: boolean;
88
- options: (propsValue: Record<string, unknown> & {
89
- auth?: import("@activepieces/shared").OAuth2ConnectionValueWithApp | import("@activepieces/shared").CustomAuthConnectionValue<import("@activepieces/pieces-framework").StaticPropsValue<{
90
- serviceAccount: import("@activepieces/pieces-framework").LongTextProperty<true>;
91
- userEmail: import("@activepieces/pieces-framework").ShortTextProperty<true>;
92
- }>> | undefined;
93
- }, ctx: import("@activepieces/pieces-framework").PropertyContext) => Promise<import("@activepieces/pieces-framework").DropdownState<import("../common/models").GmailLabel>>;
94
- valueSchema: import("../common/models").GmailLabel;
95
- type: import("@activepieces/pieces-framework").PropertyType.DROPDOWN;
96
- defaultValue?: unknown;
97
- };
98
- }>;
99
- //# sourceMappingURL=new-labeled-email.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"new-labeled-email.d.ts","sourceRoot":"","sources":["../../../../src/lib/triggers/new-labeled-email.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,eAAe,EAEhB,MAAM,gCAAgC,CAAC;AAmDxC,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4ItC,CAAC"}
@@ -1,141 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.gmailNewLabeledEmailTrigger = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const props_1 = require("../common/props");
7
- const auth_1 = require("../auth");
8
- const googleapis_1 = require("googleapis");
9
- const data_1 = require("../common/data");
10
- function enrichGmailMessage(_a) {
11
- return tslib_1.__awaiter(this, arguments, void 0, function* ({ gmail, messageId, files, labelInfo, }) {
12
- const rawMailResponse = yield gmail.users.messages.get({
13
- userId: 'me',
14
- id: messageId,
15
- format: 'raw',
16
- });
17
- const threadResponse = yield gmail.users.threads.get({
18
- userId: 'me',
19
- id: rawMailResponse.data.threadId,
20
- });
21
- const parsedMailResponse = yield (0, data_1.parseStream)(Buffer.from(rawMailResponse.data.raw, 'base64').toString('utf-8'));
22
- return {
23
- message: Object.assign(Object.assign({}, parsedMailResponse), { attachments: yield (0, data_1.convertAttachment)(parsedMailResponse.attachments, files) }),
24
- thread: threadResponse.data,
25
- labelInfo: Object.assign(Object.assign({}, labelInfo), { addedAt: Date.now() }),
26
- };
27
- });
28
- }
29
- exports.gmailNewLabeledEmailTrigger = (0, pieces_framework_1.createTrigger)({
30
- auth: auth_1.gmailAuth,
31
- name: 'new_labeled_email',
32
- displayName: 'New Labeled Email',
33
- description: 'Triggers when a label is added to an email',
34
- aiMetadata: {
35
- description: 'Fires when the specified label is applied to an email (either newly received with the label or labeled afterward). Each event represents one message that just gained that label, with its parsed contents and label info.',
36
- },
37
- props: {
38
- label: Object.assign(Object.assign({}, props_1.GmailProps.label), { required: true }),
39
- },
40
- sampleData: {},
41
- type: pieces_framework_1.TriggerStrategy.POLLING,
42
- onEnable: (context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
43
- const authClient = yield (0, auth_1.createGoogleClient)(context.auth);
44
- const gmail = googleapis_1.google.gmail({ version: 'v1', auth: authClient });
45
- const profile = yield gmail.users.getProfile({
46
- userId: 'me',
47
- });
48
- yield context.store.put('lastHistoryId', profile.data.historyId);
49
- }),
50
- onDisable: (context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
51
- yield context.store.delete('lastHistoryId');
52
- }),
53
- run: (context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
54
- var _a, _b, _c, _d, _e, _f;
55
- const authClient = yield (0, auth_1.createGoogleClient)(context.auth);
56
- const gmail = googleapis_1.google.gmail({ version: 'v1', auth: authClient });
57
- const lastHistoryId = yield context.store.get('lastHistoryId');
58
- const historyResponse = yield gmail.users.history.list({
59
- userId: 'me',
60
- startHistoryId: lastHistoryId,
61
- labelId: context.propsValue.label.id,
62
- historyTypes: ['labelAdded', 'messageAdded'],
63
- });
64
- const labeledMessages = new Map();
65
- const results = [];
66
- if (historyResponse.data.history) {
67
- for (const history of historyResponse.data.history) {
68
- if (history.labelsAdded) {
69
- for (const labelAdded of history.labelsAdded) {
70
- if (((_a = labelAdded.labelIds) === null || _a === void 0 ? void 0 : _a.includes(context.propsValue.label.id)) &&
71
- ((_b = labelAdded.message) === null || _b === void 0 ? void 0 : _b.id)) {
72
- labeledMessages.set(labelAdded.message.id, ((_c = history.id) === null || _c === void 0 ? void 0 : _c.toString()) || '');
73
- }
74
- }
75
- }
76
- else if (history.messagesAdded) {
77
- for (const messageAdded of history.messagesAdded) {
78
- if (((_d = messageAdded.message) === null || _d === void 0 ? void 0 : _d.id) &&
79
- ((_e = messageAdded.message.labelIds) === null || _e === void 0 ? void 0 : _e.includes(context.propsValue.label.id))) {
80
- labeledMessages.set(messageAdded.message.id, ((_f = history.id) === null || _f === void 0 ? void 0 : _f.toString()) || '');
81
- }
82
- }
83
- }
84
- }
85
- }
86
- for (const [messageId, historyId] of labeledMessages) {
87
- const enrichedMessage = yield enrichGmailMessage({
88
- gmail,
89
- messageId,
90
- files: context.files,
91
- labelInfo: {
92
- labelId: context.propsValue.label.id,
93
- labelName: context.propsValue.label.name,
94
- },
95
- });
96
- if (lastHistoryId !== historyId) {
97
- results.push({
98
- id: historyId,
99
- data: enrichedMessage,
100
- });
101
- }
102
- }
103
- if (historyResponse.data.historyId) {
104
- yield context.store.put('lastHistoryId', historyResponse.data.historyId);
105
- }
106
- return results;
107
- }),
108
- test: (context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
109
- const authClient = yield (0, auth_1.createGoogleClient)(context.auth);
110
- const gmail = googleapis_1.google.gmail({ version: 'v1', auth: authClient });
111
- const messagesResponse = yield gmail.users.messages.list({
112
- userId: 'me',
113
- labelIds: [context.propsValue.label.id],
114
- maxResults: 5,
115
- });
116
- const results = [];
117
- if (messagesResponse.data.messages) {
118
- for (const message of messagesResponse.data.messages) {
119
- const messageId = message.id;
120
- if (!messageId) {
121
- continue;
122
- }
123
- const enrichedMessage = yield enrichGmailMessage({
124
- gmail,
125
- messageId: messageId,
126
- files: context.files,
127
- labelInfo: {
128
- labelId: context.propsValue.label.id,
129
- labelName: context.propsValue.label.name,
130
- },
131
- });
132
- results.push({
133
- id: messageId,
134
- data: enrichedMessage,
135
- });
136
- }
137
- }
138
- return results;
139
- }),
140
- });
141
- //# sourceMappingURL=new-labeled-email.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"new-labeled-email.js","sourceRoot":"","sources":["../../../../src/lib/triggers/new-labeled-email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