@rawdash/connector-intercom 0.0.1 → 0.18.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/LICENSE +202 -0
- package/README.md +90 -141
- package/dist/index.d.ts +427 -3
- package/dist/index.js +163 -11
- package/dist/index.js.map +1 -1
- package/package.json +14 -13
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseConnector, ConnectorContext, SyncOptions, StorageHandle, SyncResult } from '@rawdash/core';
|
|
1
|
+
import { BaseConnector, ConnectorContext, SyncOptions, StorageHandle, SyncResult, ConnectorDoc } from '@rawdash/core';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
declare const configFields: z.ZodObject<{
|
|
@@ -19,6 +19,7 @@ declare const configFields: z.ZodObject<{
|
|
|
19
19
|
conversation_events: "conversation_events";
|
|
20
20
|
}>>>;
|
|
21
21
|
}, z.core.$strip>;
|
|
22
|
+
declare const doc: ConnectorDoc;
|
|
22
23
|
interface IntercomSettings {
|
|
23
24
|
apiVersion: string;
|
|
24
25
|
region: 'us' | 'eu' | 'au';
|
|
@@ -34,8 +35,427 @@ type IntercomCredentials = typeof intercomCredentials;
|
|
|
34
35
|
declare const PHASE_ORDER: readonly ["admins", "teams", "contacts", "conversations", "conversation_events"];
|
|
35
36
|
type IntercomPhase = (typeof PHASE_ORDER)[number];
|
|
36
37
|
type IntercomResource = IntercomPhase;
|
|
38
|
+
declare const intercomResources: {
|
|
39
|
+
readonly intercom_admin: {
|
|
40
|
+
readonly shape: "entity";
|
|
41
|
+
readonly description: "Intercom teammates (admins) with seat and away state.";
|
|
42
|
+
readonly endpoint: "GET /admins";
|
|
43
|
+
readonly fields: [{
|
|
44
|
+
readonly name: "name";
|
|
45
|
+
readonly description: "Admin display name.";
|
|
46
|
+
}, {
|
|
47
|
+
readonly name: "email";
|
|
48
|
+
readonly description: "Admin email address.";
|
|
49
|
+
}, {
|
|
50
|
+
readonly name: "jobTitle";
|
|
51
|
+
readonly description: "Admin job title.";
|
|
52
|
+
}, {
|
|
53
|
+
readonly name: "awayMode";
|
|
54
|
+
readonly description: "Whether away mode is enabled.";
|
|
55
|
+
}, {
|
|
56
|
+
readonly name: "hasInboxSeat";
|
|
57
|
+
readonly description: "Whether the admin has an inbox seat.";
|
|
58
|
+
}];
|
|
59
|
+
readonly responses: {
|
|
60
|
+
readonly admins: z.ZodArray<z.ZodObject<{
|
|
61
|
+
id: z.ZodString;
|
|
62
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
63
|
+
email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
64
|
+
job_title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
65
|
+
away_mode_enabled: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
66
|
+
has_inbox_seat: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
67
|
+
}, z.core.$strip>>;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
readonly intercom_team: {
|
|
71
|
+
readonly shape: "entity";
|
|
72
|
+
readonly description: "Inbox teams and their admin membership counts.";
|
|
73
|
+
readonly endpoint: "GET /teams";
|
|
74
|
+
readonly fields: [{
|
|
75
|
+
readonly name: "name";
|
|
76
|
+
readonly description: "Team name.";
|
|
77
|
+
}, {
|
|
78
|
+
readonly name: "adminCount";
|
|
79
|
+
readonly description: "Number of admins on the team.";
|
|
80
|
+
}];
|
|
81
|
+
readonly responses: {
|
|
82
|
+
readonly teams: z.ZodArray<z.ZodObject<{
|
|
83
|
+
id: z.ZodString;
|
|
84
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
85
|
+
admin_ids: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber>>>;
|
|
86
|
+
}, z.core.$strip>>;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
readonly intercom_contact: {
|
|
90
|
+
readonly shape: "entity";
|
|
91
|
+
readonly description: "Contacts (users and leads) with role and last-seen time.";
|
|
92
|
+
readonly endpoint: "POST /contacts/search";
|
|
93
|
+
readonly fields: [{
|
|
94
|
+
readonly name: "role";
|
|
95
|
+
readonly description: "Contact role (user or lead).";
|
|
96
|
+
}, {
|
|
97
|
+
readonly name: "email";
|
|
98
|
+
readonly description: "Contact email address.";
|
|
99
|
+
}, {
|
|
100
|
+
readonly name: "externalId";
|
|
101
|
+
readonly description: "Your external identifier for the contact.";
|
|
102
|
+
}, {
|
|
103
|
+
readonly name: "createdAt";
|
|
104
|
+
readonly description: "When the contact was created (Unix ms).";
|
|
105
|
+
}, {
|
|
106
|
+
readonly name: "lastSeenAt";
|
|
107
|
+
readonly description: "When the contact was last seen (Unix ms).";
|
|
108
|
+
}];
|
|
109
|
+
readonly responses: {
|
|
110
|
+
readonly contacts: z.ZodArray<z.ZodObject<{
|
|
111
|
+
id: z.ZodString;
|
|
112
|
+
role: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
113
|
+
email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
114
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
115
|
+
created_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
116
|
+
updated_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
117
|
+
last_seen_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
118
|
+
}, z.core.$strip>>;
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
readonly intercom_conversation: {
|
|
122
|
+
readonly shape: "entity";
|
|
123
|
+
readonly description: "Conversations with state, priority, assignment, reply-time statistics, and tags.";
|
|
124
|
+
readonly endpoint: "POST /conversations/search";
|
|
125
|
+
readonly fields: [{
|
|
126
|
+
readonly name: "state";
|
|
127
|
+
readonly description: "Conversation state (open, snoozed, closed).";
|
|
128
|
+
}, {
|
|
129
|
+
readonly name: "priority";
|
|
130
|
+
readonly description: "Conversation priority.";
|
|
131
|
+
}, {
|
|
132
|
+
readonly name: "adminAssigneeId";
|
|
133
|
+
readonly description: "Assigned admin id (null if unassigned).";
|
|
134
|
+
}, {
|
|
135
|
+
readonly name: "teamAssigneeId";
|
|
136
|
+
readonly description: "Assigned team id (null if unassigned).";
|
|
137
|
+
}, {
|
|
138
|
+
readonly name: "createdAt";
|
|
139
|
+
readonly description: "When the conversation was created (Unix ms).";
|
|
140
|
+
}, {
|
|
141
|
+
readonly name: "firstContactReplyAt";
|
|
142
|
+
readonly description: "First contact reply time (Unix ms).";
|
|
143
|
+
}, {
|
|
144
|
+
readonly name: "firstAdminReplyAt";
|
|
145
|
+
readonly description: "First admin reply time (Unix ms).";
|
|
146
|
+
}, {
|
|
147
|
+
readonly name: "snoozedUntil";
|
|
148
|
+
readonly description: "Snooze expiry time (Unix ms), if snoozed.";
|
|
149
|
+
}, {
|
|
150
|
+
readonly name: "countAssignments";
|
|
151
|
+
readonly description: "Number of assignments.";
|
|
152
|
+
}, {
|
|
153
|
+
readonly name: "countReopens";
|
|
154
|
+
readonly description: "Number of reopens.";
|
|
155
|
+
}, {
|
|
156
|
+
readonly name: "countConversationParts";
|
|
157
|
+
readonly description: "Number of conversation parts.";
|
|
158
|
+
}, {
|
|
159
|
+
readonly name: "tags";
|
|
160
|
+
readonly description: "Flat list of tag names on the conversation.";
|
|
161
|
+
}];
|
|
162
|
+
readonly responses: {
|
|
163
|
+
readonly conversations: z.ZodArray<z.ZodObject<{
|
|
164
|
+
id: z.ZodString;
|
|
165
|
+
state: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
166
|
+
priority: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
167
|
+
admin_assignee_id: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>;
|
|
168
|
+
team_assignee_id: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>;
|
|
169
|
+
created_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
170
|
+
updated_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
171
|
+
snoozed_until: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
172
|
+
tags: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
173
|
+
tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
174
|
+
id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
175
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
176
|
+
}, z.core.$strip>>>>;
|
|
177
|
+
}, z.core.$strip>>>;
|
|
178
|
+
statistics: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
179
|
+
first_contact_reply_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
180
|
+
first_admin_reply_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
181
|
+
last_assignment_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
182
|
+
last_admin_reply_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
183
|
+
last_contact_reply_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
184
|
+
last_close_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
185
|
+
count_assignments: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
186
|
+
count_reopens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
187
|
+
count_conversation_parts: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
188
|
+
}, z.core.$strip>>>;
|
|
189
|
+
}, z.core.$strip>>;
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
readonly intercom_conversation_state_change: {
|
|
193
|
+
readonly shape: "event";
|
|
194
|
+
readonly description: "State-change events (created / assigned / closed / snoozed) derived from each conversation.";
|
|
195
|
+
readonly endpoint: "POST /conversations/search";
|
|
196
|
+
readonly notes: "Derived from each conversation’s statistics block; the scope is cleared and rewritten on every sync.";
|
|
197
|
+
readonly fields: [{
|
|
198
|
+
readonly name: "conversationId";
|
|
199
|
+
readonly description: "The conversation the event belongs to.";
|
|
200
|
+
}, {
|
|
201
|
+
readonly name: "transition";
|
|
202
|
+
readonly description: "created, assigned, closed, or snoozed.";
|
|
203
|
+
}, {
|
|
204
|
+
readonly name: "state";
|
|
205
|
+
readonly description: "Conversation state at sync time.";
|
|
206
|
+
}, {
|
|
207
|
+
readonly name: "priority";
|
|
208
|
+
readonly description: "Conversation priority at sync time.";
|
|
209
|
+
}, {
|
|
210
|
+
readonly name: "adminAssigneeId";
|
|
211
|
+
readonly description: "Assigned admin id (null if unassigned).";
|
|
212
|
+
}, {
|
|
213
|
+
readonly name: "teamAssigneeId";
|
|
214
|
+
readonly description: "Assigned team id (null if unassigned).";
|
|
215
|
+
}];
|
|
216
|
+
readonly responses: {
|
|
217
|
+
readonly conversation_events: z.ZodArray<z.ZodObject<{
|
|
218
|
+
id: z.ZodString;
|
|
219
|
+
state: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
220
|
+
priority: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
221
|
+
admin_assignee_id: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>;
|
|
222
|
+
team_assignee_id: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>;
|
|
223
|
+
created_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
224
|
+
updated_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
225
|
+
snoozed_until: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
226
|
+
tags: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
227
|
+
tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
228
|
+
id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
229
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
230
|
+
}, z.core.$strip>>>>;
|
|
231
|
+
}, z.core.$strip>>>;
|
|
232
|
+
statistics: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
233
|
+
first_contact_reply_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
234
|
+
first_admin_reply_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
235
|
+
last_assignment_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
236
|
+
last_admin_reply_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
237
|
+
last_contact_reply_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
238
|
+
last_close_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
239
|
+
count_assignments: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
240
|
+
count_reopens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
241
|
+
count_conversation_parts: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
242
|
+
}, z.core.$strip>>>;
|
|
243
|
+
}, z.core.$strip>>;
|
|
244
|
+
};
|
|
245
|
+
};
|
|
246
|
+
};
|
|
247
|
+
declare const id = "intercom";
|
|
37
248
|
declare class IntercomConnector extends BaseConnector<IntercomSettings, IntercomCredentials> {
|
|
38
249
|
static readonly id = "intercom";
|
|
250
|
+
static readonly resources: {
|
|
251
|
+
readonly intercom_admin: {
|
|
252
|
+
readonly shape: "entity";
|
|
253
|
+
readonly description: "Intercom teammates (admins) with seat and away state.";
|
|
254
|
+
readonly endpoint: "GET /admins";
|
|
255
|
+
readonly fields: [{
|
|
256
|
+
readonly name: "name";
|
|
257
|
+
readonly description: "Admin display name.";
|
|
258
|
+
}, {
|
|
259
|
+
readonly name: "email";
|
|
260
|
+
readonly description: "Admin email address.";
|
|
261
|
+
}, {
|
|
262
|
+
readonly name: "jobTitle";
|
|
263
|
+
readonly description: "Admin job title.";
|
|
264
|
+
}, {
|
|
265
|
+
readonly name: "awayMode";
|
|
266
|
+
readonly description: "Whether away mode is enabled.";
|
|
267
|
+
}, {
|
|
268
|
+
readonly name: "hasInboxSeat";
|
|
269
|
+
readonly description: "Whether the admin has an inbox seat.";
|
|
270
|
+
}];
|
|
271
|
+
readonly responses: {
|
|
272
|
+
readonly admins: z.ZodArray<z.ZodObject<{
|
|
273
|
+
id: z.ZodString;
|
|
274
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
275
|
+
email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
276
|
+
job_title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
277
|
+
away_mode_enabled: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
278
|
+
has_inbox_seat: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
279
|
+
}, z.core.$strip>>;
|
|
280
|
+
};
|
|
281
|
+
};
|
|
282
|
+
readonly intercom_team: {
|
|
283
|
+
readonly shape: "entity";
|
|
284
|
+
readonly description: "Inbox teams and their admin membership counts.";
|
|
285
|
+
readonly endpoint: "GET /teams";
|
|
286
|
+
readonly fields: [{
|
|
287
|
+
readonly name: "name";
|
|
288
|
+
readonly description: "Team name.";
|
|
289
|
+
}, {
|
|
290
|
+
readonly name: "adminCount";
|
|
291
|
+
readonly description: "Number of admins on the team.";
|
|
292
|
+
}];
|
|
293
|
+
readonly responses: {
|
|
294
|
+
readonly teams: z.ZodArray<z.ZodObject<{
|
|
295
|
+
id: z.ZodString;
|
|
296
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
297
|
+
admin_ids: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber>>>;
|
|
298
|
+
}, z.core.$strip>>;
|
|
299
|
+
};
|
|
300
|
+
};
|
|
301
|
+
readonly intercom_contact: {
|
|
302
|
+
readonly shape: "entity";
|
|
303
|
+
readonly description: "Contacts (users and leads) with role and last-seen time.";
|
|
304
|
+
readonly endpoint: "POST /contacts/search";
|
|
305
|
+
readonly fields: [{
|
|
306
|
+
readonly name: "role";
|
|
307
|
+
readonly description: "Contact role (user or lead).";
|
|
308
|
+
}, {
|
|
309
|
+
readonly name: "email";
|
|
310
|
+
readonly description: "Contact email address.";
|
|
311
|
+
}, {
|
|
312
|
+
readonly name: "externalId";
|
|
313
|
+
readonly description: "Your external identifier for the contact.";
|
|
314
|
+
}, {
|
|
315
|
+
readonly name: "createdAt";
|
|
316
|
+
readonly description: "When the contact was created (Unix ms).";
|
|
317
|
+
}, {
|
|
318
|
+
readonly name: "lastSeenAt";
|
|
319
|
+
readonly description: "When the contact was last seen (Unix ms).";
|
|
320
|
+
}];
|
|
321
|
+
readonly responses: {
|
|
322
|
+
readonly contacts: z.ZodArray<z.ZodObject<{
|
|
323
|
+
id: z.ZodString;
|
|
324
|
+
role: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
325
|
+
email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
326
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
327
|
+
created_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
328
|
+
updated_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
329
|
+
last_seen_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
330
|
+
}, z.core.$strip>>;
|
|
331
|
+
};
|
|
332
|
+
};
|
|
333
|
+
readonly intercom_conversation: {
|
|
334
|
+
readonly shape: "entity";
|
|
335
|
+
readonly description: "Conversations with state, priority, assignment, reply-time statistics, and tags.";
|
|
336
|
+
readonly endpoint: "POST /conversations/search";
|
|
337
|
+
readonly fields: [{
|
|
338
|
+
readonly name: "state";
|
|
339
|
+
readonly description: "Conversation state (open, snoozed, closed).";
|
|
340
|
+
}, {
|
|
341
|
+
readonly name: "priority";
|
|
342
|
+
readonly description: "Conversation priority.";
|
|
343
|
+
}, {
|
|
344
|
+
readonly name: "adminAssigneeId";
|
|
345
|
+
readonly description: "Assigned admin id (null if unassigned).";
|
|
346
|
+
}, {
|
|
347
|
+
readonly name: "teamAssigneeId";
|
|
348
|
+
readonly description: "Assigned team id (null if unassigned).";
|
|
349
|
+
}, {
|
|
350
|
+
readonly name: "createdAt";
|
|
351
|
+
readonly description: "When the conversation was created (Unix ms).";
|
|
352
|
+
}, {
|
|
353
|
+
readonly name: "firstContactReplyAt";
|
|
354
|
+
readonly description: "First contact reply time (Unix ms).";
|
|
355
|
+
}, {
|
|
356
|
+
readonly name: "firstAdminReplyAt";
|
|
357
|
+
readonly description: "First admin reply time (Unix ms).";
|
|
358
|
+
}, {
|
|
359
|
+
readonly name: "snoozedUntil";
|
|
360
|
+
readonly description: "Snooze expiry time (Unix ms), if snoozed.";
|
|
361
|
+
}, {
|
|
362
|
+
readonly name: "countAssignments";
|
|
363
|
+
readonly description: "Number of assignments.";
|
|
364
|
+
}, {
|
|
365
|
+
readonly name: "countReopens";
|
|
366
|
+
readonly description: "Number of reopens.";
|
|
367
|
+
}, {
|
|
368
|
+
readonly name: "countConversationParts";
|
|
369
|
+
readonly description: "Number of conversation parts.";
|
|
370
|
+
}, {
|
|
371
|
+
readonly name: "tags";
|
|
372
|
+
readonly description: "Flat list of tag names on the conversation.";
|
|
373
|
+
}];
|
|
374
|
+
readonly responses: {
|
|
375
|
+
readonly conversations: z.ZodArray<z.ZodObject<{
|
|
376
|
+
id: z.ZodString;
|
|
377
|
+
state: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
378
|
+
priority: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
379
|
+
admin_assignee_id: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>;
|
|
380
|
+
team_assignee_id: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>;
|
|
381
|
+
created_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
382
|
+
updated_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
383
|
+
snoozed_until: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
384
|
+
tags: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
385
|
+
tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
386
|
+
id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
387
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
388
|
+
}, z.core.$strip>>>>;
|
|
389
|
+
}, z.core.$strip>>>;
|
|
390
|
+
statistics: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
391
|
+
first_contact_reply_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
392
|
+
first_admin_reply_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
393
|
+
last_assignment_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
394
|
+
last_admin_reply_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
395
|
+
last_contact_reply_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
396
|
+
last_close_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
397
|
+
count_assignments: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
398
|
+
count_reopens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
399
|
+
count_conversation_parts: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
400
|
+
}, z.core.$strip>>>;
|
|
401
|
+
}, z.core.$strip>>;
|
|
402
|
+
};
|
|
403
|
+
};
|
|
404
|
+
readonly intercom_conversation_state_change: {
|
|
405
|
+
readonly shape: "event";
|
|
406
|
+
readonly description: "State-change events (created / assigned / closed / snoozed) derived from each conversation.";
|
|
407
|
+
readonly endpoint: "POST /conversations/search";
|
|
408
|
+
readonly notes: "Derived from each conversation’s statistics block; the scope is cleared and rewritten on every sync.";
|
|
409
|
+
readonly fields: [{
|
|
410
|
+
readonly name: "conversationId";
|
|
411
|
+
readonly description: "The conversation the event belongs to.";
|
|
412
|
+
}, {
|
|
413
|
+
readonly name: "transition";
|
|
414
|
+
readonly description: "created, assigned, closed, or snoozed.";
|
|
415
|
+
}, {
|
|
416
|
+
readonly name: "state";
|
|
417
|
+
readonly description: "Conversation state at sync time.";
|
|
418
|
+
}, {
|
|
419
|
+
readonly name: "priority";
|
|
420
|
+
readonly description: "Conversation priority at sync time.";
|
|
421
|
+
}, {
|
|
422
|
+
readonly name: "adminAssigneeId";
|
|
423
|
+
readonly description: "Assigned admin id (null if unassigned).";
|
|
424
|
+
}, {
|
|
425
|
+
readonly name: "teamAssigneeId";
|
|
426
|
+
readonly description: "Assigned team id (null if unassigned).";
|
|
427
|
+
}];
|
|
428
|
+
readonly responses: {
|
|
429
|
+
readonly conversation_events: z.ZodArray<z.ZodObject<{
|
|
430
|
+
id: z.ZodString;
|
|
431
|
+
state: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
432
|
+
priority: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
433
|
+
admin_assignee_id: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>;
|
|
434
|
+
team_assignee_id: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>;
|
|
435
|
+
created_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
436
|
+
updated_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
437
|
+
snoozed_until: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
438
|
+
tags: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
439
|
+
tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
440
|
+
id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
441
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
442
|
+
}, z.core.$strip>>>>;
|
|
443
|
+
}, z.core.$strip>>>;
|
|
444
|
+
statistics: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
445
|
+
first_contact_reply_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
446
|
+
first_admin_reply_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
447
|
+
last_assignment_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
448
|
+
last_admin_reply_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
449
|
+
last_contact_reply_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
450
|
+
last_close_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
451
|
+
count_assignments: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
452
|
+
count_reopens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
453
|
+
count_conversation_parts: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
454
|
+
}, z.core.$strip>>>;
|
|
455
|
+
}, z.core.$strip>>;
|
|
456
|
+
};
|
|
457
|
+
};
|
|
458
|
+
};
|
|
39
459
|
static readonly schemas: {
|
|
40
460
|
readonly admins: z.ZodArray<z.ZodObject<{
|
|
41
461
|
id: z.ZodString;
|
|
@@ -45,11 +465,13 @@ declare class IntercomConnector extends BaseConnector<IntercomSettings, Intercom
|
|
|
45
465
|
away_mode_enabled: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
46
466
|
has_inbox_seat: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
47
467
|
}, z.core.$strip>>;
|
|
468
|
+
} & {
|
|
48
469
|
readonly teams: z.ZodArray<z.ZodObject<{
|
|
49
470
|
id: z.ZodString;
|
|
50
471
|
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
51
472
|
admin_ids: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber>>>;
|
|
52
473
|
}, z.core.$strip>>;
|
|
474
|
+
} & {
|
|
53
475
|
readonly contacts: z.ZodArray<z.ZodObject<{
|
|
54
476
|
id: z.ZodString;
|
|
55
477
|
role: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -59,6 +481,7 @@ declare class IntercomConnector extends BaseConnector<IntercomSettings, Intercom
|
|
|
59
481
|
updated_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
60
482
|
last_seen_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
61
483
|
}, z.core.$strip>>;
|
|
484
|
+
} & {
|
|
62
485
|
readonly conversations: z.ZodArray<z.ZodObject<{
|
|
63
486
|
id: z.ZodString;
|
|
64
487
|
state: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -86,6 +509,7 @@ declare class IntercomConnector extends BaseConnector<IntercomSettings, Intercom
|
|
|
86
509
|
count_conversation_parts: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
87
510
|
}, z.core.$strip>>>;
|
|
88
511
|
}, z.core.$strip>>;
|
|
512
|
+
} & {
|
|
89
513
|
readonly conversation_events: z.ZodArray<z.ZodObject<{
|
|
90
514
|
id: z.ZodString;
|
|
91
515
|
state: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -113,7 +537,7 @@ declare class IntercomConnector extends BaseConnector<IntercomSettings, Intercom
|
|
|
113
537
|
count_conversation_parts: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
114
538
|
}, z.core.$strip>>>;
|
|
115
539
|
}, z.core.$strip>>;
|
|
116
|
-
}
|
|
540
|
+
} & Readonly<Record<string, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
|
|
117
541
|
static create(input: unknown, ctx?: ConnectorContext): IntercomConnector;
|
|
118
542
|
readonly id = "intercom";
|
|
119
543
|
readonly credentials: {
|
|
@@ -142,4 +566,4 @@ declare class IntercomConnector extends BaseConnector<IntercomSettings, Intercom
|
|
|
142
566
|
sync(options: SyncOptions, storage: StorageHandle, signal?: AbortSignal): Promise<SyncResult>;
|
|
143
567
|
}
|
|
144
568
|
|
|
145
|
-
export { IntercomConnector, type IntercomResource, type IntercomSettings, configFields, IntercomConnector as default };
|
|
569
|
+
export { IntercomConnector, type IntercomResource, type IntercomSettings, configFields, IntercomConnector as default, doc, id, intercomResources as resources };
|