@frogbotai/piece-gmail 0.26.0 → 0.28.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/dist/actions/customApiCall.d.ts +3 -23
- package/dist/actions/customApiCall.d.ts.map +1 -1
- package/dist/actions/customApiCall.js +3 -2
- package/dist/actions/customApiCall.js.map +1 -1
- package/dist/actions/getEmail.d.ts +17 -44
- package/dist/actions/getEmail.d.ts.map +1 -1
- package/dist/actions/getEmail.js +5 -3
- package/dist/actions/getEmail.js.map +1 -1
- package/dist/actions/replyToEmail.d.ts +38 -57
- package/dist/actions/replyToEmail.d.ts.map +1 -1
- package/dist/actions/replyToEmail.js +7 -5
- package/dist/actions/replyToEmail.js.map +1 -1
- package/dist/actions/searchEmails.d.ts +16 -26
- package/dist/actions/searchEmails.d.ts.map +1 -1
- package/dist/actions/searchEmails.js +3 -2
- package/dist/actions/searchEmails.js.map +1 -1
- package/dist/actions/send.d.ts +12 -35
- package/dist/actions/send.d.ts.map +1 -1
- package/dist/actions/send.js +5 -3
- package/dist/actions/send.js.map +1 -1
- package/dist/define.d.ts +42 -0
- package/dist/define.d.ts.map +1 -0
- package/dist/define.js +3 -0
- package/dist/define.js.map +1 -0
- package/dist/index.d.ts +175 -250
- package/dist/index.d.ts.map +1 -1
- package/dist/triggers/newEmail.d.ts +35 -20
- package/dist/triggers/newEmail.d.ts.map +1 -1
- package/dist/triggers/newEmail.js +4 -3
- package/dist/triggers/newEmail.js.map +1 -1
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -39,247 +39,152 @@ export declare const createGmail: import("frogbot").PieceFactory<{
|
|
|
39
39
|
email: string;
|
|
40
40
|
}>;
|
|
41
41
|
};
|
|
42
|
-
readonly actions: readonly [{
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}, {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}
|
|
132
|
-
}, {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
messageId: import("zod").ZodString;
|
|
178
|
-
format: import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
179
|
-
full: "full";
|
|
180
|
-
minimal: "minimal";
|
|
181
|
-
raw: "raw";
|
|
182
|
-
metadata: "metadata";
|
|
183
|
-
}>>;
|
|
184
|
-
}, import("zod/v4/core").$strip>;
|
|
185
|
-
output: import("zod").ZodObject<{
|
|
186
|
-
id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
187
|
-
threadId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
188
|
-
labelIds: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
189
|
-
snippet: import("zod").ZodOptional<import("zod").ZodString>;
|
|
190
|
-
payload: import("zod").ZodOptional<import("zod").ZodUnknown>;
|
|
191
|
-
}, import("zod/v4/core").$loose>;
|
|
192
|
-
idempotent: boolean;
|
|
193
|
-
run({ client, input, req }: import("frogbot").PieceRunArgs<import("zod").infer<import("zod").ZodObject<{
|
|
194
|
-
messageId: import("zod").ZodString;
|
|
195
|
-
format: import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
196
|
-
full: "full";
|
|
197
|
-
minimal: "minimal";
|
|
198
|
-
raw: "raw";
|
|
199
|
-
metadata: "metadata";
|
|
200
|
-
}>>;
|
|
201
|
-
}, import("zod/v4/core").$strip>>, object, import("./client.js").Gmail>): Promise<import("googleapis").gmail_v1.Schema$Message | {
|
|
202
|
-
attachments: {
|
|
203
|
-
id: string | number;
|
|
204
|
-
name: string;
|
|
205
|
-
mimeType: string;
|
|
206
|
-
url: unknown;
|
|
207
|
-
}[];
|
|
208
|
-
classificationLabelValues?: import("googleapis").gmail_v1.Schema$ClassificationLabelValue[];
|
|
209
|
-
historyId?: string | null;
|
|
210
|
-
id?: string | null;
|
|
211
|
-
internalDate?: string | null;
|
|
212
|
-
labelIds?: string[] | null;
|
|
213
|
-
payload?: import("googleapis").gmail_v1.Schema$MessagePart;
|
|
214
|
-
raw?: string | null;
|
|
215
|
-
sizeEstimate?: number | null;
|
|
216
|
-
snippet?: string | null;
|
|
217
|
-
threadId?: string | null;
|
|
42
|
+
readonly actions: readonly [import("frogbot").PieceActionDefinition<import("zod").ZodObject<{
|
|
43
|
+
replyTo: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
44
|
+
senderName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
45
|
+
from: import("zod").ZodOptional<import("zod").ZodString>;
|
|
46
|
+
inReplyTo: import("zod").ZodOptional<import("zod").ZodString>;
|
|
47
|
+
draft: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
48
|
+
body: import("zod").ZodString;
|
|
49
|
+
bodyType: import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
50
|
+
plainText: "plainText";
|
|
51
|
+
html: "html";
|
|
52
|
+
}>>;
|
|
53
|
+
attachments: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
54
|
+
fileId: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber]>;
|
|
55
|
+
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
56
|
+
}, import("zod/v4/core").$strip>>>;
|
|
57
|
+
subject: import("zod").ZodString;
|
|
58
|
+
to: import("zod").ZodArray<import("zod").ZodString>;
|
|
59
|
+
cc: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
60
|
+
bcc: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
61
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
62
|
+
id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
63
|
+
threadId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
64
|
+
labelIds: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
65
|
+
}, import("zod/v4/core").$loose>, Record<string, never>, import("googleapis").gmail_v1.Gmail, {
|
|
66
|
+
[x: string]: unknown;
|
|
67
|
+
id?: string | undefined;
|
|
68
|
+
threadId?: string | undefined;
|
|
69
|
+
labelIds?: string[] | undefined;
|
|
70
|
+
}> & {
|
|
71
|
+
slug: "send";
|
|
72
|
+
}, import("frogbot").PieceActionDefinition<import("zod").ZodObject<{
|
|
73
|
+
body: import("zod").ZodString;
|
|
74
|
+
bodyType: import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
75
|
+
plainText: "plainText";
|
|
76
|
+
html: "html";
|
|
77
|
+
}>>;
|
|
78
|
+
attachments: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
79
|
+
fileId: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber]>;
|
|
80
|
+
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
81
|
+
}, import("zod/v4/core").$strip>>>;
|
|
82
|
+
messageId: import("zod").ZodString;
|
|
83
|
+
replyType: import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
84
|
+
reply: "reply";
|
|
85
|
+
replyAll: "replyAll";
|
|
86
|
+
}>>;
|
|
87
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
88
|
+
id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
89
|
+
threadId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
90
|
+
labelIds: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
91
|
+
}, import("zod/v4/core").$loose>, Record<string, never>, import("googleapis").gmail_v1.Gmail, {
|
|
92
|
+
[x: string]: unknown;
|
|
93
|
+
id?: string | undefined;
|
|
94
|
+
threadId?: string | undefined;
|
|
95
|
+
labelIds?: string[] | undefined;
|
|
96
|
+
}> & {
|
|
97
|
+
slug: "replyToEmail";
|
|
98
|
+
}, import("frogbot").PieceActionDefinition<import("zod").ZodObject<{
|
|
99
|
+
body: import("zod").ZodString;
|
|
100
|
+
bodyType: import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
101
|
+
plainText: "plainText";
|
|
102
|
+
html: "html";
|
|
103
|
+
}>>;
|
|
104
|
+
attachments: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
105
|
+
fileId: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber]>;
|
|
106
|
+
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
107
|
+
}, import("zod/v4/core").$strip>>>;
|
|
108
|
+
messageId: import("zod").ZodString;
|
|
109
|
+
replyType: import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
110
|
+
reply: "reply";
|
|
111
|
+
replyAll: "replyAll";
|
|
112
|
+
}>>;
|
|
113
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
114
|
+
id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
115
|
+
threadId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
116
|
+
labelIds: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
117
|
+
}, import("zod/v4/core").$loose>, Record<string, never>, import("googleapis").gmail_v1.Gmail, {
|
|
118
|
+
[x: string]: unknown;
|
|
119
|
+
id?: string | undefined;
|
|
120
|
+
threadId?: string | undefined;
|
|
121
|
+
labelIds?: string[] | undefined;
|
|
122
|
+
}> & {
|
|
123
|
+
slug: "createDraftReply";
|
|
124
|
+
}, import("frogbot").PieceActionDefinition<import("zod").ZodObject<{
|
|
125
|
+
messageId: import("zod").ZodString;
|
|
126
|
+
format: import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
127
|
+
metadata: "metadata";
|
|
128
|
+
full: "full";
|
|
129
|
+
minimal: "minimal";
|
|
130
|
+
raw: "raw";
|
|
131
|
+
}>>;
|
|
132
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
133
|
+
id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
134
|
+
threadId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
135
|
+
labelIds: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
136
|
+
snippet: import("zod").ZodOptional<import("zod").ZodString>;
|
|
137
|
+
payload: import("zod").ZodOptional<import("zod").ZodUnknown>;
|
|
138
|
+
}, import("zod/v4/core").$loose>, Record<string, never>, import("googleapis").gmail_v1.Gmail, {
|
|
139
|
+
[x: string]: unknown;
|
|
140
|
+
id?: string | undefined;
|
|
141
|
+
threadId?: string | undefined;
|
|
142
|
+
labelIds?: string[] | undefined;
|
|
143
|
+
snippet?: string | undefined;
|
|
144
|
+
payload?: unknown;
|
|
145
|
+
}> & {
|
|
146
|
+
slug: "getEmail";
|
|
147
|
+
}, import("frogbot").PieceActionDefinition<import("zod").ZodObject<{
|
|
148
|
+
query: import("zod").ZodOptional<import("zod").ZodString>;
|
|
149
|
+
from: import("zod").ZodOptional<import("zod").ZodString>;
|
|
150
|
+
to: import("zod").ZodOptional<import("zod").ZodString>;
|
|
151
|
+
subject: import("zod").ZodOptional<import("zod").ZodString>;
|
|
152
|
+
labelIds: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
153
|
+
maxResults: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
154
|
+
includeSpamTrash: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
155
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodArray<import("zod").ZodObject<{
|
|
156
|
+
id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
157
|
+
threadId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
158
|
+
labelIds: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
159
|
+
snippet: import("zod").ZodOptional<import("zod").ZodString>;
|
|
160
|
+
payload: import("zod").ZodOptional<import("zod").ZodUnknown>;
|
|
161
|
+
}, import("zod/v4/core").$loose>>, Record<string, never>, import("googleapis").gmail_v1.Gmail, {
|
|
162
|
+
[x: string]: unknown;
|
|
163
|
+
id?: string | undefined;
|
|
164
|
+
threadId?: string | undefined;
|
|
165
|
+
labelIds?: string[] | undefined;
|
|
166
|
+
snippet?: string | undefined;
|
|
167
|
+
payload?: unknown;
|
|
168
|
+
}[]> & {
|
|
169
|
+
slug: "searchEmails";
|
|
170
|
+
}, import("frogbot").PieceActionDefinition<import("zod").ZodObject<{
|
|
171
|
+
method: import("zod").ZodEnum<{
|
|
172
|
+
GET: "GET";
|
|
173
|
+
POST: "POST";
|
|
174
|
+
PUT: "PUT";
|
|
175
|
+
PATCH: "PATCH";
|
|
176
|
+
DELETE: "DELETE";
|
|
218
177
|
}>;
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
from: import("zod").ZodOptional<import("zod").ZodString>;
|
|
225
|
-
to: import("zod").ZodOptional<import("zod").ZodString>;
|
|
226
|
-
subject: import("zod").ZodOptional<import("zod").ZodString>;
|
|
227
|
-
labelIds: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
228
|
-
maxResults: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
229
|
-
includeSpamTrash: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
230
|
-
}, import("zod/v4/core").$strip>;
|
|
231
|
-
output: import("zod").ZodArray<import("zod").ZodObject<{
|
|
232
|
-
id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
233
|
-
threadId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
234
|
-
labelIds: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
235
|
-
snippet: import("zod").ZodOptional<import("zod").ZodString>;
|
|
236
|
-
payload: import("zod").ZodOptional<import("zod").ZodUnknown>;
|
|
237
|
-
}, import("zod/v4/core").$loose>>;
|
|
238
|
-
idempotent: boolean;
|
|
239
|
-
run({ client, input, req }: import("frogbot").PieceRunArgs<import("zod").infer<import("zod").ZodObject<{
|
|
240
|
-
query: import("zod").ZodOptional<import("zod").ZodString>;
|
|
241
|
-
from: import("zod").ZodOptional<import("zod").ZodString>;
|
|
242
|
-
to: import("zod").ZodOptional<import("zod").ZodString>;
|
|
243
|
-
subject: import("zod").ZodOptional<import("zod").ZodString>;
|
|
244
|
-
labelIds: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
245
|
-
maxResults: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
246
|
-
includeSpamTrash: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
247
|
-
}, import("zod/v4/core").$strip>>, object, import("./client.js").Gmail>): Promise<{}[]>;
|
|
248
|
-
}, {
|
|
249
|
-
slug: string;
|
|
250
|
-
description: string;
|
|
251
|
-
input: import("zod").ZodObject<{
|
|
252
|
-
method: import("zod").ZodEnum<{
|
|
253
|
-
GET: "GET";
|
|
254
|
-
POST: "POST";
|
|
255
|
-
PUT: "PUT";
|
|
256
|
-
PATCH: "PATCH";
|
|
257
|
-
DELETE: "DELETE";
|
|
258
|
-
}>;
|
|
259
|
-
path: import("zod").ZodString;
|
|
260
|
-
query: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber, import("zod").ZodBoolean]>>>;
|
|
261
|
-
body: import("zod").ZodOptional<import("zod").ZodUnknown>;
|
|
262
|
-
}, import("zod/v4/core").$strip>;
|
|
263
|
-
output: import("zod").ZodUnknown;
|
|
264
|
-
idempotent: boolean;
|
|
265
|
-
run({ client, input }: import("frogbot").PieceRunArgs<import("zod").infer<import("zod").ZodObject<{
|
|
266
|
-
method: import("zod").ZodEnum<{
|
|
267
|
-
GET: "GET";
|
|
268
|
-
POST: "POST";
|
|
269
|
-
PUT: "PUT";
|
|
270
|
-
PATCH: "PATCH";
|
|
271
|
-
DELETE: "DELETE";
|
|
272
|
-
}>;
|
|
273
|
-
path: import("zod").ZodString;
|
|
274
|
-
query: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber, import("zod").ZodBoolean]>>>;
|
|
275
|
-
body: import("zod").ZodOptional<import("zod").ZodUnknown>;
|
|
276
|
-
}, import("zod/v4/core").$strip>>, object, import("./client.js").Gmail>): Promise<unknown>;
|
|
178
|
+
path: import("zod").ZodString;
|
|
179
|
+
query: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber, import("zod").ZodBoolean]>>>;
|
|
180
|
+
body: import("zod").ZodOptional<import("zod").ZodUnknown>;
|
|
181
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodUnknown, Record<string, never>, import("googleapis").gmail_v1.Gmail, unknown> & {
|
|
182
|
+
slug: "customApiCall";
|
|
277
183
|
}];
|
|
278
184
|
readonly triggers: readonly [{
|
|
279
185
|
slug: string;
|
|
186
|
+
label?: string;
|
|
280
187
|
description: string;
|
|
281
|
-
type: "polling";
|
|
282
|
-
schedule: string;
|
|
283
188
|
input: import("zod").ZodObject<{
|
|
284
189
|
query: import("zod").ZodOptional<import("zod").ZodString>;
|
|
285
190
|
from: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -289,27 +194,47 @@ export declare const createGmail: import("frogbot").PieceFactory<{
|
|
|
289
194
|
maxResults: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
290
195
|
includeSpamTrash: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
291
196
|
}, import("zod/v4/core").$strip>;
|
|
292
|
-
output
|
|
197
|
+
output?: import("zod").ZodObject<{
|
|
293
198
|
id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
294
199
|
threadId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
295
200
|
labelIds: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
296
201
|
snippet: import("zod").ZodOptional<import("zod").ZodString>;
|
|
297
202
|
payload: import("zod").ZodOptional<import("zod").ZodUnknown>;
|
|
298
|
-
}, import("zod/v4/core").$loose
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
203
|
+
}, import("zod/v4/core").$loose> | undefined;
|
|
204
|
+
sample?: {
|
|
205
|
+
[x: string]: unknown;
|
|
206
|
+
id?: string | undefined;
|
|
207
|
+
threadId?: string | undefined;
|
|
208
|
+
labelIds?: string[] | undefined;
|
|
209
|
+
snippet?: string | undefined;
|
|
210
|
+
payload?: unknown;
|
|
211
|
+
} | undefined;
|
|
212
|
+
} & {
|
|
213
|
+
type: "polling";
|
|
214
|
+
schedule?: string;
|
|
215
|
+
run(args: import("frogbot").PieceRunArgs<{
|
|
216
|
+
maxResults: number;
|
|
217
|
+
includeSpamTrash: boolean;
|
|
218
|
+
query?: string | undefined;
|
|
219
|
+
from?: string | undefined;
|
|
220
|
+
to?: string | undefined;
|
|
221
|
+
subject?: string | undefined;
|
|
222
|
+
labelIds?: string[] | undefined;
|
|
223
|
+
}, Record<string, never>, import("googleapis").gmail_v1.Gmail> & {
|
|
224
|
+
cursor?: import("frogbot").PieceJSON | undefined;
|
|
309
225
|
}): Promise<{
|
|
310
|
-
events: {
|
|
311
|
-
|
|
226
|
+
events: {
|
|
227
|
+
[x: string]: unknown;
|
|
228
|
+
id?: string | undefined;
|
|
229
|
+
threadId?: string | undefined;
|
|
230
|
+
labelIds?: string[] | undefined;
|
|
231
|
+
snippet?: string | undefined;
|
|
232
|
+
payload?: unknown;
|
|
233
|
+
}[];
|
|
234
|
+
cursor?: import("frogbot").PieceJSON | undefined;
|
|
312
235
|
}>;
|
|
236
|
+
} & {
|
|
237
|
+
slug: "newEmail";
|
|
313
238
|
}];
|
|
314
239
|
}>;
|
|
315
240
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAa,WAAW,EAAE,MAAM,aAAa,CAAC;AAGrD,eAAO,MAAM,YAAY,oGAOf,CAAC;AACX,eAAO,MAAM,aAAa,uBAAwB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,CAAC;AAEvB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAlB2B,SAAgB;;wBAChB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAa,WAAW,EAAE,MAAM,aAAa,CAAC;AAGrD,eAAO,MAAM,YAAY,oGAOf,CAAC;AACX,eAAO,MAAM,aAAa,uBAAwB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,CAAC;AAEvB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAlB2B,SAAgB;;wBAChB,SAC1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgCP,CAAC"}
|
|
@@ -1,20 +1,8 @@
|
|
|
1
|
-
import { type PieceRunArgs } from 'frogbot/pieces';
|
|
2
1
|
import { z } from 'zod';
|
|
3
|
-
import type { Gmail } from '../client.js';
|
|
4
|
-
declare const inputSchema: z.ZodObject<{
|
|
5
|
-
query: z.ZodOptional<z.ZodString>;
|
|
6
|
-
from: z.ZodOptional<z.ZodString>;
|
|
7
|
-
to: z.ZodOptional<z.ZodString>;
|
|
8
|
-
subject: z.ZodOptional<z.ZodString>;
|
|
9
|
-
labelIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
10
|
-
maxResults: z.ZodDefault<z.ZodNumber>;
|
|
11
|
-
includeSpamTrash: z.ZodDefault<z.ZodBoolean>;
|
|
12
|
-
}, z.core.$strip>;
|
|
13
2
|
export declare const newEmail: {
|
|
14
3
|
slug: string;
|
|
4
|
+
label?: string;
|
|
15
5
|
description: string;
|
|
16
|
-
type: "polling";
|
|
17
|
-
schedule: string;
|
|
18
6
|
input: z.ZodObject<{
|
|
19
7
|
query: z.ZodOptional<z.ZodString>;
|
|
20
8
|
from: z.ZodOptional<z.ZodString>;
|
|
@@ -24,19 +12,46 @@ export declare const newEmail: {
|
|
|
24
12
|
maxResults: z.ZodDefault<z.ZodNumber>;
|
|
25
13
|
includeSpamTrash: z.ZodDefault<z.ZodBoolean>;
|
|
26
14
|
}, z.core.$strip>;
|
|
27
|
-
output
|
|
15
|
+
output?: z.ZodObject<{
|
|
28
16
|
id: z.ZodOptional<z.ZodString>;
|
|
29
17
|
threadId: z.ZodOptional<z.ZodString>;
|
|
30
18
|
labelIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
31
19
|
snippet: z.ZodOptional<z.ZodString>;
|
|
32
20
|
payload: z.ZodOptional<z.ZodUnknown>;
|
|
33
|
-
}, z.core.$loose
|
|
34
|
-
|
|
35
|
-
|
|
21
|
+
}, z.core.$loose> | undefined;
|
|
22
|
+
sample?: {
|
|
23
|
+
[x: string]: unknown;
|
|
24
|
+
id?: string | undefined;
|
|
25
|
+
threadId?: string | undefined;
|
|
26
|
+
labelIds?: string[] | undefined;
|
|
27
|
+
snippet?: string | undefined;
|
|
28
|
+
payload?: unknown;
|
|
29
|
+
} | undefined;
|
|
30
|
+
} & {
|
|
31
|
+
type: "polling";
|
|
32
|
+
schedule?: string;
|
|
33
|
+
run(args: import("frogbot").PieceRunArgs<{
|
|
34
|
+
maxResults: number;
|
|
35
|
+
includeSpamTrash: boolean;
|
|
36
|
+
query?: string | undefined;
|
|
37
|
+
from?: string | undefined;
|
|
38
|
+
to?: string | undefined;
|
|
39
|
+
subject?: string | undefined;
|
|
40
|
+
labelIds?: string[] | undefined;
|
|
41
|
+
}, Record<string, never>, import("googleapis").gmail_v1.Gmail> & {
|
|
42
|
+
cursor?: import("frogbot").PieceJSON | undefined;
|
|
36
43
|
}): Promise<{
|
|
37
|
-
events: {
|
|
38
|
-
|
|
44
|
+
events: {
|
|
45
|
+
[x: string]: unknown;
|
|
46
|
+
id?: string | undefined;
|
|
47
|
+
threadId?: string | undefined;
|
|
48
|
+
labelIds?: string[] | undefined;
|
|
49
|
+
snippet?: string | undefined;
|
|
50
|
+
payload?: unknown;
|
|
51
|
+
}[];
|
|
52
|
+
cursor?: import("frogbot").PieceJSON | undefined;
|
|
39
53
|
}>;
|
|
54
|
+
} & {
|
|
55
|
+
slug: "newEmail";
|
|
40
56
|
};
|
|
41
|
-
export {};
|
|
42
57
|
//# sourceMappingURL=newEmail.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"newEmail.d.ts","sourceRoot":"","sources":["../../src/triggers/newEmail.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"newEmail.d.ts","sourceRoot":"","sources":["../../src/triggers/newEmail.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAexB,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuBnB,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { definePollingTrigger } from '../define.js';
|
|
2
3
|
import { emailOutput, getOriginal, saveAttachments, searchQuery } from '../mail.js';
|
|
3
4
|
const inputSchema = z.object({
|
|
4
5
|
query: z.string().optional(),
|
|
@@ -9,14 +10,14 @@ const inputSchema = z.object({
|
|
|
9
10
|
maxResults: z.number().int().min(1).max(500).default(100),
|
|
10
11
|
includeSpamTrash: z.boolean().default(false),
|
|
11
12
|
});
|
|
12
|
-
export const newEmail = {
|
|
13
|
+
export const newEmail = definePollingTrigger({
|
|
13
14
|
slug: 'newEmail',
|
|
14
15
|
description: 'Emit newly received emails matching optional filters.',
|
|
15
16
|
type: 'polling',
|
|
16
17
|
schedule: '*/5 * * * *',
|
|
17
18
|
input: inputSchema,
|
|
18
19
|
output: emailOutput,
|
|
19
|
-
async run({ client, input, cursor, req
|
|
20
|
+
async run({ client, input, cursor, req }) {
|
|
20
21
|
const now = Date.now();
|
|
21
22
|
const list = await client.users.messages.list({
|
|
22
23
|
userId: 'me',
|
|
@@ -28,5 +29,5 @@ export const newEmail = {
|
|
|
28
29
|
const events = await Promise.all((list.data.messages ?? []).map(async ({ id }) => id ? saveAttachments(client, req, await getOriginal(client, id)) : {}));
|
|
29
30
|
return { events, cursor: now };
|
|
30
31
|
},
|
|
31
|
-
};
|
|
32
|
+
});
|
|
32
33
|
//# sourceMappingURL=newEmail.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"newEmail.js","sourceRoot":"","sources":["../../src/triggers/newEmail.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"newEmail.js","sourceRoot":"","sources":["../../src/triggers/newEmail.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEpF,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACzB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACxC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC;IACzD,gBAAgB,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;CAC7C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,QAAQ,GAAG,oBAAoB,CAAC;IAC3C,IAAI,EAAE,UAAU;IAChB,WAAW,EAAE,uDAAuD;IACpE,IAAI,EAAE,SAAS;IACf,QAAQ,EAAE,aAAa;IACvB,KAAK,EAAE,WAAW;IAClB,MAAM,EAAE,WAAW;IACnB,KAAK,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE;QACtC,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QACvB,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC;YAC5C,MAAM,EAAE,IAAI;YACZ,CAAC,EAAE,WAAW,CAAC,KAAK,EAAE,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;YACtE,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,UAAU,EAAE,KAAK,CAAC,UAAU;YAC5B,gBAAgB,EAAE,KAAK,CAAC,gBAAgB;SACzC,CAAC,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,GAAG,CAC9B,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAC9C,EAAE,CAAC,CAAC,CAAC,eAAe,CAAC,MAAM,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CACtE,CACF,CAAC;QACF,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;IACjC,CAAC;CACF,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frogbotai/piece-gmail",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.0",
|
|
4
4
|
"description": "Gmail tools for FrogBot.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Colby Gilbert",
|
|
@@ -26,20 +26,20 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"googleapis": "^180.0.0",
|
|
28
28
|
"zod": "^4.3.6",
|
|
29
|
-
"@frogbotai/piece-google": "0.
|
|
29
|
+
"@frogbotai/piece-google": "0.28.0"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"frogbot": "0.
|
|
32
|
+
"frogbot": "0.28.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"typescript": "5.6.2",
|
|
36
|
-
"frogbot": "0.
|
|
36
|
+
"frogbot": "0.28.0"
|
|
37
37
|
},
|
|
38
38
|
"publishConfig": {
|
|
39
39
|
"access": "public"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
|
-
"build": "tsc -p tsconfig.json",
|
|
42
|
+
"build": "rm -rf dist && tsc -p tsconfig.json",
|
|
43
43
|
"clean": "rm -rf dist",
|
|
44
44
|
"typecheck": "tsc --noEmit"
|
|
45
45
|
}
|