-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Expand file tree
/
Copy pathevents.ts
More file actions
473 lines (389 loc) · 8.48 KB
/
Copy pathevents.ts
File metadata and controls
473 lines (389 loc) · 8.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
/**
* PostHog product analytics event catalog.
*
* Type-only module — zero runtime overhead. All event names and property shapes
* are defined here as a single source of truth for compile-time safety at every
* capture call site.
*/
export interface PostHogEventMap {
user_created: {
auth_method: 'email' | 'oauth' | 'sso'
provider?: string
}
landing_page_viewed: Record<string, never>
landing_cta_clicked: {
label: string
section: 'hero' | 'navbar' | 'footer_cta' | 'pricing'
destination: string
}
landing_demo_request_submitted: {
company_size: string
}
landing_prompt_submitted: Record<string, never>
signup_page_viewed: Record<string, never>
signup_failed: {
error_code: string
}
subscription_created: {
plan: string
status: string
reference_id: string
}
subscription_cancelled: {
plan: string
reference_id: string
}
subscription_changed: {
from_plan: string
to_plan: string
interval: string
}
workspace_created: {
workspace_id: string
name: string
}
workspace_member_invited: {
workspace_id: string
invitee_role: string
}
workspace_member_removed: {
workspace_id: string
is_self_removal: boolean
}
workspace_member_role_changed: {
workspace_id: string
new_role: string
}
workflow_created: {
workflow_id: string
workspace_id: string
name: string
}
workflow_deployed: {
workflow_id: string
workspace_id: string
}
/** `block_types` is a comma-separated deduped list of block types that ran. */
workflow_executed: {
workflow_id: string
workspace_id: string
trigger_type: string
success: boolean
block_count: number
block_types: string
duration_ms: number
}
workflow_execution_failed: {
workflow_id: string
workspace_id: string
trigger_type: string
error_message: string
}
workflow_duplicated: {
source_workflow_id: string
new_workflow_id: string
workspace_id: string
}
workflow_deleted: {
workflow_id: string
workspace_id: string
}
workflow_deployment_reverted: {
workflow_id: string
workspace_id: string
version: string
}
workflow_execution_cancelled: {
workflow_id: string
workspace_id: string
}
workflow_undeployed: {
workflow_id: string
workspace_id: string
}
workflow_restored: {
workflow_id: string
workspace_id: string
}
workflow_public_api_toggled: {
workflow_id: string
workspace_id: string
is_public: boolean
}
deployment_version_activated: {
workflow_id: string
workspace_id: string
version: number
}
webhook_trigger_created: {
webhook_id: string
workflow_id: string
workspace_id: string
provider: string
}
webhook_trigger_deleted: {
webhook_id: string
workflow_id: string
workspace_id: string
provider: string
}
skill_created: {
skill_id: string
skill_name: string
workspace_id: string
source?: 'settings' | 'tool_input'
}
skill_deleted: {
skill_id: string
workspace_id: string
source?: 'settings' | 'tool_input'
}
workspace_deleted: {
workspace_id: string
workflow_count: number
}
notification_channel_deleted: {
notification_id: string
workspace_id: string
notification_type: string
}
a2a_agent_deleted: {
agent_id: string
workflow_id: string
workspace_id: string
}
a2a_agent_published: {
agent_id: string
workflow_id: string
workspace_id: string
}
a2a_agent_unpublished: {
agent_id: string
workflow_id: string
workspace_id: string
}
a2a_agent_created: {
agent_id: string
workflow_id: string
workspace_id: string
}
block_added: {
block_type: string
workflow_id: string
}
block_removed: {
block_type: string
workflow_id: string
}
knowledge_base_created: {
knowledge_base_id: string
workspace_id: string
name: string
}
knowledge_base_document_uploaded: {
knowledge_base_id: string
workspace_id: string
document_count: number
upload_type: 'single' | 'bulk'
}
knowledge_base_connector_added: {
knowledge_base_id: string
workspace_id: string
connector_type: string
sync_interval_minutes: number
}
knowledge_base_connector_removed: {
knowledge_base_id: string
workspace_id: string
connector_type: string
documents_deleted: number
}
knowledge_base_connector_synced: {
knowledge_base_id: string
workspace_id: string
connector_type: string
}
knowledge_base_opened: {
knowledge_base_id: string
knowledge_base_name: string
}
file_uploaded: {
workspace_id: string
file_type: string
}
api_key_created: {
workspace_id: string
key_name: string
source?: 'settings' | 'deploy_modal'
}
api_key_revoked: {
workspace_id: string
key_name: string
}
mcp_server_connected: {
workspace_id: string
server_name: string
transport: string
source?: 'settings' | 'tool_input'
}
mcp_server_disconnected: {
workspace_id: string
server_name: string
source?: 'settings' | 'tool_input'
}
credential_connected: {
credential_type: 'oauth' | 'env_workspace' | 'env_personal' | 'service_account'
provider_id: string
workspace_id: string
}
credential_deleted: {
credential_type: 'oauth' | 'env_workspace' | 'env_personal' | 'service_account'
provider_id: string
workspace_id: string
}
copilot_chat_sent: {
workflow_id: string
workspace_id: string
has_file_attachments: boolean
has_contexts: boolean
mode: string
}
copilot_feedback_submitted: {
is_positive: boolean
has_text_feedback: boolean
has_workflow_yaml: boolean
}
/** `template_modules` is a space-separated list of module tags, e.g. `"agent tables knowledge-base"`. */
template_used: {
template_title: string
template_modules: string
}
settings_tab_viewed: {
section: string
}
table_opened: {
table_id: string
workspace_id: string
}
table_created: {
table_id: string
workspace_id: string
column_count: number
}
table_deleted: {
table_id: string
workspace_id: string
}
custom_tool_saved: {
tool_id: string
workspace_id: string
tool_name: string
source?: 'settings' | 'tool_input'
}
custom_tool_deleted: {
tool_id: string
workspace_id: string
source?: 'settings' | 'tool_input'
}
byok_key_added: {
workspace_id: string
provider_id: string
}
byok_key_removed: {
workspace_id: string
provider_id: string
}
notification_channel_created: {
workspace_id: string
notification_type: 'webhook' | 'email' | 'slack'
alert_rule: string | null
}
task_created: {
workspace_id: string
}
task_renamed: {
workspace_id: string
}
task_deleted: {
workspace_id: string
}
task_marked_unread: {
workspace_id: string
}
task_generation_aborted: {
workspace_id: string
view: 'mothership' | 'copilot'
}
task_message_sent: {
workspace_id: string
has_attachments: boolean
has_contexts: boolean
is_new_task: boolean
}
tour_started: {
tour_type: 'nav' | 'workflow'
}
tour_completed: {
tour_type: 'nav' | 'workflow'
}
tour_skipped: {
tour_type: 'nav' | 'workflow'
step_index: number
}
docs_opened: {
source: 'help_menu' | 'editor_button' | 'toolbar_context_menu'
block_type?: string
}
search_result_selected: {
result_type:
| 'block'
| 'tool'
| 'trigger'
| 'tool_operation'
| 'workflow'
| 'workspace'
| 'task'
| 'table'
| 'file'
| 'knowledge_base'
| 'page'
| 'docs'
query_length: number
workspace_id: string
}
workflow_imported: {
workspace_id: string
workflow_count: number
format: 'json' | 'zip'
}
workflow_exported: {
workspace_id: string
workflow_count: number
format: 'json' | 'zip'
}
folder_created: {
workspace_id: string
}
folder_deleted: {
workspace_id: string
}
folder_restored: {
folder_id: string
workspace_id: string
}
logs_filter_applied: {
filter_type: 'status' | 'workflow' | 'folder' | 'trigger' | 'time'
workspace_id: string
}
knowledge_base_document_deleted: {
knowledge_base_id: string
workspace_id: string
}
scheduled_task_created: {
workspace_id: string
}
scheduled_task_deleted: {
workspace_id: string
}
}
export type PostHogEventName = keyof PostHogEventMap