@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,208 +0,0 @@
1
- import { TriggerStrategy } from '@activepieces/pieces-framework';
2
- import { GmailLabel } from '../common/models';
3
- export declare const gmailNewAttachmentTrigger: import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
4
- serviceAccount: import("@activepieces/pieces-framework").LongTextProperty<true>;
5
- userEmail: import("@activepieces/pieces-framework").ShortTextProperty<true>;
6
- }>)[], {
7
- from: {
8
- description: string;
9
- displayName: string;
10
- required: false;
11
- valueSchema: string;
12
- type: import("@activepieces/pieces-framework").PropertyType.SHORT_TEXT;
13
- defaultValue?: string | undefined;
14
- };
15
- to: {
16
- description: string;
17
- displayName: string;
18
- required: false;
19
- valueSchema: string;
20
- type: import("@activepieces/pieces-framework").PropertyType.SHORT_TEXT;
21
- defaultValue?: string | undefined;
22
- };
23
- subject: import("@activepieces/pieces-framework").ShortTextProperty<false>;
24
- label: {
25
- description: string;
26
- displayName: string;
27
- required: false;
28
- auth: (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
29
- serviceAccount: import("@activepieces/pieces-framework").LongTextProperty<true>;
30
- userEmail: import("@activepieces/pieces-framework").ShortTextProperty<true>;
31
- }>)[];
32
- refreshers: string[];
33
- refreshOnSearch?: boolean;
34
- options: (propsValue: Record<string, unknown> & {
35
- auth?: import("@activepieces/shared").OAuth2ConnectionValueWithApp | import("@activepieces/shared").CustomAuthConnectionValue<import("@activepieces/pieces-framework").StaticPropsValue<{
36
- serviceAccount: import("@activepieces/pieces-framework").LongTextProperty<true>;
37
- userEmail: import("@activepieces/pieces-framework").ShortTextProperty<true>;
38
- }>> | undefined;
39
- }, ctx: import("@activepieces/pieces-framework").PropertyContext) => Promise<import("@activepieces/pieces-framework").DropdownState<GmailLabel>>;
40
- valueSchema: GmailLabel;
41
- type: import("@activepieces/pieces-framework").PropertyType.DROPDOWN;
42
- defaultValue?: unknown;
43
- };
44
- category: {
45
- description: string;
46
- displayName: string;
47
- required: false;
48
- options: import("@activepieces/pieces-framework").DropdownState<string>;
49
- valueSchema: string;
50
- type: import("@activepieces/pieces-framework").PropertyType.STATIC_DROPDOWN;
51
- defaultValue?: unknown;
52
- };
53
- filenameExtension: import("@activepieces/pieces-framework").ShortTextProperty<false>;
54
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
55
- serviceAccount: import("@activepieces/pieces-framework").LongTextProperty<true>;
56
- userEmail: import("@activepieces/pieces-framework").ShortTextProperty<true>;
57
- }>)[], {
58
- from: {
59
- description: string;
60
- displayName: string;
61
- required: false;
62
- valueSchema: string;
63
- type: import("@activepieces/pieces-framework").PropertyType.SHORT_TEXT;
64
- defaultValue?: string | undefined;
65
- };
66
- to: {
67
- description: string;
68
- displayName: string;
69
- required: false;
70
- valueSchema: string;
71
- type: import("@activepieces/pieces-framework").PropertyType.SHORT_TEXT;
72
- defaultValue?: string | undefined;
73
- };
74
- subject: import("@activepieces/pieces-framework").ShortTextProperty<false>;
75
- label: {
76
- description: string;
77
- displayName: string;
78
- required: false;
79
- auth: (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
80
- serviceAccount: import("@activepieces/pieces-framework").LongTextProperty<true>;
81
- userEmail: import("@activepieces/pieces-framework").ShortTextProperty<true>;
82
- }>)[];
83
- refreshers: string[];
84
- refreshOnSearch?: boolean;
85
- options: (propsValue: Record<string, unknown> & {
86
- auth?: import("@activepieces/shared").OAuth2ConnectionValueWithApp | import("@activepieces/shared").CustomAuthConnectionValue<import("@activepieces/pieces-framework").StaticPropsValue<{
87
- serviceAccount: import("@activepieces/pieces-framework").LongTextProperty<true>;
88
- userEmail: import("@activepieces/pieces-framework").ShortTextProperty<true>;
89
- }>> | undefined;
90
- }, ctx: import("@activepieces/pieces-framework").PropertyContext) => Promise<import("@activepieces/pieces-framework").DropdownState<GmailLabel>>;
91
- valueSchema: GmailLabel;
92
- type: import("@activepieces/pieces-framework").PropertyType.DROPDOWN;
93
- defaultValue?: unknown;
94
- };
95
- category: {
96
- description: string;
97
- displayName: string;
98
- required: false;
99
- options: import("@activepieces/pieces-framework").DropdownState<string>;
100
- valueSchema: string;
101
- type: import("@activepieces/pieces-framework").PropertyType.STATIC_DROPDOWN;
102
- defaultValue?: unknown;
103
- };
104
- filenameExtension: import("@activepieces/pieces-framework").ShortTextProperty<false>;
105
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.MANUAL, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
106
- serviceAccount: import("@activepieces/pieces-framework").LongTextProperty<true>;
107
- userEmail: import("@activepieces/pieces-framework").ShortTextProperty<true>;
108
- }>)[], {
109
- from: {
110
- description: string;
111
- displayName: string;
112
- required: false;
113
- valueSchema: string;
114
- type: import("@activepieces/pieces-framework").PropertyType.SHORT_TEXT;
115
- defaultValue?: string | undefined;
116
- };
117
- to: {
118
- description: string;
119
- displayName: string;
120
- required: false;
121
- valueSchema: string;
122
- type: import("@activepieces/pieces-framework").PropertyType.SHORT_TEXT;
123
- defaultValue?: string | undefined;
124
- };
125
- subject: import("@activepieces/pieces-framework").ShortTextProperty<false>;
126
- label: {
127
- description: string;
128
- displayName: string;
129
- required: false;
130
- auth: (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
131
- serviceAccount: import("@activepieces/pieces-framework").LongTextProperty<true>;
132
- userEmail: import("@activepieces/pieces-framework").ShortTextProperty<true>;
133
- }>)[];
134
- refreshers: string[];
135
- refreshOnSearch?: boolean;
136
- options: (propsValue: Record<string, unknown> & {
137
- auth?: import("@activepieces/shared").OAuth2ConnectionValueWithApp | import("@activepieces/shared").CustomAuthConnectionValue<import("@activepieces/pieces-framework").StaticPropsValue<{
138
- serviceAccount: import("@activepieces/pieces-framework").LongTextProperty<true>;
139
- userEmail: import("@activepieces/pieces-framework").ShortTextProperty<true>;
140
- }>> | undefined;
141
- }, ctx: import("@activepieces/pieces-framework").PropertyContext) => Promise<import("@activepieces/pieces-framework").DropdownState<GmailLabel>>;
142
- valueSchema: GmailLabel;
143
- type: import("@activepieces/pieces-framework").PropertyType.DROPDOWN;
144
- defaultValue?: unknown;
145
- };
146
- category: {
147
- description: string;
148
- displayName: string;
149
- required: false;
150
- options: import("@activepieces/pieces-framework").DropdownState<string>;
151
- valueSchema: string;
152
- type: import("@activepieces/pieces-framework").PropertyType.STATIC_DROPDOWN;
153
- defaultValue?: unknown;
154
- };
155
- filenameExtension: import("@activepieces/pieces-framework").ShortTextProperty<false>;
156
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
157
- serviceAccount: import("@activepieces/pieces-framework").LongTextProperty<true>;
158
- userEmail: import("@activepieces/pieces-framework").ShortTextProperty<true>;
159
- }>)[], {
160
- from: {
161
- description: string;
162
- displayName: string;
163
- required: false;
164
- valueSchema: string;
165
- type: import("@activepieces/pieces-framework").PropertyType.SHORT_TEXT;
166
- defaultValue?: string | undefined;
167
- };
168
- to: {
169
- description: string;
170
- displayName: string;
171
- required: false;
172
- valueSchema: string;
173
- type: import("@activepieces/pieces-framework").PropertyType.SHORT_TEXT;
174
- defaultValue?: string | undefined;
175
- };
176
- subject: import("@activepieces/pieces-framework").ShortTextProperty<false>;
177
- label: {
178
- description: string;
179
- displayName: string;
180
- required: false;
181
- auth: (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
182
- serviceAccount: import("@activepieces/pieces-framework").LongTextProperty<true>;
183
- userEmail: import("@activepieces/pieces-framework").ShortTextProperty<true>;
184
- }>)[];
185
- refreshers: string[];
186
- refreshOnSearch?: boolean;
187
- options: (propsValue: Record<string, unknown> & {
188
- auth?: import("@activepieces/shared").OAuth2ConnectionValueWithApp | import("@activepieces/shared").CustomAuthConnectionValue<import("@activepieces/pieces-framework").StaticPropsValue<{
189
- serviceAccount: import("@activepieces/pieces-framework").LongTextProperty<true>;
190
- userEmail: import("@activepieces/pieces-framework").ShortTextProperty<true>;
191
- }>> | undefined;
192
- }, ctx: import("@activepieces/pieces-framework").PropertyContext) => Promise<import("@activepieces/pieces-framework").DropdownState<GmailLabel>>;
193
- valueSchema: GmailLabel;
194
- type: import("@activepieces/pieces-framework").PropertyType.DROPDOWN;
195
- defaultValue?: unknown;
196
- };
197
- category: {
198
- description: string;
199
- displayName: string;
200
- required: false;
201
- options: import("@activepieces/pieces-framework").DropdownState<string>;
202
- valueSchema: string;
203
- type: import("@activepieces/pieces-framework").PropertyType.STATIC_DROPDOWN;
204
- defaultValue?: unknown;
205
- };
206
- filenameExtension: import("@activepieces/pieces-framework").ShortTextProperty<false>;
207
- }>;
208
- //# sourceMappingURL=new-attachment.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"new-attachment.d.ts","sourceRoot":"","sources":["../../../../src/lib/triggers/new-attachment.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,eAAe,EAGhB,MAAM,gCAAgC,CAAC;AASxC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAW9C,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsFpC,CAAC"}
@@ -1,142 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.gmailNewAttachmentTrigger = 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
- exports.gmailNewAttachmentTrigger = (0, pieces_framework_1.createTrigger)({
11
- auth: auth_1.gmailAuth,
12
- name: 'new_attachment',
13
- displayName: 'New Attachment',
14
- description: 'Triggers when an email with an attachment arrives.',
15
- aiMetadata: {
16
- description: 'Fires when a new email carrying one or more attachments arrives, optionally narrowed by sender, recipient, subject, label, category, or file extension. Each event represents a single attachment (a multi-attachment email emits one event per attachment) along with its source message.',
17
- },
18
- props: {
19
- from: Object.assign(Object.assign({}, props_1.GmailProps.from), { description: 'Filter by sender email.', displayName: 'From', required: false }),
20
- to: Object.assign(Object.assign({}, props_1.GmailProps.to), { description: 'Filter by recipient email.', displayName: 'To', required: false }),
21
- subject: pieces_framework_1.Property.ShortText({
22
- displayName: 'Subject Contains',
23
- description: 'Only trigger for emails containing this text in the subject.',
24
- required: false,
25
- }),
26
- label: Object.assign(Object.assign({}, props_1.GmailProps.label), { description: 'Filter by Gmail label.', displayName: 'Label', required: false }),
27
- category: Object.assign(Object.assign({}, props_1.GmailProps.category), { description: 'Filter by Gmail category.', displayName: 'Category', required: false }),
28
- filenameExtension: pieces_framework_1.Property.ShortText({
29
- displayName: 'File Extension',
30
- description: 'Only trigger for attachments with this file extension (e.g., pdf, jpg, docx).',
31
- required: false,
32
- }),
33
- },
34
- sampleData: {},
35
- type: pieces_framework_1.TriggerStrategy.POLLING,
36
- onEnable(context) {
37
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
38
- yield context.store.put('lastPoll', Date.now());
39
- });
40
- },
41
- onDisable(context) {
42
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
43
- return;
44
- });
45
- },
46
- run(context) {
47
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
48
- var _a;
49
- const lastFetchEpochMS = (_a = (yield context.store.get('lastPoll'))) !== null && _a !== void 0 ? _a : 0;
50
- const items = yield pollRecentMessages({
51
- auth: context.auth,
52
- props: context.propsValue,
53
- files: context.files,
54
- lastFetchEpochMS: lastFetchEpochMS,
55
- });
56
- const newLastEpochMilliSeconds = items.reduce((acc, item) => Math.max(acc, item.epochMilliSeconds), lastFetchEpochMS);
57
- yield context.store.put('lastPoll', newLastEpochMilliSeconds);
58
- return items
59
- .filter((f) => f.epochMilliSeconds > lastFetchEpochMS)
60
- .map((item) => item.data);
61
- });
62
- },
63
- test(context) {
64
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
65
- var _a;
66
- const lastFetchEpochMS = (_a = (yield context.store.get('lastPoll'))) !== null && _a !== void 0 ? _a : 0;
67
- const items = yield pollRecentMessages({
68
- auth: context.auth,
69
- props: context.propsValue,
70
- files: context.files,
71
- lastFetchEpochMS: lastFetchEpochMS,
72
- });
73
- return (0, data_1.getFirstFiveOrAll)(items.map((item) => item.data));
74
- });
75
- },
76
- });
77
- function pollRecentMessages(_a) {
78
- return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, props, files, lastFetchEpochMS, }) {
79
- var _b;
80
- const authClient = yield (0, auth_1.createGoogleClient)(auth);
81
- const gmail = googleapis_1.google.gmail({ version: 'v1', auth: authClient });
82
- // construct query
83
- const query = ['has:attachment'];
84
- const maxResults = lastFetchEpochMS === 0 ? 5 : 20;
85
- const afterUnixSeconds = Math.floor(lastFetchEpochMS / 1000);
86
- if (props.from)
87
- query.push(`from:(${props.from})`);
88
- if (props.to)
89
- query.push(`to:(${props.to})`);
90
- if (props.subject)
91
- query.push(`subject:(${props.subject})`);
92
- if (props.label)
93
- query.push(`label:${props.label.name}`);
94
- if (props.category)
95
- query.push(`category:${props.category}`);
96
- if (props.filenameExtension)
97
- query.push(`filename:${props.filenameExtension}`);
98
- if (afterUnixSeconds != null && afterUnixSeconds > 0)
99
- query.push(`after:${afterUnixSeconds}`);
100
- // List Messages
101
- const messagesResponse = yield gmail.users.messages.list({
102
- userId: 'me',
103
- q: query.join(' '),
104
- maxResults,
105
- });
106
- // Reverse to process oldest-first so partial progress doesn't skip messages
107
- const messages = (messagesResponse.data.messages || []).slice().reverse();
108
- const pollingResponse = [];
109
- for (const message of messages) {
110
- try {
111
- const rawMailResponse = yield gmail.users.messages.get({
112
- userId: 'me',
113
- id: message.id,
114
- format: 'raw',
115
- });
116
- const parsedMailResponse = yield (0, data_1.parseStream)(Buffer.from(rawMailResponse.data.raw, 'base64').toString('utf-8'));
117
- const { attachments } = parsedMailResponse, restOfParsedMailResponse = tslib_1.__rest(parsedMailResponse, ["attachments"]);
118
- const parsedAttachments = yield (0, data_1.convertAttachment)(attachments, files);
119
- for (const attachment of parsedAttachments) {
120
- pollingResponse.push({
121
- epochMilliSeconds: Number(rawMailResponse.data.internalDate),
122
- data: {
123
- attachment,
124
- message: Object.assign({ id: message.id }, restOfParsedMailResponse),
125
- },
126
- });
127
- }
128
- }
129
- catch (error) {
130
- const isRateLimit = error.status === 429 ||
131
- (error.status === 403 &&
132
- /quota|rate.?limit/i.test((_b = error.message) !== null && _b !== void 0 ? _b : ''));
133
- if (isRateLimit) {
134
- break;
135
- }
136
- throw error;
137
- }
138
- }
139
- return pollingResponse;
140
- });
141
- }
142
- //# sourceMappingURL=new-attachment.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"new-attachment.js","sourceRoot":"","sources":["../../../../src/lib/triggers/new-attachment.ts"],"names":[],"mappings":";;;;AAAA,qEAKwC;AACxC,2CAA6C;AAC7C,kCAAwE;AACxE,2CAAoC;AACpC,yCAIwB;AAYX,QAAA,yBAAyB,GAAG,IAAA,gCAAa,EAAC;IACrD,IAAI,EAAE,gBAAS;IACf,IAAI,EAAE,gBAAgB;IACt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AAO,CAAC,EAAE,IACX,wBAAwB,CAC5B;yBACF;qBACF,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;YAAC,OAAO,KAAU,EAAE,CAAC;gBACpB,MAAM,WAAW,GACf,KAAK,CAAC,MAAM,KAAK,GAAG;oBACpB,CAAC,KAAK,CAAC,MAAM,KAAK,GAAG;wBACnB,oBAAoB,CAAC,IAAI,CAAC,MAAA,KAAK,CAAC,OAAO,mCAAI,EAAE,CAAC,CAAC,CAAC;gBACpD,IAAI,WAAW,EAAE,CAAC;oBAChB,MAAM;gBACR,CAAC;gBACD,MAAM,KAAK,CAAC;YACd,CAAC;QACH,CAAC;QAED,OAAO,eAAe,CAAC;IACzB,CAAC;CAAA"}
@@ -1,59 +0,0 @@
1
- import { TriggerStrategy } from '@activepieces/pieces-framework';
2
- export declare const gmailNewConversationTrigger: 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
- from: {
7
- description: string;
8
- displayName: string;
9
- required: false;
10
- valueSchema: string;
11
- type: import("@activepieces/pieces-framework").PropertyType.SHORT_TEXT;
12
- defaultValue?: string | undefined;
13
- };
14
- subject: import("@activepieces/pieces-framework").ShortTextProperty<false>;
15
- maxAgeHours: import("@activepieces/pieces-framework").NumberProperty<false>;
16
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
17
- serviceAccount: import("@activepieces/pieces-framework").LongTextProperty<true>;
18
- userEmail: import("@activepieces/pieces-framework").ShortTextProperty<true>;
19
- }>)[], {
20
- from: {
21
- description: string;
22
- displayName: string;
23
- required: false;
24
- valueSchema: string;
25
- type: import("@activepieces/pieces-framework").PropertyType.SHORT_TEXT;
26
- defaultValue?: string | undefined;
27
- };
28
- subject: import("@activepieces/pieces-framework").ShortTextProperty<false>;
29
- maxAgeHours: import("@activepieces/pieces-framework").NumberProperty<false>;
30
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.MANUAL, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
31
- serviceAccount: import("@activepieces/pieces-framework").LongTextProperty<true>;
32
- userEmail: import("@activepieces/pieces-framework").ShortTextProperty<true>;
33
- }>)[], {
34
- from: {
35
- description: string;
36
- displayName: string;
37
- required: false;
38
- valueSchema: string;
39
- type: import("@activepieces/pieces-framework").PropertyType.SHORT_TEXT;
40
- defaultValue?: string | undefined;
41
- };
42
- subject: import("@activepieces/pieces-framework").ShortTextProperty<false>;
43
- maxAgeHours: import("@activepieces/pieces-framework").NumberProperty<false>;
44
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
45
- serviceAccount: import("@activepieces/pieces-framework").LongTextProperty<true>;
46
- userEmail: import("@activepieces/pieces-framework").ShortTextProperty<true>;
47
- }>)[], {
48
- from: {
49
- description: string;
50
- displayName: string;
51
- required: false;
52
- valueSchema: string;
53
- type: import("@activepieces/pieces-framework").PropertyType.SHORT_TEXT;
54
- defaultValue?: string | undefined;
55
- };
56
- subject: import("@activepieces/pieces-framework").ShortTextProperty<false>;
57
- maxAgeHours: import("@activepieces/pieces-framework").NumberProperty<false>;
58
- }>;
59
- //# sourceMappingURL=new-conversation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"new-conversation.d.ts","sourceRoot":"","sources":["../../../../src/lib/triggers/new-conversation.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,eAAe,EAGhB,MAAM,gCAAgC,CAAC;AAiIxC,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsRtC,CAAC"}